@uva-glass/component-library 3.0.8 → 3.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Lexical.prod-BqkvGy5o.js +4879 -0
- package/dist/Lexical.prod-BqkvGy5o.js.map +1 -0
- package/dist/{LexicalClipboard.prod-D9CvlqSO.js → LexicalClipboard.prod-BSR9LEVL.js} +39 -39
- package/dist/{LexicalClipboard.prod-D9CvlqSO.js.map → LexicalClipboard.prod-BSR9LEVL.js.map} +1 -1
- package/dist/{LexicalLink.prod-__08uNAw.js → LexicalLink.prod-D-CG9yYv.js} +44 -44
- package/dist/LexicalLink.prod-D-CG9yYv.js.map +1 -0
- package/dist/LexicalList.prod-CDTuG8cz.js +600 -0
- package/dist/LexicalList.prod-CDTuG8cz.js.map +1 -0
- package/dist/LexicalSelection.prod-BxYY0fGG.js +86 -0
- package/dist/LexicalSelection.prod-BxYY0fGG.js.map +1 -0
- package/dist/LexicalTable.prod-Ckge-lZb.js +1515 -0
- package/dist/LexicalTable.prod-Ckge-lZb.js.map +1 -0
- package/dist/{LexicalUtils.prod-BYrJ1Iih.js → LexicalUtils.prod-CIQUUsvA.js} +44 -44
- package/dist/LexicalUtils.prod-CIQUUsvA.js.map +1 -0
- package/dist/{TablePlugin-BHY7_5Z8.js → TablePlugin-BBgBJKsb.js} +41 -41
- package/dist/{TablePlugin-BHY7_5Z8.js.map → TablePlugin-BBgBJKsb.js.map} +1 -1
- package/dist/assets/VarIndicator.css +1 -0
- package/dist/components/Accordion/Accordion.stories.d.ts +2 -2
- package/dist/components/Accordion/Accordion.test.js +3 -3
- package/dist/components/AccordionCard/AccordionCard.stories.d.ts +1 -1
- package/dist/components/AccordionCard/AccordionCard.test.js +3 -3
- package/dist/components/ActionList/ActionList.stories.d.ts +1 -1
- package/dist/components/ActionList/ActionList.test.js +3 -3
- package/dist/components/AppStatusBar/AppStatusBar.stories.d.ts +1 -1
- package/dist/components/AppStatusBar/AppStatusBar.test.js +2 -2
- package/dist/components/Attention/Attention.stories.d.ts +1 -1
- package/dist/components/Attention/Attention.test.js +2 -2
- package/dist/components/Backdrop/Backdrop.stories.d.ts +1 -1
- package/dist/components/Backdrop/Backdrop.test.js +2 -2
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +1 -1
- package/dist/components/Buttons/Button.stories.d.ts +2 -2
- package/dist/components/Buttons/Button.stories.js +1 -1
- package/dist/components/Buttons/Button.test.js +2 -2
- package/dist/components/Buttons/LinkButton.stories.d.ts +2 -2
- package/dist/components/Buttons/LinkButton.stories.js +1 -1
- package/dist/components/Buttons/LinkButton.test.js +2 -2
- package/dist/components/Buttons/MenuButton.stories.d.ts +3 -3
- package/dist/components/Buttons/MenuButton.stories.js +1 -1
- package/dist/components/Buttons/MenuButton.test.js +2 -2
- package/dist/components/Card/Card.stories.d.ts +3 -3
- package/dist/components/Checkbox/Checkbox.stories.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.stories.js +1 -1
- package/dist/components/CheckboxButton/CheckboxButton.stories.d.ts +1 -1
- package/dist/components/CheckboxButton/CheckboxButton.stories.js +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.d.ts +1 -1
- package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.js +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.d.ts +1 -1
- package/dist/components/CheckboxTree/CheckboxTree.stories.js +109 -87
- package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
- package/dist/components/Chip/Chip.stories.d.ts +2 -2
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/Drawer/Drawer.stories.d.ts +2 -2
- package/dist/components/Drawer/Drawer.stories.js +1 -1
- package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.d.ts +1 -1
- package/dist/components/FeedbackBox/FeedbackBox.stories.d.ts +1 -1
- package/dist/components/FieldHint/FieldHint.stories.d.ts +2 -2
- package/dist/components/Fieldset/Fieldset.stories.d.ts +2 -2
- package/dist/components/FormField/FormField.stories.d.ts +1 -1
- package/dist/components/FormInput/FormInput.js +1 -1
- package/dist/components/FormInput/FormInput.stories.d.ts +2 -2
- package/dist/components/FormInput/FormInput.stories.js +1 -1
- package/dist/components/GridRow/GridRow.stories.d.ts +2 -2
- package/dist/components/HorizontalList/HorizontalList.stories.d.ts +2 -2
- package/dist/components/Icon/Icon.stories.d.ts +1 -1
- package/dist/components/Icon/icons/index.d.ts +30 -0
- package/dist/components/Icon/icons/index.js +160 -135
- package/dist/components/Icon/icons/index.js.map +1 -1
- package/dist/components/IconButton/IconButton.stories.d.ts +1 -1
- package/dist/components/IconButton/IconButton.stories.js +1 -1
- package/dist/components/InfoMessage/InfoMessage.stories.d.ts +1 -1
- package/dist/components/Input/Input.stories.d.ts +4 -4
- package/dist/components/InputField/InputField.stories.d.ts +3 -3
- package/dist/components/InputField/InputField.stories.js +2 -2
- package/dist/components/Label/Label.stories.d.ts +2 -2
- package/dist/components/Label/Label.test.js +2 -2
- package/dist/components/MenuLink/MenuLink.stories.d.ts +2 -2
- package/dist/components/MetaDataList/MetaDataList.stories.d.ts +1 -1
- package/dist/components/ModalDialog/ModalDialog.stories.d.ts +3 -3
- package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.stories.d.ts +3 -3
- package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
- package/dist/components/MultiSelect/components/MultiSelectHeader.js +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.d.ts +1 -1
- package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +4 -4
- package/dist/components/OverlayStepBar/OverlayStepBar.js +1 -1
- package/dist/components/OverlayStepBar/OverlayStepBar.stories.d.ts +1 -1
- package/dist/components/PageOverlay/PageOverlay.stories.d.ts +3 -3
- package/dist/components/PeriodSelector/PeriodSelector.js +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.d.ts +1 -1
- package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
- package/dist/components/Periods/Periods.stories.d.ts +1 -1
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.d.ts +3 -3
- package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +2 -2
- package/dist/components/RadioButton/RadioButton.stories.d.ts +1 -1
- package/dist/components/Repeater/Repeater.stories.d.ts +1 -1
- package/dist/components/RteEditor/EditorHeader/EditorHeader.js +1 -1
- package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js +5 -5
- package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +4 -4
- package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -2
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js +1 -1
- package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +45 -45
- package/dist/components/RteEditor/Plugins/LinkPlugin/helpers.js +1 -1
- package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js +27 -27
- package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js +10 -10
- package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +1 -1
- package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +3 -3
- package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js +19 -19
- package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
- package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +9 -9
- package/dist/components/RteEditor/Plugins/index.js +1 -1
- package/dist/components/RteEditor/RteEditor.js +259 -259
- package/dist/components/RteEditor/RteEditor.js.map +1 -1
- package/dist/components/RteEditor/RteEditor.stories.d.ts +1 -1
- package/dist/components/RteEditor/helpers.js +12 -12
- package/dist/components/SectionNotification/SectionNotification.stories.d.ts +1 -1
- package/dist/components/SelectListbox/SelectListBox.stories.d.ts +2 -2
- package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
- package/dist/components/Sortable/Sortable.stories.d.ts +3 -3
- package/dist/components/Sortable/Sortable.stories.js +7 -7
- package/dist/components/Spinner/Spinner.stories.d.ts +1 -1
- package/dist/components/StatusPill/StatusPill.stories.d.ts +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.d.ts +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +5 -5
- package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
- package/dist/components/VarIndicator/VarIndicator.d.ts +9 -0
- package/dist/components/VarIndicator/VarIndicator.js +32 -0
- package/dist/components/VarIndicator/VarIndicator.js.map +1 -0
- package/dist/components/VarIndicator/VarIndicator.stories.d.ts +5 -0
- package/dist/components/VarIndicator/VarIndicator.stories.js +30 -0
- package/dist/components/VarIndicator/VarIndicator.stories.js.map +1 -0
- package/dist/components/VarIndicator/VarIndicator.test.d.ts +0 -0
- package/dist/components/VarIndicator/VarIndicator.test.js +58 -0
- package/dist/components/VarIndicator/VarIndicator.test.js.map +1 -0
- package/dist/components/VarIndicator/index.d.ts +1 -0
- package/dist/components/VarIndicator/index.js +5 -0
- package/dist/components/VarIndicator/index.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +32 -30
- package/dist/components/index.js.map +1 -1
- package/dist/{helpers-Cgw7V6LR.js → helpers-CzeCSkV-.js} +42 -42
- package/dist/{helpers-Cgw7V6LR.js.map → helpers-CzeCSkV-.js.map} +1 -1
- package/dist/index-BldK5xU9.js +9513 -0
- package/dist/index-BldK5xU9.js.map +1 -0
- package/dist/{index-OJvb7CGo.js → index-DMVXQIB9.js} +2 -2
- package/dist/{index-OJvb7CGo.js.map → index-DMVXQIB9.js.map} +1 -1
- package/dist/index-DpyOH4wL.js +14735 -0
- package/dist/index-DpyOH4wL.js.map +1 -0
- package/dist/{index-BqHyOZsF.js → index-Z7qwJmRM.js} +2 -2
- package/dist/{index-BqHyOZsF.js.map → index-Z7qwJmRM.js.map} +1 -1
- package/dist/index.js +32 -30
- package/dist/index.js.map +1 -1
- package/dist/{react.esm-BZoQ2TxA.js → react.esm-BOUd0cvD.js} +3 -3
- package/dist/{react.esm-BZoQ2TxA.js.map → react.esm-BOUd0cvD.js.map} +1 -1
- package/dist/setupTests.js +1 -1
- package/dist/storybook__react.d.js +8528 -537
- package/dist/storybook__react.d.js.map +1 -1
- package/dist/{test-utils-CTqdUiUm.js → test-utils-uaSbIYda.js} +2 -2
- package/dist/{test-utils-CTqdUiUm.js.map → test-utils-uaSbIYda.js.map} +1 -1
- package/package.json +24 -24
- package/dist/Lexical.prod-D0woeN3R.js +0 -4770
- package/dist/Lexical.prod-D0woeN3R.js.map +0 -1
- package/dist/LexicalLink.prod-__08uNAw.js.map +0 -1
- package/dist/LexicalList.prod-BgI8r9BS.js +0 -579
- package/dist/LexicalList.prod-BgI8r9BS.js.map +0 -1
- package/dist/LexicalSelection.prod-B-SXpOS9.js +0 -86
- package/dist/LexicalSelection.prod-B-SXpOS9.js.map +0 -1
- package/dist/LexicalTable.prod-DJWDvnB3.js +0 -1494
- package/dist/LexicalTable.prod-DJWDvnB3.js.map +0 -1
- package/dist/LexicalUtils.prod-BYrJ1Iih.js.map +0 -1
- package/dist/index-2mUSc_Ki.js +0 -8
- package/dist/index-2mUSc_Ki.js.map +0 -1
- package/dist/index-CcK2jjMp.js +0 -23343
- package/dist/index-CcK2jjMp.js.map +0 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { ac as P, a1 as S, d as p, a0 as _, ad as k, W as v, ae as h, N as x, h as I } from "./Lexical.prod-BqkvGy5o.js";
|
|
2
|
+
function T(e) {
|
|
3
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
+
}
|
|
5
|
+
T(function(e) {
|
|
6
|
+
const t = new URL("https://lexical.dev/docs/error"), n = new URLSearchParams();
|
|
7
|
+
n.append("code", e);
|
|
8
|
+
for (let s = 1; s < arguments.length; s++) n.append("v", arguments[s]);
|
|
9
|
+
throw t.search = n.toString(), Error(`Minified Lexical error #${e}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`);
|
|
10
|
+
});
|
|
11
|
+
const E = /* @__PURE__ */ new Map();
|
|
12
|
+
function K(e) {
|
|
13
|
+
const t = {};
|
|
14
|
+
if (!e) return t;
|
|
15
|
+
const n = e.split(";");
|
|
16
|
+
for (const s of n) if (s !== "") {
|
|
17
|
+
const [a, o] = s.split(/:([^]+)/);
|
|
18
|
+
a && o && (t[a.trim()] = o.trim());
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
}
|
|
22
|
+
function U(e, t) {
|
|
23
|
+
const n = e.getStartEndPoints();
|
|
24
|
+
if (t.isSelected(e) && !t.isSegmented() && !t.isToken() && n !== null) {
|
|
25
|
+
const [s, a] = n, o = e.isBackward(), r = s.getNode(), i = a.getNode(), c = t.is(r), u = t.is(i);
|
|
26
|
+
if (c || u) {
|
|
27
|
+
const [f, l] = k(e), m = r.is(i), w = t.is(o ? i : r), N = t.is(o ? r : i);
|
|
28
|
+
let d, g = 0;
|
|
29
|
+
return m ? (g = f > l ? l : f, d = f > l ? f : l) : w ? (g = o ? l : f, d = void 0) : N && (g = 0, d = o ? f : l), t.__text = t.__text.slice(g, d), t;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return t;
|
|
33
|
+
}
|
|
34
|
+
function B(e) {
|
|
35
|
+
const t = e.getStyle(), n = K(t);
|
|
36
|
+
E.set(t, n);
|
|
37
|
+
}
|
|
38
|
+
function M(e, t) {
|
|
39
|
+
const n = e.getFormatType(), s = e.getIndent();
|
|
40
|
+
n !== t.getFormatType() && t.setFormat(n), s !== t.getIndent() && t.setIndent(s);
|
|
41
|
+
}
|
|
42
|
+
function R(e, t, n = M) {
|
|
43
|
+
if (e === null) return;
|
|
44
|
+
const s = e.getStartEndPoints(), a = /* @__PURE__ */ new Map();
|
|
45
|
+
let o = null;
|
|
46
|
+
if (s) {
|
|
47
|
+
const [r, i] = s;
|
|
48
|
+
o = v(), o.anchor.set(r.key, r.offset, r.type), o.focus.set(i.key, i.offset, i.type);
|
|
49
|
+
const c = y(r.getNode(), h), u = y(i.getNode(), h);
|
|
50
|
+
p(c) && a.set(c.getKey(), c), p(u) && a.set(u.getKey(), u);
|
|
51
|
+
}
|
|
52
|
+
for (const r of e.getNodes()) p(r) && h(r) && a.set(r.getKey(), r);
|
|
53
|
+
for (const [r, i] of a) {
|
|
54
|
+
const c = t();
|
|
55
|
+
n(i, c), i.replace(c, !0), o && (r === o.anchor.key && o.anchor.set(c.getKey(), o.anchor.offset, o.anchor.type), r === o.focus.key && o.focus.set(c.getKey(), o.focus.offset, o.focus.type));
|
|
56
|
+
}
|
|
57
|
+
o && e.is(x()) && I(o);
|
|
58
|
+
}
|
|
59
|
+
function W(e, t) {
|
|
60
|
+
const n = P(e.focus, t);
|
|
61
|
+
return S(n) && !n.isIsolated() || p(n) && !n.isInline() && !n.canBeEmpty();
|
|
62
|
+
}
|
|
63
|
+
function O(e, t, n, s) {
|
|
64
|
+
e.modify(t ? "extend" : "move", n, s);
|
|
65
|
+
}
|
|
66
|
+
function F(e) {
|
|
67
|
+
const t = e.anchor.getNode();
|
|
68
|
+
return (_(t) ? t : t.getParentOrThrow()).getDirection() === "rtl";
|
|
69
|
+
}
|
|
70
|
+
function $(e, t, n) {
|
|
71
|
+
const s = F(e);
|
|
72
|
+
O(e, t, n ? !s : s, "character");
|
|
73
|
+
}
|
|
74
|
+
function y(e, t) {
|
|
75
|
+
let n = e;
|
|
76
|
+
for (; n !== null && n.getParent() !== null && !t(n); ) n = n.getParentOrThrow();
|
|
77
|
+
return t(n) ? n : null;
|
|
78
|
+
}
|
|
79
|
+
export {
|
|
80
|
+
U as I,
|
|
81
|
+
B as O,
|
|
82
|
+
W as U,
|
|
83
|
+
$ as X,
|
|
84
|
+
R as _
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=LexicalSelection.prod-BxYY0fGG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LexicalSelection.prod-BxYY0fGG.js","sources":["../node_modules/@lexical/selection/LexicalSelection.prod.mjs"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport{$isTextNode as e,$getCharacterOffsets as t,$isElementNode as n,$isRootNode as o,$getNodeByKey as l,$getPreviousSelection as r,$createTextNode as s,$isRangeSelection as i,$getSelection as c,$caretRangeFromSelection as f,$isTokenOrSegmented as u,$createRangeSelection as a,INTERNAL_$isBlock as g,$setSelection as d,$isRootOrShadowRoot as p,$hasAncestor as h,$isLeafNode as y,$getAdjacentNode as m,$isDecoratorNode as S}from\"lexical\";export{$cloneWithProperties,$selectAll}from\"lexical\";function T(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\"default\")?e.default:e}var x=T((function(e){const t=new URL(\"https://lexical.dev/docs/error\"),n=new URLSearchParams;n.append(\"code\",e);for(let e=1;e<arguments.length;e++)n.append(\"v\",arguments[e]);throw t.search=n.toString(),Error(`Minified Lexical error #${e}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const v=new Map;function w(e){let t=e;for(;null!=t;){if(t.nodeType===Node.TEXT_NODE)return t;t=t.firstChild}return null}function N(e){const t=e.parentNode;if(null==t)throw new Error(\"Should never happen\");return[t,Array.from(t.childNodes).indexOf(e)]}function C(t,n,o,l,r){const s=n.getKey(),i=l.getKey(),c=document.createRange();let f=t.getElementByKey(s),u=t.getElementByKey(i),a=o,g=r;if(e(n)&&(f=w(f)),e(l)&&(u=w(u)),void 0===n||void 0===l||null===f||null===u)return null;\"BR\"===f.nodeName&&([f,a]=N(f)),\"BR\"===u.nodeName&&([u,g]=N(u));const d=f.firstChild;f===u&&null!=d&&\"BR\"===d.nodeName&&0===a&&0===g&&(g=1);try{c.setStart(f,a),c.setEnd(u,g)}catch(e){return null}return!c.collapsed||a===g&&s===i||(c.setStart(u,g),c.setEnd(f,a)),c}function P(e,t){const n=e.getRootElement();if(null===n)return[];const o=n.getBoundingClientRect(),l=getComputedStyle(n),r=parseFloat(l.paddingLeft)+parseFloat(l.paddingRight),s=Array.from(t.getClientRects());let i,c=s.length;s.sort(((e,t)=>{const n=e.top-t.top;return Math.abs(n)<=3?e.left-t.left:n}));for(let e=0;e<c;e++){const t=s[e],n=i&&i.top<=t.top&&i.top+i.height>t.top&&i.left+i.width>t.left,l=t.width+r===o.width;n||l?(s.splice(e--,1),c--):i=t}return s}function E(e){const t={};if(!e)return t;const n=e.split(\";\");for(const e of n)if(\"\"!==e){const[n,o]=e.split(/:([^]+)/);n&&o&&(t[n.trim()]=o.trim())}return t}function K(e){let t=v.get(e);return void 0===t&&(t=E(e),v.set(e,t)),t}function k(e){let t=\"\";for(const n in e)n&&(t+=`${n}: ${e[n]};`);return t}function I(e,n){const o=e.getStartEndPoints();if(n.isSelected(e)&&!n.isSegmented()&&!n.isToken()&&null!==o){const[l,r]=o,s=e.isBackward(),i=l.getNode(),c=r.getNode(),f=n.is(i),u=n.is(c);if(f||u){const[o,l]=t(e),r=i.is(c),f=n.is(s?c:i),u=n.is(s?i:c);let a,g=0;if(r)g=o>l?l:o,a=o>l?o:l;else if(f){g=s?l:o,a=void 0}else if(u){g=0,a=s?o:l}return n.__text=n.__text.slice(g,a),n}}return n}function B(e){if(\"text\"===e.type)return e.offset===e.getNode().getTextContentSize();const t=e.getNode();return n(t)||x(177),e.offset===t.getChildrenSize()}function F(t,c,f){let u=c.getNode(),a=f;if(n(u)){const e=u.getDescendantByIndex(c.offset);null!==e&&(u=e)}for(;a>0&&null!==u;){if(n(u)){const e=u.getLastDescendant();null!==e&&(u=e)}let f=u.getPreviousSibling(),g=0;if(null===f){let e=u.getParentOrThrow(),t=e.getPreviousSibling();for(;null===t;){if(e=e.getParent(),null===e){f=null;break}t=e.getPreviousSibling()}null!==e&&(g=e.isInline()?0:2,f=t)}let d=u.getTextContent();\"\"===d&&n(u)&&!u.isInline()&&(d=\"\\n\\n\");const p=d.length;if(!e(u)||a>=p){const e=u.getParent();u.remove(),null==e||0!==e.getChildrenSize()||o(e)||e.remove(),a-=p+g,u=f}else{const n=u.getKey(),o=t.getEditorState().read((()=>{const t=l(n);return e(t)&&t.isSimpleText()?t.getTextContent():null})),f=p-a,g=d.slice(0,f);if(null!==o&&o!==d){const e=r();let t=u;if(u.isSimpleText())u.setTextContent(o);else{const e=s(o);u.replace(e),t=e}if(i(e)&&e.isCollapsed()){const n=e.anchor.offset;t.select(n,n)}}else if(u.isSimpleText()){const e=c.key===n;let t=c.offset;t<a&&(t=p);const o=e?t-a:0,l=e?t:f;if(e&&0===o){const[e]=u.splitText(o,l);e.remove()}else{const[,e]=u.splitText(o,l);e.remove()}}else{const e=s(g);u.replace(e)}a=0}}}function O(e){const t=e.getStyle(),n=E(t);v.set(t,n)}function b(t,o){(i(t)?t.isCollapsed():e(t)||n(t))||x(280);const l=K(i(t)?t.style:e(t)?t.getStyle():t.getTextStyle()),r=Object.entries(o).reduce(((e,[n,o])=>(\"function\"==typeof o?e[n]=o(l[n],t):null===o?delete e[n]:e[n]=o,e)),{...l}),s=k(r);i(t)||e(t)?t.setStyle(s):t.setTextStyle(s),v.set(s,r)}function R(e,t){if(i(e)&&e.isCollapsed()){b(e,t);const o=e.anchor.getNode();n(o)&&o.isEmpty()&&b(o,t)}z((e=>{b(e,t)}))}function z(t){const n=c();if(!n)return;const o=new Map;if(i(n))for(const e of f(n).getTextSlices())e&&o.set(e.caret.origin.getKey(),e.getSliceIndices());const l=n.getNodes();for(const n of l){if(!e(n)||!n.canHaveFormat())continue;const[l,s]=(r=n,o.get(r.getKey())||[0,r.getTextContentSize()]);if(s!==l)if(u(n)||0===l&&s===n.getTextContentSize())t(n);else{t(n.splitText(l,s)[0===l?0:1])}}var r;i(n)&&\"text\"===n.anchor.type&&\"text\"===n.focus.type&&n.anchor.key===n.focus.key&&A(n)}function A(e){if(e.isBackward()){const{anchor:t,focus:n}=e,{key:o,offset:l,type:r}=t;t.set(n.key,n.offset,n.type),n.set(o,l,r)}}function M(e,t){const n=e.getFormatType(),o=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),o!==t.getIndent()&&t.setIndent(o)}function _(e,t,o=M){if(null===e)return;const l=e.getStartEndPoints(),r=new Map;let s=null;if(l){const[e,t]=l;s=a(),s.anchor.set(e.key,e.offset,e.type),s.focus.set(t.key,t.offset,t.type);const o=J(e.getNode(),g),i=J(t.getNode(),g);n(o)&&r.set(o.getKey(),o),n(i)&&r.set(i.getKey(),i)}for(const t of e.getNodes())n(t)&&g(t)&&r.set(t.getKey(),t);for(const[e,n]of r){const l=t();o(n,l),n.replace(l,!0),s&&(e===s.anchor.key&&s.anchor.set(l.getKey(),s.anchor.offset,s.anchor.type),e===s.focus.key&&s.focus.set(l.getKey(),s.focus.offset,s.focus.type))}s&&e.is(c())&&d(s)}function L(e){return e.getNode().isAttached()}function $(e){let t=e;for(;null!==t&&!p(t);){const e=t.getLatest(),n=t.getParent();0===e.getChildrenSize()&&t.remove(!0),t=n}}function D(e,t,n=null){const o=e.getStartEndPoints(),l=o?o[0]:null,r=e.getNodes(),s=r.length;if(null!==l&&(0===s||1===s&&\"element\"===l.type&&0===l.getNode().getChildrenSize())){const e=\"text\"===l.type?l.getNode().getParentOrThrow():l.getNode(),o=e.getChildren();let r=t();return r.setFormat(e.getFormatType()),r.setIndent(e.getIndent()),o.forEach((e=>r.append(e))),n&&(r=n.append(r)),void e.replace(r)}let i=null,c=[];for(let o=0;o<s;o++){const l=r[o];p(l)?(j(e,c,c.length,t,n),c=[],i=l):null===i||null!==i&&h(l,i)?c.push(l):(j(e,c,c.length,t,n),c=[l])}j(e,c,c.length,t,n)}function j(e,t,o,l,s=null){if(0===t.length)return;const c=t[0],f=new Map,u=[];let a=n(c)?c:c.getParentOrThrow();a.isInline()&&(a=a.getParentOrThrow());let g=!1;for(;null!==a;){const e=a.getPreviousSibling();if(null!==e){a=e,g=!0;break}if(a=a.getParentOrThrow(),p(a))break}const h=new Set;for(let e=0;e<o;e++){const o=t[e];n(o)&&0===o.getChildrenSize()&&h.add(o.getKey())}const m=new Set;for(let e=0;e<o;e++){const o=t[e];let r=o.getParent();if(null!==r&&r.isInline()&&(r=r.getParent()),null!==r&&y(o)&&!m.has(o.getKey())){const e=r.getKey();if(void 0===f.get(e)){const t=l();t.setFormat(r.getFormatType()),t.setIndent(r.getIndent()),u.push(t),f.set(e,t),r.getChildren().forEach((e=>{t.append(e),m.add(e.getKey()),n(e)&&e.getChildrenKeys().forEach((e=>m.add(e)))})),$(r)}}else if(h.has(o.getKey())){n(o)||x(179);const e=l();e.setFormat(o.getFormatType()),e.setIndent(o.getIndent()),u.push(e),o.remove(!0)}}if(null!==s)for(let e=0;e<u.length;e++){const t=u[e];s.append(t)}let S=null;if(p(a))if(g)if(null!==s)a.insertAfter(s);else for(let e=u.length-1;e>=0;e--){const t=u[e];a.insertAfter(t)}else{const e=a.getFirstChild();if(n(e)&&(a=e),null===e)if(s)a.append(s);else for(let e=0;e<u.length;e++){const t=u[e];a.append(t),S=t}else if(null!==s)e.insertBefore(s);else for(let t=0;t<u.length;t++){const n=u[t];e.insertBefore(n),S=n}}else if(s)a.insertAfter(s);else for(let e=u.length-1;e>=0;e--){const t=u[e];a.insertAfter(t),S=t}const T=r();i(T)&&L(T.anchor)&&L(T.focus)?d(T.clone()):null!==S?S.selectEnd():e.dirty=!0}function U(e,t){const o=m(e.focus,t);return S(o)&&!o.isIsolated()||n(o)&&!o.isInline()&&!o.canBeEmpty()}function H(e,t,n,o){e.modify(t?\"extend\":\"move\",n,o)}function W(e){const t=e.anchor.getNode();return\"rtl\"===(o(t)?t:t.getParentOrThrow()).getDirection()}function X(e,t,n){const o=W(e);H(e,t,n?!o:o,\"character\")}function q(e,t,n){const o=K(e.getStyle());return null!==o&&o[t]||n}function G(t,n,o=\"\"){let l=null;const r=t.getNodes(),s=t.anchor,c=t.focus,f=t.isBackward(),u=f?c.offset:s.offset,a=f?c.getNode():s.getNode();if(i(t)&&t.isCollapsed()&&\"\"!==t.style){const e=K(t.style);if(null!==e&&n in e)return e[n]}for(let t=0;t<r.length;t++){const s=r[t];if((0===t||0!==u||!s.is(a))&&e(s)){const e=q(s,n,o);if(null===l)l=e;else if(l!==e){l=\"\";break}}}return null===l?o:l}function J(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const Q=F;export{O as $addNodeStyle,M as $copyBlockFormatIndent,A as $ensureForwardRangeSelection,z as $forEachSelectedTextNode,G as $getSelectionStyleValueForProperty,B as $isAtNodeEnd,W as $isParentElementRTL,H as $moveCaretSelection,X as $moveCharacter,R as $patchStyleText,_ as $setBlocksType,U as $shouldOverrideDefaultCharacterSelection,I as $sliceSelectedTextNodeContent,F as $trimTextContentFromAnchor,D as $wrapNodes,C as createDOMRange,P as createRectsFromDOMRange,k as getCSSFromStyleObject,K as getStyleObjectFromCSS,Q as trimTextContentFromAnchor};\n"],"names":["e","v","E","n","I","o","l","r","s","i","c","f","t","u","a","O","_","J","g","d","U","m","S","H","W","X"],"mappings":";AAQ2e,SAAS,EAAE,GAAE;AAAC,SAAO,KAAG,EAAE,cAAY,OAAO,UAAU,eAAe,KAAK,GAAE,SAAS,IAAE,EAAE,UAAQ;AAAC;AAAO,EAAG,SAAS,GAAE;AAAC,QAAM,IAAE,IAAI,IAAI,gCAAgC,GAAE,IAAE,IAAI;AAAgB,IAAE,OAAO,QAAO,CAAC;AAAE,WAAQA,IAAE,GAAEA,IAAE,UAAU,QAAOA,IAAI,GAAE,OAAO,KAAI,UAAUA,CAAC,CAAC;AAAE,QAAM,EAAE,SAAO,EAAE,SAAQ,GAAG,MAAM,2BAA2B,CAAC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