diff --git a/CHANGES.md b/CHANGES.md
index 46448f2a6029063fcf5c40409642fad18a0cdfea..ee21d596bd21552ccfcb8c62618f35b143340054 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -2,6 +2,8 @@
 
 ## Development ():
 
+* **Update**: Updated icons in the menu
+
 ## 0.9.1 (27.01.2020):
 
 * **Update**: Updated the TEI editor dependency for some performance improvements
diff --git a/docs/editor/global_comments.rst b/docs/editor/global_comments.rst
index a7dfc71362901073319a484af5ff50c95b402b0f..9f6b800ec339ddafd10da417884d586396950926 100644
--- a/docs/editor/global_comments.rst
+++ b/docs/editor/global_comments.rst
@@ -1,8 +1,8 @@
-#########
-Kommentar
-#########
+#######
+Apparat
+#######
 
-Über den Menüpunkt "Kommentar" kann der Kommentar zum zu edierenden Text bearbeitet werden. Der Editor besteht aus einem
+Über den Menüpunkt "Apparat" kann der Apparat zum zu edierenden Text bearbeitet werden. Der Editor besteht aus einem
 Textbereich auf der linken Seite und einem Auszeichnungsbalken auf der rechten Seite. Die Darstellung des Textes richtet
 sich soweit möglich nach der Darstellung auf der öffentlichen Webseite.
 
diff --git a/docs/editor/icons/absatz.svg b/docs/editor/icons/absatz.svg
new file mode 100644
index 0000000000000000000000000000000000000000..094fef8bd2527cc1829db8e5debcb34d9dd2db67
--- /dev/null
+++ b/docs/editor/icons/absatz.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M4,5H20V7H4V5M4,9H20V11H4V9M4,13H20V15H4V13M4,17H14V19H4V17Z" /></svg>
\ No newline at end of file
diff --git a/docs/editor/icons/bold.svg b/docs/editor/icons/bold.svg
new file mode 100644
index 0000000000000000000000000000000000000000..9998b2367462051e153808bfceb0bf3814e1fbac
--- /dev/null
+++ b/docs/editor/icons/bold.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z" /></svg>
\ No newline at end of file
diff --git a/docs/editor/icons/edit.svg b/docs/editor/icons/edit.svg
new file mode 100644
index 0000000000000000000000000000000000000000..bb4259a3b0e3208c266918305a8068311f65df46
--- /dev/null
+++ b/docs/editor/icons/edit.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z" /></svg>
\ No newline at end of file
diff --git a/docs/editor/icons/footnote.svg b/docs/editor/icons/footnote.svg
new file mode 100644
index 0000000000000000000000000000000000000000..8bc3f5e1225a65881096a73d005f12b2ccc90ee3
--- /dev/null
+++ b/docs/editor/icons/footnote.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M14,10V4.5L19.5,10M5,3C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V9L15,3H5Z" /></svg>
\ No newline at end of file
diff --git a/docs/editor/icons/foreign.svg b/docs/editor/icons/foreign.svg
new file mode 100644
index 0000000000000000000000000000000000000000..5984ec4434ec7ca20154374c79af9fceb7a93618
--- /dev/null
+++ b/docs/editor/icons/foreign.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M12.87,15.07L10.33,12.56L10.36,12.53C12.1,10.59 13.34,8.36 14.07,6H17V4H10V2H8V4H1V6H12.17C11.5,7.92 10.44,9.75 9,11.35C8.07,10.32 7.3,9.19 6.69,8H4.69C5.42,9.63 6.42,11.17 7.67,12.56L2.58,17.58L4,19L9,14L12.11,17.11L12.87,15.07M18.5,10H16.5L12,22H14L15.12,19H19.87L21,22H23L18.5,10M15.88,17L17.5,12.67L19.12,17H15.88Z" /></svg>
\ No newline at end of file
diff --git a/docs/editor/icons/heading-level-1.svg b/docs/editor/icons/heading-level-1.svg
new file mode 100644
index 0000000000000000000000000000000000000000..52864a406633d90826748aaebc47f22d65a3a80d
--- /dev/null
+++ b/docs/editor/icons/heading-level-1.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M3,4H5V10H9V4H11V18H9V12H5V18H3V4M14,18V16H16V6.31L13.5,7.75V5.44L16,4H18V16H20V18H14Z" /></svg>
diff --git a/docs/editor/icons/heading-level-2.svg b/docs/editor/icons/heading-level-2.svg
new file mode 100644
index 0000000000000000000000000000000000000000..a513b7d0ce7d6900d83302b3f29e635a945c3a31
--- /dev/null
+++ b/docs/editor/icons/heading-level-2.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M3,4H5V10H9V4H11V18H9V12H5V18H3V4M21,18H15A2,2 0 0,1 13,16C13,15.47 13.2,15 13.54,14.64L18.41,9.41C18.78,9.05 19,8.55 19,8A2,2 0 0,0 17,6A2,2 0 0,0 15,8H13A4,4 0 0,1 17,4A4,4 0 0,1 21,8C21,9.1 20.55,10.1 19.83,10.83L15,16H21V18Z" /></svg>
\ No newline at end of file
diff --git a/docs/editor/icons/heading-level-3.svg b/docs/editor/icons/heading-level-3.svg
new file mode 100644
index 0000000000000000000000000000000000000000..6d7b0d86a2d7e325f950e6e5670632f14b19f572
--- /dev/null
+++ b/docs/editor/icons/heading-level-3.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M3,4H5V10H9V4H11V18H9V12H5V18H3V4M15,4H19A2,2 0 0,1 21,6V16A2,2 0 0,1 19,18H15A2,2 0 0,1 13,16V15H15V16H19V12H15V10H19V6H15V7H13V6A2,2 0 0,1 15,4Z" /></svg>
\ No newline at end of file
diff --git a/docs/editor/icons/heading-level-4.svg b/docs/editor/icons/heading-level-4.svg
new file mode 100644
index 0000000000000000000000000000000000000000..703364e9e48ff953363c9dd28c6b7282c7d3749f
--- /dev/null
+++ b/docs/editor/icons/heading-level-4.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M3,4H5V10H9V4H11V18H9V12H5V18H3V4M18,18V13H13V11L18,4H20V11H21V13H20V18H18M18,11V7.42L15.45,11H18Z" /></svg>
\ No newline at end of file
diff --git a/docs/editor/icons/italic.svg b/docs/editor/icons/italic.svg
new file mode 100644
index 0000000000000000000000000000000000000000..4ca42208cda21c1e875cfb3ded93766596eaa279
--- /dev/null
+++ b/docs/editor/icons/italic.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M10,4V7H12.21L8.79,15H6V18H14V15H11.79L15.21,7H18V4H10Z" /></svg>
\ No newline at end of file
diff --git a/docs/editor/icons/nicht-ermittelt.svg b/docs/editor/icons/nicht-ermittelt.svg
new file mode 100644
index 0000000000000000000000000000000000000000..14e83c0bc1bcf16719500bd746ae9c3b9c750c7b
--- /dev/null
+++ b/docs/editor/icons/nicht-ermittelt.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M11,18H13V16H11V18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,6A4,4 0 0,0 8,10H10A2,2 0 0,1 12,8A2,2 0 0,1 14,10C14,12 11,11.75 11,15H13C13,12.75 16,12.5 16,10A4,4 0 0,0 12,6Z" /></svg>
\ No newline at end of file
diff --git a/docs/editor/icons/page-begin.svg b/docs/editor/icons/page-begin.svg
new file mode 100644
index 0000000000000000000000000000000000000000..f54b4cc5e47f325ac01e0fa43e61d3bfb5d54456
--- /dev/null
+++ b/docs/editor/icons/page-begin.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M19,2L14,6.5V17.5L19,13V2M6.5,5C4.55,5 2.45,5.4 1,6.5V21.16C1,21.41 1.25,21.66 1.5,21.66C1.6,21.66 1.65,21.59 1.75,21.59C3.1,20.94 5.05,20.5 6.5,20.5C8.45,20.5 10.55,20.9 12,22C13.35,21.15 15.8,20.5 17.5,20.5C19.15,20.5 20.85,20.81 22.25,21.56C22.35,21.61 22.4,21.59 22.5,21.59C22.75,21.59 23,21.34 23,21.09V6.5C22.4,6.05 21.75,5.75 21,5.5V7.5L21,13V19C19.9,18.65 18.7,18.5 17.5,18.5C15.8,18.5 13.35,19.15 12,20V13L12,8.5V6.5C10.55,5.4 8.45,5 6.5,5V5Z" /></svg>
\ No newline at end of file
diff --git a/docs/editor/icons/quelle.svg b/docs/editor/icons/quelle.svg
new file mode 100644
index 0000000000000000000000000000000000000000..1105786dc21502154cc4d0d1dab5779473687e0a
--- /dev/null
+++ b/docs/editor/icons/quelle.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M21,5C19.89,4.65 18.67,4.5 17.5,4.5C15.55,4.5 13.45,4.9 12,6C10.55,4.9 8.45,4.5 6.5,4.5C4.55,4.5 2.45,4.9 1,6V20.65C1,20.9 1.25,21.15 1.5,21.15C1.6,21.15 1.65,21.1 1.75,21.1C3.1,20.45 5.05,20 6.5,20C8.45,20 10.55,20.4 12,21.5C13.35,20.65 15.8,20 17.5,20C19.15,20 20.85,20.3 22.25,21.05C22.35,21.1 22.4,21.1 22.5,21.1C22.75,21.1 23,20.85 23,20.6V6C22.4,5.55 21.75,5.25 21,5M21,18.5C19.9,18.15 18.7,18 17.5,18C15.8,18 13.35,18.65 12,19.5V8C13.35,7.15 15.8,6.5 17.5,6.5C18.7,6.5 19.9,6.65 21,7V18.5Z" /></svg>
\ No newline at end of file
diff --git a/docs/editor/icons/quote.svg b/docs/editor/icons/quote.svg
new file mode 100644
index 0000000000000000000000000000000000000000..22e40c8ea7a720fe868194f22e38868c3f065339
--- /dev/null
+++ b/docs/editor/icons/quote.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M14,17H17L19,13V7H13V13H16M6,17H9L11,13V7H5V13H8L6,17Z" /></svg>
\ No newline at end of file
diff --git a/docs/editor/icons/sperrung.svg b/docs/editor/icons/sperrung.svg
new file mode 100644
index 0000000000000000000000000000000000000000..1f405ab4dcc708afb6b2e2220ba417ee2460c178
--- /dev/null
+++ b/docs/editor/icons/sperrung.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z" /></svg>
\ No newline at end of file
diff --git a/docs/editor/icons/stellenkommentar.svg b/docs/editor/icons/stellenkommentar.svg
new file mode 100644
index 0000000000000000000000000000000000000000..434fe69e9b3d5098ffc76c06e4a59001b65857a8
--- /dev/null
+++ b/docs/editor/icons/stellenkommentar.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M10,16V19.08L13.08,16H20V4H4V16H10M6,7H18V9H6V7M6,11H15V13H6V11Z" /></svg>
\ No newline at end of file
diff --git a/docs/editor/icons/sup.svg b/docs/editor/icons/sup.svg
new file mode 100644
index 0000000000000000000000000000000000000000..f5b35e022501d5ee7eb023847ce339626461de2e
--- /dev/null
+++ b/docs/editor/icons/sup.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z" /></svg>
\ No newline at end of file
diff --git a/docs/editor/icons/vers.svg b/docs/editor/icons/vers.svg
new file mode 100644
index 0000000000000000000000000000000000000000..40ffc9ad3411eb01cc8fa84c470444c6ded8274c
--- /dev/null
+++ b/docs/editor/icons/vers.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M4,9H20V11H4V9M4,13H14V15H4V13Z" /></svg>
\ No newline at end of file
diff --git a/docs/editor/icons/verweis-apparat.svg b/docs/editor/icons/verweis-apparat.svg
new file mode 100644
index 0000000000000000000000000000000000000000..e83b3810cff9086b7b94389c148cd65bd415e5a4
--- /dev/null
+++ b/docs/editor/icons/verweis-apparat.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path d="M20 2H4C2.9 2 2 2.9 2 4V16C2 17.1 2.9 18 4 18H8V21C8 21.6 8.4 22 9 22H9.5C9.7 22 10 21.9 10.2 21.7L13.9 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2M20 16H13.1L10 19.1V16H4V4H20V16M8 9V11H12.5L10.7 12.8L12 14L16 10L12 6L10.8 7.2L12.5 9H8Z" /></svg>
\ No newline at end of file
diff --git a/docs/editor/index.rst b/docs/editor/index.rst
index 3bc5f12418e04dbaa554a38be2eab2a81ddee261..ad240668bb24d123b0df4721179d7bd1fd0c1faf 100644
--- a/docs/editor/index.rst
+++ b/docs/editor/index.rst
@@ -3,8 +3,8 @@ Text Editor
 ###########
 
 Der Text Editor erlaubt das Bearbeiten der TEI Dateien. Dazu bietet er die Möglichkeit der Bearbeitung der Metadaten
-und Texteditoren für den Haupttext, Kommentar, und Einzelstellenerläuterungen. In den drei letztgenannten gibt es
-eine Reihe von Auszeichnungsmöglichkeiten. Details zu all diesen finden sich in folgenen Bereichen:
+und Texteditoren für den Haupttext und Apparat. In den zwei Texteditoren gibt es eine Reihe von
+Auszeichnungsmöglichkeiten. Details zu all diesen finden sich in folgenen Bereichen:
 
 .. toctree::
    :maxdepth: 2
@@ -12,10 +12,9 @@ eine Reihe von Auszeichnungsmöglichkeiten. Details zu all diesen finden sich in
    metadata
    main_text
    global_comments
-   individual_comments
    markup
 
-Im Editor können sie zwischen den vier Bereichen jederzeit hin und herwechseln, ohne dass Änderungen verloren gehen.
+Im Editor können sie zwischen den drei Bereichen jederzeit hin und herwechseln, ohne dass Änderungen verloren gehen.
 Um Änderungen aber permanent zu speichern, muss aus dem "File" Menü der Eintrag "Save" ausgewählt werden. Der Editor
 fragt dann um eine kurze Beschreibung (maximal 32 Zeichen) der Änderung und speichert diese dann.
 
diff --git a/docs/editor/individual_comments.rst b/docs/editor/individual_comments.rst
deleted file mode 100644
index 05896d3f5b0b50e2702bb49e7eb2fa2958fb548d..0000000000000000000000000000000000000000
--- a/docs/editor/individual_comments.rst
+++ /dev/null
@@ -1,21 +0,0 @@
-##########################
-Einzelstellenerläuterungen
-##########################
-
-Über den Menüpunkt "Einzelstellenerläuterung" können die Einzelstellenerläuterungen zum zu edierenden Text bearbeitet
-werden. Der Editor hat eine zusätzliche Menüleiste, aus der sie die zu bearbeitende Einzelstellenerläuterung auswählen
-können, sie löschen, oder eine neue Einzelstellenerläuterung hinzufügen.
-
-Wenn sie eine Einzelstellenerläuterung auswählen oder neu hinzufügen, dann wird darunter der Text der
-Einzelstellenerläuterung angezeigt, mit dem Textbereich auf der linken Seite und einem Auszeichnungsbalken auf der
-rechten Seite. Die Darstellung des Textes richtet sich soweit möglich nach der Darstellung auf der öffentlichen
-Webseite.
-
-Geben sie in den Textbereich den Text ein, wählen sie auszuzeichnende Stellen aus und nutzen sie die
-:doc:`markup` auf der rechten Seite um Elemente des Textes auszuzeichnen.
-
-Auf der rechten Seite hat die Einzelstellenerläuterung ein zusätzliches Attribute:
-
-* **Schlüssel**: Dies ist der eindeutige Schlüssel, welcher diese Einzelstellenerläuterung identifiziert. Diese **muss**
-  innerhalb des Textes eindeutig sein. Der Schlüssel ist nur innerhalb des Editors sichtbar. Auf der Webseite wird
-  er im Hintergrund genutzt um zwischen Text und Einzelstellenerläuterung zu verlinken.
diff --git a/docs/editor/markup.rst b/docs/editor/markup.rst
index b9851baa51d75639f84bf8c05bcdf3e29c17ce57..9b9f635fe6736655de35849f09ade6e05ce60f24 100644
--- a/docs/editor/markup.rst
+++ b/docs/editor/markup.rst
@@ -20,49 +20,47 @@ Blocktypen
 
 Folgende Textblöcke können ausgewählt werden.
 
-Überschrift
------------
+Überschrift |heading_img_1| |heading_img_2| |heading_img_3| |heading_img_4|
+---------------------------------------------------------------------------
+
+.. |heading_img_1| image:: icons/heading-level-1.svg
+.. |heading_img_2| image:: icons/heading-level-2.svg
+.. |heading_img_3| image:: icons/heading-level-3.svg
+.. |heading_img_4| image:: icons/heading-level-4.svg
 
-Zeichnet den Block als Überschrift aus. Für alle Überschriften gibt es zwei Attribute, welche rechts eingestellt
-werden können:
+Zeichnet den Block als Überschrift der jeweiligen Ebene aus. Für alle Überschriften gibt es ein Attribut, welches rechts
+eingestellt werden kann:
 
-* **Ebene**: Die Überschriftenebene von 1-3.
 * **Kennzeichnung**: Eine (beliebige) Kennzeichnung. Diese darf nur aus Buchstaben und den Zeichen - und _ bestehen. Diese
   wird vom Lesesystem zur generierung des Inhaltsverzeichnisses genutzt. Eine Überschrift ohne Kennzeichnung wird nicht
   in das Inhaltsverzeichnis übernommen. Falls zwei aufeinanderfolgende Überschriften die gleiche Kennzeichnung haben,
   dann werden diese im Inhaltsverzeichnis als ein Eintrag (Titel/Untertitel) dargestellt.
 
 
-Absatz
-------
+Absatz |absatz_img|
+-------------------
+
+.. |absatz_img| image:: icons/absatz.svg
 
-Zeichnet den Block als Textabsatz aus. Folgende Attribute können eingstellt werden:
+Zeichnet den Block als Textabsatz aus. Folgende Attribute können eingestellt werden:
 
 * **Eingrückt**: Die erste Textzeile des Absatzes ist eingerückt oder nicht.
 * **Textausrichtung**: Links-bündig, zentriert, rechts-bündig, oder Blocksatz.
 
-Vers
-----
-
-Markiert ein oder mehrere Zeilen als Vers. Dazu zuerst jede einzelne Zeile als Zeile auszeichnen. Danach alle Zeilen
-die zu einem Vers gehören auswählen und dann als Vers auszeichnen.
-
-Zeile
------
+Vers |vers_img|
+---------------
 
-Markiert den Textblock als Verszeile. Dies muss zuerst für alle Zeilen gemacht werden, welche in einen Vers
-zusammengefasst werden sollen.
+.. |vers_img| image:: icons/vers.svg
 
-Quellenliste
-------------
+Markiert ein oder mehrere Zeilen als Vers. Dazu alle Zeilen des Vers auswählen und dann als Vers auszeichnen.
 
-Markiert ein oder mehrere Quellen als Quellenliste. Dazu zuerst jede einzelne Quelle als Quelle auszeichnen. Danach
-alle Quellen auswählen und als Quellenliste auszeichnen.
+Quellenliste |quelle_img|
+-------------------------
 
-Quelle
-------
+.. |quelle_img| image:: icons/quelle.svg
 
-Markiert den Textblock als Quelle. Folgende Attribute können eingestell werden:
+Markiert ein oder mehrere Quellen als Quellenliste. Dazu alle Quellen auswählen und dann als Quellenliste auszeichnen.
+Die einzelnen Quellen haben folgendes Attribt das eingestellt werden kann:
 
 * **Kennzeichnung**: Das Kennzeichnungskürzel der Quelle. Dies darf nicht im Textblock selbst stehen, da es ansonst auf
   der Webseite verdoppelt wird
@@ -70,45 +68,57 @@ Markiert den Textblock als Quelle. Folgende Attribute können eingestell werden:
 Auszeichnungen
 ==============
 
-Folgende Auszeichnungne können innerhalb von Textblöcken vergeben werden:
+Folgende Auszeichnungen können innerhalb von Textblöcken vergeben werden:
 
-Einzelstellenverweis
---------------------
+Stellenkommentar |stellenkommentar_img|
+---------------------------------------
 
-Markiert den ausgewählten Text als Verweis auf eine :doc:`Einzelstellenerläuterung <individual_comments>`. Folgende
-Attribute können eingestellt werden:
+.. |stellenkommentar_img| image:: icons/stellenkommentar.svg
 
-* **Einzelstellenerläuterung**: Die zu verlinkende Einzelstellenerläuterung. Diese muss erstellt werden **bevor** sie
-  hier verlinkt werden kann.
+Markiert den ausgewählten Text als Stellenkommentar. Folgende Attribute können eingestellt werden:
 
-Globalkommentarverweis
-----------------------
+* **Stellenkommentar**: Der zu verlinkenden Stellenkommentar.
 
-Markiert den ausgewählten Text als Verweis auf den :doc:`Kommentar <global_comments>`. Folgende
+  Für einen neuen Stellenkommentar die Option "New" ausgewählt lassen und auf den |edit_img| klicken um den
+  Stellenkommentar zu bearbeiten.
+
+  Für einen Verweis auf einen bestehenden Stellenkommentar einfach den zu verlinkenden Stellenkommentar aus der Liste
+  auswählen.
+
+  Um den Stellenkommentar zu bearbeiten einfach auf |edit_img| klicken.
+
+.. |edit_img| image:: icons/edit.svg
+
+Globalkommentarverweis |verweis_apparat_img|
+--------------------------------------------
+
+.. |verweis_apparat_img| image:: icons/verweis-apparat.svg
+
+Markiert den ausgewählten Text als Verweis auf den :doc:`Apparat <global_comments>`. Folgende
 Attribute können eingestellt werden:
 
 * **Abschnitt**: Der Abschnitt auf den verwiesen werden soll. Dies ist die Kennzeichnung die für die Überschrift im
-  Kommentar vergeben wurde.
+  Apparat vergeben wurde.
 
-Seitenanfang
-------------
+Seitenanfang |seitenanfang_img|
+-------------------------------
 
-Markiert den ausgewählten Text als den Anfang einer Seite.
+.. |seitenanfang_img| image:: icons/page-begin.svg
 
-Fußnote
--------
+Markiert den ausgewählten Text als den Anfang einer Seite.
 
-Markiert den ausgewählten Text als Fußnote. Folgende Attribute können eingstellt werden:
+Fußnote |fussnote_img|
+----------------------
 
-* **Symbol**: Das Symbol, welches in der Webseite als Hinweis auf die Fußnote verwendet wird.
+.. |fussnote_img| image:: icons/footnote.svg
 
-.. important::
+Markiert den ausgewählten Text als Fußnotenmarkierung. Um den Text der Fußnote zu bearbeiten, auf den |edit_img|
+klicken.
 
-    Der Text der Fußnote wird zwar im Text des Editors bearbeitet (und auch weiter ausgezeichnet, falls notwendig),
-    aber in der Darstellung auf der Webseite wird der Fußnotentext separat angezeigt.
+Fremdsprachiger Text |foreign_img|
+----------------------------------
 
-Fremdsprachiger Text
---------------------
+.. |foreign_img| image:: icons/foreign.svg
 
 Markiert den ausgewählten Text als fremdsprachigen Text.
 
@@ -122,8 +132,10 @@ Wortspanne
 
 Markiert den ausgewählten Text als Wortspanne, generell nach einer "Seite & Zeile" Auszeichnung.
 
-Zitat
------
+Zitat |zitat_img|
+-----------------
+
+.. |zitat_img| image:: icons/quote.svg
 
 Markiert den ausgewählten Text als Zitat.
 
@@ -132,13 +144,22 @@ Lemma
 
 Markiert den ausgewählten Text als Lemma.
 
-Korrigierter Text
------------------
+Textvorlage
+-----------
 
-Markiert den ausgewählten Text als den ursprünglichen, korrigierten Text.
+Markiert den ausgewählten Text als den Originaltext aus der Vorlage.
 
-Nicht ermittelt
----------------
+Variante
+--------
+
+Markiert den ausgewählten Text als eine Variante in einer der Quellen. Folgendes Attribut kann eingestellt werden:
+
+* **Quellenkürzel**: Das Quellenkürzel der Quelle aus der die Variante stammt.
+
+Nicht ermittelt |nicht_ermittelt_img|
+-------------------------------------
+
+.. |nicht_ermittelt_img| image:: icons/nicht-ermittelt.svg
 
 Markiert den ausgewählten Text als noch zu ermittelnde Information.
 
@@ -152,18 +173,24 @@ Textgröße
 
 Für die Textgröße sind die Größen: Normal, Klein, Mittel, und Groß vorhanden.
 
-Fettdruck
----------
+Fettdruck |bold_img|
+--------------------
+
+.. |bold_img| image:: icons/bold.svg
 
 Markiert den ausgewählten Text als fettgedruckt.
 
-Kursiv
-------
+Kursiv |italic_img|
+-------------------
+
+.. |italic_img| image:: icons/italic.svg
 
 Markiert den ausgewählten Text als kursiv.
 
-Sperrung
---------
+Sperrung |sperrung_img|
+-----------------------
+
+.. |sperrung_img| image:: icons/sperrung.svg
 
 Markiert den ausgewählten Text als Sperrung.
 
@@ -173,7 +200,9 @@ Markiert den ausgewählten Text als Sperrung.
     ausgelassen werden. Das ist notwendig, damit der Text in TEI korrekt repräsentiert wird. In aktuellen Browsern kann
     das zwar vereinzelt zu leicht unschönen Darstellungen führen, aber diese werden im Laufe der Zeit ausgemerzt.
 
-Hochgestellt
-------------
+Hochgestellt |sup_img|
+----------------------
+
+.. |sup_img| image:: icons/sup.svg
 
 Markiert den ausgewählten Text als hochgestellt.
diff --git a/editor/jinja2/editor/edit.jinja2 b/editor/jinja2/editor/edit.jinja2
index e217b431dfdcd9a22bd2b36549d399835e2f7fab..cd3ba9d34aa1d93a0651b4aea43e94b3d1046884 100644
--- a/editor/jinja2/editor/edit.jinja2
+++ b/editor/jinja2/editor/edit.jinja2
@@ -631,19 +631,48 @@
                                       "type": "menubar",
                                       "entities": [
                                           {
-                                              "type": "setNodeType",
-                                              "label": "Überschrift",
-                                              "nodeType": "heading"
+                                              "type": "setNodeAttrValue",
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M14,18V16H16V6.31L13.5,7.75V5.44L16,4H18V16H20V18H14Z\" /></svg>",
+                                              "nodeType": "heading",
+                                              "attr": "level",
+                                              "value": "1",
+                                              "ariaLabel": "Überschrift - Ebene 1"
+                                          },
+                                          {
+                                              "type": "setNodeAttrValue",
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M21,18H15A2,2 0 0,1 13,16C13,15.47 13.2,15 13.54,14.64L18.41,9.41C18.78,9.05 19,8.55 19,8A2,2 0 0,0 17,6A2,2 0 0,0 15,8H13A4,4 0 0,1 17,4A4,4 0 0,1 21,8C21,9.1 20.55,10.1 19.83,10.83L15,16H21V18Z\" /></svg>",
+                                              "nodeType": "heading",
+                                              "attr": "level",
+                                              "value": "2",
+                                              "ariaLabel": "Überschrift - Ebene 2"
+                                          },
+                                          {
+                                              "type": "setNodeAttrValue",
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M15,4H19A2,2 0 0,1 21,6V16A2,2 0 0,1 19,18H15A2,2 0 0,1 13,16V15H15V16H19V12H15V10H19V6H15V7H13V6A2,2 0 0,1 15,4Z\" /></svg>",
+                                              "nodeType": "heading",
+                                              "attr": "level",
+                                              "value": "3",
+                                              "ariaLabel": "Überschrift - Ebene 3"
+                                          },
+                                          {
+                                              "type": "setNodeAttrValue",
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M18,18V13H13V11L18,4H20V11H21V13H20V18H18M18,11V7.42L15.45,11H18Z\" /></svg>",
+                                              "nodeType": "heading",
+                                              "attr": "level",
+                                              "value": "4",
+                                              "ariaLabel": "Überschrift - Ebene 4"
                                           },
                                           {
                                               "type": "setNodeType",
-                                              "label": "Absatz",
-                                              "nodeType": "paragraph"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M4,5H20V7H4V5M4,9H20V11H4V9M4,13H20V15H4V13M4,17H14V19H4V17Z\" /></svg>",
+                                              "nodeType": "paragraph",
+                                              "ariaLabel": "Absatz"
                                           },
                                           {
                                               "type": "setNodeType",
-                                              "label": "Vers",
-                                              "nodeType": "lineGroup"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M4,9H20V11H4V9M4,13H14V15H4V13Z\" /></svg>",
+                                              "nodeType": "lineGroup",
+                                              "ariaLabel": "Vers"
                                           }
                                       ]
                                   }
@@ -657,28 +686,38 @@
                                       "entities": [
                                           {
                                               "type": "setNodeType",
-                                              "label": "Einzelstellenverweis",
-                                              "nodeType": "annotationMarker"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M10,16V19.08L13.08,16H20V4H4V16H10M6,7H18V9H6V7M6,11H15V13H6V11Z\" /></svg>",
+                                              "nodeType": "annotationMarker",
+                                              "ariaLabel": "Stellenkommentar"
                                           },
                                           {
                                               "type": "setNodeType",
-                                              "label": "Globalkommentarverweis",
-                                              "nodeType": "annotationGlobal"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M20 2H4C2.9 2 2 2.9 2 4V16C2 17.1 2.9 18 4 18H8V21C8 21.6 8.4 22 9 22H9.5C9.7 22 10 21.9 10.2 21.7L13.9 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2M20 16H13.1L10 19.1V16H4V4H20V16M8 9V11H12.5L10.7 12.8L12 14L16 10L12 6L10.8 7.2L12.5 9H8Z\" /></svg>",
+                                              "nodeType": "annotationGlobal",
+                                              "ariaLabel": "Verweis auf den Apparat"
                                           },
                                           {
                                               "type": "setNodeType",
-                                              "label": "Seitenanfang",
-                                              "nodeType": "pageBegin"
-                                          },
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M14,10V4.5L19.5,10M5,3C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V9L15,3H5Z\" /></svg>",
+                                              "nodeType": "footnoteMarker",
+                                              "ariaLabel": "Fußnote"
+                                          }
+                                      ]
+                                  },
+                                  {
+                                      "type": "menubar",
+                                      "entities": [
                                           {
                                               "type": "setNodeType",
-                                              "label": "Fußnote",
-                                              "nodeType": "footnoteMarker"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M19,2L14,6.5V17.5L19,13V2M6.5,5C4.55,5 2.45,5.4 1,6.5V21.16C1,21.41 1.25,21.66 1.5,21.66C1.6,21.66 1.65,21.59 1.75,21.59C3.1,20.94 5.05,20.5 6.5,20.5C8.45,20.5 10.55,20.9 12,22C13.35,21.15 15.8,20.5 17.5,20.5C19.15,20.5 20.85,20.81 22.25,21.56C22.35,21.61 22.4,21.59 22.5,21.59C22.75,21.59 23,21.34 23,21.09V6.5C22.4,6.05 21.75,5.75 21,5.5V7.5L21,13V19C19.9,18.65 18.7,18.5 17.5,18.5C15.8,18.5 13.35,19.15 12,20V13L12,8.5V6.5C10.55,5.4 8.45,5 6.5,5V5Z\" /></svg>",
+                                              "nodeType": "pageBegin",
+                                              "ariaLabel": "Seitenanfang"
                                           },
                                           {
                                               "type": "setNodeType",
-                                              "label": "Fremdsprachiger Text",
-                                              "nodeType": "foreignLanguage"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M12.87,15.07L10.33,12.56L10.36,12.53C12.1,10.59 13.34,8.36 14.07,6H17V4H10V2H8V4H1V6H12.17C11.5,7.92 10.44,9.75 9,11.35C8.07,10.32 7.3,9.19 6.69,8H4.69C5.42,9.63 6.42,11.17 7.67,12.56L2.58,17.58L4,19L9,14L12.11,17.11L12.87,15.07M18.5,10H16.5L12,22H14L15.12,19H19.87L21,22H23L18.5,10M15.88,17L17.5,12.67L19.12,17H15.88Z\" /></svg>",
+                                              "nodeType": "foreignLanguage",
+                                              "ariaLabel": "Fremdsprachiger Text"
                                           }
                                       ]
                                   }
@@ -719,22 +758,26 @@
                                           {
                                               "type": "toggleMark",
                                               "markType": "fontWeightBold",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z\" /></svg>",
+                                              "ariaLabel": "Fett"
                                           },
                                           {
                                               "type": "toggleMark",
                                               "markType": "fontStyleItalic",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M10,4V7H12.21L8.79,15H6V18H14V15H11.79L15.21,7H18V4H10Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M10,4V7H12.21L8.79,15H6V18H14V15H11.79L15.21,7H18V4H10Z\" /></svg>",
+                                              "ariaLabel": "Kursivtext"
                                           },
                                           {
                                               "type": "toggleMark",
                                               "markType": "letterSparse",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z\" /></svg>",
+                                              "ariaLabel": "Textsperrung"
                                           },
                                           {
                                               "type": "toggleMark",
                                               "markType": "sup",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z\" /></svg>",
+                                              "ariaLabel": "Hochgestellt"
                                           }
                                       ]
                                   }
