@zipify/wysiwyg 4.1.0 → 4.2.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.
Files changed (204) hide show
  1. package/.editorconfig +1 -1
  2. package/.eslintignore +1 -0
  3. package/.eslintrc.js +63 -4
  4. package/.github/actions/lint-css/action.yaml +2 -2
  5. package/.github/actions/lint-js/action.yaml +7 -7
  6. package/.github/actions/setup/action.yaml +6 -12
  7. package/.github/actions/unit-tests/action.yaml +2 -2
  8. package/.github/dependabot.yaml +12 -12
  9. package/.github/workflows/frontend-ci.yaml +58 -56
  10. package/config/build/cli.config.js +15 -12
  11. package/config/build/{example.config.mjs → example.config.ts} +4 -11
  12. package/config/build/{lib.config.mjs → lib.config.ts} +9 -14
  13. package/config/build/settings.js +9 -3
  14. package/dist/cli.js +17 -2
  15. package/dist/types/Wysiwyg.vue.d.ts +176 -0
  16. package/dist/types/components/base/Button.vue.d.ts +19 -0
  17. package/dist/types/components/base/ButtonToggle.vue.d.ts +19 -0
  18. package/dist/types/components/base/Checkbox.vue.d.ts +10 -0
  19. package/dist/types/components/base/FieldLabel.vue.d.ts +12 -0
  20. package/dist/types/components/base/Icon.vue.d.ts +11 -0
  21. package/dist/types/components/base/Modal.vue.d.ts +28 -0
  22. package/dist/types/components/base/ModalFloating.vue.d.ts +20 -0
  23. package/dist/types/components/base/NumberField.vue.d.ts +22 -0
  24. package/dist/types/components/base/Range.vue.d.ts +16 -0
  25. package/dist/types/components/base/ScrollView.vue.d.ts +7 -0
  26. package/dist/types/components/base/TextField.vue.d.ts +14 -0
  27. package/dist/types/components/base/colorPicker/ColorPicker.vue.d.ts +18 -0
  28. package/dist/types/components/base/colorPicker/composables/index.d.ts +2 -0
  29. package/dist/types/components/base/colorPicker/composables/usePickerApi.d.ts +14 -0
  30. package/dist/types/components/base/colorPicker/composables/usePickerHotkeys.d.ts +5 -0
  31. package/dist/types/components/base/colorPicker/index.d.ts +1 -0
  32. package/dist/types/components/base/composables/index.d.ts +8 -0
  33. package/dist/types/components/base/composables/useActivatedListener.d.ts +7 -0
  34. package/dist/types/components/base/composables/useDeselectionLock.d.ts +4 -0
  35. package/dist/types/components/base/composables/useElementRef.d.ts +1 -0
  36. package/dist/types/components/base/composables/useModalToggler.d.ts +9 -0
  37. package/dist/types/components/base/composables/useNumberValue.d.ts +12 -0
  38. package/dist/types/components/base/composables/useScrollView.d.ts +6 -0
  39. package/dist/types/components/base/composables/useTempValue.d.ts +4 -0
  40. package/dist/types/components/base/composables/useValidator.d.ts +7 -0
  41. package/dist/types/components/base/dropdown/Dropdown.vue.d.ts +22 -0
  42. package/dist/types/components/base/dropdown/DropdownActivator.vue.d.ts +17 -0
  43. package/dist/types/components/base/dropdown/DropdownDivider.vue.d.ts +2 -0
  44. package/dist/types/components/base/dropdown/DropdownGroup.vue.d.ts +14 -0
  45. package/dist/types/components/base/dropdown/DropdownMenu.vue.d.ts +14 -0
  46. package/dist/types/components/base/dropdown/DropdownOption.vue.d.ts +12 -0
  47. package/dist/types/components/base/dropdown/composables/index.d.ts +2 -0
  48. package/dist/types/components/base/dropdown/composables/useActiveOptionManager.d.ts +11 -0
  49. package/dist/types/components/base/dropdown/composables/useDropdownEntityTitle.d.ts +1 -0
  50. package/dist/types/components/base/dropdown/index.d.ts +1 -0
  51. package/dist/types/components/base/dropdown/injectionTokens.d.ts +5 -0
  52. package/dist/types/components/base/index.d.ts +3 -0
  53. package/dist/types/components/index.d.ts +1 -0
  54. package/dist/types/components/toolbar/Toolbar.vue.d.ts +17 -0
  55. package/dist/types/components/toolbar/ToolbarFloating.vue.d.ts +14 -0
  56. package/dist/types/components/toolbar/base/ToolbarDivider.vue.d.ts +32 -0
  57. package/dist/types/components/toolbar/base/ToolbarGroup.vue.d.ts +2 -0
  58. package/dist/types/components/toolbar/base/ToolbarRow.vue.d.ts +2 -0
  59. package/dist/types/components/toolbar/base/index.d.ts +1 -0
  60. package/dist/types/components/toolbar/controls/AlignmentControl.vue.d.ts +4 -0
  61. package/dist/types/components/toolbar/controls/BackgroundColorControl.vue.d.ts +2 -0
  62. package/dist/types/components/toolbar/controls/CaseStyleControl.vue.d.ts +2 -0
  63. package/dist/types/components/toolbar/controls/FontColorControl.vue.d.ts +2 -0
  64. package/dist/types/components/toolbar/controls/FontFamilyControl.vue.d.ts +2 -0
  65. package/dist/types/components/toolbar/controls/FontSizeControl.vue.d.ts +2 -0
  66. package/dist/types/components/toolbar/controls/FontWeightControl.vue.d.ts +2 -0
  67. package/dist/types/components/toolbar/controls/ItalicControl.vue.d.ts +2 -0
  68. package/dist/types/components/toolbar/controls/LineHeightControl.vue.d.ts +2 -0
  69. package/dist/types/components/toolbar/controls/ListControl.vue.d.ts +2 -0
  70. package/dist/types/components/toolbar/controls/RemoveFormatControl.vue.d.ts +2 -0
  71. package/dist/types/components/toolbar/controls/StrikeThroughControl.vue.d.ts +2 -0
  72. package/dist/types/components/toolbar/controls/SuperscriptControl.vue.d.ts +2 -0
  73. package/dist/types/components/toolbar/controls/UnderlineControl.vue.d.ts +2 -0
  74. package/dist/types/components/toolbar/controls/composables/index.d.ts +1 -0
  75. package/dist/types/components/toolbar/controls/composables/useRecentFonts.d.ts +7 -0
  76. package/dist/types/components/toolbar/controls/index.d.ts +2 -0
  77. package/dist/types/components/toolbar/controls/link/LinkControl.vue.d.ts +2 -0
  78. package/dist/types/components/toolbar/controls/link/LinkControlHeader.vue.d.ts +4 -0
  79. package/dist/types/components/toolbar/controls/link/composables/index.d.ts +1 -0
  80. package/dist/types/components/toolbar/controls/link/composables/useLink.d.ts +22 -0
  81. package/dist/types/components/toolbar/controls/link/destination/LinkControlDestination.vue.d.ts +10 -0
  82. package/dist/types/components/toolbar/controls/link/destination/LinkControlPageBlock.vue.d.ts +8 -0
  83. package/dist/types/components/toolbar/controls/link/destination/LinkControlUrl.vue.d.ts +12 -0
  84. package/dist/types/components/toolbar/controls/link/destination/index.d.ts +1 -0
  85. package/dist/types/components/toolbar/controls/link/index.d.ts +1 -0
  86. package/dist/types/components/toolbar/controls/stylePreset/StylePresetControl.vue.d.ts +2 -0
  87. package/dist/types/components/toolbar/controls/stylePreset/StylePresetOption.vue.d.ts +22 -0
  88. package/dist/types/components/toolbar/controls/stylePreset/index.d.ts +1 -0
  89. package/dist/types/components/toolbar/index.d.ts +1 -0
  90. package/dist/types/components/toolbar/layouts/ToolbarDesktop.vue.d.ts +7 -0
  91. package/dist/types/components/toolbar/layouts/ToolbarMobile.vue.d.ts +2 -0
  92. package/dist/types/components/toolbar/layouts/ToolbarPopup.vue.d.ts +7 -0
  93. package/dist/types/components/toolbar/layouts/index.d.ts +1 -0
  94. package/dist/types/composables/index.d.ts +2 -0
  95. package/dist/types/composables/useEditor.d.ts +15 -0
  96. package/dist/types/directives/index.d.ts +2 -0
  97. package/dist/types/directives/outClick.d.ts +9 -0
  98. package/dist/types/directives/tooltip.d.ts +4 -0
  99. package/{lib/entryLib.js → dist/types/entryLib.d.ts} +1 -1
  100. package/dist/types/enums/Alignments.d.ts +7 -0
  101. package/dist/types/enums/CaseStyles.d.ts +5 -0
  102. package/dist/types/enums/Devices.d.ts +7 -0
  103. package/dist/types/enums/LinkDestinations.d.ts +4 -0
  104. package/dist/types/enums/LinkTargets.d.ts +4 -0
  105. package/dist/types/enums/ListTypes.d.ts +10 -0
  106. package/dist/types/enums/MarkGroups.d.ts +4 -0
  107. package/dist/types/enums/NodeTypes.d.ts +9 -0
  108. package/dist/types/enums/TextSettings.d.ts +19 -0
  109. package/dist/types/enums/index.d.ts +9 -0
  110. package/dist/types/extensions/Alignment.d.ts +2 -0
  111. package/dist/types/extensions/BackgroundColor.d.ts +2 -0
  112. package/dist/types/extensions/CaseStyle.d.ts +2 -0
  113. package/dist/types/extensions/DeviceManager.d.ts +2 -0
  114. package/dist/types/extensions/FontColor.d.ts +2 -0
  115. package/dist/types/extensions/FontFamily.d.ts +4 -0
  116. package/dist/types/extensions/FontSize.d.ts +5 -0
  117. package/dist/types/extensions/FontStyle.d.ts +2 -0
  118. package/dist/types/extensions/FontWeight.d.ts +2 -0
  119. package/dist/types/extensions/LineHeight.d.ts +2 -0
  120. package/dist/types/extensions/Link.d.ts +1 -0
  121. package/dist/types/extensions/Margin.d.ts +2 -0
  122. package/dist/types/extensions/StylePreset.d.ts +2 -0
  123. package/dist/types/extensions/Superscript.d.ts +2 -0
  124. package/dist/types/extensions/TextDecoration.d.ts +2 -0
  125. package/dist/types/extensions/core/Document.d.ts +1 -0
  126. package/dist/types/extensions/core/Heading.d.ts +6 -0
  127. package/dist/types/extensions/core/NodeProcessor.d.ts +2 -0
  128. package/dist/types/extensions/core/Paragraph.d.ts +5 -0
  129. package/dist/types/extensions/core/SelectionProcessor.d.ts +4 -0
  130. package/dist/types/extensions/core/TextProcessor.d.ts +2 -0
  131. package/dist/types/extensions/core/index.d.ts +2 -0
  132. package/dist/types/extensions/index.d.ts +1 -0
  133. package/dist/types/extensions/list/List.d.ts +5 -0
  134. package/dist/types/extensions/list/ListItem.d.ts +5 -0
  135. package/dist/types/extensions/list/index.d.ts +1 -0
  136. package/dist/types/extensions/proseMirror/PasteLinkPlugin.d.ts +8 -0
  137. package/dist/types/extensions/proseMirror/PastePlugin.d.ts +22 -0
  138. package/dist/types/extensions/proseMirror/PlaceholderPlugin.d.ts +12 -0
  139. package/dist/types/extensions/proseMirror/ProseMirrorPlugin.d.ts +9 -0
  140. package/dist/types/extensions/proseMirror/index.d.ts +3 -0
  141. package/dist/types/extensions/steps/SetDocAttr.d.ts +19 -0
  142. package/dist/types/extensions/steps/index.d.ts +1 -0
  143. package/dist/types/injectionTokens.d.ts +8 -0
  144. package/dist/types/models/Font.d.ts +17 -0
  145. package/dist/types/models/index.d.ts +2 -0
  146. package/dist/types/regExps.d.ts +6 -0
  147. package/dist/types/services/ContentSerializer.d.ts +15 -0
  148. package/dist/types/services/ContextWindow.d.ts +8 -0
  149. package/dist/types/services/FavoriteColors.d.ts +8 -0
  150. package/dist/types/services/HtmlToJsonParser.d.ts +6 -0
  151. package/dist/types/services/JsonSerializer.d.ts +4 -0
  152. package/dist/types/services/NodeFactory.d.ts +128 -0
  153. package/dist/types/services/NodeSelector.d.ts +9 -0
  154. package/dist/types/services/Storage.d.ts +10 -0
  155. package/dist/types/services/StylePresetRenderer.d.ts +15 -0
  156. package/dist/types/services/index.d.ts +10 -0
  157. package/dist/types/services/normalizer/BaseNormalizer.d.ts +7 -0
  158. package/dist/types/services/normalizer/BrowserDomParser.d.ts +5 -0
  159. package/dist/types/services/normalizer/ContentNormalizer.d.ts +8 -0
  160. package/dist/types/services/normalizer/HtmlNormalizer.d.ts +41 -0
  161. package/dist/types/services/normalizer/JsonNormalizer.d.ts +14 -0
  162. package/dist/types/services/normalizer/index.d.ts +1 -0
  163. package/dist/types/utils/capitalize.d.ts +1 -0
  164. package/dist/types/utils/convertAlignment.d.ts +1 -0
  165. package/dist/types/utils/convertColor.d.ts +1 -0
  166. package/dist/types/utils/convertFontSize.d.ts +1 -0
  167. package/dist/types/utils/convertLineHeight.d.ts +1 -0
  168. package/dist/types/utils/copyMark.d.ts +1 -0
  169. package/dist/types/utils/createCommand.d.ts +1 -0
  170. package/dist/types/utils/createKeyboardShortcut.d.ts +3 -0
  171. package/dist/types/utils/findMarkByType.d.ts +1 -0
  172. package/dist/types/utils/importIcon.d.ts +1 -0
  173. package/{lib/utils/index.js → dist/types/utils/index.d.ts} +1 -0
  174. package/dist/types/utils/isMarkAppliedToParent.d.ts +1 -0
  175. package/dist/types/utils/isNodeFullySelected.d.ts +1 -0
  176. package/dist/types/utils/isWysiwygContent.d.ts +7 -0
  177. package/dist/types/utils/renderInlineSetting.d.ts +4 -0
  178. package/dist/types/utils/resolvePositionOffset.d.ts +1 -0
  179. package/dist/types/utils/resolveTextPosition.d.ts +4 -0
  180. package/dist/wysiwyg.d.ts +1 -0
  181. package/dist/wysiwyg.mjs +194 -152
  182. package/example/ExampleApp.vue +1 -1
  183. package/example/{example.js → example.ts} +1 -1
  184. package/example/index.html +1 -1
  185. package/jest.config.js +20 -5
  186. package/lib/Wysiwyg.vue +16 -12
  187. package/lib/components/base/__tests__/Modal.test.js +2 -2
  188. package/lib/composables/index.ts +2 -0
  189. package/lib/composables/{useEditor.js → useEditor.ts} +24 -7
  190. package/lib/entryLib.ts +6 -0
  191. package/lib/extensions/StylePreset.js +3 -3
  192. package/lib/models/{Font.js → Font.ts} +19 -8
  193. package/lib/models/index.ts +2 -0
  194. package/lib/utils/importIcon.js +1 -1
  195. package/lib/utils/index.ts +17 -0
  196. package/lib/utils/isWysiwygContent.ts +18 -0
  197. package/package.json +47 -33
  198. package/tsconfig.json +32 -0
  199. package/tsconfig.types.json +23 -0
  200. package/lib/composables/index.js +0 -1
  201. package/lib/models/index.js +0 -1
  202. package/lib/utils/isWysiwygContent.js +0 -12
  203. /package/lib/{entryCli.js → entryCli.ts} +0 -0
  204. /package/lib/models/__tests__/{Font.test.js → Font.test.ts} +0 -0
