@ncino/web-components 4.3.0-preview.5 → 4.3.0-preview.7

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 (108) hide show
  1. package/dist/_virtual/external3.js +1 -0
  2. package/dist/_virtual/index10.js +1 -1
  3. package/dist/_virtual/index11.js +1 -1
  4. package/dist/_virtual/index12.js +1 -1
  5. package/dist/_virtual/index13.js +1 -0
  6. package/dist/_virtual/index4.js +1 -1
  7. package/dist/_virtual/index5.js +1 -1
  8. package/dist/_virtual/index6.js +1 -1
  9. package/dist/_virtual/index7.js +1 -1
  10. package/dist/_virtual/index8.js +1 -1
  11. package/dist/_virtual/index9.js +1 -1
  12. package/dist/_virtual/index_react.js +1 -0
  13. package/dist/_virtual/index_react2.js +1 -0
  14. package/dist/_virtual/react.production.js +1 -0
  15. package/dist/assets/node_modules/.pnpm/{ckeditor5@45.2.0 → ckeditor5@45.2.1}/node_modules/ckeditor5/dist/ckeditor5.css +1 -1
  16. package/dist/components/alert/alert.gator.figma.js +7 -0
  17. package/dist/components/avatar/gator/avatar.gator.figma.js +9 -0
  18. package/dist/components/button/gator/button.gator.figma.js +12 -4
  19. package/dist/components/button-group/gator/button-group.gator.figma.js +7 -0
  20. package/dist/components/icon/gator/icon.gator.figma.js +7 -2
  21. package/dist/components/icon/gator/icons.gator.figma.js +1 -0
  22. package/dist/components/input-rich-text/ckeditor-config.js +1 -1
  23. package/dist/components/input-rich-text/input-rich-text.slds.js +2 -2
  24. package/dist/components/menu/menu-item/gator/menu-item.gator.js +2 -2
  25. package/dist/components/panel/gator/panel.storybook-test.js +1 -1
  26. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-alignment@45.2.0 → @ckeditor_ckeditor5-alignment@45.2.1}/node_modules/@ckeditor/ckeditor5-alignment/dist/index.js +1 -1
  27. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autoformat@45.2.0 → @ckeditor_ckeditor5-autoformat@45.2.1}/node_modules/@ckeditor/ckeditor5-autoformat/dist/index.js +1 -1
  28. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-autosave@45.2.0 → @ckeditor_ckeditor5-autosave@45.2.1}/node_modules/@ckeditor/ckeditor5-autosave/dist/index.js +1 -1
  29. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-basic-styles@45.2.0 → @ckeditor_ckeditor5-basic-styles@45.2.1}/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +1 -1
  30. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-block-quote@45.2.0 → @ckeditor_ckeditor5-block-quote@45.2.1}/node_modules/@ckeditor/ckeditor5-block-quote/dist/index.js +1 -1
  31. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-clipboard@45.2.0 → @ckeditor_ckeditor5-clipboard@45.2.1}/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +1 -1
  32. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-cloud-services@45.2.0 → @ckeditor_ckeditor5-cloud-services@45.2.1}/node_modules/@ckeditor/ckeditor5-cloud-services/dist/index.js +1 -1
  33. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-code-block@45.2.0 → @ckeditor_ckeditor5-code-block@45.2.1}/node_modules/@ckeditor/ckeditor5-code-block/dist/index.js +1 -1
  34. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-core@45.2.0 → @ckeditor_ckeditor5-core@45.2.1}/node_modules/@ckeditor/ckeditor5-core/dist/index.js +1 -1
  35. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-editor-classic@45.2.0 → @ckeditor_ckeditor5-editor-classic@45.2.1}/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +1 -1
  36. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-engine@45.2.0 → @ckeditor_ckeditor5-engine@45.2.1}/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +11 -11
  37. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-enter@45.2.0 → @ckeditor_ckeditor5-enter@45.2.1}/node_modules/@ckeditor/ckeditor5-enter/dist/index.js +1 -1
  38. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-essentials@45.2.0 → @ckeditor_ckeditor5-essentials@45.2.1}/node_modules/@ckeditor/ckeditor5-essentials/dist/index.js +1 -1
  39. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-find-and-replace@45.2.0 → @ckeditor_ckeditor5-find-and-replace@45.2.1}/node_modules/@ckeditor/ckeditor5-find-and-replace/dist/index.js +1 -1
  40. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-font@45.2.0 → @ckeditor_ckeditor5-font@45.2.1}/node_modules/@ckeditor/ckeditor5-font/dist/index.js +1 -1
  41. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-heading@45.2.0 → @ckeditor_ckeditor5-heading@45.2.1}/node_modules/@ckeditor/ckeditor5-heading/dist/index.js +1 -1
  42. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-highlight@45.2.0 → @ckeditor_ckeditor5-highlight@45.2.1}/node_modules/@ckeditor/ckeditor5-highlight/dist/index.js +1 -1
  43. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-horizontal-line@45.2.0 → @ckeditor_ckeditor5-horizontal-line@45.2.1}/node_modules/@ckeditor/ckeditor5-horizontal-line/dist/index.js +1 -1
  44. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-html-embed@45.2.0 → @ckeditor_ckeditor5-html-embed@45.2.1}/node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js +1 -1
  45. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-html-support@45.2.0 → @ckeditor_ckeditor5-html-support@45.2.1}/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +1 -1
  46. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-image@45.2.0 → @ckeditor_ckeditor5-image@45.2.1}/node_modules/@ckeditor/ckeditor5-image/dist/index.js +1 -1
  47. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-indent@45.2.0 → @ckeditor_ckeditor5-indent@45.2.1}/node_modules/@ckeditor/ckeditor5-indent/dist/index.js +1 -1
  48. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-language@45.2.0 → @ckeditor_ckeditor5-language@45.2.1}/node_modules/@ckeditor/ckeditor5-language/dist/index.js +1 -1
  49. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-link@45.2.0 → @ckeditor_ckeditor5-link@45.2.1}/node_modules/@ckeditor/ckeditor5-link/dist/index.js +1 -1
  50. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-list@45.2.0 → @ckeditor_ckeditor5-list@45.2.1}/node_modules/@ckeditor/ckeditor5-list/dist/index.js +1 -1
  51. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-markdown-gfm@45.2.0 → @ckeditor_ckeditor5-markdown-gfm@45.2.1}/node_modules/@ckeditor/ckeditor5-markdown-gfm/dist/index.js +1 -1
  52. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-media-embed@45.2.0 → @ckeditor_ckeditor5-media-embed@45.2.1}/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +1 -1
  53. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-mention@45.2.0 → @ckeditor_ckeditor5-mention@45.2.1}/node_modules/@ckeditor/ckeditor5-mention/dist/index.js +1 -1
  54. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-page-break@45.2.0 → @ckeditor_ckeditor5-page-break@45.2.1}/node_modules/@ckeditor/ckeditor5-page-break/dist/index.js +1 -1
  55. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-paragraph@45.2.0 → @ckeditor_ckeditor5-paragraph@45.2.1}/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +1 -1
  56. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-paste-from-office@45.2.0 → @ckeditor_ckeditor5-paste-from-office@45.2.1}/node_modules/@ckeditor/ckeditor5-paste-from-office/dist/index.js +1 -1
  57. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-remove-format@45.2.0 → @ckeditor_ckeditor5-remove-format@45.2.1}/node_modules/@ckeditor/ckeditor5-remove-format/dist/index.js +1 -1
  58. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-select-all@45.2.0 → @ckeditor_ckeditor5-select-all@45.2.1}/node_modules/@ckeditor/ckeditor5-select-all/dist/index.js +1 -1
  59. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-show-blocks@45.2.0 → @ckeditor_ckeditor5-show-blocks@45.2.1}/node_modules/@ckeditor/ckeditor5-show-blocks/dist/index.js +1 -1
  60. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-source-editing@45.2.0 → @ckeditor_ckeditor5-source-editing@45.2.1}/node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js +1 -1
  61. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-special-characters@45.2.0 → @ckeditor_ckeditor5-special-characters@45.2.1}/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js +1 -1
  62. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-style@45.2.0 → @ckeditor_ckeditor5-style@45.2.1}/node_modules/@ckeditor/ckeditor5-style/dist/index.js +1 -1
  63. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-table@45.2.0 → @ckeditor_ckeditor5-table@45.2.1}/node_modules/@ckeditor/ckeditor5-table/dist/index.js +1 -1
  64. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-typing@45.2.1/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +13 -0
  65. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-ui@45.2.0 → @ckeditor_ckeditor5-ui@45.2.1}/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +1 -1
  66. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-undo@45.2.0 → @ckeditor_ckeditor5-undo@45.2.1}/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +1 -1
  67. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-upload@45.2.0 → @ckeditor_ckeditor5-upload@45.2.1}/node_modules/@ckeditor/ckeditor5-upload/dist/index.js +1 -1
  68. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-utils@45.2.0 → @ckeditor_ckeditor5-utils@45.2.1}/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +1 -1
  69. package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-widget@45.2.0 → @ckeditor_ckeditor5-widget@45.2.1}/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +1 -1
  70. package/dist/node_modules/.pnpm/@figma_code-connect@1.3.3/node_modules/@figma/code-connect/dist/client/external.js +1 -1
  71. package/dist/node_modules/.pnpm/@figma_code-connect@1.3.3/node_modules/@figma/code-connect/dist/common/updates.js +1 -1
  72. package/dist/node_modules/.pnpm/@figma_code-connect@1.3.3/node_modules/@figma/code-connect/dist/react/external.js +1 -0
  73. package/dist/node_modules/.pnpm/@figma_code-connect@1.3.3/node_modules/@figma/code-connect/dist/react/index_react.js +1 -0
  74. package/dist/node_modules/.pnpm/{@storybook_instrumenter@8.6.14_storybook@8.6.14_prettier@3.6.0_ → @storybook_instrumenter@8.6.14_storybook@8.6.14_prettier@3.5.3_}/node_modules/@storybook/instrumenter/dist/index.js +1 -1
  75. package/dist/node_modules/.pnpm/{@storybook_test@8.6.14_storybook@8.6.14_prettier@3.6.0_ → @storybook_test@8.6.14_storybook@8.6.14_prettier@3.5.3_}/node_modules/@storybook/test/dist/index.js +1 -1
  76. package/dist/node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js +1 -1
  77. package/dist/node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js +1 -1
  78. package/dist/node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js +1 -1
  79. package/dist/node_modules/.pnpm/call-bind@1.0.8/node_modules/call-bind/index.js +1 -1
  80. package/dist/node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js +1 -1
  81. package/dist/node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js +1 -1
  82. package/dist/node_modules/.pnpm/react@19.1.0/node_modules/react/cjs/react.production.js +9 -0
  83. package/dist/node_modules/.pnpm/react@19.1.0/node_modules/react/index.js +1 -0
  84. package/dist/node_modules/.pnpm/safe-buffer@5.1.2/node_modules/safe-buffer/index.js +1 -1
  85. package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/index.js +1 -1
  86. package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/api/index.js +1 -1
  87. package/dist/types/components/alert/alert.gator.figma.d.ts +1 -0
  88. package/dist/types/components/avatar/gator/avatar.gator.figma.d.ts +1 -0
  89. package/dist/types/components/button-group/gator/button-group.gator.figma.d.ts +1 -0
  90. package/dist/types/components/icon/gator/icons.gator.figma.d.ts +1 -0
  91. package/dist/types/components/menu/menu-item/gator/menu-item.gator.d.ts +1 -0
  92. package/dist/utils/vitest-a11y-utils.js +1 -1
  93. package/package.json +19 -18
  94. package/web-types.json +1 -1
  95. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-typing@45.2.0/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +0 -13
  96. /package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-icons@45.2.0 → @ckeditor_ckeditor5-icons@45.2.1}/node_modules/@ckeditor/ckeditor5-icons/dist/index.js +0 -0
  97. /package/dist/node_modules/.pnpm/{@ckeditor_ckeditor5-watchdog@45.2.0 → @ckeditor_ckeditor5-watchdog@45.2.1}/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +0 -0
  98. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.14_prettier@3.6.0_storybook@8.6.14_prettier@3.6.0_ → @storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_}/node_modules/@storybook/core/dist/channels/index.js +0 -0
  99. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.14_prettier@3.6.0_storybook@8.6.14_prettier@3.6.0_ → @storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_}/node_modules/@storybook/core/dist/client-logger/index.js +0 -0
  100. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.14_prettier@3.6.0_storybook@8.6.14_prettier@3.6.0_ → @storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_}/node_modules/@storybook/core/dist/core-events/index.js +0 -0
  101. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.14_prettier@3.6.0_storybook@8.6.14_prettier@3.6.0_ → @storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_}/node_modules/@storybook/core/dist/csf/index.js +0 -0
  102. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.14_prettier@3.6.0_storybook@8.6.14_prettier@3.6.0_ → @storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_}/node_modules/@storybook/core/dist/preview-api/index.js +0 -0
  103. /package/dist/node_modules/.pnpm/{@storybook_core@8.6.14_prettier@3.6.0_storybook@8.6.14_prettier@3.6.0_ → @storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_}/node_modules/@storybook/core/dist/preview-errors.js +0 -0
  104. /package/dist/node_modules/.pnpm/{@vitest_browser@3.2.4_msw@2.7.3_@types_node@24.0.3_typescript@5.8.3__playwright@1.53.1__6fcfe539b096d0d382b4f941dd125630 → @vitest_browser@3.2.4_msw@2.7.3_@types_node@24.0.1_typescript@5.8.3__playwright@1.53.1__64bf204e83d923e607f171b7f35f4f46}/node_modules/@vitest/browser/context.js +0 -0
  105. /package/dist/node_modules/.pnpm/{vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.3_@vitest_browser@3.2.4_@vitest_ui@3._c4c70545e07c6add63948b205cccfe4e → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.1_@vitest_browser@3.2.4_@vitest_ui@3._5d5a5c8a4aa2033fceb23b072a94a45b}/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js +0 -0
  106. /package/dist/node_modules/.pnpm/{vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.3_@vitest_browser@3.2.4_@vitest_ui@3._c4c70545e07c6add63948b205cccfe4e → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.1_@vitest_browser@3.2.4_@vitest_ui@3._5d5a5c8a4aa2033fceb23b072a94a45b}/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js +0 -0
  107. /package/dist/node_modules/.pnpm/{vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.3_@vitest_browser@3.2.4_@vitest_ui@3._c4c70545e07c6add63948b205cccfe4e → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.1_@vitest_browser@3.2.4_@vitest_ui@3._5d5a5c8a4aa2033fceb23b072a94a45b}/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js +0 -0
  108. /package/dist/node_modules/.pnpm/{vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.3_@vitest_browser@3.2.4_@vitest_ui@3._c4c70545e07c6add63948b205cccfe4e → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.1_@vitest_browser@3.2.4_@vitest_ui@3._5d5a5c8a4aa2033fceb23b072a94a45b}/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js +0 -0
