diff --git a/.dockerignore b/.dockerignore
index abe0a0be0be1..6898dda39abb 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -10,6 +10,7 @@
.*ignore
*.md
*.log
+config/database.yml
docker/prod/Dockerfile
docker/ci/Dockerfile
Guardfile
diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml
new file mode 100644
index 000000000000..0405fd47f940
--- /dev/null
+++ b/.github/workflows/version-check.yml
@@ -0,0 +1,47 @@
+name: Check work package version
+
+on:
+ pull_request:
+ types: [labeled, synchronize]
+
+permissions:
+ contents: read # to fetch code (actions/checkout)
+ pull-requests: write # to comment on the PR
+
+jobs:
+ check-pr:
+ if: contains(github.event.pull_request.labels.*.name, 'needs review')
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+
+ - name: Verify linked version matches core version
+ id: version-check
+ run: ./script/ci/version_check.sh "${{ github.event.pull_request.body }}"
+
+ - name: Add comment if versions differ
+ if: steps.version-check.outputs.version_mismatch == 'true'
+ uses: marocchino/sticky-pull-request-comment@v2
+ with:
+ header: version-mismatch-comment
+ message: |
+ The provided work package version does not match the core version:
+
+ - Work package URL: ${{ steps.version-check.outputs.wp_url }}
+ - Work package version: ${{steps.version-check.outputs.wp_version}}
+ - Core version: ${{steps.version-check.outputs.core_version}}
+
+ Please make sure that:
+
+ - The work package version OR your pull request target branch is correct
+ - name: Version check passed
+ if: steps.version-check.outputs.version_mismatch != 'true'
+ uses: marocchino/sticky-pull-request-comment@v2
+ with:
+ header: version-mismatch-comment
+ delete: true
diff --git a/Gemfile b/Gemfile
index 1803a99150aa..bc3b64e7ea6c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -61,7 +61,7 @@ gem "friendly_id", "~> 5.5.0"
gem "acts_as_list", "~> 1.2.0"
gem "acts_as_tree", "~> 2.9.0"
-gem "awesome_nested_set", "~> 3.6.0"
+gem "awesome_nested_set", "~> 3.7.0"
gem "closure_tree", "~> 7.4.0"
gem "rubytree", "~> 2.1.0"
# Only used in down migrations now.
@@ -158,7 +158,7 @@ gem "structured_warnings", "~> 0.4.0"
gem "airbrake", "~> 13.0.0", require: false
gem "markly", "~> 0.10" # another markdown parser like commonmarker, but with AST support used in PDF export
-gem "md_to_pdf", git: "https://github.com/opf/md-to-pdf", ref: "32603f09a249999a00e8ca23eb17215b46a26c0f"
+gem "md_to_pdf", git: "https://github.com/opf/md-to-pdf", ref: "fe05b4f8bae8fd46f4fa93b8e0adee6295ef7388"
gem "prawn", "~> 2.4"
gem "ttfunk", "~> 1.7.0" # remove after https://github.com/prawnpdf/prawn/issues/1346 resolved.
@@ -225,7 +225,7 @@ gem "view_component"
gem "lookbook", "~> 2.3.0"
# Require factory_bot for usage with openproject plugins testing
-gem "factory_bot", "~> 6.4.0", require: false
+gem "factory_bot", "~> 6.5.0", require: false
# require factory_bot_rails for convenience in core development
gem "factory_bot_rails", "~> 6.4.0", require: false
@@ -247,7 +247,7 @@ group :test do
gem "rack_session_access"
gem "rspec", "~> 3.13.0"
# also add to development group, so 'spec' rake task gets loaded
- gem "rspec-rails", "~> 6.1.0", group: :development
+ gem "rspec-rails", "~> 7.0.0", group: :development
# Retry failures within the same environment
gem "retriable", "~> 3.1.1"
@@ -272,6 +272,7 @@ group :test do
gem "capybara_accessible_selectors", git: "https://github.com/citizensadvice/capybara_accessible_selectors", branch: "main"
gem "capybara-screenshot", "~> 1.0.17"
gem "cuprite", "~> 0.15.0"
+ gem "rspec-wait"
gem "selenium-devtools"
gem "selenium-webdriver", "~> 4.20"
@@ -348,7 +349,7 @@ group :development, :test do
gem "erblint-github", require: false
# Brakeman scanner
- gem "brakeman", "~> 6.1.0"
+ gem "brakeman", "~> 6.2.0"
# i18n-tasks helps find and manage missing and unused translations.
gem "i18n-tasks", "~> 1.0.13", require: false
@@ -398,4 +399,4 @@ end
gem "openproject-octicons", "~>19.18.0"
gem "openproject-octicons_helper", "~>19.18.0"
-gem "openproject-primer_view_components", "~>0.43.1"
+gem "openproject-primer_view_components", "~>0.47.0"
diff --git a/Gemfile.lock b/Gemfile.lock
index 52fe7ca18b01..67827b4a54cc 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -8,10 +8,10 @@ GIT
GIT
remote: https://github.com/opf/md-to-pdf
- revision: 32603f09a249999a00e8ca23eb17215b46a26c0f
- ref: 32603f09a249999a00e8ca23eb17215b46a26c0f
+ revision: fe05b4f8bae8fd46f4fa93b8e0adee6295ef7388
+ ref: fe05b4f8bae8fd46f4fa93b8e0adee6295ef7388
specs:
- md_to_pdf (0.1.1)
+ md_to_pdf (0.1.2)
color_conversion (~> 0.1)
front_matter_parser (~> 1.0)
json-schema (~> 4.3)
@@ -338,27 +338,27 @@ GEM
attr_required (1.0.2)
auto_strip_attributes (2.6.0)
activerecord (>= 4.0)
- awesome_nested_set (3.6.0)
- activerecord (>= 4.0.0, < 7.2)
+ awesome_nested_set (3.7.0)
+ activerecord (>= 4.0.0, < 8.0)
awrence (1.2.1)
aws-eventstream (1.3.0)
- aws-partitions (1.968.0)
- aws-sdk-core (3.202.0)
+ aws-partitions (1.977.0)
+ aws-sdk-core (3.208.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
- aws-sdk-kms (1.88.0)
- aws-sdk-core (~> 3, >= 3.201.0)
+ aws-sdk-kms (1.91.0)
+ aws-sdk-core (~> 3, >= 3.205.0)
aws-sigv4 (~> 1.5)
- aws-sdk-s3 (1.159.0)
- aws-sdk-core (~> 3, >= 3.201.0)
+ aws-sdk-s3 (1.163.0)
+ aws-sdk-core (~> 3, >= 3.205.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sdk-sns (1.82.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sigv4 (~> 1.5)
- aws-sigv4 (1.9.1)
+ aws-sigv4 (1.10.0)
aws-eventstream (~> 1, >= 1.0.2)
axe-core-api (4.10.0)
dumb_delegator
@@ -384,7 +384,7 @@ GEM
bindata (2.5.0)
bootsnap (1.18.4)
msgpack (~> 1.2)
- brakeman (6.1.2)
+ brakeman (6.2.1)
racc
browser (6.0.0)
builder (3.3.0)
@@ -462,9 +462,9 @@ GEM
representable (>= 3.1.1, < 4)
doorkeeper (5.7.1)
railties (>= 5)
- dotenv (3.1.2)
- dotenv-rails (3.1.2)
- dotenv (= 3.1.2)
+ dotenv (3.1.4)
+ dotenv-rails (3.1.4)
+ dotenv (= 3.1.4)
railties (>= 6.1)
drb (2.2.1)
dry-auto_inject (1.0.1)
@@ -540,7 +540,7 @@ GEM
eventmachine (1.2.7)
eventmachine_httpserver (0.2.1)
excon (0.111.0)
- factory_bot (6.4.6)
+ factory_bot (6.5.0)
activesupport (>= 5.0.0)
factory_bot_rails (6.4.3)
factory_bot (~> 6.4)
@@ -560,7 +560,8 @@ GEM
websocket-driver (~> 0.7)
ffi (1.17.0)
flamegraph (0.9.5)
- fog-aws (3.24.0)
+ fog-aws (3.27.0)
+ base64 (~> 0.2.0)
fog-core (~> 2.1)
fog-json (~> 1.1)
fog-xml (~> 0.1)
@@ -633,7 +634,7 @@ GEM
hashdiff (1.1.1)
hashery (2.1.2)
hashie (3.6.0)
- highline (3.1.0)
+ highline (3.1.1)
reline
html-pipeline (2.14.3)
activesupport (>= 2)
@@ -646,7 +647,7 @@ GEM
httpclient (2.8.3)
httpx (1.3.1)
http-2 (>= 1.0.0)
- i18n (1.14.5)
+ i18n (1.14.6)
concurrent-ruby (~> 1.0)
i18n-js (4.2.3)
glob (>= 0.4.0)
@@ -661,8 +662,9 @@ GEM
rails-i18n
rainbow (>= 2.2.2, < 4.0)
terminal-table (>= 1.5.1)
- icalendar (2.10.2)
+ icalendar (2.10.3)
ice_cube (~> 0.16)
+ ostruct
ice_cube (0.17.0)
ice_nine (0.11.2)
interception (0.5)
@@ -698,7 +700,7 @@ GEM
launchy (3.0.1)
addressable (~> 2.8)
childprocess (~> 5.0)
- lefthook (1.7.14)
+ lefthook (1.7.16)
letter_opener (1.10.0)
launchy (>= 2.2, < 4)
letter_opener_web (3.0.0)
@@ -713,7 +715,7 @@ GEM
omniauth (~> 1.1)
omniauth-openid-connect (>= 0.2.1)
rails (>= 3.2.21)
- logger (1.6.0)
+ logger (1.6.1)
lograge (0.14.0)
actionpack (>= 4)
activesupport (>= 4)
@@ -748,7 +750,7 @@ GEM
method_source (1.1.0)
mime-types (3.5.2)
mime-types-data (~> 3.2015)
- mime-types-data (3.2024.0806)
+ mime-types-data (3.2024.0903)
mini_magick (5.0.1)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
@@ -776,7 +778,7 @@ GEM
nokogiri (1.16.7)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
- oj (3.16.5)
+ oj (3.16.6)
bigdecimal (>= 3.0)
ostruct (>= 0.2)
okcomputer (1.18.5)
@@ -802,7 +804,7 @@ GEM
actionview
openproject-octicons (= 19.18.0)
railties
- openproject-primer_view_components (0.43.1)
+ openproject-primer_view_components (0.47.0)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
openproject-octicons (>= 19.17.0)
@@ -820,9 +822,9 @@ GEM
activerecord (>= 6.1)
request_store (~> 1.4)
parallel (1.26.3)
- parallel_tests (4.7.1)
+ parallel_tests (4.7.2)
parallel
- parser (3.3.4.2)
+ parser (3.3.5.0)
ast (~> 2.4.1)
racc
pdf-core (0.9.0)
@@ -834,7 +836,7 @@ GEM
hashery (~> 2.0)
ruby-rc4
ttfunk
- pg (1.5.7)
+ pg (1.5.8)
plaintext (0.3.4)
activesupport (> 2.2.1)
nokogiri (~> 1.10, >= 1.10.4)
@@ -944,7 +946,7 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
- rb_sys (0.9.100)
+ rb_sys (0.9.102)
rbtrace (0.5.1)
ffi (>= 1.0.6)
msgpack (>= 0.4.3)
@@ -959,7 +961,7 @@ GEM
redis-client (0.22.2)
connection_pool
regexp_parser (2.9.2)
- reline (0.5.9)
+ reline (0.5.10)
io-console (~> 0.5)
representable (3.2.0)
declarative (< 0.1.0)
@@ -971,8 +973,7 @@ GEM
actionpack (>= 5.2)
railties (>= 5.2)
retriable (3.1.2)
- rexml (3.3.6)
- strscan
+ rexml (3.3.7)
rinku (2.0.6)
roar (1.2.0)
representable (~> 3.1)
@@ -982,18 +983,18 @@ GEM
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
- rspec-core (3.13.0)
+ rspec-core (3.13.1)
rspec-support (~> 3.13.0)
- rspec-expectations (3.13.1)
+ rspec-expectations (3.13.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
- rspec-rails (6.1.4)
- actionpack (>= 6.1)
- activesupport (>= 6.1)
- railties (>= 6.1)
+ rspec-rails (7.0.1)
+ actionpack (>= 7.0)
+ activesupport (>= 7.0)
+ railties (>= 7.0)
rspec-core (~> 3.13)
rspec-expectations (~> 3.13)
rspec-mocks (~> 3.13)
@@ -1001,18 +1002,19 @@ GEM
rspec-retry (0.6.2)
rspec-core (> 3.3)
rspec-support (3.13.1)
- rubocop (1.65.1)
+ rspec-wait (1.0.1)
+ rspec (>= 3.4)
+ rubocop (1.66.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
- rexml (>= 3.2.5, < 4.0)
- rubocop-ast (>= 1.31.1, < 2.0)
+ rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
- rubocop-ast (1.32.1)
+ rubocop-ast (1.32.3)
parser (>= 3.3.1.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
@@ -1020,15 +1022,15 @@ GEM
rubocop (~> 1.61)
rubocop-openproject (0.1.0)
rubocop
- rubocop-performance (1.21.1)
+ rubocop-performance (1.22.0)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
- rubocop-rails (2.26.0)
+ rubocop-rails (2.26.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.52.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
- rubocop-rspec (3.0.4)
+ rubocop-rspec (3.0.5)
rubocop (~> 1.61)
rubocop-rspec_rails (2.30.0)
rubocop (~> 1.61)
@@ -1054,9 +1056,9 @@ GEM
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
secure_headers (6.5.0)
- selenium-devtools (0.127.0)
+ selenium-devtools (0.129.0)
selenium-webdriver (~> 4.2)
- selenium-webdriver (4.23.0)
+ selenium-webdriver (4.25.0)
base64 (~> 0.2)
logger (~> 1.4)
rexml (~> 3.2, >= 3.2.5)
@@ -1081,7 +1083,7 @@ GEM
spring (>= 0.9.1)
spring-commands-rubocop (0.4.0)
spring (>= 1.0)
- sprockets (3.7.3)
+ sprockets (3.7.4)
base64
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
@@ -1091,11 +1093,10 @@ GEM
sprockets (>= 3.0.0)
ssrf_filter (1.0.8)
stackprof (0.2.26)
- store_attribute (1.2.0)
- activerecord (>= 6.0)
+ store_attribute (1.3.1)
+ activerecord (>= 6.1)
stringex (2.8.6)
stringio (3.1.1)
- strscan (3.1.0)
structured_warnings (0.4.0)
svg-graph (2.2.2)
swd (2.0.3)
@@ -1108,9 +1109,9 @@ GEM
table_print (1.5.7)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
- test-prof (1.4.1)
+ test-prof (1.4.2)
text-hyphen (1.5.0)
- thor (1.3.1)
+ thor (1.3.2)
thread_safe (0.3.6)
timecop (0.9.10)
timeout (0.4.1)
@@ -1120,9 +1121,8 @@ GEM
openssl-signature_algorithm (~> 1.0)
trailblazer-option (0.1.2)
ttfunk (1.7.0)
- turbo-rails (2.0.6)
+ turbo-rails (2.0.10)
actionpack (>= 6.0.0)
- activejob (>= 6.0.0)
railties (>= 6.0.0)
turbo_power (0.6.2)
turbo-rails (>= 1.3.0)
@@ -1130,11 +1130,11 @@ GEM
rails (>= 5.0.4)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
- tzinfo-data (1.2024.1)
+ tzinfo-data (1.2024.2)
tzinfo (>= 1.0.0)
uber (0.1.0)
- unicode-display_width (2.5.0)
- uri (0.13.0)
+ unicode-display_width (2.6.0)
+ uri (0.13.1)
validate_email (0.1.6)
activemodel (>= 3.0)
mail (>= 2.2.5)
@@ -1172,7 +1172,7 @@ GEM
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
- webrick (1.8.1)
+ webrick (1.8.2)
websocket (1.2.11)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
@@ -1183,8 +1183,8 @@ GEM
zeitwerk (>= 2.6)
xpath (3.2.0)
nokogiri (~> 1.8)
- yard (0.9.36)
- zeitwerk (2.6.17)
+ yard (0.9.37)
+ zeitwerk (2.6.18)
PLATFORMS
ruby
@@ -1201,13 +1201,13 @@ DEPENDENCIES
airbrake (~> 13.0.0)
appsignal (~> 3.10.0)
auto_strip_attributes (~> 2.5)
- awesome_nested_set (~> 3.6.0)
+ awesome_nested_set (~> 3.7.0)
aws-sdk-core (~> 3.107)
aws-sdk-s3 (~> 1.91)
axe-core-rspec
bcrypt (~> 3.1.6)
bootsnap (~> 1.18.0)
- brakeman (~> 6.1.0)
+ brakeman (~> 6.2.0)
browser (~> 6.0.0)
budgets!
capybara (~> 3.40.0)
@@ -1241,7 +1241,7 @@ DEPENDENCIES
erb_lint
erblint-github
escape_utils (~> 1.3)
- factory_bot (~> 6.4.0)
+ factory_bot (~> 6.5.0)
factory_bot_rails (~> 6.4.0)
ffi (~> 1.15)
flamegraph
@@ -1303,7 +1303,7 @@ DEPENDENCIES
openproject-octicons (~> 19.18.0)
openproject-octicons_helper (~> 19.18.0)
openproject-openid_connect!
- openproject-primer_view_components (~> 0.43.1)
+ openproject-primer_view_components (~> 0.47.0)
openproject-recaptcha!
openproject-reporting!
openproject-storages!
@@ -1347,8 +1347,9 @@ DEPENDENCIES
roar (~> 1.2.0)
rouge (~> 4.3.0)
rspec (~> 3.13.0)
- rspec-rails (~> 6.1.0)
+ rspec-rails (~> 7.0.0)
rspec-retry (~> 0.6.1)
+ rspec-wait
rubocop
rubocop-capybara
rubocop-factory_bot
diff --git a/app/components/_index.sass b/app/components/_index.sass
index bf0cfde03645..d20f0a29e398 100644
--- a/app/components/_index.sass
+++ b/app/components/_index.sass
@@ -8,3 +8,4 @@
@import "filter/filters_component"
@import "projects/row_component"
@import "op_primer/border_box_table_component"
+@import "work_packages/exports/modal_dialog_component"
diff --git a/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_form_component.html.erb b/app/components/admin/custom_fields/custom_field_projects/new_custom_field_projects_form_modal_component.html.erb
similarity index 84%
rename from app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_form_component.html.erb
rename to app/components/admin/custom_fields/custom_field_projects/new_custom_field_projects_form_modal_component.html.erb
index 9cfde7303893..a7596230ea1c 100644
--- a/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_form_component.html.erb
+++ b/app/components/admin/custom_fields/custom_field_projects/new_custom_field_projects_form_modal_component.html.erb
@@ -30,20 +30,20 @@ See COPYRIGHT and LICENSE files for more details.
<%=
component_wrapper do
primer_form_with(
- class: "op-new-project-mapping-form",
- model: @project_mapping,
- url: link_admin_settings_project_custom_field_path(@project_custom_field),
+ model: ,
+ url:,
data: { turbo: true },
method: :post
) do |form|
concat(render(Primer::Alpha::Dialog::Body.new(
- id: DIALOG_BODY_ID, test_selector: DIALOG_BODY_ID, aria: { label: title },
+ id: dialog_body_id, test_selector: dialog_body_id, aria: { label: title },
style: "min-height: 300px"
)) do
- render(Projects::CustomFields::CustomFieldMappingForm.new(form, project_mapping: @project_mapping))
+ render(Projects::CustomFields::CustomFieldMappingForm.new(form, project_mapping: @custom_field_project_mapping))
end)
+
concat(render(Primer::Alpha::Dialog::Footer.new(show_divider: false)) do
- concat(render(Primer::ButtonComponent.new(data: { 'close-dialog-id': DIALOG_ID })) { cancel_button_text })
+ concat(render(Primer::ButtonComponent.new(data: { 'close-dialog-id': dialog_id })) { cancel_button_text })
concat(render(Primer::ButtonComponent.new(scheme: :primary, type: :submit)) { submit_button_text })
end)
end
diff --git a/app/contracts/oauth/application_contract.rb b/app/components/admin/custom_fields/custom_field_projects/new_custom_field_projects_form_modal_component.rb
similarity index 54%
rename from app/contracts/oauth/application_contract.rb
rename to app/components/admin/custom_fields/custom_field_projects/new_custom_field_projects_form_modal_component.rb
index 46caf0890f8c..647e2fec7ac5 100644
--- a/app/contracts/oauth/application_contract.rb
+++ b/app/components/admin/custom_fields/custom_field_projects/new_custom_field_projects_form_modal_component.rb
@@ -26,39 +26,44 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-module OAuth
- class ApplicationContract < ::ModelContract
- def self.model
- ::Doorkeeper::Application
- end
+module Admin
+ module CustomFields
+ module CustomFieldProjects
+ class NewCustomFieldProjectsFormModalComponent < ApplicationComponent
+ include OpTurbo::Streamable
- validate :validate_client_credential_user
- validate :validate_integration
+ DIALOG_ID = "new-custom-field-projects-modal".freeze
+ DIALOG_BODY_ID = "new-custom-field-projects-modal-body".freeze
- attribute :name
- attribute :redirect_uri
- attribute :confidential
- attribute :owner_id
- attribute :owner_type
- attribute :scopes
- attribute :client_credentials_user_id
- attribute :integration_id
- attribute :integration_type
+ def initialize(custom_field_project_mapping:, custom_field:, **)
+ @custom_field_project_mapping = custom_field_project_mapping
+ @custom_field = custom_field
- private
+ super(@custom_field_project_mapping, **)
+ end
- def validate_integration
- if (model.integration_id.nil? && model.integration_type.present?) ||
- (model.integration_id.present? && model.integration_type.nil?)
- errors.add :integration, :invalid
- end
- end
+ private
+
+ def url
+ url_helpers.custom_field_projects_path(@custom_field)
+ end
+
+ def dialog_id = DIALOG_ID
+ def dialog_body_id = DIALOG_BODY_ID
+
+ attr_reader :custom_field_project_mapping, :custom_field
+
+ def title
+ I18n.t(:label_add_projects)
+ end
- def validate_client_credential_user
- return if model.client_credentials_user_id.blank?
+ def cancel_button_text
+ I18n.t("button_cancel")
+ end
- unless User.exists?(id: model.client_credentials_user_id)
- errors.add :client_credentials_user_id, :invalid
+ def submit_button_text
+ I18n.t("button_add")
+ end
end
end
end
diff --git a/app/components/admin/custom_fields/custom_field_projects/new_custom_field_projects_modal_component.html.erb b/app/components/admin/custom_fields/custom_field_projects/new_custom_field_projects_modal_component.html.erb
new file mode 100644
index 000000000000..346ef80311d3
--- /dev/null
+++ b/app/components/admin/custom_fields/custom_field_projects/new_custom_field_projects_modal_component.html.erb
@@ -0,0 +1,18 @@
+<%=
+ render(
+ Primer::Alpha::Dialog.new(
+ id: dialog_id,
+ title:,
+ test_selector: dialog_id,
+ size: :large
+ )
+ ) do |dialog|
+ dialog.with_header(
+ show_divider: false,
+ visually_hide_title: false,
+ variant: :large
+ )
+
+ render(form_modal_component)
+ end
+%>
diff --git a/app/services/oauth/persist_application_service.rb b/app/components/admin/custom_fields/custom_field_projects/new_custom_field_projects_modal_component.rb
similarity index 55%
rename from app/services/oauth/persist_application_service.rb
rename to app/components/admin/custom_fields/custom_field_projects/new_custom_field_projects_modal_component.rb
index a33abd8eab60..e264b251323e 100644
--- a/app/services/oauth/persist_application_service.rb
+++ b/app/components/admin/custom_fields/custom_field_projects/new_custom_field_projects_modal_component.rb
@@ -26,40 +26,38 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-module OAuth
- class PersistApplicationService
- include Contracted
+module Admin
+ module CustomFields
+ module CustomFieldProjects
+ class NewCustomFieldProjectsModalComponent < ApplicationComponent
+ include OpTurbo::Streamable
- attr_reader :application, :current_user
+ def initialize(custom_field_project_mapping:, custom_field:, **)
+ @custom_field_project_mapping = custom_field_project_mapping
+ @custom_field = custom_field
+ super(@custom_field_project_mapping, **)
+ end
- def initialize(model, user:)
- @application = model
- @current_user = user
+ def render?
+ !custom_field.is_for_all?
+ end
- self.contract_class = OAuth::ApplicationContract
- end
-
- def call(attributes)
- set_defaults
- application.attributes = attributes
- set_secret_and_id
+ private
- result, errors = validate_and_save(application, current_user)
- ServiceResult.new success: result, errors:, result: application
- end
+ attr_reader :custom_field_project_mapping, :custom_field
- def set_defaults
- return if application.owner_id
+ def dialog_id = NewCustomFieldProjectsFormModalComponent::DIALOG_ID
+ def dialog_body_id = NewCustomFieldProjectsFormModalComponent::DIALOG_BODY_ID
- application.owner = current_user
- application.owner_type = "User"
- end
+ def title
+ I18n.t(:label_add_projects)
+ end
- def set_secret_and_id
- application.extend(OpenProject::ChangedBySystem)
- application.change_by_system do
- application.renew_secret if application.secret.blank?
- application.uid = Doorkeeper::OAuth::Helpers::UniqueToken.generate if application.uid.blank?
+ def form_modal_component
+ Admin::CustomFields::CustomFieldProjects::NewCustomFieldProjectsFormModalComponent.new(
+ custom_field_project_mapping:, custom_field:
+ )
+ end
end
end
end
diff --git a/app/components/settings/project_custom_fields/project_custom_field_mapping/row_component.html.erb b/app/components/admin/custom_fields/custom_field_projects/row_component.html.erb
similarity index 100%
rename from app/components/settings/project_custom_fields/project_custom_field_mapping/row_component.html.erb
rename to app/components/admin/custom_fields/custom_field_projects/row_component.html.erb
diff --git a/app/components/admin/custom_fields/custom_field_projects/row_component.rb b/app/components/admin/custom_fields/custom_field_projects/row_component.rb
new file mode 100644
index 000000000000..51ce950bbac0
--- /dev/null
+++ b/app/components/admin/custom_fields/custom_field_projects/row_component.rb
@@ -0,0 +1,68 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module Admin
+ module CustomFields
+ module CustomFieldProjects
+ class RowComponent < Projects::RowComponent
+ include OpTurbo::Streamable
+
+ def wrapper_uniq_by
+ "project-#{project.id}"
+ end
+
+ def more_menu_items
+ @more_menu_items ||= [more_menu_detach_project].compact
+ end
+
+ private
+
+ def more_menu_detach_project
+ if User.current.allowed_in_project?(:select_custom_fields, project)
+ {
+ scheme: :default,
+ icon: nil,
+ label: I18n.t("projects.settings.project_custom_fields.actions.remove_from_project"),
+ href: detach_from_project_url,
+ data: { turbo_method: :delete }
+ }
+ end
+ end
+
+ def detach_from_project_url
+ url_helpers.custom_field_project_path(
+ custom_field_id: @table.params[:custom_field].id,
+ custom_fields_project: { project_id: project.id }
+ )
+ end
+
+ def project = model.first
+ end
+ end
+ end
+end
diff --git a/app/components/oauth/applications/table_component.rb b/app/components/admin/custom_fields/custom_field_projects/table_component.rb
similarity index 50%
rename from app/components/oauth/applications/table_component.rb
rename to app/components/admin/custom_fields/custom_field_projects/table_component.rb
index 267f82c23ff2..9ef7650dab1a 100644
--- a/app/components/oauth/applications/table_component.rb
+++ b/app/components/admin/custom_fields/custom_field_projects/table_component.rb
@@ -1,5 +1,3 @@
-# frozen_string_literal: true
-
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
@@ -28,48 +26,36 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-module OAuth
- module Applications
- class TableComponent < ::TableComponent
- class << self
- def row_class
- ::OAuth::Applications::RowComponent
- end
- end
-
- def initial_sort
- %i[id asc]
- end
-
- def sortable?
- false
- end
+module Admin
+ module CustomFields
+ module CustomFieldProjects
+ class TableComponent < Projects::TableComponent
+ include OpTurbo::Streamable
- def columns
- headers.map(&:first)
- end
-
- def inline_create_link
- link_to new_oauth_application_path,
- aria: { label: t("oauth.application.new") },
- class: "wp-inline-create--add-link",
- title: t("oauth.application.new") do
- helpers.op_icon("icon icon-add")
+ def columns
+ @columns ||= query.selects.reject { |select| select.is_a?(Queries::Selects::NotExistingSelect) }
end
- end
- def empty_row_message
- I18n.t :no_results_title_text
- end
+ def sortable?
+ false
+ end
- def headers
- [
- ["name", { caption: ::Doorkeeper::Application.human_attribute_name(:name) }],
- ["owner", { caption: ::Doorkeeper::Application.human_attribute_name(:owner) }],
- ["client_credentials", { caption: I18n.t("oauth.client_credentials") }],
- ["redirect_uri", { caption: ::Doorkeeper::Application.human_attribute_name(:redirect_uri) }],
- ["confidential", { caption: ::Doorkeeper::Application.human_attribute_name(:confidential) }]
- ]
+ # @override optional_pagination_options are passed to the pagination_options
+ # which are passed to #pagination_links_full in pagination_helper.rb
+ #
+ # In Turbo streamable components, we need to be able to specify the url_for(action:) so that links are
+ # generated in the context of the component index action, instead of any turbo stream actions performing
+ # partial updates on the page.
+ #
+ # params[:url_for_action] is passed to the pagination_options making it's way down to any pagination links
+ # that are generated via link_to which calls url_for which uses the params[:url_for_action] to specify
+ # the controller action that link_to should use.
+ #
+ def optional_pagination_options
+ return super unless params[:url_for_action]
+
+ super.merge(params: { action: params[:url_for_action] })
+ end
end
end
end
diff --git a/app/components/admin/custom_fields/edit_form_header_component.html.erb b/app/components/admin/custom_fields/edit_form_header_component.html.erb
new file mode 100644
index 000000000000..140535ca0d47
--- /dev/null
+++ b/app/components/admin/custom_fields/edit_form_header_component.html.erb
@@ -0,0 +1,52 @@
+<%#-- copyright
+OpenProject is an open source project management software.
+Copyright (C) the OpenProject GmbH
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License version 3.
+
+OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+Copyright (C) 2006-2013 Jean-Philippe Lang
+Copyright (C) 2010-2013 the ChiliProject Team
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+See COPYRIGHT and LICENSE files for more details.
+
+++#%>
+
+<%=
+ render(Primer::OpenProject::PageHeader.new(test_selector: "custom-fields--page-header")) do |header|
+ header.with_title { @custom_field.name }
+
+ header.with_breadcrumbs(breadcrumbs_items)
+
+ header.with_tab_nav(label: nil, test_selector: :custom_field_detail_header) do |tab_nav|
+ tab_nav.with_tab(
+ selected: tab_selected?(:edit),
+ href: edit_custom_field_path(@custom_field)
+ ) do |tab|
+ tab.with_text { t(:label_details) }
+ end
+
+ tab_nav.with_tab(
+ selected: tab_selected?(:custom_field_projects),
+ href: custom_field_projects_path(@custom_field)
+ ) do |tab|
+ tab.with_text { t(:label_project_plural) }
+ end
+ end
+ end
+%>
diff --git a/app/components/admin/custom_fields/edit_form_header_component.rb b/app/components/admin/custom_fields/edit_form_header_component.rb
new file mode 100644
index 000000000000..c64d79dc8c5c
--- /dev/null
+++ b/app/components/admin/custom_fields/edit_form_header_component.rb
@@ -0,0 +1,57 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module Admin
+ module CustomFields
+ class EditFormHeaderComponent < ApplicationComponent
+ TAB_NAVS = %i[
+ edit
+ custom_field_projects
+ ].freeze
+
+ def initialize(custom_field:, selected:, **)
+ @custom_field = custom_field
+ @selected = selected
+ super(custom_field, **)
+ end
+
+ def tab_selected?(tab_name)
+ TAB_NAVS.include?(tab_name) && tab_name == @selected
+ end
+
+ private
+
+ def breadcrumbs_items
+ [{ href: admin_index_path, text: t(:label_administration) },
+ { href: custom_fields_path, text: t(:label_custom_field_plural) },
+ { href: custom_fields_path(tab: @custom_field.type), text: I18n.t(@custom_field.type_name) },
+ @custom_field.name]
+ end
+ end
+ end
+end
diff --git a/app/components/admin/design_header_component.html.erb b/app/components/admin/design_header_component.html.erb
new file mode 100644
index 000000000000..7f2a4ba6c52b
--- /dev/null
+++ b/app/components/admin/design_header_component.html.erb
@@ -0,0 +1,48 @@
+<%#-- copyright
+OpenProject is an open source project management software.
+Copyright (C) the OpenProject GmbH
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License version 3.
+
+OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+Copyright (C) 2006-2013 Jean-Philippe Lang
+Copyright (C) 2010-2013 the ChiliProject Team
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+See COPYRIGHT and LICENSE files for more details.
+
+++#%>
+
+<% helpers.html_title t(:label_administration), t(:label_custom_style), selected_tab(@tabs)[:label] %>
+<%=
+ render(Primer::OpenProject::PageHeader.new) do |header|
+ header.with_title { t(:label_custom_style) }
+ header.with_breadcrumbs([{ href: admin_index_path, text: t(:label_administration) },
+ t(:label_custom_style)])
+ header.with_description { t(:label_custom_style_description) }
+
+ if @tabs.present?
+ header.with_tab_nav(label: nil) do |tab_nav|
+ @tabs.each do |tab|
+ tab_nav.with_tab(selected: selected_tab(@tabs) == tab, href: tab[:path]) do |t|
+ t.with_text { tab[:label] }
+ end
+ end
+ end
+ end
+ end
+%>
diff --git a/app/components/admin/design_header_component.rb b/app/components/admin/design_header_component.rb
new file mode 100644
index 000000000000..169560b9b5d6
--- /dev/null
+++ b/app/components/admin/design_header_component.rb
@@ -0,0 +1,42 @@
+# frozen_string_literal: true
+
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module Admin
+ class DesignHeaderComponent < ApplicationComponent
+ include OpPrimer::ComponentHelpers
+ include ApplicationHelper
+ include TabsHelper
+
+ def initialize(tabs: [])
+ super
+ @tabs = tabs
+ end
+ end
+end
diff --git a/app/components/my/access_token/access_token_created_dialog_component.html.erb b/app/components/my/access_token/access_token_created_dialog_component.html.erb
index bdc7c01fa5d0..cd773f77eda9 100644
--- a/app/components/my/access_token/access_token_created_dialog_component.html.erb
+++ b/app/components/my/access_token/access_token_created_dialog_component.html.erb
@@ -28,23 +28,17 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<%=
- render(Primer::Alpha::Dialog.new(
+ render(Primer::OpenProject::FeedbackDialog.new(
id:,
title: nil,
size: :large
)) do |dialog|
- dialog.with_body do
+ dialog.with_feedback_message do |message|
+ message.with_heading(tag: :h2) { I18n.t("my.access_token.create_dialog.header", type: "API") }
+ end
+
+ dialog.with_additional_content do
flex_layout do |flex|
- flex.with_row(mb: 3) do
- render(Primer::Beta::Heading.new(tag: :h1, text_align: :center)) do
- render(Primer::Beta::Octicon.new(icon: :"check-circle", color: :success, size: :medium))
- end
- end
- flex.with_row(mb: 1) do
- render(Primer::Beta::Heading.new(tag: :h2, color: :default, text_align: :center)) do
- I18n.t("my.access_token.create_dialog.header", type: "API")
- end
- end
flex.with_row(mb: 2) do
render(Primer::OpenProject::InputGroup.new) do |input_group|
input_group.with_text_input(name: :openproject_api_access_token,
@@ -65,12 +59,5 @@ See COPYRIGHT and LICENSE files for more details.
end
end
end
- dialog.with_footer do
- component_collection do |footer|
- footer.with_component(Primer::ButtonComponent.new(data: { 'close-dialog-id': id })) do
- I18n.t("button_close")
- end
- end
- end
end
%>
diff --git a/app/components/oauth/applications/application_row_component.html.erb b/app/components/oauth/applications/application_row_component.html.erb
new file mode 100644
index 000000000000..0a7e9787336a
--- /dev/null
+++ b/app/components/oauth/applications/application_row_component.html.erb
@@ -0,0 +1,43 @@
+<%=
+ component_wrapper(data: { 'test-selector': "op-admin-oauth--application" }) do
+ flex_layout(align_items: :center, justify_content: :space_between) do |oauth_application_container|
+ oauth_application_container.with_column(flex_layout: true) do |application_information|
+ application_information.with_column(mr: 2) do
+ render(Primer::Beta::Link.new(href: oauth_application_path(@application), font_weight: :bold)) do
+ @application.name
+ end
+ end
+
+ application_information.with_column(mr: 2) do
+ render(Primer::Beta::Text.new(font_size: :small, color: :subtle)) do
+ if @application.builtin?
+ t("oauth.application.builtin")
+ else
+ t(:label_created_by, user: @application.owner)
+ end
+ end
+ end
+
+ unless @application.builtin?
+ application_information.with_column do
+ render(Primer::Beta::Label.new) do
+ @application.confidential? ? t("oauth.application.confidential") : t("oauth.application.non_confidential")
+ end
+ end
+ end
+ end
+
+ # Actions
+ oauth_application_container.with_column do
+ render(Primer::Alpha::ToggleSwitch.new(
+ src: toggle_oauth_application_path(@application),
+ csrf_token: form_authenticity_token,
+ checked: @application.enabled?,
+ data: {
+ 'test-selector': "op-admin-oauth--application-enabled-toggle-switch"
+ }
+ ))
+ end
+ end
+ end
+%>
diff --git a/app/components/oauth/applications/application_row_component.rb b/app/components/oauth/applications/application_row_component.rb
new file mode 100644
index 000000000000..8ee4387de717
--- /dev/null
+++ b/app/components/oauth/applications/application_row_component.rb
@@ -0,0 +1,43 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module OAuth
+ module Applications
+ class ApplicationRowComponent < ApplicationComponent
+ include ApplicationHelper
+ include OpPrimer::ComponentHelpers
+ include OpTurbo::Streamable
+
+ def initialize(application:)
+ @application = application
+
+ super
+ end
+ end
+ end
+end
diff --git a/app/components/oauth/applications/index_component.html.erb b/app/components/oauth/applications/index_component.html.erb
new file mode 100644
index 000000000000..e5f0d0b4beed
--- /dev/null
+++ b/app/components/oauth/applications/index_component.html.erb
@@ -0,0 +1,55 @@
+<%=
+ component_wrapper do
+ flex_layout do |index_container|
+ if OpenProject::FeatureDecisions.built_in_oauth_applications_active?
+ index_container.with_row do
+ render(border_box_container(mb: 4, data: {
+ 'test-selector': "op-admin-oauth--built-in-applications"
+ })) do |component|
+ component.with_header(font_weight: :bold) do
+ render(Primer::Beta::Text.new) do
+ t("oauth.header.builtin_applications")
+ end
+ end
+
+ if @built_in_applications.empty?
+ component.with_row do
+ render(Primer::Beta::Text.new(data: {
+ 'test-selector': "op-admin-oauth--built-in-applications-placeholder"
+ })) do
+ t("oauth.empty_application_lists")
+ end
+ end
+ end
+
+ @built_in_applications.each do |application|
+ component.with_row { render(OAuth::Applications::ApplicationRowComponent.new(application:)) }
+ end
+ end
+ end
+ end
+
+ index_container.with_row do
+ render(border_box_container(mb: 4)) do |component|
+ component.with_header(font_weight: :bold) do
+ render(Primer::Beta::Text.new) do
+ t("oauth.header.other_applications")
+ end
+ end
+
+ if @other_applications.empty?
+ component.with_row do
+ render(Primer::Beta::Text.new(data: { 'test-selector': "op-admin-oauth--applications-placeholder" })) do
+ t("oauth.empty_application_lists")
+ end
+ end
+ end
+
+ @other_applications.each do |application|
+ component.with_row { render(OAuth::Applications::ApplicationRowComponent.new(application:)) }
+ end
+ end
+ end
+ end
+ end
+%>
diff --git a/app/components/oauth/applications/index_component.rb b/app/components/oauth/applications/index_component.rb
new file mode 100644
index 000000000000..81027eea51f3
--- /dev/null
+++ b/app/components/oauth/applications/index_component.rb
@@ -0,0 +1,44 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module OAuth
+ module Applications
+ class IndexComponent < ApplicationComponent
+ include ApplicationHelper
+ include OpPrimer::ComponentHelpers
+ include OpTurbo::Streamable
+
+ def initialize(oauth_applications:)
+ @built_in_applications = oauth_applications.select(&:builtin?)
+ @other_applications = oauth_applications.reject(&:builtin?)
+
+ super
+ end
+ end
+ end
+end
diff --git a/app/components/oauth/show_page_header_component.html.erb b/app/components/oauth/show_page_header_component.html.erb
index d340f870abcb..8bb3d06627e8 100644
--- a/app/components/oauth/show_page_header_component.html.erb
+++ b/app/components/oauth/show_page_header_component.html.erb
@@ -32,31 +32,33 @@ See COPYRIGHT and LICENSE files for more details.
header.with_title { h(@application.name) }
header.with_breadcrumbs(breadcrumb_items)
- header.with_action_button(tag: :a,
- mobile_icon: :pencil,
- mobile_label: t(:button_edit),
- size: :medium,
- href: edit_oauth_application_path(@application),
- aria: { label: I18n.t(:button_edit) },
- title: I18n.t(:button_edit)) do |button|
- button.with_leading_visual_icon(icon: :pencil)
- t(:button_edit)
- end
+ unless @application.builtin?
+ header.with_action_button(tag: :a,
+ mobile_icon: :pencil,
+ mobile_label: t(:button_edit),
+ size: :medium,
+ href: edit_oauth_application_path(@application),
+ aria: { label: I18n.t(:button_edit) },
+ title: I18n.t(:button_edit)) do |button|
+ button.with_leading_visual_icon(icon: :pencil)
+ t(:button_edit)
+ end
- header.with_action_button(tag: :a,
- scheme: :danger,
- mobile_icon: :trash,
- mobile_label: t(:button_delete),
- size: :medium,
- href: oauth_application_path(@application),
- aria: { label: I18n.t(:button_delete) },
- data: {
- confirm: I18n.t(:text_are_you_sure),
- method: :delete
- },
- title: I18n.t(:button_delete)) do |button|
- button.with_leading_visual_icon(icon: :trash)
- t(:button_delete)
+ header.with_action_button(tag: :a,
+ scheme: :danger,
+ mobile_icon: :trash,
+ mobile_label: t(:button_delete),
+ size: :medium,
+ href: oauth_application_path(@application),
+ aria: { label: I18n.t(:button_delete) },
+ data: {
+ confirm: I18n.t(:text_are_you_sure),
+ method: :delete
+ },
+ title: I18n.t(:button_delete)) do |button|
+ button.with_leading_visual_icon(icon: :trash)
+ t(:button_delete)
+ end
end
end
%>
diff --git a/app/components/op_primer/expandable_list_component.html.erb b/app/components/op_primer/expandable_list_component.html.erb
index 87153c2d77af..0b4cdf1a6729 100644
--- a/app/components/op_primer/expandable_list_component.html.erb
+++ b/app/components/op_primer/expandable_list_component.html.erb
@@ -2,7 +2,7 @@
component_wrapper(data: wrapper_data_attributes) do
if elements.count == 0
render(Primer::Beta::Text.new(color: :subtle)) { t("label_meeting_no_participants") }
- elsif elements.count <= @cutoff_limit
+ elsif @cutoff_limit.nil? || elements.count <= @cutoff_limit
flex_layout do |list|
elements.each do |item|
list.with_row(mt: 1) { item.to_s }
@@ -13,26 +13,26 @@
elements.take(@cutoff_limit).each do |item|
list.with_row(mt: 1) { item.to_s }
end
-
- list.with_row do
- flex_layout do |flex|
- flex.with_row(display: :none, data: { 'expandable-list-target': "hiddenElements" }) do
- flex_layout do |hidden_user_list|
- elements[@cutoff_limit..].each do |item|
- hidden_user_list.with_row(mt: 1) { item.to_s }
- end
- end
+ list.with_row(display: :none, data: { "expandable-list-target": "hiddenElements" }) do
+ flex_layout do |hidden_user_list|
+ elements[@cutoff_limit..].each do |item|
+ hidden_user_list.with_row(mt: 1) { item.to_s }
end
- flex.with_row(mt: 1) do
+ hidden_user_list.with_row(mt: 2) do
render(Primer::Beta::Button.new(
- scheme: :link,
- data: { 'expandable-list-target': "showHideButton",
- action: 'click->expandable-list#showhiddenElements keydown.enter->expandable-list#showhiddenElements'
- }
- )) { I18n.t('label_show_hide_n_items', count: elements.count - @cutoff_limit) }
+ scheme: :link,
+ data: { action: "expandable-list#hideElements" }
+ )) { I18n.t("label_show_less") }
end
end
end
+ list.with_row(mt: 2) do
+ render(Primer::Beta::Button.new(
+ scheme: :link,
+ data: { "expandable-list-target": "showButton",
+ action: "expandable-list#showElements" }
+ )) { I18n.t("label_show_more") }
+ end
end
end
end
diff --git a/modules/meeting/app/components/banner_message_component.html.erb b/app/components/op_primer/flash_component.erb
similarity index 74%
rename from modules/meeting/app/components/banner_message_component.html.erb
rename to app/components/op_primer/flash_component.erb
index 8df5a04db493..4682dfebf999 100644
--- a/modules/meeting/app/components/banner_message_component.html.erb
+++ b/app/components/op_primer/flash_component.erb
@@ -28,12 +28,11 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<%=
- render(Primer::Alpha::Banner.new(full:,
- full_when_narrow:,
- dismiss_scheme:,
- dismiss_label:,
- icon:,
- scheme:,
- test_selector:,
- )) { message.html_safe }
+ render(Primer::BaseComponent.new(
+ tag: :div,
+ classes: "op-primer-flash--item",
+ data: { unique_key: @unique_key }.compact
+ )) do
+ render_parent
+ end
%>
diff --git a/app/components/op_primer/flash_component.rb b/app/components/op_primer/flash_component.rb
new file mode 100644
index 000000000000..2c50edc45acb
--- /dev/null
+++ b/app/components/op_primer/flash_component.rb
@@ -0,0 +1,45 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module OpPrimer
+ class FlashComponent < Primer::Alpha::Banner
+ include ApplicationHelper
+ include OpTurbo::Streamable
+ include OpPrimer::ComponentHelpers
+
+ def initialize(**system_arguments)
+ @unique_key = system_arguments.delete(:unique_key)
+
+ system_arguments[:test_selector] ||= "primer-banner-message-component"
+ system_arguments[:dismiss_scheme] ||= :remove
+ system_arguments[:dismiss_label] ||= I18n.t(:button_close)
+
+ super
+ end
+ end
+end
diff --git a/app/components/op_primer/form_helpers.rb b/app/components/op_primer/form_helpers.rb
new file mode 100644
index 000000000000..fb742d2a5d4a
--- /dev/null
+++ b/app/components/op_primer/form_helpers.rb
@@ -0,0 +1,97 @@
+# frozen_string_literal: true
+
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module OpPrimer
+ module FormHelpers
+ # Renders an inline form without needing a dedicated form class.
+ #
+ # This method dynamically creates a form class based on the provided block
+ # and renders it. The form is instantiated with the provided form builder
+ # which comes from a `primer_form_with` call.
+ #
+ # It is meant to avoid boilerplate classes for simple forms.
+ #
+ # @example
+ # primer_form_with(action: :update) do |form_builder|
+ # render_inline_form(form_builder) do |form|
+ # form.text_field(
+ # name: :ultimate_answer,
+ # label: "Ultimate answer",
+ # required: true,
+ # caption: "The answer to life, the universe, and everything"
+ # )
+ # form.submit(name: :submit, label: "Submit")
+ # end
+ # end
+ #
+ # @param form_builder [Object] The form builder object to be used for the form.
+ # @param blk [Proc] A block that defines the form structure.
+ def render_inline_form(form_builder, &blk)
+ form_class = Class.new(ApplicationForm) do
+ form(&blk)
+ end
+ render(form_class.new(form_builder))
+ end
+
+ # Renders an inline settings form without needing a dedicated form class.
+ #
+ # This method dynamically creates a form class based on the provided block
+ # and renders it. The form is instantiated with the provided form builder
+ # which comes from a `primer_form_with` call, and decorated with the
+ # `settings_form` method.
+ #
+ # The settings form is providing helpers to render settings in a standard
+ # way by reading their value, rendering labels from their name, and checking
+ # if they are writable.
+ #
+ # It is meant to avoid boilerplate code.
+ #
+ # @example
+ # primer_form_with(action: :update) do |f|
+ # render_inline_settings_form(f) do |form|
+ # form.text_field(name: :attachment_max_size)
+ # form.radio_button_group(
+ # name: "work_package_done_ratio",
+ # values: WorkPackage::DONE_RATIO_OPTIONS
+ # )
+ # form.submit
+ # end
+ # end
+ #
+ # @param form_builder [Object] The form builder object to be used for the form.
+ # @param blk [Proc] A block that defines the form structure.
+ def render_inline_settings_form(form_builder, &blk)
+ form_class = Class.new(ApplicationForm) do
+ settings_form(&blk)
+ end
+ render(form_class.new(form_builder))
+ end
+ end
+end
diff --git a/app/components/open_project/common/divider_component.rb b/app/components/open_project/common/divider_component.rb
index ef672e7ad151..841af321efe0 100644
--- a/app/components/open_project/common/divider_component.rb
+++ b/app/components/open_project/common/divider_component.rb
@@ -33,8 +33,8 @@ module Common
class DividerComponent < Primer::BaseComponent
def initialize(**system_arguments)
system_arguments[:tag] = :hr
- system_arguments[:mt] = system_arguments.fetch(:mt, 4)
- system_arguments[:mb] = system_arguments.fetch(:mb, 4)
+ system_arguments[:mt] = system_arguments.fetch(:mt, 3)
+ system_arguments[:mb] = system_arguments.fetch(:mb, 3)
super(**system_arguments) # rubocop:disable Style/SuperArguments
end
end
diff --git a/app/components/projects/configure_view_modal_component.html.erb b/app/components/projects/configure_view_modal_component.html.erb
index 691908997ac1..bc7b0a84c24e 100644
--- a/app/components/projects/configure_view_modal_component.html.erb
+++ b/app/components/projects/configure_view_modal_component.html.erb
@@ -14,7 +14,7 @@
method: :get
) do |form| %>
<% helpers.projects_query_params.except(:columns, :sortBy).each do |name, value| %>
- <%= hidden_field_tag name, value %>
+ <%= hidden_field_tag name, value, data: {"sort-by-config-target" => name} %>
<% end %>
<%= render(Primer::Alpha::TabPanels.new(label: "label")) do |tab_panel| %>
<% tab_panel.with_tab(selected: true, id: "tab-selects--columns") do |tab| %>
@@ -47,6 +47,9 @@
<% end %>
<%= render(Primer::Alpha::Dialog::Footer.new) do %>
<%= render(Primer::ButtonComponent.new(data: { "close-dialog-id": MODAL_ID })) { I18n.t(:button_cancel) } %>
- <%= render(Primer::ButtonComponent.new(scheme: :primary, type: :submit, form: QUERY_FORM_ID)) { I18n.t(:button_apply) } %>
+ <%= render(Primer::ButtonComponent.new(scheme: :primary,
+ type: :submit,
+ data: { "test-selector": "#{MODAL_ID}-submit"},
+ form: QUERY_FORM_ID)) { I18n.t(:button_apply) } %>
<% end %>
<% end %>
diff --git a/app/components/projects/index_sub_header_component.html.erb b/app/components/projects/index_sub_header_component.html.erb
index b0913bbc70d6..354a7e3b152a 100644
--- a/app/components/projects/index_sub_header_component.html.erb
+++ b/app/components/projects/index_sub_header_component.html.erb
@@ -8,8 +8,6 @@
icon: :search,
size: :small
},
- input_width: :medium,
- show_clear_button: true,
clear_button_id: clear_button_id,
data: filter_input_data_attributes)
diff --git a/app/components/projects/row_component.rb b/app/components/projects/row_component.rb
index 961a9583d518..70adc2566d7d 100644
--- a/app/components/projects/row_component.rb
+++ b/app/components/projects/row_component.rb
@@ -30,6 +30,7 @@
module Projects
class RowComponent < ::RowComponent
delegate :favored_project_ids, to: :table
+ delegate :identifier, to: :project
def project
model.first
@@ -53,7 +54,7 @@ def favored
tag: :a,
tooltip_direction: :e,
href: helpers.build_favorite_path(project, format: :html),
- data: { method: currently_favored? ? :delete : :post },
+ data: { "turbo-method": currently_favored? ? :delete : :post },
classes: currently_favored? ? "op-primer--star-icon " : "op-project-row-component--favorite",
label: currently_favored? ? I18n.t(:button_unfavorite) : I18n.t(:button_favorite),
aria: { label: currently_favored? ? I18n.t(:button_unfavorite) : I18n.t(:button_favorite) },
@@ -107,6 +108,10 @@ def required_disk_space
number_to_human_size(project.required_disk_space, precision: 2)
end
+ def id
+ project.id.to_s
+ end
+
def name
content = content_tag(:i, "", class: "projects-table--hierarchy-icon")
@@ -254,7 +259,7 @@ def more_menu_favorite_item
scheme: :default,
icon: "star",
href: helpers.build_favorite_path(project, format: :html),
- data: { method: :post },
+ data: { "turbo-method": :post },
label: I18n.t(:button_favorite),
aria: { label: I18n.t(:button_favorite) }
}
@@ -268,7 +273,7 @@ def more_menu_unfavorite_item
icon: "star-fill",
size: :medium,
href: helpers.build_favorite_path(project, format: :html),
- data: { method: :delete },
+ data: { "turbo-method": :delete },
classes: "op-primer--star-icon",
label: I18n.t(:button_unfavorite),
aria: { label: I18n.t(:button_unfavorite) }
@@ -355,7 +360,8 @@ def more_menu_delete_item
scheme: :danger,
icon: :trash,
label: I18n.t(:button_delete),
- href: confirm_destroy_project_path(project)
+ href: confirm_destroy_project_path(project),
+ data: { turbo: false }
}
end
end
diff --git a/app/components/settings/project_custom_field_sections/custom_field_row_component.html.erb b/app/components/settings/project_custom_field_sections/custom_field_row_component.html.erb
index 7d87bb1dbc01..00ccbfbce0ed 100644
--- a/app/components/settings/project_custom_field_sections/custom_field_row_component.html.erb
+++ b/app/components/settings/project_custom_field_sections/custom_field_row_component.html.erb
@@ -8,7 +8,6 @@
content_container.with_column(mr: 2) do
render(Primer::Beta::Link.new(
href: edit_admin_settings_project_custom_field_path(@project_custom_field),
- scheme: :primary,
underline: false,
font_weight: :bold,
data: { turbo: "false" }
diff --git a/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_component.html.erb b/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_component.html.erb
deleted file mode 100644
index 6fe98a3cdc67..000000000000
--- a/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_component.html.erb
+++ /dev/null
@@ -1,18 +0,0 @@
-<%=
- render(
- Primer::Alpha::Dialog.new(
- id: Settings::ProjectCustomFields::ProjectCustomFieldMapping::NewProjectMappingFormComponent::DIALOG_ID,
- title:,
- test_selector: Settings::ProjectCustomFields::ProjectCustomFieldMapping::NewProjectMappingFormComponent::DIALOG_ID,
- size: :large
- )
- ) do |dialog|
- dialog.with_header(
- show_divider: false,
- visually_hide_title: false,
- variant: :large
- )
-
- render(Settings::ProjectCustomFields::ProjectCustomFieldMapping::NewProjectMappingFormComponent.new(project_mapping: @project_mapping, project_custom_field: @project_custom_field))
- end
-%>
diff --git a/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_component.rb b/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_component.rb
index 327b7a1a9363..1879fa8776b0 100644
--- a/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_component.rb
+++ b/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_component.rb
@@ -29,23 +29,18 @@
module Settings
module ProjectCustomFields
module ProjectCustomFieldMapping
- class NewProjectMappingComponent < ApplicationComponent # rubocop:disable OpenProject/AddPreviewForViewComponent
- include OpTurbo::Streamable
-
- def initialize(project_mapping:, project_custom_field:, **)
- @project_mapping = project_mapping
- @project_custom_field = project_custom_field
- super(@project_mapping, **)
- end
-
+ class NewProjectMappingComponent < Admin::CustomFields::CustomFieldProjects::NewCustomFieldProjectsModalComponent
def render?
- !@project_custom_field.required?
+ !custom_field.required?
end
private
- def title
- I18n.t(:label_add_projects)
+ def form_modal_component
+ Settings::ProjectCustomFields::ProjectCustomFieldMapping::NewProjectMappingFormComponent.new(
+ custom_field_project_mapping:,
+ custom_field:
+ )
end
end
end
diff --git a/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_form_component.rb b/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_form_component.rb
index e024bc277138..806ac8b223d5 100644
--- a/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_form_component.rb
+++ b/app/components/settings/project_custom_fields/project_custom_field_mapping/new_project_mapping_form_component.rb
@@ -29,30 +29,11 @@
module Settings
module ProjectCustomFields
module ProjectCustomFieldMapping
- class NewProjectMappingFormComponent < ApplicationComponent # rubocop:disable OpenProject/AddPreviewForViewComponent
- include OpTurbo::Streamable
-
- DIALOG_ID = "settings--new-project-custom-field-mapping-component".freeze
- DIALOG_BODY_ID = "settings--new-project-custom-field-mapping-body-component".freeze
-
- def initialize(project_mapping:, project_custom_field:)
- super
- @project_mapping = project_mapping
- @project_custom_field = project_custom_field
- end
-
+ class NewProjectMappingFormComponent < Admin::CustomFields::CustomFieldProjects::NewCustomFieldProjectsFormModalComponent
private
- def title
- I18n.t(:label_add_projects)
- end
-
- def cancel_button_text
- I18n.t("button_cancel")
- end
-
- def submit_button_text
- I18n.t("button_add")
+ def url
+ url_helpers.link_admin_settings_project_custom_field_path(@custom_field)
end
end
end
diff --git a/app/components/settings/project_custom_fields/project_custom_field_mapping/row_component.rb b/app/components/settings/project_custom_fields/project_custom_field_mapping/row_component.rb
index 0a4a86a2d3a4..f4645d2a23ff 100644
--- a/app/components/settings/project_custom_fields/project_custom_field_mapping/row_component.rb
+++ b/app/components/settings/project_custom_fields/project_custom_field_mapping/row_component.rb
@@ -29,33 +29,14 @@
module Settings
module ProjectCustomFields
module ProjectCustomFieldMapping
- class RowComponent < Projects::RowComponent
- include OpTurbo::Streamable
-
- def wrapper_uniq_by
- "project-#{project.id}"
- end
-
- def more_menu_items
- @more_menu_items ||= [more_menu_detach_project].compact
- end
-
+ class RowComponent < Admin::CustomFields::CustomFieldProjects::RowComponent
private
- def more_menu_detach_project
- project = model.first
- if User.current.admin && project.active?
- {
- scheme: :default,
- icon: nil,
- label: I18n.t("projects.settings.project_custom_fields.actions.remove_from_project"),
- href: unlink_admin_settings_project_custom_field_path(
- id: @table.params[:custom_field].id,
- project_custom_field_project_mapping: { project_id: project.id }
- ),
- data: { turbo_method: :delete }
- }
- end
+ def detach_from_project_url
+ url_helpers.unlink_admin_settings_project_custom_field_path(
+ id: @table.params[:custom_field].id,
+ project_custom_field_project_mapping: { project_id: project.id }
+ )
end
end
end
diff --git a/app/components/settings/project_custom_fields/project_custom_field_mapping/table_component.rb b/app/components/settings/project_custom_fields/project_custom_field_mapping/table_component.rb
index 0d62babb1d3b..b63ca837dbcf 100644
--- a/app/components/settings/project_custom_fields/project_custom_field_mapping/table_component.rb
+++ b/app/components/settings/project_custom_fields/project_custom_field_mapping/table_component.rb
@@ -29,33 +29,7 @@
module Settings
module ProjectCustomFields
module ProjectCustomFieldMapping
- class TableComponent < Projects::TableComponent # rubocop:disable OpenProject/AddPreviewForViewComponent
- include OpTurbo::Streamable
-
- def columns
- @columns ||= query.selects.reject { |select| select.is_a?(Queries::Selects::NotExistingSelect) }
- end
-
- def sortable?
- false
- end
-
- # @override optional_pagination_options are passed to the pagination_options
- # which are passed to #pagination_links_full in pagination_helper.rb
- #
- # In Turbo streamable components, we need to be able to specify the url_for(action:) so that links are
- # generated in the context of the component index action, instead of any turbo stream actions performing
- # partial updates on the page.
- #
- # params[:url_for_action] is passed to the pagination_options making it's way down to any pagination links
- # that are generated via link_to which calls url_for which uses the params[:url_for_action] to specify
- # the controller action that link_to should use.
- #
- def optional_pagination_options
- return super unless params[:url_for_action]
-
- super.merge(params: { action: params[:url_for_action] })
- end
+ class TableComponent < Admin::CustomFields::CustomFieldProjects::TableComponent
end
end
end
diff --git a/app/components/shares/project_queries/upsale_component.html.erb b/app/components/shares/project_queries/upsale_component.html.erb
index fe555d91b290..0568cec7557f 100644
--- a/app/components/shares/project_queries/upsale_component.html.erb
+++ b/app/components/shares/project_queries/upsale_component.html.erb
@@ -1,7 +1,6 @@
<%=
modal_content.with_row(data: { 'test-selector': 'op-share-dialog-upsale-block' }) do
- render Primer::Beta::Blankslate.new(border: true) do |component|
- component.with_visual_icon(icon: :'op-enterprise-addons', classes: 'upsale-colored')
+ render Primer::OpenProject::FeedbackMessage.new(icon_arguments: { icon: :"op-enterprise-addons", classes: "upsale-colored" }, border: true) do |component|
component.with_heading(tag: :h2, classes: 'upsale-colored').with_content(I18n.t(:label_enterprise_addon))
component.with_description { I18n.t('sharing.project_queries.upsale.message') }
diff --git a/app/components/shares/work_packages/modal_upsale_component.html.erb b/app/components/shares/work_packages/modal_upsale_component.html.erb
index 2d5f3269a0d7..d1c89c491a12 100644
--- a/app/components/shares/work_packages/modal_upsale_component.html.erb
+++ b/app/components/shares/work_packages/modal_upsale_component.html.erb
@@ -1,7 +1,6 @@
<%=
component_wrapper(tag: 'turbo-frame') do
- render Primer::Beta::Blankslate.new(border: true) do |component|
- component.with_visual_icon(icon: :'op-enterprise-addons', classes: 'upsale-colored')
+ render Primer::OpenProject::FeedbackMessage.new(icon_arguments: { icon: :"op-enterprise-addons", classes: "upsale-colored" }, border: true) do |component|
component.with_heading(tag: :h2, classes: 'upsale-colored').with_content(I18n.t(:label_enterprise_addon))
component.with_description { I18n.t('mail.sharing.work_packages.enterprise_text') }
diff --git a/app/components/types/edit_page_header_component.rb b/app/components/types/edit_page_header_component.rb
index 950c93203bfd..ad254afd81b1 100644
--- a/app/components/types/edit_page_header_component.rb
+++ b/app/components/types/edit_page_header_component.rb
@@ -42,7 +42,7 @@ def initialize(type:, tabs: nil)
def breadcrumb_items
[{ href: admin_index_path, text: t("label_administration") },
- { href: admin_settings_work_package_tracking_path, text: t(:label_work_package_plural) },
+ { href: admin_settings_work_packages_general_path, text: t(:label_work_package_plural) },
{ href: types_path, text: t(:label_type_plural) },
@type.name]
end
diff --git a/app/components/work_packages/exports/modal_dialog_component.rb b/app/components/work_packages/exports/modal_dialog_component.rb
index f01f9b5ca593..0707cb75ca62 100644
--- a/app/components/work_packages/exports/modal_dialog_component.rb
+++ b/app/components/work_packages/exports/modal_dialog_component.rb
@@ -47,7 +47,13 @@ def initialize(query:, project:, title:)
end
def export_format_url(format)
- @project.nil? ? index_work_packages_path(format:) : project_work_packages_path(project, format:)
+ if @project.nil?
+ index_work_packages_path(format:)
+ elsif @query.id.present?
+ project_work_packages_path(project, query_id: @query.id, format:)
+ else
+ project_work_packages_path(project, format:)
+ end
end
def export_formats_settings
diff --git a/app/components/work_packages/exports/modal_dialog_component.sass b/app/components/work_packages/exports/modal_dialog_component.sass
new file mode 100644
index 000000000000..f0c0f350355e
--- /dev/null
+++ b/app/components/work_packages/exports/modal_dialog_component.sass
@@ -0,0 +1,3 @@
+#op-work-packages-export-dialog
+ .op-draggable-autocomplete--selected
+ padding-bottom: 0
diff --git a/app/components/work_packages/exports/pdf/report/export_settings_component.html.erb b/app/components/work_packages/exports/pdf/report/export_settings_component.html.erb
index 95e026d32eda..831c9fed9001 100644
--- a/app/components/work_packages/exports/pdf/report/export_settings_component.html.erb
+++ b/app/components/work_packages/exports/pdf/report/export_settings_component.html.erb
@@ -8,7 +8,7 @@
) %>
<% end %>
<% container.with_row do |_columns| %>
- <%= render OpenProject::Common::DividerComponent.new(mt: 2) %>
+ <%= render OpenProject::Common::DividerComponent.new %>
<%= helpers.angular_component_tag "opce-draggable-autocompleter",
inputs: {
id: "ltf-select-export-pdf-report",
@@ -27,7 +27,7 @@
%>
<% end %>
<%= container.with_row do |_pdf_report_images| %>
- <%= render OpenProject::Common::DividerComponent.new(mt: 2) %>
+ <%= render OpenProject::Common::DividerComponent.new %>
<%= render(Primer::Alpha::CheckBox.new(name: 'show_images',
checked: true,
value: "true",
diff --git a/app/components/work_packages/exports/xls/export_settings_component.html.erb b/app/components/work_packages/exports/xls/export_settings_component.html.erb
index 7909c0191895..802b8fc6e676 100644
--- a/app/components/work_packages/exports/xls/export_settings_component.html.erb
+++ b/app/components/work_packages/exports/xls/export_settings_component.html.erb
@@ -7,7 +7,7 @@
) %>
<% end %>
<%= container.with_row do |_xls_include_relations| %>
- <%= render OpenProject::Common::DividerComponent.new(mt: 2) %>
+ <%= render OpenProject::Common::DividerComponent.new %>
<%= render(Primer::Alpha::CheckBox.new(
id: "show_relations_xls",
name: "show_relations",
diff --git a/app/components/work_packages/progress/status_based/modal_body_component.html.erb b/app/components/work_packages/progress/status_based/modal_body_component.html.erb
index d1a61701022f..602e7a4f1493 100644
--- a/app/components/work_packages/progress/status_based/modal_body_component.html.erb
+++ b/app/components/work_packages/progress/status_based/modal_body_component.html.erb
@@ -6,27 +6,16 @@
id: "progress-form",
html: { autocomplete: "off" },
data: { "application-target": "dynamic",
- "work-packages--progress--preview-progress-target": "form",
- controller: "work-packages--progress--focus-field " \
- "work-packages--progress--preview-progress " \
- "work-packages--progress--touched-field-marker" }
+ "work-packages--progress--preview-target": "form",
+ controller: "work-packages--progress--preview" }
) do |f| %>
<%= flex_layout do |modal_body| %>
<% modal_body.with_row(classes: "FormControl-horizontalGroup--sm-vertical") do |_fields| %>
- <% if OpenProject::FeatureDecisions.percent_complete_edition_active? %>
<%= render(WorkPackages::ProgressForm.new(f,
work_package:,
mode:,
focused_field:,
touched_field_map:)) %>
- <% else %>
- <%# This condition branch to be removed in 15.0 with :percent_complete_edition feature flag removal %>
- <%= render(WorkPackages::Pre144ProgressForm.new(f,
- work_package:,
- mode:,
- focused_field:,
- touched_field_map:)) %>
- <% end %>
<% end %>
<% modal_body.with_row(mt: 3) do |_tooltip| %>
diff --git a/app/components/work_packages/progress/work_based/modal_body_component.html.erb b/app/components/work_packages/progress/work_based/modal_body_component.html.erb
index d29236da0e9e..d2b0549278ab 100644
--- a/app/components/work_packages/progress/work_based/modal_body_component.html.erb
+++ b/app/components/work_packages/progress/work_based/modal_body_component.html.erb
@@ -6,45 +6,16 @@
id: "progress-form",
html: { autocomplete: "off" },
data: { "application-target": "dynamic",
- "work-packages--progress--preview-progress-target": "form",
- controller: "work-packages--progress--focus-field " \
- "work-packages--progress--preview-progress " \
- "work-packages--progress--touched-field-marker" }
+ "work-packages--progress--preview-target": "form",
+ controller: "work-packages--progress--preview" }
) do |f| %>
<%= flex_layout do |modal_body| %>
<% modal_body.with_row(classes: "FormControl-horizontalGroup--sm-vertical") do |_fields| %>
- <% if OpenProject::FeatureDecisions.percent_complete_edition_active? %>
<%= render(WorkPackages::ProgressForm.new(f,
work_package:,
mode:,
focused_field:,
touched_field_map:)) %>
- <% else %>
- <%# This condition branch to be removed in 15.0 with :percent_complete_edition feature flag removal %>
- <%= render(WorkPackages::Pre144ProgressForm.new(f,
- work_package:,
- mode:,
- focused_field:,
- touched_field_map:)) %>
- <% end %>
- <% end %>
-
- <% if !OpenProject::FeatureDecisions.percent_complete_edition_active? %>
- <%# This condition branch to be removed in 15.0 with :percent_complete_edition feature flag removal %>
- <% if should_display_migration_warning? %>
- <% modal_body.with_row(mt: 3) do |_migration_warning| %>
- <%= render(Primer::Alpha::Banner.new) { t("work_package.progress.modal.migration_warning_text") } %>
- <% end %>
- <% end %>
- <% end %>
-
- <%# This condition branch to be removed in 15.0 with :percent_complete_edition feature flag removal %>
- <% unless OpenProject::FeatureDecisions.percent_complete_edition_active? %>
- <% modal_body.with_row(mt: 3) do |_tooltip| %>
- <%= render(Primer::Beta::Text.new(font_weight: :semibold)) { t("work_package.progress.label_note") } %>
- <%= render(Primer::Beta::Text.new) { t("work_package.progress.modal.work_based_help_text_pre_14_4_without_percent_complete_edition") } %>
- <%= render(Primer::Beta::Link.new(href: learn_more_href)) { t(:label_learn_more) } %>
- <% end %>
<% end %>
<% modal_body.with_row(mt: 3) do |_actions_row| %>
diff --git a/app/components/work_packages/progress/work_based/modal_body_component.rb b/app/components/work_packages/progress/work_based/modal_body_component.rb
index 668b4613d77c..f2e66de74fe5 100644
--- a/app/components/work_packages/progress/work_based/modal_body_component.rb
+++ b/app/components/work_packages/progress/work_based/modal_body_component.rb
@@ -40,15 +40,6 @@ def initialize(work_package,
@mode = :work_based
end
-
- # This method can be safely deleted once the feature flag
- # :percent_complete_edition is removed, which should happen for
- # OpenProject 15.0 release.
- def should_display_migration_warning?
- return false if OpenProject::FeatureDecisions.percent_complete_edition_active?
-
- work_package.done_ratio.present? && work_package.estimated_hours.nil? && work_package.remaining_hours.nil?
- end
end
# rubocop:enable OpenProject/AddPreviewForViewComponent
end
diff --git a/app/components/workflows/page_header_component.rb b/app/components/workflows/page_header_component.rb
index 7d93e1d92c3c..0df058b70a17 100644
--- a/app/components/workflows/page_header_component.rb
+++ b/app/components/workflows/page_header_component.rb
@@ -40,7 +40,7 @@ def initialize(state:)
def breadcrumb_items
base_items = [{ href: admin_index_path, text: t("label_administration") },
- { href: admin_settings_work_package_tracking_path, text: t(:label_work_package_plural) },
+ { href: admin_settings_work_packages_general_path, text: t(:label_work_package_plural) },
title]
if @state == :edit
diff --git a/app/contracts/custom_fields/custom_field_projects/base_contract.rb b/app/contracts/custom_fields/custom_field_projects/base_contract.rb
new file mode 100644
index 000000000000..d2d260d11119
--- /dev/null
+++ b/app/contracts/custom_fields/custom_field_projects/base_contract.rb
@@ -0,0 +1,52 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module CustomFields
+ module CustomFieldProjects
+ class BaseContract < ::ModelContract
+ attribute :project_id
+ attribute :custom_field_id
+
+ validate :select_custom_fields_permission
+ validate :not_for_all
+
+ def select_custom_fields_permission
+ return if user.allowed_in_project?(:select_custom_fields, model.project)
+
+ errors.add :base, :error_unauthorized
+ end
+
+ def not_for_all
+ # Only mappings of custom fields which are not enabled for all projects can be manipulated by the user
+ return if model.custom_field.nil? || !model.custom_field.is_for_all?
+
+ errors.add :custom_field_id, :is_for_all_cannot_modify
+ end
+ end
+ end
+end
diff --git a/app/contracts/custom_fields/custom_field_projects/update_contract.rb b/app/contracts/custom_fields/custom_field_projects/update_contract.rb
new file mode 100644
index 000000000000..cfbf9dcccaf1
--- /dev/null
+++ b/app/contracts/custom_fields/custom_field_projects/update_contract.rb
@@ -0,0 +1,34 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module CustomFields
+ module CustomFieldProjects
+ class UpdateContract < BaseContract
+ end
+ end
+end
diff --git a/app/components/oauth/applications/row_component.rb b/app/contracts/oauth/applications/base_contract.rb
similarity index 52%
rename from app/components/oauth/applications/row_component.rb
rename to app/contracts/oauth/applications/base_contract.rb
index 840dc2ca1682..fac8b49b1873 100644
--- a/app/components/oauth/applications/row_component.rb
+++ b/app/contracts/oauth/applications/base_contract.rb
@@ -1,8 +1,6 @@
-# frozen_string_literal: true
-
#-- copyright
# OpenProject is an open source project management software.
-# Copyright (C) the OpenProject GmbH
+# Copyright (C) 2012-2024 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
@@ -30,50 +28,45 @@
module OAuth
module Applications
- class RowComponent < ::RowComponent
- property :confidential
-
- def application
- model
+ class BaseContract < ::ModelContract
+ def self.model
+ ::Doorkeeper::Application
end
- def name
- link_to application.name, oauth_application_path(application)
- end
+ validate :validate_client_credential_user
+ validate :validate_integration
+ validate :validate_admin_only
- def owner
- link_to application.owner.name, user_path(application.owner)
- end
+ attribute :enabled
+ attribute :name
+ attribute :redirect_uri
+ attribute :confidential
+ attribute :owner_id
+ attribute :owner_type
+ attribute :scopes
+ attribute :client_credentials_user_id
+ attribute :integration_id
+ attribute :integration_type
- def confidential
- if application.confidential?
- helpers.op_icon "icon icon-checkmark"
- end
- end
+ private
- def redirect_uri
- urls = application.redirect_uri.split("\n")
- safe_join urls, " ".html_safe
+ def validate_admin_only
+ errors.add :base, :error_unauthorized unless user.admin?
end
- def client_credentials
- if user_id = application.client_credentials_user_id
- helpers.link_to_user User.find(user_id)
- else
- "-"
- end
- end
+ def validate_integration
+ both = model.integration_id.present? && model.integration_type.present?
+ none = model.integration_id.nil? && model.integration_type.nil?
- def edit_link
- link_to(
- I18n.t(:button_edit),
- edit_oauth_application_path(application),
- class: "oauth-application--edit-link icon icon-edit"
- )
+ errors.add :integration, :invalid unless both || none
end
- def button_links
- [edit_link, helpers.delete_link(oauth_application_path(application))]
+ def validate_client_credential_user
+ return if model.client_credentials_user_id.blank?
+
+ unless User.exists?(id: model.client_credentials_user_id)
+ errors.add :client_credentials_user_id, :invalid
+ end
end
end
end
diff --git a/app/contracts/oauth/applications/create_contract.rb b/app/contracts/oauth/applications/create_contract.rb
new file mode 100644
index 000000000000..947cea0ac3c1
--- /dev/null
+++ b/app/contracts/oauth/applications/create_contract.rb
@@ -0,0 +1,46 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module OAuth
+ module Applications
+ class CreateContract < BaseContract
+ attribute :builtin
+ attribute :uid
+
+ validate :validate_owner_present
+
+ private
+
+ def validate_owner_present
+ if model.owner.blank?
+ errors.add(:owner, :blank)
+ end
+ end
+ end
+ end
+end
diff --git a/app/contracts/oauth/applications/delete_contract.rb b/app/contracts/oauth/applications/delete_contract.rb
new file mode 100644
index 000000000000..1d7ce6f5dab3
--- /dev/null
+++ b/app/contracts/oauth/applications/delete_contract.rb
@@ -0,0 +1,35 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) 2012-2024 the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module OAuth
+ module Applications
+ class DeleteContract < ::DeleteContract
+ delete_permission -> { !model.builtin? && user.admin? }
+ end
+ end
+end
diff --git a/app/contracts/oauth/applications/update_contract.rb b/app/contracts/oauth/applications/update_contract.rb
new file mode 100644
index 000000000000..48f436d14fef
--- /dev/null
+++ b/app/contracts/oauth/applications/update_contract.rb
@@ -0,0 +1,41 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) 2012-2024 the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module OAuth
+ module Applications
+ class UpdateContract < BaseContract
+ validate :application_is_not_builtin
+
+ def application_is_not_builtin
+ if model.builtin?
+ errors.add(:base, :unchangeable)
+ end
+ end
+ end
+ end
+end
diff --git a/app/contracts/roles/base_contract.rb b/app/contracts/roles/base_contract.rb
index 854f0fe70047..7fc489a910f0 100644
--- a/app/contracts/roles/base_contract.rb
+++ b/app/contracts/roles/base_contract.rb
@@ -43,7 +43,7 @@ def assignable_permissions(keep_public: false)
else
assignable_member_permissions
end.reject do |permission|
- !keep_public && permission.public?
+ (!keep_public && permission.public?) || permission.hidden?
end
end
diff --git a/app/contracts/work_packages/base_contract.rb b/app/contracts/work_packages/base_contract.rb
index dc62c589bf41..552d27bc9c2f 100644
--- a/app/contracts/work_packages/base_contract.rb
+++ b/app/contracts/work_packages/base_contract.rb
@@ -54,40 +54,27 @@ class BaseContract < ::ModelContract
attribute :done_ratio,
writable: ->(*) {
- OpenProject::FeatureDecisions.percent_complete_edition_active? \
- && WorkPackage.work_based_mode?
+ WorkPackage.work_based_mode?
} do
- if OpenProject::FeatureDecisions.percent_complete_edition_active?
- next if invalid_work_or_remaining_work_values? # avoid too many error messages at the same time
+ next if invalid_work_or_remaining_work_values? # avoid too many error messages at the same time
- validate_percent_complete_matches_work_and_remaining_work
- validate_percent_complete_is_empty_when_work_is_zero
- validate_percent_complete_is_set_when_work_and_remaining_work_are_set
- end
+ validate_percent_complete_matches_work_and_remaining_work
+ validate_percent_complete_is_empty_when_work_is_zero
+ validate_percent_complete_is_set_when_work_and_remaining_work_are_set
end
attribute :derived_done_ratio,
writable: false
attribute :estimated_hours do
- if OpenProject::FeatureDecisions.percent_complete_edition_active?
- validate_work_is_set_when_remaining_work_and_percent_complete_are_set
- else
- # to be removed in 15.0 with :percent_complete_edition feature flag removal
- validate_work_is_set_when_remaining_work_is_set
- end
+ validate_work_is_set_when_remaining_work_and_percent_complete_are_set
end
attribute :derived_estimated_hours,
writable: false
attribute :remaining_hours do
validate_remaining_work_is_lower_than_work
- if OpenProject::FeatureDecisions.percent_complete_edition_active?
- validate_remaining_work_is_zero_or_empty_when_percent_complete_is_100p
- validate_remaining_work_is_set_when_work_and_percent_complete_are_set
- else
- # to be removed in 15.0 with :percent_complete_edition feature flag removal
- validate_remaining_work_is_set_when_work_is_set
- end
+ validate_remaining_work_is_zero_or_empty_when_percent_complete_is_100p
+ validate_remaining_work_is_set_when_work_and_percent_complete_are_set
end
attribute :derived_remaining_hours,
writable: false
@@ -350,20 +337,6 @@ def validate_remaining_work_is_lower_than_work
end
end
- # to be removed in 15.0 with :percent_complete_edition feature flag removal
- def validate_remaining_work_is_set_when_work_is_set
- if work_set? && !remaining_work_set?
- errors.add(:remaining_hours, :must_be_set_when_work_is_set)
- end
- end
-
- # to be removed in 15.0 with :percent_complete_edition feature flag removal
- def validate_work_is_set_when_remaining_work_is_set
- if remaining_work_set? && !work_set?
- errors.add(:estimated_hours, :must_be_set_when_remaining_work_is_set)
- end
- end
-
def validate_work_is_set_when_remaining_work_and_percent_complete_are_set
if remaining_work_set_and_valid? && percent_complete_set_and_valid? && work_empty? && percent_complete != 100
errors.add(:estimated_hours, :must_be_set_when_remaining_work_and_percent_complete_are_set)
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
index bf66aca93497..3d7f75cceebb 100644
--- a/app/controllers/account_controller.rb
+++ b/app/controllers/account_controller.rb
@@ -29,9 +29,10 @@
class AccountController < ApplicationController
include CustomFieldsHelper
include OmniauthHelper
- include Accounts::OmniauthLogin
+ include Accounts::Registration
include Accounts::UserConsent
include Accounts::UserLimits
+ include Accounts::UserLogin
include Accounts::UserPasswordChange
# prevents login action to be filtered by check_if_login_required application scope filter
@@ -346,49 +347,6 @@ def assign_user_attributes(attrs)
.result
end
- def register_plain_user(user)
- user.attributes = permitted_params.user.transform_values do |val|
- if val.is_a? String
- val.strip!
- end
-
- val
- end
- user.login = params[:user][:login].strip if params[:user][:login].present?
- user.password = params[:user][:password]
- user.password_confirmation = params[:user][:password_confirmation]
-
- respond_for_registered_user(user)
- end
-
- def register_with_auth_source(user)
- # on-the-fly registration via omniauth or via auth source
- if pending_omniauth_registration?
- user.assign_attributes permitted_params.user_register_via_omniauth
- register_via_omniauth(session, user.attributes)
- else
- user.attributes = permitted_params.user
- user.activate
- user.login = session[:auth_source_registration][:login]
- user.ldap_auth_source_id = session[:auth_source_registration][:ldap_auth_source_id]
-
- respond_for_registered_user(user)
- end
- end
-
- def respond_for_registered_user(user)
- call = ::Users::RegisterUserService.new(user).call
-
- if call.success?
- flash[:notice] = call.message.presence
- login_user_if_active(call.result, just_registered: true)
- else
- flash[:error] = error = call.message
- Rails.logger.error "Registration of user #{user.login} failed: #{error}"
- onthefly_creation_failed(user)
- end
- end
-
def user_with_placeholder_name?(user)
user.firstname == user.login and user.login == user.mail
end
@@ -454,61 +412,6 @@ def password_authentication(username, password)
end
end
- def login_user_if_active(user, just_registered:)
- if user.active?
- successful_authentication(user, just_registered:)
- return
- end
-
- # Show an appropriate error unless
- # the user was just registered
- if !(just_registered && user.registered?)
- account_inactive(user, flash_now: false)
- end
-
- redirect_to signin_path(back_url: params[:back_url])
- end
-
- def pending_auth_source_registration?
- session[:auth_source_registration] && !pending_omniauth_registration?
- end
-
- def pending_omniauth_registration?
- Hash(session[:auth_source_registration])[:omniauth]
- end
-
- # Onthefly creation failed, display the registration form to fill/fix attributes
- def onthefly_creation_failed(user, auth_source_options = {})
- @user = user
- session[:auth_source_registration] = auth_source_options unless auth_source_options.empty?
- render action: "register"
- end
-
- def self_registration_disabled
- flash[:error] = I18n.t("account.error_self_registration_disabled")
- redirect_to signin_url
- end
-
- # Call if an account is inactive - either registered or locked
- def account_inactive(user, flash_now: true)
- if user.registered?
- account_not_activated(flash_now:)
- else
- flash_and_log_invalid_credentials(flash_now:)
- end
- end
-
- # Log an attempt to log in to an account in "registered" state and show a flash message.
- def account_not_activated(flash_now: true)
- flash_error_message(log_reason: "NOT ACTIVATED", flash_now:) do
- if Setting::SelfRegistration.by_email?
- "account.error_inactive_activation_by_mail"
- else
- "account.error_inactive_manual_activation"
- end
- end
- end
-
def invited_account_not_activated(_user)
flash_error_message(log_reason: "invited, NOT ACTIVATED", flash_now: false) do
"account.error_inactive_activation_by_mail"
diff --git a/app/controllers/activities_controller.rb b/app/controllers/activities_controller.rb
index 930caf24843a..14a9af48b6b6 100644
--- a/app/controllers/activities_controller.rb
+++ b/app/controllers/activities_controller.rb
@@ -45,20 +45,18 @@ class ActivitiesController < ApplicationController
accept_key_auth :index
+ rescue_from ActiveRecord::RecordNotFound do |exception|
+ op_handle_warning "Failed to find all resources in activities: #{exception.message}"
+ render_404(message: I18n.t(:error_can_not_find_all_resources))
+ end
+
def index
@events = @activity.events(from: @date_from.to_datetime, to: @date_to.to_datetime)
respond_to do |format|
- format.html do
- respond_html
- end
- format.atom do
- respond_atom
- end
+ format.html { respond_html }
+ format.atom { respond_atom }
end
- rescue ActiveRecord::RecordNotFound => e
- op_handle_warning "Failed to find all resources in activities: #{e.message}"
- render_404 I18n.t(:error_can_not_find_all_resources)
end
def menu
diff --git a/app/controllers/admin/custom_fields/custom_field_projects_controller.rb b/app/controllers/admin/custom_fields/custom_field_projects_controller.rb
new file mode 100644
index 000000000000..8f69e323e74a
--- /dev/null
+++ b/app/controllers/admin/custom_fields/custom_field_projects_controller.rb
@@ -0,0 +1,179 @@
+# frozen_string_literal: true
+
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+class Admin::CustomFields::CustomFieldProjectsController < ApplicationController
+ include OpTurbo::ComponentStream
+ include OpTurbo::DialogStreamHelper
+ include FlashMessagesOutputSafetyHelper
+
+ layout "admin"
+
+ model_object CustomField
+
+ before_action :require_admin
+ before_action :find_model_object
+
+ before_action :available_custom_fields_projects_query, only: %i[index destroy]
+ before_action :initialize_custom_field_project, only: :new
+ before_action :find_projects_to_activate_for_custom_field, only: :create
+ before_action :find_custom_field_project_to_destroy, only: :destroy
+
+ menu_item :custom_fields
+
+ def index; end
+
+ def new
+ respond_with_dialog Admin::CustomFields::CustomFieldProjects::NewCustomFieldProjectsModalComponent.new(
+ custom_field_project_mapping: @custom_field_project,
+ custom_field: @custom_field
+ )
+ end
+
+ def create
+ create_service = ::CustomFields::CustomFieldProjects::BulkCreateService
+ .new(user: current_user, projects: @projects, custom_field: @custom_field,
+ include_sub_projects: include_sub_projects?)
+ .call
+
+ create_service.on_success { render_project_list(url_for_action: :index) }
+
+ create_service.on_failure do
+ update_flash_message_via_turbo_stream(
+ message: join_flash_messages(create_service.errors),
+ full: true, dismiss_scheme: :hide, scheme: :danger
+ )
+ end
+
+ respond_to_with_turbo_streams(status: create_service.success? ? :ok : :unprocessable_entity)
+ end
+
+ def destroy
+ delete_service = ::CustomFields::CustomFieldProjects::DeleteService
+ .new(user: current_user, model: @custom_field_project)
+ .call
+
+ delete_service.on_success { render_project_list(url_for_action: :index) }
+
+ delete_service.on_failure do
+ update_flash_message_via_turbo_stream(
+ message: join_flash_messages(delete_service.errors.full_messages),
+ full: true, dismiss_scheme: :hide, scheme: :danger
+ )
+ end
+
+ respond_to_with_turbo_streams(status: delete_service.success? ? :ok : :unprocessable_entity)
+ end
+
+ def default_breadcrumb; end
+
+ def show_local_breadcrumb
+ false
+ end
+
+ private
+
+ def render_project_list(url_for_action: action_name)
+ update_via_turbo_stream(
+ component: Admin::CustomFields::CustomFieldProjects::TableComponent.new(
+ query: available_custom_fields_projects_query,
+ params: { custom_field: @custom_field, url_for_action: }
+ )
+ )
+ end
+
+ def find_model_object(object_id = :custom_field_id)
+ super
+ @custom_field = @object
+ end
+
+ def find_projects_to_activate_for_custom_field
+ if (project_ids = params.to_unsafe_h[:custom_fields_project][:project_ids]).present?
+ @projects = Project.find(project_ids)
+ else
+ initialize_custom_field_project
+ @custom_field_project.errors.add(:project_ids, :blank)
+ update_via_turbo_stream(
+ component: Admin::CustomFields::CustomFieldProjects::NewCustomFieldProjectsFormModalComponent.new(
+ custom_field_project_mapping: @custom_field_project,
+ custom_field: @custom_field
+ ),
+ status: :bad_request
+ )
+ respond_with_turbo_streams
+ end
+ rescue ActiveRecord::RecordNotFound
+ respond_with_project_not_found_turbo_streams
+ end
+
+ def find_custom_field_project_to_destroy
+ @custom_field_project = CustomFieldsProject.find_by!(custom_field: @custom_field,
+ project: params[:custom_fields_project][:project_id])
+ rescue ActiveRecord::RecordNotFound
+ respond_with_project_not_found_turbo_streams
+ end
+
+ def update_project_list_via_turbo_stream(url_for_action: action_name)
+ update_via_turbo_stream(
+ component: Admin::CustomFields::CustomFieldProjects::TableComponent.new(
+ query: available_custom_fields_projects_query,
+ params: { custom_field: @custom_field, url_for_action: }
+ )
+ )
+ end
+
+ def available_custom_fields_projects_query
+ @available_custom_fields_projects_query = ProjectQuery.new(
+ name: "custom-fields-projects-#{@custom_field.id}"
+ ) do |query|
+ query.where(:available_custom_fields_projects, "=", [@custom_field.id])
+ query.select(:name)
+ query.order("lft" => "asc")
+ end
+ end
+
+ def initialize_custom_field_project
+ @custom_field_project = ::CustomFields::CustomFieldProjects::SetAttributesService
+ .new(user: current_user, model: CustomFieldsProject.new, contract_class: EmptyContract)
+ .call(custom_field: @custom_field)
+ .result
+ end
+
+ def respond_with_project_not_found_turbo_streams
+ update_flash_message_via_turbo_stream message: t(:notice_project_not_found), full: true, dismiss_scheme: :hide,
+ scheme: :danger
+ update_project_list_via_turbo_stream
+
+ respond_with_turbo_streams
+ end
+
+ def include_sub_projects?
+ ActiveRecord::Type::Boolean.new.cast(params.to_unsafe_h[:custom_fields_project][:include_sub_projects])
+ end
+end
diff --git a/app/controllers/admin/settings/work_packages_settings_controller.rb b/app/controllers/admin/settings/progress_tracking_controller.rb
similarity index 92%
rename from app/controllers/admin/settings/work_packages_settings_controller.rb
rename to app/controllers/admin/settings/progress_tracking_controller.rb
index d2f1f369f00f..e6687d0afd6e 100644
--- a/app/controllers/admin/settings/work_packages_settings_controller.rb
+++ b/app/controllers/admin/settings/progress_tracking_controller.rb
@@ -27,9 +27,9 @@
#++
module Admin::Settings
- class WorkPackagesSettingsController < ::Admin::SettingsController
+ class ProgressTrackingController < ::Admin::SettingsController
current_menu_item :show do
- :work_packages_setting
+ :progress_tracking
end
end
end
diff --git a/app/controllers/admin/settings/project_custom_fields_controller.rb b/app/controllers/admin/settings/project_custom_fields_controller.rb
index ab06963ee7c2..b532962b12f5 100644
--- a/app/controllers/admin/settings/project_custom_fields_controller.rb
+++ b/app/controllers/admin/settings/project_custom_fields_controller.rb
@@ -31,7 +31,6 @@ class ProjectCustomFieldsController < ::Admin::SettingsController
include CustomFields::SharedActions
include OpTurbo::ComponentStream
include OpTurbo::DialogStreamHelper
- include ApplicationComponentStreams
include FlashMessagesOutputSafetyHelper
include Admin::Settings::ProjectCustomFields::ComponentStreams
@@ -76,8 +75,8 @@ def project_mappings; end
def new_link
@project_mapping = ProjectCustomFieldProjectMapping.new(project_custom_field: @custom_field)
respond_with_dialog Settings::ProjectCustomFields::ProjectCustomFieldMapping::NewProjectMappingComponent.new(
- project_mapping: @project_mapping,
- project_custom_field: @custom_field
+ custom_field_project_mapping: @project_mapping,
+ custom_field: @custom_field
)
end
@@ -181,8 +180,9 @@ def set_sections
end
def find_unlink_project_custom_field_mapping
- @project = Project.find(permitted_params.project_custom_field_project_mapping[:project_id])
- @project_custom_field_mapping = @custom_field.project_custom_field_project_mappings.find_by!(project: @project)
+ @project_custom_field_mapping = @custom_field.project_custom_field_project_mappings.find_by!(
+ project_id: permitted_params.project_custom_field_project_mapping[:project_id]
+ )
rescue ActiveRecord::RecordNotFound
update_flash_message_via_turbo_stream(
message: t(:notice_file_not_found), full: true, dismiss_scheme: :hide, scheme: :danger
@@ -205,8 +205,8 @@ def find_custom_field_projects_to_link
project_mapping = ProjectCustomFieldProjectMapping.new(project_custom_field: @custom_field)
project_mapping.errors.add(:project_ids, :blank)
component = Settings::ProjectCustomFields::ProjectCustomFieldMapping::NewProjectMappingFormComponent.new(
- project_mapping:,
- project_custom_field: @custom_field
+ custom_field_project_mapping: project_mapping,
+ custom_field: @custom_field
)
update_via_turbo_stream(component:, status: :bad_request)
respond_with_turbo_streams
diff --git a/app/controllers/admin/settings/work_packages_general_controller.rb b/app/controllers/admin/settings/work_packages_general_controller.rb
new file mode 100644
index 000000000000..82164cb79875
--- /dev/null
+++ b/app/controllers/admin/settings/work_packages_general_controller.rb
@@ -0,0 +1,35 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module Admin::Settings
+ class WorkPackagesGeneralController < ::Admin::SettingsController
+ current_menu_item :show do
+ :work_packages_general
+ end
+ end
+end
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
index aabc59cdd8a9..8a554ac032f1 100644
--- a/app/controllers/admin_controller.rb
+++ b/app/controllers/admin_controller.rb
@@ -85,6 +85,7 @@ def info
@checklist += plaintext_extraction_checks
@checklist += admin_information_hook_checks
@checklist += image_conversion_checks
+ @checklist += jemalloc_active_checks
@storage_information = OpenProject::Storage.mount_information
end
@@ -120,6 +121,16 @@ def image_conversion_checks
[[:"image_conversion.imagemagick", image_conversion_libs_available?]]
end
+ def jemalloc_active_checks
+ [[:"admin.jemalloc_allocator", jemalloc_libs_active?]]
+ end
+
+ def jemalloc_libs_active?
+ Open3.capture2e({ "MALLOC_CONF" => "true" }, "ruby", "-e", "exit").first.include?("jemalloc")
+ rescue StandardError
+ false
+ end
+
def image_conversion_libs_available?
Open3.capture2e("convert", "-version").first.include?("ImageMagick")
rescue StandardError
diff --git a/app/controllers/colors_controller.rb b/app/controllers/colors_controller.rb
index 7b710cb494f3..ed553c1ce1cf 100644
--- a/app/controllers/colors_controller.rb
+++ b/app/controllers/colors_controller.rb
@@ -109,7 +109,7 @@ def show_local_breadcrumb
def default_breadcrumb; end
def require_admin_unless_readonly_api_request
- require_admin unless %w[index show].include? params[:action] and
+ require_admin unless %w[index show].include? action_name and
api_request?
end
end
diff --git a/app/controllers/concerns/accounts/authorization.rb b/app/controllers/concerns/accounts/authorization.rb
index f99824e798d7..3d4227a43ded 100644
--- a/app/controllers/concerns/accounts/authorization.rb
+++ b/app/controllers/concerns/accounts/authorization.rb
@@ -46,9 +46,9 @@ module Accounts::Authorization
private
def authorization_check_required
- unless authorization_is_ensured?(params[:action])
+ unless authorization_is_ensured?(action_name)
raise <<-MESSAGE
- Authorization check required for #{self.class.name}##{params[:action]}.
+ Authorization check required for #{self.class.name}##{action_name}.
Use any method of
#{METHODS_ENFORCING_AUTHORIZATION.join(', ')}
@@ -62,20 +62,20 @@ def authorization_check_required
# Authorize the user for the requested controller action.
# To be used in before_action hooks
def authorize
- do_authorize({ controller: params[:controller], action: params[:action] }, global: false)
+ do_authorize({ controller: controller_path, action: action_name }, global: false)
end
# Authorize the user for the requested controller action outside a project
# To be used in before_action hooks
def authorize_global
- do_authorize({ controller: params[:controller], action: params[:action] }, global: true)
+ do_authorize({ controller: controller_path, action: action_name }, global: true)
end
# Find a project based on params[:project_id]
def load_and_authorize_in_optional_project
@project = Project.find(params[:project_id]) if params[:project_id].present?
- do_authorize({ controller: params[:controller], action: params[:action] }, global: params[:project_id].blank?)
+ do_authorize({ controller: controller_path, action: action_name }, global: params[:project_id].blank?)
rescue ActiveRecord::RecordNotFound
render_404
end
diff --git a/app/controllers/concerns/accounts/current_user.rb b/app/controllers/concerns/accounts/current_user.rb
index e6bf353a8df9..de51756c3f36 100644
--- a/app/controllers/concerns/accounts/current_user.rb
+++ b/app/controllers/concerns/accounts/current_user.rb
@@ -105,7 +105,7 @@ def current_autologin_user
end
def current_rss_key_user
- if params[:format] == "atom" && params[:key] && accept_key_auth_actions.include?(params[:action])
+ if params[:format] == "atom" && params[:key] && accept_key_auth_actions.include?(action_name)
# RSS key authentication does not start a session
User.find_by_rss_key(params[:key])
end
@@ -116,7 +116,7 @@ def current_api_key_user
key = api_key_from_request
- if key && accept_key_auth_actions.include?(params[:action])
+ if key && accept_key_auth_actions.include?(action_name)
# Use API key
User.find_by_api_key(key)
end
diff --git a/app/controllers/concerns/accounts/registration.rb b/app/controllers/concerns/accounts/registration.rb
new file mode 100644
index 000000000000..ca11d39edfc5
--- /dev/null
+++ b/app/controllers/concerns/accounts/registration.rb
@@ -0,0 +1,156 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+require "uri"
+
+##
+# Intended to be used by the AccountController and OmniAuthLoginController to handle registration flows
+module Accounts::Registration
+ ##
+ # Sends a user who was just registered to the activation stages
+ # or to the signin page if the user could not be activated
+ def login_user_if_active(user, just_registered:)
+ if user.active?
+ successful_authentication(user, just_registered:)
+ return
+ end
+
+ # Show an appropriate error unless
+ # the user was just registered
+ if !(just_registered && user.registered?)
+ account_inactive(user, flash_now: false)
+ end
+
+ redirect_to signin_path(back_url: params[:back_url])
+ end
+
+ def register_plain_user(user) # rubocop:disable Metrics/AbcSize
+ user.attributes = permitted_params.user.transform_values do |val|
+ if val.is_a? String
+ val.strip!
+ end
+
+ val
+ end
+ user.login = params[:user][:login].strip if params[:user][:login].present?
+ user.password = params[:user][:password]
+ user.password_confirmation = params[:user][:password_confirmation]
+
+ respond_for_registered_user(user)
+ end
+
+ def register_with_auth_source(user) # rubocop:disable Metrics/AbcSize
+ # on-the-fly registration via omniauth or via auth source
+ if pending_omniauth_registration?
+ user.assign_attributes permitted_params.user_register_via_omniauth
+ register_via_omniauth(session, user.attributes)
+ else
+ user.attributes = permitted_params.user
+ user.activate
+ user.login = session[:auth_source_registration][:login]
+ user.ldap_auth_source_id = session[:auth_source_registration][:ldap_auth_source_id]
+
+ respond_for_registered_user(user)
+ end
+ end
+
+ def register_via_omniauth(session, user_attributes)
+ handle_omniauth_authentication(session[:auth_source_registration], user_params: user_attributes)
+ end
+
+ def handle_omniauth_authentication(auth_hash, user_params: nil) # rubocop:disable Metrics/AbcSize
+ call = ::Authentication::OmniauthService
+ .new(strategy: request.env["omniauth.strategy"], auth_hash:, controller: self)
+ .call(user_params)
+
+ if call.success?
+ session[:omniauth_provider] = auth_hash[:provider]
+ flash[:notice] = call.message if call.message.present?
+ login_user_if_active(call.result, just_registered: call.result.just_created?)
+ elsif call.includes_error?(:base, :failed_to_activate)
+ redirect_omniauth_register_modal(call.result, auth_hash)
+ else
+ error = call.message
+ Rails.logger.error "Authorization request failed: #{error}"
+ show_error error
+ end
+ end
+
+ def respond_for_registered_user(user)
+ call = ::Users::RegisterUserService.new(user).call
+
+ if call.success?
+ flash[:notice] = call.message.presence
+ login_user_if_active(call.result, just_registered: true)
+ else
+ flash[:error] = error = call.message
+ Rails.logger.error "Registration of user #{user.login} failed: #{error}"
+ onthefly_creation_failed(user)
+ end
+ end
+
+ # Onthefly creation failed, display the registration form to fill/fix attributes
+ def onthefly_creation_failed(user, auth_source_options = {})
+ @user = user
+ session[:auth_source_registration] = auth_source_options unless auth_source_options.empty?
+ render action: "register"
+ end
+
+ def self_registration_disabled
+ flash[:error] = I18n.t("account.error_self_registration_disabled")
+ redirect_to signin_url
+ end
+
+ def account_inactive(user, flash_now: true)
+ if user.registered?
+ account_not_activated(flash_now:)
+ else
+ flash_and_log_invalid_credentials(flash_now:)
+ end
+ end
+
+ def pending_omniauth_registration?
+ Hash(session[:auth_source_registration])[:omniauth]
+ end
+
+ def show_error(error)
+ flash[:error] = error
+ redirect_to signin_path
+ end
+
+ # Log an attempt to log in to an account in "registered" state and show a flash message.
+ def account_not_activated(flash_now: true)
+ flash_error_message(log_reason: "NOT ACTIVATED", flash_now:) do
+ if Setting::SelfRegistration.by_email?
+ "account.error_inactive_activation_by_mail"
+ else
+ "account.error_inactive_manual_activation"
+ end
+ end
+ end
+end
diff --git a/app/controllers/concerns/accounts/user_login.rb b/app/controllers/concerns/accounts/user_login.rb
index 698f8280588e..4ff237cc3f88 100644
--- a/app/controllers/concerns/accounts/user_login.rb
+++ b/app/controllers/concerns/accounts/user_login.rb
@@ -10,4 +10,33 @@ def login_user!(user)
redirect_after_login(user)
end
+
+ ##
+ # Log an attempt to log in to a locked account or with invalid credentials
+ # and show a flash message.
+ def flash_and_log_invalid_credentials(flash_now: true, is_logged_in: false)
+ if is_logged_in
+ flash[:error] = I18n.t(:notice_account_wrong_password)
+ return
+ end
+
+ flash_error_message(log_reason: "invalid credentials", flash_now:) do
+ if Setting.brute_force_block_after_failed_logins.to_i > 0
+ :notice_account_invalid_credentials_or_blocked
+ else
+ :notice_account_invalid_credentials
+ end
+ end
+ end
+
+ def flash_error_message(log_reason: "", flash_now: true)
+ flash_hash = flash_now ? flash.now : flash
+
+ logger.warn "Failed login for '#{params[:username]}' from #{request.remote_ip} " \
+ "at #{Time.now.utc}: #{log_reason}"
+
+ flash_message = yield
+
+ flash_hash[:error] = I18n.t(flash_message)
+ end
end
diff --git a/app/controllers/concerns/accounts/user_password_change.rb b/app/controllers/concerns/accounts/user_password_change.rb
index b6ea6e6db3e3..c4b602d7c956 100644
--- a/app/controllers/concerns/accounts/user_password_change.rb
+++ b/app/controllers/concerns/accounts/user_password_change.rb
@@ -61,24 +61,6 @@ def change_password_flow(user:, params:, update_legacy: true, show_user_name: fa
render_password_change user, call.message, show_user_name:
end
- ##
- # Log an attempt to log in to a locked account or with invalid credentials
- # and show a flash message.
- def flash_and_log_invalid_credentials(flash_now: true, is_logged_in: false)
- if is_logged_in
- flash[:error] = I18n.t(:notice_account_wrong_password)
- return
- end
-
- flash_error_message(log_reason: "invalid credentials", flash_now:) do
- if Setting.brute_force_block_after_failed_logins.to_i > 0
- :notice_account_invalid_credentials_or_blocked
- else
- :notice_account_invalid_credentials
- end
- end
- end
-
def render_password_change(user, message, show_user_name: false)
flash[:error] = message unless message.nil?
@user = user
@@ -98,15 +80,4 @@ def redirect_if_password_change_not_allowed(user)
end
false
end
-
- def flash_error_message(log_reason: "", flash_now: true)
- flash_hash = flash_now ? flash.now : flash
-
- logger.warn "Failed login for '#{params[:username]}' from #{request.remote_ip} " \
- "at #{Time.now.utc}: #{log_reason}"
-
- flash_message = yield
-
- flash_hash[:error] = I18n.t(flash_message)
- end
end
diff --git a/app/controllers/concerns/op_turbo/component_stream.rb b/app/controllers/concerns/op_turbo/component_stream.rb
index 88fbf6f9abde..125a26975e87 100644
--- a/app/controllers/concerns/op_turbo/component_stream.rb
+++ b/app/controllers/concerns/op_turbo/component_stream.rb
@@ -73,6 +73,15 @@ def add_before_via_turbo_stream(component:, target_component:)
turbo_streams << target_component.insert_as_turbo_stream(component:, view_context:, action: :before)
end
+ def render_error_flash_message_via_turbo_stream(**kwargs)
+ update_flash_message_via_turbo_stream(**kwargs.merge(scheme: :danger, icon: :stop))
+ end
+
+ def update_flash_message_via_turbo_stream(message:, component: OpPrimer::FlashComponent, **)
+ instance = component.new(**).with_content(message)
+ turbo_streams << instance.render_as_turbo_stream(view_context:, action: :flash)
+ end
+
def turbo_streams
@turbo_streams ||= []
end
diff --git a/app/controllers/custom_styles_controller.rb b/app/controllers/custom_styles_controller.rb
index e2e70eb61dfb..63d4f4b6606f 100644
--- a/app/controllers/custom_styles_controller.rb
+++ b/app/controllers/custom_styles_controller.rb
@@ -44,10 +44,18 @@ class CustomStylesController < ApplicationController
only: UNGUARDED_ACTIONS
no_authorization_required! *UNGUARDED_ACTIONS
+ def default_url_options
+ super.merge(tab: params[:tab])
+ end
+
def show
@custom_style = CustomStyle.current || CustomStyle.new
@current_theme = @custom_style.theme
@theme_options = options_for_theme_select
+
+ if params[:tab].blank?
+ redirect_to tab: "interface"
+ end
end
def upsale; end
@@ -58,7 +66,7 @@ def create
redirect_to custom_style_path
else
flash[:error] = @custom_style.errors.full_messages
- render action: :show
+ render action: :show, status: :unprocessable_entity
end
end
@@ -68,7 +76,7 @@ def update
redirect_to custom_style_path
else
flash[:error] = @custom_style.errors.full_messages
- render action: :show
+ render action: :show, status: :unprocessable_entity
end
end
@@ -135,11 +143,9 @@ def update_colors
end
def update_themes
- theme = OpenProject::CustomStyles::ColorThemes.themes.find { |t| t[:theme] == params[:theme] }
-
call = ::Design::UpdateDesignService
- .new(theme)
- .call
+ .new(theme_from_params)
+ .call
call.on_success do
flash[:notice] = I18n.t(:notice_successful_update)
@@ -149,15 +155,15 @@ def update_themes
flash[:error] = call.message
end
- redirect_to action: :show
- end
-
- def show_local_breadcrumb
- false
+ redirect_to custom_style_path
end
private
+ def theme_from_params
+ OpenProject::CustomStyles::ColorThemes.themes.find { |t| t[:theme] == params[:theme] }
+ end
+
def options_for_theme_select
options = OpenProject::CustomStyles::ColorThemes.themes.pluck(:theme)
unless @current_theme.present?
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb
index f0d6ccdba047..e26217385d0b 100644
--- a/app/controllers/my_controller.rb
+++ b/app/controllers/my_controller.rb
@@ -174,13 +174,13 @@ def revoke_api_key
# rubocop:disable Rails/ActionControllerFlashBeforeRender
result.on_success do
- flash[:primer_banner] = { message: t("my.access_token.notice_api_token_revoked") }
+ flash[:op_primer_flash] = { message: t("my.access_token.notice_api_token_revoked") }
end
result.on_failure do |r|
error = r.errors.map(&:message).join("; ")
Rails.logger.error("Failed to revoke api token ##{current_user.id}: #{error}")
- flash[:primer_banner] = { message: t("my.access_token.failed_to_revoke_token", error:), scheme: :danger }
+ flash[:op_primer_flash] = { message: t("my.access_token.failed_to_revoke_token", error:), scheme: :danger }
end
# rubocop:enable Rails/ActionControllerFlashBeforeRender
@@ -238,7 +238,7 @@ def write_settings
def handle_email_changes
# If mail changed, expire all other sessions
- if @user.previous_changes['mail']
+ if @user.previous_changes["mail"]
Users::DropTokensService.new(current_user: @user).call!
Sessions::DropOtherSessionsService.call!(@user, session)
diff --git a/app/controllers/oauth/applications_controller.rb b/app/controllers/oauth/applications_controller.rb
index e29720877e22..0d32225d584b 100644
--- a/app/controllers/oauth/applications_controller.rb
+++ b/app/controllers/oauth/applications_controller.rb
@@ -29,8 +29,8 @@
module OAuth
class ApplicationsController < ::ApplicationController
before_action :require_admin
- before_action :new_app, only: %i[new create]
- before_action :find_app, only: %i[edit update show destroy]
+ before_action :find_app, only: %i[edit update show toggle destroy]
+ before_action :prevent_builtin_edits, only: %i[edit update destroy]
layout "admin"
menu_item :oauth_applications
@@ -44,26 +44,35 @@ def show
flash.delete :reveal_secret
end
- def new; end
+ def new
+ @application = ::Doorkeeper::Application.new
+ end
def edit; end
def create
- call = ::OAuth::PersistApplicationService.new(@application, user: current_user)
- .call(permitted_params.oauth_application)
+ call = ::OAuth::Applications::CreateService.new(user: current_user)
+ .call(permitted_params.oauth_application)
+ result = call.result
if call.success?
flash[:notice] = t(:notice_successful_create)
- flash[:_application_secret] = call.result.plaintext_secret
- redirect_to action: :show, id: call.result.id
+ flash[:_application_secret] = result.plaintext_secret
+ redirect_to action: :show, id: result.id
else
+ @application = result
render action: :new
end
end
+ def toggle
+ @application.toggle!(:enabled)
+ redirect_to action: :index
+ end
+
def update
- call = ::OAuth::PersistApplicationService.new(@application, user: current_user)
- .call(permitted_params.oauth_application)
+ call = ::OAuth::Applications::UpdateService.new(model: @application, user: current_user)
+ .call(permitted_params.oauth_application)
if call.success?
flash[:notice] = t(:notice_successful_update)
@@ -75,7 +84,11 @@ def update
end
def destroy
- if @application.destroy
+ call = OAuth::Applications::DeleteService
+ .new(model: @application, user: current_user)
+ .call
+
+ if call.success?
flash[:notice] = t(:notice_successful_delete)
else
flash[:error] = t(:error_can_not_delete_entry)
@@ -94,8 +107,10 @@ def show_local_breadcrumb
private
- def new_app
- @application = ::Doorkeeper::Application.new
+ def prevent_builtin_edits
+ if @application.builtin?
+ render_403
+ end
end
def find_app
diff --git a/app/controllers/concerns/accounts/omniauth_login.rb b/app/controllers/omni_auth_login_controller.rb
similarity index 51%
rename from app/controllers/concerns/accounts/omniauth_login.rb
rename to app/controllers/omni_auth_login_controller.rb
index 93f36f80cc81..62e8569c492b 100644
--- a/app/controllers/concerns/accounts/omniauth_login.rb
+++ b/app/controllers/omni_auth_login_controller.rb
@@ -26,30 +26,27 @@
# See COPYRIGHT and LICENSE files for more details.
#++
-require "uri"
-
-##
-# Intended to be used by the AccountController to handle omniauth logins
-module Accounts::OmniauthLogin
- extend ActiveSupport::Concern
-
- included do
- # disable CSRF protection since that should be covered by the omniauth strategy
- # the other filters are not applicable either since OmniAuth is doing authentication
- # itself
- %i[
- verify_authenticity_token
- user_setup
- check_if_login_required
- check_session_lifetime
- ]
- .each { |key| skip_before_action key, only: [:omniauth_login] }
- no_authorization_required! :omniauth_login, :omniauth_failure
-
- helper :omniauth
- end
+class OmniAuthLoginController < ApplicationController
+ include OmniauthHelper
+ include Accounts::Registration
+ include Accounts::UserLogin
+
+ # disable CSRF protection since that should be covered by the omniauth strategy
+ # the other filters are not applicable either since OmniAuth is doing authentication
+ # itself
+
+ skip_before_action :verify_authenticity_token
+ skip_before_action :user_setup
+ skip_before_action :check_if_login_required
+ skip_before_action :check_session_lifetime
+
+ no_authorization_required! :callback, :failure
- def omniauth_login
+ helper :omniauth
+
+ layout "no_menu"
+
+ def callback
params[:back_url] = omniauth_back_url if remember_back_url?
# Extract auth info and perform check / login or activate user
@@ -57,28 +54,34 @@ def omniauth_login
handle_omniauth_authentication(auth_hash)
end
- def omniauth_failure
- logger.warn(params[:message]) if params[:message]
- show_error I18n.t(:error_external_authentication_failed)
+ def failure
+ log_omniauth_failure
+ show_error I18n.t(:error_external_authentication_failed_message, message: omniauth_error)
end
- def direct_login_provider_url(params = {})
- omniauth_start_url(direct_login_provider, params)
+ private
+
+ def log_omniauth_failure
+ type = request.env["omniauth.error.type"] || "internal"
+ logger.warn "OmniAuth authentication failed (Error #{type}): #{omniauth_error}"
end
- private
+ def omniauth_error
+ message = request.env["omniauth.error"] || request.env["omniauth.error.type"] || request.env["omniauth.error.message"]
+ message&.to_s || "Unknown error"
+ end
def redirect_omniauth_register_modal(user, auth_hash)
# Store a timestamp so we can later make sure that authentication information can
# only be reused for a short time.
- session_info = auth_hash.merge(omniauth: true, timestamp: Time.new)
-
- onthefly_creation_failed(user, session_info)
+ session[:auth_source_registration] = auth_hash.merge(omniauth: true, timestamp: Time.current)
+ @user = user
+ render template: "/account/register"
end
# Avoid remembering the back_url if we're coming from the login page
def remember_back_url?
- return if omniauth_back_url.blank?
+ return false if omniauth_back_url.blank?
account_routes = /\/(login|account)/
omniauth_direct_login? || !omniauth_back_url.match?(account_routes)
@@ -90,30 +93,5 @@ def omniauth_back_url
request.env["omniauth.origin"].presence || params[:RelayState]
end
- def show_error(error)
- flash[:error] = error
- redirect_to action: "login"
- end
-
- def register_via_omniauth(session, user_attributes)
- handle_omniauth_authentication(session[:auth_source_registration], user_params: user_attributes)
- end
-
- def handle_omniauth_authentication(auth_hash, user_params: nil)
- call = ::Authentication::OmniauthService
- .new(strategy: request.env["omniauth.strategy"], auth_hash:, controller: self)
- .call(user_params)
-
- if call.success?
- session[:omniauth_provider] = auth_hash[:provider]
- flash[:notice] = call.message if call.message.present?
- login_user_if_active(call.result, just_registered: call.result.just_created?)
- elsif call.includes_error?(:base, :failed_to_activate)
- redirect_omniauth_register_modal(call.result, auth_hash)
- else
- error = call.message
- Rails.logger.error "Authorization request failed: #{error}"
- show_error error
- end
- end
+ def default_breadcrumb; end
end
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 277bdfdb2984..cca50ade55b8 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -74,7 +74,7 @@ def index # rubocop:disable Format/AbcSize
)
replace_via_turbo_stream(component: Projects::TableComponent.new(query: @query, current_user:, params:))
- current_url = url_for(params.permit(:conroller, :action, :query_id, :filters, :columns, :sortBy, :page, :per_page))
+ current_url = url_for(params.permit(:controller, :action, :query_id, :filters, :columns, :sortBy, :page, :per_page))
turbo_streams << turbo_stream.push_state(current_url)
turbo_streams << turbo_stream.turbo_frame_set_src(
"projects_sidemenu",
diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb
index 8ef5d825ae5b..d4c2e0d08fbb 100644
--- a/app/controllers/roles_controller.rb
+++ b/app/controllers/roles_controller.rb
@@ -97,7 +97,7 @@ def destroy
def report
@roles = roles_scope
- @permissions = OpenProject::AccessControl.permissions.reject(&:public?)
+ @permissions = visible_permissions
end
def bulk_update
@@ -110,7 +110,7 @@ def bulk_update
redirect_to action: "index"
else
@calls = calls
- @permissions = OpenProject::AccessControl.permissions.reject(&:public?)
+ @permissions = visible_permissions
render action: "report"
end
end
@@ -139,6 +139,12 @@ def bulk_update_roles(roles)
end
end
+ def visible_permissions
+ OpenProject::AccessControl.permissions
+ .reject(&:public?)
+ .filter(&:visible?)
+ end
+
def roles_scope
Role.visible.ordered_by_builtin_and_position
end
diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb
index 2041400006d2..fa15c4ef341a 100644
--- a/app/controllers/statuses_controller.rb
+++ b/app/controllers/statuses_controller.rb
@@ -91,7 +91,7 @@ def show_local_breadcrumb
def recompute_progress_values
attributes_triggering_recomputing = ["excluded_from_totals"]
- attributes_triggering_recomputing << "default_done_ratio" if WorkPackage.use_status_for_done_ratio?
+ attributes_triggering_recomputing << "default_done_ratio" if WorkPackage.status_based_mode?
changes = @status.previous_changes.slice(*attributes_triggering_recomputing)
return if changes.empty?
diff --git a/app/controllers/wiki_controller.rb b/app/controllers/wiki_controller.rb
index 4e97b53cb491..95538c1a28ca 100644
--- a/app/controllers/wiki_controller.rb
+++ b/app/controllers/wiki_controller.rb
@@ -261,10 +261,10 @@ def history
def diff
if (@diff = @page.diff(params[:version_to], params[:version_from]))
- @html_diff = HTMLDiff::DiffBuilder.new(
- helpers.format_text(@diff.content_from.data.text, disable_macro_expansion: true),
- helpers.format_text(@diff.content_to.data.text, disable_macro_expansion: true)
- ).build
+ @html_diff = OpenProject::HtmlDiff.from_markdown(
+ @diff.content_from.data.text,
+ @diff.content_to.data.text
+ )
else
render_404
end
diff --git a/app/controllers/work_packages/progress_controller.rb b/app/controllers/work_packages/progress_controller.rb
index 3d1831c70f49..1c77c880417d 100644
--- a/app/controllers/work_packages/progress_controller.rb
+++ b/app/controllers/work_packages/progress_controller.rb
@@ -37,24 +37,18 @@ class WorkPackages::ProgressController < ApplicationController
layout false
authorization_checked! :new, :edit, :create, :update
- helper_method :modal_class
-
def new
make_fake_initial_work_package
set_progress_attributes_to_work_package
- render modal_class.new(@work_package,
- focused_field: params[:field],
- touched_field_map:)
+ render progress_modal_component
end
def edit
find_work_package
set_progress_attributes_to_work_package
- render modal_class.new(@work_package,
- focused_field: params[:field],
- touched_field_map:)
+ render progress_modal_component
end
# rubocop:disable Metrics/AbcSize
@@ -71,13 +65,11 @@ def create
# Angular has context as to the success or failure of
# the request in order to fetch the new set of Work Package
# attributes in the ancestry solely on success.
- render :update, status: :unprocessable_entity
+ render turbo_stream: [
+ turbo_stream.morph("work_package_progress_modal", progress_modal_component)
+ ], status: :unprocessable_entity
end
end
- # following 3 lines to be removed in 15.0 with :percent_complete_edition feature flag removal
- elsif !OpenProject::FeatureDecisions.percent_complete_edition_active?
- render json: { estimatedTime: formatted_duration(@work_package.estimated_hours),
- remainingTime: formatted_duration(@work_package.remaining_hours) }
else
render json: { estimatedTime: formatted_duration(@work_package.estimated_hours),
remainingTime: formatted_duration(@work_package.remaining_hours),
@@ -95,7 +87,9 @@ def update
if service_call.success?
respond_to do |format|
- format.turbo_stream
+ format.turbo_stream do
+ render turbo_stream: []
+ end
end
else
respond_to do |format|
@@ -104,7 +98,9 @@ def update
# Angular has context as to the success or failure of
# the request in order to fetch the new set of Work Package
# attributes in the ancestry solely on success.
- render :update, status: :unprocessable_entity
+ render turbo_stream: [
+ turbo_stream.morph("work_package_progress_modal", progress_modal_component)
+ ], status: :unprocessable_entity
end
end
end
@@ -112,14 +108,22 @@ def update
private
+ def progress_modal_component
+ modal_class.new(@work_package, focused_field:, touched_field_map:)
+ end
+
def modal_class
- if WorkPackage.use_status_for_done_ratio?
+ if WorkPackage.status_based_mode?
WorkPackages::Progress::StatusBased::ModalBodyComponent
else
WorkPackages::Progress::WorkBased::ModalBodyComponent
end
end
+ def focused_field
+ params[:field]
+ end
+
def find_work_package
@work_package = WorkPackage.visible.find(params[:work_package_id])
end
@@ -153,11 +157,8 @@ def allowed_touched_params
end
def allowed_params
- if WorkPackage.use_status_for_done_ratio?
+ if WorkPackage.status_based_mode?
%i[estimated_hours status_id]
- # two next lines to be removed in 15.0 with :percent_complete_edition feature flag removal
- elsif !OpenProject::FeatureDecisions.percent_complete_edition_active?
- %i[estimated_hours remaining_hours]
else
%i[estimated_hours remaining_hours done_ratio]
end
diff --git a/app/forms/application_form.rb b/app/forms/application_form.rb
new file mode 100644
index 000000000000..4438a280917e
--- /dev/null
+++ b/app/forms/application_form.rb
@@ -0,0 +1,42 @@
+# frozen_string_literal: true
+
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+class ApplicationForm < Primer::Forms::Base
+ def self.settings_form
+ form do |f|
+ f = SettingsFormDecorator.new(f)
+ yield f
+ end
+ end
+
+ def url_helpers
+ Rails.application.routes.url_helpers
+ end
+end
diff --git a/app/forms/projects/custom_fields/custom_field_mapping_form.rb b/app/forms/projects/custom_fields/custom_field_mapping_form.rb
index cda7e1c10e42..f637ea059934 100644
--- a/app/forms/projects/custom_fields/custom_field_mapping_form.rb
+++ b/app/forms/projects/custom_fields/custom_field_mapping_form.rb
@@ -44,7 +44,7 @@ class CustomFieldMappingForm < ApplicationForm
multiple: true,
dropdownPosition: "bottom",
disabledProjects: projects_with_custom_field_mapping,
- inputName: "project_custom_field_project_mapping[project_ids]"
+ inputName: "#{input_name}[project_ids]"
}
)
@@ -73,10 +73,18 @@ def project_ids_error_message
end
def projects_with_custom_field_mapping
- ProjectCustomFieldProjectMapping
+ join_table
.where(custom_field_id: @project_mapping.custom_field_id)
.pluck(:project_id)
.to_h { |id| [id, id] }
end
+
+ def join_table
+ @project_mapping.class
+ end
+
+ def input_name
+ join_table.model_name.singular
+ end
end
end
diff --git a/app/forms/settings_form_decorator.rb b/app/forms/settings_form_decorator.rb
new file mode 100644
index 000000000000..d7601d7816f5
--- /dev/null
+++ b/app/forms/settings_form_decorator.rb
@@ -0,0 +1,200 @@
+# frozen_string_literal: true
+
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+# Decorates a form object to provide a more convenient interface for
+# rendering settings.
+#
+# It automatically sets the label, value, and disabled properties from the
+# setting name and its definition attributes.
+class SettingsFormDecorator
+ attr_reader :form
+
+ # Initializes a new SettingsFormDecorator
+ #
+ # @param form [Object] The form object to be decorated
+ def initialize(form)
+ @form = form
+ end
+
+ def method_missing(method, ...)
+ form.send(method, ...)
+ end
+
+ def respond_to_missing?(method, include_private = false)
+ form.respond_to?(method, include_private)
+ end
+
+ # Creates a text field input for a setting.
+ #
+ # The text field label is set from translating the key "setting_".
+ #
+ # Any options passed to this method will override the default options.
+ #
+ # @param name [Symbol] The name of the setting
+ # @param options [Hash] Additional options for the text field
+ # @return [Object] The text field input
+ def text_field(name:, **options)
+ options.reverse_merge!(
+ label: setting_label(name),
+ value: setting_value(name),
+ disabled: setting_disabled?(name)
+ )
+ form.text_field(name:, **options)
+ end
+
+ # Creates a check box input for a setting.
+ #
+ # The check box label is set from translating the key "setting_".
+ #
+ # Any options passed to this method will override the default options.
+ #
+ # @param name [Symbol] The name of the setting
+ # @param options [Hash] Additional options for the check box
+ # @return [Object] The check box input
+ def check_box(name:, **options)
+ options.reverse_merge!(
+ label: setting_label(name),
+ checked: setting_value(name),
+ disabled: setting_disabled?(name)
+ )
+ form.check_box(name:, **options)
+ end
+
+ # Creates a radio button group for a setting.
+ #
+ # The radio button group label is set from translating the key
+ # "setting_". The radio button label are set from translating the
+ # key "setting__". The caption is set from translating the
+ # key "setting___caption_html", which will be rendered as HTML,
+ # or "setting___caption", or nothing if none of the above
+ # are defined.
+ #
+ # Any options passed to this method will override the default options.
+ #
+ # @param name [Symbol] The name of the setting
+ # @param values [Array] The values for the radio buttons. Default to the
+ # setting's allowed values.
+ # @param disabled [Boolean] Force the radio button group to be disabled when
+ # true, will be disabled if the setting is not writable when false (default)
+ # @param button_options [Hash] Options for individual radio buttons
+ # @param options [Hash] Additional options for the radio button group
+ # @return [Object] The radio button group
+ def radio_button_group(name:, values: [], disabled: false, button_options: {}, **options)
+ values = values.presence || setting_allowed_values(name)
+ radio_group_options = options.reverse_merge(
+ label: setting_label(name),
+ disabled: disabled || setting_disabled?(name)
+ )
+ form.radio_button_group(
+ name:,
+ **radio_group_options
+ ) do |radio_group|
+ values.each do |value|
+ radio_group.radio_button(
+ **button_options.reverse_merge(
+ value:,
+ checked: setting_value(name) == value,
+ autocomplete: "off",
+ label: setting_label(name, value),
+ caption: setting_caption(name, value)
+ )
+ )
+ end
+ end
+ end
+
+ # Creates a save button to submit the form
+ #
+ # @return [Object] The submit button
+ def submit
+ form.submit(name: "submit",
+ label: I18n.t("button_save"),
+ scheme: :primary)
+ end
+
+ protected
+
+ # Returns a translated string for a setting name.
+ #
+ # The translation key is "setting_". Add additional names to the key
+ # to allow for translations with more context:
+ # "setting____...".
+ #
+ # @param names [Array] The name(s) of the setting
+ # @return [String] The translated label
+ def setting_label(*names)
+ I18n.t("setting_#{names.join('_')}")
+ end
+
+ # Generates an HTML-safe caption for a setting.
+ #
+ # The translation key is "setting__caption". If not present, it will
+ # return nil.
+ #
+ # The translation will be marked as html_safe automatically if it ends with
+ # "_html", allowing to have HTML in the caption.
+ #
+ # Add additional names to the key to allow for translations with more context:
+ # "setting___caption_html" for instance.
+ #
+ # @param names [Array] The name(s) of the setting
+ # @return [String] The translated HTML-safe caption
+ def setting_caption(*names)
+ I18n.t("setting_#{names.join('_')}_caption_html", default: nil)&.html_safe \
+ || I18n.t("setting_#{names.join('_')}_caption", default: nil)
+ end
+
+ # Retrieves the current value of a setting
+ #
+ # @param name [Symbol] The name of the setting
+ # @return [Object] The value of the setting
+ def setting_value(name)
+ Setting[name]
+ end
+
+ # Retrieves the allowed values for a setting's definition
+ #
+ # @param name [Symbol] The name of the setting
+ # @return [Array] The allowed values for the setting
+ def setting_allowed_values(name)
+ Settings::Definition[name].allowed
+ end
+
+ # Checks if a setting is disabled.
+ #
+ # Any non-writable setting set by environment variables will be considered
+ # disabled.
+ #
+ # @param name [Symbol] The name of the setting
+ # @return [Boolean] `true` if the setting is disabled, `false` otherwise
+ def setting_disabled?(name)
+ !Setting.send(:"#{name}_writable?")
+ end
+end
diff --git a/app/forms/work_packages/pre_14_4_progress_form.rb b/app/forms/work_packages/pre_14_4_progress_form.rb
deleted file mode 100644
index 2127f3fdb343..000000000000
--- a/app/forms/work_packages/pre_14_4_progress_form.rb
+++ /dev/null
@@ -1,213 +0,0 @@
-# -- copyright
-# OpenProject is an open source project management software.
-# Copyright (C) 2010-2024 the OpenProject GmbH
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License version 3.
-#
-# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
-# Copyright (C) 2006-2013 Jean-Philippe Lang
-# Copyright (C) 2010-2013 the ChiliProject Team
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# See COPYRIGHT and LICENSE files for more details.
-# ++
-
-# This file can be safely deleted once the feature flag :percent_complete_edition
-# is removed, which should happen for OpenProject 15.0 release.
-#
-# Copied from commit 109b135b and modified to have the [work_package][initial]
-# data needed by progress_controller
-class WorkPackages::Pre144ProgressForm < ApplicationForm
- ##
- # Primer::Forms::BaseComponent or ApplicationForm will always autofocus the
- # first input field with an error present on it. Despite this behavior being
- # a11y-friendly, it breaks the modal's UX when an invalid input field
- # is rendered.
- #
- # The reason for this is since we're implementing a "format on blur", when
- # we make a request to the server that will set an input field in an invalid
- # state and it is returned as such, any time we blur this autofocused field,
- # we'll perform another request that will still have the input in an invalid
- # state causing it to autofocus again and preventing us from leaving this
- # "limbo state".
- ##
- def before_render
- # no-op
- end
-
- attr_reader :work_package, :mode
-
- def initialize(work_package:,
- mode: :work_based,
- focused_field: :remaining_hours,
- touched_field_map: {})
- super()
-
- @work_package = work_package
- @mode = mode
- @focused_field = focused_field_by_selection(focused_field)
- @touched_field_map = touched_field_map
- ensure_only_one_error_for_remaining_work_exceeding_work
- end
-
- form do |query_form|
- query_form.group(layout: :horizontal) do |group|
- if mode == :status_based
- select_field_options = { name: :status_id, label: I18n.t(:label_percent_complete) }.tap do |options|
- options.reverse_merge!(default_field_options(:status_id))
- options.merge!(disabled: @work_package.new_record?)
- end
-
- group.select_list(**select_field_options) do |select_list|
- WorkPackages::UpdateContract.new(@work_package, User.current)
- .assignable_statuses
- .find_each do |status|
- select_list.option(
- label: "#{status.name} (#{status.default_done_ratio}%)",
- value: status.id
- )
- end
- end
-
- render_text_field(group, name: :estimated_hours, label: I18n.t(:label_work))
- render_readonly_text_field(group, name: :remaining_hours, label: I18n.t(:label_remaining_work))
-
- # Add a hidden field in create forms as the select field is disabled and is otherwise not included in the form payload
- group.hidden(name: :status_id) if @work_package.new_record?
-
- group.hidden(name: :status_id_touched,
- value: @touched_field_map["status_id_touched"] || false,
- data: { "work-packages--progress--touched-field-marker-target": "touchedFieldInput",
- "referrer-field": "work_package[status_id]" })
- group.hidden(name: :estimated_hours_touched,
- value: @touched_field_map["estimated_hours_touched"] || false,
- data: { "work-packages--progress--touched-field-marker-target": "touchedFieldInput",
- "referrer-field": "work_package[estimated_hours]" })
- else
- render_text_field(group, name: :estimated_hours, label: I18n.t(:label_work))
- render_text_field(group, name: :remaining_hours, label: I18n.t(:label_remaining_work),
- disabled: disabled_remaining_work_field?)
- render_readonly_text_field(group, name: :done_ratio, label: I18n.t(:label_percent_complete))
-
- group.hidden(name: :estimated_hours_touched,
- value: @touched_field_map["estimated_hours_touched"] || false,
- data: { "work-packages--progress--touched-field-marker-target": "touchedFieldInput",
- "referrer-field": "work_package[estimated_hours]" })
- group.hidden(name: :remaining_hours_touched,
- value: @touched_field_map["remaining_hours_touched"] || false,
- data: { "work-packages--progress--touched-field-marker-target": "touchedFieldInput",
- "referrer-field": "work_package[remaining_hours]" })
- end
- group.fields_for(:initial) do |builder|
- ::WorkPackages::ProgressForm::InitialValuesForm.new(builder, work_package:, mode:)
- end
- end
- end
-
- private
-
- def ensure_only_one_error_for_remaining_work_exceeding_work
- if work_package.errors.added?(:remaining_hours, :cant_exceed_work) &&
- work_package.errors.added?(:estimated_hours, :cant_be_inferior_to_remaining_work)
- error_to_delete =
- if @focused_field == :estimated_hours
- :remaining_hours
- else
- :estimated_hours
- end
- work_package.errors.delete(error_to_delete)
- end
- end
-
- def focused_field_by_selection(field)
- if field == :remaining_hours && disabled_remaining_work_field?
- :estimated_hours
- else
- field
- end
- end
-
- def render_text_field(group,
- name:,
- label:,
- disabled: false,
- placeholder: nil)
- text_field_options = {
- name:,
- value: field_value(name),
- label:,
- disabled:,
- placeholder:
- }
- text_field_options.reverse_merge!(default_field_options(name))
-
- group.text_field(**text_field_options)
- end
-
- def render_readonly_text_field(group,
- name:,
- label:,
- disabled: false,
- placeholder: true)
- text_field_options = {
- name:,
- value: field_value(name),
- label:,
- readonly: true,
- disabled:,
- classes: "input--readonly",
- placeholder: ("-" if placeholder)
- }
- text_field_options.reverse_merge!(default_field_options(name))
-
- group.text_field(**text_field_options)
- end
-
- def field_value(name)
- errors = @work_package.errors.where(name)
- if (user_value = errors.map { |error| error.options[:value] }.find { !_1.nil? })
- user_value
- elsif name == :done_ratio
- format_to_smallest_fractional_part(@work_package.public_send(name))
- else
- DurationConverter.output(@work_package.public_send(name))
- end
- end
-
- def format_to_smallest_fractional_part(number)
- return number if number.nil?
-
- number % 1 == 0 ? number.to_i : number
- end
-
- def default_field_options(name)
- data = { "work-packages--progress--preview-progress-target": "progressInput",
- "work-packages--progress--touched-field-marker-target": "progressInput",
- action: "input->work-packages--progress--touched-field-marker#markFieldAsTouched" }
-
- if @focused_field == name
- data[:"work-packages--progress--focus-field-target"] = "fieldToFocus"
- end
- { data: }
- end
-
- # Remaining work field is enabled when work is set, or when there are errors
- # on fields so that they can be corrected.
- def disabled_remaining_work_field?
- @work_package.estimated_hours.nil? && @work_package.errors.empty?
- end
-end
diff --git a/app/forms/work_packages/progress_form.rb b/app/forms/work_packages/progress_form.rb
index 61eecfa284b5..5c9e82679446 100644
--- a/app/forms/work_packages/progress_form.rb
+++ b/app/forms/work_packages/progress_form.rb
@@ -151,6 +151,7 @@ def readonly_text_field(group,
name:,
value: field_value(name),
label:,
+ caption: field_hint_message(name),
readonly: true,
classes: "input--readonly",
placeholder: ("-" if placeholder)
@@ -162,8 +163,8 @@ def readonly_text_field(group,
def hidden_touched_field(group, name:)
group.hidden(name: :"#{name}_touched",
value: touched(name),
- data: { "work-packages--progress--touched-field-marker-target": "touchedFieldInput",
- "referrer-field": "work_package[#{name}]" })
+ data: { "work-packages--progress--preview-target": "touchedFieldInput",
+ "referrer-field": name })
end
def touched(name)
@@ -182,10 +183,7 @@ def field_value(name)
end
def field_hint_message(field_name)
- hint = work_package.derived_progress_hints[field_name]
- return if hint.nil?
-
- I18n.t("work_package.progress.derivation_hints.#{field_name}.#{hint}")
+ work_package.derived_progress_hint(field_name)&.message
end
def validation_message(name)
@@ -199,12 +197,11 @@ def as_percent(value)
end
def default_field_options(name)
- data = { "work-packages--progress--preview-progress-target": "progressInput",
- "work-packages--progress--touched-field-marker-target": "progressInput",
- action: "input->work-packages--progress--touched-field-marker#markFieldAsTouched" }
+ data = { "work-packages--progress--preview-target": "progressInput",
+ action: "work-packages--progress--preview#markFieldAsTouched" }
if @focused_field == name
- data[:"work-packages--progress--focus-field-target"] = "fieldToFocus"
+ data[:focus] = "true"
end
{ data: }
end
diff --git a/app/forms/work_packages/progress_form/initial_values_form.rb b/app/forms/work_packages/progress_form/initial_values_form.rb
index 6ffe9618b536..16217e53214a 100644
--- a/app/forms/work_packages/progress_form/initial_values_form.rb
+++ b/app/forms/work_packages/progress_form/initial_values_form.rb
@@ -45,9 +45,6 @@ def initialize(work_package:,
else
hidden_initial_field(form, name: :estimated_hours)
hidden_initial_field(form, name: :remaining_hours)
- # next line to be removed in 15.0 with :percent_complete_edition feature flag removal
- next unless OpenProject::FeatureDecisions.percent_complete_edition_active?
-
hidden_initial_field(form, name: :done_ratio)
end
end
@@ -57,8 +54,8 @@ def initialize(work_package:,
def hidden_initial_field(form, name:)
form.hidden(name:,
value: work_package.public_send(:"#{name}_was"),
- data: { "work-packages--progress--touched-field-marker-target": "initialValueInput",
- "referrer-field": "work_package[#{name}]" })
+ data: { "work-packages--progress--preview-target": "initialValueInput",
+ "referrer-field": name })
end
end
end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 85cea8735937..fbeabfd68b2e 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -33,6 +33,7 @@ module ApplicationHelper
include OpenProject::TextFormatting
include OpenProject::ObjectLinking
include OpenProject::SafeParams
+ include OpPrimer::FormHelpers
include I18n
include ERB::Util
include Redmine::I18n
@@ -63,7 +64,7 @@ def link_to_if_authorized(*args, &)
html_options = args.shift
parameters_for_method_reference = args
- return unless authorize_for(options[:controller] || params[:controller], options[:action])
+ return unless authorize_for(options[:controller] || controller_path, options[:action])
if block_given?
link_to(options, html_options, *parameters_for_method_reference, &)
@@ -179,13 +180,13 @@ def html_hours(text)
def html_safe_gsub(string, *gsub_args, &)
html_safe = string.html_safe?
- string.gsub(*gsub_args, &)
+ result = string.gsub(*gsub_args, &)
# We only mark the string as safe if the previous string was already safe
if html_safe
- string.html_safe # rubocop:disable Rails/OutputSafety
+ result.html_safe # rubocop:disable Rails/OutputSafety
else
- string
+ result
end
end
@@ -241,11 +242,11 @@ def other_formats_links(&)
# Returns the theme, controller name, and action as css classes for the
# HTML body.
def body_css_classes
- css = ["theme-" + OpenProject::CustomStyles::Design.identifier.to_s]
+ css = ["theme-#{OpenProject::CustomStyles::Design.identifier}"]
- if params[:controller] && params[:action]
- css << ("controller-" + params[:controller])
- css << ("action-" + params[:action])
+ if controller_path && action_name
+ css << ("controller-#{controller_path}")
+ css << ("action-#{action_name}")
end
css << "ee-banners-#{EnterpriseToken.show_banners? ? 'visible' : 'hidden'}"
diff --git a/app/helpers/custom_styles_helper.rb b/app/helpers/custom_styles_helper.rb
index 3e5ed2446468..86d1b6519c88 100644
--- a/app/helpers/custom_styles_helper.rb
+++ b/app/helpers/custom_styles_helper.rb
@@ -27,6 +27,29 @@
#++
module CustomStylesHelper
+ def design_tabs
+ [
+ {
+ name: "interface",
+ partial: "custom_styles/interface",
+ path: custom_style_path(tab: :interface),
+ label: t(:"admin.custom_styles.tab_interface")
+ },
+ {
+ name: "branding",
+ partial: "custom_styles/branding",
+ path: custom_style_path(tab: :branding),
+ label: t(:"admin.custom_styles.tab_branding")
+ },
+ {
+ name: "pdf_export_styles",
+ partial: "custom_styles/pdf_export_styles",
+ path: custom_style_path(tab: :pdf_export_styles),
+ label: t(:"admin.custom_styles.tab_pdf_export_styles")
+ }
+ ]
+ end
+
def apply_custom_styles?(skip_ee_check: OpenProject::Configuration.bim?)
# Apply custom styles either if EE allows OR we are on a BIM edition with the BIM theme active.
CustomStyle.current.present? &&
diff --git a/app/helpers/flash_messages_helper.rb b/app/helpers/flash_messages_helper.rb
index d05d75608864..0e8b668c9352 100644
--- a/app/helpers/flash_messages_helper.rb
+++ b/app/helpers/flash_messages_helper.rb
@@ -34,26 +34,10 @@ module FlashMessagesHelper
include FlashMessagesOutputSafetyHelper
end
- def render_primer_banner_message?
- flash[:primer_banner].present?
- end
-
- def render_primer_banner_message
- return unless render_primer_banner_message?
-
- render(BannerMessageComponent.new(**flash[:primer_banner].to_hash))
- end
-
- # Primer's flash message component wrapped in a component which is empty initially but can be updated via turbo stream
- def render_streameable_primer_banner_message
- render(FlashMessageComponent.new)
- end
-
# Renders flash messages
def render_flash_messages
- return if render_primer_banner_message?
-
messages = flash
+ .reject { |k, _| k.to_s == "op_primer_flash" }
.reject { |k, _| k.start_with? "_" }
.map do |k, v|
if k.to_sym == :modal
diff --git a/app/helpers/omniauth_helper.rb b/app/helpers/omniauth_helper.rb
index f716e973de81..9045ebd43648 100644
--- a/app/helpers/omniauth_helper.rb
+++ b/app/helpers/omniauth_helper.rb
@@ -31,6 +31,10 @@ def omniauth_direct_login?
direct_login_provider.is_a? String
end
+ def direct_login_provider_url(params = {})
+ omni_auth_start_url(direct_login_provider, params)
+ end
+
##
# Per default the user may choose the usual password login as well as several omniauth providers
# on the login page and in the login drop down menu.
diff --git a/app/helpers/pagination_helper.rb b/app/helpers/pagination_helper.rb
index 7792aca72f6d..c8a53aaadc42 100644
--- a/app/helpers/pagination_helper.rb
+++ b/app/helpers/pagination_helper.rb
@@ -111,25 +111,18 @@ def per_page_links(paginator, options)
# Prefers page over the other two and
# calculates page in it's absence based on limit and offset.
# Return 1 if all else fails.
-
def page_param(options = params)
page = if options[:page]
-
options[:page].to_i
-
elsif options[:offset] && options[:limit]
-
begin
# + 1 as page is not 0 but 1 based
(options[:offset].to_i / per_page_param(options)) + 1
rescue ZeroDivisionError
1
end
-
else
-
1
-
end
if page > 0
@@ -141,12 +134,11 @@ def page_param(options = params)
# Returns per_page option used for pagination
# based on:
- # * per_page session value
# * per_page options value
+ # * per_page session value
# * limit options value
# in that order
# Return smallest possible setting if all else fails.
-
def per_page_param(options = params)
per_page_candidates = [options[:per_page].to_i, session[:per_page].to_i, options[:limit].to_i]
diff --git a/modules/meeting/app/controllers/concerns/application_component_streams.rb b/app/helpers/primerized_flash_helper.rb
similarity index 78%
rename from modules/meeting/app/controllers/concerns/application_component_streams.rb
rename to app/helpers/primerized_flash_helper.rb
index 1d4b1b854704..ffe46356ab35 100644
--- a/modules/meeting/app/controllers/concerns/application_component_streams.rb
+++ b/app/helpers/primerized_flash_helper.rb
@@ -25,19 +25,19 @@
#
# See COPYRIGHT and LICENSE files for more details.
#++
+#
-module ApplicationComponentStreams
+module PrimerizedFlashHelper
extend ActiveSupport::Concern
- included do
- def render_error_flash_message_via_turbo_stream(**kwargs)
- update_flash_message_via_turbo_stream(**kwargs.merge(scheme: :danger, icon: :stop))
- end
+ def render_primerized_flash
+ return if flash[:op_primer_flash].blank?
+
+ system_arguments = flash[:op_primer_flash]
+ message = system_arguments.delete(:message)
- def update_flash_message_via_turbo_stream(**)
- replace_via_turbo_stream(
- component: FlashMessageComponent.new(**)
- )
+ render(OpPrimer::FlashComponent.new(**system_arguments)) do
+ message
end
end
end
diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb
index d34f4aab9b42..33f22971aeb5 100644
--- a/app/helpers/settings_helper.rb
+++ b/app/helpers/settings_helper.rb
@@ -32,39 +32,12 @@ module SettingsHelper
extend self
include OpenProject::FormTagHelper
- def system_settings_tabs
- [
- {
- name: "general",
- controller: "/admin/settings/general_settings",
- label: :label_general
- },
- {
- name: "languages",
- controller: "/admin/settings/languages_settings",
- label: :label_languages
- },
- {
- name: "projects",
- controller: "/admin/settings/projects_settings",
- label: :label_project_plural
- },
- {
- name: "repositories",
- controller: "/admin/settings/repositories_settings",
- label: :label_repository_plural
- },
- {
- name: "experimental",
- controller: "/admin/settings/experimental_settings",
- label: :label_experimental
- }
- ]
- end
-
def setting_select(setting, choices, options = {})
- if blank_text = options.delete(:blank)
- choices = [[blank_text.is_a?(Symbol) ? I18n.t(blank_text) : blank_text, ""]] + choices
+ blank_text = options.delete(:blank)
+
+ if blank_text
+ translated_blank = blank_text.is_a?(Symbol) ? I18n.t(blank_text) : blank_text
+ choices.unshift([translated_blank, ""])
end
setting_label(setting, options) +
diff --git a/app/helpers/wiki_helper.rb b/app/helpers/wiki_helper.rb
index 8be019496d02..897db6b44830 100644
--- a/app/helpers/wiki_helper.rb
+++ b/app/helpers/wiki_helper.rb
@@ -58,10 +58,6 @@ def breadcrumb_for_page(page, action = nil)
breadcrumb_paths(*paths)
end
- def nl2br(content)
- content.gsub(/(?:\n\r?|\r\n?)/, " ").html_safe
- end
-
private
def wiki_page_options_for_select_of_level(pages,
diff --git a/app/helpers/work_packages/split_view_helper.rb b/app/helpers/work_packages/split_view_helper.rb
index b4e80d882d51..5f82668bd199 100644
--- a/app/helpers/work_packages/split_view_helper.rb
+++ b/app/helpers/work_packages/split_view_helper.rb
@@ -1,10 +1,6 @@
module WorkPackages::SplitViewHelper
- def optional_work_package_split_view
- return unless params[:work_package_split_view]
-
- content_for :content_body_right do
- render split_view_instance
- end
+ def render_work_package_split_view?
+ params[:work_package_split_view].present?
end
def split_view_instance
diff --git a/app/models/custom_actions/actions/done_ratio.rb b/app/models/custom_actions/actions/done_ratio.rb
index 894b22d0ee53..52bad025bc87 100644
--- a/app/models/custom_actions/actions/done_ratio.rb
+++ b/app/models/custom_actions/actions/done_ratio.rb
@@ -46,7 +46,7 @@ def maximum
end
def self.all
- if WorkPackage.use_field_for_done_ratio?
+ if WorkPackage.work_based_mode?
super
else
[]
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb
index e8ba5ecaa3cd..076d972709d4 100644
--- a/app/models/custom_field.rb
+++ b/app/models/custom_field.rb
@@ -69,6 +69,9 @@ def uniqueness_of_name_with_scope
validates :min_length, numericality: { less_than_or_equal_to: :max_length, message: :smaller_than_or_equal_to_max_length },
unless: Proc.new { |cf| cf.max_length.blank? }
+ validates :multi_value, absence: true, unless: :multi_value_possible?
+ validates :allow_non_open_versions, absence: true, unless: :allow_non_open_versions_possible?
+
before_validation :check_searchability
after_destroy :destroy_help_text
@@ -265,6 +268,10 @@ def list?
field_format == "list"
end
+ def user?
+ field_format == "user"
+ end
+
def version?
field_format == "version"
end
@@ -277,22 +284,12 @@ def boolean?
field_format == "bool"
end
- def multi_value?
- multi_value
- end
-
def multi_value_possible?
- %w[version user list].include?(field_format) &&
- [ProjectCustomField, WorkPackageCustomField, TimeEntryCustomField, VersionCustomField].include?(self.class)
- end
-
- def allow_non_open_versions?
- allow_non_open_versions
+ version? || user? || list?
end
def allow_non_open_versions_possible?
- version? &&
- [ProjectCustomField, WorkPackageCustomField, TimeEntryCustomField, VersionCustomField].include?(self.class)
+ version?
end
##
diff --git a/app/models/custom_field/order_statements.rb b/app/models/custom_field/order_statements.rb
index e13a19a9f306..c4be1d1fc81c 100644
--- a/app/models/custom_field/order_statements.rb
+++ b/app/models/custom_field/order_statements.rb
@@ -38,12 +38,8 @@ def order_statements
else
[select_custom_option_position]
end
- when "string", "text", "date", "bool", "link"
- if multi_value?
- [select_custom_values_as_group]
- else
- [coalesce_select_custom_value_as_string]
- end
+ when "string", "date", "bool", "link"
+ [coalesce_select_custom_value_as_string]
when "int", "float"
# Make the database cast values into numeric
# Postgresql will raise an error if a value can not be casted!
diff --git a/app/models/exports/concerns/csv.rb b/app/models/exports/concerns/csv.rb
index cc1c7b59e542..859e6e0ccaa6 100644
--- a/app/models/exports/concerns/csv.rb
+++ b/app/models/exports/concerns/csv.rb
@@ -53,7 +53,7 @@ def success(serialized)
::Exports::Result
.new format: :csv,
title: csv_export_filename,
- content: serialized,
+ content: "\xEF\xBB\xBF#{serialized}", # Make Excel open CSV happy by append UTF8 BOM
mime_type: "text/csv"
end
diff --git a/app/models/journal.rb b/app/models/journal.rb
index d393198b9132..6a004db89db5 100644
--- a/app/models/journal.rb
+++ b/app/models/journal.rb
@@ -77,6 +77,7 @@ class Journal < ApplicationRecord
progress_mode_changed_to_status_based
status_changed
system_update
+ total_percent_complete_mode_changed_to_work_weighted_average
work_package_children_changed_times
work_package_parent_changed_times
work_package_predecessor_changed_times
diff --git a/app/models/journal/caused_by_total_percent_complete_mode_changed_to_simple_average.rb b/app/models/journal/caused_by_total_percent_complete_mode_changed_to_simple_average.rb
new file mode 100644
index 000000000000..2adcf77163df
--- /dev/null
+++ b/app/models/journal/caused_by_total_percent_complete_mode_changed_to_simple_average.rb
@@ -0,0 +1,33 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+class Journal::CausedByTotalPercentCompleteModeChangedToSimpleAverage < CauseOfChange::Base
+ def initialize
+ super("total_percent_complete_mode_changed_to_simple_average")
+ end
+end
diff --git a/app/models/journal/caused_by_total_percent_complete_mode_changed_to_work_weighted_average.rb b/app/models/journal/caused_by_total_percent_complete_mode_changed_to_work_weighted_average.rb
new file mode 100644
index 000000000000..b1d2ce41a29c
--- /dev/null
+++ b/app/models/journal/caused_by_total_percent_complete_mode_changed_to_work_weighted_average.rb
@@ -0,0 +1,33 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+class Journal::CausedByTotalPercentCompleteModeChangedToWorkWeightedAverage < CauseOfChange::Base
+ def initialize
+ super("total_percent_complete_mode_changed_to_work_weighted_average")
+ end
+end
diff --git a/app/models/permitted_params.rb b/app/models/permitted_params.rb
index 6507f0ae91dc..944f962afaa4 100644
--- a/app/models/permitted_params.rb
+++ b/app/models/permitted_params.rb
@@ -549,6 +549,7 @@ def self.permitted_attributes
:name,
:redirect_uri,
:confidential,
+ :enabled,
:client_credentials_user_id,
{ scopes: [] }
],
diff --git a/app/models/projects/exports/query_exporter.rb b/app/models/projects/exports/query_exporter.rb
index a26d2ec7e69e..e4a110afd9bf 100644
--- a/app/models/projects/exports/query_exporter.rb
+++ b/app/models/projects/exports/query_exporter.rb
@@ -32,7 +32,7 @@ class QueryExporter < Exports::Exporter
alias :query :object
def columns
- @columns ||= (forced_columns + selected_columns)
+ @columns ||= selected_columns
end
def page
@@ -51,13 +51,6 @@ def projects
private
- def forced_columns
- [
- { name: :id, caption: Project.human_attribute_name(:id) },
- { name: :identifier, caption: Project.human_attribute_name(:identifier) }
- ]
- end
-
def selected_columns
query
.selects
diff --git a/app/models/projects/scopes/available_custom_fields.rb b/app/models/projects/scopes/available_custom_fields.rb
index 8d5860250afb..e8a18cbd97be 100644
--- a/app/models/projects/scopes/available_custom_fields.rb
+++ b/app/models/projects/scopes/available_custom_fields.rb
@@ -32,20 +32,30 @@ module AvailableCustomFields
class_methods do
def with_available_custom_fields(custom_field_ids)
- subquery = project_custom_fields_project_mapping_subquery(custom_field_ids:)
- where(id: subquery)
+ where(id: project_custom_fields_join_table_subquery(custom_field_ids:))
+ end
+
+ def with_available_project_custom_fields(custom_field_ids)
+ where(id: project_custom_fields_project_mapping_subquery(custom_field_ids:))
end
def without_available_custom_fields(custom_field_ids)
- subquery = project_custom_fields_project_mapping_subquery(custom_field_ids:)
- where.not(id: subquery)
+ where.not(id: project_custom_fields_join_table_subquery(custom_field_ids:))
+ end
+
+ def without_available_project_custom_fields(custom_field_ids)
+ where.not(id: project_custom_fields_project_mapping_subquery(custom_field_ids:))
end
private
def project_custom_fields_project_mapping_subquery(custom_field_ids:)
- ProjectCustomFieldProjectMapping.select(:project_id)
- .where(custom_field_id: custom_field_ids)
+ project_custom_fields_join_table_subquery(custom_field_ids:, join_table: ProjectCustomFieldProjectMapping)
+ end
+
+ def project_custom_fields_join_table_subquery(custom_field_ids:, join_table: CustomFieldsProject)
+ join_table.select(:project_id)
+ .where(custom_field_id: custom_field_ids)
end
end
end
diff --git a/app/models/queries/projects.rb b/app/models/queries/projects.rb
index f1dc49b0b1ca..bb25098c5322 100644
--- a/app/models/queries/projects.rb
+++ b/app/models/queries/projects.rb
@@ -30,6 +30,7 @@ module Queries::Projects
::Queries::Register.register(ProjectQuery) do
filter Filters::AncestorFilter
filter Filters::AvailableProjectAttributesFilter
+ filter Filters::AvailableCustomFieldsProjectsFilter
filter Filters::TypeFilter
filter Filters::ActiveFilter
filter Filters::TemplatedFilter
diff --git a/app/models/queries/projects/filters/available_custom_fields_projects_filter.rb b/app/models/queries/projects/filters/available_custom_fields_projects_filter.rb
new file mode 100644
index 000000000000..0aa5a0d9531d
--- /dev/null
+++ b/app/models/queries/projects/filters/available_custom_fields_projects_filter.rb
@@ -0,0 +1,70 @@
+# frozen_string_literal: true
+
+# -- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+# ++
+#
+
+class Queries::Projects::Filters::AvailableCustomFieldsProjectsFilter < Queries::Projects::Filters::Base
+ def self.key
+ :available_custom_fields_projects
+ end
+
+ def type
+ :list
+ end
+
+ def allowed_values
+ @allowed_values ||= CustomFieldsProject
+ .includes(:custom_field)
+ .distinct
+ .pluck(:name, :custom_field_id)
+ end
+
+ def available?
+ User.current.admin?
+ end
+
+ def apply_to(_query_scope)
+ case operator
+ when "="
+ super.with_available_custom_fields(values)
+ when "!"
+ super.without_available_custom_fields(values)
+ else
+ raise "unsupported operator"
+ end
+ end
+
+ def where
+ nil
+ end
+
+ def human_name
+ I18n.t(:label_available_custom_fields_projects)
+ end
+end
diff --git a/app/models/queries/projects/filters/available_project_attributes_filter.rb b/app/models/queries/projects/filters/available_project_attributes_filter.rb
index 0fe1ca825261..56bdf29449dd 100644
--- a/app/models/queries/projects/filters/available_project_attributes_filter.rb
+++ b/app/models/queries/projects/filters/available_project_attributes_filter.rb
@@ -52,9 +52,9 @@ def available?
def apply_to(_query_scope)
case operator
when "="
- super.with_available_custom_fields(values)
+ super.with_available_project_custom_fields(values)
when "!"
- super.without_available_custom_fields(values)
+ super.without_available_project_custom_fields(values)
else
raise "unsupported operator"
end
diff --git a/app/models/queries/projects/orders/custom_field_order.rb b/app/models/queries/projects/orders/custom_field_order.rb
index 02b7bac6a928..30aa9e3b4558 100644
--- a/app/models/queries/projects/orders/custom_field_order.rb
+++ b/app/models/queries/projects/orders/custom_field_order.rb
@@ -29,32 +29,26 @@
class Queries::Projects::Orders::CustomFieldOrder < Queries::Orders::Base
self.model = Project.all
- EXCLUDED_CUSTOM_FIELD_TYPES = %w(text)
- KEY_FORMAT = /cf_(\d+)/
+ EXCLUDED_CUSTOM_FIELD_TYPES = %w[text].freeze
validates :custom_field, presence: { message: I18n.t(:"activerecord.errors.messages.does_not_exist") }
def self.key
valid_ids = RequestStore.fetch(:custom_sortable_project_custom_fields) do
- ProjectCustomField.where.not(field_format: EXCLUDED_CUSTOM_FIELD_TYPES).visible.pluck(:id).join("|")
+ scope.pluck(:id)
end
- /cf_(#{valid_ids})/
+ /\Acf_(#{valid_ids.join('|')})\z/
end
- def custom_field
- @custom_field ||= begin
- id = KEY_FORMAT.match(attribute)[1]
-
- ProjectCustomField
- .where.not(field_format: EXCLUDED_CUSTOM_FIELD_TYPES)
- .visible
- .find_by(id:)
- end
+ def self.scope
+ ProjectCustomField.where.not(field_format: EXCLUDED_CUSTOM_FIELD_TYPES).visible
end
- def apply_to(_query_scope)
- super.select(custom_field.order_statements)
+ def custom_field
+ return @custom_field if defined?(@custom_field)
+
+ @custom_field = self.class.scope.find_by(id: attribute[/\Acf_(\d+)\z/, 1])
end
def available?
diff --git a/app/models/queries/projects/orders/default_order.rb b/app/models/queries/projects/orders/default_order.rb
index e612807171e3..de5154c5b002 100644
--- a/app/models/queries/projects/orders/default_order.rb
+++ b/app/models/queries/projects/orders/default_order.rb
@@ -30,6 +30,6 @@ class Queries::Projects::Orders::DefaultOrder < Queries::Orders::Base
self.model = Project
def self.key
- /\A(id|created_at|public|lft)\z/
+ /\A(id|identifier|created_at|public|lft)\z/
end
end
diff --git a/app/models/queries/projects/orders/name_order.rb b/app/models/queries/projects/orders/name_order.rb
index dd2e583b6863..a1d95ca2449b 100644
--- a/app/models/queries/projects/orders/name_order.rb
+++ b/app/models/queries/projects/orders/name_order.rb
@@ -33,10 +33,6 @@ def self.key
:name
end
- def apply_to(_query_scope)
- super.select("projects.*", "lower(projects.name)")
- end
-
private
def order(scope)
diff --git a/app/models/queries/projects/selects/custom_field.rb b/app/models/queries/projects/selects/custom_field.rb
index b1b19f29ee28..14d7401bde5c 100644
--- a/app/models/queries/projects/selects/custom_field.rb
+++ b/app/models/queries/projects/selects/custom_field.rb
@@ -29,8 +29,10 @@
class Queries::Projects::Selects::CustomField < Queries::Selects::Base
validates :custom_field, presence: { message: I18n.t(:"activerecord.errors.messages.does_not_exist") }
+ KEY = /\Acf_(\d+)\z/
+
def self.key
- /cf_(\d+)/
+ KEY
end
def self.all_available
@@ -39,7 +41,7 @@ def self.all_available
ProjectCustomField
.visible
.pluck(:id)
- .map { |cf_id| new(:"cf_#{cf_id}") }
+ .map { |id| new(:"cf_#{id}") }
end
def caption
@@ -47,9 +49,11 @@ def caption
end
def custom_field
- @custom_field ||= ProjectCustomField
- .visible
- .find_by(id: self.class.key.match(attribute)[1])
+ return @custom_field if defined?(@custom_field)
+
+ @custom_field = ProjectCustomField
+ .visible
+ .find_by(id: attribute[KEY, 1])
end
def available?
diff --git a/app/models/queries/projects/selects/default.rb b/app/models/queries/projects/selects/default.rb
index 59cb279f11c7..d3fd03def9bd 100644
--- a/app/models/queries/projects/selects/default.rb
+++ b/app/models/queries/projects/selects/default.rb
@@ -1,4 +1,4 @@
-# -- copyright
+#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
#
@@ -27,10 +27,10 @@
# ++
class Queries::Projects::Selects::Default < Queries::Selects::Base
- KEYS = %i[status_explanation hierarchy name public description].freeze
+ KEYS = %i[id identifier status_explanation hierarchy name public description].freeze
def self.key
- Regexp.new(KEYS.join("|"))
+ /\A(#{Regexp.union(KEYS.map(&:to_s))})\z/
end
def self.all_available
diff --git a/app/models/user.rb b/app/models/user.rb
index 23e85c02b3bf..577ee7606183 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -55,6 +55,7 @@ class User < Principal
inverse_of: :user
has_one :rss_token, class_name: "::Token::RSS", dependent: :destroy
has_many :api_tokens, class_name: "::Token::API", dependent: :destroy
+ has_many :oauth_client_tokens, dependent: :destroy
# The user might have one invitation token
has_one :invitation_token, class_name: "::Token::Invitation", dependent: :destroy
diff --git a/app/models/work_package.rb b/app/models/work_package.rb
index 859a093eb4d6..51d387b21e6a 100644
--- a/app/models/work_package.rb
+++ b/app/models/work_package.rb
@@ -45,6 +45,7 @@ class WorkPackage < ApplicationRecord
include OpenProject::Journal::AttachmentHelper
DONE_RATIO_OPTIONS = %w[field status].freeze
+ TOTAL_PERCENT_COMPLETE_MODE_OPTIONS = %w[work_weighted_average simple_average].freeze
belongs_to :project
belongs_to :type
@@ -212,12 +213,8 @@ def self.work_based_mode?
Setting.work_package_done_ratio == "field"
end
- def self.use_status_for_done_ratio?
- Setting.work_package_done_ratio == "status"
- end
-
- def self.use_field_for_done_ratio?
- Setting.work_package_done_ratio == "field"
+ def self.complete_on_status_closed?
+ Setting.percent_complete_on_status_closed == "set_100p"
end
# Returns true if usr or current user is allowed to view the work_package
@@ -305,7 +302,7 @@ def included_in_totals_calculation?
end
def done_ratio
- if WorkPackage.use_status_for_done_ratio? && status && status.default_done_ratio
+ if WorkPackage.status_based_mode? && status && status.default_done_ratio
status.default_done_ratio
else
read_attribute(:done_ratio)
@@ -332,12 +329,12 @@ def done_ratio=(value)
write_attribute :done_ratio, convert_value_to_percentage(value)
end
- def derived_progress_hints=(hints)
- @derived_progress_hints = hints
+ def set_derived_progress_hint(field_name, hint, **params)
+ derived_progress_hints[field_name] = ProgressHint.new("#{field_name}.#{hint}", params)
end
- def derived_progress_hints
- @derived_progress_hints ||= {}
+ def derived_progress_hint(field_name)
+ derived_progress_hints[field_name]
end
def duration_in_hours
@@ -380,7 +377,7 @@ def attributes=(new_attributes)
# Set the done_ratio using the status if that setting is set. This will keep the done_ratios
# even if the user turns off the setting later
def update_done_ratio_from_status
- if WorkPackage.use_status_for_done_ratio? && status && status.default_done_ratio
+ if WorkPackage.status_based_mode? && status && status.default_done_ratio
self.done_ratio = status.default_done_ratio
end
end
@@ -553,6 +550,10 @@ def <=>(other)
private
+ def derived_progress_hints
+ @derived_progress_hints ||= {}
+ end
+
def add_time_entry_for(user, attributes)
return if time_entry_blank?(attributes)
diff --git a/app/models/work_package/progress_hint.rb b/app/models/work_package/progress_hint.rb
new file mode 100644
index 000000000000..9fa24566b3fc
--- /dev/null
+++ b/app/models/work_package/progress_hint.rb
@@ -0,0 +1,54 @@
+# frozen_string_literal: true
+
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+# Hint to be displayed in the progress popover under a progress value.
+#
+# `key` is like `field_name`.`hint` and is used to build up the translation
+# key. `params` is the translation parameters as some translation are
+# parameterized.
+class WorkPackage
+ ProgressHint = Data.define(:key, :params) do
+ def initialize(key:, params: {})
+ super
+ end
+
+ def message
+ I18n.t("work_package.progress.derivation_hints.#{key}", **to_hours(params))
+ end
+
+ def reason
+ key.split(".", 2).last
+ end
+
+ def to_hours(params)
+ params.transform_values { |value| DurationConverter.output(value.abs) }
+ end
+ end
+end
diff --git a/modules/meeting/app/components/flash_message_component.rb b/app/seeders/oauth_applications_seeder.rb
similarity index 57%
rename from modules/meeting/app/components/flash_message_component.rb
rename to app/seeders/oauth_applications_seeder.rb
index 3636c5530ed6..b8f88606db18 100644
--- a/modules/meeting/app/components/flash_message_component.rb
+++ b/app/seeders/oauth_applications_seeder.rb
@@ -1,6 +1,8 @@
+# frozen_string_literal: true
+
#-- copyright
# OpenProject is an open source project management software.
-# Copyright (C) the OpenProject GmbH
+# Copyright (C) 2012-2024 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
@@ -25,37 +27,37 @@
#
# See COPYRIGHT and LICENSE files for more details.
#++
+class OAuthApplicationsSeeder < Seeder
+ OPENPROJECT_MOBILE_APP_UID = "DgJZ7Rat23xHZbcq_nxPg5RUuxljonLCN7V7N7GoBAA"
-class FlashMessageComponent < ApplicationComponent
- include ApplicationHelper
- include OpTurbo::Streamable
- include OpPrimer::ComponentHelpers
-
- def initialize(message: nil, full: false, dismiss_scheme: :none, icon: nil, scheme: :default)
- super
-
- @message = message
- @full = full
- @dismiss_scheme = dismiss_scheme
- @icon = icon
- @scheme = scheme
- end
-
- def call
- component_wrapper do
- # even without provided message, the wrapper should be rendered as this allows
- # for triggering a flash message via turbo stream
- if @message.present?
- flash_partial
+ def seed_data!
+ call = create_app
+ unless call.success?
+ print_error "Seeding mobile oauth application failed:"
+ call.errors.full_messages.each do |msg|
+ print_error " #{msg}"
end
end
end
- private
+ def applicable?
+ Doorkeeper::Application.find_by(id: OPENPROJECT_MOBILE_APP_UID).nil?
+ end
+
+ def not_applicable_message
+ "No need to seed oauth applications as they are already present."
+ end
- def flash_partial
- render(Primer::Alpha::Banner.new(
- full: @full, dismiss_scheme: @dismiss_scheme, icon: @icon, scheme: @scheme
- )) { @message }
+ def create_app
+ OAuth::Applications::CreateService
+ .new(user: User.system)
+ .call(
+ enabled: true,
+ name: "OpenProject Mobile App",
+ redirect_uri: "openprojectapp://oauth-callback",
+ builtin: true,
+ confidential: false,
+ uid: OPENPROJECT_MOBILE_APP_UID
+ )
end
end
diff --git a/app/seeders/root_seeder.rb b/app/seeders/root_seeder.rb
index c1a683ca0f5c..f1a150e4723f 100644
--- a/app/seeders/root_seeder.rb
+++ b/app/seeders/root_seeder.rb
@@ -70,6 +70,7 @@ def do_seed!
# Basic data needs be seeded before anything else.
seed_basic_data
seed_admin_user
+ seed_oauth_data
seed_demo_data
seed_development_data if seed_development_data?
seed_plugins_data
@@ -132,6 +133,11 @@ def seed_admin_user
AdminUserSeeder.new(seed_data).seed!
end
+ def seed_oauth_data
+ print_status "*** Seeding OAuth applications"
+ OAuthApplicationsSeeder.new(seed_data).seed!
+ end
+
def seed_demo_data
print_status "*** Seeding demo data"
DemoDataSeeder.new(seed_data).seed!
diff --git a/app/services/custom_fields/custom_field_projects/bulk_create_service.rb b/app/services/custom_fields/custom_field_projects/bulk_create_service.rb
new file mode 100644
index 000000000000..3b452006ce68
--- /dev/null
+++ b/app/services/custom_fields/custom_field_projects/bulk_create_service.rb
@@ -0,0 +1,125 @@
+# frozen_string_literal: true
+
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module CustomFields
+ module CustomFieldProjects
+ class BulkCreateService < ::BaseServices::BaseCallable
+ def initialize(user:, projects:, custom_field:, include_sub_projects: false)
+ super()
+ @user = user
+ @projects = projects
+ @custom_field = custom_field
+ @include_sub_projects = include_sub_projects
+ end
+
+ def perform
+ service_call = validate_permissions
+ service_call = validate_contract(service_call, incoming_mapping_ids) if service_call.success?
+ service_call = perform_bulk_create(service_call) if service_call.success?
+
+ service_call
+ end
+
+ private
+
+ def validate_permissions(permission: :select_custom_fields)
+ return ServiceResult.failure(errors: I18n.t(:label_not_found)) if incoming_projects.empty?
+
+ if @user.allowed_in_project?(permission, incoming_projects)
+ ServiceResult.success
+ else
+ ServiceResult.failure(errors: I18n.t("activerecord.errors.messages.error_unauthorized"))
+ end
+ end
+
+ def validate_contract(service_call, project_ids)
+ set_attributes_results = project_ids.map do |id|
+ set_attributes(project_id: id, custom_field_id: @custom_field.id)
+ end
+
+ if (failures = set_attributes_results.select(&:failure?)).any?
+ service_call.success = false
+ service_call.errors = failures.map(&:errors)
+ else
+ service_call.result = set_attributes_results.map(&:result)
+ end
+
+ service_call
+ end
+
+ def perform_bulk_create(service_call)
+ custom_field_project_mapping_class.insert_all(
+ service_call.result.map { |model| model.attributes.slice("project_id", "custom_field_id") },
+ unique_by: %i[project_id custom_field_id]
+ )
+
+ service_call
+ end
+
+ def incoming_mapping_ids
+ project_ids = incoming_projects.pluck(:id)
+ project_ids - existing_project_mappings(project_ids)
+ end
+
+ def incoming_projects
+ @projects.each_with_object(Set.new) do |project, projects_set|
+ next unless project.active?
+
+ projects_set << project
+ projects_set.merge(project.active_subprojects.to_a) if @include_sub_projects
+ end.to_a
+ end
+
+ def existing_project_mappings(project_ids)
+ custom_field_project_mapping_class.where(
+ custom_field_id: @custom_field.id,
+ project_id: project_ids
+ ).pluck(:project_id)
+ end
+
+ def set_attributes(params)
+ attributes_service_class
+ .new(user: @user,
+ model: instance(params),
+ contract_class: default_contract_class,
+ contract_options: {})
+ .call(params)
+ end
+
+ def instance(params)
+ custom_field_project_mapping_class.new(params)
+ end
+
+ def attributes_service_class = CustomFields::CustomFieldProjects::SetAttributesService
+ def default_contract_class = CustomFields::CustomFieldProjects::UpdateContract
+ def custom_field_project_mapping_class = CustomFieldsProject
+ end
+ end
+end
diff --git a/app/services/custom_fields/custom_field_projects/delete_service.rb b/app/services/custom_fields/custom_field_projects/delete_service.rb
new file mode 100644
index 000000000000..41069ffa527e
--- /dev/null
+++ b/app/services/custom_fields/custom_field_projects/delete_service.rb
@@ -0,0 +1,37 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module CustomFields
+ module CustomFieldProjects
+ class DeleteService < ::BaseServices::Delete
+ # Mappings have custom deletion rules that are similar to the update rules all derived from the base contract
+ # Reuse the update contract to ensure that the deletion rules are consistent with the update rules
+ def default_contract_class = CustomFields::CustomFieldProjects::UpdateContract
+ end
+ end
+end
diff --git a/app/services/custom_fields/custom_field_projects/set_attributes_service.rb b/app/services/custom_fields/custom_field_projects/set_attributes_service.rb
new file mode 100644
index 000000000000..7b3100166c9b
--- /dev/null
+++ b/app/services/custom_fields/custom_field_projects/set_attributes_service.rb
@@ -0,0 +1,34 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module CustomFields
+ module CustomFieldProjects
+ class SetAttributesService < ::BaseServices::SetAttributes
+ end
+ end
+end
diff --git a/app/services/oauth/applications/create_service.rb b/app/services/oauth/applications/create_service.rb
new file mode 100644
index 000000000000..102be06afdcd
--- /dev/null
+++ b/app/services/oauth/applications/create_service.rb
@@ -0,0 +1,37 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) 2012-2024 the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module OAuth
+ module Applications
+ class CreateService < BaseServices::Create
+ def instance(*)
+ Doorkeeper::Application.new
+ end
+ end
+ end
+end
diff --git a/app/services/oauth/applications/delete_service.rb b/app/services/oauth/applications/delete_service.rb
new file mode 100644
index 000000000000..430f77977f73
--- /dev/null
+++ b/app/services/oauth/applications/delete_service.rb
@@ -0,0 +1,34 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) 2012-2024 the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module OAuth
+ module Applications
+ class DeleteService < ::BaseServices::Delete
+ end
+ end
+end
diff --git a/app/services/oauth/applications/set_attributes_service.rb b/app/services/oauth/applications/set_attributes_service.rb
new file mode 100644
index 000000000000..72a81dc965f5
--- /dev/null
+++ b/app/services/oauth/applications/set_attributes_service.rb
@@ -0,0 +1,53 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module OAuth
+ module Applications
+ class SetAttributesService < ::BaseServices::SetAttributes
+ private
+
+ def set_default_attributes(*)
+ model.extend(OpenProject::ChangedBySystem)
+ model.change_by_system do
+ set_secret_and_id
+ set_default_owner unless model.owner_id
+ end
+ end
+
+ def set_secret_and_id
+ model.renew_secret if model.secret.blank?
+ model.uid = Doorkeeper::OAuth::Helpers::UniqueToken.generate if model.uid.blank?
+ end
+
+ def set_default_owner
+ model.owner = user
+ model.owner_type = "User"
+ end
+ end
+ end
+end
diff --git a/app/services/oauth/applications/update_service.rb b/app/services/oauth/applications/update_service.rb
new file mode 100644
index 000000000000..67d1852be2d7
--- /dev/null
+++ b/app/services/oauth/applications/update_service.rb
@@ -0,0 +1,34 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) 2012-2024 the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+module OAuth
+ module Applications
+ class UpdateService < ::BaseServices::Update
+ end
+ end
+end
diff --git a/app/services/project_custom_field_project_mappings/bulk_create_service.rb b/app/services/project_custom_field_project_mappings/bulk_create_service.rb
index 982a27a03e6e..432112326ac1 100644
--- a/app/services/project_custom_field_project_mappings/bulk_create_service.rb
+++ b/app/services/project_custom_field_project_mappings/bulk_create_service.rb
@@ -29,99 +29,19 @@
#++
module ProjectCustomFieldProjectMappings
- class BulkCreateService < ::BaseServices::BaseCallable
+ class BulkCreateService < ::CustomFields::CustomFieldProjects::BulkCreateService
def initialize(user:, projects:, project_custom_field:, include_sub_projects: false)
- super()
- @user = user
- @projects = projects
- @project_custom_field = project_custom_field
- @include_sub_projects = include_sub_projects
- end
-
- def perform
- service_call = validate_permissions
- service_call = validate_contract(service_call, incoming_mapping_ids) if service_call.success?
- service_call = perform_bulk_create(service_call) if service_call.success?
-
- service_call
+ super(user:, projects:, custom_field: project_custom_field, include_sub_projects:)
end
private
- def validate_permissions
- return ServiceResult.failure(errors: I18n.t(:label_not_found)) if incoming_projects.empty?
-
- if @user.allowed_in_project?(:select_project_custom_fields, incoming_projects)
- ServiceResult.success
- else
- ServiceResult.failure(errors: I18n.t("activerecord.errors.messages.error_unauthorized"))
- end
- end
-
- def validate_contract(service_call, project_ids)
- set_attributes_results = project_ids.map do |id|
- set_attributes(project_id: id, custom_field_id: @project_custom_field.id)
- end
-
- if (failures = set_attributes_results.select(&:failure?)).any?
- service_call.success = false
- service_call.errors = failures.map(&:errors)
- else
- service_call.result = set_attributes_results.map(&:result)
- end
-
- service_call
- end
-
- def perform_bulk_create(service_call)
- ProjectCustomFieldProjectMapping.insert_all(
- service_call.result.map { |model| model.attributes.slice("project_id", "custom_field_id") },
- unique_by: %i[project_id custom_field_id]
- )
-
- service_call
- end
-
- def incoming_mapping_ids
- project_ids = incoming_projects.pluck(:id)
- project_ids - existing_project_mappings(project_ids)
+ def validate_permissions(permission: :select_project_custom_fields)
+ super
end
- def incoming_projects
- @projects.each_with_object(Set.new) do |project, projects_set|
- next unless project.active?
-
- projects_set << project
- projects_set.merge(project.active_subprojects.to_a) if @include_sub_projects
- end.to_a
- end
-
- def existing_project_mappings(project_ids)
- ProjectCustomFieldProjectMapping.where(
- custom_field_id: @project_custom_field.id,
- project_id: project_ids
- ).pluck(:project_id)
- end
-
- def set_attributes(params)
- attributes_service_class
- .new(user: @user,
- model: instance(params),
- contract_class: default_contract_class,
- contract_options: {})
- .call(params)
- end
-
- def instance(params)
- ProjectCustomFieldProjectMapping.new(params)
- end
-
- def attributes_service_class
- ProjectCustomFieldProjectMappings::SetAttributesService
- end
-
- def default_contract_class
- ProjectCustomFieldProjectMappings::UpdateContract
- end
+ def attributes_service_class = ProjectCustomFieldProjectMappings::SetAttributesService
+ def default_contract_class = ProjectCustomFieldProjectMappings::UpdateContract
+ def custom_field_project_mapping_class = ProjectCustomFieldProjectMapping
end
end
diff --git a/app/services/settings/update_service.rb b/app/services/settings/update_service.rb
index a8eda6a5e1dc..591114db7138 100644
--- a/app/services/settings/update_service.rb
+++ b/app/services/settings/update_service.rb
@@ -45,11 +45,29 @@ def set_setting_value(name, value)
old_value = Setting[name]
new_value = derive_value(value)
Setting[name] = new_value
- if name == :work_package_done_ratio && old_value != "status" && new_value == "status"
- WorkPackages::Progress::ApplyStatusesChangeJob.perform_later(cause_type: "progress_mode_changed_to_status_based")
+
+ if name == :work_package_done_ratio
+ trigger_update_job_for_progress_mode_change(old_value, new_value)
+ elsif name == :total_percent_complete_mode
+ trigger_update_job_for_total_percent_complete_mode_change(old_value, new_value)
end
end
+ def trigger_update_job_for_progress_mode_change(old_value, new_value)
+ return if old_value == new_value
+ return if new_value != "status" # only trigger if changing to status-based
+
+ WorkPackages::Progress::ApplyStatusesChangeJob.perform_later(cause_type: "progress_mode_changed_to_status_based")
+ end
+
+ def trigger_update_job_for_total_percent_complete_mode_change(old_value, new_value)
+ return if old_value == new_value
+
+ WorkPackages::Progress::ApplyTotalPercentCompleteModeChangeJob
+ .perform_later(mode: new_value,
+ cause_type: "total_percent_complete_mode_changed_to_#{new_value}")
+ end
+
def derive_value(value)
case value
when Array, Hash
diff --git a/app/services/work_packages/set_attributes_service.rb b/app/services/work_packages/set_attributes_service.rb
index ee168d4dbd0a..cd1118d965af 100644
--- a/app/services/work_packages/set_attributes_service.rb
+++ b/app/services/work_packages/set_attributes_service.rb
@@ -285,15 +285,17 @@ def update_duration
end
def update_progress_attributes
- derive_progress_values_class =
- if OpenProject::FeatureDecisions.percent_complete_edition_active?
- WorkPackage.use_status_for_done_ratio? ? DeriveProgressValuesStatusBased : DeriveProgressValuesWorkBased
- else
- Pre144DeriveProgressValues
- end
derive_progress_values_class.new(work_package).call
end
+ def derive_progress_values_class
+ if WorkPackage.status_based_mode?
+ DeriveProgressValuesStatusBased
+ else
+ DeriveProgressValuesWorkBased
+ end
+ end
+
def set_version_to_nil
if work_package.version &&
work_package.project &&
diff --git a/app/services/work_packages/set_attributes_service/derive_progress_values_base.rb b/app/services/work_packages/set_attributes_service/derive_progress_values_base.rb
index fa057d81076f..3293be1010cf 100644
--- a/app/services/work_packages/set_attributes_service/derive_progress_values_base.rb
+++ b/app/services/work_packages/set_attributes_service/derive_progress_values_base.rb
@@ -79,6 +79,10 @@ def work_valid?
DurationConverter.valid?(work_package.estimated_hours_before_type_cast)
end
+ def work_invalid?
+ !work_valid?
+ end
+
def remaining_work
work_package.remaining_hours
end
@@ -115,6 +119,10 @@ def remaining_work_valid?
DurationConverter.valid?(work_package.remaining_hours_before_type_cast)
end
+ def remaining_work_invalid?
+ !remaining_work_valid?
+ end
+
def percent_complete
work_package.done_ratio
end
@@ -149,8 +157,8 @@ def percent_complete_not_provided_by_user?
private
- def set_hint(field, hint)
- work_package.derived_progress_hints[field] = hint
+ def set_hint(field, hint, **params)
+ work_package.set_derived_progress_hint(field, hint, **params)
end
def round_progress_values
diff --git a/app/services/work_packages/set_attributes_service/derive_progress_values_status_based.rb b/app/services/work_packages/set_attributes_service/derive_progress_values_status_based.rb
index 3035a88ccafc..00ea713c06af 100644
--- a/app/services/work_packages/set_attributes_service/derive_progress_values_status_based.rb
+++ b/app/services/work_packages/set_attributes_service/derive_progress_values_status_based.rb
@@ -33,24 +33,40 @@ class DeriveProgressValuesStatusBased < DeriveProgressValuesBase
def derive_progress_attributes
raise ArgumentError, "Cannot use #{self.class.name} in work-based mode" if WorkPackage.work_based_mode?
- update_percent_complete
- update_remaining_work_from_percent_complete
+ # do not change anything if some values are invalid: this will be detected
+ # by the contract and errors will be set.
+ return if invalid_progress_values?
+
+ update_percent_complete if derive_percent_complete?
+ update_remaining_work if derive_remaining_work?
+ end
+
+ def invalid_progress_values?
+ work_invalid?
+ end
+
+ def derive_percent_complete?
+ status_percent_complete_changed?
+ end
+
+ def derive_remaining_work?
+ status_percent_complete_changed? || work_changed?
+ end
+
+ def status_percent_complete_changed?
+ work_package.status_id.present? && work_package.status_id_came_from_user? \
+ && work_package.status.default_done_ratio != work_package.done_ratio_was
end
# Update +% complete+ from the status if the status changed.
def update_percent_complete
- return unless work_package.status_id_changed?
-
self.percent_complete = work_package.status.default_done_ratio
end
# When in "Status-based" mode for progress calculation, remaining work is
# always derived from % complete and work. If work is unset, then remaining
# work must be unset too.
- def update_remaining_work_from_percent_complete
- return if remaining_work_came_from_user?
- return if work&.negative?
-
+ def update_remaining_work
if work_empty?
return unless work_changed?
diff --git a/app/services/work_packages/set_attributes_service/derive_progress_values_work_based.rb b/app/services/work_packages/set_attributes_service/derive_progress_values_work_based.rb
index 69cb6736875e..1576eb1647d0 100644
--- a/app/services/work_packages/set_attributes_service/derive_progress_values_work_based.rb
+++ b/app/services/work_packages/set_attributes_service/derive_progress_values_work_based.rb
@@ -39,6 +39,7 @@ def derive_progress_attributes
# by the contract and errors will be set.
return if invalid_progress_values?
+ set_complete if set_complete_for_closed_status?
update_work if derive_work?
update_remaining_work if derive_remaining_work?
update_percent_complete if derive_percent_complete?
@@ -56,6 +57,13 @@ def percent_complete_out_of_range?
percent_complete && !percent_complete.between?(0, 100)
end
+ def set_complete_for_closed_status?
+ WorkPackage.complete_on_status_closed? \
+ && percent_complete_not_provided_by_user? \
+ && work_package.status_id_changed? \
+ && work_package.closed?
+ end
+
def derive_work?
work_not_provided_by_user? && (remaining_work_changed? || percent_complete_changed?)
end
@@ -69,6 +77,11 @@ def derive_percent_complete?
&& !skip_percent_complete_derivation
end
+ def set_complete
+ self.percent_complete = 100
+ skip_percent_complete_derivation!
+ end
+
# rubocop:disable Metrics/AbcSize,Metrics/PerceivedComplexity
def update_work
return if remaining_work_empty? && percent_complete_empty?
@@ -100,9 +113,9 @@ def update_remaining_work
elsif work_changed? && work_set? && remaining_work_set? && percent_complete_not_provided_by_user?
delta = work - work_was
if delta.positive?
- set_hint(:remaining_hours, :increased_like_work)
+ set_hint(:remaining_hours, :increased_by_delta_like_work, delta:)
elsif delta.negative?
- set_hint(:remaining_hours, :decreased_like_work)
+ set_hint(:remaining_hours, :decreased_by_delta_like_work, delta:)
end
self.remaining_work = (remaining_work + delta).clamp(0.0, work)
elsif work_empty?
@@ -161,14 +174,6 @@ def work_from_percent_complete_and_remaining_work
remaining_work / remaining_percent_complete
end
- def work_invalid?
- !work_valid?
- end
-
- def remaining_work_invalid?
- !remaining_work_valid?
- end
-
def percent_complete_unparsable?
!PercentageConverter.valid?(work_package.done_ratio_before_type_cast)
end
diff --git a/app/services/work_packages/set_attributes_service/pre_14_4_derive_progress_values.rb b/app/services/work_packages/set_attributes_service/pre_14_4_derive_progress_values.rb
deleted file mode 100644
index 0248a413bf8f..000000000000
--- a/app/services/work_packages/set_attributes_service/pre_14_4_derive_progress_values.rb
+++ /dev/null
@@ -1,186 +0,0 @@
-#-- copyright
-# OpenProject is an open source project management software.
-# Copyright (C) the OpenProject GmbH
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License version 3.
-#
-# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
-# Copyright (C) 2006-2013 Jean-Philippe Lang
-# Copyright (C) 2010-2013 the ChiliProject Team
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# See COPYRIGHT and LICENSE files for more details.
-#++
-
-# rubocop:disable Metrics/AbcSize
-class WorkPackages::SetAttributesService
- class Pre144DeriveProgressValues
- attr_reader :work_package
-
- def initialize(work_package)
- @work_package = work_package
- end
-
- def call
- update_progress_attributes
- end
-
- # From this point, copied over from 109b135b:app/services/work_packages/set_attributes_service.rb#L287-L427
- def update_progress_attributes
- if WorkPackage.use_status_for_done_ratio?
- update_done_ratio
- update_remaining_hours
- elsif only_percent_complete_initially_set?
- update_remaining_hours_from_percent_complete
- else
- update_estimated_hours
- update_remaining_hours
- update_done_ratio
- end
- round_progress_values
- end
-
- def only_percent_complete_initially_set?
- return false if work_package.done_ratio.nil?
- return false if work_package.remaining_hours.present?
-
- work_package.estimated_hours_changed? && work_package.estimated_hours.present?
- end
-
- def work_was_unset_and_remaining_work_is_set?
- work_package.estimated_hours_was.nil? && work_package.remaining_hours.present?
- end
-
- # Compute and update +done_ratio+ if its dependent attributes are being modified.
- # The dependent attributes for +done_ratio+ are
- # - +remaining_hours+
- # - +estimated_hours+
- #
- # Unless both +remaining_hours+ and +estimated_hours+ are set, +done_ratio+ will be
- # considered nil.
- def update_done_ratio
- if WorkPackage.use_status_for_done_ratio?
- return unless work_package.status_id_changed?
-
- work_package.done_ratio = work_package.status.default_done_ratio
- else
- return unless work_package.remaining_hours_changed? || work_package.estimated_hours_changed?
-
- work_package.done_ratio = if done_ratio_dependent_attribute_unset?
- nil
- else
- compute_done_ratio
- end
- end
- end
-
- def round_progress_values
- rounded = work_package.estimated_hours&.round(2)
- if rounded != work_package.estimated_hours
- work_package.estimated_hours = rounded
- end
- rounded = work_package.remaining_hours&.round(2)
- if rounded != work_package.remaining_hours
- work_package.remaining_hours = rounded
- end
- end
-
- def update_remaining_hours_from_percent_complete
- return if work_package.remaining_hours_came_from_user?
- return if work_package.estimated_hours&.negative?
-
- work_package.remaining_hours = remaining_hours_from_done_ratio_and_estimated_hours
- end
-
- def done_ratio_dependent_attribute_unset?
- work_package.remaining_hours.nil? || work_package.estimated_hours.nil?
- end
-
- def compute_done_ratio
- # do not change done ratio if the values are invalid
- if invalid_progress_values?
- return work_package.done_ratio
- end
-
- completed_work = work_package.estimated_hours - work_package.remaining_hours
- completion_ratio = completed_work.to_f / work_package.estimated_hours
-
- (completion_ratio * 100).round(2)
- end
-
- def invalid_progress_values?
- work = work_package.estimated_hours
- remaining_work = work_package.remaining_hours
-
- return true if work.negative?
- return true if remaining_work.negative?
-
- work && remaining_work && remaining_work > work
- end
-
- def update_estimated_hours
- return unless WorkPackage.use_field_for_done_ratio?
- return if work_package.estimated_hours_came_from_user?
- return unless work_package.remaining_hours_changed?
-
- work = work_package.estimated_hours
- remaining_work = work_package.remaining_hours
- return if work.present?
- return if remaining_work.nil? || remaining_work.negative?
-
- work_package.estimated_hours = estimated_hours_from_done_ratio_and_remaining_hours
- end
-
- # When in "Status-based" mode for % Complete, remaining hours are based
- # on the computation of it derived from the status's default done ratio
- # and the estimated hours. If the estimated hours are unset, then also
- # unset the remaining hours.
- # rubocop:disable Metrics/PerceivedComplexity
- def update_remaining_hours
- if WorkPackage.use_status_for_done_ratio?
- update_remaining_hours_from_percent_complete
- elsif WorkPackage.use_field_for_done_ratio? &&
- work_package.estimated_hours_changed?
- return if work_package.remaining_hours_came_from_user?
- return if work_package.estimated_hours&.negative?
- return if work_was_unset_and_remaining_work_is_set? # remaining work is kept and % complete will be set
-
- if work_package.estimated_hours.nil? || work_package.remaining_hours.nil?
- work_package.remaining_hours = work_package.estimated_hours
- else
- delta = work_package.estimated_hours - work_package.estimated_hours_was
- work_package.remaining_hours = (work_package.remaining_hours + delta).clamp(0.0, work_package.estimated_hours)
- end
- end
- end
- # rubocop:enable Metrics/PerceivedComplexity
-
- def estimated_hours_from_done_ratio_and_remaining_hours
- remaining_ratio = 1.0 - ((work_package.done_ratio || 0) / 100.0)
- work_package.remaining_hours / remaining_ratio
- end
-
- def remaining_hours_from_done_ratio_and_estimated_hours
- return nil if work_package.done_ratio.nil? || work_package.estimated_hours.nil?
-
- completed_work = work_package.estimated_hours * work_package.done_ratio / 100.0
- remaining_hours = (work_package.estimated_hours - completed_work).round(2)
- remaining_hours.clamp(0.0, work_package.estimated_hours)
- end
- end
-end
-# rubocop:enable Metrics/AbcSize
diff --git a/app/services/work_packages/update_ancestors/loader.rb b/app/services/work_packages/update_ancestors/loader.rb
index 966a04fd4620..dcf4ae002740 100644
--- a/app/services/work_packages/update_ancestors/loader.rb
+++ b/app/services/work_packages/update_ancestors/loader.rb
@@ -30,6 +30,8 @@ class WorkPackages::UpdateAncestors::Loader
parent_id: "parent_id",
estimated_hours: "estimated_hours",
remaining_hours: "remaining_hours",
+ done_ratio: "done_ratio",
+ derived_done_ratio: "derived_done_ratio",
status_excluded_from_totals: "statuses.excluded_from_totals",
schedule_manually: "schedule_manually",
ignore_non_working_days: "ignore_non_working_days"
diff --git a/app/services/work_packages/update_ancestors_service.rb b/app/services/work_packages/update_ancestors_service.rb
index b6f0c3e0d78f..877833bd8582 100644
--- a/app/services/work_packages/update_ancestors_service.rb
+++ b/app/services/work_packages/update_ancestors_service.rb
@@ -120,15 +120,45 @@ def derive_done_ratio(ancestor, loader)
end
def compute_derived_done_ratio(work_package, loader)
+ return if no_children?(work_package, loader)
+
+ case Setting.total_percent_complete_mode
+ when "work_weighted_average"
+ calculate_work_weighted_average_percent_complete(work_package)
+ when "simple_average"
+ calculate_simple_average_percent_complete(work_package, loader)
+ end
+ end
+
+ def calculate_work_weighted_average_percent_complete(work_package)
return if work_package.derived_estimated_hours.nil? || work_package.derived_remaining_hours.nil?
return if work_package.derived_estimated_hours.zero?
- return if no_children?(work_package, loader)
work_done = (work_package.derived_estimated_hours - work_package.derived_remaining_hours)
progress = (work_done.to_f / work_package.derived_estimated_hours) * 100
progress.round
end
+ def calculate_simple_average_percent_complete(work_package, loader)
+ all_done_ratios = children_done_ratio_values(work_package, loader)
+
+ if work_package.done_ratio.present? && !work_package.status.excluded_from_totals
+ all_done_ratios << work_package.done_ratio
+ end
+
+ return if all_done_ratios.empty?
+
+ progress = all_done_ratios.sum.to_f / all_done_ratios.count
+ progress.round
+ end
+
+ def children_done_ratio_values(work_package, loader)
+ loader
+ .children_of(work_package)
+ .filter(&:included_in_totals_calculation?)
+ .map { |child| child.derived_done_ratio || child.done_ratio || 0 }
+ end
+
# Sets the ignore_non_working_days to true if any descendant has its value set to true.
# If there is no value returned from the descendants, that means that the work package in
# question no longer has a descendant. But since we are in the service going up the ancestor chain,
diff --git a/app/views/account/_auth_providers.html.erb b/app/views/account/_auth_providers.html.erb
index a828b896617b..f399507f0332 100644
--- a/app/views/account/_auth_providers.html.erb
+++ b/app/views/account/_auth_providers.html.erb
@@ -26,7 +26,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See COPYRIGHT and LICENSE files for more details.
++#%>
-
<%
# Remove this ugly hack when creating an authentication plugin.
#
@@ -44,9 +43,11 @@ wclass = local_assigns[:wide] ? 'wide' : ''
<% if auth_provider_html.strip != '' %>
<% unless no_pwd %>
-
+
+
<%= local_assigns[:omniauth_title] || I18n.t('account.login_with_auth_provider')%>
-
+
+
<% end %>
<%= auth_provider_html %>
diff --git a/app/views/account/_register.html.erb b/app/views/account/_register.html.erb
index d3e7176812e3..f76fc104dfa5 100644
--- a/app/views/account/_register.html.erb
+++ b/app/views/account/_register.html.erb
@@ -26,13 +26,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See COPYRIGHT and LICENSE files for more details.
++#%>
-
<%= labelled_tabular_form_for(@user, url: account_register_path, html: { class: 'form -wide-labels spot-modal' }) do |f| %>
-
<%= back_url_hidden_field_tag use_referer: false %>
<%= error_messages_for :user %>
-
@@ -52,23 +49,19 @@ See COPYRIGHT and LICENSE files for more details.
<%= f.text_field :firstname, required: true %>
-
<%= f.text_field :lastname, required: true %>
-
<% if registration_show_email? %>
<%= email_field(f) %>
<% end %>
-
<%= call_hook :view_account_register_after_basic_information, f: f %>
-
<%= render partial: "customizable/form",
locals: { form: f, all_fields: false, only_required: true, wide_labels: true } %>
-
-
+
+
<% if @user.change_password_allowed? %>
<%= f.password_field :password,
@@ -87,15 +80,12 @@ See COPYRIGHT and LICENSE files for more details.
<% end %>
-
<% if user_consent_required? %>
<%= render partial: 'account/user_consent_check' %>
<% end %>
-
<%= render partial: 'account/auth_providers', locals: { omniauth_title: I18n.t('account.signup_with_auth_provider'), wide: true } %>
-
<%= render partial: 'account/footer' %>
<% end %>
diff --git a/app/views/admin/custom_fields/custom_field_projects/index.html.erb b/app/views/admin/custom_fields/custom_field_projects/index.html.erb
new file mode 100644
index 000000000000..ecc153ee1157
--- /dev/null
+++ b/app/views/admin/custom_fields/custom_field_projects/index.html.erb
@@ -0,0 +1,66 @@
+<%#-- copyright
+OpenProject is an open source project management software.
+Copyright (C) the OpenProject GmbH
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License version 3.
+
+OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+Copyright (C) 2006-2013 Jean-Philippe Lang
+Copyright (C) 2010-2013 the ChiliProject Team
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+See COPYRIGHT and LICENSE files for more details.
+
+++#%>
+
+<% html_title t(:label_administration), "#{CustomField.model_name.human} #{h @custom_field.name}", t(:label_project_plural) %>
+
+<%=
+ render(Admin::CustomFields::EditFormHeaderComponent.new(custom_field: @custom_field,
+ selected: :custom_field_projects))
+%>
+
+<%=
+ render(Primer::OpenProject::SubHeader.new(test_selector: "add-projects-sub-header")) do |component|
+ component.with_action_component do
+ render(Primer::Beta::Button.new(
+ scheme: :primary,
+ tag: :a,
+ href: new_custom_field_project_path(@custom_field),
+ data: { controller: "async-dialog" }
+ )) do |button|
+ button.with_leading_visual_icon(icon: 'op-include-projects')
+ I18n.t(:label_add_projects)
+ end
+ end
+ end unless @custom_field.is_for_all?
+%>
+
+<%=
+ if @custom_field.is_for_all?
+ render Primer::Beta::Blankslate.new(border: true) do |component|
+ component.with_visual_icon(icon: :checklist)
+ component.with_heading(tag: :h2).with_content(I18n.t("custom_fields.admin.custom_field_projects.is_for_all_blank_slate.heading"))
+ component.with_description { I18n.t("custom_fields.admin.custom_field_projects.is_for_all_blank_slate.description") }
+ end
+ else
+ render(Admin::CustomFields::CustomFieldProjects::TableComponent.new(
+ query: @available_custom_fields_projects_query,
+ params: params.merge({ custom_field: @custom_field }))
+ )
+ end
+%>
diff --git a/app/views/admin/settings/experimental_settings/show.html.erb b/app/views/admin/settings/experimental_settings/show.html.erb
index 647e8281fc91..32fe0a08f860 100644
--- a/app/views/admin/settings/experimental_settings/show.html.erb
+++ b/app/views/admin/settings/experimental_settings/show.html.erb
@@ -37,7 +37,7 @@ See COPYRIGHT and LICENSE files for more details.
end
%>
-<%= styled_form_tag(admin_settings_update_experimental_path, method: :patch) do %>
+<%= styled_form_tag(admin_settings_experimental_path, method: :patch) do %>
diff --git a/frontend/src/app/features/work-packages/components/wp-query/url-params-helper.ts b/frontend/src/app/features/work-packages/components/wp-query/url-params-helper.ts
index 732275709123..e20bd87ca98d 100644
--- a/frontend/src/app/features/work-packages/components/wp-query/url-params-helper.ts
+++ b/frontend/src/app/features/work-packages/components/wp-query/url-params-helper.ts
@@ -95,6 +95,7 @@ export interface QueryRequestParams {
groupBy:string|null;
filters:string;
sortBy:string;
+ query_id:string|null;
timestamps:string;
valid_subset?:boolean;
}
diff --git a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/display-settings-tab.component.html b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/display-settings-tab.component.html
index 8615d86ae59d..38c909af1731 100644
--- a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/display-settings-tab.component.html
+++ b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/tabs/display-settings-tab.component.html
@@ -8,10 +8,8 @@
[(ngModel)]="displayMode"
value="default"
name="display_mode_switch">
-
- &ngsp;
+
- &ngsp;
@@ -23,10 +21,8 @@
[(ngModel)]="displayMode"
value="hierarchy"
name="display_mode_switch">
-
- &ngsp;
+
- &ngsp;
@@ -40,10 +36,8 @@
[(ngModel)]="displayMode"
value="grouped"
name="display_mode_switch">
-
- &ngsp;
+
- &ngsp;
{
this.initializeDatepicker();
});
@@ -241,6 +237,7 @@ export class OpModalSingleDatePickerComponent implements ControlValueAccessor, O
inline: true,
onReady: (_date:Date[], _datestr:string, instance:flatpickr.Instance) => {
instance.calendarContainer.classList.add('op-datepicker-modal--flatpickr-instance');
+ this.cdRef.detectChanges();
},
onChange: (dates:Date[]) => {
if (dates.length > 0) {
@@ -263,7 +260,6 @@ export class OpModalSingleDatePickerComponent implements ControlValueAccessor, O
},
this.flatpickrTarget.nativeElement as HTMLElement,
);
- this.cdRef.detectChanges();
}
writeWorkingValue(value:string):void {
diff --git a/frontend/src/app/shared/components/fields/edit/field-types/progress-popover-edit-field.component.html b/frontend/src/app/shared/components/fields/edit/field-types/progress-popover-edit-field.component.html
index 8d54d9453aef..73a7cba63181 100644
--- a/frontend/src/app/shared/components/fields/edit/field-types/progress-popover-edit-field.component.html
+++ b/frontend/src/app/shared/components/fields/edit/field-types/progress-popover-edit-field.component.html
@@ -52,46 +52,3 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/frontend/src/app/shared/components/fields/edit/field-types/progress-popover-edit-field.component.ts b/frontend/src/app/shared/components/fields/edit/field-types/progress-popover-edit-field.component.ts
index d15042caf666..8abf179696ee 100644
--- a/frontend/src/app/shared/components/fields/edit/field-types/progress-popover-edit-field.component.ts
+++ b/frontend/src/app/shared/components/fields/edit/field-types/progress-popover-edit-field.component.ts
@@ -260,6 +260,7 @@ export class ProgressPopoverEditFieldComponent extends ProgressEditFieldComponen
public onModalClosed():void {
this.opened = false;
+ this.frameSrc = '';
if (!this.handler.inEditMode) {
this.handler.deactivate(false);
diff --git a/frontend/src/app/shared/components/icon/icon.module.ts b/frontend/src/app/shared/components/icon/icon.module.ts
index 882f1f0b3deb..899abf3937be 100644
--- a/frontend/src/app/shared/components/icon/icon.module.ts
+++ b/frontend/src/app/shared/components/icon/icon.module.ts
@@ -12,6 +12,9 @@ import {
OpEraseIconComponent,
OpFirstPersonViewIconComponent,
OpGridMenuIconComponent,
+ OpGroupIconComponent,
+ OpHierarchyIconComponent,
+ OpNoHierarchyIconComponent,
OpOrthographicPerspectiveIconComponent,
OpResizerVerticalLinesIconComponent,
OpScissorsIconComponent,
@@ -26,6 +29,7 @@ import {
StarFillIconComponent,
StarIconComponent,
XIconComponent,
+ BellFillIconComponent,
OpGitlabIssueClosedIconComponent,
OpGitlabLabelsIconComponent,
OpGitlabIssueOpenIconComponent,
@@ -61,6 +65,9 @@ import {
OpEraseIconComponent,
OpFirstPersonViewIconComponent,
OpGridMenuIconComponent,
+ OpGroupIconComponent,
+ OpHierarchyIconComponent,
+ OpNoHierarchyIconComponent,
OpOrthographicPerspectiveIconComponent,
OpResizerVerticalLinesIconComponent,
OpScissorsIconComponent,
@@ -75,6 +82,7 @@ import {
StarFillIconComponent,
StarIconComponent,
XIconComponent,
+ BellFillIconComponent,
OpGitlabIssueClosedIconComponent,
OpGitlabLabelsIconComponent,
@@ -113,6 +121,9 @@ import {
OpEraseIconComponent,
OpFirstPersonViewIconComponent,
OpGridMenuIconComponent,
+ OpGroupIconComponent,
+ OpHierarchyIconComponent,
+ OpNoHierarchyIconComponent,
OpOrthographicPerspectiveIconComponent,
OpResizerVerticalLinesIconComponent,
OpScissorsIconComponent,
@@ -127,6 +138,7 @@ import {
StarFillIconComponent,
StarIconComponent,
XIconComponent,
+ BellFillIconComponent,
OpGitlabIssueOpenIconComponent,
OpGitlabIssueClosedIconComponent,
diff --git a/frontend/src/app/shared/components/op-context-menu/handlers/op-settings-dropdown-menu.directive.ts b/frontend/src/app/shared/components/op-context-menu/handlers/op-settings-dropdown-menu.directive.ts
index d4be4c7d21aa..7f336ed1c404 100644
--- a/frontend/src/app/shared/components/op-context-menu/handlers/op-settings-dropdown-menu.directive.ts
+++ b/frontend/src/app/shared/components/op-context-menu/handlers/op-settings-dropdown-menu.directive.ts
@@ -178,14 +178,17 @@ export class OpSettingsMenuDirective extends OpContextMenuTrigger {
}
private buildExportDialogHref(query:QueryResource):string {
- const params:Partial&{ title:string } = this.urlParamsHelper
- .buildV3GetQueryFromQueryResource(query) as Partial&{ title:string };
+ const params: Partial & { title: string } = this.urlParamsHelper
+ .buildV3GetQueryFromQueryResource(query) as Partial & { title: string };
params['columns[]'] = this.wpTableColumns.getColumns().map((column) => column.id);
params.title = this.queryTitle(query);
- const queryString = this.urlParamsHelper.buildQueryString(params) || '';
const url = new URL(window.location.href);
+ const queryId = url.searchParams.get('query_id');
+ if (queryId) {
+ params.query_id = queryId;
+ }
url.pathname = `${url.pathname}/export_dialog`;
- url.search = queryString;
+ url.search = this.urlParamsHelper.buildQueryString(params) || '';
return url.toString();
}
diff --git a/frontend/src/app/shared/components/option-list/option-list.sass b/frontend/src/app/shared/components/option-list/option-list.sass
index 8b3e01ef4f2f..a4bd943e3d33 100644
--- a/frontend/src/app/shared/components/option-list/option-list.sass
+++ b/frontend/src/app/shared/components/option-list/option-list.sass
@@ -10,8 +10,8 @@
&--item
padding: 1rem 1rem 0.5rem 0.75rem
display: flex
- border: 1px solid #cbd5e0
- background: #f7fafc
+ border: 1px solid var(--borderColor-muted)
+ background-color: var(--bgColor-muted)
border-radius: 4px
&:not(:last-child)
diff --git a/frontend/src/app/spot/components/drop-modal/drop-modal-portal.component.ts b/frontend/src/app/spot/components/drop-modal/drop-modal-portal.component.ts
index 85837d5aa075..756267b85fe3 100644
--- a/frontend/src/app/spot/components/drop-modal/drop-modal-portal.component.ts
+++ b/frontend/src/app/spot/components/drop-modal/drop-modal-portal.component.ts
@@ -1,5 +1,4 @@
import {
- AfterViewChecked,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
@@ -10,13 +9,12 @@ import {
import { SpotDropModalTeleportationService, TeleportInstance } from './drop-modal-teleportation.service';
import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin';
-
@Component({
selector: 'opce-spot-drop-modal-portal',
template: ' ',
changeDetection: ChangeDetectionStrategy.OnPush,
})
-export class SpotDropModalPortalComponent extends UntilDestroyedMixin implements OnInit, AfterViewChecked {
+export class SpotDropModalPortalComponent extends UntilDestroyedMixin implements OnInit {
@HostBinding('class.spot-drop-modal-portal') className = true;
template:TeleportInstance|null = null;
@@ -39,10 +37,7 @@ export class SpotDropModalPortalComponent extends UntilDestroyedMixin implements
.subscribe((templ) => {
this.template = templ;
this.cdRef.detectChanges();
+ this.template$.hasRendered$.next(!!this.elementRef.nativeElement.children.length);
});
}
-
- ngAfterViewChecked():void {
- this.template$.hasRendered$.next(!!this.elementRef.nativeElement.children.length);
- }
}
diff --git a/frontend/src/app/spot/components/drop-modal/drop-modal.component.ts b/frontend/src/app/spot/components/drop-modal/drop-modal.component.ts
index 1f0169a7c68f..2a5e4dc31533 100644
--- a/frontend/src/app/spot/components/drop-modal/drop-modal.component.ts
+++ b/frontend/src/app/spot/components/drop-modal/drop-modal.component.ts
@@ -109,15 +109,6 @@ export class SpotDropModalComponent implements OnDestroy {
open() {
this._opened = true;
this.updateAppHeight();
- this.cdRef.detectChanges();
-
- /*
- * If we don't activate the body after one tick, angular will complain because
- * it already rendered a `null` template, but then gets an update to that
- * template in the same tick.
- * To make it happy, we update afterwards
- */
- this.teleportationService.activate(this.body);
this.teleportationService
.hasRenderedFiltered$
@@ -126,6 +117,7 @@ export class SpotDropModalComponent implements OnDestroy {
take(1),
)
.subscribe(() => {
+ this.cdRef.detectChanges();
const referenceEl = this.elementRef.nativeElement as HTMLElement;
const floatingEl = this.anchor.nativeElement as HTMLElement;
this.cleanupFloatingUI = autoUpdate(
@@ -173,10 +165,16 @@ export class SpotDropModalComponent implements OnDestroy {
// Index 1 because the element at index 0 is the trigger button to open the modal
(findAllFocusableElementsWithin(document.querySelector('.spot-drop-modal-portal')!)[1])?.focus();
}
-
- this.cdRef.detectChanges();
});
});
+
+ /*
+ * If we don't activate the body after one tick, angular will complain because
+ * it already rendered a `null` template, but then gets an update to that
+ * template in the same tick.
+ * To make it happy, we update afterwards
+ */
+ this.teleportationService.activate(this.body);
}
close():void {
diff --git a/frontend/src/global_styles/common/header/app-menu.sass b/frontend/src/global_styles/common/header/app-menu.sass
index 65590b3b6541..a5f8d85e1d00 100644
--- a/frontend/src/global_styles/common/header/app-menu.sass
+++ b/frontend/src/global_styles/common/header/app-menu.sass
@@ -31,7 +31,6 @@
justify-content: center
align-items: center
height: var(--header-height)
- line-height: var(--header-height)
zoom: 1
color: var(--header-item-font-color)
font-size: var(--header-item-font-size)
diff --git a/frontend/src/global_styles/content/work_packages/_table_configuration_modal.sass b/frontend/src/global_styles/content/work_packages/_table_configuration_modal.sass
index 3bf446420c00..e399affc2082 100644
--- a/frontend/src/global_styles/content/work_packages/_table_configuration_modal.sass
+++ b/frontend/src/global_styles/content/work_packages/_table_configuration_modal.sass
@@ -6,10 +6,9 @@
float: left
margin-right: 20px
font-weight: normal
-
- &.-multi-line
- margin-bottom: 0
- line-height: 40px
+ display: flex
+ align-items: center
+ gap: 5px
input
margin-top: 0px
diff --git a/frontend/src/global_styles/layout/_base_mobile.sass b/frontend/src/global_styles/layout/_base_mobile.sass
index c99c1357f2d8..2e17194bb340 100644
--- a/frontend/src/global_styles/layout/_base_mobile.sass
+++ b/frontend/src/global_styles/layout/_base_mobile.sass
@@ -32,34 +32,15 @@
-webkit-overflow-scrolling: touch
height: 100%
- // ------------------- BEGIN CHANGED SCROLL BEHAVIOR
- // Change scroll behavior on mobile:
- // Let the window be the one who scrolls.
- // Thus we make sure, that mobile browsers (like iOS Safari) hide their toolbars on scroll.
- html
- overflow: auto
- body,
- #main
- overflow: visible
-
- #wrapper,
- #content-wrapper,
- #content-body,
- #content-bodyRight
- overflow: hidden
-
#main
margin-top: var(--header-height)
- ._header-scrolled &
+ ._header-scrolled
+ #main
margin-top: 0
-
- #content-wrapper
- height: 100%
- // Take care that the wrapper has the available screen height at the least
- // Check for example notification center on mobile before changing that
- min-height: calc(100vh - var(--header-height))
- // ------------------- END CHANGED SCROLL BEHAVIOR
+ #main,
+ #content-wrapper
+ height: 100dvh
#content-body,
#content-header
diff --git a/frontend/src/global_styles/layout/_main_menu_mobile.sass b/frontend/src/global_styles/layout/_main_menu_mobile.sass
index 17a6ba029e31..aa3e684b0085 100644
--- a/frontend/src/global_styles/layout/_main_menu_mobile.sass
+++ b/frontend/src/global_styles/layout/_main_menu_mobile.sass
@@ -61,12 +61,9 @@
background: #fff
transition: background .3s
- #main:not(.nosidebar)
- .content-overlay
- display: block
-
#wrapper:not(.hidden-navigation)
.content-overlay
+ display: block
position: fixed
height: 100%
background: #000
diff --git a/frontend/src/global_styles/openproject/_mixins.sass b/frontend/src/global_styles/openproject/_mixins.sass
index 3f60adeef5ba..5939b79e33d6 100644
--- a/frontend/src/global_styles/openproject/_mixins.sass
+++ b/frontend/src/global_styles/openproject/_mixins.sass
@@ -320,7 +320,7 @@ $scrollbar-size: 10px
padding: 0 0.15rem 0 0.15rem
font-size: 0.7rem
font-weight: var(--base-text-weight-bold)
- background: #00A3FF
+ background: var(--bgColor-accent-emphasis)
color: white
flex-shrink: 0
diff --git a/frontend/src/global_styles/primer/_flash.sass b/frontend/src/global_styles/primer/_flash.sass
new file mode 100644
index 000000000000..73ea1438690e
--- /dev/null
+++ b/frontend/src/global_styles/primer/_flash.sass
@@ -0,0 +1,46 @@
+//-- copyright
+// OpenProject is an open source project management software.
+// Copyright (C) the OpenProject GmbH
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License version 3.
+//
+// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+// Copyright (C) 2006-2013 Jean-Philippe Lang
+// Copyright (C) 2010-2013 the ChiliProject Team
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// See COPYRIGHT and LICENSE files for more details.
+//++
+
+$op-primer-flash-toaster-width: 80%
+
+.op-primer-flash
+ z-index: 599
+ position: absolute
+ max-width: $op-primer-flash-toaster-width
+ margin: 0 auto
+ left: 10%
+ right: 10%
+ top: 1rem
+
+ // Align multiple toasts
+ display: flex
+ flex-direction: column
+ gap: 1rem
+
+ &--item
+ word-wrap: break-word
diff --git a/frontend/src/global_styles/primer/_index.sass b/frontend/src/global_styles/primer/_index.sass
index cd140c4f0365..587dc8f8a00d 100644
--- a/frontend/src/global_styles/primer/_index.sass
+++ b/frontend/src/global_styles/primer/_index.sass
@@ -1,2 +1,3 @@
@import icons
@import overrides
+@import flash
diff --git a/frontend/src/global_styles/primer/_overrides.sass b/frontend/src/global_styles/primer/_overrides.sass
index fbe1a193bf27..570bc7c90340 100644
--- a/frontend/src/global_styles/primer/_overrides.sass
+++ b/frontend/src/global_styles/primer/_overrides.sass
@@ -83,14 +83,10 @@ sub-header,
flex-direction: column
row-gap: 1rem
-// Todo: Fix this as soon as possible in the primer repo!
-.SubHeader-leftPane
- [class*="FormControl-input-width--"]:not(.FormControl-input-width--auto)
- width: 100vw
-
.Button.op-app-header--primer-button,
.Button.op-app-header--primer-button .Button-visual
color: var(--header-item-font-color)
+ width: auto
&:hover
background: var(--header-item-bg-hover-color)
diff --git a/frontend/src/stimulus/controllers/async-dialog.controller.ts b/frontend/src/stimulus/controllers/async-dialog.controller.ts
index 3f65e3b6e655..2d0892701fe3 100644
--- a/frontend/src/stimulus/controllers/async-dialog.controller.ts
+++ b/frontend/src/stimulus/controllers/async-dialog.controller.ts
@@ -30,10 +30,9 @@
import { ApplicationController } from 'stimulus-use';
import { renderStreamMessage } from '@hotwired/turbo';
+import { TurboHelpers } from '../../turbo/helpers';
export default class AsyncDialogController extends ApplicationController {
- private loadingDialog:HTMLDialogElement|null;
-
connect() {
this.element.addEventListener('click', (e) => {
e.preventDefault();
@@ -42,48 +41,20 @@ export default class AsyncDialogController extends ApplicationController {
}
triggerTurboStream():void {
- let loaded = false;
-
- setTimeout(() => {
- if (!loaded) {
- this.addLoading();
- }
- }, 100);
+ TurboHelpers.showProgressBar();
- fetch(this.href, {
+ void fetch(this.href, {
method: this.method,
headers: {
Accept: 'text/vnd.turbo-stream.html',
},
}).then((r) => r.text())
.then((html) => {
- loaded = true;
renderStreamMessage(html);
})
- .finally(() => this.removeLoading());
- }
-
- removeLoading() {
- this.loadingDialog?.remove();
- }
-
- addLoading() {
- this.removeLoading();
- const dialog = document.createElement('dialog');
- dialog.classList.add('Overlay', 'Overlay--size-medium', 'Overlay--motion-scaleFade');
- dialog.style.height = '150px';
- dialog.style.display = 'grid';
- dialog.style.placeContent = 'center';
- dialog.id = 'loading';
- dialog.innerHTML = `
-
-
-
-
- `;
- document.body.appendChild(dialog);
- dialog.showModal();
- this.loadingDialog = dialog;
+ .finally(() => {
+ TurboHelpers.hideProgressBar();
+ });
}
get href() {
diff --git a/frontend/src/stimulus/controllers/dynamic/admin/work-packages-settings.controller.ts b/frontend/src/stimulus/controllers/dynamic/admin/progress-tracking.controller.ts
similarity index 58%
rename from frontend/src/stimulus/controllers/dynamic/admin/work-packages-settings.controller.ts
rename to frontend/src/stimulus/controllers/dynamic/admin/progress-tracking.controller.ts
index 6dc3e76c2355..0778fb4ca232 100644
--- a/frontend/src/stimulus/controllers/dynamic/admin/work-packages-settings.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/admin/progress-tracking.controller.ts
@@ -30,29 +30,35 @@
import { Controller } from '@hotwired/stimulus';
-export default class WorkPackagesSettingsController extends Controller {
+export default class ProgressTrackingController extends Controller {
static values = {
- percentCompleteEditionActive: Boolean,
+ initialMode: String,
};
static targets = [
- 'progressCalculationModeSelect',
+ 'progressCalculationModeRadioGroup',
'warningText',
'warningToast',
+ 'statusClosedRadioGroup',
];
- declare readonly percentCompleteEditionActiveValue:boolean;
+ declare readonly initialModeValue:string;
- declare readonly progressCalculationModeSelectTarget:HTMLSelectElement;
+ declare readonly progressCalculationModeRadioGroupTarget:HTMLElement;
declare readonly warningTextTarget:HTMLElement;
declare readonly warningToastTarget:HTMLElement;
- private initialMode:string;
+ declare readonly statusClosedRadioGroupTarget:HTMLElement;
connect() {
- this.initialMode = this.progressCalculationModeSelectTarget.value;
+ this.updateEnabledOptions();
}
- displayWarning() {
+ updateEnabledOptions() {
+ this.updateWarning();
+ this.updateStatusClosedDisabledState();
+ }
+
+ updateWarning() {
const warningMessageHtml = this.getWarningMessageHtml();
if (warningMessageHtml) {
this.warningTextTarget.innerHTML = warningMessageHtml;
@@ -62,21 +68,33 @@ export default class WorkPackagesSettingsController extends Controller {
}
}
- getWarningMessageHtml():string {
- const newMode = this.progressCalculationModeSelectTarget.value;
- if (newMode === this.initialMode) {
- return '';
+ updateStatusClosedDisabledState() {
+ if (this.getSelectedMode() === 'status') {
+ this.statusClosedRadioGroupTarget.setAttribute('disabled', 'true');
+ this.statusClosedRadioGroupTarget.querySelectorAll('input').forEach((input) => {
+ input.disabled = true;
+ });
+ } else {
+ this.statusClosedRadioGroupTarget.removeAttribute('disabled');
+ this.statusClosedRadioGroupTarget.querySelectorAll('input').forEach((input) => {
+ input.disabled = false;
+ });
}
+ }
+
+ getSelectedMode() {
+ const checkedRadio = this.progressCalculationModeRadioGroupTarget.querySelector('input:checked') as HTMLInputElement;
+ return checkedRadio?.value || '';
+ }
- // to be removed in 15.0 with :percent_complete_edition feature flag removal
- if (!this.percentCompleteEditionActiveValue && newMode === 'field') {
- return I18n.t(
- 'js.admin.work_packages_settings.warning_progress_calculation_mode_change_from_status_to_field_pre_14_4_without_percent_complete_edition_html',
- );
+ getWarningMessageHtml():string {
+ const selectedMode = this.getSelectedMode();
+ if (selectedMode === this.initialModeValue || !selectedMode) {
+ return '';
}
return I18n.t(
- `js.admin.work_packages_settings.warning_progress_calculation_mode_change_from_${this.initialMode}_to_${newMode}_html`,
+ `js.admin.work_packages_settings.warning_progress_calculation_mode_change_from_${this.initialModeValue}_to_${selectedMode}_html`,
);
}
}
diff --git a/frontend/src/stimulus/controllers/dynamic/expandable-list.controller.ts b/frontend/src/stimulus/controllers/dynamic/expandable-list.controller.ts
index f4a779d3b6a8..021775b0eb73 100644
--- a/frontend/src/stimulus/controllers/dynamic/expandable-list.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/expandable-list.controller.ts
@@ -31,14 +31,17 @@
import { Controller } from '@hotwired/stimulus';
export default class ExxpandableListController extends Controller {
- static targets = ['showHideButton', 'hiddenElements'];
+ static targets = ['hiddenElements', 'showButton'];
declare readonly hiddenElementsTarget:HTMLElement;
+ declare readonly showButtonTarget:HTMLElement;
- showhiddenElements():void {
- if (this.hiddenElementsTarget.classList.contains('d-none')) {
- this.hiddenElementsTarget.classList.remove('d-none');
- } else {
- this.hiddenElementsTarget.classList.add('d-none');
- }
+ showElements():void {
+ this.hiddenElementsTarget.classList.remove('d-none');
+ this.showButtonTarget.classList.add('d-none');
+ }
+
+ hideElements():void {
+ this.hiddenElementsTarget.classList.add('d-none');
+ this.showButtonTarget.classList.remove('d-none');
}
}
diff --git a/frontend/src/stimulus/controllers/dynamic/filter/filter-list.controller.ts b/frontend/src/stimulus/controllers/dynamic/filter/filter-list.controller.ts
index ee93120b3ba3..420be0098525 100644
--- a/frontend/src/stimulus/controllers/dynamic/filter/filter-list.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/filter/filter-list.controller.ts
@@ -43,11 +43,12 @@ export default class FilterListController extends Controller {
declare readonly filterTarget:HTMLInputElement;
declare readonly noResultsTextTarget:HTMLInputElement;
+ declare readonly hasNoResultsTextTarget:boolean;
declare readonly searchItemTargets:HTMLInputElement[];
declare readonly clearButtonIdValue:string;
connect():void {
- document.getElementById(this.clearButtonIdValue)?.addEventListener('click', () => {
+ document.getElementById(this.clearButtonIdValue)?.addEventListener('click', () => {
this.resetFilterViaClearButton();
});
}
@@ -66,23 +67,25 @@ export default class FilterListController extends Controller {
const text = item.textContent?.toLowerCase();
if (text?.includes(query)) {
- (item as HTMLElement).classList.remove('d-none');
+ this.setVisibility(item, true);
showNoResultsText = false;
} else {
- (item as HTMLElement).classList.add('d-none');
+ this.setVisibility(item, false);
}
});
- if (showNoResultsText) {
- this.noResultsTextTarget?.classList.remove('d-none');
- } else {
- this.noResultsTextTarget?.classList.add('d-none');
+ if (this.hasNoResultsTextTarget) {
+ this.setVisibility(this.noResultsTextTarget, showNoResultsText);
}
}
resetFilterViaClearButton() {
this.searchItemTargets.forEach((item) => {
- (item as HTMLElement).classList.remove('d-none');
+ this.setVisibility(item, true);
});
}
+
+ setVisibility(element:HTMLElement, visible:boolean) {
+ element.classList.toggle('d-none', !visible);
+ }
}
diff --git a/frontend/src/stimulus/controllers/dynamic/job-status-polling.controller.ts b/frontend/src/stimulus/controllers/dynamic/job-status-polling.controller.ts
index 25b7539301c6..3c48579a0e1c 100644
--- a/frontend/src/stimulus/controllers/dynamic/job-status-polling.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/job-status-polling.controller.ts
@@ -40,14 +40,19 @@ export default class JobStatusPollingController extends Controller
setTimeout(() => element.click(), 50);
}
- redirectClick(_:Event) {
- this.userInteraction = true;
+ redirectClick(event:PointerEvent) {
+ event.preventDefault();
+ this.followLink(event.target as HTMLLinkElement);
}
redirectTargetConnected(element:HTMLLinkElement) {
setTimeout(() => {
- this.userInteraction = true;
- window.location.href = element.href;
+ this.followLink(element);
}, 2000);
}
+
+ followLink(element:HTMLLinkElement) {
+ this.userInteraction = true;
+ window.location.href = element.href;
+ }
}
diff --git a/frontend/src/stimulus/controllers/dynamic/projects/settings/project-custom-fields-mapping-filter.controller.ts b/frontend/src/stimulus/controllers/dynamic/projects/settings/project-custom-fields-mapping-filter.controller.ts
index 9f93777d0380..6a6381432926 100644
--- a/frontend/src/stimulus/controllers/dynamic/projects/settings/project-custom-fields-mapping-filter.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/projects/settings/project-custom-fields-mapping-filter.controller.ts
@@ -57,13 +57,13 @@ export default class extends FilterListController {
hideBulkActionContainers() {
this.bulkActionContainerTargets.forEach((item) => {
- (item as HTMLElement).classList.add('d-none');
+ this.setVisibility(item, false);
});
}
showBulkActionContainers() {
this.bulkActionContainerTargets.forEach((item) => {
- (item as HTMLElement).classList.remove('d-none');
+ this.setVisibility(item, true);
});
}
}
diff --git a/frontend/src/stimulus/controllers/dynamic/sort-by-config.controller.ts b/frontend/src/stimulus/controllers/dynamic/sort-by-config.controller.ts
index 1a8065327216..ae2b4c25ee16 100644
--- a/frontend/src/stimulus/controllers/dynamic/sort-by-config.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/sort-by-config.controller.ts
@@ -50,6 +50,11 @@ export default class SortByConfigController extends Controller {
declare readonly inputRowTargets:HTMLElement[];
declare readonly inputRowContainerTarget:HTMLElement;
+ declare parentForm:HTMLFormElement | null;
+ declare pageTarget:HTMLInputElement;
+
+ declare initialSortBy:string;
+
connect():void {
this.inputRowTargets.forEach((row) => {
this.manageRow(row);
@@ -57,6 +62,9 @@ export default class SortByConfigController extends Controller {
this.displayNewFieldSelectorIfNeeded();
this.disableSelectedFieldsForOtherSelects();
+
+ this.initialSortBy = this.sortByFieldTarget.value;
+ this.registerPaginationResetHandler();
}
buildSortJson():string {
@@ -69,6 +77,43 @@ export default class SortByConfigController extends Controller {
return JSON.stringify(compact(filters));
}
+ // Tries to find the parent form in the DOM. If present and the form contains a `page` field marked
+ // with the proper target, will register a handler to trigger a pagination reset when the sorting
+ // changes.
+ registerPaginationResetHandler():void {
+ this.parentForm = this.sortByFieldTarget.closest('form');
+
+ if (this.parentForm) {
+ this.pageTarget = this.parentForm.querySelector('input[data-sort-by-config-target="page"]') as HTMLInputElement;
+
+ if (this.pageTarget) {
+ this.parentForm.addEventListener('submit', this.onFormSubmit.bind(this));
+ }
+ }
+ }
+
+ onFormSubmit(event:SubmitEvent):void {
+ if (!this.parentForm || !this.pageTarget) { return; }
+ event.preventDefault();
+
+ this.resetPaginationIfSortingChanged();
+
+ this.parentForm.submit();
+ }
+
+ // When the sorting criteria changes, reset the pagination to the first page.
+ // This leads to a better UX since the previous position in the pagination becomes
+ // obsolete when the underlying collection changes due to sorting adjustments. It is better to start
+ // from a fresh perspective on the data.
+ resetPaginationIfSortingChanged():void {
+ const currentSelection = this.sortByFieldTarget.value;
+
+ if (this.initialSortBy !== currentSelection) {
+ // Reset the pagination:
+ this.pageTarget.value = '';
+ }
+ }
+
fieldChanged(event:Event):void {
const target = event.target as HTMLElement;
const row = target.closest('div[data-sort-by-config-target="inputRow"]') as HTMLElement;
diff --git a/frontend/src/stimulus/controllers/dynamic/work-packages/progress/focus-field.controller.ts b/frontend/src/stimulus/controllers/dynamic/work-packages/progress/focus-field.controller.ts
deleted file mode 100644
index ee7ecb629137..000000000000
--- a/frontend/src/stimulus/controllers/dynamic/work-packages/progress/focus-field.controller.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * -- copyright
- * OpenProject is an open source project management software.
- * Copyright (C) the OpenProject GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License version 3.
- *
- * OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
- * Copyright (C) 2006-2013 Jean-Philippe Lang
- * Copyright (C) 2010-2013 the ChiliProject Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * See COPYRIGHT and LICENSE files for more details.
- * ++
- */
-
-import { Controller } from '@hotwired/stimulus';
-
-export default class FocusFieldController extends Controller {
- static targets = [
- 'fieldToFocus',
- ];
-
- declare readonly fieldToFocusTarget:HTMLInputElement;
-
- connect() {
- if (this.fieldToFocusTarget) {
- this.fieldToFocusTarget.focus();
- this.setCursorPositionToEndOfInput();
- }
- }
-
- private setCursorPositionToEndOfInput() {
- this.fieldToFocusTarget.setSelectionRange(
- this.fieldToFocusTarget.value.length,
- this.fieldToFocusTarget.value.length,
- );
- }
-}
diff --git a/frontend/src/stimulus/controllers/dynamic/work-packages/progress/preview-progress.controller.ts b/frontend/src/stimulus/controllers/dynamic/work-packages/progress/preview-progress.controller.ts
deleted file mode 100644
index 2b39d00218dd..000000000000
--- a/frontend/src/stimulus/controllers/dynamic/work-packages/progress/preview-progress.controller.ts
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * -- copyright
- * OpenProject is an open source project management software.
- * Copyright (C) the OpenProject GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License version 3.
- *
- * OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
- * Copyright (C) 2006-2013 Jean-Philippe Lang
- * Copyright (C) 2010-2013 the ChiliProject Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * See COPYRIGHT and LICENSE files for more details.
- * ++
- */
-
-import { Controller } from '@hotwired/stimulus';
-import { debounce, DebouncedFunc } from 'lodash';
-import Idiomorph from 'idiomorph/dist/idiomorph.cjs';
-
-interface TurboBeforeFrameRenderEventDetail {
- render:(currentElement:HTMLElement, newElement:HTMLElement) => void;
-}
-
-export default class PreviewProgressController extends Controller {
- static targets = [
- 'form', 'progressInput',
- ];
-
- declare readonly progressInputTargets:HTMLInputElement[];
- declare readonly formTarget:HTMLFormElement;
-
- private debouncedPreview:DebouncedFunc<(event:Event) => void>;
- private frameMorphRenderer:(event:CustomEvent) => void;
-
- connect() {
- this.debouncedPreview = debounce((event:Event) => { void this.preview(event); }, 100);
- // TODO: Ideally morphing in this single controller should not be necessary.
- // Turbo supports morphing, by adding the attribute.
- // However, it has a bug, and it doesn't morphs when reloading the frame via javascript.
- // See https://github.com/hotwired/turbo/issues/1161 . Once the issue is solved, we can remove
- // this code and just use instead.
- this.frameMorphRenderer = (event:CustomEvent) => {
- event.detail.render = (currentElement:HTMLElement, newElement:HTMLElement) => {
- Idiomorph.morph(currentElement, newElement, { ignoreActiveValue: true });
- };
- };
-
- this.progressInputTargets.forEach((target) => {
- target.addEventListener('input', this.debouncedPreview);
- target.addEventListener('blur', this.debouncedPreview);
- });
-
- const turboFrame = this.formTarget.closest('turbo-frame') as HTMLFrameElement;
- turboFrame.addEventListener('turbo:before-frame-render', this.frameMorphRenderer);
- }
-
- disconnect() {
- this.progressInputTargets.forEach((target) => {
- target.removeEventListener('input', this.debouncedPreview);
- target.removeEventListener('blur', this.debouncedPreview);
- });
- const turboFrame = this.formTarget.closest('turbo-frame') as HTMLFrameElement;
- turboFrame.removeEventListener('turbo:before-frame-render', this.frameMorphRenderer);
- }
-
- async preview(event:Event) {
- let field:HTMLInputElement;
- if (event.type === 'blur') {
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
- field = (event as FocusEvent).relatedTarget as HTMLInputElement;
- } else {
- field = event.target as HTMLInputElement;
- }
-
- const form = this.formTarget;
- const formData = new FormData(form) as unknown as undefined;
- const formParams = new URLSearchParams(formData);
- const wpParams = [
- ['work_package[initial][estimated_hours]', formParams.get('work_package[initial][estimated_hours]') || ''],
- ['work_package[initial][remaining_hours]', formParams.get('work_package[initial][remaining_hours]') || ''],
- ['work_package[initial][done_ratio]', formParams.get('work_package[initial][done_ratio]') || ''],
- ['work_package[estimated_hours]', formParams.get('work_package[estimated_hours]') || ''],
- ['work_package[remaining_hours]', formParams.get('work_package[remaining_hours]') || ''],
- ['work_package[done_ratio]', formParams.get('work_package[done_ratio]') || ''],
- ['work_package[status_id]', formParams.get('work_package[status_id]') || ''],
- ['field', field?.name ?? ''],
- ];
-
- this.progressInputTargets.forEach((progressInput) => {
- const touchedInputName = progressInput.name.replace(']', '_touched]');
- const touchedValue = formParams.get(touchedInputName) || '';
- wpParams.push([touchedInputName, touchedValue]);
- });
-
- const wpPath = this.ensureValidPathname(form.action);
- const wpAction = wpPath.endsWith('/work_packages/new/progress') ? 'new' : 'edit';
-
- const editUrl = `${wpPath}/${wpAction}?${new URLSearchParams(wpParams).toString()}`;
- const turboFrame = this.formTarget.closest('turbo-frame') as HTMLFrameElement;
-
- if (turboFrame) {
- turboFrame.src = editUrl;
- }
- }
-
- // Ensures that on create forms, there is an "id" for the un-persisted
- // work package when sending requests to the edit action for previews.
- private ensureValidPathname(formAction:string):string {
- const wpPath = new URL(formAction);
-
- if (wpPath.pathname.endsWith('/work_packages/progress')) {
- // Replace /work_packages/progress with /work_packages/new/progress
- wpPath.pathname = wpPath.pathname.replace('/work_packages/progress', '/work_packages/new/progress');
- }
-
- return wpPath.toString();
- }
-}
diff --git a/frontend/src/stimulus/controllers/dynamic/work-packages/progress/preview.controller.ts b/frontend/src/stimulus/controllers/dynamic/work-packages/progress/preview.controller.ts
new file mode 100644
index 000000000000..61b253b88b7d
--- /dev/null
+++ b/frontend/src/stimulus/controllers/dynamic/work-packages/progress/preview.controller.ts
@@ -0,0 +1,299 @@
+/*
+ * -- copyright
+ * OpenProject is an open source project management software.
+ * Copyright (C) the OpenProject GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version 3.
+ *
+ * OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+ * Copyright (C) 2006-2013 Jean-Philippe Lang
+ * Copyright (C) 2010-2013 the ChiliProject Team
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * See COPYRIGHT and LICENSE files for more details.
+ * ++
+ */
+
+import { Controller } from '@hotwired/stimulus';
+import { debounce, DebouncedFunc } from 'lodash';
+import Idiomorph from 'idiomorph/dist/idiomorph.cjs';
+
+interface TurboBeforeFrameRenderEventDetail {
+ render:(currentElement:HTMLElement, newElement:HTMLElement) => void;
+}
+
+interface HTMLTurboFrameElement extends HTMLElement {
+ src:string;
+}
+
+export default class PreviewController extends Controller {
+ static targets = [
+ 'form',
+ 'progressInput',
+ 'initialValueInput',
+ 'touchedFieldInput',
+ ];
+
+ declare readonly progressInputTargets:HTMLInputElement[];
+ declare readonly formTarget:HTMLFormElement;
+ declare readonly initialValueInputTargets:HTMLInputElement[];
+ declare readonly touchedFieldInputTargets:HTMLInputElement[];
+
+ private debouncedPreview:DebouncedFunc<(event:Event) => void>;
+ private frameMorphRenderer:(event:CustomEvent) => void;
+ private targetFieldName:string;
+ private touchedFields:Set;
+
+ connect() {
+ this.touchedFields = new Set();
+ this.touchedFieldInputTargets.forEach((input) => {
+ const fieldName = input.dataset.referrerField;
+ if (fieldName && input.value === 'true') {
+ this.touchedFields.add(fieldName);
+ }
+ });
+
+ this.debouncedPreview = debounce((event:Event) => { void this.preview(event); }, 100);
+
+ // Turbo supports morphing, by adding the
+ // attribute. However, it does not work that well with primer input: when
+ // adding "data-turbo-permanent" to keep value and focus on the active
+ // element, it also keeps the `aria-describedby` attribute which references
+ // caption and validation element ids. As these elements are morphed and get
+ // new ids, the ids referenced by `aria-describedby` are stale. This makes
+ // caption and validation message unaccessible for screen readers and other
+ // assistive technologies. This is why morph cannot be used here.
+ this.frameMorphRenderer = (event:CustomEvent) => {
+ event.detail.render = (currentElement:HTMLElement, newElement:HTMLElement) => {
+ Idiomorph.morph(currentElement, newElement, { ignoreActiveValue: true });
+ };
+ };
+
+ this.progressInputTargets.forEach((target) => {
+ if (target.tagName.toLowerCase() === 'select') {
+ target.addEventListener('change', this.debouncedPreview);
+ } else {
+ target.addEventListener('input', this.debouncedPreview);
+ }
+ target.addEventListener('blur', this.debouncedPreview);
+
+ if (target.dataset.focus === 'true') {
+ this.focusAndSetCursorPositionToEndOfInput(target);
+ }
+ });
+
+ const turboFrame = this.formTarget.closest('turbo-frame') as HTMLTurboFrameElement;
+ turboFrame.addEventListener('turbo:before-frame-render', this.frameMorphRenderer);
+ }
+
+ disconnect() {
+ this.debouncedPreview.cancel();
+ this.progressInputTargets.forEach((target) => {
+ if (target.tagName.toLowerCase() === 'select') {
+ target.removeEventListener('change', this.debouncedPreview);
+ } else {
+ target.removeEventListener('input', this.debouncedPreview);
+ }
+ target.removeEventListener('blur', this.debouncedPreview);
+ });
+ const turboFrame = this.formTarget.closest('turbo-frame') as HTMLTurboFrameElement;
+ if (turboFrame) {
+ turboFrame.removeEventListener('turbo:before-frame-render', this.frameMorphRenderer);
+ }
+ }
+
+ markFieldAsTouched(event:{ target:HTMLInputElement }) {
+ this.targetFieldName = event.target.name.replace(/^work_package\[([^\]]+)\]$/, '$1');
+ this.markTouched(this.targetFieldName);
+
+ if (this.isWorkBasedMode()) {
+ this.keepWorkValue();
+ }
+ }
+
+ async preview(event:Event) {
+ let field:HTMLInputElement;
+ if (event.type === 'blur') {
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
+ field = (event as FocusEvent).relatedTarget as HTMLInputElement;
+ } else {
+ field = event.target as HTMLInputElement;
+ }
+
+ const form = this.formTarget;
+ const formData = new FormData(form) as unknown as undefined;
+ const formParams = new URLSearchParams(formData);
+
+ const wpParams = Array.from(formParams.entries())
+ .filter(([key, _]) => key.startsWith('work_package'));
+ wpParams.push(['field', field?.name ?? '']);
+
+ const wpPath = this.ensureValidPathname(form.action);
+ const wpAction = wpPath.endsWith('/work_packages/new/progress') ? 'new' : 'edit';
+
+ const editUrl = `${wpPath}/${wpAction}?${new URLSearchParams(wpParams).toString()}`;
+ const turboFrame = this.formTarget.closest('turbo-frame') as HTMLTurboFrameElement;
+
+ if (turboFrame) {
+ turboFrame.src = editUrl;
+ }
+ }
+
+ private focusAndSetCursorPositionToEndOfInput(field:HTMLInputElement) {
+ field.focus();
+ field.setSelectionRange(
+ field.value.length,
+ field.value.length,
+ );
+ }
+
+ // Ensures that on create forms, there is an "id" for the un-persisted
+ // work package when sending requests to the edit action for previews.
+ private ensureValidPathname(formAction:string):string {
+ const wpPath = new URL(formAction);
+
+ if (wpPath.pathname.endsWith('/work_packages/progress')) {
+ // Replace /work_packages/progress with /work_packages/new/progress
+ wpPath.pathname = wpPath.pathname.replace('/work_packages/progress', '/work_packages/new/progress');
+ }
+
+ return wpPath.toString();
+ }
+
+ private isWorkBasedMode() {
+ return this.findValueInput('done_ratio') !== undefined;
+ }
+
+ private keepWorkValue() {
+ if (this.isInitialValueEmpty('estimated_hours') && !this.isTouched('estimated_hours')) {
+ // let work be derived
+ return;
+ }
+
+ if (this.isBeingEdited('estimated_hours')) {
+ this.untouchFieldsWhenWorkIsEdited();
+ } else if (this.isBeingEdited('remaining_hours')) {
+ this.untouchFieldsWhenRemainingWorkIsEdited();
+ } else if (this.isBeingEdited('done_ratio')) {
+ this.untouchFieldsWhenPercentCompleteIsEdited();
+ }
+ }
+
+ private untouchFieldsWhenWorkIsEdited() {
+ if (this.areBothTouched('remaining_hours', 'done_ratio')) {
+ if (this.isValueEmpty('done_ratio') && this.isValueEmpty('remaining_hours')) {
+ return;
+ }
+ if (this.isValueEmpty('done_ratio')) {
+ this.markUntouched('done_ratio');
+ } else {
+ this.markUntouched('remaining_hours');
+ }
+ } else if (this.isTouchedAndEmpty('remaining_hours') && this.isValueSet('done_ratio')) {
+ // force remaining work derivation
+ this.markUntouched('remaining_hours');
+ this.markTouched('done_ratio');
+ } else if (this.isTouchedAndEmpty('done_ratio') && this.isValueSet('remaining_hours')) {
+ // force % complete derivation
+ this.markUntouched('done_ratio');
+ this.markTouched('remaining_hours');
+ }
+ }
+
+ private untouchFieldsWhenRemainingWorkIsEdited() {
+ if (this.isTouchedAndEmpty('estimated_hours') && this.isValueSet('done_ratio')) {
+ // force work derivation
+ this.markUntouched('estimated_hours');
+ this.markTouched('done_ratio');
+ } else if (this.isValueSet('estimated_hours')) {
+ this.markUntouched('done_ratio');
+ }
+ }
+
+ private untouchFieldsWhenPercentCompleteIsEdited() {
+ if (this.isValueSet('estimated_hours')) {
+ this.markUntouched('remaining_hours');
+ }
+ }
+
+ private areBothTouched(fieldName1:string, fieldName2:string) {
+ return this.isTouched(fieldName1) && this.isTouched(fieldName2);
+ }
+
+ private isBeingEdited(fieldName:string) {
+ return fieldName === this.targetFieldName;
+ }
+
+ // Finds the hidden initial value input based on a field name.
+ //
+ // The initial value input field holds the initial value of the work package
+ // before being set by the user or derived.
+ private findInitialValueInput(fieldName:string):HTMLInputElement|undefined {
+ return this.initialValueInputTargets.find((input) =>
+ (input.dataset.referrerField === fieldName));
+ }
+
+ // Finds the value field input based on a field name.
+ //
+ // The value field input holds the current value of a progress field.
+ private findValueInput(fieldName:string):HTMLInputElement|undefined {
+ return this.progressInputTargets.find((input) =>
+ (input.name === fieldName) || (input.name === `work_package[${fieldName}]`));
+ }
+
+ private isTouchedAndEmpty(fieldName:string) {
+ return this.isTouched(fieldName) && this.isValueEmpty(fieldName);
+ }
+
+ private isTouched(fieldName:string) {
+ return this.touchedFields.has(fieldName);
+ }
+
+ private isInitialValueEmpty(fieldName:string) {
+ const valueInput = this.findInitialValueInput(fieldName);
+ return valueInput?.value === '';
+ }
+
+ private isValueEmpty(fieldName:string) {
+ const valueInput = this.findValueInput(fieldName);
+ return valueInput?.value === '';
+ }
+
+ private isValueSet(fieldName:string) {
+ const valueInput = this.findValueInput(fieldName);
+ return valueInput !== undefined && valueInput.value !== '';
+ }
+
+ private markTouched(fieldName:string) {
+ this.touchedFields.add(fieldName);
+ this.updateTouchedFieldHiddenInputs();
+ }
+
+ private markUntouched(fieldName:string) {
+ this.touchedFields.delete(fieldName);
+ this.updateTouchedFieldHiddenInputs();
+ }
+
+ private updateTouchedFieldHiddenInputs() {
+ this.touchedFieldInputTargets.forEach((input) => {
+ const fieldName = input.dataset.referrerField;
+ if (fieldName) {
+ input.value = this.isTouched(fieldName) ? 'true' : 'false';
+ }
+ });
+ }
+}
diff --git a/frontend/src/stimulus/controllers/dynamic/work-packages/progress/touched-field-marker.controller.ts b/frontend/src/stimulus/controllers/dynamic/work-packages/progress/touched-field-marker.controller.ts
deleted file mode 100644
index 7c96bcd31913..000000000000
--- a/frontend/src/stimulus/controllers/dynamic/work-packages/progress/touched-field-marker.controller.ts
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * -- copyright
- * OpenProject is an open source project management software.
- * Copyright (C) the OpenProject GmbH
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License version 3.
- *
- * OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
- * Copyright (C) 2006-2013 Jean-Philippe Lang
- * Copyright (C) 2010-2013 the ChiliProject Team
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * See COPYRIGHT and LICENSE files for more details.
- * ++
- */
-
-import { Controller } from '@hotwired/stimulus';
-
-export default class TouchedFieldMarkerController extends Controller {
- static targets = [
- 'initialValueInput',
- 'touchedFieldInput',
- 'progressInput',
- ];
-
- declare readonly initialValueInputTargets:HTMLInputElement[];
- declare readonly touchedFieldInputTargets:HTMLInputElement[];
- declare readonly progressInputTargets:HTMLInputElement[];
-
- private targetFieldName:string;
-
- private markFieldAsTouched(event:{ target:HTMLInputElement }) {
- this.targetFieldName = event.target.name.replace(/^work_package\[([^\]]+)\]$/, '$1');
- this.markTouched(this.targetFieldName);
-
- if (this.isWorkBasedMode()) {
- this.keepWorkValue();
- }
- }
-
- private isWorkBasedMode() {
- return this.findValueInput('done_ratio') !== undefined;
- }
-
- private keepWorkValue() {
- if (this.isInitialValueEmpty('estimated_hours') && !this.isTouched('estimated_hours')) {
- // let work be derived
- return;
- }
-
- if (this.isBeingEdited('estimated_hours')) {
- this.untouchFieldsWhenWorkIsEdited();
- } else if (this.isBeingEdited('remaining_hours')) {
- this.untouchFieldsWhenRemainingWorkIsEdited();
- } else if (this.isBeingEdited('done_ratio')) {
- this.untouchFieldsWhenPercentCompleteIsEdited();
- }
- }
-
- private untouchFieldsWhenWorkIsEdited() {
- if (this.areBothTouched('remaining_hours', 'done_ratio')) {
- if (this.isValueEmpty('done_ratio') && this.isValueEmpty('remaining_hours')) {
- return;
- }
- if (this.isValueEmpty('done_ratio')) {
- this.markUntouched('done_ratio');
- } else {
- this.markUntouched('remaining_hours');
- }
- } else if (this.isTouchedAndEmpty('remaining_hours') && this.isValueSet('done_ratio')) {
- // force remaining work derivation
- this.markUntouched('remaining_hours');
- this.markTouched('done_ratio');
- } else if (this.isTouchedAndEmpty('done_ratio') && this.isValueSet('remaining_hours')) {
- // force % complete derivation
- this.markUntouched('done_ratio');
- this.markTouched('remaining_hours');
- }
- }
-
- private untouchFieldsWhenRemainingWorkIsEdited() {
- if (this.isTouchedAndEmpty('estimated_hours') && this.isValueSet('done_ratio')) {
- // force work derivation
- this.markUntouched('estimated_hours');
- this.markTouched('done_ratio');
- } else if (this.isValueSet('estimated_hours')) {
- this.markUntouched('done_ratio');
- }
- }
-
- private untouchFieldsWhenPercentCompleteIsEdited() {
- if (this.isValueSet('estimated_hours')) {
- this.markUntouched('remaining_hours');
- }
- }
-
- private areBothTouched(fieldName1:string, fieldName2:string) {
- return this.isTouched(fieldName1) && this.isTouched(fieldName2);
- }
-
- private isBeingEdited(fieldName:string) {
- return fieldName === this.targetFieldName;
- }
-
- // Finds the hidden initial value input based on a field name.
- //
- // The initial value input field holds the initial value of the work package
- // before being set by the user or derived.
- private findInitialValueInput(fieldName:string):HTMLInputElement|undefined {
- return this.initialValueInputTargets.find((input) =>
- (input.dataset.referrerField === fieldName) || (input.dataset.referrerField === `work_package[${fieldName}]`));
- }
-
- // Finds the touched field input based on a field name.
- //
- // The touched input field is used to mark a field as touched by the user so
- // that the backend keeps the value instead of deriving it.
- private findTouchedInput(fieldName:string):HTMLInputElement|undefined {
- return this.touchedFieldInputTargets.find((input) =>
- (input.dataset.referrerField === fieldName) || (input.dataset.referrerField === `work_package[${fieldName}]`));
- }
-
- // Finds the value field input based on a field name.
- //
- // The value field input holds the current value of a progress field.
- private findValueInput(fieldName:string):HTMLInputElement|undefined {
- return this.progressInputTargets.find((input) =>
- (input.name === fieldName) || (input.name === `work_package[${fieldName}]`));
- }
-
- private isTouchedAndEmpty(fieldName:string) {
- return this.isTouched(fieldName) && this.isValueEmpty(fieldName);
- }
-
- private isTouched(fieldName:string) {
- const touchedInput = this.findTouchedInput(fieldName);
- return touchedInput?.value === 'true';
- }
-
- private isInitialValueEmpty(fieldName:string) {
- const valueInput = this.findInitialValueInput(fieldName);
- return valueInput?.value === '';
- }
-
- private isValueEmpty(fieldName:string) {
- const valueInput = this.findValueInput(fieldName);
- return valueInput?.value === '';
- }
-
- private isValueSet(fieldName:string) {
- const valueInput = this.findValueInput(fieldName);
- return valueInput !== undefined && valueInput.value !== '';
- }
-
- private markTouched(fieldName:string) {
- const touchedInput = this.findTouchedInput(fieldName);
- if (touchedInput) {
- touchedInput.value = 'true';
- }
- }
-
- private markUntouched(fieldName:string) {
- const touchedInput = this.findTouchedInput(fieldName);
- if (touchedInput) {
- touchedInput.value = 'false';
- }
- }
-}
diff --git a/frontend/src/stimulus/controllers/poll-for-changes.controller.ts b/frontend/src/stimulus/controllers/poll-for-changes.controller.ts
index b7b9407b5823..811dc91926fd 100644
--- a/frontend/src/stimulus/controllers/poll-for-changes.controller.ts
+++ b/frontend/src/stimulus/controllers/poll-for-changes.controller.ts
@@ -36,11 +36,17 @@ export default class PollForChangesController extends ApplicationController {
url: String,
interval: Number,
reference: String,
+ autoscrollEnabled: Boolean,
};
+ static targets = ['reloadButton'];
+
+ declare reloadButtonTarget:HTMLLinkElement;
+
declare referenceValue:string;
declare urlValue:string;
declare intervalValue:number;
+ declare autoscrollEnabledValue:boolean;
private interval:number;
@@ -52,6 +58,10 @@ export default class PollForChangesController extends ApplicationController {
void this.triggerTurboStream();
}, this.intervalValue || 10_000);
}
+
+ if (this.autoscrollEnabledValue) {
+ window.addEventListener('DOMContentLoaded', this.autoscrollToLastKnownPosition.bind(this));
+ }
}
disconnect() {
@@ -59,6 +69,10 @@ export default class PollForChangesController extends ApplicationController {
clearInterval(this.interval);
}
+ reloadButtonTargetConnected() {
+ this.reloadButtonTarget.addEventListener('click', this.rememberCurrentScrollPosition.bind(this));
+ }
+
triggerTurboStream() {
void fetch(`${this.urlValue}?reference=${this.referenceValue}`, {
headers: {
@@ -73,4 +87,29 @@ export default class PollForChangesController extends ApplicationController {
}
});
}
+
+ rememberCurrentScrollPosition() {
+ const currentPosition = document.getElementById('content-body')?.scrollTop;
+
+ if (currentPosition !== undefined) {
+ sessionStorage.setItem(this.scrollPositionKey(), currentPosition.toString());
+ }
+ }
+
+ autoscrollToLastKnownPosition() {
+ const lastKnownPos = sessionStorage.getItem(this.scrollPositionKey());
+ if (lastKnownPos) {
+ const content = document.getElementById('content-body');
+
+ if (content) {
+ content.scrollTop = parseInt(lastKnownPos, 10);
+ }
+ }
+
+ sessionStorage.removeItem(this.scrollPositionKey());
+ }
+
+ private scrollPositionKey():string {
+ return `${this.urlValue}/scrollPosition`;
+ }
}
diff --git a/frontend/src/turbo/constants.ts b/frontend/src/turbo/constants.ts
new file mode 100644
index 000000000000..ee6cb991a0d8
--- /dev/null
+++ b/frontend/src/turbo/constants.ts
@@ -0,0 +1,22 @@
+export const TURBO_EVENTS:string[] = [
+ 'turbo:before-cache',
+ 'turbo:before-fetch-request',
+ 'turbo:before-fetch-response',
+ 'turbo:before-frame-morph',
+ 'turbo:before-frame-render',
+ 'turbo:before-prefetch',
+ 'turbo:before-render',
+ 'turbo:before-stream-render',
+ 'turbo:before-visit',
+ 'turbo:click',
+ 'turbo:fetch-request-error',
+ 'turbo:frame-load',
+ 'turbo:frame-render',
+ 'turbo:load',
+ 'turbo:morph',
+ 'turbo:reload',
+ 'turbo:render',
+ 'turbo:submit-end',
+ 'turbo:submit-start',
+ 'turbo:visit'
+];
diff --git a/frontend/src/turbo/dialog-stream-action.ts b/frontend/src/turbo/dialog-stream-action.ts
index d28b257050f8..a28ef698bb23 100644
--- a/frontend/src/turbo/dialog-stream-action.ts
+++ b/frontend/src/turbo/dialog-stream-action.ts
@@ -4,8 +4,6 @@ export function registerDialogStreamAction() {
StreamActions.dialog = function dialogStreamAction(this:StreamElement) {
const content = this.templateElement.content;
const dialog = content.querySelector('dialog') as HTMLDialogElement;
- // Set a temporary width so the dialog reflows after opening
- dialog.style.width = '0px';
document.body.append(content);
@@ -21,8 +19,11 @@ export function registerDialogStreamAction() {
}
});
+ // Hack to fix the width calculation of nested elements
+ // such as the CKEditor toolbar.
setTimeout(() => {
- dialog.style.removeProperty('width');
- }, 10);
+ const width = dialog.offsetWidth;
+ dialog.style.width = `${width + 1}px`;
+ }, 50);
};
}
diff --git a/frontend/src/turbo/flash-stream-action.ts b/frontend/src/turbo/flash-stream-action.ts
index 47e08a4c8fc7..cd2a2dcbda7a 100644
--- a/frontend/src/turbo/flash-stream-action.ts
+++ b/frontend/src/turbo/flash-stream-action.ts
@@ -3,6 +3,17 @@ import { StreamActions, StreamElement } from '@hotwired/turbo';
export function registerFlashStreamAction() {
StreamActions.flash = function dialogStreamAction(this:StreamElement) {
const content = this.templateElement.content;
- document.body.append(content);
+ const flash = content.firstElementChild as HTMLElement;
+ const target = document.getElementById('primerized-flash-messages') as HTMLElement;
+
+ if (flash.dataset.uniqueKey) {
+ const existingFlash = target.querySelector(`[data-unique-key="${flash.dataset.uniqueKey}"]`);
+ if (existingFlash) {
+ existingFlash.replaceWith(flash);
+ return;
+ }
+ }
+
+ target.append(flash);
};
}
diff --git a/frontend/src/turbo/helpers.ts b/frontend/src/turbo/helpers.ts
new file mode 100644
index 000000000000..5922eb37f443
--- /dev/null
+++ b/frontend/src/turbo/helpers.ts
@@ -0,0 +1,11 @@
+import * as Turbo from '@hotwired/turbo';
+
+export namespace TurboHelpers {
+ export function showProgressBar() {
+ Turbo.session.adapter.formSubmissionStarted();
+ }
+
+ export function hideProgressBar() {
+ Turbo.session.adapter.formSubmissionFinished();
+ }
+}
diff --git a/frontend/src/turbo/setup.ts b/frontend/src/turbo/setup.ts
index 4c4f9f54bce1..f9db91d4dcf3 100644
--- a/frontend/src/turbo/setup.ts
+++ b/frontend/src/turbo/setup.ts
@@ -5,12 +5,23 @@ import { registerDialogStreamAction } from './dialog-stream-action';
import { addTurboEventListeners } from './turbo-event-listeners';
import { registerFlashStreamAction } from './flash-stream-action';
import { applyTurboNavigationPatch } from './turbo-navigation-patch';
+import { debugLog, whenDebugging } from 'core-app/shared/helpers/debug_output';
+import { TURBO_EVENTS } from './constants';
// Disable default turbo-drive for now as we don't need it for now AND it breaks angular routing
Turbo.session.drive = false;
// Start turbo
Turbo.start();
+// Register logging of events
+whenDebugging(() => {
+ TURBO_EVENTS.forEach((name:string) => {
+ document.addEventListener(name, (event) => {
+ debugLog(`[TURBO EVENT ${name}] %O`, event);
+ });
+ });
+});
+
// Register our own actions
addTurboEventListeners();
registerDialogStreamAction();
diff --git a/frontend/src/typings/shims.d.ts b/frontend/src/typings/shims.d.ts
index c3552ccee51c..d00919774d9e 100644
--- a/frontend/src/typings/shims.d.ts
+++ b/frontend/src/typings/shims.d.ts
@@ -29,8 +29,14 @@ declare module 'dom-autoscroller';
declare module 'core-vendor/enjoyhint';
declare module '@hotwired/turbo' {
+ interface BrowserAdapter {
+ formSubmissionStarted:() => void;
+ formSubmissionFinished:() => void;
+ }
+
export const session:{
drive:boolean;
+ adapter:BrowserAdapter;
};
export const navigator:{
diff --git a/frontend/src/vendor/ckeditor/ckeditor.js b/frontend/src/vendor/ckeditor/ckeditor.js
index 1b228722d334..b1e50ade1161 100644
--- a/frontend/src/vendor/ckeditor/ckeditor.js
+++ b/frontend/src/vendor/ckeditor/ckeditor.js
@@ -3,5 +3,5 @@
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md.
*/
-function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.OPEditor=t():e.OPEditor=t()}(self,(()=>(()=>{var e,t,o={5659:(e,t,o)=>{const n=o(8156),i={};for(const e of Object.keys(n))i[n[e]]=e;const r={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=r;for(const e of Object.keys(r)){if(!("channels"in r[e]))throw new Error("missing channels property: "+e);if(!("labels"in r[e]))throw new Error("missing channel labels property: "+e);if(r[e].labels.length!==r[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:o}=r[e];delete r[e].channels,delete r[e].labels,Object.defineProperty(r[e],"channels",{value:t}),Object.defineProperty(r[e],"labels",{value:o})}r.rgb.hsl=function(e){const t=e[0]/255,o=e[1]/255,n=e[2]/255,i=Math.min(t,o,n),r=Math.max(t,o,n),s=r-i;let a,l;r===i?a=0:t===r?a=(o-n)/s:o===r?a=2+(n-t)/s:n===r&&(a=4+(t-o)/s),a=Math.min(60*a,360),a<0&&(a+=360);const c=(i+r)/2;return l=r===i?0:c<=.5?s/(r+i):s/(2-r-i),[a,100*l,100*c]},r.rgb.hsv=function(e){let t,o,n,i,r;const s=e[0]/255,a=e[1]/255,l=e[2]/255,c=Math.max(s,a,l),d=c-Math.min(s,a,l),u=function(e){return(c-e)/6/d+.5};return 0===d?(i=0,r=0):(r=d/c,t=u(s),o=u(a),n=u(l),s===c?i=n-o:a===c?i=1/3+t-n:l===c&&(i=2/3+o-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*r,100*c]},r.rgb.hwb=function(e){const t=e[0],o=e[1];let n=e[2];const i=r.rgb.hsl(e)[0],s=1/255*Math.min(t,Math.min(o,n));return n=1-1/255*Math.max(t,Math.max(o,n)),[i,100*s,100*n]},r.rgb.cmyk=function(e){const t=e[0]/255,o=e[1]/255,n=e[2]/255,i=Math.min(1-t,1-o,1-n);return[100*((1-t-i)/(1-i)||0),100*((1-o-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*i]},r.rgb.keyword=function(e){const t=i[e];if(t)return t;let o,r=1/0;for(const t of Object.keys(n)){const i=n[t],l=(a=i,((s=e)[0]-a[0])**2+(s[1]-a[1])**2+(s[2]-a[2])**2);l.04045?((t+.055)/1.055)**2.4:t/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*t+.3576*o+.1805*n),100*(.2126*t+.7152*o+.0722*n),100*(.0193*t+.1192*o+.9505*n)]},r.rgb.lab=function(e){const t=r.rgb.xyz(e);let o=t[0],n=t[1],i=t[2];o/=95.047,n/=100,i/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*n-16,500*(o-n),200*(n-i)]},r.hsl.rgb=function(e){const t=e[0]/360,o=e[1]/100,n=e[2]/100;let i,r,s;if(0===o)return s=255*n,[s,s,s];i=n<.5?n*(1+o):n+o-n*o;const a=2*n-i,l=[0,0,0];for(let e=0;e<3;e++)r=t+1/3*-(e-1),r<0&&r++,r>1&&r--,s=6*r<1?a+6*(i-a)*r:2*r<1?i:3*r<2?a+(i-a)*(2/3-r)*6:a,l[e]=255*s;return l},r.hsl.hsv=function(e){const t=e[0];let o=e[1]/100,n=e[2]/100,i=o;const r=Math.max(n,.01);n*=2,o*=n<=1?n:2-n,i*=r<=1?r:2-r;return[t,100*(0===n?2*i/(r+i):2*o/(n+o)),100*((n+o)/2)]},r.hsv.rgb=function(e){const t=e[0]/60,o=e[1]/100;let n=e[2]/100;const i=Math.floor(t)%6,r=t-Math.floor(t),s=255*n*(1-o),a=255*n*(1-o*r),l=255*n*(1-o*(1-r));switch(n*=255,i){case 0:return[n,l,s];case 1:return[a,n,s];case 2:return[s,n,l];case 3:return[s,a,n];case 4:return[l,s,n];case 5:return[n,s,a]}},r.hsv.hsl=function(e){const t=e[0],o=e[1]/100,n=e[2]/100,i=Math.max(n,.01);let r,s;s=(2-o)*n;const a=(2-o)*i;return r=o*i,r/=a<=1?a:2-a,r=r||0,s/=2,[t,100*r,100*s]},r.hwb.rgb=function(e){const t=e[0]/360;let o=e[1]/100,n=e[2]/100;const i=o+n;let r;i>1&&(o/=i,n/=i);const s=Math.floor(6*t),a=1-n;r=6*t-s,0!=(1&s)&&(r=1-r);const l=o+r*(a-o);let c,d,u;switch(s){default:case 6:case 0:c=a,d=l,u=o;break;case 1:c=l,d=a,u=o;break;case 2:c=o,d=a,u=l;break;case 3:c=o,d=l,u=a;break;case 4:c=l,d=o,u=a;break;case 5:c=a,d=o,u=l}return[255*c,255*d,255*u]},r.cmyk.rgb=function(e){const t=e[0]/100,o=e[1]/100,n=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,o*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]},r.xyz.rgb=function(e){const t=e[0]/100,o=e[1]/100,n=e[2]/100;let i,r,s;return i=3.2406*t+-1.5372*o+-.4986*n,r=-.9689*t+1.8758*o+.0415*n,s=.0557*t+-.204*o+1.057*n,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,i=Math.min(Math.max(0,i),1),r=Math.min(Math.max(0,r),1),s=Math.min(Math.max(0,s),1),[255*i,255*r,255*s]},r.xyz.lab=function(e){let t=e[0],o=e[1],n=e[2];t/=95.047,o/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*o-16,500*(t-o),200*(o-n)]},r.lab.xyz=function(e){let t,o,n;o=(e[0]+16)/116,t=e[1]/500+o,n=o-e[2]/200;const i=o**3,r=t**3,s=n**3;return o=i>.008856?i:(o-16/116)/7.787,t=r>.008856?r:(t-16/116)/7.787,n=s>.008856?s:(n-16/116)/7.787,t*=95.047,o*=100,n*=108.883,[t,o,n]},r.lab.lch=function(e){const t=e[0],o=e[1],n=e[2];let i;i=360*Math.atan2(n,o)/2/Math.PI,i<0&&(i+=360);return[t,Math.sqrt(o*o+n*n),i]},r.lch.lab=function(e){const t=e[0],o=e[1],n=e[2]/360*2*Math.PI;return[t,o*Math.cos(n),o*Math.sin(n)]},r.rgb.ansi16=function(e,t=null){const[o,n,i]=e;let s=null===t?r.rgb.hsv(e)[2]:t;if(s=Math.round(s/50),0===s)return 30;let a=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(o/255));return 2===s&&(a+=60),a},r.hsv.ansi16=function(e){return r.rgb.ansi16(r.hsv.rgb(e),e[2])},r.rgb.ansi256=function(e){const t=e[0],o=e[1],n=e[2];if(t===o&&o===n)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(o/255*5)+Math.round(n/255*5)},r.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const o=.5*(1+~~(e>50));return[(1&t)*o*255,(t>>1&1)*o*255,(t>>2&1)*o*255]},r.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},r.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},r.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let o=t[0];3===t[0].length&&(o=o.split("").map((e=>e+e)).join(""));const n=parseInt(o,16);return[n>>16&255,n>>8&255,255&n]},r.rgb.hcg=function(e){const t=e[0]/255,o=e[1]/255,n=e[2]/255,i=Math.max(Math.max(t,o),n),r=Math.min(Math.min(t,o),n),s=i-r;let a,l;return a=s<1?r/(1-s):0,l=s<=0?0:i===t?(o-n)/s%6:i===o?2+(n-t)/s:4+(t-o)/s,l/=6,l%=1,[360*l,100*s,100*a]},r.hsl.hcg=function(e){const t=e[1]/100,o=e[2]/100,n=o<.5?2*t*o:2*t*(1-o);let i=0;return n<1&&(i=(o-.5*n)/(1-n)),[e[0],100*n,100*i]},r.hsv.hcg=function(e){const t=e[1]/100,o=e[2]/100,n=t*o;let i=0;return n<1&&(i=(o-n)/(1-n)),[e[0],100*n,100*i]},r.hcg.rgb=function(e){const t=e[0]/360,o=e[1]/100,n=e[2]/100;if(0===o)return[255*n,255*n,255*n];const i=[0,0,0],r=t%1*6,s=r%1,a=1-s;let l=0;switch(Math.floor(r)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return l=(1-o)*n,[255*(o*i[0]+l),255*(o*i[1]+l),255*(o*i[2]+l)]},r.hcg.hsv=function(e){const t=e[1]/100,o=t+e[2]/100*(1-t);let n=0;return o>0&&(n=t/o),[e[0],100*n,100*o]},r.hcg.hsl=function(e){const t=e[1]/100,o=e[2]/100*(1-t)+.5*t;let n=0;return o>0&&o<.5?n=t/(2*o):o>=.5&&o<1&&(n=t/(2*(1-o))),[e[0],100*n,100*o]},r.hcg.hwb=function(e){const t=e[1]/100,o=t+e[2]/100*(1-t);return[e[0],100*(o-t),100*(1-o)]},r.hwb.hcg=function(e){const t=e[1]/100,o=1-e[2]/100,n=o-t;let i=0;return n<1&&(i=(o-n)/(1-n)),[e[0],100*n,100*i]},r.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},r.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},r.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},r.gray.hsl=function(e){return[0,0,e[0]]},r.gray.hsv=r.gray.hsl,r.gray.hwb=function(e){return[0,100,e[0]]},r.gray.cmyk=function(e){return[0,0,0,e[0]]},r.gray.lab=function(e){return[e[0],0,0]},r.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),o=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(o.length)+o},r.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},734:(e,t,o)=>{const n=o(5659),i=o(8507),r={};Object.keys(n).forEach((e=>{r[e]={},Object.defineProperty(r[e],"channels",{value:n[e].channels}),Object.defineProperty(r[e],"labels",{value:n[e].labels});const t=i(e);Object.keys(t).forEach((o=>{const n=t[o];r[e][o]=function(e){const t=function(...t){const o=t[0];if(null==o)return o;o.length>1&&(t=o);const n=e(t);if("object"==typeof n)for(let e=n.length,t=0;t1&&(t=o),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)}))})),e.exports=r},8507:(e,t,o)=>{const n=o(5659);function i(e){const t=function(){const e={},t=Object.keys(n);for(let o=t.length,n=0;n{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},9248:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck-content code{background-color:hsla(0,0%,78%,.3);border-radius:2px;padding:.15em}.ck.ck-editor__editable .ck-code_selected{background-color:hsla(0,0%,78%,.5)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-basic-styles/theme/code.css"],names:[],mappings:"AAKA,iBACC,kCAAuC,CAEvC,iBAAkB,CADlB,aAED,CAEA,0CACC,kCACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content code {\n\tbackground-color: hsla(0, 0%, 78%, 0.3);\n\tpadding: .15em;\n\tborder-radius: 2px;\n}\n\n.ck.ck-editor__editable .ck-code_selected {\n\tbackground-color: hsla(0, 0%, 78%, 0.5);\n}\n"],sourceRoot:""}]);const a=s},1501:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck-content blockquote{border-left:5px solid #ccc;font-style:italic;margin-left:0;margin-right:0;overflow:hidden;padding-left:1.5em;padding-right:1.5em}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-block-quote/theme/blockquote.css"],names:[],mappings:"AAKA,uBAWC,0BAAsC,CADtC,iBAAkB,CAFlB,aAAc,CACd,cAAe,CAPf,eAAgB,CAIhB,kBAAmB,CADnB,mBAOD,CAEA,gCACC,aAAc,CACd,2BACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content blockquote {\n\t/* See #12 */\n\toverflow: hidden;\n\n\t/* https://github.com/ckeditor/ckeditor5-block-quote/issues/15 */\n\tpadding-right: 1.5em;\n\tpadding-left: 1.5em;\n\n\tmargin-left: 0;\n\tmargin-right: 0;\n\tfont-style: italic;\n\tborder-left: solid 5px hsl(0, 0%, 80%);\n}\n\n.ck-content[dir="rtl"] blockquote {\n\tborder-left: 0;\n\tborder-right: solid 5px hsl(0, 0%, 80%);\n}\n'],sourceRoot:""}]);const a=s},9262:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,'.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;pointer-events:none;position:relative}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle,.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}.ck.ck-clipboard-drop-target-line{pointer-events:none;position:absolute}:root{--ck-clipboard-drop-target-dot-width:12px;--ck-clipboard-drop-target-dot-height:8px;--ck-clipboard-drop-target-color:var(--ck-color-focus-border)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);margin-left:-1px;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{border-color:var(--ck-clipboard-drop-target-color) transparent transparent transparent;border-style:solid;border-width:calc(var(--ck-clipboard-drop-target-dot-height)) calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0 calc(var(--ck-clipboard-drop-target-dot-width)*.5);content:"";display:block;height:0;left:50%;position:absolute;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);transform:translateX(-50%);width:0}.ck.ck-editor__editable .ck-widget.ck-clipboard-drop-target-range{outline:var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color)!important}.ck.ck-editor__editable .ck-widget:-webkit-drag{zoom:.6;outline:none!important}.ck.ck-clipboard-drop-target-line{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);height:0;margin-top:-1px}.ck.ck-clipboard-drop-target-line:before{border-style:solid;content:"";height:0;position:absolute;top:calc(var(--ck-clipboard-drop-target-dot-width)*-.5);width:0}[dir=ltr] .ck.ck-clipboard-drop-target-line:before{border-color:transparent transparent transparent var(--ck-clipboard-drop-target-color);border-width:calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0 calc(var(--ck-clipboard-drop-target-dot-width)*.5) var(--ck-clipboard-drop-target-dot-height);left:-1px}[dir=rtl] .ck.ck-clipboard-drop-target-line:before{border-color:transparent var(--ck-clipboard-drop-target-color) transparent transparent;border-width:calc(var(--ck-clipboard-drop-target-dot-width)*.5) var(--ck-clipboard-drop-target-dot-height) calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0;right:-1px}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-clipboard/theme/clipboard.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-clipboard/clipboard.css"],names:[],mappings:"AASC,8DACC,cAAe,CAEf,mBAAoB,CADpB,iBAOD,CAJC,mEACC,iBAAkB,CAClB,OACD,CAWA,qJACC,YACD,CAIF,kCAEC,mBAAoB,CADpB,iBAED,CC9BA,MACC,yCAA0C,CAC1C,yCAA0C,CAC1C,6DACD,CAOE,mEAIC,gDAAiD,CADjD,sDAAuD,CAFvD,2DAA8D,CAI9D,gBAAiB,CAHjB,wDAqBD,CAfC,yEAWC,sFAAuF,CAEvF,kBAAmB,CADnB,qKAA0K,CAX1K,UAAW,CAIX,aAAc,CAFd,QAAS,CAIT,QAAS,CADT,iBAAkB,CAElB,wDAA2D,CAE3D,0BAA2B,CAR3B,OAYD,CAOF,kEACC,gGACD,CAKA,gDACC,OAAS,CACT,sBACD,CAGD,kCAGC,gDAAiD,CADjD,sDAAuD,CADvD,QAAS,CAGT,eAwBD,CAtBC,yCAMC,kBAAmB,CALnB,UAAW,CAIX,QAAS,CAHT,iBAAkB,CAClB,uDAA0D,CAC1D,OAiBD,CArBA,mDAYE,sFAAuF,CADvF,+JAAoK,CAFpK,SAYF,CArBA,mDAmBE,sFAAuF,CADvF,+JAAmK,CAFnK,UAKF",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t/*\n\t * Vertical drop target (in text).\n\t */\n\t& .ck.ck-clipboard-drop-target-position {\n\t\tdisplay: inline;\n\t\tposition: relative;\n\t\tpointer-events: none;\n\n\t\t& span {\n\t\t\tposition: absolute;\n\t\t\twidth: 0;\n\t\t}\n\t}\n\n\t/*\n\t * Styles of the widget being dragged (its preview).\n\t */\n\t& .ck-widget:-webkit-drag {\n\t\t& > .ck-widget__selection-handle {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t& > .ck-widget__type-around {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n.ck.ck-clipboard-drop-target-line {\n\tposition: absolute;\n\tpointer-events: none;\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import \"@ckeditor/ckeditor5-ui/theme/mixins/_dir.css\";\n\n:root {\n\t--ck-clipboard-drop-target-dot-width: 12px;\n\t--ck-clipboard-drop-target-dot-height: 8px;\n\t--ck-clipboard-drop-target-color: var(--ck-color-focus-border);\n}\n\n.ck.ck-editor__editable {\n\t/*\n\t * Vertical drop target (in text).\n\t */\n\t& .ck.ck-clipboard-drop-target-position {\n\t\t& span {\n\t\t\tbottom: calc(-.5 * var(--ck-clipboard-drop-target-dot-height));\n\t\t\ttop: calc(-.5 * var(--ck-clipboard-drop-target-dot-height));\n\t\t\tborder: 1px solid var(--ck-clipboard-drop-target-color);\n\t\t\tbackground: var(--ck-clipboard-drop-target-color);\n\t\t\tmargin-left: -1px;\n\n\t\t\t/* The triangle above the marker */\n\t\t\t&::after {\n\t\t\t\tcontent: '';\n\t\t\t\twidth: 0;\n\t\t\t\theight: 0;\n\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: 50%;\n\t\t\t\ttop: calc(-.5 * var(--ck-clipboard-drop-target-dot-height));\n\n\t\t\t\ttransform: translateX(-50%);\n\t\t\t\tborder-color: var(--ck-clipboard-drop-target-color) transparent transparent transparent;\n\t\t\t\tborder-width: calc(var(--ck-clipboard-drop-target-dot-height)) calc(.5 * var(--ck-clipboard-drop-target-dot-width)) 0 calc(.5 * var(--ck-clipboard-drop-target-dot-width));\n\t\t\t\tborder-style: solid;\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * Styles of the widget that it a drop target.\n\t */\n\t& .ck-widget.ck-clipboard-drop-target-range {\n\t\toutline: var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color) !important;\n\t}\n\n\t/*\n\t * Styles of the widget being dragged (its preview).\n\t */\n\t& .ck-widget:-webkit-drag {\n\t\tzoom: 0.6;\n\t\toutline: none !important;\n\t}\n}\n\n.ck.ck-clipboard-drop-target-line {\n\theight: 0;\n\tborder: 1px solid var(--ck-clipboard-drop-target-color);\n\tbackground: var(--ck-clipboard-drop-target-color);\n\tmargin-top: -1px;\n\n\t&::before {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\ttop: calc(-.5 * var(--ck-clipboard-drop-target-dot-width));\n\t\twidth: 0;\n\t\theight: 0;\n\t\tborder-style: solid;\n\n\t\t@mixin ck-dir ltr {\n\t\t\tleft: -1px;\n\n\t\t\tborder-width: calc(.5 * var(--ck-clipboard-drop-target-dot-width)) 0 calc(.5 * var(--ck-clipboard-drop-target-dot-width)) var(--ck-clipboard-drop-target-dot-height);\n\t\t\tborder-color: transparent transparent transparent var(--ck-clipboard-drop-target-color);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tright: -1px;\n\n\t\t\tborder-width:calc(.5 * var(--ck-clipboard-drop-target-dot-width)) var(--ck-clipboard-drop-target-dot-height) calc(.5 * var(--ck-clipboard-drop-target-dot-width)) 0;\n\t\t\tborder-color: transparent var(--ck-clipboard-drop-target-color) transparent transparent;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},1111:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck .ck-placeholder,.ck.ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{content:attr(data-placeholder);left:0;pointer-events:none;position:absolute;right:0}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}@media (forced-colors:active){.ck .ck-placeholder,.ck.ck-placeholder{forced-color-adjust:preserve-parent-color}}.ck .ck-placeholder:before,.ck.ck-placeholder:before{cursor:text}@media (forced-colors:none){.ck .ck-placeholder:before,.ck.ck-placeholder:before{color:var(--ck-color-engine-placeholder-text)}}@media (forced-colors:active){.ck .ck-placeholder:before,.ck.ck-placeholder:before{font-style:italic;margin-left:1px}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-engine/theme/placeholder.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-engine/placeholder.css"],names:[],mappings:"AAMA,uCAEC,iBAWD,CATC,qDAIC,8BAA+B,CAF/B,MAAO,CAKP,mBAAoB,CANpB,iBAAkB,CAElB,OAKD,CAKA,wCACC,YACD,CAQD,iCACC,iBACD,CC7BC,8BACC,uCCOA,yCDLA,CACD,CCOA,qDACC,WAmBD,CDvBA,4BACC,qDCMC,6CDJD,CACD,CAZA,8BACC,qDCsBC,iBAAkB,CAMlB,eD1BD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* See ckeditor/ckeditor5#936. */\n.ck.ck-placeholder,\n.ck .ck-placeholder {\n\tposition: relative;\n\n\t&::before {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tcontent: attr(data-placeholder);\n\n\t\t/* See ckeditor/ckeditor5#469. */\n\t\tpointer-events: none;\n\t}\n}\n\n/* See ckeditor/ckeditor5#1987. */\n.ck.ck-read-only .ck-placeholder {\n\t&::before {\n\t\tdisplay: none;\n\t}\n}\n\n/*\n * Rules for the `ck-placeholder` are loaded before the rules for `ck-reset_all` in the base CKEditor 5 DLL build.\n * This fix overwrites the incorrectly set `position: static` from `ck-reset_all`.\n * See https://github.com/ckeditor/ckeditor5/issues/11418.\n */\n.ck.ck-reset_all .ck-placeholder {\n\tposition: relative;\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-forced-colors {\n\t@media (forced-colors: active) {\n\t\t& {\n\t\t\t@mixin-content;\n\t\t}\n\t}\n}\n\n@define-mixin ck-media-default-colors {\n\t@media (forced-colors: none) {\n\t\t& {\n\t\t\t@mixin-content;\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css";\n\n/* See ckeditor/ckeditor5#936. */\n.ck.ck-placeholder, .ck .ck-placeholder {\n\t@mixin ck-media-forced-colors {\n\t\t/*\n\t\t * This is needed for Edge on Windows to use the right color for the placeholder content (::before).\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/14907.\n\t\t */\n\t\tforced-color-adjust: preserve-parent-color;\n\t}\n\n\t&::before {\n\t\tcursor: text;\n\n\t\t@mixin ck-media-default-colors {\n\t\t\tcolor: var(--ck-color-engine-placeholder-text);\n\t\t}\n\n\t\t@mixin ck-media-forced-colors {\n\t\t\t/*\n\t\t\t * In the high contrast mode there is no telling between regular and placeholder text. Using\n\t\t\t * italic text to address that issue. See https://github.com/ckeditor/ckeditor5/issues/14907.\n\t\t\t */\n\t\t\tfont-style: italic;\n\n\t\t\t/*\n\t\t\t * Without this margin, the caret will not show up and blink when the user puts the selection\n\t\t\t * in the placeholder (Edge on Windows). See https://github.com/ckeditor/ckeditor5/issues/14907.\n\t\t\t */\n\t\t\tmargin-left: 1px;\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},6531:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-engine/theme/renderer.css"],names:[],mappings:"AAMA,qDACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Elements marked by the Renderer as hidden should be invisible in the editor. */\n.ck.ck-editor__editable span[data-ck-unsafe-element] {\n\tdisplay: none;\n}\n"],sourceRoot:""}]);const a=s},6186:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-heading_heading1 .ck-button__label{font-size:20px}.ck.ck-heading_heading2 .ck-button__label{font-size:17px}.ck.ck-heading_heading3 .ck-button__label{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-heading/theme/heading.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-heading/heading.css"],names:[],mappings:"AAKA,0CACC,cACD,CAEA,0CACC,cACD,CAEA,0CACC,cACD,CAEA,+BACC,eACD,CCZC,2EACC,SACD,CAEA,uEACC,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-heading_heading1 .ck-button__label {\n\tfont-size: 20px;\n}\n\n.ck.ck-heading_heading2 .ck-button__label {\n\tfont-size: 17px;\n}\n\n.ck.ck-heading_heading3 .ck-button__label {\n\tfont-size: 14px;\n}\n\n.ck[class*="ck-heading_heading"] {\n\tfont-weight: bold;\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Resize dropdown's button label. */\n.ck.ck-dropdown.ck-heading-dropdown {\n\t& .ck-dropdown__button .ck-button__label {\n\t\twidth: 8em;\n\t}\n\n\t& .ck-dropdown__panel .ck-list__item {\n\t\tmin-width: 18em;\n\t}\n}\n"],sourceRoot:""}]);const a=s},8574:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck-content .image{clear:both;display:table;margin:.9em auto;min-width:50px;text-align:center}.ck-content .image img{display:block;height:auto;margin:0 auto;max-width:100%;min-width:100%}.ck-content .image-inline{align-items:flex-start;display:inline-flex;max-width:100%}.ck-content .image-inline picture{display:flex}.ck-content .image-inline img,.ck-content .image-inline picture{flex-grow:1;flex-shrink:1;max-width:100%}.ck.ck-editor__editable .image>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}.ck.ck-editor__editable .image{z-index:1}.ck.ck-editor__editable .image.ck-widget_selected{z-index:2}.ck.ck-editor__editable .image-inline{z-index:1}.ck.ck-editor__editable .image-inline.ck-widget_selected{z-index:2}.ck.ck-editor__editable .image-inline.ck-widget_selected ::selection{display:none}.ck.ck-editor__editable .image-inline img{height:auto}.ck.ck-editor__editable td .image-inline img,.ck.ck-editor__editable th .image-inline img{max-width:none}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/image.css"],names:[],mappings:"AAMC,mBAEC,UAAW,CADX,aAAc,CAOd,gBAAkB,CAGlB,cAAe,CARf,iBA2BD,CAjBC,uBAEC,aAAc,CAad,WAAY,CAVZ,aAAc,CAGd,cAAe,CAGf,cAKD,CAGD,0BAYC,sBAAuB,CANvB,mBAAoB,CAGpB,cAoBD,CAdC,kCACC,YACD,CAGA,gEAGC,WAAY,CACZ,aAAc,CAGd,cACD,CAUD,gEASC,eAAgB,CARhB,oBAAqB,CACrB,qBAAsB,CAQtB,sBAAuB,CAFvB,kBAGD,CAKA,+BACC,SASD,CAHC,kDACC,SACD,CAMD,sCACC,SAkBD,CAZC,yDACC,SAUD,CAHC,qEACC,YACD,CAMF,0CACC,WACD,CAMC,0FACC,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content {\n\t& .image {\n\t\tdisplay: table;\n\t\tclear: both;\n\t\ttext-align: center;\n\n\t\t/* Make sure there is some space between the content and the image. Center image by default. */\n\t\t/* The first value should be equal to --ck-spacing-large variable if used in the editor context\n\t \tto avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n\t\tmargin: 0.9em auto;\n\n\t\t/* Make sure the caption will be displayed properly (See: https://github.com/ckeditor/ckeditor5/issues/1870). */\n\t\tmin-width: 50px;\n\n\t\t& img {\n\t\t\t/* Prevent unnecessary margins caused by line-height (see #44). */\n\t\t\tdisplay: block;\n\n\t\t\t/* Center the image if its width is smaller than the content\'s width. */\n\t\t\tmargin: 0 auto;\n\n\t\t\t/* Make sure the image never exceeds the size of the parent container (ckeditor/ckeditor5-ui#67). */\n\t\t\tmax-width: 100%;\n\n\t\t\t/* Make sure the image is never smaller than the parent container (See: https://github.com/ckeditor/ckeditor5/issues/9300). */\n\t\t\tmin-width: 100%;\n\n\t\t\t/* Keep proportions of the block image if the height is set and the image is wider than the editor width.\n\t\t\tSee https://github.com/ckeditor/ckeditor5/issues/14542. */\n\t\t\theight: auto;\n\t\t}\n\t}\n\n\t& .image-inline {\n\t\t/*\n\t\t * Normally, the .image-inline would have "display: inline-block" and "img { width: 100% }" (to follow the wrapper while resizing).\n\t\t * Unfortunately, together with "srcset", it gets automatically stretched up to the width of the editing root.\n\t\t * This strange behavior does not happen with inline-flex.\n\t\t */\n\t\tdisplay: inline-flex;\n\n\t\t/* While being resized, don\'t allow the image to exceed the width of the editing root. */\n\t\tmax-width: 100%;\n\n\t\t/* This is required by Safari to resize images in a sensible way. Without this, the browser breaks the ratio. */\n\t\talign-items: flex-start;\n\n\t\t/* When the picture is present it must act as a flex container to let the img resize properly */\n\t\t& picture {\n\t\t\tdisplay: flex;\n\t\t}\n\n\t\t/* When the picture is present, it must act like a resizable img. */\n\t\t& picture,\n\t\t& img {\n\t\t\t/* This is necessary for the img to span the entire .image-inline wrapper and to resize properly. */\n\t\t\tflex-grow: 1;\n\t\t\tflex-shrink: 1;\n\n\t\t\t/* Prevents overflowing the editing root boundaries when an inline image is very wide. */\n\t\t\tmax-width: 100%;\n\t\t}\n\t}\n}\n\n.ck.ck-editor__editable {\n\t/*\n\t * Inhertit the content styles padding of the in case the integration overrides `text-align: center`\n\t * of `.image` (e.g. to the left/right). This ensures the placeholder stays at the padding just like the native\n\t * caret does, and not at the edge of .\n\t */\n\t& .image > figcaption.ck-placeholder::before {\n\t\tpadding-left: inherit;\n\t\tpadding-right: inherit;\n\n\t\t/*\n\t\t * Make sure the image caption placeholder doesn\'t overflow the placeholder area.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9162.\n\t\t */\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n\n\t/*\n\t * See https://github.com/ckeditor/ckeditor5/issues/15115.\n\t */\n\t& .image {\n\t\tz-index: 1;\n\n\t\t/*\n\t\t * Make sure the selected image always stays on top of its siblings.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9108.\n\t\t */\n\t\t&.ck-widget_selected {\n\t\t\tz-index: 2;\n\t\t}\n\t}\n\n\t/*\n\t * See https://github.com/ckeditor/ckeditor5/issues/15115.\n\t */\n\t& .image-inline {\n\t\tz-index: 1;\n\n\t\t/*\n\t\t * Make sure the selected inline image always stays on top of its siblings.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9108.\n\t\t */\n\t\t&.ck-widget_selected {\n\t\t\tz-index: 2;\n\n\t\t\t/*\n\t\t\t * Make sure the native browser selection style is not displayed.\n\t\t\t * Inline image widgets have their own styles for the selected state and\n\t\t\t * leaving this up to the browser is asking for a visual collision.\n\t\t\t */\n\t\t\t& ::selection {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Keep proportions of the inline image if the height is set and the image is wider than the editor width.\n\tSee https://github.com/ckeditor/ckeditor5/issues/14542. */\n\t& .image-inline img {\n\t\theight: auto;\n\t}\n\n\t/* The inline image nested in the table should have its original size if not resized.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9117. */\n\t& td,\n\t& th {\n\t\t& .image-inline img {\n\t\t\tmax-width: none;\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},3038:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,":root{--ck-color-image-caption-background:#f7f7f7;--ck-color-image-caption-text:#333;--ck-color-image-caption-highlighted-background:#fd0}.ck-content .image>figcaption{background-color:var(--ck-color-image-caption-background);caption-side:bottom;color:var(--ck-color-image-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;word-break:break-word}@media (forced-colors:active){.ck-content .image>figcaption{background-color:unset;color:unset}}@media (forced-colors:none){.ck.ck-editor__editable .image>figcaption.image__caption_highlighted{animation:ck-image-caption-highlight .6s ease-out}}@media (prefers-reduced-motion:reduce){.ck.ck-editor__editable .image>figcaption.image__caption_highlighted{animation:none}}@keyframes ck-image-caption-highlight{0%{background-color:var(--ck-color-image-caption-highlighted-background)}to{background-color:var(--ck-color-image-caption-background)}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imagecaption.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css"],names:[],mappings:"AAOA,MACC,2CAAoD,CACpD,kCAA8C,CAC9C,oDACD,CAGA,8BAKC,yDAA0D,CAH1D,mBAAoB,CAEpB,wCAAyC,CAHzC,qBAAsB,CAMtB,eAAgB,CAChB,mBAAoB,CAFpB,YAAa,CAHb,qBAYD,CAJC,8BAXD,8BAYE,sBAAuB,CACvB,WAEF,CADC,CCdA,4BACC,qEDmBA,iDCjBA,CACD,CDmBA,uCALD,qEAME,cAEF,CADC,CAGD,sCACC,GACC,qEACD,CAEA,GACC,yDACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css";\n\n:root {\n\t--ck-color-image-caption-background: hsl(0, 0%, 97%);\n\t--ck-color-image-caption-text: hsl(0, 0%, 20%);\n\t--ck-color-image-caption-highlighted-background: hsl(52deg 100% 50%);\n}\n\n/* Content styles */\n.ck-content .image > figcaption {\n\tdisplay: table-caption;\n\tcaption-side: bottom;\n\tword-break: break-word;\n\tcolor: var(--ck-color-image-caption-text);\n\tbackground-color: var(--ck-color-image-caption-background);\n\tpadding: .6em;\n\tfont-size: .75em;\n\toutline-offset: -1px;\n\n\t/* Improve placeholder rendering in high-constrast mode (https://github.com/ckeditor/ckeditor5/issues/14907). */\n\t@media (forced-colors: active) {\n\t\tbackground-color: unset;\n\t\tcolor: unset;\n\t}\n}\n\n/* Editing styles */\n.ck.ck-editor__editable .image > figcaption.image__caption_highlighted {\n\t@mixin ck-media-default-colors {\n\t\tanimation: ck-image-caption-highlight .6s ease-out;\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\tanimation: none;\n\t}\n}\n\n@keyframes ck-image-caption-highlight {\n\t0% {\n\t\tbackground-color: var(--ck-color-image-caption-highlighted-background);\n\t}\n\n\t100% {\n\t\tbackground-color: var(--ck-color-image-caption-background);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-forced-colors {\n\t@media (forced-colors: active) {\n\t\t& {\n\t\t\t@mixin-content;\n\t\t}\n\t}\n}\n\n@define-mixin ck-media-default-colors {\n\t@media (forced-colors: none) {\n\t\t& {\n\t\t\t@mixin-content;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},1173:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-image-custom-resize-form{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-image-custom-resize-form .ck-labeled-field-view{display:inline-block}.ck.ck-image-custom-resize-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-image-custom-resize-form{flex-wrap:wrap}.ck.ck-image-custom-resize-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-image-custom-resize-form .ck-button{flex-basis:50%}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imagecustomresizeform.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAOA,gCAIC,sBAAuB,CAHvB,YAAa,CACb,kBAAmB,CACnB,gBAsBD,CAnBC,uDACC,oBACD,CAEA,0CACC,YACD,CCbA,oCDCD,gCAeE,cAUF,CARE,uDACC,eACD,CAEA,2CACC,cACD,CCtBD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-image-custom-resize-form {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\talign-items: flex-start;\n\n\t& .ck-labeled-field-view {\n\t\tdisplay: inline-block;\n\t}\n\n\t& .ck-label {\n\t\tdisplay: none;\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},1545:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-image-insert-url{padding:var(--ck-spacing-large) var(--ck-spacing-large) 0;width:400px}.ck.ck-image-insert-url .ck-image-insert-url__action-row{display:grid;grid-template-columns:repeat(2,1fr)}:root{--ck-image-insert-insert-by-url-width:250px}.ck.ck-image-insert-url{--ck-input-width:100%}.ck.ck-image-insert-url .ck-image-insert-url__action-row{grid-column-gap:var(--ck-spacing-large);margin-top:var(--ck-spacing-large)}.ck.ck-image-insert-url .ck-image-insert-url__action-row .ck-button-cancel,.ck.ck-image-insert-url .ck-image-insert-url__action-row .ck-button-save{justify-content:center;min-width:auto}.ck.ck-image-insert-url .ck-image-insert-url__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}.ck.ck-image-insert-form>.ck.ck-button{display:block;width:100%}[dir=ltr] .ck.ck-image-insert-form>.ck.ck-button{text-align:left}[dir=rtl] .ck.ck-image-insert-form>.ck.ck-button{text-align:right}.ck.ck-image-insert-form>.ck.ck-collapsible:not(:first-child){border-top:1px solid var(--ck-color-base-border)}.ck.ck-image-insert-form>.ck.ck-collapsible:not(:last-child){border-bottom:1px solid var(--ck-color-base-border)}.ck.ck-image-insert-form>.ck.ck-collapsible,.ck.ck-image-insert-form>.ck.ck-image-insert-url{min-width:var(--ck-image-insert-insert-by-url-width)}.ck.ck-image-insert-form>.ck.ck-image-insert-url{padding:var(--ck-spacing-large)}.ck.ck-image-insert-form:focus{outline:none}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imageinsert.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-image/imageinsert.css"],names:[],mappings:"AAKA,wBAEC,yDAA0D,CAD1D,WAOD,CAJC,yDACC,YAAa,CACb,mCACD,CCLD,MACC,2CACD,CAEA,wBACC,qBAgBD,CAdC,yDACC,uCAAwC,CACxC,kCAWD,CATC,oJAEC,sBAAuB,CACvB,cACD,CAEA,sFACC,0BACD,CAKD,uCACC,aAAc,CACd,UASD,CAXA,iDAKE,eAMF,CAXA,iDASE,gBAEF,CAGC,8DACC,gDACD,CAEA,6DACC,mDACD,CAMD,6FAJC,oDAOD,CAHA,iDAEC,+BACD,CAEA,+BACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-image-insert-url {\n\twidth: 400px;\n\tpadding: var(--ck-spacing-large) var(--ck-spacing-large) 0;\n\n\t& .ck-image-insert-url__action-row {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(2, 1fr);\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n:root {\n\t--ck-image-insert-insert-by-url-width: 250px;\n}\n\n.ck.ck-image-insert-url {\n\t--ck-input-width: 100%;\n\n\t& .ck-image-insert-url__action-row {\n\t\tgrid-column-gap: var(--ck-spacing-large);\n\t\tmargin-top: var(--ck-spacing-large);\n\n\t\t& .ck-button-save,\n\t\t& .ck-button-cancel {\n\t\t\tjustify-content: center;\n\t\t\tmin-width: auto;\n\t\t}\n\n\t\t& .ck-button .ck-button__label {\n\t\t\tcolor: var(--ck-color-text);\n\t\t}\n\t}\n}\n\n.ck.ck-image-insert-form {\n\t& > .ck.ck-button {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\n\t\t@mixin ck-dir ltr {\n\t\t\ttext-align: left;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\ttext-align: right;\n\t\t}\n\t}\n\n\t& > .ck.ck-collapsible {\n\t\t&:not(:first-child) {\n\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\t\t}\n\n\t\t&:not(:last-child) {\n\t\t\tborder-bottom: 1px solid var(--ck-color-base-border);\n\t\t}\n\n\t\tmin-width: var(--ck-image-insert-insert-by-url-width);\n\t}\n\n\t/* This is the case when there are no other integrations configured than insert by URL */\n\t& > .ck.ck-image-insert-url {\n\t\tmin-width: var(--ck-image-insert-insert-by-url-width);\n\t\tpadding: var(--ck-spacing-large);\n\t}\n\n\t&:focus {\n\t\toutline: none;\n\t}\n}\n'],sourceRoot:""}]);const a=s},1091:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-editor__editable img.image_placeholder{background-size:100% 100%}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imageplaceholder.css"],names:[],mappings:"AAMC,8CACC,yBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t& img.image_placeholder {\n\t\tbackground-size: 100% 100%;\n\t}\n}\n"],sourceRoot:""}]);const a=s},4214:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck-content img.image_resized{height:auto}.ck-content .image.image_resized{box-sizing:border-box;display:block;max-width:100%}.ck-content .image.image_resized img{width:100%}.ck-content .image.image_resized>figcaption{display:block}.ck.ck-editor__editable td .image-inline.image_resized img,.ck.ck-editor__editable th .image-inline.image_resized img{max-width:100%}[dir=ltr] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-left:var(--ck-spacing-standard)}.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label{width:4em}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imageresize.css"],names:[],mappings:"AAMA,8BACC,WACD,CAEA,iCAQC,qBAAsB,CADtB,aAAc,CANd,cAkBD,CATC,qCAEC,UACD,CAEA,4CAEC,aACD,CAQC,sHACC,cACD,CAIF,oFACC,uCACD,CAEA,oFACC,sCACD,CAEA,oEACC,SACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Preserve aspect ratio of the resized image after introducing image height attribute. */\n.ck-content img.image_resized {\n\theight: auto;\n}\n\n.ck-content .image.image_resized {\n\tmax-width: 100%;\n\t/*\n\tThe `` element for resized images must not use `display:table` as browsers do not support `max-width` for it well.\n\tSee https://stackoverflow.com/questions/4019604/chrome-safari-ignoring-max-width-in-table/14420691#14420691 for more.\n\tFortunately, since we control the width, there is no risk that the image will look bad.\n\t*/\n\tdisplay: block;\n\tbox-sizing: border-box;\n\n\t& img {\n\t\t/* For resized images it is the `` element that determines the image width. */\n\t\twidth: 100%;\n\t}\n\n\t& > figcaption {\n\t\t/* The `` element uses `display:block`, so `` also has to. */\n\t\tdisplay: block;\n\t}\n}\n\n.ck.ck-editor__editable {\n\t/* The resized inline image nested in the table should respect its parent size.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9117. */\n\t& td,\n\t& th {\n\t\t& .image-inline.image_resized img {\n\t\t\tmax-width: 100%;\n\t\t}\n\t}\n}\n\n[dir="ltr"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon {\n\tmargin-right: var(--ck-spacing-standard);\n}\n\n[dir="rtl"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon {\n\tmargin-left: var(--ck-spacing-standard);\n}\n\n.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label {\n\twidth: 4em;\n}\n'],sourceRoot:""}]);const a=s},7879:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,":root{--ck-image-style-spacing:1.5em;--ck-inline-image-style-spacing:calc(var(--ck-image-style-spacing)/2)}.ck-content .image.image-style-block-align-left,.ck-content .image.image-style-block-align-right{max-width:calc(100% - var(--ck-image-style-spacing))}.ck-content .image.image-style-align-left,.ck-content .image.image-style-align-right{clear:none}.ck-content .image.image-style-side{float:right;margin-left:var(--ck-image-style-spacing);max-width:50%}.ck-content .image.image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image.image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}.ck-content .image.image-style-block-align-right{margin-left:auto;margin-right:0}.ck-content .image.image-style-block-align-left{margin-left:0;margin-right:auto}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}.ck-content p+.image.image-style-align-left,.ck-content p+.image.image-style-align-right,.ck-content p+.image.image-style-side{margin-top:0}.ck-content .image-inline.image-style-align-left,.ck-content .image-inline.image-style-align-right{margin-bottom:var(--ck-inline-image-style-spacing);margin-top:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-left{margin-right:var(--ck-inline-image-style-spacing)}.ck-content .image-inline.image-style-align-right{margin-left:var(--ck-inline-image-style-spacing)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-background)}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__action:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton.ck-splitbutton_flatten:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover):after{display:none}.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__action:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled),.ck.ck-splitbutton.ck-splitbutton_flatten.ck-splitbutton_open:hover>.ck-splitbutton__arrow:not(.ck-disabled):not(:hover){background-color:var(--ck-color-button-on-hover-background)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imagestyle.css"],names:[],mappings:"AAKA,MACC,8BAA+B,CAC/B,qEACD,CAQE,iGAEC,oDACD,CAIA,qFAEC,UACD,CAEA,oCACC,WAAY,CACZ,yCAA0C,CAC1C,aACD,CAEA,0CACC,UAAW,CACX,0CACD,CAEA,2CACC,WAAY,CACZ,yCACD,CAEA,iDAEC,gBAAiB,CADjB,cAED,CAEA,gDACC,aAAc,CACd,iBACD,CAGD,sCACC,gBAAiB,CACjB,iBACD,CAEA,oCACC,UAAW,CACX,0CACD,CAEA,qCACC,WAAY,CACZ,yCACD,CAGA,+HAGC,YACD,CAGC,mGAGC,kDAAmD,CADnD,+CAED,CAEA,iDACC,iDACD,CAEA,kDACC,gDACD,CAUC,0lBAGC,qDAKD,CAHC,8nBACC,YACD,CAKD,oVAGC,2DACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-image-style-spacing: 1.5em;\n\t--ck-inline-image-style-spacing: calc(var(--ck-image-style-spacing) / 2);\n}\n\n.ck-content {\n\t/* See: https://github.com/ckeditor/ckeditor5/issues/16317 */\n\t& .image {\n\t\t/* Provides a minimal side margin for the left and right aligned images, so that the user has a visual feedback\n\t\tconfirming successful application of the style if image width exceeds the editor's size.\n\t\tSee https://github.com/ckeditor/ckeditor5/issues/9342 */\n\t\t&.image-style-block-align-left,\n\t\t&.image-style-block-align-right {\n\t\t\tmax-width: calc(100% - var(--ck-image-style-spacing));\n\t\t}\n\n\t\t/* Allows displaying multiple floating images in the same line.\n\t\tSee https://github.com/ckeditor/ckeditor5/issues/9183#issuecomment-804988132 */\n\t\t&.image-style-align-left,\n\t\t&.image-style-align-right {\n\t\t\tclear: none;\n\t\t}\n\n\t\t&.image-style-side {\n\t\t\tfloat: right;\n\t\t\tmargin-left: var(--ck-image-style-spacing);\n\t\t\tmax-width: 50%;\n\t\t}\n\n\t\t&.image-style-align-left {\n\t\t\tfloat: left;\n\t\t\tmargin-right: var(--ck-image-style-spacing);\n\t\t}\n\n\t\t&.image-style-align-right {\n\t\t\tfloat: right;\n\t\t\tmargin-left: var(--ck-image-style-spacing);\n\t\t}\n\n\t\t&.image-style-block-align-right {\n\t\t\tmargin-right: 0;\n\t\t\tmargin-left: auto;\n\t\t}\n\n\t\t&.image-style-block-align-left {\n\t\t\tmargin-left: 0;\n\t\t\tmargin-right: auto;\n\t\t}\n\t}\n\n\t& .image-style-align-center {\n\t\tmargin-left: auto;\n\t\tmargin-right: auto;\n\t}\n\n\t& .image-style-align-left {\n\t\tfloat: left;\n\t\tmargin-right: var(--ck-image-style-spacing);\n\t}\n\n\t& .image-style-align-right {\n\t\tfloat: right;\n\t\tmargin-left: var(--ck-image-style-spacing);\n\t}\n\n\t/* Simulates margin collapsing with the preceding paragraph, which does not work for the floating elements. */\n\t& p + .image.image-style-align-left,\n\t& p + .image.image-style-align-right,\n\t& p + .image.image-style-side {\n\t\tmargin-top: 0;\n\t}\n\n\t& .image-inline {\n\t\t&.image-style-align-left,\n\t\t&.image-style-align-right {\n\t\t\tmargin-top: var(--ck-inline-image-style-spacing);\n\t\t\tmargin-bottom: var(--ck-inline-image-style-spacing);\n\t\t}\n\n\t\t&.image-style-align-left {\n\t\t\tmargin-right: var(--ck-inline-image-style-spacing);\n\t\t}\n\n\t\t&.image-style-align-right {\n\t\t\tmargin-left: var(--ck-inline-image-style-spacing);\n\t\t}\n\t}\n}\n\n.ck.ck-splitbutton {\n\t/* The button should display as a regular drop-down if the action button\n\tis forced to fire the same action as the arrow button. */\n\t&.ck-splitbutton_flatten {\n\t\t&:hover,\n\t\t&.ck-splitbutton_open {\n\t\t\t& > .ck-splitbutton__action:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) {\n\t\t\t\tbackground-color: var(--ck-color-button-on-background);\n\n\t\t\t\t&::after {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.ck-splitbutton_open:hover {\n\t\t\t& > .ck-splitbutton__action:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled),\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled):not(:hover) {\n\t\t\t\tbackground-color: var(--ck-color-button-on-hover-background);\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},1230:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,'.ck-image-upload-complete-icon{border-radius:50%;display:block;position:absolute;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);z-index:1}.ck-image-upload-complete-icon:after{content:"";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:20;--ck-image-upload-icon-width:2px;--ck-image-upload-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck-image-upload-complete-icon{animation-delay:0ms,3s;animation-duration:.5s,.5s;animation-fill-mode:forwards,forwards;animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;background:var(--ck-color-image-upload-icon-background);font-size:calc(1px*var(--ck-image-upload-icon-size));height:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size));opacity:0;overflow:hidden;width:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size))}.ck-image-upload-complete-icon:after{animation-delay:.5s;animation-duration:.5s;animation-fill-mode:forwards;animation-name:ck-upload-complete-icon-check;border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);box-sizing:border-box;height:0;left:25%;opacity:0;top:50%;transform:scaleX(-1) rotate(135deg);transform-origin:left top;width:0}@media (prefers-reduced-motion:reduce){.ck-image-upload-complete-icon{animation-duration:0ms}.ck-image-upload-complete-icon:after{animation:none;height:.45em;opacity:1;width:.3em}}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{height:0;opacity:1;width:0}33%{height:0;width:.3em}to{height:.45em;opacity:1;width:.3em}}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imageuploadicon.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadicon.css"],names:[],mappings:"AAKA,+BAUC,iBAAkB,CATlB,aAAc,CACd,iBAAkB,CAOlB,sCAAwC,CADxC,oCAAsC,CAGtC,SAMD,CAJC,qCACC,UAAW,CACX,iBACD,CChBD,MACC,iCAA8C,CAC9C,+CAA4D,CAG5D,8BAA+B,CAC/B,gCAAiC,CACjC,4DACD,CAEA,+BAWC,sBAA4B,CAN5B,0BAAgC,CADhC,qCAAuC,CADvC,wEAA0E,CAD1E,uDAAwD,CAMxD,oDAAuD,CAWvD,oFAAuF,CAlBvF,SAAU,CAgBV,eAAgB,CAChB,mFAqCD,CAjCC,qCAgBC,mBAAsB,CADtB,sBAAyB,CAEzB,4BAA6B,CAH7B,4CAA6C,CAF7C,sFAAuF,CADvF,oFAAqF,CASrF,qBAAsB,CAdtB,QAAS,CAJT,QAAS,CAGT,SAAU,CADV,OAAQ,CAKR,mCAAoC,CACpC,yBAA0B,CAH1B,OAcD,CAEA,uCA7CD,+BA8CE,sBASF,CAPE,qCACC,cAAe,CAGf,YAAc,CAFd,SAAU,CACV,UAED,CACD,CAGD,wCACC,GACC,SACD,CAEA,GACC,SACD,CACD,CAEA,wCACC,GACC,SACD,CAEA,GACC,SACD,CACD,CAEA,yCACC,GAGC,QAAS,CAFT,SAAU,CACV,OAED,CACA,IAEC,QAAS,CADT,UAED,CACA,GAGC,YAAc,CAFd,SAAU,CACV,UAED,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-image-upload-complete-icon {\n\tdisplay: block;\n\tposition: absolute;\n\n\t/*\n\t * Smaller images should have the icon closer to the border.\n\t * Match the icon position with the linked image indicator brought by the link image feature.\n\t */\n\ttop: min(var(--ck-spacing-medium), 6%);\n\tright: min(var(--ck-spacing-medium), 6%);\n\tborder-radius: 50%;\n\tz-index: 1;\n\n\t&::after {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t}\n}\n','/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-image-upload-icon: hsl(0, 0%, 100%);\n\t--ck-color-image-upload-icon-background: hsl(120, 100%, 27%);\n\n\t/* Match the icon size with the linked image indicator brought by the link image feature. */\n\t--ck-image-upload-icon-size: 20;\n\t--ck-image-upload-icon-width: 2px;\n\t--ck-image-upload-icon-is-visible: clamp(0px, 100% - 50px, 1px);\n}\n\n.ck-image-upload-complete-icon {\n\topacity: 0;\n\tbackground: var(--ck-color-image-upload-icon-background);\n\tanimation-name: ck-upload-complete-icon-show, ck-upload-complete-icon-hide;\n\tanimation-fill-mode: forwards, forwards;\n\tanimation-duration: 500ms, 500ms;\n\n\t/* To make animation scalable. */\n\tfont-size: calc(1px * var(--ck-image-upload-icon-size));\n\n\t/* Hide completed upload icon after 3 seconds. */\n\tanimation-delay: 0ms, 3000ms;\n\n\t/*\n\t * Use CSS math to simulate container queries.\n\t * https://css-tricks.com/the-raven-technique-one-step-closer-to-container-queries/#what-about-showing-and-hiding-things\n\t */\n\toverflow: hidden;\n\twidth: calc(var(--ck-image-upload-icon-is-visible) * var(--ck-image-upload-icon-size));\n\theight: calc(var(--ck-image-upload-icon-is-visible) * var(--ck-image-upload-icon-size));\n\n\t/* This is check icon element made from border-width mixed with animations. */\n\t&::after {\n\t\t/* Because of border transformation we need to "hard code" left position. */\n\t\tleft: 25%;\n\n\t\ttop: 50%;\n\t\topacity: 0;\n\t\theight: 0;\n\t\twidth: 0;\n\n\t\ttransform: scaleX(-1) rotate(135deg);\n\t\ttransform-origin: left top;\n\t\tborder-top: var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);\n\t\tborder-right: var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);\n\n\t\tanimation-name: ck-upload-complete-icon-check;\n\t\tanimation-duration: 500ms;\n\t\tanimation-delay: 500ms;\n\t\tanimation-fill-mode: forwards;\n\n\t\t/* #1095. While reset is not providing proper box-sizing for pseudoelements, we need to handle it. */\n\t\tbox-sizing: border-box;\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\tanimation-duration: 0ms;\n\n\t\t&::after {\n\t\t\tanimation: none;\n\t\t\topacity: 1;\n\t\t\twidth: 0.3em;\n\t\t\theight: 0.45em;\n\t\t}\n\t}\n}\n\n@keyframes ck-upload-complete-icon-show {\n\tfrom {\n\t\topacity: 0;\n\t}\n\n\tto {\n\t\topacity: 1;\n\t}\n}\n\n@keyframes ck-upload-complete-icon-hide {\n\tfrom {\n\t\topacity: 1;\n\t}\n\n\tto {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes ck-upload-complete-icon-check {\n\t0% {\n\t\topacity: 1;\n\t\twidth: 0;\n\t\theight: 0;\n\t}\n\t33% {\n\t\twidth: 0.3em;\n\t\theight: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t\twidth: 0.3em;\n\t\theight: 0.45em;\n\t}\n}\n'],sourceRoot:""}]);const a=s},1160:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,'.ck .ck-upload-placeholder-loader{align-items:center;display:flex;justify-content:center;left:0;position:absolute;top:0}.ck .ck-upload-placeholder-loader:before{content:"";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px;--ck-upload-placeholder-image-aspect-ratio:2.8}.ck .ck-image-upload-placeholder{margin:0;width:100%}.ck .ck-image-upload-placeholder.image-inline{width:calc(var(--ck-upload-placeholder-loader-size)*2*var(--ck-upload-placeholder-image-aspect-ratio))}.ck .ck-image-upload-placeholder img{aspect-ratio:var(--ck-upload-placeholder-image-aspect-ratio)}.ck .ck-upload-placeholder-loader{height:100%;width:100%}.ck .ck-upload-placeholder-loader:before{animation:ck-upload-placeholder-loader 1s linear infinite;border-radius:50%;border-right:2px solid transparent;border-top:3px solid var(--ck-color-upload-placeholder-loader);height:var(--ck-upload-placeholder-loader-size);width:var(--ck-upload-placeholder-loader-size)}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imageuploadloader.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadloader.css"],names:[],mappings:"AAKA,kCAGC,kBAAmB,CADnB,YAAa,CAEb,sBAAuB,CAEvB,MAAO,CALP,iBAAkB,CAIlB,KAOD,CAJC,yCACC,UAAW,CACX,iBACD,CCXD,MACC,4CAAqD,CACrD,wCAAyC,CACzC,8CACD,CAEA,iCAGC,QAAS,CADT,UAgBD,CAbC,8CACC,sGACD,CAEA,qCAOC,4DACD,CAGD,kCAEC,WAAY,CADZ,UAWD,CARC,yCAMC,yDAA0D,CAH1D,iBAAkB,CAElB,kCAAmC,CADnC,8DAA+D,CAF/D,+CAAgD,CADhD,8CAMD,CAGD,wCACC,GACC,uBACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-upload-placeholder-loader {\n\tposition: absolute;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\ttop: 0;\n\tleft: 0;\n\n\t&::before {\n\t\tcontent: '';\n\t\tposition: relative;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-upload-placeholder-loader: hsl(0, 0%, 70%);\n\t--ck-upload-placeholder-loader-size: 32px;\n\t--ck-upload-placeholder-image-aspect-ratio: 2.8;\n}\n\n.ck .ck-image-upload-placeholder {\n\t/* We need to control the full width of the SVG gray background. */\n\twidth: 100%;\n\tmargin: 0;\n\n\t&.image-inline {\n\t\twidth: calc( 2 * var(--ck-upload-placeholder-loader-size) * var(--ck-upload-placeholder-image-aspect-ratio) );\n\t}\n\n\t& img {\n\t\t/*\n\t\t * This is an arbitrary aspect for a 1x1 px GIF to display to the user. Not too tall, not too short.\n\t\t * There's nothing special about this number except that it should make the image placeholder look like\n\t\t * a real image during this short period after the upload started and before the image was read from the\n\t\t * file system (and a rich preview was loaded).\n\t\t */\n\t\taspect-ratio: var(--ck-upload-placeholder-image-aspect-ratio);\n\t}\n}\n\n.ck .ck-upload-placeholder-loader {\n\twidth: 100%;\n\theight: 100%;\n\n\t&::before {\n\t\twidth: var(--ck-upload-placeholder-loader-size);\n\t\theight: var(--ck-upload-placeholder-loader-size);\n\t\tborder-radius: 50%;\n\t\tborder-top: 3px solid var(--ck-color-upload-placeholder-loader);\n\t\tborder-right: 2px solid transparent;\n\t\tanimation: ck-upload-placeholder-loader 1s linear infinite;\n\t}\n}\n\n@keyframes ck-upload-placeholder-loader {\n\tto {\n\t\ttransform: rotate( 360deg );\n\t}\n}\n"],sourceRoot:""}]);const a=s},7504:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-editor__editable .image,.ck.ck-editor__editable .image-inline{position:relative}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{left:0;position:absolute;top:0}.ck.ck-editor__editable .image-inline.ck-appear,.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}@media (prefers-reduced-motion:reduce){.ck.ck-editor__editable .image-inline.ck-appear,.ck.ck-editor__editable .image.ck-appear{animation:none;opacity:1}}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{background:var(--ck-color-upload-bar-background);height:2px;transition:width .1s;width:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imageuploadprogress.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadprogress.css"],names:[],mappings:"AAMC,qEAEC,iBACD,CAGA,uGAIC,MAAO,CAFP,iBAAkB,CAClB,KAED,CCRC,yFACC,oBAMD,CAJC,uCAHD,yFAKE,cAAe,CADf,SAGF,CADC,CAKF,uGAIC,gDAAiD,CAFjD,UAAW,CAGX,oBAAuB,CAFvB,OAGD,CAGD,kBACC,GAAO,SAAY,CACnB,GAAO,SAAY,CACpB",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t& .image,\n\t& .image-inline {\n\t\tposition: relative;\n\t}\n\n\t/* Upload progress bar. */\n\t& .image .ck-progress-bar,\n\t& .image-inline .ck-progress-bar {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t& .image,\n\t& .image-inline {\n\t\t/* Showing animation. */\n\t\t&.ck-appear {\n\t\t\tanimation: fadeIn 700ms;\n\n\t\t\t@media (prefers-reduced-motion: reduce) {\n\t\t\t\topacity: 1;\n\t\t\t\tanimation: none;\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Upload progress bar. */\n\t& .image .ck-progress-bar,\n\t& .image-inline .ck-progress-bar {\n\t\theight: 2px;\n\t\twidth: 0;\n\t\tbackground: var(--ck-color-upload-bar-background);\n\t\ttransition: width 100ms;\n\t}\n}\n\n@keyframes fadeIn {\n\tfrom { opacity: 0; }\n\tto { opacity: 1; }\n}\n"],sourceRoot:""}]);const a=s},8429:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-field-view{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/textalternativeform.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAOA,6BACC,YAAa,CACb,kBAAmB,CACnB,gBAqBD,CAnBC,oDACC,oBACD,CAEA,uCACC,YACD,CCZA,oCDCD,6BAcE,cAUF,CARE,oDACC,eACD,CAEA,wCACC,cACD,CCrBD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-text-alternative-form {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\n\t& .ck-labeled-field-view {\n\t\tdisplay: inline-block;\n\t}\n\n\t& .ck-label {\n\t\tdisplay: none;\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},7456:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-link_selected span.image-inline{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-link/link.css"],names:[],mappings:"AAMA,sBACC,mDAMD,CAHC,wCACC,yFACD,CAOD,4BACC,8CACD,CAGA,sCAEC,gDAAiD,CADjD,WAAY,CAEZ,iBAAkB,CAClB,oCACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Class added to span element surrounding currently selected link. */\n.ck .ck-link_selected {\n\tbackground: var(--ck-color-link-selected-background);\n\n\t/* Give linked inline images some outline to let the user know they are also part of the link. */\n\t& span.image-inline {\n\t\toutline: var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background);\n\t}\n}\n\n/*\n * Classes used by the "fake visual selection" displayed in the content when an input\n * in the link UI has focus (the browser does not render the native selection in this state).\n */\n.ck .ck-fake-link-selection {\n\tbackground: var(--ck-color-link-fake-selection);\n}\n\n/* A collapsed fake visual selection. */\n.ck .ck-fake-link-selection_collapsed {\n\theight: 100%;\n\tborder-right: 1px solid var(--ck-color-base-text);\n\tmargin-right: -1px;\n\toutline: solid 1px hsla(0, 0%, 100%, .5);\n}\n'],sourceRoot:""}]);const a=s},8040:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{color:var(--ck-color-link-default);cursor:pointer;max-width:var(--ck-input-width);min-width:3em;padding:0 var(--ck-spacing-medium);text-align:center;text-overflow:ellipsis}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child),[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{max-width:100%;min-width:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview),[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-link/theme/linkactions.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-link/linkactions.css"],names:[],mappings:"AAOA,oBACC,YAAa,CACb,kBAAmB,CACnB,gBAqBD,CAnBC,8CACC,oBAKD,CAHC,gEACC,eACD,CCXD,oCDCD,oBAcE,cAUF,CARE,8CACC,eACD,CAEA,8DACC,cACD,CCrBD,CCIA,wDACC,cAAe,CACf,eAmCD,CAjCC,0EAEC,kCAAmC,CAEnC,cAAe,CAIf,+BAAgC,CAChC,aAAc,CARd,kCAAmC,CASnC,iBAAkB,CAPlB,sBAYD,CAHC,gFACC,yBACD,CAGD,mPAIC,eACD,CAEA,+DACC,eACD,CAGC,gFACC,yBACD,CAWD,qHACC,sCACD,CDtDD,oCC0DC,wDACC,8DAMD,CAJC,0EAEC,cAAe,CADf,WAED,CAGD,gJAME,aAEF,CDzED",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-actions {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\n\t& .ck-link-actions__preview {\n\t\tdisplay: inline-block;\n\n\t\t& .ck-button__label {\n\t\t\toverflow: hidden;\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-link-actions__preview {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button:not(.ck-link-actions__preview) {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n@import "../mixins/_focus.css";\n@import "../mixins/_shadow.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-actions {\n\t& .ck-button.ck-link-actions__preview {\n\t\tpadding-left: 0;\n\t\tpadding-right: 0;\n\n\t\t& .ck-button__label {\n\t\t\tpadding: 0 var(--ck-spacing-medium);\n\t\t\tcolor: var(--ck-color-link-default);\n\t\t\ttext-overflow: ellipsis;\n\t\t\tcursor: pointer;\n\n\t\t\t/* Match the box model of the link editor form\'s input so the balloon\n\t\t\tdoes not change width when moving between actions and the form. */\n\t\t\tmax-width: var(--ck-input-width);\n\t\t\tmin-width: 3em;\n\t\t\ttext-align: center;\n\n\t\t\t&:hover {\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\t\t}\n\n\t\t&,\n\t\t&:hover,\n\t\t&:focus,\n\t\t&:active {\n\t\t\tbackground: none;\n\t\t}\n\n\t\t&:active {\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\t&:focus {\n\t\t\t& .ck-button__label {\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\t\t}\n\t}\n\n\t@mixin ck-dir ltr {\n\t\t& .ck-button:not(:first-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-dir rtl {\n\t\t& .ck-button:not(:last-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\t& .ck-button.ck-link-actions__preview {\n\t\t\tmargin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\n\n\t\t\t& .ck-button__label {\n\t\t\t\tmin-width: 0;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\n\t\t& .ck-button:not(.ck-link-actions__preview) {\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},2350:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-link-form{align-items:flex-start;display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form_layout-vertical .ck-button.ck-button-cancel,.ck.ck-link-form_layout-vertical .ck-button.ck-button-save{margin-top:var(--ck-spacing-medium)}.ck.ck-link-form_layout-vertical{min-width:var(--ck-input-width);padding:0}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical>.ck-button{border-radius:0;margin:0;padding:var(--ck-spacing-standard);width:50%}.ck.ck-link-form_layout-vertical>.ck-button:not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-form_layout-vertical>.ck-button,[dir=rtl] .ck.ck-link-form_layout-vertical>.ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical>.ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin:0 var(--ck-spacing-large)}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{padding:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-link/theme/linkform.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-link/linkform.css"],names:[],mappings:"AAOA,iBAEC,sBAAuB,CADvB,YAkBD,CAfC,2BACC,YACD,CCPA,oCDCD,iBASE,cAUF,CARE,wCACC,eACD,CAEA,4BACC,cACD,CChBD,CDwBD,iCACC,aAYD,CALE,wHAEC,mCACD,CEhCF,iCAEC,+BAAgC,CADhC,SAgDD,CA7CC,wDACC,8EAMD,CAJC,uEACC,WAAY,CACZ,UACD,CAGD,4CAIC,eAAgB,CAFhB,QAAS,CADT,kCAAmC,CAEnC,SAkBD,CAfC,wDACC,gDACD,CARD,4GAeE,aAMF,CAJE,mEACC,kDACD,CAKF,6CACC,gCAUD,CARC,wEACC,SAAU,CACV,UAKD,CAHC,8EACC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-form {\n\tdisplay: flex;\n\talign-items: flex-start;\n\n\t& .ck-label {\n\t\tdisplay: none;\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n\n/*\n * Style link form differently when manual decorators are available.\n * See: https://github.com/ckeditor/ckeditor5-link/issues/186.\n */\n.ck.ck-link-form_layout-vertical {\n\tdisplay: block;\n\n\t/*\n\t * Whether the form is in the responsive mode or not, if there are decorator buttons\n\t * keep the top margin of action buttons medium.\n\t */\n\t& .ck-button {\n\t\t&.ck-button-save,\n\t\t&.ck-button-cancel {\n\t\t\tmargin-top: var(--ck-spacing-medium);\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n/*\n * Style link form differently when manual decorators are available.\n * See: https://github.com/ckeditor/ckeditor5-link/issues/186.\n */\n.ck.ck-link-form_layout-vertical {\n\tpadding: 0;\n\tmin-width: var(--ck-input-width);\n\n\t& .ck-labeled-field-view {\n\t\tmargin: var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small);\n\n\t\t& .ck-input-text {\n\t\t\tmin-width: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t}\n\n\t& > .ck-button {\n\t\tpadding: var(--ck-spacing-standard);\n\t\tmargin: 0;\n\t\twidth: 50%;\n\t\tborder-radius: 0;\n\n\t\t&:not(:focus) {\n\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\t\t}\n\n\t\t@mixin ck-dir ltr {\n\t\t\tmargin-left: 0;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tmargin-left: 0;\n\n\t\t\t&:last-of-type {\n\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Using additional `.ck` class for stronger CSS specificity than `.ck.ck-link-form > :not(:first-child)`. */\n\t& .ck.ck-list {\n\t\tmargin: 0 var(--ck-spacing-large);\n\n\t\t& .ck-button.ck-switchbutton {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\n\t\t\t&:hover {\n\t\t\t\tbackground: none;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},3669:(e,t,o)=>{"use strict";o.d(t,{A:()=>h});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r),a=o(4417),l=o.n(a),c=new URL(o(2401),o.b),d=s()(i()),u=l()(c);d.push([e.id,`.ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{display:block;position:absolute}:root{--ck-link-image-indicator-icon-size:20;--ck-link-image-indicator-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{background-color:rgba(0,0,0,.4);background-image:url(${u});background-position:50%;background-repeat:no-repeat;background-size:14px;border-radius:100%;content:"";height:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size));overflow:hidden;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);width:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size))}`,"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-link/theme/linkimage.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-link/linkimage.css"],names:[],mappings:"AASE,+FACC,aAAc,CACd,iBACD,CCPF,MAEC,sCAAuC,CACvC,oEACD,CAME,+FAUC,+BAAqC,CACrC,wDAA+3B,CAG/3B,uBAA2B,CAD3B,2BAA4B,CAD5B,oBAAqB,CAGrB,kBAAmB,CAdnB,UAAW,CAsBX,oGAAuG,CAFvG,eAAgB,CAbhB,sCAAwC,CADxC,oCAAsC,CAetC,mGAED",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t/* Linked image indicator */\n\t& figure.image > a,\n\t& a span.image-inline {\n\t\t&::after {\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t}\n\t}\n}\n\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/* Match the icon size with the upload indicator brought by the image upload feature. */\n\t--ck-link-image-indicator-icon-size: 20;\n\t--ck-link-image-indicator-icon-is-visible: clamp(0px, 100% - 50px, 1px);\n}\n\n.ck.ck-editor__editable {\n\t/* Linked image indicator */\n\t& figure.image > a,\n\t& a span.image-inline {\n\t\t&::after {\n\t\t\tcontent: "";\n\n\t\t\t/*\n\t\t\t * Smaller images should have the icon closer to the border.\n\t\t\t * Match the icon position with the upload indicator brought by the image upload feature.\n\t\t\t */\n\t\t\ttop: min(var(--ck-spacing-medium), 6%);\n\t\t\tright: min(var(--ck-spacing-medium), 6%);\n\n\t\t\tbackground-color: hsla(0, 0%, 0%, .4);\n\t\t\tbackground-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0ibTExLjA3NyAxNSAuOTkxLTEuNDE2YS43NS43NSAwIDEgMSAxLjIyOS44NmwtMS4xNDggMS42NGEuNzQ4Ljc0OCAwIDAgMS0uMjE3LjIwNiA1LjI1MSA1LjI1MSAwIDAgMS04LjUwMy01Ljk1NS43NDEuNzQxIDAgMCAxIC4xMi0uMjc0bDEuMTQ3LTEuNjM5YS43NS43NSAwIDEgMSAxLjIyOC44Nkw0LjkzMyAxMC43bC4wMDYuMDAzYTMuNzUgMy43NSAwIDAgMCA2LjEzMiA0LjI5NGwuMDA2LjAwNHptNS40OTQtNS4zMzVhLjc0OC43NDggMCAwIDEtLjEyLjI3NGwtMS4xNDcgMS42MzlhLjc1Ljc1IDAgMSAxLTEuMjI4LS44NmwuODYtMS4yM2EzLjc1IDMuNzUgMCAwIDAtNi4xNDQtNC4zMDFsLS44NiAxLjIyOWEuNzUuNzUgMCAwIDEtMS4yMjktLjg2bDEuMTQ4LTEuNjRhLjc0OC43NDggMCAwIDEgLjIxNy0uMjA2IDUuMjUxIDUuMjUxIDAgMCAxIDguNTAzIDUuOTU1em0tNC41NjMtMi41MzJhLjc1Ljc1IDAgMCAxIC4xODQgMS4wNDVsLTMuMTU1IDQuNTA1YS43NS43NSAwIDEgMS0xLjIyOS0uODZsMy4xNTUtNC41MDZhLjc1Ljc1IDAgMCAxIDEuMDQ1LS4xODR6Ii8+PC9zdmc+");\n\t\t\tbackground-size: 14px;\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-position: center;\n\t\t\tborder-radius: 100%;\n\n\t\t\t/*\n\t\t\t* Use CSS math to simulate container queries.\n\t\t\t* https://css-tricks.com/the-raven-technique-one-step-closer-to-container-queries/#what-about-showing-and-hiding-things\n\t\t\t*/\n\t\t\toverflow: hidden;\n\t\t\twidth: calc(var(--ck-link-image-indicator-icon-is-visible) * var(--ck-link-image-indicator-icon-size));\n\t\t\theight: calc(var(--ck-link-image-indicator-icon-is-visible) * var(--ck-link-image-indicator-icon-size));\n\t\t}\n\t}\n}\n\n'],sourceRoot:""}]);const h=d},7875:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck-editor__editable .ck-list-bogus-paragraph{display:block}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-list/theme/documentlist.css"],names:[],mappings:"AAKA,8CACC,aACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-editor__editable .ck-list-bogus-paragraph {\n\tdisplay: block;\n}\n"],sourceRoot:""}]);const a=s},532:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck-content ol{list-style-type:decimal}.ck-content ol ol{list-style-type:lower-latin}.ck-content ol ol ol{list-style-type:lower-roman}.ck-content ol ol ol ol{list-style-type:upper-latin}.ck-content ol ol ol ol ol{list-style-type:upper-roman}.ck-content ul{list-style-type:disc}.ck-content ul ul{list-style-type:circle}.ck-content ul ul ul,.ck-content ul ul ul ul{list-style-type:square}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-list/theme/list.css"],names:[],mappings:"AAKA,eACC,uBAiBD,CAfC,kBACC,2BAaD,CAXC,qBACC,2BASD,CAPC,wBACC,2BAKD,CAHC,2BACC,2BACD,CAMJ,eACC,oBAaD,CAXC,kBACC,sBASD,CAJE,6CACC,sBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content ol {\n\tlist-style-type: decimal;\n\n\t& ol {\n\t\tlist-style-type: lower-latin;\n\n\t\t& ol {\n\t\t\tlist-style-type: lower-roman;\n\n\t\t\t& ol {\n\t\t\t\tlist-style-type: upper-latin;\n\n\t\t\t\t& ol {\n\t\t\t\t\tlist-style-type: upper-roman;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck-content ul {\n\tlist-style-type: disc;\n\n\t& ul {\n\t\tlist-style-type: circle;\n\n\t\t& ul {\n\t\t\tlist-style-type: square;\n\n\t\t\t& ul {\n\t\t\t\tlist-style-type: square;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},1911:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-list-properties.ck-list-properties_without-styles{padding:var(--ck-spacing-large)}.ck.ck-list-properties.ck-list-properties_without-styles>*{min-width:14em}.ck.ck-list-properties.ck-list-properties_without-styles>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-list-styles-list{grid-template-columns:repeat(4,auto)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*{width:100%}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties .ck.ck-numbered-list-properties__start-index .ck-input{min-width:auto;width:100%}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order{background:transparent;margin-bottom:calc(var(--ck-spacing-tiny)*-1);padding-left:0;padding-right:0}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:active,.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:hover{background:none;border-color:transparent;box-shadow:none}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-list/listproperties.css"],names:[],mappings:"AAOC,yDACC,+BASD,CAPC,2DACC,cAKD,CAHC,6DACC,qCACD,CASD,wFACC,oCACD,CAGA,mFACC,gDAWD,CARE,+GACC,UAKD,CAHC,iHACC,qCACD,CAMJ,8EACC,cAAe,CACf,UACD,CAEA,uEACC,sBAAuB,CAGvB,6CAAgD,CAFhD,cAAe,CACf,eAQD,CALC,2JAGC,eAAgB,CADhB,wBAAyB,CADzB,eAGD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-list-properties {\n\t/* When there are no list styles and there is no collapsible. */\n\t&.ck-list-properties_without-styles {\n\t\tpadding: var(--ck-spacing-large);\n\n\t\t& > * {\n\t\t\tmin-width: 14em;\n\n\t\t\t& + * {\n\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * When the numbered list property fields (start at, reversed) should be displayed,\n\t * more horizontal space is needed. Reconfigure the style grid to create that space.\n\t */\n\t&.ck-list-properties_with-numbered-properties {\n\t\t& > .ck-list-styles-list {\n\t\t\tgrid-template-columns: repeat( 4, auto );\n\t\t}\n\n\t\t/* When list styles are rendered and property fields are in a collapsible. */\n\t\t& > .ck-collapsible {\n\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\n\t\t\t& > .ck-collapsible__children {\n\t\t\t\t& > * {\n\t\t\t\t\twidth: 100%;\n\n\t\t\t\t\t& + * {\n\t\t\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-numbered-list-properties__start-index .ck-input {\n\t\tmin-width: auto;\n\t\twidth: 100%;\n\t}\n\n\t& .ck.ck-numbered-list-properties__reversed-order {\n\t\tbackground: transparent;\n\t\tpadding-left: 0;\n\t\tpadding-right: 0;\n\t\tmargin-bottom: calc(-1 * var(--ck-spacing-tiny));\n\n\t\t&:active, &:hover {\n\t\t\tbox-shadow: none;\n\t\t\tborder-color: transparent;\n\t\t\tbackground: none;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},1330:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-list-styles-list{display:grid}:root{--ck-list-style-button-size:44px}.ck.ck-list-styles-list{column-gap:var(--ck-spacing-medium);grid-template-columns:repeat(3,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-list-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-list-styles-list .ck-button,.ck.ck-list-styles-list .ck-button .ck-icon{height:var(--ck-list-style-button-size);width:var(--ck-list-style-button-size)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-list/theme/liststyles.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-list/liststyles.css"],names:[],mappings:"AAKA,wBACC,YACD,CCFA,MACC,gCACD,CAEA,wBAGC,mCAAoC,CAFpC,oCAAwC,CAGxC,+BAAgC,CAFhC,gCA4BD,CAxBC,mCAiBC,sBAAuB,CAPvB,QAAS,CANT,SAmBD,CAJC,+EAhBA,uCAAwC,CADxC,sCAoBA",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-list-styles-list {\n\tdisplay: grid;\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-list-style-button-size: 44px;\n}\n\n.ck.ck-list-styles-list {\n\tgrid-template-columns: repeat( 3, auto );\n\trow-gap: var(--ck-spacing-medium);\n\tcolumn-gap: var(--ck-spacing-medium);\n\tpadding: var(--ck-spacing-large);\n\n\t& .ck-button {\n\t\t/* Make the button look like a thumbnail (the icon "takes it all"). */\n\t\twidth: var(--ck-list-style-button-size);\n\t\theight: var(--ck-list-style-button-size);\n\t\tpadding: 0;\n\n\t\t/*\n\t\t * Buttons are aligned by the grid so disable default button margins to not collide with the\n\t\t * gaps in the grid.\n\t\t */\n\t\tmargin: 0;\n\n\t\t/*\n\t\t * Make sure the button border (which is displayed on focus, BTW) does not steal pixels\n\t\t * from the button dimensions and, as a result, decrease the size of the icon\n\t\t * (which becomes blurry as it scales down).\n\t\t */\n\t\tbox-sizing: content-box;\n\n\t\t& .ck-icon {\n\t\t\twidth: var(--ck-list-style-button-size);\n\t\t\theight: var(--ck-list-style-button-size);\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},5484:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,':root{--ck-todo-list-checkmark-size:16px}.ck-content .todo-list{list-style:none}.ck-content .todo-list li{margin-bottom:5px;position:relative}.ck-content .todo-list li .todo-list{margin-top:5px}.ck-content .todo-list .todo-list__label>input{-webkit-appearance:none;border:0;display:inline-block;height:var(--ck-todo-list-checkmark-size);left:-25px;margin-left:0;margin-right:-15px;position:relative;right:0;vertical-align:middle;width:var(--ck-todo-list-checkmark-size)}.ck-content[dir=rtl] .todo-list .todo-list__label>input{left:0;margin-left:-15px;margin-right:0;right:-25px}.ck-content .todo-list .todo-list__label>input:before{border:1px solid #333;border-radius:2px;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;transition:box-shadow .25s ease-in-out;width:100%}@media (prefers-reduced-motion:reduce){.ck-content .todo-list .todo-list__label>input:before{transition:none}}.ck-content .todo-list .todo-list__label>input:after{border-color:transparent;border-style:solid;border-width:0 calc(var(--ck-todo-list-checkmark-size)/8) calc(var(--ck-todo-list-checkmark-size)/8) 0;box-sizing:content-box;content:"";display:block;height:calc(var(--ck-todo-list-checkmark-size)/2.6);left:calc(var(--ck-todo-list-checkmark-size)/3);pointer-events:none;position:absolute;top:calc(var(--ck-todo-list-checkmark-size)/5.3);transform:rotate(45deg);width:calc(var(--ck-todo-list-checkmark-size)/5.3)}.ck-content .todo-list .todo-list__label>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-content .todo-list .todo-list__label>input[checked]:after{border-color:#fff}.ck-content .todo-list .todo-list__label .todo-list__label__description{vertical-align:middle}.ck-content .todo-list .todo-list__label.todo-list__label_without-description input[type=checkbox]{position:absolute}.ck-editor__editable.ck-content .todo-list .todo-list__label>input,.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input{cursor:pointer}.ck-editor__editable.ck-content .todo-list .todo-list__label>input:hover:before,.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:hover:before{box-shadow:0 0 0 5px rgba(0,0,0,.1)}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input{-webkit-appearance:none;border:0;display:inline-block;height:var(--ck-todo-list-checkmark-size);left:-25px;margin-left:0;margin-right:-15px;position:relative;right:0;vertical-align:middle;width:var(--ck-todo-list-checkmark-size)}.ck-editor__editable.ck-content[dir=rtl] .todo-list .todo-list__label>span[contenteditable=false]>input{left:0;margin-left:-15px;margin-right:0;right:-25px}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:before{border:1px solid #333;border-radius:2px;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;transition:box-shadow .25s ease-in-out;width:100%}@media (prefers-reduced-motion:reduce){.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:before{transition:none}}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input:after{border-color:transparent;border-style:solid;border-width:0 calc(var(--ck-todo-list-checkmark-size)/8) calc(var(--ck-todo-list-checkmark-size)/8) 0;box-sizing:content-box;content:"";display:block;height:calc(var(--ck-todo-list-checkmark-size)/2.6);left:calc(var(--ck-todo-list-checkmark-size)/3);pointer-events:none;position:absolute;top:calc(var(--ck-todo-list-checkmark-size)/5.3);transform:rotate(45deg);width:calc(var(--ck-todo-list-checkmark-size)/5.3)}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-editor__editable.ck-content .todo-list .todo-list__label>span[contenteditable=false]>input[checked]:after{border-color:#fff}.ck-editor__editable.ck-content .todo-list .todo-list__label.todo-list__label_without-description input[type=checkbox]{position:absolute}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-list/theme/todolist.css"],names:[],mappings:"AAKA,MACC,kCACD,CA4EA,uBACC,eAwBD,CAtBC,0BAEC,iBAAkB,CADlB,iBAMD,CAHC,qCACC,cACD,CAIA,+CAtFD,uBAAwB,CAQxB,QAAS,CAPT,oBAAqB,CAGrB,yCAA0C,CAO1C,UAAW,CAGX,aAAc,CAFd,kBAAmB,CAVnB,iBAAkB,CAWlB,OAAQ,CARR,qBAAsB,CAFtB,wCAqFC,CAFA,wDApEA,MAAO,CAGP,iBAAkB,CAFlB,cAAe,CACf,WAoEA,CAhED,sDAOC,qBAAiC,CACjC,iBAAkB,CALlB,qBAAsB,CACtB,UAAW,CAHX,aAAc,CAKd,WAAY,CAJZ,iBAAkB,CAOlB,sCAAwC,CAJxC,UASD,CAHC,uCAXD,sDAYE,eAEF,CADC,CAGD,qDAaC,wBAAyB,CADzB,kBAAmB,CAEnB,sGAA+G,CAX/G,sBAAuB,CAEvB,UAAW,CAJX,aAAc,CAUd,mDAAwD,CAHxD,+CAAoD,CAJpD,mBAAoB,CAFpB,iBAAkB,CAOlB,gDAAqD,CAMrD,uBAAwB,CALxB,kDAMD,CAGC,+DACC,kBAA8B,CAC9B,oBACD,CAEA,8DACC,iBACD,CAwBA,wEACC,qBACD,CAEA,mGACC,iBACD,CAYD,kKAEC,cAKD,CAHC,4LACC,mCACD,CAMD,+FAxHA,uBAAwB,CAQxB,QAAS,CAPT,oBAAqB,CAGrB,yCAA0C,CAO1C,UAAW,CAGX,aAAc,CAFd,kBAAmB,CAVnB,iBAAkB,CAWlB,OAAQ,CARR,qBAAsB,CAFtB,wCAuHA,CAFA,wGAtGC,MAAO,CAGP,iBAAkB,CAFlB,cAAe,CACf,WAsGD,CAlGA,sGAOC,qBAAiC,CACjC,iBAAkB,CALlB,qBAAsB,CACtB,UAAW,CAHX,aAAc,CAKd,WAAY,CAJZ,iBAAkB,CAOlB,sCAAwC,CAJxC,UASD,CAHC,uCAXD,sGAYE,eAEF,CADC,CAGD,qGAaC,wBAAyB,CADzB,kBAAmB,CAEnB,sGAA+G,CAX/G,sBAAuB,CAEvB,UAAW,CAJX,aAAc,CAUd,mDAAwD,CAHxD,+CAAoD,CAJpD,mBAAoB,CAFpB,iBAAkB,CAOlB,gDAAqD,CAMrD,uBAAwB,CALxB,kDAMD,CAGC,+GACC,kBAA8B,CAC9B,oBACD,CAEA,8GACC,iBACD,CA2DA,uHACC,iBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-todo-list-checkmark-size: 16px;\n}\n\n@define-mixin todo-list-checkbox {\n\t-webkit-appearance: none;\n\tdisplay: inline-block;\n\tposition: relative;\n\twidth: var(--ck-todo-list-checkmark-size);\n\theight: var(--ck-todo-list-checkmark-size);\n\tvertical-align: middle;\n\n\t/* Needed on iOS */\n\tborder: 0;\n\n\t/* LTR styles */\n\tleft: -25px;\n\tmargin-right: -15px;\n\tright: 0;\n\tmargin-left: 0;\n\n\t/* RTL styles */\n\t@nest [dir=rtl]& {\n\t\tleft: 0;\n\t\tmargin-right: 0;\n\t\tright: -25px;\n\t\tmargin-left: -15px;\n\t}\n\n\t&::before {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\tbox-sizing: border-box;\n\t\tcontent: '';\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder: 1px solid hsl(0, 0%, 20%);\n\t\tborder-radius: 2px;\n\t\ttransition: 250ms ease-in-out box-shadow;\n\n\t\t@media (prefers-reduced-motion: reduce) {\n\t\t\ttransition: none;\n\t\t}\n\t}\n\n\t&::after {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\tbox-sizing: content-box;\n\t\tpointer-events: none;\n\t\tcontent: '';\n\n\t\t/* Calculate tick position, size and border-width proportional to the checkmark size. */\n\t\tleft: calc( var(--ck-todo-list-checkmark-size) / 3 );\n\t\ttop: calc( var(--ck-todo-list-checkmark-size) / 5.3 );\n\t\twidth: calc( var(--ck-todo-list-checkmark-size) / 5.3 );\n\t\theight: calc( var(--ck-todo-list-checkmark-size) / 2.6 );\n\t\tborder-style: solid;\n\t\tborder-color: transparent;\n\t\tborder-width: 0 calc( var(--ck-todo-list-checkmark-size) / 8 ) calc( var(--ck-todo-list-checkmark-size) / 8 ) 0;\n\t\ttransform: rotate(45deg);\n\t}\n\n\t&[checked] {\n\t\t&::before {\n\t\t\tbackground: hsl(126, 64%, 41%);\n\t\t\tborder-color: hsl(126, 64%, 41%);\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: hsl(0, 0%, 100%);\n\t\t}\n\t}\n}\n\n/*\n * To-do list content styles.\n */\n.ck-content .todo-list {\n\tlist-style: none;\n\n\t& li {\n\t\tposition: relative;\n\t\tmargin-bottom: 5px;\n\n\t\t& .todo-list {\n\t\t\tmargin-top: 5px;\n\t\t}\n\t}\n\n\t& .todo-list__label {\n\t\t& > input {\n\t\t\t@mixin todo-list-checkbox;\n\t\t}\n\n\t\t& .todo-list__label__description {\n\t\t\tvertical-align: middle;\n\t\t}\n\n\t\t&.todo-list__label_without-description input[type=checkbox] {\n\t\t\tposition: absolute;\n\t\t}\n\t}\n}\n\n/*\n * To-do list editing view styles.\n */\n.ck-editor__editable.ck-content .todo-list .todo-list__label {\n\t/*\n\t * To-do list should be interactive only during the editing\n\t * (https://github.com/ckeditor/ckeditor5/issues/2090).\n\t */\n\t& > input,\n\t& > span[contenteditable=false] > input {\n\t\tcursor: pointer;\n\n\t\t&:hover::before {\n\t\t\tbox-shadow: 0 0 0 5px hsla(0, 0%, 0%, 0.1);\n\t\t}\n\t}\n\n\t/*\n\t * Document Lists - editing view has an additional span around checkbox.\n\t */\n\t& > span[contenteditable=false] > input {\n\t\t@mixin todo-list-checkbox;\n\t}\n\n\t&.todo-list__label_without-description {\n\t\t& input[type=checkbox] {\n\t\t\tposition: absolute;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},1478:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,":root{--ck-color-mention-background:rgba(153,0,48,.1);--ck-color-mention-text:#990030}.ck-content .mention{background:var(--ck-color-mention-background);color:var(--ck-color-mention-text)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-mention/mention.css"],names:[],mappings:"AAKA,MACC,+CAAwD,CACxD,+BACD,CAEA,qBACC,6CAA8C,CAC9C,kCACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-mention-background: hsla(341, 100%, 30%, 0.1);\n\t--ck-color-mention-text: hsl(341, 100%, 30%);\n}\n\n.ck-content .mention {\n\tbackground: var(--ck-color-mention-background);\n\tcolor: var(--ck-color-mention-text);\n}\n"],sourceRoot:""}]);const a=s},7216:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,":root{--ck-mention-list-max-height:300px}.ck.ck-mentions{max-height:var(--ck-mention-list-max-height);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}.ck.ck-mentions>.ck-list__item{flex-shrink:0;overflow:hidden}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-mention/theme/mentionui.css"],names:[],mappings:"AAKA,MACC,kCACD,CAEA,gBACC,4CAA6C,CAM7C,iBAAkB,CAJlB,eAAgB,CAMhB,2BAQD,CAJC,+BAEC,aAAc,CADd,eAED",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-mention-list-max-height: 300px;\n}\n\n.ck.ck-mentions {\n\tmax-height: var(--ck-mention-list-max-height);\n\n\toverflow-y: auto;\n\n\t/* Prevent unnecessary horizontal scrollbar in Safari\n\thttps://github.com/ckeditor/ckeditor5-mention/issues/41 */\n\toverflow-x: hidden;\n\n\toverscroll-behavior: contain;\n\n\t/* Prevent unnecessary vertical scrollbar in Safari\n\thttps://github.com/ckeditor/ckeditor5-mention/issues/41 */\n\t& > .ck-list__item {\n\t\toverflow: hidden;\n\t\tflex-shrink: 0;\n\t}\n}\n"],sourceRoot:""}]);const a=s},4307:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-input-color{display:flex;flex-direction:row-reverse;width:100%}.ck.ck-input-color>input.ck.ck-input-text{flex-grow:1;min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown{min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown>.ck-input-color__button .ck-dropdown__arrow{display:none}.ck.ck-input-color .ck.ck-input-color__button{display:flex}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview{overflow:hidden;position:relative}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{display:block;position:absolute}[dir=ltr] .ck.ck-input-color>.ck.ck-input-text{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-input-text{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-input-color>.ck.ck-input-text:focus{z-index:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{padding:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-left-radius:0;border-top-left-radius:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-left:1px solid transparent}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-right:1px solid transparent}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button.ck-disabled{background:var(--ck-color-input-disabled-background)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border-radius:0}.ck-rounded-corners .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview,.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border:1px solid var(--ck-color-input-border);height:20px;width:20px}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{background:red;border-radius:2px;height:150%;left:50%;top:-30%;transform:rotate(45deg);transform-origin:50%;width:8%}.ck.ck-input-color .ck.ck-input-color__remove-color{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);width:100%}.ck.ck-input-color .ck.ck-input-color__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-input-border)}[dir=ltr] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-right-radius:0}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-left-radius:0}.ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard);margin-right:0}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-table/theme/colorinput.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/colorinput.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,mBAEC,YAAa,CACb,0BAA2B,CAF3B,UAgCD,CA5BC,0CAEC,WAAY,CADZ,cAED,CAEA,sCACC,cAMD,CAHC,kFACC,YACD,CAGD,8CAEC,YAWD,CATC,kFAEC,eAAgB,CADhB,iBAOD,CAJC,0IAEC,aAAc,CADd,iBAED,CC1BF,+CAGE,4BAA6B,CAD7B,yBAcF,CAhBA,+CAQE,2BAA4B,CAD5B,wBASF,CAHC,2CACC,SACD,CAIA,wEACC,SA0CD,CA3CA,kFAKE,2BAA4B,CAD5B,wBAuCF,CApCE,8FACC,iCACD,CATF,kFAcE,4BAA6B,CAD7B,yBA8BF,CA3BE,8FACC,kCACD,CAGD,oFACC,oDACD,CAEA,4GC1CF,eD2DE,CAjBA,+PCtCD,qCDuDC,CAjBA,4GAKC,6CAA8C,CAD9C,WAAY,CADZ,UAcD,CAVC,oKAKC,cAA6B,CAC7B,iBAAkB,CAHlB,WAAY,CADZ,QAAS,CADT,QAAS,CAMT,uBAAwB,CACxB,oBAAqB,CAJrB,QAKD,CAKH,oDAIC,2BAA4B,CAC5B,4BAA6B,CAH7B,qEAAwE,CADxE,UA0BD,CApBC,gEACC,oDACD,CATD,8DAYE,yBAeF,CA3BA,8DAgBE,wBAWF,CARC,gEACC,uCAMD,CAPA,0EAKE,sCAAuC,CADvC,cAGF",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-input-color {\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: row-reverse;\n\n\t& > input.ck.ck-input-text {\n\t\tmin-width: auto;\n\t\tflex-grow: 1;\n\t}\n\n\t& > div.ck.ck-dropdown {\n\t\tmin-width: auto;\n\n\t\t/* This dropdown has no arrow but a color preview instead. */\n\t\t& > .ck-input-color__button .ck-dropdown__arrow {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t& .ck.ck-input-color__button {\n\t\t/* Resolving issue with misaligned buttons on Safari (see #10589) */\n\t\tdisplay: flex;\n\n\t\t& .ck.ck-input-color__button__preview {\n\t\t\tposition: relative;\n\t\t\toverflow: hidden;\n\n\t\t\t& > .ck.ck-input-color__button__preview__no-color-indicator {\n\t\t\t\tposition: absolute;\n\t\t\t\tdisplay: block;\n\t\t\t}\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n@import "../mixins/_rounded.css";\n\n.ck.ck-input-color {\n\t& > .ck.ck-input-text {\n\t\t@mixin ck-dir ltr {\n\t\t\tborder-top-right-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-bottom-left-radius: 0;\n\t\t}\n\n\t\t/* Make sure the focused input is always on top of the dropdown button so its\n\t\t outline and border are never cropped (also when the input is read-only). */\n\t\t&:focus {\n\t\t\tz-index: 0;\n\t\t}\n\t}\n\n\t& > .ck.ck-dropdown {\n\t\t& > .ck.ck-button.ck-input-color__button {\n\t\t\tpadding: 0;\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t\tborder-bottom-left-radius: 0;\n\n\t\t\t\t&:not(:focus) {\n\t\t\t\t\tborder-left: 1px solid transparent;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tborder-top-right-radius: 0;\n\t\t\t\tborder-bottom-right-radius: 0;\n\n\t\t\t\t&:not(:focus) {\n\t\t\t\t\tborder-right: 1px solid transparent;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&.ck-disabled {\n\t\t\t\tbackground: var(--ck-color-input-disabled-background);\n\t\t\t}\n\n\t\t\t& > .ck.ck-input-color__button__preview {\n\t\t\t\t@mixin ck-rounded-corners;\n\n\t\t\t\twidth: 20px;\n\t\t\t\theight: 20px;\n\t\t\t\tborder: 1px solid var(--ck-color-input-border);\n\n\t\t\t\t& > .ck.ck-input-color__button__preview__no-color-indicator {\n\t\t\t\t\ttop: -30%;\n\t\t\t\t\tleft: 50%;\n\t\t\t\t\theight: 150%;\n\t\t\t\t\twidth: 8%;\n\t\t\t\t\tbackground: hsl(0, 100%, 50%);\n\t\t\t\t\tborder-radius: 2px;\n\t\t\t\t\ttransform: rotate(45deg);\n\t\t\t\t\ttransform-origin: 50%;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-input-color__remove-color {\n\t\twidth: 100%;\n\t\tpadding: calc(var(--ck-spacing-standard) / 2) var(--ck-spacing-standard);\n\n\t\tborder-bottom-left-radius: 0;\n\t\tborder-bottom-right-radius: 0;\n\n\t\t&:not(:focus) {\n\t\t\tborder-bottom: 1px solid var(--ck-color-input-border);\n\t\t}\n\n\t\t@mixin ck-dir ltr {\n\t\t\tborder-top-right-radius: 0;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tborder-top-left-radius: 0;\n\t\t}\n\n\t\t& .ck.ck-icon {\n\t\t\tmargin-right: var(--ck-spacing-standard);\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-right: 0;\n\t\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},1806:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-form{padding:0 0 var(--ck-spacing-large)}.ck.ck-form:focus{outline:none}.ck.ck-form .ck.ck-input-text{min-width:100%;width:0}.ck.ck-form .ck.ck-dropdown{min-width:100%}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label{width:100%}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/form.css"],names:[],mappings:"AAKA,YACC,mCAyBD,CAvBC,kBAEC,YACD,CAEA,8BACC,cAAe,CACf,OACD,CAEA,4BACC,cAWD,CARE,6DACC,4CACD,CAEA,mEACC,UACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-form {\n\tpadding: 0 0 var(--ck-spacing-large);\n\n\t&:focus {\n\t\t/* See: https://github.com/ckeditor/ckeditor5/issues/4773 */\n\t\toutline: none;\n\t}\n\n\t& .ck.ck-input-text {\n\t\tmin-width: 100%;\n\t\twidth: 0;\n\t}\n\n\t& .ck.ck-dropdown {\n\t\tmin-width: 100%;\n\n\t\t& .ck-dropdown__button {\n\t\t\t&:not(:focus) {\n\t\t\t\tborder: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\n\t\t\t& .ck-button__label {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},6016:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-table-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-table-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row{padding:var(--ck-spacing-standard) var(--ck-spacing-large) 0}[dir=ltr] .ck.ck-form__row>:not(.ck-label)+*{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-form__row>:not(.ck-label)+*{margin-right:var(--ck-spacing-large)}.ck.ck-form__row>.ck-label{min-width:100%;width:100%}.ck.ck-form__row.ck-table-form__action-row{margin-top:var(--ck-spacing-large)}.ck.ck-form__row.ck-table-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-table/theme/formrow.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/formrow.css"],names:[],mappings:"AAKA,iBACC,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CACjB,6BAaD,CAVC,iCACC,WACD,CAGC,wHAEC,sBACD,CCbF,iBACC,4DA2BD,CAvBE,6CAEE,mCAMF,CARA,6CAME,oCAEF,CAGD,2BAEC,cAAe,CADf,UAED,CAEA,2CACC,kCAKD,CAHC,wEACC,0BACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-form__row {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\tjustify-content: space-between;\n\n\t/* Ignore labels that work as fieldset legends */\n\t& > *:not(.ck-label) {\n\t\tflex-grow: 1;\n\t}\n\n\t&.ck-table-form__action-row {\n\t\t& .ck-button-save,\n\t\t& .ck-button-cancel {\n\t\t\tjustify-content: center;\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-form__row {\n\tpadding: var(--ck-spacing-standard) var(--ck-spacing-large) 0;\n\n\t/* Ignore labels that work as fieldset legends */\n\t& > *:not(.ck-label) {\n\t\t& + * {\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: var(--ck-spacing-large);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-right: var(--ck-spacing-large);\n\t\t\t}\n\t\t}\n\t}\n\n\t& > .ck-label {\n\t\twidth: 100%;\n\t\tmin-width: 100%;\n\t}\n\n\t&.ck-table-form__action-row {\n\t\tmargin-top: var(--ck-spacing-large);\n\n\t\t& .ck-button .ck-button__label {\n\t\t\tcolor: var(--ck-color-text);\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},8603:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}:root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px}.ck .ck-insert-table-dropdown__grid{padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2)}.ck .ck-insert-table-dropdown__label,.ck[dir=rtl] .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{border:1px solid var(--ck-color-base-border);border-radius:1px;margin:var(--ck-insert-table-dropdown-box-margin);min-height:var(--ck-insert-table-dropdown-box-height);min-width:var(--ck-insert-table-dropdown-box-width);outline:none;transition:none}@media (prefers-reduced-motion:reduce){.ck .ck-insert-table-dropdown-grid-box{transition:none}}.ck .ck-insert-table-dropdown-grid-box:focus{box-shadow:none}.ck .ck-insert-table-dropdown-grid-box.ck-on{background:var(--ck-color-focus-outer-shadow);border-color:var(--ck-color-focus-border)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-table/theme/inserttable.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/inserttable.css"],names:[],mappings:"AAKA,oCACC,YAAa,CACb,kBAAmB,CACnB,cACD,CCJA,MACC,uCAAwC,CACxC,0CAA2C,CAC3C,yCAA0C,CAC1C,yCACD,CAEA,oCAGC,yFAA0F,CAD1F,oJAED,CAEA,mFAEC,iBACD,CAEA,uCAIC,4CAA6C,CAC7C,iBAAkB,CAFlB,iDAAkD,CADlD,qDAAsD,CADtD,mDAAoD,CAKpD,YAAa,CACb,eAcD,CAZC,uCATD,uCAUE,eAWF,CAVC,CAEA,6CACC,eACD,CAEA,6CAEC,6CAA8C,CAD9C,yCAED",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-insert-table-dropdown__grid {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: wrap;\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-insert-table-dropdown-padding: 10px;\n\t--ck-insert-table-dropdown-box-height: 11px;\n\t--ck-insert-table-dropdown-box-width: 12px;\n\t--ck-insert-table-dropdown-box-margin: 1px;\n}\n\n.ck .ck-insert-table-dropdown__grid {\n\t/* The width of a container should match 10 items in a row so there will be a 10x10 grid. */\n\twidth: calc(var(--ck-insert-table-dropdown-box-width) * 10 + var(--ck-insert-table-dropdown-box-margin) * 20 + var(--ck-insert-table-dropdown-padding) * 2);\n\tpadding: var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;\n}\n\n.ck .ck-insert-table-dropdown__label,\n.ck[dir=rtl] .ck-insert-table-dropdown__label {\n\ttext-align: center;\n}\n\n.ck .ck-insert-table-dropdown-grid-box {\n\tmin-width: var(--ck-insert-table-dropdown-box-width);\n\tmin-height: var(--ck-insert-table-dropdown-box-height);\n\tmargin: var(--ck-insert-table-dropdown-box-margin);\n\tborder: 1px solid var(--ck-color-base-border);\n\tborder-radius: 1px;\n\toutline: none;\n\ttransition: none;\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\ttransition: none;\n\t}\n\n\t&:focus {\n\t\tbox-shadow: none;\n\t}\n\n\t&.ck-on {\n\t\tborder-color: var(--ck-color-focus-border);\n\t\tbackground: var(--ck-color-focus-outer-shadow);\n\t}\n}\n\n"],sourceRoot:""}]);const a=s},9969:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck-content .table{display:table;margin:.9em auto}.ck-content .table table{border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0;height:100%;width:100%}.ck-content .table table td,.ck-content .table table th{border:1px solid #bfbfbf;min-width:2em;padding:.4em}.ck-content .table table th{background:rgba(0,0,0,.05);font-weight:700}.ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}.ck-editor__editable .ck-table-bogus-paragraph{display:inline-block;width:100%}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-table/theme/table.css"],names:[],mappings:"AAKA,mBAKC,aAAc,CADd,gBAiCD,CA9BC,yBAYC,yBAAkC,CAVlC,wBAAyB,CACzB,gBAAiB,CAKjB,WAAY,CADZ,UAsBD,CAfC,wDAQC,wBAAiC,CANjC,aAAc,CACd,YAMD,CAEA,4BAEC,0BAA+B,CAD/B,eAED,CAMF,+BACC,gBACD,CAEA,+BACC,eACD,CAEA,+CAKC,oBAAqB,CAMrB,UACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content .table {\n\t/* Give the table widget some air and center it horizontally */\n\t/* The first value should be equal to --ck-spacing-large variable if used in the editor context\n\tto avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n\tmargin: 0.9em auto;\n\tdisplay: table;\n\n\t& table {\n\t\t/* The table cells should have slight borders */\n\t\tborder-collapse: collapse;\n\t\tborder-spacing: 0;\n\n\t\t/* Table width and height are set on the parent . Make sure the table inside stretches\n\t\tto the full dimensions of the container (https://github.com/ckeditor/ckeditor5/issues/6186). */\n\t\twidth: 100%;\n\t\theight: 100%;\n\n\t\t/* The outer border of the table should be slightly darker than the inner lines.\n\t\tAlso see https://github.com/ckeditor/ckeditor5-table/issues/50. */\n\t\tborder: 1px double hsl(0, 0%, 70%);\n\n\t\t& td,\n\t\t& th {\n\t\t\tmin-width: 2em;\n\t\t\tpadding: .4em;\n\n\t\t\t/* The border is inherited from .ck-editor__nested-editable styles, so theoretically it\'s not necessary here.\n\t\t\tHowever, the border is a content style, so it should use .ck-content (so it works outside the editor).\n\t\t\tHence, the duplication. See https://github.com/ckeditor/ckeditor5/issues/6314 */\n\t\t\tborder: 1px solid hsl(0, 0%, 75%);\n\t\t}\n\n\t\t& th {\n\t\t\tfont-weight: bold;\n\t\t\tbackground: hsla(0, 0%, 0%, 5%);\n\t\t}\n\t}\n}\n\n/* Text alignment of the table header should match the editor settings and override the native browser styling,\nwhen content is available outside the editor. See https://github.com/ckeditor/ckeditor5/issues/6638 */\n.ck-content[dir="rtl"] .table th {\n\ttext-align: right;\n}\n\n.ck-content[dir="ltr"] .table th {\n\ttext-align: left;\n}\n\n.ck-editor__editable .ck-table-bogus-paragraph {\n\t/*\n\t * Use display:inline-block to force Chrome/Safari to limit text mutations to this element.\n\t * See https://github.com/ckeditor/ckeditor5/issues/6062.\n\t */\n\tdisplay: inline-block;\n\n\t/*\n\t * Inline HTML elements nested in the span should always be dimensioned in relation to the whole cell width.\n\t * See https://github.com/ckeditor/ckeditor5/issues/9117.\n\t */\n\twidth: 100%;\n}\n'],sourceRoot:""}]);const a=s},7406:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,":root{--ck-color-selector-caption-background:#f7f7f7;--ck-color-selector-caption-text:#333;--ck-color-selector-caption-highlighted-background:#fd0}.ck-content .table>figcaption{background-color:var(--ck-color-selector-caption-background);caption-side:top;color:var(--ck-color-selector-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;text-align:center;word-break:break-word}@media (forced-colors:active){.ck-content .table>figcaption{background-color:unset;color:unset}}@media (forced-colors:none){.ck.ck-editor__editable .table>figcaption.table__caption_highlighted{animation:ck-table-caption-highlight .6s ease-out}}.ck.ck-editor__editable .table>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}@keyframes ck-table-caption-highlight{0%{background-color:var(--ck-color-selector-caption-highlighted-background)}to{background-color:var(--ck-color-selector-caption-background)}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-table/theme/tablecaption.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css"],names:[],mappings:"AAOA,MACC,8CAAuD,CACvD,qCAAiD,CACjD,uDACD,CAGA,8BAMC,4DAA6D,CAJ7D,gBAAiB,CAGjB,2CAA4C,CAJ5C,qBAAsB,CAOtB,eAAgB,CAChB,mBAAoB,CAFpB,YAAa,CAHb,iBAAkB,CADlB,qBAaD,CCxBC,8BACC,8BDoBA,sBAAuB,CACvB,WCnBA,CACD,CAIA,4BDqBC,qEACC,iDACD,CCnBD,CDsBA,gEASC,eAAgB,CARhB,oBAAqB,CACrB,qBAAsB,CAQtB,sBAAuB,CAFvB,kBAGD,CAGD,sCACC,GACC,wEACD,CAEA,GACC,4DACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css";\n\n:root {\n\t--ck-color-selector-caption-background: hsl(0, 0%, 97%);\n\t--ck-color-selector-caption-text: hsl(0, 0%, 20%);\n\t--ck-color-selector-caption-highlighted-background: hsl(52deg 100% 50%);\n}\n\n/* Content styles */\n.ck-content .table > figcaption {\n\tdisplay: table-caption;\n\tcaption-side: top;\n\tword-break: break-word;\n\ttext-align: center;\n\tcolor: var(--ck-color-selector-caption-text);\n\tbackground-color: var(--ck-color-selector-caption-background);\n\tpadding: .6em;\n\tfont-size: .75em;\n\toutline-offset: -1px;\n\n\t/* Improve placeholder rendering in high-constrast mode (https://github.com/ckeditor/ckeditor5/issues/14907). */\n\t@mixin ck-media-forced-colors {\n\t\tbackground-color: unset;\n\t\tcolor: unset;\n\t}\n}\n\n/* Editing styles */\n.ck.ck-editor__editable .table > figcaption {\n\t@mixin ck-media-default-colors {\n\t\t&.table__caption_highlighted {\n\t\t\tanimation: ck-table-caption-highlight .6s ease-out;\n\t\t}\n\t}\n\n\t&.ck-placeholder::before {\n\t\tpadding-left: inherit;\n\t\tpadding-right: inherit;\n\n\t\t/*\n\t\t * Make sure the table caption placeholder doesn\'t overflow the placeholder area.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9162.\n\t\t */\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n}\n\n@keyframes ck-table-caption-highlight {\n\t0% {\n\t\tbackground-color: var(--ck-color-selector-caption-highlighted-background);\n\t}\n\n\t100% {\n\t\tbackground-color: var(--ck-color-selector-caption-background);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-forced-colors {\n\t@media (forced-colors: active) {\n\t\t& {\n\t\t\t@mixin-content;\n\t\t}\n\t}\n}\n\n@define-mixin ck-media-default-colors {\n\t@media (forced-colors: none) {\n\t\t& {\n\t\t\t@mixin-content;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},6701:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row{flex-wrap:wrap}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:first-of-type{flex-grow:0.57}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:last-of-type{flex-grow:0.43}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar .ck-button{flex-grow:1}.ck.ck-table-cell-properties-form{width:320px}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__padding-row{align-self:flex-end;padding:0;width:25%}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-table/theme/tablecellproperties.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/tablecellproperties.css"],names:[],mappings:"AAOE,6FACC,cAiBD,CAdE,0HAEC,cACD,CAEA,yHAEC,cACD,CAEA,uHACC,WACD,CClBJ,kCACC,WAkBD,CAfE,2FACC,mBAAoB,CACpB,SAAU,CACV,SACD,CAGC,4GACC,eAAgB,CAGhB,qCACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-cell-properties-form {\n\t& .ck-form__row {\n\t\t&.ck-table-cell-properties-form__alignment-row {\n\t\t\tflex-wrap: wrap;\n\n\t\t\t& .ck.ck-toolbar {\n\t\t\t\t&:first-of-type {\n\t\t\t\t\t/* 4 buttons out of 7 (h-alignment + v-alignment) = 0.57 */\n\t\t\t\t\tflex-grow: 0.57;\n\t\t\t\t}\n\n\t\t\t\t&:last-of-type {\n\t\t\t\t\t/* 3 buttons out of 7 (h-alignment + v-alignment) = 0.43 */\n\t\t\t\t\tflex-grow: 0.43;\n\t\t\t\t}\n\n\t\t\t\t& .ck-button {\n\t\t\t\t\tflex-grow: 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-cell-properties-form {\n\twidth: 320px;\n\n\t& .ck-form__row {\n\t\t&.ck-table-cell-properties-form__padding-row {\n\t\t\talign-self: flex-end;\n\t\t\tpadding: 0;\n\t\t\twidth: 25%;\n\t\t}\n\n\t\t&.ck-table-cell-properties-form__alignment-row {\n\t\t\t& .ck.ck-toolbar {\n\t\t\t\tbackground: none;\n\n\t\t\t\t/* Compensate for missing input label that would push the margin (toolbar has no inputs). */\n\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},4204:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,":root{--ck-color-selector-column-resizer-hover:var(--ck-color-base-active);--ck-table-column-resizer-width:7px;--ck-table-column-resizer-position-offset:calc(var(--ck-table-column-resizer-width)*-0.5 - 0.5px)}.ck-content .table .ck-table-resized{table-layout:fixed}.ck-content .table table{overflow:hidden}.ck-content .table td,.ck-content .table th{overflow-wrap:break-word;position:relative}.ck.ck-editor__editable .table .ck-table-column-resizer{bottom:0;cursor:col-resize;position:absolute;right:var(--ck-table-column-resizer-position-offset);top:0;user-select:none;width:var(--ck-table-column-resizer-width);z-index:var(--ck-z-default)}.ck.ck-editor__editable .table[draggable] .ck-table-column-resizer,.ck.ck-editor__editable.ck-column-resize_disabled .table .ck-table-column-resizer{display:none}.ck.ck-editor__editable .table .ck-table-column-resizer:hover,.ck.ck-editor__editable .table .ck-table-column-resizer__active{background-color:var(--ck-color-selector-column-resizer-hover);bottom:-999999px;opacity:.25;top:-999999px}.ck.ck-editor__editable[dir=rtl] .table .ck-table-column-resizer{left:var(--ck-table-column-resizer-position-offset);right:unset}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-table/theme/tablecolumnresize.css"],names:[],mappings:"AAKA,MACC,oEAAqE,CACrE,mCAAoC,CAIpC,iGACD,CAEA,qCACC,kBACD,CAEA,yBACC,eACD,CAEA,4CAIC,wBAAyB,CACzB,iBACD,CAEA,wDAGC,QAAS,CAGT,iBAAkB,CALlB,iBAAkB,CAGlB,oDAAqD,CAFrD,KAAM,CAKN,gBAAiB,CAFjB,0CAA2C,CAG3C,2BACD,CAQA,qJACC,YACD,CAEA,8HAEC,8DAA+D,CAO/D,gBAAiB,CANjB,WAAa,CAKb,aAED,CAEA,iEACC,mDAAoD,CACpD,WACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-selector-column-resizer-hover: var(--ck-color-base-active);\n\t--ck-table-column-resizer-width: 7px;\n\n\t/* The offset used for absolute positioning of the resizer element, so that it is placed exactly above the cell border.\n\t The value is: minus half the width of the resizer decreased additionaly by the half the width of the border (0.5px). */\n\t--ck-table-column-resizer-position-offset: calc(var(--ck-table-column-resizer-width) * -0.5 - 0.5px);\n}\n\n.ck-content .table .ck-table-resized {\n\ttable-layout: fixed;\n}\n\n.ck-content .table table {\n\toverflow: hidden;\n}\n\n.ck-content .table td,\n.ck-content .table th {\n\t/* To prevent text overflowing beyond its cell when columns are resized by resize handler\n\t(https://github.com/ckeditor/ckeditor5/pull/14379#issuecomment-1589460978). */\n\toverflow-wrap: break-word;\n\tposition: relative;\n}\n\n.ck.ck-editor__editable .table .ck-table-column-resizer {\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\tright: var(--ck-table-column-resizer-position-offset);\n\twidth: var(--ck-table-column-resizer-width);\n\tcursor: col-resize;\n\tuser-select: none;\n\tz-index: var(--ck-z-default);\n}\n\n.ck.ck-editor__editable.ck-column-resize_disabled .table .ck-table-column-resizer {\n\tdisplay: none;\n}\n\n/* The resizer elements, which are extended to an extremely high height, break the drag & drop feature in Chrome. To make it work again,\n all resizers must be hidden while the table is dragged. */\n.ck.ck-editor__editable .table[draggable] .ck-table-column-resizer {\n\tdisplay: none;\n}\n\n.ck.ck-editor__editable .table .ck-table-column-resizer:hover,\n.ck.ck-editor__editable .table .ck-table-column-resizer__active {\n\tbackground-color: var(--ck-color-selector-column-resizer-hover);\n\topacity: 0.25;\n\t/* The resizer element resides in each cell so to occupy the entire height of the table, which is unknown from a CSS point of view,\n\t it is extended to an extremely high height. Even for screens with a very high pixel density, the resizer will fulfill its role as\n\t it should, i.e. for a screen of 476 ppi the total height of the resizer will take over 350 sheets of A4 format, which is totally\n\t unrealistic height for a single table. */\n\ttop: -999999px;\n\tbottom: -999999px;\n}\n\n.ck.ck-editor__editable[dir=rtl] .table .ck-table-column-resizer {\n\tleft: var(--ck-table-column-resizer-position-offset);\n\tright: unset;\n}\n"],sourceRoot:""}]);const a=s},8864:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,":root{--ck-color-selector-focused-cell-background:rgba(158,201,250,.3)}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table td.ck-editor__nested-editable:focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable:focus{background:var(--ck-color-selector-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/tableediting.css"],names:[],mappings:"AAKA,MACC,gEACD,CAKE,8QAGC,2DAA4D,CAK5D,iBAAkB,CAClB,8CAA+C,CAC/C,mBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-selector-focused-cell-background: hsla(212, 90%, 80%, .3);\n}\n\n.ck-widget.table {\n\t& td,\n\t& th {\n\t\t&.ck-editor__nested-editable.ck-editor__nested-editable_focused,\n\t\t&.ck-editor__nested-editable:focus {\n\t\t\t/* A very slight background to highlight the focused cell */\n\t\t\tbackground: var(--ck-color-selector-focused-cell-background);\n\n\t\t\t/* Fixes the problem where surrounding cells cover the focused cell's border.\n\t\t\tIt does not fix the problem in all places but the UX is improved.\n\t\t\tSee https://github.com/ckeditor/ckeditor5-table/issues/29. */\n\t\t\tborder-style: none;\n\t\t\toutline: 1px solid var(--ck-color-focus-border);\n\t\t\toutline-offset: -1px; /* progressive enhancement - no IE support */\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},5704:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,'.ck.ck-table-form .ck-form__row.ck-table-form__background-row,.ck.ck-table-form .ck-form__row.ck-table-form__border-row{flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{align-items:center;flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view{align-items:center;display:flex;flex-direction:column-reverse}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{flex-grow:0}.ck.ck-table-form .ck.ck-labeled-field-view{position:relative}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{bottom:calc(var(--ck-table-properties-error-arrow-size)*-1);left:50%;position:absolute;transform:translate(-50%,100%);z-index:1}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{content:"";left:50%;position:absolute;top:calc(var(--ck-table-properties-error-arrow-size)*-1);transform:translateX(-50%)}:root{--ck-table-properties-error-arrow-size:6px;--ck-table-properties-min-error-width:150px}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-field-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-style,.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{max-width:80px;min-width:80px;width:80px}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{padding:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:flex-end;display:inline-block;height:var(--ck-ui-component-min-height);line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small)}.ck.ck-table-form .ck.ck-labeled-field-view{padding-top:var(--ck-spacing-standard)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{border-radius:0}.ck-rounded-corners .ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status,.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{background:var(--ck-color-base-error);color:var(--ck-color-base-background);min-width:var(--ck-table-properties-min-error-width);padding:var(--ck-spacing-small) var(--ck-spacing-medium);text-align:center}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{border-color:transparent transparent var(--ck-color-base-error) transparent;border-style:solid;border-width:0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:ck-table-form-labeled-view-status-appear .15s ease both}@media (prefers-reduced-motion:reduce){.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:none}}.ck.ck-table-form .ck.ck-labeled-field-view .ck-input.ck-error:not(:focus)+.ck.ck-labeled-field-view__status{display:none}@keyframes ck-table-form-labeled-view-status-appear{0%{opacity:0}to{opacity:1}}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-table/theme/tableform.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/tableform.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAWE,wHACC,cACD,CAEA,8DAEC,kBAAmB,CADnB,cAgBD,CAbC,qFAGC,kBAAmB,CAFnB,YAAa,CACb,6BAMD,CAEA,sMACC,WACD,CAIF,4CAEC,iBAoBD,CAlBC,8EAGC,2DAAgE,CADhE,QAAS,CADT,iBAAkB,CAGlB,8BAA+B,CAG/B,SAUD,CAPC,oFACC,UAAW,CAGX,QAAS,CAFT,iBAAkB,CAClB,wDAA6D,CAE7D,0BACD,CChDH,MACC,0CAA2C,CAC3C,2CACD,CAMI,2FACC,kCAAmC,CACnC,iBACD,CAGD,8KAIC,cAAe,CADf,cAAe,CADf,UAGD,CAGD,8DACC,SAcD,CAZC,yMAEC,QACD,CAEA,iGACC,mBAAoB,CACpB,oBAAqB,CACrB,wCAAyC,CACzC,6CAA8C,CAC9C,gCACD,CAIF,4CACC,sCA6BD,CA3BC,8ECxCD,eD6DC,CArBA,mMCpCA,qCDyDA,CArBA,8EAGC,qCAAsC,CACtC,qCAAsC,CAEtC,oDAAqD,CADrD,wDAAyD,CAEzD,iBAcD,CAXC,oFACC,2EAA4E,CAE5E,kBAAmB,CADnB,kJAED,CAdD,8EAgBC,iEAKD,CAHC,uCAlBD,8EAmBE,cAEF,CADC,CAID,6GACC,YACD,CAIF,oDACC,GACC,SACD,CAEA,GACC,SACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-form {\n\t& .ck-form__row {\n\t\t&.ck-table-form__border-row {\n\t\t\tflex-wrap: wrap;\n\t\t}\n\n\t\t&.ck-table-form__background-row {\n\t\t\tflex-wrap: wrap;\n\t\t}\n\n\t\t&.ck-table-form__dimensions-row {\n\t\t\tflex-wrap: wrap;\n\t\t\talign-items: center;\n\n\t\t\t& .ck-labeled-field-view {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column-reverse;\n\t\t\t\talign-items: center;\n\n\t\t\t\t& .ck.ck-dropdown {\n\t\t\t\t\tflex-grow: 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t& .ck-table-form__dimension-operator {\n\t\t\t\tflex-grow: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-labeled-field-view {\n\t\t/* Allow absolute positioning of the status (error) balloons. */\n\t\tposition: relative;\n\n\t\t& .ck.ck-labeled-field-view__status {\n\t\t\tposition: absolute;\n\t\t\tleft: 50%;\n\t\t\tbottom: calc( -1 * var(--ck-table-properties-error-arrow-size) );\n\t\t\ttransform: translate(-50%,100%);\n\n\t\t\t/* Make sure the balloon status stays on top of other form elements. */\n\t\t\tz-index: 1;\n\n\t\t\t/* The arrow pointing towards the field. */\n\t\t\t&::after {\n\t\t\t\tcontent: "";\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: calc( -1 * var(--ck-table-properties-error-arrow-size) );\n\t\t\t\tleft: 50%;\n\t\t\t\ttransform: translateX( -50% );\n\t\t\t}\n\t\t}\n\t}\n}\n','/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../mixins/_rounded.css";\n\n:root {\n\t--ck-table-properties-error-arrow-size: 6px;\n\t--ck-table-properties-min-error-width: 150px;\n}\n\n.ck.ck-table-form {\n\t& .ck-form__row {\n\t\t&.ck-table-form__border-row {\n\t\t\t& .ck-labeled-field-view {\n\t\t\t\t& > .ck-label {\n\t\t\t\t\tfont-size: var(--ck-font-size-tiny);\n\t\t\t\t\ttext-align: center;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t& .ck-table-form__border-style,\n\t\t\t& .ck-table-form__border-width {\n\t\t\t\twidth: 80px;\n\t\t\t\tmin-width: 80px;\n\t\t\t\tmax-width: 80px;\n\t\t\t}\n\t\t}\n\n\t\t&.ck-table-form__dimensions-row {\n\t\t\tpadding: 0;\n\n\t\t\t& .ck-table-form__dimensions-row__width,\n\t\t\t& .ck-table-form__dimensions-row__height {\n\t\t\t\tmargin: 0\n\t\t\t}\n\n\t\t\t& .ck-table-form__dimension-operator {\n\t\t\t\talign-self: flex-end;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\theight: var(--ck-ui-component-min-height);\n\t\t\t\tline-height: var(--ck-ui-component-min-height);\n\t\t\t\tmargin: 0 var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\t}\n\n\t& .ck.ck-labeled-field-view {\n\t\tpadding-top: var(--ck-spacing-standard);\n\n\t\t& .ck.ck-labeled-field-view__status {\n\t\t\t@mixin ck-rounded-corners;\n\n\t\t\tbackground: var(--ck-color-base-error);\n\t\t\tcolor: var(--ck-color-base-background);\n\t\t\tpadding: var(--ck-spacing-small) var(--ck-spacing-medium);\n\t\t\tmin-width: var(--ck-table-properties-min-error-width);\n\t\t\ttext-align: center;\n\n\t\t\t/* The arrow pointing towards the field. */\n\t\t\t&::after {\n\t\t\t\tborder-color: transparent transparent var(--ck-color-base-error) transparent;\n\t\t\t\tborder-width: 0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size);\n\t\t\t\tborder-style: solid;\n\t\t\t}\n\n\t\t\tanimation: ck-table-form-labeled-view-status-appear .15s ease both;\n\n\t\t\t@media (prefers-reduced-motion: reduce) {\n\t\t\t\tanimation: none;\n\t\t\t}\n\t\t}\n\n\t\t/* Hide the error balloon when the field is blurred. Makes the experience much more clear. */\n\t\t& .ck-input.ck-error:not(:focus) + .ck.ck-labeled-field-view__status {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n@keyframes ck-table-form-labeled-view-status-appear {\n\t0% {\n\t\topacity: 0;\n\t}\n\n\t100% {\n\t\topacity: 1;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},4001:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-content:baseline;flex-basis:0;flex-wrap:wrap}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items{flex-wrap:nowrap}.ck.ck-table-properties-form{width:320px}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-self:flex-end;padding:0}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items>*{width:40px}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-table/theme/tableproperties.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/tableproperties.css"],names:[],mappings:"AAOE,mFAGC,sBAAuB,CADvB,YAAa,CADb,cAOD,CAHC,qHACC,gBACD,CCTH,6BACC,WAmBD,CAhBE,mFACC,mBAAoB,CACpB,SAYD,CAVC,kGACC,eAAgB,CAGhB,qCAKD,CAHC,uHACC,UACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-properties-form {\n\t& .ck-form__row {\n\t\t&.ck-table-properties-form__alignment-row {\n\t\t\tflex-wrap: wrap;\n\t\t\tflex-basis: 0;\n\t\t\talign-content: baseline;\n\n\t\t\t& .ck.ck-toolbar .ck-toolbar__items {\n\t\t\t\tflex-wrap: nowrap;\n\t\t\t}\n\t\t}\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-table-properties-form {\n\twidth: 320px;\n\n\t& .ck-form__row {\n\t\t&.ck-table-properties-form__alignment-row {\n\t\t\talign-self: flex-end;\n\t\t\tpadding: 0;\n\n\t\t\t& .ck.ck-toolbar {\n\t\t\t\tbackground: none;\n\n\t\t\t\t/* Compensate for missing input label that would push the margin (toolbar has no inputs). */\n\t\t\t\tmargin-top: var(--ck-spacing-standard);\n\n\t\t\t\t& .ck-toolbar__items > * {\n\t\t\t\t\twidth: 40px;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},2850:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,':root{--ck-table-selected-cell-background:rgba(158,207,250,.3)}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{box-shadow:unset;caret-color:transparent;outline:unset;position:relative}.ck.ck-editor__editable .table table td.ck-editor__editable_selected:after,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:after{background-color:var(--ck-table-selected-cell-background);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table td.ck-editor__editable_selected:focus,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:focus{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget{outline:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle{display:none}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-table/tableselection.css"],names:[],mappings:"AAKA,MACC,wDACD,CAGC,0IAKC,gBAAiB,CAFjB,uBAAwB,CACxB,aAAc,CAFd,iBAiCD,CA3BC,sJAGC,yDAA0D,CAK1D,QAAS,CAPT,UAAW,CAKX,MAAO,CAJP,mBAAoB,CAEpB,iBAAkB,CAGlB,OAAQ,CAFR,KAID,CAEA,wTAEC,4BACD,CAMA,gKACC,aAKD,CAHC,0NACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-table-selected-cell-background: hsla(208, 90%, 80%, .3);\n}\n\n.ck.ck-editor__editable .table table {\n\t& td.ck-editor__editable_selected,\n\t& th.ck-editor__editable_selected {\n\t\tposition: relative;\n\t\tcaret-color: transparent;\n\t\toutline: unset;\n\t\tbox-shadow: unset;\n\n\t\t/* https://github.com/ckeditor/ckeditor5/issues/6446 */\n\t\t&:after {\n\t\t\tcontent: '';\n\t\t\tpointer-events: none;\n\t\t\tbackground-color: var(--ck-table-selected-cell-background);\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tbottom: 0;\n\t\t}\n\n\t\t& ::selection,\n\t\t&:focus {\n\t\t\tbackground-color: transparent;\n\t\t}\n\n\t\t/*\n\t\t * To reduce the amount of noise, all widgets in the table selection have no outline and no selection handle.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9491.\n\t\t */\n\t\t& .ck-widget {\n\t\t\toutline: unset;\n\n\t\t\t& > .ck-widget__selection-handle {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},1710:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-aria-live-announcer{left:-10000px;position:absolute;top:-10000px}.ck.ck-aria-live-region-list{list-style-type:none}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/arialiveannouncer/arialiveannouncer.css"],names:[],mappings:"AAKA,2BAEC,aAAc,CADd,iBAAkB,CAElB,YACD,CAEA,6BACC,oBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-aria-live-announcer {\n\tposition: absolute;\n\tleft: -10000px;\n\ttop: -10000px;\n}\n\n.ck.ck-aria-live-region-list {\n\tlist-style-type: none;\n}\n"],sourceRoot:""}]);const a=s},2688:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-autocomplete{position:relative}.ck.ck-autocomplete>.ck-search__results{position:absolute;z-index:var(--ck-z-panel)}.ck.ck-autocomplete>.ck-search__results.ck-search__results_n{bottom:100%}.ck.ck-autocomplete>.ck-search__results.ck-search__results_s{bottom:auto;top:100%}.ck.ck-autocomplete>.ck-search__results{border-radius:0}.ck-rounded-corners .ck.ck-autocomplete>.ck-search__results,.ck.ck-autocomplete>.ck-search__results.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-autocomplete>.ck-search__results{background:var(--ck-color-base-background);border:1px solid var(--ck-color-dropdown-panel-border);box-shadow:var(--ck-drop-shadow),0 0;max-height:200px;min-width:auto;overflow-y:auto}.ck.ck-autocomplete>.ck-search__results.ck-search__results_n{border-bottom-left-radius:0;border-bottom-right-radius:0;margin-bottom:-1px}.ck.ck-autocomplete>.ck-search__results.ck-search__results_s{border-top-left-radius:0;border-top-right-radius:0;margin-top:-1px}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/autocomplete/autocomplete.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/autocomplete/autocomplete.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,oBACC,iBAeD,CAbC,wCACC,iBAAkB,CAClB,yBAUD,CARC,6DACC,WACD,CAEA,6DAEC,WAAY,CADZ,QAED,CCVD,wCCEA,eDuBA,CAzBA,uHCMC,qCDmBD,CAzBA,wCAMC,0CAA2C,CAC3C,sDAAuD,CEPxD,oCAA8B,CFI7B,gBAAiB,CAIjB,cAAe,CAHf,eAoBD,CAfC,6DACC,2BAA4B,CAC5B,4BAA6B,CAG7B,kBACD,CAEA,6DACC,wBAAyB,CACzB,yBAA0B,CAG1B,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-autocomplete {\n\tposition: relative;\n\n\t& > .ck-search__results {\n\t\tposition: absolute;\n\t\tz-index: var(--ck-z-panel);\n\n\t\t&.ck-search__results_n {\n\t\t\tbottom: 100%;\n\t\t}\n\n\t\t&.ck-search__results_s {\n\t\t\ttop: 100%;\n\t\t\tbottom: auto;\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css";\n@import "@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css";\n\n.ck.ck-autocomplete {\n\t& > .ck-search__results {\n\t\t@mixin ck-rounded-corners;\n\t\t@mixin ck-drop-shadow;\n\n\t\tmax-height: 200px;\n\t\toverflow-y: auto;\n\t\tbackground: var(--ck-color-base-background);\n\t\tborder: 1px solid var(--ck-color-dropdown-panel-border);\n\t\tmin-width: auto;\n\n\t\t&.ck-search__results_n {\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\n\t\t\t/* Prevent duplicated borders between the input and the results pane. */\n\t\t\tmargin-bottom: -1px;\n\t\t}\n\n\t\t&.ck-search__results_s {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-top-right-radius: 0;\n\n\t\t\t/* Prevent duplicated borders between the input and the results pane. */\n\t\t\tmargin-top: -1px;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},8948:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-button,a.ck.ck-button{align-items:center;display:inline-flex;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir=ltr] .ck.ck-button,[dir=ltr] a.ck.ck-button{justify-content:left}[dir=rtl] .ck.ck-button,[dir=rtl] a.ck.ck-button{justify-content:right}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{-webkit-appearance:none;border:1px solid transparent;cursor:default;font-size:inherit;line-height:1;min-height:var(--ck-ui-component-min-height);min-width:var(--ck-ui-component-min-height);padding:var(--ck-spacing-tiny);text-align:center;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;vertical-align:middle;white-space:nowrap}@media (prefers-reduced-motion:reduce){.ck.ck-button,a.ck.ck-button{transition:none}}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{opacity:.5}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:var(--ck-spacing-medium)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{color:var(--ck-color-button-on-color)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/button/button.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/button.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/mixins/_button.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AAQA,6BAMC,kBAAmB,CADnB,mBAAoB,CADpB,iBAAkB,CCHlB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBD0BD,CA9BA,iDASE,oBAqBF,CA9BA,iDAaE,qBAiBF,CAdC,iEACC,YACD,CAGC,yGACC,oBACD,CAID,iFACC,sBACD,CEzBD,6BCAC,oDD6ID,CC1IE,6EACC,0DACD,CAEA,+EACC,2DACD,CAID,qDACC,6DACD,CDfD,6BEDC,eF8ID,CA7IA,wIEGE,qCF0IF,CA7IA,6BA6BC,uBAAwB,CANxB,4BAA6B,CAjB7B,cAAe,CAcf,iBAAkB,CAHlB,aAAc,CAJd,4CAA6C,CAD7C,2CAA4C,CAJ5C,8BAA+B,CAC/B,iBAAkB,CAiBlB,4DAA8D,CAnB9D,qBAAsB,CAFtB,kBAwID,CA9GC,uCA/BD,6BAgCE,eA6GF,CA5GC,CAEA,oFGpCA,2BAA2B,CCF3B,2CAA8B,CDC9B,YHyCA,CAIC,kJAEC,aACD,CAGD,iEAIC,aAAc,CACd,cAAe,CAHf,iBAAkB,CAClB,mBAAoB,CAMpB,qBASD,CAlBA,qFAYE,eAMF,CAlBA,qFAgBE,gBAEF,CAEA,yEACC,aAWD,CAZA,6FAIE,mCAQF,CAZA,6FAQE,oCAIF,CAZA,yEAWC,UACD,CAIC,oIIxFD,oDJ4FC,CAOA,gLKnGD,kCLqGC,CAEA,iGACC,UACD,CAGD,qEACC,yDAYD,CATC,2HAEE,qCAMF,CARA,2HAME,oCAEF,CAKA,mHACC,WACD,CAID,yCChIA,+CDoIA,CCjIC,yFACC,qDACD,CAEA,2FACC,sDACD,CAID,iEACC,wDACD,CDiHA,yCAGC,qCACD,CAEA,2DACC,iCACD,CAEA,+DACC,mCACD,CAID,2CChJC,mDDqJD,CClJE,2FACC,yDACD,CAEA,6FACC,0DACD,CAID,mEACC,4DACD,CDiID,2CAIC,wCACD,CAEA,uCAEC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n@import "../../mixins/_dir.css";\n\n.ck.ck-button,\na.ck.ck-button {\n\t@mixin ck-unselectable;\n\n\tposition: relative;\n\tdisplay: inline-flex;\n\talign-items: center;\n\n\t@mixin ck-dir ltr {\n\t\tjustify-content: left;\n\t}\n\n\t@mixin ck-dir rtl {\n\t\tjustify-content: right;\n\t}\n\n\t& .ck-button__label {\n\t\tdisplay: none;\n\t}\n\n\t&.ck-button_with-text {\n\t\t& .ck-button__label {\n\t\t\tdisplay: inline-block;\n\t\t}\n\t}\n\n\t/* Center the icon horizontally in a button without text. */\n\t&:not(.ck-button_with-text) {\n\t\tjustify-content: center;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_focus.css";\n@import "../../../mixins/_shadow.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_rounded.css";\n@import "../../mixins/_button.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-button,\na.ck.ck-button {\n\t@mixin ck-button-colors --ck-color-button-default;\n\t@mixin ck-rounded-corners;\n\n\twhite-space: nowrap;\n\tcursor: default;\n\tvertical-align: middle;\n\tpadding: var(--ck-spacing-tiny);\n\ttext-align: center;\n\n\t/* A very important piece of styling. Go to variable declaration to learn more. */\n\tmin-width: var(--ck-ui-component-min-height);\n\tmin-height: var(--ck-ui-component-min-height);\n\n\t/* Normalize the height of the line. Removing this will break consistent height\n\tamong text and text-less buttons (with icons). */\n\tline-height: 1;\n\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t/* Avoid flickering when the foucs border shows up. */\n\tborder: 1px solid transparent;\n\n\t/* Apply some smooth transition to the box-shadow and border. */\n\ttransition: box-shadow .2s ease-in-out, border .2s ease-in-out;\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/189 */\n\t-webkit-appearance: none;\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\ttransition: none;\n\t}\n\n\t&:active,\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t}\n\n\t/* Allow icon coloring using the text "color" property. */\n\t& .ck-button__icon {\n\t\t& use,\n\t\t& use * {\n\t\t\tcolor: inherit;\n\t\t}\n\t}\n\n\t& .ck-button__label {\n\t\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\t\tfont-size: inherit;\n\t\tfont-weight: inherit;\n\t\tcolor: inherit;\n\t\tcursor: inherit;\n\n\t\t/* Must be consistent with .ck-icon\'s vertical align. Otherwise, buttons with and\n\t\twithout labels (but with icons) have different sizes in Chrome */\n\t\tvertical-align: middle;\n\n\t\t@mixin ck-dir ltr {\n\t\t\ttext-align: left;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\ttext-align: right;\n\t\t}\n\t}\n\n\t& .ck-button__keystroke {\n\t\tcolor: inherit;\n\n\t\t@mixin ck-dir ltr {\n\t\t\tmargin-left: var(--ck-spacing-large);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tmargin-right: var(--ck-spacing-large);\n\t\t}\n\n\t\topacity: .5;\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */\n\t&.ck-disabled {\n\t\t&:active,\n\t\t&:focus {\n\t\t\t/* The disabled button should have a slightly less visible shadow when focused. */\n\t\t\t@mixin ck-box-shadow var(--ck-focus-disabled-outer-shadow);\n\t\t}\n\n\t\t& .ck-button__icon {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */\n\t\t& .ck-button__label {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t& .ck-button__keystroke {\n\t\t\topacity: .3;\n\t\t}\n\t}\n\n\t&.ck-button_with-text {\n\t\tpadding: var(--ck-spacing-tiny) var(--ck-spacing-standard);\n\n\t\t/* stylelint-disable-next-line no-descending-specificity */\n\t\t& .ck-button__icon {\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-right: var(--ck-spacing-medium);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-left: var(--ck-spacing-medium);\n\t\t\t}\n\t\t}\n\t}\n\n\t&.ck-button_with-keystroke {\n\t\t/* stylelint-disable-next-line no-descending-specificity */\n\t\t& .ck-button__label {\n\t\t\tflex-grow: 1;\n\t\t}\n\t}\n\n\t/* A style of the button which is currently on, e.g. its feature is active. */\n\t&.ck-on {\n\t\t@mixin ck-button-colors --ck-color-button-on;\n\n\t\tcolor: var(--ck-color-button-on-color);\n\t}\n\n\t&.ck-button-save {\n\t\tcolor: var(--ck-color-button-save);\n\t}\n\n\t&.ck-button-cancel {\n\t\tcolor: var(--ck-color-button-cancel);\n\t}\n}\n\n/* A style of the button which handles the primary action. */\n.ck.ck-button-action,\na.ck.ck-button-action {\n\t@mixin ck-button-colors --ck-color-button-action;\n\n\tcolor: var(--ck-color-button-action-text);\n}\n\n.ck.ck-button-bold,\na.ck.ck-button-bold {\n\tfont-weight: bold;\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements a button of given background color.\n *\n * @param {String} $background - Background color of the button.\n * @param {String} $border - Border color of the button.\n */\n@define-mixin ck-button-colors $prefix {\n\tbackground: var($(prefix)-background);\n\n\t&:not(.ck-disabled) {\n\t\t&:hover {\n\t\t\tbackground: var($(prefix)-hover-background);\n\t\t}\n\n\t\t&:active {\n\t\t\tbackground: var($(prefix)-active-background);\n\t\t}\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */\n\t&.ck-disabled {\n\t\tbackground: var($(prefix)-disabled-background);\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\n}\n"],sourceRoot:""}]);const a=s},3389:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-list-item-button{border-radius:0;min-height:unset;width:100%}[dir=ltr] .ck.ck-list-item-button{text-align:left}[dir=rtl] .ck.ck-list-item-button{text-align:right}[dir=ltr] .ck.ck-list-item-button.ck-list-item-button_toggleable{padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-list-item-button.ck-list-item-button_toggleable{padding-right:var(--ck-spacing-small)}.ck.ck-list-item-button .ck-list-item-button__check-holder{display:inline-flex;height:.9em;width:.9em}[dir=ltr] .ck.ck-list-item-button .ck-list-item-button__check-holder{margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-list-item-button .ck-list-item-button__check-holder{margin-left:var(--ck-spacing-small)}.ck.ck-list-item-button .ck-list-item-button__check-icon{height:100%}.ck.ck-button.ck-list-item-button{padding:var(--ck-spacing-tiny) calc(var(--ck-spacing-standard)*2)}.ck.ck-button.ck-list-item-button,.ck.ck-button.ck-list-item-button.ck-on{background:var(--ck-color-list-background);color:var(--ck-color-text)}[dir=ltr] .ck.ck-button.ck-list-item-button:has(.ck-list-item-button__check-holder){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-list-item-button:has(.ck-list-item-button__check-holder){padding-right:var(--ck-spacing-small)}.ck.ck-button.ck-list-item-button.ck-button.ck-on:hover,.ck.ck-button.ck-list-item-button.ck-on:hover,.ck.ck-button.ck-list-item-button.ck-on:not(.ck-list-item-button_toggleable),.ck.ck-button.ck-list-item-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-button.ck-list-item-button.ck-button.ck-on:hover:not(.ck-disabled),.ck.ck-button.ck-list-item-button.ck-on:hover:not(.ck-disabled),.ck.ck-button.ck-list-item-button.ck-on:not(.ck-list-item-button_toggleable):not(.ck-disabled),.ck.ck-button.ck-list-item-button:hover:not(.ck-disabled):not(.ck-disabled){color:var(--ck-color-text)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/button/listitembutton.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/listitembutton.css"],names:[],mappings:"AAOA,wBAGC,eAAgB,CAFhB,gBAAiB,CACjB,UAsCD,CAxCA,kCAME,eAkCF,CAxCA,kCAUE,gBA8BF,CA3BC,iEAEE,oCAMF,CARA,iEAME,qCAEF,CAEA,2DACC,mBAAoB,CAEpB,WAAY,CADZ,UAUD,CAZA,qEAME,oCAMF,CAZA,qEAUE,mCAEF,CAEA,yDACC,WACD,CCvCD,kCACC,iEAiCD,CA/BC,0EAEC,0CAA2C,CAC3C,0BACD,CAEA,oFAEE,oCAMF,CARA,oFAME,qCAEF,CAOA,6OAIC,uDAKD,CAHC,qTACC,0BACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_dir.css";\n\n.ck.ck-list-item-button {\n\tmin-height: unset;\n\twidth: 100%;\n\tborder-radius: 0;\n\n\t@mixin ck-dir ltr {\n\t\ttext-align: left;\n\t}\n\n\t@mixin ck-dir rtl {\n\t\ttext-align: right;\n\t}\n\n\t&.ck-list-item-button_toggleable {\n\t\t@mixin ck-dir ltr {\n\t\t\tpadding-left: var(--ck-spacing-small);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tpadding-right: var(--ck-spacing-small);\n\t\t}\n\t}\n\n\t& .ck-list-item-button__check-holder {\n\t\tdisplay: inline-flex;\n\t\twidth: .9em;\n\t\theight: .9em;\n\n\t\t@mixin ck-dir ltr {\n\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tmargin-left: var(--ck-spacing-small);\n\t\t}\n\t}\n\n\t& .ck-list-item-button__check-icon {\n\t\theight: 100%;\n\t}\n}\n','/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-button.ck-list-item-button {\n\tpadding: var(--ck-spacing-tiny) calc(2 * var(--ck-spacing-standard));\n\n\t&,\n\t&.ck-on {\n\t\tbackground: var(--ck-color-list-background);\n\t\tcolor: var(--ck-color-text);\n\t}\n\n\t&:has(.ck-list-item-button__check-holder) {\n\t\t@mixin ck-dir ltr {\n\t\t\tpadding-left: var(--ck-spacing-small);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tpadding-right: var(--ck-spacing-small);\n\t\t}\n\t}\n\n\t/*\n\t * `.ck-on` class and background styling is overridden for `ck-button` in many places.\n\t * This is a workaround to make sure that the background is not overridden and uses similar\n\t * selector specificity as the other overrides.\n\t */\n\t&:hover:not(.ck-disabled),\n\t&.ck-button.ck-on:hover,\n\t&.ck-on:not(.ck-list-item-button_toggleable),\n\t&.ck-on:hover {\n\t\tbackground: var(--ck-color-list-button-hover-background);\n\n\t\t&:not(.ck-disabled) {\n\t\t\tcolor: var(--ck-color-text);\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},9624:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:calc(1.07692em + 1px);--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - 2px);--ck-switch-button-inner-hover-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton,.ck.ck-button.ck-switchbutton.ck-on:active,.ck.ck-button.ck-switchbutton.ck-on:focus,.ck.ck-button.ck-switchbutton.ck-on:hover,.ck.ck-button.ck-switchbutton:active,.ck.ck-button.ck-switchbutton:focus,.ck.ck-button.ck-switchbutton:hover{background:transparent;color:inherit}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{background:var(--ck-color-switch-button-off-background);border:1px solid transparent;transition:background .4s ease,box-shadow .2s ease-in-out,outline .2s ease-in-out;width:var(--ck-switch-button-toggle-width)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(var(--ck-border-radius)*.5)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{background:var(--ck-color-switch-button-inner-background);height:var(--ck-switch-button-toggle-inner-size);transition:all .3s ease;width:var(--ck-switch-button-toggle-inner-size)}@media (prefers-reduced-motion:reduce){.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{transition:none}}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:var(--ck-switch-button-inner-hover-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton:focus{border-color:transparent;box-shadow:none;outline:none}.ck.ck-button.ck-switchbutton:focus .ck-button__toggle{box-shadow:0 0 0 1px var(--ck-color-base-background),0 0 0 5px var(--ck-color-focus-outer-shadow);outline:var(--ck-focus-ring);outline-offset:1px}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var( --ck-switch-button-translation ))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(var( --ck-switch-button-translation )*-1))}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/button/switchbutton.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/switchbutton.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AASE,4HACC,aACD,CCCF,MAEC,8CAA+C,CAE/C,0DAAgE,CAChE,2HAIC,CACD,0FACD,CAOC,0QAEC,sBAAuB,CADvB,aAED,CAEA,0DAGE,4CAOF,CAVA,0DAQE,2CAEF,CAEA,iDCpCA,eDgFA,CA5CA,yIChCC,qCD4ED,CA5CA,2DAKE,gBAuCF,CA5CA,2DAUE,iBAkCF,CA5CA,iDAkBC,uDAAwD,CAFxD,4BAA6B,CAD7B,iFAAsF,CAEtF,0CA2BD,CAxBC,2ECxDD,eDuEC,CAfA,6LCpDA,qCAAsC,CDsDpC,8CAaF,CAfA,2EAOC,yDAA0D,CAD1D,gDAAiD,CAIjD,uBAA0B,CAL1B,+CAUD,CAHC,uCAZD,2EAaE,eAEF,CADC,CAGD,uDACC,6DAKD,CAHC,iFACC,qDACD,CAIF,6DEpFA,kCFsFA,CAGA,oCACC,wBAAyB,CAEzB,eAAgB,CADhB,YAQD,CALC,uDACC,iGAAmG,CAEnG,4BAA6B,CAD7B,kBAED,CAKA,uDACC,sDAkBD,CAhBC,6DACC,4DACD,CAEA,2FAKE,2DAMF,CAXA,2FASE,oEAEF",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-button.ck-switchbutton {\n\t& .ck-button__toggle {\n\t\tdisplay: block;\n\n\t\t& .ck-button__toggle__inner {\n\t\t\tdisplay: block;\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_disabled.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n/* Note: To avoid rendering issues (aliasing) but to preserve the responsive nature\nof the component, floating–point numbers have been used which, for the default font size\n(see: --ck-font-size-base), will generate simple integers. */\n:root {\n\t/* 34px at 13px font-size */\n\t--ck-switch-button-toggle-width: 2.6153846154em;\n\t/* 14px at 13px font-size */\n\t--ck-switch-button-toggle-inner-size: calc(1.0769230769em + 1px);\n\t--ck-switch-button-translation: calc(\n\t\tvar(--ck-switch-button-toggle-width) -\n\t\tvar(--ck-switch-button-toggle-inner-size) -\n\t\t2px /* Border */\n\t);\n\t--ck-switch-button-inner-hover-shadow: 0 0 0 5px var(--ck-color-switch-button-inner-shadow);\n}\n\n.ck.ck-button.ck-switchbutton {\n\t/* Unlike a regular button, the switch button text color and background should never change.\n\t * Changing toggle switch (background, outline) is enough to carry the information about the\n\t * state of the entire component (https://github.com/ckeditor/ckeditor5/issues/12519)\n\t */\n\t&, &:hover, &:focus, &:active, &.ck-on:hover, &.ck-on:focus, &.ck-on:active {\n\t\tcolor: inherit;\n\t\tbackground: transparent;\n\t}\n\n\t& .ck-button__label {\n\t\t@mixin ck-dir ltr {\n\t\t\t/* Separate the label from the switch */\n\t\t\tmargin-right: calc(2 * var(--ck-spacing-large));\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t/* Separate the label from the switch */\n\t\t\tmargin-left: calc(2 * var(--ck-spacing-large));\n\t\t}\n\t}\n\n\t& .ck-button__toggle {\n\t\t@mixin ck-rounded-corners;\n\n\t\t@mixin ck-dir ltr {\n\t\t\t/* Make sure the toggle is always to the right as far as possible. */\n\t\t\tmargin-left: auto;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t/* Make sure the toggle is always to the left as far as possible. */\n\t\t\tmargin-right: auto;\n\t\t}\n\n\t\t/* Apply some smooth transition to the box-shadow and border. */\n\t\t/* Gently animate the background color of the toggle switch */\n\t\ttransition: background 400ms ease, box-shadow .2s ease-in-out, outline .2s ease-in-out;\n\t\tborder: 1px solid transparent;\n\t\twidth: var(--ck-switch-button-toggle-width);\n\t\tbackground: var(--ck-color-switch-button-off-background);\n\n\t\t& .ck-button__toggle__inner {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-radius: calc(.5 * var(--ck-border-radius));\n\t\t\t}\n\n\t\t\twidth: var(--ck-switch-button-toggle-inner-size);\n\t\t\theight: var(--ck-switch-button-toggle-inner-size);\n\t\t\tbackground: var(--ck-color-switch-button-inner-background);\n\n\t\t\t/* Gently animate the inner part of the toggle switch */\n\t\t\ttransition: all 300ms ease;\n\n\t\t\t@media (prefers-reduced-motion: reduce) {\n\t\t\t\ttransition: none;\n\t\t\t}\n\t\t}\n\n\t\t&:hover {\n\t\t\tbackground: var(--ck-color-switch-button-off-hover-background);\n\n\t\t\t& .ck-button__toggle__inner {\n\t\t\t\tbox-shadow: var(--ck-switch-button-inner-hover-shadow);\n\t\t\t}\n\t\t}\n\t}\n\n\t&.ck-disabled .ck-button__toggle {\n\t\t@mixin ck-disabled;\n\t}\n\n\t/* Overriding default .ck-button:focus styles + an outline around the toogle */\n\t&:focus {\n\t\tborder-color: transparent;\n\t\toutline: none;\n\t\tbox-shadow: none;\n\n\t\t& .ck-button__toggle {\n\t\t\tbox-shadow: 0 0 0 1px var(--ck-color-base-background), 0 0 0 5px var(--ck-color-focus-outer-shadow);\n\t\t\toutline-offset: 1px;\n\t\t\toutline: var(--ck-focus-ring);\n\t\t}\n\t}\n\n\t/* stylelint-disable-next-line no-descending-specificity */\n\t&.ck-on {\n\t\t& .ck-button__toggle {\n\t\t\tbackground: var(--ck-color-switch-button-on-background);\n\n\t\t\t&:hover {\n\t\t\t\tbackground: var(--ck-color-switch-button-on-hover-background);\n\t\t\t}\n\n\t\t\t& .ck-button__toggle__inner {\n\t\t\t\t/*\n\t\t\t\t* Move the toggle switch to the right. It will be animated.\n\t\t\t\t*/\n\t\t\t\t@mixin ck-dir ltr {\n\t\t\t\t\ttransform: translateX( var( --ck-switch-button-translation ) );\n\t\t\t\t}\n\n\t\t\t\t@mixin ck-dir rtl {\n\t\t\t\t\ttransform: translateX( calc( -1 * var( --ck-switch-button-translation ) ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\n}\n"],sourceRoot:""}]);const a=s},1750:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-collapsible.ck-collapsible_collapsed>.ck-collapsible__children{display:none}:root{--ck-collapsible-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-collapsible>.ck.ck-button{border-radius:0;color:inherit;font-weight:700;width:100%}.ck.ck-collapsible>.ck.ck-button:focus{background:transparent}.ck.ck-collapsible>.ck.ck-button:active,.ck.ck-collapsible>.ck.ck-button:hover:not(:focus),.ck.ck-collapsible>.ck.ck-button:not(:focus){background:transparent;border-color:transparent;box-shadow:none}.ck.ck-collapsible>.ck.ck-button>.ck-icon{margin-right:var(--ck-spacing-medium);width:var(--ck-collapsible-arrow-size)}.ck.ck-collapsible>.ck-collapsible__children{padding:var(--ck-spacing-medium) var(--ck-spacing-large) var(--ck-spacing-large)}.ck.ck-collapsible.ck-collapsible_collapsed>.ck.ck-button .ck-icon{transform:rotate(-90deg)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/collapsible/collapsible.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/collapsible/collapsible.css"],names:[],mappings:"AAMC,sEACC,YACD,CCHD,MACC,yDACD,CAGC,iCAGC,eAAgB,CAChB,aAAc,CAFd,eAAiB,CADjB,UAmBD,CAdC,uCACC,sBACD,CAEA,wIACC,sBAAuB,CACvB,wBAAyB,CACzB,eACD,CAEA,0CACC,qCAAsC,CACtC,sCACD,CAGD,6CACC,gFACD,CAGC,mEACC,wBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-collapsible.ck-collapsible_collapsed {\n\t& > .ck-collapsible__children {\n\t\tdisplay: none;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-collapsible-arrow-size: calc(0.5 * var(--ck-icon-size));\n}\n\n.ck.ck-collapsible {\n\t& > .ck.ck-button {\n\t\twidth: 100%;\n\t\tfont-weight: bold;\n\t\tborder-radius: 0;\n\t\tcolor: inherit;\n\n\t\t&:focus {\n\t\t\tbackground: transparent;\n\t\t}\n\n\t\t&:active, &:not(:focus), &:hover:not(:focus) {\n\t\t\tbackground: transparent;\n\t\t\tborder-color: transparent;\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\t& > .ck-icon {\n\t\t\tmargin-right: var(--ck-spacing-medium);\n\t\t\twidth: var(--ck-collapsible-arrow-size);\n\t\t}\n\t}\n\n\t& > .ck-collapsible__children {\n\t\tpadding: var(--ck-spacing-medium) var(--ck-spacing-large) var(--ck-spacing-large);\n\t}\n\n\t&.ck-collapsible_collapsed {\n\t\t& > .ck.ck-button .ck-icon {\n\t\t\ttransform: rotate(-90deg);\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},7962:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#166fd4}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{transition:box-shadow .2s ease}@media (forced-colors:none){.ck.ck-color-grid__tile{border:0;height:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);padding:0;width:var(--ck-color-grid-tile-size)}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile.ck-color-selector__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}}@media (forced-colors:active){.ck.ck-color-grid__tile{height:unset;min-height:unset;min-width:unset;padding:0 var(--ck-spacing-small);width:unset}.ck.ck-color-grid__tile .ck-button__label{display:inline-block}}@media (prefers-reduced-motion:reduce){.ck.ck-color-grid__tile{transition:none}}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile .ck.ck-icon{color:var(--ck-color-color-grid-check-icon);display:none}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/colorgrid/colorgrid.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/colorgrid/colorgrid.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css"],names:[],mappings:"AAKA,kBACC,YACD,CCCA,MACC,8BAA+B,CAK/B,wCACD,CAEA,kBACC,YAAa,CACb,WACD,CAEA,wBACC,8BAkED,CC3EC,4BACC,wBDgBA,QAAS,CAJT,qCAAsC,CAEtC,yCAA0C,CAD1C,wCAAyC,CAEzC,SAAU,CAJV,oCCTA,CDgBA,8HAIC,QACD,CAEA,+DACC,gDACD,CAEA,8BACC,8FACD,CAEA,gGAEC,iGACD,CCjCD,CAZA,8BACC,wBDqDA,YAAa,CAEb,gBAAiB,CADjB,eAAgB,CAEhB,iCAAkC,CAJlC,WClDA,CDwDA,0CACC,oBACD,CCzDD,CD4DA,uCAhDD,wBAiDE,eAkBF,CAjBC,CAEA,oCACC,YAAa,CACb,gBACD,CAEA,oCAEC,2CAA4C,CAD5C,YAED,CAGC,0CACC,aACD,CAIF,yBACC,oCACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-color-grid {\n\tdisplay: grid;\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css";\n\n:root {\n\t--ck-color-grid-tile-size: 24px;\n\n\t/* Not using global colors here because these may change but some colors in a pallette\n\t * require special treatment. For instance, this ensures no matter what the UI text color is,\n\t * the check icon will look good on the black color tile. */\n\t--ck-color-color-grid-check-icon: hsl(212, 81%, 46%);\n}\n\n.ck.ck-color-grid {\n\tgrid-gap: 5px;\n\tpadding: 8px;\n}\n\n.ck.ck-color-grid__tile {\n\ttransition: .2s ease box-shadow;\n\n\t@mixin ck-media-default-colors {\n\t\twidth: var(--ck-color-grid-tile-size);\n\t\theight: var(--ck-color-grid-tile-size);\n\t\tmin-width: var(--ck-color-grid-tile-size);\n\t\tmin-height: var(--ck-color-grid-tile-size);\n\t\tpadding: 0;\n\t\tborder: 0;\n\n\t\t&.ck-on,\n\t\t&:focus:not( .ck-disabled ),\n\t\t&:hover:not( .ck-disabled ) {\n\t\t\t/* Disable the default .ck-button\'s border ring. */\n\t\t\tborder: 0;\n\t\t}\n\n\t\t&.ck-color-selector__color-tile_bordered {\n\t\t\tbox-shadow: 0 0 0 1px var(--ck-color-base-border);\n\t\t}\n\n\t\t&.ck-on {\n\t\t\tbox-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-base-text);\n\t\t}\n\n\t\t&:focus:not( .ck-disabled ),\n\t\t&:hover:not( .ck-disabled ) {\n\t\t\tbox-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-focus-border);\n\t\t}\n\t}\n\n\t/*\n\t * In high contrast mode, the colors are replaced with text labels.\n\t * See https://github.com/ckeditor/ckeditor5/issues/14907.\n\t */\n\t@mixin ck-media-forced-colors {\n\t\twidth: unset;\n\t\theight: unset;\n\t\tmin-width: unset;\n\t\tmin-height: unset;\n\t\tpadding: 0 var(--ck-spacing-small);\n\n\t\t& .ck-button__label {\n\t\t\tdisplay: inline-block;\n\t\t}\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\ttransition: none;\n\t}\n\n\t&.ck-disabled {\n\t\tcursor: unset;\n\t\ttransition: unset;\n\t}\n\n\t& .ck.ck-icon {\n\t\tdisplay: none;\n\t\tcolor: var(--ck-color-color-grid-check-icon);\n\t}\n\n\t&.ck-on {\n\t\t& .ck.ck-icon {\n\t\t\tdisplay: block;\n\t\t}\n\t}\n}\n\n.ck.ck-color-grid__label {\n\tpadding: 0 var(--ck-spacing-standard);\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-forced-colors {\n\t@media (forced-colors: active) {\n\t\t& {\n\t\t\t@mixin-content;\n\t\t}\n\t}\n}\n\n@define-mixin ck-media-default-colors {\n\t@media (forced-colors: none) {\n\t\t& {\n\t\t\t@mixin-content;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},3086:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".color-picker-hex-input{width:max-content}.color-picker-hex-input .ck.ck-input{min-width:unset}.ck.ck-color-picker__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;margin:var(--ck-spacing-large) 0 0;width:unset}.ck.ck-color-picker__row .ck.ck-labeled-field-view{padding-top:unset}.ck.ck-color-picker__row .ck.ck-input-text{width:unset}.ck.ck-color-picker__row .ck-color-picker__hash-view{padding-right:var(--ck-spacing-medium);padding-top:var(--ck-spacing-tiny)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/colorpicker/colorpicker.css"],names:[],mappings:"AAKA,wBACC,iBAKD,CAHC,qCACC,eACD,CAGD,yBACC,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CACjB,6BAA8B,CAC9B,kCAAmC,CACnC,WAcD,CAZC,mDACC,iBACD,CAEA,2CACC,WACD,CAEA,qDAEC,sCAAuC,CADvC,kCAED",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.color-picker-hex-input {\n\twidth: max-content;\n\n\t& .ck.ck-input {\n\t\tmin-width: unset;\n\t}\n}\n\n.ck.ck-color-picker__row {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\tjustify-content: space-between;\n\tmargin: var(--ck-spacing-large) 0 0;\n\twidth: unset;\n\n\t& .ck.ck-labeled-field-view {\n\t\tpadding-top: unset;\n\t}\n\n\t& .ck.ck-input-text {\n\t\twidth: unset;\n\t}\n\n\t& .ck-color-picker__hash-view {\n\t\tpadding-top: var(--ck-spacing-tiny);\n\t\tpadding-right: var(--ck-spacing-medium);\n\t}\n}\n"],sourceRoot:""}]);const a=s},2922:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{align-items:center;display:flex}[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{justify-content:flex-start}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar{display:flex;flex-direction:row;justify-content:space-around}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar .ck-button-cancel,.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar .ck-button-save{flex:1}.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker,.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__remove-color{width:100%}.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard)}.ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker:not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-color-selector .ck-color-grids-fragment .ck-button.ck-color-selector__color-picker .ck.ck-icon{margin-left:var(--ck-spacing-standard)}.ck.ck-color-selector .ck-color-grids-fragment label.ck.ck-color-grid__label{font-weight:unset}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker{padding:8px}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker{height:100px;min-width:180px}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(saturation){border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(hue){border-radius:0 0 var(--ck-border-radius) var(--ck-border-radius)}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(hue-pointer),.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-picker .hex-color-picker::part(saturation-pointer){height:15px;width:15px}.ck.ck-color-selector .ck-color-picker-fragment .ck.ck-color-selector_action-bar{padding:0 8px 8px}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/colorselector/colorselector.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/colorselector/colorselector.css"],names:[],mappings:"AAUE,oLAGC,kBAAmB,CADnB,YAMD,CARA,wMAME,0BAEF,CAKA,iFACC,YAAa,CACb,kBAAmB,CACnB,4BAMD,CAJC,oMAEC,MACD,CCrBD,oLAEC,UACD,CAEA,0FAEC,2BAA4B,CAC5B,4BAA6B,CAF7B,qEAiBD,CAbC,sGACC,gDACD,CAEA,gHAEE,uCAMF,CARA,gHAME,sCAEF,CAGD,6EACC,iBACD,CAKA,oEACC,WAoBD,CAlBC,sFACC,YAAa,CACb,eAeD,CAbC,wGACC,iEACD,CAEA,iGACC,iEACD,CAEA,yNAGC,WAAY,CADZ,UAED,CAIF,iFACC,iBACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-color-selector {\n\t/* View fragment with color grids. */\n\t& .ck-color-grids-fragment {\n\t\t& .ck-button.ck-color-selector__remove-color,\n\t\t& .ck-button.ck-color-selector__color-picker {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tjustify-content: flex-start;\n\t\t\t}\n\t\t}\n\t}\n\n\t/* View fragment with a color picker. */\n\t& .ck-color-picker-fragment {\n\t\t& .ck.ck-color-selector_action-bar {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\t\t\tjustify-content: space-around;\n\n\t\t\t& .ck-button-save,\n\t\t\t& .ck-button-cancel {\n\t\t\t\tflex: 1\n\t\t\t}\n\t\t}\n\t}\n}\n','/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-color-selector {\n\t/* View fragment with color grids. */\n\t& .ck-color-grids-fragment {\n\t\t& .ck-button.ck-color-selector__remove-color,\n\t\t& .ck-button.ck-color-selector__color-picker {\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t& .ck-button.ck-color-selector__color-picker {\n\t\t\tpadding: calc(var(--ck-spacing-standard) / 2) var(--ck-spacing-standard);\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\n\t\t\t&:not(:focus) {\n\t\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\n\t\t\t& .ck.ck-icon {\n\t\t\t\t@mixin ck-dir ltr {\n\t\t\t\t\tmargin-right: var(--ck-spacing-standard);\n\t\t\t\t}\n\n\t\t\t\t@mixin ck-dir rtl {\n\t\t\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t& label.ck.ck-color-grid__label {\n\t\t\tfont-weight: unset;\n\t\t}\n\t}\n\n\t/* View fragment with a color picker. */\n\t& .ck-color-picker-fragment {\n\t\t& .ck.ck-color-picker {\n\t\t\tpadding: 8px;\n\n\t\t\t& .hex-color-picker {\n\t\t\t\theight: 100px;\n\t\t\t\tmin-width: 180px;\n\n\t\t\t\t&::part(saturation) {\n\t\t\t\t\tborder-radius: var(--ck-border-radius) var(--ck-border-radius) 0 0;\n\t\t\t\t}\n\n\t\t\t\t&::part(hue) {\n\t\t\t\t\tborder-radius: 0 0 var(--ck-border-radius) var(--ck-border-radius);\n\t\t\t\t}\n\n\t\t\t\t&::part(saturation-pointer),\n\t\t\t\t&::part(hue-pointer) {\n\t\t\t\t\twidth: 15px;\n\t\t\t\t\theight: 15px;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t& .ck.ck-color-selector_action-bar {\n\t\t\tpadding: 0 8px 8px;\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},880:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-dialog-overlay{bottom:0;left:0;overscroll-behavior:none;position:fixed;right:0;top:0;user-select:none}.ck.ck-dialog-overlay.ck-dialog-overlay__transparent{animation:none;background:none;pointer-events:none}.ck.ck-dialog{overscroll-behavior:none;position:absolute;width:fit-content}.ck.ck-dialog .ck.ck-form__header{flex-shrink:0}.ck.ck-dialog .ck.ck-form__header .ck-form__header__label{cursor:grab}.ck.ck-dialog-overlay.ck-dialog-overlay__transparent .ck.ck-dialog{pointer-events:all}:root{--ck-dialog-overlay-background-color:rgba(0,0,0,.5);--ck-dialog-drop-shadow:0px 0px 6px 2px rgba(0,0,0,.15);--ck-dialog-max-width:100vw;--ck-dialog-max-height:90vh;--ck-color-dialog-background:var(--ck-color-base-background);--ck-color-dialog-form-header-border:var(--ck-color-base-border)}.ck.ck-dialog-overlay{animation:ck-dialog-fade-in .3s;background:var(--ck-dialog-overlay-background-color);z-index:var(--ck-z-dialog)}.ck.ck-dialog{border-radius:0}.ck-rounded-corners .ck.ck-dialog,.ck.ck-dialog.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dialog{box-shadow:var(--ck-drop-shadow),0 0;--ck-drop-shadow:var(--ck-dialog-drop-shadow);background:var(--ck-color-dialog-background);border:1px solid var(--ck-color-base-border);max-height:var(--ck-dialog-max-height);max-width:var(--ck-dialog-max-width)}.ck.ck-dialog .ck.ck-form__header{border-bottom:1px solid var(--ck-color-dialog-form-header-border)}@keyframes ck-dialog-fade-in{0%{background:transparent}to{background:var(--ck-dialog-overlay-background-color)}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/dialog/dialog.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/dialog/dialog.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,sBAKC,QAAS,CACT,MAAO,CAJP,wBAAyB,CAEzB,cAAe,CAGf,OAAQ,CACR,KAAM,CAPN,gBAcD,CALC,qDAEC,cAAe,CACf,eAAgB,CAFhB,mBAGD,CAGD,cACC,wBAAyB,CAEzB,iBAAkB,CADlB,iBAcD,CAXC,kCACC,aAKD,CAHC,0DACC,WACD,CAVF,mEAcE,kBAEF,CC7BA,MACC,mDAA2D,CAC3D,uDAA8D,CAC9D,2BAA4B,CAC5B,2BAA4B,CAC5B,4DAA6D,CAC7D,gEACD,CAEA,sBACC,+BAAgC,CAChC,oDAAqD,CACrD,0BACD,CAEA,cCbC,eD2BD,CAdA,mECTE,qCDuBF,CAdA,cEfC,oCAA8B,CFmB9B,6CAA8C,CAE9C,4CAA6C,CAG7C,4CAA6C,CAF7C,sCAAuC,CACvC,oCAMD,CAHC,kCACC,iEACD,CAGD,6BACC,GACC,sBACD,CAEA,GACC,oDACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-dialog-overlay {\n\tuser-select: none;\n\toverscroll-behavior: none;\n\n\tposition: fixed;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\ttop: 0;\n\n\t&.ck-dialog-overlay__transparent {\n\t\tpointer-events: none;\n\t\tanimation: none;\n\t\tbackground: none;\n\t}\n}\n\n.ck.ck-dialog {\n\toverscroll-behavior: none;\n\twidth: fit-content;\n\tposition: absolute;\n\n\t& .ck.ck-form__header {\n\t\tflex-shrink: 0;\n\n\t\t& .ck-form__header__label {\n\t\t\tcursor: grab;\n\t\t}\n\t}\n\n\t@nest .ck.ck-dialog-overlay.ck-dialog-overlay__transparent & {\n\t\tpointer-events: all;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_shadow.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n:root {\n\t--ck-dialog-overlay-background-color: hsla( 0, 0%, 0%, .5 );\n\t--ck-dialog-drop-shadow: 0px 0px 6px 2px hsl(0deg 0% 0% / 15%);\n\t--ck-dialog-max-width: 100vw;\n\t--ck-dialog-max-height: 90vh;\n\t--ck-color-dialog-background: var(--ck-color-base-background);\n\t--ck-color-dialog-form-header-border: var(--ck-color-base-border);\n}\n\n.ck.ck-dialog-overlay {\n\tanimation: ck-dialog-fade-in .3s;\n\tbackground: var(--ck-dialog-overlay-background-color);\n\tz-index: var(--ck-z-dialog);\n}\n\n.ck.ck-dialog {\n\t@mixin ck-rounded-corners;\n\t@mixin ck-drop-shadow;\n\n\t--ck-drop-shadow: var(--ck-dialog-drop-shadow);\n\n\tbackground: var(--ck-color-dialog-background);\n\tmax-height: var(--ck-dialog-max-height);\n\tmax-width: var(--ck-dialog-max-width);\n\tborder: 1px solid var(--ck-color-base-border);\n\n\t& .ck.ck-form__header {\n\t\tborder-bottom: 1px solid var(--ck-color-dialog-form-header-border);\n\t}\n}\n\n@keyframes ck-dialog-fade-in {\n\t0% {\n\t\tbackground: hsla( 0, 0%, 0%, 0 );\n\t}\n\n\t100% {\n\t\tbackground: var(--ck-dialog-overlay-background-color);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},8091:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-dialog .ck.ck-dialog__actions{display:flex;justify-content:flex-end;padding:var(--ck-spacing-large)}.ck.ck-dialog .ck.ck-dialog__actions>*+*{margin-left:var(--ck-spacing-large)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/dialog/dialogactions.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/dialog/dialogactions.css"],names:[],mappings:"AAMC,qCACC,YAAa,CACb,wBAAyB,CCDzB,+BDED,CCAC,yCACC,mCACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-dialog {\n\t& .ck.ck-dialog__actions {\n\t\tdisplay: flex;\n\t\tjustify-content: flex-end;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-dialog {\n\t& .ck.ck-dialog__actions {\n\t\tpadding: var(--ck-spacing-large);\n\n\t\t& > * + * {\n\t\t\tmargin-left: var(--ck-spacing-large);\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},426:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,":root{--ck-dropdown-max-width:75vw}.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-dropdown__panel{display:none;max-width:var(--ck-dropdown-max-width);position:absolute;z-index:var(--ck-z-panel)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{bottom:auto;top:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-panel) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{overflow:hidden;text-overflow:ellipsis;width:7em}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}.ck.ck-dropdown__panel:focus{outline:none}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/dropdown.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/dropdown.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_disabled.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,MACC,4BACD,CAEA,gBACC,oBAAqB,CACrB,iBA2ED,CAzEC,oCACC,mBAAoB,CACpB,2BACD,CAGA,+CACC,UACD,CAEA,oCACC,YAAa,CAEb,sCAAuC,CAEvC,iBAAkB,CAHlB,yBA4DD,CAvDC,+DACC,oBACD,CAEA,mSAKC,WACD,CAEA,mSAUC,WAAY,CADZ,QAED,CAEA,oHAEC,MACD,CAEA,oHAEC,OACD,CAEA,kHAGC,QAAS,CACT,0BACD,CAEA,sHAGC,QAAS,CACT,0BACD,CAEA,sHAGC,QAAS,CACT,0BACD,CAQF,mCACC,mCACD,CCpFA,MACC,sDACD,CAEA,gBAEC,iBA2ED,CAzEC,oCACC,mCACD,CAGC,8CAIC,sCAAuC,CAHvC,gCAID,CAIA,8CACC,+BAAgC,CAGhC,oCACD,CAGD,gDC/BA,kCDiCA,CAIE,mFAEC,oCACD,CAIA,mFAEC,qCACD,CAID,iEAEC,eAAgB,CAChB,sBAAuB,CAFvB,SAGD,CAGA,6EC1DD,kCD4DC,CAGA,qDACC,2BAA4B,CAC5B,4BACD,CAEA,sGACC,UACD,CAGA,yHAEC,eAKD,CAHC,qIE7EF,2CF+EE,CAKH,uBGlFC,eHkHD,CAhCA,qFG9EE,qCH8GF,CAhCA,uBAIC,oDAAqD,CACrD,sDAAuD,CACvD,QAAS,CE1FT,oCAA8B,CF6F9B,cAuBD,CAnBC,6CACC,wBACD,CAEA,6CACC,yBACD,CAEA,6CACC,2BACD,CAEA,6CACC,4BACD,CAEA,6BACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-dropdown-max-width: 75vw;\n}\n\n.ck.ck-dropdown {\n\tdisplay: inline-block;\n\tposition: relative;\n\n\t& .ck-dropdown__arrow {\n\t\tpointer-events: none;\n\t\tz-index: var(--ck-z-default);\n\t}\n\n\t/* Dropdown button should span horizontally, e.g. in vertical toolbars */\n\t& .ck-button.ck-dropdown__button {\n\t\twidth: 100%;\n\t}\n\n\t& .ck-dropdown__panel {\n\t\tdisplay: none;\n\t\tz-index: var(--ck-z-panel);\n\t\tmax-width: var(--ck-dropdown-max-width);\n\n\t\tposition: absolute;\n\n\t\t&.ck-dropdown__panel-visible {\n\t\t\tdisplay: inline-block;\n\t\t}\n\n\t\t&.ck-dropdown__panel_ne,\n\t\t&.ck-dropdown__panel_nw,\n\t\t&.ck-dropdown__panel_n,\n\t\t&.ck-dropdown__panel_nmw,\n\t\t&.ck-dropdown__panel_nme {\n\t\t\tbottom: 100%;\n\t\t}\n\n\t\t&.ck-dropdown__panel_se,\n\t\t&.ck-dropdown__panel_sw,\n\t\t&.ck-dropdown__panel_smw,\n\t\t&.ck-dropdown__panel_sme,\n\t\t&.ck-dropdown__panel_s {\n\t\t\t/*\n\t\t\t * Using transform: translate3d( 0, 100%, 0 ) causes blurry dropdown on Chrome 67-78+ on non-retina displays.\n\t\t\t * See https://github.com/ckeditor/ckeditor5/issues/1053.\n\t\t\t */\n\t\t\ttop: 100%;\n\t\t\tbottom: auto;\n\t\t}\n\n\t\t&.ck-dropdown__panel_ne,\n\t\t&.ck-dropdown__panel_se {\n\t\t\tleft: 0px;\n\t\t}\n\n\t\t&.ck-dropdown__panel_nw,\n\t\t&.ck-dropdown__panel_sw {\n\t\t\tright: 0px;\n\t\t}\n\n\t\t&.ck-dropdown__panel_s,\n\t\t&.ck-dropdown__panel_n {\n\t\t\t/* Positioning panels relative to the center of the button */\n\t\t\tleft: 50%;\n\t\t\ttransform: translateX(-50%);\n\t\t}\n\n\t\t&.ck-dropdown__panel_nmw,\n\t\t&.ck-dropdown__panel_smw {\n\t\t\t/* Positioning panels relative to the middle-west of the button */\n\t\t\tleft: 75%;\n\t\t\ttransform: translateX(-75%);\n\t\t}\n\n\t\t&.ck-dropdown__panel_nme,\n\t\t&.ck-dropdown__panel_sme {\n\t\t\t/* Positioning panels relative to the middle-east of the button */\n\t\t\tleft: 25%;\n\t\t\ttransform: translateX(-25%);\n\t\t}\n\t}\n}\n\n/*\n * Toolbar dropdown panels should be always above the UI (eg. other dropdown panels) from the editor's content.\n * See https://github.com/ckeditor/ckeditor5/issues/7874\n */\n.ck.ck-toolbar .ck-dropdown__panel {\n\tz-index: calc( var(--ck-z-panel) + 1 );\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_shadow.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n:root {\n\t--ck-dropdown-arrow-size: calc(0.5 * var(--ck-icon-size));\n}\n\n.ck.ck-dropdown {\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t& .ck-dropdown__arrow {\n\t\twidth: var(--ck-dropdown-arrow-size);\n\t}\n\n\t@mixin ck-dir ltr {\n\t\t& .ck-dropdown__arrow {\n\t\t\tright: var(--ck-spacing-standard);\n\n\t\t\t/* A space to accommodate the triangle. */\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-dir rtl {\n\t\t& .ck-dropdown__arrow {\n\t\t\tleft: var(--ck-spacing-standard);\n\n\t\t\t/* A space to accommodate the triangle. */\n\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t}\n\t}\n\n\t&.ck-disabled .ck-dropdown__arrow {\n\t\t@mixin ck-disabled;\n\t}\n\n\t& .ck-button.ck-dropdown__button {\n\t\t@mixin ck-dir ltr {\n\t\t\t&:not(.ck-button_with-text) {\n\t\t\t\t/* Make sure dropdowns with just an icon have the right inner spacing */\n\t\t\t\tpadding-left: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t&:not(.ck-button_with-text) {\n\t\t\t\t/* Make sure dropdowns with just an icon have the right inner spacing */\n\t\t\t\tpadding-right: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\n\t\t/* #23 */\n\t\t& .ck-button__label {\n\t\t\twidth: 7em;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */\n\t\t&.ck-disabled .ck-button__label {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5/issues/816 */\n\t\t&.ck-on {\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t&.ck-dropdown__button_label-width_auto .ck-button__label {\n\t\t\twidth: auto;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5/issues/8699 */\n\t\t&.ck-off:active,\n\t\t&.ck-on:active {\n\t\t\tbox-shadow: none;\n\n\t\t\t&:focus {\n\t\t\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck.ck-dropdown__panel {\n\t@mixin ck-rounded-corners;\n\t@mixin ck-drop-shadow;\n\n\tbackground: var(--ck-color-dropdown-panel-background);\n\tborder: 1px solid var(--ck-color-dropdown-panel-border);\n\tbottom: 0;\n\n\t/* Make sure the panel is at least as wide as the drop-down\'s button. */\n\tmin-width: 100%;\n\n\t/* Disabled corner border radius to be consistent with the .dropdown__button\n\thttps://github.com/ckeditor/ckeditor5/issues/816 */\n\t&.ck-dropdown__panel_se {\n\t\tborder-top-left-radius: 0;\n\t}\n\n\t&.ck-dropdown__panel_sw {\n\t\tborder-top-right-radius: 0;\n\t}\n\n\t&.ck-dropdown__panel_ne {\n\t\tborder-bottom-left-radius: 0;\n\t}\n\n\t&.ck-dropdown__panel_nw {\n\t\tborder-bottom-right-radius: 0;\n\t}\n\n\t&:focus {\n\t\toutline: none;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},2454:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-dropdown>.ck-dropdown__panel>.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown>.ck-dropdown__panel>.ck-list,.ck.ck-dropdown>.ck-dropdown__panel>.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:first-child>.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:first-child>.ck-button,.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:first-child>.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0}.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:last-child>.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:last-child>.ck-button,.ck.ck-dropdown>.ck-dropdown__panel>.ck-list .ck-list__item:last-child>.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/listdropdown.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,6CCIC,eDqBD,CAzBA,iICQE,qCAAsC,CDJtC,wBAqBF,CAfE,mFCND,eDYC,CANA,6MCFA,qCAAsC,CDKpC,2BAA4B,CAC5B,4BAA6B,CAF7B,wBAIF,CAEA,kFCdD,eDmBC,CALA,2MCVA,qCAAsC,CDYpC,wBAAyB,CACzB,yBAEF",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n.ck.ck-dropdown > .ck-dropdown__panel > .ck-list {\n\t/* Disabled radius of top-left border to be consistent with .dropdown__button\n\thttps://github.com/ckeditor/ckeditor5/issues/816 */\n\t@mixin ck-rounded-corners {\n\t\tborder-top-left-radius: 0;\n\t}\n\n\t/* Make sure the button belonging to the first/last child of the list goes well with the\n\tborder radius of the entire panel. */\n\t& .ck-list__item {\n\t\t&:first-child > .ck-button {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t\tborder-bottom-right-radius: 0;\n\t\t\t}\n\t\t}\n\n\t\t&:last-child > .ck-button {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t\tborder-top-right-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},7133:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,'.ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-right-radius:unset;border-top-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-left-radius:unset;border-top-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-left-radius:unset;border-top-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-right-radius:unset;border-top-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton>.ck-splitbutton__arrow:not(:focus){border-bottom-width:0;border-top-width:0}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{background-color:var(--ck-color-split-button-hover-border);content:"";height:100%;position:absolute;width:1px}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:focus:after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:focus:after{--ck-color-split-button-hover-border:var(--ck-color-focus-border)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{left:-1px}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{right:-1px}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/splitbutton.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/splitbutton.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,mBAEC,iBAKD,CAHC,iDACC,qCACD,CCJD,MACC,gDAAyD,CACzD,4CACD,CAMC,oIAKE,gCAAiC,CADjC,6BASF,CAbA,oIAWE,+BAAgC,CADhC,4BAGF,CAEA,0CAGC,eAiBD,CApBA,oDAQE,+BAAgC,CADhC,4BAaF,CApBA,oDAcE,gCAAiC,CADjC,6BAOF,CAHC,8CACC,mCACD,CAKD,sDAEC,qBAAwB,CADxB,kBAED,CAQC,0KACC,wDACD,CAIA,8JAKC,0DAA2D,CAJ3D,UAAW,CAGX,WAAY,CAFZ,iBAAkB,CAClB,SAGD,CAGA,sIACC,iEACD,CAGC,kLACC,SACD,CAIA,kLACC,UACD,CAMF,uCCzFA,eDmGA,CAVA,qHCrFC,qCD+FD,CARE,qKACC,2BACD,CAEA,mKACC,4BACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-splitbutton {\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t& .ck-splitbutton__action:focus {\n\t\tz-index: calc(var(--ck-z-default) + 1);\n\t}\n}\n\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n:root {\n\t--ck-color-split-button-hover-background: hsl(0, 0%, 92%);\n\t--ck-color-split-button-hover-border: hsl(0, 0%, 70%);\n}\n\n.ck.ck-splitbutton {\n\t/*\n\t * Note: ck-rounded and ck-dir mixins don\'t go together (because they both use @nest).\n\t */\n\t&:hover > .ck-splitbutton__action,\n\t&.ck-splitbutton_open > .ck-splitbutton__action {\n\t\t@nest [dir="ltr"] & {\n\t\t\t/* Don\'t round the action button on the right side */\n\t\t\tborder-top-right-radius: unset;\n\t\t\tborder-bottom-right-radius: unset;\n\t\t}\n\n\t\t@nest [dir="rtl"] & {\n\t\t\t/* Don\'t round the action button on the left side */\n\t\t\tborder-top-left-radius: unset;\n\t\t\tborder-bottom-left-radius: unset;\n\t\t}\n\t}\n\n\t& > .ck-splitbutton__arrow {\n\t\t/* It\'s a text-less button and since the icon is positioned absolutely in such situation,\n\t\tit must get some arbitrary min-width. */\n\t\tmin-width: unset;\n\n\t\t@nest [dir="ltr"] & {\n\t\t\t/* Don\'t round the arrow button on the left side */\n\t\t\tborder-top-left-radius: unset;\n\t\t\tborder-bottom-left-radius: unset;\n\t\t}\n\n\t\t@nest [dir="rtl"] & {\n\t\t\t/* Don\'t round the arrow button on the right side */\n\t\t\tborder-top-right-radius: unset;\n\t\t\tborder-bottom-right-radius: unset;\n\t\t}\n\n\t\t& svg {\n\t\t\twidth: var(--ck-dropdown-arrow-size);\n\t\t}\n\t}\n\n\t/* Make sure the divider stretches 100% height of the button\n\thttps://github.com/ckeditor/ckeditor5/issues/10936 */\n\t& > .ck-splitbutton__arrow:not(:focus) {\n\t\tborder-top-width: 0px;\n\t\tborder-bottom-width: 0px;\n\t}\n\n\t/* When the split button is "open" (the arrow is on) or being hovered, it should get some styling\n\tas a whole. The background of both buttons should stand out and there should be a visual\n\tseparation between both buttons. */\n\t&.ck-splitbutton_open,\n\t&:hover {\n\t\t/* When the split button hovered as a whole, not as individual buttons. */\n\t\t& > .ck-button:not(.ck-on):not(.ck-disabled):not(:hover) {\n\t\t\tbackground: var(--ck-color-split-button-hover-background);\n\t\t}\n\n\t\t/* Splitbutton separator needs to be set with the ::after pseudoselector\n\t\tto display properly the borders on focus */\n\t\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n\t\t\tcontent: \'\';\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t\theight: 100%;\n\t\t\tbackground-color: var(--ck-color-split-button-hover-border);\n\t\t}\n\n\t\t/* Make sure the divider between the buttons looks fine when the button is focused */\n\t\t& > .ck-splitbutton__arrow:focus::after {\n\t\t\t--ck-color-split-button-hover-border: var(--ck-color-focus-border);\n\t\t}\n\n\t\t@nest [dir="ltr"] & {\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n\t\t\t\tleft: -1px;\n\t\t\t}\n\t\t}\n\n\t\t@nest [dir="rtl"] & {\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n\t\t\t\tright: -1px;\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Don\'t round the bottom left and right corners of the buttons when "open"\n\thttps://github.com/ckeditor/ckeditor5/issues/816 */\n\t&.ck-splitbutton_open {\n\t\t@mixin ck-rounded-corners {\n\t\t\t& > .ck-splitbutton__action {\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t}\n\n\t\t\t& > .ck-splitbutton__arrow {\n\t\t\t\tborder-bottom-right-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},7475:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{max-width:var(--ck-toolbar-dropdown-max-width);width:max-content}.ck.ck-toolbar-dropdown>.ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/toolbardropdown.css"],names:[],mappings:"AAKA,MACC,oCACD,CAEA,4CAGC,8CAA+C,CAD/C,iBAQD,CAJE,6DACC,qCACD,CCZF,oCACC,QACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-toolbar-dropdown-max-width: 60vw;\n}\n\n.ck.ck-toolbar-dropdown > .ck-dropdown__panel {\n\t/* https://github.com/ckeditor/ckeditor5/issues/5586 */\n\twidth: max-content;\n\tmax-width: var(--ck-toolbar-dropdown-max-width);\n\n\t& .ck-button {\n\t\t&:focus {\n\t\t\tz-index: calc(var(--ck-z-default) + 1);\n\t\t}\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-toolbar-dropdown .ck-toolbar {\n\tborder: 0;\n}\n"],sourceRoot:""}]);const a=s},9550:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,":root{--ck-accessibility-help-dialog-max-width:600px;--ck-accessibility-help-dialog-max-height:400px;--ck-accessibility-help-dialog-border-color:#ccced1;--ck-accessibility-help-dialog-code-background-color:#ededed;--ck-accessibility-help-dialog-kbd-shadow-color:#9c9c9c}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content{border:1px solid transparent;max-height:var(--ck-accessibility-help-dialog-max-height);max-width:var(--ck-accessibility-help-dialog-max-width);overflow:auto;padding:var(--ck-spacing-large);user-select:text}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content{*{white-space:normal}}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content .ck-label{display:none}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h3{font-size:1.2em;font-weight:700}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h4{font-size:1em;font-weight:700}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h3,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content h4,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content p,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content table{margin:1em 0}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl{border-bottom:none;border-top:1px solid var(--ck-accessibility-help-dialog-border-color);display:grid;grid-template-columns:2fr 1fr}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dd,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dt{border-bottom:1px solid var(--ck-accessibility-help-dialog-border-color);padding:.4em 0}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dt{grid-column-start:1}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content dl dd{grid-column-start:2;text-align:right}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content code,.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content kbd{background:var(--ck-accessibility-help-dialog-code-background-color);border-radius:2px;display:inline-block;font-size:.9em;line-height:1;padding:.4em;text-align:center;vertical-align:middle}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content code{font-family:monospace}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content kbd{box-shadow:0 1px 1px var(--ck-accessibility-help-dialog-kbd-shadow-color);margin:0 1px;min-width:1.8em}.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content kbd+kbd{margin-left:2px}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/editorui/accessibilityhelp.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAQA,MACC,8CAA+C,CAC/C,+CAAgD,CAChD,mDAA8D,CAC9D,4DAAyE,CACzE,uDACD,CAEA,wEAOC,4BAA6B,CAJ7B,yDAA0D,CAD1D,uDAAwD,CAExD,aAAc,CAHd,+BAAgC,CAIhC,gBAgFD,CA5EC,8ECdA,2BAA2B,CCF3B,2CAA8B,CDC9B,YDkBA,CAZD,wEAcC,EACC,kBACD,CAqED,CAlEC,kFACC,YACD,CAEA,2EAEC,eAAgB,CADhB,eAED,CAEA,2EAEC,aAAc,CADd,eAED,CAEA,8SAIC,YACD,CAEA,2EAIC,kBAAmB,CADnB,qEAAsE,CAFtE,YAAa,CACb,6BAiBD,CAbC,4JACC,wEAAyE,CACzE,cACD,CAEA,8EACC,mBACD,CAEA,8EACC,mBAAoB,CACpB,gBACD,CAGD,yJAEC,oEAAqE,CAIrE,iBAAkB,CALlB,oBAAqB,CAOrB,cAAe,CAHf,aAAc,CAFd,YAAa,CAIb,iBAAkB,CAHlB,qBAKD,CAEA,6EACC,qBACD,CAEA,4EAEC,yEAA4E,CAC5E,YAAa,CAFb,eAOD,CAHC,gFACC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_focus.css";\n@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-accessibility-help-dialog-max-width: 600px;\n\t--ck-accessibility-help-dialog-max-height: 400px;\n\t--ck-accessibility-help-dialog-border-color: hsl(220, 6%, 81%);\n\t--ck-accessibility-help-dialog-code-background-color: hsl(0deg 0% 92.94%);\n\t--ck-accessibility-help-dialog-kbd-shadow-color: hsl(0deg 0% 61%);\n}\n\n.ck.ck-accessibility-help-dialog .ck-accessibility-help-dialog__content {\n\tpadding: var(--ck-spacing-large);\n\tmax-width: var(--ck-accessibility-help-dialog-max-width);\n\tmax-height: var(--ck-accessibility-help-dialog-max-height);\n\toverflow: auto;\n\tuser-select: text;\n\n\tborder: 1px solid transparent;\n\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t}\n\n\t* {\n\t\twhite-space: normal;\n\t}\n\n\t/* Hide the main label of the content container. */\n\t& .ck-label {\n\t\tdisplay: none;\n\t}\n\n\t& h3 {\n\t\tfont-weight: bold;\n\t\tfont-size: 1.2em;\n\t}\n\n\t& h4 {\n\t\tfont-weight: bold;\n\t\tfont-size: 1em;\n\t}\n\n\t& p,\n\t& h3,\n\t& h4,\n\t& table {\n\t\tmargin: 1em 0;\n\t}\n\n\t& dl {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: 2fr 1fr;\n\t\tborder-top: 1px solid var(--ck-accessibility-help-dialog-border-color);\n\t\tborder-bottom: none;\n\n\t\t& dt, & dd {\n\t\t\tborder-bottom: 1px solid var(--ck-accessibility-help-dialog-border-color);\n\t\t\tpadding: .4em 0;\n\t\t}\n\n\t\t& dt {\n\t\t\tgrid-column-start: 1;\n\t\t}\n\n\t\t& dd {\n\t\t\tgrid-column-start: 2;\n\t\t\ttext-align: right;\n\t\t}\n\t}\n\n\t& kbd, & code {\n\t\tdisplay: inline-block;\n\t\tbackground: var(--ck-accessibility-help-dialog-code-background-color);\n\t\tpadding: .4em;\n\t\tvertical-align: middle;\n\t\tline-height: 1;\n\t\tborder-radius: 2px;\n\t\ttext-align: center;\n\t\tfont-size: .9em;\n\t}\n\n\t& code {\n\t\tfont-family: monospace;\n\t}\n\n\t& kbd {\n\t\tmin-width: 1.8em;\n\t\tbox-shadow: 0px 1px 1px var(--ck-accessibility-help-dialog-kbd-shadow-color);\n\t\tmargin: 0 1px;\n\n\t\t& + kbd {\n\t\t\tmargin-left: 2px;\n\t\t}\n\t}\n}\n\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},178:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,":root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable.ck-rounded-corners:not(.ck-editor__nested-editable){border-radius:var(--ck-border-radius)}.ck.ck-editor__editable.ck-focused:not(.ck-editor__nested-editable){border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck.ck-editor__editable_inline{border:1px solid transparent;overflow:auto;padding:0 var(--ck-spacing-standard)}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-panel-background)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-panel-background)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/editorui/editorui.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAWA,MACC,0CACD,CAEA,yDCJC,eDWD,CAPA,yJCAE,qCDOF,CAJC,oEEPA,2BAA2B,CCF3B,qCAA8B,CDC9B,YFWA,CAGD,+BAGC,4BAA6B,CAF7B,aAAc,CACd,oCA6BD,CA1BC,wCACC,eACD,CAEA,wCACC,gBACD,CAGA,4CACC,kCACD,CAGA,2CAKC,qCACD,CAGA,sDACC,kDACD,CAKA,gEACC,oDACD,CAIA,gEACC,iDACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_shadow.css";\n@import "../../../mixins/_focus.css";\n@import "../../mixins/_button.css";\n\n:root {\n\t--ck-color-editable-blur-selection: hsl(0, 0%, 85%);\n}\n\n.ck.ck-editor__editable:not(.ck-editor__nested-editable) {\n\t@mixin ck-rounded-corners;\n\n\t&.ck-focused {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-inner-shadow);\n\t}\n}\n\n.ck.ck-editor__editable_inline {\n\toverflow: auto;\n\tpadding: 0 var(--ck-spacing-standard);\n\tborder: 1px solid transparent;\n\n\t&[dir="ltr"] {\n\t\ttext-align: left;\n\t}\n\n\t&[dir="rtl"] {\n\t\ttext-align: right;\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/116 */\n\t& > *:first-child {\n\t\tmargin-top: var(--ck-spacing-large);\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5/issues/847 */\n\t& > *:last-child {\n\t\t/*\n\t\t * This value should match with the default margins of the block elements (like .media or .image)\n\t\t * to avoid a content jumping when the fake selection container shows up (See https://github.com/ckeditor/ckeditor5/issues/9825).\n\t\t */\n\t\tmargin-bottom: var(--ck-spacing-large);\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5/issues/6517 */\n\t&.ck-blurred ::selection {\n\t\tbackground: var(--ck-color-editable-blur-selection);\n\t}\n}\n\n/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/111 */\n.ck.ck-balloon-panel.ck-toolbar-container[class*="arrow_n"] {\n\t&::after {\n\t\tborder-bottom-color: var(--ck-color-panel-background);\n\t}\n}\n\n.ck.ck-balloon-panel.ck-toolbar-container[class*="arrow_s"] {\n\t&::after {\n\t\tborder-top-color: var(--ck-color-panel-background);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},4866:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-form__header{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__header h2.ck-form__header__label{flex-grow:1}:root{--ck-form-header-height:44px}.ck.ck-form__header{border-bottom:1px solid var(--ck-color-base-border);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);padding:var(--ck-spacing-small) var(--ck-spacing-large)}[dir=ltr] .ck.ck-form__header>.ck-icon{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-form__header>.ck-icon{margin-left:var(--ck-spacing-medium)}.ck.ck-form__header .ck-form__header__label{--ck-font-size-base:15px;font-weight:700}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/formheader/formheader.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/formheader/formheader.css"],names:[],mappings:"AAKA,oBAIC,kBAAmB,CAHnB,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CAEjB,6BAKD,CAHC,8CACC,WACD,CCPD,MACC,4BACD,CAEA,oBAIC,mDAAoD,CAFpD,mCAAoC,CACpC,wCAAyC,CAFzC,uDAmBD,CAdC,uCAEE,qCAMF,CARA,uCAME,oCAEF,CAEA,4CACC,wBAAyB,CACzB,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-form__header {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\talign-items: center;\n\tjustify-content: space-between;\n\n\t& h2.ck-form__header__label {\n\t\tflex-grow: 1;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n:root {\n\t--ck-form-header-height: 44px;\n}\n\n.ck.ck-form__header {\n\tpadding: var(--ck-spacing-small) var(--ck-spacing-large);\n\theight: var(--ck-form-header-height);\n\tline-height: var(--ck-form-header-height);\n\tborder-bottom: 1px solid var(--ck-color-base-border);\n\n\t& > .ck-icon {\n\t\t@mixin ck-dir ltr {\n\t\t\tmargin-right: var(--ck-spacing-medium);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tmargin-left: var(--ck-spacing-medium);\n\t\t}\n\t}\n\n\t& .ck-form__header__label {\n\t\t--ck-font-size-base: 15px;\n\t\tfont-weight: bold;\n\t}\n}\n'],sourceRoot:""}]);const a=s},1998:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-highlighted-text mark{background:var(--ck-color-highlight-background);font-size:inherit;font-weight:inherit;line-height:inherit;vertical-align:initial}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/highlightedtext/highlightedtext.css"],names:[],mappings:"AAKA,6BACC,+CAAgD,CAIhD,iBAAkB,CAFlB,mBAAoB,CACpB,mBAAoB,CAFpB,sBAID",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-highlighted-text mark {\n\tbackground: var(--ck-color-highlight-background);\n\tvertical-align: initial;\n\tfont-weight: inherit;\n\tline-height: inherit;\n\tfont-size: inherit;\n}\n"],sourceRoot:""}]);const a=s},4106:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal));--ck-icon-font-size:.8333350694em}.ck.ck-icon{font-size:var(--ck-icon-font-size);height:var(--ck-icon-size);width:var(--ck-icon-size);will-change:transform}.ck.ck-icon,.ck.ck-icon *{cursor:inherit}.ck.ck-icon.ck-icon_inherit-color,.ck.ck-icon.ck-icon_inherit-color *{color:inherit}.ck.ck-icon.ck-icon_inherit-color :not([fill]){fill:currentColor}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/icon/icon.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/icon/icon.css"],names:[],mappings:"AAKA,YACC,qBACD,CCFA,MACC,0EAA6E,CAC7E,iCACD,CAEA,YAKC,kCAAmC,CAHnC,0BAA2B,CAD3B,yBAA0B,CAU1B,qBAoBD,CAlBC,0BALA,cAQA,CAMC,sEACC,aAMD,CAJC,+CAEC,iBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-icon {\n\tvertical-align: middle;\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-icon-size: calc(var(--ck-line-height-base) * var(--ck-font-size-normal));\n\t--ck-icon-font-size: .8333350694em;\n}\n\n.ck.ck-icon {\n\twidth: var(--ck-icon-size);\n\theight: var(--ck-icon-size);\n\n\t/* Multiplied by the height of the line in "px" should give SVG "viewport" dimensions */\n\tfont-size: var(--ck-icon-font-size);\n\n\t/* Inherit cursor style (#5). */\n\tcursor: inherit;\n\n\t/* This will prevent blurry icons on Firefox. See #340. */\n\twill-change: transform;\n\n\t& * {\n\t\t/* Inherit cursor style (#5). */\n\t\tcursor: inherit;\n\t}\n\n\t/* Allows dynamic coloring of an icon by inheriting its color from the parent. */\n\t&.ck-icon_inherit-color {\n\t\tcolor: inherit;\n\n\t\t& * {\n\t\t\tcolor: inherit;\n\n\t\t\t&:not([fill]) {\n\t\t\t\t/* Needed by FF. */\n\t\t\t\tfill: currentColor;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},1546:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,":root{--ck-input-width:18em;--ck-input-text-width:var(--ck-input-width)}.ck.ck-input{border-radius:0}.ck-rounded-corners .ck.ck-input,.ck.ck-input.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);min-height:var(--ck-ui-component-min-height);min-width:var(--ck-input-width);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}@media (prefers-reduced-motion:reduce){.ck.ck-input{transition:none}}.ck.ck-input:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-input[readonly]{background:var(--ck-color-input-disabled-background);border:1px solid var(--ck-color-input-disabled-border);color:var(--ck-color-input-disabled-text)}.ck.ck-input[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input.ck-error{animation:ck-input-shake .3s ease both;border-color:var(--ck-color-input-error-border)}@media (prefers-reduced-motion:reduce){.ck.ck-input.ck-error{animation:none}}.ck.ck-input.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/input/input.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AASA,MACC,qBAAsB,CAGtB,2CACD,CAEA,aCLC,eDmDD,CA9CA,iECDE,qCD+CF,CA9CA,aAGC,2CAA4C,CAC5C,6CAA8C,CAK9C,4CAA6C,CAH7C,+BAAgC,CADhC,6DAA8D,CAO9D,4DAkCD,CAhCC,uCAdD,aAeE,eA+BF,CA9BC,CAEA,mBEvBA,2BAA2B,CCF3B,2CAA8B,CDC9B,YF2BA,CAEA,uBAEC,oDAAqD,CADrD,sDAAuD,CAEvD,yCAMD,CAJC,6BGnCD,oDHsCC,CAGD,sBAEC,sCAAuC,CADvC,+CAUD,CAPC,uCAJD,sBAKE,cAMF,CALC,CAEA,4BGjDD,iDHmDC,CAIF,0BACC,IACC,0BACD,CAEA,IACC,yBACD,CAEA,IACC,0BACD,CAEA,IACC,yBACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_focus.css";\n@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-input-width: 18em;\n\n\t/* Backward compatibility. */\n\t--ck-input-text-width: var(--ck-input-width);\n}\n\n.ck.ck-input {\n\t@mixin ck-rounded-corners;\n\n\tbackground: var(--ck-color-input-background);\n\tborder: 1px solid var(--ck-color-input-border);\n\tpadding: var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);\n\tmin-width: var(--ck-input-width);\n\n\t/* This is important to stay of the same height as surrounding buttons */\n\tmin-height: var(--ck-ui-component-min-height);\n\n\t/* Apply some smooth transition to the box-shadow and border. */\n\ttransition: box-shadow .1s ease-in-out, border .1s ease-in-out;\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\ttransition: none;\n\t}\n\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t}\n\n\t&[readonly] {\n\t\tborder: 1px solid var(--ck-color-input-disabled-border);\n\t\tbackground: var(--ck-color-input-disabled-background);\n\t\tcolor: var(--ck-color-input-disabled-text);\n\n\t\t&:focus {\n\t\t\t/* The read-only input should have a slightly less visible shadow when focused. */\n\t\t\t@mixin ck-box-shadow var(--ck-focus-disabled-outer-shadow);\n\t\t}\n\t}\n\n\t&.ck-error {\n\t\tborder-color: var(--ck-color-input-error-border);\n\t\tanimation: ck-input-shake .3s ease both;\n\n\t\t@media (prefers-reduced-motion: reduce) {\n\t\t\tanimation: none;\n\t\t}\n\n\t\t&:focus {\n\t\t\t@mixin ck-box-shadow var(--ck-focus-error-outer-shadow);\n\t\t}\n\t}\n}\n\n@keyframes ck-input-shake {\n\t20% {\n\t\ttransform: translateX(-2px);\n\t}\n\n\t40% {\n\t\ttransform: translateX(2px);\n\t}\n\n\t60% {\n\t\ttransform: translateX(-1px);\n\t}\n\n\t80% {\n\t\ttransform: translateX(1px);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},4606:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/label/label.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/label/label.css"],names:[],mappings:"AAKA,aACC,aACD,CAEA,mBACC,YACD,CCNA,aACC,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-label {\n\tdisplay: block;\n}\n\n.ck.ck-voice-label {\n\tdisplay: none;\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-label {\n\tfont-weight: bold;\n}\n"],sourceRoot:""}]);const a=s},6365:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-labeled-field-label-default-position-x:var(--ck-spacing-medium);--ck-labeled-field-label-default-position-y:calc(var(--ck-font-size-base)*0.6);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);transform-origin:0 0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0;transform:translate(calc(var(--ck-spacing-medium)*-1),-6px) scale(.75);transform-origin:100% 0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:var(--ck-color-labeled-field-label-background);font-weight:400;line-height:normal;max-width:100%;overflow:hidden;padding:0 calc(var(--ck-font-size-tiny)*.5);pointer-events:none;text-overflow:ellipsis;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}@media (prefers-reduced-motion:reduce){.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transition:none}}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label,.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder):not(.ck-error)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-labeled-field-label-default-position-x),var(--ck-labeled-field-label-default-position-y)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder):not(.ck-error)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-labeled-field-label-default-position-x)*-1),var(--ck-labeled-field-label-default-position-y)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder):not(.ck-error)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:transparent;max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/labeledfield/labeledfieldview.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAMC,mEACC,YAAa,CACb,iBACD,CAEA,uCACC,aAAc,CACd,iBACD,CCND,MACC,kEAAsE,CACtE,gFAAiF,CACjF,oEAAqE,CACrE,8EAAiF,CACjF,yEACD,CAEA,0BCLC,eDmHD,CA9GA,2FCDE,qCD+GF,CA3GC,mEACC,UAwCD,CAtCC,gFACC,KAoCD,CArCA,0FAIE,MAAS,CAGT,6DAA+D,CAF/D,oBAgCF,CArCA,0FAWE,OAAU,CAEV,sEAA0E,CAD1E,uBAyBF,CArCA,gFAkBC,yDAA0D,CAG1D,eAAmB,CADnB,kBAAoB,CAOpB,cAAe,CAFf,eAAgB,CANhB,2CAA8C,CAH9C,mBAAoB,CAQpB,sBAAuB,CAKvB,+JAQD,CAHC,uCAlCD,gFAmCE,eAEF,CADC,CASD,mKACC,gCACD,CAGD,yDACC,mCAAoC,CACpC,kCAAmC,CAInC,kBAKD,CAHC,6FACC,gCACD,CAID,4OAEC,yCACD,CAIA,2XAGE,+HAYF,CAfA,2XAOE,wIAQF,CAfA,uWAaC,sBAAuB,CAFvB,iEAAkE,CAGlE,SACD,CAKA,8FACC,sBACD,CAGA,yIACC,SACD,CAGA,kMACC,8HACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-labeled-field-view {\n\t& > .ck.ck-labeled-field-view__input-wrapper {\n\t\tdisplay: flex;\n\t\tposition: relative;\n\t}\n\n\t& .ck.ck-label {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n@import "../../../mixins/_rounded.css";\n\n:root {\n\t--ck-labeled-field-view-transition: .1s cubic-bezier(0, 0, 0.24, 0.95);\n\t--ck-labeled-field-empty-unfocused-max-width: 100% - 2 * var(--ck-spacing-medium);\n\t--ck-labeled-field-label-default-position-x: var(--ck-spacing-medium);\n\t--ck-labeled-field-label-default-position-y: calc(0.6 * var(--ck-font-size-base));\n\t--ck-color-labeled-field-label-background: var(--ck-color-base-background);\n}\n\n.ck.ck-labeled-field-view {\n\t@mixin ck-rounded-corners;\n\n\t& > .ck.ck-labeled-field-view__input-wrapper {\n\t\twidth: 100%;\n\n\t\t& > .ck.ck-label {\n\t\t\ttop: 0px;\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tleft: 0px;\n\t\t\t\ttransform-origin: 0 0;\n\t\t\t\t/* By default, display the label scaled down above the field. */\n\t\t\t\ttransform: translate(var(--ck-spacing-medium), -6px) scale(.75);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tright: 0px;\n\t\t\t\ttransform-origin: 100% 0;\n\t\t\t\ttransform: translate(calc(-1 * var(--ck-spacing-medium)), -6px) scale(.75);\n\t\t\t}\n\n\t\t\tpointer-events: none;\n\n\t\t\tbackground: var(--ck-color-labeled-field-label-background);\n\t\t\tpadding: 0 calc(.5 * var(--ck-font-size-tiny));\n\t\t\tline-height: initial;\n\t\t\tfont-weight: normal;\n\n\t\t\t/* Prevent overflow when the label is longer than the input */\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\n\t\t\tmax-width: 100%;\n\n\t\t\ttransition:\n\t\t\t\ttransform var(--ck-labeled-field-view-transition),\n\t\t\t\tpadding var(--ck-labeled-field-view-transition),\n\t\t\t\tbackground var(--ck-labeled-field-view-transition);\n\n\t\t\t@media (prefers-reduced-motion: reduce) {\n\t\t\t\ttransition: none;\n\t\t\t}\n\t\t}\n\t}\n\n\t&.ck-error {\n\t\t& > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n\t\t\tcolor: var(--ck-color-base-error);\n\t\t}\n\n\t\t& .ck-input:not([readonly]) + .ck.ck-label {\n\t\t\tcolor: var(--ck-color-base-error);\n\t\t}\n\t}\n\n\t& .ck-labeled-field-view__status {\n\t\tfont-size: var(--ck-font-size-small);\n\t\tmargin-top: var(--ck-spacing-small);\n\n\t\t/* Let the info wrap to the next line to avoid stretching the layout horizontally.\n\t\tThe status could be very long. */\n\t\twhite-space: normal;\n\n\t\t&.ck-labeled-field-view__status_error {\n\t\t\tcolor: var(--ck-color-base-error);\n\t\t}\n\t}\n\n\t/* Disabled fields and fields that have no focus should fade out. */\n\t&.ck-disabled > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label,\n\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n\t\tcolor: var(--ck-color-input-disabled-text);\n\t}\n\n\t/* Fields that are disabled or not focused and without a placeholder should have full-sized labels. */\n\t/* stylelint-disable-next-line no-descending-specificity */\n\t&.ck-disabled.ck-labeled-field-view_empty:not(.ck-labeled-field-view_placeholder) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label,\n\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder):not(.ck-error) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n\t\t@mixin ck-dir ltr {\n\t\t\ttransform: translate(var(--ck-labeled-field-label-default-position-x), var(--ck-labeled-field-label-default-position-y)) scale(1);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\ttransform: translate(calc(-1 * var(--ck-labeled-field-label-default-position-x)), var(--ck-labeled-field-label-default-position-y)) scale(1);\n\t\t}\n\n\t\t/* Compensate for the default translate position. */\n\t\tmax-width: calc(var(--ck-labeled-field-empty-unfocused-max-width));\n\n\t\tbackground: transparent;\n\t\tpadding: 0;\n\t}\n\n\t/*------ DropdownView integration ----------------------------------------------------------------------------------- */\n\n\t/* Make sure dropdown\' background color in any of dropdown\'s state does not collide with labeled field. */\n\t& > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown > .ck.ck-button {\n\t\tbackground: transparent;\n\t}\n\n\t/* When the dropdown is "empty", the labeled field label replaces its label. */\n\t&.ck-labeled-field-view_empty > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown > .ck-button > .ck-button__label {\n\t\topacity: 0;\n\t}\n\n\t/* Make sure the label of the empty, unfocused input does not cover the dropdown arrow. */\n\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder) > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown + .ck-label {\n\t\tmax-width: calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard));\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},6048:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-list{display:flex;flex-direction:column;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{background:var(--ck-color-list-background);list-style-type:none;padding:var(--ck-spacing-small) 0}.ck.ck-list__item{cursor:default;min-width:15em}.ck.ck-list__item>.ck-button:not(.ck-list-item-button){border-radius:0;min-height:unset;padding:var(--ck-spacing-tiny) calc(var(--ck-spacing-standard)*2);width:100%}[dir=ltr] .ck.ck-list__item>.ck-button:not(.ck-list-item-button){text-align:left}[dir=rtl] .ck.ck-list__item>.ck-button:not(.ck-list-item-button){text-align:right}.ck.ck-list__item>.ck-button:not(.ck-list-item-button) .ck-button__label{line-height:calc(var(--ck-line-height-base)*var(--ck-font-size-base))}.ck.ck-list__item>.ck-button:not(.ck-list-item-button):active{box-shadow:none}.ck.ck-list__item>.ck-button.ck-on:not(.ck-list-item-button){background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item>.ck-button.ck-on:not(.ck-list-item-button):active{box-shadow:none}.ck.ck-list__item>.ck-button.ck-on:not(.ck-list-item-button):hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item>.ck-button.ck-on:not(.ck-list-item-button):focus:not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item>.ck-button:not(.ck-list-item-button):hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item>.ck-button.ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item>.ck-button.ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck-list .ck-list__group{padding-top:var(--ck-spacing-medium)}.ck-list .ck-list__group:first-child{padding-top:0}.ck-list .ck-list__group{:not(.ck-hidden)~&{border-top:1px solid var(--ck-color-base-border)}}.ck-list .ck-list__group>.ck-label{font-size:11px;font-weight:700;padding:var(--ck-spacing-medium) var(--ck-spacing-large) 0}.ck.ck-list__separator{background:var(--ck-color-base-border);height:1px;margin:var(--ck-spacing-small) 0;width:100%}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/list/list.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/list/list.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,YAGC,YAAa,CACb,qBAAsB,CCFtB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBDaD,CAZC,2DAEC,aACD,CAKA,kCACC,iBAAkB,CAClB,2BACD,CEdD,YCCC,eDOD,CARA,+DCKE,qCDGF,CARA,YAIC,0CAA2C,CAD3C,oBAAqB,CAIrB,iCACD,CAEA,kBACC,cAAe,CAGf,cA4DD,CA1DC,uDAIC,eAAgB,CAFhB,gBAAiB,CADjB,iEAAoE,CAEpE,UAwCD,CA3CA,iEAOE,eAoCF,CA3CA,iEAWE,gBAgCF,CA7BC,yEAEC,qEACD,CAEA,8DACC,eACD,CAEA,6DACC,oDAAqD,CACrD,yCAaD,CAXC,oEACC,eACD,CAEA,qFACC,0DACD,CAEA,qFACC,4CACD,CAGD,+EACC,uDACD,CAMA,mDACC,0CAA2C,CAC3C,aAMD,CAJC,2EACC,uDAAwD,CACxD,aACD,CAKH,yBACC,oCAiBD,CAdC,qCACC,aACD,CAND,yBASC,mBACC,gDACD,CAOD,CALC,mCACC,cAAe,CACf,eAAiB,CACjB,0DACD,CAGD,uBAGC,sCAAuC,CAFvC,UAAW,CAKX,gCAAiC,CAJjC,UAKD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n\n.ck.ck-list {\n\t@mixin ck-unselectable;\n\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t& .ck-list__item,\n\t& .ck-list__separator {\n\t\tdisplay: block;\n\t}\n\n\t/* Make sure that whatever child of the list item gets focus, it remains on the\n\ttop. Thanks to that, styles like box-shadow, outline, etc. are not masked by\n\tadjacent list items. */\n\t& .ck-list__item > *:focus {\n\t\tposition: relative;\n\t\tz-index: var(--ck-z-default);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_shadow.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-list {\n\t@mixin ck-rounded-corners;\n\n\tlist-style-type: none;\n\tbackground: var(--ck-color-list-background);\n\n\t/* A spacing at the beginning and end of the list */\n\tpadding: var(--ck-spacing-small) 0;\n}\n\n.ck.ck-list__item {\n\tcursor: default;\n\n\t/* Almost as wide as menu bar items. */\n\tmin-width: 15em;\n\n\t& > .ck-button:not(.ck-list-item-button) {\n\t\tpadding: var(--ck-spacing-tiny) calc(2 * var(--ck-spacing-standard));\n\t\tmin-height: unset;\n\t\twidth: 100%;\n\t\tborder-radius: 0;\n\n\t\t@mixin ck-dir ltr {\n\t\t\ttext-align: left;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\ttext-align: right;\n\t\t}\n\n\t\t& .ck-button__label {\n\t\t\t/* https://github.com/ckeditor/ckeditor5-heading/issues/63 */\n\t\t\tline-height: calc(var(--ck-line-height-base) * var(--ck-font-size-base));\n\t\t}\n\n\t\t&:active {\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\t&.ck-on {\n\t\t\tbackground: var(--ck-color-list-button-on-background);\n\t\t\tcolor: var(--ck-color-list-button-on-text);\n\n\t\t\t&:active {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n\t\t\t&:hover:not(.ck-disabled) {\n\t\t\t\tbackground: var(--ck-color-list-button-on-background-focus);\n\t\t\t}\n\n\t\t\t&:focus:not(.ck-disabled) {\n\t\t\t\tborder-color: var(--ck-color-base-background);\n\t\t\t}\n\t\t}\n\n\t\t&:hover:not(.ck-disabled) {\n\t\t\tbackground: var(--ck-color-list-button-hover-background);\n\t\t}\n\t}\n\n\t/* It\'s unnecessary to change the background/text of a switch toggle; it has different ways\n\tof conveying its state (like the switcher) */\n\t& > .ck-button.ck-switchbutton {\n\t\t&.ck-on {\n\t\t\tbackground: var(--ck-color-list-background);\n\t\t\tcolor: inherit;\n\n\t\t\t&:hover:not(.ck-disabled) {\n\t\t\t\tbackground: var(--ck-color-list-button-hover-background);\n\t\t\t\tcolor: inherit;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck-list .ck-list__group {\n\tpadding-top: var(--ck-spacing-medium);\n\n\t/* Lists come with an inner vertical padding. Don\'t duplicate it. */\n\t&:first-child {\n\t\tpadding-top: 0;\n\t}\n\n\t/* The group should have a border when it\'s not the first item. */\n\t*:not(.ck-hidden) ~ & {\n\t\tborder-top: 1px solid var(--ck-color-base-border);\n\t}\n\n\t& > .ck-label {\n\t\tfont-size: 11px;\n\t\tfont-weight: bold;\n\t\tpadding: var(--ck-spacing-medium) var(--ck-spacing-large) 0;\n\t}\n}\n\n.ck.ck-list__separator {\n\theight: 1px;\n\twidth: 100%;\n\tbackground: var(--ck-color-base-border);\n\n\t/* Give the separator some air */\n\tmargin: var(--ck-spacing-small) 0;\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},4782:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-menu-bar{background:var(--ck-color-base-background);border:1px solid var(--ck-color-toolbar-border);display:flex;flex-wrap:wrap;gap:var(--ck-spacing-small);justify-content:flex-start;padding:var(--ck-spacing-small);width:100%}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/menubar/menubar.css"],names:[],mappings:"AAKA,gBAIC,0CAA2C,CAG3C,+CAAgD,CANhD,YAAa,CACb,cAAe,CAIf,2BAA4B,CAH5B,0BAA2B,CAE3B,+BAAgC,CAGhC,UACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-menu-bar {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tjustify-content: flex-start;\n\tbackground: var(--ck-color-base-background);\n\tpadding: var(--ck-spacing-small);\n\tgap: var(--ck-spacing-small);\n\tborder: 1px solid var(--ck-color-toolbar-border);\n\twidth: 100%;\n}\n"],sourceRoot:""}]);const a=s},55:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-menu-bar__menu{display:block;font-size:inherit;position:relative}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level{max-width:100%}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/menubar/menubarmenu.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/menubar/menubarmenu.css"],names:[],mappings:"AAKA,sBACC,aAAc,CCCd,iBAAkB,CDAlB,iBACD,CCCC,kDACC,cACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-menu-bar__menu {\n\tdisplay: block;\n\tposition: relative;\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-menu-bar__menu {\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t&.ck-menu-bar__menu_top-level {\n\t\tmax-width: 100%;\n\t}\n}\n"],sourceRoot:""}]);const a=s},5667:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-menu-bar__menu>.ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-menu-bar__menu>.ck-menu-bar__menu__button{width:100%}.ck.ck-menu-bar__menu>.ck-menu-bar__menu__button>.ck-button__label{flex-grow:1;overflow:hidden;text-overflow:ellipsis}.ck.ck-menu-bar__menu>.ck-menu-bar__menu__button.ck-disabled>.ck-button__label{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-menu-bar__menu>.ck-menu-bar__menu__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-menu-bar__menu>.ck-menu-bar__menu__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button{min-height:unset;padding:var(--ck-spacing-small) var(--ck-spacing-medium)}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button .ck-button__label{line-height:unset;width:unset}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-menu-bar__menu.ck-menu-bar__menu_top-level>.ck-menu-bar__menu__button .ck-icon{display:none}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button{border-radius:0}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{margin-left:var(--ck-spacing-standard);margin-right:calc(var(--ck-spacing-small)*-1);transform:rotate(-90deg)}[dir=rtl] .ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button>.ck-menu-bar__menu__button__arrow{left:var(--ck-spacing-standard);margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small);transform:rotate(90deg)}.ck.ck-menu-bar__menu:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button.ck-disabled>.ck-menu-bar__menu__button__arrow{opacity:var(--ck-disabled-opacity)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/menubar/menubarmenubutton.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/menubar/menubarmenubutton.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AAMC,mFACC,mBAAoB,CACpB,2BACD,CCIA,iDACC,UAuBD,CArBC,mEACC,WAAY,CACZ,eAAgB,CAChB,sBACD,CAEA,+ECbD,kCDeC,CAGC,qFACC,oCACD,CAIA,qFACC,qCACD,CAOF,6EAEC,gBAAiB,CADjB,wDAgBD,CAbC,+FAEC,iBAAkB,CADlB,WAED,CAEA,mFACC,2BAA4B,CAC5B,4BACD,CAEA,sFACC,YACD,CAMD,mFACC,eA+BD,CA7BC,qHACC,mCAuBD,CAxBA,+HAOE,sCAAuC,CAGvC,6CAAgD,CANhD,wBAoBF,CAxBA,+HAgBE,+BAAgC,CAMhC,4CAA+C,CAH/C,oCAAqC,CALrC,uBAUF,CAEA,iICpFD,kCDsFC",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-menu-bar__menu {\n\t& > .ck-menu-bar__menu__button > .ck-menu-bar__menu__button__arrow {\n\t\tpointer-events: none;\n\t\tz-index: var(--ck-z-default);\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_disabled.css";\n@import "../../mixins/_button.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-menu-bar__menu {\n\t/*\n\t * All menu buttons.\n\t */\n\t& > .ck-menu-bar__menu__button {\n\t\twidth: 100%;\n\n\t\t& > .ck-button__label {\n\t\t\tflex-grow: 1;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\n\t\t&.ck-disabled > .ck-button__label {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t@mixin ck-dir ltr {\n\t\t\t&:not(.ck-button_with-text) {\n\t\t\t\tpadding-left: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t&:not(.ck-button_with-text) {\n\t\t\t\tpadding-right: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * Top-level menu buttons only.\n\t */\n\t&.ck-menu-bar__menu_top-level > .ck-menu-bar__menu__button {\n\t\tpadding: var(--ck-spacing-small) var(--ck-spacing-medium);\n\t\tmin-height: unset;\n\n\t\t& .ck-button__label {\n\t\t\twidth: unset;\n\t\t\tline-height: unset;\n\t\t}\n\n\t\t&.ck-on {\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t& .ck-icon {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t/*\n\t * Sub-menu buttons.\n\t */\n\t&:not(.ck-menu-bar__menu_top-level) .ck-menu-bar__menu__button {\n\t\tborder-radius: 0;\n\n\t\t& > .ck-menu-bar__menu__button__arrow {\n\t\t\twidth: var(--ck-dropdown-arrow-size);\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\ttransform: rotate(-90deg);\n\n\t\t\t\t/* A space to accommodate the triangle. */\n\t\t\t\tmargin-left: var(--ck-spacing-standard);\n\n\t\t\t\t/* Nudge the arrow gently to the right because its center of gravity is to the left */\n\t\t\t\tmargin-right: calc(-1 * var(--ck-spacing-small));\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\ttransform: rotate(90deg);\n\n\t\t\t\tleft: var(--ck-spacing-standard);\n\n\t\t\t\t/* A space to accommodate the triangle. */\n\t\t\t\tmargin-right: var(--ck-spacing-small);\n\n\t\t\t\t/* Nudge the arrow gently to the left because its center of gravity is to the right (after rotation). */\n\t\t\t\tmargin-left: calc(-1 * var(--ck-spacing-small));\n\t\t\t}\n\t\t}\n\n\t\t&.ck-disabled > .ck-menu-bar__menu__button__arrow {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\n}\n"],sourceRoot:""}]);const a=s},1214:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,":root{--ck-menu-bar-menu-item-min-width:18em}.ck.ck-menu-bar__menu .ck.ck-menu-bar__menu__item{min-width:var(--ck-menu-bar-menu-item-min-width)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/menubar/menubarmenulistitem.css"],names:[],mappings:"AAKA,MACC,sCACD,CAEA,kDACC,gDACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-menu-bar-menu-item-min-width: 18em;\n}\n\n.ck.ck-menu-bar__menu .ck.ck-menu-bar__menu__item {\n\tmin-width: var(--ck-menu-bar-menu-item-min-width);\n}\n"],sourceRoot:""}]);const a=s},5078:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button{border-radius:0}.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button>.ck-spinner-container,.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button>.ck-spinner-container .ck-spinner{--ck-toolbar-spinner-size:20px}.ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button>.ck-spinner-container{font-size:var(--ck-icon-font-size)}[dir=ltr] .ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button>.ck-spinner-container{margin-right:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-menu-bar__menu .ck-button.ck-menu-bar__menu__item__button>.ck-spinner-container{margin-left:var(--ck-spacing-medium)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/menubar/menubarmenulistitembutton.css"],names:[],mappings:"AAWC,iEACC,eAoBD,CAlBC,0LAGC,8BACD,CAEA,uFAEC,kCASD,CAXA,iGAKE,qCAMF,CAXA,iGASE,oCAEF",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-menu-bar__menu {\n\t/*\n\t * List item buttons.\n\t */\n\t& .ck-button.ck-menu-bar__menu__item__button {\n\t\tborder-radius: 0;\n\n\t\t& > .ck-spinner-container,\n\t\t& > .ck-spinner-container .ck-spinner {\n\t\t\t/* These styles correspond to .ck-icon so that the spinner seamlessly replaces the icon. */\n\t\t\t--ck-toolbar-spinner-size: 20px;\n\t\t}\n\n\t\t& > .ck-spinner-container {\n\t\t\t/* This ensures margins corresponding to the .ck-icon. */\n\t\t\tfont-size: var(--ck-icon-font-size);\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-right: var(--ck-spacing-medium);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-left: var(--ck-spacing-medium);\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n'],sourceRoot:""}]);const a=s},4873:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,":root{--ck-menu-bar-menu-max-width:75vw;--ck-menu-bar-nested-menu-horizontal-offset:5px}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel{max-width:var(--ck-menu-bar-menu-max-width);position:absolute;z-index:var(--ck-z-panel)}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ne,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_nw{bottom:100%}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_se,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_sw{bottom:auto;top:100%}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ne,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_se{left:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_nw,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_sw{right:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_en,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_es{left:calc(100% - var(--ck-menu-bar-nested-menu-horizontal-offset))}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_es{top:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_en{bottom:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_wn,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ws{right:calc(100% - var(--ck-menu-bar-nested-menu-horizontal-offset))}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ws{top:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_wn{bottom:0}:root{--ck-menu-bar-menu-panel-max-width:75vw}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel{border-radius:0}.ck-rounded-corners .ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;height:fit-content;max-width:var(--ck-menu-bar-menu-panel-max-width)}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_es,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_se{border-top-left-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_sw,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ws{border-top-right-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_en,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_ne{border-bottom-left-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_nw,.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel.ck-menu-bar__menu__panel_position_wn{border-bottom-right-radius:0}.ck.ck-menu-bar__menu>.ck.ck-menu-bar__menu__panel:focus{outline:none}.ck.ck-menu-bar .ck-list-item-button:active,.ck.ck-menu-bar .ck-list-item-button:focus{border-color:transparent;box-shadow:none}.ck.ck-menu-bar.ck-menu-bar_focus-border-enabled .ck-list-item-button:active,.ck.ck-menu-bar.ck-menu-bar_focus-border-enabled .ck-list-item-button:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none;position:relative;z-index:2}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/menubar/menubarmenupanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/menubar/menubarmenupanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css"],names:[],mappings:"AAKA,MACC,iCAAkC,CAClC,+CACD,CAEA,mDAEC,2CAA4C,CAC5C,iBAAkB,CAFlB,yBAkDD,CA9CC,gLAEC,WACD,CAEA,gLAGC,WAAY,CADZ,QAED,CAEA,gLAEC,MACD,CAEA,gLAEC,OACD,CAEA,gLAEC,kEACD,CAEA,wFACC,KACD,CAEA,wFACC,QACD,CAEA,gLAEC,mEACD,CAEA,wFACC,KACD,CAEA,wFACC,QACD,CCnDD,MACC,uCACD,CAEA,mDCFC,eDoCD,CAlCA,6ICEE,qCDgCF,CAlCA,mDAIC,oDAAqD,CACrD,sDAAuD,CACvD,QAAS,CEVT,oCAA8B,CFW9B,kBAAmB,CACnB,iDA0BD,CAvBC,gLAEC,wBACD,CAEA,gLAEC,yBACD,CAEA,gLAEC,2BACD,CAEA,gLAEC,4BACD,CAEA,yDACC,YACD,CAKC,uFAEC,wBAAyB,CACzB,eACD,CAIA,yJGhDD,2BAA2B,CDF3B,2CAA8B,CCC9B,YAAa,CHoDX,iBAAkB,CAClB,SAID",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-menu-bar-menu-max-width: 75vw;\n\t--ck-menu-bar-nested-menu-horizontal-offset: 5px;\n}\n\n.ck.ck-menu-bar__menu > .ck.ck-menu-bar__menu__panel {\n\tz-index: var(--ck-z-panel);\n\tmax-width: var(--ck-menu-bar-menu-max-width);\n\tposition: absolute;\n\n\t&.ck-menu-bar__menu__panel_position_ne,\n\t&.ck-menu-bar__menu__panel_position_nw {\n\t\tbottom: 100%;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_se,\n\t&.ck-menu-bar__menu__panel_position_sw {\n\t\ttop: 100%;\n\t\tbottom: auto;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_ne,\n\t&.ck-menu-bar__menu__panel_position_se {\n\t\tleft: 0px;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_nw,\n\t&.ck-menu-bar__menu__panel_position_sw {\n\t\tright: 0px;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_es,\n\t&.ck-menu-bar__menu__panel_position_en {\n\t\tleft: calc( 100% - var(--ck-menu-bar-nested-menu-horizontal-offset) );\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_es {\n\t\ttop: 0px;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_en {\n\t\tbottom: 0px;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_ws,\n\t&.ck-menu-bar__menu__panel_position_wn {\n\t\tright: calc( 100% - var(--ck-menu-bar-nested-menu-horizontal-offset) );\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_ws {\n\t\ttop: 0px;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_wn {\n\t\tbottom: 0px;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_shadow.css";\n@import "../../../mixins/_focus.css";\n\n:root {\n\t--ck-menu-bar-menu-panel-max-width: 75vw;\n}\n\n.ck.ck-menu-bar__menu > .ck.ck-menu-bar__menu__panel {\n\t@mixin ck-rounded-corners;\n\t@mixin ck-drop-shadow;\n\n\tbackground: var(--ck-color-dropdown-panel-background);\n\tborder: 1px solid var(--ck-color-dropdown-panel-border);\n\tbottom: 0;\n\theight: fit-content;\n\tmax-width: var(--ck-menu-bar-menu-panel-max-width);\n\n\t/* Corner border radius consistent with the button. */\n\t&.ck-menu-bar__menu__panel_position_es,\n\t&.ck-menu-bar__menu__panel_position_se {\n\t\tborder-top-left-radius: 0;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_ws,\n\t&.ck-menu-bar__menu__panel_position_sw {\n\t\tborder-top-right-radius: 0;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_en,\n\t&.ck-menu-bar__menu__panel_position_ne {\n\t\tborder-bottom-left-radius: 0;\n\t}\n\n\t&.ck-menu-bar__menu__panel_position_wn,\n\t&.ck-menu-bar__menu__panel_position_nw {\n\t\tborder-bottom-right-radius: 0;\n\t}\n\n\t&:focus {\n\t\toutline: none;\n\t}\n}\n\n.ck.ck-menu-bar {\n\t& .ck-list-item-button {\n\t\t&:focus,\n\t\t&:active {\n\t\t\tborder-color: transparent;\n\t\t\tbox-shadow: none;\n\t\t}\n\t}\n\n\t&.ck-menu-bar_focus-border-enabled .ck-list-item-button {\n\t\t&:focus,\n\t\t&:active {\n\t\t\t/* Fix truncated shadows due to rendering order. */\n\t\t\tposition: relative;\n\t\t\tz-index: 2;\n\n\t\t\t@mixin ck-focus-ring;\n\t\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n"],sourceRoot:""}]);const a=s},5615:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-panel)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-border-width:1px;--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{background:var(--ck-color-panel-background);border:var(--ck-balloon-border-width) solid var(--ck-color-panel-border);box-shadow:var(--ck-drop-shadow),0 0;min-height:15px}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{border-style:solid;height:0;width:0}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border) transparent;margin-top:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent var(--ck-color-panel-background) transparent;margin-top:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent;filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow));margin-bottom:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent transparent;margin-bottom:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_e]:after,.ck.ck-balloon-panel[class*=arrow_e]:before{border-width:var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_e]:before{border-color:transparent transparent transparent var(--ck-color-panel-border);margin-right:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_e]:after{border-color:transparent transparent transparent var(--ck-color-panel-background);margin-right:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_w]:after,.ck.ck-balloon-panel[class*=arrow_w]:before{border-width:var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0}.ck.ck-balloon-panel[class*=arrow_w]:before{border-color:transparent var(--ck-color-panel-border) transparent transparent;margin-left:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_w]:after{border-color:transparent var(--ck-color-panel-background) transparent transparent;margin-left:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);right:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%;top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:before{margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);right:calc(var(--ck-balloon-arrow-height)*-1);top:50%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:before{left:calc(var(--ck-balloon-arrow-height)*-1);margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);top:50%}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/balloonpanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/balloonpanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,MAEC,8DACD,CAEA,qBACC,YAAa,CACb,iBAAkB,CAElB,yBAyCD,CAtCE,+GAEC,UAAW,CACX,iBACD,CAEA,wDACC,6CACD,CAEA,uDACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAGD,8CACC,aACD,CC9CD,MACC,6BAA8B,CAC9B,6BAA8B,CAC9B,8BAA+B,CAC/B,iCAAkC,CAClC,oEACD,CAEA,qBCLC,eDmMD,CA9LA,iFCDE,qCD+LF,CA9LA,qBAMC,2CAA4C,CAC5C,wEAAyE,CEdzE,oCAA8B,CFW9B,eA0LD,CApLE,+GAIC,kBAAmB,CADnB,QAAS,CADT,OAGD,CAIA,uFAEC,mHACD,CAEA,4CACC,6EAA8E,CAC9E,kDACD,CAEA,2CACC,iFAAkF,CAClF,gFACD,CAIA,uFAEC,mHACD,CAEA,4CACC,iEAAkE,CAClE,uDAAwD,CACxD,qDACD,CAEA,2CACC,iFAAkF,CAClF,mFACD,CAIA,uFAEC,mHACD,CAEA,4CACC,6EAA8E,CAC9E,oDACD,CAEA,2CACC,iFAAkF,CAClF,kFACD,CAIA,uFAEC,mHACD,CAEA,4CACC,6EAA8E,CAC9E,mDACD,CAEA,2CACC,iFAAkF,CAClF,iFACD,CAIA,yGAEC,QAAS,CACT,uDAA0D,CAC1D,2CACD,CAIA,2GAEC,+CAAkD,CAClD,2CACD,CAIA,2GAEC,gDAAmD,CACnD,2CACD,CAIA,yGAIC,8CAAiD,CAFjD,QAAS,CACT,uDAED,CAIA,2GAGC,8CAAiD,CADjD,+CAED,CAIA,2GAGC,8CAAiD,CADjD,gDAED,CAIA,6GAIC,8CAAiD,CADjD,uDAA0D,CAD1D,SAGD,CAIA,6GAIC,8CAAiD,CAFjD,QAAS,CACT,sDAED,CAIA,6GAGC,uDAA0D,CAD1D,SAAU,CAEV,2CACD,CAIA,6GAEC,QAAS,CACT,sDAAyD,CACzD,2CACD,CAIA,yGAGC,sDAAyD,CADzD,6CAAgD,CAEhD,OACD,CAIA,yGAEC,4CAA+C,CAC/C,sDAAyD,CACzD,OACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/* Make sure the balloon arrow does not float over its children. */\n\t--ck-balloon-panel-arrow-z-index: calc(var(--ck-z-default) - 3);\n}\n\n.ck.ck-balloon-panel {\n\tdisplay: none;\n\tposition: absolute;\n\n\tz-index: var(--ck-z-panel);\n\n\t&.ck-balloon-panel_with-arrow {\n\t\t&::before,\n\t\t&::after {\n\t\t\tcontent: "";\n\t\t\tposition: absolute;\n\t\t}\n\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&[class*="arrow_n"] {\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&[class*="arrow_s"] {\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_visible {\n\t\tdisplay: block;\n\t}\n}\n','/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-balloon-border-width: 1px;\n\t--ck-balloon-arrow-offset: 2px;\n\t--ck-balloon-arrow-height: 10px;\n\t--ck-balloon-arrow-half-width: 8px;\n\t--ck-balloon-arrow-drop-shadow: 0 2px 2px var(--ck-color-shadow-drop);\n}\n\n.ck.ck-balloon-panel {\n\t@mixin ck-rounded-corners;\n\t@mixin ck-drop-shadow;\n\n\tmin-height: 15px;\n\n\tbackground: var(--ck-color-panel-background);\n\tborder: var(--ck-balloon-border-width) solid var(--ck-color-panel-border);\n\n\t&.ck-balloon-panel_with-arrow {\n\t\t&::before,\n\t\t&::after {\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder-style: solid;\n\t\t}\n\t}\n\n\t&[class*="arrow_n"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width);\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: transparent transparent var(--ck-color-panel-border) transparent;\n\t\t\tmargin-top: calc( -1 * var(--ck-balloon-border-width) );\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: transparent transparent var(--ck-color-panel-background) transparent;\n\t\t\tmargin-top: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n\t\t}\n\t}\n\n\t&[class*="arrow_s"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width);\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: var(--ck-color-panel-border) transparent transparent;\n\t\t\tfilter: drop-shadow(var(--ck-balloon-arrow-drop-shadow));\n\t\t\tmargin-bottom: calc( -1 * var(--ck-balloon-border-width) );\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: var(--ck-color-panel-background) transparent transparent transparent;\n\t\t\tmargin-bottom: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n\t\t}\n\t}\n\n\t&[class*="arrow_e"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height);\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: transparent transparent transparent var(--ck-color-panel-border);\n\t\t\tmargin-right: calc( -1 * var(--ck-balloon-border-width) );\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: transparent transparent transparent var(--ck-color-panel-background);\n\t\t\tmargin-right: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n\t\t}\n\t}\n\n\t&[class*="arrow_w"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0;\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: transparent var(--ck-color-panel-border) transparent transparent;\n\t\t\tmargin-left: calc( -1 * var(--ck-balloon-border-width) );\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: transparent var(--ck-color-panel-background) transparent transparent;\n\t\t\tmargin-left: calc( var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width) );\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_n {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 50%;\n\t\t\tmargin-left: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_nw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_ne {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_s {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 50%;\n\t\t\tmargin-left: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_sw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_se {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_sme {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: 25%;\n\t\t\tmargin-right: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_smw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 25%;\n\t\t\tmargin-left: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_nme {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: 25%;\n\t\t\tmargin-right: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_nmw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 25%;\n\t\t\tmargin-left: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_e {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t\tmargin-top: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: 50%;\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_w {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t\tmargin-top: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},9938:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck .ck-balloon-rotator__navigation{align-items:center;display:flex;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-left:var(--ck-spacing-small);margin-right:var(--ck-spacing-standard)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/balloonrotator.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/balloonrotator.css"],names:[],mappings:"AAKA,oCAEC,kBAAmB,CADnB,YAAa,CAEb,sBACD,CAKA,6CACC,sBACD,CCXA,oCACC,6CAA8C,CAC9C,sDAAuD,CACvD,iCAgBD,CAbC,sCAGC,qCAAsC,CAFtC,oCAAqC,CACrC,kCAED,CAGA,iEAIC,mCAAoC,CAHpC,uCAID,CAMA,2DACC,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-balloon-rotator__navigation {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Buttons inside a toolbar should be centered when rotator bar is wider.\n * See: https://github.com/ckeditor/ckeditor5-ui/issues/495\n */\n.ck .ck-balloon-rotator__content .ck-toolbar {\n\tjustify-content: center;\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-balloon-rotator__navigation {\n\tbackground: var(--ck-color-toolbar-background);\n\tborder-bottom: 1px solid var(--ck-color-toolbar-border);\n\tpadding: 0 var(--ck-spacing-small);\n\n\t/* Let's keep similar appearance to `ck-toolbar`. */\n\t& > * {\n\t\tmargin-right: var(--ck-spacing-small);\n\t\tmargin-top: var(--ck-spacing-small);\n\t\tmargin-bottom: var(--ck-spacing-small);\n\t}\n\n\t/* Gives counter more breath than buttons. */\n\t& .ck-balloon-rotator__counter {\n\t\tmargin-right: var(--ck-spacing-standard);\n\n\t\t/* We need to use smaller margin because of previous button's right margin. */\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n}\n\n.ck .ck-balloon-rotator__content {\n\n\t/* Disable default annotation shadow inside rotator with fake panels. */\n\t& .ck.ck-annotation-wrapper {\n\t\tbox-shadow: none;\n\t}\n}\n"],sourceRoot:""}]);const a=s},3579:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-panel) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);box-shadow:var(--ck-drop-shadow),0 0;height:100%;min-height:15px;width:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/fakepanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/fakepanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,mBACC,iBAAkB,CAGlB,mCACD,CAEA,uBACC,iBACD,CAEA,mCACC,SACD,CAEA,oCACC,SACD,CCfA,MACC,6CAA8C,CAC9C,2CACD,CAGA,uBAKC,2CAA4C,CAC5C,6CAA8C,CAC9C,qCAAsC,CCXtC,oCAA8B,CDc9B,WAAY,CAPZ,eAAgB,CAMhB,UAED,CAEA,mCACC,0DAA2D,CAC3D,uDACD,CAEA,oCACC,kEAAqE,CACrE,+DACD,CACA,oCACC,kEAAqE,CACrE,+DACD,CAGA,yIAGC,4CACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-fake-panel {\n\tposition: absolute;\n\n\t/* Fake panels should be placed under main balloon content. */\n\tz-index: calc(var(--ck-z-panel) - 1);\n}\n\n.ck .ck-fake-panel div {\n\tposition: absolute;\n}\n\n.ck .ck-fake-panel div:nth-child( 1 ) {\n\tz-index: 2;\n}\n\n.ck .ck-fake-panel div:nth-child( 2 ) {\n\tz-index: 1;\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-balloon-fake-panel-offset-horizontal: 6px;\n\t--ck-balloon-fake-panel-offset-vertical: 6px;\n}\n\n/* Let\'s use `.ck-balloon-panel` appearance. See: balloonpanel.css. */\n.ck .ck-fake-panel div {\n\t@mixin ck-drop-shadow;\n\n\tmin-height: 15px;\n\n\tbackground: var(--ck-color-panel-background);\n\tborder: 1px solid var(--ck-color-panel-border);\n\tborder-radius: var(--ck-border-radius);\n\n\twidth: 100%;\n\theight: 100%;\n}\n\n.ck .ck-fake-panel div:nth-child( 1 ) {\n\tmargin-left: var(--ck-balloon-fake-panel-offset-horizontal);\n\tmargin-top: var(--ck-balloon-fake-panel-offset-vertical);\n}\n\n.ck .ck-fake-panel div:nth-child( 2 ) {\n\tmargin-left: calc(var(--ck-balloon-fake-panel-offset-horizontal) * 2);\n\tmargin-top: calc(var(--ck-balloon-fake-panel-offset-vertical) * 2);\n}\n.ck .ck-fake-panel div:nth-child( 3 ) {\n\tmargin-left: calc(var(--ck-balloon-fake-panel-offset-horizontal) * 3);\n\tmargin-top: calc(var(--ck-balloon-fake-panel-offset-vertical) * 3);\n}\n\n/* If balloon is positioned above element, we need to move fake panel to the top. */\n.ck .ck-balloon-panel_arrow_s + .ck-fake-panel,\n.ck .ck-balloon-panel_arrow_se + .ck-fake-panel,\n.ck .ck-balloon-panel_arrow_sw + .ck-fake-panel {\n\t--ck-balloon-fake-panel-offset-vertical: -6px;\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},7289:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-panel)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{border-top-left-radius:0;border-top-right-radius:0;border-width:0 1px 1px;box-shadow:var(--ck-drop-shadow),0 0}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/stickypanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/stickypanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAMC,qDAEC,cAAe,CACf,KAAM,CAFN,yBAGD,CAEA,kEAEC,iBAAkB,CADlB,QAED,CCPA,qDAIC,wBAAyB,CACzB,yBAA0B,CAF1B,sBAAuB,CCFxB,oCDKA",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-sticky-panel {\n\t& .ck-sticky-panel__content_sticky {\n\t\tz-index: var(--ck-z-panel); /* #315 */\n\t\tposition: fixed;\n\t\ttop: 0;\n\t}\n\n\t& .ck-sticky-panel__content_sticky_bottom-limit {\n\t\ttop: auto;\n\t\tposition: absolute;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_shadow.css";\n\n.ck.ck-sticky-panel {\n\t& .ck-sticky-panel__content_sticky {\n\t\t@mixin ck-drop-shadow;\n\n\t\tborder-width: 0 1px 1px;\n\t\tborder-top-left-radius: 0;\n\t\tborder-top-right-radius: 0;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},871:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,'.ck-vertical-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck-vertical-form .ck-button:focus:after{display:none}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck.ck-responsive-form .ck-button:focus:after{display:none}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-width)*.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-number,.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){border-radius:0;margin-top:var(--ck-spacing-large);padding:var(--ck-spacing-standard)}.ck.ck-responsive-form>.ck-button:last-child:not(:focus),.ck.ck-responsive-form>.ck-button:nth-last-child(2):not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2),[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/responsive-form/responsiveform.css"],names:[],mappings:"AAQC,mCAMC,WAAY,CALZ,UAAW,CAEX,iBAAkB,CAClB,UAAW,CACX,QAAS,CAHT,OAAQ,CAKR,SACD,CAEA,yCACC,YACD,CCdA,oCDoBE,wCAMC,WAAY,CALZ,UAAW,CAEX,iBAAkB,CAClB,UAAW,CACX,QAAS,CAHT,OAAQ,CAKR,SACD,CAEA,8CACC,YACD,CC9BF,CCAD,qDACC,kDACD,CAEA,uBACC,+BAoED,CAlEC,6BAEC,YACD,CASC,uGACC,sCACD,CDvBD,oCCMD,uBAqBE,SAAU,CACV,oCA+CF,CA7CE,8CACC,wDAYD,CAVC,4HAEC,WAAY,CACZ,UACD,CAGA,4EACC,kBACD,CAKA,0DACC,kDACD,CAGD,iGAIC,eAAgB,CADhB,kCAAmC,CADnC,kCAmBD,CAfC,yHACC,gDACD,CARD,0OAeE,aAMF,CAJE,+IACC,kDACD,CDrEH",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck-vertical-form .ck-button {\n\t&::after {\n\t\tcontent: "";\n\t\twidth: 0;\n\t\tposition: absolute;\n\t\tright: -1px;\n\t\ttop: -1px;\n\t\tbottom: -1px;\n\t\tz-index: 1;\n\t}\n\n\t&:focus::after {\n\t\tdisplay: none;\n\t}\n}\n\n.ck.ck-responsive-form {\n\t@mixin ck-media-phone {\n\t\t& .ck-button {\n\t\t\t&::after {\n\t\t\t\tcontent: "";\n\t\t\t\twidth: 0;\n\t\t\t\tposition: absolute;\n\t\t\t\tright: -1px;\n\t\t\t\ttop: -1px;\n\t\t\t\tbottom: -1px;\n\t\t\t\tz-index: 1;\n\t\t\t}\n\n\t\t\t&:focus::after {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck-vertical-form > .ck-button:nth-last-child(2)::after {\n\tborder-right: 1px solid var(--ck-color-base-border);\n}\n\n.ck.ck-responsive-form {\n\tpadding: var(--ck-spacing-large);\n\n\t&:focus {\n\t\t/* See: https://github.com/ckeditor/ckeditor5/issues/4773 */\n\t\toutline: none;\n\t}\n\n\t@mixin ck-dir ltr {\n\t\t& > :not(:first-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-dir rtl {\n\t\t& > :not(:last-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\tpadding: 0;\n\t\twidth: calc(.8 * var(--ck-input-width));\n\n\t\t& .ck-labeled-field-view {\n\t\t\tmargin: var(--ck-spacing-large) var(--ck-spacing-large) 0;\n\n\t\t\t& .ck-input-text,\n\t\t\t& .ck-input-number {\n\t\t\t\tmin-width: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t/* Let the long error messages wrap in the narrow form. */\n\t\t\t& .ck-labeled-field-view__error {\n\t\t\t\twhite-space: normal;\n\t\t\t}\n\t\t}\n\n\t\t/* Styles for two last buttons in the form (save&cancel, edit&unlink, etc.). */\n\t\t& > .ck-button:nth-last-child(2) {\n\t\t\t&::after {\n\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\t\t}\n\n\t\t& > .ck-button:nth-last-child(1),\n\t\t& > .ck-button:nth-last-child(2) {\n\t\t\tpadding: var(--ck-spacing-standard);\n\t\t\tmargin-top: var(--ck-spacing-large);\n\t\t\tborder-radius: 0;\n\n\t\t\t&:not(:focus) {\n\t\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-left: 0;\n\n\t\t\t\t&:last-of-type {\n\t\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},5540:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{position:absolute;top:50%;transform:translateY(-50%)}[dir=ltr] .ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{left:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-search>.ck-labeled-field-view>.ck-labeled-field-view__input-wrapper>.ck-icon{right:var(--ck-spacing-medium)}.ck.ck-search>.ck-labeled-field-view .ck-search__reset{position:absolute;top:50%;transform:translateY(-50%)}.ck.ck-search>.ck-search__results>.ck-search__info>span:first-child{display:block}.ck.ck-search>.ck-search__results>.ck-search__info:not(.ck-hidden)~*{display:none}:root{--ck-search-field-view-horizontal-spacing:calc(var(--ck-icon-size) + var(--ck-spacing-medium))}.ck.ck-search>.ck-labeled-field-view .ck-input{width:100%}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon{--ck-labeled-field-label-default-position-x:var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon>.ck-labeled-field-view__input-wrapper>.ck-icon{opacity:.5;pointer-events:none}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon .ck-input{width:100%}[dir=ltr] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon .ck-input,[dir=rtl] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-icon .ck-input:not(.ck-input-text_empty){padding-left:var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset{--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset.ck-labeled-field-view_empty{--ck-labeled-field-empty-unfocused-max-width:100% - var(--ck-search-field-view-horizontal-spacing) - var(--ck-spacing-medium)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset{background:none;min-height:auto;min-width:auto;opacity:.5;padding:0}[dir=ltr] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset{right:var(--ck-spacing-medium)}[dir=rtl] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset{left:var(--ck-spacing-medium)}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-search__reset:hover{opacity:1}.ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-input{width:100%}[dir=ltr] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-input:not(.ck-input-text_empty),[dir=rtl] .ck.ck-search>.ck-labeled-field-view.ck-search__query_with-reset .ck-input{padding-right:var(--ck-search-field-view-horizontal-spacing)}.ck.ck-search>.ck-search__results{min-width:100%}.ck.ck-search>.ck-search__results>.ck-search__info{padding:var(--ck-spacing-medium) var(--ck-spacing-large);width:100%}.ck.ck-search>.ck-search__results>.ck-search__info *{white-space:normal}.ck.ck-search>.ck-search__results>.ck-search__info>span:first-child{font-weight:700}.ck.ck-search>.ck-search__results>.ck-search__info>span:last-child{margin-top:var(--ck-spacing-medium)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/search/search.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/search/search.css"],names:[],mappings:"AASE,oFACC,iBAAkB,CAClB,OAAQ,CACR,0BASD,CAZA,8FAME,6BAMF,CAZA,8FAUE,8BAEF,CAEA,uDACC,iBAAkB,CAClB,OAAQ,CACR,0BACD,CAKC,oEACC,aACD,CAGA,qEACC,YACD,CChCH,MACC,8FACD,CAIE,+CACC,UACD,CAEA,gEACC,0FAoBD,CAlBC,+GACC,UAAW,CACX,mBACD,CAEA,0EACC,UAWD,CAJE,kMACC,2DACD,CAKH,iEACC,sGAwCD,CAtCC,6FACC,6HACD,CAEA,mFAIC,eAAgB,CAFhB,eAAgB,CADhB,cAAe,CAIf,UAAW,CACX,SAaD,CAnBA,6FASE,8BAUF,CAnBA,6FAaE,6BAMF,CAHC,yFACC,SACD,CAGD,2EACC,UAWD,CAZA,oMAUE,4DAEF,CAIF,kCACC,cAkBD,CAhBC,mDAEC,wDAAyD,CADzD,UAcD,CAXC,qDACC,kBACD,CAEA,oEACC,eACD,CAEA,mEACC,mCACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-search {\n\t& > .ck-labeled-field-view {\n\t\t& > .ck-labeled-field-view__input-wrapper > .ck-icon {\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\ttransform: translateY(-50%);\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tleft: var(--ck-spacing-medium);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tright: var(--ck-spacing-medium);\n\t\t\t}\n\t\t}\n\n\t\t& .ck-search__reset {\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\ttransform: translateY(-50%);\n\t\t}\n\t}\n\n\t& > .ck-search__results {\n\t\t& > .ck-search__info {\n\t\t\t& > span:first-child {\n\t\t\t\tdisplay: block;\n\t\t\t}\n\n\t\t\t/* Hide the filtered view when nothing was found */\n\t\t\t&:not(.ck-hidden) ~ * {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n','/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n:root {\n\t--ck-search-field-view-horizontal-spacing: calc(var(--ck-icon-size) + var(--ck-spacing-medium));\n}\n\n.ck.ck-search {\n\t& > .ck-labeled-field-view {\n\t\t& .ck-input {\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t&.ck-search__query_with-icon {\n\t\t\t--ck-labeled-field-label-default-position-x: var(--ck-search-field-view-horizontal-spacing);\n\n\t\t\t& > .ck-labeled-field-view__input-wrapper > .ck-icon {\n\t\t\t\topacity: .5;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\n\t\t\t& .ck-input {\n\t\t\t\twidth: 100%;\n\n\t\t\t\t@mixin ck-dir ltr {\n\t\t\t\t\tpadding-left: var(--ck-search-field-view-horizontal-spacing);\n\t\t\t\t}\n\n\t\t\t\t@mixin ck-dir rtl {\n\t\t\t\t\t&:not(.ck-input-text_empty) {\n\t\t\t\t\t\tpadding-left: var(--ck-search-field-view-horizontal-spacing);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&.ck-search__query_with-reset {\n\t\t\t--ck-labeled-field-empty-unfocused-max-width: 100% - 2 * var(--ck-search-field-view-horizontal-spacing);\n\n\t\t\t&.ck-labeled-field-view_empty {\n\t\t\t\t--ck-labeled-field-empty-unfocused-max-width: 100% - var(--ck-search-field-view-horizontal-spacing) - var(--ck-spacing-medium);\n\t\t\t}\n\n\t\t\t& .ck-search__reset {\n\t\t\t\tmin-width: auto;\n\t\t\t\tmin-height: auto;\n\n\t\t\t\tbackground: none;\n\t\t\t\topacity: .5;\n\t\t\t\tpadding: 0;\n\n\t\t\t\t@mixin ck-dir ltr {\n\t\t\t\t\tright: var(--ck-spacing-medium);\n\t\t\t\t}\n\n\t\t\t\t@mixin ck-dir rtl {\n\t\t\t\t\tleft: var(--ck-spacing-medium);\n\t\t\t\t}\n\n\t\t\t\t&:hover {\n\t\t\t\t\topacity: 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t& .ck-input {\n\t\t\t\twidth: 100%;\n\n\t\t\t\t@mixin ck-dir ltr {\n\t\t\t\t\t&:not(.ck-input-text_empty) {\n\t\t\t\t\t\tpadding-right: var(--ck-search-field-view-horizontal-spacing);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@mixin ck-dir rtl {\n\t\t\t\t\tpadding-right: var(--ck-search-field-view-horizontal-spacing);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t& > .ck-search__results {\n\t\tmin-width: 100%;\n\n\t\t& > .ck-search__info {\n\t\t\twidth: 100%;\n\t\t\tpadding: var(--ck-spacing-medium) var(--ck-spacing-large);\n\n\t\t\t& * {\n\t\t\t\twhite-space: normal;\n\t\t\t}\n\n\t\t\t& > span:first-child {\n\t\t\t\tfont-weight: bold;\n\t\t\t}\n\n\t\t\t& > span:last-child {\n\t\t\t\tmargin-top: var(--ck-spacing-medium);\n\t\t\t}\n\t\t}\n\t}\n}\n\n'],sourceRoot:""}]);const a=s},5706:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-spinner-container{display:block;position:relative}.ck.ck-spinner{left:0;margin:0 auto;position:absolute;right:0;top:50%;transform:translateY(-50%);z-index:1}:root{--ck-toolbar-spinner-size:18px}.ck.ck-spinner-container{animation:ck-spinner-rotate 1.5s linear infinite;height:var(--ck-toolbar-spinner-size);width:var(--ck-toolbar-spinner-size)}@media (prefers-reduced-motion:reduce){.ck.ck-spinner-container{animation-duration:3s}}.ck.ck-spinner{border:2px solid var(--ck-color-text);border-radius:50%;border-top:2px solid transparent;height:var(--ck-toolbar-spinner-size);width:var(--ck-toolbar-spinner-size)}@keyframes ck-spinner-rotate{to{transform:rotate(1turn)}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/spinner/spinner.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/spinner/spinner.css"],names:[],mappings:"AASA,yBACC,aAAc,CACd,iBACD,CAEA,eAGC,MAAO,CAEP,aAAc,CAJd,iBAAkB,CAGlB,OAAQ,CAFR,OAAQ,CAIR,0BAA2B,CAC3B,SACD,CCjBA,MACC,8BACD,CAEA,yBAGC,gDAAiD,CADjD,qCAAsC,CADtC,oCAOD,CAHC,uCALD,yBAME,qBAEF,CADC,CAGD,eAKC,qCAA6B,CAF7B,iBAAkB,CAElB,gCAA6B,CAH7B,qCAAsC,CADtC,oCAKD,CAEA,6BACC,GACC,uBACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-toolbar-spinner-size: 18px;\n}\n\n.ck.ck-spinner-container {\n\tdisplay: block;\n\tposition: relative;\n}\n\n.ck.ck-spinner {\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 0;\n\tright: 0;\n\tmargin: 0 auto;\n\ttransform: translateY(-50%);\n\tz-index: 1;\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-toolbar-spinner-size: 18px;\n}\n\n.ck.ck-spinner-container {\n\twidth: var(--ck-toolbar-spinner-size);\n\theight: var(--ck-toolbar-spinner-size);\n\tanimation: 1.5s infinite ck-spinner-rotate linear;\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\tanimation-duration: 3s;\n\t}\n}\n\n.ck.ck-spinner {\n\twidth: var(--ck-toolbar-spinner-size);\n\theight: var(--ck-toolbar-spinner-size);\n\tborder-radius: 50%;\n\tborder: 2px solid var(--ck-color-text);\n\tborder-top-color: transparent;\n}\n\n@keyframes ck-spinner-rotate {\n\tto {\n\t\ttransform: rotate(360deg)\n\t}\n}\n"],sourceRoot:""}]);const a=s},8368:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck-textarea{overflow-x:hidden}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/textarea/textarea.css"],names:[],mappings:"AASA,aACC,iBACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/*\n * This fixes a problem in Firefox when the initial height of the complement does not match the number of rows.\n * This bug is especially visible when rows=1.\n */\n.ck-textarea {\n\toverflow-x: hidden\n}\n"],sourceRoot:""}]);const a=s},9939:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/toolbar/blocktoolbar.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/blocktoolbar.css"],names:[],mappings:"AAKA,4BACC,iBAAkB,CAClB,2BACD,CCHA,MACC,oDAAqD,CACrD,yDACD,CAEA,4BACC,0CAA2C,CAC3C,sCACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-block-toolbar-button {\n\tposition: absolute;\n\tz-index: var(--ck-z-default);\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-block-toolbar-button: var(--ck-color-text);\n\t--ck-block-toolbar-button-size: var(--ck-font-size-normal);\n}\n\n.ck.ck-block-toolbar-button {\n\tcolor: var(--ck-color-block-toolbar-button);\n\tfont-size: var(--ck-block-toolbar-size);\n}\n"],sourceRoot:""}]);const a=s},66:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-toolbar{align-items:center;display:flex;flex-flow:row nowrap;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-toolbar>.ck-toolbar__items{align-items:center;display:flex;flex-flow:row wrap;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar .ck-toolbar__line-break{flex-basis:100%}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);border:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck.ck-toolbar .ck.ck-toolbar__separator{background:var(--ck-color-toolbar-border);height:var(--ck-icon-size);margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);min-width:1px;width:1px}.ck.ck-toolbar .ck-toolbar__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break),.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{border-radius:0;margin:0;width:100%}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-dropdown__panel{min-width:auto}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-button>.ck-button__label{max-width:7em;width:auto}.ck.ck-toolbar:focus{outline:none}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=rtl]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=ltr]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/toolbar/toolbar.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/toolbar.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,eAKC,kBAAmB,CAFnB,YAAa,CACb,oBAAqB,CCFrB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBD6CD,CA3CC,kCAGC,kBAAmB,CAFnB,YAAa,CACb,kBAAmB,CAEnB,WAED,CAEA,yCACC,oBAWD,CAJC,yGAEC,YACD,CAGD,uCACC,eACD,CAEA,sDACC,gBACD,CAEA,sDACC,qBACD,CAEA,sDACC,gBACD,CAGC,yFACC,YACD,CE/CF,eCGC,eDwGD,CA3GA,qECOE,qCDoGF,CA3GA,eAGC,6CAA8C,CAE9C,+CAAgD,CADhD,iCAuGD,CApGC,yCAIC,yCAA0C,CAH1C,0BAA2B,CAU3B,qCAAsC,CADtC,kCAAmC,CAPnC,aAAc,CADd,SAUD,CAEA,uCACC,QACD,CAGC,gEAEC,oCACD,CAIA,kEACC,YACD,CAGD,gHAIC,qCAAsC,CADtC,kCAED,CAEA,mCAEC,SAaD,CAVC,0DAQC,eAAgB,CAHhB,QAAS,CAHT,UAOD,CAGD,kCAEC,SAWD,CATC,uDAEC,QAMD,CAHC,yFACC,eACD,CASD,kFACC,mCACD,CAMA,wEACC,cACD,CAEA,iFACC,aAAc,CACd,UACD,CAGD,qBACC,YACD,CAtGD,qCAyGE,QAEF,CAYC,+FACC,cACD,CAEA,iJAEC,mCACD,CAEA,qHACC,aACD,CAIC,6JAEC,2BAA4B,CAD5B,wBAED,CAGA,2JAEC,4BAA6B,CAD7B,yBAED,CASD,8RACC,mCACD,CAWA,qHACC,cACD,CAIC,6JAEC,4BAA6B,CAD7B,yBAED,CAGA,2JAEC,2BAA4B,CAD5B,wBAED,CASD,8RACC,oCACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n\n.ck.ck-toolbar {\n\t@mixin ck-unselectable;\n\n\tdisplay: flex;\n\tflex-flow: row nowrap;\n\talign-items: center;\n\n\t& > .ck-toolbar__items {\n\t\tdisplay: flex;\n\t\tflex-flow: row wrap;\n\t\talign-items: center;\n\t\tflex-grow: 1;\n\n\t}\n\n\t& .ck.ck-toolbar__separator {\n\t\tdisplay: inline-block;\n\n\t\t/*\n\t\t * A leading or trailing separator makes no sense (separates from nothing on one side).\n\t\t * For instance, it can happen when toolbar items (also separators) are getting grouped one by one and\n\t\t * moved to another toolbar in the dropdown.\n\t\t */\n\t\t&:first-child,\n\t\t&:last-child {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t& .ck-toolbar__line-break {\n\t\tflex-basis: 100%;\n\t}\n\n\t&.ck-toolbar_grouping > .ck-toolbar__items {\n\t\tflex-wrap: nowrap;\n\t}\n\n\t&.ck-toolbar_vertical > .ck-toolbar__items {\n\t\tflex-direction: column;\n\t}\n\n\t&.ck-toolbar_floating > .ck-toolbar__items {\n\t\tflex-wrap: nowrap;\n\t}\n\n\t& > .ck.ck-toolbar__grouped-dropdown {\n\t\t& > .ck-dropdown__button .ck-dropdown__arrow {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-toolbar {\n\t@mixin ck-rounded-corners;\n\n\tbackground: var(--ck-color-toolbar-background);\n\tpadding: 0 var(--ck-spacing-small);\n\tborder: 1px solid var(--ck-color-toolbar-border);\n\n\t& .ck.ck-toolbar__separator {\n\t\theight: var(--ck-icon-size);\n\t\twidth: 1px;\n\t\tmin-width: 1px;\n\t\tbackground: var(--ck-color-toolbar-border);\n\n\t\t/*\n\t\t * These margins make the separators look better in balloon toolbars (when aligned with the "tip").\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/7493.\n\t\t */\n\t\tmargin-top: var(--ck-spacing-small);\n\t\tmargin-bottom: var(--ck-spacing-small);\n\t}\n\n\t& .ck-toolbar__line-break {\n\t\theight: 0;\n\t}\n\n\t& > .ck-toolbar__items {\n\t\t& > *:not(.ck-toolbar__line-break) {\n\t\t\t/* (#11) Separate toolbar items. */\n\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t}\n\n\t\t/* Don\'t display a separator after an empty items container, for instance,\n\t\twhen all items were grouped */\n\t\t&:empty + .ck.ck-toolbar__separator {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t& > .ck-toolbar__items > *:not(.ck-toolbar__line-break),\n\t& > .ck.ck-toolbar__grouped-dropdown {\n\t\t/* Make sure items wrapped to the next line have v-spacing */\n\t\tmargin-top: var(--ck-spacing-small);\n\t\tmargin-bottom: var(--ck-spacing-small);\n\t}\n\n\t&.ck-toolbar_vertical {\n\t\t/* Items in a vertical toolbar span the entire width. */\n\t\tpadding: 0;\n\n\t\t/* Specificity matters here. See https://github.com/ckeditor/ckeditor5-theme-lark/issues/168. */\n\t\t& > .ck-toolbar__items > .ck {\n\t\t\t/* Items in a vertical toolbar should span the horizontal space. */\n\t\t\twidth: 100%;\n\n\t\t\t/* Items in a vertical toolbar should have no margin. */\n\t\t\tmargin: 0;\n\n\t\t\t/* Items in a vertical toolbar span the entire width so rounded corners are pointless. */\n\t\t\tborder-radius: 0;\n\t\t}\n\t}\n\n\t&.ck-toolbar_compact {\n\t\t/* No spacing around items. */\n\t\tpadding: 0;\n\n\t\t& > .ck-toolbar__items > * {\n\t\t\t/* Compact toolbar items have no spacing between them. */\n\t\t\tmargin: 0;\n\n\t\t\t/* "Middle" children should have no rounded corners. */\n\t\t\t&:not(:first-child):not(:last-child) {\n\t\t\t\tborder-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t& > .ck.ck-toolbar__grouped-dropdown {\n\t\t/*\n\t\t * Dropdown button has asymmetric padding to fit the arrow.\n\t\t * This button has no arrow so let\'s revert that padding back to normal.\n\t\t */\n\t\t& > .ck.ck-button.ck-dropdown__button {\n\t\t\tpadding-left: var(--ck-spacing-tiny);\n\t\t}\n\t}\n\n\t/* A drop-down containing the nested toolbar with configured items. */\n\t& .ck-toolbar__nested-toolbar-dropdown {\n\t\t/* Prevent empty space in the panel when the dropdown label is visible and long but the toolbar has few items. */\n\t\t& > .ck-dropdown__panel {\n\t\t\tmin-width: auto;\n\t\t}\n\n\t\t& > .ck-button > .ck-button__label {\n\t\t\tmax-width: 7em;\n\t\t\twidth: auto;\n\t\t}\n\t}\n\n\t&:focus {\n\t\toutline: none;\n\t}\n\n\t@nest .ck-toolbar-container & {\n\t\tborder: 0;\n\t}\n}\n\n/* stylelint-disable */\n\n/*\n * Styles for RTL toolbars.\n *\n * Note: In some cases (e.g. a decoupled editor), the toolbar has its own "dir"\n * because its parent is not controlled by the editor framework.\n */\n[dir="rtl"] .ck.ck-toolbar,\n.ck.ck-toolbar[dir="rtl"] {\n\t& > .ck-toolbar__items > .ck {\n\t\tmargin-right: 0;\n\t}\n\n\t&:not(.ck-toolbar_compact) > .ck-toolbar__items > .ck {\n\t\t/* (#11) Separate toolbar items. */\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n\n\t& > .ck-toolbar__items > .ck:last-child {\n\t\tmargin-left: 0;\n\t}\n\n\t&.ck-toolbar_compact > .ck-toolbar__items > .ck {\n\t\t/* No rounded corners on the right side of the first child. */\n\t\t&:first-child {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-bottom-left-radius: 0;\n\t\t}\n\n\t\t/* No rounded corners on the left side of the last child. */\n\t\t&:last-child {\n\t\t\tborder-top-right-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\t}\n\n\t/* Separate the the separator form the grouping dropdown when some items are grouped. */\n\t& > .ck.ck-toolbar__separator {\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n\n\t/* Some spacing between the items and the separator before the grouped items dropdown. */\n\t&.ck-toolbar_grouping > .ck-toolbar__items:not(:empty):not(:only-child) {\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n}\n\n/*\n * Styles for LTR toolbars.\n *\n * Note: In some cases (e.g. a decoupled editor), the toolbar has its own "dir"\n * because its parent is not controlled by the editor framework.\n */\n[dir="ltr"] .ck.ck-toolbar,\n.ck.ck-toolbar[dir="ltr"] {\n\t& > .ck-toolbar__items > .ck:last-child {\n\t\tmargin-right: 0;\n\t}\n\n\t&.ck-toolbar_compact > .ck-toolbar__items > .ck {\n\t\t/* No rounded corners on the right side of the first child. */\n\t\t&:first-child {\n\t\t\tborder-top-right-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t/* No rounded corners on the left side of the last child. */\n\t\t&:last-child {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-bottom-left-radius: 0;\n\t\t}\n\t}\n\n\t/* Separate the the separator form the grouping dropdown when some items are grouped. */\n\t& > .ck.ck-toolbar__separator {\n\t\tmargin-right: var(--ck-spacing-small);\n\t}\n\n\t/* Some spacing between the items and the separator before the grouped items dropdown. */\n\t&.ck-toolbar_grouping > .ck-toolbar__items:not(:empty):not(:only-child) {\n\t\tmargin-right: var(--ck-spacing-small);\n\t}\n}\n\n/* stylelint-enable */\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},4650:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck.ck-balloon-panel.ck-tooltip{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;z-index:calc(var(--ck-z-dialog) + 100);--ck-balloon-border-width:0px;--ck-balloon-arrow-offset:0px;--ck-balloon-arrow-half-width:4px;--ck-balloon-arrow-height:4px;--ck-tooltip-text-padding:4px;--ck-color-panel-background:var(--ck-color-tooltip-background);padding:0 var(--ck-spacing-medium)}.ck.ck-balloon-panel.ck-tooltip .ck-tooltip__text{color:var(--ck-color-tooltip-text);font-size:.9em;line-height:1.5}.ck.ck-balloon-panel.ck-tooltip.ck-tooltip_multi-line .ck-tooltip__text{display:inline-block;max-width:200px;padding:var(--ck-tooltip-text-padding) 0;white-space:break-spaces}.ck.ck-balloon-panel.ck-tooltip{box-shadow:none}.ck.ck-balloon-panel.ck-tooltip:before{display:none}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/tooltip/tooltip.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/tooltip/tooltip.css"],names:[],mappings:"AAOA,gCCEC,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBAAgB,CDFhB,sCAAyC,CEFzC,6BAA8B,CAC9B,6BAA8B,CAC9B,iCAAkC,CAClC,6BAA8B,CAC9B,6BAA8B,CAC9B,8DAA+D,CAE/D,kCFJD,CEMC,kDAGC,kCAAmC,CAFnC,cAAe,CACf,eAED,CAEA,wEAEC,oBAAqB,CAErB,eAAgB,CADhB,wCAAyC,CAFzC,wBAID,CArBD,gCAwBC,eAMD,CAHC,uCACC,YACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n\n.ck.ck-balloon-panel.ck-tooltip {\n\t@mixin ck-unselectable;\n\n\tz-index: calc( var(--ck-z-dialog) + 100 );\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n.ck.ck-balloon-panel.ck-tooltip {\n\t--ck-balloon-border-width: 0px;\n\t--ck-balloon-arrow-offset: 0px;\n\t--ck-balloon-arrow-half-width: 4px;\n\t--ck-balloon-arrow-height: 4px;\n\t--ck-tooltip-text-padding: 4px;\n\t--ck-color-panel-background: var(--ck-color-tooltip-background);\n\n\tpadding: 0 var(--ck-spacing-medium);\n\n\t& .ck-tooltip__text {\n\t\tfont-size: .9em;\n\t\tline-height: 1.5;\n\t\tcolor: var(--ck-color-tooltip-text);\n\t}\n\n\t&.ck-tooltip_multi-line .ck-tooltip__text {\n\t\twhite-space: break-spaces;\n\t\tdisplay: inline-block;\n\t\tpadding: var(--ck-tooltip-text-padding) 0;\n\t\tmax-width: 200px;\n\t}\n\n\t/* Reset balloon panel styles */\n\tbox-shadow: none;\n\n\t/* Hide the default shadow of the .ck-balloon-panel tip */\n\t&::before {\n\t\tdisplay: none;\n\t}\n}\n'],sourceRoot:""}]);const a=s},601:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck-hidden{display:none!important}:root{--ck-z-default:1;--ck-z-panel:calc(var(--ck-z-default) + 999);--ck-z-dialog:9999}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-powered-by-line-height:10px;--ck-powered-by-padding-vertical:2px;--ck-powered-by-padding-horizontal:4px;--ck-powered-by-text-color:#4f4f4f;--ck-powered-by-border-radius:var(--ck-border-radius);--ck-powered-by-background:#fff;--ck-powered-by-border-color:var(--ck-color-focus-border)}.ck.ck-balloon-panel.ck-powered-by-balloon{--ck-border-radius:var(--ck-powered-by-border-radius);background:var(--ck-powered-by-background);box-shadow:none;min-height:unset;z-index:calc(var(--ck-z-panel) - 1)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by{line-height:var(--ck-powered-by-line-height)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by a{align-items:center;cursor:pointer;display:flex;filter:grayscale(80%);line-height:var(--ck-powered-by-line-height);opacity:.66;padding:var(--ck-powered-by-padding-vertical) var(--ck-powered-by-padding-horizontal)}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-powered-by__label{color:var(--ck-powered-by-text-color);cursor:pointer;font-size:7.5px;font-weight:700;letter-spacing:-.2px;line-height:normal;margin-right:4px;padding-left:2px;text-transform:uppercase}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by .ck-icon{cursor:pointer;display:block}.ck.ck-balloon-panel.ck-powered-by-balloon .ck.ck-powered-by:hover a{filter:grayscale(0);opacity:1}.ck.ck-balloon-panel.ck-powered-by-balloon[class*=position_inside]{border-color:transparent}.ck.ck-balloon-panel.ck-powered-by-balloon[class*=position_border]{border:var(--ck-focus-ring);border-color:var(--ck-powered-by-border-color)}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#ccced1;--ck-color-base-action:#53a336;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#2977ff;--ck-color-base-active-focus:#0d65ff;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:218,81.8%,56.9%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#cae1fc;--ck-color-focus-disabled-shadow:rgba(119,186,248,.3);--ck-color-focus-error-shadow:rgba(255,64,31,.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-drop-active:rgba(0,0,0,.2);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#f0f0f0;--ck-color-button-default-active-background:#f0f0f0;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#f0f7ff;--ck-color-button-on-hover-background:#dbecff;--ck-color-button-on-active-background:#dbecff;--ck-color-button-on-disabled-background:#f0f2f4;--ck-color-button-on-color:#2977ff;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#4d9d30;--ck-color-button-action-active-background:#4d9d30;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#939393;--ck-color-switch-button-off-hover-background:#7d7d7d;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#4d9d30;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-dialog-background:var(--ck-custom-background);--ck-color-dialog-form-header-border:var(--ck-custom-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:var(--ck-color-base-border);--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:var(--ck-color-base-border);--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-button-on-color);--ck-color-list-button-on-background-focus:var(--ck-color-button-on-color);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-background);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,176,255,.1);--ck-color-link-fake-selection:rgba(31,176,255,.3);--ck-color-highlight-background:#ff0;--ck-color-light-red:#fcc;--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{background:transparent;border:0;box-sizing:border-box;height:auto;margin:0;padding:0;position:static;text-decoration:none;transition:none;vertical-align:middle;width:auto;word-wrap:break-word}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset_all{border-collapse:collapse;color:var(--ck-color-text);cursor:auto;float:none;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);text-align:left;white-space:nowrap}.ck-reset_all .ck-rtl :not(.ck-reset_all-excluded *){text-align:right}.ck-reset_all iframe:not(.ck-reset_all-excluded *){vertical-align:inherit}.ck-reset_all textarea:not(.ck-reset_all-excluded *){white-space:pre-wrap}.ck-reset_all input[type=password]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text]:not(.ck-reset_all-excluded *),.ck-reset_all textarea:not(.ck-reset_all-excluded *){cursor:text}.ck-reset_all input[type=password][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all textarea[disabled]:not(.ck-reset_all-excluded *){cursor:default}.ck-reset_all fieldset:not(.ck-reset_all-excluded *){border:2px groove #dfdee3;padding:10px}.ck-reset_all button:not(.ck-reset_all-excluded *)::-moz-focus-inner{border:0;padding:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/globals/_hidden.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/globals/_zindex.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/globals/_transition.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/globals/_poweredby.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_colors.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_disabled.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_focus.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_fonts.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_reset.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_shadow.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_spacing.css"],names:[],mappings:"AAQA,WAGC,sBACD,CCPA,MACC,gBAAiB,CACjB,4CAA+C,CAC/C,kBACD,CCDA,oDAEC,yBACD,CCNA,MACC,gCAAiC,CACjC,oCAAqC,CACrC,sCAAuC,CACvC,kCAA2C,CAC3C,qDAAsD,CACtD,+BAA4C,CAC5C,yDACD,CAEA,2CACC,qDAAsD,CAGtD,0CAA2C,CAD3C,eAAgB,CAEhB,gBAAiB,CACjB,mCAiDD,CA/CC,6DACC,4CAoCD,CAlCC,+DAGC,kBAAmB,CAFnB,cAAe,CACf,YAAa,CAGb,qBAAsB,CACtB,4CAA6C,CAF7C,WAAY,CAGZ,qFACD,CAEA,mFASC,qCAAsC,CAFtC,cAAe,CANf,eAAgB,CAIhB,eAAiB,CAHjB,oBAAqB,CAMrB,kBAAmB,CAFnB,gBAAiB,CAHjB,gBAAiB,CACjB,wBAOD,CAEA,sEAEC,cAAe,CADf,aAED,CAGC,qEACC,mBAAqB,CACrB,SACD,CAIF,mEACC,wBACD,CAEA,mEACC,2BAA4B,CAC5B,8CACD,CChED,MACC,kCAAmD,CACnD,+BAAoD,CACpD,8BAAkD,CAClD,8BAAuD,CACvD,6BAAmD,CACnD,yBAA+C,CAC/C,8BAAsD,CACtD,oCAA4D,CAC5D,6BAAkD,CAIlD,mDAA4D,CAC5D,qEAA+E,CAC/E,qCAA4D,CAC5D,qDAA8D,CAC9D,gDAAyD,CACzD,yCAAqD,CACrD,sCAAsD,CACtD,4CAA0D,CAC1D,sCAAsD,CAItD,gDAAuD,CACvD,kDAAiE,CACjE,mDAAkE,CAClE,yDAA8D,CAE9D,uCAA6D,CAC7D,6CAAoE,CACpE,8CAAoE,CACpE,gDAAiE,CACjE,kCAAyD,CAGzD,+DAAsE,CACtE,iDAAsE,CACtE,kDAAsE,CACtE,oDAAoE,CACpE,6DAAsE,CAEtE,8BAAoD,CACpD,gCAAqD,CAErD,+CAA8D,CAC9D,qDAAiE,CACjE,+EAAqF,CACrF,oDAAuE,CACvE,yEAA8E,CAC9E,oDAAgE,CAIhE,oEAA2E,CAC3E,4DAAoE,CAIpE,wDAAiE,CACjE,4DAAmE,CAInE,2DAAoE,CACpE,mDAA6D,CAC7D,wDAAgE,CAChE,+CAA0D,CAC1D,4CAA2D,CAC3D,4DAAoE,CACpE,sCAAsD,CAItD,0DAAmE,CACnE,uFAA6F,CAC7F,oEAA2E,CAC3E,0EAA+E,CAC/E,8DAAsE,CAItE,2DAAoE,CACpE,mDAA6D,CAI7D,6DAAsE,CACtE,qDAA+D,CAI/D,uDAAgE,CAChE,uDAAiE,CAIjE,0CAAyD,CAIzD,wCAA2D,CAI3D,+BAAoD,CACpD,uDAAmE,CACnE,kDAAgE,CAIhE,oCAAyD,CAIzD,yBAAgD,CChHhD,wBAAyB,CCAzB,0CAA2C,CAK3C,gGAAiG,CAKjG,4GAA6G,CAK7G,sGAAuG,CAKvG,sDAAuD,CCvBvD,wBAAyB,CACzB,6BAA8B,CAC9B,wDAA6D,CAE7D,yBAA0B,CAC1B,2BAA4B,CAC5B,yBAA0B,CAC1B,wBAAyB,CACzB,0BAA2B,CCJ3B,kCJgHD,CI1GA,2EAYC,sBAAuB,CADvB,QAAS,CART,qBAAsB,CAEtB,WAAY,CAIZ,QAAS,CACT,SAAU,CAJV,eAAgB,CAOhB,oBAAqB,CAErB,eAAgB,CADhB,qBAAsB,CAVtB,UAAW,CAcX,oBACD,CAKA,8DAGC,wBAAyB,CAEzB,0BAA2B,CAG3B,WAAY,CACZ,UAAW,CALX,iGAAkG,CAElG,eAAgB,CAChB,kBAGD,CAGC,qDACC,gBACD,CAEA,mDAEC,sBACD,CAEA,qDACC,oBACD,CAEA,mLAGC,WACD,CAEA,iNAGC,cACD,CAEA,qDAEC,yBAAoC,CADpC,YAED,CAEA,qEAGC,QAAQ,CADR,SAED,CAMD,8BAEC,gBACD,CCxFA,MACC,sBAAuB,CCAvB,gEAAiE,CAKjE,0DAA2D,CAK3D,wEAAyE,CCbzE,uBAA8B,CAC9B,mDAA2D,CAC3D,4CAAkD,CAClD,oDAA4D,CAC5D,mDAA2D,CAC3D,kDAA2D,CAC3D,yDFFD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which hides an element in DOM.\n */\n.ck-hidden {\n\t/* Override selector specificity. Otherwise, all elements with some display\n\tstyle defined will override this one, which is not a desired result. */\n\tdisplay: none !important;\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-z-default: 1;\n\t--ck-z-panel: calc( var(--ck-z-default) + 999 );\n\t--ck-z-dialog: 9999;\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class that disables all transitions of the element and its children.\n */\n.ck-transitions-disabled,\n.ck-transitions-disabled * {\n\ttransition: none !important;\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-powered-by-line-height: 10px;\n\t--ck-powered-by-padding-vertical: 2px;\n\t--ck-powered-by-padding-horizontal: 4px;\n\t--ck-powered-by-text-color: hsl(0, 0%, 31%);\n\t--ck-powered-by-border-radius: var(--ck-border-radius);\n\t--ck-powered-by-background: hsl(0, 0%, 100%);\n\t--ck-powered-by-border-color: var(--ck-color-focus-border);\n}\n\n.ck.ck-balloon-panel.ck-powered-by-balloon {\n\t--ck-border-radius: var(--ck-powered-by-border-radius);\n\n\tbox-shadow: none;\n\tbackground: var(--ck-powered-by-background);\n\tmin-height: unset;\n\tz-index: calc( var(--ck-z-panel) - 1 );\n\n\t& .ck.ck-powered-by {\n\t\tline-height: var(--ck-powered-by-line-height);\n\n\t\t& a {\n\t\t\tcursor: pointer;\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\topacity: .66;\n\t\t\tfilter: grayscale(80%);\n\t\t\tline-height: var(--ck-powered-by-line-height);\n\t\t\tpadding: var(--ck-powered-by-padding-vertical) var(--ck-powered-by-padding-horizontal);\n\t\t}\n\n\t\t& .ck-powered-by__label {\n\t\t\tfont-size: 7.5px;\n\t\t\tletter-spacing: -.2px;\n\t\t\tpadding-left: 2px;\n\t\t\ttext-transform: uppercase;\n\t\t\tfont-weight: bold;\n\t\t\tmargin-right: 4px;\n\t\t\tcursor: pointer;\n\t\t\tline-height: normal;\n\t\t\tcolor: var(--ck-powered-by-text-color);\n\n\t\t}\n\n\t\t& .ck-icon {\n\t\t\tdisplay: block;\n\t\t\tcursor: pointer;\n\t\t}\n\n\t\t&:hover {\n\t\t\t& a {\n\t\t\t\tfilter: grayscale(0%);\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t}\n\n\t&[class*="position_inside"] {\n\t\tborder-color: transparent;\n\t}\n\n\t&[class*="position_border"] {\n\t\tborder: var(--ck-focus-ring);\n\t\tborder-color: var(--ck-powered-by-border-color);\n\t}\n}\n\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-base-foreground: \t\t\t\t\t\t\t\thsl(0, 0%, 98%);\n\t--ck-color-base-background: \t\t\t\t\t\t\t\thsl(0, 0%, 100%);\n\t--ck-color-base-border: \t\t\t\t\t\t\t\t\thsl(220, 6%, 81%);\n\t--ck-color-base-action: \t\t\t\t\t\t\t\t\thsl(104, 50.2%, 42.5%);\n\t--ck-color-base-focus: \t\t\t\t\t\t\t\t\t\thsl(209, 92%, 70%);\n\t--ck-color-base-text: \t\t\t\t\t\t\t\t\t\thsl(0, 0%, 20%);\n\t--ck-color-base-active: \t\t\t\t\t\t\t\t\thsl(218.1, 100%, 58%);\n\t--ck-color-base-active-focus:\t\t\t\t\t\t\t\thsl(218.2, 100%, 52.5%);\n\t--ck-color-base-error:\t\t\t\t\t\t\t\t\t\thsl(15, 100%, 43%);\n\n\t/* -- Generic colors ------------------------------------------------------------------------ */\n\n\t--ck-color-focus-border-coordinates: \t\t\t\t\t\t218, 81.8%, 56.9%;\n\t--ck-color-focus-border: \t\t\t\t\t\t\t\t\thsl(var(--ck-color-focus-border-coordinates));\n\t--ck-color-focus-outer-shadow:\t\t\t\t\t\t\t\thsl(212.4, 89.3%, 89%);\n\t--ck-color-focus-disabled-shadow:\t\t\t\t\t\t\thsla(209, 90%, 72%,.3);\n\t--ck-color-focus-error-shadow:\t\t\t\t\t\t\t\thsla(9,100%,56%,.3);\n\t--ck-color-text: \t\t\t\t\t\t\t\t\t\t\tvar(--ck-color-base-text);\n\t--ck-color-shadow-drop: \t\t\t\t\t\t\t\t\thsla(0, 0%, 0%, 0.15);\n\t--ck-color-shadow-drop-active:\t\t\t\t\t\t\t\thsla(0, 0%, 0%, 0.2);\n\t--ck-color-shadow-inner: \t\t\t\t\t\t\t\t\thsla(0, 0%, 0%, 0.1);\n\n\t/* -- Buttons ------------------------------------------------------------------------------- */\n\n\t--ck-color-button-default-background: \t\t\t\t\t\ttransparent;\n\t--ck-color-button-default-hover-background: \t\t\t\thsl(0, 0%, 94.1%);\n\t--ck-color-button-default-active-background: \t\t\t\thsl(0, 0%, 94.1%);\n\t--ck-color-button-default-disabled-background: \t\t\t\ttransparent;\n\n\t--ck-color-button-on-background: \t\t\t\t\t\t\thsl(212, 100%, 97.1%);\n\t--ck-color-button-on-hover-background: \t\t\t\t\t\thsl(211.7, 100%, 92.9%);\n\t--ck-color-button-on-active-background: \t\t\t\t\thsl(211.7, 100%, 92.9%);\n\t--ck-color-button-on-disabled-background: \t\t\t\t\thsl(211, 15%, 95%);\n\t--ck-color-button-on-color:\t\t\t\t\t\t\t\t\thsl(218.1, 100%, 58%);\n\n\n\t--ck-color-button-action-background: \t\t\t\t\t\tvar(--ck-color-base-action);\n\t--ck-color-button-action-hover-background: \t\t\t\t\thsl(104, 53.2%, 40.2%);\n\t--ck-color-button-action-active-background: \t\t\t\thsl(104, 53.2%, 40.2%);\n\t--ck-color-button-action-disabled-background: \t\t\t\thsl(104, 44%, 58%);\n\t--ck-color-button-action-text: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\n\t--ck-color-button-save: \t\t\t\t\t\t\t\t\thsl(120, 100%, 27%);\n\t--ck-color-button-cancel: \t\t\t\t\t\t\t\t\thsl(15, 100%, 43%);\n\n\t--ck-color-switch-button-off-background:\t\t\t\t\thsl(0, 0%, 57.6%);\n\t--ck-color-switch-button-off-hover-background:\t\t\t\thsl(0, 0%, 49%);\n\t--ck-color-switch-button-on-background:\t\t\t\t\t\tvar(--ck-color-button-action-background);\n\t--ck-color-switch-button-on-hover-background:\t\t\t\thsl(104, 53.2%, 40.2%);\n\t--ck-color-switch-button-inner-background:\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-switch-button-inner-shadow:\t\t\t\t\t\thsla(0, 0%, 0%, 0.1);\n\n\t/* -- Dropdown ------------------------------------------------------------------------------ */\n\n\t--ck-color-dropdown-panel-background: \t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-dropdown-panel-border: \t\t\t\t\t\t\tvar(--ck-color-base-border);\n\n\t/* -- Dialog -------------------------------------------------------------------------------- */\n\n\t--ck-color-dialog-background: \t\t\t\t\t\t\t\tvar(--ck-custom-background);\n\t--ck-color-dialog-form-header-border: \t\t\t\t\t\tvar(--ck-custom-border);\n\n\t/* -- Input --------------------------------------------------------------------------------- */\n\n\t--ck-color-input-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-input-border: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-border);\n\t--ck-color-input-error-border:\t\t\t\t\t\t\t\tvar(--ck-color-base-error);\n\t--ck-color-input-text: \t\t\t\t\t\t\t\t\t\tvar(--ck-color-base-text);\n\t--ck-color-input-disabled-background: \t\t\t\t\t\thsl(0, 0%, 95%);\n\t--ck-color-input-disabled-border: \t\t\t\t\t\t\tvar(--ck-color-base-border);\n\t--ck-color-input-disabled-text: \t\t\t\t\t\t\thsl(0, 0%, 46%);\n\n\t/* -- List ---------------------------------------------------------------------------------- */\n\n\t--ck-color-list-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-list-button-hover-background: \t\t\t\t\tvar(--ck-color-button-default-hover-background);\n\t--ck-color-list-button-on-background: \t\t\t\t\t\tvar(--ck-color-button-on-color);\n\t--ck-color-list-button-on-background-focus: \t\t\t\tvar(--ck-color-button-on-color);\n\t--ck-color-list-button-on-text:\t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\n\t/* -- Panel --------------------------------------------------------------------------------- */\n\n\t--ck-color-panel-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-panel-border: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-border);\n\n\t/* -- Toolbar ------------------------------------------------------------------------------- */\n\n\t--ck-color-toolbar-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-toolbar-border: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-border);\n\n\t/* -- Tooltip ------------------------------------------------------------------------------- */\n\n\t--ck-color-tooltip-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-text);\n\t--ck-color-tooltip-text: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\n\t/* -- Engine -------------------------------------------------------------------------------- */\n\n\t--ck-color-engine-placeholder-text: \t\t\t\t\t\thsl(0, 0%, 44%);\n\n\t/* -- Upload -------------------------------------------------------------------------------- */\n\n\t--ck-color-upload-bar-background:\t\t \t\t\t\t\thsl(209, 92%, 70%);\n\n\t/* -- Link -------------------------------------------------------------------------------- */\n\n\t--ck-color-link-default:\t\t\t\t\t\t\t\t\thsl(240, 100%, 47%);\n\t--ck-color-link-selected-background:\t\t\t\t\t\thsla(201, 100%, 56%, 0.1);\n\t--ck-color-link-fake-selection:\t\t\t\t\t\t\t\thsla(201, 100%, 56%, 0.3);\n\n\t/* -- Search result highlight ---------------------------------------------------------------- */\n\n\t--ck-color-highlight-background:\t\t\t\t\t\t\thsl(60, 100%, 50%);\n\n\t/* -- Generic colors ------------------------------------------------------------------------- */\n\n\t--ck-color-light-red:\t\t\t\t\t\t\t\t\t\thsl(0, 100%, 90%);\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/**\n\t * An opacity value of disabled UI item.\n\t */\n\t--ck-disabled-opacity: .5;\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/**\n\t * The geometry of the of focused element's outer shadow.\n\t */\n\t--ck-focus-outer-shadow-geometry: 0 0 0 3px;\n\n\t/**\n\t * A visual style of focused element's outer shadow.\n\t */\n\t--ck-focus-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);\n\n\t/**\n\t * A visual style of focused element's outer shadow (when disabled).\n\t */\n\t--ck-focus-disabled-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);\n\n\t/**\n\t * A visual style of focused element's outer shadow (when has errors).\n\t */\n\t--ck-focus-error-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);\n\n\t/**\n\t * A visual style of focused element's border or outline.\n\t */\n\t--ck-focus-ring: 1px solid var(--ck-color-focus-border);\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-font-size-base: 13px;\n\t--ck-line-height-base: 1.84615;\n\t--ck-font-face: Helvetica, Arial, Tahoma, Verdana, Sans-Serif;\n\n\t--ck-font-size-tiny: 0.7em;\n\t--ck-font-size-small: 0.75em;\n\t--ck-font-size-normal: 1em;\n\t--ck-font-size-big: 1.4em;\n\t--ck-font-size-large: 1.8em;\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/* This is super-important. This is **manually** adjusted so a button without an icon\n\tis never smaller than a button with icon, additionally making sure that text-less buttons\n\tare perfect squares. The value is also shared by other components which should stay "in-line"\n\twith buttons. */\n\t--ck-ui-component-min-height: 2.3em;\n}\n\n/**\n * Resets an element, ignoring its children.\n */\n.ck.ck-reset,\n.ck.ck-reset_all,\n.ck-reset_all *:not(.ck-reset_all-excluded *) {\n\tbox-sizing: border-box;\n\twidth: auto;\n\theight: auto;\n\tposition: static;\n\n\t/* Do not include inheritable rules here. */\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tbackground: transparent;\n\ttext-decoration: none;\n\tvertical-align: middle;\n\ttransition: none;\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/105 */\n\tword-wrap: break-word;\n}\n\n/**\n * Resets an element AND its children.\n */\n.ck.ck-reset_all,\n.ck-reset_all *:not(.ck-reset_all-excluded *) {\n\t/* These are rule inherited by all children elements. */\n\tborder-collapse: collapse;\n\tfont: normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);\n\tcolor: var(--ck-color-text);\n\ttext-align: left;\n\twhite-space: nowrap;\n\tcursor: auto;\n\tfloat: none;\n}\n\n.ck-reset_all {\n\t& .ck-rtl *:not(.ck-reset_all-excluded *) {\n\t\ttext-align: right;\n\t}\n\n\t& iframe:not(.ck-reset_all-excluded *) {\n\t\t/* For IE */\n\t\tvertical-align: inherit;\n\t}\n\n\t& textarea:not(.ck-reset_all-excluded *) {\n\t\twhite-space: pre-wrap;\n\t}\n\n\t& textarea:not(.ck-reset_all-excluded *),\n\t& input[type="text"]:not(.ck-reset_all-excluded *),\n\t& input[type="password"]:not(.ck-reset_all-excluded *) {\n\t\tcursor: text;\n\t}\n\n\t& textarea[disabled]:not(.ck-reset_all-excluded *),\n\t& input[type="text"][disabled]:not(.ck-reset_all-excluded *),\n\t& input[type="password"][disabled]:not(.ck-reset_all-excluded *) {\n\t\tcursor: default;\n\t}\n\n\t& fieldset:not(.ck-reset_all-excluded *) {\n\t\tpadding: 10px;\n\t\tborder: 2px groove hsl(255, 7%, 88%);\n\t}\n\n\t& button:not(.ck-reset_all-excluded *)::-moz-focus-inner {\n\t\t/* See http://stackoverflow.com/questions/5517744/remove-extra-button-spacing-padding-in-firefox */\n\t\tpadding: 0;\n\t\tborder: 0\n\t}\n}\n\n/**\n * Default UI rules for RTL languages.\n */\n.ck[dir="rtl"],\n.ck[dir="rtl"] .ck {\n\ttext-align: right;\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Default border-radius value.\n */\n:root{\n\t--ck-border-radius: 2px;\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/**\n\t * A visual style of element's inner shadow (i.e. input).\n\t */\n\t--ck-inner-shadow: 2px 2px 3px var(--ck-color-shadow-inner) inset;\n\n\t/**\n\t * A visual style of element's drop shadow (i.e. panel).\n\t */\n\t--ck-drop-shadow: 0 1px 2px 1px var(--ck-color-shadow-drop);\n\n\t/**\n\t * A visual style of element's active shadow (i.e. comment or suggestion).\n\t */\n\t--ck-drop-shadow-active: 0 3px 6px 1px var(--ck-color-shadow-drop-active);\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-spacing-unit: \t\t\t\t\t\t0.6em;\n\t--ck-spacing-large: \t\t\t\t\tcalc(var(--ck-spacing-unit) * 1.5);\n\t--ck-spacing-standard: \t\t\t\t\tvar(--ck-spacing-unit);\n\t--ck-spacing-medium: \t\t\t\t\tcalc(var(--ck-spacing-unit) * 0.8);\n\t--ck-spacing-small: \t\t\t\t\tcalc(var(--ck-spacing-unit) * 0.5);\n\t--ck-spacing-tiny: \t\t\t\t\t\tcalc(var(--ck-spacing-unit) * 0.3);\n\t--ck-spacing-extra-tiny: \t\t\t\tcalc(var(--ck-spacing-unit) * 0.16);\n}\n"],sourceRoot:""}]);const a=s},1216:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);color:var(--ck-color-resizer-tooltip-text);display:block;font-size:var(--ck-font-size-tiny);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height);padding:0 var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-above-center,.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{left:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{right:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-above-center{left:50%;top:calc(var(--ck-resizer-tooltip-height)*-1);transform:translate(-50%)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-color:transparent;outline-style:solid;outline-width:var(--ck-widget-outline-thickness);transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}@media (prefers-reduced-motion:reduce){.ck .ck-widget{transition:none}}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}@media (forced-colors:none){.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{background-color:var(--ck-color-widget-editable-focus-background)}}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{background-color:transparent;border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;box-sizing:border-box;left:calc(0px - var(--ck-widget-outline-thickness));opacity:0;padding:4px;top:0;transform:translateY(-100%);transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}@media (prefers-reduced-motion:reduce){.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{transition:none}}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{color:var(--ck-color-widget-drag-handler-icon-color);height:var(--ck-widget-handler-icon-size);width:var(--ck-widget-handler-icon-size)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}@media (prefers-reduced-motion:reduce){.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{transition:none}}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{background-color:var(--ck-color-widget-hover-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{background-color:var(--ck-color-focus-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-widget/theme/widget.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-widget/widget.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css"],names:[],mappings:"AAKA,MACC,+CAAgD,CAChD,6CAAsD,CACtD,uCAAgD,CAEhD,kDAAmD,CACnD,gCAAiC,CACjC,kEACD,CAOA,8DAEC,iBAqBD,CAnBC,4EACC,iBAOD,CALC,qFAGC,aACD,CASD,iLACC,kBACD,CAGD,kBACC,qDAAsD,CAEtD,qDAAsD,CACtD,6CAA8C,CAF9C,0CAA2C,CAI3C,aAAc,CADd,kCAAmC,CAGnC,uCAAwC,CACxC,4CAA6C,CAF7C,iCAsCD,CAlCC,8NAKC,iBACD,CAEA,0CAEC,qCAAsC,CADtC,oCAED,CAEA,2CAEC,sCAAuC,CADvC,oCAED,CAEA,8CACC,uCAAwC,CACxC,sCACD,CAEA,6CACC,uCAAwC,CACxC,qCACD,CAGA,8CAEC,QAAS,CADT,6CAAgD,CAEhD,yBACD,CChFD,MACC,iCAAkC,CAClC,kCAAmC,CACnC,4CAA6C,CAC7C,wCAAyC,CAEzC,wCAAiD,CACjD,sCAAkD,CAClD,2EAA4E,CAC5E,yEACD,CAEA,eAGC,yBAA0B,CAD1B,mBAAoB,CADpB,gDAAiD,CAGjD,6GAcD,CAZC,uCAND,eAOE,eAWF,CAVC,CAEA,0EAEC,6EACD,CAEA,qBACC,iDACD,CAGD,gCACC,4BAYD,CARC,yGCnCA,2BAA2B,CCF3B,qCAA8B,CDC9B,YD2CA,CGvCA,4BACC,yGHoCC,iEGlCD,CACD,CHuCA,4EAKC,4BAA6B,CAa7B,iEAAkE,CAhBlE,qBAAsB,CAoBtB,mDAAoD,CAhBpD,SAAU,CALV,WAAY,CAsBZ,KAAM,CAFN,2BAA4B,CAT5B,6SAwCD,CA3BC,uCAzBD,4EA0BE,eA0BF,CAzBC,CAEA,qFAIC,oDAAqD,CADrD,yCAA0C,CAD1C,wCAeD,CAVC,kHACC,SAAU,CAGV,+DAKD,CAHC,uCAND,kHAOE,eAEF,CADC,CAKF,wHACC,SACD,CAID,kFAEC,oDAAqD,CADrD,SAED,CAKC,oMAEC,6CAA8C,CAD9C,SAOD,CAHC,gRACC,SACD,CAOH,qFACC,SAAU,CACV,oDACD,CAGA,gDAEC,eAkBD,CAhBC,yEAOC,iCACD,CAGC,gOAEC,gDACD,CAOD,wIAEC,mDAQD,CALE,ghBAEC,gDACD,CAKH,yKAOC,yDACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-resizer: var(--ck-color-focus-border);\n\t--ck-color-resizer-tooltip-background: hsl(0, 0%, 15%);\n\t--ck-color-resizer-tooltip-text: hsl(0, 0%, 95%);\n\n\t--ck-resizer-border-radius: var(--ck-border-radius);\n\t--ck-resizer-tooltip-offset: 10px;\n\t--ck-resizer-tooltip-height: calc(var(--ck-spacing-small) * 2 + 10px);\n}\n\n.ck .ck-widget {\n\t/* This is neccessary for type around UI to be positioned properly. */\n\tposition: relative;\n}\n\n.ck .ck-widget.ck-widget_with-selection-handle {\n\t/* Make the widget wrapper a relative positioning container for the drag handle. */\n\tposition: relative;\n\n\t& .ck-widget__selection-handle {\n\t\tposition: absolute;\n\n\t\t& .ck-icon {\n\t\t\t/* Make sure the icon in not a subject to font-size or line-height to avoid\n\t\t\tunnecessary spacing around it. */\n\t\t\tdisplay: block;\n\t\t}\n\t}\n\n\t/* Show the selection handle on mouse hover over the widget, but not for nested widgets. */\n\t&:hover > .ck-widget__selection-handle {\n\t\tvisibility: visible;\n\t}\n\n\t/* Show the selection handle when the widget is selected, but not for nested widgets. */\n\t&.ck-widget_selected > .ck-widget__selection-handle {\n\t\tvisibility: visible;\n\t}\n}\n\n.ck .ck-size-view {\n\tbackground: var(--ck-color-resizer-tooltip-background);\n\tcolor: var(--ck-color-resizer-tooltip-text);\n\tborder: 1px solid var(--ck-color-resizer-tooltip-text);\n\tborder-radius: var(--ck-resizer-border-radius);\n\tfont-size: var(--ck-font-size-tiny);\n\tdisplay: block;\n\tpadding: 0 var(--ck-spacing-small);\n\theight: var(--ck-resizer-tooltip-height);\n\tline-height: var(--ck-resizer-tooltip-height);\n\n\t&.ck-orientation-top-left,\n\t&.ck-orientation-top-right,\n\t&.ck-orientation-bottom-right,\n\t&.ck-orientation-bottom-left,\n\t&.ck-orientation-above-center {\n\t\tposition: absolute;\n\t}\n\n\t&.ck-orientation-top-left {\n\t\ttop: var(--ck-resizer-tooltip-offset);\n\t\tleft: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-top-right {\n\t\ttop: var(--ck-resizer-tooltip-offset);\n\t\tright: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-bottom-right {\n\t\tbottom: var(--ck-resizer-tooltip-offset);\n\t\tright: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-bottom-left {\n\t\tbottom: var(--ck-resizer-tooltip-offset);\n\t\tleft: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t/* Class applied if the widget is too small to contain the size label */\n\t&.ck-orientation-above-center {\n\t\ttop: calc(var(--ck-resizer-tooltip-height) * -1);\n\t\tleft: 50%;\n\t\ttransform: translate(-50%);\n\t}\n}\n",'/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../mixins/_focus.css";\n@import "../mixins/_shadow.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_mediacolors.css";\n\n:root {\n\t--ck-widget-outline-thickness: 3px;\n\t--ck-widget-handler-icon-size: 16px;\n\t--ck-widget-handler-animation-duration: 200ms;\n\t--ck-widget-handler-animation-curve: ease;\n\n\t--ck-color-widget-blurred-border: hsl(0, 0%, 87%);\n\t--ck-color-widget-hover-border: hsl(43, 100%, 62%);\n\t--ck-color-widget-editable-focus-background: var(--ck-color-base-background);\n\t--ck-color-widget-drag-handler-icon-color: var(--ck-color-base-background);\n}\n\n.ck .ck-widget {\n\toutline-width: var(--ck-widget-outline-thickness);\n\toutline-style: solid;\n\toutline-color: transparent;\n\ttransition: outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\ttransition: none;\n\t}\n\n\t&.ck-widget_selected,\n\t&.ck-widget_selected:hover {\n\t\toutline: var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border);\n\t}\n\n\t&:hover {\n\t\toutline-color: var(--ck-color-widget-hover-border);\n\t}\n}\n\n.ck .ck-editor__nested-editable {\n\tborder: 1px solid transparent;\n\n\t/* The :focus style is applied before .ck-editor__nested-editable_focused class is rendered in the view.\n\tThese styles show a different border for a blink of an eye, so `:focus` need to have same styles applied. */\n\t&.ck-editor__nested-editable_focused,\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-inner-shadow);\n\t\t@mixin ck-media-default-colors {\n\t\t\tbackground-color: var(--ck-color-widget-editable-focus-background);\n\t\t}\n\t}\n}\n\n.ck .ck-widget.ck-widget_with-selection-handle {\n\t& .ck-widget__selection-handle {\n\t\tpadding: 4px;\n\t\tbox-sizing: border-box;\n\n\t\t/* Background and opacity will be animated as the handler shows up or the widget gets selected. */\n\t\tbackground-color: transparent;\n\t\topacity: 0;\n\n\t\t/* Transition:\n\t\t * background-color for the .ck-widget_selected state change,\n\t\t * visibility for hiding the handler,\n\t\t * opacity for the proper look of the icon when the handler disappears. */\n\t\ttransition:\n\t\t\tbackground-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),\n\t\t\tvisibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),\n\t\t\topacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\n\t\t/* Make only top corners round. */\n\t\tborder-radius: var(--ck-border-radius) var(--ck-border-radius) 0 0;\n\n\t\t/* Place the drag handler outside the widget wrapper. */\n\t\ttransform: translateY(-100%);\n\t\tleft: calc(0px - var(--ck-widget-outline-thickness));\n\t\ttop: 0;\n\n\t\t@media (prefers-reduced-motion: reduce) {\n\t\t\ttransition: none;\n\t\t}\n\n\t\t& .ck-icon {\n\t\t\t/* Make sure the dimensions of the icon are independent of the fon-size of the content. */\n\t\t\twidth: var(--ck-widget-handler-icon-size);\n\t\t\theight: var(--ck-widget-handler-icon-size);\n\t\t\tcolor: var(--ck-color-widget-drag-handler-icon-color);\n\n\t\t\t/* The "selected" part of the icon is invisible by default */\n\t\t\t& .ck-icon__selected-indicator {\n\t\t\t\topacity: 0;\n\n\t\t\t\t/* Note: The animation is longer on purpose. Simply feels better. */\n\t\t\t\ttransition: opacity 300ms var(--ck-widget-handler-animation-curve);\n\n\t\t\t\t@media (prefers-reduced-motion: reduce) {\n\t\t\t\t\ttransition: none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/* Advertise using the look of the icon that once clicked the handler, the widget will be selected. */\n\t\t&:hover .ck-icon .ck-icon__selected-indicator {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\n\t/* Show the selection handler on mouse hover over the widget, but not for nested widgets. */\n\t&:hover > .ck-widget__selection-handle {\n\t\topacity: 1;\n\t\tbackground-color: var(--ck-color-widget-hover-border);\n\t}\n\n\t/* Show the selection handler when the widget is selected, but not for nested widgets. */\n\t&.ck-widget_selected,\n\t&.ck-widget_selected:hover {\n\t\t& > .ck-widget__selection-handle {\n\t\t\topacity: 1;\n\t\t\tbackground-color: var(--ck-color-focus-border);\n\n\t\t\t/* When the widget is selected, notify the user using the proper look of the icon. */\n\t\t\t& .ck-icon .ck-icon__selected-indicator {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/* In a RTL environment, align the selection handler to the right side of the widget */\n/* stylelint-disable-next-line no-descending-specificity */\n.ck[dir="rtl"] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle {\n\tleft: auto;\n\tright: calc(0px - var(--ck-widget-outline-thickness));\n}\n\n/* https://github.com/ckeditor/ckeditor5/issues/6415 */\n.ck.ck-editor__editable.ck-read-only .ck-widget {\n\t/* Prevent the :hover outline from showing up because of the used outline-color transition. */\n\ttransition: none;\n\n\t&:not(.ck-widget_selected) {\n\t\t/* Disable visual effects of hover/active widget when CKEditor is in readOnly mode.\n\t\t * See: https://github.com/ckeditor/ckeditor5/issues/1261\n\t\t *\n\t\t * Leave the unit because this custom property is used in calc() by other features.\n\t\t * See: https://github.com/ckeditor/ckeditor5/issues/6775\n\t\t */\n\t\t--ck-widget-outline-thickness: 0px;\n\t}\n\n\t&.ck-widget_with-selection-handle {\n\t\t& .ck-widget__selection-handle,\n\t\t& .ck-widget__selection-handle:hover {\n\t\t\tbackground: var(--ck-color-widget-blurred-border);\n\t\t}\n\t}\n}\n\n/* Style the widget when it\'s selected but the editable it belongs to lost focus. */\n/* stylelint-disable-next-line no-descending-specificity */\n.ck.ck-editor__editable.ck-blurred .ck-widget {\n\t&.ck-widget_selected,\n\t&.ck-widget_selected:hover {\n\t\toutline-color: var(--ck-color-widget-blurred-border);\n\n\t\t&.ck-widget_with-selection-handle {\n\t\t\t& > .ck-widget__selection-handle,\n\t\t\t& > .ck-widget__selection-handle:hover {\n\t\t\t\tbackground: var(--ck-color-widget-blurred-border);\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck.ck-editor__editable > .ck-widget.ck-widget_with-selection-handle:first-child,\n.ck.ck-editor__editable blockquote > .ck-widget.ck-widget_with-selection-handle:first-child {\n\t/* Do not crop selection handler if a widget is a first-child in the blockquote or in the root editable.\n\tIn fact, anything with overflow: hidden.\n\thttps://github.com/ckeditor/ckeditor5-block-quote/issues/28\n\thttps://github.com/ckeditor/ckeditor5-widget/issues/44\n\thttps://github.com/ckeditor/ckeditor5-widget/issues/66 */\n\tmargin-top: calc(1em + var(--ck-widget-handler-icon-size));\n}\n',"/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-forced-colors {\n\t@media (forced-colors: active) {\n\t\t& {\n\t\t\t@mixin-content;\n\t\t}\n\t}\n}\n\n@define-mixin ck-media-default-colors {\n\t@media (forced-colors: none) {\n\t\t& {\n\t\t\t@mixin-content;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const a=s},2060:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;left:0;pointer-events:none;position:absolute;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{pointer-events:all;position:absolute}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius);height:var(--ck-resizer-size);width:var(--ck-resizer-size)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{left:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{right:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-widget/theme/widgetresize.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-widget/widgetresize.css"],names:[],mappings:"AAKA,4BAEC,iBACD,CAEA,wBACC,YAAa,CAMb,MAAO,CAFP,mBAAoB,CAHpB,iBAAkB,CAMlB,KACD,CAGC,2EACC,aACD,CAGD,gCAIC,kBAAmB,CAHnB,iBAcD,CATC,4IAEC,kBACD,CAEA,4IAEC,kBACD,CCpCD,MACC,sBAAuB,CAGvB,yDAAiE,CACjE,6BACD,CAEA,wBACC,yCACD,CAEA,gCAGC,uCAAwC,CACxC,gDAA6D,CAC7D,6CAA8C,CAH9C,6BAA8B,CAD9B,4BAyBD,CAnBC,oEAEC,6BAA8B,CAD9B,4BAED,CAEA,qEAEC,8BAA+B,CAD/B,4BAED,CAEA,wEACC,+BAAgC,CAChC,8BACD,CAEA,uEACC,+BAAgC,CAChC,6BACD",sourcesContent:["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-widget_with-resizer {\n\t/* Make the widget wrapper a relative positioning container for the drag handle. */\n\tposition: relative;\n}\n\n.ck .ck-widget__resizer {\n\tdisplay: none;\n\tposition: absolute;\n\n\t/* The wrapper itself should not interfere with the pointer device, only the handles should. */\n\tpointer-events: none;\n\n\tleft: 0;\n\ttop: 0;\n}\n\n.ck-focused .ck-widget_with-resizer.ck-widget_selected {\n\t& > .ck-widget__resizer {\n\t\tdisplay: block;\n\t}\n}\n\n.ck .ck-widget__resizer__handle {\n\tposition: absolute;\n\n\t/* Resizers are the only UI elements that should interfere with a pointer device. */\n\tpointer-events: all;\n\n\t&.ck-widget__resizer__handle-top-left,\n\t&.ck-widget__resizer__handle-bottom-right {\n\t\tcursor: nwse-resize;\n\t}\n\n\t&.ck-widget__resizer__handle-top-right,\n\t&.ck-widget__resizer__handle-bottom-left {\n\t\tcursor: nesw-resize;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-resizer-size: 10px;\n\n\t/* Set the resizer with a 50% offset. */\n\t--ck-resizer-offset: calc( ( var(--ck-resizer-size) / -2 ) - 2px);\n\t--ck-resizer-border-width: 1px;\n}\n\n.ck .ck-widget__resizer {\n\toutline: 1px solid var(--ck-color-resizer);\n}\n\n.ck .ck-widget__resizer__handle {\n\twidth: var(--ck-resizer-size);\n\theight: var(--ck-resizer-size);\n\tbackground: var(--ck-color-focus-border);\n\tborder: var(--ck-resizer-border-width) solid hsl(0, 0%, 100%);\n\tborder-radius: var(--ck-resizer-border-radius);\n\n\t&.ck-widget__resizer__handle-top-left {\n\t\ttop: var(--ck-resizer-offset);\n\t\tleft: var(--ck-resizer-offset);\n\t}\n\n\t&.ck-widget__resizer__handle-top-right {\n\t\ttop: var(--ck-resizer-offset);\n\t\tright: var(--ck-resizer-offset);\n\t}\n\n\t&.ck-widget__resizer__handle-bottom-right {\n\t\tbottom: var(--ck-resizer-offset);\n\t\tright: var(--ck-resizer-offset);\n\t}\n\n\t&.ck-widget__resizer__handle-bottom-left {\n\t\tbottom: var(--ck-resizer-offset);\n\t\tleft: var(--ck-resizer-offset);\n\t}\n}\n"],sourceRoot:""}]);const a=s},6779:(e,t,o)=>{"use strict";o.d(t,{A:()=>a});var n=o(1354),i=o.n(n),r=o(6314),s=o.n(r)()(i());s.push([e.id,'.ck .ck-widget .ck-widget__type-around__button{display:block;overflow:hidden;position:absolute;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{left:50%;position:absolute;top:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{left:min(10%,30px);top:calc(var(--ck-widget-outline-thickness)*-.5);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-.5);right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;left:1px;position:absolute;top:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;left:0;position:absolute;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:block;top:calc(var(--ck-widget-outline-thickness)*-1 - 1px)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button);border-radius:100px;height:var(--ck-widget-type-around-button-size);opacity:0;pointer-events:none;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);width:var(--ck-widget-type-around-button-size)}@media (prefers-reduced-motion:reduce){.ck .ck-widget .ck-widget__type-around__button{transition:none}}.ck .ck-widget .ck-widget__type-around__button svg{height:8px;margin-top:1px;transform:translate(-50%,-50%);transition:transform .5s ease;width:10px}@media (prefers-reduced-motion:reduce){.ck .ck-widget .ck-widget__type-around__button svg{transition:none}}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}@media (prefers-reduced-motion:reduce){.ck .ck-widget .ck-widget__type-around__button:hover,.ck .ck-widget .ck-widget__type-around__button:hover svg line,.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:none}}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3));border-radius:100px;height:calc(var(--ck-widget-type-around-button-size) - 2px);width:calc(var(--ck-widget-type-around-button-size) - 2px)}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;background:var(--ck-color-base-text);height:1px;outline:1px solid hsla(0,0%,100%,.5);pointer-events:none}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-widget/theme/widgettypearound.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-widget/widgettypearound.css"],names:[],mappings:"AASC,+CACC,aAAc,CAEd,eAAgB,CADhB,iBAAkB,CAElB,2BAwBD,CAtBC,mDAGC,QAAS,CAFT,iBAAkB,CAClB,OAAQ,CAER,qCACD,CAEA,qFAGC,kBAAoB,CADpB,gDAAoD,CAGpD,0BACD,CAEA,oFAEC,mDAAuD,CACvD,mBAAqB,CAErB,yBACD,CAUA,mLACC,UAAW,CACX,aAAc,CAGd,QAAS,CAFT,iBAAkB,CAClB,OAAQ,CAER,qCACD,CAMD,2EACC,YAAa,CAEb,MAAO,CADP,iBAAkB,CAElB,OACD,CAOA,iFACC,gDAAqD,CACrD,iDACD,CAKA,wHAEC,aAAc,CADd,qDAED,CAKA,uHACC,wDAA6D,CAC7D,aACD,CAoBD,mOACC,YACD,CC3GA,MACC,wCAAyC,CACzC,wEAAyE,CACzE,8EAA+E,CAC/E,2FAA4F,CAC5F,wDAAyD,CACzD,uDAAwD,CACxD,yEACD,CAgBC,+CAGC,oDAAqD,CACrD,mBAAoB,CAFpB,+CAAgD,CAVjD,SAAU,CACV,mBAAoB,CAYnB,uMAAyM,CAJzM,8CAwED,CAhEC,uCATD,+CAUE,eA+DF,CA9DC,CAEA,mDAEC,UAAW,CAGX,cAAe,CAFf,8BAA+B,CAC/B,6BAA8B,CAH9B,UAwBD,CAlBC,uCAPD,mDAQE,eAiBF,CAhBC,CAEA,qDACC,mBAAoB,CACpB,mBAAoB,CAEpB,SAAU,CACV,qDAAsD,CACtD,kBAAmB,CACnB,oBAAqB,CACrB,qBACD,CAEA,wDACC,kBACD,CAGD,qDAIC,6DA4BD,CAtBE,kEACC,oDACD,CAEA,8DACC,wDACD,CAGD,uCAQE,qLACC,cACD,CAEF,CASD,uKA7FD,SAAU,CACV,mBA8FC,CAOD,gGACC,0DACD,CAOA,uKAEC,2DAQD,CANC,mLAIC,uEAAkF,CADlF,mBAAoB,CADpB,2DAA4D,CAD5D,0DAID,CAOD,8GACC,gBACD,CAKA,mDAGC,mFAAoF,CAOpF,oCAAqC,CARrC,UAAW,CAOX,oCAAwC,CARxC,mBAUD,CAOC,6JAEC,yBACD,CAUA,yKACC,iDACD,CAMA,uOAxKD,SAAU,CACV,mBAyKC,CAoBA,6yBACC,SACD,CASF,uHACC,aAAc,CACd,iBACD,CAYG,iRAxNF,SAAU,CACV,mBAyNE,CAQH,kIACC,qEAKD,CAHC,wIACC,WACD,CAGD,4CACC,GACC,oBACD,CACA,OACC,mBACD,CACD,CAEA,gDACC,OACC,mBACD,CACA,OACC,mBACD,CACD,CAEA,8CACC,GACC,6HACD,CACA,IACC,6HACD,CACA,GACC,+HACD,CACD,CAEA,kDACC,GACC,SACD,CACA,IACC,SACD,CACA,IACC,SACD,CACA,IACC,SACD,CACA,GACC,SACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-widget {\n\t/*\n\t * Styles of the type around buttons\n\t */\n\t& .ck-widget__type-around__button {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\toverflow: hidden;\n\t\tz-index: var(--ck-z-default);\n\n\t\t& svg {\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\tleft: 50%;\n\t\t\tz-index: calc(var(--ck-z-default) + 2);\n\t\t}\n\n\t\t&.ck-widget__type-around__button_before {\n\t\t\t/* Place it in the middle of the outline */\n\t\t\ttop: calc(-0.5 * var(--ck-widget-outline-thickness));\n\t\t\tleft: min(10%, 30px);\n\n\t\t\ttransform: translateY(-50%);\n\t\t}\n\n\t\t&.ck-widget__type-around__button_after {\n\t\t\t/* Place it in the middle of the outline */\n\t\t\tbottom: calc(-0.5 * var(--ck-widget-outline-thickness));\n\t\t\tright: min(10%, 30px);\n\n\t\t\ttransform: translateY(50%);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the buttons when:\n\t * - the widget is selected,\n\t * - or the button is being hovered (regardless of the widget state).\n\t */\n\t&.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button,\n\t& > .ck-widget__type-around > .ck-widget__type-around__button:hover {\n\t\t&::after {\n\t\t\tcontent: "";\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\ttop: 1px;\n\t\t\tleft: 1px;\n\t\t\tz-index: calc(var(--ck-z-default) + 1);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" which is displayed when the user navigates using the keyboard.\n\t */\n\t& > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tdisplay: none;\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t}\n\n\t/*\n\t * When the widget is hovered the "fake caret" would normally be narrower than the\n\t * extra outline displayed around the widget. Let\'s extend the "fake caret" to match\n\t * the full width of the widget.\n\t */\n\t&:hover > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tleft: calc( -1 * var(--ck-widget-outline-thickness) );\n\t\tright: calc( -1 * var(--ck-widget-outline-thickness) );\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" when it should be displayed before the widget (backward keyboard navigation).\n\t */\n\t&.ck-widget_type-around_show-fake-caret_before > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\ttop: calc( -1 * var(--ck-widget-outline-thickness) - 1px );\n\t\tdisplay: block;\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" when it should be displayed after the widget (forward keyboard navigation).\n\t */\n\t&.ck-widget_type-around_show-fake-caret_after > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tbottom: calc( -1 * var(--ck-widget-outline-thickness) - 1px );\n\t\tdisplay: block;\n\t}\n}\n\n/*\n * Integration with the read-only mode of the editor.\n */\n.ck.ck-editor__editable.ck-read-only .ck-widget__type-around {\n\tdisplay: none;\n}\n\n/*\n * Integration with the restricted editing mode (feature) of the editor.\n */\n.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around {\n\tdisplay: none;\n}\n\n/*\n * Integration with the #isEnabled property of the WidgetTypeAround plugin.\n */\n.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around {\n\tdisplay: none;\n}\n','/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-widget-type-around-button-size: 20px;\n\t--ck-color-widget-type-around-button-active: var(--ck-color-focus-border);\n\t--ck-color-widget-type-around-button-hover: var(--ck-color-widget-hover-border);\n\t--ck-color-widget-type-around-button-blurred-editable: var(--ck-color-widget-blurred-border);\n\t--ck-color-widget-type-around-button-radar-start-alpha: 0;\n\t--ck-color-widget-type-around-button-radar-end-alpha: .3;\n\t--ck-color-widget-type-around-button-icon: var(--ck-color-base-background);\n}\n\n@define-mixin ck-widget-type-around-button-visible {\n\topacity: 1;\n\tpointer-events: auto;\n}\n\n@define-mixin ck-widget-type-around-button-hidden {\n\topacity: 0;\n\tpointer-events: none;\n}\n\n.ck .ck-widget {\n\t/*\n\t * Styles of the type around buttons\n\t */\n\t& .ck-widget__type-around__button {\n\t\twidth: var(--ck-widget-type-around-button-size);\n\t\theight: var(--ck-widget-type-around-button-size);\n\t\tbackground: var(--ck-color-widget-type-around-button);\n\t\tborder-radius: 100px;\n\t\ttransition: opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve), background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\n\t\t@mixin ck-widget-type-around-button-hidden;\n\n\t\t@media (prefers-reduced-motion: reduce) {\n\t\t\ttransition: none;\n\t\t}\n\n\t\t& svg {\n\t\t\twidth: 10px;\n\t\t\theight: 8px;\n\t\t\ttransform: translate(-50%,-50%);\n\t\t\ttransition: transform .5s ease;\n\t\t\tmargin-top: 1px;\n\n\t\t\t@media (prefers-reduced-motion: reduce) {\n\t\t\t\ttransition: none;\n\t\t\t}\n\n\t\t\t& * {\n\t\t\t\tstroke-dasharray: 10;\n\t\t\t\tstroke-dashoffset: 0;\n\n\t\t\t\tfill: none;\n\t\t\t\tstroke: var(--ck-color-widget-type-around-button-icon);\n\t\t\t\tstroke-width: 1.5px;\n\t\t\t\tstroke-linecap: round;\n\t\t\t\tstroke-linejoin: round;\n\t\t\t}\n\n\t\t\t& line {\n\t\t\t\tstroke-dasharray: 7;\n\t\t\t}\n\t\t}\n\n\t\t&:hover {\n\t\t\t/*\n\t\t\t * Display the "sonar" around the button when hovered.\n\t\t\t */\n\t\t\tanimation: ck-widget-type-around-button-sonar 1s ease infinite;\n\n\t\t\t/*\n\t\t\t * Animate active button\'s icon.\n\t\t\t */\n\t\t\t& svg {\n\t\t\t\t& polyline {\n\t\t\t\t\tanimation: ck-widget-type-around-arrow-dash 2s linear;\n\t\t\t\t}\n\n\t\t\t\t& line {\n\t\t\t\t\tanimation: ck-widget-type-around-arrow-tip-dash 2s linear;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@media (prefers-reduced-motion: reduce) {\n\t\t\t\tanimation: none;\n\n\t\t\t\t& svg {\n\t\t\t\t\t& polyline {\n\t\t\t\t\t\tanimation: none;\n\t\t\t\t\t}\n\n\t\t\t\t\t& line {\n\t\t\t\t\t\tanimation: none;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * Show type around buttons when the widget gets selected or being hovered.\n\t */\n\t&.ck-widget_selected,\n\t&:hover {\n\t\t& > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\t\t@mixin ck-widget-type-around-button-visible;\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the buttons when the widget is NOT selected (but the buttons are visible\n\t * and still can be hovered).\n\t */\n\t&:not(.ck-widget_selected) > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\tbackground: var(--ck-color-widget-type-around-button-hover);\n\t}\n\n\t/*\n\t * Styles for the buttons when:\n\t * - the widget is selected,\n\t * - or the button is being hovered (regardless of the widget state).\n\t */\n\t&.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button,\n\t& > .ck-widget__type-around > .ck-widget__type-around__button:hover {\n\t\tbackground: var(--ck-color-widget-type-around-button-active);\n\n\t\t&::after {\n\t\t\twidth: calc(var(--ck-widget-type-around-button-size) - 2px);\n\t\t\theight: calc(var(--ck-widget-type-around-button-size) - 2px);\n\t\t\tborder-radius: 100px;\n\t\t\tbackground: linear-gradient(135deg, hsla(0,0%,100%,0) 0%, hsla(0,0%,100%,.3) 100%);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the "before" button when the widget has a selection handle. Because some space\n\t * is consumed by the handle, the button must be moved slightly to the right to let it breathe.\n\t */\n\t&.ck-widget_with-selection-handle > .ck-widget__type-around > .ck-widget__type-around__button_before {\n\t\tmargin-left: 20px;\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" which is displayed when the user navigates using the keyboard.\n\t */\n\t& .ck-widget__type-around__fake-caret {\n\t\tpointer-events: none;\n\t\theight: 1px;\n\t\tanimation: ck-widget-type-around-fake-caret-pulse linear 1s infinite normal forwards;\n\n\t\t/*\n\t\t * The semi-transparent-outline+background combo improves the contrast\n\t\t * when the background underneath the fake caret is dark.\n\t\t */\n\t\toutline: solid 1px hsla(0, 0%, 100%, .5);\n\t\tbackground: var(--ck-color-base-text);\n\t}\n\n\t/*\n\t * Styles of the widget when the "fake caret" is blinking (e.g. upon keyboard navigation).\n\t * Despite the widget being physically selected in the model, its outline should disappear.\n\t */\n\t&.ck-widget_selected {\n\t\t&.ck-widget_type-around_show-fake-caret_before,\n\t\t&.ck-widget_type-around_show-fake-caret_after {\n\t\t\toutline-color: transparent;\n\t\t}\n\t}\n\n\t&.ck-widget_type-around_show-fake-caret_before,\n\t&.ck-widget_type-around_show-fake-caret_after {\n\t\t/*\n\t\t * When the "fake caret" is visible we simulate that the widget is not selected\n\t\t * (despite being physically selected), so the outline color should be for the\n\t\t * unselected widget.\n\t\t */\n\t\t&.ck-widget_selected:hover {\n\t\t\toutline-color: var(--ck-color-widget-hover-border);\n\t\t}\n\n\t\t/*\n\t\t * Styles of the type around buttons when the "fake caret" is blinking (e.g. upon keyboard navigation).\n\t\t * In this state, the type around buttons would collide with the fake carets so they should disappear.\n\t\t */\n\t\t& > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\t\t@mixin ck-widget-type-around-button-hidden;\n\t\t}\n\n\t\t/*\n\t\t * Fake horizontal caret integration with the selection handle. When the caret is visible, simply\n\t\t * hide the handle because it intersects with the caret (and does not make much sense anyway).\n\t\t */\n\t\t&.ck-widget_with-selection-handle {\n\t\t\t&.ck-widget_selected,\n\t\t\t&.ck-widget_selected:hover {\n\t\t\t\t& > .ck-widget__selection-handle {\n\t\t\t\t\topacity: 0\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Fake horizontal caret integration with the resize UI. When the caret is visible, simply\n\t\t * hide the resize UI because it creates too much noise. It can be visible when the user\n\t\t * hovers the widget, though.\n\t\t */\n\t\t&.ck-widget_selected.ck-widget_with-resizer > .ck-widget__resizer {\n\t\t\topacity: 0\n\t\t}\n\t}\n}\n\n/*\n * Styles for the "before" button when the widget has a selection handle in an RTL environment.\n * The selection handler is aligned to the right side of the widget so there is no need to create\n * additional space for it next to the "before" button.\n */\n.ck[dir="rtl"] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around > .ck-widget__type-around__button_before {\n\tmargin-left: 0;\n\tmargin-right: 20px;\n}\n\n/*\n * Hide type around buttons when the widget is selected as a child of a selected\n * nested editable (e.g. mulit-cell table selection).\n *\n * See https://github.com/ckeditor/ckeditor5/issues/7263.\n */\n.ck-editor__nested-editable.ck-editor__editable_selected {\n\t& .ck-widget {\n\t\t&.ck-widget_selected,\n\t\t&:hover {\n\t\t\t& > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\t\t\t@mixin ck-widget-type-around-button-hidden;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/*\n * Styles for the buttons when the widget is selected but the user clicked outside of the editor (blurred the editor).\n */\n.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button:not(:hover) {\n\tbackground: var(--ck-color-widget-type-around-button-blurred-editable);\n\n\t& svg * {\n\t\tstroke: hsl(0,0%,60%);\n\t}\n}\n\n@keyframes ck-widget-type-around-arrow-dash {\n\t0% {\n\t\tstroke-dashoffset: 10;\n\t}\n\t20%, 100% {\n\t\tstroke-dashoffset: 0;\n\t}\n}\n\n@keyframes ck-widget-type-around-arrow-tip-dash {\n\t0%, 20% {\n\t\tstroke-dashoffset: 7;\n\t}\n\t40%, 100% {\n\t\tstroke-dashoffset: 0;\n\t}\n}\n\n@keyframes ck-widget-type-around-button-sonar {\n\t0% {\n\t\tbox-shadow: 0 0 0 0 hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-start-alpha));\n\t}\n\t50% {\n\t\tbox-shadow: 0 0 0 5px hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-end-alpha));\n\t}\n\t100% {\n\t\tbox-shadow: 0 0 0 5px hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-start-alpha));\n\t}\n}\n\n@keyframes ck-widget-type-around-fake-caret-pulse {\n\t0% {\n\t\topacity: 1;\n\t}\n\t49% {\n\t\topacity: 1;\n\t}\n\t50% {\n\t\topacity: 0;\n\t}\n\t99% {\n\t\topacity: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t}\n}\n'],sourceRoot:""}]);const a=s},6314:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o="",n=void 0!==t[5];return t[4]&&(o+="@supports (".concat(t[4],") {")),t[2]&&(o+="@media ".concat(t[2]," {")),n&&(o+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),o+=e(t),n&&(o+="}"),t[2]&&(o+="}"),t[4]&&(o+="}"),o})).join("")},t.i=function(e,o,n,i,r){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(n)for(var a=0;a0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=r),o&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=o):d[2]=o),i&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=i):d[4]="".concat(i)),t.push(d))}},t}},4417:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},1354:e=>{"use strict";e.exports=function(e){var t=e[1],o=e[3];if(!o)return t;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),r="/*# ".concat(i," */");return[t].concat([r]).join("\n")}return[t].join("\n")}},9878:function(e,t,o){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var i=Object.getOwnPropertyDescriptor(t,o);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,i)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&n(t,e,o);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXML=t.decodeHTMLStrict=t.decodeHTMLAttribute=t.decodeHTML=t.determineBranch=t.EntityDecoder=t.DecodingMode=t.BinTrieFlags=t.fromCodePoint=t.replaceCodePoint=t.decodeCodePoint=t.xmlDecodeTree=t.htmlDecodeTree=void 0;var a=s(o(3603));t.htmlDecodeTree=a.default;var l=s(o(2517));t.xmlDecodeTree=l.default;var c=r(o(5096));t.decodeCodePoint=c.default;var d,u=o(5096);Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return u.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return u.fromCodePoint}}),function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(d||(d={}));var h,m,p;function g(e){return e>=d.ZERO&&e<=d.NINE}function f(e){return e===d.EQUALS||function(e){return e>=d.UPPER_A&&e<=d.UPPER_Z||e>=d.LOWER_A&&e<=d.LOWER_Z||g(e)}(e)}!function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(h=t.BinTrieFlags||(t.BinTrieFlags={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(m||(m={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(p=t.DecodingMode||(t.DecodingMode={}));var b=function(){function e(e,t,o){this.decodeTree=e,this.emitCodePoint=t,this.errors=o,this.state=m.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=p.Strict}return e.prototype.startEntity=function(e){this.decodeMode=e,this.state=m.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},e.prototype.write=function(e,t){switch(this.state){case m.EntityStart:return e.charCodeAt(t)===d.NUM?(this.state=m.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=m.NamedEntity,this.stateNamedEntity(e,t));case m.NumericStart:return this.stateNumericStart(e,t);case m.NumericDecimal:return this.stateNumericDecimal(e,t);case m.NumericHex:return this.stateNumericHex(e,t);case m.NamedEntity:return this.stateNamedEntity(e,t)}},e.prototype.stateNumericStart=function(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===d.LOWER_X?(this.state=m.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=m.NumericDecimal,this.stateNumericDecimal(e,t))},e.prototype.addToNumericResult=function(e,t,o,n){if(t!==o){var i=o-t;this.result=this.result*Math.pow(n,i)+parseInt(e.substr(t,i),n),this.consumed+=i}},e.prototype.stateNumericHex=function(e,t){for(var o,n=t;t=d.UPPER_A&&o<=d.UPPER_F||o>=d.LOWER_A&&o<=d.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(i,3);t+=1}return this.addToNumericResult(e,n,t,16),-1},e.prototype.stateNumericDecimal=function(e,t){for(var o=t;t>14;t>14)){if(r===d.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==p.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},e.prototype.emitNotTerminatedNamedEntity=function(){var e,t=this.result,o=(this.decodeTree[t]&h.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,o,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed},e.prototype.emitNamedEntityData=function(e,t,o){var n=this.decodeTree;return this.emitCodePoint(1===t?n[e]&~h.VALUE_LENGTH:n[e+1],o),3===t&&this.emitCodePoint(n[e+2],o),o},e.prototype.end=function(){var e;switch(this.state){case m.NamedEntity:return 0===this.result||this.decodeMode===p.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case m.NumericDecimal:return this.emitNumericEntity(0,2);case m.NumericHex:return this.emitNumericEntity(0,3);case m.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case m.EntityStart:return 0}},e}();function k(e){var t="",o=new b(e,(function(e){return t+=(0,c.fromCodePoint)(e)}));return function(e,n){for(var i=0,r=0;(r=e.indexOf("&",r))>=0;){t+=e.slice(i,r),o.startEntity(n);var s=o.write(e,r+1);if(s<0){i=r+o.end();break}i=r+s,r=0===s?i+1:i}var a=t+e.slice(i);return t="",a}}function w(e,t,o,n){var i=(t&h.BRANCH_LENGTH)>>7,r=t&h.JUMP_TABLE;if(0===i)return 0!==r&&n===r?o:-1;if(r){var s=n-r;return s<0||s>=i?-1:e[o+s]-1}for(var a=o,l=a+i-1;a<=l;){var c=a+l>>>1,d=e[c];if(dn))return e[c+i];l=c-1}}return-1}t.EntityDecoder=b,t.determineBranch=w;var _=k(a.default),y=k(l.default);t.decodeHTML=function(e,t){return void 0===t&&(t=p.Legacy),_(e,t)},t.decodeHTMLAttribute=function(e){return _(e,p.Attribute)},t.decodeHTMLStrict=function(e){return _(e,p.Strict)},t.decodeXML=function(e){return y(e,p.Strict)}},5096:(e,t)=>{"use strict";var o;Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function i(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=n.get(e))&&void 0!==t?t:e}t.fromCodePoint=null!==(o=String.fromCodePoint)&&void 0!==o?o:function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)},t.replaceCodePoint=i,t.default=function(e){return(0,t.fromCodePoint)(i(e))}},1818:function(e,t,o){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.encodeNonAsciiHTML=t.encodeHTML=void 0;var i=n(o(5504)),r=o(5987),s=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function a(e,t){for(var o,n="",s=0;null!==(o=e.exec(t));){var a=o.index;n+=t.substring(s,a);var l=t.charCodeAt(a),c=i.default.get(l);if("object"==typeof c){if(a+1{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.getCodePoint=t.xmlReplacer=void 0,t.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var o=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);function n(e){for(var n,i="",r=0;null!==(n=t.xmlReplacer.exec(e));){var s=n.index,a=e.charCodeAt(s),l=o.get(a);void 0!==l?(i+=e.substring(r,s)+l,r=s+1):(i+="".concat(e.substring(r,s),"").concat((0,t.getCodePoint)(e,s).toString(16),";"),r=t.xmlReplacer.lastIndex+=Number(55296==(64512&a)))}return i+e.substr(r)}function i(e,t){return function(o){for(var n,i=0,r="";n=e.exec(o);)i!==n.index&&(r+=o.substring(i,n.index)),r+=t.get(n[0].charCodeAt(0)),i=n.index+1;return r+o.substring(i)}}t.getCodePoint=null!=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){return 55296==(64512&e.charCodeAt(t))?1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t)},t.encodeXML=n,t.escape=n,t.escapeUTF8=i(/[&<>'"]/g,o),t.escapeAttribute=i(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),t.escapeText=i(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))},3603:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((function(e){return e.charCodeAt(0)})))},2517:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((function(e){return e.charCodeAt(0)})))},5504:(e,t)=>{"use strict";function o(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLAttribute=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.DecodingMode=t.EntityDecoder=t.encodeHTML5=t.encodeHTML4=t.encodeNonAsciiHTML=t.encodeHTML=t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.encode=t.decodeStrict=t.decode=t.EncodingMode=t.EntityLevel=void 0;var n,i,r=o(9878),s=o(1818),a=o(5987);function l(e,t){if(void 0===t&&(t=n.XML),("number"==typeof t?t:t.level)===n.HTML){var o="object"==typeof t?t.mode:void 0;return(0,r.decodeHTML)(e,o)}return(0,r.decodeXML)(e)}!function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"}(n=t.EntityLevel||(t.EntityLevel={})),function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"}(i=t.EncodingMode||(t.EncodingMode={})),t.decode=l,t.decodeStrict=function(e,t){var o;void 0===t&&(t=n.XML);var i="number"==typeof t?{level:t}:t;return null!==(o=i.mode)&&void 0!==o||(i.mode=r.DecodingMode.Strict),l(e,i)},t.encode=function(e,t){void 0===t&&(t=n.XML);var o="number"==typeof t?{level:t}:t;return o.mode===i.UTF8?(0,a.escapeUTF8)(e):o.mode===i.Attribute?(0,a.escapeAttribute)(e):o.mode===i.Text?(0,a.escapeText)(e):o.level===n.HTML?o.mode===i.ASCII?(0,s.encodeNonAsciiHTML)(e):(0,s.encodeHTML)(e):(0,a.encodeXML)(e)};var c=o(5987);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return c.encodeXML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return c.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return c.escapeUTF8}}),Object.defineProperty(t,"escapeAttribute",{enumerable:!0,get:function(){return c.escapeAttribute}}),Object.defineProperty(t,"escapeText",{enumerable:!0,get:function(){return c.escapeText}});var d=o(1818);Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return d.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return d.encodeNonAsciiHTML}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return d.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return d.encodeHTML}});var u=o(9878);Object.defineProperty(t,"EntityDecoder",{enumerable:!0,get:function(){return u.EntityDecoder}}),Object.defineProperty(t,"DecodingMode",{enumerable:!0,get:function(){return u.DecodingMode}}),Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return u.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return u.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return u.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTMLAttribute",{enumerable:!0,get:function(){return u.decodeHTMLAttribute}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return u.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return u.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return u.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return u.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return u.decodeXML}})},2814:(e,t,o)=>{"use strict";var n=o(3492);function i(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){t&&Object.keys(t).forEach((function(o){e[o]=t[o]}))})),e}function r(e){return Object.prototype.toString.call(e)}function s(e){return"[object Function]"===r(e)}function a(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const l={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};const c={"http:":{validate:function(e,t,o){const n=e.slice(t);return o.re.http||(o.re.http=new RegExp("^\\/\\/"+o.re.src_auth+o.re.src_host_port_strict+o.re.src_path,"i")),o.re.http.test(n)?n.match(o.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,o){const n=e.slice(t);return o.re.no_http||(o.re.no_http=new RegExp("^"+o.re.src_auth+"(?:localhost|(?:(?:"+o.re.src_domain+")\\.)+"+o.re.src_domain_root+")"+o.re.src_port+o.re.src_host_terminator+o.re.src_path,"i")),o.re.no_http.test(n)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:n.match(o.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,o){const n=e.slice(t);return o.re.mailto||(o.re.mailto=new RegExp("^"+o.re.src_email_name+"@"+o.re.src_host_strict,"i")),o.re.mailto.test(n)?n.match(o.re.mailto)[0].length:0}}},d="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",u="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function h(e){const t=e.re=function(e){const t={};e=e||{},t.src_Any=n.Any.source,t.src_Cc=n.Cc.source,t.src_Z=n.Z.source,t.src_P=n.P.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const o="[><|]";return t.src_pseudo_letter="(?:(?![><|]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><|]|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+o+"|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><|]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}(e.__opts__),o=e.__tlds__.slice();function i(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||o.push(d),o.push(t.src_xn),t.src_tlds=o.join("|"),t.email_fuzzy=RegExp(i(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(i(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(i(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(i(t.tpl_host_fuzzy_test),"i");const l=[];function c(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){const o=e.__schemas__[t];if(null===o)return;const n={validate:null,link:null};if(e.__compiled__[t]=n,"[object Object]"===r(o))return!function(e){return"[object RegExp]"===r(e)}(o.validate)?s(o.validate)?n.validate=o.validate:c(t,o):n.validate=function(e){return function(t,o){const n=t.slice(o);return e.test(n)?n.match(e)[0].length:0}}(o.validate),void(s(o.normalize)?n.normalize=o.normalize:o.normalize?c(t,o):n.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===r(e)}(o)?c(t,o):l.push(t)})),l.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};const u=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+u+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function m(e,t){const o=e.__index__,n=e.__last_index__,i=e.__text_cache__.slice(o,n);this.schema=e.__schema__.toLowerCase(),this.index=o+t,this.lastIndex=n+t,this.raw=i,this.text=i,this.url=i}function p(e,t){const o=new m(e,t);return e.__compiled__[o.schema].normalize(o,e),o}function g(e,t){if(!(this instanceof g))return new g(e,t);var o;t||(o=e,Object.keys(o||{}).reduce((function(e,t){return e||l.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=i({},l,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=i({},c,e),this.__compiled__={},this.__tlds__=u,this.__tlds_replaced__=!1,this.re={},h(this)}g.prototype.add=function(e,t){return this.__schemas__[e]=t,h(this),this},g.prototype.set=function(e){return this.__opts__=i(this.__opts__,e),this},g.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,o,n,i,r,s,a,l,c;if(this.re.schema_test.test(e))for(a=this.re.schema_search,a.lastIndex=0;null!==(t=a.exec(e));)if(i=this.testSchemaAt(e,t[2],a.lastIndex),i){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+i;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&null!==(n=e.match(this.re.email_fuzzy))&&(r=n.index+n[1].length,s=n.index+n[0].length,(this.__index__<0||rthis.__last_index__)&&(this.__schema__="mailto:",this.__index__=r,this.__last_index__=s))),this.__index__>=0},g.prototype.pretest=function(e){return this.re.pretest.test(e)},g.prototype.testSchemaAt=function(e,t,o){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,o,this):0},g.prototype.match=function(e){const t=[];let o=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(p(this,o)),o=this.__last_index__);let n=o?e.slice(o):e;for(;this.test(n);)t.push(p(this,o)),n=n.slice(this.__last_index__),o+=this.__last_index__;return t.length?t:null},g.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const o=this.testSchemaAt(e,t[2],t[0].length);return o?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o,p(this,0)):null},g.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,o){return e!==o[t-1]})).reverse(),h(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,h(this),this)},g.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},g.prototype.onCompile=function(){},e.exports=g},2992:(e,t,o)=>{var n,i=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",n={};function i(e,t){if(!n[e]){n[e]={};for(var o=0;o>>8,o[2*n+1]=s%256}return o},decompressFromUint8Array:function(t){if(null==t)return r.decompress(t);for(var o=new Array(t.length/2),n=0,i=o.length;n>=1}else{for(i=1,n=0;n>=1}0==--u&&(u=Math.pow(2,m),m++),delete a[d]}else for(i=s[d],n=0;n>=1;0==--u&&(u=Math.pow(2,m),m++),s[c]=h++,d=String(l)}if(""!==d){if(Object.prototype.hasOwnProperty.call(a,d)){if(d.charCodeAt(0)<256){for(n=0;n>=1}else{for(i=1,n=0;n>=1}0==--u&&(u=Math.pow(2,m),m++),delete a[d]}else for(i=s[d],n=0;n>=1;0==--u&&(u=Math.pow(2,m),m++)}for(i=2,n=0;n>=1;for(;;){if(g<<=1,f==t-1){p.push(o(g));break}f++}return p.join("")},decompress:function(e){return null==e?"":""==e?null:r._decompress(e.length,32768,(function(t){return e.charCodeAt(t)}))},_decompress:function(t,o,n){var i,r,s,a,l,c,d,u=[],h=4,m=4,p=3,g="",f=[],b={val:n(0),position:o,index:1};for(i=0;i<3;i+=1)u[i]=i;for(s=0,l=Math.pow(2,2),c=1;c!=l;)a=b.val&b.position,b.position>>=1,0==b.position&&(b.position=o,b.val=n(b.index++)),s|=(a>0?1:0)*c,c<<=1;switch(s){case 0:for(s=0,l=Math.pow(2,8),c=1;c!=l;)a=b.val&b.position,b.position>>=1,0==b.position&&(b.position=o,b.val=n(b.index++)),s|=(a>0?1:0)*c,c<<=1;d=e(s);break;case 1:for(s=0,l=Math.pow(2,16),c=1;c!=l;)a=b.val&b.position,b.position>>=1,0==b.position&&(b.position=o,b.val=n(b.index++)),s|=(a>0?1:0)*c,c<<=1;d=e(s);break;case 2:return""}for(u[3]=d,r=d,f.push(d);;){if(b.index>t)return"";for(s=0,l=Math.pow(2,p),c=1;c!=l;)a=b.val&b.position,b.position>>=1,0==b.position&&(b.position=o,b.val=n(b.index++)),s|=(a>0?1:0)*c,c<<=1;switch(d=s){case 0:for(s=0,l=Math.pow(2,8),c=1;c!=l;)a=b.val&b.position,b.position>>=1,0==b.position&&(b.position=o,b.val=n(b.index++)),s|=(a>0?1:0)*c,c<<=1;u[m++]=e(s),d=m-1,h--;break;case 1:for(s=0,l=Math.pow(2,16),c=1;c!=l;)a=b.val&b.position,b.position>>=1,0==b.position&&(b.position=o,b.val=n(b.index++)),s|=(a>0?1:0)*c,c<<=1;u[m++]=e(s),d=m-1,h--;break;case 2:return f.join("")}if(0==h&&(h=Math.pow(2,p),p++),u[d])g=u[d];else{if(d!==m)return null;g=r+r.charAt(0)}f.push(g),u[m++]=r+g.charAt(0),r=g,0==--h&&(h=Math.pow(2,p),p++)}}};return r}();void 0===(n=function(){return i}.call(t,o,t,e))||(e.exports=n)},9428:e=>{var t=!0,o=!1,n=!1;function i(e,t,o){var n=e.attrIndex(t),i=[t,o];n<0?e.attrPush(i):e.attrs[n]=i}function r(e,t){for(var o=e[t].level-1,n=t-1;n>=0;n--)if(e[n].level===o)return n;return-1}function s(e,t){return"inline"===e[t].type&&function(e){return"paragraph_open"===e.type}(e[t-1])&&function(e){return"list_item_open"===e.type}(e[t-2])&&function(e){return 0===e.content.indexOf("[ ] ")||0===e.content.indexOf("[x] ")||0===e.content.indexOf("[X] ")}(e[t])}function a(e,i){if(e.children.unshift(function(e,o){var n=new o("html_inline","",0),i=t?' disabled="" ':"";0===e.content.indexOf("[ ] ")?n.content=' ':0!==e.content.indexOf("[x] ")&&0!==e.content.indexOf("[X] ")||(n.content=' ');return n}(e,i)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),o)if(n){e.children.pop();var r="task-item-"+Math.ceil(1e7*Math.random()-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+r+'">',e.children.push(function(e,t,o){var n=new o("html_inline","",0);return n.content=''+e+" ",n.attrs=[{for:t}],n}(e.content,r,i))}else e.children.unshift(function(e){var t=new e("html_inline","",0);return t.content="",t}(i)),e.children.push(function(e){var t=new e("html_inline","",0);return t.content=" ",t}(i))}e.exports=function(e,l){l&&(t=!l.enabled,o=!!l.label,n=!!l.labelAfter),e.core.ruler.after("inline","github-task-lists",(function(e){for(var o=e.tokens,n=2;n{"use strict";var n=o(5778),i=o(3492),r=o(2730),s=o(2814),a=o(7444);function l(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(o){if("default"!==o){var n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:function(){return e[o]}})}})),t.default=e,Object.freeze(t)}var c=l(n),d=l(i);function u(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)}const h=Object.prototype.hasOwnProperty;function m(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(o){e[o]=t[o]}))}})),e}function p(e,t,o){return[].concat(e.slice(0,t),o,e.slice(t+1))}function g(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function f(e){if(e>65535){const t=55296+((e-=65536)>>10),o=56320+(1023&e);return String.fromCharCode(t,o)}return String.fromCharCode(e)}const b=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,k=new RegExp(b.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),w=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function _(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(k,(function(e,t,o){return t||function(e,t){if(35===t.charCodeAt(0)&&w.test(t)){const o="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return g(o)?f(o):e}const o=r.decodeHTML(e);return o!==e?o:e}(e,o)}))}const y=/[&<>"]/,A=/[&<>"]/g,C={"&":"&","<":"<",">":">",'"':"""};function v(e){return C[e]}function x(e){return y.test(e)?e.replace(A,v):e}const E=/[.?*+^$[\]\\(){}|-]/g;function D(e){switch(e){case 9:case 32:return!0}return!1}function B(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function S(e){return d.P.test(e)||d.S.test(e)}function T(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function I(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const P={mdurl:c,ucmicro:d};var F=Object.freeze({__proto__:null,arrayReplaceAt:p,assign:m,escapeHtml:x,escapeRE:function(e){return e.replace(E,"\\$&")},fromCodePoint:f,has:function(e,t){return h.call(e,t)},isMdAsciiPunct:T,isPunctChar:S,isSpace:D,isString:u,isValidEntityCode:g,isWhiteSpace:B,lib:P,normalizeReference:I,unescapeAll:_,unescapeMd:function(e){return e.indexOf("\\")<0?e:e.replace(b,"$1")}});var M=Object.freeze({__proto__:null,parseLinkDestination:function(e,t,o){let n,i=t;const r={ok:!1,pos:0,str:""};if(60===e.charCodeAt(i)){for(i++;i32))return r;if(41===n){if(0===s)break;s--}i++}return t===i||0!==s||(r.str=_(e.slice(t,i)),r.pos=i,r.ok=!0),r},parseLinkLabel:function(e,t,o){let n,i,r,s;const a=e.posMax,l=e.pos;for(e.pos=t+1,n=1;e.pos=o)return s;let n=e.charCodeAt(r);if(34!==n&&39!==n&&40!==n)return s;t++,r++,40===n&&(n=41),s.marker=n}for(;r"+x(r.content)+""},R.code_block=function(e,t,o,n,i){const r=e[t];return""+x(e[t].content)+"
\n"},R.fence=function(e,t,o,n,i){const r=e[t],s=r.info?_(r.info).trim():"";let a,l="",c="";if(s){const e=s.split(/(\s+)/g);l=e[0],c=e.slice(2).join("")}if(a=o.highlight&&o.highlight(r.content,l,c)||x(r.content),0===a.indexOf("${a}
\n`}return`${a}
\n`},R.image=function(e,t,o,n,i){const r=e[t];return r.attrs[r.attrIndex("alt")][1]=i.renderInlineAsText(r.children,o,n),i.renderToken(e,t,o)},R.hardbreak=function(e,t,o){return o.xhtmlOut?" \n":" \n"},R.softbreak=function(e,t,o){return o.breaks?o.xhtmlOut?" \n":" \n":"\n"},R.text=function(e,t){return x(e[t].content)},R.html_block=function(e,t){return e[t].content},R.html_inline=function(e,t){return e[t].content},z.prototype.renderAttrs=function(e){let t,o,n;if(!e.attrs)return"";for(n="",t=0,o=e.attrs.length;t\n":">",i},z.prototype.renderInline=function(e,t,o){let n="";const i=this.rules;for(let r=0,s=e.length;r=0&&(o=this.attrs[t][1]),o},O.prototype.attrJoin=function(e,t){const o=this.attrIndex(e);o<0?this.attrPush([e,t]):this.attrs[o][1]=this.attrs[o][1]+" "+t},N.prototype.Token=O;const L=/\r\n?|\n/g,H=/\0/g;function j(e){return/^<\/a\s*>/i.test(e)}const q=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,U=/\((c|tm|r)\)/i,W=/\((c|tm|r)\)/gi,$={c:"©",r:"®",tm:"™"};function G(e,t){return $[t.toLowerCase()]}function K(e){let t=0;for(let o=e.length-1;o>=0;o--){const n=e[o];"text"!==n.type||t||(n.content=n.content.replace(W,G)),"link_open"===n.type&&"auto"===n.info&&t--,"link_close"===n.type&&"auto"===n.info&&t++}}function Z(e){let t=0;for(let o=e.length-1;o>=0;o--){const n=e[o];"text"!==n.type||t||q.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),"link_open"===n.type&&"auto"===n.info&&t--,"link_close"===n.type&&"auto"===n.info&&t++}}const J=/['"]/,Y=/['"]/g,Q="’";function X(e,t,o){return e.slice(0,t)+o+e.slice(t+1)}function ee(e,t){let o;const n=[];for(let i=0;i=0&&!(n[o].level<=s);o--);if(n.length=o+1,"text"!==r.type)continue;let a=r.content,l=0,c=a.length;e:for(;l=0)p=a.charCodeAt(d.index-1);else for(o=i-1;o>=0&&("softbreak"!==e[o].type&&"hardbreak"!==e[o].type);o--)if(e[o].content){p=e[o].content.charCodeAt(e[o].content.length-1);break}let g=32;if(l=48&&p<=57&&(h=u=!1),u&&h&&(u=f,h=b),u||h){if(h)for(o=n.length-1;o>=0;o--){let u=n[o];if(n[o].level=0;s--){const a=i[s];if("link_close"!==a.type){if("html_inline"===a.type&&(o=a.content,/^\s]/i.test(o)&&r>0&&r--,j(a.content)&&r++),!(r>0)&&"text"===a.type&&e.md.linkify.test(a.content)){const o=a.content;let r=e.md.linkify.match(o);const l=[];let c=a.level,d=0;r.length>0&&0===r[0].index&&s>0&&"text_special"===i[s-1].type&&(r=r.slice(1));for(let t=0;td){const t=new e.Token("text","",0);t.content=o.slice(d,a),t.level=c,l.push(t)}const u=new e.Token("link_open","a",1);u.attrs=[["href",i]],u.level=c++,u.markup="linkify",u.info="auto",l.push(u);const h=new e.Token("text","",0);h.content=s,h.level=c,l.push(h);const m=new e.Token("link_close","a",-1);m.level=--c,m.markup="linkify",m.info="auto",l.push(m),d=r[t].lastIndex}if(d=0;t--)"inline"===e.tokens[t].type&&(U.test(e.tokens[t].content)&&K(e.tokens[t].children),q.test(e.tokens[t].content)&&Z(e.tokens[t].children))}],["smartquotes",function(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)"inline"===e.tokens[t].type&&J.test(e.tokens[t].content)&&ee(e.tokens[t].children,e)}],["text_join",function(e){let t,o;const n=e.tokens,i=n.length;for(let e=0;e0&&this.level++,this.tokens.push(n),n},ne.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},ne.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;et;)if(!D(this.src.charCodeAt(--e)))return e+1;return e},ne.prototype.skipChars=function(e,t){for(let o=this.src.length;eo;)if(t!==this.src.charCodeAt(--e))return e+1;return e},ne.prototype.getLines=function(e,t,o,n){if(e>=t)return"";const i=new Array(t-e);for(let r=0,s=e;so?new Array(e-o+1).join(" ")+this.src.slice(c,l):this.src.slice(c,l)}return i.join("")},ne.prototype.Token=O;function ie(e,t){const o=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.slice(o,n)}function re(e){const t=[],o=e.length;let n=0,i=e.charCodeAt(n),r=!1,s=0,a="";for(;n=n)return-1;let r=e.src.charCodeAt(i++);if(r<48||r>57)return-1;for(;;){if(i>=n)return-1;if(r=e.src.charCodeAt(i++),!(r>=48&&r<=57)){if(41===r||46===r)break;return-1}if(i-o>=10)return-1}return i`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",ce="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",de=new RegExp("^(?:"+le+"|"+ce+"|\x3c!---?>|\x3c!--(?:[^-]|-[^-]|--[^>])*--\x3e|<[?][\\s\\S]*?[?]>|]*>|)"),ue=new RegExp("^(?:"+le+"|"+ce+")"),he=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^?("+["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"].join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(ue.source+"\\s*$"),/^$/,!1]];const me=[["table",function(e,t,o,n){if(t+2>o)return!1;let i=t+1;if(e.sCount[i]=4)return!1;let r=e.bMarks[i]+e.tShift[i];if(r>=e.eMarks[i])return!1;const s=e.src.charCodeAt(r++);if(124!==s&&45!==s&&58!==s)return!1;if(r>=e.eMarks[i])return!1;const a=e.src.charCodeAt(r++);if(124!==a&&45!==a&&58!==a&&!D(a))return!1;if(45===s&&D(a))return!1;for(;r=4)return!1;c=re(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop();const u=c.length;if(0===u||u!==d.length)return!1;if(n)return!0;const h=e.parentType;e.parentType="table";const m=e.md.block.ruler.getRules("blockquote"),p=[t,0];e.push("table_open","table",1).map=p,e.push("thead_open","thead",1).map=[t,t+1],e.push("tr_open","tr",1).map=[t,t+1];for(let t=0;t=4)break;if(c=re(l),c.length&&""===c[0]&&c.shift(),c.length&&""===c[c.length-1]&&c.pop(),f+=u-c.length,f>65536)break;if(i===t+2){e.push("tbody_open","tbody",1).map=g=[t+2,0]}e.push("tr_open","tr",1).map=[i,i+1];for(let t=0;t=4))break;n++,i=n}e.line=i;const r=e.push("code_block","code",0);return r.content=e.getLines(t,i,4+e.blkIndent,!1)+"\n",r.map=[t,e.line],!0}],["fence",function(e,t,o,n){let i=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;if(i+3>r)return!1;const s=e.src.charCodeAt(i);if(126!==s&&96!==s)return!1;let a=i;i=e.skipChars(i,s);let l=i-a;if(l<3)return!1;const c=e.src.slice(a,i),d=e.src.slice(i,r);if(96===s&&d.indexOf(String.fromCharCode(s))>=0)return!1;if(n)return!0;let u=t,h=!1;for(;(u++,!(u>=o))&&(i=a=e.bMarks[u]+e.tShift[u],r=e.eMarks[u],!(i=4||(i=e.skipChars(i,s),i-a=4)return!1;if(62!==e.src.charCodeAt(i))return!1;if(n)return!0;const a=[],l=[],c=[],d=[],u=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let m,p=!1;for(m=t;m=r)break;if(62===e.src.charCodeAt(i++)&&!t){let t,o,n=e.sCount[m]+1;32===e.src.charCodeAt(i)?(i++,n++,o=!1,t=!0):9===e.src.charCodeAt(i)?(t=!0,(e.bsCount[m]+n)%4==3?(i++,n++,o=!1):o=!0):t=!1;let s=n;for(a.push(e.bMarks[m]),e.bMarks[m]=i;i=r,l.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+(t?1:0),c.push(e.sCount[m]),e.sCount[m]=s-n,d.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let n=!1;for(let t=0,i=u.length;t";const b=[t,0];f.map=b,e.md.block.tokenize(e,t,m),e.push("blockquote_close","blockquote",-1).markup=">",e.lineMax=s,e.parentType=h,b[1]=e.line;for(let o=0;o=4)return!1;let r=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(r++);if(42!==s&&45!==s&&95!==s)return!1;let a=1;for(;r=4)return!1;if(e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]=e.blkIndent&&(m=!0),(h=ae(e,l))>=0){if(d=!0,s=e.bMarks[l]+e.tShift[l],u=Number(e.src.slice(s,h-1)),m&&1!==u)return!1}else{if(!((h=se(e,l))>=0))return!1;d=!1}if(m&&e.skipSpaces(h)>=e.eMarks[l])return!1;if(n)return!0;const p=e.src.charCodeAt(h-1),g=e.tokens.length;d?(a=e.push("ordered_list_open","ol",1),1!==u&&(a.attrs=[["start",u]])):a=e.push("bullet_list_open","ul",1);const f=[l,0];a.map=f,a.markup=String.fromCharCode(p);let b=!1;const k=e.md.block.ruler.getRules("list"),w=e.parentType;for(e.parentType="list";l=i?1:n-t,m>4&&(m=1);const g=t+m;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(p);const f=[l,0];a.map=f,d&&(a.info=e.src.slice(s,h-1));const w=e.tight,_=e.tShift[l],y=e.sCount[l],A=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=g,e.tight=!0,e.tShift[l]=u-e.bMarks[l],e.sCount[l]=n,u>=i&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,o):e.md.block.tokenize(e,l,o,!0),e.tight&&!b||(c=!1),b=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=A,e.tShift[l]=_,e.sCount[l]=y,e.tight=w,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(p),l=e.line,f[1]=l,l>=o)break;if(e.sCount[l]=4)break;let C=!1;for(let t=0,n=k.length;t=4)return!1;if(91!==e.src.charCodeAt(i))return!1;function a(t){const o=e.lineMax;if(t>=o||e.isEmpty(t))return null;let n=!1;if(e.sCount[t]-e.blkIndent>3&&(n=!0),e.sCount[t]<0&&(n=!0),!n){const n=e.md.block.ruler.getRules("reference"),i=e.parentType;e.parentType="reference";let r=!1;for(let i=0,s=n.length;i=4)return!1;if(!e.md.options.html)return!1;if(60!==e.src.charCodeAt(i))return!1;let s=e.src.slice(i,r),a=0;for(;a=4)return!1;let s=e.src.charCodeAt(i);if(35!==s||i>=r)return!1;let a=1;for(s=e.src.charCodeAt(++i);35===s&&i6||ii&&D(e.src.charCodeAt(l-1))&&(r=l),e.line=t+1;const c=e.push("heading_open","h"+String(a),1);c.markup="########".slice(0,a),c.map=[t,e.line];const d=e.push("inline","",0);return d.content=e.src.slice(i,r).trim(),d.map=[t,e.line],d.children=[],e.push("heading_close","h"+String(a),-1).markup="########".slice(0,a),!0},["paragraph","reference","blockquote"]],["lheading",function(e,t,o){const n=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let r,s=0,a=t+1;for(;a3)continue;if(e.sCount[a]>=e.blkIndent){let t=e.bMarks[a]+e.tShift[a];const o=e.eMarks[a];if(t=o))){s=61===r?1:2;break}}if(e.sCount[a]<0)continue;let t=!1;for(let i=0,r=n.length;i3)continue;if(e.sCount[r]<0)continue;let t=!1;for(let i=0,s=n.length;i=o))&&!(e.sCount[s]=r){e.line=o;break}const t=e.line;let l=!1;for(let r=0;r=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),s=e.line,s0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(i),n},ge.prototype.scanDelims=function(e,t){const o=this.posMax,n=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32;let r=e;for(;r?@[]^_`{|}~-".split("").forEach((function(e){ke[e.charCodeAt(0)]=1}));var _e={tokenize:function(e,t){const o=e.pos,n=e.src.charCodeAt(o);if(t)return!1;if(126!==n)return!1;const i=e.scanDelims(e.pos,!0);let r=i.length;const s=String.fromCharCode(n);if(r<2)return!1;let a;r%2&&(a=e.push("text","",0),a.content=s,r--);for(let t=0;t=0;o--){const n=t[o];if(95!==n.marker&&42!==n.marker)continue;if(-1===n.end)continue;const i=t[n.end],r=o>0&&t[o-1].end===n.end+1&&t[o-1].marker===n.marker&&t[o-1].token===n.token-1&&t[n.end+1].token===i.token+1,s=String.fromCharCode(n.marker),a=e.tokens[n.token];a.type=r?"strong_open":"em_open",a.tag=r?"strong":"em",a.nesting=1,a.markup=r?s+s:s,a.content="";const l=e.tokens[i.token];l.type=r?"strong_close":"em_close",l.tag=r?"strong":"em",l.nesting=-1,l.markup=r?s+s:s,l.content="",r&&(e.tokens[t[o-1].token].content="",e.tokens[t[n.end+1].token].content="",o--)}}var Ae={tokenize:function(e,t){const o=e.pos,n=e.src.charCodeAt(o);if(t)return!1;if(95!==n&&42!==n)return!1;const i=e.scanDelims(e.pos,42===n);for(let t=0;t\x00-\x20]*)$/;const xe=/^((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Ee=/^&([a-z][a-z0-9]{1,31});/i;function De(e){const t={},o=e.length;if(!o)return;let n=0,i=-2;const r=[];for(let s=0;sa;l-=r[l]+1){const t=e[l];if(t.marker===o.marker&&(t.open&&t.end<0)){let n=!1;if((t.close||o.open)&&(t.length+o.length)%3==0&&(t.length%3==0&&o.length%3==0||(n=!0)),!n){const n=l>0&&!e[l-1].open?r[l-1]+1:0;r[s]=s-l+n,r[l]=n,o.open=!1,t.end=s,t.close=!1,c=-1,i=-2;break}}}-1!==c&&(t[o.marker][(o.open?3:0)+(o.length||0)%3]=c)}}const Be=[["text",function(e,t){let o=e.pos;for(;o0)return!1;const o=e.pos;if(o+3>e.posMax)return!1;if(58!==e.src.charCodeAt(o))return!1;if(47!==e.src.charCodeAt(o+1))return!1;if(47!==e.src.charCodeAt(o+2))return!1;const n=e.pending.match(be);if(!n)return!1;const i=n[1],r=e.md.linkify.matchAtStart(e.src.slice(o-i.length));if(!r)return!1;let s=r.url;if(s.length<=i.length)return!1;s=s.replace(/\*+$/,"");const a=e.md.normalizeLink(s);if(!e.md.validateLink(a))return!1;if(!t){e.pending=e.pending.slice(0,-i.length);const t=e.push("link_open","a",1);t.attrs=[["href",a]],t.markup="linkify",t.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(s);const o=e.push("link_close","a",-1);o.markup="linkify",o.info="auto"}return e.pos+=s.length-i.length,!0}],["newline",function(e,t){let o=e.pos;if(10!==e.src.charCodeAt(o))return!1;const n=e.pending.length-1,i=e.posMax;if(!t)if(n>=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){let t=n-1;for(;t>=1&&32===e.pending.charCodeAt(t-1);)t--;e.pending=e.pending.slice(0,t),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(o++;o=n)return!1;let i=e.src.charCodeAt(o);if(10===i){for(t||e.push("hardbreak","br",0),o++;o=55296&&i<=56319&&o+1=56320&&t<=57343&&(r+=e.src[o+1],o++)}const s="\\"+r;if(!t){const t=e.push("text_special","",0);i<256&&0!==ke[i]?t.content=r:t.content=s,t.markup=s,t.info="escape"}return e.pos=o+1,!0}],["backticks",function(e,t){let o=e.pos;if(96!==e.src.charCodeAt(o))return!1;const n=o;o++;const i=e.posMax;for(;o=u)return!1;if(l=p,i=e.md.helpers.parseLinkDestination(e.src,p,e.posMax),i.ok){for(s=e.md.normalizeLink(i.str),e.md.validateLink(s)?p=i.pos:s="",l=p;p=u||41!==e.src.charCodeAt(p))&&(c=!0),p++}if(c){if(void 0===e.env.references)return!1;if(p=0?n=e.src.slice(l,p++):p=m+1):p=m+1,n||(n=e.src.slice(h,m)),r=e.env.references[I(n)],!r)return e.pos=d,!1;s=r.href,a=r.title}if(!t){e.pos=h,e.posMax=m;const t=[["href",s]];e.push("link_open","a",1).attrs=t,a&&t.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=p,e.posMax=u,!0}],["image",function(e,t){let o,n,i,r,s,a,l,c,d="";const u=e.pos,h=e.posMax;if(33!==e.src.charCodeAt(e.pos))return!1;if(91!==e.src.charCodeAt(e.pos+1))return!1;const m=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(p<0)return!1;if(r=p+1,r=h)return!1;for(c=r,a=e.md.helpers.parseLinkDestination(e.src,r,e.posMax),a.ok&&(d=e.md.normalizeLink(a.str),e.md.validateLink(d)?r=a.pos:d=""),c=r;r=h||41!==e.src.charCodeAt(r))return e.pos=u,!1;r++}else{if(void 0===e.env.references)return!1;if(r=0?i=e.src.slice(c,r++):r=p+1):r=p+1,i||(i=e.src.slice(m,p)),s=e.env.references[I(i)],!s)return e.pos=u,!1;d=s.href,l=s.title}if(!t){n=e.src.slice(m,p);const t=[];e.md.inline.parse(n,e.md,e.env,t);const o=e.push("image","img",0),i=[["src",d],["alt",""]];o.attrs=i,o.children=t,o.content=n,l&&i.push(["title",l])}return e.pos=r,e.posMax=h,!0}],["autolink",function(e,t){let o=e.pos;if(60!==e.src.charCodeAt(o))return!1;const n=e.pos,i=e.posMax;for(;;){if(++o>=i)return!1;const t=e.src.charCodeAt(o);if(60===t)return!1;if(62===t)break}const r=e.src.slice(n+1,o);if(ve.test(r)){const o=e.md.normalizeLink(r);if(!e.md.validateLink(o))return!1;if(!t){const t=e.push("link_open","a",1);t.attrs=[["href",o]],t.markup="autolink",t.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(r);const n=e.push("link_close","a",-1);n.markup="autolink",n.info="auto"}return e.pos+=r.length+2,!0}if(Ce.test(r)){const o=e.md.normalizeLink("mailto:"+r);if(!e.md.validateLink(o))return!1;if(!t){const t=e.push("link_open","a",1);t.attrs=[["href",o]],t.markup="autolink",t.info="auto";e.push("text","",0).content=e.md.normalizeLinkText(r);const n=e.push("link_close","a",-1);n.markup="autolink",n.info="auto"}return e.pos+=r.length+2,!0}return!1}],["html_inline",function(e,t){if(!e.md.options.html)return!1;const o=e.posMax,n=e.pos;if(60!==e.src.charCodeAt(n)||n+2>=o)return!1;const i=e.src.charCodeAt(n+1);if(33!==i&&63!==i&&47!==i&&!function(e){const t=32|e;return t>=97&&t<=122}(i))return!1;const r=e.src.slice(n).match(de);if(!r)return!1;if(!t){const t=e.push("html_inline","",0);t.content=r[0],s=t.content,/^\s]/i.test(s)&&e.linkLevel++,function(e){return/^<\/a\s*>/i.test(e)}(t.content)&&e.linkLevel--}var s;return e.pos+=r[0].length,!0}],["entity",function(e,t){const o=e.pos,n=e.posMax;if(38!==e.src.charCodeAt(o))return!1;if(o+1>=n)return!1;if(35===e.src.charCodeAt(o+1)){const n=e.src.slice(o).match(xe);if(n){if(!t){const t="x"===n[1][0].toLowerCase()?parseInt(n[1].slice(1),16):parseInt(n[1],10),o=e.push("text_special","",0);o.content=g(t)?f(t):f(65533),o.markup=n[0],o.info="entity"}return e.pos+=n[0].length,!0}}else{const n=e.src.slice(o).match(Ee);if(n){const o=r.decodeHTML(n[0]);if(o!==n[0]){if(!t){const t=e.push("text_special","",0);t.content=o,t.markup=n[0],t.info="entity"}return e.pos+=n[0].length,!0}}}return!1}]],Se=[["balance_pairs",function(e){const t=e.tokens_meta,o=e.tokens_meta.length;De(e.delimiters);for(let e=0;e0&&n++,"text"===i[t].type&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,r[t]=e.pos},Te.prototype.tokenize=function(e){const t=this.ruler.getRules(""),o=t.length,n=e.posMax,i=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}if(s){if(e.pos>=n)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},Te.prototype.parse=function(e,t,o,n){const i=new this.State(e,t,o,n);this.tokenize(i);const r=this.ruler2.getRules(""),s=r.length;for(let e=0;e=0))try{t.hostname=a.toASCII(t.hostname)}catch(e){}return c.encode(c.format(t))}function Ve(e){const t=c.parse(e,!0);if(t.hostname&&(!t.protocol||Re.indexOf(t.protocol)>=0))try{t.hostname=a.toUnicode(t.hostname)}catch(e){}return c.decode(c.format(t),c.decode.defaultChars+"%")}function Oe(e,t){if(!(this instanceof Oe))return new Oe(e,t);t||u(e)||(t=e||{},e="default"),this.inline=new Te,this.block=new pe,this.core=new oe,this.renderer=new z,this.linkify=new s,this.validateLink=Me,this.normalizeLink=ze,this.normalizeLinkText=Ve,this.utils=F,this.helpers=m({},M),this.options={},this.configure(e),t&&this.set(t)}Oe.prototype.set=function(e){return m(this.options,e),this},Oe.prototype.configure=function(e){const t=this;if(u(e)){const t=e;if(!(e=Ie[t]))throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach((function(o){e.components[o].rules&&t[o].ruler.enableOnly(e.components[o].rules),e.components[o].rules2&&t[o].ruler2.enableOnly(e.components[o].rules2)})),this},Oe.prototype.enable=function(e,t){let o=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){o=o.concat(this[t].ruler.enable(e,!0))}),this),o=o.concat(this.inline.ruler2.enable(e,!0));const n=e.filter((function(e){return o.indexOf(e)<0}));if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},Oe.prototype.disable=function(e,t){let o=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach((function(t){o=o.concat(this[t].ruler.disable(e,!0))}),this),o=o.concat(this.inline.ruler2.disable(e,!0));const n=e.filter((function(e){return o.indexOf(e)<0}));if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},Oe.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},Oe.prototype.parse=function(e,t){if("string"!=typeof e)throw new Error("Input data should be a String");const o=new this.core.State(e,this,t);return this.core.process(o),o.tokens},Oe.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},Oe.prototype.parseInline=function(e,t){const o=new this.core.State(e,this,t);return o.inlineMode=!0,this.core.process(o),o.tokens},Oe.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)},e.exports=Oe},5778:(e,t)=>{"use strict";const o={};function n(e,t){"string"!=typeof t&&(t=n.defaultChars);const i=function(e){let t=o[e];if(t)return t;t=o[e]=[];for(let e=0;e<128;e++){const o=String.fromCharCode(e);t.push(o)}for(let o=0;o=55296&&e<=57343?"���":String.fromCharCode(e),o+=6;continue}}if(240==(248&r)&&o+91114111?t+="����":(e-=65536,t+=String.fromCharCode(55296+(e>>10),56320+(1023&e))),o+=9;continue}}t+="�"}}return t}))}n.defaultChars=";/?:@&=+$,#",n.componentChars="";const i={};function r(e,t,o){"string"!=typeof t&&(o=t,t=r.defaultChars),void 0===o&&(o=!0);const n=function(e){let t=i[e];if(t)return t;t=i[e]=[];for(let e=0;e<128;e++){const o=String.fromCharCode(e);/^[0-9a-z]$/i.test(o)?t.push(o):t.push("%"+("0"+e.toString(16).toUpperCase()).slice(-2))}for(let o=0;o=55296&&r<=57343){if(r>=55296&&r<=56319&&t+1=56320&&o<=57343){s+=encodeURIComponent(e[t]+e[t+1]),t++;continue}}s+="%EF%BF%BD"}else s+=encodeURIComponent(e[t])}return s}function s(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}r.defaultChars=";/?:@&=+$,-_.!~*'()#",r.componentChars="-_.!~*'()";const a=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(d),h=["%","/","?",";","#"].concat(u),m=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};s.prototype.parse=function(e,t){let o,n,i,r=e;if(r=r.trim(),!t&&1===e.split("#").length){const e=c.exec(r);if(e)return this.pathname=e[1],e[2]&&(this.search=e[2]),this}let s=a.exec(r);if(s&&(s=s[0],o=s.toLowerCase(),this.protocol=s,r=r.substr(s.length)),(t||s||r.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i="//"===r.substr(0,2),!i||s&&f[s]||(r=r.substr(2),this.slashes=!0)),!f[s]&&(i||s&&!b[s])){let e,t,o=-1;for(let e=0;e127?n+="x":n+=o[e];if(!n.match(p)){const n=e.slice(0,t),i=e.slice(t+1),s=o.match(g);s&&(n.push(s[1]),i.unshift(s[2])),i.length&&(r=i.join(".")+r),this.hostname=n.join(".");break}}}}this.hostname.length>255&&(this.hostname=""),s&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const l=r.indexOf("#");-1!==l&&(this.hash=r.substr(l),r=r.slice(0,l));const d=r.indexOf("?");return-1!==d&&(this.search=r.substr(d),r=r.slice(0,d)),r&&(this.pathname=r),b[o]&&this.hostname&&!this.pathname&&(this.pathname=""),this},s.prototype.parseHost=function(e){let t=l.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},t.decode=n,t.encode=r,t.format=function(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&-1!==e.hostname.indexOf(":")?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t},t.parse=function(e,t){if(e&&e instanceof s)return e;const o=new s;return o.parse(e,t),o}},7444:(e,t,o)=>{"use strict";o.r(t),o.d(t,{decode:()=>b,default:()=>y,encode:()=>k,toASCII:()=>_,toUnicode:()=>w,ucs2decode:()=>m,ucs2encode:()=>p});const n=2147483647,i=36,r=/^xn--/,s=/[^\0-\x7F]/,a=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=Math.floor,d=String.fromCharCode;function u(e){throw new RangeError(l[e])}function h(e,t){const o=e.split("@");let n="";o.length>1&&(n=o[0]+"@",e=o[1]);const i=function(e,t){const o=[];let n=e.length;for(;n--;)o[n]=t(e[n]);return o}((e=e.replace(a,".")).split("."),t).join(".");return n+i}function m(e){const t=[];let o=0;const n=e.length;for(;o=55296&&i<=56319&&oString.fromCodePoint(...e),g=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},f=function(e,t,o){let n=0;for(e=o?c(e/700):e>>1,e+=c(e/t);e>455;n+=i)e=c(e/35);return c(n+36*e/(e+38))},b=function(e){const t=[],o=e.length;let r=0,s=128,a=72,l=e.lastIndexOf("-");l<0&&(l=0);for(let o=0;o=128&&u("not-basic"),t.push(e.charCodeAt(o));for(let h=l>0?l+1:0;h=o&&u("invalid-input");const l=(d=e.charCodeAt(h++))>=48&&d<58?d-48+26:d>=65&&d<91?d-65:d>=97&&d<123?d-97:i;l>=i&&u("invalid-input"),l>c((n-r)/t)&&u("overflow"),r+=l*t;const m=s<=a?1:s>=a+26?26:s-a;if(lc(n/p)&&u("overflow"),t*=p}const m=t.length+1;a=f(r-l,m,0==l),c(r/m)>n-s&&u("overflow"),s+=c(r/m),r%=m,t.splice(r++,0,s)}var d;return String.fromCodePoint(...t)},k=function(e){const t=[],o=(e=m(e)).length;let r=128,s=0,a=72;for(const o of e)o<128&&t.push(d(o));const l=t.length;let h=l;for(l&&t.push("-");h=r&&tc((n-s)/m)&&u("overflow"),s+=(o-r)*m,r=o;for(const o of e)if(on&&u("overflow"),o===r){let e=s;for(let o=i;;o+=i){const n=o<=a?1:o>=a+26?26:o-a;if(e{"use strict";var t=[];function o(e){for(var o=-1,n=0;n{"use strict";var t={};e.exports=function(e,o){var n=function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(o)}},540:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},4868:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach((function(o){e.setAttribute(o,t[o])}))}},4284:e=>{"use strict";var t,o=(t=[],function(e,o){return t[e]=o,t.filter(Boolean).join("\n")});function n(e,t,n,i){var r;if(n)r="";else{r="",i.supports&&(r+="@supports (".concat(i.supports,") {")),i.media&&(r+="@media ".concat(i.media," {"));var s=void 0!==i.layer;s&&(r+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),r+=i.css,s&&(r+="}"),i.media&&(r+="}"),i.supports&&(r+="}")}if(e.styleSheet)e.styleSheet.cssText=o(t,r);else{var a=document.createTextNode(r),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(a,l[t]):e.appendChild(a)}}var i={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=i.singletonCounter++,o=i.singleton||(i.singleton=e.insertStyleElement(e));return{update:function(e){n(o,t,!1,e)},remove:function(e){n(o,t,!0,e)}}}},3492:(e,t)=>{"use strict";t.Any=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,t.Cc=/[\0-\x1F\x7F-\x9F]/,t.Cf=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,t.P=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,t.S=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,t.Z=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},2401:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+PHBhdGggZmlsbD0iI2ZmZiIgZD0ibTExLjA3NyAxNSAuOTkxLTEuNDE2YS43NS43NSAwIDEgMSAxLjIyOS44NmwtMS4xNDggMS42NGEuNzUuNzUgMCAwIDEtLjIxNy4yMDYgNS4yNTEgNS4yNTEgMCAwIDEtOC41MDMtNS45NTUuNy43IDAgMCAxIC4xMi0uMjc0bDEuMTQ3LTEuNjM5YS43NS43NSAwIDEgMSAxLjIyOC44Nkw0LjkzMyAxMC43bC4wMDYuMDAzYTMuNzUgMy43NSAwIDAgMCA2LjEzMiA0LjI5NHptNS40OTQtNS4zMzVhLjc1Ljc1IDAgMCAxLS4xMi4yNzRsLTEuMTQ3IDEuNjM5YS43NS43NSAwIDEgMS0xLjIyOC0uODZsLjg2LTEuMjNhMy43NSAzLjc1IDAgMCAwLTYuMTQ0LTQuMzAxbC0uODYgMS4yMjlhLjc1Ljc1IDAgMCAxLTEuMjI5LS44NmwxLjE0OC0xLjY0YS43NS43NSAwIDAgMSAuMjE3LS4yMDYgNS4yNTEgNS4yNTEgMCAwIDEgOC41MDMgNS45NTVtLTQuNTYzLTIuNTMyYS43NS43NSAwIDAgMSAuMTg0IDEuMDQ1bC0zLjE1NSA0LjUwNWEuNzUuNzUgMCAxIDEtMS4yMjktLjg2bDMuMTU1LTQuNTA2YS43NS43NSAwIDAgMSAxLjA0NS0uMTg0Ii8+PC9zdmc+"}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={id:e,exports:{}};return o[e].call(r.exports,r,r.exports,i),r.exports}i.m=o,i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}var r=Object.create(null);i.r(r);var s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&n&&o;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>s[e]=()=>o[e]));return s.default=()=>o,i.d(r,s),r},i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.b=document.baseURI||self.location.href;var r={};return(()=>{"use strict";let e;try{e={window,document}}catch(t){e={window:{},document:{}}}const t=e;function o(){try{return navigator.userAgent.toLowerCase()}catch(e){return""}}const n=o(),r={isMac:s(n),isWindows:a(n),isGecko:l(n),isSafari:c(n),isiOS:d(n),isAndroid:u(n),isBlink:h(n),get isMediaForcedColors(){return!!t.window.matchMedia&&t.window.matchMedia("(forced-colors: active)").matches},get isMotionReduced(){return!!t.window.matchMedia&&t.window.matchMedia("(prefers-reduced-motion)").matches},features:{isRegExpUnicodePropertySupported:m()}};function s(e){return e.indexOf("macintosh")>-1}function a(e){return e.indexOf("windows")>-1}function l(e){return!!e.match(/gecko\/\d+/)}function c(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}function d(e){return!!e.match(/iphone|ipad/i)||s(e)&&navigator.maxTouchPoints>0}function u(e){return e.indexOf("android")>-1}function h(e){return e.indexOf("chrome/")>-1&&e.indexOf("edge/")<0}function m(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}return e}function p(e,t,o,n){o=o||function(e,t){return e===t};const i=Array.isArray(e)?e:Array.prototype.slice.call(e),r=Array.isArray(t)?t:Array.prototype.slice.call(t),s=function(e,t,o){const n=g(e,t,o);if(-1===n)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const i=f(e,n),r=f(t,n),s=g(i,r,o),a=e.length-s,l=t.length-s;return{firstIndex:n,lastIndexOld:a,lastIndexNew:l}}(i,r,o),a=n?function(e,t){const{firstIndex:o,lastIndexOld:n,lastIndexNew:i}=e;if(-1===o)return Array(t).fill("equal");let r=[];o>0&&(r=r.concat(Array(o).fill("equal")));i-o>0&&(r=r.concat(Array(i-o).fill("insert")));n-o>0&&(r=r.concat(Array(n-o).fill("delete")));i0&&o.push({index:n,type:"insert",values:e.slice(n,r)});i-n>0&&o.push({index:n+(r-n),type:"delete",howMany:i-n});return o}(r,s);return a}function g(e,t,o){for(let n=0;n200||i>200||n+i>300)return b.fastDiff(e,t,o,!0);let r,s;if(ic?-1:1;d[n+h]&&(d[n]=d[n+h].slice(0)),d[n]||(d[n]=[]),d[n].push(i>c?r:s);let m=Math.max(i,c),p=m-n;for(;pc;m--)u[m]=h(m);u[c]=h(c),p++}while(u[c]!==l);return d[c].slice(1)}b.fastDiff=p;const k=function(){return function e(){e.called=!0}};class w{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=k(),this.off=k()}}const y=new Array(256).fill("").map(((e,t)=>("0"+t.toString(16)).slice(-2)));function A(){const e=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,o=4294967296*Math.random()>>>0,n=4294967296*Math.random()>>>0;return"e"+y[e>>0&255]+y[e>>8&255]+y[e>>16&255]+y[e>>24&255]+y[t>>0&255]+y[t>>8&255]+y[t>>16&255]+y[t>>24&255]+y[o>>0&255]+y[o>>8&255]+y[o>>16&255]+y[o>>24&255]+y[n>>0&255]+y[n>>8&255]+y[n>>16&255]+y[n>>24&255]}const C={get(e="normal"){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function v(e,t){const o=C.get(t.priority);for(let n=0;n{if("object"==typeof t&&null!==t){if(o.has(t))return`[object ${t.constructor.name}]`;o.add(t)}return t},i=t?` ${JSON.stringify(t,n)}`:"",r=B(e);return e+i+r}(e,o)),this.name="CKEditorError",this.context=t,this.data=o}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;const o=new E(e.message,t);throw o.stack=e.stack,o}}function D(e,t){console.warn(...S(e,t))}function B(e){return`\nRead more: ${x}#error-${e}`}function S(e,t){const o=B(e);return t?[e,t,o]:[e,o]}const T="43.0.0",I=new Date(2024,7,7);if(globalThis.CKEDITOR_VERSION)throw new E("ckeditor-duplicated-modules",null);globalThis.CKEDITOR_VERSION=T;const P=Symbol("listeningTo"),F=Symbol("emitterId"),M=Symbol("delegations"),R=z(Object);function z(e){if(!e)return R;return class extends e{on(e,t,o){this.listenTo(this,e,t,o)}once(e,t,o){let n=!1;this.listenTo(this,e,((e,...o)=>{n||(n=!0,e.off(),t.call(this,e,...o))}),o)}off(e,t){this.stopListening(this,e,t)}listenTo(e,t,o,n={}){let i,r;this[P]||(this[P]={});const s=this[P];O(e)||V(e);const a=O(e);(i=s[a])||(i=s[a]={emitter:e,callbacks:{}}),(r=i.callbacks[t])||(r=i.callbacks[t]=[]),r.push(o),function(e,t,o,n,i){t._addEventListener?t._addEventListener(o,n,i):e._addEventListener.call(t,o,n,i)}(this,e,t,o,n)}stopListening(e,t,o){const n=this[P];let i=e&&O(e);const r=n&&i?n[i]:void 0,s=r&&t?r.callbacks[t]:void 0;if(!(!n||e&&!r||t&&!s))if(o){q(this,e,t,o);-1!==s.indexOf(o)&&(1===s.length?delete r.callbacks[t]:q(this,e,t,o))}else if(s){for(;o=s.pop();)q(this,e,t,o);delete r.callbacks[t]}else if(r){for(t in r.callbacks)this.stopListening(e,t);delete n[i]}else{for(i in n)this.stopListening(n[i].emitter);delete this[P]}}fire(e,...t){try{const o=e instanceof w?e:new w(this,e),n=o.name;let i=H(this,n);if(o.path.push(this),i){const e=[o,...t];i=Array.from(i);for(let t=0;t{this[M]||(this[M]=new Map),e.forEach((e=>{const n=this[M].get(e);n?n.set(t,o):this[M].set(e,new Map([[t,o]]))}))}}}stopDelegating(e,t){if(this[M])if(e)if(t){const o=this[M].get(e);o&&o.delete(t)}else this[M].delete(e);else this[M].clear()}_addEventListener(e,t,o){!function(e,t){const o=N(e);if(o[t])return;let n=t,i=null;const r=[];for(;""!==n&&!o[n];)o[n]={callbacks:[],childEvents:[]},r.push(o[n]),i&&o[n].childEvents.push(i),i=n,n=n.substr(0,n.lastIndexOf(":"));if(""!==n){for(const e of r)e.callbacks=o[n].callbacks.slice();o[n].childEvents.push(i)}}(this,e);const n=L(this,e),i={callback:t,priority:C.get(o.priority)};for(const e of n)v(e,i)}_removeEventListener(e,t){const o=L(this,e);for(const e of o)for(let o=0;o-1?H(e,t.substr(0,t.lastIndexOf(":"))):null}function j(e,t,o){for(let[n,i]of e){i?"function"==typeof i&&(i=i(t.name)):i=t.name;const e=new w(t.source,i);e.path=[...t.path],n.fire(e,...o)}}function q(e,t,o,n){t._removeEventListener?t._removeEventListener(o,n):e._removeEventListener.call(t,o,n)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{z[e]=R.prototype[e]}));const U=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},W=Symbol("observableProperties"),$=Symbol("boundObservables"),G=Symbol("boundProperties"),K=Symbol("decoratedMethods"),Z=Symbol("decoratedOriginal"),J=Y(z());function Y(e){if(!e)return J;return class extends e{set(e,t){if(U(e))return void Object.keys(e).forEach((t=>{this.set(t,e[t])}),this);Q(this);const o=this[W];if(e in this&&!o.has(e))throw new E("observable-set-cannot-override",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>o.get(e),set(t){const n=o.get(e);let i=this.fire(`set:${e}`,e,t,n);void 0===i&&(i=t),n===i&&o.has(e)||(o.set(e,i),this.fire(`change:${e}`,e,i,n))}}),this[e]=t}bind(...e){if(!e.length||!te(e))throw new E("observable-bind-wrong-properties",this);if(new Set(e).size!==e.length)throw new E("observable-bind-duplicate-properties",this);Q(this);const t=this[G];e.forEach((e=>{if(t.has(e))throw new E("observable-bind-rebind",this)}));const o=new Map;return e.forEach((e=>{const n={property:e,to:[]};t.set(e,n),o.set(e,n)})),{to:X,toMany:ee,_observable:this,_bindProperties:e,_to:[],_bindings:o}}unbind(...e){if(!this[W])return;const t=this[G],o=this[$];if(e.length){if(!te(e))throw new E("observable-unbind-wrong-properties",this);e.forEach((e=>{const n=t.get(e);n&&(n.to.forEach((([e,t])=>{const i=o.get(e),r=i[t];r.delete(n),r.size||delete i[t],Object.keys(i).length||(o.delete(e),this.stopListening(e,"change"))})),t.delete(e))}))}else o.forEach(((e,t)=>{this.stopListening(t,"change")})),o.clear(),t.clear()}decorate(e){Q(this);const t=this[e];if(!t)throw new E("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:e});this.on(e,((e,o)=>{e.return=t.apply(this,o)})),this[e]=function(...t){return this.fire(e,t)},this[e][Z]=t,this[K]||(this[K]=[]),this[K].push(e)}stopListening(e,t,o){if(!e&&this[K]){for(const e of this[K])this[e]=this[e][Z];delete this[K]}super.stopListening(e,t,o)}}}function Q(e){e[W]||(Object.defineProperty(e,W,{value:new Map}),Object.defineProperty(e,$,{value:new Map}),Object.defineProperty(e,G,{value:new Map}))}function X(...e){const t=function(...e){if(!e.length)throw new E("observable-bind-to-parse-error",null);const t={to:[]};let o;"function"==typeof e[e.length-1]&&(t.callback=e.pop());return e.forEach((e=>{if("string"==typeof e)o.properties.push(e);else{if("object"!=typeof e)throw new E("observable-bind-to-parse-error",null);o={observable:e,properties:[]},t.to.push(o)}})),t}(...e),o=Array.from(this._bindings.keys()),n=o.length;if(!t.callback&&t.to.length>1)throw new E("observable-bind-to-no-callback",this);if(n>1&&t.callback)throw new E("observable-bind-to-extra-callback",this);var i;t.to.forEach((e=>{if(e.properties.length&&e.properties.length!==n)throw new E("observable-bind-to-properties-length",this);e.properties.length||(e.properties=this._bindProperties)})),this._to=t.to,t.callback&&(this._bindings.get(o[0]).callback=t.callback),i=this._observable,this._to.forEach((e=>{const t=i[$];let o;t.get(e.observable)||i.listenTo(e.observable,"change",((n,r)=>{o=t.get(e.observable)[r],o&&o.forEach((e=>{oe(i,e.property)}))}))})),function(e){let t;e._bindings.forEach(((o,n)=>{e._to.forEach((i=>{t=i.properties[o.callback?0:e._bindProperties.indexOf(n)],o.to.push([i.observable,t]),function(e,t,o,n){const i=e[$],r=i.get(o),s=r||{};s[n]||(s[n]=new Set);s[n].add(t),r||i.set(o,s)}(e._observable,o,i.observable,t)}))}))}(this),this._bindProperties.forEach((e=>{oe(this._observable,e)}))}function ee(e,t,o){if(this._bindings.size>1)throw new E("observable-bind-to-many-not-one-binding",this);this.to(...function(e,t){const o=e.map((e=>[e,t]));return Array.prototype.concat.apply([],o)}(e,t),o)}function te(e){return e.every((e=>"string"==typeof e))}function oe(e,t){const o=e[G].get(t);let n;o.callback?n=o.callback.apply(e,o.to.map((e=>e[0][e[1]]))):(n=o.to[0],n=n[0][n[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=n:e.set(t,n)}function ne(e){let t=0;for(const o of e)t++;return t}function ie(e,t){const o=Math.min(e.length,t.length);for(let n=0;n{Y[e]=J.prototype[e]}));const se="object"==typeof global&&global&&global.Object===Object&&global;var ae="object"==typeof self&&self&&self.Object===Object&&self;const le=se||ae||Function("return this")();const ce=le.Symbol;var de=Object.prototype,ue=de.hasOwnProperty,he=de.toString,me=ce?ce.toStringTag:void 0;const pe=function(e){var t=ue.call(e,me),o=e[me];try{e[me]=void 0;var n=!0}catch(e){}var i=he.call(e);return n&&(t?e[me]=o:delete e[me]),i};var ge=Object.prototype.toString;const fe=function(e){return ge.call(e)};var be=ce?ce.toStringTag:void 0;const ke=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":be&&be in Object(e)?pe(e):fe(e)};const we=Array.isArray;const _e=function(e){return null!=e&&"object"==typeof e};const ye=function(e){return"string"==typeof e||!we(e)&&_e(e)&&"[object String]"==ke(e)};function Ae(e,t,o={},n=[]){const i=o&&o.xmlns,r=i?e.createElementNS(i,t):e.createElement(t);for(const e in o)r.setAttribute(e,o[e]);!ye(n)&&re(n)||(n=[n]);for(let t of n)ye(t)&&(t=e.createTextNode(t)),r.appendChild(t);return r}const Ce=function(e,t){return function(o){return e(t(o))}};const ve=Ce(Object.getPrototypeOf,Object);var xe=Function.prototype,Ee=Object.prototype,De=xe.toString,Be=Ee.hasOwnProperty,Se=De.call(Object);const Te=function(e){if(!_e(e)||"[object Object]"!=ke(e))return!1;var t=ve(e);if(null===t)return!0;var o=Be.call(t,"constructor")&&t.constructor;return"function"==typeof o&&o instanceof o&&De.call(o)==Se};const Ie=function(){this.__data__=[],this.size=0};const Pe=function(e,t){return e===t||e!=e&&t!=t};const Fe=function(e,t){for(var o=e.length;o--;)if(Pe(e[o][0],t))return o;return-1};var Me=Array.prototype.splice;const Re=function(e){var t=this.__data__,o=Fe(t,e);return!(o<0)&&(o==t.length-1?t.pop():Me.call(t,o,1),--this.size,!0)};const ze=function(e){var t=this.__data__,o=Fe(t,e);return o<0?void 0:t[o][1]};const Ve=function(e){return Fe(this.__data__,e)>-1};const Oe=function(e,t){var o=this.__data__,n=Fe(o,e);return n<0?(++this.size,o.push([e,t])):o[n][1]=t,this};function Ne(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991};var Zt={};Zt["[object Float32Array]"]=Zt["[object Float64Array]"]=Zt["[object Int8Array]"]=Zt["[object Int16Array]"]=Zt["[object Int32Array]"]=Zt["[object Uint8Array]"]=Zt["[object Uint8ClampedArray]"]=Zt["[object Uint16Array]"]=Zt["[object Uint32Array]"]=!0,Zt["[object Arguments]"]=Zt["[object Array]"]=Zt["[object ArrayBuffer]"]=Zt["[object Boolean]"]=Zt["[object DataView]"]=Zt["[object Date]"]=Zt["[object Error]"]=Zt["[object Function]"]=Zt["[object Map]"]=Zt["[object Number]"]=Zt["[object Object]"]=Zt["[object RegExp]"]=Zt["[object Set]"]=Zt["[object String]"]=Zt["[object WeakMap]"]=!1;const Jt=function(e){return _e(e)&&Kt(e.length)&&!!Zt[ke(e)]};const Yt=function(e){return function(t){return e(t)}};var Qt="object"==typeof exports&&exports&&!exports.nodeType&&exports,Xt=Qt&&"object"==typeof module&&module&&!module.nodeType&&module,eo=Xt&&Xt.exports===Qt&&se.process;const to=function(){try{var e=Xt&&Xt.require&&Xt.require("util").types;return e||eo&&eo.binding&&eo.binding("util")}catch(e){}}();var oo=to&&to.isTypedArray;const no=oo?Yt(oo):Jt;var io=Object.prototype.hasOwnProperty;const ro=function(e,t){var o=we(e),n=!o&&Lt(e),i=!o&&!n&&Wt(e),r=!o&&!n&&!i&&no(e),s=o||n||i||r,a=s?Rt(e.length,String):[],l=a.length;for(var c in e)!t&&!io.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||r&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Gt(c,l))||a.push(c);return a};var so=Object.prototype;const ao=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||so)};const lo=Ce(Object.keys,Object);var co=Object.prototype.hasOwnProperty;const uo=function(e){if(!ao(e))return lo(e);var t=[];for(var o in Object(e))co.call(e,o)&&"constructor"!=o&&t.push(o);return t};const ho=function(e){return null!=e&&Kt(e.length)&&!We(e)};const mo=function(e){return ho(e)?ro(e):uo(e)};const po=function(e,t){return e&&Mt(t,mo(t),e)};const go=function(e){var t=[];if(null!=e)for(var o in Object(e))t.push(o);return t};var fo=Object.prototype.hasOwnProperty;const bo=function(e){if(!U(e))return go(e);var t=ao(e),o=[];for(var n in e)("constructor"!=n||!t&&fo.call(e,n))&&o.push(n);return o};const ko=function(e){return ho(e)?ro(e,!0):bo(e)};const wo=function(e,t){return e&&Mt(t,ko(t),e)};var _o="object"==typeof exports&&exports&&!exports.nodeType&&exports,yo=_o&&"object"==typeof module&&module&&!module.nodeType&&module,Ao=yo&&yo.exports===_o?le.Buffer:void 0,Co=Ao?Ao.allocUnsafe:void 0;const vo=function(e,t){if(t)return e.slice();var o=e.length,n=Co?Co(o):new e.constructor(o);return e.copy(n),n};const xo=function(e,t){var o=-1,n=e.length;for(t||(t=Array(n));++o{this._setToTarget(e,n,t[n],o)}))}}function Tn(e){return Dn(e,In)}function In(e){return Bn(e)||"function"==typeof e?e:void 0}function Pn(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}function Fn(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}const Mn=Rn(z());function Rn(e){if(!e)return Mn;return class extends e{listenTo(e,t,o,n={}){if(Pn(e)||Fn(e)){const i={capture:!!n.useCapture,passive:!!n.usePassive},r=this._getProxyEmitter(e,i)||new zn(e,i);this.listenTo(r,t,o,n)}else super.listenTo(e,t,o,n)}stopListening(e,t,o){if(Pn(e)||Fn(e)){const n=this._getAllProxyEmitters(e);for(const e of n)this.stopListening(e,t,o)}else super.stopListening(e,t,o)}_getProxyEmitter(e,t){return function(e,t){const o=e[P];return o&&o[t]?o[t].emitter:null}(this,Vn(e,t))}_getAllProxyEmitters(e){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map((t=>this._getProxyEmitter(e,t))).filter((e=>!!e))}}}["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{Rn[e]=Mn.prototype[e]}));class zn extends(z()){constructor(e,t){super(),V(this,Vn(e,t)),this._domNode=e,this._options=t}attach(e){if(this._domListeners&&this._domListeners[e])return;const t=this._createDomListener(e);this._domNode.addEventListener(e,t,this._options),this._domListeners||(this._domListeners={}),this._domListeners[e]=t}detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()}_addEventListener(e,t,o){this.attach(e),z().prototype._addEventListener.call(this,e,t,o)}_removeEventListener(e,t){z().prototype._removeEventListener.call(this,e,t),this.detach(e)}_createDomListener(e){const t=t=>{this.fire(e,t)};return t.removeListener=()=>{this._domNode.removeEventListener(e,t,this._options),delete this._domListeners[e]},t}}function Vn(e,t){let o=function(e){return e["data-ck-expando"]||(e["data-ck-expando"]=A())}(e);for(const e of Object.keys(t).sort())t[e]&&(o+="-"+e);return o}function On(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}function Nn(e){return"[object Text]"==Object.prototype.toString.call(e)}function Ln(e){return"[object Range]"==Object.prototype.toString.apply(e)}function Hn(e){return e&&e.parentNode?e.offsetParent===t.document.body?null:e.offsetParent:null}const jn=["top","right","bottom","left","width","height"];class qn{constructor(e){const t=Ln(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),$n(e)||t)if(t){const t=qn.getDomRangeRects(e);Un(this,qn.getBoundingRect(t))}else Un(this,e.getBoundingClientRect());else if(Fn(e)){const{innerWidth:t,innerHeight:o}=e;Un(this,{top:0,right:t,bottom:o,left:0,width:t,height:o})}else Un(this,e)}clone(){return new qn(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left),width:0,height:0};if(t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0)return null;{const e=new qn(t);return e._source=this._source,e}}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(Wn(e))return t;let o,n=e,i=e.parentNode||e.commonAncestorContainer;for(;i&&!Wn(i);){const e="visible"===((r=i)instanceof HTMLElement?r.ownerDocument.defaultView.getComputedStyle(r).overflow:"visible");n instanceof HTMLElement&&"absolute"===Gn(n)&&(o=n);const s=Gn(i);if(e||o&&("relative"===s&&e||"relative"!==s)){n=i,i=i.parentNode;continue}const a=new qn(i),l=t.getIntersection(a);if(!l)return null;l.getArea(){for(const t of e){const e=Kn._getElementCallbacks(t.target);if(e)for(const o of e)o(t)}}))}}Kn._observerInstance=null,Kn._elementCallbacks=null;const Zn=Kn;function Jn(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function Yn(e){return t=>t+e}function Qn(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function Xn(e,t,o){e.insertBefore(o,e.childNodes[t]||null)}function ei(e){return e&&e.nodeType===Node.COMMENT_NODE}function ti(e){return!!(e&&e.getClientRects&&e.getClientRects().length)}function oi({element:e,target:o,positions:n,limiter:i,fitInViewport:r,viewportOffsetConfig:s}){We(o)&&(o=o()),We(i)&&(i=i());const a=Hn(e),l=function(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const o=new qn(t.window);return o.top+=e.top,o.height-=e.top,o.bottom-=e.bottom,o.height-=e.bottom,o}(s),c=new qn(e),d=ni(o,l);let u;if(!d||!l.getIntersection(d))return null;const h={targetRect:d,elementRect:c,positionedElementAncestor:a,viewportRect:l};if(i||r){if(i){const e=ni(i,l);e&&(h.limiterRect=e)}u=function(e,t){const{elementRect:o}=t,n=o.getArea(),i=e.map((e=>new ii(e,t))).filter((e=>!!e.name));let r=0,s=null;for(const e of i){const{limiterIntersectionArea:t,viewportIntersectionArea:o}=e;if(t===n)return e;const i=o**2+t**2;i>r&&(r=i,s=e)}return s}(n,h)}else u=new ii(n[0],h);return u}function ni(e,t){const o=new qn(e).getVisible();return o?o.getIntersection(t):null}class ii{constructor(e,t){const o=e(t.targetRect,t.elementRect,t.viewportRect,t.limiterRect);if(!o)return;const{left:n,top:i,name:r,config:s}=o;this.name=r,this.config=s,this._positioningFunctionCoordinates={left:n,top:i},this._options=t}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const e=this._options.limiterRect;return e?e.getIntersectionArea(this._rect):0}get viewportIntersectionArea(){return this._options.viewportRect.getIntersectionArea(this._rect)}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCoordinates.left,this._positioningFunctionCoordinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=this._rect.toAbsoluteRect()),this._cachedAbsoluteRect}}function ri(e){const t=e.parentNode;t&&t.removeChild(e)}function si({window:e,rect:t,alignToTop:o,forceScroll:n,viewportOffset:i}){const r=t.clone().moveBy(0,i.bottom),s=t.clone().moveBy(0,-i.top),a=new qn(e).excludeScrollbarsAndBorders(),l=o&&n,c=[s,r].every((e=>a.contains(e)));let{scrollX:d,scrollY:u}=e;const h=d,m=u;l?u-=a.top-t.top+i.top:c||(ci(s,a)?u-=a.top-t.top+i.top:li(r,a)&&(u+=o?t.top-a.top-i.top:t.bottom-a.bottom+i.bottom)),c||(di(t,a)?d-=a.left-t.left+i.left:ui(t,a)&&(d+=t.right-a.right+i.right)),d==h&&u===m||e.scrollTo(d,u)}function ai({parent:e,getRect:t,alignToTop:o,forceScroll:n,ancestorOffset:i=0,limiterElement:r}){const s=hi(e),a=o&&n;let l,c,d;const u=r||s.document.body;for(;e!=u;)c=t(),l=new qn(e).excludeScrollbarsAndBorders(),d=l.contains(c),a?e.scrollTop-=l.top-c.top+i:d||(ci(c,l)?e.scrollTop-=l.top-c.top+i:li(c,l)&&(e.scrollTop+=o?c.top-l.top-i:c.bottom-l.bottom+i)),d||(di(c,l)?e.scrollLeft-=l.left-c.left+i:ui(c,l)&&(e.scrollLeft+=c.right-l.right+i)),e=e.parentNode}function li(e,t){return e.bottom>t.bottom}function ci(e,t){return e.topt.right}function hi(e){return Ln(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function mi(e){if(Ln(e)){let t=e.commonAncestorContainer;return Nn(t)&&(t=t.parentNode),t}return e.parentNode}function pi(e,t){const o=hi(e),n=new qn(e);if(o===t)return n;{let e=o;for(;e!=t;){const t=e.frameElement,o=new qn(t).excludeScrollbarsAndBorders();n.moveBy(o.left,o.top),e=e.parent}}return n}const gi={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},fi={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},bi={37:"←",38:"↑",39:"→",40:"↓",9:"⇥",33:"Page Up",34:"Page Down"},ki=vi(),wi=Object.fromEntries(Object.entries(ki).map((([e,t])=>{let o;return o=t in bi?bi[t]:e.charAt(0).toUpperCase()+e.slice(1),[t,o]})));function _i(e){let t;if("string"==typeof e){if(t=ki[e.toLowerCase()],!t)throw new E("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?ki.alt:0)+(e.ctrlKey?ki.ctrl:0)+(e.shiftKey?ki.shift:0)+(e.metaKey?ki.cmd:0);return t}function yi(e){return"string"==typeof e&&(e=function(e){return e.split("+").map((e=>e.trim()))}(e)),e.map((e=>"string"==typeof e?function(e){if(e.endsWith("!"))return _i(e.slice(0,-1));const t=_i(e);return(r.isMac||r.isiOS)&&t==ki.ctrl?ki.cmd:t}(e):e)).reduce(((e,t)=>t+e),0)}function Ai(e){let t=yi(e);return Object.entries(r.isMac||r.isiOS?gi:fi).reduce(((e,[o,n])=>(0!=(t&ki[o])&&(t&=~ki[o],e+=n),e)),"")+(t?wi[t]:"")}function Ci(e,t){const o="ltr"===t;switch(e){case ki.arrowleft:return o?"left":"right";case ki.arrowright:return o?"right":"left";case ki.arrowup:return"up";case ki.arrowdown:return"down"}}function vi(){const e={pageup:33,pagedown:34,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let t=65;t<=90;t++){e[String.fromCharCode(t).toLowerCase()]=t}for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;return Object.assign(e,{"'":222,",":108,"-":109,".":110,"/":111,";":186,"=":187,"[":219,"\\":220,"]":221,"`":223}),e}function xi(e){return Array.isArray(e)?e:[e]}const Ei=function(e,t,o){(void 0!==o&&!Pe(e[t],o)||void 0===o&&!(t in e))&&It(e,t,o)};const Di=function(e){return function(t,o,n){for(var i=-1,r=Object(t),s=n(t),a=s.length;a--;){var l=s[e?a:++i];if(!1===o(r[l],l,r))break}return t}}();const Bi=function(e){return _e(e)&&ho(e)};const Si=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};const Ti=function(e){return Mt(e,ko(e))};const Ii=function(e,t,o,n,i,r,s){var a=Si(e,o),l=Si(t,o),c=s.get(l);if(c)Ei(e,o,c);else{var d=r?r(a,l,o+"",e,t,s):void 0,u=void 0===d;if(u){var h=we(l),m=!h&&Wt(l),p=!h&&!m&&no(l);d=l,h||m||p?we(a)?d=a:Bi(a)?d=xo(a):m?(u=!1,d=vo(l,!0)):p?(u=!1,d=un(l,!0)):d=[]:Te(l)||Lt(l)?(d=a,Lt(a)?d=Ti(a):U(a)&&!We(a)||(d=gn(l))):u=!1}u&&(s.set(l,d),i(d,l,n,r,s),s.delete(l)),Ei(e,o,d)}};const Pi=function e(t,o,n,i,r){t!==o&&Di(o,(function(s,a){if(r||(r=new Bt),U(s))Ii(t,o,a,n,e,i,r);else{var l=i?i(Si(t,a),s,a+"",t,o,r):void 0;void 0===l&&(l=s),Ei(t,a,l)}}),ko)};const Fi=function(e){return e};const Mi=function(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2])}return e.apply(t,o)};var Ri=Math.max;const zi=function(e,t,o){return t=Ri(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,r=Ri(n.length-t,0),s=Array(r);++i0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}};const Hi=Li(Oi);const ji=function(e,t){return Hi(zi(e,t,Fi),e+"")};const qi=function(e,t,o){if(!U(o))return!1;var n=typeof t;return!!("number"==n?ho(o)&&Gt(t,o.length):"string"==n&&t in o)&&Pe(o[t],e)};const Ui=function(e){return ji((function(t,o){var n=-1,i=o.length,r=i>1?o[i-1]:void 0,s=i>2?o[2]:void 0;for(r=e.length>3&&"function"==typeof r?(i--,r):void 0,s&&qi(o[0],o[1],s)&&(r=i<3?void 0:r,i=1),t=Object(t);++n1===e?0:1),d=l[a];if("string"==typeof d)return d;return d[Number(c(n))]}t.window.CKEDITOR_TRANSLATIONS||(t.window.CKEDITOR_TRANSLATIONS={});const Ki=["ar","ara","dv","div","fa","per","fas","he","heb","ku","kur","ug","uig"];function Zi(e){return Ki.includes(e)?"rtl":"ltr"}class Ji{constructor({uiLanguage:e="en",contentLanguage:t,translations:o}={}){this.uiLanguage=e,this.contentLanguage=t||this.uiLanguage,this.uiLanguageDirection=Zi(this.uiLanguage),this.contentLanguageDirection=Zi(this.contentLanguage),this.translations=function(e){return Array.isArray(e)?e.reduce(((e,t)=>$i(e,t))):e}(o),this.t=(e,t)=>this._t(e,t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(e,t=[]){t=xi(t),"string"==typeof e&&(e={string:e});const o=!!e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,((e,o)=>othis._items.length||t<0)throw new E("collection-add-item-invalid-index",this);let o=0;for(const n of e){const e=this._getItemIdBeforeAdding(n),i=t+o;this._items.splice(i,0,n),this._itemMap.set(e,n),this.fire("add",n,i),o++}return this.fire("change",{added:e,removed:[],index:t}),this}get(e){let t;if("string"==typeof e)t=this._itemMap.get(e);else{if("number"!=typeof e)throw new E("collection-get-invalid-arg",this);t=this._items[e]}return t||null}has(e){if("string"==typeof e)return this._itemMap.has(e);{const t=e[this._idProperty];return t&&this._itemMap.has(t)}}getIndex(e){let t;return t="string"==typeof e?this._itemMap.get(e):e,t?this._items.indexOf(t):-1}remove(e){const[t,o]=this._remove(e);return this.fire("change",{added:[],removed:[t],index:o}),t}map(e,t){return this._items.map(e,t)}forEach(e,t){this._items.forEach(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const e=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:e,index:0})}bindTo(e){if(this._bindToCollection)throw new E("collection-bind-to-rebind",this);return this._bindToCollection=e,{as:e=>{this._setUpBindToBinding((t=>new e(t)))},using:e=>{"function"==typeof e?this._setUpBindToBinding(e):this._setUpBindToBinding((t=>t[e]))}}}_setUpBindToBinding(e){const t=this._bindToCollection,o=(o,n,i)=>{const r=t._bindToCollection==this,s=t._bindToInternalToExternalMap.get(n);if(r&&s)this._bindToExternalToInternalMap.set(n,s),this._bindToInternalToExternalMap.set(s,n);else{const o=e(n);if(!o)return void this._skippedIndexesFromExternal.push(i);let r=i;for(const e of this._skippedIndexesFromExternal)i>e&&r--;for(const e of t._skippedIndexesFromExternal)r>=e&&r++;this._bindToExternalToInternalMap.set(n,o),this._bindToInternalToExternalMap.set(o,n),this.add(o,r);for(let e=0;e{const n=this._bindToExternalToInternalMap.get(t);n&&this.remove(n),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce(((e,t)=>(ot&&e.push(t),e)),[])}))}_getItemIdBeforeAdding(e){const t=this._idProperty;let o;if(t in e){if(o=e[t],"string"!=typeof o)throw new E("collection-add-invalid-id",this);if(this.get(o))throw new E("collection-add-item-already-exists",this)}else e[t]=o=A();return o}_remove(e){let t,o,n,i=!1;const r=this._idProperty;if("string"==typeof e?(o=e,n=this._itemMap.get(o),i=!n,n&&(t=this._items.indexOf(n))):"number"==typeof e?(t=e,n=this._items[t],i=!n,n&&(o=n[r])):(n=e,o=n[r],t=this._items.indexOf(n),i=-1==t||!this._itemMap.get(o)),i)throw new E("collection-remove-404",this);this._items.splice(t,1),this._itemMap.delete(o);const s=this._bindToInternalToExternalMap.get(n);return this._bindToInternalToExternalMap.delete(n),this._bindToExternalToInternalMap.delete(s),this.fire("remove",n,t),[n,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function Qi(e){const t=e.next();return t.done?null:t.value}class Xi extends(Rn(Y())){constructor(){super(),this._elements=new Set,this._nextEventLoopTimeout=null,this.set("isFocused",!1),this.set("focusedElement",null)}add(e){if(this._elements.has(e))throw new E("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",(()=>this._focus(e)),{useCapture:!0}),this.listenTo(e,"blur",(()=>this._blur()),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}destroy(){this.stopListening()}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout((()=>{this.focusedElement=null,this.isFocused=!1}),0)}}class er{constructor(){this._listener=new(Rn())}listenTo(e){this._listener.listenTo(e,"keydown",((e,t)=>{this._listener.fire("_keydown:"+_i(t),t)}))}set(e,t,o={}){const n=yi(e),i=o.priority;this._listener.listenTo(this._listener,"_keydown:"+n,((e,n)=>{o.filter&&!o.filter(n)||(t(n,(()=>{n.preventDefault(),n.stopPropagation(),e.stop()})),e.return=!0)}),{priority:i})}press(e){return!!this._listener.fire("_keydown:"+_i(e),e)}stopListening(e){this._listener.stopListening(e)}destroy(){this.stopListening()}}function tr(e){return re(e)?new Map(e):function(e){const t=new Map;for(const o in e)t.set(o,e[o]);return t}(e)}function or(e,t){let o;function n(...i){n.cancel(),o=setTimeout((()=>e(...i)),t)}return n.cancel=()=>{clearTimeout(o)},n}function nr(e,t){return!!(o=e.charAt(t-1))&&1==o.length&&/[\ud800-\udbff]/.test(o)&&function(e){return!!e&&1==e.length&&/[\udc00-\udfff]/.test(e)}(e.charAt(t));var o}function ir(e,t){return!!(o=e.charAt(t))&&1==o.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(o);var o}const rr=ar();function sr(e,t){const o=String(e).matchAll(rr);return Array.from(o).some((e=>e.indexe.source)).join("|")+")";return new RegExp(`${e}|${t}(?:${t})*`,"ug")}class lr extends(Y()){constructor(e){super(),this._disableStack=new Set,this.editor=e,this.set("isEnabled",!0)}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",cr,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",cr),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function cr(e){e.return=!1,e.stop()}class dr extends(Y()){constructor(e){super(),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,n=!("$graveyard"==o.getFirstPosition().root.rootName)&&e.model.canEditAt(o);(e.isReadOnly||this._isEnabledBasedOnSelection&&!n)&&(t.return=!1,t.stop())}),{priority:"highest"}),this.on("execute",(e=>{this.isEnabled||e.stop()}),{priority:"high"})}get affectsData(){return this._affectsData}set affectsData(e){this._affectsData=e}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",ur,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",ur),this.refresh())}execute(...e){}destroy(){this.stopListening()}}function ur(e){e.return=!1,e.stop()}class hr extends(z()){constructor(e,t=[],o=[]){super(),this._plugins=new Map,this._context=e,this._availablePlugins=new Map;for(const e of t)e.pluginName&&this._availablePlugins.set(e.pluginName,e);this._contextPlugins=new Map;for(const[e,t]of o)this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let t=e;throw"function"==typeof e&&(t=e.pluginName||e.name),new E("plugincollection-plugin-not-loaded",this._context,{plugin:t})}return t}has(e){return this._plugins.has(e)}init(e,t=[],o=[]){const n=this,i=this._context;!function e(t,o=new Set){t.forEach((t=>{a(t)&&(o.has(t)||(o.add(t),t.pluginName&&!n._availablePlugins.has(t.pluginName)&&n._availablePlugins.set(t.pluginName,t),t.requires&&e(t.requires,o)))}))}(e),u(e);const r=[...function e(t,o=new Set){return t.map((e=>a(e)?e:n._availablePlugins.get(e))).reduce(((t,n)=>o.has(n)?t:(o.add(n),n.requires&&(u(n.requires,n),e(n.requires,o).forEach((e=>t.add(e)))),t.add(n))),new Set)}(e.filter((e=>!c(e,t))))];!function(e,t){for(const o of t){if("function"!=typeof o)throw new E("plugincollection-replace-plugin-invalid-type",null,{pluginItem:o});const t=o.pluginName;if(!t)throw new E("plugincollection-replace-plugin-missing-name",null,{pluginItem:o});if(o.requires&&o.requires.length)throw new E("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:t});const i=n._availablePlugins.get(t);if(!i)throw new E("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:t});const r=e.indexOf(i);if(-1===r){if(n._contextPlugins.has(i))return;throw new E("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:t})}if(i.requires&&i.requires.length)throw new E("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:t});e.splice(r,1,o),n._availablePlugins.set(t,o)}}(r,o);const s=function(e){return e.map((e=>{let t=n._contextPlugins.get(e);return t=t||new e(i),n._add(e,t),t}))}(r);return h(s,"init").then((()=>h(s,"afterInit"))).then((()=>s));function a(e){return"function"==typeof e}function l(e){return a(e)&&!!e.isContextPlugin}function c(e,t){return t.some((t=>t===e||(d(e)===t||d(t)===e)))}function d(e){return a(e)?e.pluginName||e.name:e}function u(e,o=null){e.map((e=>a(e)?e:n._availablePlugins.get(e)||e)).forEach((e=>{!function(e,t){if(a(e))return;if(t)throw new E("plugincollection-soft-required",i,{missingPlugin:e,requiredBy:d(t)});throw new E("plugincollection-plugin-not-found",i,{plugin:e})}(e,o),function(e,t){if(!l(t))return;if(l(e))return;throw new E("plugincollection-context-required",i,{plugin:d(e),requiredBy:d(t)})}(e,o),function(e,o){if(!o)return;if(!c(e,t))return;throw new E("plugincollection-required",i,{plugin:d(e),requiredBy:d(o)})}(e,o)}))}function h(e,t){return e.reduce(((e,o)=>o[t]?n._contextPlugins.has(o)?e:e.then(o[t].bind(o)):e),Promise.resolve())}}destroy(){const e=[];for(const[,t]of this)"function"!=typeof t.destroy||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 E("plugincollection-plugin-name-conflict",null,{pluginName:o,plugin1:this._plugins.get(o).constructor,plugin2:e});this._plugins.set(o,t)}}}class mr{constructor(e){this._contextOwner=null;const{translations:t,...o}=e||{};this.config=new Sn(o,this.constructor.defaultConfig);const n=this.constructor.builtinPlugins;this.config.define("plugins",n),this.plugins=new hr(this,n);const i=this.config.get("language")||{};this.locale=new Ji({uiLanguage:"string"==typeof i?i:i.ui,contentLanguage:this.config.get("language.content"),translations:t}),this.t=this.locale.t,this.editors=new Yi}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const o of e.concat(t)){if("function"!=typeof o)throw new E("context-initplugins-constructor-only",null,{Plugin:o});if(!0!==o.isContextPlugin)throw new E("context-initplugins-invalid-plugin",null,{Plugin:o})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,(e=>e.destroy()))).then((()=>this.plugins.destroy()))}_addEditor(e,t){if(this._contextOwner)throw new E("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise((t=>{const o=new this(e);t(o.initPlugins().then((()=>o)))}))}}class pr extends(Y()){constructor(e){super(),this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}var gr=i(5072),fr=i.n(gr),br=i(4284),kr=i.n(br),wr=i(7659),_r=i.n(wr),yr=i(4868),Ar=i.n(yr),Cr=i(540),vr=i.n(Cr),xr=i(1111),Er={attributes:{"data-cke":!0}};Er.setAttributes=Ar(),Er.insert=_r().bind(null,"head"),Er.domAPI=kr(),Er.insertStyleElement=vr();fr()(xr.A,Er);xr.A&&xr.A.locals&&xr.A.locals;const Dr=new WeakMap;let Br=!1;function Sr({view:e,element:t,text:o,isDirectHost:n=!0,keepOnFocus:i=!1}){const r=e.document;function s(o){Dr.get(r).set(t,{text:o,isDirectHost:n,keepOnFocus:i,hostElement:n?t:null}),e.change((e=>Fr(r,e)))}Dr.has(r)||(Dr.set(r,new Map),r.registerPostFixer((e=>Fr(r,e))),r.on("change:isComposing",(()=>{e.change((e=>Fr(r,e)))}),{priority:"high"})),t.is("editableElement")&&t.on("change:placeholder",((e,t,o)=>{s(o)})),t.placeholder?s(t.placeholder):o&&s(o),o&&function(){Br||D("enableplaceholder-deprecated-text-option");Br=!0}()}function Tr(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}function Ir(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}function Pr(e,t){if(!e.isAttached())return!1;const o=Array.from(e.getChildren()).some((e=>!e.is("uiElement")));if(o)return!1;const n=e.document,i=n.selection.anchor;return(!n.isComposing||!i||i.parent!==e)&&(!!t||(!n.isFocused||!!i&&i.parent!==e))}function Fr(e,t){const o=Dr.get(e),n=[];let i=!1;for(const[e,r]of o)r.isDirectHost&&(n.push(e),Mr(t,e,r)&&(i=!0));for(const[e,r]of o){if(r.isDirectHost)continue;const o=Rr(e);o&&(n.includes(o)||(r.hostElement=o,Mr(t,e,r)&&(i=!0)))}return i}function Mr(e,t,o){const{text:n,isDirectHost:i,hostElement:r}=o;let s=!1;r.getAttribute("data-placeholder")!==n&&(e.setAttribute("data-placeholder",n,r),s=!0);return(i||1==t.childCount)&&Pr(r,o.keepOnFocus)?Tr(e,r)&&(s=!0):Ir(e,r)&&(s=!0),s}function Rr(e){if(e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement")&&!t.is("attributeElement"))return t}return null}class zr{is(){throw new Error("is() method is abstract")}}const Vr=function(e){return En(e,4)};class Or extends(z(zr)){constructor(e){super(),this.document=e,this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new E("view-node-not-found-in-parent",this);return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}getCommonAncestor(e,t={}){const o=this.getAncestors(t),n=e.getAncestors(t);let i=0;for(;o[i]==n[i]&&o[i];)i++;return 0===i?null:o[i-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),o=e.getPath(),n=ie(t,o);switch(n){case"prefix":return!0;case"extension":return!1;default:return t[n]e.data.length)throw new E("view-textproxy-wrong-offsetintext",this);if(o<0||t+o>e.data.length)throw new E("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+o),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}getAncestors(e={}){const t=[];let o=e.includeSelf?this.textNode:this.parent;for(;null!==o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}}Lr.prototype.is=function(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e};class Hr{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)("string"==typeof t||t instanceof RegExp)&&(t={name:t}),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const o=jr(t,e);if(o)return{element:t,pattern:e,match:o}}return null}matchAll(...e){const t=[];for(const o of e)for(const e of this._patterns){const n=jr(o,e);n&&t.push({element:o,pattern:e,match:n})}return t.length>0?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function jr(e,t){if("function"==typeof t)return t(e);const o={};return t.name&&(o.name=function(e,t){if(e instanceof RegExp)return!!t.match(e);return e===t}(t.name,e.name),!o.name)||t.attributes&&(o.attributes=function(e,t){const o=new Set(t.getAttributeKeys());Te(e)?(void 0!==e.style&&D("matcher-pattern-deprecated-attributes-style-key",e),void 0!==e.class&&D("matcher-pattern-deprecated-attributes-class-key",e)):(o.delete("style"),o.delete("class"));return qr(e,o,(e=>t.getAttribute(e)))}(t.attributes,e),!o.attributes)||t.classes&&(o.classes=function(e,t){return qr(e,t.getClassNames(),(()=>{}))}(t.classes,e),!o.classes)||t.styles&&(o.styles=function(e,t){return qr(e,t.getStyleNames(!0),(e=>t.getStyle(e)))}(t.styles,e),!o.styles)?null:o}function qr(e,t,o){const n=function(e){if(Array.isArray(e))return e.map((e=>Te(e)?(void 0!==e.key&&void 0!==e.value||D("matcher-pattern-missing-key-or-value",e),[e.key,e.value]):[e,!0]));if(Te(e))return Object.entries(e);return[[e,!0]]}(e),i=Array.from(t),r=[];if(n.forEach((([e,t])=>{i.forEach((n=>{(function(e,t){return!0===e||e===t||e instanceof RegExp&&t.match(e)})(e,n)&&function(e,t,o){if(!0===e)return!0;const n=o(t);return e===n||e instanceof RegExp&&!!String(n).match(e)}(t,n,o)&&r.push(n)}))})),n.length&&!(r.lengthi?0:i+t),(o=o>i?i:o)<0&&(o+=i),i=t>o?0:o-t>>>0,t>>>=0;for(var r=Array(i);++nt===e));return Array.isArray(t)}set(e,t){if(U(e))for(const[t,o]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,o,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=ws(e);ms(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this.getStylesEntries().map((e=>e.join(":"))).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!U(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)?t[1]:void 0}getStyleNames(e=!1){if(this.isEmpty)return[];if(e)return this._styleProcessor.getStyleNames(this._styles);return this.getStylesEntries().map((([e])=>e))}clear(){this._styles={}}getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const o of t)e.push(...this._styleProcessor.getReducedForm(o,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const o=t.splice(0,t.length-1).join("."),n=ps(this._styles,o);if(!n)return;!Object.keys(n).length&&this.remove(o)}}class ks{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,o){if(U(t))_s(o,ws(e),t);else if(this._normalizers.has(e)){const n=this._normalizers.get(e),{path:i,value:r}=n(t);_s(o,i,r)}else _s(o,e,t)}getNormalized(e,t){if(!e)return $i({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const o=this._extractors.get(e);if("string"==typeof o)return ps(t,o);const n=o(e,t);if(n)return n}return ps(t,ws(e))}getReducedForm(e,t){const o=this.getNormalized(e,t);if(void 0===o)return[];if(this._reducers.has(e)){return this._reducers.get(e)(o)}return[[e,o]]}getStyleNames(e){const t=Array.from(this._consumables.keys()).filter((t=>{const o=this.getNormalized(t,e);return o&&"object"==typeof o?Object.keys(o).length:o})),o=new Set([...t,...Object.keys(e)]);return Array.from(o)}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const o of t)this._mapStyleNames(o,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function ws(e){return e.replace("-",".")}function _s(e,t,o){let n=o;U(o)&&(n=$i({},ps(e,t),o)),fs(e,t,n)}class ys extends Or{constructor(e,t,o,n){if(super(e),this._unsafeAttributesToRender=[],this._customProperties=new Map,this.name=t,this._attrs=function(e){const t=tr(e);for(const[e,o]of t)null===o?t.delete(e):"string"!=typeof o&&t.set(e,String(o));return t}(o),this._children=[],n&&this._insertChild(0,n),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");As(this._classes,e),this._attrs.delete("class")}this._styles=new bs(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style"))}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof ys))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,o]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==o)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(e){return this._styles.getStyleNames(e)}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new Hr(...e);let o=this.parent;for(;o&&!o.is("documentFragment");){if(t.match(o))return o;o=o.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),o=Array.from(this._attrs).map((e=>`${e[0]}="${e[1]}"`)).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==o?"":` ${o}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(e=!1){const t=[];if(e)for(const o of this.getChildren())t.push(o._clone(e));const o=new this.constructor(this.document,this.name,this._attrs,t);return o._classes=new Set(this._classes),o._styles.set(this._styles.getNormalized()),o._customProperties=new Map(this._customProperties),o.getFillerOffset=this.getFillerOffset,o._unsafeAttributesToRender=this._unsafeAttributesToRender,o}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let o=0;const n=function(e,t){if("string"==typeof t)return[new Nr(e,t)];re(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new Nr(e,t):t instanceof Lr?new Nr(e,t.data):t))}(this.document,t);for(const t of n)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,o++;return o}_removeChildren(e,t=1){this._fireChange("children",this);for(let o=e;o0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this);for(const t of xi(e))this._classes.add(t)}_removeClass(e){this._fireChange("attributes",this);for(const t of xi(e))this._classes.delete(t)}_setStyle(e,t){this._fireChange("attributes",this),"string"!=typeof e?this._styles.set(e):this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this);for(const t of xi(e))this._styles.remove(t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function As(e,t){const o=t.split(/\s+/);e.clear(),o.forEach((t=>e.add(t)))}ys.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Cs extends ys{constructor(e,t,o,n){super(e,t,o,n),this.getFillerOffset=vs}}function vs(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}Cs.prototype.is=function(e,t){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class xs extends(Y(Cs)){constructor(e,t,o,n){super(e,t,o,n),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("placeholder",void 0),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",(t=>t&&e.selection.editableElement==this)),this.listenTo(e.selection,"change",(()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this}))}destroy(){this.stopListening()}}xs.prototype.is=function(e,t){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};const Es=Symbol("rootName");class Ds extends xs{constructor(e,t){super(e,t),this.rootName="main"}get rootName(){return this.getCustomProperty(Es)}set rootName(e){this._setCustomProperty(Es,e)}set _name(e){this.name=e}}Ds.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Bs{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new E("view-tree-walker-no-start-position",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new E("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this._position=Ss._createAt(e.startPosition):this._position=Ss._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,o;do{o=this.position,t=this.next()}while(!t.done&&e(t.value));t.done||(this._position=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,o=e.parent;if(null===o.parent&&e.offset===o.childCount)return{done:!0,value:void 0};if(o===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let n;if(o instanceof Nr){if(e.isAtEnd)return this._position=Ss._createAfter(o),this._next();n=o.data[e.offset]}else n=o.getChild(e.offset);if(n instanceof ys){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(e))return{done:!0,value:void 0};e.offset++}else e=new Ss(n,0);return this._position=e,this._formatReturnValue("elementStart",n,t,e,1)}if(n instanceof Nr){if(this.singleCharacters)return e=new Ss(n,0),this._position=e,this._next();let o,i=n.data.length;return n==this._boundaryEndParent?(i=this.boundaries.end.offset,o=new Lr(n,0,i),e=Ss._createAfter(o)):(o=new Lr(n,0,n.data.length),e.offset++),this._position=e,this._formatReturnValue("text",o,t,e,i)}if("string"==typeof n){let n;if(this.singleCharacters)n=1;else{n=(o===this._boundaryEndParent?this.boundaries.end.offset:o.data.length)-e.offset}const i=new Lr(o,e.offset,n);return e.offset+=n,this._position=e,this._formatReturnValue("text",i,t,e,n)}return e=Ss._createAfter(o),this._position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",o,t,e)}_previous(){let e=this.position.clone();const t=this.position,o=e.parent;if(null===o.parent&&0===e.offset)return{done:!0,value:void 0};if(o==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let n;if(o instanceof Nr){if(e.isAtStart)return this._position=Ss._createBefore(o),this._previous();n=o.data[e.offset-1]}else n=o.getChild(e.offset-1);if(n instanceof ys)return this.shallow?(e.offset--,this._position=e,this._formatReturnValue("elementStart",n,t,e,1)):(e=new Ss(n,n.childCount),this._position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",n,t,e));if(n instanceof Nr){if(this.singleCharacters)return e=new Ss(n,n.data.length),this._position=e,this._previous();let o,i=n.data.length;if(n==this._boundaryStartParent){const t=this.boundaries.start.offset;o=new Lr(n,t,n.data.length-t),i=o.data.length,e=Ss._createBefore(o)}else o=new Lr(n,0,n.data.length),e.offset--;return this._position=e,this._formatReturnValue("text",o,t,e,i)}if("string"==typeof n){let n;if(this.singleCharacters)n=1;else{const t=o===this._boundaryStartParent?this.boundaries.start.offset:0;n=e.offset-t}e.offset-=n;const i=new Lr(o,e.offset,n);return this._position=e,this._formatReturnValue("text",i,t,e,n)}return e=Ss._createBefore(o),this._position=e,this._formatReturnValue("elementStart",o,t,e,1)}_formatReturnValue(e,t,o,n,i){return t instanceof Lr&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?o=Ss._createAfter(t.textNode):(n=Ss._createAfter(t.textNode),this._position=n)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?o=Ss._createBefore(t.textNode):(n=Ss._createBefore(t.textNode),this._position=n))),{done:!1,value:{type:e,item:t,previousPosition:o,nextPosition:n,length:i}}}}class Ss extends zr{constructor(e,t){super(),this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof xs);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=Ss._createAt(this),o=t.offset+e;return t.offset=o<0?0:o,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const o=new Bs(t);return o.skip(e),o.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),o=e.getAncestors();let n=0;for(;t[n]==o[n]&&t[n];)n++;return 0===n?null:t[n-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],o=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),o.push(e.offset);const n=ie(t,o);switch(n){case"prefix":return"before";case"extension":return"after";default:return t[n]0?new this(o,n):new this(n,o)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(Ss._createBefore(e),t)}}function Is(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}Ts.prototype.is=function(e){return"range"===e||"view:range"===e};class Ps extends(z(zr)){constructor(...e){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",e.length&&this.setTo(...e)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let o=!1;for(const n of e._ranges)if(t.isEqual(n)){o=!0;break}if(!o)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=ne(this.getRanges());if(t!=ne(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let o=!1;for(let n of e.getRanges())if(n=n.getTrimmed(),t.start.isEqual(n.start)&&t.end.isEqual(n.end)){o=!0;break}if(!o)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(...e){let[t,o,n]=e;if("object"==typeof o&&(n=o,o=void 0),null===t)this._setRanges([]),this._setFakeOptions(n);else if(t instanceof Ps||t instanceof Fs)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof Ts)this._setRanges([t],n&&n.backward),this._setFakeOptions(n);else if(t instanceof Ss)this._setRanges([new Ts(t)]),this._setFakeOptions(n);else if(t instanceof Or){const e=!!n&&!!n.backward;let i;if(void 0===o)throw new E("view-selection-setto-required-second-parameter",this);i="in"==o?Ts._createIn(t):"on"==o?Ts._createOn(t):new Ts(Ss._createAt(t,o)),this._setRanges([i],e),this._setFakeOptions(n)}else{if(!re(t))throw new E("view-selection-setto-not-selectable",this);this._setRanges(t,n&&n.backward),this._setFakeOptions(n)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new E("view-selection-setfocus-no-ranges",this);const o=Ss._createAt(e,t);if("same"==o.compareWith(this.focus))return;const n=this.anchor;this._ranges.pop(),"before"==o.compareWith(n)?this._addRange(new Ts(o,n),!0):this._addRange(new Ts(n,o)),this.fire("change")}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof Ts))throw new E("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new E("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new Ts(e.start,e.end))}}Ps.prototype.is=function(e){return"selection"===e||"view:selection"===e};class Fs extends(z(zr)){constructor(...e){super(),this._selection=new Ps,this._selection.delegate("change").to(this),e.length&&this._selection.setTo(...e)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}_setTo(...e){this._selection.setTo(...e)}_setFocus(e,t){this._selection.setFocus(e,t)}}Fs.prototype.is=function(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e};class Ms extends w{constructor(e,t,o){super(e,t),this.startRange=o,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const Rs=Symbol("bubbling contexts");function zs(e){return class extends e{fire(e,...t){try{const o=e instanceof w?e:new w(this,e),n=Ls(this);if(!n.size)return;if(Vs(o,"capturing",this),Os(n,"$capture",o,...t))return o.return;const i=o.startRange||this.selection.getFirstRange(),r=i?i.getContainedElement():null,s=!!r&&Boolean(Ns(n,r));let a=r||function(e){if(!e)return null;const t=e.start.parent,o=e.end.parent,n=t.getPath(),i=o.getPath();return n.length>i.length?t:o}(i);if(Vs(o,"atTarget",a),!s){if(Os(n,"$text",o,...t))return o.return;Vs(o,"bubbling",a)}for(;a;){if(a.is("rootElement")){if(Os(n,"$root",o,...t))return o.return}else if(a.is("element")&&Os(n,a.name,o,...t))return o.return;if(Os(n,a,o,...t))return o.return;a=a.parent,Vs(o,"bubbling",a)}return Vs(o,"bubbling",this),Os(n,"$document",o,...t),o.return}catch(e){E.rethrowUnexpectedError(e,this)}}_addEventListener(e,t,o){const n=xi(o.context||"$document"),i=Ls(this);for(const r of n){let n=i.get(r);n||(n=new(z()),i.set(r,n)),this.listenTo(n,e,t,o)}}_removeEventListener(e,t){const o=Ls(this);for(const n of o.values())this.stopListening(n,e,t)}}}{const e=zs(Object);["fire","_addEventListener","_removeEventListener"].forEach((t=>{zs[t]=e.prototype[t]}))}function Vs(e,t,o){e instanceof Ms&&(e._eventPhase=t,e._currentTarget=o)}function Os(e,t,o,...n){const i="string"==typeof t?e.get(t):Ns(e,t);return!!i&&(i.fire(o,...n),o.stop.called)}function Ns(e,t){for(const[o,n]of e)if("function"==typeof o&&o(t))return n;return null}function Ls(e){return e[Rs]||(e[Rs]=new Map),e[Rs]}class Hs extends(zs(Y())){constructor(e){super(),this._postFixers=new Set,this.selection=new Fs,this.roots=new Yi({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1)}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.forEach((e=>e.destroy())),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const o of this._postFixers)if(t=o(e),t)break}while(t)}}class js extends ys{constructor(e,t,o,n){super(e,t,o,n),this._priority=10,this._id=null,this._clonesGroup=null,this.getFillerOffset=Us}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new E("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e=!1){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}js.DEFAULT_PRIORITY=10;const qs=js;function Us(){if(Ws(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(Ws(e)>1)return null;e=e.parent}return!e||Ws(e)>1?null:this.childCount}function Ws(e){return Array.from(e.getChildren()).filter((e=>!e.is("uiElement"))).length}js.prototype.is=function(e,t){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class $s extends ys{constructor(e,t,o,n){super(e,t,o,n),this.getFillerOffset=Gs}_insertChild(e,t){if(t&&(t instanceof Or||Array.from(t).length>0))throw new E("view-emptyelement-cannot-add",[this,t]);return 0}}function Gs(){return null}$s.prototype.is=function(e,t){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Ks extends ys{constructor(e,t,o,n){super(e,t,o,n),this.getFillerOffset=Js}_insertChild(e,t){if(t&&(t instanceof Or||Array.from(t).length>0))throw new E("view-uielement-cannot-add",[this,t]);return 0}render(e,t){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function Zs(e){e.document.on("arrowKey",((t,o)=>function(e,t,o){if(t.keyCode==ki.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),n=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(n||t.shiftKey){const t=e.focusNode,i=e.focusOffset,r=o.domPositionToView(t,i);if(null===r)return;let s=!1;const a=r.getLastMatchingPosition((e=>(e.item.is("uiElement")&&(s=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement")))));if(s){const t=o.viewPositionToDom(a);n?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,o,e.domConverter)),{priority:"low"})}function Js(){return null}Ks.prototype.is=function(e,t){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Ys extends ys{constructor(e,t,o,n){super(e,t,o,n),this.getFillerOffset=Qs}_insertChild(e,t){if(t&&(t instanceof Or||Array.from(t).length>0))throw new E("view-rawelement-cannot-add",[this,t]);return 0}render(e,t){}}function Qs(){return null}Ys.prototype.is=function(e,t){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e};class Xs extends(z(zr)){constructor(e,t){super(),this._children=[],this._customProperties=new Map,this.document=e,t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}get name(){}get getFillerOffset(){}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let o=0;const n=function(e,t){if("string"==typeof t)return[new Nr(e,t)];re(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new Nr(e,t):t instanceof Lr?new Nr(e,t.data):t))}(this.document,t);for(const t of n)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,o++;return o}_removeChildren(e,t=1){this._fireChange("children",this);for(let o=e;o{const o=e[e.length-1],n=!t.is("uiElement");return o&&o.breakAttributes==n?o.nodes.push(t):e.push({breakAttributes:n,nodes:[t]}),e}),[]);let n=null,i=e;for(const{nodes:e,breakAttributes:t}of o){const o=this._insertNodes(i,e,t);n||(n=o.start),i=o.end}return n?new Ts(n,i):new Ts(e)}remove(e){const t=e instanceof Ts?e:Ts._createOn(e);if(ca(t,this.document),t.isCollapsed)return new Xs(this.document);const{start:o,end:n}=this._breakAttributesRange(t,!0),i=o.parent,r=n.offset-o.offset,s=i._removeChildren(o.offset,r);for(const e of s)this._removeFromClonedElementsGroup(e);const a=this.mergeAttributes(o);return t.start=a,t.end=a.clone(),new Xs(this.document,s)}clear(e,t){ca(e,this.document);const o=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const n of o){const o=n.item;let i;if(o.is("element")&&t.isSimilar(o))i=Ts._createOn(o);else if(!n.nextPosition.isAfter(e.start)&&o.is("$textProxy")){const e=o.getAncestors().find((e=>e.is("element")&&t.isSimilar(e)));e&&(i=Ts._createIn(e))}i&&(i.end.isAfter(e.end)&&(i.end=e.end),i.start.isBefore(e.start)&&(i.start=e.start),this.remove(i))}}move(e,t){let o;if(t.isAfter(e.end)){const n=(t=this._breakAttributes(t,!0)).parent,i=n.childCount;e=this._breakAttributesRange(e,!0),o=this.remove(e),t.offset+=n.childCount-i}else o=this.remove(e);return this.insert(t,o)}wrap(e,t){if(!(t instanceof qs))throw new E("view-writer-wrap-invalid-attribute",this.document);if(ca(e,this.document),e.isCollapsed){let n=e.start;n.parent.is("element")&&(o=n.parent,!Array.from(o.getChildren()).some((e=>!e.is("uiElement"))))&&(n=n.getLastMatchingPosition((e=>e.item.is("uiElement")))),n=this._wrapPosition(n,t);const i=this.document.selection;return i.isCollapsed&&i.getFirstPosition().isEqual(e.start)&&this.setSelection(n),new Ts(n)}return this._wrapRange(e,t);var o}unwrap(e,t){if(!(t instanceof qs))throw new E("view-writer-unwrap-invalid-attribute",this.document);if(ca(e,this.document),e.isCollapsed)return e;const{start:o,end:n}=this._breakAttributesRange(e,!0),i=o.parent,r=this._unwrapChildren(i,o.offset,n.offset,t),s=this.mergeAttributes(r.start);s.isEqual(r.start)||r.end.offset--;const a=this.mergeAttributes(r.end);return new Ts(s,a)}rename(e,t){const o=new Cs(this.document,e,t.getAttributes());return this.insert(Ss._createAfter(t),o),this.move(Ts._createIn(t),Ss._createAt(o,0)),this.remove(Ts._createOn(t)),o}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return Ss._createAt(e,t)}createPositionAfter(e){return Ss._createAfter(e)}createPositionBefore(e){return Ss._createBefore(e)}createRange(e,t){return new Ts(e,t)}createRangeOn(e){return Ts._createOn(e)}createRangeIn(e){return Ts._createIn(e)}createSelection(...e){return new Ps(...e)}createSlot(e="children"){if(!this._slotFactory)throw new E("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,e)}_registerSlotFactory(e){this._slotFactory=e}_clearSlotFactory(){this._slotFactory=null}_insertNodes(e,t,o){let n,i;if(n=o?ta(e):e.parent.is("$text")?e.parent.parent:e.parent,!n)throw new E("view-writer-invalid-position-container",this.document);i=o?this._breakAttributes(e,!0):e.parent.is("$text")?ia(e):e;const r=n._insertChild(i.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const s=i.getShiftedBy(r),a=this.mergeAttributes(i);a.isEqual(i)||s.offset--;const l=this.mergeAttributes(s);return new Ts(a,l)}_wrapChildren(e,t,o,n){let i=t;const r=[];for(;i!1,e.parent._insertChild(e.offset,o);const n=new Ts(e,e.getShiftedBy(1));this.wrap(n,t);const i=new Ss(o.parent,o.index);o._remove();const r=i.nodeBefore,s=i.nodeAfter;return r instanceof Nr&&s instanceof Nr?ra(r,s):na(i)}_wrapAttributeElement(e,t){if(!da(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const o of e.getAttributeKeys())if("class"!==o&&"style"!==o&&t.hasAttribute(o)&&t.getAttribute(o)!==e.getAttribute(o))return!1;for(const o of e.getStyleNames())if(t.hasStyle(o)&&t.getStyle(o)!==e.getStyle(o))return!1;for(const o of e.getAttributeKeys())"class"!==o&&"style"!==o&&(t.hasAttribute(o)||this.setAttribute(o,e.getAttribute(o),t));for(const o of e.getStyleNames())t.hasStyle(o)||this.setStyle(o,e.getStyle(o),t);for(const o of e.getClassNames())t.hasClass(o)||this.addClass(o,t);return!0}_unwrapAttributeElement(e,t){if(!da(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const o of e.getAttributeKeys())if("class"!==o&&"style"!==o&&(!t.hasAttribute(o)||t.getAttribute(o)!==e.getAttribute(o)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const o of e.getStyleNames())if(!t.hasStyle(o)||t.getStyle(o)!==e.getStyle(o))return!1;for(const o of e.getAttributeKeys())"class"!==o&&"style"!==o&&this.removeAttribute(o,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const o=e.start,n=e.end;if(ca(e,this.document),e.isCollapsed){const o=this._breakAttributes(e.start,t);return new Ts(o,o)}const i=this._breakAttributes(n,t),r=i.parent.childCount,s=this._breakAttributes(o,t);return i.offset+=i.parent.childCount-r,new Ts(s,i)}_breakAttributes(e,t=!1){const o=e.offset,n=e.parent;if(e.parent.is("emptyElement"))throw new E("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new E("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new E("view-writer-cannot-break-raw-element",this.document);if(!t&&n.is("$text")&&la(n.parent))return e.clone();if(la(n))return e.clone();if(n.is("$text"))return this._breakAttributes(ia(e),t);if(o==n.childCount){const e=new Ss(n.parent,n.index+1);return this._breakAttributes(e,t)}if(0===o){const e=new Ss(n.parent,n.index);return this._breakAttributes(e,t)}{const e=n.index+1,i=n._clone();n.parent._insertChild(e,i),this._addToClonedElementsGroup(i);const r=n.childCount-o,s=n._removeChildren(o,r);i._appendChild(s);const a=new Ss(n.parent,e);return this._breakAttributes(a,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let o=this._cloneGroups.get(t);o||(o=new Set,this._cloneGroups.set(t,o)),o.add(e),e._clonesGroup=o}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const o=this._cloneGroups.get(t);o&&o.delete(e)}}function ta(e){let t=e.parent;for(;!la(t);){if(!t)return;t=t.parent}return t}function oa(e,t){return e.priorityt.priority)&&e.getIdentity()o instanceof e)))throw new E("view-writer-insert-invalid-node-type",t);o.is("$text")||aa(o.getChildren(),t)}}function la(e){return e&&(e.is("containerElement")||e.is("documentFragment"))}function ca(e,t){const o=ta(e.start),n=ta(e.end);if(!o||!n||o!==n)throw new E("view-writer-invalid-range-container",t)}function da(e,t){return null===e.id&&null===t.id}const ua=e=>e.createTextNode(" "),ha=e=>{const t=e.createElement("span");return t.dataset.ckeFiller="true",t.innerText=" ",t},ma=e=>{const t=e.createElement("br");return t.dataset.ckeFiller="true",t},pa=7,ga="".repeat(pa);function fa(e){return"string"==typeof e?e.substr(0,pa)===ga:Nn(e)&&e.data.substr(0,pa)===ga}function ba(e){return e.data.length==pa&&fa(e)}function ka(e){const t="string"==typeof e?e:e.data;return fa(e)?t.slice(pa):t}function wa(e,t){if(t.keyCode==ki.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,o=e.getRangeAt(0).startOffset;fa(t)&&o<=pa&&e.collapse(t,0)}}}var _a=i(6531),ya={attributes:{"data-cke":!0}};ya.setAttributes=Ar(),ya.insert=_r().bind(null,"head"),ya.domAPI=kr(),ya.insertStyleElement=vr();fr()(_a.A,ya);_a.A&&_a.A.locals&&_a.A.locals;class Aa extends(Y()){constructor(e,t){super(),this.domDocuments=new Set,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this._inlineFiller=null,this._fakeSelectionContainer=null,this.domConverter=e,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1),r.isBlink&&!r.isAndroid&&this.on("change:isSelecting",(()=>{this.isSelecting||this.render()}))}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e){throw new E("view-renderer-unknown-type",this)}this.markedChildren.add(t)}}}render(){if(this.isComposing&&!r.isAndroid)return;let e=null;const t=!(r.isBlink&&!r.isAndroid)||!this.isSelecting;for(const e of this.markedChildren)this._updateChildrenMappings(e);t?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller),e&&e.parent.is("$text")&&(e=Ss._createBefore(e.parent)));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(t)if(e){const t=this.domConverter.viewPositionToDom(e),o=t.parent.ownerDocument;fa(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=Ca(o,t.parent,t.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.domConverter._clearTemporaryCustomProperties(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const o=Array.from(t.childNodes),n=Array.from(this.domConverter.viewChildrenToDom(e,{withChildren:!1})),i=this._diffNodeLists(o,n),r=this._findUpdateActions(i,o,n,va);if(-1!==r.indexOf("update")){const t={equal:0,insert:0,delete:0};for(const i of r)if("update"===i){const i=t.equal+t.insert,r=t.equal+t.delete,s=e.getChild(i);!s||s.is("uiElement")||s.is("rawElement")||this._updateElementMappings(s,o[r]),ri(n[i]),t.equal++}else t[i]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?Ss._createBefore(e.parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&Nn(t.parent)&&fa(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!fa(e))throw new E("view-renderer-filler-was-lost",this);ba(e)?e.remove():e.data=e.data.substr(pa),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,o=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor((e=>e.hasAttribute("contenteditable")));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;const n=e.nodeBefore,i=e.nodeAfter;return!(n instanceof Nr||i instanceof Nr)&&(!!(o!==t.getFillerOffset()||n&&n.is("element","br"))&&(!r.isAndroid||!n&&!i))}_updateText(e,t){const o=this.domConverter.findCorrespondingDomText(e);let n=this.domConverter.viewToDom(e).data;const i=t.inlineFillerPosition;i&&i.parent==e.parent&&i.offset==e.index&&(n=ga+n),this._updateTextNode(o,n)}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const o=Array.from(t.attributes).map((e=>e.name)),n=e.getAttributeKeys();for(const o of n)this.domConverter.setDomElementAttribute(t,o,e.getAttribute(o),e);for(const n of o)e.hasAttribute(n)||this.domConverter.removeDomElementAttribute(t,n)}_updateChildren(e,t){const o=this.domConverter.mapViewToDom(e);if(!o)return;if(r.isAndroid){let e=null;for(const t of Array.from(o.childNodes)){if(e&&Nn(e)&&Nn(t)){o.normalize();break}e=t}}const n=t.inlineFillerPosition,i=o.childNodes,s=Array.from(this.domConverter.viewChildrenToDom(e,{bind:!0}));n&&n.parent===e&&Ca(o.ownerDocument,s,n.offset);const a=this._diffNodeLists(i,s),l=this._findUpdateActions(a,i,s,xa);let c=0;const d=new Set;for(const e of l)"delete"===e?(d.add(i[c]),ri(i[c])):"equal"!==e&&"update"!==e||c++;c=0;for(const e of l)"insert"===e?(Xn(o,c,s[c]),c++):"update"===e?(this._updateTextNode(i[c],s[c].data),c++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(s[c])),c++);for(const e of d)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return e=function(e,t){const o=Array.from(e);if(0==o.length||!t)return o;const n=o[o.length-1];n==t&&o.pop();return o}(e,this._fakeSelectionContainer),b(e,t,Ea.bind(null,this.domConverter))}_findUpdateActions(e,t,o,n){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let i=[],r=[],s=[];const a={equal:0,insert:0,delete:0};for(const l of e)"insert"===l?s.push(o[a.equal+a.insert]):"delete"===l?r.push(t[a.equal+a.delete]):(i=i.concat(b(r,s,n).map((e=>"equal"===e?"update":e))),i.push("equal"),r=[],s=[]),a[l]++;return i.concat(b(r,s,n).map((e=>"equal"===e?"update":e)))}_updateTextNode(e,t){const o=e.data;o!=t&&(r.isAndroid&&this.isComposing&&o.replace(/\u00A0/g," ")==t.replace(/\u00A0/g," ")||this._updateTextNodeInternal(e,t))}_updateTextNodeInternal(e,t){const o=p(e.data,t);for(const t of o)"insert"===t.type?e.insertData(t.index,t.values.join("")):e.deleteData(t.index,t.howMany)}_markDescendantTextToSync(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(r.isBlink&&!r.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected?(this._removeFakeSelection(),this._updateDomSelection(e)):this.isComposing&&r.isAndroid||this._updateDomSelection(e))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const t=e.createElement("div");return t.className="ck-fake-selection-container",Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t}(t));const o=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(o,this.selection),!this._fakeSelectionNeedsUpdate(e))return;o.parentElement&&o.parentElement==e||e.appendChild(o),o.textContent=this.selection.fakeSelectionLabel||" ";const n=t.getSelection(),i=t.createRange();n.removeAllRanges(),i.selectNodeContents(o),n.addRange(i)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const o=this.domConverter.viewPositionToDom(this.selection.anchor),n=this.domConverter.viewPositionToDom(this.selection.focus);t.setBaseAndExtent(o.parent,o.offset,n.parent,n.offset),r.isGecko&&function(e,t){let o=e.parent,n=e.offset;Nn(o)&&ba(o)&&(n=Qn(o)+1,o=o.parentNode);if(o.nodeType!=Node.ELEMENT_NODE||n!=o.childNodes.length-1)return;const i=o.childNodes[n];i&&"BR"==i.tagName&&t.addRange(t.getRangeAt(0))}(n,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return(!t||!this.selection.isEqual(t))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,o=e.ownerDocument.getSelection();return!t||t.parentElement!==e||(o.anchorNode!==t&&!t.contains(o.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const o=e.activeElement,n=this.domConverter.mapDomToView(o);o&&n&&t.removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function Ca(e,t,o){const n=t instanceof Array?t:t.childNodes,i=n[o];if(Nn(i))return i.data=ga+i.data,i;{const i=e.createTextNode(ga);return Array.isArray(t)?n.splice(o,0,i):Xn(t,o,i),i}}function va(e,t){return Pn(e)&&Pn(t)&&!Nn(e)&&!Nn(t)&&!ei(e)&&!ei(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function xa(e,t){return Pn(e)&&Pn(t)&&Nn(e)&&Nn(t)}function Ea(e,t,o){return t===o||(Nn(t)&&Nn(o)?t.data===o.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(o)))}const Da=ma(t.document),Ba=ua(t.document),Sa=ha(t.document),Ta="data-ck-unsafe-attribute-",Ia="data-ck-unsafe-element";class Pa{constructor(e,{blockFillerMode:o,renderingMode:n="editing"}={}){this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new Hr,this._inlineObjectElementMatcher=new Hr,this._elementsWithTemporaryCustomProperties=new Set,this.document=e,this.renderingMode=n,this.blockFillerMode=o||("editing"===n?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument="editing"===this.renderingMode?t.document:t.document.implementation.createHTMLDocument("")}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new Ps(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.children))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,o){return"data"===this.renderingMode||!(e=e.toLowerCase()).startsWith("on")&&(("srcdoc"!==e||!t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===o&&("src"===e||"srcset"===e)||("source"===o&&"srcset"===e||!t.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))))}setContentOf(e,t){if("data"===this.renderingMode)return void(e.innerHTML=t);const o=(new DOMParser).parseFromString(t,"text/html"),n=o.createDocumentFragment(),i=o.body.childNodes;for(;i.length>0;)n.appendChild(i[0]);const r=o.createTreeWalker(n,NodeFilter.SHOW_ELEMENT),s=[];let a;for(;a=r.nextNode();)s.push(a);for(const e of s){for(const t of e.getAttributeNames())this.setDomElementAttribute(e,t,e.getAttribute(t));const t=e.tagName.toLowerCase();this._shouldRenameElement(t)&&(Ra(t),e.replaceWith(this._createReplacementDomElement(t,e)))}for(;e.firstChild;)e.firstChild.remove();e.append(n)}viewToDom(e,t={}){if(e.is("$text")){const t=this._processDataFromViewText(e);return this._domDocument.createTextNode(t)}{const o=e;if(this.mapViewToDom(o)){if(!o.getCustomProperty("editingPipeline:doNotReuseOnce"))return this.mapViewToDom(o);this._elementsWithTemporaryCustomProperties.add(o)}let n;if(o.is("documentFragment"))n=this._domDocument.createDocumentFragment(),t.bind&&this.bindDocumentFragments(n,o);else{if(o.is("uiElement"))return n="$comment"===o.name?this._domDocument.createComment(o.getCustomProperty("$rawContent")):o.render(this._domDocument,this),t.bind&&this.bindElements(n,o),n;this._shouldRenameElement(o.name)?(Ra(o.name),n=this._createReplacementDomElement(o.name)):n=o.hasAttribute("xmlns")?this._domDocument.createElementNS(o.getAttribute("xmlns"),o.name):this._domDocument.createElement(o.name),o.is("rawElement")&&o.render(n,this),t.bind&&this.bindElements(n,o);for(const e of o.getAttributeKeys())this.setDomElementAttribute(n,e,o.getAttribute(e),o)}if(!1!==t.withChildren)for(const e of this.viewChildrenToDom(o,t))n instanceof HTMLTemplateElement?n.content.appendChild(e):n.appendChild(e);return n}}setDomElementAttribute(e,o,n,i){const r=this.shouldRenderAttribute(o,n,e.tagName.toLowerCase())||i&&i.shouldRenderUnsafeAttribute(o);r||D("domconverter-unsafe-attribute-detected",{domElement:e,key:o,value:n}),function(e){try{t.document.createAttribute(e)}catch(e){return!1}return!0}(o)?(e.hasAttribute(o)&&!r?e.removeAttribute(o):e.hasAttribute(Ta+o)&&r&&e.removeAttribute(Ta+o),e.setAttribute(r?o:Ta+o,n)):D("domconverter-invalid-attribute-detected",{domElement:e,key:o,value:n})}removeDomElementAttribute(e,t){t!=Ia&&(e.removeAttribute(t),e.removeAttribute(Ta+t))}*viewChildrenToDom(e,t={}){const o=e.getFillerOffset&&e.getFillerOffset();let n=0;for(const i of e.getChildren()){o===n&&(yield this._getBlockFiller());const e=i.is("element")&&!!i.getCustomProperty("dataPipeline:transparentRendering")&&!Qi(i.getAttributes());if(e&&"data"==this.renderingMode)if(i.is("rawElement")){const e=this._domDocument.createElement(i.name);i.render(e,this),yield*[...e.childNodes]}else yield*this.viewChildrenToDom(i,t);else e&&D("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:i}),yield this.viewToDom(i,t);n++}o===n&&(yield this._getBlockFiller())}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),o=this.viewPositionToDom(e.end),n=this._domDocument.createRange();return n.setStart(t.parent,t.offset),n.setEnd(o.parent,o.offset),n}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const o=this.findCorrespondingDomText(t);if(!o)return null;let n=e.offset;return fa(o)&&(n+=pa),{parent:o,offset:n}}{let o,n,i;if(0===e.offset){if(o=this.mapViewToDom(t),!o)return null;i=o.childNodes[0]}else{const t=e.nodeBefore;if(n=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(t),!n)return null;o=n.parentNode,i=n.nextSibling}if(Nn(i)&&fa(i))return{parent:i,offset:pa};return{parent:o,offset:n?Qn(n)+1:0}}}domToView(e,t={}){const o=[],n=this._domToView(e,t,o),i=n.next().value;return i?(n.next(),this._processDomInlineNodes(null,o,t),i.is("$text")&&0==i.data.length?null:i):null}*domChildrenToView(e,t={},o=[]){let n=[];n=e instanceof HTMLTemplateElement?[...e.content.childNodes]:[...e.childNodes];for(let i=0;i{const{scrollLeft:t,scrollTop:o}=e;i.push([t,o])})),o.focus(),Fa(o,(e=>{const[t,o]=i.shift();e.scrollLeft=t,e.scrollTop=o})),t.window.scrollTo(e,n)}}_clearDomSelection(){const e=this.mapViewToDom(this.document.selection.editableElement);if(!e)return;const t=e.ownerDocument.defaultView.getSelection(),o=this.domSelectionToView(t);o&&o.rangeCount>0&&t.removeAllRanges()}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(Da):!("BR"!==e.tagName||!Ma(e,this.blockElements)||1!==e.parentNode.childNodes.length)||(e.isEqualNode(Sa)||function(e,t){const o=e.isEqualNode(Ba);return o&&Ma(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements))}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=this._domDocument.createRange();try{t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset)}catch(e){return!1}const o=t.collapsed;return t.detach(),o}getHostViewElement(e){const t=function(e){const t=[];let o=e;for(;o&&o.nodeType!=Node.DOCUMENT_NODE;)t.unshift(o),o=o.parentNode;return t}(e);for(t.pop();t.length;){const e=t.pop(),o=this._domToViewMapping.get(e);if(o&&(o.is("uiElement")||o.is("rawElement")))return o}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}registerInlineObjectMatcher(e){this._inlineObjectElementMatcher.add(e)}_clearTemporaryCustomProperties(){for(const e of this._elementsWithTemporaryCustomProperties)e._removeCustomProperty("editingPipeline:doNotReuseOnce");this._elementsWithTemporaryCustomProperties.clear()}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return ua(this._domDocument);case"markedNbsp":return ha(this._domDocument);case"br":return ma(this._domDocument)}}_isDomSelectionPositionCorrect(e,t){if(Nn(e)&&fa(e)&&t0?t[e-1]:null,l=e+1e.is("element")&&t.includes(e.name)))}(e,this.preElements))return!0;for(const t of e.getAncestors({parentFirst:!0}))if(t.is("element")&&t.hasStyle("white-space")&&"inherit"!==t.getStyle("white-space"))return["pre","pre-wrap","break-spaces"].includes(t.getStyle("white-space"));return!1}_getTouchingInlineViewNode(e,t){const o=new Bs({startPosition:t?Ss._createAfter(e):Ss._createBefore(e),direction:t?"forward":"backward"});for(const{item:e}of o){if(e.is("$textProxy"))return e;if(!e.is("element")||!e.getCustomProperty("dataPipeline:transparentRendering")){if(e.is("element","br"))return null;if(this._isInlineObjectElement(e))return e;if(e.is("containerElement"))return null}}return null}_isBlockDomElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isBlockViewElement(e){return e.is("element")&&this.blockElements.includes(e.name)}_isInlineObjectElement(e){return!!e.is("element")&&("br"==e.name||this.inlineObjectElements.includes(e.name)||!!this._inlineObjectElementMatcher.match(e))}_createViewElement(e,t){if(ei(e))return new Ks(this.document,"$comment");const o=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new ys(this.document,o)}_isViewElementWithRawContent(e,t){return!1!==t.withChildren&&e.is("element")&&!!this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){const t=e.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(t)}_createReplacementDomElement(e,t){const o=this._domDocument.createElement("span");if(o.setAttribute(Ia,e),t){for(;t.firstChild;)o.appendChild(t.firstChild);for(const e of t.getAttributeNames())o.setAttribute(e,t.getAttribute(e))}return o}}function Fa(e,t){let o=e;for(;o;)t(o),o=o.parentElement}function Ma(e,t){const o=e.parentNode;return!!o&&!!o.tagName&&t.includes(o.tagName.toLowerCase())}function Ra(e){"script"===e&&D("domconverter-unsafe-script-element-detected"),"style"===e&&D("domconverter-unsafe-style-element-detected")}class za extends(Rn()){constructor(e){super(),this._isEnabled=!1,this.view=e,this.document=e.document}get isEnabled(){return this._isEnabled}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(e){return e&&3===e.nodeType&&(e=e.parentNode),!(!e||1!==e.nodeType)&&e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}var Va=Ui((function(e,t){Mt(t,ko(t),e)}));const Oa=Va;class Na{constructor(e,t,o){this.view=e,this.document=e.document,this.domEvent=t,this.domTarget=t.target,Oa(this,o)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class La extends za{constructor(){super(...arguments),this.useCapture=!1}observe(e){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach((t=>{this.listenTo(e,t,((e,t)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(t.target)&&this.onDomEvent(t)}),{useCapture:this.useCapture})}))}stopObserving(e){this.stopListening(e)}fire(e,t,o){this.isEnabled&&this.document.fire(e,new Na(this.view,t,o))}}class Ha extends La{constructor(){super(...arguments),this.domEventType=["keydown","keyup"]}onDomEvent(e){const t={keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return _i(this)}};this.fire(e.type,e,t)}}const ja=function(){return le.Date.now()};var qa=/\s/;const Ua=function(e){for(var t=e.length;t--&&qa.test(e.charAt(t)););return t};var Wa=/^\s+/;const $a=function(e){return e?e.slice(0,Ua(e)+1).replace(Wa,""):e};var Ga=/^[-+]0x[0-9a-f]+$/i,Ka=/^0b[01]+$/i,Za=/^0o[0-7]+$/i,Ja=parseInt;const Ya=function(e){if("number"==typeof e)return e;if(Ur(e))return NaN;if(U(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=U(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=$a(e);var o=Ka.test(e);return o||Za.test(e)?Ja(e.slice(2),o?2:8):Ga.test(e)?NaN:+e};var Qa=Math.max,Xa=Math.min;const el=function(e,t,o){var n,i,r,s,a,l,c=0,d=!1,u=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var o=n,r=i;return n=i=void 0,c=t,s=e.apply(r,o)}function p(e){var o=e-l;return void 0===l||o>=t||o<0||u&&e-c>=r}function g(){var e=ja();if(p(e))return f(e);a=setTimeout(g,function(e){var o=t-(e-l);return u?Xa(o,r-(e-c)):o}(e))}function f(e){return a=void 0,h&&n?m(e):(n=i=void 0,s)}function b(){var e=ja(),o=p(e);if(n=arguments,i=this,l=e,o){if(void 0===a)return function(e){return c=e,a=setTimeout(g,t),d?m(e):s}(l);if(u)return clearTimeout(a),a=setTimeout(g,t),m(l)}return void 0===a&&(a=setTimeout(g,t)),s}return t=Ya(t)||0,U(o)&&(d=!!o.leading,r=(u="maxWait"in o)?Qa(Ya(o.maxWait)||0,t):r,h="trailing"in o?!!o.trailing:h),b.cancel=function(){void 0!==a&&clearTimeout(a),c=0,n=l=i=a=void 0},b.flush=function(){return void 0===a?s:f(ja())},b};class tl extends za{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=el((e=>{this.document.fire("selectionChangeDone",e)}),200)}observe(){const e=this.document;e.on("arrowKey",((t,o)=>{e.selection.isFake&&this.isEnabled&&o.preventDefault()}),{context:"$capture"}),e.on("arrowKey",((t,o)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(o.keyCode)}),{priority:"lowest"})}stopObserving(){}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,o=new Ps(t.getRanges(),{backward:t.isBackward,fake:!1});e!=ki.arrowleft&&e!=ki.arrowup||o.setTo(o.getFirstPosition()),e!=ki.arrowright&&e!=ki.arrowdown||o.setTo(o.getLastPosition());const n={oldSelection:t,newSelection:o,domSelection:null};this.document.fire("selectionChange",n),this._fireSelectionChangeDoneDebounced(n)}}const ol=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const nl=function(e){return this.__data__.has(e)};function il(e){var t=-1,o=null==e?0:e.length;for(this.__data__=new xt;++ta))return!1;var c=r.get(e),d=r.get(t);if(c&&d)return c==t&&d==e;var u=-1,h=!0,m=2&o?new rl:void 0;for(r.set(e,t),r.set(t,e);++uthis._handleFocus())),t.on("blur",((e,t)=>this._handleBlur(t))),t.on("beforeinput",(()=>{t.isFocused||this._handleFocus()}),{priority:"highest"})}flush(){this._isFocusChanging&&(this._isFocusChanging=!1,this.document.isFocused=!0)}onDomEvent(e){this.fire(e.type,e)}destroy(){this._clearTimeout(),super.destroy()}_handleFocus(){this._clearTimeout(),this._isFocusChanging=!0,this._renderTimeoutId=setTimeout((()=>{this._renderTimeoutId=null,this.flush(),this.view.change((()=>{}))}),50)}_handleBlur(e){const t=this.document.selection.editableElement;null!==t&&t!==e.target||(this.document.isFocused=!1,this._isFocusChanging=!1,this.view.change((()=>{})))}_clearTimeout(){this._renderTimeoutId&&(clearTimeout(this._renderTimeoutId),this._renderTimeoutId=null)}}class El extends za{constructor(e){super(e),this.mutationObserver=e.getObserver(Cl),this.focusObserver=e.getObserver(xl),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=el((e=>{this.document.fire("selectionChangeDone",e)}),200),this._clearInfiniteLoopInterval=setInterval((()=>this._clearInfiniteLoop()),1e3),this._documentIsSelectingInactivityTimeoutDebounced=el((()=>this.document.isSelecting=!1),5e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument,o=()=>{this.document.isSelecting&&(this._handleSelectionChange(t),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(e,"selectstart",(()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()}),{priority:"highest"}),this.listenTo(e,"keydown",o,{priority:"highest",useCapture:!0}),this.listenTo(e,"keyup",o,{priority:"highest",useCapture:!0}),this._documents.has(t)||(this.listenTo(t,"mouseup",o,{priority:"highest",useCapture:!0}),this.listenTo(t,"selectionchange",((e,o)=>{this.document.isComposing&&!r.isAndroid||(this._handleSelectionChange(t),this._documentIsSelectingInactivityTimeoutDebounced())})),this.listenTo(this.view.document,"compositionstart",(()=>{this._handleSelectionChange(t)}),{priority:"lowest"}),this._documents.add(t))}stopObserving(e){this.stopListening(e)}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_reportInfiniteLoop(){}_handleSelectionChange(e){if(!this.isEnabled)return;const t=e.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(t.anchorNode))return;this.mutationObserver.flush();const o=this.domConverter.domSelectionToView(t);if(0!=o.rangeCount){if(this.view.hasDomSelection=!0,this.focusObserver.flush(),!this.selection.isEqual(o)||!this.domConverter.isDomSelectionCorrect(t))if(++this._loopbackCounter>60)this._reportInfiniteLoop();else if(this.selection.isSimilar(o))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:o,domSelection:t};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class Dl extends La{constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];const t=this.document;t.on("compositionstart",(()=>{t.isComposing=!0}),{priority:"low"}),t.on("compositionend",(()=>{t.isComposing=!1}),{priority:"low"})}onDomEvent(e){this.fire(e.type,e,{data:e.data})}}class Bl{constructor(e,t={}){this._files=t.cacheFiles?Sl(e):null,this._native=e}get files(){return this._files||(this._files=Sl(this._native)),this._files}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}setDragImage(e,t,o){this._native.setDragImage(e,t,o)}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}function Sl(e){const t=Array.from(e.files||[]),o=Array.from(e.items||[]);return t.length?t:o.filter((e=>"file"===e.kind)).map((e=>e.getAsFile()))}class Tl extends La{constructor(){super(...arguments),this.domEventType="beforeinput"}onDomEvent(e){const t=e.getTargetRanges(),o=this.view,n=o.document;let i=null,s=null,a=[];if(e.dataTransfer&&(i=new Bl(e.dataTransfer)),null!==e.data?s=e.data:i&&(s=i.getData("text/plain")),n.selection.isFake)a=Array.from(n.selection.getRanges());else if(t.length)a=t.map((e=>{const t=o.domConverter.domPositionToView(e.startContainer,e.startOffset),n=o.domConverter.domPositionToView(e.endContainer,e.endOffset);return t?o.createRange(t,n):n?o.createRange(n):void 0})).filter((e=>!!e));else if(r.isAndroid){const t=e.target.ownerDocument.defaultView.getSelection();a=Array.from(o.domConverter.domSelectionToView(t).getRanges())}if(r.isAndroid&&"insertCompositionText"==e.inputType&&s&&s.endsWith("\n"))this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:[o.createRange(a[0].end)]});else if("insertText"==e.inputType&&s&&s.includes("\n")){const t=s.split(/\n{1,2}/g);let o=a;for(let r=0;r{if(this.isEnabled&&((o=t.keyCode)==ki.arrowright||o==ki.arrowleft||o==ki.arrowup||o==ki.arrowdown)){const o=new Ms(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(o,t),o.stop.called&&e.stop()}var o}))}observe(){}stopObserving(){}}class Pl extends za{constructor(e){super(e);const t=this.document;t.on("keydown",((e,o)=>{if(!this.isEnabled||o.keyCode!=ki.tab||o.ctrlKey)return;const n=new Ms(t,"tab",t.selection.getFirstRange());t.fire(n,o),n.stop.called&&e.stop()}))}observe(){}stopObserving(){}}const Fl=function(e){return En(e,5)};class Ml extends(Y()){constructor(e){super(),this.domRoots=new Map,this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this.document=new Hs(e),this.domConverter=new Pa(this.document),this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new Aa(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._writer=new ea(this.document),this.addObserver(Cl),this.addObserver(xl),this.addObserver(El),this.addObserver(Ha),this.addObserver(tl),this.addObserver(Dl),this.addObserver(Il),this.addObserver(Tl),this.addObserver(Pl),this.document.on("arrowKey",wa,{priority:"low"}),Zs(this),this.on("render",(()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1})),this.listenTo(this.document.selection,"change",(()=>{this._hasChangedSinceTheLastRendering=!0})),this.listenTo(this.document,"change:isFocused",(()=>{this._hasChangedSinceTheLastRendering=!0})),r.isiOS&&this.listenTo(this.document,"blur",((e,t)=>{this.domConverter.mapDomToView(t.domEvent.relatedTarget)||this.domConverter._clearDomSelection()})),this.listenTo(this.document,"mutations",((e,{mutations:t})=>{t.forEach((e=>this._renderer.markToSync(e.type,e.node)))}),{priority:"low"}),this.listenTo(this.document,"mutations",(()=>{this.forceRender()}),{priority:"lowest"})}attachDomRoot(e,t="main"){const o=this.document.getRoot(t);o._name=e.tagName.toLowerCase();const n={};for(const{name:t,value:i}of Array.from(e.attributes))n[t]=i,"class"===t?this._writer.addClass(i.split(" "),o):this._writer.setAttribute(t,i,o);this._initialDomRootAttributes.set(e,n);const i=()=>{this._writer.setAttribute("contenteditable",(!o.isReadOnly).toString(),o),o.isReadOnly?this._writer.addClass("ck-read-only",o):this._writer.removeClass("ck-read-only",o)};i(),this.domRoots.set(t,e),this.domConverter.bindElements(e,o),this._renderer.markToSync("children",o),this._renderer.markToSync("attributes",o),this._renderer.domDocuments.add(e.ownerDocument),o.on("change:children",((e,t)=>this._renderer.markToSync("children",t))),o.on("change:attributes",((e,t)=>this._renderer.markToSync("attributes",t))),o.on("change:text",((e,t)=>this._renderer.markToSync("text",t))),o.on("change:isReadOnly",(()=>this.change(i))),o.on("change",(()=>{this._hasChangedSinceTheLastRendering=!0}));for(const o of this._observers.values())o.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach((({name:e})=>t.removeAttribute(e)));const o=this._initialDomRootAttributes.get(t);for(const e in o)t.setAttribute(e,o[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t);for(const e of this._observers.values())e.stopObserving(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,o]of this.domRoots)t.observe(o,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection({alignToTop:e,forceScroll:t,viewportOffset:o=20,ancestorOffset:n=20}={}){const i=this.document.selection.getFirstRange();if(!i)return;const r=Fl({alignToTop:e,forceScroll:t,viewportOffset:o,ancestorOffset:n});"number"==typeof o&&(o={top:o,bottom:o,left:o,right:o});const s={target:this.domConverter.viewRangeToDom(i),viewportOffset:o,ancestorOffset:n,alignToTop:e,forceScroll:t};this.fire("scrollToTheSelection",s,r),function({target:e,viewportOffset:t=0,ancestorOffset:o=0,alignToTop:n,forceScroll:i}){const r=hi(e);let s=r,a=null;for(t=function(e){return"number"==typeof e?{top:e,bottom:e,left:e,right:e}:e}(t);s;){let l;l=mi(s==r?e:a),ai({parent:l,getRect:()=>pi(e,s),alignToTop:n,ancestorOffset:o,forceScroll:i});const c=pi(e,s);if(si({window:s,rect:c,viewportOffset:t,alignToTop:n,forceScroll:i}),s.parent!=s){if(a=s.frameElement,s=s.parent,!a)return}else s=null}}(s)}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new E("cannot-change-view-tree",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){E.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.getObserver(xl).flush(),this.change((()=>{}))}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return Ss._createAt(e,t)}createPositionAfter(e){return Ss._createAfter(e)}createPositionBefore(e){return Ss._createBefore(e)}createRange(e,t){return new Ts(e,t)}createRangeOn(e){return Ts._createOn(e)}createRangeIn(e){return Ts._createIn(e)}createSelection(...e){return new Ps(...e)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change((()=>{}))}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}class Rl{is(){throw new Error("is() method is abstract")}}class zl extends Rl{constructor(e){super(),this.parent=null,this._attrs=tr(e)}get document(){return null}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new E("model-node-not-found-in-parent",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new E("model-node-not-found-in-parent",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return null!==this.parent&&this.root.isAttached()}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}getCommonAncestor(e,t={}){const o=this.getAncestors(t),n=e.getAncestors(t);let i=0;for(;o[i]==n[i]&&o[i];)i++;return 0===i?null:o[i-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),o=e.getPath(),n=ie(t,o);switch(n){case"prefix":return!0;case"extension":return!1;default:return t[n](e[t[0]]=t[1],e)),{})),e}_clone(e){return new this.constructor(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=tr(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}zl.prototype.is=function(e){return"node"===e||"model:node"===e};class Vl{constructor(e){this._nodes=[],e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce(((e,t)=>e+t.offsetSize),0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce(((e,t)=>e+t.offsetSize),0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new E("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const o of this._nodes){if(e>=t&&e1e4)return e.slice(0,o).concat(t).concat(e.slice(o+n,e.length));{const i=Array.from(e);return i.splice(o,n,...t),i}}(this._nodes,Array.from(t),e,0)}_removeNodes(e,t=1){return this._nodes.splice(e,t)}toJSON(){return this._nodes.map((e=>e.toJSON()))}}class Ol extends zl{constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new Ol(this.data,this.getAttributes())}static fromJSON(e){return new Ol(e.data,e.attributes)}}Ol.prototype.is=function(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e};class Nl extends Rl{constructor(e,t,o){if(super(),this.textNode=e,t<0||t>e.offsetSize)throw new E("model-textproxy-wrong-offsetintext",this);if(o<0||t+o>e.offsetSize)throw new E("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+o),this.offsetInText=t}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={}){const t=[];let o=e.includeSelf?this:this.parent;for(;o;)t[e.parentFirst?"push":"unshift"](o),o=o.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}Nl.prototype.is=function(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e};class Ll extends zl{constructor(e,t,o){super(t),this._children=new Vl,this.name=e,o&&this._insertChild(0,o)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const o of e)t=t.getChild(t.offsetToIndex(o));return t}findAncestor(e,t={}){let o=t.includeSelf?this:this.parent;for(;o;){if(o.name===e)return o;o=o.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map((e=>e._clone(!0))):void 0;return new Ll(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const o=function(e){if("string"==typeof e)return[new Ol(e)];re(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Ol(e):e instanceof Nl?new Ol(e.data,e.getAttributes()):e))}(t);for(const e of o)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,o)}_removeChildren(e,t=1){const o=this._children._removeNodes(e,t);for(const e of o)e.parent=null;return o}static fromJSON(e){let t;if(e.children){t=[];for(const o of e.children)o.name?t.push(Ll.fromJSON(o)):t.push(Ol.fromJSON(o))}return new Ll(e.name,e.attributes,t)}}Ll.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e};class Hl{constructor(e){if(!e||!e.boundaries&&!e.startPosition)throw new E("model-tree-walker-no-start-position",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new E("model-tree-walker-unknown-direction",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this._position=e.startPosition.clone():this._position=ql._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let t,o,n,i;do{n=this.position,i=this._visitedParent,({done:t,value:o}=this.next())}while(!t&&e(o));t||(this._position=n,this._visitedParent=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),o=this._visitedParent;if(null===o.parent&&t.offset===o.maxOffset)return{done:!0,value:void 0};if(o===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const n=Ul(t,o),i=n||Wl(t,o,n);if(i instanceof Ll){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(t))return{done:!0,value:void 0};t.offset++}else t.path.push(0),this._visitedParent=i;return this._position=t,jl("elementStart",i,e,t,1)}if(i instanceof Ol){let n;if(this.singleCharacters)n=1;else{let e=i.endOffset;this._boundaryEndParent==o&&this.boundaries.end.offsete&&(e=this.boundaries.start.offset),n=t.offset-e}const i=t.offset-r.startOffset,s=new Nl(r,i-n,n);return t.offset-=n,this._position=t,jl("text",s,e,t,n)}return t.path.pop(),this._position=t,this._visitedParent=o.parent,jl("elementStart",o,e,t,1)}}function jl(e,t,o,n,i){return{done:!1,value:{type:e,item:t,previousPosition:o,nextPosition:n,length:i}}}class ql extends Rl{constructor(e,t,o="toNone"){if(super(),!e.is("element")&&!e.is("documentFragment"))throw new E("model-position-root-invalid",e);if(!(t instanceof Array)||0===t.length)throw new E("model-position-path-incorrect-format",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=o}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t1)return!1;if(1===t)return Gl(e,this,o);if(-1===t)return Gl(this,e,o)}return this.path.length===e.path.length||(this.path.length>e.path.length?Kl(this.path,t):Kl(e.path,t))}hasSameParentAs(e){if(this.root!==e.root)return!1;return"same"==ie(this.getParentPath(),e.getParentPath())}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=ql._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let o;return t.containsPosition(this)||t.start.isEqual(this)?(o=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(o=o._getTransformedByDeletion(e.deletionPosition,1))):o=this.isEqual(e.deletionPosition)?ql._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),o}_getTransformedByDeletion(e,t){const o=ql._createAt(this);if(this.root!=e.root)return o;if("same"==ie(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;o.offset-=t}}else if("prefix"==ie(e.getParentPath(),this.getParentPath())){const n=e.path.length-1;if(e.offset<=this.path[n]){if(e.offset+t>this.path[n])return null;o.path[n]-=t}}return o}_getTransformedByInsertion(e,t){const o=ql._createAt(this);if(this.root!=e.root)return o;if("same"==ie(e.getParentPath(),this.getParentPath()))(e.offset=t;){if(e.path[n]+i!==o.maxOffset)return!1;i=1,n--,o=o.parent}return!0}(e,o+1))}function Kl(e,t){for(;tt+1;){const t=n.maxOffset-o.offset;0!==t&&e.push(new Zl(o,o.getShiftedBy(t))),o.path=o.path.slice(0,-1),o.offset++,n=n.parent}for(;o.path.length<=this.end.path.length;){const t=this.end.path[o.path.length-1],n=t-o.offset;0!==n&&e.push(new Zl(o,o.getShiftedBy(n))),o.offset=t,o.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new Hl(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new Hl(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new Hl(e);yield t.position;for(const e of t)yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new Zl(this.start,this.end)]}getTransformedByOperations(e){const t=[new Zl(this.start,this.end)];for(const o of e)for(let e=0;e0?new this(o,n):new this(n,o)}static _createIn(e){return new this(ql._createAt(e,0),ql._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(ql._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new E("range-create-from-ranges-empty-array",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort(((e,t)=>e.start.isAfter(t.start)?1:-1));const o=e.indexOf(t),n=new this(t.start,t.end);if(o>0)for(let t=o-1;e[t].end.isEqual(n.start);t++)n.start=ql._createAt(e[t].start);for(let t=o+1;t{if(t.viewPosition)return;const o=this._modelToViewMapping.get(t.modelPosition.parent);if(!o)throw new E("mapping-model-position-view-parent-not-found",this,{modelPosition:t.modelPosition});t.viewPosition=this.findPositionIn(o,t.modelPosition.offset)}),{priority:"low"}),this.on("viewToModelPosition",((e,t)=>{if(t.modelPosition)return;const o=this.findMappedViewAncestor(t.viewPosition),n=this._viewToModelMapping.get(o),i=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,o);t.modelPosition=ql._createAt(n,i)}),{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e,t={}){const o=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);t.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e),this._modelToViewMapping.get(o)==e&&this._modelToViewMapping.delete(o))}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const o=this._markerNameToElements.get(t)||new Set;o.add(e);const n=this._elementToMarkerNames.get(e)||new Set;n.add(t),this._markerNameToElements.set(t,o),this._elementToMarkerNames.set(e,n)}unbindElementFromMarkerName(e,t){const o=this._markerNameToElements.get(t);o&&(o.delete(e),0==o.size&&this._markerNameToElements.delete(t));const n=this._elementToMarkerNames.get(e);n&&(n.delete(t),0==n.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(const[e,t]of this._deferredBindingRemovals)e.root==t&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new Zl(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new Ts(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={}){const o={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",o),o.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const o=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())o.add(t);else o.add(e);return o}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,o){if(o!=e){return this._toModelOffset(e.parent,e.index,o)+this._toModelOffset(e,t,e)}if(e.is("$text"))return t;let n=0;for(let o=0;o1?t[0]+":"+t[1]:t[0]}class Xl extends(z()){constructor(e){super(),this._conversionApi={dispatcher:this,...e},this._firedEventsMap=new WeakMap}convertChanges(e,t,o){const n=this._createConversionApi(o,e.getRefreshedItems());for(const t of e.getMarkersToRemove())this._convertMarkerRemove(t.name,t.range,n);const i=this._reduceChanges(e.getChanges());for(const e of i)"insert"===e.type?this._convertInsert(Zl._createFromPositionAndShift(e.position,e.length),n):"reinsert"===e.type?this._convertReinsert(Zl._createFromPositionAndShift(e.position,e.length),n):"remove"===e.type?this._convertRemove(e.position,e.length,e.name,n):this._convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,n);n.mapper.flushDeferredBindings();for(const e of n.mapper.flushUnboundMarkerNames()){const o=t.get(e).getRange();this._convertMarkerRemove(e,o,n),this._convertMarkerAdd(e,o,n)}for(const t of e.getMarkersToAdd())this._convertMarkerAdd(t.name,t.range,n);n.consumable.verifyAllConsumed("insert")}convert(e,t,o,n={}){const i=this._createConversionApi(o,void 0,n);this._convertInsert(e,i);for(const[e,o]of t)this._convertMarkerAdd(e,o,i);i.consumable.verifyAllConsumed("insert")}convertSelection(e,t,o){const n=this._createConversionApi(o);this.fire("cleanSelection",{selection:e},n);const i=e.getFirstPosition().root;if(!n.mapper.toViewElement(i))return;const r=Array.from(t.getMarkersAtPosition(e.getFirstPosition()));if(this._addConsumablesForSelection(n.consumable,e,r),this.fire("selection",{selection:e},n),e.isCollapsed){for(const t of r)if(n.consumable.test(e,"addMarker:"+t.name)){const o=t.getRange();if(!ec(e.getFirstPosition(),t,n.mapper))continue;const i={item:e,markerName:t.name,markerRange:o};this.fire(`addMarker:${t.name}`,i,n)}for(const t of e.getAttributeKeys())if(n.consumable.test(e,"attribute:"+t)){const o={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};this.fire(`attribute:${t}:$text`,o,n)}}}_convertInsert(e,t,o={}){o.doNotAddConsumables||this._addConsumablesForInsert(t.consumable,e);for(const o of Array.from(e.getWalker({shallow:!0})).map(tc))this._testAndFire("insert",o,t)}_convertRemove(e,t,o,n){this.fire(`remove:${o}`,{position:e,length:t},n)}_convertAttribute(e,t,o,n,i){this._addConsumablesForRange(i.consumable,e,`attribute:${t}`);for(const r of e){const e={item:r.item,range:Zl._createFromPositionAndShift(r.previousPosition,r.length),attributeKey:t,attributeOldValue:o,attributeNewValue:n};this._testAndFire(`attribute:${t}`,e,i)}}_convertReinsert(e,t){const o=Array.from(e.getWalker({shallow:!0}));this._addConsumablesForInsert(t.consumable,o);for(const e of o.map(tc))this._testAndFire("insert",{...e,reconversion:!0},t)}_convertMarkerAdd(e,t,o){if("$graveyard"==t.root.rootName)return;const n=`addMarker:${e}`;if(o.consumable.add(t,n),this.fire(n,{markerName:e,markerRange:t},o),o.consumable.consume(t,n)){this._addConsumablesForRange(o.consumable,t,n);for(const i of t.getItems()){if(!o.consumable.test(i,n))continue;const r={item:i,range:Zl._createOn(i),markerName:e,markerRange:t};this.fire(n,r,o)}}}_convertMarkerRemove(e,t,o){"$graveyard"!=t.root.rootName&&this.fire(`removeMarker:${e}`,{markerName:e,markerRange:t},o)}_reduceChanges(e){const t={changes:e};return this.fire("reduceChanges",t),t.changes}_addConsumablesForInsert(e,t){for(const o of t){const t=o.item;if(null===e.test(t,"insert")){e.add(t,"insert");for(const o of t.getAttributeKeys())e.add(t,"attribute:"+o)}}return e}_addConsumablesForRange(e,t,o){for(const n of t.getItems())e.add(n,o);return e}_addConsumablesForSelection(e,t,o){e.add(t,"selection");for(const n of o)e.add(t,"addMarker:"+n.name);for(const o of t.getAttributeKeys())e.add(t,"attribute:"+o);return e}_testAndFire(e,t,o){const n=function(e,t){const o=t.item.is("element")?t.item.name:"$text";return`${e}:${o}`}(e,t),i=t.item.is("$textProxy")?o.consumable._getSymbolForTextProxy(t.item):t.item,r=this._firedEventsMap.get(o),s=r.get(i);if(s){if(s.has(n))return;s.add(n)}else r.set(i,new Set([n]));this.fire(n,t,o)}_testAndFireAddAttributes(e,t){const o={item:e,range:Zl._createOn(e)};for(const e of o.item.getAttributeKeys())o.attributeKey=e,o.attributeOldValue=null,o.attributeNewValue=o.item.getAttribute(e),this._testAndFire(`attribute:${e}`,o,t)}_createConversionApi(e,t=new Set,o={}){const n={...this._conversionApi,consumable:new Yl,writer:e,options:o,convertItem:e=>this._convertInsert(Zl._createOn(e),n),convertChildren:e=>this._convertInsert(Zl._createIn(e),n,{doNotAddConsumables:!0}),convertAttributes:e=>this._testAndFireAddAttributes(e,n),canReuseView:e=>!t.has(n.mapper.toModelElement(e))};return this._firedEventsMap.set(n,new Map),n}}function ec(e,t,o){const n=t.getRange(),i=Array.from(e.getAncestors());i.shift(),i.reverse();return!i.some((e=>{if(n.containsItem(e)){return!!o.toViewElement(e).getCustomProperty("addHighlight")}}))}function tc(e){return{item:e.item,range:Zl._createFromPositionAndShift(e.previousPosition,e.length)}}class oc extends(z(Rl)){constructor(...e){super(),this._lastRangeBackward=!1,this._attrs=new Map,this._ranges=[],e.length&&this.setTo(...e)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let o=!1;for(const n of e._ranges)if(t.isEqual(n)){o=!0;break}if(!o)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new Zl(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new Zl(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new Zl(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(...e){let[t,o,n]=e;if("object"==typeof o&&(n=o,o=void 0),null===t)this._setRanges([]);else if(t instanceof oc)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof Zl)this._setRanges([t],!!n&&!!n.backward);else if(t instanceof ql)this._setRanges([new Zl(t)]);else if(t instanceof zl){const e=!!n&&!!n.backward;let i;if("in"==o)i=Zl._createIn(t);else if("on"==o)i=Zl._createOn(t);else{if(void 0===o)throw new E("model-selection-setto-required-second-parameter",[this,t]);i=new Zl(ql._createAt(t,o))}this._setRanges([i],e)}else{if(!re(t))throw new E("model-selection-setto-not-selectable",[this,t]);this._setRanges(t,n&&!!n.backward)}}_setRanges(e,t=!1){const o=Array.from(e),n=o.some((t=>{if(!(t instanceof Zl))throw new E("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every((e=>!e.isEqual(t)))}));(o.length!==this._ranges.length||n)&&(this._replaceAllRanges(o),this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0}))}setFocus(e,t){if(null===this.anchor)throw new E("model-selection-setfocus-no-ranges",[this,e]);const o=ql._createAt(e,t);if("same"==o.compareWith(this.focus))return;const n=this.anchor;this._ranges.length&&this._popRange(),"before"==o.compareWith(n)?(this._pushRange(new Zl(o,n)),this._lastRangeBackward=!0):(this._pushRange(new Zl(n,o)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const o=rc(t.start,e);ac(o,t)&&(yield o);for(const o of t.getWalker()){const n=o.item;"elementEnd"==o.type&&ic(n,e,t)&&(yield n)}const n=rc(t.end,e);lc(n,t)&&(yield n)}}containsEntireContent(e=this.anchor.root){const t=ql._createAt(e,0),o=ql._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&o.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new Zl(e.start,e.end))}_checkRange(e){for(let t=0;t0;)this._popRange()}_popRange(){this._ranges.pop()}}function nc(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&!!e.parent)}function ic(e,t,o){return nc(e,t)&&sc(e,o)}function rc(e,t){const o=e.parent.root.document.model.schema,n=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let i=!1;const r=n.find((e=>!i&&(i=o.isLimit(e),!i&&nc(e,t))));return n.forEach((e=>t.add(e))),r}function sc(e,t){const o=function(e){const t=e.root.document.model.schema;let o=e.parent;for(;o;){if(t.isBlock(o))return o;o=o.parent}}(e);if(!o)return!0;return!t.containsRange(Zl._createOn(o),!0)}function ac(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.start.isTouching(ql._createAt(e,e.maxOffset))&&sc(e,t))}function lc(e,t){return!!e&&(!(!t.isCollapsed&&!e.isEmpty)||!t.end.isTouching(ql._createAt(e,0))&&sc(e,t))}oc.prototype.is=function(e){return"selection"===e||"model:selection"===e};class cc extends(z(Zl)){constructor(e,t){super(e,t),dc.call(this)}detach(){this.stopListening()}toRange(){return new Zl(this.start,this.end)}static fromRange(e){return new cc(e.start,e.end)}}function dc(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&uc.call(this,o)}),{priority:"low"})}function uc(e){const t=this.getTransformedByOperation(e),o=Zl._createFromRanges(t),n=!o.isEqual(this),i=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let r=null;if(n){"$graveyard"==o.root.rootName&&(r="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=o.start,this.end=o.end,this.fire("change:range",t,{deletionPosition:r})}else i&&this.fire("change:content",this.toRange(),{deletionPosition:r})}cc.prototype.is=function(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e};const hc="selection:";class mc extends(z(Rl)){constructor(e){super(),this._selection=new pc(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(...e){this._selection.setTo(...e)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return hc+e}static _isStoreAttributeKey(e){return e.startsWith(hc)}}mc.prototype.is=function(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e};class pc extends oc{constructor(e){super(),this.markers=new Yi({idProperty:"name"}),this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this._model=e.model,this._document=e,this.listenTo(this._model,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&"marker"!=o.type&&"rename"!=o.type&&"noop"!=o.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))}),{priority:"lowest"}),this.on("change:range",(()=>{this._validateSelectionRanges(this.getRanges())})),this.listenTo(this._model.markers,"update",((e,t,o,n)=>{this._updateMarker(t,n)})),this.listenTo(this._document,"change",((e,t)=>{!function(e,t){const o=e.document.differ;for(const n of o.getChanges()){if("insert"!=n.type)continue;const o=n.position.parent;n.length===o.maxOffset&&e.enqueueChange(t,(e=>{const t=Array.from(o.getAttributeKeys()).filter((e=>e.startsWith(hc)));for(const n of t)e.removeAttribute(n,o)}))}}(this._model,t)}))}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=n.deletionPosition;const e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}})),t}updateMarkers(){if(!this._observedMarkers.size)return;const e=[];let t=!1;for(const t of this._model.markers){const o=t.name.split(":",1)[0];if(!this._observedMarkers.has(o))continue;const n=t.getRange();for(const o of this.getRanges())n.containsRange(o,!o.isCollapsed)&&e.push(t)}const o=Array.from(this.markers);for(const o of e)this.markers.has(o)||(this.markers.add(o),t=!0);for(const o of Array.from(this.markers))e.includes(o)||(this.markers.remove(o),t=!0);t&&this.fire("change:marker",{oldMarkers:o,directChange:!1})}_updateMarker(e,t){const o=e.name.split(":",1)[0];if(!this._observedMarkers.has(o))return;let n=!1;const i=Array.from(this.markers),r=this.markers.has(e);if(t){let o=!1;for(const e of this.getRanges())if(t.containsRange(e,!e.isCollapsed)){o=!0;break}o&&!r?(this.markers.add(e),n=!0):!o&&r&&(this.markers.remove(e),n=!0)}else r&&(this.markers.remove(e),n=!0);n&&this.fire("change:marker",{oldMarkers:i,directChange:!1})}_updateAttributes(e){const t=tr(this._getSurroundingAttributes()),o=tr(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const n=[];for(const[e,t]of this.getAttributes())o.has(e)&&o.get(e)===t||n.push(e);for(const[e]of o)this.hasAttribute(e)||n.push(e);n.length>0&&this.fire("change:attribute",{attributeKeys:n,directChange:!1})}_setAttribute(e,t,o=!0){const n=o?"normal":"low";if("low"==n&&"normal"==this._attributePriority.get(e))return!1;return super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,n),!0)}_removeAttribute(e,t=!0){const o=t?"normal":"low";return("low"!=o||"normal"!=this._attributePriority.get(e))&&(this._attributePriority.set(e,o),!!super.hasAttribute(e)&&(this._attrs.delete(e),!0))}_setAttributesTo(e){const t=new Set;for(const[t,o]of this.getAttributes())e.get(t)!==o&&this._removeAttribute(t,!1);for(const[o,n]of e){this._setAttribute(o,n,!1)&&t.add(o)}return t}*getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith(hc)){const o=t.substr(10);yield[o,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;if("$graveyard"==e.root.rootName)return null;let o=null;if(this.isCollapsed){const n=e.textNode?e.textNode:e.nodeBefore,i=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(o=gc(n,t)),o||(o=gc(i,t)),!this.isGravityOverridden&&!o){let e=n;for(;e&&!o;)e=e.previousSibling,o=gc(e,t)}if(!o){let e=i;for(;e&&!o;)e=e.nextSibling,o=gc(e,t)}o||(o=this.getStoredAttributes())}else{const e=this.getFirstRange();for(const n of e){if(n.item.is("element")&&t.isObject(n.item)){o=gc(n.item,t);break}if("text"==n.type){o=n.item.getAttributes();break}}}return o}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function gc(e,t){if(!e)return null;if(e instanceof Nl||e instanceof Ol)return e.getAttributes();if(!t.isInline(e))return null;if(!t.isObject(e))return[];const o=[];for(const[n,i]of e.getAttributes())t.checkAttribute("$text",n)&&!1!==t.getAttributeProperties(n).copyFromObject&&o.push([n,i]);return o}class fc{constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}class bc extends fc{elementToElement(e){return this.add(function(e){const t=Cc(e.model),o=vc(e.view,"container");t.attributes.length&&(t.children=!0);return n=>{n.on(`insert:${t.name}`,_c(o,Sc(t)),{priority:e.converterPriority||"normal"}),(t.children||t.attributes.length)&&n.on("reduceChanges",Bc(t),{priority:"low"})}}(e))}elementToStructure(e){return this.add(function(e){const t=Cc(e.model),o=vc(e.view,"container");return t.children=!0,n=>{if(n._conversionApi.schema.checkChild(t.name,"$text"))throw new E("conversion-element-to-structure-disallowed-text",n,{elementName:t.name});var i,r;n.on(`insert:${t.name}`,(i=o,r=Sc(t),(e,t,o)=>{if(!r(t.item,o.consumable,{preflight:!0}))return;const n=new Map;o.writer._registerSlotFactory(function(e,t,o){return(n,i)=>{const r=n.createContainerElement("$slot");let s=null;if("children"===i)s=Array.from(e.getChildren());else{if("function"!=typeof i)throw new E("conversion-slot-mode-unknown",o.dispatcher,{modeOrFilter:i});s=Array.from(e.getChildren()).filter((e=>i(e)))}return t.set(r,s),r}}(t.item,n,o));const s=i(t.item,o,t);if(o.writer._clearSlotFactory(),!s)return;!function(e,t,o){const n=Array.from(t.values()).flat(),i=new Set(n);if(i.size!=n.length)throw new E("conversion-slot-filter-overlap",o.dispatcher,{element:e});if(i.size!=e.childCount)throw new E("conversion-slot-filter-incomplete",o.dispatcher,{element:e})}(t.item,n,o),r(t.item,o.consumable);const a=o.mapper.toViewPosition(t.range.start);o.mapper.bindElements(t.item,s),o.writer.insert(a,s),o.convertAttributes(t.item),function(e,t,o,n){o.mapper.on("modelToViewPosition",s,{priority:"highest"});let i=null,r=null;for([i,r]of t)Tc(e,r,o,n),o.writer.move(o.writer.createRangeIn(i),o.writer.createPositionBefore(i)),o.writer.remove(i);function s(e,t){const o=t.modelPosition.nodeAfter,n=r.indexOf(o);n<0||(t.viewPosition=t.mapper.findPositionIn(i,n))}o.mapper.off("modelToViewPosition",s)}(s,n,o,{reconversion:t.reconversion})}),{priority:e.converterPriority||"normal"}),n.on("reduceChanges",Bc(t),{priority:"low"})}}(e))}attributeToElement(e){return this.add(function(e){e=Fl(e);let t=e.model;"string"==typeof t&&(t={key:t});let o=`attribute:${t.key}`;t.name&&(o+=":"+t.name);if(t.values)for(const o of t.values)e.view[o]=vc(e.view[o],"attribute");else e.view=vc(e.view,"attribute");const n=xc(e);return t=>{t.on(o,wc(n),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=Fl(e);let t=e.model;"string"==typeof t&&(t={key:t});let o=`attribute:${t.key}`;t.name&&(o+=":"+t.name);if(t.values)for(const o of t.values)e.view[o]=Ec(e.view[o]);else e.view=Ec(e.view);const n=xc(e);return t=>{var i;t.on(o,(i=n,(e,t,o)=>{if(!o.consumable.test(t.item,e.name))return;const n=i(t.attributeOldValue,o,t),r=i(t.attributeNewValue,o,t);if(!n&&!r)return;o.consumable.consume(t.item,e.name);const s=o.mapper.toViewElement(t.item),a=o.writer;if(!s)throw new E("conversion-attribute-to-attribute-on-text",o.dispatcher,t);if(null!==t.attributeOldValue&&n)if("class"==n.key){const e="string"==typeof n.value?n.value.split(/\s+/):n.value;for(const t of e)a.removeClass(t,s)}else if("style"==n.key)if("string"==typeof n.value){const e=new bs(a.document.stylesProcessor);e.setTo(n.value);for(const[t]of e.getStylesEntries())a.removeStyle(t,s)}else{const e=Object.keys(n.value);for(const t of e)a.removeStyle(t,s)}else a.removeAttribute(n.key,s);if(null!==t.attributeNewValue&&r)if("class"==r.key){const e="string"==typeof r.value?r.value.split(/\s+/):r.value;for(const t of e)a.addClass(t,s)}else if("style"==r.key)if("string"==typeof r.value){const e=new bs(a.document.stylesProcessor);e.setTo(r.value);for(const[t,o]of e.getStylesEntries())a.setStyle(t,o,s)}else{const e=Object.keys(r.value);for(const t of e)a.setStyle(t,r.value[t],s)}else a.setAttribute(r.key,r.value,s)}),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){const t=vc(e.view,"ui");return o=>{o.on(`addMarker:${e.model}`,yc(t),{priority:e.converterPriority||"normal"}),o.on(`removeMarker:${e.model}`,((e,t,o)=>{const n=o.mapper.markerNameToElements(t.markerName);if(n){for(const e of n)o.mapper.unbindElementFromMarkerName(e,t.markerName),o.writer.clear(o.writer.createRangeOn(e),e);o.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{var o;t.on(`addMarker:${e.model}`,(o=e.view,(e,t,n)=>{if(!t.item)return;if(!(t.item instanceof oc||t.item instanceof mc||t.item.is("$textProxy")))return;const i=Dc(o,t,n);if(!i)return;if(!n.consumable.consume(t.item,e.name))return;const r=n.writer,s=kc(r,i),a=r.document.selection;if(t.item instanceof oc||t.item instanceof mc)r.wrap(a.getFirstRange(),s);else{const e=n.mapper.toViewRange(t.range),o=r.wrap(e,s);for(const e of o.getItems())if(e.is("attributeElement")&&e.isSimilar(s)){n.mapper.bindElementToMarker(e,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on(`addMarker:${e.model}`,function(e){return(t,o,n)=>{if(!o.item)return;if(!(o.item instanceof Ll))return;const i=Dc(e,o,n);if(!i)return;if(!n.consumable.test(o.item,t.name))return;const r=n.mapper.toViewElement(o.item);if(r&&r.getCustomProperty("addHighlight")){n.consumable.consume(o.item,t.name);for(const e of Zl._createIn(o.item))n.consumable.consume(e.item,t.name);r.getCustomProperty("addHighlight")(r,i,n.writer),n.mapper.bindElementToMarker(r,o.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on(`removeMarker:${e.model}`,function(e){return(t,o,n)=>{if(o.markerRange.isCollapsed)return;const i=Dc(e,o,n);if(!i)return;const r=kc(n.writer,i),s=n.mapper.markerNameToElements(o.markerName);if(s){for(const e of s)if(n.mapper.unbindElementFromMarkerName(e,o.markerName),e.is("attributeElement"))n.writer.unwrap(n.writer.createRangeOn(e),r);else{e.getCustomProperty("removeHighlight")(e,i.id,n.writer)}n.writer.clearClonedElementsGroup(o.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){e=Fl(e);const t=e.model;let o=e.view;o||(o=o=>({group:t,name:o.substr(e.model.length+1)}));return n=>{var i;n.on(`addMarker:${t}`,(i=o,(e,t,o)=>{const n=i(t.markerName,o);if(!n)return;const r=t.markerRange;o.consumable.consume(r,e.name)&&(Ac(r,!1,o,t,n),Ac(r,!0,o,t,n),e.stop())}),{priority:e.converterPriority||"normal"}),n.on(`removeMarker:${t}`,function(e){return(t,o,n)=>{const i=e(o.markerName,n);if(!i)return;const r=n.mapper.markerNameToElements(o.markerName);if(r){for(const e of r)n.mapper.unbindElementFromMarkerName(e,o.markerName),e.is("containerElement")?(s(`data-${i.group}-start-before`,e),s(`data-${i.group}-start-after`,e),s(`data-${i.group}-end-before`,e),s(`data-${i.group}-end-after`,e)):n.writer.clear(n.writer.createRangeOn(e),e);n.writer.clearClonedElementsGroup(o.markerName),t.stop()}function s(e,t){if(t.hasAttribute(e)){const o=new Set(t.getAttribute(e).split(","));o.delete(i.name),0==o.size?n.writer.removeAttribute(e,t):n.writer.setAttribute(e,Array.from(o).join(","),t)}}}}(o),{priority:e.converterPriority||"normal"})}}(e))}}function kc(e,t){const o=e.createAttributeElement("span",t.attributes);return t.classes&&o._addClass(t.classes),"number"==typeof t.priority&&(o._priority=t.priority),o._id=t.id,o}function wc(e){return(t,o,n)=>{if(!n.consumable.test(o.item,t.name))return;const i=e(o.attributeOldValue,n,o),r=e(o.attributeNewValue,n,o);if(!i&&!r)return;n.consumable.consume(o.item,t.name);const s=n.writer,a=s.document.selection;if(o.item instanceof oc||o.item instanceof mc)s.wrap(a.getFirstRange(),r);else{let e=n.mapper.toViewRange(o.range);null!==o.attributeOldValue&&i&&(e=s.unwrap(e,i)),null!==o.attributeNewValue&&r&&s.wrap(e,r)}}}function _c(e,t=Pc){return(o,n,i)=>{if(!t(n.item,i.consumable,{preflight:!0}))return;const r=e(n.item,i,n);if(!r)return;t(n.item,i.consumable);const s=i.mapper.toViewPosition(n.range.start);i.mapper.bindElements(n.item,r),i.writer.insert(s,r),i.convertAttributes(n.item),Tc(r,n.item.getChildren(),i,{reconversion:n.reconversion})}}function yc(e){return(t,o,n)=>{o.isOpening=!0;const i=e(o,n);o.isOpening=!1;const r=e(o,n);if(!i||!r)return;const s=o.markerRange;if(s.isCollapsed&&!n.consumable.consume(s,t.name))return;for(const e of s)if(!n.consumable.consume(e.item,t.name))return;const a=n.mapper,l=n.writer;l.insert(a.toViewPosition(s.start),i),n.mapper.bindElementToMarker(i,o.markerName),s.isCollapsed||(l.insert(a.toViewPosition(s.end),r),n.mapper.bindElementToMarker(r,o.markerName)),t.stop()}}function Ac(e,t,o,n,i){const r=t?e.start:e.end,s=r.nodeAfter&&r.nodeAfter.is("element")?r.nodeAfter:null,a=r.nodeBefore&&r.nodeBefore.is("element")?r.nodeBefore:null;if(s||a){let e,r;t&&s||!t&&!a?(e=s,r=!0):(e=a,r=!1);const l=o.mapper.toViewElement(e);if(l)return void function(e,t,o,n,i,r){const s=`data-${r.group}-${t?"start":"end"}-${o?"before":"after"}`,a=e.hasAttribute(s)?e.getAttribute(s).split(","):[];a.unshift(r.name),n.writer.setAttribute(s,a.join(","),e),n.mapper.bindElementToMarker(e,i.markerName)}(l,t,r,o,n,i)}!function(e,t,o,n,i){const r=`${i.group}-${t?"start":"end"}`,s=i.name?{name:i.name}:null,a=o.writer.createUIElement(r,s);o.writer.insert(e,a),o.mapper.bindElementToMarker(a,n.markerName)}(o.mapper.toViewPosition(r),t,o,n,i)}function Cc(e){return"string"==typeof e&&(e={name:e}),{name:e.name,attributes:e.attributes?xi(e.attributes):[],children:!!e.children}}function vc(e,t){return"function"==typeof e?e:(o,n)=>function(e,t,o){"string"==typeof e&&(e={name:e});let n;const i=t.writer,r=Object.assign({},e.attributes);if("container"==o)n=i.createContainerElement(e.name,r);else if("attribute"==o){const t={priority:e.priority||qs.DEFAULT_PRIORITY};n=i.createAttributeElement(e.name,r,t)}else n=i.createUIElement(e.name,r);if(e.styles){const t=Object.keys(e.styles);for(const o of t)i.setStyle(o,e.styles[o],n)}if(e.classes){const t=e.classes;if("string"==typeof t)i.addClass(t,n);else for(const e of t)i.addClass(e,n)}return n}(e,n,t)}function xc(e){return e.model.values?(t,o,n)=>{const i=e.view[t];return i?i(t,o,n):null}:e.view}function Ec(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function Dc(e,t,o){const n="function"==typeof e?e(t,o):e;return n?(n.priority||(n.priority=10),n.id||(n.id=t.markerName),n):null}function Bc(e){const t=function(e){return(t,o)=>{if(!t.is("element",e.name))return!1;if("attribute"==o.type){if(e.attributes.includes(o.attributeKey))return!0}else if(e.children)return!0;return!1}}(e);return(e,o)=>{const n=[];o.reconvertedElements||(o.reconvertedElements=new Set);for(const e of o.changes){const i="attribute"==e.type?e.range.start.nodeAfter:e.position.parent;if(i&&t(i,e)){if(!o.reconvertedElements.has(i)){o.reconvertedElements.add(i);const e=ql._createBefore(i);let t=n.length;for(let o=n.length-1;o>=0;o--){const i=n[o],r=("attribute"==i.type?i.range.start:i.position).compareWith(e);if("before"==r||"remove"==i.type&&"same"==r)break;t=o}n.splice(t,0,{type:"remove",name:i.name,position:e,length:1},{type:"reinsert",name:i.name,position:e,length:1})}}else n.push(e)}o.changes=n}}function Sc(e){return(t,o,n={})=>{const i=["insert"];for(const o of e.attributes)t.hasAttribute(o)&&i.push(`attribute:${o}`);return!!i.every((e=>o.test(t,e)))&&(n.preflight||i.forEach((e=>o.consume(t,e))),!0)}}function Tc(e,t,o,n){for(const i of t)Ic(e.root,i,o,n)||o.convertItem(i)}function Ic(e,t,o,n){const{writer:i,mapper:r}=o;if(!n.reconversion)return!1;const s=r.toViewElement(t);return!(!s||s.root==e)&&(!!o.canReuseView(s)&&(i.move(i.createRangeOn(s),r.toViewPosition(ql._createBefore(t))),!0))}function Pc(e,t,{preflight:o}={}){return o?t.test(e,"insert"):t.consume(e,"insert")}function Fc(e){const{schema:t,document:o}=e.model;for(const n of o.getRoots())if(n.isEmpty&&!t.checkChild(n,"$text")&&t.checkChild(n,"paragraph"))return e.insertElement("paragraph",n),!0;return!1}function Mc(e,t,o){const n=o.createContext(e);return!!o.checkChild(n,"paragraph")&&!!o.checkChild(n.push("paragraph"),t)}function Rc(e,t){const o=t.createElement("paragraph");return t.insert(o,e),t.createPositionAt(o,0)}class zc extends fc{elementToElement(e){return this.add(Vc(e))}elementToAttribute(e){return this.add(function(e){e=Fl(e),Lc(e);const t=Hc(e,!1),o=Oc(e.view),n=o?`element:${o}`:"element";return o=>{o.on(n,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=Fl(e);let t=null;("string"==typeof e.view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key,o=void 0===e.view.value?/[\s\S]*/:e.view.value;let n;if("class"==t||"style"==t){n={["class"==t?"classes":"styles"]:o}}else n={attributes:{[t]:o}};e.view.name&&(n.name=e.view.name);return e.view=n,t}(e));Lc(e,t);const o=Hc(e,!0);return t=>{t.on("element",o,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){const t=function(e){return(t,o)=>{const n="string"==typeof e?e:e(t,o);return o.writer.createElement("$marker",{"data-name":n})}}(e.model);return Vc({...e,model:t})}(e))}dataToMarker(e){return this.add(function(e){e=Fl(e),e.model||(e.model=t=>t?e.view+":"+t:e.view);const t={view:e.view,model:e.model},o=Nc(jc(t,"start")),n=Nc(jc(t,"end"));return i=>{i.on(`element:${e.view}-start`,o,{priority:e.converterPriority||"normal"}),i.on(`element:${e.view}-end`,n,{priority:e.converterPriority||"normal"});const r=C.low,s=C.highest,a=C.get(e.converterPriority)/s;i.on("element",function(e){return(t,o,n)=>{const i=`data-${e.view}`;function r(t,i){for(const r of i){const i=e.model(r,n),s=n.writer.createElement("$marker",{"data-name":i});n.writer.insert(s,t),o.modelCursor.isEqual(t)?o.modelCursor=o.modelCursor.getShiftedBy(1):o.modelCursor=o.modelCursor._getTransformedByInsertion(t,1),o.modelRange=o.modelRange._getTransformedByInsertion(t,1)[0]}}(n.consumable.test(o.viewItem,{attributes:i+"-end-after"})||n.consumable.test(o.viewItem,{attributes:i+"-start-after"})||n.consumable.test(o.viewItem,{attributes:i+"-end-before"})||n.consumable.test(o.viewItem,{attributes:i+"-start-before"}))&&(o.modelRange||Object.assign(o,n.convertChildren(o.viewItem,o.modelCursor)),n.consumable.consume(o.viewItem,{attributes:i+"-end-after"})&&r(o.modelRange.end,o.viewItem.getAttribute(i+"-end-after").split(",")),n.consumable.consume(o.viewItem,{attributes:i+"-start-after"})&&r(o.modelRange.end,o.viewItem.getAttribute(i+"-start-after").split(",")),n.consumable.consume(o.viewItem,{attributes:i+"-end-before"})&&r(o.modelRange.start,o.viewItem.getAttribute(i+"-end-before").split(",")),n.consumable.consume(o.viewItem,{attributes:i+"-start-before"})&&r(o.modelRange.start,o.viewItem.getAttribute(i+"-start-before").split(",")))}}(t),{priority:r+a})}}(e))}}function Vc(e){const t=Nc(e=Fl(e)),o=Oc(e.view),n=o?`element:${o}`:"element";return o=>{o.on(n,t,{priority:e.converterPriority||"normal"})}}function Oc(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function Nc(e){const t=new Hr(e.view);return(o,n,i)=>{const r=t.match(n.viewItem);if(!r)return;const s=r.match;if(s.name=!0,!i.consumable.test(n.viewItem,s))return;const a=function(e,t,o){return e instanceof Function?e(t,o):o.writer.createElement(e)}(e.model,n.viewItem,i);a&&i.safeInsert(a,n.modelCursor)&&(i.consumable.consume(n.viewItem,s),i.convertChildren(n.viewItem,a),i.updateConversionResult(a,n))}}function Lc(e,t=null){const o=null===t||(e=>e.getAttribute(t)),n="object"!=typeof e.model?e.model:e.model.key,i="object"!=typeof e.model||void 0===e.model.value?o:e.model.value;e.model={key:n,value:i}}function Hc(e,t){const o=new Hr(e.view);return(n,i,r)=>{if(!i.modelRange&&t)return;const s=o.match(i.viewItem);if(!s)return;if(!function(e,t){const o="function"==typeof e?e(t):e;if("object"==typeof o&&!Oc(o))return!1;return!o.classes&&!o.attributes&&!o.styles}(e.view,i.viewItem)?delete s.match.name:s.match.name=!0,!r.consumable.test(i.viewItem,s.match))return;const a=e.model.key,l="function"==typeof e.model.value?e.model.value(i.viewItem,r):e.model.value;if(null===l)return;i.modelRange||Object.assign(i,r.convertChildren(i.viewItem,i.modelCursor));const c=function(e,t,o,n){let i=!1;for(const r of Array.from(e.getItems({shallow:o})))n.schema.checkAttribute(r,t.key)&&(i=!0,r.hasAttribute(t.key)||n.writer.setAttribute(t.key,t.value,r));return i}(i.modelRange,{key:a,value:l},t,r);c&&(r.consumable.test(i.viewItem,{name:!0})&&(s.match.name=!0),r.consumable.consume(i.viewItem,s.match))}}function jc(e,t){return{view:`${e.view}-${t}`,model:(t,o)=>{const n=t.getAttribute("name"),i=e.model(n,o);return o.writer.createElement("$marker",{"data-name":i})}}}function qc(e){e.document.registerPostFixer((t=>function(e,t){const o=t.document.selection,n=t.schema,i=[];let r=!1;for(const e of o.getRanges()){const t=Uc(e,n);t&&!t.isEqual(e)?(i.push(t),r=!0):i.push(e)}r&&e.setSelection(function(e){const t=[...e],o=new Set;let n=1;for(;n!o.has(t)))}(i),{backward:o.isBackward});return!1}(t,e)))}function Uc(e,t){return e.isCollapsed?function(e,t){const o=e.start,n=t.getNearestSelectionRange(o);if(!n){const e=o.getAncestors().reverse().find((e=>t.isObject(e)));return e?Zl._createOn(e):null}if(!n.isCollapsed)return n;const i=n.start;if(o.isEqual(i))return null;return new Zl(i)}(e,t):function(e,t){const{start:o,end:n}=e,i=t.checkChild(o,"$text"),r=t.checkChild(n,"$text"),s=t.getLimitElement(o),a=t.getLimitElement(n);if(s===a){if(i&&r)return null;if(function(e,t,o){const n=e.nodeAfter&&!o.isLimit(e.nodeAfter)||o.checkChild(e,"$text"),i=t.nodeBefore&&!o.isLimit(t.nodeBefore)||o.checkChild(t,"$text");return n||i}(o,n,t)){const e=o.nodeAfter&&t.isSelectable(o.nodeAfter)?null:t.getNearestSelectionRange(o,"forward"),i=n.nodeBefore&&t.isSelectable(n.nodeBefore)?null:t.getNearestSelectionRange(n,"backward"),r=e?e.start:o,s=i?i.end:n;return new Zl(r,s)}}const l=s&&!s.is("rootElement"),c=a&&!a.is("rootElement");if(l||c){const e=o.nodeAfter&&n.nodeBefore&&o.nodeAfter.parent===n.nodeBefore.parent,i=l&&(!e||!$c(o.nodeAfter,t)),r=c&&(!e||!$c(n.nodeBefore,t));let d=o,u=n;return i&&(d=ql._createBefore(Wc(s,t))),r&&(u=ql._createAfter(Wc(a,t))),new Zl(d,u)}return null}(e,t)}function Wc(e,t){let o=e,n=o;for(;t.isLimit(n)&&n.parent;)o=n,n=n.parent;return o}function $c(e,t){return e&&t.isSelectable(e)}class Gc extends(Y()){constructor(e,t){super(),this.model=e,this.view=new Ml(t),this.mapper=new Jl,this.downcastDispatcher=new Xl({mapper:this.mapper,schema:e.schema});const o=this.model.document,n=o.selection,i=this.model.markers;var s,a,l;this.listenTo(this.model,"_beforeChanges",(()=>{this.view._disableRendering(!0)}),{priority:"highest"}),this.listenTo(this.model,"_afterChanges",(()=>{this.view._disableRendering(!1)}),{priority:"lowest"}),this.listenTo(o,"change",(()=>{this.view.change((e=>{this.downcastDispatcher.convertChanges(o.differ,i,e),this.downcastDispatcher.convertSelection(n,i,e)}))}),{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,t){return(o,n)=>{const i=n.newSelection,r=[];for(const e of i.getRanges())r.push(t.toModelRange(e));const s=e.createSelection(r,{backward:i.isBackward});s.isEqual(e.document.selection)||e.change((e=>{e.setSelection(s)}))}}(this.model,this.mapper)),this.listenTo(this.view.document,"beforeinput",(s=this.mapper,a=this.model.schema,l=this.view,(e,t)=>{if(!l.document.isComposing||r.isAndroid)for(let e=0;e{if(!o.consumable.consume(t.item,e.name))return;const n=o.writer,i=o.mapper.toViewPosition(t.range.start),r=n.createText(t.item.data);n.insert(i,r)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,o)=>{o.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||o.convertChildren(t.item)}),{priority:"lowest"}),this.downcastDispatcher.on("remove",((e,t,o)=>{const n=o.mapper.toViewPosition(t.position),i=t.position.getShiftedBy(t.length),r=o.mapper.toViewPosition(i,{isPhantom:!0}),s=o.writer.createRange(n,r),a=o.writer.remove(s.getTrimmed());for(const e of o.writer.createRangeIn(a).getItems())o.mapper.unbindViewElement(e,{defer:!0})}),{priority:"low"}),this.downcastDispatcher.on("cleanSelection",((e,t,o)=>{const n=o.writer,i=n.document.selection;for(const e of i.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&o.writer.mergeAttributes(e.start);n.setSelection(null)})),this.downcastDispatcher.on("selection",((e,t,o)=>{const n=t.selection;if(n.isCollapsed)return;if(!o.consumable.consume(n,"selection"))return;const i=[];for(const e of n.getRanges())i.push(o.mapper.toViewRange(e));o.writer.setSelection(i,{backward:n.isBackward})}),{priority:"low"}),this.downcastDispatcher.on("selection",((e,t,o)=>{const n=t.selection;if(!n.isCollapsed)return;if(!o.consumable.consume(n,"selection"))return;const i=o.writer,r=n.getFirstPosition(),s=o.mapper.toViewPosition(r),a=i.breakAttributes(s);i.setSelection(a)}),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using((e=>{if("$graveyard"==e.rootName)return null;const t=new Ds(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t}))}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){const t="string"==typeof e?e:e.name,o=this.model.markers.get(t);if(!o)throw new E("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:t});this.model.change((()=>{this.model.markers._refresh(o)}))}reconvertItem(e){this.model.change((()=>{this.model.document.differ._refreshItem(e)}))}}class Kc{constructor(){this._consumables=new Map}add(e,t){let o;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?o=this._consumables.get(e):(o=new Jc(e),this._consumables.set(e,o)),o.add(t))}test(e,t){const o=this._consumables.get(e);return void 0===o?null:e.is("$text")||e.is("documentFragment")?o:o.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const o=this._consumables.get(e);void 0!==o&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):o.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},o=e.getAttributeKeys();for(const e of o)"style"!=e&&"class"!=e&&t.attributes.push(e);const n=e.getClassNames();for(const e of n)t.classes.push(e);const i=e.getStyleNames();for(const e of i)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new Kc),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,Kc.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const o of e.getChildren())t=Kc.createFrom(o,t);return t}}const Zc=["attributes","classes","styles"];class Jc{constructor(e){this.element=e,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t of Zc)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t of Zc)if(t in e){const o=this._test(t,e[t]);if(!0!==o)return o}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t of Zc)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t of Zc)t in e&&this._revert(t,e[t])}_add(e,t){const o=xi(t),n=this._consumables[e];for(const t of o){if("attributes"===e&&("class"===t||"style"===t))throw new E("viewconsumable-invalid-attribute",this);if(n.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))n.set(e,!0)}}_test(e,t){const o=xi(t),n=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){const e=n.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",o=this._test(e,[...this._consumables[e].keys()]);if(!0!==o)return o}return!0}_consume(e,t){const o=xi(t),n=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){if(n.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))n.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const o=xi(t),n=this._consumables[e];for(const t of o)if("attributes"!==e||"class"!==t&&"style"!==t){!1===n.get(t)&&n.set(t,!0)}else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}class Yc extends(Y()){constructor(){super(),this._sourceDefinitions={},this._attributeProperties={},this._customChildChecks=new Map,this._customAttributeChecks=new Map,this._genericCheckSymbol=Symbol("$generic"),this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",((e,t)=>{t[0]=new Qc(t[0])}),{priority:"highest"}),this.on("checkChild",((e,t)=>{t[0]=new Qc(t[0]),t[1]=this.getDefinition(t[1])}),{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new E("schema-cannot-register-item-twice",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new E("schema-cannot-extend-missing-item",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:"is"in e&&(e.is("$text")||e.is("$textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!!t&&!(!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!!t&&!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}isSelectable(e){const t=this.getDefinition(e);return!!t&&!(!t.isSelectable&&!t.isObject)}isContent(e){const t=this.getDefinition(e);return!!t&&!(!t.isContent&&!t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(e,t)}checkAttribute(e,t){const o=this.getDefinition(e.last);if(!o)return!1;const n=this._evaluateAttributeChecks(e,t);return void 0!==n?n:o.allowAttributes.includes(t)}checkMerge(e,t){if(e instanceof ql){const t=e.nodeBefore,o=e.nodeAfter;if(!(t instanceof Ll))throw new E("schema-check-merge-no-element-before",this);if(!(o instanceof Ll))throw new E("schema-check-merge-no-element-after",this);return this.checkMerge(t,o)}if(this.isLimit(e)||this.isLimit(t))return!1;for(const o of t.getChildren())if(!this.checkChild(e,o))return!1;return!0}addChildCheck(e,t){const o=void 0!==t?t:this._genericCheckSymbol,n=this._customChildChecks.get(o)||[];n.push(e),this._customChildChecks.set(o,n)}addAttributeCheck(e,t){const o=void 0!==t?t:this._genericCheckSymbol,n=this._customAttributeChecks.get(o)||[];n.push(e),this._customAttributeChecks.set(o,n)}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;if(e instanceof ql)t=e.parent;else{t=(e instanceof Zl?[e]:Array.from(e.getRanges())).reduce(((e,t)=>{const o=t.getCommonAncestor();return e?e.getCommonAncestor(o,{includeSelf:!0}):o}),null)}for(;!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const o=[...e.getFirstPosition().getAncestors(),new Ol("",e.getAttributes())];return this.checkAttribute(o,t)}{const o=e.getRanges();for(const e of o)for(const o of e)if(this.checkAttribute(o.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const o of e)yield*this._getValidRangesForRange(o,t)}getNearestSelectionRange(e,t="both"){if("$graveyard"==e.root.rootName)return null;if(this.checkChild(e,"$text"))return new Zl(e);let o,n;const i=e.getAncestors().reverse().find((e=>this.isLimit(e)))||e.root;"both"!=t&&"backward"!=t||(o=new Hl({boundaries:Zl._createIn(i),startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(n=new Hl({boundaries:Zl._createIn(i),startPosition:e}));for(const e of function*(e,t){let o=!1;for(;!o;){if(o=!0,e){const t=e.next();t.done||(o=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(o=!1,yield{walker:t,value:e.value})}}}(o,n)){const t=e.walker==o?"elementEnd":"elementStart",n=e.value;if(n.type==t&&this.isObject(n.item))return Zl._createOn(n.item);if(this.checkChild(n.nextPosition,"$text"))return new Zl(n.nextPosition)}return null}findAllowedParent(e,t){let o=e.parent;for(;o;){if(this.checkChild(o,t))return o;if(this.isLimit(o))return null;o=o.parent}return null}setAllowedAttributes(e,t,o){const n=o.model;for(const[i,r]of Object.entries(t))n.schema.checkAttribute(e,i)&&o.setAttribute(i,r,e)}removeDisallowedAttributes(e,t){for(const o of e)if(o.is("$text"))ud(this,o,t);else{const e=Zl._createIn(o).getPositions();for(const o of e){ud(this,o.nodeBefore||o.parent,t)}}}getAttributesWithProperty(e,t,o){const n={};for(const[i,r]of e.getAttributes()){const e=this.getAttributeProperties(i);void 0!==e[t]&&(void 0!==o&&o!==e[t]||(n[i]=r))}return n}createContext(e){return new Qc(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,o=Object.keys(t);for(const n of o)e[n]=Xc(t[n],n);const n=Object.values(e);for(const t of n)ed(e,t),td(e,t),od(e,t),nd(e,t);for(const t of n)id(e,t);for(const t of n)rd(e,t);for(const t of n)sd(e,t);for(const t of n)ad(e,t);for(const t of n)ld(e,t);this._compiledDefinitions=function(e){const t={};for(const o of Object.values(e))t[o.name]={name:o.name,isBlock:!!o.isBlock,isContent:!!o.isContent,isInline:!!o.isInline,isLimit:!!o.isLimit,isObject:!!o.isObject,isSelectable:!!o.isSelectable,allowIn:Array.from(o.allowIn).filter((t=>!!e[t])),allowChildren:Array.from(o.allowChildren).filter((t=>!!e[t])),allowAttributes:Array.from(o.allowAttributes)};return t}(e)}_checkContextMatch(e,t){const o=e.last;let n=this._evaluateChildChecks(e,t);if(n=void 0!==n?n:t.allowIn.includes(o.name),!n)return!1;const i=this.getDefinition(o),r=e.trimLast();return!!i&&(0==r.length||this._checkContextMatch(r,i))}_evaluateChildChecks(e,t){const o=this._customChildChecks.get(this._genericCheckSymbol)||[],n=this._customChildChecks.get(t.name)||[];for(const i of[...o,...n]){const o=i(e,t);if(void 0!==o)return o}}_evaluateAttributeChecks(e,t){const o=this._customAttributeChecks.get(this._genericCheckSymbol)||[],n=this._customAttributeChecks.get(t)||[];for(const i of[...o,...n]){const o=i(e,t);if(void 0!==o)return o}}*_getValidRangesForRange(e,t){let o=e.start,n=e.start;for(const i of e.getItems({shallow:!0}))i.is("element")&&(yield*this._getValidRangesForRange(Zl._createIn(i),t)),this.checkAttribute(i,t)||(o.isEqual(n)||(yield new Zl(o,n)),o=ql._createAfter(i)),n=ql._createAfter(i);o.isEqual(n)||(yield new Zl(o,n))}findOptimalInsertionRange(e,t){const o=e.getSelectedElement();if(o&&this.isObject(o)&&!this.isInline(o))return"before"==t||"after"==t?new Zl(ql._createAt(o,t)):Zl._createOn(o);const n=Qi(e.getSelectedBlocks());if(!n)return new Zl(e.focus);if(n.isEmpty)return new Zl(ql._createAt(n,0));const i=ql._createAfter(n);return e.focus.isTouching(i)?new Zl(i):new Zl(ql._createBefore(n))}}class Qc{constructor(e){if(e instanceof Qc)return e;let t;t="string"==typeof e?[e]:Array.isArray(e)?e:e.getAncestors({includeSelf:!0}),this._items=t.map(dd)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new Qc([e]);return t._items=[...this._items,...t._items],t}trimLast(){const e=new Qc([]);return e._items=this._items.slice(0,-1),e}getItem(e){return this._items[e]}*getNames(){yield*this._items.map((e=>e.name))}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function Xc(e,t){const o={name:t,allowIn:new Set,allowChildren:new Set,disallowIn:new Set,disallowChildren:new Set,allowContentOf:new Set,allowWhere:new Set,allowAttributes:new Set,disallowAttributes:new Set,allowAttributesOf:new Set,inheritTypesFrom:new Set};return function(e,t){for(const o of e){const e=Object.keys(o).filter((e=>e.startsWith("is")));for(const n of e)t[n]=!!o[n]}}(e,o),cd(e,o,"allowIn"),cd(e,o,"allowChildren"),cd(e,o,"disallowIn"),cd(e,o,"disallowChildren"),cd(e,o,"allowContentOf"),cd(e,o,"allowWhere"),cd(e,o,"allowAttributes"),cd(e,o,"disallowAttributes"),cd(e,o,"allowAttributesOf"),cd(e,o,"inheritTypesFrom"),function(e,t){for(const o of e){const e=o.inheritAllFrom;e&&(t.allowContentOf.add(e),t.allowWhere.add(e),t.allowAttributesOf.add(e),t.inheritTypesFrom.add(e))}}(e,o),o}function ed(e,t){for(const o of t.allowIn){const n=e[o];n?n.allowChildren.add(t.name):t.allowIn.delete(o)}}function td(e,t){for(const o of t.allowChildren){const n=e[o];n?n.allowIn.add(t.name):t.allowChildren.delete(o)}}function od(e,t){for(const o of t.disallowIn){const n=e[o];n?n.disallowChildren.add(t.name):t.disallowIn.delete(o)}}function nd(e,t){for(const o of t.disallowChildren){const n=e[o];n?n.disallowIn.add(t.name):t.disallowChildren.delete(o)}}function id(e,t){for(const e of t.disallowChildren)t.allowChildren.delete(e);for(const e of t.disallowIn)t.allowIn.delete(e);for(const e of t.disallowAttributes)t.allowAttributes.delete(e)}function rd(e,t){for(const o of t.allowContentOf){const n=e[o];n&&(n.disallowChildren.forEach((o=>{t.allowChildren.has(o)||(t.disallowChildren.add(o),e[o].disallowIn.add(t.name))})),n.allowChildren.forEach((o=>{t.disallowChildren.has(o)||(t.allowChildren.add(o),e[o].allowIn.add(t.name))})))}}function sd(e,t){for(const o of t.allowWhere){const n=e[o];n&&(n.disallowIn.forEach((o=>{t.allowIn.has(o)||(t.disallowIn.add(o),e[o].disallowChildren.add(t.name))})),n.allowIn.forEach((o=>{t.disallowIn.has(o)||(t.allowIn.add(o),e[o].allowChildren.add(t.name))})))}}function ad(e,t){for(const o of t.allowAttributesOf){const n=e[o];if(!n)return;n.allowAttributes.forEach((e=>{t.disallowAttributes.has(e)||t.allowAttributes.add(e)}))}}function ld(e,t){for(const o of t.inheritTypesFrom){const n=e[o];if(n){const e=Object.keys(n).filter((e=>e.startsWith("is")));for(const o of e)o in t||(t[o]=n[o])}}}function cd(e,t,o){for(const n of e){let e=n[o];"string"==typeof e&&(e=[e]),Array.isArray(e)&&e.forEach((e=>t[o].add(e)))}}function dd(e){return"string"==typeof e||e.is("documentFragment")?{name:"string"==typeof e?e:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}function ud(e,t,o){for(const n of t.getAttributeKeys())e.checkAttribute(t,n)||o.removeAttribute(n,t)}class hd extends(z()){constructor(e){super(),this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi={...e,consumable:null,writer:null,store:null,convertItem:(e,t)=>this._convertItem(e,t),convertChildren:(e,t)=>this._convertChildren(e,t),safeInsert:(e,t)=>this._safeInsert(e,t),updateConversionResult:(e,t)=>this._updateConversionResult(e,t),splitToAllowedParent:(e,t)=>this._splitToAllowedParent(e,t),getSplitParts:e=>this._getSplitParts(e),keepEmptyElement:e=>this._keepEmptyElement(e)}}convert(e,t,o=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let o;for(const n of new Qc(e)){const e={};for(const t of n.getAttributeKeys())e[t]=n.getAttribute(t);const i=t.createElement(n.name,e);o&&t.insert(i,o),o=ql._createAt(i,0)}return o}(o,t),this.conversionApi.writer=t,this.conversionApi.consumable=Kc.createFrom(e),this.conversionApi.store={};const{modelRange:n}=this._convertItem(e,this._modelCursor),i=t.createDocumentFragment();if(n){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,i);i.markers=function(e,t){const o=new Set,n=new Map,i=Zl._createIn(e).getItems();for(const e of i)e.is("element","$marker")&&o.add(e);for(const e of o){const o=e.getAttribute("data-name"),i=t.createPositionBefore(e);n.has(o)?n.get(o).end=i.clone():n.set(o,new Zl(i.clone())),t.remove(e)}return n}(i,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,i}_convertItem(e,t){const o={viewItem:e,modelCursor:t,modelRange:null};if(e.is("element")?this.fire(`element:${e.name}`,o,this.conversionApi):e.is("$text")?this.fire("text",o,this.conversionApi):this.fire("documentFragment",o,this.conversionApi),o.modelRange&&!(o.modelRange instanceof Zl))throw new E("view-conversion-dispatcher-incorrect-result",this);return{modelRange:o.modelRange,modelCursor:o.modelCursor}}_convertChildren(e,t){let o=t.is("position")?t:ql._createAt(t,0);const n=new Zl(o);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,o);e.modelRange instanceof Zl&&(n.end=e.modelRange.end,o=e.modelCursor)}return{modelRange:n,modelCursor:o}}_safeInsert(e,t){const o=this._splitToAllowedParent(e,t);return!!o&&(this.conversionApi.writer.insert(e,o.position),!0)}_updateConversionResult(e,t){const o=this._getSplitParts(e),n=this.conversionApi.writer;t.modelRange||(t.modelRange=n.createRange(n.createPositionBefore(e),n.createPositionAfter(o[o.length-1])));const i=this._cursorParents.get(e);t.modelCursor=i?n.createPositionAt(i,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:o,writer:n}=this.conversionApi;let i=o.findAllowedParent(t,e);if(i){if(i===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(i)&&(i=null)}if(!i)return Mc(t,e,o)?{position:Rc(t,n)}:null;const r=this.conversionApi.writer.split(t,i),s=[];for(const e of r.range.getWalker())if("elementEnd"==e.type)s.push(e.item);else{const t=s.pop(),o=e.item;this._registerSplitPair(t,o)}const a=r.range.end.parent;return this._cursorParents.set(e,a),{position:r.position,cursorParent:a}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const o=this._splitParts.get(e);this._splitParts.set(t,o),o.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&!this._emptyElementsToKeep.has(t)&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}class md{getHtml(e){const o=t.document.implementation.createHTMLDocument("").createElement("div");return o.appendChild(e),o.innerHTML}}class pd{constructor(e){this.skipComments=!0,this.domParser=new DOMParser,this.domConverter=new Pa(e,{renderingMode:"data"}),this.htmlWriter=new md}toData(e){const t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t,{skipComments:this.skipComments})}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(e=`${e}`);const t=this.domParser.parseFromString(e,"text/html"),o=t.createDocumentFragment(),n=t.body.childNodes;for(;n.length>0;)o.appendChild(n[0]);return o}}class gd extends(z()){constructor(e,t){super(),this.model=e,this.mapper=new Jl,this.downcastDispatcher=new Xl({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",((e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const n=o.writer,i=o.mapper.toViewPosition(t.range.start),r=n.createText(t.item.data);n.insert(i,r)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((e,t,o)=>{o.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||o.convertChildren(t.item)}),{priority:"lowest"}),this.upcastDispatcher=new hd({schema:e.schema}),this.viewDocument=new Hs(t),this.stylesProcessor=t,this.htmlProcessor=new pd(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new ea(this.viewDocument),this.upcastDispatcher.on("text",((e,t,{schema:o,consumable:n,writer:i})=>{let r=t.modelCursor;if(!n.test(t.viewItem))return;if(!o.checkChild(r,"$text")){if(!Mc(r,"$text",o))return;if(0==t.viewItem.data.trim().length)return;r=Rc(r,i)}n.consume(t.viewItem);const s=i.createText(t.viewItem.data);i.insert(s,r),t.modelRange=i.createRange(r,r.getShiftedBy(s.offsetSize)),t.modelCursor=t.modelRange.end}),{priority:"lowest"}),this.upcastDispatcher.on("element",((e,t,o)=>{if(!t.modelRange&&o.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:n}=o.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=n}}),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",((e,t,o)=>{if(!t.modelRange&&o.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:n}=o.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=n}}),{priority:"lowest"}),Y().prototype.decorate.call(this,"init"),Y().prototype.decorate.call(this,"set"),Y().prototype.decorate.call(this,"get"),Y().prototype.decorate.call(this,"toView"),Y().prototype.decorate.call(this,"toModel"),this.on("init",(()=>{this.fire("ready")}),{priority:"lowest"}),this.on("ready",(()=>{this.model.enqueueChange({isUndoable:!1},Fc)}),{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:o="empty"}=e;if(!this._checkIfRootsExists([t]))throw new E("datacontroller-get-non-existent-root",this);const n=this.model.document.getRoot(t);return n.isAttached()||D("datacontroller-get-detached-root",this),"empty"!==o||this.model.hasContent(n,{ignoreWhitespaces:!0})?this.stringify(n,e):""}stringify(e,t={}){const o=this.toView(e,t);return this.processor.toData(o)}toView(e,t={}){const o=this.viewDocument,n=this._viewWriter;this.mapper.clearBindings();const i=Zl._createIn(e),r=new Xs(o);this.mapper.bindElements(e,r);const s=e.is("documentFragment")?e.markers:function(e){const t=[],o=e.root.document;if(!o)return new Map;const n=Zl._createIn(e);for(const e of o.model.markers){const o=e.getRange(),i=o.isCollapsed,r=o.start.isEqual(n.start)||o.end.isEqual(n.end);if(i&&r)t.push([e.name,o]);else{const i=n.getIntersection(o);i&&t.push([e.name,i])}}return t.sort((([e,t],[o,n])=>{if("after"!==t.end.compareWith(n.start))return 1;if("before"!==t.start.compareWith(n.end))return-1;switch(t.start.compareWith(n.start)){case"before":return 1;case"after":return-1;default:switch(t.end.compareWith(n.end)){case"before":return 1;case"after":return-1;default:return o.localeCompare(e)}}})),new Map(t)}(e);return this.downcastDispatcher.convert(i,s,n,t),r}init(e){if(this.model.document.version)throw new E("datacontroller-init-document-not-empty",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new E("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},(e=>{for(const o of Object.keys(t)){const n=this.model.document.getRoot(o);e.insert(this.parse(t[o],n),n,0)}})),Promise.resolve()}set(e,t={}){let o={};if("string"==typeof e?o.main=e:o=e,!this._checkIfRootsExists(Object.keys(o)))throw new E("datacontroller-set-non-existent-root",this);this.model.enqueueChange(t.batchType||{},(e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const t of Object.keys(o)){const n=this.model.document.getRoot(t);e.remove(e.createRangeIn(n)),e.insert(this.parse(o[t],n),n,0)}}))}parse(e,t="$root"){const o=this.processor.toView(e);return this.toModel(o,t)}toModel(e,t="$root"){return this.model.change((o=>this.upcastDispatcher.convert(e,o,t)))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRoot(t))return!1;return!0}}class fd{constructor(e,t){this._helpers=new Map,this._downcast=xi(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=xi(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const o=this._downcast.includes(t);if(!this._upcast.includes(t)&&!o)throw new E("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:o})}for(e){if(!this._helpers.has(e))throw new E("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:o}of bd(e))this.for("upcast").elementToElement({model:t,view:o,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:o}of bd(e))this.for("upcast").elementToAttribute({view:o,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:o}of bd(e))this.for("upcast").attributeToAttribute({view:o,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:o}){if(this._helpers.has(e))throw new E("conversion-group-exists",this);const n=o?new bc(t):new zc(t);this._helpers.set(e,n)}}function*bd(e){if(e.model.values)for(const t of e.model.values){const o={key:e.model.key,value:t},n=e.view[t],i=e.upcastAlso?e.upcastAlso[t]:void 0;yield*kd(o,n,i)}else yield*kd(e.model,e.view,e.upcastAlso)}function*kd(e,t,o){if(yield{model:e,view:t},o)for(const t of xi(o))yield{model:e,view:t}}class wd{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e,t){return new this(e.baseVersion)}}function _d(e,t){const o=Cd(t),n=o.reduce(((e,t)=>e+t.offsetSize),0),i=e.parent;xd(e);const r=e.index;return i._insertChild(r,o),vd(i,r+o.length),vd(i,r),new Zl(e,e.getShiftedBy(n))}function yd(e){if(!e.isFlat)throw new E("operation-utils-remove-range-not-flat",this);const t=e.start.parent;xd(e.start),xd(e.end);const o=t._removeChildren(e.start.index,e.end.index-e.start.index);return vd(t,e.start.index),o}function Ad(e,t){if(!e.isFlat)throw new E("operation-utils-move-range-not-flat",this);const o=yd(e);return _d(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),o)}function Cd(e){const t=[];!function e(o){if("string"==typeof o)t.push(new Ol(o));else if(o instanceof Nl)t.push(new Ol(o.data,o.getAttributes()));else if(o instanceof zl)t.push(o);else if(re(o))for(const t of o)e(t);else{}}(e);for(let e=1;ee.maxOffset)throw new E("move-operation-nodes-do-not-exist",this);if(e===t&&o=o&&this.targetPosition.path[e]e._clone(!0)))),t=new Bd(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new ql(e,[0]);return new Dd(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffsete._clone(!0)))),_d(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const o=[];for(const t of e.nodes)t.name?o.push(Ll.fromJSON(t)):o.push(Ol.fromJSON(t));const n=new Bd(ql.fromJSON(e.position,t),o,e.baseVersion);return n.shouldReceiveAttributes=e.shouldReceiveAttributes,n}}class Sd extends wd{constructor(e,t,o,n,i){super(i),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=o,this.graveyardPosition=n?n.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new ql(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Zl(this.splitPosition,e)}get affectedSelectable(){const e=[Zl._createFromPositionAndShift(this.splitPosition,0),Zl._createFromPositionAndShift(this.insertionPosition,0)];return this.graveyardPosition&&e.push(Zl._createFromPositionAndShift(this.graveyardPosition,0)),e}clone(){return new Sd(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new ql(e,[0]);return new Td(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset0&&(e.sourcePosition.isEqual(t.sourcePosition.getShiftedBy(t.howMany))&&this._setRelation(e,t,"mergeSourceAffected"),e.targetPosition.isEqual(t.sourcePosition)&&this._setRelation(e,t,"mergeTargetWasBefore"));else if(e instanceof Id){const o=e.newRange;if(!o)return;if(t instanceof Dd){const n=Zl._createFromPositionAndShift(t.sourcePosition,t.howMany),i=n.containsPosition(o.start)||n.start.isEqual(o.start),r=n.containsPosition(o.end)||n.end.isEqual(o.end);!i&&!r||n.containsRange(o)||this._setRelation(e,t,{side:i?"left":"right",path:i?o.start.path.slice():o.end.path.slice()})}else if(t instanceof Td){const n=o.start.isEqual(t.targetPosition),i=o.start.isEqual(t.deletionPosition),r=o.end.isEqual(t.deletionPosition),s=o.end.isEqual(t.sourcePosition);(n||i||r||s)&&this._setRelation(e,t,{wasInLeftElement:n,wasStartBeforeMergedElement:i,wasEndBeforeMergedElement:r,wasInRightElement:s})}}}getContext(e,t,o){return{aIsStrong:o,aWasUndone:this._wasUndone(e),bWasUndone:this._wasUndone(t),abRelation:this._useRelations?this._getRelation(e,t):null,baRelation:this._useRelations?this._getRelation(t,e):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(e){const t=this.originalOperations.get(e);return t.wasUndone||this._history.isUndoneOperation(t)}_getRelation(e,t){const o=this.originalOperations.get(t),n=this._history.getUndoneOperation(o);if(!n)return null;const i=this.originalOperations.get(e),r=this._relations.get(i);return r&&r.get(n)||null}_setRelation(e,t,o){const n=this.originalOperations.get(e),i=this.originalOperations.get(t);let r=this._relations.get(n);r||(r=new Map,this._relations.set(n,r)),r.set(i,o)}}function $d(e,t){for(const o of e)o.baseVersion=t++}function Gd(e,t){for(let o=0;o{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const n=e.range.getDifference(t.range).map((t=>new Fd(t,e.key,e.oldValue,e.newValue,0))),i=e.range.getIntersection(t.range);return i&&o.aIsStrong&&n.push(new Fd(i,t.key,t.newValue,e.newValue,0)),0==n.length?[new Md(0)]:n}return[e]})),Hd(Fd,Bd,((e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const o=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map((t=>new Fd(t,e.key,e.oldValue,e.newValue,e.baseVersion)));if(t.shouldReceiveAttributes){const n=Kd(t,e.key,e.oldValue);n&&o.unshift(n)}return o}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]})),Hd(Fd,Td,((e,t)=>{const o=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&o.push(Zl._createFromPositionAndShift(t.graveyardPosition,1));const n=e.range._getTransformedByMergeOperation(t);return n.isCollapsed||o.push(n),o.map((t=>new Fd(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),Hd(Fd,Dd,((e,t)=>{const o=function(e,t){const o=Zl._createFromPositionAndShift(t.sourcePosition,t.howMany);let n=null,i=[];o.containsRange(e,!0)?n=e:e.start.hasSameParentAs(o.start)?(i=e.getDifference(o),n=e.getIntersection(o)):i=[e];const r=[];for(let e of i){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const o=t.getMovedRangeStart(),n=e.start.hasSameParentAs(o),i=e._getTransformedByInsertion(o,t.howMany,n);r.push(...i)}n&&r.push(n._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]);return r}(e.range,t);return o.map((t=>new Fd(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),Hd(Fd,Sd,((e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const o=e.clone();return o.range=new Zl(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,o]}return e.range=e.range._getTransformedBySplitOperation(t),[e]})),Hd(Bd,Fd,((e,t)=>{const o=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const n=Kd(e,t.key,t.newValue);n&&o.push(n)}return o})),Hd(Bd,Bd,((e,t,o)=>(e.position.isEqual(t.position)&&o.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e]))),Hd(Bd,Dd,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),Hd(Bd,Sd,((e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e]))),Hd(Bd,Td,((e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e]))),Hd(Id,Bd,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e]))),Hd(Id,Id,((e,t,o)=>{if(e.name==t.name){if(!o.aIsStrong)return[new Md(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]})),Hd(Id,Td,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e]))),Hd(Id,Dd,((e,t,o)=>{if(e.oldRange&&(e.oldRange=Zl._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(o.abRelation){const n=Zl._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==o.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.end=n.end,e.newRange.start.path=o.abRelation.path,[e];if("right"==o.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=n.start,e.newRange.end.path=o.abRelation.path,[e]}e.newRange=Zl._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]})),Hd(Id,Sd,((e,t,o)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(o.abRelation){const n=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&o.abRelation.wasStartBeforeMergedElement?e.newRange.start=ql._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!o.abRelation.wasInLeftElement&&(e.newRange.start=ql._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&o.abRelation.wasInRightElement?e.newRange.end=ql._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&o.abRelation.wasEndBeforeMergedElement?e.newRange.end=ql._createAt(t.insertionPosition):e.newRange.end=n.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]})),Hd(Td,Bd,((e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e]))),Hd(Td,Td,((e,t,o)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(o.bWasUndone){const o=t.graveyardPosition.path.slice();return o.push(0),e.sourcePosition=new ql(t.graveyardPosition.root,o),e.howMany=0,[e]}return[new Md(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!o.bWasUndone&&"splitAtSource"!=o.abRelation){const n="$graveyard"==e.targetPosition.root.rootName,i="$graveyard"==t.targetPosition.root.rootName;if(i&&!n||!(n&&!i)&&o.aIsStrong){const o=t.targetPosition._getTransformedByMergeOperation(t),n=e.targetPosition._getTransformedByMergeOperation(t);return[new Dd(o,e.howMany,n,0)]}return[new Md(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&o.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),Hd(Td,Dd,((e,t,o)=>{const n=Zl._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!o.bWasUndone&&!o.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.sourcePosition)?[new Md(0)]:(t.sourcePosition.getShiftedBy(t.howMany).isEqual(e.sourcePosition)?e.sourcePosition.stickiness="toNone":t.targetPosition.isEqual(e.sourcePosition)&&"mergeSourceAffected"==o.abRelation?e.sourcePosition.stickiness="toNext":t.sourcePosition.isEqual(e.targetPosition)?(e.targetPosition.stickiness="toNone",e.howMany-=t.howMany):t.targetPosition.isEqual(e.targetPosition)&&"mergeTargetWasBefore"==o.abRelation?(e.targetPosition.stickiness="toPrevious",e.howMany+=t.howMany):(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany)),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.sourcePosition.stickiness="toPrevious",e.targetPosition.stickiness="toNext",e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])})),Hd(Td,Sd,((e,t,o)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){const n=0!=t.howMany,i=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(n||i||"mergeTargetNotMoved"==o.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==o.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==o.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]})),Hd(Dd,Bd,((e,t)=>{const o=Zl._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=o.start,e.howMany=o.end.offset-o.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]})),Hd(Dd,Dd,((e,t,o)=>{const n=Zl._createFromPositionAndShift(e.sourcePosition,e.howMany),i=Zl._createFromPositionAndShift(t.sourcePosition,t.howMany);let r,s=o.aIsStrong,a=!o.aIsStrong;if("insertBefore"==o.abRelation||"insertAfter"==o.baRelation?a=!0:"insertAfter"!=o.abRelation&&"insertBefore"!=o.baRelation||(a=!1),r=e.targetPosition.isEqual(t.targetPosition)&&a?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Zd(e,t)&&Zd(t,e))return[t.getReversed()];if(n.containsPosition(t.targetPosition)&&n.containsRange(i,!0))return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Jd([n],r);if(i.containsPosition(e.targetPosition)&&i.containsRange(n,!0))return n.start=n.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),n.end=n.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),Jd([n],r);const l=ie(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==l||"extension"==l)return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Jd([n],r);"remove"!=e.type||"remove"==t.type||o.aWasUndone||o.forceWeakRemove?"remove"==e.type||"remove"!=t.type||o.bWasUndone||o.forceWeakRemove||(s=!1):s=!0;const c=[],d=n.getDifference(i);for(const e of d){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const o="same"==ie(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),n=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,o);c.push(...n)}const u=n.getIntersection(i);return null!==u&&s&&(u.start=u.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),u.end=u.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===c.length?c.push(u):1==c.length?i.start.isBefore(n.start)||i.start.isEqual(n.start)?c.unshift(u):c.push(u):c.splice(1,0,u)),0===c.length?[new Md(e.baseVersion)]:Jd(c,r)})),Hd(Dd,Sd,((e,t,o)=>{let n=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=o.abRelation||(n=e.targetPosition._getTransformedBySplitOperation(t));const i=Zl._createFromPositionAndShift(e.sourcePosition,e.howMany);if(i.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=n,[e];if(i.start.hasSameParentAs(t.splitPosition)&&i.containsPosition(t.splitPosition)){let e=new Zl(t.splitPosition,i.end);e=e._getTransformedBySplitOperation(t);return Jd([new Zl(i.start,t.splitPosition),e],n)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==o.abRelation&&(n=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==o.abRelation&&(n=e.targetPosition);const r=[i._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const n=i.start.isEqual(t.graveyardPosition)||i.containsPosition(t.graveyardPosition);e.howMany>1&&n&&!o.aWasUndone&&r.push(Zl._createFromPositionAndShift(t.insertionPosition,1))}return Jd(r,n)})),Hd(Dd,Td,((e,t,o)=>{const n=Zl._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(t.sourcePosition))if("remove"!=e.type||o.forceWeakRemove){if(1==e.howMany)return o.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new Md(0)]}else if(!o.aWasUndone){const o=[];let n=t.graveyardPosition.clone(),i=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(o.push(new Dd(e.sourcePosition,e.howMany-1,e.targetPosition,0)),n=n._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),i=i._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const r=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),s=new Dd(n,1,r,0),a=s.getMovedRangeStart().path.slice();a.push(0);const l=new ql(s.targetPosition.root,a);i=i._getTransformedByMove(n,r,1);const c=new Dd(i,t.howMany,l,0);return o.push(s),o.push(c),o}const i=Zl._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=i.start,e.howMany=i.end.offset-i.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]})),Hd(Rd,Bd,((e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e]))),Hd(Rd,Td,((e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e]))),Hd(Rd,Dd,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),Hd(Rd,Rd,((e,t,o)=>{if(e.position.isEqual(t.position)){if(!o.aIsStrong)return[new Md(0)];e.oldName=t.newName}return[e]})),Hd(Rd,Sd,((e,t)=>{if("same"==ie(e.position.path,t.splitPosition.getParentPath())&&!t.graveyardPosition){const t=new Rd(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]})),Hd(zd,zd,((e,t,o)=>{if(e.root===t.root&&e.key===t.key){if(!o.aIsStrong||e.newValue===t.newValue)return[new Md(0)];e.oldValue=t.newValue}return[e]})),Hd(Vd,Vd,((e,t)=>e.rootName===t.rootName&&e.isAdd===t.isAdd?[new Md(0)]:[e])),Hd(Sd,Bd,((e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset{if(!e.graveyardPosition&&!o.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const o=t.graveyardPosition.path.slice();o.push(0);const n=new ql(t.graveyardPosition.root,o),i=Sd.getInsertionPosition(new ql(t.graveyardPosition.root,o)),r=new Sd(n,0,i,null,0);return e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=Sd.getInsertionPosition(e.splitPosition),e.graveyardPosition=r.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[r,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=Sd.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),Hd(Sd,Dd,((e,t,o)=>{const n=Zl._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const i=n.start.isEqual(e.graveyardPosition)||n.containsPosition(e.graveyardPosition);if(!o.bWasUndone&&i){const o=e.splitPosition._getTransformedByMoveOperation(t),n=e.graveyardPosition._getTransformedByMoveOperation(t),i=n.path.slice();i.push(0);const r=new ql(n.root,i);return[new Dd(o,e.howMany,r,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}const i=e.splitPosition.isEqual(t.targetPosition);if(i&&("insertAtSource"==o.baRelation||"splitBefore"==o.abRelation))return e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=Sd.getInsertionPosition(e.splitPosition),[e];if(i&&o.abRelation&&o.abRelation.howMany){const{howMany:t,offset:n}=o.abRelation;return e.howMany+=t,e.splitPosition=e.splitPosition.getShiftedBy(n),[e]}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.splitPosition)){const o=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=o,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new Md(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new Md(0)];if("splitBefore"==o.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const n="$graveyard"==e.splitPosition.root.rootName,i="$graveyard"==t.splitPosition.root.rootName;if(i&&!n||!(n&&!i)&&o.aIsStrong){const o=[];return t.howMany&&o.push(new Dd(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&o.push(new Dd(e.splitPosition,e.howMany,e.moveTargetPosition,0)),o}return[new Md(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==o.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==o.baRelation){const o=t.insertionPosition.path.slice();o.push(0);const n=new ql(t.insertionPosition.root,o);return[e,new Dd(e.insertionPosition,1,n,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offset{const o=t[0];o.isDocumentOperation&&Xd.call(this,o)}),{priority:"low"})}function Xd(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}Yd.prototype.is=function(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e};class eu{constructor(e={}){"string"==typeof e&&(e="transparent"===e?{isUndoable:!1}:{},D("batch-constructor-deprecated-string-type"));const{isUndoable:t=!0,isLocal:o=!0,isUndo:n=!1,isTyping:i=!1}=e;this.operations=[],this.isUndoable=t,this.isLocal=o,this.isUndo=n,this.isTyping=i}get type(){return D("batch-type-deprecated"),"default"}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}class tu{constructor(e){this._changesInElement=new Map,this._elementsSnapshots=new Map,this._elementChildrenSnapshots=new Map,this._elementState=new Map,this._changedMarkers=new Map,this._changedRoots=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null,this._refreshedItems=new Set,this._markerCollection=e}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size&&0==this._changedRoots.size}bufferOperation(e){const t=e;switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),o=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),o||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);const n=Zl._createFromPositionAndShift(t.sourcePosition,t.howMany);for(const e of n.getItems({shallow:!0}))this._setElementState(e,"move");break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=Zl._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}this._setElementState(t.position.nodeAfter,"rename");break}case"split":{const e=t.splitPosition.parent;if(!this._isInInsertedElement(e)){this._markRemove(e,t.splitPosition.offset,t.howMany);const o=Zl._createFromPositionAndShift(t.splitPosition,t.howMany);for(const e of o.getItems({shallow:!0}))this._setElementState(e,"move")}this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&(this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1),this._setElementState(t.graveyardPosition.nodeAfter,"move"));break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const o=t.graveyardPosition.parent;this._markInsert(o,t.graveyardPosition.offset,1),this._setElementState(e,"move");const n=t.targetPosition.parent;if(!this._isInInsertedElement(n)){this._markInsert(n,t.targetPosition.offset,e.maxOffset);const o=Zl._createFromPositionAndShift(t.sourcePosition,t.howMany);for(const e of o.getItems({shallow:!0}))this._setElementState(e,"move")}break}case"detachRoot":case"addRoot":{const e=t.affectedSelectable;if(!e._isLoaded)return;if(e.isAttached()==t.isAdd)return;this._bufferRootStateChange(t.rootName,t.isAdd);break}case"addRootAttribute":case"removeRootAttribute":case"changeRootAttribute":{if(!t.root._isLoaded)return;const e=t.root.rootName;this._bufferRootAttributeChange(e,t.key,t.oldValue,t.newValue);break}}this._cachedChanges=null}bufferMarkerChange(e,t,o){t.range&&t.range.root.is("rootElement")&&!t.range.root._isLoaded&&(t.range=null),o.range&&o.range.root.is("rootElement")&&!o.range.root._isLoaded&&(o.range=null);let n=this._changedMarkers.get(e);n?n.newMarkerData=o:(n={newMarkerData:o,oldMarkerData:t},this._changedMarkers.set(e,n)),null==n.oldMarkerData.range&&null==o.range&&this._changedMarkers.delete(e)}getMarkersToRemove(){const e=[];for(const[t,o]of this._changedMarkers)null!=o.oldMarkerData.range&&e.push({name:t,range:o.oldMarkerData.range});return e}getMarkersToAdd(){const e=[];for(const[t,o]of this._changedMarkers)null!=o.newMarkerData.range&&e.push({name:t,range:o.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map((([e,t])=>({name:e,data:{oldRange:t.oldMarkerData.range,newRange:t.newMarkerData.range}})))}hasDataChanges(){if(this.getChanges().length)return!0;if(this._changedRoots.size>0)return!0;for(const{newMarkerData:e,oldMarkerData:t}of this._changedMarkers.values()){if(e.affectsData!==t.affectsData)return!0;if(e.affectsData){const o=e.range&&!t.range,n=!e.range&&t.range,i=e.range&&t.range&&!e.range.isEqual(t.range);if(o||n||i)return!0}}return!1}getChanges(e={}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(const e of this._changesInElement.keys()){const o=this._changesInElement.get(e).sort(((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offsete.position.root!=t.position.root?e.position.root.rootNamee));for(const e of t)delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t,this._cachedChanges=t.filter(su),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getChangedRoots(){return Array.from(this._changedRoots.values()).map((e=>{const t={...e};return void 0!==t.state&&delete t.attributes,t}))}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementChildrenSnapshots.clear(),this._elementsSnapshots.clear(),this._elementState.clear(),this._changedMarkers.clear(),this._changedRoots.clear(),this._refreshedItems.clear(),this._cachedChanges=null}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e),this._setElementState(e,"refresh");const t=Zl._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}this._cachedChanges=null}_bufferRootLoad(e){if(e.isAttached()){this._bufferRootStateChange(e.rootName,!0),this._markInsert(e,0,e.maxOffset);for(const t of e.getAttributeKeys())this._bufferRootAttributeChange(e.rootName,t,null,e.getAttribute(t));for(const t of this._markerCollection)if(t.getRange().root==e){const e=t.getData();this.bufferMarkerChange(t.name,{...e,range:null},e)}}}_bufferRootStateChange(e,t){if(!this._changedRoots.has(e))return void this._changedRoots.set(e,{name:e,state:t?"attached":"detached"});const o=this._changedRoots.get(e);void 0!==o.state?(delete o.state,void 0===o.attributes&&this._changedRoots.delete(e)):o.state=t?"attached":"detached"}_bufferRootAttributeChange(e,t,o,n){const i=this._changedRoots.get(e)||{name:e},r=i.attributes||{};if(r[t]){const e=r[t];n===e.oldValue?delete r[t]:e.newValue=n}else r[t]={oldValue:o,newValue:n};0===Object.entries(r).length?(delete i.attributes,void 0===i.state&&this._changedRoots.delete(e)):(i.attributes=r,this._changedRoots.set(e,i))}_markInsert(e,t,o){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const n={type:"insert",offset:t,howMany:o,count:this._changeCount++};this._markChange(e,n)}_markRemove(e,t,o){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const n={type:"remove",offset:t,howMany:o,count:this._changeCount++};this._markChange(e,n),this._removeAllNestedChanges(e,t,o)}_markAttribute(e){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshots(e);const o=this._getChangesForElement(e);this._handleChange(t,o),o.push(t);for(let e=0;eo&&this._elementState.set(e,t)}_getDiffActionForNode(e,t){if(!e.is("element"))return t;if(!this._elementsSnapshots.has(e))return t;const o=this._elementState.get(e);return o&&"move"!=o?o:t}_getChangesForElement(e){let t;return this._changesInElement.has(e)?t=this._changesInElement.get(e):(t=[],this._changesInElement.set(e,t)),t}_makeSnapshots(e){if(this._elementChildrenSnapshots.has(e))return;const t=iu(e.getChildren());this._elementChildrenSnapshots.set(e,t);for(const e of t)this._elementsSnapshots.set(e.node,e)}_handleChange(e,t){e.nodesToHandle=e.howMany;for(const o of t){const n=e.offset+e.howMany,i=o.offset+o.howMany;if("insert"==e.type&&("insert"==o.type&&(e.offset<=o.offset?o.offset+=e.howMany:e.offseto.offset){if(n>i){const e={type:"attribute",offset:i,howMany:n-i,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=o.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=o.offset&&e.offseti?(e.nodesToHandle=n-i,e.offset=i):e.nodesToHandle=0);if("remove"==o.type&&e.offseto.offset){const i={type:"attribute",offset:o.offset,howMany:n-o.offset,count:this._changeCount++};this._handleChange(i,t),t.push(i),e.nodesToHandle=o.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==o.type&&(e.offset>=o.offset&&n<=i?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=o.offset&&n>=i&&(o.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,o,n,i){const r={type:"insert",position:ql._createAt(e,t),name:n.name,attributes:new Map(n.attributes),length:1,changeCount:this._changeCount++,action:o};return"insert"!=o&&i&&(r.before={name:i.name,attributes:new Map(i.attributes)}),r}_getRemoveDiff(e,t,o,n){return{type:"remove",action:o,position:ql._createAt(e,t),name:n.name,attributes:new Map(n.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,o){const n=[];o=new Map(o);for(const[i,r]of t){const t=o.has(i)?o.get(i):null;t!==r&&n.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:i,attributeOldValue:r,attributeNewValue:t,changeCount:this._changeCount++}),o.delete(i)}for(const[t,i]of o)n.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:i,changeCount:this._changeCount++});return n}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const o=this._changesInElement.get(t),n=e.startOffset;if(o)for(const e of o)if("insert"==e.type&&n>=e.offset&&nn){for(let t=0;tthis._version+1&&this._gaps.set(this._version,e),this._version=e}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(e){if(e.baseVersion!==this.version)throw new E("model-document-history-addoperation-incorrect-version",this,{operation:e,historyVersion:this.version});this._operations.push(e),this._version++,this._baseVersionToOperationIndex.set(e.baseVersion,this._operations.length-1)}getOperations(e,t=this.version){if(!this._operations.length)return[];const o=this._operations[0];void 0===e&&(e=o.baseVersion);let n=t-1;for(const[t,o]of this._gaps)e>t&&et&&nthis.lastOperation.baseVersion)return[];let i=this._baseVersionToOperationIndex.get(e);void 0===i&&(i=0);let r=this._baseVersionToOperationIndex.get(n);return void 0===r&&(r=this._operations.length-1),this._operations.slice(i,r+1)}getOperation(e){const t=this._baseVersionToOperationIndex.get(e);if(void 0!==t)return this._operations[t]}setOperationAsUndone(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}class lu extends Ll{constructor(e,t,o="main"){super(t),this._isAttached=!0,this._isLoaded=!0,this._document=e,this.rootName=o}get document(){return this._document}isAttached(){return this._isAttached}toJSON(){return this.rootName}}lu.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e):"rootElement"===e||"model:rootElement"===e||"element"===e||"model:element"===e||"node"===e||"model:node"===e};const cu="$graveyard";class du extends(z()){constructor(e){super(),this.model=e,this.history=new au,this.selection=new mc(this),this.roots=new Yi({idProperty:"rootName"}),this.differ=new ou(e.markers),this.isReadOnly=!1,this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",cu),this.listenTo(e,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&this.differ.bufferOperation(o)}),{priority:"high"}),this.listenTo(e,"applyOperation",((e,t)=>{const o=t[0];o.isDocumentOperation&&this.history.addOperation(o)}),{priority:"low"}),this.listenTo(this.selection,"change",(()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(e.markers,"update",((e,t,o,n,i)=>{const r={...t.getData(),range:n};this.differ.bufferMarkerChange(t.name,i,r),null===o&&t.on("change",((e,o)=>{const n=t.getData();this.differ.bufferMarkerChange(t.name,{...n,range:o},n)}))})),this.registerPostFixer((e=>{let t=!1;for(const o of this.roots)o.isAttached()||o.isEmpty||(e.remove(e.createRangeIn(o)),t=!0);for(const o of this.model.markers)o.getRange().root.isAttached()||(e.removeMarker(o),t=!0);return t}))}get version(){return this.history.version}set version(e){this.history.version=e}get graveyard(){return this.getRoot(cu)}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new E("model-document-createroot-name-exists",this,{name:t});const o=new lu(this,e,t);return this.roots.add(o),o}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(e=!1){return this.getRoots(e).map((e=>e.rootName))}getRoots(e=!1){return this.roots.filter((t=>t!=this.graveyard&&(e||t.isAttached())&&t._isLoaded))}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=Vr(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){const e=this.getRoots();return e.length?e[0]:this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,o=t.schema,n=t.createPositionFromPath(e,[0]);return o.getNearestSelectionRange(n)||t.createRange(n)}_validateSelectionRange(e){return uu(e.start)&&uu(e.end)}_callPostFixers(e){let t=!1;do{for(const o of this._postFixers)if(this.selection.refresh(),t=o(e),t)break}while(t)}}function uu(e){const t=e.textNode;if(t){const o=t.data,n=e.offset-t.startOffset;return!nr(o,n)&&!ir(o,n)}return!0}class hu extends(z()){constructor(){super(...arguments),this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){const t=e instanceof mu?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t,o=!1,n=!1){const i=e instanceof mu?e.name:e;if(i.includes(","))throw new E("markercollection-incorrect-marker-name",this);const r=this._markers.get(i);if(r){const e=r.getData(),s=r.getRange();let a=!1;return s.isEqual(t)||(r._attachLiveRange(cc.fromRange(t)),a=!0),o!=r.managedUsingOperations&&(r._managedUsingOperations=o,a=!0),"boolean"==typeof n&&n!=r.affectsData&&(r._affectsData=n,a=!0),a&&this.fire(`update:${i}`,r,s,t,e),r}const s=cc.fromRange(t),a=new mu(i,s,o,n);return this._markers.set(i,a),this.fire(`update:${i}`,a,null,t,{...a.getData(),range:null}),a}_remove(e){const t=e instanceof mu?e.name:e,o=this._markers.get(t);return!!o&&(this._markers.delete(t),this.fire(`update:${t}`,o,o.getRange(),null,o.getData()),this._destroyMarker(o),!0)}_refresh(e){const t=e instanceof mu?e.name:e,o=this._markers.get(t);if(!o)throw new E("markercollection-refresh-marker-not-exists",this);const n=o.getRange();this.fire(`update:${t}`,o,n,n,o.getData())}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}class mu extends(z(Rl)){constructor(e,t,o,n){super(),this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=o,this._affectsData=n}get managedUsingOperations(){if(!this._liveRange)throw new E("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new E("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new E("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new E("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new E("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}mu.prototype.is=function(e){return"marker"===e||"model:marker"===e};class pu extends wd{constructor(e,t){super(null),this.sourcePosition=e.clone(),this.howMany=t}get type(){return"detach"}get affectedSelectable(){return null}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e}_validate(){if(this.sourcePosition.root.document)throw new E("detach-operation-on-document-node",this)}_execute(){yd(Zl._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class gu extends Rl{constructor(e){super(),this.markers=new Map,this._children=new Vl,e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get nextSibling(){return null}get previousSibling(){return null}get root(){return this}get parent(){return null}get document(){return null}isAttached(){return!1}getAncestors(){return[]}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const o of e)t=t.getChild(t.offsetToIndex(o));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const o of e)o.name?t.push(Ll.fromJSON(o)):t.push(Ol.fromJSON(o));return new gu(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const o=function(e){if("string"==typeof e)return[new Ol(e)];re(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new Ol(e):e instanceof Nl?new Ol(e.data,e.getAttributes()):e))}(t);for(const e of o)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,o)}_removeChildren(e,t=1){const o=this._children._removeNodes(e,t);for(const e of o)e.parent=null;return o}}gu.prototype.is=function(e){return"documentFragment"===e||"model:documentFragment"===e};class fu{constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new Ol(e,t)}createElement(e,t){return new Ll(e,t)}createDocumentFragment(){return new gu}cloneElement(e,t=!0){return e._clone(t)}insert(e,t,o=0){if(this._assertWriterUsedCorrectly(),e instanceof Ol&&""==e.data)return;const n=ql._createAt(t,o);if(e.parent){if(yu(e.root,n.root))return void this.move(Zl._createOn(e),n);if(e.root.document)throw new E("model-writer-insert-forbidden-move",this);this.remove(e)}const i=n.root.document?n.root.document.version:null,r=new Bd(n,e,i);if(e instanceof Ol&&(r.shouldReceiveAttributes=!0),this.batch.addOperation(r),this.model.applyOperation(r),e instanceof gu)for(const[t,o]of e.markers){const e=ql._createAt(o.root,0),i={range:new Zl(o.start._getCombined(e,n),o.end._getCombined(e,n)),usingOperation:!0,affectsData:!0};this.model.markers.has(t)?this.updateMarker(t,i):this.addMarker(t,i)}}insertText(e,t,o,n){t instanceof gu||t instanceof Ll||t instanceof ql?this.insert(this.createText(e),t,o):this.insert(this.createText(e,t),o,n)}insertElement(e,t,o,n){t instanceof gu||t instanceof Ll||t instanceof ql?this.insert(this.createElement(e),t,o):this.insert(this.createElement(e,t),o,n)}append(e,t){this.insert(e,t,"end")}appendText(e,t,o){t instanceof gu||t instanceof Ll?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),o,"end")}appendElement(e,t,o){t instanceof gu||t instanceof Ll?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),o,"end")}setAttribute(e,t,o){if(this._assertWriterUsedCorrectly(),o instanceof Zl){const n=o.getMinimalFlatRanges();for(const o of n)bu(this,e,t,o)}else ku(this,e,t,o)}setAttributes(e,t){for(const[o,n]of tr(e))this.setAttribute(o,n,t)}removeAttribute(e,t){if(this._assertWriterUsedCorrectly(),t instanceof Zl){const o=t.getMinimalFlatRanges();for(const t of o)bu(this,e,null,t)}else ku(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=e=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof Zl)for(const o of e.getItems())t(o);else t(e)}move(e,t,o){if(this._assertWriterUsedCorrectly(),!(e instanceof Zl))throw new E("writer-move-invalid-range",this);if(!e.isFlat)throw new E("writer-move-range-not-flat",this);const n=ql._createAt(t,o);if(n.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!yu(e.root,n.root))throw new E("writer-move-different-document",this);const i=e.root.document?e.root.document.version:null,r=new Dd(e.start,e.end.offset-e.start.offset,n,i);this.batch.addOperation(r),this.model.applyOperation(r)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof Zl?e:Zl._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),_u(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,o=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof Ll))throw new E("writer-merge-no-element-before",this);if(!(o instanceof Ll))throw new E("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,o){return this.model.createPositionFromPath(e,t,o)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(...e){return this.model.createSelection(...e)}_mergeDetached(e){const t=e.nodeBefore,o=e.nodeAfter;this.move(Zl._createIn(o),ql._createAt(t,"end")),this.remove(o)}_merge(e){const t=ql._createAt(e.nodeBefore,"end"),o=ql._createAt(e.nodeAfter,0),n=e.root.document.graveyard,i=new ql(n,[0]),r=e.root.document.version,s=new Td(o,e.nodeAfter.maxOffset,t,i,r);this.batch.addOperation(s),this.model.applyOperation(s)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof Ll))throw new E("writer-rename-not-element-instance",this);const o=e.root.document?e.root.document.version:null,n=new Rd(ql._createBefore(e),e.name,t,o);this.batch.addOperation(n),this.model.applyOperation(n)}split(e,t){this._assertWriterUsedCorrectly();let o,n,i=e.parent;if(!i.parent)throw new E("writer-split-element-no-parent",this);if(t||(t=i.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new E("writer-split-invalid-limit-element",this);do{const t=i.root.document?i.root.document.version:null,r=i.maxOffset-e.offset,s=Sd.getInsertionPosition(e),a=new Sd(e,r,s,null,t);this.batch.addOperation(a),this.model.applyOperation(a),o||n||(o=i,n=e.parent.nextSibling),i=(e=this.createPositionAfter(e.parent)).parent}while(i!==t);return{position:e,range:new Zl(ql._createAt(o,"end"),ql._createAt(n,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new E("writer-wrap-range-not-flat",this);const o=t instanceof Ll?t:new Ll(t);if(o.childCount>0)throw new E("writer-wrap-element-not-empty",this);if(null!==o.parent)throw new E("writer-wrap-element-attached",this);this.insert(o,e.start);const n=new Zl(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(n,ql._createAt(o,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new E("writer-unwrap-element-no-parent",this);this.move(Zl._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new E("writer-addmarker-no-usingoperation",this);const o=t.usingOperation,n=t.range,i=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new E("writer-addmarker-marker-exists",this);if(!n)throw new E("writer-addmarker-no-range",this);return o?(wu(this,e,null,n,i),this.model.markers.get(e)):this.model.markers._set(e,n,o,i)}updateMarker(e,t){this._assertWriterUsedCorrectly();const o="string"==typeof e?e:e.name,n=this.model.markers.get(o);if(!n)throw new E("writer-updatemarker-marker-not-exists",this);if(!t)return D("writer-updatemarker-reconvert-using-editingcontroller",{markerName:o}),void this.model.markers._refresh(n);const i="boolean"==typeof t.usingOperation,r="boolean"==typeof t.affectsData,s=r?t.affectsData:n.affectsData;if(!i&&!t.range&&!r)throw new E("writer-updatemarker-wrong-options",this);const a=n.getRange(),l=t.range?t.range:a;i&&t.usingOperation!==n.managedUsingOperations?t.usingOperation?wu(this,o,null,l,s):(wu(this,o,a,null,s),this.model.markers._set(o,l,void 0,s)):n.managedUsingOperations?wu(this,o,a,l,s):this.model.markers._set(o,l,void 0,s)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new E("writer-removemarker-no-marker",this);const o=this.model.markers.get(t);if(!o.managedUsingOperations)return void this.model.markers._remove(t);wu(this,t,o.getRange(),null,o.affectsData)}addRoot(e,t="$root"){this._assertWriterUsedCorrectly();const o=this.model.document.getRoot(e);if(o&&o.isAttached())throw new E("writer-addroot-root-exists",this);const n=this.model.document,i=new Vd(e,t,!0,n,n.version);return this.batch.addOperation(i),this.model.applyOperation(i),this.model.document.getRoot(e)}detachRoot(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?this.model.document.getRoot(e):e;if(!t||!t.isAttached())throw new E("writer-detachroot-no-root",this);for(const e of this.model.markers)e.getRange().root===t&&this.removeMarker(e);for(const e of t.getAttributeKeys())this.removeAttribute(e,t);this.remove(this.createRangeIn(t));const o=this.model.document,n=new Vd(t.rootName,t.name,!1,o,o.version);this.batch.addOperation(n),this.model.applyOperation(n)}setSelection(...e){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...e)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,o]of tr(e))this._setSelectionAttribute(t,o)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const o=this.model.document.selection;if(o.isCollapsed&&o.anchor.parent.isEmpty){const n=mc._getStoreAttributeKey(e);this.setAttribute(n,t,o.anchor.parent)}o._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const o=mc._getStoreAttributeKey(e);this.removeAttribute(o,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new E("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,t){for(const o of this.model.markers){if(!o.managedUsingOperations)continue;const n=o.getRange();let i=!1;if("move"===e){const e=t;i=e.containsPosition(n.start)||e.start.isEqual(n.start)||e.containsPosition(n.end)||e.end.isEqual(n.end)}else{const e=t,o=e.nodeBefore,r=e.nodeAfter,s=n.start.parent==o&&n.start.isAtEnd,a=n.end.parent==r&&0==n.end.offset,l=n.end.nodeAfter==r,c=n.start.nodeAfter==r;i=s||a||l||c}i&&this.updateMarker(o.name,{range:n})}}}function bu(e,t,o,n){const i=e.model,r=i.document;let s,a,l,c=n.start;for(const e of n.getWalker({shallow:!0}))l=e.item.getAttribute(t),s&&a!=l&&(a!=o&&d(),c=s),s=e.nextPosition,a=l;function d(){const n=new Zl(c,s),l=n.root.document?r.version:null,d=new Fd(n,t,a,o,l);e.batch.addOperation(d),i.applyOperation(d)}s instanceof ql&&s!=c&&a!=o&&d()}function ku(e,t,o,n){const i=e.model,r=i.document,s=n.getAttribute(t);let a,l;if(s!=o){if(n.root===n){const e=n.document?r.version:null;l=new zd(n,t,s,o,e)}else{a=new Zl(ql._createBefore(n),e.createPositionAfter(n));const i=a.root.document?r.version:null;l=new Fd(a,t,s,o,i)}e.batch.addOperation(l),i.applyOperation(l)}}function wu(e,t,o,n,i){const r=e.model,s=r.document,a=new Id(t,o,n,r.markers,!!i,s.version);e.batch.addOperation(a),r.applyOperation(a)}function _u(e,t,o,n){let i;if(e.root.document){const o=n.document,r=new ql(o.graveyard,[0]);i=new Dd(e,t,r,o.version)}else i=new pu(e,t);o.addOperation(i),n.applyOperation(i)}function yu(e,t){return e===t||e instanceof lu&&t instanceof lu}function Au(e,t,o={}){if(t.isCollapsed)return;const n=t.getFirstRange();if("$graveyard"==n.root.rootName)return;const i=e.schema;e.change((e=>{if(!o.doNotResetEntireContent&&function(e,t){const o=e.getLimitElement(t);if(!t.containsEntireContent(o))return!1;const n=t.getFirstRange();if(n.start.parent==n.end.parent)return!1;return e.checkChild(o,"paragraph")}(i,t))return void function(e,t){const o=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(o)),Eu(e,e.createPositionAt(o,0),t)}(e,t);const r={};if(!o.doNotAutoparagraph){const e=t.getSelectedElement();e&&Object.assign(r,i.getAttributesWithProperty(e,"copyOnReplace",!0))}const[s,a]=function(e){const t=e.root.document.model,o=e.start;let n=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const o=function(e){const t=e.parent,o=t.root.document.model.schema,n=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of n){if(o.isLimit(e))return null;if(o.isBlock(e))return e}}(n);if(o&&n.isTouching(t.createPositionAt(o,0))){const o=t.createSelection(e);t.modifySelection(o,{direction:"backward"});const i=o.getLastPosition(),r=t.createRange(i,n);t.hasContent(r,{ignoreMarkers:!0})||(n=i)}}return[Yd.fromPosition(o,"toPrevious"),Yd.fromPosition(n,"toNext")]}(n);s.isTouching(a)||e.remove(e.createRange(s,a)),o.leaveUnmerged||(!function(e,t,o){const n=e.model;if(!xu(e.model.schema,t,o))return;const[i,r]=function(e,t){const o=e.getAncestors(),n=t.getAncestors();let i=0;for(;o[i]&&o[i]==n[i];)i++;return[o[i],n[i]]}(t,o);if(!i||!r)return;!n.hasContent(i,{ignoreMarkers:!0})&&n.hasContent(r,{ignoreMarkers:!0})?vu(e,t,o,i.parent):Cu(e,t,o,i.parent)}(e,s,a),i.removeDisallowedAttributes(s.parent.getChildren(),e)),Du(e,t,s),!o.doNotAutoparagraph&&function(e,t){const o=e.checkChild(t,"$text"),n=e.checkChild(t,"paragraph");return!o&&n}(i,s)&&Eu(e,s,t,r),s.detach(),a.detach()}))}function Cu(e,t,o,n){const i=t.parent,r=o.parent;if(i!=n&&r!=n){for(t=e.createPositionAfter(i),(o=e.createPositionBefore(r)).isEqual(t)||e.insert(r,t),e.merge(t);o.parent.isEmpty;){const t=o.parent;o=e.createPositionBefore(t),e.remove(t)}xu(e.model.schema,t,o)&&Cu(e,t,o,n)}}function vu(e,t,o,n){const i=t.parent,r=o.parent;if(i!=n&&r!=n){for(t=e.createPositionAfter(i),(o=e.createPositionBefore(r)).isEqual(t)||e.insert(i,o);t.parent.isEmpty;){const o=t.parent;t=e.createPositionBefore(o),e.remove(o)}o=e.createPositionBefore(r),function(e,t){const o=t.nodeBefore,n=t.nodeAfter;o.name!=n.name&&e.rename(o,n.name);e.clearAttributes(o),e.setAttributes(Object.fromEntries(n.getAttributes()),o),e.merge(t)}(e,o),xu(e.model.schema,t,o)&&vu(e,t,o,n)}}function xu(e,t,o){const n=t.parent,i=o.parent;return n!=i&&(!e.isLimit(n)&&!e.isLimit(i)&&function(e,t,o){const n=new Zl(e,t);for(const e of n.getWalker())if(o.isLimit(e.item))return!1;return!0}(t,o,e))}function Eu(e,t,o,n={}){const i=e.createElement("paragraph");e.model.schema.setAllowedAttributes(i,n,e),e.insert(i,t),Du(e,o,e.createPositionAt(i,0))}function Du(e,t,o){t instanceof mc?e.setSelection(o):t.setTo(o)}function Bu(e,t){const o=[];Array.from(e.getItems({direction:"backward"})).map((e=>t.createRangeOn(e))).filter((t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end)))).forEach((e=>{o.push(e.start.parent),t.remove(e)})),o.forEach((e=>{let o=e;for(;o.parent&&o.isEmpty;){const e=t.createRangeOn(o);o=o.parent,t.remove(e)}}))}class Su{constructor(e,t,o){this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null,this._nodeToSelect=null,this.model=e,this.writer=t,this.position=o,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=t.createDocumentFragment(),this._documentFragmentPosition=t.createPositionAt(this._documentFragment,0)}handleNodes(e){for(const t of Array.from(e))this._handleNode(t);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(e){const t=this.writer.createPositionAfter(this._lastNode),o=this.writer.createPositionAfter(e);if(o.isAfter(t)){if(this._lastNode=e,this.position.parent!=e||!this.position.isAtEnd)throw new E("insertcontent-invalid-insertion-position",this);this.position=o,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?Zl._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new Zl(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e){this._checkAndSplitToAllowedPosition(e)?(this._appendToFragment(e),this._firstNode||(this._firstNode=e),this._lastNode=e):this.schema.isObject(e)||this._handleDisallowedNode(e)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const e=Yd.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=e.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=e.toPosition(),e.detach()}_handleDisallowedNode(e){e.is("element")&&this.handleNodes(e.getChildren())}_appendToFragment(e){if(!this.schema.checkChild(this.position,e))throw new E("insertcontent-wrong-position",this,{node:e,position:this.position});this.writer.insert(e,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(e.offsetSize),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=e:this._nodeToSelect=null,this._filterAttributesOf.push(e)}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=Yd.fromPosition(e,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(e)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=Yd.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof Ll))return;if(!this._canMergeLeft(e))return;const t=Yd._createBefore(e);t.stickiness="toNext";const o=Yd.fromPosition(this.position,"toNext");this._affectedStart.isEqual(t)&&(this._affectedStart.detach(),this._affectedStart=Yd._createAt(t.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=Yd._createAt(t.nodeBefore,"end","toNext")),this.position=o.toPosition(),o.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof Ll))return;if(!this._canMergeRight(e))return;const t=Yd._createAfter(e);if(t.stickiness="toNext",!this.position.isEqual(t))throw new E("insertcontent-invalid-insertion-position",this);this.position=ql._createAt(t.nodeBefore,"end");const o=Yd.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(t)&&(this._affectedEnd.detach(),this._affectedEnd=Yd._createAt(t.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=Yd._createAt(t.nodeBefore,0,"toPrevious")),this.position=o.toPosition(),o.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_canMergeLeft(e){const t=e.previousSibling;return t instanceof Ll&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(t,e)}_canMergeRight(e){const t=e.nextSibling;return t instanceof Ll&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(e,t)}_insertAutoParagraph(){this._insertPartialFragment();const e=this.writer.createElement("paragraph");this.writer.insert(e,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=e,this.position=this.writer.createPositionAt(e,0)}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(this.position.parent,e);if(!t)return!1;for(t!=this.position.parent&&this._insertPartialFragment();t!=this.position.parent;)if(this.position.isAtStart){const e=this.position.parent;this.position=this.writer.createPositionBefore(e),e.isEmpty&&e.parent===t&&this.writer.remove(e)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const e=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=e,this.canMergeWith.add(this.position.nodeAfter)}return this.schema.checkChild(this.position.parent,e)||this._insertAutoParagraph(),!0}_getAllowedIn(e,t){return this.schema.checkChild(e,t)||this.schema.checkChild(e,"paragraph")&&this.schema.checkChild("paragraph",t)?e:this.schema.isLimit(e)?null:this._getAllowedIn(e.parent,t)}}function Tu(e,t,o,n={}){if(!e.schema.isObject(t))throw new E("insertobject-element-not-an-object",e,{object:t});const i=o||e.document.selection;let r=i;n.findOptimalPosition&&e.schema.isBlock(t)&&(r=e.createSelection(e.schema.findOptimalInsertionRange(i,n.findOptimalPosition)));const s=Qi(i.getSelectedBlocks()),a={};return s&&Object.assign(a,e.schema.getAttributesWithProperty(s,"copyOnReplace",!0)),e.change((o=>{r.isCollapsed||e.deleteContent(r,{doNotAutoparagraph:!0});let i=t;const s=r.anchor.parent;!e.schema.checkChild(s,t)&&e.schema.checkChild(s,"paragraph")&&e.schema.checkChild("paragraph",t)&&(i=o.createElement("paragraph"),o.insert(t,i)),e.schema.setAllowedAttributes(i,a,o);const l=e.insertContent(i,r);return l.isCollapsed||n.setSelection&&function(e,t,o,n){const i=e.model;if("on"==o)return void e.setSelection(t,"on");if("after"!=o)throw new E("insertobject-invalid-place-parameter-value",i);let r=t.nextSibling;if(i.schema.isInline(t))return void e.setSelection(t,"after");const s=r&&i.schema.checkChild(r,"$text");!s&&i.schema.checkChild(t.parent,"paragraph")&&(r=e.createElement("paragraph"),i.schema.setAllowedAttributes(r,n,e),i.insertContent(r,e.createPositionAfter(t)));r&&e.setSelection(r,0)}(o,t,n.setSelection,a),l}))}const Iu=' ,.?!:;"-()';function Pu(e,t){const{isForward:o,walker:n,unit:i,schema:r,treatEmojiAsSingleUnit:s}=e,{type:a,item:l,nextPosition:c}=t;if("text"==a)return"word"===e.unit?function(e,t){let o=e.position.textNode;o||(o=t?e.position.nodeAfter:e.position.nodeBefore);for(;o&&o.is("$text");){const n=e.position.offset-o.startOffset;if(Ru(o,n,t))o=t?e.position.nodeAfter:e.position.nodeBefore;else{if(Mu(o.data,n,t))break;e.next()}}return e.position}(n,o):function(e,t,o){const n=e.position.textNode;if(n){const i=n.data;let r=e.position.offset-n.startOffset;for(;nr(i,r)||"character"==t&&ir(i,r)||o&&sr(i,r);)e.next(),r=e.position.offset-n.startOffset}return e.position}(n,i,s);if(a==(o?"elementStart":"elementEnd")){if(r.isSelectable(l))return ql._createAt(l,o?"after":"before");if(r.checkChild(c,"$text"))return c}else{if(r.isLimit(l))return void n.skip((()=>!0));if(r.checkChild(c,"$text"))return c}}function Fu(e,t){const o=e.root,n=ql._createAt(o,t?"end":0);return t?new Zl(e,n):new Zl(n,e)}function Mu(e,t,o){const n=t+(o?0:-1);return Iu.includes(e.charAt(n))}function Ru(e,t,o){return t===(o?e.offsetSize:0)}class zu extends(Y()){constructor(){super(),this.markers=new hu,this.document=new du(this),this.schema=new Yc,this._pendingChanges=[],this._currentWriter=null,["deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach((e=>this.decorate(e))),this.on("applyOperation",((e,t)=>{t[0]._validate()}),{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck((()=>!0),"$marker"),qc(this),this.document.registerPostFixer(Fc),this.on("insertContent",((e,[t,o])=>{e.return=function(e,t,o){return e.change((n=>{const i=o||e.document.selection;i.isCollapsed||e.deleteContent(i,{doNotAutoparagraph:!0});const r=new Su(e,n,i.anchor),s=[];let a;if(t.is("documentFragment")){if(t.markers.size){const e=[];for(const[o,n]of t.markers){const{start:t,end:i}=n,r=t.isEqual(i);e.push({position:t,name:o,isCollapsed:r},{position:i,name:o,isCollapsed:r})}e.sort((({position:e},{position:t})=>e.isBefore(t)?1:-1));for(const{position:o,name:i,isCollapsed:r}of e){let e=null,a=null;const l=o.parent===t&&o.isAtStart,c=o.parent===t&&o.isAtEnd;l||c?r&&(a=l?"start":"end"):(e=n.createElement("$marker"),n.insert(e,o)),s.push({name:i,element:e,collapsed:a})}}a=t.getChildren()}else a=[t];r.handleNodes(a);let l=r.getSelectionRange();if(t.is("documentFragment")&&s.length){const e=l?cc.fromRange(l):null,t={};for(let e=s.length-1;e>=0;e--){const{name:o,element:i,collapsed:a}=s[e],l=!t[o];if(l&&(t[o]=[]),i){const e=n.createPositionAt(i,"before");t[o].push(e),n.remove(i)}else{const e=r.getAffectedRange();if(!e){a&&t[o].push(r.position);continue}a?t[o].push(e[a]):t[o].push(l?e.start:e.end)}}for(const[e,[o,i]]of Object.entries(t))o&&i&&o.root===i.root&&o.root.document&&!n.model.markers.has(e)&&n.addMarker(e,{usingOperation:!0,affectsData:!0,range:new Zl(o,i)});e&&(l=e.toRange(),e.detach())}l&&(i instanceof mc?n.setSelection(l):i.setTo(l));const c=r.getAffectedRange()||e.createRange(i.anchor);return r.destroy(),c}))}(this,t,o)})),this.on("insertObject",((e,[t,o,n])=>{e.return=Tu(this,t,o,n)})),this.on("canEditAt",(e=>{const t=!this.document.isReadOnly;e.return=t,t||e.stop()}))}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new eu,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){E.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{e?"function"==typeof e?(t=e,e=new eu):e instanceof eu||(e=new eu(e)):e=new eu,this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){E.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,o,...n){const i=Vu(t,o);return this.fire("insertContent",[e,i,o,...n])}insertObject(e,t,o,n,...i){const r=Vu(t,o);return this.fire("insertObject",[e,r,n,n,...i])}deleteContent(e,t){Au(this,e,t)}modifySelection(e,t){!function(e,t,o={}){const n=e.schema,i="backward"!=o.direction,r=o.unit?o.unit:"character",s=!!o.treatEmojiAsSingleUnit,a=t.focus,l=new Hl({boundaries:Fu(a,i),singleCharacters:!0,direction:i?"forward":"backward"}),c={walker:l,schema:n,isForward:i,unit:r,treatEmojiAsSingleUnit:s};let d;for(;d=l.next();){if(d.done)return;const o=Pu(c,d.value);if(o)return void(t instanceof mc?e.change((e=>{e.setSelectionFocus(o)})):t.setFocus(o))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change((e=>{const o=e.createDocumentFragment(),n=t.getFirstRange();if(!n||n.isCollapsed)return o;const i=n.start.root,r=n.start.getCommonPath(n.end),s=i.getNodeByPath(r);let a;a=n.start.parent==n.end.parent?n:e.createRange(e.createPositionAt(s,n.start.path[r.length]),e.createPositionAt(s,n.end.path[r.length]+1));const l=a.end.offset-a.start.offset;for(const t of a.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),o):e.append(e.cloneElement(t,!0),o);if(a!=n){const t=n._getTransformedByMove(a.start,e.createPositionAt(o,0),l)[0],i=e.createRange(e.createPositionAt(o,0),t.start);Bu(e.createRange(t.end,e.createPositionAt(o,"end")),e),Bu(i,e)}return o}))}(this,e)}hasContent(e,t={}){const o=e instanceof Zl?e:Zl._createIn(e);if(o.isCollapsed)return!1;const{ignoreWhitespaces:n=!1,ignoreMarkers:i=!1}=t;if(!i)for(const e of this.markers.getMarkersIntersectingRange(o))if(e.affectsData)return!0;for(const e of o.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!n)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}canEditAt(e){const t=Vu(e);return this.fire("canEditAt",[t])}createPositionFromPath(e,t,o){return new ql(e,t,o)}createPositionAt(e,t){return ql._createAt(e,t)}createPositionAfter(e){return ql._createAfter(e)}createPositionBefore(e){return ql._createBefore(e)}createRange(e,t){return new Zl(e,t)}createRangeIn(e){return Zl._createIn(e)}createRangeOn(e){return Zl._createOn(e)}createSelection(...e){return new oc(...e)}createBatch(e){return new eu(e)}createOperationFromJSON(e){return Nd.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new fu(this,t);const o=this._pendingChanges[0].callback(this._currentWriter);e.push(o),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return e}}function Vu(e,t){if(e)return e instanceof oc||e instanceof mc?e:e instanceof zl?t||0===t?new oc(e,t):e.is("rootElement")?new oc(e,"in"):new oc(e,"on"):new oc(e)}class Ou extends La{constructor(){super(...arguments),this.domEventType="click"}onDomEvent(e){this.fire(e.type,e)}}class Nu extends La{constructor(){super(...arguments),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(e){this.fire(e.type,e)}}class Lu{constructor(e){this.document=e}createDocumentFragment(e){return new Xs(this.document,e)}createElement(e,t,o){return new ys(this.document,e,t,o)}createText(e){return new Nr(this.document,e)}clone(e,t=!1){return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,o){return o._insertChild(e,t)}removeChildren(e,t,o){return o._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const o=e.parent;if(o){const n=o.getChildIndex(e);return this.removeChildren(n,1,o),this.insertChild(n,t,o),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const o=t.getChildIndex(e);this.remove(e),this.insertChild(o,e.getChildren(),t)}}rename(e,t){const o=new ys(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,o)?o:null}setAttribute(e,t,o){o._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,o){Te(e)&&void 0===o?t._setStyle(e):o._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,o){o._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return Ss._createAt(e,t)}createPositionAfter(e){return Ss._createAfter(e)}createPositionBefore(e){return Ss._createBefore(e)}createRange(e,t){return new Ts(e,t)}createRangeOn(e){return Ts._createOn(e)}createRangeIn(e){return Ts._createIn(e)}createSelection(...e){return new Ps(...e)}}const Hu=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,ju=/^rgb\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\)$/i,qu=/^rgba\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,Uu=/^hsl\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\.?[0-9]+)?\)$/i,Wu=/^hsla\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,$u=/\w+\((?:[^()]|\([^()]*\))*\)|\S+/gi,Gu=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);function Ku(e){return e.startsWith("#")?Hu.test(e):e.startsWith("rgb")?ju.test(e)||qu.test(e):e.startsWith("hsl")?Uu.test(e)||Wu.test(e):Gu.has(e.toLowerCase())}const Zu=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function Ju(e){return Zu.includes(e)}const Yu=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function Qu(e){return Yu.test(e)}const Xu=/^[+-]?[0-9]*([.][0-9]+)?%$/;const eh=["repeat-x","repeat-y","repeat","space","round","no-repeat"];function th(e){return eh.includes(e)}const oh=["center","top","bottom","left","right"];function nh(e){return oh.includes(e)}const ih=["fixed","scroll","local"];function rh(e){return ih.includes(e)}const sh=/^url\(/;function ah(e){return sh.test(e)}function lh(e=""){if(""===e)return{top:void 0,right:void 0,bottom:void 0,left:void 0};const t=uh(e),o=t[0],n=t[2]||o,i=t[1]||o;return{top:o,bottom:n,right:i,left:t[3]||i}}function ch(e){return t=>{const{top:o,right:n,bottom:i,left:r}=t,s=[];return[o,n,r,i].every((e=>!!e))?s.push([e,dh(t)]):(o&&s.push([e+"-top",o]),n&&s.push([e+"-right",n]),i&&s.push([e+"-bottom",i]),r&&s.push([e+"-left",r])),s}}function dh({top:e,right:t,bottom:o,left:n}){const i=[];return n!==t?i.push(e,t,o,n):o!==e?i.push(e,t,o):t!==e?i.push(e,t):i.push(e),i.join(" ")}function uh(e){const t=e.matchAll($u);return Array.from(t).map((e=>e[0]))}function hh(e){e.setNormalizer("background",(e=>{const t={},o=uh(e);for(const e of o)th(e)?(t.repeat=t.repeat||[],t.repeat.push(e)):nh(e)?(t.position=t.position||[],t.position.push(e)):rh(e)?t.attachment=e:Ku(e)?t.color=e:ah(e)&&(t.image=e);return{path:"background",value:t}})),e.setNormalizer("background-color",(e=>({path:"background.color",value:e}))),e.setReducer("background",(e=>{const t=[];return t.push(["background-color",e.color]),t})),e.setStyleRelation("background",["background-color"])}function mh(e){e.setNormalizer("border",(e=>{const{color:t,style:o,width:n}=_h(e);return{path:"border",value:{color:lh(t),style:lh(o),width:lh(n)}}})),e.setNormalizer("border-top",ph("top")),e.setNormalizer("border-right",ph("right")),e.setNormalizer("border-bottom",ph("bottom")),e.setNormalizer("border-left",ph("left")),e.setNormalizer("border-color",gh("color")),e.setNormalizer("border-width",gh("width")),e.setNormalizer("border-style",gh("style")),e.setNormalizer("border-top-color",bh("color","top")),e.setNormalizer("border-top-style",bh("style","top")),e.setNormalizer("border-top-width",bh("width","top")),e.setNormalizer("border-right-color",bh("color","right")),e.setNormalizer("border-right-style",bh("style","right")),e.setNormalizer("border-right-width",bh("width","right")),e.setNormalizer("border-bottom-color",bh("color","bottom")),e.setNormalizer("border-bottom-style",bh("style","bottom")),e.setNormalizer("border-bottom-width",bh("width","bottom")),e.setNormalizer("border-left-color",bh("color","left")),e.setNormalizer("border-left-style",bh("style","left")),e.setNormalizer("border-left-width",bh("width","left")),e.setExtractor("border-top",kh("top")),e.setExtractor("border-right",kh("right")),e.setExtractor("border-bottom",kh("bottom")),e.setExtractor("border-left",kh("left")),e.setExtractor("border-top-color","border.color.top"),e.setExtractor("border-right-color","border.color.right"),e.setExtractor("border-bottom-color","border.color.bottom"),e.setExtractor("border-left-color","border.color.left"),e.setExtractor("border-top-width","border.width.top"),e.setExtractor("border-right-width","border.width.right"),e.setExtractor("border-bottom-width","border.width.bottom"),e.setExtractor("border-left-width","border.width.left"),e.setExtractor("border-top-style","border.style.top"),e.setExtractor("border-right-style","border.style.right"),e.setExtractor("border-bottom-style","border.style.bottom"),e.setExtractor("border-left-style","border.style.left"),e.setReducer("border-color",ch("border-color")),e.setReducer("border-style",ch("border-style")),e.setReducer("border-width",ch("border-width")),e.setReducer("border-top",yh("top")),e.setReducer("border-right",yh("right")),e.setReducer("border-bottom",yh("bottom")),e.setReducer("border-left",yh("left")),e.setReducer("border",function(){return t=>{const o=wh(t,"top"),n=wh(t,"right"),i=wh(t,"bottom"),r=wh(t,"left"),s=[o,n,i,r],a={width:e(s,"width"),style:e(s,"style"),color:e(s,"color")},l=Ah(a,"all");if(l.length)return l;const c=Object.entries(a).reduce(((e,[t,o])=>(o&&(e.push([`border-${t}`,o]),s.forEach((e=>delete e[t]))),e)),[]);return[...c,...Ah(o,"top"),...Ah(n,"right"),...Ah(i,"bottom"),...Ah(r,"left")]};function e(e,t){return e.map((e=>e[t])).reduce(((e,t)=>e==t?e:null))}}()),e.setStyleRelation("border",["border-color","border-style","border-width","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]),e.setStyleRelation("border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]),e.setStyleRelation("border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-top",["border-top-color","border-top-style","border-top-width"]),e.setStyleRelation("border-right",["border-right-color","border-right-style","border-right-width"]),e.setStyleRelation("border-bottom",["border-bottom-color","border-bottom-style","border-bottom-width"]),e.setStyleRelation("border-left",["border-left-color","border-left-style","border-left-width"])}function ph(e){return t=>{const{color:o,style:n,width:i}=_h(t),r={};return void 0!==o&&(r.color={[e]:o}),void 0!==n&&(r.style={[e]:n}),void 0!==i&&(r.width={[e]:i}),{path:"border",value:r}}}function gh(e){return t=>({path:"border",value:fh(t,e)})}function fh(e,t){return{[t]:lh(e)}}function bh(e,t){return o=>({path:"border",value:{[e]:{[t]:o}}})}function kh(e){return(t,o)=>{if(o.border)return wh(o.border,e)}}function wh(e,t){const o={};return e.width&&e.width[t]&&(o.width=e.width[t]),e.style&&e.style[t]&&(o.style=e.style[t]),e.color&&e.color[t]&&(o.color=e.color[t]),o}function _h(e){const t={},o=uh(e);for(const e of o)Qu(e)||/thin|medium|thick/.test(e)?t.width=e:Ju(e)?t.style=e:t.color=e;return t}function yh(e){return t=>Ah(t,e)}function Ah(e,t){const o=[];if(e&&e.width&&o.push("width"),e&&e.style&&o.push("style"),e&&e.color&&o.push("color"),3==o.length){const n=o.map((t=>e[t])).join(" ");return["all"==t?["border",n]:[`border-${t}`,n]]}return"all"==t?[]:o.map((o=>[`border-${t}-${o}`,e[o]]))}function Ch(e){var t;e.setNormalizer("padding",(t="padding",e=>({path:t,value:lh(e)}))),e.setNormalizer("padding-top",(e=>({path:"padding.top",value:e}))),e.setNormalizer("padding-right",(e=>({path:"padding.right",value:e}))),e.setNormalizer("padding-bottom",(e=>({path:"padding.bottom",value:e}))),e.setNormalizer("padding-left",(e=>({path:"padding.left",value:e}))),e.setReducer("padding",ch("padding")),e.setStyleRelation("padding",["padding-top","padding-right","padding-bottom","padding-left"])}class vh{constructor(e){if(this.crashes=[],this.state="initializing",this._now=Date.now,this.crashes=[],this._crashNumberLimit="number"==typeof e.crashNumberLimit?e.crashNumberLimit:3,this._minimumNonErrorTimePeriod="number"==typeof e.minimumNonErrorTimePeriod?e.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=e=>{const t="error"in e?e.error:e.reason;t instanceof Error&&this._handleError(t,e)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}destroy(){this._stopErrorHandling(),this._listeners={}}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){this._listeners[e]=this._listeners[e].filter((e=>e!==t))}_fire(e,...t){const o=this._listeners[e]||[];for(const e of o)e.apply(this,[null,...t])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(e,t){if(this._shouldReactToError(e)){this.crashes.push({message:e.message,stack:e.stack,filename:t instanceof ErrorEvent?t.filename:void 0,lineno:t instanceof ErrorEvent?t.lineno:void 0,colno:t instanceof ErrorEvent?t.colno:void 0,date:this._now()});const o=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:e,causesRestart:o}),o?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(e){return e.is&&e.is("CKEditorError")&&void 0!==e.context&&null!==e.context&&"ready"===this.state&&this._isErrorComingFromThisItem(e)}_shouldRestart(){if(this.crashes.length<=this._crashNumberLimit)return!0;return(this.crashes[this.crashes.length-1].date-this.crashes[this.crashes.length-1-this._crashNumberLimit].date)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function xh(e,t=new Set){const o=[e],n=new Set;let i=0;for(;o.length>i;){const e=o[i++];if(!n.has(e)&&Eh(e)&&!t.has(e))if(n.add(e),Symbol.iterator in e)try{for(const t of e)o.push(t)}catch(e){}else for(const t in e)"defaultValue"!==t&&o.push(e[t])}return n}function Eh(e){const t=Object.prototype.toString.call(e),o=typeof e;return!("number"===o||"boolean"===o||"string"===o||"symbol"===o||"function"===o||"[object Date]"===t||"[object RegExp]"===t||"[object Module]"===t||null==e||e._watchdogExcluded||e instanceof EventTarget||e instanceof Event)}function Dh(e,t,o=new Set){if(e===t&&("object"==typeof(n=e)&&null!==n))return!0;var n;const i=xh(e,o),r=xh(t,o);for(const e of i)if(r.has(e))return!0;return!1}const Bh=function(e,t,o){var n=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return U(o)&&(n="leading"in o?!!o.leading:n,i="trailing"in o?!!o.trailing:i),el(e,t,{leading:n,maxWait:t,trailing:i})};class Sh extends vh{constructor(e,t={}){super(t),this._editor=null,this._lifecyclePromise=null,this._initUsingData=!0,this._editables={},this._throttledSave=Bh(this._save.bind(this),"number"==typeof t.saveInterval?t.saveInterval:5e3),e&&(this._creator=(t,o)=>e.create(t,o)),this._destructor=e=>e.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}_restart(){return Promise.resolve().then((()=>(this.state="initializing",this._fire("stateChange"),this._destroy()))).catch((e=>{console.error("An error happened during the editor destroying.",e)})).then((()=>{const e={},t=[],o=this._config.rootsAttributes||{},n={};for(const[i,r]of Object.entries(this._data.roots))r.isLoaded?(e[i]="",n[i]=o[i]||{}):t.push(i);const i={...this._config,extraPlugins:this._config.extraPlugins||[],lazyRoots:t,rootsAttributes:n,_watchdogInitialData:this._data};return delete i.initialData,i.extraPlugins.push(Th),this._initUsingData?this.create(e,i,i.context):Bn(this._elementOrData)?this.create(this._elementOrData,i,i.context):this.create(this._editables,i,i.context)})).then((()=>{this._fire("restart")}))}create(e=this._elementOrData,t=this._config,o){return this._lifecyclePromise=Promise.resolve(this._lifecyclePromise).then((()=>(super._startErrorHandling(),this._elementOrData=e,this._initUsingData="string"==typeof e||Object.keys(e).length>0&&"string"==typeof Object.values(e)[0],this._config=this._cloneEditorConfiguration(t)||{},this._config.context=o,this._creator(e,this._config)))).then((e=>{this._editor=e,e.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=e.model.document.version,this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this.state="ready",this._fire("stateChange")})).finally((()=>{this._lifecyclePromise=null})),this._lifecyclePromise}destroy(){return this._lifecyclePromise=Promise.resolve(this._lifecyclePromise).then((()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy()))).finally((()=>{this._lifecyclePromise=null})),this._lifecyclePromise}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling(),this._throttledSave.cancel();const e=this._editor;return this._editor=null,e.model.document.off("change:data",this._throttledSave),this._destructor(e)}))}_save(){const e=this._editor.model.document.version;try{this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this._lastDocumentVersion=e}catch(e){console.error(e,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(e){this._excludedProps=e}_getData(){const e=this._editor,t=e.model.document.roots.filter((e=>e.isAttached()&&"$graveyard"!=e.rootName)),{plugins:o}=e,n=o.has("CommentsRepository")&&o.get("CommentsRepository"),i=o.has("TrackChanges")&&o.get("TrackChanges"),r={roots:{},markers:{},commentThreads:JSON.stringify([]),suggestions:JSON.stringify([])};t.forEach((e=>{r.roots[e.rootName]={content:JSON.stringify(Array.from(e.getChildren())),attributes:JSON.stringify(Array.from(e.getAttributes())),isLoaded:e._isLoaded}}));for(const t of e.model.markers)t._affectsData&&(r.markers[t.name]={rangeJSON:t.getRange().toJSON(),usingOperation:t._managedUsingOperations,affectsData:t._affectsData});return n&&(r.commentThreads=JSON.stringify(n.getCommentThreads({toJSON:!0,skipNotAttached:!0}))),i&&(r.suggestions=JSON.stringify(i.getSuggestions({toJSON:!0,skipNotAttached:!0}))),r}_getEditables(){const e={};for(const t of this.editor.model.document.getRootNames()){const o=this.editor.ui.getEditableElement(t);o&&(e[t]=o)}return e}_isErrorComingFromThisItem(e){return Dh(this._editor,e.context,this._excludedProps)}_cloneEditorConfiguration(e){return Dn(e,((e,t)=>Bn(e)||"context"===t?e:void 0))}}class Th{constructor(e){this.editor=e,this._data=e.config.get("_watchdogInitialData")}init(){this.editor.data.on("init",(e=>{e.stop(),this.editor.model.enqueueChange({isUndoable:!1},(e=>{this._restoreCollaborationData(),this._restoreEditorData(e)})),this.editor.data.fire("ready")}),{priority:999})}_createNode(e,t){if("name"in t){const o=e.createElement(t.name,t.attributes);if(t.children)for(const n of t.children)o._appendChild(this._createNode(e,n));return o}return e.createText(t.data,t.attributes)}_restoreEditorData(e){const t=this.editor;Object.entries(this._data.roots).forEach((([o,{content:n,attributes:i}])=>{const r=JSON.parse(n),s=JSON.parse(i),a=t.model.document.getRoot(o);for(const[t,o]of s)e.setAttribute(t,o,a);for(const t of r){const o=this._createNode(e,t);e.insert(o,a,"end")}})),Object.entries(this._data.markers).forEach((([o,n])=>{const{document:i}=t.model,{rangeJSON:{start:r,end:s},...a}=n,l=i.getRoot(r.root),c=e.createPositionFromPath(l,r.path,r.stickiness),d=e.createPositionFromPath(l,s.path,s.stickiness),u=e.createRange(c,d);e.addMarker(o,{range:u,...a})}))}_restoreCollaborationData(){const e=JSON.parse(this._data.commentThreads),t=JSON.parse(this._data.suggestions);e.forEach((e=>{const t=this.editor.config.get("collaboration.channelId"),o=this.editor.plugins.get("CommentsRepository");if(o.hasCommentThread(e.threadId)){o.getCommentThread(e.threadId).remove()}o.addCommentThread({channelId:t,...e})})),t.forEach((e=>{const t=this.editor.plugins.get("TrackChangesEditing");if(t.hasSuggestion(e.id)){t.getSuggestion(e.id).attributes=e.attributes}else t.addSuggestionData(e)}))}}const Ih=Symbol("MainQueueId");class Ph{constructor(){this._onEmptyCallbacks=[],this._queues=new Map,this._activeActions=0}onEmpty(e){this._onEmptyCallbacks.push(e)}enqueue(e,t){const o=e===Ih;this._activeActions++,this._queues.get(e)||this._queues.set(e,Promise.resolve());const n=(o?Promise.all(this._queues.values()):Promise.all([this._queues.get(Ih),this._queues.get(e)])).then(t),i=n.catch((()=>{}));return this._queues.set(e,i),n.finally((()=>{this._activeActions--,this._queues.get(e)===i&&0===this._activeActions&&this._onEmptyCallbacks.forEach((e=>e()))}))}}function Fh(e){return Array.isArray(e)?e:[e]}class Mh{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const o=this.get(e);if(!o)throw new E("commandcollection-command-not-found",this,{commandName:e});return o.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}class Rh extends er{constructor(e){super(),this.editor=e}set(e,t,o={}){if("string"==typeof t){const e=t;t=(t,o)=>{this.editor.execute(e),o()}}super.set(e,t,o)}}const zh="contentEditing",Vh="common";class Oh{constructor(e){this.keystrokeInfos=new Map,this._editor=e;const t=e.config.get("menuBar.isVisible"),o=e.locale.t;this.addKeystrokeInfoCategory({id:zh,label:o("Content editing keystrokes"),description:o("These keyboard shortcuts allow for quick access to content editing features.")});const n=[{label:o("Close contextual balloons, dropdowns, and dialogs"),keystroke:"Esc"},{label:o("Open the accessibility help dialog"),keystroke:"Alt+0"},{label:o("Move focus between form fields (inputs, buttons, etc.)"),keystroke:[["Tab"],["Shift+Tab"]]},{label:o("Move focus to the toolbar, navigate between toolbars"),keystroke:"Alt+F10",mayRequireFn:!0},{label:o("Navigate through the toolbar or menu bar"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]},{label:o("Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content."),keystroke:[["Enter"],["Space"]]}];t&&n.push({label:o("Move focus to the menu bar, navigate between menu bars"),keystroke:"Alt+F9",mayRequireFn:!0}),this.addKeystrokeInfoCategory({id:"navigation",label:o("User interface and content navigation keystrokes"),description:o("Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface."),groups:[{id:"common",keystrokes:n}]})}addKeystrokeInfoCategory({id:e,label:t,description:o,groups:n}){this.keystrokeInfos.set(e,{id:e,label:t,description:o,groups:new Map}),this.addKeystrokeInfoGroup({categoryId:e,id:Vh}),n&&n.forEach((t=>{this.addKeystrokeInfoGroup({categoryId:e,...t})}))}addKeystrokeInfoGroup({categoryId:e=zh,id:t,label:o,keystrokes:n}){const i=this.keystrokeInfos.get(e);if(!i)throw new E("accessibility-unknown-keystroke-info-category",this._editor,{groupId:t,categoryId:e});i.groups.set(t,{id:t,label:o,keystrokes:n||[]})}addKeystrokeInfos({categoryId:e=zh,groupId:t=Vh,keystrokes:o}){if(!this.keystrokeInfos.has(e))throw new E("accessibility-unknown-keystroke-info-category",this._editor,{categoryId:e,keystrokes:o});const n=this.keystrokeInfos.get(e);if(!n.groups.has(t))throw new E("accessibility-unknown-keystroke-info-group",this._editor,{groupId:t,categoryId:e,keystrokes:o});n.groups.get(t).keystrokes.push(...o)}}class Nh extends(Y()){constructor(e={}){super();const t=this.constructor,{translations:o,...n}=t.defaultConfig||{},{translations:i=o,...r}=e,s=e.language||n.language;this._context=e.context||new mr({language:s,translations:i}),this._context._addEditor(this,!e.context);const a=Array.from(t.builtinPlugins||[]);this.config=new Sn(r,n),this.config.define("plugins",a),this.config.define(this._context._getEditorConfig()),this.plugins=new hr(this,a,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new Mh,this.set("state","initializing"),this.once("ready",(()=>this.state="ready"),{priority:"high"}),this.once("destroy",(()=>this.state="destroyed"),{priority:"high"}),this.model=new zu,this.on("change:isReadOnly",(()=>{this.model.document.isReadOnly=this.isReadOnly}));const l=new ks;this.data=new gd(this.model,l),this.editing=new Gc(this.model,l),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new fd([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 Rh(this),this.keystrokes.listenTo(this.editing.view.document),this.accessibility=new Oh(this)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new E("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new E("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new E("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),0===this._readOnlyLocks.size&&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")||[],n=e.get("extraPlugins")||[],i=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(n),o,i)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise((e=>this.once("ready",e)))),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(e){E.rethrowUnexpectedError(e,this)}}focus(){this.editing.view.focus()}static create(...e){throw new Error("This is an abstract method.")}}Nh.Context=mr,Nh.EditorWatchdog=Sh,Nh.ContextWatchdog=class extends vh{constructor(e,t={}){super(t),this._watchdogs=new Map,this._context=null,this._contextProps=new Set,this._actionQueues=new Ph,this._watchdogConfig=t,this._creator=t=>e.create(t),this._destructor=e=>e.destroy(),this._actionQueues.onEmpty((()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))}))}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}get context(){return this._context}create(e={}){return this._actionQueues.enqueue(Ih,(()=>(this._contextConfig=e,this._create())))}getItem(e){return this._getWatchdog(e)._item}getItemState(e){return this._getWatchdog(e).state}add(e){const t=Fh(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e.id,(()=>{if("destroyed"===this.state)throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");let t;if(this._watchdogs.has(e.id))throw new Error(`Item with the given id is already added: '${e.id}'.`);if("editor"===e.type)return t=new Sh(null,this._watchdogConfig),t.setCreator(e.creator),t._setExcludedProperties(this._contextProps),e.destructor&&t.setDestructor(e.destructor),this._watchdogs.set(e.id,t),t.on("error",((o,{error:n,causesRestart:i})=>{this._fire("itemError",{itemId:e.id,error:n}),i&&this._actionQueues.enqueue(e.id,(()=>new Promise((o=>{const n=()=>{t.off("restart",n),this._fire("itemRestart",{itemId:e.id}),o()};t.on("restart",n)}))))})),t.create(e.sourceElementOrData,e.config,this._context);throw new Error(`Not supported item type: '${e.type}'.`)})))))}remove(e){const t=Fh(e);return Promise.all(t.map((e=>this._actionQueues.enqueue(e,(()=>{const t=this._getWatchdog(e);return this._watchdogs.delete(e),t.destroy()})))))}destroy(){return this._actionQueues.enqueue(Ih,(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_restart(){return this._actionQueues.enqueue(Ih,(()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch((e=>{console.error("An error happened during destroying the context or items.",e)})).then((()=>this._create())).then((()=>this._fire("restart"))))))}_create(){return Promise.resolve().then((()=>(this._startErrorHandling(),this._creator(this._contextConfig)))).then((e=>(this._context=e,this._contextProps=xh(this._context),Promise.all(Array.from(this._watchdogs.values()).map((e=>(e._setExcludedProperties(this._contextProps),e.create(void 0,void 0,this._context))))))))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling();const e=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map((e=>e.destroy()))).then((()=>this._destructor(e)))}))}_getWatchdog(e){const t=this._watchdogs.get(e);if(!t)throw new Error(`Item with the given id was not registered: ${e}.`);return t}_isErrorComingFromThisItem(e){for(const t of this._watchdogs.values())if(t._isErrorComingFromThisItem(e))return!1;return Dh(this._context,e.context)}};const Lh=Nh;function Hh(e){return class extends e{updateSourceElement(e){if(!this.sourceElement)throw new E("editor-missing-sourceelement",this);const t=this.config.get("updateSourceElementOnDestroy"),o=this.sourceElement instanceof HTMLTextAreaElement;if(!t&&!o)return void Jn(this.sourceElement,"");const n="string"==typeof e?e:this.data.get();Jn(this.sourceElement,n)}}}Hh.updateSourceElement=Hh(Object).prototype.updateSourceElement;class jh extends pr{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new Yi({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new E("pendingactions-add-invalid-message",this);const t=new(Y());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]()}}const qh={bold:' ',cancel:' ',caption:' ',check:' ',cog:' ',colorPalette:' ',eraser:' ',history:' ',image:' ',imageUpload:' ',imageAssetManager:' ',imageUrl:' ',lowVision:' ',textAlternative:' ',loupe:' ',previousArrow:' ',nextArrow:' ',importExport:' ',paragraph:' ',plus:' ',text:' ',alignBottom:' ',alignMiddle:' ',alignTop:' ',alignLeft:' ',alignCenter:' ',alignRight:' ',alignJustify:' ',objectLeft:' ',objectCenter:' ',objectRight:' ',objectFullWidth:' ',objectInline:' ',objectBlockLeft:' ',objectBlockRight:' ',objectSizeCustom:' ',objectSizeFull:' ',objectSizeLarge:' ',objectSizeSmall:' ',objectSizeMedium:' ',pencil:' ',pilcrow:' ',quote:' ',threeVerticalDots:' ',dragIndicator:' ',redo:' ',undo:' ',bulletedList:' ',numberedList:' ',todoList:' ',codeBlock:' ',browseFiles:' ',heading1:' ',heading2:' ',heading3:' ',heading4:' ',heading5:' ',heading6:' ',horizontalLine:' ',html:' ',indent:' ',outdent:' ',table:' '};class Uh extends Yi{constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",((e,t,o)=>{this._renderViewIntoCollectionParent(t,o)})),this.on("remove",((e,t)=>{t.element&&this._parentElement&&t.element.remove()})),this._parentElement=null}destroy(){this.map((e=>e.destroy()))}setParent(e){this._parentElement=e;for(const e of this)this._renderViewIntoCollectionParent(e)}delegate(...e){if(!e.length||!e.every((e=>"string"==typeof e)))throw new E("ui-viewcollection-delegate-wrong-events",this);return{to:t=>{for(const o of this)for(const n of e)o.delegate(n).to(t);this.on("add",((o,n)=>{for(const o of e)n.delegate(o).to(t)})),this.on("remove",((o,n)=>{for(const o of e)n.stopDelegating(o,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)}}class Wh extends(z()){constructor(e){super(),Object.assign(this,tm(em(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:e,intoFragment:!1,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new E("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(t){if(t.children)for(const o of t.children)am(o)?yield o:lm(o)&&(yield*e(o))}(this)}static bind(e,t){return{to:(o,n)=>new Gh({eventNameOrFunction:o,attribute:o,observable:e,emitter:t,callback:n}),if:(o,n,i)=>new Kh({observable:e,emitter:t,attribute:o,valueIfTrue:n,callback:i})}}static extend(e,t){if(e._isRendered)throw new E("template-extend-render",[this,e]);rm(e,tm(em(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new E("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||"http://www.w3.org/1999/xhtml",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(""),Zh(this.text)?this._bindToObservable({schema:this.text,updater:Yh(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){if(!this.attributes)return;const t=e.node,o=e.revertData;for(const n in this.attributes){const i=t.getAttribute(n),r=this.attributes[n];o&&(o.attributes[n]=i);const s=dm(r)?r[0].ns:null;if(Zh(r)){const a=dm(r)?r[0].value:r;o&&um(n)&&a.unshift(i),this._bindToObservable({schema:a,updater:Qh(t,n,s),data:e})}else if("style"==n&&"string"!=typeof r[0])this._renderStyleAttribute(r[0],e);else{o&&i&&um(n)&&r.unshift(i);const e=r.map((e=>e&&e.value||e)).reduce(((e,t)=>e.concat(t)),[]).reduce(nm,"");sm(e)||t.setAttributeNS(s,n,e)}}}_renderStyleAttribute(e,t){const o=t.node;for(const n in e){const i=e[n];Zh(i)?this._bindToObservable({schema:[i],updater:Xh(o,n),data:t}):o.style[n]=i}}_renderElementChildren(e){const t=e.node,o=e.intoFragment?document.createDocumentFragment():t,n=e.isApplying;let i=0;for(const r of this.children)if(cm(r)){if(!n){r.setParent(t);for(const e of r)o.appendChild(e.element)}}else if(am(r))n||(r.isRendered||r.render(),o.appendChild(r.element));else if(Pn(r))o.appendChild(r);else if(n){const t={children:[],bindings:[],attributes:{}};e.revertData.children.push(t),r._renderNode({intoFragment:!1,node:o.childNodes[i++],isApplying:!0,revertData:t})}else o.appendChild(r.render());e.intoFragment&&t.appendChild(o)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const o=this.eventListeners[t].map((o=>{const[n,i]=t.split("@");return o.activateDomEventListener(n,i,e)}));e.revertData&&e.revertData.bindings.push(o)}}_bindToObservable({schema:e,updater:t,data:o}){const n=o.revertData;Jh(e,t,o);const i=e.filter((e=>!sm(e))).filter((e=>e.observable)).map((n=>n.activateAttributeListener(e,t,o)));n&&n.bindings.push(i)}_revertTemplateFromNode(e,t){for(const e of t.bindings)for(const t of e)t();if(t.text)return void(e.textContent=t.text);const o=e;for(const e in t.attributes){const n=t.attributes[e];null===n?o.removeAttribute(e):o.setAttribute(e,n)}for(let e=0;eJh(e,t,o);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,n),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,n)}}}class Gh extends $h{constructor(e){super(e),this.eventNameOrFunction=e.eventNameOrFunction}activateDomEventListener(e,t,o){const n=(e,o)=>{t&&!o.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(o):this.observable.fire(this.eventNameOrFunction,o))};return this.emitter.listenTo(o.node,e,n),()=>{this.emitter.stopListening(o.node,e,n)}}}class Kh extends $h{constructor(e){super(e),this.valueIfTrue=e.valueIfTrue}getValue(e){return!sm(super.getValue(e))&&(this.valueIfTrue||!0)}}function Zh(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(Zh):e instanceof $h)}function Jh(e,t,{node:o}){const n=function(e,t){return e.map((e=>e instanceof $h?e.getValue(t):e))}(e,o);let i;i=1==e.length&&e[0]instanceof Kh?n[0]:n.reduce(nm,""),sm(i)?t.remove():t.set(i)}function Yh(e){return{set(t){e.textContent=t},remove(){e.textContent=""}}}function Qh(e,t,o){return{set(n){e.setAttributeNS(o,t,n)},remove(){e.removeAttributeNS(o,t)}}}function Xh(e,t){return{set(o){e.style[t]=o},remove(){e.style[t]=null}}}function em(e){return Dn(e,(e=>{if(e&&(e instanceof $h||lm(e)||am(e)||cm(e)))return e}))}function tm(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){e.text=xi(e.text)}(e),e.on&&(e.eventListeners=function(e){for(const t in e)om(e,t);return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(const t in e)e[t].value&&(e[t].value=xi(e[t].value)),om(e,t)}(e.attributes);const t=[];if(e.children)if(cm(e.children))t.push(e.children);else for(const o of e.children)lm(o)||am(o)||Pn(o)?t.push(o):t.push(new Wh(o));e.children=t}return e}function om(e,t){e[t]=xi(e[t])}function nm(e,t){return sm(t)?e:sm(e)?t:`${e} ${t}`}function im(e,t){for(const o in t)e[o]?e[o].push(...t[o]):e[o]=t[o]}function rm(e,t){if(t.attributes&&(e.attributes||(e.attributes={}),im(e.attributes,t.attributes)),t.eventListeners&&(e.eventListeners||(e.eventListeners={}),im(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new E("ui-template-extend-children-mismatch",e);let o=0;for(const n of t.children)rm(e.children[o++],n)}}function sm(e){return!e&&0!==e}function am(e){return e instanceof pm}function lm(e){return e instanceof Wh}function cm(e){return e instanceof Uh}function dm(e){return U(e[0])&&e[0].ns}function um(e){return"class"==e||"style"==e}var hm=i(601),mm={attributes:{"data-cke":!0}};mm.setAttributes=Ar(),mm.insert=_r().bind(null,"head"),mm.domAPI=kr(),mm.insertStyleElement=vr();fr()(hm.A,mm);hm.A&&hm.A.locals&&hm.A.locals;class pm extends(Rn(Y())){constructor(e){super(),this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new Yi,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",((t,o)=>{o.locale=e,o.t=e&&e.t})),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=Wh.bind(this,this)}createCollection(e){const t=new Uh(e);return this._viewCollections.add(t),t}registerChild(e){re(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){re(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new Wh(e)}extendTemplate(e){Wh.extend(this.template,e)}render(){if(this.isRendered)throw new E("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)}}function gm({emitter:e,activator:t,callback:o,contextElements:n}){e.listenTo(document,"mousedown",((e,i)=>{if(!t())return;const r="function"==typeof i.composedPath?i.composedPath():[],s="function"==typeof n?n():n;for(const e of s)if(e.contains(i.target)||r.includes(e))return;o()}))}function fm(e){return class extends e{disableCssTransitions(){this._isCssTransitionsDisabled=!0}enableCssTransitions(){this._isCssTransitionsDisabled=!1}constructor(...e){super(...e),this.set("_isCssTransitionsDisabled",!1),this.initializeCssTransitionDisablerMixin()}initializeCssTransitionDisablerMixin(){this.extendTemplate({attributes:{class:[this.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}}}function bm({view:e}){e.listenTo(e.element,"submit",((t,o)=>{o.preventDefault(),e.fire("submit")}),{useCapture:!0})}function km({keystrokeHandler:e,focusTracker:t,gridItems:o,numberOfColumns:n,uiLanguageDirection:i}){const r="number"==typeof n?()=>n:n;function s(e){return n=>{const i=o.find((e=>e.element===t.focusedElement)),r=o.getIndex(i),s=e(r,o);o.get(s).focus(),n.stopPropagation(),n.preventDefault()}}function a(e,t){return e===t-1?0:e+1}function l(e,t){return 0===e?t-1:e-1}e.set("arrowright",s(((e,t)=>"rtl"===i?l(e,t.length):a(e,t.length)))),e.set("arrowleft",s(((e,t)=>"rtl"===i?a(e,t.length):l(e,t.length)))),e.set("arrowup",s(((e,t)=>{let o=e-r();return o<0&&(o=e+r()*Math.floor(t.length/r()),o>t.length-1&&(o-=r())),o}))),e.set("arrowdown",s(((e,t)=>{let o=e+r();return o>t.length-1&&(o=e%r()),o})))}var wm=i(4106),_m={attributes:{"data-cke":!0}};_m.setAttributes=Ar(),_m.insert=_r().bind(null,"head"),_m.domAPI=kr(),_m.insertStyleElement=vr();fr()(wm.A,_m);wm.A&&wm.A.locals&&wm.A.locals;class ym extends pm{constructor(){super();const e=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",e.if("isVisible","ck-hidden",(e=>!e)),"ck-reset_all-excluded",e.if("isColorInherited","ck-icon_inherit-color")],viewBox:e.to("viewBox")}})}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:t,value:o}of Array.from(e.attributes))ym.presentationalAttributeNames.includes(t)&&this.element.setAttribute(t,o);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((e=>{e.style.fill=this.fillColor}))}}ym.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"];const Am=ym;class Cm extends pm{constructor(){super(),this.set({style:void 0,text:void 0,id:void 0});const e=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:e.to("style"),id:e.to("id")},children:[{text:e.to("text")}]})}}var vm=i(8948),xm={attributes:{"data-cke":!0}};xm.setAttributes=Ar(),xm.insert=_r().bind(null,"head"),xm.domAPI=kr(),xm.insertStyleElement=vr();fr()(vm.A,xm);vm.A&&vm.A.locals&&vm.A.locals;class Em extends pm{constructor(e,t=new Cm){super(e),this._focusDelayed=null;const o=this.bindTemplate,n=A();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 Am,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 i={tag:"button",attributes:{class:["ck","ck-button",o.to("class"),o.if("isEnabled","ck-disabled",(e=>!e)),o.if("isVisible","ck-hidden",(e=>!e)),o.to("isOn",(e=>e?"ck-on":"ck-off")),o.if("withText","ck-button_with-text"),o.if("withKeystroke","ck-button_with-keystroke")],role:o.to("role"),type:o.to("type",(e=>e||"button")),tabindex:o.to("tabindex"),"aria-checked":o.to("_ariaChecked"),"aria-pressed":o.to("_ariaPressed"),"aria-label":o.to("ariaLabel"),"aria-labelledby":o.to("ariaLabelledBy"),"aria-disabled":o.if("isEnabled",!0,(e=>!e)),"data-cke-tooltip-text":o.to("_tooltipString"),"data-cke-tooltip-position":o.to("tooltipPosition")},children:this.children,on:{click:o.to((e=>{this.isEnabled?this.fire("execute"):e.preventDefault()}))}};this.bind("_ariaPressed").to(this,"isOn",this,"isToggleable",this,"role",((e,t,o)=>!(!t||Dm(o))&&String(!!e))),this.bind("_ariaChecked").to(this,"isOn",this,"isToggleable",this,"role",((e,t,o)=>!(!t||!Dm(o))&&String(!!e))),r.isSafari&&(this._focusDelayed||(this._focusDelayed=or((()=>this.focus()),0)),i.on.mousedown=o.to((()=>{this._focusDelayed()})),i.on.mouseup=o.to((()=>{this._focusDelayed.cancel()}))),this.setTemplate(i)}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 pm;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",(e=>Ai(e)))}]}),e}_getTooltipString(e,t,o){return e?"string"==typeof e?e:(o&&(o=Ai(o)),e instanceof Function?e(t,o):`${t}${o?` (${o})`:""}`):""}}function Dm(e){switch(e){case"radio":case"checkbox":case"option":case"switch":case"menuitemcheckbox":case"menuitemradio":return!0;default:return!1}}var Bm=i(4866),Sm={attributes:{"data-cke":!0}};Sm.setAttributes=Ar(),Sm.insert=_r().bind(null,"head"),Sm.domAPI=kr(),Sm.insertStyleElement=vr();fr()(Bm.A,Sm);Bm.A&&Bm.A.locals&&Bm.A.locals;class Tm extends pm{constructor(e,t={}){super(e);const o=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",o.to("class")]},children:this.children}),t.icon&&(this.iconView=new Am,this.iconView.content=t.icon,this.children.add(this.iconView));const n=new pm(e);n.setTemplate({tag:"h2",attributes:{class:["ck","ck-form__header__label"],role:"presentation"},children:[{text:o.to("label")}]}),this.children.add(n)}}class Im extends(z()){constructor(e){if(super(),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 o=e.actions[t];"string"==typeof o&&(o=[o]);for(const n of o)e.keystrokeHandler.set(n,((e,o)=>{this[t](),o()}),e.keystrokeHandlerOptions)}this.on("forwardCycle",(()=>this.focusFirst()),{priority:"low"}),this.on("backwardCycle",(()=>this.focusLast()),{priority:"low"})}get first(){return this.focusables.find(Pm)||null}get last(){return this.focusables.filter(Pm).slice(-1)[0]||null}get next(){return this._getDomFocusableItem(1)}get previous(){return this._getDomFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find(((t,o)=>{const n=t.element===this.focusTracker.focusedElement;return n&&(e=o),n})),e)}focusFirst(){this._focus(this.first,1)}focusLast(){this._focus(this.last,-1)}focusNext(){const e=this.next;e&&this.focusables.getIndex(e)===this.current||e===this.first?this.fire("forwardCycle"):this._focus(e,1)}focusPrevious(){const e=this.previous;e&&this.focusables.getIndex(e)===this.current||e===this.last?this.fire("backwardCycle"):this._focus(e,-1)}chain(e){const t=()=>null===this.current?null:this.focusables.get(this.current);this.listenTo(e,"forwardCycle",(e=>{const o=t();this.focusNext(),o!==t()&&e.stop()}),{priority:"low"}),this.listenTo(e,"backwardCycle",(e=>{const o=t();this.focusPrevious(),o!==t()&&e.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 o=this.current;if(null===o)return this[1===e?"first":"last"];let n=this.focusables.get(o),i=(o+t+e)%t;do{const o=this.focusables.get(i);if(Pm(o)){n=o;break}i=(i+t+e)%t}while(i!==o);return n}}function Pm(e){return Fm(e)&&ti(e.element)}function Fm(e){return!(!("focus"in e)||"function"!=typeof e.focus)}function Mm(e){return class extends e{constructor(...e){super(...e),this._onDragBound=this._onDrag.bind(this),this._onDragEndBound=this._onDragEnd.bind(this),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(t.document,"mouseup",this._onDragEndBound),this.listenTo(t.document,"touchend",this._onDragEndBound),this.listenTo(t.document,"mousemove",this._onDragBound),this.listenTo(t.document,"touchmove",this._onDragBound)}_detachDragListeners(){this.stopListening(t.document,"mouseup",this._onDragEndBound),this.stopListening(t.document,"touchend",this._onDragEndBound),this.stopListening(t.document,"mousemove",this._onDragBound),this.stopListening(t.document,"touchmove",this._onDragBound)}_onDragStart(e,t){if(!this._isHandleElementPressed(t))return;this._attachDragListeners();let o=0,n=0;t instanceof MouseEvent?(o=t.clientX,n=t.clientY):(o=t.touches[0].clientX,n=t.touches[0].clientY),this._lastDraggingCoordinates={x:o,y:n},this.isDragging=!0}_onDrag(e,t){if(!this.isDragging)return void this._detachDragListeners();let o=0,n=0;t instanceof MouseEvent?(o=t.clientX,n=t.clientY):(o=t.touches[0].clientX,n=t.touches[0].clientY),t.preventDefault(),this.fire("drag",{deltaX:Math.round(o-this._lastDraggingCoordinates.x),deltaY:Math.round(n-this._lastDraggingCoordinates.y)}),this._lastDraggingCoordinates={x:o,y:n}}_onDragEnd(){this._detachDragListeners(),this.isDragging=!1}_isHandleElementPressed(e){return!!this.dragHandleElement&&(this.dragHandleElement===e.target||e.target instanceof HTMLElement&&this.dragHandleElement.contains(e.target))}}}var Rm=i(8091),zm={attributes:{"data-cke":!0}};zm.setAttributes=Ar(),zm.insert=_r().bind(null,"head"),zm.domAPI=kr(),zm.insertStyleElement=vr();fr()(Rm.A,zm);Rm.A&&Rm.A.locals&&Rm.A.locals;class Vm extends pm{constructor(e){super(e),this.children=this.createCollection(),this.keystrokes=new er,this._focusTracker=new Xi,this._focusables=new Uh,this.focusCycler=new Im({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 e=new Em(this.locale);let o;for(o in e.on("execute",(()=>t.onExecute())),t.onCreate&&t.onCreate(e),t)"onExecute"!=o&&"onCreate"!=o&&e.set(o,t[o]);this.children.add(e)}this._updateFocusCyclableItems()}focus(e){-1===e?this.focusCycler.focusLast():this.focusCycler.focusFirst()}_updateFocusCyclableItems(){Array.from(this.children).forEach((e=>{this._focusables.add(e),this._focusTracker.add(e.element)}))}}class Om extends pm{constructor(e){super(e),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)}}var Nm=i(880),Lm={attributes:{"data-cke":!0}};Lm.setAttributes=Ar(),Lm.insert=_r().bind(null,"head"),Lm.domAPI=kr(),Lm.insertStyleElement=vr();fr()(Nm.A,Lm);Nm.A&&Nm.A.locals&&Nm.A.locals;const Hm="screen-center",jm="editor-center",qm="editor-top-side",Um="editor-top-center",Wm="editor-bottom-center",$m="editor-above-center",Gm="editor-below-center",Km=Yn("px");class Zm extends(Mm(pm)){constructor(e,{getCurrentDomRoot:t,getViewportOffset:o}){super(e),this.wasMoved=!1;const n=this.bindTemplate,i=e.t;this.set("className",""),this.set("ariaLabel",i("Editor dialog")),this.set("isModal",!1),this.set("position",Hm),this.set("_isVisible",!1),this.set("_isTransparent",!1),this.set("_top",0),this.set("_left",0),this._getCurrentDomRoot=t,this._getViewportOffset=o,this.decorate("moveTo"),this.parts=this.createCollection(),this.keystrokes=new er,this.focusTracker=new Xi,this._focusables=new Uh,this._focusCycler=new Im({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog-overlay",n.if("isModal","ck-dialog-overlay__transparent",(e=>!e)),n.if("_isVisible","ck-hidden",(e=>!e))],tabindex:"-1"},children:[{tag:"div",attributes:{tabindex:"-1",class:["ck","ck-dialog",n.to("className")],role:"dialog","aria-label":n.to("ariaLabel"),style:{top:n.to("_top",(e=>Km(e))),left:n.to("_left",(e=>Km(e))),visibility:n.if("_isTransparent","hidden")}},children:this.parts}]})}render(){super.render(),this.keystrokes.set("Esc",((e,t)=>{this.fire("close",{source:"escKeyPress"}),t()})),this.on("drag",((e,{deltaX:t,deltaY:o})=>{this.wasMoved=!0,this.moveBy(t,o)})),this.listenTo(t.window,"resize",(()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()})),this.listenTo(t.document,"scroll",(()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()})),this.on("change:_isVisible",((e,t,o)=>{o&&(this._isTransparent=!0,setTimeout((()=>{this.updatePosition(),this._isTransparent=!1,this.focus()}),10))})),this.keystrokes.listenTo(this.element)}get dragHandleElement(){return this.headerView?this.headerView.element:null}setupParts({icon:e,title:t,hasCloseButton:o=!0,content:n,actionButtons:i}){t&&(this.headerView=new Tm(this.locale,{icon:e}),o&&(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 pm&&(n=[n]),this.contentView=new Om(this.locale),this.contentView.children.addMany(n),this.parts.add(this.contentView)),i&&(this.actionsView=new Vm(this.locale),this.actionsView.setButtons(i),this.parts.add(this.actionsView)),this._updateFocusCyclableItems()}focus(){this._focusCycler.focusFirst()}moveTo(e,t){const o=this._getViewportRect(),n=this._getDialogRect();e+n.width>o.right&&(e=o.right-n.width),e{var t;this._focusables.add(e),this.focusTracker.add(e.element),Fm(t=e)&&"focusCycler"in t&&t.focusCycler instanceof Im&&this._focusCycler.chain(e.focusCycler)}))}_createCloseButton(){const e=new Em(this.locale),t=this.locale.t;return e.set({label:t("Close"),tooltip:!0,icon:qh.cancel}),e.on("execute",(()=>this.fire("close",{source:"closeButton"}))),e}}Zm.defaultOffset=15;const Jm=Zm;class Ym extends lr{static get pluginName(){return"Dialog"}constructor(e){super(e);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}]})}_initShowHideListeners(){this.on("show",((e,t)=>{this._show(t)})),this.on("show",((e,t)=>{t.onShow&&t.onShow(this)}),{priority:"low"}),this.on("hide",(()=>{Ym._visibleDialogPlugin&&Ym._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,o)=>{this.isOpen&&!this.view.isModal&&(this.view.focusTracker.isFocused?e.editing.view.focus():this.view.focus(),o())}))}_initMultiRootIntegration(){const e=this.editor.model;e.document.on("change:data",(()=>{if(!this.view)return;const t=e.document.differ.getChangedRoots();for(const e of t)e.state&&this.view.updatePosition()}))}show(e){this.hide(),this.fire(`show:${e.id}`,e)}_show({id:e,icon:t,title:o,hasCloseButton:n=!0,content:i,actionButtons:r,className:s,isModal:a,position:l,onHide:c}){const d=this.editor;this.view=new Jm(d.locale,{getCurrentDomRoot:()=>d.editing.view.getDomRoot(d.model.document.selection.anchor.root.rootName),getViewportOffset:()=>d.ui.viewportOffset});const u=this.view;u.on("close",(()=>{this.hide()})),d.ui.view.body.add(u),d.ui.focusTracker.add(u.element),d.keystrokes.listenTo(u.element),l||(l=a?Hm:jm),u.set({position:l,_isVisible:!0,className:s,isModal:a}),u.setupParts({icon:t,title:o,hasCloseButton:n,content:i,actionButtons:r}),this.id=e,c&&(this._onHide=c),this.isOpen=!0,Ym._visibleDialogPlugin=this}hide(){Ym._visibleDialogPlugin&&Ym._visibleDialogPlugin.fire(`hide:${Ym._visibleDialogPlugin.id}`)}_hide(){if(!this.view)return;const e=this.editor,t=this.view;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,Ym._visibleDialogPlugin=null}}var Qm=i(3389),Xm={attributes:{"data-cke":!0}};Xm.setAttributes=Ar(),Xm.insert=_r().bind(null,"head"),Xm.domAPI=kr(),Xm.insertStyleElement=vr();fr()(Qm.A,Xm);Qm.A&&Qm.A.locals&&Qm.A.locals;class ep extends Em{constructor(e,t=new Cm){super(e,t),this._checkIconHolderView=new tp,this.set({hasCheckSpace:!1,_hasCheck:this.isToggleable});const o=this.bindTemplate;this.extendTemplate({attributes:{class:["ck-list-item-button",o.if("isToggleable","ck-list-item-button_toggleable")]}}),this.bind("_hasCheck").to(this,"hasCheckSpace",this,"isToggleable",((e,t)=>e||t))}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,o)=>{const{children:n,_checkIconHolderView:i}=this;o?n.add(i,0):n.remove(i)}))}}class tp extends pm{constructor(){super(),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",(e=>e?"ck-on":"ck-off"))]}})}render(){super.render(),this.isOn&&this.children.add(this._checkIconView,0),this._watchCheckIconMount()}_watchCheckIconMount(){this.on("change:isOn",((e,t,o)=>{const{children:n,_checkIconView:i}=this;o&&!n.has(i)?n.add(i):!o&&n.has(i)&&n.remove(i)}))}_createCheckIconView(){const e=new Am;return e.content=qh.check,e.extendTemplate({attributes:{class:"ck-list-item-button__check-icon"}}),e}}var op=i(5078),np={attributes:{"data-cke":!0}};np.setAttributes=Ar(),np.insert=_r().bind(null,"head"),np.domAPI=kr(),np.insertStyleElement=vr();fr()(op.A,np);op.A&&op.A.locals&&op.A.locals;class ip extends ep{constructor(e){super(e),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}var rp=i(4606),sp={attributes:{"data-cke":!0}};sp.setAttributes=Ar(),sp.insert=_r().bind(null,"head"),sp.domAPI=kr(),sp.insertStyleElement=vr();fr()(rp.A,sp);rp.A&&rp.A.locals&&rp.A.locals;class ap extends pm{constructor(e){super(e),this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${A()}`;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 lp extends pm{constructor(e,t){super(e);const o=e.t,n=new ap;n.text=o("Help Contents. To close this dialog press ESC."),this.setTemplate({tag:"div",attributes:{class:["ck","ck-accessibility-help-dialog__content"],"aria-labelledby":n.id,role:"document",tabindex:-1},children:[Ae(document,"p",{},o("Below, you can find a list of keyboard shortcuts that can be used in the editor.")),...this._createCategories(Array.from(t.values())),n]})}focus(){this.element.focus()}_createCategories(e){return e.map((e=>{const t=[Ae(document,"h3",{},e.label),...Array.from(e.groups.values()).map((e=>this._createGroup(e))).flat()];return e.description&&t.splice(1,0,Ae(document,"p",{},e.description)),Ae(document,"section",{},t)}))}_createGroup(e){const t=e.keystrokes.sort(((e,t)=>e.label.localeCompare(t.label))).map((e=>this._createGroupRow(e))).flat(),o=[Ae(document,"dl",{},t)];return e.label&&o.unshift(Ae(document,"h4",{},e.label)),o}_createGroupRow(e){const t=this.locale.t,o=Ae(document,"dt"),n=Ae(document,"dd"),i=function(e){if("string"==typeof e)return[[e]];if("string"==typeof e[0])return[e];return e}(e.keystroke),s=[];for(const e of i)s.push(e.map(cp).join(""));return o.innerHTML=e.label,n.innerHTML=s.join(", ")+(e.mayRequireFn&&r.isMac?` ${t("(may require Fn )")}`:""),[o,n]}}function cp(e){return Ai(e).split("+").map((e=>`${e} `)).join("+")}const dp=' ';var up=i(9550),hp={attributes:{"data-cke":!0}};hp.setAttributes=Ar(),hp.insert=_r().bind(null,"head"),hp.domAPI=kr(),hp.insertStyleElement=vr();fr()(up.A,hp);up.A&&up.A.locals&&up.A.locals;class mp extends lr{constructor(){super(...arguments),this.contentView=null}static get requires(){return[Ym]}static get pluginName(){return"AccessibilityHelp"}init(){const e=this.editor,t=e.locale.t;e.ui.componentFactory.add("accessibilityHelp",(()=>{const e=this._createButton(Em);return e.set({tooltip:!0,withText:!1,label:t("Accessibility help")}),e})),e.ui.componentFactory.add("menuBar:accessibilityHelp",(()=>{const e=this._createButton(ip);return e.label=t("Accessibility"),e})),e.keystrokes.set("Alt+0",((e,t)=>{this._toggleDialog(),t()})),this._setupRootLabels()}_createButton(e){const t=this.editor,o=t.plugins.get("Dialog"),n=new e(t.locale);return n.set({keystroke:"Alt+0",icon:dp,isToggleable:!0}),n.on("execute",(()=>this._toggleDialog())),n.bind("isOn").to(o,"id",(e=>"accessibilityHelp"===e)),n}_setupRootLabels(){const e=this.editor,t=e.editing.view,o=e.t;function n(e,t){const n=`${t.getAttribute("aria-label")}. ${o("Press %0 for help.",[Ai("Alt+0")])}`;e.setAttribute("aria-label",n,t)}e.ui.on("ready",(()=>{t.change((e=>{for(const o of t.document.roots)n(e,o)})),e.on("addRoot",((o,i)=>{const r=e.editing.view.document.getRoot(i.rootName);t.change((e=>n(e,r)))}),{priority:"low"})}))}_toggleDialog(){const e=this.editor,t=e.plugins.get("Dialog"),o=e.locale.t;this.contentView||(this.contentView=new lp(e.locale,e.accessibility.keystrokeInfos)),"accessibilityHelp"===t.id?t.hide():t.show({id:"accessibilityHelp",className:"ck-accessibility-help-dialog",title:o("Accessibility help"),icon:dp,hasCloseButton:!0,content:this.contentView})}}class pp extends Uh{constructor(e,t=[]){super(t),this.locale=e}get bodyCollectionContainer(){return this._bodyCollectionContainer}attachToDom(){this._bodyCollectionContainer=new Wh({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection,role:"application"},children:this}).render();let e=document.querySelector(".ck-body-wrapper");e||(e=Ae(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(e)),e.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const e=document.querySelector(".ck-body-wrapper");e&&0==e.childElementCount&&e.remove()}}var gp=i(9624),fp={attributes:{"data-cke":!0}};fp.setAttributes=Ar(),fp.insert=_r().bind(null,"head"),fp.domAPI=kr(),fp.insertStyleElement=vr();fr()(gp.A,fp);gp.A&&gp.A.locals&&gp.A.locals;class bp extends Em{constructor(e){super(e),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 pm;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}class kp extends(_p(Em)){}class wp extends(_p(ep)){}function _p(e){return class extends e{constructor(...e){super(...e),this.buttonView=this,this._fileInputView=new yp(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)}}}class yp extends pm{constructor(e){super(e),this.set("acceptedType",void 0),this.set("allowMultipleFiles",!1);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to((()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""}))}})}open(){this.element.click()}}const Ap=' ';var Cp=i(1750),vp={attributes:{"data-cke":!0}};vp.setAttributes=Ar(),vp.insert=_r().bind(null,"head"),vp.domAPI=kr(),vp.insertStyleElement=vr();fr()(Cp.A,vp);Cp.A&&Cp.A.locals&&Cp.A.locals;class xp extends pm{constructor(e,t){super(e);const o=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",o.if("isCollapsed","ck-collapsible_collapsed")]},children:[this.buttonView,{tag:"div",attributes:{class:["ck","ck-collapsible__children"],role:"region",hidden:o.if("isCollapsed","hidden"),"aria-labelledby":o.to("_collapsibleAriaLabelUid")},children:this.children}]})}render(){super.render(),this._collapsibleAriaLabelUid=this.buttonView.labelView.element.id}focus(){this.buttonView.focus()}_createButtonView(){const e=new Em(this.locale),t=e.bindTemplate;return e.set({withText:!0,icon:Ap}),e.extendTemplate({attributes:{"aria-expanded":t.to("isOn",(e=>String(e)))}}),e.bind("label").to(this),e.bind("isOn").to(this,"isCollapsed",(e=>!e)),e.on("execute",(()=>{this.isCollapsed=!this.isCollapsed})),e}}function Ep(e,t){const o=e.t,n={Black:o("Black"),"Dim grey":o("Dim grey"),Grey:o("Grey"),"Light grey":o("Light grey"),White:o("White"),Red:o("Red"),Orange:o("Orange"),Yellow:o("Yellow"),"Light green":o("Light green"),Green:o("Green"),Aquamarine:o("Aquamarine"),Turquoise:o("Turquoise"),"Light blue":o("Light blue"),Blue:o("Blue"),Purple:o("Purple")};return t.map((e=>{const t=n[e.label];return t&&t!=e.label&&(e.label=t),e}))}function Dp(e){return e.map(Bp).filter((e=>!!e))}function Bp(e){return"string"==typeof e?{model:e,label:e,hasBorder:!1,view:{name:"span",styles:{color:e}}}:{model:e.color,label:e.label||e.color,hasBorder:void 0!==e.hasBorder&&e.hasBorder,view:{name:"span",styles:{color:`${e.color}`}}}}class Sp extends Em{constructor(e){super(e);const t=this.bindTemplate;this.set("color",void 0),this.set("hasBorder",!1),this.icon=' ',this.extendTemplate({attributes:{style:{backgroundColor:t.to("color",(e=>r.isMediaForcedColors?null:e))},class:["ck","ck-color-grid__tile",t.if("hasBorder","ck-color-selector__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}var Tp=i(7962),Ip={attributes:{"data-cke":!0}};Ip.setAttributes=Ar(),Ip.insert=_r().bind(null,"head"),Ip.domAPI=kr(),Ip.insertStyleElement=vr();fr()(Tp.A,Ip);Tp.A&&Tp.A.locals&&Tp.A.locals;class Pp extends pm{constructor(e,t){super(e);const o=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 Xi,this.keystrokes=new er,this.items.on("add",((e,t)=>{t.isOn=t.color===this.selectedColor})),o.forEach((e=>{const t=new Sp;t.set({color:e.color,label:e.label,tooltip:!0,hasBorder:e.options.hasBorder}),t.on("execute",(()=>{this.fire("execute",{value:e.color,hasBorder:e.options.hasBorder,label:e.label})})),this.items.add(t)})),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:n}}),this.on("change:selectedColor",((e,t,o)=>{for(const e of this.items)e.isOn=e.color===o}))}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),km({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()}}var Fp=i(8156);const Mp=function(e){var t,o,n=[],i=1;if("string"==typeof e)if(Fp[e])n=Fp[e].slice(),o="rgb";else if("transparent"===e)i=0,o="rgb",n=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var r=e.slice(1);i=1,(l=r.length)<=4?(n=[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)],4===l&&(i=parseInt(r[3]+r[3],16)/255)):(n=[parseInt(r[0]+r[1],16),parseInt(r[2]+r[3],16),parseInt(r[4]+r[5],16)],8===l&&(i=parseInt(r[6]+r[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),o="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var s=t[1],a="rgb"===s;o=r=s.replace(/a$/,"");var l="cmyk"===r?4:"gray"===r?1:3;n=t[2].trim().split(/\s*[,\/]\s*|\s+/).map((function(e,t){if(/%$/.test(e))return t===l?parseFloat(e)/100:"rgb"===r?255*parseFloat(e)/100:parseFloat(e);if("h"===r[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==Rp[e])return Rp[e]}return parseFloat(e)})),s===r&&n.push(1),i=a||void 0===n[l]?1:n[l],n=n.slice(0,l)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(n=e.match(/([0-9]+)/g).map((function(e){return parseFloat(e)})),o=e.match(/([a-z])/gi).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(n=[e[0],e[1],e[2]],o="rgb",i=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(o="rgb",n=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(o="hsl",n=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),i=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(i/=100)):(o="rgb",n=[e>>>16,(65280&e)>>>8,255&e]);return{space:o,values:n,alpha:i}};var Rp={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};var zp=i(734),Vp=i.t(zp,2);function Op(e,t){if(!e)return"";const o=Np(e);if(!o)return"";if(o.space===t)return e;if(n=o,!Object.keys(Vp).includes(n.space))return"";var n;const i=Vp[o.space][t];if(!i)return"";return function(e,t){switch(t){case"hex":return`#${e}`;case"rgb":return`rgb( ${e[0]}, ${e[1]}, ${e[2]} )`;case"hsl":return`hsl( ${e[0]}, ${e[1]}%, ${e[2]}% )`;case"hwb":return`hwb( ${e[0]}, ${e[1]}, ${e[2]} )`;case"lab":return`lab( ${e[0]}% ${e[1]} ${e[2]} )`;case"lch":return`lch( ${e[0]}% ${e[1]} ${e[2]} )`;default:return""}}(i("hex"===o.space?o.hexValue:o.values),t)}function Np(e){if(e.startsWith("#")){const t=Mp(e);return{space:"hex",values:t.values,hexValue:e,alpha:t.alpha}}const t=Mp(e);return t.space?t:null}var Lp=i(6365),Hp={attributes:{"data-cke":!0}};Hp.setAttributes=Ar(),Hp.insert=_r().bind(null,"head"),Hp.domAPI=kr(),Hp.insertStyleElement=vr();fr()(Lp.A,Hp);Lp.A&&Lp.A.locals&&Lp.A.locals;class jp extends pm{constructor(e,t){super(e);const o=`ck-labeled-field-view-${A()}`,n=`ck-labeled-field-view-status-${A()}`;this.fieldView=t(this,o,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(o),this.statusView=this._createStatusView(n),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",((e,t)=>e||t));const i=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",i.to("class"),i.if("isEnabled","ck-disabled",(e=>!e)),i.if("isEmpty","ck-labeled-field-view_empty"),i.if("isFocused","ck-labeled-field-view_focused"),i.if("placeholder","ck-labeled-field-view_placeholder"),i.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 ap(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new pm(this.locale),o=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",o.if("errorText","ck-labeled-field-view__status_error"),o.if("_statusText","ck-hidden",(e=>!e))],id:e,role:o.if("errorText","alert")},children:[{text:o.to("_statusText")}]}),t}focus(e){this.fieldView.focus(e)}}class qp extends pm{constructor(e){super(e),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 Xi,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(((...e)=>{this.fire("input",...e),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,o)=>{this._setDomElementValue(o),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=!this.element.value}_setDomElementValue(e){this.element.value=e||0===e?e:""}}var Up=i(1546),Wp={attributes:{"data-cke":!0}};Wp.setAttributes=Ar(),Wp.insert=_r().bind(null,"head"),Wp.domAPI=kr(),Wp.insertStyleElement=vr();fr()(Up.A,Wp);Up.A&&Up.A.locals&&Up.A.locals;class $p extends qp{constructor(e){super(e),this.set("inputMode","text");const t=this.bindTemplate;this.extendTemplate({attributes:{inputmode:t.to("inputMode")}})}}class Gp extends $p{constructor(e){super(e),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}class Kp extends $p{constructor(e,{min:t,max:o,step:n}={}){super(e);const i=this.bindTemplate;this.set("min",t),this.set("max",o),this.set("step",n),this.extendTemplate({attributes:{type:"number",class:["ck-input-number"],min:i.to("min"),max:i.to("max"),step:i.to("step")}})}}var Zp=i(8368),Jp={attributes:{"data-cke":!0}};Jp.setAttributes=Ar(),Jp.insert=_r().bind(null,"head"),Jp.domAPI=kr(),Jp.insertStyleElement=vr();fr()(Zp.A,Jp);Zp.A&&Zp.A.locals&&Zp.A.locals;class Yp extends pm{constructor(e){super(e);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",(e=>`ck-dropdown__panel_${e}`)),t.if("isVisible","ck-dropdown__panel-visible")],tabindex:"-1"},children:this.children,on:{selectstart:t.to((e=>{"input"!==e.target.tagName.toLocaleLowerCase()&&e.preventDefault()}))}})}focus(){if(this.children.length){const e=this.children.first;"function"==typeof e.focus?e.focus():D("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this})}}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}var Qp=i(426),Xp={attributes:{"data-cke":!0}};Xp.setAttributes=Ar(),Xp.insert=_r().bind(null,"head"),Xp.domAPI=kr(),Xp.insertStyleElement=vr();fr()(Qp.A,Xp);Qp.A&&Qp.A.locals&&Qp.A.locals;class eg extends pm{constructor(e,t,o){super(e);const n=this.bindTemplate;this.buttonView=t,this.panelView=o,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 er,this.focusTracker=new Xi,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",n.to("class"),n.if("isEnabled","ck-disabled",(e=>!e))],id:n.to("id"),"aria-describedby":n.to("ariaDescribedById")},children:[t,o]}),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",((e,t,o)=>{if(o)if("auto"===this.panelPosition){const e=eg._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=e?e.name:this._panelPositions[0].name}else this.panelView.position=this.panelPosition})),this.keystrokes.listenTo(this.element);const e=(e,t)=>{this.isOpen&&(this.isOpen=!1,t())};this.keystrokes.set("arrowdown",((e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())})),this.keystrokes.set("arrowright",((e,t)=>{this.isOpen&&t()})),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:e,north:t,southEast:o,southWest:n,northEast:i,northWest:r,southMiddleEast:s,southMiddleWest:a,northMiddleEast:l,northMiddleWest:c}=eg.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[o,n,s,a,e,i,r,l,c,t]:[n,o,a,s,e,r,i,c,l,t]}}eg.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-3*(t.width-e.width)/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-3*(t.width-e.width)/4,name:"nmw"})},eg._getOptimalPosition=oi;const tg=eg;class og extends Em{constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",(e=>String(e)))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new Am;return e.content=Ap,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}class ng extends pm{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class ig extends pm{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}function rg(e){if(Array.isArray(e))return{items:e,removeItems:[]};const t={items:[],removeItems:[]};return e?{...t,...e}:t}var sg=i(66),ag={attributes:{"data-cke":!0}};ag.setAttributes=Ar(),ag.insert=_r().bind(null,"head"),ag.domAPI=kr(),ag.insertStyleElement=vr();fr()(sg.A,ag);sg.A&&sg.A.locals&&sg.A.locals;const lg=(()=>({alignLeft:qh.alignLeft,bold:qh.bold,importExport:qh.importExport,paragraph:qh.paragraph,plus:qh.plus,text:qh.text,threeVerticalDots:qh.threeVerticalDots,pilcrow:qh.pilcrow,dragIndicator:qh.dragIndicator}))();class cg extends pm{constructor(e,t){super(e);const o=this.bindTemplate,n=this.t;this.options=t||{},this.set("ariaLabel",n("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new Xi,this.keystrokes=new er,this.set("class",void 0),this.set("isCompact",!1),this.itemsView=new dg(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const i="rtl"===e.uiLanguageDirection;this._focusCycler=new Im({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[i?"arrowright":"arrowleft","arrowup"],focusNext:[i?"arrowleft":"arrowright","arrowdown"]}});const r=["ck","ck-toolbar",o.to("class"),o.if("isCompact","ck-toolbar_compact")];var s;this.options.shouldGroupWhenFull&&this.options.isFloating&&r.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:r,role:"toolbar","aria-label":o.to("ariaLabel"),style:{maxWidth:o.to("maxWidth")},tabindex:-1},children:this.children,on:{mousedown:(s=this,s.bindTemplate.to((e=>{e.target===s.element&&e.preventDefault()})))}}),this._behavior=this.options.shouldGroupWhenFull?new hg(this):new ug(this)}render(){super.render(),this.focusTracker.add(this.element);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),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,o){this.items.addMany(this._buildItemsFromConfig(e,t,o))}_buildItemsFromConfig(e,t,o){const n=rg(e),i=o||n.removeItems;return this._cleanItemsConfiguration(n.items,t,i).map((e=>U(e)?this._createNestedToolbarDropdown(e,t,i):"|"===e?new ng:"-"===e?new ig:t.create(e))).filter((e=>!!e))}_cleanItemsConfiguration(e,t,o){const n=e.filter(((e,n,i)=>"|"===e||-1===o.indexOf(e)&&("-"===e?!this.options.shouldGroupWhenFull||(D("toolbarview-line-break-ignored-when-grouping-items",i),!1):!(!U(e)&&!t.has(e))||(D("toolbarview-item-unavailable",{item:e}),!1))));return this._cleanSeparatorsAndLineBreaks(n)}_cleanSeparatorsAndLineBreaks(e){const t=e=>"-"!==e&&"|"!==e,o=e.length,n=e.findIndex(t);if(-1===n)return[];const i=o-e.slice().reverse().findIndex(t);return e.slice(n,i).filter(((e,o,n)=>{if(t(e))return!0;return!(o>0&&n[o-1]===e)}))}_createNestedToolbarDropdown(e,t,o){let{label:n,icon:i,items:r,tooltip:s=!0,withText:a=!1}=e;if(r=this._cleanItemsConfiguration(r,t,o),!r.length)return null;const l=Eg(this.locale);return n||D("toolbarview-nested-toolbar-dropdown-missing-label",e),l.class="ck-toolbar__nested-toolbar-dropdown",l.buttonView.set({label:n,tooltip:s,withText:!!a}),!1!==i?l.buttonView.icon=lg[i]||i||qh.threeVerticalDots:l.buttonView.withText=!0,Dg(l,(()=>l.toolbarView._buildItemsFromConfig(r,t,o))),l}}class dg extends pm{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class ug{constructor(e){const t=e.bindTemplate;e.set("isVertical",!1),e.itemsView.children.bindTo(e.items).using((e=>e)),e.focusables.bindTo(e.items).using((e=>Fm(e)?e:null)),e.extendTemplate({attributes:{class:[t.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class hg{constructor(e){this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),e.itemsView.children.bindTo(this.ungroupedItems).using((e=>e)),this.ungroupedItems.on("change",this._updateFocusCyclableItems.bind(this)),e.children.on("change",this._updateFocusCyclableItems.bind(this)),e.items.on("change",((e,t)=>{const o=t.index,n=Array.from(t.added);for(const e of t.removed)o>=this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e);for(let e=o;ethis.ungroupedItems.length?this.groupedItems.add(t,e-this.ungroupedItems.length):this.ungroupedItems.add(t,e)}this._updateGrouping()})),e.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!ti(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const e=this.groupedItems.length;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==e&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,o=this.viewLocale.uiLanguageDirection,n=new qn(e.lastChild),i=new qn(e);if(!this.cachedPadding){const n=t.window.getComputedStyle(e),i="ltr"===o?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(n[i])}return"ltr"===o?n.right>i.right-this.cachedPadding:n.left{e&&e===t.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=t.contentRect.width)})),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",(()=>{this._updateGrouping()}))}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new ng),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 e=this.viewLocale,t=e.t,o=Eg(e);return o.class="ck-toolbar__grouped-dropdown",o.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",Dg(o,this.groupedItems),o.buttonView.set({label:t("Show more items"),tooltip:!0,tooltipPosition:"rtl"===e.uiLanguageDirection?"se":"sw",icon:qh.threeVerticalDots}),o}_updateFocusCyclableItems(){this.viewFocusables.clear(),this.ungroupedItems.map((e=>{Fm(e)&&this.viewFocusables.add(e)})),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}class mg extends pm{constructor(e){super(e);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",(e=>!e))],role:"presentation"},children:this.children})}focus(){this.children.first&&this.children.first.focus()}}class pg extends pm{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}class gg extends pm{constructor(e,t=new ap){super(e);const o=this.bindTemplate,n=new kg(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",o.if("isVisible","ck-hidden",(e=>!e))]},children:this.children})}focus(){if(this.items){const e=this.items.find((e=>!(e instanceof pg)));e&&e.focus()}}}var fg=i(6048),bg={attributes:{"data-cke":!0}};bg.setAttributes=Ar(),bg.insert=_r().bind(null,"head"),bg.domAPI=kr(),bg.insertStyleElement=vr();fr()(fg.A,bg);fg.A&&fg.A.locals&&fg.A.locals;class kg extends pm{constructor(e){super(e),this._listItemGroupToChangeListeners=new WeakMap;const t=this.bindTemplate;this.focusables=new Uh,this.items=this.createCollection(),this.focusTracker=new Xi,this.keystrokes=new er,this._focusCycler=new Im({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 gg?this._registerFocusableItemsGroup(e):e instanceof mg&&this._registerFocusableListItem(e);this.items.on("change",((e,t)=>{for(const e of t.removed)e instanceof gg?this._deregisterFocusableItemsGroup(e):e instanceof mg&&this._deregisterFocusableListItem(e);for(const e of Array.from(t.added).reverse())e instanceof gg?this._registerFocusableItemsGroup(e,t.index):this._registerFocusableListItem(e,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,o)=>{for(const e of o.removed)this._deregisterFocusableListItem(e);for(const t of Array.from(o.added).reverse())this._registerFocusableListItem(t,this.items.getIndex(e)+o.index)}}_registerFocusableItemsGroup(e,t){Array.from(e.items).forEach(((e,o)=>{const n=void 0!==t?t+o:void 0;this._registerFocusableListItem(e,n)}));const o=this._getOnGroupItemsChangeCallback(e);this._listItemGroupToChangeListeners.set(e,o),e.items.on("change",o)}_deregisterFocusableItemsGroup(e){for(const t of e.items)this._deregisterFocusableListItem(t);e.items.off("change",this._listItemGroupToChangeListeners.get(e)),this._listItemGroupToChangeListeners.delete(e)}}var wg=i(7133),_g={attributes:{"data-cke":!0}};_g.setAttributes=Ar(),_g.insert=_r().bind(null,"head"),_g.domAPI=kr(),_g.insertStyleElement=vr();fr()(wg.A,_g);wg.A&&wg.A.locals&&wg.A.locals;class yg extends pm{constructor(e,t){super(e);const o=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 er,this.focusTracker=new Xi,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",o.to("class"),o.if("isVisible","ck-hidden",(e=>!e)),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 Em;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 Em,t=e.bindTemplate;return e.icon=Ap,e.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":t.to("isOn"),"aria-haspopup":!0,"aria-expanded":t.to("isOn",(e=>String(e)))}}),e.bind("isEnabled").to(this),e.bind("label").to(this),e.bind("tooltip").to(this),e.delegate("execute").to(this,"open"),e}}var Ag=i(7475),Cg={attributes:{"data-cke":!0}};Cg.setAttributes=Ar(),Cg.insert=_r().bind(null,"head"),Cg.domAPI=kr(),Cg.insertStyleElement=vr();fr()(Ag.A,Cg);Ag.A&&Ag.A.locals&&Ag.A.locals;var vg=i(2454),xg={attributes:{"data-cke":!0}};xg.setAttributes=Ar(),xg.insert=_r().bind(null,"head"),xg.domAPI=kr(),xg.insertStyleElement=vr();fr()(vg.A,xg);vg.A&&vg.A.locals&&vg.A.locals;function Eg(e,o=og){const n="function"==typeof o?new o(e):o,i=new Yp(e),r=new tg(e,n,i);return n.bind("isEnabled").to(r),n instanceof yg?n.arrowView.bind("isOn").to(r,"isOpen"):n.bind("isOn").to(r,"isOpen"),function(e){(function(e){e.on("render",(()=>{gm({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:()=>[e.element,...e.focusTracker._elements]})}))})(e),function(e){e.on("execute",(t=>{t.source instanceof bp||(e.isOpen=!1)}))}(e),function(e){e.focusTracker.on("change:isFocused",((t,o,n)=>{e.isOpen&&!n&&(e.isOpen=!1)}))}(e),function(e){e.keystrokes.set("arrowdown",((t,o)=>{e.isOpen&&(e.panelView.focus(),o())})),e.keystrokes.set("arrowup",((t,o)=>{e.isOpen&&(e.panelView.focusLast(),o())}))}(e),function(e){e.on("change:isOpen",((o,n,i)=>{if(i)return;const r=e.panelView.element;r&&r.contains(t.document.activeElement)&&e.buttonView.focus()}))}(e),function(e){e.on("change:isOpen",((t,o,n)=>{n&&e.panelView.focus()}),{priority:"low"})}(e)}(r),r}function Dg(e,t,o={}){e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),e.isOpen?Bg(e,t,o):e.once("change:isOpen",(()=>Bg(e,t,o)),{priority:"highest"}),o.enableActiveItemFocusOnDropdownOpen&&Ig(e,(()=>e.toolbarView.items.find((e=>e.isOn))))}function Bg(e,t,o){const n=e.locale,i=n.t,r=e.toolbarView=new cg(n),s="function"==typeof t?t():t;r.ariaLabel=o.ariaLabel||i("Dropdown toolbar"),o.maxWidth&&(r.maxWidth=o.maxWidth),o.class&&(r.class=o.class),o.isCompact&&(r.isCompact=o.isCompact),o.isVertical&&(r.isVertical=!0),s instanceof Uh?r.items.bindTo(s).using((e=>e)):r.items.addMany(s),e.panelView.children.add(r),r.items.delegate("execute").to(e)}function Sg(e,t,o={}){e.isOpen?Tg(e,t,o):e.once("change:isOpen",(()=>Tg(e,t,o)),{priority:"highest"}),Ig(e,(()=>e.listView.items.find((e=>e instanceof mg&&e.children.first.isOn))))}function Tg(e,t,o){const n=e.locale,i=e.listView=new kg(n),r="function"==typeof t?t():t;i.ariaLabel=o.ariaLabel,i.role=o.role,Pg(e,i.items,r,n),e.panelView.children.add(i),i.items.delegate("execute").to(e)}function Ig(e,t){e.on("change:isOpen",(()=>{if(!e.isOpen)return;const o=t();o&&("function"==typeof o.focus?o.focus():D("ui-dropdown-focus-child-on-open-child-missing-focus",{view:o}))}),{priority:C.low-10})}function Pg(e,t,o,n){t.on("change",(()=>{const e=[...t].reduce(((e,t)=>(t instanceof mg&&t.children.first instanceof ep&&e.push(t.children.first),e)),[]),o=e.some((e=>e.isToggleable));e.forEach((e=>{e.hasCheckSpace=o}))})),t.bindTo(o).using((t=>{if("separator"===t.type)return new pg(n);if("group"===t.type){const o=new gg(n);return o.set({label:t.label}),Pg(e,o.items,t.items,n),o.items.delegate("execute").to(e),o}if("button"===t.type||"switchbutton"===t.type){const e="menuitemcheckbox"===t.model.role||"menuitemradio"===t.model.role,o=new mg(n);let i;return"button"===t.type?(i=new ep(n),i.set({isToggleable:e})):i=new bp(n),i.bind(...Object.keys(t.model)).to(t.model),i.delegate("execute").to(o),o.children.add(i),o}return null}))}const Fg=(e,t,o)=>{const n=new Gp(e.locale);return n.set({id:t,ariaDescribedById:o}),n.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),n.bind("hasError").to(e,"errorText",(e=>!!e)),n.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(n),n},Mg=(e,t,o)=>{const n=new Kp(e.locale);return n.set({id:t,ariaDescribedById:o,inputMode:"numeric"}),n.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),n.bind("hasError").to(e,"errorText",(e=>!!e)),n.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(n),n},Rg=(e,t,o)=>{const n=Eg(e.locale);return n.set({id:t,ariaDescribedById:o}),n.bind("isEnabled").to(e),n},zg=(e,t=0,o=1)=>e>o?o:eMath.round(o*e)/o,Og=(Math.PI,e=>("#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Vg(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?Vg(parseInt(e.substring(6,8),16)/255,2):1})),Ng=({h:e,s:t,v:o,a:n})=>{const i=(200-t)*o/100;return{h:Vg(e),s:Vg(i>0&&i<200?t*o/100/(i<=100?i:200-i)*100:0),l:Vg(i/2),a:Vg(n,2)}},Lg=e=>{const{h:t,s:o,l:n}=Ng(e);return`hsl(${t}, ${o}%, ${n}%)`},Hg=({h:e,s:t,v:o,a:n})=>{e=e/360*6,t/=100,o/=100;const i=Math.floor(e),r=o*(1-t),s=o*(1-(e-i)*t),a=o*(1-(1-e+i)*t),l=i%6;return{r:Vg(255*[o,s,r,r,a,o][l]),g:Vg(255*[a,o,o,s,r,r][l]),b:Vg(255*[r,r,a,o,o,s][l]),a:Vg(n,2)}},jg=e=>{const t=e.toString(16);return t.length<2?"0"+t:t},qg=({r:e,g:t,b:o,a:n})=>{const i=n<1?jg(Vg(255*n)):"";return"#"+jg(e)+jg(t)+jg(o)+i},Ug=({r:e,g:t,b:o,a:n})=>{const i=Math.max(e,t,o),r=i-Math.min(e,t,o),s=r?i===e?(t-o)/r:i===t?2+(o-e)/r:4+(e-t)/r:0;return{h:Vg(60*(s<0?s+6:s)),s:Vg(i?r/i*100:0),v:Vg(i/255*100),a:n}},Wg=(e,t)=>{if(e===t)return!0;for(const o in e)if(e[o]!==t[o])return!1;return!0},$g={},Gg=e=>{let t=$g[e];return t||(t=document.createElement("template"),t.innerHTML=e,$g[e]=t),t},Kg=(e,t,o)=>{e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))};let Zg=!1;const Jg=e=>"touches"in e,Yg=(e,t)=>{const o=Jg(t)?t.touches[0]:t,n=e.el.getBoundingClientRect();Kg(e.el,"move",e.getMove({x:zg((o.pageX-(n.left+window.pageXOffset))/n.width),y:zg((o.pageY-(n.top+window.pageYOffset))/n.height)}))};class Qg{constructor(e,t,o,n){const i=Gg(``);e.appendChild(i.content.cloneNode(!0));const r=e.querySelector(`[part=${t}]`);r.addEventListener("mousedown",this),r.addEventListener("touchstart",this),r.addEventListener("keydown",this),this.el=r,this.xy=n,this.nodes=[r.firstChild,r]}set dragging(e){const t=e?document.addEventListener:document.removeEventListener;t(Zg?"touchmove":"mousemove",this),t(Zg?"touchend":"mouseup",this)}handleEvent(e){switch(e.type){case"mousedown":case"touchstart":if(e.preventDefault(),!(e=>!(Zg&&!Jg(e)||(Zg||(Zg=Jg(e)),0)))(e)||!Zg&&0!=e.button)return;this.el.focus(),Yg(this,e),this.dragging=!0;break;case"mousemove":case"touchmove":e.preventDefault(),Yg(this,e);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":((e,t)=>{const o=t.keyCode;o>40||e.xy&&o<37||o<33||(t.preventDefault(),Kg(e.el,"move",e.getMove({x:39===o?.01:37===o?-.01:34===o?.05:33===o?-.05:35===o?1:36===o?-1:0,y:40===o?.01:38===o?-.01:0},!0)))})(this,e)}}style(e){e.forEach(((e,t)=>{for(const o in e)this.nodes[t].style.setProperty(o,e[o])}))}}class Xg extends Qg{constructor(e){super(e,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:e}){this.h=e,this.style([{left:e/360*100+"%",color:Lg({h:e,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${Vg(e)}`)}getMove(e,t){return{h:t?zg(this.h+360*e.x,0,360):360*e.x}}}class ef extends Qg{constructor(e){super(e,"saturation",'aria-label="Color"',!0)}update(e){this.hsva=e,this.style([{top:100-e.v+"%",left:`${e.s}%`,color:Lg(e)},{"background-color":Lg({h:e.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${Vg(e.s)}%, Brightness ${Vg(e.v)}%`)}getMove(e,t){return{s:t?zg(this.hsva.s+100*e.x,0,100):100*e.x,v:t?zg(this.hsva.v-100*e.y,0,100):Math.round(100-100*e.y)}}}const tf=Symbol("same"),of=Symbol("color"),nf=Symbol("hsva"),rf=Symbol("update"),sf=Symbol("parts"),af=Symbol("css"),lf=Symbol("sliders");class cf extends HTMLElement{static get observedAttributes(){return["color"]}get[af](){return[':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}',"[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}","[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}"]}get[lf](){return[ef,Xg]}get color(){return this[of]}set color(e){if(!this[tf](e)){const t=this.colorModel.toHsva(e);this[rf](t),this[of]=e}}constructor(){super();const e=Gg(``),t=this.attachShadow({mode:"open"});t.appendChild(e.content.cloneNode(!0)),t.addEventListener("move",this),this[sf]=this[lf].map((e=>new e(t)))}connectedCallback(){if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(e,t,o){const n=this.colorModel.fromAttr(o);this[tf](n)||(this.color=n)}handleEvent(e){const t=this[nf],o={...t,...e.detail};let n;this[rf](o),Wg(o,t)||this[tf](n=this.colorModel.fromHsva(o))||(this[of]=n,Kg(this,"color-changed",{value:n}))}[tf](e){return this.color&&this.colorModel.equal(e,this.color)}[rf](e){this[nf]=e,this[sf].forEach((t=>t.update(e)))}}const df={defaultColor:"#000",toHsva:e=>Ug(Og(e)),fromHsva:({h:e,s:t,v:o})=>qg(Hg({h:e,s:t,v:o,a:1})),equal:(e,t)=>e.toLowerCase()===t.toLowerCase()||Wg(Og(e),Og(t)),fromAttr:e=>e};class uf extends cf{get colorModel(){return df}}var hf=i(3086),mf={attributes:{"data-cke":!0}};mf.setAttributes=Ar(),mf.insert=_r().bind(null,"head"),mf.domAPI=kr(),mf.insertStyleElement=vr();fr()(hf.A,mf);hf.A&&hf.A.locals&&hf.A.locals;class pf extends pm{constructor(e,t={}){super(e),this.set({color:"",_hexColor:""}),this.hexInputRow=this._createInputRow();const o=this.createCollection();t.hideInput||o.add(this.hexInputRow),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker"],tabindex:-1},children:o}),this._config=t,this._debounceColorPickerEvent=el((e=>{this.set("color",e),this.fire("colorSelected",{color:this.color})}),150,{leading:!0}),this.on("set:color",((e,t,o)=>{e.return=Op(o,this._config.format||"hsl")})),this.on("change:color",(()=>{this._hexColor=gf(this.color)})),this.on("change:_hexColor",(()=>{document.activeElement!==this.picker&&this.picker.setAttribute("color",this._hexColor),gf(this.color)!=gf(this._hexColor)&&(this.color=this._hexColor)}))}render(){var e,o;if(super.render(),e="hex-color-picker",o=uf,void 0===customElements.get(e)&&customElements.define(e,o),this.picker=t.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(){if(!this._config.hideInput&&(r.isGecko||r.isiOS||r.isSafari)){this.hexInputRow.children.get(1).focus()}this.slidersView.first.focus()}_createSlidersView(){const e=[...this.picker.shadowRoot.children].filter((e=>"slider"===e.getAttribute("role"))).map((e=>new ff(e)));this.slidersView=this.createCollection(),e.forEach((e=>{this.slidersView.add(e)}))}_createInputRow(){const e=this._createColorInput();return new kf(this.locale,e)}_createColorInput(){const e=new jp(this.locale,Fg),{t}=this.locale;return e.set({label:t("HEX"),class:"color-picker-hex-input"}),e.fieldView.bind("value").to(this,"_hexColor",(t=>e.isFocused?e.fieldView.value:t.startsWith("#")?t.substring(1):t)),e.fieldView.on("input",(()=>{const t=e.fieldView.element.value;if(t){const e=wf(t);e&&this._debounceColorPickerEvent(e)}})),e}isValid(){const{t:e}=this.locale;return!!this._config.hideInput||(this.resetValidationStatus(),!!this.hexInputRow.getParsedColor()||(this.hexInputRow.inputView.errorText=e('Please enter a valid color (e.g. "ff0000").'),!1))}resetValidationStatus(){this.hexInputRow.inputView.errorText=null}}function gf(e){let t=function(e){if(!e)return"";const t=Np(e);return t?"hex"===t.space?t.hexValue:Op(e,"hex"):"#000"}(e);return t||(t="#000"),4===t.length&&(t="#"+[t[1],t[1],t[2],t[2],t[3],t[3]].join("")),t.toLowerCase()}class ff extends pm{constructor(e){super(),this.element=e}focus(){this.element.focus()}}class bf extends pm{constructor(e){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__hash-view"]},children:"#"})}}class kf extends pm{constructor(e,t){super(e),this.inputView=t,this.children=this.createCollection([new bf,this.inputView]),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__row"]},children:this.children})}getParsedColor(){return wf(this.inputView.fieldView.element.value)}}function wf(e){if(!e)return null;const t=e.trim().replace(/^#/,"");return[3,4,6,8].includes(t.length)&&/^(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})$/.test(t)?`#${t}`:null}class _f extends(Y(Yi)){constructor(e){super(e),this.set("isEmpty",!0),this.on("change",(()=>{this.set("isEmpty",0===this.length)}))}add(e,t){return this.find((t=>t.color===e.color))?this:super.add(e,t)}hasColor(e){return!!this.find((t=>t.color===e))}}class yf extends pm{constructor(e,{colors:t,columns:o,removeButtonLabel:n,documentColorsLabel:i,documentColorsCount:r,colorPickerLabel:s,focusTracker:a,focusables:l}){super(e);const c=this.bindTemplate;this.set("isVisible",!0),this.focusTracker=a,this.items=this.createCollection(),this.colorDefinitions=t,this.columns=o,this.documentColors=new _f,this.documentColorsCount=r,this._focusables=l,this._removeButtonLabel=n,this._colorPickerLabel=s,this._documentColorsLabel=i,this.setTemplate({tag:"div",attributes:{class:["ck-color-grids-fragment",c.if("isVisible","ck-hidden",(e=>!e))]},children:this.items}),this.removeColorButtonView=this._createRemoveColorButton(),this.items.add(this.removeColorButtonView)}updateDocumentColors(e,t){const o=e.document,n=this.documentColorsCount;this.documentColors.clear();for(const i of o.getRoots()){const o=e.createRangeIn(i);for(const e of o.getItems())if(e.is("$textProxy")&&e.hasAttribute(t)&&(this._addColorToDocumentColors(e.getAttribute(t)),this.documentColors.length>=n))return}}updateSelectedColors(){const e=this.documentColorsGrid,t=this.staticColorsGrid,o=this.selectedColor;t.selectedColor=o,e&&(e.selectedColor=o)}render(){if(super.render(),this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.documentColorsCount){const e=Wh.bind(this.documentColors,this.documentColors),t=new pm(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 Em,this.colorPickerButtonView.set({label:this._colorPickerLabel,withText:!0,icon:qh.colorPalette,class:"ck-color-selector__color-picker"}),this.colorPickerButtonView.on("execute",(()=>{this.fire("colorPicker:show")}))}_createRemoveColorButton(){const e=new Em;return e.set({withText:!0,icon:qh.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 Pp(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return e.on("execute",((e,t)=>{this.fire("execute",{value:t.value,source:"staticColorsGrid"})})),e}_createDocumentColorsGrid(){const e=Wh.bind(this.documentColors,this.documentColors),t=new Pp(this.locale,{columns:this.columns});return t.extendTemplate({attributes:{class:e.if("isEmpty","ck-hidden")}}),t.items.bindTo(this.documentColors).using((e=>{const t=new Sp;return t.set({color:e.color,hasBorder:e.options&&e.options.hasBorder}),e.label&&t.set({label:e.label,tooltip:!0}),t.on("execute",(()=>{this.fire("execute",{value:e.color,source:"documentColorsGrid"})})),t})),this.documentColors.on("change:isEmpty",((e,o,n)=>{n&&(t.selectedColor=null)})),t}_addColorToDocumentColors(e){const t=this.colorDefinitions.find((t=>t.color===e));t?this.documentColors.add(Object.assign({},t)):this.documentColors.add({color:e,label:e,options:{hasBorder:!1}})}}class Af extends pm{constructor(e,{focusTracker:t,focusables:o,keystrokes:n,colorPickerViewConfig:i}){super(e),this.items=this.createCollection(),this.focusTracker=t,this.keystrokes=n,this.set("isVisible",!1),this.set("selectedColor",void 0),this._focusables=o,this._colorPickerViewConfig=i;const r=this.bindTemplate,{saveButtonView:s,cancelButtonView:a}=this._createActionButtons();this.saveButtonView=s,this.cancelButtonView=a,this.actionBarView=this._createActionBarView({saveButtonView:s,cancelButtonView:a}),this.setTemplate({tag:"div",attributes:{class:["ck-color-picker-fragment",r.if("isVisible","ck-hidden",(e=>!e))]},children:this.items})}render(){super.render();const e=new pf(this.locale,{...this._colorPickerViewConfig});this.colorPickerView=e,this.colorPickerView.render(),this.selectedColor&&(e.color=this.selectedColor),this.listenTo(this,"change:selectedColor",((t,o,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=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}_addColorPickersElementsToFocusTracker(){for(const e of this.colorPickerView.slidersView)this.focusTracker.add(e.element),this._focusables.add(e);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 o=new pm,n=this.createCollection();return n.add(e),n.add(t),o.setTemplate({tag:"div",attributes:{class:["ck","ck-color-selector_action-bar"]},children:n}),o}_createActionButtons(){const e=this.locale,t=e.t,o=new Em(e),n=new Em(e);return o.set({icon:qh.check,class:"ck-button-save",type:"button",withText:!1,label:t("Accept")}),n.set({icon:qh.cancel,class:"ck-button-cancel",type:"button",withText:!1,label:t("Cancel")}),o.on("execute",(()=>{this.colorPickerView.isValid()&&this.fire("execute",{source:"colorPickerSaveButton",value:this.selectedColor})})),n.on("execute",(()=>{this.fire("colorPicker:cancel")})),{saveButtonView:o,cancelButtonView:n}}_executeUponColorChange(){this.colorPickerView.on("colorSelected",((e,t)=>{this.fire("execute",{value:t.color,source:"colorPicker"}),this.set("selectedColor",t.color)}))}}var Cf=i(2922),vf={attributes:{"data-cke":!0}};vf.setAttributes=Ar(),vf.insert=_r().bind(null,"head"),vf.domAPI=kr(),vf.insertStyleElement=vr();fr()(Cf.A,vf);Cf.A&&Cf.A.locals&&Cf.A.locals;class xf extends pm{constructor(e,{colors:t,columns:o,removeButtonLabel:n,documentColorsLabel:i,documentColorsCount:r,colorPickerLabel:s,colorPickerViewConfig:a}){super(e),this.items=this.createCollection(),this.focusTracker=new Xi,this.keystrokes=new er,this._focusables=new Uh,this._colorPickerViewConfig=a,this._focusCycler=new Im({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.colorGridsFragmentView=new yf(e,{colors:t,columns:o,removeButtonLabel:n,documentColorsLabel:i,documentColorsCount:r,colorPickerLabel:s,focusTracker:this.focusTracker,focusables:this._focusables}),this.colorPickerFragmentView=new Af(e,{focusables:this._focusables,focusTracker:this.focusTracker,keystrokes:this.keystrokes,colorPickerViewConfig:a}),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",((e,t,o)=>{this.colorGridsFragmentView.set("selectedColor",o),this.colorPickerFragmentView.set("selectedColor",o)})),this.colorGridsFragmentView.on("change:selectedColor",((e,t,o)=>{this.set("selectedColor",o)})),this.colorPickerFragmentView.on("change:selectedColor",((e,t,o)=>{this.set("selectedColor",o)})),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(){2!==this.items.length&&(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 Ef{constructor(e){this._components=new Map,this.editor=e}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){this._components.set(Df(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new E("componentfactory-item-missing",this,{name:e});return this._components.get(Df(e)).callback(this.editor.locale)}has(e){return this._components.has(Df(e))}}function Df(e){return String(e).toLowerCase()}var Bf=i(5615),Sf={attributes:{"data-cke":!0}};Sf.setAttributes=Ar(),Sf.insert=_r().bind(null,"head"),Sf.domAPI=kr(),Sf.insertStyleElement=vr();fr()(Bf.A,Sf);Bf.A&&Bf.A.locals&&Bf.A.locals;const Tf=Yn("px"),If={top:-99999,left:-99999,name:"arrowless",config:{withArrow:!1}};class Pf extends pm{constructor(e){super(e);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",(e=>`ck-balloon-panel_${e}`)),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",Tf),left:t.to("left",Tf)}},children:this.content})}destroy(){this.hide(),super.destroy()}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){const o=Mf(e.target);if(o&&!ti(o))return!1;this.show();const n=Pf.defaultPositions,i=Object.assign({},{element:this.element,positions:[n.southArrowNorth,n.southArrowNorthMiddleWest,n.southArrowNorthMiddleEast,n.southArrowNorthWest,n.southArrowNorthEast,n.northArrowSouth,n.northArrowSouthMiddleWest,n.northArrowSouthMiddleEast,n.northArrowSouthWest,n.northArrowSouthEast,n.viewportStickyNorth],limiter:t.document.body,fitInViewport:!0},e),r=Pf._getOptimalPosition(i)||If,s=parseInt(r.left),a=parseInt(r.top),l=r.name,c=r.config||{},{withArrow:d=!0}=c;return this.top=a,this.left=s,this.position=l,this.withArrow=d,!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;const o=Mf(e.target),n=e.limiter?Mf(e.limiter):t.document.body;if(this.listenTo(t.document,"scroll",((t,i)=>{const r=i.target,s=o&&r.contains(o),a=n&&r.contains(n);!s&&!a&&o&&n||this.attachTo(e)}),{useCapture:!0}),this.listenTo(t.window,"resize",(()=>{this.attachTo(e)})),o&&!this._resizeObserver){const e=()=>{ti(o)||this.unpin()};this._resizeObserver=new Zn(o,e)}return!0}_stopPinning(){this.stopListening(t.document,"scroll"),this.stopListening(t.window,"resize"),this._resizeObserver&&(this._resizeObserver.destroy(),this._resizeObserver=null)}static generatePositions(e={}){const{sideOffset:t=Pf.arrowSideOffset,heightOffset:o=Pf.arrowHeightOffset,stickyVerticalOffset:n=Pf.stickyVerticalOffset,config:i}=e;return{northWestArrowSouthWest:(e,o)=>({top:r(e,o),left:e.left-t,name:"arrow_sw",...i&&{config:i}}),northWestArrowSouthMiddleWest:(e,o)=>({top:r(e,o),left:e.left-.25*o.width-t,name:"arrow_smw",...i&&{config:i}}),northWestArrowSouth:(e,t)=>({top:r(e,t),left:e.left-t.width/2,name:"arrow_s",...i&&{config:i}}),northWestArrowSouthMiddleEast:(e,o)=>({top:r(e,o),left:e.left-.75*o.width+t,name:"arrow_sme",...i&&{config:i}}),northWestArrowSouthEast:(e,o)=>({top:r(e,o),left:e.left-o.width+t,name:"arrow_se",...i&&{config:i}}),northArrowSouthWest:(e,o)=>({top:r(e,o),left:e.left+e.width/2-t,name:"arrow_sw",...i&&{config:i}}),northArrowSouthMiddleWest:(e,o)=>({top:r(e,o),left:e.left+e.width/2-.25*o.width-t,name:"arrow_smw",...i&&{config:i}}),northArrowSouth:(e,t)=>({top:r(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s",...i&&{config:i}}),northArrowSouthMiddleEast:(e,o)=>({top:r(e,o),left:e.left+e.width/2-.75*o.width+t,name:"arrow_sme",...i&&{config:i}}),northArrowSouthEast:(e,o)=>({top:r(e,o),left:e.left+e.width/2-o.width+t,name:"arrow_se",...i&&{config:i}}),northEastArrowSouthWest:(e,o)=>({top:r(e,o),left:e.right-t,name:"arrow_sw",...i&&{config:i}}),northEastArrowSouthMiddleWest:(e,o)=>({top:r(e,o),left:e.right-.25*o.width-t,name:"arrow_smw",...i&&{config:i}}),northEastArrowSouth:(e,t)=>({top:r(e,t),left:e.right-t.width/2,name:"arrow_s",...i&&{config:i}}),northEastArrowSouthMiddleEast:(e,o)=>({top:r(e,o),left:e.right-.75*o.width+t,name:"arrow_sme",...i&&{config:i}}),northEastArrowSouthEast:(e,o)=>({top:r(e,o),left:e.right-o.width+t,name:"arrow_se",...i&&{config:i}}),southWestArrowNorthWest:e=>({top:s(e),left:e.left-t,name:"arrow_nw",...i&&{config:i}}),southWestArrowNorthMiddleWest:(e,o)=>({top:s(e),left:e.left-.25*o.width-t,name:"arrow_nmw",...i&&{config:i}}),southWestArrowNorth:(e,t)=>({top:s(e),left:e.left-t.width/2,name:"arrow_n",...i&&{config:i}}),southWestArrowNorthMiddleEast:(e,o)=>({top:s(e),left:e.left-.75*o.width+t,name:"arrow_nme",...i&&{config:i}}),southWestArrowNorthEast:(e,o)=>({top:s(e),left:e.left-o.width+t,name:"arrow_ne",...i&&{config:i}}),southArrowNorthWest:e=>({top:s(e),left:e.left+e.width/2-t,name:"arrow_nw",...i&&{config:i}}),southArrowNorthMiddleWest:(e,o)=>({top:s(e),left:e.left+e.width/2-.25*o.width-t,name:"arrow_nmw",...i&&{config:i}}),southArrowNorth:(e,t)=>({top:s(e),left:e.left+e.width/2-t.width/2,name:"arrow_n",...i&&{config:i}}),southArrowNorthMiddleEast:(e,o)=>({top:s(e),left:e.left+e.width/2-.75*o.width+t,name:"arrow_nme",...i&&{config:i}}),southArrowNorthEast:(e,o)=>({top:s(e),left:e.left+e.width/2-o.width+t,name:"arrow_ne",...i&&{config:i}}),southEastArrowNorthWest:e=>({top:s(e),left:e.right-t,name:"arrow_nw",...i&&{config:i}}),southEastArrowNorthMiddleWest:(e,o)=>({top:s(e),left:e.right-.25*o.width-t,name:"arrow_nmw",...i&&{config:i}}),southEastArrowNorth:(e,t)=>({top:s(e),left:e.right-t.width/2,name:"arrow_n",...i&&{config:i}}),southEastArrowNorthMiddleEast:(e,o)=>({top:s(e),left:e.right-.75*o.width+t,name:"arrow_nme",...i&&{config:i}}),southEastArrowNorthEast:(e,o)=>({top:s(e),left:e.right-o.width+t,name:"arrow_ne",...i&&{config:i}}),westArrowEast:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.left-t.width-o,name:"arrow_e",...i&&{config:i}}),eastArrowWest:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.right+o,name:"arrow_w",...i&&{config:i}}),viewportStickyNorth:(e,t,o,r)=>{const s=r||o;return e.getIntersection(s)?s.height-e.height>n?null:{top:s.top+n,left:e.left+e.width/2-t.width/2,name:"arrowless",config:{withArrow:!1,...i}}:null}};function r(e,t){return e.top-t.height-o}function s(e){return e.bottom+o}}}Pf.arrowSideOffset=25,Pf.arrowHeightOffset=10,Pf.stickyVerticalOffset=20,Pf._getOptimalPosition=oi,Pf.defaultPositions=Pf.generatePositions();const Ff=Pf;function Mf(e){return Bn(e)?e:Ln(e)?e.commonAncestorContainer:"function"==typeof e?Mf(e()):null}var Rf=i(4650),zf={attributes:{"data-cke":!0}};zf.setAttributes=Ar(),zf.insert=_r().bind(null,"head"),zf.domAPI=kr(),zf.insertStyleElement=vr();fr()(Rf.A,zf);Rf.A&&Rf.A.locals&&Rf.A.locals;const Vf="ck-tooltip";class Of extends(Rn()){constructor(e){if(super(),this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._mutationObserver=null,Of._editors.add(e),Of._instance)return Of._instance;Of._instance=this,this.tooltipTextView=new pm(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 Ff(e.locale),this.balloonPanelView.class=Vf,this.balloonPanelView.content.add(this.tooltipTextView),this._mutationObserver=function(e){const t=new MutationObserver((()=>{e()}));return{attach(e){t.observe(e,{attributes:!0,attributeFilter:["data-cke-tooltip-text","data-cke-tooltip-position"]})},detach(){t.disconnect()}}}((()=>{this._updateTooltipPosition()})),this._pinTooltipDebounced=el(this._pinTooltip,600),this._unpinTooltipDebounced=el(this._unpinTooltip,400),this.listenTo(t.document,"keydown",this._onKeyDown.bind(this),{useCapture:!0}),this.listenTo(t.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(t.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(t.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(t.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(t.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(e){const t=e.ui.view&&e.ui.view.body;Of._editors.delete(e),this.stopListening(e.ui),t&&t.has(this.balloonPanelView)&&t.remove(this.balloonPanelView),Of._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),Of._instance=null)}static getPositioningFunctions(e){const t=Of.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){"Escape"===t.key&&this._currentElementWithTooltip&&(this._unpinTooltip(),t.stopPropagation())}_onEnterOrFocus(e,{target:t}){const o=Lf(t);o?o!==this._currentElementWithTooltip&&(this._unpinTooltip(),"focus"!==e.name||o.matches(":hover")?this._pinTooltipDebounced(o,Hf(o)):this._pinTooltip(o,Hf(o))):"focus"===e.name&&this._unpinTooltip()}_onLeaveOrBlur(e,{target:t,relatedTarget:o}){if("mouseleave"===e.name){if(!Bn(t))return;const e=this.balloonPanelView.element,n=e&&(e===o||e.contains(o)),i=!n&&t===e;if(n)return void this._unpinTooltipDebounced.cancel();if(!i&&this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;const r=Lf(t),s=Lf(o);(i||r&&r!==s)&&this._unpinTooltipDebounced()}else{if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;this._unpinTooltipDebounced()}}_onScroll(e,{target:t}){this._currentElementWithTooltip&&(t.contains(this.balloonPanelView.element)&&t.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(e,{text:t,position:o,cssClass:n}){this._unpinTooltip();const i=Qi(Of._editors.values()).ui.view.body;i.has(this.balloonPanelView)||i.add(this.balloonPanelView),this.tooltipTextView.text=t,this.balloonPanelView.class=[Vf,n].filter((e=>e)).join(" "),this.balloonPanelView.pin({target:e,positions:Of.getPositioningFunctions(o)}),this._mutationObserver.attach(e);for(const e of Of._editors)this.listenTo(e.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=e,this._currentTooltipPosition=o}_unpinTooltip(){this._unpinTooltipDebounced.cancel(),this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const e of Of._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=Hf(this._currentElementWithTooltip);ti(this._currentElementWithTooltip)&&e.text?this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:Of.getPositioningFunctions(e.position)}):this._unpinTooltip()}}Of.defaultBalloonPositions=Ff.generatePositions({heightOffset:5,sideOffset:13}),Of._editors=new Set,Of._instance=null;const Nf=Of;function Lf(e){return Bn(e)?e.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}function Hf(e){return{text:e.dataset.ckeTooltipText,position:e.dataset.ckeTooltipPosition||"s",cssClass:e.dataset.ckeTooltipClass||""}}const jf=50,qf=350,Uf="Powered by";class Wf extends(Rn()){constructor(e){super(),this.editor=e,this._balloonView=null,this._lastFocusedEditableElement=null,this._showBalloonThrottled=Bh(this._showBalloon.bind(this),50,{leading:!0}),e.on("ready",this._handleEditorReady.bind(this))}destroy(){const e=this._balloonView;e&&(e.unpin(),this._balloonView=null),this._showBalloonThrottled.cancel(),this.stopListening()}_handleEditorReady(){const e=this.editor;(!!e.config.get("ui.poweredBy.forceVisible")||"VALID"!==function(e){function t(e){return e.length>=40&&e.length<=255?"VALID":"INVALID"}if(!e)return"INVALID";let o="";try{o=atob(e)}catch(e){return"INVALID"}const n=o.split("-"),i=n[0],r=n[1];if(!r)return t(e);try{atob(r)}catch(o){try{if(atob(i),!atob(i).length)return t(e)}catch(o){return t(e)}}if(i.length<40||i.length>255)return"INVALID";let s="";try{atob(i),s=atob(r)}catch(e){return"INVALID"}if(8!==s.length)return"INVALID";const a=Number(s.substring(0,4)),l=Number(s.substring(4,6))-1,c=Number(s.substring(6,8)),d=new Date(a,l,c);return d{this._updateLastFocusedEditableElement(),o?this._showBalloon():this._hideBalloon()})),e.ui.focusTracker.on("change:focusedElement",((e,t,o)=>{this._updateLastFocusedEditableElement(),o&&this._showBalloon()})),e.ui.on("update",(()=>{this._showBalloonThrottled()})))}_createBalloonView(){const e=this.editor,t=this._balloonView=new Ff,o=Kf(e),n=new $f(e.locale,o.label);t.content.add(n),t.set({class:"ck-powered-by-balloon"}),e.ui.view.body.add(t),e.ui.focusTracker.add(t.element),this._balloonView=t}_showBalloon(){if(!this._lastFocusedEditableElement)return;const e=function(e,t){const o=Kf(e),n="right"===o.side?function(e,t){return Gf(e,t,((e,o)=>e.left+e.width-o.width-t.horizontalOffset))}(t,o):function(e,t){return Gf(e,t,(e=>e.left+t.horizontalOffset))}(t,o);return{target:t,positions:[n]}}(this.editor,this._lastFocusedEditableElement);e&&(this._balloonView||this._createBalloonView(),this._balloonView.pin(e))}_hideBalloon(){this._balloonView&&this._balloonView.unpin()}_updateLastFocusedEditableElement(){const e=this.editor,t=e.ui.focusTracker.isFocused,o=e.ui.focusTracker.focusedElement;if(!t||!o)return void(this._lastFocusedEditableElement=null);const n=Array.from(e.ui.getEditableElementsNames()).map((t=>e.ui.getEditableElement(t)));n.includes(o)?this._lastFocusedEditableElement=o:this._lastFocusedEditableElement=n[0]}}class $f extends pm{constructor(e,t){super(e);const o=new Am,n=this.bindTemplate;o.set({content:' \n',isColorInherited:!1}),o.extendTemplate({attributes:{style:{width:"53px",height:"10px"}}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-powered-by"],"aria-hidden":!0},children:[{tag:"a",attributes:{href:"https://ckeditor.com/?utm_source=ckeditor&utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo",target:"_blank",tabindex:"-1"},children:[...t?[{tag:"span",attributes:{class:["ck","ck-powered-by__label"]},children:[t]}]:[],o],on:{dragstart:n.to((e=>e.preventDefault()))}}]})}}function Gf(e,t,o){return(n,i)=>{const r=new qn(e);if(r.width{for(const e of Object.values(Yf))this.announce("",e)}))}announce(e,t=Yf.POLITE){const o=this.editor;if(!o.ui.view)return;this.view||(this.view=new Xf(o.locale),o.ui.view.body.add(this.view));const{politeness:n,isUnsafeHTML:i}="string"==typeof t?{politeness:t}:t;let r=this.view.regionViews.find((e=>e.politeness===n));r||(r=new eb(o,n),this.view.regionViews.add(r)),r.announce({announcement:e,isUnsafeHTML:i})}}class Xf extends pm{constructor(e){super(e),this.regionViews=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-aria-live-announcer"]},children:this.regionViews})}}class eb extends pm{constructor(e,t){super(e.locale),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",(()=>{null!==this._pruneAnnouncementsInterval&&(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 o=document.createElement("li");t?this._domConverter.setContentOf(o,e):o.innerText=e,this._listElement.appendChild(o)}get _listElement(){return this.element.querySelector("ul")}}var tb=i(1214),ob={attributes:{"data-cke":!0}};ob.setAttributes=Ar(),ob.insert=_r().bind(null,"head"),ob.domAPI=kr(),ob.insertStyleElement=vr();fr()(tb.A,ob);tb.A&&tb.A.locals&&tb.A.locals;class nb extends mg{constructor(e,t){super(e);const o=this.bindTemplate;this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item"]},on:{mouseenter:o.to("mouseenter")}}),this.delegate("mouseenter").to(t)}}const ib={toggleMenusAndFocusItemsOnHover(e){e.on("menu:mouseenter",(t=>{if(e.isFocusBorderEnabled||e.isOpen){if(e.isOpen)for(const o of e.menus){const e=t.path[0],n=e instanceof nb&&e.children.first===o;o.isOpen=(t.path.includes(o)||n)&&o.isEnabled}t.source.focus()}}))},focusCycleMenusOnArrows(e){const t="rtl"===e.locale.uiLanguageDirection;function o(t,o){const n=e.children.getIndex(t),i=t.isOpen,r=e.children.length,s=e.children.get((n+r+o)%r);t.isOpen=!1,i&&(s.isOpen=!0),s.buttonView.focus()}e.on("menu:arrowright",(e=>{o(e.source,t?-1:1)})),e.on("menu:arrowleft",(e=>{o(e.source,t?1:-1)}))},closeMenusWhenTheBarCloses(e){e.on("change:isOpen",(()=>{e.isOpen||e.menus.forEach((e=>{e.isOpen=!1}))}))},closeMenuWhenAnotherOnTheSameLevelOpens(e){e.on("menu:change:isOpen",((t,o,n)=>{n&&e.menus.filter((e=>t.source.parentMenuView===e.parentMenuView&&t.source!==e&&e.isOpen)).forEach((e=>{e.isOpen=!1}))}))},closeOnClickOutside(e){gm({emitter:e,activator:()=>e.isOpen,callback:()=>e.close(),contextElements:()=>e.children.map((e=>e.element))})},enableFocusHighlightOnInteraction(e){let t=!1;e.on("change:isOpen",((o,n,i)=>{i||(e.isFocusBorderEnabled=!1,t=!1)})),e.listenTo(e.element,"click",(()=>{e.isOpen&&e.element.matches(":focus-within")&&(e.isFocusBorderEnabled=!0)}),{useCapture:!0}),e.listenTo(e.element,"keydown",(()=>{t=!0}),{useCapture:!0}),e.listenTo(e.element,"keyup",(()=>{t=!1}),{useCapture:!0}),e.listenTo(e.element,"focus",(()=>{t&&(e.isFocusBorderEnabled=!0)}),{useCapture:!0})}},rb={openAndFocusPanelOnArrowDownKey(e){e.keystrokes.set("arrowdown",((t,o)=>{e.focusTracker.focusedElement===e.buttonView.element&&(e.isOpen||(e.isOpen=!0),e.panelView.focus(),o())}))},openOnArrowRightKey(e){const t="rtl"===e.locale.uiLanguageDirection?"arrowleft":"arrowright";e.keystrokes.set(t,((t,o)=>{e.focusTracker.focusedElement===e.buttonView.element&&e.isEnabled&&(e.isOpen||(e.isOpen=!0),e.panelView.focus(),o())}))},openOnButtonClick(e){e.buttonView.on("execute",(()=>{e.isOpen=!0,e.parentMenuView&&e.panelView.focus()}))},toggleOnButtonClick(e){e.buttonView.on("execute",(()=>{e.isOpen=!e.isOpen}))},closeOnArrowLeftKey(e){const t="rtl"===e.locale.uiLanguageDirection?"arrowright":"arrowleft";e.keystrokes.set(t,((t,o)=>{e.isOpen&&(e.isOpen=!1,e.focus(),o())}))},closeOnEscKey(e){e.keystrokes.set("esc",((t,o)=>{e.isOpen&&(e.isOpen=!1,e.focus(),o())}))},closeOnParentClose(e){e.parentMenuView.on("change:isOpen",((t,o,n)=>{n||t.source!==e.parentMenuView||(e.isOpen=!1)}))}},sb={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"}),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"}),eastSouth:e=>({top:e.top,left:e.right-5,name:"es"}),eastNorth:(e,t)=>({top:e.top-t.height,left:e.right-5,name:"en"}),westSouth:(e,t)=>({top:e.top,left:e.left-t.width+5,name:"ws"}),westNorth:(e,t)=>({top:e.top-t.height,left:e.left-t.width+5,name:"wn"})},ab=[{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:"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:comment","menuBar:insertMergeField"]},{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 lb({normalizedConfig:e,locale:t,componentFactory:o,extraItems:n}){const i=Fl(e);return cb(e,i,n),function(e,t){const o=t.removeItems,n=[];t.items=t.items.filter((({menuId:e})=>!o.includes(e)||(n.push(e),!1))),mb(t.items,(e=>{e.groups=e.groups.filter((({groupId:e})=>!o.includes(e)||(n.push(e),!1)));for(const t of e.groups)t.items=t.items.filter((e=>{const t=bb(e);return!o.includes(t)||(n.push(t),!1)}))}));for(const t of o)n.includes(t)||D("menu-bar-item-could-not-be-removed",{menuBarConfig:e,itemName:t})}(e,i),cb(e,i,i.addItems),function(e,t,o){mb(t.items,(n=>{for(const i of n.groups)i.items=i.items.filter((i=>{const r="string"==typeof i&&!o.has(i);return r&&!t.isUsingDefaultConfig&&D("menu-bar-item-unavailable",{menuBarConfig:e,parentMenuConfig:Fl(n),componentName:i}),!r}))}))}(e,i,o),ub(e,i),function(e,t){const o=t.t,n={File:o({string:"File",id:"MENU_BAR_MENU_FILE"}),Edit:o({string:"Edit",id:"MENU_BAR_MENU_EDIT"}),View:o({string:"View",id:"MENU_BAR_MENU_VIEW"}),Insert:o({string:"Insert",id:"MENU_BAR_MENU_INSERT"}),Format:o({string:"Format",id:"MENU_BAR_MENU_FORMAT"}),Tools:o({string:"Tools",id:"MENU_BAR_MENU_TOOLS"}),Help:o({string:"Help",id:"MENU_BAR_MENU_HELP"}),Text:o({string:"Text",id:"MENU_BAR_MENU_TEXT"}),Font:o({string:"Font",id:"MENU_BAR_MENU_FONT"})};mb(e.items,(e=>{e.label in n&&(e.label=n[e.label])}))}(i,t),i}function cb(e,t,o){const n=[];if(0!=o.length){for(const e of o){const o=gb(e.position),r=fb(e.position);if("object"==typeof(i=e)&&"menu"in i)if(r){const i=t.items.findIndex((e=>e.menuId===r));if(-1!=i)"before"===o?(t.items.splice(i,0,e.menu),n.push(e)):"after"===o&&(t.items.splice(i+1,0,e.menu),n.push(e));else{db(t,e.menu,r,o)&&n.push(e)}}else"start"===o?(t.items.unshift(e.menu),n.push(e)):"end"===o&&(t.items.push(e.menu),n.push(e));else if(pb(e))mb(t.items,(t=>{if(t.menuId===r)"start"===o?(t.groups.unshift(e.group),n.push(e)):"end"===o&&(t.groups.push(e.group),n.push(e));else{const i=t.groups.findIndex((e=>e.groupId===r));-1!==i&&("before"===o?(t.groups.splice(i,0,e.group),n.push(e)):"after"===o&&(t.groups.splice(i+1,0,e.group),n.push(e)))}}));else{db(t,e.item,r,o)&&n.push(e)}}var i;for(const t of o)n.includes(t)||D("menu-bar-item-could-not-be-added",{menuBarConfig:e,addedItemConfig:t})}}function db(e,t,o,n){let i=!1;return mb(e.items,(e=>{for(const{groupId:r,items:s}of e.groups){if(i)return;if(r===o)"start"===n?(s.unshift(t),i=!0):"end"===n&&(s.push(t),i=!0);else{const e=s.findIndex((e=>bb(e)===o));-1!==e&&("before"===n?(s.splice(e,0,t),i=!0):"after"===n&&(s.splice(e+1,0,t),i=!0))}}})),i}function ub(e,t){const o=t.isUsingDefaultConfig;let n=!1;t.items=t.items.filter((t=>!!t.groups.length||(hb(e,t,o),!1))),t.items.length?(mb(t.items,(t=>{t.groups=t.groups.filter((e=>!!e.items.length||(n=!0,!1)));for(const i of t.groups)i.items=i.items.filter((t=>!(kb(t)&&!t.groups.length)||(hb(e,t,o),n=!0,!1)))})),n&&ub(e,t)):hb(e,e,o)}function hb(e,t,o){o||D("menu-bar-menu-empty",{menuBarConfig:e,emptyMenuConfig:t})}function mb(e,t){if(Array.isArray(e))for(const t of e)o(t);function o(e){t(e);for(const t of e.groups)for(const e of t.items)kb(e)&&o(e)}}function pb(e){return"object"==typeof e&&"group"in e}function gb(e){return e.startsWith("start")?"start":e.startsWith("end")?"end":e.startsWith("after")?"after":"before"}function fb(e){const t=e.match(/^[^:]+:(.+)/);return t?t[1]:null}function bb(e){return"string"==typeof e?e:e.menuId}function kb(e){return"object"==typeof e&&"menuId"in e}class wb extends(Y()){constructor(e){super(),this.isReady=!1,this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[],this._extraMenuBarElements=[],this._lastFocusedForeignElement=null;const t=e.editing.view;this.editor=e,this.componentFactory=new Ef(e),this.focusTracker=new Xi,this.tooltipManager=new Nf(e),this.poweredBy=new Wf(e),this.ariaLiveAnnouncer=new Qf(e),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.once("ready",(()=>{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();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 o=()=>{this.editor.editing.view.getDomRoot(e)||this.editor.keystrokes.listenTo(t)};this.isReady?o():this.once("ready",o)}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.element),this.editor.keystrokes.listenTo(e.element)):e.once("render",(()=>{this.focusTracker.add(e.element),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 o=function(e){let t;return t="items"in e&&e.items?{items:e.items,removeItems:[],addItems:[],isVisible:!0,isUsingDefaultConfig:!1,...e}:{items:Fl(ab),addItems:[],removeItems:[],isVisible:!0,isUsingDefaultConfig:!0,...e},t}(this.editor.config.get("menuBar")||{});e.fillFromConfig(o,this.componentFactory,this._extraMenuBarElements),this.editor.keystrokes.set("Esc",((e,o)=>{t.contains(this.editor.ui.focusTracker.focusedElement)&&(this._lastFocusedForeignElement?(this._lastFocusedForeignElement.focus(),this._lastFocusedForeignElement=null):this.editor.editing.view.focus(),o())})),this.editor.keystrokes.set("Alt+F9",((o,n)=>{t.contains(this.editor.ui.focusTracker.focusedElement)||(this._saveLastFocusedForeignElement(),e.isFocusBorderEnabled=!0,e.focus(),n())}))}_readViewportOffsetFromConfig(){const e=this.editor,t=e.config.get("ui.viewportOffset");if(t)return t;const o=e.config.get("toolbar.viewportTopOffset");return o?(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:o}):{top:0}}_initFocusTracking(){const e=this.editor;e.editing.view;let t;e.keystrokes.set("Alt+F10",((e,o)=>{this._saveLastFocusedForeignElement();const n=this._getCurrentFocusedToolbarDefinition();n&&t||(t=this._getFocusableCandidateToolbarDefinitions());for(let e=0;e{const n=this._getCurrentFocusedToolbarDefinition();n&&(this._lastFocusedForeignElement?(this._lastFocusedForeignElement.focus(),this._lastFocusedForeignElement=null):e.editing.view.focus(),n.options.afterBlur&&n.options.afterBlur(),o())}))}_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:o,options:n}=t;(ti(o.element)||n.beforeFocus)&&e.push(t)}return e.sort(((e,t)=>_b(e)-_b(t))),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:o}}=e;return o&&o(),!!ti(t.element)&&(t.focus(),!0)}_handleScrollToTheSelection(e,t){const o={top:0,bottom:0,left:0,right:0,...this.viewportOffset};t.viewportOffset.top+=o.top,t.viewportOffset.bottom+=o.bottom,t.viewportOffset.left+=o.left,t.viewportOffset.right+=o.right}}function _b(e){const{toolbarView:t,options:o}=e;let n=10;return ti(t.element)&&n--,o.isContextual&&n--,n}var yb=i(178),Ab={attributes:{"data-cke":!0}};Ab.setAttributes=Ar(),Ab.insert=_r().bind(null,"head"),Ab.domAPI=kr(),Ab.insertStyleElement=vr();fr()(yb.A,Ab);yb.A&&yb.A.locals&&yb.A.locals;class Cb extends pm{constructor(e){super(e),this.body=new pp(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}class vb extends pm{constructor(e,t,o){super(e),this.name=null,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=o,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;function t(t){e.change((o=>{const n=e.document.getRoot(t.name);o.addClass(t.isFocused?"ck-focused":"ck-blurred",n),o.removeClass(t.isFocused?"ck-blurred":"ck-focused",n)}))}e.isRenderingInProgress?function o(n){e.once("change:isRenderingInProgress",((e,i,r)=>{r?o(n):t(n)}))}(this):t(this)}}class xb extends vb{constructor(e,t,o,n={}){super(e,t,o);const i=e.t;this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}}),this._generateLabel=n.label||(()=>i("Editor editing area: %0",this.name))}render(){super.render();const e=this._editingView;e.change((t=>{const o=e.document.getRoot(this.name);t.setAttribute("aria-label",this._generateLabel(this),o)}))}}class Eb extends pr{static get pluginName(){return"Notification"}init(){this.on("show:warning",((e,t)=>{window.alert(t.message)}),{priority:"lowest"})}showSuccess(e,t={}){this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){const t=e.namespace?`show:${e.type}:${e.namespace}`:`show:${e.type}`;this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}class Db extends(Y()){constructor(e,t){super(),t&&Oa(this,t),e&&this.set(e)}}var Bb=i(9938),Sb={attributes:{"data-cke":!0}};Sb.setAttributes=Ar(),Sb.insert=_r().bind(null,"head"),Sb.domAPI=kr(),Sb.insertStyleElement=vr();fr()(Bb.A,Sb);Bb.A&&Bb.A.locals&&Bb.A.locals;var Tb=i(3579),Ib={attributes:{"data-cke":!0}};Ib.setAttributes=Ar(),Ib.insert=_r().bind(null,"head"),Ib.domAPI=kr(),Ib.insertStyleElement=vr();fr()(Tb.A,Ib);Tb.A&&Tb.A.locals&&Tb.A.locals;const Pb=Yn("px");class Fb extends lr{static get pluginName(){return"ContextualBalloon"}constructor(e){super(e),this._viewToStack=new Map,this._idToStack=new Map,this._view=null,this._rotatorView=null,this._fakePanelsView=null,this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this.set("visibleView",null),this.set("_numberOfStacks",0),this.set("_singleViewMode",!1)}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 E("contextualballoon-add-view-exist",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));const o=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),o.set(e.view,e),this._viewToStack.set(e.view,o),o===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new E("contextualballoon-remove-view-not-exist",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(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._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new E("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}_createPanelView(){this._view=new Ff(this.editor.locale),this.editor.ui.view.body.add(this._view),this.editor.ui.focusTracker.add(this._view.element),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((t=>t[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 Mb(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>1)),e.on("change:isNavigationVisible",(()=>this.updatePosition()),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",((e,o)=>{if(o<2)return"";const n=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[n,o])})),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 Rb(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>=2?Math.min(e-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:o=!0,singleViewMode:n=!1}){this.view.class=t,this.view.withArrow=o,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),n&&(this._singleViewMode=!0)}_getBalloonPosition(){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}}class Mb extends pm{constructor(e){super(e);const t=e.t,o=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new Xi,this.buttonPrevView=this._createButtonView(t("Previous"),qh.previousArrow),this.buttonNextView=this._createButtonView(t("Next"),qh.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",o.to("isNavigationVisible",(e=>e?"":"ck-hidden"))]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:o.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 o=new Em(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o}}class Rb extends pm{constructor(e,t){super(e);const o=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",o.to("numberOfPanels",(e=>e?"":"ck-hidden"))],style:{top:o.to("top",Pb),left:o.to("left",Pb),width:o.to("width",Pb),height:o.to("height",Pb)}},children:this.content}),this.on("change:numberOfPanels",((e,t,o,n)=>{o>n?this._addPanels(o-n):this._removePanels(n-o),this.updatePosition()}))}_addPanels(e){for(;e--;){const e=new pm;e.setTemplate({tag:"div"}),this.content.add(e),this.registerChild(e)}}_removePanels(e){for(;e--;){const e=this.content.last;this.content.remove(e),this.deregisterChild(e),e.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:o,height:n}=new qn(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:o,height:n})}}}var zb=i(7289),Vb={attributes:{"data-cke":!0}};Vb.setAttributes=Ar(),Vb.insert=_r().bind(null,"head"),Vb.domAPI=kr(),Vb.insertStyleElement=vr();fr()(zb.A,Vb);zb.A&&zb.A.locals&&zb.A.locals;class Ob extends jp{constructor(e,t){const o=e.t,n=Object.assign({},{showResetButton:!0,showIcon:!0,creator:Fg},t);super(e,n.creator),this.label=t.label,this._viewConfig=n,this._viewConfig.showIcon&&(this.iconView=new Am,this.iconView.content=qh.loupe,this.fieldWrapperChildren.add(this.iconView,0),this.extendTemplate({attributes:{class:"ck-search__query_with-icon"}})),this._viewConfig.showResetButton&&(this.resetButtonView=new Em(e),this.resetButtonView.set({label:o("Clear"),icon:qh.cancel,class:"ck-search__reset",isVisible:!1,tooltip:!0}),this.resetButtonView.on("execute",(()=>{this.reset(),this.focus(),this.fire("reset")})),this.resetButtonView.bind("isVisible").to(this.fieldView,"isEmpty",(e=>!e)),this.fieldWrapperChildren.add(this.resetButtonView),this.extendTemplate({attributes:{class:"ck-search__query_with-reset"}}))}reset(){this.fieldView.reset(),this._viewConfig.showResetButton&&(this.resetButtonView.isVisible=!1)}}class Nb extends pm{constructor(){super();const e=this.bindTemplate;this.set({isVisible:!1,primaryText:"",secondaryText:""}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search__info",e.if("isVisible","ck-hidden",(e=>!e))],tabindex:-1},children:[{tag:"span",children:[{text:[e.to("primaryText")]}]},{tag:"span",children:[{text:[e.to("secondaryText")]}]}]})}focus(){this.element.focus()}}class Lb extends pm{constructor(e){super(e),this.children=this.createCollection(),this.focusTracker=new Xi,this.setTemplate({tag:"div",attributes:{class:["ck","ck-search__results"],tabindex:-1},children:this.children}),this._focusCycler=new Im({focusables:this.children,focusTracker:this.focusTracker})}render(){super.render();for(const e of this.children)this.focusTracker.add(e.element)}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}var Hb=/[\\^$.*+?()[\]{}|]/g,jb=RegExp(Hb.source);const qb=function(e){return(e=rs(e))&&jb.test(e)?e.replace(Hb,"\\$&"):e};var Ub=i(5540),Wb={attributes:{"data-cke":!0}};Wb.setAttributes=Ar(),Wb.insert=_r().bind(null,"head"),Wb.domAPI=kr(),Wb.insertStyleElement=vr();fr()(Ub.A,Wb);Ub.A&&Ub.A.locals&&Ub.A.locals;class $b extends pm{constructor(e,t){super(e),this._config=t,this.filteredView=t.filteredView,this.queryView=this._createSearchTextQueryView(),this.focusTracker=new Xi,this.keystrokes=new er,this.resultsView=new Lb(e),this.children=this.createCollection(),this.focusableChildren=this.createCollection([this.queryView,this.resultsView]),this.set("isEnabled",!0),this.set("resultsCount",0),this.set("totalItemsCount",0),t.infoView&&t.infoView.instance?this.infoView=t.infoView.instance:(this.infoView=new Nb,this._enableDefaultInfoViewBehavior(),this.on("render",(()=>{this.search("")}))),this.resultsView.children.addMany([this.infoView,this.filteredView]),this.focusCycler=new Im({focusables:this.focusableChildren,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.on("search",((e,{resultsCount:t,totalItemsCount:o})=>{this.resultsCount=t,this.totalItemsCount=o})),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search",t.class||null],tabindex:"-1"},children:this.children})}render(){super.render(),this.children.addMany([this.queryView,this.resultsView]);const e=e=>e.stopPropagation();for(const e of this.focusableChildren)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}focus(){this.queryView.focus()}reset(){this.queryView.reset(),this.search(""),this.filteredView.element.scrollTo(0,0)}search(e){const t=e?new RegExp(qb(e),"ig"):null,o=this.filteredView.filter(t);this.fire("search",{query:e,...o})}_createSearchTextQueryView(){const e=new Ob(this.locale,this._config.queryView);return this.listenTo(e.fieldView,"input",(()=>{this.search(e.fieldView.element.value)})),e.on("reset",(()=>this.reset())),e.bind("isEnabled").to(this),e}_enableDefaultInfoViewBehavior(){const e=this.locale.t,t=this.infoView;function o(e,{query:t,resultsCount:o,totalItemsCount:n}){return"function"==typeof e?e(t,o,n):e}this.on("search",((n,i)=>{if(i.resultsCount)t.set({isVisible:!1});else{const n=this._config.infoView&&this._config.infoView.text;let r,s;i.totalItemsCount?n&&n.notFound?(r=n.notFound.primary,s=n.notFound.secondary):(r=e("No results found"),s=""):n&&n.noSearchableItems?(r=n.noSearchableItems.primary,s=n.noSearchableItems.secondary):(r=e("No searchable items"),s=""),t.set({primaryText:o(r,i),secondaryText:o(s,i),isVisible:!0})}}))}}var Gb=i(2688),Kb={attributes:{"data-cke":!0}};Kb.setAttributes=Ar(),Kb.insert=_r().bind(null,"head"),Kb.domAPI=kr(),Kb.insertStyleElement=vr();fr()(Gb.A,Kb);Gb.A&&Gb.A.locals&&Gb.A.locals;class Zb extends $b{constructor(e,o){super(e,o),this._config=o;const n=Yn("px");this.extendTemplate({attributes:{class:["ck-autocomplete"]}});const i=this.resultsView.bindTemplate;this.resultsView.set("isVisible",!1),this.resultsView.set("_position","s"),this.resultsView.set("_width",0),this.resultsView.extendTemplate({attributes:{class:[i.if("isVisible","ck-hidden",(e=>!e)),i.to("_position",(e=>`ck-search__results_${e}`))],style:{width:i.to("_width",n)}}}),this.focusTracker.on("change:isFocused",((e,t,n)=>{this._updateResultsVisibility(),n?this.resultsView.element.scrollTop=0:o.resetOnBlur&&this.queryView.reset()})),this.on("search",(()=>{this._updateResultsVisibility(),this._updateResultsViewWidthAndPosition()})),this.keystrokes.set("esc",((e,t)=>{this.resultsView.isVisible&&(this.queryView.focus(),this.resultsView.isVisible=!1,t())})),this.listenTo(t.document,"scroll",(()=>{this._updateResultsViewWidthAndPosition()})),this.on("change:isEnabled",(()=>{this._updateResultsVisibility()})),this.filteredView.on("execute",((e,{value:t})=>{this.focus(),this.reset(),this.queryView.fieldView.value=this.queryView.fieldView.element.value=t,this.resultsView.isVisible=!1})),this.resultsView.on("change:isVisible",(()=>{this._updateResultsViewWidthAndPosition()}))}_updateResultsViewWidthAndPosition(){if(!this.resultsView.isVisible)return;this.resultsView._width=new qn(this.queryView.fieldView.element).width;const e=Zb._getOptimalPosition({element:this.resultsView.element,target:this.queryView.element,fitInViewport:!0,positions:Zb.defaultResultsPositions});this.resultsView._position=e?e.name:"s"}_updateResultsVisibility(){const e=void 0===this._config.queryMinChars?0:this._config.queryMinChars,t=this.queryView.fieldView.element.value.length;this.resultsView.isVisible=this.focusTracker.isFocused&&this.isEnabled&&t>=e}}Zb.defaultResultsPositions=[e=>({top:e.bottom,left:e.left,name:"s"}),(e,t)=>({top:e.top-t.height,left:e.left,name:"n"})],Zb._getOptimalPosition=oi;Jb={"&":"&","<":"<",">":">",'"':""","'":"'"};var Jb;var Yb=/[&<>"']/g;RegExp(Yb.source);var Qb=i(1998),Xb={attributes:{"data-cke":!0}};Xb.setAttributes=Ar(),Xb.insert=_r().bind(null,"head"),Xb.domAPI=kr(),Xb.insertStyleElement=vr();fr()(Qb.A,Xb);Qb.A&&Qb.A.locals&&Qb.A.locals;var ek=i(5706),tk={attributes:{"data-cke":!0}};tk.setAttributes=Ar(),tk.insert=_r().bind(null,"head"),tk.domAPI=kr(),tk.insertStyleElement=vr();fr()(ek.A,tk);ek.A&&ek.A.locals&&ek.A.locals;var ok=i(9939),nk={attributes:{"data-cke":!0}};nk.setAttributes=Ar(),nk.insert=_r().bind(null,"head"),nk.domAPI=kr(),nk.insertStyleElement=vr();fr()(ok.A,nk);ok.A&&ok.A.locals&&ok.A.locals;var ik=i(5667),rk={attributes:{"data-cke":!0}};rk.setAttributes=Ar(),rk.insert=_r().bind(null,"head"),rk.domAPI=kr(),rk.insertStyleElement=vr();fr()(ik.A,rk);ik.A&&ik.A.locals&&ik.A.locals;class sk extends ep{constructor(e){super(e);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",(e=>String(e))),"data-cke-tooltip-disabled":t.to("isOn")},on:{mouseenter:t.to("mouseenter")}})}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new Am;return e.content=Ap,e.extendTemplate({attributes:{class:"ck-menu-bar__menu__button__arrow"}}),e}}var ak=i(4873),lk={attributes:{"data-cke":!0}};lk.setAttributes=Ar(),lk.insert=_r().bind(null,"head"),lk.domAPI=kr(),lk.insertStyleElement=vr();fr()(ak.A,lk);ak.A&&ak.A.locals&&ak.A.locals;class ck extends pm{constructor(e){super(e);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",(e=>`ck-menu-bar__menu__panel_position_${e}`)),t.if("isVisible","ck-hidden",(e=>!e))],tabindex:"-1"},children:this.children,on:{selectstart:t.to((e=>{"input"!==e.target.tagName.toLocaleLowerCase()&&e.preventDefault()}))}})}focus(e=1){this.children.length&&(1===e?this.children.first.focus():this.children.last.focus())}}var dk=i(55),uk={attributes:{"data-cke":!0}};uk.setAttributes=Ar(),uk.insert=_r().bind(null,"head"),uk.domAPI=kr(),uk.insertStyleElement=vr();fr()(dk.A,uk);dk.A&&dk.A.locals&&dk.A.locals;class hk extends pm{constructor(e){super(e);const t=this.bindTemplate;this.buttonView=new sk(e),this.buttonView.delegate("mouseenter").to(this),this.buttonView.bind("isOn","isEnabled").to(this,"isOpen","isEnabled"),this.panelView=new ck(e),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new er,this.focusTracker=new Xi,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",(e=>!e)),t.if("parentMenuView","ck-menu-bar__menu_top-level",(e=>!e))]},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),rb.closeOnEscKey(this),this._repositionPanelOnOpen()}_attachBehaviors(){this.parentMenuView?(rb.openOnButtonClick(this),rb.openOnArrowRightKey(this),rb.closeOnArrowLeftKey(this),rb.closeOnParentClose(this)):(this._propagateArrowKeystrokeEvents(),rb.openAndFocusPanelOnArrowDownKey(this),rb.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,o)=>{if(!o)return;const n=hk._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=n?n.name:this._panelPositions[0].name}))}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:e,southWest:t,northEast:o,northWest:n,westSouth:i,eastSouth:r,westNorth:s,eastNorth:a}=sb;return"ltr"===this.locale.uiLanguageDirection?this.parentMenuView?[r,a,i,s]:[e,t,o,n]:this.parentMenuView?[i,s,r,a]:[t,e,n,o]}}hk._getOptimalPosition=oi;const mk=hk;class pk extends kg{constructor(e){super(e),this.role="menu",this.items.on("change",this._setItemsCheckSpace.bind(this))}_setItemsCheckSpace(){const e=Array.from(this.items).some((e=>{const t=gk(e);return t&&t.isToggleable}));this.items.forEach((t=>{const o=gk(t);o&&(o.hasCheckSpace=e)}))}}function gk(e){return e instanceof mg?e.children.map((e=>function(e){return"object"==typeof e&&"buttonView"in e&&e.buttonView instanceof Em}(e)?e.buttonView:e)).find((e=>e instanceof ep)):null}class fk extends wp{constructor(e){super(e),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}var bk=i(4782),kk={attributes:{"data-cke":!0}};kk.setAttributes=Ar(),kk.insert=_r().bind(null,"head"),kk.domAPI=kr(),kk.insertStyleElement=vr();fr()(bk.A,kk);bk.A&&bk.A.locals&&bk.A.locals;const wk=["mouseenter","arrowleft","arrowright","change:isOpen"];class _k extends pm{constructor(e){super(e),this.menus=[];const t=e.t,o=this.bindTemplate;this.set({isOpen:!1,isFocusBorderEnabled:!1}),this._setupIsOpenUpdater(),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-menu-bar",o.if("isFocusBorderEnabled","ck-menu-bar_focus-border-enabled")],"aria-label":t("Editor menu bar"),role:"menubar"},children:this.children})}fillFromConfig(e,t,o=[]){const n=lb({normalizedConfig:e,locale:this.locale,componentFactory:t,extraItems:o}).items.map((e=>this._createMenu({componentFactory:t,menuDefinition:e})));this.children.addMany(n)}render(){super.render(),ib.toggleMenusAndFocusItemsOnHover(this),ib.closeMenusWhenTheBarCloses(this),ib.closeMenuWhenAnotherOnTheSameLevelOpens(this),ib.focusCycleMenusOnArrows(this),ib.closeOnClickOutside(this),ib.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(...wk).to(t),e.parentMenuView=t):e.delegate(...wk).to(this,(e=>"menu:"+e)),e._attachBehaviors(),this.menus.push(e)}_createMenu({componentFactory:e,menuDefinition:t,parentMenuView:o}){const n=this.locale,i=new mk(n);return this.registerMenu(i,o),i.buttonView.set({label:t.label}),i.once("change:isOpen",(()=>{const o=new pk(n);o.ariaLabel=t.label,i.panelView.children.add(o),o.items.addMany(this._createMenuItems({menuDefinition:t,parentMenuView:i,componentFactory:e}))})),i}_createMenuItems({menuDefinition:e,parentMenuView:t,componentFactory:o}){const n=this.locale,i=[];for(const r of e.groups){for(const e of r.items){const r=new nb(n,t);if(U(e))r.children.add(this._createMenu({componentFactory:o,menuDefinition:e,parentMenuView:t}));else{const n=this._createMenuItemContentFromFactory({componentName:e,componentFactory:o,parentMenuView:t});if(!n)continue;r.children.add(n)}i.push(r)}r!==e.groups[e.groups.length-1]&&i.push(new pg(n))}return i}_createMenuItemContentFromFactory({componentName:e,parentMenuView:t,componentFactory:o}){const n=o.create(e);return n instanceof mk||n instanceof ip||n instanceof fk?(this._registerMenuTree(n,t),n.on("execute",(()=>{this.close()})),n):(D("menu-bar-component-unsupported",{componentName:e,componentView:n}),null)}_registerMenuTree(e,t){if(!(e instanceof mk))return void e.delegate("mouseenter").to(t);this.registerMenu(e,t);const o=e.panelView.children.filter((e=>e instanceof pk))[0];if(!o)return void e.delegate("mouseenter").to(t);const n=o.items.filter((e=>e instanceof mg));for(const t of n)this._registerMenuTree(t.children.get(0),e)}_setupIsOpenUpdater(){let e;this.on("menu:change:isOpen",((t,o,n)=>{clearTimeout(e),n?this.isOpen=!0:e=setTimeout((()=>{this.isOpen=Array.from(this.children).some((e=>e.isOpen))}),0)}))}}class yk extends wb{constructor(e,t){super(e),this.view=t}init(){const e=this.editor,t=this.view,o=e.editing.view,n=t.editable,i=o.document.getRoot();n.name=i.rootName,t.render();const r=n.element;this.setEditableElement(n.name,r),t.editable.bind("isFocused").to(this.focusTracker),o.attachDomRoot(r),this._initPlaceholder(),this._initToolbar(),this._initMenuBar(this.view.menuBarView),this.fire("ready")}destroy(){super.destroy();const e=this.view;this.editor.editing.view.detachDomRoot(e.editable.name),e.destroy()}_initToolbar(){const e=this.editor,t=this.view;t.toolbar.fillFromConfig(e.config.get("toolbar"),this.componentFactory),this.addToolbar(t.toolbar)}_initPlaceholder(){const e=this.editor,t=e.editing.view,o=t.document.getRoot(),n=e.config.get("placeholder");if(n){const e="string"==typeof n?n:n[o.rootName];e&&(o.placeholder=e)}Sr({view:t,element:o,isDirectHost:!1,keepOnFocus:!0})}}class Ak extends Cb{constructor(e,t,o={}){super(e);const n=e.t;this.toolbar=new cg(e,{shouldGroupWhenFull:o.shouldToolbarGroupWhenFull}),this.menuBarView=new _k(e),this.editable=new xb(e,t,o.editableElement,{label:e=>n("Rich Text Editor. Editing area: %0",e.name)}),this.toolbar.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:e.uiLanguageDirection}}),this.menuBarView.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:e.uiLanguageDirection}})}render(){super.render(),this.registerChild([this.menuBarView,this.toolbar,this.editable])}}class Ck extends(Hh(Lh)){constructor(e,t={}){if(!vk(e)&&void 0!==t.initialData)throw new E("editor-create-initial-data",null);super(t),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return vk(e)?(t=e,t instanceof HTMLTextAreaElement?t.value:t.innerHTML):e;var t}(e)),vk(e)&&(this.sourceElement=e,function(e,t){if(t.ckeditorInstance)throw new E("editor-source-element-already-used",e);t.ckeditorInstance=e,e.once("destroy",(()=>{delete t.ckeditorInstance}))}(this,e)),this.model.document.createRoot();const o=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=new Ak(this.locale,this.editing.view,{editableElement:this.sourceElement,shouldToolbarGroupWhenFull:o});this.ui=new yk(this,n)}destroy(){const e=this.getData();return this.ui.destroy(),super.destroy().then((()=>{this.sourceElement&&this.updateSourceElement(e)}))}static create(e,t={}){return new Promise((o=>{if(vk(e)&&"TEXTAREA"===e.tagName)throw new E("editor-wrong-element",null);const n=new this(e,t);o(n.initPlugins().then((()=>n.ui.init())).then((()=>n.data.init(n.config.get("initialData")))).then((()=>n.fire("ready"))).then((()=>n)))}))}}function vk(e){return Bn(e)}class xk extends(z()){constructor(){super(...arguments),this._stack=[]}add(e,t){const o=this._stack,n=o[0];this._insertDescriptor(e);const i=o[0];n===i||Ek(n,i)||this.fire("change:top",{oldDescriptor:n,newDescriptor:i,writer:t})}remove(e,t){const o=this._stack,n=o[0];this._removeDescriptor(e);const i=o[0];n===i||Ek(n,i)||this.fire("change:top",{oldDescriptor:n,newDescriptor:i,writer:t})}_insertDescriptor(e){const t=this._stack,o=t.findIndex((t=>t.id===e.id));if(Ek(e,t[o]))return;o>-1&&t.splice(o,1);let n=0;for(;t[n]&&Dk(t[n],e);)n++;t.splice(n,0,e)}_removeDescriptor(e){const t=this._stack,o=t.findIndex((t=>t.id===e));o>-1&&t.splice(o,1)}}function Ek(e,t){return e&&t&&e.priority==t.priority&&Bk(e.classes)==Bk(t.classes)}function Dk(e,t){return e.priority>t.priority||!(e.priorityBk(t.classes)}function Bk(e){return Array.isArray(e)?e.sort().join(","):e}const Sk="widget-type-around";function Tk(e,t,o){return!!e&&Rk(e)&&!o.isInline(t)}function Ik(e){return e.getAttribute(Sk)}const Pk=' ',Fk="ck-widget",Mk="ck-widget_selected";function Rk(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function zk(e,t,o={}){if(!e.is("containerElement"))throw new E("widget-to-widget-wrong-element-type",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass(Fk,e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=Hk,t.setCustomProperty("widgetLabel",[],e),o.label&&function(e,t){const o=e.getCustomProperty("widgetLabel");o.push(t)}(e,o.label),o.hasSelectionHandle&&function(e,t){const o=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(e){const t=this.toDomElement(e),o=new Am;return o.set("content",Pk),o.render(),t.appendChild(o.element),t}));t.insert(t.createPositionAt(e,0),o),t.addClass(["ck-widget_with-selection-handle"],e)}(e,t),Nk(e,t),e}function Vk(e,t,o){if(t.classes&&o.addClass(xi(t.classes),e),t.attributes)for(const n in t.attributes)o.setAttribute(n,t.attributes[n],e)}function Ok(e,t,o){if(t.classes&&o.removeClass(xi(t.classes),e),t.attributes)for(const n in t.attributes)o.removeAttribute(n,e)}function Nk(e,t,o=Vk,n=Ok){const i=new xk;i.on("change:top",((t,i)=>{i.oldDescriptor&&n(e,i.oldDescriptor,i.writer),i.newDescriptor&&o(e,i.newDescriptor,i.writer)}));t.setCustomProperty("addHighlight",((e,t,o)=>i.add(t,o)),e),t.setCustomProperty("removeHighlight",((e,t,o)=>i.remove(t,o)),e)}function Lk(e,t,o={}){return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],e),t.setAttribute("role","textbox",e),t.setAttribute("tabindex","-1",e),o.label&&t.setAttribute("aria-label",o.label,e),t.setAttribute("contenteditable",e.isReadOnly?"false":"true",e),e.on("change:isReadOnly",((o,n,i)=>{t.setAttribute("contenteditable",i?"false":"true",e)})),e.on("change:isFocused",((o,n,i)=>{i?t.addClass("ck-editor__nested-editable_focused",e):t.removeClass("ck-editor__nested-editable_focused",e)})),Nk(e,t),e}function Hk(){return null}function jk(e){const t=e=>{const{width:t,paddingLeft:o,paddingRight:n}=e.ownerDocument.defaultView.getComputedStyle(e);return parseFloat(t)-(parseFloat(o)||0)-(parseFloat(n)||0)},o=e.parentElement;if(!o)return 0;let n=t(o);let i=0,r=o;for(;isNaN(n);){if(r=r.parentElement,++i>5)return 0;n=t(r)}return n}class qk extends lr{static get pluginName(){return"OPMacroToc"}static get buttonName(){return"insertToc"}init(){const e=this.editor,t=e.model,o=e.conversion;t.schema.register("op-macro-toc",{allowWhere:"$block",isBlock:!0,isLimit:!0}),o.for("upcast").elementToElement({view:{name:"macro",classes:"toc"},model:"op-macro-toc"}),o.for("editingDowncast").elementToElement({model:"op-macro-toc",view:(e,{writer:t})=>zk(this.createTocViewElement(t),t,{label:this.label})}),o.for("dataDowncast").elementToElement({model:"op-macro-toc",view:(e,{writer:t})=>this.createTocDataElement(t)}),e.ui.componentFactory.add(qk.buttonName,(t=>{const o=new Em(t);return o.set({label:this.label,withText:!0}),o.on("execute",(()=>{e.model.change((t=>{const o=t.createElement("op-macro-toc",{});e.model.insertContent(o,e.model.document.selection)}))})),o}))}get label(){return window.I18n.t("js.editor.macro.toc")}createTocViewElement(e){const t=e.createText(this.label),o=e.createContainerElement("div");return e.insert(e.createPositionAt(o,0),t),o}createTocDataElement(e){return e.createContainerElement("macro",{class:"toc"})}}const Uk=Symbol("isOPEmbeddedTable");function Wk(e){const t=e.getSelectedElement();return!(!t||!function(e){return!!e.getCustomProperty(Uk)&&Rk(e)}(t))}function $k(e){return _.get(e.config,"_config.openProject.context.resource")}function Gk(e){return _.get(e.config,"_config.openProject.pluginContext")}function Kk(e,t){return Gk(e).services[t]}function Zk(e){return Kk(e,"pathHelperService")}function Jk(e){return Kk(e,"i18n")}class Yk extends lr{static get pluginName(){return"EmbeddedTableEditing"}static get buttonName(){return"insertEmbeddedTable"}init(){const e=this.editor,t=e.model,o=e.conversion,n=Gk(e);this.text={button:window.I18n.t("js.editor.macro.embedded_table.button"),macro_text:window.I18n.t("js.editor.macro.embedded_table.text")},t.schema.register("op-macro-embedded-table",{allowWhere:"$block",allowAttributes:["opEmbeddedTableQuery"],isBlock:!0,isObject:!0}),o.for("upcast").elementToElement({view:{name:"macro",classes:"embedded-table"},model:(e,{writer:t})=>{const o=e.getAttribute("data-query-props");return t.createElement("op-macro-embedded-table",{opEmbeddedTableQuery:o?JSON.parse(o):{}})}}),o.for("editingDowncast").elementToElement({model:"op-macro-embedded-table",view:(e,{writer:t})=>{return o=this.createEmbeddedTableView(t),n=t,this.label,n.setCustomProperty(Uk,!0,o),zk(o,n,{label:"your label here"});var o,n}}),o.for("dataDowncast").elementToElement({model:"op-macro-embedded-table",view:(e,{writer:t})=>this.createEmbeddedTableDataElement(e,t)}),e.ui.componentFactory.add(Yk.buttonName,(t=>{const o=new Em(t);return o.set({label:this.text.button,withText:!0}),o.on("execute",(()=>n.runInZone((()=>{n.services.externalQueryConfiguration.show({currentQuery:{},callback:t=>e.model.change((o=>{const n=o.createElement("op-macro-embedded-table",{opEmbeddedTableQuery:t});e.model.insertContent(n,e.model.document.selection)}))})})))),o}))}createEmbeddedTableView(e){const t=e.createText(this.text.macro_text),o=e.createContainerElement("div");return e.insert(e.createPositionAt(o,0),t),o}createEmbeddedTableDataElement(e,t){const o=e.getAttribute("opEmbeddedTableQuery")||{};return t.createContainerElement("macro",{class:"embedded-table","data-query-props":JSON.stringify(o)})}}class Qk{constructor(e,t=20){this._batch=null,this.model=e,this._size=0,this.limit=t,this._isLocked=!1,this._changeCallback=(e,t)=>{t.isLocal&&t.isUndoable&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}get size(){return this._size}input(e){this._size+=e,this._size>=this.limit&&this._reset(!0)}get isLocked(){return this._isLocked}lock(){this._isLocked=!0}unlock(){this._isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(e=!1){this.isLocked&&!e||(this._batch=null,this._size=0)}}class Xk extends dr{constructor(e,t){super(e),this._buffer=new Qk(e.model,t),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,o=t.document,n=e.text||"",i=n.length;let r=o.selection;if(e.selection?r=e.selection:e.range&&(r=t.createSelection(e.range)),!t.canEditAt(r))return;const s=e.resultRange;t.enqueueChange(this._buffer.batch,(e=>{this._buffer.lock();const a=Array.from(o.selection.getAttributes());t.deleteContent(r),n&&t.insertContent(e.createText(n,a),r),s?e.setSelection(s):r.is("documentSelection")||e.setSelection(r),this._buffer.unlock(),this._buffer.input(i)}))}}const ew=["insertText","insertReplacementText"],tw=[...ew,"insertCompositionText"];class ow extends za{constructor(e){super(e),this.focusObserver=e.getObserver(xl);const t=r.isAndroid?tw:ew,o=e.document;o.on("beforeinput",((n,i)=>{if(!this.isEnabled)return;const{data:r,targetRanges:s,inputType:a,domEvent:l}=i;if(!t.includes(a))return;this.focusObserver.flush();const c=new w(o,"insertText");o.fire(c,new Na(e,l,{text:r,selection:e.createSelection(s)})),c.stop.called&&n.stop()})),r.isAndroid||o.on("compositionend",((t,{data:n,domEvent:i})=>{this.isEnabled&&n&&o.fire("insertText",new Na(e,i,{text:n}))}),{priority:"lowest"})}observe(){}stopObserving(){}}class nw extends lr{static get pluginName(){return"Input"}init(){const e=this.editor,t=e.model,o=e.editing.view,n=e.editing.mapper,i=t.document.selection;this._compositionQueue=new iw(e),o.addObserver(ow);const s=new Xk(e,e.config.get("typing.undoStep")||20);e.commands.add("insertText",s),e.commands.add("input",s),this.listenTo(o.document,"insertText",((s,a)=>{o.document.isComposing||a.preventDefault(),r.isAndroid&&o.document.isComposing&&this._compositionQueue.flush("next beforeinput");const{text:l,selection:c}=a;let d;d=c?Array.from(c.getRanges()).map((e=>n.toModelRange(e))):Array.from(i.getRanges());let u=l;if(r.isAndroid){const e=Array.from(d[0].getItems()).reduce(((e,t)=>e+(t.is("$textProxy")?t.data:"")),"");if(e&&(e.length<=u.length?u.startsWith(e)&&(u=u.substring(e.length),d[0].start=d[0].start.getShiftedBy(e.length)):e.startsWith(u)&&(d[0].start=d[0].start.getShiftedBy(u.length),u="")),0==u.length&&d[0].isCollapsed)return}const h={text:u,selection:t.createSelection(d)};r.isAndroid&&o.document.isComposing?this._compositionQueue.push(h):(e.execute("insertText",h),o.scrollToTheSelection())})),r.isAndroid?this.listenTo(o.document,"keydown",((e,n)=>{!i.isCollapsed&&229==n.keyCode&&o.document.isComposing&&rw(t,s)})):this.listenTo(o.document,"compositionstart",(()=>{i.isCollapsed||rw(t,s)})),r.isAndroid?(this.listenTo(o.document,"mutations",((e,{mutations:t})=>{if(o.document.isComposing)for(const{node:e}of t){const t=sw(e,n),o=n.toModelElement(t);if(this._compositionQueue.isComposedElement(o))return void this._compositionQueue.flush("mutations")}})),this.listenTo(o.document,"compositionend",(()=>{this._compositionQueue.flush("composition end")})),this.listenTo(o.document,"compositionend",(()=>{const e=[];for(const t of this._compositionQueue.flushComposedElements()){const o=n.toViewElement(t);o&&e.push({type:"children",node:o})}e.length&&o.document.fire("mutations",{mutations:e})}),{priority:"lowest"})):this.listenTo(o.document,"compositionend",(()=>{o.document.fire("mutations",{mutations:[]})}),{priority:"lowest"})}destroy(){super.destroy(),this._compositionQueue.destroy()}}class iw{constructor(e){this.flushDebounced=el((()=>this.flush("timeout")),50),this._queue=[],this._compositionElements=new Set,this.editor=e}destroy(){for(this.flushDebounced.cancel(),this._compositionElements.clear();this._queue.length;)this.shift()}get length(){return this._queue.length}push(e){const t={text:e.text};if(e.selection){t.selectionRanges=[];for(const o of e.selection.getRanges())t.selectionRanges.push(cc.fromRange(o)),this._compositionElements.add(o.start.parent)}this._queue.push(t),this.flushDebounced()}shift(){const e=this._queue.shift(),t={text:e.text};if(e.selectionRanges){const o=e.selectionRanges.map((e=>function(e){const t=e.toRange();if(e.detach(),"$graveyard"==t.root.rootName)return null;return t}(e))).filter((e=>!!e));o.length&&(t.selection=this.editor.model.createSelection(o))}return t}flush(e){const t=this.editor,o=t.model,n=t.editing.view;if(this.flushDebounced.cancel(),!this._queue.length)return;const i=t.commands.get("insertText").buffer;o.enqueueChange(i.batch,(()=>{for(i.lock();this._queue.length;){const e=this.shift();t.execute("insertText",e)}i.unlock()})),n.scrollToTheSelection()}isComposedElement(e){return this._compositionElements.has(e)}flushComposedElements(){const e=Array.from(this._compositionElements);return this._compositionElements.clear(),e}}function rw(e,t){if(!t.isEnabled)return;const o=t.buffer;o.lock(),e.enqueueChange(o.batch,(()=>{e.deleteContent(e.document.selection)})),o.unlock()}function sw(e,t){let o=e.is("$text")?e.parent:e;for(;!t.toModelElement(o);)o=o.parent;return o}class aw extends dr{constructor(e,t){super(e),this.direction=t,this._buffer=new Qk(e.model,e.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,o=t.document;t.enqueueChange(this._buffer.batch,(n=>{this._buffer.lock();const i=n.createSelection(e.selection||o.selection);if(!t.canEditAt(i))return;const r=e.sequence||1,s=i.isCollapsed;if(i.isCollapsed&&t.modifySelection(i,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(r))return void this._replaceEntireContentWithParagraph(n);if(this._shouldReplaceFirstBlockWithParagraph(i,r))return void this.editor.execute("paragraph",{selection:i});if(i.isCollapsed)return;let a=0;i.getFirstRange().getMinimalFlatRanges().forEach((e=>{a+=ne(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))})),t.deleteContent(i,{doNotResetEntireContent:s,direction:this.direction}),this._buffer.input(a),n.setSelection(i),this._buffer.unlock()}))}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,o=t.document.selection,n=t.schema.getLimitElement(o);if(!(o.isCollapsed&&o.containsEntireContent(n)))return!1;if(!t.schema.checkChild(n,"paragraph"))return!1;const i=n.getChild(0);return!i||!i.is("element","paragraph")}_replaceEntireContentWithParagraph(e){const t=this.editor.model,o=t.document.selection,n=t.schema.getLimitElement(o),i=e.createElement("paragraph");e.remove(e.createRangeIn(n)),e.insert(i,n),e.setSelection(i,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const o=this.editor.model;if(t>1||"backward"!=this.direction)return!1;if(!e.isCollapsed)return!1;const n=e.getFirstPosition(),i=o.schema.getLimitElement(n),r=i.getChild(0);return n.parent==r&&(!!e.containsEntireContent(r)&&(!!o.schema.checkChild(i,"paragraph")&&"paragraph"!=r.name))}}const lw="word",cw="selection",dw="backward",uw="forward",hw={deleteContent:{unit:cw,direction:dw},deleteContentBackward:{unit:"codePoint",direction:dw},deleteWordBackward:{unit:lw,direction:dw},deleteHardLineBackward:{unit:cw,direction:dw},deleteSoftLineBackward:{unit:cw,direction:dw},deleteContentForward:{unit:"character",direction:uw},deleteWordForward:{unit:lw,direction:uw},deleteHardLineForward:{unit:cw,direction:uw},deleteSoftLineForward:{unit:cw,direction:uw}};class mw extends za{constructor(e){super(e);const t=e.document;let o=0;t.on("keydown",(()=>{o++})),t.on("keyup",(()=>{o=0})),t.on("beforeinput",((n,i)=>{if(!this.isEnabled)return;const{targetRanges:s,domEvent:a,inputType:l}=i,c=hw[l];if(!c)return;const d={direction:c.direction,unit:c.unit,sequence:o};d.unit==cw&&(d.selectionToRemove=e.createSelection(s[0])),"deleteContentBackward"===l&&(r.isAndroid&&(d.sequence=1),function(e){if(1!=e.length||e[0].isCollapsed)return!1;const t=e[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let o=0;for(const{nextPosition:e,item:n}of t){if(e.parent.is("$text")){const t=e.parent.data,n=e.offset;if(nr(t,n)||ir(t,n)||sr(t,n))continue;o++}else(n.is("containerElement")||n.is("emptyElement"))&&o++;if(o>1)return!0}return!1}(s)&&(d.unit=cw,d.selectionToRemove=e.createSelection(s)));const u=new Ms(t,"delete",s[0]);t.fire(u,new Na(e,a,d)),u.stop.called&&n.stop()})),r.isBlink&&function(e){const t=e.view,o=t.document;let n=null,i=!1;function r(e){return e==ki.backspace||e==ki.delete}function s(e){return e==ki.backspace?dw:uw}o.on("keydown",((e,{keyCode:t})=>{n=t,i=!1})),o.on("keyup",((a,{keyCode:l,domEvent:c})=>{const d=o.selection,u=e.isEnabled&&l==n&&r(l)&&!d.isCollapsed&&!i;if(n=null,u){const e=d.getFirstRange(),n=new Ms(o,"delete",e),i={unit:cw,direction:s(l),selectionToRemove:d};o.fire(n,new Na(t,c,i))}})),o.on("beforeinput",((e,{inputType:t})=>{const o=hw[t];r(n)&&o&&o.direction==s(n)&&(i=!0)}),{priority:"high"}),o.on("beforeinput",((e,{inputType:t,data:o})=>{n==ki.delete&&"insertText"==t&&""==o&&e.stop()}),{priority:"high"})}(this)}observe(){}stopObserving(){}}class pw extends lr{static get pluginName(){return"Delete"}init(){const e=this.editor,t=e.editing.view,o=t.document,n=e.model.document;t.addObserver(mw),this._undoOnBackspace=!1;const i=new aw(e,"forward");e.commands.add("deleteForward",i),e.commands.add("forwardDelete",i),e.commands.add("delete",new aw(e,"backward")),this.listenTo(o,"delete",((n,i)=>{o.isComposing||i.preventDefault();const{direction:r,sequence:s,selectionToRemove:a,unit:l}=i,c="forward"===r?"deleteForward":"delete",d={sequence:s};if("selection"==l){const t=Array.from(a.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));d.selection=e.model.createSelection(t)}else d.unit=l;e.execute(c,d),t.scrollToTheSelection()}),{priority:"low"}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(o,"delete",((t,o)=>{this._undoOnBackspace&&"backward"==o.direction&&1==o.sequence&&"codePoint"==o.unit&&(this._undoOnBackspace=!1,e.execute("undo"),o.preventDefault(),t.stop())}),{context:"$capture"}),this.listenTo(n,"change",(()=>{this._undoOnBackspace=!1})))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class gw extends lr{static get requires(){return[nw,pw]}static get pluginName(){return"Typing"}}function fw(e,t){let o=e.start;return{text:Array.from(e.getWalker({ignoreElementEnd:!1})).reduce(((e,{item:n})=>n.is("$text")||n.is("$textProxy")?e+n.data:(o=t.createPositionAfter(n),"")),""),range:t.createRange(o,e.end)}}class bw extends(Y()){constructor(e,t){super(),this.model=e,this.testCallback=t,this._hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",(()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))})),this._startListening()}get hasMatch(){return this._hasMatch}_startListening(){const e=this.model.document;this.listenTo(e.selection,"change:range",((t,{directChange:o})=>{o&&(e.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1))})),this.listenTo(e,"change:data",((e,t)=>{!t.isUndo&&t.isLocal&&this._evaluateTextBeforeSelection("data",{batch:t})}))}_evaluateTextBeforeSelection(e,t={}){const o=this.model,n=o.document.selection,i=o.createRange(o.createPositionAt(n.focus.parent,0),n.focus),{text:r,range:s}=fw(i,o),a=this.testCallback(r);if(!a&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!a,a){const o=Object.assign(t,{text:r,range:s});"object"==typeof a&&Object.assign(o,a),this.fire(`matched:${e}`,o)}}}class kw extends lr{static get pluginName(){return"TwoStepCaretMovement"}constructor(e){super(e),this._isNextGravityRestorationSkipped=!1,this.attributes=new Set,this._overrideUid=null}init(){const e=this.editor,t=e.model,o=e.editing.view,n=e.locale,i=t.document.selection;this.listenTo(o.document,"arrowKey",((e,t)=>{if(!i.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const o=t.keyCode==ki.arrowright,r=t.keyCode==ki.arrowleft;if(!o&&!r)return;const s=n.contentLanguageDirection;let a=!1;a="ltr"===s&&o||"rtl"===s&&r?this._handleForwardMovement(t):this._handleBackwardMovement(t),!0===a&&e.stop()}),{context:"$text",priority:"highest"}),this.listenTo(i,"change:range",((e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&vw(i.getFirstPosition(),this.attributes)||this._restoreGravity())})),this._enableClickingAfterNode(),this._enableInsertContentSelectionAttributesFixer(),this._handleDeleteContentAfterNode()}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,o=this.editor.model,n=o.document.selection,i=n.getFirstPosition();return!this._isGravityOverridden&&((!i.isAtStart||!ww(n,t))&&(!!vw(i,t)&&(Aw(e),ww(n,t)&&vw(i,t,!0)?yw(o,t):this._overrideGravity(),!0)))}_handleBackwardMovement(e){const t=this.attributes,o=this.editor.model,n=o.document.selection,i=n.getFirstPosition();return this._isGravityOverridden?(Aw(e),this._restoreGravity(),vw(i,t,!0)?yw(o,t):_w(o,t,i),!0):i.isAtStart?!!ww(n,t)&&(Aw(e),_w(o,t,i),!0):!ww(n,t)&&vw(i,t,!0)?(Aw(e),_w(o,t,i),!0):!!Cw(i,t)&&(i.isAtEnd&&!ww(n,t)&&vw(i,t)?(Aw(e),_w(o,t,i),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1))}_enableClickingAfterNode(){const e=this.editor,t=e.model,o=t.document.selection,n=e.editing.view.document;e.editing.view.addObserver(Nu);let i=!1;this.listenTo(n,"mousedown",(()=>{i=!0})),this.listenTo(n,"selectionChange",(()=>{const e=this.attributes;if(!i)return;if(i=!1,!o.isCollapsed)return;if(!ww(o,e))return;const n=o.getFirstPosition();vw(n,e)&&(n.isAtStart||vw(n,e,!0)?yw(t,e):this._isGravityOverridden||this._overrideGravity())}))}_enableInsertContentSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection,o=this.attributes;this.listenTo(e,"insertContent",(()=>{const n=t.getFirstPosition();ww(t,o)&&vw(n,o)&&yw(e,o)}),{priority:"low"})}_handleDeleteContentAfterNode(){const e=this.editor,t=e.model,o=t.document.selection,n=e.editing.view;let i=!1,r=!1;this.listenTo(n.document,"delete",((e,t)=>{i="backward"===t.direction}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{if(!i)return;const e=o.getFirstPosition();r=ww(o,this.attributes)&&!Cw(e,this.attributes)}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{i&&(i=!1,r||e.model.enqueueChange((()=>{const e=o.getFirstPosition();ww(o,this.attributes)&&vw(e,this.attributes)&&(e.isAtStart||vw(e,this.attributes,!0)?yw(t,this.attributes):this._isGravityOverridden||this._overrideGravity())})))}),{priority:"low"})}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change((e=>e.overrideSelectionGravity()))}_restoreGravity(){this.editor.model.change((e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null}))}}function ww(e,t){for(const o of t)if(e.hasAttribute(o))return!0;return!1}function _w(e,t,o){const n=o.nodeBefore;e.change((o=>{if(n){const t=[],i=e.schema.isObject(n)&&e.schema.isInline(n);for(const[o,r]of n.getAttributes())!e.schema.checkAttribute("$text",o)||i&&!1===e.schema.getAttributeProperties(o).copyFromObject||t.push([o,r]);o.setSelectionAttribute(t)}else o.removeSelectionAttribute(t)}))}function yw(e,t){e.change((e=>{e.removeSelectionAttribute(t)}))}function Aw(e){e.preventDefault()}function Cw(e,t){return vw(e.getShiftedBy(-1),t)}function vw(e,t,o=!1){const{nodeBefore:n,nodeAfter:i}=e;for(const e of t){const t=n?n.getAttribute(e):void 0,r=i?i.getAttribute(e):void 0;if((!o||void 0!==t&&void 0!==r)&&r!==t)return!0}return!1}xw('"'),xw("'"),xw("'"),xw('"'),xw('"'),xw("'");function xw(e){return new RegExp(`(^|\\s)(${e})([^${e}]*)(${e})$`)}function Ew(e,t,o,n){return n.createRange(Dw(e,t,o,!0,n),Dw(e,t,o,!1,n))}function Dw(e,t,o,n,i){let r=e.textNode||(n?e.nodeBefore:e.nodeAfter),s=null;for(;r&&r.getAttribute(t)==o;)s=r,r=n?r.previousSibling:r.nextSibling;return s?i.createPositionAt(s,n?"before":"after"):e}function Bw(e,t,o,n){const i=e.editing.view,r=new Set;i.document.registerPostFixer((i=>{const s=e.model.document.selection;let a=!1;if(s.hasAttribute(t)){const l=Ew(s.getFirstPosition(),t,s.getAttribute(t),e.model),c=e.editing.mapper.toViewRange(l);for(const e of c.getItems())e.is("element",o)&&!e.hasClass(n)&&(i.addClass(n,e),r.add(e),a=!0)}return a})),e.conversion.for("editingDowncast").add((e=>{function t(){i.change((e=>{for(const t of r.values())e.removeClass(n,t),r.delete(t)}))}e.on("insert",t,{priority:"highest"}),e.on("remove",t,{priority:"highest"}),e.on("attribute",t,{priority:"highest"}),e.on("selection",t,{priority:"highest"})}))}function*Sw(e,t){for(const o of t)o&&e.getAttributeProperties(o[0]).copyOnEnter&&(yield o)}class Tw extends dr{execute(){this.editor.model.change((e=>{this.enterBlock(e),this.fire("afterExecute",{writer:e})}))}enterBlock(e){const t=this.editor.model,o=t.document.selection,n=t.schema,i=o.isCollapsed,r=o.getFirstRange(),s=r.start.parent,a=r.end.parent;if(n.isLimit(s)||n.isLimit(a))return i||s!=a||t.deleteContent(o),!1;if(i){const t=Sw(e.model.schema,o.getAttributes());return Iw(e,r.start),e.setSelectionAttribute(t),!0}{const n=!(r.start.isAtStart&&r.end.isAtEnd),i=s==a;if(t.deleteContent(o,{leaveUnmerged:n}),n){if(i)return Iw(e,o.focus),!0;e.setSelection(a,0)}}return!1}}function Iw(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}const Pw={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class Fw extends za{constructor(e){super(e);const t=this.document;let o=!1;t.on("keydown",((e,t)=>{o=t.shiftKey})),t.on("beforeinput",((n,i)=>{if(!this.isEnabled)return;let s=i.inputType;r.isSafari&&o&&"insertParagraph"==s&&(s="insertLineBreak");const a=i.domEvent,l=Pw[s];if(!l)return;const c=new Ms(t,"enter",i.targetRanges[0]);t.fire(c,new Na(e,a,{isSoft:l.isSoft})),c.stop.called&&n.stop()}))}observe(){}stopObserving(){}}class Mw extends lr{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,o=t.document,n=this.editor.t;t.addObserver(Fw),e.commands.add("enter",new Tw(e)),this.listenTo(o,"enter",((n,i)=>{o.isComposing||i.preventDefault(),i.isSoft||(e.execute("enter"),t.scrollToTheSelection())}),{priority:"low"}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Insert a hard break (a new paragraph)"),keystroke:"Enter"}]})}}class Rw extends dr{execute(){const e=this.editor.model,t=e.document;e.change((o=>{!function(e,t,o){const n=o.isCollapsed,i=o.getFirstRange(),r=i.start.parent,s=i.end.parent,a=r==s;if(n){const n=Sw(e.schema,o.getAttributes());zw(e,t,i.end),t.removeSelectionAttribute(o.getAttributeKeys()),t.setSelectionAttribute(n)}else{const n=!(i.start.isAtStart&&i.end.isAtEnd);e.deleteContent(o,{leaveUnmerged:n}),a?zw(e,t,o.focus):n&&t.setSelection(s,0)}}(e,o,t.selection),this.fire("afterExecute",{writer:o})}))}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const o=t.anchor;if(!o||!e.checkChild(o,"softBreak"))return!1;const n=t.getFirstRange(),i=n.start.parent,r=n.end.parent;if((Vw(i,e)||Vw(r,e))&&i!==r)return!1;return!0}(e.schema,t.selection)}}function zw(e,t,o){const n=t.createElement("softBreak");e.insertContent(n,o),t.setSelection(n,"after")}function Vw(e,t){return!e.is("rootElement")&&(t.isLimit(e)||Vw(e.parent,t))}class Ow extends lr{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,o=e.conversion,n=e.editing.view,i=n.document,r=this.editor.t;t.register("softBreak",{allowWhere:"$text",isInline:!0}),o.for("upcast").elementToElement({model:"softBreak",view:"br"}),o.for("downcast").elementToElement({model:"softBreak",view:(e,{writer:t})=>t.createEmptyElement("br")}),n.addObserver(Fw),e.commands.add("shiftEnter",new Rw(e)),this.listenTo(i,"enter",((t,o)=>{i.isComposing||o.preventDefault(),o.isSoft&&(e.execute("shiftEnter"),n.scrollToTheSelection())}),{priority:"low"}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:r("Insert a soft break (a <br>
element)"),keystroke:"Shift+Enter"}]})}}var Nw=i(6779),Lw={attributes:{"data-cke":!0}};Lw.setAttributes=Ar(),Lw.insert=_r().bind(null,"head"),Lw.domAPI=kr(),Lw.insertStyleElement=vr();fr()(Nw.A,Lw);Nw.A&&Nw.A.locals&&Nw.A.locals;const Hw=["before","after"],jw=(new DOMParser).parseFromString(' ',"image/svg+xml").firstChild,qw="ck-widget__type-around_disabled";class Uw extends lr{constructor(){super(...arguments),this._currentFakeCaretModelElement=null}static get pluginName(){return"WidgetTypeAround"}static get requires(){return[Mw,pw]}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",((o,n,i)=>{t.change((e=>{for(const o of t.document.roots)i?e.removeClass(qw,o):e.addClass(qw,o)})),i||e.model.change((e=>{e.removeSelectionAttribute(Sk)}))})),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 o=this.editor,n=o.editing.view,i=o.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);o.execute("insertParagraph",{position:o.model.createPositionAt(e,t),attributes:i}),n.focus(),n.scrollToTheSelection()}_listenToIfEnabled(e,t,o,n){this.listenTo(e,t,((...e)=>{this.isEnabled&&o(...e)}),n)}_insertParagraphAccordingToFakeCaretPosition(){const e=this.editor.model.document.selection,t=Ik(e);if(!t)return!1;const o=e.getSelectedElement();return this._insertParagraph(o,t),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,o=e.locale.t,n={before:o("Insert paragraph before block"),after:o("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",((e,i,r)=>{const s=r.mapper.toViewElement(i.item);if(s&&Tk(s,i.item,t)){!function(e,t,o){const n=e.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(e){const o=this.toDomElement(e);return function(e,t){for(const o of Hw){const n=new Wh({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${o}`],title:t[o],"aria-hidden":"true"},children:[e.ownerDocument.importNode(jw,!0)]});e.appendChild(n.render())}}(o,t),function(e){const t=new Wh({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});e.appendChild(t.render())}(o),o}));e.insert(e.createPositionAt(o,"end"),n)}(r.writer,n,s);s.getCustomProperty("widgetLabel").push((()=>this.isEnabled?o("Press Enter to type after or press Shift + Enter to type before the widget"):""))}}),{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,o=t.document.selection,n=t.schema,i=e.editing.view;function r(e){return`ck-widget_type-around_show-fake-caret_${e}`}this._listenToIfEnabled(i.document,"arrowKey",((e,t)=>{this._handleArrowKeyPress(e,t)}),{context:[Rk,"$text"],priority:"high"}),this._listenToIfEnabled(o,"change:range",((t,o)=>{o.directChange&&e.model.change((e=>{e.removeSelectionAttribute(Sk)}))})),this._listenToIfEnabled(t.document,"change:data",(()=>{const t=o.getSelectedElement();if(t){if(Tk(e.editing.mapper.toViewElement(t),t,n))return}e.model.change((e=>{e.removeSelectionAttribute(Sk)}))})),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",((e,t,o)=>{const i=o.writer;if(this._currentFakeCaretModelElement){const e=o.mapper.toViewElement(this._currentFakeCaretModelElement);e&&(i.removeClass(Hw.map(r),e),this._currentFakeCaretModelElement=null)}const s=t.selection.getSelectedElement();if(!s)return;const a=o.mapper.toViewElement(s);if(!Tk(a,s,n))return;const l=Ik(t.selection);l&&(i.addClass(r(l),a),this._currentFakeCaretModelElement=s)})),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",((t,o,n)=>{n||e.model.change((e=>{e.removeSelectionAttribute(Sk)}))}))}_handleArrowKeyPress(e,t){const o=this.editor,n=o.model,i=n.document.selection,r=n.schema,s=o.editing.view,a=function(e,t){const o=Ci(e,t);return"down"===o||"right"===o}(t.keyCode,o.locale.contentLanguageDirection),l=s.document.selection.getSelectedElement();let c;Tk(l,o.editing.mapper.toModelElement(l),r)?c=this._handleArrowKeyPressOnSelectedWidget(a):i.isCollapsed?c=this._handleArrowKeyPressWhenSelectionNextToAWidget(a):t.shiftKey||(c=this._handleArrowKeyPressWhenNonCollapsedSelection(a)),c&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const t=this.editor.model,o=Ik(t.document.selection);return t.change((t=>{if(!o)return t.setSelectionAttribute(Sk,e?"after":"before"),!0;if(!(o===(e?"after":"before")))return t.removeSelectionAttribute(Sk),!0;return!1}))}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,o=t.model,n=o.schema,i=t.plugins.get("Widget"),r=i._getObjectElementNextToSelection(e);return!!Tk(t.editing.mapper.toViewElement(r),r,n)&&(o.change((t=>{i._setSelectionOverElement(r),t.setSelectionAttribute(Sk,e?"before":"after")})),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,o=t.model,n=o.schema,i=t.editing.mapper,r=o.document.selection,s=e?r.getLastPosition().nodeBefore:r.getFirstPosition().nodeAfter;return!!Tk(i.toViewElement(s),s,n)&&(o.change((t=>{t.setSelection(s,"on"),t.setSelectionAttribute(Sk,e?"after":"before")})),!0)}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",((o,n)=>{const i=n.domTarget.closest(".ck-widget__type-around__button");if(!i)return;const r=function(e){return e.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(i),s=function(e,t){const o=e.closest(".ck-widget");return t.mapDomToView(o)}(i,t.domConverter),a=e.editing.mapper.toModelElement(s);this._insertParagraph(a,r),n.preventDefault(),o.stop()}))}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,o=e.editing.view;this._listenToIfEnabled(o.document,"enter",((o,n)=>{if("atTarget"!=o.eventPhase)return;const i=t.getSelectedElement(),r=e.editing.mapper.toViewElement(i),s=e.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:Tk(r,i,s)&&(this._insertParagraph(i,n.isSoft?"before":"after"),a=!0),a&&(n.preventDefault(),o.stop())}),{context:Rk})}_enableInsertingParagraphsOnTypingKeystroke(){const e=this.editor.editing.view.document;this._listenToIfEnabled(e,"insertText",((t,o)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(o.selection=e.selection)}),{priority:"high"}),r.isAndroid?this._listenToIfEnabled(e,"keydown",((e,t)=>{229==t.keyCode&&this._insertParagraphAccordingToFakeCaretPosition()})):this._listenToIfEnabled(e,"compositionstart",(()=>{this._insertParagraphAccordingToFakeCaretPosition()}),{priority:"high"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,o=e.model,n=o.schema;this._listenToIfEnabled(t.document,"delete",((t,i)=>{if("atTarget"!=t.eventPhase)return;const r=Ik(o.document.selection);if(!r)return;const s=i.direction,a=o.document.selection.getSelectedElement(),l="forward"==s;if("before"===r===l)e.execute("delete",{selection:o.createSelection(a,"on")});else{const t=n.getNearestSelectionRange(o.createPositionAt(a,r),s);if(t)if(t.isCollapsed){const i=o.createSelection(t.start);if(o.modifySelection(i,{direction:s}),i.focus.isEqual(t.start)){const e=function(e,t){let o=t;for(const n of t.getAncestors({parentFirst:!0})){if(n.childCount>1||e.isLimit(n))break;o=n}return o}(n,t.start.parent);o.deleteContent(o.createSelection(e,"on"),{doNotAutoparagraph:!0})}else o.change((o=>{o.setSelection(t),e.execute(l?"deleteForward":"delete")}))}else o.change((o=>{o.setSelection(t),e.execute(l?"deleteForward":"delete")}))}i.preventDefault(),t.stop()}),{context:Rk})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,o=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",((e,[n,i])=>{if(i&&!i.is("documentSelection"))return;const r=Ik(o);return r?(e.stop(),t.change((e=>{const i=o.getSelectedElement(),s=t.createPositionAt(i,r),a=e.createSelection(s),l=t.insertContent(n,a);return e.setSelection(a),l}))):void 0}),{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",((e,o)=>{const[,n,i={}]=o;if(n&&!n.is("documentSelection"))return;const r=Ik(t);r&&(i.findOptimalPosition=r,o[3]=i)}),{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",((e,[o])=>{if(o&&!o.is("documentSelection"))return;Ik(t)&&e.stop()}),{priority:"high"})}}function Ww(e){const t=e.model;return(o,n)=>{const i=n.keyCode==ki.arrowup,r=n.keyCode==ki.arrowdown,s=n.shiftKey,a=t.document.selection;if(!i&&!r)return;const l=r;if(s&&function(e,t){return!e.isCollapsed&&e.isBackward==t}(a,l))return;const c=function(e,t,o){const n=e.model;if(o){const e=t.isCollapsed?t.focus:t.getLastPosition(),o=$w(n,e,"forward");if(!o)return null;const i=n.createRange(e,o),r=Gw(n.schema,i,"backward");return r?n.createRange(e,r):null}{const e=t.isCollapsed?t.focus:t.getFirstPosition(),o=$w(n,e,"backward");if(!o)return null;const i=n.createRange(o,e),r=Gw(n.schema,i,"forward");return r?n.createRange(r,e):null}}(e,a,l);if(c){if(c.isCollapsed){if(a.isCollapsed)return;if(s)return}(c.isCollapsed||function(e,t,o){const n=e.model,i=e.view.domConverter;if(o){const e=n.createSelection(t.start);n.modifySelection(e),e.focus.isAtEnd||t.start.isEqual(e.focus)||(t=n.createRange(e.focus,t.end))}const r=e.mapper.toViewRange(t),s=i.viewRangeToDom(r),a=qn.getDomRangeRects(s);let l;for(const e of a)if(void 0!==l){if(Math.round(e.top)>=l)return!1;l=Math.max(l,Math.round(e.bottom))}else l=Math.round(e.bottom);return!0}(e,c,l))&&(t.change((e=>{const o=l?c.end:c.start;if(s){const n=t.createSelection(a.anchor);n.setFocus(o),e.setSelection(n)}else e.setSelection(o)})),o.stop(),n.preventDefault(),n.stopPropagation())}}}function $w(e,t,o){const n=e.schema,i=e.createRangeIn(t.root),r="forward"==o?"elementStart":"elementEnd";for(const{previousPosition:e,item:s,type:a}of i.getWalker({startPosition:t,direction:o})){if(n.isLimit(s)&&!n.isInline(s))return e;if(a==r&&n.isBlock(s))return null}return null}function Gw(e,t,o){const n="backward"==o?t.end:t.start;if(e.checkChild(n,"$text"))return n;for(const{nextPosition:n}of t.getWalker({direction:o}))if(e.checkChild(n,"$text"))return n;return null}var Kw=i(1216),Zw={attributes:{"data-cke":!0}};Zw.setAttributes=Ar(),Zw.insert=_r().bind(null,"head"),Zw.domAPI=kr(),Zw.insertStyleElement=vr();fr()(Kw.A,Zw);Kw.A&&Kw.A.locals&&Kw.A.locals;class Jw extends lr{constructor(){super(...arguments),this._previouslySelected=new Set}static get pluginName(){return"Widget"}static get requires(){return[Uw,pw]}init(){const e=this.editor,t=e.editing.view,o=t.document,n=e.t;this.editor.editing.downcastDispatcher.on("selection",((t,o,n)=>{const i=n.writer,r=o.selection;if(r.isCollapsed)return;const s=r.getSelectedElement();if(!s)return;const a=e.editing.mapper.toViewElement(s);var l;Rk(a)&&(n.consumable.consume(r,"selection")&&i.setSelection(i.createRangeOn(a),{fake:!0,label:(l=a,l.getCustomProperty("widgetLabel").reduce(((e,t)=>"function"==typeof t?e?e+". "+t():t():e?e+". "+t:t),""))}))})),this.editor.editing.downcastDispatcher.on("selection",((e,t,o)=>{this._clearPreviouslySelectedWidgets(o.writer);const n=o.writer,i=n.document.selection;let r=null;for(const e of i.getRanges())for(const t of e){const e=t.item;Rk(e)&&!Yw(e,r)&&(n.addClass(Mk,e),this._previouslySelected.add(e),r=e)}}),{priority:"low"}),t.addObserver(Nu),this.listenTo(o,"mousedown",((...e)=>this._onMousedown(...e))),this.listenTo(o,"arrowKey",((...e)=>{this._handleSelectionChangeOnArrowKeyPress(...e)}),{context:[Rk,"$text"]}),this.listenTo(o,"arrowKey",((...e)=>{this._preventDefaultOnArrowKeyPress(...e)}),{context:"$root"}),this.listenTo(o,"arrowKey",Ww(this.editor.editing),{context:"$text"}),this.listenTo(o,"delete",((e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())}),{context:"$root"}),this.listenTo(o,"tab",((e,t)=>{"atTarget"==e.eventPhase&&(t.shiftKey||this._selectFirstNestedEditable()&&(t.preventDefault(),e.stop()))}),{context:Rk,priority:"low"}),this.listenTo(o,"tab",((e,t)=>{t.shiftKey&&this._selectAncestorWidget()&&(t.preventDefault(),e.stop())}),{priority:"low"}),this.listenTo(o,"keydown",((e,t)=>{t.keystroke==ki.esc&&this._selectAncestorWidget()&&(t.preventDefault(),e.stop())}),{priority:"low"}),e.accessibility.addKeystrokeInfoGroup({id:"widget",label:n("Keystrokes that can be used when a widget is selected (for example: image, table, etc.)"),keystrokes:[{label:n("Move focus from an editable area back to the parent widget"),keystroke:"Esc"},{label:n("Insert a new paragraph directly after a widget"),keystroke:"Enter"},{label:n("Insert a new paragraph directly before a widget"),keystroke:"Shift+Enter"},{label:n("Move the caret to allow typing directly before a widget"),keystroke:[["arrowup"],["arrowleft"]]},{label:n("Move the caret to allow typing directly after a widget"),keystroke:[["arrowdown"],["arrowright"]]}]})}_onMousedown(e,t){const o=this.editor,n=o.editing.view,i=n.document;let s=t.target;if(t.domEvent.detail>=3)return void(this._selectBlockContent(s)&&t.preventDefault());if(function(e){let t=e;for(;t;){if(t.is("editableElement")&&!t.is("rootElement"))return!0;if(Rk(t))return!1;t=t.parent}return!1}(s))return;if(!Rk(s)&&(s=s.findAncestor(Rk),!s))return;r.isAndroid&&t.preventDefault(),i.isFocused||n.focus();const a=o.editing.mapper.toModelElement(s);this._setSelectionOverElement(a)}_selectBlockContent(e){const t=this.editor,o=t.model,n=t.editing.mapper,i=o.schema,r=n.findMappedViewAncestor(this.editor.editing.view.createPositionAt(e,0)),s=function(e,t){for(const o of e.getAncestors({includeSelf:!0,parentFirst:!0})){if(t.checkChild(o,"$text"))return o;if(t.isLimit(o)&&!t.isObject(o))break}return null}(n.toModelElement(r),o.schema);return!!s&&(o.change((e=>{const t=i.isLimit(s)?null:function(e,t){const o=new Hl({startPosition:e});for(const{item:e}of o){if(t.isLimit(e)||!e.is("element"))return null;if(t.checkChild(e,"$text"))return e}return null}(e.createPositionAfter(s),i),o=e.createPositionAt(s,0),n=t?e.createPositionAt(t,0):e.createPositionAt(s,"end");e.setSelection(e.createRange(o,n))})),!0)}_handleSelectionChangeOnArrowKeyPress(e,t){const o=t.keyCode,n=this.editor.model,i=n.schema,r=n.document.selection,s=r.getSelectedElement(),a=Ci(o,this.editor.locale.contentLanguageDirection),l="down"==a||"right"==a,c="up"==a||"down"==a;if(s&&i.isObject(s)){const o=l?r.getLastPosition():r.getFirstPosition(),s=i.getNearestSelectionRange(o,l?"forward":"backward");return void(s&&(n.change((e=>{e.setSelection(s)})),t.preventDefault(),e.stop()))}if(!r.isCollapsed&&!t.shiftKey){const o=r.getFirstPosition(),s=r.getLastPosition(),a=o.nodeAfter,c=s.nodeBefore;return void((a&&i.isObject(a)||c&&i.isObject(c))&&(n.change((e=>{e.setSelection(l?s:o)})),t.preventDefault(),e.stop()))}if(!r.isCollapsed)return;const d=this._getObjectElementNextToSelection(l);if(d&&i.isObject(d)){if(i.isInline(d)&&c)return;this._setSelectionOverElement(d),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const o=this.editor.model,n=o.schema,i=o.document.selection.getSelectedElement();i&&n.isObject(i)&&(t.preventDefault(),e.stop())}_handleDelete(e){const t=this.editor.model.document.selection;if(!this.editor.model.canEditAt(t))return;if(!t.isCollapsed)return;const o=this._getObjectElementNextToSelection(e);return o?(this.editor.model.change((e=>{let n=t.anchor.parent;for(;n.isEmpty;){const t=n;n=t.parent,e.remove(t)}this._setSelectionOverElement(o)})),!0):void 0}_setSelectionOverElement(e){this.editor.model.change((t=>{t.setSelection(t.createRangeOn(e))}))}_getObjectElementNextToSelection(e){const t=this.editor.model,o=t.schema,n=t.document.selection,i=t.createSelection(n);if(t.modifySelection(i,{direction:e?"forward":"backward"}),i.isEqual(n))return null;const r=e?i.focus.nodeBefore:i.focus.nodeAfter;return r&&o.isObject(r)?r:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(Mk,t);this._previouslySelected.clear()}_selectFirstNestedEditable(){const e=this.editor,t=this.editor.editing.view.document;for(const o of t.selection.getFirstRange().getItems())if(o.is("editableElement")){const t=e.editing.mapper.toModelElement(o);if(!t)continue;const n=e.model.createPositionAt(t,0),i=e.model.schema.getNearestSelectionRange(n,"forward");return e.model.change((e=>{e.setSelection(i)})),!0}return!1}_selectAncestorWidget(){const e=this.editor,t=e.editing.mapper,o=e.editing.view.document.selection.getFirstPosition().parent,n=(o.is("$text")?o.parent:o).findAncestor(Rk);if(!n)return!1;const i=t.toModelElement(n);return!!i&&(e.model.change((e=>{e.setSelection(i,"on")})),!0)}}function Yw(e,t){return!!t&&Array.from(e.getAncestors()).includes(t)}class Qw extends lr{constructor(){super(...arguments),this._toolbarDefinitions=new Map}static get requires(){return[Fb]}static get pluginName(){return"WidgetToolbarRepository"}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",(t=>{(function(e){const t=e.getSelectedElement();return!(!t||!Rk(t))})(e.editing.view.document.selection)&&t.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:o,getRelatedElement:n,balloonClassName:i="ck-toolbar-container"}){if(!o.length)return void D("widget-toolbar-no-items",{toolbarId:e});const r=this.editor,s=r.t,a=new cg(r.locale);if(a.ariaLabel=t||s("Widget toolbar"),this._toolbarDefinitions.has(e))throw new E("widget-toolbar-duplicated",this,{toolbarId:e});const l={view:a,getRelatedElement:n,balloonClassName:i,itemsConfig:o,initialized:!1};r.ui.addToolbar(a,{isContextual:!0,beforeFocus:()=>{const e=n(r.editing.view.document.selection);e&&this._showToolbar(l,e)},afterBlur:()=>{this._hideToolbar(l)}}),this._toolbarDefinitions.set(e,l)}_updateToolbarsVisibility(){let e=0,t=null,o=null;for(const n of this._toolbarDefinitions.values()){const i=n.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&i)if(this.editor.ui.focusTracker.isFocused){const r=i.getAncestors().length;r>e&&(e=r,t=i,o=n)}else this._isToolbarVisible(n)&&this._hideToolbar(n);else this._isToolbarInBalloon(n)&&this._hideToolbar(n)}o&&this._showToolbar(o,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?Xw(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:e_(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",(()=>{for(const e of this._toolbarDefinitions.values())if(this._isToolbarVisible(e)){const t=e.getRelatedElement(this.editor.editing.view.document.selection);Xw(this.editor,t)}})))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function Xw(e,t){const o=e.plugins.get("ContextualBalloon"),n=e_(e,t);o.updatePosition(n)}function e_(e,t){const o=e.editing.view,n=Ff.defaultPositions;return{target:o.domConverter.mapViewToDom(t),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,n.viewportStickyNorth]}}class t_ extends(Y()){constructor(e){super(),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,o){const n=new qn(t);this.activeHandlePosition=function(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const o of t)if(e.classList.contains(o_(o)))return o}(e),this._referenceCoordinates=function(e,t){const o=new qn(e),n=t.split("-"),i={x:"right"==n[1]?o.right:o.left,y:"bottom"==n[0]?o.bottom:o.top};return i.x+=e.ownerDocument.defaultView.scrollX,i.y+=e.ownerDocument.defaultView.scrollY,i}(t,function(e){const t=e.split("-"),o={top:"bottom",bottom:"top",left:"right",right:"left"};return`${o[t[0]]}-${o[t[1]]}`}(this.activeHandlePosition)),this._originalWidth=n.width,this._originalHeight=n.height,this._aspectRatio=n.width/n.height;const i=o.style.width;i&&i.match(/^\d+(\.\d*)?%$/)?this._originalWidthPercents=parseFloat(i):this._originalWidthPercents=function(e,t=new qn(e)){const o=jk(e);return o?t.width/o*100:0}(o,n)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function o_(e){return`ck-widget__resizer__handle-${e}`}class n_ extends pm{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",(e=>e?`ck-orientation-${e}`:""))],style:{display:e.if("_isVisible","none",(e=>!e))}},children:[{text:e.to("_label")}]})}_bindToState(e,t){this.bind("_isVisible").to(t,"proposedWidth",t,"proposedHeight",((e,t)=>null!==e&&null!==t)),this.bind("_label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",((t,o,n)=>"px"===e.unit?`${t}×${o}`:`${n}%`)),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",((e,t,o)=>t<50||o<50?"above-center":e))}_dismiss(){this.unbind(),this._isVisible=!1}}class i_ extends(Y()){constructor(e){super(),this._viewResizerWrapper=null,this._options=e,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",((e,t)=>e&&t)),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",(e=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),e.stop())}),{priority:"high"})}get state(){return this._state}show(){this._options.editor.editing.view.change((e=>{e.removeClass("ck-hidden",this._viewResizerWrapper)}))}hide(){this._options.editor.editing.view.change((e=>{e.addClass("ck-hidden",this._viewResizerWrapper)}))}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change((o=>{const n=o.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},(function(t){const o=this.toDomElement(t);return e._appendHandles(o),e._appendSizeUI(o),o}));o.insert(o.createPositionAt(t,"end"),n),o.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=n,this.isVisible||this.hide()})),this.on("change:isVisible",(()=>{this.isVisible?(this.show(),this.redraw()):this.hide()}))}begin(e){this._state=new t_(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((e=>{const o=this._options.unit||"%",n=("%"===o?t.widthPercents:t.width)+o;e.setStyle("width",n,this._options.viewElement)}));const o=this._getHandleHost(),n=new qn(o),i=Math.round(n.width),r=Math.round(n.height),s=new qn(o);t.width=Math.round(s.width),t.height=Math.round(s.height),this.redraw(n),this.state.update({...t,handleHostWidth:i,handleHostHeight:r})}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(!((o=t)&&o.ownerDocument&&o.ownerDocument.contains(o)))return;var o;const n=t.parentElement,i=this._getHandleHost(),r=this._viewResizerWrapper,s=[r.getStyle("width"),r.getStyle("height"),r.getStyle("left"),r.getStyle("top")];let a;if(n.isSameNode(i)){const t=e||new qn(i);a=[t.width+"px",t.height+"px",void 0,void 0]}else a=[i.offsetWidth+"px",i.offsetHeight+"px",i.offsetLeft+"px",i.offsetTop+"px"];"same"!==ie(s,a)&&this._options.editor.editing.view.change((e=>{e.setStyle({width:a[0],height:a[1],left:a[2],top:a[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((e=>{e.setStyle("width",this._initialViewWidth,this._options.viewElement)}))}_proposeNewSize(e){const t=this.state,o={x:(n=e).pageX,y:n.pageY};var n;const i=!this._options.isCentered||this._options.isCentered(this),r={x:t._referenceCoordinates.x-(o.x+t.originalWidth),y:o.y-t.originalHeight-t._referenceCoordinates.y};i&&t.activeHandlePosition.endsWith("-right")&&(r.x=o.x-(t._referenceCoordinates.x+t.originalWidth)),i&&(r.x*=2);let s=Math.abs(t.originalWidth+r.x),a=Math.abs(t.originalHeight+r.y);return"width"==(s/t.aspectRatio>a?"width":"height")?a=s/t.aspectRatio:s=a*t.aspectRatio,{width:Math.round(s),height:Math.round(a),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*s*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 n of t)e.appendChild(new Wh({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(o=n,`ck-widget__resizer__handle-${o}`)}}).render());var o}_appendSizeUI(e){this._sizeView=new n_,this._sizeView.render(),e.appendChild(this._sizeView.element)}}var r_=i(2060),s_={attributes:{"data-cke":!0}};s_.setAttributes=Ar(),s_.insert=_r().bind(null,"head"),s_.domAPI=kr(),s_.insertStyleElement=vr();fr()(r_.A,s_);r_.A&&r_.A.locals&&r_.A.locals;class a_ extends lr{constructor(){super(...arguments),this._resizers=new Map}static get pluginName(){return"WidgetResize"}init(){const e=this.editor.editing,o=t.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),e.view.addObserver(Nu),this._observer=new(Rn()),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(o,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(o,"mouseup",this._mouseUpListener.bind(this)),this._redrawSelectedResizerThrottled=Bh((()=>this.redrawSelectedResizer()),200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",(()=>{for(const[e,t]of this._resizers)e.isAttached()||(this._resizers.delete(e),t.destroy())}),{priority:"lowest"}),this._observer.listenTo(t.window,"resize",this._redrawSelectedResizerThrottled);const n=this.editor.editing.view.document.selection;n.on("change",(()=>{const e=n.getSelectedElement(),t=this.getResizerByViewElement(e)||null;t?this.select(t):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 i_(e),o=this.editor.plugins;if(t.attach(),o.has("WidgetToolbarRepository")){const e=o.get("WidgetToolbarRepository");t.on("begin",(()=>{e.forceDisabled("resize")}),{priority:"lowest"}),t.on("cancel",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"}),t.on("commit",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"})}this._resizers.set(e.viewElement,t);const n=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(n)==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 o=t.domTarget;i_.isResizeHandle(o)&&(this._activeResizer=this._getResizerByHandle(o)||null,this._activeResizer&&(this._activeResizer.begin(o),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}function l_(e,t,o){e.ui.componentFactory.add(t,(t=>{const n=new Em(t);return n.set({label:I18n.t("js.button_edit"),icon:' \n',tooltip:!0}),n.on("execute",(()=>{const t=e.model.document.selection.getSelectedElement();t&&o(t)})),n}))}const c_="ck-toolbar-container";function d_(e,t,o,n){const i=t.config.get(o+".toolbar");if(!i||!i.length)return;const r=t.plugins.get("ContextualBalloon"),s=new cg(t.locale);function a(){t.ui.focusTracker.isFocused&&n(t.editing.view.document.selection)?c()?function(e,t){const o=e.plugins.get("ContextualBalloon");if(t(e.editing.view.document.selection)){const t=u_(e);o.updatePosition(t)}}(t,n):r.hasView(s)||r.add({view:s,position:u_(t),balloonClassName:c_}):l()}function l(){c()&&r.remove(s)}function c(){return r.visibleView==s}s.fillFromConfig(i,t.ui.componentFactory),e.listenTo(t.editing.view,"render",a),e.listenTo(t.ui.focusTracker,"change:isFocused",a,{priority:"low"})}function u_(e){const t=e.editing.view,o=Ff.defaultPositions;return{target:t.domConverter.viewToDom(t.document.selection.getSelectedElement()),positions:[o.northArrowSouth,o.northArrowSouthWest,o.northArrowSouthEast,o.southArrowNorth,o.southArrowNorthWest,o.southArrowNorthEast]}}class h_ extends lr{static get requires(){return[Fb]}static get pluginName(){return"EmbeddedTableToolbar"}init(){const e=this.editor,t=this.editor.model,o=Gk(e);l_(e,"opEditEmbeddedTableQuery",(e=>{const n=o.services.externalQueryConfiguration,i=e.getAttribute("opEmbeddedTableQuery")||{};o.runInZone((()=>{n.show({currentQuery:i,callback:o=>t.change((t=>{t.setAttribute("opEmbeddedTableQuery",o,e)}))})}))}))}afterInit(){d_(this,this.editor,"OPMacroEmbeddedTable",Wk)}}const m_=Symbol("isWpButtonMacroSymbol");function p_(e){const t=e.getSelectedElement();return!(!t||!function(e){return!!e.getCustomProperty(m_)&&Rk(e)}(t))}class g_ extends lr{static get pluginName(){return"OPMacroWpButtonEditing"}static get buttonName(){return"insertWorkPackageButton"}init(){const e=this.editor,t=e.model,o=e.conversion,n=Gk(e);t.schema.register("op-macro-wp-button",{allowWhere:["$block"],allowAttributes:["type","classes"],isBlock:!0,isLimit:!0}),o.for("upcast").elementToElement({view:{name:"macro",classes:"create_work_package_link"},model:(e,{writer:t})=>{const o=e.getAttribute("data-type")||"",n=e.getAttribute("data-classes")||"";return t.createElement("op-macro-wp-button",{type:o,classes:n})}}),o.for("editingDowncast").elementToElement({model:"op-macro-wp-button",view:(e,{writer:t})=>this.createMacroViewElement(e,t)}),o.for("dataDowncast").elementToElement({model:"op-macro-wp-button",view:(e,{writer:t})=>t.createContainerElement("macro",{class:"create_work_package_link","data-type":e.getAttribute("type")||"","data-classes":e.getAttribute("classes")||""})}),e.ui.componentFactory.add(g_.buttonName,(t=>{const o=new Em(t);return o.set({label:window.I18n.t("js.editor.macro.work_package_button.button"),withText:!0}),o.on("execute",(()=>{n.services.macros.configureWorkPackageButton().then((t=>e.model.change((o=>{const n=o.createElement("op-macro-wp-button",{});o.setAttribute("type",t.type,n),o.setAttribute("classes",t.classes,n),e.model.insertContent(n,e.model.document.selection)}))))})),o}))}macroLabel(e){return e?window.I18n.t("js.editor.macro.work_package_button.with_type",{typename:e}):window.I18n.t("js.editor.macro.work_package_button.without_type")}createMacroViewElement(e,t){e.getAttribute("type");const o=e.getAttribute("classes")||"",n=this.macroLabel(),i=t.createText(n),r=t.createContainerElement("span",{class:o});return t.insert(t.createPositionAt(r,0),i),function(e,t,o){return t.setCustomProperty(m_,!0,e),zk(e,t,{label:o})}(r,t,{label:n})}}class f_ extends lr{static get requires(){return[Fb]}static get pluginName(){return"OPMacroWpButtonToolbar"}init(){const e=this.editor,t=(this.editor.model,Gk(e));l_(e,"opEditWpMacroButton",(o=>{const n=t.services.macros,i=o.getAttribute("type"),r=o.getAttribute("classes");n.configureWorkPackageButton(i,r).then((t=>e.model.change((e=>{e.setAttribute("classes",t.classes,o),e.setAttribute("type",t.type,o)}))))}))}afterInit(){d_(this,this.editor,"OPMacroWpButton",p_)}}class b_ extends(Y()){constructor(){super();const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=e=>{this.loaded=e.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise(((o,n)=>{t.onload=()=>{const e=t.result;this._data=e,o(e)},t.onerror=()=>{n("error")},t.onabort=()=>{n("aborted")},this._reader.readAsDataURL(e)}))}abort(){this._reader.abort()}}class k_ extends lr{constructor(){super(...arguments),this.loaders=new Yi,this._loadersMap=new Map,this._pendingAction=null}static get pluginName(){return"FileRepository"}static get requires(){return[jh]}init(){this.loaders.on("change",(()=>this._updatePendingAction())),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0))}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return D("filerepository-no-upload-adapter"),null;const t=new w_(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then((e=>{this._loadersMap.set(e,t)})).catch((()=>{})),t.on("change:uploaded",(()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e})),t.on("change:uploadTotal",(()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e})),t}destroyLoader(e){const t=e instanceof w_?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach(((e,o)=>{e===t&&this._loadersMap.delete(o)}))}_updatePendingAction(){const e=this.editor.plugins.get(jh);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,o=e=>`${t("Upload in progress")} ${parseInt(e)}%.`;this._pendingAction=e.add(o(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",o)}}else e.remove(this._pendingAction),this._pendingAction=null}}class w_ extends(Y()){constructor(e,t){super(),this.id=A(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new b_,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0)),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then((e=>this._filePromiseWrapper?e:null)):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new E("filerepository-read-wrong-status",this);return this.status="reading",this.file.then((e=>this._reader.read(e))).then((e=>{if("reading"!==this.status)throw this.status;return this.status="idle",e})).catch((e=>{if("aborted"===e)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:e}))}upload(){if("idle"!=this.status)throw new E("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then((()=>this._adapter.upload())).then((e=>(this.uploadResponse=e,this.status="idle",e))).catch((e=>{if("aborted"===this.status)throw"aborted";throw this.status="error",e}))}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch((()=>{})),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const t={};return t.promise=new Promise(((o,n)=>{t.rejecter=n,t.isFulfilled=!1,e.then((e=>{t.isFulfilled=!0,o(e)})).catch((e=>{t.isFulfilled=!0,n(e)}))})),t}}class __{constructor(e,t,o){this.loader=e,this.resource=t,this.editor=o}upload(){const e=this.resource,t=Kk(this.editor,"attachmentsResourceService");return e?this.loader.file.then((o=>t.attachFiles(e,[o]).toPromise().then((e=>(this.editor.model.fire("op:attachment-added",e),this.buildResponse(e[0])))).catch((e=>{console.error("Failed upload %O",e)})))):(console.warn("resource not available in this CKEditor instance"),Promise.reject("Not possible to upload attachments without resource"))}buildResponse(e){return{default:e._links.staticDownloadLocation.href}}abort(){return!1}}class y_ extends La{constructor(e){super(e),this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"];const t=this.document;function o(e){return(o,n)=>{n.preventDefault();const i=n.dropRange?[n.dropRange]:null,r=new w(t,e);t.fire(r,{dataTransfer:n.dataTransfer,method:o.name,targetRanges:i,target:n.target,domEvent:n.domEvent}),r.stop.called&&n.stopPropagation()}}this.listenTo(t,"paste",o("clipboardInput"),{priority:"low"}),this.listenTo(t,"drop",o("clipboardInput"),{priority:"low"}),this.listenTo(t,"dragover",o("dragging"),{priority:"low"})}onDomEvent(e){const t="clipboardData"in e?e.clipboardData:e.dataTransfer,o="drop"==e.type||"paste"==e.type,n={dataTransfer:new Bl(t,{cacheFiles:o})};"drop"!=e.type&&"dragover"!=e.type||(n.dropRange=function(e,t){const o=t.target.ownerDocument,n=t.clientX,i=t.clientY;let r;o.caretRangeFromPoint&&o.caretRangeFromPoint(n,i)?r=o.caretRangeFromPoint(n,i):t.rangeParent&&(r=o.createRange(),r.setStart(t.rangeParent,t.rangeOffset),r.collapse(!0));if(r)return e.domConverter.domRangeToView(r);return null}(this.view,e)),this.fire(e.type,e,n)}}const A_=["figcaption","li"],C_=["ol","ul"];function v_(e){if(e.is("$text")||e.is("$textProxy"))return e.data;if(e.is("element","img")&&e.hasAttribute("alt"))return e.getAttribute("alt");if(e.is("element","br"))return"\n";let t="",o=null;for(const n of e.getChildren())t+=x_(n,o)+v_(n),o=n;return t}function x_(e,t){return t?e.is("element","li")&&!e.isEmpty&&e.getChild(0).is("containerElement")||C_.includes(e.name)&&C_.includes(t.name)?"\n\n":e.is("containerElement")||t.is("containerElement")?A_.includes(e.name)||A_.includes(t.name)?"\n":e.is("element")&&e.getCustomProperty("dataPipeline:transparentRendering")||t.is("element")&&t.getCustomProperty("dataPipeline:transparentRendering")?"":"\n\n":"":""}const E_=function(e,t){return e&&Di(e,t,mo)};const D_=function(e,t,o,n){var i=o.length,r=i,s=!n;if(null==e)return!r;for(e=Object(e);i--;){var a=o[i];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++ie.model.getSelectedContent(e.model.document.selection))){return this.editor.model.change((n=>{const i=n.model.document.selection;n.setSelection(t);const r=this._insertFakeMarkersIntoSelection(n,n.model.document.selection,e),s=o(n),a=this._removeFakeMarkersInsideElement(n,s);for(const[e,t]of Object.entries(r)){a[e]||(a[e]=n.createRangeIn(s));for(const e of t)n.remove(e)}s.markers.clear();for(const[e,t]of Object.entries(a))s.markers.set(e,t);return n.setSelection(i),s}))}_pasteMarkersIntoTransformedElement(e,t){const o=this._getPasteMarkersFromRangeMap(e);return this.editor.model.change((e=>{const n=this._insertFakeMarkersElements(e,o),i=t(e),r=this._removeFakeMarkersInsideElement(e,i);for(const t of Object.values(n).flat())e.remove(t);for(const[t,o]of Object.entries(r))e.model.markers.has(t)||e.addMarker(t,{usingOperation:!0,affectsData:!0,range:o});return i}))}_pasteFragmentWithMarkers(e){const t=this._getPasteMarkersFromRangeMap(e.markers);e.markers.clear();for(const o of t)e.markers.set(o.name,o.range);return this.editor.model.insertContent(e)}_forceMarkersCopy(e,t,o={allowedActions:"all",copyPartiallySelected:!0,duplicateOnPaste:!0}){const n=this._markersToCopy.get(e);this._markersToCopy.set(e,o),t(),n?this._markersToCopy.set(e,n):this._markersToCopy.delete(e)}_isMarkerCopyable(e,t){const o=this._getMarkerClipboardConfig(e);if(!o)return!1;if(!t)return!0;const{allowedActions:n}=o;return"all"===n||n.includes(t)}_hasMarkerConfiguration(e){return!!this._getMarkerClipboardConfig(e)}_getMarkerClipboardConfig(e){const[t]=e.split(":");return this._markersToCopy.get(t)||null}_insertFakeMarkersIntoSelection(e,t,o){const n=this._getCopyableMarkersFromSelection(e,t,o);return this._insertFakeMarkersElements(e,n)}_getCopyableMarkersFromSelection(e,t,o){const n=Array.from(t.getRanges()),i=new Set(n.flatMap((t=>Array.from(e.model.markers.getMarkersIntersectingRange(t)))));return Array.from(i).filter((e=>{if(!this._isMarkerCopyable(e.name,o))return!1;const{copyPartiallySelected:t}=this._getMarkerClipboardConfig(e.name);if(!t){const t=e.getRange();return n.some((e=>e.containsRange(t,!0)))}return!0})).map((e=>({name:"dragstart"===o?this._getUniqueMarkerName(e.name):e.name,range:e.getRange()})))}_getPasteMarkersFromRangeMap(e,t=null){const{model:o}=this.editor;return(e instanceof Map?Array.from(e.entries()):Object.entries(e)).flatMap((([e,n])=>{if(!this._hasMarkerConfiguration(e))return[{name:e,range:n}];if(this._isMarkerCopyable(e,t)){const t=this._getMarkerClipboardConfig(e),i=o.markers.has(e)&&"$graveyard"===o.markers.get(e).getRange().root.rootName;return(t.duplicateOnPaste||i)&&(e=this._getUniqueMarkerName(e)),[{name:e,range:n}]}return[]}))}_insertFakeMarkersElements(e,t){const o={},n=t.flatMap((e=>{const{start:t,end:o}=e.range;return[{position:t,marker:e,type:"start"},{position:o,marker:e,type:"end"}]})).sort((({position:e},{position:t})=>e.isBefore(t)?1:-1));for(const{position:t,marker:i,type:r}of n){const n=e.createElement("$marker",{"data-name":i.name,"data-type":r});o[i.name]||(o[i.name]=[]),o[i.name].push(n),e.insert(n,t)}return o}_removeFakeMarkersInsideElement(e,t){const o=this._getAllFakeMarkersFromElement(e,t).reduce(((t,o)=>{const n=o.markerElement&&e.createPositionBefore(o.markerElement);let i=t[o.name],r=!1;if(i&&i.start&&i.end){this._getMarkerClipboardConfig(o.name).duplicateOnPaste?t[this._getUniqueMarkerName(o.name)]=t[o.name]:r=!0,i=null}return r||(t[o.name]={...i,[o.type]:n}),o.markerElement&&e.remove(o.markerElement),t}),{});return L_(o,(o=>new Zl(o.start||e.createPositionFromPath(t,[0]),o.end||e.createPositionAt(t,"end"))))}_getAllFakeMarkersFromElement(e,t){const o=Array.from(e.createRangeIn(t)).flatMap((({item:e})=>{if(!e.is("element","$marker"))return[];const t=e.getAttribute("data-name"),o=e.getAttribute("data-type");return[{markerElement:e,name:t,type:o}]})),n=[],i=[];for(const e of o){if("end"===e.type){o.some((t=>t.name===e.name&&"start"===t.type))||n.push({markerElement:null,name:e.name,type:"start"})}if("start"===e.type){o.some((t=>t.name===e.name&&"end"===t.type))||i.unshift({markerElement:null,name:e.name,type:"end"})}}return[...n,...o,...i]}_getUniqueMarkerName(e){const t=e.split(":"),o=A().substring(1,6);return 3===t.length?`${t.slice(0,2).join(":")}:${o}`:`${t.join(":")}:${o}`}}class j_ extends lr{static get pluginName(){return"ClipboardPipeline"}static get requires(){return[H_]}init(){this.editor.editing.view.addObserver(y_),this._setupPasteDrop(),this._setupCopyCut()}_fireOutputTransformationEvent(e,t,o){const n=this.editor.plugins.get("ClipboardMarkersUtils");this.editor.model.enqueueChange({isUndoable:"cut"===o},(()=>{const i=n._copySelectedFragmentWithMarkers(o,t);this.fire("outputTransformation",{dataTransfer:e,content:i,method:o})}))}_setupPasteDrop(){const e=this.editor,t=e.model,o=e.editing.view,n=o.document,i=this.editor.plugins.get("ClipboardMarkersUtils");this.listenTo(n,"clipboardInput",((t,o)=>{"paste"!=o.method||e.model.canEditAt(e.model.document.selection)||t.stop()}),{priority:"highest"}),this.listenTo(n,"clipboardInput",((e,t)=>{const n=t.dataTransfer;let i;if(t.content)i=t.content;else{let e="";n.getData("text/html")?e=function(e){return e.replace(/(\s+)<\/span>/g,((e,t)=>1==t.length?" ":t)).replace(//g,"")}(n.getData("text/html")):n.getData("text/plain")&&(((r=(r=n.getData("text/plain")).replace(/&/g,"&").replace(//g,">").replace(/\r?\n\r?\n/g,"
").replace(/\r?\n/g," ").replace(/\t/g," ").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g," ")).includes("
")||r.includes(" "))&&(r=`
${r}
`),e=r),i=this.editor.data.htmlProcessor.toView(e)}var r;const s=new w(this,"inputTransformation");this.fire(s,{content:i,dataTransfer:n,targetRanges:t.targetRanges,method:t.method}),s.stop.called&&e.stop(),o.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((e,o)=>{if(o.content.isEmpty)return;const n=this.editor.data.toModel(o.content,"$clipboardHolder");0!=n.childCount&&(e.stop(),t.change((()=>{this.fire("contentInsertion",{content:n,method:o.method,dataTransfer:o.dataTransfer,targetRanges:o.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((e,t)=>{t.resultRange=i._pasteFragmentWithMarkers(t.content)}),{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,o=e.editing.view.document,n=(e,o)=>{const n=o.dataTransfer;o.preventDefault(),this._fireOutputTransformationEvent(n,t.selection,e.name)};this.listenTo(o,"copy",n,{priority:"low"}),this.listenTo(o,"cut",((t,o)=>{e.model.canEditAt(e.model.document.selection)?n(t,o):o.preventDefault()}),{priority:"low"}),this.listenTo(this,"outputTransformation",((t,n)=>{const i=e.data.toView(n.content);o.fire("clipboardOutput",{dataTransfer:n.dataTransfer,content:i,method:n.method})}),{priority:"low"}),this.listenTo(o,"clipboardOutput",((o,n)=>{n.content.isEmpty||(n.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(n.content)),n.dataTransfer.setData("text/plain",v_(n.content))),"cut"==n.method&&e.model.deleteContent(t.selection)}),{priority:"low"})}}const q_=Yn("px");class U_ extends pm{constructor(){super();const e=this.bindTemplate;this.set({isVisible:!1,left:null,top:null,width:null}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-clipboard-drop-target-line",e.if("isVisible","ck-hidden",(e=>!e))],style:{left:e.to("left",(e=>q_(e))),top:e.to("top",(e=>q_(e))),width:e.to("width",(e=>q_(e)))}}})}}class W_ extends lr{constructor(){super(...arguments),this.removeDropMarkerDelayed=or((()=>this.removeDropMarker()),40),this._updateDropMarkerThrottled=Bh((e=>this._updateDropMarker(e)),40),this._reconvertMarkerThrottled=Bh((()=>{this.editor.model.markers.has("drop-target")&&this.editor.editing.reconvertMarker("drop-target")}),0),this._dropTargetLineView=new U_,this._domEmitter=new(Rn()),this._scrollables=new Map}static get pluginName(){return"DragDropTarget"}init(){this._setupDropMarker()}destroy(){this._domEmitter.stopListening();for(const{resizeObserver:e}of this._scrollables.values())e.destroy();return this._updateDropMarkerThrottled.cancel(),this.removeDropMarkerDelayed.cancel(),this._reconvertMarkerThrottled.cancel(),super.destroy()}updateDropMarker(e,t,o,n,i,r){this.removeDropMarkerDelayed.cancel();const s=$_(this.editor,e,t,o,n,i,r);if(s)return r&&r.containsRange(s)?this.removeDropMarker():void this._updateDropMarkerThrottled(s)}getFinalDropRange(e,t,o,n,i,r){const s=$_(this.editor,e,t,o,n,i,r);return this.removeDropMarker(),s}removeDropMarker(){const e=this.editor.model;this.removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),this._dropTargetLineView.isVisible=!1,e.markers.has("drop-target")&&e.change((e=>{e.removeMarker("drop-target")}))}_setupDropMarker(){const e=this.editor;e.ui.view.body.add(this._dropTargetLineView),e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(t,{writer:o})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return this._dropTargetLineView.isVisible=!1,this._createDropTargetPosition(o);t.markerRange.isCollapsed?this._updateDropTargetLine(t.markerRange):this._dropTargetLineView.isVisible=!1}})}_updateDropMarker(e){const t=this.editor,o=t.model.markers;t.model.change((t=>{o.has("drop-target")?o.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})}))}_createDropTargetPosition(e){return e.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(e){const t=this.toDomElement(e);return t.append("",e.createElement("span"),""),t}))}_updateDropTargetLine(e){const o=this.editor.editing,n=e.start.nodeBefore,i=e.start.nodeAfter,r=e.start.parent,s=n?o.mapper.toViewElement(n):null,a=s?o.view.domConverter.mapViewToDom(s):null,l=i?o.mapper.toViewElement(i):null,c=l?o.view.domConverter.mapViewToDom(l):null,d=o.mapper.toViewElement(r);if(!d)return;const u=o.view.domConverter.mapViewToDom(d),h=this._getScrollableRect(d),{scrollX:m,scrollY:p}=t.window,g=a?new qn(a):null,f=c?new qn(c):null,b=new qn(u).excludeScrollbarsAndBorders(),k=g?g.bottom:b.top,w=f?f.top:b.bottom,_=t.window.getComputedStyle(u),y=k<=w?(k+w)/2:w;if(h.topa.schema.checkChild(r,e)))){if(a.schema.checkChild(r,"$text"))return a.createRange(r);if(t)return K_(e,J_(e,t.parent),n,i)}}}else if(a.schema.isInline(c))return K_(e,c,n,i);if(a.schema.isBlock(c))return K_(e,c,n,i);if(a.schema.checkChild(c,"$block")){const t=Array.from(c.getChildren()).filter((t=>t.is("element")&&!G_(e,t)));let o=0,r=t.length;if(0==r)return a.createRange(a.createPositionAt(c,"end"));for(;o{o?(this.forceDisabled("readOnlyMode"),this._isBlockDragging=!1):this.clearForceDisabled("readOnlyMode")})),r.isAndroid&&this.forceDisabled("noAndroidSupport"),e.plugins.has("BlockToolbar")){const o=e.plugins.get("BlockToolbar").buttonView.element;this._domEmitter.listenTo(o,"dragstart",((e,t)=>this._handleBlockDragStart(t))),this._domEmitter.listenTo(t.document,"dragover",((e,t)=>this._handleBlockDragging(t))),this._domEmitter.listenTo(t.document,"drop",((e,t)=>this._handleBlockDragging(t))),this._domEmitter.listenTo(t.document,"dragend",(()=>this._handleBlockDragEnd()),{useCapture:!0}),this.isEnabled&&o.setAttribute("draggable","true"),this.on("change:isEnabled",((e,t,n)=>{o.setAttribute("draggable",n?"true":"false")}))}}destroy(){return this._domEmitter.stopListening(),super.destroy()}_handleBlockDragStart(e){if(!this.isEnabled)return;const t=this.editor.model,o=t.document.selection,n=this.editor.editing.view,i=Array.from(o.getSelectedBlocks()),r=t.createRange(t.createPositionBefore(i[0]),t.createPositionAfter(i[i.length-1]));t.change((e=>e.setSelection(r))),this._isBlockDragging=!0,n.focus(),n.getObserver(y_).onDomEvent(e)}_handleBlockDragging(e){if(!this.isEnabled||!this._isBlockDragging)return;const t=e.clientX+("ltr"==this.editor.locale.contentLanguageDirection?100:-100),o=e.clientY,n=document.elementFromPoint(t,o),i=this.editor.editing.view;n&&n.closest(".ck-editor__editable")&&i.getObserver(y_).onDomEvent({...e,type:e.type,dataTransfer:e.dataTransfer,target:n,clientX:t,clientY:o,preventDefault:()=>e.preventDefault(),stopPropagation:()=>e.stopPropagation()})}_handleBlockDragEnd(){this._isBlockDragging=!1}}var Q_=i(9262),X_={attributes:{"data-cke":!0}};X_.setAttributes=Ar(),X_.insert=_r().bind(null,"head"),X_.domAPI=kr(),X_.insertStyleElement=vr();fr()(Q_.A,X_);Q_.A&&Q_.A.locals&&Q_.A.locals;class ey extends lr{constructor(){super(...arguments),this._clearDraggableAttributesDelayed=or((()=>this._clearDraggableAttributes()),40),this._blockMode=!1,this._domEmitter=new(Rn())}static get pluginName(){return"DragDrop"}static get requires(){return[j_,Jw,W_,Y_]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,t.addObserver(y_),t.addObserver(Nu),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",((e,t,o)=>{o?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((e,t,o)=>{o||this._finalizeDragging(!1)})),r.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._previewContainer&&this._previewContainer.remove(),this._domEmitter.stopListening(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,o=e.model,n=e.editing.view,i=n.document,s=e.plugins.get(W_);this.listenTo(i,"dragstart",((e,t)=>{if(t.target&&t.target.is("editableElement"))return void t.preventDefault();if(this._prepareDraggedRange(t.target),!this._draggedRange)return void t.preventDefault();this._draggingUid=A(),t.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",t.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const n=o.createSelection(this._draggedRange.toRange());this.editor.plugins.get("ClipboardPipeline")._fireOutputTransformationEvent(t.dataTransfer,n,"dragstart");const{dataTransfer:i,domTarget:r,domEvent:s}=t,{clientX:a}=s;this._updatePreview({dataTransfer:i,domTarget:r,clientX:a}),t.stopPropagation(),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(i,"dragend",((e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)}),{priority:"low"}),this._domEmitter.listenTo(t.document,"dragend",(()=>{this._blockMode=!1}),{useCapture:!0}),this.listenTo(i,"dragenter",(()=>{this.isEnabled&&n.focus()})),this.listenTo(i,"dragleave",(()=>{s.removeDropMarkerDelayed()})),this.listenTo(i,"dragging",((e,t)=>{if(!this.isEnabled)return void(t.dataTransfer.dropEffect="none");const{clientX:o,clientY:n}=t.domEvent;s.updateDropMarker(t.target,t.targetRanges,o,n,this._blockMode,this._draggedRange),this._draggedRange||(t.dataTransfer.dropEffect="copy"),r.isGecko||("copy"==t.dataTransfer.effectAllowed?t.dataTransfer.dropEffect="copy":["all","copyMove"].includes(t.dataTransfer.effectAllowed)&&(t.dataTransfer.dropEffect="move")),e.stop()}),{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document,o=e.plugins.get(W_);this.listenTo(t,"clipboardInput",((t,n)=>{if("drop"!=n.method)return;const{clientX:i,clientY:r}=n.domEvent,s=o.getFinalDropRange(n.target,n.targetRanges,i,r,this._blockMode,this._draggedRange);if(!s)return this._finalizeDragging(!1),void t.stop();this._draggedRange&&this._draggingUid!=n.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==ty(n.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(s,!0))return this._finalizeDragging(!1),void t.stop();n.targetRanges=[e.editing.mapper.toViewRange(s)]}),{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(j_);e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const o=t.targetRanges.map((e=>this.editor.editing.mapper.toModelRange(e)));this.editor.model.change((e=>e.setSelection(o)))}),{priority:"high"}),e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const o="move"==ty(t.dataTransfer),n=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(n&&o)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,o=t.document;this.listenTo(o,"mousedown",((n,i)=>{if(r.isAndroid||!i)return;this._clearDraggableAttributesDelayed.cancel();let s=oy(i.target);if(r.isBlink&&!e.isReadOnly&&!s&&!o.selection.isCollapsed){const e=o.selection.getSelectedElement();e&&Rk(e)||(s=o.selection.editableElement)}s&&(t.change((e=>{e.setAttribute("draggable","true",s)})),this._draggableElement=e.editing.mapper.toModelElement(s))})),this.listenTo(o,"mouseup",(()=>{r.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change((t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_finalizeDragging(e){const t=this.editor,o=t.model;if(t.plugins.get(W_).removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")){t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop")}this._draggingUid="",this._previewContainer&&(this._previewContainer.remove(),this._previewContainer=void 0),this._draggedRange&&(e&&this.isEnabled&&o.change((e=>{const t=o.createSelection(this._draggedRange);o.deleteContent(t,{doNotAutoparagraph:!0});const n=t.getFirstPosition().parent;n.isEmpty&&!o.schema.checkChild(n,"$text")&&o.schema.checkChild(n,"paragraph")&&e.insertElement("paragraph",n,0)})),this._draggedRange.detach(),this._draggedRange=null)}_prepareDraggedRange(e){const t=this.editor,o=t.model,n=o.document.selection,i=e?oy(e):null;if(i){const e=t.editing.mapper.toModelElement(i);if(this._draggedRange=cc.fromRange(o.createRangeOn(e)),this._blockMode=o.schema.isBlock(e),t.plugins.has("WidgetToolbarRepository")){t.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}return}if(n.isCollapsed&&!n.getFirstPosition().parent.isEmpty)return;const r=Array.from(n.getSelectedBlocks()),s=n.getFirstRange();if(0==r.length)return void(this._draggedRange=cc.fromRange(s));const a=ny(o,r);if(r.length>1)this._draggedRange=cc.fromRange(a),this._blockMode=!0;else if(1==r.length){const e=s.start.isTouching(a.start)&&s.end.isTouching(a.end);this._draggedRange=cc.fromRange(e?a:s),this._blockMode=e}o.change((e=>e.setSelection(this._draggedRange.toRange())))}_updatePreview({dataTransfer:e,domTarget:o,clientX:n}){const i=this.editor.editing.view,s=i.document.selection.editableElement,a=i.domConverter.mapViewToDom(s),l=t.window.getComputedStyle(a);this._previewContainer?this._previewContainer.firstElementChild&&this._previewContainer.removeChild(this._previewContainer.firstElementChild):(this._previewContainer=Ae(t.document,"div",{style:"position: fixed; left: -999999px;"}),t.document.body.appendChild(this._previewContainer));const c=new qn(a);if(a.contains(o))return;const d=parseFloat(l.paddingLeft),u=Ae(t.document,"div");u.className="ck ck-content",u.style.width=l.width,u.style.paddingLeft=`${c.left-n+d}px`,r.isiOS&&(u.style.backgroundColor="white"),u.innerHTML=e.getData("text/html"),e.setDragImage(u,0,0),this._previewContainer.appendChild(u)}}function ty(e){return r.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function oy(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor(Rk);if(Rk(e))return e;const t=e.findAncestor((e=>Rk(e)||e.is("editableElement")));return Rk(t)?t:null}function ny(e,t){const o=t[0],n=t[t.length-1],i=o.getCommonAncestor(n),r=e.createPositionBefore(o),s=e.createPositionAfter(n);if(i&&i.is("element")&&!e.schema.isLimit(i)){const t=e.createRangeOn(i),o=r.isTouching(t.start),n=s.isTouching(t.end);if(o&&n)return ny(e,[i])}return e.createRange(r,s)}class iy extends lr{static get pluginName(){return"PastePlainText"}static get requires(){return[j_]}init(){const e=this.editor,t=e.model,o=e.editing.view,n=t.document.selection;o.addObserver(y_),e.plugins.get(j_).on("contentInsertion",((e,o)=>{(function(e,t){let o=t.createRangeIn(e);if(1==e.childCount){const n=e.getChild(0);n.is("element")&&t.schema.isBlock(n)&&!t.schema.isObject(n)&&!t.schema.isLimit(n)&&(o=t.createRangeIn(n))}for(const e of o.getItems()){if(!t.schema.isInline(e))return!1;if(Array.from(e.getAttributeKeys()).find((e=>t.schema.getAttributeProperties(e).isFormatting)))return!1}return!0})(o.content,t)&&t.change((e=>{const i=Array.from(n.getAttributes()).filter((([e])=>t.schema.getAttributeProperties(e).isFormatting));n.isCollapsed||t.deleteContent(n,{doNotAutoparagraph:!0}),i.push(...n.getAttributes());const r=e.createRangeIn(o.content);for(const o of r.getItems())for(const n of i)t.schema.checkAttribute(o,n[0])&&e.setAttribute(n[0],n[1],o)}))}))}}class ry extends lr{static get pluginName(){return"Clipboard"}static get requires(){return[H_,j_,ey,iy]}init(){const e=this.editor,t=this.editor.t;e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Copy selected content"),keystroke:"CTRL+C"},{label:t("Paste content"),keystroke:"CTRL+V"},{label:t("Paste content as plain text"),keystroke:"CTRL+SHIFT+V"}]})}}class sy extends dr{constructor(e){super(e),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(e.data,"set",((e,t)=>{t[1]={...t[1]};const o=t[1];o.batchType||(o.batchType={isUndoable:!1})}),{priority:"high"}),this.listenTo(e.data,"set",((e,t)=>{t[1].batchType.isUndoable||this.clearStack()}))}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(e){const t=this.editor.model.document.selection,o={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:o}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,o){const n=this.editor.model,i=n.document,r=[],s=e.map((e=>e.getTransformedByOperations(o))),a=s.flat();for(const e of s){const t=e.filter((e=>e.root!=i.graveyard)).filter((e=>!ly(e,a)));t.length&&(ay(t),r.push(t[0]))}r.length&&n.change((e=>{e.setSelection(r,{backward:t})}))}_undo(e,t){const o=this.editor.model,n=o.document;this._createdBatches.add(t);const i=e.operations.slice().filter((e=>e.isDocumentOperation));i.reverse();for(const e of i){const i=e.baseVersion+1,r=Array.from(n.history.getOperations(i)),s=Ud([e.getReversed()],r,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(let i of s){const r=i.affectedSelectable;r&&!o.canEditAt(r)&&(i=new Md(i.baseVersion)),t.addOperation(i),o.applyOperation(i),n.history.setOperationAsUndone(e,i)}}}}function ay(e){e.sort(((e,t)=>e.start.isBefore(t.start)?-1:1));for(let t=1;tt!==e&&t.containsRange(e,!0)))}class cy extends sy{execute(e=null){const t=e?this._stack.findIndex((t=>t.batch==e)):this._stack.length-1,o=this._stack.splice(t,1)[0],n=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(n,(()=>{this._undo(o.batch,n);const e=this.editor.model.document.history.getOperations(o.batch.baseVersion);this._restoreSelection(o.selection.ranges,o.selection.isBackward,e)})),this.fire("revert",o.batch,n),this.refresh()}}class dy extends sy{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(t,(()=>{const o=e.batch.operations[e.batch.operations.length-1].baseVersion+1,n=this.editor.model.document.history.getOperations(o);this._restoreSelection(e.selection.ranges,e.selection.isBackward,n),this._undo(e.batch,t)})),this.refresh()}}class uy extends lr{constructor(){super(...arguments),this._batchRegistry=new WeakSet}static get pluginName(){return"UndoEditing"}init(){const e=this.editor,t=e.t;this._undoCommand=new cy(e),this._redoCommand=new dy(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",((e,t)=>{const o=t[0];if(!o.isDocumentOperation)return;const n=o.batch,i=this._redoCommand.createdBatches.has(n),r=this._undoCommand.createdBatches.has(n);this._batchRegistry.has(n)||(this._batchRegistry.add(n),n.isUndoable&&(i?this._undoCommand.addBatch(n):r||(this._undoCommand.addBatch(n),this._redoCommand.clearStack())))}),{priority:"highest"}),this.listenTo(this._undoCommand,"revert",((e,t,o)=>{this._redoCommand.addBatch(o)})),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo"),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Undo"),keystroke:"CTRL+Z"},{label:t("Redo"),keystroke:[["CTRL+Y"],["CTRL+SHIFT+Z"]]}]})}}class hy extends lr{static get pluginName(){return"UndoUI"}init(){const e=this.editor,t=e.locale,o=e.t,n="ltr"==t.uiLanguageDirection?qh.undo:qh.redo,i="ltr"==t.uiLanguageDirection?qh.redo:qh.undo;this._addButtonsToFactory("undo",o("Undo"),"CTRL+Z",n),this._addButtonsToFactory("redo",o("Redo"),"CTRL+Y",i)}_addButtonsToFactory(e,t,o,n){const i=this.editor;i.ui.componentFactory.add(e,(()=>{const i=this._createButton(Em,e,t,o,n);return i.set({tooltip:!0}),i})),i.ui.componentFactory.add("menuBar:"+e,(()=>this._createButton(ip,e,t,o,n)))}_createButton(e,t,o,n,i){const r=this.editor,s=r.locale,a=r.commands.get(t),l=new e(s);return l.set({label:o,icon:i,keystroke:n}),l.bind("isEnabled").to(a,"isEnabled"),this.listenTo(l,"execute",(()=>{r.execute(t),r.editing.view.focus()})),l}}class my extends lr{static get requires(){return[uy,hy]}static get pluginName(){return"Undo"}}function py(e){return e.createContainerElement("figure",{class:"image"},[e.createEmptyElement("img"),e.createSlot("children")])}function gy(e,t){const o=e.plugins.get("ImageUtils"),n=e.plugins.has("ImageInlineEditing")&&e.plugins.has("ImageBlockEditing");return e=>{if(!o.isInlineImageView(e))return null;if(!n)return i(e);return("block"==e.getStyle("display")||e.findAncestor(o.isBlockImageView)?"imageBlock":"imageInline")!==t?null:i(e)};function i(e){const t={name:!0};return e.hasAttribute("src")&&(t.attributes=["src"]),t}}function fy(e,t){const o=Qi(t.getSelectedBlocks());return!o||e.isObject(o)||o.isEmpty&&"listItem"!=o.name?"imageBlock":"imageInline"}function by(e){return e&&e.endsWith("px")?parseInt(e):null}function ky(e){const t=by(e.getStyle("width")),o=by(e.getStyle("height"));return!(!t||!o)}const wy=/^(image|image-inline)$/;class _y extends lr{constructor(){super(...arguments),this._domEmitter=new(Rn())}static get pluginName(){return"ImageUtils"}isImage(e){return this.isInlineImage(e)||this.isBlockImage(e)}isInlineImageView(e){return!!e&&e.is("element","img")}isBlockImageView(e){return!!e&&e.is("element","figure")&&e.hasClass("image")}insertImage(e={},t=null,o=null,n={}){const i=this.editor,r=i.model,s=r.document.selection,a=yy(i,t||s,o);e={...Object.fromEntries(s.getAttributes()),...e};for(const t in e)r.schema.checkAttribute(a,t)||delete e[t];return r.change((o=>{const{setImageSizes:i=!0}=n,s=o.createElement(a,e);return r.insertObject(s,t,null,{setSelection:"on",findOptimalPosition:t||"imageInline"==a?void 0:"auto"}),s.parent?(i&&this.setImageNaturalSizeAttributes(s),s):null}))}setImageNaturalSizeAttributes(e){const o=e.getAttribute("src");o&&(e.getAttribute("width")||e.getAttribute("height")||this.editor.model.change((n=>{const i=new t.window.Image;this._domEmitter.listenTo(i,"load",(()=>{e.getAttribute("width")||e.getAttribute("height")||this.editor.model.enqueueChange(n.batch,(t=>{t.setAttribute("width",i.naturalWidth,e),t.setAttribute("height",i.naturalHeight,e)})),this._domEmitter.stopListening(i,"load")})),i.src=o})))}getClosestSelectedImageWidget(e){const t=e.getFirstPosition();if(!t)return null;const o=e.getSelectedElement();if(o&&this.isImageWidget(o))return o;let n=t.parent;for(;n;){if(n.is("element")&&this.isImageWidget(n))return n;n=n.parent}return null}getClosestSelectedImageElement(e){const t=e.getSelectedElement();return this.isImage(t)?t:e.getFirstPosition().findAncestor("imageBlock")}getImageWidgetFromImageView(e){return e.findAncestor({classes:wy})}isImageAllowed(){const e=this.editor.model.document.selection;return function(e,t){const o=yy(e,t,null);if("imageBlock"==o){const o=function(e,t){const o=function(e,t){const o=e.getSelectedElement();if(o){const n=Ik(e);if(n)return t.createRange(t.createPositionAt(o,n))}return t.schema.findOptimalInsertionRange(e)}(e,t),n=o.start.parent;if(n.isEmpty&&!n.is("element","$root"))return n.parent;return n}(t,e.model);if(e.model.schema.checkChild(o,"imageBlock"))return!0}else if(e.model.schema.checkChild(t.focus,"imageInline"))return!0;return!1}(this.editor,e)&&function(e){return[...e.focus.getAncestors()].every((e=>!e.is("element","imageBlock")))}(e)}toImageWidget(e,t,o){t.setCustomProperty("image",!0,e);return zk(e,t,{label:()=>{const t=this.findViewImgElement(e).getAttribute("alt");return t?`${t} ${o}`:o}})}isImageWidget(e){return!!e.getCustomProperty("image")&&Rk(e)}isBlockImage(e){return!!e&&e.is("element","imageBlock")}isInlineImage(e){return!!e&&e.is("element","imageInline")}findViewImgElement(e){if(this.isInlineImageView(e))return e;const t=this.editor.editing.view;for(const{item:o}of t.createRangeIn(e))if(this.isInlineImageView(o))return o}destroy(){return this._domEmitter.stopListening(),super.destroy()}}function yy(e,t,o){const n=e.model.schema,i=e.config.get("image.insert.type");return e.plugins.has("ImageBlockEditing")?e.plugins.has("ImageInlineEditing")?o||("inline"===i?"imageInline":"auto"!==i?"imageBlock":t.is("selection")?fy(n,t):n.checkChild(t,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}new RegExp(String(/^(http(s)?:\/\/)?[\w-]+\.[\w.~:/[\]@!$&'()*+,;=%-]+/.source+/\.(jpg|jpeg|png|gif|ico|webp|JPG|JPEG|PNG|GIF|ICO|WEBP)/.source+/(\?[\w.~:/[\]@!$&'()*+,;=%-]*)?/.source+/(#[\w.~:/[\]@!$&'()*+,;=%-]*)?$/.source));class Ay extends dr{refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled&&e.hasAttribute("alt")?this.value=e.getAttribute("alt"):this.value=!1}execute(e){const t=this.editor,o=t.plugins.get("ImageUtils"),n=t.model,i=o.getClosestSelectedImageElement(n.document.selection);n.change((t=>{t.setAttribute("alt",e.newValue,i)}))}}class Cy extends lr{static get requires(){return[_y]}static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new Ay(this.editor))}}var vy=i(8429),xy={attributes:{"data-cke":!0}};xy.setAttributes=Ar(),xy.insert=_r().bind(null,"head"),xy.domAPI=kr(),xy.insertStyleElement=vr();fr()(vy.A,xy);vy.A&&vy.A.locals&&vy.A.locals;var Ey=i(871),Dy={attributes:{"data-cke":!0}};Dy.setAttributes=Ar(),Dy.insert=_r().bind(null,"head"),Dy.domAPI=kr(),Dy.insertStyleElement=vr();fr()(Ey.A,Dy);Ey.A&&Ey.A.locals&&Ey.A.locals;class By extends pm{constructor(e){super(e);const t=this.locale.t;this.focusTracker=new Xi,this.keystrokes=new er,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(t("Save"),qh.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(t("Cancel"),qh.cancel,"ck-button-cancel","cancel"),this._focusables=new Uh,this._focusCycler=new Im({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form","ck-responsive-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),bm({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(e,t,o,n){const i=new Em(this.locale);return i.set({label:e,icon:t,tooltip:!0}),i.extendTemplate({attributes:{class:o}}),n&&i.delegate("execute").to(this,n),i}_createLabeledInputView(){const e=this.locale.t,t=new jp(this.locale,Fg);return t.label=e("Text alternative"),t}}function Sy(e){const t=e.editing.view,o=Ff.defaultPositions,n=e.plugins.get("ImageUtils");return{target:t.domConverter.mapViewToDom(n.getClosestSelectedImageWidget(t.document.selection)),positions:[o.northArrowSouth,o.northArrowSouthWest,o.northArrowSouthEast,o.southArrowNorth,o.southArrowNorthWest,o.southArrowNorthEast,o.viewportStickyNorth]}}class Ty extends lr{static get requires(){return[Fb]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton()}destroy(){super.destroy(),this._form&&this._form.destroy()}_createButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("imageTextAlternative",(o=>{const n=e.commands.get("imageTextAlternative"),i=new Em(o);return i.set({label:t("Change image text alternative"),icon:qh.textAlternative,tooltip:!0}),i.bind("isEnabled").to(n,"isEnabled"),i.bind("isOn").to(n,"value",(e=>!!e)),this.listenTo(i,"execute",(()=>{this._showForm()})),i}))}_createForm(){const e=this.editor,t=e.editing.view.document,o=e.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(fm(By))(e.locale),this._form.render(),this.listenTo(this._form,"submit",(()=>{e.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)})),this.listenTo(this._form,"cancel",(()=>{this._hideForm(!0)})),this._form.keystrokes.set("Esc",((e,t)=>{this._hideForm(!0),t()})),this.listenTo(e.ui,"update",(()=>{o.getClosestSelectedImageWidget(t.selection)?this._isVisible&&function(e){const t=e.plugins.get("ContextualBalloon");if(e.plugins.get("ImageUtils").getClosestSelectedImageWidget(e.editing.view.document.selection)){const o=Sy(e);t.updatePosition(o)}}(e):this._hideForm(!0)})),gm({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;this._form||this._createForm();const e=this.editor,t=e.commands.get("imageTextAlternative"),o=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:Sy(e)}),o.fieldView.value=o.fieldView.element.value=t.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return!!this._balloon&&this._balloon.visibleView===this._form}get _isInBalloon(){return!!this._balloon&&this._balloon.hasView(this._form)}}class Iy extends lr{static get requires(){return[Cy,Ty]}static get pluginName(){return"ImageTextAlternative"}}function Py(e,t){const o=(t,o,n)=>{if(!n.consumable.consume(o.item,t.name))return;const i=n.writer,r=n.mapper.toViewElement(o.item),s=e.findViewImgElement(r);null===o.attributeNewValue?(i.removeAttribute("srcset",s),i.removeAttribute("sizes",s)):o.attributeNewValue&&(i.setAttribute("srcset",o.attributeNewValue,s),i.setAttribute("sizes","100vw",s))};return e=>{e.on(`attribute:srcset:${t}`,o)}}function Fy(e,t,o){const n=(t,o,n)=>{if(!n.consumable.consume(o.item,t.name))return;const i=n.writer,r=n.mapper.toViewElement(o.item),s=e.findViewImgElement(r);i.setAttribute(o.attributeKey,o.attributeNewValue||"",s)};return e=>{e.on(`attribute:${o}:${t}`,n)}}class My extends za{observe(e){this.listenTo(e,"load",((e,t)=>{const o=t.target;this.checkShouldIgnoreEventFromTarget(o)||"IMG"==o.tagName&&this._fireEvents(t)}),{useCapture:!0})}stopObserving(e){this.stopListening(e)}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}class Ry extends dr{constructor(e){super(e);const t=e.config.get("image.insert.type");e.plugins.has("ImageBlockEditing")||"block"===t&&D("image-block-plugin-required"),e.plugins.has("ImageInlineEditing")||"inline"===t&&D("image-inline-plugin-required")}refresh(){const e=this.editor.plugins.get("ImageUtils");this.isEnabled=e.isImageAllowed()}execute(e){const t=xi(e.source),o=this.editor.model.document.selection,n=this.editor.plugins.get("ImageUtils"),i=Object.fromEntries(o.getAttributes());t.forEach(((e,t)=>{const r=o.getSelectedElement();if("string"==typeof e&&(e={src:e}),t&&r&&n.isImage(r)){const t=this.editor.model.createPositionAfter(r);n.insertImage({...e,...i},t)}else n.insertImage({...e,...i})}))}}class zy extends dr{constructor(e){super(e),this.decorate("cleanupImage")}refresh(){const e=this.editor.plugins.get("ImageUtils"),t=this.editor.model.document.selection.getSelectedElement();this.isEnabled=e.isImage(t),this.value=this.isEnabled?t.getAttribute("src"):null}execute(e){const t=this.editor.model.document.selection.getSelectedElement(),o=this.editor.plugins.get("ImageUtils");this.editor.model.change((n=>{n.setAttribute("src",e.source,t),this.cleanupImage(n,t),o.setImageNaturalSizeAttributes(t)}))}cleanupImage(e,t){e.removeAttribute("srcset",t),e.removeAttribute("sizes",t),e.removeAttribute("sources",t),e.removeAttribute("width",t),e.removeAttribute("height",t),e.removeAttribute("alt",t)}}class Vy extends lr{static get requires(){return[_y]}static get pluginName(){return"ImageEditing"}init(){const e=this.editor,t=e.conversion;e.editing.view.addObserver(My),t.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:"srcset"});const o=new Ry(e),n=new zy(e);e.commands.add("insertImage",o),e.commands.add("replaceImageSource",n),e.commands.add("imageInsert",o)}}class Oy extends lr{static get requires(){return[_y]}static get pluginName(){return"ImageSizeAttributes"}afterInit(){this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline")}_registerSchema(){this.editor.plugins.has("ImageBlockEditing")&&this.editor.model.schema.extend("imageBlock",{allowAttributes:["width","height"]}),this.editor.plugins.has("ImageInlineEditing")&&this.editor.model.schema.extend("imageInline",{allowAttributes:["width","height"]})}_registerConverters(e){const t=this.editor,o=t.plugins.get("ImageUtils"),n="imageBlock"===e?"figure":"img";function i(t,n,i,r){t.on(`attribute:${n}:${e}`,((t,n,s)=>{if(!s.consumable.consume(n.item,t.name))return;const a=s.writer,l=s.mapper.toViewElement(n.item),c=o.findViewImgElement(l);if(null!==n.attributeNewValue?a.setAttribute(i,n.attributeNewValue,c):a.removeAttribute(i,c),n.item.hasAttribute("sources"))return;const d=n.item.hasAttribute("resizedWidth");if("imageInline"===e&&!d&&!r)return;const u=n.item.getAttribute("width"),h=n.item.getAttribute("height");u&&h&&a.setStyle("aspect-ratio",`${u}/${h}`,c)}))}t.conversion.for("upcast").attributeToAttribute({view:{name:n,styles:{width:/.+/}},model:{key:"width",value:e=>ky(e)?by(e.getStyle("width")):null}}).attributeToAttribute({view:{name:n,key:"width"},model:"width"}).attributeToAttribute({view:{name:n,styles:{height:/.+/}},model:{key:"height",value:e=>ky(e)?by(e.getStyle("height")):null}}).attributeToAttribute({view:{name:n,key:"height"},model:"height"}),t.conversion.for("editingDowncast").add((e=>{i(e,"width","width",!0),i(e,"height","height",!0)})),t.conversion.for("dataDowncast").add((e=>{i(e,"width","width",!1),i(e,"height","height",!1)}))}}class Ny extends dr{constructor(e,t){super(e),this._modelElementName=t}refresh(){const e=this.editor.plugins.get("ImageUtils"),t=e.getClosestSelectedImageElement(this.editor.model.document.selection);"imageBlock"===this._modelElementName?this.isEnabled=e.isInlineImage(t):this.isEnabled=e.isBlockImage(t)}execute(e={}){const t=this.editor,o=this.editor.model,n=t.plugins.get("ImageUtils"),i=n.getClosestSelectedImageElement(o.document.selection),r=Object.fromEntries(i.getAttributes());return r.src||r.uploadId?o.change((t=>{const{setImageSizes:s=!0}=e,a=Array.from(o.markers).filter((e=>e.getRange().containsItem(i))),l=n.insertImage(r,o.createSelection(i,"on"),this._modelElementName,{setImageSizes:s});if(!l)return null;const c=t.createRangeOn(l);for(const e of a){const o=e.getRange(),n="$graveyard"!=o.root.rootName?o.getJoined(c,!0):c;t.updateMarker(e,{range:n})}return{oldElement:i,newElement:l}})):null}}var Ly=i(1091),Hy={attributes:{"data-cke":!0}};Hy.setAttributes=Ar(),Hy.insert=_r().bind(null,"head"),Hy.domAPI=kr(),Hy.insertStyleElement=vr();fr()(Ly.A,Hy);Ly.A&&Ly.A.locals&&Ly.A.locals;class jy extends lr{static get requires(){return[_y]}static get pluginName(){return"ImagePlaceholder"}afterInit(){this._setupSchema(),this._setupConversion(),this._setupLoadListener()}_setupSchema(){const e=this.editor.model.schema;e.isRegistered("imageBlock")&&e.extend("imageBlock",{allowAttributes:["placeholder"]}),e.isRegistered("imageInline")&&e.extend("imageInline",{allowAttributes:["placeholder"]})}_setupConversion(){const e=this.editor,t=e.conversion,o=e.plugins.get("ImageUtils");t.for("editingDowncast").add((e=>{e.on("attribute:placeholder",((e,t,n)=>{if(!n.consumable.test(t.item,e.name))return;if(!t.item.is("element","imageBlock")&&!t.item.is("element","imageInline"))return;n.consumable.consume(t.item,e.name);const i=n.writer,r=n.mapper.toViewElement(t.item),s=o.findViewImgElement(r);t.attributeNewValue?(i.addClass("image_placeholder",s),i.setStyle("background-image",`url(${t.attributeNewValue})`,s),i.setCustomProperty("editingPipeline:doNotReuseOnce",!0,s)):(i.removeClass("image_placeholder",s),i.removeStyle("background-image",s))}))}))}_setupLoadListener(){const e=this.editor,t=e.model,o=e.editing,n=o.view,i=e.plugins.get("ImageUtils");n.addObserver(My),this.listenTo(n.document,"imageLoaded",((e,r)=>{const s=n.domConverter.mapDomToView(r.target);if(!s)return;const a=i.getImageWidgetFromImageView(s);if(!a)return;const l=o.mapper.toModelElement(a);l&&l.hasAttribute("placeholder")&&t.enqueueChange({isUndoable:!1},(e=>{e.removeAttribute("placeholder",l)}))}))}}class qy extends lr{static get requires(){return[Vy,Oy,_y,jy,j_]}static get pluginName(){return"ImageBlockEditing"}init(){const e=this.editor;e.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),e.plugins.has("ImageInlineEditing")&&(e.commands.add("imageTypeBlock",new Ny(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,o=e.conversion,n=e.plugins.get("ImageUtils");o.for("dataDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:t})=>py(t)}),o.for("editingDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:o})=>n.toImageWidget(py(o),o,t("image widget"))}),o.for("downcast").add(Fy(n,"imageBlock","src")).add(Fy(n,"imageBlock","alt")).add(Py(n,"imageBlock")),o.for("upcast").elementToElement({view:gy(e,"imageBlock"),model:(e,{writer:t})=>t.createElement("imageBlock",e.hasAttribute("src")?{src:e.getAttribute("src")}:void 0)}).add(function(e){const t=(t,o,n)=>{if(!n.consumable.test(o.viewItem,{name:!0,classes:"image"}))return;const i=e.findViewImgElement(o.viewItem);if(!i||!n.consumable.test(i,{name:!0}))return;n.consumable.consume(o.viewItem,{name:!0,classes:"image"});const r=Qi(n.convertItem(i,o.modelCursor).modelRange.getItems());r?(n.convertChildren(o.viewItem,r),n.updateConversionResult(r,o)):n.consumable.revert(o.viewItem,{name:!0,classes:"image"})};return e=>{e.on("element:figure",t)}}(n))}_setupClipboardIntegration(){const e=this.editor,t=e.model,o=e.editing.view,n=e.plugins.get("ImageUtils"),i=e.plugins.get("ClipboardPipeline");this.listenTo(i,"inputTransformation",((i,r)=>{const s=Array.from(r.content.getChildren());let a;if(!s.every(n.isInlineImageView))return;a=r.targetRanges?e.editing.mapper.toModelRange(r.targetRanges[0]):t.document.selection.getFirstRange();const l=t.createSelection(a);if("imageBlock"===fy(t.schema,l)){const e=new Lu(o.document),t=s.map((t=>e.createElement("figure",{class:"image"},t)));r.content=e.createDocumentFragment(t)}})),this.listenTo(i,"contentInsertion",((e,o)=>{"paste"===o.method&&t.change((e=>{const t=e.createRangeIn(o.content);for(const e of t.getItems())e.is("element","imageBlock")&&n.setImageNaturalSizeAttributes(e)}))}))}}var Uy=i(1545),Wy={attributes:{"data-cke":!0}};Wy.setAttributes=Ar(),Wy.insert=_r().bind(null,"head"),Wy.domAPI=kr(),Wy.insertStyleElement=vr();fr()(Uy.A,Wy);Uy.A&&Uy.A.locals&&Uy.A.locals;class $y extends pm{constructor(e,t=[]){super(e),this.focusTracker=new Xi,this.keystrokes=new er,this._focusables=new Uh,this.children=this.createCollection(),this._focusCycler=new Im({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});for(const e of t)this.children.add(e),this._focusables.add(e),e instanceof xp&&this._focusables.addMany(e.children);this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-insert-form"],tabindex:-1},children:this.children})}render(){super.render(),bm({view:this});for(const e of this._focusables)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element);const e=e=>e.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}}class Gy extends lr{static get pluginName(){return"ImageInsertUI"}static get requires(){return[_y]}constructor(e){super(e),this._integrations=new Map,e.config.define("image.insert.integrations",["upload","assetManager","url"])}init(){const e=this.editor,t=e.model.document.selection,o=e.plugins.get("ImageUtils");this.set("isImageSelected",!1),this.listenTo(e.model.document,"change",(()=>{this.isImageSelected=o.isImage(t.getSelectedElement())}));const n=e=>this._createToolbarComponent(e);e.ui.componentFactory.add("insertImage",n),e.ui.componentFactory.add("imageInsert",n),e.ui.componentFactory.add("menuBar:insertImage",(e=>this._createMenuBarComponent(e)))}registerIntegration({name:e,observable:t,buttonViewCreator:o,formViewCreator:n,menuBarButtonViewCreator:i,requiresForm:r=!1}){this._integrations.has(e)&&D("image-insert-integration-exists",{name:e}),this._integrations.set(e,{observable:t,buttonViewCreator:o,menuBarButtonViewCreator:i,formViewCreator:n,requiresForm:r})}_createToolbarComponent(e){const t=this.editor,o=e.t,n=this._prepareIntegrations();if(!n.length)return null;let i;const r=n[0];if(1==n.length){if(!r.requiresForm)return r.buttonViewCreator(!0);i=r.buttonViewCreator(!0)}else{const t=r.buttonViewCreator(!1);i=new yg(e,t),i.tooltip=!0,i.bind("label").to(this,"isImageSelected",(e=>o(e?"Replace image":"Insert image")))}const s=this.dropdownView=Eg(e,i),a=n.map((({observable:e})=>"function"==typeof e?e():e));return s.bind("isEnabled").toMany(a,"isEnabled",((...e)=>e.some((e=>e)))),s.once("change:isOpen",(()=>{const e=n.map((({formViewCreator:e})=>e(1==n.length))),o=new $y(t.locale,e);s.panelView.children.add(o)})),s}_createMenuBarComponent(e){const t=e.t,o=this._prepareIntegrations();if(!o.length)return null;let n;const i=o[0];if(1==o.length)n=i.menuBarButtonViewCreator(!0);else{n=new mk(e);const i=new pk(e);n.panelView.children.add(i),n.buttonView.set({icon:qh.image,label:t("Image")});for(const t of o){const o=new nb(e,n),r=t.menuBarButtonViewCreator(!1);o.children.add(r),i.items.add(o)}}return n}_prepareIntegrations(){const e=this.editor.config.get("image.insert.integrations"),t=[];if(!e.length)return D("image-insert-integrations-not-specified"),t;for(const o of e)this._integrations.has(o)?t.push(this._integrations.get(o)):["upload","assetManager","url"].includes(o)||D("image-insert-unknown-integration",{item:o});return t.length||D("image-insert-integrations-not-registered"),t}}var Ky=i(8574),Zy={attributes:{"data-cke":!0}};Zy.setAttributes=Ar(),Zy.insert=_r().bind(null,"head"),Zy.domAPI=kr(),Zy.insertStyleElement=vr();fr()(Ky.A,Zy);Ky.A&&Ky.A.locals&&Ky.A.locals;class Jy extends lr{static get requires(){return[Vy,Oy,_y,jy,j_]}static get pluginName(){return"ImageInlineEditing"}init(){const e=this.editor;e.model.schema.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"],disallowIn:["caption"]}),this._setupConversion(),e.plugins.has("ImageBlockEditing")&&(e.commands.add("imageTypeInline",new Ny(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,o=e.conversion,n=e.plugins.get("ImageUtils");o.for("dataDowncast").elementToElement({model:"imageInline",view:(e,{writer:t})=>t.createEmptyElement("img")}),o.for("editingDowncast").elementToStructure({model:"imageInline",view:(e,{writer:o})=>n.toImageWidget(function(e){return e.createContainerElement("span",{class:"image-inline"},e.createEmptyElement("img"))}(o),o,t("image widget"))}),o.for("downcast").add(Fy(n,"imageInline","src")).add(Fy(n,"imageInline","alt")).add(Py(n,"imageInline")),o.for("upcast").elementToElement({view:gy(e,"imageInline"),model:(e,{writer:t})=>t.createElement("imageInline",e.hasAttribute("src")?{src:e.getAttribute("src")}:void 0)})}_setupClipboardIntegration(){const e=this.editor,t=e.model,o=e.editing.view,n=e.plugins.get("ImageUtils"),i=e.plugins.get("ClipboardPipeline");this.listenTo(i,"inputTransformation",((i,r)=>{const s=Array.from(r.content.getChildren());let a;if(!s.every(n.isBlockImageView))return;a=r.targetRanges?e.editing.mapper.toModelRange(r.targetRanges[0]):t.document.selection.getFirstRange();const l=t.createSelection(a);if("imageInline"===fy(t.schema,l)){const e=new Lu(o.document),t=s.map((t=>1===t.childCount?(Array.from(t.getAttributes()).forEach((o=>e.setAttribute(...o,n.findViewImgElement(t)))),t.getChild(0)):t));r.content=e.createDocumentFragment(t)}})),this.listenTo(i,"contentInsertion",((e,o)=>{"paste"===o.method&&t.change((e=>{const t=e.createRangeIn(o.content);for(const e of t.getItems())e.is("element","imageInline")&&n.setImageNaturalSizeAttributes(e)}))}))}}class Yy extends lr{static get pluginName(){return"ImageCaptionUtils"}static get requires(){return[_y]}getCaptionFromImageModelElement(e){for(const t of e.getChildren())if(t&&t.is("element","caption"))return t;return null}getCaptionFromModelSelection(e){const t=this.editor.plugins.get("ImageUtils"),o=e.getFirstPosition().findAncestor("caption");return o&&t.isBlockImage(o.parent)?o:null}matchImageCaptionViewElement(e){const t=this.editor.plugins.get("ImageUtils");return"figcaption"==e.name&&t.isBlockImageView(e.parent)?{name:!0}:null}}class Qy extends dr{refresh(){const e=this.editor,t=e.plugins.get("ImageCaptionUtils"),o=e.plugins.get("ImageUtils");if(!e.plugins.has(qy))return this.isEnabled=!1,void(this.value=!1);const n=e.model.document.selection,i=n.getSelectedElement();if(!i){const e=t.getCaptionFromModelSelection(n);return this.isEnabled=!!e,void(this.value=!!e)}this.isEnabled=o.isImage(i),this.isEnabled?this.value=!!t.getCaptionFromImageModelElement(i):this.value=!1}execute(e={}){const{focusCaptionOnShow:t}=e;this.editor.model.change((e=>{this.value?this._hideImageCaption(e):this._showImageCaption(e,t)}))}_showImageCaption(e,t){const o=this.editor.model.document.selection,n=this.editor.plugins.get("ImageCaptionEditing"),i=this.editor.plugins.get("ImageUtils");let r=o.getSelectedElement();const s=n._getSavedCaption(r);i.isInlineImage(r)&&(this.editor.execute("imageTypeBlock"),r=o.getSelectedElement());const a=s||e.createElement("caption");e.append(a,r),t&&e.setSelection(a,"in")}_hideImageCaption(e){const t=this.editor,o=t.model.document.selection,n=t.plugins.get("ImageCaptionEditing"),i=t.plugins.get("ImageCaptionUtils");let r,s=o.getSelectedElement();s?r=i.getCaptionFromImageModelElement(s):(r=i.getCaptionFromModelSelection(o),s=r.parent),n._saveCaption(s,r),e.setSelection(s,"on"),e.remove(r)}}class Xy extends lr{static get requires(){return[_y,Yy]}static get pluginName(){return"ImageCaptionEditing"}constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,t=e.model.schema;t.isRegistered("caption")?t.extend("caption",{allowIn:"imageBlock"}):t.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleImageCaption",new Qy(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration(),this._registerCaptionReconversion()}_setupConversion(){const e=this.editor,t=e.editing.view,o=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils"),i=e.t;e.conversion.for("upcast").elementToElement({view:e=>n.matchImageCaptionViewElement(e),model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>o.isBlockImage(e.parent)?t.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,{writer:n})=>{if(!o.isBlockImage(e.parent))return null;const r=n.createEditableElement("figcaption");n.setCustomProperty("imageCaption",!0,r),r.placeholder=i("Enter image caption"),Sr({view:t,element:r,keepOnFocus:!0});const s=e.parent.getAttribute("alt");return Lk(r,n,{label:s?i("Caption for image: %0",[s]):i("Caption for the image")})}})}_setupImageTypeCommandsIntegration(){const e=this.editor,t=e.plugins.get("ImageUtils"),o=e.plugins.get("ImageCaptionUtils"),n=e.commands.get("imageTypeInline"),i=e.commands.get("imageTypeBlock"),r=e=>{if(!e.return)return;const{oldElement:n,newElement:i}=e.return;if(!n)return;if(t.isBlockImage(n)){const e=o.getCaptionFromImageModelElement(n);if(e)return void this._saveCaption(i,e)}const r=this._getSavedCaption(n);r&&this._saveCaption(i,r)};n&&this.listenTo(n,"execute",r,{priority:"low"}),i&&this.listenTo(i,"execute",r,{priority:"low"})}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?Ll.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}_registerCaptionReconversion(){const e=this.editor,t=e.model,o=e.plugins.get("ImageUtils"),n=e.plugins.get("ImageCaptionUtils");t.document.on("change:data",(()=>{const i=t.document.differ.getChanges();for(const t of i){if("alt"!==t.attributeKey)continue;const i=t.range.start.nodeAfter;if(o.isBlockImage(i)){const t=n.getCaptionFromImageModelElement(i);if(!t)return;e.editing.reconvertItem(t)}}}))}}class eA extends lr{static get requires(){return[Yy]}static get pluginName(){return"ImageCaptionUI"}init(){const e=this.editor,t=e.editing.view,o=e.plugins.get("ImageCaptionUtils"),n=e.t;e.ui.componentFactory.add("toggleImageCaption",(i=>{const r=e.commands.get("toggleImageCaption"),s=new Em(i);return s.set({icon:qh.caption,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.bind("label").to(r,"value",(e=>n(e?"Toggle caption off":"Toggle caption on"))),this.listenTo(s,"execute",(()=>{e.execute("toggleImageCaption",{focusCaptionOnShow:!0});const n=o.getCaptionFromModelSelection(e.model.document.selection);if(n){const o=e.editing.mapper.toViewElement(n);t.scrollToTheSelection(),t.change((e=>{e.addClass("image__caption_highlighted",o)}))}e.editing.view.focus()})),s}))}}var tA=i(3038),oA={attributes:{"data-cke":!0}};oA.setAttributes=Ar(),oA.insert=_r().bind(null,"head"),oA.domAPI=kr(),oA.insertStyleElement=vr();fr()(tA.A,oA);tA.A&&tA.A.locals&&tA.A.locals;function nA(e){const t=e.map((e=>e.replace("+","\\+")));return new RegExp(`^image\\/(${t.join("|")})$`)}function iA(e){return new Promise(((o,n)=>{const i=e.getAttribute("src");fetch(i).then((e=>e.blob())).then((e=>{const t=rA(e,i),n=t.replace("image/",""),r=new File([e],`image.${n}`,{type:t});o(r)})).catch((e=>e&&"TypeError"===e.name?function(e){return function(e){return new Promise(((o,n)=>{const i=t.document.createElement("img");i.addEventListener("load",(()=>{const e=t.document.createElement("canvas");e.width=i.width,e.height=i.height;e.getContext("2d").drawImage(i,0,0),e.toBlob((e=>e?o(e):n()))})),i.addEventListener("error",(()=>n())),i.src=e}))}(e).then((t=>{const o=rA(t,e),n=o.replace("image/","");return new File([t],`image.${n}`,{type:o})}))}(i).then(o).catch(n):n(e)))}))}function rA(e,t){return e.type?e.type:t.match(/data:(image\/\w+);base64/)?t.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}class sA extends lr{static get pluginName(){return"ImageUploadUI"}init(){const e=this.editor;e.ui.componentFactory.add("uploadImage",(()=>this._createToolbarButton())),e.ui.componentFactory.add("imageUpload",(()=>this._createToolbarButton())),e.ui.componentFactory.add("menuBar:uploadImage",(()=>this._createMenuBarButton("standalone"))),e.plugins.has("ImageInsertUI")&&e.plugins.get("ImageInsertUI").registerIntegration({name:"upload",observable:()=>e.commands.get("uploadImage"),buttonViewCreator:()=>this._createToolbarButton(),formViewCreator:()=>this._createDropdownButton(),menuBarButtonViewCreator:e=>this._createMenuBarButton(e?"insertOnly":"insertNested")})}_createButton(e){const t=this.editor,o=t.locale,n=t.commands.get("uploadImage"),i=t.config.get("image.upload.types"),r=nA(i),s=new e(t.locale),a=o.t;return s.set({acceptedType:i.map((e=>`image/${e}`)).join(","),allowMultipleFiles:!0,label:a("Upload from computer"),icon:qh.imageUpload}),s.bind("isEnabled").to(n),s.on("done",((e,o)=>{const n=Array.from(o).filter((e=>r.test(e.type)));n.length&&(t.execute("uploadImage",{file:n}),t.editing.view.focus())})),s}_createToolbarButton(){const e=this.editor.locale.t,t=this.editor.plugins.get("ImageInsertUI"),o=this.editor.commands.get("uploadImage"),n=this._createButton(kp);return n.tooltip=!0,n.bind("label").to(t,"isImageSelected",o,"isAccessAllowed",((t,o)=>e(o?t?"Replace image from computer":"Upload image from computer":"You have no image upload permissions."))),n}_createDropdownButton(){const e=this.editor.locale.t,t=this.editor.plugins.get("ImageInsertUI"),o=this._createButton(kp);return o.withText=!0,o.bind("label").to(t,"isImageSelected",(t=>e(t?"Replace from computer":"Upload from computer"))),o.on("execute",(()=>{t.dropdownView.isOpen=!1})),o}_createMenuBarButton(e){const t=this.editor.locale.t,o=this._createButton(fk);switch(o.withText=!0,e){case"standalone":o.label=t("Image from computer");break;case"insertOnly":o.label=t("Image");break;case"insertNested":o.label=t("From computer")}return o}}var aA=i(7504),lA={attributes:{"data-cke":!0}};lA.setAttributes=Ar(),lA.insert=_r().bind(null,"head"),lA.domAPI=kr(),lA.insertStyleElement=vr();fr()(aA.A,lA);aA.A&&aA.A.locals&&aA.A.locals;var cA=i(1230),dA={attributes:{"data-cke":!0}};dA.setAttributes=Ar(),dA.insert=_r().bind(null,"head"),dA.domAPI=kr(),dA.insertStyleElement=vr();fr()(cA.A,dA);cA.A&&cA.A.locals&&cA.A.locals;var uA=i(1160),hA={attributes:{"data-cke":!0}};hA.setAttributes=Ar(),hA.insert=_r().bind(null,"head"),hA.domAPI=kr(),hA.insertStyleElement=vr();fr()(uA.A,hA);uA.A&&uA.A.locals&&uA.A.locals;class mA extends lr{static get pluginName(){return"ImageUploadProgress"}constructor(e){super(e),this.uploadStatusChange=(e,t,o)=>{const n=this.editor,i=t.item,r=i.getAttribute("uploadId");if(!o.consumable.consume(t.item,e.name))return;const s=n.plugins.get("ImageUtils"),a=n.plugins.get(k_),l=r?t.attributeNewValue:null,c=this.placeholder,d=n.editing.mapper.toViewElement(i),u=o.writer;if("reading"==l)return pA(d,u),void gA(s,c,d,u);if("uploading"==l){const e=a.loaders.get(r);return pA(d,u),void(e?(fA(d,u),function(e,t,o,n){const i=function(e){const t=e.createUIElement("div",{class:"ck-progress-bar"});return e.setCustomProperty("progressBar",!0,t),t}(t);t.insert(t.createPositionAt(e,"end"),i),o.on("change:uploadedPercent",((e,t,o)=>{n.change((e=>{e.setStyle("width",o+"%",i)}))}))}(d,u,e,n.editing.view),function(e,t,o,n){if(n.data){const i=e.findViewImgElement(t);o.setAttribute("src",n.data,i)}}(s,d,u,e)):gA(s,c,d,u))}"complete"==l&&a.loaders.get(r)&&function(e,t,o){const n=t.createUIElement("div",{class:"ck-image-upload-complete-icon"});t.insert(t.createPositionAt(e,"end"),n),setTimeout((()=>{o.change((e=>e.remove(e.createRangeOn(n))))}),3e3)}(d,u,n.editing.view),function(e,t){kA(e,t,"progressBar")}(d,u),fA(d,u),function(e,t){t.removeClass("ck-appear",e)}(d,u)},this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}init(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",this.uploadStatusChange),e.plugins.has("ImageInlineEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",this.uploadStatusChange)}}function pA(e,t){e.hasClass("ck-appear")||t.addClass("ck-appear",e)}function gA(e,t,o,n){o.hasClass("ck-image-upload-placeholder")||n.addClass("ck-image-upload-placeholder",o);const i=e.findViewImgElement(o);i.getAttribute("src")!==t&&n.setAttribute("src",t,i),bA(o,"placeholder")||n.insert(n.createPositionAfter(i),function(e){const t=e.createUIElement("div",{class:"ck-upload-placeholder-loader"});return e.setCustomProperty("placeholder",!0,t),t}(n))}function fA(e,t){e.hasClass("ck-image-upload-placeholder")&&t.removeClass("ck-image-upload-placeholder",e),kA(e,t,"placeholder")}function bA(e,t){for(const o of e.getChildren())if(o.getCustomProperty(t))return o}function kA(e,t,o){const n=bA(e,o);n&&t.remove(t.createRangeOn(n))}class wA extends dr{constructor(e){super(e),this.set("isAccessAllowed",!0)}refresh(){const e=this.editor,t=e.plugins.get("ImageUtils"),o=e.model.document.selection.getSelectedElement();this.isEnabled=t.isImageAllowed()||t.isImage(o)}execute(e){const t=xi(e.file),o=this.editor.model.document.selection,n=this.editor.plugins.get("ImageUtils"),i=Object.fromEntries(o.getAttributes());t.forEach(((e,t)=>{const r=o.getSelectedElement();if(t&&r&&n.isImage(r)){const t=this.editor.model.createPositionAfter(r);this._uploadImage(e,i,t)}else this._uploadImage(e,i)}))}_uploadImage(e,t,o){const n=this.editor,i=n.plugins.get(k_).createLoader(e),r=n.plugins.get("ImageUtils");i&&r.insertImage({...t,uploadId:i.id},o)}}class _A extends lr{static get requires(){return[k_,Eb,j_,_y]}static get pluginName(){return"ImageUploadEditing"}constructor(e){super(e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}init(){const e=this.editor,t=e.model.document,o=e.conversion,n=e.plugins.get(k_),i=e.plugins.get("ImageUtils"),r=e.plugins.get("ClipboardPipeline"),s=nA(e.config.get("image.upload.types")),a=new wA(e);e.commands.add("uploadImage",a),e.commands.add("imageUpload",a),o.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(e.editing.view.document,"clipboardInput",((t,o)=>{if(n=o.dataTransfer,Array.from(n.types).includes("text/html")&&""!==n.getData("text/html"))return;var n;const i=Array.from(o.dataTransfer.files).filter((e=>!!e&&s.test(e.type)));if(!i.length)return;t.stop(),e.model.change((t=>{o.targetRanges&&t.setSelection(o.targetRanges.map((t=>e.editing.mapper.toModelRange(t)))),e.execute("uploadImage",{file:i})}));if(!e.commands.get("uploadImage").isAccessAllowed){const t=e.plugins.get("Notification"),o=e.locale.t;t.showWarning(o("You have no image upload permissions."),{namespace:"image"})}})),this.listenTo(r,"inputTransformation",((t,o)=>{const r=Array.from(e.editing.view.createRangeIn(o.content)).map((e=>e.item)).filter((e=>function(e,t){return!(!e.isInlineImageView(t)||!t.getAttribute("src")||!t.getAttribute("src").match(/^data:image\/\w+;base64,/g)&&!t.getAttribute("src").match(/^blob:/g))}(i,e)&&!e.getAttribute("uploadProcessed"))).map((e=>({promise:iA(e),imageElement:e})));if(!r.length)return;const s=new Lu(e.editing.view.document);for(const e of r){s.setAttribute("uploadProcessed",!0,e.imageElement);const t=n.createLoader(e.promise);t&&(s.setAttribute("src","",e.imageElement),s.setAttribute("uploadId",t.id,e.imageElement))}})),e.editing.view.document.on("dragover",((e,t)=>{t.preventDefault()})),t.on("change",(()=>{const o=t.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),i=new Set;for(const t of o)if("insert"==t.type&&"$text"!=t.name){const o=t.position.nodeAfter,r="$graveyard"==t.position.root.rootName;for(const t of yA(e,o)){const e=t.getAttribute("uploadId");if(!e)continue;const o=n.loaders.get(e);o&&(r?i.has(e)||o.abort():(i.add(e),this._uploadImageElements.set(e,t),"idle"==o.status&&this._readAndUpload(o)))}}})),this.on("uploadComplete",((e,{imageElement:t,data:o})=>{const n=o.urls?o.urls:o;this.editor.model.change((e=>{e.setAttribute("src",n.default,t),this._parseAndSetSrcsetAttributeOnImage(n,t,e),i.setImageNaturalSizeAttributes(t)}))}),{priority:"low"})}afterInit(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&e.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this.editor.plugins.has("ImageInlineEditing")&&e.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]})}_readAndUpload(e){const t=this.editor,o=t.model,n=t.locale.t,i=t.plugins.get(k_),s=t.plugins.get(Eb),a=t.plugins.get("ImageUtils"),l=this._uploadImageElements;return o.enqueueChange({isUndoable:!1},(t=>{t.setAttribute("uploadStatus","reading",l.get(e.id))})),e.read().then((()=>{const i=e.upload(),s=l.get(e.id);if(r.isSafari){const e=t.editing.mapper.toViewElement(s),o=a.findViewImgElement(e);t.editing.view.once("render",(()=>{if(!o.parent)return;const e=t.editing.view.domConverter.mapViewToDom(o.parent);if(!e)return;const n=e.style.display;e.style.display="none",e._ckHack=e.offsetHeight,e.style.display=n}))}return t.ui&&t.ui.ariaLiveAnnouncer.announce(n("Uploading image")),o.enqueueChange({isUndoable:!1},(e=>{e.setAttribute("uploadStatus","uploading",s)})),i})).then((i=>{o.enqueueChange({isUndoable:!1},(o=>{const r=l.get(e.id);o.setAttribute("uploadStatus","complete",r),t.ui&&t.ui.ariaLiveAnnouncer.announce(n("Image upload complete")),this.fire("uploadComplete",{data:i,imageElement:r})})),c()})).catch((i=>{if(t.ui&&t.ui.ariaLiveAnnouncer.announce(n("Error during image upload")),"error"!==e.status&&"aborted"!==e.status)throw i;"error"==e.status&&i&&s.showWarning(i,{title:n("Upload failed"),namespace:"upload"}),o.enqueueChange({isUndoable:!1},(t=>{t.remove(l.get(e.id))})),c()}));function c(){o.enqueueChange({isUndoable:!1},(t=>{const o=l.get(e.id);t.removeAttribute("uploadId",o),t.removeAttribute("uploadStatus",o),l.delete(e.id)})),i.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,o){let n=0;const i=Object.keys(e).filter((e=>{const t=parseInt(e,10);if(!isNaN(t))return n=Math.max(n,t),!0})).map((t=>`${e[t]} ${t}w`)).join(", ");if(""!=i){const e={srcset:i};t.hasAttribute("width")||t.hasAttribute("height")||(e.width=n),o.setAttributes(e,t)}}}function yA(e,t){const o=e.plugins.get("ImageUtils");return Array.from(e.model.createRangeOn(t)).filter((e=>o.isImage(e.item))).map((e=>e.item))}class AA extends lr{static get pluginName(){return"ImageUpload"}static get requires(){return[_A,sA,mA]}}const CA=function(e,t){return function(o,n){if(null==o)return o;if(!ho(o))return e(o,n);for(var i=o.length,r=t?i:-1,s=Object(o);(t?r--:++r{t.setAttribute("resizedWidth",e.width,i),t.removeAttribute("resizedHeight",i),n.setImageNaturalSizeAttributes(i)}))}}class DA extends lr{static get requires(){return[_y]}static get pluginName(){return"ImageResizeEditing"}constructor(e){super(e),e.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"resizeImage:original",value:null,icon:"original"},{name:"resizeImage:custom",value:"custom",icon:"custom"},{name:"resizeImage:25",value:"25",icon:"small"},{name:"resizeImage:50",value:"50",icon:"medium"},{name:"resizeImage:75",value:"75",icon:"large"}]})}init(){const e=this.editor,t=new EA(e);this._registerConverters("imageBlock"),this._registerConverters("imageInline"),e.commands.add("resizeImage",t),e.commands.add("imageResize",t)}afterInit(){this._registerSchema()}_registerSchema(){this.editor.plugins.has("ImageBlockEditing")&&this.editor.model.schema.extend("imageBlock",{allowAttributes:["resizedWidth","resizedHeight"]}),this.editor.plugins.has("ImageInlineEditing")&&this.editor.model.schema.extend("imageInline",{allowAttributes:["resizedWidth","resizedHeight"]})}_registerConverters(e){const t=this.editor,o=t.plugins.get("ImageUtils");t.conversion.for("downcast").add((t=>t.on(`attribute:resizedWidth:${e}`,((e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const n=o.writer,i=o.mapper.toViewElement(t.item);null!==t.attributeNewValue?(n.setStyle("width",t.attributeNewValue,i),n.addClass("image_resized",i)):(n.removeStyle("width",i),n.removeClass("image_resized",i))})))),t.conversion.for("dataDowncast").attributeToAttribute({model:{name:e,key:"resizedHeight"},view:e=>({key:"style",value:{height:e}})}),t.conversion.for("editingDowncast").add((t=>t.on(`attribute:resizedHeight:${e}`,((t,n,i)=>{if(!i.consumable.consume(n.item,t.name))return;const r=i.writer,s=i.mapper.toViewElement(n.item),a="imageInline"===e?o.findViewImgElement(s):s;null!==n.attributeNewValue?r.setStyle("height",n.attributeNewValue,a):r.removeStyle("height",a)})))),t.conversion.for("upcast").attributeToAttribute({view:{name:"imageBlock"===e?"figure":"img",styles:{width:/.+/}},model:{key:"resizedWidth",value:e=>ky(e)?null:e.getStyle("width")}}),t.conversion.for("upcast").attributeToAttribute({view:{name:"imageBlock"===e?"figure":"img",styles:{height:/.+/}},model:{key:"resizedHeight",value:e=>ky(e)?null:e.getStyle("height")}})}}const BA=(()=>({small:qh.objectSizeSmall,medium:qh.objectSizeMedium,large:qh.objectSizeLarge,custom:qh.objectSizeCustom,original:qh.objectSizeFull}))();class SA extends lr{static get requires(){return[DA]}static get pluginName(){return"ImageResizeButtons"}constructor(e){super(e),this._resizeUnit=e.config.get("image.resizeUnit")}init(){const e=this.editor,t=e.config.get("image.resizeOptions"),o=e.commands.get("resizeImage");this.bind("isEnabled").to(o);for(const e of t)this._registerImageResizeButton(e);this._registerImageResizeDropdown(t)}_registerImageResizeButton(e){const t=this.editor,{name:o,value:n,icon:i}=e;t.ui.componentFactory.add(o,(o=>{const r=new Em(o),s=t.commands.get("resizeImage"),a=this._getOptionLabelValue(e,!0);if(!BA[i])throw new E("imageresizebuttons-missing-icon",t,e);if(r.set({label:a,icon:BA[i],tooltip:a,isToggleable:!0}),r.bind("isEnabled").to(this),t.plugins.has("ImageCustomResizeUI")&&TA(e)){const e=t.plugins.get("ImageCustomResizeUI");this.listenTo(r,"execute",(()=>{e._showForm(this._resizeUnit)}))}else{const e=n?n+this._resizeUnit:null;r.bind("isOn").to(s,"value",IA(e)),this.listenTo(r,"execute",(()=>{t.execute("resizeImage",{width:e})}))}return r}))}_registerImageResizeDropdown(e){const t=this.editor,o=t.t,n=e.find((e=>!e.value)),i=i=>{const r=t.commands.get("resizeImage"),s=Eg(i,og),a=s.buttonView,l=o("Resize image");return a.set({tooltip:l,commandValue:n.value,icon:BA.medium,isToggleable:!0,label:this._getOptionLabelValue(n),withText:!0,class:"ck-resize-image-button",ariaLabel:l,ariaLabelledBy:void 0}),a.bind("label").to(r,"value",(e=>e&&e.width?e.width:this._getOptionLabelValue(n))),s.bind("isEnabled").to(this),Sg(s,(()=>this._getResizeDropdownListItemDefinitions(e,r)),{ariaLabel:o("Image resize list"),role:"menu"}),this.listenTo(s,"execute",(e=>{"onClick"in e.source?e.source.onClick():(t.execute(e.source.commandName,{width:e.source.commandValue}),t.editing.view.focus())})),s};t.ui.componentFactory.add("resizeImage",i),t.ui.componentFactory.add("imageResize",i)}_getOptionLabelValue(e,t=!1){const o=this.editor.t;return e.label?e.label:t?TA(e)?o("Custom image size"):e.value?o("Resize image to %0",e.value+this._resizeUnit):o("Resize image to the original size"):TA(e)?o("Custom"):e.value?e.value+this._resizeUnit:o("Original")}_getResizeDropdownListItemDefinitions(e,t){const{editor:o}=this,n=new Yi,i=e.map((e=>TA(e)?{...e,valueWithUnits:"custom"}:e.value?{...e,valueWithUnits:`${e.value}${this._resizeUnit}`}:{...e,valueWithUnits:null}));for(const e of i){let r=null;if(o.plugins.has("ImageCustomResizeUI")&&TA(e)){const n=o.plugins.get("ImageCustomResizeUI");r={type:"button",model:new Db({label:this._getOptionLabelValue(e),role:"menuitemradio",withText:!0,icon:null,onClick:()=>{n._showForm(this._resizeUnit)}})};const s=xA(i,"valueWithUnits");r.model.bind("isOn").to(t,"value",PA(s))}else r={type:"button",model:new Db({commandName:"resizeImage",commandValue:e.valueWithUnits,label:this._getOptionLabelValue(e),role:"menuitemradio",withText:!0,icon:null})},r.model.bind("isOn").to(t,"value",IA(e.valueWithUnits));r.model.bind("isEnabled").to(t,"isEnabled"),n.add(r)}return n}}function TA(e){return"custom"===e.value}function IA(e){return t=>null===e&&t===e||null!==t&&t.width===e}function PA(e){return t=>!e.some((e=>IA(e)(t)))}const FA="image_resized";class MA extends lr{static get requires(){return[a_,_y]}static get pluginName(){return"ImageResizeHandles"}init(){const e=this.editor.commands.get("resizeImage");this.bind("isEnabled").to(e),this._setupResizerCreator()}_setupResizerCreator(){const e=this.editor,t=e.editing.view,o=e.plugins.get("ImageUtils");t.addObserver(My),this.listenTo(t.document,"imageLoaded",((n,i)=>{if(!i.target.matches("figure.image.ck-widget > img,figure.image.ck-widget > picture > img,figure.image.ck-widget > a > img,figure.image.ck-widget > a > picture > img,span.image-inline.ck-widget > img,span.image-inline.ck-widget > picture > img"))return;const r=e.editing.view.domConverter,s=r.domToView(i.target),a=o.getImageWidgetFromImageView(s);let l=this.editor.plugins.get(a_).getResizerByViewElement(a);if(l)return void l.redraw();const c=e.editing.mapper,d=c.toModelElement(a);l=e.plugins.get(a_).attachTo({unit:e.config.get("image.resizeUnit"),modelElement:d,viewElement:a,editor:e,getHandleHost:e=>e.querySelector("img"),getResizeHost:()=>r.mapViewToDom(c.toViewElement(d)),isCentered:()=>"alignCenter"==d.getAttribute("imageStyle"),onCommit(o){t.change((e=>{e.removeClass(FA,a)})),e.execute("resizeImage",{width:o})}}),l.on("updateSize",(()=>{a.hasClass(FA)||t.change((e=>{e.addClass(FA,a)}));const e="imageInline"===d.name?s:a;e.getStyle("height")&&t.change((t=>{t.removeStyle("height",e)}))})),l.bind("isEnabled").to(this)}))}}function RA(e){if(!e)return null;const[,t,o]=e.trim().match(/([.,\d]+)(%|px)$/)||[],n=Number.parseFloat(t);return Number.isNaN(n)?null:{value:n,unit:o}}function zA(e,t,o){return"px"===o?{value:t.value,unit:"px"}:{value:t.value/e*100,unit:"%"}}function VA(e){const{editing:t}=e,o=e.plugins.get("ImageUtils").getClosestSelectedImageElement(e.model.document.selection);if(!o)return null;const n=t.mapper.toViewElement(o);return{model:o,view:n,dom:t.view.domConverter.mapViewToDom(n)}}var OA=i(1173),NA={attributes:{"data-cke":!0}};NA.setAttributes=Ar(),NA.insert=_r().bind(null,"head"),NA.domAPI=kr(),NA.insertStyleElement=vr();fr()(OA.A,NA);OA.A&&OA.A.locals&&OA.A.locals;class LA extends pm{constructor(e,t,o){super(e);const n=this.locale.t;this.focusTracker=new Xi,this.keystrokes=new er,this.unit=t,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(n("Save"),qh.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("Cancel"),qh.cancel,"ck-button-cancel","cancel"),this._focusables=new Uh,this._validators=o,this._focusCycler=new Im({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-custom-resize-form","ck-responsive-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),this.keystrokes.listenTo(this.element),bm({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(e,t,o,n){const i=new Em(this.locale);return i.set({label:e,icon:t,tooltip:!0}),i.extendTemplate({attributes:{class:o}}),n&&i.delegate("execute").to(this,n),i}_createLabeledInputView(){const e=this.locale.t,t=new jp(this.locale,Mg);return t.label=e("Resize image (in %0)",this.unit),t.fieldView.set({step:.1}),t}isValid(){this.resetFormStatus();for(const e of this._validators){const t=e(this);if(t)return this.labeledInput.errorText=t,!1}return!0}resetFormStatus(){this.labeledInput.errorText=null}get rawSize(){const{element:e}=this.labeledInput.fieldView;return e?e.value:null}get parsedSize(){const{rawSize:e}=this;if(null===e)return null;const t=Number.parseFloat(e);return Number.isNaN(t)?null:t}get sizeWithUnits(){const{parsedSize:e,unit:t}=this;return null===e?null:`${e}${t}`}}class HA extends lr{static get requires(){return[Fb]}static get pluginName(){return"ImageCustomResizeUI"}destroy(){super.destroy(),this._form&&this._form.destroy()}_createForm(e){const t=this.editor;this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(fm(LA))(t.locale,e,function(e){const t=e.t;return[e=>""===e.rawSize.trim()?t("The value must not be empty."):null===e.parsedSize?t("The value should be a plain number."):void 0]}(t)),this._form.render(),this.listenTo(this._form,"submit",(()=>{this._form.isValid()&&(t.execute("resizeImage",{width:this._form.sizeWithUnits}),this._hideForm(!0))})),this.listenTo(this._form.labeledInput,"change:errorText",(()=>{t.ui.update()})),this.listenTo(this._form,"cancel",(()=>{this._hideForm(!0)})),this._form.keystrokes.set("Esc",((e,t)=>{this._hideForm(!0),t()})),gm({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(e){if(this._isVisible)return;this._form||this._createForm(e);const t=this.editor,o=this._form.labeledInput;this._form.disableCssTransitions(),this._form.resetFormStatus(),this._isInBalloon||this._balloon.add({view:this._form,position:Sy(t)});const n=function(e,t){const o=VA(e);if(!o)return null;const n=RA(o.model.getAttribute("resizedWidth")||null);return n?n.unit===t?n:zA(jk(o.dom),{unit:"px",value:new qn(o.dom).width},t):null}(t,e),i=n?n.value.toFixed(1):"",r=function(e,t){const o=VA(e);if(!o)return null;const n=jk(o.dom),i=RA(window.getComputedStyle(o.dom).minWidth)||{value:1,unit:"px"};return{unit:t,lower:Math.max(.1,zA(n,i,t).value),upper:"px"===t?n:100}}(t,e);o.fieldView.value=o.fieldView.element.value=i,r&&Object.assign(o.fieldView,{min:r.lower.toFixed(1),max:Math.ceil(r.upper).toFixed(1)}),this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return!!this._balloon&&this._balloon.visibleView===this._form}get _isInBalloon(){return!!this._balloon&&this._balloon.hasView(this._form)}}var jA=i(4214),qA={attributes:{"data-cke":!0}};qA.setAttributes=Ar(),qA.insert=_r().bind(null,"head"),qA.domAPI=kr(),qA.insertStyleElement=vr();fr()(jA.A,qA);jA.A&&jA.A.locals&&jA.A.locals;class UA extends dr{constructor(e,t){super(e),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(t.map((e=>{if(e.isDefault)for(const t of e.modelElements)this._defaultStyles[t]=e.name;return[e.name,e]})))}refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled?e.hasAttribute("imageStyle")?this.value=e.getAttribute("imageStyle"):this.value=this._defaultStyles[e.name]:this.value=!1}execute(e={}){const t=this.editor,o=t.model,n=t.plugins.get("ImageUtils");o.change((t=>{const i=e.value,{setImageSizes:r=!0}=e;let s=n.getClosestSelectedImageElement(o.document.selection);i&&this.shouldConvertImageType(i,s)&&(this.editor.execute(n.isBlockImage(s)?"imageTypeInline":"imageTypeBlock",{setImageSizes:r}),s=n.getClosestSelectedImageElement(o.document.selection)),!i||this._styles.get(i).isDefault?t.removeAttribute("imageStyle",s):t.setAttribute("imageStyle",i,s),r&&n.setImageNaturalSizeAttributes(s)}))}shouldConvertImageType(e,t){return!this._styles.get(e).modelElements.includes(t.name)}}const WA={get inline(){return{name:"inline",title:"In line",icon:qh.objectInline,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:qh.objectLeft,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:qh.objectBlockLeft,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:qh.objectCenter,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:qh.objectRight,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:qh.objectBlockRight,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:qh.objectCenter,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:qh.objectRight,modelElements:["imageBlock"],className:"image-style-side"}}},$A=(()=>({full:qh.objectFullWidth,left:qh.objectBlockLeft,right:qh.objectBlockRight,center:qh.objectCenter,inlineLeft:qh.objectLeft,inlineRight:qh.objectRight,inline:qh.objectInline}))(),GA=[{name:"imageStyle:wrapText",title:"Wrap text",defaultItem:"imageStyle:alignLeft",items:["imageStyle:alignLeft","imageStyle:alignRight"]},{name:"imageStyle:breakText",title:"Break text",defaultItem:"imageStyle:block",items:["imageStyle:alignBlockLeft","imageStyle:block","imageStyle:alignBlockRight"]}];function KA(e){D("image-style-configuration-definition-invalid",e)}const ZA={normalizeStyles:function(e){const t=(e.configuredStyles.options||[]).map((e=>function(e){e="string"==typeof e?WA[e]?{...WA[e]}:{name:e}:function(e,t){const o={...t};for(const n in e)Object.prototype.hasOwnProperty.call(t,n)||(o[n]=e[n]);return o}(WA[e.name],e);"string"==typeof e.icon&&(e.icon=$A[e.icon]||e.icon);return e}(e))).filter((t=>function(e,{isBlockPluginLoaded:t,isInlinePluginLoaded:o}){const{modelElements:n,name:i}=e;if(!(n&&n.length&&i))return KA({style:e}),!1;{const i=[t?"imageBlock":null,o?"imageInline":null];if(!n.some((e=>i.includes(e))))return D("image-style-missing-dependency",{style:e,missingPlugins:n.map((e=>"imageBlock"===e?"ImageBlockEditing":"ImageInlineEditing"))}),!1}return!0}(t,e)));return t},getDefaultStylesConfiguration:function(e,t){return e&&t?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:e?{options:["block","side"]}:t?{options:["inline","alignLeft","alignRight"]}:{}},getDefaultDropdownDefinitions:function(e){return e.has("ImageBlockEditing")&&e.has("ImageInlineEditing")?[...GA]:[]},warnInvalidStyle:KA,DEFAULT_OPTIONS:WA,DEFAULT_ICONS:$A,DEFAULT_DROPDOWN_DEFINITIONS:GA};function JA(e,t){for(const o of t)if(o.name===e)return o}class YA extends lr{static get pluginName(){return"ImageStyleEditing"}static get requires(){return[_y]}init(){const{normalizeStyles:e,getDefaultStylesConfiguration:t}=ZA,o=this.editor,n=o.plugins.has("ImageBlockEditing"),i=o.plugins.has("ImageInlineEditing");o.config.define("image.styles",t(n,i)),this.normalizedStyles=e({configuredStyles:o.config.get("image.styles"),isBlockPluginLoaded:n,isInlinePluginLoaded:i}),this._setupConversion(n,i),this._setupPostFixer(),o.commands.add("imageStyle",new UA(o,this.normalizedStyles))}_setupConversion(e,t){const o=this.editor,n=o.model.schema,i=(r=this.normalizedStyles,(e,t,o)=>{if(!o.consumable.consume(t.item,e.name))return;const n=JA(t.attributeNewValue,r),i=JA(t.attributeOldValue,r),s=o.mapper.toViewElement(t.item),a=o.writer;i&&a.removeClass(i.className,s),n&&a.addClass(n.className,s)});var r;const s=function(e){const t={imageInline:e.filter((e=>!e.isDefault&&e.modelElements.includes("imageInline"))),imageBlock:e.filter((e=>!e.isDefault&&e.modelElements.includes("imageBlock")))};return(e,o,n)=>{if(!o.modelRange)return;const i=o.viewItem,r=Qi(o.modelRange.getItems());if(r&&n.schema.checkAttribute(r,"imageStyle"))for(const e of t[r.name])n.consumable.consume(i,{classes:e.className})&&n.writer.setAttribute("imageStyle",e.name,r)}}(this.normalizedStyles);o.editing.downcastDispatcher.on("attribute:imageStyle",i),o.data.downcastDispatcher.on("attribute:imageStyle",i),e&&(n.extend("imageBlock",{allowAttributes:"imageStyle"}),o.data.upcastDispatcher.on("element:figure",s,{priority:"low"})),t&&(n.extend("imageInline",{allowAttributes:"imageStyle"}),o.data.upcastDispatcher.on("element:img",s,{priority:"low"}))}_setupPostFixer(){const e=this.editor,t=e.model.document,o=e.plugins.get(_y),n=new Map(this.normalizedStyles.map((e=>[e.name,e])));t.registerPostFixer((e=>{let i=!1;for(const r of t.differ.getChanges())if("insert"==r.type||"attribute"==r.type&&"imageStyle"==r.attributeKey){let t="insert"==r.type?r.position.nodeAfter:r.range.start.nodeAfter;if(t&&t.is("element","paragraph")&&t.childCount>0&&(t=t.getChild(0)),!o.isImage(t))continue;const s=t.getAttribute("imageStyle");if(!s)continue;const a=n.get(s);a&&a.modelElements.includes(t.name)||(e.removeAttribute("imageStyle",t),i=!0)}return i}))}}var QA=i(7879),XA={attributes:{"data-cke":!0}};XA.setAttributes=Ar(),XA.insert=_r().bind(null,"head"),XA.domAPI=kr(),XA.insertStyleElement=vr();fr()(QA.A,XA);QA.A&&QA.A.locals&&QA.A.locals;class eC extends lr{static get requires(){return[YA]}static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Wrap text":e("Wrap text"),"Break text":e("Break text"),"In line":e("In line"),"Full size image":e("Full size image"),"Side image":e("Side image"),"Left aligned image":e("Left aligned image"),"Centered image":e("Centered image"),"Right aligned image":e("Right aligned image")}}init(){const e=this.editor.plugins,t=this.editor.config.get("image.toolbar")||[],o=tC(e.get("ImageStyleEditing").normalizedStyles,this.localizedDefaultStylesTitles);for(const e of o)this._createButton(e);const n=tC([...t.filter(U),...ZA.getDefaultDropdownDefinitions(e)],this.localizedDefaultStylesTitles);for(const e of n)this._createDropdown(e,o)}_createDropdown(e,t){const o=this.editor.ui.componentFactory;o.add(e.name,(n=>{let i;const{defaultItem:r,items:s,title:a}=e,l=s.filter((e=>t.find((({name:t})=>oC(t)===e)))).map((e=>{const t=o.create(e);return e===r&&(i=t),t}));s.length!==l.length&&ZA.warnInvalidStyle({dropdown:e});const c=Eg(n,yg),d=c.buttonView,u=d.arrowView;return Dg(c,l,{enableActiveItemFocusOnDropdownOpen:!0}),d.set({label:nC(a,i.label),class:null,tooltip:!0}),u.unbind("label"),u.set({label:a}),d.bind("icon").toMany(l,"isOn",((...e)=>{const t=e.findIndex(Fi);return t<0?i.icon:l[t].icon})),d.bind("label").toMany(l,"isOn",((...e)=>{const t=e.findIndex(Fi);return nC(a,t<0?i.label:l[t].label)})),d.bind("isOn").toMany(l,"isOn",((...e)=>e.some(Fi))),d.bind("class").toMany(l,"isOn",((...e)=>e.some(Fi)?"ck-splitbutton_flatten":void 0)),d.on("execute",(()=>{l.some((({isOn:e})=>e))?c.isOpen=!c.isOpen:i.fire("execute")})),c.bind("isEnabled").toMany(l,"isEnabled",((...e)=>e.some(Fi))),this.listenTo(c,"execute",(()=>{this.editor.editing.view.focus()})),c}))}_createButton(e){const t=e.name;this.editor.ui.componentFactory.add(oC(t),(o=>{const n=this.editor.commands.get("imageStyle"),i=new Em(o);return i.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),i.bind("isEnabled").to(n,"isEnabled"),i.bind("isOn").to(n,"value",(e=>e===t)),i.on("execute",this._executeCommand.bind(this,t)),i}))}_executeCommand(e){this.editor.execute("imageStyle",{value:e}),this.editor.editing.view.focus()}}function tC(e,t){for(const o of e)t[o.title]&&(o.title=t[o.title]);return e}function oC(e){return`imageStyle:${e}`}function nC(e,t){return(e?e+": ":"")+t}const iC=Symbol("isWpButtonMacroSymbol");function rC(e){const t=e.getSelectedElement();return!(!t||!function(e){return!!e.getCustomProperty(iC)&&Rk(e)}(t))}class sC extends lr{static get pluginName(){return"OPChildPagesEditing"}static get buttonName(){return"insertChildPages"}init(){const e=this.editor,t=e.model,o=e.conversion;t.schema.register("op-macro-child-pages",{allowWhere:["$block"],allowAttributes:["page"],isBlock:!0,isLimit:!0}),o.for("upcast").elementToElement({view:{name:"macro",classes:"child_pages"},model:(e,{writer:t})=>{const o=e.getAttribute("data-page")||"",n="true"==e.getAttribute("data-include-parent");return t.createElement("op-macro-child-pages",{page:o,includeParent:n})}}),o.for("editingDowncast").elementToElement({model:"op-macro-child-pages",view:(e,{writer:t})=>this.createMacroViewElement(e,t)}).add((e=>e.on("attribute:page",this.modelAttributeToView.bind(this)))).add((e=>e.on("attribute:includeParent",this.modelAttributeToView.bind(this)))),o.for("dataDowncast").elementToElement({model:"op-macro-child-pages",view:(e,{writer:t})=>t.createContainerElement("macro",{class:"child_pages","data-page":e.getAttribute("page")||"","data-include-parent":e.getAttribute("includeParent")||""})}),e.ui.componentFactory.add(sC.buttonName,(t=>{const o=new Em(t);return o.set({label:window.I18n.t("js.editor.macro.child_pages.button"),withText:!0}),o.on("execute",(()=>{e.model.change((t=>{const o=t.createElement("op-macro-child-pages",{});e.model.insertContent(o,e.model.document.selection)}))})),o}))}modelAttributeToView(e,t,o){const n=t.item;if(!n.is("element","op-macro-child-pages"))return;o.consumable.consume(t.item,e.name);const i=o.mapper.toViewElement(n);o.writer.remove(o.writer.createRangeIn(i)),this.setPlaceholderContent(o.writer,n,i)}macroLabel(){return window.I18n.t("js.editor.macro.child_pages.text")}pageLabel(e){return e&&e.length>0?e:window.I18n.t("js.editor.macro.child_pages.this_page")}includeParentText(e){return e?` (${window.I18n.t("js.editor.macro.child_pages.include_parent")})`:""}createMacroViewElement(e,t){const o=t.createContainerElement("div");return this.setPlaceholderContent(t,e,o),function(e,t,o){return t.setCustomProperty(iC,!0,e),zk(e,t,{label:o})}(o,t,{label:this.macroLabel()})}setPlaceholderContent(e,t,o){const n=t.getAttribute("page"),i=t.getAttribute("includeParent"),r=this.macroLabel(),s=this.pageLabel(n),a=e.createContainerElement("span",{class:"macro-value"});let l=[e.createText(`${r} `)];e.insert(e.createPositionAt(a,0),e.createText(`${s}`)),l.push(a),l.push(e.createText(this.includeParentText(i))),e.insert(e.createPositionAt(o,0),l)}}class aC extends lr{static get requires(){return[Fb]}static get pluginName(){return"OPChildPagesToolbar"}init(){const e=this.editor,t=this.editor.model,o=Gk(e);l_(e,"opEditChildPagesMacroButton",(e=>{const n=o.services.macros,i=e.getAttribute("page"),r=e.getAttribute("includeParent"),s=i&&i.length>0?i:"";n.configureChildPages(s,r).then((o=>t.change((t=>{t.setAttribute("page",o.page,e),t.setAttribute("includeParent",o.includeParent,e)}))))}))}afterInit(){d_(this,this.editor,"OPChildPages",rC)}}class lC extends dr{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let o=e.schema.getLimitElement(t);if(t.containsEntireContent(o)||!cC(e.schema,o))do{if(o=o.parent,!o)return}while(!cC(e.schema,o));e.change((e=>{e.setSelection(o,"in")}))}}function cC(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}const dC=yi("Ctrl+A");class uC extends lr{static get pluginName(){return"SelectAllEditing"}init(){const e=this.editor,t=e.t,o=e.editing.view.document;e.commands.add("selectAll",new lC(e)),this.listenTo(o,"keydown",((t,o)=>{_i(o)===dC&&(e.execute("selectAll"),o.preventDefault())})),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Select all"),keystroke:"CTRL+A"}]})}}class hC extends lr{static get pluginName(){return"SelectAllUI"}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",(()=>{const e=this._createButton(Em);return e.set({tooltip:!0}),e})),e.ui.componentFactory.add("menuBar:selectAll",(()=>this._createButton(ip)))}_createButton(e){const t=this.editor,o=t.locale,n=t.commands.get("selectAll"),i=new e(t.locale),r=o.t;return i.set({label:r("Select all"),icon:' ',keystroke:"Ctrl+A"}),i.bind("isEnabled").to(n,"isEnabled"),this.listenTo(i,"execute",(()=>{t.execute("selectAll"),t.editing.view.focus()})),i}}class mC extends lr{static get requires(){return[uC,hC]}static get pluginName(){return"SelectAll"}}const pC="ckCsrfToken",gC="abcdefghijklmnopqrstuvwxyz0123456789";function fC(){let e=function(e){e=e.toLowerCase();const t=document.cookie.split(";");for(const o of t){const t=o.split("=");if(decodeURIComponent(t[0].trim().toLowerCase())===e)return decodeURIComponent(t[1])}return null}(pC);var t,o;return e&&40==e.length||(e=function(e){let t="";const o=new Uint8Array(e);window.crypto.getRandomValues(o);for(let e=0;e.5?n.toUpperCase():n}return t}(40),t=pC,o=e,document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(o)+";path=/"),e}class bC{constructor(e,t,o){this.loader=e,this.url=t,this.t=o}upload(){return this.loader.file.then((e=>new Promise(((t,o)=>{this._initRequest(),this._initListeners(t,o,e),this._sendRequest(e)}))))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.url,!0),e.responseType="json"}_initListeners(e,t,o){const n=this.xhr,i=this.loader,r=(0,this.t)("Cannot upload file:")+` ${o.name}.`;n.addEventListener("error",(()=>t(r))),n.addEventListener("abort",(()=>t())),n.addEventListener("load",(()=>{const o=n.response;if(!o||!o.uploaded)return t(o&&o.error&&o.error.message?o.error.message:r);e({default:o.url})})),n.upload&&n.upload.addEventListener("progress",(e=>{e.lengthComputable&&(i.uploadTotal=e.total,i.uploaded=e.loaded)}))}_sendRequest(e){const t=new FormData;t.append("upload",e),t.append("ckCsrfToken",fC()),this.xhr.send(t)}}function kC(e,t,o,n){let i,r=null;"function"==typeof n?i=n:(r=e.commands.get(n),i=()=>{e.execute(n)}),e.model.document.on("change:data",((s,a)=>{if(r&&!r.isEnabled||!t.isEnabled)return;const l=Qi(e.model.document.selection.getRanges());if(!l.isCollapsed)return;if(a.isUndo||!a.isLocal)return;const c=Array.from(e.model.document.differ.getChanges()),d=c[0];if(1!=c.length||"insert"!==d.type||"$text"!=d.name||1!=d.length)return;const u=d.position.parent;if(u.is("element","codeBlock"))return;if(u.is("element","listItem")&&"function"!=typeof n&&!["numberedList","bulletedList","todoList"].includes(n))return;if(r&&!0===r.value)return;const h=u.getChild(0),m=e.model.createRangeOn(h);if(!m.containsRange(l)&&!l.end.isEqual(m.end))return;const p=o.exec(h.data.substr(0,l.end.offset));p&&e.model.enqueueChange((t=>{const o=t.createPositionAt(u,0),n=t.createPositionAt(u,p[0].length),r=new cc(o,n);if(!1!==i({match:p})){t.remove(r);const o=e.model.document.selection.getFirstRange(),n=t.createRangeIn(u);!u.isEmpty||n.isEqual(o)||n.containsRange(o,!0)||t.remove(u)}r.detach(),e.model.enqueueChange((()=>{e.plugins.get("Delete").requestUndoOnBackspace()}))}))}))}function wC(e,t,o,n){let i,r;o instanceof RegExp?i=o:r=o,r=r||(e=>{let t;const o=[],n=[];for(;null!==(t=i.exec(e))&&!(t&&t.length<4);){let{index:e,1:i,2:r,3:s}=t;const a=i+r+s;e+=t[0].length-a.length;const l=[e,e+i.length],c=[e+i.length+r.length,e+i.length+r.length+s.length];o.push(l),o.push(c),n.push([e+i.length,e+i.length+r.length])}return{remove:o,format:n}}),e.model.document.on("change:data",((o,i)=>{if(i.isUndo||!i.isLocal||!t.isEnabled)return;const s=e.model,a=s.document.selection;if(!a.isCollapsed)return;const l=Array.from(s.document.differ.getChanges()),c=l[0];if(1!=l.length||"insert"!==c.type||"$text"!=c.name||1!=c.length)return;const d=a.focus,u=d.parent,{text:h,range:m}=function(e,t){let o=e.start;const n=Array.from(e.getItems()).reduce(((e,n)=>!n.is("$text")&&!n.is("$textProxy")||n.getAttribute("code")?(o=t.createPositionAfter(n),""):e+n.data),"");return{text:n,range:t.createRange(o,e.end)}}(s.createRange(s.createPositionAt(u,0),d),s),p=r(h),g=_C(m.start,p.format,s),f=_C(m.start,p.remove,s);g.length&&f.length&&s.enqueueChange((t=>{if(!1!==n(t,g)){for(const e of f.reverse())t.remove(e);s.enqueueChange((()=>{e.plugins.get("Delete").requestUndoOnBackspace()}))}}))}))}function _C(e,t,o){return t.filter((e=>void 0!==e[0]&&void 0!==e[1])).map((t=>o.createRange(e.getShiftedBy(t[0]),e.getShiftedBy(t[1]))))}function yC(e,t){return(o,n)=>{if(!e.commands.get(t).isEnabled)return!1;const i=e.model.schema.getValidRanges(n,t);for(const e of i)o.setAttribute(t,!0,e);o.removeSelectionAttribute(t)}}class AC extends dr{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,o=t.document.selection,n=void 0===e.forceValue?!this.value:e.forceValue;t.change((e=>{if(o.isCollapsed)n?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else{const i=t.schema.getValidRanges(o.getRanges(),this.attributeKey);for(const t of i)n?e.setAttribute(this.attributeKey,n,t):e.removeAttribute(this.attributeKey,t)}}))}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,o=e.document.selection;if(o.isCollapsed)return o.hasAttribute(this.attributeKey);for(const e of o.getRanges())for(const o of e.getItems())if(t.checkAttribute(o,this.attributeKey))return o.hasAttribute(this.attributeKey);return!1}}const CC="bold";class vC extends lr{static get pluginName(){return"BoldEditing"}init(){const e=this.editor,t=this.editor.t;e.model.schema.extend("$text",{allowAttributes:CC}),e.model.schema.setAttributeProperties(CC,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:CC,view:"strong",upcastAlso:["b",e=>{const t=e.getStyle("font-weight");return t&&("bold"==t||Number(t)>=600)?{name:!0,styles:["font-weight"]}:null}]}),e.commands.add(CC,new AC(e,CC)),e.keystrokes.set("CTRL+B",CC),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Bold text"),keystroke:"CTRL+B"}]})}}function xC({editor:e,commandName:t,plugin:o,icon:n,label:i,keystroke:r}){return s=>{const a=e.commands.get(t),l=new s(e.locale);return l.set({label:i,icon:n,keystroke:r,isToggleable:!0}),l.bind("isEnabled").to(a,"isEnabled"),l.bind("isOn").to(a,"value"),l instanceof ip?l.set({role:"menuitemcheckbox"}):l.set({tooltip:!0}),o.listenTo(l,"execute",(()=>{e.execute(t),e.editing.view.focus()})),l}}const EC="bold";class DC extends lr{static get pluginName(){return"BoldUI"}init(){const e=this.editor,t=e.locale.t,o=xC({editor:e,commandName:EC,plugin:this,icon:qh.bold,label:t("Bold"),keystroke:"CTRL+B"});e.ui.componentFactory.add(EC,(()=>o(Em))),e.ui.componentFactory.add("menuBar:"+EC,(()=>o(ip)))}}const BC="code";class SC extends lr{static get pluginName(){return"CodeEditing"}static get requires(){return[kw]}init(){const e=this.editor,t=this.editor.t;e.model.schema.extend("$text",{allowAttributes:BC}),e.model.schema.setAttributeProperties(BC,{isFormatting:!0,copyOnEnter:!1}),e.conversion.attributeToElement({model:BC,view:"code",upcastAlso:{styles:{"word-wrap":"break-word"}}}),e.commands.add(BC,new AC(e,BC)),e.plugins.get(kw).registerAttribute(BC),Bw(e,BC,"code","ck-code_selected"),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Move out of an inline code style"),keystroke:[["arrowleft","arrowleft"],["arrowright","arrowright"]]}]})}}var TC=i(9248),IC={attributes:{"data-cke":!0}};IC.setAttributes=Ar(),IC.insert=_r().bind(null,"head"),IC.domAPI=kr(),IC.insertStyleElement=vr();fr()(TC.A,IC);TC.A&&TC.A.locals&&TC.A.locals;const PC="code";class FC extends lr{static get pluginName(){return"CodeUI"}init(){const e=this.editor,t=e.locale.t,o=xC({editor:e,commandName:PC,plugin:this,icon:' ',label:t("Code")});e.ui.componentFactory.add(PC,(()=>o(Em))),e.ui.componentFactory.add("menuBar:"+PC,(()=>o(ip)))}}const MC="italic";class RC extends lr{static get pluginName(){return"ItalicEditing"}init(){const e=this.editor,t=this.editor.t;e.model.schema.extend("$text",{allowAttributes:MC}),e.model.schema.setAttributeProperties(MC,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:MC,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),e.commands.add(MC,new AC(e,MC)),e.keystrokes.set("CTRL+I",MC),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Italic text"),keystroke:"CTRL+I"}]})}}const zC="italic";class VC extends lr{static get pluginName(){return"ItalicUI"}init(){const e=this.editor,t=e.locale.t,o=xC({editor:e,commandName:zC,plugin:this,icon:' ',keystroke:"CTRL+I",label:t("Italic")});e.ui.componentFactory.add(zC,(()=>o(Em))),e.ui.componentFactory.add("menuBar:"+zC,(()=>o(ip)))}}const OC="strikethrough";class NC extends lr{static get pluginName(){return"StrikethroughEditing"}init(){const e=this.editor,t=this.editor.t;e.model.schema.extend("$text",{allowAttributes:OC}),e.model.schema.setAttributeProperties(OC,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:OC,view:"s",upcastAlso:["del","strike",{styles:{"text-decoration":"line-through"}}]}),e.commands.add(OC,new AC(e,OC)),e.keystrokes.set("CTRL+SHIFT+X","strikethrough"),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Strikethrough text"),keystroke:"CTRL+SHIFT+X"}]})}}const LC="strikethrough";class HC extends lr{static get pluginName(){return"StrikethroughUI"}init(){const e=this.editor,t=e.locale.t,o=xC({editor:e,commandName:LC,plugin:this,icon:' ',keystroke:"CTRL+SHIFT+X",label:t("Strikethrough")});e.ui.componentFactory.add(LC,(()=>o(Em))),e.ui.componentFactory.add("menuBar:"+LC,(()=>o(ip)))}}class jC extends dr{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,o=t.schema,n=t.document.selection,i=Array.from(n.getSelectedBlocks()),r=void 0===e.forceValue?!this.value:e.forceValue;t.change((e=>{if(r){const t=i.filter((e=>qC(e)||WC(o,e)));this._applyQuote(e,t)}else this._removeQuote(e,i.filter(qC))}))}_getValue(){const e=Qi(this.editor.model.document.selection.getSelectedBlocks());return!(!e||!qC(e))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,o=Qi(e.getSelectedBlocks());return!!o&&WC(t,o)}_removeQuote(e,t){UC(e,t).reverse().forEach((t=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const o=e.createPositionBefore(t.start.parent);return void e.move(t,o)}t.end.isAtEnd||e.split(t.end);const o=e.createPositionAfter(t.end.parent);e.move(t,o)}))}_applyQuote(e,t){const o=[];UC(e,t).reverse().forEach((t=>{let n=qC(t.start);n||(n=e.createElement("blockQuote"),e.wrap(t,n)),o.push(n)})),o.reverse().reduce(((t,o)=>t.nextSibling==o?(e.merge(e.createPositionAfter(t)),t):o))}}function qC(e){return"blockQuote"==e.parent.name?e.parent:null}function UC(e,t){let o,n=0;const i=[];for(;n{const n=e.model.document.differ.getChanges();for(const e of n)if("insert"==e.type){const n=e.position.nodeAfter;if(!n)continue;if(n.is("element","blockQuote")&&n.isEmpty)return o.remove(n),!0;if(n.is("element","blockQuote")&&!t.checkChild(e.position,n))return o.unwrap(n),!0;if(n.is("element")){const e=o.createRangeIn(n);for(const n of e.getItems())if(n.is("element","blockQuote")&&!t.checkChild(o.createPositionBefore(n),n))return o.unwrap(n),!0}}else if("remove"==e.type){const t=e.position.parent;if(t.is("element","blockQuote")&&t.isEmpty)return o.remove(t),!0}return!1}));const o=this.editor.editing.view.document,n=e.model.document.selection,i=e.commands.get("blockQuote");this.listenTo(o,"enter",((t,o)=>{if(!n.isCollapsed||!i.value)return;n.getLastPosition().parent.isEmpty&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),o.preventDefault(),t.stop())}),{context:"blockquote"}),this.listenTo(o,"delete",((t,o)=>{if("backward"!=o.direction||!n.isCollapsed||!i.value)return;const r=n.getLastPosition().parent;r.isEmpty&&!r.previousSibling&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),o.preventDefault(),t.stop())}),{context:"blockquote"})}}var GC=i(1501),KC={attributes:{"data-cke":!0}};KC.setAttributes=Ar(),KC.insert=_r().bind(null,"head"),KC.domAPI=kr(),KC.insertStyleElement=vr();fr()(GC.A,KC);GC.A&&GC.A.locals&&GC.A.locals;class ZC extends lr{static get pluginName(){return"BlockQuoteUI"}init(){const e=this.editor;e.ui.componentFactory.add("blockQuote",(()=>{const e=this._createButton(Em);return e.set({tooltip:!0}),e})),e.ui.componentFactory.add("menuBar:blockQuote",(()=>{const e=this._createButton(ip);return e.set({role:"menuitemcheckbox"}),e}))}_createButton(e){const t=this.editor,o=t.locale,n=t.commands.get("blockQuote"),i=new e(t.locale),r=o.t;return i.set({label:r("Block quote"),icon:qh.quote,isToggleable:!0}),i.bind("isEnabled").to(n,"isEnabled"),i.bind("isOn").to(n,"value"),this.listenTo(i,"execute",(()=>{t.execute("blockQuote"),t.editing.view.focus()})),i}}class JC extends dr{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}refresh(){const e=this.editor.model,t=Qi(e.document.selection.getSelectedBlocks());this.value=!!t&&t.is("element","paragraph"),this.isEnabled=!!t&&YC(t,e.schema)}execute(e={}){const t=this.editor.model,o=t.document,n=e.selection||o.selection;t.canEditAt(n)&&t.change((e=>{const o=n.getSelectedBlocks();for(const n of o)!n.is("element","paragraph")&&YC(n,t.schema)&&e.rename(n,"paragraph")}))}}function YC(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class QC extends dr{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}execute(e){const t=this.editor.model,o=e.attributes;let n=e.position;t.canEditAt(n)&&t.change((e=>{if(n=this._findPositionToInsertParagraph(n,e),!n)return;const i=e.createElement("paragraph");o&&t.schema.setAllowedAttributes(i,o,e),t.insertContent(i,n),e.setSelection(i,"in")}))}_findPositionToInsertParagraph(e,t){const o=this.editor.model;if(o.schema.checkChild(e,"paragraph"))return e;const n=o.schema.findAllowedParent(e,"paragraph");if(!n)return null;const i=e.parent,r=o.schema.checkChild(i,"$text");return i.isEmpty||r&&e.isAtEnd?o.createPositionAfter(i):!i.isEmpty&&r&&e.isAtStart?o.createPositionBefore(i):t.split(e,n).position}}class XC extends lr{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new JC(e)),e.commands.add("insertParagraph",new QC(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,{writer:t})=>XC.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}XC.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);const ev=XC;class tv extends dr{constructor(e,t){super(e),this.modelElements=t}refresh(){const e=Qi(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some((t=>ov(e,t,this.editor.model.schema)))}execute(e){const t=this.editor.model,o=t.document,n=e.value;t.change((e=>{const i=Array.from(o.selection.getSelectedBlocks()).filter((e=>ov(e,n,t.schema)));for(const t of i)t.is("element",n)||e.rename(t,n)}))}}function ov(e,t,o){return o.checkChild(e.parent,t)&&!o.isObject(e)}const nv="paragraph";class iv extends lr{static get pluginName(){return"HeadingEditing"}constructor(e){super(e),e.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]})}static get requires(){return[ev]}init(){const e=this.editor,t=e.config.get("heading.options"),o=[];for(const n of t)"paragraph"!==n.model&&(e.model.schema.register(n.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(n),o.push(n.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new tv(e,o))}afterInit(){const e=this.editor,t=e.commands.get("enter"),o=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",((t,n)=>{const i=e.model.document.selection.getFirstPosition().parent;o.some((e=>i.is("element",e.model)))&&!i.is("element",nv)&&0===i.childCount&&n.writer.rename(i,nv)}))}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:C.low+1})}}var rv=i(6186),sv={attributes:{"data-cke":!0}};sv.setAttributes=Ar(),sv.insert=_r().bind(null,"head"),sv.domAPI=kr(),sv.insertStyleElement=vr();fr()(rv.A,sv);rv.A&&rv.A.locals&&rv.A.locals;class av extends lr{static get pluginName(){return"HeadingUI"}init(){const e=this.editor,t=e.t,o=function(e){const t=e.t,o={Paragraph:t("Paragraph"),"Heading 1":t("Heading 1"),"Heading 2":t("Heading 2"),"Heading 3":t("Heading 3"),"Heading 4":t("Heading 4"),"Heading 5":t("Heading 5"),"Heading 6":t("Heading 6")};return e.config.get("heading.options").map((e=>{const t=o[e.title];return t&&t!=e.title&&(e.title=t),e}))}(e),n=t("Choose heading"),i=t("Heading");e.ui.componentFactory.add("heading",(t=>{const r={},s=new Yi,a=e.commands.get("heading"),l=e.commands.get("paragraph"),c=[a];for(const e of o){const t={type:"button",model:new Db({label:e.title,class:e.class,role:"menuitemradio",withText:!0})};"paragraph"===e.model?(t.model.bind("isOn").to(l,"value"),t.model.set("commandName","paragraph"),c.push(l)):(t.model.bind("isOn").to(a,"value",(t=>t===e.model)),t.model.set({commandName:"heading",commandValue:e.model})),s.add(t),r[e.model]=e.title}const d=Eg(t);return Sg(d,s,{ariaLabel:i,role:"menu"}),d.buttonView.set({ariaLabel:i,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:i}),d.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),d.bind("isEnabled").toMany(c,"isEnabled",((...e)=>e.some((e=>e)))),d.buttonView.bind("label").to(a,"value",l,"value",((e,t)=>{const o=t?"paragraph":e;return"boolean"==typeof o?n:r[o]?r[o]:n})),d.buttonView.bind("ariaLabel").to(a,"value",l,"value",((e,t)=>{const o=t?"paragraph":e;return"boolean"==typeof o?i:r[o]?`${r[o]}, ${i}`:i})),this.listenTo(d,"execute",(t=>{const{commandName:o,commandValue:n}=t.source;e.execute(o,n?{value:n}:void 0),e.editing.view.focus()})),d})),e.ui.componentFactory.add("menuBar:heading",(n=>{const i=new mk(n),r=e.commands.get("heading"),s=e.commands.get("paragraph"),a=[r],l=new pk(n);i.set({class:"ck-heading-dropdown"}),l.set({ariaLabel:t("Heading"),role:"menu"}),i.buttonView.set({label:t("Heading")}),i.panelView.children.add(l);for(const t of o){const o=new nb(n,i),c=new ip(n);o.children.add(c),l.items.add(o),c.set({isToggleable:!0,label:t.title,role:"menuitemradio",class:t.class}),c.delegate("execute").to(i),c.on("execute",(()=>{const o="paragraph"===t.model?"paragraph":"heading";e.execute(o,{value:t.model}),e.editing.view.focus()})),"paragraph"===t.model?(c.bind("isOn").to(s,"value"),a.push(s)):c.bind("isOn").to(r,"value",(e=>e===t.model))}return i.bind("isEnabled").toMany(a,"isEnabled",((...e)=>e.some((e=>e)))),i}))}}new Set(["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"]);class lv{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach((e=>this._definitions.add(e))):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",((e,t,o)=>{if(!o.consumable.test(t.item,"attribute:linkHref"))return;if(!t.item.is("selection")&&!o.schema.isInline(t.item))return;const n=o.writer,i=n.document.selection;for(const e of this._definitions){const r=n.createAttributeElement("a",e.attributes,{priority:5});e.classes&&n.addClass(e.classes,r);for(const t in e.styles)n.setStyle(t,e.styles[t],r);n.setCustomProperty("link",!0,r),e.callback(t.attributeNewValue)?t.item.is("selection")?n.wrap(i.getFirstRange(),r):n.wrap(o.mapper.toViewRange(t.range),r):n.unwrap(o.mapper.toViewRange(t.range),r)}}),{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",((e,t,{writer:o,mapper:n})=>{const i=n.toViewElement(t.item),r=Array.from(i.getChildren()).find((e=>e.is("element","a")));for(const e of this._definitions){const n=tr(e.attributes);if(e.callback(t.attributeNewValue)){for(const[e,t]of n)"class"===e?o.addClass(t,r):o.setAttribute(e,t,r);e.classes&&o.addClass(e.classes,r);for(const t in e.styles)o.setStyle(t,e.styles[t],r)}else{for(const[e,t]of n)"class"===e?o.removeClass(t,r):o.removeAttribute(e,r);e.classes&&o.removeClass(e.classes,r);for(const t in e.styles)o.removeStyle(t,r)}}}))}}}const cv=function(e,t,o){var n=e.length;return o=void 0===o?n:o,!t&&o>=n?e:ds(e,t,o)};var dv=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const uv=function(e){return dv.test(e)};const hv=function(e){return e.split("")};var mv="\\ud800-\\udfff",pv="["+mv+"]",gv="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",fv="\\ud83c[\\udffb-\\udfff]",bv="[^"+mv+"]",kv="(?:\\ud83c[\\udde6-\\uddff]){2}",wv="[\\ud800-\\udbff][\\udc00-\\udfff]",_v="(?:"+gv+"|"+fv+")"+"?",yv="[\\ufe0e\\ufe0f]?",Av=yv+_v+("(?:\\u200d(?:"+[bv,kv,wv].join("|")+")"+yv+_v+")*"),Cv="(?:"+[bv+gv+"?",gv,kv,wv,pv].join("|")+")",vv=RegExp(fv+"(?="+fv+")|"+Cv+Av,"g");const xv=function(e){return e.match(vv)||[]};const Ev=function(e){return uv(e)?xv(e):hv(e)};const Dv=function(e){return function(t){t=rs(t);var o=uv(t)?Ev(t):void 0,n=o?o[0]:t.charAt(0),i=o?cv(o,1).join(""):t.slice(1);return n[e]()+i}}("toUpperCase"),Bv=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,Sv=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,Tv=/^((\w+:(\/{2,})?)|(\W))/i,Iv=["https?","ftps?","mailto"],Pv="Ctrl+K";function Fv(e,{writer:t}){const o=t.createAttributeElement("a",{href:e},{priority:5});return t.setCustomProperty("link",!0,o),o}function Mv(e,t=Iv){const o=String(e),n=t.join("|");return function(e,t){const o=e.replace(Bv,"");return!!o.match(t)}(o,new RegExp(`${"^(?:(?:):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))".replace("",n)}`,"i"))?o:"#"}function Rv(e,t){return!!e&&t.checkAttribute(e.name,"linkHref")}function zv(e,t){const o=(n=e,Sv.test(n)?"mailto:":t);var n;const i=!!o&&!Vv(e);return e&&i?o+e:e}function Vv(e){return Tv.test(e)}function Ov(e){window.open(e,"_blank","noopener")}class Nv extends dr{constructor(){super(...arguments),this.manualDecorators=new Yi,this.automaticDecorators=new lv}restoreManualDecoratorStates(){for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){const e=this.editor.model,t=e.document.selection,o=t.getSelectedElement()||Qi(t.getSelectedBlocks());Rv(o,e.schema)?(this.value=o.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(o,"linkHref")):(this.value=t.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref"));for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}execute(e,t={}){const o=this.editor.model,n=o.document.selection,i=[],r=[];for(const e in t)t[e]?i.push(e):r.push(e);o.change((t=>{if(n.isCollapsed){const s=n.getFirstPosition();if(n.hasAttribute("linkHref")){const a=Lv(n);let l=Ew(s,"linkHref",n.getAttribute("linkHref"),o);n.getAttribute("linkHref")===a&&(l=this._updateLinkContent(o,t,l,e)),t.setAttribute("linkHref",e,l),i.forEach((e=>{t.setAttribute(e,!0,l)})),r.forEach((e=>{t.removeAttribute(e,l)})),t.setSelection(t.createPositionAfter(l.end.nodeBefore))}else if(""!==e){const r=tr(n.getAttributes());r.set("linkHref",e),i.forEach((e=>{r.set(e,!0)}));const{end:a}=o.insertContent(t.createText(e,r),s);t.setSelection(a)}["linkHref",...i,...r].forEach((e=>{t.removeSelectionAttribute(e)}))}else{const s=o.schema.getValidRanges(n.getRanges(),"linkHref"),a=[];for(const e of n.getSelectedBlocks())o.schema.checkAttribute(e,"linkHref")&&a.push(t.createRangeOn(e));const l=a.slice();for(const e of s)this._isRangeToUpdate(e,a)&&l.push(e);for(const s of l){let a=s;if(1===l.length){const i=Lv(n);n.getAttribute("linkHref")===i&&(a=this._updateLinkContent(o,t,s,e),t.setSelection(t.createSelection(a)))}t.setAttribute("linkHref",e,a),i.forEach((e=>{t.setAttribute(e,!0,a)})),r.forEach((e=>{t.removeAttribute(e,a)}))}}}))}_getDecoratorStateFromModel(e){const t=this.editor.model,o=t.document.selection,n=o.getSelectedElement();return Rv(n,t.schema)?n.getAttribute(e):o.getAttribute(e)}_isRangeToUpdate(e,t){for(const o of t)if(o.containsRange(e))return!1;return!0}_updateLinkContent(e,t,o,n){const i=t.createText(n,{linkHref:n});return e.insertContent(i,o)}}function Lv(e){if(e.isCollapsed){const t=e.getFirstPosition();return t.textNode&&t.textNode.data}{const t=Array.from(e.getFirstRange().getItems());if(t.length>1)return null;const o=t[0];return o.is("$text")||o.is("$textProxy")?o.data:null}}class Hv extends dr{refresh(){const e=this.editor.model,t=e.document.selection,o=t.getSelectedElement();Rv(o,e.schema)?this.isEnabled=e.schema.checkAttribute(o,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){const e=this.editor,t=this.editor.model,o=t.document.selection,n=e.commands.get("link");t.change((e=>{const i=o.isCollapsed?[Ew(o.getFirstPosition(),"linkHref",o.getAttribute("linkHref"),t)]:t.schema.getValidRanges(o.getRanges(),"linkHref");for(const t of i)if(e.removeAttribute("linkHref",t),n)for(const o of n.manualDecorators)e.removeAttribute(o.id,t)}))}}class jv extends(Y()){constructor({id:e,label:t,attributes:o,classes:n,styles:i,defaultValue:r}){super(),this.id=e,this.set("value",void 0),this.defaultValue=r,this.label=t,this.attributes=o,this.classes=n,this.styles=i}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}var qv=i(7456),Uv={attributes:{"data-cke":!0}};Uv.setAttributes=Ar(),Uv.insert=_r().bind(null,"head"),Uv.domAPI=kr(),Uv.insertStyleElement=vr();fr()(qv.A,Uv);qv.A&&qv.A.locals&&qv.A.locals;const Wv="automatic",$v=/^(https?:)?\/\//;class Gv extends lr{static get pluginName(){return"LinkEditing"}static get requires(){return[kw,nw,j_]}constructor(e){super(e),e.config.define("link",{allowCreatingEmptyLinks:!1,addTargetToExternalLinks:!1})}init(){const e=this.editor,t=this.editor.config.get("link.allowedProtocols");e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:Fv}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,o)=>Fv(Mv(e,t),o)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:e=>e.getAttribute("href")}}),e.commands.add("link",new Nv(e)),e.commands.add("unlink",new Hv(e));const o=function(e,t){const o={"Open in a new tab":e("Open in a new tab"),Downloadable:e("Downloadable")};return t.forEach((e=>("label"in e&&o[e.label]&&(e.label=o[e.label]),e))),t}(e.t,function(e){const t=[];if(e)for(const[o,n]of Object.entries(e)){const e=Object.assign({},n,{id:`link${Dv(o)}`});t.push(e)}return t}(e.config.get("link.decorators")));this._enableAutomaticDecorators(o.filter((e=>e.mode===Wv))),this._enableManualDecorators(o.filter((e=>"manual"===e.mode)));e.plugins.get(kw).registerAttribute("linkHref"),Bw(e,"linkHref","a","ck-link_selected"),this._enableLinkOpen(),this._enableSelectionAttributesFixer(),this._enableClipboardIntegration()}_enableAutomaticDecorators(e){const t=this.editor,o=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&o.add({id:"linkIsExternal",mode:Wv,callback:e=>!!e&&$v.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),o.add(e),o.length&&t.conversion.for("downcast").add(o.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const t=this.editor,o=t.commands.get("link").manualDecorators;e.forEach((e=>{t.model.schema.extend("$text",{allowAttributes:e.id});const n=new jv(e);o.add(n),t.conversion.for("downcast").attributeToElement({model:n.id,view:(e,{writer:t,schema:o},{item:i})=>{if((i.is("selection")||o.isInline(i))&&e){const e=t.createAttributeElement("a",n.attributes,{priority:5});n.classes&&t.addClass(n.classes,e);for(const o in n.styles)t.setStyle(o,n.styles[o],e);return t.setCustomProperty("link",!0,e),e}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...n._createPattern()},model:{key:n.id}})}))}_enableLinkOpen(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",((e,t)=>{if(!(r.isMac?t.domEvent.metaKey:t.domEvent.ctrlKey))return;let o=t.domTarget;if("a"!=o.tagName.toLowerCase()&&(o=o.closest("a")),!o)return;const n=o.getAttribute("href");n&&(e.stop(),t.preventDefault(),Ov(n))}),{context:"$capture"}),this.listenTo(t,"keydown",((t,o)=>{const n=e.commands.get("link").value;!!n&&o.keyCode===ki.enter&&o.altKey&&(t.stop(),Ov(n))}))}_enableSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection;this.listenTo(t,"change:attribute",((o,{attributeKeys:n})=>{n.includes("linkHref")&&!t.hasAttribute("linkHref")&&e.change((t=>{var o;!function(e,t){e.removeSelectionAttribute("linkHref");for(const o of t)e.removeSelectionAttribute(o)}(t,(o=e.schema,o.getDefinition("$text").allowAttributes.filter((e=>e.startsWith("link")))))}))}))}_enableClipboardIntegration(){const e=this.editor,t=e.model,o=this.editor.config.get("link.defaultProtocol");o&&this.listenTo(e.plugins.get("ClipboardPipeline"),"contentInsertion",((e,n)=>{t.change((e=>{const t=e.createRangeIn(n.content);for(const n of t.getItems())if(n.hasAttribute("linkHref")){const t=zv(n.getAttribute("linkHref"),o);e.setAttribute("linkHref",t,n)}}))}))}}var Kv=i(2350),Zv={attributes:{"data-cke":!0}};Zv.setAttributes=Ar(),Zv.insert=_r().bind(null,"head"),Zv.domAPI=kr(),Zv.insertStyleElement=vr();fr()(Kv.A,Zv);Kv.A&&Kv.A.locals&&Kv.A.locals;class Jv extends pm{constructor(e,t,o){super(e),this.focusTracker=new Xi,this.keystrokes=new er,this._focusables=new Uh;const n=e.t;this._validators=o,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),qh.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("Cancel"),qh.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(t),this.children=this._createFormChildren(t.manualDecorators),this._focusCycler=new Im({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const i=["ck","ck-link-form","ck-responsive-form"];t.manualDecorators.length&&i.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:i,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce(((e,t)=>(e[t.name]=t.isOn,e)),{})}render(){super.render(),bm({view:this});[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}isValid(){this.resetFormStatus();for(const e of this._validators){const t=e(this);if(t)return this.urlInputView.errorText=t,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null}_createUrlInput(){const e=this.locale.t,t=new jp(this.locale,Fg);return t.fieldView.inputMode="url",t.label=e("Link URL"),t}_createButton(e,t,o,n){const i=new Em(this.locale);return i.set({label:e,icon:t,tooltip:!0}),i.extendTemplate({attributes:{class:o}}),n&&i.delegate("execute").to(this,n),i}_createManualDecoratorSwitches(e){const t=this.createCollection();for(const o of e.manualDecorators){const n=new bp(this.locale);n.set({name:o.id,label:o.label,withText:!0}),n.bind("isOn").toMany([o,e],"value",((e,t)=>void 0===t&&void 0===e?!!o.defaultValue:!!e)),n.on("execute",(()=>{o.set("value",!n.isOn)})),t.add(n)}return t}_createFormChildren(e){const t=this.createCollection();if(t.add(this.urlInputView),e.length){const e=new pm;e.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map((e=>({tag:"li",children:[e],attributes:{class:["ck","ck-list__item"]}}))),attributes:{class:["ck","ck-reset","ck-list"]}}),t.add(e)}return t.add(this.saveButtonView),t.add(this.cancelButtonView),t}get url(){const{element:e}=this.urlInputView.fieldView;return e?e.value.trim():null}}var Yv=i(8040),Qv={attributes:{"data-cke":!0}};Qv.setAttributes=Ar(),Qv.insert=_r().bind(null,"head"),Qv.domAPI=kr(),Qv.insertStyleElement=vr();fr()(Yv.A,Qv);Yv.A&&Yv.A.locals&&Yv.A.locals;class Xv extends pm{constructor(e,t={}){super(e),this.focusTracker=new Xi,this.keystrokes=new er,this._focusables=new Uh;const o=e.t;this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(o("Unlink"),' ',"unlink"),this.editButtonView=this._createButton(o("Edit link"),qh.pencil,"edit"),this.set("href",void 0),this._linkConfig=t,this._focusCycler=new Im({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions","ck-responsive-form"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render();[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createButton(e,t,o){const n=new Em(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n.delegate("execute").to(this,o),n}_createPreviewButton(){const e=new Em(this.locale),t=this.bindTemplate,o=this.t;return e.set({withText:!0,tooltip:o("Open link in new tab")}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",(e=>e&&Mv(e,this._linkConfig.allowedProtocols))),target:"_blank",rel:"noopener noreferrer"}}),e.bind("label").to(this,"href",(e=>e||o("This link has no URL"))),e.bind("isEnabled").to(this,"href",(e=>!!e)),e.template.tag="a",e.template.eventListeners={},e}}const ex="link-ui";class tx extends lr{constructor(){super(...arguments),this.actionsView=null,this.formView=null}static get requires(){return[Fb]}static get pluginName(){return"LinkUI"}init(){const e=this.editor,t=this.editor.t;e.editing.view.addObserver(Ou),this._balloon=e.plugins.get(Fb),this._createToolbarLinkButton(),this._enableBalloonActivators(),e.conversion.for("editingDowncast").markerToHighlight({model:ex,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:ex,view:(e,{writer:t})=>{if(!e.markerRange.isCollapsed)return null;const o=t.createUIElement("span");return t.addClass(["ck-fake-link-selection","ck-fake-link-selection_collapsed"],o),o}}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:t("Create link"),keystroke:Pv},{label:t("Move out of a link"),keystroke:[["arrowleft","arrowleft"],["arrowright","arrowright"]]}]})}destroy(){super.destroy(),this.formView&&this.formView.destroy(),this.actionsView&&this.actionsView.destroy()}_createViews(){this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._enableUserBalloonInteractions()}_createActionsView(){const e=this.editor,t=new Xv(e.locale,e.config.get("link")),o=e.commands.get("link"),n=e.commands.get("unlink");return t.bind("href").to(o,"value"),t.editButtonView.bind("isEnabled").to(o),t.unlinkButtonView.bind("isEnabled").to(n),this.listenTo(t,"edit",(()=>{this._addFormView()})),this.listenTo(t,"unlink",(()=>{e.execute("unlink"),this._hideUI()})),t.keystrokes.set("Esc",((e,t)=>{this._hideUI(),t()})),t.keystrokes.set(Pv,((e,t)=>{this._addFormView(),t()})),t}_createFormView(){const e=this.editor,t=e.commands.get("link"),o=e.config.get("link.defaultProtocol"),n=new(fm(Jv))(e.locale,t,function(e){const t=e.t,o=e.config.get("link.allowCreatingEmptyLinks");return[e=>{if(!o&&!e.url.length)return t("Link URL must not be empty.")}]}(e));return n.urlInputView.fieldView.bind("value").to(t,"value"),n.urlInputView.bind("isEnabled").to(t,"isEnabled"),n.saveButtonView.bind("isEnabled").to(t,"isEnabled"),this.listenTo(n,"submit",(()=>{if(n.isValid()){const{value:t}=n.urlInputView.fieldView.element,i=zv(t,o);e.execute("link",i,n.getDecoratorSwitchesState()),this._closeFormView()}})),this.listenTo(n.urlInputView,"change:errorText",(()=>{e.ui.update()})),this.listenTo(n,"cancel",(()=>{this._closeFormView()})),n.keystrokes.set("Esc",((e,t)=>{this._closeFormView(),t()})),n}_createToolbarLinkButton(){const e=this.editor;e.ui.componentFactory.add("link",(()=>{const e=this._createButton(Em);return e.set({tooltip:!0}),e})),e.ui.componentFactory.add("menuBar:link",(()=>{const e=this._createButton(ip);return e.set({role:"menuitemcheckbox"}),e}))}_createButton(e){const t=this.editor,o=t.locale,n=t.commands.get("link"),i=new e(t.locale),r=o.t;return i.set({label:r("Link"),icon:' ',keystroke:Pv,isToggleable:!0}),i.bind("isEnabled").to(n,"isEnabled"),i.bind("isOn").to(n,"value",(e=>!!e)),this.listenTo(i,"execute",(()=>this._showUI(!0))),i}_enableBalloonActivators(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",(()=>{this._getSelectedLinkElement()&&this._showUI()})),e.keystrokes.set(Pv,((t,o)=>{o(),e.commands.get("link").isEnabled&&this._showUI(!0)}))}_enableUserBalloonInteractions(){this.editor.keystrokes.set("Tab",((e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())}),{priority:"high"}),this.editor.keystrokes.set("Esc",((e,t)=>{this._isUIVisible&&(this._hideUI(),t())})),gm({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this.actionsView||this._createViews(),this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this.formView||this._createViews(),this._isFormInPanel)return;const e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this.formView.resetFormStatus(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this.formView.urlInputView.fieldView.value=e.value||"",this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions()}_closeFormView(){const e=this.editor.commands.get("link");e.restoreManualDecoratorStates(),void 0!==e.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this.formView.urlInputView.fieldView.reset(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this.formView||this._createViews(),this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let o=this._getSelectedLinkElement(),n=r();const i=()=>{const e=this._getSelectedLinkElement(),t=r();o&&!e||!o&&t!==n?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),o=e,n=t};function r(){return t.selection.focus.getAncestors().reverse().find((e=>e.is("element")))}this.listenTo(e.ui,"update",i),this.listenTo(this._balloon,"change:visibleView",i)}get _isFormInPanel(){return!!this.formView&&this._balloon.hasView(this.formView)}get _areActionsInPanel(){return!!this.actionsView&&this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return!!this.actionsView&&this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){const e=this._balloon.visibleView;return!!this.formView&&e==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=this.editor.model,o=e.document;let n;if(t.markers.has(ex)){const t=Array.from(this.editor.editing.mapper.markerNameToElements(ex)),o=e.createRange(e.createPositionBefore(t[0]),e.createPositionAfter(t[t.length-1]));n=e.domConverter.viewRangeToDom(o)}else n=()=>{const t=this._getSelectedLinkElement();return t?e.domConverter.mapViewToDom(t):e.domConverter.viewRangeToDom(o.selection.getFirstRange())};return{target:n}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection,o=t.getSelectedElement();if(t.isCollapsed||o&&Rk(o))return ox(t.getFirstPosition());{const o=t.getFirstRange().getTrimmed(),n=ox(o.start),i=ox(o.end);return n&&n==i&&e.createRangeIn(n).getTrimmed().isEqual(o)?n:null}}_showFakeVisualSelection(){const e=this.editor.model;e.change((t=>{const o=e.document.selection.getFirstRange();if(e.markers.has(ex))t.updateMarker(ex,{range:o});else if(o.start.isAtEnd){const n=o.start.getLastMatchingPosition((({item:t})=>!e.schema.isContent(t)),{boundaries:o});t.addMarker(ex,{usingOperation:!1,affectsData:!1,range:t.createRange(n,o.end)})}else t.addMarker(ex,{usingOperation:!1,affectsData:!1,range:o})}))}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(ex)&&e.change((e=>{e.removeMarker(ex)}))}}function ox(e){return e.getAncestors().find((e=>{return(t=e).is("attributeElement")&&!!t.getCustomProperty("link");var t}))||null}const nx=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class ix extends lr{static get requires(){return[pw,Gv]}static get pluginName(){return"AutoLink"}init(){const e=this.editor.model.document.selection;e.on("change:range",(()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")})),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling(),this._enablePasteLinking()}_expandLinkRange(e,t){return t.textNode&&t.textNode.hasAttribute("linkHref")?Ew(t,"linkHref",t.textNode.getAttribute("linkHref"),e):null}_selectEntireLinks(e,t){const o=this.editor.model,n=o.document.selection,i=n.getFirstPosition(),r=n.getLastPosition();let s=t.getJoined(this._expandLinkRange(o,i)||t);s&&(s=s.getJoined(this._expandLinkRange(o,r)||t)),s&&(s.start.isBefore(i)||s.end.isAfter(r))&&e.setSelection(s)}_enablePasteLinking(){const e=this.editor,t=e.model,o=t.document.selection,n=e.plugins.get("ClipboardPipeline"),i=e.commands.get("link");n.on("inputTransformation",((e,n)=>{if(!this.isEnabled||!i.isEnabled||o.isCollapsed||"paste"!==n.method)return;if(o.rangeCount>1)return;const r=o.getFirstRange(),s=n.dataTransfer.getData("text/plain");if(!s)return;const a=s.match(nx);a&&a[2]===s&&(t.change((e=>{this._selectEntireLinks(e,r),i.execute(s)})),e.stop())}),{priority:"high"})}_enableTypingHandling(){const e=this.editor,t=new bw(e.model,(e=>{if(!function(e){return e.length>4&&" "===e[e.length-1]&&" "!==e[e.length-2]}(e))return;const t=rx(e.substr(0,e.length-1));return t?{url:t}:void 0}));t.on("matched:data",((t,o)=>{const{batch:n,range:i,url:r}=o;if(!n.isTyping)return;const s=i.end.getShiftedBy(-1),a=s.getShiftedBy(-r.length),l=e.model.createRange(a,s);this._applyAutoLink(r,l)})),t.bind("isEnabled").to(this)}_enableEnterHandling(){const e=this.editor,t=e.model,o=e.commands.get("enter");o&&o.on("execute",(()=>{const e=t.document.selection.getFirstPosition();if(!e.parent.previousSibling)return;const o=t.createRangeIn(e.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(o)}))}_enableShiftEnterHandling(){const e=this.editor,t=e.model,o=e.commands.get("shiftEnter");o&&o.on("execute",(()=>{const e=t.document.selection.getFirstPosition(),o=t.createRange(t.createPositionAt(e.parent,0),e.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(o)}))}_checkAndApplyAutoLinkOnRange(e){const t=this.editor.model,{text:o,range:n}=fw(e,t),i=rx(o);if(i){const e=t.createRange(n.end.getShiftedBy(-i.length),n.end);this._applyAutoLink(i,e)}}_applyAutoLink(e,t){const o=this.editor.model,n=zv(e,this.editor.config.get("link.defaultProtocol"));this.isEnabled&&function(e,t){return t.schema.checkAttributeInSelection(t.createSelection(e),"linkHref")}(t,o)&&Vv(n)&&!function(e){const t=e.start.nodeAfter;return!!t&&t.hasAttribute("linkHref")}(t)&&this._persistAutoLink(n,t)}_persistAutoLink(e,t){const o=this.editor.model,n=this.editor.plugins.get("Delete");o.enqueueChange((i=>{i.setAttribute("linkHref",e,t),o.enqueueChange((()=>{n.requestUndoOnBackspace()}))}))}}function rx(e){const t=nx.exec(e);return t?t[2]:null}var sx=i(3669),ax={attributes:{"data-cke":!0}};ax.setAttributes=Ar(),ax.insert=_r().bind(null,"head"),ax.domAPI=kr(),ax.insertStyleElement=vr();fr()(sx.A,ax);sx.A&&sx.A.locals&&sx.A.locals;class lx{constructor(e,t){this._startElement=e,this._referenceIndent=e.getAttribute("listIndent"),this._isForward="forward"==t.direction,this._includeSelf=!!t.includeSelf,this._sameAttributes=xi(t.sameAttributes||[]),this._sameIndent=!!t.sameIndent,this._lowerIndent=!!t.lowerIndent,this._higherIndent=!!t.higherIndent}static first(e,t){return Qi(new this(e,t)[Symbol.iterator]())}*[Symbol.iterator](){const e=[];for(const{node:t}of cx(this._getStartNode(),this._isForward?"forward":"backward")){const o=t.getAttribute("listIndent");if(othis._referenceIndent){if(!this._higherIndent)continue;if(!this._isForward){e.push(t);continue}}else{if(!this._sameIndent){if(this._higherIndent){e.length&&(yield*e,e.length=0);break}continue}if(this._sameAttributes.some((e=>t.getAttribute(e)!==this._startElement.getAttribute(e))))break}e.length&&(yield*e,e.length=0),yield t}}_getStartNode(){return this._includeSelf?this._startElement:this._isForward?this._startElement.nextSibling:this._startElement.previousSibling}}function*cx(e,t="forward"){const o="forward"==t,n=[];let i=null;for(;hx(e);){let t=null;if(i){const o=e.getAttribute("listIndent"),r=i.getAttribute("listIndent");o>r?n[r]=i:oe.getAttribute("listItemId")!=t))}function xx(e){return Array.from(e).filter((e=>"$graveyard"!==e.root.rootName)).sort(((e,t)=>e.index-t.index))}function Ex(e){const t=e.document.selection.getSelectedElement();return t&&e.schema.isObject(t)&&e.schema.isBlock(t)?t:null}function Dx(e,t){return t.checkChild(e.parent,"listItem")&&t.checkChild(e,"$text")&&!t.isObject(e)}function Bx(e){return"numbered"==e||"customNumbered"==e}function Sx(e,t,o){return px(t,{direction:"forward"}).pop().index>e.index?yx(e,t,o):[]}class Tx extends dr{constructor(e,t){super(e),this._direction=t}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=Ix(e.document.selection);e.change((e=>{const o=[];vx(t)&&!fx(t[0])?("forward"==this._direction&&o.push(...Ax(t,e)),o.push(..._x(t[0],e))):"forward"==this._direction?o.push(...Ax(t,e,{expand:!0})):o.push(...function(e,t){const o=kx(e=xi(e)),n=new Set,i=Math.min(...o.map((e=>e.getAttribute("listIndent")))),r=new Map;for(const e of o)r.set(e,lx.first(e,{lowerIndent:!0}));for(const e of o){if(n.has(e))continue;n.add(e);const o=e.getAttribute("listIndent")-1;if(o<0)Cx(e,t);else{if(e.getAttribute("listIndent")==i){const o=Sx(e,r.get(e),t);for(const e of o)n.add(e);if(o.length)continue}t.setAttribute("listIndent",o,e)}}return xx(n)}(t,e));for(const t of o){if(!t.hasAttribute("listType"))continue;const o=lx.first(t,{sameIndent:!0});o&&e.setAttribute("listType",o.getAttribute("listType"),t)}this._fireAfterExecute(o)}))}_fireAfterExecute(e){this.fire("afterExecute",xx(new Set(e)))}_checkEnabled(){let e=Ix(this.editor.model.document.selection),t=e[0];if(!t)return!1;if("backward"==this._direction)return!0;if(vx(e)&&!fx(e[0]))return!0;e=kx(e),t=e[0];const o=lx.first(t,{sameIndent:!0});return!!o&&o.getAttribute("listType")==t.getAttribute("listType")}}function Ix(e){const t=Array.from(e.getSelectedBlocks()),o=t.findIndex((e=>!hx(e)));return-1!=o&&(t.length=o),t}class Px extends dr{constructor(e,t,o={}){super(e),this.type=t,this._listWalkerOptions=o.multiLevel?{higherIndent:!0,lowerIndent:!0,sameAttributes:[]}:void 0}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,o=t.document,n=Ex(t),i=Array.from(o.selection.getSelectedBlocks()).filter((e=>t.schema.checkAttribute(e,"listType")||Dx(e,t.schema))),r=void 0!==e.forceValue?!e.forceValue:this.value;t.change((s=>{if(r){const e=i[i.length-1],t=px(e,{direction:"forward"}),o=[];t.length>1&&o.push(..._x(t[1],s)),o.push(...Cx(i,s)),o.push(...function(e,t){const o=[];let n=Number.POSITIVE_INFINITY;for(const{node:i}of cx(e.nextSibling,"forward")){const e=i.getAttribute("listIndent");if(0==e)break;e{const{firstElement:r,lastElement:s}=this._getMergeSubjectElements(o,e),a=r.getAttribute("listIndent")||0,l=s.getAttribute("listIndent"),c=s.getAttribute("listItemId");if(a!=l){const e=(d=s,Array.from(new lx(d,{direction:"forward",higherIndent:!0})));n.push(...Ax([s,...e],i,{indentBy:a-l,expand:a{const t=_x(this._getStartBlock(),e);this._fireAfterExecute(t)}))}_fireAfterExecute(e){this.fire("afterExecute",xx(new Set(e)))}_checkEnabled(){const e=this.editor.model.document.selection,t=this._getStartBlock();return e.isCollapsed&&hx(t)&&!fx(t)}_getStartBlock(){const e=this.editor.model.document.selection.getFirstPosition().parent;return"before"==this._direction?e:e.nextSibling}}class Rx extends lr{static get pluginName(){return"ListUtils"}expandListBlocksToCompleteList(e){return wx(e)}isFirstBlockOfListItem(e){return fx(e)}isListItemBlock(e){return hx(e)}expandListBlocksToCompleteItems(e,t={}){return kx(e,t)}isNumberedListType(e){return Bx(e)}}function zx(e){return e.is("element","ol")||e.is("element","ul")}function Vx(e){return e.is("element","li")}function Ox(e,t,o,n=Hx(o,t)){return e.createAttributeElement(Lx(o),null,{priority:2*t/100-100,id:n})}function Nx(e,t,o){return e.createAttributeElement("li",null,{priority:(2*t+1)/100-100,id:o})}function Lx(e){return"numbered"==e||"customNumbered"==e?"ol":"ul"}function Hx(e,t){return`list-${e}-${t}`}function jx(e,t){const o=e.nodeBefore;if(hx(o)){let e=o;for(const{node:o}of cx(e,"backward"))if(e=o,t.has(e))return;t.set(o,e)}else{const o=e.nodeAfter;hx(o)&&t.set(o,o)}}function qx(){return(e,t,o)=>{const{writer:n,schema:i}=o;if(!t.modelRange)return;const r=Array.from(t.modelRange.getItems({shallow:!0})).filter((e=>i.checkAttribute(e,"listItemId")));if(!r.length)return;const s=ux.next(),a=function(e){let t=0,o=e.parent;for(;o;){if(Vx(o))t++;else{const e=o.previousSibling;e&&Vx(e)&&t++}o=o.parent}return t}(t.viewItem);let l=t.viewItem.parent&&t.viewItem.parent.is("element","ol")?"numbered":"bulleted";const c=r[0].getAttribute("listType");c&&(l=c);const d={listItemId:s,listIndent:a,listType:l};for(const e of r)e.hasAttribute("listItemId")||n.setAttributes(d,e);r.length>1&&r[1].getAttribute("listItemId")!=d.listItemId&&o.keepEmptyElement(r[0])}}function Ux(e,t,o,{dataPipeline:n}={}){const i=function(e){return(t,o)=>{const n=[];for(const o of e)t.hasAttribute(o)&&n.push(`attribute:${o}`);return!!n.every((e=>!1!==o.test(t,e)))&&(n.forEach((e=>o.consume(t,e))),!0)}}(e);return(r,s,a)=>{const{writer:l,mapper:c,consumable:d}=a,u=s.item;if(!e.includes(s.attributeKey))return;if(!i(u,d))return;const h=function(e,t,o){const n=o.createRangeOn(e),i=t.toViewRange(n).getTrimmed();return i.end.nodeBefore}(u,c,o);$x(h,l,c),function(e,t){let o=e.parent;for(;o.is("attributeElement")&&["ul","ol","li"].includes(o.name);){const n=o.parent;t.unwrap(t.createRangeOn(e),o),o=n}}(h,l);const m=function(e,t,o,n,{dataPipeline:i}){let r=n.createRangeOn(t);if(!fx(e))return r;for(const s of o){if("itemMarker"!=s.scope)continue;const o=s.createElement(n,e,{dataPipeline:i});if(!o)continue;if(n.setCustomProperty("listItemMarker",!0,o),s.canInjectMarkerIntoElement&&s.canInjectMarkerIntoElement(e)?n.insert(n.createPositionAt(t,0),o):(n.insert(r.start,o),r=n.createRange(n.createPositionBefore(o),n.createPositionAfter(t))),!s.createWrapperElement||!s.canWrapElement)continue;const a=s.createWrapperElement(n,e,{dataPipeline:i});n.setCustomProperty("listItemWrapper",!0,a),s.canWrapElement(e)?r=n.wrap(r,a):(r=n.wrap(n.createRangeOn(o),a),r=n.createRange(r.start,n.createPositionAfter(t)))}return r}(u,h,t,l,{dataPipeline:n});!function(e,t,o,n){if(!e.hasAttribute("listIndent"))return;const i=e.getAttribute("listIndent");let r=e;for(let e=i;e>=0;e--){const i=Nx(n,e,r.getAttribute("listItemId")),s=Ox(n,e,r.getAttribute("listType"));for(const e of o)"list"!=e.scope&&"item"!=e.scope||!r.hasAttribute(e.attributeName)||e.setAttributeOnDowncast(n,r.getAttribute(e.attributeName),"list"==e.scope?s:i);if(t=n.wrap(t,i),t=n.wrap(t,s),0==e)break;if(r=lx.first(r,{lowerIndent:!0}),!r)break}}(u,m,t,l)}}function Wx(e,{dataPipeline:t}={}){return(o,{writer:n})=>{if(!Gx(o,e))return null;if(!t)return n.createContainerElement("span",{class:"ck-list-bogus-paragraph"});const i=n.createContainerElement("p");return n.setCustomProperty("dataPipeline:transparentRendering",!0,i),i}}function $x(e,t,o){for(;e.parent.is("attributeElement")&&e.parent.getCustomProperty("listItemWrapper");)t.unwrap(t.createRangeOn(e),e.parent);const n=[];i(t.createPositionBefore(e).getWalker({direction:"backward"})),i(t.createRangeIn(e).getWalker());for(const e of n)t.remove(e);function i(e){for(const{item:t}of e){if(t.is("element")&&o.toModelElement(t))break;t.is("element")&&t.getCustomProperty("listItemMarker")&&n.push(t)}}}function Gx(e,t,o=mx(e)){if(!hx(e))return!1;for(const o of e.getAttributeKeys())if(!o.startsWith("selection:")&&!t.includes(o))return!1;return o.length<2}var Kx=i(7875),Zx={attributes:{"data-cke":!0}};Zx.setAttributes=Ar(),Zx.insert=_r().bind(null,"head"),Zx.domAPI=kr(),Zx.insertStyleElement=vr();fr()(Kx.A,Zx);Kx.A&&Kx.A.locals&&Kx.A.locals;var Jx=i(532),Yx={attributes:{"data-cke":!0}};Yx.setAttributes=Ar(),Yx.insert=_r().bind(null,"head"),Yx.domAPI=kr(),Yx.insertStyleElement=vr();fr()(Jx.A,Yx);Jx.A&&Jx.A.locals&&Jx.A.locals;const Qx=["listType","listIndent","listItemId"];class Xx extends lr{static get pluginName(){return"ListEditing"}static get requires(){return[Mw,pw,Rx,j_]}constructor(e){super(e),this._downcastStrategies=[],e.config.define("list.multiBlock",!0)}init(){const e=this.editor,t=e.model,o=e.config.get("list.multiBlock");if(e.plugins.has("LegacyListEditing"))throw new E("list-feature-conflict",this,{conflictPlugin:"LegacyListEditing"});t.schema.register("$listItem",{allowAttributes:Qx}),o?(t.schema.extend("$container",{allowAttributesOf:"$listItem"}),t.schema.extend("$block",{allowAttributesOf:"$listItem"}),t.schema.extend("$blockObject",{allowAttributesOf:"$listItem"})):t.schema.register("listItem",{inheritAllFrom:"$block",allowAttributesOf:"$listItem"});for(const e of Qx)t.schema.setAttributeProperties(e,{copyOnReplace:!0});e.commands.add("numberedList",new Px(e,"numbered")),e.commands.add("bulletedList",new Px(e,"bulleted")),e.commands.add("customNumberedList",new Px(e,"customNumbered",{multiLevel:!0})),e.commands.add("customBulletedList",new Px(e,"customBulleted",{multiLevel:!0})),e.commands.add("indentList",new Tx(e,"forward")),e.commands.add("outdentList",new Tx(e,"backward")),e.commands.add("splitListItemBefore",new Mx(e,"before")),e.commands.add("splitListItemAfter",new Mx(e,"after")),o&&(e.commands.add("mergeListItemBackward",new Fx(e,"backward")),e.commands.add("mergeListItemForward",new Fx(e,"forward"))),this._setupDeleteIntegration(),this._setupEnterIntegration(),this._setupTabIntegration(),this._setupClipboardIntegration(),this._setupAccessibilityIntegration()}afterInit(){const e=this.editor.commands,t=e.get("indent"),o=e.get("outdent");t&&t.registerChildCommand(e.get("indentList"),{priority:"high"}),o&&o.registerChildCommand(e.get("outdentList"),{priority:"lowest"}),this._setupModelPostFixing(),this._setupConversion()}registerDowncastStrategy(e){this._downcastStrategies.push(e)}getListAttributeNames(){return[...Qx,...this._downcastStrategies.map((e=>e.attributeName))]}_setupDeleteIntegration(){const e=this.editor,t=e.commands.get("mergeListItemBackward"),o=e.commands.get("mergeListItemForward");this.listenTo(e.editing.view.document,"delete",((n,i)=>{const r=e.model.document.selection;Ex(e.model)||e.model.change((()=>{const s=r.getFirstPosition();if(r.isCollapsed&&"backward"==i.direction){if(!s.isAtStart)return;const o=s.parent;if(!hx(o))return;if(lx.first(o,{sameAttributes:"listType",sameIndent:!0})||0!==o.getAttribute("listIndent")){if(!t||!t.isEnabled)return;t.execute({shouldMergeOnBlocksContentLevel:eE(e.model,"backward")})}else bx(o)||e.execute("splitListItemAfter"),e.execute("outdentList");i.preventDefault(),n.stop()}else{if(r.isCollapsed&&!r.getLastPosition().isAtEnd)return;if(!o||!o.isEnabled)return;o.execute({shouldMergeOnBlocksContentLevel:eE(e.model,"forward")}),i.preventDefault(),n.stop()}}))}),{context:"li"})}_setupEnterIntegration(){const e=this.editor,t=e.model,o=e.commands,n=o.get("enter");this.listenTo(e.editing.view.document,"enter",((o,n)=>{const i=t.document,r=i.selection.getFirstPosition().parent;if(i.selection.isCollapsed&&hx(r)&&r.isEmpty&&!n.isSoft){const t=fx(r),i=bx(r);t&&i?(e.execute("outdentList"),n.preventDefault(),o.stop()):t&&!i?(e.execute("splitListItemAfter"),n.preventDefault(),o.stop()):i&&(e.execute("splitListItemBefore"),n.preventDefault(),o.stop())}}),{context:"li"}),this.listenTo(n,"afterExecute",(()=>{const t=o.get("splitListItemBefore");if(t.refresh(),!t.isEnabled)return;2===mx(e.model.document.selection.getLastPosition().parent).length&&t.execute()}))}_setupTabIntegration(){const e=this.editor;this.listenTo(e.editing.view.document,"tab",((t,o)=>{const n=o.shiftKey?"outdentList":"indentList";this.editor.commands.get(n).isEnabled&&(e.execute(n),o.stopPropagation(),o.preventDefault(),t.stop())}),{context:"li"})}_setupConversion(){const e=this.editor,t=e.model,o=this.getListAttributeNames(),n=e.config.get("list.multiBlock"),i=n?"paragraph":"listItem";e.conversion.for("upcast").elementToElement({view:"li",model:(e,{writer:t})=>t.createElement(i,{listType:""})}).elementToElement({view:"p",model:(e,{writer:t})=>e.parent&&e.parent.is("element","li")?t.createElement(i,{listType:""}):null,converterPriority:"high"}).add((e=>{e.on("element:li",qx())})),n||e.conversion.for("downcast").elementToElement({model:"listItem",view:"p"}),e.conversion.for("editingDowncast").elementToElement({model:i,view:Wx(o),converterPriority:"high"}).add((e=>{var n;e.on("attribute",Ux(o,this._downcastStrategies,t)),e.on("remove",(n=t.schema,(e,t,o)=>{const{writer:i,mapper:r}=o,s=e.name.split(":")[1];if(!n.checkAttribute(s,"listItemId"))return;const a=r.toViewPosition(t.position),l=t.position.getShiftedBy(t.length),c=r.toViewPosition(l,{isPhantom:!0}),d=i.createRange(a,c).getTrimmed().end.nodeBefore;d&&$x(d,i,r)}))})),e.conversion.for("dataDowncast").elementToElement({model:i,view:Wx(o,{dataPipeline:!0}),converterPriority:"high"}).add((e=>{e.on("attribute",Ux(o,this._downcastStrategies,t,{dataPipeline:!0}))}));const r=(s=this._downcastStrategies,a=e.editing.view,(e,t)=>{if(t.modelPosition.offset>0)return;const o=t.modelPosition.parent;if(!hx(o))return;if(!s.some((e=>"itemMarker"==e.scope&&e.canInjectMarkerIntoElement&&e.canInjectMarkerIntoElement(o))))return;const n=t.mapper.toViewElement(o),i=a.createRangeIn(n),r=i.getWalker();let l=i.start;for(const{item:e}of r){if(e.is("element")&&t.mapper.toModelElement(e)||e.is("$textProxy"))break;e.is("element")&&e.getCustomProperty("listItemMarker")&&(l=a.createPositionAfter(e),r.skip((({previousPosition:e})=>!e.isEqual(l))))}t.viewPosition=l});var s,a;e.editing.mapper.on("modelToViewPosition",r),e.data.mapper.on("modelToViewPosition",r),this.listenTo(t.document,"change:data",function(e,t,o,n){return()=>{const n=e.document.differ.getChanges(),s=[],a=new Map,l=new Set;for(const e of n)if("insert"==e.type&&"$text"!=e.name)jx(e.position,a),e.attributes.has("listItemId")?l.add(e.position.nodeAfter):jx(e.position.getShiftedBy(e.length),a);else if("remove"==e.type&&e.attributes.has("listItemId"))jx(e.position,a);else if("attribute"==e.type){const t=e.range.start.nodeAfter;o.includes(e.attributeKey)?(jx(e.range.start,a),null===e.attributeNewValue?(jx(e.range.start.getShiftedBy(1),a),r(t)&&s.push(t)):l.add(t)):hx(t)&&r(t)&&s.push(t)}for(const e of a.values())s.push(...i(e,l));for(const e of new Set(s))t.reconvertItem(e)};function i(e,t){const n=[],i=new Set,a=[];for(const{node:l,previous:c}of cx(e,"forward")){if(i.has(l))continue;const e=l.getAttribute("listIndent");c&&eo.includes(e))));const d=px(l,{direction:"forward"});for(const e of d)i.add(e),(r(e,d)||s(e,a,t))&&n.push(e)}return n}function r(e,i){const r=t.mapper.toViewElement(e);if(!r)return!1;if(n.fire("checkElement",{modelElement:e,viewElement:r}))return!0;if(!e.is("element","paragraph")&&!e.is("element","listItem"))return!1;const s=Gx(e,o,i);return!(!s||!r.is("element","p"))||!(s||!r.is("element","span"))}function s(e,o,i){if(i.has(e))return!1;const r=t.mapper.toViewElement(e);let s=o.length-1;for(let e=r.parent;!e.is("editableElement");e=e.parent){const t=Vx(e),i=zx(e);if(!i&&!t)continue;const r="checkAttributes:"+(t?"item":"list");if(n.fire(r,{viewElement:e,modelAttributes:o[s]}))break;if(i&&(s--,s<0))return!1}return!0}}(t,e.editing,o,this),{priority:"high"}),this.on("checkAttributes:item",((e,{viewElement:t,modelAttributes:o})=>{t.id!=o.listItemId&&(e.return=!0,e.stop())})),this.on("checkAttributes:list",((e,{viewElement:t,modelAttributes:o})=>{t.name==Lx(o.listType)&&t.id==Hx(o.listType,o.listIndent)||(e.return=!0,e.stop())}))}_setupModelPostFixing(){const e=this.editor.model,t=this.getListAttributeNames();e.document.registerPostFixer((o=>function(e,t,o,n){const i=e.document.differ.getChanges(),r=new Map,s=n.editor.config.get("list.multiBlock");let a=!1;for(const n of i){if("insert"==n.type&&"$text"!=n.name){const i=n.position.nodeAfter;if(!e.schema.checkAttribute(i,"listItemId"))for(const e of Array.from(i.getAttributeKeys()))o.includes(e)&&(t.removeAttribute(e,i),a=!0);jx(n.position,r),n.attributes.has("listItemId")||jx(n.position.getShiftedBy(n.length),r);for(const{item:t,previousPosition:o}of e.createRangeIn(i))hx(t)&&jx(o,r)}else"remove"==n.type?jx(n.position,r):"attribute"==n.type&&o.includes(n.attributeKey)&&(jx(n.range.start,r),null===n.attributeNewValue&&jx(n.range.start.getShiftedBy(1),r));if(!s&&"attribute"==n.type&&Qx.includes(n.attributeKey)){const e=n.range.start.nodeAfter;null===n.attributeNewValue&&e&&e.is("element","listItem")?(t.rename(e,"paragraph"),a=!0):null===n.attributeOldValue&&e&&e.is("element")&&"listItem"!=e.name&&(t.rename(e,"listItem"),a=!0)}}const l=new Set;for(const e of r.values())a=n.fire("postFixer",{listNodes:new dx(e),listHead:e,writer:t,seenIds:l})||a;return a}(e,o,t,this))),this.on("postFixer",((e,{listNodes:t,writer:o})=>{e.return=function(e,t){let o=0,n=-1,i=null,r=!1;for(const{node:s}of e){const e=s.getAttribute("listIndent");if(e>o){let a;null===i?(i=e-o,a=o):(i>e&&(i=e),a=e-i),a>n+1&&(a=n+1),t.setAttribute("listIndent",a,s),r=!0,n=a}else i=null,o=e+1,n=e}return r}(t,o)||e.return}),{priority:"high"}),this.on("postFixer",((e,{listNodes:t,writer:o,seenIds:n})=>{e.return=function(e,t,o){const n=new Set;let i=!1;for(const{node:r}of e){if(n.has(r))continue;let e=r.getAttribute("listType"),s=r.getAttribute("listItemId");if(t.has(s)&&(s=ux.next()),t.add(s),r.is("element","listItem"))r.getAttribute("listItemId")!=s&&(o.setAttribute("listItemId",s,r),i=!0);else for(const t of px(r,{direction:"forward"}))n.add(t),t.getAttribute("listType")!=e&&(s=ux.next(),e=t.getAttribute("listType")),t.getAttribute("listItemId")!=s&&(o.setAttribute("listItemId",s,t),i=!0)}return i}(t,n,o)||e.return}),{priority:"high"})}_setupClipboardIntegration(){const e=this.editor.model,t=this.editor.plugins.get("ClipboardPipeline");this.listenTo(e,"insertContent",function(e){return(t,[o,n])=>{const i=o.is("documentFragment")?Array.from(o.getChildren()):[o];if(!i.length)return;const r=(n?e.createSelection(n):e.document.selection).getFirstPosition();let s;if(hx(r.parent))s=r.parent;else{if(!hx(r.nodeBefore))return;s=r.nodeBefore}e.change((e=>{const t=s.getAttribute("listType"),o=s.getAttribute("listIndent"),n=i[0].getAttribute("listIndent")||0,r=Math.max(o-n,0);for(const o of i){const n=hx(o);s.is("element","listItem")&&o.is("element","paragraph")&&e.rename(o,"listItem"),e.setAttributes({listIndent:(n?o.getAttribute("listIndent"):0)+r,listItemId:n?o.getAttribute("listItemId"):ux.next(),listType:t},o)}}))}}(e),{priority:"high"}),this.listenTo(t,"outputTransformation",((t,o)=>{e.change((e=>{const t=Array.from(o.content.getChildren()),n=t[t.length-1];if(t.length>1&&n.is("element")&&n.isEmpty){t.slice(0,-1).every(hx)&&e.remove(n)}if("copy"==o.method||"cut"==o.method){const t=Array.from(o.content.getChildren());vx(t)&&Cx(t,e)}}))}))}_setupAccessibilityIntegration(){const e=this.editor,t=e.t;e.accessibility.addKeystrokeInfoGroup({id:"list",label:t("Keystrokes that can be used in a list"),keystrokes:[{label:t("Increase list item indent"),keystroke:"Tab"},{label:t("Decrease list item indent"),keystroke:"Shift+Tab"}]})}}function eE(e,t){const o=e.document.selection;if(!o.isCollapsed)return!Ex(e);if("forward"===t)return!0;const n=o.getFirstPosition().parent,i=n.previousSibling;return!e.schema.isObject(i)&&(!!i.isEmpty||vx([n,i]))}function tE(e,t,o,n){e.ui.componentFactory.add(t,(()=>{const i=oE(Em,e,t,o,n);return i.set({tooltip:!0,isToggleable:!0}),i})),e.ui.componentFactory.add(`menuBar:${t}`,(()=>{const i=oE(ip,e,t,o,n);return i.set({role:"menuitemcheckbox",isToggleable:!0}),i}))}function oE(e,t,o,n,i){const r=t.commands.get(o),s=new e(t.locale);return s.set({label:n,icon:i}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.on("execute",(()=>{t.execute(o),t.editing.view.focus()})),s}class nE extends lr{static get pluginName(){return"ListUI"}init(){const e=this.editor.t;this.editor.ui.componentFactory.has("numberedList")||tE(this.editor,"numberedList",e("Numbered List"),qh.numberedList),this.editor.ui.componentFactory.has("bulletedList")||tE(this.editor,"bulletedList",e("Bulleted List"),qh.bulletedList)}}class iE extends lr{static get requires(){return[Xx,nE]}static get pluginName(){return"List"}}const rE={},sE={},aE={},lE=[{listStyle:"disc",typeAttribute:"disc",listType:"bulleted"},{listStyle:"circle",typeAttribute:"circle",listType:"bulleted"},{listStyle:"square",typeAttribute:"square",listType:"bulleted"},{listStyle:"decimal",typeAttribute:"1",listType:"numbered"},{listStyle:"decimal-leading-zero",typeAttribute:null,listType:"numbered"},{listStyle:"lower-roman",typeAttribute:"i",listType:"numbered"},{listStyle:"upper-roman",typeAttribute:"I",listType:"numbered"},{listStyle:"lower-alpha",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-alpha",typeAttribute:"A",listType:"numbered"},{listStyle:"lower-latin",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-latin",typeAttribute:"A",listType:"numbered"}];for(const{listStyle:e,typeAttribute:t,listType:o}of lE)rE[e]=o,sE[e]=t,t&&(aE[t]=e);var cE=i(1911),dE={attributes:{"data-cke":!0}};dE.setAttributes=Ar(),dE.insert=_r().bind(null,"head"),dE.domAPI=kr(),dE.insertStyleElement=vr();fr()(cE.A,dE);cE.A&&cE.A.locals&&cE.A.locals;var uE=i(1330),hE={attributes:{"data-cke":!0}};hE.setAttributes=Ar(),hE.insert=_r().bind(null,"head"),hE.domAPI=kr(),hE.insertStyleElement=vr();fr()(uE.A,hE);uE.A&&uE.A.locals&&uE.A.locals;class mE extends dr{constructor(e){super(e),this.on("execute",(()=>{this.refresh()}),{priority:"highest"})}refresh(){const e=this._getSelectedItems();this.value=this._getValue(e),this.isEnabled=!!e.length}execute(e={}){this.editor.model.change((t=>{const o=this._getSelectedItems(),n=void 0===e.forceValue?!this._getValue(o):e.forceValue;for(const e of o)n?t.setAttribute("todoListChecked",!0,e):t.removeAttribute("todoListChecked",e)}))}_getValue(e){return e.every((e=>e.getAttribute("todoListChecked")))}_getSelectedItems(){const e=this.editor.model,t=e.schema,o=e.document.selection.getFirstRange(),n=o.start.parent,i=[];t.checkAttribute(n,"todoListChecked")&&i.push(...mx(n));for(const e of o.getItems({shallow:!0}))t.checkAttribute(e,"todoListChecked")&&!i.includes(e)&&i.push(...mx(e));return i}}class pE extends La{constructor(){super(...arguments),this.domEventType=["change"]}onDomEvent(e){if(e.target){const t=this.view.domConverter.mapDomToView(e.target);t&&t.is("element","input")&&"checkbox"==t.getAttribute("type")&&t.findAncestor({classes:"todo-list__label"})&&this.fire("todoCheckboxChange",e)}}}const gE=yi("Ctrl+Enter");class fE extends lr{static get pluginName(){return"TodoListEditing"}static get requires(){return[Xx]}init(){const e=this.editor,t=e.model,o=e.editing,n=e.plugins.get(Xx),i=e.config.get("list.multiBlock")?"paragraph":"listItem";e.commands.add("todoList",new Px(e,"todo")),e.commands.add("checkTodoList",new mE(e)),o.view.addObserver(pE),t.schema.extend("$listItem",{allowAttributes:"todoListChecked"}),t.schema.addAttributeCheck((e=>{const t=e.last;if(!t.getAttribute("listItemId")||"todo"!=t.getAttribute("listType"))return!1}),"todoListChecked"),e.conversion.for("upcast").add((e=>{e.on("element:input",((e,t,o)=>{const n=t.modelCursor,i=n.parent,r=t.viewItem;if(!o.consumable.test(r,{name:!0}))return;if("checkbox"!=r.getAttribute("type")||!n.isAtStart||!i.hasAttribute("listType"))return;o.consumable.consume(r,{name:!0});const s=o.writer;s.setAttribute("listType","todo",i),t.viewItem.hasAttribute("checked")&&s.setAttribute("todoListChecked",!0,i),t.modelRange=s.createRange(n)})),e.on("element:label",bE({name:"label",classes:"todo-list__label"})),e.on("element:label",bE({name:"label",classes:["todo-list__label","todo-list__label_without-description"]})),e.on("element:span",bE({name:"span",classes:"todo-list__label__description"})),e.on("element:ul",function(e){const t=new Hr(e);return(e,o,n)=>{const i=t.match(o.viewItem);if(!i)return;const r=i.match;r.name=!1,n.consumable.consume(o.viewItem,r)}}({name:"ul",classes:"todo-list"}))})),e.conversion.for("downcast").elementToElement({model:i,view:(e,{writer:t})=>{if(kE(e,n.getListAttributeNames()))return t.createContainerElement("span",{class:"todo-list__label__description"})},converterPriority:"highest"}),n.registerDowncastStrategy({scope:"list",attributeName:"listType",setAttributeOnDowncast(e,t,o){"todo"==t?e.addClass("todo-list",o):e.removeClass("todo-list",o)}}),n.registerDowncastStrategy({scope:"itemMarker",attributeName:"todoListChecked",createElement(e,t,{dataPipeline:o}){if("todo"!=t.getAttribute("listType"))return null;const n=e.createUIElement("input",{type:"checkbox",...t.getAttribute("todoListChecked")?{checked:"checked"}:null,...o?{disabled:"disabled"}:{tabindex:"-1"}});if(o)return n;const i=e.createContainerElement("span",{contenteditable:"false"},n);return i.getFillerOffset=()=>null,i},canWrapElement:e=>kE(e,n.getListAttributeNames()),createWrapperElement(e,t,{dataPipeline:o}){const i=["todo-list__label"];return kE(t,n.getListAttributeNames())||i.push("todo-list__label_without-description"),e.createAttributeElement(o?"label":"span",{class:i.join(" ")})}}),n.on("checkElement",((e,{modelElement:t,viewElement:o})=>{const i=kE(t,n.getListAttributeNames());o.hasClass("todo-list__label__description")!=i&&(e.return=!0,e.stop())})),n.on("checkElement",((t,{modelElement:o,viewElement:n})=>{const i="todo"==o.getAttribute("listType")&&fx(o);let r=!1;const s=e.editing.view.createPositionBefore(n).getWalker({direction:"backward"});for(const{item:t}of s){if(t.is("element")&&e.editing.mapper.toModelElement(t))break;t.is("element","input")&&"checkbox"==t.getAttribute("type")&&(r=!0)}r!=i&&(t.return=!0,t.stop())})),n.on("postFixer",((e,{listNodes:t,writer:o})=>{for(const{node:n,previousNodeInList:i}of t){if(!i)continue;if(i.getAttribute("listItemId")!=n.getAttribute("listItemId"))continue;const t=i.hasAttribute("todoListChecked"),r=n.hasAttribute("todoListChecked");r&&!t?(o.removeAttribute("todoListChecked",n),e.return=!0):!r&&t&&(o.setAttribute("todoListChecked",!0,n),e.return=!0)}})),t.document.registerPostFixer((e=>{const o=t.document.differ.getChanges();let n=!1;for(const t of o)if("attribute"==t.type&&"listType"==t.attributeKey){const o=t.range.start.nodeAfter;"todo"==t.attributeOldValue&&o.hasAttribute("todoListChecked")&&(e.removeAttribute("todoListChecked",o),n=!0)}else if("insert"==t.type&&"$text"!=t.name)for(const{item:o}of e.createRangeOn(t.position.nodeAfter))o.is("element")&&"todo"!=o.getAttribute("listType")&&o.hasAttribute("todoListChecked")&&(e.removeAttribute("todoListChecked",o),n=!0);return n})),this.listenTo(o.view.document,"keydown",((t,o)=>{_i(o)===gE&&(e.execute("checkTodoList"),t.stop())}),{priority:"high"}),this.listenTo(o.view.document,"todoCheckboxChange",((e,t)=>{const n=t.target;if(!n||!n.is("element","input"))return;const i=o.view.createPositionAfter(n),r=o.mapper.toModelPosition(i).parent;r&&hx(r)&&"todo"==r.getAttribute("listType")&&this._handleCheckmarkChange(r)})),this.listenTo(o.view.document,"arrowKey",function(e,t){return(o,n)=>{const i=Ci(n.keyCode,t.contentLanguageDirection),r=e.schema,s=e.document.selection;if(!s.isCollapsed)return;const a=s.getFirstPosition(),l=a.parent;if("right"==i&&a.isAtEnd){const t=r.getNearestSelectionRange(e.createPositionAfter(l),"forward");if(!t)return;const i=t.start.parent;i&&hx(i)&&"todo"==i.getAttribute("listType")&&(e.change((e=>e.setSelection(t))),n.preventDefault(),n.stopPropagation(),o.stop())}else if("left"==i&&a.isAtStart&&hx(l)&&"todo"==l.getAttribute("listType")){const t=r.getNearestSelectionRange(e.createPositionBefore(l),"backward");if(!t)return;e.change((e=>e.setSelection(t))),n.preventDefault(),n.stopPropagation(),o.stop()}}}(t,e.locale),{context:"$text"}),this.listenTo(o.mapper,"viewToModelPosition",((e,o)=>{const n=o.viewPosition.parent,i=n.is("attributeElement","li")&&0==o.viewPosition.offset,r=wE(n)&&o.viewPosition.offset<=1,s=n.is("element","span")&&"false"==n.getAttribute("contenteditable")&&wE(n.parent);if(!i&&!r&&!s)return;const a=o.modelPosition.nodeAfter;a&&"todo"==a.getAttribute("listType")&&(o.modelPosition=t.createPositionAt(a,0))}),{priority:"low"}),this._initAriaAnnouncements()}_handleCheckmarkChange(e){const t=this.editor,o=t.model,n=Array.from(o.document.selection.getRanges());o.change((o=>{o.setSelection(e,"end"),t.execute("checkTodoList"),o.setSelection(n)}))}_initAriaAnnouncements(){const{model:e,ui:t,t:o}=this.editor;let n=null;t&&e.document.selection.on("change:range",(()=>{const i=e.document.selection.focus.parent,r=_E(n),s=_E(i);r&&!s?t.ariaLiveAnnouncer.announce(o("Leaving a to-do list")):!r&&s&&t.ariaLiveAnnouncer.announce(o("Entering a to-do list")),n=i}))}}function bE(e){const t=new Hr(e);return(e,o,n)=>{const i=t.match(o.viewItem);i&&n.consumable.consume(o.viewItem,i.match)&&Object.assign(o,n.convertChildren(o.viewItem,o.modelCursor))}}function kE(e,t){return(e.is("element","paragraph")||e.is("element","listItem"))&&"todo"==e.getAttribute("listType")&&fx(e)&&function(e,t){for(const o of e.getAttributeKeys())if(!o.startsWith("selection:")&&!t.includes(o))return!1;return!0}(e,t)}function wE(e){return!!e&&e.is("attributeElement")&&e.hasClass("todo-list__label")}function _E(e){return!!e&&(!(!e.is("element","paragraph")&&!e.is("element","listItem"))&&"todo"==e.getAttribute("listType"))}class yE extends lr{static get pluginName(){return"TodoListUI"}init(){const e=this.editor.t;tE(this.editor,"todoList",e("To-do List"),qh.todoList)}}var AE=i(5484),CE={attributes:{"data-cke":!0}};CE.setAttributes=Ar(),CE.insert=_r().bind(null,"head"),CE.domAPI=kr(),CE.insertStyleElement=vr();fr()(AE.A,CE);AE.A&&AE.A.locals&&AE.A.locals;class vE extends lr{static get requires(){return[fE,yE]}static get pluginName(){return"TodoList"}}const xE=Symbol("isOPCodeBlock");function EE(e){return!!e.getCustomProperty(xE)&&Rk(e)}function DE(e){const t=e.getSelectedElement();return!(!t||!EE(t))}function BE(e,t,o){const n=t.createContainerElement("pre",{title:window.I18n.t("js.editor.macro.toolbar_help")});return SE(t,e,n),function(e,t,o){return t.setCustomProperty(xE,!0,e),zk(e,t,{label:o})}(n,t,o)}function SE(e,t,o){const n=(t.getAttribute("opCodeblockLanguage")||"language-text").replace(/^language-/,""),i=e.createContainerElement("div",{class:"op-uc-code-block--language"});TE(e,n,i,"text"),e.insert(e.createPositionAt(o,0),i);TE(e,t.getAttribute("opCodeblockContent"),o,"(empty)")}function TE(e,t,o,n){const i=e.createText(t||n);e.insert(e.createPositionAt(o,0),i)}class IE extends La{constructor(e){super(e),this.domEventType="dblclick"}onDomEvent(e){this.fire(e.type,e)}}class PE extends lr{static get pluginName(){return"CodeBlockEditing"}init(){const e=this.editor,t=e.model.schema,o=e.conversion,n=e.editing.view,i=n.document,r=Gk(e);var s,a;t.register("codeblock",{isObject:!0,isBlock:!0,allowContentOf:"$block",allowWhere:["$root","$block"],allowIn:["$root"],allowAttributes:["opCodeblockLanguage","opCodeblockContent"]}),o.for("upcast").add(function(){return t=>{t.on("element:pre",e,{priority:"high"})};function e(e,t,o){if(!o.consumable.test(t.viewItem,{name:!0}))return;const n=Array.from(t.viewItem.getChildren()).find((e=>e.is("element","code")));if(!n||!o.consumable.consume(n,{name:!0}))return;const i=o.writer.createElement("codeblock");o.writer.setAttribute("opCodeblockLanguage",n.getAttribute("class"),i);const r=o.splitToAllowedParent(i,t.modelCursor);if(r){o.writer.insert(i,r.position);const e=n.getChild(0);o.consumable.consume(e,{name:!0});const s=e.data.replace(/\n$/,"");o.writer.setAttribute("opCodeblockContent",s,i),t.modelRange=new Zl(o.writer.createPositionBefore(i),o.writer.createPositionAfter(i)),t.modelCursor=t.modelRange.end}}}()),o.for("editingDowncast").elementToElement({model:"codeblock",view:(e,{writer:t})=>BE(e,t,"Code block")}).add(function(){return t=>{t.on("attribute:opCodeblockContent",e),t.on("attribute:opCodeblockLanguage",e)};function e(e,t,o){const n=t.item;o.consumable.consume(t.item,e.name);const i=o.mapper.toViewElement(n);o.writer.remove(o.writer.createRangeOn(i.getChild(1))),o.writer.remove(o.writer.createRangeOn(i.getChild(0))),SE(o.writer,n,i)}}()),o.for("dataDowncast").add(function(){return t=>{t.on("insert:codeblock",e,{priority:"high"})};function e(e,t,o){const n=t.item,i=n.getAttribute("opCodeblockLanguage")||"language-text",r=n.getAttribute("opCodeblockContent");o.consumable.consume(n,"insert");const s=o.writer,a=s.createContainerElement("pre"),l=s.createContainerElement("div",{class:"op-uc-code-block--language"}),c=s.createContainerElement("code",{class:i}),d=s.createText(i),u=s.createText(r);s.insert(s.createPositionAt(c,0),u),s.insert(s.createPositionAt(l,0),d),s.insert(s.createPositionAt(a,0),l),s.insert(s.createPositionAt(a,0),c),o.mapper.bindElements(n,c),o.mapper.bindElements(n,a),o.mapper.bindElements(n,l);const h=o.mapper.toViewPosition(t.range.start);s.insert(h,a),e.stop()}}()),this.editor.editing.mapper.on("viewToModelPosition",(s=this.editor.model,a=e=>e.hasClass("op-uc-code-block"),(e,t)=>{const{mapper:o,viewPosition:n}=t,i=o.findMappedViewAncestor(n);if(!a(i))return;const r=o.toModelElement(i);t.modelPosition=s.createPositionAt(r,n.isAtStart?"before":"after")})),n.addObserver(IE),this.listenTo(i,"dblclick",((t,o)=>{let n=o.target,i=o.domEvent;if(i.shiftKey||i.altKey||i.metaKey)return;if(!EE(n)&&(n=n.findAncestor(EE),!n))return;o.preventDefault(),o.stopPropagation();const s=e.editing.mapper.toModelElement(n),a=r.services.macros,l=s.getAttribute("opCodeblockLanguage"),c=s.getAttribute("opCodeblockContent");a.editCodeBlock(c,l).then((t=>e.model.change((e=>{e.setAttribute("opCodeblockLanguage",t.languageClass,s),e.setAttribute("opCodeblockContent",t.content,s)}))))})),e.ui.componentFactory.add("insertCodeBlock",(t=>{const o=new Em(t);return o.set({label:window.I18n.t("js.editor.macro.code_block.button"),icon:'\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n image/svg+xml \n \n \n \n \n \n',tooltip:!0}),o.on("execute",(()=>{r.services.macros.editCodeBlock().then((t=>e.model.change((o=>{const n=o.createElement("codeblock");o.setAttribute("opCodeblockLanguage",t.languageClass,n),o.setAttribute("opCodeblockContent",t.content,n),e.model.insertContent(n,e.model.document.selection)}))))})),o}))}}class FE extends lr{static get requires(){return[Fb]}static get pluginName(){return"CodeBlockToolbar"}init(){const e=this.editor,t=this.editor.model,o=Gk(e);l_(e,"opEditCodeBlock",(e=>{const n=o.services.macros,i=e.getAttribute("opCodeblockLanguage"),r=e.getAttribute("opCodeblockContent");n.editCodeBlock(r,i).then((o=>t.change((t=>{t.setAttribute("opCodeblockLanguage",o.languageClass,e),t.setAttribute("opCodeblockContent",o.content,e)}))))}))}afterInit(){d_(this,this.editor,"OPCodeBlock",DE)}}function ME(e){return e.__currentlyDisabled=e.__currentlyDisabled||[],e.ui.view.toolbar?e.ui.view.toolbar.items._items:[]}function RE(e,t){jQuery.each(ME(e),(function(o,n){let i=n;n instanceof kp?i=n.buttonView:n!==t&&n.hasOwnProperty("isEnabled")||(i=null),i&&(i.isEnabled?i.isEnabled=!1:e.__currentlyDisabled.push(i))}))}function zE(e){jQuery.each(ME(e),(function(t,o){let n=o;o instanceof kp&&(n=o.buttonView),e.__currentlyDisabled.indexOf(n)<0&&(n.isEnabled=!0)})),e.__currentlyDisabled=[]}function VE(e,t){const{modelAttribute:o,styleName:n,viewElement:i,defaultValue:r,reduceBoxSides:s=!1,shouldUpcast:a=(()=>!0)}=t;e.for("upcast").attributeToAttribute({view:{name:i,styles:{[n]:/[\s\S]+/}},model:{key:o,value:e=>{if(!a(e))return;const t=e.getNormalizedStyle(n),o=s?HE(t):t;return r!==o?o:void 0}}})}function OE(e,t,o,n){e.for("upcast").add((e=>e.on("element:"+t,((e,t,i)=>{if(!t.modelRange)return;const r=["border-top-width","border-top-color","border-top-style","border-bottom-width","border-bottom-color","border-bottom-style","border-right-width","border-right-color","border-right-style","border-left-width","border-left-color","border-left-style"].filter((e=>t.viewItem.hasStyle(e)));if(!r.length)return;const s={styles:r};if(!i.consumable.test(t.viewItem,s))return;const a=[...t.modelRange.getItems({shallow:!0})].pop();i.consumable.consume(t.viewItem,s);const l={style:t.viewItem.getNormalizedStyle("border-style"),color:t.viewItem.getNormalizedStyle("border-color"),width:t.viewItem.getNormalizedStyle("border-width")},c={style:HE(l.style),color:HE(l.color),width:HE(l.width)};c.style!==n.style&&i.writer.setAttribute(o.style,c.style,a),c.color!==n.color&&i.writer.setAttribute(o.color,c.color,a),c.width!==n.width&&i.writer.setAttribute(o.width,c.width,a)}))))}function NE(e,t){const{modelElement:o,modelAttribute:n,styleName:i}=t;e.for("downcast").attributeToAttribute({model:{name:o,key:n},view:e=>({key:"style",value:{[i]:e}})})}function LE(e,t){const{modelAttribute:o,styleName:n}=t;e.for("downcast").add((e=>e.on(`attribute:${o}:table`,((e,t,o)=>{const{item:i,attributeNewValue:r}=t,{mapper:s,writer:a}=o;if(!o.consumable.consume(t.item,e.name))return;const l=[...s.toViewElement(i).getChildren()].find((e=>e.is("element","table")));r?a.setStyle(n,r,l):a.removeStyle(n,l)}))))}function HE(e){if(!e)return;const t=["top","right","bottom","left"];if(!t.every((t=>e[t])))return e;const o=e.top;return t.every((t=>e[t]===o))?o:e}function jE(e,t,o,n,i=1){null!=t&&null!=i&&t>i?n.setAttribute(e,t,o):n.removeAttribute(e,o)}function qE(e,t,o={}){const n=e.createElement("tableCell",o);return e.insertElement("paragraph",n),e.insert(n,t),n}function UE(e,t){const o=t.parent.parent,n=parseInt(o.getAttribute("headingColumns")||"0"),{column:i}=e.getCellLocation(t);return!!n&&i{e.on("element:table",((e,t,o)=>{const n=t.viewItem;if(!o.consumable.test(n,{name:!0}))return;const{rows:i,headingRows:r,headingColumns:s}=function(e){let t,o=0;const n=[],i=[];let r;for(const s of Array.from(e.getChildren())){if("tbody"!==s.name&&"thead"!==s.name&&"tfoot"!==s.name)continue;"thead"!==s.name||r||(r=s);const e=Array.from(s.getChildren()).filter((e=>e.is("element","tr")));for(const a of e)if(r&&s===r||"tbody"===s.name&&Array.from(a.getChildren()).length&&Array.from(a.getChildren()).every((e=>e.is("element","th"))))o++,n.push(a);else{i.push(a);const e=ZE(a);(!t||eo.convertItem(e,o.writer.createPositionAt(l,"end")))),o.convertChildren(n,o.writer.createPositionAt(l,"end")),l.isEmpty){const e=o.writer.createElement("tableRow");o.writer.insert(e,o.writer.createPositionAt(l,"end")),qE(o.writer,o.writer.createPositionAt(e,"end"))}o.updateConversionResult(l,t)}}))}}function KE(e){return t=>{t.on(`element:${e}`,((e,t,{writer:o})=>{if(!t.modelRange)return;const n=t.modelRange.start.nodeAfter,i=o.createPositionAt(n,0);if(t.viewItem.isEmpty)return void o.insertElement("paragraph",i);const r=Array.from(n.getChildren());if(r.every((e=>e.is("element","$marker")))){const e=o.createElement("paragraph");o.insert(e,o.createPositionAt(n,0));for(const t of r)o.move(o.createRangeOn(t),o.createPositionAt(e,"end"))}}),{priority:"low"})}}function ZE(e){let t=0,o=0;const n=Array.from(e.getChildren()).filter((e=>"th"===e.name||"td"===e.name));for(;o1||i>1)&&this._recordSpans(o,i,n),this._shouldSkipSlot()||(t=this._formatOutValue(o)),this._nextCellAtColumn=this._column+n}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,t||this.next()}skipRow(e){this._skipRows.add(e)}_advanceToNextRow(){return this._row++,this._rowIndex++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next()}_isOverEndRow(){return void 0!==this._endRow&&this._row>this._endRow}_isOverEndColumn(){return void 0!==this._endColumn&&this._column>this._endColumn}_formatOutValue(e,t=this._row,o=this._column){return{done:!1,value:new YE(this,e,t,o)}}_shouldSkipSlot(){const e=this._skipRows.has(this._row),t=this._rowthis._endColumn;return e||t||o||n}_getSpanned(){const e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,t,o){const n={cell:e,row:this._row,column:this._column};for(let e=this._row;e0&&!this._jumpedToStartRow}_jumpToNonSpannedRowClosestToStartRow(){const e=this._getRowLength(0);for(let t=this._startRow;!this._jumpedToStartRow;t--)e===this._getRowLength(t)&&(this._row=t,this._rowIndex=t,this._jumpedToStartRow=!0)}_getRowLength(e){return[...this._table.getChild(e).getChildren()].reduce(((e,t)=>e+parseInt(t.getAttribute("colspan")||"1")),0)}}class YE{constructor(e,t,o,n){this.cell=t,this.row=e._row,this.column=e._column,this.cellAnchorRow=o,this.cellAnchorColumn=n,this._cellIndex=e._cellIndex,this._rowIndex=e._rowIndex,this._table=e._table}get isAnchor(){return this.row===this.cellAnchorRow&&this.column===this.cellAnchorColumn}get cellWidth(){return parseInt(this.cell.getAttribute("colspan")||"1")}get cellHeight(){return parseInt(this.cell.getAttribute("rowspan")||"1")}get rowIndex(){return this._rowIndex}getPositionBefore(){return this._table.root.document.model.createPositionAt(this._table.getChild(this.row),this._cellIndex)}}function QE(e,t){return(o,{writer:n})=>{const i=o.getAttribute("headingRows")||0,r=n.createContainerElement("table",null,[]),s=n.createContainerElement("figure",{class:"table"},r);i>0&&n.insert(n.createPositionAt(r,"end"),n.createContainerElement("thead",null,n.createSlot((e=>e.is("element","tableRow")&&e.indexe.is("element","tableRow")&&e.index>=i))));for(const{positionOffset:e,filter:o}of t.additionalSlots)n.insert(n.createPositionAt(r,e),n.createSlot(o));return n.insert(n.createPositionAt(r,"after"),n.createSlot((e=>!e.is("element","tableRow")&&!t.additionalSlots.some((({filter:t})=>t(e)))))),t.asWidget?function(e,t){return t.setCustomProperty("table",!0,e),zk(e,t,{hasSelectionHandle:!0})}(s,n):s}}function XE(e={}){return(t,{writer:o})=>{const n=t.parent,i=n.parent,r=i.getChildIndex(n),s=new JE(i,{row:r}),a=i.getAttribute("headingRows")||0,l=i.getAttribute("headingColumns")||0;let c=null;for(const n of s)if(n.cell==t){const t=n.row{if(!t.parent.is("element","tableCell"))return null;if(!tD(t))return null;if(e.asWidget)return o.createContainerElement("span",{class:"ck-table-bogus-paragraph"});{const e=o.createContainerElement("p");return o.setCustomProperty("dataPipeline:transparentRendering",!0,e),e}}}function tD(e){return 1==e.parent.childCount&&!!e.getAttributeKeys().next().done}class oD extends dr{refresh(){const e=this.editor.model,t=e.document.selection,o=e.schema;this.isEnabled=function(e,t){const o=e.getFirstPosition().parent,n=o===o.root?o:o.parent;return t.checkChild(n,"table")}(t,o)}execute(e={}){const t=this.editor,o=t.model,n=t.plugins.get("TableUtils"),i=t.config.get("table.defaultHeadings.rows"),r=t.config.get("table.defaultHeadings.columns");void 0===e.headingRows&&i&&(e.headingRows=i),void 0===e.headingColumns&&r&&(e.headingColumns=r),o.change((t=>{const i=n.createTable(t,e);o.insertObject(i,null,null,{findOptimalPosition:"auto"}),t.setSelection(t.createPositionAt(i.getNodeByPath([0,0,0]),0))}))}}class nD extends dr{constructor(e,t={}){super(e),this.order=t.order||"below"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,o=e.plugins.get("TableUtils"),n="above"===this.order,i=o.getSelectionAffectedTableCells(t),r=o.getRowIndexes(i),s=n?r.first:r.last,a=i[0].findAncestor("table");o.insertRows(a,{at:n?s:s+1,copyStructureFromAbove:!n})}}class iD extends dr{constructor(e,t={}){super(e),this.order=t.order||"right"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,o=e.plugins.get("TableUtils"),n="left"===this.order,i=o.getSelectionAffectedTableCells(t),r=o.getColumnIndexes(i),s=n?r.first:r.last,a=i[0].findAncestor("table");o.insertColumns(a,{columns:1,at:n?s:s+1})}}class rD extends dr{constructor(e,t={}){super(e),this.direction=t.direction||"horizontally"}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=1===e.length}execute(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection)[0];"horizontally"===this.direction?e.splitCellHorizontally(t,2):e.splitCellVertically(t,2)}}function sD(e,t,o){const{startRow:n,startColumn:i,endRow:r,endColumn:s}=t,a=o.createElement("table"),l=r-n+1;for(let e=0;e0){jE("headingRows",r-o,e,i,0)}const s=parseInt(t.getAttribute("headingColumns")||"0");if(s>0){jE("headingColumns",s-n,e,i,0)}}(a,e,n,i,o),a}function aD(e,t,o=0){const n=[],i=new JE(e,{startRow:o,endRow:t-1});for(const e of i){const{row:o,cellHeight:i}=e;o1&&(a.rowspan=l);const c=parseInt(e.getAttribute("colspan")||"1");c>1&&(a.colspan=c);const d=r+s,u=[...new JE(i,{startRow:r,endRow:d,includeAllSlots:!0})];let h,m=null;for(const t of u){const{row:n,column:i,cell:r}=t;r===e&&void 0===h&&(h=i),void 0!==h&&h===i&&n===d&&(m=qE(o,t.getPositionBefore(),a))}return jE("rowspan",s,e,o),m}function cD(e,t){const o=[],n=new JE(e);for(const e of n){const{column:n,cellWidth:i}=e;n1&&(r.colspan=s);const a=parseInt(e.getAttribute("rowspan")||"1");a>1&&(r.rowspan=a);const l=qE(n,n.createPositionAfter(e),r);return jE("colspan",i,e,n),l}function uD(e,t,o,n,i,r){const s=parseInt(e.getAttribute("colspan")||"1"),a=parseInt(e.getAttribute("rowspan")||"1");if(o+s-1>i){jE("colspan",i-o+1,e,r,1)}if(t+a-1>n){jE("rowspan",n-t+1,e,r,1)}}function hD(e,t){const o=t.getColumns(e),n=new Array(o).fill(0);for(const{column:t}of new JE(e))n[t]++;const i=n.reduce(((e,t,o)=>t?e:[...e,o]),[]);if(i.length>0){const o=i[i.length-1];return t.removeColumns(e,{at:o}),!0}return!1}function mD(e,t){const o=[],n=t.getRows(e);for(let t=0;t0){const n=o[o.length-1];return t.removeRows(e,{at:n}),!0}return!1}function pD(e,t){hD(e,t)||mD(e,t)}function gD(e,t){const o=Array.from(new JE(e,{startColumn:t.firstColumn,endColumn:t.lastColumn,row:t.lastRow}));if(o.every((({cellHeight:e})=>1===e)))return t.lastRow;const n=o[0].cellHeight-1;return t.lastRow+n}function fD(e,t){const o=Array.from(new JE(e,{startRow:t.firstRow,endRow:t.lastRow,column:t.lastColumn}));if(o.every((({cellWidth:e})=>1===e)))return t.lastColumn;const n=o[0].cellWidth-1;return t.lastColumn+n}class bD extends dr{constructor(e,t){super(e),this.direction=t.direction,this.isHorizontal="right"==this.direction||"left"==this.direction}refresh(){const e=this._getMergeableCell();this.value=e,this.isEnabled=!!e}execute(){const e=this.editor.model,t=e.document,o=this.editor.plugins.get("TableUtils").getTableCellsContainingSelection(t.selection)[0],n=this.value,i=this.direction;e.change((e=>{const t="right"==i||"down"==i,r=t?o:n,s=t?n:o,a=s.parent;!function(e,t,o){kD(e)||(kD(t)&&o.remove(o.createRangeIn(t)),o.move(o.createRangeIn(e),o.createPositionAt(t,"end")));o.remove(e)}(s,r,e);const l=this.isHorizontal?"colspan":"rowspan",c=parseInt(o.getAttribute(l)||"1"),d=parseInt(n.getAttribute(l)||"1");e.setAttribute(l,c+d,r),e.setSelection(e.createRangeIn(r));const u=this.editor.plugins.get("TableUtils");pD(a.findAncestor("table"),u)}))}_getMergeableCell(){const e=this.editor.model.document,t=this.editor.plugins.get("TableUtils"),o=t.getTableCellsContainingSelection(e.selection)[0];if(!o)return;const n=this.isHorizontal?function(e,t,o){const n=e.parent,i=n.parent,r="right"==t?e.nextSibling:e.previousSibling,s=(i.getAttribute("headingColumns")||0)>0;if(!r)return;const a="right"==t?e:r,l="right"==t?r:e,{column:c}=o.getCellLocation(a),{column:d}=o.getCellLocation(l),u=parseInt(a.getAttribute("colspan")||"1"),h=UE(o,a),m=UE(o,l);if(s&&h!=m)return;return c+u===d?r:void 0}(o,this.direction,t):function(e,t,o){const n=e.parent,i=n.parent,r=i.getChildIndex(n);if("down"==t&&r===o.getRows(i)-1||"up"==t&&0===r)return null;const s=parseInt(e.getAttribute("rowspan")||"1"),a=i.getAttribute("headingRows")||0,l="down"==t&&r+s===a,c="up"==t&&r===a;if(a&&(l||c))return null;const d=parseInt(e.getAttribute("rowspan")||"1"),u="down"==t?r+d:r,h=[...new JE(i,{endRow:u})],m=h.find((t=>t.cell===e)),p=m.column,g=h.find((({row:e,cellHeight:o,column:n})=>n===p&&("down"==t?e===u:u===e+o)));return g&&g.cell?g.cell:null}(o,this.direction,t);if(!n)return;const i=this.isHorizontal?"rowspan":"colspan",r=parseInt(o.getAttribute(i)||"1");return parseInt(n.getAttribute(i)||"1")===r?n:void 0}}function kD(e){const t=e.getChild(0);return 1==e.childCount&&t.is("element","paragraph")&&t.isEmpty}class wD extends dr{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),o=t[0];if(o){const n=o.findAncestor("table"),i=e.getRows(n)-1,r=e.getRowIndexes(t),s=0===r.first&&r.last===i;this.isEnabled=!s}else this.isEnabled=!1}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),o=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(o),i=o[0],r=i.findAncestor("table"),s=t.getCellLocation(i).column;e.change((e=>{const o=n.last-n.first+1;t.removeRows(r,{at:n.first,rows:o});const i=function(e,t,o,n){const i=e.getChild(Math.min(t,n-1));let r=i.getChild(0),s=0;for(const e of i.getChildren()){if(s>o)return r;r=e,s+=parseInt(e.getAttribute("colspan")||"1")}return r}(r,n.first,s,t.getRows(r));e.setSelection(e.createPositionAt(i,0))}))}}class _D extends dr{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),o=t[0];if(o){const n=o.findAncestor("table"),i=e.getColumns(n),{first:r,last:s}=e.getColumnIndexes(t);this.isEnabled=s-re.cell===t)).column,last:i.find((e=>e.cell===o)).column},s=function(e,t,o,n){const i=parseInt(o.getAttribute("colspan")||"1");return i>1?o:t.previousSibling||o.nextSibling?o.nextSibling||t.previousSibling:n.first?e.reverse().find((({column:e})=>ee>n.last)).cell}(i,t,o,r);this.editor.model.change((t=>{const o=r.last-r.first+1;e.removeColumns(n,{at:r.first,columns:o}),t.setSelection(t.createPositionAt(s,0))}))}}class yD extends dr{refresh(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,o=e.getSelectionAffectedTableCells(t.document.selection),n=o.length>0;this.isEnabled=n,this.value=n&&o.every((e=>this._isInHeading(e,e.parent.parent)))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),o=this.editor.model,n=t.getSelectionAffectedTableCells(o.document.selection),i=n[0].findAncestor("table"),{first:r,last:s}=t.getRowIndexes(n),a=this.value?r:s+1,l=i.getAttribute("headingRows")||0;o.change((e=>{if(a){const t=aD(i,a,a>l?l:0);for(const{cell:o}of t)lD(o,a,e)}jE("headingRows",a,i,e,0)}))}_isInHeading(e,t){const o=parseInt(t.getAttribute("headingRows")||"0");return!!o&&e.parent.index0;this.isEnabled=n,this.value=n&&o.every((e=>UE(t,e)))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),o=this.editor.model,n=t.getSelectionAffectedTableCells(o.document.selection),i=n[0].findAncestor("table"),{first:r,last:s}=t.getColumnIndexes(n),a=this.value?r:s+1;o.change((e=>{if(a){const t=cD(i,a);for(const{cell:o,column:n}of t)dD(o,n,a,e)}jE("headingColumns",a,i,e,0)}))}}function CD(e){if(e.is("element","tableColumnGroup"))return e;const t=e.getChildren();return Array.from(t).find((e=>e.is("element","tableColumnGroup")))}function vD(e){const t=CD(e);return t?Array.from(t.getChildren()):[]}class xD extends lr{static get pluginName(){return"TableUtils"}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(e){const t=e.parent,o=t.parent,n=o.getChildIndex(t),i=new JE(o,{row:n});for(const{cell:t,row:o,column:n}of i)if(t===e)return{row:o,column:n}}createTable(e,t){const o=e.createElement("table"),n=t.rows||2,i=t.columns||2;return ED(e,o,0,n,i),t.headingRows&&jE("headingRows",Math.min(t.headingRows,n),o,e,0),t.headingColumns&&jE("headingColumns",Math.min(t.headingColumns,i),o,e,0),o}insertRows(e,t={}){const o=this.editor.model,n=t.at||0,i=t.rows||1,r=void 0!==t.copyStructureFromAbove,s=t.copyStructureFromAbove?n-1:n,a=this.getRows(e),l=this.getColumns(e);if(n>a)throw new E("tableutils-insertrows-insert-out-of-range",this,{options:t});o.change((t=>{const o=e.getAttribute("headingRows")||0;if(o>n&&jE("headingRows",o+i,e,t,0),!r&&(0===n||n===a))return void ED(t,e,n,i,l);const c=r?Math.max(n,s):n,d=new JE(e,{endRow:c}),u=new Array(l).fill(1);for(const{row:e,column:o,cellHeight:a,cellWidth:l,cell:c}of d){const d=e+a-1,h=e<=s&&s<=d;e0&&qE(t,i,n>1?{colspan:n}:void 0),e+=Math.abs(n)-1}}}))}insertColumns(e,t={}){const o=this.editor.model,n=t.at||0,i=t.columns||1;o.change((t=>{const o=e.getAttribute("headingColumns");ni-1)throw new E("tableutils-removerows-row-index-out-of-range",this,{table:e,options:t});o.change((t=>{const o={first:r,last:s},{cellsToMove:n,cellsToTrim:i}=function(e,{first:t,last:o}){const n=new Map,i=[];for(const{row:r,column:s,cellHeight:a,cell:l}of new JE(e,{endRow:o})){const e=r+a-1;if(r>=t&&r<=o&&e>o){const e=a-(o-r+1);n.set(s,{cell:l,rowspan:e})}if(r=t){let n;n=e>=o?o-t+1:e-t+1,i.push({cell:l,rowspan:a-n})}}return{cellsToMove:n,cellsToTrim:i}}(e,o);if(n.size){!function(e,t,o,n){const i=new JE(e,{includeAllSlots:!0,row:t}),r=[...i],s=e.getChild(t);let a;for(const{column:e,cell:t,isAnchor:i}of r)if(o.has(e)){const{cell:t,rowspan:i}=o.get(e),r=a?n.createPositionAfter(a):n.createPositionAt(s,0);n.move(n.createRangeOn(t),r),jE("rowspan",i,t,n),a=t}else i&&(a=t)}(e,s+1,n,t)}for(let o=s;o>=r;o--)t.remove(e.getChild(o));for(const{rowspan:e,cell:o}of i)jE("rowspan",e,o,t);!function(e,{first:t,last:o},n){const i=e.getAttribute("headingRows")||0;if(t{!function(e,t,o){const n=e.getAttribute("headingColumns")||0;if(n&&t.first=n;i--){for(const{cell:o,column:n,cellWidth:r}of[...new JE(e)])n<=i&&r>1&&n+r>i?jE("colspan",r-1,o,t):n===i&&t.remove(o);if(o[i]){const e=0===i?o[1]:o[i-1],n=parseFloat(o[i].getAttribute("columnWidth")),r=parseFloat(e.getAttribute("columnWidth"));t.remove(o[i]),t.setAttribute("columnWidth",n+r+"%",e)}}mD(e,this)||hD(e,this)}))}splitCellVertically(e,t=2){const o=this.editor.model,n=e.parent.parent,i=parseInt(e.getAttribute("rowspan")||"1"),r=parseInt(e.getAttribute("colspan")||"1");o.change((o=>{if(r>1){const{newCellsSpan:n,updatedSpan:s}=BD(r,t);jE("colspan",s,e,o);const a={};n>1&&(a.colspan=n),i>1&&(a.rowspan=i);DD(r>t?t-1:r-1,o,o.createPositionAfter(e),a)}if(rt===e)),c=a.filter((({cell:t,cellWidth:o,column:n})=>t!==e&&n===l||nl));for(const{cell:e,cellWidth:t}of c)o.setAttribute("colspan",t+s,e);const d={};i>1&&(d.rowspan=i),DD(s,o,o.createPositionAfter(e),d);const u=n.getAttribute("headingColumns")||0;u>l&&jE("headingColumns",u+s,n,o)}}))}splitCellHorizontally(e,t=2){const o=this.editor.model,n=e.parent,i=n.parent,r=i.getChildIndex(n),s=parseInt(e.getAttribute("rowspan")||"1"),a=parseInt(e.getAttribute("colspan")||"1");o.change((o=>{if(s>1){const n=[...new JE(i,{startRow:r,endRow:r+s-1,includeAllSlots:!0})],{newCellsSpan:l,updatedSpan:c}=BD(s,t);jE("rowspan",c,e,o);const{column:d}=n.find((({cell:t})=>t===e)),u={};l>1&&(u.rowspan=l),a>1&&(u.colspan=a);let h=0;for(const e of n){const{column:t,row:n}=e,i=t===d;h>=l&&i&&(h=0),n>=r+c&&i&&(h||DD(1,o,e.getPositionBefore(),u),h++)}}if(sr){const e=i+n;o.setAttribute("rowspan",e,t)}const c={};a>1&&(c.colspan=a),ED(o,i,r+1,n,1,c);const d=i.getAttribute("headingRows")||0;d>r&&jE("headingRows",d+n,i,o)}}))}getColumns(e){return[...e.getChild(0).getChildren()].filter((e=>e.is("element","tableCell"))).reduce(((e,t)=>e+parseInt(t.getAttribute("colspan")||"1")),0)}getRows(e){return Array.from(e.getChildren()).reduce(((e,t)=>t.is("element","tableRow")?e+1:e),0)}createTableWalker(e,t={}){return new JE(e,t)}getSelectedTableCells(e){const t=[];for(const o of this.sortRanges(e.getRanges())){const e=o.getContainedElement();e&&e.is("element","tableCell")&&t.push(e)}return t}getTableCellsContainingSelection(e){const t=[];for(const o of e.getRanges()){const e=o.start.findAncestor("tableCell");e&&t.push(e)}return t}getSelectionAffectedTableCells(e){const t=this.getSelectedTableCells(e);return t.length?t:this.getTableCellsContainingSelection(e)}getRowIndexes(e){const t=e.map((e=>e.parent.index));return this._getFirstLastIndexesObject(t)}getColumnIndexes(e){const t=e[0].findAncestor("table"),o=[...new JE(t)].filter((t=>e.includes(t.cell))).map((e=>e.column));return this._getFirstLastIndexesObject(o)}isSelectionRectangular(e){if(e.length<2||!this._areCellInTheSameTableSection(e))return!1;const t=new Set,o=new Set;let n=0;for(const i of e){const{row:e,column:r}=this.getCellLocation(i),s=parseInt(i.getAttribute("rowspan"))||1,a=parseInt(i.getAttribute("colspan"))||1;t.add(e),o.add(r),s>1&&t.add(e+s-1),a>1&&o.add(r+a-1),n+=s*a}const i=function(e,t){const o=Array.from(e.values()),n=Array.from(t.values()),i=Math.max(...o),r=Math.min(...o),s=Math.max(...n),a=Math.min(...n);return(i-r+1)*(s-a+1)}(t,o);return i==n}sortRanges(e){return Array.from(e).sort(SD)}_getFirstLastIndexesObject(e){const t=e.sort(((e,t)=>e-t));return{first:t[0],last:t[t.length-1]}}_areCellInTheSameTableSection(e){const t=e[0].findAncestor("table"),o=this.getRowIndexes(e),n=parseInt(t.getAttribute("headingRows"))||0;if(!this._areIndexesInSameSection(o,n))return!1;const i=this.getColumnIndexes(e),r=parseInt(t.getAttribute("headingColumns"))||0;return this._areIndexesInSameSection(i,r)}_areIndexesInSameSection({first:e,last:t},o){return e{const n=t.getSelectedTableCells(e.document.selection),i=n.shift(),{mergeWidth:r,mergeHeight:s}=function(e,t,o){let n=0,i=0;for(const e of t){const{row:t,column:r}=o.getCellLocation(e);n=FD(e,r,n,"colspan"),i=FD(e,t,i,"rowspan")}const{row:r,column:s}=o.getCellLocation(e),a=n-s,l=i-r;return{mergeWidth:a,mergeHeight:l}}(i,n,t);jE("colspan",r,i,o),jE("rowspan",s,i,o);for(const e of n)ID(e,i,o);pD(i.findAncestor("table"),t),o.setSelection(i,"in")}))}}function ID(e,t,o){PD(e)||(PD(t)&&o.remove(o.createRangeIn(t)),o.move(o.createRangeIn(e),o.createPositionAt(t,"end"))),o.remove(e)}function PD(e){const t=e.getChild(0);return 1==e.childCount&&t.is("element","paragraph")&&t.isEmpty}function FD(e,t,o,n){const i=parseInt(e.getAttribute(n)||"1");return Math.max(o,t+i)}class MD extends dr{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),o=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(o),i=o[0].findAncestor("table"),r=[];for(let t=n.first;t<=n.last;t++)for(const o of i.getChild(t).getChildren())r.push(e.createRangeOn(o));e.change((e=>{e.setSelection(r)}))}}class RD extends dr{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,o=e.getSelectionAffectedTableCells(t.document.selection),n=o[0],i=o.pop(),r=n.findAncestor("table"),s=e.getCellLocation(n),a=e.getCellLocation(i),l=Math.min(s.column,a.column),c=Math.max(s.column,a.column),d=[];for(const e of new JE(r,{startColumn:l,endColumn:c}))d.push(t.createRangeOn(e.cell));t.change((e=>{e.setSelection(d)}))}}function zD(e){e.document.registerPostFixer((t=>function(e,t){const o=t.document.differ.getChanges();let n=!1;const i=new Set;for(const t of o){let o=null;"insert"==t.type&&"table"==t.name&&(o=t.position.nodeAfter),"insert"!=t.type&&"remove"!=t.type||"tableRow"!=t.name&&"tableCell"!=t.name||(o=t.position.findAncestor("table")),ND(t)&&(o=t.range.start.findAncestor("table")),o&&!i.has(o)&&(n=VD(o,e)||n,n=OD(o,e)||n,i.add(o))}return n}(t,e)))}function VD(e,t){let o=!1;const n=function(e){const t=parseInt(e.getAttribute("headingRows")||"0"),o=Array.from(e.getChildren()).reduce(((e,t)=>t.is("element","tableRow")?e+1:e),0),n=[];for(const{row:i,cell:r,cellHeight:s}of new JE(e)){if(s<2)continue;const e=ie){const t=e-i;n.push({cell:r,rowspan:t})}}return n}(e);if(n.length){o=!0;for(const e of n)jE("rowspan",e.rowspan,e.cell,t,1)}return o}function OD(e,t){let o=!1;const n=function(e){const t=new Array(e.childCount).fill(0);for(const{rowIndex:o}of new JE(e,{includeAllSlots:!0}))t[o]++;return t}(e),i=[];for(const[t,o]of n.entries())!o&&e.getChild(t).is("element","tableRow")&&i.push(t);if(i.length){o=!0;for(const o of i.reverse())t.remove(e.getChild(o)),n.splice(o,1)}const r=n.filter(((t,o)=>e.getChild(o).is("element","tableRow"))),s=r[0];if(!r.every((e=>e===s))){const n=r.reduce(((e,t)=>t>e?t:e),0);for(const[i,s]of r.entries()){const r=n-s;if(r){for(let o=0;ofunction(e,t){const o=t.document.differ.getChanges();let n=!1;for(const t of o)"insert"==t.type&&"table"==t.name&&(n=HD(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableRow"==t.name&&(n=jD(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableCell"==t.name&&(n=qD(t.position.nodeAfter,e)||n),"remove"!=t.type&&"insert"!=t.type||!UD(t)||(n=qD(t.position.parent,e)||n);return n}(t,e)))}function HD(e,t){let o=!1;for(const n of e.getChildren())n.is("element","tableRow")&&(o=jD(n,t)||o);return o}function jD(e,t){let o=!1;for(const n of e.getChildren())o=qD(n,t)||o;return o}function qD(e,t){if(0==e.childCount)return t.insertElement("paragraph",e),!0;const o=Array.from(e.getChildren()).filter((e=>e.is("$text")));for(const e of o)t.wrap(t.createRangeOn(e),"paragraph");return!!o.length}function UD(e){return!!e.position.parent.is("element","tableCell")&&("insert"==e.type&&"$text"==e.name||"remove"==e.type)}function WD(e,t){if(!e.is("element","paragraph"))return!1;const o=t.toViewElement(e);return!!o&&tD(e)!==o.is("element","span")}var $D=i(8864),GD={attributes:{"data-cke":!0}};GD.setAttributes=Ar(),GD.insert=_r().bind(null,"head"),GD.domAPI=kr(),GD.insertStyleElement=vr();fr()($D.A,GD);$D.A&&$D.A.locals&&$D.A.locals;class KD extends lr{static get pluginName(){return"TableEditing"}static get requires(){return[xD]}constructor(e){super(e),this._additionalSlots=[]}init(){const e=this.editor,t=e.model,o=t.schema,n=e.conversion,i=e.plugins.get(xD);o.register("table",{inheritAllFrom:"$blockObject",allowAttributes:["headingRows","headingColumns"]}),o.register("tableRow",{allowIn:"table",isLimit:!0}),o.register("tableCell",{allowContentOf:"$container",allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),n.for("upcast").add((e=>{e.on("element:figure",((e,t,o)=>{if(!o.consumable.test(t.viewItem,{name:!0,classes:"table"}))return;const n=function(e){for(const t of e.getChildren())if(t.is("element","table"))return t}(t.viewItem);if(!n||!o.consumable.test(n,{name:!0}))return;o.consumable.consume(t.viewItem,{name:!0,classes:"table"});const i=Qi(o.convertItem(n,t.modelCursor).modelRange.getItems());i?(o.convertChildren(t.viewItem,o.writer.createPositionAt(i,"end")),o.updateConversionResult(i,t)):o.consumable.revert(t.viewItem,{name:!0,classes:"table"})}))})),n.for("upcast").add(GE()),n.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:QE(i,{asWidget:!0,additionalSlots:this._additionalSlots})}),n.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:QE(i,{additionalSlots:this._additionalSlots})}),n.for("upcast").elementToElement({model:"tableRow",view:"tr"}),n.for("upcast").add((e=>{e.on("element:tr",((e,t)=>{t.viewItem.isEmpty&&0==t.modelCursor.index&&e.stop()}),{priority:"high"})})),n.for("downcast").elementToElement({model:"tableRow",view:(e,{writer:t})=>e.isEmpty?t.createEmptyElement("tr"):t.createContainerElement("tr")}),n.for("upcast").elementToElement({model:"tableCell",view:"td"}),n.for("upcast").elementToElement({model:"tableCell",view:"th"}),n.for("upcast").add(KE("td")),n.for("upcast").add(KE("th")),n.for("editingDowncast").elementToElement({model:"tableCell",view:XE({asWidget:!0})}),n.for("dataDowncast").elementToElement({model:"tableCell",view:XE()}),n.for("editingDowncast").elementToElement({model:"paragraph",view:eD({asWidget:!0}),converterPriority:"high"}),n.for("dataDowncast").elementToElement({model:"paragraph",view:eD(),converterPriority:"high"}),n.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),n.for("upcast").attributeToAttribute({model:{key:"colspan",value:ZD("colspan")},view:"colspan"}),n.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),n.for("upcast").attributeToAttribute({model:{key:"rowspan",value:ZD("rowspan")},view:"rowspan"}),e.config.define("table.defaultHeadings.rows",0),e.config.define("table.defaultHeadings.columns",0),e.commands.add("insertTable",new oD(e)),e.commands.add("insertTableRowAbove",new nD(e,{order:"above"})),e.commands.add("insertTableRowBelow",new nD(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new iD(e,{order:"left"})),e.commands.add("insertTableColumnRight",new iD(e,{order:"right"})),e.commands.add("removeTableRow",new wD(e)),e.commands.add("removeTableColumn",new _D(e)),e.commands.add("splitTableCellVertically",new rD(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new rD(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new TD(e)),e.commands.add("mergeTableCellRight",new bD(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new bD(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new bD(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new bD(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new AD(e)),e.commands.add("setTableRowHeader",new yD(e)),e.commands.add("selectTableRow",new MD(e)),e.commands.add("selectTableColumn",new RD(e)),zD(t),LD(t),this.listenTo(t.document,"change:data",(()=>{!function(e,t){const o=e.document.differ;for(const e of o.getChanges()){let o,n=!1;if("attribute"==e.type){const t=e.range.start.nodeAfter;if(!t||!t.is("element","table"))continue;if("headingRows"!=e.attributeKey&&"headingColumns"!=e.attributeKey)continue;o=t,n="headingRows"==e.attributeKey}else"tableRow"!=e.name&&"tableCell"!=e.name||(o=e.position.findAncestor("table"),n="tableRow"==e.name);if(!o)continue;const i=o.getAttribute("headingRows")||0,r=o.getAttribute("headingColumns")||0,s=new JE(o);for(const e of s){const o=e.rowWD(e,t.mapper)));for(const e of o)t.reconvertItem(e)}}(t,e.editing)}))}registerAdditionalSlot(e){this._additionalSlots.push(e)}}function ZD(e){return t=>{const o=parseInt(t.getAttribute(e));return Number.isNaN(o)||o<=0?null:o}}var JD=i(8603),YD={attributes:{"data-cke":!0}};YD.setAttributes=Ar(),YD.insert=_r().bind(null,"head"),YD.domAPI=kr(),YD.insertStyleElement=vr();fr()(JD.A,YD);JD.A&&JD.A.locals&&JD.A.locals;class QD extends pm{constructor(e){super(e);const t=this.bindTemplate;this.items=this._createGridCollection(),this.keystrokes=new er,this.focusTracker=new Xi,this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",((e,t)=>`${t} × ${e}`)),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"mouseover@.ck-insert-table-dropdown-grid-box":t.to("boxover")},children:this.items},{tag:"div",attributes:{class:["ck","ck-insert-table-dropdown__label"],"aria-hidden":!0},children:[{text:t.to("label")}]}],on:{mousedown:t.to((e=>{e.preventDefault()})),click:t.to((()=>{this.fire("execute")}))}}),this.on("boxover",((e,t)=>{const{row:o,column:n}=t.target.dataset;this.items.get(10*(parseInt(o,10)-1)+(parseInt(n,10)-1)).focus()})),this.focusTracker.on("change:focusedElement",((e,t,o)=>{if(!o)return;const{row:n,column:i}=o.dataset;this.set({rows:parseInt(n),columns:parseInt(i)})})),this.on("change:columns",(()=>this._highlightGridBoxes())),this.on("change:rows",(()=>this._highlightGridBoxes()))}render(){super.render(),km({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:10,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection});for(const e of this.items)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element)}reset(){this.set({rows:1,columns:1})}focus(){this.items.get(0).focus()}focusLast(){this.items.get(0).focus()}_highlightGridBoxes(){const e=this.rows,t=this.columns;this.items.map(((o,n)=>{const i=Math.floor(n/10){const n=e.commands.get("insertTable"),i=Eg(o);let r;return i.bind("isEnabled").to(n),i.buttonView.set({icon:qh.table,label:t("Insert table"),tooltip:!0}),i.on("change:isOpen",(()=>{r||(r=new QD(o),i.panelView.children.add(r),r.delegate("execute").to(i),i.on("execute",(()=>{e.execute("insertTable",{rows:r.rows,columns:r.columns}),e.editing.view.focus()})))})),i})),e.ui.componentFactory.add("menuBar:insertTable",(o=>{const n=e.commands.get("insertTable"),i=new mk(o),r=new QD(o);return r.delegate("execute").to(i),i.on("change:isOpen",((e,t,o)=>{o||r.reset()})),r.on("execute",(()=>{e.execute("insertTable",{rows:r.rows,columns:r.columns}),e.editing.view.focus()})),i.buttonView.set({label:t("Table"),icon:qh.table}),i.panelView.children.add(r),i.bind("isEnabled").to(n),i})),e.ui.componentFactory.add("tableColumn",(e=>{const n=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:t("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:o?"insertTableColumnLeft":"insertTableColumnRight",label:t("Insert column left")}},{type:"button",model:{commandName:o?"insertTableColumnRight":"insertTableColumnLeft",label:t("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:t("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:t("Select column")}}];return this._prepareDropdown(t("Column"),' ',n,e)})),e.ui.componentFactory.add("tableRow",(e=>{const o=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:t("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:t("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:t("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:t("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:t("Select row")}}];return this._prepareDropdown(t("Row"),' ',o,e)})),e.ui.componentFactory.add("mergeTableCells",(e=>{const n=[{type:"button",model:{commandName:"mergeTableCellUp",label:t("Merge cell up")}},{type:"button",model:{commandName:o?"mergeTableCellRight":"mergeTableCellLeft",label:t("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:t("Merge cell down")}},{type:"button",model:{commandName:o?"mergeTableCellLeft":"mergeTableCellRight",label:t("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:t("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:t("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(t("Merge cells"),' ',n,e)}))}_prepareDropdown(e,t,o,n){const i=this.editor,r=Eg(n),s=this._fillDropdownWithListOptions(r,o);return r.buttonView.set({label:e,icon:t,tooltip:!0}),r.bind("isEnabled").toMany(s,"isEnabled",((...e)=>e.some((e=>e)))),this.listenTo(r,"execute",(e=>{i.execute(e.source.commandName),e.source instanceof bp||i.editing.view.focus()})),r}_prepareMergeSplitButtonDropdown(e,t,o,n){const i=this.editor,r=Eg(n,yg),s="mergeTableCells",a=i.commands.get(s),l=this._fillDropdownWithListOptions(r,o);return r.buttonView.set({label:e,icon:t,tooltip:!0,isEnabled:!0}),r.bind("isEnabled").toMany([a,...l],"isEnabled",((...e)=>e.some((e=>e)))),this.listenTo(r.buttonView,"execute",(()=>{i.execute(s),i.editing.view.focus()})),this.listenTo(r,"execute",(e=>{i.execute(e.source.commandName),i.editing.view.focus()})),r}_fillDropdownWithListOptions(e,t){const o=this.editor,n=[],i=new Yi;for(const e of t)eB(e,o,n,i);return Sg(e,i),n}}function eB(e,t,o,n){if("button"===e.type||"switchbutton"===e.type){const n=e.model=new Db(e.model),{commandName:i,bindIsOn:r}=e.model,s=t.commands.get(i);o.push(s),n.set({commandName:i}),n.bind("isEnabled").to(s),r&&n.bind("isOn").to(s,"value"),n.set({withText:!0})}n.add(e)}var tB=i(2850),oB={attributes:{"data-cke":!0}};oB.setAttributes=Ar(),oB.insert=_r().bind(null,"head"),oB.domAPI=kr(),oB.insertStyleElement=vr();fr()(tB.A,oB);tB.A&&tB.A.locals&&tB.A.locals;class nB extends lr{static get pluginName(){return"TableSelection"}static get requires(){return[xD,xD]}init(){const e=this.editor,t=e.model,o=e.editing.view;this.listenTo(t,"deleteContent",((e,t)=>this._handleDeleteContent(e,t)),{priority:"high"}),this.listenTo(o.document,"insertText",((e,t)=>this._handleInsertTextEvent(e,t)),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const e=this.editor.plugins.get(xD),t=this.editor.model.document.selection,o=e.getSelectedTableCells(t);return 0==o.length?null:o}getSelectionAsFragment(){const e=this.editor.plugins.get(xD),t=this.getSelectedTableCells();return t?this.editor.model.change((o=>{const n=o.createDocumentFragment(),{first:i,last:r}=e.getColumnIndexes(t),{first:s,last:a}=e.getRowIndexes(t),l=t[0].findAncestor("table");let c=a,d=r;if(e.isSelectionRectangular(t)){const e={firstColumn:i,lastColumn:r,firstRow:s,lastRow:a};c=gD(l,e),d=fD(l,e)}const u=sD(l,{startRow:s,startColumn:i,endRow:c,endColumn:d},o);return o.insert(u,n,0),n})):null}setCellSelection(e,t){const o=this._getCellsToSelect(e,t);this.editor.model.change((e=>{e.setSelection(o.cells.map((t=>e.createRangeOn(t))),{backward:o.backward})}))}getFocusCell(){const e=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return e&&e.is("element","tableCell")?e:null}getAnchorCell(){const e=Qi(this.editor.model.document.selection.getRanges()).getContainedElement();return e&&e.is("element","tableCell")?e:null}_defineSelectionConverter(){const e=this.editor,t=new Set;e.conversion.for("editingDowncast").add((e=>e.on("selection",((e,o,n)=>{const i=n.writer;!function(e){for(const o of t)e.removeClass("ck-editor__editable_selected",o);t.clear()}(i);const r=this.getSelectedTableCells();if(!r)return;for(const e of r){const o=n.mapper.toViewElement(e);i.addClass("ck-editor__editable_selected",o),t.add(o)}const s=n.mapper.toViewElement(r[r.length-1]);i.setSelection(s,0)}),{priority:"lowest"})))}_enablePluginDisabling(){const e=this.editor;this.on("change:isEnabled",(()=>{if(!this.isEnabled){const t=this.getSelectedTableCells();if(!t)return;e.model.change((o=>{const n=o.createPositionAt(t[0],0),i=e.model.schema.getNearestSelectionRange(n);o.setSelection(i)}))}}))}_handleDeleteContent(e,t){const o=this.editor.plugins.get(xD),n=t[0],i=t[1],r=this.editor.model,s=!i||"backward"==i.direction,a=o.getSelectedTableCells(n);a.length&&(e.stop(),r.change((e=>{const t=a[s?a.length-1:0];r.change((e=>{for(const t of a)r.deleteContent(e.createSelection(t,"in"))}));const o=r.schema.getNearestSelectionRange(e.createPositionAt(t,0));n.is("documentSelection")?e.setSelection(o):n.setTo(o)})))}_handleInsertTextEvent(e,t){const o=this.editor,n=this.getSelectedTableCells();if(!n)return;const i=o.editing.view,r=o.editing.mapper,s=n.map((e=>i.createRangeOn(r.toViewElement(e))));t.selection=i.createSelection(s)}_getCellsToSelect(e,t){const o=this.editor.plugins.get("TableUtils"),n=o.getCellLocation(e),i=o.getCellLocation(t),r=Math.min(n.row,i.row),s=Math.max(n.row,i.row),a=Math.min(n.column,i.column),l=Math.max(n.column,i.column),c=new Array(s-r+1).fill(null).map((()=>[])),d={startRow:r,endRow:s,startColumn:a,endColumn:l};for(const{row:t,cell:o}of new JE(e.findAncestor("table"),d))c[t-r].push(o);const u=i.rowe.reverse())),{cells:c.flat(),backward:u||h}}}class iB extends lr{static get pluginName(){return"TableClipboard"}static get requires(){return[H_,j_,nB,xD]}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"copy",((e,t)=>this._onCopyCut(e,t))),this.listenTo(t,"cut",((e,t)=>this._onCopyCut(e,t))),this.listenTo(e.model,"insertContent",((e,[t,o])=>this._onInsertContent(e,t,o)),{priority:"high"}),this.decorate("_replaceTableSlotCell")}_onCopyCut(e,t){const o=this.editor.editing.view,n=this.editor.plugins.get(nB),i=this.editor.plugins.get(H_);n.getSelectedTableCells()&&("cut"!=e.name||this.editor.model.canEditAt(this.editor.model.document.selection))&&(t.preventDefault(),e.stop(),this.editor.model.enqueueChange({isUndoable:"cut"===e.name},(()=>{const r=i._copySelectedFragmentWithMarkers(e.name,this.editor.model.document.selection,(()=>n.getSelectionAsFragment()));o.document.fire("clipboardOutput",{dataTransfer:t.dataTransfer,content:this.editor.data.toView(r),method:e.name})})))}_onInsertContent(e,t,o){if(o&&!o.is("documentSelection"))return;const n=this.editor.model,i=this.editor.plugins.get(xD),r=this.editor.plugins.get(H_),s=this.getTableIfOnlyTableInContent(t,n);if(!s)return;const a=i.getSelectionAffectedTableCells(n.document.selection);a.length?(e.stop(),t.is("documentFragment")?r._pasteMarkersIntoTransformedElement(t.markers,(e=>this._replaceSelectedCells(s,a,e))):this.editor.model.change((e=>{this._replaceSelectedCells(s,a,e)}))):pD(s,i)}_replaceSelectedCells(e,t,o){const n=this.editor.plugins.get(xD),i={width:n.getColumns(e),height:n.getRows(e)},r=function(e,t,o,n){const i=e[0].findAncestor("table"),r=n.getColumnIndexes(e),s=n.getRowIndexes(e),a={firstColumn:r.first,lastColumn:r.last,firstRow:s.first,lastRow:s.last},l=1===e.length;l&&(a.lastRow+=t.height-1,a.lastColumn+=t.width-1,function(e,t,o,n){const i=n.getColumns(e),r=n.getRows(e);o>i&&n.insertColumns(e,{at:i,columns:o-i});t>r&&n.insertRows(e,{at:r,rows:t-r})}(i,a.lastRow+1,a.lastColumn+1,n));l||!n.isSelectionRectangular(e)?function(e,t,o){const{firstRow:n,lastRow:i,firstColumn:r,lastColumn:s}=t,a={first:n,last:i},l={first:r,last:s};sB(e,r,a,o),sB(e,s+1,a,o),rB(e,n,l,o),rB(e,i+1,l,o,n)}(i,a,o):(a.lastRow=gD(i,a),a.lastColumn=fD(i,a));return a}(t,i,o,n),s=r.lastRow-r.firstRow+1,a=r.lastColumn-r.firstColumn+1;e=sD(e,{startRow:0,startColumn:0,endRow:Math.min(s,i.height)-1,endColumn:Math.min(a,i.width)-1},o);const l=t[0].findAncestor("table"),c=this._replaceSelectedCellsWithPasted(e,i,l,r,o);if(this.editor.plugins.get("TableSelection").isEnabled){const e=n.sortRanges(c.map((e=>o.createRangeOn(e))));o.setSelection(e)}else o.setSelection(c[0],0);return l}_replaceSelectedCellsWithPasted(e,t,o,n,i){const{width:r,height:s}=t,a=function(e,t,o){const n=new Array(o).fill(null).map((()=>new Array(t).fill(null)));for(const{column:t,row:o,cell:i}of new JE(e))n[o][t]=i;return n}(e,r,s),l=[...new JE(o,{startRow:n.firstRow,endRow:n.lastRow,startColumn:n.firstColumn,endColumn:n.lastColumn,includeAllSlots:!0})],c=[];let d;for(const e of l){const{row:t,column:o}=e;o===n.firstColumn&&(d=e.getPositionBefore());const l=t-n.firstRow,u=o-n.firstColumn,h=a[l%s][u%r],m=h?i.cloneElement(h):null,p=this._replaceTableSlotCell(e,m,d,i);p&&(uD(p,t,o,n.lastRow,n.lastColumn,i),c.push(p),d=i.createPositionAfter(p))}const u=parseInt(o.getAttribute("headingRows")||"0"),h=parseInt(o.getAttribute("headingColumns")||"0"),m=n.firstRowaB(e,t,o))).map((({cell:e})=>lD(e,t,n)))}function sB(e,t,o,n){if(t<1)return;return cD(e,t).filter((({row:e,cellHeight:t})=>aB(e,t,o))).map((({cell:e,column:o})=>dD(e,o,t,n)))}function aB(e,t,o){const n=e+t-1,{first:i,last:r}=o;return e>=i&&e<=r||e=i}class lB extends lr{static get pluginName(){return"TableKeyboard"}static get requires(){return[nB,xD]}init(){const e=this.editor,t=e.editing.view.document,o=e.t;this.listenTo(t,"arrowKey",((...e)=>this._onArrowKey(...e)),{context:"table"}),this.listenTo(t,"tab",((...e)=>this._handleTabOnSelectedTable(...e)),{context:"figure"}),this.listenTo(t,"tab",((...e)=>this._handleTab(...e)),{context:["th","td"]}),e.accessibility.addKeystrokeInfoGroup({id:"table",label:o("Keystrokes that can be used in a table cell"),keystrokes:[{label:o("Move the selection to the next cell"),keystroke:"Tab"},{label:o("Move the selection to the previous cell"),keystroke:"Shift+Tab"},{label:o("Insert a new table row (when in the last cell of a table)"),keystroke:"Tab"},{label:o("Navigate through the table"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]}]})}_handleTabOnSelectedTable(e,t){const o=this.editor,n=o.model.document.selection.getSelectedElement();n&&n.is("element","table")&&(t.preventDefault(),t.stopPropagation(),e.stop(),o.model.change((e=>{e.setSelection(e.createRangeIn(n.getChild(0).getChild(0)))})))}_handleTab(e,t){const o=this.editor,n=this.editor.plugins.get(xD),i=this.editor.plugins.get("TableSelection"),r=o.model.document.selection,s=!t.shiftKey;let a=n.getTableCellsContainingSelection(r)[0];if(a||(a=i.getFocusCell()),!a)return;t.preventDefault(),t.stopPropagation(),e.stop();const l=a.parent,c=l.parent,d=c.getChildIndex(l),u=l.getChildIndex(a),h=0===u;if(!s&&h&&0===d)return void o.model.change((e=>{e.setSelection(e.createRangeOn(c))}));const m=u===l.childCount-1,p=d===n.getRows(c)-1;if(s&&p&&m&&(o.execute("insertTableRowBelow"),d===n.getRows(c)-1))return void o.model.change((e=>{e.setSelection(e.createRangeOn(c))}));let g;if(s&&m){const e=c.getChild(d+1);g=e.getChild(0)}else if(!s&&h){const e=c.getChild(d-1);g=e.getChild(e.childCount-1)}else g=l.getChild(u+(s?1:-1));o.model.change((e=>{e.setSelection(e.createRangeIn(g))}))}_onArrowKey(e,t){const o=this.editor,n=Ci(t.keyCode,o.locale.contentLanguageDirection);this._handleArrowKeys(n,t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),e.stop())}_handleArrowKeys(e,t){const o=this.editor.plugins.get(xD),n=this.editor.plugins.get("TableSelection"),i=this.editor.model,r=i.document.selection,s=["right","down"].includes(e),a=o.getSelectedTableCells(r);if(a.length){let o;return o=t?n.getFocusCell():s?a[a.length-1]:a[0],this._navigateFromCellInDirection(o,e,t),!0}const l=r.focus.findAncestor("tableCell");if(!l)return!1;if(!r.isCollapsed)if(t){if(r.isBackward==s&&!r.containsEntireContent(l))return!1}else{const e=r.getSelectedElement();if(!e||!i.schema.isObject(e))return!1}return!!this._isSelectionAtCellEdge(r,l,s)&&(this._navigateFromCellInDirection(l,e,t),!0)}_isSelectionAtCellEdge(e,t,o){const n=this.editor.model,i=this.editor.model.schema,r=o?e.getLastPosition():e.getFirstPosition();if(!i.getLimitElement(r).is("element","tableCell")){return n.createPositionAt(t,o?"end":0).isTouching(r)}const s=n.createSelection(r);return n.modifySelection(s,{direction:o?"forward":"backward"}),r.isEqual(s.focus)}_navigateFromCellInDirection(e,t,o=!1){const n=this.editor.model,i=e.findAncestor("table"),r=[...new JE(i,{includeAllSlots:!0})],{row:s,column:a}=r[r.length-1],l=r.find((({cell:t})=>t==e));let{row:c,column:d}=l;switch(t){case"left":d--;break;case"up":c--;break;case"right":d+=l.cellWidth;break;case"down":c+=l.cellHeight}if(c<0||c>s||d<0&&c<=0||d>a&&c>=s)return void n.change((e=>{e.setSelection(e.createRangeOn(i))}));d<0?(d=o?0:a,c--):d>a&&(d=o?a:0,c++);const u=r.find((e=>e.row==c&&e.column==d)).cell,h=["right","down"].includes(t),m=this.editor.plugins.get("TableSelection");if(o&&m.isEnabled){const t=m.getAnchorCell()||e;m.setCellSelection(t,u)}else{const e=n.createPositionAt(u,h?0:"end");n.change((t=>{t.setSelection(e)}))}}}class cB extends La{constructor(){super(...arguments),this.domEventType=["mousemove","mouseleave"]}onDomEvent(e){this.fire(e.type,e)}}class dB extends lr{static get pluginName(){return"TableMouse"}static get requires(){return[nB,xD]}init(){this.editor.editing.view.addObserver(cB),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const e=this.editor,t=e.plugins.get(xD);let o=!1;const n=e.plugins.get(nB);this.listenTo(e.editing.view.document,"mousedown",((i,r)=>{const s=e.model.document.selection;if(!this.isEnabled||!n.isEnabled)return;if(!r.domEvent.shiftKey)return;const a=n.getAnchorCell()||t.getTableCellsContainingSelection(s)[0];if(!a)return;const l=this._getModelTableCellFromDomEvent(r);l&&uB(a,l)&&(o=!0,n.setCellSelection(a,l),r.preventDefault())})),this.listenTo(e.editing.view.document,"mouseup",(()=>{o=!1})),this.listenTo(e.editing.view.document,"selectionChange",(e=>{o&&e.stop()}),{priority:"highest"})}_enableMouseDragSelection(){const e=this.editor;let t,o,n=!1,i=!1;const r=e.plugins.get(nB);this.listenTo(e.editing.view.document,"mousedown",((e,o)=>{this.isEnabled&&r.isEnabled&&(o.domEvent.shiftKey||o.domEvent.ctrlKey||o.domEvent.altKey||(t=this._getModelTableCellFromDomEvent(o)))})),this.listenTo(e.editing.view.document,"mousemove",((e,s)=>{if(!s.domEvent.buttons)return;if(!t)return;const a=this._getModelTableCellFromDomEvent(s);a&&uB(t,a)&&(o=a,n||o==t||(n=!0)),n&&(i=!0,r.setCellSelection(t,o),s.preventDefault())})),this.listenTo(e.editing.view.document,"mouseup",(()=>{n=!1,i=!1,t=null,o=null})),this.listenTo(e.editing.view.document,"selectionChange",(e=>{i&&e.stop()}),{priority:"highest"})}_getModelTableCellFromDomEvent(e){const t=e.target,o=this.editor.editing.view.createPositionAt(t,0);return this.editor.editing.mapper.toModelPosition(o).parent.findAncestor("tableCell",{includeSelf:!0})}}function uB(e,t){return e.parent.parent==t.parent.parent}var hB=i(9969),mB={attributes:{"data-cke":!0}};mB.setAttributes=Ar(),mB.insert=_r().bind(null,"head"),mB.domAPI=kr(),mB.insertStyleElement=vr();fr()(hB.A,mB);hB.A&&hB.A.locals&&hB.A.locals;function pB(e){const t=gB(e);return t||fB(e)}function gB(e){const t=e.getSelectedElement();return t&&bB(t)?t:null}function fB(e){const t=e.getFirstPosition();if(!t)return null;let o=t.parent;for(;o;){if(o.is("element")&&bB(o))return o;o=o.parent}return null}function bB(e){return!!e.getCustomProperty("table")&&Rk(e)}var kB=i(4307),wB={attributes:{"data-cke":!0}};wB.setAttributes=Ar(),wB.insert=_r().bind(null,"head"),wB.domAPI=kr(),wB.insertStyleElement=vr();fr()(kB.A,wB);kB.A&&kB.A.locals&&kB.A.locals;class _B extends pm{constructor(e,t){super(e),this.set("value",""),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isEmpty",!0),this.options=t,this.focusTracker=new Xi,this._focusables=new Uh,this.dropdownView=this._createDropdownView(),this.inputView=this._createInputTextView(),this.keystrokes=new er,this._stillTyping=!1,this.focusCycler=new Im({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-input-color"]},children:[this.dropdownView,this.inputView]}),this.on("change:value",((e,t,o)=>this._setInputValue(o)))}render(){super.render(),[this.inputView,this.dropdownView.buttonView].forEach((e=>{this.focusTracker.add(e.element),this._focusables.add(e)})),this.keystrokes.listenTo(this.element)}focus(e){-1===e?this.focusCycler.focusLast():this.focusCycler.focusFirst()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createDropdownView(){const e=this.locale,t=e.t,o=this.bindTemplate,n=this._createColorSelector(e),i=Eg(e),r=new pm;return r.setTemplate({tag:"span",attributes:{class:["ck","ck-input-color__button__preview"],style:{backgroundColor:o.to("value")}},children:[{tag:"span",attributes:{class:["ck","ck-input-color__button__preview__no-color-indicator",o.if("value","ck-hidden",(e=>""!=e))]}}]}),i.buttonView.extendTemplate({attributes:{class:"ck-input-color__button"}}),i.buttonView.children.add(r),i.buttonView.label=t("Color picker"),i.buttonView.tooltip=!0,i.panelPosition="rtl"===e.uiLanguageDirection?"se":"sw",i.panelView.children.add(n),i.bind("isEnabled").to(this,"isReadOnly",(e=>!e)),i.on("change:isOpen",((e,t,o)=>{o&&(n.updateSelectedColors(),n.showColorGridsFragment())})),i}_createInputTextView(){const e=this.locale,t=new Gp(e);return t.extendTemplate({on:{blur:t.bindTemplate.to("blur")}}),t.value=this.value,t.bind("isReadOnly","hasError").to(this),this.bind("isFocused","isEmpty").to(t),t.on("input",(()=>{const e=t.element.value,o=this.options.colorDefinitions.find((t=>e===t.label));this._stillTyping=!0,this.value=o&&o.color||e})),t.on("blur",(()=>{this._stillTyping=!1,this._setInputValue(t.element.value)})),t.delegate("input").to(this),t}_createColorSelector(e){const t=e.t,o=this.options.defaultColorValue||"",n=t(o?"Restore default":"Remove color"),i=new xf(e,{colors:this.options.colorDefinitions,columns:this.options.columns,removeButtonLabel:n,colorPickerLabel:t("Color picker"),colorPickerViewConfig:!1!==this.options.colorPickerConfig&&{...this.options.colorPickerConfig,hideInput:!0}});i.appendUI(),i.on("execute",((e,t)=>{"colorPickerSaveButton"!==t.source?(this.value=t.value||o,this.fire("input"),"colorPicker"!==t.source&&(this.dropdownView.isOpen=!1)):this.dropdownView.isOpen=!1}));let r=this.value;return i.on("colorPicker:cancel",(()=>{this.value=r,this.fire("input"),this.dropdownView.isOpen=!1})),i.colorGridsFragmentView.colorPickerButtonView.on("execute",(()=>{r=this.value})),i.bind("selectedColor").to(this,"value"),i}_setInputValue(e){if(!this._stillTyping){const t=yB(e),o=this.options.colorDefinitions.find((e=>t===yB(e.color)));this.inputView.value=o?o.label:e||""}}}function yB(e){return e.replace(/([(,])\s+/g,"$1").replace(/^\s+|\s+(?=[),\s]|$)/g,"").replace(/,|\s/g," ")}const AB=e=>""===e;function CB(e){return{none:e("None"),solid:e("Solid"),dotted:e("Dotted"),dashed:e("Dashed"),double:e("Double"),groove:e("Groove"),ridge:e("Ridge"),inset:e("Inset"),outset:e("Outset")}}function vB(e){return e('The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".')}function xB(e){return e('The value is invalid. Try "10px" or "2em" or simply "2".')}function EB(e){return e=e.trim().toLowerCase(),AB(e)||Ku(e)}function DB(e){return e=e.trim(),AB(e)||FB(e)||Qu(e)||(t=e,Xu.test(t));var t}function BB(e){return e=e.trim(),AB(e)||FB(e)||Qu(e)}function SB(e,t){const o=new Yi,n=CB(e.t);for(const i in n){const r={type:"button",model:new Db({_borderStyleValue:i,label:n[i],role:"menuitemradio",withText:!0})};"none"===i?r.model.bind("isOn").to(e,"borderStyle",(e=>"none"===t?!e:e===i)):r.model.bind("isOn").to(e,"borderStyle",(e=>e===i)),o.add(r)}return o}function TB(e){const{view:t,icons:o,toolbar:n,labels:i,propertyName:r,nameToValue:s,defaultValue:a}=e;for(const e in i){const l=new Em(t.locale);l.set({label:i[e],icon:o[e],tooltip:i[e]});const c=s?s(e):e;l.bind("isOn").to(t,r,(e=>{let t=e;return""===e&&a&&(t=a),c===t})),l.on("execute",(()=>{t[r]=c})),n.items.add(l)}}const IB=[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}];function PB(e){return(t,o,n)=>{const i=new _B(t.locale,{colorDefinitions:(r=e.colorConfig,r.map((e=>({color:e.model,label:e.label,options:{hasBorder:e.hasBorder}})))),columns:e.columns,defaultColorValue:e.defaultColorValue,colorPickerConfig:e.colorPickerConfig});var r;return i.inputView.set({id:o,ariaDescribedById:n}),i.bind("isReadOnly").to(t,"isEnabled",(e=>!e)),i.bind("hasError").to(t,"errorText",(e=>!!e)),i.on("input",(()=>{t.errorText=null})),t.bind("isEmpty","isFocused").to(i),i}}function FB(e){const t=parseFloat(e);return!Number.isNaN(t)&&e===String(t)}var MB=i(6016),RB={attributes:{"data-cke":!0}};RB.setAttributes=Ar(),RB.insert=_r().bind(null,"head"),RB.domAPI=kr(),RB.insertStyleElement=vr();fr()(MB.A,RB);MB.A&&MB.A.locals&&MB.A.locals;class zB extends pm{constructor(e,t={}){super(e);const o=this.bindTemplate;this.set("class",t.class||null),this.children=this.createCollection(),t.children&&t.children.forEach((e=>this.children.add(e))),this.set("_role",null),this.set("_ariaLabelledBy",null),t.labelView&&this.set({_role:"group",_ariaLabelledBy:t.labelView.id}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",o.to("class")],role:o.to("_role"),"aria-labelledby":o.to("_ariaLabelledBy")},children:this.children})}}var VB=i(1806),OB={attributes:{"data-cke":!0}};OB.setAttributes=Ar(),OB.insert=_r().bind(null,"head"),OB.domAPI=kr(),OB.insertStyleElement=vr();fr()(VB.A,OB);VB.A&&VB.A.locals&&VB.A.locals;var NB=i(5704),LB={attributes:{"data-cke":!0}};LB.setAttributes=Ar(),LB.insert=_r().bind(null,"head"),LB.domAPI=kr(),LB.insertStyleElement=vr();fr()(NB.A,LB);NB.A&&NB.A.locals&&NB.A.locals;var HB=i(6701),jB={attributes:{"data-cke":!0}};jB.setAttributes=Ar(),jB.insert=_r().bind(null,"head"),jB.domAPI=kr(),jB.insertStyleElement=vr();fr()(HB.A,jB);HB.A&&HB.A.locals&&HB.A.locals;class qB extends pm{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",padding:"",backgroundColor:"",width:"",height:"",horizontalAlignment:"",verticalAlignment:""}),this.options=t;const{borderStyleDropdown:o,borderWidthInput:n,borderColorInput:i,borderRowLabel:r}=this._createBorderFields(),{backgroundRowLabel:s,backgroundInput:a}=this._createBackgroundFields(),{widthInput:l,operatorLabel:c,heightInput:d,dimensionsLabel:u}=this._createDimensionFields(),{horizontalAlignmentToolbar:h,verticalAlignmentToolbar:m,alignmentLabel:p}=this._createAlignmentFields();this.focusTracker=new Xi,this.keystrokes=new er,this.children=this.createCollection(),this.borderStyleDropdown=o,this.borderWidthInput=n,this.borderColorInput=i,this.backgroundInput=a,this.paddingInput=this._createPaddingField(),this.widthInput=l,this.heightInput=d,this.horizontalAlignmentToolbar=h,this.verticalAlignmentToolbar=m;const{saveButtonView:g,cancelButtonView:f}=this._createActionButtons();this.saveButtonView=g,this.cancelButtonView=f,this._focusables=new Uh,this._focusCycler=new Im({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Tm(e,{label:this.t("Cell properties")})),this.children.add(new zB(e,{labelView:r,children:[r,o,i,n],class:"ck-table-form__border-row"})),this.children.add(new zB(e,{labelView:s,children:[s,a],class:"ck-table-form__background-row"})),this.children.add(new zB(e,{children:[new zB(e,{labelView:u,children:[u,l,c,d],class:"ck-table-form__dimensions-row"}),new zB(e,{children:[this.paddingInput],class:"ck-table-cell-properties-form__padding-row"})]})),this.children.add(new zB(e,{labelView:p,children:[p,h,m],class:"ck-table-cell-properties-form__alignment-row"})),this.children.add(new zB(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-cell-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),bm({view:this}),[this.borderColorInput,this.backgroundInput].forEach((e=>{this._focusCycler.chain(e.fieldView.focusCycler)})),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.paddingInput,this.horizontalAlignmentToolbar,this.verticalAlignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableCellProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},o=PB({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),n=this.locale,i=this.t,r=i("Style"),s=new ap(n);s.text=i("Border");const a=CB(i),l=new jp(n,Rg);l.set({label:r,class:"ck-table-form__border-style"}),l.fieldView.buttonView.set({ariaLabel:r,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:r}),l.fieldView.buttonView.bind("label").to(this,"borderStyle",(e=>a[e||"none"])),l.fieldView.on("execute",(e=>{this.borderStyle=e.source._borderStyleValue})),l.bind("isEmpty").to(this,"borderStyle",(e=>!e)),Sg(l.fieldView,SB(this,t.style),{role:"menu",ariaLabel:r});const c=new jp(n,Fg);c.set({label:i("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",UB),c.fieldView.on("input",(()=>{this.borderWidth=c.fieldView.element.value}));const d=new jp(n,o);return d.set({label:i("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",UB),d.fieldView.on("input",(()=>{this.borderColor=d.fieldView.value})),this.on("change:borderStyle",((e,o,n,i)=>{UB(n)||(this.borderColor="",this.borderWidth=""),UB(i)||(this.borderColor=t.color,this.borderWidth=t.width)})),{borderRowLabel:s,borderStyleDropdown:l,borderColorInput:d,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,t=this.t,o=new ap(e);o.text=t("Background");const n=PB({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableCellProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),i=new jp(e,n);return i.set({label:t("Color"),class:"ck-table-cell-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",(()=>{this.backgroundColor=i.fieldView.value})),{backgroundRowLabel:o,backgroundInput:i}}_createDimensionFields(){const e=this.locale,t=this.t,o=new ap(e);o.text=t("Dimensions");const n=new jp(e,Fg);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",(()=>{this.width=n.fieldView.element.value}));const i=new pm(e);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const r=new jp(e,Fg);return r.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),r.fieldView.bind("value").to(this,"height"),r.fieldView.on("input",(()=>{this.height=r.fieldView.element.value})),{dimensionsLabel:o,widthInput:n,operatorLabel:i,heightInput:r}}_createPaddingField(){const e=this.locale,t=this.t,o=new jp(e,Fg);return o.set({label:t("Padding"),class:"ck-table-cell-properties-form__padding"}),o.fieldView.bind("value").to(this,"padding"),o.fieldView.on("input",(()=>{this.padding=o.fieldView.element.value})),o}_createAlignmentFields(){const e=this.locale,t=this.t,o=new ap(e),n={left:qh.alignLeft,center:qh.alignCenter,right:qh.alignRight,justify:qh.alignJustify,top:qh.alignTop,middle:qh.alignMiddle,bottom:qh.alignBottom};o.text=t("Table cell text alignment");const i=new cg(e),r="rtl"===e.contentLanguageDirection;i.set({isCompact:!0,ariaLabel:t("Horizontal text alignment toolbar")}),TB({view:this,icons:n,toolbar:i,labels:this._horizontalAlignmentLabels,propertyName:"horizontalAlignment",nameToValue:e=>{if(r){if("left"===e)return"right";if("right"===e)return"left"}return e},defaultValue:this.options.defaultTableCellProperties.horizontalAlignment});const s=new cg(e);return s.set({isCompact:!0,ariaLabel:t("Vertical text alignment toolbar")}),TB({view:this,icons:n,toolbar:s,labels:this._verticalAlignmentLabels,propertyName:"verticalAlignment",defaultValue:this.options.defaultTableCellProperties.verticalAlignment}),{horizontalAlignmentToolbar:i,verticalAlignmentToolbar:s,alignmentLabel:o}}_createActionButtons(){const e=this.locale,t=this.t,o=new Em(e),n=new Em(e),i=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];return o.set({label:t("Save"),icon:qh.check,class:"ck-button-save",type:"submit",withText:!0}),o.bind("isEnabled").toMany(i,"errorText",((...e)=>e.every((e=>!e)))),n.set({label:t("Cancel"),icon:qh.cancel,class:"ck-button-cancel",withText:!0}),n.delegate("execute").to(this,"cancel"),{saveButtonView:o,cancelButtonView:n}}get _horizontalAlignmentLabels(){const e=this.locale,t=this.t,o=t("Align cell text to the left"),n=t("Align cell text to the center"),i=t("Align cell text to the right"),r=t("Justify cell text");return"rtl"===e.uiLanguageDirection?{right:i,center:n,left:o,justify:r}:{left:o,center:n,right:i,justify:r}}get _verticalAlignmentLabels(){const e=this.t;return{top:e("Align cell text to the top"),middle:e("Align cell text to the middle"),bottom:e("Align cell text to the bottom")}}}function UB(e){return"none"!==e}const WB=(()=>[Ff.defaultPositions.northArrowSouth,Ff.defaultPositions.northArrowSouthWest,Ff.defaultPositions.northArrowSouthEast,Ff.defaultPositions.southArrowNorth,Ff.defaultPositions.southArrowNorthWest,Ff.defaultPositions.southArrowNorthEast,Ff.defaultPositions.viewportStickyNorth])();function $B(e,t){const o=e.plugins.get("ContextualBalloon"),n=e.editing.view.document.selection;let i;"cell"===t?fB(n)&&(i=KB(e)):pB(n)&&(i=GB(e)),i&&o.updatePosition(i)}function GB(e){const t=$E(e.model.document.selection),o=e.editing.mapper.toViewElement(t);return{target:e.editing.view.domConverter.mapViewToDom(o),positions:WB}}function KB(e){const t=e.editing.mapper,o=e.editing.view.domConverter,n=e.model.document.selection;if(n.rangeCount>1)return{target:()=>function(e,t){const o=t.editing.mapper,n=t.editing.view.domConverter,i=Array.from(e).map((e=>{const t=ZB(e.start),i=o.toViewElement(t);return new qn(n.mapViewToDom(i))}));return qn.getBoundingRect(i)}(n.getRanges(),e),positions:WB};const i=ZB(n.getFirstPosition()),r=t.toViewElement(i);return{target:o.mapViewToDom(r),positions:WB}}function ZB(e){return e.nodeAfter&&e.nodeAfter.is("element","tableCell")?e.nodeAfter:e.findAncestor("tableCell")}function JB(e){if(!e||!U(e))return e;const{top:t,right:o,bottom:n,left:i}=e;return t==o&&o==n&&n==i?t:void 0}function YB(e,t){const o=parseFloat(e);return Number.isNaN(o)||String(o)!==String(e)?e:`${o}${t}`}function QB(e,t={}){const o={borderStyle:"none",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",...e};return t.includeAlignmentProperty&&!o.alignment&&(o.alignment="center"),t.includePaddingProperty&&!o.padding&&(o.padding=""),t.includeVerticalAlignmentProperty&&!o.verticalAlignment&&(o.verticalAlignment="middle"),t.includeHorizontalAlignmentProperty&&!o.horizontalAlignment&&(o.horizontalAlignment=t.isRightToLeftContent?"right":"left"),o}const XB={borderStyle:"tableCellBorderStyle",borderColor:"tableCellBorderColor",borderWidth:"tableCellBorderWidth",height:"tableCellHeight",width:"tableCellWidth",padding:"tableCellPadding",backgroundColor:"tableCellBackgroundColor",horizontalAlignment:"tableCellHorizontalAlignment",verticalAlignment:"tableCellVerticalAlignment"};class eS extends lr{static get requires(){return[Fb]}static get pluginName(){return"TableCellPropertiesUI"}constructor(e){super(e),e.config.define("table.tableCellProperties",{borderColors:IB,backgroundColors:IB})}init(){const e=this.editor,t=e.t;this._defaultTableCellProperties=QB(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection}),this._balloon=e.plugins.get(Fb),this.view=null,this._isReady=!1,e.ui.componentFactory.add("tableCellProperties",(o=>{const n=new Em(o);n.set({label:t("Cell properties"),icon:' ',tooltip:!0}),this.listenTo(n,"execute",(()=>this._showView()));const i=Object.values(XB).map((t=>e.commands.get(t)));return n.bind("isEnabled").toMany(i,"isEnabled",((...e)=>e.some((e=>e)))),n}))}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(){const e=this.editor,t=e.config.get("table.tableCellProperties"),o=Dp(t.borderColors),n=Ep(e.locale,o),i=Dp(t.backgroundColors),r=Ep(e.locale,i),s=!1!==t.colorPicker,a=new qB(e.locale,{borderColors:n,backgroundColors:r,defaultTableCellProperties:this._defaultTableCellProperties,colorPickerConfig:!!s&&(t.colorPicker||{})}),l=e.t;a.render(),this.listenTo(a,"submit",(()=>{this._hideView()})),this.listenTo(a,"cancel",(()=>{this._undoStepBatch.operations.length&&e.execute("undo",this._undoStepBatch),this._hideView()})),a.keystrokes.set("Esc",((e,t)=>{this._hideView(),t()})),gm({emitter:a,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const c=vB(l),d=xB(l);return a.on("change:borderStyle",this._getPropertyChangeCallback("tableCellBorderStyle")),a.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:a.borderColorInput,commandName:"tableCellBorderColor",errorText:c,validator:EB})),a.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:a.borderWidthInput,commandName:"tableCellBorderWidth",errorText:d,validator:BB})),a.on("change:padding",this._getValidatedPropertyChangeCallback({viewField:a.paddingInput,commandName:"tableCellPadding",errorText:d,validator:DB})),a.on("change:width",this._getValidatedPropertyChangeCallback({viewField:a.widthInput,commandName:"tableCellWidth",errorText:d,validator:DB})),a.on("change:height",this._getValidatedPropertyChangeCallback({viewField:a.heightInput,commandName:"tableCellHeight",errorText:d,validator:DB})),a.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:a.backgroundInput,commandName:"tableCellBackgroundColor",errorText:c,validator:EB})),a.on("change:horizontalAlignment",this._getPropertyChangeCallback("tableCellHorizontalAlignment")),a.on("change:verticalAlignment",this._getPropertyChangeCallback("tableCellVerticalAlignment")),a}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableCellBorderStyle");Object.entries(XB).map((([t,o])=>{const n=this._defaultTableCellProperties[t]||"";return[t,e.get(o).value||n]})).forEach((([e,o])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,o)})),this._isReady=!0}_showView(){const e=this.editor;this.view||(this.view=this._createPropertiesView()),this.listenTo(e.ui,"update",(()=>{this._updateView()})),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:KB(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor;fB(e.editing.view.document.selection)?this._isViewVisible&&$B(e,"cell"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(t,o,n)=>{this._isReady&&this.editor.execute(e,{value:n,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:o,validator:n,errorText:i}=e,r=el((()=>{o.errorText=i}),500);return(e,i,s)=>{r.cancel(),this._isReady&&(n(s)?(this.editor.execute(t,{value:s,batch:this._undoStepBatch}),o.errorText=null):r())}}}class tS extends dr{constructor(e,t,o){super(e),this.attributeName=t,this._defaultValue=o}refresh(){const e=this.editor,t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e.model.document.selection);this.isEnabled=!!t.length,this.value=this._getSingleValue(t)}execute(e={}){const{value:t,batch:o}=e,n=this.editor.model,i=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(n.document.selection),r=this._getValueToSet(t);n.enqueueChange(o,(e=>{r?i.forEach((t=>e.setAttribute(this.attributeName,r,t))):i.forEach((t=>e.removeAttribute(this.attributeName,t)))}))}_getAttribute(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}_getSingleValue(e){const t=this._getAttribute(e[0]);return e.every((e=>this._getAttribute(e)===t))?t:void 0}}class oS extends tS{constructor(e,t){super(e,"tableCellWidth",t)}_getValueToSet(e){if((e=YB(e,"px"))!==this._defaultValue)return e}}class nS extends lr{static get pluginName(){return"TableCellWidthEditing"}static get requires(){return[KD]}init(){const e=this.editor,t=QB(e.config.get("table.tableCellProperties.defaultProperties"));WE(e.model.schema,e.conversion,{modelAttribute:"tableCellWidth",styleName:"width",defaultValue:t.width}),e.commands.add("tableCellWidth",new oS(e,t.width))}}class iS extends tS{constructor(e,t){super(e,"tableCellPadding",t)}_getAttribute(e){if(!e)return;const t=JB(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=YB(e,"px");if(t!==this._defaultValue)return t}}class rS extends tS{constructor(e,t){super(e,"tableCellHeight",t)}_getValueToSet(e){const t=YB(e,"px");if(t!==this._defaultValue)return t}}class sS extends tS{constructor(e,t){super(e,"tableCellBackgroundColor",t)}}class aS extends tS{constructor(e,t){super(e,"tableCellVerticalAlignment",t)}}class lS extends tS{constructor(e,t){super(e,"tableCellHorizontalAlignment",t)}}class cS extends tS{constructor(e,t){super(e,"tableCellBorderStyle",t)}_getAttribute(e){if(!e)return;const t=JB(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class dS extends tS{constructor(e,t){super(e,"tableCellBorderColor",t)}_getAttribute(e){if(!e)return;const t=JB(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class uS extends tS{constructor(e,t){super(e,"tableCellBorderWidth",t)}_getAttribute(e){if(!e)return;const t=JB(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=YB(e,"px");if(t!==this._defaultValue)return t}}const hS=/^(top|middle|bottom)$/,mS=/^(left|center|right|justify)$/;class pS extends lr{static get pluginName(){return"TableCellPropertiesEditing"}static get requires(){return[KD,nS]}init(){const e=this.editor,t=e.model.schema,o=e.conversion;e.config.define("table.tableCellProperties.defaultProperties",{});const n=QB(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection});e.data.addStyleProcessorRules(mh),function(e,t,o){const n={width:"tableCellBorderWidth",color:"tableCellBorderColor",style:"tableCellBorderStyle"};e.extend("tableCell",{allowAttributes:Object.values(n)}),OE(t,"td",n,o),OE(t,"th",n,o),NE(t,{modelElement:"tableCell",modelAttribute:n.style,styleName:"border-style"}),NE(t,{modelElement:"tableCell",modelAttribute:n.color,styleName:"border-color"}),NE(t,{modelElement:"tableCell",modelAttribute:n.width,styleName:"border-width"})}(t,o,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableCellBorderStyle",new cS(e,n.borderStyle)),e.commands.add("tableCellBorderColor",new dS(e,n.borderColor)),e.commands.add("tableCellBorderWidth",new uS(e,n.borderWidth)),WE(t,o,{modelAttribute:"tableCellHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableCellHeight",new rS(e,n.height)),e.data.addStyleProcessorRules(Ch),WE(t,o,{modelAttribute:"tableCellPadding",styleName:"padding",reduceBoxSides:!0,defaultValue:n.padding}),e.commands.add("tableCellPadding",new iS(e,n.padding)),e.data.addStyleProcessorRules(hh),WE(t,o,{modelAttribute:"tableCellBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableCellBackgroundColor",new sS(e,n.backgroundColor)),function(e,t,o){e.extend("tableCell",{allowAttributes:["tableCellHorizontalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellHorizontalAlignment"},view:e=>({key:"style",value:{"text-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"text-align":mS}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getStyle("text-align");return t===o?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{align:mS}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getAttribute("align");return t===o?null:t}}})}(t,o,n.horizontalAlignment),e.commands.add("tableCellHorizontalAlignment",new lS(e,n.horizontalAlignment)),function(e,t,o){e.extend("tableCell",{allowAttributes:["tableCellVerticalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellVerticalAlignment"},view:e=>({key:"style",value:{"vertical-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"vertical-align":hS}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getStyle("vertical-align");return t===o?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{valign:hS}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getAttribute("valign");return t===o?null:t}}})}(t,o,n.verticalAlignment),e.commands.add("tableCellVerticalAlignment",new aS(e,n.verticalAlignment))}}class gS extends dr{constructor(e,t,o){super(e),this.attributeName=t,this._defaultValue=o}refresh(){const e=$E(this.editor.model.document.selection);this.isEnabled=!!e,this.value=this._getValue(e)}execute(e={}){const t=this.editor.model,o=t.document.selection,{value:n,batch:i}=e,r=$E(o),s=this._getValueToSet(n);t.enqueueChange(i,(e=>{s?e.setAttribute(this.attributeName,s,r):e.removeAttribute(this.attributeName,r)}))}_getValue(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}}class fS extends gS{constructor(e,t){super(e,"tableBackgroundColor",t)}}class bS extends gS{constructor(e,t){super(e,"tableBorderColor",t)}_getValue(e){if(!e)return;const t=JB(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class kS extends gS{constructor(e,t){super(e,"tableBorderStyle",t)}_getValue(e){if(!e)return;const t=JB(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class wS extends gS{constructor(e,t){super(e,"tableBorderWidth",t)}_getValue(e){if(!e)return;const t=JB(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){const t=YB(e,"px");if(t!==this._defaultValue)return t}}class _S extends gS{constructor(e,t){super(e,"tableWidth",t)}_getValueToSet(e){if((e=YB(e,"px"))!==this._defaultValue)return e}}class yS extends gS{constructor(e,t){super(e,"tableHeight",t)}_getValueToSet(e){if((e=YB(e,"px"))!==this._defaultValue)return e}}class AS extends gS{constructor(e,t){super(e,"tableAlignment",t)}}const CS=/^(left|center|right)$/,vS=/^(left|none|right)$/;class xS extends lr{static get pluginName(){return"TablePropertiesEditing"}static get requires(){return[KD]}init(){const e=this.editor,t=e.model.schema,o=e.conversion;e.config.define("table.tableProperties.defaultProperties",{});const n=QB(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0});e.data.addStyleProcessorRules(mh),function(e,t,o){const n={width:"tableBorderWidth",color:"tableBorderColor",style:"tableBorderStyle"};e.extend("table",{allowAttributes:Object.values(n)}),OE(t,"table",n,o),LE(t,{modelAttribute:n.color,styleName:"border-color"}),LE(t,{modelAttribute:n.style,styleName:"border-style"}),LE(t,{modelAttribute:n.width,styleName:"border-width"})}(t,o,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableBorderColor",new bS(e,n.borderColor)),e.commands.add("tableBorderStyle",new kS(e,n.borderStyle)),e.commands.add("tableBorderWidth",new wS(e,n.borderWidth)),function(e,t,o){e.extend("table",{allowAttributes:["tableAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment"},view:e=>({key:"style",value:{float:"center"===e?"none":e}}),converterPriority:"high"}),t.for("upcast").attributeToAttribute({view:{name:/^(table|figure)$/,styles:{float:vS}},model:{key:"tableAlignment",value:e=>{let t=e.getStyle("float");return"none"===t&&(t="center"),t===o?null:t}}}).attributeToAttribute({view:{attributes:{align:CS}},model:{name:"table",key:"tableAlignment",value:e=>{const t=e.getAttribute("align");return t===o?null:t}}})}(t,o,n.alignment),e.commands.add("tableAlignment",new AS(e,n.alignment)),ES(t,o,{modelAttribute:"tableWidth",styleName:"width",defaultValue:n.width}),e.commands.add("tableWidth",new _S(e,n.width)),ES(t,o,{modelAttribute:"tableHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableHeight",new yS(e,n.height)),e.data.addStyleProcessorRules(hh),function(e,t,o){const{modelAttribute:n}=o;e.extend("table",{allowAttributes:[n]}),VE(t,{viewElement:"table",...o}),LE(t,o)}(t,o,{modelAttribute:"tableBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableBackgroundColor",new fS(e,n.backgroundColor))}}function ES(e,t,o){const{modelAttribute:n}=o;e.extend("table",{allowAttributes:[n]}),VE(t,{viewElement:/^(table|figure)$/,shouldUpcast:e=>!("table"==e.name&&"figure"==e.parent.name),...o}),NE(t,{modelElement:"table",...o})}var DS=i(4001),BS={attributes:{"data-cke":!0}};BS.setAttributes=Ar(),BS.insert=_r().bind(null,"head"),BS.domAPI=kr(),BS.insertStyleElement=vr();fr()(DS.A,BS);DS.A&&DS.A.locals&&DS.A.locals;class SS extends pm{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",alignment:""}),this.options=t;const{borderStyleDropdown:o,borderWidthInput:n,borderColorInput:i,borderRowLabel:r}=this._createBorderFields(),{backgroundRowLabel:s,backgroundInput:a}=this._createBackgroundFields(),{widthInput:l,operatorLabel:c,heightInput:d,dimensionsLabel:u}=this._createDimensionFields(),{alignmentToolbar:h,alignmentLabel:m}=this._createAlignmentFields();this.focusTracker=new Xi,this.keystrokes=new er,this.children=this.createCollection(),this.borderStyleDropdown=o,this.borderWidthInput=n,this.borderColorInput=i,this.backgroundInput=a,this.widthInput=l,this.heightInput=d,this.alignmentToolbar=h;const{saveButtonView:p,cancelButtonView:g}=this._createActionButtons();this.saveButtonView=p,this.cancelButtonView=g,this._focusables=new Uh,this._focusCycler=new Im({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new Tm(e,{label:this.t("Table properties")})),this.children.add(new zB(e,{labelView:r,children:[r,o,i,n],class:"ck-table-form__border-row"})),this.children.add(new zB(e,{labelView:s,children:[s,a],class:"ck-table-form__background-row"})),this.children.add(new zB(e,{children:[new zB(e,{labelView:u,children:[u,l,c,d],class:"ck-table-form__dimensions-row"}),new zB(e,{labelView:m,children:[m,h],class:"ck-table-properties-form__alignment-row"})]})),this.children.add(new zB(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),bm({view:this}),[this.borderColorInput,this.backgroundInput].forEach((e=>{this._focusCycler.chain(e.fieldView.focusCycler)})),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.alignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},o=PB({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color,colorPickerConfig:this.options.colorPickerConfig}),n=this.locale,i=this.t,r=i("Style"),s=new ap(n);s.text=i("Border");const a=CB(i),l=new jp(n,Rg);l.set({label:r,class:"ck-table-form__border-style"}),l.fieldView.buttonView.set({ariaLabel:r,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:r}),l.fieldView.buttonView.bind("label").to(this,"borderStyle",(e=>a[e||"none"])),l.fieldView.on("execute",(e=>{this.borderStyle=e.source._borderStyleValue})),l.bind("isEmpty").to(this,"borderStyle",(e=>!e)),Sg(l.fieldView,SB(this,t.style),{role:"menu",ariaLabel:r});const c=new jp(n,Fg);c.set({label:i("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",TS),c.fieldView.on("input",(()=>{this.borderWidth=c.fieldView.element.value}));const d=new jp(n,o);return d.set({label:i("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",TS),d.fieldView.on("input",(()=>{this.borderColor=d.fieldView.value})),this.on("change:borderStyle",((e,o,n,i)=>{TS(n)||(this.borderColor="",this.borderWidth=""),TS(i)||(this.borderColor=t.color,this.borderWidth=t.width)})),{borderRowLabel:s,borderStyleDropdown:l,borderColorInput:d,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,t=this.t,o=new ap(e);o.text=t("Background");const n=PB({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),i=new jp(e,n);return i.set({label:t("Color"),class:"ck-table-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",(()=>{this.backgroundColor=i.fieldView.value})),{backgroundRowLabel:o,backgroundInput:i}}_createDimensionFields(){const e=this.locale,t=this.t,o=new ap(e);o.text=t("Dimensions");const n=new jp(e,Fg);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",(()=>{this.width=n.fieldView.element.value}));const i=new pm(e);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const r=new jp(e,Fg);return r.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),r.fieldView.bind("value").to(this,"height"),r.fieldView.on("input",(()=>{this.height=r.fieldView.element.value})),{dimensionsLabel:o,widthInput:n,operatorLabel:i,heightInput:r}}_createAlignmentFields(){const e=this.locale,t=this.t,o=new ap(e);o.text=t("Alignment");const n=new cg(e);return n.set({isCompact:!0,ariaLabel:t("Table alignment toolbar")}),TB({view:this,icons:{left:qh.objectLeft,center:qh.objectCenter,right:qh.objectRight},toolbar:n,labels:this._alignmentLabels,propertyName:"alignment",defaultValue:this.options.defaultTableProperties.alignment}),{alignmentLabel:o,alignmentToolbar:n}}_createActionButtons(){const e=this.locale,t=this.t,o=new Em(e),n=new Em(e),i=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.widthInput,this.heightInput];return o.set({label:t("Save"),icon:qh.check,class:"ck-button-save",type:"submit",withText:!0}),o.bind("isEnabled").toMany(i,"errorText",((...e)=>e.every((e=>!e)))),n.set({label:t("Cancel"),icon:qh.cancel,class:"ck-button-cancel",withText:!0}),n.delegate("execute").to(this,"cancel"),{saveButtonView:o,cancelButtonView:n}}get _alignmentLabels(){const e=this.locale,t=this.t,o=t("Align table to the left"),n=t("Center table"),i=t("Align table to the right");return"rtl"===e.uiLanguageDirection?{right:i,center:n,left:o}:{left:o,center:n,right:i}}}function TS(e){return"none"!==e}const IS={borderStyle:"tableBorderStyle",borderColor:"tableBorderColor",borderWidth:"tableBorderWidth",backgroundColor:"tableBackgroundColor",width:"tableWidth",height:"tableHeight",alignment:"tableAlignment"};class PS extends lr{static get requires(){return[Fb]}static get pluginName(){return"TablePropertiesUI"}constructor(e){super(e),this.view=null,e.config.define("table.tableProperties",{borderColors:IB,backgroundColors:IB})}init(){const e=this.editor,t=e.t;this._defaultTableProperties=QB(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),this._balloon=e.plugins.get(Fb),e.ui.componentFactory.add("tableProperties",(o=>{const n=new Em(o);n.set({label:t("Table properties"),icon:' ',tooltip:!0}),this.listenTo(n,"execute",(()=>this._showView()));const i=Object.values(IS).map((t=>e.commands.get(t)));return n.bind("isEnabled").toMany(i,"isEnabled",((...e)=>e.some((e=>e)))),n}))}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(){const e=this.editor,t=e.config.get("table.tableProperties"),o=Dp(t.borderColors),n=Ep(e.locale,o),i=Dp(t.backgroundColors),r=Ep(e.locale,i),s=!1!==t.colorPicker,a=new SS(e.locale,{borderColors:n,backgroundColors:r,defaultTableProperties:this._defaultTableProperties,colorPickerConfig:!!s&&(t.colorPicker||{})}),l=e.t;a.render(),this.listenTo(a,"submit",(()=>{this._hideView()})),this.listenTo(a,"cancel",(()=>{this._undoStepBatch.operations.length&&e.execute("undo",this._undoStepBatch),this._hideView()})),a.keystrokes.set("Esc",((e,t)=>{this._hideView(),t()})),gm({emitter:a,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const c=vB(l),d=xB(l);return a.on("change:borderStyle",this._getPropertyChangeCallback("tableBorderStyle")),a.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:a.borderColorInput,commandName:"tableBorderColor",errorText:c,validator:EB})),a.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:a.borderWidthInput,commandName:"tableBorderWidth",errorText:d,validator:BB})),a.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:a.backgroundInput,commandName:"tableBackgroundColor",errorText:c,validator:EB})),a.on("change:width",this._getValidatedPropertyChangeCallback({viewField:a.widthInput,commandName:"tableWidth",errorText:d,validator:DB})),a.on("change:height",this._getValidatedPropertyChangeCallback({viewField:a.heightInput,commandName:"tableHeight",errorText:d,validator:DB})),a.on("change:alignment",this._getPropertyChangeCallback("tableAlignment")),a}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableBorderStyle");Object.entries(IS).map((([t,o])=>{const n=t,i=this._defaultTableProperties[n]||"";return[n,e.get(o).value||i]})).forEach((([e,o])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,o)})),this._isReady=!0}_showView(){const e=this.editor;this.view||(this.view=this._createPropertiesView()),this.listenTo(e.ui,"update",(()=>{this._updateView()})),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:GB(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor;pB(e.editing.view.document.selection)?this._isViewVisible&&$B(e,"table"):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(t,o,n)=>{this._isReady&&this.editor.execute(e,{value:n,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:o,validator:n,errorText:i}=e,r=el((()=>{o.errorText=i}),500);return(e,i,s)=>{r.cancel(),this._isReady&&(n(s)?(this.editor.execute(t,{value:s,batch:this._undoStepBatch}),o.errorText=null):r())}}}var FS=i(7406),MS={attributes:{"data-cke":!0}};MS.setAttributes=Ar(),MS.insert=_r().bind(null,"head"),MS.domAPI=kr(),MS.insertStyleElement=vr();fr()(FS.A,MS);FS.A&&FS.A.locals&&FS.A.locals;var RS=i(4204),zS={attributes:{"data-cke":!0}};zS.setAttributes=Ar(),zS.insert=_r().bind(null,"head"),zS.domAPI=kr(),zS.insertStyleElement=vr();fr()(RS.A,zS);RS.A&&RS.A.locals&&RS.A.locals;function VS(e){return void 0!==e&&e.endsWith("px")}function OS(e){return e.toFixed(2).replace(/\.?0+$/,"")+"px"}function NS(e,t,o){if(!e.childCount)return;const n=new Lu(e.document),i=function(e,t){const o=t.createRangeIn(e),n=[],i=new Set;for(const e of o.getItems()){if(!e.is("element")||!e.name.match(/^(p|h\d+|li|div)$/))continue;let t=GS(e);if(void 0===t||0!=parseFloat(t)||Array.from(e.getClassNames()).find((e=>e.startsWith("MsoList")))||(t=void 0),e.hasStyle("mso-list")||void 0!==t&&i.has(t)){const o=WS(e);n.push({element:e,id:o.id,order:o.order,indent:o.indent,marginLeft:t}),void 0!==t&&i.add(t)}else i.clear()}return n}(e,n);if(!i.length)return;const r={},s=[];for(const e of i)if(void 0!==e.indent){LS(e)||(s.length=0);const i=`${e.id}:${e.indent}`,a=Math.min(e.indent-1,s.length);if(as.length-1||s[a].listElement.name!=l.type){0==a&&"ol"==l.type&&void 0!==e.id&&r[i]&&(l.startIndex=r[i]);const t=US(l,n,o);if(VS(e.marginLeft)&&(0==a||VS(s[a-1].marginLeft))){let o=e.marginLeft;a>0&&(o=OS(parseFloat(o)-parseFloat(s[a-1].marginLeft))),n.setStyle("padding-left",o,t)}if(0==s.length){const o=e.element.parent,i=o.getChildIndex(e.element)+1;n.insertChild(i,t,o)}else{const e=s[a-1].listItemElements;n.appendChild(t,e[e.length-1])}s[a]={...e,listElement:t,listItemElements:[]},0==a&&void 0!==e.id&&(r[i]=l.startIndex||1)}}const l="li"==e.element.name?e.element:n.createElement("li");n.appendChild(l,s[a].listElement),s[a].listItemElements.push(l),0==a&&void 0!==e.id&&r[i]++,e.element!=l&&n.appendChild(e.element,l),$S(e.element,n),n.removeStyle("text-indent",e.element),n.removeStyle("margin-left",e.element)}else{const t=s.find((t=>t.marginLeft==e.marginLeft));if(t){const o=t.listItemElements;n.appendChild(e.element,o[o.length-1]),n.removeStyle("margin-left",e.element)}else s.length=0}}function LS(e){const t=e.element.previousSibling;return HS(t||e.element.parent)}function HS(e){return e.is("element","ol")||e.is("element","ul")}function jS(e,t){const o=new RegExp(`@list l${e.id}:level${e.indent}\\s*({[^}]*)`,"gi"),n=/mso-level-number-format:([^;]{0,100});/gi,i=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,r=new RegExp(`@list\\s+l${e.id}:level\\d\\s*{[^{]*mso-level-text:"%\\d\\\\.`,"gi"),s=new RegExp(`@list l${e.id}:level\\d\\s*{[^{]*mso-level-number-format:`,"gi"),a=r.exec(t),l=s.exec(t),c=a&&!l,d=o.exec(t);let u="decimal",h="ol",m=null;if(d&&d[1]){const t=n.exec(d[1]);if(t&&t[1]&&(u=t[1].trim(),h="bullet"!==u&&"image"!==u?"ol":"ul"),"bullet"===u){const t=function(e){if("li"==e.name&&"ul"==e.parent.name&&e.parent.hasAttribute("type"))return e.parent.getAttribute("type");const t=function(e){if(e.getChild(0).is("$text"))return null;for(const t of e.getChildren()){if(!t.is("element","span"))continue;const e=t.getChild(0);if(e)return e.is("$text")?e:e.getChild(0)}return null}(e);if(!t)return null;const o=t._data;if("o"===o)return"circle";if("·"===o)return"disc";if("§"===o)return"square";return null}(e.element);t&&(u=t)}else{const e=i.exec(d[1]);e&&e[1]&&(m=parseInt(e[1]))}c&&(h="ol")}return{type:h,startIndex:m,style:qS(u),isLegalStyleList:c}}function qS(e){if(e.startsWith("arabic-leading-zero"))return"decimal-leading-zero";switch(e){case"alpha-upper":return"upper-alpha";case"alpha-lower":return"lower-alpha";case"roman-upper":return"upper-roman";case"roman-lower":return"lower-roman";case"circle":case"disc":case"square":return e;default:return null}}function US(e,t,o){const n=t.createElement(e.type);return e.style&&t.setStyle("list-style-type",e.style,n),e.startIndex&&e.startIndex>1&&t.setAttribute("start",e.startIndex,n),e.isLegalStyleList&&o&&t.addClass("legal-list",n),n}function WS(e){const t=e.getStyle("mso-list");if(void 0===t)return{};const o=t.match(/(^|\s{1,100})l(\d+)/i),n=t.match(/\s{0,100}lfo(\d+)/i),i=t.match(/\s{0,100}level(\d+)/i);return o&&n&&i?{id:o[2],order:n[1],indent:parseInt(i[1])}:{indent:1}}function $S(e,t){const o=new Hr({name:"span",styles:{"mso-list":"Ignore"}}),n=t.createRangeIn(e);for(const e of n)"elementStart"===e.type&&o.match(e.item)&&t.remove(e.item)}function GS(e){const t=e.getStyle("margin-left");return void 0===t||t.endsWith("px")?t:function(e){const t=parseFloat(e);return e.endsWith("pt")?OS(96*t/72):e.endsWith("pc")?OS(12*t*96/72):e.endsWith("in")?OS(96*t):e.endsWith("cm")?OS(96*t/2.54):e.endsWith("mm")?OS(t/10*96/2.54):e}(t)}function KS(e,t){if(!e.childCount)return;const o=new Lu(e.document),n=function(e,t){const o=t.createRangeIn(e),n=new Hr({name:/v:(.+)/}),i=[];for(const e of o){if("elementStart"!=e.type)continue;const t=e.item,o=t.previousSibling,r=o&&o.is("element")?o.name:null,s=["Chart"],a=n.match(t),l=t.getAttribute("o:gfxdata"),c="v:shapetype"===r,d=l&&s.some((e=>t.getAttribute("id").includes(e)));a&&l&&!c&&!d&&i.push(e.item.getAttribute("id"))}return i}(e,o);!function(e,t,o){const n=o.createRangeIn(t),i=new Hr({name:"img"}),r=[];for(const t of n)if(t.item.is("element")&&i.match(t.item)){const o=t.item,n=o.getAttribute("v:shapes")?o.getAttribute("v:shapes").split(" "):[];n.length&&n.every((t=>e.indexOf(t)>-1))?r.push(o):o.getAttribute("src")||r.push(o)}for(const e of r)o.remove(e)}(n,e,o),function(e,t,o){const n=o.createRangeIn(t),i=[];for(const t of n)if("elementStart"==t.type&&t.item.is("element","v:shape")){const o=t.item.getAttribute("id");if(e.includes(o))continue;r(t.item.parent.getChildren(),o)||i.push(t.item)}for(const e of i){const t={src:s(e)};e.hasAttribute("alt")&&(t.alt=e.getAttribute("alt"));const n=o.createElement("img",t);o.insertChild(e.index+1,n,e.parent)}function r(e,t){for(const o of e)if(o.is("element")){if("img"==o.name&&o.getAttribute("v:shapes")==t)return!0;if(r(o.getChildren(),t))return!0}return!1}function s(e){for(const t of e.getChildren())if(t.is("element")&&t.getAttribute("src"))return t.getAttribute("src")}}(n,e,o),function(e,t){const o=t.createRangeIn(e),n=new Hr({name:/v:(.+)/}),i=[];for(const e of o)"elementStart"==e.type&&n.match(e.item)&&i.push(e.item);for(const e of i)t.remove(e)}(e,o);const i=function(e,t){const o=t.createRangeIn(e),n=new Hr({name:"img"}),i=[];for(const e of o)e.item.is("element")&&n.match(e.item)&&e.item.getAttribute("src").startsWith("file://")&&i.push(e.item);return i}(e,o);i.length&&function(e,t,o){if(e.length===t.length)for(let n=0;nString.fromCharCode(parseInt(e,16)))).join(""))}const JS=/ /i,YS=/xmlns:o="urn:schemas-microsoft-com/i;class QS{constructor(e,t=!1){this.document=e,this.hasMultiLevelListPlugin=t}isActive(e){return JS.test(e)||YS.test(e)}execute(e){const{body:t,stylesString:o}=e._parsedData;NS(t,o,this.hasMultiLevelListPlugin),KS(t,e.dataTransfer.getData("text/rtf")),function(e){const t=[],o=new Lu(e.document);for(const{item:n}of o.createRangeIn(e))if(n.is("element")){for(const e of n.getClassNames())/\bmso/gi.exec(e)&&o.removeClass(e,n);for(const e of n.getStyleNames())/\bmso/gi.exec(e)&&o.removeStyle(e,n);(n.is("element","w:sdt")||n.is("element","w:sdtpr")&&n.isEmpty||n.is("element","o:p")&&n.isEmpty)&&t.push(n)}for(const e of t){const t=e.parent,n=t.getChildIndex(e);o.insertChild(n,e.getChildren(),t),o.remove(e)}}(t),e.content=t}}function XS(e,t,o,{blockElements:n,inlineObjectElements:i}){let r=o.createPositionAt(e,"forward"==t?"after":"before");return r=r.getLastMatchingPosition((({item:e})=>e.is("element")&&!n.includes(e.name)&&!i.includes(e.name)),{direction:t}),"forward"==t?r.nodeAfter:r.nodeBefore}function eT(e,t){return!!e&&e.is("element")&&t.includes(e.name)}const tT=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class oT{constructor(e){this.document=e}isActive(e){return tT.test(e)}execute(e){const t=new Lu(this.document),{body:o}=e._parsedData;!function(e,t){for(const o of e.getChildren())if(o.is("element","b")&&"normal"===o.getStyle("font-weight")){const n=e.getChildIndex(o);t.remove(o),t.insertChild(n,o.getChildren(),e)}}(o,t),function(e,t){for(const o of t.createRangeIn(e)){const e=o.item;if(e.is("element","li")){const o=e.getChild(0);o&&o.is("element","p")&&t.unwrapElement(o)}}}(o,t),function(e,t){const o=new Hs(t.document.stylesProcessor),n=new Pa(o,{renderingMode:"data"}),i=n.blockElements,r=n.inlineObjectElements,s=[];for(const o of t.createRangeIn(e)){const e=o.item;if(e.is("element","br")){const o=XS(e,"forward",t,{blockElements:i,inlineObjectElements:r}),n=XS(e,"backward",t,{blockElements:i,inlineObjectElements:r}),a=eT(o,i);(eT(n,i)||a)&&s.push(e)}}for(const e of s)e.hasClass("Apple-interchange-newline")?t.remove(e):t.replace(e,t.createElement("p"))}(o,t),e.content=o}}const nT=/(\s+)<\/span>/g,((e,t)=>1===t.length?" ":Array(t.length+1).join(" ").substr(0,t.length)))}function sT(e,t){const o=new DOMParser,n=function(e){return rT(rT(e)).replace(/([^\S\r\n]*?)[\r\n]+([^\S\r\n]*<\/span>)/g,"$1$2").replace(/<\/span>/g,"").replace(/()[\r\n]+(<\/span>)/g,"$1 $2").replace(/ <\//g," ").replace(/ <\/o:p>/g," ").replace(/( |\u00A0)<\/o:p>/g,"").replace(/>([^\S\r\n]*[\r\n]\s*)<")}(function(e){const t="