package/dist/wysiwyg.mjs CHANGED
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => {
4
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
5
  return value;
6
6
  };
7
- import { defineComponent, ref, onMounted, onBeforeUnmount, h, getCurrentInstance, watchEffect, nextTick, unref, Teleport, reactive, markRaw, customRef, openBlock, createElementBlock, renderSlot, computed, normalizeClass, toRef, watch, Fragment as Fragment$1, renderList, normalizeStyle, inject, onUnmounted, provide, createElementVNode, createVNode, toDisplayString, createCommentVNode, shallowRef, getCurrentScope, onScopeDispose, shallowReadonly, useCssVars, createBlock, Transition, withCtx, withDirectives, pushScopeId, popScopeId, createTextVNode, normalizeProps, guardReactiveProps, withModifiers, resolveComponent, resolveDynamicComponent, KeepAlive } from "vue";
7
+ import { defineComponent, ref, onMounted, onBeforeUnmount, h, getCurrentInstance, watchEffect, nextTick, unref, Teleport, reactive, markRaw, customRef, openBlock, createElementBlock, renderSlot, computed, normalizeClass, toRef, watch, Fragment as Fragment$1, renderList, normalizeStyle, inject, onUnmounted, provide, createElementVNode, createVNode, toDisplayString, createCommentVNode, shallowRef, getCurrentScope, onScopeDispose, shallowReadonly, useCssVars, createBlock, Transition, withCtx, withDirectives, pushScopeId, popScopeId, createTextVNode, normalizeProps, guardReactiveProps, withModifiers, resolveComponent, resolveDynamicComponent, KeepAlive, mergeModels, useModel } from "vue";
8
8
  import { ColorModel, ColorPicker } from "@zipify/colorpicker";
