@ncino/web-components 3.4.0-preview.2 → 3.4.0-preview.4

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 (371) hide show
  1. package/dist/_virtual/index.js +1 -1
  2. package/dist/_virtual/index2.js +1 -1
  3. package/dist/assets/node_modules/.pnpm/ckeditor5@45.0.0/node_modules/ckeditor5/dist/ckeditor5.css +4 -0
  4. package/dist/components/chip/chip.js +1 -1
  5. package/dist/components/chip/gator/chip.gator.js +5 -5
  6. package/dist/components/input-rich-text/ckeditor-config.js +1 -1
  7. package/dist/components/input-rich-text/input-rich-text.slds.js +2 -2
  8. package/dist/components/panel/gator/panel.storybook-test.js +1 -1
  9. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-alignment@45.0.0/node_modules/@ckeditor/ckeditor5-alignment/dist/index.js +4 -0
  10. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autoformat@44.3.0 → @ckeditor_ckeditor5-autoformat@45.0.0}/node_modules/@ckeditor/ckeditor5-autoformat/dist/index.js +1 -1
  11. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autosave@44.3.0 → @ckeditor_ckeditor5-autosave@45.0.0}/node_modules/@ckeditor/ckeditor5-autosave/dist/index.js +1 -1
  12. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-basic-styles@45.0.0/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +4 -0
  13. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-block-quote@44.3.0 → @ckeditor_ckeditor5-block-quote@45.0.0}/node_modules/@ckeditor/ckeditor5-block-quote/dist/index.js +2 -2
  14. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-clipboard@45.0.0/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +20 -0
  15. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-cloud-services@44.3.0 → @ckeditor_ckeditor5-cloud-services@45.0.0}/node_modules/@ckeditor/ckeditor5-cloud-services/dist/index.js +2 -2
  16. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-code-block@44.3.0 → @ckeditor_ckeditor5-code-block@45.0.0}/node_modules/@ckeditor/ckeditor5-code-block/dist/index.js +5 -5
  17. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-core@45.0.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js +4 -0
  18. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-editor-classic@45.0.0/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +4 -0
  19. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-engine@44.3.0 → @ckeditor_ckeditor5-engine@45.0.0}/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +3 -3
  20. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-enter@44.3.0 → @ckeditor_ckeditor5-enter@45.0.0}/node_modules/@ckeditor/ckeditor5-enter/dist/index.js +1 -1
  21. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-essentials@44.3.0 → @ckeditor_ckeditor5-essentials@45.0.0}/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js +1 -1
  22. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-find-and-replace@45.0.0/node_modules/@ckeditor/ckeditor5-find-and-replace/dist/index.js +5 -0
  23. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-font@45.0.0/node_modules/@ckeditor/ckeditor5-font/dist/index.js +7 -0
  24. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-heading@44.3.0 → @ckeditor_ckeditor5-heading@45.0.0}/node_modules/@ckeditor/ckeditor5-heading/dist/index.js +1 -1
  25. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-highlight@45.0.0/node_modules/@ckeditor/ckeditor5-highlight/dist/index.js +4 -0
  26. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-horizontal-line@45.0.0/node_modules/@ckeditor/ckeditor5-horizontal-line/dist/index.js +4 -0
  27. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-embed@45.0.0/node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js +4 -0
  28. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-support@45.0.0/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +12 -0
  29. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-icons@45.0.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js +6 -0
  30. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-image@45.0.0/node_modules/@ckeditor/ckeditor5-image/dist/index.js +10 -0
  31. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-indent@45.0.0/node_modules/@ckeditor/ckeditor5-indent/dist/index.js +10 -0
  32. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-language@44.3.0 → @ckeditor_ckeditor5-language@45.0.0}/node_modules/@ckeditor/ckeditor5-language/dist/index.js +1 -1
  33. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-link@45.0.0/node_modules/@ckeditor/ckeditor5-link/dist/index.js +4 -0
  34. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-list@45.0.0/node_modules/@ckeditor/ckeditor5-list/dist/index.js +13 -0
  35. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-markdown-gfm@44.3.0 → @ckeditor_ckeditor5-markdown-gfm@45.0.0}/node_modules/@ckeditor/ckeditor5-markdown-gfm/dist/index.js +1 -1
  36. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-media-embed@45.0.0/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +7 -0
  37. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-mention@44.3.0 → @ckeditor_ckeditor5-mention@45.0.0}/node_modules/@ckeditor/ckeditor5-mention/dist/index.js +1 -1
  38. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-page-break@45.0.0/node_modules/@ckeditor/ckeditor5-page-break/dist/index.js +4 -0
  39. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-paragraph@44.3.0 → @ckeditor_ckeditor5-paragraph@45.0.0}/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +2 -2
  40. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-paste-from-office@44.3.0 → @ckeditor_ckeditor5-paste-from-office@45.0.0}/node_modules/@ckeditor/ckeditor5-paste-from-office/dist/index.js +1 -1
  41. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-remove-format@45.0.0/node_modules/@ckeditor/ckeditor5-remove-format/dist/index.js +4 -0
  42. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-select-all@45.0.0/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +4 -0
  43. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-show-blocks@45.0.0/node_modules/@ckeditor/ckeditor5-show-blocks/dist/index.js +4 -0
  44. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-source-editing@45.0.0/node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js +12 -0
  45. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-special-characters@45.0.0/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js +4 -0
  46. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-style@44.3.0 → @ckeditor_ckeditor5-style@45.0.0}/node_modules/@ckeditor/ckeditor5-style/dist/index.js +1 -1
  47. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@45.0.0/node_modules/@ckeditor/ckeditor5-table/dist/index.js +16 -0
  48. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-typing@44.3.0 → @ckeditor_ckeditor5-typing@45.0.0}/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +3 -3
  49. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-ui@45.0.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +28 -0
  50. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-undo@44.3.0 → @ckeditor_ckeditor5-undo@45.0.0}/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +2 -2
  51. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-upload@44.3.0 → @ckeditor_ckeditor5-upload@45.0.0}/node_modules/@ckeditor/ckeditor5-upload/dist/index.js +1 -1
  52. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-utils@44.3.0 → @ckeditor_ckeditor5-utils@45.0.0}/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +9 -9
  53. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-watchdog@44.3.0 → @ckeditor_ckeditor5-watchdog@45.0.0}/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +1 -1
  54. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-widget@45.0.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +4 -0
  55. package/dist/node_modules/.pnpm/{@storybook_instrumenter@8.6.12_storybook@8.6.12_prettier@3.4.2_ → @storybook_instrumenter@8.6.12_storybook@8.6.12_prettier@3.5.3_}/node_modules/@storybook/instrumenter/dist/index.js +1 -1
  56. package/dist/node_modules/.pnpm/{@storybook_test@8.6.12_storybook@8.6.12_prettier@3.4.2_ → @storybook_test@8.6.12_storybook@8.6.12_prettier@3.5.3_}/node_modules/@storybook/test/dist/index.js +1 -1
  57. package/dist/node_modules/.pnpm/color-parse@1.4.2/node_modules/color-parse/index.js +1 -1
  58. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.js +1 -0
  59. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/getTag.js +1 -0
  60. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.js +1 -0
  61. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/isIndex.js +1 -0
  62. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js +1 -0
  63. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/normalizeForCase.js +1 -0
  64. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/tags.js +1 -0
  65. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/toKey.js +1 -0
  66. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/function/debounce.js +1 -0
  67. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/function/throttle.js +1 -0
  68. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/assignIn.js +1 -0
  69. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +1 -0
  70. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js +1 -0
  71. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/get.js +1 -0
  72. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/keysIn.js +1 -0
  73. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/mapValues.js +1 -0
  74. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/merge.js +1 -0
  75. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/mergeWith.js +1 -0
  76. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/property.js +1 -0
  77. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/set.js +1 -0
  78. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/unset.js +1 -0
  79. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isArguments.js +1 -0
  80. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isArrayLike.js +1 -0
  81. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isElement.js +1 -0
  82. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isEqualWith.js +1 -0
  83. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isObject.js +1 -0
  84. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isObjectLike.js +1 -0
  85. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js +1 -0
  86. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isString.js +1 -0
  87. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isSymbol.js +1 -0
  88. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isTypedArray.js +1 -0
  89. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/string/escapeRegExp.js +1 -0
  90. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/string/startCase.js +1 -0
  91. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/string/upperFirst.js +1 -0
  92. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/eq.js +1 -0
  93. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/times.js +1 -0
  94. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/toFinite.js +1 -0
  95. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/toInteger.js +1 -0
  96. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/toNumber.js +1 -0
  97. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/toPath.js +1 -0
  98. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/util/toString.js +1 -0
  99. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/function/after.js +1 -0
  100. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/function/debounce.js +1 -0
  101. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/function/identity.js +1 -0
  102. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/function/noop.js +1 -0
  103. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/object/clone.js +1 -0
  104. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/object/cloneDeepWith.js +1 -0
  105. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/object/mapValues.js +1 -0
  106. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isBuffer.js +1 -0
  107. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isEqual.js +1 -0
  108. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isEqualWith.js +1 -0
  109. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isFunction.js +1 -0
  110. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isLength.js +1 -0
  111. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isPlainObject.js +1 -0
  112. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isPrimitive.js +1 -0
  113. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isTypedArray.js +1 -0
  114. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/string/escapeRegExp.js +1 -0
  115. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/string/upperFirst.js +1 -0
  116. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/string/words.js +1 -0
  117. package/dist/packages/web-components/src/components/chip/gator/chip.gator.scss.js +1 -1
  118. package/dist/packages/web-components/src/tokens/semantic.tokens.scss.js +1 -1
  119. package/dist/types/components/chip/chip.d.ts +9 -2
  120. package/dist/types/components/chip/gator/chip.gator.d.ts +2 -0
  121. package/dist/types/components/scoped-notification/scoped-notification.slds.d.ts +1 -1
  122. package/dist/utils/vitest-a11y-utils.js +1 -1
  123. package/package.json +2 -2
  124. package/web-types.json +19 -3
  125. package/dist/assets/node_modules/.pnpm/ckeditor5@44.3.0/node_modules/ckeditor5/dist/ckeditor5.css +0 -4
  126. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-alignment@44.3.0/node_modules/@ckeditor/ckeditor5-alignment/dist/index.js +0 -4
  127. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-basic-styles@44.3.0/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +0 -4
  128. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-clipboard@44.3.0/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +0 -20
  129. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-core@44.3.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js +0 -6
  130. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-editor-classic@44.3.0/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +0 -4
  131. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-find-and-replace@44.3.0/node_modules/@ckeditor/ckeditor5-find-and-replace/dist/index.js +0 -5
  132. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-font@44.3.0/node_modules/@ckeditor/ckeditor5-font/dist/index.js +0 -7
  133. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-highlight@44.3.0/node_modules/@ckeditor/ckeditor5-highlight/dist/index.js +0 -4
  134. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-horizontal-line@44.3.0/node_modules/@ckeditor/ckeditor5-horizontal-line/dist/index.js +0 -4
  135. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-embed@44.3.0/node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js +0 -4
  136. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-support@44.3.0/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +0 -12
  137. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-image@44.3.0/node_modules/@ckeditor/ckeditor5-image/dist/index.js +0 -10
  138. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-indent@44.3.0/node_modules/@ckeditor/ckeditor5-indent/dist/index.js +0 -10
  139. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-link@44.3.0/node_modules/@ckeditor/ckeditor5-link/dist/index.js +0 -4
  140. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-list@44.3.0/node_modules/@ckeditor/ckeditor5-list/dist/index.js +0 -13
  141. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-media-embed@44.3.0/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +0 -7
  142. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-page-break@44.3.0/node_modules/@ckeditor/ckeditor5-page-break/dist/index.js +0 -4
  143. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-remove-format@44.3.0/node_modules/@ckeditor/ckeditor5-remove-format/dist/index.js +0 -4
  144. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-select-all@44.3.0/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +0 -4
  145. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-show-blocks@44.3.0/node_modules/@ckeditor/ckeditor5-show-blocks/dist/index.js +0 -4
  146. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-source-editing@44.3.0/node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js +0 -12
  147. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-special-characters@44.3.0/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js +0 -4
  148. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@44.3.0/node_modules/@ckeditor/ckeditor5-table/dist/index.js +0 -19
  149. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-ui@44.3.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +0 -29
  150. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-widget@44.3.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +0 -4
  151. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_DataView.js +0 -1
  152. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Hash.js +0 -1
  153. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_ListCache.js +0 -1
  154. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Map.js +0 -1
  155. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_MapCache.js +0 -1
  156. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Promise.js +0 -1
  157. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Set.js +0 -1
  158. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_SetCache.js +0 -1
  159. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Stack.js +0 -1
  160. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js +0 -1
  161. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Uint8Array.js +0 -1
  162. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_WeakMap.js +0 -1
  163. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_apply.js +0 -1
  164. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayEach.js +0 -1
  165. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayFilter.js +0 -1
  166. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayLikeKeys.js +0 -1
  167. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayMap.js +0 -1
  168. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayPush.js +0 -1
  169. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arrayReduce.js +0 -1
  170. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_arraySome.js +0 -1
  171. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_asciiToArray.js +0 -1
  172. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_asciiWords.js +0 -1
  173. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assignMergeValue.js +0 -1
  174. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assignValue.js +0 -1
  175. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_assocIndexOf.js +0 -1
  176. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseAssign.js +0 -1
  177. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseAssignIn.js +0 -1
  178. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseAssignValue.js +0 -1
  179. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseClone.js +0 -1
  180. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseCreate.js +0 -1
  181. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseEach.js +0 -1
  182. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseFor.js +0 -1
  183. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseForOwn.js +0 -1
  184. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGet.js +0 -1
  185. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetAllKeys.js +0 -1
  186. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js +0 -1
  187. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseHasIn.js +0 -1
  188. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsArguments.js +0 -1
  189. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsEqual.js +0 -1
  190. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsEqualDeep.js +0 -1
  191. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsMap.js +0 -1
  192. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsMatch.js +0 -1
  193. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsNative.js +0 -1
  194. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsSet.js +0 -1
  195. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIsTypedArray.js +0 -1
  196. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseIteratee.js +0 -1
  197. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseKeys.js +0 -1
  198. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseKeysIn.js +0 -1
  199. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMap.js +0 -1
  200. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMatches.js +0 -1
  201. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMatchesProperty.js +0 -1
  202. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMerge.js +0 -1
  203. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseMergeDeep.js +0 -1
  204. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseProperty.js +0 -1
  205. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_basePropertyDeep.js +0 -1
  206. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_basePropertyOf.js +0 -1
  207. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseRest.js +0 -1
  208. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSet.js +0 -1
  209. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSetToString.js +0 -1
  210. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseSlice.js +0 -1
  211. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTimes.js +0 -1
  212. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseToString.js +0 -1
  213. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTrim.js +0 -1
  214. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUnary.js +0 -1
  215. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseUnset.js +0 -1
  216. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cacheHas.js +0 -1
  217. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_castPath.js +0 -1
  218. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_castSlice.js +0 -1
  219. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneArrayBuffer.js +0 -1
  220. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneBuffer.js +0 -1
  221. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneDataView.js +0 -1
  222. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneRegExp.js +0 -1
  223. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneSymbol.js +0 -1
  224. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_cloneTypedArray.js +0 -1
  225. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copyArray.js +0 -1
  226. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copyObject.js +0 -1
  227. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copySymbols.js +0 -1
  228. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_copySymbolsIn.js +0 -1
  229. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_coreJsData.js +0 -1
  230. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createAssigner.js +0 -1
  231. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createBaseEach.js +0 -1
  232. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createBaseFor.js +0 -1
  233. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createCaseFirst.js +0 -1
  234. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_createCompounder.js +0 -1
  235. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_deburrLetter.js +0 -1
  236. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_defineProperty.js +0 -1
  237. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_equalArrays.js +0 -1
  238. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_equalByTag.js +0 -1
  239. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_equalObjects.js +0 -1
  240. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js +0 -1
  241. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getAllKeys.js +0 -1
  242. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getAllKeysIn.js +0 -1
  243. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMapData.js +0 -1
  244. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getMatchData.js +0 -1
  245. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getNative.js +0 -1
  246. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getPrototype.js +0 -1
  247. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js +0 -1
  248. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getSymbols.js +0 -1
  249. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getSymbolsIn.js +0 -1
  250. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getTag.js +0 -1
  251. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getValue.js +0 -1
  252. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hasPath.js +0 -1
  253. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hasUnicode.js +0 -1
  254. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hasUnicodeWord.js +0 -1
  255. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashClear.js +0 -1
  256. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashDelete.js +0 -1
  257. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashGet.js +0 -1
  258. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashHas.js +0 -1
  259. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_hashSet.js +0 -1
  260. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_initCloneArray.js +0 -1
  261. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_initCloneByTag.js +0 -1
  262. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_initCloneObject.js +0 -1
  263. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isIndex.js +0 -1
  264. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isIterateeCall.js +0 -1
  265. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKey.js +0 -1
  266. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isKeyable.js +0 -1
  267. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isMasked.js +0 -1
  268. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isPrototype.js +0 -1
  269. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_isStrictComparable.js +0 -1
  270. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheClear.js +0 -1
  271. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheDelete.js +0 -1
  272. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheGet.js +0 -1
  273. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheHas.js +0 -1
  274. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_listCacheSet.js +0 -1
  275. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheClear.js +0 -1
  276. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheDelete.js +0 -1
  277. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheGet.js +0 -1
  278. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheHas.js +0 -1
  279. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapCacheSet.js +0 -1
  280. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_mapToArray.js +0 -1
  281. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_matchesStrictComparable.js +0 -1
  282. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_memoizeCapped.js +0 -1
  283. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeCreate.js +0 -1
  284. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeKeys.js +0 -1
  285. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nativeKeysIn.js +0 -1
  286. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_nodeUtil.js +0 -1
  287. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js +0 -1
  288. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_overArg.js +0 -1
  289. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_overRest.js +0 -1
  290. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_parent.js +0 -1
  291. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js +0 -1
  292. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_safeGet.js +0 -1
  293. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheAdd.js +0 -1
  294. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setCacheHas.js +0 -1
  295. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToArray.js +0 -1
  296. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_setToString.js +0 -1
  297. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_shortOut.js +0 -1
  298. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackClear.js +0 -1
  299. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackDelete.js +0 -1
  300. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackGet.js +0 -1
  301. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackHas.js +0 -1
  302. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stackSet.js +0 -1
  303. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stringToArray.js +0 -1
  304. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_stringToPath.js +0 -1
  305. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toKey.js +0 -1
  306. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_toSource.js +0 -1
  307. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_trimmedEndIndex.js +0 -1
  308. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_unicodeToArray.js +0 -1
  309. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_unicodeWords.js +0 -1
  310. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/assignIn.js +0 -1
  311. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/clone.js +0 -1
  312. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/cloneDeep.js +0 -1
  313. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/cloneDeepWith.js +0 -1
  314. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/constant.js +0 -1
  315. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/debounce.js +0 -1
  316. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/deburr.js +0 -1
  317. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/eq.js +0 -1
  318. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/escapeRegExp.js +0 -1
  319. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/get.js +0 -1
  320. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/hasIn.js +0 -1
  321. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/identity.js +0 -1
  322. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArguments.js +0 -1
  323. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArray.js +0 -1
  324. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArrayLike.js +0 -1
  325. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArrayLikeObject.js +0 -1
  326. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isBuffer.js +0 -1
  327. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isElement.js +0 -1
  328. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isEqual.js +0 -1
  329. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isEqualWith.js +0 -1
  330. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isFunction.js +0 -1
  331. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isLength.js +0 -1
  332. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isMap.js +0 -1
  333. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js +0 -1
  334. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js +0 -1
  335. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isPlainObject.js +0 -1
  336. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSet.js +0 -1
  337. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isString.js +0 -1
  338. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSymbol.js +0 -1
  339. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isTypedArray.js +0 -1
  340. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/keys.js +0 -1
  341. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/keysIn.js +0 -1
  342. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/last.js +0 -1
  343. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/map.js +0 -1
  344. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/mapValues.js +0 -1
  345. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/memoize.js +0 -1
  346. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/merge.js +0 -1
  347. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/mergeWith.js +0 -1
  348. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/now.js +0 -1
  349. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/property.js +0 -1
  350. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/set.js +0 -1
  351. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/startCase.js +0 -1
  352. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/stubArray.js +0 -1
  353. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/stubFalse.js +0 -1
  354. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/throttle.js +0 -1
  355. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toNumber.js +0 -1
  356. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toPlainObject.js +0 -1
  357. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toString.js +0 -1
  358. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/unset.js +0 -1
  359. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/upperFirst.js +0 -1
  360. package/dist/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/words.js +0 -1
  361. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.12_prettier@3.4.2_storybook@8.6.12_prettier@3.4.2_ → @storybook_core@8.6.12_prettier@3.5.3_storybook@8.6.12_prettier@3.5.3_}/node_modules/@storybook/core/dist/channels/index.js +0 -0
  362. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.12_prettier@3.4.2_storybook@8.6.12_prettier@3.4.2_ → @storybook_core@8.6.12_prettier@3.5.3_storybook@8.6.12_prettier@3.5.3_}/node_modules/@storybook/core/dist/client-logger/index.js +0 -0
  363. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.12_prettier@3.4.2_storybook@8.6.12_prettier@3.4.2_ → @storybook_core@8.6.12_prettier@3.5.3_storybook@8.6.12_prettier@3.5.3_}/node_modules/@storybook/core/dist/core-events/index.js +0 -0
  364. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.12_prettier@3.4.2_storybook@8.6.12_prettier@3.4.2_ → @storybook_core@8.6.12_prettier@3.5.3_storybook@8.6.12_prettier@3.5.3_}/node_modules/@storybook/core/dist/csf/index.js +0 -0
  365. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.12_prettier@3.4.2_storybook@8.6.12_prettier@3.4.2_ → @storybook_core@8.6.12_prettier@3.5.3_storybook@8.6.12_prettier@3.5.3_}/node_modules/@storybook/core/dist/preview-api/index.js +0 -0
  366. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.12_prettier@3.4.2_storybook@8.6.12_prettier@3.4.2_ → @storybook_core@8.6.12_prettier@3.5.3_storybook@8.6.12_prettier@3.5.3_}/node_modules/@storybook/core/dist/preview-errors.js +0 -0
  367. /package/dist/node_modules/.pnpm/{@vitest_browser@3.1.2_msw@2.7.3_@types_node@22.13.10_typescript@5.8.3__playwright@1.52._d9f437d9be40af4c1087950720317100 → @vitest_browser@3.1.2_msw@2.7.3_@types_node@22.14.1_typescript@5.8.3__playwright@1.52.0_92e0976dd8f8178c7dbbaa4988dfa8c8}/node_modules/@vitest/browser/context.js +0 -0
  368. /package/dist/node_modules/.pnpm/{vitest@3.1.2_@types_debug@4.1.12_@types_node@22.13.10_@vitest_browser@3.1.2_@vitest_ui@_b3e273fb96cdae5dad1113241e94b66d → vitest@3.1.2_@types_debug@4.1.12_@types_node@22.14.1_@vitest_browser@3.1.2_@vitest_ui@3_941980ac824345de547571ef69676a52}/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js +0 -0
  369. /package/dist/node_modules/.pnpm/{vitest@3.1.2_@types_debug@4.1.12_@types_node@22.13.10_@vitest_browser@3.1.2_@vitest_ui@_b3e273fb96cdae5dad1113241e94b66d → vitest@3.1.2_@types_debug@4.1.12_@types_node@22.14.1_@vitest_browser@3.1.2_@vitest_ui@3_941980ac824345de547571ef69676a52}/node_modules/vitest/dist/chunks/date.CDOsz-HY.js +0 -0
  370. /package/dist/node_modules/.pnpm/{vitest@3.1.2_@types_debug@4.1.12_@types_node@22.13.10_@vitest_browser@3.1.2_@vitest_ui@_b3e273fb96cdae5dad1113241e94b66d → vitest@3.1.2_@types_debug@4.1.12_@types_node@22.14.1_@vitest_browser@3.1.2_@vitest_ui@3_941980ac824345de547571ef69676a52}/node_modules/vitest/dist/chunks/utils.CgTj3MsC.js +0 -0
  371. /package/dist/node_modules/.pnpm/{vitest@3.1.2_@types_debug@4.1.12_@types_node@22.13.10_@vitest_browser@3.1.2_@vitest_ui@_b3e273fb96cdae5dad1113241e94b66d → vitest@3.1.2_@types_debug@4.1.12_@types_node@22.14.1_@vitest_browser@3.1.2_@vitest_ui@3_941980ac824345de547571ef69676a52}/node_modules/vitest/dist/chunks/vi.ClIskdbk.js +0 -0