@@ -747,34 +790,6 @@
                                   "activeType": "heading"
                               },
                               "entities": [
-                                  {
-                                      "type": "menubar",
-                                      "entities": [
-                                          {
-                                              "type": "selectNodeAttr",
-                                              "nodeType": "heading",
-                                              "attr": "level",
-                                              "values": [
-                                                  {
-                                                      "label": "Ebene 1",
-                                                      "value": "1"
-                                                  },
-                                                  {
-                                                      "label": "Ebene 2",
-                                                      "value": "2"
-                                                  },
-                                                  {
-                                                      "label": "Ebene 3",
-                                                      "value": "3"
-                                                  },
-                                                  {
-                                                      "label": "Ebene 4",
-                                                      "value": "4"
-                                                  }
-                                              ]
-                                          }
-                                      ]
-                                  },
                                   {
                                       "type": "list",
                                       "entities": [
@@ -782,7 +797,7 @@
                                               "type": "setNodeAttrString",
                                               "nodeType": "heading",
                                               "attr": "headingId",
-                                              "label": "Navigationsmarker"
+                                              "label": "Kennzeichnung"
                                           }
                                       ]
                                   }
@@ -821,35 +836,39 @@
                                               "nodeType": "paragraph",
                                               "attr": "textAlign",
                                               "value": "left",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z\" /></svg>",
+                                              "ariaLabel": "Linksbündig"
                                           },
                                           {
                                               "type": "setNodeAttrValue",
                                               "nodeType": "paragraph",
                                               "attr": "textAlign",
                                               "value": "center",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M7,7H17V9H7V7M3,11H21V13H3V11M7,15H17V17H7V15M3,19H21V21H3V19Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M7,7H17V9H7V7M3,11H21V13H3V11M7,15H17V17H7V15M3,19H21V21H3V19Z\" /></svg>",
+                                              "ariaLabel": "Zentriert"
                                           },
                                           {
                                               "type": "setNodeAttrValue",
                                               "nodeType": "paragraph",
                                               "attr": "textAlign",
                                               "value": "right",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M9,7H21V9H9V7M3,11H21V13H3V11M9,15H21V17H9V15M3,19H21V21H3V19Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M9,7H21V9H9V7M3,11H21V13H3V11M9,15H21V17H9V15M3,19H21V21H3V19Z\" /></svg>",
+                                              "ariaLabel": "Rechtsbündig"
                                           },
                                           {
                                               "type": "setNodeAttrValue",
                                               "nodeType": "paragraph",
                                               "attr": "textAlign",
                                               "value": "justify",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M3,7H21V9H3V7M3,11H21V13H3V11M3,15H21V17H3V15M3,19H21V21H3V19Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M3,7H21V9H3V7M3,11H21V13H3V11M3,15H21V17H3V15M3,19H21V21H3V19Z\" /></svg>",
+                                              "ariaLabel": "Blocksatz"
                                           }
                                       ]
                                   }
                               ]
                           },
                           {
-                              "label": "Einzelstellenverweis",
+                              "label": "Stellenkommentar",
                               "condition": {
                                   "type": "isActive",
                                   "activeType": "annotationMarker"
@@ -868,8 +887,9 @@
                                               "type": "editNestedDoc",
                                               "nodeType": "annotationMarker",
                                               "attr": "target",
-                                              "label": "Bearbeiten",
-                                              "targetNodeType": "annotation"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z\" /></svg>",
+                                              "targetNodeType": "annotation",
+                                              "ariaLabel": "Bearbeiten"
                                           }
                                       ]
                                   }
@@ -909,8 +929,9 @@
                                               "type": "editNestedDoc",
                                               "nodeType": "footnoteMarker",
                                               "attr": "target",
-                                              "label": "Bearbeiten",
-                                              "targetNodeType": "footnote"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z\" /></svg>",
+                                              "targetNodeType": "footnote",
+                                              "ariaLabel": "Bearbeiten"
                                           }
                                       ]
                                   }
@@ -919,14 +940,15 @@
                       ],
                       "annotation": [
                           {
-                              "label": "Einzelstellenverweis",
+                              "label": "Stellenkommentar",
                               "entities": [
                                   {
                                       "type": "menubar",
                                       "entities": [
                                           {
                                               "type": "closeNested",
-                                              "label": "Schließen"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z\" /></svg>",
+                                              "ariaLabel": "Zurück zum Haupttext"
                                           }
                                       ]
                                   }
@@ -947,27 +969,52 @@
                                               "type": "setNodeType",
                                               "label": "Wortspanne",
                                               "nodeType": "wordRange"
-                                          },
+                                          }
+                                      ]
+                                  },
+                                  {
+                                      "type": "menubar",
+                                      "entities": [
                                           {
                                               "type": "setNodeType",
-                                              "label": "Einzelstellenverweis",
-                                              "nodeType": "annotationMarker"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M10,16V19.08L13.08,16H20V4H4V16H10M6,7H18V9H6V7M6,11H15V13H6V11Z\" /></svg>",
+                                              "nodeType": "annotationMarker",
+                                              "ariaLabel": "Stellenkommentar"
                                           },
                                           {
                                               "type": "setNodeType",
-                                              "label": "Globalkommentarverweis",
-                                              "nodeType": "annotationGlobal"
-                                          },
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M20 2H4C2.9 2 2 2.9 2 4V16C2 17.1 2.9 18 4 18H8V21C8 21.6 8.4 22 9 22H9.5C9.7 22 10 21.9 10.2 21.7L13.9 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2M20 16H13.1L10 19.1V16H4V4H20V16M8 9V11H12.5L10.7 12.8L12 14L16 10L12 6L10.8 7.2L12.5 9H8Z\" /></svg>",
+                                              "nodeType": "annotationGlobal",
+                                              "ariaLabel": "Verweis auf den Apparat"
+                                          }
+                                      ]
+                                  },
+                                  {
+                                      "type": "menubar",
+                                      "entities": [
                                           {
                                               "type": "setNodeType",
-                                              "label": "Fremdsprachiger Text",
-                                              "nodeType": "foreignLanguage"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M12.87,15.07L10.33,12.56L10.36,12.53C12.1,10.59 13.34,8.36 14.07,6H17V4H10V2H8V4H1V6H12.17C11.5,7.92 10.44,9.75 9,11.35C8.07,10.32 7.3,9.19 6.69,8H4.69C5.42,9.63 6.42,11.17 7.67,12.56L2.58,17.58L4,19L9,14L12.11,17.11L12.87,15.07M18.5,10H16.5L12,22H14L15.12,19H19.87L21,22H23L18.5,10M15.88,17L17.5,12.67L19.12,17H15.88Z\" /></svg>",
+                                              "nodeType": "foreignLanguage",
+                                              "ariaLabel": "Fremdsprachiger Text"
                                           },
                                           {
                                               "type": "setNodeType",
-                                              "label": "Zitat",
-                                              "nodeType": "quotation"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M14,17H17L19,13V7H13V13H16M6,17H9L11,13V7H5V13H8L6,17Z\" /></svg>",
+                                              "nodeType": "quotation",
+                                              "ariaLabel": "Zitat"
                                           },
+                                          {
+                                              "type": "setNodeType",
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M11,18H13V16H11V18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,6A4,4 0 0,0 8,10H10A2,2 0 0,1 12,8A2,2 0 0,1 14,10C14,12 11,11.75 11,15H13C13,12.75 16,12.5 16,10A4,4 0 0,0 12,6Z\" /></svg>",
+                                              "nodeType": "missing",
+                                              "ariaLabel": "Nicht ermittelt"
+                                          }
+                                      ]
+                                  },
+                                  {
+                                      "type": "menubar",
+                                      "entities": [
                                           {
                                               "type": "setNodeType",
                                               "label": "Lemma",
@@ -982,11 +1029,6 @@
                                               "type": "setNodeType",
                                               "label": "Variante",
                                               "nodeType": "reading"
-                                          },
-                                          {
-                                              "type": "setNodeType",
-                                              "label": "Nicht ermittelt",
-                                              "nodeType": "missing"
                                           }
                                       ]
                                   }
@@ -1027,24 +1069,27 @@
                                           {
                                               "type": "toggleMark",
                                               "markType": "fontWeightBold",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z\" /></svg>",
+                                              "ariaLabel": "Fett"
                                           },
                                           {
                                               "type": "toggleMark",
                                               "markType": "letterSparse",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z\" /></svg>",
+                                              "ariaLabel": "Textsperrung"
                                           },
                                           {
                                               "type": "toggleMark",
                                               "markType": "sup",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z\" /></svg>",
+                                              "ariaLabel": "Hochgestellt"
                                           }
                                       ]
                                   }
                               ]
                           },
                           {
-                              "label": "Einzelstellenverweis",
+                              "label": "Stellenkommentar",
                               "condition": {
                                   "type": "isActive",
                                   "activeType": "annotationMarker"
@@ -1063,15 +1108,16 @@
                                               "type": "editNestedDoc",
                                               "nodeType": "annotationMarker",
                                               "attr": "target",
-                                              "label": "Edit",
-                                              "targetNodeType": "annotation"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z\" /></svg>",
+                                              "targetNodeType": "annotation",
+                                              "ariaLabel": "Bearbeiten"
                                           }
                                       ]
                                   }
                               ]
                           },
                           {
-                              "label": "Globalkommentarverweis",
+                              "label": "Verweis auf den Apparat",
                               "condition": {
                                   "type": "isActive",
                                   "activeType": "annotationGlobal"
@@ -1120,7 +1166,8 @@
                                       "entities": [
                                           {
                                               "type": "closeNested",
-                                              "label": "Schließen"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z\" /></svg>",
+                                              "ariaLabel": "Zurück zum Haupttext"
                                           }
                                       ]
                                   }
@@ -1134,23 +1181,32 @@
                                       "entities": [
                                           {
                                               "type": "setNodeType",
-                                              "label": "Einzelstellenverweis",
-                                              "nodeType": "annotationMarker"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M10,16V19.08L13.08,16H20V4H4V16H10M6,7H18V9H6V7M6,11H15V13H6V11Z\" /></svg>",
+                                              "nodeType": "annotationMarker",
+                                              "ariaLabel": "Stellenkommentar"
                                           },
                                           {
                                               "type": "setNodeType",
-                                              "label": "Globalkommentarverweis",
-                                              "nodeType": "annotationGlobal"
-                                          },
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M20 2H4C2.9 2 2 2.9 2 4V16C2 17.1 2.9 18 4 18H8V21C8 21.6 8.4 22 9 22H9.5C9.7 22 10 21.9 10.2 21.7L13.9 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2M20 16H13.1L10 19.1V16H4V4H20V16M8 9V11H12.5L10.7 12.8L12 14L16 10L12 6L10.8 7.2L12.5 9H8Z\" /></svg>",
+                                              "nodeType": "annotationGlobal",
+                                              "ariaLabel": "Verweis auf den Apparat"
+                                          }
+                                      ]
+                                  },
+                                  {
+                                      "type": "menubar",
+                                      "entities": [
                                           {
                                               "type": "setNodeType",
-                                              "label": "Fremdsprachiger Text",
-                                              "nodeType": "foreignLanguage"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M12.87,15.07L10.33,12.56L10.36,12.53C12.1,10.59 13.34,8.36 14.07,6H17V4H10V2H8V4H1V6H12.17C11.5,7.92 10.44,9.75 9,11.35C8.07,10.32 7.3,9.19 6.69,8H4.69C5.42,9.63 6.42,11.17 7.67,12.56L2.58,17.58L4,19L9,14L12.11,17.11L12.87,15.07M18.5,10H16.5L12,22H14L15.12,19H19.87L21,22H23L18.5,10M15.88,17L17.5,12.67L19.12,17H15.88Z\" /></svg>",
+                                              "nodeType": "foreignLanguage",
+                                              "ariaLabel": "Fremdsprachiger Text"
                                           },
                                           {
                                               "type": "setNodeType",
-                                              "label": "Zitat",
-                                              "nodeType": "quotation"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M14,17H17L19,13V7H13V13H16M6,17H9L11,13V7H5V13H8L6,17Z\" /></svg>",
+                                              "nodeType": "quotation",
+                                              "ariaLabel": "Zitat"
                                           }
                                       ]
                                   }
@@ -1191,22 +1247,26 @@
                                           {
                                               "type": "toggleMark",
                                               "markType": "fontWeightBold",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z\" /></svg>",
+                                              "ariaLabel": "Fett"
                                           },
                                           {
                                               "type": "toggleMark",
                                               "markType": "fontStyleItalic",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M10,4V7H12.21L8.79,15H6V18H14V15H11.79L15.21,7H18V4H10Z\" /></svg>",
+                                              "ariaLabel": "Kursivtext"
                                           },
                                           {
                                               "type": "toggleMark",
                                               "markType": "letterSparse",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z\" /></svg>",
+                                              "ariaLabel": "Textsperrung"
                                           },
                                           {
                                               "type": "toggleMark",
                                               "markType": "sup",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z\" /></svg>",
+                                              "ariaLabel": "Hochgestellt"
                                           }
                                       ]
                                   }
@@ -1632,19 +1692,48 @@
                                       "type": "menubar",
                                       "entities": [
                                           {
-                                              "type": "setNodeType",
-                                              "label": "Überschrift",
-                                              "nodeType": "heading"
+                                              "type": "setNodeAttrValue",
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M14,18V16H16V6.31L13.5,7.75V5.44L16,4H18V16H20V18H14Z\" /></svg>",
+                                              "nodeType": "heading",
+                                              "attr": "level",
+                                              "value": "1",
+                                              "ariaLabel": "Überschrift - Ebene 1"
+                                          },
+                                          {
+                                              "type": "setNodeAttrValue",
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M21,18H15A2,2 0 0,1 13,16C13,15.47 13.2,15 13.54,14.64L18.41,9.41C18.78,9.05 19,8.55 19,8A2,2 0 0,0 17,6A2,2 0 0,0 15,8H13A4,4 0 0,1 17,4A4,4 0 0,1 21,8C21,9.1 20.55,10.1 19.83,10.83L15,16H21V18Z\" /></svg>",
+                                              "nodeType": "heading",
+                                              "attr": "level",
+                                              "value": "2",
+                                              "ariaLabel": "Überschrift - Ebene 2"
+                                          },
+                                          {
+                                              "type": "setNodeAttrValue",
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M15,4H19A2,2 0 0,1 21,6V16A2,2 0 0,1 19,18H15A2,2 0 0,1 13,16V15H15V16H19V12H15V10H19V6H15V7H13V6A2,2 0 0,1 15,4Z\" /></svg>",
+                                              "nodeType": "heading",
+                                              "attr": "level",
+                                              "value": "3",
+                                              "ariaLabel": "Überschrift - Ebene 3"
+                                          },
+                                          {
+                                              "type": "setNodeAttrValue",
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M3,4H5V10H9V4H11V18H9V12H5V18H3V4M18,18V13H13V11L18,4H20V11H21V13H20V18H18M18,11V7.42L15.45,11H18Z\" /></svg>",
+                                              "nodeType": "heading",
+                                              "attr": "level",
+                                              "value": "4",
+                                              "ariaLabel": "Überschrift - Ebene 4"
                                           },
                                           {
                                               "type": "setNodeType",
-                                              "label": "Absatz",
-                                              "nodeType": "paragraph"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M4,5H20V7H4V5M4,9H20V11H4V9M4,13H20V15H4V13M4,17H14V19H4V17Z\" /></svg>",
+                                              "nodeType": "paragraph",
+                                              "ariaLabel": "Absatz"
                                           },
                                           {
                                               "type": "setNodeType",
-                                              "label": "Quellenliste",
-                                              "nodeType": "sourceList"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M21,5C19.89,4.65 18.67,4.5 17.5,4.5C15.55,4.5 13.45,4.9 12,6C10.55,4.9 8.45,4.5 6.5,4.5C4.55,4.5 2.45,4.9 1,6V20.65C1,20.9 1.25,21.15 1.5,21.15C1.6,21.15 1.65,21.1 1.75,21.1C3.1,20.45 5.05,20 6.5,20C8.45,20 10.55,20.4 12,21.5C13.35,20.65 15.8,20 17.5,20C19.15,20 20.85,20.3 22.25,21.05C22.35,21.1 22.4,21.1 22.5,21.1C22.75,21.1 23,20.85 23,20.6V6C22.4,5.55 21.75,5.25 21,5M21,18.5C19.9,18.15 18.7,18 17.5,18C15.8,18 13.35,18.65 12,19.5V8C13.35,7.15 15.8,6.5 17.5,6.5C18.7,6.5 19.9,6.65 21,7V18.5Z\" /></svg>",
+                                              "nodeType": "sourceList",
+                                              "ariaLabel": "Quellenliste"
                                           }
                                       ]
                                   }
@@ -1665,27 +1754,46 @@
                                               "type": "setNodeType",
                                               "label": "Wortspanne",
                                               "nodeType": "wordRange"
-                                          },
+                                          }
+                                      ]
+                                  },
+                                  {
+                                      "type": "menubar",
+                                      "entities": [
                                           {
                                               "type": "setNodeType",
-                                              "label": "Einzelstellenverweis",
-                                              "nodeType": "annotationMarker"
-                                          },
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M20 2H4C2.9 2 2 2.9 2 4V16C2 17.1 2.9 18 4 18H8V21C8 21.6 8.4 22 9 22H9.5C9.7 22 10 21.9 10.2 21.7L13.9 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2M20 16H13.1L10 19.1V16H4V4H20V16M8 9V11H12.5L10.7 12.8L12 14L16 10L12 6L10.8 7.2L12.5 9H8Z\" /></svg>",
+                                              "nodeType": "annotationGlobal",
+                                              "ariaLabel": "Verweis innerhalb des Apparat"
+                                          }
+                                      ]
+                                  },
+                                  {
+                                      "type": "menubar",
+                                      "entities": [
                                           {
                                               "type": "setNodeType",
-                                              "label": "Globalkommentarverweis",
-                                              "nodeType": "annotationGlobal"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M12.87,15.07L10.33,12.56L10.36,12.53C12.1,10.59 13.34,8.36 14.07,6H17V4H10V2H8V4H1V6H12.17C11.5,7.92 10.44,9.75 9,11.35C8.07,10.32 7.3,9.19 6.69,8H4.69C5.42,9.63 6.42,11.17 7.67,12.56L2.58,17.58L4,19L9,14L12.11,17.11L12.87,15.07M18.5,10H16.5L12,22H14L15.12,19H19.87L21,22H23L18.5,10M15.88,17L17.5,12.67L19.12,17H15.88Z\" /></svg>",
+                                              "nodeType": "foreignLanguage",
+                                              "ariaLabel": "Fremdsprachiger Text"
                                           },
                                           {
                                               "type": "setNodeType",
-                                              "label": "Fremdsprachiger Text",
-                                              "nodeType": "foreignLanguage"
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M14,17H17L19,13V7H13V13H16M6,17H9L11,13V7H5V13H8L6,17Z\" /></svg>",
+                                              "nodeType": "quotation",
+                                              "ariaLabel": "Zitat"
                                           },
                                           {
                                               "type": "setNodeType",
-                                              "label": "Zitat",
-                                              "nodeType": "quotation"
-                                          },
+                                              "label": "<svg viewBox=\"0 0 24 24\"><path d=\"M11,18H13V16H11V18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,6A4,4 0 0,0 8,10H10A2,2 0 0,1 12,8A2,2 0 0,1 14,10C14,12 11,11.75 11,15H13C13,12.75 16,12.5 16,10A4,4 0 0,0 12,6Z\" /></svg>",
+                                              "nodeType": "missing",
+                                              "ariaLabel": "Nicht ermittelt"
+                                          }
+                                      ]
+                                  },
+                                  {
+                                      "type": "menubar",
+                                      "entities": [
                                           {
                                               "type": "setNodeType",
                                               "label": "Lemma",
@@ -1700,11 +1808,6 @@
                                               "type": "setNodeType",
                                               "label": "Variante",
                                               "nodeType": "reading"
-                                          },
-                                          {
-                                              "type": "setNodeType",
-                                              "label": "Nicht ermittelt",
-                                              "nodeType": "missing"
                                           }
                                       ]
                                   }
@@ -1745,17 +1848,20 @@
                                           {
                                               "type": "toggleMark",
                                               "markType": "fontWeightBold",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z\" /></svg>",
+                                              "ariaLabel": "Fett"
                                           },
                                           {
                                               "type": "toggleMark",
                                               "markType": "letterSparse",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z\" /></svg>",
+                                              "ariaLabel": "Textsperrung"
                                           },
                                           {
                                               "type": "toggleMark",
                                               "markType": "sup",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z\" /></svg>",
+                                              "ariaLabel": "Hochgestellt"
                                           }
                                       ]
                                   }
@@ -1768,34 +1874,6 @@
                                   "activeType": "heading"
                               },
                               "entities": [
-                                  {
-                                      "type": "menubar",
-                                      "entities": [
-                                          {
-                                              "type": "selectNodeAttr",
-                                              "nodeType": "heading",
-                                              "attr": "level",
-                                              "values": [
-                                                  {
-                                                      "label": "Ebene 1",
-                                                      "value": "1"
-                                                  },
-                                                  {
-                                                      "label": "Ebene 2",
-                                                      "value": "2"
-                                                  },
-                                                  {
-                                                      "label": "Ebene 3",
-                                                      "value": "3"
-                                                  },
-                                                  {
-                                                      "label": "Ebene 4",
-                                                      "value": "4"
-                                                  }
-                                              ]
-                                          }
-                                      ]
-                                  },
                                   {
                                       "type": "list",
                                       "entities": [
@@ -1803,7 +1881,7 @@
                                               "type": "setNodeAttrString",
                                               "nodeType": "heading",
                                               "attr": "headingId",
-                                              "label": "Navigationsmarker"
+                                              "label": "Kennzeichnung"
                                           }
                                       ]
                                   }
@@ -1842,28 +1920,32 @@
                                               "nodeType": "paragraph",
                                               "attr": "textAlign",
                                               "value": "left",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z\" /></svg>",
+                                              "ariaLabel": "Linksbündig"
                                           },
                                           {
                                               "type": "setNodeAttrValue",
                                               "nodeType": "paragraph",
                                               "attr": "textAlign",
                                               "value": "center",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M7,7H17V9H7V7M3,11H21V13H3V11M7,15H17V17H7V15M3,19H21V21H3V19Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M7,7H17V9H7V7M3,11H21V13H3V11M7,15H17V17H7V15M3,19H21V21H3V19Z\" /></svg>",
+                                              "ariaLabel": "Zentriert"
                                           },
                                           {
                                               "type": "setNodeAttrValue",
                                               "nodeType": "paragraph",
                                               "attr": "textAlign",
                                               "value": "right",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M9,7H21V9H9V7M3,11H21V13H3V11M9,15H21V17H9V15M3,19H21V21H3V19Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M9,7H21V9H9V7M3,11H21V13H3V11M9,15H21V17H9V15M3,19H21V21H3V19Z\" /></svg>",
+                                              "ariaLabel": "Rechtsbündig"
                                           },
                                           {
                                               "type": "setNodeAttrValue",
                                               "nodeType": "paragraph",
                                               "attr": "textAlign",
                                               "value": "justify",
-                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M3,7H21V9H3V7M3,11H21V13H3V11M3,15H21V17H3V15M3,19H21V21H3V19Z\" /></svg>"
+                                              "label": "<svg viewBox=\"0 0 24 24\" class=\"mdi-icon\"><path d=\"M3,3H21V5H3V3M3,7H21V9H3V7M3,11H21V13H3V11M3,15H21V17H3V15M3,19H21V21H3V19Z\" /></svg>",
+                                              "ariaLabel": "Blocksatz"
                                           }
                                       ]
                                   }