9
9
  function OrderedMap(content) {
10
10
  this.content = content;
@@ -10625,7 +10625,7 @@ var base = {
10625
10625
  221: "]",
10626
10626
  222: "'"
10627
10627
  };
10628
- var shift$1 = {
10628
+ var shift$2 = {
10629
10629
  48: ")",
10630
10630
  49: "!",
10631
10631
  50: "@",
@@ -10661,14 +10661,14 @@ for (var i = 1; i <= 24; i++)
10661
10661
  base[i + 111] = "F" + i;
10662
10662
  for (var i = 65; i <= 90; i++) {
10663
10663
  base[i] = String.fromCharCode(i + 32);
10664
- shift$1[i] = String.fromCharCode(i);
10664
+ shift$2[i] = String.fromCharCode(i);
10665
10665
  }
10666
10666
  for (var code in base)
10667
- if (!shift$1.hasOwnProperty(code))
10668
- shift$1[code] = base[code];
10667
+ if (!shift$2.hasOwnProperty(code))
10668
+ shift$2[code] = base[code];
10669
10669
  function keyName(event) {
10670
10670
  var ignoreKey = brokenModifierNames && (event.ctrlKey || event.altKey || event.metaKey) || ie && event.shiftKey && event.key && event.key.length == 1 || event.key == "Unidentified";
10671
- var name = !ignoreKey && event.key || (event.shiftKey ? shift$1 : base)[event.keyCode] || event.key || "Unidentified";
10671
+ var name = !ignoreKey && event.key || (event.shiftKey ? shift$2 : base)[event.keyCode] || event.key || "Unidentified";
10672
10672
  if (name == "Esc")
10673
10673
  name = "Escape";
10674
10674
  if (name == "Del")
@@ -15473,7 +15473,7 @@ function getExpandedFallbackPlacements(placement) {
15473
15473
  var oppositePlacement = getOppositePlacement$1(placement);
15474
15474
  return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
15475
15475
  }
15476
- function flip$1(_ref) {
15476
+ function flip$2(_ref) {
15477
15477
  var state = _ref.state, options = _ref.options, name = _ref.name;
15478
15478
  if (state.modifiersData[name]._skip) {
15479
15479
  return;
@@ -15560,11 +15560,11 @@ function flip$1(_ref) {
15560
15560
  state.reset = true;
15561
15561
  }
15562
15562
  }
15563
- const flip$2 = {
15563
+ const flip$3 = {
15564
15564
  name: "flip",
15565
15565
  enabled: true,
15566
15566
  phase: "main",
15567
- fn: flip$1,
15567
+ fn: flip$2,
15568
15568
  requiresIfExists: ["offset"],
15569
15569
  data: {
15570
15570
  _skip: false
@@ -16024,7 +16024,7 @@ function popperGenerator(generatorOptions) {
16024
16024
  return instance;
16025
16025
  };
16026
16026
  }
16027
- var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$2, flip$2, preventOverflow$1, arrow$1, hide$1];
16027
+ var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$2, flip$3, preventOverflow$1, arrow$1, hide$1];
16028
16028
  var createPopper = /* @__PURE__ */ popperGenerator({
16029
16029
  defaultModifiers
16030
16030
  });
@@ -20141,20 +20141,20 @@ function stackHas$1(key) {
20141
20141
  return this.__data__.has(key);
20142
20142
  }
20143
20143
  var _stackHas = stackHas$1;
20144
- var freeGlobal$3 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
20145
- var _freeGlobal = freeGlobal$3;
20146
- var freeGlobal$2 = _freeGlobal;
20144
+ var freeGlobal$2 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
20145
+ var _freeGlobal = freeGlobal$2;
20146
+ var freeGlobal$1 = _freeGlobal;
20147
20147
  var freeSelf$1 = typeof self == "object" && self && self.Object === Object && self;
20148
- var root$a = freeGlobal$2 || freeSelf$1 || Function("return this")();
20149
- var _root = root$a;
20150
- var root$9 = _root;
20151
- var Symbol$7 = root$9.Symbol;
20152
- var _Symbol = Symbol$7;
20153
- var Symbol$6 = _Symbol;
20148
+ var root$9 = freeGlobal$1 || freeSelf$1 || Function("return this")();
20149
+ var _root = root$9;
20150
+ var root$8 = _root;
20151
+ var Symbol$6 = root$8.Symbol;
20152
+ var _Symbol = Symbol$6;
20153
+ var Symbol$5 = _Symbol;
20154
20154
  var objectProto$g = Object.prototype;
20155
20155
  var hasOwnProperty$c = objectProto$g.hasOwnProperty;
20156
20156
  var nativeObjectToString$3 = objectProto$g.toString;
20157
- var symToStringTag$3 = Symbol$6 ? Symbol$6.toStringTag : void 0;
20157
+ var symToStringTag$3 = Symbol$5 ? Symbol$5.toStringTag : void 0;
20158
20158
  function getRawTag$2(value) {
20159
20159
  var isOwn = hasOwnProperty$c.call(value, symToStringTag$3), tag = value[symToStringTag$3];
20160
20160
  try {
@@ -20179,9 +20179,9 @@ function objectToString$2(value) {
20179
20179
  return nativeObjectToString$2.call(value);
20180
20180
  }
20181
20181
  var _objectToString = objectToString$2;
20182
- var Symbol$5 = _Symbol, getRawTag$1 = _getRawTag, objectToString$1 = _objectToString;
20182
+ var Symbol$4 = _Symbol, getRawTag$1 = _getRawTag, objectToString$1 = _objectToString;
20183
20183
  var nullTag$1 = "[object Null]", undefinedTag$1 = "[object Undefined]";
20184
- var symToStringTag$2 = Symbol$5 ? Symbol$5.toStringTag : void 0;
20184
+ var symToStringTag$2 = Symbol$4 ? Symbol$4.toStringTag : void 0;
20185
20185
  function baseGetTag$5(value) {
20186
20186
  if (value == null) {
20187
20187
  return value === void 0 ? undefinedTag$1 : nullTag$1;
@@ -20204,8 +20204,8 @@ function isFunction$2(value) {
20204
20204
  return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
20205
20205
  }
20206
20206
  var isFunction_1 = isFunction$2;
20207
- var root$8 = _root;
20208
- var coreJsData$1 = root$8["__core-js_shared__"];
20207
+ var root$7 = _root;
20208
+ var coreJsData$1 = root$7["__core-js_shared__"];
20209
20209
  var _coreJsData = coreJsData$1;
20210
20210
  var coreJsData = _coreJsData;
20211
20211
  var maskSrcKey = function() {
@@ -20259,8 +20259,8 @@ function getNative$7(object, key) {
20259
20259
  return baseIsNative(value) ? value : void 0;
20260
20260
  }
20261
20261
  var _getNative = getNative$7;
20262
- var getNative$6 = _getNative, root$7 = _root;
20263
- var Map$4 = getNative$6(root$7, "Map");
20262
+ var getNative$6 = _getNative, root$6 = _root;
20263
+ var Map$4 = getNative$6(root$6, "Map");
20264
20264
  var _Map = Map$4;
20265
20265
  var getNative$5 = _getNative;
20266
20266
  var nativeCreate$4 = getNative$5(Object, "create");
@@ -20781,17 +20781,17 @@ function getAllKeysIn$1(object) {
20781
20781
  return baseGetAllKeys(object, keysIn$1, getSymbolsIn);
20782
20782
  }
20783
20783
  var _getAllKeysIn = getAllKeysIn$1;
20784
- var getNative$3 = _getNative, root$6 = _root;
20785
- var DataView$1 = getNative$3(root$6, "DataView");
20784
+ var getNative$3 = _getNative, root$5 = _root;
20785
+ var DataView$1 = getNative$3(root$5, "DataView");
20786
20786
  var _DataView = DataView$1;
20787
- var getNative$2 = _getNative, root$5 = _root;
20788
- var Promise$2 = getNative$2(root$5, "Promise");
20787
+ var getNative$2 = _getNative, root$4 = _root;
20788
+ var Promise$2 = getNative$2(root$4, "Promise");
20789
20789
  var _Promise = Promise$2;
20790
- var getNative$1 = _getNative, root$4 = _root;
20791
- var Set$2 = getNative$1(root$4, "Set");
20790
+ var getNative$1 = _getNative, root$3 = _root;
20791
+ var Set$2 = getNative$1(root$3, "Set");
20792
20792
  var _Set = Set$2;
20793
- var getNative = _getNative, root$3 = _root;
20794
- var WeakMap$2 = getNative(root$3, "WeakMap");
20793
+ var getNative = _getNative, root$2 = _root;
20794
+ var WeakMap$2 = getNative(root$2, "WeakMap");
20795
20795
  var _WeakMap = WeakMap$2;
20796
20796
  var DataView = _DataView, Map$1 = _Map, Promise$1 = _Promise, Set$1 = _Set, WeakMap$1 = _WeakMap, baseGetTag$1 = _baseGetTag, toSource = _toSource;
20797
20797
  var mapTag$4 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$4 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
@@ -20830,8 +20830,8 @@ function initCloneArray$1(array) {
20830
20830
  return result;
20831
20831
  }
20832
20832
  var _initCloneArray = initCloneArray$1;
20833
- var root$2 = _root;
20834
- var Uint8Array$2 = root$2.Uint8Array;
20833
+ var root$1 = _root;
20834
+ var Uint8Array$2 = root$1.Uint8Array;
20835
20835
  var _Uint8Array = Uint8Array$2;
20836
20836
  var Uint8Array$1 = _Uint8Array;
20837
20837
  function cloneArrayBuffer$3(arrayBuffer) {
@@ -20853,8 +20853,8 @@ function cloneRegExp$1(regexp) {
20853
20853
  return result;
20854
20854
  }
20855
20855
  var _cloneRegExp = cloneRegExp$1;
20856
- var Symbol$4 = _Symbol;
20857
- var symbolProto$1 = Symbol$4 ? Symbol$4.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
20856
+ var Symbol$3 = _Symbol;
20857
+ var symbolProto$1 = Symbol$3 ? Symbol$3.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
20858
20858
  function cloneSymbol$1(symbol) {
20859
20859
  return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};
20860
20860
  }
@@ -23204,11 +23204,11 @@ function setToArray$1(set) {
23204
23204
  return result;
23205
23205
  }
23206
23206
  var _setToArray = setToArray$1;
23207
- var Symbol$3 = _Symbol, Uint8Array2 = _Uint8Array, eq = eq_1, equalArrays$1 = _equalArrays, mapToArray = _mapToArray, setToArray = _setToArray;
23207
+ var Symbol$2 = _Symbol, Uint8Array2 = _Uint8Array, eq = eq_1, equalArrays$1 = _equalArrays, mapToArray = _mapToArray, setToArray = _setToArray;
23208
23208
  var COMPARE_PARTIAL_FLAG$2 = 1, COMPARE_UNORDERED_FLAG = 2;
23209
23209
  var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag$1 = "[object Symbol]";
23210
23210
  var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
23211
- var symbolProto = Symbol$3 ? Symbol$3.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
23211
+ var symbolProto = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
23212
23212
  function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack) {
23213
23213
  switch (tag) {
23214
23214
  case dataViewTag:
@@ -23956,16 +23956,13 @@ var canUseDOM = !!(typeof window !== "undefined" && window.document && window.do
23956
23956
  var canUseDom = canUseDOM;
23957
23957
  const canUseDOM$1 = /* @__PURE__ */ getDefaultExportFromCjs(canUseDom);
23958
23958
  var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
23959
- const freeGlobal$1 = freeGlobal;
23960
23959
  var freeSelf = typeof self == "object" && self && self.Object === Object && self;
23961
- var root = freeGlobal$1 || freeSelf || Function("return this")();
23962
- const root$1 = root;
23963
- var Symbol$1 = root$1.Symbol;
23964
- const Symbol$2 = Symbol$1;
23960
+ var root = freeGlobal || freeSelf || Function("return this")();
23961
+ var Symbol$1 = root.Symbol;
23965
23962
  var objectProto$1 = Object.prototype;
23966
23963
  var hasOwnProperty = objectProto$1.hasOwnProperty;
23967
23964
  var nativeObjectToString$1 = objectProto$1.toString;
23968
- var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
23965
+ var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
23969
23966
  function getRawTag(value) {
23970
23967
  var isOwn = hasOwnProperty.call(value, symToStringTag$1), tag = value[symToStringTag$1];
23971
23968
  try {
@@ -23989,7 +23986,7 @@ function objectToString(value) {
23989
23986
  return nativeObjectToString.call(value);
23990
23987
  }
23991
23988
  var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
23992
- var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0;
23989
+ var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
23993
23990
  function baseGetTag(value) {
23994
23991
  if (value == null) {
23995
23992
  return value === void 0 ? undefinedTag : nullTag;
@@ -24042,9 +24039,8 @@ function toNumber(value) {
24042
24039
  return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
24043
24040
  }
24044
24041
  var now = function() {
24045
- return root$1.Date.now();
24042
+ return root.Date.now();
24046
24043
  };
24047
- const now$1 = now;
24048
24044
  var FUNC_ERROR_TEXT$1 = "Expected a function";
24049
24045
  var nativeMax = Math.max, nativeMin = Math.min;
24050
24046
  function debounce(func, wait, options) {
@@ -24080,7 +24076,7 @@ function debounce(func, wait, options) {
24080
24076
  return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
24081
24077
  }
24082
24078
  function timerExpired() {
24083
- var time = now$1();
24079
+ var time = now();
24084
24080
  if (shouldInvoke(time)) {
24085
24081
  return trailingEdge(time);
24086
24082
  }
@@ -24102,10 +24098,10 @@ function debounce(func, wait, options) {
24102
24098
  lastArgs = lastCallTime = lastThis = timerId = void 0;
24103
24099
  }
24104
24100
  function flush() {
24105
- return timerId === void 0 ? result : trailingEdge(now$1());
24101
+ return timerId === void 0 ? result : trailingEdge(now());
24106
24102
  }
24107
24103
  function debounced() {
24108
- var time = now$1(), isInvoking = shouldInvoke(time);
24104
+ var time = now(), isInvoking = shouldInvoke(time);
24109
24105
  lastArgs = arguments;
24110
24106
  lastThis = this;
24111
24107
  lastCallTime = time;
@@ -25650,7 +25646,6 @@ const computePosition$1 = async (reference2, floating, config) => {
25650
25646
  } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
25651
25647
  }
25652
25648
  i = -1;
25653
- continue;
25654
25649
  }
25655
25650
  }
25656
25651
  return {
@@ -25704,6 +25699,7 @@ async function detectOverflow(state, options) {
25704
25699
  y: 1
25705
25700
  };
25706
25701
  const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
25702
+ elements,
25707
25703
  rect,
25708
25704
  offsetParent,
25709
25705
  strategy
@@ -25715,7 +25711,7 @@ async function detectOverflow(state, options) {
25715
25711
  right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
25716
25712
  };
25717
25713
  }
25718
- const flip = function(options) {
25714
+ const flip$1 = function(options) {
25719
25715
  if (options === void 0) {
25720
25716
  options = {};
25721
25717
  }
@@ -25855,20 +25851,29 @@ const offset = function(options) {
25855
25851
  name: "offset",
25856
25852
  options,
25857
25853
  async fn(state) {
25854
+ var _middlewareData$offse, _middlewareData$arrow;
25858
25855
  const {
25859
25856
  x,
25860
- y
25857
+ y,
25858
+ placement,
25859
+ middlewareData
25861
25860
  } = state;
25862
25861
  const diffCoords = await convertValueToCoords(state, options);
25862
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
25863
+ return {};
25864
+ }
25863
25865
  return {
25864
25866
  x: x + diffCoords.x,
25865
25867
  y: y + diffCoords.y,
25866
- data: diffCoords
25868
+ data: {
25869
+ ...diffCoords,
25870
+ placement
25871
+ }
25867
25872
  };
25868
25873
  }
25869
25874
  };
25870
25875
  };
25871
- const shift = function(options) {
25876
+ const shift$1 = function(options) {
25872
25877
  if (options === void 0) {
25873
25878
  options = {};
25874
25879
  }
@@ -25936,7 +25941,7 @@ const shift = function(options) {
25936
25941
  }
25937
25942
  };
25938
25943
  };
25939
- const limitShift = function(options) {
25944
+ const limitShift$1 = function(options) {
25940
25945
  if (options === void 0) {
25941
25946
  options = {};
25942
25947
  }
@@ -26009,7 +26014,7 @@ function getNodeName(node) {
26009
26014
  }
26010
26015
  function getWindow(node) {
26011
26016
  var _node$ownerDocument;
26012
- return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
26017
+ return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
26013
26018
  }
26014
26019
  function getDocumentElement(node) {
26015
26020
  var _ref;
@@ -26212,8 +26217,9 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
26212
26217
  if (domElement) {
26213
26218
  const win = getWindow(domElement);
26214
26219
  const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
26215
- let currentIFrame = win.frameElement;
26216
- while (currentIFrame && offsetParent && offsetWin !== win) {
26220
+ let currentWin = win;
26221
+ let currentIFrame = currentWin.frameElement;
26222
+ while (currentIFrame && offsetParent && offsetWin !== currentWin) {
26217
26223
  const iframeScale = getScale(currentIFrame);
26218
26224
  const iframeRect = currentIFrame.getBoundingClientRect();
26219
26225
  const css = getComputedStyle$1(currentIFrame);
@@ -26225,7 +26231,8 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
26225
26231
  height *= iframeScale.y;
26226
26232
  x += left2;
26227
26233
  y += top2;
26228
- currentIFrame = getWindow(currentIFrame).frameElement;
26234
+ currentWin = getWindow(currentIFrame);
26235
+ currentIFrame = currentWin.frameElement;
26229
26236
  }
26230
26237
  }
26231
26238
  return rectToClientRect({
@@ -26235,15 +26242,27 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
26235
26242
  y
26236
26243
  });
26237
26244
  }
26245
+ const topLayerSelectors = [":popover-open", ":modal"];
26246
+ function isTopLayer(floating) {
26247
+ return topLayerSelectors.some((selector) => {
26248
+ try {
26249
+ return floating.matches(selector);
26250
+ } catch (e) {
26251
+ return false;
26252
+ }
26253
+ });
26254
+ }
26238
26255
  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
26239
26256
  let {
26257
+ elements,
26240
26258
  rect,
26241
26259
  offsetParent,
26242
26260
  strategy
26243
26261
  } = _ref;
26244
- const isOffsetParentAnElement = isHTMLElement(offsetParent);
26262
+ const isFixed = strategy === "fixed";
26245
26263
  const documentElement = getDocumentElement(offsetParent);
26246
- if (offsetParent === documentElement) {
26264
+ const topLayer = elements ? isTopLayer(elements.floating) : false;
26265
+ if (offsetParent === documentElement || topLayer && isFixed) {
26247
26266
  return rect;
26248
26267
  }
26249
26268
  let scroll = {
@@ -26252,7 +26271,8 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
26252
26271
  };
26253
26272
  let scale = createCoords(1);
26254
26273
  const offsets = createCoords(0);
26255
- if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== "fixed") {
26274
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
26275
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
26256
26276
  if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
26257
26277
  scroll = getNodeScroll(offsetParent);
26258
26278
  }
@@ -26411,7 +26431,14 @@ function getClippingRect(_ref) {
26411
26431
  };
26412
26432
  }
26413
26433
  function getDimensions(element) {
26414
- return getCssDimensions(element);
26434
+ const {
26435
+ width,
26436
+ height
26437
+ } = getCssDimensions(element);
26438
+ return {
26439
+ width,
26440
+ height
26441
+ };
26415
26442
  }
26416
26443
  function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
26417
26444
  const isOffsetParentAnElement = isHTMLElement(offsetParent);
@@ -26435,9 +26462,11 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
26435
26462
  offsets.x = getWindowScrollBarX(documentElement);
26436
26463
  }
26437
26464
  }
26465
+ const x = rect.left + scroll.scrollLeft - offsets.x;
26466
+ const y = rect.top + scroll.scrollTop - offsets.y;
26438
26467
  return {
26439
- x: rect.left + scroll.scrollLeft - offsets.x,
26440
- y: rect.top + scroll.scrollTop - offsets.y,
26468
+ x,
26469
+ y,
26441
26470
  width: rect.width,
26442
26471
  height: rect.height
26443
26472
  };
@@ -26453,7 +26482,7 @@ function getTrueOffsetParent(element, polyfill) {
26453
26482
  }
26454
26483
  function getOffsetParent(element, polyfill) {
26455
26484
  const window2 = getWindow(element);
26456
- if (!isHTMLElement(element)) {
26485
+ if (!isHTMLElement(element) || isTopLayer(element)) {
26457
26486
  return window2;
26458
26487
  }
26459
26488
  let offsetParent = getTrueOffsetParent(element, polyfill);
@@ -26465,20 +26494,15 @@ function getOffsetParent(element, polyfill) {
26465
26494
  }
26466
26495
  return offsetParent || getContainingBlock(element) || window2;
26467
26496
  }
26468
- const getElementRects = async function(_ref) {
26469
- let {
26470
- reference: reference2,
26471
- floating,
26472
- strategy
26473
- } = _ref;
26497
+ const getElementRects = async function(data) {
26474
26498
  const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
26475
26499
  const getDimensionsFn = this.getDimensions;
26476
26500
  return {
26477
- reference: getRectRelativeToOffsetParent(reference2, await getOffsetParentFn(floating), strategy),
26501
+ reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
26478
26502
  floating: {
26479
26503
  x: 0,
26480
26504
  y: 0,
26481
- ...await getDimensionsFn(floating)
26505
+ ...await getDimensionsFn(data.floating)
26482
26506
  }
26483
26507
  };
26484
26508
  };
@@ -26502,8 +26526,9 @@ function observeMove(element, onMove) {
26502
26526
  let timeoutId;
26503
26527
  const root2 = getDocumentElement(element);
26504
26528
  function cleanup() {
26529
+ var _io;
26505
26530
  clearTimeout(timeoutId);
26506
- io && io.disconnect();
26531
+ (_io = io) == null || _io.disconnect();
26507
26532
  io = null;
26508
26533
  }
26509
26534
  function refresh(skip, threshold) {
@@ -26595,7 +26620,8 @@ function autoUpdate(reference2, floating, update, options) {
26595
26620
  resizeObserver.unobserve(floating);
26596
26621
  cancelAnimationFrame(reobserveFrame);
26597
26622
  reobserveFrame = requestAnimationFrame(() => {
26598
- resizeObserver && resizeObserver.observe(floating);
26623
+ var _resizeObserver;
26624
+ (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
26599
26625
  });
26600
26626
  }
26601
26627
  update();
@@ -26620,18 +26646,22 @@ function autoUpdate(reference2, floating, update, options) {
26620
26646
  }
26621
26647
  update();
26622
26648
  return () => {
26649
+ var _resizeObserver2;
26623
26650
  ancestors.forEach((ancestor) => {
26624
26651
  ancestorScroll && ancestor.removeEventListener("scroll", update);
26625
26652
  ancestorResize && ancestor.removeEventListener("resize", update);
26626
26653
  });
26627
- cleanupIo && cleanupIo();
26628
- resizeObserver && resizeObserver.disconnect();
26654
+ cleanupIo == null || cleanupIo();
26655
+ (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
26629
26656
  resizeObserver = null;
26630
26657
  if (animationFrame) {
26631
26658
  cancelAnimationFrame(frameId);
26632
26659
  }
26633
26660
  };
26634
26661
  }
26662
+ const shift = shift$1;
26663
+ const flip = flip$1;
26664
+ const limitShift = limitShift$1;
26635
26665
  const computePosition = (reference2, floating, options) => {
26636
26666
  const cache = /* @__PURE__ */ new Map();
26637
26667
  const mergedOptions = {
@@ -26647,9 +26677,15 @@ const computePosition = (reference2, floating, options) => {
26647
26677
  platform: platformWithCache
26648
26678
  });
26649
26679
  };
26650
- function unwrapElement(element) {
26651
- var _$el;
26652
- return (_$el = element == null ? void 0 : element.$el) != null ? _$el : element;
26680
+ function isComponentPublicInstance(target) {
26681
+ return target != null && typeof target === "object" && "$el" in target;
26682
+ }
26683
+ function unwrapElement(target) {
26684
+ if (isComponentPublicInstance(target)) {
26685
+ const element = target.$el;
26686
+ return isNode(element) && getNodeName(element) === "#comment" ? null : element;
26687
+ }
26688
+ return target;
26653
26689
  }
26654
26690
  function getDPR(element) {
26655
26691
  if (typeof window === "undefined") {
@@ -26945,12 +26981,12 @@ const _sfc_main$A = {
26945
26981
  }, {
26946
26982
  default: withCtx(() => [
26947
26983
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
26948
- ], void 0, true),
26984
+ ]),
26949
26985
  _: 3
26950
26986
  }, 8, ["reference-ref", "placement", "placement-strategy", "placement-flip", "offsets"])), [
26951
26987
  [unref(outClick), unref(toggler).close]
26952
26988
  ]) : createCommentVNode("", true)
26953
- ], void 0, true),
26989
+ ]),
26954
26990
  _: 3
26955
26991
  });
26956
26992
  };
@@ -27140,7 +27176,7 @@ const _sfc_main$x = {
27140
27176
  size: "8px",
27141
27177
  "auto-color": ""
27142
27178
  })
27143
- ], void 0, true),
27179
+ ]),
27144
27180
  _: 1
27145
27181
  }, 8, ["class", "active", "onClick"])
27146
27182
  ], true);
@@ -27193,7 +27229,7 @@ const _sfc_main$w = {
27193
27229
  renderSlot(_ctx.$slots, "default", {}, () => [
27194
27230
  createTextVNode(toDisplayString(unref(optionTitle)), 1)
27195
27231
  ], true)
27196
- ], void 0, true),
27232
+ ]),
27197
27233
  _: 3
27198
27234
  }, 8, ["class"]);
