@arkitektbedriftene/fe-lib 4.2.2 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,109 +1,110 @@
1
- var ce = Object.defineProperty;
2
- var de = (t, r, e) => r in t ? ce(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
3
- var O = (t, r, e) => (de(t, typeof r != "symbol" ? r + "" : r, e), e);
4
- import { createHeadlessEditor as At } from "@lexical/headless";
5
- import { $generateHtmlFromNodes as zt } from "@lexical/html";
6
- import { $getRoot as G, ParagraphNode as he, $createParagraphNode as W, $createTextNode as I, $setSelection as V, $getNodeByKey as ot, DecoratorNode as ue, $applyNodeReplacement as ge, SELECTION_CHANGE_COMMAND as Y, $getSelection as y, COMMAND_PRIORITY_CRITICAL as ct, $isRangeSelection as N, $isRootOrShadowRoot as $t, FORMAT_TEXT_COMMAND as K, COMMAND_PRIORITY_LOW as R, KEY_ARROW_DOWN_COMMAND as pe, KEY_ARROW_UP_COMMAND as me, KEY_ESCAPE_COMMAND as Dt, KEY_SPACE_COMMAND as fe, $getNearestNodeFromDOMNode as dt, KEY_ARROW_LEFT_COMMAND as ke, $isElementNode as be, createCommand as Me, $insertNodes as Ce, COMMAND_PRIORITY_EDITOR as ve, COMMAND_PRIORITY_NORMAL as Te, $createRangeSelection as Bt, COMMAND_PRIORITY_HIGH as _e, FORMAT_ELEMENT_COMMAND as it } from "lexical";
7
- import { trimTextContentFromAnchor as Le, $setBlocksType as at, $isAtNodeEnd as Lt } from "@lexical/selection";
8
- import { $dfs as xe, $getNearestNodeOfType as we, $findMatchingParent as Pt, mergeRegister as Z, isHTMLElement as xt, $wrapNodeInElement as ye, mediaFileReader as Ne, isMimeType as Se } from "@lexical/utils";
9
- import { LinkNode as F, AutoLinkNode as Ft, $isLinkNode as J, TOGGLE_LINK_COMMAND as tt } from "@lexical/link";
10
- import { ListNode as ht, ListItemNode as Ht, $isListNode as ut, INSERT_UNORDERED_LIST_COMMAND as Ee, INSERT_ORDERED_LIST_COMMAND as Re, INSERT_CHECK_LIST_COMMAND as Ut, insertList as Ie, $isListItemNode as H } from "@lexical/list";
11
- import { HeadingNode as Wt, QuoteNode as jt, $isHeadingNode as Oe, $createHeadingNode as Ae, $createQuoteNode as ze, DRAG_DROP_PASTE as $e } from "@lexical/rich-text";
12
- import { TableNode as Kt, TableRowNode as Gt, TableCellNode as Yt, INSERT_TABLE_COMMAND as De, $getTableCellNodeFromLexicalNode as Be, $deleteTableColumn__EXPERIMENTAL as Pe, $deleteTableRow__EXPERIMENTAL as Fe, $insertTableColumn__EXPERIMENTAL as wt, $insertTableRow__EXPERIMENTAL as yt } from "@lexical/table";
13
- import { jsx as o, jsxs as u, Fragment as j } from "react/jsx-runtime";
14
- import { createContext as He, useState as b, useRef as q, useCallback as T, useContext as Ue, useEffect as _, useMemo as qt, useLayoutEffect as We } from "react";
15
- import { Box as U, Stack as je, Button as L, DropdownMenu as et, ToolbarButton as gt, DropdownMenuIconItem as v, ToolbarToggleGroup as Jt, ToolbarToggleItem as P, OverlayCard as Xt, Toolbar as Ke, ToolbarSeparator as Ge, styled as Ye, Spinner as pt, Dialog as Qt, DialogHeader as qe, TextInput as mt, DialogActions as rt, DropdownMenuItem as B, DropdownMenuSeparator as Nt, NavBar as Je, NavBarItem as lt, Combobox as Xe } from "./ui.es.js";
16
- import { f as Qe, g as Ve, h as Ze, G as f, i as tr, j as er } from "./index.esm-787a7997.js";
1
+ var Le = Object.defineProperty;
2
+ var _e = (t, r, e) => r in t ? Le(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
3
+ var $ = (t, r, e) => (_e(t, typeof r != "symbol" ? r + "" : r, e), e);
4
+ import { createHeadlessEditor as Ut } from "@lexical/headless";
5
+ import { $generateHtmlFromNodes as Wt } from "@lexical/html";
6
+ import { $getRoot as Y, ParagraphNode as we, $createParagraphNode as G, $createTextNode as z, $setSelection as nt, $getNodeByKey as ct, DecoratorNode as ye, $applyNodeReplacement as Se, SELECTION_CHANGE_COMMAND as X, $getSelection as _, COMMAND_PRIORITY_EDITOR as q, $isRangeSelection as N, $isRootOrShadowRoot as jt, FORMAT_TEXT_COMMAND as A, COMMAND_PRIORITY_LOW as D, KEY_ARROW_DOWN_COMMAND as Ne, KEY_ARROW_UP_COMMAND as Ee, KEY_ESCAPE_COMMAND as Kt, KEY_SPACE_COMMAND as Re, $getNearestNodeFromDOMNode as pt, KEY_ARROW_LEFT_COMMAND as Ie, $isElementNode as Oe, createCommand as ze, $insertNodes as $e, $createRangeSelection as Gt, COMMAND_PRIORITY_HIGH as Ae, FORMAT_ELEMENT_COMMAND as dt } from "lexical";
7
+ import { trimTextContentFromAnchor as De, $setBlocksType as ht, $getSelectionStyleValueForProperty as Be, $patchStyleText as Pe, $isAtNodeEnd as Rt } from "@lexical/selection";
8
+ import { $dfs as Fe, $getNearestNodeOfType as He, $findMatchingParent as qt, mergeRegister as ot, isHTMLElement as It, $wrapNodeInElement as Ue, mediaFileReader as We, isMimeType as je } from "@lexical/utils";
9
+ import { LinkNode as j, AutoLinkNode as Jt, $isLinkNode as Z, TOGGLE_LINK_COMMAND as it } from "@lexical/link";
10
+ import { ListNode as mt, ListItemNode as Yt, $isListNode as ft, INSERT_UNORDERED_LIST_COMMAND as Ke, INSERT_ORDERED_LIST_COMMAND as Ge, INSERT_CHECK_LIST_COMMAND as Xt, insertList as qe, $isListItemNode as K } from "@lexical/list";
11
+ import { HeadingNode as Vt, QuoteNode as Qt, $isHeadingNode as Je, $createHeadingNode as Ye, $createQuoteNode as Xe, DRAG_DROP_PASTE as Ve } from "@lexical/rich-text";
12
+ import { TableNode as Zt, TableRowNode as te, TableCellNode as ee, INSERT_TABLE_COMMAND as Qe, $getTableCellNodeFromLexicalNode as Ze, $deleteTableColumn__EXPERIMENTAL as tr, $deleteTableRow__EXPERIMENTAL as er, $insertTableColumn__EXPERIMENTAL as Ot, $insertTableRow__EXPERIMENTAL as zt } from "@lexical/table";
13
+ import { jsx as n, jsxs as h, Fragment as F } from "react/jsx-runtime";
14
+ import { createContext as rr, useState as m, useRef as V, useCallback as M, useContext as nr, useEffect as w, useMemo as re, useLayoutEffect as or } from "react";
15
+ import { Box as P, Stack as ir, Button as y, DropdownMenu as at, ToolbarButton as lt, DropdownMenuIconItem as T, ToolbarToggleGroup as tt, ToolbarToggleItem as O, Popover as ne, PopoverTrigger as oe, PopoverContent as ie, OverlayCard as ae, Toolbar as ar, ToolbarSeparator as $t, styled as lr, Spinner as kt, Dialog as le, DialogHeader as sr, TextInput as bt, DialogActions as st, DropdownMenuItem as W, DropdownMenuSeparator as At, NavBar as cr, NavBarItem as ut, Combobox as dr } from "./ui.es.js";
16
+ import { f as hr, g as ur, h as gr, G as f, i as pr, j as mr, k as fr, l as kr } from "./index.esm-fa9e6ea7.js";
17
17
  import { useLexicalComposerContext as x } from "@lexical/react/LexicalComposerContext.js";
18
- import { LexicalComposer as rr } from "@lexical/react/LexicalComposer.js";
19
- import { RichTextPlugin as nr } from "@lexical/react/LexicalRichTextPlugin.js";
20
- import { LexicalErrorBoundary as or } from "@lexical/react/LexicalErrorBoundary.js";
21
- import { useFloating as ft, autoUpdate as Vt, size as ir, flip as ar, offset as Zt, shift as lr, useInteractions as te, useRole as ee, FloatingPortal as re, inline as sr, useDismiss as cr } from "@floating-ui/react";
22
- import { s as dr, c as hr } from "./stitches.config-00c23cdb.js";
23
- import { ListPlugin as ur } from "@lexical/react/LexicalListPlugin.js";
24
- import { HistoryPlugin as gr } from "@lexical/react/LexicalHistoryPlugin.js";
25
- import { TablePlugin as pr } from "@lexical/react/LexicalTablePlugin.js";
26
- import { TabIndentationPlugin as mr } from "@lexical/react/LexicalTabIndentationPlugin.js";
27
- import { useLexicalComposerContext as kt } from "@lexical/react/LexicalComposerContext";
18
+ import { LexicalComposer as br } from "@lexical/react/LexicalComposer.js";
19
+ import { RichTextPlugin as vr } from "@lexical/react/LexicalRichTextPlugin.js";
20
+ import { LexicalErrorBoundary as Cr } from "@lexical/react/LexicalErrorBoundary.js";
21
+ import { useFloating as vt, autoUpdate as se, size as Mr, flip as Tr, offset as ce, shift as xr, useInteractions as de, useRole as he, FloatingPortal as ue, inline as Lr, useDismiss as _r } from "@floating-ui/react";
22
+ import { s as wr, c as yr } from "./stitches.config-00c23cdb.js";
23
+ import { ListPlugin as Sr } from "@lexical/react/LexicalListPlugin.js";
24
+ import { HistoryPlugin as Nr } from "@lexical/react/LexicalHistoryPlugin.js";
25
+ import { TablePlugin as Er } from "@lexical/react/LexicalTablePlugin.js";
26
+ import { TabIndentationPlugin as Rr } from "@lexical/react/LexicalTabIndentationPlugin.js";
27
+ import { useLexicalComposerContext as Ct } from "@lexical/react/LexicalComposerContext";
28
28
  import "@stitches/react";
29
- const fr = ({
29
+ const Ir = ({
30
30
  text: t,
31
31
  maxChars: r,
32
32
  maxLines: e
33
33
  }) => {
34
34
  if (t.length === 0)
35
35
  return 0;
36
- const n = typeof e == "number", i = typeof r == "number";
37
- if (!n && !i)
36
+ const o = typeof e == "number", i = typeof r == "number";
37
+ if (!o && !i)
38
38
  return t.length;
39
39
  let a = 0, l = 0;
40
- for (; l < t.length && (!n || a < e) && (!i || l < r); )
40
+ for (; l < t.length && (!o || a < e) && (!i || l < r); )
41
41
  t[l] === `
42
42
  ` && a++, l++;
43
43
  return t.slice(0, l).length;
44
- }, ne = ({
44
+ }, ge = ({
45
45
  editor: t,
46
46
  maxChars: r,
47
47
  maxLines: e
48
48
  }) => {
49
- const n = G(), i = n.getTextContent(), a = fr({ text: i, maxChars: r, maxLines: e }), l = i.length - a, d = n.select().anchor;
50
- Le(t, d, l);
51
- const c = n.getLastChild();
52
- return c instanceof he && c.getChildrenSize() === 0 && c.remove(), l;
53
- }, bt = {
49
+ const o = Y(), i = o.getTextContent(), a = Ir({ text: i, maxChars: r, maxLines: e }), l = i.length - a, d = o.select().anchor;
50
+ De(t, d, l);
51
+ const c = o.getLastChild();
52
+ return c instanceof we && c.getChildrenSize() === 0 && c.remove(), l;
53
+ }, Mt = {
54
54
  quote: "ain-rich-text-quote",
55
55
  text: {
56
56
  bold: "ain-rich-text-bold",
57
57
  italic: "ain-rich-text-italic",
58
- underline: "ain-rich-text-underline"
58
+ underline: "ain-rich-text-underline",
59
+ strikethrough: "ain-rich-text-strikethrough"
59
60
  },
60
61
  list: {
61
62
  nested: {
62
63
  listitem: "ain-rich-text-nested-list-item"
63
64
  }
64
65
  }
65
- }, Mt = (t) => t[0] === "{", kr = (t) => t !== null && typeof t == "object" && "isEmpty" in t, br = (t, r) => {
66
+ }, Tt = (t) => t[0] === "{", Or = (t) => t !== null && typeof t == "object" && "isEmpty" in t, zr = (t, r) => {
66
67
  t.update(
67
68
  () => {
68
- const e = G();
69
+ const e = Y();
69
70
  e.clear();
70
- const n = W();
71
- n.append(I("")), e.append(n), V(null);
71
+ const o = G();
72
+ o.append(z("")), e.append(o), nt(null);
72
73
  },
73
74
  {
74
75
  tag: r
75
76
  }
76
77
  );
77
- }, Mr = (t, r, e) => {
78
+ }, $r = (t, r, e) => {
78
79
  r.update(
79
80
  () => {
80
- const n = G();
81
- n.clear();
82
- const i = W();
83
- i.append(I(t.trim())), n.append(i), V(null);
81
+ const o = Y();
82
+ o.clear();
83
+ const i = G();
84
+ i.append(z(t.trim())), o.append(i), nt(null);
84
85
  },
85
86
  {
86
87
  tag: e
87
88
  }
88
89
  ), r.blur();
89
- }, Pn = async (t, r, e) => {
90
+ }, ao = async (t, r, e) => {
90
91
  var l;
91
- let n = 0;
92
- const i = At({
92
+ let o = 0;
93
+ const i = Ut({
93
94
  nodes: r,
94
95
  editable: !1,
95
- theme: bt
96
+ theme: Mt
96
97
  });
97
98
  if (t)
98
99
  try {
99
- if (typeof t == "string" && !Mt(t))
100
+ if (typeof t == "string" && !Tt(t))
100
101
  i.update(() => {
101
- const s = G(), d = W();
102
- d.append(I(t.trim())), s.append(d);
102
+ const s = Y(), d = G();
103
+ d.append(z(t.trim())), s.append(d);
103
104
  });
104
105
  else {
105
106
  const s = i.parseEditorState(t, () => {
106
- (e == null ? void 0 : e.maxLines) !== void 0 && (n = ne({
107
+ (e == null ? void 0 : e.maxLines) !== void 0 && (o = ge({
107
108
  editor: i,
108
109
  maxLines: e.maxLines
109
110
  }));
@@ -116,25 +117,25 @@ const fr = ({
116
117
  await ((l = e == null ? void 0 : e.updateFn) == null ? void 0 : l.call(e, i));
117
118
  let a = "";
118
119
  return i.read(() => {
119
- a = zt(i);
120
- }), { html: a, trimCount: n };
121
- }, Fn = (t, r, e) => {
122
- let n = 0;
123
- const i = At({
120
+ a = Wt(i);
121
+ }), { html: a, trimCount: o };
122
+ }, lo = (t, r, e) => {
123
+ let o = 0;
124
+ const i = Ut({
124
125
  nodes: r,
125
126
  editable: !1,
126
- theme: bt
127
+ theme: Mt
127
128
  });
128
129
  if (t)
129
130
  try {
130
- if (typeof t == "string" && !Mt(t))
131
+ if (typeof t == "string" && !Tt(t))
131
132
  i.update(() => {
132
- const l = G(), s = W();
133
- s.append(I(t.trim())), l.append(s);
133
+ const l = Y(), s = G();
134
+ s.append(z(t.trim())), l.append(s);
134
135
  });
135
136
  else {
136
137
  const l = i.parseEditorState(t, () => {
137
- (e == null ? void 0 : e.maxLines) !== void 0 && (n = ne({
138
+ (e == null ? void 0 : e.maxLines) !== void 0 && (o = ge({
138
139
  editor: i,
139
140
  maxLines: e.maxLines
140
141
  }));
@@ -147,17 +148,17 @@ const fr = ({
147
148
  let a = "";
148
149
  try {
149
150
  i.read(() => {
150
- a = zt(i);
151
+ a = Wt(i);
151
152
  });
152
153
  } catch {
153
154
  }
154
- return { html: a, trimCount: n };
155
- }, Hn = (t) => xe().map(({ node: r }) => r).filter((r) => t.some((e) => r instanceof e));
156
- class X extends F {
155
+ return { html: a, trimCount: o };
156
+ }, so = (t) => Fe().map(({ node: r }) => r).filter((r) => t.some((e) => r instanceof e));
157
+ class et extends j {
157
158
  static getType() {
158
159
  return "target-link";
159
160
  }
160
- constructor(r, e, n) {
161
+ constructor(r, e, o) {
161
162
  let i = !1;
162
163
  const a = { ...e };
163
164
  try {
@@ -165,10 +166,10 @@ class X extends F {
165
166
  window.location.hostname !== l.hostname && (i = !0);
166
167
  } catch {
167
168
  }
168
- i && (a.target = "_blank", a.rel = "noopener noreferrer"), super(r, a, n);
169
+ i && (a.target = "_blank", a.rel = "noopener noreferrer"), super(r, a, o);
169
170
  }
170
171
  static clone(r) {
171
- return new X(
172
+ return new et(
172
173
  r.__url,
173
174
  { rel: r.__rel, target: r.__target, title: r.__title },
174
175
  r.__key
@@ -178,19 +179,19 @@ class X extends F {
178
179
  return super.exportJSON();
179
180
  }
180
181
  static importJSON(r) {
181
- return F.importJSON(r);
182
+ return j.importJSON(r);
182
183
  }
183
184
  }
184
- const oe = He({
185
+ const pe = rr({
185
186
  hasFocus: !1,
186
187
  editorRef: { current: null },
187
188
  signUrl: void 0,
188
189
  fileUpload: void 0
189
- }), Cr = ({ onBlur: t }) => {
190
- const [r, e] = b(!1), n = q(null), i = T(() => {
191
- e(!0), n.current && window.clearTimeout(n.current);
192
- }, []), a = T(() => {
193
- n.current = window.setTimeout(() => {
190
+ }), Ar = ({ onBlur: t }) => {
191
+ const [r, e] = m(!1), o = V(null), i = M(() => {
192
+ e(!0), o.current && window.clearTimeout(o.current);
193
+ }, []), a = M(() => {
194
+ o.current = window.setTimeout(() => {
194
195
  e(!1), t == null || t();
195
196
  }, 0);
196
197
  }, [t]);
@@ -201,50 +202,50 @@ const oe = He({
201
202
  onBlur: a
202
203
  }
203
204
  };
204
- }, z = () => Ue(oe);
205
- function vr({
205
+ }, H = () => nr(pe);
206
+ function Dr({
206
207
  src: t,
207
208
  altText: r,
208
209
  width: e,
209
- height: n,
210
+ height: o,
210
211
  nodeKey: i
211
212
  }) {
212
- const { signUrl: a } = z(), [l, s] = b(a ? "" : t), [d, c] = b(!1), h = q(!1), [g] = x();
213
- _(() => {
214
- const m = async () => {
213
+ const { signUrl: a } = H(), [l, s] = m(a ? "" : t), [d, c] = m(!1), u = V(!1), [g] = x();
214
+ w(() => {
215
+ const p = async () => {
215
216
  s(await (a == null ? void 0 : a(t)) ?? t);
216
217
  };
217
- !l && !h.current && (h.current = !0, m());
218
+ !l && !u.current && (u.current = !0, p());
218
219
  }, []);
219
- const k = (m) => (C) => {
220
- C.relatedTarget instanceof HTMLElement && C.relatedTarget.dataset.controls === "true" || c(m);
221
- }, S = () => {
220
+ const k = (p) => (C) => {
221
+ C.relatedTarget instanceof HTMLElement && C.relatedTarget.dataset.controls === "true" || c(p);
222
+ }, E = () => {
222
223
  g.update(() => {
223
- const m = ot(i);
224
- m && m.remove();
224
+ const p = ct(i);
225
+ p && p.remove();
225
226
  });
226
- }, E = () => {
227
+ }, R = () => {
227
228
  g.update(() => {
228
- var p;
229
- const m = ot(i);
230
- if (!m)
229
+ var L;
230
+ const p = ct(i);
231
+ if (!p)
231
232
  return;
232
- const C = m.getPreviousSibling() || ((p = m.getParent()) == null ? void 0 : p.getPreviousSibling());
233
- C && C.insertBefore(m);
233
+ const C = p.getPreviousSibling() || ((L = p.getParent()) == null ? void 0 : L.getPreviousSibling());
234
+ C && C.insertBefore(p);
234
235
  });
235
- }, M = () => {
236
+ }, b = () => {
236
237
  g.update(() => {
237
- var p;
238
- const m = ot(i);
239
- if (!m)
238
+ var L;
239
+ const p = ct(i);
240
+ if (!p)
240
241
  return;
241
- const C = m.getNextSibling() || ((p = m.getParent()) == null ? void 0 : p.getNextSibling());
242
- C && C.insertAfter(m);
242
+ const C = p.getNextSibling() || ((L = p.getParent()) == null ? void 0 : L.getNextSibling());
243
+ C && C.insertAfter(p);
243
244
  });
244
245
  };
245
- return l ? /* @__PURE__ */ u(U, { css: { position: "relative", display: "inline-block" }, children: [
246
- /* @__PURE__ */ u(
247
- je,
246
+ return l ? /* @__PURE__ */ h(P, { css: { position: "relative", display: "inline-block" }, children: [
247
+ /* @__PURE__ */ h(
248
+ ir,
248
249
  {
249
250
  css: {
250
251
  position: "absolute",
@@ -258,47 +259,47 @@ function vr({
258
259
  "data-controls": "true",
259
260
  onMouseLeave: k(!1),
260
261
  children: [
261
- /* @__PURE__ */ o(
262
- L,
262
+ /* @__PURE__ */ n(
263
+ y,
263
264
  {
264
265
  icon: !0,
265
266
  size: "sm",
266
267
  css: { width: "20px", height: "20px" },
267
- onClick: S,
268
+ onClick: E,
268
269
  color: "danger",
269
- children: /* @__PURE__ */ o(Qe, {})
270
+ children: /* @__PURE__ */ n(hr, {})
270
271
  }
271
272
  ),
272
- /* @__PURE__ */ o(
273
- L,
273
+ /* @__PURE__ */ n(
274
+ y,
274
275
  {
275
276
  icon: !0,
276
277
  size: "sm",
277
278
  css: { width: "20px", height: "20px" },
278
- onClick: E,
279
- children: /* @__PURE__ */ o(Ve, {})
279
+ onClick: R,
280
+ children: /* @__PURE__ */ n(ur, {})
280
281
  }
281
282
  ),
282
- /* @__PURE__ */ o(
283
- L,
283
+ /* @__PURE__ */ n(
284
+ y,
284
285
  {
285
286
  icon: !0,
286
287
  size: "sm",
287
288
  css: { width: "20px", height: "20px" },
288
- onClick: M,
289
- children: /* @__PURE__ */ o(Ze, {})
289
+ onClick: b,
290
+ children: /* @__PURE__ */ n(gr, {})
290
291
  }
291
292
  )
292
293
  ]
293
294
  }
294
295
  ),
295
- /* @__PURE__ */ o(
296
+ /* @__PURE__ */ n(
296
297
  "img",
297
298
  {
298
299
  src: l,
299
300
  alt: r,
300
301
  style: {
301
- height: n,
302
+ height: o,
302
303
  width: e
303
304
  },
304
305
  className: "ain-rich-text-image",
@@ -307,27 +308,27 @@ function vr({
307
308
  "data-controls": "true"
308
309
  }
309
310
  )
310
- ] }) : /* @__PURE__ */ o("span", {});
311
+ ] }) : /* @__PURE__ */ n("span", {});
311
312
  }
312
- function Tr(t) {
313
- const r = t, { alt: e, src: n, width: i, height: a } = r;
314
- return { node: Ct({ altText: e, height: a, src: n, width: i }) };
313
+ function Br(t) {
314
+ const r = t, { alt: e, src: o, width: i, height: a } = r;
315
+ return { node: xt({ altText: e, height: a, src: o, width: i }) };
315
316
  }
316
- class $ extends ue {
317
- constructor(e, n, i, a, l, s) {
317
+ class U extends ye {
318
+ constructor(e, o, i, a, l, s) {
318
319
  super(s);
319
- O(this, "__src");
320
- O(this, "__altText");
321
- O(this, "__width");
322
- O(this, "__height");
323
- O(this, "__meta");
324
- this.__src = e, this.__altText = n, this.__width = i || "inherit", this.__height = a || "inherit", this.__meta = l;
320
+ $(this, "__src");
321
+ $(this, "__altText");
322
+ $(this, "__width");
323
+ $(this, "__height");
324
+ $(this, "__meta");
325
+ this.__src = e, this.__altText = o, this.__width = i || "inherit", this.__height = a || "inherit", this.__meta = l;
325
326
  }
326
327
  static getType() {
327
328
  return "image";
328
329
  }
329
330
  static clone(e) {
330
- return new $(
331
+ return new U(
331
332
  e.__src,
332
333
  e.__altText,
333
334
  e.__width,
@@ -337,9 +338,9 @@ class $ extends ue {
337
338
  );
338
339
  }
339
340
  static importJSON(e) {
340
- const { altText: n, height: i, width: a, src: l, meta: s } = e;
341
- return Ct({
342
- altText: n,
341
+ const { altText: o, height: i, width: a, src: l, meta: s } = e;
342
+ return xt({
343
+ altText: o,
343
344
  height: i,
344
345
  src: l,
345
346
  width: a,
@@ -353,7 +354,7 @@ class $ extends ue {
353
354
  static importDOM() {
354
355
  return {
355
356
  img: (e) => ({
356
- conversion: Tr,
357
+ conversion: Br,
357
358
  priority: 0
358
359
  })
359
360
  };
@@ -373,12 +374,12 @@ class $ extends ue {
373
374
  return this.__meta ?? { width: 0, height: 0 };
374
375
  }
375
376
  setSrc(e) {
376
- const n = this.getWritable();
377
- n.__src = e;
377
+ const o = this.getWritable();
378
+ o.__src = e;
378
379
  }
379
- setWidthAndHeight(e, n) {
380
+ setWidthAndHeight(e, o) {
380
381
  const i = this.getWritable();
381
- i.__width = e, i.__height = n;
382
+ i.__width = e, i.__height = o;
382
383
  }
383
384
  // View
384
385
  createDOM(e) {
@@ -394,8 +395,8 @@ class $ extends ue {
394
395
  return this.__altText;
395
396
  }
396
397
  decorate() {
397
- return /* @__PURE__ */ o(
398
- vr,
398
+ return /* @__PURE__ */ n(
399
+ Dr,
399
400
  {
400
401
  src: this.__src,
401
402
  altText: this.__altText,
@@ -406,119 +407,128 @@ class $ extends ue {
406
407
  );
407
408
  }
408
409
  }
409
- function Ct({
410
+ function xt({
410
411
  altText: t,
411
412
  height: r,
412
413
  src: e,
413
- width: n,
414
+ width: o,
414
415
  meta: i,
415
416
  key: a
416
417
  }) {
417
- return ge(
418
- new $(e, t, n, r, i, a)
418
+ return Se(
419
+ new U(e, t, o, r, i, a)
419
420
  );
420
421
  }
421
- function Un(t) {
422
- return t instanceof $;
422
+ function co(t) {
423
+ return t instanceof U;
423
424
  }
424
- const Wn = [
425
- Wt,
426
- jt,
427
- ht,
428
- Ht,
429
- Ft,
430
- F,
431
- Kt,
432
- Gt,
425
+ const ho = [
426
+ Vt,
427
+ Qt,
428
+ mt,
433
429
  Yt,
434
- $
435
- ], jn = [
436
- Wt,
437
- jt,
438
- ht,
439
- Ht,
440
- Ft,
441
- F,
442
- Kt,
443
- Gt,
430
+ Jt,
431
+ j,
432
+ Zt,
433
+ te,
434
+ ee,
435
+ U
436
+ ], uo = [
437
+ Vt,
438
+ Qt,
439
+ mt,
444
440
  Yt,
445
- $,
446
- X,
441
+ Jt,
442
+ j,
443
+ Zt,
444
+ te,
445
+ ee,
446
+ U,
447
+ et,
447
448
  {
448
- replace: F,
449
- with: (t) => new X(
449
+ replace: j,
450
+ with: (t) => new et(
450
451
  t.getURL(),
451
452
  { rel: t.__rel, target: t.__target, title: t.__title }
452
453
  )
453
454
  }
454
455
  ];
455
- function _r(t) {
456
+ function Pr(t) {
456
457
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M4 6l16 0" } }, { tag: "path", attr: { d: "M8 12l8 0" } }, { tag: "path", attr: { d: "M6 18l12 0" } }] })(t);
457
458
  }
458
- function St(t) {
459
+ function Dt(t) {
459
460
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M4 6l16 0" } }, { tag: "path", attr: { d: "M4 12l10 0" } }, { tag: "path", attr: { d: "M4 18l14 0" } }] })(t);
460
461
  }
461
- function Lr(t) {
462
+ function Fr(t) {
462
463
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M4 6l16 0" } }, { tag: "path", attr: { d: "M10 12l10 0" } }, { tag: "path", attr: { d: "M6 18l14 0" } }] })(t);
463
464
  }
464
- function xr(t) {
465
+ function Hr(t) {
465
466
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M7 5h6a3.5 3.5 0 0 1 0 7h-6z" } }, { tag: "path", attr: { d: "M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7" } }] })(t);
466
467
  }
467
- function wr(t) {
468
+ function Ur(t) {
468
469
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M7 8l-4 4l4 4" } }, { tag: "path", attr: { d: "M17 8l4 4l-4 4" } }, { tag: "path", attr: { d: "M14 4l-4 16" } }] })(t);
469
470
  }
470
- function yr(t) {
471
+ function Wr(t) {
471
472
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M19 18v-8l-2 2" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
472
473
  }
473
- function Nr(t) {
474
+ function jr(t) {
474
475
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 0" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
475
476
  }
476
- function Sr(t) {
477
+ function Kr(t) {
477
478
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M19 14a2 2 0 1 0 -2 -2" } }, { tag: "path", attr: { d: "M17 16a2 2 0 1 0 2 -2" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
478
479
  }
479
- function Er(t) {
480
+ function Gr(t) {
480
481
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M20 18v-8l-4 6h5" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
481
482
  }
482
- function Rr(t) {
483
+ function qr(t) {
483
484
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M17 18h2a2 2 0 1 0 0 -4h-2v-4h4" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
484
485
  }
485
- function Ir(t) {
486
+ function Jr(t) {
486
487
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -4z" } }, { tag: "path", attr: { d: "M21 12a2 2 0 1 0 -4 0v4" } }, { tag: "path", attr: { d: "M4 6v12" } }, { tag: "path", attr: { d: "M12 6v12" } }, { tag: "path", attr: { d: "M11 18h2" } }, { tag: "path", attr: { d: "M3 18h2" } }, { tag: "path", attr: { d: "M4 12h8" } }, { tag: "path", attr: { d: "M3 6h2" } }, { tag: "path", attr: { d: "M11 6h2" } }] })(t);
487
488
  }
488
- function Or(t) {
489
+ function Yr(t) {
489
490
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M11 5l6 0" } }, { tag: "path", attr: { d: "M7 19l6 0" } }, { tag: "path", attr: { d: "M14 5l-4 14" } }] })(t);
490
491
  }
491
- function Ar(t) {
492
+ function Xr(t) {
492
493
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M17.5 15.5m-3.5 0a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0 -7 0" } }, { tag: "path", attr: { d: "M3 19v-10.5a3.5 3.5 0 0 1 7 0v10.5" } }, { tag: "path", attr: { d: "M3 13h7" } }, { tag: "path", attr: { d: "M21 12v7" } }] })(t);
493
494
  }
494
- function zr(t) {
495
+ function Vr(t) {
495
496
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" } }, { tag: "path", attr: { d: "M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" } }] })(t);
496
497
  }
497
- function $r(t) {
498
+ function Qr(t) {
498
499
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M3.5 5.5l1.5 1.5l2.5 -2.5" } }, { tag: "path", attr: { d: "M3.5 11.5l1.5 1.5l2.5 -2.5" } }, { tag: "path", attr: { d: "M3.5 17.5l1.5 1.5l2.5 -2.5" } }, { tag: "path", attr: { d: "M11 6l9 0" } }, { tag: "path", attr: { d: "M11 12l9 0" } }, { tag: "path", attr: { d: "M11 18l9 0" } }] })(t);
499
500
  }
500
- function Dr(t) {
501
+ function Zr(t) {
501
502
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M11 6h9" } }, { tag: "path", attr: { d: "M11 12h9" } }, { tag: "path", attr: { d: "M12 18h8" } }, { tag: "path", attr: { d: "M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4" } }, { tag: "path", attr: { d: "M6 10v-6l-2 2" } }] })(t);
502
503
  }
503
- function Br(t) {
504
+ function tn(t) {
504
505
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M9 6l11 0" } }, { tag: "path", attr: { d: "M9 12l11 0" } }, { tag: "path", attr: { d: "M9 18l11 0" } }, { tag: "path", attr: { d: "M5 6l0 .01" } }, { tag: "path", attr: { d: "M5 12l0 .01" } }, { tag: "path", attr: { d: "M5 18l0 .01" } }] })(t);
505
506
  }
506
- function Pr(t) {
507
+ function en(t) {
507
508
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M10 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5" } }, { tag: "path", attr: { d: "M19 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5" } }] })(t);
508
509
  }
509
- function Fr(t) {
510
+ function rn(t) {
511
+ return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M5 12l14 0" } }, { tag: "path", attr: { d: "M16 6.5a4 2 0 0 0 -4 -1.5h-1a3.5 3.5 0 0 0 0 7h2a3.5 3.5 0 0 1 0 7h-1.5a4 2 0 0 1 -4 -1.5" } }] })(t);
512
+ }
513
+ function nn(t) {
514
+ return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M5 7l8 10m-8 0l8 -10" } }, { tag: "path", attr: { d: "M21 20h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2" } }] })(t);
515
+ }
516
+ function on(t) {
510
517
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M5 7l8 10m-8 0l8 -10" } }, { tag: "path", attr: { d: "M21 11h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2" } }] })(t);
511
518
  }
512
- function Hr(t) {
519
+ function an(t) {
513
520
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z" } }, { tag: "path", attr: { d: "M4 10l16 0" } }, { tag: "path", attr: { d: "M10 4l0 16" } }] })(t);
514
521
  }
515
- function Ur(t) {
522
+ function ln(t) {
523
+ return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M9 15v-7a3 3 0 0 1 6 0v7" } }, { tag: "path", attr: { d: "M9 11h6" } }, { tag: "path", attr: { d: "M5 19h14" } }] })(t);
524
+ }
525
+ function sn(t) {
516
526
  return f({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" } }, { tag: "path", attr: { d: "M7 5v5a5 5 0 0 0 10 0v-5" } }, { tag: "path", attr: { d: "M5 19h14" } }] })(t);
517
527
  }
518
- const Wr = dr("div", {
528
+ const cn = wr("div", {
519
529
  width: "10rem",
520
530
  display: "flex"
521
- }), ie = {
531
+ }), me = {
522
532
  bullet: "Punktliste",
523
533
  h1: "Overskrift 1",
524
534
  h2: "Overskrift 2",
@@ -530,24 +540,24 @@ const Wr = dr("div", {
530
540
  paragraph: "Normal",
531
541
  quote: "Sitat",
532
542
  check: "Avkrysningsliste"
533
- }, jr = {
534
- bullet: /* @__PURE__ */ o(Br, { size: "1.25rem" }),
535
- h1: /* @__PURE__ */ o(yr, { size: "1.25rem" }),
536
- h2: /* @__PURE__ */ o(Nr, { size: "1.25rem" }),
537
- h3: /* @__PURE__ */ o(Sr, { size: "1.25rem" }),
538
- h4: /* @__PURE__ */ o(Er, { size: "1.25rem" }),
539
- h5: /* @__PURE__ */ o(Rr, { size: "1.25rem" }),
540
- h6: /* @__PURE__ */ o(Ir, { size: "1.25rem" }),
541
- number: /* @__PURE__ */ o(Dr, { size: "1.25rem" }),
542
- check: /* @__PURE__ */ o($r, { size: "1.25rem" }),
543
- paragraph: /* @__PURE__ */ o(Ar, { size: "1.25rem" }),
544
- quote: /* @__PURE__ */ o(Pr, { size: "1.25rem" })
545
- }, w = ({
543
+ }, dn = {
544
+ bullet: /* @__PURE__ */ n(tn, { size: "1.25rem" }),
545
+ h1: /* @__PURE__ */ n(Wr, { size: "1.25rem" }),
546
+ h2: /* @__PURE__ */ n(jr, { size: "1.25rem" }),
547
+ h3: /* @__PURE__ */ n(Kr, { size: "1.25rem" }),
548
+ h4: /* @__PURE__ */ n(Gr, { size: "1.25rem" }),
549
+ h5: /* @__PURE__ */ n(qr, { size: "1.25rem" }),
550
+ h6: /* @__PURE__ */ n(Jr, { size: "1.25rem" }),
551
+ number: /* @__PURE__ */ n(Zr, { size: "1.25rem" }),
552
+ check: /* @__PURE__ */ n(Qr, { size: "1.25rem" }),
553
+ paragraph: /* @__PURE__ */ n(Xr, { size: "1.25rem" }),
554
+ quote: /* @__PURE__ */ n(en, { size: "1.25rem" })
555
+ }, S = ({
546
556
  blockType: t
547
- }) => /* @__PURE__ */ u(j, { children: [
548
- /* @__PURE__ */ o(U, { css: { display: "flex", flex: "0 0 auto" }, children: jr[t] }),
549
- /* @__PURE__ */ o(
550
- U,
557
+ }) => /* @__PURE__ */ h(F, { children: [
558
+ /* @__PURE__ */ n(P, { css: { display: "flex", flex: "0 0 auto" }, children: dn[t] }),
559
+ /* @__PURE__ */ n(
560
+ P,
551
561
  {
552
562
  css: {
553
563
  flex: "1 1 auto",
@@ -555,189 +565,296 @@ const Wr = dr("div", {
555
565
  textOverflow: "ellipsis",
556
566
  whiteSpace: "nowrap"
557
567
  },
558
- children: ie[t]
568
+ children: me[t]
559
569
  }
560
570
  )
561
- ] }), Kr = (t) => {
571
+ ] }), hn = (t) => {
562
572
  if (!N(t))
563
573
  return null;
564
574
  const r = t.anchor.getNode();
565
- let e = r.getKey() === "root" ? r : Pt(r, (n) => {
566
- const i = n.getParent();
567
- return i !== null && $t(i);
575
+ let e = r.getKey() === "root" ? r : qt(r, (o) => {
576
+ const i = o.getParent();
577
+ return i !== null && jt(i);
568
578
  });
569
579
  return e === null && (e = r.getTopLevelElementOrThrow()), {
570
580
  anchorNode: r,
571
581
  element: e
572
582
  };
573
- }, Gr = () => {
574
- const [t] = x(), [r, e] = b("paragraph");
575
- _(() => t.registerCommand(
576
- Y,
583
+ }, un = () => {
584
+ const [t] = x(), [r, e] = m("paragraph");
585
+ w(() => t.registerCommand(
586
+ X,
577
587
  () => {
578
- const c = y(), h = Kr(c);
579
- if (!h)
588
+ const c = _(), u = hn(c);
589
+ if (!u)
580
590
  return !1;
581
- const { element: g, anchorNode: k } = h, S = g.getKey();
582
- if (t.getElementByKey(S) !== null)
583
- if (ut(g)) {
584
- const M = we(
591
+ const { element: g, anchorNode: k } = u, E = g.getKey();
592
+ if (t.getElementByKey(E) !== null)
593
+ if (ft(g)) {
594
+ const b = He(
585
595
  k,
586
- ht
587
- ), m = M ? M.getListType() : g.getListType();
588
- e(m);
596
+ mt
597
+ ), p = b ? b.getListType() : g.getListType();
598
+ e(p);
589
599
  } else {
590
- const M = Oe(g) ? g.getTag() : g.getType();
591
- M in ie && e(M);
600
+ const b = Je(g) ? g.getTag() : g.getType();
601
+ b in me && e(b);
592
602
  }
593
603
  return !1;
594
604
  },
595
- ct
605
+ q
596
606
  ), [t]);
597
- const n = (c) => {
607
+ const o = (c) => {
598
608
  r !== c && t.update(() => {
599
- const h = y();
600
- N(h) && (at(h, () => Ae(c)), e(c));
609
+ const u = _();
610
+ N(u) && (ht(u, () => Ye(c)), e(c));
601
611
  });
602
612
  };
603
- return /* @__PURE__ */ o(Wr, { children: /* @__PURE__ */ u(
604
- et,
613
+ return /* @__PURE__ */ n(cn, { children: /* @__PURE__ */ h(
614
+ at,
605
615
  {
606
- trigger: /* @__PURE__ */ o(
607
- gt,
616
+ trigger: /* @__PURE__ */ n(
617
+ lt,
608
618
  {
609
619
  dropdown: !0,
610
620
  css: { display: "flex", width: "100%", overflow: "hidden" },
611
- children: /* @__PURE__ */ o(w, { blockType: r })
621
+ children: /* @__PURE__ */ n(S, { blockType: r })
612
622
  }
613
623
  ),
614
624
  side: "bottom",
615
625
  align: "start",
616
626
  children: [
617
- /* @__PURE__ */ o(v, { onClick: () => {
627
+ /* @__PURE__ */ n(T, { onClick: () => {
618
628
  r !== "paragraph" && t.update(() => {
619
- const c = y();
620
- N(c) && (at(c, () => W()), e("paragraph"));
629
+ const c = _();
630
+ N(c) && (ht(c, () => G()), e("paragraph"));
621
631
  });
622
- }, children: /* @__PURE__ */ o(w, { blockType: "paragraph" }) }),
623
- /* @__PURE__ */ o(v, { onClick: () => n("h1"), children: /* @__PURE__ */ o(w, { blockType: "h1" }) }),
624
- /* @__PURE__ */ o(v, { onClick: () => n("h2"), children: /* @__PURE__ */ o(w, { blockType: "h2" }) }),
625
- /* @__PURE__ */ o(v, { onClick: () => n("h3"), children: /* @__PURE__ */ o(w, { blockType: "h3" }) }),
626
- /* @__PURE__ */ o(v, { onClick: () => n("h4"), children: /* @__PURE__ */ o(w, { blockType: "h4" }) }),
627
- /* @__PURE__ */ o(v, { onClick: () => n("h5"), children: /* @__PURE__ */ o(w, { blockType: "h5" }) }),
628
- /* @__PURE__ */ o(v, { onClick: () => n("h6"), children: /* @__PURE__ */ o(w, { blockType: "h6" }) }),
629
- /* @__PURE__ */ o(v, { onClick: () => {
630
- r !== "bullet" && (t.dispatchCommand(Ee, void 0), e("bullet"));
631
- }, children: /* @__PURE__ */ o(w, { blockType: "bullet" }) }),
632
- /* @__PURE__ */ o(v, { onClick: () => {
633
- r !== "number" && (t.dispatchCommand(Re, void 0), e("number"));
634
- }, children: /* @__PURE__ */ o(w, { blockType: "number" }) }),
635
- /* @__PURE__ */ o(v, { onClick: () => {
636
- r !== "check" && (t.dispatchCommand(Ut, void 0), e("check"));
637
- }, children: /* @__PURE__ */ o(w, { blockType: "check" }) }),
638
- /* @__PURE__ */ o(v, { onClick: () => {
632
+ }, children: /* @__PURE__ */ n(S, { blockType: "paragraph" }) }),
633
+ /* @__PURE__ */ n(T, { onClick: () => o("h1"), children: /* @__PURE__ */ n(S, { blockType: "h1" }) }),
634
+ /* @__PURE__ */ n(T, { onClick: () => o("h2"), children: /* @__PURE__ */ n(S, { blockType: "h2" }) }),
635
+ /* @__PURE__ */ n(T, { onClick: () => o("h3"), children: /* @__PURE__ */ n(S, { blockType: "h3" }) }),
636
+ /* @__PURE__ */ n(T, { onClick: () => o("h4"), children: /* @__PURE__ */ n(S, { blockType: "h4" }) }),
637
+ /* @__PURE__ */ n(T, { onClick: () => o("h5"), children: /* @__PURE__ */ n(S, { blockType: "h5" }) }),
638
+ /* @__PURE__ */ n(T, { onClick: () => o("h6"), children: /* @__PURE__ */ n(S, { blockType: "h6" }) }),
639
+ /* @__PURE__ */ n(T, { onClick: () => {
640
+ r !== "bullet" && (t.dispatchCommand(Ke, void 0), e("bullet"));
641
+ }, children: /* @__PURE__ */ n(S, { blockType: "bullet" }) }),
642
+ /* @__PURE__ */ n(T, { onClick: () => {
643
+ r !== "number" && (t.dispatchCommand(Ge, void 0), e("number"));
644
+ }, children: /* @__PURE__ */ n(S, { blockType: "number" }) }),
645
+ /* @__PURE__ */ n(T, { onClick: () => {
646
+ r !== "check" && (t.dispatchCommand(Xt, void 0), e("check"));
647
+ }, children: /* @__PURE__ */ n(S, { blockType: "check" }) }),
648
+ /* @__PURE__ */ n(T, { onClick: () => {
639
649
  r !== "quote" && t.update(() => {
640
- const c = y();
641
- N(c) && (at(c, () => ze()), e("quote"));
650
+ const c = _();
651
+ N(c) && (ht(c, () => Xe()), e("quote"));
642
652
  });
643
- }, children: /* @__PURE__ */ o(w, { blockType: "quote" }) })
653
+ }, children: /* @__PURE__ */ n(S, { blockType: "quote" }) })
644
654
  ]
645
655
  }
646
656
  ) });
647
- }, Yr = () => {
648
- const [t] = x(), [r, e] = b(!1), [n, i] = b(!1), [a, l] = b(!1), [s, d] = b(!1), [c, h] = b(!1), g = T(() => {
649
- const p = y();
650
- N(p) && (e(p.hasFormat("bold")), i(p.hasFormat("italic")), l(p.hasFormat("underline")), d(p.hasFormat("code")), h(p.hasFormat("superscript")));
657
+ }, gn = () => {
658
+ const [t] = x(), [r, e] = m(!1), [o, i] = m(!1), [a, l] = m(!1), [s, d] = m(!1), [c, u] = m(!1), [g, k] = m(!1), [E, R] = m(!1), [b, p] = m(""), [C, L] = m(!1), I = M(() => {
659
+ const v = _();
660
+ if (!N(v))
661
+ return;
662
+ e(v.hasFormat("bold")), i(v.hasFormat("italic")), l(v.hasFormat("underline")), p(Be(v, "color", ""));
663
+ const yt = v.hasFormat("strikethrough"), St = v.hasFormat("code"), Nt = v.hasFormat("superscript"), Et = v.hasFormat("subscript");
664
+ d(yt), u(St), k(Nt), R(Et), (yt || St || Nt || Et) && L(!0);
651
665
  }, []);
652
- _(() => Z(
666
+ w(() => ot(
653
667
  t.registerCommand(
654
- Y,
655
- () => (g(), !1),
656
- ct
668
+ X,
669
+ () => (I(), !1),
670
+ q
657
671
  ),
658
- t.registerUpdateListener(({ editorState: p }) => {
659
- p.read(() => {
660
- g();
672
+ t.registerUpdateListener(({ editorState: v }) => {
673
+ v.read(() => {
674
+ I();
661
675
  });
662
676
  })
663
- ), [t, g]);
664
- const k = T(
665
- () => t.dispatchCommand(K, "bold"),
677
+ ), [t, I]);
678
+ const J = M(
679
+ () => t.dispatchCommand(A, "bold"),
666
680
  [t]
667
- ), S = T(
668
- () => t.dispatchCommand(K, "italic"),
681
+ ), Q = M(
682
+ () => t.dispatchCommand(A, "italic"),
669
683
  [t]
670
- ), E = T(
671
- () => t.dispatchCommand(K, "underline"),
684
+ ), ve = M(
685
+ () => t.dispatchCommand(A, "underline"),
672
686
  [t]
673
- ), M = T(
674
- () => t.dispatchCommand(K, "code"),
687
+ ), Ce = M(
688
+ () => t.dispatchCommand(A, "strikethrough"),
675
689
  [t]
676
- ), m = T(
677
- () => t.dispatchCommand(K, "superscript"),
690
+ ), Me = M(
691
+ () => t.dispatchCommand(A, "code"),
678
692
  [t]
679
- ), C = qt(() => {
680
- const p = [];
681
- return r && p.push("bold"), n && p.push("italic"), a && p.push("underline"), s && p.push("code"), c && p.push("superscript"), p;
682
- }, [r, n, a, s, c]);
683
- return /* @__PURE__ */ u(
684
- Jt,
685
- {
686
- type: "multiple",
687
- "aria-label": "Tekstformattering",
688
- value: C,
689
- children: [
690
- /* @__PURE__ */ o(P, { onClick: k, title: "Fet tekst", value: "bold", children: /* @__PURE__ */ o(xr, { size: "1.25rem" }) }),
691
- /* @__PURE__ */ o(
692
- P,
693
- {
694
- onClick: S,
695
- title: "Kursiv tekst",
696
- value: "italic",
697
- children: /* @__PURE__ */ o(Or, { size: "1.25rem" })
698
- }
699
- ),
700
- /* @__PURE__ */ o(
701
- P,
702
- {
703
- onClick: E,
704
- title: "Understreket tekst",
705
- value: "underline",
706
- children: /* @__PURE__ */ o(Ur, { size: "1.25rem" })
707
- }
708
- ),
709
- /* @__PURE__ */ o(P, { onClick: M, title: "Kode", value: "code", children: /* @__PURE__ */ o(wr, { size: "1.25rem" }) }),
710
- /* @__PURE__ */ o(
711
- P,
693
+ ), Te = M(
694
+ () => t.dispatchCommand(A, "superscript"),
695
+ [t]
696
+ ), xe = M(
697
+ () => t.dispatchCommand(A, "subscript"),
698
+ [t]
699
+ ), wt = re(() => {
700
+ const v = [];
701
+ return r && v.push("bold"), o && v.push("italic"), a && v.push("underline"), s && v.push("strikethrough"), c && v.push("code"), g && v.push("superscript"), E && v.push("subscript"), b && v.push("color"), v;
702
+ }, [
703
+ r,
704
+ o,
705
+ a,
706
+ c,
707
+ g,
708
+ E,
709
+ s,
710
+ b
711
+ ]);
712
+ return /* @__PURE__ */ h(F, { children: [
713
+ /* @__PURE__ */ h(
714
+ tt,
715
+ {
716
+ type: "multiple",
717
+ "aria-label": "Tekstformattering",
718
+ value: wt,
719
+ children: [
720
+ /* @__PURE__ */ n(O, { onClick: J, title: "Fet tekst", value: "bold", children: /* @__PURE__ */ n(Hr, { size: "1.25rem" }) }),
721
+ /* @__PURE__ */ n(
722
+ O,
723
+ {
724
+ onClick: Q,
725
+ title: "Kursiv tekst",
726
+ value: "italic",
727
+ children: /* @__PURE__ */ n(Yr, { size: "1.25rem" })
728
+ }
729
+ ),
730
+ /* @__PURE__ */ n(
731
+ O,
732
+ {
733
+ onClick: ve,
734
+ title: "Understreket tekst",
735
+ value: "underline",
736
+ children: /* @__PURE__ */ n(sn, { size: "1.25rem" })
737
+ }
738
+ )
739
+ ]
740
+ }
741
+ ),
742
+ /* @__PURE__ */ h(ne, { open: C, onOpenChange: L, children: [
743
+ /* @__PURE__ */ n(oe, { children: /* @__PURE__ */ n(lt, { children: /* @__PURE__ */ n(pr, { size: "1.25rem" }) }) }),
744
+ /* @__PURE__ */ n(ie, { children: /* @__PURE__ */ h(
745
+ tt,
746
+ {
747
+ type: "multiple",
748
+ "aria-label": "Tekstformattering",
749
+ value: wt,
750
+ css: { margin: "$1" },
751
+ children: [
752
+ /* @__PURE__ */ n(
753
+ O,
754
+ {
755
+ onClick: Ce,
756
+ title: "Gjennomstreking",
757
+ value: "strikethrough",
758
+ children: /* @__PURE__ */ n(rn, { size: "1.25rem" })
759
+ }
760
+ ),
761
+ /* @__PURE__ */ n(
762
+ O,
763
+ {
764
+ onClick: Te,
765
+ title: "Superscript",
766
+ value: "superscript",
767
+ children: /* @__PURE__ */ n(on, { size: "1.25rem" })
768
+ }
769
+ ),
770
+ /* @__PURE__ */ n(
771
+ O,
772
+ {
773
+ onClick: xe,
774
+ title: "Subscript",
775
+ value: "subscript",
776
+ children: /* @__PURE__ */ n(nn, { size: "1.25rem" })
777
+ }
778
+ ),
779
+ /* @__PURE__ */ n(O, { onClick: Me, title: "Kode", value: "code", children: /* @__PURE__ */ n(Ur, { size: "1.25rem" }) }),
780
+ /* @__PURE__ */ n(mn, { activeColor: b })
781
+ ]
782
+ }
783
+ ) })
784
+ ] })
785
+ ] });
786
+ }, pn = [
787
+ { name: "Reset", value: "" },
788
+ { name: "Rød", value: "#df2222" },
789
+ { name: "Grønn", value: "#1ca021" },
790
+ { name: "Blå", value: "#2044b8" },
791
+ { name: "Lilla", value: "#9c31de" }
792
+ ], mn = ({ activeColor: t }) => {
793
+ const [r] = x(), [e, o] = m(!1), i = (a) => {
794
+ r.update(() => {
795
+ const l = _();
796
+ l && Pe(l, { color: a });
797
+ });
798
+ };
799
+ return /* @__PURE__ */ h(ne, { open: e, onOpenChange: o, children: [
800
+ /* @__PURE__ */ n(oe, { children: /* @__PURE__ */ n(O, { value: "color", title: "Tekstfarge", children: /* @__PURE__ */ n(ln, { size: "1.25rem" }) }) }),
801
+ /* @__PURE__ */ n(ie, { children: /* @__PURE__ */ n(
802
+ tt,
803
+ {
804
+ type: "single",
805
+ "aria-label": "Tekstfarge",
806
+ value: t,
807
+ css: { margin: "$1" },
808
+ children: pn.map((a) => /* @__PURE__ */ n(
809
+ O,
712
810
  {
713
- onClick: m,
714
- title: "Superscript",
715
- value: "superscript",
716
- children: /* @__PURE__ */ o(Fr, { size: "1.25rem" })
717
- }
718
- )
719
- ]
720
- }
721
- );
722
- }, qr = ({ children: t }) => {
723
- const { hasFocus: r, editorRef: e } = z(), n = r, [i, a] = b(n);
724
- We(() => {
725
- a(n);
726
- }, [n]);
727
- const { context: l, refs: s, floatingStyles: d } = ft({
811
+ value: a.value,
812
+ onClick: () => i(
813
+ !a.value || a.value === t ? null : a.value
814
+ ),
815
+ children: a.value ? /* @__PURE__ */ n(
816
+ P,
817
+ {
818
+ css: {
819
+ width: "1rem",
820
+ height: "1rem",
821
+ backgroundColor: a.value,
822
+ borderRadius: "$full",
823
+ flexShrink: 0
824
+ }
825
+ }
826
+ ) : /* @__PURE__ */ n(
827
+ mr,
828
+ {
829
+ size: "1.25rem",
830
+ style: { color: "#000" }
831
+ }
832
+ )
833
+ },
834
+ a.name
835
+ ))
836
+ }
837
+ ) })
838
+ ] });
839
+ }, fn = ({ children: t }) => {
840
+ const { hasFocus: r, editorRef: e } = H(), o = r, [i, a] = m(o);
841
+ or(() => {
842
+ a(o);
843
+ }, [o]);
844
+ const { context: l, refs: s, floatingStyles: d } = vt({
728
845
  placement: "top",
729
- whileElementsMounted: Vt,
846
+ whileElementsMounted: se,
730
847
  middleware: [
731
- ir({
732
- apply: ({ rects: h, elements: g }) => {
733
- g.floating.style.minWidth = `${h.reference.width}px`;
848
+ Mr({
849
+ apply: ({ rects: u, elements: g }) => {
850
+ g.floating.style.minWidth = `${u.reference.width}px`;
734
851
  }
735
852
  }),
736
- ar(),
737
- Zt({
853
+ Tr(),
854
+ ce({
738
855
  mainAxis: 8
739
856
  }),
740
- lr({
857
+ xr({
741
858
  padding: 8
742
859
  })
743
860
  ],
@@ -746,13 +863,13 @@ const Wr = dr("div", {
746
863
  elements: {
747
864
  reference: e.current
748
865
  }
749
- }), { getFloatingProps: c } = te([
750
- ee(l, {
866
+ }), { getFloatingProps: c } = de([
867
+ he(l, {
751
868
  role: "dialog"
752
869
  })
753
870
  ]);
754
- return i ? /* @__PURE__ */ o(re, { children: /* @__PURE__ */ o(
755
- Xt,
871
+ return i ? /* @__PURE__ */ n(ue, { children: /* @__PURE__ */ n(
872
+ ae,
756
873
  {
757
874
  ref: s.setFloating,
758
875
  style: d,
@@ -763,72 +880,73 @@ const Wr = dr("div", {
763
880
  overflow: "hidden",
764
881
  boxShadow: "$md"
765
882
  },
766
- children: /* @__PURE__ */ o(Jr, { children: t })
883
+ children: /* @__PURE__ */ n(kn, { children: t })
767
884
  }
768
885
  ) }) : null;
769
- }, Jr = ({
886
+ }, kn = ({
770
887
  children: t,
771
888
  ...r
772
- }) => /* @__PURE__ */ u(Ke, { "aria-label": "Formattering", ...r, children: [
773
- /* @__PURE__ */ o(Gr, {}),
774
- /* @__PURE__ */ o(Ge, {}),
775
- /* @__PURE__ */ o(Yr, {}),
889
+ }) => /* @__PURE__ */ h(ar, { "aria-label": "Formattering", ...r, children: [
890
+ /* @__PURE__ */ n(un, {}),
891
+ /* @__PURE__ */ n($t, {}),
892
+ /* @__PURE__ */ n(gn, {}),
893
+ /* @__PURE__ */ n($t, {}),
776
894
  t
777
895
  ] });
778
- function Xr() {
896
+ function bn() {
779
897
  const [t] = x();
780
- return _(() => Z(
898
+ return w(() => ot(
781
899
  t.registerCommand(
782
- Ut,
783
- () => (Ie(t, "check"), !0),
784
- R
900
+ Xt,
901
+ () => (qe(t, "check"), !0),
902
+ D
785
903
  ),
786
904
  t.registerCommand(
787
- pe,
788
- (r) => It(r, t, !1),
789
- R
905
+ Ne,
906
+ (r) => Ft(r, t, !1),
907
+ D
790
908
  ),
791
909
  t.registerCommand(
792
- me,
793
- (r) => It(r, t, !0),
794
- R
910
+ Ee,
911
+ (r) => Ft(r, t, !0),
912
+ D
795
913
  ),
796
914
  t.registerCommand(
797
- Dt,
915
+ Kt,
798
916
  (r) => {
799
- if (st() != null) {
800
- const n = t.getRootElement();
801
- return n != null && n.focus(), !0;
917
+ if (gt() != null) {
918
+ const o = t.getRootElement();
919
+ return o != null && o.focus(), !0;
802
920
  }
803
921
  return !1;
804
922
  },
805
- R
923
+ D
806
924
  ),
807
925
  t.registerCommand(
808
- fe,
926
+ Re,
809
927
  (r) => {
810
- const e = st();
928
+ const e = gt();
811
929
  return e != null && t.isEditable() ? (t.update(() => {
812
- const n = dt(e);
813
- H(n) && (r.preventDefault(), n.toggleChecked());
930
+ const o = pt(e);
931
+ K(o) && (r.preventDefault(), o.toggleChecked());
814
932
  }), !0) : !1;
815
933
  },
816
- R
934
+ D
817
935
  ),
818
936
  t.registerCommand(
819
- ke,
937
+ Ie,
820
938
  (r) => t.getEditorState().read(() => {
821
- const e = y();
939
+ const e = _();
822
940
  if (N(e) && e.isCollapsed()) {
823
- const { anchor: n } = e, i = n.type === "element";
824
- if (i || n.offset === 0) {
825
- const a = n.getNode(), l = Pt(
941
+ const { anchor: o } = e, i = o.type === "element";
942
+ if (i || o.offset === 0) {
943
+ const a = o.getNode(), l = qt(
826
944
  a,
827
- (s) => be(s) && !s.isInline()
945
+ (s) => Oe(s) && !s.isInline()
828
946
  );
829
- if (H(l)) {
947
+ if (K(l)) {
830
948
  const s = l.getParent();
831
- if (ut(s) && s.getListType() === "check" && (i || l.getFirstDescendant() === a)) {
949
+ if (ft(s) && s.getListType() === "check" && (i || l.getFirstDescendant() === a)) {
832
950
  const d = t.getElementByKey(l.__key);
833
951
  if (d != null && document.activeElement !== d)
834
952
  return d.focus(), r.preventDefault(), !0;
@@ -838,19 +956,19 @@ function Xr() {
838
956
  }
839
957
  return !1;
840
958
  }),
841
- R
959
+ D
842
960
  ),
843
961
  t.registerRootListener((r, e) => {
844
- r !== null && (r.addEventListener("click", Et), r.addEventListener("pointerdown", Rt)), e !== null && (e.removeEventListener("click", Et), e.removeEventListener("pointerdown", Rt));
962
+ r !== null && (r.addEventListener("click", Bt), r.addEventListener("pointerdown", Pt)), e !== null && (e.removeEventListener("click", Bt), e.removeEventListener("pointerdown", Pt));
845
963
  })
846
964
  ), [t]), null;
847
965
  }
848
- function ae(t, r) {
966
+ function fe(t, r) {
849
967
  const e = t.target;
850
- if (e === null || !xt(e))
968
+ if (e === null || !It(e))
851
969
  return;
852
- const n = e.firstChild;
853
- if (n != null && xt(n) && (n.tagName === "UL" || n.tagName === "OL"))
970
+ const o = e.firstChild;
971
+ if (o != null && It(o) && (o.tagName === "UL" || o.tagName === "OL"))
854
972
  return;
855
973
  const i = e.parentNode;
856
974
  if (!i || i.__lexicalListType !== "check")
@@ -858,23 +976,23 @@ function ae(t, r) {
858
976
  const a = t.pageX, l = e.getBoundingClientRect();
859
977
  (e.dir === "rtl" ? a < l.right && a > l.right - 20 : a > l.left && a < l.left + 20) && r();
860
978
  }
861
- function Et(t) {
862
- ae(t, () => {
863
- const r = t.target, e = Qr(r);
979
+ function Bt(t) {
980
+ fe(t, () => {
981
+ const r = t.target, e = vn(r);
864
982
  e != null && e.isEditable() && e.update(() => {
865
983
  if (t.target) {
866
- const n = dt(r);
867
- H(n) && (r.focus(), n.toggleChecked());
984
+ const o = pt(r);
985
+ K(o) && (r.focus(), o.toggleChecked());
868
986
  }
869
987
  });
870
988
  });
871
989
  }
872
- function Rt(t) {
873
- ae(t, () => {
990
+ function Pt(t) {
991
+ fe(t, () => {
874
992
  t.preventDefault();
875
993
  });
876
994
  }
877
- function Qr(t) {
995
+ function vn(t) {
878
996
  let r = t;
879
997
  for (; r; ) {
880
998
  if (r.__lexicalEditor)
@@ -883,30 +1001,30 @@ function Qr(t) {
883
1001
  }
884
1002
  return null;
885
1003
  }
886
- function st() {
1004
+ function gt() {
887
1005
  const t = document.activeElement;
888
1006
  return t != null && t.tagName === "LI" && t.parentNode != null && // @ts-ignore internal field
889
1007
  t.parentNode.__lexicalListType === "check" ? t : null;
890
1008
  }
891
- function Vr(t, r) {
892
- let e = r ? t.getPreviousSibling() : t.getNextSibling(), n = t;
893
- for (; e == null && H(n); )
894
- n = n.getParentOrThrow().getParent(), n != null && (e = r ? n.getPreviousSibling() : n.getNextSibling());
895
- for (; H(e); ) {
1009
+ function Cn(t, r) {
1010
+ let e = r ? t.getPreviousSibling() : t.getNextSibling(), o = t;
1011
+ for (; e == null && K(o); )
1012
+ o = o.getParentOrThrow().getParent(), o != null && (e = r ? o.getPreviousSibling() : o.getNextSibling());
1013
+ for (; K(e); ) {
896
1014
  const i = r ? e.getLastChild() : e.getFirstChild();
897
- if (!ut(i))
1015
+ if (!ft(i))
898
1016
  return e;
899
1017
  e = r ? i.getLastChild() : i.getFirstChild();
900
1018
  }
901
1019
  return null;
902
1020
  }
903
- function It(t, r, e) {
904
- const n = st();
905
- return n != null && r.update(() => {
906
- const i = dt(n);
907
- if (!H(i))
1021
+ function Ft(t, r, e) {
1022
+ const o = gt();
1023
+ return o != null && r.update(() => {
1024
+ const i = pt(o);
1025
+ if (!K(i))
908
1026
  return;
909
- const a = Vr(i, e);
1027
+ const a = Cn(i, e);
910
1028
  if (a != null) {
911
1029
  a.selectStart();
912
1030
  const l = r.getElementByKey(a.__key);
@@ -916,54 +1034,54 @@ function It(t, r, e) {
916
1034
  }
917
1035
  }), !1;
918
1036
  }
919
- const vt = Me("INSERT_IMAGE_COMMAND");
920
- function Zr() {
921
- const [t] = kt();
922
- return _(() => {
923
- if (!t.hasNodes([$]))
1037
+ const Lt = ze("INSERT_IMAGE_COMMAND");
1038
+ function Mn() {
1039
+ const [t] = Ct();
1040
+ return w(() => {
1041
+ if (!t.hasNodes([U]))
924
1042
  throw new Error("ImagePlugin: ImageNode not registered on editor");
925
- return Z(
1043
+ return ot(
926
1044
  t.registerCommand(
927
- vt,
1045
+ Lt,
928
1046
  (r) => {
929
- const e = Ct(r);
930
- return Ce([e]), $t(e.getParentOrThrow()) && ye(e, W).selectEnd(), !0;
1047
+ const e = xt(r);
1048
+ return $e([e]), jt(e.getParentOrThrow()) && Ue(e, G).selectEnd(), !0;
931
1049
  },
932
- ve
1050
+ q
933
1051
  )
934
1052
  );
935
1053
  }, [t]), null;
936
1054
  }
937
- const tn = () => /* @__PURE__ */ u(j, { children: [
938
- /* @__PURE__ */ o(ur, {}),
939
- /* @__PURE__ */ o(pr, {}),
940
- /* @__PURE__ */ o(gr, {}),
941
- /* @__PURE__ */ o(Xr, {}),
942
- /* @__PURE__ */ o(mr, {}),
943
- /* @__PURE__ */ o(Zr, {})
944
- ] }), en = ({
1055
+ const Tn = () => /* @__PURE__ */ h(F, { children: [
1056
+ /* @__PURE__ */ n(Sr, {}),
1057
+ /* @__PURE__ */ n(Er, {}),
1058
+ /* @__PURE__ */ n(Nr, {}),
1059
+ /* @__PURE__ */ n(bn, {}),
1060
+ /* @__PURE__ */ n(Rr, {}),
1061
+ /* @__PURE__ */ n(Mn, {})
1062
+ ] }), xn = ({
945
1063
  state: t
946
1064
  }) => {
947
- const [r] = x(), e = q(!1);
948
- return _(() => {
1065
+ const [r] = x(), e = V(!1);
1066
+ return w(() => {
949
1067
  !t || e.current || (e.current = !0, window.queueMicrotask(() => {
950
1068
  try {
951
- if (kr(t)) {
952
- t.isEmpty() ? br(r) : r.setEditorState(t);
1069
+ if (Or(t)) {
1070
+ t.isEmpty() ? zr(r) : r.setEditorState(t);
953
1071
  return;
954
1072
  }
955
- if (typeof t == "string" && !Mt(t)) {
956
- Mr(t, r);
1073
+ if (typeof t == "string" && !Tt(t)) {
1074
+ $r(t, r);
957
1075
  return;
958
1076
  }
959
- const n = r.parseEditorState(t);
960
- n.isEmpty() || r.setEditorState(n);
961
- } catch (n) {
962
- console.error("Could not parse"), console.error(n);
1077
+ const o = r.parseEditorState(t);
1078
+ o.isEmpty() || r.setEditorState(o);
1079
+ } catch (o) {
1080
+ console.error("Could not parse"), console.error(o);
963
1081
  }
964
1082
  }));
965
1083
  }, []), null;
966
- }, rn = Ye("div", {
1084
+ }, Ln = lr("div", {
967
1085
  border: "1px solid $borderDarker",
968
1086
  borderRadius: "$md",
969
1087
  position: "relative",
@@ -1000,10 +1118,10 @@ const tn = () => /* @__PURE__ */ u(j, { children: [
1000
1118
  }
1001
1119
  }
1002
1120
  ]
1003
- }), nn = ({
1121
+ }), _n = ({
1004
1122
  isLoading: t
1005
- }) => /* @__PURE__ */ o(
1006
- U,
1123
+ }) => /* @__PURE__ */ n(
1124
+ P,
1007
1125
  {
1008
1126
  css: {
1009
1127
  visibility: t ? "visible" : "hidden",
@@ -1012,58 +1130,58 @@ const tn = () => /* @__PURE__ */ u(j, { children: [
1012
1130
  right: "1rem",
1013
1131
  display: "flex"
1014
1132
  },
1015
- children: /* @__PURE__ */ o(pt, {})
1133
+ children: /* @__PURE__ */ n(kt, {})
1016
1134
  }
1017
- ), Kn = ({
1135
+ ), go = ({
1018
1136
  isLoading: t,
1019
1137
  children: r,
1020
1138
  placeholderText: e,
1021
- nodes: n,
1139
+ nodes: o,
1022
1140
  plugins: i,
1023
1141
  toolbar: a,
1024
1142
  toolbarContent: l,
1025
1143
  content: s,
1026
1144
  hideBorder: d,
1027
1145
  onBlur: c,
1028
- defaultState: h,
1146
+ defaultState: u,
1029
1147
  css: g,
1030
1148
  signUrl: k,
1031
- fileUpload: S,
1032
- editable: E = !0
1149
+ fileUpload: E,
1150
+ editable: R = !0
1033
1151
  }) => {
1034
- const { hasFocus: M, attributes: m } = Cr({ onBlur: c }), C = q(null), p = qt(
1035
- () => ({ hasFocus: M, editorRef: C, signUrl: k, fileUpload: S }),
1036
- [M, k, S]
1152
+ const { hasFocus: b, attributes: p } = Ar({ onBlur: c }), C = V(null), L = re(
1153
+ () => ({ hasFocus: b, editorRef: C, signUrl: k, fileUpload: E }),
1154
+ [b, k, E]
1037
1155
  );
1038
- return /* @__PURE__ */ o(oe.Provider, { value: p, children: /* @__PURE__ */ u(
1039
- rr,
1156
+ return /* @__PURE__ */ n(pe.Provider, { value: L, children: /* @__PURE__ */ h(
1157
+ br,
1040
1158
  {
1041
1159
  initialConfig: {
1042
1160
  namespace: "ain-rich-text",
1043
- onError: (D) => {
1044
- console.error(D);
1161
+ onError: (I) => {
1162
+ console.error(I);
1045
1163
  },
1046
- theme: bt,
1047
- nodes: n,
1048
- editable: E
1164
+ theme: Mt,
1165
+ nodes: o,
1166
+ editable: R
1049
1167
  },
1050
1168
  children: [
1051
- /* @__PURE__ */ u(
1052
- rn,
1169
+ /* @__PURE__ */ h(
1170
+ Ln,
1053
1171
  {
1054
1172
  ref: C,
1055
- hasFocus: M,
1173
+ hasFocus: b,
1056
1174
  hideBorder: d,
1057
1175
  css: g,
1058
- ...m,
1176
+ ...p,
1059
1177
  children: [
1060
1178
  a,
1061
- /* @__PURE__ */ o(
1062
- nr,
1179
+ /* @__PURE__ */ n(
1180
+ vr,
1063
1181
  {
1064
1182
  contentEditable: s,
1065
- placeholder: e ? /* @__PURE__ */ o(
1066
- U,
1183
+ placeholder: e ? /* @__PURE__ */ n(
1184
+ P,
1067
1185
  {
1068
1186
  css: {
1069
1187
  position: "absolute",
@@ -1076,22 +1194,22 @@ const tn = () => /* @__PURE__ */ u(j, { children: [
1076
1194
  children: e
1077
1195
  }
1078
1196
  ) : null,
1079
- ErrorBoundary: or
1197
+ ErrorBoundary: Cr
1080
1198
  }
1081
1199
  ),
1082
- /* @__PURE__ */ o(tn, {}),
1200
+ /* @__PURE__ */ n(Tn, {}),
1083
1201
  i,
1084
- /* @__PURE__ */ o(nn, { isLoading: t }),
1085
- E && !a && /* @__PURE__ */ o(qr, { children: l })
1202
+ /* @__PURE__ */ n(_n, { isLoading: t }),
1203
+ R && !a && /* @__PURE__ */ n(fn, { children: l })
1086
1204
  ]
1087
1205
  }
1088
1206
  ),
1089
- /* @__PURE__ */ o(en, { state: h }),
1090
- /* @__PURE__ */ o(j, { children: r })
1207
+ /* @__PURE__ */ n(xn, { state: u }),
1208
+ /* @__PURE__ */ n(F, { children: r })
1091
1209
  ]
1092
1210
  }
1093
1211
  ) });
1094
- }, on = {
1212
+ }, wn = {
1095
1213
  fontSize: "1rem",
1096
1214
  lineHeight: "1.5",
1097
1215
  "h1, h2, h3, h4, h5, h6": {
@@ -1138,6 +1256,9 @@ const tn = () => /* @__PURE__ */ u(j, { children: [
1138
1256
  ".ain-rich-text-underline": {
1139
1257
  textDecoration: "underline"
1140
1258
  },
1259
+ ".ain-rich-text-strikethrough": {
1260
+ textDecoration: "line-through"
1261
+ },
1141
1262
  "ul, ol": {
1142
1263
  paddingLeft: "1.8em",
1143
1264
  listStylePosition: "outside",
@@ -1285,32 +1406,32 @@ const tn = () => /* @__PURE__ */ u(j, { children: [
1285
1406
  defaultVariants: {
1286
1407
  size: "md"
1287
1408
  }
1288
- }, Gn = hr(on), an = ({
1409
+ }, po = yr(wn), yn = ({
1289
1410
  fileUpload: t,
1290
1411
  ...r
1291
1412
  }) => {
1292
- const [e] = x(), [n, i] = b(null), a = (s) => {
1413
+ const [e] = x(), [o, i] = m(null), a = (s) => {
1293
1414
  var c;
1294
1415
  const d = (c = s.target.files) == null ? void 0 : c[0];
1295
1416
  if (d) {
1296
- const h = new Image(), g = window.URL.createObjectURL(d);
1297
- h.onload = async () => {
1417
+ const u = new Image(), g = window.URL.createObjectURL(d);
1418
+ u.onload = async () => {
1298
1419
  const k = await t.uploadFile({ file: d });
1299
- i({ url: k, width: h.naturalWidth, height: h.naturalHeight }), window.URL.revokeObjectURL(g);
1300
- }, h.src = g;
1420
+ i({ url: k, width: u.naturalWidth, height: u.naturalHeight }), window.URL.revokeObjectURL(g);
1421
+ }, u.src = g;
1301
1422
  }
1302
1423
  }, l = () => {
1303
- n && !t.isLoading && (e.dispatchCommand(vt, {
1304
- src: n.url,
1305
- altText: `Image: ${n.url}`,
1306
- meta: { width: n.width, height: n.height }
1424
+ o && !t.isLoading && (e.dispatchCommand(Lt, {
1425
+ src: o.url,
1426
+ altText: `Image: ${o.url}`,
1427
+ meta: { width: o.width, height: o.height }
1307
1428
  }), r.onOpenChange(!1));
1308
1429
  };
1309
- return /* @__PURE__ */ u(Qt, { ...r, children: [
1310
- /* @__PURE__ */ o(qe, { children: "Sett inn bilde" }),
1311
- t.isLoading && /* @__PURE__ */ o(pt, {}),
1312
- /* @__PURE__ */ o(
1313
- mt,
1430
+ return /* @__PURE__ */ h(le, { ...r, children: [
1431
+ /* @__PURE__ */ n(sr, { children: "Sett inn bilde" }),
1432
+ t.isLoading && /* @__PURE__ */ n(kt, {}),
1433
+ /* @__PURE__ */ n(
1434
+ bt,
1314
1435
  {
1315
1436
  type: "file",
1316
1437
  accept: "image/*",
@@ -1318,113 +1439,113 @@ const tn = () => /* @__PURE__ */ u(j, { children: [
1318
1439
  disabled: t.isLoading
1319
1440
  }
1320
1441
  ),
1321
- /* @__PURE__ */ u(rt, { children: [
1322
- /* @__PURE__ */ o(L, { onClick: () => r.onOpenChange(!1), children: "Avbryt" }),
1323
- /* @__PURE__ */ o(
1324
- L,
1442
+ /* @__PURE__ */ h(st, { children: [
1443
+ /* @__PURE__ */ n(y, { onClick: () => r.onOpenChange(!1), children: "Avbryt" }),
1444
+ /* @__PURE__ */ n(
1445
+ y,
1325
1446
  {
1326
1447
  variant: "primary",
1327
- disabled: !n || t.isLoading,
1448
+ disabled: !o || t.isLoading,
1328
1449
  onClick: l,
1329
1450
  children: "Sett inn"
1330
1451
  }
1331
1452
  )
1332
1453
  ] })
1333
1454
  ] });
1334
- }, Yn = () => {
1335
- const [t] = x(), { fileUpload: r } = z(), [e, n] = b(!1), i = T(() => {
1336
- t.dispatchCommand(De, {
1455
+ }, mo = () => {
1456
+ const [t] = x(), { fileUpload: r } = H(), [e, o] = m(!1), i = M(() => {
1457
+ t.dispatchCommand(Qe, {
1337
1458
  rows: "3",
1338
1459
  columns: "3",
1339
1460
  includeHeaders: !1
1340
1461
  });
1341
1462
  }, [t]);
1342
- return /* @__PURE__ */ u(j, { children: [
1343
- /* @__PURE__ */ u(
1344
- et,
1463
+ return /* @__PURE__ */ h(F, { children: [
1464
+ /* @__PURE__ */ h(
1465
+ at,
1345
1466
  {
1346
- trigger: /* @__PURE__ */ o(gt, { dropdown: !0, children: "Sett inn" }),
1467
+ trigger: /* @__PURE__ */ n(lt, { dropdown: !0, children: "Sett inn" }),
1347
1468
  side: "bottom",
1348
1469
  align: "end",
1349
1470
  children: [
1350
- /* @__PURE__ */ u(v, { onClick: i, children: [
1351
- /* @__PURE__ */ o(Hr, { size: "1.25rem" }),
1471
+ /* @__PURE__ */ h(T, { onClick: i, children: [
1472
+ /* @__PURE__ */ n(an, { size: "1.25rem" }),
1352
1473
  " Tabell"
1353
1474
  ] }),
1354
- r && /* @__PURE__ */ u(v, { onClick: () => n(!0), children: [
1355
- /* @__PURE__ */ o(tr, { size: "1.25rem" }),
1475
+ r && /* @__PURE__ */ h(T, { onClick: () => o(!0), children: [
1476
+ /* @__PURE__ */ n(fr, { size: "1.25rem" }),
1356
1477
  " Bilde"
1357
1478
  ] })
1358
1479
  ]
1359
1480
  }
1360
1481
  ),
1361
- r && /* @__PURE__ */ o(
1362
- an,
1482
+ r && /* @__PURE__ */ n(
1483
+ yn,
1363
1484
  {
1364
1485
  open: e,
1365
- onOpenChange: n,
1486
+ onOpenChange: o,
1366
1487
  fileUpload: r
1367
1488
  }
1368
1489
  )
1369
1490
  ] });
1370
1491
  };
1371
- function ln(t) {
1492
+ function Sn(t) {
1372
1493
  return f({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "circle", attr: { cx: "256", cy: "256", r: "48" } }, { tag: "circle", attr: { cx: "416", cy: "256", r: "48" } }, { tag: "circle", attr: { cx: "96", cy: "256", r: "48" } }] })(t);
1373
1494
  }
1374
- const qn = () => {
1375
- const [t] = x(), [r, e] = b(null), { hasFocus: n } = z();
1376
- _(() => {
1377
- !n && r && e(null);
1378
- }, [n, r]);
1379
- const { refs: i, floatingStyles: a } = ft({
1495
+ const fo = () => {
1496
+ const [t] = x(), [r, e] = m(null), { hasFocus: o } = H();
1497
+ w(() => {
1498
+ !o && r && e(null);
1499
+ }, [o, r]);
1500
+ const { refs: i, floatingStyles: a } = vt({
1380
1501
  placement: "top-end",
1381
1502
  open: !!r,
1382
1503
  elements: {
1383
1504
  reference: r
1384
1505
  },
1385
- middleware: [Zt({ mainAxis: -20, crossAxis: -2 })]
1506
+ middleware: [ce({ mainAxis: -20, crossAxis: -2 })]
1386
1507
  });
1387
- _(() => t.registerCommand(
1388
- Y,
1508
+ w(() => t.registerCommand(
1509
+ X,
1389
1510
  () => {
1390
- const s = y();
1511
+ const s = _();
1391
1512
  if (N(s)) {
1392
- const d = s.anchor.getNode(), c = Be(d);
1513
+ const d = s.anchor.getNode(), c = Ze(d);
1393
1514
  e(c ? t.getElementByKey(c.getKey()) : null);
1394
1515
  }
1395
1516
  return !1;
1396
1517
  },
1397
- Te
1518
+ q
1398
1519
  ), [t]);
1399
1520
  const l = (s) => () => {
1400
1521
  t.update(() => {
1401
1522
  switch (s) {
1402
1523
  case "add-row-over":
1403
- yt(!1);
1524
+ zt(!1);
1404
1525
  break;
1405
1526
  case "add-row-under":
1406
- yt(!0);
1527
+ zt(!0);
1407
1528
  break;
1408
1529
  case "add-column-left":
1409
- wt(!1);
1530
+ Ot(!1);
1410
1531
  break;
1411
1532
  case "add-column-right":
1412
- wt(!0);
1533
+ Ot(!0);
1413
1534
  break;
1414
1535
  case "delete-row":
1415
- Fe();
1536
+ er();
1416
1537
  break;
1417
1538
  case "delete-column":
1418
- Pe();
1539
+ tr();
1419
1540
  break;
1420
1541
  }
1421
1542
  });
1422
1543
  };
1423
- return r ? /* @__PURE__ */ u(
1424
- et,
1544
+ return r ? /* @__PURE__ */ h(
1545
+ at,
1425
1546
  {
1426
- trigger: /* @__PURE__ */ o(
1427
- L,
1547
+ trigger: /* @__PURE__ */ n(
1548
+ y,
1428
1549
  {
1429
1550
  icon: !0,
1430
1551
  variant: "primary",
@@ -1432,44 +1553,44 @@ const qn = () => {
1432
1553
  ref: i.setFloating,
1433
1554
  style: a,
1434
1555
  css: { padding: "2px", width: "18px", height: "18px" },
1435
- children: /* @__PURE__ */ o(ln, {})
1556
+ children: /* @__PURE__ */ n(Sn, {})
1436
1557
  }
1437
1558
  ),
1438
1559
  children: [
1439
- /* @__PURE__ */ o(B, { onClick: l("add-row-over"), children: "Legg til rad over" }),
1440
- /* @__PURE__ */ o(B, { onClick: l("add-row-under"), children: "Legg til rad under" }),
1441
- /* @__PURE__ */ o(Nt, {}),
1442
- /* @__PURE__ */ o(B, { onClick: l("add-column-left"), children: "Legg til kolonne venstre" }),
1443
- /* @__PURE__ */ o(B, { onClick: l("add-column-right"), children: "Legg til kolonne høyre" }),
1444
- /* @__PURE__ */ o(Nt, {}),
1445
- /* @__PURE__ */ o(B, { onClick: l("delete-row"), children: "Fjern rad" }),
1446
- /* @__PURE__ */ o(B, { onClick: l("delete-column"), children: "Fjern kolonne" })
1560
+ /* @__PURE__ */ n(W, { onClick: l("add-row-over"), children: "Legg til rad over" }),
1561
+ /* @__PURE__ */ n(W, { onClick: l("add-row-under"), children: "Legg til rad under" }),
1562
+ /* @__PURE__ */ n(At, {}),
1563
+ /* @__PURE__ */ n(W, { onClick: l("add-column-left"), children: "Legg til kolonne venstre" }),
1564
+ /* @__PURE__ */ n(W, { onClick: l("add-column-right"), children: "Legg til kolonne høyre" }),
1565
+ /* @__PURE__ */ n(At, {}),
1566
+ /* @__PURE__ */ n(W, { onClick: l("delete-row"), children: "Fjern rad" }),
1567
+ /* @__PURE__ */ n(W, { onClick: l("delete-column"), children: "Fjern kolonne" })
1447
1568
  ]
1448
1569
  }
1449
1570
  ) : null;
1450
1571
  };
1451
- function Tt(t) {
1572
+ function _t(t) {
1452
1573
  let r = t;
1453
- const e = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi, n = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
1454
- return r = String(r).trim(), r.match(e) || r.match(n) ? r : "https://";
1574
+ const e = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi, o = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
1575
+ return r = String(r).trim(), r.match(e) || r.match(o) ? r : "https://";
1455
1576
  }
1456
- function le(t) {
1457
- const r = t.anchor, e = t.focus, n = t.anchor.getNode(), i = t.focus.getNode();
1458
- return n === i ? n : t.isBackward() ? Lt(e) ? n : i : Lt(r) ? n : i;
1577
+ function ke(t) {
1578
+ const r = t.anchor, e = t.focus, o = t.anchor.getNode(), i = t.focus.getNode();
1579
+ return o === i ? o : t.isBackward() ? Rt(e) ? o : i : Rt(r) ? o : i;
1459
1580
  }
1460
- const Jn = (t) => (A.baseURL = t, A), Q = class extends F {
1581
+ const ko = (t) => (B.baseURL = t, B), rt = class extends j {
1461
1582
  static getType() {
1462
1583
  return "rutine_link";
1463
1584
  }
1464
1585
  static clone(r) {
1465
- return new Q(r.__url, {}, r.__key);
1586
+ return new rt(r.__url, {}, r.__key);
1466
1587
  }
1467
1588
  createDOM(r) {
1468
1589
  const e = super.createDOM(r);
1469
1590
  return e.setAttribute("href", this.getURL()), e.setAttribute("target", "_blank"), e.setAttribute("rel", "noopener noreferrer"), e.classList.add("rutine-link"), e;
1470
1591
  }
1471
1592
  static importJSON(r) {
1472
- return se(r.url);
1593
+ return be(r.url);
1473
1594
  }
1474
1595
  exportJSON() {
1475
1596
  return {
@@ -1481,58 +1602,58 @@ const Jn = (t) => (A.baseURL = t, A), Q = class extends F {
1481
1602
  }
1482
1603
  getURL() {
1483
1604
  try {
1484
- return new URL(this.__url, Q.baseURL).toString();
1605
+ return new URL(this.__url, rt.baseURL).toString();
1485
1606
  } catch {
1486
1607
  return "";
1487
1608
  }
1488
1609
  }
1489
1610
  };
1490
- let A = Q;
1491
- O(A, "baseURL", "");
1492
- function se(t) {
1493
- return new A(t);
1611
+ let B = rt;
1612
+ $(B, "baseURL", "");
1613
+ function be(t) {
1614
+ return new B(t);
1494
1615
  }
1495
- function sn(t) {
1496
- return t instanceof A;
1616
+ function Nn(t) {
1617
+ return t instanceof B;
1497
1618
  }
1498
- const cn = ({ onClose: t }) => {
1499
- const [r] = x(), e = T(
1619
+ const En = ({ onClose: t }) => {
1620
+ const [r] = x(), e = M(
1500
1621
  (i) => {
1501
1622
  r.update(() => {
1502
- const a = y();
1623
+ const a = _();
1503
1624
  if (N(a) && a.isCollapsed()) {
1504
- const l = I(i);
1625
+ const l = z(i);
1505
1626
  a.insertNodes([l]);
1506
- const s = Bt();
1507
- s.setTextNodeRange(l, 0, l, i.length), V(s);
1627
+ const s = Gt();
1628
+ s.setTextNodeRange(l, 0, l, i.length), nt(s);
1508
1629
  }
1509
- r.dispatchCommand(tt, Tt(i));
1630
+ r.dispatchCommand(it, _t(i));
1510
1631
  });
1511
1632
  },
1512
1633
  [r]
1513
1634
  );
1514
- return /* @__PURE__ */ u("form", { onSubmit: (i) => {
1635
+ return /* @__PURE__ */ h("form", { onSubmit: (i) => {
1515
1636
  e(i.currentTarget.url.value), t();
1516
1637
  }, children: [
1517
- /* @__PURE__ */ o(mt, { name: "url", label: "URL", type: "url", required: !0 }),
1518
- /* @__PURE__ */ u(rt, { children: [
1519
- /* @__PURE__ */ o(L, { onClick: t, children: "Avbryt" }),
1520
- /* @__PURE__ */ o(L, { type: "submit", variant: "primary", children: "Sett inn" })
1638
+ /* @__PURE__ */ n(bt, { name: "url", label: "URL", type: "url", required: !0 }),
1639
+ /* @__PURE__ */ h(st, { children: [
1640
+ /* @__PURE__ */ n(y, { onClick: t, children: "Avbryt" }),
1641
+ /* @__PURE__ */ n(y, { type: "submit", variant: "primary", children: "Sett inn" })
1521
1642
  ] })
1522
1643
  ] });
1523
- }, dn = ({
1644
+ }, Rn = ({
1524
1645
  onClose: t,
1525
1646
  getDocs: r
1526
1647
  }) => {
1527
- const [e] = x(), [n, i] = b([]), a = r(), l = T(
1648
+ const [e] = x(), [o, i] = m([]), a = r(), l = M(
1528
1649
  (s) => {
1529
1650
  e.update(() => {
1530
- const d = y();
1651
+ const d = _();
1531
1652
  if (N(d)) {
1532
1653
  const c = [];
1533
- for (const [h, g] of s.entries()) {
1534
- const k = se(g.value);
1535
- k.append(I(g.label)), c.push(k), h !== s.length - 1 && c.push(I(" "));
1654
+ for (const [u, g] of s.entries()) {
1655
+ const k = be(g.value);
1656
+ k.append(z(g.label)), c.push(k), u !== s.length - 1 && c.push(z(" "));
1536
1657
  }
1537
1658
  d.insertNodes(c);
1538
1659
  }
@@ -1540,37 +1661,37 @@ const cn = ({ onClose: t }) => {
1540
1661
  },
1541
1662
  [e]
1542
1663
  );
1543
- return /* @__PURE__ */ u(j, { children: [
1544
- /* @__PURE__ */ o(
1545
- Xe,
1664
+ return /* @__PURE__ */ h(F, { children: [
1665
+ /* @__PURE__ */ n(
1666
+ dr,
1546
1667
  {
1547
1668
  isMulti: !0,
1548
1669
  options: a,
1549
1670
  onChange: (s) => i(s)
1550
1671
  }
1551
1672
  ),
1552
- /* @__PURE__ */ u(rt, { children: [
1553
- /* @__PURE__ */ o(L, { onClick: t, children: "Avbryt" }),
1554
- /* @__PURE__ */ o(
1555
- L,
1673
+ /* @__PURE__ */ h(st, { children: [
1674
+ /* @__PURE__ */ n(y, { onClick: t, children: "Avbryt" }),
1675
+ /* @__PURE__ */ n(
1676
+ y,
1556
1677
  {
1557
1678
  variant: "primary",
1558
1679
  onClick: () => {
1559
- l(n), t();
1680
+ l(o), t();
1560
1681
  },
1561
1682
  children: "Sett inn"
1562
1683
  }
1563
1684
  )
1564
1685
  ] })
1565
1686
  ] });
1566
- }, hn = ({
1687
+ }, In = ({
1567
1688
  onClose: t,
1568
1689
  fileUpload: r,
1569
1690
  filePrefix: e
1570
1691
  }) => {
1571
- const [n] = x(), [i, a] = b(null), l = async (d) => {
1572
- var h;
1573
- const c = (h = d.target.files) == null ? void 0 : h[0];
1692
+ const [o] = x(), [i, a] = m(null), l = async (d) => {
1693
+ var u;
1694
+ const c = (u = d.target.files) == null ? void 0 : u[0];
1574
1695
  if (c) {
1575
1696
  const g = await r.uploadFile({ file: c });
1576
1697
  a({
@@ -1578,34 +1699,34 @@ const cn = ({ onClose: t }) => {
1578
1699
  url: e ? `${e}${g}` : g
1579
1700
  });
1580
1701
  }
1581
- }, s = T(() => {
1582
- n.update(() => {
1702
+ }, s = M(() => {
1703
+ o.update(() => {
1583
1704
  if (!i)
1584
1705
  return;
1585
- const d = y();
1706
+ const d = _();
1586
1707
  if (N(d) && d.isCollapsed()) {
1587
- const c = I(i.name);
1708
+ const c = z(i.name);
1588
1709
  d.insertNodes([c]);
1589
- const h = Bt();
1590
- h.setTextNodeRange(c, 0, c, i.name.length), V(h);
1710
+ const u = Gt();
1711
+ u.setTextNodeRange(c, 0, c, i.name.length), nt(u);
1591
1712
  }
1592
- n.dispatchCommand(tt, Tt(i.url));
1713
+ o.dispatchCommand(it, _t(i.url));
1593
1714
  });
1594
- }, [n, i]);
1595
- return /* @__PURE__ */ u(j, { children: [
1596
- r.isLoading && /* @__PURE__ */ o(pt, {}),
1597
- /* @__PURE__ */ o(
1598
- mt,
1715
+ }, [o, i]);
1716
+ return /* @__PURE__ */ h(F, { children: [
1717
+ r.isLoading && /* @__PURE__ */ n(kt, {}),
1718
+ /* @__PURE__ */ n(
1719
+ bt,
1599
1720
  {
1600
1721
  type: "file",
1601
1722
  onChange: l,
1602
1723
  disabled: r.isLoading
1603
1724
  }
1604
1725
  ),
1605
- /* @__PURE__ */ u(rt, { children: [
1606
- /* @__PURE__ */ o(L, { onClick: t, children: "Avbryt" }),
1607
- /* @__PURE__ */ o(
1608
- L,
1726
+ /* @__PURE__ */ h(st, { children: [
1727
+ /* @__PURE__ */ n(y, { onClick: t, children: "Avbryt" }),
1728
+ /* @__PURE__ */ n(
1729
+ y,
1609
1730
  {
1610
1731
  variant: "primary",
1611
1732
  onClick: () => {
@@ -1617,68 +1738,68 @@ const cn = ({ onClose: t }) => {
1617
1738
  )
1618
1739
  ] })
1619
1740
  ] });
1620
- }, un = ({
1741
+ }, On = ({
1621
1742
  open: t,
1622
1743
  onOpenChange: r,
1623
1744
  getDocs: e,
1624
- filePrefix: n
1745
+ filePrefix: o
1625
1746
  }) => {
1626
- const { fileUpload: i } = z(), [a, l] = b("url"), s = () => {
1747
+ const { fileUpload: i } = H(), [a, l] = m("url"), s = () => {
1627
1748
  r(!1);
1628
1749
  };
1629
- return /* @__PURE__ */ u(Qt, { open: t, onOpenChange: r, css: { width: "600px" }, children: [
1630
- /* @__PURE__ */ u(Je, { css: { marginBottom: "$8" }, children: [
1631
- /* @__PURE__ */ o(lt, { active: a === "url", onClick: () => l("url"), children: "URL" }),
1632
- e && /* @__PURE__ */ o(
1633
- lt,
1750
+ return /* @__PURE__ */ h(le, { open: t, onOpenChange: r, css: { width: "600px" }, children: [
1751
+ /* @__PURE__ */ h(cr, { css: { marginBottom: "$8" }, children: [
1752
+ /* @__PURE__ */ n(ut, { active: a === "url", onClick: () => l("url"), children: "URL" }),
1753
+ e && /* @__PURE__ */ n(
1754
+ ut,
1634
1755
  {
1635
1756
  active: a === "rutine",
1636
1757
  onClick: () => l("rutine"),
1637
1758
  children: "Rutine"
1638
1759
  }
1639
1760
  ),
1640
- i && /* @__PURE__ */ o(lt, { active: a === "file", onClick: () => l("file"), children: "Fil" })
1761
+ i && /* @__PURE__ */ n(ut, { active: a === "file", onClick: () => l("file"), children: "Fil" })
1641
1762
  ] }),
1642
- a === "url" && /* @__PURE__ */ o(cn, { onClose: s }),
1643
- a === "rutine" && e && /* @__PURE__ */ o(dn, { onClose: s, getDocs: e }),
1644
- a === "file" && i && /* @__PURE__ */ o(
1645
- hn,
1763
+ a === "url" && /* @__PURE__ */ n(En, { onClose: s }),
1764
+ a === "rutine" && e && /* @__PURE__ */ n(Rn, { onClose: s, getDocs: e }),
1765
+ a === "file" && i && /* @__PURE__ */ n(
1766
+ In,
1646
1767
  {
1647
1768
  onClose: s,
1648
1769
  fileUpload: i,
1649
- filePrefix: n
1770
+ filePrefix: o
1650
1771
  }
1651
1772
  )
1652
1773
  ] });
1653
- }, Xn = ({
1774
+ }, bo = ({
1654
1775
  getDocs: t,
1655
1776
  filePrefix: r
1656
1777
  }) => {
1657
- const [e] = x(), [n, i] = b(!1), [a, l] = b(!1), s = T(() => {
1658
- const d = y();
1778
+ const [e] = x(), [o, i] = m(!1), [a, l] = m(!1), s = M(() => {
1779
+ const d = _();
1659
1780
  if (N(d)) {
1660
- const c = le(d), h = c.getParent();
1661
- i(J(h) || J(c));
1781
+ const c = ke(d), u = c.getParent();
1782
+ i(Z(u) || Z(c));
1662
1783
  }
1663
1784
  }, []);
1664
- return _(() => e.registerCommand(
1665
- Y,
1785
+ return w(() => e.registerCommand(
1786
+ X,
1666
1787
  () => (s(), !1),
1667
- ct
1668
- ), [e, s]), /* @__PURE__ */ u(Jt, { type: "single", value: n ? "link" : "", children: [
1669
- /* @__PURE__ */ o(
1670
- P,
1788
+ q
1789
+ ), [e, s]), /* @__PURE__ */ h(tt, { type: "single", value: o ? "link" : "", children: [
1790
+ /* @__PURE__ */ n(
1791
+ O,
1671
1792
  {
1672
1793
  onClick: () => {
1673
- n ? e.dispatchCommand(tt, null) : l(!0);
1794
+ o ? e.dispatchCommand(it, null) : l(!0);
1674
1795
  },
1675
1796
  title: "Lenke",
1676
1797
  value: "link",
1677
- children: /* @__PURE__ */ o(zr, { size: "1.25rem" })
1798
+ children: /* @__PURE__ */ n(Vr, { size: "1.25rem" })
1678
1799
  }
1679
1800
  ),
1680
- /* @__PURE__ */ o(
1681
- un,
1801
+ /* @__PURE__ */ n(
1802
+ On,
1682
1803
  {
1683
1804
  open: a,
1684
1805
  onOpenChange: l,
@@ -1687,67 +1808,67 @@ const cn = ({ onClose: t }) => {
1687
1808
  }
1688
1809
  )
1689
1810
  ] });
1690
- }, Qn = () => {
1691
- const [t] = x(), r = q(null), [e, n] = b(null), [i, a] = b(""), { hasFocus: l } = z();
1692
- _(() => {
1811
+ }, vo = () => {
1812
+ const [t] = x(), r = V(null), [e, o] = m(null), [i, a] = m(""), { hasFocus: l } = H();
1813
+ w(() => {
1693
1814
  e ? t.update(() => {
1694
1815
  a(e.getURL());
1695
1816
  }) : a("");
1696
1817
  }, [t, e]);
1697
- const s = !!(e && i && l), { refs: d, floatingStyles: c, context: h } = ft({
1818
+ const s = !!(e && i && l), { refs: d, floatingStyles: c, context: u } = vt({
1698
1819
  placement: "top",
1699
1820
  strategy: "fixed",
1700
1821
  open: s,
1701
- whileElementsMounted: Vt,
1822
+ whileElementsMounted: se,
1702
1823
  elements: {
1703
1824
  reference: r.current
1704
1825
  },
1705
- middleware: [sr()]
1706
- }), { getFloatingProps: g } = te([
1707
- ee(h),
1708
- cr(h)
1709
- ]), k = T(() => {
1710
- var m;
1711
- const M = y();
1712
- if (N(M)) {
1713
- const C = le(M), p = C.getParent();
1714
- let D = null;
1715
- if (J(p) ? D = p : J(C) && (D = C), D) {
1716
- const nt = window.getSelection(), _t = t.getRootElement();
1717
- M !== null && nt !== null && _t !== null && _t.contains(nt.anchorNode) && t.isEditable() && (r.current = ((m = nt.focusNode) == null ? void 0 : m.parentElement) ?? null);
1826
+ middleware: [Lr()]
1827
+ }), { getFloatingProps: g } = de([
1828
+ he(u),
1829
+ _r(u)
1830
+ ]), k = M(() => {
1831
+ var p;
1832
+ const b = _();
1833
+ if (N(b)) {
1834
+ const C = ke(b), L = C.getParent();
1835
+ let I = null;
1836
+ if (Z(L) ? I = L : Z(C) && (I = C), I) {
1837
+ const J = window.getSelection(), Q = t.getRootElement();
1838
+ b !== null && J !== null && Q !== null && Q.contains(J.anchorNode) && t.isEditable() && (r.current = ((p = J.focusNode) == null ? void 0 : p.parentElement) ?? null);
1718
1839
  }
1719
- n(D);
1840
+ o(I);
1720
1841
  }
1721
- }, [t]), S = T(() => {
1722
- e && sn(e) && t.update(() => {
1842
+ }, [t]), E = M(() => {
1843
+ e && Nn(e) && t.update(() => {
1723
1844
  e.remove();
1724
- }), t.dispatchCommand(tt, null);
1845
+ }), t.dispatchCommand(it, null);
1725
1846
  }, [t, e]);
1726
- if (_(() => {
1847
+ if (w(() => {
1727
1848
  t.getEditorState().read(() => {
1728
1849
  k();
1729
1850
  });
1730
- }, [t, k]), _(() => Z(
1731
- t.registerUpdateListener(({ editorState: M }) => {
1732
- M.read(() => {
1851
+ }, [t, k]), w(() => ot(
1852
+ t.registerUpdateListener(({ editorState: b }) => {
1853
+ b.read(() => {
1733
1854
  k();
1734
1855
  });
1735
1856
  }),
1736
1857
  t.registerCommand(
1737
- Y,
1738
- () => (k(), !0),
1739
- R
1858
+ X,
1859
+ () => (k(), !1),
1860
+ q
1740
1861
  ),
1741
1862
  t.registerCommand(
1742
- Dt,
1743
- () => e ? (n(null), !0) : !1,
1744
- _e
1863
+ Kt,
1864
+ () => e ? (o(null), !0) : !1,
1865
+ Ae
1745
1866
  )
1746
1867
  ), [t, k, e]), !s)
1747
1868
  return null;
1748
- const E = Tt(i);
1749
- return /* @__PURE__ */ o(re, { children: /* @__PURE__ */ u(
1750
- Xt,
1869
+ const R = _t(i);
1870
+ return /* @__PURE__ */ n(ue, { children: /* @__PURE__ */ h(
1871
+ ae,
1751
1872
  {
1752
1873
  ref: d.setFloating,
1753
1874
  css: {
@@ -1760,8 +1881,8 @@ const cn = ({ onClose: t }) => {
1760
1881
  style: c,
1761
1882
  ...g(),
1762
1883
  children: [
1763
- /* @__PURE__ */ o(
1764
- U,
1884
+ /* @__PURE__ */ n(
1885
+ P,
1765
1886
  {
1766
1887
  as: "a",
1767
1888
  css: {
@@ -1771,51 +1892,51 @@ const cn = ({ onClose: t }) => {
1771
1892
  textOverflow: "ellipsis",
1772
1893
  marginRight: "$4"
1773
1894
  },
1774
- href: E,
1775
- title: E,
1895
+ href: R,
1896
+ title: R,
1776
1897
  target: "_blank",
1777
1898
  rel: "noreferrer",
1778
1899
  children: i
1779
1900
  }
1780
1901
  ),
1781
- /* @__PURE__ */ o(L, { color: "danger", icon: !0, size: "sm", onClick: S, children: /* @__PURE__ */ o(er, { size: 24 }) })
1902
+ /* @__PURE__ */ n(y, { color: "danger", icon: !0, size: "sm", onClick: E, children: /* @__PURE__ */ n(kr, { size: 24 }) })
1782
1903
  ]
1783
1904
  }
1784
1905
  ) });
1785
- }, Vn = () => {
1786
- const [t] = kt();
1787
- return /* @__PURE__ */ u(
1788
- et,
1906
+ }, Co = () => {
1907
+ const [t] = Ct();
1908
+ return /* @__PURE__ */ h(
1909
+ at,
1789
1910
  {
1790
1911
  align: "end",
1791
- trigger: /* @__PURE__ */ o(gt, { dropdown: !0, children: /* @__PURE__ */ o(St, { size: "1.25rem" }) }),
1912
+ trigger: /* @__PURE__ */ n(lt, { dropdown: !0, children: /* @__PURE__ */ n(Dt, { size: "1.25rem" }) }),
1792
1913
  children: [
1793
- /* @__PURE__ */ u(
1794
- v,
1914
+ /* @__PURE__ */ h(
1915
+ T,
1795
1916
  {
1796
- onClick: () => t.dispatchCommand(it, "left"),
1917
+ onClick: () => t.dispatchCommand(dt, "left"),
1797
1918
  children: [
1798
- /* @__PURE__ */ o(St, { size: "1.25rem" }),
1919
+ /* @__PURE__ */ n(Dt, { size: "1.25rem" }),
1799
1920
  "Venstre"
1800
1921
  ]
1801
1922
  }
1802
1923
  ),
1803
- /* @__PURE__ */ u(
1804
- v,
1924
+ /* @__PURE__ */ h(
1925
+ T,
1805
1926
  {
1806
- onClick: () => t.dispatchCommand(it, "center"),
1927
+ onClick: () => t.dispatchCommand(dt, "center"),
1807
1928
  children: [
1808
- /* @__PURE__ */ o(_r, { size: "1.25rem" }),
1929
+ /* @__PURE__ */ n(Pr, { size: "1.25rem" }),
1809
1930
  "Midt"
1810
1931
  ]
1811
1932
  }
1812
1933
  ),
1813
- /* @__PURE__ */ u(
1814
- v,
1934
+ /* @__PURE__ */ h(
1935
+ T,
1815
1936
  {
1816
- onClick: () => t.dispatchCommand(it, "right"),
1937
+ onClick: () => t.dispatchCommand(dt, "right"),
1817
1938
  children: [
1818
- /* @__PURE__ */ o(Lr, { size: "1.25rem" }),
1939
+ /* @__PURE__ */ n(Fr, { size: "1.25rem" }),
1819
1940
  "Høyre"
1820
1941
  ]
1821
1942
  }
@@ -1823,21 +1944,21 @@ const cn = ({ onClose: t }) => {
1823
1944
  ]
1824
1945
  }
1825
1946
  );
1826
- }, Ot = ["image/"], Zn = () => {
1827
- const [t] = kt(), { fileUpload: r } = z();
1828
- return _(() => t.registerCommand(
1829
- $e,
1947
+ }, Ht = ["image/"], Mo = () => {
1948
+ const [t] = Ct(), { fileUpload: r } = H();
1949
+ return w(() => t.registerCommand(
1950
+ Ve,
1830
1951
  (e) => ((async () => {
1831
- const n = await Ne(
1952
+ const o = await We(
1832
1953
  e,
1833
- [Ot].flatMap((i) => i)
1954
+ [Ht].flatMap((i) => i)
1834
1955
  );
1835
- for (const { file: i, result: a } of n)
1836
- if (Se(i, Ot)) {
1956
+ for (const { file: i, result: a } of o)
1957
+ if (je(i, Ht)) {
1837
1958
  let l = a;
1838
1959
  const s = new Image(), d = window.URL.createObjectURL(i);
1839
1960
  s.onload = async () => {
1840
- r && (l = await r.uploadFile({ file: i })), t.dispatchCommand(vt, {
1961
+ r && (l = await r.uploadFile({ file: i })), t.dispatchCommand(Lt, {
1841
1962
  src: l,
1842
1963
  altText: i.name,
1843
1964
  meta: { width: s.naturalWidth, height: s.naturalHeight }
@@ -1845,39 +1966,39 @@ const cn = ({ onClose: t }) => {
1845
1966
  }, s.src = d;
1846
1967
  }
1847
1968
  })(), !0),
1848
- R
1969
+ D
1849
1970
  ), [t, r]), null;
1850
1971
  };
1851
1972
  export {
1852
- Ct as $createImageNode,
1853
- se as $createRutineLinkNode,
1854
- Hn as $getNodesOfTypes,
1855
- Un as $isImageNode,
1856
- sn as $isRutineLinkNode,
1857
- Vn as AlignToolbarDropdown,
1858
- Zn as DragDropPastePlugin,
1859
- qr as FloatingToolbar,
1860
- $ as ImageNode,
1861
- Yn as InsertSelector,
1862
- Qn as LinkEditPlugin,
1863
- X as LinkTargetNode,
1864
- Xn as LinkToolbarButton,
1865
- Kn as RichTextEditor,
1866
- Jr as RichTextToolbar,
1867
- A as RutineLinkNode,
1868
- Jn as RutineLinkNodeInit,
1869
- qn as TableEditPlugin,
1870
- br as clearEditorState,
1871
- Wn as defaultNodes,
1872
- jn as defaultViewNodes,
1873
- kr as isEditorState,
1874
- Mt as isJSON,
1875
- oe as richTextContext,
1876
- Gn as richTextCss,
1877
- on as richTextStyleObj,
1878
- Mr as setStateFromPlainText,
1879
- Pn as stateToHTML,
1880
- Fn as syncStateToHTML,
1881
- Cr as useHasFocusWithin,
1882
- z as useRichTextContext
1973
+ xt as $createImageNode,
1974
+ be as $createRutineLinkNode,
1975
+ so as $getNodesOfTypes,
1976
+ co as $isImageNode,
1977
+ Nn as $isRutineLinkNode,
1978
+ Co as AlignToolbarDropdown,
1979
+ Mo as DragDropPastePlugin,
1980
+ fn as FloatingToolbar,
1981
+ U as ImageNode,
1982
+ mo as InsertSelector,
1983
+ vo as LinkEditPlugin,
1984
+ et as LinkTargetNode,
1985
+ bo as LinkToolbarButton,
1986
+ go as RichTextEditor,
1987
+ kn as RichTextToolbar,
1988
+ B as RutineLinkNode,
1989
+ ko as RutineLinkNodeInit,
1990
+ fo as TableEditPlugin,
1991
+ zr as clearEditorState,
1992
+ ho as defaultNodes,
1993
+ uo as defaultViewNodes,
1994
+ Or as isEditorState,
1995
+ Tt as isJSON,
1996
+ pe as richTextContext,
1997
+ po as richTextCss,
1998
+ wn as richTextStyleObj,
1999
+ $r as setStateFromPlainText,
2000
+ ao as stateToHTML,
2001
+ lo as syncStateToHTML,
2002
+ Ar as useHasFocusWithin,
2003
+ H as useRichTextContext
1883
2004
  };