@@ -1890,27 +1972,7 @@
                               ]
                           },
                           {
-                              "label": "Einzelstellenverweis",
-                              "condition": {
-                                  "type": "isActive",
-                                  "activeType": "annotationMarker"
-                              },
-                              "entities": [
-                                  {
-                                      "type": "list",
-                                      "entities": [
-                                          {
-                                              "type": "setNodeAttrString",
-                                              "label": "Verweisidentifikator",
-                                              "nodeType": "annotationMarker",
-                                              "attr": "target"
-                                          }
-                                      ]
-                                  }
-                              ]
-                          },
-                          {
-                              "label": "Globalkommentarverweis",
+                              "label": "Verweis innerhalb des Apparat",
                               "condition": {
                                   "type": "isActive",
                                   "activeType": "annotationGlobal"
@@ -1953,7 +2015,7 @@
                   }
               },
               "metadata": {
-                  "label": "Metadata",
+                  "label": "Metadaten",
                   "type": "MetadataEditor",
                   "schema": [
                       {
diff --git a/editor/static/editor/css/app.css b/editor/static/editor/css/app.css
index ed60daa5d9b28e74460d77bde6d0c1a31040254e..d670df11b3ff3bbc5a4e274012d4962a9b37a797 100644
--- a/editor/static/editor/css/app.css
+++ b/editor/static/editor/css/app.css
@@ -5416,8 +5416,8 @@ nav.expanded *[role="menu"] textarea {
   margin-right: 1rem; }
 
 [role="menuitem"] svg, [role="menuitem"] svg.mdi-icon {
-  width: 18px;
-  height: 18px; }
+  width: 18px !important;
+  height: 18px !important; }
 
 svg.mdi-icon {
   height: 24px;
diff --git a/editor/static/editor/js/tei-editor.js b/editor/static/editor/js/tei-editor.js
index 94ed0b091bbae5ab06be9e47d58a23f4ec7e7d3f..0096cc6eef39c8b210a87f87b6da4404397d1d7f 100644
--- a/editor/static/editor/js/tei-editor.js
+++ b/editor/static/editor/js/tei-editor.js
@@ -29,5 +29,5 @@ function o(t){return i(t)||s(t)||a()}function i(t){if(Array.isArray(t)){for(var
     */
 function or(t){return or="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},or(t)}function ir(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ar(t,e,n){return e&&sr(t.prototype,e),n&&sr(t,n),t}function cr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ur(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?lr(Object(n),!0).forEach((function(e){cr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function fr(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&dr(t,e)}function pr(t){return pr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},pr(t)}function dr(t,e){return dr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},dr(t,e)}function hr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function vr(t,e){return!e||"object"!==typeof e&&"function"!==typeof e?hr(t):e}function mr(t,e){return br(t)||Sr(t,e)||kr()}function gr(t){return yr(t)||wr(t)||xr()}function yr(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function br(t){if(Array.isArray(t))return t}function wr(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function Sr(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done);r=!0)if(n.push(s.value),e&&n.length===e)break}catch(c){o=!0,i=c}finally{try{r||null==a["return"]||a["return"]()}finally{if(o)throw i}}return n}}function xr(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function kr(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function Cr(t){return t.replace(/(?:^\w|[A-Z]|\b\w)/g,(function(t,e){return 0===e?t.toLowerCase():t.toUpperCase()})).replace(/\s+/g,"")}n.d(e,"a",(function(){return Pr})),n.d(e,"b",(function(){return jr})),n.d(e,"c",(function(){return zr})),n.d(e,"d",(function(){return Br})),n.d(e,"e",(function(){return Tr})),n.d(e,"f",(function(){return Er})),n.d(e,"g",(function(){return $r}));var Or=function(){function t(e,n){var r=n.editor,o=n.extension,i=n.parent,s=n.node,a=n.view,c=n.decorations,l=n.getPos;ir(this,t),this.component=e,this.editor=r,this.extension=o,this.parent=i,this.node=s,this.view=a,this.decorations=c,this.isNode=!!this.node.marks,this.isMark=!this.isNode,this.getPos=this.isMark?this.getMarkPos:l,this.captureEvents=!0,this.dom=this.createDOM(),this.contentDOM=this.vm.$refs.content}return ar(t,[{key:"createDOM",value:function(){var t=this,e=nr["a"].extend(this.component),n={editor:this.editor,node:this.node,view:this.view,getPos:function(){return t.getPos()},decorations:this.decorations,selected:!1,options:this.extension.options,updateAttrs:function(e){return t.updateAttrs(e)}};return"function"===typeof this.extension.setSelection&&(this.setSelection=this.extension.setSelection),this.vm=new e({parent:this.parent,propsData:n}).$mount(),this.vm.$el}},{key:"update",value:function(t,e){return t.type===this.node.type&&(t===this.node&&this.decorations===e||(this.node=t,this.decorations=e,this.updateComponentProps({node:t,decorations:e}),!0))}},{key:"updateComponentProps",value:function(t){var e=this;if(this.vm._props){var n=nr["a"].config.silent;nr["a"].config.silent=!0,Object.entries(t).forEach((function(t){var n=mr(t,2),r=n[0],o=n[1];e.vm._props[r]=o})),nr["a"].config.silent=n}}},{key:"updateAttrs",value:function(t){if(this.view.editable){var e=this.view.state,n=this.node.type,r=this.getPos(),o=ur({},this.node.attrs,{},t),i=this.isMark?e.tr.removeMark(r.from,r.to,n).addMark(r.from,r.to,n.create(o)):e.tr.setNodeMarkup(r,null,o);this.view.dispatch(i)}}},{key:"ignoreMutation",value:function(t){return"selection"!==t.type&&(!this.contentDOM||!this.contentDOM.contains(t.target))}},{key:"stopEvent",value:function(t){var e=this;if("function"===typeof this.extension.stopEvent)return this.extension.stopEvent(t);var n=!!this.extension.schema.draggable;if(n&&"mousedown"===t.type){var r=t.target.closest&&t.target.closest("[data-drag-handle]"),o=r&&(this.dom===r||this.dom.contains(r));o&&(this.captureEvents=!1,document.addEventListener("dragend",(function(){e.captureEvents=!0}),{once:!0}))}var i="copy"===t.type,s="paste"===t.type,a="cut"===t.type,c=t.type.startsWith("drag")||"drop"===t.type;return!(n&&c||i||s||a)&&this.captureEvents}},{key:"selectNode",value:function(){this.updateComponentProps({selected:!0})}},{key:"deselectNode",value:function(){this.updateComponentProps({selected:!1})}},{key:"getMarkPos",value:function(){var t=this.view.posAtDOM(this.dom),e=this.view.state.doc.resolve(t),n=Object(er["b"])(e,this.node.type);return n}},{key:"destroy",value:function(){this.vm.$destroy()}}]),t}(),Mr=function(){function t(){ir(this,t)}return ar(t,[{key:"on",value:function(t,e){return this._callbacks=this._callbacks||{},this._callbacks[t]||(this._callbacks[t]=[]),this._callbacks[t].push(e),this}},{key:"emit",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this._callbacks=this._callbacks||{};var i=this._callbacks[t];return i&&i.forEach((function(t){return t.apply(e,r)})),this}},{key:"off",value:function(t,e){if(arguments.length){var n=this._callbacks?this._callbacks[t]:null;n&&(e?this._callbacks[t]=n.filter((function(t){return t!==e})):delete this._callbacks[t])}else this._callbacks={};return this}}]),t}(),Nr=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ir(this,t),this.options=ur({},this.defaultOptions,{},e)}return ar(t,[{key:"init",value:function(){return null}},{key:"bindEditor",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.editor=t}},{key:"inputRules",value:function(){return[]}},{key:"pasteRules",value:function(){return[]}},{key:"keys",value:function(){return{}}},{key:"name",get:function(){return null}},{key:"type",get:function(){return"extension"}},{key:"update",get:function(){return function(){}}},{key:"defaultOptions",get:function(){return{}}},{key:"plugins",get:function(){return[]}}]),t}(),Ar=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;ir(this,t),e.forEach((function(t){t.bindEditor(n),t.init()})),this.extensions=e}return ar(t,[{key:"keymaps",value:function(t){var e=t.schema,n=this.extensions.filter((function(t){return["extension"].includes(t.type)})).filter((function(t){return t.keys})).map((function(t){return t.keys({schema:e})})),r=this.extensions.filter((function(t){return["node","mark"].includes(t.type)})).filter((function(t){return t.keys})).map((function(t){return t.keys({type:e["".concat(t.type,"s")][t.name],schema:e})}));return[].concat(gr(n),gr(r)).map((function(t){return Object(Ln["b"])(t)}))}},{key:"inputRules",value:function(t){var e=t.schema,n=t.excludedExtensions;if(!(n instanceof Array)&&n)return[];var r=n instanceof Array?this.extensions.filter((function(t){return!n.includes(t.name)})):this.extensions,o=r.filter((function(t){return["extension"].includes(t.type)})).filter((function(t){return t.inputRules})).map((function(t){return t.inputRules({schema:e})})),i=r.filter((function(t){return["node","mark"].includes(t.type)})).filter((function(t){return t.inputRules})).map((function(t){return t.inputRules({type:e["".concat(t.type,"s")][t.name],schema:e})}));return[].concat(gr(o),gr(i)).reduce((function(t,e){return[].concat(gr(t),gr(e))}),[])}},{key:"pasteRules",value:function(t){var e=t.schema,n=t.excludedExtensions;if(!(n instanceof Array)&&n)return[];var r=n instanceof Array?this.extensions.filter((function(t){return!n.includes(t.name)})):this.extensions,o=r.filter((function(t){return["extension"].includes(t.type)})).filter((function(t){return t.pasteRules})).map((function(t){return t.pasteRules({schema:e})})),i=r.filter((function(t){return["node","mark"].includes(t.type)})).filter((function(t){return t.pasteRules})).map((function(t){return t.pasteRules({type:e["".concat(t.type,"s")][t.name],schema:e})}));return[].concat(gr(o),gr(i)).reduce((function(t,e){return[].concat(gr(t),gr(e))}),[])}},{key:"commands",value:function(t){var e=t.schema,n=t.view;return this.extensions.filter((function(t){return t.commands})).reduce((function(t,r){var o=r.name,i=r.type,s={},a=r.commands(ur({schema:e},["node","mark"].includes(i)?{type:e["".concat(i,"s")][o]}:{})),c=function(t,e){return!!n.editable&&(n.focus(),t(e)(n.state,n.dispatch,n))},l=function(t,e){Array.isArray(e)?s[t]=function(t){return e.forEach((function(e){return c(e,t)}))}:"function"===typeof e&&(s[t]=function(t){return c(e,t)})};return"object"===or(a)?Object.entries(a).forEach((function(t){var e=mr(t,2),n=e[0],r=e[1];l(n,r)})):l(o,a),ur({},t,{},s)}),{})}},{key:"nodes",get:function(){return this.extensions.filter((function(t){return"node"===t.type})).reduce((function(t,e){var n=e.name,r=e.schema;return ur({},t,cr({},n,r))}),{})}},{key:"options",get:function(){var t=this.view;return this.extensions.reduce((function(e,n){return ur({},e,cr({},n.name,new Proxy(n.options,{set:function(e,r,o){var i=e[r]!==o;return Object.assign(e,cr({},r,o)),i&&n.update(t),!0}})))}),{})}},{key:"marks",get:function(){return this.extensions.filter((function(t){return"mark"===t.type})).reduce((function(t,e){var n=e.name,r=e.schema;return ur({},t,cr({},n,r))}),{})}},{key:"plugins",get:function(){return this.extensions.filter((function(t){return t.plugins})).reduce((function(t,e){var n=e.plugins;return[].concat(gr(t),gr(n))}),[])}}]),t}();function _r(t){var e=document.createElement("style");e.type="text/css",e.textContent=t;var n=document,r=n.head,o=r.firstChild;o?r.insertBefore(e,o):r.appendChild(e)}var Tr=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ir(this,e),vr(this,pr(e).call(this,t))}return fr(e,t),ar(e,[{key:"command",value:function(){return function(){}}},{key:"type",get:function(){return"mark"}},{key:"view",get:function(){return null}},{key:"schema",get:function(){return null}}]),e}(Nr);function Dr(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Math.min(Math.max(parseInt(t,10),e),n)}var Er=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ir(this,e),vr(this,pr(e).call(this,t))}return fr(e,t),ar(e,[{key:"command",value:function(){return function(){}}},{key:"type",get:function(){return"node"}},{key:"view",get:function(){return null}},{key:"schema",get:function(){return null}}]),e}(Nr),Pr=function(t){function e(){return ir(this,e),vr(this,pr(e).apply(this,arguments))}return fr(e,t),ar(e,[{key:"name",get:function(){return"doc"}},{key:"schema",get:function(){return{content:"block+"}}}]),e}(Er),Rr=function(t){function e(){return ir(this,e),vr(this,pr(e).apply(this,arguments))}return fr(e,t),ar(e,[{key:"commands",value:function(t){var e=t.type;return function(){return Object(rr["b"])(e)}}},{key:"name",get:function(){return"paragraph"}},{key:"schema",get:function(){return{content:"inline*",group:"block",draggable:!1,parseDOM:[{tag:"p"}],toDOM:function(){return["p",0]}}}}]),e}(Er),$r=function(t){function e(){return ir(this,e),vr(this,pr(e).apply(this,arguments))}return fr(e,t),ar(e,[{key:"name",get:function(){return"text"}},{key:"schema",get:function(){return{group:"inline"}}}]),e}(Er),Ir='.ProseMirror {\n  position: relative;\n}\n\n.ProseMirror {\n  word-wrap: break-word;\n  white-space: pre-wrap;\n  -webkit-font-variant-ligatures: none;\n  font-variant-ligatures: none;\n}\n\n.ProseMirror pre {\n  white-space: pre-wrap;\n}\n\n.ProseMirror-gapcursor {\n  display: none;\n  pointer-events: none;\n  position: absolute;\n}\n\n.ProseMirror-gapcursor:after {\n  content: "";\n  display: block;\n  position: absolute;\n  top: -2px;\n  width: 20px;\n  border-top: 1px solid black;\n  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n  to {\n    visibility: hidden;\n  }\n}\n\n.ProseMirror-hideselection *::selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n  background: transparent;\n}\n\n.ProseMirror-hideselection * {\n  caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n  display: block;\n}\n',jr=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ir(this,e),t=vr(this,pr(e).call(this)),t.defaultOptions={editorProps:{},editable:!0,autoFocus:null,extensions:[],content:"",topNode:"doc",emptyDocument:{type:"doc",content:[{type:"paragraph"}]},useBuiltInExtensions:!0,disableInputRules:!1,disablePasteRules:!1,dropCursor:{},parseOptions:{},injectCSS:!0,onInit:function(){},onTransaction:function(){},onUpdate:function(){},onFocus:function(){},onBlur:function(){},onPaste:function(){},onDrop:function(){}},t.events=["init","transaction","update","focus","blur","paste","drop"],t.init(n),t}return fr(e,t),ar(e,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.setOptions(ur({},this.defaultOptions,{},e)),this.focused=!1,this.selection={from:0,to:0},this.element=document.createElement("div"),this.extensions=this.createExtensions(),this.nodes=this.createNodes(),this.marks=this.createMarks(),this.schema=this.createSchema(),this.plugins=this.createPlugins(),this.keymaps=this.createKeymaps(),this.inputRules=this.createInputRules(),this.pasteRules=this.createPasteRules(),this.view=this.createView(),this.commands=this.createCommands(),this.setActiveNodesAndMarks(),this.options.injectCSS&&_r(Ir),null!==this.options.autoFocus&&this.focus(this.options.autoFocus),this.events.forEach((function(e){t.on(e,t.options[Cr("on ".concat(e))]||function(){})})),this.emit("init",{view:this.view,state:this.state}),this.extensions.view=this.view}},{key:"setOptions",value:function(t){this.options=ur({},this.options,{},t),this.view&&this.state&&this.view.updateState(this.state)}},{key:"createExtensions",value:function(){return new Ar([].concat(gr(this.builtInExtensions),gr(this.options.extensions)),this)}},{key:"createPlugins",value:function(){return this.extensions.plugins}},{key:"createKeymaps",value:function(){return this.extensions.keymaps({schema:this.schema})}},{key:"createInputRules",value:function(){return this.extensions.inputRules({schema:this.schema,excludedExtensions:this.options.disableInputRules})}},{key:"createPasteRules",value:function(){return this.extensions.pasteRules({schema:this.schema,excludedExtensions:this.options.disablePasteRules})}},{key:"createCommands",value:function(){return this.extensions.commands({schema:this.schema,view:this.view})}},{key:"createNodes",value:function(){return this.extensions.nodes}},{key:"createMarks",value:function(){return this.extensions.marks}},{key:"createSchema",value:function(){return new o["Schema"]({topNode:this.options.topNode,nodes:this.nodes,marks:this.marks})}},{key:"createState",value:function(){var t=this;return r["EditorState"].create({schema:this.schema,doc:this.createDocument(this.options.content),plugins:[].concat(gr(this.plugins),[Object(tr["b"])({rules:this.inputRules})],gr(this.pasteRules),gr(this.keymaps),[Object(Ln["b"])({Backspace:tr["c"]}),Object(Ln["b"])(Zn["a"]),Vn(this.options.dropCursor),Un(),new r["Plugin"]({key:new r["PluginKey"]("editable"),props:{editable:function(){return t.options.editable}}}),new r["Plugin"]({props:{attributes:{tabindex:0},handleDOMEvents:{focus:function(e,n){t.focused=!0,t.emit("focus",{event:n,state:e.state,view:e});var r=t.state.tr.setMeta("focused",!0);t.view.dispatch(r)},blur:function(e,n){t.focused=!1,t.emit("blur",{event:n,state:e.state,view:e});var r=t.state.tr.setMeta("focused",!1);t.view.dispatch(r)}}}}),new r["Plugin"]({props:this.options.editorProps})])})}},{key:"createDocument",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.options.parseOptions;if(null===t)return this.schema.nodeFromJSON(this.options.emptyDocument);if("object"===or(t))try{return this.schema.nodeFromJSON(t)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",r),this.schema.nodeFromJSON(this.options.emptyDocument)}if("string"===typeof t){var n=document.createElement("div");return n.innerHTML=t.trim(),o["DOMParser"].fromSchema(this.schema).parse(n,e)}return!1}},{key:"createView",value:function(){var t=this;return new Dn(this.element,{state:this.createState(),handlePaste:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.emit.apply(t,["paste"].concat(n))},handleDrop:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.emit.apply(t,["drop"].concat(n))},dispatchTransaction:this.dispatchTransaction.bind(this)})}},{key:"setParentComponent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;t&&this.view.setProps({nodeViews:this.initNodeViews({parent:t,extensions:[].concat(gr(this.builtInExtensions),gr(this.options.extensions))})})}},{key:"initNodeViews",value:function(t){var e=this,n=t.parent,r=t.extensions;return r.filter((function(t){return["node","mark"].includes(t.type)})).filter((function(t){return t.view})).reduce((function(t,r){var o=function(t,o,i,s){var a=r.view;return new Or(a,{editor:e,extension:r,parent:n,node:t,view:o,getPos:i,decorations:s})};return ur({},t,cr({},r.name,o))}),{})}},{key:"dispatchTransaction",value:function(t){var e=this.state.apply(t);this.view.updateState(e),this.selection={from:this.state.selection.from,to:this.state.selection.to},this.setActiveNodesAndMarks(),this.emit("transaction",{getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:t}),t.docChanged&&!t.getMeta("preventUpdate")&&this.emitUpdate(t)}},{key:"emitUpdate",value:function(t){this.emit("update",{getHTML:this.getHTML.bind(this),getJSON:this.getJSON.bind(this),state:this.state,transaction:t})}},{key:"resolveSelection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(this.selection&&null===t)return this.selection;if("start"===t||!0===t)return{from:0,to:0};if("end"===t){var e=this.state.doc;return{from:e.content.size,to:e.content.size}}return{from:t,to:t}}},{key:"focus",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!(this.view.focused&&null===e||!1===e)){var n=this.resolveSelection(e),r=n.from,o=n.to;this.setSelection(r,o),setTimeout((function(){return t.view.focus()}),10)}}},{key:"setSelection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.state,o=n.doc,i=n.tr,s=Dr(t,0,o.content.size),a=Dr(e,0,o.content.size),c=r["TextSelection"].create(o,s,a),l=i.setSelection(c);this.view.dispatch(l)}},{key:"blur",value:function(){this.view.dom.blur()}},{key:"getSchemaJSON",value:function(){return JSON.parse(JSON.stringify({nodes:this.extensions.nodes,marks:this.extensions.marks}))}},{key:"getHTML",value:function(){var t=document.createElement("div"),e=o["DOMSerializer"].fromSchema(this.schema).serializeFragment(this.state.doc.content);return t.appendChild(e),t.innerHTML}},{key:"getJSON",value:function(){return this.state.doc.toJSON()}},{key:"setContent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,o=this.state,i=o.doc,s=o.tr,a=this.createDocument(t,n),c=r["TextSelection"].create(i,0,i.content.size),l=s.setSelection(c).replaceSelectionWith(a,!1).setMeta("preventUpdate",!e);this.view.dispatch(l)}},{key:"clearContent",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.setContent(this.options.emptyDocument,t)}},{key:"setActiveNodesAndMarks",value:function(){var t=this;this.activeMarks=Object.entries(this.schema.marks).reduce((function(e,n){var r=mr(n,2),o=r[0],i=r[1];return ur({},e,cr({},o,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(er["c"])(t.state,i,e)})))}),{}),this.activeMarkAttrs=Object.entries(this.schema.marks).reduce((function(e,n){var r=mr(n,2),o=r[0],i=r[1];return ur({},e,cr({},o,Object(er["a"])(t.state,i)))}),{}),this.activeNodes=Object.entries(this.schema.nodes).reduce((function(e,n){var r=mr(n,2),o=r[0],i=r[1];return ur({},e,cr({},o,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(er["d"])(t.state,i,e)})))}),{})}},{key:"getMarkAttrs",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.activeMarkAttrs[t]}},{key:"registerPlugin",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(t){var e=this.state.reconfigure({plugins:this.state.plugins.concat([t])});this.view.updateState(e)}}},{key:"unregisterPlugin",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(t&&this.view.docView){var e=this.state.reconfigure({plugins:this.state.plugins.filter((function(e){return!e.key.startsWith("".concat(t,"$"))}))});this.view.updateState(e)}}},{key:"destroy",value:function(){this.view&&this.view.destroy()}},{key:"builtInExtensions",get:function(){return this.options.useBuiltInExtensions?[new Pr,new $r,new Rr]:[]}},{key:"state",get:function(){return this.view?this.view.state:null}},{key:"isActive",get:function(){return Object.entries(ur({},this.activeMarks,{},this.activeNodes)).reduce((function(t,e){var n=mr(e,2),r=n[0],o=n[1];return ur({},t,cr({},r,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(t)})))}),{})}}]),e}(Mr),zr={props:{editor:{default:null,type:Object}},watch:{editor:{immediate:!0,handler:function(t){var e=this;t&&t.element&&this.$nextTick((function(){e.$el.appendChild(t.element.firstChild),t.setParentComponent(e)}))}}},render:function(t){return t("div")},beforeDestroy:function(){this.editor.element=this.$el}},Fr=function(){function t(e){var n=this,r=e.options;ir(this,t),this.options=r,this.preventHide=!1,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler),this.options.editor.on("blur",(function(){n.preventHide?n.preventHide=!1:n.options.editor.emit("menubar:focusUpdate",!1)}))}return ar(t,[{key:"handleClick",value:function(){this.preventHide=!0}},{key:"destroy",value:function(){this.options.element.removeEventListener("mousedown",this.mousedownHandler)}}]),t}();function Vr(t){return new r["Plugin"]({key:new r["PluginKey"]("menu_bar"),view:function(e){return new Fr({editorView:e,options:t})}})}var Br={props:{editor:{default:null,type:Object}},data:function(){return{focused:!1}},watch:{editor:{immediate:!0,handler:function(t){var e=this;t&&this.$nextTick((function(){t.registerPlugin(Vr({editor:t,element:e.$el})),e.focused=t.focused,t.on("focus",(function(){e.focused=!0})),t.on("menubar:focusUpdate",(function(t){e.focused=t}))}))}}},render:function(){return this.editor?this.$scopedSlots.default({focused:this.focused,focus:this.editor.focus,commands:this.editor.commands,isActive:this.editor.isActive,getMarkAttrs:this.editor.getMarkAttrs.bind(this.editor)}):null}};function Lr(t,e,n){var r=document.createRange();return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r}function Wr(t,e){var n=t.getClientRects();return n.length?n[e<0?0:n.length-1]:t.getBoundingClientRect()}function qr(t,e){var n,r,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.docView.domFromPos(e),s=i.node,a=i.offset;if(3===s.nodeType)o&&a<s.nodeValue.length?(r=Wr(Lr(s,a-1,a),-1),n="right"):a<s.nodeValue.length&&(r=Wr(Lr(s,a,a+1),-1),n="left");else if(s.firstChild){if(a<s.childNodes.length){var c=s.childNodes[a];r=Wr(3===c.nodeType?Lr(c):c,-1),n="left"}if((!r||r.top===r.bottom)&&a){var l=s.childNodes[a-1];r=Wr(3===l.nodeType?Lr(l):l,1),n="right"}}else r=s.getBoundingClientRect(),n="left";var u=r[n];return{top:r.top,bottom:r.bottom,left:u,right:u}}var Kr=function(){function t(e){var n=this,r=e.options,o=e.editorView;ir(this,t),this.options=ur({},{element:null,keepInBounds:!0,onUpdate:function(){return!1}},{},r),this.editorView=o,this.isActive=!1,this.left=0,this.bottom=0,this.top=0,this.preventHide=!1,this.mousedownHandler=this.handleClick.bind(this),this.options.element.addEventListener("mousedown",this.mousedownHandler),this.options.editor.on("focus",(function(t){var e=t.view;n.update(e)})),this.options.editor.on("blur",(function(t){var e=t.event;n.preventHide?n.preventHide=!1:n.hide(e)}))}return ar(t,[{key:"handleClick",value:function(){this.preventHide=!0}},{key:"update",value:function(t,e){var n=t.state;if(!t.composing&&!(e&&e.doc.eq(n.doc)&&e.selection.eq(n.selection)))if(n.selection.empty)this.hide();else{var r=n.selection,o=r.from,i=r.to,s=qr(t,o),a=qr(t,i,!0),c=this.options.element.offsetParent;if(c){var l=c.getBoundingClientRect(),u=this.options.element.getBoundingClientRect(),f=(s.left+a.left)/2-l.left;this.left=Math.round(this.options.keepInBounds?Math.min(l.width-u.width/2,Math.max(f,u.width/2)):f),this.bottom=Math.round(l.bottom-s.top),this.top=Math.round(a.bottom-l.top),this.isActive=!0,this.sendUpdate()}else this.hide()}}},{key:"sendUpdate",value:function(){this.options.onUpdate({isActive:this.isActive,left:this.left,bottom:this.bottom,top:this.top})}},{key:"hide",value:function(t){t&&t.relatedTarget&&this.options.element.parentNode.contains(t.relatedTarget)||(this.isActive=!1,this.sendUpdate())}},{key:"destroy",value:function(){this.options.element.removeEventListener("mousedown",this.mousedownHandler)}}]),t}();function Hr(t){return new r["Plugin"]({key:new r["PluginKey"]("menu_bubble"),view:function(e){return new Kr({editorView:e,options:t})}})}Boolean},cdf9:function(t,e,n){var r=n("825a"),o=n("861d"),i=n("f069");t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t),s=n.resolve;return s(e),n.promise}},ce4e:function(t,e,n){var r=n("da84"),o=n("9112");t.exports=function(t,e){try{o(r,t,e)}catch(n){r[t]=e}return e}},d012:function(t,e){t.exports={}},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d066:function(t,e,n){var r=n("428f"),o=n("da84"),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][e]||o[t]&&o[t][e]}},d1e7:function(t,e,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:r},d28b:function(t,e,n){var r=n("746f");r("iterator")},d2bb:function(t,e,n){var r=n("825a"),o=n("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(n,[]),e=n instanceof Array}catch(i){}return function(n,i){return r(n),o(i),e?t.call(n,i):n.__proto__=i,n}}():void 0)},d3b7:function(t,e,n){var r=n("00ee"),o=n("6eeb"),i=n("b041");r||o(Object.prototype,"toString",i,{unsafe:!0})},d44e:function(t,e,n){var r=n("9bf2").f,o=n("5135"),i=n("b622"),s=i("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,s)&&r(t,s,{configurable:!0,value:e})}},d4ec:function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return r}))},d784:function(t,e,n){"use strict";var r=n("9112"),o=n("6eeb"),i=n("d039"),s=n("b622"),a=n("9263"),c=s("species"),l=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),u=!i((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,f){var p=s(t),d=!i((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),h=d&&!i((function(){var e=!1,n=/a/;return"split"===t&&(n={},n.constructor={},n.constructor[c]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return e=!0,null},n[p](""),!e}));if(!d||!h||"replace"===t&&!l||"split"===t&&!u){var v=/./[p],m=n(p,""[t],(function(t,e,n,r,o){return e.exec===a?d&&!o?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),g=m[0],y=m[1];o(String.prototype,t,g),o(RegExp.prototype,p,2==e?function(t,e){return y.call(t,this,e)}:function(t){return y.call(t,this)}),f&&r(RegExp.prototype[p],"sham",!0)}}},d81d:function(t,e,n){"use strict";var r=n("23e7"),o=n("b727").map,i=n("d039"),s=n("1dde"),a=s("map"),c=a&&!i((function(){[].map.call({length:-1,0:1},(function(t){throw t}))}));r({target:"Array",proto:!0,forced:!a||!c},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},da84:function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")()}).call(this,n("c8ba"))},dbb4:function(t,e,n){var r=n("23e7"),o=n("83ab"),i=n("56ef"),s=n("fc6a"),a=n("06cf"),c=n("8418");r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){var e,n,r=s(t),o=a.f,l=i(r),u={},f=0;while(l.length>f)n=o(r,e=l[f++]),void 0!==n&&c(u,e,n);return u}})},ddb0:function(t,e,n){var r=n("da84"),o=n("fdbc"),i=n("e260"),s=n("9112"),a=n("b622"),c=a("iterator"),l=a("toStringTag"),u=i.values;for(var f in o){var p=r[f],d=p&&p.prototype;if(d){if(d[c]!==u)try{s(d,c,u)}catch(v){d[c]=u}if(d[l]||s(d,l,f),o[f])for(var h in i)if(d[h]!==i[h])try{s(d,h,i[h])}catch(v){d[h]=i[h]}}}},df75:function(t,e,n){var r=n("ca84"),o=n("7839");t.exports=Object.keys||function(t){return r(t,o)}},e01a:function(t,e,n){"use strict";var r=n("23e7"),o=n("83ab"),i=n("da84"),s=n("5135"),a=n("861d"),c=n("9bf2").f,l=n("e893"),u=i.Symbol;if(o&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var f={},p=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof p?new u(t):void 0===t?u():u(t);return""===t&&(f[e]=!0),e};l(p,u);var d=p.prototype=u.prototype;d.constructor=p;var h=d.toString,v="Symbol(test)"==String(u("test")),m=/^Symbol\((.*)\)[^)]+$/;c(d,"description",{configurable:!0,get:function(){var t=a(this)?this.valueOf():this,e=h.call(t);if(s(f,t))return"";var n=v?e.slice(7,-1):e.replace(m,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:p})}},e163:function(t,e,n){var r=n("5135"),o=n("7b0b"),i=n("f772"),s=n("e177"),a=i("IE_PROTO"),c=Object.prototype;t.exports=s?Object.getPrototypeOf:function(t){return t=o(t),r(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},e177:function(t,e,n){var r=n("d039");t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},e260:function(t,e,n){"use strict";var r=n("fc6a"),o=n("44d2"),i=n("3f8c"),s=n("69f3"),a=n("7dd0"),c="Array Iterator",l=s.set,u=s.getterFor(c);t.exports=a(Array,"Array",(function(t,e){l(this,{type:c,target:r(t),index:0,kind:e})}),(function(){var t=u(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},e2cc:function(t,e,n){var r=n("6eeb");t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},e439:function(t,e,n){var r=n("23e7"),o=n("d039"),i=n("fc6a"),s=n("06cf").f,a=n("83ab"),c=o((function(){s(1)})),l=!a||c;r({target:"Object",stat:!0,forced:l,sham:!a},{getOwnPropertyDescriptor:function(t,e){return s(i(t),e)}})},e583:function(t,e,n){var r=n("da84"),o=n("58a8").trim,i=n("5899"),s=r.parseInt,a=/^[+-]?0[Xx]/,c=8!==s(i+"08")||22!==s(i+"0x16");t.exports=c?function(t,e){var n=o(String(t));return s(n,e>>>0||(a.test(n)?16:10))}:s},e667:function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}}},e6cf:function(t,e,n){"use strict";var r,o,i,s,a=n("23e7"),c=n("c430"),l=n("da84"),u=n("d066"),f=n("fea9"),p=n("6eeb"),d=n("e2cc"),h=n("d44e"),v=n("2626"),m=n("861d"),g=n("1c0b"),y=n("19aa"),b=n("c6b6"),w=n("8925"),S=n("2266"),x=n("1c7e"),k=n("4840"),C=n("2cf4").set,O=n("b575"),M=n("cdf9"),N=n("44de"),A=n("f069"),_=n("e667"),T=n("69f3"),D=n("94ca"),E=n("b622"),P=n("60ae"),R=E("species"),$="Promise",I=T.get,j=T.set,z=T.getterFor($),F=f,V=l.TypeError,B=l.document,L=l.process,W=u("fetch"),q=A.f,K=q,H="process"==b(L),J=!!(B&&B.createEvent&&l.dispatchEvent),U="unhandledrejection",G="rejectionhandled",X=0,Y=1,Q=2,Z=1,tt=2,et=D($,(function(){var t=w(F)!==String(F);if(!t){if(66===P)return!0;if(!H&&"function"!=typeof PromiseRejectionEvent)return!0}if(c&&!F.prototype["finally"])return!0;if(P>=51&&/native code/.test(F))return!1;var e=F.resolve(1),n=function(t){t((function(){}),(function(){}))},r=e.constructor={};return r[R]=n,!(e.then((function(){}))instanceof n)})),nt=et||!x((function(t){F.all(t)["catch"]((function(){}))})),rt=function(t){var e;return!(!m(t)||"function"!=typeof(e=t.then))&&e},ot=function(t,e,n){if(!e.notified){e.notified=!0;var r=e.reactions;O((function(){var o=e.value,i=e.state==Y,s=0;while(r.length>s){var a,c,l,u=r[s++],f=i?u.ok:u.fail,p=u.resolve,d=u.reject,h=u.domain;try{f?(i||(e.rejection===tt&&ct(t,e),e.rejection=Z),!0===f?a=o:(h&&h.enter(),a=f(o),h&&(h.exit(),l=!0)),a===u.promise?d(V("Promise-chain cycle")):(c=rt(a))?c.call(a,p,d):p(a)):d(o)}catch(v){h&&!l&&h.exit(),d(v)}}e.reactions=[],e.notified=!1,n&&!e.rejection&&st(t,e)}))}},it=function(t,e,n){var r,o;J?(r=B.createEvent("Event"),r.promise=e,r.reason=n,r.initEvent(t,!1,!0),l.dispatchEvent(r)):r={promise:e,reason:n},(o=l["on"+t])?o(r):t===U&&N("Unhandled promise rejection",n)},st=function(t,e){C.call(l,(function(){var n,r=e.value,o=at(e);if(o&&(n=_((function(){H?L.emit("unhandledRejection",r,t):it(U,t,r)})),e.rejection=H||at(e)?tt:Z,n.error))throw n.value}))},at=function(t){return t.rejection!==Z&&!t.parent},ct=function(t,e){C.call(l,(function(){H?L.emit("rejectionHandled",t):it(G,t,e.value)}))},lt=function(t,e,n,r){return function(o){t(e,n,o,r)}},ut=function(t,e,n,r){e.done||(e.done=!0,r&&(e=r),e.value=n,e.state=Q,ot(t,e,!0))},ft=function(t,e,n,r){if(!e.done){e.done=!0,r&&(e=r);try{if(t===n)throw V("Promise can't be resolved itself");var o=rt(n);o?O((function(){var r={done:!1};try{o.call(n,lt(ft,t,r,e),lt(ut,t,r,e))}catch(i){ut(t,r,i,e)}})):(e.value=n,e.state=Y,ot(t,e,!1))}catch(i){ut(t,{done:!1},i,e)}}};et&&(F=function(t){y(this,F,$),g(t),r.call(this);var e=I(this);try{t(lt(ft,this,e),lt(ut,this,e))}catch(n){ut(this,e,n)}},r=function(t){j(this,{type:$,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:X,value:void 0})},r.prototype=d(F.prototype,{then:function(t,e){var n=z(this),r=q(k(this,F));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=H?L.domain:void 0,n.parent=!0,n.reactions.push(r),n.state!=X&&ot(this,n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=I(t);this.promise=t,this.resolve=lt(ft,t,e),this.reject=lt(ut,t,e)},A.f=q=function(t){return t===F||t===i?new o(t):K(t)},c||"function"!=typeof f||(s=f.prototype.then,p(f.prototype,"then",(function(t,e){var n=this;return new F((function(t,e){s.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof W&&a({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return M(F,W.apply(l,arguments))}}))),a({global:!0,wrap:!0,forced:et},{Promise:F}),h(F,$,!1,!0),v($),i=u($),a({target:$,stat:!0,forced:et},{reject:function(t){var e=q(this);return e.reject.call(void 0,t),e.promise}}),a({target:$,stat:!0,forced:c||et},{resolve:function(t){return M(c&&this===i?F:this,t)}}),a({target:$,stat:!0,forced:nt},{all:function(t){var e=this,n=q(e),r=n.resolve,o=n.reject,i=_((function(){var n=g(e.resolve),i=[],s=0,a=1;S(t,(function(t){var c=s++,l=!1;i.push(void 0),a++,n.call(e,t).then((function(t){l||(l=!0,i[c]=t,--a||r(i))}),o)})),--a||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=q(e),r=n.reject,o=_((function(){var o=g(e.resolve);S(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},e893:function(t,e,n){var r=n("5135"),o=n("56ef"),i=n("06cf"),s=n("9bf2");t.exports=function(t,e){for(var n=o(e),a=s.f,c=i.f,l=0;l<n.length;l++){var u=n[l];r(t,u)||a(t,u,c(e,u))}}},e8b5:function(t,e,n){var r=n("c6b6");t.exports=Array.isArray||function(t){return"Array"==r(t)}},e95a:function(t,e,n){var r=n("b622"),o=n("3f8c"),i=r("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||s[i]===t)}},f069:function(t,e,n){"use strict";var r=n("1c0b"),o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},f183:function(t,e,n){var r=n("d012"),o=n("861d"),i=n("5135"),s=n("9bf2").f,a=n("90e3"),c=n("bb2f"),l=a("meta"),u=0,f=Object.isExtensible||function(){return!0},p=function(t){s(t,l,{value:{objectID:"O"+ ++u,weakData:{}}})},d=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,l)){if(!f(t))return"F";if(!e)return"E";p(t)}return t[l].objectID},h=function(t,e){if(!i(t,l)){if(!f(t))return!0;if(!e)return!1;p(t)}return t[l].weakData},v=function(t){return c&&m.REQUIRED&&f(t)&&!i(t,l)&&p(t),t},m=t.exports={REQUIRED:!1,fastKey:d,getWeakData:h,onFreeze:v};r[l]=!0},f5df:function(t,e,n){var r=n("00ee"),o=n("c6b6"),i=n("b622"),s=i("toStringTag"),a="Arguments"==o(function(){return arguments}()),c=function(t,e){try{return t[e]}catch(n){}};t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=c(e=Object(t),s))?n:a?o(e):"Object"==(r=o(e))&&"function"==typeof e.callee?"Arguments":r}},f772:function(t,e,n){var r=n("5692"),o=n("90e3"),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},f8c2:function(t,e,n){var r=n("1c0b");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},f95e:function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return l}));var r=n("5313"),o=(n("0ac0"),function(t,e){this.match=t,this.handler="string"==typeof e?i(e):e});function i(t){return function(e,n,r,o){var i=t;if(n[1]){var s=n[0].lastIndexOf(n[1]);i+=n[0].slice(s+n[1].length),r+=s;var a=r-o;a>0&&(i=n[0].slice(s-a,s)+i,r=o)}return e.tr.insertText(i,r,o)}}var s=500;function a(t){var e=t.rules,n=new r["Plugin"]({state:{init:function(){return null},apply:function(t,e){var n=t.getMeta(this);return n||(t.selectionSet||t.docChanged?null:e)}},props:{handleTextInput:function(t,r,o,i){return c(t,r,o,i,e,n)},handleDOMEvents:{compositionend:function(t){setTimeout((function(){var r=t.state.selection,o=r.$cursor;o&&c(t,o.pos,o.pos,"",e,n)}))}}},isInputRules:!0});return n}function c(t,e,n,r,o,i){if(t.composing)return!1;var a=t.state,c=a.doc.resolve(e);if(c.parent.type.spec.code)return!1;for(var l=c.parent.textBetween(Math.max(0,c.parentOffset-s),c.parentOffset,null,"")+r,u=0;u<o.length;u++){var f=o[u].match.exec(l),p=f&&o[u].handler(a,f,e-(f[0].length-r.length),n);if(p)return t.dispatch(p.setMeta(i,{transform:p,from:e,to:n,text:r})),!0}return!1}function l(t,e){for(var n=t.plugins,r=0;r<n.length;r++){var o=n[r],i=void 0;if(o.spec.isInputRules&&(i=o.getState(t))){if(e){for(var s=t.tr,a=i.transform,c=a.steps.length-1;c>=0;c--)s.step(a.steps[c].invert(a.docs[c]));var l=s.doc.resolve(i.from).marks();e(s.replaceWith(i.from,i.to,t.schema.text(i.text,l)))}return!0}}return!1}new o(/--$/,"—"),new o(/\.\.\.$/,"…"),new o(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),new o(/"$/,"”"),new o(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘"),new o(/'$/,"’")},fb6a:function(t,e,n){"use strict";var r=n("23e7"),o=n("861d"),i=n("e8b5"),s=n("23cb"),a=n("50c4"),c=n("fc6a"),l=n("8418"),u=n("1dde"),f=n("b622"),p=f("species"),d=[].slice,h=Math.max;r({target:"Array",proto:!0,forced:!u("slice")},{slice:function(t,e){var n,r,u,f=c(this),v=a(f.length),m=s(t,v),g=s(void 0===e?v:e,v);if(i(f)&&(n=f.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)?o(n)&&(n=n[p],null===n&&(n=void 0)):n=void 0,n===Array||void 0===n))return d.call(f,m,g);for(r=new(void 0===n?Array:n)(h(g-m,0)),u=0;m<g;m++,u++)m in f&&l(r,u,f[m]);return r.length=u,r}})},fc6a:function(t,e,n){var r=n("44ad"),o=n("1d80");t.exports=function(t){return r(o(t))}},fdbc:function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(t,e,n){var r=n("4930");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol()},fea9:function(t,e,n){var r=n("da84");t.exports=r.Promise}}]);
 //# sourceMappingURL=chunk-vendors.js.map
