@blocknote/xl-multi-column 0.23.1 → 0.23.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,13 @@
1
- var F = Object.defineProperty;
2
- var Y = (o, e, t) => e in o ? F(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
- var p = (o, e, t) => Y(o, typeof e != "symbol" ? e + "" : e, t);
4
- import { getNodeById as E, createStronglyTypedTiptapNode as R, createBlockSpecFromStronglyTypedTiptapNode as j, BlockNoteSchema as z, getBlockInfo as Z, nodeToBlock as S, UniqueID as q, getNearestBlockPos as $, insertOrUpdateBlock as O } from "@blocknote/core";
5
- import { Extension as J } from "@tiptap/core";
6
- import { PluginKey as Q, Plugin as H } from "prosemirror-state";
7
- import { DecorationSet as D, Decoration as B } from "prosemirror-view";
8
- import { dropPoint as ee } from "prosemirror-transform";
9
- import { jsx as T } from "react/jsx-runtime";
10
- import v from "react";
11
- const te = {
1
+ var jt = Object.defineProperty;
2
+ var Nt = (n, t, r) => t in n ? jt(n, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[t] = r;
3
+ var R = (n, t, r) => Nt(n, typeof t != "symbol" ? t + "" : t, r);
4
+ import { getNodeById as Me, createStronglyTypedTiptapNode as Ye, createBlockSpecFromStronglyTypedTiptapNode as $e, BlockNoteSchema as Xe, getBlockInfo as Mt, nodeToBlock as ue, UniqueID as Bt, getNearestBlockPos as It, insertOrUpdateBlock as Be } from "@blocknote/core";
5
+ import { Extension as At } from "@tiptap/core";
6
+ import { PluginKey as Lt, Plugin as Ke } from "prosemirror-state";
7
+ import { DecorationSet as Ie, Decoration as Ae } from "prosemirror-view";
8
+ import { dropPoint as Wt } from "prosemirror-transform";
9
+ import I from "react";
10
+ const Vt = {
12
11
  slash_menu: {
13
12
  two_columns: {
14
13
  title: "عمودان",
@@ -23,7 +22,7 @@ const te = {
23
22
  group: "الكتل الأساسية"
24
23
  }
25
24
  }
26
- }, oe = {
25
+ }, zt = {
27
26
  slash_menu: {
28
27
  two_columns: {
29
28
  title: "Zwei Spalten",
@@ -38,7 +37,7 @@ const te = {
38
37
  group: "Grundlegende blöcke"
39
38
  }
40
39
  }
41
- }, ne = {
40
+ }, Ft = {
42
41
  slash_menu: {
43
42
  two_columns: {
44
43
  title: "Two Columns",
@@ -53,7 +52,7 @@ const te = {
53
52
  group: "Basic blocks"
54
53
  }
55
54
  }
56
- }, ie = {
55
+ }, Ht = {
57
56
  slash_menu: {
58
57
  two_columns: {
59
58
  title: "Dos Columnas",
@@ -68,7 +67,7 @@ const te = {
68
67
  group: "Bloques básicos"
69
68
  }
70
69
  }
71
- }, se = {
70
+ }, Ut = {
72
71
  slash_menu: {
73
72
  two_columns: {
74
73
  title: "Deux Colonnes",
@@ -83,7 +82,7 @@ const te = {
83
82
  group: "Blocs de base"
84
83
  }
85
84
  }
86
- }, re = {
85
+ }, Yt = {
87
86
  slash_menu: {
88
87
  two_columns: {
89
88
  title: "Dva Stupca",
@@ -98,7 +97,7 @@ const te = {
98
97
  group: "Osnovni blokovi"
99
98
  }
100
99
  }
101
- }, le = {
100
+ }, $t = {
102
101
  slash_menu: {
103
102
  two_columns: {
104
103
  title: "Tvær Dálkar",
@@ -113,7 +112,7 @@ const te = {
113
112
  group: "Grunnblokkar"
114
113
  }
115
114
  }
116
- }, ce = {
115
+ }, Xt = {
117
116
  slash_menu: {
118
117
  two_columns: {
119
118
  title: "二列",
@@ -128,7 +127,7 @@ const te = {
128
127
  group: "基本ブロック"
129
128
  }
130
129
  }
131
- }, ae = {
130
+ }, Kt = {
132
131
  slash_menu: {
133
132
  two_columns: {
134
133
  title: "두 열",
@@ -143,7 +142,7 @@ const te = {
143
142
  group: "기본 블록"
144
143
  }
145
144
  }
146
- }, ue = {
145
+ }, Gt = {
147
146
  slash_menu: {
148
147
  two_columns: {
149
148
  title: "Twee Kolommen",
@@ -158,7 +157,7 @@ const te = {
158
157
  group: "Basisblokken"
159
158
  }
160
159
  }
161
- }, de = {
160
+ }, qt = {
162
161
  slash_menu: {
163
162
  two_columns: {
164
163
  title: "Dwie Kolumny",
@@ -173,7 +172,7 @@ const te = {
173
172
  group: "Podstawowe bloki"
174
173
  }
175
174
  }
176
- }, he = {
175
+ }, Jt = {
177
176
  slash_menu: {
178
177
  two_columns: {
179
178
  title: "Duas Colunas",
@@ -188,7 +187,7 @@ const te = {
188
187
  group: "Blocos básicos"
189
188
  }
190
189
  }
191
- }, me = {
190
+ }, Zt = {
192
191
  slash_menu: {
193
192
  two_columns: {
194
193
  title: "Два Столбца",
@@ -203,7 +202,7 @@ const te = {
203
202
  group: "Базовые блоки"
204
203
  }
205
204
  }
206
- }, pe = {
205
+ }, Qt = {
207
206
  slash_menu: {
208
207
  two_columns: {
209
208
  title: "Hai Cột",
@@ -218,7 +217,7 @@ const te = {
218
217
  group: "Khối cơ bản"
219
218
  }
220
219
  }
221
- }, fe = {
220
+ }, er = {
222
221
  slash_menu: {
223
222
  two_columns: {
224
223
  title: "两列",
@@ -233,164 +232,164 @@ const te = {
233
232
  group: "基础"
234
233
  }
235
234
  }
236
- }, Ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
235
+ }, Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
237
236
  __proto__: null,
238
- ar: te,
239
- de: oe,
240
- en: ne,
241
- es: ie,
242
- fr: se,
243
- hr: re,
244
- is: le,
245
- ja: ce,
246
- ko: ae,
247
- nl: ue,
248
- pl: de,
249
- pt: he,
250
- ru: me,
251
- vi: pe,
252
- zh: fe
237
+ ar: Vt,
238
+ de: zt,
239
+ en: Ft,
240
+ es: Ht,
241
+ fr: Ut,
242
+ hr: Yt,
243
+ is: $t,
244
+ ja: Xt,
245
+ ko: Kt,
246
+ nl: Gt,
247
+ pl: qt,
248
+ pt: Jt,
249
+ ru: Zt,
250
+ vi: Qt,
251
+ zh: er
253
252
  }, Symbol.toStringTag, { value: "Module" }));
254
- function N(o) {
255
- if (!o.dictionary.multi_column)
253
+ function Le(n) {
254
+ if (!n.dictionary.multi_column)
256
255
  throw new Error("Multi-column dictionary not found");
257
- return o.dictionary.multi_column;
256
+ return n.dictionary.multi_column;
258
257
  }
259
- const C = new Q("ColumnResizePlugin");
260
- class ge {
261
- constructor(e, t) {
262
- p(this, "editor");
263
- p(this, "view");
264
- p(this, "RESIZE_MARGIN_WIDTH_PX", 20);
265
- p(this, "COLUMN_MIN_WIDTH_PERCENT", 0.5);
266
- p(this, "getColumnHoverOrDefaultState", (e) => {
258
+ const B = new Lt("ColumnResizePlugin");
259
+ class tr {
260
+ constructor(t, r) {
261
+ R(this, "editor");
262
+ R(this, "view");
263
+ R(this, "RESIZE_MARGIN_WIDTH_PX", 20);
264
+ R(this, "COLUMN_MIN_WIDTH_PERCENT", 0.5);
265
+ R(this, "getColumnHoverOrDefaultState", (t) => {
267
266
  if (!this.editor.isEditable)
268
267
  return { type: "default" };
269
- const t = e.target;
270
- if (!this.view.dom.contains(t))
268
+ const r = t.target;
269
+ if (!this.view.dom.contains(r))
271
270
  return { type: "default" };
272
- const n = t.closest(
271
+ const i = r.closest(
273
272
  ".bn-block-column"
274
273
  );
275
- if (!n)
274
+ if (!i)
276
275
  return { type: "default" };
277
- const r = e.clientX, u = n.getBoundingClientRect(), c = r < u.left + this.RESIZE_MARGIN_WIDTH_PX ? "left" : r > u.right - this.RESIZE_MARGIN_WIDTH_PX ? "right" : "none", l = c === "left" ? n.previousElementSibling : c === "right" ? n.nextElementSibling : void 0;
278
- if (!l)
276
+ const f = t.clientX, b = i.getBoundingClientRect(), p = f < b.left + this.RESIZE_MARGIN_WIDTH_PX ? "left" : f > b.right - this.RESIZE_MARGIN_WIDTH_PX ? "right" : "none", h = p === "left" ? i.previousElementSibling : p === "right" ? i.nextElementSibling : void 0;
277
+ if (!h)
279
278
  return { type: "default" };
280
- const i = c === "left" ? l : n, g = c === "left" ? n : l, a = i.getAttribute("data-id"), s = g.getAttribute("data-id"), d = E(a, this.view.state.doc), m = E(
281
- s,
279
+ const u = p === "left" ? h : i, S = p === "left" ? i : h, g = u.getAttribute("data-id"), c = S.getAttribute("data-id"), y = Me(g, this.view.state.doc), E = Me(
280
+ c,
282
281
  this.view.state.doc
283
282
  );
284
- if (!d || !m || !d.posBeforeNode)
283
+ if (!y || !E || !y.posBeforeNode)
285
284
  throw new Error("Column not found");
286
285
  return {
287
286
  type: "hover",
288
287
  leftColumn: {
289
- element: i,
290
- id: a,
291
- ...d
288
+ element: u,
289
+ id: g,
290
+ ...y
292
291
  },
293
292
  rightColumn: {
294
- element: g,
295
- id: s,
296
- ...m
293
+ element: S,
294
+ id: c,
295
+ ...E
297
296
  }
298
297
  };
299
298
  });
300
299
  // When the user mouses down near the boundary between two columns, we
301
300
  // want to set the plugin state to resize, so the columns can be resized
302
301
  // by moving the mouse.
303
- p(this, "mouseDownHandler", (e) => {
304
- let t = this.getColumnHoverOrDefaultState(e);
305
- if (t.type === "default")
302
+ R(this, "mouseDownHandler", (t) => {
303
+ let r = this.getColumnHoverOrDefaultState(t);
304
+ if (r.type === "default")
306
305
  return;
307
- e.preventDefault();
308
- const n = e.clientX, r = t.leftColumn.element.getBoundingClientRect().width, u = t.rightColumn.element.getBoundingClientRect().width, c = t.leftColumn.node.attrs.width, l = t.rightColumn.node.attrs.width;
309
- t = {
306
+ t.preventDefault();
307
+ const i = t.clientX, f = r.leftColumn.element.getBoundingClientRect().width, b = r.rightColumn.element.getBoundingClientRect().width, p = r.leftColumn.node.attrs.width, h = r.rightColumn.node.attrs.width;
308
+ r = {
310
309
  type: "resize",
311
- startPos: n,
310
+ startPos: i,
312
311
  leftColumn: {
313
- ...t.leftColumn,
314
- widthPx: r,
315
- widthPercent: c
312
+ ...r.leftColumn,
313
+ widthPx: f,
314
+ widthPercent: p
316
315
  },
317
316
  rightColumn: {
318
- ...t.rightColumn,
319
- widthPx: u,
320
- widthPercent: l
317
+ ...r.rightColumn,
318
+ widthPx: b,
319
+ widthPercent: h
321
320
  }
322
321
  }, this.view.dispatch(
323
- this.view.state.tr.setMeta(C, t)
322
+ this.view.state.tr.setMeta(B, r)
324
323
  ), this.editor.sideMenu.freezeMenu();
325
324
  });
326
325
  // If the plugin isn't in a resize state, we want to update it to either a
327
326
  // hover state if the mouse is near the boundary between two columns, or
328
327
  // default otherwise. If the plugin is in a resize state, we want to
329
328
  // update the column widths based on the horizontal mouse movement.
330
- p(this, "mouseMoveHandler", (e) => {
331
- var i, g;
332
- const t = C.getState(this.view.state);
333
- if (!t)
329
+ R(this, "mouseMoveHandler", (t) => {
330
+ var u, S;
331
+ const r = B.getState(this.view.state);
332
+ if (!r)
334
333
  return;
335
- if (t.type !== "resize") {
336
- const a = this.getColumnHoverOrDefaultState(e), s = t.type === "default" && a.type === "default", d = t.type !== "default" && a.type !== "default" && t.leftColumn.id === a.leftColumn.id && t.rightColumn.id === a.rightColumn.id;
337
- if (s || d || a.type === "hover" && ((g = (i = this.editor.sideMenu.view) == null ? void 0 : i.state) != null && g.show))
334
+ if (r.type !== "resize") {
335
+ const g = this.getColumnHoverOrDefaultState(t), c = r.type === "default" && g.type === "default", y = r.type !== "default" && g.type !== "default" && r.leftColumn.id === g.leftColumn.id && r.rightColumn.id === g.rightColumn.id;
336
+ if (c || y || g.type === "hover" && ((S = (u = this.editor.sideMenu.view) == null ? void 0 : u.state) != null && S.show))
338
337
  return;
339
338
  this.view.dispatch(
340
- this.view.state.tr.setMeta(C, a)
339
+ this.view.state.tr.setMeta(B, g)
341
340
  );
342
341
  return;
343
342
  }
344
- const r = (e.clientX - t.startPos) * t.leftColumn.widthPercent, u = (t.leftColumn.widthPx + r) / t.leftColumn.widthPx - 1;
345
- let c = t.leftColumn.widthPercent + u, l = t.rightColumn.widthPercent - u;
346
- c < this.COLUMN_MIN_WIDTH_PERCENT ? (l -= this.COLUMN_MIN_WIDTH_PERCENT - c, c = this.COLUMN_MIN_WIDTH_PERCENT) : l < this.COLUMN_MIN_WIDTH_PERCENT && (c -= this.COLUMN_MIN_WIDTH_PERCENT - l, l = this.COLUMN_MIN_WIDTH_PERCENT), this.view.dispatch(
343
+ const f = (t.clientX - r.startPos) * r.leftColumn.widthPercent, b = (r.leftColumn.widthPx + f) / r.leftColumn.widthPx - 1;
344
+ let p = r.leftColumn.widthPercent + b, h = r.rightColumn.widthPercent - b;
345
+ p < this.COLUMN_MIN_WIDTH_PERCENT ? (h -= this.COLUMN_MIN_WIDTH_PERCENT - p, p = this.COLUMN_MIN_WIDTH_PERCENT) : h < this.COLUMN_MIN_WIDTH_PERCENT && (p -= this.COLUMN_MIN_WIDTH_PERCENT - h, h = this.COLUMN_MIN_WIDTH_PERCENT), this.view.dispatch(
347
346
  this.view.state.tr.setNodeAttribute(
348
- t.leftColumn.posBeforeNode,
347
+ r.leftColumn.posBeforeNode,
349
348
  "width",
350
- c
349
+ p
351
350
  ).setNodeAttribute(
352
- t.rightColumn.posBeforeNode,
351
+ r.rightColumn.posBeforeNode,
353
352
  "width",
354
- l
353
+ h
355
354
  ).setMeta("addToHistory", !1)
356
355
  );
357
356
  });
358
357
  // If the plugin is in a resize state, we want to revert it to a default
359
358
  // or hover, depending on where the mouse cursor is, when the user
360
359
  // releases the mouse button.
361
- p(this, "mouseUpHandler", (e) => {
362
- const t = C.getState(this.view.state);
363
- if (!t || t.type !== "resize")
360
+ R(this, "mouseUpHandler", (t) => {
361
+ const r = B.getState(this.view.state);
362
+ if (!r || r.type !== "resize")
364
363
  return;
365
- const n = this.getColumnHoverOrDefaultState(e);
364
+ const i = this.getColumnHoverOrDefaultState(t);
366
365
  this.view.dispatch(
367
- this.view.state.tr.setMeta(C, n)
366
+ this.view.state.tr.setMeta(B, i)
368
367
  ), this.editor.sideMenu.unfreezeMenu();
369
368
  });
370
- this.editor = e, this.view = t, this.view.dom.addEventListener("mousedown", this.mouseDownHandler), document.body.addEventListener("mousemove", this.mouseMoveHandler), document.body.addEventListener("mouseup", this.mouseUpHandler);
369
+ this.editor = t, this.view = r, this.view.dom.addEventListener("mousedown", this.mouseDownHandler), document.body.addEventListener("mousemove", this.mouseMoveHandler), document.body.addEventListener("mouseup", this.mouseUpHandler);
371
370
  }
372
371
  destroy() {
373
372
  this.view.dom.removeEventListener("mousedown", this.mouseDownHandler), document.body.removeEventListener("mousemove", this.mouseMoveHandler), document.body.removeEventListener("mouseup", this.mouseUpHandler);
374
373
  }
375
374
  }
376
- const be = (o) => new H({
377
- key: C,
375
+ const rr = (n) => new Ke({
376
+ key: B,
378
377
  props: {
379
378
  // This adds a border between the columns when the user is
380
379
  // resizing them or when the cursor is near their boundary.
381
- decorations: (e) => {
382
- const t = C.getState(e);
383
- return !t || t.type === "default" ? D.empty : D.create(e.doc, [
384
- B.node(
385
- t.leftColumn.posBeforeNode,
386
- t.leftColumn.posBeforeNode + t.leftColumn.node.nodeSize,
380
+ decorations: (t) => {
381
+ const r = B.getState(t);
382
+ return !r || r.type === "default" ? Ie.empty : Ie.create(t.doc, [
383
+ Ae.node(
384
+ r.leftColumn.posBeforeNode,
385
+ r.leftColumn.posBeforeNode + r.leftColumn.node.nodeSize,
387
386
  {
388
387
  style: "box-shadow: 4px 0 0 #ccc; cursor: col-resize"
389
388
  }
390
389
  ),
391
- B.node(
392
- t.rightColumn.posBeforeNode,
393
- t.rightColumn.posBeforeNode + t.rightColumn.node.nodeSize,
390
+ Ae.node(
391
+ r.rightColumn.posBeforeNode,
392
+ r.rightColumn.posBeforeNode + r.rightColumn.node.nodeSize,
394
393
  {
395
394
  style: "cursor: col-resize"
396
395
  }
@@ -400,18 +399,18 @@ const be = (o) => new H({
400
399
  },
401
400
  state: {
402
401
  init: () => ({ type: "default" }),
403
- apply: (e, t) => {
404
- const n = e.getMeta(C);
405
- return n === void 0 ? t : n;
402
+ apply: (t, r) => {
403
+ const i = t.getMeta(B);
404
+ return i === void 0 ? r : i;
406
405
  }
407
406
  },
408
- view: (e) => new ge(o, e)
409
- }), we = (o) => J.create({
407
+ view: (t) => new tr(n, t)
408
+ }), nr = (n) => At.create({
410
409
  name: "columnResize",
411
410
  addProseMirrorPlugins() {
412
- return [be(o)];
411
+ return [rr(n)];
413
412
  }
414
- }), Ce = R({
413
+ }), or = Ye({
415
414
  name: "column",
416
415
  group: "bnBlock childContainer",
417
416
  // A block always contains content, and optionally a blockGroup which contains nested blocks
@@ -434,16 +433,16 @@ const be = (o) => new H({
434
433
  // value, which handles all the resizing for us, instead of manually
435
434
  // having to set the `width` property of each column.
436
435
  default: 1,
437
- parseHTML: (o) => {
438
- const e = o.getAttribute("data-width");
439
- if (e === null)
436
+ parseHTML: (n) => {
437
+ const t = n.getAttribute("data-width");
438
+ if (t === null)
440
439
  return null;
441
- const t = parseFloat(e);
442
- return isFinite(t) ? t : null;
440
+ const r = parseFloat(t);
441
+ return isFinite(r) ? r : null;
443
442
  },
444
- renderHTML: (o) => ({
445
- "data-width": o.width.toString(),
446
- style: `flex-grow: ${o.width};`
443
+ renderHTML: (n) => ({
444
+ "data-width": n.width.toString(),
445
+ style: `flex-grow: ${n.width};`
447
446
  })
448
447
  }
449
448
  };
@@ -452,24 +451,24 @@ const be = (o) => new H({
452
451
  return [
453
452
  {
454
453
  tag: "div",
455
- getAttrs: (o) => typeof o == "string" ? !1 : o.getAttribute("data-node-type") === this.name ? {} : !1
454
+ getAttrs: (n) => typeof n == "string" ? !1 : n.getAttribute("data-node-type") === this.name ? {} : !1
456
455
  }
457
456
  ];
458
457
  },
459
- renderHTML({ HTMLAttributes: o }) {
460
- const e = document.createElement("div");
461
- e.className = "bn-block-column", e.setAttribute("data-node-type", this.name);
462
- for (const [t, n] of Object.entries(o))
463
- e.setAttribute(t, n);
458
+ renderHTML({ HTMLAttributes: n }) {
459
+ const t = document.createElement("div");
460
+ t.className = "bn-block-column", t.setAttribute("data-node-type", this.name);
461
+ for (const [r, i] of Object.entries(n))
462
+ t.setAttribute(r, i);
464
463
  return {
465
- dom: e,
466
- contentDOM: e
464
+ dom: t,
465
+ contentDOM: t
467
466
  };
468
467
  },
469
468
  addExtensions() {
470
- return [we(this.options.editor)];
469
+ return [nr(this.options.editor)];
471
470
  }
472
- }), ve = R({
471
+ }), ir = Ye({
473
472
  name: "columnList",
474
473
  group: "childContainer bnBlock blockGroupChild",
475
474
  // A block always contains content, and optionally a blockGroup which contains nested blocks
@@ -482,116 +481,116 @@ const be = (o) => new H({
482
481
  return [
483
482
  {
484
483
  tag: "div",
485
- getAttrs: (o) => typeof o == "string" ? !1 : o.getAttribute("data-node-type") === this.name ? {} : !1
484
+ getAttrs: (n) => typeof n == "string" ? !1 : n.getAttribute("data-node-type") === this.name ? {} : !1
486
485
  }
487
486
  ];
488
487
  },
489
- renderHTML({ HTMLAttributes: o }) {
490
- const e = document.createElement("div");
491
- e.className = "bn-block-column-list", e.setAttribute("data-node-type", this.name);
492
- for (const [t, n] of Object.entries(o))
493
- e.setAttribute(t, n);
494
- return e.style.display = "flex", {
495
- dom: e,
496
- contentDOM: e
488
+ renderHTML({ HTMLAttributes: n }) {
489
+ const t = document.createElement("div");
490
+ t.className = "bn-block-column-list", t.setAttribute("data-node-type", this.name);
491
+ for (const [r, i] of Object.entries(n))
492
+ t.setAttribute(r, i);
493
+ return t.style.display = "flex", {
494
+ dom: t,
495
+ contentDOM: t
497
496
  };
498
497
  }
499
- }), W = j(Ce, {
498
+ }), Ge = $e(or, {
500
499
  width: {
501
500
  default: 1
502
501
  }
503
- }), A = j(
504
- ve,
502
+ }), qe = $e(
503
+ ir,
505
504
  {}
506
- ), M = z.create({
505
+ ), We = Xe.create({
507
506
  blockSpecs: {
508
- column: W,
509
- columnList: A
507
+ column: Ge,
508
+ columnList: qe
510
509
  }
511
- }), Ve = (o) => z.create({
510
+ }), Tr = (n) => Xe.create({
512
511
  blockSpecs: {
513
- ...o.blockSpecs,
514
- column: W,
515
- columnList: A
512
+ ...n.blockSpecs,
513
+ column: Ge,
514
+ columnList: qe
516
515
  },
517
- inlineContentSpecs: o.inlineContentSpecs,
518
- styleSpecs: o.styleSpecs
519
- }), k = 0.1;
520
- function ye(o) {
521
- return { left: o.clientX, top: o.clientY };
516
+ inlineContentSpecs: n.inlineContentSpecs,
517
+ styleSpecs: n.styleSpecs
518
+ }), J = 0.1;
519
+ function sr(n) {
520
+ return { left: n.clientX, top: n.clientY };
522
521
  }
523
- function Xe(o) {
524
- const e = o.editor;
525
- return new H({
526
- view(t) {
527
- return new ke(t, o);
522
+ function Or(n) {
523
+ const t = n.editor;
524
+ return new Ke({
525
+ view(r) {
526
+ return new ar(r, n);
528
527
  },
529
528
  props: {
530
- handleDrop(t, n, r, u) {
531
- const c = t.posAtCoords(ye(n));
532
- if (!c)
529
+ handleDrop(r, i, f, b) {
530
+ const p = r.posAtCoords(sr(i));
531
+ if (!p)
533
532
  throw new Error("Could not get event position");
534
- const l = V(t.state, c), i = Z(l), a = t.nodeDOM(l.posBeforeNode).getBoundingClientRect();
535
- let s = "regular";
536
- if (n.clientX <= a.left + a.width * k && (s = "left"), n.clientX >= a.right - a.width * k && (s = "right"), s === "regular")
533
+ const h = Je(r.state, p), u = Mt(h), g = r.nodeDOM(h.posBeforeNode).getBoundingClientRect();
534
+ let c = "regular";
535
+ if (i.clientX <= g.left + g.width * J && (c = "left"), i.clientX >= g.right - g.width * J && (c = "right"), c === "regular")
537
536
  return !1;
538
- const d = S(
539
- r.content.child(0),
540
- e.schema.blockSchema,
541
- e.schema.inlineContentSchema,
542
- e.schema.styleSchema
537
+ const y = ue(
538
+ f.content.child(0),
539
+ t.schema.blockSchema,
540
+ t.schema.inlineContentSchema,
541
+ t.schema.styleSchema
543
542
  // TODO: cache?
544
543
  );
545
- if (i.blockNoteType === "column") {
546
- const m = t.state.doc.resolve(i.bnBlock.beforePos).node(), h = S(
547
- m,
548
- e.schema.blockSchema,
549
- e.schema.inlineContentSchema,
550
- e.schema.styleSchema
544
+ if (u.blockNoteType === "column") {
545
+ const E = r.state.doc.resolve(u.bnBlock.beforePos).node(), w = ue(
546
+ E,
547
+ t.schema.blockSchema,
548
+ t.schema.inlineContentSchema,
549
+ t.schema.styleSchema
551
550
  );
552
- let f = 0;
553
- h.children.forEach((b) => {
554
- f += b.props.width;
551
+ let T = 0;
552
+ w.children.forEach((x) => {
553
+ T += x.props.width;
555
554
  });
556
- const w = f / h.children.length;
557
- if (w < 0.99 || w > 1.01) {
558
- const b = 1 / w;
559
- h.children.forEach((y) => {
560
- y.props.width = y.props.width * b;
555
+ const j = T / w.children.length;
556
+ if (j < 0.99 || j > 1.01) {
557
+ const x = 1 / j;
558
+ w.children.forEach((W) => {
559
+ W.props.width = W.props.width * x;
561
560
  });
562
561
  }
563
- const x = h.children.findIndex(
564
- (b) => b.id === i.bnBlock.node.attrs.id
565
- ), K = h.children.map((b) => ({
566
- ...b,
567
- children: b.children.filter(
568
- (y) => y.id !== d.id
562
+ const M = w.children.findIndex(
563
+ (x) => x.id === u.bnBlock.node.attrs.id
564
+ ), k = w.children.map((x) => ({
565
+ ...x,
566
+ children: x.children.filter(
567
+ (W) => W.id !== y.id
569
568
  )
570
- })).filter((b) => b.children.length > 0).toSpliced(s === "left" ? x : x + 1, 0, {
569
+ })).filter((x) => x.children.length > 0).toSpliced(c === "left" ? M : M + 1, 0, {
571
570
  type: "column",
572
- children: [d],
571
+ children: [y],
573
572
  props: {},
574
573
  content: void 0,
575
- id: q.options.generateID()
574
+ id: Bt.options.generateID()
576
575
  });
577
- e.removeBlocks([d]), e.updateBlock(h, {
578
- children: K
576
+ t.removeBlocks([y]), t.updateBlock(w, {
577
+ children: k
579
578
  });
580
579
  } else {
581
- const m = S(
582
- i.bnBlock.node,
583
- e.schema.blockSchema,
584
- e.schema.inlineContentSchema,
585
- e.schema.styleSchema
586
- ), h = s === "left" ? [d, m] : [m, d];
587
- e.removeBlocks([d]), e.replaceBlocks(
588
- [m],
580
+ const E = ue(
581
+ u.bnBlock.node,
582
+ t.schema.blockSchema,
583
+ t.schema.inlineContentSchema,
584
+ t.schema.styleSchema
585
+ ), w = c === "left" ? [y, E] : [E, y];
586
+ t.removeBlocks([y]), t.replaceBlocks(
587
+ [E],
589
588
  [
590
589
  {
591
590
  type: "columnList",
592
- children: h.map((f) => ({
591
+ children: w.map((T) => ({
593
592
  type: "column",
594
- children: [f]
593
+ children: [T]
595
594
  }))
596
595
  }
597
596
  ]
@@ -602,131 +601,131 @@ function Xe(o) {
602
601
  }
603
602
  });
604
603
  }
605
- class ke {
606
- constructor(e, t) {
607
- p(this, "width");
608
- p(this, "color");
609
- p(this, "class");
610
- p(this, "cursorPos");
611
- p(this, "element", null);
612
- p(this, "timeout");
613
- p(this, "handlers");
614
- this.editorView = e, this.width = t.width ?? 1, this.color = t.color === !1 ? void 0 : t.color || "black", this.class = t.class, this.handlers = ["dragover", "dragend", "drop", "dragleave"].map((n) => {
615
- const r = (u) => {
616
- this[n](u);
604
+ class ar {
605
+ constructor(t, r) {
606
+ R(this, "width");
607
+ R(this, "color");
608
+ R(this, "class");
609
+ R(this, "cursorPos");
610
+ R(this, "element", null);
611
+ R(this, "timeout");
612
+ R(this, "handlers");
613
+ this.editorView = t, this.width = r.width ?? 1, this.color = r.color === !1 ? void 0 : r.color || "black", this.class = r.class, this.handlers = ["dragover", "dragend", "drop", "dragleave"].map((i) => {
614
+ const f = (b) => {
615
+ this[i](b);
617
616
  };
618
- return e.dom.addEventListener(
619
- n,
620
- r,
617
+ return t.dom.addEventListener(
618
+ i,
619
+ f,
621
620
  // drop event captured in bubbling phase to make sure
622
621
  // "cursorPos" is set to undefined before the "handleDrop" handler is called
623
622
  // (otherwise an error could be thrown, see https://github.com/TypeCellOS/BlockNote/pull/1240)
624
- n === "drop" ? !0 : void 0
625
- ), { name: n, handler: r };
623
+ i === "drop" ? !0 : void 0
624
+ ), { name: i, handler: f };
626
625
  });
627
626
  }
628
627
  destroy() {
629
628
  this.handlers.forEach(
630
- ({ name: e, handler: t }) => this.editorView.dom.removeEventListener(
631
- e,
629
+ ({ name: t, handler: r }) => this.editorView.dom.removeEventListener(
632
630
  t,
633
- e === "drop" ? !0 : void 0
631
+ r,
632
+ t === "drop" ? !0 : void 0
634
633
  )
635
634
  );
636
635
  }
637
- update(e, t) {
638
- this.cursorPos != null && t.doc !== e.state.doc && (this.cursorPos.pos > e.state.doc.content.size ? this.setCursor(void 0) : this.updateOverlay());
636
+ update(t, r) {
637
+ this.cursorPos != null && r.doc !== t.state.doc && (this.cursorPos.pos > t.state.doc.content.size ? this.setCursor(void 0) : this.updateOverlay());
639
638
  }
640
- setCursor(e) {
641
- var t, n;
642
- e === this.cursorPos || (e == null ? void 0 : e.pos) === ((t = this.cursorPos) == null ? void 0 : t.pos) && (e == null ? void 0 : e.position) === ((n = this.cursorPos) == null ? void 0 : n.position) || (this.cursorPos = e, e ? this.updateOverlay() : (this.element.parentNode.removeChild(this.element), this.element = null));
639
+ setCursor(t) {
640
+ var r, i;
641
+ t === this.cursorPos || (t == null ? void 0 : t.pos) === ((r = this.cursorPos) == null ? void 0 : r.pos) && (t == null ? void 0 : t.position) === ((i = this.cursorPos) == null ? void 0 : i.position) || (this.cursorPos = t, t ? this.updateOverlay() : (this.element.parentNode.removeChild(this.element), this.element = null));
643
642
  }
644
643
  updateOverlay() {
645
644
  if (!this.cursorPos)
646
645
  throw new Error("updateOverlay called with no cursor position");
647
- const e = this.editorView.state.doc.resolve(this.cursorPos.pos), t = !e.parent.inlineContent;
648
- let n;
649
- const r = this.editorView.dom, u = r.getBoundingClientRect(), c = u.width / r.offsetWidth, l = u.height / r.offsetHeight;
650
- if (t) {
651
- const s = e.nodeBefore, d = e.nodeAfter;
652
- if (s || d)
646
+ const t = this.editorView.state.doc.resolve(this.cursorPos.pos), r = !t.parent.inlineContent;
647
+ let i;
648
+ const f = this.editorView.dom, b = f.getBoundingClientRect(), p = b.width / f.offsetWidth, h = b.height / f.offsetHeight;
649
+ if (r) {
650
+ const c = t.nodeBefore, y = t.nodeAfter;
651
+ if (c || y)
653
652
  if (this.cursorPos.position === "left" || this.cursorPos.position === "right") {
654
- const m = this.editorView.nodeDOM(this.cursorPos.pos);
655
- if (!m)
653
+ const E = this.editorView.nodeDOM(this.cursorPos.pos);
654
+ if (!E)
656
655
  throw new Error("nodeDOM returned null in updateOverlay");
657
- const h = m.getBoundingClientRect(), f = this.width / 2 * l, w = this.cursorPos.position === "left" ? h.left : h.right;
658
- n = {
659
- left: w - f,
660
- right: w + f,
661
- top: h.top,
662
- bottom: h.bottom
656
+ const w = E.getBoundingClientRect(), T = this.width / 2 * h, j = this.cursorPos.position === "left" ? w.left : w.right;
657
+ i = {
658
+ left: j - T,
659
+ right: j + T,
660
+ top: w.top,
661
+ bottom: w.bottom
663
662
  // left: blockRect.left,
664
663
  // right: blockRect.right,
665
664
  };
666
665
  } else {
667
- const m = this.editorView.nodeDOM(
668
- this.cursorPos.pos - (s ? s.nodeSize : 0)
666
+ const E = this.editorView.nodeDOM(
667
+ this.cursorPos.pos - (c ? c.nodeSize : 0)
669
668
  );
670
- if (m) {
671
- const h = m.getBoundingClientRect();
672
- let f = s ? h.bottom : h.top;
673
- s && d && (f = (f + this.editorView.nodeDOM(this.cursorPos.pos).getBoundingClientRect().top) / 2);
674
- const w = this.width / 2 * l;
675
- this.cursorPos.position === "regular" && (n = {
676
- left: h.left,
677
- right: h.right,
678
- top: f - w,
679
- bottom: f + w
669
+ if (E) {
670
+ const w = E.getBoundingClientRect();
671
+ let T = c ? w.bottom : w.top;
672
+ c && y && (T = (T + this.editorView.nodeDOM(this.cursorPos.pos).getBoundingClientRect().top) / 2);
673
+ const j = this.width / 2 * h;
674
+ this.cursorPos.position === "regular" && (i = {
675
+ left: w.left,
676
+ right: w.right,
677
+ top: T - j,
678
+ bottom: T + j
680
679
  });
681
680
  }
682
681
  }
683
682
  }
684
- if (!n) {
685
- const s = this.editorView.coordsAtPos(this.cursorPos.pos), d = this.width / 2 * c;
686
- n = {
687
- left: s.left - d,
688
- right: s.left + d,
689
- top: s.top,
690
- bottom: s.bottom
683
+ if (!i) {
684
+ const c = this.editorView.coordsAtPos(this.cursorPos.pos), y = this.width / 2 * p;
685
+ i = {
686
+ left: c.left - y,
687
+ right: c.left + y,
688
+ top: c.top,
689
+ bottom: c.bottom
691
690
  };
692
691
  }
693
- const i = this.editorView.dom.offsetParent;
694
- this.element || (this.element = i.appendChild(document.createElement("div")), this.class && (this.element.className = this.class), this.element.style.cssText = "position: absolute; z-index: 50; pointer-events: none;", this.color && (this.element.style.backgroundColor = this.color)), this.element.classList.toggle("prosemirror-dropcursor-block", t), this.element.classList.toggle(
692
+ const u = this.editorView.dom.offsetParent;
693
+ this.element || (this.element = u.appendChild(document.createElement("div")), this.class && (this.element.className = this.class), this.element.style.cssText = "position: absolute; z-index: 50; pointer-events: none;", this.color && (this.element.style.backgroundColor = this.color)), this.element.classList.toggle("prosemirror-dropcursor-block", r), this.element.classList.toggle(
695
694
  "prosemirror-dropcursor-vertical",
696
695
  this.cursorPos.position !== "regular"
697
- ), this.element.classList.toggle("prosemirror-dropcursor-inline", !t);
698
- let g, a;
699
- if (!i || i === document.body && getComputedStyle(i).position === "static")
700
- g = -window.scrollX, a = -window.scrollY;
696
+ ), this.element.classList.toggle("prosemirror-dropcursor-inline", !r);
697
+ let S, g;
698
+ if (!u || u === document.body && getComputedStyle(u).position === "static")
699
+ S = -window.scrollX, g = -window.scrollY;
701
700
  else {
702
- const s = i.getBoundingClientRect(), d = s.width / i.offsetWidth, m = s.height / i.offsetHeight;
703
- g = s.left - i.scrollLeft * d, a = s.top - i.scrollTop * m;
701
+ const c = u.getBoundingClientRect(), y = c.width / u.offsetWidth, E = c.height / u.offsetHeight;
702
+ S = c.left - u.scrollLeft * y, g = c.top - u.scrollTop * E;
704
703
  }
705
- this.element.style.left = (n.left - g) / c + "px", this.element.style.top = (n.top - a) / l + "px", this.element.style.width = (n.right - n.left) / c + "px", this.element.style.height = (n.bottom - n.top) / l + "px";
704
+ this.element.style.left = (i.left - S) / p + "px", this.element.style.top = (i.top - g) / h + "px", this.element.style.width = (i.right - i.left) / p + "px", this.element.style.height = (i.bottom - i.top) / h + "px";
706
705
  }
707
- scheduleRemoval(e) {
708
- clearTimeout(this.timeout), this.timeout = setTimeout(() => this.setCursor(void 0), e);
706
+ scheduleRemoval(t) {
707
+ clearTimeout(this.timeout), this.timeout = setTimeout(() => this.setCursor(void 0), t);
709
708
  }
710
709
  // this gets executed on every mouse move when dragging (drag over)
711
- dragover(e) {
710
+ dragover(t) {
712
711
  if (!this.editorView.editable)
713
712
  return;
714
- const t = this.editorView.posAtCoords({
715
- left: e.clientX,
716
- top: e.clientY
717
- }), n = t && t.inside >= 0 && this.editorView.state.doc.nodeAt(t.inside), r = n && n.type.spec.disableDropCursor, u = typeof r == "function" ? r(this.editorView, t, e) : r;
718
- if (t && !u) {
719
- let c = "regular", l = t.pos;
720
- const i = V(this.editorView.state, t), a = this.editorView.nodeDOM(i.posBeforeNode).getBoundingClientRect();
721
- if (e.clientX <= a.left + a.width * k && (c = "left", l = i.posBeforeNode), e.clientX >= a.right - a.width * k && (c = "right", l = i.posBeforeNode), c === "regular" && this.editorView.dragging && this.editorView.dragging.slice) {
722
- const s = ee(
713
+ const r = this.editorView.posAtCoords({
714
+ left: t.clientX,
715
+ top: t.clientY
716
+ }), i = r && r.inside >= 0 && this.editorView.state.doc.nodeAt(r.inside), f = i && i.type.spec.disableDropCursor, b = typeof f == "function" ? f(this.editorView, r, t) : f;
717
+ if (r && !b) {
718
+ let p = "regular", h = r.pos;
719
+ const u = Je(this.editorView.state, r), g = this.editorView.nodeDOM(u.posBeforeNode).getBoundingClientRect();
720
+ if (t.clientX <= g.left + g.width * J && (p = "left", h = u.posBeforeNode), t.clientX >= g.right - g.width * J && (p = "right", h = u.posBeforeNode), p === "regular" && this.editorView.dragging && this.editorView.dragging.slice) {
721
+ const c = Wt(
723
722
  this.editorView.state.doc,
724
- l,
723
+ h,
725
724
  this.editorView.dragging.slice
726
725
  );
727
- s != null && (l = s);
726
+ c != null && (h = c);
728
727
  }
729
- this.setCursor({ pos: l, position: c }), this.scheduleRemoval(5e3);
728
+ this.setCursor({ pos: h, position: p }), this.scheduleRemoval(5e3);
730
729
  }
731
730
  }
732
731
  dragend() {
@@ -735,143 +734,771 @@ class ke {
735
734
  drop() {
736
735
  this.setCursor(void 0);
737
736
  }
738
- dragleave(e) {
739
- (e.target === this.editorView.dom || !this.editorView.dom.contains(e.relatedTarget)) && this.setCursor(void 0);
737
+ dragleave(t) {
738
+ (t.target === this.editorView.dom || !this.editorView.dom.contains(t.relatedTarget)) && this.setCursor(void 0);
740
739
  }
741
740
  }
742
- function V(o, e) {
743
- const t = $(o.doc, e.pos);
744
- let n = o.doc.resolve(t.posBeforeNode);
745
- return n.parent.type.name === "column" && (n = o.doc.resolve(n.before())), {
746
- posBeforeNode: n.pos,
747
- node: n.nodeAfter
741
+ function Je(n, t) {
742
+ const r = It(n.doc, t.pos);
743
+ let i = n.doc.resolve(r.posBeforeNode);
744
+ return i.parent.type.name === "column" && (i = n.doc.resolve(i.before())), {
745
+ posBeforeNode: i.pos,
746
+ node: i.nodeAfter
748
747
  };
749
748
  }
750
- var X = {
749
+ var ce = { exports: {} }, G = {};
750
+ /**
751
+ * @license React
752
+ * react-jsx-dev-runtime.production.min.js
753
+ *
754
+ * Copyright (c) Facebook, Inc. and its affiliates.
755
+ *
756
+ * This source code is licensed under the MIT license found in the
757
+ * LICENSE file in the root directory of this source tree.
758
+ */
759
+ var Ve;
760
+ function lr() {
761
+ if (Ve) return G;
762
+ Ve = 1;
763
+ var n = Symbol.for("react.fragment");
764
+ return G.Fragment = n, G.jsxDEV = void 0, G;
765
+ }
766
+ var q = {};
767
+ /**
768
+ * @license React
769
+ * react-jsx-dev-runtime.development.js
770
+ *
771
+ * Copyright (c) Facebook, Inc. and its affiliates.
772
+ *
773
+ * This source code is licensed under the MIT license found in the
774
+ * LICENSE file in the root directory of this source tree.
775
+ */
776
+ var ze;
777
+ function ur() {
778
+ return ze || (ze = 1, process.env.NODE_ENV !== "production" && function() {
779
+ var n = I, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), f = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), h = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), c = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), E = Symbol.for("react.offscreen"), w = Symbol.iterator, T = "@@iterator";
780
+ function j(e) {
781
+ if (e === null || typeof e != "object")
782
+ return null;
783
+ var o = w && e[w] || e[T];
784
+ return typeof o == "function" ? o : null;
785
+ }
786
+ var M = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
787
+ function k(e) {
788
+ {
789
+ for (var o = arguments.length, s = new Array(o > 1 ? o - 1 : 0), a = 1; a < o; a++)
790
+ s[a - 1] = arguments[a];
791
+ x("error", e, s);
792
+ }
793
+ }
794
+ function x(e, o, s) {
795
+ {
796
+ var a = M.ReactDebugCurrentFrame, m = a.getStackAddendum();
797
+ m !== "" && (o += "%s", s = s.concat([m]));
798
+ var v = s.map(function(d) {
799
+ return String(d);
800
+ });
801
+ v.unshift("Warning: " + o), Function.prototype.apply.call(console[e], console, v);
802
+ }
803
+ }
804
+ var W = !1, tt = !1, rt = !1, nt = !1, ot = !1, de;
805
+ de = Symbol.for("react.module.reference");
806
+ function it(e) {
807
+ return !!(typeof e == "string" || typeof e == "function" || e === i || e === b || ot || e === f || e === S || e === g || nt || e === E || W || tt || rt || typeof e == "object" && e !== null && (e.$$typeof === y || e.$$typeof === c || e.$$typeof === p || e.$$typeof === h || e.$$typeof === u || // This needs to include all possible module reference object
808
+ // types supported by any Flight configuration anywhere since
809
+ // we don't know which Flight build this will end up being used
810
+ // with.
811
+ e.$$typeof === de || e.getModuleId !== void 0));
812
+ }
813
+ function st(e, o, s) {
814
+ var a = e.displayName;
815
+ if (a)
816
+ return a;
817
+ var m = o.displayName || o.name || "";
818
+ return m !== "" ? s + "(" + m + ")" : s;
819
+ }
820
+ function fe(e) {
821
+ return e.displayName || "Context";
822
+ }
823
+ function N(e) {
824
+ if (e == null)
825
+ return null;
826
+ if (typeof e.tag == "number" && k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
827
+ return e.displayName || e.name || null;
828
+ if (typeof e == "string")
829
+ return e;
830
+ switch (e) {
831
+ case i:
832
+ return "Fragment";
833
+ case r:
834
+ return "Portal";
835
+ case b:
836
+ return "Profiler";
837
+ case f:
838
+ return "StrictMode";
839
+ case S:
840
+ return "Suspense";
841
+ case g:
842
+ return "SuspenseList";
843
+ }
844
+ if (typeof e == "object")
845
+ switch (e.$$typeof) {
846
+ case h:
847
+ var o = e;
848
+ return fe(o) + ".Consumer";
849
+ case p:
850
+ var s = e;
851
+ return fe(s._context) + ".Provider";
852
+ case u:
853
+ return st(e, e.render, "ForwardRef");
854
+ case c:
855
+ var a = e.displayName || null;
856
+ return a !== null ? a : N(e.type) || "Memo";
857
+ case y: {
858
+ var m = e, v = m._payload, d = m._init;
859
+ try {
860
+ return N(d(v));
861
+ } catch {
862
+ return null;
863
+ }
864
+ }
865
+ }
866
+ return null;
867
+ }
868
+ var A = Object.assign, F = 0, he, me, pe, ge, ve, be, ye;
869
+ function we() {
870
+ }
871
+ we.__reactDisabledLog = !0;
872
+ function at() {
873
+ {
874
+ if (F === 0) {
875
+ he = console.log, me = console.info, pe = console.warn, ge = console.error, ve = console.group, be = console.groupCollapsed, ye = console.groupEnd;
876
+ var e = {
877
+ configurable: !0,
878
+ enumerable: !0,
879
+ value: we,
880
+ writable: !0
881
+ };
882
+ Object.defineProperties(console, {
883
+ info: e,
884
+ log: e,
885
+ warn: e,
886
+ error: e,
887
+ group: e,
888
+ groupCollapsed: e,
889
+ groupEnd: e
890
+ });
891
+ }
892
+ F++;
893
+ }
894
+ }
895
+ function lt() {
896
+ {
897
+ if (F--, F === 0) {
898
+ var e = {
899
+ configurable: !0,
900
+ enumerable: !0,
901
+ writable: !0
902
+ };
903
+ Object.defineProperties(console, {
904
+ log: A({}, e, {
905
+ value: he
906
+ }),
907
+ info: A({}, e, {
908
+ value: me
909
+ }),
910
+ warn: A({}, e, {
911
+ value: pe
912
+ }),
913
+ error: A({}, e, {
914
+ value: ge
915
+ }),
916
+ group: A({}, e, {
917
+ value: ve
918
+ }),
919
+ groupCollapsed: A({}, e, {
920
+ value: be
921
+ }),
922
+ groupEnd: A({}, e, {
923
+ value: ye
924
+ })
925
+ });
926
+ }
927
+ F < 0 && k("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
928
+ }
929
+ }
930
+ var ee = M.ReactCurrentDispatcher, te;
931
+ function Y(e, o, s) {
932
+ {
933
+ if (te === void 0)
934
+ try {
935
+ throw Error();
936
+ } catch (m) {
937
+ var a = m.stack.trim().match(/\n( *(at )?)/);
938
+ te = a && a[1] || "";
939
+ }
940
+ return `
941
+ ` + te + e;
942
+ }
943
+ }
944
+ var re = !1, $;
945
+ {
946
+ var ut = typeof WeakMap == "function" ? WeakMap : Map;
947
+ $ = new ut();
948
+ }
949
+ function Ce(e, o) {
950
+ if (!e || re)
951
+ return "";
952
+ {
953
+ var s = $.get(e);
954
+ if (s !== void 0)
955
+ return s;
956
+ }
957
+ var a;
958
+ re = !0;
959
+ var m = Error.prepareStackTrace;
960
+ Error.prepareStackTrace = void 0;
961
+ var v;
962
+ v = ee.current, ee.current = null, at();
963
+ try {
964
+ if (o) {
965
+ var d = function() {
966
+ throw Error();
967
+ };
968
+ if (Object.defineProperty(d.prototype, "props", {
969
+ set: function() {
970
+ throw Error();
971
+ }
972
+ }), typeof Reflect == "object" && Reflect.construct) {
973
+ try {
974
+ Reflect.construct(d, []);
975
+ } catch (O) {
976
+ a = O;
977
+ }
978
+ Reflect.construct(e, [], d);
979
+ } else {
980
+ try {
981
+ d.call();
982
+ } catch (O) {
983
+ a = O;
984
+ }
985
+ e.call(d.prototype);
986
+ }
987
+ } else {
988
+ try {
989
+ throw Error();
990
+ } catch (O) {
991
+ a = O;
992
+ }
993
+ e();
994
+ }
995
+ } catch (O) {
996
+ if (O && a && typeof O.stack == "string") {
997
+ for (var l = O.stack.split(`
998
+ `), P = a.stack.split(`
999
+ `), C = l.length - 1, _ = P.length - 1; C >= 1 && _ >= 0 && l[C] !== P[_]; )
1000
+ _--;
1001
+ for (; C >= 1 && _ >= 0; C--, _--)
1002
+ if (l[C] !== P[_]) {
1003
+ if (C !== 1 || _ !== 1)
1004
+ do
1005
+ if (C--, _--, _ < 0 || l[C] !== P[_]) {
1006
+ var D = `
1007
+ ` + l[C].replace(" at new ", " at ");
1008
+ return e.displayName && D.includes("<anonymous>") && (D = D.replace("<anonymous>", e.displayName)), typeof e == "function" && $.set(e, D), D;
1009
+ }
1010
+ while (C >= 1 && _ >= 0);
1011
+ break;
1012
+ }
1013
+ }
1014
+ } finally {
1015
+ re = !1, ee.current = v, lt(), Error.prepareStackTrace = m;
1016
+ }
1017
+ var z = e ? e.displayName || e.name : "", L = z ? Y(z) : "";
1018
+ return typeof e == "function" && $.set(e, L), L;
1019
+ }
1020
+ function ct(e, o, s) {
1021
+ return Ce(e, !1);
1022
+ }
1023
+ function dt(e) {
1024
+ var o = e.prototype;
1025
+ return !!(o && o.isReactComponent);
1026
+ }
1027
+ function X(e, o, s) {
1028
+ if (e == null)
1029
+ return "";
1030
+ if (typeof e == "function")
1031
+ return Ce(e, dt(e));
1032
+ if (typeof e == "string")
1033
+ return Y(e);
1034
+ switch (e) {
1035
+ case S:
1036
+ return Y("Suspense");
1037
+ case g:
1038
+ return Y("SuspenseList");
1039
+ }
1040
+ if (typeof e == "object")
1041
+ switch (e.$$typeof) {
1042
+ case u:
1043
+ return ct(e.render);
1044
+ case c:
1045
+ return X(e.type, o, s);
1046
+ case y: {
1047
+ var a = e, m = a._payload, v = a._init;
1048
+ try {
1049
+ return X(v(m), o, s);
1050
+ } catch {
1051
+ }
1052
+ }
1053
+ }
1054
+ return "";
1055
+ }
1056
+ var H = Object.prototype.hasOwnProperty, _e = {}, Ee = M.ReactDebugCurrentFrame;
1057
+ function K(e) {
1058
+ if (e) {
1059
+ var o = e._owner, s = X(e.type, e._source, o ? o.type : null);
1060
+ Ee.setExtraStackFrame(s);
1061
+ } else
1062
+ Ee.setExtraStackFrame(null);
1063
+ }
1064
+ function ft(e, o, s, a, m) {
1065
+ {
1066
+ var v = Function.call.bind(H);
1067
+ for (var d in e)
1068
+ if (v(e, d)) {
1069
+ var l = void 0;
1070
+ try {
1071
+ if (typeof e[d] != "function") {
1072
+ var P = Error((a || "React class") + ": " + s + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1073
+ throw P.name = "Invariant Violation", P;
1074
+ }
1075
+ l = e[d](o, d, a, s, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1076
+ } catch (C) {
1077
+ l = C;
1078
+ }
1079
+ l && !(l instanceof Error) && (K(m), k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", s, d, typeof l), K(null)), l instanceof Error && !(l.message in _e) && (_e[l.message] = !0, K(m), k("Failed %s type: %s", s, l.message), K(null));
1080
+ }
1081
+ }
1082
+ }
1083
+ var ht = Array.isArray;
1084
+ function ne(e) {
1085
+ return ht(e);
1086
+ }
1087
+ function mt(e) {
1088
+ {
1089
+ var o = typeof Symbol == "function" && Symbol.toStringTag, s = o && e[Symbol.toStringTag] || e.constructor.name || "Object";
1090
+ return s;
1091
+ }
1092
+ }
1093
+ function pt(e) {
1094
+ try {
1095
+ return ke(e), !1;
1096
+ } catch {
1097
+ return !0;
1098
+ }
1099
+ }
1100
+ function ke(e) {
1101
+ return "" + e;
1102
+ }
1103
+ function Re(e) {
1104
+ if (pt(e))
1105
+ return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", mt(e)), ke(e);
1106
+ }
1107
+ var U = M.ReactCurrentOwner, gt = {
1108
+ key: !0,
1109
+ ref: !0,
1110
+ __self: !0,
1111
+ __source: !0
1112
+ }, Se, Pe, oe;
1113
+ oe = {};
1114
+ function vt(e) {
1115
+ if (H.call(e, "ref")) {
1116
+ var o = Object.getOwnPropertyDescriptor(e, "ref").get;
1117
+ if (o && o.isReactWarning)
1118
+ return !1;
1119
+ }
1120
+ return e.ref !== void 0;
1121
+ }
1122
+ function bt(e) {
1123
+ if (H.call(e, "key")) {
1124
+ var o = Object.getOwnPropertyDescriptor(e, "key").get;
1125
+ if (o && o.isReactWarning)
1126
+ return !1;
1127
+ }
1128
+ return e.key !== void 0;
1129
+ }
1130
+ function yt(e, o) {
1131
+ if (typeof e.ref == "string" && U.current && o && U.current.stateNode !== o) {
1132
+ var s = N(U.current.type);
1133
+ oe[s] || (k('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', N(U.current.type), e.ref), oe[s] = !0);
1134
+ }
1135
+ }
1136
+ function wt(e, o) {
1137
+ {
1138
+ var s = function() {
1139
+ Se || (Se = !0, k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", o));
1140
+ };
1141
+ s.isReactWarning = !0, Object.defineProperty(e, "key", {
1142
+ get: s,
1143
+ configurable: !0
1144
+ });
1145
+ }
1146
+ }
1147
+ function Ct(e, o) {
1148
+ {
1149
+ var s = function() {
1150
+ Pe || (Pe = !0, k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", o));
1151
+ };
1152
+ s.isReactWarning = !0, Object.defineProperty(e, "ref", {
1153
+ get: s,
1154
+ configurable: !0
1155
+ });
1156
+ }
1157
+ }
1158
+ var _t = function(e, o, s, a, m, v, d) {
1159
+ var l = {
1160
+ // This tag allows us to uniquely identify this as a React Element
1161
+ $$typeof: t,
1162
+ // Built-in properties that belong on the element
1163
+ type: e,
1164
+ key: o,
1165
+ ref: s,
1166
+ props: d,
1167
+ // Record the component responsible for creating this element.
1168
+ _owner: v
1169
+ };
1170
+ return l._store = {}, Object.defineProperty(l._store, "validated", {
1171
+ configurable: !1,
1172
+ enumerable: !1,
1173
+ writable: !0,
1174
+ value: !1
1175
+ }), Object.defineProperty(l, "_self", {
1176
+ configurable: !1,
1177
+ enumerable: !1,
1178
+ writable: !1,
1179
+ value: a
1180
+ }), Object.defineProperty(l, "_source", {
1181
+ configurable: !1,
1182
+ enumerable: !1,
1183
+ writable: !1,
1184
+ value: m
1185
+ }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
1186
+ };
1187
+ function Et(e, o, s, a, m) {
1188
+ {
1189
+ var v, d = {}, l = null, P = null;
1190
+ s !== void 0 && (Re(s), l = "" + s), bt(o) && (Re(o.key), l = "" + o.key), vt(o) && (P = o.ref, yt(o, m));
1191
+ for (v in o)
1192
+ H.call(o, v) && !gt.hasOwnProperty(v) && (d[v] = o[v]);
1193
+ if (e && e.defaultProps) {
1194
+ var C = e.defaultProps;
1195
+ for (v in C)
1196
+ d[v] === void 0 && (d[v] = C[v]);
1197
+ }
1198
+ if (l || P) {
1199
+ var _ = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
1200
+ l && wt(d, _), P && Ct(d, _);
1201
+ }
1202
+ return _t(e, l, P, m, a, U.current, d);
1203
+ }
1204
+ }
1205
+ var ie = M.ReactCurrentOwner, Te = M.ReactDebugCurrentFrame;
1206
+ function V(e) {
1207
+ if (e) {
1208
+ var o = e._owner, s = X(e.type, e._source, o ? o.type : null);
1209
+ Te.setExtraStackFrame(s);
1210
+ } else
1211
+ Te.setExtraStackFrame(null);
1212
+ }
1213
+ var se;
1214
+ se = !1;
1215
+ function ae(e) {
1216
+ return typeof e == "object" && e !== null && e.$$typeof === t;
1217
+ }
1218
+ function Oe() {
1219
+ {
1220
+ if (ie.current) {
1221
+ var e = N(ie.current.type);
1222
+ if (e)
1223
+ return `
1224
+
1225
+ Check the render method of \`` + e + "`.";
1226
+ }
1227
+ return "";
1228
+ }
1229
+ }
1230
+ function kt(e) {
1231
+ {
1232
+ if (e !== void 0) {
1233
+ var o = e.fileName.replace(/^.*[\\\/]/, ""), s = e.lineNumber;
1234
+ return `
1235
+
1236
+ Check your code at ` + o + ":" + s + ".";
1237
+ }
1238
+ return "";
1239
+ }
1240
+ }
1241
+ var xe = {};
1242
+ function Rt(e) {
1243
+ {
1244
+ var o = Oe();
1245
+ if (!o) {
1246
+ var s = typeof e == "string" ? e : e.displayName || e.name;
1247
+ s && (o = `
1248
+
1249
+ Check the top-level render call using <` + s + ">.");
1250
+ }
1251
+ return o;
1252
+ }
1253
+ }
1254
+ function De(e, o) {
1255
+ {
1256
+ if (!e._store || e._store.validated || e.key != null)
1257
+ return;
1258
+ e._store.validated = !0;
1259
+ var s = Rt(o);
1260
+ if (xe[s])
1261
+ return;
1262
+ xe[s] = !0;
1263
+ var a = "";
1264
+ e && e._owner && e._owner !== ie.current && (a = " It was passed a child from " + N(e._owner.type) + "."), V(e), k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', s, a), V(null);
1265
+ }
1266
+ }
1267
+ function je(e, o) {
1268
+ {
1269
+ if (typeof e != "object")
1270
+ return;
1271
+ if (ne(e))
1272
+ for (var s = 0; s < e.length; s++) {
1273
+ var a = e[s];
1274
+ ae(a) && De(a, o);
1275
+ }
1276
+ else if (ae(e))
1277
+ e._store && (e._store.validated = !0);
1278
+ else if (e) {
1279
+ var m = j(e);
1280
+ if (typeof m == "function" && m !== e.entries)
1281
+ for (var v = m.call(e), d; !(d = v.next()).done; )
1282
+ ae(d.value) && De(d.value, o);
1283
+ }
1284
+ }
1285
+ }
1286
+ function St(e) {
1287
+ {
1288
+ var o = e.type;
1289
+ if (o == null || typeof o == "string")
1290
+ return;
1291
+ var s;
1292
+ if (typeof o == "function")
1293
+ s = o.propTypes;
1294
+ else if (typeof o == "object" && (o.$$typeof === u || // Note: Memo only checks outer props here.
1295
+ // Inner props are checked in the reconciler.
1296
+ o.$$typeof === c))
1297
+ s = o.propTypes;
1298
+ else
1299
+ return;
1300
+ if (s) {
1301
+ var a = N(o);
1302
+ ft(s, e.props, "prop", a, e);
1303
+ } else if (o.PropTypes !== void 0 && !se) {
1304
+ se = !0;
1305
+ var m = N(o);
1306
+ k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", m || "Unknown");
1307
+ }
1308
+ typeof o.getDefaultProps == "function" && !o.getDefaultProps.isReactClassApproved && k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1309
+ }
1310
+ }
1311
+ function Pt(e) {
1312
+ {
1313
+ for (var o = Object.keys(e.props), s = 0; s < o.length; s++) {
1314
+ var a = o[s];
1315
+ if (a !== "children" && a !== "key") {
1316
+ V(e), k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), V(null);
1317
+ break;
1318
+ }
1319
+ }
1320
+ e.ref !== null && (V(e), k("Invalid attribute `ref` supplied to `React.Fragment`."), V(null));
1321
+ }
1322
+ }
1323
+ var Ne = {};
1324
+ function Tt(e, o, s, a, m, v) {
1325
+ {
1326
+ var d = it(e);
1327
+ if (!d) {
1328
+ var l = "";
1329
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (l += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1330
+ var P = kt(m);
1331
+ P ? l += P : l += Oe();
1332
+ var C;
1333
+ e === null ? C = "null" : ne(e) ? C = "array" : e !== void 0 && e.$$typeof === t ? (C = "<" + (N(e.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : C = typeof e, k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", C, l);
1334
+ }
1335
+ var _ = Et(e, o, s, m, v);
1336
+ if (_ == null)
1337
+ return _;
1338
+ if (d) {
1339
+ var D = o.children;
1340
+ if (D !== void 0)
1341
+ if (a)
1342
+ if (ne(D)) {
1343
+ for (var z = 0; z < D.length; z++)
1344
+ je(D[z], e);
1345
+ Object.freeze && Object.freeze(D);
1346
+ } else
1347
+ k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1348
+ else
1349
+ je(D, e);
1350
+ }
1351
+ if (H.call(o, "key")) {
1352
+ var L = N(e), O = Object.keys(o).filter(function(Dt) {
1353
+ return Dt !== "key";
1354
+ }), le = O.length > 0 ? "{key: someKey, " + O.join(": ..., ") + ": ...}" : "{key: someKey}";
1355
+ if (!Ne[L + le]) {
1356
+ var xt = O.length > 0 ? "{" + O.join(": ..., ") + ": ...}" : "{}";
1357
+ k(`A props object containing a "key" prop is being spread into JSX:
1358
+ let props = %s;
1359
+ <%s {...props} />
1360
+ React keys must be passed directly to JSX without using spread:
1361
+ let props = %s;
1362
+ <%s key={someKey} {...props} />`, le, L, xt, L), Ne[L + le] = !0;
1363
+ }
1364
+ }
1365
+ return e === i ? Pt(_) : St(_), _;
1366
+ }
1367
+ }
1368
+ var Ot = Tt;
1369
+ q.Fragment = i, q.jsxDEV = Ot;
1370
+ }()), q;
1371
+ }
1372
+ process.env.NODE_ENV === "production" ? ce.exports = lr() : ce.exports = ur();
1373
+ var Fe = ce.exports, Ze = {
751
1374
  color: void 0,
752
1375
  size: void 0,
753
1376
  className: void 0,
754
1377
  style: void 0,
755
1378
  attr: void 0
756
- }, I = v.createContext && /* @__PURE__ */ v.createContext(X), _e = ["attr", "size", "title"];
757
- function Pe(o, e) {
758
- if (o == null) return {};
759
- var t = Se(o, e), n, r;
1379
+ }, He = I.createContext && /* @__PURE__ */ I.createContext(Ze), cr = ["attr", "size", "title"];
1380
+ function dr(n, t) {
1381
+ if (n == null) return {};
1382
+ var r = fr(n, t), i, f;
760
1383
  if (Object.getOwnPropertySymbols) {
761
- var u = Object.getOwnPropertySymbols(o);
762
- for (r = 0; r < u.length; r++)
763
- n = u[r], !(e.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(o, n) && (t[n] = o[n]);
1384
+ var b = Object.getOwnPropertySymbols(n);
1385
+ for (f = 0; f < b.length; f++)
1386
+ i = b[f], !(t.indexOf(i) >= 0) && Object.prototype.propertyIsEnumerable.call(n, i) && (r[i] = n[i]);
764
1387
  }
765
- return t;
1388
+ return r;
766
1389
  }
767
- function Se(o, e) {
768
- if (o == null) return {};
769
- var t = {};
770
- for (var n in o)
771
- if (Object.prototype.hasOwnProperty.call(o, n)) {
772
- if (e.indexOf(n) >= 0) continue;
773
- t[n] = o[n];
774
- }
775
- return t;
1390
+ function fr(n, t) {
1391
+ if (n == null) return {};
1392
+ var r = {};
1393
+ for (var i in n)
1394
+ if (Object.prototype.hasOwnProperty.call(n, i)) {
1395
+ if (t.indexOf(i) >= 0) continue;
1396
+ r[i] = n[i];
1397
+ }
1398
+ return r;
776
1399
  }
777
- function _() {
778
- return _ = Object.assign ? Object.assign.bind() : function(o) {
779
- for (var e = 1; e < arguments.length; e++) {
780
- var t = arguments[e];
781
- for (var n in t)
782
- Object.prototype.hasOwnProperty.call(t, n) && (o[n] = t[n]);
783
- }
784
- return o;
785
- }, _.apply(this, arguments);
1400
+ function Z() {
1401
+ return Z = Object.assign ? Object.assign.bind() : function(n) {
1402
+ for (var t = 1; t < arguments.length; t++) {
1403
+ var r = arguments[t];
1404
+ for (var i in r)
1405
+ Object.prototype.hasOwnProperty.call(r, i) && (n[i] = r[i]);
1406
+ }
1407
+ return n;
1408
+ }, Z.apply(this, arguments);
786
1409
  }
787
- function L(o, e) {
788
- var t = Object.keys(o);
1410
+ function Ue(n, t) {
1411
+ var r = Object.keys(n);
789
1412
  if (Object.getOwnPropertySymbols) {
790
- var n = Object.getOwnPropertySymbols(o);
791
- e && (n = n.filter(function(r) {
792
- return Object.getOwnPropertyDescriptor(o, r).enumerable;
793
- })), t.push.apply(t, n);
1413
+ var i = Object.getOwnPropertySymbols(n);
1414
+ t && (i = i.filter(function(f) {
1415
+ return Object.getOwnPropertyDescriptor(n, f).enumerable;
1416
+ })), r.push.apply(r, i);
794
1417
  }
795
- return t;
1418
+ return r;
796
1419
  }
797
- function P(o) {
798
- for (var e = 1; e < arguments.length; e++) {
799
- var t = arguments[e] != null ? arguments[e] : {};
800
- e % 2 ? L(Object(t), !0).forEach(function(n) {
801
- xe(o, n, t[n]);
802
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(t)) : L(Object(t)).forEach(function(n) {
803
- Object.defineProperty(o, n, Object.getOwnPropertyDescriptor(t, n));
1420
+ function Q(n) {
1421
+ for (var t = 1; t < arguments.length; t++) {
1422
+ var r = arguments[t] != null ? arguments[t] : {};
1423
+ t % 2 ? Ue(Object(r), !0).forEach(function(i) {
1424
+ hr(n, i, r[i]);
1425
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(r)) : Ue(Object(r)).forEach(function(i) {
1426
+ Object.defineProperty(n, i, Object.getOwnPropertyDescriptor(r, i));
804
1427
  });
805
1428
  }
806
- return o;
1429
+ return n;
807
1430
  }
808
- function xe(o, e, t) {
809
- return e = Ee(e), e in o ? Object.defineProperty(o, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : o[e] = t, o;
1431
+ function hr(n, t, r) {
1432
+ return t = mr(t), t in n ? Object.defineProperty(n, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : n[t] = r, n;
810
1433
  }
811
- function Ee(o) {
812
- var e = Oe(o, "string");
813
- return typeof e == "symbol" ? e : e + "";
1434
+ function mr(n) {
1435
+ var t = pr(n, "string");
1436
+ return typeof t == "symbol" ? t : t + "";
814
1437
  }
815
- function Oe(o, e) {
816
- if (typeof o != "object" || !o) return o;
817
- var t = o[Symbol.toPrimitive];
818
- if (t !== void 0) {
819
- var n = t.call(o, e || "default");
820
- if (typeof n != "object") return n;
1438
+ function pr(n, t) {
1439
+ if (typeof n != "object" || !n) return n;
1440
+ var r = n[Symbol.toPrimitive];
1441
+ if (r !== void 0) {
1442
+ var i = r.call(n, t || "default");
1443
+ if (typeof i != "object") return i;
821
1444
  throw new TypeError("@@toPrimitive must return a primitive value.");
822
1445
  }
823
- return (e === "string" ? String : Number)(o);
1446
+ return (t === "string" ? String : Number)(n);
824
1447
  }
825
- function U(o) {
826
- return o && o.map((e, t) => /* @__PURE__ */ v.createElement(e.tag, P({
827
- key: t
828
- }, e.attr), U(e.child)));
1448
+ function Qe(n) {
1449
+ return n && n.map((t, r) => /* @__PURE__ */ I.createElement(t.tag, Q({
1450
+ key: r
1451
+ }, t.attr), Qe(t.child)));
829
1452
  }
830
- function G(o) {
831
- return (e) => /* @__PURE__ */ v.createElement(De, _({
832
- attr: P({}, o.attr)
833
- }, e), U(o.child));
1453
+ function et(n) {
1454
+ return (t) => /* @__PURE__ */ I.createElement(gr, Z({
1455
+ attr: Q({}, n.attr)
1456
+ }, t), Qe(n.child));
834
1457
  }
835
- function De(o) {
836
- var e = (t) => {
1458
+ function gr(n) {
1459
+ var t = (r) => {
837
1460
  var {
838
- attr: n,
839
- size: r,
840
- title: u
841
- } = o, c = Pe(o, _e), l = r || t.size || "1em", i;
842
- return t.className && (i = t.className), o.className && (i = (i ? i + " " : "") + o.className), /* @__PURE__ */ v.createElement("svg", _({
1461
+ attr: i,
1462
+ size: f,
1463
+ title: b
1464
+ } = n, p = dr(n, cr), h = f || r.size || "1em", u;
1465
+ return r.className && (u = r.className), n.className && (u = (u ? u + " " : "") + n.className), /* @__PURE__ */ I.createElement("svg", Z({
843
1466
  stroke: "currentColor",
844
1467
  fill: "currentColor",
845
1468
  strokeWidth: "0"
846
- }, t.attr, n, c, {
847
- className: i,
848
- style: P(P({
849
- color: o.color || t.color
850
- }, t.style), o.style),
851
- height: l,
852
- width: l,
1469
+ }, r.attr, i, p, {
1470
+ className: u,
1471
+ style: Q(Q({
1472
+ color: n.color || r.color
1473
+ }, r.style), n.style),
1474
+ height: h,
1475
+ width: h,
853
1476
  xmlns: "http://www.w3.org/2000/svg"
854
- }), u && /* @__PURE__ */ v.createElement("title", null, u), o.children);
1477
+ }), b && /* @__PURE__ */ I.createElement("title", null, b), n.children);
855
1478
  };
856
- return I !== void 0 ? /* @__PURE__ */ v.createElement(I.Consumer, null, (t) => e(t)) : e(X);
1479
+ return He !== void 0 ? /* @__PURE__ */ I.createElement(He.Consumer, null, (r) => t(r)) : t(Ze);
857
1480
  }
858
- function Be(o) {
859
- return G({ tag: "svg", attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M3 3m0 1a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1zm9 -1v18" }, child: [] }] })(o);
1481
+ function vr(n) {
1482
+ return et({ tag: "svg", attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M3 3m0 1a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1zm9 -1v18" }, child: [] }] })(n);
860
1483
  }
861
- function Te(o) {
862
- return G({ tag: "svg", attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M3 3m0 1a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1zm6 -1v18m6 -18v18" }, child: [] }] })(o);
1484
+ function br(n) {
1485
+ return et({ tag: "svg", attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M3 3m0 1a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1zm6 -1v18m6 -18v18" }, child: [] }] })(n);
863
1486
  }
864
- function Ne(o) {
865
- return "column" in o.schema.blockSchema && o.schema.blockSchema.columnList === M.blockSchema.columnList && "column" in o.schema.blockSchema && o.schema.blockSchema.column === M.blockSchema.column;
1487
+ function yr(n) {
1488
+ return "column" in n.schema.blockSchema && n.schema.blockSchema.columnList === We.blockSchema.columnList && "column" in n.schema.blockSchema && n.schema.blockSchema.column === We.blockSchema.column;
866
1489
  }
867
- function Ue(o) {
868
- const e = [];
869
- return Ne(o) && e.push(
1490
+ function xr(n) {
1491
+ const t = [];
1492
+ return yr(n) && t.push(
870
1493
  {
871
- ...N(o).slash_menu.two_columns,
872
- icon: /* @__PURE__ */ T(Be, { size: 18 }),
1494
+ ...Le(n).slash_menu.two_columns,
1495
+ icon: /* @__PURE__ */ Fe.jsxDEV(vr, { size: 18 }, void 0, !1, {
1496
+ fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-multi-column/src/extensions/SuggestionMenu/getMultiColumnSlashMenuItems.tsx",
1497
+ lineNumber: 41,
1498
+ columnNumber: 15
1499
+ }, this),
873
1500
  onItemClick: () => {
874
- O(o, {
1501
+ Be(n, {
875
1502
  type: "columnList",
876
1503
  children: [
877
1504
  {
@@ -895,10 +1522,14 @@ function Ue(o) {
895
1522
  }
896
1523
  },
897
1524
  {
898
- ...N(o).slash_menu.three_columns,
899
- icon: /* @__PURE__ */ T(Te, { size: 18 }),
1525
+ ...Le(n).slash_menu.three_columns,
1526
+ icon: /* @__PURE__ */ Fe.jsxDEV(br, { size: 18 }, void 0, !1, {
1527
+ fileName: "/Users/nickthesick/Developer/BlockNote/packages/xl-multi-column/src/extensions/SuggestionMenu/getMultiColumnSlashMenuItems.tsx",
1528
+ lineNumber: 68,
1529
+ columnNumber: 15
1530
+ }, this),
900
1531
  onItemClick: () => {
901
- O(o, {
1532
+ Be(n, {
902
1533
  type: "columnList",
903
1534
  children: [
904
1535
  {
@@ -929,17 +1560,17 @@ function Ue(o) {
929
1560
  });
930
1561
  }
931
1562
  }
932
- ), e;
1563
+ ), t;
933
1564
  }
934
1565
  export {
935
- W as ColumnBlock,
936
- A as ColumnListBlock,
937
- Ne as checkMultiColumnBlocksInSchema,
938
- N as getMultiColumnDictionary,
939
- Ue as getMultiColumnSlashMenuItems,
940
- Ae as locales,
941
- Xe as multiColumnDropCursor,
942
- M as multiColumnSchema,
943
- Ve as withMultiColumn
1566
+ Ge as ColumnBlock,
1567
+ qe as ColumnListBlock,
1568
+ yr as checkMultiColumnBlocksInSchema,
1569
+ Le as getMultiColumnDictionary,
1570
+ xr as getMultiColumnSlashMenuItems,
1571
+ Pr as locales,
1572
+ Or as multiColumnDropCursor,
1573
+ We as multiColumnSchema,
1574
+ Tr as withMultiColumn
944
1575
  };
945
1576
  //# sourceMappingURL=blocknote-xl-multi-column.js.map