@@ -1,29 +0,0 @@
1
- var St=Object.defineProperty;var Mt=(s,o,e)=>o in s?St(s,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[o]=e;var l=(s,o,e)=>Mt(s,typeof o!="symbol"?o+"":o,e);import{getEnvKeystrokeText as ee,uid as te,env as M,delay as Nt,createElement as I,KeystrokeHandler as P,FocusTracker as v,toUnit as le,global as p,Rect as V,DomEmitterMixin as ye,ObservableMixin as ae,Collection as Ce,isIterable as De,CKEditorError as x,getOptimalPosition as Ve,logWarning as E,EmitterMixin as nt,isVisible as L,isNode as rt,priorities as Wt,isText as Gt,ResizeObserver as lt,first as Rt,parseBase64EncodedObject as at,isRange as Ht,toArray as xe}from"../../../../../@ckeditor_ckeditor5-utils@44.3.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{Plugin as Ee,icons as m,ContextPlugin as zt}from"../../../../../@ckeditor_ckeditor5-core@44.3.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import Se from"../../../../../color-parse@1.4.2/node_modules/color-parse/index.js";import*as ct from"../../../../../../../_virtual/index2.js";import{HexBase as Ut}from"../../../../../vanilla-colorful@0.7.2/node_modules/vanilla-colorful/lib/entrypoints/hex.js";import"../../../../../@ckeditor_ckeditor5-engine@44.3.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import $t from"../../../../../lodash-es@4.17.21/node_modules/lodash-es/assignIn.js";import ie from"../../../../../lodash-es@4.17.21/node_modules/lodash-es/isObject.js";import Oe from"../../../../../lodash-es@4.17.21/node_modules/lodash-es/cloneDeep.js";import be from"../../../../../lodash-es@4.17.21/node_modules/lodash-es/debounce.js";import Ie from"../../../../../lodash-es@4.17.21/node_modules/lodash-es/isElement.js";import Kt from"../../../../../lodash-es@4.17.21/node_modules/lodash-es/cloneDeepWith.js";import Zt from"../../../../../lodash-es@4.17.21/node_modules/lodash-es/throttle.js";/**
2
- * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */class D extends Ce{constructor(e=[]){super(e,{idProperty:"viewUid"});l(this,"_parentElement");this.on("add",(t,i,n)=>{this._renderViewIntoCollectionParent(i,n)}),this.on("remove",(t,i)=>{i.element&&this._parentElement&&i.element.remove()}),this._parentElement=null}destroy(){this.map(e=>e.destroy())}setParent(e){this._parentElement=e;for(const t of this)this._renderViewIntoCollectionParent(t)}delegate(...e){if(!e.length||!jt(e))throw new x("ui-viewcollection-delegate-wrong-events",this);return{to:t=>{for(const i of this)for(const n of e)i.delegate(n).to(t);this.on("add",(i,n)=>{for(const r of e)n.delegate(r).to(t)}),this.on("remove",(i,n)=>{for(const r of e)n.stopDelegating(r,t)})}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}remove(e){return super.remove(e)}}function jt(s){return s.every(o=>typeof o=="string")}const Xt="http://www.w3.org/1999/xhtml";class O extends nt(){constructor(e){super();l(this,"ns");l(this,"tag");l(this,"text");l(this,"attributes");l(this,"children");l(this,"eventListeners");l(this,"_isRendered");l(this,"_revertData");Object.assign(this,Ne(Me(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData=Re(),this._renderNode({node:e,intoFragment:!1,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new x("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){function*e(t){if(t.children)for(const i of t.children)se(i)?yield i:Pe(i)&&(yield*e(i))}yield*e(this)}static bind(e,t){return{to(i,n){return new qt({eventNameOrFunction:i,attribute:i,observable:e,emitter:t,callback:n})},if(i,n,r){return new ht({observable:e,emitter:t,attribute:i,valueIfTrue:n,callback:r})}}}static extend(e,t){if(e._isRendered)throw new x("template-extend-render",[this,e]);pt(e,Ne(Me(t)))}_renderNode(e){let t;if(e.node?t=this.tag&&this.text:t=this.tag?this.text:!this.text,t)throw new x("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||Xt,this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),Y(this.text)?this._bindToObservable({schema:this.text,updater:Qt(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){if(!this.attributes)return;const t=e.node,i=e.revertData;for(const n in this.attributes){const r=t.getAttribute(n),a=this.attributes[n];i&&(i.attributes[n]=r);const u=Ge(a)?a[0].ns:null;if(Y(a)){const c=Ge(a)?a[0].value:a;i&&He(n)&&c.unshift(r),this._bindToObservable({schema:c,updater:Jt(t,n,u),data:e})}else if(n=="style"&&typeof a[0]!="string")this._renderStyleAttribute(a[0],e);else{i&&r&&He(n)&&a.unshift(r);const c=a.map(h=>h&&(h.value||h)).reduce((h,f)=>h.concat(f),[]).reduce(ft,"");R(c)||t.setAttributeNS(u,n,c)}}}_renderStyleAttribute(e,t){const i=t.node;for(const n in e){const r=e[n];Y(r)?this._bindToObservable({schema:[r],updater:ei(i,n),data:t}):i.style[n]=r}}_renderElementChildren(e){const t=e.node,i=e.intoFragment?document.createDocumentFragment():t,n=e.isApplying;let r=0;for(const a of this.children)if(Be(a)){if(!n){a.setParent(t);for(const u of a)i.appendChild(u.element)}}else if(se(a))n||(a.isRendered||a.render(),i.appendChild(a.element));else if(rt(a))i.appendChild(a);else if(n){const u=e.revertData,c=Re();u.children.push(c),a._renderNode({intoFragment:!1,node:i.childNodes[r++],isApplying:!0,revertData:c})}else i.appendChild(a.render());e.intoFragment&&t.appendChild(i)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const i=this.eventListeners[t].map(n=>{const[r,a]=t.split("@");return n.activateDomEventListener(r,a,e)});e.revertData&&e.revertData.bindings.push(i)}}_bindToObservable({schema:e,updater:t,data:i}){const n=i.revertData;ut(e,t,i);const r=e.filter(a=>!R(a)).filter(a=>a.observable).map(a=>a.activateAttributeListener(e,t,i));n&&n.bindings.push(r)}_revertTemplateFromNode(e,t){for(const n of t.bindings)for(const r of n)r();if(t.text){e.textContent=t.text;return}const i=e;for(const n in t.attributes){const r=t.attributes[n];r===null?i.removeAttribute(n):i.setAttribute(n,r)}for(let n=0;n<t.children.length;++n)this._revertTemplateFromNode(i.childNodes[n],t.children[n])}}class Z{constructor(o){l(this,"attribute");l(this,"observable");l(this,"emitter");l(this,"callback");this.attribute=o.attribute,this.observable=o.observable,this.emitter=o.emitter,this.callback=o.callback}getValue(o){const e=this.observable[this.attribute];return this.callback?this.callback(e,o):e}activateAttributeListener(o,e,t){const i=()=>ut(o,e,t);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,i),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,i)}}}class qt extends Z{constructor(e){super(e);l(this,"eventNameOrFunction");this.eventNameOrFunction=e.eventNameOrFunction}activateDomEventListener(e,t,i){const n=(r,a)=>{(!t||a.target.matches(t))&&(typeof this.eventNameOrFunction=="function"?this.eventNameOrFunction(a):this.observable.fire(this.eventNameOrFunction,a))};return this.emitter.listenTo(i.node,e,n),()=>{this.emitter.stopListening(i.node,e,n)}}}class ht extends Z{constructor(e){super(e);l(this,"valueIfTrue");this.valueIfTrue=e.valueIfTrue}getValue(e){const t=super.getValue(e);return R(t)?!1:this.valueIfTrue||!0}}function Y(s){return s?(s.value&&(s=s.value),Array.isArray(s)?s.some(Y):s instanceof Z):!1}function Yt(s,o){return s.map(e=>e instanceof Z?e.getValue(o):e)}function ut(s,o,{node:e}){const t=Yt(s,e);let i;s.length==1&&s[0]instanceof ht?i=t[0]:i=t.reduce(ft,""),R(i)?o.remove():o.set(i)}function Qt(s){return{set(o){s.textContent=o},remove(){s.textContent=""}}}function Jt(s,o,e){return{set(t){s.setAttributeNS(e,o,t)},remove(){s.removeAttributeNS(e,o)}}}function ei(s,o){return{set(e){s.style[o]=e},remove(){s.style[o]=null}}}function Me(s){return Kt(s,e=>{if(e&&(e instanceof Z||Pe(e)||se(e)||Be(e)))return e})}function Ne(s){if(typeof s=="string"?s=si(s):s.text&&oi(s),s.on&&(s.eventListeners=ii(s.on),delete s.on),!s.text){s.attributes&&ti(s.attributes);const o=[];if(s.children)if(Be(s.children))o.push(s.children);else for(const e of s.children)Pe(e)||se(e)||rt(e)?o.push(e):o.push(new O(e));s.children=o}return s}function ti(s){for(const o in s)s[o].value&&(s[o].value=xe(s[o].value)),dt(s,o)}function ii(s){for(const o in s)dt(s,o);return s}function si(s){return{text:[s]}}function oi(s){s.text=xe(s.text)}function dt(s,o){s[o]=xe(s[o])}function ft(s,o){return R(o)?s:R(s)?o:`${s} ${o}`}function We(s,o){for(const e in o)s[e]?s[e].push(...o[e]):s[e]=o[e]}function pt(s,o){if(o.attributes&&(s.attributes||(s.attributes={}),We(s.attributes,o.attributes)),o.eventListeners&&(s.eventListeners||(s.eventListeners={}),We(s.eventListeners,o.eventListeners)),o.text&&s.text.push(...o.text),o.children&&o.children.length){if(s.children.length!=o.children.length)throw new x("ui-template-extend-children-mismatch",s);let e=0;for(const t of o.children)pt(s.children[e++],t)}}function R(s){return!s&&s!==0}function se(s){return s instanceof d}function Pe(s){return s instanceof O}function Be(s){return s instanceof D}function Ge(s){return ie(s[0])&&s[0].ns}function Re(){return{children:[],bindings:[],attributes:{}}}function He(s){return s=="class"||s=="style"}class d extends ye(ae()){constructor(e){super();l(this,"element");l(this,"isRendered");l(this,"locale");l(this,"t");l(this,"template");l(this,"_viewCollections");l(this,"_unboundChildren");l(this,"_bindTemplate");this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new Ce,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",(t,i)=>{i.locale=e,i.t=e&&e.t}),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=O.bind(this,this)}createCollection(e){const t=new D(e);return this._viewCollections.add(t),t}registerChild(e){De(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){De(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new O(e)}extendTemplate(e){O.extend(this.template,e)}render(){if(this.isRendered)throw new x("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map(e=>e.destroy()),this.template&&this.template._revertData&&this.template.revert(this.element)}}/**
5
- * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
6
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
7
- */function mt({emitter:s,activator:o,callback:e,contextElements:t,listenerOptions:i}){s.listenTo(document,"mousedown",(n,r)=>{if(!o())return;const a=typeof r.composedPath=="function"?r.composedPath():[],u=typeof t=="function"?t():t;for(const c of u)if(c.contains(r.target)||a.includes(c))return;e()},i)}/**
8
- * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
9
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
10
- */function Xs(s){class o extends s{disableCssTransitions(){this._isCssTransitionsDisabled=!0}enableCssTransitions(){this._isCssTransitionsDisabled=!1}constructor(...t){super(...t),this.set("_isCssTransitionsDisabled",!1),this.initializeCssTransitionDisablerMixin()}initializeCssTransitionDisablerMixin(){this.extendTemplate({attributes:{class:[this.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}}return o}/**
11
- * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
12
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
13
- */function qs({view:s}){s.listenTo(s.element,"submit",(o,e)=>{e.preventDefault(),s.fire("submit")},{useCapture:!0})}/**
14
- * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
15
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
16
- */function ni({keystrokeHandler:s,focusTracker:o,gridItems:e,numberOfColumns:t,uiLanguageDirection:i}){const n=typeof t=="number"?()=>t:t;s.set("arrowright",r((c,h)=>i==="rtl"?u(c,h.length):a(c,h.length))),s.set("arrowleft",r((c,h)=>i==="rtl"?a(c,h.length):u(c,h.length))),s.set("arrowup",r((c,h)=>{let f=c-n();return f<0&&(f=c+n()*Math.floor(h.length/n()),f>h.length-1&&(f-=n())),f})),s.set("arrowdown",r((c,h)=>{let f=c+n();return f>h.length-1&&(f=c%n()),f}));function r(c){return h=>{const f=e.find(S=>S.element===o.focusedElement),g=e.getIndex(f),k=c(g,e);e.get(k).focus(),h.stopPropagation(),h.preventDefault()}}function a(c,h){return c===h-1?0:c+1}function u(c,h){return c===0?h-1:c-1}}const oe=class oe extends d{constructor(){super();const o=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.set("isColorInherited",!0),this.set("isVisible",!0),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon",o.if("isVisible","ck-hidden",e=>!e),"ck-reset_all-excluded",o.if("isColorInherited","ck-icon_inherit-color")],viewBox:o.to("viewBox"),"aria-hidden":!0}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",()=>{this._updateXMLContent(),this._colorFillPaths()}),this.on("change:fillColor",()=>{this._colorFillPaths()})}_updateXMLContent(){if(this.content){const e=new DOMParser().parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");t&&(this.viewBox=t);for(const{name:i,value:n}of Array.from(e.attributes))oe.presentationalAttributeNames.includes(i)&&this.element.setAttribute(i,n);for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach(o=>{o.style.fill=this.fillColor})}};l(oe,"presentationalAttributeNames",["alignment-baseline","baseline-shift","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","unicode-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"]);let F=oe;class wt extends d{constructor(){super(),this.set({style:void 0,text:void 0,id:void 0});const o=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:o.to("style"),id:o.to("id")},children:[{text:o.to("text")}]})}}class b extends d{constructor(e,t=new wt){super(e);l(this,"children");l(this,"labelView");l(this,"iconView");l(this,"keystrokeView");l(this,"_focusDelayed",null);const i=this.bindTemplate,n=te();this.set("_ariaPressed",!1),this.set("_ariaChecked",!1),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",`ck-editor__aria-label_${n}`),this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke",void 0),this.set("label",void 0),this.set("role",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.labelView=this._setupLabelView(t),this.iconView=new F,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));const r={tag:"button",attributes:{class:["ck","ck-button",i.to("class"),i.if("isEnabled","ck-disabled",a=>!a),i.if("isVisible","ck-hidden",a=>!a),i.to("isOn",a=>a?"ck-on":"ck-off"),i.if("withText","ck-button_with-text"),i.if("withKeystroke","ck-button_with-keystroke")],role:i.to("role"),type:i.to("type",a=>a||"button"),tabindex:i.to("tabindex"),"aria-checked":i.to("_ariaChecked"),"aria-pressed":i.to("_ariaPressed"),"aria-label":i.to("ariaLabel"),"aria-labelledby":i.to("ariaLabelledBy"),"aria-disabled":i.if("isEnabled",!0,a=>!a),"data-cke-tooltip-text":i.to("_tooltipString"),"data-cke-tooltip-position":i.to("tooltipPosition")},children:this.children,on:{click:i.to(a=>{this.isEnabled?this.fire("execute"):a.preventDefault()})}};this.bind("_ariaPressed").to(this,"isOn",this,"isToggleable",this,"role",(a,u,c)=>!u||ze(c)?!1:String(!!a)),this.bind("_ariaChecked").to(this,"isOn",this,"isToggleable",this,"role",(a,u,c)=>!u||!ze(c)?!1:String(!!a)),M.isSafari&&(this._focusDelayed||(this._focusDelayed=Nt(()=>this.focus(),0)),r.on.mousedown=i.to(()=>{this._focusDelayed()}),r.on.mouseup=i.to(()=>{this._focusDelayed.cancel()})),this.setTemplate(r)}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}destroy(){this._focusDelayed&&this._focusDelayed.cancel(),super.destroy()}_setupLabelView(e){return e.bind("text","style","id").to(this,"label","labelStyle","ariaLabelledBy"),e}_createKeystrokeView(){const e=new d;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",t=>ee(t))}]}),e}_getTooltipString(e,t,i){return e?typeof e=="string"?e:(i&&(i=ee(i)),e instanceof Function?e(t,i):`${t}${i?` (${i})`:""}`):""}}function ze(s){switch(s){case"radio":case"checkbox":case"option":case"switch":case"menuitemcheckbox":case"menuitemradio":return!0;default:return!1}}class ri extends d{constructor(e,t={}){super(e);l(this,"children");l(this,"iconView");const i=this.bindTemplate;this.set("label",t.label||""),this.set("class",t.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",i.to("class")]},children:this.children}),t.icon&&(this.iconView=new F,this.iconView.content=t.icon,this.children.add(this.iconView));const n=new d(e);n.setTemplate({tag:"h2",attributes:{class:["ck","ck-form__header__label"],role:"presentation"},children:[{text:i.to("label")}]}),this.children.add(n)}}class U extends nt(){constructor(e){super();l(this,"focusables");l(this,"focusTracker");l(this,"keystrokeHandler");l(this,"actions");if(this.focusables=e.focusables,this.focusTracker=e.focusTracker,this.keystrokeHandler=e.keystrokeHandler,this.actions=e.actions,e.actions&&e.keystrokeHandler)for(const t in e.actions){let i=e.actions[t];typeof i=="string"&&(i=[i]);for(const n of i)e.keystrokeHandler.set(n,(r,a)=>{this[t](),a()},e.keystrokeHandlerOptions)}this.on("forwardCycle",()=>this.focusFirst(),{priority:"low"}),this.on("backwardCycle",()=>this.focusLast(),{priority:"low"})}get first(){return this.focusables.find(ue)||null}get last(){return this.focusables.filter(ue).slice(-1)[0]||null}get next(){return this._getDomFocusableItem(1)}get previous(){return this._getDomFocusableItem(-1)}get current(){let e=null;return this.focusTracker.focusedElement===null?null:(this.focusables.find((t,i)=>{const n=t.element===this.focusTracker.focusedElement;return n&&(e=i),n}),e)}focusFirst(){this._focus(this.first,1)}focusLast(){this._focus(this.last,-1)}focusNext(){const e=this.next;if(e&&this.focusables.getIndex(e)===this.current){this.fire("forwardCycle");return}e===this.first?this.fire("forwardCycle"):this._focus(e,1)}focusPrevious(){const e=this.previous;if(e&&this.focusables.getIndex(e)===this.current){this.fire("backwardCycle");return}e===this.last?this.fire("backwardCycle"):this._focus(e,-1)}chain(e){const t=()=>this.current===null?null:this.focusables.get(this.current);this.listenTo(e,"forwardCycle",i=>{const n=t();this.focusNext(),n!==t()&&i.stop()},{priority:"low"}),this.listenTo(e,"backwardCycle",i=>{const n=t();this.focusPrevious(),n!==t()&&i.stop()},{priority:"low"})}unchain(e){this.stopListening(e)}_focus(e,t){e&&this.focusTracker.focusedElement!==e.element&&e.focus(t)}_getDomFocusableItem(e){const t=this.focusables.length;if(!t)return null;const i=this.current;if(i===null)return this[e===1?"first":"last"];let n=this.focusables.get(i),r=(i+t+e)%t;do{const a=this.focusables.get(r);if(ue(a)){n=a;break}r=(r+t+e)%t}while(r!==i);return n}}function ue(s){return j(s)&&L(s.element)}function j(s){return"focus"in s&&typeof s.focus=="function"}function li(s){return j(s)&&"focusCycler"in s&&s.focusCycler instanceof U}function ai(s){class o extends s{constructor(...i){super(...i);l(this,"_onDragBound",this._onDrag.bind(this));l(this,"_onDragEndBound",this._onDragEnd.bind(this));l(this,"_lastDraggingCoordinates",{x:0,y:0});this.on("render",()=>{this._attachListeners()}),this.set("isDragging",!1)}_attachListeners(){this.listenTo(this.element,"mousedown",this._onDragStart.bind(this)),this.listenTo(this.element,"touchstart",this._onDragStart.bind(this))}_attachDragListeners(){this.listenTo(p.document,"mouseup",this._onDragEndBound),this.listenTo(p.document,"touchend",this._onDragEndBound),this.listenTo(p.document,"mousemove",this._onDragBound),this.listenTo(p.document,"touchmove",this._onDragBound)}_detachDragListeners(){this.stopListening(p.document,"mouseup",this._onDragEndBound),this.stopListening(p.document,"touchend",this._onDragEndBound),this.stopListening(p.document,"mousemove",this._onDragBound),this.stopListening(p.document,"touchmove",this._onDragBound)}_onDragStart(i,n){if(!this._isHandleElementPressed(n))return;this._attachDragListeners();let r=0,a=0;n instanceof MouseEvent?(r=n.clientX,a=n.clientY):(r=n.touches[0].clientX,a=n.touches[0].clientY),this._lastDraggingCoordinates={x:r,y:a},this.isDragging=!0}_onDrag(i,n){if(!this.isDragging){this._detachDragListeners();return}let r=0,a=0;n instanceof MouseEvent?(r=n.clientX,a=n.clientY):(r=n.touches[0].clientX,a=n.touches[0].clientY),n.preventDefault(),this.fire("drag",{deltaX:Math.round(r-this._lastDraggingCoordinates.x),deltaY:Math.round(a-this._lastDraggingCoordinates.y)}),this._lastDraggingCoordinates={x:r,y:a}}_onDragEnd(){this._detachDragListeners(),this.isDragging=!1}_isHandleElementPressed(i){return this.dragHandleElement?this.dragHandleElement===i.target||i.target instanceof HTMLElement&&this.dragHandleElement.contains(i.target):!1}}return o}class ci extends d{constructor(e){super(e);l(this,"children");l(this,"keystrokes");l(this,"focusCycler");l(this,"_focusTracker");l(this,"_focusables");this.children=this.createCollection(),this.keystrokes=new P,this._focusTracker=new v,this._focusables=new D,this.focusCycler=new U({focusables:this._focusables,focusTracker:this._focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__actions"]},children:this.children})}render(){super.render(),this.keystrokes.listenTo(this.element)}setButtons(e){for(const t of e){const i=new b(this.locale);let n;i.on("execute",()=>t.onExecute()),t.onCreate&&t.onCreate(i);for(n in t)n!="onExecute"&&n!="onCreate"&&i.set(n,t[n]);this.children.add(i)}this._updateFocusCyclableItems()}focus(e){e===-1?this.focusCycler.focusLast():this.focusCycler.focusFirst()}_updateFocusCyclableItems(){Array.from(this.children).forEach(e=>{this._focusables.add(e),this._focusTracker.add(e.element)})}}class hi extends d{constructor(e){super(e);l(this,"children");this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__content"]},children:this.children})}reset(){for(;this.children.length;)this.children.remove(0)}}const y={SCREEN_CENTER:"screen-center",EDITOR_CENTER:"editor-center",EDITOR_TOP_SIDE:"editor-top-side",EDITOR_TOP_CENTER:"editor-top-center",EDITOR_BOTTOM_CENTER:"editor-bottom-center",EDITOR_ABOVE_CENTER:"editor-above-center",EDITOR_BELOW_CENTER:"editor-below-center"},Ue=le("px"),ne=class ne extends ai(d){constructor(e,{getCurrentDomRoot:t,getViewportOffset:i,keystrokeHandlerOptions:n}){super(e);l(this,"parts");l(this,"headerView");l(this,"closeButtonView");l(this,"actionsView");l(this,"contentView");l(this,"keystrokes");l(this,"focusTracker");l(this,"wasMoved",!1);l(this,"_getCurrentDomRoot");l(this,"_getViewportOffset");l(this,"_focusables");l(this,"_focusCycler");const r=this.bindTemplate,a=e.t;this.set("className",""),this.set("ariaLabel",a("Editor dialog")),this.set("isModal",!1),this.set("position",y.SCREEN_CENTER),this.set("_isVisible",!1),this.set("_isTransparent",!1),this.set("_top",0),this.set("_left",0),this._getCurrentDomRoot=t,this._getViewportOffset=i,this.decorate("moveTo"),this.parts=this.createCollection(),this.keystrokes=new P,this.focusTracker=new v,this._focusables=new D,this._focusCycler=new U({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"},keystrokeHandlerOptions:n}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog-overlay",r.if("isModal","ck-dialog-overlay__transparent",u=>!u),r.if("_isVisible","ck-hidden",u=>!u)],tabindex:"-1"},children:[{tag:"div",attributes:{tabindex:"-1",class:["ck","ck-dialog",r.if("isModal","ck-dialog_modal"),r.to("className")],role:"dialog","aria-label":r.to("ariaLabel"),style:{top:r.to("_top",u=>Ue(u)),left:r.to("_left",u=>Ue(u)),visibility:r.if("_isTransparent","hidden")}},children:this.parts}]})}render(){super.render(),this.keystrokes.set("Esc",(e,t)=>{e.defaultPrevented||(this.fire("close",{source:"escKeyPress"}),t())}),this.on("drag",(e,{deltaX:t,deltaY:i})=>{this.wasMoved=!0,this.moveBy(t,i)}),this.listenTo(p.window,"resize",()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()}),this.listenTo(p.document,"scroll",()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()}),this.on("change:_isVisible",(e,t,i)=>{i&&(this._isTransparent=!0,setTimeout(()=>{this.updatePosition(),this._isTransparent=!1,this.focus()},10))}),this.keystrokes.listenTo(this.element)}get dragHandleElement(){return this.headerView&&!this.isModal?this.headerView.element:null}setupParts({icon:e,title:t,hasCloseButton:i=!0,content:n,actionButtons:r}){t&&(this.headerView=new ri(this.locale,{icon:e}),i&&(this.closeButtonView=this._createCloseButton(),this.headerView.children.add(this.closeButtonView)),this.headerView.label=t,this.ariaLabel=t,this.parts.add(this.headerView,0)),n&&(n instanceof d&&(n=[n]),this.contentView=new hi(this.locale),this.contentView.children.addMany(n),this.parts.add(this.contentView)),r&&(this.actionsView=new ci(this.locale),this.actionsView.setButtons(r),this.parts.add(this.actionsView)),this._updateFocusCyclableItems()}focus(){this._focusCycler.focusFirst()}moveTo(e,t){const i=this._getViewportRect(),n=this._getDialogRect();e+n.width>i.right&&(e=i.right-n.width),e<i.left&&(e=i.left),t<i.top&&(t=i.top),this._moveTo(e,t)}_moveTo(e,t){this._left=e,this._top=t}moveBy(e,t){this.moveTo(this._left+e,this._top+t)}_moveOffScreen(){this._moveTo(-9999,-9999)}updatePosition(){if(!this.element||!this.element.parentNode)return;const e=this._getViewportRect();let t=this.position,i;this._getCurrentDomRoot()?i=this._getVisibleDomRootRect(e):t=y.SCREEN_CENTER;const n=ne.defaultOffset,r=this._getDialogRect();switch(t){case y.EDITOR_TOP_SIDE:{if(i){const a=this.locale.contentLanguageDirection==="ltr"?i.right-r.width-n:i.left+n;this.moveTo(a,i.top+n)}else this._moveOffScreen();break}case y.EDITOR_CENTER:{i?this.moveTo(Math.round(i.left+i.width/2-r.width/2),Math.round(i.top+i.height/2-r.height/2)):this._moveOffScreen();break}case y.SCREEN_CENTER:{this.moveTo(Math.round((e.width-r.width)/2),Math.round((e.height-r.height)/2));break}case y.EDITOR_TOP_CENTER:{i?this.moveTo(Math.round(i.left+i.width/2-r.width/2),i.top+n):this._moveOffScreen();break}case y.EDITOR_BOTTOM_CENTER:{i?this.moveTo(Math.round(i.left+i.width/2-r.width/2),i.bottom-r.height-n):this._moveOffScreen();break}case y.EDITOR_ABOVE_CENTER:{i?this.moveTo(Math.round(i.left+i.width/2-r.width/2),i.top-r.height-n):this._moveOffScreen();break}case y.EDITOR_BELOW_CENTER:{i?this.moveTo(Math.round(i.left+i.width/2-r.width/2),i.bottom+n):this._moveOffScreen();break}}}_getVisibleDomRootRect(e){let t=new V(this._getCurrentDomRoot()).getVisible();if(t){if(t=e.getIntersection(t),!t)return null}else return null;return t}_getDialogRect(){return new V(this.element.firstElementChild)}_getViewportRect(){const e=new V(p.window);if(this.isModal)return e;const t={top:0,bottom:0,left:0,right:0,...this._getViewportOffset()};return e.top+=t.top,e.height-=t.top,e.bottom-=t.bottom,e.height-=t.bottom,e.left+=t.left,e.right-=t.right,e.width-=t.left+t.right,e}_updateFocusCyclableItems(){const e=[];if(this.contentView)for(const t of this.contentView.children)j(t)&&e.push(t);this.actionsView&&e.push(this.actionsView),this.closeButtonView&&e.push(this.closeButtonView),e.forEach(t=>{this._focusables.add(t),this.focusTracker.add(t.element),li(t)&&this._focusCycler.chain(t.focusCycler)})}_createCloseButton(){const e=new b(this.locale),t=this.locale.t;return e.set({label:t("Close"),tooltip:!0,icon:m.cancel}),e.on("execute",()=>this.fire("close",{source:"closeButton"})),e}};l(ne,"defaultOffset",15);let ge=ne;const C=class C extends Ee{constructor(e){super(e);l(this,"view");l(this,"_onHide");const t=e.t;this._initShowHideListeners(),this._initFocusToggler(),this._initMultiRootIntegration(),this.set({id:null,isOpen:!1}),e.accessibility.addKeystrokeInfos({categoryId:"navigation",keystrokes:[{label:t("Move focus in and out of an active dialog window"),keystroke:"Ctrl+F6",mayRequireFn:!0}]})}static get pluginName(){return"Dialog"}static get isOfficialPlugin(){return!0}destroy(){super.destroy(),C._visibleDialogPlugin===this&&this._unlockBodyScroll()}_initShowHideListeners(){this.on("show",(e,t)=>{this._show(t)}),this.on("show",(e,t)=>{t.onShow&&t.onShow(this)},{priority:"low"}),this.on("hide",()=>{C._visibleDialogPlugin&&C._visibleDialogPlugin._hide()}),this.on("hide",()=>{this._onHide&&(this._onHide(this),this._onHide=void 0)},{priority:"low"})}_initFocusToggler(){const e=this.editor;e.keystrokes.set("Ctrl+F6",(t,i)=>{!this.isOpen||this.view.isModal||(this.view.focusTracker.isFocused?e.editing.view.focus():this.view.focus(),i())})}_initMultiRootIntegration(){const e=this.editor.model;e.document.on("change:data",()=>{if(!this.view)return;const t=e.document.differ.getChangedRoots();for(const i of t)i.state&&this.view.updatePosition()})}show(e){this.hide(),this.fire(`show:${e.id}`,e)}_show({id:e,icon:t,title:i,hasCloseButton:n=!0,content:r,actionButtons:a,className:u,isModal:c,position:h,onHide:f,keystrokeHandlerOptions:g}){const k=this.editor;this.view=new ge(k.locale,{getCurrentDomRoot:()=>k.editing.view.getDomRoot(k.model.document.selection.anchor.root.rootName),getViewportOffset:()=>k.ui.viewportOffset,keystrokeHandlerOptions:g});const S=this.view;S.on("close",()=>{this.hide()}),k.ui.view.body.add(S),k.keystrokes.listenTo(S.element),h||(h=c?y.SCREEN_CENTER:y.EDITOR_CENTER),c&&this._lockBodyScroll(),S.set({position:h,_isVisible:!0,className:u,isModal:c}),S.setupParts({icon:t,title:i,hasCloseButton:n,content:r,actionButtons:a}),this.id=e,f&&(this._onHide=f),this.isOpen=!0,C._visibleDialogPlugin=this}hide(){C._visibleDialogPlugin&&C._visibleDialogPlugin.fire(`hide:${C._visibleDialogPlugin.id}`)}_hide(){if(!this.view)return;const e=this.editor,t=this.view;t.isModal&&this._unlockBodyScroll(),t.contentView&&t.contentView.reset(),e.ui.view.body.remove(t),e.ui.focusTracker.remove(t.element),e.keystrokes.stopListening(t.element),t.destroy(),e.editing.view.focus(),this.id=null,this.isOpen=!1,C._visibleDialogPlugin=null}_lockBodyScroll(){document.documentElement.classList.add("ck-dialog-scroll-locked")}_unlockBodyScroll(){document.documentElement.classList.remove("ck-dialog-scroll-locked")}};l(C,"_visibleDialogPlugin");let _e=C;class H extends b{constructor(e,t=new wt){super(e,t);l(this,"_checkIconHolderView",new ui);this.set({hasCheckSpace:!1,_hasCheck:this.isToggleable});const i=this.bindTemplate;this.extendTemplate({attributes:{class:["ck-list-item-button",i.if("isToggleable","ck-list-item-button_toggleable")]}}),this.bind("_hasCheck").to(this,"hasCheckSpace",this,"isToggleable",(n,r)=>n||r)}render(){super.render(),this._hasCheck&&this.children.add(this._checkIconHolderView,0),this._watchCheckIconHolderMount()}_watchCheckIconHolderMount(){this._checkIconHolderView.bind("isOn").to(this,"isOn",e=>this.isToggleable&&e),this.on("change:_hasCheck",(e,t,i)=>{const{children:n,_checkIconHolderView:r}=this;i?n.add(r,0):n.remove(r)})}}class ui extends d{constructor(){super();l(this,"children");l(this,"_checkIconView",this._createCheckIconView());const e=this.bindTemplate;this.children=this.createCollection(),this.set("isOn",!1),this.setTemplate({tag:"span",children:this.children,attributes:{class:["ck","ck-list-item-button__check-holder",e.to("isOn",t=>t?"ck-on":"ck-off")]}})}render(){super.render(),this.isOn&&this.children.add(this._checkIconView,0),this._watchCheckIconMount()}_watchCheckIconMount(){this.on("change:isOn",(e,t,i)=>{const{children:n,_checkIconView:r}=this;i&&!n.has(r)?n.add(r):!i&&n.has(r)&&n.remove(r)})}_createCheckIconView(){const e=new F;return e.content=m.check,e.extendTemplate({attributes:{class:"ck-list-item-button__check-icon"}}),e}}class bt extends H{constructor(o){super(o),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}class ce extends d{constructor(e){super(e);l(this,"id");this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${te()}`;const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}class di extends d{constructor(o,e){super(o);const t=o.t,i=new ce;i.text=t("Help Contents. To close this dialog press ESC."),this.setTemplate({tag:"div",attributes:{class:["ck","ck-accessibility-help-dialog__content"],"aria-labelledby":i.id,role:"document",tabindex:-1},children:[I(document,"p",{},t("Below, you can find a list of keyboard shortcuts that can be used in the editor.")),...this._createCategories(Array.from(e.values())),i]})}focus(){this.element.focus()}_createCategories(o){return o.map(e=>{const t=[I(document,"h3",{},e.label),...Array.from(e.groups.values()).map(i=>this._createGroup(i)).flat()];return e.description&&t.splice(1,0,I(document,"p",{},e.description)),I(document,"section",{},t)})}_createGroup(o){const e=o.keystrokes.sort((i,n)=>i.label.localeCompare(n.label)).map(i=>this._createGroupRow(i)).flat(),t=[I(document,"dl",{},e)];return o.label&&t.unshift(I(document,"h4",{},o.label)),t}_createGroupRow(o){const e=this.locale.t,t=I(document,"dt"),i=I(document,"dd"),n=pi(o.keystroke),r=[];for(const a of n)r.push(a.map(fi).join(""));return t.innerHTML=o.label,i.innerHTML=r.join(", ")+(o.mayRequireFn&&M.isMac?` ${e("(may require <kbd>Fn</kbd>)")}`:""),[t,i]}}function fi(s){return ee(s).split("+").map(o=>`<kbd>${o}</kbd>`).join("+")}function pi(s){return typeof s=="string"?[[s]]:typeof s[0]=="string"?[s]:s}var $e='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 6.628a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"/><path d="M8.5 9.125a.3.3 0 0 0-.253-.296L5.11 8.327a.75.75 0 1 1 .388-1.449l4.04.716c.267.072.624.08.893.009l4.066-.724a.75.75 0 1 1 .388 1.45l-3.132.5a.3.3 0 0 0-.253.296v1.357a.3.3 0 0 0 .018.102l1.615 4.438a.75.75 0 0 1-1.41.513l-1.35-3.71a.3.3 0 0 0-.281-.197h-.209a.3.3 0 0 0-.282.198l-1.35 3.711a.75.75 0 0 1-1.41-.513l1.64-4.509a.3.3 0 0 0 .019-.103V9.125Z"/><path clip-rule="evenodd" d="M10 18.5a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17Zm0 1.5c5.523 0 10-4.477 10-10S15.523 0 10 0 0 4.477 0 10s4.477 10 10 10Z"/></svg>';class Ys extends Ee{constructor(){super(...arguments);l(this,"contentView",null)}static get requires(){return[_e]}static get pluginName(){return"AccessibilityHelp"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,t=e.locale.t;e.ui.componentFactory.add("accessibilityHelp",()=>{const i=this._createButton(b);return i.set({tooltip:!0,withText:!1,label:t("Accessibility help")}),i}),e.ui.componentFactory.add("menuBar:accessibilityHelp",()=>{const i=this._createButton(bt);return i.label=t("Accessibility"),i}),e.keystrokes.set("Alt+0",(i,n)=>{this._toggleDialog(),n()}),this._setupRootLabels()}_createButton(e){const t=this.editor,i=t.plugins.get("Dialog"),n=t.locale,r=new e(n);return r.set({keystroke:"Alt+0",icon:$e,isToggleable:!0}),r.on("execute",()=>this._toggleDialog()),r.bind("isOn").to(i,"id",a=>a==="accessibilityHelp"),r}_setupRootLabels(){const e=this.editor,t=e.editing.view,i=e.t;e.ui.on("ready",()=>{t.change(r=>{for(const a of t.document.roots)n(r,a)}),e.on("addRoot",(r,a)=>{const u=e.editing.view.document.getRoot(a.rootName);t.change(c=>n(c,u))},{priority:"low"})});function n(r,a){const c=[a.getAttribute("aria-label"),i("Press %0 for help.",[ee("Alt+0")])].filter(h=>h).join(". ");r.setAttribute("aria-label",c,a)}}_toggleDialog(){const e=this.editor,t=e.plugins.get("Dialog"),i=e.locale.t;this.contentView||(this.contentView=new di(e.locale,e.accessibility.keystrokeInfos)),t.id==="accessibilityHelp"?t.hide():t.show({id:"accessibilityHelp",className:"ck-accessibility-help-dialog",title:i("Accessibility help"),icon:$e,hasCloseButton:!0,content:this.contentView})}}const T=class T extends D{constructor(e,t=[]){super(t);l(this,"locale");l(this,"_bodyCollectionContainer");this.locale=e}get bodyCollectionContainer(){return this._bodyCollectionContainer}attachToDom(){this._bodyCollectionContainer=new O({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection,role:"application"},children:this}).render(),(!T._bodyWrapper||!T._bodyWrapper.isConnected)&&(T._bodyWrapper=I(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(T._bodyWrapper)),T._bodyWrapper.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove(),T._bodyWrapper&&!T._bodyWrapper.childElementCount&&(T._bodyWrapper.remove(),delete T._bodyWrapper)}};l(T,"_bodyWrapper");let ke=T;class gt extends b{constructor(e){super(e);l(this,"toggleSwitchView");this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new d;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}class Qs extends _t(b){}class mi extends _t(H){}function _t(s){class o extends s{constructor(...i){super(...i);l(this,"buttonView");l(this,"_fileInputView");this.buttonView=this,this._fileInputView=new wi(this.locale),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.on("execute",()=>{this._fileInputView.open()}),this.extendTemplate({attributes:{class:"ck-file-dialog-button"}})}render(){super.render(),this.children.add(this._fileInputView)}}return o}class wi extends d{constructor(o){super(o),this.set("acceptedType",void 0),this.set("allowMultipleFiles",!1);const e=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:e.to("acceptedType"),multiple:e.to("allowMultipleFiles")},on:{change:e.to(()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""})}})}open(){this.element.click()}}var he='<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z"/></svg>';class Js extends d{constructor(e,t){super(e);l(this,"buttonView");l(this,"children");const i=this.bindTemplate;this.set("isCollapsed",!1),this.set("label",""),this.buttonView=this._createButtonView(),this.children=this.createCollection(),this.set("_collapsibleAriaLabelUid",void 0),t&&this.children.addMany(t),this.setTemplate({tag:"div",attributes:{class:["ck","ck-collapsible",i.if("isCollapsed","ck-collapsible_collapsed")]},children:[this.buttonView,{tag:"div",attributes:{class:["ck","ck-collapsible__children"],role:"region",hidden:i.if("isCollapsed","hidden"),"aria-labelledby":i.to("_collapsibleAriaLabelUid")},children:this.children}]})}render(){super.render(),this._collapsibleAriaLabelUid=this.buttonView.labelView.element.id}focus(){this.buttonView.focus()}_createButtonView(){const e=new b(this.locale),t=e.bindTemplate;return e.set({withText:!0,icon:he}),e.extendTemplate({attributes:{"aria-expanded":t.to("isOn",i=>String(i))}}),e.bind("label").to(this),e.bind("isOn").to(this,"isCollapsed",i=>!i),e.on("execute",()=>{this.isCollapsed=!this.isCollapsed}),e}}/**
17
- * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
18
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
19
- */function eo(s,o){const e=s.t,t={Black:e("Black"),"Dim grey":e("Dim grey"),Grey:e("Grey"),"Light grey":e("Light grey"),White:e("White"),Red:e("Red"),Orange:e("Orange"),Yellow:e("Yellow"),"Light green":e("Light green"),Green:e("Green"),Aquamarine:e("Aquamarine"),Turquoise:e("Turquoise"),"Light blue":e("Light blue"),Blue:e("Blue"),Purple:e("Purple")};return o.map(i=>{const n=t[i.label];return n&&n!=i.label&&(i.label=n),i})}function to(s){return s.map(bi).filter(o=>!!o)}function bi(s){return typeof s=="string"?{model:s,label:s,hasBorder:!1,view:{name:"span",styles:{color:s}}}:{model:s.color,label:s.label||s.color,hasBorder:s.hasBorder===void 0?!1:s.hasBorder,view:{name:"span",styles:{color:`${s.color}`}}}}var gi='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path class="ck-icon__fill" d="M16.935 5.328a2 2 0 0 1 0 2.829l-7.778 7.778a2 2 0 0 1-2.829 0L3.5 13.107a1.999 1.999 0 1 1 2.828-2.829l.707.707a1 1 0 0 0 1.414 0l5.658-5.657a2 2 0 0 1 2.828 0z"/><path d="M14.814 6.035 8.448 12.4a1 1 0 0 1-1.414 0l-1.413-1.415A1 1 0 1 0 4.207 12.4l2.829 2.829a1 1 0 0 0 1.414 0l7.778-7.778a1 1 0 1 0-1.414-1.415z"/></svg>';class kt extends b{constructor(o){super(o);const e=this.bindTemplate;this.set("color",void 0),this.set("hasBorder",!1),this.icon=gi,this.extendTemplate({attributes:{style:{backgroundColor:e.to("color",t=>M.isMediaForcedColors?null:t)},class:["ck","ck-color-grid__tile",e.if("hasBorder","ck-color-selector__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}class Ke extends d{constructor(e,t){super(e);l(this,"columns");l(this,"items");l(this,"focusTracker");l(this,"keystrokes");const i=t&&t.colorDefinitions?t.colorDefinitions:[];this.columns=t&&t.columns?t.columns:5;const n={gridTemplateColumns:`repeat( ${this.columns}, 1fr)`};this.set("selectedColor",void 0),this.items=this.createCollection(),this.focusTracker=new v,this.keystrokes=new P,this.items.on("add",(r,a)=>{a.isOn=a.color===this.selectedColor}),i.forEach(r=>{const a=new kt;a.set({color:r.color,label:r.label,tooltip:!0,hasBorder:r.options.hasBorder}),a.on("execute",()=>{this.fire("execute",{value:r.color,hasBorder:r.options.hasBorder,label:r.label})}),this.items.add(a)}),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:n}}),this.on("change:selectedColor",(r,a,u)=>{for(const c of this.items)c.isOn=c.color===u})}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",(e,t)=>{this.focusTracker.add(t.element)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element),ni({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:this.columns,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}/**
20
- * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
21
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
22
- */function Tt(s,o){if(!s)return"";const e=vt(s);if(!e)return"";if(e.space===o)return s;if(!vi(e))return"";const i=ct[e.space][o];if(!i)return"";const n=i(e.space==="hex"?e.hexValue:e.values);return Ti(n,o)}function _i(s){if(!s)return"";const o=vt(s);return o?o.space==="hex"?o.hexValue:Tt(s,"hex"):"#000"}function ki(s,o){customElements.get(s)===void 0&&customElements.define(s,o)}function Ti(s,o){switch(o){case"hex":return`#${s}`;case"rgb":return`rgb(${s[0]}, ${s[1]}, ${s[2]})`;case"hsl":return`hsl(${s[0]}, ${s[1]}%, ${s[2]}%)`;case"hwb":return`hwb(${s[0]}, ${s[1]}, ${s[2]})`;case"lab":return`lab(${s[0]}% ${s[1]} ${s[2]})`;case"lch":return`lch(${s[0]}% ${s[1]} ${s[2]})`;default:return""}}function vt(s){if(s.startsWith("#")){const e=Se(s);return{space:"hex",values:e.values,hexValue:s,alpha:e.alpha}}const o=Se(s);return o.space?o:null}function vi(s){return Object.keys(ct).includes(s.space)}class yi extends d{constructor(e,t){super(e);l(this,"fieldView");l(this,"labelView");l(this,"statusView");l(this,"fieldWrapperChildren");const i=`ck-labeled-field-view-${te()}`,n=`ck-labeled-field-view-status-${te()}`;this.fieldView=t(this,i,n),this.set("label",void 0),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class",void 0),this.set("placeholder",void 0),this.labelView=this._createLabelView(i),this.statusView=this._createStatusView(n),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",(a,u)=>a||u);const r=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",r.to("class"),r.if("isEnabled","ck-disabled",a=>!a),r.if("isEmpty","ck-labeled-field-view_empty"),r.if("isFocused","ck-labeled-field-view_focused"),r.if("placeholder","ck-labeled-field-view_placeholder"),r.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:this.fieldWrapperChildren},this.statusView]})}_createLabelView(e){const t=new ce(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new d(this.locale),i=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",i.if("errorText","ck-labeled-field-view__status_error"),i.if("_statusText","ck-hidden",n=>!n)],id:e,role:i.if("errorText","alert")},children:[{text:i.to("_statusText")}]}),t}focus(e){this.fieldView.focus(e)}}class Ci extends d{constructor(e){super(e);l(this,"focusTracker");this.set("value",void 0),this.set("id",void 0),this.set("placeholder",void 0),this.set("tabIndex",void 0),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById",void 0),this.set("ariaLabel",void 0),this.focusTracker=new v,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",t.if("isFocused","ck-input_focused"),t.if("isEmpty","ck-input-text_empty"),t.if("hasError","ck-error")],id:t.to("id"),placeholder:t.to("placeholder"),tabindex:t.to("tabIndex"),readonly:t.to("isReadOnly"),"aria-invalid":t.if("hasError",!0),"aria-describedby":t.to("ariaDescribedById"),"aria-label":t.to("ariaLabel")},on:{input:t.to((...i)=>{this.fire("input",...i),this._updateIsEmpty()}),change:t.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",(e,t,i)=>{this._setDomElementValue(i),this._updateIsEmpty()})}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}reset(){this.value=this.element.value="",this._updateIsEmpty()}_updateIsEmpty(){this.isEmpty=Vi(this.element)}_setDomElementValue(e){this.element.value=!e&&e!==0?"":e}}function Vi(s){return!s.value}class yt extends Ci{constructor(o){super(o),this.set("inputMode","text");const e=this.bindTemplate;this.extendTemplate({attributes:{inputmode:e.to("inputMode")}})}}class xi extends yt{constructor(o){super(o),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}class Ei extends yt{constructor(o,{min:e,max:t,step:i}={}){super(o);const n=this.bindTemplate;this.set("min",e),this.set("max",t),this.set("step",i),this.extendTemplate({attributes:{type:"number",class:["ck-input-number"],min:n.to("min"),max:n.to("max"),step:n.to("step")}})}}class Oi extends d{constructor(e){super(e);l(this,"children");const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",i=>`ck-dropdown__panel_${i}`),t.if("isVisible","ck-dropdown__panel-visible")],tabindex:"-1"},children:this.children,on:{selectstart:t.to(i=>{i.target.tagName.toLocaleLowerCase()!=="input"&&i.preventDefault()})}})}focus(){if(this.children.length){const e=this.children.first;typeof e.focus=="function"?e.focus():E("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this})}}focusLast(){if(this.children.length){const e=this.children.last;typeof e.focusLast=="function"?e.focusLast():e.focus()}}}const G=class G extends d{constructor(e,t,i){super(e);l(this,"buttonView");l(this,"panelView");l(this,"focusTracker");l(this,"keystrokes");l(this,"listView");l(this,"toolbarView");l(this,"menuView");const n=this.bindTemplate;this.buttonView=t,this.panelView=i,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class",void 0),this.set("id",void 0),this.set("panelPosition","auto"),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new P,this.focusTracker=new v,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",n.to("class"),n.if("isEnabled","ck-disabled",r=>!r)],id:n.to("id"),"aria-describedby":n.to("ariaDescribedById")},children:[t,i]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":n.to("isOpen")}})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.listenTo(this.buttonView,"open",()=>{this.isOpen=!this.isOpen}),this.on("change:isOpen",(t,i,n)=>{if(n)if(this.panelPosition==="auto"){const r=G._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=r?r.name:this._defaultPanelPositionName}else this.panelView.position=this.panelPosition}),this.keystrokes.listenTo(this.element);const e=(t,i)=>{this.isOpen&&(this.isOpen=!1,i())};this.keystrokes.set("arrowdown",(t,i)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,i())}),this.keystrokes.set("arrowright",(t,i)=>{this.isOpen&&i()}),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:e,north:t,southEast:i,southWest:n,northEast:r,northWest:a,southMiddleEast:u,southMiddleWest:c,northMiddleEast:h,northMiddleWest:f}=G.defaultPanelPositions;return this.locale.uiLanguageDirection!=="rtl"?[i,n,u,c,e,r,a,h,f,t]:[n,i,c,u,e,a,r,f,h,t]}get _defaultPanelPositionName(){return this.locale.uiLanguageDirection==="rtl"?"sw":"se"}};l(G,"defaultPanelPositions",{south:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/2,name:"s"}),southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),southMiddleEast:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/4,name:"sme"}),southMiddleWest:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)*3/4,name:"smw"}),north:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/2,name:"n"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),northMiddleEast:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/4,name:"nme"}),northMiddleWest:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)*3/4,name:"nmw"})}),l(G,"_getOptimalPosition",Ve);let Te=G;class Ii extends b{constructor(e){super(e);l(this,"arrowView");this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",t=>String(t))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new F;return e.content=he,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}class A extends d{constructor(e){super(e);l(this,"children");const t=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",t.if("isVisible","ck-hidden",i=>!i)],role:"presentation"},children:this.children})}focus(){this.children.first&&this.children.first.focus()}}class Le extends d{constructor(o){super(o),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}class Q extends d{constructor(e,t=new ce){super(e);l(this,"labelView");l(this,"items");l(this,"children");const i=this.bindTemplate,n=new Fe(e);this.set({label:"",isVisible:!0}),this.labelView=t,this.labelView.bind("text").to(this,"label"),this.children=this.createCollection(),this.children.addMany([this.labelView,n]),n.set({role:"group",ariaLabelledBy:t.id}),n.focusTracker.destroy(),n.keystrokes.destroy(),this.items=n.items,this.setTemplate({tag:"li",attributes:{role:"presentation",class:["ck","ck-list__group",i.if("isVisible","ck-hidden",r=>!r)]},children:this.children})}focus(){if(this.items){const e=this.items.find(t=>!(t instanceof Le));e&&e.focus()}}}class Fe extends d{constructor(e){super(e);l(this,"focusables");l(this,"items");l(this,"focusTracker");l(this,"keystrokes");l(this,"_focusCycler");l(this,"_listItemGroupToChangeListeners",new WeakMap);const t=this.bindTemplate;this.focusables=new D,this.items=this.createCollection(),this.focusTracker=new v,this.keystrokes=new P,this._focusCycler=new U({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",void 0),this.set("role",void 0),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"],role:t.to("role"),"aria-label":t.to("ariaLabel"),"aria-labelledby":t.to("ariaLabelledBy")},children:this.items})}render(){super.render();for(const e of this.items)e instanceof Q?this._registerFocusableItemsGroup(e):e instanceof A&&this._registerFocusableListItem(e);this.items.on("change",(e,t)=>{for(const i of t.removed)i instanceof Q?this._deregisterFocusableItemsGroup(i):i instanceof A&&this._deregisterFocusableListItem(i);for(const i of Array.from(t.added).reverse())i instanceof Q?this._registerFocusableItemsGroup(i,t.index):this._registerFocusableListItem(i,t.index)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_registerFocusableListItem(e,t){this.focusTracker.add(e.element),this.focusables.add(e,t)}_deregisterFocusableListItem(e){this.focusTracker.remove(e.element),this.focusables.remove(e)}_getOnGroupItemsChangeCallback(e){return(t,i)=>{for(const n of i.removed)this._deregisterFocusableListItem(n);for(const n of Array.from(i.added).reverse())this._registerFocusableListItem(n,this.items.getIndex(e)+i.index)}}_registerFocusableItemsGroup(e,t){Array.from(e.items).forEach((n,r)=>{const a=typeof t<"u"?t+r:void 0;this._registerFocusableListItem(n,a)});const i=this._getOnGroupItemsChangeCallback(e);this._listItemGroupToChangeListeners.set(e,i),e.items.on("change",i)}_deregisterFocusableItemsGroup(e){for(const t of e.items)this._deregisterFocusableListItem(t);e.items.off("change",this._listItemGroupToChangeListeners.get(e)),this._listItemGroupToChangeListeners.delete(e)}}const Ze=le("px"),Pi={top:-99999,left:-99999,name:"arrowless",config:{withArrow:!1}},_=class _ extends d{constructor(e){super(e);l(this,"content");l(this,"_pinWhenIsVisibleCallback");l(this,"_resizeObserver");const t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class",void 0),this._pinWhenIsVisibleCallback=null,this._resizeObserver=null,this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",i=>`ck-balloon-panel_${i}`),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",Ze),left:t.to("left",Ze)}},children:this.content})}destroy(){this.hide(),super.destroy()}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){const t=J(e.target);if(t&&!L(t))return!1;this.show();const i=_.defaultPositions,n=Object.assign({},{element:this.element,positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth],limiter:p.document.body,fitInViewport:!0},e),r=_._getOptimalPosition(n)||Pi,a=parseInt(r.left),u=parseInt(r.top),c=r.name,h=r.config||{},{withArrow:f=!0}=h;return this.top=u,this.left=a,this.position=c,this.withArrow=f,!0}pin(e){this.unpin(),this._startPinning(e)&&(this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback))}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){if(!this.attachTo(e))return!1;let t=J(e.target);const i=e.limiter?J(e.limiter):p.document.body;if(this.listenTo(p.document,"scroll",(n,r)=>{const a=r.target,u=t&&a.contains(t),c=i&&a.contains(i);(u||c||!t||!i)&&this.attachTo(e)},{useCapture:!0}),this.listenTo(p.window,"resize",()=>{this.attachTo(e)}),!this._resizeObserver&&(t&&Gt(t)&&(t=t.parentElement),t)){const n=()=>{L(t)||this.unpin()};this._resizeObserver=new lt(t,n)}return!0}_stopPinning(){this.stopListening(p.document,"scroll"),this.stopListening(p.window,"resize"),this._resizeObserver&&(this._resizeObserver.destroy(),this._resizeObserver=null)}static generatePositions(e={}){const{sideOffset:t=_.arrowSideOffset,heightOffset:i=_.arrowHeightOffset,stickyVerticalOffset:n=_.stickyVerticalOffset,config:r}=e;return{northWestArrowSouthWest:(c,h)=>({top:a(c,h),left:c.left-t,name:"arrow_sw",...r&&{config:r}}),northWestArrowSouthMiddleWest:(c,h)=>({top:a(c,h),left:c.left-h.width*.25-t,name:"arrow_smw",...r&&{config:r}}),northWestArrowSouth:(c,h)=>({top:a(c,h),left:c.left-h.width/2,name:"arrow_s",...r&&{config:r}}),northWestArrowSouthMiddleEast:(c,h)=>({top:a(c,h),left:c.left-h.width*.75+t,name:"arrow_sme",...r&&{config:r}}),northWestArrowSouthEast:(c,h)=>({top:a(c,h),left:c.left-h.width+t,name:"arrow_se",...r&&{config:r}}),northArrowSouthWest:(c,h)=>({top:a(c,h),left:c.left+c.width/2-t,name:"arrow_sw",...r&&{config:r}}),northArrowSouthMiddleWest:(c,h)=>({top:a(c,h),left:c.left+c.width/2-h.width*.25-t,name:"arrow_smw",...r&&{config:r}}),northArrowSouth:(c,h)=>({top:a(c,h),left:c.left+c.width/2-h.width/2,name:"arrow_s",...r&&{config:r}}),northArrowSouthMiddleEast:(c,h)=>({top:a(c,h),left:c.left+c.width/2-h.width*.75+t,name:"arrow_sme",...r&&{config:r}}),northArrowSouthEast:(c,h)=>({top:a(c,h),left:c.left+c.width/2-h.width+t,name:"arrow_se",...r&&{config:r}}),northEastArrowSouthWest:(c,h)=>({top:a(c,h),left:c.right-t,name:"arrow_sw",...r&&{config:r}}),northEastArrowSouthMiddleWest:(c,h)=>({top:a(c,h),left:c.right-h.width*.25-t,name:"arrow_smw",...r&&{config:r}}),northEastArrowSouth:(c,h)=>({top:a(c,h),left:c.right-h.width/2,name:"arrow_s",...r&&{config:r}}),northEastArrowSouthMiddleEast:(c,h)=>({top:a(c,h),left:c.right-h.width*.75+t,name:"arrow_sme",...r&&{config:r}}),northEastArrowSouthEast:(c,h)=>({top:a(c,h),left:c.right-h.width+t,name:"arrow_se",...r&&{config:r}}),southWestArrowNorthWest:c=>({top:u(c),left:c.left-t,name:"arrow_nw",...r&&{config:r}}),southWestArrowNorthMiddleWest:(c,h)=>({top:u(c),left:c.left-h.width*.25-t,name:"arrow_nmw",...r&&{config:r}}),southWestArrowNorth:(c,h)=>({top:u(c),left:c.left-h.width/2,name:"arrow_n",...r&&{config:r}}),southWestArrowNorthMiddleEast:(c,h)=>({top:u(c),left:c.left-h.width*.75+t,name:"arrow_nme",...r&&{config:r}}),southWestArrowNorthEast:(c,h)=>({top:u(c),left:c.left-h.width+t,name:"arrow_ne",...r&&{config:r}}),southArrowNorthWest:c=>({top:u(c),left:c.left+c.width/2-t,name:"arrow_nw",...r&&{config:r}}),southArrowNorthMiddleWest:(c,h)=>({top:u(c),left:c.left+c.width/2-h.width*.25-t,name:"arrow_nmw",...r&&{config:r}}),southArrowNorth:(c,h)=>({top:u(c),left:c.left+c.width/2-h.width/2,name:"arrow_n",...r&&{config:r}}),southArrowNorthMiddleEast:(c,h)=>({top:u(c),left:c.left+c.width/2-h.width*.75+t,name:"arrow_nme",...r&&{config:r}}),southArrowNorthEast:(c,h)=>({top:u(c),left:c.left+c.width/2-h.width+t,name:"arrow_ne",...r&&{config:r}}),southEastArrowNorthWest:c=>({top:u(c),left:c.right-t,name:"arrow_nw",...r&&{config:r}}),southEastArrowNorthMiddleWest:(c,h)=>({top:u(c),left:c.right-h.width*.25-t,name:"arrow_nmw",...r&&{config:r}}),southEastArrowNorth:(c,h)=>({top:u(c),left:c.right-h.width/2,name:"arrow_n",...r&&{config:r}}),southEastArrowNorthMiddleEast:(c,h)=>({top:u(c),left:c.right-h.width*.75+t,name:"arrow_nme",...r&&{config:r}}),southEastArrowNorthEast:(c,h)=>({top:u(c),left:c.right-h.width+t,name:"arrow_ne",...r&&{config:r}}),westArrowEast:(c,h)=>({top:c.top+c.height/2-h.height/2,left:c.left-h.width-i,name:"arrow_e",...r&&{config:r}}),eastArrowWest:(c,h)=>({top:c.top+c.height/2-h.height/2,left:c.right+i,name:"arrow_w",...r&&{config:r}}),viewportStickyNorth:(c,h,f,g)=>{const k=g||f;return!c.getIntersection(k)||k.height-c.height>n?null:{top:k.top+n,left:c.left+c.width/2-h.width/2,name:"arrowless",config:{withArrow:!1,...r}}}};function a(c,h){return c.top-h.height-i}function u(c){return c.bottom+i}}};l(_,"arrowSideOffset",25),l(_,"arrowHeightOffset",10),l(_,"stickyVerticalOffset",20),l(_,"_getOptimalPosition",Ve),l(_,"defaultPositions",_.generatePositions());let z=_;function J(s){return Ie(s)?s:Ht(s)?s.commonAncestorContainer:typeof s=="function"?J(s()):null}class Ct extends d{constructor(o){super(o),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class Bi extends d{constructor(o){super(o),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}/**
23
- * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
24
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
25
- */function Li(s){return s.bindTemplate.to(o=>{o.target===s.element&&o.preventDefault()})}/**
26
- * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
27
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
28
- */function Fi(s){if(Array.isArray(s))return{items:s,removeItems:[]};const o={items:[],removeItems:[]};return s?{...o,...s}:o}const Ai={alignLeft:m.alignLeft,bold:m.bold,importExport:m.importExport,paragraph:m.paragraph,plus:m.plus,text:m.text,threeVerticalDots:m.threeVerticalDots,pilcrow:m.pilcrow,dragIndicator:m.dragIndicator};class Di extends d{constructor(e,t){super(e);l(this,"options");l(this,"items");l(this,"focusTracker");l(this,"keystrokes");l(this,"itemsView");l(this,"children");l(this,"focusables");l(this,"_focusCycler");l(this,"_behavior");const i=this.bindTemplate,n=this.t;this.options=t||{},this.set("ariaLabel",n("Editor toolbar")),this.set("maxWidth","auto"),this.set("role","toolbar"),this.items=this.createCollection(),this.focusTracker=new v,this.keystrokes=new P,this.set("class",void 0),this.set("isCompact",!1),this.itemsView=new Si(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const r=e.uiLanguageDirection==="rtl";this._focusCycler=new U({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[r?"arrowright":"arrowleft","arrowup"],focusNext:[r?"arrowleft":"arrowright","arrowdown"]}});const a=["ck","ck-toolbar",i.to("class"),i.if("isCompact","ck-toolbar_compact")];this.options.shouldGroupWhenFull&&this.options.isFloating&&a.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:a,role:i.to("role"),"aria-label":i.to("ariaLabel"),style:{maxWidth:i.to("maxWidth")},tabindex:-1},children:this.children,on:{mousedown:Li(this)}}),this._behavior=this.options.shouldGroupWhenFull?new Ni(this):new Mi(this)}render(){super.render(),this.focusTracker.add(this.element);for(const e of this.items)this.focusTracker.add(e);this.items.on("add",(e,t)=>{this.focusTracker.add(t)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t)}),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t,i){this.items.addMany(this._buildItemsFromConfig(e,t,i))}_buildItemsFromConfig(e,t,i){const n=Fi(e),r=i||n.removeItems;return this._cleanItemsConfiguration(n.items,t,r).map(u=>ie(u)?this._createNestedToolbarDropdown(u,t,r):u==="|"?new Ct:u==="-"?new Bi:t.create(u)).filter(u=>!!u)}_cleanItemsConfiguration(e,t,i){const n=e.filter((r,a,u)=>r==="|"?!0:i.indexOf(r)!==-1?!1:r==="-"?this.options.shouldGroupWhenFull?(E("toolbarview-line-break-ignored-when-grouping-items",u),!1):!0:!ie(r)&&!t.has(r)?(E("toolbarview-item-unavailable",{item:r}),!1):!0);return this._cleanSeparatorsAndLineBreaks(n)}_cleanSeparatorsAndLineBreaks(e){const t=a=>a!=="-"&&a!=="|",i=e.length,n=e.findIndex(t);if(n===-1)return[];const r=i-e.slice().reverse().findIndex(t);return e.slice(n,r).filter((a,u,c)=>t(a)?!0:!(u>0&&c[u-1]===a))}_createNestedToolbarDropdown(e,t,i){let{label:n,icon:r,items:a,tooltip:u=!0,withText:c=!1}=e;if(a=this._cleanItemsConfiguration(a,t,i),!a.length)return null;const h=this.locale,f=Ae(h);return n||E("toolbarview-nested-toolbar-dropdown-missing-label",e),f.class="ck-toolbar__nested-toolbar-dropdown",f.buttonView.set({label:n,tooltip:u,withText:!!c}),r!==!1?f.buttonView.icon=Ai[r]||r||m.threeVerticalDots:f.buttonView.withText=!0,Vt(f,()=>f.toolbarView._buildItemsFromConfig(a,t,i)),f}}class Si extends d{constructor(e){super(e);l(this,"children");this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class Mi{constructor(o){const e=o.bindTemplate;o.set("isVertical",!1),o.itemsView.children.bindTo(o.items).using(t=>t),o.focusables.bindTo(o.items).using(t=>j(t)?t:null),o.extendTemplate({attributes:{class:[e.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class Ni{constructor(o){l(this,"view");l(this,"viewChildren");l(this,"viewFocusables");l(this,"viewItemsView");l(this,"viewFocusTracker");l(this,"viewLocale");l(this,"ungroupedItems");l(this,"groupedItems");l(this,"groupedItemsDropdown");l(this,"resizeObserver",null);l(this,"cachedPadding",null);l(this,"shouldUpdateGroupingOnNextResize",!1);l(this,"viewElement");this.view=o,this.viewChildren=o.children,this.viewFocusables=o.focusables,this.viewItemsView=o.itemsView,this.viewFocusTracker=o.focusTracker,this.viewLocale=o.locale,this.ungroupedItems=o.createCollection(),this.groupedItems=o.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),o.itemsView.children.bindTo(this.ungroupedItems).using(e=>e),this.ungroupedItems.on("change",this._updateFocusCyclableItems.bind(this)),o.children.on("change",this._updateFocusCyclableItems.bind(this)),o.items.on("change",(e,t)=>{const i=t.index,n=Array.from(t.added);for(const r of t.removed)i>=this.ungroupedItems.length?this.groupedItems.remove(r):this.ungroupedItems.remove(r);for(let r=i;r<i+n.length;r++){const a=n[r-i];r>this.ungroupedItems.length?this.groupedItems.add(a,r-this.ungroupedItems.length):this.ungroupedItems.add(a,r)}this._updateGrouping()}),o.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(o){this.viewElement=o.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(o)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!L(this.viewElement)){this.shouldUpdateGroupingOnNextResize=!0;return}const o=this.groupedItems.length;let e;for(;this._areItemsOverflowing;)this._groupLastItem(),e=!0;if(!e&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==o&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const o=this.viewElement,e=this.viewLocale.uiLanguageDirection,t=new V(o.lastChild),i=new V(o);if(!this.cachedPadding){const n=p.window.getComputedStyle(o),r=e==="ltr"?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(n[r])}return e==="ltr"?t.right>i.right-this.cachedPadding:t.left<i.left+this.cachedPadding}_enableGroupingOnResize(){let o;this.resizeObserver=new lt(this.viewElement,e=>{(!o||o!==e.contentRect.width||this.shouldUpdateGroupingOnNextResize)&&(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),o=e.contentRect.width)}),this._updateGrouping()}_enableGroupingOnMaxWidthChange(o){o.on("change:maxWidth",()=>{this._updateGrouping()})}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new Ct),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const o=this.viewLocale,e=o.t,t=Ae(o);return t.class="ck-toolbar__grouped-dropdown",t.panelPosition=o.uiLanguageDirection==="ltr"?"sw":"se",Vt(t,this.groupedItems),t.buttonView.set({label:e("Show more items"),tooltip:!0,tooltipPosition:o.uiLanguageDirection==="rtl"?"se":"sw",icon:m.threeVerticalDots}),t}_updateFocusCyclableItems(){this.viewFocusables.clear(),this.ungroupedItems.map(o=>{j(o)&&this.viewFocusables.add(o)}),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}class Wi extends d{constructor(e,t){super(e);l(this,"children");l(this,"actionView");l(this,"arrowView");l(this,"keystrokes");l(this,"focusTracker");const i=this.bindTemplate;this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke",void 0),this.set("withKeystroke",!1),this.set("label",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(t),this.arrowView=this._createArrowView(),this.keystrokes=new P,this.focusTracker=new v,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",i.to("class"),i.if("isVisible","ck-hidden",n=>!n),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",(e,t)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),t())}),this.keystrokes.set("arrowleft",(e,t)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),t())})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(e){const t=e||new b;return e||t.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),t.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),t.delegate("execute").to(this),t}_createArrowView(){const e=new b,t=e.bindTemplate;return e.icon=he,e.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":t.to("isOn"),"aria-haspopup":!0,"aria-expanded":t.to("isOn",i=>String(i))}}),e.bind("isEnabled").to(this),e.bind("label").to(this),e.bind("tooltip").to(this),e.delegate("execute").to(this,"open"),e}}function Ae(s,o=Ii){const e=typeof o=="function"?new o(s):o,t=new Oi(s),i=new Te(s,e,t);return e.bind("isEnabled").to(i),e instanceof Wi?e.arrowView.bind("isOn").to(i,"isOpen"):e.bind("isOn").to(i,"isOpen"),Gi(i),i}function Vt(s,o,e={}){s.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),s.isOpen?je(s,o,e):s.once("change:isOpen",()=>je(s,o,e),{priority:"highest"}),e.enableActiveItemFocusOnDropdownOpen&&xt(s,()=>s.toolbarView.items.find(t=>t.isOn))}function je(s,o,e){const t=s.locale,i=t.t,n=s.toolbarView=new Di(t),r=typeof o=="function"?o():o;n.ariaLabel=e.ariaLabel||i("Dropdown toolbar"),e.maxWidth&&(n.maxWidth=e.maxWidth),e.class&&(n.class=e.class),e.isCompact&&(n.isCompact=e.isCompact),e.isVertical&&(n.isVertical=!0),r instanceof D?n.items.bindTo(r).using(a=>a):n.items.addMany(r),s.panelView.children.add(n),s.focusTracker.add(n),n.items.delegate("execute").to(s)}function io(s,o,e={}){s.isOpen?Xe(s,o,e):s.once("change:isOpen",()=>Xe(s,o,e),{priority:"highest"}),xt(s,()=>s.listView.items.find(t=>t instanceof A?t.children.first.isOn:!1))}function Xe(s,o,e){const t=s.locale,i=s.listView=new Fe(t),n=typeof o=="function"?o():o;i.ariaLabel=e.ariaLabel,i.role=e.role,Ot(s,i.items,n,t),s.panelView.children.add(i),i.items.delegate("execute").to(s)}function xt(s,o){s.on("change:isOpen",()=>{if(!s.isOpen)return;const e=o();e&&(typeof e.focus=="function"?e.focus():E("ui-dropdown-focus-child-on-open-child-missing-focus",{view:e}))},{priority:Wt.low-10})}function Gi(s){Ri(s),Hi(s),zi(s),Ui(s),$i(s),Ki(s)}function Ri(s){mt({emitter:s,activator:()=>s.isRendered&&s.isOpen,callback:()=>{s.isOpen=!1},contextElements:()=>[s.element,...Et(s.focusTracker).filter(o=>!s.element.contains(o))]})}function Et(s){return[...s.elements,...s.externalViews.flatMap(o=>Et(o.focusTracker))]}function Hi(s){s.on("execute",o=>{o.source instanceof gt||(s.isOpen=!1)})}function zi(s){s.focusTracker.on("change:isFocused",(o,e,t)=>{t||!s.isOpen||(s.isOpen=!1)})}function Ui(s){s.keystrokes.set("arrowdown",(o,e)=>{s.isOpen&&(s.panelView.focus(),e())}),s.keystrokes.set("arrowup",(o,e)=>{s.isOpen&&(s.panelView.focusLast(),e())})}function $i(s){s.on("change:isOpen",(o,e,t)=>{if(t)return;s.focusTracker.elements.some(n=>n.contains(p.document.activeElement))&&s.buttonView.focus()})}function Ki(s){s.on("change:isOpen",(o,e,t)=>{t&&s.panelView.focus()},{priority:"low"})}function Ot(s,o,e,t){o.on("change",()=>{const i=[...o].reduce((r,a)=>(a instanceof A&&a.children.first instanceof H&&r.push(a.children.first),r),[]),n=i.some(r=>r.isToggleable);i.forEach(r=>{r.hasCheckSpace=n})}),o.bindTo(e).using(i=>{if(i.type==="separator")return new Le(t);if(i.type==="group"){const n=new Q(t);return n.set({label:i.label}),Ot(s,n.items,i.items,t),n.items.delegate("execute").to(s),n}else if(i.type==="button"||i.type==="switchbutton"){const n=i.model.role==="menuitemcheckbox"||i.model.role==="menuitemradio",r=new A(t);let a;return i.type==="button"?(a=new H(t),a.set({isToggleable:n})):a=new gt(t),a.bind(...Object.keys(i.model)).to(i.model),a.delegate("execute").to(r),r.children.add(a),r}return null})}const Zi=(s,o,e)=>{const t=new xi(s.locale);return t.set({id:o,ariaDescribedById:e}),t.bind("isReadOnly").to(s,"isEnabled",i=>!i),t.bind("hasError").to(s,"errorText",i=>!!i),t.on("input",()=>{s.errorText=null}),s.bind("isEmpty","isFocused","placeholder").to(t),t},so=(s,o,e)=>{const t=new Ei(s.locale);return t.set({id:o,ariaDescribedById:e,inputMode:"numeric"}),t.bind("isReadOnly").to(s,"isEnabled",i=>!i),t.bind("hasError").to(s,"errorText",i=>!!i),t.on("input",()=>{s.errorText=null}),s.bind("isEmpty","isFocused","placeholder").to(t),t},oo=(s,o,e)=>{const t=Ae(s.locale);return t.set({id:o,ariaDescribedById:e}),t.bind("isEnabled").to(s),t},ji=150;class Xi extends d{constructor(e,t={}){super(e);l(this,"hexInputRow");l(this,"_debounceColorPickerEvent");l(this,"_config");this.set({color:"",_hexColor:""}),this.hexInputRow=this._createInputRow();const i=this.createCollection();t.hideInput||i.add(this.hexInputRow),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker"],tabindex:-1},children:i}),this._config=t,this._debounceColorPickerEvent=be(n=>{this.set("color",n),this.fire("colorSelected",{color:this.color})},ji,{leading:!0}),this.on("set:color",(n,r,a)=>{n.return=Tt(a,this._config.format||"hsl")}),this.on("change:color",()=>{this._hexColor=de(this.color)}),this.on("change:_hexColor",()=>{document.activeElement!==this.picker&&this.picker.setAttribute("color",this._hexColor),de(this.color)!=de(this._hexColor)&&(this.color=this._hexColor)})}render(){if(super.render(),ki("hex-color-picker",Ut),this.picker=p.document.createElement("hex-color-picker"),this.picker.setAttribute("class","hex-color-picker"),this.picker.setAttribute("tabindex","-1"),this._createSlidersView(),this.element){this.hexInputRow.element?this.element.insertBefore(this.picker,this.hexInputRow.element):this.element.appendChild(this.picker);const e=document.createElement("style");e.textContent='[role="slider"]:focus [part$="pointer"] {border: 1px solid #fff;outline: 1px solid var(--ck-color-focus-border);box-shadow: 0 0 0 2px #fff;}',this.picker.shadowRoot.appendChild(e)}this.picker.addEventListener("color-changed",e=>{const t=e.detail.value;this._debounceColorPickerEvent(t)})}focus(){/* istanbul ignore next -- @preserve */!this._config.hideInput&&(M.isGecko||M.isiOS||M.isSafari||M.isBlink)&&this.hexInputRow.children.get(1).focus(),this.slidersView.first.focus()}_createSlidersView(){const i=[...this.picker.shadowRoot.children].filter(n=>n.getAttribute("role")==="slider").map(n=>new qi(n));this.slidersView=this.createCollection(),i.forEach(n=>{this.slidersView.add(n)})}_createInputRow(){const e=this._createColorInput();return new Qi(this.locale,e)}_createColorInput(){const e=new yi(this.locale,Zi),{t}=this.locale;return e.set({label:t("HEX"),class:"color-picker-hex-input"}),e.fieldView.bind("value").to(this,"_hexColor",i=>e.isFocused?e.fieldView.value:i.startsWith("#")?i.substring(1):i),e.fieldView.on("input",()=>{const i=e.fieldView.element.value;if(i){const n=It(i);n&&this._debounceColorPickerEvent(n)}}),e}isValid(){const{t:e}=this.locale;return this._config.hideInput?!0:(this.resetValidationStatus(),this.hexInputRow.getParsedColor()?!0:(this.hexInputRow.inputView.errorText=e('Please enter a valid color (e.g. "ff0000").'),!1))}resetValidationStatus(){this.hexInputRow.inputView.errorText=null}}function de(s){let o=_i(s);return o||(o="#000"),o.length===4&&(o="#"+[o[1],o[1],o[2],o[2],o[3],o[3]].join("")),o.toLowerCase()}class qi extends d{constructor(o){super(),this.element=o}focus(){this.element.focus()}}class Yi extends d{constructor(o){super(o),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__hash-view"]},children:"#"})}}class Qi extends d{constructor(e,t){super(e);l(this,"children");l(this,"inputView");this.inputView=t,this.children=this.createCollection([new Yi,this.inputView]),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__row"]},children:this.children})}getParsedColor(){return It(this.inputView.fieldView.element.value)}}function It(s){if(!s)return null;const o=s.trim().replace(/^#/,"");return![3,4,6,8].includes(o.length)||!/^(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})$/.test(o)?null:`#${o}`}class Ji extends ae(Ce){constructor(o){super(o),this.set("isEmpty",!0),this.on("change",()=>{this.set("isEmpty",this.length===0)})}add(o,e){return this.find(t=>t.color===o.color)?this:super.add(o,e)}hasColor(o){return!!this.find(e=>e.color===o)}}class es extends d{constructor(e,{colors:t,columns:i,removeButtonLabel:n,documentColorsLabel:r,documentColorsCount:a,colorPickerLabel:u,focusTracker:c,focusables:h}){super(e);l(this,"items");l(this,"colorDefinitions");l(this,"focusTracker");l(this,"columns");l(this,"documentColors");l(this,"documentColorsCount");l(this,"staticColorsGrid");l(this,"documentColorsGrid");l(this,"colorPickerButtonView");l(this,"removeColorButtonView");l(this,"_focusables");l(this,"_documentColorsLabel");l(this,"_removeButtonLabel");l(this,"_colorPickerLabel");const f=this.bindTemplate;this.set("isVisible",!0),this.focusTracker=c,this.items=this.createCollection(),this.colorDefinitions=t,this.columns=i,this.documentColors=new Ji,this.documentColorsCount=a,this._focusables=h,this._removeButtonLabel=n,this._colorPickerLabel=u,this._documentColorsLabel=r,this.setTemplate({tag:"div",attributes:{class:["ck-color-grids-fragment",f.if("isVisible","ck-hidden",g=>!g)]},children:this.items}),this.removeColorButtonView=this._createRemoveColorButton(),this.items.add(this.removeColorButtonView)}updateDocumentColors(e,t){const i=e.document,n=this.documentColorsCount;this.documentColors.clear();for(const r of i.getRoots()){const a=e.createRangeIn(r);for(const u of a.getItems())if(u.is("$textProxy")&&u.hasAttribute(t)&&(this._addColorToDocumentColors(u.getAttribute(t)),this.documentColors.length>=n))return}}updateSelectedColors(){const e=this.documentColorsGrid,t=this.staticColorsGrid,i=this.selectedColor;t.selectedColor=i,e&&(e.selectedColor=i)}render(){if(super.render(),this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.documentColorsCount){const e=O.bind(this.documentColors,this.documentColors),t=new d(this.locale);t.setTemplate({tag:"span",attributes:{class:["ck","ck-color-grid__label",e.if("isEmpty","ck-hidden")]},children:[{text:this._documentColorsLabel}]}),this.items.add(t),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid)}this._createColorPickerButton(),this._addColorSelectorElementsToFocusTracker()}focus(){this.removeColorButtonView.focus()}destroy(){super.destroy()}addColorPickerButton(){this.colorPickerButtonView&&(this.items.add(this.colorPickerButtonView),this.focusTracker.add(this.colorPickerButtonView.element),this._focusables.add(this.colorPickerButtonView))}_addColorSelectorElementsToFocusTracker(){this.focusTracker.add(this.removeColorButtonView.element),this._focusables.add(this.removeColorButtonView),this.staticColorsGrid&&(this.focusTracker.add(this.staticColorsGrid.element),this._focusables.add(this.staticColorsGrid)),this.documentColorsGrid&&(this.focusTracker.add(this.documentColorsGrid.element),this._focusables.add(this.documentColorsGrid))}_createColorPickerButton(){this.colorPickerButtonView=new b,this.colorPickerButtonView.set({label:this._colorPickerLabel,withText:!0,icon:m.colorPalette,class:"ck-color-selector__color-picker"}),this.colorPickerButtonView.on("execute",()=>{this.fire("colorPicker:show")})}_createRemoveColorButton(){const e=new b;return e.set({withText:!0,icon:m.eraser,label:this._removeButtonLabel}),e.class="ck-color-selector__remove-color",e.on("execute",()=>{this.fire("execute",{value:null,source:"removeColorButton"})}),e.render(),e}_createStaticColorsGrid(){const e=new Ke(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return e.on("execute",(t,i)=>{this.fire("execute",{value:i.value,source:"staticColorsGrid"})}),e}_createDocumentColorsGrid(){const e=O.bind(this.documentColors,this.documentColors),t=new Ke(this.locale,{columns:this.columns});return t.extendTemplate({attributes:{class:e.if("isEmpty","ck-hidden")}}),t.items.bindTo(this.documentColors).using(i=>{const n=new kt;return n.set({color:i.color,hasBorder:i.options&&i.options.hasBorder}),i.label&&n.set({label:i.label,tooltip:!0}),n.on("execute",()=>{this.fire("execute",{value:i.color,source:"documentColorsGrid"})}),n}),this.documentColors.on("change:isEmpty",(i,n,r)=>{r&&(t.selectedColor=null)}),t}_addColorToDocumentColors(e){const t=this.colorDefinitions.find(i=>i.color===e);t?this.documentColors.add(Object.assign({},t)):this.documentColors.add({color:e,label:e,options:{hasBorder:!1}})}}class ts extends d{constructor(e,{focusTracker:t,focusables:i,keystrokes:n,colorPickerViewConfig:r}){super(e);l(this,"items");l(this,"colorPickerView");l(this,"saveButtonView");l(this,"cancelButtonView");l(this,"actionBarView");l(this,"focusTracker");l(this,"keystrokes");l(this,"_focusables");l(this,"_colorPickerViewConfig");this.items=this.createCollection(),this.focusTracker=t,this.keystrokes=n,this.set("isVisible",!1),this.set("selectedColor",void 0),this._focusables=i,this._colorPickerViewConfig=r;const a=this.bindTemplate,{saveButtonView:u,cancelButtonView:c}=this._createActionButtons();this.saveButtonView=u,this.cancelButtonView=c,this.actionBarView=this._createActionBarView({saveButtonView:u,cancelButtonView:c}),this.setTemplate({tag:"div",attributes:{class:["ck-color-picker-fragment",a.if("isVisible","ck-hidden",h=>!h)]},children:this.items})}render(){super.render();const e=new Xi(this.locale,{...this._colorPickerViewConfig});this.colorPickerView=e,this.colorPickerView.render(),this.selectedColor&&(e.color=this.selectedColor),this.listenTo(this,"change:selectedColor",(t,i,n)=>{e.color=n}),this.items.add(this.colorPickerView),this.items.add(this.actionBarView),this._addColorPickersElementsToFocusTracker(),this._stopPropagationOnArrowsKeys(),this._executeOnEnterPress(),this._executeUponColorChange()}destroy(){super.destroy()}focus(){this.colorPickerView.focus()}resetValidationStatus(){this.colorPickerView.resetValidationStatus()}_executeOnEnterPress(){this.keystrokes.set("enter",e=>{this.isVisible&&this.focusTracker.focusedElement!==this.cancelButtonView.element&&this.colorPickerView.isValid()&&(this.fire("execute",{value:this.selectedColor}),e.stopPropagation(),e.preventDefault())})}_stopPropagationOnArrowsKeys(){const e=t=>t.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}_addColorPickersElementsToFocusTracker(){for(const t of this.colorPickerView.slidersView)this.focusTracker.add(t.element),this._focusables.add(t);const e=this.colorPickerView.hexInputRow.children.get(1);e.element&&(this.focusTracker.add(e.element),this._focusables.add(e)),this.focusTracker.add(this.saveButtonView.element),this._focusables.add(this.saveButtonView),this.focusTracker.add(this.cancelButtonView.element),this._focusables.add(this.cancelButtonView)}_createActionBarView({saveButtonView:e,cancelButtonView:t}){const i=new d,n=this.createCollection();return n.add(e),n.add(t),i.setTemplate({tag:"div",attributes:{class:["ck","ck-color-selector_action-bar"]},children:n}),i}_createActionButtons(){const e=this.locale,t=e.t,i=new b(e),n=new b(e);return i.set({icon:m.check,class:"ck-button-save",type:"button",withText:!1,label:t("Accept")}),n.set({icon:m.cancel,class:"ck-button-cancel",type:"button",withText:!1,label:t("Cancel")}),i.on("execute",()=>{this.colorPickerView.isValid()&&this.fire("execute",{source:"colorPickerSaveButton",value:this.selectedColor})}),n.on("execute",()=>{this.fire("colorPicker:cancel")}),{saveButtonView:i,cancelButtonView:n}}_executeUponColorChange(){this.colorPickerView.on("colorSelected",(e,t)=>{this.fire("execute",{value:t.color,source:"colorPicker"}),this.set("selectedColor",t.color)})}}class no extends d{constructor(e,{colors:t,columns:i,removeButtonLabel:n,documentColorsLabel:r,documentColorsCount:a,colorPickerLabel:u,colorPickerViewConfig:c}){super(e);l(this,"focusTracker");l(this,"keystrokes");l(this,"items");l(this,"colorGridsFragmentView");l(this,"colorPickerFragmentView");l(this,"_focusCycler");l(this,"_focusables");l(this,"_colorPickerViewConfig");this.items=this.createCollection(),this.focusTracker=new v,this.keystrokes=new P,this._focusables=new D,this._colorPickerViewConfig=c,this._focusCycler=new U({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.colorGridsFragmentView=new es(e,{colors:t,columns:i,removeButtonLabel:n,documentColorsLabel:r,documentColorsCount:a,colorPickerLabel:u,focusTracker:this.focusTracker,focusables:this._focusables}),this.colorPickerFragmentView=new ts(e,{focusables:this._focusables,focusTracker:this.focusTracker,keystrokes:this.keystrokes,colorPickerViewConfig:c}),this.set("_isColorGridsFragmentVisible",!0),this.set("_isColorPickerFragmentVisible",!1),this.set("selectedColor",void 0),this.colorGridsFragmentView.bind("isVisible").to(this,"_isColorGridsFragmentVisible"),this.colorPickerFragmentView.bind("isVisible").to(this,"_isColorPickerFragmentVisible"),this.on("change:selectedColor",(h,f,g)=>{this.colorGridsFragmentView.set("selectedColor",g),this.colorPickerFragmentView.set("selectedColor",g)}),this.colorGridsFragmentView.on("change:selectedColor",(h,f,g)=>{this.set("selectedColor",g)}),this.colorPickerFragmentView.on("change:selectedColor",(h,f,g)=>{this.set("selectedColor",g)}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-selector"]},children:this.items})}render(){super.render(),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}appendUI(){this._appendColorGridsFragment(),this._colorPickerViewConfig&&this._appendColorPickerFragment()}showColorPickerFragment(){!this.colorPickerFragmentView.colorPickerView||this._isColorPickerFragmentVisible||(this._isColorPickerFragmentVisible=!0,this.colorPickerFragmentView.focus(),this.colorPickerFragmentView.resetValidationStatus(),this._isColorGridsFragmentVisible=!1)}showColorGridsFragment(){this._isColorGridsFragmentVisible||(this._isColorGridsFragmentVisible=!0,this.colorGridsFragmentView.focus(),this._isColorPickerFragmentVisible=!1)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}updateDocumentColors(e,t){this.colorGridsFragmentView.updateDocumentColors(e,t)}updateSelectedColors(){this.colorGridsFragmentView.updateSelectedColors()}_appendColorGridsFragment(){this.items.length||(this.items.add(this.colorGridsFragmentView),this.colorGridsFragmentView.delegate("execute").to(this),this.colorGridsFragmentView.delegate("colorPicker:show").to(this))}_appendColorPickerFragment(){this.items.length!==2&&(this.items.add(this.colorPickerFragmentView),this.colorGridsFragmentView.colorPickerButtonView&&this.colorGridsFragmentView.colorPickerButtonView.on("execute",()=>{this.showColorPickerFragment()}),this.colorGridsFragmentView.addColorPickerButton(),this.colorPickerFragmentView.delegate("execute").to(this),this.colorPickerFragmentView.delegate("colorPicker:cancel").to(this))}}class is{constructor(o){l(this,"editor");l(this,"_components",new Map);this.editor=o}*names(){for(const o of this._components.values())yield o.originalName}add(o,e){this._components.set(fe(o),{callback:e,originalName:o})}create(o){if(!this.has(o))throw new x("componentfactory-item-missing",this,{name:o});return this._components.get(fe(o)).callback(this.editor.locale)}has(o){return this._components.has(fe(o))}}function fe(s){return String(s).toLowerCase()}const qe="ck-tooltip",w=class w extends ye(){constructor(e){super();l(this,"tooltipTextView");l(this,"balloonPanelView");l(this,"_currentElementWithTooltip",null);l(this,"_currentTooltipPosition",null);l(this,"_mutationObserver",null);l(this,"_pinTooltipDebounced");l(this,"_unpinTooltipDebounced");l(this,"_watchdogExcluded");if(w._editors.add(e),w._instance)return w._instance;w._instance=this,this.tooltipTextView=new d(e.locale),this.tooltipTextView.set("text",""),this.tooltipTextView.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:this.tooltipTextView.bindTemplate.to("text")}]}),this.balloonPanelView=new z(e.locale),this.balloonPanelView.class=qe,this.balloonPanelView.content.add(this.tooltipTextView),this._mutationObserver=ss(()=>{this._updateTooltipPosition()}),this._pinTooltipDebounced=be(this._pinTooltip,600),this._unpinTooltipDebounced=be(this._unpinTooltip,400),this.listenTo(p.document,"keydown",this._onKeyDown.bind(this),{useCapture:!0}),this.listenTo(p.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(p.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(p.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(p.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(p.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(e){const t=e.ui.view&&e.ui.view.body;w._editors.delete(e),this.stopListening(e.ui),t&&t.has(this.balloonPanelView)&&t.remove(this.balloonPanelView),w._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),w._instance=null)}static getPositioningFunctions(e){const t=w.defaultBalloonPositions;return{s:[t.southArrowNorth,t.southArrowNorthEast,t.southArrowNorthWest],n:[t.northArrowSouth],e:[t.eastArrowWest],w:[t.westArrowEast],sw:[t.southArrowNorthEast],se:[t.southArrowNorthWest]}[e]}_onKeyDown(e,t){t.key==="Escape"&&this._currentElementWithTooltip&&(this._unpinTooltip(),t.stopPropagation())}_onEnterOrFocus(e,{target:t}){const i=pe(t);if(!i){e.name==="focus"&&this._unpinTooltip();return}if(i===this._currentElementWithTooltip){this._unpinTooltipDebounced.cancel();return}this._unpinTooltip(),e.name==="focus"&&!i.matches(":hover")||i.matches("[data-cke-tooltip-instant]")?this._pinTooltip(i,me(i)):this._pinTooltipDebounced(i,me(i))}_onLeaveOrBlur(e,{target:t,relatedTarget:i}){if(e.name==="mouseleave"){if(!Ie(t))return;const n=this.balloonPanelView.element,r=n&&(n===i||n.contains(i)),a=!r&&t===n;if(r){this._unpinTooltipDebounced.cancel();return}if(!a&&this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;const u=pe(t),c=pe(i);(a||u&&u!==c)&&(this._pinTooltipDebounced.cancel(),this._currentElementWithTooltip&&this._currentElementWithTooltip.matches("[data-cke-tooltip-instant]")||u&&u.matches("[data-cke-tooltip-instant]")?this._unpinTooltip():this._unpinTooltipDebounced())}else{if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;this._pinTooltipDebounced.cancel(),this._unpinTooltipDebounced()}}_onScroll(e,{target:t}){this._currentElementWithTooltip&&(t.contains(this.balloonPanelView.element)&&t.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(e,{text:t,position:i,cssClass:n}){this._unpinTooltip();const r=Rt(w._editors.values()).ui.view.body;r.has(this.balloonPanelView)||r.add(this.balloonPanelView),this.tooltipTextView.text=t,this.balloonPanelView.class=[qe,n].filter(a=>a).join(" "),this.balloonPanelView.pin({target:e,positions:w.getPositioningFunctions(i)}),this._mutationObserver.attach(e);for(const a of w._editors)this.listenTo(a.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=e,this._currentTooltipPosition=i}_unpinTooltip(){this._unpinTooltipDebounced.cancel(),this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const e of w._editors)this.stopListening(e.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this.tooltipTextView.text="",this._mutationObserver.detach()}_updateTooltipPosition(){if(!this._currentElementWithTooltip)return;const e=me(this._currentElementWithTooltip);if(!L(this._currentElementWithTooltip)||!e.text){this._unpinTooltip();return}this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:w.getPositioningFunctions(e.position)})}};l(w,"defaultBalloonPositions",z.generatePositions({heightOffset:5,sideOffset:13})),l(w,"_editors",new Set),l(w,"_instance",null);let ve=w;function pe(s){return Ie(s)?s.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}function me(s){return{text:s.dataset.ckeTooltipText,position:s.dataset.ckeTooltipPosition||"s",cssClass:s.dataset.ckeTooltipClass||""}}function ss(s){const o=new MutationObserver(()=>{s()});return{attach(e){o.observe(e,{attributes:!0,attributeFilter:["data-cke-tooltip-text","data-cke-tooltip-position"]})},detach(){o.disconnect()}}}const os=50,ns=350;class Pt extends ye(){constructor(e,t={}){super();l(this,"editor");l(this,"_balloonView",null);l(this,"_showBalloonThrottled",Zt(()=>this._showBalloon(),50,{leading:!0}));l(this,"_lastFocusedEditableElement",null);l(this,"_balloonClass");this.editor=e,this._balloonClass=t.balloonClass,e.on("ready",()=>this._handleEditorReady())}destroy(){const e=this._balloonView;e&&(e.unpin(),this._balloonView=null),this._showBalloonThrottled.cancel(),this.stopListening()}_handleEditorReady(){const e=this.editor;this._isEnabled()&&e.ui.view&&(e.ui.focusTracker.on("change:isFocused",(t,i,n)=>{this._updateLastFocusedEditableElement(),n?this._showBalloon():this._hideBalloon()}),e.ui.focusTracker.on("change:focusedElement",(t,i,n)=>{this._updateLastFocusedEditableElement(),n&&this._showBalloon()}),e.ui.on("update",()=>{this._showBalloonThrottled()}))}_getNormalizedConfig(){return{side:this.editor.locale.contentLanguageDirection==="ltr"?"right":"left",position:"border",verticalOffset:0,horizontalOffset:5}}_showBalloon(){const e=this._getBalloonAttachOptions();e&&(this._balloonView||(this._balloonView=this._createBalloonView()),this._balloonView.pin(e))}_hideBalloon(){this._balloonView&&this._balloonView.unpin()}_createBalloonView(){const e=this.editor,t=new z,i=this._createBadgeContent();return t.content.add(i),this._balloonClass&&(t.class=this._balloonClass),e.ui.view.body.add(t),t}_getBalloonAttachOptions(){if(!this._lastFocusedEditableElement)return null;const e=this._getNormalizedConfig(),t=e.side==="right"?rs(this._lastFocusedEditableElement,e):ls(this._lastFocusedEditableElement,e);return{target:this._lastFocusedEditableElement,positions:[t]}}_updateLastFocusedEditableElement(){const e=this.editor,t=e.ui.focusTracker.isFocused,i=e.ui.focusTracker.focusedElement;if(!t||!i){this._lastFocusedEditableElement=null;return}const n=Array.from(e.ui.getEditableElementsNames()).map(r=>e.ui.getEditableElement(r));n.includes(i)?this._lastFocusedEditableElement=i:this._lastFocusedEditableElement=n[0]}}function rs(s,o){return Bt(s,o,(e,t)=>e.left+e.width-t.width-o.horizontalOffset)}function ls(s,o){return Bt(s,o,e=>e.left+o.horizontalOffset)}function Bt(s,o,e){return(t,i)=>{const n=new V(s);if(n.width<ns||n.height<os)return null;let r;o.position==="inside"?r=n.bottom-i.height:r=n.bottom-i.height/2,r-=o.verticalOffset;const a=e(n,i),c=t.clone().moveTo(a,r).getIntersection(i.clone().moveTo(a,r)).getVisible();return!c||c.getArea()<i.getArea()?null:{top:r,left:a,name:`position_${o.position}-side_${o.side}`,config:{withArrow:!1}}}}var as=`<svg xmlns="http://www.w3.org/2000/svg" width="53" height="10" viewBox="0 0 53 10"><path fill="#1C2331" d="M31.724 1.492a15.139 15.139 0 0 0 .045 1.16 2.434 2.434 0 0 0-.687-.34 3.68 3.68 0 0 0-1.103-.166 2.332 2.332 0 0 0-1.14.255 1.549 1.549 0 0 0-.686.87c-.15.41-.225.98-.225 1.712 0 .939.148 1.659.444 2.161.297.503.792.754 1.487.754.452.015.9-.094 1.294-.316.296-.174.557-.4.771-.669l.14.852h1.282V.007h-1.623v1.485ZM31 6.496a1.77 1.77 0 0 1-.494.061.964.964 0 0 1-.521-.127.758.758 0 0 1-.296-.466 3.984 3.984 0 0 1-.093-.992 4.208 4.208 0 0 1 .098-1.052.753.753 0 0 1 .307-.477 1.08 1.08 0 0 1 .55-.122c.233-.004.466.026.69.089l.483.144v2.553c-.11.076-.213.143-.307.2a1.73 1.73 0 0 1-.417.189ZM35.68 0l-.702.004c-.322.002-.482.168-.48.497l.004.581c.002.33.164.493.486.49l.702-.004c.322-.002.481-.167.48-.496L36.165.49c-.002-.33-.164-.493-.486-.491ZM36.145 2.313l-1.612.01.034 5.482 1.613-.01-.035-5.482ZM39.623.79 37.989.8 38 2.306l-.946.056.006 1.009.949-.006.024 2.983c.003.476.143.844.419 1.106.275.26.658.39 1.148.387.132 0 .293-.01.483-.03.19-.02.38-.046.57-.08.163-.028.324-.068.482-.119l-.183-1.095-.702.004a.664.664 0 0 1-.456-.123.553.553 0 0 1-.14-.422l-.016-2.621 1.513-.01-.006-1.064-1.514.01-.01-1.503ZM46.226 2.388c-.41-.184-.956-.274-1.636-.27-.673.004-1.215.101-1.627.29-.402.179-.72.505-.888.91-.18.419-.268.979-.264 1.68.004.688.1 1.24.285 1.655.172.404.495.724.9.894.414.18.957.268 1.63.264.68-.004 1.224-.099 1.632-.284.4-.176.714-.501.878-.905.176-.418.263-.971.258-1.658-.004-.702-.097-1.261-.28-1.677a1.696 1.696 0 0 0-.888-.9Zm-.613 3.607a.77.77 0 0 1-.337.501 1.649 1.649 0 0 1-1.317.009.776.776 0 0 1-.343-.497 4.066 4.066 0 0 1-.105-1.02 4.136 4.136 0 0 1 .092-1.03.786.786 0 0 1 .337-.507 1.59 1.59 0 0 1 1.316-.008.79.79 0 0 1 .344.502c.078.337.113.683.105 1.03.012.343-.019.685-.092 1.02ZM52.114 2.07a2.67 2.67 0 0 0-1.128.278c-.39.191-.752.437-1.072.73l-.157-.846-1.273.008.036 5.572 1.623-.01-.024-3.78c.35-.124.646-.22.887-.286.26-.075.53-.114.8-.118l.45-.003.144-1.546-.286.001ZM22.083 7.426l-1.576-2.532a2.137 2.137 0 0 0-.172-.253 1.95 1.95 0 0 0-.304-.29.138.138 0 0 1 .042-.04 1.7 1.7 0 0 0 .328-.374l1.75-2.71c.01-.015.025-.028.024-.048-.01-.01-.021-.007-.031-.007L20.49 1.17a.078.078 0 0 0-.075.045l-.868 1.384c-.23.366-.46.732-.688 1.099a.108.108 0 0 1-.112.06c-.098-.005-.196-.001-.294-.002-.018 0-.038.006-.055-.007.002-.02.002-.039.005-.058a4.6 4.6 0 0 0 .046-.701V1.203c0-.02-.009-.032-.03-.03h-.033L16.93 1.17c-.084 0-.073-.01-.073.076v6.491c-.001.018.006.028.025.027h1.494c.083 0 .072.007.072-.071v-2.19c0-.055-.003-.11-.004-.166a3.366 3.366 0 0 0-.05-.417h.06c.104 0 .209.002.313-.002a.082.082 0 0 1 .084.05c.535.913 1.07 1.824 1.607 2.736a.104.104 0 0 0 .103.062c.554-.003 1.107-.002 1.66-.002l.069-.003-.019-.032-.188-.304ZM27.112 6.555c-.005-.08-.004-.08-.082-.08h-2.414c-.053 0-.106-.003-.159-.011a.279.279 0 0 1-.246-.209.558.558 0 0 1-.022-.15c0-.382 0-.762-.002-1.143 0-.032.007-.049.042-.044h2.504c.029.003.037-.012.034-.038V3.814c0-.089.013-.078-.076-.078h-2.44c-.07 0-.062.003-.062-.06v-.837c0-.047.004-.093.013-.14a.283.283 0 0 1 .241-.246.717.717 0 0 1 .146-.011h2.484c.024.002.035-.009.036-.033l.003-.038.03-.496c.01-.183.024-.365.034-.548.005-.085.003-.087-.082-.094-.218-.018-.437-.038-.655-.05a17.845 17.845 0 0 0-.657-.026 72.994 72.994 0 0 0-1.756-.016 1.7 1.7 0 0 0-.471.064 1.286 1.286 0 0 0-.817.655c-.099.196-.149.413-.145.633v3.875c0 .072.003.144.011.216a1.27 1.27 0 0 0 .711 1.029c.228.113.48.167.734.158.757-.005 1.515.002 2.272-.042.274-.016.548-.034.82-.053.03-.002.043-.008.04-.041-.008-.104-.012-.208-.019-.312a69.964 69.964 0 0 1-.05-.768ZM16.14 7.415l-.127-1.075c-.004-.03-.014-.04-.044-.037a13.125 13.125 0 0 1-.998.073c-.336.01-.672.02-1.008.016-.116-.001-.233-.014-.347-.039a.746.746 0 0 1-.45-.262c-.075-.1-.132-.211-.167-.33a3.324 3.324 0 0 1-.126-.773 9.113 9.113 0 0 1-.015-.749c0-.285.022-.57.065-.852.023-.158.066-.312.127-.46a.728.728 0 0 1 .518-.443 1.64 1.64 0 0 1 .397-.048c.628-.001 1.255.003 1.882.05.022.001.033-.006.036-.026l.003-.031.06-.55c.019-.177.036-.355.057-.532.004-.034-.005-.046-.04-.056a5.595 5.595 0 0 0-1.213-.21 10.783 10.783 0 0 0-.708-.02c-.24-.003-.48.01-.719.041a3.477 3.477 0 0 0-.625.14 1.912 1.912 0 0 0-.807.497c-.185.2-.33.433-.424.688a4.311 4.311 0 0 0-.24 1.096c-.031.286-.045.572-.042.86-.006.43.024.86.091 1.286.04.25.104.497.193.734.098.279.26.53.473.734.214.205.473.358.756.446.344.11.702.17 1.063.177a8.505 8.505 0 0 0 1.578-.083 6.11 6.11 0 0 0 .766-.18c.03-.008.047-.023.037-.057a.157.157 0 0 1-.003-.025Z"/><path fill="#AFE229" d="M6.016 6.69a1.592 1.592 0 0 0-.614.21c-.23.132-.422.32-.56.546-.044.072-.287.539-.287.539l-.836 1.528.009.006c.038.025.08.046.123.063.127.046.26.07.395.073.505.023 1.011-.007 1.517-.003.29.009.58.002.869-.022a.886.886 0 0 0 .395-.116.962.962 0 0 0 .312-.286c.056-.083.114-.163.164-.249.24-.408.48-.816.718-1.226.075-.128.148-.257.222-.386l.112-.192a1.07 1.07 0 0 0 .153-.518l-1.304.023s-1.258-.005-1.388.01Z"/><path fill="#771BFF" d="m2.848 9.044.76-1.39.184-.352c-.124-.067-.245-.14-.367-.21-.346-.204-.706-.384-1.045-.6a.984.984 0 0 1-.244-.207c-.108-.134-.136-.294-.144-.46-.021-.409-.002-.818-.009-1.227-.003-.195 0-.39.003-.585.004-.322.153-.553.427-.713l.833-.488c.22-.13.44-.257.662-.385.05-.029.105-.052.158-.077.272-.128.519-.047.76.085l.044.028c.123.06.242.125.358.196.318.178.635.357.952.537.095.056.187.117.275.184.194.144.254.35.266.578.016.284.007.569.006.853-.001.28.004.558 0 .838.592-.003 1.259 0 1.259 0l.723-.013c-.003-.292-.007-.584-.007-.876 0-.524.015-1.048-.016-1.571-.024-.42-.135-.8-.492-1.067a5.02 5.02 0 0 0-.506-.339A400.52 400.52 0 0 0 5.94.787C5.722.664 5.513.524 5.282.423 5.255.406 5.228.388 5.2.373 4.758.126 4.305-.026 3.807.21c-.097.046-.197.087-.29.14A699.896 699.896 0 0 0 .783 1.948c-.501.294-.773.717-.778 1.31-.004.36-.009.718-.001 1.077.016.754-.017 1.508.024 2.261.016.304.07.6.269.848.127.15.279.28.448.382.622.4 1.283.734 1.92 1.11l.183.109Z"/></svg>
29
- `;const cs="Powered by";class hs extends Pt{constructor(o){super(o,{balloonClass:"ck-powered-by-balloon"})}_isEnabled(){const o=this.editor;if(o.config.get("ui.poweredBy.forceVisible"))return!0;const t=o.config.get("licenseKey");if(t=="GPL")return!0;const i=at(t.split(".")[1]);return i?!i.whiteLabel:!0}_createBadgeContent(){return new us(this.editor.locale,this._getNormalizedConfig().label)}_getNormalizedConfig(){const o=super._getNormalizedConfig(),e=this.editor.config.get("ui.poweredBy")||{},t=e.position||o.position,i=t==="inside"?5:o.verticalOffset;return{position:t,side:e.side||o.side,label:e.label===void 0?cs:e.label,verticalOffset:e.verticalOffset!==void 0?e.verticalOffset:i,horizontalOffset:e.horizontalOffset!==void 0?e.horizontalOffset:o.horizontalOffset,forceVisible:!!e.forceVisible}}}class us extends d{constructor(o,e){super(o);const t=new F,i=this.bindTemplate;t.set({content:as,isColorInherited:!1}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-powered-by"],"aria-hidden":!0},children:[{tag:"a",attributes:{href:"https://ckeditor.com/powered-by-ckeditor/?utm_source=ckeditor&utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo",target:"_blank",tabindex:"-1"},children:[...e?[{tag:"span",attributes:{class:["ck","ck-powered-by__label"]},children:[e]}]:[],t],on:{dragstart:i.to(n=>n.preventDefault())}}]})}}class ds extends Pt{constructor(e){super(e,{balloonClass:"ck-evaluation-badge-balloon"});l(this,"licenseTypeMessage",{evaluation:"For evaluation purposes only",trial:"For evaluation purposes only",development:"For development purposes only"})}_isEnabled(){const t=this.editor.config.get("licenseKey"),i=Ye(t);return!!(i&&this.licenseTypeMessage[i])}_createBadgeContent(){const e=this.editor.config.get("licenseKey"),t=Ye(e);return new fs(this.editor.locale,this.licenseTypeMessage[t])}_getNormalizedConfig(){const e=super._getNormalizedConfig(),t=this.editor.config.get("ui.poweredBy")||{},i=t.position||e.position,n=t.side||e.side;return{position:i,side:n==="left"?"right":"left",verticalOffset:e.verticalOffset,horizontalOffset:e.horizontalOffset}}}class fs extends d{constructor(o,e){super(o),this.setTemplate({tag:"div",attributes:{class:["ck","ck-evaluation-badge"],"aria-hidden":!0},children:[{tag:"span",attributes:{class:["ck","ck-evaluation-badge__label"]},children:[e]}]})}}function Ye(s){if(s=="GPL")return"GPL";const o=at(s.split(".")[1]);return o?o.licenseType||"production":null}const Qe={POLITE:"polite",ASSERTIVE:"assertive"};class ps{constructor(o){l(this,"editor");l(this,"view");this.editor=o,o.once("ready",()=>{for(const e of Object.values(Qe))this.announce("",e)})}announce(o,e=Qe.POLITE){const t=this.editor;if(!t.ui.view)return;this.view||(this.view=new ms(t.locale),t.ui.view.body.add(this.view));const{politeness:i,isUnsafeHTML:n}=typeof e=="string"?{politeness:e}:e;let r=this.view.regionViews.find(a=>a.politeness===i);r||(r=new ws(t,i),this.view.regionViews.add(r)),r.announce({announcement:o,isUnsafeHTML:n})}}class ms extends d{constructor(e){super(e);l(this,"regionViews");this.regionViews=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-aria-live-announcer"]},children:this.regionViews})}}class ws extends d{constructor(e,t){super(e.locale);l(this,"politeness");l(this,"_domConverter");l(this,"_pruneAnnouncementsInterval");this.setTemplate({tag:"div",attributes:{"aria-live":t,"aria-relevant":"additions"},children:[{tag:"ul",attributes:{class:["ck","ck-aria-live-region-list"]}}]}),e.on("destroy",()=>{this._pruneAnnouncementsInterval!==null&&(clearInterval(this._pruneAnnouncementsInterval),this._pruneAnnouncementsInterval=null)}),this.politeness=t,this._domConverter=e.data.htmlProcessor.domConverter,this._pruneAnnouncementsInterval=setInterval(()=>{this.element&&this._listElement.firstChild&&this._listElement.firstChild.remove()},5e3)}announce({announcement:e,isUnsafeHTML:t}){if(!e.trim().length)return;const i=document.createElement("li");t?this._domConverter.setContentOf(i,e):i.innerText=e,this._listElement.appendChild(i)}get _listElement(){return this.element.querySelector("ul")}}class Lt extends A{constructor(o,e){super(o);const t=this.bindTemplate;this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item"]},on:{mouseenter:t.to("mouseenter")}}),this.delegate("mouseenter").to(e)}}const X=5,N={toggleMenusAndFocusItemsOnHover(s){s.on("menu:mouseenter",o=>{if(!(!s.isFocusBorderEnabled&&!s.isOpen)){if(s.isOpen)for(const e of s.menus){const t=o.path[0],i=t instanceof Lt&&t.children.first===e;e.isOpen=(o.path.includes(e)||i)&&e.isEnabled}o.source.focus()}})},focusCycleMenusOnArrows(s){const o=s.locale.uiLanguageDirection==="rtl";s.on("menu:arrowright",t=>{e(t.source,o?-1:1)}),s.on("menu:arrowleft",t=>{e(t.source,o?1:-1)});function e(t,i){const n=s.children.getIndex(t),r=t.isOpen,a=s.children.length,u=s.children.get((n+a+i)%a);t.isOpen=!1,r&&(u.isOpen=!0),u.buttonView.focus()}},closeMenusWhenTheBarCloses(s){s.on("change:isOpen",()=>{s.isOpen||s.menus.forEach(o=>{o.isOpen=!1})})},closeMenuWhenAnotherOnTheSameLevelOpens(s){s.on("menu:change:isOpen",(o,e,t)=>{t&&s.menus.filter(i=>o.source.parentMenuView===i.parentMenuView&&o.source!==i&&i.isOpen).forEach(i=>{i.isOpen=!1})})},closeOnClickOutside(s){mt({emitter:s,activator:()=>s.isOpen,callback:()=>s.close(),contextElements:()=>s.children.map(o=>o.element)})},enableFocusHighlightOnInteraction(s){let o=!1;s.on("change:isOpen",(e,t,i)=>{i||(o||(s.isFocusBorderEnabled=!1),o=!1)}),s.listenTo(s.element,"keydown",()=>{o=!0},{useCapture:!0}),s.listenTo(s.element,"keyup",()=>{o=!1},{useCapture:!0}),s.listenTo(s.element,"focus",()=>{o&&(s.isFocusBorderEnabled=!0)},{useCapture:!0})}},B={openAndFocusPanelOnArrowDownKey(s){s.keystrokes.set("arrowdown",(o,e)=>{s.focusTracker.focusedElement===s.buttonView.element&&(s.isOpen||(s.isOpen=!0),s.panelView.focus(),e())})},openOnArrowRightKey(s){const o=s.locale.uiLanguageDirection==="rtl"?"arrowleft":"arrowright";s.keystrokes.set(o,(e,t)=>{s.focusTracker.focusedElement!==s.buttonView.element||!s.isEnabled||(s.isOpen||(s.isOpen=!0),s.panelView.focus(),t())})},openOnButtonClick(s){s.buttonView.on("execute",()=>{s.isOpen=!0})},toggleOnButtonClick(s){s.buttonView.on("execute",()=>{s.isOpen=!s.isOpen})},openAndFocusOnEnterKeyPress(s){s.keystrokes.set("enter",(o,e)=>{s.focusTracker.focusedElement===s.buttonView.element&&(s.isOpen=!0,s.panelView.focus(),e())})},closeOnArrowLeftKey(s){const o=s.locale.uiLanguageDirection==="rtl"?"arrowright":"arrowleft";s.keystrokes.set(o,(e,t)=>{s.isOpen&&(s.isOpen=!1,s.focus(),t())})},closeOnEscKey(s){s.keystrokes.set("esc",(o,e)=>{s.isOpen&&(s.isOpen=!1,s.focus(),e())})},closeOnParentClose(s){s.parentMenuView.on("change:isOpen",(o,e,t)=>{!t&&o.source===s.parentMenuView&&(s.isOpen=!1)})}},bs={southEast:s=>({top:s.bottom,left:s.left,name:"se"}),southWest:(s,o)=>({top:s.bottom,left:s.left-o.width+s.width,name:"sw"}),northEast:(s,o)=>({top:s.top-o.height,left:s.left,name:"ne"}),northWest:(s,o)=>({top:s.top-o.height,left:s.left-o.width+s.width,name:"nw"}),eastSouth:s=>({top:s.top,left:s.right-X,name:"es"}),eastNorth:(s,o)=>({top:s.top-o.height,left:s.right-X,name:"en"}),westSouth:(s,o)=>({top:s.top,left:s.left-o.width+X,name:"ws"}),westNorth:(s,o)=>({top:s.top-o.height,left:s.left-o.width+X,name:"wn"})},gs=[{menuId:"file",label:"File",groups:[{groupId:"export",items:["menuBar:exportPdf","menuBar:exportWord"]},{groupId:"import",items:["menuBar:importWord"]},{groupId:"revisionHistory",items:["menuBar:revisionHistory"]}]},{menuId:"edit",label:"Edit",groups:[{groupId:"undo",items:["menuBar:undo","menuBar:redo"]},{groupId:"selectAll",items:["menuBar:selectAll"]},{groupId:"findAndReplace",items:["menuBar:findAndReplace"]}]},{menuId:"view",label:"View",groups:[{groupId:"sourceEditingEnhanced",items:["menuBar:sourceEditingEnhanced"]},{groupId:"sourceEditing",items:["menuBar:sourceEditing"]},{groupId:"showBlocks",items:["menuBar:showBlocks"]},{groupId:"previewMergeFields",items:["menuBar:previewMergeFields"]},{groupId:"restrictedEditing",items:["menuBar:restrictedEditing"]}]},{menuId:"insert",label:"Insert",groups:[{groupId:"insertMainWidgets",items:["menuBar:insertImage","menuBar:ckbox","menuBar:ckfinder","menuBar:insertTable"]},{groupId:"insertInline",items:["menuBar:link","menuBar:bookmark","menuBar:comment","menuBar:insertMergeField","menuBar:emoji"]},{groupId:"insertMinorWidgets",items:["menuBar:mediaEmbed","menuBar:insertTemplate","menuBar:specialCharacters","menuBar:blockQuote","menuBar:codeBlock","menuBar:htmlEmbed"]},{groupId:"insertStructureWidgets",items:["menuBar:horizontalLine","menuBar:pageBreak","menuBar:tableOfContents"]},{groupId:"restrictedEditingException",items:["menuBar:restrictedEditingException"]}]},{menuId:"format",label:"Format",groups:[{groupId:"textAndFont",items:[{menuId:"text",label:"Text",groups:[{groupId:"basicStyles",items:["menuBar:bold","menuBar:italic","menuBar:underline","menuBar:strikethrough","menuBar:superscript","menuBar:subscript","menuBar:code"]},{groupId:"textPartLanguage",items:["menuBar:textPartLanguage"]}]},{menuId:"font",label:"Font",groups:[{groupId:"fontProperties",items:["menuBar:fontSize","menuBar:fontFamily"]},{groupId:"fontColors",items:["menuBar:fontColor","menuBar:fontBackgroundColor"]},{groupId:"highlight",items:["menuBar:highlight"]}]},"menuBar:heading"]},{groupId:"list",items:["menuBar:bulletedList","menuBar:numberedList","menuBar:multiLevelList","menuBar:todoList"]},{groupId:"indent",items:["menuBar:alignment","menuBar:indent","menuBar:outdent"]},{groupId:"caseChange",items:["menuBar:caseChange"]},{groupId:"removeFormat",items:["menuBar:removeFormat"]}]},{menuId:"tools",label:"Tools",groups:[{groupId:"aiTools",items:["menuBar:aiAssistant","menuBar:aiCommands"]},{groupId:"tools",items:["menuBar:trackChanges","menuBar:commentsArchive"]}]},{menuId:"help",label:"Help",groups:[{groupId:"help",items:["menuBar:accessibilityHelp"]}]}];function _s(s){let o;return!("items"in s)||!s.items?o={items:Oe(gs),addItems:[],removeItems:[],isVisible:!0,isUsingDefaultConfig:!0,...s}:o={items:s.items,removeItems:[],addItems:[],isVisible:!0,isUsingDefaultConfig:!1,...s},o}function ks({normalizedConfig:s,locale:o,componentFactory:e,extraItems:t}){const i=Oe(s);return Je(s,i,t),Ts(s,i),Je(s,i,i.addItems),vs(s,i,e),Ft(s,i),ys(i,o),i}function Ts(s,o){const e=o.removeItems,t=[];o.items=o.items.filter(({menuId:i})=>e.includes(i)?(t.push(i),!1):!0),$(o.items,i=>{i.groups=i.groups.filter(({groupId:n})=>e.includes(n)?(t.push(n),!1):!0);for(const n of i.groups)n.items=n.items.filter(r=>{const a=At(r);return e.includes(a)?(t.push(a),!1):!0})});for(const i of e)t.includes(i)||E("menu-bar-item-could-not-be-removed",{menuBarConfig:s,itemName:i})}function Je(s,o,e){const t=[];if(e.length!=0){for(const i of e){const n=xs(i.position),r=Es(i.position);if(Cs(i))if(!r)n==="start"?(o.items.unshift(i.menu),t.push(i)):n==="end"&&(o.items.push(i.menu),t.push(i));else{const a=o.items.findIndex(u=>u.menuId===r);a!=-1?n==="before"?(o.items.splice(a,0,i.menu),t.push(i)):n==="after"&&(o.items.splice(a+1,0,i.menu),t.push(i)):et(o,i.menu,r,n)&&t.push(i)}else Vs(i)?$(o.items,a=>{if(a.menuId===r)n==="start"?(a.groups.unshift(i.group),t.push(i)):n==="end"&&(a.groups.push(i.group),t.push(i));else{const u=a.groups.findIndex(c=>c.groupId===r);u!==-1&&(n==="before"?(a.groups.splice(u,0,i.group),t.push(i)):n==="after"&&(a.groups.splice(u+1,0,i.group),t.push(i)))}}):et(o,i.item,r,n)&&t.push(i)}for(const i of e)t.includes(i)||E("menu-bar-item-could-not-be-added",{menuBarConfig:s,addedItemConfig:i})}}function et(s,o,e,t){let i=!1;return $(s.items,n=>{for(const{groupId:r,items:a}of n.groups){if(i)return;if(r===e)t==="start"?(a.unshift(o),i=!0):t==="end"&&(a.push(o),i=!0);else{const u=a.findIndex(c=>At(c)===e);u!==-1&&(t==="before"?(a.splice(u,0,o),i=!0):t==="after"&&(a.splice(u+1,0,o),i=!0))}}}),i}function vs(s,o,e){$(o.items,t=>{for(const i of t.groups)i.items=i.items.filter(n=>{const r=typeof n=="string"&&!e.has(n);return r&&!o.isUsingDefaultConfig&&E("menu-bar-item-unavailable",{menuBarConfig:s,parentMenuConfig:Oe(t),componentName:n}),!r})})}function Ft(s,o){const e=o.isUsingDefaultConfig;let t=!1;if(o.items=o.items.filter(i=>i.groups.length?!0:(we(s,i,e),!1)),!o.items.length){we(s,s,e);return}$(o.items,i=>{i.groups=i.groups.filter(n=>n.items.length?!0:(t=!0,!1));for(const n of i.groups)n.items=n.items.filter(r=>Dt(r)&&!r.groups.length?(we(s,r,e),t=!0,!1):!0)}),t&&Ft(s,o)}function we(s,o,e){e||E("menu-bar-menu-empty",{menuBarConfig:s,emptyMenuConfig:o})}function ys(s,o){const e=o.t,t={File:e({string:"File",id:"MENU_BAR_MENU_FILE"}),Edit:e({string:"Edit",id:"MENU_BAR_MENU_EDIT"}),View:e({string:"View",id:"MENU_BAR_MENU_VIEW"}),Insert:e({string:"Insert",id:"MENU_BAR_MENU_INSERT"}),Format:e({string:"Format",id:"MENU_BAR_MENU_FORMAT"}),Tools:e({string:"Tools",id:"MENU_BAR_MENU_TOOLS"}),Help:e({string:"Help",id:"MENU_BAR_MENU_HELP"}),Text:e({string:"Text",id:"MENU_BAR_MENU_TEXT"}),Font:e({string:"Font",id:"MENU_BAR_MENU_FONT"})};$(s.items,i=>{i.label in t&&(i.label=t[i.label])})}function $(s,o){if(Array.isArray(s))for(const t of s)e(t);function e(t){o(t);for(const i of t.groups)for(const n of i.items)Dt(n)&&e(n)}}function Cs(s){return typeof s=="object"&&"menu"in s}function Vs(s){return typeof s=="object"&&"group"in s}function xs(s){return s.startsWith("start")?"start":s.startsWith("end")?"end":s.startsWith("after")?"after":"before"}function Es(s){const o=s.match(/^[^:]+:(.+)/);return o?o[1]:null}function At(s){return typeof s=="string"?s:s.menuId}function Dt(s){return typeof s=="object"&&"menuId"in s}class ro extends ae(){constructor(e){super();l(this,"editor");l(this,"componentFactory");l(this,"focusTracker");l(this,"tooltipManager");l(this,"poweredBy");l(this,"evaluationBadge");l(this,"ariaLiveAnnouncer");l(this,"isReady",!1);l(this,"_editableElementsMap",new Map);l(this,"_focusableToolbarDefinitions",[]);l(this,"_extraMenuBarElements",[]);l(this,"_lastFocusedForeignElement",null);const t=e.editing.view;this.editor=e,this.componentFactory=new is(e),this.focusTracker=new v,this.tooltipManager=new ve(e),this.poweredBy=new hs(e),this.evaluationBadge=new ds(e),this.ariaLiveAnnouncer=new ps(e),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.once("ready",()=>{this._bindBodyCollectionWithFocusTracker(),this.isReady=!0}),this.listenTo(t.document,"layoutChanged",this.update.bind(this)),this.listenTo(t,"scrollToTheSelection",this._handleScrollToTheSelection.bind(this)),this._initFocusTracking()}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor),this.poweredBy.destroy(),this.evaluationBadge.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null,this.editor.keystrokes.stopListening(e);this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[]}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor),this.focusTracker.add(t);const i=()=>{this.editor.editing.view.getDomRoot(e)||this.editor.keystrokes.listenTo(t)};this.isReady?i():this.once("ready",i)}removeEditableElement(e){const t=this._editableElementsMap.get(e);t&&(this._editableElementsMap.delete(e),this.editor.keystrokes.stopListening(t),this.focusTracker.remove(t),t.ckeditorInstance=null)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(e,t={}){e.isRendered?(this.focusTracker.add(e),this.editor.keystrokes.listenTo(e.element)):e.once("render",()=>{this.focusTracker.add(e),this.editor.keystrokes.listenTo(e.element)}),this._focusableToolbarDefinitions.push({toolbarView:e,options:t})}extendMenuBar(e){this._extraMenuBarElements.push(e)}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}_initMenuBar(e){const t=e.element;this.focusTracker.add(t),this.editor.keystrokes.listenTo(t);const i=_s(this.editor.config.get("menuBar")||{});e.fillFromConfig(i,this.componentFactory,this._extraMenuBarElements),this.editor.keystrokes.set("Esc",(n,r)=>{t.contains(this.editor.ui.focusTracker.focusedElement)&&(this._lastFocusedForeignElement?(this._lastFocusedForeignElement.focus(),this._lastFocusedForeignElement=null):this.editor.editing.view.focus(),r())}),this.editor.keystrokes.set("Alt+F9",(n,r)=>{t.contains(this.editor.ui.focusTracker.focusedElement)||(this._saveLastFocusedForeignElement(),e.isFocusBorderEnabled=!0,e.focus(),r())})}_readViewportOffsetFromConfig(){const e=this.editor,t=e.config.get("ui.viewportOffset");if(t)return t;const i=e.config.get("toolbar.viewportTopOffset");return i?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:i}):{top:0}}_initFocusTracking(){const e=this.editor;let t;e.keystrokes.set("Alt+F10",(i,n)=>{this._saveLastFocusedForeignElement();const r=this._getCurrentFocusedToolbarDefinition();(!r||!t)&&(t=this._getFocusableCandidateToolbarDefinitions());for(let a=0;a<t.length;a++){const u=t.shift();if(t.push(u),u!==r&&this._focusFocusableCandidateToolbar(u)){r&&r.options.afterBlur&&r.options.afterBlur();break}}n()}),e.keystrokes.set("Esc",(i,n)=>{const r=this._getCurrentFocusedToolbarDefinition();r&&(this._lastFocusedForeignElement?(this._lastFocusedForeignElement.focus(),this._lastFocusedForeignElement=null):e.editing.view.focus(),r.options.afterBlur&&r.options.afterBlur(),n())})}_saveLastFocusedForeignElement(){const e=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(e)&&!Array.from(this.editor.editing.view.domRoots.values()).includes(e)&&(this._lastFocusedForeignElement=e)}_getFocusableCandidateToolbarDefinitions(){const e=[];for(const t of this._focusableToolbarDefinitions){const{toolbarView:i,options:n}=t;(L(i.element)||n.beforeFocus)&&e.push(t)}return e.sort((t,i)=>tt(t)-tt(i)),e}_getCurrentFocusedToolbarDefinition(){for(const e of this._focusableToolbarDefinitions)if(e.toolbarView.element&&e.toolbarView.element.contains(this.focusTracker.focusedElement))return e;return null}_focusFocusableCandidateToolbar(e){const{toolbarView:t,options:{beforeFocus:i}}=e;return i&&i(),L(t.element)?(t.focus(),!0):!1}_handleScrollToTheSelection(e,t){const i={top:0,bottom:0,left:0,right:0,...this.viewportOffset};t.viewportOffset.top+=i.top,t.viewportOffset.bottom+=i.bottom,t.viewportOffset.left+=i.left,t.viewportOffset.right+=i.right}_bindBodyCollectionWithFocusTracker(){const e=this.view.body;for(const t of e)this.focusTracker.add(t.element);e.on("add",(t,i)=>{this.focusTracker.add(i.element)}),e.on("remove",(t,i)=>{this.focusTracker.remove(i.element)})}}function tt(s){const{toolbarView:o,options:e}=s;let t=10;return L(o.element)&&t--,e.isContextual&&t--,t}class Os extends d{constructor(e){super(e);l(this,"body");l(this,"menuBarView");this.body=new ke(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}class lo extends Os{constructor(e){super(e);l(this,"top");l(this,"main");l(this,"_voiceLabelView");this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const e=this.t,t=new ce;return t.text=e("Rich Text Editor"),t.extendTemplate({attributes:{class:"ck-voice-label"}}),t}}class Is extends d{constructor(e,t,i){super(e);l(this,"name",null);l(this,"_editingView");l(this,"_editableElement");l(this,"_hasExternalElement");this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.set("isFocused",!1),this._editableElement=i,this._hasExternalElement=!!this._editableElement,this._editingView=t}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",()=>this._updateIsFocusedClasses()),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}get hasExternalElement(){return this._hasExternalElement}_updateIsFocusedClasses(){const e=this._editingView;e.isRenderingInProgress?i(this):t(this);function t(n){e.change(r=>{const a=e.document.getRoot(n.name);r.addClass(n.isFocused?"ck-focused":"ck-blurred",a),r.removeClass(n.isFocused?"ck-blurred":"ck-focused",a)})}function i(n){e.once("change:isRenderingInProgress",(r,a,u)=>{u?i(n):t(n)})}}}class ao extends Is{constructor(e,t,i,n={}){super(e,t,i);l(this,"_options");this._options=n,this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}})}render(){super.render();const e=this._editingView;e.change(t=>{const i=e.document.getRoot(this.name);t.setAttribute("aria-label",this.getEditableAriaLabel(),i)})}getEditableAriaLabel(){const e=this.locale.t,t=this._options.label,i=this._editableElement,n=this.name;if(typeof t=="string")return t;if(typeof t=="object")return t[n];if(typeof t=="function")return t(this);if(i){const r=i.getAttribute("aria-label");if(r)return r}return e("Rich Text Editor. Editing area: %0",n)}}class co extends zt{static get pluginName(){return"Notification"}static get isOfficialPlugin(){return!0}init(){this.on("show:warning",(o,e)=>{window.alert(e.message)},{priority:"lowest"})}showSuccess(o,e={}){this._showNotification({message:o,type:"success",namespace:e.namespace,title:e.title})}showInfo(o,e={}){this._showNotification({message:o,type:"info",namespace:e.namespace,title:e.title})}showWarning(o,e={}){this._showNotification({message:o,type:"warning",namespace:e.namespace,title:e.title})}_showNotification(o){const e=o.namespace?`show:${o.type}:${o.namespace}`:`show:${o.type}`;this.fire(e,{message:o.message,type:o.type,title:o.title||""})}}class ho extends ae(){constructor(o,e){super(),e&&$t(this,e),o&&this.set(o)}}const q=le("px");class uo extends Ee{constructor(e){super(e);l(this,"positionLimiter");l(this,"visibleStack");l(this,"_viewToStack",new Map);l(this,"_idToStack",new Map);l(this,"_view",null);l(this,"_rotatorView",null);l(this,"_fakePanelsView",null);this.positionLimiter=()=>{const t=this.editor.editing.view,n=t.document.selection.editableElement;return n?t.domConverter.mapViewToDom(n.root):null},this.decorate("getPositionOptions"),this.set("visibleView",null),this.set("_numberOfStacks",0),this.set("_singleViewMode",!1)}static get pluginName(){return"ContextualBalloon"}static get isOfficialPlugin(){return!0}destroy(){super.destroy(),this._view&&this._view.destroy(),this._rotatorView&&this._rotatorView.destroy(),this._fakePanelsView&&this._fakePanelsView.destroy()}get view(){return this._view||this._createPanelView(),this._view}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this._view||this._createPanelView(),this.hasView(e.view))throw new x("contextualballoon-add-view-exist",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t)){this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,(!this._visibleStack||e.singleViewMode)&&this.showStack(t);return}const i=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),i.set(e.view,e),this._viewToStack.set(e.view,i),i===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new x("contextualballoon-remove-view-not-exist",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(t.size===1?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),t.size===1?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this.getPositionOptions()),this._fakePanelsView.updatePosition()}getPositionOptions(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&(e.limiter||(e=Object.assign({},e,{limiter:this.positionLimiter})),e=Object.assign({},e,{viewportOffsetConfig:this.editor.ui.viewportOffset})),e}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new x("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}_createPanelView(){this._view=new z(this.editor.locale),this.editor.ui.view.body.add(this._view),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find(i=>i[1]===e)[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new Ps(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",(i,n)=>!n&&i>1),e.on("change:isNavigationVisible",()=>this.updatePosition(),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",(i,n)=>{if(n<2)return"";const r=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[r,n])}),e.buttonNextView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()}),e.buttonPrevView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()}),e}_createFakePanelsView(){const e=new Bs(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",(t,i)=>!i&&t>=2?Math.min(t-1,2):0),e.listenTo(this.view,"change:top",()=>e.updatePosition()),e.listenTo(this.view,"change:left",()=>e.updatePosition()),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:t="",withArrow:i=!0,singleViewMode:n=!1}){this.view.class=t,this.view.withArrow=i,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this.getPositionOptions()),this._fakePanelsView.updatePosition(),n&&(this._singleViewMode=!0)}}class Ps extends d{constructor(e){super(e);l(this,"focusTracker");l(this,"buttonPrevView");l(this,"buttonNextView");l(this,"content");const t=e.t,i=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new v,this.buttonPrevView=this._createButtonView(t("Previous"),m.previousArrow),this.buttonNextView=this._createButtonView(t("Next"),m.nextArrow),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",i.to("isNavigationVisible",n=>n?"":"ck-hidden")]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:i.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const i=new b(this.locale);return i.set({label:e,icon:t,tooltip:!0}),i}}class Bs extends d{constructor(e,t){super(e);l(this,"content");l(this,"_balloonPanelView");const i=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",i.to("numberOfPanels",n=>n?"":"ck-hidden")],style:{top:i.to("top",q),left:i.to("left",q),width:i.to("width",q),height:i.to("height",q)}},children:this.content}),this.on("change:numberOfPanels",(n,r,a,u)=>{a>u?this._addPanels(a-u):this._removePanels(u-a),this.updatePosition()})}_addPanels(e){for(;e--;){const t=new d;t.setTemplate({tag:"div"}),this.content.add(t),this.registerChild(t)}}_removePanels(e){for(;e--;){const t=this.content.last;this.content.remove(t),this.deregisterChild(t),t.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:i,height:n}=new V(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:i,height:n})}}}const W=le("px");class fo extends d{constructor(e){super(e);l(this,"content");l(this,"contentPanelElement");l(this,"_contentPanelPlaceholder");const t=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheBottomOfLimiter",!1),this.set("_stickyTopOffset",null),this.set("_stickyBottomOffset",null),this.content=this.createCollection(),this._contentPanelPlaceholder=new O({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:t.to("isSticky",i=>i?"block":"none"),height:t.to("isSticky",i=>i?W(this._contentPanelRect.height):null)}}}).render(),this.contentPanelElement=new O({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",t.if("isSticky","ck-sticky-panel__content_sticky"),t.if("_isStickyToTheBottomOfLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:t.to("isSticky",i=>i?W(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:t.to("_stickyTopOffset",i=>i&&W(i)),bottom:t.to("_stickyBottomOffset",i=>i&&W(i)),marginLeft:t.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this.contentPanelElement]})}render(){super.render(),this.checkIfShouldBeSticky(),this.listenTo(p.document,"scroll",()=>{this.checkIfShouldBeSticky()},{useCapture:!0}),this.listenTo(this,"change:isActive",()=>{this.checkIfShouldBeSticky()})}checkIfShouldBeSticky(){if(!this.limiterElement||!this.isActive){this._unstick();return}const e=new V(this.limiterElement);let t=e.getVisible();if(t){const i=new V(p.window);i.top+=this.viewportTopOffset,i.height-=this.viewportTopOffset,t=t.getIntersection(i)}if(t&&e.top<t.top){const i=t.top;if(i+this._contentPanelRect.height+this.limiterBottomOffset>t.bottom){const n=Math.max(e.bottom-t.bottom,0)+this.limiterBottomOffset;e.bottom-n>e.top+this._contentPanelRect.height?this._stickToBottomOfLimiter(n):this._unstick()}else this._contentPanelRect.height+this.limiterBottomOffset<e.height?this._stickToTopOfAncestors(i):this._unstick()}else this._unstick()}_stickToTopOfAncestors(e){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=e,this._stickyBottomOffset=null,this._marginLeft=W(-p.window.scrollX)}_stickToBottomOfLimiter(e){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!0,this._stickyTopOffset=null,this._stickyBottomOffset=e,this._marginLeft=W(-p.window.scrollX)}_unstick(){this.isSticky=!1,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=null,this._stickyBottomOffset=null,this._marginLeft=null}get _contentPanelRect(){return new V(this.contentPanelElement)}}class Ls extends H{constructor(e){super(e);l(this,"arrowView");const t=this.bindTemplate;this.set({withText:!0,role:"menuitem"}),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__button"],"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",i=>String(i)),"data-cke-tooltip-disabled":t.to("isOn")},on:{mouseenter:t.to("mouseenter")}})}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new F;return e.content=he,e.extendTemplate({attributes:{class:"ck-menu-bar__menu__button__arrow"}}),e}}class Fs extends d{constructor(e){super(e);l(this,"children");const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-menu-bar__menu__panel",t.to("position",i=>`ck-menu-bar__menu__panel_position_${i}`),t.if("isVisible","ck-hidden",i=>!i)],tabindex:"-1"},children:this.children,on:{selectstart:t.to(i=>{i.target.tagName.toLocaleLowerCase()!=="input"&&i.preventDefault()})}})}focus(e=1){this.children.length&&(e===1?this.children.first.focus():this.children.last.focus())}}const re=class re extends d{constructor(e){super(e);l(this,"buttonView");l(this,"panelView");l(this,"focusTracker");l(this,"keystrokes");const t=this.bindTemplate;this.buttonView=new Ls(e),this.buttonView.delegate("mouseenter").to(this),this.buttonView.bind("isOn","isEnabled").to(this,"isOpen","isEnabled"),this.panelView=new Fs(e),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new P,this.focusTracker=new v,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("panelPosition","w"),this.set("class",void 0),this.set("parentMenuView",null),this.setTemplate({tag:"div",attributes:{class:["ck","ck-menu-bar__menu",t.to("class"),t.if("isEnabled","ck-disabled",i=>!i),t.if("parentMenuView","ck-menu-bar__menu_top-level",i=>!i)]},children:[this.buttonView,this.panelView]})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.keystrokes.listenTo(this.element),B.closeOnEscKey(this),this._repositionPanelOnOpen()}_attachBehaviors(){this.parentMenuView?(B.openOnButtonClick(this),B.openOnArrowRightKey(this),B.closeOnArrowLeftKey(this),B.openAndFocusOnEnterKeyPress(this),B.closeOnParentClose(this)):(this._propagateArrowKeystrokeEvents(),B.openAndFocusPanelOnArrowDownKey(this),B.toggleOnButtonClick(this))}_propagateArrowKeystrokeEvents(){this.keystrokes.set("arrowright",(e,t)=>{this.fire("arrowright"),t()}),this.keystrokes.set("arrowleft",(e,t)=>{this.fire("arrowleft"),t()})}_repositionPanelOnOpen(){this.on("change:isOpen",(e,t,i)=>{if(!i)return;const n=re._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=n?n.name:this._defaultMenuPositionName})}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:e,southWest:t,northEast:i,northWest:n,westSouth:r,eastSouth:a,westNorth:u,eastNorth:c}=bs;return this.locale.uiLanguageDirection==="ltr"?this.parentMenuView?[a,c,r,u]:[e,t,i,n]:this.parentMenuView?[r,u,a,c]:[t,e,n,i]}get _defaultMenuPositionName(){return this.locale.uiLanguageDirection==="ltr"?this.parentMenuView?"es":"se":this.parentMenuView?"ws":"sw"}};l(re,"_getOptimalPosition",Ve);let K=re;class it extends Fe{constructor(o){super(o),this.role="menu",this.items.on("change",this._setItemsCheckSpace.bind(this))}_setItemsCheckSpace(){const o=Array.from(this.items).some(e=>{const t=st(e);return t&&t.isToggleable});this.items.forEach(e=>{const t=st(e);t&&(t.hasCheckSpace=o)})}}function st(s){return s instanceof A?s.children.map(o=>As(o)?o.buttonView:o).find(o=>o instanceof H):null}function As(s){return typeof s=="object"&&"buttonView"in s&&s.buttonView instanceof b}class Ds extends mi{constructor(o){super(o),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}const ot=["mouseenter","arrowleft","arrowright","change:isOpen"];class po extends d{constructor(e){super(e);l(this,"children");l(this,"menus",[]);const t=e.t,i=this.bindTemplate;this.set({isOpen:!1,isFocusBorderEnabled:!1}),this._setupIsOpenUpdater(),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-menu-bar",i.if("isFocusBorderEnabled","ck-menu-bar_focus-border-enabled")],"aria-label":t("Editor menu bar"),role:"menubar"},children:this.children})}fillFromConfig(e,t,i=[]){const n=this.locale,a=ks({normalizedConfig:e,locale:n,componentFactory:t,extraItems:i}).items.map(u=>this._createMenu({componentFactory:t,menuDefinition:u}));this.children.addMany(a)}render(){super.render(),N.toggleMenusAndFocusItemsOnHover(this),N.closeMenusWhenTheBarCloses(this),N.closeMenuWhenAnotherOnTheSameLevelOpens(this),N.focusCycleMenusOnArrows(this),N.closeOnClickOutside(this),N.enableFocusHighlightOnInteraction(this)}focus(){this.children.first&&this.children.first.focus()}close(){for(const e of this.children)e.isOpen=!1}registerMenu(e,t=null){t?(e.delegate(...ot).to(t),e.parentMenuView=t):e.delegate(...ot).to(this,i=>"menu:"+i),e._attachBehaviors(),this.menus.push(e)}_createMenu({componentFactory:e,menuDefinition:t,parentMenuView:i}){const n=this.locale,r=new K(n);return this.registerMenu(r,i),r.buttonView.set({label:t.label}),r.once("change:isOpen",()=>{const a=new it(n);a.ariaLabel=t.label,r.panelView.children.add(a),a.items.addMany(this._createMenuItems({menuDefinition:t,parentMenuView:r,componentFactory:e}))}),r}_createMenuItems({menuDefinition:e,parentMenuView:t,componentFactory:i}){const n=this.locale,r=[];for(const a of e.groups){for(const u of a.items){const c=new Lt(n,t);if(ie(u))c.children.add(this._createMenu({componentFactory:i,menuDefinition:u,parentMenuView:t}));else{const h=this._createMenuItemContentFromFactory({componentName:u,componentFactory:i,parentMenuView:t});if(!h)continue;c.children.add(h)}r.push(c)}a!==e.groups[e.groups.length-1]&&r.push(new Le(n))}return r}_createMenuItemContentFromFactory({componentName:e,parentMenuView:t,componentFactory:i}){const n=i.create(e);return n instanceof K||n instanceof bt||n instanceof Ds?(this._registerMenuTree(n,t),n.on("execute",()=>{this.close()}),n):(E("menu-bar-component-unsupported",{componentName:e,componentView:n}),null)}_registerMenuTree(e,t){if(!(e instanceof K)){e.delegate("mouseenter").to(t);return}this.registerMenu(e,t);const i=e.panelView.children.filter(r=>r instanceof it)[0];if(!i){e.delegate("mouseenter").to(t);return}const n=i.items.filter(r=>r instanceof A);for(const r of n)this._registerMenuTree(r.children.get(0),e)}_setupIsOpenUpdater(){let e;this.on("menu:change:isOpen",(t,i,n)=>{clearTimeout(e),n?this.isOpen=!0:e=setTimeout(()=>{this.isOpen=Array.from(this.children).some(r=>r.isOpen)},0)})}}export{Ys as AccessibilityHelp,z as BalloonPanelView,ke as BodyCollection,lo as BoxedEditorUIView,wt as ButtonLabelView,b as ButtonView,Js as CollapsibleView,Ke as ColorGridView,Xi as ColorPickerView,no as ColorSelectorView,kt as ColorTileView,is as ComponentFactory,uo as ContextualBalloon,Xs as CssTransitionDisablerMixin,gs as DefaultMenuBarItems,_e as Dialog,ge as DialogView,y as DialogViewPosition,Ji as DocumentColorCollection,Ii as DropdownButtonView,Oi as DropdownPanelView,Te as DropdownView,ro as EditorUI,Os as EditorUIView,Qs as FileDialogButtonView,mi as FileDialogListItemButtonView,U as FocusCycler,ri as FormHeaderView,F as IconView,ao as InlineEditableUIView,Ei as InputNumberView,xi as InputTextView,yt as InputView,ce as LabelView,yi as LabeledFieldView,H as ListItemButtonView,Q as ListItemGroupView,A as ListItemView,Le as ListSeparatorView,Fe as ListView,bt as MenuBarMenuListItemButtonView,Ds as MenuBarMenuListItemFileDialogButtonView,Lt as MenuBarMenuListItemView,it as MenuBarMenuListView,K as MenuBarMenuView,po as MenuBarView,co as Notification,Wi as SplitButtonView,fo as StickyPanelView,gt as SwitchButtonView,O as Template,Bi as ToolbarLineBreakView,Ct as ToolbarSeparatorView,Di as ToolbarView,ve as TooltipManager,d as View,D as ViewCollection,ho as ViewModel,ni as addKeyboardHandlingForGrid,io as addListToDropdown,Vt as addToolbarToDropdown,mt as clickOutsideHandler,Ae as createDropdown,oo as createLabeledDropdown,so as createLabeledInputNumber,Zi as createLabeledInputText,xt as focusChildOnDropdownOpen,eo as getLocalizedColorOptions,j as isFocusable,li as isViewWithFocusCycler,to as normalizeColorOptions,_s as normalizeMenuBarConfig,bi as normalizeSingleColorDefinition,Fi as normalizeToolbarConfig,qs as submitHandler};
@@ -1,4 +0,0 @@
1
- var $=Object.defineProperty;var U=(n,s,e)=>s in n?$(n,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[s]=e;var p=(n,s,e)=>U(n,typeof s!="symbol"?s+"":s,e);import{Plugin as P}from"../../../../../@ckeditor_ckeditor5-core@44.3.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{MouseObserver as D,TreeWalker as q}from"../../../../../@ckeditor_ckeditor5-engine@44.3.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{Delete as I}from"../../../../../@ckeditor_ckeditor5-typing@44.3.0/node_modules/@ckeditor/ckeditor5-typing/dist/index.js";import{keyCodes as T,env as M,getLocalizedArrowKeyCodeDirection as G,logWarning as Y,CKEditorError as O,isForwardArrowKeyCode as X,getRangeFromMouseEvent as J,global as A,DomEmitterMixin as Q,toArray as F,Rect as y,ObservableMixin as N,compareArrays as Z,EmitterMixin as ee}from"../../../../../@ckeditor_ckeditor5-utils@44.3.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{ContextualBalloon as te,ToolbarView as ie,BalloonPanelView as oe,IconView as ne,Template as k,View as se}from"../../../../../@ckeditor_ckeditor5-ui@44.3.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{Enter as re}from"../../../../../@ckeditor_ckeditor5-enter@44.3.0/node_modules/@ckeditor/ckeditor5-enter/dist/index.js";import le from"../../../../../lodash-es@4.17.21/node_modules/lodash-es/throttle.js";/**
2
- * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */class ce extends ee(){constructor(){super(...arguments);p(this,"_stack",[])}add(e,t){const i=this._stack,o=i[0];this._insertDescriptor(e);const r=i[0];o!==r&&!C(o,r)&&this.fire("change:top",{oldDescriptor:o,newDescriptor:r,writer:t})}remove(e,t){const i=this._stack,o=i[0];this._removeDescriptor(e);const r=i[0];o!==r&&!C(o,r)&&this.fire("change:top",{oldDescriptor:o,newDescriptor:r,writer:t})}_insertDescriptor(e){const t=this._stack,i=t.findIndex(r=>r.id===e.id);if(C(e,t[i]))return;i>-1&&t.splice(i,1);let o=0;for(;t[o]&&ae(t[o],e);)o++;t.splice(o,0,e)}_removeDescriptor(e){const t=this._stack,i=t.findIndex(o=>o.id===e);i>-1&&t.splice(i,1)}}function C(n,s){return n&&s&&n.priority==s.priority&&S(n.classes)==S(s.classes)}function ae(n,s){return n.priority>s.priority?!0:n.priority<s.priority?!1:S(n.classes)>S(s.classes)}function S(n){return Array.isArray(n)?n.sort().join(","):n}var de='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0H4zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3V0zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3v1zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5H12z"/><path fill-opacity=".256" d="M1 1h14v14H1z"/><g class="ck-icon__selected-indicator"><path d="M7 0h2v1H7V0zM0 7h1v2H0V7zm15 0h1v2h-1V7zm-8 8h2v1H7v-1z"/><path fill-opacity=".254" d="M1 1h14v14H1z"/></g></svg>';const he="ck-widget",R="ck-widget_selected";function m(n){return n.is("element")?!!n.getCustomProperty("widget"):!1}function ot(n,s,e={}){if(!n.is("containerElement"))throw new O("widget-to-widget-wrong-element-type",null,{element:n});return s.setAttribute("contenteditable","false",n),s.addClass(he,n),s.setCustomProperty("widget",!0,n),n.getFillerOffset=me,s.setCustomProperty("widgetLabel",[],n),e.label&&pe(n,e.label),e.hasSelectionHandle&&we(n,s),L(n,s),n}function ue(n,s,e){if(s.classes&&e.addClass(F(s.classes),n),s.attributes)for(const t in s.attributes)e.setAttribute(t,s.attributes[t],n)}function ge(n,s,e){if(s.classes&&e.removeClass(F(s.classes),n),s.attributes)for(const t in s.attributes)e.removeAttribute(t,n)}function L(n,s,e=ue,t=ge){const i=new ce;i.on("change:top",(l,c)=>{c.oldDescriptor&&t(n,c.oldDescriptor,c.writer),c.newDescriptor&&e(n,c.newDescriptor,c.writer)});const o=(l,c,a)=>i.add(c,a),r=(l,c,a)=>i.remove(c,a);s.setCustomProperty("addHighlight",o,n),s.setCustomProperty("removeHighlight",r,n)}function pe(n,s){n.getCustomProperty("widgetLabel").push(s)}function fe(n){return n.getCustomProperty("widgetLabel").reduce((e,t)=>typeof t=="function"?e?e+". "+t():t():e?e+". "+t:t,"")}function nt(n,s,e={}){return s.addClass(["ck-editor__editable","ck-editor__nested-editable"],n),s.setAttribute("role","textbox",n),s.setAttribute("tabindex","-1",n),e.label&&s.setAttribute("aria-label",e.label,n),s.setAttribute("contenteditable",n.isReadOnly?"false":"true",n),n.on("change:isReadOnly",(t,i,o)=>{s.setAttribute("contenteditable",o?"false":"true",n)}),n.on("change:isFocused",(t,i,o)=>{o?s.addClass("ck-editor__nested-editable_focused",n):s.removeClass("ck-editor__nested-editable_focused",n)}),L(n,s),n}function st(n,s){const e=n.getSelectedElement();if(e){const t=b(n);if(t)return s.createRange(s.createPositionAt(e,t))}return s.schema.findOptimalInsertionRange(n)}function me(){return null}function we(n,s){const e=s.createUIElement("div",{class:"ck ck-widget__selection-handle"},function(t){const i=this.toDomElement(t),o=new ne;return o.set("content",de),o.render(),i.appendChild(o.element),i});s.insert(s.createPositionAt(n,0),e),s.addClass(["ck-widget_with-selection-handle"],n)}function _e(n){const s=l=>{const{width:c,paddingLeft:a,paddingRight:d}=l.ownerDocument.defaultView.getComputedStyle(l);return parseFloat(c)-(parseFloat(a)||0)-(parseFloat(d)||0)},e=n.parentElement;if(!e)return 0;let t=s(e);const i=5;let o=0,r=e;for(;isNaN(t);){if(r=r.parentElement,++o>i)return 0;t=s(r)}return t}function be(n,s=new y(n)){const e=_e(n);return e?s.width/e*100:0}const _="widget-type-around";function v(n,s,e){return!!n&&m(n)&&!e.isInline(s)}function ve(n){return n.closest(".ck-widget__type-around__button")}function ye(n){return n.classList.contains("ck-widget__type-around__button_before")?"before":"after"}function Ee(n,s){const e=n.closest(".ck-widget");return s.mapDomToView(e)}function b(n){return n.getAttribute(_)}var Se='<svg viewBox="0 0 10 8" xmlns="http://www.w3.org/2000/svg"><path d="M9.055.263v3.972h-6.77M1 4.216l2-2.038m-2 2 2 2.038"/></svg>';const B=["before","after"],Pe=new DOMParser().parseFromString(Se,"image/svg+xml").firstChild,W="ck-widget__type-around_disabled";class Ce extends P{constructor(){super(...arguments);p(this,"_currentFakeCaretModelElement",null)}static get pluginName(){return"WidgetTypeAround"}static get isOfficialPlugin(){return!0}static get requires(){return[re,I]}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",(i,o,r)=>{t.change(l=>{for(const c of t.document.roots)r?l.removeClass(W,c):l.addClass(W,c)}),r||e.model.change(l=>{l.removeSelectionAttribute(_)})}),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){super.destroy(),this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const i=this.editor,o=i.editing.view,r=i.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);i.execute("insertParagraph",{position:i.model.createPositionAt(e,t),attributes:r}),o.focus(),o.scrollToTheSelection()}_listenToIfEnabled(e,t,i,o){this.listenTo(e,t,(...r)=>{this.isEnabled&&i(...r)},o)}_insertParagraphAccordingToFakeCaretPosition(){const i=this.editor.model.document.selection,o=b(i);if(!o)return!1;const r=i.getSelectedElement();return this._insertParagraph(r,o),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,i=e.locale.t,o={before:i("Insert paragraph before block"),after:i("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",(r,l,c)=>{const a=c.mapper.toViewElement(l.item);a&&v(a,l.item,t)&&(Te(c.writer,o,a),a.getCustomProperty("widgetLabel").push(()=>this.isEnabled?i("Press Enter to type after or press Shift + Enter to type before the widget"):""))},{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,i=t.document.selection,o=t.schema,r=e.editing.view;this._listenToIfEnabled(r.document,"arrowKey",(c,a)=>{this._handleArrowKeyPress(c,a)},{context:[m,"$text"],priority:"high"}),this._listenToIfEnabled(i,"change:range",(c,a)=>{a.directChange&&e.model.change(d=>{d.removeSelectionAttribute(_)})}),this._listenToIfEnabled(t.document,"change:data",()=>{const c=i.getSelectedElement();if(c){const a=e.editing.mapper.toViewElement(c);if(v(a,c,o))return}e.model.change(a=>{a.removeSelectionAttribute(_)})}),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",(c,a,d)=>{const u=d.writer;if(this._currentFakeCaretModelElement){const w=d.mapper.toViewElement(this._currentFakeCaretModelElement);w&&(u.removeClass(B.map(l),w),this._currentFakeCaretModelElement=null)}const h=a.selection.getSelectedElement();if(!h)return;const f=d.mapper.toViewElement(h);if(!v(f,h,o))return;const g=b(a.selection);g&&(u.addClass(l(g),f),this._currentFakeCaretModelElement=h)}),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",(c,a,d)=>{d||e.model.change(u=>{u.removeSelectionAttribute(_)})});function l(c){return`ck-widget_type-around_show-fake-caret_${c}`}}_handleArrowKeyPress(e,t){const i=this.editor,o=i.model,r=o.document.selection,l=o.schema,c=i.editing.view,a=t.keyCode,d=X(a,i.locale.contentLanguageDirection),u=c.document.selection.getSelectedElement(),h=i.editing.mapper.toModelElement(u);let f;v(u,h,l)?f=this._handleArrowKeyPressOnSelectedWidget(d):r.isCollapsed?f=this._handleArrowKeyPressWhenSelectionNextToAWidget(d):t.shiftKey||(f=this._handleArrowKeyPressWhenNonCollapsedSelection(d)),f&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const i=this.editor.model,o=i.document.selection,r=b(o);return i.change(l=>{if(r){if(!(r===(e?"after":"before")))return l.removeSelectionAttribute(_),!0}else return l.setSelectionAttribute(_,e?"after":"before"),!0;return!1})}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,i=t.model,o=i.schema,r=t.plugins.get("Widget"),l=r._getObjectElementNextToSelection(e),c=t.editing.mapper.toViewElement(l);return v(c,l,o)?(i.change(a=>{r._setSelectionOverElement(l),a.setSelectionAttribute(_,e?"before":"after")}),!0):!1}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,i=t.model,o=i.schema,r=t.editing.mapper,l=i.document.selection,c=e?l.getLastPosition().nodeBefore:l.getFirstPosition().nodeAfter,a=r.toViewElement(c);return v(a,c,o)?(i.change(d=>{d.setSelection(c,"on"),d.setSelectionAttribute(_,e?"after":"before")}),!0):!1}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",(i,o)=>{const r=ve(o.domTarget);if(!r)return;const l=ye(r),c=Ee(r,t.domConverter),a=e.editing.mapper.toModelElement(c);this._insertParagraph(a,l),o.preventDefault(),i.stop()})}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,i=e.editing.view;this._listenToIfEnabled(i.document,"enter",(o,r)=>{if(o.eventPhase!="atTarget")return;const l=t.getSelectedElement(),c=e.editing.mapper.toViewElement(l),a=e.model.schema;let d;this._insertParagraphAccordingToFakeCaretPosition()?d=!0:v(c,l,a)&&(this._insertParagraph(l,r.isSoft?"before":"after"),d=!0),d&&(r.preventDefault(),o.stop())},{context:m})}_enableInsertingParagraphsOnTypingKeystroke(){const t=this.editor.editing.view.document;this._listenToIfEnabled(t,"insertText",(i,o)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(o.selection=t.selection)},{priority:"high"}),M.isAndroid?this._listenToIfEnabled(t,"keydown",(i,o)=>{o.keyCode==229&&this._insertParagraphAccordingToFakeCaretPosition()}):this._listenToIfEnabled(t,"compositionstart",()=>{this._insertParagraphAccordingToFakeCaretPosition()},{priority:"high"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,i=e.model,o=i.schema;this._listenToIfEnabled(t.document,"delete",(r,l)=>{if(r.eventPhase!="atTarget")return;const c=b(i.document.selection);if(!c)return;const a=l.direction,d=i.document.selection.getSelectedElement(),u=c==="before",h=a=="forward";if(u===h)e.execute("delete",{selection:i.createSelection(d,"on")});else{const g=o.getNearestSelectionRange(i.createPositionAt(d,c),a);if(g)if(!g.isCollapsed)i.change(w=>{w.setSelection(g),e.execute(h?"deleteForward":"delete")});else{const w=i.createSelection(g.start);if(i.modifySelection(w,{direction:a}),!w.focus.isEqual(g.start))i.change(E=>{E.setSelection(g),e.execute(h?"deleteForward":"delete")});else{const E=Re(o,g.start.parent);i.deleteContent(i.createSelection(E,"on"),{doNotAutoparagraph:!0})}}}l.preventDefault(),r.stop()},{context:m})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,i=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",(o,[r,l])=>{if(l&&!l.is("documentSelection"))return;const c=b(i);if(c)return o.stop(),t.change(a=>{const d=i.getSelectedElement(),u=t.createPositionAt(d,c),h=a.createSelection(u),f=t.insertContent(r,h);return a.setSelection(h),f})},{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,i=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",(o,r)=>{const[,l,c={}]=r;if(l&&!l.is("documentSelection"))return;const a=b(i);a&&(c.findOptimalPosition=a,r[3]=c)},{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,i=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",(o,[r])=>{if(r&&!r.is("documentSelection"))return;b(i)&&o.stop()},{priority:"high"})}}function Te(n,s,e){const t=n.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},function(i){const o=this.toDomElement(i);return ke(o,s),Ae(o),o});n.insert(n.createPositionAt(e,"end"),t)}function ke(n,s){for(const e of B){const t=new k({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${e}`],title:s[e],"aria-hidden":"true"},children:[n.ownerDocument.importNode(Pe,!0)]});n.appendChild(t.render())}}function Ae(n){const s=new k({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});n.appendChild(s.render())}function Re(n,s){let e=s;for(const t of s.getAncestors({parentFirst:!0})){if(t.childCount>1||n.isLimit(t))break;e=t}return e}function We(n){const s=n.model;return(e,t)=>{const i=t.keyCode==T.arrowup,o=t.keyCode==T.arrowdown,r=t.shiftKey,l=s.document.selection;if(!i&&!o)return;const c=o;if(r&&Ve(l,c))return;const a=ze(n,l,c);if(a){if(a.isCollapsed){if(l.isCollapsed)return;if(r)return}(a.isCollapsed||He(n,a,c))&&(s.change(d=>{const u=c?a.end:a.start;if(r){const h=s.createSelection(l.anchor);h.setFocus(u),d.setSelection(h)}else d.setSelection(u)}),e.stop(),t.preventDefault(),t.stopPropagation())}}}function ze(n,s,e){const t=n.model;if(e){const i=s.isCollapsed?s.focus:s.getLastPosition(),o=z(t,i,"forward");if(!o)return null;const r=t.createRange(i,o),l=H(t.schema,r,"backward");return l?t.createRange(i,l):null}else{const i=s.isCollapsed?s.focus:s.getFirstPosition(),o=z(t,i,"backward");if(!o)return null;const r=t.createRange(o,i),l=H(t.schema,r,"forward");return l?t.createRange(l,i):null}}function z(n,s,e){const t=n.schema,i=n.createRangeIn(s.root),o=e=="forward"?"elementStart":"elementEnd";for(const{previousPosition:r,item:l,type:c}of i.getWalker({startPosition:s,direction:e})){if(t.isLimit(l)&&!t.isInline(l))return r;if(c==o&&t.isBlock(l))return null}return null}function H(n,s,e){const t=e=="backward"?s.end:s.start;if(n.checkChild(t,"$text"))return t;for(const{nextPosition:i}of s.getWalker({direction:e}))if(n.checkChild(i,"$text"))return i;return null}function He(n,s,e){const t=n.model,i=n.view.domConverter;if(e){const a=t.createSelection(s.start);t.modifySelection(a),!a.focus.isAtEnd&&!s.start.isEqual(a.focus)&&(s=t.createRange(a.focus,s.end))}const o=n.mapper.toViewRange(s),r=i.viewRangeToDom(o),l=y.getDomRangeRects(r);let c;for(const a of l){if(c===void 0){c=Math.round(a.bottom);continue}if(Math.round(a.top)>=c)return!1;c=Math.max(c,Math.round(a.bottom))}return!0}function Ve(n,s){return!n.isCollapsed&&n.isBackward==s}class rt extends P{constructor(){super(...arguments);p(this,"_previouslySelected",new Set)}static get pluginName(){return"Widget"}static get isOfficialPlugin(){return!0}static get requires(){return[Ce,I]}init(){const e=this.editor,t=e.editing.view,i=t.document,o=e.t;this.editor.editing.downcastDispatcher.on("selection",(r,l,c)=>{const a=c.writer,d=l.selection;if(d.isCollapsed)return;const u=d.getSelectedElement();if(!u)return;const h=e.editing.mapper.toViewElement(u);m(h)&&c.consumable.consume(d,"selection")&&a.setSelection(a.createRangeOn(h),{fake:!0,label:fe(h)})}),this.editor.editing.downcastDispatcher.on("selection",(r,l,c)=>{this._clearPreviouslySelectedWidgets(c.writer);const a=c.writer,d=a.document.selection;let u=null;for(const h of d.getRanges())for(const f of h){const g=f.item;m(g)&&!Ie(g,u)&&(a.addClass(R,g),this._previouslySelected.add(g),u=g)}},{priority:"low"}),t.addObserver(D),this.listenTo(i,"mousedown",(...r)=>this._onMousedown(...r)),this.listenTo(i,"arrowKey",(...r)=>{this._handleSelectionChangeOnArrowKeyPress(...r)},{context:[m,"$text"]}),this.listenTo(i,"arrowKey",(...r)=>{this._preventDefaultOnArrowKeyPress(...r)},{context:"$root"}),this.listenTo(i,"arrowKey",We(this.editor.editing),{context:"$text"}),this.listenTo(i,"delete",(r,l)=>{this._handleDelete(l.direction=="forward")&&(l.preventDefault(),r.stop())},{context:"$root"}),this.listenTo(i,"tab",(r,l)=>{r.eventPhase=="atTarget"&&(l.shiftKey||this._selectFirstNestedEditable()&&(l.preventDefault(),r.stop()))},{context:m,priority:"low"}),this.listenTo(i,"tab",(r,l)=>{l.shiftKey&&this._selectAncestorWidget()&&(l.preventDefault(),r.stop())},{priority:"low"}),this.listenTo(i,"keydown",(r,l)=>{l.keystroke==T.esc&&this._selectAncestorWidget()&&(l.preventDefault(),r.stop())},{priority:"low"}),e.accessibility.addKeystrokeInfoGroup({id:"widget",label:o("Keystrokes that can be used when a widget is selected (for example: image, table, etc.)"),keystrokes:[{label:o("Move focus from an editable area back to the parent widget"),keystroke:"Esc"},{label:o("Insert a new paragraph directly after a widget"),keystroke:"Enter"},{label:o("Insert a new paragraph directly before a widget"),keystroke:"Shift+Enter"},{label:o("Move the caret to allow typing directly before a widget"),keystroke:[["arrowup"],["arrowleft"]]},{label:o("Move the caret to allow typing directly after a widget"),keystroke:[["arrowdown"],["arrowright"]]}]})}_onMousedown(e,t){const i=this.editor,o=i.editing.view,r=o.document;let l=t.target;if(!l)return;if(t.domEvent.detail>=3){this._selectBlockContent(l)&&t.preventDefault();return}if(!m(l)){const a=xe(l);if(!a)return;if(m(a))l=a;else{const d=De(o,t);if(d&&m(d))l=d;else return}}M.isAndroid&&t.preventDefault(),r.isFocused||o.focus();const c=i.editing.mapper.toModelElement(l);this._setSelectionOverElement(c)}_selectBlockContent(e){const t=this.editor,i=t.model,o=t.editing.mapper,r=i.schema,l=o.findMappedViewAncestor(this.editor.editing.view.createPositionAt(e,0)),c=Me(o.toModelElement(l),i.schema);return c?(i.change(a=>{const d=r.isLimit(c)?null:Oe(a.createPositionAfter(c),r),u=a.createPositionAt(c,0),h=d?a.createPositionAt(d,0):a.createPositionAt(c,"end");a.setSelection(a.createRange(u,h))}),!0):!1}_handleSelectionChangeOnArrowKeyPress(e,t){const i=t.keyCode,o=this.editor.model,r=o.schema,l=o.document.selection,c=l.getSelectedElement(),a=G(i,this.editor.locale.contentLanguageDirection),d=a=="down"||a=="right",u=a=="up"||a=="down";if(c&&r.isObject(c)){const f=d?l.getLastPosition():l.getFirstPosition(),g=r.getNearestSelectionRange(f,d?"forward":"backward");g&&(o.change(w=>{w.setSelection(g)}),t.preventDefault(),e.stop());return}if(!l.isCollapsed&&!t.shiftKey){const f=l.getFirstPosition(),g=l.getLastPosition(),w=f.nodeAfter,E=g.nodeBefore;(w&&r.isObject(w)||E&&r.isObject(E))&&(o.change(j=>{j.setSelection(d?g:f)}),t.preventDefault(),e.stop());return}if(!l.isCollapsed)return;const h=this._getObjectElementNextToSelection(d);if(h&&r.isObject(h)){if(r.isInline(h)&&u)return;this._setSelectionOverElement(h),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const i=this.editor.model,o=i.schema,r=i.document.selection.getSelectedElement();r&&o.isObject(r)&&(t.preventDefault(),e.stop())}_handleDelete(e){const i=this.editor.model.document.selection;if(!this.editor.model.canEditAt(i)||!i.isCollapsed)return;const o=this._getObjectElementNextToSelection(e);if(o)return this.editor.model.change(r=>{let l=i.anchor.parent;for(;l.isEmpty;){const c=l;l=c.parent,r.remove(c)}this._setSelectionOverElement(o)}),!0}_setSelectionOverElement(e){this.editor.model.change(t=>{t.setSelection(t.createRangeOn(e))})}_getObjectElementNextToSelection(e){const t=this.editor.model,i=t.schema,o=t.document.selection,r=t.createSelection(o);if(t.modifySelection(r,{direction:e?"forward":"backward"}),r.isEqual(o))return null;const l=e?r.focus.nodeBefore:r.focus.nodeAfter;return l&&i.isObject(l)?l:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(R,t);this._previouslySelected.clear()}_selectFirstNestedEditable(){const e=this.editor,i=this.editor.editing.view.document;for(const o of i.selection.getFirstRange().getItems())if(o.is("editableElement")){const r=e.editing.mapper.toModelElement(o);/* istanbul ignore next -- @preserve */if(!r)continue;const l=e.model.createPositionAt(r,0),c=e.model.schema.getNearestSelectionRange(l,"forward");return e.model.change(a=>{a.setSelection(c)}),!0}return!1}_selectAncestorWidget(){const e=this.editor,t=e.editing.mapper,o=e.editing.view.document.selection.getFirstPosition().parent,l=(o.is("$text")?o.parent:o).findAncestor(m);if(!l)return!1;const c=t.toModelElement(l);/* istanbul ignore next -- @preserve */return c?(e.model.change(a=>{a.setSelection(c,"on")}),!0):!1}}function xe(n){let s=n;for(;s;){if(s.is("editableElement")||m(s))return s;s=s.parent}return null}function De(n,s){const e=J(s.domEvent);let t=null;if(e?t=n.domConverter.domRangeToView(e):t=n.createRange(n.createPositionAt(s.target,0)),!t)return null;const i=t.start;if(!i.parent)return null;let o=i.parent;return i.parent.is("editableElement")&&(i.isAtEnd&&i.nodeBefore?o=i.nodeBefore:i.isAtStart&&i.nodeAfter&&(o=i.nodeAfter)),o.is("$text")?o.parent:o}function Ie(n,s){return s?Array.from(n.getAncestors()).includes(s):!1}function Me(n,s){for(const e of n.getAncestors({includeSelf:!0,parentFirst:!0})){if(s.checkChild(e,"$text"))return e;if(s.isLimit(e)&&!s.isObject(e))break}return null}function Oe(n,s){const e=new q({startPosition:n});for(const{item:t}of e){if(s.isLimit(t)||!t.is("element"))return null;if(s.checkChild(t,"$text"))return t}return null}class lt extends P{constructor(){super(...arguments);p(this,"_toolbarDefinitions",new Map);p(this,"_balloon")}static get requires(){return[te]}static get pluginName(){return"WidgetToolbarRepository"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",i=>{Fe(e.editing.view.document.selection)&&i.stop()},{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui,"update",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui.focusTracker,"change:isFocused",()=>{this._updateToolbarsVisibility()},{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:i,getRelatedElement:o,balloonClassName:r="ck-toolbar-container"}){if(!i.length){Y("widget-toolbar-no-items",{toolbarId:e});return}const l=this.editor,c=l.t,a=new ie(l.locale);if(a.ariaLabel=t||c("Widget toolbar"),this._toolbarDefinitions.has(e))throw new O("widget-toolbar-duplicated",this,{toolbarId:e});const d={view:a,getRelatedElement:o,balloonClassName:r,itemsConfig:i,initialized:!1};l.ui.addToolbar(a,{isContextual:!0,beforeFocus:()=>{const u=o(l.editing.view.document.selection);u&&this._showToolbar(d,u)},afterBlur:()=>{this._hideToolbar(d)}}),this._toolbarDefinitions.set(e,d)}_updateToolbarsVisibility(){let e=0,t=null,i=null;for(const o of this._toolbarDefinitions.values()){const r=o.getRelatedElement(this.editor.editing.view.document.selection);if(!this.isEnabled||!r)this._isToolbarInBalloon(o)&&this._hideToolbar(o);else if(!this.editor.ui.focusTracker.isFocused)this._isToolbarVisible(o)&&this._hideToolbar(o);else{const l=r.getAncestors().length;l>e&&(e=l,t=r,i=o)}}i&&this._showToolbar(i,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?V(this.editor,t):this._isToolbarInBalloon(e)||(e.initialized||(e.initialized=!0,e.view.fillFromConfig(e.itemsConfig,this.editor.ui.componentFactory)),this._balloon.add({view:e.view,position:K(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",()=>{for(const i of this._toolbarDefinitions.values())if(this._isToolbarVisible(i)){const o=i.getRelatedElement(this.editor.editing.view.document.selection);V(this.editor,o)}}))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function V(n,s){const e=n.plugins.get("ContextualBalloon"),t=K(n,s);e.updatePosition(t)}function K(n,s){const e=n.editing.view,t=oe.defaultPositions;return{target:e.domConverter.mapViewToDom(s),positions:[t.northArrowSouth,t.northArrowSouthWest,t.northArrowSouthEast,t.southArrowNorth,t.southArrowNorthWest,t.southArrowNorthEast,t.viewportStickyNorth]}}function Fe(n){const s=n.getSelectedElement();return!!(s&&m(s))}class Ne extends N(){constructor(e){super();p(this,"_referenceCoordinates");p(this,"_options");p(this,"_originalWidth");p(this,"_originalHeight");p(this,"_originalWidthPercents");p(this,"_aspectRatio");this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}get originalWidth(){return this._originalWidth}get originalHeight(){return this._originalHeight}get originalWidthPercents(){return this._originalWidthPercents}get aspectRatio(){return this._aspectRatio}begin(e,t,i){const o=new y(t);this.activeHandlePosition=Ke(e),this._referenceCoordinates=Le(t,je(this.activeHandlePosition)),this._originalWidth=o.width,this._originalHeight=o.height,this._aspectRatio=o.width/o.height;const r=i.style.width;r&&r.match(/^\d+(\.\d*)?%$/)?this._originalWidthPercents=parseFloat(r):this._originalWidthPercents=be(i,o)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function Le(n,s){const e=new y(n),t=s.split("-"),i={x:t[1]=="right"?e.right:e.left,y:t[0]=="bottom"?e.bottom:e.top};return i.x+=n.ownerDocument.defaultView.scrollX,i.y+=n.ownerDocument.defaultView.scrollY,i}function Be(n){return`ck-widget__resizer__handle-${n}`}function Ke(n){const s=["top-left","top-right","bottom-right","bottom-left"];for(const e of s)if(n.classList.contains(Be(e)))return e}function je(n){const s=n.split("-"),e={top:"bottom",bottom:"top",left:"right",right:"left"};return`${e[s[0]]}-${e[s[1]]}`}class $e extends se{constructor(){super();const s=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",s.to("_viewPosition",e=>e?`ck-orientation-${e}`:"")],style:{display:s.if("_isVisible","none",e=>!e)}},children:[{text:s.to("_label")}]})}_bindToState(s,e){this.bind("_isVisible").to(e,"proposedWidth",e,"proposedHeight",(t,i)=>t!==null&&i!==null),this.bind("_label").to(e,"proposedHandleHostWidth",e,"proposedHandleHostHeight",e,"proposedWidthPercents",(t,i,o)=>s.unit==="px"?`${t}×${i}`:`${o}%`),this.bind("_viewPosition").to(e,"activeHandlePosition",e,"proposedHandleHostWidth",e,"proposedHandleHostHeight",(t,i,o)=>i<50||o<50?"above-center":t)}_dismiss(){this.unbind(),this._isVisible=!1}}class x extends N(){constructor(e){super();p(this,"_state");p(this,"_sizeView");p(this,"_options");p(this,"_viewResizerWrapper",null);p(this,"_initialViewWidth");this._options=e,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",(t,i)=>t&&i),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",t=>{!this.state.proposedWidth&&!this.state.proposedWidthPercents&&(this._cleanup(),t.stop())},{priority:"high"})}get state(){return this._state}show(){this._options.editor.editing.view.change(t=>{t.removeClass("ck-hidden",this._viewResizerWrapper)})}hide(){this._options.editor.editing.view.change(t=>{t.addClass("ck-hidden",this._viewResizerWrapper)})}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change(o=>{const r=o.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},function(l){const c=this.toDomElement(l);return e._appendHandles(c),e._appendSizeUI(c),c});o.insert(o.createPositionAt(t,"end"),r),o.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=r,this.isVisible||this.hide()}),this.on("change:isVisible",()=>{this.isVisible?(this.show(),this.redraw()):this.hide()})}begin(e){this._state=new Ne(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change(d=>{const u=this._options.unit||"%",h=(u==="%"?t.widthPercents:t.width)+u;d.setStyle("width",h,this._options.viewElement)});const o=this._getHandleHost(),r=new y(o),l=Math.round(r.width),c=Math.round(r.height),a=new y(o);t.width=Math.round(a.width),t.height=Math.round(a.height),this.redraw(r),this.state.update({...t,handleHostWidth:l,handleHostHeight:c})}commit(){const e=this._options.unit||"%",t=(e==="%"?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change(()=>{this._cleanup(),this._options.onCommit(t)})}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!Ge(t))return;const i=t.parentElement,o=this._getHandleHost(),r=this._viewResizerWrapper,l=[r.getStyle("width"),r.getStyle("height"),r.getStyle("left"),r.getStyle("top")];let c;if(i.isSameNode(o)){const a=e||new y(o);c=[a.width+"px",a.height+"px",void 0,void 0]}else c=[o.offsetWidth+"px",o.offsetHeight+"px",o.offsetLeft+"px",o.offsetTop+"px"];Z(l,c)!=="same"&&this._options.editor.editing.view.change(a=>{a.setStyle({width:c[0],height:c[1],left:c[2],top:c[3]},r)})}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss(),this._options.editor.editing.view.change(t=>{t.setStyle("width",this._initialViewWidth,this._options.viewElement)})}_proposeNewSize(e){const t=this.state,i=qe(e),o=this._options.isCentered?this._options.isCentered(this):!0,r={x:t._referenceCoordinates.x-(i.x+t.originalWidth),y:i.y-t.originalHeight-t._referenceCoordinates.y};o&&t.activeHandlePosition.endsWith("-right")&&(r.x=i.x-(t._referenceCoordinates.x+t.originalWidth)),o&&(r.x*=2);let l=Math.abs(t.originalWidth+r.x),c=Math.abs(t.originalHeight+r.y);return(l/t.aspectRatio>c?"width":"height")=="width"?c=l/t.aspectRatio:l=c*t.aspectRatio,{width:Math.round(l),height:Math.round(c),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*l*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const i of t)e.appendChild(new k({tag:"div",attributes:{class:`ck-widget__resizer__handle ${Ue(i)}`}}).render())}_appendSizeUI(e){this._sizeView=new $e,this._sizeView.render(),e.appendChild(this._sizeView.element)}}function Ue(n){return`ck-widget__resizer__handle-${n}`}function qe(n){return{x:n.pageX,y:n.pageY}}function Ge(n){return n&&n.ownerDocument&&n.ownerDocument.contains(n)}class ct extends P{constructor(){super(...arguments);p(this,"_resizers",new Map);p(this,"_observer");p(this,"_redrawSelectedResizerThrottled")}static get pluginName(){return"WidgetResize"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.editing,t=A.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),e.view.addObserver(D),this._observer=new(Q()),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(t,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(t,"mouseup",this._mouseUpListener.bind(this)),this._redrawSelectedResizerThrottled=le(()=>this.redrawSelectedResizer(),200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",()=>{for(const[o,r]of this._resizers)o.isAttached()||(this._resizers.delete(o),r.destroy())},{priority:"lowest"}),this._observer.listenTo(A.window,"resize",this._redrawSelectedResizerThrottled);const i=this.editor.editing.view.document.selection;i.on("change",()=>{const o=i.getSelectedElement(),r=this.getResizerByViewElement(o)||null;r?this.select(r):this.deselect()})}redrawSelectedResizer(){this.selectedResizer&&this.selectedResizer.isVisible&&this.selectedResizer.redraw()}destroy(){super.destroy(),this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawSelectedResizerThrottled.cancel()}select(e){this.deselect(),this.selectedResizer=e,this.selectedResizer.isSelected=!0}deselect(){this.selectedResizer&&(this.selectedResizer.isSelected=!1),this.selectedResizer=null}attachTo(e){const t=new x(e),i=this.editor.plugins;if(t.attach(),i.has("WidgetToolbarRepository")){const l=i.get("WidgetToolbarRepository");t.on("begin",()=>{l.forceDisabled("resize")},{priority:"lowest"}),t.on("cancel",()=>{l.clearForceDisabled("resize")},{priority:"highest"}),t.on("commit",()=>{l.clearForceDisabled("resize")},{priority:"highest"})}this._resizers.set(e.viewElement,t);const r=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(r)==t&&this.select(t),t}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_mouseDownListener(e,t){const i=t.domTarget;x.isResizeHandle(i)&&(this._activeResizer=this._getResizerByHandle(i)||null,this._activeResizer&&(this._activeResizer.begin(i),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}export{he as WIDGET_CLASS_NAME,R as WIDGET_SELECTED_CLASS_NAME,rt as Widget,ct as WidgetResize,lt as WidgetToolbarRepository,Ce as WidgetTypeAround,_e as calculateResizeHostAncestorWidth,be as calculateResizeHostPercentageWidth,st as findOptimalInsertionRange,fe as getLabel,m as isWidget,L as setHighlightHandling,pe as setLabel,ot as toWidget,nt as toWidgetEditable};
@@ -1 +0,0 @@
1
- import t from"./_getNative.js";import a from"./_root.js";var e=t(a,"DataView");export{e as default};
@@ -1 +0,0 @@
1
- import p from"./_hashClear.js";import a from"./_hashDelete.js";import l from"./_hashGet.js";import s from"./_hashHas.js";import m from"./_hashSet.js";function t(o){var e=-1,h=o==null?0:o.length;for(this.clear();++e<h;){var r=o[e];this.set(r[0],r[1])}}t.prototype.clear=p;t.prototype.delete=a;t.prototype.get=l;t.prototype.has=s;t.prototype.set=m;export{t as default};
@@ -1 +0,0 @@
1
- import p from"./_listCacheClear.js";import a from"./_listCacheDelete.js";import i from"./_listCacheGet.js";import h from"./_listCacheHas.js";import s from"./_listCacheSet.js";function t(e){var o=-1,l=e==null?0:e.length;for(this.clear();++o<l;){var r=e[o];this.set(r[0],r[1])}}t.prototype.clear=p;t.prototype.delete=a;t.prototype.get=i;t.prototype.has=h;t.prototype.set=s;export{t as default};
@@ -1 +0,0 @@
1
- import o from"./_getNative.js";import r from"./_root.js";var p=o(r,"Map");export{p as default};
@@ -1 +0,0 @@
1
- import r from"./_mapCacheClear.js";import m from"./_mapCacheDelete.js";import h from"./_mapCacheGet.js";import l from"./_mapCacheHas.js";import c from"./_mapCacheSet.js";function e(t){var o=-1,a=t==null?0:t.length;for(this.clear();++o<a;){var p=t[o];this.set(p[0],p[1])}}e.prototype.clear=r;e.prototype.delete=m;e.prototype.get=h;e.prototype.has=l;e.prototype.set=c;export{e as default};
@@ -1 +0,0 @@
1
- import o from"./_getNative.js";import r from"./_root.js";var m=o(r,"Promise");export{m as default};
@@ -1 +0,0 @@
1
- import t from"./_getNative.js";import o from"./_root.js";var a=t(o,"Set");export{a as default};
@@ -1 +0,0 @@
1
- import p from"./_MapCache.js";import h from"./_setCacheAdd.js";import r from"./_setCacheHas.js";function e(t){var o=-1,a=t==null?0:t.length;for(this.__data__=new p;++o<a;)this.add(t[o])}e.prototype.add=e.prototype.push=h;e.prototype.has=r;export{e as default};
@@ -1 +0,0 @@
1
- import r from"./_ListCache.js";import a from"./_stackClear.js";import p from"./_stackDelete.js";import s from"./_stackGet.js";import i from"./_stackHas.js";import m from"./_stackSet.js";function t(o){var e=this.__data__=new r(o);this.size=e.size}t.prototype.clear=a;t.prototype.delete=p;t.prototype.get=s;t.prototype.has=i;t.prototype.set=m;export{t as default};
@@ -1 +0,0 @@
1
- import o from"./_root.js";var m=o.Symbol;export{m as default};
@@ -1 +0,0 @@
1
- import r from"./_root.js";var a=r.Uint8Array;export{a as default};
@@ -1 +0,0 @@
1
- import a from"./_getNative.js";import o from"./_root.js";var e=a(o,"WeakMap");export{e as default};
@@ -1 +0,0 @@
1
- function t(l,c,e){switch(e.length){case 0:return l.call(c);case 1:return l.call(c,e[0]);case 2:return l.call(c,e[0],e[1]);case 3:return l.call(c,e[0],e[1],e[2])}return l.apply(c,e)}export{t as default};
@@ -1 +0,0 @@
1
- function f(e,n){for(var l=-1,t=e==null?0:e.length;++l<t&&n(e[l],l,e)!==!1;);return e}export{f as default};
@@ -1 +0,0 @@
1
- function d(e,i){for(var n=-1,r=e==null?0:e.length,u=0,t=[];++n<r;){var l=e[n];i(l,n,e)&&(t[u++]=l)}return t}export{d as default};
@@ -1 +0,0 @@
1
- import a from"./_baseTimes.js";import g from"./isArguments.js";import h from"./isArray.js";import b from"./isBuffer.js";import A from"./_isIndex.js";import c from"./isTypedArray.js";var d=Object.prototype,O=d.hasOwnProperty;function l(t,p){var o=h(t),i=!o&&g(t),s=!o&&!i&&b(t),e=!o&&!i&&!s&&c(t),n=o||i||s||e,f=n?a(t.length,String):[],m=f.length;for(var r in t)(p||O.call(t,r))&&!(n&&(r=="length"||s&&(r=="offset"||r=="parent")||e&&(r=="buffer"||r=="byteLength"||r=="byteOffset")||A(r,m)))&&f.push(r);return f}export{l as default};
@@ -1 +0,0 @@
1
- function h(e,u){for(var l=-1,n=e==null?0:e.length,t=Array(n);++l<n;)t[l]=u(e[l],l,e);return t}export{h as default};
@@ -1 +0,0 @@
1
- function l(e,n){for(var t=-1,h=n.length,f=e.length;++t<h;)e[f+t]=n[t];return e}export{l as default};
@@ -1 +0,0 @@
1
- function h(e,t,n,d){for(var i=-1,l=e==null?0:e.length;++i<l;)n=t(n,e[i],i,e);return n}export{h as default};
@@ -1 +0,0 @@
1
- function u(e,t){for(var n=-1,l=e==null?0:e.length;++n<l;)if(t(e[n],n,e))return!0;return!1}export{u as default};