27199
27235
  };
@@ -27274,7 +27310,7 @@ const _sfc_main$t = {
27274
27310
  ], 64);
27275
27311
  }), 256))
27276
27312
  ])
27277
- ], void 0, true),
27313
+ ]),
27278
27314
  _: 3
27279
27315
  });
27280
27316
  };
@@ -27350,7 +27386,7 @@ const _sfc_main$s = {
27350
27386
  ]),
27351
27387
  _: 3
27352
27388
  }, 8, ["options"])
27353
- ], void 0, true),
27389
+ ]),
27354
27390
  _: 3
27355
27391
  }, 8, ["max-width", "toggler", "reference-ref"])
27356
27392
  ], 512);
@@ -27555,7 +27591,7 @@ const _sfc_main$q = {
27555
27591
  default: withCtx(() => [
27556
27592
  createTextVNode(toDisplayString(option.id) + " ", 1),
27557
27593
  option.isDefault ? (openBlock(), createElementBlock("span", _hoisted_1$b, "(Default)")) : createCommentVNode("", true)
27558
- ], void 0, true),
27594
+ ]),
27559
27595
  _: 2
27560
27596
  }, 1032, ["option", "style"])), [
27561
27597
  [unref(tooltip), option.id]
@@ -27604,7 +27640,7 @@ const _sfc_main$p = {
27604
27640
  default: withCtx(() => [
27605
27641
  createTextVNode(toDisplayString(option.id) + " ", 1),
27606
27642
  option.isDefault ? (openBlock(), createElementBlock("span", _hoisted_1$a, "(Default)")) : createCommentVNode("", true)
27607
- ], void 0, true),
27643
+ ]),
27608
27644
  _: 2
