@tailor-cms/ce-quill-html-edit 0.0.6 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,7 +1,4 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
2
  var import_index = require("./index.css");
6
3
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
7
4
  const vue = require("vue");
@@ -25,203 +22,6 @@ var manifest$1 = {
25
22
  ui
26
23
  };
27
24
  var index_default = manifest$1;
28
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
29
- function getDefaultExportFromCjs(x) {
30
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
31
- }
32
- function isObject$3(value) {
33
- var type2 = typeof value;
34
- return value != null && (type2 == "object" || type2 == "function");
35
- }
36
- var isObject_1 = isObject$3;
37
- var freeGlobal$2 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
38
- var _freeGlobal = freeGlobal$2;
39
- var freeGlobal$1 = _freeGlobal;
40
- var freeSelf$1 = typeof self == "object" && self && self.Object === Object && self;
41
- var root$3 = freeGlobal$1 || freeSelf$1 || Function("return this")();
42
- var _root = root$3;
43
- var root$2 = _root;
44
- var now$1 = function() {
45
- return root$2.Date.now();
46
- };
47
- var now_1 = now$1;
48
- var reWhitespace = /\s/;
49
- function trimmedEndIndex$1(string) {
50
- var index = string.length;
51
- while (index-- && reWhitespace.test(string.charAt(index))) {
52
- }
53
- return index;
54
- }
55
- var _trimmedEndIndex = trimmedEndIndex$1;
56
- var trimmedEndIndex = _trimmedEndIndex;
57
- var reTrimStart = /^\s+/;
58
- function baseTrim$1(string) {
59
- return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
60
- }
61
- var _baseTrim = baseTrim$1;
62
- var root$1 = _root;
63
- var Symbol$4 = root$1.Symbol;
64
- var _Symbol = Symbol$4;
65
- var Symbol$3 = _Symbol;
66
- var objectProto$h = Object.prototype;
67
- var hasOwnProperty$e = objectProto$h.hasOwnProperty;
68
- var nativeObjectToString$3 = objectProto$h.toString;
69
- var symToStringTag$3 = Symbol$3 ? Symbol$3.toStringTag : void 0;
70
- function getRawTag$2(value) {
71
- var isOwn = hasOwnProperty$e.call(value, symToStringTag$3), tag = value[symToStringTag$3];
72
- try {
73
- value[symToStringTag$3] = void 0;
74
- var unmasked = true;
75
- } catch (e) {
76
- }
77
- var result = nativeObjectToString$3.call(value);
78
- if (unmasked) {
79
- if (isOwn) {
80
- value[symToStringTag$3] = tag;
81
- } else {
82
- delete value[symToStringTag$3];
83
- }
84
- }
85
- return result;
86
- }
87
- var _getRawTag = getRawTag$2;
88
- var objectProto$g = Object.prototype;
89
- var nativeObjectToString$2 = objectProto$g.toString;
90
- function objectToString$2(value) {
91
- return nativeObjectToString$2.call(value);
92
- }
93
- var _objectToString = objectToString$2;
94
- var Symbol$2 = _Symbol, getRawTag$1 = _getRawTag, objectToString$1 = _objectToString;
95
- var nullTag$1 = "[object Null]", undefinedTag$1 = "[object Undefined]";
96
- var symToStringTag$2 = Symbol$2 ? Symbol$2.toStringTag : void 0;
97
- function baseGetTag$2(value) {
98
- if (value == null) {
99
- return value === void 0 ? undefinedTag$1 : nullTag$1;
100
- }
101
- return symToStringTag$2 && symToStringTag$2 in Object(value) ? getRawTag$1(value) : objectToString$1(value);
102
- }
103
- var _baseGetTag = baseGetTag$2;
104
- function isObjectLike$2(value) {
105
- return value != null && typeof value == "object";
106
- }
107
- var isObjectLike_1 = isObjectLike$2;
108
- var baseGetTag$1 = _baseGetTag, isObjectLike$1 = isObjectLike_1;
109
- var symbolTag$3 = "[object Symbol]";
110
- function isSymbol$1(value) {
111
- return typeof value == "symbol" || isObjectLike$1(value) && baseGetTag$1(value) == symbolTag$3;
112
- }
113
- var isSymbol_1 = isSymbol$1;
114
- var baseTrim = _baseTrim, isObject$2 = isObject_1, isSymbol = isSymbol_1;
115
- var NAN = 0 / 0;
116
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
117
- var reIsBinary = /^0b[01]+$/i;
118
- var reIsOctal = /^0o[0-7]+$/i;
119
- var freeParseInt = parseInt;
120
- function toNumber$1(value) {
121
- if (typeof value == "number") {
122
- return value;
123
- }
124
- if (isSymbol(value)) {
125
- return NAN;
126
- }
127
- if (isObject$2(value)) {
128
- var other = typeof value.valueOf == "function" ? value.valueOf() : value;
129
- value = isObject$2(other) ? other + "" : other;
130
- }
131
- if (typeof value != "string") {
132
- return value === 0 ? value : +value;
133
- }
134
- value = baseTrim(value);
135
- var isBinary = reIsBinary.test(value);
136
- return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
137
- }
138
- var toNumber_1 = toNumber$1;
139
- var isObject$1 = isObject_1, now = now_1, toNumber = toNumber_1;
140
- var FUNC_ERROR_TEXT = "Expected a function";
141
- var nativeMax$1 = Math.max, nativeMin = Math.min;
142
- function debounce$2(func, wait, options) {
143
- var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
144
- if (typeof func != "function") {
145
- throw new TypeError(FUNC_ERROR_TEXT);
146
- }
147
- wait = toNumber(wait) || 0;
148
- if (isObject$1(options)) {
149
- leading = !!options.leading;
150
- maxing = "maxWait" in options;
151
- maxWait = maxing ? nativeMax$1(toNumber(options.maxWait) || 0, wait) : maxWait;
152
- trailing = "trailing" in options ? !!options.trailing : trailing;
153
- }
154
- function invokeFunc(time) {
155
- var args = lastArgs, thisArg = lastThis;
156
- lastArgs = lastThis = void 0;
157
- lastInvokeTime = time;
158
- result = func.apply(thisArg, args);
159
- return result;
160
- }
161
- function leadingEdge(time) {
162
- lastInvokeTime = time;
163
- timerId = setTimeout(timerExpired, wait);
164
- return leading ? invokeFunc(time) : result;
165
- }
166
- function remainingWait(time) {
167
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
168
- return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
169
- }
170
- function shouldInvoke(time) {
171
- var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
172
- return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
173
- }
174
- function timerExpired() {
175
- var time = now();
176
- if (shouldInvoke(time)) {
177
- return trailingEdge(time);
178
- }
179
- timerId = setTimeout(timerExpired, remainingWait(time));
180
- }
181
- function trailingEdge(time) {
182
- timerId = void 0;
183
- if (trailing && lastArgs) {
184
- return invokeFunc(time);
185
- }
186
- lastArgs = lastThis = void 0;
187
- return result;
188
- }
189
- function cancel() {
190
- if (timerId !== void 0) {
191
- clearTimeout(timerId);
192
- }
193
- lastInvokeTime = 0;
194
- lastArgs = lastCallTime = lastThis = timerId = void 0;
195
- }
196
- function flush() {
197
- return timerId === void 0 ? result : trailingEdge(now());
198
- }
199
- function debounced() {
200
- var time = now(), isInvoking = shouldInvoke(time);
201
- lastArgs = arguments;
202
- lastThis = this;
203
- lastCallTime = time;
204
- if (isInvoking) {
205
- if (timerId === void 0) {
206
- return leadingEdge(lastCallTime);
207
- }
208
- if (maxing) {
209
- clearTimeout(timerId);
210
- timerId = setTimeout(timerExpired, wait);
211
- return invokeFunc(lastCallTime);
212
- }
213
- }
214
- if (timerId === void 0) {
215
- timerId = setTimeout(timerExpired, wait);
216
- }
217
- return result;
218
- }
219
- debounced.cancel = cancel;
220
- debounced.flush = flush;
221
- return debounced;
222
- }
223
- var debounce_1 = debounce$2;
224
- const debounce$3 = /* @__PURE__ */ getDefaultExportFromCjs(debounce_1);
225
25
  var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
226
26
  var freeSelf = typeof self == "object" && self && self.Object === Object && self;
227
27
  var root = freeGlobal || freeSelf || Function("return this")();
@@ -263,11 +63,49 @@ function baseGetTag(value) {
263
63
  function isObjectLike(value) {
264
64
  return value != null && typeof value == "object";
265
65
  }
66
+ var symbolTag$3 = "[object Symbol]";
67
+ function isSymbol(value) {
68
+ return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$3;
69
+ }
266
70
  var isArray = Array.isArray;
71
+ var reWhitespace = /\s/;
72
+ function trimmedEndIndex(string) {
73
+ var index = string.length;
74
+ while (index-- && reWhitespace.test(string.charAt(index))) {
75
+ }
76
+ return index;
77
+ }
78
+ var reTrimStart = /^\s+/;
79
+ function baseTrim(string) {
80
+ return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
81
+ }
267
82
  function isObject(value) {
268
83
  var type2 = typeof value;
269
84
  return value != null && (type2 == "object" || type2 == "function");
270
85
  }
86
+ var NAN = 0 / 0;
87
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
88
+ var reIsBinary = /^0b[01]+$/i;
89
+ var reIsOctal = /^0o[0-7]+$/i;
90
+ var freeParseInt = parseInt;
91
+ function toNumber(value) {
92
+ if (typeof value == "number") {
93
+ return value;
94
+ }
95
+ if (isSymbol(value)) {
96
+ return NAN;
97
+ }
98
+ if (isObject(value)) {
99
+ var other = typeof value.valueOf == "function" ? value.valueOf() : value;
100
+ value = isObject(other) ? other + "" : other;
101
+ }
102
+ if (typeof value != "string") {
103
+ return value === 0 ? value : +value;
104
+ }
105
+ value = baseTrim(value);
106
+ var isBinary = reIsBinary.test(value);
107
+ return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
108
+ }
271
109
  function identity(value) {
272
110
  return value;
273
111
  }
@@ -459,11 +297,11 @@ function copyObject(source, props, object, customizer) {
459
297
  }
460
298
  return object;
461
299
  }