-(function(t){function e(e){for(var a,s,o=e[0],c=e[1],u=e[2],d=0,h=[];d<o.length;d++)s=o[d],Object.prototype.hasOwnProperty.call(r,s)&&r[s]&&h.push(r[s][0]),r[s]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(t[a]=c[a]);l&&l(e);while(h.length)h.shift()();return i.push.apply(i,u||[]),n()}function n(){for(var t,e=0;e<i.length;e++){for(var n=i[e],a=!0,o=1;o<n.length;o++){var c=n[o];0!==r[c]&&(a=!1)}a&&(i.splice(e--,1),t=s(s.s=n[0]))}return t}var a={},r={app:0},i=[];function s(e){if(a[e])return a[e].exports;var n=a[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,s),n.l=!0,n.exports}s.m=t,s.c=a,s.d=function(t,e,n){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},s.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)s.d(n,a,function(e){return t[e]}.bind(null,a));return n},s.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="/";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],c=o.push.bind(o);o.push=e,o=o.slice();for(var u=0;u<o.length;u++)e(o[u]);var l=c;i.push([0,"chunk-vendors"]),n()})({0:function(t,e,n){t.exports=n("cd49")},"37ba":function(t,e,n){},"6d73":function(t,e,n){"use strict";var a=n("37ba"),r=n.n(a);e["default"]=r.a},ba8f:function(t,e,n){},cd49:function(t,e,n){"use strict";n.r(e);n("e260"),n("e6cf"),n("cca6"),n("a79d");var a=n("2b0e"),r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[n("tei-editor")],1)},i=[],s=n("d4ec"),o=n("bee2"),c=n("99de"),u=n("7e84"),l=n("262e"),d=n("9ab4"),h=n("60a3"),f=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"tei-editor"}},[n("nav",[n("aria-menubar",{scopedSlots:t._u([{key:"default",fn:function(e){var a=e.keyboardNav,r=e.mouseClickNav;return[n("ul",{attrs:{role:"menubar"}},[t.hasSaveCallback||t.hasLoadCallback?n("li",{attrs:{role:"presentation"}},[n("a",{attrs:{role:"menuitem",tabindex:"0","aria-expanded":"false"},on:{keyup:a,click:r}},[t._v("File")]),n("aria-menu",{scopedSlots:t._u([{key:"default",fn:function(e){var a=e.keyboardNav,r=e.mouseClickNav;return[n("ul",{attrs:{role:"menu","aria-hidden":"true"}},[t.hasLoadCallback?n("li",{attrs:{role:"presentation"}},[n("a",{attrs:{role:"menuitem",tabindex:"-1"},on:{click:function(e){r(e),t.load()},keyup:a}},[t._v("Load")])]):t._e(),t.hasSaveCallback?n("li",{attrs:{role:"presentation"}},[n("a",{attrs:{role:"menuitem",tabindex:"-1"},on:{click:function(e){r(e),t.save()},keyup:a}},[t._v("Save")])]):t._e()])]}}],null,!0)})],1):t._e(),t._l(t.sections,(function(e,i,s){return n("li",{key:s,attrs:{role:"presentation"}},[n("a",{attrs:{role:"menuitem",tabindex:"-1","aria-checked":i===t.currentSection?"true":"false"},on:{click:function(e){r(e),t.setCurrentSection(i)},keyup:a}},[t._v(t._s(e.label))])])}))],2)]}}])})],1),n("div",[t._l(t.sections,(function(e,a,r){return[a===t.currentSection?["MetadataEditor"===e.type?n("metadata-editor",{key:r,attrs:{config:e}}):t._e(),"TextEditor"===e.type?n("text-editor",{key:r,attrs:{section:a}}):t._e()]:t._e()]}))],2)])},p=[],v=(n("b64b"),n("a4d3"),n("e01a"),n("d28b"),n("d3b7"),n("3ca3"),n("ddb0"),function(t){function e(){return Object(s["a"])(this,e),Object(c["a"])(this,Object(u["a"])(e).apply(this,arguments))}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"render",value:function(){if(this.$scopedSlots.default)return this.$scopedSlots.default({keyboardNav:this.keyboardNavigation,mouseClickNav:this.mouseClickNavigation})}},{key:"keyboardNavigation",value:function(t){var e=t.target;if(e)if(39===t.keyCode){var n=this.findNextMenuitem(this.getParentMenubar(e),e,"next");n&&n.focus()}else if(37===t.keyCode){var a=this.findNextMenuitem(this.getParentMenubar(e),e,"previous");a&&a.focus()}else if(38===t.keyCode||40===t.keyCode){var r=!0,i=!1,s=void 0;try{for(var o,c=e.parentElement.children[Symbol.iterator]();!(r=(o=c.next()).done);r=!0){var u=o.value;if("menu"===u.getAttribute("role")){u.setAttribute("aria-hidden","false"),e.setAttribute("aria-expanded","true");var l=this.findNextMenuitem(u,null,"next");l&&l.focus()}}}catch(y){i=!0,s=y}finally{try{r||null==c.return||c.return()}finally{if(i)throw s}}}else if(13===t.keyCode||32==t.keyCode){var d=!0,h=!1,f=void 0;try{for(var p,v=e.parentElement.children[Symbol.iterator]();!(d=(p=v.next()).done);d=!0){var b=p.value;if("menu"===b.getAttribute("role"))if("false"===b.getAttribute("aria-hidden"))b.setAttribute("aria-hidden","true"),e.setAttribute("aria-expanded","false");else{b.setAttribute("aria-hidden","false"),e.setAttribute("aria-expanded","true");var g=this.findNextMenuitem(b,null,"next");if(g)return void g.focus()}}}catch(y){h=!0,f=y}finally{try{d||null==v.return||v.return()}finally{if(h)throw f}}e.click()}}},{key:"mouseClickNavigation",value:function(t){var e=t.target;if(e){var n=!0,a=!1,r=void 0;try{for(var i,s=e.parentElement.children[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var o=i.value;if("menu"===o.getAttribute("role"))if("false"===o.getAttribute("aria-hidden"))o.setAttribute("aria-hidden","true"),e.setAttribute("aria-expanded","false");else{o.setAttribute("aria-hidden","false"),e.setAttribute("aria-expanded","true");var c=this.findNextMenuitem(o,null,"next");if(c)return void c.focus()}}}catch(u){a=!0,r=u}finally{try{n||null==s.return||s.return()}finally{if(a)throw r}}}}},{key:"getParentMenubar",value:function(t){return t?"menubar"===t.getAttribute("role")?t:this.getParentMenubar(t.parentElement):null}},{key:"findNextMenuitem",value:function(t,e,n){if(!t)return null;var a=[];if("next"===n)for(var r=t.children.length-1;r>=0;r--)a.push(t.children[r]);else for(var i=0;i<t.children.length;i++)a.push(t.children[i]);var s=0;e||(s=1);while(a.length>0){var o=a.pop();if(0===s&&o===e)s=1;else if(1===s&&"menuitem"===o.getAttribute("role")&&"true"!==o.getAttribute("aria-disabled"))return o;if("menu"!==o.getAttribute("role"))if("next"===n)for(var c=o.children.length-1;c>=0;c--)a.push(o.children[c]);else for(var u=0;u<o.children.length;u++)a.push(o.children[u])}return null}}]),e}(h["c"]));v=d["a"]([Object(h["a"])({})],v);var b,g,y=v,m=y,k=n("6d73"),O=n("2877");function x(t){this["$style"]=k["default"].locals||k["default"]}var j=Object(O["a"])(m,b,g,!1,x,null,null),N=j.exports,A=function(t){function e(){return Object(s["a"])(this,e),Object(c["a"])(this,Object(u["a"])(e).apply(this,arguments))}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"render",value:function(){if(this.$scopedSlots.default)return this.$scopedSlots.default({keyboardNav:this.keyboardNavigation,mouseClickNav:this.mouseClickNavigation})}},{key:"keyboardNavigation",value:function(t){var e=t.target;if(e)if(39===t.keyCode);else if(37===t.keyCode);else if(38===t.keyCode){var n=this.findNextMenuitem(this.getParentMenu(e),e,"previous");n&&n.focus()}else if(40===t.keyCode){var a=this.findNextMenuitem(this.getParentMenu(e),e,"next");a&&a.focus()}else if(13===t.keyCode||32==t.keyCode)if(e.getAttribute("aria-expanded")){var r=!0,i=!1,s=void 0;try{for(var o,c=e.parentElement.children[Symbol.iterator]();!(r=(o=c.next()).done);r=!0){var u=o.value;if("menu"===u.getAttribute("role"))if("false"===u.getAttribute("aria-hidden"))u.setAttribute("aria-hidden","true"),e.setAttribute("aria-expanded","false");else{u.setAttribute("aria-hidden","false"),e.setAttribute("aria-expanded","true");var l=this.findNextMenuitem(u,null,"next");l&&l.focus()}}}catch(y){i=!0,s=y}finally{try{r||null==c.return||c.return()}finally{if(i)throw s}}}else e.click();else if(27===t.keyCode){var d=this.getParentMenu(e);if(d){d.setAttribute("aria-hidden","true");var h=!0,f=!1,p=void 0;try{for(var v,b=d.parentElement.children[Symbol.iterator]();!(h=(v=b.next()).done);h=!0){var g=v.value;"menuitem"===g.getAttribute("role")&&(g.setAttribute("aria-expanded","false"),g.focus())}}catch(y){f=!0,p=y}finally{try{h||null==b.return||b.return()}finally{if(f)throw p}}}}}},{key:"mouseClickNavigation",value:function(t){var e=t.target;if(e)if(e.getAttribute("aria-expanded")){var n=!0,a=!1,r=void 0;try{for(var i,s=e.parentElement.children[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var o=i.value;if("menu"===o.getAttribute("role"))if("false"===o.getAttribute("aria-hidden"))o.setAttribute("aria-hidden","true"),e.setAttribute("aria-expanded","false");else{o.setAttribute("aria-hidden","false"),e.setAttribute("aria-expanded","true");var c=this.findNextMenuitem(o,null,"next");c&&c.focus()}}}catch(b){a=!0,r=b}finally{try{n||null==s.return||s.return()}finally{if(a)throw r}}}else{var u=this.getParentMenu(e);if(u){u.setAttribute("aria-hidden","true");var l=!0,d=!1,h=void 0;try{for(var f,p=u.parentElement.children[Symbol.iterator]();!(l=(f=p.next()).done);l=!0){var v=f.value;"menuitem"===v.getAttribute("role")&&(v.setAttribute("aria-expanded","false"),v.focus())}}catch(b){d=!0,h=b}finally{try{l||null==p.return||p.return()}finally{if(d)throw h}}}}}},{key:"getParentMenu",value:function(t){return t?"menu"===t.getAttribute("role")?t:this.getParentMenu(t.parentElement):null}},{key:"getParentMenuOrMenubar",value:function(t){return t?"menu"===t.getAttribute("role")||"menubar"===t.getAttribute("role")?t:this.getParentMenuOrMenubar(t.parentElement):null}}]),e}(N);A=d["a"]([Object(h["a"])({})],A);var _,M,E=A,w=E,S=Object(O["a"])(w,_,M,!1,null,null,null),T=S.exports,$=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"metadata-editor"},t._l(t.config.ui,(function(e,a){return n("section",{key:a},[n("h2",[t._v(t._s(e.label))]),t._l(e.entries,(function(t,e){return n("div",{key:e},[n("metadata-field",{attrs:{config:t}})],1)}))],2)})),0)},C=[],V=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",["single-text"==t.config.type?[n("label",[n("span",{staticClass:"label-text"},[t._v(t._s(t.config.label))]),n("input",{attrs:{type:"text"},domProps:{value:t.value},on:{change:t.update}})])]:t._e(),"multi-row"==t.config.type?[n("ol",{staticClass:"multi-row"},t._l(t.value,(function(e,a){return n("li",{key:a},[t._l(t.config.entries,(function(e,r){return n("metadata-field",{key:r,attrs:{config:e,parent:t.parent+t.config.path+".["+a+"]"}})})),n("aria-menubar",{attrs:{items:t.modifyMenuItems(a)},on:{action:t.menuAction}}),n("aria-menubar",{scopedSlots:t._u([{key:"default",fn:function(e){var r=e.keyboardNav;return[n("ul",{attrs:{role:"menubar"}},[n("li",{attrs:{role:"presentation"}},[n("a",0===a?{attrs:{role:"menuitem","aria-disabled":!0}}:{attrs:{role:"menuitem",tabindex:1===t.value.length?null:0},on:{click:function(e){return t.menuAction("move-up:"+a)},keyup:r}},[n("svg",{attrs:{viewBox:"0 0 24 24","aria-label":"Move up"}},[n("path",{attrs:{d:"M19,3H5A2,2 0 0,0 3,5V19C3,20.11 3.9,21 5,21H19C20.11,21 21,20.11 21,19V5A2,2 0 0,0 19,3M16.59,15.71L12,11.12L7.41,15.71L6,14.29L12,8.29L18,14.29L16.59,15.71Z"}})])])]),n("li",{attrs:{role:"presentation"}},[a===t.value.length-1?n("a",{attrs:{role:"menuitem","aria-disabled":!0}},[n("svg",{attrs:{viewBox:"0 0 24 24","aria-label":"Move down"}},[n("path",{attrs:{d:"M19,3H5A2,2 0 0,0 3,5V19C3,20.11 3.9,21 5,21H19C20.11,21 21,20.11 21,19V5A2,2 0 0,0 19,3M12,15.71L6,9.71L7.41,8.29L12,12.88L16.59,8.29L18,9.71L12,15.71Z"}})])]):n("a",{attrs:{role:"menuitem",tabindex:1===t.value.length?null:0},on:{click:function(e){return t.menuAction("move-down:"+a)},keyup:r}},[n("svg",{attrs:{viewBox:"0 0 24 24","aria-label":"Move down"}},[n("path",{attrs:{d:"M19,3H5A2,2 0 0,0 3,5V19C3,20.11 3.9,21 5,21H19C20.11,21 21,20.11 21,19V5A2,2 0 0,0 19,3M12,15.71L6,9.71L7.41,8.29L12,12.88L16.59,8.29L18,9.71L12,15.71Z"}})])])]),n("li",{attrs:{role:"presentation"}},[n("a",{attrs:{role:"menuitem",tabindex:1===t.value.length?0:-1},on:{click:function(e){return t.menuAction("delete:"+a)},keyup:r}},[n("svg",{attrs:{viewBox:"0 0 24 24","aria-label":"Delete"}},[n("path",{attrs:{d:"M17,13H7V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z"}})])])])])]}}],null,!0)})],2)})),0),n("aria-menubar",{scopedSlots:t._u([{key:"default",fn:function(e){var a=e.keyboardNav;return[n("ul",{attrs:{role:"menubar"}},[n("li",{attrs:{role:"presentation"}},[n("a",{attrs:{role:"menuitem",tabindex:"0"},on:{click:function(e){return t.menuAction("add")},keyup:a}},[n("svg",{attrs:{viewBox:"0 0 24 24","aria-label":"Add"}},[n("path",{attrs:{d:"M17,13H13V17H11V13H7V11H11V7H13V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z"}})])])])])]}}],null,!1,3190783598)})]:t._e(),"multi-field"==t.config.type?[n("ol",{staticClass:"multi-field"},t._l(t.config.entries,(function(e,a){return n("li",{key:a},[n("metadata-field",{attrs:{config:e,parent:t.parent+t.config.path}})],1)})),0)]:t._e()],2)},D=[];n("c975"),n("a9e3"),n("25eb"),n("159b"),n("fb6a"),n("1276");function L(t,e){var n=e.split(".");while(t&&n.length>0){if("["===n[0][0]&&"]"===n[0][n[0].length-1]){var a=Number.parseInt(n[0].substring(1,n[0].length-1));a>=0&&a<t.length&&(t=t[a])}else t=t[n[0]];n=n.slice(1)}return t}var H=function(t){function e(){var t;return Object(s["a"])(this,e),t=Object(c["a"])(this,Object(u["a"])(e).apply(this,arguments)),t.addMenuItems=[{label:'<svg viewBox="0 0 24 24" aria-label="Add"><path d="M17,13H13V17H11V13H7V11H11V7H13V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z" /></svg>',action:"add"}],t}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"update",value:function(t){t&&t.target&&this.$store.commit("setMetadataValue",{path:this.$props.parent+this.$props.config.path,value:t.target.value})}},{key:"modifyMenuItems",value:function(t){return[{label:'<svg viewBox="0 0 24 24" aria-label="Move up"><path d="M19,3H5A2,2 0 0,0 3,5V19C3,20.11 3.9,21 5,21H19C20.11,21 21,20.11 21,19V5A2,2 0 0,0 19,3M16.59,15.71L12,11.12L7.41,15.71L6,14.29L12,8.29L18,14.29L16.59,15.71Z" /></svg>',action:"move-up:"+t,disabled:0===t},{label:'<svg viewBox="0 0 24 24" aria-label="Move down"><path d="M19,3H5A2,2 0 0,0 3,5V19C3,20.11 3.9,21 5,21H19C20.11,21 21,20.11 21,19V5A2,2 0 0,0 19,3M12,15.71L6,9.71L7.41,8.29L12,12.88L16.59,8.29L18,9.71L12,15.71Z" /></svg>',action:"move-down:"+t,disabled:t===this.value.length-1},{label:'<svg viewBox="0 0 24 24" aria-label="Delete"><path d="M17,13H7V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z" /></svg>',action:"delete:"+t}]}},{key:"menuAction",value:function(t){if("add"===t){var e={};this.$props.config.entries.forEach((function(t){var n=t.path;"."===n[0]&&(n=n.substring(1)),"single-text"===t.type?e[n]="":"multi-row"===t.type?e[n]=[]:"multi-field"===t.type&&t.entries.forEach((function(t){var n=t.path;"."===n[0]&&(n=n.substring(1)),"single-text"===t.type?e[n]="":"multi-row"===t.type&&(e[n]=[])}))})),this.$store.commit("addMetadataMuliRow",{path:this.$props.parent+this.$props.config.path,value:e})}else 0===t.indexOf("move-up:")?this.$store.commit("moveMetadataMultiRow",{path:this.$props.parent+this.$props.config.path,idx:Number.parseInt(t.substring(8)),move:-1}):0===t.indexOf("move-down:")?this.$store.commit("moveMetadataMultiRow",{path:this.$props.parent+this.$props.config.path,idx:Number.parseInt(t.substring(10)),move:1}):0===t.indexOf("delete:")&&this.$store.commit("removeMetadataMultiRow",{path:this.$props.parent+this.$props.config.path,value:Number.parseInt(t.substring(7))})}},{key:"value",get:function(){var t=L(this.$store.state.content[this.$store.state.settings.metadataSection],this.$props.parent+this.$props.config.path);return t||""}}]),e}(h["c"]);H=d["a"]([Object(h["a"])({components:{AriaMenubar:N},props:{config:Object,parent:{type:String,default:""}},name:"metadata-field"})],H);var P=H,I=P,R=Object(O["a"])(I,V,D,!1,null,null,null),B=R.exports,Z=function(t){function e(){return Object(s["a"])(this,e),Object(c["a"])(this,Object(u["a"])(e).apply(this,arguments))}return Object(l["a"])(e,t),e}(h["c"]);Z=d["a"]([Object(h["a"])({components:{MetadataField:B},props:{config:Object}})],Z);var F=Z,U=F,X=Object(O["a"])(U,$,C,!1,null,null,null),Y=X.exports,J=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"text-editor"},[n("editor-content",{attrs:{editor:t.editor}}),n("aria-menubar",{scopedSlots:t._u([{key:"default",fn:function(e){var a=e.keyboardNav;return[n("editor-menu-bar",{attrs:{editor:t.editor},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.commands;e.isActive,e.getMarkAttrs;return[n("div",{staticClass:"sidebar"},t._l(t.activeSidebar,(function(e,i){return n("div",{key:i,class:{"is-active":e.active}},[n("h2",[t._v(t._s(e.label))]),t._l(e.entities,(function(e,i){return["list"===e.type?n("ul",{key:i},t._l(e.entities,(function(e,a){return n("li",{key:a,attrs:{role:"presentation"}},[n("label",[n("span",{domProps:{innerHTML:t._s(e.label)}}),"setNodeAttrString"===e.type?n("input",{domProps:{value:e.value},on:{change:function(n){return t.setNodeAttributeValue(r,e.nodeType,e.attr,n.target.value)}}}):t._e()])])})),0):t._e(),"menubar"===e.type?n("ul",{key:i,attrs:{role:"menubar"}},t._l(e.entities,(function(e,i){return n("li",{key:i,class:"separator"===e.type?"separator":null,attrs:{role:"presentation"}},["setNodeType"===e.type?n("a",{attrs:{role:"menuitem",tabindex:e.tabindex,"aria-checked":e.checked},domProps:{innerHTML:t._s(e.label)},on:{keyup:a,click:function(t){r[e.nodeType]()}}}):"setNodeAttrValue"===e.type?n("a",{attrs:{role:"menuitem",tabindex:e.tabindex,"aria-checked":e.checked},domProps:{innerHTML:t._s(e.label)},on:{keyup:a,click:function(n){return t.setNodeAttributeValue(r,e.nodeType,e.attr,e.value)}}}):"selectNodeAttr"===e.type?n("select",{attrs:{role:"menuitem",tabindex:e.tabindex},on:{keyup:a,change:function(n){return t.setNodeAttributeValue(r,e.nodeType,e.attr,n.target.value)}}},t._l(e.values,(function(e){return n("option",{key:e.value,domProps:{value:e.value,selected:e.checked,innerHTML:t._s(e.label)}})})),0):"toggleMark"===e.type?n("a",{attrs:{role:"menuitem",tabindex:e.tabindex,"aria-checked":e.checked},domProps:{innerHTML:t._s(e.label)},on:{keyup:a,click:function(t){r[e.nodeType]()}}}):"selectMarkAttr"===e.type?n("select",{attrs:{role:"menuitem",tabindex:e.tabindex},on:{keyup:a,change:function(n){return t.setMarkAttributeValue(e.nodeType,e.attr,n.target.value)}}},t._l(e.values,(function(e){return n("option",{key:e.value,domProps:{value:e.value,selected:e.checked,innerHTML:t._s(e.label)}})})),0):"editNestedDoc"===e.type?n("a",{attrs:{role:"menuitem",tabindex:e.tabindex},domProps:{innerHTML:t._s(e.label)},on:{keyup:a,click:function(n){return t.editNestedDoc(r,e.nodeType,e.attr,e.targetType)}}}):"closeNested"===e.type?n("a",{attrs:{role:"menuitem",tabindex:e.tabindex},domProps:{innerHTML:t._s(e.label)},on:{keyup:a,click:t.closeNestedAction}}):"linkNestedDoc"===e.type?n("select",{attrs:{role:"menuitem",tabindex:e.tabindex},on:{keyup:a,change:function(n){return t.setNodeAttributeValue(r,e.nodeType,e.attr,n.target.value)}}},t._l(e.values,(function(e){return n("option",{key:e.value,domProps:{value:e.value,selected:e.checked,innerHTML:t._s(e.label)}})})),0):t._e()])})),0):t._e()]}))],2)})),0)]}}],null,!0)})]}}])}),t.showNested?n("div",{staticClass:"nested"},[n("text-editor",{attrs:{section:t.section,nestedSection:t.nestedSettings.section,nestedId:t.nestedSettings.id,closeNestedAction:t.closeNestedEditor}})],1):t._e()],1)},W=[],z=(n("4de4"),n("d81d"),n("a434"),n("b0c0"),n("4fad"),n("e439"),n("dbb4"),n("3835")),G=n("ade3"),q=n("cd42"),K=n("a9de"),Q=function(t){function e(t){var n;return Object(s["a"])(this,e),n=Object(c["a"])(this,Object(u["a"])(e).call(this)),n._config={},n._config=t,n}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"commands",value:function(t){var e,n=t.type;return e={},Object(G["a"])(e,n.name,(function(t){return Object(K["b"])(n,t)})),Object(G["a"])(e,n.name+"_setAttribute",(function(t){return Object(K["b"])(n,t)})),e}},{key:"name",get:function(){return this._config.name}},{key:"schema",get:function(){var t=this;return{content:"inline*",group:"block",draggable:!1,attrs:this._config.attrs,parseDOM:[{tag:"div.node-".concat(this._config.name),getAttrs:function(e){var n={};return t._config.attrs&&Object.keys(t._config.attrs).forEach((function(t){var a=e.getAttribute("data-".concat(t));a&&(n[t]=a)})),n}}],toDOM:function(e){var n={class:"node-".concat(t._config.name)};return Object.entries(e.attrs).forEach((function(t){var e=Object(z["a"])(t,2),a=e[0],r=e[1];n["data-".concat(a)]=r})),["div",n,0]}}}}]),e}(q["f"]),tt=n("986d"),et=n("0ac0"),nt=function(t){function e(t){var n;return Object(s["a"])(this,e),n=Object(c["a"])(this,Object(u["a"])(e).call(this)),n._config={},n._config=t,n}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"commands",value:function(t){var e=t.type,n=t.schema,a=n.nodes[this._config.content];return function(){return function(t,r){var i=t.selection,s=i.$from,o=i.$to,c=i.from,u=i.to,l=s.blockRange(o),d=l&&Object(et["i"])(l);if(!l||null===d)return!1;var h=Object(tt["findParentNode"])((function(t){return t.type===e}))(i);if(l.depth>=1&&h&&l.depth-h.depth<=1&&h.node.type===e){var f=t.tr.lift(l,d);return f=f.setBlockType(c,u,n.nodes.paragraph),r(f),!0}var p=t.tr.setBlockType(c,u,a);return p=p.wrap(l,[{type:e}]),r(p),!0}}}},{key:"name",get:function(){return this._config.name}},{key:"schema",get:function(){var t=this;return{content:this._config.content+"+",group:"block",draggable:!1,attrs:this._config.attrs,parseDOM:[{tag:"div.node-".concat(this._config.name),getAttrs:function(e){var n={};return t._config.attrs&&Object.keys(t._config.attrs).forEach((function(t){var a=e.getAttribute("data-".concat(t));a&&(n[t]=a)})),n}}],toDOM:function(e){var n={class:"node-".concat(t._config.name)};return Object.entries(e.attrs).forEach((function(t){var e=Object(z["a"])(t,2),a=e[0],r=e[1];n["data-".concat(a)]=r})),["div",n,0]}}}}]),e}(q["f"]),at=function(t){function e(t){var n;return Object(s["a"])(this,e),n=Object(c["a"])(this,Object(u["a"])(e).call(this)),n._config={},n._config=t,n}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"commands",value:function(t){var e,n=t.type;return e={},Object(G["a"])(e,n.name,(function(t){return function(e,a){var r=e.selection,i=r.$from,s=r.$to,o=r.from,c=r.to,u=!1;e.doc.nodesBetween(o,c,(function(t){t.type===n&&(u=!0)}));var l=i.parent.slice(i.parentOffset,s.parentOffset);return a(u?e.tr.replaceRange(o-1,c+1,l):e.tr.replaceRangeWith(o,c,n.create(t,l.content))),!0}})),Object(G["a"])(e,n.name+"_setAttribute",(function(t){return function(e,a){var r=e.selection,i=r.$from,s=r.$to,o=(r.from,r.to,i.blockRange(s));if(!o)return!1;var c=e.doc.slice(o.start+1,o.end-1);return a(e.tr.replaceRangeWith(o.start,o.end,n.create(t,c.content))),!0}})),e}},{key:"name",get:function(){return this._config.name}},{key:"schema",get:function(){var t=this;return{content:"inline*",group:"inline",inline:!0,attrs:this._config.attrs,parseDOM:[{tag:"span.node-".concat(this._config.name),getAttrs:function(e){var n={};return t._config.attrs&&Object.keys(t._config.attrs).forEach((function(t){var a=e.getAttribute("data-".concat(t));a&&(n[t]=a)})),n}}],toDOM:function(e){var n={class:"node-".concat(t._config.name)};return Object.entries(e.attrs).forEach((function(t){var e=Object(z["a"])(t,2),a=e[0],r=e[1];n["data-".concat(a)]=r})),["span",n,0]}}}}]),e}(q["f"]),rt=function(t){function e(t){var n;return Object(s["a"])(this,e),n=Object(c["a"])(this,Object(u["a"])(e).call(this)),n._config={},n._config=t,n}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"commands",value:function(t){var e=t.type;return function(){return Object(K["c"])(e)}}},{key:"name",get:function(){return this._config.name}},{key:"schema",get:function(){var t=this;return{attrs:this._config.attrs,parseDOM:[{tag:"span.mark-".concat(this._config.name),getAttrs:function(e){var n={};return t._config.attrs&&Object.keys(t._config.attrs).forEach((function(t){var a=e.getAttribute("data-".concat(t));a&&(n[t]=a)})),n}}],toDOM:function(e){var n={class:"mark-".concat(t._config.name)};return Object.entries(e.attrs).forEach((function(t){var e=Object(z["a"])(t,2),a=e[0],r=e[1];r&&(n["data-".concat(a)]=r)})),["span",n,0]}}}}]),e}(q["e"]);function it(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function st(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?it(Object(n),!0).forEach((function(e){Object(G["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):it(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var ot=function(t){function e(){var t;return Object(s["a"])(this,e),t=Object(c["a"])(this,Object(u["a"])(e).apply(this,arguments)),t.editor=null,t.showNested=!1,t.nestedSettings=null,t.internalContentUpdate=!1,t.defaultNodeName="",t.sidebar=[],t}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"mounted",value:function(){var t=this,e=[new q["a"],new q["g"]];this.defaultNodeName="",this.schema.forEach((function(n){"block"===n.type?(e.push(new Q(n)),""===t.defaultNodeName&&(t.defaultNodeName=n.name)):"wrapping"===n.type?e.push(new nt(n)):"inline"===n.type&&"text"!==n.name?e.push(new at(n)):"mark"===n.type&&e.push(new rt(n))})),this.editor=new q["b"]({useBuiltInExtensions:!1,extensions:e,content:{type:"doc",content:[{type:this.defaultNodeName,content:[]}]},onUpdate:function(e){var n=e.getJSON;t.internalContentUpdate=!0,t.$props.nestedSection&&t.$props.nestedId?t.$store.commit("setTextDoc",{path:t.$props.section+".nestedId."+t.$props.nestedSection+"."+t.$props.nestedId,doc:n()}):t.$store.commit("setTextDoc",{path:t.$props.section+".doc",doc:n()})}}),this.doc&&this.editor.setContent(this.doc),this.editor.focus(),this.sidebar=this.ui.map((function(t){var e={label:t.label,active:!0};return t.condition&&(e.condition=t.condition.activeType),t.entities&&(e.entities=t.entities.map((function(t){var e={type:t.type};return t.entities&&(e.entities=t.entities.map((function(t,e){var n={type:t.type,label:t.label,nodeType:t.nodeType||t.markType,attr:t.attr,value:"",checked:"false",tabindex:0===e?0:-1};return"selectNodeAttr"===t.type||"selectMarkAttr"===t.type?n.values=t.values.map((function(t){return{label:t.label,value:t.value,checked:!1}})):"setNodeAttrValue"===t.type?n.value=t.value:"editNestedDoc"===t.type?n.targetType=t.targetNodeType:"linkNestedDoc"===t.type&&(n.targetType=t.targetNodeType,n.values=[]),n}))),e}))),e}))}},{key:"beforeDestroy",value:function(){this.editor&&this.editor.destroy()}},{key:"updateContent",value:function(t){!this.internalContentUpdate&&this.editor&&this.editor.setContent(t),this.internalContentUpdate=!1}},{key:"getNodeAttributeValue",value:function(t,e){for(var n=0;n<this.selectedNodes.length;n++){var a=this.selectedNodes[n];if(a.type.name===t&&void 0!==a.attrs[e]&&null!==a.attrs[e])return a.attrs[e]}return""}},{key:"hasNodeAttributeValue",value:function(t,e,n){return this.getNodeAttributeValue(t,e)===n}},{key:"setNodeAttributeValue",value:function(t,e,n,a){var r=this.editor.state.selection,i=r.from,s=r.to,o={};this.editor.state.doc.nodesBetween(i,s,(function(t){t.type.name===e&&(o=st({},o,{},t.attrs))})),o[n]=a,t[e+"_setAttribute"](o)}},{key:"getMarkAttributeValue",value:function(t,e){for(var n=0;n<this.selectedNodes.length;n++){var a=this.selectedNodes[n];if(a.marks)for(var r=0;r<a.marks.length;r++){var i=a.marks[r];if(i.type.name===t)return i.attrs[e]}}return""}},{key:"hasMarkAttributeValue",value:function(t,e,n){return this.getMarkAttributeValue(t,e)===n}},{key:"setMarkAttributeValue",value:function(t,e,n){if(n){var a=this.editor.state.selection,r=a.from,i=a.to,s={};this.editor.state.doc.nodesBetween(r,i,(function(e){e.marks&&e.marks.forEach((function(e){e.type.name===t&&(s=st({},s,{},e.attrs))}))})),s[e]=n,Object(K["d"])(this.editor.schema.marks[t],s)(this.editor.state,this.editor.dispatchTransaction.bind(this.editor))}else Object(K["a"])(this.editor.schema.marks[t])(this.editor.state,this.editor.dispatchTransaction.bind(this.editor))}},{key:"editNestedDoc",value:function(t,e,n,a){var r=this.getNodeAttributeValue(e,n);if(!r){var i=this.$store.state.content[this.$props.section].nested[a];r=a+"-1";var s=1;while(i&&i[r])s+=1,r=a+"-"+s;this.setNodeAttributeValue(t,e,n,r),this.$store.commit("addNestedDoc",{path:this.$props.section+".nested."+a+"."+r,doc:{type:"doc",content:[{type:"paragraph",content:[]}]}})}this.showNested=!0,this.nestedSettings={section:a,id:r}}},{key:"closeNestedEditor",value:function(){this.showNested=!1,this.nestedSettings=null}},{key:"schema",get:function(){return this.$store.state.sections[this.$props.section].schema}},{key:"content",get:function(){return this.$store.state.content[this.$props.section]}},{key:"doc",get:function(){if(this.content){if(!this.$props.nestedSection||!this.$props.nestedId)return this.content.doc;if(this.content.nested&&this.content.nested[this.$props.nestedSection]&&this.content.nested[this.$props.nestedSection][this.$props.nestedId])return this.content.nested[this.$props.nestedSection][this.$props.nestedId].content[0]}return null}},{key:"ui",get:function(){return this.$props.nestedSection&&this.$store.state.sections[this.$props.section].ui[this.$props.nestedSection]?this.$store.state.sections[this.$props.section].ui[this.$props.nestedSection]:this.$store.state.sections[this.$props.section].ui.doc}},{key:"selectedNodes",get:function(){if(this.editor){var t=this.editor.state.selection,e=t.from,n=t.to,a=[];return this.editor.state.doc.nodesBetween(e,n,(function(t){a.push(t)})),a}return[]}},{key:"activeSidebar",get:function(){var t=this,e=this.editor.isActive;return this.sidebar.forEach((function(n){n.condition&&(n.active=e[n.condition]()),n.entities.forEach((function(n){n.entities.forEach((function(n){"setNodeAttrString"===n.type?n.value=t.getNodeAttributeValue(n.nodeType,n.attr):"setNodeType"===n.type||"toggleMark"===n.type?n.checked=e[n.nodeType]()?"true":"false":"setNodeAttrValue"===n.type?n.checked=t.hasNodeAttributeValue(n.nodeType,n.attr,n.value)?"true":"false":"selectNodeAttr"===n.type?n.values.forEach((function(e){e.checked=!!t.hasNodeAttributeValue(n.nodeType,n.attr,e.value)})):"selectMarkAttr"===n.type?n.values.forEach((function(e){e.checked=!!t.hasMarkAttributeValue(n.nodeType,n.attr,e.value)})):"linkNestedDoc"===n.type&&(t.nestedDocIds[n.targetType]?(n.values=t.nestedDocIds[n.targetType],n.values.forEach((function(e){e.checked=t.hasNodeAttributeValue(n.nodeType,n.attr,e.value)}))):n.values=[{label:"New",value:"",checked:!1}])}))}))})),this.sidebar}},{key:"nestedDocIds",get:function(){var t={};return Object.entries(this.$store.state.content[this.$props.section].nested).forEach((function(e){var n=Object(z["a"])(e,2),a=n[0],r=n[1];t[a]=Object.keys(r).map((function(t){return{label:t,value:t,checked:!1}})),t[a].splice(0,0,{label:"New",value:"",checked:!1})})),t}}]),e}(h["c"]);d["a"]([Object(h["b"])({type:String})],ot.prototype,"section",void 0),d["a"]([Object(h["b"])({type:String})],ot.prototype,"nestedSection",void 0),d["a"]([Object(h["b"])({type:String})],ot.prototype,"nestedId",void 0),d["a"]([Object(h["b"])({type:Function})],ot.prototype,"closeNestedAction",void 0),d["a"]([Object(h["d"])("doc")],ot.prototype,"updateContent",null),ot=d["a"]([Object(h["a"])({components:{EditorContent:q["c"],EditorMenuBar:q["d"],AriaMenubar:N},name:"text-editor"})],ot);var ct=ot,ut=ct,lt=Object(O["a"])(ut,J,W,!1,null,null,null),dt=lt.exports,ht=(n("99af"),n("a15b"),n("4e82"),n("25f0"),n("6062"),n("5319"),n("53ca")),ft=function(){function t(){Object(s["a"])(this,t)}return Object(o["a"])(t,[{key:"serialise",value:function(t,e){var n=this,a={node:"tei:TEI",attrs:{"xmlns:tei":["http://www.tei-c.org/ns/1.0"]},children:[]};Object.entries(e).forEach((function(e){var r=Object(z["a"])(e,2),i=r[0],s=r[1];"MetadataEditor"===s.type&&n.mergeTrees(a,n.serialiseHeader(t[i],s))})),Object.entries(e).forEach((function(e){var r=Object(z["a"])(e,2),i=r[0],s=r[1];"TextEditor"===s.type&&n.mergeTrees(a,n.serialiseSingleText(t[i],s))}));var r=this.toString(a,"");return r.splice(0,0,'<?xml version="1.0" encoding="UTF-8"?>'),r.push(""),r.join("\n")}},{key:"mergeTrees",value:function(t,e){if(t&&e)for(var n=0;n<e.children.length;n++){for(var a=!1,r=0;r<t.children.length;r++)t.children[r].node===e.children[n].node&&this.objectsMatch(t.children[r].attrs,e.children[n].attrs)&&(this.mergeTrees(t.children[r],e.children[n]),a=!0);a||t.children.push(e.children[n])}}},{key:"objectsMatch",value:function(t,e){var n=this;if(t&&e){if(Object(ht["a"])(t)!==Object(ht["a"])(e))return!1;if("string"===typeof t||"number"===typeof t||"boolean"===typeof t)return t===e;var a=Object.keys(t),r=Object.keys(e);return a.forEach((function(a){return!(r.indexOf(a)<0)&&(!!n.objectsMatch(t[a],e[a])&&void r.splice(r.indexOf(a),1))})),!(r.length>0)}return!t&&!e}},{key:"serialiseSingleText",value:function(t,e){var n=this;if(t){var a=e.serialiser.tag.split("/");this.nested={};var r={node:a[a.length-1],children:t.doc.content.map((function(t){return n.serialiseTextNode(t,e.schema)})),attrs:{}};e.serialiser.attrs&&Object.entries(e.serialiser.attrs).forEach((function(t){var e=Object(z["a"])(t,2),n=e[0],a=e[1];r.attrs[n]?r.attrs[n].push(a):r.attrs[n]=[a]})),Object.entries(this.nested).forEach((function(a){var i=Object(z["a"])(a,2),s=i[0],o=i[1];new Set(o).forEach((function(a){t.nested[s]&&t.nested[s][a]&&r.children.push(n.serialiseTextNode(t.nested[s][a],e.schema))}))}));for(var i=a.length-2;i>=0;i--)r={node:a[i],children:[r]};return{node:"tei:TEI",children:[r]}}return null}},{key:"serialiseTextNode",value:function(t,e){var n=this,a=e.filter((function(e){return e.name===t.type&&e.serialiser}));if(1===a.length){a=a[0];var r={node:a.serialiser.tag,attrs:{},children:[],text:null};if(a.serialiser.attrs&&Object.entries(a.serialiser.attrs).forEach((function(t){r.attrs[t[0]]=[t[1]]})),t.attrs&&Object.entries(t.attrs).forEach((function(t){var e=a.attrs[t[0]].serialiser;if(e){var n=void 0;e.values?e.values[t[1]]&&(n=e.values[t[1]]):n=e.value?e.value.replace("{value}",t[1]):t[1],void 0!==n&&("text()"===e.attr?r.text=n:r.attrs[e.attr]?r.attrs[e.attr].push(n):r.attrs[e.attr]=[n])}})),"inline"===a.type){if(t.content)if(t.content.length>1||t.content[0].marks&&t.content[0].marks.length>0)t.content.forEach((function(t){r.children.push(n.serialiseTextNode(t,e))}));else{var i=this.serialiseTextNode(t.content[0],e);a.serialiser.text?r.attrs[a.serialiser.text.attr]?r.attrs[a.serialiser.text.attr].push(i.text):r.attrs[a.serialiser.text.attr]=[i.text]:r.text=i.text}else t.text&&(a.serialiser.text?r.attrs[a.serialiser.text.attr]?r.attrs[a.serialiser.text.attr].push(t.text):r.attrs[a.serialiser.text.attr]=[t.text]:r.text=t.text);if(t.marks){var s=t.marks.map((function(t){var n=e.filter((function(e){return e.name===t.type&&e.serialiser}));if(1===n.length){n=n[0];var a={node:r.node,attrs:{}},i=n.serialiser;return i.tag&&(a.node=i.tag),i.attrs&&Object.entries(i.attrs).forEach((function(t){t[1].value&&(a.attrs[t[0]]?a.attrs[t[0]].push(t[1].value):a.attrs[t[0]]=[t[1].value])})),t.attrs&&Object.entries(t.attrs).forEach((function(t){var e=void 0;n.attrs[t[0]].serialiser.value?e=n.attrs[t[0]].serialiser.value.replace("{value}",t[1]):n.attrs[t[0]].serialiser.values&&n.attrs[t[0]].serialiser.values[t[1]]&&(e=n.attrs[t[0]].serialiser.values[t[1]]),void 0!==e&&(a.attrs[n.attrs[t[0]].serialiser.attr]?a.attrs[n.attrs[t[0]].serialiser.attr].push(e):a.attrs[n.attrs[t[0]].serialiser.attr]=[e])})),a}return null})).filter((function(t){return t}));if(new Set(s.map((function(t){return t.node}))).size>1){s.sort((function(t,e){return t.node<e.node?-1:t.node>e.node?1:t.node===e.node?0:void 0}));var o=r;o.node=null,s.forEach((function(t){if(null===o.node||o.node===t.node)o.node=t.node,Object.entries(t.attrs).forEach((function(t){o.attrs[t[0]]?o.attrs[t[0]]=o.attrs[t[0]].concat(t[1]):o.attrs[t[0]]=t[1]}));else{var e={node:t.node,attrs:t.attrs,children:[],text:o.text};o.text=null,o.children.push(e),o=e}}))}else s.forEach((function(t){t&&(t.node&&(r.node=t.node),t.attrs&&Object.entries(t.attrs).forEach((function(t){r.attrs[t[0]]?r.attrs[t[0]]=r.attrs[t[0]].concat(t[1]):r.attrs[t[0]]=t[1]})))}))}}else t.content&&t.content.forEach((function(t){"doc"===t.type?t.content&&t.content.forEach((function(t){r.children.push(n.serialiseTextNode(t,e))})):r.children.push(n.serialiseTextNode(t,e))}));return a.reference&&(this.nested[a.reference.type]||(this.nested[a.reference.type]=[]),this.nested[a.reference.type].push(t.attrs[a.reference.attr])),r}return null}},{key:"serialiseHeader",value:function(t,e){var n=this;return{node:"tei:TEI",children:[{node:"tei:teiHeader",children:e.schema.map((function(e){return n.serialiseMetadataNode(t[e.tag.substring(4)],e)}))}]}}},{key:"serialiseMetadataNode",value:function(t,e){var n=this;if(e.multiple){var a=t.map((function(t){var a={node:e.tag};if(t._text&&(a.text=t._text),t._attrs&&(a.attrs={},Object.entries(t._attrs).forEach((function(t){a.attrs[t[0]]=[t[1]]}))),e.children){a.children=[];for(var r=0;r<e.children.length;r++)if(t[e.children[r].tag.substring(4)]){var i=n.serialiseMetadataNode(t[e.children[r].tag.substring(4)],e.children[r]);Array.isArray(i)?a.children=a.children.concat(i):a.children.push(i)}}return a}));return a}var r={node:e.tag};if(t&&(t._text&&(r.text=t._text),t._attrs&&(r.attrs={},Object.entries(t._attrs).forEach((function(t){r.attrs[t[0]]=[t[1]]}))),e.children)){r.children=[];for(var i=0;i<e.children.length;i++)if(t[e.children[i].tag.substring(4)]){var s=this.serialiseMetadataNode(t[e.children[i].tag.substring(4)],e.children[i]);Array.isArray(s)?r.children=r.children.concat(s):r.children.push(s)}}return r}},{key:"toString",value:function(t,e){var n=this;function a(t){return t.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;")}var r=[];if(t){var i=[e,"<",t.node];t.attrs&&Object.entries(t.attrs).forEach((function(t){t[1].length>0&&(t[1].sort(),i.push(" "+t[0]+'="'+a(t[1].join(" "))+'"'))})),t.children&&t.children.length>0?(i.push(">"),r.push(i.join("")),t.children.forEach((function(t){r=r.concat(n.toString(t,e+"  "))})),r.push(e+"</"+t.node+">")):(t.text?(i.push(">"),i.push(a(t.text)),i.push("</"+t.node+">")):i.push("/>"),r.push(i.join("")))}return r}}]),t}(),pt=function(t){function e(){var t;return Object(s["a"])(this,e),t=Object(c["a"])(this,Object(u["a"])(e).apply(this,arguments)),t.currentSection=null,t}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"setCurrentSection",value:function(t){this.currentSection=t}},{key:"getContentForSection",value:function(t){return L(this.$store.state.content,t)}},{key:"setContentForSection",value:function(t,e){this.$store.commit("setTextDoc",{path:t,doc:e})}},{key:"mounted",value:function(){var t=Object.keys(this.sections);t.length>0&&(this.currentSection=t[0])}},{key:"save",value:function(){if(this.hasSaveCallback){var t=new ft;this.$store.state.callbacks.save(t.serialise(this.$store.state.content,this.$store.state.sections))}}},{key:"load",value:function(){var t=this;this.hasLoadCallback&&this.$store.state.callbacks.load((function(e){t.$store.dispatch("load",e)}))}},{key:"updateSections",value:function(){var t=Object.keys(this.sections);t.length>0&&(this.currentSection=t[0])}},{key:"sections",get:function(){return this.$store.state.sections}},{key:"hasSaveCallback",get:function(){return!!this.$store.state.callbacks.save}},{key:"hasLoadCallback",get:function(){return!!this.$store.state.callbacks.load}}]),e}(h["c"]);d["a"]([Object(h["d"])("sections")],pt.prototype,"updateSections",null),pt=d["a"]([Object(h["a"])({components:{AriaMenubar:N,AriaMenu:T,MetadataEditor:Y,TextEditor:dt}})],pt);var vt=pt,bt=vt,gt=(n("e215"),Object(O["a"])(bt,f,p,!1,null,null,null)),yt=gt.exports,mt=function(t){function e(){return Object(s["a"])(this,e),Object(c["a"])(this,Object(u["a"])(e).apply(this,arguments))}return Object(l["a"])(e,t),Object(o["a"])(e,[{key:"mounted",value:function(){var t=this,e=document.getElementById("TEIEditorConfig");if(e){var n=JSON.parse(e.innerHTML);n&&this.$store.commit("init",n)}this.$store.state.callbacks&&this.$store.state.callbacks.autoLoad&&this.$store.state.callbacks.autoLoad((function(e){t.$store.dispatch("load",e)}))}}]),e}(h["c"]);mt=d["a"]([Object(h["a"])({components:{TeiEditor:yt}})],mt);var kt=mt,Ot=kt,xt=Object(O["a"])(Ot,r,i,!1,null,null,null),jt=xt.exports,Nt=n("2f62");function At(t){return"tei"===t?"http://www.tei-c.org/ns/1.0":"xml"===t?"http://www.w3.org/XML/1998/namespace":"http://www.tei-c.org/ns/1.0"}var _t=function(){function t(e){Object(s["a"])(this,t),this.dom=e}return Object(o["a"])(t,[{key:"evaluate",value:function(t,e,n){return this.dom.evaluate(e,t,At,n,null)}},{key:"firstNode",value:function(t,e){return this.evaluate(t,e,XPathResult.FIRST_ORDERED_NODE_TYPE).singleNodeValue}},{key:"nodeIterator",value:function(t,e){return this.evaluate(t,e,XPathResult.ORDERED_NODE_ITERATOR_TYPE)}},{key:"stringValue",value:function(t,e){return this.evaluate(t,e,XPathResult.STRING_TYPE).stringValue}},{key:"booleanValue",value:function(t,e){return this.evaluate(t,e,XPathResult.BOOLEAN_TYPE).booleanValue}},{key:"numberValue",value:function(t,e){return this.evaluate(t,e,XPathResult.NUMBER_TYPE).numberValue}}]),t}(),Mt=function(){function t(e,n){Object(s["a"])(this,t),this.dom=e,this.xpath=new _t(this.dom),this.config=n}return Object(o["a"])(t,[{key:"get",value:function(){if(!this.data){var t=this.xpath.firstNode(this.dom.documentElement,"/tei:TEI/tei:teiHeader");this.data={};for(var e=0;e<this.config.schema.length;e++){var n=this.parseHeaderNode(t,this.config.schema[e]);n&&(this.data[this.config.schema[e].tag.substring(4)]=n)}}return this.data}},{key:"parseHeaderNode",value:function(t,e){var n=this.xpath.nodeIterator(t,e.tag),a=[],r=n.iterateNext();while(r){for(var i={_attrs:{},_text:0===r.children.length?this.xpath.stringValue(r,"text()"):null},s=0;s<r.attributes.length;s++)i._attrs[r.attributes[s].name]=r.attributes[s].value;if(e.children)for(var o=0;o<e.children.length;o++){var c=this.parseHeaderNode(r,e.children[o]);c&&(i[e.children[o].tag.substring(e.children[o].tag.indexOf(":")+1)]=c)}a.push(i),r=n.iterateNext()}return 0===a.length?null:e.multiple?a:a[0]}}]),t}(),Et=function(){function t(e,n){Object(s["a"])(this,t),this.dom=e,this.xpath=new _t(this.dom),this.config=n}return Object(o["a"])(t,[{key:"get",value:function(){if(!this.doc&&(this.doc={type:"doc",content:[]},this.nestedDocs={},this.config.parser&&this.config.parser.selector)){var t=this.xpath.firstNode(this.dom.documentElement,this.config.parser.selector);if(t)for(var e=0;e<t.children.length;e++){var n=this.parseContentNode(t.children[e],this.config);n&&!n.nestedDoc?this.doc.content.push(n):n&&n.nestedDoc&&this.addNestedDoc(n)}}return[this.doc,this.nestedDocs]}},{key:"parseContentAttributes",value:function(t,e){var n=this,a={};return Object.entries(e).forEach((function(e){var r=Object(z["a"])(e,2),i=r[0],s=r[1],o=[];s.parser?o.push(s.parser):s.parsers&&(o=s.parsers);for(var c=0;c<o.length;c++){var u=o[c];if("boolean"===u.type)a[i]=n.xpath.booleanValue(t,u.selector);else if("number"===u.type)try{a[i]=n.xpath.numberValue(t,u.selector)}catch(d){console.log(d)}else if("static"===u.type)n.xpath.booleanValue(t,u.selector)&&(a[i]=u.value);else try{var l=n.xpath.stringValue(t,u.selector);l&&(a[i]=l)}catch(d){console.log(d)}}})),a}},{key:"parseContentMarks",value:function(t,e){var n=this,a=[];return e.forEach((function(e){if("mark"===e.type){var r=[];e.parser?r.push(e.parser):e.parsers&&(r=e.parsers);for(var i=0;i<r.length;i++)if(n.xpath.booleanValue(t,r[i].selector)){var s={type:e.name};e.attrs&&(s.attrs=n.parseContentAttributes(t,e.attrs)),a.push(s)}}})),a}},{key:"parseContentNode",value:function(t,e){for(var n=Object.entries(e.schema),a=0;a<n.length;a++){var r=n[a][1],i=[];r.parser?i.push(r.parser):r.parsers&&(i=i.concat(r.parsers));for(var s=0;s<i.length;s++){var o=i[s];if(null!==this.xpath.firstNode(t,"self::"+o.selector)){var c={type:r.name};if(r.attrs&&(c.attrs=this.parseContentAttributes(t,r.attrs)),"nested"===r.type&&(c.nestedDoc=!0),"inline"===r.type)if("text"===r.name){if(c.text=this.xpath.stringValue(t,o.text),c.marks=this.parseContentMarks(t,e.schema),1===t.children.length){var u=this.parseContentNode(t.children[0],e);u.text&&""!==u.text&&(c.text=u.text),c.marks=c.marks.concat(u.marks)}}else if(0===t.children.length)this.xpath.stringValue(t,o.text)&&(c.content=[{type:"text",text:this.xpath.stringValue(t,o.text),marks:this.parseContentMarks(t,e.schema)}]);else{for(var l=[],d=0;d<t.children.length;d++){var h=this.parseContentNode(t.children[d],e);h&&l.push(h)}c.content=l}else{for(var f=[],p=0;p<t.children.length;p++){var v=this.parseContentNode(t.children[p],e);v&&!v.nestedDoc?f.push(v):v&&v.nestedDoc&&this.addNestedDoc(v)}c.content=f}return c}}}return null}},{key:"addNestedDoc",value:function(t){if(t.attrs&&t.attrs.id){this.nestedDocs[t.type]||(this.nestedDocs[t.type]={}),this.nestedDocs[t.type][t.attrs.id]=t;var e={type:"doc",content:t.content};t.content=[e]}}}]),t}();function wt(t){if(void 0!==t){if(null===t)return null;if(Array.isArray(t))return t.map((function(t){return wt(t)}));if("object"===Object(ht["a"])(t)){var e={};return Object.keys(t).forEach((function(n){e[n]=wt(t[n])})),e}return t}}a["a"].use(Nt["a"]);var St={settings:{metadataSection:""},sections:{},content:{},callbacks:{save:void 0,load:void 0,autoLoad:void 0}},Tt=new Nt["a"].Store({state:St,mutations:{init:function(t,e){t.sections=e.sections,Object.keys(e.sections).forEach((function(n,r){"MetadataEditor"===e.sections[n].type&&(t.settings.metadataSection=n),a["a"].set(t.content,n,{}),a["a"].set(t.content[n],"doc",null),a["a"].set(t.content[n],"nested",{})})),window.TEIEditor&&window.TEIEditor.callbacks&&(a["a"].set(t.callbacks,"save",window.TEIEditor.callbacks.save),a["a"].set(t.callbacks,"load",window.TEIEditor.callbacks.load),a["a"].set(t.callbacks,"autoLoad",window.TEIEditor.callbacks.autoLoad))},setMetadata:function(t,e){a["a"].set(t.content,t.settings.metadataSection,e)},setMetadataValue:function(t,e){var n=t.content[t.settings.metadataSection];if(n){n=wt(n);var r=n,i=e.path.split(".");while(i.length>0){var s=i[0];if("["===s[0]&&"]"===s[s.length-1]&&Array.isArray(r)){var o=Number.parseInt(s.substring(1,s.length-1));o>=0&&o<r.length&&(i.length>1?r=r[o]:r[o]=e.value)}else r[s]?i.length>1?r=r[s]:r[s]=e.value:i.length>1?(r[s]={},r=r[s]):r[s]=e.value;i.splice(0,1)}a["a"].set(t.content,t.settings.metadataSection,n)}},addMetadataMuliRow:function(t,e){var n=t.content[t.settings.metadataSection];if(n){n=wt(n);var r=L(n,e.path);r&&(r.push(e.value),a["a"].set(t.content,t.settings.metadataSection,n))}},removeMetadataMultiRow:function(t,e){var n=t.content[t.settings.metadataSection];if(n){n=wt(n);var r=L(n,e.path);r&&e.value>=0&&e.value<r.length&&(r.splice(e.value,1),a["a"].set(t.content,t.settings.metadataSection,n))}},moveMetadataMultiRow:function(t,e){var n=t.content[t.settings.metadataSection];if(n){n=wt(n);var r=L(n,e.path);if(r&&e.idx>=0&&e.idx<r.length&&e.idx+e.move>=0&&e.idx+e.move<r.length){var i=r[e.idx];r.splice(e.idx,1),r.splice(e.idx+e.move,0,i),a["a"].set(t.content,t.settings.metadataSection,n)}}},setTextDoc:function(t,e){var n=e.path.split(".");2===n.length?a["a"].set(t.content[n[0]],n[1],e.doc):4===n.length&&a["a"].set(t.content[n[0]].nested[n[2]][n[3]],"content",[e.doc])},addNestedDoc:function(t,e){var n=e.path.split(".");4===n.length&&(t.content[n[0]].nested[n[2]]||a["a"].set(t.content[n[0]].nested,n[2],{}),a["a"].set(t.content[n[0]].nested[n[2]],n[3],{attrs:{id:n[3]},content:[e.doc],nestedDoc:!0,type:n[2]}))}},actions:{load:function(t,e){var n=t.commit,r=t.state,i=new DOMParser,s=i.parseFromString(e,"application/xml");a["a"].set(r,"content",{}),Object.keys(r.sections).forEach((function(t,e){a["a"].set(r.content,t,{}),a["a"].set(r.content[t],"doc",null),a["a"].set(r.content[t],"nested",{})})),Object.entries(r.sections).forEach((function(t){var e=Object(z["a"])(t,2),a=e[0],r=e[1];if("MetadataEditor"===r.type)n("setMetadata",new Mt(s,r).get());else if("TextEditor"===r.type){var i=new Et(s,r).get(),o=Object(z["a"])(i,2),c=o[0],u=o[1];n("setTextDoc",{path:a+".doc",doc:c}),Object.entries(u).forEach((function(t){var e=Object(z["a"])(t,2),r=e[0],i=e[1];Object.entries(i).forEach((function(t){var e=Object(z["a"])(t,2),i=e[0],s=e[1];n("addNestedDoc",{path:a+".nested."+r+"."+i,doc:s.content[0]})}))}))}}))}},modules:{}});a["a"].config.productionTip=!1,new a["a"]({store:Tt,render:function(t){return t(jt)}}).$mount("#app")},e215:function(t,e,n){"use strict";var a=n("ba8f"),r=n.n(a);r.a}});
+(function(t){function e(e){for(var a,s,o=e[0],c=e[1],l=e[2],d=0,h=[];d<o.length;d++)s=o[d],Object.prototype.hasOwnProperty.call(r,s)&&r[s]&&h.push(r[s][0]),r[s]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(t[a]=c[a]);u&&u(e);while(h.length)h.shift()();return i.push.apply(i,l||[]),n()}function n(){for(var t,e=0;e<i.length;e++){for(var n=i[e],a=!0,o=1;o<n.length;o++){var c=n[o];0!==r[c]&&(a=!1)}a&&(i.splice(e--,1),t=s(s.s=n[0]))}return t}var a={},r={app:0},i=[];function s(e){if(a[e])return a[e].exports;var n=a[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,s),n.l=!0,n.exports}s.m=t,s.c=a,s.d=function(t,e,n){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},s.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)s.d(n,a,function(e){return t[e]}.bind(null,a));return n},s.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="/";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],c=o.push.bind(o);o.push=e,o=o.slice();for(var l=0;l<o.length;l++)e(o[l]);var u=c;i.push([0,"chunk-vendors"]),n()})({0:function(t,e,n){t.exports=n("cd49")},"37ba":function(t,e,n){},"6d73":function(t,e,n){"use strict";var a=n("37ba"),r=n.n(a);e["default"]=r.a},ba8f:function(t,e,n){},cd49:function(t,e,n){"use strict";n.r(e);n("e260"),n("e6cf"),n("cca6"),n("a79d");var a=n("2b0e"),r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[n("tei-editor")],1)},i=[],s=n("d4ec"),o=n("bee2"),c=n("99de"),l=n("7e84"),u=n("262e"),d=n("9ab4"),h=n("60a3"),f=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"tei-editor"}},[n("nav",[n("aria-menubar",{scopedSlots:t._u([{key:"default",fn:function(e){var a=e.keyboardNav,r=e.mouseClickNav;return[n("ul",{attrs:{role:"menubar"}},[t.hasSaveCallback||t.hasLoadCallback?n("li",{attrs:{role:"presentation"}},[n("a",{attrs:{role:"menuitem",tabindex:"0","aria-expanded":"false"},on:{keyup:a,click:r}},[t._v("File")]),n("aria-menu",{scopedSlots:t._u([{key:"default",fn:function(e){var a=e.keyboardNav,r=e.mouseClickNav;return[n("ul",{attrs:{role:"menu","aria-hidden":"true"}},[t.hasLoadCallback?n("li",{attrs:{role:"presentation"}},[n("a",{attrs:{role:"menuitem",tabindex:"-1"},on:{click:function(e){r(e),t.load()},keyup:a}},[t._v("Load")])]):t._e(),t.hasSaveCallback?n("li",{attrs:{role:"presentation"}},[n("a",{attrs:{role:"menuitem",tabindex:"-1"},on:{click:function(e){r(e),t.save()},keyup:a}},[t._v("Save")])]):t._e()])]}}],null,!0)})],1):t._e(),t._l(t.sections,(function(e,i,s){return n("li",{key:s,attrs:{role:"presentation"}},[n("a",{attrs:{role:"menuitem",tabindex:"-1","aria-checked":i===t.currentSection?"true":"false"},on:{click:function(e){r(e),t.setCurrentSection(i)},keyup:a}},[t._v(t._s(e.label))])])}))],2)]}}])})],1),n("div",[t._l(t.sections,(function(e,a,r){return[a===t.currentSection?["MetadataEditor"===e.type?n("metadata-editor",{key:r,attrs:{config:e}}):t._e(),"TextEditor"===e.type?n("text-editor",{key:r,attrs:{section:a}}):t._e()]:t._e()]}))],2)])},p=[],v=(n("b64b"),n("a4d3"),n("e01a"),n("d28b"),n("d3b7"),n("3ca3"),n("ddb0"),function(t){function e(){return Object(s["a"])(this,e),Object(c["a"])(this,Object(l["a"])(e).apply(this,arguments))}return Object(u["a"])(e,t),Object(o["a"])(e,[{key:"render",value:function(){if(this.$scopedSlots.default)return this.$scopedSlots.default({keyboardNav:this.keyboardNavigation,mouseClickNav:this.mouseClickNavigation})}},{key:"keyboardNavigation",value:function(t){var e=t.target;if(e)if(39===t.keyCode){var n=this.findNextMenuitem(this.getParentMenubar(e),e,"next");n&&n.focus()}else if(37===t.keyCode){var a=this.findNextMenuitem(this.getParentMenubar(e),e,"previous");a&&a.focus()}else if(38===t.keyCode||40===t.keyCode){var r=!0,i=!1,s=void 0;try{for(var o,c=e.parentElement.children[Symbol.iterator]();!(r=(o=c.next()).done);r=!0){var l=o.value;if("menu"===l.getAttribute("role")){l.setAttribute("aria-hidden","false"),e.setAttribute("aria-expanded","true");var u=this.findNextMenuitem(l,null,"next");u&&u.focus()}}}catch(y){i=!0,s=y}finally{try{r||null==c.return||c.return()}finally{if(i)throw s}}}else if(13===t.keyCode||32==t.keyCode){var d=!0,h=!1,f=void 0;try{for(var p,v=e.parentElement.children[Symbol.iterator]();!(d=(p=v.next()).done);d=!0){var b=p.value;if("menu"===b.getAttribute("role"))if("false"===b.getAttribute("aria-hidden"))b.setAttribute("aria-hidden","true"),e.setAttribute("aria-expanded","false");else{b.setAttribute("aria-hidden","false"),e.setAttribute("aria-expanded","true");var g=this.findNextMenuitem(b,null,"next");if(g)return void g.focus()}}}catch(y){h=!0,f=y}finally{try{d||null==v.return||v.return()}finally{if(h)throw f}}e.click()}}},{key:"mouseClickNavigation",value:function(t){var e=t.target;if(e){var n=!0,a=!1,r=void 0;try{for(var i,s=e.parentElement.children[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var o=i.value;if("menu"===o.getAttribute("role"))if("false"===o.getAttribute("aria-hidden"))o.setAttribute("aria-hidden","true"),e.setAttribute("aria-expanded","false");else{o.setAttribute("aria-hidden","false"),e.setAttribute("aria-expanded","true");var c=this.findNextMenuitem(o,null,"next");if(c)return void c.focus()}}}catch(l){a=!0,r=l}finally{try{n||null==s.return||s.return()}finally{if(a)throw r}}}}},{key:"getParentMenubar",value:function(t){return t?"menubar"===t.getAttribute("role")?t:this.getParentMenubar(t.parentElement):null}},{key:"findNextMenuitem",value:function(t,e,n){if(!t)return null;var a=[];if("next"===n)for(var r=t.children.length-1;r>=0;r--)a.push(t.children[r]);else for(var i=0;i<t.children.length;i++)a.push(t.children[i]);var s=0;e||(s=1);while(a.length>0){var o=a.pop();if(0===s&&o===e)s=1;else if(1===s&&"menuitem"===o.getAttribute("role")&&"true"!==o.getAttribute("aria-disabled"))return o;if("menu"!==o.getAttribute("role"))if("next"===n)for(var c=o.children.length-1;c>=0;c--)a.push(o.children[c]);else for(var l=0;l<o.children.length;l++)a.push(o.children[l])}return null}}]),e}(h["c"]));v=d["a"]([Object(h["a"])({})],v);var b,g,y=v,m=y,k=n("6d73"),O=n("2877");function x(t){this["$style"]=k["default"].locals||k["default"]}var j=Object(O["a"])(m,b,g,!1,x,null,null),N=j.exports,A=function(t){function e(){return Object(s["a"])(this,e),Object(c["a"])(this,Object(l["a"])(e).apply(this,arguments))}return Object(u["a"])(e,t),Object(o["a"])(e,[{key:"render",value:function(){if(this.$scopedSlots.default)return this.$scopedSlots.default({keyboardNav:this.keyboardNavigation,mouseClickNav:this.mouseClickNavigation})}},{key:"keyboardNavigation",value:function(t){var e=t.target;if(e)if(39===t.keyCode);else if(37===t.keyCode);else if(38===t.keyCode){var n=this.findNextMenuitem(this.getParentMenu(e),e,"previous");n&&n.focus()}else if(40===t.keyCode){var a=this.findNextMenuitem(this.getParentMenu(e),e,"next");a&&a.focus()}else if(13===t.keyCode||32==t.keyCode)if(e.getAttribute("aria-expanded")){var r=!0,i=!1,s=void 0;try{for(var o,c=e.parentElement.children[Symbol.iterator]();!(r=(o=c.next()).done);r=!0){var l=o.value;if("menu"===l.getAttribute("role"))if("false"===l.getAttribute("aria-hidden"))l.setAttribute("aria-hidden","true"),e.setAttribute("aria-expanded","false");else{l.setAttribute("aria-hidden","false"),e.setAttribute("aria-expanded","true");var u=this.findNextMenuitem(l,null,"next");u&&u.focus()}}}catch(y){i=!0,s=y}finally{try{r||null==c.return||c.return()}finally{if(i)throw s}}}else e.click();else if(27===t.keyCode){var d=this.getParentMenu(e);if(d){d.setAttribute("aria-hidden","true");var h=!0,f=!1,p=void 0;try{for(var v,b=d.parentElement.children[Symbol.iterator]();!(h=(v=b.next()).done);h=!0){var g=v.value;"menuitem"===g.getAttribute("role")&&(g.setAttribute("aria-expanded","false"),g.focus())}}catch(y){f=!0,p=y}finally{try{h||null==b.return||b.return()}finally{if(f)throw p}}}}}},{key:"mouseClickNavigation",value:function(t){var e=t.target;if(e)if(e.getAttribute("aria-expanded")){var n=!0,a=!1,r=void 0;try{for(var i,s=e.parentElement.children[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var o=i.value;if("menu"===o.getAttribute("role"))if("false"===o.getAttribute("aria-hidden"))o.setAttribute("aria-hidden","true"),e.setAttribute("aria-expanded","false");else{o.setAttribute("aria-hidden","false"),e.setAttribute("aria-expanded","true");var c=this.findNextMenuitem(o,null,"next");c&&c.focus()}}}catch(b){a=!0,r=b}finally{try{n||null==s.return||s.return()}finally{if(a)throw r}}}else{var l=this.getParentMenu(e);if(l){l.setAttribute("aria-hidden","true");var u=!0,d=!1,h=void 0;try{for(var f,p=l.parentElement.children[Symbol.iterator]();!(u=(f=p.next()).done);u=!0){var v=f.value;"menuitem"===v.getAttribute("role")&&(v.setAttribute("aria-expanded","false"),v.focus())}}catch(b){d=!0,h=b}finally{try{u||null==p.return||p.return()}finally{if(d)throw h}}}}}},{key:"getParentMenu",value:function(t){return t?"menu"===t.getAttribute("role")?t:this.getParentMenu(t.parentElement):null}},{key:"getParentMenuOrMenubar",value:function(t){return t?"menu"===t.getAttribute("role")||"menubar"===t.getAttribute("role")?t:this.getParentMenuOrMenubar(t.parentElement):null}}]),e}(N);A=d["a"]([Object(h["a"])({})],A);var _,M,E=A,w=E,S=Object(O["a"])(w,_,M,!1,null,null,null),T=S.exports,$=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"metadata-editor"},t._l(t.config.ui,(function(e,a){return n("section",{key:a},[n("h2",[t._v(t._s(e.label))]),t._l(e.entries,(function(t,e){return n("div",{key:e},[n("metadata-field",{attrs:{config:t}})],1)}))],2)})),0)},C=[],V=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",["single-text"==t.config.type?[n("label",[n("span",{staticClass:"label-text"},[t._v(t._s(t.config.label))]),n("input",{attrs:{type:"text"},domProps:{value:t.value},on:{change:t.update}})])]:t._e(),"multi-row"==t.config.type?[n("ol",{staticClass:"multi-row"},t._l(t.value,(function(e,a){return n("li",{key:a},[t._l(t.config.entries,(function(e,r){return n("metadata-field",{key:r,attrs:{config:e,parent:t.parent+t.config.path+".["+a+"]"}})})),n("aria-menubar",{attrs:{items:t.modifyMenuItems(a)},on:{action:t.menuAction}}),n("aria-menubar",{scopedSlots:t._u([{key:"default",fn:function(e){var r=e.keyboardNav;return[n("ul",{attrs:{role:"menubar"}},[n("li",{attrs:{role:"presentation"}},[n("a",0===a?{attrs:{role:"menuitem","aria-disabled":!0}}:{attrs:{role:"menuitem",tabindex:1===t.value.length?null:0},on:{click:function(e){return t.menuAction("move-up:"+a)},keyup:r}},[n("svg",{attrs:{viewBox:"0 0 24 24","aria-label":"Move up"}},[n("path",{attrs:{d:"M19,3H5A2,2 0 0,0 3,5V19C3,20.11 3.9,21 5,21H19C20.11,21 21,20.11 21,19V5A2,2 0 0,0 19,3M16.59,15.71L12,11.12L7.41,15.71L6,14.29L12,8.29L18,14.29L16.59,15.71Z"}})])])]),n("li",{attrs:{role:"presentation"}},[a===t.value.length-1?n("a",{attrs:{role:"menuitem","aria-disabled":!0}},[n("svg",{attrs:{viewBox:"0 0 24 24","aria-label":"Move down"}},[n("path",{attrs:{d:"M19,3H5A2,2 0 0,0 3,5V19C3,20.11 3.9,21 5,21H19C20.11,21 21,20.11 21,19V5A2,2 0 0,0 19,3M12,15.71L6,9.71L7.41,8.29L12,12.88L16.59,8.29L18,9.71L12,15.71Z"}})])]):n("a",{attrs:{role:"menuitem",tabindex:1===t.value.length?null:0},on:{click:function(e){return t.menuAction("move-down:"+a)},keyup:r}},[n("svg",{attrs:{viewBox:"0 0 24 24","aria-label":"Move down"}},[n("path",{attrs:{d:"M19,3H5A2,2 0 0,0 3,5V19C3,20.11 3.9,21 5,21H19C20.11,21 21,20.11 21,19V5A2,2 0 0,0 19,3M12,15.71L6,9.71L7.41,8.29L12,12.88L16.59,8.29L18,9.71L12,15.71Z"}})])])]),n("li",{attrs:{role:"presentation"}},[n("a",{attrs:{role:"menuitem",tabindex:1===t.value.length?0:-1},on:{click:function(e){return t.menuAction("delete:"+a)},keyup:r}},[n("svg",{attrs:{viewBox:"0 0 24 24","aria-label":"Delete"}},[n("path",{attrs:{d:"M17,13H7V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z"}})])])])])]}}],null,!0)})],2)})),0),n("aria-menubar",{scopedSlots:t._u([{key:"default",fn:function(e){var a=e.keyboardNav;return[n("ul",{attrs:{role:"menubar"}},[n("li",{attrs:{role:"presentation"}},[n("a",{attrs:{role:"menuitem",tabindex:"0"},on:{click:function(e){return t.menuAction("add")},keyup:a}},[n("svg",{attrs:{viewBox:"0 0 24 24","aria-label":"Add"}},[n("path",{attrs:{d:"M17,13H13V17H11V13H7V11H11V7H13V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z"}})])])])])]}}],null,!1,3190783598)})]:t._e(),"multi-field"==t.config.type?[n("ol",{staticClass:"multi-field"},t._l(t.config.entries,(function(e,a){return n("li",{key:a},[n("metadata-field",{attrs:{config:e,parent:t.parent+t.config.path}})],1)})),0)]:t._e()],2)},L=[];n("c975"),n("a9e3"),n("25eb"),n("159b"),n("fb6a"),n("1276");function D(t,e){var n=e.split(".");while(t&&n.length>0){if("["===n[0][0]&&"]"===n[0][n[0].length-1]){var a=Number.parseInt(n[0].substring(1,n[0].length-1));a>=0&&a<t.length&&(t=t[a])}else t=t[n[0]];n=n.slice(1)}return t}var H=function(t){function e(){var t;return Object(s["a"])(this,e),t=Object(c["a"])(this,Object(l["a"])(e).apply(this,arguments)),t.addMenuItems=[{label:'<svg viewBox="0 0 24 24" aria-label="Add"><path d="M17,13H13V17H11V13H7V11H11V7H13V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z" /></svg>',action:"add"}],t}return Object(u["a"])(e,t),Object(o["a"])(e,[{key:"update",value:function(t){t&&t.target&&this.$store.commit("setMetadataValue",{path:this.$props.parent+this.$props.config.path,value:t.target.value})}},{key:"modifyMenuItems",value:function(t){return[{label:'<svg viewBox="0 0 24 24" aria-label="Move up"><path d="M19,3H5A2,2 0 0,0 3,5V19C3,20.11 3.9,21 5,21H19C20.11,21 21,20.11 21,19V5A2,2 0 0,0 19,3M16.59,15.71L12,11.12L7.41,15.71L6,14.29L12,8.29L18,14.29L16.59,15.71Z" /></svg>',action:"move-up:"+t,disabled:0===t},{label:'<svg viewBox="0 0 24 24" aria-label="Move down"><path d="M19,3H5A2,2 0 0,0 3,5V19C3,20.11 3.9,21 5,21H19C20.11,21 21,20.11 21,19V5A2,2 0 0,0 19,3M12,15.71L6,9.71L7.41,8.29L12,12.88L16.59,8.29L18,9.71L12,15.71Z" /></svg>',action:"move-down:"+t,disabled:t===this.value.length-1},{label:'<svg viewBox="0 0 24 24" aria-label="Delete"><path d="M17,13H7V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z" /></svg>',action:"delete:"+t}]}},{key:"menuAction",value:function(t){if("add"===t){var e={};this.$props.config.entries.forEach((function(t){var n=t.path;"."===n[0]&&(n=n.substring(1)),"single-text"===t.type?e[n]="":"multi-row"===t.type?e[n]=[]:"multi-field"===t.type&&t.entries.forEach((function(t){var n=t.path;"."===n[0]&&(n=n.substring(1)),"single-text"===t.type?e[n]="":"multi-row"===t.type&&(e[n]=[])}))})),this.$store.commit("addMetadataMuliRow",{path:this.$props.parent+this.$props.config.path,value:e})}else 0===t.indexOf("move-up:")?this.$store.commit("moveMetadataMultiRow",{path:this.$props.parent+this.$props.config.path,idx:Number.parseInt(t.substring(8)),move:-1}):0===t.indexOf("move-down:")?this.$store.commit("moveMetadataMultiRow",{path:this.$props.parent+this.$props.config.path,idx:Number.parseInt(t.substring(10)),move:1}):0===t.indexOf("delete:")&&this.$store.commit("removeMetadataMultiRow",{path:this.$props.parent+this.$props.config.path,value:Number.parseInt(t.substring(7))})}},{key:"value",get:function(){var t=D(this.$store.state.content[this.$store.state.settings.metadataSection],this.$props.parent+this.$props.config.path);return t||""}}]),e}(h["c"]);H=d["a"]([Object(h["a"])({components:{AriaMenubar:N},props:{config:Object,parent:{type:String,default:""}},name:"metadata-field"})],H);var P=H,I=P,R=Object(O["a"])(I,V,L,!1,null,null,null),B=R.exports,Z=function(t){function e(){return Object(s["a"])(this,e),Object(c["a"])(this,Object(l["a"])(e).apply(this,arguments))}return Object(u["a"])(e,t),e}(h["c"]);Z=d["a"]([Object(h["a"])({components:{MetadataField:B},props:{config:Object}})],Z);var F=Z,U=F,X=Object(O["a"])(U,$,C,!1,null,null,null),Y=X.exports,J=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"text-editor"},[n("editor-content",{attrs:{editor:t.editor}}),n("aria-menubar",{scopedSlots:t._u([{key:"default",fn:function(e){var a=e.keyboardNav;return[n("editor-menu-bar",{attrs:{editor:t.editor},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.commands;e.isActive,e.getMarkAttrs;return[n("div",{staticClass:"sidebar"},t._l(t.activeSidebar,(function(e,i){return n("div",{key:i,class:{"is-active":e.active}},[n("h2",[t._v(t._s(e.label))]),t._l(e.entities,(function(e,i){return["list"===e.type?n("ul",{key:i},t._l(e.entities,(function(e,a){return n("li",{key:a,attrs:{role:"presentation"}},[n("label",[n("span",{domProps:{innerHTML:t._s(e.label)}}),"setNodeAttrString"===e.type?n("input",{domProps:{value:e.value},on:{change:function(n){return t.setNodeAttributeValue(r,e.nodeType,e.attr,n.target.value)}}}):t._e()])])})),0):t._e(),"menubar"===e.type?n("ul",{key:i,attrs:{role:"menubar"}},t._l(e.entities,(function(e,i){return n("li",{key:i,class:"separator"===e.type?"separator":null,attrs:{role:"presentation"}},["setNodeType"===e.type?n("a",{attrs:{role:"menuitem",tabindex:e.tabindex,"aria-label":e.ariaLabel,title:e.ariaLabel,"aria-checked":e.checked},domProps:{innerHTML:t._s(e.label)},on:{keyup:a,click:function(t){r[e.nodeType]()}}}):"setNodeAttrValue"===e.type?n("a",{attrs:{role:"menuitem",tabindex:e.tabindex,"aria-label":e.ariaLabel,title:e.ariaLabel,"aria-checked":e.checked},domProps:{innerHTML:t._s(e.label)},on:{keyup:a,click:function(n){return t.setNodeAttributeValue(r,e.nodeType,e.attr,e.value)}}}):"selectNodeAttr"===e.type?n("select",{attrs:{role:"menuitem",tabindex:e.tabindex},on:{keyup:a,change:function(n){return t.setNodeAttributeValue(r,e.nodeType,e.attr,n.target.value)}}},t._l(e.values,(function(e){return n("option",{key:e.value,domProps:{value:e.value,selected:e.checked,innerHTML:t._s(e.label)}})})),0):"toggleMark"===e.type?n("a",{attrs:{role:"menuitem",tabindex:e.tabindex,"aria-label":e.ariaLabel,title:e.ariaLabel,"aria-checked":e.checked},domProps:{innerHTML:t._s(e.label)},on:{keyup:a,click:function(t){r[e.nodeType]()}}}):"selectMarkAttr"===e.type?n("select",{attrs:{role:"menuitem",tabindex:e.tabindex},on:{keyup:a,change:function(n){return t.setMarkAttributeValue(e.nodeType,e.attr,n.target.value)}}},t._l(e.values,(function(e){return n("option",{key:e.value,domProps:{value:e.value,selected:e.checked,innerHTML:t._s(e.label)}})})),0):"editNestedDoc"===e.type?n("a",{attrs:{role:"menuitem",tabindex:e.tabindex,"aria-label":e.ariaLabel,title:e.ariaLabel},domProps:{innerHTML:t._s(e.label)},on:{keyup:a,click:function(n){return t.editNestedDoc(r,e.nodeType,e.attr,e.targetType)}}}):"closeNested"===e.type?n("a",{attrs:{role:"menuitem",tabindex:e.tabindex,"aria-label":e.ariaLabel,title:e.ariaLabel},domProps:{innerHTML:t._s(e.label)},on:{keyup:a,click:t.closeNestedAction}}):"linkNestedDoc"===e.type?n("select",{attrs:{role:"menuitem",tabindex:e.tabindex},on:{keyup:a,change:function(n){return t.setNodeAttributeValue(r,e.nodeType,e.attr,n.target.value)}}},t._l(e.values,(function(e){return n("option",{key:e.value,domProps:{value:e.value,selected:e.checked,innerHTML:t._s(e.label)}})})),0):t._e()])})),0):t._e()]}))],2)})),0)]}}],null,!0)})]}}])}),t.showNested?n("div",{staticClass:"nested"},[n("text-editor",{attrs:{section:t.section,nestedSection:t.nestedSettings.section,nestedId:t.nestedSettings.id,closeNestedAction:t.closeNestedEditor}})],1):t._e()],1)},W=[],z=(n("4de4"),n("d81d"),n("a434"),n("b0c0"),n("4fad"),n("e439"),n("dbb4"),n("3835")),G=n("ade3"),q=n("cd42"),K=n("a9de"),Q=function(t){function e(t){var n;return Object(s["a"])(this,e),n=Object(c["a"])(this,Object(l["a"])(e).call(this)),n._config={},n._config=t,n}return Object(u["a"])(e,t),Object(o["a"])(e,[{key:"commands",value:function(t){var e,n=t.type;return e={},Object(G["a"])(e,n.name,(function(t){return Object(K["b"])(n,t)})),Object(G["a"])(e,n.name+"_setAttribute",(function(t){return Object(K["b"])(n,t)})),e}},{key:"name",get:function(){return this._config.name}},{key:"schema",get:function(){var t=this;return{content:"inline*",group:"block",draggable:!1,attrs:this._config.attrs,parseDOM:[{tag:"div.node-".concat(this._config.name),getAttrs:function(e){var n={};return t._config.attrs&&Object.keys(t._config.attrs).forEach((function(t){var a=e.getAttribute("data-".concat(t));a&&(n[t]=a)})),n}}],toDOM:function(e){var n={class:"node-".concat(t._config.name)};return Object.entries(e.attrs).forEach((function(t){var e=Object(z["a"])(t,2),a=e[0],r=e[1];n["data-".concat(a)]=r})),["div",n,0]}}}}]),e}(q["f"]),tt=n("986d"),et=n("0ac0"),nt=function(t){function e(t){var n;return Object(s["a"])(this,e),n=Object(c["a"])(this,Object(l["a"])(e).call(this)),n._config={},n._config=t,n}return Object(u["a"])(e,t),Object(o["a"])(e,[{key:"commands",value:function(t){var e=t.type,n=t.schema,a=n.nodes[this._config.content];return function(){return function(t,r){var i=t.selection,s=i.$from,o=i.$to,c=i.from,l=i.to,u=s.blockRange(o),d=u&&Object(et["i"])(u);if(!u||null===d)return!1;var h=Object(tt["findParentNode"])((function(t){return t.type===e}))(i);if(u.depth>=1&&h&&u.depth-h.depth<=1&&h.node.type===e){var f=t.tr.lift(u,d);return f=f.setBlockType(c,l,n.nodes.paragraph),r(f),!0}var p=t.tr.setBlockType(c,l,a);return p=p.wrap(u,[{type:e}]),r(p),!0}}}},{key:"name",get:function(){return this._config.name}},{key:"schema",get:function(){var t=this;return{content:this._config.content+"+",group:"block",draggable:!1,attrs:this._config.attrs,parseDOM:[{tag:"div.node-".concat(this._config.name),getAttrs:function(e){var n={};return t._config.attrs&&Object.keys(t._config.attrs).forEach((function(t){var a=e.getAttribute("data-".concat(t));a&&(n[t]=a)})),n}}],toDOM:function(e){var n={class:"node-".concat(t._config.name)};return Object.entries(e.attrs).forEach((function(t){var e=Object(z["a"])(t,2),a=e[0],r=e[1];n["data-".concat(a)]=r})),["div",n,0]}}}}]),e}(q["f"]),at=function(t){function e(t){var n;return Object(s["a"])(this,e),n=Object(c["a"])(this,Object(l["a"])(e).call(this)),n._config={},n._config=t,n}return Object(u["a"])(e,t),Object(o["a"])(e,[{key:"commands",value:function(t){var e,n=t.type;return e={},Object(G["a"])(e,n.name,(function(t){return function(e,a){var r=e.selection,i=r.$from,s=r.$to,o=r.from,c=r.to,l=!1;e.doc.nodesBetween(o,c,(function(t){t.type===n&&(l=!0)}));var u=i.parent.slice(i.parentOffset,s.parentOffset);return a(l?e.tr.replaceRange(o-1,c+1,u):e.tr.replaceRangeWith(o,c,n.create(t,u.content))),!0}})),Object(G["a"])(e,n.name+"_setAttribute",(function(t){return function(e,a){var r=e.selection,i=r.$from,s=r.$to,o=(r.from,r.to,i.blockRange(s));if(!o)return!1;var c=e.doc.slice(o.start+1,o.end-1);return a(e.tr.replaceRangeWith(o.start,o.end,n.create(t,c.content))),!0}})),e}},{key:"name",get:function(){return this._config.name}},{key:"schema",get:function(){var t=this;return{content:"inline*",group:"inline",inline:!0,attrs:this._config.attrs,parseDOM:[{tag:"span.node-".concat(this._config.name),getAttrs:function(e){var n={};return t._config.attrs&&Object.keys(t._config.attrs).forEach((function(t){var a=e.getAttribute("data-".concat(t));a&&(n[t]=a)})),n}}],toDOM:function(e){var n={class:"node-".concat(t._config.name)};return Object.entries(e.attrs).forEach((function(t){var e=Object(z["a"])(t,2),a=e[0],r=e[1];n["data-".concat(a)]=r})),["span",n,0]}}}}]),e}(q["f"]),rt=function(t){function e(t){var n;return Object(s["a"])(this,e),n=Object(c["a"])(this,Object(l["a"])(e).call(this)),n._config={},n._config=t,n}return Object(u["a"])(e,t),Object(o["a"])(e,[{key:"commands",value:function(t){var e=t.type;return function(){return Object(K["c"])(e)}}},{key:"name",get:function(){return this._config.name}},{key:"schema",get:function(){var t=this;return{attrs:this._config.attrs,parseDOM:[{tag:"span.mark-".concat(this._config.name),getAttrs:function(e){var n={};return t._config.attrs&&Object.keys(t._config.attrs).forEach((function(t){var a=e.getAttribute("data-".concat(t));a&&(n[t]=a)})),n}}],toDOM:function(e){var n={class:"mark-".concat(t._config.name)};return Object.entries(e.attrs).forEach((function(t){var e=Object(z["a"])(t,2),a=e[0],r=e[1];r&&(n["data-".concat(a)]=r)})),["span",n,0]}}}}]),e}(q["e"]);function it(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function st(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?it(Object(n),!0).forEach((function(e){Object(G["a"])(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):it(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var ot=function(t){function e(){var t;return Object(s["a"])(this,e),t=Object(c["a"])(this,Object(l["a"])(e).apply(this,arguments)),t.editor=null,t.showNested=!1,t.nestedSettings=null,t.internalContentUpdate=!1,t.defaultNodeName="",t.sidebar=[],t}return Object(u["a"])(e,t),Object(o["a"])(e,[{key:"mounted",value:function(){var t=this,e=[new q["a"],new q["g"]];this.defaultNodeName="",this.schema.forEach((function(n){"block"===n.type?(e.push(new Q(n)),""===t.defaultNodeName&&(t.defaultNodeName=n.name)):"wrapping"===n.type?e.push(new nt(n)):"inline"===n.type&&"text"!==n.name?e.push(new at(n)):"mark"===n.type&&e.push(new rt(n))})),this.editor=new q["b"]({useBuiltInExtensions:!1,extensions:e,content:{type:"doc",content:[{type:this.defaultNodeName,content:[]}]},onUpdate:function(e){var n=e.getJSON;t.internalContentUpdate=!0,t.$props.nestedSection&&t.$props.nestedId?t.$store.commit("setTextDoc",{path:t.$props.section+".nestedId."+t.$props.nestedSection+"."+t.$props.nestedId,doc:n()}):t.$store.commit("setTextDoc",{path:t.$props.section+".doc",doc:n()})}}),this.doc&&this.editor.setContent(this.doc),this.editor.focus(),this.sidebar=this.ui.map((function(t){var e={label:t.label,active:!0};return t.condition&&(e.condition=t.condition.activeType),t.entities&&(e.entities=t.entities.map((function(t){var e={type:t.type};return t.entities&&(e.entities=t.entities.map((function(t,e){var n={type:t.type,label:t.label,nodeType:t.nodeType||t.markType,attr:t.attr,value:"",checked:"false",tabindex:0===e?0:-1,ariaLabel:t.ariaLabel};return"selectNodeAttr"===t.type||"selectMarkAttr"===t.type?n.values=t.values.map((function(t){return{label:t.label,value:t.value,checked:!1}})):"setNodeAttrValue"===t.type?n.value=t.value:"editNestedDoc"===t.type?n.targetType=t.targetNodeType:"linkNestedDoc"===t.type&&(n.targetType=t.targetNodeType,n.values=[]),n}))),e}))),e}))}},{key:"beforeDestroy",value:function(){this.editor&&this.editor.destroy()}},{key:"updateContent",value:function(t){!this.internalContentUpdate&&this.editor&&this.editor.setContent(t),this.internalContentUpdate=!1}},{key:"getNodeAttributeValue",value:function(t,e){for(var n=0;n<this.selectedNodes.length;n++){var a=this.selectedNodes[n];if(a.type.name===t&&void 0!==a.attrs[e]&&null!==a.attrs[e])return a.attrs[e]}return""}},{key:"hasNodeAttributeValue",value:function(t,e,n){return this.getNodeAttributeValue(t,e)===n}},{key:"setNodeAttributeValue",value:function(t,e,n,a){var r=this.editor.state.selection,i=r.from,s=r.to,o={};this.editor.state.doc.nodesBetween(i,s,(function(t){t.type.name===e&&(o=st({},o,{},t.attrs))})),o[n]=a,t[e+"_setAttribute"](o)}},{key:"getMarkAttributeValue",value:function(t,e){for(var n=0;n<this.selectedNodes.length;n++){var a=this.selectedNodes[n];if(a.marks)for(var r=0;r<a.marks.length;r++){var i=a.marks[r];if(i.type.name===t)return i.attrs[e]}}return""}},{key:"hasMarkAttributeValue",value:function(t,e,n){return this.getMarkAttributeValue(t,e)===n}},{key:"setMarkAttributeValue",value:function(t,e,n){if(n){var a=this.editor.state.selection,r=a.from,i=a.to,s={};this.editor.state.doc.nodesBetween(r,i,(function(e){e.marks&&e.marks.forEach((function(e){e.type.name===t&&(s=st({},s,{},e.attrs))}))})),s[e]=n,Object(K["d"])(this.editor.schema.marks[t],s)(this.editor.state,this.editor.dispatchTransaction.bind(this.editor))}else Object(K["a"])(this.editor.schema.marks[t])(this.editor.state,this.editor.dispatchTransaction.bind(this.editor))}},{key:"editNestedDoc",value:function(t,e,n,a){var r=this.getNodeAttributeValue(e,n);if(!r){var i=this.$store.state.content[this.$props.section].nested[a];r=a+"-1";var s=1;while(i&&i[r])s+=1,r=a+"-"+s;this.setNodeAttributeValue(t,e,n,r),this.$store.commit("addNestedDoc",{path:this.$props.section+".nested."+a+"."+r,doc:{type:"doc",content:[{type:"paragraph",content:[]}]}})}this.showNested=!0,this.nestedSettings={section:a,id:r}}},{key:"closeNestedEditor",value:function(){this.showNested=!1,this.nestedSettings=null}},{key:"schema",get:function(){return this.$store.state.sections[this.$props.section].schema}},{key:"content",get:function(){return this.$store.state.content[this.$props.section]}},{key:"doc",get:function(){if(this.content){if(!this.$props.nestedSection||!this.$props.nestedId)return this.content.doc;if(this.content.nested&&this.content.nested[this.$props.nestedSection]&&this.content.nested[this.$props.nestedSection][this.$props.nestedId])return this.content.nested[this.$props.nestedSection][this.$props.nestedId].content[0]}return null}},{key:"ui",get:function(){return this.$props.nestedSection&&this.$store.state.sections[this.$props.section].ui[this.$props.nestedSection]?this.$store.state.sections[this.$props.section].ui[this.$props.nestedSection]:this.$store.state.sections[this.$props.section].ui.doc}},{key:"selectedNodes",get:function(){if(this.editor){var t=this.editor.state.selection,e=t.from,n=t.to,a=[];return this.editor.state.doc.nodesBetween(e,n,(function(t){a.push(t)})),a}return[]}},{key:"activeSidebar",get:function(){var t=this,e=this.editor.isActive;return this.sidebar.forEach((function(n){n.condition&&(n.active=e[n.condition]()),n.entities.forEach((function(n){n.entities.forEach((function(n){"setNodeAttrString"===n.type?n.value=t.getNodeAttributeValue(n.nodeType,n.attr):"setNodeType"===n.type||"toggleMark"===n.type?n.checked=e[n.nodeType]()?"true":"false":"setNodeAttrValue"===n.type?n.checked=t.hasNodeAttributeValue(n.nodeType,n.attr,n.value)?"true":"false":"selectNodeAttr"===n.type?n.values.forEach((function(e){e.checked=!!t.hasNodeAttributeValue(n.nodeType,n.attr,e.value)})):"selectMarkAttr"===n.type?n.values.forEach((function(e){e.checked=!!t.hasMarkAttributeValue(n.nodeType,n.attr,e.value)})):"linkNestedDoc"===n.type&&(t.nestedDocIds[n.targetType]?(n.values=t.nestedDocIds[n.targetType],n.values.forEach((function(e){e.checked=t.hasNodeAttributeValue(n.nodeType,n.attr,e.value)}))):n.values=[{label:"New",value:"",checked:!1}])}))}))})),this.sidebar}},{key:"nestedDocIds",get:function(){var t={};return Object.entries(this.$store.state.content[this.$props.section].nested).forEach((function(e){var n=Object(z["a"])(e,2),a=n[0],r=n[1];t[a]=Object.keys(r).map((function(t){return{label:t,value:t,checked:!1}})),t[a].splice(0,0,{label:"New",value:"",checked:!1})})),t}}]),e}(h["c"]);d["a"]([Object(h["b"])({type:String})],ot.prototype,"section",void 0),d["a"]([Object(h["b"])({type:String})],ot.prototype,"nestedSection",void 0),d["a"]([Object(h["b"])({type:String})],ot.prototype,"nestedId",void 0),d["a"]([Object(h["b"])({type:Function})],ot.prototype,"closeNestedAction",void 0),d["a"]([Object(h["d"])("doc")],ot.prototype,"updateContent",null),ot=d["a"]([Object(h["a"])({components:{EditorContent:q["c"],EditorMenuBar:q["d"],AriaMenubar:N},name:"text-editor"})],ot);var ct=ot,lt=ct,ut=Object(O["a"])(lt,J,W,!1,null,null,null),dt=ut.exports,ht=(n("99af"),n("a15b"),n("4e82"),n("25f0"),n("6062"),n("5319"),n("53ca")),ft=function(){function t(){Object(s["a"])(this,t)}return Object(o["a"])(t,[{key:"serialise",value:function(t,e){var n=this,a={node:"tei:TEI",attrs:{"xmlns:tei":["http://www.tei-c.org/ns/1.0"]},children:[]};Object.entries(e).forEach((function(e){var r=Object(z["a"])(e,2),i=r[0],s=r[1];"MetadataEditor"===s.type&&n.mergeTrees(a,n.serialiseHeader(t[i],s))})),Object.entries(e).forEach((function(e){var r=Object(z["a"])(e,2),i=r[0],s=r[1];"TextEditor"===s.type&&n.mergeTrees(a,n.serialiseSingleText(t[i],s))}));var r=this.toString(a,"");return r.splice(0,0,'<?xml version="1.0" encoding="UTF-8"?>'),r.push(""),r.join("\n")}},{key:"mergeTrees",value:function(t,e){if(t&&e)for(var n=0;n<e.children.length;n++){for(var a=!1,r=0;r<t.children.length;r++)t.children[r].node===e.children[n].node&&this.objectsMatch(t.children[r].attrs,e.children[n].attrs)&&(this.mergeTrees(t.children[r],e.children[n]),a=!0);a||t.children.push(e.children[n])}}},{key:"objectsMatch",value:function(t,e){var n=this;if(t&&e){if(Object(ht["a"])(t)!==Object(ht["a"])(e))return!1;if("string"===typeof t||"number"===typeof t||"boolean"===typeof t)return t===e;var a=Object.keys(t),r=Object.keys(e);return a.forEach((function(a){return!(r.indexOf(a)<0)&&(!!n.objectsMatch(t[a],e[a])&&void r.splice(r.indexOf(a),1))})),!(r.length>0)}return!t&&!e}},{key:"serialiseSingleText",value:function(t,e){var n=this;if(t){var a=e.serialiser.tag.split("/");this.nested={};var r={node:a[a.length-1],children:t.doc.content.map((function(t){return n.serialiseTextNode(t,e.schema)})),attrs:{}};e.serialiser.attrs&&Object.entries(e.serialiser.attrs).forEach((function(t){var e=Object(z["a"])(t,2),n=e[0],a=e[1];r.attrs[n]?r.attrs[n].push(a):r.attrs[n]=[a]})),Object.entries(this.nested).forEach((function(a){var i=Object(z["a"])(a,2),s=i[0],o=i[1];new Set(o).forEach((function(a){t.nested[s]&&t.nested[s][a]&&r.children.push(n.serialiseTextNode(t.nested[s][a],e.schema))}))}));for(var i=a.length-2;i>=0;i--)r={node:a[i],children:[r]};return{node:"tei:TEI",children:[r]}}return null}},{key:"serialiseTextNode",value:function(t,e){var n=this,a=e.filter((function(e){return e.name===t.type&&e.serialiser}));if(1===a.length){a=a[0];var r={node:a.serialiser.tag,attrs:{},children:[],text:null};if(a.serialiser.attrs&&Object.entries(a.serialiser.attrs).forEach((function(t){r.attrs[t[0]]=[t[1]]})),t.attrs&&Object.entries(t.attrs).forEach((function(t){var e=a.attrs[t[0]].serialiser;if(e){var n=void 0;e.values?e.values[t[1]]&&(n=e.values[t[1]]):n=e.value?e.value.replace("{value}",t[1]):t[1],void 0!==n&&("text()"===e.attr?r.text=n:r.attrs[e.attr]?r.attrs[e.attr].push(n):r.attrs[e.attr]=[n])}})),"inline"===a.type){if(t.content)if(t.content.length>1||t.content[0].marks&&t.content[0].marks.length>0)t.content.forEach((function(t){r.children.push(n.serialiseTextNode(t,e))}));else{var i=this.serialiseTextNode(t.content[0],e);a.serialiser.text?r.attrs[a.serialiser.text.attr]?r.attrs[a.serialiser.text.attr].push(i.text):r.attrs[a.serialiser.text.attr]=[i.text]:r.text=i.text}else t.text&&(a.serialiser.text?r.attrs[a.serialiser.text.attr]?r.attrs[a.serialiser.text.attr].push(t.text):r.attrs[a.serialiser.text.attr]=[t.text]:r.text=t.text);if(t.marks){var s=t.marks.map((function(t){var n=e.filter((function(e){return e.name===t.type&&e.serialiser}));if(1===n.length){n=n[0];var a={node:r.node,attrs:{}},i=n.serialiser;return i.tag&&(a.node=i.tag),i.attrs&&Object.entries(i.attrs).forEach((function(t){t[1].value&&(a.attrs[t[0]]?a.attrs[t[0]].push(t[1].value):a.attrs[t[0]]=[t[1].value])})),t.attrs&&Object.entries(t.attrs).forEach((function(t){var e=void 0;n.attrs[t[0]].serialiser.value?e=n.attrs[t[0]].serialiser.value.replace("{value}",t[1]):n.attrs[t[0]].serialiser.values&&n.attrs[t[0]].serialiser.values[t[1]]&&(e=n.attrs[t[0]].serialiser.values[t[1]]),void 0!==e&&(a.attrs[n.attrs[t[0]].serialiser.attr]?a.attrs[n.attrs[t[0]].serialiser.attr].push(e):a.attrs[n.attrs[t[0]].serialiser.attr]=[e])})),a}return null})).filter((function(t){return t}));if(new Set(s.map((function(t){return t.node}))).size>1){s.sort((function(t,e){return t.node<e.node?-1:t.node>e.node?1:t.node===e.node?0:void 0}));var o=r;o.node=null,s.forEach((function(t){if(null===o.node||o.node===t.node)o.node=t.node,Object.entries(t.attrs).forEach((function(t){o.attrs[t[0]]?o.attrs[t[0]]=o.attrs[t[0]].concat(t[1]):o.attrs[t[0]]=t[1]}));else{var e={node:t.node,attrs:t.attrs,children:[],text:o.text};o.text=null,o.children.push(e),o=e}}))}else s.forEach((function(t){t&&(t.node&&(r.node=t.node),t.attrs&&Object.entries(t.attrs).forEach((function(t){r.attrs[t[0]]?r.attrs[t[0]]=r.attrs[t[0]].concat(t[1]):r.attrs[t[0]]=t[1]})))}))}}else t.content&&t.content.forEach((function(t){"doc"===t.type?t.content&&t.content.forEach((function(t){r.children.push(n.serialiseTextNode(t,e))})):r.children.push(n.serialiseTextNode(t,e))}));return a.reference&&(this.nested[a.reference.type]||(this.nested[a.reference.type]=[]),this.nested[a.reference.type].push(t.attrs[a.reference.attr])),r}return null}},{key:"serialiseHeader",value:function(t,e){var n=this;return{node:"tei:TEI",children:[{node:"tei:teiHeader",children:e.schema.map((function(e){return n.serialiseMetadataNode(t[e.tag.substring(4)],e)}))}]}}},{key:"serialiseMetadataNode",value:function(t,e){var n=this;if(e.multiple){var a=t.map((function(t){var a={node:e.tag};if(t._text&&(a.text=t._text),t._attrs&&(a.attrs={},Object.entries(t._attrs).forEach((function(t){a.attrs[t[0]]=[t[1]]}))),e.children){a.children=[];for(var r=0;r<e.children.length;r++)if(t[e.children[r].tag.substring(4)]){var i=n.serialiseMetadataNode(t[e.children[r].tag.substring(4)],e.children[r]);Array.isArray(i)?a.children=a.children.concat(i):a.children.push(i)}}return a}));return a}var r={node:e.tag};if(t&&(t._text&&(r.text=t._text),t._attrs&&(r.attrs={},Object.entries(t._attrs).forEach((function(t){r.attrs[t[0]]=[t[1]]}))),e.children)){r.children=[];for(var i=0;i<e.children.length;i++)if(t[e.children[i].tag.substring(4)]){var s=this.serialiseMetadataNode(t[e.children[i].tag.substring(4)],e.children[i]);Array.isArray(s)?r.children=r.children.concat(s):r.children.push(s)}}return r}},{key:"toString",value:function(t,e){var n=this;function a(t){return t.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;")}var r=[];if(t){var i=[e,"<",t.node];t.attrs&&Object.entries(t.attrs).forEach((function(t){t[1].length>0&&(t[1].sort(),i.push(" "+t[0]+'="'+a(t[1].join(" "))+'"'))})),t.children&&t.children.length>0?(i.push(">"),r.push(i.join("")),t.children.forEach((function(t){r=r.concat(n.toString(t,e+"  "))})),r.push(e+"</"+t.node+">")):(t.text?(i.push(">"),i.push(a(t.text)),i.push("</"+t.node+">")):i.push("/>"),r.push(i.join("")))}return r}}]),t}(),pt=function(t){function e(){var t;return Object(s["a"])(this,e),t=Object(c["a"])(this,Object(l["a"])(e).apply(this,arguments)),t.currentSection=null,t}return Object(u["a"])(e,t),Object(o["a"])(e,[{key:"setCurrentSection",value:function(t){this.currentSection=t}},{key:"getContentForSection",value:function(t){return D(this.$store.state.content,t)}},{key:"setContentForSection",value:function(t,e){this.$store.commit("setTextDoc",{path:t,doc:e})}},{key:"mounted",value:function(){var t=Object.keys(this.sections);t.length>0&&(this.currentSection=t[0])}},{key:"save",value:function(){if(this.hasSaveCallback){var t=new ft;this.$store.state.callbacks.save(t.serialise(this.$store.state.content,this.$store.state.sections))}}},{key:"load",value:function(){var t=this;this.hasLoadCallback&&this.$store.state.callbacks.load((function(e){t.$store.dispatch("load",e)}))}},{key:"updateSections",value:function(){var t=Object.keys(this.sections);t.length>0&&(this.currentSection=t[0])}},{key:"sections",get:function(){return this.$store.state.sections}},{key:"hasSaveCallback",get:function(){return!!this.$store.state.callbacks.save}},{key:"hasLoadCallback",get:function(){return!!this.$store.state.callbacks.load}}]),e}(h["c"]);d["a"]([Object(h["d"])("sections")],pt.prototype,"updateSections",null),pt=d["a"]([Object(h["a"])({components:{AriaMenubar:N,AriaMenu:T,MetadataEditor:Y,TextEditor:dt}})],pt);var vt=pt,bt=vt,gt=(n("e215"),Object(O["a"])(bt,f,p,!1,null,null,null)),yt=gt.exports,mt=function(t){function e(){return Object(s["a"])(this,e),Object(c["a"])(this,Object(l["a"])(e).apply(this,arguments))}return Object(u["a"])(e,t),Object(o["a"])(e,[{key:"mounted",value:function(){var t=this,e=document.getElementById("TEIEditorConfig");if(e){var n=JSON.parse(e.innerHTML);n&&this.$store.commit("init",n)}this.$store.state.callbacks&&this.$store.state.callbacks.autoLoad&&this.$store.state.callbacks.autoLoad((function(e){t.$store.dispatch("load",e)}))}}]),e}(h["c"]);mt=d["a"]([Object(h["a"])({components:{TeiEditor:yt}})],mt);var kt=mt,Ot=kt,xt=Object(O["a"])(Ot,r,i,!1,null,null,null),jt=xt.exports,Nt=n("2f62");function At(t){return"tei"===t?"http://www.tei-c.org/ns/1.0":"xml"===t?"http://www.w3.org/XML/1998/namespace":"http://www.tei-c.org/ns/1.0"}var _t=function(){function t(e){Object(s["a"])(this,t),this.dom=e}return Object(o["a"])(t,[{key:"evaluate",value:function(t,e,n){return this.dom.evaluate(e,t,At,n,null)}},{key:"firstNode",value:function(t,e){return this.evaluate(t,e,XPathResult.FIRST_ORDERED_NODE_TYPE).singleNodeValue}},{key:"nodeIterator",value:function(t,e){return this.evaluate(t,e,XPathResult.ORDERED_NODE_ITERATOR_TYPE)}},{key:"stringValue",value:function(t,e){return this.evaluate(t,e,XPathResult.STRING_TYPE).stringValue}},{key:"booleanValue",value:function(t,e){return this.evaluate(t,e,XPathResult.BOOLEAN_TYPE).booleanValue}},{key:"numberValue",value:function(t,e){return this.evaluate(t,e,XPathResult.NUMBER_TYPE).numberValue}}]),t}(),Mt=function(){function t(e,n){Object(s["a"])(this,t),this.dom=e,this.xpath=new _t(this.dom),this.config=n}return Object(o["a"])(t,[{key:"get",value:function(){if(!this.data){var t=this.xpath.firstNode(this.dom.documentElement,"/tei:TEI/tei:teiHeader");this.data={};for(var e=0;e<this.config.schema.length;e++){var n=this.parseHeaderNode(t,this.config.schema[e]);n&&(this.data[this.config.schema[e].tag.substring(4)]=n)}}return this.data}},{key:"parseHeaderNode",value:function(t,e){var n=this.xpath.nodeIterator(t,e.tag),a=[],r=n.iterateNext();while(r){for(var i={_attrs:{},_text:0===r.children.length?this.xpath.stringValue(r,"text()"):null},s=0;s<r.attributes.length;s++)i._attrs[r.attributes[s].name]=r.attributes[s].value;if(e.children)for(var o=0;o<e.children.length;o++){var c=this.parseHeaderNode(r,e.children[o]);c&&(i[e.children[o].tag.substring(e.children[o].tag.indexOf(":")+1)]=c)}a.push(i),r=n.iterateNext()}return 0===a.length?null:e.multiple?a:a[0]}}]),t}(),Et=function(){function t(e,n){Object(s["a"])(this,t),this.dom=e,this.xpath=new _t(this.dom),this.config=n}return Object(o["a"])(t,[{key:"get",value:function(){if(!this.doc&&(this.doc={type:"doc",content:[]},this.nestedDocs={},this.config.parser&&this.config.parser.selector)){var t=this.xpath.firstNode(this.dom.documentElement,this.config.parser.selector);if(t)for(var e=0;e<t.children.length;e++){var n=this.parseContentNode(t.children[e],this.config);n&&!n.nestedDoc?this.doc.content.push(n):n&&n.nestedDoc&&this.addNestedDoc(n)}}return[this.doc,this.nestedDocs]}},{key:"parseContentAttributes",value:function(t,e){var n=this,a={};return Object.entries(e).forEach((function(e){var r=Object(z["a"])(e,2),i=r[0],s=r[1],o=[];s.parser?o.push(s.parser):s.parsers&&(o=s.parsers);for(var c=0;c<o.length;c++){var l=o[c];if("boolean"===l.type)a[i]=n.xpath.booleanValue(t,l.selector);else if("number"===l.type)try{a[i]=n.xpath.numberValue(t,l.selector)}catch(d){console.log(d)}else if("static"===l.type)n.xpath.booleanValue(t,l.selector)&&(a[i]=l.value);else try{var u=n.xpath.stringValue(t,l.selector);u&&(a[i]=u)}catch(d){console.log(d)}}})),a}},{key:"parseContentMarks",value:function(t,e){var n=this,a=[];return e.forEach((function(e){if("mark"===e.type){var r=[];e.parser?r.push(e.parser):e.parsers&&(r=e.parsers);for(var i=0;i<r.length;i++)if(n.xpath.booleanValue(t,r[i].selector)){var s={type:e.name};e.attrs&&(s.attrs=n.parseContentAttributes(t,e.attrs)),a.push(s)}}})),a}},{key:"parseContentNode",value:function(t,e){for(var n=Object.entries(e.schema),a=0;a<n.length;a++){var r=n[a][1],i=[];r.parser?i.push(r.parser):r.parsers&&(i=i.concat(r.parsers));for(var s=0;s<i.length;s++){var o=i[s];if(null!==this.xpath.firstNode(t,"self::"+o.selector)){var c={type:r.name};if(r.attrs&&(c.attrs=this.parseContentAttributes(t,r.attrs)),"nested"===r.type&&(c.nestedDoc=!0),"inline"===r.type)if("text"===r.name){if(c.text=this.xpath.stringValue(t,o.text),c.marks=this.parseContentMarks(t,e.schema),1===t.children.length){var l=this.parseContentNode(t.children[0],e);l.text&&""!==l.text&&(c.text=l.text),c.marks=c.marks.concat(l.marks)}}else if(0===t.children.length)this.xpath.stringValue(t,o.text)&&(c.content=[{type:"text",text:this.xpath.stringValue(t,o.text),marks:this.parseContentMarks(t,e.schema)}]);else{for(var u=[],d=0;d<t.children.length;d++){var h=this.parseContentNode(t.children[d],e);h&&u.push(h)}c.content=u}else{for(var f=[],p=0;p<t.children.length;p++){var v=this.parseContentNode(t.children[p],e);v&&!v.nestedDoc?f.push(v):v&&v.nestedDoc&&this.addNestedDoc(v)}c.content=f}return c}}}return null}},{key:"addNestedDoc",value:function(t){if(t.attrs&&t.attrs.id){this.nestedDocs[t.type]||(this.nestedDocs[t.type]={}),this.nestedDocs[t.type][t.attrs.id]=t;var e={type:"doc",content:t.content};t.content=[e]}}}]),t}();function wt(t){if(void 0!==t){if(null===t)return null;if(Array.isArray(t))return t.map((function(t){return wt(t)}));if("object"===Object(ht["a"])(t)){var e={};return Object.keys(t).forEach((function(n){e[n]=wt(t[n])})),e}return t}}a["a"].use(Nt["a"]);var St={settings:{metadataSection:""},sections:{},content:{},callbacks:{save:void 0,load:void 0,autoLoad:void 0}},Tt=new Nt["a"].Store({state:St,mutations:{init:function(t,e){t.sections=e.sections,Object.keys(e.sections).forEach((function(n,r){"MetadataEditor"===e.sections[n].type&&(t.settings.metadataSection=n),a["a"].set(t.content,n,{}),a["a"].set(t.content[n],"doc",null),a["a"].set(t.content[n],"nested",{})})),window.TEIEditor&&window.TEIEditor.callbacks&&(a["a"].set(t.callbacks,"save",window.TEIEditor.callbacks.save),a["a"].set(t.callbacks,"load",window.TEIEditor.callbacks.load),a["a"].set(t.callbacks,"autoLoad",window.TEIEditor.callbacks.autoLoad))},setMetadata:function(t,e){a["a"].set(t.content,t.settings.metadataSection,e)},setMetadataValue:function(t,e){var n=t.content[t.settings.metadataSection];if(n){n=wt(n);var r=n,i=e.path.split(".");while(i.length>0){var s=i[0];if("["===s[0]&&"]"===s[s.length-1]&&Array.isArray(r)){var o=Number.parseInt(s.substring(1,s.length-1));o>=0&&o<r.length&&(i.length>1?r=r[o]:r[o]=e.value)}else r[s]?i.length>1?r=r[s]:r[s]=e.value:i.length>1?(r[s]={},r=r[s]):r[s]=e.value;i.splice(0,1)}a["a"].set(t.content,t.settings.metadataSection,n)}},addMetadataMuliRow:function(t,e){var n=t.content[t.settings.metadataSection];if(n){n=wt(n);var r=D(n,e.path);r&&(r.push(e.value),a["a"].set(t.content,t.settings.metadataSection,n))}},removeMetadataMultiRow:function(t,e){var n=t.content[t.settings.metadataSection];if(n){n=wt(n);var r=D(n,e.path);r&&e.value>=0&&e.value<r.length&&(r.splice(e.value,1),a["a"].set(t.content,t.settings.metadataSection,n))}},moveMetadataMultiRow:function(t,e){var n=t.content[t.settings.metadataSection];if(n){n=wt(n);var r=D(n,e.path);if(r&&e.idx>=0&&e.idx<r.length&&e.idx+e.move>=0&&e.idx+e.move<r.length){var i=r[e.idx];r.splice(e.idx,1),r.splice(e.idx+e.move,0,i),a["a"].set(t.content,t.settings.metadataSection,n)}}},setTextDoc:function(t,e){var n=e.path.split(".");2===n.length?a["a"].set(t.content[n[0]],n[1],e.doc):4===n.length&&a["a"].set(t.content[n[0]].nested[n[2]][n[3]],"content",[e.doc])},addNestedDoc:function(t,e){var n=e.path.split(".");4===n.length&&(t.content[n[0]].nested[n[2]]||a["a"].set(t.content[n[0]].nested,n[2],{}),a["a"].set(t.content[n[0]].nested[n[2]],n[3],{attrs:{id:n[3]},content:[e.doc],nestedDoc:!0,type:n[2]}))}},actions:{load:function(t,e){var n=t.commit,r=t.state,i=new DOMParser,s=i.parseFromString(e,"application/xml");a["a"].set(r,"content",{}),Object.keys(r.sections).forEach((function(t,e){a["a"].set(r.content,t,{}),a["a"].set(r.content[t],"doc",null),a["a"].set(r.content[t],"nested",{})})),Object.entries(r.sections).forEach((function(t){var e=Object(z["a"])(t,2),a=e[0],r=e[1];if("MetadataEditor"===r.type)n("setMetadata",new Mt(s,r).get());else if("TextEditor"===r.type){var i=new Et(s,r).get(),o=Object(z["a"])(i,2),c=o[0],l=o[1];n("setTextDoc",{path:a+".doc",doc:c}),Object.entries(l).forEach((function(t){var e=Object(z["a"])(t,2),r=e[0],i=e[1];Object.entries(i).forEach((function(t){var e=Object(z["a"])(t,2),i=e[0],s=e[1];n("addNestedDoc",{path:a+".nested."+r+"."+i,doc:s.content[0]})}))}))}}))}},modules:{}});a["a"].config.productionTip=!1,new a["a"]({store:Tt,render:function(t){return t(jt)}}).$mount("#app")},e215:function(t,e,n){"use strict";var a=n("ba8f"),r=n.n(a);r.a}});
 //# sourceMappingURL=app.js.map