27609
27645
  }, 1032, ["option"])), [
27610
27646
  [unref(tooltip), option.id]
@@ -27654,7 +27690,7 @@ const _sfc_main$o = {
27654
27690
  default: withCtx(() => [
27655
27691
  createTextVNode(toDisplayString(option.title) + " ", 1),
27656
27692
  option.isDefault ? (openBlock(), createElementBlock("span", _hoisted_1$9, "(Default)")) : createCommentVNode("", true)
27657
- ], void 0, true),
27693
+ ]),
27658
27694
  _: 2
27659
27695
  }, 1032, ["option"])), [
27660
27696
  [unref(tooltip), option.id]
@@ -27707,7 +27743,7 @@ const _sfc_main$n = {
27707
27743
  { lg: true }
27708
27744
  ]
27709
27745
  ]) : createCommentVNode("", true)
27710
- ], void 0, true),
27746
+ ]),
27711
27747
  _: 2
27712
27748
  }, 1032, ["active", "onClick"])), [
27713
27749
  [unref(tooltip), "Font Color"]
@@ -27742,7 +27778,7 @@ const _sfc_main$m = {
27742
27778
  size: "28px",
27743
27779
  "auto-color": ""
27744
27780
  })
27745
- ], void 0, true),
27781
+ ]),
27746
27782
  _: 2