462
- var nativeMax = Math.max;
300
+ var nativeMax$1 = Math.max;
463
301
  function overRest(func, start2, transform) {
464
- start2 = nativeMax(start2 === void 0 ? func.length - 1 : start2, 0);
302
+ start2 = nativeMax$1(start2 === void 0 ? func.length - 1 : start2, 0);
465
303
  return function() {
466
- var args = arguments, index = -1, length = nativeMax(args.length - start2, 0), array = Array(length);
304
+ var args = arguments, index = -1, length = nativeMax$1(args.length - start2, 0), array = Array(length);
467
305
  while (++index < length) {
468
306
  array[index] = args[start2 + index];
469
307
  }
@@ -860,7 +698,7 @@ Stack.prototype.set = stackSet;
860
698
  var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
861
699
  var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
862
700
  var moduleExports = freeModule && freeModule.exports === freeExports;
863
- var Buffer2 = moduleExports ? root.Buffer : void 0, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0;
701
+ var Buffer = moduleExports ? root.Buffer : void 0, allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0;
864
702
  function cloneBuffer(buffer, isDeep) {
865
703
  if (isDeep) {
866
704
  return buffer.slice();
@@ -938,10 +776,10 @@ function initCloneArray(array) {
938
776
  }
939
777
  return result;
940
778
  }
941
- var Uint8Array2 = root.Uint8Array;
779
+ var Uint8Array = root.Uint8Array;
942
780
  function cloneArrayBuffer(arrayBuffer) {
943
781
  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
944
- new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
782
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
945
783
  return result;
946
784
  }
947
785
  function cloneDataView(dataView, isDeep) {
@@ -1173,7 +1011,7 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
1173
1011
  object = object.buffer;
1174
1012
  other = other.buffer;
1175
1013
  case arrayBufferTag:
1176
- if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
1014
+ if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
1177
1015
  return false;
1178
1016
  }
1179
1017
  return true;
@@ -1312,6 +1150,92 @@ function createBaseFor(fromRight) {
1312
1150
  };
1313
1151
  }
1314
1152
  var baseFor = createBaseFor();
1153
+ var now = function() {
1154
+ return root.Date.now();
1155
+ };
1156
+ var FUNC_ERROR_TEXT = "Expected a function";
1157
+ var nativeMax = Math.max, nativeMin = Math.min;
1158
+ function debounce$2(func, wait, options) {
1159
+ var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
1160
+ if (typeof func != "function") {
1161
+ throw new TypeError(FUNC_ERROR_TEXT);
1162
+ }
1163
+ wait = toNumber(wait) || 0;
1164
+ if (isObject(options)) {
1165
+ leading = !!options.leading;
1166
+ maxing = "maxWait" in options;
1167
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
1168
+ trailing = "trailing" in options ? !!options.trailing : trailing;
1169
+ }
1170
+ function invokeFunc(time) {
1171
+ var args = lastArgs, thisArg = lastThis;
1172
+ lastArgs = lastThis = void 0;
1173
+ lastInvokeTime = time;
1174
+ result = func.apply(thisArg, args);
1175
+ return result;
1176
+ }
1177
+ function leadingEdge(time) {
1178
+ lastInvokeTime = time;
1179
+ timerId = setTimeout(timerExpired, wait);
1180
+ return leading ? invokeFunc(time) : result;
1181
+ }
1182
+ function remainingWait(time) {
1183
+ var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
1184
+ return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
1185
+ }
1186
+ function shouldInvoke(time) {
1187
+ var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
1188
+ return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
1189
+ }
1190
+ function timerExpired() {
1191
+ var time = now();
1192
+ if (shouldInvoke(time)) {
1193
+ return trailingEdge(time);
1194
+ }
1195
+ timerId = setTimeout(timerExpired, remainingWait(time));
1196
+ }
1197
+ function trailingEdge(time) {
1198
+ timerId = void 0;
1199
+ if (trailing && lastArgs) {
1200
+ return invokeFunc(time);
1201
+ }
1202
+ lastArgs = lastThis = void 0;
1203
+ return result;
1204
+ }
1205
+ function cancel() {
1206
+ if (timerId !== void 0) {
1207
+ clearTimeout(timerId);
1208
+ }
1209
+ lastInvokeTime = 0;
1210
+ lastArgs = lastCallTime = lastThis = timerId = void 0;
1211
+ }
1212
+ function flush() {
1213
+ return timerId === void 0 ? result : trailingEdge(now());
1214
+ }
1215
+ function debounced() {
1216
+ var time = now(), isInvoking = shouldInvoke(time);
1217
+ lastArgs = arguments;
1218
+ lastThis = this;
1219
+ lastCallTime = time;
1220
+ if (isInvoking) {
1221
+ if (timerId === void 0) {
1222
+ return leadingEdge(lastCallTime);
1223
+ }
1224
+ if (maxing) {
1225
+ clearTimeout(timerId);
1226
+ timerId = setTimeout(timerExpired, wait);
1227
+ return invokeFunc(lastCallTime);
1228
+ }
1229
+ }
1230
+ if (timerId === void 0) {
1231
+ timerId = setTimeout(timerExpired, wait);
1232
+ }
1233
+ return result;
1234
+ }
1235
+ debounced.cancel = cancel;
1236
+ debounced.flush = flush;
1237
+ return debounced;
1238
+ }
1315
1239
  function assignMergeValue(object, key, value) {
1316
1240
  if (value !== void 0 && !eq(object[key], value) || value === void 0 && !(key in object)) {
1317
1241
  baseAssignValue(object, key, value);
@@ -2245,6 +2169,10 @@ const Parchment = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
2245
2169
  StyleAttributor: StyleAttributor$1,
2246
2170
  TextBlot: TextBlot$1
2247
2171
  }, Symbol.toStringTag, { value: "Module" }));
2172
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
2173
+ function getDefaultExportFromCjs(x) {
2174
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
2175
+ }
2248
2176
  var Delta$1 = { exports: {} };
2249
2177
  var DIFF_DELETE = -1;
2250
2178
  var DIFF_INSERT = 1;
@@ -3111,8 +3039,8 @@ lodash_clonedeep.exports;
3111
3039
  var reIsNative2 = RegExp(
3112
3040
  "^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar2, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
3113
3041
  );
3114
- var Buffer3 = moduleExports2 ? root2.Buffer : void 0, Symbol2 = root2.Symbol, Uint8Array3 = root2.Uint8Array, getPrototype2 = overArg2(Object.getPrototypeOf, Object), objectCreate2 = Object.create, propertyIsEnumerable2 = objectProto2.propertyIsEnumerable, splice2 = arrayProto2.splice;
3115
- var nativeGetSymbols2 = Object.getOwnPropertySymbols, nativeIsBuffer2 = Buffer3 ? Buffer3.isBuffer : void 0, nativeKeys2 = overArg2(Object.keys, Object);
3042
+ var Buffer2 = moduleExports2 ? root2.Buffer : void 0, Symbol2 = root2.Symbol, Uint8Array2 = root2.Uint8Array, getPrototype2 = overArg2(Object.getPrototypeOf, Object), objectCreate2 = Object.create, propertyIsEnumerable2 = objectProto2.propertyIsEnumerable, splice2 = arrayProto2.splice;
3043
+ var nativeGetSymbols2 = Object.getOwnPropertySymbols, nativeIsBuffer2 = Buffer2 ? Buffer2.isBuffer : void 0, nativeKeys2 = overArg2(Object.keys, Object);
3116
3044
  var DataView2 = getNative2(root2, "DataView"), Map2 = getNative2(root2, "Map"), Promise2 = getNative2(root2, "Promise"), Set2 = getNative2(root2, "Set"), WeakMap2 = getNative2(root2, "WeakMap"), nativeCreate2 = getNative2(Object, "create");
3117
3045
  var dataViewCtorString2 = toSource2(DataView2), mapCtorString2 = toSource2(Map2), promiseCtorString2 = toSource2(Promise2), setCtorString2 = toSource2(Set2), weakMapCtorString2 = toSource2(WeakMap2);
3118
3046
  var symbolProto2 = Symbol2 ? Symbol2.prototype : void 0, symbolValueOf2 = symbolProto2 ? symbolProto2.valueOf : void 0;
@@ -3385,7 +3313,7 @@ lodash_clonedeep.exports;
3385
3313
  }
3386
3314
  function cloneArrayBuffer2(arrayBuffer) {
3387
3315
  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
3388
- new Uint8Array3(result).set(new Uint8Array3(arrayBuffer));
3316
+ new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
3389
3317
  return result;
3390
3318
  }
3391
3319
  function cloneDataView2(dataView, isDeep) {
@@ -3685,8 +3613,8 @@ lodash_isequal.exports;
3685
3613
  var reIsNative2 = RegExp(
3686
3614
  "^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar2, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
3687
3615
  );
3688
- var Buffer3 = moduleExports2 ? root2.Buffer : void 0, Symbol2 = root2.Symbol, Uint8Array3 = root2.Uint8Array, propertyIsEnumerable2 = objectProto2.propertyIsEnumerable, splice2 = arrayProto2.splice, symToStringTag2 = Symbol2 ? Symbol2.toStringTag : void 0;
3689
- var nativeGetSymbols2 = Object.getOwnPropertySymbols, nativeIsBuffer2 = Buffer3 ? Buffer3.isBuffer : void 0, nativeKeys2 = overArg2(Object.keys, Object);
3616
+ var Buffer2 = moduleExports2 ? root2.Buffer : void 0, Symbol2 = root2.Symbol, Uint8Array2 = root2.Uint8Array, propertyIsEnumerable2 = objectProto2.propertyIsEnumerable, splice2 = arrayProto2.splice, symToStringTag2 = Symbol2 ? Symbol2.toStringTag : void 0;
3617
+ var nativeGetSymbols2 = Object.getOwnPropertySymbols, nativeIsBuffer2 = Buffer2 ? Buffer2.isBuffer : void 0, nativeKeys2 = overArg2(Object.keys, Object);
3690
3618
  var DataView2 = getNative2(root2, "DataView"), Map2 = getNative2(root2, "Map"), Promise2 = getNative2(root2, "Promise"), Set2 = getNative2(root2, "Set"), WeakMap2 = getNative2(root2, "WeakMap"), nativeCreate2 = getNative2(Object, "create");
3691
3619
  var dataViewCtorString2 = toSource2(DataView2), mapCtorString2 = toSource2(Map2), promiseCtorString2 = toSource2(Promise2), setCtorString2 = toSource2(Set2), weakMapCtorString2 = toSource2(WeakMap2);
3692
3620
  var symbolProto2 = Symbol2 ? Symbol2.prototype : void 0, symbolValueOf2 = symbolProto2 ? symbolProto2.valueOf : void 0;
@@ -4018,7 +3946,7 @@ lodash_isequal.exports;
4018
3946
  object = object.buffer;
4019
3947
  other = other.buffer;
4020
3948
  case arrayBufferTag2:
4021
- if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array3(object), new Uint8Array3(other))) {
3949
+ if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
4022
3950
  return false;
4023
3951
  }