\ No newline at end of file
diff --git a/scripts/tei-editor/config.js b/scripts/tei-editor/config.js
deleted file mode 100644
index 7dee8c35e12c34cc552dba74dc7542d728e5d553..0000000000000000000000000000000000000000
--- a/scripts/tei-editor/config.js
+++ /dev/null
@@ -1,2060 +0,0 @@
-(function() {
-    window.teiEditorConfig = Object.assign(window.teiEditorConfig || {}, {
-        // Configure editor tabs
-        sections: {
-
-            // ================
-            // Metadaten Header
-            // ================
-            header: {
-                title: 'Metadaten',
-                type: 'header',
-                tag: 'tei:teiHeader',
-                schema: [
-                    {
-                        "tag": 'tei:fileDesc',
-                        children: [
-                            {
-                                tag: 'tei:titleStmt',
-                                children: [
-                                    {
-                                        tag: 'tei:title',
-                                        text: 'fileDesc.titleStmt.title._text'
-                                    },
-                                    {
-                                        tag: 'tei:author',
-                                        text: 'fileDesc.titleStmt.author._text'
-                                    },
-                                    {
-                                        tag: 'tei:respStmt',
-                                        multiple: true,
-                                        deduplicate: {
-                                            key: 'attrs.xml:id',
-                                            merge: [
-                                                {
-                                                    tag: 'tei:resp',
-                                                },
-                                                {
-                                                    tag: 'tei:name'
-                                                },
-                                            ],
-                                        },
-                                        attrs: {
-                                            'xml:id': '_attrs.xml:id'
-                                        },
-                                        children: [
-                                            {
-                                                tag: 'tei:resp',
-                                                text: 'resp._text'
-                                            },
-                                            {
-                                                tag: 'tei:name',
-                                                text: 'name._text'
-                                            }
-                                        ]
-                                    }
-                                ]
-                            },
-                            {
-                                tag: 'tei:publicationStmt',
-                                children: [
-                                    {
-                                        tag: 'tei:distributor',
-                                        text: 'fileDesc.publicationStmt.distributor._text'
-                                    }
-                                ]
-                            }
-                        ]
-                    },
-                    {
-                        tag: 'tei:encodingDesc',
-                        children: [
-                            {
-                                tag: 'tei:classDecl',
-                                children: [
-                                    {
-                                        tag: 'tei:taxonomy',
-                                        attrs: {
-                                            'xml:id': 'encodingDesc.classDecl.taxonomy._attrs.xml:id'
-                                        },
-                                        children: [
-                                            {
-                                                tag: 'tei:bibl',
-                                                text: 'encodingDesc.classDecl.taxonomy.bibl._text'
-                                            }
-                                        ]
-                                    }
-                                ]
-                            }
-                        ]
-                    },
-                    {
-                        tag: 'tei:sourceDesc',
-                        children: [
-                            {
-                                tag: 'tei:bibl',
-                                text: 'sourceDesc.bibl._text'
-                            }
-                        ]
-                    },
-                    {
-                        tag: 'tei:profileDesc',
-                        children: [
-                            {
-                                tag: 'tei:creation',
-                                children: [
-                                    {
-                                        tag: 'tei:date',
-                                        attrs: {
-                                            when: 'profileDesc.creation.date._attrs.when'
-                                        },
-                                        text: 'profileDesc.creation.date._text'
-                                    }
-                                ]
-                            },
-                            {
-                                tag: 'tei:textClass',
-                                children: [
-                                    {
-                                        tag: 'tei:catRef',
-                                        attrs: {
-                                            target: 'profileDesc.textClass.catRef._attrs.target'
-                                        },
-                                    }
-                                ]
-                            }
-                        ]
-                    },
-                    {
-                        tag: 'tei:revisionDesc',
-                        children: [
-                            {
-                                tag: 'tei:change',
-                                multiple: true,
-                                attrs: {
-                                    when: '_attrs.when',
-                                    who: '_attrs.who'
-                                },
-                                text: '_text'
-                            }
-                        ]
-                    }
-                ],
-                ui: [
-                    {
-                        title: 'Bibliographie',
-                        entries: [
-                            {
-                                type: 'single-text',
-                                label: 'Titel',
-                                path: 'fileDesc.titleStmt.title._text'
-                            },
-                            {
-                                type: 'single-text',
-                                label: 'Autor',
-                                path: 'fileDesc.titleStmt.author._text'
-                            },
-                            {
-                                type: 'single-text',
-                                label: 'Quelle',
-                                path: 'sourceDesc.bibl._text'
-                            },
-                            {
-                                type: 'single-text',
-                                label: 'Veröffentlichungsdatum (JJJJ-MM-TT, JJJJ-MM, JJJJ)',
-                                path: 'profileDesc.creation.date._attrs.when'
-                            },
-                            {
-                                type: 'single-text',
-                                label: 'Veröffentlichungsdatum (natürlichsprachlich)',
-                                path: 'profileDesc.creation.date._text'
-                            }
-                        ]
-                    },
-                    {
-                        title: 'Digitale Version',
-                        entries: [
-                            {
-                                type: 'single-text',
-                                label: 'Distributor',
-                                path: 'fileDesc.publicationStmt.distributor._text'
-                            },
-                            {
-                                type: 'single-text',
-                                label: 'Taxonomie: Schlüssel',
-                                path: 'encodingDesc.classDecl.taxonomy._attrs.xml:id'
-                            },
-                            {
-                                type: 'single-text',
-                                label: 'Taxonomie: Name',
-                                path: 'encodingDesc.classDecl.taxonomy.bibl._text'
-                            },
-                            {
-                                type: 'single-text',
-                                label: 'Kategorie',
-                                path: 'profileDesc.textClass.catRef._attrs.target'
-                            }
-                        ]
-                    },
-                    {
-                        title: 'Verantwortliche',
-                        entries: [
-                            {
-                                type: 'multi-field',
-                                path: 'fileDesc.titleStmt.respStmt',
-                                entries: [
-                                    {
-                                        type: 'single-text',
-                                        label: 'Schlüssel',
-                                        path: '_attrs.xml:id'
-                                    },
-                                    {
-                                        type: 'single-text',
-                                        label: 'Verantwortlich für',
-                                        path: 'resp._text'
-                                    },
-                                    {
-                                        type: 'single-text',
-                                        label: 'Name',
-                                        path: 'name._text'
-                                    }
-                                ]
-                            }
-                        ]
-                    },
-                    {
-                        title: 'Änderungsgeschichte',
-                        entries: [
-                            {
-                                type: 'multi-field',
-                                path: 'revisionDesc.change',
-                                entries: [
-                                    {
-                                        type: 'single-text',
-                                        label: 'Änderung',
-                                        path: '_text'
-                                    },
-                                    {
-                                        type: 'single-text',
-                                        label: 'Durch',
-                                        path: '_attrs.who'
-                                    },
-                                    {
-                                        type: 'single-text',
-                                        label: 'Datum (JJJJ-MM-TT, JJJJ-MM, JJJJ)',
-                                        path: '_attrs.when'
-                                    }
-                                ]
-                            }
-                        ]
-                    }
-                ]
-            },
-
-            // =========
-            // Haupttext
-            // =========
-            mainText: {
-                title: 'Haupttext',
-                type: 'single-text',
-                parser: {
-                    selector: 'tei:text/tei:body',
-                },
-                serializer: {
-                    tag: 'tei:text'
-                },
-                schema: {
-                    nodes: {
-                        doc: {
-                            content: 'block+',
-                            parser: {
-                                selector: 'tei:body'
-                            },
-                            serializer: {
-                                tag: 'tei:body'
-                            }
-                        },
-                        paragraph: {
-                            group: 'block',
-                            content: 'inline*',
-                            parser: {
-                                selector: 'tei:p'
-                            },
-                            serializer: {
-                                tag: 'tei:p'
-                            },
-                            attrs: {
-                                noIndent: {
-                                    default: false,
-                                    parser: {
-                                        selector: 'contains(@style, "no-indent")',
-                                        type: 'boolean'
-                                    },
-                                    serializer: {
-                                        attr: 'style',
-                                        values: {
-                                            true: 'no-indent'
-                                        }
-                                    }
-                                },
-                                textAlign: {
-                                    default: 'left',
-                                    parsers: [
-                                        {
-                                            selector: "contains(@style, 'text-left')",
-                                            type: 'static',
-                                            value: 'left'
-                                        },
-                                        {
-                                            selector: "contains(@style, 'text-center')",
-                                            type: 'static',
-                                            value: 'center'
-                                        },
-                                        {
-                                            selector: "contains(@style, 'text-right')",
-                                            type: 'static',
-                                            value: 'right'
-                                        },
-                                        {
-                                            selector: "contains(@style, 'text-justify')",
-                                            type: 'static',
-                                            value: 'justify'
-                                        }
-                                    ],
-                                    serializer: {
-                                        attr: 'style',
-                                        values: {
-                                            center: 'text-center',
-                                            right: 'text-right',
-                                            justify: 'text-justify'
-                                        }
-                                    }
-                                }
-                            },
-                        },
-                        heading: {
-                            group: 'block',
-                            content: 'inline*',
-                            parser: {
-                                selector: 'tei:head'
-                            },
-                            serializer: {
-                                tag: 'tei:head'
-                            },
-                            attrs: {
-                                headingId: {
-                                    default: '',
-                                    parser: {
-                                        selector: '@data-heading-id'
-                                    },
-                                    serializer: {
-                                        attr: 'data-heading-id'
-                                    }
-                                },
-                                level: {
-                                    default: 1,
-                                    parser: {
-                                        selector: 'substring(@type, 7)'
-                                    },
-                                    serializer: {
-                                        attr: 'type',
-                                        value: 'level-${value}'
-                                    }
-                                }
-                            },
-                            defining: true
-                        },
-                        line: {
-                            group: 'block',
-                            content: 'inline*',
-                            parser: {
-                                selector: 'tei:l'
-                            },
-                            serializer: {
-                                tag: 'tei:l'
-                            }
-                        },
-                        lineGroup: {
-                            group: 'block',
-                            content: 'line+',
-                            parser: {
-                                selector: 'tei:lg'
-                            },
-                            serializer: {
-                                tag: 'tei:lg'
-                            }
-                        },
-                        text: {
-                            group: 'inline',
-                            inline: true,
-                            parsers: [
-                                {
-                                    selector: 'tei:seg',
-                                    text: 'text()'
-                                },
-                                {
-                                    selector: 'tei:hi',
-                                    text: 'text()'
-                                },
-                            ],
-                            serializer: {
-                                tag: 'tei:seg'
-                            }
-                        },
-                        annotationGlobal: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:ref[@target="#global"]',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:ref'
-                            },
-                            attrs: {
-                                target: {
-                                    default: 'global',
-                                    parser: {
-                                        selector: 'substring(@target, 2)'
-                                    },
-                                    serializer: {
-                                        attr: 'target',
-                                        value: '#${value}'
-                                    }
-                                },
-                                headingId: {
-                                    default: '',
-                                    parser: {
-                                        selector: '@data-heading-id'
-                                    },
-                                    serializer: {
-                                        attr: 'data-heading-id'
-                                    }
-                                }
-                            }
-                        },
-                        annotation: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:ref',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:ref'
-                            },
-                            attrs: {
-                                target: {
-                                    default: 'unknown',
-                                    parser: {
-                                        selector: 'substring(@target, 2)'
-                                    },
-                                    serializer: {
-                                        attr: 'target',
-                                        value: '#${value}'
-                                    }
-                                }
-                            }
-                        },
-                        pageBegin: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:pb',
-                                text: '@n'
-                            },
-                            serializer: {
-                                tag: 'tei:pb',
-                                text: {
-                                    attr: 'n'
-                                }
-                            }
-                        },
-                        footnote: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:note[@type="footnote"]',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:note',
-                            },
-                            attrs: {
-                                type: {
-                                    default: 'footnote',
-                                    parser: {
-                                        selector: '@type',
-                                    },
-                                    serializer: {
-                                        attr: 'type',
-                                        value: 'footnote'
-                                    }
-                                },
-                                marker: {
-                                    default: '',
-                                    parser: {
-                                        selector: '@data-marker'
-                                    },
-                                    serializer: {
-                                        attr: 'data-marker'
-                                    }
-                                }
-                            }
-                        },
-                        foreignLanguage: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:foreign',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:foreign'
-                            }
-                        },
-                    },
-                    marks: {
-                        letterSparse: {
-                            parser: {
-                                selector: 'contains(@style, "letter-sparse")'
-                            },
-                            serializer: {
-                                tag: 'tei:hi',
-                                attrs: {
-                                    style: {
-                                        value: 'letter-sparse'
-                                    }
-                                }
-                            }
-                        },
-                        sup: {
-                            parser: {
-                                selector: 'contains(@style, "sup")'
-                            },
-                            serializer: {
-                                tag: 'tei:hi',
-                                attrs: {
-                                    style: {
-                                        value: 'sup'
-                                    }
-                                }
-                            }
-                        },
-                        fontSize: {
-                            parsers: [
-                                {
-                                    selector: "contains(@style, 'font-size-small')"
-                                },
-                                {
-                                    selector: "contains(@style, 'font-size-medium')"
-                                },
-                                {
-                                    selector: "contains(@style, 'font-size-large')"
-                                }
-                            ],
-                            serializer: {
-                                tag: 'tei:hi'
-                            },
-                            attrs: {
-                                size: {
-                                    default: '',
-                                    parsers: [
-                                        {
-                                            selector: "contains(@style, 'font-size-small')",
-                                            type: 'static',
-                                            value: 'small'
-                                        },
-                                        {
-                                            selector: "contains(@style, 'font-size-medium')",
-                                            type: 'static',
-                                            value: 'medium'
-                                        },
-                                        {
-                                            selector: "contains(@style, 'font-size-large')",
-                                            type: 'static',
-                                            value: 'large'
-                                        }
-                                    ],
-                                    serializer: {
-                                        attr: 'style',
-                                        values: {
-                                            small: 'font-size-small',
-                                            medium: 'font-size-medium',
-                                            large: 'font-size-large'
-                                        }
-                                    }
-                                }
-                            }
-                        },
-                        fontWeightBold: {
-                            parser: {
-                                selector: 'contains(@style, "font-weight-bold")'
-                            },
-                            serializer: {
-                                tag: 'tei:hi',
-                                attrs: {
-                                    style: {
-                                        value: 'font-weight-bold'
-                                    }
-                                }
-                            }
-                        },
-                        fontStyleItalic: {
-                            parser: {
-                                selector: 'contains(@style, "font-style-italic")'
-                            },
-                            serializer: {
-                                tag: 'tei:hi',
-                                attrs: {
-                                    style: {
-                                        value: 'font-style-italic'
-                                    }
-                                }
-                            }
-                        }
-                    }
-                },
-                ui: [
-                    {
-                        title: 'Blocktypen',
-                        type: 'block-type',
-                        blocks: [
-                            {
-                                type: 'heading',
-                                label: 'Überschrift'
-                            },
-                            {
-                                type: 'paragraph',
-                                label: 'Absatz'
-                            },
-                            {
-                                type: 'lineGroup',
-                                label: 'Vers',
-                                wrapping: true
-                            },
-                            {
-                                type: 'line',
-                                label: 'Zeile'
-                            },
-                        ]
-                    },
-                    {
-                        title: 'Auszeichnungen',
-                        type: 'block-type',
-                        blocks: [
-                            {
-                                type: 'annotation',
-                                label: 'Einzelstellenverweis'
-                            },
-                            {
-                                type: 'annotationGlobal',
-                                label: 'Globalkommentarverweis'
-                            },
-                            {
-                                type: 'pageBegin',
-                                label: 'Seitenanfang'
-                            },
-                            {
-                                type: 'footnote',
-                                label: 'Fußnote'
-                            },
-                            {
-                                type: 'foreignLanguage',
-                                label: 'Fremdsprachiger Text'
-                            }
-                        ]
-                    },
-                    {
-                        title: 'Überschrift',
-                        type: 'toolbar',
-                        context: 'blocks.heading',
-                        entries: [
-                            {
-                                type: 'select-attr',
-                                attr: 'level',
-                                values: [
-                                    {
-                                        key: '1',
-                                        value: 'Ebene 1'
-                                    },
-                                    {
-                                        key: '2',
-                                        value: 'Ebene 2'
-                                    },
-                                    {
-                                        key: '3',
-                                        value: 'Ebene 3'
-                                    },
-                                    {
-                                        key: '4',
-                                        value: 'Ebene 4'
-                                    },
-                                ]
-                            },
-                            {
-                                type: 'text-attr',
-                                attr: 'headingId',
-                                dataType: 'text'
-                            }
-                        ]
-                    },
-                    {
-                        title: 'Absatz',
-                        type: 'toolbar',
-                        context: 'blocks.paragraph',
-                        entries: [
-                            {
-                                type: 'toggle-attr',
-                                attr: 'noIndent',
-                                label: "Nicht einrücken",
-                                icon: {
-                                    on: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M11,17H21V15H11M3,8V16L7,12M3,21H21V19H3V21Z" /></svg>',
-                                    off: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M3,21H21V19H3M3,12L7,16V8M11,17H21V15H11V17Z" /></svg>'
-                                }
-                            },
-                            {
-                                type: 'separator'
-                            },
-                            {
-                                type: 'set-attr',
-                                attr: 'textAlign',
-                                value: 'left',
-                                label: 'Linksbündig',
-                                icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z" /></svg>'
-                            },
-                            {
-                                type: 'set-attr',
-                                attr: 'textAlign',
-                                value: 'center',
-                                label: 'Zentriert',
-                                icon: '<svg style="viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M7,7H17V9H7V7M3,11H21V13H3V11M7,15H17V17H7V15M3,19H21V21H3V19Z" /></svg>'
-                            },
-                            {
-                                type: 'set-attr',
-                                attr: 'textAlign',
-                                value: 'right',
-                                label: 'Rechtsbündig',
-                                icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M9,7H21V9H9V7M3,11H21V13H3V11M9,15H21V17H9V15M3,19H21V21H3V19Z" /></svg>'
-                            },
-                            {
-                                type: 'set-attr',
-                                attr: 'textAlign',
-                                value: 'justify',
-                                label: 'Block',
-                                icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M3,7H21V9H3V7M3,11H21V13H3V11M3,15H21V17H3V15M3,19H21V21H3V19Z" /></svg>'
-                            },
-                        ]
-                    },
-                    {
-                        title: 'Darstellung',
-                        type: 'toolbar',
-                        context: 'marks',
-                        entries: [
-                            {
-                                type: 'select-mark-attr',
-                                mark: 'fontSize',
-                                attr: 'size',
-                                values: [
-                                    {
-                                        key: '',
-                                        label: 'Normal'
-                                    },
-                                    {
-                                        key: 'small',
-                                        label: 'Klein',
-                                    },
-                                    {
-                                        key: 'medium',
-                                        label: 'Mittel',
-                                    },
-                                    {
-                                        key: 'large',
-                                        label: 'Groß'
-                                    }
-                                ]
-                            },
-                            {
-                                type: 'toggle-mark',
-                                mark: 'fontWeightBold',
-                                label: 'Fettdruck',
-                                icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z" /></svg>'
-                            },
-                            {
-                                type: 'toggle-mark',
-                                mark: 'fontStyleItalic',
-                                label: 'Kursiv',
-                                icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M10,4V7H12.21L8.79,15H6V18H14V15H11.79L15.21,7H18V4H10Z" /></svg>'
-                            },
-                            {
-                                type: 'toggle-mark',
-                                mark: 'letterSparse',
-                                label: 'Sperrung',
-                                icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z" /></svg>'
-                            },
-                            {
-                                type: 'toggle-mark',
-                                mark: 'sup',
-                                label: 'Hochgestellt',
-                                icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z" /></svg>'
-                            }
-                        ]
-                    },
-                    {
-                        title: 'Einzelstellenverweis',
-                        type: 'toolbar',
-                        context: 'blocks.annotation',
-                        entries: [
-                            {
-                                type: 'select-attr',
-                                attr: 'target',
-                                valueSource: 'annotations'
-                            }
-                        ]
-                    },
-                    {
-                        title: 'Globalkommentarverweis Abschnitt (optional)',
-                        type: 'toolbar',
-                        context: 'blocks.annotationGlobal',
-                        entries: [
-                            {
-                                type: 'text-attr',
-                                attr: 'headingId',
-                                dataType: 'text'
-                            }
-                        ]
-                    },
-                    {
-                        title: 'Fußnotenmarkierung',
-                        type: 'toolbar',
-                        context: 'blocks.footnote',
-                        entries: [
-                            {
-                                type: 'text-attr',
-                                attr: 'marker',
-                                dataType: 'text'
-                            }
-                        ]
-                    }
-                ]
-            },
-
-            // ===============
-            // Globalkommentar
-            // ===============
-            globalComment: {
-                title: 'Apparat',
-                type: 'single-text',
-                parser: {
-                    selector: 'tei:text/tei:interpGrp[@type="global"]',
-                },
-                serializer: {
-                    tag: 'tei:text'
-                },
-                schema: {
-                    nodes: {
-                        doc: {
-                            content: 'block+',
-                            parser: {
-                                selector: 'tei:interpGrp[@type="global"]'
-                            },
-                            serializer: {
-                                tag: 'tei:interpGrp',
-                                attrs: {
-                                    type: 'global',
-                                    'xml:id': 'global'
-                                }
-                            }
-                        },
-                        paragraph: {
-                            group: 'block',
-                            content: 'inline*',
-                            parser: {
-                                selector: 'tei:p'
-                            },
-                            serializer: {
-                                tag: 'tei:p'
-                            },
-                            attrs: {
-                                noIndent: {
-                                    default: false,
-                                    parser: {
-                                        selector: 'contains(@style, "no-indent")',
-                                        type: 'boolean'
-                                    },
-                                    serializer: {
-                                        attr: 'style',
-                                        values: {
-                                            true: 'no-indent'
-                                        }
-                                    }
-                                },
-                                textAlign: {
-                                    default: 'left',
-                                    parsers: [
-                                        {
-                                            selector: "contains(@style, 'text-left')",
-                                            type: 'static',
-                                            value: 'left'
-                                        },
-                                        {
-                                            selector: "contains(@style, 'text-center')",
-                                            type: 'static',
-                                            value: 'center'
-                                        },
-                                        {
-                                            selector: "contains(@style, 'text-right')",
-                                            type: 'static',
-                                            value: 'right'
-                                        },
-                                        {
-                                            selector: "contains(@style, 'text-justify')",
-                                            type: 'static',
-                                            value: 'justify'
-                                        }
-                                    ],
-                                    serializer: {
-                                        attr: 'style',
-                                        values: {
-                                            center: 'text-center',
-                                            right: 'text-right',
-                                            justify: 'text-justify'
-                                        }
-                                    }
-                                }
-                            },
-                        },
-                        heading: {
-                            group: 'block',
-                            content: 'inline*',
-                            parser: {
-                                selector: 'tei:head'
-                            },
-                            serializer: {
-                                tag: 'tei:head'
-                            },
-                            attrs: {
-                                headingId: {
-                                    default: '',
-                                    parser: {
-                                        selector: '@data-heading-id'
-                                    },
-                                    serializer: {
-                                        attr: 'data-heading-id'
-                                    }
-                                },
-                                level: {
-                                    default: 1,
-                                    parser: {
-                                        selector: 'substring(@type, 7)'
-                                    },
-                                    serializer: {
-                                        attr: 'type',
-                                        value: 'level-${value}'
-                                    }
-                                }
-                            },
-                            defining: true
-                        },
-                        source: {
-                            group: 'block',
-                            content: 'inline*',
-                            parser: {
-                                selector: 'tei:item'
-                            },
-                            serializer: {
-                                tag: 'tei:item'
-                            },
-                            attrs: {
-                                sourceId: {
-                                    default: '',
-                                    parser: {
-                                        selector: '@data-source-id'
-                                    },
-                                    serializer: {
-                                        attr: 'data-source-id',
-                                        value: '${value}'
-                                    }
-                                }
-                            }
-                        },
-                        sourceList: {
-                            group: 'block',
-                            content: 'source+',
-                            parser: {
-                                selector: 'tei:list[@type="sources"]'
-                            },
-                            serializer: {
-                                tag: 'tei:list',
-                                attrs: {
-                                    type: 'sources'
-                                }
-                            }
-                        },
-                        text: {
-                            group: 'inline',
-                            inline: true,
-                            parsers: [
-                                {
-                                    selector: 'tei:seg',
-                                    text: 'text()'
-                                },
-                                {
-                                    selector: 'tei:hi',
-                                    text: 'text()'
-                                },
-                            ],
-                            serializer: {
-                                tag: 'tei:seg'
-                            }
-                        },
-                        pageLineRef: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:citedRange[@type="page-line-ref"]',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:citedRange',
-                                attrs: {
-                                    type: 'page-line-ref'
-                                }
-                            }
-                        },
-                        wordRange: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:citedRange[@type="word-range"]',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:citedRange',
-                                attrs: {
-                                    type: 'word-range'
-                                }
-                            }
-                        },
-                        annotationGlobal: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:ref[@target="#global"]',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:ref'
-                            },
-                            attrs: {
-                                target: {
-                                    default: 'global',
-                                    parser: {
-                                        selector: 'substring(@target, 2)'
-                                    },
-                                    serializer: {
-                                        attr: 'target',
-                                        value: '#${value}'
-                                    }
-                                },
-                                headingId: {
-                                    default: '',
-                                    parser: {
-                                        selector: '@data-heading-id'
-                                    },
-                                    serializer: {
-                                        attr: 'data-heading-id'
-                                    }
-                                }
-                            }
-                        },
-                        annotation: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:ref',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:ref'
-                            },
-                            attrs: {
-                                target: {
-                                    default: 'unknown',
-                                    parser: {
-                                        selector: 'substring(@target, 2)'
-                                    },
-                                    serializer: {
-                                        attr: 'target',
-                                        value: '#${value}'
-                                    }
-                                }
-                            }
-                        },
-                        foreignLanguage: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:foreign',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:foreign'
-                            }
-                        },
-                        quotation: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:q',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:q'
-                            }
-                        },
-                        lemma: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:lem',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:lem',
-                            }
-                        },
-                        sic: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:sic',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:sic',
-                            }
-                        },
-                        reading: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:rdg',
-                                text: 'text()',
-                            },
-                            serializer: {
-                                tag: 'tei:rdg',
-                            },
-                            attrs: {
-                                wit: {
-                                    default: '',
-                                    parser: {
-                                        selector: 'substring(@wit, 2)',
-                                    },
-                                    serializer: {
-                                        attr: 'wit',
-                                        value: '#${value}',
-                                    }
-                                }
-                            }
-                        },
-                        missing: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:metamark[@function="missing"]',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:metamark'
-                            },
-                            attrs: {
-                                function: {
-                                    default: 'missing',
-                                    parser: {
-                                        selector: '@function',
-                                    },
-                                    serializer: {
-                                        attr: 'function',
-                                        value: 'missing'
-                                    }
-                                },
-                            },
-                        },
-                    },
-                    marks: {
-                        letterSparse: {
-                            parser: {
-                                selector: 'contains(@style, "letter-sparse")'
-                            },
-                            serializer: {
-                                tag: 'tei:hi',
-                                attrs: {
-                                    style: {
-                                        value: 'letter-sparse'
-                                    }
-                                }
-                            }
-                        },
-                        sup: {
-                            parser: {
-                                selector: 'contains(@style, "sup")'
-                            },
-                            serializer: {
-                                tag: 'tei:hi',
-                                attrs: {
-                                    style: {
-                                        value: 'sup'
-                                    }
-                                }
-                            }
-                        },
-                        fontSize: {
-                            parsers: [
-                                {
-                                    selector: "contains(@style, 'font-size-small')"
-                                },
-                                {
-                                    selector: "contains(@style, 'font-size-medium')"
-                                },
-                                {
-                                    selector: "contains(@style, 'font-size-large')"
-                                }
-                            ],
-                            serializer: {
-                                tag: 'tei:hi'
-                            },
-                            attrs: {
-                                size: {
-                                    default: '',
-                                    parsers: [
-                                        {
-                                            selector: "contains(@style, 'font-size-small')",
-                                            type: 'static',
-                                            value: 'small'
-                                        },
-                                        {
-                                            selector: "contains(@style, 'font-size-medium')",
-                                            type: 'static',
-                                            value: 'medium'
-                                        },
-                                        {
-                                            selector: "contains(@style, 'font-size-large')",
-                                            type: 'static',
-                                            value: 'large'
-                                        }
-                                    ],
-                                    serializer: {
-                                        attr: 'style',
-                                        values: {
-                                            small: 'font-size-small',
-                                            medium: 'font-size-medium',
-                                            large: 'font-size-large'
-                                        }
-                                    }
-                                }
-                            }
-                        },
-                        fontWeightBold: {
-                            parser: {
-                                selector: 'contains(@style, "font-weight-bold")'
-                            },
-                            serializer: {
-                                tag: 'tei:hi',
-                                attrs: {
-                                    style: {
-                                        value: 'font-weight-bold'
-                                    }
-                                }
-                            }
-                        },
-                    }
-                },
-                ui: [
-                    {
-                        title: 'Blocktypen',
-                        type: 'block-type',
-                        blocks: [
-                            {
-                                type: 'heading',
-                                label: 'Überschrift'
-                            },
-                            {
-                                type: 'paragraph',
-                                label: 'Absatz'
-                            },
-                            {
-                                type: 'sourceList',
-                                label: 'Quellenliste',
-                                wrapping: true
-                            },
-                            {
-                                type: 'source',
-                                label: 'Quelle'
-                            },
-                        ]
-                    },
-                    {
-                        title: 'Auszeichnungen',
-                        type: 'block-type',
-                        blocks: [
-                            {
-                                type: 'pageLineRef',
-                                label: 'Seite & Zeile'
-                            },
-                            {
-                                type: 'wordRange',
-                                label: 'Wortspanne'
-                            },
-                            {
-                                type: 'annotation',
-                                label: 'Einzelstellenverweis'
-                            },
-                            {
-                                type: 'annotationGlobal',
-                                label: 'Globalkommentarverweis'
-                            },
-                            {
-                                type: 'foreignLanguage',
-                                label: 'Fremdsprachiger Text'
-                            },
-                            {
-                                type: 'quotation',
-                                label: 'Zitat'
-                            },
-                            {
-                                type: 'lemma',
-                                label: 'Lemma'
-                            },
-                            {
-                                type: 'sic',
-                                label: 'Textvorlage'
-                            },
-                            {
-                                type: 'reading',
-                                label: 'Variante'
-                            },
-                            {
-                                type: 'missing',
-                                label: 'Nicht ermittelt'
-                            },
-                        ]
-                    },
-                    {
-                        title: 'Überschrift',
-                        type: 'toolbar',
-                        context: 'blocks.heading',
-                        entries: [
-                            {
-                                type: 'select-attr',
-                                attr: 'level',
-                                values: [
-                                    {
-                                        key: '1',
-                                        value: 'Ebene 1'
-                                    },
-                                    {
-                                        key: '2',
-                                        value: 'Ebene 2'
-                                    },
-                                    {
-                                        key: '3',
-                                        value: 'Ebene 3'
-                                    },
-                                    {
-                                        key: '4',
-                                        value: 'Ebene 4'
-                                    }
-                                ]
-                            },
-                            {
-                                type: 'text-attr',
-                                attr: 'headingId',
-                                dataType: 'text'
-                            }
-                        ]
-                    },
-                    {
-                        title: 'Absatz',
-                        type: 'toolbar',
-                        context: 'blocks.paragraph',
-                        entries: [
-                            {
-                                type: 'toggle-attr',
-                                attr: 'noIndent',
-                                label: "Nicht einrücken",
-                                icon: {
-                                    on: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M11,17H21V15H11M3,8V16L7,12M3,21H21V19H3V21Z" /></svg>',
-                                    off: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M11,13H21V11H11M11,9H21V7H11M3,3V5H21V3M3,21H21V19H3M3,12L7,16V8M11,17H21V15H11V17Z" /></svg>'
-                                }
-                            },
-                            {
-                                type: 'separator'
-                            },
-                            {
-                                type: 'set-attr',
-                                attr: 'textAlign',
-                                value: 'left',
-                                label: 'Linksbündig',
-                                icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z" /></svg>'
-                            },
-                            {
-                                type: 'set-attr',
-                                attr: 'textAlign',
-                                value: 'center',
-                                label: 'Zentriert',
-                                icon: '<svg style="viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M7,7H17V9H7V7M3,11H21V13H3V11M7,15H17V17H7V15M3,19H21V21H3V19Z" /></svg>'
-                            },
-                            {
-                                type: 'set-attr',
-                                attr: 'textAlign',
-                                value: 'right',
-                                label: 'Rechtsbündig',
-                                icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M9,7H21V9H9V7M3,11H21V13H3V11M9,15H21V17H9V15M3,19H21V21H3V19Z" /></svg>'
-                            },
-                            {
-                                type: 'set-attr',
-                                attr: 'textAlign',
-                                value: 'justify',
-                                label: 'Block',
-                                icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M3,7H21V9H3V7M3,11H21V13H3V11M3,15H21V17H3V15M3,19H21V21H3V19Z" /></svg>'
-                            }
-                        ]
-                    },
-                    {
-                        title: 'Quelle',
-                        type: 'toolbar',
-                        context: 'blocks.source',
-                        entries: [
-                            {
-                                type: 'text-attr',
-                                attr: 'sourceId',
-                                dataType: 'text'
-                            }
-                        ]
-                    },
-                    {
-                        title: 'Darstellung',
-                        type: 'toolbar',
-                        context: 'marks',
-                        entries: [
-                            {
-                                type: 'select-mark-attr',
-                                mark: 'fontSize',
-                                attr: 'size',
-                                values: [
-                                    {
-                                        key: '',
-                                        label: 'Normal'
-                                    },
-                                    {
-                                        key: 'small',
-                                        label: 'Klein',
-                                    },
-                                    {
-                                        key: 'medium',
-                                        label: 'Mittel',
-                                    },
-                                    {
-                                        key: 'large',
-                                        label: 'Groß'
-                                    }
-                                ]
-                            },
-                            {
-                                type: 'toggle-mark',
-                                mark: 'fontWeightBold',
-                                label: 'Fettdruck',
-                                icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z" /></svg>'
-                            },
-                            {
-                                type: 'toggle-mark',
-                                mark: 'letterSparse',
-                                label: 'Sperrung',
-                                icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z" /></svg>'
-                            },
-                            {
-                                type: 'toggle-mark',
-                                mark: 'sup',
-                                label: 'Hochgestellt',
-                                icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z" /></svg>'
-                            }
-                        ]
-                    },
-                    {
-                        title: 'Einzelstellenverweis',
-                        type: 'toolbar',
-                        context: 'blocks.annotation',
-                        entries: [
-                            {
-                                type: 'select-attr',
-                                attr: 'target',
-                                valueSource: 'annotations'
-                            }
-                        ]
-                    },
-                    {
-                        title: 'Globalkommentarverweis Abschnitt (optional)',
-                        type: 'toolbar',
-                        context: 'blocks.annotationGlobal',
-                        entries: [
-                            {
-                                type: 'text-attr',
-                                attr: 'headingId',
-                                dataType: 'text'
-                            }
-                        ]
-                    },
-                    {
-                        title: 'Variante',
-                        type: 'toolbar',
-                        context: 'blocks.reading',
-                        entries: [
-                            {
-                                type: 'text-attr',
-                                attr: 'wit',
-                                dataType: 'text',
-                            }
-                        ]
-                    },
-                ]
-            },
-
-            // ========================
-            // Einstelstellenkommentare
-            // ========================
-            annotations: {
-                title: 'Einzelstellenerläuterungen',
-                type: 'multi-text',
-                parser: {
-                    selector: 'tei:text/tei:interpGrp[@type="individual"]',
-                },
-                serializer: {
-                    tag: 'tei:text'
-                },
-                parts: {
-                    parser: {
-                        selector: 'tei:interp'
-                    },
-                    serializer: {
-                        tag: 'tei:interpGrp',
-                        attrs: {
-                            type: 'individual'
-                        }
-                    }
-                },
-                schema: {
-                    nodes: {
-                        doc: {
-                            content: 'block+',
-                            parser: {
-                                selector: 'tei:interp'
-                            },
-                            serializer: {
-                                tag: 'tei:interp'
-                            },
-                            attrs: {
-                                id: {
-                                    default: 'unknown',
-                                    parser: {
-                                        selector: '@xml:id'
-                                    },
-                                    serializer: {
-                                        attr: 'xml:id',
-                                        value: '${value}'
-                                    }
-                                }
-                            }
-                        },
-                        paragraph: {
-                            group: 'block',
-                            content: 'inline*',
-                            parser: {
-                                selector: 'tei:p'
-                            },
-                            serializer: {
-                                tag: 'tei:p'
-                            },
-                            attrs: {
-                                textAlign: {
-                                    default: 'left',
-                                    parsers: [
-                                        {
-                                            selector: "contains(@style, 'text-left')",
-                                            type: 'static',
-                                            value: 'left'
-                                        },
-                                        {
-                                            selector: "contains(@style, 'text-center')",
-                                            type: 'static',
-                                            value: 'center'
-                                        },
-                                        {
-                                            selector: "contains(@style, 'text-right')",
-                                            type: 'static',
-                                            value: 'right'
-                                        },
-                                        {
-                                            selector: "contains(@style, 'text-justify')",
-                                            type: 'static',
-                                            value: 'justify'
-                                        }
-                                    ],
-                                    serializer: {
-                                        attr: 'style',
-                                        values: {
-                                            center: 'text-center',
-                                            right: 'text-right',
-                                            justify: 'text-justify'
-                                        }
-                                    }
-                                }
-                            },
-                        },
-                        text: {
-                            group: 'inline',
-                            inline: true,
-                            parsers: [
-                                {
-                                    selector: 'tei:seg',
-                                    text: 'text()'
-                                },
-                                {
-                                    selector: 'tei:hi',
-                                    text: 'text()'
-                                },
-                                {
-                                    selector: 'tei:foreign',
-                                    text: 'text()'
-                                },
-                                {
-                                    selector: 'tei:q',
-                                    text: 'text()'
-                                }
-                            ],
-                            serializer: {
-                                tag: 'tei:seg'
-                            }
-                        },
-                        pageLineRef: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:citedRange[@type="page-line-ref"]',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:citedRange',
-                                attrs: {
-                                    type: 'page-line-ref'
-                                }
-                            }
-                        },
-                        wordRange: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:citedRange[@type="word-range"]',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:citedRange',
-                                attrs: {
-                                    type: 'word-range'
-                                }
-                            }
-                        },
-                        annotationGlobal: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:ref[@target="#global"]',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:ref'
-                            },
-                            attrs: {
-                                target: {
-                                    default: 'global',
-                                    parser: {
-                                        selector: 'substring(@target, 2)'
-                                    },
-                                    serializer: {
-                                        attr: 'target',
-                                        value: '#${value}'
-                                    }
-                                },
-                                headingId: {
-                                    default: '',
-                                    parser: {
-                                        selector: '@data-heading-id'
-                                    },
-                                    serializer: {
-                                        attr: 'data-heading-id'
-                                    }
-                                }
-                            }
-                        },
-                        annotation: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:ref',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:ref'
-                            },
-                            attrs: {
-                                target: {
-                                    default: 'unknown',
-                                    parser: {
-                                        selector: 'substring(@target, 2)'
-                                    },
-                                    serializer: {
-                                        attr: 'target',
-                                        value: '#${value}'
-                                    }
-                                }
-                            }
-                        },
-                        foreignLanguage: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:foreign',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:foreign'
-                            }
-                        },
-                        quotation: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:q',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:q'
-                            }
-                        },
-                        missing: {
-                            group: 'inline',
-                            inline: true,
-                            content: 'text*',
-                            parser: {
-                                selector: 'tei:metamark[@function="missing"]',
-                                text: 'text()'
-                            },
-                            serializer: {
-                                tag: 'tei:metamark'
-                            },
-                            attrs: {
-                                function: {
-                                    default: 'missing',
-                                    serializer: {
-                                        attr: 'function',
-                                        value: 'missing'
-                                    }
-                                },
-                            },
-                        },
-                    },
-                    marks: {
-                        letterSparse: {
-                            parser: {
-                                selector: 'contains(@style, "letter-sparse")'
-                            },
-                            serializer: {
-                                tag: 'tei:hi',
-                                attrs: {
-                                    style: {
-                                        value: 'letter-sparse'
-                                    }
-                                }
-                            }
-                        },
-                        sup: {
-                            parser: {
-                                selector: 'contains(@style, "sup")'
-                            },
-                            serializer: {
-                                tag: 'tei:hi',
-                                attrs: {
-                                    style: {
-                                        value: 'sup'
-                                    }
-                                }
-                            }
-                        },
-                        fontSize: {
-                            parsers: [
-                                {
-                                    selector: "contains(@style, 'font-size-small')"
-                                },
-                                {
-                                    selector: "contains(@style, 'font-size-medium')"
-                                },
-                                {
-                                    selector: "contains(@style, 'font-size-large')"
-                                }
-                            ],
-                            serializer: {
-                                tag: 'tei:hi'
-                            },
-                            attrs: {
-                                size: {
-                                    default: '',
-                                    parsers: [
-                                        {
-                                            selector: "contains(@style, 'font-size-small')",
-                                            type: 'static',
-                                            value: 'small'
-                                        },
-                                        {
-                                            selector: "contains(@style, 'font-size-medium')",
-                                            type: 'static',
-                                            value: 'medium'
-                                        },
-                                        {
-                                            selector: "contains(@style, 'font-size-large')",
-                                            type: 'static',
-                                            value: 'large'
-                                        }
-                                    ],
-                                    serializer: {
-                                        attr: 'style',
-                                        values: {
-                                            small: 'font-size-small',
-                                            medium: 'font-size-medium',
-                                            large: 'font-size-large'
-                                        }
-                                    }
-                                }
-                            }
-                        },
-                    }
-                },
-                ui: [
-                    {
-                        title: 'Schlüssel',
-                        type: 'toolbar',
-                        context: 'blocks.doc',
-                        entries: [
-                            {
-                                type: 'doc-text-attr',
-                                attr: 'id'
-                            }
-                        ]
-                    },
-                    {
-                        title: 'Auszeichnungen',
-                        type: 'block-type',
-                        blocks: [
-                            {
-                                type: 'pageLineRef',
-                                label: 'Seite & Zeile'
-                            },
-                            {
-                                type: 'wordRange',
-                                label: 'Wortspanne'
-                            },
-                            {
-                                type: 'annotation',
-                                label: 'Einzelstellenverweis'
-                            },
-                            {
-                                type: 'annotationGlobal',
-                                label: 'Globalkommentarverweis'
-                            },
-                            {
-                                type: 'foreignLanguage',
-                                label: 'Fremdsprachiger Text'
-                            },
-                            {
-                                type: 'quotation',
-                                label: 'Zitat'
-                            },
-                            {
-                                type: 'missing',
-                                label: 'Nicht ermittelt'
-                            },
-                        ]
-                    },
-                    {
-                        title: 'Absatz',
-                        type: 'toolbar',
-                        context: 'blocks.paragraph',
-                        entries: [
-                            {
-                                type: 'set-attr',
-                                attr: 'textAlign',
-                                value: 'left',
-                                label: 'Linksbündig',
-                                icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M3,7H15V9H3V7M3,11H21V13H3V11M3,15H15V17H3V15M3,19H21V21H3V19Z" /></svg>'
-                            },
-                            {
-                                type: 'set-attr',
-                                attr: 'textAlign',
-                                value: 'center',
-                                label: 'Zentriert',
-                                icon: '<svg style="viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M7,7H17V9H7V7M3,11H21V13H3V11M7,15H17V17H7V15M3,19H21V21H3V19Z" /></svg>'
-                            },
-                            {
-                                type: 'set-attr',
-                                attr: 'textAlign',
-                                value: 'right',
-                                label: 'Rechtsbündig',
-                                icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M9,7H21V9H9V7M3,11H21V13H3V11M9,15H21V17H9V15M3,19H21V21H3V19Z" /></svg>'
-                            },
-                            {
-                                type: 'set-attr',
-                                attr: 'textAlign',
-                                value: 'justify',
-                                label: 'Block',
-                                icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M3,3H21V5H3V3M3,7H21V9H3V7M3,11H21V13H3V11M3,15H21V17H3V15M3,19H21V21H3V19Z" /></svg>'
-                            }
-                        ]
-                    },
-                    {
-                        title: 'Styling',
-                        type: 'toolbar',
-                        context: 'marks',
-                        entries: [
-                            {
-                                type: 'select-mark-attr',
-                                mark: 'fontSize',
-                                attr: 'size',
-                                values: [
-                                    {
-                                        key: '',
-                                        label: 'Normal'
-                                    },
-                                    {
-                                        key: 'small',
-                                        label: 'Klein',
-                                    },
-                                    {
-                                        key: 'medium',
-                                        label: 'Mittel',
-                                    },
-                                    {
-                                        key: 'large',
-                                        label: 'Groß'
-                                    }
-                                ]
-                            },
-                            {
-                                type: 'toggle-mark',
-                                mark: 'fontWeightBold',
-                                label: 'Fettdruck',
-                                icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M13.5,15.5H10V12.5H13.5A1.5,1.5 0 0,1 15,14A1.5,1.5 0 0,1 13.5,15.5M10,6.5H13A1.5,1.5 0 0,1 14.5,8A1.5,1.5 0 0,1 13,9.5H10M15.6,10.79C16.57,10.11 17.25,9 17.25,8C17.25,5.74 15.5,4 13.25,4H7V18H14.04C16.14,18 17.75,16.3 17.75,14.21C17.75,12.69 16.89,11.39 15.6,10.79Z" /></svg>'
-                            },
-                            {
-                                type: 'toggle-mark',
-                                mark: 'letterSparse',
-                                label: 'Sperrung',
-                                icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M7,8L2.5,12L7,16V8M17,8V16L21.5,12L17,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10Z" /></svg>'
-                            },
-                            {
-                                type: 'toggle-mark',
-                                mark: 'sup',
-                                label: 'Hochgestellt',
-                                icon: '<svg viewBox="0 0 24 24" class="mdi-icon"><path d="M16,7.41L11.41,12L16,16.59L14.59,18L10,13.41L5.41,18L4,16.59L8.59,12L4,7.41L5.41,6L10,10.59L14.59,6L16,7.41M21.85,9H16.97V8L17.86,7.18C18.62,6.54 19.18,6 19.56,5.55C19.93,5.11 20.12,4.7 20.13,4.32C20.14,4.04 20.05,3.8 19.86,3.62C19.68,3.43 19.39,3.34 19,3.33C18.69,3.34 18.42,3.4 18.16,3.5L17.5,3.89L17.05,2.72C17.32,2.5 17.64,2.33 18.03,2.19C18.42,2.05 18.85,2 19.32,2C20.1,2 20.7,2.2 21.1,2.61C21.5,3 21.72,3.54 21.72,4.18C21.71,4.74 21.53,5.26 21.18,5.73C20.84,6.21 20.42,6.66 19.91,7.09L19.27,7.61V7.63H21.85V9Z" /></svg>'
-                            }
-                        ]
-                    },
-                    {
-                        title: 'Einzelstellenverweis',
-                        type: 'toolbar',
-                        context: 'blocks.annotation',
-                        entries: [
-                            {
-                                type: 'select-attr',
-                                attr: 'target',
-                                valueSource: 'annotations'
-                            }
-                        ]
-                    },
-                    {
-                        title: 'Globalkommentarverweis Abschnitt (optional)',
-                        type: 'toolbar',
-                        context: 'blocks.annotationGlobal',
-                        entries: [
-                            {
-                                type: 'text-attr',
-                                attr: 'headingId',
-                                dataType: 'text'
-                            }
-                        ]
-                    },
-                ],
-                default: {
-                    type: 'doc',
-                    content: [
-                        {
-                            type: 'paragraph',
-                            content: [
-                                {
-                                    type: 'pageLineRef',
-                                    content: [
-                                        {
-                                            type: 'text',
-                                            text: 'Seite & Zeile'
-                                        }
-                                    ],
-                                },
-                                {
-                                    type: 'text',
-                                    text: ' '
-                                },
-                                {
-                                    type: 'wordRange',
-                                    content: [
-                                        {
-                                            type: 'text',
-                                            text: 'Textspanne'
-                                        }
-                                    ],
-                                }
-                            ]
-                        },
-                        {
-                            type: 'paragraph',
-                            content: [
-                                {
-                                    type: 'text',
-                                    text: 'Neuer Einzelstellenkommentar'
-                                }
-                            ]
-                        }
-                    ]
-                }
-            }
-        }
-    });
-})();
diff --git a/theme/_icons.scss b/theme/_icons.scss
index 7622614e4c1243001430df9cf1fa04dc1803fb91..ced63d930ab48e2e09488cab9474b473acac5b60 100644
--- a/theme/_icons.scss
+++ b/theme/_icons.scss
@@ -1,6 +1,6 @@
 [role="menuitem"] svg, [role="menuitem"] svg.mdi-icon {
-    width: 18px;
-    height: 18px;
+    width: 18px !important;
+    height: 18px !important;
 }
 
 svg.mdi-icon {
diff --git a/yarn.lock b/yarn.lock
index ed86417b31a183b55272d16877da42d136c739c7..141ffe90ffce6cc88f10e6bdc788dab63677fdb0 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2348,9 +2348,9 @@ prosemirror-view@1.13.4:
     prosemirror-transform "^1.1.0"
 
 prosemirror-view@^1.0.0, prosemirror-view@^1.1.0, prosemirror-view@^1.13.3:
-  version "1.13.8"
-  resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.13.8.tgz#ee0998f67edb95d8558e76fb289641deacf68b4f"
-  integrity sha512-gz3msc9ocWo0m7PxCeNTLxaBZ8VSD9J+A/x16GwXnROAtyKalEMvZInwk+lH2kIEIM3tC/m90xe5U/vf+vM9IA==
+  version "1.13.10"
+  resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.13.10.tgz#df441c2bb48fe71fab407d9ea26ad0731428852a"
+  integrity sha512-v5hEq2w3HFqWXMv/f2DEpwD4ijWDnIO6t3VQp8zQdOOEjx7+D8+2ep5/Y5o2Zb8ljSX+dkZWfnG96VWekpxWHg==
   dependencies:
     prosemirror-model "^1.1.0"
     prosemirror-state "^1.0.0"
@@ -2929,9 +2929,9 @@ tar@^2.0.0:
     inherits "2"
 
 tei-editor@^0.5.0:
-  version "0.5.3"
-  resolved "https://registry.yarnpkg.com/tei-editor/-/tei-editor-0.5.3.tgz#2d0a49838d6204b2fe3437e9a699ec0fd1062fb9"
-  integrity sha512-QmHhmCNH7BFVjd54xLKcZqjqJBj9753OMDVXbIRXdUpOXiWIenPd3Pd8sBia8iwPdvpmEMYfdHsuRGDqppOoCQ==
+  version "0.5.4"
+  resolved "https://registry.yarnpkg.com/tei-editor/-/tei-editor-0.5.4.tgz#ce2624cf5cded2b8c65f4aaf9ae95ac15c10c94b"
+  integrity sha512-Lybx8A9FlOApgAjbArsKRdM2pcUESIt/Z8CmGflszkwtFIwH1Sb9FrUz+scV+KAl4Thgf10ro8CPSi9dOleLOQ==
   dependencies:
     "@types/prosemirror-model" "^1.7.2"
     "@types/prosemirror-state" "^1.2.3"