27747
27783
  }, 1032, ["active", "onClick"])), [
27748
27784
  [unref(tooltip), "Background Color"]
@@ -27789,7 +27825,7 @@ const _sfc_main$l = {
27789
27825
  { lg: true }
27790
27826
  ]
27791
27827
  ]) : createCommentVNode("", true)
27792
- ], void 0, true),
27828
+ ]),
27793
27829
  _: 1
27794
27830
  }, 8, ["active", "disabled"])), [
27795
27831
  [unref(tooltip), { text: "Italic", hotkey: "Mod I" }]
@@ -27831,7 +27867,7 @@ const _sfc_main$k = {
27831
27867
  { lg: true }
27832
27868
  ]
27833
27869
  ]) : createCommentVNode("", true)
27834
- ], void 0, true),
27870
+ ]),
27835
27871
  _: 1
27836
27872
  }, 8, ["active"])), [
27837
27873
  [unref(tooltip), { text: "Underline", hotkey: "Mod U" }]
@@ -27858,7 +27894,7 @@ const _sfc_main$j = {
27858
27894
  size: "28px",
27859
27895
  "auto-color": ""
27860
27896
  })
27861
- ], void 0, true),
27897
+ ]),
27862
27898
  _: 1
27863
27899
  }, 8, ["active"])), [
27864
27900
  [unref(tooltip), "Strikethrough"]
@@ -27885,7 +27921,7 @@ const _sfc_main$i = {
27885
27921
  size: "28px",
27886
27922
  "auto-color": ""
27887
27923
  })
27888
- ], void 0, true),
27924
+ ]),
27889
27925
  _: 1
27890
27926
  }, 8, ["active"])), [
27891
27927
  [unref(tooltip), "Superscript"]
@@ -27921,7 +27957,7 @@ const _sfc_main$h = {
27921
27957
  size: "28px",
27922
27958
  "auto-color": ""
27923
27959
  })
