@editora/core 1.0.30 → 1.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./index-Z9P9O-ty.js");class w{constructor(e){if(this.listeners=[],e instanceof l.PluginManager)this.pluginManager=e;else{const i=e;this.pluginManager=new l.PluginManager,i.plugins&&Array.isArray(i.plugins)&&i.plugins.forEach(n=>{this.pluginManager.register(n)}),i.element&&(this.domElement=i.element,this.setupDOMElement(i))}const t=this.pluginManager.buildSchema();this.state=l.EditorState.create(t),this.commands=this.pluginManager.getCommands()}setupDOMElement(e){this.domElement&&(e.enableToolbar!==!1&&e.toolbarElement?this.toolbarElement=e.toolbarElement:e.enableToolbar!==!1&&(this.toolbarElement=document.createElement("div"),this.toolbarElement.className="editora-toolbar-container",this.domElement.appendChild(this.toolbarElement)),this.contentElement=document.createElement("div"),this.contentElement.contentEditable="true",this.contentElement.className="editora-content",this.contentElement.style.minHeight="200px",this.contentElement.style.outline="none",this.contentElement.style.padding="12px",e.content&&(this.contentElement.innerHTML=e.content),this.domElement.appendChild(this.contentElement),this.contentElement.addEventListener("input",()=>{this.listeners.forEach(t=>t(this.state))}))}setupKeyboardShortcuts(e){const t={};e.forEach(i=>{i.shortcut&&(t[i.shortcut.toLowerCase()]=i.command)}),document.addEventListener("keydown",i=>{if(this.contentElement!==document.activeElement&&!(document.activeElement instanceof HTMLElement&&document.activeElement.contentEditable==="true"))return;const n=[];(i.ctrlKey||i.metaKey)&&n.push("ctrl"),i.shiftKey&&n.push("shift"),i.altKey&&n.push("alt");const o=i.key.toLowerCase(),s=n.length>0?`${n.join("+")}+${o}`:o,a=t[s];a&&(i.preventDefault(),this.execCommand(a))})}handleToolbarCommand(e,t){const n=this.pluginManager.getToolbarItems().find(o=>o.id&&o.id===e||o.command===e);n!=null&&n.command&&(t!==void 0?this.execCommand(n.command,t):this.execCommand(n.command))}setState(e){this.state=e,this.listeners.forEach(t=>t(e))}onChange(e){return this.listeners.push(e),()=>{this.listeners=this.listeners.filter(t=>t!==e)}}on(e,t){return e==="change"||e==="input"?this.onChange(t):()=>{}}getElement(){return this.contentElement||this.domElement||null}execCommand(e,t){const i=this.commands[e];if(!i)return console.warn(`Command not found: ${e}`),!1;let n;return t!==void 0?n=i(this.state,t):n=i(this.state),n instanceof Promise?(n.then(o=>{o&&typeof o=="object"&&"doc"in o&&"selection"in o&&this.setState(o)}).catch(o=>{console.error(`Async command failed: ${e}`,o)}),!0):n&&typeof n=="object"&&"doc"in n&&"selection"in n?(this.setState(n),!0):n!==!1&&n!=null}setContent(e){typeof e=="string"?this.contentElement&&(this.contentElement.innerHTML=e):this.setState(this.state.apply(e))}getContent(){return this.contentElement?this.contentElement.innerHTML:this.state.doc}destroy(){this.listeners=[],this.contentElement&&this.contentElement.removeEventListener("input",()=>{})}}class f{constructor(e){this.initialized=!1,this.plugin=e}initialize(e){var t,i;if(this.initialized)return console.warn(`Plugin "${this.plugin.name}" already initialized`),!1;try{return this.context=e,(t=this.plugin.context)!=null&&t.initialize&&this.plugin.context.initialize(),(i=this.plugin.context)!=null&&i.onEditorReady&&e.provider&&this.plugin.context.onEditorReady(e),this.initialized=!0,!0}catch(n){return console.error(`Failed to initialize plugin "${this.plugin.name}":`,n),!1}}destroy(){var e;if(!this.initialized)return!1;try{return(e=this.plugin.context)!=null&&e.destroy&&this.plugin.context.destroy(),this.initialized=!1,this.context=void 0,!0}catch(t){return console.error(`Failed to destroy plugin "${this.plugin.name}":`,t),!1}}executeCommand(e,...t){var i;if(!this.initialized)return console.warn(`Plugin "${this.plugin.name}" not initialized, cannot execute command "${e}"`),null;try{const n=(i=this.plugin.commands)==null?void 0:i[e];return n?n(...t):(console.warn(`Command "${e}" not found in plugin "${this.plugin.name}"`),null)}catch(n){return console.error(`Error executing command "${e}" in plugin "${this.plugin.name}":`,n),null}}getName(){return this.plugin.name}isInitialized(){return this.initialized}getPlugin(){return this.plugin}getContext(){return this.context}}function x(r){return new f(r)}const b=new Set;function y(r,e){b.has(r)||(b.add(r),console.warn(`[Editora] ${r} from @editora/core is a deprecated, non-functional scaffold: its commands and toolbar buttons do nothing. It will be removed in a future major release - use ${e} instead.`))}function S(r={}){y("SpellcheckPlugin","`SpellCheckPlugin` from @editora/spell-check");const{enabled:e=!1,provider:t="browser",apiUrl:i="",apiHeaders:n={},language:o="en",customDictionary:s=[],ignoreAllCaps:a=!0,ignoreNumbers:c=!0}=r;return{name:"spellcheck",context:{initialize:()=>{if(e)switch(console.log("[Spellcheck Plugin] Initialized",{provider:t,language:o}),t){case"browser":console.log("[Spellcheck] Using browser spellcheck");break;case"local":console.log("[Spellcheck] Using local dictionary (not implemented)");break;case"api":i?console.log("[Spellcheck] Using API:",i):console.warn("[Spellcheck] API provider selected but no apiUrl provided");break}},destroy:()=>{console.log("[Spellcheck Plugin] Destroyed")},onEditorReady:h=>{console.log("[Spellcheck Plugin] Editor ready")}},commands:{toggleSpellcheck:()=>(console.log("[Spellcheck] Toggle command (not implemented)"),null),addToDictionary:h=>(console.log("[Spellcheck] Add to dictionary:",h),null),checkSpelling:async()=>(console.log("[Spellcheck] Check spelling (not implemented)"),null)},toolbar:e?[{label:"Spellcheck",command:"toggleSpellcheck",icon:"Aa",type:"button"}]:[]}}function C(r={}){y("MediaPlugin","`MediaManagerPlugin` from @editora/media-manager");const{uploadUrl:e="",libraryUrl:t="",maxFileSize:i=10*1024*1024,allowedTypes:n=["image/jpeg","image/png","image/gif","image/webp"],headers:o={},withCredentials:s=!1,chunkSize:a=1024*1024,enableChunking:c=!0,onProgress:h,onError:u,onSuccess:D}=r;return{name:"media",context:{initialize:()=>{console.log("[Media Plugin] Initialized",{uploadUrl:e,libraryUrl:t,maxFileSize:i,allowedTypes:n}),e||console.warn("[Media] No uploadUrl provided - upload will not work")},destroy:()=>{console.log("[Media Plugin] Destroyed")},onEditorReady:d=>{console.log("[Media Plugin] Editor ready")}},commands:{insertImage:async d=>{if(console.log("[Media] Insert image command (not implemented)",d),!d)return console.log("[Media] No file provided - should open picker"),null;if(!n.includes(d.type)){const g=new Error(`File type ${d.type} not allowed`);return u==null||u(g),null}if(d.size>i){const g=new Error(`File size ${d.size} exceeds max ${i}`);return u==null||u(g),null}return null},openMediaLibrary:()=>(console.log("[Media] Open media library (not implemented)"),t||console.warn("[Media] No libraryUrl provided"),null),uploadMedia:async d=>(console.log("[Media] Upload media (not implemented)",{name:d.name,size:d.size,type:d.type}),null)},toolbar:[{label:"Image",command:"insertImage",icon:"🖼️",type:"button"},{label:"Media Library",command:"openMediaLibrary",icon:"📁",type:"button"}]}}class p{constructor(e,t={anchor:0,head:0}){this.doc=e,this.selection=t}getDocument(){return this.doc}setDocument(e){return new p(e,this.selection)}getSelection(){return{...this.selection}}setSelection(e){return new p(this.doc,e)}update(e,t){return new p(e||this.doc,t||this.selection)}getTextContent(){return""}isSelectionEmpty(){return this.selection.anchor===this.selection.head}}class m{constructor(e){this.config={closeOnEscape:!0,closeOnBackdrop:!0,...e},this.element=this.createElement(),this.attachEventListeners()}createElement(){const e=document.createElement("dialog");e.className="editora-dialog",this.config.width&&(e.style.width=this.config.width),this.config.height&&(e.style.height=this.config.height);const t=this.config.buttons&&this.config.buttons.length>0?this.config.buttons.map((i,n)=>`<button type="button" class="editora-btn ${i.type==="danger"?"editora-btn-danger":i.type==="primary"||i.primary?"editora-btn-primary":"editora-btn-cancel"}" data-dialog-button="${n}">${i.label}</button>`).join(""):`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./index-DMk3V5_f.js");class w{constructor(e){if(this.listeners=[],e instanceof l.PluginManager)this.pluginManager=e;else{const i=e;this.pluginManager=new l.PluginManager,i.plugins&&Array.isArray(i.plugins)&&i.plugins.forEach(n=>{this.pluginManager.register(n)}),i.element&&(this.domElement=i.element,this.setupDOMElement(i))}const t=this.pluginManager.buildSchema();this.state=l.EditorState.create(t),this.commands=this.pluginManager.getCommands()}setupDOMElement(e){this.domElement&&(e.enableToolbar!==!1&&e.toolbarElement?this.toolbarElement=e.toolbarElement:e.enableToolbar!==!1&&(this.toolbarElement=document.createElement("div"),this.toolbarElement.className="editora-toolbar-container",this.domElement.appendChild(this.toolbarElement)),this.contentElement=document.createElement("div"),this.contentElement.contentEditable="true",this.contentElement.className="editora-content",this.contentElement.style.minHeight="200px",this.contentElement.style.outline="none",this.contentElement.style.padding="12px",e.content&&(this.contentElement.innerHTML=e.content),this.domElement.appendChild(this.contentElement),this.contentElement.addEventListener("input",()=>{this.listeners.forEach(t=>t(this.state))}))}setupKeyboardShortcuts(e){const t={};e.forEach(i=>{i.shortcut&&(t[i.shortcut.toLowerCase()]=i.command)}),document.addEventListener("keydown",i=>{if(this.contentElement!==document.activeElement&&!(document.activeElement instanceof HTMLElement&&document.activeElement.contentEditable==="true"))return;const n=[];(i.ctrlKey||i.metaKey)&&n.push("ctrl"),i.shiftKey&&n.push("shift"),i.altKey&&n.push("alt");const o=i.key.toLowerCase(),s=n.length>0?`${n.join("+")}+${o}`:o,a=t[s];a&&(i.preventDefault(),this.execCommand(a))})}handleToolbarCommand(e,t){const n=this.pluginManager.getToolbarItems().find(o=>o.id&&o.id===e||o.command===e);n!=null&&n.command&&(t!==void 0?this.execCommand(n.command,t):this.execCommand(n.command))}setState(e){this.state=e,this.listeners.forEach(t=>t(e))}onChange(e){return this.listeners.push(e),()=>{this.listeners=this.listeners.filter(t=>t!==e)}}on(e,t){return e==="change"||e==="input"?this.onChange(t):()=>{}}getElement(){return this.contentElement||this.domElement||null}execCommand(e,t){const i=this.commands[e];if(!i)return console.warn(`Command not found: ${e}`),!1;let n;return t!==void 0?n=i(this.state,t):n=i(this.state),n instanceof Promise?(n.then(o=>{o&&typeof o=="object"&&"doc"in o&&"selection"in o&&this.setState(o)}).catch(o=>{console.error(`Async command failed: ${e}`,o)}),!0):n&&typeof n=="object"&&"doc"in n&&"selection"in n?(this.setState(n),!0):n!==!1&&n!=null}setContent(e){typeof e=="string"?this.contentElement&&(this.contentElement.innerHTML=e):this.setState(this.state.apply(e))}getContent(){return this.contentElement?this.contentElement.innerHTML:this.state.doc}destroy(){this.listeners=[],this.contentElement&&this.contentElement.removeEventListener("input",()=>{})}}class f{constructor(e){this.initialized=!1,this.plugin=e}initialize(e){var t,i;if(this.initialized)return console.warn(`Plugin "${this.plugin.name}" already initialized`),!1;try{return this.context=e,(t=this.plugin.context)!=null&&t.initialize&&this.plugin.context.initialize(),(i=this.plugin.context)!=null&&i.onEditorReady&&e.provider&&this.plugin.context.onEditorReady(e),this.initialized=!0,!0}catch(n){return console.error(`Failed to initialize plugin "${this.plugin.name}":`,n),!1}}destroy(){var e;if(!this.initialized)return!1;try{return(e=this.plugin.context)!=null&&e.destroy&&this.plugin.context.destroy(),this.initialized=!1,this.context=void 0,!0}catch(t){return console.error(`Failed to destroy plugin "${this.plugin.name}":`,t),!1}}executeCommand(e,...t){var i;if(!this.initialized)return console.warn(`Plugin "${this.plugin.name}" not initialized, cannot execute command "${e}"`),null;try{const n=(i=this.plugin.commands)==null?void 0:i[e];return n?n(...t):(console.warn(`Command "${e}" not found in plugin "${this.plugin.name}"`),null)}catch(n){return console.error(`Error executing command "${e}" in plugin "${this.plugin.name}":`,n),null}}getName(){return this.plugin.name}isInitialized(){return this.initialized}getPlugin(){return this.plugin}getContext(){return this.context}}function x(r){return new f(r)}const b=new Set;function y(r,e){b.has(r)||(b.add(r),console.warn(`[Editora] ${r} from @editora/core is a deprecated, non-functional scaffold: its commands and toolbar buttons do nothing. It will be removed in a future major release - use ${e} instead.`))}function S(r={}){y("SpellcheckPlugin","`SpellCheckPlugin` from @editora/spell-check");const{enabled:e=!1,provider:t="browser",apiUrl:i="",apiHeaders:n={},language:o="en",customDictionary:s=[],ignoreAllCaps:a=!0,ignoreNumbers:c=!0}=r;return{name:"spellcheck",context:{initialize:()=>{if(e)switch(console.log("[Spellcheck Plugin] Initialized",{provider:t,language:o}),t){case"browser":console.log("[Spellcheck] Using browser spellcheck");break;case"local":console.log("[Spellcheck] Using local dictionary (not implemented)");break;case"api":i?console.log("[Spellcheck] Using API:",i):console.warn("[Spellcheck] API provider selected but no apiUrl provided");break}},destroy:()=>{console.log("[Spellcheck Plugin] Destroyed")},onEditorReady:h=>{console.log("[Spellcheck Plugin] Editor ready")}},commands:{toggleSpellcheck:()=>(console.log("[Spellcheck] Toggle command (not implemented)"),null),addToDictionary:h=>(console.log("[Spellcheck] Add to dictionary:",h),null),checkSpelling:async()=>(console.log("[Spellcheck] Check spelling (not implemented)"),null)},toolbar:e?[{label:"Spellcheck",command:"toggleSpellcheck",icon:"Aa",type:"button"}]:[]}}function C(r={}){y("MediaPlugin","`MediaManagerPlugin` from @editora/media-manager");const{uploadUrl:e="",libraryUrl:t="",maxFileSize:i=10*1024*1024,allowedTypes:n=["image/jpeg","image/png","image/gif","image/webp"],headers:o={},withCredentials:s=!1,chunkSize:a=1024*1024,enableChunking:c=!0,onProgress:h,onError:u,onSuccess:D}=r;return{name:"media",context:{initialize:()=>{console.log("[Media Plugin] Initialized",{uploadUrl:e,libraryUrl:t,maxFileSize:i,allowedTypes:n}),e||console.warn("[Media] No uploadUrl provided - upload will not work")},destroy:()=>{console.log("[Media Plugin] Destroyed")},onEditorReady:d=>{console.log("[Media Plugin] Editor ready")}},commands:{insertImage:async d=>{if(console.log("[Media] Insert image command (not implemented)",d),!d)return console.log("[Media] No file provided - should open picker"),null;if(!n.includes(d.type)){const g=new Error(`File type ${d.type} not allowed`);return u==null||u(g),null}if(d.size>i){const g=new Error(`File size ${d.size} exceeds max ${i}`);return u==null||u(g),null}return null},openMediaLibrary:()=>(console.log("[Media] Open media library (not implemented)"),t||console.warn("[Media] No libraryUrl provided"),null),uploadMedia:async d=>(console.log("[Media] Upload media (not implemented)",{name:d.name,size:d.size,type:d.type}),null)},toolbar:[{label:"Image",command:"insertImage",icon:"🖼️",type:"button"},{label:"Media Library",command:"openMediaLibrary",icon:"📁",type:"button"}]}}class p{constructor(e,t={anchor:0,head:0}){this.doc=e,this.selection=t}getDocument(){return this.doc}setDocument(e){return new p(e,this.selection)}getSelection(){return{...this.selection}}setSelection(e){return new p(this.doc,e)}update(e,t){return new p(e||this.doc,t||this.selection)}getTextContent(){return""}isSelectionEmpty(){return this.selection.anchor===this.selection.head}}class m{constructor(e){this.config={closeOnEscape:!0,closeOnBackdrop:!0,...e},this.element=this.createElement(),this.attachEventListeners()}createElement(){const e=document.createElement("dialog");e.className="editora-dialog",this.config.width&&(e.style.width=this.config.width),this.config.height&&(e.style.height=this.config.height);const t=this.config.buttons&&this.config.buttons.length>0?this.config.buttons.map((i,n)=>`<button type="button" class="editora-btn ${i.type==="danger"?"editora-btn-danger":i.type==="primary"||i.primary?"editora-btn-primary":"editora-btn-cancel"}" data-dialog-button="${n}">${i.label}</button>`).join(""):`
2
2
  <button type="button" class="editora-btn editora-btn-cancel" data-dialog-default="cancel">Cancel</button>
3
3
  <button type="button" class="editora-btn editora-btn-primary" data-dialog-default="ok">OK</button>
4
4
  `;if(e.innerHTML=`
package/dist/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
- import { P as g, E, a as f, T as y, R as w } from "./index-BIsub9gV.mjs";
2
- import { C as V, b as K, F as B, K as W, c as X, S as _, d as Y, e as J, f as Q, g as Z, h as ee, i as te, j as ie, k as ne, s as oe, l as se, m as ae, n as le } from "./index-BIsub9gV.mjs";
1
+ import { P as g, E, a as f, T as y, R as w } from "./index-8WhEVFK8.mjs";
2
+ import { C as V, b as K, F as B, K as W, c as X, S as _, d as Y, e as J, f as Q, g as Z, h as ee, i as te, j as ie, k as ne, s as oe, l as se, m as ae, n as le } from "./index-8WhEVFK8.mjs";
3
3
  class T {
4
4
  constructor(e) {
5
5
  if (this.listeners = [], e instanceof g)
@@ -4,7 +4,7 @@ const r = {
4
4
  textAlignment: () => import("./TextAlignmentPlugin.native-sM_1s00t.mjs").then((n) => n.TextAlignmentPlugin()),
5
5
  indent: () => import("./IndentPlugin.native-BHixp8sP.mjs").then((n) => n.IndentPlugin()),
6
6
  direction: () => import("./DirectionPlugin.native-B-Zj-EAt.mjs").then((n) => n.DirectionPlugin()),
7
- textColor: () => import("./TextColorPlugin.native-C2IjioNM.mjs").then((n) => n.TextColorPlugin()),
7
+ textColor: () => import("./TextColorPlugin.native-30VvsUUv.mjs").then((n) => n.TextColorPlugin()),
8
8
  backgroundColor: () => import("./BackgroundColorPlugin.native-DCAd94kp.mjs").then((n) => n.BackgroundColorPlugin()),
9
9
  fontSize: () => import("./FontSizePlugin.native-DsLrH8eq.mjs").then((n) => n.FontSizePlugin()),
10
10
  fontFamily: () => import("./FontFamilyPlugin.native-DLq9x046.mjs").then((n) => n.FontFamilyPlugin()),
@@ -410,14 +410,14 @@ class pn {
410
410
  const p = [];
411
411
  c.split(/\s+/).filter(Boolean).forEach((g) => {
412
412
  if (g === "direction") {
413
- const E = r.get("setDirectionLTR"), k = r.get("setDirectionRTL");
414
- E && p.push({
413
+ const v = r.get("setDirectionLTR"), k = r.get("setDirectionRTL");
414
+ v && p.push({
415
415
  id: "directionLTR",
416
- label: E.label,
417
- command: E.command,
418
- icon: E.icon,
419
- type: E.type || "button",
420
- options: E.options
416
+ label: v.label,
417
+ command: v.command,
418
+ icon: v.icon,
419
+ type: v.type || "button",
420
+ options: v.options
421
421
  }), k && p.push({
422
422
  id: "directionRTL",
423
423
  label: k.label,
@@ -429,14 +429,14 @@ class pn {
429
429
  return;
430
430
  }
431
431
  if (g === "comments") {
432
- const E = r.get("addComment"), k = r.get("toggleComments");
433
- E && p.push({
432
+ const v = r.get("addComment"), k = r.get("toggleComments");
433
+ v && p.push({
434
434
  id: "addComment",
435
- label: E.label,
436
- command: E.command,
437
- icon: E.icon,
438
- type: E.type || "button",
439
- options: E.options
435
+ label: v.label,
436
+ command: v.command,
437
+ icon: v.icon,
438
+ type: v.type || "button",
439
+ options: v.options
440
440
  }), k && p.push({
441
441
  id: "toggleComments",
442
442
  label: k.label,
@@ -505,7 +505,7 @@ class pn {
505
505
  var D;
506
506
  H.parentElement === i && ((D = this.overflowUnitHomes.get(H)) == null || D.appendChild(H));
507
507
  });
508
- const p = t.clientWidth, m = 16, g = 40, w = 4, T = Math.max(0, p - m), E = Math.max(0, T - g - w), k = getComputedStyle(t).direction === "rtl", et = e.getBoundingClientRect(), $ = (H) => {
508
+ const p = t.clientWidth, m = 16, g = 40, w = 4, T = Math.max(0, p - m), v = Math.max(0, T - g - w), k = getComputedStyle(t).direction === "rtl", et = e.getBoundingClientRect(), $ = (H) => {
509
509
  const D = H.getBoundingClientRect();
510
510
  return k ? et.right - D.left : D.right - et.left;
511
511
  };
@@ -514,7 +514,7 @@ class pn {
514
514
  z = c.length;
515
515
  else
516
516
  for (const H of c)
517
- if ($(H) <= E) z++;
517
+ if ($(H) <= v) z++;
518
518
  else break;
519
519
  z = Math.max(1, Math.min(z, c.length));
520
520
  const st = z < c.length;
@@ -629,8 +629,8 @@ class pn {
629
629
  }), o.addEventListener("keydown", (m) => {
630
630
  const g = r();
631
631
  if (g.length === 0) return;
632
- const w = g.indexOf(document.activeElement), T = (E) => {
633
- m.preventDefault(), g[(E + g.length) % g.length].focus();
632
+ const w = g.indexOf(document.activeElement), T = (v) => {
633
+ m.preventDefault(), g[(v + g.length) % g.length].focus();
634
634
  };
635
635
  switch (m.key) {
636
636
  case "ArrowDown":
@@ -889,7 +889,7 @@ function yn(a) {
889
889
  const t = a.trim() ? a.trim().split(/\s+/).length : 0, e = a.length;
890
890
  return { words: t, chars: e };
891
891
  }
892
- function vn(a, t) {
892
+ function En(a, t) {
893
893
  const e = a.toString();
894
894
  return {
895
895
  startLine: t.line,
@@ -901,7 +901,7 @@ function vn(a, t) {
901
901
  selectedWords: e.trim().split(/\s+/).filter(Boolean).length
902
902
  };
903
903
  }
904
- class En {
904
+ class vn {
905
905
  constructor(t) {
906
906
  this.shortcuts = /* @__PURE__ */ new Map(), this.enabled = !0, this.isMac = typeof navigator != "undefined" && navigator.platform.toUpperCase().indexOf("MAC") >= 0, (t == null ? void 0 : t.enabled) === !1 && (this.enabled = !1), this.registerDefaultShortcuts(), t != null && t.shortcuts && t.shortcuts.forEach((e) => this.registerShortcut(e)), t != null && t.customShortcuts && Object.values(t.customShortcuts).forEach((e) => {
907
907
  this.registerShortcut(e);
@@ -1292,7 +1292,7 @@ ke || (ke = function(t) {
1292
1292
  for (var e = arguments.length, o = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++) o[i - 1] = arguments[i];
1293
1293
  return new t(...o);
1294
1294
  });
1295
- const at = L(Array.prototype.forEach), Ln = L(Array.prototype.lastIndexOf), so = L(Array.prototype.pop), At = L(Array.prototype.push), Mn = L(Array.prototype.splice), vt = Array.isArray, Mt = L(String.prototype.toLowerCase), he = L(String.prototype.toString), lo = L(String.prototype.match), Ct = L(String.prototype.replace), co = L(String.prototype.indexOf), In = L(String.prototype.trim), On = L(Number.prototype.toString), Dn = L(Boolean.prototype.toString), uo = typeof BigInt == "undefined" ? null : L(BigInt.prototype.toString), po = typeof Symbol == "undefined" ? null : L(Symbol.prototype.toString), P = L(Object.prototype.hasOwnProperty), St = L(Object.prototype.toString), O = L(RegExp.prototype.test), J = Rn(TypeError);
1295
+ const at = L(Array.prototype.forEach), Ln = L(Array.prototype.lastIndexOf), so = L(Array.prototype.pop), At = L(Array.prototype.push), Mn = L(Array.prototype.splice), Et = Array.isArray, Mt = L(String.prototype.toLowerCase), he = L(String.prototype.toString), lo = L(String.prototype.match), Ct = L(String.prototype.replace), co = L(String.prototype.indexOf), In = L(String.prototype.trim), On = L(Number.prototype.toString), Dn = L(Boolean.prototype.toString), uo = typeof BigInt == "undefined" ? null : L(BigInt.prototype.toString), po = typeof Symbol == "undefined" ? null : L(Symbol.prototype.toString), P = L(Object.prototype.hasOwnProperty), St = L(Object.prototype.toString), O = L(RegExp.prototype.test), J = Rn(TypeError);
1296
1296
  function L(a) {
1297
1297
  return function(t) {
1298
1298
  t instanceof RegExp && (t.lastIndex = 0);
@@ -1306,9 +1306,9 @@ function Rn(a) {
1306
1306
  return ke(a, e);
1307
1307
  };
1308
1308
  }
1309
- function v(a, t) {
1309
+ function E(a, t) {
1310
1310
  let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Mt;
1311
- if (ao && ao(a, null), !vt(t)) return a;
1311
+ if (ao && ao(a, null), !Et(t)) return a;
1312
1312
  let o = t.length;
1313
1313
  for (; o--; ) {
1314
1314
  let i = t[o];
@@ -1329,7 +1329,7 @@ function U(a) {
1329
1329
  for (const o of So(a)) {
1330
1330
  var e = xn(o, 2);
1331
1331
  const i = e[0], r = e[1];
1332
- P(a, i) && (vt(r) ? t[i] = Nn(r) : r && typeof r == "object" && r.constructor === Object ? t[i] = U(r) : t[i] = r);
1332
+ P(a, i) && (Et(r) ? t[i] = Nn(r) : r && typeof r == "object" && r.constructor === Object ? t[i] = U(r) : t[i] = r);
1333
1333
  }
1334
1334
  return t;
1335
1335
  }
@@ -2019,7 +2019,7 @@ const fo = M([
2019
2019
  "xlink:title",
2020
2020
  "xml:space",
2021
2021
  "xmlns:xlink"
2022
- ]), Fn = I(/{{[\w\W]*|^[\w\W]*}}/g), Un = I(/<%[\w\W]*|^[\w\W]*%>/g), jn = I(/\${[\w\W]*/g), Wn = I(/^data-[\-\w.\u00B7-\uFFFF]+$/), $n = I(/^aria-[\-\w]+$/), bo = I(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Gn = I(/^(?:\w+script|data):/i), Kn = I(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Yn = I(/^html$/i), qn = I(/^[a-z][.\w]*(-[.\w]+)+$/i), yo = I(/<[/\w!]/g), vo = I(/<[/\w]/g), Vn = I(/<\/no(script|embed|frames)/i), Xn = I(/\/>/i), F = {
2022
+ ]), Fn = I(/{{[\w\W]*|^[\w\W]*}}/g), Un = I(/<%[\w\W]*|^[\w\W]*%>/g), jn = I(/\${[\w\W]*/g), Wn = I(/^data-[\-\w.\u00B7-\uFFFF]+$/), $n = I(/^aria-[\-\w]+$/), bo = I(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Gn = I(/^(?:\w+script|data):/i), Kn = I(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Yn = I(/^html$/i), qn = I(/^[a-z][.\w]*(-[.\w]+)+$/i), yo = I(/<[/\w!]/g), Eo = I(/<[/\w]/g), Vn = I(/<\/no(script|embed|frames)/i), Xn = I(/\/>/i), F = {
2023
2023
  element: 1,
2024
2024
  attribute: 2,
2025
2025
  text: 3,
@@ -2041,7 +2041,7 @@ const fo = M([
2041
2041
  "noframes",
2042
2042
  "plaintext",
2043
2043
  "noscript"
2044
- ], Zn = M(v({}, Lo)), Jn = (function() {
2044
+ ], Zn = M(E({}, Lo)), Jn = (function() {
2045
2045
  const a = {};
2046
2046
  return at(Lo, (t) => {
2047
2047
  a[t] = I(new RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
@@ -2066,7 +2066,7 @@ const fo = M([
2066
2066
  } catch (l) {
2067
2067
  return console.warn("TrustedTypes policy " + r + " could not be created."), null;
2068
2068
  }
2069
- }, Eo = function() {
2069
+ }, vo = function() {
2070
2070
  return {
2071
2071
  afterSanitizeAttributes: [],
2072
2072
  afterSanitizeElements: [],
@@ -2079,8 +2079,8 @@ const fo = M([
2079
2079
  uponSanitizeShadowNode: []
2080
2080
  };
2081
2081
  }, Q = function(t, e, o, i) {
2082
- return P(t, e) && vt(t[e]) ? v(i.base ? U(i.base) : {}, t[e], i.transform) : o;
2083
- }, ve = function(t, e, o) {
2082
+ return P(t, e) && Et(t[e]) ? E(i.base ? U(i.base) : {}, t[e], i.transform) : o;
2083
+ }, Ee = function(t, e, o) {
2084
2084
  const i = P(t, e) ? t[e] : void 0;
2085
2085
  return i && typeof i == "object" ? U(i) : o();
2086
2086
  };
@@ -2094,7 +2094,7 @@ function Mo() {
2094
2094
  a.DocumentFragment;
2095
2095
  const r = a.HTMLTemplateElement, l = a.Node, c = a.Element, p = a.NodeFilter;
2096
2096
  a.NamedNodeMap === void 0 && (a.NamedNodeMap || a.MozNamedAttrMap), a.HTMLFormElement;
2097
- const m = a.DOMParser, g = a.trustedTypes, w = c.prototype, T = W(w, "cloneNode"), E = W(w, "remove"), k = W(w, "removeAttributeNode"), et = W(w, "nextSibling"), $ = W(w, "childNodes"), z = W(w, "parentNode"), st = W(w, "shadowRoot"), H = W(w, "attributes"), D = l && l.prototype ? W(l.prototype, "nodeType") : null, lt = l && l.prototype ? W(l.prototype, "nodeName") : null, It = l && l.prototype ? W(l.prototype, "ownerDocument") : null, Et = function(n) {
2097
+ const m = a.DOMParser, g = a.trustedTypes, w = c.prototype, T = W(w, "cloneNode"), v = W(w, "remove"), k = W(w, "removeAttributeNode"), et = W(w, "nextSibling"), $ = W(w, "childNodes"), z = W(w, "parentNode"), st = W(w, "shadowRoot"), H = W(w, "attributes"), D = l && l.prototype ? W(l.prototype, "nodeType") : null, lt = l && l.prototype ? W(l.prototype, "nodeName") : null, It = l && l.prototype ? W(l.prototype, "ownerDocument") : null, vt = function(n) {
2098
2098
  return D ? D(n) : n.nodeType;
2099
2099
  }, Xt = function(n) {
2100
2100
  return lt ? lt(n) : n.nodeName;
@@ -2123,11 +2123,11 @@ function Mo() {
2123
2123
  }, Ro = function() {
2124
2124
  return Se || (Zt = ti(g, i), Se = !0), Zt;
2125
2125
  }, Ot = e, Jt = Ot.implementation, Le = Ot.createNodeIterator, No = Ot.createDocumentFragment, Po = Ot.getElementsByTagName, zo = o.importNode;
2126
- let x = Eo();
2126
+ let x = vo();
2127
2127
  t.isSupported = typeof So == "function" && typeof z == "function" && Jt && Jt.createHTMLDocument !== void 0;
2128
2128
  const Ho = Fn, Bo = Un, Fo = jn, Uo = Wn, jo = $n, Wo = Gn, Me = Kn, $o = qn;
2129
2129
  let Ie = bo, A = null;
2130
- const Qt = v({}, [
2130
+ const Qt = E({}, [
2131
2131
  ...fo,
2132
2132
  ...me,
2133
2133
  ...ge,
@@ -2135,7 +2135,7 @@ function Mo() {
2135
2135
  ...ho
2136
2136
  ]);
2137
2137
  let C = null;
2138
- const te = v({}, [
2138
+ const te = E({}, [
2139
2139
  ...mo,
2140
2140
  ...ye,
2141
2141
  ...go,
@@ -2178,7 +2178,7 @@ function Mo() {
2178
2178
  let De = !0, ee = !0, Re = !1, Ne = !0, X = !1, nt = !0, it = !1, oe = !1, Dt = null, Rt = null, ne = !1, dt = !1, Nt = !1, Pt = !1, Pe = !0, ze = !1;
2179
2179
  const He = "user-content-";
2180
2180
  let ie = !0, re = !1, ut = {}, pt = null;
2181
- const Be = v({}, [
2181
+ const Be = E({}, [
2182
2182
  "annotation-xml",
2183
2183
  "audio",
2184
2184
  "colgroup",
@@ -2207,7 +2207,7 @@ function Mo() {
2207
2207
  "xmp"
2208
2208
  ]);
2209
2209
  let Fe = null;
2210
- const Ue = v({}, [
2210
+ const Ue = E({}, [
2211
2211
  "audio",
2212
2212
  "video",
2213
2213
  "img",
@@ -2216,7 +2216,7 @@ function Mo() {
2216
2216
  "track"
2217
2217
  ]);
2218
2218
  let je = null;
2219
- const We = v({}, [
2219
+ const We = E({}, [
2220
2220
  "alt",
2221
2221
  "class",
2222
2222
  "for",
@@ -2233,7 +2233,7 @@ function Mo() {
2233
2233
  "xmlns"
2234
2234
  ]), zt = "http://www.w3.org/1998/Math/MathML", Ht = "http://www.w3.org/2000/svg", K = "http://www.w3.org/1999/xhtml";
2235
2235
  let ft = K, ae = !1, se = null;
2236
- const Go = v({}, [
2236
+ const Go = E({}, [
2237
2237
  zt,
2238
2238
  Ht,
2239
2239
  K
@@ -2244,10 +2244,10 @@ function Mo() {
2244
2244
  "ms",
2245
2245
  "mtext"
2246
2246
  ]);
2247
- let le = v({}, $e);
2247
+ let le = E({}, $e);
2248
2248
  const Ge = M(["annotation-xml"]);
2249
- let ce = v({}, Ge);
2250
- const Ko = v({}, [
2249
+ let ce = E({}, Ge);
2250
+ const Ko = E({}, [
2251
2251
  "title",
2252
2252
  "style",
2253
2253
  "font",
@@ -2268,13 +2268,13 @@ function Mo() {
2268
2268
  }), Fe = Q(n, "ADD_DATA_URI_TAGS", Ue, {
2269
2269
  transform: _,
2270
2270
  base: Ue
2271
- }), pt = Q(n, "FORBID_CONTENTS", Be, { transform: _ }), Tt = Q(n, "FORBID_TAGS", U({}), { transform: _ }), Oe = Q(n, "FORBID_ATTR", U({}), { transform: _ }), ut = P(n, "USE_PROFILES") ? n.USE_PROFILES && typeof n.USE_PROFILES == "object" ? U(n.USE_PROFILES) : n.USE_PROFILES : !1, De = n.ALLOW_ARIA_ATTR !== !1, ee = n.ALLOW_DATA_ATTR !== !1, Re = n.ALLOW_UNKNOWN_PROTOCOLS || !1, Ne = n.ALLOW_SELF_CLOSE_IN_ATTR !== !1, X = n.SAFE_FOR_TEMPLATES || !1, nt = n.SAFE_FOR_XML !== !1, it = n.WHOLE_DOCUMENT || !1, dt = n.RETURN_DOM || !1, Nt = n.RETURN_DOM_FRAGMENT || !1, Pt = n.RETURN_TRUSTED_TYPE || !1, ne = n.FORCE_BODY || !1, Pe = n.SANITIZE_DOM !== !1, ze = n.SANITIZE_NAMED_PROPS || !1, ie = n.KEEP_CONTENT !== !1, re = n.IN_PLACE || !1, Ie = zn(n.ALLOWED_URI_REGEXP) ? n.ALLOWED_URI_REGEXP : bo, ft = typeof n.NAMESPACE == "string" ? n.NAMESPACE : K, le = ve(n, "MATHML_TEXT_INTEGRATION_POINTS", () => v({}, $e)), ce = ve(n, "HTML_INTEGRATION_POINTS", () => v({}, Ge));
2272
- const s = ve(n, "CUSTOM_ELEMENT_HANDLING", () => yt(null));
2273
- if (G = yt(null), P(s, "tagNameCheck") && Ke(s.tagNameCheck) && (G.tagNameCheck = s.tagNameCheck), P(s, "attributeNameCheck") && Ke(s.attributeNameCheck) && (G.attributeNameCheck = s.attributeNameCheck), P(s, "allowCustomizedBuiltInElements") && typeof s.allowCustomizedBuiltInElements == "boolean" && (G.allowCustomizedBuiltInElements = s.allowCustomizedBuiltInElements), I(G), X && (ee = !1), Nt && (dt = !0), ut && (A = v({}, ho), C = yt(null), ut.html === !0 && (v(A, fo), v(C, mo)), ut.svg === !0 && (v(A, me), v(C, ye), v(C, Gt)), ut.svgFilters === !0 && (v(A, ge), v(C, ye), v(C, Gt)), ut.mathMl === !0 && (v(A, be), v(C, go), v(C, Gt))), V.tagCheck = null, V.attributeCheck = null, P(n, "ADD_TAGS") && (typeof n.ADD_TAGS == "function" ? V.tagCheck = n.ADD_TAGS : vt(n.ADD_TAGS) && (A === Qt && (A = U(A)), v(A, n.ADD_TAGS, _))), P(n, "ADD_ATTR") && (typeof n.ADD_ATTR == "function" ? V.attributeCheck = n.ADD_ATTR : vt(n.ADD_ATTR) && (C === te && (C = U(C)), v(C, n.ADD_ATTR, _))), P(n, "ADD_FORBID_CONTENTS") && vt(n.ADD_FORBID_CONTENTS) && (pt === Be && (pt = U(pt)), v(pt, n.ADD_FORBID_CONTENTS, _)), ie && (A["#text"] = !0), it && v(A, [
2271
+ }), pt = Q(n, "FORBID_CONTENTS", Be, { transform: _ }), Tt = Q(n, "FORBID_TAGS", U({}), { transform: _ }), Oe = Q(n, "FORBID_ATTR", U({}), { transform: _ }), ut = P(n, "USE_PROFILES") ? n.USE_PROFILES && typeof n.USE_PROFILES == "object" ? U(n.USE_PROFILES) : n.USE_PROFILES : !1, De = n.ALLOW_ARIA_ATTR !== !1, ee = n.ALLOW_DATA_ATTR !== !1, Re = n.ALLOW_UNKNOWN_PROTOCOLS || !1, Ne = n.ALLOW_SELF_CLOSE_IN_ATTR !== !1, X = n.SAFE_FOR_TEMPLATES || !1, nt = n.SAFE_FOR_XML !== !1, it = n.WHOLE_DOCUMENT || !1, dt = n.RETURN_DOM || !1, Nt = n.RETURN_DOM_FRAGMENT || !1, Pt = n.RETURN_TRUSTED_TYPE || !1, ne = n.FORCE_BODY || !1, Pe = n.SANITIZE_DOM !== !1, ze = n.SANITIZE_NAMED_PROPS || !1, ie = n.KEEP_CONTENT !== !1, re = n.IN_PLACE || !1, Ie = zn(n.ALLOWED_URI_REGEXP) ? n.ALLOWED_URI_REGEXP : bo, ft = typeof n.NAMESPACE == "string" ? n.NAMESPACE : K, le = Ee(n, "MATHML_TEXT_INTEGRATION_POINTS", () => E({}, $e)), ce = Ee(n, "HTML_INTEGRATION_POINTS", () => E({}, Ge));
2272
+ const s = Ee(n, "CUSTOM_ELEMENT_HANDLING", () => yt(null));
2273
+ if (G = yt(null), P(s, "tagNameCheck") && Ke(s.tagNameCheck) && (G.tagNameCheck = s.tagNameCheck), P(s, "attributeNameCheck") && Ke(s.attributeNameCheck) && (G.attributeNameCheck = s.attributeNameCheck), P(s, "allowCustomizedBuiltInElements") && typeof s.allowCustomizedBuiltInElements == "boolean" && (G.allowCustomizedBuiltInElements = s.allowCustomizedBuiltInElements), I(G), X && (ee = !1), Nt && (dt = !0), ut && (A = E({}, ho), C = yt(null), ut.html === !0 && (E(A, fo), E(C, mo)), ut.svg === !0 && (E(A, me), E(C, ye), E(C, Gt)), ut.svgFilters === !0 && (E(A, ge), E(C, ye), E(C, Gt)), ut.mathMl === !0 && (E(A, be), E(C, go), E(C, Gt))), V.tagCheck = null, V.attributeCheck = null, P(n, "ADD_TAGS") && (typeof n.ADD_TAGS == "function" ? V.tagCheck = n.ADD_TAGS : Et(n.ADD_TAGS) && (A === Qt && (A = U(A)), E(A, n.ADD_TAGS, _))), P(n, "ADD_ATTR") && (typeof n.ADD_ATTR == "function" ? V.attributeCheck = n.ADD_ATTR : Et(n.ADD_ATTR) && (C === te && (C = U(C)), E(C, n.ADD_ATTR, _))), P(n, "ADD_FORBID_CONTENTS") && Et(n.ADD_FORBID_CONTENTS) && (pt === Be && (pt = U(pt)), E(pt, n.ADD_FORBID_CONTENTS, _)), ie && (A["#text"] = !0), it && E(A, [
2274
2274
  "html",
2275
2275
  "head",
2276
2276
  "body"
2277
- ]), A.table && (v(A, ["tbody"]), delete Tt.tbody), n.TRUSTED_TYPES_POLICY) {
2277
+ ]), A.table && (E(A, ["tbody"]), delete Tt.tbody), n.TRUSTED_TYPES_POLICY) {
2278
2278
  if (typeof n.TRUSTED_TYPES_POLICY.createHTML != "function") throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
2279
2279
  if (typeof n.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
2280
2280
  const d = N;
@@ -2286,11 +2286,11 @@ function Mo() {
2286
2286
  }
2287
2287
  } else n.TRUSTED_TYPES_POLICY === null ? (N = void 0, ot = "") : (N === void 0 && (N = Ro()), N && typeof ot == "string" && (ot = ct("")));
2288
2288
  M && M(n), ht = n;
2289
- }, Ye = v({}, [
2289
+ }, Ye = E({}, [
2290
2290
  ...me,
2291
2291
  ...ge,
2292
2292
  ...Hn
2293
- ]), qe = v({}, [...be, ...Bn]), Xo = function(n, s, d) {
2293
+ ]), qe = E({}, [...be, ...Bn]), Xo = function(n, s, d) {
2294
2294
  return s.namespaceURI === K ? n === "svg" : s.namespaceURI === zt ? n === "svg" && (d === "annotation-xml" || le[d]) : !!Ye[n];
2295
2295
  }, Zo = function(n, s, d) {
2296
2296
  return s.namespaceURI === K ? n === "math" : s.namespaceURI === Ht ? n === "math" && ce[d] : !!qe[n];
@@ -2309,7 +2309,7 @@ function Mo() {
2309
2309
  try {
2310
2310
  z(n).removeChild(n);
2311
2311
  } catch (s) {
2312
- if (E(n), !z(n)) throw J("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
2312
+ if (v(n), !z(n)) throw J("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
2313
2313
  }
2314
2314
  }, Ve = function(n, s, d) {
2315
2315
  try {
@@ -2329,7 +2329,7 @@ function Mo() {
2329
2329
  At(f, h);
2330
2330
  }), at(f, (h) => {
2331
2331
  try {
2332
- E(h);
2332
+ v(h);
2333
2333
  } catch (b) {
2334
2334
  }
2335
2335
  });
@@ -2377,7 +2377,7 @@ function Mo() {
2377
2377
  const s = [n];
2378
2378
  for (; s.length > 0; ) {
2379
2379
  const d = s.pop();
2380
- Et(d) === F.element && tn(d);
2380
+ vt(d) === F.element && tn(d);
2381
2381
  const f = $(d);
2382
2382
  if (f) for (let h = f.length - 1; h >= 0; --h) s.push(f[h]);
2383
2383
  }
@@ -2387,10 +2387,10 @@ function Mo() {
2387
2387
  if (!nt) return;
2388
2388
  const s = [n];
2389
2389
  for (; s.length > 0; ) {
2390
- const d = s.pop(), f = Et(d);
2391
- if (f === F.processingInstruction || f === F.comment && O(vo, d.data)) {
2390
+ const d = s.pop(), f = vt(d);
2391
+ if (f === F.processingInstruction || f === F.comment && O(Eo, d.data)) {
2392
2392
  try {
2393
- E(d);
2393
+ v(d);
2394
2394
  } catch (b) {
2395
2395
  }
2396
2396
  continue;
@@ -2467,7 +2467,7 @@ function Mo() {
2467
2467
  });
2468
2468
  }
2469
2469
  const on = function(n, s) {
2470
- return !!(nt && n.hasChildNodes() && !xt(n.firstElementChild) && O(yo, n.textContent) && O(yo, n.innerHTML) || nt && n.namespaceURI === K && Zn[s] && (xt(n.firstElementChild) || typeof n.textContent == "string" && O(Jn[s], n.textContent)) || n.nodeType === F.processingInstruction || nt && n.nodeType === F.comment && O(vo, n.data));
2470
+ return !!(nt && n.hasChildNodes() && !xt(n.firstElementChild) && O(yo, n.textContent) && O(yo, n.innerHTML) || nt && n.namespaceURI === K && Zn[s] && (xt(n.firstElementChild) || typeof n.textContent == "string" && O(Jn[s], n.textContent)) || n.nodeType === F.processingInstruction || nt && n.nodeType === F.comment && O(Eo, n.data));
2471
2471
  }, Wt = function(n, s) {
2472
2472
  if (n instanceof RegExp) return O(n, s);
2473
2473
  if (n instanceof Function) {
@@ -2507,7 +2507,7 @@ function Mo() {
2507
2507
  const f = nn(n, d, s);
2508
2508
  return f === !1 && (Y(x.afterSanitizeElements, n, null), gt(n, s)) ? !0 : f;
2509
2509
  }
2510
- if (Et(n) === F.element && !Qo(n) || (d === "noscript" || d === "noembed" || d === "noframes") && O(Vn, n.innerHTML))
2510
+ if (vt(n) === F.element && !Qo(n) || (d === "noscript" || d === "noembed" || d === "noframes") && O(Vn, n.innerHTML))
2511
2511
  return Z(n), !0;
2512
2512
  if (X && n.nodeType === F.text) {
2513
2513
  const f = Ut(n.textContent);
@@ -2518,7 +2518,7 @@ function Mo() {
2518
2518
  if (Oe[s] || Xe(s, n) || Pe && (s === "id" || s === "name") && (d in e || d in Vo)) return !1;
2519
2519
  const f = C[s] || V.attributeCheck instanceof Function && V.attributeCheck(s, n);
2520
2520
  return ee && O(Uo, s) || De && O(jo, s) ? !0 : f ? je[s] || O(Ie, Ct(d, Me, "")) || (s === "src" || s === "xlink:href" || s === "href") && n !== "script" && co(d, "data:") === 0 && Fe[n] || Re && !O(Wo, Ct(d, Me, "")) ? !0 : !d : oo(n) && Wt(G.tagNameCheck, n) && Wt(G.attributeNameCheck, s, n) || s === "is" && G.allowCustomizedBuiltInElements && Wt(G.tagNameCheck, d);
2521
- }, rn = v({}, [
2521
+ }, rn = E({}, [
2522
2522
  "annotation-xml",
2523
2523
  "color-profile",
2524
2524
  "font-face",
@@ -2589,7 +2589,7 @@ function Mo() {
2589
2589
  let s = null;
2590
2590
  const d = Je(n);
2591
2591
  for (Y(x.beforeSanitizeShadowDOM, n, null); s = d.nextNode(); )
2592
- if (Y(x.uponSanitizeShadowNode, s, null), to(s, n), no(s, n), mt(s.content) && $t(s.content), Et(s) === F.element) {
2592
+ if (Y(x.uponSanitizeShadowNode, s, null), to(s, n), no(s, n), mt(s.content) && $t(s.content), vt(s) === F.element) {
2593
2593
  const f = st(s);
2594
2594
  mt(f) && (pe(f), $t(f));
2595
2595
  }
@@ -2605,7 +2605,7 @@ function Mo() {
2605
2605
  $t(d.shadow);
2606
2606
  continue;
2607
2607
  }
2608
- const f = d.node, h = Et(f) === F.element, b = $(f);
2608
+ const f = d.node, h = vt(f) === F.element, b = $(f);
2609
2609
  if (b) for (let y = b.length - 1; y >= 0; --y) s.push({
2610
2610
  node: b[y],
2611
2611
  shadow: null
@@ -2709,7 +2709,7 @@ function Mo() {
2709
2709
  }, t.removeHooks = function(u) {
2710
2710
  P(x, u) && (x[u] = []);
2711
2711
  }, t.removeAllHooks = function() {
2712
- x = Eo();
2712
+ x = vo();
2713
2713
  }, t;
2714
2714
  }
2715
2715
  var Kt = Mo();
@@ -2807,8 +2807,8 @@ function Io(a, t, e, o) {
2807
2807
  (w, T) => {
2808
2808
  var k;
2809
2809
  if (T.tagName !== "iframe") return;
2810
- const E = w;
2811
- T.allowedTags.iframe = g || ((k = E.getAttribute) == null ? void 0 : k.call(E, ni)) === "true" && ii(E.getAttribute("src"));
2810
+ const v = w;
2811
+ T.allowedTags.iframe = g || ((k = v.getAttribute) == null ? void 0 : k.call(v, ni)) === "true" && ii(v.getAttribute("src"));
2812
2812
  }
2813
2813
  );
2814
2814
  try {
@@ -3113,7 +3113,7 @@ let xe = Vt;
3113
3113
  const ci = '.editora-editor{display:flex;flex-direction:column;border:1px solid #ddd;border-radius:4px;background:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,sans-serif;font-size:14px;overflow:hidden}.editora-editor *{box-sizing:border-box}.editora-theme-light{background:#fff;color:#333}.editora-theme-dark{--editora-dark-toolbar-bg-start: #353d48;--editora-dark-toolbar-bg-end: #2d3540;--editora-dark-button-bg-start: #46505f;--editora-dark-button-bg-end: #3b4553;--editora-dark-button-hover-start: #525d6d;--editora-dark-button-hover-end: #465262;--editora-dark-button-active-start: #5eaaf6;--editora-dark-button-active-end: #4a95de;--editora-dark-border: #475263;--editora-dark-border-strong: #566275;--editora-dark-text: #e1e9f5;--editora-dark-text-strong: #f3f7ff;--editora-dark-text-muted: #aeb9cc;--editora-dark-surface: #1d242d;--editora-dark-content: #1f2732;background:linear-gradient(180deg,#1b2330,#1c2430);color:var(--editora-dark-text);border-color:var(--editora-dark-border)}.editora-toolbar{display:flex;align-items:center;gap:4px;padding:8px;background:#f5f5f5;border-bottom:1px solid #ddd;flex-wrap:wrap}.editora-theme-dark .editora-toolbar{background:linear-gradient(180deg,var(--editora-dark-toolbar-bg-start) 0%,var(--editora-dark-toolbar-bg-end) 100%);border-bottom-color:var(--editora-dark-border);box-shadow:inset 0 1px #ffffff0d}.editora-toolbar-sticky{position:sticky;top:0;z-index:100;position:-webkit-sticky}.editora-toolbar-group{display:flex;align-items:center;gap:2px}.editora-toolbar-button{padding:6px 12px;border:1px solid #ccc;background:#fff;cursor:pointer;border-radius:3px;font-weight:600;font-size:14px;height:30px;display:flex;align-items:center;white-space:nowrap}.editora-toolbar-group-button{display:flex;align-items:center}.editora-toolbar-input.font-size{width:40px;padding:.25rem;text-align:center;font-size:14px;background:#fff;border:1px solid var(--rte-color-border-light);border-radius:var(--rte-radius-sm)}.editora-toolbar-group-items{display:flex;align-items:center;border:1px solid #ccc;.editora-toolbar-button{border:none;border-radius:0;&:first-child{border-right:1px solid #ccc;border-top-left-radius:3px;border-bottom-left-radius:3px}&:last-child{border:0px solid #ccc;border-radius:0!important}&:hover{background:#e0e0e0;border-color:#ccc}}}.editora-theme-dark .editora-toolbar-button{background:linear-gradient(180deg,var(--editora-dark-button-bg-start) 0%,var(--editora-dark-button-bg-end) 100%);border-color:var(--editora-dark-border-strong);color:var(--editora-dark-text);box-shadow:inset 0 1px #ffffff14,0 1px 1px #00000059}.editora-theme-dark .editora-toolbar-group-items{border-color:var(--editora-dark-border-strong);background:linear-gradient(180deg,var(--editora-dark-button-bg-start) 0%,var(--editora-dark-button-bg-end) 100%)}.editora-theme-dark .editora-toolbar-group-items .editora-toolbar-button:first-child{border-right-color:#566275}.editora-theme-dark .editora-toolbar-group-items .editora-toolbar-button:last-child{border-left-color:#566275}.editora-theme-dark .editora-toolbar-input.font-size{background-color:#2e3642;color:var(--editora-dark-text-strong);border-color:var(--editora-dark-border-strong);caret-color:var(--editora-dark-text-strong)}.editora-theme-dark .editora-toolbar-input.font-size::placeholder{color:var(--editora-dark-text-strong);opacity:1}.editora-toolbar-button:hover{background:#e0e0e0;border-color:#ccc}.editora-theme-dark .editora-toolbar-button:hover{background:linear-gradient(180deg,var(--editora-dark-button-hover-start) 0%,var(--editora-dark-button-hover-end) 100%);border-color:#66748a;color:var(--editora-dark-text-strong)}.editora-toolbar-button:active,.editora-toolbar-button.active{background:#d0d0d0;border-color:#999}.editora-theme-dark .editora-toolbar-button:active,.editora-theme-dark .editora-toolbar-button.active{background:linear-gradient(180deg,var(--editora-dark-button-active-start) 0%,var(--editora-dark-button-active-end) 100%);border-color:#67adf4;color:#0f1b2a}.editora-theme-dark .editora-toolbar-button:disabled{background:#313946;border-color:#424d5e;color:#7f8ca1}.editora-theme-dark .editora-toolbar-button[data-command=insertTable],.editora-theme-dark .editora-toolbar-button[data-command=print],.editora-theme-dark .editora-toolbar-button[data-command=toggleSpellCheck],.editora-theme-dark .editora-toolbar-button[data-command=toggleA11yChecker],.editora-theme-dark .editora-toolbar-button[data-command=setDirectionLTR],.editora-theme-dark .editora-toolbar-button[data-command=setDirectionRTL]{color:#f1f6ff}.editora-toolbar-button:disabled{opacity:.5;cursor:not-allowed}.editora-toolbar-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;line-height:1}.editora-toolbar-button svg,.editora-toolbar-icon svg{width:20px;height:20px;display:block;color:currentColor}.editora-theme-dark .editora-toolbar-button svg:not([fill=none i]),.editora-theme-dark .editora-toolbar-icon svg:not([fill=none i]){fill:currentColor}.editora-theme-dark .editora-toolbar-icon,.editora-theme-dark .editora-toolbar-icon *{color:inherit}.editora-theme-dark :is(.editora-toolbar-button,.editora-toolbar-icon) svg :is([stroke="#000" i],[stroke="#000000" i],[stroke=black i],[stroke="#0f0f0f" i],[stroke="#111111" i],[style*="stroke:#000" i],[style*="stroke: #000" i],[style*="stroke:black" i],[style*="stroke: black" i],[style*="stroke:#0f0f0f" i],[style*="stroke: #0f0f0f" i]){stroke:currentColor!important}.editora-theme-dark :is(.editora-toolbar-button,.editora-toolbar-icon) svg :is([fill="#000" i],[fill="#000000" i],[fill=black i],[fill="#0f0f0f" i],[fill="#111111" i],[style*="fill:#000" i],[style*="fill: #000" i],[style*="fill:black" i],[style*="fill: black" i],[style*="fill:#0f0f0f" i],[style*="fill: #0f0f0f" i]){fill:currentColor!important}.editora-toolbar-separator{width:1px;height:24px;background:#ddd;margin:0 4px}.editora-theme-dark .editora-toolbar-separator{background:#4d596b}.editora-toolbar-items-container{display:flex;align-items:center;gap:4px;flex:1;min-width:0;overflow:hidden}.editora-toolbar-more-button{display:flex;align-items:center;justify-content:center;width:30px;height:30px;flex-shrink:0;padding:0;border:1px solid #ccc;background:#fff;cursor:pointer;border-radius:3px;font-size:16px}.editora-toolbar-more-button:hover{background:#e0e0e0}.editora-toolbar-more-button.active{background:#d0d0d0;border-color:#999}.editora-theme-dark .editora-toolbar-more-button{background:var(--editora-dark-content);border-color:var(--editora-dark-border);color:var(--editora-dark-text)}.editora-theme-dark .editora-toolbar-more-button:hover,.editora-theme-dark .editora-toolbar-more-button.active{background:#3a4554;border-color:#607088}.editora-toolbar-expanded-row{display:none;flex-wrap:wrap;align-items:center;gap:4px;width:100%;padding:8px;border-top:1px solid #ddd;background:#f5f5f5}.editora-toolbar-expanded-row.show{display:flex}.editora-theme-dark .editora-toolbar-expanded-row{border-top-color:var(--editora-dark-border);background:linear-gradient(180deg,var(--editora-dark-toolbar-bg-start) 0%,var(--editora-dark-toolbar-bg-end) 100%)}.editora-toolbar-dropdown{position:relative}.editora-toolbar-dropdown-menu{position:absolute;top:100%;left:0;min-width:150px;margin-top:4px;padding:4px 0;background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px #00000026;z-index:1000}.editora-theme-dark .editora-toolbar-dropdown-menu{background:#29323d;border-color:#4d596b;box-shadow:0 8px 20px #00000073}.editora-toolbar-dropdown-item{display:block;width:100%;padding:8px 12px;border:none;background:transparent;color:#333;text-align:left;cursor:pointer;font-size:13px;transition:background .15s ease}.editora-theme-dark .editora-toolbar-dropdown-item{color:#d7deea}.editora-toolbar-dropdown-item:hover{background:#f5f5f5}.editora-theme-dark .editora-toolbar-dropdown-item:hover{background:#3a4554;color:#f0f6ff}.editora-content{flex:1;min-height:200px;padding:16px;outline:none;overflow-y:auto;line-height:1.6}.editora-theme-dark .editora-content{color:#ecf3ff;background:linear-gradient(180deg,var(--editora-dark-content) 0%,#1c232e 100%)}.editora-content:empty:before{content:attr(data-placeholder);color:#999;pointer-events:none}.editora-theme-dark .editora-content:empty:before{color:#8f9bb0}.editora-content h1{font-size:2em;margin:.67em 0;font-weight:600}.editora-content h2{font-size:1.5em;margin:.75em 0;font-weight:600}.editora-content h3{font-size:1.17em;margin:.83em 0;font-weight:600}.editora-content p{margin:1em 0}.editora-theme-dark .editora-content,.editora-theme-dark .editora-content :is(p,span,div,li,ul,ol,td,th,h1,h2,h3,h4,h5,h6,strong,em,u,s,small,sub,sup,blockquote,code,pre,a){color:#ecf3ff}.editora-content ul,.editora-content ol{margin:1em 0;padding-left:2em}.editora-content a{color:#06c;text-decoration:underline}.editora-theme-dark .editora-content a{color:#ecf3ff}.editora-content code{padding:2px 4px;background:#f5f5f5;border-radius:3px;font-family:Monaco,Menlo,Consolas,monospace;font-size:.9em}.editora-theme-dark .editora-content code{background:#1e1e1e}.editora-content pre{padding:12px;background:#f5f5f5;border-radius:4px;overflow-x:auto;margin:1em 0}.editora-theme-dark .editora-content pre{background:#1e1e1e}.editora-theme-dark .rte-code-block{background:linear-gradient(180deg,#212a36,#1b2430)!important;border-color:#4f5b70!important;color:#e7effc!important}.editora-theme-dark .rte-code-block code{color:#e7effc!important}.editora-theme-dark .rte-code-block:before{background:#111927!important;color:#dce8ff!important}.editora-theme-dark .rte-code-block .rte-code-copy{background:#2b3441!important;border-color:#5a667b!important;color:#dce8ff!important}.editora-content blockquote{margin:1em 0;padding-left:1em;border-left:4px solid #ddd;color:#666}.editora-theme-dark .editora-content blockquote{border-left-color:#3c3c3c;color:#ecf3ff}.editora-floating-toolbar{position:absolute;padding:4px;background:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 2px 8px #00000026;z-index:1000}.editora-theme-dark .editora-floating-toolbar{background:#29323d;border-color:#4d596b;box-shadow:0 8px 20px #00000073}.editora-statusbar-container{display:flex;flex-direction:column}.editora-statusbar-left{display:flex;align-items:center;gap:8px}.editora-statusbar-right{display:flex;align-items:center;gap:8px;margin-left:auto}.editora-statusbar{display:flex;align-items:center;gap:12px;padding:6px 12px;background:#f5f5f5;border-top:1px solid #ddd;font-size:12px;color:#666}.editora-theme-dark .editora-statusbar{background:linear-gradient(180deg,#2c3440,#252d37);border-top-color:#3f4a5b;color:#d7deea}.editora-statusbar-item{white-space:nowrap}.editora-statusbar-separator{color:#ddd}.editora-theme-dark .editora-statusbar-separator{color:#566275}.editora-editor[readonly] .editora-content{background:#fafafa;cursor:not-allowed}.editora-theme-dark.editora-editor[readonly] .editora-content{background:#1a1a1a}.editora-editor:focus-within{border-color:#06c;box-shadow:0 0 0 3px #0066cc1a}.editora-theme-dark.editora-editor:focus-within{border-color:#4db8ff;box-shadow:0 0 0 3px #4db8ff1a}.editora-editor[disabled]{opacity:.6;pointer-events:none}@media(max-width:768px){.editora-toolbar{padding:4px}.editora-toolbar-button{min-width:28px;min-height:28px;padding:4px 8px;font-size:12px}.editora-content{padding:12px}}.editora-content ::selection{background:#06c3}.editora-theme-dark .editora-content ::selection{background:#4db8ff33}.editora-content table{border-collapse:collapse;width:100%;margin:1em 0}.editora-content th,.editora-content td{border:1px solid #ddd;padding:8px 12px;text-align:left}.editora-theme-dark .editora-content th,.editora-theme-dark .editora-content td{border-color:#3c3c3c}.editora-content th{background:#f5f5f5;font-weight:600}.editora-theme-dark .editora-content th{background:#252526}.editora-content img{max-width:100%;height:auto;border-radius:4px;display:block}.editora-content video{max-width:100%;height:auto;border-radius:4px;display:block}.editora-editor.loading{opacity:.7;pointer-events:none}.editora-editor.loading:after{content:"";position:absolute;top:50%;left:50%;width:24px;height:24px;margin:-12px 0 0 -12px;border:3px solid #ddd;border-top-color:#06c;border-radius:50%;animation:editora-spin .8s linear infinite}@keyframes editora-spin{to{transform:rotate(360deg)}}.toolbar-container-wrapper{display:flex;align-items:center;background:#fff;border-bottom:1px solid #e0e0e0;padding:0;margin:0;width:100%;box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:14px;line-height:1.5;position:relative}.toolbar-container-wrapper[data-toolbar-sticky=true]{position:sticky;top:0;z-index:999;box-shadow:0 2px 4px #0000001a}.toolbar-container-wrapper[data-toolbar-floating=true]{position:fixed;top:0;left:0;right:0;z-index:1000;box-shadow:0 4px 12px #00000026}.toolbar-container-wrapper[data-toolbar-position=bottom]{border-bottom:none;border-top:1px solid #e0e0e0}.toolbar-container-wrapper .toolbar-wrapper{display:flex;width:100%;padding:8px;gap:4px;flex-wrap:wrap;align-items:center}.toolbar-container-wrapper .toolbar{display:flex;width:100%;gap:4px;flex-wrap:wrap;align-items:center}.toolbar-container-wrapper .toolbar-container{display:flex;gap:4px;flex-wrap:wrap;align-items:center;flex:1;position:relative}.toolbar-container-wrapper .toolbar-item{display:flex;align-items:center;gap:2px}.toolbar-container-wrapper .toolbar-button{padding:6px 10px;border:1px solid #d1d5db;background:#fff;border-radius:4px;cursor:pointer;font-size:13px;display:flex;align-items:center;justify-content:center;gap:4px;transition:all .15s ease;min-height:32px;white-space:nowrap}.toolbar-container-wrapper .toolbar-button:hover{background-color:#f3f4f6;border-color:#9ca3af}.toolbar-container-wrapper .toolbar-button:active,.toolbar-container-wrapper .toolbar-button[data-active=true]{background-color:#06c;color:#fff;border-color:#0052a3;box-shadow:inset 0 1px 3px #0000001a}.toolbar-container-wrapper .toolbar-button:disabled{opacity:.5;cursor:not-allowed;background-color:#f9fafb}.toolbar-container-wrapper .toolbar-more-button{padding:6px 8px;font-size:16px;font-weight:500;line-height:1}.toolbar-container-wrapper .toolbar-separator{width:1px;height:24px;background-color:#d1d5db;margin:0 4px}.toolbar-container-wrapper .toolbar-icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex-shrink:0}.toolbar-container-wrapper .toolbar-icon svg{width:100%;height:100%}.toolbar-container-wrapper .toolbar-dropdown{position:relative;display:flex;align-items:center}.toolbar-container-wrapper .toolbar-dropdown-arrow{font-size:10px;margin-left:2px;line-height:1}.toolbar-container-wrapper .toolbar-dropdown-menu{position:absolute;top:100%;left:0;background:#fff;border:1px solid #d1d5db;border-radius:6px;box-shadow:0 4px 12px #00000026;z-index:1000;min-width:160px;padding:4px 0;margin-top:4px;display:none}.toolbar-container-wrapper .toolbar-dropdown-menu.show{display:block}.toolbar-container-wrapper .toolbar-dropdown-item{display:block;width:100%;padding:8px 12px;border:none;background:transparent;text-align:left;cursor:pointer;font-size:13px;color:#1f2937;transition:background-color .15s ease;font-family:inherit}.toolbar-container-wrapper .toolbar-dropdown-item:hover{background-color:#f3f4f6}.toolbar-container-wrapper .toolbar-dropdown-item:active{background-color:#e5e7eb}.toolbar-container-wrapper .toolbar-input{padding:6px 8px;border:1px solid #d1d5db;border-radius:4px;font-size:13px;font-family:inherit;background-color:#fff;color:#1f2937;transition:all .15s ease}.toolbar-container-wrapper .toolbar-input:focus{outline:none;border-color:#06c;box-shadow:0 0 0 3px #0066cc1a;background-color:#fff}.toolbar-container-wrapper .toolbar-input::placeholder{color:#9ca3af}.toolbar-overflow-menu{animation:slideDown .2s ease-out}@keyframes slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.toolbar-overflow-item{transition:background-color .15s ease}.floating-toolbar{user-select:none;-webkit-user-select:none;font-family:system-ui,-apple-system,sans-serif;font-size:14px;animation:fadeInUp .15s ease-out}@keyframes fadeInUp{0%{opacity:0;transform:translate(-50%) translateY(10px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.floating-toolbar-btn{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;background:transparent;border-radius:4px;color:#495057;cursor:pointer;font-size:14px;font-weight:500;transition:all .15s ease;outline:none}.floating-toolbar-btn:hover{background:#f8f9fa;color:#212529}.floating-toolbar-btn:active{background:#e9ecef;transform:scale(.95)}.floating-toolbar-btn.floating-toolbar-toggle{color:#dc3545;font-weight:700}.floating-toolbar-btn.floating-toolbar-toggle:hover{background:#f8d7da;color:#721c24}.floating-toolbar-separator{width:1px;height:20px;background:#e1e5e9;margin:0 2px}@media(max-width:768px){.toolbar-container-wrapper .toolbar-button{padding:5px 8px;font-size:12px;min-height:28px}.toolbar-container-wrapper .toolbar-icon{width:16px;height:16px}.toolbar-container-wrapper .toolbar-dropdown-menu{min-width:140px}.toolbar-container-wrapper .toolbar-dropdown-item{padding:6px 10px;font-size:12px}.floating-toolbar{padding:4px;gap:2px}.floating-toolbar-btn{width:28px;height:28px;font-size:12px}}@media(max-width:480px){.toolbar-container-wrapper{padding:4px}.toolbar-container-wrapper .toolbar-wrapper{padding:4px;gap:2px}.toolbar-container-wrapper .toolbar-button{padding:4px 6px;font-size:11px;min-height:24px}.toolbar-container-wrapper .toolbar-icon{width:14px;height:14px}}.floating-toolbar{pointer-events:auto}.floating-toolbar{max-width:calc(100vw - 20px);overflow-x:auto}@media(prefers-color-scheme:dark){.floating-toolbar{background:#2d3748;border-color:#4a5568;color:#e2e8f0}.floating-toolbar-btn:hover{background:#4a5568;color:#f7fafc}.floating-toolbar-btn:active{background:#718096}.floating-toolbar-separator{background:#4a5568}}editora-editor[data-loading]{display:block;position:relative;min-height:160px;border:1px solid var(--ui-color-border, #ddd);border-radius:var(--ui-radius, 4px);background:var(--ui-color-surface, #fff)}editora-editor[data-loading]:before{content:"";position:absolute;inset:0 0 auto;height:46px;border-bottom:1px solid var(--ui-color-border, #ddd);border-radius:var(--ui-radius, 4px) var(--ui-radius, 4px) 0 0;background:linear-gradient(90deg,var(--ui-color-surface-alt, #f5f5f5) 0%,color-mix(in srgb,var(--ui-color-surface-alt, #f5f5f5) 70%,var(--ui-color-border, #ddd)) 50%,var(--ui-color-surface-alt, #f5f5f5) 100%);background-size:220% 100%;animation:editora-loading-shimmer 1.2s linear infinite}editora-editor[data-loading]:after{content:"Loading editor…";position:absolute;top:62px;left:16px;font:14px/1.4 var(--ui-font-family, system-ui, sans-serif);color:var(--ui-color-muted, #6b7280)}editora-editor[data-loading]>*{visibility:hidden}@keyframes editora-loading-shimmer{to{background-position:-220% 0}}@media(prefers-reduced-motion:reduce){editora-editor[data-loading]:before{animation:none}}';
3114
3114
  let Yt;
3115
3115
  const di = "__editoraCommandEditorRoot", ui = "__editoraLastCommandButton", To = "editora-editor, [data-editora-editor], .rte-editor, .editora-editor", ko = ".rte-content, .editora-content", pi = "Rich text editor", fi = /* @__PURE__ */ new Set(["collaboration"]), Ae = /* @__PURE__ */ new Set();
3116
- let tt = null, xo = !1, Ee = null, we = null;
3116
+ let tt = null, xo = !1, ve = null, we = null;
3117
3117
  function Ao(a) {
3118
3118
  if (!(a instanceof HTMLElement)) return !1;
3119
3119
  const t = a;
@@ -3165,10 +3165,10 @@ function mi() {
3165
3165
  }
3166
3166
  function gi() {
3167
3167
  if (typeof window == "undefined" || xo) return;
3168
- Ee = typeof window.executeEditorCommand == "function" ? window.executeEditorCommand.bind(window) : null, we = typeof window.execEditorCommand == "function" ? window.execEditorCommand.bind(window) : null;
3168
+ ve = typeof window.executeEditorCommand == "function" ? window.executeEditorCommand.bind(window) : null, we = typeof window.execEditorCommand == "function" ? window.execEditorCommand.bind(window) : null;
3169
3169
  const a = (t, ...e) => {
3170
3170
  const o = mi();
3171
- return o ? o.execCommand(t, ...e) : Ee ? Ee(t, ...e) : we ? we(t, ...e) : !1;
3171
+ return o ? o.execCommand(t, ...e) : ve ? ve(t, ...e) : we ? we(t, ...e) : !1;
3172
3172
  };
3173
3173
  window.executeEditorCommand = a, window.execEditorCommand = a, xo = !0;
3174
3174
  }
@@ -3186,9 +3186,11 @@ function yi() {
3186
3186
  }
3187
3187
  return Yt;
3188
3188
  }
3189
- class q extends HTMLElement {
3189
+ const Ei = typeof HTMLElement == "undefined" ? class {
3190
+ } : HTMLElement;
3191
+ class q extends Ei {
3190
3192
  constructor() {
3191
- if (super(), this.pluginLoader = yi(), this.config = {}, this.isInitialized = !1, this.buildGeneration = 0, this.keyboardShortcutManager = new En(), this.lastAutosavedContent = "", this.preservedContent = null, this.loadedPlugins = [], this.lastBeforeInputType = null, this.pendingHistorySnapshot = null, bi(), !this.hasAttribute("data-initial-content")) {
3193
+ if (super(), this.pluginLoader = yi(), this.config = {}, this.isInitialized = !1, this.buildGeneration = 0, this.keyboardShortcutManager = new vn(), this.lastAutosavedContent = "", this.preservedContent = null, this.loadedPlugins = [], this.lastBeforeInputType = null, this.pendingHistorySnapshot = null, bi(), !this.hasAttribute("data-initial-content")) {
3192
3194
  const t = this.innerHTML.trim();
3193
3195
  t && this.setAttribute("data-initial-content", t);
3194
3196
  }
@@ -3714,15 +3716,15 @@ class q extends HTMLElement {
3714
3716
  let i = this.contentElement.innerHTML;
3715
3717
  const r = (T = o == null ? void 0 : o.detail) == null ? void 0 : T.allowedTags, l = this.getPerformanceConfig(), c = this.getContentSanitizeConfig(), p = this.getSecurityConfig(), m = this.lastBeforeInputType;
3716
3718
  if (this.lastBeforeInputType = null, p.sanitizeOnInput !== !1 && c.sanitize !== !1 && !m) {
3717
- const E = wo(i, c, p, r);
3718
- if (E !== i) {
3719
+ const v = wo(i, c, p, r);
3720
+ if (v !== i) {
3719
3721
  const k = window.getSelection(), et = k && k.rangeCount > 0 ? k.getRangeAt(0) : null;
3720
- if (this.contentElement.innerHTML = E, et && k)
3722
+ if (this.contentElement.innerHTML = v, et && k)
3721
3723
  try {
3722
3724
  k.removeAllRanges(), k.addRange(et);
3723
3725
  } catch ($) {
3724
3726
  }
3725
- i = E;
3727
+ i = v;
3726
3728
  }
3727
3729
  }
3728
3730
  this.recordInputHistory(i), this.contentChangeDebounceTimer && clearTimeout(this.contentChangeDebounceTimer);
@@ -3845,7 +3847,7 @@ class q extends HTMLElement {
3845
3847
  const o = this.contentElement.textContent || "", { words: i, chars: r } = yn(o), l = bn(this.contentElement);
3846
3848
  let c, p;
3847
3849
  const m = this.getSelectionRangeInEditor();
3848
- m && (c = mn(this.contentElement, m), m.collapsed || (p = vn(m, c), c = void 0)), this.statusBar.update({
3850
+ m && (c = mn(this.contentElement, m), m.collapsed || (p = En(m, c), c = void 0)), this.statusBar.update({
3849
3851
  wordCount: i,
3850
3852
  charCount: r,
3851
3853
  lineCount: l,
@@ -4012,12 +4014,12 @@ const vi = {
4012
4014
  list: () => import("./ListPlugin.native-UYaoRiub.mjs").then((a) => a.ListPlugin()),
4013
4015
  history: () => import("./HistoryPlugin.native-C8GyxsgC.mjs").then((a) => a.HistoryPlugin())
4014
4016
  };
4015
- async function Ei() {
4017
+ async function wi() {
4016
4018
  return Object.entries(vi).forEach(([a, t]) => {
4017
4019
  Ce.register(a, t);
4018
4020
  }), Ce;
4019
4021
  }
4020
- typeof window != "undefined" && Ei().then((a) => {
4022
+ typeof window != "undefined" && wi().then((a) => {
4021
4023
  q.__globalPluginLoader = a, customElements.get("editora-editor") || customElements.define("editora-editor", q);
4022
4024
  const t = document.querySelectorAll("editora-editor:not([data-initial-content])"), e = [];
4023
4025
  t.forEach((o) => {
@@ -4028,6 +4030,6 @@ typeof window != "undefined" && Ei().then((a) => {
4028
4030
  });
4029
4031
  });
4030
4032
  export {
4031
- Ei as initWebComponent
4033
+ wi as initWebComponent
4032
4034
  };
4033
4035
  //# sourceMappingURL=webcomponent-core.js.map