@@ -1,4 +1,4 @@
1
- import{Plugin as m,Command as b}from"../../../../../@ckeditor_ckeditor5-core@45.2.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Enter as Q}from"../../../../../@ckeditor_ckeditor5-enter@45.2.0/node_modules/@ckeditor/ckeditor5-enter/dist/index.js";import{Delete as g}from"../../../../../@ckeditor_ckeditor5-typing@45.2.0/node_modules/@ckeditor/ckeditor5-typing/dist/index.js";import{first as f}from"../../../../../@ckeditor_ckeditor5-utils@45.2.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{IconQuote as B}from"../../../../../@ckeditor_ckeditor5-icons@45.2.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{ButtonView as v,MenuBarMenuListItemButtonView as E}from"../../../../../@ckeditor_ckeditor5-ui@45.2.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";/**
1
+ import{Plugin as m,Command as b}from"../../../../../@ckeditor_ckeditor5-core@45.2.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{Enter as Q}from"../../../../../@ckeditor_ckeditor5-enter@45.2.1/node_modules/@ckeditor/ckeditor5-enter/dist/index.js";import{Delete as g}from"../../../../../@ckeditor_ckeditor5-typing@45.2.1/node_modules/@ckeditor/ckeditor5-typing/dist/index.js";import{first as f}from"../../../../../@ckeditor_ckeditor5-utils@45.2.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{IconQuote as B}from"../../../../../@ckeditor_ckeditor5-icons@45.2.1/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";import{ButtonView as v,MenuBarMenuListItemButtonView as E}from"../../../../../@ckeditor_ckeditor5-ui@45.2.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";/**
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */class x extends b{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,o=t.schema,i=t.document.selection,n=Array.from(i.getSelectedBlocks()),s=e.forceValue===void 0?!this.value:e.forceValue;t.change(u=>{if(!s)this._removeQuote(u,n.filter(d));else{const r=n.filter(c=>d(c)||k(o,c));this._applyQuote(u,r)}})}_getValue(){const e=this.editor.model.document.selection,t=f(e.getSelectedBlocks());return!!(t&&d(t))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,o=f(e.getSelectedBlocks());return o?k(t,o):!1}_removeQuote(e,t){h(e,t).reverse().forEach(o=>{if(o.start.isAtStart&&o.end.isAtEnd){e.unwrap(o.start.parent);return}if(o.start.isAtStart){const n=e.createPositionBefore(o.start.parent);e.move(o,n);return}o.end.isAtEnd||e.split(o.end);const i=e.createPositionAfter(o.end.parent);e.move(o,i)})}_applyQuote(e,t){const o=[];h(e,t).reverse().forEach(i=>{let n=d(i.start);n||(n=e.createElement("blockQuote"),e.wrap(i,n)),o.push(n)}),o.reverse().reduce((i,n)=>i.nextSibling==n?(e.merge(e.createPositionAfter(i)),i):n)}}function d(l){return l.parent.name=="blockQuote"?l.parent:null}function h(l,e){let t,o=0;const i=[];for(;o<e.length;){const n=e[o],s=e[o+1];t||(t=l.createPositionBefore(n)),(!s||n.nextSibling!=s)&&(i.push(l.createRange(t,l.createPositionAfter(n))),t=null),o++}return i}function k(l,e){const t=l.checkChild(e.parent,"blockQuote"),o=l.checkChild(["$root","blockQuote"],e);return t&&o}class P extends m{static get pluginName(){return"BlockQuoteEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[Q,g]}init(){const e=this.editor,t=e.model.schema;e.commands.add("blockQuote",new x(e)),t.register("blockQuote",{inheritAllFrom:"$container"}),e.conversion.elementToElement({model:"blockQuote",view:"blockquote"}),e.model.document.registerPostFixer(s=>{const u=e.model.document.differ.getChanges();for(const r of u)if(r.type=="insert"){const c=r.position.nodeAfter;if(!c)continue;if(c.is("element","blockQuote")&&c.isEmpty)return s.remove(c),!0;if(c.is("element","blockQuote")&&!t.checkChild(r.position,c))return s.unwrap(c),!0;if(c.is("element")){const p=s.createRangeIn(c);for(const a of p.getItems())if(a.is("element","blockQuote")&&!t.checkChild(s.createPositionBefore(a),a))return s.unwrap(a),!0}}else if(r.type=="remove"){const c=r.position.parent;if(c.is("element","blockQuote")&&c.isEmpty)return s.remove(c),!0}return!1});const o=this.editor.editing.view.document,i=e.model.document.selection,n=e.commands.get("blockQuote");this.listenTo(o,"enter",(s,u)=>{if(!i.isCollapsed||!n.value)return;i.getLastPosition().parent.isEmpty&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),u.preventDefault(),s.stop())},{context:"blockquote"}),this.listenTo(o,"delete",(s,u)=>{if(u.direction!="backward"||!i.isCollapsed||!n.value)return;const r=i.getLastPosition().parent;r.isEmpty&&!r.previousSibling&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),u.preventDefault(),s.stop())},{context:"blockquote"})}}class A extends m{static get pluginName(){return"BlockQuoteUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("blockQuote",()=>{const t=this._createButton(v);return t.set({tooltip:!0}),t}),e.ui.componentFactory.add("menuBar:blockQuote",()=>{const t=this._createButton(E);return t.set({role:"menuitemcheckbox"}),t})}_createButton(e){const t=this.editor,o=t.locale,i=t.commands.get("blockQuote"),n=new e(t.locale),s=o.t;return n.set({label:s("Block quote"),icon:B,isToggleable:!0}),n.bind("isEnabled").to(i,"isEnabled"),n.bind("isOn").to(i,"value"),this.listenTo(n,"execute",()=>{t.execute("blockQuote"),t.editing.view.focus()}),n}}class V extends m{static get requires(){return[P,A]}static get pluginName(){return"BlockQuote"}static get isOfficialPlugin(){return!0}}export{V as BlockQuote,P as BlockQuoteEditing,A as BlockQuoteUI};
@@ -1,4 +1,4 @@
1
- var re=Object.defineProperty;var ne=(l,a,e)=>a in l?re(l,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[a]=e;var m=(l,a,e)=>ne(l,typeof a!="symbol"?a+"":a,e);import{Plugin as _}from"../../../../../@ckeditor_ckeditor5-core@45.2.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{EventInfo as j,uid as H,delay as K,DomEmitterMixin as S,env as b,global as f,createElement as B,Rect as k,getRangeFromMouseEvent as ie,ResizeObserver as oe,toUnit as se}from"../../../../../@ckeditor_ckeditor5-utils@45.2.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{MouseObserver as ae,LiveRange as w,DomEventObserver as le,DataTransfer as ce,Range as de}from"../../../../../@ckeditor_ckeditor5-engine@45.2.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{Widget as ge,isWidget as y}from"../../../../../@ckeditor_ckeditor5-widget@45.2.0/node_modules/@ckeditor/ckeditor5-widget/dist/index.js";import{View as pe}from"../../../../../@ckeditor_ckeditor5-ui@45.2.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{mapValues as me}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/mapValues.js";import{throttle as L}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/function/throttle.js";/**
1
+ var re=Object.defineProperty;var ne=(l,a,e)=>a in l?re(l,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[a]=e;var m=(l,a,e)=>ne(l,typeof a!="symbol"?a+"":a,e);import{Plugin as _}from"../../../../../@ckeditor_ckeditor5-core@45.2.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{EventInfo as j,uid as H,delay as K,DomEmitterMixin as S,env as b,global as f,createElement as B,Rect as k,getRangeFromMouseEvent as ie,ResizeObserver as oe,toUnit as se}from"../../../../../@ckeditor_ckeditor5-utils@45.2.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{MouseObserver as ae,LiveRange as w,DomEventObserver as le,DataTransfer as ce,Range as de}from"../../../../../@ckeditor_ckeditor5-engine@45.2.1/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{Widget as ge,isWidget as y}from"../../../../../@ckeditor_ckeditor5-widget@45.2.1/node_modules/@ckeditor/ckeditor5-widget/dist/index.js";import{View as pe}from"../../../../../@ckeditor_ckeditor5-ui@45.2.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{mapValues as me}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/mapValues.js";import{throttle as L}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/function/throttle.js";/**
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */class D extends le{constructor(e){super(e);m(this,"domEventType",["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"]);const n=this.document;this.listenTo(n,"paste",t("clipboardInput"),{priority:"low"}),this.listenTo(n,"drop",t("clipboardInput"),{priority:"low"}),this.listenTo(n,"dragover",t("dragging"),{priority:"low"});function t(i){return(o,r)=>{r.preventDefault();const s=r.dropRange?[r.dropRange]:null,c=new j(n,i);n.fire(c,{dataTransfer:r.dataTransfer,method:o.name,targetRanges:s,target:r.target,domEvent:r.domEvent}),c.stop.called&&r.stopPropagation()}}}onDomEvent(e){const n="clipboardData"in e?e.clipboardData:e.dataTransfer,t=e.type=="drop"||e.type=="paste",i={dataTransfer:new ce(n,{cacheFiles:t})};if(e.type=="drop"||e.type=="dragover"){const o=ie(e);i.dropRange=o&&this.view.domConverter.domRangeToView(o)}this.fire(e.type,e,i)}}/**
@@ -1,4 +1,4 @@
1
- var _=Object.defineProperty;var g=(n,s,e)=>s in n?_(n,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[s]=e;var i=(n,s,e)=>g(n,typeof s!="symbol"?s+"":s,e);import{ContextPlugin as p}from"../../../../../@ckeditor_ckeditor5-core@45.2.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{CKEditorError as a,ObservableMixin as T,logWarning as k,EmitterMixin as w}from"../../../../../@ckeditor_ckeditor5-utils@45.2.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";/**
1
+ var _=Object.defineProperty;var g=(n,s,e)=>s in n?_(n,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[s]=e;var i=(n,s,e)=>g(n,typeof s!="symbol"?s+"":s,e);import{ContextPlugin as p}from"../../../../../@ckeditor_ckeditor5-core@45.2.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{CKEditorError as a,ObservableMixin as T,logWarning as k,EmitterMixin as w}from"../../../../../@ckeditor_ckeditor5-utils@45.2.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";/**
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */const m={autoRefresh:!0},f=36e5,E=5e3;class d extends T(){constructor(e,t={}){super();i(this,"_refresh");i(this,"_options");i(this,"_tokenRefreshTimeout");i(this,"_isDestroyed",!1);if(!e)throw new a("token-missing-token-url",this);t.initValue&&this._validateTokenValue(t.initValue),this.set("value",t.initValue),typeof e=="function"?this._refresh=e:this._refresh=()=>R(e),this._options={...m,...t}}init(){return new Promise((e,t)=>{if(!this.value){this.refreshToken().then(e).catch(t);return}this._options.autoRefresh&&this._registerRefreshTokenTimeout(),e(this)})}refreshToken(){const e=this._options.autoRefresh;return this._refresh().then(t=>(this._validateTokenValue(t),this.set("value",t),e&&this._registerRefreshTokenTimeout(),this)).catch(t=>{throw k("token-refresh-failed",{autoRefresh:e}),e&&this._registerRefreshTokenTimeout(E),t})}destroy(){this._isDestroyed=!0,clearTimeout(this._tokenRefreshTimeout)}_validateTokenValue(e){const t=typeof e=="string",r=!/^".*"$/.test(e),o=t&&e.split(".").length===3;if(!(r&&o))throw new a("token-not-in-jwt-format",this)}_registerRefreshTokenTimeout(e){if(clearTimeout(this._tokenRefreshTimeout),this._isDestroyed)return;const t=e||this._getTokenRefreshTimeoutTime();this._tokenRefreshTimeout=setTimeout(()=>{this.refreshToken()},t)}_getTokenRefreshTimeoutTime(){try{const[,e]=this.value.split("."),{exp:t}=JSON.parse(atob(e));return t?Math.floor((t*1e3-Date.now())/2):f}catch{return f}}static create(e,t={}){return new d(e,t).init()}}function R(n){return new Promise((s,e)=>{const t=new XMLHttpRequest;t.open("GET",n),t.addEventListener("load",()=>{const r=t.status,o=t.response;return r<200||r>299?e(new a("token-cannot-download-new-token",null)):s(o)}),t.addEventListener("error",()=>e(new Error("Network Error"))),t.addEventListener("abort",()=>e(new Error("Abort"))),t.send()})}const c=/^data:(\S*?);base64,/;class v extends w(){constructor(e,t,r){super();i(this,"file");i(this,"xhr");i(this,"_token");i(this,"_apiAddress");if(!e)throw new a("fileuploader-missing-file",null);if(!t)throw new a("fileuploader-missing-token",null);if(!r)throw new a("fileuploader-missing-api-address",null);this.file=x(e)?y(e):e,this._token=t,this._apiAddress=r}onProgress(e){return this.on("progress",(t,r)=>e(r)),this}onError(e){return this.once("error",(t,r)=>e(r)),this}abort(){this.xhr.abort()}send(){return this._prepareRequest(),this._attachXHRListeners(),this._sendRequest()}_prepareRequest(){const e=new XMLHttpRequest;e.open("POST",this._apiAddress),e.setRequestHeader("Authorization",this._token.value),e.responseType="json",this.xhr=e}_attachXHRListeners(){const e=this.xhr,t=r=>()=>this.fire("error",r);e.addEventListener("error",t("Network Error")),e.addEventListener("abort",t("Abort"));/* istanbul ignore else -- @preserve */e.upload&&e.upload.addEventListener("progress",r=>{r.lengthComputable&&this.fire("progress",{total:r.total,uploaded:r.loaded})}),e.addEventListener("load",()=>{const r=e.status,o=e.response;if(r<200||r>299)return this.fire("error",o.message||o.error)})}_sendRequest(){const e=new FormData,t=this.xhr;return e.append("file",this.file),new Promise((r,o)=>{t.addEventListener("load",()=>{const u=t.status,h=t.response;return u<200||u>299?h.message?o(new a("fileuploader-uploading-data-failed",this,{message:h.message})):o(h.error):r(h)}),t.addEventListener("error",()=>o(new Error("Network Error"))),t.addEventListener("abort",()=>o(new Error("Abort"))),t.send(e)})}}function y(n,s=512){try{const e=n.match(c)[1],t=atob(n.replace(c,"")),r=[];for(let o=0;o<t.length;o+=s){const u=t.slice(o,o+s),h=new Array(u.length);for(let l=0;l<u.length;l++)h[l]=u.charCodeAt(l);r.push(new Uint8Array(h))}return new Blob(r,{type:e})}catch{throw new a("fileuploader-decoding-image-data-error",null)}}function x(n){var s;return typeof n!="string"?!1:!!((s=n.match(c))!=null&&s.length)}class b{constructor(s,e){i(this,"_token");i(this,"_apiAddress");if(!s)throw new a("uploadgateway-missing-token",null);if(!e)throw new a("uploadgateway-missing-api-address",null);this._token=s,this._apiAddress=e}upload(s){return new v(s,this._token,this._apiAddress)}}class C extends p{static get pluginName(){return"CloudServicesCore"}static get isOfficialPlugin(){return!0}createToken(s,e){return new d(s,e)}createUploadGateway(s,e){return new b(s,e)}}class P extends p{constructor(){super(...arguments);i(this,"tokenUrl");i(this,"uploadUrl");i(this,"webSocketUrl");i(this,"bundleVersion");i(this,"token",null);i(this,"_tokens",new Map)}static get pluginName(){return"CloudServices"}static get isOfficialPlugin(){return!0}static get requires(){return[C]}async init(){const t=this.context.config.get("cloudServices")||{};for(const[u,h]of Object.entries(t))this[u]=h;if(!this.tokenUrl){this.token=null;return}const o=this.context.plugins.get("CloudServicesCore").createToken(this.tokenUrl);try{this.token=await o.init(),this._tokens.set(this.tokenUrl,this.token)}catch(u){throw o.destroy(),u}}async registerTokenUrl(e){if(this._tokens.has(e))return this.getTokenFor(e);const r=await this.context.plugins.get("CloudServicesCore").createToken(e).init();return this._tokens.set(e,r),r}getTokenFor(e){const t=this._tokens.get(e);if(!t)throw new a("cloudservices-token-not-registered",this);return t}destroy(){super.destroy();for(const e of this._tokens.values())e.destroy()}}export{P as CloudServices,C as CloudServicesCore,d as Token};
@@ -1,4 +1,4 @@
1
- var O=Object.defineProperty;var R=(i,t,e)=>t in i?O(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var h=(i,t,e)=>R(i,typeof t!="symbol"?t+"":t,e);import{Plugin as S,Command as x}from"../../../../../@ckeditor_ckeditor5-core@45.2.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{ShiftEnter as M}from"../../../../../@ckeditor_ckeditor5-enter@45.2.0/node_modules/@ckeditor/ckeditor5-enter/dist/index.js";import{UpcastWriter as N}from"../../../../../@ckeditor_ckeditor5-engine@45.2.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{ClipboardPipeline as q}from"../../../../../@ckeditor_ckeditor5-clipboard@45.2.0/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js";import{Collection as F,first as v}from"../../../../../@ckeditor_ckeditor5-utils@45.2.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{createDropdown as $,addListToDropdown as z,MenuBarMenuView as W,MenuBarMenuListView as j,MenuBarMenuListItemView as U,MenuBarMenuListItemButtonView as H,ViewModel as J,SplitButtonView as K}from"../../../../../@ckeditor_ckeditor5-ui@45.2.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{IconCodeBlock as A}from"../../../../../@ckeditor_ckeditor5-icons@45.2.0/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";/**
1
+ var O=Object.defineProperty;var R=(i,t,e)=>t in i?O(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var h=(i,t,e)=>R(i,typeof t!="symbol"?t+"":t,e);import{Plugin as S,Command as x}from"../../../../../@ckeditor_ckeditor5-core@45.2.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{ShiftEnter as M}from"../../../../../@ckeditor_ckeditor5-enter@45.2.1/node_modules/@ckeditor/ckeditor5-enter/dist/index.js";import{UpcastWriter as N}from"../../../../../@ckeditor_ckeditor5-engine@45.2.1/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{ClipboardPipeline as q}from"../../../../../@ckeditor_ckeditor5-clipboard@45.2.1/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js";import{Collection as F,first as v}from"../../../../../@ckeditor_ckeditor5-utils@45.2.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{createDropdown as $,addListToDropdown as z,MenuBarMenuView as W,MenuBarMenuListView as j,MenuBarMenuListItemView as U,MenuBarMenuListItemButtonView as H,ViewModel as J,SplitButtonView as K}from"../../../../../@ckeditor_ckeditor5-ui@45.2.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{IconCodeBlock as A}from"../../../../../@ckeditor_ckeditor5-icons@45.2.1/node_modules/@ckeditor/ckeditor5-icons/dist/index.js";/**
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */function b(i){const t=i.t,e=i.config.get("codeBlock.languages");for(const o of e)o.label==="Plain text"&&(o.label=t("Plain text")),o.class===void 0&&(o.class=`language-${o.language}`);return e}function k(i,t,e){const o={};for(const a of i)if(t==="class"){const s=a[t].split(" ").shift();o[s]=a[e]}else o[a[t]]=a[e];return o}function L(i){return i.data.match(/^(\s*)/)[0]}function G(i,t){const e=i.createDocumentFragment(),o=t.split(`
@@ -1,4 +1,4 @@
1
- var Q=Object.defineProperty;var X=(n,i,e)=>i in n?Q(n,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[i]=e;var c=(n,i,e)=>X(n,typeof i!="symbol"?i+"":i,e);import{ObservableMixin as v,Collection as $,CKEditorError as u,insertToPriorityArray as Z,setDataInElement as G,Config as V,parseBase64EncodedObject as ee,toArray as te,crc32 as ie,releaseDate as ne,uid as U,logError as se,Locale as oe,EmitterMixin as re,KeystrokeHandler as ae,global as K,env as E}from"../../../../../@ckeditor_ckeditor5-utils@45.2.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{Model as le,DataController as ce,StylesProcessor as ue,EditingController as de,Conversion as he}from"../../../../../@ckeditor_ckeditor5-engine@45.2.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{EditorWatchdog as fe,ContextWatchdog as ge}from"../../../../../@ckeditor_ckeditor5-watchdog@45.2.0/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js";import{isFunction as z}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isFunction.js";import{get as me}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/get.js";import{set as ye}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/set.js";/**
1
+ var Q=Object.defineProperty;var X=(n,i,e)=>i in n?Q(n,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[i]=e;var c=(n,i,e)=>X(n,typeof i!="symbol"?i+"":i,e);import{ObservableMixin as v,Collection as $,CKEditorError as u,insertToPriorityArray as Z,setDataInElement as G,Config as V,parseBase64EncodedObject as ee,toArray as te,crc32 as ie,releaseDate as ne,uid as U,logError as se,Locale as oe,EmitterMixin as re,KeystrokeHandler as ae,global as K,env as E}from"../../../../../@ckeditor_ckeditor5-utils@45.2.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{Model as le,DataController as ce,StylesProcessor as ue,EditingController as de,Conversion as he}from"../../../../../@ckeditor_ckeditor5-engine@45.2.1/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{EditorWatchdog as fe,ContextWatchdog as ge}from"../../../../../@ckeditor_ckeditor5-watchdog@45.2.1/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js";import{isFunction as z}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/predicate/isFunction.js";import{get as me}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/get.js";import{set as ye}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/set.js";/**
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */class Me extends v(){constructor(e){super();c(this,"editor");c(this,"_disableStack",new Set);this.editor=e,this.set("isEnabled",!0)}forceDisabled(e){this._disableStack.add(e),this._disableStack.size==1&&(this.on("set:isEnabled",B,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),this._disableStack.size==0&&(this.off("set:isEnabled",B),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}static get isOfficialPlugin(){return!1}static get isPremiumPlugin(){return!1}}function B(n){n.return=!1,n.stop()}class pe extends v(){constructor(e){super();c(this,"editor");c(this,"_isEnabledBasedOnSelection");c(this,"_affectsData");c(this,"_disableStack");this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this._affectsData=!0,this._isEnabledBasedOnSelection=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",()=>{this.refresh()}),this.listenTo(e,"change:isReadOnly",()=>{this.refresh()}),this.on("set:isEnabled",t=>{if(!this.affectsData)return;const o=e.model.document.selection,h=!(o.getFirstPosition().root.rootName=="$graveyard")&&e.model.canEditAt(o);(e.isReadOnly||this._isEnabledBasedOnSelection&&!h)&&(t.return=!1,t.stop())},{priority:"highest"}),this.on("execute",t=>{this.isEnabled||t.stop()},{priority:"high"})}get affectsData(){return this._affectsData}set affectsData(e){this._affectsData=e}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),this._disableStack.size==1&&(this.on("set:isEnabled",W,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),this._disableStack.size==0&&(this.off("set:isEnabled",W),this.refresh())}execute(...e){}destroy(){this.stopListening()}}function W(n){n.return=!1,n.stop()}class Ue extends pe{constructor(){super(...arguments);c(this,"_childCommandsDefinitions",[])}refresh(){}execute(...e){const t=this._getFirstEnabledCommand();return!!t&&t.execute(e)}registerChildCommand(e,t={}){Z(this._childCommandsDefinitions,{command:e,priority:t.priority||"normal"}),e.on("change:isEnabled",()=>this._checkEnabled()),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const e=this._childCommandsDefinitions.find(({command:t})=>t.isEnabled);return e&&e.command}}class Y extends re(){constructor(e,t=[],o=[]){super();c(this,"_context");c(this,"_plugins",new Map);c(this,"_availablePlugins");c(this,"_contextPlugins");this._context=e,this._availablePlugins=new Map;for(const a of t)a.pluginName&&this._availablePlugins.set(a.pluginName,a);this._contextPlugins=new Map;for(const[a,h]of o)this._contextPlugins.set(a,h),this._contextPlugins.set(h,a),a.pluginName&&this._availablePlugins.set(a.pluginName,a)}*[Symbol.iterator](){for(const e of this._plugins)typeof e[0]=="function"&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let o=e;throw typeof e=="function"&&(o=e.pluginName||e.name),new u("plugincollection-plugin-not-loaded",this._context,{plugin:o})}return t}has(e){return this._plugins.has(e)}init(e,t=[],o=[]){const a=this,h=this._context;b(e),p(e);const y=e.filter(s=>!C(s,t)),S=[...P(y)];I(S,o);const k=A(S);return D(k,"init").then(()=>D(k,"afterInit")).then(()=>k);function _(s){return typeof s=="function"}function O(s){return _(s)&&!!s.isContextPlugin}function C(s,d){return d.some(r=>r===s||m(s)===r||m(r)===s)}function m(s){return _(s)?s.pluginName||s.name:s}function b(s,d=new Set){s.forEach(r=>{_(r)&&(d.has(r)||(d.add(r),r.pluginName&&!a._availablePlugins.has(r.pluginName)&&a._availablePlugins.set(r.pluginName,r),r.requires&&b(r.requires,d)))})}function P(s,d=new Set){return s.map(r=>_(r)?r:a._availablePlugins.get(r)).reduce((r,l)=>d.has(l)?r:(d.add(l),l.requires&&(p(l.requires,l),P(l.requires,d).forEach(f=>r.add(f))),r.add(l)),new Set)}function p(s,d=null){s.map(r=>_(r)?r:a._availablePlugins.get(r)||r).forEach(r=>{T(r,d),N(r,d),R(r,d)})}function T(s,d){if(!_(s))throw d?new u("plugincollection-soft-required",h,{missingPlugin:s,requiredBy:m(d)}):new u("plugincollection-plugin-not-found",h,{plugin:s})}function N(s,d){if(O(d)&&!O(s))throw new u("plugincollection-context-required",h,{plugin:m(s),requiredBy:m(d)})}function R(s,d){if(d&&C(s,t))throw new u("plugincollection-required",h,{plugin:m(s),requiredBy:m(d)})}function A(s){return s.map(d=>{let r=a._contextPlugins.get(d);return r=r||new d(h),a._add(d,r),r})}function D(s,d){return s.reduce((r,l)=>!l[d]||a._contextPlugins.has(l)?r:r.then(l[d].bind(l)),Promise.resolve())}function I(s,d){for(const r of d){if(typeof r!="function")throw new u("plugincollection-replace-plugin-invalid-type",null,{pluginItem:r});const l=r.pluginName;if(!l)throw new u("plugincollection-replace-plugin-missing-name",null,{pluginItem:r});if(r.requires&&r.requires.length)throw new u("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:l});const f=a._availablePlugins.get(l);if(!f)throw new u("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:l});const w=s.indexOf(f);if(w===-1){if(a._contextPlugins.has(f))return;throw new u("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:l})}if(f.requires&&f.requires.length)throw new u("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:l});s.splice(w,1,r),a._availablePlugins.set(l,r)}}}destroy(){const e=[];for(const[,t]of this)typeof t.destroy=="function"&&!this._contextPlugins.has(t)&&e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const o=e.pluginName;if(o){if(this._plugins.has(o))throw new u("plugincollection-plugin-name-conflict",null,{pluginName:o,plugin1:this._plugins.get(o).constructor,plugin2:e});this._plugins.set(o,t)}}}class L{constructor(i){c(this,"config");c(this,"plugins");c(this,"locale");c(this,"t");c(this,"editors");c(this,"_contextOwner",null);const{translations:e,...t}=i||{};this.config=new V(t,this.constructor.defaultConfig);const o=this.constructor.builtinPlugins;this.config.define("plugins",o),this.plugins=new Y(this,o);const a=this.config.get("language")||{};this.locale=new oe({uiLanguage:typeof a=="string"?a:a.ui,contentLanguage:this.config.get("language.content"),translations:e}),this.t=this.locale.t,this.editors=new $}initPlugins(){const i=this.config.get("plugins")||[],e=this.config.get("substitutePlugins")||[];for(const t of i.concat(e)){if(typeof t!="function")throw new u("context-initplugins-constructor-only",null,{Plugin:t});if(t.isContextPlugin!==!0)throw new u("context-initplugins-invalid-plugin",null,{Plugin:t})}return this.plugins.init(i,[],e)}destroy(){return Promise.all(Array.from(this.editors,i=>i.destroy())).then(()=>this.plugins.destroy())}_addEditor(i,e){if(this._contextOwner)throw new u("context-addeditor-private-context");this.editors.add(i),e&&(this._contextOwner=i)}_removeEditor(i){return this.editors.has(i)&&this.editors.remove(i),this._contextOwner===i?this.destroy():Promise.resolve()}_getEditorConfig(){const i={};for(const e of this.config.names())["plugins","removePlugins","extraPlugins"].includes(e)||(i[e]=this.config.get(e));return i}static create(i){return new Promise(e=>{const t=new this(i);e(t.initPlugins().then(()=>t))})}}c(L,"defaultConfig"),c(L,"builtinPlugins");class we extends v(){constructor(e){super();c(this,"context");this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}static get isOfficialPlugin(){return!1}static get isPremiumPlugin(){return!1}}class be{constructor(){c(this,"_commands");this._commands=new Map}add(i,e){this._commands.set(i,e)}get(i){return this._commands.get(i)}execute(i,...e){const t=this.get(i);if(!t)throw new u("commandcollection-command-not-found",this,{commandName:i});return t.execute(...e)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const i of this.commands())i.destroy()}}class _e extends ae{constructor(e){super();c(this,"editor");this.editor=e}set(e,t,o={}){if(typeof t=="string"){const a=t;t=(h,y)=>{this.editor.execute(a),y()}}super.set(e,t,o)}}const q="contentEditing",j="common";class Ee{constructor(i){c(this,"keystrokeInfos",new Map);c(this,"_editor");this._editor=i;const e=i.config.get("menuBar.isVisible"),t=i.locale.t;this.addKeystrokeInfoCategory({id:q,label:t("Content editing keystrokes"),description:t("These keyboard shortcuts allow for quick access to content editing features.")});const o=[{label:t("Close contextual balloons, dropdowns, and dialogs"),keystroke:"Esc"},{label:t("Open the accessibility help dialog"),keystroke:"Alt+0"},{label:t("Move focus between form fields (inputs, buttons, etc.)"),keystroke:[["Tab"],["Shift+Tab"]]},{label:t("Move focus to the toolbar, navigate between toolbars"),keystroke:"Alt+F10",mayRequireFn:!0},{label:t("Navigate through the toolbar or menu bar"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]},{label:t("Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content."),keystroke:[["Enter"],["Space"]]}];e&&o.push({label:t("Move focus to the menu bar, navigate between menu bars"),keystroke:"Alt+F9",mayRequireFn:!0}),this.addKeystrokeInfoCategory({id:"navigation",label:t("User interface and content navigation keystrokes"),description:t("Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface."),groups:[{id:"common",keystrokes:o}]})}addKeystrokeInfoCategory({id:i,label:e,description:t,groups:o}){this.keystrokeInfos.set(i,{id:i,label:e,description:t,groups:new Map}),this.addKeystrokeInfoGroup({categoryId:i,id:j}),o&&o.forEach(a=>{this.addKeystrokeInfoGroup({categoryId:i,...a})})}addKeystrokeInfoGroup({categoryId:i=q,id:e,label:t,keystrokes:o}){const a=this.keystrokeInfos.get(i);if(!a)throw new u("accessibility-unknown-keystroke-info-category",this._editor,{groupId:e,categoryId:i});a.groups.set(e,{id:e,label:t,keystrokes:o||[]})}addKeystrokeInfos({categoryId:i=q,groupId:e=j,keystrokes:t}){if(!this.keystrokeInfos.has(i))throw new u("accessibility-unknown-keystroke-info-category",this._editor,{categoryId:i,keystrokes:t});const o=this.keystrokeInfos.get(i);if(!o.groups.has(e))throw new u("accessibility-unknown-keystroke-info-group",this._editor,{groupId:e,categoryId:i,keystrokes:t});o.groups.get(e).keystrokes.push(...t)}}function ke(n){return{sessionId:Oe(),pageSessionId:Ce(),hostname:window.location.hostname,version:globalThis.CKEDITOR_VERSION,type:Pe(n),plugins:xe(n.plugins),distribution:ve(),env:Se(),integration:Object.create(null),menuBar:{isVisible:!!n.config.get("menuBar.isVisible")},language:{ui:n.locale.uiLanguage,content:n.locale.contentLanguage},toolbar:{main:M(n.config.get("toolbar")),block:M(n.config.get("blockToolbar")),balloon:M(n.config.get("balloonToolbar"))}}}function Pe(n){return Object.getPrototypeOf(n).constructor.editorName}function xe(n){return Array.from(n).filter(([i])=>!!i.pluginName).map(([i])=>{const{pluginName:e,isContextPlugin:t,isOfficialPlugin:o,isPremiumPlugin:a}=i;return{isContext:!!t,isOfficial:!!o,isPremium:!!a,name:e}})}function M(n){if(!n)return;const i=Array.isArray(n)?{items:n}:n,e=a(i.items||[]);return{isMultiline:e.includes("-"),shouldNotGroupWhenFull:!!i.shouldNotGroupWhenFull,items:o(e)};function o(h){return h.filter(y=>y!=="|"&&y!=="-")}function a(h){return h.flatMap(y=>typeof y=="string"?[y]:a(y.items))}}function ve(){return{channel:window[Symbol.for("cke distribution")]||"sh"}}function Se(){let n="unknown",i="unknown";return E.isMac?n="mac":E.isWindows?n="windows":E.isiOS?n="ios":E.isAndroid&&(n="android"),E.isGecko?i="gecko":E.isBlink?i="blink":E.isSafari&&(i="safari"),{os:n,browser:i}}function Oe(){return localStorage.getItem("__ckeditor-session-id")||localStorage.setItem("__ckeditor-session-id",U()),localStorage.getItem("__ckeditor-session-id")}function Ce(){return K.window.CKEDITOR_PAGE_SESSION_ID=K.window.CKEDITOR_PAGE_SESSION_ID||U(),K.window.CKEDITOR_PAGE_SESSION_ID}class x extends v(){constructor(e={}){super();c(this,"accessibility");c(this,"commands");c(this,"config");c(this,"conversion");c(this,"data");c(this,"editing");c(this,"locale");c(this,"model");c(this,"plugins");c(this,"keystrokes");c(this,"t");c(this,"_context");c(this,"_readOnlyLocks");if("sanitizeHtml"in e)throw new u("editor-config-sanitizehtml-not-supported");const t=this.constructor,{translations:o,...a}=t.defaultConfig||{},{translations:h=o,...y}=e,S=e.language||a.language;this._context=e.context||new L({language:S,translations:h}),this._context._addEditor(this,!e.context);const k=Array.from(t.builtinPlugins||[]);this.config=new V(y,a),this.config.define("plugins",k),this.config.define(this._context._getEditorConfig()),O(this.config),this.plugins=new Y(this,k,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new be,this.set("state","initializing"),this.once("ready",()=>this.state="ready",{priority:"high"}),this.once("destroy",()=>this.state="destroyed",{priority:"high"}),this.model=new le,this.on("change:isReadOnly",()=>{this.model.document.isReadOnly=this.isReadOnly});const _=new ue;this.data=new ce(this.model,_),this.editing=new de(this.model,_),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new he([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new _e(this),this.keystrokes.listenTo(this.editing.view.document),this.accessibility=new Ee(this),C(this);function O(m){let b=m.get("licenseKey");if(!b&&window.CKEDITOR_GLOBAL_LICENSE_KEY&&(b=window.CKEDITOR_GLOBAL_LICENSE_KEY,m.set("licenseKey",b)),!b)throw new u("license-key-missing")}function C(m){const b=m.config.get("licenseKey"),P=window[Symbol.for("cke distribution")]||"sh";function p(l){m.enableReadOnlyMode(Symbol("invalidLicense")),m._showLicenseError(l)}function T(l){const f=l.split(".");return f.length!=3?null:f[1]}function N(l){return["exp","jti","vc"].every(w=>w in l)}function R(l){return Object.getOwnPropertyNames(l).sort().filter(g=>g!="vc"&&l[g]!=null).map(g=>l[g])}function A(l){const{hostname:f}=new URL(window.location.href);if(l.includes(f))return!0;const w=f.split(".");return l.filter(g=>g.includes("*")).map(g=>g.split(".")).filter(g=>g.length<=w.length).map(g=>Array(w.length-g.length).fill(g[0]==="*"?"*":"").concat(g)).some(g=>w.every((J,F)=>g[F]===J||g[F]==="*"))}function D(l){const f=l[0].toUpperCase()+l.slice(1),w=l==="evaluation"?"an":"a";console.info(`%cCKEditor 5 ${f} License`,"color: #ffffff; background: #743CCD; font-size: 14px; padding: 4px 8px; border-radius: 4px;"),console.warn(`⚠️ You are using ${w} ${l} license of CKEditor 5${l==="trial"?" which is for evaluation purposes only":""}. For production usage, please obtain a production license at https://portal.ckeditor.com/`)}if(b=="GPL"){P=="cloud"&&p("distributionChannel");return}const I=T(b);if(!I){p("invalid");return}const s=ee(I);if(!s){p("invalid");return}if(!N(s)){p("invalid");return}if(s.distributionChannel&&!te(s.distributionChannel).includes(P)){p("distributionChannel");return}if(ie(R(s))!=s.vc.toLowerCase()){p("invalid");return}if(new Date(s.exp*1e3)<ne){p("expired");return}const r=s.licensedHosts;if(r&&r.length>0&&!A(r)){p("domainLimit");return}if(["evaluation","trial"].includes(s.licenseType)&&s.exp*1e3<Date.now()){p("expired");return}if(["development","evaluation","trial"].includes(s.licenseType)){const{licenseType:l}=s;window.CKEDITOR_WARNING_SUPPRESSIONS=window.CKEDITOR_WARNING_SUPPRESSIONS||{},window.CKEDITOR_WARNING_SUPPRESSIONS[l]||(D(l),window.CKEDITOR_WARNING_SUPPRESSIONS[l]=!0)}if(["evaluation","trial"].includes(s.licenseType)){const l=s.licenseType,f=setTimeout(()=>{p(`${l}Limit`)},6e5);m.on("destroy",()=>{clearTimeout(f)})}s.usageEndpoint&&m.once("ready",()=>{const l={requestId:U(),requestTime:Math.round(Date.now()/1e3),license:b,editor:De(m)};m._sendUsageRequest(s.usageEndpoint,l).then(f=>{const{status:w,message:g}=f;g&&console.warn(g),w!="ok"&&p("usageLimit")},()=>{se("license-key-validation-endpoint-not-reachable",{url:s.usageEndpoint})})},{priority:"high"})}}static get editorName(){return"Editor"}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new u("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if(typeof e!="string"&&typeof e!="symbol")throw new u("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),this._readOnlyLocks.size===1&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if(typeof e!="string"&&typeof e!="symbol")throw new u("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),this._readOnlyLocks.size===0&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}setData(e){this.data.set(e)}getData(e){return this.data.get(e)}initPlugins(){const e=this.config,t=e.get("plugins"),o=e.get("removePlugins")||[],a=e.get("extraPlugins")||[],h=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(a),o,h)}destroy(){let e=Promise.resolve();return this.state=="initializing"&&(e=new Promise(t=>this.once("ready",t))),e.then(()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()}).then(()=>this.plugins.destroy()).then(()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()}).then(()=>this._context._removeEditor(this))}execute(e,...t){try{return this.commands.execute(e,...t)}catch(o){/* istanbul ignore next -- @preserve */u.rethrowUnexpectedError(o,this)}}focus(){this.editing.view.focus()}static create(...e){throw new Error("This is an abstract method.")}_showLicenseError(e,t){setTimeout(()=>{if(e=="invalid")throw new u("invalid-license-key");if(e=="expired")throw new u("license-key-expired");if(e=="domainLimit")throw new u("license-key-domain-limit");if(e=="featureNotAllowed")throw new u("license-key-plugin-not-allowed",null,{pluginName:t});if(e=="evaluationLimit")throw new u("license-key-evaluation-limit");if(e=="trialLimit")throw new u("license-key-trial-limit");if(e=="developmentLimit")throw new u("license-key-development-limit");if(e=="usageLimit")throw new u("license-key-usage-limit");if(e=="distributionChannel")throw new u("license-key-invalid-distribution-channel")},0),this._showLicenseError=()=>{}}async _sendUsageRequest(e,t){const o=new Headers({"Content-Type":"application/json"}),a=await fetch(new URL(e),{method:"POST",headers:o,body:JSON.stringify(t)});if(!a.ok)throw new Error(`HTTP Response: ${a.status}`);return a.json()}}c(x,"defaultConfig"),c(x,"builtinPlugins"),c(x,"Context",L),c(x,"EditorWatchdog",fe),c(x,"ContextWatchdog",ge);function De(n){const i=ke(n);function e(t,o){if(me(i,t)!==void 0)throw new u("editor-usage-data-path-already-set",{path:t});ye(i,t,o)}return n.fire("collectUsageData",{setUsageData:e}),i}function Fe(n){if(!z(n.updateSourceElement))throw new u("attachtoform-missing-elementapi-interface",n);const i=n.sourceElement;if(Ie(i)&&i.form){let e;const t=i.form,o=()=>n.updateSourceElement();z(t.submit)&&(e=t.submit,t.submit=()=>{o(),e.apply(t)}),t.addEventListener("submit",o),n.on("destroy",()=>{t.removeEventListener("submit",o),e&&(t.submit=e)})}}function Ie(n){return!!n&&n.tagName.toLowerCase()==="textarea"}function H(n){class i extends n{constructor(){super(...arguments);c(this,"sourceElement")}updateSourceElement(o){if(!this.sourceElement)throw new u("editor-missing-sourceelement",this);const a=this.config.get("updateSourceElementOnDestroy"),h=this.sourceElement instanceof HTMLTextAreaElement;if(!a&&!h){G(this.sourceElement,"");return}const y=typeof o=="string"?o:this.data.get();G(this.sourceElement,y)}}return i}H.updateSourceElement=H(Object).prototype.updateSourceElement;class Ge extends we{constructor(){super(...arguments);c(this,"_actions")}static get pluginName(){return"PendingActions"}static get isOfficialPlugin(){return!0}init(){this.set("hasAny",!1),this._actions=new $({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if(typeof e!="string")throw new u("pendingactions-add-invalid-message",this);const t=new(v());return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}export{pe as Command,L as Context,we as ContextPlugin,x as Editor,H as ElementApiMixin,Ue as MultiCommand,Ge as PendingActions,Me as Plugin,Fe as attachToForm};
@@ -1,4 +1,4 @@
1
- var m=Object.defineProperty;var p=(s,r,t)=>r in s?m(s,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[r]=t;var a=(s,r,t)=>p(s,typeof r!="symbol"?r+"":r,t);import{BoxedEditorUIView as b,StickyPanelView as y,ToolbarView as v,MenuBarView as P,InlineEditableUIView as k,EditorUI as T,normalizeToolbarConfig as V,DialogView as f}from"../../../../../@ckeditor_ckeditor5-ui@45.2.0/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{enablePlaceholder as C}from"../../../../../@ckeditor_ckeditor5-engine@45.2.0/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{CKEditorError as B,getDataFromElement as E,ElementReplacer as S,Rect as h}from"../../../../../@ckeditor_ckeditor5-utils@45.2.0/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{ElementApiMixin as _,attachToForm as R,Editor as x}from"../../../../../@ckeditor_ckeditor5-core@45.2.0/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{isElement as F}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isElement.js";/**
1
+ var m=Object.defineProperty;var p=(s,r,t)=>r in s?m(s,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[r]=t;var a=(s,r,t)=>p(s,typeof r!="symbol"?r+"":r,t);import{BoxedEditorUIView as b,StickyPanelView as y,ToolbarView as v,MenuBarView as P,InlineEditableUIView as k,EditorUI as T,normalizeToolbarConfig as V,DialogView as f}from"../../../../../@ckeditor_ckeditor5-ui@45.2.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js";import{enablePlaceholder as C}from"../../../../../@ckeditor_ckeditor5-engine@45.2.1/node_modules/@ckeditor/ckeditor5-engine/dist/index.js";import{CKEditorError as B,getDataFromElement as E,ElementReplacer as S,Rect as h}from"../../../../../@ckeditor_ckeditor5-utils@45.2.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js";import{ElementApiMixin as _,attachToForm as R,Editor as x}from"../../../../../@ckeditor_ckeditor5-core@45.2.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js";import{isElement as F}from"../../../../../es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isElement.js";/**
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */class I extends T{constructor(t,i){super(t);a(this,"view");a(this,"_toolbarConfig");a(this,"_elementReplacer");this.view=i,this._toolbarConfig=V(t.config.get("toolbar")),this._elementReplacer=new S,this.listenTo(t.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(t){const i=this.editor,o=this.view,n=i.editing.view,e=o.editable,l=n.document.getRoot();e.name=l.rootName,o.render();const c=e.element;this.setEditableElement(e.name,c),o.editable.bind("isFocused").to(this.focusTracker),n.attachDomRoot(c),t&&this._elementReplacer.replace(t,this.element),this._initPlaceholder(),this._initToolbar(),o.menuBarView&&this.initMenuBar(o.menuBarView),this._initDialogPluginIntegration(),this._initContextualBalloonIntegration(),this.fire("ready")}destroy(){super.destroy();const t=this.view,i=this.editor.editing.view;this._elementReplacer.restore(),i.getDomRoot(t.editable.name)&&i.detachDomRoot(t.editable.name),t.destroy()}_initToolbar(){const t=this.view;t.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),t.stickyPanel.limiterElement=t.element,t.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",({visualTop:i})=>i||0),t.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(t.toolbar)}_initPlaceholder(){const t=this.editor,i=t.editing.view,o=i.document.getRoot(),n=t.sourceElement;let e;const l=t.config.get("placeholder");l&&(e=typeof l=="string"?l:l[this.view.editable.name]),!e&&n&&n.tagName.toLowerCase()==="textarea"&&(e=n.getAttribute("placeholder")),e&&(o.placeholder=e),C({view:i,element:o,isDirectHost:!1,keepOnFocus:!0})}_initContextualBalloonIntegration(){if(!this.editor.plugins.has("ContextualBalloon"))return;const{stickyPanel:t}=this.view,i=this.editor.plugins.get("ContextualBalloon");i.on("getPositionOptions",n=>{const e=n.return;if(!e||!t.isSticky||!t.element)return;const l=new h(t.element).height,c=typeof e.target=="function"?e.target():e.target,u=typeof e.limiter=="function"?e.limiter():e.limiter;if(c&&u&&new h(c).height>=new h(u).height-l)return;const g={...e.viewportOffsetConfig},w=(g.top||0)+l;n.return={...e,viewportOffsetConfig:{...g,top:w}}},{priority:"low"});const o=()=>{i.visibleView&&i.updatePosition()};this.listenTo(t,"change:isSticky",o),this.listenTo(this.editor.ui,"change:viewportOffset",o)}_handleScrollToTheSelectionWithStickyPanel(t,i,o){const n=this.view.stickyPanel;if(n.isSticky){const e=new h(n.element).height;i.viewportOffset.top+=e}else{const e=()=>{this.editor.editing.view.scrollToTheSelection(o)};this.listenTo(n,"change:isSticky",e),setTimeout(()=>{this.stopListening(n,"change:isSticky",e)},20)}}_initDialogPluginIntegration(){if(!this.editor.plugins.has("Dialog"))return;const t=this.view.stickyPanel,i=this.editor.plugins.get("Dialog");i.on("show",()=>{const o=i.view;o.on("moveTo",(n,e)=>{if(!t.isSticky||o.wasMoved||o.isModal)return;const l=new h(t.contentPanelElement);e[1]<l.bottom+f.defaultOffset&&(e[1]=l.bottom+f.defaultOffset)},{priority:"high"})},{priority:"low"})}}class D extends b{constructor(t,i,o={}){super(t);a(this,"stickyPanel");a(this,"toolbar");a(this,"editable");this.stickyPanel=new y(t),this.toolbar=new v(t,{shouldGroupWhenFull:o.shouldToolbarGroupWhenFull}),o.useMenuBar&&(this.menuBarView=new P(t)),this.editable=new k(t,i,void 0,{label:o.label})}render(){super.render(),this.menuBarView?this.stickyPanel.content.addMany([this.menuBarView,this.toolbar]):this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class H extends _(x){constructor(t,i={}){if(!d(t)&&i.initialData!==void 0)throw new B("editor-create-initial-data",null);super(i);a(this,"ui");this.config.define("menuBar.isVisible",!1),this.config.get("initialData")===void 0&&this.config.set("initialData",M(t)),d(t)&&(this.sourceElement=t),this.model.document.createRoot();const o=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=this.config.get("menuBar"),e=new D(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:o,useMenuBar:n.isVisible,label:this.config.get("label")});this.ui=new I(this,e),R(this)}static get editorName(){return"ClassicEditor"}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(t,i={}){return new Promise(o=>{const n=new this(t,i);o(n.initPlugins().then(()=>n.ui.init(d(t)?t:null)).then(()=>n.data.init(n.config.get("initialData"))).then(()=>n.fire("ready")).then(()=>n))})}}function M(s){return d(s)?E(s):s}function d(s){return F(s)}export{H as ClassicEditor,D as ClassicEditorUIView};