27924
- ], void 0, true),
27960
+ ]),
27925
27961
  _: 2
27926
27962
  }, 1032, ["active", "onClick"])), [
27927
27963
  [unref(tooltip), "Case Styles"]
@@ -27996,7 +28032,7 @@ const _sfc_main$g = {
27996
28032
  size: "28px",
27997
28033
  "auto-color": ""
27998
28034
  }, null, 8, ["name"])
27999
- ], void 0, true),
28035
+ ]),
28000
28036
  _: 2
28001
28037
  }, 1032, ["active", "onClick"])), [
28002
28038
  [unref(tooltip), option.tooltip]
@@ -28049,7 +28085,7 @@ const _sfc_main$f = {
28049
28085
  { lg: true }
28050
28086
  ]
28051
28087
  ]) : createCommentVNode("", true)
28052
- ], void 0, true),
28088
+ ]),
28053
28089
  _: 1
28054
28090
  }, 8, ["active", "onClick"])), [
28055
28091
  [unref(tooltip), "Line Height"]
@@ -28066,7 +28102,7 @@ const _sfc_main$f = {
28066
28102
  }, {
28067
28103
  default: withCtx(() => [
28068
28104
  createTextVNode(" Line Height ")
28069
- ], void 0, true),
28105
+ ]),
28070
28106
  _: 1
28071
28107
  }),
28072
28108
  createElementVNode("div", _hoisted_2$2, [
@@ -28088,7 +28124,7 @@ const _sfc_main$f = {
28088
28124
  onInput: apply2
28089
28125
  }, null, 8, ["value"])
28090
28126
  ])
28091
- ], void 0, true),
28127
+ ]),
28092
28128
  _: 1
28093
28129
  }, 8, ["toggler", "reference-ref"])
28094
28130
  ], 512);
@@ -28129,7 +28165,7 @@ const _sfc_main$e = {
28129
28165
  size: "28px",
28130
28166
  "auto-color": ""
28131
28167
  }, null, 8, ["name"])
28132
- ], void 0, true),
28168
+ ]),
28133
28169
  _: 1
28134
28170
  }, 8, ["active"])), [
28135
28171
  [unref(tooltip), "Bullets"]
@@ -28153,7 +28189,7 @@ const _sfc_main$e = {
28153
28189
  size: "8px",
28154
28190
  "auto-color": ""
28155
28191
  })
28156
- ], void 0, true),
28192
+ ]),
28157
28193
  _: 2
28158
28194
  }, 1032, ["active", "onClick"])), [
28159
28195
  [unref(tooltip), "Bullet Styles"]
@@ -28170,7 +28206,7 @@ const _sfc_main$e = {
28170
28206
  size: "28px",
28171
28207
  "auto-color": ""
28172
28208
  }, null, 8, ["name"])
28173
- ], void 0, true),
28209
+ ]),
28174
28210
  _: 2
28175
28211
  }, 1032, ["option"])
28176
28212
  ]),
@@ -28198,7 +28234,7 @@ const _sfc_main$d = {
28198
28234
  size: "28px",
28199
28235
  "auto-color": ""
28200
28236
  })
28201
- ], void 0, true),
28237
+ ]),
28202
28238
  _: 1
28203
28239
  })), [
28204
28240
  [unref(tooltip), "Remove Styles"]
@@ -28240,7 +28276,7 @@ const _sfc_main$c = {
28240
28276
  "auto-color": ""
28241
28277
  }),
28242
28278
  createTextVNode(" Remove ")
28243
- ], void 0, true),
28279
+ ]),
28244
28280
  _: 1
28245
28281
  }, 8, ["disabled"])
28246
28282
  ]);
@@ -28339,7 +28375,7 @@ const _sfc_main$b = {
28339
28375
  }, {
28340
28376
  default: withCtx(() => [
28341
28377
  createTextVNode(" Select section ")
28342
- ], void 0, true),
28378
+ ]),
28343
28379
  _: 1
28344
28380
  }),
28345
28381
  createVNode(unref(Dropdown), {
@@ -28440,7 +28476,7 @@ const _sfc_main$9 = {
28440
28476
  createVNode(unref(FieldLabel), { class: "zw-margin-bottom--xxs" }, {
28441
28477
  default: withCtx(() => [
28442
28478
  createTextVNode(" Destination ")
28443
- ], void 0, true),
28479
+ ]),
28444
28480
  _: 1
28445
28481
  }),
28446
28482
  createVNode(unref(Dropdown), {
@@ -28552,7 +28588,7 @@ const _sfc_main$8 = {
28552
28588
  size: "28px",
28553
28589
  "auto-color": ""
28554
28590
  })
28555
- ], void 0, true),
28591
+ ]),
28556
28592
  _: 1
28557
28593
  }, 8, ["active", "onClick"])), [
28558
28594
  [unref(tooltip), "Link"]
@@ -28592,7 +28628,7 @@ const _sfc_main$8 = {
28592
28628
  }, {
28593
28629
  default: withCtx(() => [
28594
28630
  createTextVNode(" Cancel ")
28595
- ], void 0, true),
28631
+ ]),
28596
28632
  _: 1
28597
28633
  }, 8, ["onClick"]),
28598
28634
  createVNode(unref(Button), {
@@ -28601,12 +28637,12 @@ const _sfc_main$8 = {
28601
28637
  }, {
28602
28638
  default: withCtx(() => [
28603
28639
  createTextVNode(" Save ")
28604
- ], void 0, true),
28640
+ ]),
28605
28641
  _: 1
28606
28642
  })
28607
28643
  ])
28608
28644
  ], 32)
28609
- ], void 0, true),
28645
+ ]),
28610
28646
  _: 1
28611
28647
  }, 8, ["toggler", "reference-ref"])
28612
28648
  ], 512);
@@ -28657,7 +28693,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
28657
28693
  _hoisted_1$1,
28658
28694
  createElementVNode("span", _hoisted_2, toDisplayString($setup.optionTitle), 1),
28659
28695
  createElementVNode("span", _hoisted_3, toDisplayString($setup.fontSizeTitle), 1)
28660
- ], void 0, true),
28696
+ ]),
28661
28697
  _: 1
28662
28698
  }, 8, ["style", "option"]);
28663
28699
  }
@@ -28722,7 +28758,7 @@ const _sfc_main$6 = {
28722
28758
  size: "28px",
28723
28759
  "auto-color": ""
28724
28760
  })
28725
- ], void 0, true),
28761
+ ]),
28726
28762
  _: 1
28727
28763
  }, 8, ["disabled"])), [
28728
28764
  [unref(tooltip), tooltip$1.value]
@@ -28762,10 +28798,10 @@ const _sfc_main$5 = {
28762
28798
  default: withCtx(() => [
28763
28799
  createVNode(unref(_sfc_main$n)),
28764
28800
  createVNode(unref(_sfc_main$m))
28765
- ], void 0, true),
28801
+ ]),
28766
28802
  _: 1
28767
28803
  })
28768
- ], void 0, true),
28804
+ ]),
28769
28805
  _: 1
28770
28806
  }),
28771
28807
  createVNode(unref(ToolbarDivider), { horizontal: "" }),
@@ -28778,7 +28814,7 @@ const _sfc_main$5 = {
28778
28814
  createVNode(unref(_sfc_main$j)),
28779
28815
  createVNode(unref(_sfc_main$i)),
28780
28816
  createVNode(unref(_sfc_main$h))
28781
- ], void 0, true),
28817
+ ]),
28782
28818
  _: 1
28783
28819
  }),
28784
28820
  createVNode(unref(ToolbarDivider), { vertical: "" }),
@@ -28792,10 +28828,10 @@ const _sfc_main$5 = {
28792
28828
  default: withCtx(() => [
28793
28829
  createVNode(unref(LinkControl)),
28794
28830
  createVNode(unref(_sfc_main$d))
28795
- ], void 0, true),
28831
+ ]),
28796
28832
  _: 1
28797
28833
  })
28798
- ], void 0, true),
28834
+ ]),
28799
28835
  _: 1
28800
28836
  })
28801
28837
  ], 64);