4024
3952
  return true;
@@ -4875,10 +4803,26 @@ const entityMap = {
4875
4803
  function escapeText(text) {
4876
4804
  return text.replace(/[&<>"']/g, (s) => entityMap[s]);
4877
4805
  }
4878
- const _Inline = class _Inline extends InlineBlot$1 {
4806
+ class Inline extends InlineBlot$1 {
4807
+ static allowedChildren = [Inline, Break, EmbedBlot$1, Text$1];
4808
+ // Lower index means deeper in the DOM tree, since not found (-1) is for embeds
4809
+ static order = [
4810
+ "cursor",
4811
+ "inline",
4812
+ // Must be lower
4813
+ "link",
4814
+ // Chrome wants <a> to be lower
4815
+ "underline",
4816
+ "strike",
4817
+ "italic",
4818
+ "bold",
4819
+ "script",
4820
+ "code"
4821
+ // Must be higher
4822
+ ];
4879
4823
  static compare(self2, other) {
4880
- const selfIndex = _Inline.order.indexOf(self2);
4881
- const otherIndex = _Inline.order.indexOf(other);
4824
+ const selfIndex = Inline.order.indexOf(self2);
4825
+ const otherIndex = Inline.order.indexOf(other);
4882
4826
  if (selfIndex >= 0 || otherIndex >= 0) {
4883
4827
  return selfIndex - otherIndex;
4884
4828
  }
@@ -4891,7 +4835,7 @@ const _Inline = class _Inline extends InlineBlot$1 {
4891
4835
  return 1;
4892
4836
  }
4893
4837
  formatAt(index, length, name2, value) {
4894
- if (_Inline.compare(this.statics.blotName, name2) < 0 && this.scroll.query(name2, Scope.BLOT)) {
4838
+ if (Inline.compare(this.statics.blotName, name2) < 0 && this.scroll.query(name2, Scope.BLOT)) {
4895
4839
  const blot = this.isolate(index, length);
4896
4840
  if (value) {
4897
4841
  blot.wrap(name2, value);
@@ -4902,36 +4846,16 @@ const _Inline = class _Inline extends InlineBlot$1 {
4902
4846
  }
4903
4847
  optimize(context) {
4904
4848
  super.optimize(context);
4905
- if (this.parent instanceof _Inline && _Inline.compare(this.statics.blotName, this.parent.statics.blotName) > 0) {
4849
+ if (this.parent instanceof Inline && Inline.compare(this.statics.blotName, this.parent.statics.blotName) > 0) {
4906
4850
  const parent = this.parent.isolate(this.offset(), this.length());
4907
4851
  this.moveChildren(parent);
4908
4852
  parent.wrap(this);
4909
4853
  }
4910
4854
  }
4911
- };
4912
- __publicField(_Inline, "allowedChildren", [_Inline, Break, EmbedBlot$1, Text$1]);
4913
- // Lower index means deeper in the DOM tree, since not found (-1) is for embeds
4914
- __publicField(_Inline, "order", [
4915
- "cursor",
4916
- "inline",
4917
- // Must be lower
4918
- "link",
4919
- // Chrome wants <a> to be lower
4920
- "underline",
4921
- "strike",
4922
- "italic",
4923
- "bold",
4924
- "script",
4925
- "code"
4926
- // Must be higher
4927
- ]);
4928
- let Inline = _Inline;
4855
+ }
4929
4856
  const NEWLINE_LENGTH = 1;
4930
4857
  class Block extends BlockBlot$1 {
4931
- constructor() {
4932
- super(...arguments);
4933
- __publicField(this, "cache", {});
4934
- }
4858
+ cache = {};
4935
4859
  delta() {
4936
4860
  if (this.cache.delta == null) {
4937
4861
  this.cache.delta = blockDelta(this);
@@ -5097,7 +5021,11 @@ function bubbleFormats(blot) {
5097
5021
  }
5098
5022
  return bubbleFormats(blot.parent, formats, filter);
5099
5023
  }
5100
- const _Cursor = class _Cursor extends EmbedBlot$1 {
5024
+ class Cursor extends EmbedBlot$1 {
5025
+ static blotName = "cursor";
5026
+ static className = "ql-cursor";
5027
+ static tagName = "span";
5028
+ static CONTENTS = "\uFEFF";
5101
5029
  // Zero width no break space
5102
5030
  static value() {
5103
5031
  return void 0;
@@ -5105,7 +5033,7 @@ const _Cursor = class _Cursor extends EmbedBlot$1 {
5105
5033
  constructor(scroll, domNode, selection) {
5106
5034
  super(scroll, domNode);
5107
5035
  this.selection = selection;
5108
- this.textNode = document.createTextNode(_Cursor.CONTENTS);
5036
+ this.textNode = document.createTextNode(Cursor.CONTENTS);
5109
5037
  this.domNode.appendChild(this.textNode);
5110
5038
  this.savedLength = 0;
5111
5039
  }
@@ -5124,9 +5052,9 @@ const _Cursor = class _Cursor extends EmbedBlot$1 {
5124
5052
  target = target.parent;
5125
5053
  }
5126
5054
  if (target != null) {
5127
- this.savedLength = _Cursor.CONTENTS.length;
5055
+ this.savedLength = Cursor.CONTENTS.length;
5128
5056
  target.optimize();
5129
- target.formatAt(index, _Cursor.CONTENTS.length, name2, value);
5057
+ target.formatAt(index, Cursor.CONTENTS.length, name2, value);
5130
5058
  this.savedLength = 0;
5131
5059
  }
5132
5060
  }
@@ -5157,8 +5085,8 @@ const _Cursor = class _Cursor extends EmbedBlot$1 {
5157
5085
  const {
5158
5086
  textNode
5159
5087
  } = this;
5160
- const newText = textNode.data.split(_Cursor.CONTENTS).join("");
5161
- textNode.data = _Cursor.CONTENTS;
5088
+ const newText = textNode.data.split(Cursor.CONTENTS).join("");
5089
+ textNode.data = Cursor.CONTENTS;
5162
5090
  let mergedTextBlot;
5163
5091
  if (prevTextBlot) {
5164
5092
  mergedTextBlot = prevTextBlot;
@@ -5228,7 +5156,7 @@ const _Cursor = class _Cursor extends EmbedBlot$1 {
5228
5156
  } = this;
5229
5157
  while (parent) {
5230
5158
  if (parent.domNode.tagName === "A") {
5231
- this.savedLength = _Cursor.CONTENTS.length;
5159
+ this.savedLength = Cursor.CONTENTS.length;
5232
5160
  parent.isolate(this.offset(parent), this.length()).unwrap();
5233
5161
  this.savedLength = 0;
5234
5162
  break;
@@ -5239,12 +5167,7 @@ const _Cursor = class _Cursor extends EmbedBlot$1 {
5239
5167
  value() {
5240
5168
  return "";
5241
5169
  }
5242
- };
5243
- __publicField(_Cursor, "blotName", "cursor");
5244
- __publicField(_Cursor, "className", "ql-cursor");
5245
- __publicField(_Cursor, "tagName", "span");
5246
- __publicField(_Cursor, "CONTENTS", "\uFEFF");
5247
- let Cursor = _Cursor;
5170
+ }
5248
5171
  var eventemitter3 = { exports: {} };
5249
5172
  (function(module2) {
5250
5173
  var has = Object.prototype.hasOwnProperty, prefix = "~";
@@ -5443,6 +5366,26 @@ EVENTS.forEach((eventName) => {
5443
5366
  });
5444
5367
  });
5445
5368
  class Emitter extends EventEmitter {
5369
+ static events = {
5370
+ EDITOR_CHANGE: "editor-change",
5371
+ SCROLL_BEFORE_UPDATE: "scroll-before-update",
5372
+ SCROLL_BLOT_MOUNT: "scroll-blot-mount",
5373
+ SCROLL_BLOT_UNMOUNT: "scroll-blot-unmount",
5374
+ SCROLL_OPTIMIZE: "scroll-optimize",
5375
+ SCROLL_UPDATE: "scroll-update",
5376
+ SCROLL_EMBED_UPDATE: "scroll-embed-update",
5377
+ SELECTION_CHANGE: "selection-change",
5378
+ TEXT_CHANGE: "text-change",
5379
+ COMPOSITION_BEFORE_START: "composition-before-start",
5380
+ COMPOSITION_START: "composition-start",
5381
+ COMPOSITION_BEFORE_END: "composition-before-end",
5382
+ COMPOSITION_END: "composition-end"
5383
+ };
5384
+ static sources = {
5385
+ API: "api",
5386
+ SILENT: "silent",
5387
+ USER: "user"
5388
+ };
5446
5389
  constructor() {
5447
5390
  super();
5448
5391
  this.domListeners = {};
@@ -5479,26 +5422,6 @@ class Emitter extends EventEmitter {
5479
5422
  });
5480
5423
  }
5481
5424
  }
5482
- __publicField(Emitter, "events", {
5483
- EDITOR_CHANGE: "editor-change",
5484
- SCROLL_BEFORE_UPDATE: "scroll-before-update",
5485
- SCROLL_BLOT_MOUNT: "scroll-blot-mount",
5486
- SCROLL_BLOT_UNMOUNT: "scroll-blot-unmount",
5487
- SCROLL_OPTIMIZE: "scroll-optimize",
5488
- SCROLL_UPDATE: "scroll-update",
5489
- SCROLL_EMBED_UPDATE: "scroll-embed-update",
5490
- SELECTION_CHANGE: "selection-change",
5491
- TEXT_CHANGE: "text-change",
5492
- COMPOSITION_BEFORE_START: "composition-before-start",
5493
- COMPOSITION_START: "composition-start",
5494
- COMPOSITION_BEFORE_END: "composition-before-end",
5495
- COMPOSITION_END: "composition-end"
5496
- });
5497
- __publicField(Emitter, "sources", {
5498
- API: "api",
5499
- SILENT: "silent",
5500
- USER: "user"
5501
- });
5502
5425
  const debug$4 = namespace("quill:selection");
5503
5426
  class Range {
5504
5427
  constructor(index) {
@@ -6040,7 +5963,7 @@ class Editor {
6040
5963
  if (this.scroll.children.length === 0) return true;
6041
5964
  if (this.scroll.children.length > 1) return false;
6042
5965
  const blot = this.scroll.children.head;
6043
- if ((blot == null ? void 0 : blot.statics.blotName) !== Block.blotName) return false;
5966
+ if (blot?.statics.blotName !== Block.blotName) return false;
6044
5967
  const block = blot;
6045
5968
  if (block.children.length > 1) return false;
6046
5969
  return block.children.head instanceof Break;
@@ -6232,13 +6155,13 @@ function splitOpLines(ops) {
6232
6155
  return split;
6233
6156
  }
6234
6157
  class Module {
6158
+ static DEFAULTS = {};
6235
6159
  constructor(quill) {
6236
6160
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6237
6161
  this.quill = quill;
6238
6162
  this.options = options;
6239
6163
  }
6240
6164
  }
6241
- __publicField(Module, "DEFAULTS", {});
6242
6165
  const GUARD_TEXT = "\uFEFF";
6243
6166
  class Embed extends EmbedBlot$1 {
6244
6167
  constructor(scroll, node) {
@@ -6308,8 +6231,8 @@ class Embed extends EmbedBlot$1 {
6308
6231
  }
6309
6232
  }
6310
6233
  class Composition {
6234
+ isComposing = false;
6311
6235
  constructor(scroll, emitter) {
6312
- __publicField(this, "isComposing", false);
6313
6236
  this.scroll = scroll;
6314
6237
  this.emitter = emitter;
6315
6238
  this.setupListeners();
@@ -6344,9 +6267,15 @@ class Composition {
6344
6267
  this.isComposing = false;
6345
6268
  }
6346
6269
  }
6347
- const _Theme = class _Theme {
6270
+ class Theme {
6271
+ static DEFAULTS = {
6272
+ modules: {}
6273
+ };
6274
+ static themes = {
6275
+ default: Theme
6276
+ };
6277
+ modules = {};
6348
6278
  constructor(quill, options) {
6349
- __publicField(this, "modules", {});
6350
6279
  this.quill = quill;
6351
6280
  this.options = options;
6352
6281
  }
@@ -6362,14 +6291,7 @@ const _Theme = class _Theme {
6362
6291
  this.modules[name2] = new ModuleClass(this.quill, this.options.modules[name2] || {});
6363
6292
  return this.modules[name2];
6364
6293
  }
6365
- };
6366
- __publicField(_Theme, "DEFAULTS", {
6367
- modules: {}
6368
- });
6369
- __publicField(_Theme, "themes", {
6370
- default: _Theme
6371
- });
6372
- let Theme = _Theme;
6294
+ }
6373
6295
  const getParentElement = (element) => element.parentElement || element.getRootNode().host || null;
6374
6296
  const getElementRect = (element) => {
6375
6297
  const rect = element.getBoundingClientRect();
@@ -6399,7 +6321,6 @@ const getScrollDistance = (targetStart, targetEnd, scrollStart, scrollEnd, scrol
6399
6321
  return 0;
6400
6322
  };
6401
6323
  const scrollRectIntoView = (root2, targetRect) => {
6402
- var _a, _b, _c;
6403
6324
  const document2 = root2.ownerDocument;
6404
6325
  let rect = targetRect;
6405
6326
  let current = root2;
@@ -6407,8 +6328,8 @@ const scrollRectIntoView = (root2, targetRect) => {
6407
6328
  const isDocumentBody = current === document2.body;
6408
6329
  const bounding = isDocumentBody ? {
6409
6330
  top: 0,
6410
- right: ((_a = window.visualViewport) == null ? void 0 : _a.width) ?? document2.documentElement.clientWidth,
6411
- bottom: ((_b = window.visualViewport) == null ? void 0 : _b.height) ?? document2.documentElement.clientHeight,
6331
+ right: window.visualViewport?.width ?? document2.documentElement.clientWidth,
6332
+ bottom: window.visualViewport?.height ?? document2.documentElement.clientHeight,
6412
6333
  left: 0
6413
6334
  } : getElementRect(current);
6414
6335
  const style = getComputedStyle(current);
@@ -6416,7 +6337,7 @@ const scrollRectIntoView = (root2, targetRect) => {
6416
6337
  const scrollDistanceY = getScrollDistance(rect.top, rect.bottom, bounding.top, bounding.bottom, paddingValueToInt(style.scrollPaddingTop), paddingValueToInt(style.scrollPaddingBottom));
6417
6338
  if (scrollDistanceX || scrollDistanceY) {
6418
6339
  if (isDocumentBody) {
6419
- (_c = document2.defaultView) == null ? void 0 : _c.scrollBy(scrollDistanceX, scrollDistanceY);
6340
+ document2.defaultView?.scrollBy(scrollDistanceX, scrollDistanceY);
6420
6341
  } else {
6421
6342
  const {
6422
6343
  scrollLeft,
@@ -6470,7 +6391,29 @@ const createRegistryWithFormats = (formats, sourceRegistry, debug2) => {
6470
6391
  const debug$3 = namespace("quill");
6471
6392
  const globalRegistry = new Registry();
6472
6393
  ParentBlot$1.uiClass = "ql-ui";
6473
- const _Quill = class _Quill {
6394
+ class Quill {
6395
+ static DEFAULTS = {
6396
+ bounds: null,
6397
+ modules: {
6398
+ clipboard: true,
6399
+ keyboard: true,
6400
+ history: true,
6401
+ uploader: true
6402
+ },
6403
+ placeholder: "",
6404
+ readOnly: false,
6405
+ registry: globalRegistry,
6406
+ theme: "default"
6407
+ };
6408
+ static events = Emitter.events;
6409
+ static sources = Emitter.sources;
6410
+ static version = "2.0.3";
6411
+ static imports = {
6412
+ delta: Delta,
6413
+ parchment: Parchment,
6414
+ "core/module": Module,
6415
+ "core/theme": Theme
6416
+ };
6474
6417
  static debug(limit) {
6475
6418
  if (limit === true) {
6476
6419
  limit = "log";
@@ -6524,7 +6467,7 @@ const _Quill = class _Quill {
6524
6467
  return;
6525
6468
  }
6526
6469
  if (this.options.debug) {
6527
- _Quill.debug(this.options.debug);
6470
+ Quill.debug(this.options.debug);
6528
6471
  }
6529
6472
  const html = this.container.innerHTML.trim();
6530
6473
  this.container.classList.add("ql-container");
@@ -6578,7 +6521,7 @@ const _Quill = class _Quill {
6578
6521
  [blot.statics.blotName]: delta
6579
6522
  });
6580
6523
  return this.editor.update(change, [], selectionInfo);
6581
- }, _Quill.sources.USER);
6524
+ }, Quill.sources.USER);
6582
6525
  });
6583
6526
  if (html) {
6584
6527
  const contents = this.clipboard.convert({
@@ -6770,7 +6713,7 @@ const _Quill = class _Quill {
6770
6713
  return this.selection.hasFocus();
6771
6714
  }
6772
6715
  insertEmbed(index, embed, value) {
6773
- let source = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : _Quill.sources.API;
6716
+ let source = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : Quill.sources.API;
6774
6717
  return modify.call(this, () => {
6775
6718
  return this.editor.insertEmbed(index, embed, value);
6776
6719
  }, source, index);
@@ -6834,7 +6777,7 @@ const _Quill = class _Quill {
6834
6777
  }
6835
6778
  setSelection(index, length, source) {
6836
6779
  if (index == null) {
6837
- this.selection.setRange(null, length || _Quill.sources.API);
6780
+ this.selection.setRange(null, length || Quill.sources.API);
6838
6781
  } else {
6839
6782
  [index, length, , source] = overload(index, length, source);
6840
6783
  this.selection.setRange(new Range(Math.max(0, index), length), source);
@@ -6861,30 +6804,7 @@ const _Quill = class _Quill {
6861
6804
  return this.editor.applyDelta(delta);
6862
6805
  }, source, true);
6863
6806
  }
6864
- };
6865
- __publicField(_Quill, "DEFAULTS", {
6866
- bounds: null,
6867
- modules: {
6868
- clipboard: true,
6869
- keyboard: true,
6870
- history: true,
6871
- uploader: true
6872
- },
6873
- placeholder: "",
6874
- readOnly: false,
6875
- registry: globalRegistry,
6876
- theme: "default"
6877
- });
6878
- __publicField(_Quill, "events", Emitter.events);
6879
- __publicField(_Quill, "sources", Emitter.sources);
6880
- __publicField(_Quill, "version", "2.0.3");
6881
- __publicField(_Quill, "imports", {
6882
- delta: Delta,
6883
- parchment: Parchment,
6884
- "core/module": Module,
6885
- "core/theme": Theme
6886
- });
6887
- let Quill = _Quill;
6807
+ }
6888
6808
  function resolveSelector(selector) {
6889
6809
  return typeof selector === "string" ? document.querySelector(selector) : selector;
6890
6810
  }
@@ -7052,6 +6972,11 @@ function isUpdatable(blot) {
7052
6972
  return typeof blot.updateContent === "function";
7053
6973
  }
7054
6974
  class Scroll extends ScrollBlot$1 {
6975
+ static blotName = "scroll";
6976
+ static className = "ql-editor";
6977
+ static tagName = "DIV";
6978
+ static defaultChild = Block;
6979
+ static allowedChildren = [Block, BlockEmbed, Container];
7055
6980
  constructor(registry, domNode, _ref) {
7056
6981
  let {
7057
6982
  emitter
@@ -7275,7 +7200,7 @@ class Scroll extends ScrollBlot$1 {
7275
7200
  const renderBlocks = [];
7276
7201
  let currentBlockDelta = new Delta();
7277
7202
  delta.forEach((op) => {
7278
- const insert = op == null ? void 0 : op.insert;
7203
+ const insert = op?.insert;
7279
7204
  if (!insert) return;
7280
7205
  if (typeof insert === "string") {
7281
7206
  const splitted = insert.split("\n");
@@ -7346,11 +7271,6 @@ class Scroll extends ScrollBlot$1 {
7346
7271
  return block;
7347
7272
  }
7348
7273
  }
7349
- __publicField(Scroll, "blotName", "scroll");
7350
- __publicField(Scroll, "className", "ql-editor");
7351
- __publicField(Scroll, "tagName", "DIV");
7352
- __publicField(Scroll, "defaultChild", Block);
7353
- __publicField(Scroll, "allowedChildren", [Block, BlockEmbed, Container]);
7354
7274
  function insertInlineContents(parent, index, inlineContents) {
7355
7275
  inlineContents.reduce((index2, op) => {
7356
7276
  const length = DeltaExports.Op.length(op);
@@ -7424,11 +7344,11 @@ ${escapeText(this.code(index, length))}
7424
7344
  }
7425
7345
  }
7426
7346
  class CodeBlock extends Block {
7347
+ static TAB = " ";
7427
7348
  static register() {
7428
7349
  Quill.register(CodeBlockContainer);
7429
7350
  }
7430
7351
  }
7431
- __publicField(CodeBlock, "TAB", " ");
7432
7352
  class Code extends Inline {
7433
7353
  }
7434
7354
  Code.blotName = "code";
@@ -8141,19 +8061,14 @@ const isBlockElement = (element) => {
8141
8061
  };
8142
8062
  const normalizeEmptyLines = (doc) => {
8143
8063
  Array.from(doc.querySelectorAll("br")).filter((br) => isBlockElement(br.previousElementSibling) && isBlockElement(br.nextElementSibling)).forEach((br) => {
8144
- var _a;
8145
- (_a = br.parentNode) == null ? void 0 : _a.removeChild(br);
8064
+ br.parentNode?.removeChild(br);
8146
8065
  });
8147
8066
  };
8148
8067
  const normalizeFontWeight = (doc) => {
8149
- Array.from(doc.querySelectorAll('b[style*="font-weight"]')).filter((node) => {
8150
- var _a;
8151
- return (_a = node.getAttribute("style")) == null ? void 0 : _a.match(normalWeightRegexp);
8152
- }).forEach((node) => {
8153
- var _a;
8068
+ Array.from(doc.querySelectorAll('b[style*="font-weight"]')).filter((node) => node.getAttribute("style")?.match(normalWeightRegexp)).forEach((node) => {
8154
8069
  const fragment = doc.createDocumentFragment();
8155
8070
  fragment.append(...node.childNodes);
8156
- (_a = node.parentNode) == null ? void 0 : _a.replaceChild(fragment, node);
8071
+ node.parentNode?.replaceChild(fragment, node);
8157
8072
  });
8158
8073
  };
8159
8074
  function normalize$1(doc) {
@@ -8167,12 +8082,12 @@ const idRegexp = /\bmso-list:[^;]*\bl(\d+)/i;
8167
8082
  const indentRegexp = /\bmso-list:[^;]*\blevel(\d+)/i;
8168
8083
  const parseListItem = (element, html) => {
8169
8084
  const style = element.getAttribute("style");
8170
- const idMatch = style == null ? void 0 : style.match(idRegexp);
8085
+ const idMatch = style?.match(idRegexp);
8171
8086
  if (!idMatch) {
8172
8087
  return null;
8173
8088
  }
8174
8089
  const id = Number(idMatch[1]);
8175
- const indentMatch = style == null ? void 0 : style.match(indentRegexp);
8090
+ const indentMatch = style?.match(indentRegexp);
8176
8091
  const indent = indentMatch ? Number(indentMatch[1]) : 1;
8177
8092
  const typeRegexp = new RegExp(`@list l${id}:level${indent}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`, "i");
8178
8093
  const typeMatch = html.match(typeRegexp);
@@ -8185,7 +8100,6 @@ const parseListItem = (element, html) => {
8185
8100
  };
8186
8101
  };
8187
8102
  const normalizeListItem = (doc) => {
8188
- var _a, _b;
8189
8103
  const msoList = Array.from(doc.querySelectorAll("[style*=mso-list]"));
8190
8104
  const ignored = [];
8191
8105
  const others = [];
@@ -8197,10 +8111,7 @@ const normalizeListItem = (doc) => {
8197
8111
  others.push(node);
8198
8112
  }
8199
8113
  });
8200
- ignored.forEach((node) => {
8201
- var _a2;
8202
- return (_a2 = node.parentNode) == null ? void 0 : _a2.removeChild(node);
8203
- });
8114
+ ignored.forEach((node) => node.parentNode?.removeChild(node));
8204
8115
  const html = doc.documentElement.innerHTML;
8205
8116
  const listItems = others.map((element) => parseListItem(element, html)).filter((parsed) => parsed);
8206
8117
  while (listItems.length) {
@@ -8208,7 +8119,7 @@ const normalizeListItem = (doc) => {
8208
8119
  let current = listItems.shift();
8209
8120
  while (current) {
8210
8121
  childListItems.push(current);
8211
- current = listItems.length && ((_a = listItems[0]) == null ? void 0 : _a.element) === current.element.nextElementSibling && // Different id means the next item doesn't belong to this group.
8122
+ current = listItems.length && listItems[0]?.element === current.element.nextElementSibling && // Different id means the next item doesn't belong to this group.
8212
8123
  listItems[0].id === current.id ? listItems.shift() : null;
8213
8124
  }
8214
8125
  const ul = document.createElement("ul");
@@ -8221,18 +8132,18 @@ const normalizeListItem = (doc) => {
8221
8132
  li.innerHTML = listItem.element.innerHTML;
8222
8133
  ul.appendChild(li);
8223
8134
  });
8224
- const element = (_b = childListItems[0]) == null ? void 0 : _b.element;
8135
+ const element = childListItems[0]?.element;
8225
8136
  const {
8226
8137
  parentNode
8227
8138
  } = element ?? {};
8228
8139
  if (element) {
8229
- parentNode == null ? void 0 : parentNode.replaceChild(ul, element);
8140
+ parentNode?.replaceChild(ul, element);
8230
8141
  }
8231
8142
  childListItems.slice(1).forEach((_ref) => {
8232
8143
  let {
8233
8144
  element: e
8234
8145
  } = _ref;
8235
- parentNode == null ? void 0 : parentNode.removeChild(e);
8146
+ parentNode?.removeChild(e);
8236
8147
  });
8237
8148
  }
8238
8149
  };
@@ -8260,6 +8171,9 @@ const STYLE_ATTRIBUTORS = [AlignStyle, BackgroundStyle, ColorStyle, DirectionSty
8260
8171
  return memo;
8261
8172
  }, {});
8262
8173
  class Clipboard extends Module {
8174
+ static DEFAULTS = {
8175
+ matchers: []
8176
+ };
8263
8177
  constructor(quill, options) {
8264
8178
  super(quill, options);
8265
8179
  this.quill.root.addEventListener("copy", (e) => this.onCaptureCopy(e, false));
@@ -8324,7 +8238,6 @@ class Clipboard extends Module {
8324
8238
  }
8325
8239
  }
8326
8240
  onCaptureCopy(e) {
8327
- var _a, _b;
8328
8241
  let isCut = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
8329
8242
  if (e.defaultPrevented) return;
8330
8243
  e.preventDefault();
@@ -8334,8 +8247,8 @@ class Clipboard extends Module {
8334
8247
  html,
8335
8248
  text
8336
8249
  } = this.onCopy(range, isCut);
8337
- (_a = e.clipboardData) == null ? void 0 : _a.setData("text/plain", text);
8338
- (_b = e.clipboardData) == null ? void 0 : _b.setData("text/html", html);
8250
+ e.clipboardData?.setData("text/plain", text);
8251
+ e.clipboardData?.setData("text/html", html);
8339
8252
  if (isCut) {
8340
8253
  deleteRange({
8341
8254
  range,
@@ -8350,27 +8263,26 @@ class Clipboard extends Module {
8350
8263
  return urlList.split(/\r?\n/).filter((url) => url[0] !== "#").join("\n");
8351
8264
  }
8352
8265
  onCapturePaste(e) {
8353
- var _a, _b, _c, _d, _e;
8354
8266
  if (e.defaultPrevented || !this.quill.isEnabled()) return;
8355
8267
  e.preventDefault();
8356
8268
  const range = this.quill.getSelection(true);
8357
8269
  if (range == null) return;
8358
- const html = (_a = e.clipboardData) == null ? void 0 : _a.getData("text/html");
8359
- let text = (_b = e.clipboardData) == null ? void 0 : _b.getData("text/plain");
8270
+ const html = e.clipboardData?.getData("text/html");
8271
+ let text = e.clipboardData?.getData("text/plain");
8360
8272
  if (!html && !text) {
8361
- const urlList = (_c = e.clipboardData) == null ? void 0 : _c.getData("text/uri-list");
8273
+ const urlList = e.clipboardData?.getData("text/uri-list");
8362
8274
  if (urlList) {
8363
8275
  text = this.normalizeURIList(urlList);
8364
8276
  }
8365
8277
  }
8366
- const files = Array.from(((_d = e.clipboardData) == null ? void 0 : _d.files) || []);
8278
+ const files = Array.from(e.clipboardData?.files || []);
8367
8279
  if (!html && files.length > 0) {
8368
8280
  this.quill.uploader.upload(range, files);
8369
8281
  return;
8370
8282
  }
8371
8283
  if (html && files.length > 0) {
8372
8284
  const doc = new DOMParser().parseFromString(html, "text/html");
8373
- if (doc.body.childElementCount === 1 && ((_e = doc.body.firstElementChild) == null ? void 0 : _e.tagName) === "IMG") {
8285
+ if (doc.body.childElementCount === 1 && doc.body.firstElementChild?.tagName === "IMG") {
8374
8286
  this.quill.uploader.upload(range, files);
8375
8287
  return;
8376
8288
  }
@@ -8423,7 +8335,7 @@ class Clipboard extends Module {
8423
8335
  Array.from(container.querySelectorAll(selector)).forEach((node) => {
8424
8336
  if (nodeMatches.has(node)) {
8425
8337
  const matches = nodeMatches.get(node);
8426
- matches == null ? void 0 : matches.push(matcher);
8338
+ matches?.push(matcher);
8427
8339
  } else {
8428
8340
  nodeMatches.set(node, [matcher]);
8429
8341
  }
@@ -8434,9 +8346,6 @@ class Clipboard extends Module {
8434
8346
  return [elementMatchers, textMatchers];
8435
8347
  }
8436
8348
  }
8437
- __publicField(Clipboard, "DEFAULTS", {
8438
- matchers: []
8439
- });
8440
8349
  function applyFormat(delta, format, value, scroll) {
8441
8350
  if (!scroll.query(format)) {
8442
8351
  return delta;
@@ -8629,7 +8538,6 @@ function matchNewline(node, delta, scroll) {
8629
8538
  return delta;
8630
8539
  }
8631
8540
  function matchStyles(node, delta, scroll) {
8632
- var _a;
8633
8541
  const formats = {};
8634
8542
  const style = node.style || {};
8635
8543
  if (style.fontStyle === "italic") {
@@ -8641,7 +8549,7 @@ function matchStyles(node, delta, scroll) {
8641
8549
  if (style.textDecoration === "line-through") {
8642
8550
  formats.strike = true;
8643
8551
  }
8644
- if (((_a = style.fontWeight) == null ? void 0 : _a.startsWith("bold")) || // @ts-expect-error Fix me later
8552
+ if (style.fontWeight?.startsWith("bold") || // @ts-expect-error Fix me later
8645
8553
  parseInt(style.fontWeight, 10) >= 700) {
8646
8554
  formats.bold = true;
8647
8555
  }
@@ -8655,8 +8563,7 @@ function matchStyles(node, delta, scroll) {
8655
8563
  return delta;
8656
8564
  }
8657
8565
  function matchTable(node, delta, scroll) {
8658
- var _a, _b;
8659
- const table = ((_a = node.parentElement) == null ? void 0 : _a.tagName) === "TABLE" ? node.parentElement : (_b = node.parentElement) == null ? void 0 : _b.parentElement;
8566
+ const table = node.parentElement?.tagName === "TABLE" ? node.parentElement : node.parentElement?.parentElement;
8660
8567
  if (table != null) {
8661
8568
  const rows = Array.from(table.querySelectorAll("tr"));
8662
8569
  const row = rows.indexOf(node) + 1;
@@ -8665,9 +8572,8 @@ function matchTable(node, delta, scroll) {
8665
8572
  return delta;
8666
8573
  }
8667
8574
  function matchText(node, delta, scroll) {
8668
- var _a;
8669
8575
  let text = node.data;
8670
- if (((_a = node.parentElement) == null ? void 0 : _a.tagName) === "O:P") {
8576
+ if (node.parentElement?.tagName === "O:P") {
8671
8577
  return delta.insert(text.trim());
8672
8578
  }
8673
8579
  if (!isPre(node)) {
@@ -8687,15 +8593,20 @@ function matchText(node, delta, scroll) {
8687
8593
  return delta.insert(text);
8688
8594
  }
8689
8595
  class History extends Module {
8596
+ static DEFAULTS = {
8597
+ delay: 1e3,
8598
+ maxStack: 100,
8599
+ userOnly: false
8600
+ };
8601
+ lastRecorded = 0;
8602
+ ignoreChange = false;
8603
+ stack = {
8604
+ undo: [],
8605
+ redo: []
8606
+ };
8607
+ currentRange = null;
8690
8608
  constructor(quill, options) {
8691
8609
  super(quill, options);
8692
- __publicField(this, "lastRecorded", 0);
8693
- __publicField(this, "ignoreChange", false);
8694
- __publicField(this, "stack", {
8695
- undo: [],
8696
- redo: []
8697
- });
8698
- __publicField(this, "currentRange", null);
8699
8610
  this.quill.on(Quill.events.EDITOR_CHANGE, (eventName, value, oldValue, source) => {
8700
8611
  if (eventName === Quill.events.SELECTION_CHANGE) {
8701
8612
  if (value && source !== Quill.sources.SILENT) {
@@ -8808,11 +8719,6 @@ class History extends Module {
8808
8719
  }
8809
8720
  }
8810
8721
  }
8811
- __publicField(History, "DEFAULTS", {
8812
- delay: 1e3,
8813
- maxStack: 100,
8814
- userOnly: false
8815
- });
8816
8722
  function transformStack(stack, delta) {
8817
8723
  let remoteDelta = delta;
8818
8724
  for (let i = stack.length - 1; i >= 0; i -= 1) {
@@ -8863,7 +8769,6 @@ class Uploader extends Module {
8863
8769
  constructor(quill, options) {
8864
8770
  super(quill, options);
8865
8771
  quill.root.addEventListener("drop", (e) => {
8866
- var _a;
8867
8772
  e.preventDefault();
8868
8773
  let native = null;
8869
8774
  if (document.caretRangeFromPoint) {
@@ -8877,7 +8782,7 @@ class Uploader extends Module {
8877
8782
  const normalized = native && quill.selection.normalizeNative(native);
8878
8783
  if (normalized) {
8879
8784
  const range = quill.selection.normalizedToRange(normalized);
8880
- if ((_a = e.dataTransfer) == null ? void 0 : _a.files) {
8785
+ if (e.dataTransfer?.files) {
8881
8786
  this.upload(range, e.dataTransfer.files);
8882
8787
  }
8883
8788
  }
@@ -8886,8 +8791,7 @@ class Uploader extends Module {
8886
8791
  upload(range, files) {
8887
8792
  const uploads = [];
8888
8793
  Array.from(files).forEach((file) => {
8889
- var _a;
8890
- if (file && ((_a = this.options.mimetypes) == null ? void 0 : _a.includes(file.type))) {
8794
+ if (file && this.options.mimetypes?.includes(file.type)) {
8891
8795
  uploads.push(file);
8892
8796
  }
8893
8797
  });
@@ -8980,11 +8884,10 @@ class Input extends Module {
8980
8884
  }
8981
8885
  }
8982
8886
  function getPlainTextFromInputEvent(event) {
8983
- var _a;
8984
8887
  if (typeof event.data === "string") {
8985
8888
  return event.data;
8986
8889
  }
8987
- if ((_a = event.dataTransfer) == null ? void 0 : _a.types.includes("text/plain")) {
8890
+ if (event.dataTransfer?.types.includes("text/plain")) {
8988
8891
  return event.dataTransfer.getData("text/plain");
8989
8892
  }
8990
8893
  return null;
@@ -9002,10 +8905,10 @@ const canMoveCaretBeforeUINode = (event) => {
9002
8905
  return false;
9003
8906
  };
9004
8907
  class UINode extends Module {
8908
+ isListening = false;
8909
+ selectionChangeDeadline = 0;
9005
8910
  constructor(quill, options) {
9006
8911
  super(quill, options);
9007
- __publicField(this, "isListening", false);
9008
- __publicField(this, "selectionChangeDeadline", 0);
9009
8912
  this.handleArrowKeys();
9010
8913
  this.handleNavigationShortcuts();
9011
8914
  }
@@ -9117,16 +9020,16 @@ const IndentClass = new IndentAttributor("indent", "ql-indent", {
9117
9020
  whitelist: [1, 2, 3, 4, 5, 6, 7, 8]
9118
9021
  });
9119
9022
  class Blockquote extends Block {
9023
+ static blotName = "blockquote";
9024
+ static tagName = "blockquote";
9120
9025
  }
9121
- __publicField(Blockquote, "blotName", "blockquote");
9122
- __publicField(Blockquote, "tagName", "blockquote");
9123
9026
  class Header extends Block {
9027
+ static blotName = "header";
9028
+ static tagName = ["H1", "H2", "H3", "H4", "H5", "H6"];
9124
9029
  static formats(domNode) {
9125
9030
  return this.tagName.indexOf(domNode.tagName) + 1;
9126
9031
  }
9127
9032
  }
9128
- __publicField(Header, "blotName", "header");
9129
- __publicField(Header, "tagName", ["H1", "H2", "H3", "H4", "H5", "H6"]);
9130
9033
  class ListContainer extends Container {
9131
9034
  }
9132
9035
  ListContainer.blotName = "list-container";
@@ -9174,6 +9077,8 @@ ListItem.tagName = "LI";
9174
9077
  ListContainer.allowedChildren = [ListItem];
9175
9078
  ListItem.requiredContainer = ListContainer;
9176
9079
  class Bold extends Inline {
9080
+ static blotName = "bold";
9081
+ static tagName = ["STRONG", "B"];
9177
9082
  static create() {
9178
9083
  return super.create();
9179
9084
  }
@@ -9187,13 +9092,15 @@ class Bold extends Inline {
9187
9092
  }
9188
9093
  }
9189
9094
  }
9190
- __publicField(Bold, "blotName", "bold");
9191
- __publicField(Bold, "tagName", ["STRONG", "B"]);
9192
9095
  class Italic extends Bold {
9096
+ static blotName = "italic";
9097
+ static tagName = ["EM", "I"];
9193
9098
  }
9194
- __publicField(Italic, "blotName", "italic");
9195
- __publicField(Italic, "tagName", ["EM", "I"]);
9196
9099
  class Link extends Inline {
9100
+ static blotName = "link";
9101
+ static tagName = "A";
9102
+ static SANITIZED_URL = "about:blank";
9103
+ static PROTOCOL_WHITELIST = ["http", "https", "mailto", "tel", "sms"];
9197
9104
  static create(value) {
9198
9105
  const node = super.create(value);
9199
9106
  node.setAttribute("href", this.sanitize(value));
@@ -9215,10 +9122,6 @@ class Link extends Inline {
9215
9122
  }
9216
9123
  }
9217
9124
  }
9218
- __publicField(Link, "blotName", "link");
9219
- __publicField(Link, "tagName", "A");
9220
- __publicField(Link, "SANITIZED_URL", "about:blank");
9221
- __publicField(Link, "PROTOCOL_WHITELIST", ["http", "https", "mailto", "tel", "sms"]);
9222
9125
  function sanitize(url, protocols) {
9223
9126
  const anchor = document.createElement("a");
9224
9127
  anchor.href = url;
@@ -9226,6 +9129,8 @@ function sanitize(url, protocols) {
9226
9129
  return protocols.indexOf(protocol) > -1;
9227
9130
  }
9228
9131
  class Script extends Inline {
9132
+ static blotName = "script";
9133
+ static tagName = ["SUB", "SUP"];
9229
9134
  static create(value) {
9230
9135
  if (value === "super") {
9231
9136
  return document.createElement("sup");
@@ -9241,17 +9146,18 @@ class Script extends Inline {
9241
9146
  return void 0;
9242
9147
  }
9243
9148
  }
9244
- __publicField(Script, "blotName", "script");
9245
- __publicField(Script, "tagName", ["SUB", "SUP"]);
9246
9149
  class Strike extends Bold {
9150
+ static blotName = "strike";
9151
+ static tagName = ["S", "STRIKE"];
9247
9152
  }
9248
- __publicField(Strike, "blotName", "strike");
9249
- __publicField(Strike, "tagName", ["S", "STRIKE"]);
9250
9153
  class Underline extends Inline {
9154
+ static blotName = "underline";
9155
+ static tagName = "U";
9251
9156
  }
9252
- __publicField(Underline, "blotName", "underline");
9253
- __publicField(Underline, "tagName", "U");
9254
9157
  class Formula extends Embed {
9158
+ static blotName = "formula";
9159
+ static className = "ql-formula";
9160
+ static tagName = "SPAN";
9255
9161
  static create(value) {
9256
9162
  if (window.katex == null) {
9257
9163
  throw new Error("Formula module requires KaTeX.");
@@ -9276,11 +9182,10 @@ class Formula extends Embed {
9276
9182
  return `<span>${formula}</span>`;
9277
9183
  }
9278
9184
  }
9279
- __publicField(Formula, "blotName", "formula");
9280
- __publicField(Formula, "className", "ql-formula");
9281
- __publicField(Formula, "tagName", "SPAN");
9282
9185
  const ATTRIBUTES$1 = ["alt", "height", "width"];
9283
9186
  class Image extends EmbedBlot$1 {
9187
+ static blotName = "image";
9188
+ static tagName = "IMG";
9284
9189
  static create(value) {
9285
9190
  const node = super.create(value);
9286
9191
  if (typeof value === "string") {
@@ -9317,10 +9222,11 @@ class Image extends EmbedBlot$1 {
9317
9222
  }
9318
9223
  }
9319
9224
  }
9320
- __publicField(Image, "blotName", "image");
9321
- __publicField(Image, "tagName", "IMG");
9322
9225
  const ATTRIBUTES = ["height", "width"];
9323
9226
  class Video extends BlockEmbed {
9227
+ static blotName = "video";
9228
+ static className = "ql-video";
9229
+ static tagName = "IFRAME";
9324
9230
  static create(value) {
9325
9231
  const node = super.create(value);
9326
9232
  node.setAttribute("frameborder", "0");
@@ -9360,9 +9266,6 @@ class Video extends BlockEmbed {
9360
9266
  return `<a href="${video}">${video}</a>`;
9361
9267
  }
9362
9268
  }
9363
- __publicField(Video, "blotName", "video");
9364
- __publicField(Video, "className", "ql-video");
9365
- __publicField(Video, "tagName", "IFRAME");
9366
9269
  const TokenAttributor = new ClassAttributor$1("code-token", "hljs", {
9367
9270
  scope: Scope.INLINE
9368
9271
  });
@@ -9668,7 +9571,9 @@ Syntax.DEFAULTS = {
9668
9571
  label: "SQL"
9669
9572
  }]
9670
9573
  };
9671
- const _TableCell = class _TableCell extends Block {
9574
+ class TableCell extends Block {
9575
+ static blotName = "table";
9576
+ static tagName = "TD";
9672
9577
  static create(value) {
9673
9578
  const node = super.create();
9674
9579
  if (value) {
@@ -9691,7 +9596,7 @@ const _TableCell = class _TableCell extends Block {
9691
9596
  return -1;
9692
9597
  }
9693
9598
  format(name2, value) {
9694
- if (name2 === _TableCell.blotName && value) {
9599
+ if (name2 === TableCell.blotName && value) {
9695
9600
  this.domNode.setAttribute("data-row", value);
9696
9601
  } else {
9697
9602
  super.format(name2, value);
@@ -9709,11 +9614,10 @@ const _TableCell = class _TableCell extends Block {
9709
9614
  table() {
9710
9615
  return this.row() && this.row().table();
9711
9616
  }
9712
- };
9713
- __publicField(_TableCell, "blotName", "table");
9714
- __publicField(_TableCell, "tagName", "TD");
9715
- let TableCell = _TableCell;
9617
+ }
9716
9618
  class TableRow extends Container {
9619
+ static blotName = "table-row";
9620
+ static tagName = "TR";
9717
9621
  checkMerge() {
9718
9622
  if (super.checkMerge() && this.next.children.head != null) {
9719
9623
  const thisHead = this.children.head.formats();
@@ -9751,13 +9655,13 @@ class TableRow extends Container {
9751
9655
  return this.parent && this.parent.parent;
9752
9656
  }
9753
9657
  }
9754
- __publicField(TableRow, "blotName", "table-row");
9755
- __publicField(TableRow, "tagName", "TR");
9756
9658
  class TableBody extends Container {
9659
+ static blotName = "table-body";
9660
+ static tagName = "TBODY";
9757
9661
  }
9758
- __publicField(TableBody, "blotName", "table-body");
9759
- __publicField(TableBody, "tagName", "TBODY");
9760
9662
  class TableContainer extends Container {
9663
+ static blotName = "table-container";
9664
+ static tagName = "TABLE";
9761
9665
  balanceCells() {
9762
9666
  const rows = this.descendants(TableRow);
9763
9667
  const maxColumns = rows.reduce((max2, row) => {
@@ -9816,8 +9720,6 @@ class TableContainer extends Container {
9816
9720
  return body.children.map((row) => row);
9817
9721
  }
9818
9722
  }
9819
- __publicField(TableContainer, "blotName", "table-container");
9820
- __publicField(TableContainer, "tagName", "TABLE");
9821
9723
  TableContainer.allowedChildren = [TableBody];
9822
9724
  TableBody.requiredContainer = TableContainer;
9823
9725
  TableBody.allowedChildren = [TableRow];
@@ -9946,13 +9848,12 @@ class Table extends Module {
9946
9848
  const debug = namespace("quill:toolbar");
9947
9849
  class Toolbar extends Module {
9948
9850
  constructor(quill, options) {
9949
- var _a, _b;
9950
9851
  super(quill, options);
9951
9852
  if (Array.isArray(this.options.container)) {
9952
9853
  const container = document.createElement("div");
9953
9854
  container.setAttribute("role", "toolbar");
9954
9855
  addControls(container, this.options.container);
9955
- (_b = (_a = quill.container) == null ? void 0 : _a.parentNode) == null ? void 0 : _b.insertBefore(container, quill.container);
9856
+ quill.container?.parentNode?.insertBefore(container, quill.container);
9956
9857
  this.container = container;
9957
9858
  } else if (typeof this.options.container === "string") {
9958
9859
  this.container = document.querySelector(this.options.container);
@@ -9968,8 +9869,7 @@ class Toolbar extends Module {
9968
9869
  this.handlers = {};
9969
9870
  if (this.options.handlers) {
9970
9871
  Object.keys(this.options.handlers).forEach((format) => {
9971
- var _a2;
9972
- const handler = (_a2 = this.options.handlers) == null ? void 0 : _a2[format];
9872
+ const handler = this.options.handlers?.[format];
9973
9873
  if (handler) {
9974
9874
  this.addHandler(format, handler);
9975
9875
  }
@@ -10755,6 +10655,7 @@ const TOOLBAR_CONFIG$1 = [["bold", "italic", "link"], [{
10755
10655
  header: 2
10756
10656
  }, "blockquote"]];
10757
10657
  class BubbleTooltip extends BaseTooltip {
10658
+ static TEMPLATE = ['<span class="ql-tooltip-arrow"></span>', '<div class="ql-tooltip-editor">', '<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">', '<a class="ql-close"></a>', "</div>"].join("");
10758
10659
  constructor(quill, bounds) {
10759
10660
  super(quill, bounds);
10760
10661
  this.quill.on(Emitter.events.EDITOR_CHANGE, (type2, range, oldRange, source) => {
@@ -10815,7 +10716,6 @@ class BubbleTooltip extends BaseTooltip {
10815
10716
  return shift;
10816
10717
  }
10817
10718
  }
10818
- __publicField(BubbleTooltip, "TEMPLATE", ['<span class="ql-tooltip-arrow"></span>', '<div class="ql-tooltip-editor">', '<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">', '<a class="ql-close"></a>', "</div>"].join(""));
10819
10719
  class BubbleTheme extends BaseTheme {
10820
10720
  constructor(quill, options) {
10821
10721
  if (options.modules.toolbar != null && options.modules.toolbar.container == null) {
@@ -10856,10 +10756,8 @@ const TOOLBAR_CONFIG = [[{
10856
10756
  list: "bullet"
10857
10757
  }], ["clean"]];
10858
10758
  class SnowTooltip extends BaseTooltip {
10859
- constructor() {
10860
- super(...arguments);
10861
- __publicField(this, "preview", this.root.querySelector("a.ql-preview"));
10862
- }
10759
+ static TEMPLATE = ['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>', '<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">', '<a class="ql-action"></a>', '<a class="ql-remove"></a>'].join("");
10760
+ preview = this.root.querySelector("a.ql-preview");
10863
10761
  listen() {
10864
10762
  super.listen();
10865
10763
  this.root.querySelector("a.ql-action").addEventListener("click", (event) => {
@@ -10907,7 +10805,6 @@ class SnowTooltip extends BaseTooltip {
10907
10805
  this.root.removeAttribute("data-mode");
10908
10806
  }
10909
10807
  }
10910
- __publicField(SnowTooltip, "TEMPLATE", ['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>', '<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">', '<a class="ql-action"></a>', '<a class="ql-remove"></a>'].join(""));
10911
10808
  class SnowTheme extends BaseTheme {
10912
10809
  constructor(quill, options) {
10913
10810
  if (options.modules.toolbar != null && options.modules.toolbar.container == null) {
@@ -13739,10 +13636,10 @@ function getMdiIcon(name2, value = "") {
13739
13636
  }
13740
13637
  const className = (...names) => names.join(" ");
13741
13638
  class ExtendedColorPicker extends ColorPicker {
13639
+ quill;
13640
+ type;
13742
13641
  constructor(quill, options) {
13743
13642
  super(options.select, options.label);
13744
- __publicField(this, "quill");
13745
- __publicField(this, "type");
13746
13643
  this.quill = quill;
13747
13644
  this.type = options.type;
13748
13645
  }
@@ -13779,9 +13676,9 @@ function createIcon(name2) {
13779
13676
  return icon;
13780
13677
  }
13781
13678
  class ExtendedTooltip extends Tooltip {
13679
+ isOpen;
13782
13680
  constructor(quill, bounds) {
13783
13681
  super(quill, bounds);
13784
- __publicField(this, "isOpen");
13785
13682
  this._onClick = this._onClick.bind(this);
13786
13683
  this.isOpen = false;
13787
13684
  }
@@ -13806,20 +13703,26 @@ class ExtendedTooltip extends Tooltip {
13806
13703
  }
13807
13704
  }
13808
13705
  class ImageEmbedTooltip extends ExtendedTooltip {
13706
+ static TEMPLATE = `
13707
+ <div class="controls">
13708
+ <label>Enter image url:</label>
13709
+ <input class="url" type="text">
13710
+ <a class="action">Save</a>
13711
+ </div>
13712
+ `;
13713
+ padding;
13714
+ textbox;
13715
+ btnAction;
13809
13716
  constructor(quill, bounds, { spacing = 0 } = {}) {
13810
13717
  super(quill, bounds);
13811
- __publicField(this, "padding");
13812
- __publicField(this, "textbox");
13813
- __publicField(this, "btnAction");
13814
13718
  this.padding = " ".repeat(spacing);
13815
13719
  this.textbox = this.root.querySelector("input.url");
13816
13720
  this.btnAction = this.root.querySelector("a.action");
13817
13721
  this.listen();
13818
13722
  }
13819
13723
  listen() {
13820
- var _a, _b;
13821
- (_a = this.btnAction) == null ? void 0 : _a.addEventListener("click", () => this.embedImage());
13822
- (_b = this.textbox) == null ? void 0 : _b.addEventListener("keydown", (e) => {
13724
+ this.btnAction?.addEventListener("click", () => this.embedImage());
13725
+ this.textbox?.addEventListener("keydown", (e) => {
13823
13726
  if (Keyboard.match(e, { key: "enter" })) {
13824
13727
  this.embedImage();
13825
13728
  e.preventDefault();
@@ -13830,14 +13733,12 @@ class ImageEmbedTooltip extends ExtendedTooltip {
13830
13733
  });
13831
13734
  }
13832
13735
  show() {
13833
- var _a;
13834
13736
  super.show();
13835
13737
  this.root.classList.add("ql-image-embed");
13836
- (_a = this.textbox) == null ? void 0 : _a.select();
13738
+ this.textbox?.select();
13837
13739
  }
13838
13740
  embedImage() {
13839
- var _a;
13840
- const url = (_a = this.textbox) == null ? void 0 : _a.value;
13741
+ const url = this.textbox?.value;
13841
13742
  if (!url) return;
13842
13743
  const { quill } = this;
13843
13744
  const range = quill.getSelection(true);
@@ -13857,14 +13758,8 @@ class ImageEmbedTooltip extends ExtendedTooltip {
13857
13758
  this.hide();
13858
13759
  }
13859
13760
  }
13860
- __publicField(ImageEmbedTooltip, "TEMPLATE", `
13861
- <div class="controls">
13862
- <label>Enter image url:</label>
13863
- <input class="url" type="text">
13864
- <a class="action">Save</a>
13865
- </div>
13866
- `);
13867
13761
  class ImageEmbed extends Module {
13762
+ static NAME = "imageEmbed";
13868
13763
  constructor(quill, options = {}) {
13869
13764
  super(quill, options);
13870
13765
  const { bounds } = quill.options;
@@ -13873,7 +13768,6 @@ class ImageEmbed extends Module {
13873
13768
  toolbar.handlers.image = () => tooltip.show();
13874
13769
  }
13875
13770
  }
13876
- __publicField(ImageEmbed, "NAME", "imageEmbed");
13877
13771
  const colors = [
13878
13772
  "#000000",
13879
13773
  "#e60000",
@@ -13928,10 +13822,16 @@ const createTooltip = (input, showDelay = 350) => {
13928
13822
  });
13929
13823
  };
13930
13824
  const createCustomTheme = () => {
13931
- var _a;
13932
13825
  Quill.register(`modules/${ImageEmbed.NAME}`, ImageEmbed, true);
13933
13826
  const { toolbar } = SnowTheme.DEFAULTS.modules;
13934
- return _a = class extends SnowTheme {
13827
+ return class TailorTheme extends SnowTheme {
13828
+ static NAME = "tailor";
13829
+ static DEFAULTS = {
13830
+ modules: {
13831
+ toolbar,
13832
+ [ImageEmbed.NAME]: true
13833
+ }
13834
+ };
13935
13835
  extendToolbar(toolbar2) {
13936
13836
  super.extendToolbar(toolbar2);
13937
13837
  this.pickers.forEach((picker) => createTooltip(picker));
@@ -13985,12 +13885,7 @@ const createCustomTheme = () => {
13985
13885
  this.pickers.push(new IconPicker(align, icons2));
13986
13886
  }
13987
13887
  }
13988
- }, __publicField(_a, "NAME", "tailor"), __publicField(_a, "DEFAULTS", {
13989
- modules: {
13990
- toolbar,
13991
- [ImageEmbed.NAME]: true
13992
- }
13993
- }), _a;
13888
+ };
13994
13889
  };
13995
13890
  function buildButton(button) {
13996
13891
  let name2 = Array.from(button.classList).find(
@@ -14044,10 +13939,10 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
14044
13939
  container: "#quillToolbar",
14045
13940
  handlers: {
14046
13941
  redo() {
14047
- quill == null ? void 0 : quill.history.redo();
13942
+ quill?.history.redo();
14048
13943
  },
14049
13944
  undo() {
14050
- quill == null ? void 0 : quill.history.undo();
13945
+ quill?.history.undo();
14051
13946
  }
14052
13947
  }
14053
13948
  }
@@ -14062,8 +13957,7 @@ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
14062
13957
  }
14063
13958
  };
14064
13959
  vue.onMounted(() => {
14065
- var _a;
14066
- quill = ((_a = editor.value) == null ? void 0 : _a.initialize(Quill)) ?? null;
13960
+ quill = editor.value?.initialize(Quill) ?? null;
14067
13961
  });
14068
13962
  return (_ctx, _cache) => {
14069
13963
  return vue.openBlock(), vue.createBlock(vue.unref(y), {
@@ -14091,10 +13985,9 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
14091
13985
  __name: "Edit",
14092
13986
  props: {
14093
13987
  element: {},
14094
- isFocused: { type: Boolean, default: false },
14095
- isDisabled: { type: Boolean, default: false },
14096
13988
  isDragged: { type: Boolean, default: false },
14097
- showPlaceholder: { type: Boolean, default: true }
13989
+ isFocused: { type: Boolean, default: false },
13990
+ isReadonly: { type: Boolean, default: false }
14098
13991
  },
14099
13992
  emits: ["save"],
14100
13993
  setup(__props, { emit: __emit }) {
@@ -14103,8 +13996,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
14103
13996
  const content = vue.ref(props.element.data.content ?? "");
14104
13997
  const isEmpty = vue.computed(() => !content.value.replace(/<[^>]*>/g, ""));
14105
13998
  const hasChanges = vue.computed(() => {
14106
- var _a, _b;
14107
- const previousValue = ((_b = (_a = props.element) == null ? void 0 : _a.data) == null ? void 0 : _b.content) ?? "";
13999
+ const previousValue = props.element?.data?.content ?? "";
14108
14000
  return previousValue !== content.value;
14109
14001
  });
14110
14002
  const save = () => {
@@ -14118,7 +14010,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
14118
14010
  );
14119
14011
  vue.watch(
14120
14012
  content,
14121
- debounce$3(() => save(), 4e3)
14013
+ debounce$2(() => save(), 4e3)
14122
14014
  );
14123
14015
  return (_ctx, _cache) => {
14124
14016
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
@@ -14144,7 +14036,7 @@ const _export_sfc = (sfc, props) => {
14144
14036
  }
14145
14037
  return target;
14146
14038
  };
14147
- const Edit = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-48178d4c"]]);
14039
+ const Edit = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-2683bfaf"]]);
14148
14040
  const _sfc_main = {};
14149
14041
  const _hoisted_1 = { class: "tce-html-toolbar" };
14150
14042
  function _sfc_render(_ctx, _cache) {