@@ -28814,7 +28850,7 @@ const _sfc_main$4 = {
28814
28850
  createVNode(unref(FontFamilyControl)),
28815
28851
  createVNode(unref(ToolbarDivider), { vertical: "" }),
28816
28852
  createVNode(unref(FontWeightControl))
28817
- ], void 0, true),
28853
+ ]),
28818
28854
  _: 1
28819
28855
  }),
28820
28856
  createVNode(unref(ToolbarDivider), { horizontal: "" }),
@@ -28826,7 +28862,7 @@ const _sfc_main$4 = {
28826
28862
  default: withCtx(() => [
28827
28863
  createVNode(unref(_sfc_main$n)),
28828
28864
  createVNode(unref(_sfc_main$m))
28829
- ], void 0, true),
28865
+ ]),
28830
28866
  _: 1
28831
28867
  }),
28832
28868
  createVNode(unref(ToolbarDivider), { vertical: "" }),
@@ -28837,10 +28873,10 @@ const _sfc_main$4 = {
28837
28873
  createVNode(unref(_sfc_main$j)),
28838
28874
  createVNode(unref(_sfc_main$i)),
28839
28875
  createVNode(unref(_sfc_main$h))
28840
- ], void 0, true),
28876
+ ]),
28841
28877
  _: 1
28842
28878
  })
28843
- ], void 0, true),
28879
+ ]),
28844
28880
  _: 1
28845
28881
  }),
28846
28882
  createVNode(unref(ToolbarDivider), { horizontal: "" }),
@@ -28856,10 +28892,10 @@ const _sfc_main$4 = {
28856
28892
  default: withCtx(() => [
28857
28893
  createVNode(unref(LinkControl)),
28858
28894
  createVNode(unref(_sfc_main$d))
28859
- ], void 0, true),
28895
+ ]),
28860
28896
  _: 1
28861
28897
  })
28862
- ], void 0, true),
28898
+ ]),
28863
28899
  _: 1
28864
28900
  })
28865
28901
  ], 64);
@@ -28896,7 +28932,7 @@ const _sfc_main$3 = {
28896
28932
  default: withCtx(() => [
28897
28933
  createVNode(unref(_sfc_main$n)),
28898
28934
  createVNode(unref(_sfc_main$m))
28899
- ], void 0, true),
28935
+ ]),
28900
28936
  _: 1
28901
28937
  }),
28902
28938
  createVNode(unref(ToolbarDivider), { vertical: "" }),
@@ -28907,10 +28943,10 @@ const _sfc_main$3 = {
28907
28943
  createVNode(unref(_sfc_main$j)),
28908
28944
  createVNode(unref(_sfc_main$i)),
28909
28945
  createVNode(unref(_sfc_main$h))
28910
- ], void 0, true),
28946
+ ]),
28911
28947
  _: 1
28912
28948
  })
28913
- ], void 0, true),
28949
+ ]),
28914
28950
  _: 1
28915
28951
  }),
28916
28952
  createVNode(unref(ToolbarDivider), { horizontal: "" }),
@@ -28926,10 +28962,10 @@ const _sfc_main$3 = {
28926
28962
  default: withCtx(() => [
28927
28963
  createVNode(unref(LinkControl)),
28928
28964
  createVNode(unref(_sfc_main$d))
28929
- ], void 0, true),
28965
+ ]),
28930
28966
  _: 1
28931
28967
  })
28932
- ], void 0, true),
28968
+ ]),
28933
28969
  _: 1
28934
28970
  })
28935
28971
  ], 64);
@@ -29029,10 +29065,10 @@ const _sfc_main$1 = {
29029
29065
  }, {
29030
29066
  default: withCtx(() => [
29031
29067
  (openBlock(), createBlock(resolveDynamicComponent(layoutComponent.value), { "ai-component": __props.aiComponent }, null, 8, ["ai-component"]))
29032
- ], void 0, true),
29068
+ ]),
29033
29069
  _: 1
29034
29070
  }, 8, ["reference-ref", "offsets"])) : createCommentVNode("", true)
29035
- ], void 0, true),
29071
+ ]),
29036
29072
  _: 1
29037
29073
  })
29038
29074
  ], 1024);
@@ -29067,12 +29103,16 @@ function useEditor({ content, onChange, extensions: extensions2, isReadonlyRef }
29067
29103
  }
29068
29104
  class Font {
29069
29105
  constructor({ name, category, styles }) {
29106
+ __publicField(this, "name");
29107
+ __publicField(this, "category");
29108
+ __publicField(this, "styles");
29109
+ __publicField(this, "weights");
29070
29110
  this.name = name;
29071
29111
  this.category = category;
29072
29112
  this.styles = styles;
29073
- this.weights = this._getWeights();
29113
+ this.weights = this.getWeights();
29074
29114
  }
29075
- _getWeights() {
29115
+ getWeights() {
29076
29116
  const weights = this.styles.map((style2) => style2.replace("i", ""));
29077
29117
  return Array.from(new Set(weights));
29078
29118
  }
@@ -29085,12 +29125,12 @@ class Font {
29085
29125
  isWeightItalicOnly(weight) {
29086
29126
  return this.isItalicSupported(weight) && !this.styles.includes(weight);
29087
29127
  }
29088
- findClosestWeight(searchedWeight) {
29128
+ findClosestWeight(searchingWeight) {
29089
29129
  const weights = this.weights.map((weight) => parseInt(weight));
29090
29130
  let closestWeight;
29091
29131
  let closestDifferance = null;
29092
29132
  for (const weight of weights) {
29093
- const differance = Math.abs(searchedWeight - weight);
29133
+ const differance = Math.abs(Number(searchingWeight) - weight);
29094
29134
  if (closestDifferance === null || differance < closestDifferance) {
29095
29135
  closestDifferance = differance;
29096
29136
  closestWeight = weight;
@@ -29101,13 +29141,9 @@ class Font {
29101
29141
  }
29102
29142
  const MIN_FONT_SIZE = 5;
29103
29143
  const MAX_FONT_SIZE = 112;
29104
- const _sfc_main = {
29144
+ const _sfc_main = /* @__PURE__ */ defineComponent({
29105
29145
  __name: "Wysiwyg",
29106
- props: {
29107
- modelValue: {
29108
- type: [String, Object],
29109
- required: true
29110
- },
29146
+ props: /* @__PURE__ */ mergeModels({
29111
29147
  presets: {
29112
29148
  type: Array,
29113
29149
  required: true
@@ -29182,23 +29218,29 @@ const _sfc_main = {
29182
29218
  required: false,
29183
29219
  default: null
29184
29220
  }
29185
- },
29186
- emits: [
29187
- "update:model-value",
29221
+ }, {
29222
+ "modelValue": {
29223
+ type: [String, Object],
29224
+ required: true
29225
+ },
29226
+ "modelModifiers": {}
29227
+ }),
29228
+ emits: /* @__PURE__ */ mergeModels([
29188
29229
  "update-favorite-colors"
29189
- ],
29230
+ ], ["update:modelValue"]),
29190
29231
  setup(__props, { expose: __expose, emit: __emit }) {
29191
29232
  const props = __props;
29192
29233
  const emit = __emit;
29234
+ const modelValue = useModel(__props, "modelValue");
29193
29235
  ContextWindow.use(props.window);
29194
29236
  const fonts = props.fonts.map((font) => new Font(font));
29195
29237
  const wysiwygRef = ref(null);
29196
29238
  const wrapperRef = computed(() => wysiwygRef.value || document.body);
29197
29239
  const isToolbarVisible = computed(() => props.active && !props.readonly);
29198
- const onChange = (content) => emit("update:model-value", content);
29240
+ const onChange = (content) => modelValue.value = content;
29199
29241
  const pageBlocks = toRef(props, "pageBlocks");
29200
29242
  const { editor, getContent } = useEditor({
29201
- content: toRef(props, "modelValue"),
29243
+ content: modelValue,
29202
29244
  onChange,
29203
29245
  isReadonlyRef: toRef(props, "readonly"),
29204
29246
  extensions: buildExtensions({
@@ -29247,7 +29289,7 @@ const _sfc_main = {
29247
29289
  ], 512);
29248
29290
  };
29249
29291
  }
29250
- };
29292
+ });
29251
29293
  export {
29252
29294
  Alignments,
29253
29295
  Button,