From 1e1797c1b410132a19e5e65b2779444ea982e2a7 Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Sat, 12 Aug 2023 05:41:34 +0200 Subject: [PATCH] =?UTF-8?q?Go=20back=20to=20WYSIWYG=20for=20campsite=20typ?= =?UTF-8?q?es=E2=80=99=20description=20and=20remove=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GrapesJS was not working: too complex for users and not enough for designers. Therefore, we decided to use a simple WYSIWYG widget for the campsite types’ description, while we will do the actual HTML template with an external editor. Once that is done, we will convert that HTML to Go templates and get the description’s content from the database. Now the pages section has no sense: all the pages will be straight Go templates. Only the pages for “special things”, like campsite types, will use the database, and only for some fields, not the whole page. --- deploy/add_page.sql | 22 - deploy/edit_page.sql | 24 - deploy/page.sql | 57 - pkg/app/admin.go | 5 - pkg/app/public.go | 5 - pkg/page/admin.go | 183 - pkg/page/public.go | 72 - revert/add_page.sql | 7 - revert/edit_page.sql | 7 - revert/page.sql | 7 - sqitch.plan | 3 - test/add_page.sql | 56 - test/edit_page.sql | 60 - test/page.sql | 199 - verify/add_page.sql | 7 - verify/edit_page.sql | 7 - verify/page.sql | 19 - web/static/camper.js | 68 +- web/static/ckeditor5@39.0.1/ckeditor.js | 7 + web/static/ckeditor5@39.0.1/ckeditor.js.map | 1 + .../ckeditor5@39.0.1/translations/af.js | 1 + .../ckeditor5@39.0.1/translations/ar.js | 1 + .../ckeditor5@39.0.1/translations/ast.js | 1 + .../ckeditor5@39.0.1/translations/az.js | 1 + .../ckeditor5@39.0.1/translations/bg.js | 1 + .../ckeditor5@39.0.1/translations/bn.js | 1 + .../ckeditor5@39.0.1/translations/bs.js | 1 + .../ckeditor5@39.0.1/translations/ca.js | 1 + .../ckeditor5@39.0.1/translations/cs.js | 1 + .../ckeditor5@39.0.1/translations/da.js | 1 + .../ckeditor5@39.0.1/translations/de-ch.js | 1 + .../ckeditor5@39.0.1/translations/de.js | 1 + .../ckeditor5@39.0.1/translations/el.js | 1 + .../ckeditor5@39.0.1/translations/en-au.js | 1 + .../ckeditor5@39.0.1/translations/en-gb.js | 1 + .../ckeditor5@39.0.1/translations/eo.js | 1 + .../ckeditor5@39.0.1/translations/es-co.js | 1 + .../ckeditor5@39.0.1/translations/es.js | 1 + .../ckeditor5@39.0.1/translations/et.js | 1 + .../ckeditor5@39.0.1/translations/eu.js | 1 + .../ckeditor5@39.0.1/translations/fa.js | 1 + .../ckeditor5@39.0.1/translations/fi.js | 1 + .../ckeditor5@39.0.1/translations/fr.js | 1 + .../ckeditor5@39.0.1/translations/gl.js | 1 + .../ckeditor5@39.0.1/translations/gu.js | 1 + .../ckeditor5@39.0.1/translations/he.js | 1 + .../ckeditor5@39.0.1/translations/hi.js | 1 + .../ckeditor5@39.0.1/translations/hr.js | 1 + .../ckeditor5@39.0.1/translations/hu.js | 1 + .../ckeditor5@39.0.1/translations/id.js | 1 + .../ckeditor5@39.0.1/translations/it.js | 1 + .../ckeditor5@39.0.1/translations/ja.js | 1 + .../ckeditor5@39.0.1/translations/jv.js | 1 + .../ckeditor5@39.0.1/translations/km.js | 1 + .../ckeditor5@39.0.1/translations/kn.js | 1 + .../ckeditor5@39.0.1/translations/ko.js | 1 + .../ckeditor5@39.0.1/translations/ku.js | 1 + .../ckeditor5@39.0.1/translations/lt.js | 1 + .../ckeditor5@39.0.1/translations/lv.js | 1 + .../ckeditor5@39.0.1/translations/ms.js | 1 + .../ckeditor5@39.0.1/translations/nb.js | 1 + .../ckeditor5@39.0.1/translations/ne.js | 1 + .../ckeditor5@39.0.1/translations/nl.js | 1 + .../ckeditor5@39.0.1/translations/no.js | 1 + .../ckeditor5@39.0.1/translations/oc.js | 1 + .../ckeditor5@39.0.1/translations/pl.js | 1 + .../ckeditor5@39.0.1/translations/pt-br.js | 1 + .../ckeditor5@39.0.1/translations/pt.js | 1 + .../ckeditor5@39.0.1/translations/ro.js | 1 + .../ckeditor5@39.0.1/translations/ru.js | 1 + .../ckeditor5@39.0.1/translations/si.js | 1 + .../ckeditor5@39.0.1/translations/sk.js | 1 + .../ckeditor5@39.0.1/translations/sl.js | 1 + .../ckeditor5@39.0.1/translations/sq.js | 1 + .../ckeditor5@39.0.1/translations/sr-latn.js | 1 + .../ckeditor5@39.0.1/translations/sr.js | 1 + .../ckeditor5@39.0.1/translations/sv.js | 1 + .../ckeditor5@39.0.1/translations/th.js | 1 + .../ckeditor5@39.0.1/translations/tk.js | 1 + .../ckeditor5@39.0.1/translations/tr.js | 1 + .../ckeditor5@39.0.1/translations/tt.js | 1 + .../ckeditor5@39.0.1/translations/ug.js | 1 + .../ckeditor5@39.0.1/translations/uk.js | 1 + .../ckeditor5@39.0.1/translations/ur.js | 1 + .../ckeditor5@39.0.1/translations/uz.js | 1 + .../ckeditor5@39.0.1/translations/vi.js | 1 + .../ckeditor5@39.0.1/translations/zh-cn.js | 1 + .../ckeditor5@39.0.1/translations/zh.js | 1 + web/static/grapesjs-blocks-basic@1.0.2.min.js | 3 - .../grapesjs-plugin-ckeditor@1.0.1.min.js | 3 - .../grapesjs-preset-webpage@1.0.3.min.js | 3 - web/static/grapesjs@0.21.4.min.css | 1 - web/static/grapesjs@0.21.4.min.js | 3 - .../isolated-block-editor-core@2.26.0.css | 17596 ---------------- web/static/isolated-block-editor@2.26.0.css | 7 - .../isolated-block-editor@2.26.0.min.js | 9 - web/static/react-dom@18.2.0.min.js | 267 - web/static/react@18.2.0.min.js | 31 - web/templates/admin/campsite/type/new.gohtml | 10 +- web/templates/admin/page/form.gohtml | 66 - web/templates/admin/page/index.gohtml | 31 - 101 files changed, 113 insertions(+), 18801 deletions(-) delete mode 100644 deploy/add_page.sql delete mode 100644 deploy/edit_page.sql delete mode 100644 deploy/page.sql delete mode 100644 pkg/page/admin.go delete mode 100644 pkg/page/public.go delete mode 100644 revert/add_page.sql delete mode 100644 revert/edit_page.sql delete mode 100644 revert/page.sql delete mode 100644 test/add_page.sql delete mode 100644 test/edit_page.sql delete mode 100644 test/page.sql delete mode 100644 verify/add_page.sql delete mode 100644 verify/edit_page.sql delete mode 100644 verify/page.sql create mode 100644 web/static/ckeditor5@39.0.1/ckeditor.js create mode 100644 web/static/ckeditor5@39.0.1/ckeditor.js.map create mode 100644 web/static/ckeditor5@39.0.1/translations/af.js create mode 100644 web/static/ckeditor5@39.0.1/translations/ar.js create mode 100644 web/static/ckeditor5@39.0.1/translations/ast.js create mode 100644 web/static/ckeditor5@39.0.1/translations/az.js create mode 100644 web/static/ckeditor5@39.0.1/translations/bg.js create mode 100644 web/static/ckeditor5@39.0.1/translations/bn.js create mode 100644 web/static/ckeditor5@39.0.1/translations/bs.js create mode 100644 web/static/ckeditor5@39.0.1/translations/ca.js create mode 100644 web/static/ckeditor5@39.0.1/translations/cs.js create mode 100644 web/static/ckeditor5@39.0.1/translations/da.js create mode 100644 web/static/ckeditor5@39.0.1/translations/de-ch.js create mode 100644 web/static/ckeditor5@39.0.1/translations/de.js create mode 100644 web/static/ckeditor5@39.0.1/translations/el.js create mode 100644 web/static/ckeditor5@39.0.1/translations/en-au.js create mode 100644 web/static/ckeditor5@39.0.1/translations/en-gb.js create mode 100644 web/static/ckeditor5@39.0.1/translations/eo.js create mode 100644 web/static/ckeditor5@39.0.1/translations/es-co.js create mode 100644 web/static/ckeditor5@39.0.1/translations/es.js create mode 100644 web/static/ckeditor5@39.0.1/translations/et.js create mode 100644 web/static/ckeditor5@39.0.1/translations/eu.js create mode 100644 web/static/ckeditor5@39.0.1/translations/fa.js create mode 100644 web/static/ckeditor5@39.0.1/translations/fi.js create mode 100644 web/static/ckeditor5@39.0.1/translations/fr.js create mode 100644 web/static/ckeditor5@39.0.1/translations/gl.js create mode 100644 web/static/ckeditor5@39.0.1/translations/gu.js create mode 100644 web/static/ckeditor5@39.0.1/translations/he.js create mode 100644 web/static/ckeditor5@39.0.1/translations/hi.js create mode 100644 web/static/ckeditor5@39.0.1/translations/hr.js create mode 100644 web/static/ckeditor5@39.0.1/translations/hu.js create mode 100644 web/static/ckeditor5@39.0.1/translations/id.js create mode 100644 web/static/ckeditor5@39.0.1/translations/it.js create mode 100644 web/static/ckeditor5@39.0.1/translations/ja.js create mode 100644 web/static/ckeditor5@39.0.1/translations/jv.js create mode 100644 web/static/ckeditor5@39.0.1/translations/km.js create mode 100644 web/static/ckeditor5@39.0.1/translations/kn.js create mode 100644 web/static/ckeditor5@39.0.1/translations/ko.js create mode 100644 web/static/ckeditor5@39.0.1/translations/ku.js create mode 100644 web/static/ckeditor5@39.0.1/translations/lt.js create mode 100644 web/static/ckeditor5@39.0.1/translations/lv.js create mode 100644 web/static/ckeditor5@39.0.1/translations/ms.js create mode 100644 web/static/ckeditor5@39.0.1/translations/nb.js create mode 100644 web/static/ckeditor5@39.0.1/translations/ne.js create mode 100644 web/static/ckeditor5@39.0.1/translations/nl.js create mode 100644 web/static/ckeditor5@39.0.1/translations/no.js create mode 100644 web/static/ckeditor5@39.0.1/translations/oc.js create mode 100644 web/static/ckeditor5@39.0.1/translations/pl.js create mode 100644 web/static/ckeditor5@39.0.1/translations/pt-br.js create mode 100644 web/static/ckeditor5@39.0.1/translations/pt.js create mode 100644 web/static/ckeditor5@39.0.1/translations/ro.js create mode 100644 web/static/ckeditor5@39.0.1/translations/ru.js create mode 100644 web/static/ckeditor5@39.0.1/translations/si.js create mode 100644 web/static/ckeditor5@39.0.1/translations/sk.js create mode 100644 web/static/ckeditor5@39.0.1/translations/sl.js create mode 100644 web/static/ckeditor5@39.0.1/translations/sq.js create mode 100644 web/static/ckeditor5@39.0.1/translations/sr-latn.js create mode 100644 web/static/ckeditor5@39.0.1/translations/sr.js create mode 100644 web/static/ckeditor5@39.0.1/translations/sv.js create mode 100644 web/static/ckeditor5@39.0.1/translations/th.js create mode 100644 web/static/ckeditor5@39.0.1/translations/tk.js create mode 100644 web/static/ckeditor5@39.0.1/translations/tr.js create mode 100644 web/static/ckeditor5@39.0.1/translations/tt.js create mode 100644 web/static/ckeditor5@39.0.1/translations/ug.js create mode 100644 web/static/ckeditor5@39.0.1/translations/uk.js create mode 100644 web/static/ckeditor5@39.0.1/translations/ur.js create mode 100644 web/static/ckeditor5@39.0.1/translations/uz.js create mode 100644 web/static/ckeditor5@39.0.1/translations/vi.js create mode 100644 web/static/ckeditor5@39.0.1/translations/zh-cn.js create mode 100644 web/static/ckeditor5@39.0.1/translations/zh.js delete mode 100644 web/static/grapesjs-blocks-basic@1.0.2.min.js delete mode 100644 web/static/grapesjs-plugin-ckeditor@1.0.1.min.js delete mode 100644 web/static/grapesjs-preset-webpage@1.0.3.min.js delete mode 100644 web/static/grapesjs@0.21.4.min.css delete mode 100644 web/static/grapesjs@0.21.4.min.js delete mode 100644 web/static/isolated-block-editor-core@2.26.0.css delete mode 100644 web/static/isolated-block-editor@2.26.0.css delete mode 100644 web/static/isolated-block-editor@2.26.0.min.js delete mode 100644 web/static/react-dom@18.2.0.min.js delete mode 100644 web/static/react@18.2.0.min.js delete mode 100644 web/templates/admin/page/form.gohtml delete mode 100644 web/templates/admin/page/index.gohtml diff --git a/deploy/add_page.sql b/deploy/add_page.sql deleted file mode 100644 index ae64cac..0000000 --- a/deploy/add_page.sql +++ /dev/null @@ -1,22 +0,0 @@ --- Deploy camper:add_page to pg --- requires: roles --- requires: schema_camper --- requires: page - -begin; - -set search_path to camper, public; - -create or replace function add_page(company integer, title text, content text) returns uuid as -$$ - insert into page (company_id, title, content) - values (company, title, xmlparse (content content)) - returning slug; -$$ - language sql -; - -revoke execute on function add_page(integer, text, text) from public; -grant execute on function add_page(integer, text, text) to admin; - -commit; diff --git a/deploy/edit_page.sql b/deploy/edit_page.sql deleted file mode 100644 index 4a423be..0000000 --- a/deploy/edit_page.sql +++ /dev/null @@ -1,24 +0,0 @@ --- Deploy camper:edit_page to pg --- requires: roles --- requires: schema_camper --- requires: page - -begin; - -set search_path to camper, public; - -create or replace function edit_page(slug uuid, title text, content text) returns uuid as -$$ - update page - set title = edit_page.title - , content = xmlparse(content edit_page.content) - where slug = edit_page.slug - returning slug; -$$ - language sql -; - -revoke execute on function edit_page(uuid, text, text) from public; -grant execute on function edit_page(uuid, text, text) to admin; - -commit; diff --git a/deploy/page.sql b/deploy/page.sql deleted file mode 100644 index 028c350..0000000 --- a/deploy/page.sql +++ /dev/null @@ -1,57 +0,0 @@ --- Deploy camper:page to pg --- requires: roles --- requires: schema_camper --- requires: company --- requires: user_profile - -begin; - -set search_path to camper, public; - -create table page ( - page_id serial primary key, - company_id integer not null references company, - slug uuid not null unique default gen_random_uuid(), - title text not null constraint title_not_empty check(length(trim(title)) > 0), - content xml not null default '' -); - -grant select on table page to guest; -grant select on table page to employee; -grant select, insert, update, delete on table page to admin; - -grant usage on sequence page_page_id_seq to admin; - -alter table page enable row level security; - -create policy guest_ok -on page -for select -using (true) -; - -create policy insert_to_company -on page -for insert -with check ( - company_id in (select company_id from user_profile) -) -; - -create policy update_company -on page -for update -using ( - company_id in (select company_id from user_profile) -) -; - -create policy delete_from_company -on page -for delete -using ( - company_id in (select company_id from user_profile) -) -; - -commit; diff --git a/pkg/app/admin.go b/pkg/app/admin.go index 2165f90..a2ec2ce 100644 --- a/pkg/app/admin.go +++ b/pkg/app/admin.go @@ -12,19 +12,16 @@ import ( "dev.tandem.ws/tandem/camper/pkg/campsite" "dev.tandem.ws/tandem/camper/pkg/database" httplib "dev.tandem.ws/tandem/camper/pkg/http" - "dev.tandem.ws/tandem/camper/pkg/page" "dev.tandem.ws/tandem/camper/pkg/template" ) type adminHandler struct { campsite *campsite.AdminHandler - page *page.AdminHandler } func newAdminHandler() *adminHandler { return &adminHandler{ campsite: campsite.NewAdminHandler(), - page: page.NewAdminHandler(), } } @@ -46,8 +43,6 @@ func (h *adminHandler) Handle(user *auth.User, company *auth.Company, conn *data switch head { case "campsites": h.campsite.Handler(user, company, conn).ServeHTTP(w, r) - case "pages": - h.page.Handler(user, company, conn).ServeHTTP(w, r) case "": switch r.Method { case http.MethodGet: diff --git a/pkg/app/public.go b/pkg/app/public.go index 37a3255..fa7bd8e 100644 --- a/pkg/app/public.go +++ b/pkg/app/public.go @@ -12,19 +12,16 @@ import ( "dev.tandem.ws/tandem/camper/pkg/campsite" "dev.tandem.ws/tandem/camper/pkg/database" httplib "dev.tandem.ws/tandem/camper/pkg/http" - "dev.tandem.ws/tandem/camper/pkg/page" "dev.tandem.ws/tandem/camper/pkg/template" ) type publicHandler struct { campsite *campsite.PublicHandler - page *page.PublicHandler } func newPublicHandler() *publicHandler { return &publicHandler{ campsite: campsite.NewPublicHandler(), - page: page.NewPublicHandler(), } } @@ -38,8 +35,6 @@ func (h *publicHandler) Handler(user *auth.User, company *auth.Company, conn *da home.MustRender(w, r, user, company, conn) case "campsites": h.campsite.Handler(user, company, conn).ServeHTTP(w, r) - case "pages": - h.page.Handler(user, company, conn).ServeHTTP(w, r) default: http.NotFound(w, r) } diff --git a/pkg/page/admin.go b/pkg/page/admin.go deleted file mode 100644 index c512d8c..0000000 --- a/pkg/page/admin.go +++ /dev/null @@ -1,183 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 jordi fita mas - * SPDX-License-Identifier: AGPL-3.0-only - */ - -package page - -import ( - "context" - "net/http" - - "dev.tandem.ws/tandem/camper/pkg/auth" - "dev.tandem.ws/tandem/camper/pkg/database" - "dev.tandem.ws/tandem/camper/pkg/form" - httplib "dev.tandem.ws/tandem/camper/pkg/http" - "dev.tandem.ws/tandem/camper/pkg/locale" - "dev.tandem.ws/tandem/camper/pkg/template" - "dev.tandem.ws/tandem/camper/pkg/uuid" -) - -type AdminHandler struct { -} - -func NewAdminHandler() *AdminHandler { - return &AdminHandler{} -} - -func (h *AdminHandler) Handler(user *auth.User, company *auth.Company, conn *database.Conn) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - var head string - head, r.URL.Path = httplib.ShiftPath(r.URL.Path) - switch head { - case "new": - switch r.Method { - case http.MethodGet: - f := newPageForm() - f.MustRender(w, r, user, company) - default: - httplib.MethodNotAllowed(w, r, http.MethodGet) - } - case "": - switch r.Method { - case http.MethodGet: - servePageIndex(w, r, user, company, conn) - case http.MethodPost: - f := newPageForm() - f.Handle(w, r, user, company, func(ctx context.Context) { - conn.MustExec(ctx, "select add_page($1, $2, $3)", company.ID, f.Title, f.Content) - }) - default: - httplib.MethodNotAllowed(w, r, http.MethodGet, http.MethodPost) - } - default: - if !uuid.Valid(head) { - http.NotFound(w, r) - return - } - f := newPageForm() - if err := f.FillFromDatabase(r.Context(), conn, head); err != nil { - if database.ErrorIsNotFound(err) { - http.NotFound(w, r) - return - } - panic(err) - } - switch r.Method { - case http.MethodGet: - f.MustRender(w, r, user, company) - case http.MethodPut: - f.Handle(w, r, user, company, func(ctx context.Context) { - conn.MustExec(ctx, "select edit_page($1, $2, $3)", f.Slug, f.Title, f.Content) - }) - default: - httplib.MethodNotAllowed(w, r, http.MethodGet, http.MethodPut) - } - } - }) -} - -func servePageIndex(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company, conn *database.Conn) { - pages, err := collectPageEntries(r.Context(), company, conn) - if err != nil { - panic(err) - } - page := &pageIndex{ - Pages: pages, - } - page.MustRender(w, r, user, company) -} - -type pageEntry struct { - Slug string - Title string -} - -func collectPageEntries(ctx context.Context, company *auth.Company, conn *database.Conn) ([]*pageEntry, error) { - rows, err := conn.Query(ctx, "select slug, title from page where company_id = $1", company.ID) - if err != nil { - return nil, err - } - defer rows.Close() - - var types []*pageEntry - for rows.Next() { - entry := &pageEntry{} - if err = rows.Scan(&entry.Slug, &entry.Title); err != nil { - return nil, err - } - types = append(types, entry) - } - - return types, nil -} - -type pageIndex struct { - Pages []*pageEntry -} - -func (index *pageIndex) MustRender(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company) { - template.MustRenderAdmin(w, r, user, company, "page/index.gohtml", index) -} - -type pageForm struct { - Slug string - Title *form.Input - Content *form.Input -} - -func newPageForm() *pageForm { - return &pageForm{ - Title: &form.Input{ - Name: "title", - }, - Content: &form.Input{ - Name: "content", - }, - } -} - -func (f *pageForm) FillFromDatabase(ctx context.Context, conn *database.Conn, slug string) error { - f.Slug = slug - row := conn.QueryRow(ctx, "select title, content from page where slug = $1", slug) - return row.Scan(&f.Title.Val, &f.Content.Val) -} - -func (f *pageForm) Parse(r *http.Request) error { - if err := r.ParseForm(); err != nil { - return err - } - f.Title.FillValue(r) - f.Content.FillValue(r) - return nil -} - -func (f *pageForm) Valid(l *locale.Locale) bool { - v := form.NewValidator(l) - v.CheckRequired(f.Title, l.GettextNoop("Title can not be empty.")) - return v.AllOK -} - -func (f *pageForm) MustRender(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company) { - template.MustRenderAdmin(w, r, user, company, "page/form.gohtml", f) -} - -func (f *pageForm) Handle(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company, exec func(ctx context.Context)) { - if err := f.Parse(r); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - if err := user.VerifyCSRFToken(r); err != nil { - http.Error(w, err.Error(), http.StatusForbidden) - return - } - if !f.Valid(user.Locale) { - if !httplib.IsHTMxRequest(r) { - w.WriteHeader(http.StatusUnprocessableEntity) - } - f.MustRender(w, r, user, company) - return - } - exec(r.Context()) - httplib.Redirect(w, r, "/admin/pages", http.StatusSeeOther) -} diff --git a/pkg/page/public.go b/pkg/page/public.go deleted file mode 100644 index 851dd0e..0000000 --- a/pkg/page/public.go +++ /dev/null @@ -1,72 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 jordi fita mas - * SPDX-License-Identifier: AGPL-3.0-only - */ - -package page - -import ( - "context" - gotemplate "html/template" - "net/http" - - "dev.tandem.ws/tandem/camper/pkg/auth" - "dev.tandem.ws/tandem/camper/pkg/database" - httplib "dev.tandem.ws/tandem/camper/pkg/http" - "dev.tandem.ws/tandem/camper/pkg/template" - "dev.tandem.ws/tandem/camper/pkg/uuid" -) - -type PublicHandler struct { -} - -func NewPublicHandler() *PublicHandler { - return &PublicHandler{} -} - -func (h *PublicHandler) Handler(user *auth.User, company *auth.Company, conn *database.Conn) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - var head string - head, r.URL.Path = httplib.ShiftPath(r.URL.Path) - - switch r.Method { - case http.MethodGet: - if !uuid.Valid(head) { - http.NotFound(w, r) - return - } - page, err := newPublicPage(r.Context(), conn, head) - if database.ErrorIsNotFound(err) { - http.NotFound(w, r) - } else if err != nil { - panic(err) - } - page.MustRender(w, r, user, company, conn) - default: - httplib.MethodNotAllowed(w, r, http.MethodGet) - } - }) -} - -type publicPage struct { - *template.PublicPage - Title string - Content gotemplate.HTML -} - -func newPublicPage(ctx context.Context, conn *database.Conn, slug string) (*publicPage, error) { - page := &publicPage{ - PublicPage: template.NewPublicPage(), - } - row := conn.QueryRow(ctx, "select title, content::text from page where slug = $1", slug) - if err := row.Scan(&page.Title, &page.Content); err != nil { - return nil, err - } - - return page, nil -} - -func (p *publicPage) MustRender(w http.ResponseWriter, r *http.Request, user *auth.User, company *auth.Company, conn *database.Conn) { - p.Setup(r, user, company, conn) - template.MustRenderPublic(w, r, user, company, "page.gohtml", p) -} diff --git a/revert/add_page.sql b/revert/add_page.sql deleted file mode 100644 index 9551278..0000000 --- a/revert/add_page.sql +++ /dev/null @@ -1,7 +0,0 @@ --- Revert camper:add_page from pg - -begin; - -drop function if exists camper.add_page(integer, text, text); - -commit; diff --git a/revert/edit_page.sql b/revert/edit_page.sql deleted file mode 100644 index 3e513d4..0000000 --- a/revert/edit_page.sql +++ /dev/null @@ -1,7 +0,0 @@ --- Revert camper:edit_page from pg - -begin; - -drop function if exists camper.edit_page(uuid, text, text); - -commit; diff --git a/revert/page.sql b/revert/page.sql deleted file mode 100644 index 7ea87ff..0000000 --- a/revert/page.sql +++ /dev/null @@ -1,7 +0,0 @@ --- Revert camper:page from pg - -begin; - -drop table if exists camper.page; - -commit; diff --git a/sqitch.plan b/sqitch.plan index 52c4447..c932fb2 100644 --- a/sqitch.plan +++ b/sqitch.plan @@ -42,6 +42,3 @@ change_password [roles schema_auth schema_camper user] 2023-07-21T23:54:52Z jord campsite_type [roles schema_camper company user_profile] 2023-07-31T11:20:29Z jordi fita mas # Add relation of campsite type add_campsite_type [roles schema_camper campsite_type company] 2023-08-04T16:14:48Z jordi fita mas # Add function to create campsite types edit_campsite_type [roles schema_camper campsite_type company] 2023-08-07T22:21:34Z jordi fita mas # Add function to edit campsite types -page [roles schema_camper company user_profile] 2023-08-08T15:50:26Z jordi fita mas # Add relation for public page -add_page [roles schema_camper page] 2023-08-08T17:20:15Z jordi fita mas # Add function to create pages -edit_page [roles schema_camper page] 2023-08-08T17:26:51Z jordi fita mas # Add function to edit pages diff --git a/test/add_page.sql b/test/add_page.sql deleted file mode 100644 index 26cd2bf..0000000 --- a/test/add_page.sql +++ /dev/null @@ -1,56 +0,0 @@ --- Test add_page -set client_min_messages to warning; -create extension if not exists pgtap; -reset client_min_messages; - -begin; - -set search_path to camper, public; - -select plan(12); - -select has_function('camper', 'add_page', array ['integer', 'text', 'text']); -select function_lang_is('camper', 'add_page', array ['integer', 'text', 'text'], 'sql'); -select function_returns('camper', 'add_page', array ['integer', 'text', 'text'], 'uuid'); -select isnt_definer('camper', 'add_page', array ['integer', 'text', 'text']); -select volatility_is('camper', 'add_page', array ['integer', 'text', 'text'], 'volatile'); -select function_privs_are('camper', 'add_page', array ['integer', 'text', 'text'], 'guest', array[]::text[]); -select function_privs_are('camper', 'add_page', array ['integer', 'text', 'text'], 'employee', array[]::text[]); -select function_privs_are('camper', 'add_page', array ['integer', 'text', 'text'], 'admin', array['EXECUTE']); -select function_privs_are('camper', 'add_page', array ['integer', 'text', 'text'], 'authenticator', array[]::text[]); - - -set client_min_messages to warning; -truncate page cascade; -truncate company cascade; -reset client_min_messages; - - -insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, country_code, currency_code, default_lang_tag) -values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', 'ES', 'EUR', 'ca') - , (2, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', 'FR', 'USD', 'ca') -; - -select lives_ok( - $$ select add_page(1, 'Page A', '

This is what, exactly?

Dunno

') $$, - 'Should be able to add a page to the first company' -); - -select lives_ok( - $$ select add_page(2, 'Page B', '') $$, - 'Should be able to add a page to the second company' -); - -select bag_eq( - $$ select company_id, title, content::text from page $$, - $$ values (1, 'Page A', '

This is what, exactly?

Dunno

') - , (2, 'Page B', '') - $$, - 'Should have added all two pages' -); - - -select * -from finish(); - -rollback; diff --git a/test/edit_page.sql b/test/edit_page.sql deleted file mode 100644 index 19a331b..0000000 --- a/test/edit_page.sql +++ /dev/null @@ -1,60 +0,0 @@ --- Test edit_page -set client_min_messages to warning; -create extension if not exists pgtap; -reset client_min_messages; - -begin; - -set search_path to camper, public; - -select plan(12); - -select has_function('camper', 'edit_page', array ['uuid', 'text', 'text']); -select function_lang_is('camper', 'edit_page', array ['uuid', 'text', 'text'], 'sql'); -select function_returns('camper', 'edit_page', array ['uuid', 'text', 'text'], 'uuid'); -select isnt_definer('camper', 'edit_page', array ['uuid', 'text', 'text']); -select volatility_is('camper', 'edit_page', array ['uuid', 'text', 'text'], 'volatile'); -select function_privs_are('camper', 'edit_page', array ['uuid', 'text', 'text'], 'guest', array[]::text[]); -select function_privs_are('camper', 'edit_page', array ['uuid', 'text', 'text'], 'employee', array[]::text[]); -select function_privs_are('camper', 'edit_page', array ['uuid', 'text', 'text'], 'admin', array['EXECUTE']); -select function_privs_are('camper', 'edit_page', array ['uuid', 'text', 'text'], 'authenticator', array[]::text[]); - - -set client_min_messages to warning; -truncate page cascade; -truncate company cascade; -reset client_min_messages; - - -insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, country_code, currency_code, default_lang_tag) -values (1, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', 'ES', 'EUR', 'ca') -; - -insert into page (company_id, slug, title, content) -values (1, '87452b88-b48f-48d3-bb6c-0296de64164e', 'Page A', '

A

') - , (1, '9b6370f7-f941-46f2-bc6e-de455675bd0a', 'Page B', '

B

') -; - -select lives_ok( - $$ select edit_page('87452b88-b48f-48d3-bb6c-0296de64164e', 'Page 1', '

1

') $$, - 'Should be able to edit the first type' -); - -select lives_ok( - $$ select edit_page('9b6370f7-f941-46f2-bc6e-de455675bd0a', 'Page 2', '

2

') $$, - 'Should be able to edit the second type' -); - -select bag_eq( - $$ select slug::text, title, content::text from page $$, - $$ values ('87452b88-b48f-48d3-bb6c-0296de64164e', 'Page 1', '

1

') - , ('9b6370f7-f941-46f2-bc6e-de455675bd0a', 'Page 2', '

2

') - $$, - 'Should have updated all pages.' -); - - -select * -from finish(); - -rollback; diff --git a/test/page.sql b/test/page.sql deleted file mode 100644 index f502263..0000000 --- a/test/page.sql +++ /dev/null @@ -1,199 +0,0 @@ --- Test page -set client_min_messages to warning; -create extension if not exists pgtap; -reset client_min_messages; - -begin; - -select plan(51); - -set search_path to camper, public; - -select has_table('page'); -select has_pk('page'); -select table_privs_are('page', 'guest', array['SELECT']); -select table_privs_are('page', 'employee', array['SELECT']); -select table_privs_are('page', 'admin', array['SELECT', 'INSERT', 'UPDATE', 'DELETE']); -select table_privs_are('page', 'authenticator', array[]::text[]); - -select has_sequence('page_page_id_seq'); -select sequence_privs_are('page_page_id_seq', 'guest', array[]::text[]); -select sequence_privs_are('page_page_id_seq', 'employee', array[]::text[]); -select sequence_privs_are('page_page_id_seq', 'admin', array['USAGE']); -select sequence_privs_are('page_page_id_seq', 'authenticator', array[]::text[]); - -select has_column('page', 'page_id'); -select col_is_pk('page', 'page_id'); -select col_type_is('page', 'page_id', 'integer'); -select col_not_null('page', 'page_id'); -select col_has_default('page', 'page_id'); -select col_default_is('page', 'page_id', 'nextval(''page_page_id_seq''::regclass)'); - -select has_column('page', 'company_id'); -select col_is_fk('page', 'company_id'); -select fk_ok('page', 'company_id', 'company', 'company_id'); -select col_type_is('page', 'company_id', 'integer'); -select col_not_null('page', 'company_id'); -select col_hasnt_default('page', 'company_id'); - -select has_column('page', 'slug'); -select col_is_unique('page', 'slug'); -select col_type_is('page', 'slug', 'uuid'); -select col_not_null('page', 'slug'); -select col_has_default('page', 'slug'); -select col_default_is('page', 'slug', 'gen_random_uuid()'); - -select has_column('page', 'title'); -select col_type_is('page', 'title', 'text'); -select col_not_null('page', 'title'); -select col_hasnt_default('page', 'title'); - -select has_column('page', 'content'); -select col_type_is('page', 'content', 'xml'); -select col_not_null('page', 'content'); -select col_has_default('page', 'content'); ---select col_default_is('page', 'description', ''); - - -set client_min_messages to warning; -truncate page cascade; -truncate company_host cascade; -truncate company_user cascade; -truncate company cascade; -truncate auth."user" cascade; -reset client_min_messages; - -insert into auth."user" (user_id, email, name, password, cookie, cookie_expires_at) -values (1, 'demo@tandem.blog', 'Demo', 'test', '44facbb30d8a419dfd4bfbc44a4b5539d4970148dfc84bed0e', current_timestamp + interval '1 month') - , (5, 'admin@tandem.blog', 'Demo', 'test', '12af4c88b528c2ad4222e3740496ecbc58e76e26f087657524', current_timestamp + interval '1 month') -; - -insert into company (company_id, business_name, vatin, trade_name, phone, email, web, address, city, province, postal_code, country_code, currency_code, default_lang_tag) -values (2, 'Company 2', 'XX123', '', '555-555-555', 'a@a', '', '', '', '', '', 'ES', 'EUR', 'ca') - , (4, 'Company 4', 'XX234', '', '666-666-666', 'b@b', '', '', '', '', '', 'FR', 'USD', 'ca') -; - -insert into company_user (company_id, user_id, role) -values (2, 1, 'admin') - , (4, 5, 'admin') -; - -insert into company_host (company_id, host) -values (2, 'co2') - , (4, 'co4') -; - -insert into page (company_id, title) -values (2, 'Front') - , (4, 'Back') -; - -prepare page_data as -select company_id, title -from page -order by company_id, title; - -set role guest; -select bag_eq( - 'page_data', - $$ values (2, 'Front') - , (4, 'Back') - $$, - 'Everyone should be able to list all pages across all companies' -); -reset role; - -select set_cookie('44facbb30d8a419dfd4bfbc44a4b5539d4970148dfc84bed0e/demo@tandem.blog', 'co2'); - -select lives_ok( - $$ insert into page(company_id, title) values (2, 'Another page' ) $$, - 'Admin from company 2 should be able to insert a new page to that company.' -); - -select bag_eq( - 'page_data', - $$ values (2, 'Front') - , (2, 'Another page') - , (4, 'Back') - $$, - 'The new row should have been added' -); - -select lives_ok( - $$ update page set title = 'Another' where company_id = 2 and title = 'Another page' $$, - 'Admin from company 2 should be able to update pages of that company.' -); - -select bag_eq( - 'page_data', - $$ values (2, 'Front') - , (2, 'Another') - , (4, 'Back') - $$, - 'The row should have been updated.' -); - -select lives_ok( - $$ delete from page where company_id = 2 and title = 'Another' $$, - 'Admin from company 2 should be able to delete pages from that company.' -); - -select bag_eq( - 'page_data', - $$ values (2, 'Front') - , (4, 'Back') - $$, - 'The row should have been deleted.' -); - -select throws_ok( - $$ insert into page (company_id, title) values (4, 'Another page' ) $$, - '42501', 'new row violates row-level security policy for table "page"', - 'Admin from company 2 should NOT be able to insert new pages to company 4.' -); - -select lives_ok( - $$ update page set title = 'Nope' where company_id = 4 $$, - 'Admin from company 2 should not be able to update new pages of company 4, but no error if company_id is not changed.' -); - -select bag_eq( - 'page_data', - $$ values (2, 'Front') - , (4, 'Back') - $$, - 'No row should have been changed.' -); - -select throws_ok( - $$ update page set company_id = 4 where company_id = 2 $$, - '42501', 'new row violates row-level security policy for table "page"', - 'Admin from company 2 should NOT be able to move pages to company 4' -); - -select lives_ok( - $$ delete from page where company_id = 4 $$, - 'Admin from company 2 should NOT be able to delete pages from company 4, but not error is thrown' -); - -select bag_eq( - 'page_data', - $$ values (2, 'Front') - , (4, 'Back') - $$, - 'No row should have been changed' -); - -select throws_ok( - $$ insert into page (company_id, title) values (2, ' ' ) $$, - '23514', 'new row for relation "page" violates check constraint "title_not_empty"', - 'Should not be able to insert pages with a blank title.' -); - - -reset role; -select * -from finish(); - -rollback; - diff --git a/verify/add_page.sql b/verify/add_page.sql deleted file mode 100644 index 36bc9ee..0000000 --- a/verify/add_page.sql +++ /dev/null @@ -1,7 +0,0 @@ --- Verify camper:add_page on pg - -begin; - -select has_function_privilege('camper.add_page(integer, text, text)', 'execute'); - -rollback; diff --git a/verify/edit_page.sql b/verify/edit_page.sql deleted file mode 100644 index 016d310..0000000 --- a/verify/edit_page.sql +++ /dev/null @@ -1,7 +0,0 @@ --- Verify camper:edit_page on pg - -begin; - -select has_function_privilege('camper.edit_page(uuid, text, text)', 'execute'); - -rollback; diff --git a/verify/page.sql b/verify/page.sql deleted file mode 100644 index 342dc21..0000000 --- a/verify/page.sql +++ /dev/null @@ -1,19 +0,0 @@ --- Verify camper:page on pg - -begin; - -select page_id - , company_id - , slug - , title - , content -from camper.page -where false; - -select 1 / count(*) from pg_class where oid = 'camper.page'::regclass and relrowsecurity; -select 1 / count(*) from pg_policy where polname = 'guest_ok' and polrelid = 'camper.page'::regclass; -select 1 / count(*) from pg_policy where polname = 'insert_to_company' and polrelid = 'camper.page'::regclass; -select 1 / count(*) from pg_policy where polname = 'update_company' and polrelid = 'camper.page'::regclass; -select 1 / count(*) from pg_policy where polname = 'delete_from_company' and polrelid = 'camper.page'::regclass; - -rollback; diff --git a/web/static/camper.js b/web/static/camper.js index a8a6c6b..2f71a55 100644 --- a/web/static/camper.js +++ b/web/static/camper.js @@ -74,40 +74,44 @@ ready(function () { ready(function () { const textareas = document.querySelectorAll('textarea.html'); - for (const textarea of textareas) { - const canvas = document.createElement('div'); - textarea.parentNode.insertBefore(canvas, textarea.nextSibling); - textarea.style.display = 'none'; - - const textareaStorage = (editor) => { - editor.Storage.add('textarea', { - load() { - editor.setComponents(textarea.value); - }, - store(data) { - const component = editor.Pages.getSelected().getMainComponent(); - textarea.value = component.getInnerHTML(); - }, - }); + if (textareas.length > 0) { + const language = document.documentElement.getAttribute('lang'); + const script = document.head.appendChild(Object.assign(document.createElement('script'), { + src: '/static/ckeditor5@39.0.1/ckeditor.js', + })); + document.head.appendChild(Object.assign(document.createElement('style'), { + innerHTML: '.ck-content { margin-left: 5rem; }', + })); + if (language !== 'en') { + document.head.appendChild(Object.assign(document.createElement('script'), { + src: '/static/ckeditor5@39.0.1/translations/' + language + '.js', + })); } + script.addEventListener('load', function () { + for (const textarea of textareas) { + const canvas = document.createElement('div'); + textarea.parentNode.insertBefore(canvas, textarea.nextSibling); + textarea.style.display = 'none'; - const editor = grapesjs.init({ - container: canvas, - height: '500px', - width: 'auto', - plugins: [ - textareaStorage, - 'gjs-blocks-basic', - 'grapesjs-plugin-ckeditor', - 'grapesjs-preset-webpage', - ], - storageManager: { - type: 'textarea', - autosave: true, - autoload: true, - stepsBeforeSave: 1, - }, + BalloonEditor + .create(canvas, { + language, + }) + .then(editor => { + const xml = document.createElement('div'); + const serializer = new XMLSerializer(); + editor.setData(textarea.value); + editor.ui.focusTracker.on('change:isFocused', (event, name, focused) => { + if (!focused) { + xml.innerHTML = editor.getData(); + textarea.value = serializer.serializeToString(xml).replace(' ', ' '); + } + }); + }) + .catch(error => { + console.error(error); + }); + } }); } - }) diff --git a/web/static/ckeditor5@39.0.1/ckeditor.js b/web/static/ckeditor5@39.0.1/ckeditor.js new file mode 100644 index 0000000..7c65aa7 --- /dev/null +++ b/web/static/ckeditor5@39.0.1/ckeditor.js @@ -0,0 +1,7 @@ +!function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{"%0 of %1":"%0 of %1",Accept:"Accept","Align cell text to the bottom":"Align cell text to the bottom","Align cell text to the center":"Align cell text to the center","Align cell text to the left":"Align cell text to the left","Align cell text to the middle":"Align cell text to the middle","Align cell text to the right":"Align cell text to the right","Align cell text to the top":"Align cell text to the top","Align table to the left":"Align table to the left","Align table to the right":"Align table to the right",Alignment:"Alignment",Aquamarine:"Aquamarine",Background:"Background",Black:"Black","Block quote":"Block quote",Blue:"Blue",Bold:"Bold",Border:"Border","Break text":"Break text","Bulleted List":"Bulleted List","Bulleted list styles toolbar":"Bulleted list styles toolbar",Cancel:"Cancel","Cannot access default workspace.":"Cannot access default workspace.","Cannot determine a category for the uploaded file.":"Cannot determine a category for the uploaded file.","Cannot upload file:":"Cannot upload file:","Caption for image: %0":"Caption for image: %0","Caption for the image":"Caption for the image","Cell properties":"Cell properties","Center table":"Center table","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading",Circle:"Circle",Code:"Code",Color:"Color","Color picker":"Color picker",Column:"Column","Could not insert image at the current position.":"Could not insert image at the current position.","Could not obtain resized image URL.":"Could not obtain resized image URL.",Dashed:"Dashed",Decimal:"Decimal","Decimal with leading zero":"Decimal with leading zero","Decrease indent":"Decrease indent","Delete column":"Delete column","Delete row":"Delete row","Dim grey":"Dim grey",Dimensions:"Dimensions",Disc:"Disc",Dotted:"Dotted",Double:"Double",Downloadable:"Downloadable","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Editor block content toolbar":"Editor block content toolbar","Editor contextual toolbar":"Editor contextual toolbar","Editor editing area: %0":"Editor editing area: %0","Editor toolbar":"Editor toolbar","Enter image caption":"Enter image caption","Enter table caption":"Enter table caption","Full size image":"Full size image",Green:"Green",Grey:"Grey",Groove:"Groove","Header column":"Header column","Header row":"Header row",Heading:"Heading","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3","Heading 4":"Heading 4","Heading 5":"Heading 5","Heading 6":"Heading 6",Height:"Height",HEX:"HEX","Horizontal text alignment toolbar":"Horizontal text alignment toolbar","Image resize list":"Image resize list","Image toolbar":"Image toolbar","image widget":"image widget","In line":"In line","Increase indent":"Increase indent",Insert:"Insert","Insert column left":"Insert column left","Insert column right":"Insert column right","Insert image":"Insert image","Insert image or file":"Insert image or file","Insert image via URL":"Insert image via URL","Insert media":"Insert media","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block","Insert row above":"Insert row above","Insert row below":"Insert row below","Insert table":"Insert table","Inserting image failed":"Inserting image failed",Inset:"Inset",Italic:"Italic","Justify cell text":"Justify cell text","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link image":"Link image","Link URL":"Link URL","List properties":"List properties","Lower-latin":"Lower-latin","Lower–roman":"Lower–roman","Media toolbar":"Media toolbar","Media URL":"Media URL","media widget":"media widget","Merge cell down":"Merge cell down","Merge cell left":"Merge cell left","Merge cell right":"Merge cell right","Merge cell up":"Merge cell up","Merge cells":"Merge cells",Next:"Next",None:"None","Numbered List":"Numbered List","Numbered list styles toolbar":"Numbered list styles toolbar","Open file manager":"Open file manager","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab","Open media in new tab":"Open media in new tab",Orange:"Orange",Original:"Original",Outset:"Outset",Padding:"Padding",Paragraph:"Paragraph","Paste the media URL in the input.":"Paste the media URL in the input.","Press Enter to type after or press Shift + Enter to type before the widget":"Press Enter to type after or press Shift + Enter to type before the widget",Previous:"Previous",Purple:"Purple",Red:"Red",Redo:"Redo","Remove color":"Remove color","Resize image":"Resize image","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size","Restore default":"Restore default","Reversed order":"Reversed order","Rich Text Editor":"Rich Text Editor","Rich Text Editor. Editing area: %0":"Rich Text Editor. Editing area: %0",Ridge:"Ridge","Right aligned image":"Right aligned image",Row:"Row",Save:"Save","Select all":"Select all","Select column":"Select column","Select row":"Select row","Selecting resized image failed":"Selecting resized image failed","Show more items":"Show more items","Side image":"Side image",Solid:"Solid","Split cell horizontally":"Split cell horizontally","Split cell vertically":"Split cell vertically",Square:"Square","Start at":"Start at","Start index must be greater than 0.":"Start index must be greater than 0.",Strikethrough:"Strikethrough",Style:"Style",Subscript:"Subscript",Superscript:"Superscript","Table alignment toolbar":"Table alignment toolbar","Table cell text alignment":"Table cell text alignment","Table properties":"Table properties","Table toolbar":"Table toolbar","Text alternative":"Text alternative",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".',"The URL must not be empty.":"The URL must not be empty.",'The value is invalid. Try "10px" or "2em" or simply "2".':'The value is invalid. Try "10px" or "2em" or simply "2".',"This link has no URL":"This link has no URL","This media URL is not supported.":"This media URL is not supported.","Tip: Paste the URL into the content to embed faster.":"Tip: Paste the URL into the content to embed faster.","To-do List":"To-do List","Toggle caption off":"Toggle caption off","Toggle caption on":"Toggle caption on","Toggle the circle list style":"Toggle the circle list style","Toggle the decimal list style":"Toggle the decimal list style","Toggle the decimal with leading zero list style":"Toggle the decimal with leading zero list style","Toggle the disc list style":"Toggle the disc list style","Toggle the lower–latin list style":"Toggle the lower–latin list style","Toggle the lower–roman list style":"Toggle the lower–roman list style","Toggle the square list style":"Toggle the square list style","Toggle the upper–latin list style":"Toggle the upper–latin list style","Toggle the upper–roman list style":"Toggle the upper–roman list style",Turquoise:"Turquoise","Type or paste your content here.":"Type or paste your content here.","Type your title":"Type your title",Underline:"Underline",Undo:"Undo",Unlink:"Unlink",Update:"Update","Update image URL":"Update image URL","Upload failed":"Upload failed","Upload in progress":"Upload in progress","Upper-latin":"Upper-latin","Upper-roman":"Upper-roman","Vertical text alignment toolbar":"Vertical text alignment toolbar",White:"White","Widget toolbar":"Widget toolbar",Width:"Width","Wrap text":"Wrap text",Yellow:"Yellow"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})), +/*! + * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved. + * For licensing, see LICENSE.md. + */ +function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.BalloonEditor=e():t.BalloonEditor=e()}(self,(()=>(()=>{var t={4959:(t,e,n)=>{const o=n(1103),i={};for(const t of Object.keys(o))i[o[t]]=t;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"]}};t.exports=r;for(const t of Object.keys(r)){if(!("channels"in r[t]))throw new Error("missing channels property: "+t);if(!("labels"in r[t]))throw new Error("missing channel labels property: "+t);if(r[t].labels.length!==r[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=r[t];delete r[t].channels,delete r[t].labels,Object.defineProperty(r[t],"channels",{value:e}),Object.defineProperty(r[t],"labels",{value:n})}r.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,i=Math.min(e,n,o),r=Math.max(e,n,o),s=r-i;let a,c;r===i?a=0:e===r?a=(n-o)/s:n===r?a=2+(o-e)/s:o===r&&(a=4+(e-n)/s),a=Math.min(60*a,360),a<0&&(a+=360);const l=(i+r)/2;return c=r===i?0:l<=.5?s/(r+i):s/(2-r-i),[a,100*c,100*l]},r.rgb.hsv=function(t){let e,n,o,i,r;const s=t[0]/255,a=t[1]/255,c=t[2]/255,l=Math.max(s,a,c),d=l-Math.min(s,a,c),h=function(t){return(l-t)/6/d+.5};return 0===d?(i=0,r=0):(r=d/l,e=h(s),n=h(a),o=h(c),s===l?i=o-n:a===l?i=1/3+e-o:c===l&&(i=2/3+n-e),i<0?i+=1:i>1&&(i-=1)),[360*i,100*r,100*l]},r.rgb.hwb=function(t){const e=t[0],n=t[1];let o=t[2];const i=r.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(n,o));return o=1-1/255*Math.max(e,Math.max(n,o)),[i,100*s,100*o]},r.rgb.cmyk=function(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,i=Math.min(1-e,1-n,1-o);return[100*((1-e-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*((1-o-i)/(1-i)||0),100*i]},r.rgb.keyword=function(t){const e=i[t];if(e)return e;let n,r=1/0;for(const e of Object.keys(o)){const i=o[e],c=(a=i,((s=t)[0]-a[0])**2+(s[1]-a[1])**2+(s[2]-a[2])**2);c.04045?((e+.055)/1.055)**2.4:e/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92;return[100*(.4124*e+.3576*n+.1805*o),100*(.2126*e+.7152*n+.0722*o),100*(.0193*e+.1192*n+.9505*o)]},r.rgb.lab=function(t){const e=r.rgb.xyz(t);let n=e[0],o=e[1],i=e[2];n/=95.047,o/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*o-16,500*(n-o),200*(o-i)]},r.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,o=t[2]/100;let i,r,s;if(0===n)return s=255*o,[s,s,s];i=o<.5?o*(1+n):o+n-o*n;const a=2*o-i,c=[0,0,0];for(let t=0;t<3;t++)r=e+1/3*-(t-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,c[t]=255*s;return c},r.hsl.hsv=function(t){const e=t[0];let n=t[1]/100,o=t[2]/100,i=n;const r=Math.max(o,.01);o*=2,n*=o<=1?o:2-o,i*=r<=1?r:2-r;return[e,100*(0===o?2*i/(r+i):2*n/(o+n)),100*((o+n)/2)]},r.hsv.rgb=function(t){const e=t[0]/60,n=t[1]/100;let o=t[2]/100;const i=Math.floor(e)%6,r=e-Math.floor(e),s=255*o*(1-n),a=255*o*(1-n*r),c=255*o*(1-n*(1-r));switch(o*=255,i){case 0:return[o,c,s];case 1:return[a,o,s];case 2:return[s,o,c];case 3:return[s,a,o];case 4:return[c,s,o];case 5:return[o,s,a]}},r.hsv.hsl=function(t){const e=t[0],n=t[1]/100,o=t[2]/100,i=Math.max(o,.01);let r,s;s=(2-n)*o;const a=(2-n)*i;return r=n*i,r/=a<=1?a:2-a,r=r||0,s/=2,[e,100*r,100*s]},r.hwb.rgb=function(t){const e=t[0]/360;let n=t[1]/100,o=t[2]/100;const i=n+o;let r;i>1&&(n/=i,o/=i);const s=Math.floor(6*e),a=1-o;r=6*e-s,0!=(1&s)&&(r=1-r);const c=n+r*(a-n);let l,d,h;switch(s){default:case 6:case 0:l=a,d=c,h=n;break;case 1:l=c,d=a,h=n;break;case 2:l=n,d=a,h=c;break;case 3:l=n,d=c,h=a;break;case 4:l=c,d=n,h=a;break;case 5:l=a,d=n,h=c}return[255*l,255*d,255*h]},r.cmyk.rgb=function(t){const e=t[0]/100,n=t[1]/100,o=t[2]/100,i=t[3]/100;return[255*(1-Math.min(1,e*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,o*(1-i)+i))]},r.xyz.rgb=function(t){const e=t[0]/100,n=t[1]/100,o=t[2]/100;let i,r,s;return i=3.2406*e+-1.5372*n+-.4986*o,r=-.9689*e+1.8758*n+.0415*o,s=.0557*e+-.204*n+1.057*o,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(t){let e=t[0],n=t[1],o=t[2];e/=95.047,n/=100,o/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;return[116*n-16,500*(e-n),200*(n-o)]},r.lab.xyz=function(t){let e,n,o;n=(t[0]+16)/116,e=t[1]/500+n,o=n-t[2]/200;const i=n**3,r=e**3,s=o**3;return n=i>.008856?i:(n-16/116)/7.787,e=r>.008856?r:(e-16/116)/7.787,o=s>.008856?s:(o-16/116)/7.787,e*=95.047,n*=100,o*=108.883,[e,n,o]},r.lab.lch=function(t){const e=t[0],n=t[1],o=t[2];let i;i=360*Math.atan2(o,n)/2/Math.PI,i<0&&(i+=360);return[e,Math.sqrt(n*n+o*o),i]},r.lch.lab=function(t){const e=t[0],n=t[1],o=t[2]/360*2*Math.PI;return[e,n*Math.cos(o),n*Math.sin(o)]},r.rgb.ansi16=function(t,e=null){const[n,o,i]=t;let s=null===e?r.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),0===s)return 30;let a=30+(Math.round(i/255)<<2|Math.round(o/255)<<1|Math.round(n/255));return 2===s&&(a+=60),a},r.hsv.ansi16=function(t){return r.rgb.ansi16(r.hsv.rgb(t),t[2])},r.rgb.ansi256=function(t){const e=t[0],n=t[1],o=t[2];if(e===n&&n===o)return e<8?16:e>248?231:Math.round((e-8)/247*24)+232;return 16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(o/255*5)},r.ansi16.rgb=function(t){let e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},r.ansi256.rgb=function(t){if(t>=232){const e=10*(t-232)+8;return[e,e,e]}let e;t-=16;return[Math.floor(t/36)/5*255,Math.floor((e=t%36)/6)/5*255,e%6/5*255]},r.rgb.hex=function(t){const e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},r.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let n=e[0];3===e[0].length&&(n=n.split("").map((t=>t+t)).join(""));const o=parseInt(n,16);return[o>>16&255,o>>8&255,255&o]},r.rgb.hcg=function(t){const e=t[0]/255,n=t[1]/255,o=t[2]/255,i=Math.max(Math.max(e,n),o),r=Math.min(Math.min(e,n),o),s=i-r;let a,c;return a=s<1?r/(1-s):0,c=s<=0?0:i===e?(n-o)/s%6:i===n?2+(o-e)/s:4+(e-n)/s,c/=6,c%=1,[360*c,100*s,100*a]},r.hsl.hcg=function(t){const e=t[1]/100,n=t[2]/100,o=n<.5?2*e*n:2*e*(1-n);let i=0;return o<1&&(i=(n-.5*o)/(1-o)),[t[0],100*o,100*i]},r.hsv.hcg=function(t){const e=t[1]/100,n=t[2]/100,o=e*n;let i=0;return o<1&&(i=(n-o)/(1-o)),[t[0],100*o,100*i]},r.hcg.rgb=function(t){const e=t[0]/360,n=t[1]/100,o=t[2]/100;if(0===n)return[255*o,255*o,255*o];const i=[0,0,0],r=e%1*6,s=r%1,a=1-s;let c=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 c=(1-n)*o,[255*(n*i[0]+c),255*(n*i[1]+c),255*(n*i[2]+c)]},r.hcg.hsv=function(t){const e=t[1]/100,n=e+t[2]/100*(1-e);let o=0;return n>0&&(o=e/n),[t[0],100*o,100*n]},r.hcg.hsl=function(t){const e=t[1]/100,n=t[2]/100*(1-e)+.5*e;let o=0;return n>0&&n<.5?o=e/(2*n):n>=.5&&n<1&&(o=e/(2*(1-n))),[t[0],100*o,100*n]},r.hcg.hwb=function(t){const e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},r.hwb.hcg=function(t){const e=t[1]/100,n=1-t[2]/100,o=n-e;let i=0;return o<1&&(i=(n-o)/(1-o)),[t[0],100*o,100*i]},r.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},r.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},r.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},r.gray.hsl=function(t){return[0,0,t[0]]},r.gray.hsv=r.gray.hsl,r.gray.hwb=function(t){return[0,100,t[0]]},r.gray.cmyk=function(t){return[0,0,0,t[0]]},r.gray.lab=function(t){return[t[0],0,0]},r.gray.hex=function(t){const e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},r.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}},841:(t,e,n)=>{const o=n(4959),i=n(9325),r={};Object.keys(o).forEach((t=>{r[t]={},Object.defineProperty(r[t],"channels",{value:o[t].channels}),Object.defineProperty(r[t],"labels",{value:o[t].labels});const e=i(t);Object.keys(e).forEach((n=>{const o=e[n];r[t][n]=function(t){const e=function(...e){const n=e[0];if(null==n)return n;n.length>1&&(e=n);const o=t(e);if("object"==typeof o)for(let t=o.length,e=0;e1&&(e=n),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(o)}))})),t.exports=r},9325:(t,e,n)=>{const o=n(4959);function i(t){const e=function(){const t={},e=Object.keys(o);for(let n=e.length,o=0;o{"use strict";t.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]}},8603:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-basic-styles/theme/code.css"],names:[],mappings:"AAKA,iBACC,kCAAuC,CAEvC,iBAAkB,CADlB,aAED,CAEA,0CACC,kCACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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},3062:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../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-2023, 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},7657:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-block-toolbar-button{transform:translateX(calc(var(--ck-spacing-large)*-1))}","",{version:3,sources:["webpack://./theme/theme.css"],names:[],mappings:"AAMA,4BACC,sDACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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/* Give the block toolbar button some space, moving it a few pixels away from the editable area. */\n.ck.ck-block-toolbar-button {\n\ttransform: translateX( calc(-1 * var(--ck-spacing-large)) );\n}\n"],sourceRoot:""}]);const a=s},903:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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}',"",{version:3,sources:["webpack://./../ckeditor5-clipboard/theme/clipboard.css","webpack://./../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,CChCA,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,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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-2023, 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-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(var(--ck-clipboard-drop-target-dot-height) * -.5);\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'],sourceRoot:""}]);const a=s},4717:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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}.ck .ck-placeholder:before,.ck.ck-placeholder:before{color:var(--ck-color-engine-placeholder-text);cursor:text}","",{version:3,sources:["webpack://./../ckeditor5-engine/theme/placeholder.css","webpack://./../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,CC5BC,qDAEC,6CAA8C,CAD9C,WAED",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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-2023, 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, .ck .ck-placeholder {\n\t&::before {\n\t\tcursor: text;\n\t\tcolor: var(--ck-color-engine-placeholder-text);\n\t}\n}\n"],sourceRoot:""}]);const a=s},9315:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}","",{version:3,sources:["webpack://./../ckeditor5-engine/theme/renderer.css"],names:[],mappings:"AAMA,qDACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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},8733:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{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://./../ckeditor5-heading/theme/heading.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-heading/heading.css"],names:[],mappings:"AAKA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,+BACC,eACD,CCZC,2EACC,SACD,CAEA,uEACC,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, 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 {\n\tfont-size: 20px;\n}\n\n.ck.ck-heading_heading2 {\n\tfont-size: 17px;\n}\n\n.ck.ck-heading_heading3 {\n\tfont-size: 14px;\n}\n\n.ck[class*="ck-heading_heading"] {\n\tfont-weight: bold;\n}\n',"/*\n * Copyright (c) 2003-2023, 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},3508:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-content .image{clear:both;display:table;margin:.9em auto;min-width:50px;text-align:center}.ck-content .image img{display:block;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-inline.ck-widget_selected,.ck.ck-editor__editable .image.ck-widget_selected{z-index:1}.ck.ck-editor__editable .image-inline.ck-widget_selected ::selection{display:none}.ck.ck-editor__editable td .image-inline img,.ck.ck-editor__editable th .image-inline img{max-width:none}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/image.css"],names:[],mappings:"AAMC,mBAEC,UAAW,CADX,aAAc,CAOd,gBAAkB,CAGlB,cAAe,CARf,iBAuBD,CAbC,uBAEC,aAAc,CAGd,aAAc,CAGd,cAAe,CAGf,cACD,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,CAWA,2GACC,SAUD,CAHC,qEACC,YACD,CAOA,0FACC,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, 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\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\n\t/*\n\t * Make sure the selected inline image always stays on top of its siblings.\n\t * See https://github.com/ckeditor/ckeditor5/issues/9108.\n\t */\n\t& .image.ck-widget_selected {\n\t\tz-index: 1;\n\t}\n\n\t& .image-inline.ck-widget_selected {\n\t\tz-index: 1;\n\n\t\t/*\n\t\t * Make sure the native browser selection style is not displayed.\n\t\t * Inline image widgets have their own styles for the selected state and\n\t\t * leaving this up to the browser is asking for a visual collision.\n\t\t */\n\t\t& ::selection {\n\t\t\tdisplay: none;\n\t\t}\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},2640:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-color-image-caption-background:#f7f7f7;--ck-color-image-caption-text:#333;--ck-color-image-caption-highligted-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}.ck.ck-editor__editable .image>figcaption.image__caption_highlighted{animation:ck-image-caption-highlight .6s ease-out}@keyframes ck-image-caption-highlight{0%{background-color:var(--ck-color-image-caption-highligted-background)}to{background-color:var(--ck-color-image-caption-background)}}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imagecaption.css"],names:[],mappings:"AAKA,MACC,2CAAoD,CACpD,kCAA8C,CAC9C,mDACD,CAGA,8BAKC,yDAA0D,CAH1D,mBAAoB,CAEpB,wCAAyC,CAHzC,qBAAsB,CAMtB,eAAgB,CAChB,mBAAoB,CAFpB,YAAa,CAHb,qBAMD,CAGA,qEACC,iDACD,CAEA,sCACC,GACC,oEACD,CAEA,GACC,yDACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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-caption-background: hsl(0, 0%, 97%);\n\t--ck-color-image-caption-text: hsl(0, 0%, 20%);\n\t--ck-color-image-caption-highligted-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\n/* Editing styles */\n.ck.ck-editor__editable .image > figcaption.image__caption_highlighted {\n\tanimation: ck-image-caption-highlight .6s ease-out;\n}\n\n@keyframes ck-image-caption-highlight {\n\t0% {\n\t\tbackground-color: var(--ck-color-image-caption-highligted-background);\n\t}\n\n\t100% {\n\t\tbackground-color: var(--ck-color-image-caption-background);\n\t}\n}\n"],sourceRoot:""}]);const a=s},3535:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-image-insert__panel{padding:var(--ck-spacing-large)}.ck.ck-image-insert__ck-finder-button{border:1px solid #ccc;border-radius:var(--ck-border-radius);display:block;margin:var(--ck-spacing-standard) auto;width:100%}.ck.ck-splitbutton>.ck-file-dialog-button.ck-button{border:none;margin:0;padding:0}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imageinsert.css"],names:[],mappings:"AAKA,2BACC,+BACD,CAEA,sCAIC,qBAAiC,CACjC,qCAAsC,CAJtC,aAAc,CAEd,sCAAuC,CADvC,UAID,CAGA,oDAGC,WAAY,CADZ,QAAS,CADT,SAGD",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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__panel {\n\tpadding: var(--ck-spacing-large);\n}\n\n.ck.ck-image-insert__ck-finder-button {\n\tdisplay: block;\n\twidth: 100%;\n\tmargin: var(--ck-spacing-standard) auto;\n\tborder: 1px solid hsl(0, 0%, 80%);\n\tborder-radius: var(--ck-border-radius);\n}\n\n/* https://github.com/ckeditor/ckeditor5/issues/7986 */\n.ck.ck-splitbutton > .ck-file-dialog-button.ck-button {\n\tpadding: 0;\n\tmargin: 0;\n\tborder: none;\n}\n"],sourceRoot:""}]);const a=s},1568:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-image-insert-form:focus{outline:none}.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-image-insert-form__action-row{margin-top:var(--ck-spacing-standard)}.ck.ck-form__row.ck-image-insert-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-image-insert-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row.ck-image-insert-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}","",{version:3,sources:["webpack://./../ckeditor5-image/theme/imageinsertformrowview.css"],names:[],mappings:"AAMC,+BAEC,YACD,CAGD,iBACC,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CACjB,6BAmBD,CAhBC,iCACC,WACD,CAEA,kDACC,qCAUD,CARC,sIAEC,sBACD,CAEA,+EACC,0BACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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-form {\n\t&:focus {\n\t\t/* See: https://github.com/ckeditor/ckeditor5/issues/4773 */\n\t\toutline: none;\n\t}\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-image-insert-form__action-row {\n\t\tmargin-top: var(--ck-spacing-standard);\n\n\t\t& .ck-button-save,\n\t\t& .ck-button-cancel {\n\t\t\tjustify-content: center;\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"],sourceRoot:""}]);const a=s},6270:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".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://./../ckeditor5-image/theme/imageresize.css"],names:[],mappings:"AAKA,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-2023, 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 .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},5083:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,":root{--ck-image-style-spacing:1.5em;--ck-inline-image-style-spacing:calc(var(--ck-image-style-spacing)/2)}.ck-content .image-style-block-align-left,.ck-content .image-style-block-align-right{max-width:calc(100% - var(--ck-image-style-spacing))}.ck-content .image-style-align-left,.ck-content .image-style-align-right{clear:none}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing);max-width:50%}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}.ck-content .image-style-block-align-right{margin-left:auto;margin-right:0}.ck-content .image-style-block-align-left{margin-left:0;margin-right:auto}.ck-content p+.image-style-align-left,.ck-content p+.image-style-align-right,.ck-content p+.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://./../ckeditor5-image/theme/imagestyle.css"],names:[],mappings:"AAKA,MACC,8BAA+B,CAC/B,qEACD,CAMC,qFAEC,oDACD,CAIA,yEAEC,UACD,CAEA,8BACC,WAAY,CACZ,yCAA0C,CAC1C,aACD,CAEA,oCACC,UAAW,CACX,0CACD,CAEA,sCACC,gBAAiB,CACjB,iBACD,CAEA,qCACC,WAAY,CACZ,yCACD,CAEA,2CAEC,gBAAiB,CADjB,cAED,CAEA,0CACC,aAAc,CACd,iBACD,CAGA,6GAGC,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-2023, 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/* Provides a minimal side margin for the left and right aligned images, so that the user has a visual feedback\n\tconfirming successful application of the style if image width exceeds the editor's size.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9342 */\n\t& .image-style-block-align-left,\n\t& .image-style-block-align-right {\n\t\tmax-width: calc(100% - var(--ck-image-style-spacing));\n\t}\n\n\t/* Allows displaying multiple floating images in the same line.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9183#issuecomment-804988132 */\n\t& .image-style-align-left,\n\t& .image-style-align-right {\n\t\tclear: none;\n\t}\n\n\t& .image-style-side {\n\t\tfloat: right;\n\t\tmargin-left: var(--ck-image-style-spacing);\n\t\tmax-width: 50%;\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-center {\n\t\tmargin-left: auto;\n\t\tmargin-right: auto;\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& .image-style-block-align-right {\n\t\tmargin-right: 0;\n\t\tmargin-left: auto;\n\t}\n\n\t& .image-style-block-align-left {\n\t\tmargin-left: 0;\n\t\tmargin-right: auto;\n\t}\n\n\t/* Simulates margin collapsing with the preceding paragraph, which does not work for the floating elements. */\n\t& p + .image-style-align-left,\n\t& p + .image-style-align-right,\n\t& p + .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},4036:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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}@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://./../ckeditor5-image/theme/imageuploadicon.css","webpack://./../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,mFA0BD,CAtBC,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,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-2023, 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-2023, 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\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},3773:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-image/theme/imageuploadloader.css","webpack://./../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-2023, 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-2023, 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},3689:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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}.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://./../ckeditor5-image/theme/imageuploadprogress.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadprogress.css"],names:[],mappings:"AAMC,qEAEC,iBACD,CAGA,uGAIC,MAAO,CAFP,iBAAkB,CAClB,KAED,CCRC,yFACC,oBACD,CAID,uGAIC,gDAAiD,CAFjD,UAAW,CAGX,oBAAuB,CAFvB,OAGD,CAGD,kBACC,GAAO,SAAY,CACnB,GAAO,SAAY,CACpB",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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-2023, 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\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},1905:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-image/theme/textalternativeform.css","webpack://./../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-2023, 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-2023, 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},9773:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../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-2023, 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},2347:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-link/theme/linkactions.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../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-2023, 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-2023, 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-2023, 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},7754:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-link-form{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:var(--ck-spacing-standard) 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://./../ckeditor5-link/theme/linkform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-link/linkform.css"],names:[],mappings:"AAOA,iBACC,YAiBD,CAfC,2BACC,YACD,CCNA,oCDCD,iBAQE,cAUF,CARE,wCACC,eACD,CAEA,4BACC,cACD,CCfD,CDuBD,iCACC,aAYD,CALE,wHAEC,mCACD,CE/BF,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,yDAUD,CARC,wEACC,SAAU,CACV,UAKD,CAHC,8EACC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, 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\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-2023, 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-2023, 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: var(--ck-spacing-standard) 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},111:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0ibTExLjA3NyAxNSAuOTkxLTEuNDE2YS43NS43NSAwIDEgMSAxLjIyOS44NmwtMS4xNDggMS42NGEuNzQ4Ljc0OCAwIDAgMS0uMjE3LjIwNiA1LjI1MSA1LjI1MSAwIDAgMS04LjUwMy01Ljk1NS43NDEuNzQxIDAgMCAxIC4xMi0uMjc0bDEuMTQ3LTEuNjM5YS43NS43NSAwIDEgMSAxLjIyOC44Nkw0LjkzMyAxMC43bC4wMDYuMDAzYTMuNzUgMy43NSAwIDAgMCA2LjEzMiA0LjI5NGwuMDA2LjAwNHptNS40OTQtNS4zMzVhLjc0OC43NDggMCAwIDEtLjEyLjI3NGwtMS4xNDcgMS42MzlhLjc1Ljc1IDAgMSAxLTEuMjI4LS44NmwuODYtMS4yM2EzLjc1IDMuNzUgMCAwIDAtNi4xNDQtNC4zMDFsLS44NiAxLjIyOWEuNzUuNzUgMCAwIDEtMS4yMjktLjg2bDEuMTQ4LTEuNjRhLjc0OC43NDggMCAwIDEgLjIxNy0uMjA2IDUuMjUxIDUuMjUxIDAgMCAxIDguNTAzIDUuOTU1em0tNC41NjMtMi41MzJhLjc1Ljc1IDAgMCAxIC4xODQgMS4wNDVsLTMuMTU1IDQuNTA1YS43NS43NSAwIDEgMS0xLjIyOS0uODZsMy4xNTUtNC41MDZhLjc1Ljc1IDAgMCAxIDEuMDQ1LS4xODR6Ii8+PC9zdmc+");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://./../ckeditor5-link/theme/linkimage.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-link/linkimage.css"],names:[],mappings:"AASE,+FACC,aAAc,CACd,iBACD,CCPF,MAEC,sCAAuC,CACvC,oEACD,CAME,+FAUC,+BAAqC,CACrC,83BAA+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-2023, 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-2023, 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 a=s},4721:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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;padding:var(--ck-spacing-medium) var(--ck-spacing-large);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:0 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://./../ckeditor5-list/theme/collapsible.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-list/collapsible.css"],names:[],mappings:"AAMC,sEACC,YACD,CCHD,MACC,yDACD,CAGC,iCAIC,eAAgB,CAChB,aAAc,CAHd,eAAiB,CACjB,wDAAyD,CAFzD,UAoBD,CAdC,uCACC,sBACD,CAEA,wIACC,sBAAuB,CACvB,wBAAyB,CACzB,eACD,CAEA,0CACC,qCAAsC,CACtC,sCACD,CAGD,6CACC,yDACD,CAGC,mEACC,wBACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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-2023, 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\tpadding: var(--ck-spacing-medium) var(--ck-spacing-large);\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: 0 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},5730:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-editor__editable .ck-list-bogus-paragraph{display:block}","",{version:3,sources:["webpack://./../ckeditor5-list/theme/documentlist.css"],names:[],mappings:"AAKA,8CACC,aACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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},4564:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../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-2023, 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},6082:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../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-2023, 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},2417:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-list/theme/liststyles.css","webpack://./../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-2023, 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-2023, 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},1199:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,':root{--ck-todo-list-checkmark-size:16px}.ck-content .todo-list{list-style:none}.ck-content .todo-list li{margin-bottom:5px}.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 .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,background .25s ease-in-out,border .25s ease-in-out;width:100%}.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}[dir=rtl] .todo-list .todo-list__label>input{left:0;margin-left:-15px;margin-right:0;right:-25px}.ck-editor__editable .todo-list .todo-list__label>input{cursor:pointer}.ck-editor__editable .todo-list .todo-list__label>input:hover:before{box-shadow:0 0 0 5px rgba(0,0,0,.1)}',"",{version:3,sources:["webpack://./../ckeditor5-list/theme/todolist.css"],names:[],mappings:"AAKA,MACC,kCACD,CAEA,uBACC,eA0ED,CAxEC,0BACC,iBAKD,CAHC,qCACC,cACD,CAIA,+CACC,uBAAwB,CAQxB,QAAS,CAPT,oBAAqB,CAGrB,yCAA0C,CAO1C,UAAW,CAGX,aAAc,CAFd,kBAAmB,CAVnB,iBAAkB,CAWlB,OAAQ,CARR,qBAAsB,CAFtB,wCAqDD,CAxCC,sDAOC,qBAAiC,CACjC,iBAAkB,CALlB,qBAAsB,CACtB,UAAW,CAHX,aAAc,CAKd,WAAY,CAJZ,iBAAkB,CAOlB,0FAAgG,CAJhG,UAKD,CAEA,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,CAIF,wEACC,qBACD,CAKF,6CACC,MAAO,CAGP,iBAAkB,CAFlB,cAAe,CACf,WAED,CAMA,wDACC,cAKD,CAHC,qEACC,mCACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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.ck-content .todo-list {\n\tlist-style: none;\n\n\t& li {\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-webkit-appearance: none;\n\t\t\tdisplay: inline-block;\n\t\t\tposition: relative;\n\t\t\twidth: var(--ck-todo-list-checkmark-size);\n\t\t\theight: var(--ck-todo-list-checkmark-size);\n\t\t\tvertical-align: middle;\n\n\t\t\t/* Needed on iOS */\n\t\t\tborder: 0;\n\n\t\t\t/* LTR styles */\n\t\t\tleft: -25px;\n\t\t\tmargin-right: -15px;\n\t\t\tright: 0;\n\t\t\tmargin-left: 0;\n\n\t\t\t&::before {\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tcontent: '';\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tborder: 1px solid hsl(0, 0%, 20%);\n\t\t\t\tborder-radius: 2px;\n\t\t\t\ttransition: 250ms ease-in-out box-shadow, 250ms ease-in-out background, 250ms ease-in-out border;\n\t\t\t}\n\n\t\t\t&::after {\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tbox-sizing: content-box;\n\t\t\t\tpointer-events: none;\n\t\t\t\tcontent: '';\n\n\t\t\t\t/* Calculate tick position, size and border-width proportional to the checkmark size. */\n\t\t\t\tleft: calc( var(--ck-todo-list-checkmark-size) / 3 );\n\t\t\t\ttop: calc( var(--ck-todo-list-checkmark-size) / 5.3 );\n\t\t\t\twidth: calc( var(--ck-todo-list-checkmark-size) / 5.3 );\n\t\t\t\theight: calc( var(--ck-todo-list-checkmark-size) / 2.6 );\n\t\t\t\tborder-style: solid;\n\t\t\t\tborder-color: transparent;\n\t\t\t\tborder-width: 0 calc( var(--ck-todo-list-checkmark-size) / 8 ) calc( var(--ck-todo-list-checkmark-size) / 8 ) 0;\n\t\t\t\ttransform: rotate(45deg);\n\t\t\t}\n\n\t\t\t&[checked] {\n\t\t\t\t&::before {\n\t\t\t\t\tbackground: hsl(126, 64%, 41%);\n\t\t\t\t\tborder-color: hsl(126, 64%, 41%);\n\t\t\t\t}\n\n\t\t\t\t&::after {\n\t\t\t\t\tborder-color: hsl(0, 0%, 100%);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t& .todo-list__label__description {\n\t\t\tvertical-align: middle;\n\t\t}\n\t}\n}\n\n/* RTL styles */\n[dir=\"rtl\"] .todo-list .todo-list__label > input {\n\tleft: 0;\n\tmargin-right: 0;\n\tright: -25px;\n\tmargin-left: -15px;\n}\n\n/*\n * To-do list should be interactive only during the editing\n * (https://github.com/ckeditor/ckeditor5/issues/2090).\n */\n.ck-editor__editable .todo-list .todo-list__label > input {\n\tcursor: pointer;\n\n\t&:hover::before {\n\t\tbox-shadow: 0 0 0 5px hsla(0, 0%, 0%, 0.1);\n\t}\n}\n"],sourceRoot:""}]);const a=s},4652:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-content .media{clear:both;display:block;margin:.9em 0;min-width:15em}","",{version:3,sources:["webpack://./../ckeditor5-media-embed/theme/mediaembed.css"],names:[],mappings:"AAKA,mBAGC,UAAW,CASX,aAAc,CAJd,aAAe,CAQf,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, 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 .media {\n\t/* Don\'t allow floated content overlap the media.\n\thttps://github.com/ckeditor/ckeditor5-media-embed/issues/53 */\n\tclear: both;\n\n\t/* Make sure there is some space between the content and the media. */\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 0;\n\n\t/* Make sure media is not overriden with Bootstrap default `flex` value.\n\tSee: https://github.com/ckeditor/ckeditor5/issues/1373. */\n\tdisplay: block;\n\n\t/* Give the media some minimal width in the content to prevent them\n\tfrom being "squashed" in tight spaces, e.g. in table cells (#44) */\n\tmin-width: 15em;\n}\n'],sourceRoot:""}]);const a=s},7442:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,'.ck-media__wrapper .ck-media__placeholder{align-items:center;display:flex;flex-direction:column}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url{max-width:100%;position:relative}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text{display:block;overflow:hidden}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="goo.gl/maps"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="maps.app.goo.gl"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="maps.google.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck-media__placeholder__icon *{display:none}.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper>:not(.ck-media__placeholder),.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder{pointer-events:none}:root{--ck-media-embed-placeholder-icon-size:3em;--ck-color-media-embed-placeholder-url-text:#757575;--ck-color-media-embed-placeholder-url-text-hover:var(--ck-color-base-text)}.ck-media__wrapper{margin:0 auto}.ck-media__wrapper .ck-media__placeholder{background:var(--ck-color-base-foreground);padding:calc(var(--ck-spacing-standard)*3)}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon{background-position:50%;background-size:cover;height:var(--ck-media-embed-placeholder-icon-size);margin-bottom:var(--ck-spacing-large);min-width:var(--ck-media-embed-placeholder-icon-size)}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon .ck-icon{height:100%;width:100%}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url__text{color:var(--ck-color-media-embed-placeholder-url-text);font-style:italic;text-align:center;text-overflow:ellipsis;white-space:nowrap}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:var(--ck-color-media-embed-placeholder-url-text-hover);cursor:pointer;text-decoration:underline}.ck-media__wrapper[data-oembed-url*="open.spotify.com"]{max-height:380px;max-width:300px}.ck-media__wrapper[data-oembed-url*="goo.gl/maps"] .ck-media__placeholder__icon,.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon,.ck-media__wrapper[data-oembed-url*="maps.app.goo.gl"] .ck-media__placeholder__icon,.ck-media__wrapper[data-oembed-url*="maps.google.com"] .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSkgc2NhbGUoLjk4MDEyKSI+PHJlY3Qgcnk9IjUuMjM4IiByeD0iNS4yMzgiIHk9IjIzMS4zOTkiIHg9IjE3Ni4wMzEiIGhlaWdodD0iNjAuMDk5IiB3aWR0aD0iNjAuMDk5IiBmaWxsPSIjMzRhNjY4IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Im0yMDYuNDc3IDI2MC45LTI4Ljk4NyAyOC45ODdhNS4yMTggNS4yMTggMCAwIDAgMy43OCAxLjYxaDQ5LjYyMWMxLjY5NCAwIDMuMTktLjc5OCA0LjE0Ni0yLjAzN3oiIGZpbGw9IiM1Yzg4YzUiLz48cGF0aCBkPSJNMjI2Ljc0MiAyMjIuOTg4Yy05LjI2NiAwLTE2Ljc3NyA3LjE3LTE2Ljc3NyAxNi4wMTQuMDA3IDIuNzYyLjY2MyA1LjQ3NCAyLjA5MyA3Ljg3NS40My43MDMuODMgMS40MDggMS4xOSAyLjEwNy4zMzMuNTAyLjY1IDEuMDA1Ljk1IDEuNTA4LjM0My40NzcuNjczLjk1Ny45ODggMS40NCAxLjMxIDEuNzY5IDIuNSAzLjUwMiAzLjYzNyA1LjE2OC43OTMgMS4yNzUgMS42ODMgMi42NCAyLjQ2NiAzLjk5IDIuMzYzIDQuMDk0IDQuMDA3IDguMDkyIDQuNiAxMy45MTR2LjAxMmMuMTgyLjQxMi41MTYuNjY2Ljg3OS42NjcuNDAzLS4wMDEuNzY4LS4zMTQuOTMtLjc5OS42MDMtNS43NTYgMi4yMzgtOS43MjkgNC41ODUtMTMuNzk0Ljc4Mi0xLjM1IDEuNjczLTIuNzE1IDIuNDY1LTMuOTkgMS4xMzctMS42NjYgMi4zMjgtMy40IDMuNjM4LTUuMTY5LjMxNS0uNDgyLjY0NS0uOTYyLjk4OC0xLjQzOS4zLS41MDMuNjE3LTEuMDA2Ljk1LTEuNTA4LjM1OS0uNy43Ni0xLjQwNCAxLjE5LTIuMTA3IDEuNDI2LTIuNDAyIDItNS4xMTQgMi4wMDQtNy44NzUgMC04Ljg0NC03LjUxMS0xNi4wMTQtMTYuNzc2LTE2LjAxNHoiIGZpbGw9IiNkZDRiM2UiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PGVsbGlwc2Ugcnk9IjUuNTY0IiByeD0iNS44MjgiIGN5PSIyMzkuMDAyIiBjeD0iMjI2Ljc0MiIgZmlsbD0iIzgwMmQyNyIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJNMTkwLjMwMSAyMzcuMjgzYy00LjY3IDAtOC40NTcgMy44NTMtOC40NTcgOC42MDZzMy43ODYgOC42MDcgOC40NTcgOC42MDdjMy4wNDMgMCA0LjgwNi0uOTU4IDYuMzM3LTIuNTE2IDEuNTMtMS41NTcgMi4wODctMy45MTMgMi4wODctNi4yOSAwLS4zNjItLjAyMy0uNzIyLS4wNjQtMS4wNzloLTguMjU3djMuMDQzaDQuODVjLS4xOTcuNzU5LS41MzEgMS40NS0xLjA1OCAxLjk4Ni0uOTQyLjk1OC0yLjAyOCAxLjU0OC0zLjkwMSAxLjU0OC0yLjg3NiAwLTUuMjA4LTIuMzcyLTUuMjA4LTUuMjk5IDAtMi45MjYgMi4zMzItNS4yOTkgNS4yMDgtNS4yOTkgMS4zOTkgMCAyLjYxOC40MDcgMy41ODQgMS4yOTNsMi4zODEtMi4zOGMwLS4wMDItLjAwMy0uMDA0LS4wMDQtLjAwNS0xLjU4OC0xLjUyNC0zLjYyLTIuMjE1LTUuOTU1LTIuMjE1em00LjQzIDUuNjYuMDAzLjAwNnYtLjAwM3oiIGZpbGw9IiNmZmYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0ibTIxNS4xODQgMjUxLjkyOS03Ljk4IDcuOTc5IDI4LjQ3NyAyOC40NzVhNS4yMzMgNS4yMzMgMCAwIDAgLjQ0OS0yLjEyM3YtMzEuMTY1Yy0uNDY5LjY3NS0uOTM0IDEuMzQ5LTEuMzgyIDIuMDA1LS43OTIgMS4yNzUtMS42ODIgMi42NC0yLjQ2NSAzLjk5LTIuMzQ3IDQuMDY1LTMuOTgyIDguMDM4LTQuNTg1IDEzLjc5NC0uMTYyLjQ4NS0uNTI3Ljc5OC0uOTMuNzk5LS4zNjMtLjAwMS0uNjk3LS4yNTUtLjg3OS0uNjY3di0uMDEyYy0uNTkzLTUuODIyLTIuMjM3LTkuODItNC42LTEzLjkxNC0uNzgzLTEuMzUtMS42NzMtMi43MTUtMi40NjYtMy45OS0xLjEzNy0xLjY2Ni0yLjMyNy0zLjQtMy42MzctNS4xNjlsLS4wMDItLjAwM3oiIGZpbGw9IiNjM2MzYzMiLz48cGF0aCBkPSJtMjEyLjk4MyAyNDguNDk1LTM2Ljk1MiAzNi45NTN2LjgxMmE1LjIyNyA1LjIyNyAwIDAgMCA1LjIzOCA1LjIzOGgxLjAxNWwzNS42NjYtMzUuNjY2YTEzNi4yNzUgMTM2LjI3NSAwIDAgMC0yLjc2NC0zLjkgMzcuNTc1IDM3LjU3NSAwIDAgMC0uOTg5LTEuNDQgMzUuMTI3IDM1LjEyNyAwIDAgMC0uOTUtMS41MDhjLS4wODMtLjE2Mi0uMTc2LS4zMjYtLjI2NC0uNDg5eiIgZmlsbD0iI2ZkZGM0ZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJtMjExLjk5OCAyNjEuMDgzLTYuMTUyIDYuMTUxIDI0LjI2NCAyNC4yNjRoLjc4MWE1LjIyNyA1LjIyNyAwIDAgMCA1LjIzOS01LjIzOHYtMS4wNDV6IiBmaWxsPSIjZmZmIiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjwvZz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder{background:#4268b3}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik05NjcuNDg0IDBINTYuNTE3QzI1LjMwNCAwIDAgMjUuMzA0IDAgNTYuNTE3djkxMC45NjZDMCA5OTguNjk0IDI1LjI5NyAxMDI0IDU2LjUyMiAxMDI0SDU0N1Y2MjhINDE0VjQ3M2gxMzNWMzU5LjAyOWMwLTEzMi4yNjIgODAuNzczLTIwNC4yODIgMTk4Ljc1Ni0yMDQuMjgyIDU2LjUxMyAwIDEwNS4wODYgNC4yMDggMTE5LjI0NCA2LjA4OVYyOTlsLTgxLjYxNi4wMzdjLTYzLjk5MyAwLTc2LjM4NCAzMC40OTItNzYuMzg0IDc1LjIzNlY0NzNoMTUzLjQ4N2wtMTkuOTg2IDE1NUg3MDd2Mzk2aDI2MC40ODRjMzEuMjEzIDAgNTYuNTE2LTI1LjMwMyA1Ni41MTYtNTYuNTE2VjU2LjUxNUMxMDI0IDI1LjMwMyA5OTguNjk3IDAgOTY3LjQ4NCAwIiBmaWxsPSIjRkZGRkZFIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#cdf}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder{background:linear-gradient(-135deg,#1400c7,#b800b1,#f50000)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTA0IiBoZWlnaHQ9IjUwNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIC4xNTloNTAzLjg0MVY1MDMuOTRIMHoiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48cGF0aCBkPSJNMjUxLjkyMS4xNTljLTY4LjQxOCAwLTc2Ljk5Ny4yOS0xMDMuODY3IDEuNTE2LTI2LjgxNCAxLjIyMy00NS4xMjcgNS40ODItNjEuMTUxIDExLjcxLTE2LjU2NiA2LjQzNy0zMC42MTUgMTUuMDUxLTQ0LjYyMSAyOS4wNTYtMTQuMDA1IDE0LjAwNi0yMi42MTkgMjguMDU1LTI5LjA1NiA0NC42MjEtNi4yMjggMTYuMDI0LTEwLjQ4NyAzNC4zMzctMTEuNzEgNjEuMTUxQy4yOSAxNzUuMDgzIDAgMTgzLjY2MiAwIDI1Mi4wOGMwIDY4LjQxNy4yOSA3Ni45OTYgMS41MTYgMTAzLjg2NiAxLjIyMyAyNi44MTQgNS40ODIgNDUuMTI3IDExLjcxIDYxLjE1MSA2LjQzNyAxNi41NjYgMTUuMDUxIDMwLjYxNSAyOS4wNTYgNDQuNjIxIDE0LjAwNiAxNC4wMDUgMjguMDU1IDIyLjYxOSA0NC42MjEgMjkuMDU3IDE2LjAyNCA2LjIyNyAzNC4zMzcgMTAuNDg2IDYxLjE1MSAxMS43MDkgMjYuODcgMS4yMjYgMzUuNDQ5IDEuNTE2IDEwMy44NjcgMS41MTYgNjguNDE3IDAgNzYuOTk2LS4yOSAxMDMuODY2LTEuNTE2IDI2LjgxNC0xLjIyMyA0NS4xMjctNS40ODIgNjEuMTUxLTExLjcwOSAxNi41NjYtNi40MzggMzAuNjE1LTE1LjA1MiA0NC42MjEtMjkuMDU3IDE0LjAwNS0xNC4wMDYgMjIuNjE5LTI4LjA1NSAyOS4wNTctNDQuNjIxIDYuMjI3LTE2LjAyNCAxMC40ODYtMzQuMzM3IDExLjcwOS02MS4xNTEgMS4yMjYtMjYuODcgMS41MTYtMzUuNDQ5IDEuNTE2LTEwMy44NjYgMC02OC40MTgtLjI5LTc2Ljk5Ny0xLjUxNi0xMDMuODY3LTEuMjIzLTI2LjgxNC01LjQ4Mi00NS4xMjctMTEuNzA5LTYxLjE1MS02LjQzOC0xNi41NjYtMTUuMDUyLTMwLjYxNS0yOS4wNTctNDQuNjIxLTE0LjAwNi0xNC4wMDUtMjguMDU1LTIyLjYxOS00NC42MjEtMjkuMDU2LTE2LjAyNC02LjIyOC0zNC4zMzctMTAuNDg3LTYxLjE1MS0xMS43MUMzMjguOTE3LjQ0OSAzMjAuMzM4LjE1OSAyNTEuOTIxLjE1OVptMCA0NS4zOTFjNjcuMjY1IDAgNzUuMjMzLjI1NyAxMDEuNzk3IDEuNDY5IDI0LjU2MiAxLjEyIDM3LjkwMSA1LjIyNCA0Ni43NzggOC42NzQgMTEuNzU5IDQuNTcgMjAuMTUxIDEwLjAyOSAyOC45NjYgMTguODQ1IDguODE2IDguODE1IDE0LjI3NSAxNy4yMDcgMTguODQ1IDI4Ljk2NiAzLjQ1IDguODc3IDcuNTU0IDIyLjIxNiA4LjY3NCA0Ni43NzggMS4yMTIgMjYuNTY0IDEuNDY5IDM0LjUzMiAxLjQ2OSAxMDEuNzk4IDAgNjcuMjY1LS4yNTcgNzUuMjMzLTEuNDY5IDEwMS43OTctMS4xMiAyNC41NjItNS4yMjQgMzcuOTAxLTguNjc0IDQ2Ljc3OC00LjU3IDExLjc1OS0xMC4wMjkgMjAuMTUxLTE4Ljg0NSAyOC45NjYtOC44MTUgOC44MTYtMTcuMjA3IDE0LjI3NS0yOC45NjYgMTguODQ1LTguODc3IDMuNDUtMjIuMjE2IDcuNTU0LTQ2Ljc3OCA4LjY3NC0yNi41NiAxLjIxMi0zNC41MjcgMS40NjktMTAxLjc5NyAxLjQ2OS02Ny4yNzEgMC03NS4yMzctLjI1Ny0xMDEuNzk4LTEuNDY5LTI0LjU2Mi0xLjEyLTM3LjkwMS01LjIyNC00Ni43NzgtOC42NzQtMTEuNzU5LTQuNTctMjAuMTUxLTEwLjAyOS0yOC45NjYtMTguODQ1LTguODE1LTguODE1LTE0LjI3NS0xNy4yMDctMTguODQ1LTI4Ljk2Ni0zLjQ1LTguODc3LTcuNTU0LTIyLjIxNi04LjY3NC00Ni43NzgtMS4yMTItMjYuNTY0LTEuNDY5LTM0LjUzMi0xLjQ2OS0xMDEuNzk3IDAtNjcuMjY2LjI1Ny03NS4yMzQgMS40NjktMTAxLjc5OCAxLjEyLTI0LjU2MiA1LjIyNC0zNy45MDEgOC42NzQtNDYuNzc4IDQuNTctMTEuNzU5IDEwLjAyOS0yMC4xNTEgMTguODQ1LTI4Ljk2NiA4LjgxNS04LjgxNiAxNy4yMDctMTQuMjc1IDI4Ljk2Ni0xOC44NDUgOC44NzctMy40NSAyMi4yMTYtNy41NTQgNDYuNzc4LTguNjc0IDI2LjU2NC0xLjIxMiAzNC41MzItMS40NjkgMTAxLjc5OC0xLjQ2OVoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48cGF0aCBkPSJNMjUxLjkyMSAzMzYuMDUzYy00Ni4zNzggMC04My45NzQtMzcuNTk2LTgzLjk3NC04My45NzMgMC00Ni4zNzggMzcuNTk2LTgzLjk3NCA4My45NzQtODMuOTc0IDQ2LjM3NyAwIDgzLjk3MyAzNy41OTYgODMuOTczIDgzLjk3NCAwIDQ2LjM3Ny0zNy41OTYgODMuOTczLTgzLjk3MyA4My45NzNabTAtMjEzLjMzOGMtNzEuNDQ3IDAtMTI5LjM2NSA1Ny45MTgtMTI5LjM2NSAxMjkuMzY1IDAgNzEuNDQ2IDU3LjkxOCAxMjkuMzY0IDEyOS4zNjUgMTI5LjM2NCA3MS40NDYgMCAxMjkuMzY0LTU3LjkxOCAxMjkuMzY0LTEyOS4zNjQgMC03MS40NDctNTcuOTE4LTEyOS4zNjUtMTI5LjM2NC0xMjkuMzY1Wk00MTYuNjI3IDExNy42MDRjMCAxNi42OTYtMTMuNTM1IDMwLjIzLTMwLjIzMSAzMC4yMy0xNi42OTUgMC0zMC4yMy0xMy41MzQtMzAuMjMtMzAuMjMgMC0xNi42OTYgMTMuNTM1LTMwLjIzMSAzMC4yMy0zMC4yMzEgMTYuNjk2IDAgMzAuMjMxIDEzLjUzNSAzMC4yMzEgMzAuMjMxIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#ffe0fe}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder{background:linear-gradient(90deg,#71c6f4,#0d70a5)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MDAgNDAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0MDAgNDAwIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBkPSJNNDAwIDIwMGMwIDExMC41LTg5LjUgMjAwLTIwMCAyMDBTMCAzMTAuNSAwIDIwMCA4OS41IDAgMjAwIDBzMjAwIDg5LjUgMjAwIDIwMHpNMTYzLjQgMzA1LjVjODguNyAwIDEzNy4yLTczLjUgMTM3LjItMTM3LjIgMC0yLjEgMC00LjItLjEtNi4yIDkuNC02LjggMTcuNi0xNS4zIDI0LjEtMjUtOC42IDMuOC0xNy45IDYuNC0yNy43IDcuNiAxMC02IDE3LjYtMTUuNCAyMS4yLTI2LjctOS4zIDUuNS0xOS42IDkuNS0zMC42IDExLjctOC44LTkuNC0yMS4zLTE1LjItMzUuMi0xNS4yLTI2LjYgMC00OC4yIDIxLjYtNDguMiA0OC4yIDAgMy44LjQgNy41IDEuMyAxMS00MC4xLTItNzUuNi0yMS4yLTk5LjQtNTAuNC00LjEgNy4xLTYuNSAxNS40LTYuNSAyNC4yIDAgMTYuNyA4LjUgMzEuNSAyMS41IDQwLjEtNy45LS4yLTE1LjMtMi40LTIxLjgtNnYuNmMwIDIzLjQgMTYuNiA0Mi44IDM4LjcgNDcuMy00IDEuMS04LjMgMS43LTEyLjcgMS43LTMuMSAwLTYuMS0uMy05LjEtLjkgNi4xIDE5LjIgMjMuOSAzMy4xIDQ1IDMzLjUtMTYuNSAxMi45LTM3LjMgMjAuNi01OS45IDIwLjYtMy45IDAtNy43LS4yLTExLjUtLjcgMjEuMSAxMy44IDQ2LjUgMjEuOCA3My43IDIxLjgiIHN0eWxlPSJmaWxsOiNmZmYiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text{color:#b8e6ff}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}',"",{version:3,sources:["webpack://./../ckeditor5-media-embed/theme/mediaembedediting.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-media-embed/mediaembedediting.css"],names:[],mappings:"AAMC,0CAGC,kBAAmB,CAFnB,YAAa,CACb,qBAcD,CAXC,sEAEC,cAAe,CAEf,iBAMD,CAJC,wGAEC,aAAc,CADd,eAED,CAWD,6kBACC,YACD,CAYF,2LACC,mBACD,CC1CA,MACC,0CAA2C,CAE3C,mDAA4D,CAC5D,2EACD,CAEA,mBACC,aA+FD,CA7FC,0CAEC,0CAA2C,CAD3C,0CA6BD,CA1BC,uEAIC,uBAA2B,CAC3B,qBAAsB,CAHtB,kDAAmD,CACnD,qCAAsC,CAFtC,qDAUD,CAJC,gFAEC,WAAY,CADZ,UAED,CAGD,4EACC,sDAAuD,CAGvD,iBAAkB,CADlB,iBAAkB,CAElB,sBAAuB,CAHvB,kBAUD,CALC,kFACC,4DAA6D,CAC7D,cAAe,CACf,yBACD,CAIF,wDAEC,gBAAiB,CADjB,eAED,CAEA,4UAIC,wvGACD,CAEA,2EACC,kBAaD,CAXC,wGACC,orBACD,CAEA,6GACC,UAKD,CAHC,mHACC,UACD,CAIF,4EACC,2DAcD,CAZC,yGACC,4jHACD,CAGA,8GACC,aAKD,CAHC,oHACC,UACD,CAIF,6EAEC,iDAaD,CAXC,0GACC,wiCACD,CAEA,+GACC,aAKD,CAHC,qHACC,UACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, 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-media__wrapper {\n\t& .ck-media__placeholder {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\n\t\t& .ck-media__placeholder__url {\n\t\t\t/* Otherwise the URL will overflow when the content is very narrow. */\n\t\t\tmax-width: 100%;\n\n\t\t\tposition: relative;\n\n\t\t\t& .ck-media__placeholder__url__text {\n\t\t\t\toverflow: hidden;\n\t\t\t\tdisplay: block;\n\t\t\t}\n\t\t}\n\t}\n\n\t&[data-oembed-url*="twitter.com"],\n\t&[data-oembed-url*="google.com/maps"],\n\t&[data-oembed-url*="goo.gl/maps"],\n\t&[data-oembed-url*="maps.google.com"],\n\t&[data-oembed-url*="maps.app.goo.gl"],\n\t&[data-oembed-url*="facebook.com"],\n\t&[data-oembed-url*="instagram.com"] {\n\t\t& .ck-media__placeholder__icon * {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n/* Disable all mouse interaction as long as the editor is not read–only.\n https://github.com/ckeditor/ckeditor5-media-embed/issues/58 */\n.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper > *:not(.ck-media__placeholder) {\n\tpointer-events: none;\n}\n\n/* Disable all mouse interaction when the widget is not selected (e.g. to avoid opening links by accident).\n https://github.com/ckeditor/ckeditor5-media-embed/issues/18 */\n.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder {\n\tpointer-events: none;\n}\n','/*\n * Copyright (c) 2003-2023, 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-media-embed-placeholder-icon-size: 3em;\n\n\t--ck-color-media-embed-placeholder-url-text: hsl(0, 0%, 46%);\n\t--ck-color-media-embed-placeholder-url-text-hover: var(--ck-color-base-text);\n}\n\n.ck-media__wrapper {\n\tmargin: 0 auto;\n\n\t& .ck-media__placeholder {\n\t\tpadding: calc( 3 * var(--ck-spacing-standard) );\n\t\tbackground: var(--ck-color-base-foreground);\n\n\t\t& .ck-media__placeholder__icon {\n\t\t\tmin-width: var(--ck-media-embed-placeholder-icon-size);\n\t\t\theight: var(--ck-media-embed-placeholder-icon-size);\n\t\t\tmargin-bottom: var(--ck-spacing-large);\n\t\t\tbackground-position: center;\n\t\t\tbackground-size: cover;\n\n\t\t\t& .ck-icon {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t}\n\n\t\t& .ck-media__placeholder__url__text {\n\t\t\tcolor: var(--ck-color-media-embed-placeholder-url-text);\n\t\t\twhite-space: nowrap;\n\t\t\ttext-align: center;\n\t\t\tfont-style: italic;\n\t\t\ttext-overflow: ellipsis;\n\n\t\t\t&:hover {\n\t\t\t\tcolor: var(--ck-color-media-embed-placeholder-url-text-hover);\n\t\t\t\tcursor: pointer;\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\t\t}\n\t}\n\n\t&[data-oembed-url*="open.spotify.com"] {\n\t\tmax-width: 300px;\n\t\tmax-height: 380px;\n\t}\n\n\t&[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon,\n\t&[data-oembed-url*="goo.gl/maps"] .ck-media__placeholder__icon,\n\t&[data-oembed-url*="maps.google.com"] .ck-media__placeholder__icon,\n\t&[data-oembed-url*="maps.app.goo.gl"] .ck-media__placeholder__icon {\n\t\tbackground-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSkgc2NhbGUoLjk4MDEyKSI+PHJlY3Qgcnk9IjUuMjM4IiByeD0iNS4yMzgiIHk9IjIzMS4zOTkiIHg9IjE3Ni4wMzEiIGhlaWdodD0iNjAuMDk5IiB3aWR0aD0iNjAuMDk5IiBmaWxsPSIjMzRhNjY4IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0yMDYuNDc3IDI2MC45bC0yOC45ODcgMjguOTg3YTUuMjE4IDUuMjE4IDAgMCAwIDMuNzggMS42MWg0OS42MjFjMS42OTQgMCAzLjE5LS43OTggNC4xNDYtMi4wMzd6IiBmaWxsPSIjNWM4OGM1Ii8+PHBhdGggZD0iTTIyNi43NDIgMjIyLjk4OGMtOS4yNjYgMC0xNi43NzcgNy4xNy0xNi43NzcgMTYuMDE0LjAwNyAyLjc2Mi42NjMgNS40NzQgMi4wOTMgNy44NzUuNDMuNzAzLjgzIDEuNDA4IDEuMTkgMi4xMDcuMzMzLjUwMi42NSAxLjAwNS45NSAxLjUwOC4zNDMuNDc3LjY3My45NTcuOTg4IDEuNDQgMS4zMSAxLjc2OSAyLjUgMy41MDIgMy42MzcgNS4xNjguNzkzIDEuMjc1IDEuNjgzIDIuNjQgMi40NjYgMy45OSAyLjM2MyA0LjA5NCA0LjAwNyA4LjA5MiA0LjYgMTMuOTE0di4wMTJjLjE4Mi40MTIuNTE2LjY2Ni44NzkuNjY3LjQwMy0uMDAxLjc2OC0uMzE0LjkzLS43OTkuNjAzLTUuNzU2IDIuMjM4LTkuNzI5IDQuNTg1LTEzLjc5NC43ODItMS4zNSAxLjY3My0yLjcxNSAyLjQ2NS0zLjk5IDEuMTM3LTEuNjY2IDIuMzI4LTMuNCAzLjYzOC01LjE2OS4zMTUtLjQ4Mi42NDUtLjk2Mi45ODgtMS40MzkuMy0uNTAzLjYxNy0xLjAwNi45NS0xLjUwOC4zNTktLjcuNzYtMS40MDQgMS4xOS0yLjEwNyAxLjQyNi0yLjQwMiAyLTUuMTE0IDIuMDA0LTcuODc1IDAtOC44NDQtNy41MTEtMTYuMDE0LTE2Ljc3Ni0xNi4wMTR6IiBmaWxsPSIjZGQ0YjNlIiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxlbGxpcHNlIHJ5PSI1LjU2NCIgcng9IjUuODI4IiBjeT0iMjM5LjAwMiIgY3g9IjIyNi43NDIiIGZpbGw9IiM4MDJkMjciIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTE5MC4zMDEgMjM3LjI4M2MtNC42NyAwLTguNDU3IDMuODUzLTguNDU3IDguNjA2czMuNzg2IDguNjA3IDguNDU3IDguNjA3YzMuMDQzIDAgNC44MDYtLjk1OCA2LjMzNy0yLjUxNiAxLjUzLTEuNTU3IDIuMDg3LTMuOTEzIDIuMDg3LTYuMjkgMC0uMzYyLS4wMjMtLjcyMi0uMDY0LTEuMDc5aC04LjI1N3YzLjA0M2g0Ljg1Yy0uMTk3Ljc1OS0uNTMxIDEuNDUtMS4wNTggMS45ODYtLjk0Mi45NTgtMi4wMjggMS41NDgtMy45MDEgMS41NDgtMi44NzYgMC01LjIwOC0yLjM3Mi01LjIwOC01LjI5OSAwLTIuOTI2IDIuMzMyLTUuMjk5IDUuMjA4LTUuMjk5IDEuMzk5IDAgMi42MTguNDA3IDMuNTg0IDEuMjkzbDIuMzgxLTIuMzhjMC0uMDAyLS4wMDMtLjAwNC0uMDA0LS4wMDUtMS41ODgtMS41MjQtMy42Mi0yLjIxNS01Ljk1NS0yLjIxNXptNC40MyA1LjY2bC4wMDMuMDA2di0uMDAzeiIgZmlsbD0iI2ZmZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJNMjE1LjE4NCAyNTEuOTI5bC03Ljk4IDcuOTc5IDI4LjQ3NyAyOC40NzVjLjI4Ny0uNjQ5LjQ0OS0xLjM2Ni40NDktMi4xMjN2LTMxLjE2NWMtLjQ2OS42NzUtLjkzNCAxLjM0OS0xLjM4MiAyLjAwNS0uNzkyIDEuMjc1LTEuNjgyIDIuNjQtMi40NjUgMy45OS0yLjM0NyA0LjA2NS0zLjk4MiA4LjAzOC00LjU4NSAxMy43OTQtLjE2Mi40ODUtLjUyNy43OTgtLjkzLjc5OS0uMzYzLS4wMDEtLjY5Ny0uMjU1LS44NzktLjY2N3YtLjAxMmMtLjU5My01LjgyMi0yLjIzNy05LjgyLTQuNi0xMy45MTQtLjc4My0xLjM1LTEuNjczLTIuNzE1LTIuNDY2LTMuOTktMS4xMzctMS42NjYtMi4zMjctMy40LTMuNjM3LTUuMTY5bC0uMDAyLS4wMDN6IiBmaWxsPSIjYzNjM2MzIi8+PHBhdGggZD0iTTIxMi45ODMgMjQ4LjQ5NWwtMzYuOTUyIDM2Ljk1M3YuODEyYTUuMjI3IDUuMjI3IDAgMCAwIDUuMjM4IDUuMjM4aDEuMDE1bDM1LjY2Ni0zNS42NjZhMTM2LjI3NSAxMzYuMjc1IDAgMCAwLTIuNzY0LTMuOSAzNy41NzUgMzcuNTc1IDAgMCAwLS45ODktMS40NGMtLjI5OS0uNTAzLS42MTYtMS4wMDYtLjk1LTEuNTA4LS4wODMtLjE2Mi0uMTc2LS4zMjYtLjI2NC0uNDg5eiIgZmlsbD0iI2ZkZGM0ZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJNMjExLjk5OCAyNjEuMDgzbC02LjE1MiA2LjE1MSAyNC4yNjQgMjQuMjY0aC43ODFhNS4yMjcgNS4yMjcgMCAwIDAgNS4yMzktNS4yMzh2LTEuMDQ1eiIgZmlsbD0iI2ZmZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48L2c+PC9zdmc+);\n\t}\n\n\t&[data-oembed-url*="facebook.com"] .ck-media__placeholder {\n\t\tbackground: hsl(220, 46%, 48%);\n\n\t\t& .ck-media__placeholder__icon {\n\t\t\tbackground-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIxMDI0cHgiIGhlaWdodD0iMTAyNHB4IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPiAgICAgICAgPHRpdGxlPkZpbGwgMTwvdGl0bGU+ICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiAgICA8ZGVmcz48L2RlZnM+ICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgICAgICAgPGcgaWQ9ImZMb2dvX1doaXRlIiBmaWxsPSIjRkZGRkZFIj4gICAgICAgICAgICA8cGF0aCBkPSJNOTY3LjQ4NCwwIEw1Ni41MTcsMCBDMjUuMzA0LDAgMCwyNS4zMDQgMCw1Ni41MTcgTDAsOTY3LjQ4MyBDMCw5OTguNjk0IDI1LjI5NywxMDI0IDU2LjUyMiwxMDI0IEw1NDcsMTAyNCBMNTQ3LDYyOCBMNDE0LDYyOCBMNDE0LDQ3MyBMNTQ3LDQ3MyBMNTQ3LDM1OS4wMjkgQzU0NywyMjYuNzY3IDYyNy43NzMsMTU0Ljc0NyA3NDUuNzU2LDE1NC43NDcgQzgwMi4yNjksMTU0Ljc0NyA4NTAuODQyLDE1OC45NTUgODY1LDE2MC44MzYgTDg2NSwyOTkgTDc4My4zODQsMjk5LjAzNyBDNzE5LjM5MSwyOTkuMDM3IDcwNywzMjkuNTI5IDcwNywzNzQuMjczIEw3MDcsNDczIEw4NjAuNDg3LDQ3MyBMODQwLjUwMSw2MjggTDcwNyw2MjggTDcwNywxMDI0IEw5NjcuNDg0LDEwMjQgQzk5OC42OTcsMTAyNCAxMDI0LDk5OC42OTcgMTAyNCw5NjcuNDg0IEwxMDI0LDU2LjUxNSBDMTAyNCwyNS4zMDMgOTk4LjY5NywwIDk2Ny40ODQsMCIgaWQ9IkZpbGwtMSI+PC9wYXRoPiAgICAgICAgPC9nPiAgICA8L2c+PC9zdmc+);\n\t\t}\n\n\t\t& .ck-media__placeholder__url__text {\n\t\t\tcolor: hsl(220, 100%, 90%);\n\n\t\t\t&:hover {\n\t\t\t\tcolor: hsl(0, 0%, 100%);\n\t\t\t}\n\t\t}\n\t}\n\n\t&[data-oembed-url*="instagram.com"] .ck-media__placeholder {\n\t\tbackground: linear-gradient(-135deg,hsl(246, 100%, 39%),hsl(302, 100%, 36%),hsl(0, 100%, 48%));\n\n\t\t& .ck-media__placeholder__icon {\n\t\t\tbackground-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSI1MDRweCIgaGVpZ2h0PSI1MDRweCIgdmlld0JveD0iMCAwIDUwNCA1MDQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+ICAgICAgICA8dGl0bGU+Z2x5cGgtbG9nb19NYXkyMDE2PC90aXRsZT4gICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+ICAgIDxkZWZzPiAgICAgICAgPHBvbHlnb24gaWQ9InBhdGgtMSIgcG9pbnRzPSIwIDAuMTU5IDUwMy44NDEgMC4xNTkgNTAzLjg0MSA1MDMuOTQgMCA1MDMuOTQiPjwvcG9seWdvbj4gICAgPC9kZWZzPiAgICA8ZyBpZD0iZ2x5cGgtbG9nb19NYXkyMDE2IiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4gICAgICAgIDxnIGlkPSJHcm91cC0zIj4gICAgICAgICAgICA8bWFzayBpZD0ibWFzay0yIiBmaWxsPSJ3aGl0ZSI+ICAgICAgICAgICAgICAgIDx1c2UgeGxpbms6aHJlZj0iI3BhdGgtMSI+PC91c2U+ICAgICAgICAgICAgPC9tYXNrPiAgICAgICAgICAgIDxnIGlkPSJDbGlwLTIiPjwvZz4gICAgICAgICAgICA8cGF0aCBkPSJNMjUxLjkyMSwwLjE1OSBDMTgzLjUwMywwLjE1OSAxNzQuOTI0LDAuNDQ5IDE0OC4wNTQsMS42NzUgQzEyMS4yNCwyLjg5OCAxMDIuOTI3LDcuMTU3IDg2LjkwMywxMy4zODUgQzcwLjMzNywxOS44MjIgNTYuMjg4LDI4LjQzNiA0Mi4yODIsNDIuNDQxIEMyOC4yNzcsNTYuNDQ3IDE5LjY2Myw3MC40OTYgMTMuMjI2LDg3LjA2MiBDNi45OTgsMTAzLjA4NiAyLjczOSwxMjEuMzk5IDEuNTE2LDE0OC4yMTMgQzAuMjksMTc1LjA4MyAwLDE4My42NjIgMCwyNTIuMDggQzAsMzIwLjQ5NyAwLjI5LDMyOS4wNzYgMS41MTYsMzU1Ljk0NiBDMi43MzksMzgyLjc2IDYuOTk4LDQwMS4wNzMgMTMuMjI2LDQxNy4wOTcgQzE5LjY2Myw0MzMuNjYzIDI4LjI3Nyw0NDcuNzEyIDQyLjI4Miw0NjEuNzE4IEM1Ni4yODgsNDc1LjcyMyA3MC4zMzcsNDg0LjMzNyA4Ni45MDMsNDkwLjc3NSBDMTAyLjkyNyw0OTcuMDAyIDEyMS4yNCw1MDEuMjYxIDE0OC4wNTQsNTAyLjQ4NCBDMTc0LjkyNCw1MDMuNzEgMTgzLjUwMyw1MDQgMjUxLjkyMSw1MDQgQzMyMC4zMzgsNTA0IDMyOC45MTcsNTAzLjcxIDM1NS43ODcsNTAyLjQ4NCBDMzgyLjYwMSw1MDEuMjYxIDQwMC45MTQsNDk3LjAwMiA0MTYuOTM4LDQ5MC43NzUgQzQzMy41MDQsNDg0LjMzNyA0NDcuNTUzLDQ3NS43MjMgNDYxLjU1OSw0NjEuNzE4IEM0NzUuNTY0LDQ0Ny43MTIgNDg0LjE3OCw0MzMuNjYzIDQ5MC42MTYsNDE3LjA5NyBDNDk2Ljg0Myw0MDEuMDczIDUwMS4xMDIsMzgyLjc2IDUwMi4zMjUsMzU1Ljk0NiBDNTAzLjU1MSwzMjkuMDc2IDUwMy44NDEsMzIwLjQ5NyA1MDMuODQxLDI1Mi4wOCBDNTAzLjg0MSwxODMuNjYyIDUwMy41NTEsMTc1LjA4MyA1MDIuMzI1LDE0OC4yMTMgQzUwMS4xMDIsMTIxLjM5OSA0OTYuODQzLDEwMy4wODYgNDkwLjYxNiw4Ny4wNjIgQzQ4NC4xNzgsNzAuNDk2IDQ3NS41NjQsNTYuNDQ3IDQ2MS41NTksNDIuNDQxIEM0NDcuNTUzLDI4LjQzNiA0MzMuNTA0LDE5LjgyMiA0MTYuOTM4LDEzLjM4NSBDNDAwLjkxNCw3LjE1NyAzODIuNjAxLDIuODk4IDM1NS43ODcsMS42NzUgQzMyOC45MTcsMC40NDkgMzIwLjMzOCwwLjE1OSAyNTEuOTIxLDAuMTU5IFogTTI1MS45MjEsNDUuNTUgQzMxOS4xODYsNDUuNTUgMzI3LjE1NCw0NS44MDcgMzUzLjcxOCw0Ny4wMTkgQzM3OC4yOCw0OC4xMzkgMzkxLjYxOSw1Mi4yNDMgNDAwLjQ5Niw1NS42OTMgQzQxMi4yNTUsNjAuMjYzIDQyMC42NDcsNjUuNzIyIDQyOS40NjIsNzQuNTM4IEM0MzguMjc4LDgzLjM1MyA0NDMuNzM3LDkxLjc0NSA0NDguMzA3LDEwMy41MDQgQzQ1MS43NTcsMTEyLjM4MSA0NTUuODYxLDEyNS43MiA0NTYuOTgxLDE1MC4yODIgQzQ1OC4xOTMsMTc2Ljg0NiA0NTguNDUsMTg0LjgxNCA0NTguNDUsMjUyLjA4IEM0NTguNDUsMzE5LjM0NSA0NTguMTkzLDMyNy4zMTMgNDU2Ljk4MSwzNTMuODc3IEM0NTUuODYxLDM3OC40MzkgNDUxLjc1NywzOTEuNzc4IDQ0OC4zMDcsNDAwLjY1NSBDNDQzLjczNyw0MTIuNDE0IDQzOC4yNzgsNDIwLjgwNiA0MjkuNDYyLDQyOS42MjEgQzQyMC42NDcsNDM4LjQzNyA0MTIuMjU1LDQ0My44OTYgNDAwLjQ5Niw0NDguNDY2IEMzOTEuNjE5LDQ1MS45MTYgMzc4LjI4LDQ1Ni4wMiAzNTMuNzE4LDQ1Ny4xNCBDMzI3LjE1OCw0NTguMzUyIDMxOS4xOTEsNDU4LjYwOSAyNTEuOTIxLDQ1OC42MDkgQzE4NC42NSw0NTguNjA5IDE3Ni42ODQsNDU4LjM1MiAxNTAuMTIzLDQ1Ny4xNCBDMTI1LjU2MSw0NTYuMDIgMTEyLjIyMiw0NTEuOTE2IDEwMy4zNDUsNDQ4LjQ2NiBDOTEuNTg2LDQ0My44OTYgODMuMTk0LDQzOC40MzcgNzQuMzc5LDQyOS42MjEgQzY1LjU2NCw0MjAuODA2IDYwLjEwNCw0MTIuNDE0IDU1LjUzNCw0MDAuNjU1IEM1Mi4wODQsMzkxLjc3OCA0Ny45OCwzNzguNDM5IDQ2Ljg2LDM1My44NzcgQzQ1LjY0OCwzMjcuMzEzIDQ1LjM5MSwzMTkuMzQ1IDQ1LjM5MSwyNTIuMDggQzQ1LjM5MSwxODQuODE0IDQ1LjY0OCwxNzYuODQ2IDQ2Ljg2LDE1MC4yODIgQzQ3Ljk4LDEyNS43MiA1Mi4wODQsMTEyLjM4MSA1NS41MzQsMTAzLjUwNCBDNjAuMTA0LDkxLjc0NSA2NS41NjMsODMuMzUzIDc0LjM3OSw3NC41MzggQzgzLjE5NCw2NS43MjIgOTEuNTg2LDYwLjI2MyAxMDMuMzQ1LDU1LjY5MyBDMTEyLjIyMiw1Mi4yNDMgMTI1LjU2MSw0OC4xMzkgMTUwLjEyMyw0Ny4wMTkgQzE3Ni42ODcsNDUuODA3IDE4NC42NTUsNDUuNTUgMjUxLjkyMSw0NS41NSBaIiBpZD0iRmlsbC0xIiBmaWxsPSIjRkZGRkZGIiBtYXNrPSJ1cmwoI21hc2stMikiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgICAgIDxwYXRoIGQ9Ik0yNTEuOTIxLDMzNi4wNTMgQzIwNS41NDMsMzM2LjA1MyAxNjcuOTQ3LDI5OC40NTcgMTY3Ljk0NywyNTIuMDggQzE2Ny45NDcsMjA1LjcwMiAyMDUuNTQzLDE2OC4xMDYgMjUxLjkyMSwxNjguMTA2IEMyOTguMjk4LDE2OC4xMDYgMzM1Ljg5NCwyMDUuNzAyIDMzNS44OTQsMjUyLjA4IEMzMzUuODk0LDI5OC40NTcgMjk4LjI5OCwzMzYuMDUzIDI1MS45MjEsMzM2LjA1MyBaIE0yNTEuOTIxLDEyMi43MTUgQzE4MC40NzQsMTIyLjcxNSAxMjIuNTU2LDE4MC42MzMgMTIyLjU1NiwyNTIuMDggQzEyMi41NTYsMzIzLjUyNiAxODAuNDc0LDM4MS40NDQgMjUxLjkyMSwzODEuNDQ0IEMzMjMuMzY3LDM4MS40NDQgMzgxLjI4NSwzMjMuNTI2IDM4MS4yODUsMjUyLjA4IEMzODEuMjg1LDE4MC42MzMgMzIzLjM2NywxMjIuNzE1IDI1MS45MjEsMTIyLjcxNSBaIiBpZD0iRmlsbC00IiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+ICAgICAgICA8cGF0aCBkPSJNNDE2LjYyNywxMTcuNjA0IEM0MTYuNjI3LDEzNC4zIDQwMy4wOTIsMTQ3LjgzNCAzODYuMzk2LDE0Ny44MzQgQzM2OS43MDEsMTQ3LjgzNCAzNTYuMTY2LDEzNC4zIDM1Ni4xNjYsMTE3LjYwNCBDMzU2LjE2NiwxMDAuOTA4IDM2OS43MDEsODcuMzczIDM4Ni4zOTYsODcuMzczIEM0MDMuMDkyLDg3LjM3MyA0MTYuNjI3LDEwMC45MDggNDE2LjYyNywxMTcuNjA0IiBpZD0iRmlsbC01IiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+ICAgIDwvZz48L3N2Zz4=);\n\t\t}\n\n\t\t/* stylelint-disable-next-line no-descending-specificity */\n\t\t& .ck-media__placeholder__url__text {\n\t\t\tcolor: hsl(302, 100%, 94%);\n\n\t\t\t&:hover {\n\t\t\t\tcolor: hsl(0, 0%, 100%);\n\t\t\t}\n\t\t}\n\t}\n\n\t&[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder {\n\t\t/* Use gradient to contrast with focused widget (ckeditor/ckeditor5-media-embed#22). */\n\t\tbackground: linear-gradient( to right, hsl(201, 85%, 70%), hsl(201, 85%, 35%) );\n\n\t\t& .ck-media__placeholder__icon {\n\t\t\tbackground-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IldoaXRlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQwMCA0MDAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQwMCA0MDA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPi5zdDB7ZmlsbDojRkZGRkZGO308L3N0eWxlPjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MDAsMjAwYzAsMTEwLjUtODkuNSwyMDAtMjAwLDIwMFMwLDMxMC41LDAsMjAwUzg5LjUsMCwyMDAsMFM0MDAsODkuNSw0MDAsMjAweiBNMTYzLjQsMzA1LjVjODguNywwLDEzNy4yLTczLjUsMTM3LjItMTM3LjJjMC0yLjEsMC00LjItMC4xLTYuMmM5LjQtNi44LDE3LjYtMTUuMywyNC4xLTI1Yy04LjYsMy44LTE3LjksNi40LTI3LjcsNy42YzEwLTYsMTcuNi0xNS40LDIxLjItMjYuN2MtOS4zLDUuNS0xOS42LDkuNS0zMC42LDExLjdjLTguOC05LjQtMjEuMy0xNS4yLTM1LjItMTUuMmMtMjYuNiwwLTQ4LjIsMjEuNi00OC4yLDQ4LjJjMCwzLjgsMC40LDcuNSwxLjMsMTFjLTQwLjEtMi03NS42LTIxLjItOTkuNC01MC40Yy00LjEsNy4xLTYuNSwxNS40LTYuNSwyNC4yYzAsMTYuNyw4LjUsMzEuNSwyMS41LDQwLjFjLTcuOS0wLjItMTUuMy0yLjQtMjEuOC02YzAsMC4yLDAsMC40LDAsMC42YzAsMjMuNCwxNi42LDQyLjgsMzguNyw0Ny4zYy00LDEuMS04LjMsMS43LTEyLjcsMS43Yy0zLjEsMC02LjEtMC4zLTkuMS0wLjljNi4xLDE5LjIsMjMuOSwzMy4xLDQ1LDMzLjVjLTE2LjUsMTIuOS0zNy4zLDIwLjYtNTkuOSwyMC42Yy0zLjksMC03LjctMC4yLTExLjUtMC43QzExMC44LDI5Ny41LDEzNi4yLDMwNS41LDE2My40LDMwNS41Ii8+PC9zdmc+);\n\t\t}\n\n\t\t& .ck-media__placeholder__url__text {\n\t\t\tcolor: hsl(201, 100%, 86%);\n\n\t\t\t&:hover {\n\t\t\t\tcolor: hsl(0, 0%, 100%);\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},9292:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-media-form{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-media-form .ck-labeled-field-view{display:inline-block}.ck.ck-media-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-media-form{flex-wrap:wrap}.ck.ck-media-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-media-form .ck-button{flex-basis:50%}}","",{version:3,sources:["webpack://./../ckeditor5-media-embed/theme/mediaform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAOA,kBAEC,sBAAuB,CADvB,YAAa,CAEb,kBAAmB,CACnB,gBAqBD,CAnBC,yCACC,oBACD,CAEA,4BACC,YACD,CCbA,oCDCD,kBAeE,cAUF,CARE,yCACC,eACD,CAEA,6BACC,cACD,CCtBD",sourcesContent:['/*\n * Copyright (c) 2003-2023, 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-media-form {\n\tdisplay: flex;\n\talign-items: flex-start;\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-2023, 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},7368:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-table/theme/colorinput.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/colorinput.css","webpack://./../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-2023, 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-2023, 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-2023, 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},4070:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../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-2023, 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},9247:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-table/theme/formrow.css","webpack://./../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-2023, 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-2023, 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},1613:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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}.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://./../ckeditor5-table/theme/inserttable.css","webpack://./../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,eAUD,CARC,6CACC,eACD,CAEA,6CAEC,6CAA8C,CAD9C,yCAED",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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-2023, 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&: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},6306:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../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-2023, 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},2128:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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}.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://./../ckeditor5-table/theme/tablecaption.css"],names:[],mappings:"AAKA,MACC,8CAAuD,CACvD,qCAAiD,CACjD,uDACD,CAGA,8BAMC,4DAA6D,CAJ7D,gBAAiB,CAGjB,2CAA4C,CAJ5C,qBAAsB,CAOtB,eAAgB,CAChB,mBAAoB,CAFpB,YAAa,CAHb,iBAAkB,CADlB,qBAOD,CAIC,qEACC,iDACD,CAEA,gEASC,eAAgB,CARhB,oBAAqB,CACrB,qBAAsB,CAQtB,sBAAuB,CAFvB,kBAGD,CAGD,sCACC,GACC,wEACD,CAEA,GACC,4DACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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-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\n/* Editing styles */\n.ck.ck-editor__editable .table > figcaption {\n\t&.table__caption_highlighted {\n\t\tanimation: ck-table-caption-highlight .6s ease-out;\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"],sourceRoot:""}]);const a=s},5087:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-table/theme/tablecellproperties.css","webpack://./../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-2023, 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-2023, 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},4101:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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:-999999px;cursor:col-resize;position:absolute;right:var(--ck-table-column-resizer-position-offset);top:-999999px;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);opacity:.25}.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://./../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,wDAOC,gBAAiB,CAGjB,iBAAkB,CATlB,iBAAkB,CAOlB,oDAAqD,CAFrD,aAAc,CAKd,gBAAiB,CAFjB,0CAA2C,CAG3C,2BACD,CAQA,qJACC,YACD,CAEA,8HAEC,8DAA+D,CAC/D,WACD,CAEA,iEACC,mDAAoD,CACpD,WACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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\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\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}\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},3881:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../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-2023, 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},6237:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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}.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://./../ckeditor5-table/theme/tableform.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-table/tableform.css","webpack://./../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,sCAyBD,CAvBC,8ECxCD,eDyDC,CAjBA,mMCpCA,qCDqDA,CAjBA,8EAGC,qCAAsC,CACtC,qCAAsC,CAEtC,oDAAqD,CADrD,wDAAyD,CAEzD,iBAUD,CAPC,oFACC,2EAA4E,CAE5E,kBAAmB,CADnB,kJAED,CAdD,8EAgBC,iEACD,CAGA,6GACC,YACD,CAIF,oDACC,GACC,SACD,CAEA,GACC,SACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, 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-2023, 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\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-2023, 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},7341:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-table/theme/tableproperties.css","webpack://./../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-2023, 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-2023, 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},6945:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../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-2023, 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},4906:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-button,a.ck.ck-button{align-items:center;display:inline-flex;justify-content:left;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.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}.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{font-weight:700;opacity:.7}.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-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}[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-small);margin-right:calc(var(--ck-spacing-small)*-1)}.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://./../ckeditor5-ui/theme/components/button/button.css","webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/button.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/mixins/_button.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AAOA,6BAMC,kBAAmB,CADnB,mBAAoB,CAEpB,oBAAqB,CAHrB,iBAAkB,CCFlB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBDkBD,CAdC,iEACC,YACD,CAGC,yGACC,oBACD,CAID,iFACC,sBACD,CEjBD,6BCAC,oDD4ID,CCzIE,6EACC,0DACD,CAEA,+EACC,2DACD,CAID,qDACC,6DACD,CDfD,6BEDC,eF6ID,CA5IA,wIEGE,qCFyIF,CA5IA,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,kBAuID,CA7GC,oFGhCA,2BAA2B,CCF3B,2CAA8B,CDC9B,YHqCA,CAIC,kJAEC,aACD,CAGD,iEAIC,aAAc,CACd,cAAe,CAHf,iBAAkB,CAClB,mBAAoB,CAMpB,qBASD,CAlBA,qFAYE,eAMF,CAlBA,qFAgBE,gBAEF,CAEA,yEACC,aAYD,CAbA,6FAIE,mCASF,CAbA,6FAQE,oCAKF,CAbA,yEAWC,eAAiB,CACjB,UACD,CAIC,oIIrFD,oDJyFC,CAOA,gLKhGD,kCLkGC,CAEA,iGACC,UACD,CAGD,qEACC,yDAcD,CAXC,2HAEE,4CAA+C,CAC/C,oCAOF,CAVA,2HAQE,mCAAoC,CADpC,6CAGF,CAKA,mHACC,WACD,CAID,yCC/HA,+CDmIA,CChIC,yFACC,qDACD,CAEA,2FACC,sDACD,CAID,iEACC,wDACD,CDgHA,yCAGC,qCACD,CAEA,2DACC,iCACD,CAEA,+DACC,mCACD,CAID,2CC/IC,mDDoJD,CCjJE,2FACC,yDACD,CAEA,6FACC,0DACD,CAID,mEACC,4DACD,CDgID,2CAIC,wCACD,CAEA,uCAEC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, 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-button,\na.ck.ck-button {\n\t@mixin ck-unselectable;\n\n\tposition: relative;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: left;\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-2023, 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-2023, 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&: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\tfont-weight: bold;\n\t\topacity: .7;\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-left: calc(-1 * var(--ck-spacing-small));\n\t\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-right: calc(-1 * var(--ck-spacing-small));\n\t\t\t\tmargin-left: var(--ck-spacing-small);\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-2023, 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-2023, 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-2023, 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-2023, 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-2023, 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},5332:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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)}.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://./../ckeditor5-ui/theme/components/button/switchbutton.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/switchbutton.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../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,eD4EA,CAxCA,yIChCC,qCDwED,CAxCA,2DAKE,gBAmCF,CAxCA,2DAUE,iBA8BF,CAxCA,iDAkBC,uDAAwD,CAFxD,4BAA6B,CAD7B,iFAAsF,CAEtF,0CAuBD,CApBC,2ECxDD,eDmEC,CAXA,6LCpDA,qCAAsC,CDsDpC,8CASF,CAXA,2EAOC,yDAA0D,CAD1D,gDAAiD,CAIjD,uBAA0B,CAL1B,+CAMD,CAEA,uDACC,6DAKD,CAHC,iFACC,qDACD,CAIF,6DEhFA,kCFkFA,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-2023, 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-2023, 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\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-2023, 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-2023, 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},6781:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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{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;transition:box-shadow .2s ease;width:var(--ck-color-grid-tile-size)}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.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.ck-icon{color:var(--ck-color-color-grid-check-icon);display:none}.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.ck-on .ck.ck-icon{display:block}.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: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)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/colorgrid/colorgrid.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/colorgrid/colorgrid.css"],names:[],mappings:"AAKA,kBACC,YACD,CCAA,MACC,8BAA+B,CAK/B,wCACD,CAEA,kBACC,YAAa,CACb,WACD,CAEA,wBAOC,QAAS,CALT,qCAAsC,CAEtC,yCAA0C,CAD1C,wCAAyC,CAEzC,SAAU,CACV,8BAA+B,CAL/B,oCAyCD,CAjCC,oCACC,YAAa,CACb,gBACD,CAEA,+DACC,gDACD,CAEA,oCAEC,2CAA4C,CAD5C,YAED,CAEA,8BACC,8FAKD,CAHC,0CACC,aACD,CAGD,8HAIC,QACD,CAEA,gGAEC,iGACD,CAGD,yBACC,oCACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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-2023, 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-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\twidth: var(--ck-color-grid-tile-size);\n\theight: var(--ck-color-grid-tile-size);\n\tmin-width: var(--ck-color-grid-tile-size);\n\tmin-height: var(--ck-color-grid-tile-size);\n\tpadding: 0;\n\ttransition: .2s ease box-shadow;\n\tborder: 0;\n\n\t&.ck-disabled {\n\t\tcursor: unset;\n\t\ttransition: unset;\n\t}\n\n\t&.ck-color-selector__color-tile_bordered {\n\t\tbox-shadow: 0 0 0 1px var(--ck-color-base-border);\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\tbox-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-base-text);\n\n\t\t& .ck.ck-icon {\n\t\t\tdisplay: block;\n\t\t}\n\t}\n\n\t&.ck-on,\n\t&:focus:not( .ck-disabled ),\n\t&:hover:not( .ck-disabled ) {\n\t\t/* Disable the default .ck-button\'s border ring. */\n\t\tborder: 0;\n\t}\n\n\t&:focus:not( .ck-disabled ),\n\t&:hover:not( .ck-disabled ) {\n\t\tbox-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-focus-border);\n\t}\n}\n\n.ck.ck-color-grid__label {\n\tpadding: 0 var(--ck-spacing-standard);\n}\n'],sourceRoot:""}]);const a=s},3398:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../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-2023, 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},4157:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-ui/theme/components/colorselector/colorselector.css","webpack://./../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-2023, 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-2023, 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},5485:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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-modal)}.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-modal) + 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://./../ckeditor5-ui/theme/components/dropdown/dropdown.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/dropdown.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_disabled.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./../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-2023, 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-modal);\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-modal) + 1 );\n}\n",'/*\n * Copyright (c) 2003-2023, 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-2023, 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-2023, 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-2023, 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},3949:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/listdropdown.css","webpack://./../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-2023, 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-2023, 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},7686:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-ui/theme/components/dropdown/splitbutton.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/splitbutton.css","webpack://./../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-2023, 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-2023, 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-2023, 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},7339:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-ui/theme/components/dropdown/toolbardropdown.css","webpack://./../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-2023, 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-2023, 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},9688:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/editorui/editorui.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../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-2023, 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-2023, 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-2023, 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-2023, 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},8847:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-form__header{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}:root{--ck-form-header-height:38px}.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)}.ck.ck-form__header .ck-form__header__label{font-weight:700}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/formheader/formheader.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/formheader/formheader.css"],names:[],mappings:"AAKA,oBAIC,kBAAmB,CAHnB,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CAEjB,6BACD,CCNA,MACC,4BACD,CAEA,oBAIC,mDAAoD,CAFpD,mCAAoC,CACpC,wCAAyC,CAFzC,uDAQD,CAHC,4CACC,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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","/*\n * Copyright (c) 2003-2023, 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-form-header-height: 38px;\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-form__header__label {\n\t\tfont-weight: bold;\n\t}\n}\n"],sourceRoot:""}]);const a=s},6574:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{font-size:.8333350694em;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://./../ckeditor5-ui/theme/components/icon/icon.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/icon/icon.css"],names:[],mappings:"AAKA,YACC,qBACD,CCFA,MACC,0EACD,CAEA,YAKC,uBAAwB,CAHxB,0BAA2B,CAD3B,yBAA0B,CAU1B,qBAoBD,CAlBC,0BALA,cAQA,CAMC,sEACC,aAMD,CAJC,+CAEC,iBACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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-2023, 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}\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: .8333350694em;\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},4879:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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}.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)}.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://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/input/input.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AASA,MACC,qBAAsB,CAGtB,2CACD,CAEA,aCLC,eD2CD,CAtCA,iECDE,qCDuCF,CAtCA,aAGC,2CAA4C,CAC5C,6CAA8C,CAK9C,4CAA6C,CAH7C,+BAAgC,CADhC,6DAA8D,CAO9D,4DA0BD,CAxBC,mBEnBA,2BAA2B,CCF3B,2CAA8B,CDC9B,YFuBA,CAEA,uBAEC,oDAAqD,CADrD,sDAAuD,CAEvD,yCAMD,CAJC,6BG/BD,oDHkCC,CAGD,sBAEC,sCAAuC,CADvC,+CAMD,CAHC,4BGzCD,iDH2CC,CAIF,0BACC,IACC,0BACD,CAEA,IACC,yBACD,CAEA,IACC,0BACD,CAEA,IACC,yBACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2023, 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&: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&: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-2023, 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-2023, 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-2023, 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},3662:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/label/label.css","webpack://./../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-2023, 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-2023, 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},2577:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right: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;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);transform-origin:0 0;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}.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>.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)>.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>.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)>.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>.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)>.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://./../ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/labeledfield/labeledfieldview.css","webpack://./../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,eD8GD,CAzGA,2FCDE,qCD0GF,CAtGC,mEACC,UAmCD,CAjCC,gFACC,KA+BD,CAhCA,0FAIE,MA4BF,CAhCA,0FAQE,OAwBF,CAhCA,gFAiBC,yDAA0D,CAG1D,eAAmB,CADnB,kBAAoB,CAOpB,cAAe,CAFf,eAAgB,CANhB,2CAA8C,CAP9C,mBAAoB,CAYpB,sBAAuB,CARvB,6DAA+D,CAH/D,oBAAqB,CAgBrB,+JAID,CAQA,mKACC,gCACD,CAGD,yDACC,mCAAoC,CACpC,kCAAmC,CAInC,kBAKD,CAHC,6FACC,gCACD,CAID,4OAEC,yCACD,CAIA,oUAGE,+HAYF,CAfA,oUAOE,wIAQF,CAfA,gTAaC,sBAAuB,CAFvB,iEAAkE,CAGlE,SACD,CAKA,8FACC,sBACD,CAGA,yIACC,SACD,CAGA,kMACC,8HACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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-2023, 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}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tright: 0px;\n\t\t\t}\n\n\t\t\tpointer-events: none;\n\t\t\ttransform-origin: 0 0;\n\n\t\t\t/* By default, display the label scaled down above the field. */\n\t\t\ttransform: translate(var(--ck-spacing-medium), -6px) scale(.75);\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\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 > .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) > .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-2023, 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},1046:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{border-radius:0;min-height:unset;padding:calc(var(--ck-line-height-base)*.2*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*.4*var(--ck-font-size-base));text-align:left;width:100%}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(var(--ck-line-height-base)*1.2*var(--ck-font-size-base))}.ck.ck-list__item .ck-button:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:focus:not(.ck-switchbutton):not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{background:var(--ck-color-base-border);height:1px;width:100%}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/list/list.css","webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/list/list.css","webpack://./../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,CEfD,YCEC,eDGD,CALA,+DCME,qCDDF,CALA,YAIC,0CAA2C,CAD3C,oBAED,CAEA,kBACC,cAAe,CACf,cA2DD,CAzDC,6BAIC,eAAgB,CAHhB,gBAAiB,CAQjB,iIAEiE,CARjE,eAAgB,CADhB,UAwCD,CA7BC,+CAEC,yEACD,CAEA,oCACC,eACD,CAEA,mCACC,oDAAqD,CACrD,yCAaD,CAXC,0CACC,eACD,CAEA,2DACC,0DACD,CAEA,iFACC,4CACD,CAGD,qDACC,uDACD,CAMA,yCACC,0CAA2C,CAC3C,aAMD,CAJC,iEACC,uDAAwD,CACxD,aACD,CAKH,uBAGC,sCAAuC,CAFvC,UAAW,CACX,UAED",sourcesContent:['/*\n * Copyright (c) 2003-2023, 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-2023, 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-2023, 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\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\n.ck.ck-list__item {\n\tcursor: default;\n\tmin-width: 12em;\n\n\t& .ck-button {\n\t\tmin-height: unset;\n\t\twidth: 100%;\n\t\ttext-align: left;\n\t\tborder-radius: 0;\n\n\t\t/* List items should have the same height. Use absolute units to make sure it is so\n\t\t because e.g. different heading styles may have different height\n\t\t https://github.com/ckeditor/ckeditor5-heading/issues/63 */\n\t\tpadding:\n\t\t\tcalc(.2 * var(--ck-line-height-base) * var(--ck-font-size-base))\n\t\t\tcalc(.4 * var(--ck-line-height-base) * var(--ck-font-size-base));\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(1.2 * 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-switchbutton):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-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.ck-list__separator {\n\theight: 1px;\n\twidth: 100%;\n\tbackground: var(--ck-color-base-border);\n}\n',"/*\n * Copyright (c) 2003-2023, 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},8793:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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-modal)}.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://./../ckeditor5-ui/theme/components/panel/balloonpanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/balloonpanel.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./../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-2023, 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-modal);\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-2023, 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-2023, 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-2023, 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},4650:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-ui/theme/components/panel/balloonrotator.css","webpack://./../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-2023, 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-2023, 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},7676:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 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://./../ckeditor5-ui/theme/components/panel/fakepanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/fakepanel.css","webpack://./../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-2023, 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-modal) - 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-2023, 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-2023, 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},5868:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-modal)}.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://./../ckeditor5-ui/theme/components/panel/stickypanel.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/stickypanel.css","webpack://./../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-2023, 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-modal); /* #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-2023, 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-2023, 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},6764:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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-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://./../ckeditor5-ui/theme/components/responsive-form/responsiveform.css","webpack://./../ckeditor5-ui/theme/mixins/_rwd.css","webpack://./../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,+BAmED,CAjEC,6BAEC,YACD,CASC,uGACC,sCACD,CDvBD,oCCMD,uBAqBE,SAAU,CACV,oCA8CF,CA5CE,8CACC,wDAWD,CATC,6DACC,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,CDpEH",sourcesContent:['/*\n * Copyright (c) 2003-2023, 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-2023, 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-2023, 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\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},9695:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-ui/theme/components/toolbar/blocktoolbar.css","webpack://./../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-2023, 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-2023, 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},5542:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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{align-self:stretch;background:var(--ck-color-toolbar-border);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://./../ckeditor5-ui/theme/components/toolbar/toolbar.css","webpack://./../ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/toolbar.css","webpack://./../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,yCACC,kBAAmB,CAGnB,yCAA0C,CAO1C,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-2023, 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-2023, 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-2023, 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\talign-self: stretch;\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-2023, 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},3332:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck.ck-balloon-panel.ck-tooltip{--ck-balloon-border-width:0px;--ck-balloon-arrow-offset:0px;--ck-balloon-arrow-half-width:4px;--ck-balloon-arrow-height:4px;--ck-color-panel-background:var(--ck-color-tooltip-background);padding:0 var(--ck-spacing-medium);pointer-events:none;z-index:calc(var(--ck-z-modal) + 100)}.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{box-shadow:none}.ck.ck-balloon-panel.ck-tooltip:before{display:none}","",{version:3,sources:["webpack://./../ckeditor5-ui/theme/components/tooltip/tooltip.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/components/tooltip/tooltip.css"],names:[],mappings:"AAKA,gCCGC,6BAA8B,CAC9B,6BAA8B,CAC9B,iCAAkC,CAClC,6BAA8B,CAC9B,8DAA+D,CAE/D,kCAAmC,CDPnC,mBAAoB,CAEpB,qCACD,CCMC,kDAGC,kCAAmC,CAFnC,cAAe,CACf,eAED,CAbD,gCAgBC,eAMD,CAHC,uCACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2023, 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-panel.ck-tooltip {\n\t/* Keep tooltips transparent for any interactions. */\n\tpointer-events: none;\n\n\tz-index: calc( var(--ck-z-modal) + 100 );\n}\n",'/*\n * Copyright (c) 2003-2023, 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-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/* 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},4793:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.id,".ck-hidden{display:none!important}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{box-sizing:border-box;height:auto;position:static;width:auto}:root{--ck-z-default:1;--ck-z-modal:calc(var(--ck-z-default) + 999)}.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-modal) - 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-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-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{word-wrap:break-word;background:transparent;border:0;margin:0;padding:0;text-decoration:none;transition:none;vertical-align:middle}.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://./../ckeditor5-ui/theme/globals/_hidden.css","webpack://./../ckeditor5-ui/theme/globals/_reset.css","webpack://./../ckeditor5-ui/theme/globals/_zindex.css","webpack://./../ckeditor5-ui/theme/globals/_transition.css","webpack://./../ckeditor5-ui/theme/globals/_poweredby.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_colors.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_disabled.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_focus.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_fonts.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_reset.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_rounded.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_shadow.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_spacing.css"],names:[],mappings:"AAQA,WAGC,sBACD,CCPA,2EAGC,qBAAsB,CAEtB,WAAY,CACZ,eAAgB,CAFhB,UAGD,CCPA,MACC,gBAAiB,CACjB,4CACD,CCAA,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,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,oCAAwD,CCvGxD,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,kCJuGD,CIjGA,2EAaC,oBAAqB,CANrB,sBAAuB,CADvB,QAAS,CAFT,QAAS,CACT,SAAU,CAGV,oBAAqB,CAErB,eAAgB,CADhB,qBAKD,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,CCnFA,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-2023, 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-2023, 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-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","/*\n * Copyright (c) 2003-2023, 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-modal: calc( var(--ck-z-default) + 999 );\n}\n","/*\n * Copyright (c) 2003-2023, 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-2023, 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-modal) - 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-2023, 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/* -- 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","/*\n * Copyright (c) 2003-2023, 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-2023, 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-2023, 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-2023, 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\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-2023, 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-2023, 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-2023, 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},3488:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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)}.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{background-color:var(--ck-color-widget-editable-focus-background);border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.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)}.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)}.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://./../ckeditor5-widget/theme/widget.css","webpack://./../ckeditor5-theme-lark/theme/ckeditor5-widget/widget.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./../ckeditor5-theme-lark/theme/mixins/_shadow.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,CCjFD,MACC,iCAAkC,CAClC,kCAAmC,CACnC,4CAA6C,CAC7C,wCAAyC,CAEzC,wCAAiD,CACjD,sCAAkD,CAClD,2EAA4E,CAC5E,yEACD,CAEA,eAGC,yBAA0B,CAD1B,mBAAoB,CADpB,gDAAiD,CAGjD,6GAUD,CARC,0EAEC,6EACD,CAEA,qBACC,iDACD,CAGD,gCACC,4BAWD,CAPC,yGAKC,iEAAkE,CCnCnE,2BAA2B,CCF3B,qCAA8B,CDC9B,YDqCA,CAIA,4EAKC,4BAA6B,CAa7B,iEAAkE,CAhBlE,qBAAsB,CAoBtB,mDAAoD,CAhBpD,SAAU,CALV,WAAY,CAsBZ,KAAM,CAFN,2BAA4B,CAT5B,6SAgCD,CAnBC,qFAIC,oDAAqD,CADrD,yCAA0C,CAD1C,wCAWD,CANC,kHACC,SAAU,CAGV,+DACD,CAID,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-2023, 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-2023, 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-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&.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\n\t\tbackground-color: var(--ck-color-widget-editable-focus-background);\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& .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\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-2023, 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-2023, 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},8506:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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://./../ckeditor5-widget/theme/widgetresize.css","webpack://./../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-2023, 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-2023, 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},4921:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(1799),i=n.n(o),r=n(2609),s=n.n(r)()(i());s.push([t.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)}.ck .ck-widget .ck-widget__type-around__button svg{height:8px;margin-top:1px;transform:translate(-50%,-50%);transition:transform .5s ease;width:10px}.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}.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://./../ckeditor5-widget/theme/widgettypearound.css","webpack://./../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,8CAkDD,CA1CC,mDAEC,UAAW,CAGX,cAAe,CAFf,8BAA+B,CAC/B,6BAA8B,CAH9B,UAoBD,CAdC,qDACC,mBAAoB,CACpB,mBAAoB,CAEpB,SAAU,CACV,qDAAsD,CACtD,kBAAmB,CACnB,oBAAqB,CACrB,qBACD,CAEA,wDACC,kBACD,CAGD,qDAIC,6DAcD,CARE,kEACC,oDACD,CAEA,8DACC,wDACD,CAUF,uKAvED,SAAU,CACV,mBAwEC,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,uOAlJD,SAAU,CACV,mBAmJC,CAoBA,6yBACC,SACD,CASF,uHACC,aAAc,CACd,iBACD,CAYG,iRAlMF,SAAU,CACV,mBAmME,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-2023, 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-2023, 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& 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& * {\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\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},2609:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=t(e);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,o){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(o)for(var r=0;r{"use strict";function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=t&&("undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"]);if(null==n)return;var o,i,r=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(o=n.next()).done)&&(r.push(o.value),!e||r.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);"Object"===o&&t.constructor&&(o=t.constructor.name);if("Map"===o||"Set"===o)return Array.from(t);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return n(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n{"use strict";var o,i=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},r=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),s=[];function a(t){for(var e=-1,n=0;n{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nc=void 0;var o={};return(()=>{"use strict";n.d(o,{default:()=>CE});const t=function(){try{return navigator.userAgent.toLowerCase()}catch(t){return""}}();var e;const i={isMac:r(t),isWindows:(e=t,e.indexOf("windows")>-1),isGecko:function(t){return!!t.match(/gecko\/\d+/)}(t),isSafari:function(t){return t.indexOf(" applewebkit/")>-1&&-1===t.indexOf("chrome")}(t),isiOS:function(t){return!!t.match(/iphone|ipad/i)||r(t)&&navigator.maxTouchPoints>0}(t),isAndroid:function(t){return t.indexOf("android")>-1}(t),isBlink:function(t){return t.indexOf("chrome/")>-1&&t.indexOf("edge/")<0}(t),features:{isRegExpUnicodePropertySupported:function(){let t=!1;try{t=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(t){}return t}()}};function r(t){return t.indexOf("macintosh")>-1}function s(t,e,n,o){n=n||function(t,e){return t===e};const i=Array.isArray(t)?t:Array.prototype.slice.call(t),r=Array.isArray(e)?e:Array.prototype.slice.call(e),s=function(t,e,n){const o=a(t,e,n);if(-1===o)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const i=c(t,o),r=c(e,o),s=a(i,r,n),l=t.length-s,d=e.length-s;return{firstIndex:o,lastIndexOld:l,lastIndexNew:d}}(i,r,n),l=o?function(t,e){const{firstIndex:n,lastIndexOld:o,lastIndexNew:i}=t;if(-1===n)return Array(e).fill("equal");let r=[];n>0&&(r=r.concat(Array(n).fill("equal")));i-n>0&&(r=r.concat(Array(i-n).fill("insert")));o-n>0&&(r=r.concat(Array(o-n).fill("delete")));i0&&n.push({index:o,type:"insert",values:t.slice(o,r)});i-o>0&&n.push({index:o+(r-o),type:"delete",howMany:i-o});return n}(r,s);return l}function a(t,e,n){for(let o=0;o200||i>200||o+i>300)return l.fastDiff(t,e,n,!0);let r,s;if(il?-1:1;h[o+d]&&(h[o]=h[o+d].slice(0)),h[o]||(h[o]=[]),h[o].push(i>l?r:s);let g=Math.max(i,l),p=g-o;for(;pd;p--)u[p]=g(p);u[d]=g(d),m++}while(u[d]!==c);return h[d].slice(1)}l.fastDiff=s;const d=function(){return function t(){t.called=!0}};class h{constructor(t,e){this.source=t,this.name=e,this.path=[],this.stop=d(),this.off=d()}}const u=new Array(256).fill("").map(((t,e)=>("0"+e.toString(16)).slice(-2)));function g(){const t=4294967296*Math.random()>>>0,e=4294967296*Math.random()>>>0,n=4294967296*Math.random()>>>0,o=4294967296*Math.random()>>>0;return"e"+u[t>>0&255]+u[t>>8&255]+u[t>>16&255]+u[t>>24&255]+u[e>>0&255]+u[e>>8&255]+u[e>>16&255]+u[e>>24&255]+u[n>>0&255]+u[n>>8&255]+u[n>>16&255]+u[n>>24&255]+u[o>>0&255]+u[o>>8&255]+u[o>>16&255]+u[o>>24&255]}const p={get(t="normal"){return"number"!=typeof t?this[t]||this.normal:t},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function m(t,e){const n=p.get(e.priority);for(let o=0;o{if("object"==typeof e&&null!==e){if(n.has(e))return`[object ${e.constructor.name}]`;n.add(e)}return e},i=e?` ${JSON.stringify(e,o)}`:"",r=A(t);return t+i+r}(t,n)),this.name="CKEditorError",this.context=e,this.data=n}is(t){return"CKEditorError"===t}static rethrowUnexpectedError(t,e){if(t.is&&t.is("CKEditorError"))throw t;const n=new k(t.message,e);throw n.stack=t.stack,n}}function b(t,e){console.warn(...C(t,e))}function w(t,e){console.error(...C(t,e))}function A(t){return`\nRead more: ${f}#error-${t}`}function C(t,e){const n=A(t);return e?[t,e,n]:[t,n]}const _="39.0.1",v=new Date(2023,7,10),y="object"==typeof window?window:n.g;if(y.CKEDITOR_VERSION)throw new k("ckeditor-duplicated-modules",null);y.CKEDITOR_VERSION=_;const x=Symbol("listeningTo"),E=Symbol("emitterId"),D=Symbol("delegations"),I=S(Object);function S(t){if(!t)return I;return class extends t{on(t,e,n){this.listenTo(this,t,e,n)}once(t,e,n){let o=!1;this.listenTo(this,t,((t,...n)=>{o||(o=!0,t.off(),e.call(this,t,...n))}),n)}off(t,e){this.stopListening(this,t,e)}listenTo(t,e,n,o={}){let i,r;this[x]||(this[x]={});const s=this[x];T(t)||M(t);const a=T(t);(i=s[a])||(i=s[a]={emitter:t,callbacks:{}}),(r=i.callbacks[e])||(r=i.callbacks[e]=[]),r.push(n),function(t,e,n,o,i){e._addEventListener?e._addEventListener(n,o,i):t._addEventListener.call(e,n,o,i)}(this,t,e,n,o)}stopListening(t,e,n){const o=this[x];let i=t&&T(t);const r=o&&i?o[i]:void 0,s=r&&e?r.callbacks[e]:void 0;if(!(!o||t&&!r||e&&!s))if(n){O(this,t,e,n);-1!==s.indexOf(n)&&(1===s.length?delete r.callbacks[e]:O(this,t,e,n))}else if(s){for(;n=s.pop();)O(this,t,e,n);delete r.callbacks[e]}else if(r){for(e in r.callbacks)this.stopListening(t,e);delete o[i]}else{for(i in o)this.stopListening(o[i].emitter);delete this[x]}}fire(t,...e){try{const n=t instanceof h?t:new h(this,t),o=n.name;let i=P(this,o);if(n.path.push(this),i){const t=[n,...e];i=Array.from(i);for(let e=0;e{this[D]||(this[D]=new Map),t.forEach((t=>{const o=this[D].get(t);o?o.set(e,n):this[D].set(t,new Map([[e,n]]))}))}}}stopDelegating(t,e){if(this[D])if(t)if(e){const n=this[D].get(t);n&&n.delete(e)}else this[D].delete(t);else this[D].clear()}_addEventListener(t,e,n){!function(t,e){const n=B(t);if(n[e])return;let o=e,i=null;const r=[];for(;""!==o&&!n[o];)n[o]={callbacks:[],childEvents:[]},r.push(n[o]),i&&n[o].childEvents.push(i),i=o,o=o.substr(0,o.lastIndexOf(":"));if(""!==o){for(const t of r)t.callbacks=n[o].callbacks.slice();n[o].childEvents.push(i)}}(this,t);const o=N(this,t),i={callback:e,priority:p.get(n.priority)};for(const t of o)m(t,i)}_removeEventListener(t,e){const n=N(this,t);for(const t of n)for(let n=0;n-1?P(t,e.substr(0,e.lastIndexOf(":"))):null}function z(t,e,n){for(let[o,i]of t){i?"function"==typeof i&&(i=i(e.name)):i=e.name;const t=new h(e.source,i);t.path=[...e.path],o.fire(t,...n)}}function O(t,e,n,o){e._removeEventListener?e._removeEventListener(n,o):t._removeEventListener.call(e,n,o)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((t=>{S[t]=I.prototype[t]}));const L=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},j=Symbol("observableProperties"),R=Symbol("boundObservables"),F=Symbol("boundProperties"),V=Symbol("decoratedMethods"),U=Symbol("decoratedOriginal"),H=G(S());function G(t){if(!t)return H;return class extends t{set(t,e){if(L(t))return void Object.keys(t).forEach((e=>{this.set(e,t[e])}),this);q(this);const n=this[j];if(t in this&&!n.has(t))throw new k("observable-set-cannot-override",this);Object.defineProperty(this,t,{enumerable:!0,configurable:!0,get:()=>n.get(t),set(e){const o=n.get(t);let i=this.fire(`set:${t}`,t,e,o);void 0===i&&(i=e),o===i&&n.has(t)||(n.set(t,i),this.fire(`change:${t}`,t,i,o))}}),this[t]=e}bind(...t){if(!t.length||!Y(t))throw new k("observable-bind-wrong-properties",this);if(new Set(t).size!==t.length)throw new k("observable-bind-duplicate-properties",this);q(this);const e=this[F];t.forEach((t=>{if(e.has(t))throw new k("observable-bind-rebind",this)}));const n=new Map;return t.forEach((t=>{const o={property:t,to:[]};e.set(t,o),n.set(t,o)})),{to:W,toMany:K,_observable:this,_bindProperties:t,_to:[],_bindings:n}}unbind(...t){if(!this[j])return;const e=this[F],n=this[R];if(t.length){if(!Y(t))throw new k("observable-unbind-wrong-properties",this);t.forEach((t=>{const o=e.get(t);o&&(o.to.forEach((([t,e])=>{const i=n.get(t),r=i[e];r.delete(o),r.size||delete i[e],Object.keys(i).length||(n.delete(t),this.stopListening(t,"change"))})),e.delete(t))}))}else n.forEach(((t,e)=>{this.stopListening(e,"change")})),n.clear(),e.clear()}decorate(t){q(this);const e=this[t];if(!e)throw new k("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:t});this.on(t,((t,n)=>{t.return=e.apply(this,n)})),this[t]=function(...e){return this.fire(t,e)},this[t][U]=e,this[V]||(this[V]=[]),this[V].push(t)}stopListening(t,e,n){if(!t&&this[V]){for(const t of this[V])this[t]=this[t][U];delete this[V]}super.stopListening(t,e,n)}}}function q(t){t[j]||(Object.defineProperty(t,j,{value:new Map}),Object.defineProperty(t,R,{value:new Map}),Object.defineProperty(t,F,{value:new Map}))}function W(...t){const e=function(...t){if(!t.length)throw new k("observable-bind-to-parse-error",null);const e={to:[]};let n;"function"==typeof t[t.length-1]&&(e.callback=t.pop());return t.forEach((t=>{if("string"==typeof t)n.properties.push(t);else{if("object"!=typeof t)throw new k("observable-bind-to-parse-error",null);n={observable:t,properties:[]},e.to.push(n)}})),e}(...t),n=Array.from(this._bindings.keys()),o=n.length;if(!e.callback&&e.to.length>1)throw new k("observable-bind-to-no-callback",this);if(o>1&&e.callback)throw new k("observable-bind-to-extra-callback",this);var i;e.to.forEach((t=>{if(t.properties.length&&t.properties.length!==o)throw new k("observable-bind-to-properties-length",this);t.properties.length||(t.properties=this._bindProperties)})),this._to=e.to,e.callback&&(this._bindings.get(n[0]).callback=e.callback),i=this._observable,this._to.forEach((t=>{const e=i[R];let n;e.get(t.observable)||i.listenTo(t.observable,"change",((o,r)=>{n=e.get(t.observable)[r],n&&n.forEach((t=>{$(i,t.property)}))}))})),function(t){let e;t._bindings.forEach(((n,o)=>{t._to.forEach((i=>{e=i.properties[n.callback?0:t._bindProperties.indexOf(o)],n.to.push([i.observable,e]),function(t,e,n,o){const i=t[R],r=i.get(n),s=r||{};s[o]||(s[o]=new Set);s[o].add(e),r||i.set(n,s)}(t._observable,n,i.observable,e)}))}))}(this),this._bindProperties.forEach((t=>{$(this._observable,t)}))}function K(t,e,n){if(this._bindings.size>1)throw new k("observable-bind-to-many-not-one-binding",this);this.to(...function(t,e){const n=t.map((t=>[t,e]));return Array.prototype.concat.apply([],n)}(t,e),n)}function Y(t){return t.every((t=>"string"==typeof t))}function $(t,e){const n=t[F].get(e);let o;n.callback?o=n.callback.apply(t,n.to.map((t=>t[0][t[1]]))):(o=n.to[0],o=o[0][o[1]]),Object.prototype.hasOwnProperty.call(t,e)?t[e]=o:t.set(e,o)}function Z(t){let e=0;for(const n of t)e++;return e}function Q(t,e){const n=Math.min(t.length,e.length);for(let o=0;o{G[t]=H.prototype[t]}));const X="object"==typeof global&&global&&global.Object===Object&&global;var tt="object"==typeof self&&self&&self.Object===Object&&self;const et=X||tt||Function("return this")();const nt=et.Symbol;var ot=Object.prototype,it=ot.hasOwnProperty,rt=ot.toString,st=nt?nt.toStringTag:void 0;const at=function(t){var e=it.call(t,st),n=t[st];try{t[st]=void 0;var o=!0}catch(t){}var i=rt.call(t);return o&&(e?t[st]=n:delete t[st]),i};var ct=Object.prototype.toString;const lt=function(t){return ct.call(t)};var dt=nt?nt.toStringTag:void 0;const ht=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":dt&&dt in Object(t)?at(t):lt(t)};const ut=Array.isArray;const gt=function(t){return null!=t&&"object"==typeof t};const pt=function(t){return"string"==typeof t||!ut(t)&>(t)&&"[object String]"==ht(t)};function mt(t,e,n={},o=[]){const i=n&&n.xmlns,r=i?t.createElementNS(i,e):t.createElement(e);for(const t in n)r.setAttribute(t,n[t]);!pt(o)&&J(o)||(o=[o]);for(let e of o)pt(e)&&(e=t.createTextNode(e)),r.appendChild(e);return r}const ft=function(t,e){return function(n){return t(e(n))}};const kt=ft(Object.getPrototypeOf,Object);var bt=Function.prototype,wt=Object.prototype,At=bt.toString,Ct=wt.hasOwnProperty,_t=At.call(Object);const vt=function(t){if(!gt(t)||"[object Object]"!=ht(t))return!1;var e=kt(t);if(null===e)return!0;var n=Ct.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&At.call(n)==_t};const yt=function(){this.__data__=[],this.size=0};const xt=function(t,e){return t===e||t!=t&&e!=e};const Et=function(t,e){for(var n=t.length;n--;)if(xt(t[n][0],e))return n;return-1};var Dt=Array.prototype.splice;const It=function(t){var e=this.__data__,n=Et(e,t);return!(n<0)&&(n==e.length-1?e.pop():Dt.call(e,n,1),--this.size,!0)};const St=function(t){var e=this.__data__,n=Et(e,t);return n<0?void 0:e[n][1]};const Mt=function(t){return Et(this.__data__,t)>-1};const Tt=function(t,e){var n=this.__data__,o=Et(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this};function Bt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991};var Ue={};Ue["[object Float32Array]"]=Ue["[object Float64Array]"]=Ue["[object Int8Array]"]=Ue["[object Int16Array]"]=Ue["[object Int32Array]"]=Ue["[object Uint8Array]"]=Ue["[object Uint8ClampedArray]"]=Ue["[object Uint16Array]"]=Ue["[object Uint32Array]"]=!0,Ue["[object Arguments]"]=Ue["[object Array]"]=Ue["[object ArrayBuffer]"]=Ue["[object Boolean]"]=Ue["[object DataView]"]=Ue["[object Date]"]=Ue["[object Error]"]=Ue["[object Function]"]=Ue["[object Map]"]=Ue["[object Number]"]=Ue["[object Object]"]=Ue["[object RegExp]"]=Ue["[object Set]"]=Ue["[object String]"]=Ue["[object WeakMap]"]=!1;const He=function(t){return gt(t)&&Ve(t.length)&&!!Ue[ht(t)]};const Ge=function(t){return function(e){return t(e)}};var qe="object"==typeof exports&&exports&&!exports.nodeType&&exports,We=qe&&"object"==typeof module&&module&&!module.nodeType&&module,Ke=We&&We.exports===qe&&X.process;const Ye=function(){try{var t=We&&We.require&&We.require("util").types;return t||Ke&&Ke.binding&&Ke.binding("util")}catch(t){}}();var $e=Ye&&Ye.isTypedArray;const Ze=$e?Ge($e):He;var Qe=Object.prototype.hasOwnProperty;const Je=function(t,e){var n=ut(t),o=!n&&Ne(t),i=!n&&!o&&je(t),r=!n&&!o&&!i&&Ze(t),s=n||o||i||r,a=s?Ie(t.length,String):[],c=a.length;for(var l in t)!e&&!Qe.call(t,l)||s&&("length"==l||i&&("offset"==l||"parent"==l)||r&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Fe(l,c))||a.push(l);return a};var Xe=Object.prototype;const tn=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Xe)};const en=ft(Object.keys,Object);var nn=Object.prototype.hasOwnProperty;const on=function(t){if(!tn(t))return en(t);var e=[];for(var n in Object(t))nn.call(t,n)&&"constructor"!=n&&e.push(n);return e};const rn=function(t){return null!=t&&Ve(t.length)&&!jt(t)};const sn=function(t){return rn(t)?Je(t):on(t)};const an=function(t,e){return t&&De(e,sn(e),t)};const cn=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e};var ln=Object.prototype.hasOwnProperty;const dn=function(t){if(!L(t))return cn(t);var e=tn(t),n=[];for(var o in t)("constructor"!=o||!e&&ln.call(t,o))&&n.push(o);return n};const hn=function(t){return rn(t)?Je(t,!0):dn(t)};const un=function(t,e){return t&&De(e,hn(e),t)};var gn="object"==typeof exports&&exports&&!exports.nodeType&&exports,pn=gn&&"object"==typeof module&&module&&!module.nodeType&&module,mn=pn&&pn.exports===gn?et.Buffer:void 0,fn=mn?mn.allocUnsafe:void 0;const kn=function(t,e){if(e)return t.slice();var n=t.length,o=fn?fn(n):new t.constructor(n);return t.copy(o),o};const bn=function(t,e){var n=-1,o=t.length;for(e||(e=Array(o));++n{this._setToTarget(t,o,e[o],n)}))}}function vo(t){return Ao(t,yo)}function yo(t){return Co(t)?t:void 0}function xo(t){if(t){if(t.defaultView)return t instanceof t.defaultView.Document;if(t.ownerDocument&&t.ownerDocument.defaultView)return t instanceof t.ownerDocument.defaultView.Node}return!1}function Eo(t){const e=Object.prototype.toString.apply(t);return"[object Window]"==e||"[object global]"==e}const Do=Io(S());function Io(t){if(!t)return Do;return class extends t{listenTo(t,e,n,o={}){if(xo(t)||Eo(t)){const i={capture:!!o.useCapture,passive:!!o.usePassive},r=this._getProxyEmitter(t,i)||new So(t,i);this.listenTo(r,e,n,o)}else super.listenTo(t,e,n,o)}stopListening(t,e,n){if(xo(t)||Eo(t)){const o=this._getAllProxyEmitters(t);for(const t of o)this.stopListening(t,e,n)}else super.stopListening(t,e,n)}_getProxyEmitter(t,e){return function(t,e){const n=t[x];return n&&n[e]?n[e].emitter:null}(this,Mo(t,e))}_getAllProxyEmitters(t){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map((e=>this._getProxyEmitter(t,e))).filter((t=>!!t))}}}["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((t=>{Io[t]=Do.prototype[t]}));class So extends(S()){constructor(t,e){super(),M(this,Mo(t,e)),this._domNode=t,this._options=e}attach(t){if(this._domListeners&&this._domListeners[t])return;const e=this._createDomListener(t);this._domNode.addEventListener(t,e,this._options),this._domListeners||(this._domListeners={}),this._domListeners[t]=e}detach(t){let e;!this._domListeners[t]||(e=this._events[t])&&e.callbacks.length||this._domListeners[t].removeListener()}_addEventListener(t,e,n){this.attach(t),S().prototype._addEventListener.call(this,t,e,n)}_removeEventListener(t,e){S().prototype._removeEventListener.call(this,t,e),this.detach(t)}_createDomListener(t){const e=e=>{this.fire(t,e)};return e.removeListener=()=>{this._domNode.removeEventListener(t,e,this._options),delete this._domListeners[t]},e}}function Mo(t,e){let n=function(t){return t["data-ck-expando"]||(t["data-ck-expando"]=g())}(t);for(const t of Object.keys(e).sort())e[t]&&(n+="-"+t);return n}let To;try{To={window,document}}catch(t){To={window:{},document:{}}}const Bo=To;function No(t){return"[object Text]"==Object.prototype.toString.call(t)}function Po(t){return"[object Range]"==Object.prototype.toString.apply(t)}function zo(t){const e=t.ownerDocument.defaultView.getComputedStyle(t);return{top:parseInt(e.borderTopWidth,10),right:parseInt(e.borderRightWidth,10),bottom:parseInt(e.borderBottomWidth,10),left:parseInt(e.borderLeftWidth,10)}}const Oo=["top","right","bottom","left","width","height"];class Lo{constructor(t){const e=Po(t);if(Object.defineProperty(this,"_source",{value:t._source||t,writable:!0,enumerable:!1}),Fo(t)||e)if(e){const e=Lo.getDomRangeRects(t);jo(this,Lo.getBoundingRect(e))}else jo(this,t.getBoundingClientRect());else if(Eo(t)){const{innerWidth:e,innerHeight:n}=t;jo(this,{top:0,right:e,bottom:n,left:0,width:e,height:n})}else jo(this,t)}clone(){return new Lo(this)}moveTo(t,e){return this.top=e,this.right=t+this.width,this.bottom=e+this.height,this.left=t,this}moveBy(t,e){return this.top+=e,this.right+=t,this.left+=t,this.bottom+=e,this}getIntersection(t){const e={top:Math.max(this.top,t.top),right:Math.min(this.right,t.right),bottom:Math.min(this.bottom,t.bottom),left:Math.max(this.left,t.left),width:0,height:0};return e.width=e.right-e.left,e.height=e.bottom-e.top,e.width<0||e.height<0?null:new Lo(e)}getIntersectionArea(t){const e=this.getIntersection(t);return e?e.getArea():0}getArea(){return this.width*this.height}getVisible(){const t=this._source;let e=this.clone();if(Ro(t))return e;let n,o=t,i=t.parentNode||t.commonAncestorContainer;for(;i&&!Ro(i);){if(o instanceof HTMLElement&&"absolute"===Vo(o)&&(n=o),n&&("relative"!==Vo(i)||"visible"===(r=i).ownerDocument.defaultView.getComputedStyle(r).overflow)){o=i,i=i.parentNode;continue}const t=new Lo(i),s=e.getIntersection(t);if(!s)return null;s.getArea(){for(const e of t){const t=Uo._getElementCallbacks(e.target);if(t)for(const n of t)n(e)}}))}};let Ho=Uo;function Go(t,e){t instanceof HTMLTextAreaElement&&(t.value=e),t.innerHTML=e}function qo(t){return e=>e+t}function Wo(t){let e=0;for(;t.previousSibling;)t=t.previousSibling,e++;return e}function Ko(t,e,n){t.insertBefore(n,t.childNodes[e]||null)}function Yo(t){return t&&t.nodeType===Node.COMMENT_NODE}function $o(t){return!!(t&&t.getClientRects&&t.getClientRects().length)}Ho._observerInstance=null,Ho._elementCallbacks=null;var Zo=Math.pow;function Qo({element:t,target:e,positions:n,limiter:o,fitInViewport:i,viewportOffsetConfig:r}){jt(e)&&(e=e()),jt(o)&&(o=o());const s=function(t){return t&&t.parentNode?t.offsetParent===Bo.document.body?null:t.offsetParent:null}(t),a=new Lo(t),c=new Lo(e);let l;const d=i&&function(t){t=Object.assign({top:0,bottom:0,left:0,right:0},t);const e=new Lo(Bo.window);return e.top+=t.top,e.height-=t.top,e.bottom-=t.bottom,e.height-=t.bottom,e}(r)||null,h={targetRect:c,elementRect:a,positionedElementAncestor:s,viewportRect:d};if(o||i){const t=o&&new Lo(o).getVisible();Object.assign(h,{limiterRect:t,viewportRect:d}),l=function(t,e){const{elementRect:n}=e,o=n.getArea(),i=t.map((t=>new Xo(t,e))).filter((t=>!!t.name));let r=0,s=null;for(const t of i){const{limiterIntersectionArea:e,viewportIntersectionArea:n}=t;if(e===o)return t;const i=Zo(n,2)+Zo(e,2);i>r&&(r=i,s=t)}return s}(n,h)||new Xo(n[0],h)}else l=new Xo(n[0],h);return l}function Jo(t){const{scrollX:e,scrollY:n}=Bo.window;return t.clone().moveBy(e,n)}class Xo{constructor(t,e){const n=t(e.targetRect,e.elementRect,e.viewportRect);if(!n)return;const{left:o,top:i,name:r,config:s}=n;this.name=r,this.config=s,this._positioningFunctionCorrdinates={left:o,top:i},this._options=e}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const t=this._options.limiterRect;if(t){const e=this._options.viewportRect;if(!e)return t.getIntersectionArea(this._rect);{const n=t.getIntersection(e);if(n)return n.getIntersectionArea(this._rect)}}return 0}get viewportIntersectionArea(){const t=this._options.viewportRect;return t?t.getIntersectionArea(this._rect):0}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCorrdinates.left,this._positioningFunctionCorrdinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=Jo(this._rect),this._options.positionedElementAncestor&&function(t,e){const n=Jo(new Lo(e)),o=zo(e);let i=0,r=0;i-=n.left,r-=n.top,i+=e.scrollLeft,r+=e.scrollTop,i-=o.left,r-=o.top,t.moveBy(i,r)}(this._cachedAbsoluteRect,this._options.positionedElementAncestor)),this._cachedAbsoluteRect}}function ti(t){const e=t.parentNode;e&&e.removeChild(t)}function ei({window:t,rect:e,alignToTop:n,forceScroll:o,viewportOffset:i}){const r=e.clone().moveBy(0,i.bottom),s=e.clone().moveBy(0,-i.top),a=new Lo(t).excludeScrollbarsAndBorders(),c=n&&o,l=[s,r].every((t=>a.contains(t)));let{scrollX:d,scrollY:h}=t;const u=d,g=h;c?h-=a.top-e.top+i.top:l||(ii(s,a)?h-=a.top-e.top+i.top:oi(r,a)&&(h+=n?e.top-a.top-i.top:e.bottom-a.bottom+i.bottom)),l||(ri(e,a)?d-=a.left-e.left+i.left:si(e,a)&&(d+=e.right-a.right+i.right)),d==u&&h===g||t.scrollTo(d,h)}function ni({parent:t,getRect:e,alignToTop:n,forceScroll:o,ancestorOffset:i=0,limiterElement:r}){const s=ai(t),a=n&&o;let c,l,d;const h=r||s.document.body;for(;t!=h;)l=e(),c=new Lo(t).excludeScrollbarsAndBorders(),d=c.contains(l),a?t.scrollTop-=c.top-l.top+i:d||(ii(l,c)?t.scrollTop-=c.top-l.top+i:oi(l,c)&&(t.scrollTop+=n?l.top-c.top-i:l.bottom-c.bottom+i)),d||(ri(l,c)?t.scrollLeft-=c.left-l.left+i:si(l,c)&&(t.scrollLeft+=l.right-c.right+i)),t=t.parentNode}function oi(t,e){return t.bottom>e.bottom}function ii(t,e){return t.tope.right}function ai(t){return Po(t)?t.startContainer.ownerDocument.defaultView:t.ownerDocument.defaultView}function ci(t){if(Po(t)){let e=t.commonAncestorContainer;return No(e)&&(e=e.parentNode),e}return t.parentNode}function li(t,e){const n=ai(t),o=new Lo(t);if(n===e)return o;{let t=n;for(;t!=e;){const e=t.frameElement,n=new Lo(e).excludeScrollbarsAndBorders();o.moveBy(n.left,n.top),t=t.parent}}return o}const di={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},hi={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},ui=function(){const t={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 e=65;e<=90;e++){t[String.fromCharCode(e).toLowerCase()]=e}for(let e=48;e<=57;e++)t[e-48]=e;for(let e=112;e<=123;e++)t["f"+(e-111)]=e;for(const e of"`-=[];',./\\")t[e]=e.charCodeAt(0);return t}(),gi=Object.fromEntries(Object.entries(ui).map((([t,e])=>[e,t.charAt(0).toUpperCase()+t.slice(1)])));function pi(t){let e;if("string"==typeof t){if(e=ui[t.toLowerCase()],!e)throw new k("keyboard-unknown-key",null,{key:t})}else e=t.keyCode+(t.altKey?ui.alt:0)+(t.ctrlKey?ui.ctrl:0)+(t.shiftKey?ui.shift:0)+(t.metaKey?ui.cmd:0);return e}function mi(t){return"string"==typeof t&&(t=function(t){return t.split("+").map((t=>t.trim()))}(t)),t.map((t=>"string"==typeof t?function(t){if(t.endsWith("!"))return pi(t.slice(0,-1));const e=pi(t);return i.isMac&&e==ui.ctrl?ui.cmd:e}(t):t)).reduce(((t,e)=>e+t),0)}function fi(t){let e=mi(t);return Object.entries(i.isMac?di:hi).reduce(((t,[n,o])=>(0!=(e&ui[n])&&(e&=~ui[n],t+=o),t)),"")+(e?gi[e]:"")}function ki(t,e){const n="ltr"===e;switch(t){case ui.arrowleft:return n?"left":"right";case ui.arrowright:return n?"right":"left";case ui.arrowup:return"up";case ui.arrowdown:return"down"}}function bi(t){return Array.isArray(t)?t:[t]}function wi(t,e,n=1){if("number"!=typeof n)throw new k("translation-service-quantity-not-a-number",null,{quantity:n});const o=Object.keys(Bo.window.CKEDITOR_TRANSLATIONS).length;1===o&&(t=Object.keys(Bo.window.CKEDITOR_TRANSLATIONS)[0]);const i=e.id||e.string;if(0===o||!function(t,e){return!!Bo.window.CKEDITOR_TRANSLATIONS[t]&&!!Bo.window.CKEDITOR_TRANSLATIONS[t].dictionary[e]}(t,i))return 1!==n?e.plural:e.string;const r=Bo.window.CKEDITOR_TRANSLATIONS[t].dictionary,s=Bo.window.CKEDITOR_TRANSLATIONS[t].getPluralForm||(t=>1===t?0:1),a=r[i];if("string"==typeof a)return a;return a[Number(s(n))]}Bo.window.CKEDITOR_TRANSLATIONS||(Bo.window.CKEDITOR_TRANSLATIONS={});const Ai=["ar","ara","fa","per","fas","he","heb","ku","kur","ug","uig"];function Ci(t){return Ai.includes(t)?"rtl":"ltr"}class _i{constructor({uiLanguage:t="en",contentLanguage:e}={}){this.uiLanguage=t,this.contentLanguage=e||this.uiLanguage,this.uiLanguageDirection=Ci(this.uiLanguage),this.contentLanguageDirection=Ci(this.contentLanguage),this.t=(t,e)=>this._t(t,e)}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(t,e=[]){e=bi(e),"string"==typeof t&&(t={string:t});const n=!!t.plural?e[0]:1;return function(t,e){return t.replace(/%(\d+)/g,((t,n)=>nthis._items.length||e<0)throw new k("collection-add-item-invalid-index",this);let n=0;for(const o of t){const t=this._getItemIdBeforeAdding(o),i=e+n;this._items.splice(i,0,o),this._itemMap.set(t,o),this.fire("add",o,i),n++}return this.fire("change",{added:t,removed:[],index:e}),this}get(t){let e;if("string"==typeof t)e=this._itemMap.get(t);else{if("number"!=typeof t)throw new k("collection-get-invalid-arg",this);e=this._items[t]}return e||null}has(t){if("string"==typeof t)return this._itemMap.has(t);{const e=t[this._idProperty];return e&&this._itemMap.has(e)}}getIndex(t){let e;return e="string"==typeof t?this._itemMap.get(t):t,e?this._items.indexOf(e):-1}remove(t){const[e,n]=this._remove(t);return this.fire("change",{added:[],removed:[e],index:n}),e}map(t,e){return this._items.map(t,e)}find(t,e){return this._items.find(t,e)}filter(t,e){return this._items.filter(t,e)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const t=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:t,index:0})}bindTo(t){if(this._bindToCollection)throw new k("collection-bind-to-rebind",this);return this._bindToCollection=t,{as:t=>{this._setUpBindToBinding((e=>new t(e)))},using:t=>{"function"==typeof t?this._setUpBindToBinding(t):this._setUpBindToBinding((e=>e[t]))}}}_setUpBindToBinding(t){const e=this._bindToCollection,n=(n,o,i)=>{const r=e._bindToCollection==this,s=e._bindToInternalToExternalMap.get(o);if(r&&s)this._bindToExternalToInternalMap.set(o,s),this._bindToInternalToExternalMap.set(s,o);else{const n=t(o);if(!n)return void this._skippedIndexesFromExternal.push(i);let r=i;for(const t of this._skippedIndexesFromExternal)i>t&&r--;for(const t of e._skippedIndexesFromExternal)r>=t&&r++;this._bindToExternalToInternalMap.set(o,n),this._bindToInternalToExternalMap.set(n,o),this.add(n,r);for(let t=0;t{const o=this._bindToExternalToInternalMap.get(e);o&&this.remove(o),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce(((t,e)=>(ne&&t.push(e),t)),[])}))}_getItemIdBeforeAdding(t){const e=this._idProperty;let n;if(e in t){if(n=t[e],"string"!=typeof n)throw new k("collection-add-invalid-id",this);if(this.get(n))throw new k("collection-add-item-already-exists",this)}else t[e]=n=g();return n}_remove(t){let e,n,o,i=!1;const r=this._idProperty;if("string"==typeof t?(n=t,o=this._itemMap.get(n),i=!o,o&&(e=this._items.indexOf(o))):"number"==typeof t?(e=t,o=this._items[e],i=!o,o&&(n=o[r])):(o=t,n=o[r],e=this._items.indexOf(o),i=-1==e||!this._itemMap.get(n)),i)throw new k("collection-remove-404",this);this._items.splice(e,1),this._itemMap.delete(n);const s=this._bindToInternalToExternalMap.get(o);return this._bindToInternalToExternalMap.delete(o),this._bindToExternalToInternalMap.delete(s),this.fire("remove",o,e),[o,e]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function yi(t){const e=t.next();return e.done?null:e.value}class xi extends(Io(G())){constructor(){super(),this._elements=new Set,this._nextEventLoopTimeout=null,this.set("isFocused",!1),this.set("focusedElement",null)}add(t){if(this._elements.has(t))throw new k("focustracker-add-element-already-exist",this);this.listenTo(t,"focus",(()=>this._focus(t)),{useCapture:!0}),this.listenTo(t,"blur",(()=>this._blur()),{useCapture:!0}),this._elements.add(t)}remove(t){t===this.focusedElement&&this._blur(),this._elements.has(t)&&(this.stopListening(t),this._elements.delete(t))}destroy(){this.stopListening()}_focus(t){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=t,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout((()=>{this.focusedElement=null,this.isFocused=!1}),0)}}class Ei{constructor(){this._listener=new(Io())}listenTo(t){this._listener.listenTo(t,"keydown",((t,e)=>{this._listener.fire("_keydown:"+pi(e),e)}))}set(t,e,n={}){const o=mi(t),i=n.priority;this._listener.listenTo(this._listener,"_keydown:"+o,((t,n)=>{e(n,(()=>{n.preventDefault(),n.stopPropagation(),t.stop()})),t.return=!0}),{priority:i})}press(t){return!!this._listener.fire("_keydown:"+pi(t),t)}stopListening(t){this._listener.stopListening(t)}destroy(){this.stopListening()}}function Di(t){return J(t)?new Map(t):function(t){const e=new Map;for(const n in t)e.set(n,t[n]);return e}(t)}function Ii(t,e){let n;function o(...i){o.cancel(),n=setTimeout((()=>t(...i)),e)}return o.cancel=()=>{clearTimeout(n)},o}function Si(t,e){return!!(n=t.charAt(e-1))&&1==n.length&&/[\ud800-\udbff]/.test(n)&&function(t){return!!t&&1==t.length&&/[\udc00-\udfff]/.test(t)}(t.charAt(e));var n}function Mi(t,e){return!!(n=t.charAt(e))&&1==n.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(n);var n}const Ti=function(){const t=[new RegExp("\\p{Emoji}[\\u{E0020}-\\u{E007E}]+\\u{E007F}","u"),new RegExp("\\p{Emoji}\\u{FE0F}?\\u{20E3}","u"),new RegExp("\\p{Emoji}\\u{FE0F}","u"),new RegExp("(?=\\p{General_Category=Other_Symbol})\\p{Emoji}\\p{Emoji_Modifier}*","u")],e=new RegExp("\\p{Regional_Indicator}{2}","u").source,n="(?:"+t.map((t=>t.source)).join("|")+")";return new RegExp(`${e}|${n}(?:‍${n})*`,"ug")}();function Bi(t,e){const n=String(t).matchAll(Ti);return Array.from(n).some((t=>t.index{this.refresh()})),this.listenTo(t,"change:isReadOnly",(()=>{this.refresh()})),this.on("set:isEnabled",(e=>{if(!this.affectsData)return;const n=t.model.document.selection,o=!("$graveyard"==n.getFirstPosition().root.rootName)&&t.model.canEditAt(n);(t.isReadOnly||this._isEnabledBasedOnSelection&&!o)&&(e.return=!1,e.stop())}),{priority:"highest"}),this.on("execute",(t=>{this.isEnabled||t.stop()}),{priority:"high"})}get affectsData(){return this._affectsData}set affectsData(t){this._affectsData=t}refresh(){this.isEnabled=!0}forceDisabled(t){this._disableStack.add(t),1==this._disableStack.size&&(this.on("set:isEnabled",Oi,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(t){this._disableStack.delete(t),0==this._disableStack.size&&(this.off("set:isEnabled",Oi),this.refresh())}execute(...t){}destroy(){this.stopListening()}}function Oi(t){t.return=!1,t.stop()}class Li extends zi{constructor(){super(...arguments),this._childCommandsDefinitions=[]}refresh(){}execute(...t){const e=this._getFirstEnabledCommand();return!!e&&e.execute(t)}registerChildCommand(t,e={}){m(this._childCommandsDefinitions,{command:t,priority:e.priority||"normal"}),t.on("change:isEnabled",(()=>this._checkEnabled())),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const t=this._childCommandsDefinitions.find((({command:t})=>t.isEnabled));return t&&t.command}}class ji extends(S()){constructor(t,e=[],n=[]){super(),this._plugins=new Map,this._context=t,this._availablePlugins=new Map;for(const t of e)t.pluginName&&this._availablePlugins.set(t.pluginName,t);this._contextPlugins=new Map;for(const[t,e]of n)this._contextPlugins.set(t,e),this._contextPlugins.set(e,t),t.pluginName&&this._availablePlugins.set(t.pluginName,t)}*[Symbol.iterator](){for(const t of this._plugins)"function"==typeof t[0]&&(yield t)}get(t){const e=this._plugins.get(t);if(!e){let e=t;throw"function"==typeof t&&(e=t.pluginName||t.name),new k("plugincollection-plugin-not-loaded",this._context,{plugin:e})}return e}has(t){return this._plugins.has(t)}init(t,e=[],n=[]){const o=this,i=this._context;!function t(e,n=new Set){e.forEach((e=>{a(e)&&(n.has(e)||(n.add(e),e.pluginName&&!o._availablePlugins.has(e.pluginName)&&o._availablePlugins.set(e.pluginName,e),e.requires&&t(e.requires,n)))}))}(t),h(t);const r=[...function t(e,n=new Set){return e.map((t=>a(t)?t:o._availablePlugins.get(t))).reduce(((e,o)=>n.has(o)?e:(n.add(o),o.requires&&(h(o.requires,o),t(o.requires,n).forEach((t=>e.add(t)))),e.add(o))),new Set)}(t.filter((t=>!l(t,e))))];!function(t,e){for(const n of e){if("function"!=typeof n)throw new k("plugincollection-replace-plugin-invalid-type",null,{pluginItem:n});const e=n.pluginName;if(!e)throw new k("plugincollection-replace-plugin-missing-name",null,{pluginItem:n});if(n.requires&&n.requires.length)throw new k("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:e});const i=o._availablePlugins.get(e);if(!i)throw new k("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:e});const r=t.indexOf(i);if(-1===r){if(o._contextPlugins.has(i))return;throw new k("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:e})}if(i.requires&&i.requires.length)throw new k("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:e});t.splice(r,1,n),o._availablePlugins.set(e,n)}}(r,n);const s=r.map((t=>{let e=o._contextPlugins.get(t);return e=e||new t(i),o._add(t,e),e}));return u(s,"init").then((()=>u(s,"afterInit"))).then((()=>s));function a(t){return"function"==typeof t}function c(t){return a(t)&&!!t.isContextPlugin}function l(t,e){return e.some((e=>e===t||(d(t)===e||d(e)===t)))}function d(t){return a(t)?t.pluginName||t.name:t}function h(t,n=null){t.map((t=>a(t)?t:o._availablePlugins.get(t)||t)).forEach((t=>{!function(t,e){if(a(t))return;if(e)throw new k("plugincollection-soft-required",i,{missingPlugin:t,requiredBy:d(e)});throw new k("plugincollection-plugin-not-found",i,{plugin:t})}(t,n),function(t,e){if(!c(e))return;if(c(t))return;throw new k("plugincollection-context-required",i,{plugin:d(t),requiredBy:d(e)})}(t,n),function(t,n){if(!n)return;if(!l(t,e))return;throw new k("plugincollection-required",i,{plugin:d(t),requiredBy:d(n)})}(t,n)}))}function u(t,e){return t.reduce(((t,n)=>n[e]?o._contextPlugins.has(n)?t:t.then(n[e].bind(n)):t),Promise.resolve())}}destroy(){const t=[];for(const[,e]of this)"function"!=typeof e.destroy||this._contextPlugins.has(e)||t.push(e.destroy());return Promise.all(t)}_add(t,e){this._plugins.set(t,e);const n=t.pluginName;if(n){if(this._plugins.has(n))throw new k("plugincollection-plugin-name-conflict",null,{pluginName:n,plugin1:this._plugins.get(n).constructor,plugin2:t});this._plugins.set(n,e)}}}class Ri{constructor(t){this._contextOwner=null,this.config=new _o(t,this.constructor.defaultConfig);const e=this.constructor.builtinPlugins;this.config.define("plugins",e),this.plugins=new ji(this,e);const n=this.config.get("language")||{};this.locale=new _i({uiLanguage:"string"==typeof n?n:n.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new vi}initPlugins(){const t=this.config.get("plugins")||[],e=this.config.get("substitutePlugins")||[];for(const n of t.concat(e)){if("function"!=typeof n)throw new k("context-initplugins-constructor-only",null,{Plugin:n});if(!0!==n.isContextPlugin)throw new k("context-initplugins-invalid-plugin",null,{Plugin:n})}return this.plugins.init(t,[],e)}destroy(){return Promise.all(Array.from(this.editors,(t=>t.destroy()))).then((()=>this.plugins.destroy()))}_addEditor(t,e){if(this._contextOwner)throw new k("context-addeditor-private-context");this.editors.add(t),e&&(this._contextOwner=t)}_removeEditor(t){return this.editors.has(t)&&this.editors.remove(t),this._contextOwner===t?this.destroy():Promise.resolve()}_getEditorConfig(){const t={};for(const e of this.config.names())["plugins","removePlugins","extraPlugins"].includes(e)||(t[e]=this.config.get(e));return t}static create(t){return new Promise((e=>{const n=new this(t);e(n.initPlugins().then((()=>n)))}))}}class Fi extends(G()){constructor(t){super(),this.context=t}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}class Vi extends Ei{constructor(t){super(),this.editor=t}set(t,e,n={}){if("string"==typeof e){const t=e;e=(e,n)=>{this.editor.execute(t),n()}}super.set(t,e,n)}}var Ui=n(6062),Hi=n.n(Ui),Gi=n(4717),qi={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Gi.Z,qi);Gi.Z.locals;const Wi=new WeakMap;let Ki=!1;function Yi({view:t,element:e,text:n,isDirectHost:o=!0,keepOnFocus:i=!1}){const r=t.document;function s(n){Wi.get(r).set(e,{text:n,isDirectHost:o,keepOnFocus:i,hostElement:o?e:null}),t.change((t=>Zi(r,t)))}Wi.has(r)||(Wi.set(r,new Map),r.registerPostFixer((t=>Zi(r,t))),r.on("change:isComposing",(()=>{t.change((t=>Zi(r,t)))}),{priority:"high"})),e.is("editableElement")&&e.on("change:placeholder",((t,e,n)=>{s(n)})),e.placeholder?s(e.placeholder):n&&s(n),n&&function(){Ki||b("enableplaceholder-deprecated-text-option");Ki=!0}()}function $i(t,e){return!!e.hasClass("ck-placeholder")&&(t.removeClass("ck-placeholder",e),!0)}function Zi(t,e){const n=Wi.get(t),o=[];let i=!1;for(const[t,r]of n)r.isDirectHost&&(o.push(t),Qi(e,t,r)&&(i=!0));for(const[t,r]of n){if(r.isDirectHost)continue;const n=Ji(t);n&&(o.includes(n)||(r.hostElement=n,Qi(e,t,r)&&(i=!0)))}return i}function Qi(t,e,n){const{text:o,isDirectHost:i,hostElement:r}=n;let s=!1;r.getAttribute("data-placeholder")!==o&&(t.setAttribute("data-placeholder",o,r),s=!0);return(i||1==e.childCount)&&function(t,e){if(!t.isAttached())return!1;if(Array.from(t.getChildren()).some((t=>!t.is("uiElement"))))return!1;const n=t.document,o=n.selection.anchor;return!(n.isComposing&&o&&o.parent===t||!e&&n.isFocused&&(!o||o.parent===t))}(r,n.keepOnFocus)?function(t,e){return!e.hasClass("ck-placeholder")&&(t.addClass("ck-placeholder",e),!0)}(t,r)&&(s=!0):$i(t,r)&&(s=!0),s}function Ji(t){if(t.childCount){const e=t.getChild(0);if(e.is("element")&&!e.is("uiElement")&&!e.is("attributeElement"))return e}return null}class Xi{is(){throw new Error("is() method is abstract")}}const tr=function(t){return wo(t,4)};class er extends(S(Xi)){constructor(t){super(),this.document=t,this.parent=null}get index(){let t;if(!this.parent)return null;if(-1==(t=this.parent.getChildIndex(this)))throw new k("view-node-not-found-in-parent",this);return t}get nextSibling(){const t=this.index;return null!==t&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return null!==t&&this.parent.getChild(t-1)||null}get root(){let t=this;for(;t.parent;)t=t.parent;return t}isAttached(){return this.root.is("rootElement")}getPath(){const t=[];let e=this;for(;e.parent;)t.unshift(e.index),e=e.parent;return t}getAncestors(t={}){const e=[];let n=t.includeSelf?this:this.parent;for(;n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}getCommonAncestor(t,e={}){const n=this.getAncestors(e),o=t.getAncestors(e);let i=0;for(;n[i]==o[i]&&n[i];)i++;return 0===i?null:n[i-1]}isBefore(t){if(this==t)return!1;if(this.root!==t.root)return!1;const e=this.getPath(),n=t.getPath(),o=Q(e,n);switch(o){case"prefix":return!0;case"extension":return!1;default:return e[o]t.data.length)throw new k("view-textproxy-wrong-offsetintext",this);if(n<0||e+n>t.data.length)throw new k("view-textproxy-wrong-length",this);this.data=t.data.substring(e,e+n),this.offsetInText=e}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(t={}){const e=[];let n=t.includeSelf?this.textNode:this.parent;for(;null!==n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}}or.prototype.is=function(t){return"$textProxy"===t||"view:$textProxy"===t||"textProxy"===t||"view:textProxy"===t};class ir{constructor(...t){this._patterns=[],this.add(...t)}add(...t){for(let e of t)("string"==typeof e||e instanceof RegExp)&&(e={name:e}),this._patterns.push(e)}match(...t){for(const e of t)for(const t of this._patterns){const n=rr(e,t);if(n)return{element:e,pattern:t,match:n}}return null}matchAll(...t){const e=[];for(const n of t)for(const t of this._patterns){const o=rr(n,t);o&&e.push({element:n,pattern:t,match:o})}return e.length>0?e:null}getElementName(){if(1!==this._patterns.length)return null;const t=this._patterns[0],e=t.name;return"function"==typeof t||!e||e instanceof RegExp?null:e}}function rr(t,e){if("function"==typeof e)return e(t);const n={};return e.name&&(n.name=function(t,e){if(t instanceof RegExp)return!!e.match(t);return t===e}(e.name,t.name),!n.name)||e.attributes&&(n.attributes=function(t,e){const n=new Set(e.getAttributeKeys());vt(t)?(void 0!==t.style&&b("matcher-pattern-deprecated-attributes-style-key",t),void 0!==t.class&&b("matcher-pattern-deprecated-attributes-class-key",t)):(n.delete("style"),n.delete("class"));return sr(t,n,(t=>e.getAttribute(t)))}(e.attributes,t),!n.attributes)||e.classes&&(n.classes=function(t,e){return sr(t,e.getClassNames(),(()=>{}))}(e.classes,t),!n.classes)||e.styles&&(n.styles=function(t,e){return sr(t,e.getStyleNames(!0),(t=>e.getStyle(t)))}(e.styles,t),!n.styles)?null:n}function sr(t,e,n){const o=function(t){if(Array.isArray(t))return t.map((t=>vt(t)?(void 0!==t.key&&void 0!==t.value||b("matcher-pattern-missing-key-or-value",t),[t.key,t.value]):[t,!0]));if(vt(t))return Object.entries(t);return[[t,!0]]}(t),i=Array.from(e),r=[];if(o.forEach((([t,e])=>{i.forEach((o=>{(function(t,e){return!0===t||t===e||t instanceof RegExp&&e.match(t)})(t,o)&&function(t,e,n){if(!0===t)return!0;const o=n(e);return t===o||t instanceof RegExp&&!!String(o).match(t)}(e,o,n)&&r.push(o)}))})),o.length&&!(r.lengthi?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var r=Array(i);++o0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}};const Kr=Wr(Gr);const Yr=function(t,e){return Kr(Ur(t,e,Rr),t+"")};const $r=function(t,e,n){if(!L(n))return!1;var o=typeof e;return!!("number"==o?rn(n)&&Fe(e,n.length):"string"==o&&e in n)&&xt(n[e],t)};const Zr=function(t){return Yr((function(e,n){var o=-1,i=n.length,r=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(r=t.length>3&&"function"==typeof r?(i--,r):void 0,s&&$r(n[0],n[1],s)&&(r=i<3?void 0:r,i=1),e=Object(e);++oe===t));return Array.isArray(e)}set(t,e){if(L(t))for(const[e,n]of Object.entries(t))this._styleProcessor.toNormalizedForm(e,n,this._styles);else this._styleProcessor.toNormalizedForm(t,e,this._styles)}remove(t){const e=ns(t);Mr(this._styles,e),delete this._styles[t],this._cleanEmptyObjectsOnPath(e)}getNormalized(t){return this._styleProcessor.getNormalized(t,this._styles)}toString(){return this.isEmpty?"":this._getStylesEntries().map((t=>t.join(":"))).sort().join(";")+";"}getAsString(t){if(this.isEmpty)return;if(this._styles[t]&&!L(this._styles[t]))return this._styles[t];const e=this._styleProcessor.getReducedForm(t,this._styles).find((([e])=>e===t));return Array.isArray(e)?e[1]:void 0}getStyleNames(t=!1){if(this.isEmpty)return[];if(t)return this._styleProcessor.getStyleNames(this._styles);return this._getStylesEntries().map((([t])=>t))}clear(){this._styles={}}_getStylesEntries(){const t=[],e=Object.keys(this._styles);for(const n of e)t.push(...this._styleProcessor.getReducedForm(n,this._styles));return t}_cleanEmptyObjectsOnPath(t){const e=t.split(".");if(!(e.length>1))return;const n=e.splice(0,e.length-1).join("."),o=Tr(this._styles,n);if(!o)return;!Array.from(Object.keys(o)).length&&this.remove(n)}}class es{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(t,e,n){if(L(e))os(n,ns(t),e);else if(this._normalizers.has(t)){const o=this._normalizers.get(t),{path:i,value:r}=o(e);os(n,i,r)}else os(n,t,e)}getNormalized(t,e){if(!t)return Qr({},e);if(void 0!==e[t])return e[t];if(this._extractors.has(t)){const n=this._extractors.get(t);if("string"==typeof n)return Tr(e,n);const o=n(t,e);if(o)return o}return Tr(e,ns(t))}getReducedForm(t,e){const n=this.getNormalized(t,e);if(void 0===n)return[];if(this._reducers.has(t)){return this._reducers.get(t)(n)}return[[t,n]]}getStyleNames(t){const e=Array.from(this._consumables.keys()).filter((e=>{const n=this.getNormalized(e,t);return n&&"object"==typeof n?Object.keys(n).length:n})),n=new Set([...e,...Object.keys(t)]);return Array.from(n.values())}getRelatedStyles(t){return this._consumables.get(t)||[]}setNormalizer(t,e){this._normalizers.set(t,e)}setExtractor(t,e){this._extractors.set(t,e)}setReducer(t,e){this._reducers.set(t,e)}setStyleRelation(t,e){this._mapStyleNames(t,e);for(const n of e)this._mapStyleNames(n,[t])}_mapStyleNames(t,e){this._consumables.has(t)||this._consumables.set(t,[]),this._consumables.get(t).push(...e)}}function ns(t){return t.replace("-",".")}function os(t,e,n){let o=n;L(n)&&(o=Qr({},Tr(t,e),n)),Xr(t,e,o)}class is extends er{constructor(t,e,n,o){if(super(t),this._unsafeAttributesToRender=[],this._customProperties=new Map,this.name=e,this._attrs=function(t){const e=Di(t);for(const[t,n]of e)null===n?e.delete(t):"string"!=typeof n&&e.set(t,String(n));return e}(n),this._children=[],o&&this._insertChild(0,o),this._classes=new Set,this._attrs.has("class")){const t=this._attrs.get("class");rs(this._classes,t),this._attrs.delete("class")}this._styles=new ts(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(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}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(t){if("class"==t)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==t){const t=this._styles.toString();return""==t?void 0:t}return this._attrs.get(t)}hasAttribute(t){return"class"==t?this._classes.size>0:"style"==t?!this._styles.isEmpty:this._attrs.has(t)}isSimilar(t){if(!(t instanceof is))return!1;if(this===t)return!0;if(this.name!=t.name)return!1;if(this._attrs.size!==t._attrs.size||this._classes.size!==t._classes.size||this._styles.size!==t._styles.size)return!1;for(const[e,n]of this._attrs)if(!t._attrs.has(e)||t._attrs.get(e)!==n)return!1;for(const e of this._classes)if(!t._classes.has(e))return!1;for(const e of this._styles.getStyleNames())if(!t._styles.has(e)||t._styles.getAsString(e)!==this._styles.getAsString(e))return!1;return!0}hasClass(...t){for(const e of t)if(!this._classes.has(e))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(t){return this._styles.getAsString(t)}getNormalizedStyle(t){return this._styles.getNormalized(t)}getStyleNames(t){return this._styles.getStyleNames(t)}hasStyle(...t){for(const e of t)if(!this._styles.has(e))return!1;return!0}findAncestor(...t){const e=new ir(...t);let n=this.parent;for(;n&&!n.is("documentFragment");){if(e.match(n))return n;n=n.parent}return null}getCustomProperty(t){return this._customProperties.get(t)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const t=Array.from(this._classes).sort().join(","),e=this._styles.toString(),n=Array.from(this._attrs).map((t=>`${t[0]}="${t[1]}"`)).sort().join(" ");return this.name+(""==t?"":` class="${t}"`)+(e?` style="${e}"`:"")+(""==n?"":` ${n}`)}shouldRenderUnsafeAttribute(t){return this._unsafeAttributesToRender.includes(t)}_clone(t=!1){const e=[];if(t)for(const n of this.getChildren())e.push(n._clone(t));const n=new this.constructor(this.document,this.name,this._attrs,e);return n._classes=new Set(this._classes),n._styles.set(this._styles.getNormalized()),n._customProperties=new Map(this._customProperties),n.getFillerOffset=this.getFillerOffset,n._unsafeAttributesToRender=this._unsafeAttributesToRender,n}_appendChild(t){return this._insertChild(this.childCount,t)}_insertChild(t,e){this._fireChange("children",this);let n=0;const o=function(t,e){if("string"==typeof e)return[new nr(t,e)];J(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new nr(t,e):e instanceof or?new nr(t,e.data):e))}(this.document,e);for(const e of o)null!==e.parent&&e._remove(),e.parent=this,e.document=this.document,this._children.splice(t,0,e),t++,n++;return n}_removeChildren(t,e=1){this._fireChange("children",this);for(let n=t;n0&&(this._classes.clear(),!0):"style"==t?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(t)}_addClass(t){this._fireChange("attributes",this);for(const e of bi(t))this._classes.add(e)}_removeClass(t){this._fireChange("attributes",this);for(const e of bi(t))this._classes.delete(e)}_setStyle(t,e){this._fireChange("attributes",this),"string"!=typeof t?this._styles.set(t):this._styles.set(t,e)}_removeStyle(t){this._fireChange("attributes",this);for(const e of bi(t))this._styles.remove(e)}_setCustomProperty(t,e){this._customProperties.set(t,e)}_removeCustomProperty(t){return this._customProperties.delete(t)}}function rs(t,e){const n=e.split(/\s+/);t.clear(),n.forEach((e=>t.add(e)))}is.prototype.is=function(t,e){return e?e===this.name&&("element"===t||"view:element"===t):"element"===t||"view:element"===t||"node"===t||"view:node"===t};class ss extends is{constructor(t,e,n,o){super(t,e,n,o),this.getFillerOffset=as}}function as(){const t=[...this.getChildren()],e=t[this.childCount-1];if(e&&e.is("element","br"))return this.childCount;for(const e of t)if(!e.is("uiElement"))return null;return this.childCount}ss.prototype.is=function(t,e){return e?e===this.name&&("containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t):"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t};class cs extends(G(ss)){constructor(t,e,n,o){super(t,e,n,o),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("placeholder",void 0),this.bind("isReadOnly").to(t),this.bind("isFocused").to(t,"isFocused",(e=>e&&t.selection.editableElement==this)),this.listenTo(t.selection,"change",(()=>{this.isFocused=t.isFocused&&t.selection.editableElement==this}))}destroy(){this.stopListening()}}cs.prototype.is=function(t,e){return e?e===this.name&&("editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t):"editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t};const ls=Symbol("rootName");class ds extends cs{constructor(t,e){super(t,e),this.rootName="main"}get rootName(){return this.getCustomProperty(ls)}set rootName(t){this._setCustomProperty(ls,t)}set _name(t){this.name=t}}ds.prototype.is=function(t,e){return e?e===this.name&&("rootElement"===t||"view:rootElement"===t||"editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t):"rootElement"===t||"view:rootElement"===t||"editableElement"===t||"view:editableElement"===t||"containerElement"===t||"view:containerElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t};class hs{constructor(t={}){if(!t.boundaries&&!t.startPosition)throw new k("view-tree-walker-no-start-position",null);if(t.direction&&"forward"!=t.direction&&"backward"!=t.direction)throw new k("view-tree-walker-unknown-direction",t.startPosition,{direction:t.direction});this.boundaries=t.boundaries||null,t.startPosition?this._position=us._createAt(t.startPosition):this._position=us._createAt(t.boundaries["backward"==t.direction?"end":"start"]),this.direction=t.direction||"forward",this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.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(t){let e,n;do{n=this.position,e=this.next()}while(!e.done&&t(e.value));e.done||(this._position=n)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let t=this.position.clone();const e=this.position,n=t.parent;if(null===n.parent&&t.offset===n.childCount)return{done:!0,value:void 0};if(n===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let o;if(n instanceof nr){if(t.isAtEnd)return this._position=us._createAfter(n),this._next();o=n.data[t.offset]}else o=n.getChild(t.offset);if(o instanceof is){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(t))return{done:!0,value:void 0};t.offset++}else t=new us(o,0);return this._position=t,this._formatReturnValue("elementStart",o,e,t,1)}if(o instanceof nr){if(this.singleCharacters)return t=new us(o,0),this._position=t,this._next();let n,i=o.data.length;return o==this._boundaryEndParent?(i=this.boundaries.end.offset,n=new or(o,0,i),t=us._createAfter(n)):(n=new or(o,0,o.data.length),t.offset++),this._position=t,this._formatReturnValue("text",n,e,t,i)}if("string"==typeof o){let o;if(this.singleCharacters)o=1;else{o=(n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length)-t.offset}const i=new or(n,t.offset,o);return t.offset+=o,this._position=t,this._formatReturnValue("text",i,e,t,o)}return t=us._createAfter(n),this._position=t,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",n,e,t)}_previous(){let t=this.position.clone();const e=this.position,n=t.parent;if(null===n.parent&&0===t.offset)return{done:!0,value:void 0};if(n==this._boundaryStartParent&&t.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let o;if(n instanceof nr){if(t.isAtStart)return this._position=us._createBefore(n),this._previous();o=n.data[t.offset-1]}else o=n.getChild(t.offset-1);if(o instanceof is)return this.shallow?(t.offset--,this._position=t,this._formatReturnValue("elementStart",o,e,t,1)):(t=new us(o,o.childCount),this._position=t,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",o,e,t));if(o instanceof nr){if(this.singleCharacters)return t=new us(o,o.data.length),this._position=t,this._previous();let n,i=o.data.length;if(o==this._boundaryStartParent){const e=this.boundaries.start.offset;n=new or(o,e,o.data.length-e),i=n.data.length,t=us._createBefore(n)}else n=new or(o,0,o.data.length),t.offset--;return this._position=t,this._formatReturnValue("text",n,e,t,i)}if("string"==typeof o){let o;if(this.singleCharacters)o=1;else{const e=n===this._boundaryStartParent?this.boundaries.start.offset:0;o=t.offset-e}t.offset-=o;const i=new or(n,t.offset,o);return this._position=t,this._formatReturnValue("text",i,e,t,o)}return t=us._createBefore(n),this._position=t,this._formatReturnValue("elementStart",n,e,t,1)}_formatReturnValue(t,e,n,o,i){return e instanceof or&&(e.offsetInText+e.data.length==e.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=us._createAfter(e.textNode):(o=us._createAfter(e.textNode),this._position=o)),0===e.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=us._createBefore(e.textNode):(o=us._createBefore(e.textNode),this._position=o))),{done:!1,value:{type:t,item:e,previousPosition:n,nextPosition:o,length:i}}}}class us extends Xi{constructor(t,e){super(),this.parent=t,this.offset=e}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 t=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===t}get root(){return this.parent.root}get editableElement(){let t=this.parent;for(;!(t instanceof cs);){if(!t.parent)return null;t=t.parent}return t}getShiftedBy(t){const e=us._createAt(this),n=e.offset+t;return e.offset=n<0?0:n,e}getLastMatchingPosition(t,e={}){e.startPosition=this;const n=new hs(e);return n.skip(t),n.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(t){const e=this.getAncestors(),n=t.getAncestors();let o=0;for(;e[o]==n[o]&&e[o];)o++;return 0===o?null:e[o-1]}isEqual(t){return this.parent==t.parent&&this.offset==t.offset}isBefore(t){return"before"==this.compareWith(t)}isAfter(t){return"after"==this.compareWith(t)}compareWith(t){if(this.root!==t.root)return"different";if(this.isEqual(t))return"same";const e=this.parent.is("node")?this.parent.getPath():[],n=t.parent.is("node")?t.parent.getPath():[];e.push(this.offset),n.push(t.offset);const o=Q(e,n);switch(o){case"prefix":return"before";case"extension":return"after";default:return e[o]0?new this(n,o):new this(o,n)}static _createIn(t){return this._createFromParentsAndOffsets(t,0,t,t.childCount)}static _createOn(t){const e=t.is("$textProxy")?t.offsetSize:1;return this._createFromPositionAndShift(us._createBefore(t),e)}}function ps(t){return!(!t.item.is("attributeElement")&&!t.item.is("uiElement"))}gs.prototype.is=function(t){return"range"===t||"view:range"===t};class ms extends(S(Xi)){constructor(...t){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",t.length&&this.setTo(...t)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.end:t.start).clone()}get focus(){if(!this._ranges.length)return null;const t=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?t.start:t.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 t of this._ranges)yield t.clone()}getFirstRange(){let t=null;for(const e of this._ranges)t&&!e.start.isBefore(t.start)||(t=e);return t?t.clone():null}getLastRange(){let t=null;for(const e of this._ranges)t&&!e.end.isAfter(t.end)||(t=e);return t?t.clone():null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}isEqual(t){if(this.isFake!=t.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=t.fakeSelectionLabel)return!1;if(this.rangeCount!=t.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const e of this._ranges){let n=!1;for(const o of t._ranges)if(e.isEqual(o)){n=!0;break}if(!n)return!1}return!0}isSimilar(t){if(this.isBackward!=t.isBackward)return!1;const e=Z(this.getRanges());if(e!=Z(t.getRanges()))return!1;if(0==e)return!0;for(let e of this.getRanges()){e=e.getTrimmed();let n=!1;for(let o of t.getRanges())if(o=o.getTrimmed(),e.start.isEqual(o.start)&&e.end.isEqual(o.end)){n=!0;break}if(!n)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(...t){let[e,n,o]=t;if("object"==typeof n&&(o=n,n=void 0),null===e)this._setRanges([]),this._setFakeOptions(o);else if(e instanceof ms||e instanceof fs)this._setRanges(e.getRanges(),e.isBackward),this._setFakeOptions({fake:e.isFake,label:e.fakeSelectionLabel});else if(e instanceof gs)this._setRanges([e],o&&o.backward),this._setFakeOptions(o);else if(e instanceof us)this._setRanges([new gs(e)]),this._setFakeOptions(o);else if(e instanceof er){const t=!!o&&!!o.backward;let i;if(void 0===n)throw new k("view-selection-setto-required-second-parameter",this);i="in"==n?gs._createIn(e):"on"==n?gs._createOn(e):new gs(us._createAt(e,n)),this._setRanges([i],t),this._setFakeOptions(o)}else{if(!J(e))throw new k("view-selection-setto-not-selectable",this);this._setRanges(e,o&&o.backward),this._setFakeOptions(o)}this.fire("change")}setFocus(t,e){if(null===this.anchor)throw new k("view-selection-setfocus-no-ranges",this);const n=us._createAt(t,e);if("same"==n.compareWith(this.focus))return;const o=this.anchor;this._ranges.pop(),"before"==n.compareWith(o)?this._addRange(new gs(n,o),!0):this._addRange(new gs(o,n)),this.fire("change")}_setRanges(t,e=!1){t=Array.from(t),this._ranges=[];for(const e of t)this._addRange(e);this._lastRangeBackward=!!e}_setFakeOptions(t={}){this._isFake=!!t.fake,this._fakeSelectionLabel=t.fake&&t.label||""}_addRange(t,e=!1){if(!(t instanceof gs))throw new k("view-selection-add-range-not-range",this);this._pushRange(t),this._lastRangeBackward=!!e}_pushRange(t){for(const e of this._ranges)if(t.isIntersecting(e))throw new k("view-selection-range-intersects",this,{addedRange:t,intersectingRange:e});this._ranges.push(new gs(t.start,t.end))}}ms.prototype.is=function(t){return"selection"===t||"view:selection"===t};class fs extends(S(Xi)){constructor(...t){super(),this._selection=new ms,this._selection.delegate("change").to(this),t.length&&this._selection.setTo(...t)}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(t){return this._selection.isEqual(t)}isSimilar(t){return this._selection.isSimilar(t)}_setTo(...t){this._selection.setTo(...t)}_setFocus(t,e){this._selection.setFocus(t,e)}}fs.prototype.is=function(t){return"selection"===t||"documentSelection"==t||"view:selection"==t||"view:documentSelection"==t};class ks extends h{constructor(t,e,n){super(t,e),this.startRange=n,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const bs=Symbol("bubbling contexts");function ws(t){return class extends t{fire(t,...e){try{const n=t instanceof h?t:new h(this,t),o=vs(this);if(!o.size)return;if(As(n,"capturing",this),Cs(o,"$capture",n,...e))return n.return;const i=n.startRange||this.selection.getFirstRange(),r=i?i.getContainedElement():null,s=!!r&&Boolean(_s(o,r));let a=r||function(t){if(!t)return null;const e=t.start.parent,n=t.end.parent,o=e.getPath(),i=n.getPath();return o.length>i.length?e:n}(i);if(As(n,"atTarget",a),!s){if(Cs(o,"$text",n,...e))return n.return;As(n,"bubbling",a)}for(;a;){if(a.is("rootElement")){if(Cs(o,"$root",n,...e))return n.return}else if(a.is("element")&&Cs(o,a.name,n,...e))return n.return;if(Cs(o,a,n,...e))return n.return;a=a.parent,As(n,"bubbling",a)}return As(n,"bubbling",this),Cs(o,"$document",n,...e),n.return}catch(t){k.rethrowUnexpectedError(t,this)}}_addEventListener(t,e,n){const o=bi(n.context||"$document"),i=vs(this);for(const r of o){let o=i.get(r);o||(o=new(S()),i.set(r,o)),this.listenTo(o,t,e,n)}}_removeEventListener(t,e){const n=vs(this);for(const o of n.values())this.stopListening(o,t,e)}}}{const t=ws(Object);["fire","_addEventListener","_removeEventListener"].forEach((e=>{ws[e]=t.prototype[e]}))}function As(t,e,n){t instanceof ks&&(t._eventPhase=e,t._currentTarget=n)}function Cs(t,e,n,...o){const i="string"==typeof e?t.get(e):_s(t,e);return!!i&&(i.fire(n,...o),n.stop.called)}function _s(t,e){for(const[n,o]of t)if("function"==typeof n&&n(e))return o;return null}function vs(t){return t[bs]||(t[bs]=new Map),t[bs]}class ys extends(ws(G())){constructor(t){super(),this._postFixers=new Set,this.selection=new fs,this.roots=new vi({idProperty:"rootName"}),this.stylesProcessor=t,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1)}getRoot(t="main"){return this.roots.get(t)}registerPostFixer(t){this._postFixers.add(t)}destroy(){this.roots.map((t=>t.destroy())),this.stopListening()}_callPostFixers(t){let e=!1;do{for(const n of this._postFixers)if(e=n(t),e)break}while(e)}}class xs extends is{constructor(t,e,n,o){super(t,e,n,o),this._priority=10,this._id=null,this._clonesGroup=null,this.getFillerOffset=Es}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new k("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(t){return null!==this.id||null!==t.id?this.id===t.id:super.isSimilar(t)&&this.priority==t.priority}_clone(t=!1){const e=super._clone(t);return e._priority=this._priority,e._id=this._id,e}}function Es(){if(Ds(this))return null;let t=this.parent;for(;t&&t.is("attributeElement");){if(Ds(t)>1)return null;t=t.parent}return!t||Ds(t)>1?null:this.childCount}function Ds(t){return Array.from(t.getChildren()).filter((t=>!t.is("uiElement"))).length}xs.DEFAULT_PRIORITY=10,xs.prototype.is=function(t,e){return e?e===this.name&&("attributeElement"===t||"view:attributeElement"===t||"element"===t||"view:element"===t):"attributeElement"===t||"view:attributeElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t};class Is extends is{constructor(t,e,n,o){super(t,e,n,o),this.getFillerOffset=Ss}_insertChild(t,e){if(e&&(e instanceof er||Array.from(e).length>0))throw new k("view-emptyelement-cannot-add",[this,e]);return 0}}function Ss(){return null}Is.prototype.is=function(t,e){return e?e===this.name&&("emptyElement"===t||"view:emptyElement"===t||"element"===t||"view:element"===t):"emptyElement"===t||"view:emptyElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t};class Ms extends is{constructor(t,e,n,o){super(t,e,n,o),this.getFillerOffset=Bs}_insertChild(t,e){if(e&&(e instanceof er||Array.from(e).length>0))throw new k("view-uielement-cannot-add",[this,e]);return 0}render(t,e){return this.toDomElement(t)}toDomElement(t){const e=t.createElement(this.name);for(const t of this.getAttributeKeys())e.setAttribute(t,this.getAttribute(t));return e}}function Ts(t){t.document.on("arrowKey",((e,n)=>function(t,e,n){if(e.keyCode==ui.arrowright){const t=e.domTarget.ownerDocument.defaultView.getSelection(),o=1==t.rangeCount&&t.getRangeAt(0).collapsed;if(o||e.shiftKey){const e=t.focusNode,i=t.focusOffset,r=n.domPositionToView(e,i);if(null===r)return;let s=!1;const a=r.getLastMatchingPosition((t=>(t.item.is("uiElement")&&(s=!0),!(!t.item.is("uiElement")&&!t.item.is("attributeElement")))));if(s){const e=n.viewPositionToDom(a);o?t.collapse(e.parent,e.offset):t.extend(e.parent,e.offset)}}}}(0,n,t.domConverter)),{priority:"low"})}function Bs(){return null}Ms.prototype.is=function(t,e){return e?e===this.name&&("uiElement"===t||"view:uiElement"===t||"element"===t||"view:element"===t):"uiElement"===t||"view:uiElement"===t||"element"===t||"view:element"===t||"node"===t||"view:node"===t};class Ns extends is{constructor(t,e,n,o){super(t,e,n,o),this.getFillerOffset=Ps}_insertChild(t,e){if(e&&(e instanceof er||Array.from(e).length>0))throw new k("view-rawelement-cannot-add",[this,e]);return 0}render(t,e){}}function Ps(){return null}Ns.prototype.is=function(t,e){return e?e===this.name&&("rawElement"===t||"view:rawElement"===t||"element"===t||"view:element"===t):"rawElement"===t||"view:rawElement"===t||t===this.name||t==="view:"+this.name||"element"===t||"view:element"===t||"node"===t||"view:node"===t};class zs extends(S(Xi)){constructor(t,e){super(),this._children=[],this._customProperties=new Map,this.document=t,e&&this._insertChild(0,e)}[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(){}getCustomProperty(t){return this._customProperties.get(t)}*getCustomProperties(){yield*this._customProperties.entries()}_appendChild(t){return this._insertChild(this.childCount,t)}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(t,e){this._fireChange("children",this);let n=0;const o=function(t,e){if("string"==typeof e)return[new nr(t,e)];J(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new nr(t,e):e instanceof or?new nr(t,e.data):e))}(this.document,e);for(const e of o)null!==e.parent&&e._remove(),e.parent=this,this._children.splice(t,0,e),t++,n++;return n}_removeChildren(t,e=1){this._fireChange("children",this);for(let n=t;n{const n=t[t.length-1],o=!e.is("uiElement");return n&&n.breakAttributes==o?n.nodes.push(e):t.push({breakAttributes:o,nodes:[e]}),t}),[]);let o=null,i=t;for(const{nodes:t,breakAttributes:e}of n){const n=this._insertNodes(i,t,e);o||(o=n.start),i=n.end}return o?new gs(o,i):new gs(t)}remove(t){const e=t instanceof gs?t:gs._createOn(t);if(qs(e,this.document),e.isCollapsed)return new zs(this.document);const{start:n,end:o}=this._breakAttributesRange(e,!0),i=n.parent,r=o.offset-n.offset,s=i._removeChildren(n.offset,r);for(const t of s)this._removeFromClonedElementsGroup(t);const a=this.mergeAttributes(n);return e.start=a,e.end=a.clone(),new zs(this.document,s)}clear(t,e){qs(t,this.document);const n=t.getWalker({direction:"backward",ignoreElementEnd:!0});for(const o of n){const n=o.item;let i;if(n.is("element")&&e.isSimilar(n))i=gs._createOn(n);else if(!o.nextPosition.isAfter(t.start)&&n.is("$textProxy")){const t=n.getAncestors().find((t=>t.is("element")&&e.isSimilar(t)));t&&(i=gs._createIn(t))}i&&(i.end.isAfter(t.end)&&(i.end=t.end),i.start.isBefore(t.start)&&(i.start=t.start),this.remove(i))}}move(t,e){let n;if(e.isAfter(t.end)){const o=(e=this._breakAttributes(e,!0)).parent,i=o.childCount;t=this._breakAttributesRange(t,!0),n=this.remove(t),e.offset+=o.childCount-i}else n=this.remove(t);return this.insert(e,n)}wrap(t,e){if(!(e instanceof xs))throw new k("view-writer-wrap-invalid-attribute",this.document);if(qs(t,this.document),t.isCollapsed){let o=t.start;o.parent.is("element")&&(n=o.parent,!Array.from(n.getChildren()).some((t=>!t.is("uiElement"))))&&(o=o.getLastMatchingPosition((t=>t.item.is("uiElement")))),o=this._wrapPosition(o,e);const i=this.document.selection;return i.isCollapsed&&i.getFirstPosition().isEqual(t.start)&&this.setSelection(o),new gs(o)}return this._wrapRange(t,e);var n}unwrap(t,e){if(!(e instanceof xs))throw new k("view-writer-unwrap-invalid-attribute",this.document);if(qs(t,this.document),t.isCollapsed)return t;const{start:n,end:o}=this._breakAttributesRange(t,!0),i=n.parent,r=this._unwrapChildren(i,n.offset,o.offset,e),s=this.mergeAttributes(r.start);s.isEqual(r.start)||r.end.offset--;const a=this.mergeAttributes(r.end);return new gs(s,a)}rename(t,e){const n=new ss(this.document,t,e.getAttributes());return this.insert(us._createAfter(e),n),this.move(gs._createIn(e),us._createAt(n,0)),this.remove(gs._createOn(e)),n}clearClonedElementsGroup(t){this._cloneGroups.delete(t)}createPositionAt(t,e){return us._createAt(t,e)}createPositionAfter(t){return us._createAfter(t)}createPositionBefore(t){return us._createBefore(t)}createRange(t,e){return new gs(t,e)}createRangeOn(t){return gs._createOn(t)}createRangeIn(t){return gs._createIn(t)}createSelection(...t){return new ms(...t)}createSlot(t="children"){if(!this._slotFactory)throw new k("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,t)}_registerSlotFactory(t){this._slotFactory=t}_clearSlotFactory(){this._slotFactory=null}_insertNodes(t,e,n){let o,i;if(o=n?Ls(t):t.parent.is("$text")?t.parent.parent:t.parent,!o)throw new k("view-writer-invalid-position-container",this.document);i=n?this._breakAttributes(t,!0):t.parent.is("$text")?Fs(t):t;const r=o._insertChild(i.offset,e);for(const t of e)this._addToClonedElementsGroup(t);const s=i.getShiftedBy(r),a=this.mergeAttributes(i);a.isEqual(i)||s.offset--;const c=this.mergeAttributes(s);return new gs(a,c)}_wrapChildren(t,e,n,o){let i=e;const r=[];for(;i!1,t.parent._insertChild(t.offset,n);const o=new gs(t,t.getShiftedBy(1));this.wrap(o,e);const i=new us(n.parent,n.index);n._remove();const r=i.nodeBefore,s=i.nodeAfter;return r instanceof nr&&s instanceof nr?Vs(r,s):Rs(i)}_wrapAttributeElement(t,e){if(!Ws(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const n of t.getAttributeKeys())if("class"!==n&&"style"!==n&&e.hasAttribute(n)&&e.getAttribute(n)!==t.getAttribute(n))return!1;for(const n of t.getStyleNames())if(e.hasStyle(n)&&e.getStyle(n)!==t.getStyle(n))return!1;for(const n of t.getAttributeKeys())"class"!==n&&"style"!==n&&(e.hasAttribute(n)||this.setAttribute(n,t.getAttribute(n),e));for(const n of t.getStyleNames())e.hasStyle(n)||this.setStyle(n,t.getStyle(n),e);for(const n of t.getClassNames())e.hasClass(n)||this.addClass(n,e);return!0}_unwrapAttributeElement(t,e){if(!Ws(t,e))return!1;if(t.name!==e.name||t.priority!==e.priority)return!1;for(const n of t.getAttributeKeys())if("class"!==n&&"style"!==n&&(!e.hasAttribute(n)||e.getAttribute(n)!==t.getAttribute(n)))return!1;if(!e.hasClass(...t.getClassNames()))return!1;for(const n of t.getStyleNames())if(!e.hasStyle(n)||e.getStyle(n)!==t.getStyle(n))return!1;for(const n of t.getAttributeKeys())"class"!==n&&"style"!==n&&this.removeAttribute(n,e);return this.removeClass(Array.from(t.getClassNames()),e),this.removeStyle(Array.from(t.getStyleNames()),e),!0}_breakAttributesRange(t,e=!1){const n=t.start,o=t.end;if(qs(t,this.document),t.isCollapsed){const n=this._breakAttributes(t.start,e);return new gs(n,n)}const i=this._breakAttributes(o,e),r=i.parent.childCount,s=this._breakAttributes(n,e);return i.offset+=i.parent.childCount-r,new gs(s,i)}_breakAttributes(t,e=!1){const n=t.offset,o=t.parent;if(t.parent.is("emptyElement"))throw new k("view-writer-cannot-break-empty-element",this.document);if(t.parent.is("uiElement"))throw new k("view-writer-cannot-break-ui-element",this.document);if(t.parent.is("rawElement"))throw new k("view-writer-cannot-break-raw-element",this.document);if(!e&&o.is("$text")&&Gs(o.parent))return t.clone();if(Gs(o))return t.clone();if(o.is("$text"))return this._breakAttributes(Fs(t),e);if(n==o.childCount){const t=new us(o.parent,o.index+1);return this._breakAttributes(t,e)}if(0===n){const t=new us(o.parent,o.index);return this._breakAttributes(t,e)}{const t=o.index+1,i=o._clone();o.parent._insertChild(t,i),this._addToClonedElementsGroup(i);const r=o.childCount-n,s=o._removeChildren(n,r);i._appendChild(s);const a=new us(o.parent,t);return this._breakAttributes(a,e)}}_addToClonedElementsGroup(t){if(!t.root.is("rootElement"))return;if(t.is("element"))for(const e of t.getChildren())this._addToClonedElementsGroup(e);const e=t.id;if(!e)return;let n=this._cloneGroups.get(e);n||(n=new Set,this._cloneGroups.set(e,n)),n.add(t),t._clonesGroup=n}_removeFromClonedElementsGroup(t){if(t.is("element"))for(const e of t.getChildren())this._removeFromClonedElementsGroup(e);const e=t.id;if(!e)return;const n=this._cloneGroups.get(e);n&&n.delete(t)}}function Ls(t){let e=t.parent;for(;!Gs(e);){if(!e)return;e=e.parent}return e}function js(t,e){return t.prioritye.priority)&&t.getIdentity()n instanceof t)))throw new k("view-writer-insert-invalid-node-type",e);n.is("$text")||Hs(n.getChildren(),e)}}function Gs(t){return t&&(t.is("containerElement")||t.is("documentFragment"))}function qs(t,e){const n=Ls(t.start),o=Ls(t.end);if(!n||!o||n!==o)throw new k("view-writer-invalid-range-container",e)}function Ws(t,e){return null===t.id&&null===e.id}const Ks=t=>t.createTextNode(" "),Ys=t=>{const e=t.createElement("span");return e.dataset.ckeFiller="true",e.innerText=" ",e},$s=t=>{const e=t.createElement("br");return e.dataset.ckeFiller="true",e},Zs=7,Qs="⁠".repeat(Zs);function Js(t){return"string"==typeof t?t.substr(0,Zs)===Qs:No(t)&&t.data.substr(0,Zs)===Qs}function Xs(t){return t.data.length==Zs&&Js(t)}function ta(t){const e="string"==typeof t?t:t.data;return Js(t)?e.slice(Zs):e}function ea(t,e){if(e.keyCode==ui.arrowleft){const t=e.domTarget.ownerDocument.defaultView.getSelection();if(1==t.rangeCount&&t.getRangeAt(0).collapsed){const e=t.getRangeAt(0).startContainer,n=t.getRangeAt(0).startOffset;Js(e)&&n<=Zs&&t.collapse(e,0)}}}var na=n(9315),oa={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(na.Z,oa);na.Z.locals;class ia extends(G()){constructor(t,e){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=t,this.selection=e,this.set("isFocused",!1),this.set("isSelecting",!1),i.isBlink&&!i.isAndroid&&this.on("change:isSelecting",(()=>{this.isSelecting||this.render()})),this.set("isComposing",!1),this.on("change:isComposing",(()=>{this.isComposing||this.render()}))}markToSync(t,e){if("text"===t)this.domConverter.mapViewToDom(e.parent)&&this.markedTexts.add(e);else{if(!this.domConverter.mapViewToDom(e))return;if("attributes"===t)this.markedAttributes.add(e);else{if("children"!==t){throw new k("view-renderer-unknown-type",this)}this.markedChildren.add(e)}}}render(){if(this.isComposing&&!i.isAndroid)return;let t=null;const e=!(i.isBlink&&!i.isAndroid)||!this.isSelecting;for(const t of this.markedChildren)this._updateChildrenMappings(t);e?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?t=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(t=this.selection.getFirstPosition(),this.markedChildren.add(t.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(t=this.domConverter.domPositionToView(this._inlineFiller),t&&t.parent.is("$text")&&(t=us._createBefore(t.parent)));for(const t of this.markedAttributes)this._updateAttrs(t);for(const e of this.markedChildren)this._updateChildren(e,{inlineFillerPosition:t});for(const e of this.markedTexts)!this.markedChildren.has(e.parent)&&this.domConverter.mapViewToDom(e.parent)&&this._updateText(e,{inlineFillerPosition:t});if(e)if(t){const e=this.domConverter.viewPositionToDom(t),n=e.parent.ownerDocument;Js(e.parent)?this._inlineFiller=e.parent:this._inlineFiller=ra(n,e.parent,e.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(t){if(!this.domConverter.mapViewToDom(t))return;const e=Array.from(this.domConverter.mapViewToDom(t).childNodes),n=Array.from(this.domConverter.viewChildrenToDom(t,{withChildren:!1})),o=this._diffNodeLists(e,n),i=this._findUpdateActions(o,e,n,sa);if(-1!==i.indexOf("update")){const o={equal:0,insert:0,delete:0};for(const r of i)if("update"===r){const i=o.equal+o.insert,r=o.equal+o.delete,s=t.getChild(i);!s||s.is("uiElement")||s.is("rawElement")||this._updateElementMappings(s,e[r]),ti(n[i]),o.equal++}else o[r]++}}_updateElementMappings(t,e){this.domConverter.unbindDomElement(e),this.domConverter.bindElements(e,t),this.markedChildren.add(t),this.markedAttributes.add(t)}_getInlineFillerPosition(){const t=this.selection.getFirstPosition();return t.parent.is("$text")?us._createBefore(t.parent):t}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),e=this.domConverter.viewPositionToDom(t);return!!(e&&No(e.parent)&&Js(e.parent))}_removeInlineFiller(){const t=this._inlineFiller;if(!Js(t))throw new k("view-renderer-filler-was-lost",this);Xs(t)?t.remove():t.data=t.data.substr(Zs),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const t=this.selection.getFirstPosition(),e=t.parent,n=t.offset;if(!this.domConverter.mapViewToDom(e.root))return!1;if(!e.is("element"))return!1;if(!function(t){if("false"==t.getAttribute("contenteditable"))return!1;const e=t.findAncestor((t=>t.hasAttribute("contenteditable")));return!e||"true"==e.getAttribute("contenteditable")}(e))return!1;if(n===e.getFillerOffset())return!1;const o=t.nodeBefore,r=t.nodeAfter;return!(o instanceof nr||r instanceof nr)&&(!i.isAndroid||!o&&!r)}_updateText(t,e){const n=this.domConverter.findCorrespondingDomText(t);let o=this.domConverter.viewToDom(t).data;const i=e.inlineFillerPosition;i&&i.parent==t.parent&&i.offset==t.index&&(o=Qs+o),la(n,o)}_updateAttrs(t){const e=this.domConverter.mapViewToDom(t);if(!e)return;const n=Array.from(e.attributes).map((t=>t.name)),o=t.getAttributeKeys();for(const n of o)this.domConverter.setDomElementAttribute(e,n,t.getAttribute(n),t);for(const o of n)t.hasAttribute(o)||this.domConverter.removeDomElementAttribute(e,o)}_updateChildren(t,e){const n=this.domConverter.mapViewToDom(t);if(!n)return;if(i.isAndroid){let t=null;for(const e of Array.from(n.childNodes)){if(t&&No(t)&&No(e)){n.normalize();break}t=e}}const o=e.inlineFillerPosition,r=n.childNodes,s=Array.from(this.domConverter.viewChildrenToDom(t,{bind:!0}));o&&o.parent===t&&ra(n.ownerDocument,s,o.offset);const a=this._diffNodeLists(r,s),c=this._findUpdateActions(a,r,s,aa);let l=0;const d=new Set;for(const t of c)"delete"===t?(d.add(r[l]),ti(r[l])):"equal"!==t&&"update"!==t||l++;l=0;for(const t of c)"insert"===t?(Ko(n,l,s[l]),l++):"update"===t?(la(r[l],s[l].data),l++):"equal"===t&&(this._markDescendantTextToSync(this.domConverter.domToView(s[l])),l++);for(const t of d)t.parentNode||this.domConverter.unbindDomElement(t)}_diffNodeLists(t,e){return t=function(t,e){const n=Array.from(t);if(0==n.length||!e)return n;const o=n[n.length-1];o==e&&n.pop();return n}(t,this._fakeSelectionContainer),l(t,e,ca.bind(null,this.domConverter))}_findUpdateActions(t,e,n,o){if(-1===t.indexOf("insert")||-1===t.indexOf("delete"))return t;let i=[],r=[],s=[];const a={equal:0,insert:0,delete:0};for(const c of t)"insert"===c?s.push(n[a.equal+a.insert]):"delete"===c?r.push(e[a.equal+a.delete]):(i=i.concat(l(r,s,o).map((t=>"equal"===t?"update":t))),i.push("equal"),r=[],s=[]),a[c]++;return i.concat(l(r,s,o).map((t=>"equal"===t?"update":t)))}_markDescendantTextToSync(t){if(t)if(t.is("$text"))this.markedTexts.add(t);else if(t.is("element"))for(const e of t.getChildren())this._markDescendantTextToSync(e)}_updateSelection(){if(i.isBlink&&!i.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const t=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&t&&(this.selection.isFake?this._updateFakeSelection(t):this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected?(this._removeFakeSelection(),this._updateDomSelection(t)):this.isComposing&&i.isAndroid||this._updateDomSelection(t))}_updateFakeSelection(t){const e=t.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(t){const e=t.createElement("div");return e.className="ck-fake-selection-container",Object.assign(e.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),e.textContent=" ",e}(e));const n=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(n,this.selection),!this._fakeSelectionNeedsUpdate(t))return;n.parentElement&&n.parentElement==t||t.appendChild(n),n.textContent=this.selection.fakeSelectionLabel||" ";const o=e.getSelection(),i=e.createRange();o.removeAllRanges(),i.selectNodeContents(n),o.addRange(i)}_updateDomSelection(t){const e=t.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(e))return;const n=this.domConverter.viewPositionToDom(this.selection.anchor),o=this.domConverter.viewPositionToDom(this.selection.focus);e.setBaseAndExtent(n.parent,n.offset,o.parent,o.offset),i.isGecko&&function(t,e){const n=t.parent;if(n.nodeType!=Node.ELEMENT_NODE||t.offset!=n.childNodes.length-1)return;const o=n.childNodes[t.offset];o&&"BR"==o.tagName&&e.addRange(e.getRangeAt(0))}(o,e)}_domSelectionNeedsUpdate(t){if(!this.domConverter.isDomSelectionCorrect(t))return!0;const e=t&&this.domConverter.domSelectionToView(t);return(!e||!this.selection.isEqual(e))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(e))}_fakeSelectionNeedsUpdate(t){const e=this._fakeSelectionContainer,n=t.ownerDocument.getSelection();return!e||e.parentElement!==t||(n.anchorNode!==e&&!e.contains(n.anchorNode)||e.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const t of this.domDocuments){const e=t.getSelection();if(e.rangeCount){const n=t.activeElement,o=this.domConverter.mapDomToView(n);n&&o&&e.removeAllRanges()}}}_removeFakeSelection(){const t=this._fakeSelectionContainer;t&&t.remove()}_updateFocus(){if(this.isFocused){const t=this.selection.editableElement;t&&this.domConverter.focus(t)}}}function ra(t,e,n){const o=e instanceof Array?e:e.childNodes,i=o[n];if(No(i))return i.data=Qs+i.data,i;{const i=t.createTextNode(Qs);return Array.isArray(e)?o.splice(n,0,i):Ko(e,n,i),i}}function sa(t,e){return xo(t)&&xo(e)&&!No(t)&&!No(e)&&!Yo(t)&&!Yo(e)&&t.tagName.toLowerCase()===e.tagName.toLowerCase()}function aa(t,e){return xo(t)&&xo(e)&&No(t)&&No(e)}function ca(t,e,n){return e===n||(No(e)&&No(n)?e.data===n.data:!(!t.isBlockFiller(e)||!t.isBlockFiller(n)))}function la(t,e){const n=t.data;if(n==e)return;const o=s(n,e);for(const e of o)"insert"===e.type?t.insertData(e.index,e.values.join("")):t.deleteData(e.index,e.howMany)}const da=$s(Bo.document),ha=Ks(Bo.document),ua=Ys(Bo.document),ga="data-ck-unsafe-attribute-",pa="data-ck-unsafe-element";class ma{constructor(t,{blockFillerMode:e,renderingMode:n="editing"}={}){this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new ir,this._inlineObjectElementMatcher=new ir,this.document=t,this.renderingMode=n,this.blockFillerMode=e||("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?Bo.document:Bo.document.implementation.createHTMLDocument("")}bindFakeSelection(t,e){this._fakeSelectionMapping.set(t,new ms(e))}fakeSelectionToView(t){return this._fakeSelectionMapping.get(t)}bindElements(t,e){this._domToViewMapping.set(t,e),this._viewToDomMapping.set(e,t)}unbindDomElement(t){const e=this._domToViewMapping.get(t);if(e){this._domToViewMapping.delete(t),this._viewToDomMapping.delete(e);for(const e of Array.from(t.children))this.unbindDomElement(e)}}bindDocumentFragments(t,e){this._domToViewMapping.set(t,e),this._viewToDomMapping.set(e,t)}shouldRenderAttribute(t,e,n){return"data"===this.renderingMode||!(t=t.toLowerCase()).startsWith("on")&&(("srcdoc"!==t||!e.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===n&&("src"===t||"srcset"===t)||("source"===n&&"srcset"===t||!e.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))))}setContentOf(t,e){if("data"===this.renderingMode)return void(t.innerHTML=e);const n=(new DOMParser).parseFromString(e,"text/html"),o=n.createDocumentFragment(),i=n.body.childNodes;for(;i.length>0;)o.appendChild(i[0]);const r=n.createTreeWalker(o,NodeFilter.SHOW_ELEMENT),s=[];let a;for(;a=r.nextNode();)s.push(a);for(const t of s){for(const e of t.getAttributeNames())this.setDomElementAttribute(t,e,t.getAttribute(e));const e=t.tagName.toLowerCase();this._shouldRenameElement(e)&&(wa(e),t.replaceWith(this._createReplacementDomElement(e,t)))}for(;t.firstChild;)t.firstChild.remove();t.append(o)}viewToDom(t,e={}){if(t.is("$text")){const e=this._processDataFromViewText(t);return this._domDocument.createTextNode(e)}{if(this.mapViewToDom(t))return this.mapViewToDom(t);let n;if(t.is("documentFragment"))n=this._domDocument.createDocumentFragment(),e.bind&&this.bindDocumentFragments(n,t);else{if(t.is("uiElement"))return n="$comment"===t.name?this._domDocument.createComment(t.getCustomProperty("$rawContent")):t.render(this._domDocument,this),e.bind&&this.bindElements(n,t),n;this._shouldRenameElement(t.name)?(wa(t.name),n=this._createReplacementDomElement(t.name)):n=t.hasAttribute("xmlns")?this._domDocument.createElementNS(t.getAttribute("xmlns"),t.name):this._domDocument.createElement(t.name),t.is("rawElement")&&t.render(n,this),e.bind&&this.bindElements(n,t);for(const e of t.getAttributeKeys())this.setDomElementAttribute(n,e,t.getAttribute(e),t)}if(!1!==e.withChildren)for(const o of this.viewChildrenToDom(t,e))n.appendChild(o);return n}}setDomElementAttribute(t,e,n,o){const i=this.shouldRenderAttribute(e,n,t.tagName.toLowerCase())||o&&o.shouldRenderUnsafeAttribute(e);i||b("domconverter-unsafe-attribute-detected",{domElement:t,key:e,value:n}),function(t){try{Bo.document.createAttribute(t)}catch(t){return!1}return!0}(e)?(t.hasAttribute(e)&&!i?t.removeAttribute(e):t.hasAttribute(ga+e)&&i&&t.removeAttribute(ga+e),t.setAttribute(i?e:ga+e,n)):b("domconverter-invalid-attribute-detected",{domElement:t,key:e,value:n})}removeDomElementAttribute(t,e){e!=pa&&(t.removeAttribute(e),t.removeAttribute(ga+e))}*viewChildrenToDom(t,e={}){const n=t.getFillerOffset&&t.getFillerOffset();let o=0;for(const i of t.getChildren()){n===o&&(yield this._getBlockFiller());const t=i.is("element")&&!!i.getCustomProperty("dataPipeline:transparentRendering")&&!yi(i.getAttributes());t&&"data"==this.renderingMode?yield*this.viewChildrenToDom(i,e):(t&&b("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:i}),yield this.viewToDom(i,e)),o++}n===o&&(yield this._getBlockFiller())}viewRangeToDom(t){const e=this.viewPositionToDom(t.start),n=this.viewPositionToDom(t.end),o=this._domDocument.createRange();return o.setStart(e.parent,e.offset),o.setEnd(n.parent,n.offset),o}viewPositionToDom(t){const e=t.parent;if(e.is("$text")){const n=this.findCorrespondingDomText(e);if(!n)return null;let o=t.offset;return Js(n)&&(o+=Zs),{parent:n,offset:o}}{let n,o,i;if(0===t.offset){if(n=this.mapViewToDom(e),!n)return null;i=n.childNodes[0]}else{const e=t.nodeBefore;if(o=e.is("$text")?this.findCorrespondingDomText(e):this.mapViewToDom(e),!o)return null;n=o.parentNode,i=o.nextSibling}if(No(i)&&Js(i))return{parent:i,offset:Zs};return{parent:n,offset:o?Wo(o)+1:0}}}domToView(t,e={}){const n=[],o=this._domToView(t,e,n),i=o.next().value;return i?(o.next(),this._processDomInlineNodes(null,n,e),i.is("$text")&&0==i.data.length?null:i):null}*domChildrenToView(t,e={},n=[]){for(let o=0;o{const{scrollLeft:e,scrollTop:n}=t;o.push([e,n])})),e.focus(),ka(e,(t=>{const[e,n]=o.shift();t.scrollLeft=e,t.scrollTop=n})),Bo.window.scrollTo(t,n)}}_clearDomSelection(){const t=this.mapViewToDom(this.document.selection.editableElement);if(!t)return;const e=t.ownerDocument.defaultView.getSelection(),n=this.domSelectionToView(e);n&&n.rangeCount>0&&e.removeAllRanges()}isElement(t){return t&&t.nodeType==Node.ELEMENT_NODE}isDocumentFragment(t){return t&&t.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(t){return"br"==this.blockFillerMode?t.isEqualNode(da):!("BR"!==t.tagName||!ba(t,this.blockElements)||1!==t.parentNode.childNodes.length)||(t.isEqualNode(ua)||function(t,e){const n=t.isEqualNode(ha);return n&&ba(t,e)&&1===t.parentNode.childNodes.length}(t,this.blockElements))}isDomSelectionBackward(t){if(t.isCollapsed)return!1;const e=this._domDocument.createRange();try{e.setStart(t.anchorNode,t.anchorOffset),e.setEnd(t.focusNode,t.focusOffset)}catch(t){return!1}const n=e.collapsed;return e.detach(),n}getHostViewElement(t){const e=function(t){const e=[];let n=t;for(;n&&n.nodeType!=Node.DOCUMENT_NODE;)e.unshift(n),n=n.parentNode;return e}(t);for(e.pop();e.length;){const t=e.pop(),n=this._domToViewMapping.get(t);if(n&&(n.is("uiElement")||n.is("rawElement")))return n}return null}isDomSelectionCorrect(t){return this._isDomSelectionPositionCorrect(t.anchorNode,t.anchorOffset)&&this._isDomSelectionPositionCorrect(t.focusNode,t.focusOffset)}registerRawContentMatcher(t){this._rawContentElementMatcher.add(t)}registerInlineObjectMatcher(t){this._inlineObjectElementMatcher.add(t)}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return Ks(this._domDocument);case"markedNbsp":return Ys(this._domDocument);case"br":return $s(this._domDocument)}}_isDomSelectionPositionCorrect(t,e){if(No(t)&&Js(t)&&e0?e[t-1]:null,c=t+1this.preElements.includes(t.name))))return e;if(" "==e.charAt(0)){const n=this._getTouchingInlineViewNode(t,!1);!(n&&n.is("$textProxy")&&this._nodeEndsWithSpace(n))&&n||(e=" "+e.substr(1))}if(" "==e.charAt(e.length-1)){const n=this._getTouchingInlineViewNode(t,!0),o=n&&n.is("$textProxy")&&" "==n.data.charAt(0);" "!=e.charAt(e.length-2)&&n&&!o||(e=e.substr(0,e.length-1)+" ")}return e.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(t){if(t.getAncestors().some((t=>this.preElements.includes(t.name))))return!1;const e=this._processDataFromViewText(t);return" "==e.charAt(e.length-1)}_getTouchingInlineViewNode(t,e){const n=new hs({startPosition:e?us._createAfter(t):us._createBefore(t),direction:e?"forward":"backward"});for(const t of n){if(t.item.is("element","br"))return null;if(this._isInlineObjectElement(t.item))return t.item;if(t.item.is("containerElement"))return null;if(t.item.is("$textProxy"))return t.item}return null}_isBlockDomElement(t){return this.isElement(t)&&this.blockElements.includes(t.tagName.toLowerCase())}_isBlockViewElement(t){return t.is("element")&&this.blockElements.includes(t.name)}_isInlineObjectElement(t){return!!t.is("element")&&("br"==t.name||this.inlineObjectElements.includes(t.name)||!!this._inlineObjectElementMatcher.match(t))}_createViewElement(t,e){if(Yo(t))return new Ms(this.document,"$comment");const n=e.keepOriginalCase?t.tagName:t.tagName.toLowerCase();return new is(this.document,n)}_isViewElementWithRawContent(t,e){return!1!==e.withChildren&&t.is("element")&&!!this._rawContentElementMatcher.match(t)}_shouldRenameElement(t){const e=t.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(e)}_createReplacementDomElement(t,e){const n=this._domDocument.createElement("span");if(n.setAttribute(pa,t),e){for(;e.firstChild;)n.appendChild(e.firstChild);for(const t of e.getAttributeNames())n.setAttribute(t,e.getAttribute(t))}return n}}function fa(t,e){return t.getAncestors().some((t=>t.is("element")&&e.includes(t.name)))}function ka(t,e){let n=t;for(;n;)e(n),n=n.parentElement}function ba(t,e){const n=t.parentNode;return!!n&&!!n.tagName&&e.includes(n.tagName.toLowerCase())}function wa(t){"script"===t&&b("domconverter-unsafe-script-element-detected"),"style"===t&&b("domconverter-unsafe-style-element-detected")}class Aa extends(Io()){constructor(t){super(),this._isEnabled=!1,this.view=t,this.document=t.document}get isEnabled(){return this._isEnabled}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(t){return t&&3===t.nodeType&&(t=t.parentNode),!(!t||1!==t.nodeType)&&t.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}const Ca=Zr((function(t,e){De(e,hn(e),t)}));class _a{constructor(t,e,n){this.view=t,this.document=t.document,this.domEvent=e,this.domTarget=e.target,Ca(this,n)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class va extends Aa{constructor(){super(...arguments),this.useCapture=!1}observe(t){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach((e=>{this.listenTo(t,e,((t,e)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(e.target)&&this.onDomEvent(e)}),{useCapture:this.useCapture})}))}stopObserving(t){this.stopListening(t)}fire(t,e,n){this.isEnabled&&this.document.fire(t,new _a(this.view,e,n))}}class ya extends va{constructor(){super(...arguments),this.domEventType=["keydown","keyup"]}onDomEvent(t){const e={keyCode:t.keyCode,altKey:t.altKey,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,metaKey:t.metaKey,get keystroke(){return pi(this)}};this.fire(t.type,t,e)}}const xa=function(){return et.Date.now()};var Ea=/\s/;const Da=function(t){for(var e=t.length;e--&&Ea.test(t.charAt(e)););return e};var Ia=/^\s+/;const Sa=function(t){return t?t.slice(0,Da(t)+1).replace(Ia,""):t};var Ma=/^[-+]0x[0-9a-f]+$/i,Ta=/^0b[01]+$/i,Ba=/^0o[0-7]+$/i,Na=parseInt;const Pa=function(t){if("number"==typeof t)return t;if(ar(t))return NaN;if(L(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=L(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Sa(t);var n=Ta.test(t);return n||Ba.test(t)?Na(t.slice(2),n?2:8):Ma.test(t)?NaN:+t};var za=Math.max,Oa=Math.min;const La=function(t,e,n){var o,i,r,s,a,c,l=0,d=!1,h=!1,u=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function g(e){var n=o,r=i;return o=i=void 0,l=e,s=t.apply(r,n)}function p(t){var n=t-c;return void 0===c||n>=e||n<0||h&&t-l>=r}function m(){var t=xa();if(p(t))return f(t);a=setTimeout(m,function(t){var n=e-(t-c);return h?Oa(n,r-(t-l)):n}(t))}function f(t){return a=void 0,u&&o?g(t):(o=i=void 0,s)}function k(){var t=xa(),n=p(t);if(o=arguments,i=this,c=t,n){if(void 0===a)return function(t){return l=t,a=setTimeout(m,e),d?g(t):s}(c);if(h)return clearTimeout(a),a=setTimeout(m,e),g(c)}return void 0===a&&(a=setTimeout(m,e)),s}return e=Pa(e)||0,L(n)&&(d=!!n.leading,r=(h="maxWait"in n)?za(Pa(n.maxWait)||0,e):r,u="trailing"in n?!!n.trailing:u),k.cancel=function(){void 0!==a&&clearTimeout(a),l=0,o=c=i=a=void 0},k.flush=function(){return void 0===a?s:f(xa())},k};class ja extends Aa{constructor(t){super(t),this._fireSelectionChangeDoneDebounced=La((t=>{this.document.fire("selectionChangeDone",t)}),200)}observe(){const t=this.document;t.on("arrowKey",((e,n)=>{t.selection.isFake&&this.isEnabled&&n.preventDefault()}),{context:"$capture"}),t.on("arrowKey",((e,n)=>{t.selection.isFake&&this.isEnabled&&this._handleSelectionMove(n.keyCode)}),{priority:"lowest"})}stopObserving(){}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(t){const e=this.document.selection,n=new ms(e.getRanges(),{backward:e.isBackward,fake:!1});t!=ui.arrowleft&&t!=ui.arrowup||n.setTo(n.getFirstPosition()),t!=ui.arrowright&&t!=ui.arrowdown||n.setTo(n.getLastPosition());const o={oldSelection:e,newSelection:n,domSelection:null};this.document.fire("selectionChange",o),this._fireSelectionChangeDoneDebounced(o)}}const Ra=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const Fa=function(t){return this.__data__.has(t)};function Va(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new be;++ea))return!1;var l=r.get(t),d=r.get(e);if(l&&d)return l==e&&d==t;var h=-1,u=!0,g=2&n?new Ua:void 0;for(r.set(t,e),r.set(e,t);++h{this._isFocusChanging=!0,this._renderTimeoutId=setTimeout((()=>{this.flush(),t.change((()=>{}))}),50)})),e.on("blur",((n,o)=>{const i=e.selection.editableElement;null!==i&&i!==o.target||(e.isFocused=!1,this._isFocusChanging=!1,t.change((()=>{})))}))}flush(){this._isFocusChanging&&(this._isFocusChanging=!1,this.document.isFocused=!0)}onDomEvent(t){this.fire(t.type,t)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class lc extends Aa{constructor(t){super(t),this.mutationObserver=t.getObserver(sc),this.focusObserver=t.getObserver(cc),this.selection=this.document.selection,this.domConverter=t.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=La((t=>{this.document.fire("selectionChangeDone",t)}),200),this._clearInfiniteLoopInterval=setInterval((()=>this._clearInfiniteLoop()),1e3),this._documentIsSelectingInactivityTimeoutDebounced=La((()=>this.document.isSelecting=!1),5e3),this._loopbackCounter=0}observe(t){const e=t.ownerDocument,n=()=>{this.document.isSelecting&&(this._handleSelectionChange(null,e),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(t,"selectstart",(()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()}),{priority:"highest"}),this.listenTo(t,"keydown",n,{priority:"highest",useCapture:!0}),this.listenTo(t,"keyup",n,{priority:"highest",useCapture:!0}),this._documents.has(e)||(this.listenTo(e,"mouseup",n,{priority:"highest",useCapture:!0}),this.listenTo(e,"selectionchange",((t,n)=>{this.document.isComposing&&!i.isAndroid||(this._handleSelectionChange(n,e),this._documentIsSelectingInactivityTimeoutDebounced())})),this._documents.add(e))}stopObserving(t){this.stopListening(t)}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_reportInfiniteLoop(){}_handleSelectionChange(t,e){if(!this.isEnabled)return;const n=e.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(n.anchorNode))return;this.mutationObserver.flush();const o=this.domConverter.domSelectionToView(n);if(0!=o.rangeCount){if(this.view.hasDomSelection=!0,this.focusObserver.flush(),!this.selection.isEqual(o)||!this.domConverter.isDomSelectionCorrect(n))if(++this._loopbackCounter>60)this._reportInfiniteLoop();else if(this.selection.isSimilar(o))this.view.forceRender();else{const t={oldSelection:this.selection,newSelection:o,domSelection:n};this.document.fire("selectionChange",t),this._fireSelectionChangeDoneDebounced(t)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class dc extends va{constructor(t){super(t),this.domEventType=["compositionstart","compositionupdate","compositionend"];const e=this.document;e.on("compositionstart",(()=>{e.isComposing=!0}),{priority:"low"}),e.on("compositionend",(()=>{e.isComposing=!1}),{priority:"low"})}onDomEvent(t){this.fire(t.type,t,{data:t.data})}}class hc{constructor(t,e={}){this._files=e.cacheFiles?uc(t):null,this._native=t}get files(){return this._files||(this._files=uc(this._native)),this._files}get types(){return this._native.types}getData(t){return this._native.getData(t)}setData(t,e){this._native.setData(t,e)}set effectAllowed(t){this._native.effectAllowed=t}get effectAllowed(){return this._native.effectAllowed}set dropEffect(t){this._native.dropEffect=t}get dropEffect(){return this._native.dropEffect}setDragImage(t,e,n){this._native.setDragImage(t,e,n)}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}function uc(t){const e=Array.from(t.files||[]),n=Array.from(t.items||[]);return e.length?e:n.filter((t=>"file"===t.kind)).map((t=>t.getAsFile()))}class gc extends va{constructor(){super(...arguments),this.domEventType="beforeinput"}onDomEvent(t){const e=t.getTargetRanges(),n=this.view,o=n.document;let r=null,s=null,a=[];if(t.dataTransfer&&(r=new hc(t.dataTransfer)),null!==t.data?s=t.data:r&&(s=r.getData("text/plain")),o.selection.isFake)a=Array.from(o.selection.getRanges());else if(e.length)a=e.map((t=>{const e=n.domConverter.domPositionToView(t.startContainer,t.startOffset),o=n.domConverter.domPositionToView(t.endContainer,t.endOffset);return e?n.createRange(e,o):o?n.createRange(o):void 0})).filter((t=>!!t));else if(i.isAndroid){const e=t.target.ownerDocument.defaultView.getSelection();a=Array.from(n.domConverter.domSelectionToView(e).getRanges())}if(i.isAndroid&&"insertCompositionText"==t.inputType&&s&&s.endsWith("\n"))this.fire(t.type,t,{inputType:"insertParagraph",targetRanges:[n.createRange(a[0].end)]});else if("insertText"==t.inputType&&s&&s.includes("\n")){const e=s.split(/\n{1,2}/g);let n=a;for(let i=0;i{if(this.isEnabled&&((n=e.keyCode)==ui.arrowright||n==ui.arrowleft||n==ui.arrowup||n==ui.arrowdown)){const n=new ks(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(n,e),n.stop.called&&t.stop()}var n}))}observe(){}stopObserving(){}}class mc extends Aa{constructor(t){super(t);const e=this.document;e.on("keydown",((t,n)=>{if(!this.isEnabled||n.keyCode!=ui.tab||n.ctrlKey)return;const o=new ks(e,"tab",e.selection.getFirstRange());e.fire(o,n),o.stop.called&&t.stop()}))}observe(){}stopObserving(){}}const fc=function(t){return wo(t,5)};class kc extends(G()){constructor(t){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 ys(t),this.domConverter=new ma(this.document),this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new ia(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._writer=new Os(this.document),this.addObserver(sc),this.addObserver(cc),this.addObserver(lc),this.addObserver(ya),this.addObserver(ja),this.addObserver(dc),this.addObserver(pc),this.addObserver(gc),this.addObserver(mc),this.document.on("arrowKey",ea,{priority:"low"}),Ts(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})),i.isiOS&&this.listenTo(this.document,"blur",((t,e)=>{this.domConverter.mapDomToView(e.domEvent.relatedTarget)||this.domConverter._clearDomSelection()}))}attachDomRoot(t,e="main"){const n=this.document.getRoot(e);n._name=t.tagName.toLowerCase();const o={};for(const{name:e,value:i}of Array.from(t.attributes))o[e]=i,"class"===e?this._writer.addClass(i.split(" "),n):this._writer.setAttribute(e,i,n);this._initialDomRootAttributes.set(t,o);const i=()=>{this._writer.setAttribute("contenteditable",(!n.isReadOnly).toString(),n),n.isReadOnly?this._writer.addClass("ck-read-only",n):this._writer.removeClass("ck-read-only",n)};i(),this.domRoots.set(e,t),this.domConverter.bindElements(t,n),this._renderer.markToSync("children",n),this._renderer.markToSync("attributes",n),this._renderer.domDocuments.add(t.ownerDocument),n.on("change:children",((t,e)=>this._renderer.markToSync("children",e))),n.on("change:attributes",((t,e)=>this._renderer.markToSync("attributes",e))),n.on("change:text",((t,e)=>this._renderer.markToSync("text",e))),n.on("change:isReadOnly",(()=>this.change(i))),n.on("change",(()=>{this._hasChangedSinceTheLastRendering=!0}));for(const n of this._observers.values())n.observe(t,e)}detachDomRoot(t){const e=this.domRoots.get(t);Array.from(e.attributes).forEach((({name:t})=>e.removeAttribute(t)));const n=this._initialDomRootAttributes.get(e);for(const t in n)e.setAttribute(t,n[t]);this.domRoots.delete(t),this.domConverter.unbindDomElement(e);for(const t of this._observers.values())t.stopObserving(e)}getDomRoot(t="main"){return this.domRoots.get(t)}addObserver(t){let e=this._observers.get(t);if(e)return e;e=new t(this),this._observers.set(t,e);for(const[t,n]of this.domRoots)e.observe(n,t);return e.enable(),e}getObserver(t){return this._observers.get(t)}disableObservers(){for(const t of this._observers.values())t.disable()}enableObservers(){for(const t of this._observers.values())t.enable()}scrollToTheSelection({alignToTop:t,forceScroll:e,viewportOffset:n=20,ancestorOffset:o=20}={}){const i=this.document.selection.getFirstRange();if(!i)return;const r=fc({alignToTop:t,forceScroll:e,viewportOffset:n,ancestorOffset:o});"number"==typeof n&&(n={top:n,bottom:n,left:n,right:n});const s={target:this.domConverter.viewRangeToDom(i),viewportOffset:n,ancestorOffset:o,alignToTop:t,forceScroll:e};this.fire("scrollToTheSelection",s,r),function({target:t,viewportOffset:e=0,ancestorOffset:n=0,alignToTop:o,forceScroll:i}){const r=ai(t);let s=r,a=null;for(e=function(t){return"number"==typeof t?{top:t,bottom:t,left:t,right:t}:t}(e);s;){let c;c=ci(s==r?t:a),ni({parent:c,getRect:()=>li(t,s),alignToTop:o,ancestorOffset:n,forceScroll:i});const l=li(t,s);if(ei({window:s,rect:l,viewportOffset:e,alignToTop:o,forceScroll:i}),s.parent!=s){if(a=s.frameElement,s=s.parent,!a)return}else s=null}}(s)}focus(){if(!this.document.isFocused){const t=this.document.selection.editableElement;t&&(this.domConverter.focus(t),this.forceRender())}}change(t){if(this.isRenderingInProgress||this._postFixersInProgress)throw new k("cannot-change-view-tree",this);try{if(this._ongoingChange)return t(this._writer);this._ongoingChange=!0;const e=t(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),e}catch(t){k.rethrowUnexpectedError(t,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.getObserver(cc).flush(),this.change((()=>{}))}destroy(){for(const t of this._observers.values())t.destroy();this.document.destroy(),this.stopListening()}createPositionAt(t,e){return us._createAt(t,e)}createPositionAfter(t){return us._createAfter(t)}createPositionBefore(t){return us._createBefore(t)}createRange(t,e){return new gs(t,e)}createRangeOn(t){return gs._createOn(t)}createRangeIn(t){return gs._createIn(t)}createSelection(...t){return new ms(...t)}_disableRendering(t){this._renderingDisabled=t,0==t&&this.change((()=>{}))}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}class bc{is(){throw new Error("is() method is abstract")}}class wc extends bc{constructor(t){super(),this.parent=null,this._attrs=Di(t)}get document(){return null}get index(){let t;if(!this.parent)return null;if(null===(t=this.parent.getChildIndex(this)))throw new k("model-node-not-found-in-parent",this);return t}get startOffset(){let t;if(!this.parent)return null;if(null===(t=this.parent.getChildStartOffset(this)))throw new k("model-node-not-found-in-parent",this);return t}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const t=this.index;return null!==t&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return null!==t&&this.parent.getChild(t-1)||null}get root(){let t=this;for(;t.parent;)t=t.parent;return t}isAttached(){return null!==this.parent&&this.root.isAttached()}getPath(){const t=[];let e=this;for(;e.parent;)t.unshift(e.startOffset),e=e.parent;return t}getAncestors(t={}){const e=[];let n=t.includeSelf?this:this.parent;for(;n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}getCommonAncestor(t,e={}){const n=this.getAncestors(e),o=t.getAncestors(e);let i=0;for(;n[i]==o[i]&&n[i];)i++;return 0===i?null:n[i-1]}isBefore(t){if(this==t)return!1;if(this.root!==t.root)return!1;const e=this.getPath(),n=t.getPath(),o=Q(e,n);switch(o){case"prefix":return!0;case"extension":return!1;default:return e[o](t[e[0]]=e[1],t)),{})),t}_clone(t){return new this.constructor(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(t,e){this._attrs.set(t,e)}_setAttributesTo(t){this._attrs=Di(t)}_removeAttribute(t){return this._attrs.delete(t)}_clearAttributes(){this._attrs.clear()}}wc.prototype.is=function(t){return"node"===t||"model:node"===t};class Ac{constructor(t){this._nodes=[],t&&this._insertNodes(0,t)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce(((t,e)=>t+e.offsetSize),0)}getNode(t){return this._nodes[t]||null}getNodeIndex(t){const e=this._nodes.indexOf(t);return-1==e?null:e}getNodeStartOffset(t){const e=this.getNodeIndex(t);return null===e?null:this._nodes.slice(0,e).reduce(((t,e)=>t+e.offsetSize),0)}indexToOffset(t){if(t==this._nodes.length)return this.maxOffset;const e=this._nodes[t];if(!e)throw new k("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(e)}offsetToIndex(t){let e=0;for(const n of this._nodes){if(t>=e&&t1e4)return t.slice(0,n).concat(e).concat(t.slice(n+o,t.length));{const i=Array.from(t);return i.splice(n,o,...e),i}}(this._nodes,Array.from(e),t,0)}_removeNodes(t,e=1){return this._nodes.splice(t,e)}toJSON(){return this._nodes.map((t=>t.toJSON()))}}class Cc extends wc{constructor(t,e){super(e),this._data=t||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const t=super.toJSON();return t.data=this.data,t}_clone(){return new Cc(this.data,this.getAttributes())}static fromJSON(t){return new Cc(t.data,t.attributes)}}Cc.prototype.is=function(t){return"$text"===t||"model:$text"===t||"text"===t||"model:text"===t||"node"===t||"model:node"===t};class _c extends bc{constructor(t,e,n){if(super(),this.textNode=t,e<0||e>t.offsetSize)throw new k("model-textproxy-wrong-offsetintext",this);if(n<0||e+n>t.offsetSize)throw new k("model-textproxy-wrong-length",this);this.data=t.data.substring(e,e+n),this.offsetInText=e}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 t=this.textNode.getPath();return t.length>0&&(t[t.length-1]+=this.offsetInText),t}getAncestors(t={}){const e=[];let n=t.includeSelf?this:this.parent;for(;n;)e[t.parentFirst?"push":"unshift"](n),n=n.parent;return e}hasAttribute(t){return this.textNode.hasAttribute(t)}getAttribute(t){return this.textNode.getAttribute(t)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}_c.prototype.is=function(t){return"$textProxy"===t||"model:$textProxy"===t||"textProxy"===t||"model:textProxy"===t};class vc extends wc{constructor(t,e,n){super(e),this._children=new Ac,this.name=t,n&&this._insertChild(0,n)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}offsetToIndex(t){return this._children.offsetToIndex(t)}getNodeByPath(t){let e=this;for(const n of t)e=e.getChild(e.offsetToIndex(n));return e}findAncestor(t,e={}){let n=e.includeSelf?this:this.parent;for(;n;){if(n.name===t)return n;n=n.parent}return null}toJSON(){const t=super.toJSON();if(t.name=this.name,this._children.length>0){t.children=[];for(const e of this._children)t.children.push(e.toJSON())}return t}_clone(t=!1){const e=t?Array.from(this._children).map((t=>t._clone(!0))):void 0;return new vc(this.name,this.getAttributes(),e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const n=function(t){if("string"==typeof t)return[new Cc(t)];J(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new Cc(t):t instanceof _c?new Cc(t.data,t.getAttributes()):t))}(e);for(const t of n)null!==t.parent&&t._remove(),t.parent=this;this._children._insertNodes(t,n)}_removeChildren(t,e=1){const n=this._children._removeNodes(t,e);for(const t of n)t.parent=null;return n}static fromJSON(t){let e;if(t.children){e=[];for(const n of t.children)n.name?e.push(vc.fromJSON(n)):e.push(Cc.fromJSON(n))}return new vc(t.name,t.attributes,e)}}vc.prototype.is=function(t,e){return e?e===this.name&&("element"===t||"model:element"===t):"element"===t||"model:element"===t||"node"===t||"model:node"===t};class yc{constructor(t){if(!t||!t.boundaries&&!t.startPosition)throw new k("model-tree-walker-no-start-position",null);const e=t.direction||"forward";if("forward"!=e&&"backward"!=e)throw new k("model-tree-walker-unknown-direction",t,{direction:e});this.direction=e,this.boundaries=t.boundaries||null,t.startPosition?this._position=t.startPosition.clone():this._position=Ec._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!t.singleCharacters,this.shallow=!!t.shallow,this.ignoreElementEnd=!!t.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(t){let e,n,o,i;do{o=this.position,i=this._visitedParent,({done:e,value:n}=this.next())}while(!e&&t(n));e||(this._position=o,this._visitedParent=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const t=this.position,e=this.position.clone(),n=this._visitedParent;if(null===n.parent&&e.offset===n.maxOffset)return{done:!0,value:void 0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const o=Dc(e,n),i=o||Ic(e,n,o);if(i instanceof vc){if(this.shallow){if(this.boundaries&&this.boundaries.end.isBefore(e))return{done:!0,value:void 0};e.offset++}else e.path.push(0),this._visitedParent=i;return this._position=e,xc("elementStart",i,t,e,1)}if(i instanceof Cc){let o;if(this.singleCharacters)o=1;else{let t=i.endOffset;this._boundaryEndParent==n&&this.boundaries.end.offsett&&(t=this.boundaries.start.offset),o=e.offset-t}const i=e.offset-r.startOffset,s=new _c(r,i-o,o);return e.offset-=o,this._position=e,xc("text",s,t,e,o)}return e.path.pop(),this._position=e,this._visitedParent=n.parent,xc("elementStart",n,t,e,1)}}function xc(t,e,n,o,i){return{done:!1,value:{type:t,item:e,previousPosition:n,nextPosition:o,length:i}}}class Ec extends bc{constructor(t,e,n="toNone"){if(super(),!t.is("element")&&!t.is("documentFragment"))throw new k("model-position-root-invalid",t);if(!(e instanceof Array)||0===e.length)throw new k("model-position-path-incorrect-format",t,{path:e});t.is("rootElement")?e=e.slice():(e=[...t.getPath(),...e],t=t.root),this.root=t,this.path=e,this.stickiness=n}get offset(){return this.path[this.path.length-1]}set offset(t){this.path[this.path.length-1]=t}get parent(){let t=this.root;for(let e=0;e1)return!1;if(1===e)return Mc(t,this,n);if(-1===e)return Mc(this,t,n)}return this.path.length===t.path.length||(this.path.length>t.path.length?Tc(this.path,e):Tc(t.path,e))}hasSameParentAs(t){if(this.root!==t.root)return!1;return"same"==Q(this.getParentPath(),t.getParentPath())}getTransformedByOperation(t){let e;switch(t.type){case"insert":e=this._getTransformedByInsertOperation(t);break;case"move":case"remove":case"reinsert":e=this._getTransformedByMoveOperation(t);break;case"split":e=this._getTransformedBySplitOperation(t);break;case"merge":e=this._getTransformedByMergeOperation(t);break;default:e=Ec._createAt(this)}return e}_getTransformedByInsertOperation(t){return this._getTransformedByInsertion(t.position,t.howMany)}_getTransformedByMoveOperation(t){return this._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany)}_getTransformedBySplitOperation(t){const e=t.movedRange;return e.containsPosition(this)||e.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(t.splitPosition,t.moveTargetPosition):t.graveyardPosition?this._getTransformedByMove(t.graveyardPosition,t.insertionPosition,1):this._getTransformedByInsertion(t.insertionPosition,1)}_getTransformedByMergeOperation(t){const e=t.movedRange;let n;return e.containsPosition(this)||e.start.isEqual(this)?(n=this._getCombined(t.sourcePosition,t.targetPosition),t.sourcePosition.isBefore(t.targetPosition)&&(n=n._getTransformedByDeletion(t.deletionPosition,1))):n=this.isEqual(t.deletionPosition)?Ec._createAt(t.deletionPosition):this._getTransformedByMove(t.deletionPosition,t.graveyardPosition,1),n}_getTransformedByDeletion(t,e){const n=Ec._createAt(this);if(this.root!=t.root)return n;if("same"==Q(t.getParentPath(),this.getParentPath())){if(t.offsetthis.offset)return null;n.offset-=e}}else if("prefix"==Q(t.getParentPath(),this.getParentPath())){const o=t.path.length-1;if(t.offset<=this.path[o]){if(t.offset+e>this.path[o])return null;n.path[o]-=e}}return n}_getTransformedByInsertion(t,e){const n=Ec._createAt(this);if(this.root!=t.root)return n;if("same"==Q(t.getParentPath(),this.getParentPath()))(t.offset=e;){if(t.path[o]+i!==n.maxOffset)return!1;i=1,o--,n=n.parent}return!0}(t,n+1))}function Tc(t,e){for(;ee+1;){const e=o.maxOffset-n.offset;0!==e&&t.push(new Bc(n,n.getShiftedBy(e))),n.path=n.path.slice(0,-1),n.offset++,o=o.parent}for(;n.path.length<=this.end.path.length;){const e=this.end.path[n.path.length-1],o=e-n.offset;0!==o&&t.push(new Bc(n,n.getShiftedBy(o))),n.offset=e,n.path.push(0)}return t}getWalker(t={}){return t.boundaries=this,new yc(t)}*getItems(t={}){t.boundaries=this,t.ignoreElementEnd=!0;const e=new yc(t);for(const t of e)yield t.item}*getPositions(t={}){t.boundaries=this;const e=new yc(t);yield e.position;for(const t of e)yield t.nextPosition}getTransformedByOperation(t){switch(t.type){case"insert":return this._getTransformedByInsertOperation(t);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(t);case"split":return[this._getTransformedBySplitOperation(t)];case"merge":return[this._getTransformedByMergeOperation(t)]}return[new Bc(this.start,this.end)]}getTransformedByOperations(t){const e=[new Bc(this.start,this.end)];for(const n of t)for(let t=0;t0?new this(n,o):new this(o,n)}static _createIn(t){return new this(Ec._createAt(t,0),Ec._createAt(t,t.maxOffset))}static _createOn(t){return this._createFromPositionAndShift(Ec._createBefore(t),t.offsetSize)}static _createFromRanges(t){if(0===t.length)throw new k("range-create-from-ranges-empty-array",null);if(1==t.length)return t[0].clone();const e=t[0];t.sort(((t,e)=>t.start.isAfter(e.start)?1:-1));const n=t.indexOf(e),o=new this(e.start,e.end);if(n>0)for(let e=n-1;t[e].end.isEqual(o.start);e++)o.start=Ec._createAt(t[e].start);for(let e=n+1;e{if(e.viewPosition)return;const n=this._modelToViewMapping.get(e.modelPosition.parent);if(!n)throw new k("mapping-model-position-view-parent-not-found",this,{modelPosition:e.modelPosition});e.viewPosition=this.findPositionIn(n,e.modelPosition.offset)}),{priority:"low"}),this.on("viewToModelPosition",((t,e)=>{if(e.modelPosition)return;const n=this.findMappedViewAncestor(e.viewPosition),o=this._viewToModelMapping.get(n),i=this._toModelOffset(e.viewPosition.parent,e.viewPosition.offset,n);e.modelPosition=Ec._createAt(o,i)}),{priority:"low"})}bindElements(t,e){this._modelToViewMapping.set(t,e),this._viewToModelMapping.set(e,t)}unbindViewElement(t,e={}){const n=this.toModelElement(t);if(this._elementToMarkerNames.has(t))for(const e of this._elementToMarkerNames.get(t))this._unboundMarkerNames.add(e);e.defer?this._deferredBindingRemovals.set(t,t.root):(this._viewToModelMapping.delete(t),this._modelToViewMapping.get(n)==t&&this._modelToViewMapping.delete(n))}unbindModelElement(t){const e=this.toViewElement(t);this._modelToViewMapping.delete(t),this._viewToModelMapping.get(e)==t&&this._viewToModelMapping.delete(e)}bindElementToMarker(t,e){const n=this._markerNameToElements.get(e)||new Set;n.add(t);const o=this._elementToMarkerNames.get(t)||new Set;o.add(e),this._markerNameToElements.set(e,n),this._elementToMarkerNames.set(t,o)}unbindElementFromMarkerName(t,e){const n=this._markerNameToElements.get(e);n&&(n.delete(t),0==n.size&&this._markerNameToElements.delete(e));const o=this._elementToMarkerNames.get(t);o&&(o.delete(e),0==o.size&&this._elementToMarkerNames.delete(t))}flushUnboundMarkerNames(){const t=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),t}flushDeferredBindings(){for(const[t,e]of this._deferredBindingRemovals)t.root==e&&this.unbindViewElement(t);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(t){return this._viewToModelMapping.get(t)}toViewElement(t){return this._modelToViewMapping.get(t)}toModelRange(t){return new Bc(this.toModelPosition(t.start),this.toModelPosition(t.end))}toViewRange(t){return new gs(this.toViewPosition(t.start),this.toViewPosition(t.end))}toModelPosition(t){const e={viewPosition:t,mapper:this};return this.fire("viewToModelPosition",e),e.modelPosition}toViewPosition(t,e={}){const n={modelPosition:t,mapper:this,isPhantom:e.isPhantom};return this.fire("modelToViewPosition",n),n.viewPosition}markerNameToElements(t){const e=this._markerNameToElements.get(t);if(!e)return null;const n=new Set;for(const t of e)if(t.is("attributeElement"))for(const e of t.getElementsWithSameId())n.add(e);else n.add(t);return n}registerViewToModelLength(t,e){this._viewToModelLengthCallbacks.set(t,e)}findMappedViewAncestor(t){let e=t.parent;for(;!this._viewToModelMapping.has(e);)e=e.parent;return e}_toModelOffset(t,e,n){if(n!=t){return this._toModelOffset(t.parent,t.index,n)+this._toModelOffset(t,e,t)}if(t.is("$text"))return e;let o=0;for(let n=0;n1?e[0]+":"+e[1]:e[0]}var Oc=Object.defineProperty,Lc=Object.defineProperties,jc=Object.getOwnPropertyDescriptors,Rc=Object.getOwnPropertySymbols,Fc=Object.prototype.hasOwnProperty,Vc=Object.prototype.propertyIsEnumerable,Uc=(t,e,n)=>e in t?Oc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hc=(t,e)=>{for(var n in e||(e={}))Fc.call(e,n)&&Uc(t,n,e[n]);if(Rc)for(var n of Rc(e))Vc.call(e,n)&&Uc(t,n,e[n]);return t},Gc=(t,e)=>Lc(t,jc(e));class qc extends(S()){constructor(t){super(),this._conversionApi=Hc({dispatcher:this},t),this._firedEventsMap=new WeakMap}convertChanges(t,e,n){const o=this._createConversionApi(n,t.getRefreshedItems());for(const e of t.getMarkersToRemove())this._convertMarkerRemove(e.name,e.range,o);const i=this._reduceChanges(t.getChanges());for(const t of i)"insert"===t.type?this._convertInsert(Bc._createFromPositionAndShift(t.position,t.length),o):"reinsert"===t.type?this._convertReinsert(Bc._createFromPositionAndShift(t.position,t.length),o):"remove"===t.type?this._convertRemove(t.position,t.length,t.name,o):this._convertAttribute(t.range,t.attributeKey,t.attributeOldValue,t.attributeNewValue,o);for(const t of o.mapper.flushUnboundMarkerNames()){const n=e.get(t).getRange();this._convertMarkerRemove(t,n,o),this._convertMarkerAdd(t,n,o)}for(const e of t.getMarkersToAdd())this._convertMarkerAdd(e.name,e.range,o);o.mapper.flushDeferredBindings(),o.consumable.verifyAllConsumed("insert")}convert(t,e,n,o={}){const i=this._createConversionApi(n,void 0,o);this._convertInsert(t,i);for(const[t,n]of e)this._convertMarkerAdd(t,n,i);i.consumable.verifyAllConsumed("insert")}convertSelection(t,e,n){const o=this._createConversionApi(n);this.fire("cleanSelection",{selection:t},o);const i=t.getFirstPosition().root;if(!o.mapper.toViewElement(i))return;const r=Array.from(e.getMarkersAtPosition(t.getFirstPosition()));if(this._addConsumablesForSelection(o.consumable,t,r),this.fire("selection",{selection:t},o),t.isCollapsed){for(const e of r)if(o.consumable.test(t,"addMarker:"+e.name)){const n=e.getRange();if(!Wc(t.getFirstPosition(),e,o.mapper))continue;const i={item:t,markerName:e.name,markerRange:n};this.fire(`addMarker:${e.name}`,i,o)}for(const e of t.getAttributeKeys())if(o.consumable.test(t,"attribute:"+e)){const n={item:t,range:t.getFirstRange(),attributeKey:e,attributeOldValue:null,attributeNewValue:t.getAttribute(e)};this.fire(`attribute:${e}:$text`,n,o)}}}_convertInsert(t,e,n={}){n.doNotAddConsumables||this._addConsumablesForInsert(e.consumable,Array.from(t));for(const n of Array.from(t.getWalker({shallow:!0})).map(Kc))this._testAndFire("insert",n,e)}_convertRemove(t,e,n,o){this.fire(`remove:${n}`,{position:t,length:e},o)}_convertAttribute(t,e,n,o,i){this._addConsumablesForRange(i.consumable,t,`attribute:${e}`);for(const r of t){const t={item:r.item,range:Bc._createFromPositionAndShift(r.previousPosition,r.length),attributeKey:e,attributeOldValue:n,attributeNewValue:o};this._testAndFire(`attribute:${e}`,t,i)}}_convertReinsert(t,e){const n=Array.from(t.getWalker({shallow:!0}));this._addConsumablesForInsert(e.consumable,n);for(const t of n.map(Kc))this._testAndFire("insert",Gc(Hc({},t),{reconversion:!0}),e)}_convertMarkerAdd(t,e,n){if("$graveyard"==e.root.rootName)return;const o=`addMarker:${t}`;if(n.consumable.add(e,o),this.fire(o,{markerName:t,markerRange:e},n),n.consumable.consume(e,o)){this._addConsumablesForRange(n.consumable,e,o);for(const i of e.getItems()){if(!n.consumable.test(i,o))continue;const r={item:i,range:Bc._createOn(i),markerName:t,markerRange:e};this.fire(o,r,n)}}}_convertMarkerRemove(t,e,n){"$graveyard"!=e.root.rootName&&this.fire(`removeMarker:${t}`,{markerName:t,markerRange:e},n)}_reduceChanges(t){const e={changes:t};return this.fire("reduceChanges",e),e.changes}_addConsumablesForInsert(t,e){for(const n of e){const e=n.item;if(null===t.test(e,"insert")){t.add(e,"insert");for(const n of e.getAttributeKeys())t.add(e,"attribute:"+n)}}return t}_addConsumablesForRange(t,e,n){for(const o of e.getItems())t.add(o,n);return t}_addConsumablesForSelection(t,e,n){t.add(e,"selection");for(const o of n)t.add(e,"addMarker:"+o.name);for(const n of e.getAttributeKeys())t.add(e,"attribute:"+n);return t}_testAndFire(t,e,n){const o=function(t,e){const n=e.item.is("element")?e.item.name:"$text";return`${t}:${n}`}(t,e),i=e.item.is("$textProxy")?n.consumable._getSymbolForTextProxy(e.item):e.item,r=this._firedEventsMap.get(n),s=r.get(i);if(s){if(s.has(o))return;s.add(o)}else r.set(i,new Set([o]));this.fire(o,e,n)}_testAndFireAddAttributes(t,e){const n={item:t,range:Bc._createOn(t)};for(const t of n.item.getAttributeKeys())n.attributeKey=t,n.attributeOldValue=null,n.attributeNewValue=n.item.getAttribute(t),this._testAndFire(`attribute:${t}`,n,e)}_createConversionApi(t,e=new Set,n={}){const o=Gc(Hc({},this._conversionApi),{consumable:new Pc,writer:t,options:n,convertItem:t=>this._convertInsert(Bc._createOn(t),o),convertChildren:t=>this._convertInsert(Bc._createIn(t),o,{doNotAddConsumables:!0}),convertAttributes:t=>this._testAndFireAddAttributes(t,o),canReuseView:t=>!e.has(o.mapper.toModelElement(t))});return this._firedEventsMap.set(o,new Map),o}}function Wc(t,e,n){const o=e.getRange(),i=Array.from(t.getAncestors());i.shift(),i.reverse();return!i.some((t=>{if(o.containsItem(t)){return!!n.toViewElement(t).getCustomProperty("addHighlight")}}))}function Kc(t){return{item:t.item,range:Bc._createFromPositionAndShift(t.previousPosition,t.length)}}class Yc extends(S(bc)){constructor(...t){super(),this._lastRangeBackward=!1,this._attrs=new Map,this._ranges=[],t.length&&this.setTo(...t)}get anchor(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.end:t.start}return null}get focus(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.start:t.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(t){if(this.rangeCount!=t.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus))return!1;for(const e of this._ranges){let n=!1;for(const o of t._ranges)if(e.isEqual(o)){n=!0;break}if(!n)return!1}return!0}*getRanges(){for(const t of this._ranges)yield new Bc(t.start,t.end)}getFirstRange(){let t=null;for(const e of this._ranges)t&&!e.start.isBefore(t.start)||(t=e);return t?new Bc(t.start,t.end):null}getLastRange(){let t=null;for(const e of this._ranges)t&&!e.end.isAfter(t.end)||(t=e);return t?new Bc(t.start,t.end):null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}setTo(...t){let[e,n,o]=t;if("object"==typeof n&&(o=n,n=void 0),null===e)this._setRanges([]);else if(e instanceof Yc)this._setRanges(e.getRanges(),e.isBackward);else if(e&&"function"==typeof e.getRanges)this._setRanges(e.getRanges(),e.isBackward);else if(e instanceof Bc)this._setRanges([e],!!o&&!!o.backward);else if(e instanceof Ec)this._setRanges([new Bc(e)]);else if(e instanceof wc){const t=!!o&&!!o.backward;let i;if("in"==n)i=Bc._createIn(e);else if("on"==n)i=Bc._createOn(e);else{if(void 0===n)throw new k("model-selection-setto-required-second-parameter",[this,e]);i=new Bc(Ec._createAt(e,n))}this._setRanges([i],t)}else{if(!J(e))throw new k("model-selection-setto-not-selectable",[this,e]);this._setRanges(e,o&&!!o.backward)}}_setRanges(t,e=!1){const n=Array.from(t),o=n.some((e=>{if(!(e instanceof Bc))throw new k("model-selection-set-ranges-not-range",[this,t]);return this._ranges.every((t=>!t.isEqual(e)))}));(n.length!==this._ranges.length||o)&&(this._replaceAllRanges(n),this._lastRangeBackward=!!e,this.fire("change:range",{directChange:!0}))}setFocus(t,e){if(null===this.anchor)throw new k("model-selection-setfocus-no-ranges",[this,t]);const n=Ec._createAt(t,e);if("same"==n.compareWith(this.focus))return;const o=this.anchor;this._ranges.length&&this._popRange(),"before"==n.compareWith(o)?(this._pushRange(new Bc(n,o)),this._lastRangeBackward=!0):(this._pushRange(new Bc(o,n)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(t){return this._attrs.get(t)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(t){return this._attrs.has(t)}removeAttribute(t){this.hasAttribute(t)&&(this._attrs.delete(t),this.fire("change:attribute",{attributeKeys:[t],directChange:!0}))}setAttribute(t,e){this.getAttribute(t)!==e&&(this._attrs.set(t,e),this.fire("change:attribute",{attributeKeys:[t],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const t=new WeakSet;for(const e of this.getRanges()){const n=Qc(e.start,t);Xc(n,e)&&(yield n);for(const n of e.getWalker()){const o=n.item;"elementEnd"==n.type&&Zc(o,t,e)&&(yield o)}const o=Qc(e.end,t);tl(o,e)&&(yield o)}}containsEntireContent(t=this.anchor.root){const e=Ec._createAt(t,0),n=Ec._createAt(t,"end");return e.isTouching(this.getFirstPosition())&&n.isTouching(this.getLastPosition())}_pushRange(t){this._checkRange(t),this._ranges.push(new Bc(t.start,t.end))}_checkRange(t){for(let e=0;e0;)this._popRange()}_popRange(){this._ranges.pop()}}function $c(t,e){return!e.has(t)&&(e.add(t),t.root.document.model.schema.isBlock(t)&&!!t.parent)}function Zc(t,e,n){return $c(t,e)&&Jc(t,n)}function Qc(t,e){const n=t.parent.root.document.model.schema,o=t.parent.getAncestors({parentFirst:!0,includeSelf:!0});let i=!1;const r=o.find((t=>!i&&(i=n.isLimit(t),!i&&$c(t,e))));return o.forEach((t=>e.add(t))),r}function Jc(t,e){const n=function(t){const e=t.root.document.model.schema;let n=t.parent;for(;n;){if(e.isBlock(n))return n;n=n.parent}}(t);if(!n)return!0;return!e.containsRange(Bc._createOn(n),!0)}function Xc(t,e){return!!t&&(!(!e.isCollapsed&&!t.isEmpty)||!e.start.isTouching(Ec._createAt(t,t.maxOffset))&&Jc(t,e))}function tl(t,e){return!!t&&(!(!e.isCollapsed&&!t.isEmpty)||!e.end.isTouching(Ec._createAt(t,0))&&Jc(t,e))}Yc.prototype.is=function(t){return"selection"===t||"model:selection"===t};class el extends(S(Bc)){constructor(t,e){super(t,e),nl.call(this)}detach(){this.stopListening()}toRange(){return new Bc(this.start,this.end)}static fromRange(t){return new el(t.start,t.end)}}function nl(){this.listenTo(this.root.document.model,"applyOperation",((t,e)=>{const n=e[0];n.isDocumentOperation&&ol.call(this,n)}),{priority:"low"})}function ol(t){const e=this.getTransformedByOperation(t),n=Bc._createFromRanges(e),o=!n.isEqual(this),i=function(t,e){switch(e.type){case"insert":return t.containsPosition(e.position);case"move":case"remove":case"reinsert":case"merge":return t.containsPosition(e.sourcePosition)||t.start.isEqual(e.sourcePosition)||t.containsPosition(e.targetPosition);case"split":return t.containsPosition(e.splitPosition)||t.containsPosition(e.insertionPosition)}return!1}(this,t);let r=null;if(o){"$graveyard"==n.root.rootName&&(r="remove"==t.type?t.sourcePosition:t.deletionPosition);const e=this.toRange();this.start=n.start,this.end=n.end,this.fire("change:range",e,{deletionPosition:r})}else i&&this.fire("change:content",this.toRange(),{deletionPosition:r})}el.prototype.is=function(t){return"liveRange"===t||"model:liveRange"===t||"range"==t||"model:range"===t};const il="selection:";class rl extends(S(bc)){constructor(t){super(),this._selection=new sl(t),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(t){return this._selection.containsEntireContent(t)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(t){return this._selection.getAttribute(t)}hasAttribute(t){return this._selection.hasAttribute(t)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(t){this._selection.observeMarkers(t)}_setFocus(t,e){this._selection.setFocus(t,e)}_setTo(...t){this._selection.setTo(...t)}_setAttribute(t,e){this._selection.setAttribute(t,e)}_removeAttribute(t){this._selection.removeAttribute(t)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(t){this._selection.restoreGravity(t)}static _getStoreAttributeKey(t){return il+t}static _isStoreAttributeKey(t){return t.startsWith(il)}}rl.prototype.is=function(t){return"selection"===t||"model:selection"==t||"documentSelection"==t||"model:documentSelection"==t};class sl extends Yc{constructor(t){super(),this.markers=new vi({idProperty:"name"}),this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this._model=t.model,this._document=t,this.listenTo(this._model,"applyOperation",((t,e)=>{const n=e[0];n.isDocumentOperation&&"marker"!=n.type&&"rename"!=n.type&&"noop"!=n.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",((t,e,n,o)=>{this._updateMarker(e,o)})),this.listenTo(this._document,"change",((t,e)=>{!function(t,e){const n=t.document.differ;for(const o of n.getChanges()){if("insert"!=o.type)continue;const n=o.position.parent;o.length===n.maxOffset&&t.enqueueChange(e,(t=>{const e=Array.from(n.getAttributeKeys()).filter((t=>t.startsWith(il)));for(const o of e)t.removeAttribute(o,n)}))}}(this._model,e)}))}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 t=0;t{if(this._hasChangedRange=!0,e.root==this._document.graveyard){this._selectionRestorePosition=o.deletionPosition;const t=this._ranges.indexOf(e);this._ranges.splice(t,1),e.detach()}})),e}updateMarkers(){if(!this._observedMarkers.size)return;const t=[];let e=!1;for(const e of this._model.markers){const n=e.name.split(":",1)[0];if(!this._observedMarkers.has(n))continue;const o=e.getRange();for(const n of this.getRanges())o.containsRange(n,!n.isCollapsed)&&t.push(e)}const n=Array.from(this.markers);for(const n of t)this.markers.has(n)||(this.markers.add(n),e=!0);for(const n of Array.from(this.markers))t.includes(n)||(this.markers.remove(n),e=!0);e&&this.fire("change:marker",{oldMarkers:n,directChange:!1})}_updateMarker(t,e){const n=t.name.split(":",1)[0];if(!this._observedMarkers.has(n))return;let o=!1;const i=Array.from(this.markers),r=this.markers.has(t);if(e){let n=!1;for(const t of this.getRanges())if(e.containsRange(t,!t.isCollapsed)){n=!0;break}n&&!r?(this.markers.add(t),o=!0):!n&&r&&(this.markers.remove(t),o=!0)}else r&&(this.markers.remove(t),o=!0);o&&this.fire("change:marker",{oldMarkers:i,directChange:!1})}_updateAttributes(t){const e=Di(this._getSurroundingAttributes()),n=Di(this.getAttributes());if(t)this._attributePriority=new Map,this._attrs=new Map;else for(const[t,e]of this._attributePriority)"low"==e&&(this._attrs.delete(t),this._attributePriority.delete(t));this._setAttributesTo(e);const o=[];for(const[t,e]of this.getAttributes())n.has(t)&&n.get(t)===e||o.push(t);for(const[t]of n)this.hasAttribute(t)||o.push(t);o.length>0&&this.fire("change:attribute",{attributeKeys:o,directChange:!1})}_setAttribute(t,e,n=!0){const o=n?"normal":"low";if("low"==o&&"normal"==this._attributePriority.get(t))return!1;return super.getAttribute(t)!==e&&(this._attrs.set(t,e),this._attributePriority.set(t,o),!0)}_removeAttribute(t,e=!0){const n=e?"normal":"low";return("low"!=n||"normal"!=this._attributePriority.get(t))&&(this._attributePriority.set(t,n),!!super.hasAttribute(t)&&(this._attrs.delete(t),!0))}_setAttributesTo(t){const e=new Set;for(const[e,n]of this.getAttributes())t.get(e)!==n&&this._removeAttribute(e,!1);for(const[n,o]of t){this._setAttribute(n,o,!1)&&e.add(n)}return e}*getStoredAttributes(){const t=this.getFirstPosition().parent;if(this.isCollapsed&&t.isEmpty)for(const e of t.getAttributeKeys())if(e.startsWith(il)){const n=e.substr(10);yield[n,t.getAttribute(e)]}}_getSurroundingAttributes(){const t=this.getFirstPosition(),e=this._model.schema;if("$graveyard"==t.root.rootName)return null;let n=null;if(this.isCollapsed){const o=t.textNode?t.textNode:t.nodeBefore,i=t.textNode?t.textNode:t.nodeAfter;if(this.isGravityOverridden||(n=al(o,e)),n||(n=al(i,e)),!this.isGravityOverridden&&!n){let t=o;for(;t&&!n;)t=t.previousSibling,n=al(t,e)}if(!n){let t=i;for(;t&&!n;)t=t.nextSibling,n=al(t,e)}n||(n=this.getStoredAttributes())}else{const t=this.getFirstRange();for(const o of t){if(o.item.is("element")&&e.isObject(o.item)){n=al(o.item,e);break}if("text"==o.type){n=o.item.getAttributes();break}}}return n}_fixGraveyardSelection(t){const e=this._model.schema.getNearestSelectionRange(t);e&&this._pushRange(e)}}function al(t,e){if(!t)return null;if(t instanceof _c||t instanceof Cc)return t.getAttributes();if(!e.isInline(t))return null;if(!e.isObject(t))return[];const n=[];for(const[o,i]of t.getAttributes())e.checkAttribute("$text",o)&&!1!==e.getAttributeProperties(o).copyFromObject&&n.push([o,i]);return n}class cl{constructor(t){this._dispatchers=t}add(t){for(const e of this._dispatchers)t(e);return this}}class ll extends cl{elementToElement(t){return this.add(function(t){const e=ul(t.model),n=gl(t.view,"container");e.attributes.length&&(e.children=!0);return o=>{o.on(`insert:${e.name}`,function(t,e=Cl){return(n,o,i)=>{if(!e(o.item,i.consumable,{preflight:!0}))return;const r=t(o.item,i,o);if(!r)return;e(o.item,i.consumable);const s=i.mapper.toViewPosition(o.range.start);i.mapper.bindElements(o.item,r),i.writer.insert(s,r),i.convertAttributes(o.item),wl(r,o.item.getChildren(),i,{reconversion:o.reconversion})}}(n,bl(e)),{priority:t.converterPriority||"normal"}),(e.children||e.attributes.length)&&o.on("reduceChanges",kl(e),{priority:"low"})}}(t))}elementToStructure(t){return this.add(function(t){const e=ul(t.model),n=gl(t.view,"container");return e.children=!0,o=>{if(o._conversionApi.schema.checkChild(e.name,"$text"))throw new k("conversion-element-to-structure-disallowed-text",o,{elementName:e.name});var i,r;o.on(`insert:${e.name}`,(i=n,r=bl(e),(t,e,n)=>{if(!r(e.item,n.consumable,{preflight:!0}))return;const o=new Map;n.writer._registerSlotFactory(function(t,e,n){return(o,i)=>{const r=o.createContainerElement("$slot");let s=null;if("children"===i)s=Array.from(t.getChildren());else{if("function"!=typeof i)throw new k("conversion-slot-mode-unknown",n.dispatcher,{modeOrFilter:i});s=Array.from(t.getChildren()).filter((t=>i(t)))}return e.set(r,s),r}}(e.item,o,n));const s=i(e.item,n,e);if(n.writer._clearSlotFactory(),!s)return;!function(t,e,n){const o=Array.from(e.values()).flat(),i=new Set(o);if(i.size!=o.length)throw new k("conversion-slot-filter-overlap",n.dispatcher,{element:t});if(i.size!=t.childCount)throw new k("conversion-slot-filter-incomplete",n.dispatcher,{element:t})}(e.item,o,n),r(e.item,n.consumable);const a=n.mapper.toViewPosition(e.range.start);n.mapper.bindElements(e.item,s),n.writer.insert(a,s),n.convertAttributes(e.item),function(t,e,n,o){n.mapper.on("modelToViewPosition",s,{priority:"highest"});let i=null,r=null;for([i,r]of e)wl(t,r,n,o),n.writer.move(n.writer.createRangeIn(i),n.writer.createPositionBefore(i)),n.writer.remove(i);function s(t,e){const n=e.modelPosition.nodeAfter,o=r.indexOf(n);o<0||(e.viewPosition=e.mapper.findPositionIn(i,o))}n.mapper.off("modelToViewPosition",s)}(s,o,n,{reconversion:e.reconversion})}),{priority:t.converterPriority||"normal"}),o.on("reduceChanges",kl(e),{priority:"low"})}}(t))}attributeToElement(t){return this.add(function(t){t=fc(t);let e=t.model;"string"==typeof e&&(e={key:e});let n=`attribute:${e.key}`;e.name&&(n+=":"+e.name);if(e.values)for(const n of e.values)t.view[n]=gl(t.view[n],"attribute");else t.view=gl(t.view,"attribute");const o=pl(t);return e=>{e.on(n,function(t){return(e,n,o)=>{if(!o.consumable.test(n.item,e.name))return;const i=t(n.attributeOldValue,o,n),r=t(n.attributeNewValue,o,n);if(!i&&!r)return;o.consumable.consume(n.item,e.name);const s=o.writer,a=s.document.selection;if(n.item instanceof Yc||n.item instanceof rl)s.wrap(a.getFirstRange(),r);else{let t=o.mapper.toViewRange(n.range);null!==n.attributeOldValue&&i&&(t=s.unwrap(t,i)),null!==n.attributeNewValue&&r&&s.wrap(t,r)}}}(o),{priority:t.converterPriority||"normal"})}}(t))}attributeToAttribute(t){return this.add(function(t){t=fc(t);let e=t.model;"string"==typeof e&&(e={key:e});let n=`attribute:${e.key}`;e.name&&(n+=":"+e.name);if(e.values)for(const n of e.values)t.view[n]=ml(t.view[n]);else t.view=ml(t.view);const o=pl(t);return e=>{var i;e.on(n,(i=o,(t,e,n)=>{if(!n.consumable.test(e.item,t.name))return;const o=i(e.attributeOldValue,n,e),r=i(e.attributeNewValue,n,e);if(!o&&!r)return;n.consumable.consume(e.item,t.name);const s=n.mapper.toViewElement(e.item),a=n.writer;if(!s)throw new k("conversion-attribute-to-attribute-on-text",n.dispatcher,e);if(null!==e.attributeOldValue&&o)if("class"==o.key){const t=bi(o.value);for(const e of t)a.removeClass(e,s)}else if("style"==o.key){const t=Object.keys(o.value);for(const e of t)a.removeStyle(e,s)}else a.removeAttribute(o.key,s);if(null!==e.attributeNewValue&&r)if("class"==r.key){const t=bi(r.value);for(const e of t)a.addClass(e,s)}else if("style"==r.key){const t=Object.keys(r.value);for(const e of t)a.setStyle(e,r.value[e],s)}else a.setAttribute(r.key,r.value,s)}),{priority:t.converterPriority||"normal"})}}(t))}markerToElement(t){return this.add(function(t){const e=gl(t.view,"ui");return n=>{var o;n.on(`addMarker:${t.model}`,(o=e,(t,e,n)=>{e.isOpening=!0;const i=o(e,n);e.isOpening=!1;const r=o(e,n);if(!i||!r)return;const s=e.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,c=n.writer;c.insert(a.toViewPosition(s.start),i),n.mapper.bindElementToMarker(i,e.markerName),s.isCollapsed||(c.insert(a.toViewPosition(s.end),r),n.mapper.bindElementToMarker(r,e.markerName)),t.stop()}),{priority:t.converterPriority||"normal"}),n.on(`removeMarker:${t.model}`,((t,e,n)=>{const o=n.mapper.markerNameToElements(e.markerName);if(o){for(const t of o)n.mapper.unbindElementFromMarkerName(t,e.markerName),n.writer.clear(n.writer.createRangeOn(t),t);n.writer.clearClonedElementsGroup(e.markerName),t.stop()}}),{priority:t.converterPriority||"normal"})}}(t))}markerToHighlight(t){return this.add(function(t){return e=>{var n;e.on(`addMarker:${t.model}`,(n=t.view,(t,e,o)=>{if(!e.item)return;if(!(e.item instanceof Yc||e.item instanceof rl||e.item.is("$textProxy")))return;const i=fl(n,e,o);if(!i)return;if(!o.consumable.consume(e.item,t.name))return;const r=o.writer,s=dl(r,i),a=r.document.selection;if(e.item instanceof Yc||e.item instanceof rl)r.wrap(a.getFirstRange(),s);else{const t=o.mapper.toViewRange(e.range),n=r.wrap(t,s);for(const t of n.getItems())if(t.is("attributeElement")&&t.isSimilar(s)){o.mapper.bindElementToMarker(t,e.markerName);break}}}),{priority:t.converterPriority||"normal"}),e.on(`addMarker:${t.model}`,function(t){return(e,n,o)=>{if(!n.item)return;if(!(n.item instanceof vc))return;const i=fl(t,n,o);if(!i)return;if(!o.consumable.test(n.item,e.name))return;const r=o.mapper.toViewElement(n.item);if(r&&r.getCustomProperty("addHighlight")){o.consumable.consume(n.item,e.name);for(const t of Bc._createIn(n.item))o.consumable.consume(t.item,e.name);r.getCustomProperty("addHighlight")(r,i,o.writer),o.mapper.bindElementToMarker(r,n.markerName)}}}(t.view),{priority:t.converterPriority||"normal"}),e.on(`removeMarker:${t.model}`,function(t){return(e,n,o)=>{if(n.markerRange.isCollapsed)return;const i=fl(t,n,o);if(!i)return;const r=dl(o.writer,i),s=o.mapper.markerNameToElements(n.markerName);if(s){for(const t of s)if(o.mapper.unbindElementFromMarkerName(t,n.markerName),t.is("attributeElement"))o.writer.unwrap(o.writer.createRangeOn(t),r);else{t.getCustomProperty("removeHighlight")(t,i.id,o.writer)}o.writer.clearClonedElementsGroup(n.markerName),e.stop()}}}(t.view),{priority:t.converterPriority||"normal"})}}(t))}markerToData(t){return this.add(function(t){t=fc(t);const e=t.model;let n=t.view;n||(n=n=>({group:e,name:n.substr(t.model.length+1)}));return o=>{var i;o.on(`addMarker:${e}`,(i=n,(t,e,n)=>{const o=i(e.markerName,n);if(!o)return;const r=e.markerRange;n.consumable.consume(r,t.name)&&(hl(r,!1,n,e,o),hl(r,!0,n,e,o),t.stop())}),{priority:t.converterPriority||"normal"}),o.on(`removeMarker:${e}`,function(t){return(e,n,o)=>{const i=t(n.markerName,o);if(!i)return;const r=o.mapper.markerNameToElements(n.markerName);if(r){for(const t of r)o.mapper.unbindElementFromMarkerName(t,n.markerName),t.is("containerElement")?(s(`data-${i.group}-start-before`,t),s(`data-${i.group}-start-after`,t),s(`data-${i.group}-end-before`,t),s(`data-${i.group}-end-after`,t)):o.writer.clear(o.writer.createRangeOn(t),t);o.writer.clearClonedElementsGroup(n.markerName),e.stop()}function s(t,e){if(e.hasAttribute(t)){const n=new Set(e.getAttribute(t).split(","));n.delete(i.name),0==n.size?o.writer.removeAttribute(t,e):o.writer.setAttribute(t,Array.from(n).join(","),e)}}}}(n),{priority:t.converterPriority||"normal"})}}(t))}}function dl(t,e){const n=t.createAttributeElement("span",e.attributes);return e.classes&&n._addClass(e.classes),"number"==typeof e.priority&&(n._priority=e.priority),n._id=e.id,n}function hl(t,e,n,o,i){const r=e?t.start:t.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 t,r;e&&s||!e&&!a?(t=s,r=!0):(t=a,r=!1);const c=n.mapper.toViewElement(t);if(c)return void function(t,e,n,o,i,r){const s=`data-${r.group}-${e?"start":"end"}-${n?"before":"after"}`,a=t.hasAttribute(s)?t.getAttribute(s).split(","):[];a.unshift(r.name),o.writer.setAttribute(s,a.join(","),t),o.mapper.bindElementToMarker(t,i.markerName)}(c,e,r,n,o,i)}!function(t,e,n,o,i){const r=`${i.group}-${e?"start":"end"}`,s=i.name?{name:i.name}:null,a=n.writer.createUIElement(r,s);n.writer.insert(t,a),n.mapper.bindElementToMarker(a,o.markerName)}(n.mapper.toViewPosition(r),e,n,o,i)}function ul(t){return"string"==typeof t&&(t={name:t}),t.attributes?Array.isArray(t.attributes)||(t.attributes=[t.attributes]):t.attributes=[],t.children=!!t.children,t}function gl(t,e){return"function"==typeof t?t:(n,o)=>function(t,e,n){"string"==typeof t&&(t={name:t});let o;const i=e.writer,r=Object.assign({},t.attributes);if("container"==n)o=i.createContainerElement(t.name,r);else if("attribute"==n){const e={priority:t.priority||xs.DEFAULT_PRIORITY};o=i.createAttributeElement(t.name,r,e)}else o=i.createUIElement(t.name,r);if(t.styles){const e=Object.keys(t.styles);for(const n of e)i.setStyle(n,t.styles[n],o)}if(t.classes){const e=t.classes;if("string"==typeof e)i.addClass(e,o);else for(const t of e)i.addClass(t,o)}return o}(t,o,e)}function pl(t){return t.model.values?(e,n,o)=>{const i=t.view[e];return i?i(e,n,o):null}:t.view}function ml(t){return"string"==typeof t?e=>({key:t,value:e}):"object"==typeof t?t.value?()=>t:e=>({key:t.key,value:e}):t}function fl(t,e,n){const o="function"==typeof t?t(e,n):t;return o?(o.priority||(o.priority=10),o.id||(o.id=e.markerName),o):null}function kl(t){const e=function(t){return(e,n)=>{if(!e.is("element",t.name))return!1;if("attribute"==n.type){if(t.attributes.includes(n.attributeKey))return!0}else if(t.children)return!0;return!1}}(t);return(t,n)=>{const o=[];n.reconvertedElements||(n.reconvertedElements=new Set);for(const t of n.changes){const i="attribute"==t.type?t.range.start.nodeAfter:t.position.parent;if(i&&e(i,t)){if(!n.reconvertedElements.has(i)){n.reconvertedElements.add(i);const t=Ec._createBefore(i);let e=o.length;for(let n=o.length-1;n>=0;n--){const i=o[n],r=("attribute"==i.type?i.range.start:i.position).compareWith(t);if("before"==r||"remove"==i.type&&"same"==r)break;e=n}o.splice(e,0,{type:"remove",name:i.name,position:t,length:1},{type:"reinsert",name:i.name,position:t,length:1})}}else o.push(t)}n.changes=o}}function bl(t){return(e,n,o={})=>{const i=["insert"];for(const n of t.attributes)e.hasAttribute(n)&&i.push(`attribute:${n}`);return!!i.every((t=>n.test(e,t)))&&(o.preflight||i.forEach((t=>n.consume(e,t))),!0)}}function wl(t,e,n,o){for(const i of e)Al(t.root,i,n,o)||n.convertItem(i)}function Al(t,e,n,o){const{writer:i,mapper:r}=n;if(!o.reconversion)return!1;const s=r.toViewElement(e);return!(!s||s.root==t)&&(!!n.canReuseView(s)&&(i.move(i.createRangeOn(s),r.toViewPosition(Ec._createBefore(e))),!0))}function Cl(t,e,{preflight:n}={}){return n?e.test(t,"insert"):e.consume(t,"insert")}function _l(t){const{schema:e,document:n}=t.model;for(const o of n.getRoots())if(o.isEmpty&&!e.checkChild(o,"$text")&&e.checkChild(o,"paragraph"))return t.insertElement("paragraph",o),!0;return!1}function vl(t,e,n){const o=n.createContext(t);return!!n.checkChild(o,"paragraph")&&!!n.checkChild(o.push("paragraph"),e)}function yl(t,e){const n=e.createElement("paragraph");return e.insert(n,t),e.createPositionAt(n,0)}var xl=Object.defineProperty,El=Object.defineProperties,Dl=Object.getOwnPropertyDescriptors,Il=Object.getOwnPropertySymbols,Sl=Object.prototype.hasOwnProperty,Ml=Object.prototype.propertyIsEnumerable,Tl=(t,e,n)=>e in t?xl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class Bl extends cl{elementToElement(t){return this.add(Nl(t))}elementToAttribute(t){return this.add(function(t){t=fc(t),Ol(t);const e=Ll(t,!1),n=Pl(t.view),o=n?`element:${n}`:"element";return n=>{n.on(o,e,{priority:t.converterPriority||"low"})}}(t))}attributeToAttribute(t){return this.add(function(t){t=fc(t);let e=null;("string"==typeof t.view||t.view.key)&&(e=function(t){"string"==typeof t.view&&(t.view={key:t.view});const e=t.view.key;let n;if("class"==e||"style"==e){n={["class"==e?"classes":"styles"]:t.view.value}}else{n={attributes:{[e]:void 0===t.view.value?/[\s\S]*/:t.view.value}}}t.view.name&&(n.name=t.view.name);return t.view=n,e}(t));Ol(t,e);const n=Ll(t,!0);return e=>{e.on("element",n,{priority:t.converterPriority||"low"})}}(t))}elementToMarker(t){return this.add(function(t){const e=function(t){return(e,n)=>{const o="string"==typeof t?t:t(e,n);return n.writer.createElement("$marker",{"data-name":o})}}(t.model);return Nl((n=((t,e)=>{for(var n in e||(e={}))Sl.call(e,n)&&Tl(t,n,e[n]);if(Il)for(var n of Il(e))Ml.call(e,n)&&Tl(t,n,e[n]);return t})({},t),o={model:e},El(n,Dl(o))));var n,o}(t))}dataToMarker(t){return this.add(function(t){t=fc(t),t.model||(t.model=e=>e?t.view+":"+e:t.view);const e={view:t.view,model:t.model},n=zl(jl(e,"start")),o=zl(jl(e,"end"));return i=>{i.on(`element:${t.view}-start`,n,{priority:t.converterPriority||"normal"}),i.on(`element:${t.view}-end`,o,{priority:t.converterPriority||"normal"});const r=p.low,s=p.highest,a=p.get(t.converterPriority)/s;i.on("element",function(t){return(e,n,o)=>{const i=`data-${t.view}`;function r(e,i){for(const r of i){const i=t.model(r,o),s=o.writer.createElement("$marker",{"data-name":i});o.writer.insert(s,e),n.modelCursor.isEqual(e)?n.modelCursor=n.modelCursor.getShiftedBy(1):n.modelCursor=n.modelCursor._getTransformedByInsertion(e,1),n.modelRange=n.modelRange._getTransformedByInsertion(e,1)[0]}}(o.consumable.test(n.viewItem,{attributes:i+"-end-after"})||o.consumable.test(n.viewItem,{attributes:i+"-start-after"})||o.consumable.test(n.viewItem,{attributes:i+"-end-before"})||o.consumable.test(n.viewItem,{attributes:i+"-start-before"}))&&(n.modelRange||Object.assign(n,o.convertChildren(n.viewItem,n.modelCursor)),o.consumable.consume(n.viewItem,{attributes:i+"-end-after"})&&r(n.modelRange.end,n.viewItem.getAttribute(i+"-end-after").split(",")),o.consumable.consume(n.viewItem,{attributes:i+"-start-after"})&&r(n.modelRange.end,n.viewItem.getAttribute(i+"-start-after").split(",")),o.consumable.consume(n.viewItem,{attributes:i+"-end-before"})&&r(n.modelRange.start,n.viewItem.getAttribute(i+"-end-before").split(",")),o.consumable.consume(n.viewItem,{attributes:i+"-start-before"})&&r(n.modelRange.start,n.viewItem.getAttribute(i+"-start-before").split(",")))}}(e),{priority:r+a})}}(t))}}function Nl(t){const e=zl(t=fc(t)),n=Pl(t.view),o=n?`element:${n}`:"element";return n=>{n.on(o,e,{priority:t.converterPriority||"normal"})}}function Pl(t){return"string"==typeof t?t:"object"==typeof t&&"string"==typeof t.name?t.name:null}function zl(t){const e=new ir(t.view);return(n,o,i)=>{const r=e.match(o.viewItem);if(!r)return;const s=r.match;if(s.name=!0,!i.consumable.test(o.viewItem,s))return;const a=function(t,e,n){return t instanceof Function?t(e,n):n.writer.createElement(t)}(t.model,o.viewItem,i);a&&i.safeInsert(a,o.modelCursor)&&(i.consumable.consume(o.viewItem,s),i.convertChildren(o.viewItem,a),i.updateConversionResult(a,o))}}function Ol(t,e=null){const n=null===e||(t=>t.getAttribute(e)),o="object"!=typeof t.model?t.model:t.model.key,i="object"!=typeof t.model||void 0===t.model.value?n:t.model.value;t.model={key:o,value:i}}function Ll(t,e){const n=new ir(t.view);return(o,i,r)=>{if(!i.modelRange&&e)return;const s=n.match(i.viewItem);if(!s)return;if(!function(t,e){const n="function"==typeof t?t(e):t;if("object"==typeof n&&!Pl(n))return!1;return!n.classes&&!n.attributes&&!n.styles}(t.view,i.viewItem)?delete s.match.name:s.match.name=!0,!r.consumable.test(i.viewItem,s.match))return;const a=t.model.key,c="function"==typeof t.model.value?t.model.value(i.viewItem,r):t.model.value;if(null===c)return;i.modelRange||Object.assign(i,r.convertChildren(i.viewItem,i.modelCursor));const l=function(t,e,n,o){let i=!1;for(const r of Array.from(t.getItems({shallow:n})))o.schema.checkAttribute(r,e.key)&&(i=!0,r.hasAttribute(e.key)||o.writer.setAttribute(e.key,e.value,r));return i}(i.modelRange,{key:a,value:c},e,r);l&&(r.consumable.test(i.viewItem,{name:!0})&&(s.match.name=!0),r.consumable.consume(i.viewItem,s.match))}}function jl(t,e){return{view:`${t.view}-${e}`,model:(e,n)=>{const o=e.getAttribute("name"),i=t.model(o,n);return n.writer.createElement("$marker",{"data-name":i})}}}function Rl(t){t.document.registerPostFixer((e=>function(t,e){const n=e.document.selection,o=e.schema,i=[];let r=!1;for(const t of n.getRanges()){const e=Fl(t,o);e&&!e.isEqual(t)?(i.push(e),r=!0):i.push(t)}r&&t.setSelection(function(t){const e=[...t],n=new Set;let o=1;for(;o!n.has(e)))}(i),{backward:n.isBackward});return!1}(e,t)))}function Fl(t,e){return t.isCollapsed?function(t,e){const n=t.start,o=e.getNearestSelectionRange(n);if(!o){const t=n.getAncestors().reverse().find((t=>e.isObject(t)));return t?Bc._createOn(t):null}if(!o.isCollapsed)return o;const i=o.start;if(n.isEqual(i))return null;return new Bc(i)}(t,e):function(t,e){const{start:n,end:o}=t,i=e.checkChild(n,"$text"),r=e.checkChild(o,"$text"),s=e.getLimitElement(n),a=e.getLimitElement(o);if(s===a){if(i&&r)return null;if(function(t,e,n){const o=t.nodeAfter&&!n.isLimit(t.nodeAfter)||n.checkChild(t,"$text"),i=e.nodeBefore&&!n.isLimit(e.nodeBefore)||n.checkChild(e,"$text");return o||i}(n,o,e)){const t=n.nodeAfter&&e.isSelectable(n.nodeAfter)?null:e.getNearestSelectionRange(n,"forward"),i=o.nodeBefore&&e.isSelectable(o.nodeBefore)?null:e.getNearestSelectionRange(o,"backward"),r=t?t.start:n,s=i?i.end:o;return new Bc(r,s)}}const c=s&&!s.is("rootElement"),l=a&&!a.is("rootElement");if(c||l){const t=n.nodeAfter&&o.nodeBefore&&n.nodeAfter.parent===o.nodeBefore.parent,i=c&&(!t||!Ul(n.nodeAfter,e)),r=l&&(!t||!Ul(o.nodeBefore,e));let d=n,h=o;return i&&(d=Ec._createBefore(Vl(s,e))),r&&(h=Ec._createAfter(Vl(a,e))),new Bc(d,h)}return null}(t,e)}function Vl(t,e){let n=t,o=n;for(;e.isLimit(o)&&o.parent;)n=o,o=o.parent;return n}function Ul(t,e){return t&&e.isSelectable(t)}class Hl extends(G()){constructor(t,e){super(),this.model=t,this.view=new kc(e),this.mapper=new Nc,this.downcastDispatcher=new qc({mapper:this.mapper,schema:t.schema});const n=this.model.document,o=n.selection,r=this.model.markers;var s,a,c;this.listenTo(this.model,"_beforeChanges",(()=>{this.view._disableRendering(!0)}),{priority:"highest"}),this.listenTo(this.model,"_afterChanges",(()=>{this.view._disableRendering(!1)}),{priority:"lowest"}),this.listenTo(n,"change",(()=>{this.view.change((t=>{this.downcastDispatcher.convertChanges(n.differ,r,t),this.downcastDispatcher.convertSelection(o,r,t)}))}),{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(t,e){return(n,o)=>{const i=o.newSelection,r=[];for(const t of i.getRanges())r.push(e.toModelRange(t));const s=t.createSelection(r,{backward:i.isBackward});s.isEqual(t.document.selection)||t.change((t=>{t.setSelection(s)}))}}(this.model,this.mapper)),this.listenTo(this.view.document,"beforeinput",(s=this.mapper,a=this.model.schema,c=this.view,(t,e)=>{if(!c.document.isComposing||i.isAndroid)for(let t=0;t{if(!n.consumable.consume(e.item,t.name))return;const o=n.writer,i=n.mapper.toViewPosition(e.range.start),r=o.createText(e.item.data);o.insert(i,r)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((t,e,n)=>{n.convertAttributes(e.item),e.reconversion||!e.item.is("element")||e.item.isEmpty||n.convertChildren(e.item)}),{priority:"lowest"}),this.downcastDispatcher.on("remove",((t,e,n)=>{const o=n.mapper.toViewPosition(e.position),i=e.position.getShiftedBy(e.length),r=n.mapper.toViewPosition(i,{isPhantom:!0}),s=n.writer.createRange(o,r),a=n.writer.remove(s.getTrimmed());for(const t of n.writer.createRangeIn(a).getItems())n.mapper.unbindViewElement(t,{defer:!0})}),{priority:"low"}),this.downcastDispatcher.on("cleanSelection",((t,e,n)=>{const o=n.writer,i=o.document.selection;for(const t of i.getRanges())t.isCollapsed&&t.end.parent.isAttached()&&n.writer.mergeAttributes(t.start);o.setSelection(null)})),this.downcastDispatcher.on("selection",((t,e,n)=>{const o=e.selection;if(o.isCollapsed)return;if(!n.consumable.consume(o,"selection"))return;const i=[];for(const t of o.getRanges())i.push(n.mapper.toViewRange(t));n.writer.setSelection(i,{backward:o.isBackward})}),{priority:"low"}),this.downcastDispatcher.on("selection",((t,e,n)=>{const o=e.selection;if(!o.isCollapsed)return;if(!n.consumable.consume(o,"selection"))return;const i=n.writer,r=o.getFirstPosition(),s=n.mapper.toViewPosition(r),a=i.breakAttributes(s);i.setSelection(a)}),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using((t=>{if("$graveyard"==t.rootName)return null;const e=new ds(this.view.document,t.name);return e.rootName=t.rootName,this.mapper.bindElements(t,e),e}))}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(t){const e="string"==typeof t?t:t.name,n=this.model.markers.get(e);if(!n)throw new k("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:e});this.model.change((()=>{this.model.markers._refresh(n)}))}reconvertItem(t){this.model.change((()=>{this.model.document.differ._refreshItem(t)}))}}class Gl{constructor(){this._consumables=new Map}add(t,e){let n;t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!0):(this._consumables.has(t)?n=this._consumables.get(t):(n=new Wl(t),this._consumables.set(t,n)),n.add(e))}test(t,e){const n=this._consumables.get(t);return void 0===n?null:t.is("$text")||t.is("documentFragment")?n:n.test(e)}consume(t,e){return!!this.test(t,e)&&(t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!1):this._consumables.get(t).consume(e),!0)}revert(t,e){const n=this._consumables.get(t);void 0!==n&&(t.is("$text")||t.is("documentFragment")?this._consumables.set(t,!0):n.revert(e))}static consumablesFromElement(t){const e={element:t,name:!0,attributes:[],classes:[],styles:[]},n=t.getAttributeKeys();for(const t of n)"style"!=t&&"class"!=t&&e.attributes.push(t);const o=t.getClassNames();for(const t of o)e.classes.push(t);const i=t.getStyleNames();for(const t of i)e.styles.push(t);return e}static createFrom(t,e){if(e||(e=new Gl),t.is("$text"))return e.add(t),e;t.is("element")&&e.add(t,Gl.consumablesFromElement(t)),t.is("documentFragment")&&e.add(t);for(const n of t.getChildren())e=Gl.createFrom(n,e);return e}}const ql=["attributes","classes","styles"];class Wl{constructor(t){this.element=t,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(t){t.name&&(this._canConsumeName=!0);for(const e of ql)e in t&&this._add(e,t[e])}test(t){if(t.name&&!this._canConsumeName)return this._canConsumeName;for(const e of ql)if(e in t){const n=this._test(e,t[e]);if(!0!==n)return n}return!0}consume(t){t.name&&(this._canConsumeName=!1);for(const e of ql)e in t&&this._consume(e,t[e])}revert(t){t.name&&(this._canConsumeName=!0);for(const e of ql)e in t&&this._revert(e,t[e])}_add(t,e){const n=ut(e)?e:[e],o=this._consumables[t];for(const e of n){if("attributes"===t&&("class"===e||"style"===e))throw new k("viewconsumable-invalid-attribute",this);if(o.set(e,!0),"styles"===t)for(const t of this.element.document.stylesProcessor.getRelatedStyles(e))o.set(t,!0)}}_test(t,e){const n=ut(e)?e:[e],o=this._consumables[t];for(const e of n)if("attributes"!==t||"class"!==e&&"style"!==e){const t=o.get(e);if(void 0===t)return null;if(!t)return!1}else{const t="class"==e?"classes":"styles",n=this._test(t,[...this._consumables[t].keys()]);if(!0!==n)return n}return!0}_consume(t,e){const n=ut(e)?e:[e],o=this._consumables[t];for(const e of n)if("attributes"!==t||"class"!==e&&"style"!==e){if(o.set(e,!1),"styles"==t)for(const t of this.element.document.stylesProcessor.getRelatedStyles(e))o.set(t,!1)}else{const t="class"==e?"classes":"styles";this._consume(t,[...this._consumables[t].keys()])}}_revert(t,e){const n=ut(e)?e:[e],o=this._consumables[t];for(const e of n)if("attributes"!==t||"class"!==e&&"style"!==e){!1===o.get(e)&&o.set(e,!0)}else{const t="class"==e?"classes":"styles";this._revert(t,[...this._consumables[t].keys()])}}}class Kl extends(G()){constructor(){super(),this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",((t,e)=>{e[0]=new Yl(e[0])}),{priority:"highest"}),this.on("checkChild",((t,e)=>{e[0]=new Yl(e[0]),e[1]=this.getDefinition(e[1])}),{priority:"highest"})}register(t,e){if(this._sourceDefinitions[t])throw new k("schema-cannot-register-item-twice",this,{itemName:t});this._sourceDefinitions[t]=[Object.assign({},e)],this._clearCache()}extend(t,e){if(!this._sourceDefinitions[t])throw new k("schema-cannot-extend-missing-item",this,{itemName:t});this._sourceDefinitions[t].push(Object.assign({},e)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(t){let e;return e="string"==typeof t?t:"is"in t&&(t.is("$text")||t.is("$textProxy"))?"$text":t.name,this.getDefinitions()[e]}isRegistered(t){return!!this.getDefinition(t)}isBlock(t){const e=this.getDefinition(t);return!(!e||!e.isBlock)}isLimit(t){const e=this.getDefinition(t);return!!e&&!(!e.isLimit&&!e.isObject)}isObject(t){const e=this.getDefinition(t);return!!e&&!!(e.isObject||e.isLimit&&e.isSelectable&&e.isContent)}isInline(t){const e=this.getDefinition(t);return!(!e||!e.isInline)}isSelectable(t){const e=this.getDefinition(t);return!!e&&!(!e.isSelectable&&!e.isObject)}isContent(t){const e=this.getDefinition(t);return!!e&&!(!e.isContent&&!e.isObject)}checkChild(t,e){return!!e&&this._checkContextMatch(e,t)}checkAttribute(t,e){const n=this.getDefinition(t.last);return!!n&&n.allowAttributes.includes(e)}checkMerge(t,e){if(t instanceof Ec){const e=t.nodeBefore,n=t.nodeAfter;if(!(e instanceof vc))throw new k("schema-check-merge-no-element-before",this);if(!(n instanceof vc))throw new k("schema-check-merge-no-element-after",this);return this.checkMerge(e,n)}for(const n of e.getChildren())if(!this.checkChild(t,n))return!1;return!0}addChildCheck(t){this.on("checkChild",((e,[n,o])=>{if(!o)return;const i=t(n,o);"boolean"==typeof i&&(e.stop(),e.return=i)}),{priority:"high"})}addAttributeCheck(t){this.on("checkAttribute",((e,[n,o])=>{const i=t(n,o);"boolean"==typeof i&&(e.stop(),e.return=i)}),{priority:"high"})}setAttributeProperties(t,e){this._attributeProperties[t]=Object.assign(this.getAttributeProperties(t),e)}getAttributeProperties(t){return this._attributeProperties[t]||{}}getLimitElement(t){let e;if(t instanceof Ec)e=t.parent;else{e=(t instanceof Bc?[t]:Array.from(t.getRanges())).reduce(((t,e)=>{const n=e.getCommonAncestor();return t?t.getCommonAncestor(n,{includeSelf:!0}):n}),null)}for(;!this.isLimit(e)&&e.parent;)e=e.parent;return e}checkAttributeInSelection(t,e){if(t.isCollapsed){const n=[...t.getFirstPosition().getAncestors(),new Cc("",t.getAttributes())];return this.checkAttribute(n,e)}{const n=t.getRanges();for(const t of n)for(const n of t)if(this.checkAttribute(n.item,e))return!0}return!1}*getValidRanges(t,e){t=function*(t){for(const e of t)yield*e.getMinimalFlatRanges()}(t);for(const n of t)yield*this._getValidRangesForRange(n,e)}getNearestSelectionRange(t,e="both"){if("$graveyard"==t.root.rootName)return null;if(this.checkChild(t,"$text"))return new Bc(t);let n,o;const i=t.getAncestors().reverse().find((t=>this.isLimit(t)))||t.root;"both"!=e&&"backward"!=e||(n=new yc({boundaries:Bc._createIn(i),startPosition:t,direction:"backward"})),"both"!=e&&"forward"!=e||(o=new yc({boundaries:Bc._createIn(i),startPosition:t}));for(const t of function*(t,e){let n=!1;for(;!n;){if(n=!0,t){const e=t.next();e.done||(n=!1,yield{walker:t,value:e.value})}if(e){const t=e.next();t.done||(n=!1,yield{walker:e,value:t.value})}}}(n,o)){const e=t.walker==n?"elementEnd":"elementStart",o=t.value;if(o.type==e&&this.isObject(o.item))return Bc._createOn(o.item);if(this.checkChild(o.nextPosition,"$text"))return new Bc(o.nextPosition)}return null}findAllowedParent(t,e){let n=t.parent;for(;n;){if(this.checkChild(n,e))return n;if(this.isLimit(n))return null;n=n.parent}return null}setAllowedAttributes(t,e,n){const o=n.model;for(const[i,r]of Object.entries(e))o.schema.checkAttribute(t,i)&&n.setAttribute(i,r,t)}removeDisallowedAttributes(t,e){for(const n of t)if(n.is("$text"))ad(this,n,e);else{const t=Bc._createIn(n).getPositions();for(const n of t){ad(this,n.nodeBefore||n.parent,e)}}}getAttributesWithProperty(t,e,n){const o={};for(const[i,r]of t.getAttributes()){const t=this.getAttributeProperties(i);void 0!==t[e]&&(void 0!==n&&n!==t[e]||(o[i]=r))}return o}createContext(t){return new Yl(t)}_clearCache(){this._compiledDefinitions=null}_compile(){const t={},e=this._sourceDefinitions,n=Object.keys(e);for(const o of n)t[o]=$l(e[o],o);for(const e of n)Zl(t,e);for(const e of n)Ql(t,e);for(const e of n)Jl(t,e);for(const e of n)Xl(t,e),td(t,e);for(const e of n)ed(t,e),nd(t,e),od(t,e);this._compiledDefinitions=t}_checkContextMatch(t,e,n=e.length-1){const o=e.getItem(n);if(t.allowIn.includes(o.name)){if(0==n)return!0;{const t=this.getDefinition(o);return this._checkContextMatch(t,e,n-1)}}return!1}*_getValidRangesForRange(t,e){let n=t.start,o=t.start;for(const i of t.getItems({shallow:!0}))i.is("element")&&(yield*this._getValidRangesForRange(Bc._createIn(i),e)),this.checkAttribute(i,e)||(n.isEqual(o)||(yield new Bc(n,o)),n=Ec._createAfter(i)),o=Ec._createAfter(i);n.isEqual(o)||(yield new Bc(n,o))}}class Yl{constructor(t){if(t instanceof Yl)return t;let e;e="string"==typeof t?[t]:Array.isArray(t)?t:t.getAncestors({includeSelf:!0}),this._items=e.map(sd)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(t){const e=new Yl([t]);return e._items=[...this._items,...e._items],e}getItem(t){return this._items[t]}*getNames(){yield*this._items.map((t=>t.name))}endsWith(t){return Array.from(this.getNames()).join(" ").endsWith(t)}startsWith(t){return Array.from(this.getNames()).join(" ").startsWith(t)}}function $l(t,e){const n={name:e,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(t,e){for(const n of t){const t=Object.keys(n).filter((t=>t.startsWith("is")));for(const o of t)e[o]=!!n[o]}}(t,n),id(t,n,"allowIn"),id(t,n,"allowContentOf"),id(t,n,"allowWhere"),id(t,n,"allowAttributes"),id(t,n,"allowAttributesOf"),id(t,n,"allowChildren"),id(t,n,"inheritTypesFrom"),function(t,e){for(const n of t){const t=n.inheritAllFrom;t&&(e.allowContentOf.push(t),e.allowWhere.push(t),e.allowAttributesOf.push(t),e.inheritTypesFrom.push(t))}}(t,n),n}function Zl(t,e){const n=t[e];for(const o of n.allowChildren){const n=t[o];n&&n.allowIn.push(e)}n.allowChildren.length=0}function Ql(t,e){for(const n of t[e].allowContentOf)if(t[n]){rd(t,n).forEach((t=>{t.allowIn.push(e)}))}delete t[e].allowContentOf}function Jl(t,e){for(const n of t[e].allowWhere){const o=t[n];if(o){const n=o.allowIn;t[e].allowIn.push(...n)}}delete t[e].allowWhere}function Xl(t,e){for(const n of t[e].allowAttributesOf){const o=t[n];if(o){const n=o.allowAttributes;t[e].allowAttributes.push(...n)}}delete t[e].allowAttributesOf}function td(t,e){const n=t[e];for(const e of n.inheritTypesFrom){const o=t[e];if(o){const t=Object.keys(o).filter((t=>t.startsWith("is")));for(const e of t)e in n||(n[e]=o[e])}}delete n.inheritTypesFrom}function ed(t,e){const n=t[e],o=n.allowIn.filter((e=>t[e]));n.allowIn=Array.from(new Set(o))}function nd(t,e){const n=t[e];for(const o of n.allowIn){t[o].allowChildren.push(e)}}function od(t,e){const n=t[e];n.allowAttributes=Array.from(new Set(n.allowAttributes))}function id(t,e,n){for(const o of t){const t=o[n];"string"==typeof t?e[n].push(t):Array.isArray(t)&&e[n].push(...t)}}function rd(t,e){const n=t[e];return(o=t,Object.keys(o).map((t=>o[t]))).filter((t=>t.allowIn.includes(n.name)));var o}function sd(t){return"string"==typeof t||t.is("documentFragment")?{name:"string"==typeof t?t:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:t.is("element")?t.name:"$text",*getAttributeKeys(){yield*t.getAttributeKeys()},getAttribute:e=>t.getAttribute(e)}}function ad(t,e,n){for(const o of e.getAttributeKeys())t.checkAttribute(e,o)||n.removeAttribute(o,e)}var cd=Object.defineProperty,ld=Object.defineProperties,dd=Object.getOwnPropertyDescriptors,hd=Object.getOwnPropertySymbols,ud=Object.prototype.hasOwnProperty,gd=Object.prototype.propertyIsEnumerable,pd=(t,e,n)=>e in t?cd(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class md extends(S()){constructor(t){var e;super(),this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi=(e=((t,e)=>{for(var n in e||(e={}))ud.call(e,n)&&pd(t,n,e[n]);if(hd)for(var n of hd(e))gd.call(e,n)&&pd(t,n,e[n]);return t})({},t),ld(e,dd({consumable:null,writer:null,store:null,convertItem:(t,e)=>this._convertItem(t,e),convertChildren:(t,e)=>this._convertChildren(t,e),safeInsert:(t,e)=>this._safeInsert(t,e),updateConversionResult:(t,e)=>this._updateConversionResult(t,e),splitToAllowedParent:(t,e)=>this._splitToAllowedParent(t,e),getSplitParts:t=>this._getSplitParts(t),keepEmptyElement:t=>this._keepEmptyElement(t)})))}convert(t,e,n=["$root"]){this.fire("viewCleanup",t),this._modelCursor=function(t,e){let n;for(const o of new Yl(t)){const t={};for(const e of o.getAttributeKeys())t[e]=o.getAttribute(e);const i=e.createElement(o.name,t);n&&e.insert(i,n),n=Ec._createAt(i,0)}return n}(n,e),this.conversionApi.writer=e,this.conversionApi.consumable=Gl.createFrom(t),this.conversionApi.store={};const{modelRange:o}=this._convertItem(t,this._modelCursor),i=e.createDocumentFragment();if(o){this._removeEmptyElements();for(const t of Array.from(this._modelCursor.parent.getChildren()))e.append(t,i);i.markers=function(t,e){const n=new Set,o=new Map,i=Bc._createIn(t).getItems();for(const t of i)t.is("element","$marker")&&n.add(t);for(const t of n){const n=t.getAttribute("data-name"),i=e.createPositionBefore(t);o.has(n)?o.get(n).end=i.clone():o.set(n,new Bc(i.clone())),e.remove(t)}return o}(i,e)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,i}_convertItem(t,e){const n={viewItem:t,modelCursor:e,modelRange:null};if(t.is("element")?this.fire(`element:${t.name}`,n,this.conversionApi):t.is("$text")?this.fire("text",n,this.conversionApi):this.fire("documentFragment",n,this.conversionApi),n.modelRange&&!(n.modelRange instanceof Bc))throw new k("view-conversion-dispatcher-incorrect-result",this);return{modelRange:n.modelRange,modelCursor:n.modelCursor}}_convertChildren(t,e){let n=e.is("position")?e:Ec._createAt(e,0);const o=new Bc(n);for(const e of Array.from(t.getChildren())){const t=this._convertItem(e,n);t.modelRange instanceof Bc&&(o.end=t.modelRange.end,n=t.modelCursor)}return{modelRange:o,modelCursor:n}}_safeInsert(t,e){const n=this._splitToAllowedParent(t,e);return!!n&&(this.conversionApi.writer.insert(t,n.position),!0)}_updateConversionResult(t,e){const n=this._getSplitParts(t),o=this.conversionApi.writer;e.modelRange||(e.modelRange=o.createRange(o.createPositionBefore(t),o.createPositionAfter(n[n.length-1])));const i=this._cursorParents.get(t);e.modelCursor=i?o.createPositionAt(i,0):e.modelRange.end}_splitToAllowedParent(t,e){const{schema:n,writer:o}=this.conversionApi;let i=n.findAllowedParent(e,t);if(i){if(i===e.parent)return{position:e};this._modelCursor.parent.getAncestors().includes(i)&&(i=null)}if(!i)return vl(e,t,n)?{position:yl(e,o)}:null;const r=this.conversionApi.writer.split(e,i),s=[];for(const t of r.range.getWalker())if("elementEnd"==t.type)s.push(t.item);else{const e=s.pop(),n=t.item;this._registerSplitPair(e,n)}const a=r.range.end.parent;return this._cursorParents.set(t,a),{position:r.position,cursorParent:a}}_registerSplitPair(t,e){this._splitParts.has(t)||this._splitParts.set(t,[t]);const n=this._splitParts.get(t);this._splitParts.set(e,n),n.push(e)}_getSplitParts(t){let e;return e=this._splitParts.has(t)?this._splitParts.get(t):[t],e}_keepEmptyElement(t){this._emptyElementsToKeep.add(t)}_removeEmptyElements(){let t=!1;for(const e of this._splitParts.keys())e.isEmpty&&!this._emptyElementsToKeep.has(e)&&(this.conversionApi.writer.remove(e),this._splitParts.delete(e),t=!0);t&&this._removeEmptyElements()}}class fd{getHtml(t){const e=document.implementation.createHTMLDocument("").createElement("div");return e.appendChild(t),e.innerHTML}}class kd{constructor(t){this.skipComments=!0,this.domParser=new DOMParser,this.domConverter=new ma(t,{renderingMode:"data"}),this.htmlWriter=new fd}toData(t){const e=this.domConverter.viewToDom(t);return this.htmlWriter.getHtml(e)}toView(t){const e=this._toDom(t);return this.domConverter.domToView(e,{skipComments:this.skipComments})}registerRawContentMatcher(t){this.domConverter.registerRawContentMatcher(t)}useFillerType(t){this.domConverter.blockFillerMode="marked"==t?"markedNbsp":"nbsp"}_toDom(t){t.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(t=`${t}`);const e=this.domParser.parseFromString(t,"text/html"),n=e.createDocumentFragment(),o=e.body.childNodes;for(;o.length>0;)n.appendChild(o[0]);return n}}class bd extends(S()){constructor(t,e){super(),this.model=t,this.mapper=new Nc,this.downcastDispatcher=new qc({mapper:this.mapper,schema:t.schema}),this.downcastDispatcher.on("insert:$text",((t,e,n)=>{if(!n.consumable.consume(e.item,t.name))return;const o=n.writer,i=n.mapper.toViewPosition(e.range.start),r=o.createText(e.item.data);o.insert(i,r)}),{priority:"lowest"}),this.downcastDispatcher.on("insert",((t,e,n)=>{n.convertAttributes(e.item),e.reconversion||!e.item.is("element")||e.item.isEmpty||n.convertChildren(e.item)}),{priority:"lowest"}),this.upcastDispatcher=new md({schema:t.schema}),this.viewDocument=new ys(e),this.stylesProcessor=e,this.htmlProcessor=new kd(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new Os(this.viewDocument),this.upcastDispatcher.on("text",((t,e,{schema:n,consumable:o,writer:i})=>{let r=e.modelCursor;if(!o.test(e.viewItem))return;if(!n.checkChild(r,"$text")){if(!vl(r,"$text",n))return;if(0==e.viewItem.data.trim().length)return;const t=r.nodeBefore;r=yl(r,i),t&&t.is("element","$marker")&&(i.move(i.createRangeOn(t),r),r=i.createPositionAfter(t))}o.consume(e.viewItem);const s=i.createText(e.viewItem.data);i.insert(s,r),e.modelRange=i.createRange(r,r.getShiftedBy(s.offsetSize)),e.modelCursor=e.modelRange.end}),{priority:"lowest"}),this.upcastDispatcher.on("element",((t,e,n)=>{if(!e.modelRange&&n.consumable.consume(e.viewItem,{name:!0})){const{modelRange:t,modelCursor:o}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t,e.modelCursor=o}}),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",((t,e,n)=>{if(!e.modelRange&&n.consumable.consume(e.viewItem,{name:!0})){const{modelRange:t,modelCursor:o}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t,e.modelCursor=o}}),{priority:"lowest"}),G().prototype.decorate.call(this,"init"),G().prototype.decorate.call(this,"set"),G().prototype.decorate.call(this,"get"),G().prototype.decorate.call(this,"toView"),G().prototype.decorate.call(this,"toModel"),this.on("init",(()=>{this.fire("ready")}),{priority:"lowest"}),this.on("ready",(()=>{this.model.enqueueChange({isUndoable:!1},_l)}),{priority:"lowest"})}get(t={}){const{rootName:e="main",trim:n="empty"}=t;if(!this._checkIfRootsExists([e]))throw new k("datacontroller-get-non-existent-root",this);const o=this.model.document.getRoot(e);return o.isAttached()||b("datacontroller-get-detached-root",this),"empty"!==n||this.model.hasContent(o,{ignoreWhitespaces:!0})?this.stringify(o,t):""}stringify(t,e={}){const n=this.toView(t,e);return this.processor.toData(n)}toView(t,e={}){const n=this.viewDocument,o=this._viewWriter;this.mapper.clearBindings();const i=Bc._createIn(t),r=new zs(n);this.mapper.bindElements(t,r);const s=t.is("documentFragment")?t.markers:function(t){const e=[],n=t.root.document;if(!n)return new Map;const o=Bc._createIn(t);for(const t of n.model.markers){const n=t.getRange(),i=n.isCollapsed,r=n.start.isEqual(o.start)||n.end.isEqual(o.end);if(i&&r)e.push([t.name,n]);else{const i=o.getIntersection(n);i&&e.push([t.name,i])}}return e.sort((([t,e],[n,o])=>{if("after"!==e.end.compareWith(o.start))return 1;if("before"!==e.start.compareWith(o.end))return-1;switch(e.start.compareWith(o.start)){case"before":return 1;case"after":return-1;default:switch(e.end.compareWith(o.end)){case"before":return 1;case"after":return-1;default:return n.localeCompare(t)}}})),new Map(e)}(t);return this.downcastDispatcher.convert(i,s,o,e),r}init(t){if(this.model.document.version)throw new k("datacontroller-init-document-not-empty",this);let e={};if("string"==typeof t?e.main=t:e=t,!this._checkIfRootsExists(Object.keys(e)))throw new k("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},(t=>{for(const n of Object.keys(e)){const o=this.model.document.getRoot(n);t.insert(this.parse(e[n],o),o,0)}})),Promise.resolve()}set(t,e={}){let n={};if("string"==typeof t?n.main=t:n=t,!this._checkIfRootsExists(Object.keys(n)))throw new k("datacontroller-set-non-existent-root",this);this.model.enqueueChange(e.batchType||{},(t=>{t.setSelection(null),t.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const e of Object.keys(n)){const o=this.model.document.getRoot(e);t.remove(t.createRangeIn(o)),t.insert(this.parse(n[e],o),o,0)}}))}parse(t,e="$root"){const n=this.processor.toView(t);return this.toModel(n,e)}toModel(t,e="$root"){return this.model.change((n=>this.upcastDispatcher.convert(t,n,e)))}addStyleProcessorRules(t){t(this.stylesProcessor)}registerRawContentMatcher(t){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(t),this.htmlProcessor.registerRawContentMatcher(t)}destroy(){this.stopListening()}_checkIfRootsExists(t){for(const e of t)if(!this.model.document.getRoot(e))return!1;return!0}}class wd{constructor(t,e){this._helpers=new Map,this._downcast=bi(t),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=bi(e),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(t,e){const n=this._downcast.includes(e);if(!this._upcast.includes(e)&&!n)throw new k("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:t,dispatchers:[e],isDowncast:n})}for(t){if(!this._helpers.has(t))throw new k("conversion-for-unknown-group",this);return this._helpers.get(t)}elementToElement(t){this.for("downcast").elementToElement(t);for(const{model:e,view:n}of Ad(t))this.for("upcast").elementToElement({model:e,view:n,converterPriority:t.converterPriority})}attributeToElement(t){this.for("downcast").attributeToElement(t);for(const{model:e,view:n}of Ad(t))this.for("upcast").elementToAttribute({view:n,model:e,converterPriority:t.converterPriority})}attributeToAttribute(t){this.for("downcast").attributeToAttribute(t);for(const{model:e,view:n}of Ad(t))this.for("upcast").attributeToAttribute({view:n,model:e})}_createConversionHelpers({name:t,dispatchers:e,isDowncast:n}){if(this._helpers.has(t))throw new k("conversion-group-exists",this);const o=n?new ll(e):new Bl(e);this._helpers.set(t,o)}}function*Ad(t){if(t.model.values)for(const e of t.model.values){const n={key:t.model.key,value:e},o=t.view[e],i=t.upcastAlso?t.upcastAlso[e]:void 0;yield*Cd(n,o,i)}else yield*Cd(t.model,t.view,t.upcastAlso)}function*Cd(t,e,n){if(yield{model:t,view:e},n)for(const e of bi(n))yield{model:t,view:e}}class _d{constructor(t){this.baseVersion=t,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const t=Object.assign({},this);return t.__className=this.constructor.className,delete t.batch,delete t.isDocumentOperation,t}static get className(){return"Operation"}static fromJSON(t,e){return new this(t.baseVersion)}}function vd(t,e){const n=Ed(e),o=n.reduce(((t,e)=>t+e.offsetSize),0),i=t.parent;Id(t);const r=t.index;return i._insertChild(r,n),Dd(i,r+n.length),Dd(i,r),new Bc(t,t.getShiftedBy(o))}function yd(t){if(!t.isFlat)throw new k("operation-utils-remove-range-not-flat",this);const e=t.start.parent;Id(t.start),Id(t.end);const n=e._removeChildren(t.start.index,t.end.index-t.start.index);return Dd(e,t.start.index),n}function xd(t,e){if(!t.isFlat)throw new k("operation-utils-move-range-not-flat",this);const n=yd(t);return vd(e=e._getTransformedByDeletion(t.start,t.end.offset-t.start.offset),n)}function Ed(t){const e=[];!function t(n){if("string"==typeof n)e.push(new Cc(n));else if(n instanceof _c)e.push(new Cc(n.data,n.getAttributes()));else if(n instanceof wc)e.push(n);else if(J(n))for(const e of n)t(e)}(t);for(let t=1;tt.maxOffset)throw new k("move-operation-nodes-do-not-exist",this);if(t===e&&n=n&&this.targetPosition.path[t]t._clone(!0)))),e=new Td(this.position,t,this.baseVersion);return e.shouldReceiveAttributes=this.shouldReceiveAttributes,e}getReversed(){const t=this.position.root.document.graveyard,e=new Ec(t,[0]);return new Md(this.position,this.nodes.maxOffset,e,this.baseVersion+1)}_validate(){const t=this.position.parent;if(!t||t.maxOffsett._clone(!0)))),vd(this.position,t)}toJSON(){const t=super.toJSON();return t.position=this.position.toJSON(),t.nodes=this.nodes.toJSON(),t}static get className(){return"InsertOperation"}static fromJSON(t,e){const n=[];for(const e of t.nodes)e.name?n.push(vc.fromJSON(e)):n.push(Cc.fromJSON(e));const o=new Td(Ec.fromJSON(t.position,e),n,t.baseVersion);return o.shouldReceiveAttributes=t.shouldReceiveAttributes,o}}class Bd extends _d{constructor(t,e,n,o,i){super(i),this.splitPosition=t.clone(),this.splitPosition.stickiness="toNext",this.howMany=e,this.insertionPosition=n,this.graveyardPosition=o?o.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const t=this.insertionPosition.path.slice();return t.push(0),new Ec(this.insertionPosition.root,t)}get movedRange(){const t=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Bc(this.splitPosition,t)}get affectedSelectable(){const t=[Bc._createFromPositionAndShift(this.splitPosition,0),Bc._createFromPositionAndShift(this.insertionPosition,0)];return this.graveyardPosition&&t.push(Bc._createFromPositionAndShift(this.graveyardPosition,0)),t}clone(){return new Bd(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const t=this.splitPosition.root.document.graveyard,e=new Ec(t,[0]);return new Nd(this.moveTargetPosition,this.howMany,this.splitPosition,e,this.baseVersion+1)}_validate(){const t=this.splitPosition.parent,e=this.splitPosition.offset;if(!t||t.maxOffset{if(t.key===e.key&&t.range.start.hasSameParentAs(e.range.start)){const o=t.range.getDifference(e.range).map((e=>new Od(e,t.key,t.oldValue,t.newValue,0))),i=t.range.getIntersection(e.range);return i&&n.aIsStrong&&o.push(new Od(i,e.key,e.newValue,t.newValue,0)),0==o.length?[new Ld(0)]:o}return[t]})),Gd(Od,Td,((t,e)=>{if(t.range.start.hasSameParentAs(e.position)&&t.range.containsPosition(e.position)){const n=t.range._getTransformedByInsertion(e.position,e.howMany,!e.shouldReceiveAttributes).map((e=>new Od(e,t.key,t.oldValue,t.newValue,t.baseVersion)));if(e.shouldReceiveAttributes){const o=Qd(e,t.key,t.oldValue);o&&n.unshift(o)}return n}return t.range=t.range._getTransformedByInsertion(e.position,e.howMany,!1)[0],[t]})),Gd(Od,Nd,((t,e)=>{const n=[];t.range.start.hasSameParentAs(e.deletionPosition)&&(t.range.containsPosition(e.deletionPosition)||t.range.start.isEqual(e.deletionPosition))&&n.push(Bc._createFromPositionAndShift(e.graveyardPosition,1));const o=t.range._getTransformedByMergeOperation(e);return o.isCollapsed||n.push(o),n.map((e=>new Od(e,t.key,t.oldValue,t.newValue,t.baseVersion)))})),Gd(Od,Md,((t,e)=>{const n=function(t,e){const n=Bc._createFromPositionAndShift(e.sourcePosition,e.howMany);let o=null,i=[];n.containsRange(t,!0)?o=t:t.start.hasSameParentAs(n.start)?(i=t.getDifference(n),o=t.getIntersection(n)):i=[t];const r=[];for(let t of i){t=t._getTransformedByDeletion(e.sourcePosition,e.howMany);const n=e.getMovedRangeStart(),o=t.start.hasSameParentAs(n),i=t._getTransformedByInsertion(n,e.howMany,o);r.push(...i)}o&&r.push(o._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany,!1)[0]);return r}(t.range,e);return n.map((e=>new Od(e,t.key,t.oldValue,t.newValue,t.baseVersion)))})),Gd(Od,Bd,((t,e)=>{if(t.range.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.range.end.offset++,[t];if(t.range.start.hasSameParentAs(e.splitPosition)&&t.range.containsPosition(e.splitPosition)){const n=t.clone();return n.range=new Bc(e.moveTargetPosition.clone(),t.range.end._getCombined(e.splitPosition,e.moveTargetPosition)),t.range.end=e.splitPosition.clone(),t.range.end.stickiness="toPrevious",[t,n]}return t.range=t.range._getTransformedBySplitOperation(e),[t]})),Gd(Td,Od,((t,e)=>{const n=[t];if(t.shouldReceiveAttributes&&t.position.hasSameParentAs(e.range.start)&&e.range.containsPosition(t.position)){const o=Qd(t,e.key,e.newValue);o&&n.push(o)}return n})),Gd(Td,Td,((t,e,n)=>(t.position.isEqual(e.position)&&n.aIsStrong||(t.position=t.position._getTransformedByInsertOperation(e)),[t]))),Gd(Td,Md,((t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t]))),Gd(Td,Bd,((t,e)=>(t.position=t.position._getTransformedBySplitOperation(e),[t]))),Gd(Td,Nd,((t,e)=>(t.position=t.position._getTransformedByMergeOperation(e),[t]))),Gd(Pd,Td,((t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByInsertOperation(e)[0]),t.newRange&&(t.newRange=t.newRange._getTransformedByInsertOperation(e)[0]),[t]))),Gd(Pd,Pd,((t,e,n)=>{if(t.name==e.name){if(!n.aIsStrong)return[new Ld(0)];t.oldRange=e.newRange?e.newRange.clone():null}return[t]})),Gd(Pd,Nd,((t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByMergeOperation(e)),t.newRange&&(t.newRange=t.newRange._getTransformedByMergeOperation(e)),[t]))),Gd(Pd,Md,((t,e,n)=>{if(t.oldRange&&(t.oldRange=Bc._createFromRanges(t.oldRange._getTransformedByMoveOperation(e))),t.newRange){if(n.abRelation){const o=Bc._createFromRanges(t.newRange._getTransformedByMoveOperation(e));if("left"==n.abRelation.side&&e.targetPosition.isEqual(t.newRange.start))return t.newRange.end=o.end,t.newRange.start.path=n.abRelation.path,[t];if("right"==n.abRelation.side&&e.targetPosition.isEqual(t.newRange.end))return t.newRange.start=o.start,t.newRange.end.path=n.abRelation.path,[t]}t.newRange=Bc._createFromRanges(t.newRange._getTransformedByMoveOperation(e))}return[t]})),Gd(Pd,Bd,((t,e,n)=>{if(t.oldRange&&(t.oldRange=t.oldRange._getTransformedBySplitOperation(e)),t.newRange){if(n.abRelation){const o=t.newRange._getTransformedBySplitOperation(e);return t.newRange.start.isEqual(e.splitPosition)&&n.abRelation.wasStartBeforeMergedElement?t.newRange.start=Ec._createAt(e.insertionPosition):t.newRange.start.isEqual(e.splitPosition)&&!n.abRelation.wasInLeftElement&&(t.newRange.start=Ec._createAt(e.moveTargetPosition)),t.newRange.end.isEqual(e.splitPosition)&&n.abRelation.wasInRightElement?t.newRange.end=Ec._createAt(e.moveTargetPosition):t.newRange.end.isEqual(e.splitPosition)&&n.abRelation.wasEndBeforeMergedElement?t.newRange.end=Ec._createAt(e.insertionPosition):t.newRange.end=o.end,[t]}t.newRange=t.newRange._getTransformedBySplitOperation(e)}return[t]})),Gd(Nd,Td,((t,e)=>(t.sourcePosition.hasSameParentAs(e.position)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByInsertOperation(e),t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e),[t]))),Gd(Nd,Nd,((t,e,n)=>{if(t.sourcePosition.isEqual(e.sourcePosition)&&t.targetPosition.isEqual(e.targetPosition)){if(n.bWasUndone){const n=e.graveyardPosition.path.slice();return n.push(0),t.sourcePosition=new Ec(e.graveyardPosition.root,n),t.howMany=0,[t]}return[new Ld(0)]}if(t.sourcePosition.isEqual(e.sourcePosition)&&!t.targetPosition.isEqual(e.targetPosition)&&!n.bWasUndone&&"splitAtSource"!=n.abRelation){const o="$graveyard"==t.targetPosition.root.rootName,i="$graveyard"==e.targetPosition.root.rootName;if(i&&!o||!(o&&!i)&&n.aIsStrong){const n=e.targetPosition._getTransformedByMergeOperation(e),o=t.targetPosition._getTransformedByMergeOperation(e);return[new Md(n,t.howMany,o,0)]}return[new Ld(0)]}return t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByMergeOperation(e),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),t.graveyardPosition.isEqual(e.graveyardPosition)&&n.aIsStrong||(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]})),Gd(Nd,Md,((t,e,n)=>{const o=Bc._createFromPositionAndShift(e.sourcePosition,e.howMany);return"remove"==e.type&&!n.bWasUndone&&!n.forceWeakRemove&&t.deletionPosition.hasSameParentAs(e.sourcePosition)&&o.containsPosition(t.sourcePosition)?[new Ld(0)]:(t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition.hasSameParentAs(e.sourcePosition)&&(t.howMany-=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByMoveOperation(e),t.targetPosition=t.targetPosition._getTransformedByMoveOperation(e),t.graveyardPosition.isEqual(e.targetPosition)||(t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)),[t])})),Gd(Nd,Bd,((t,e,n)=>{if(e.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByDeletion(e.graveyardPosition,1),t.deletionPosition.isEqual(e.graveyardPosition)&&(t.howMany=e.howMany)),t.targetPosition.isEqual(e.splitPosition)){const o=0!=e.howMany,i=e.graveyardPosition&&t.deletionPosition.isEqual(e.graveyardPosition);if(o||i||"mergeTargetNotMoved"==n.abRelation)return t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),[t]}if(t.sourcePosition.isEqual(e.splitPosition)){if("mergeSourceNotMoved"==n.abRelation)return t.howMany=0,t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t];if("mergeSameElement"==n.abRelation||t.sourcePosition.offset>0)return t.sourcePosition=e.moveTargetPosition.clone(),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]}return t.sourcePosition.hasSameParentAs(e.splitPosition)&&(t.howMany=e.splitPosition.offset),t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]})),Gd(Md,Td,((t,e)=>{const n=Bc._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByInsertOperation(e,!1)[0];return t.sourcePosition=n.start,t.howMany=n.end.offset-n.start.offset,t.targetPosition.isEqual(e.position)||(t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e)),[t]})),Gd(Md,Md,((t,e,n)=>{const o=Bc._createFromPositionAndShift(t.sourcePosition,t.howMany),i=Bc._createFromPositionAndShift(e.sourcePosition,e.howMany);let r,s=n.aIsStrong,a=!n.aIsStrong;if("insertBefore"==n.abRelation||"insertAfter"==n.baRelation?a=!0:"insertAfter"!=n.abRelation&&"insertBefore"!=n.baRelation||(a=!1),r=t.targetPosition.isEqual(e.targetPosition)&&a?t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany):t.targetPosition._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),Jd(t,e)&&Jd(e,t))return[e.getReversed()];if(o.containsPosition(e.targetPosition)&&o.containsRange(i,!0))return o.start=o.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),o.end=o.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),Xd([o],r);if(i.containsPosition(t.targetPosition)&&i.containsRange(o,!0))return o.start=o.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),o.end=o.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),Xd([o],r);const c=Q(t.sourcePosition.getParentPath(),e.sourcePosition.getParentPath());if("prefix"==c||"extension"==c)return o.start=o.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),o.end=o.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),Xd([o],r);"remove"!=t.type||"remove"==e.type||n.aWasUndone||n.forceWeakRemove?"remove"==t.type||"remove"!=e.type||n.bWasUndone||n.forceWeakRemove||(s=!1):s=!0;const l=[],d=o.getDifference(i);for(const t of d){t.start=t.start._getTransformedByDeletion(e.sourcePosition,e.howMany),t.end=t.end._getTransformedByDeletion(e.sourcePosition,e.howMany);const n="same"==Q(t.start.getParentPath(),e.getMovedRangeStart().getParentPath()),o=t._getTransformedByInsertion(e.getMovedRangeStart(),e.howMany,n);l.push(...o)}const h=o.getIntersection(i);return null!==h&&s&&(h.start=h.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),h.end=h.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),0===l.length?l.push(h):1==l.length?i.start.isBefore(o.start)||i.start.isEqual(o.start)?l.unshift(h):l.push(h):l.splice(1,0,h)),0===l.length?[new Ld(t.baseVersion)]:Xd(l,r)})),Gd(Md,Bd,((t,e,n)=>{let o=t.targetPosition.clone();t.targetPosition.isEqual(e.insertionPosition)&&e.graveyardPosition&&"moveTargetAfter"!=n.abRelation||(o=t.targetPosition._getTransformedBySplitOperation(e));const i=Bc._createFromPositionAndShift(t.sourcePosition,t.howMany);if(i.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.howMany++,t.targetPosition=o,[t];if(i.start.hasSameParentAs(e.splitPosition)&&i.containsPosition(e.splitPosition)){let t=new Bc(e.splitPosition,i.end);t=t._getTransformedBySplitOperation(e);return Xd([new Bc(i.start,e.splitPosition),t],o)}t.targetPosition.isEqual(e.splitPosition)&&"insertAtSource"==n.abRelation&&(o=e.moveTargetPosition),t.targetPosition.isEqual(e.insertionPosition)&&"insertBetween"==n.abRelation&&(o=t.targetPosition);const r=[i._getTransformedBySplitOperation(e)];if(e.graveyardPosition){const o=i.start.isEqual(e.graveyardPosition)||i.containsPosition(e.graveyardPosition);t.howMany>1&&o&&!n.aWasUndone&&r.push(Bc._createFromPositionAndShift(e.insertionPosition,1))}return Xd(r,o)})),Gd(Md,Nd,((t,e,n)=>{const o=Bc._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.deletionPosition.hasSameParentAs(t.sourcePosition)&&o.containsPosition(e.sourcePosition))if("remove"!=t.type||n.forceWeakRemove){if(1==t.howMany)return n.bWasUndone?(t.sourcePosition=e.graveyardPosition.clone(),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]):[new Ld(0)]}else if(!n.aWasUndone){const n=[];let o=e.graveyardPosition.clone(),i=e.targetPosition._getTransformedByMergeOperation(e);t.howMany>1&&(n.push(new Md(t.sourcePosition,t.howMany-1,t.targetPosition,0)),o=o._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1),i=i._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1));const r=e.deletionPosition._getCombined(t.sourcePosition,t.targetPosition),s=new Md(o,1,r,0),a=s.getMovedRangeStart().path.slice();a.push(0);const c=new Ec(s.targetPosition.root,a);i=i._getTransformedByMove(o,r,1);const l=new Md(i,e.howMany,c,0);return n.push(s),n.push(l),n}const i=Bc._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByMergeOperation(e);return t.sourcePosition=i.start,t.howMany=i.end.offset-i.start.offset,t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]})),Gd(jd,Td,((t,e)=>(t.position=t.position._getTransformedByInsertOperation(e),[t]))),Gd(jd,Nd,((t,e)=>t.position.isEqual(e.deletionPosition)?(t.position=e.graveyardPosition.clone(),t.position.stickiness="toNext",[t]):(t.position=t.position._getTransformedByMergeOperation(e),[t]))),Gd(jd,Md,((t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t]))),Gd(jd,jd,((t,e,n)=>{if(t.position.isEqual(e.position)){if(!n.aIsStrong)return[new Ld(0)];t.oldName=e.newName}return[t]})),Gd(jd,Bd,((t,e)=>{if("same"==Q(t.position.path,e.splitPosition.getParentPath())&&!e.graveyardPosition){const e=new jd(t.position.getShiftedBy(1),t.oldName,t.newName,0);return[t,e]}return t.position=t.position._getTransformedBySplitOperation(e),[t]})),Gd(Rd,Rd,((t,e,n)=>{if(t.root===e.root&&t.key===e.key){if(!n.aIsStrong||t.newValue===e.newValue)return[new Ld(0)];t.oldValue=e.newValue}return[t]})),Gd(Fd,Fd,((t,e)=>t.rootName===e.rootName&&t.isAdd===e.isAdd?[new Ld(0)]:[t])),Gd(Bd,Td,((t,e)=>(t.splitPosition.hasSameParentAs(e.position)&&t.splitPosition.offset{if(!t.graveyardPosition&&!n.bWasUndone&&t.splitPosition.hasSameParentAs(e.sourcePosition)){const n=e.graveyardPosition.path.slice();n.push(0);const o=new Ec(e.graveyardPosition.root,n),i=Bd.getInsertionPosition(new Ec(e.graveyardPosition.root,n)),r=new Bd(o,0,i,null,0);return t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=Bd.getInsertionPosition(t.splitPosition),t.graveyardPosition=r.insertionPosition.clone(),t.graveyardPosition.stickiness="toNext",[r,t]}return t.splitPosition.hasSameParentAs(e.deletionPosition)&&!t.splitPosition.isAfter(e.deletionPosition)&&t.howMany--,t.splitPosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=Bd.getInsertionPosition(t.splitPosition),t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]})),Gd(Bd,Md,((t,e,n)=>{const o=Bc._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.graveyardPosition){const i=o.start.isEqual(t.graveyardPosition)||o.containsPosition(t.graveyardPosition);if(!n.bWasUndone&&i){const n=t.splitPosition._getTransformedByMoveOperation(e),o=t.graveyardPosition._getTransformedByMoveOperation(e),i=o.path.slice();i.push(0);const r=new Ec(o.root,i);return[new Md(n,t.howMany,r,0)]}t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)}const i=t.splitPosition.isEqual(e.targetPosition);if(i&&("insertAtSource"==n.baRelation||"splitBefore"==n.abRelation))return t.howMany+=e.howMany,t.splitPosition=t.splitPosition._getTransformedByDeletion(e.sourcePosition,e.howMany),t.insertionPosition=Bd.getInsertionPosition(t.splitPosition),[t];if(i&&n.abRelation&&n.abRelation.howMany){const{howMany:e,offset:o}=n.abRelation;return t.howMany+=e,t.splitPosition=t.splitPosition.getShiftedBy(o),[t]}if(t.splitPosition.hasSameParentAs(e.sourcePosition)&&o.containsPosition(t.splitPosition)){const n=e.howMany-(t.splitPosition.offset-e.sourcePosition.offset);return t.howMany-=n,t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset{if(t.splitPosition.isEqual(e.splitPosition)){if(!t.graveyardPosition&&!e.graveyardPosition)return[new Ld(0)];if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition))return[new Ld(0)];if("splitBefore"==n.abRelation)return t.howMany=0,t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e),[t]}if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition)){const o="$graveyard"==t.splitPosition.root.rootName,i="$graveyard"==e.splitPosition.root.rootName;if(i&&!o||!(o&&!i)&&n.aIsStrong){const n=[];return e.howMany&&n.push(new Md(e.moveTargetPosition,e.howMany,e.splitPosition,0)),t.howMany&&n.push(new Md(t.splitPosition,t.howMany,t.moveTargetPosition,0)),n}return[new Ld(0)]}if(t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e)),t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==n.abRelation)return t.howMany++,[t];if(e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==n.baRelation){const n=e.insertionPosition.path.slice();n.push(0);const o=new Ec(e.insertionPosition.root,n);return[t,new Md(t.insertionPosition,1,o,0)]}return t.splitPosition.hasSameParentAs(e.splitPosition)&&t.splitPosition.offset{const n=e[0];n.isDocumentOperation&&nh.call(this,n)}),{priority:"low"})}function nh(t){const e=this.getTransformedByOperation(t);if(!this.isEqual(e)){const t=this.toPosition();this.path=e.path,this.root=e.root,this.fire("change",t)}}th.prototype.is=function(t){return"livePosition"===t||"model:livePosition"===t||"position"==t||"model:position"===t};class oh{constructor(t={}){"string"==typeof t&&(t="transparent"===t?{isUndoable:!1}:{},b("batch-constructor-deprecated-string-type"));const{isUndoable:e=!0,isLocal:n=!0,isUndo:o=!1,isTyping:i=!1}=t;this.operations=[],this.isUndoable=e,this.isLocal=n,this.isUndo=o,this.isTyping=i}get type(){return b("batch-type-deprecated"),"default"}get baseVersion(){for(const t of this.operations)if(null!==t.baseVersion)return t.baseVersion;return null}addOperation(t){return t.batch=this,this.operations.push(t),t}}var ih=Object.defineProperty,rh=Object.defineProperties,sh=Object.getOwnPropertyDescriptors,ah=Object.getOwnPropertySymbols,ch=Object.prototype.hasOwnProperty,lh=Object.prototype.propertyIsEnumerable,dh=(t,e,n)=>e in t?ih(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,hh=(t,e)=>{for(var n in e||(e={}))ch.call(e,n)&&dh(t,n,e[n]);if(ah)for(var n of ah(e))lh.call(e,n)&&dh(t,n,e[n]);return t};class uh{constructor(t){this._changesInElement=new Map,this._elementSnapshots=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=t}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size&&0==this._changedRoots.size}bufferOperation(t){const e=t;switch(e.type){case"insert":if(this._isInInsertedElement(e.position.parent))return;this._markInsert(e.position.parent,e.position.offset,e.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const t of e.range.getItems({shallow:!0}))this._isInInsertedElement(t.parent)||this._markAttribute(t);break;case"remove":case"move":case"reinsert":{if(e.sourcePosition.isEqual(e.targetPosition)||e.sourcePosition.getShiftedBy(e.howMany).isEqual(e.targetPosition))return;const t=this._isInInsertedElement(e.sourcePosition.parent),n=this._isInInsertedElement(e.targetPosition.parent);t||this._markRemove(e.sourcePosition.parent,e.sourcePosition.offset,e.howMany),n||this._markInsert(e.targetPosition.parent,e.getMovedRangeStart().offset,e.howMany);break}case"rename":{if(this._isInInsertedElement(e.position.parent))return;this._markRemove(e.position.parent,e.position.offset,1),this._markInsert(e.position.parent,e.position.offset,1);const t=Bc._createFromPositionAndShift(e.position,1);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}break}case"split":{const t=e.splitPosition.parent;this._isInInsertedElement(t)||this._markRemove(t,e.splitPosition.offset,e.howMany),this._isInInsertedElement(e.insertionPosition.parent)||this._markInsert(e.insertionPosition.parent,e.insertionPosition.offset,1),e.graveyardPosition&&this._markRemove(e.graveyardPosition.parent,e.graveyardPosition.offset,1);break}case"merge":{const t=e.sourcePosition.parent;this._isInInsertedElement(t.parent)||this._markRemove(t.parent,t.startOffset,1);const n=e.graveyardPosition.parent;this._markInsert(n,e.graveyardPosition.offset,1);const o=e.targetPosition.parent;this._isInInsertedElement(o)||this._markInsert(o,e.targetPosition.offset,t.maxOffset);break}case"detachRoot":case"addRoot":{const t=e.affectedSelectable;if(!t._isLoaded)return;if(t.isAttached()==e.isAdd)return;this._bufferRootStateChange(e.rootName,e.isAdd);break}case"addRootAttribute":case"removeRootAttribute":case"changeRootAttribute":{if(!e.root._isLoaded)return;const t=e.root.rootName;this._bufferRootAttributeChange(t,e.key,e.oldValue,e.newValue);break}}this._cachedChanges=null}bufferMarkerChange(t,e,n){e.range&&e.range.root.is("rootElement")&&!e.range.root._isLoaded&&(e.range=null),n.range&&n.range.root.is("rootElement")&&!n.range.root._isLoaded&&(n.range=null);let o=this._changedMarkers.get(t);o?o.newMarkerData=n:(o={newMarkerData:n,oldMarkerData:e},this._changedMarkers.set(t,o)),null==o.oldMarkerData.range&&null==n.range&&this._changedMarkers.delete(t)}getMarkersToRemove(){const t=[];for(const[e,n]of this._changedMarkers)null!=n.oldMarkerData.range&&t.push({name:e,range:n.oldMarkerData.range});return t}getMarkersToAdd(){const t=[];for(const[e,n]of this._changedMarkers)null!=n.newMarkerData.range&&t.push({name:e,range:n.newMarkerData.range});return t}getChangedMarkers(){return Array.from(this._changedMarkers).map((([t,e])=>({name:t,data:{oldRange:e.oldMarkerData.range,newRange:e.newMarkerData.range}})))}hasDataChanges(){if(this._changesInElement.size>0)return!0;if(this._changedRoots.size>0)return!0;for(const{newMarkerData:t,oldMarkerData:e}of this._changedMarkers.values()){if(t.affectsData!==e.affectsData)return!0;if(t.affectsData){const n=t.range&&!e.range,o=!t.range&&e.range,i=t.range&&e.range&&!t.range.isEqual(e.range);if(n||o||i)return!0}}return!1}getChanges(t={}){if(this._cachedChanges)return t.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let e=[];for(const t of this._changesInElement.keys()){const n=this._changesInElement.get(t).sort(((t,e)=>t.offset===e.offset?t.type!=e.type?"remove"==t.type?-1:1:0:t.offsett.position.root!=e.position.root?t.position.root.rootNamet));for(const t of e)delete t.changeCount,"attribute"==t.type&&(delete t.position,delete t.length);return this._changeCount=0,this._cachedChangesWithGraveyard=e,this._cachedChanges=e.filter(mh),t.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getChangedRoots(){return Array.from(this._changedRoots.values()).map((t=>{const e=hh({},t);return void 0!==e.state&&delete e.attributes,e}))}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._changedRoots.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_bufferRootStateChange(t,e){if(!this._changedRoots.has(t))return void this._changedRoots.set(t,{name:t,state:e?"attached":"detached"});const n=this._changedRoots.get(t);void 0!==n.state?(delete n.state,void 0===n.attributes&&this._changedRoots.delete(t)):n.state=e?"attached":"detached"}_bufferRootAttributeChange(t,e,n,o){const i=this._changedRoots.get(t)||{name:t},r=i.attributes||{};if(r[e]){const t=r[e];o===t.oldValue?delete r[e]:t.newValue=o}else r[e]={oldValue:n,newValue:o};0===Object.entries(r).length?(delete i.attributes,void 0===i.state&&this._changedRoots.delete(t)):(i.attributes=r,this._changedRoots.set(t,i))}_refreshItem(t){if(this._isInInsertedElement(t.parent))return;this._markRemove(t.parent,t.startOffset,t.offsetSize),this._markInsert(t.parent,t.startOffset,t.offsetSize),this._refreshedItems.add(t);const e=Bc._createOn(t);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}this._cachedChanges=null}_bufferRootLoad(t){if(t.isAttached()){this._bufferRootStateChange(t.rootName,!0),this._markInsert(t,0,t.maxOffset);for(const e of t.getAttributeKeys())this._bufferRootAttributeChange(t.rootName,e,null,t.getAttribute(e));for(const n of this._markerCollection)if(n.getRange().root==t){const t=n.getData();this.bufferMarkerChange(n.name,(e=hh({},t),rh(e,sh({range:null}))),t)}var e}}_markInsert(t,e,n){if(t.root.is("rootElement")&&!t.root._isLoaded)return;const o={type:"insert",offset:e,howMany:n,count:this._changeCount++};this._markChange(t,o)}_markRemove(t,e,n){if(t.root.is("rootElement")&&!t.root._isLoaded)return;const o={type:"remove",offset:e,howMany:n,count:this._changeCount++};this._markChange(t,o),this._removeAllNestedChanges(t,e,n)}_markAttribute(t){if(t.root.is("rootElement")&&!t.root._isLoaded)return;const e={type:"attribute",offset:t.startOffset,howMany:t.offsetSize,count:this._changeCount++};this._markChange(t.parent,e)}_markChange(t,e){this._makeSnapshot(t);const n=this._getChangesForElement(t);this._handleChange(e,n),n.push(e);for(let t=0;tn.offset){if(o>i){const t={type:"attribute",offset:i,howMany:o-i,count:this._changeCount++};this._handleChange(t,e),e.push(t)}t.nodesToHandle=n.offset-t.offset,t.howMany=t.nodesToHandle}else t.offset>=n.offset&&t.offseti?(t.nodesToHandle=o-i,t.offset=i):t.nodesToHandle=0);if("remove"==n.type&&t.offsetn.offset){const i={type:"attribute",offset:n.offset,howMany:o-n.offset,count:this._changeCount++};this._handleChange(i,e),e.push(i),t.nodesToHandle=n.offset-t.offset,t.howMany=t.nodesToHandle}"attribute"==n.type&&(t.offset>=n.offset&&o<=i?(t.nodesToHandle=0,t.howMany=0,t.offset=0):t.offset<=n.offset&&o>=i&&(n.howMany=0))}}t.howMany=t.nodesToHandle,delete t.nodesToHandle}_getInsertDiff(t,e,n){return{type:"insert",position:Ec._createAt(t,e),name:n.name,attributes:new Map(n.attributes),length:1,changeCount:this._changeCount++}}_getRemoveDiff(t,e,n){return{type:"remove",position:Ec._createAt(t,e),name:n.name,attributes:new Map(n.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(t,e,n){const o=[];n=new Map(n);for(const[i,r]of e){const e=n.has(i)?n.get(i):null;e!==r&&o.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:i,attributeOldValue:r,attributeNewValue:e,changeCount:this._changeCount++}),n.delete(i)}for(const[e,i]of n)o.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:e,attributeOldValue:null,attributeNewValue:i,changeCount:this._changeCount++});return o}_isInInsertedElement(t){const e=t.parent;if(!e)return!1;const n=this._changesInElement.get(e),o=t.startOffset;if(n)for(const t of n)if("insert"==t.type&&o>=t.offset&&oo){for(let e=0;ethis._version+1&&this._gaps.set(this._version,t),this._version=t}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(t){if(t.baseVersion!==this.version)throw new k("model-document-history-addoperation-incorrect-version",this,{operation:t,historyVersion:this.version});this._operations.push(t),this._version++,this._baseVersionToOperationIndex.set(t.baseVersion,this._operations.length-1)}getOperations(t,e=this.version){if(!this._operations.length)return[];const n=this._operations[0];void 0===t&&(t=n.baseVersion);let o=e-1;for(const[e,n]of this._gaps)t>e&&te&&othis.lastOperation.baseVersion)return[];let i=this._baseVersionToOperationIndex.get(t);void 0===i&&(i=0);let r=this._baseVersionToOperationIndex.get(o);return void 0===r&&(r=this._operations.length-1),this._operations.slice(i,r+1)}getOperation(t){const e=this._baseVersionToOperationIndex.get(t);if(void 0!==e)return this._operations[e]}setOperationAsUndone(t,e){this._undoPairs.set(e,t),this._undoneOperations.add(t)}isUndoingOperation(t){return this._undoPairs.has(t)}isUndoneOperation(t){return this._undoneOperations.has(t)}getUndoneOperation(t){return this._undoPairs.get(t)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}class kh extends vc{constructor(t,e,n="main"){super(e),this._isAttached=!0,this._isLoaded=!0,this._document=t,this.rootName=n}get document(){return this._document}isAttached(){return this._isAttached}toJSON(){return this.rootName}}kh.prototype.is=function(t,e){return e?e===this.name&&("rootElement"===t||"model:rootElement"===t||"element"===t||"model:element"===t):"rootElement"===t||"model:rootElement"===t||"element"===t||"model:element"===t||"node"===t||"model:node"===t};var bh=Object.defineProperty,wh=Object.defineProperties,Ah=Object.getOwnPropertyDescriptors,Ch=Object.getOwnPropertySymbols,_h=Object.prototype.hasOwnProperty,vh=Object.prototype.propertyIsEnumerable,yh=(t,e,n)=>e in t?bh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xh=(t,e)=>{for(var n in e||(e={}))_h.call(e,n)&&yh(t,n,e[n]);if(Ch)for(var n of Ch(e))vh.call(e,n)&&yh(t,n,e[n]);return t},Eh=(t,e)=>wh(t,Ah(e));const Dh="$graveyard";class Ih extends(S()){constructor(t){super(),this.model=t,this.history=new fh,this.selection=new rl(this),this.roots=new vi({idProperty:"rootName"}),this.differ=new uh(t.markers),this.isReadOnly=!1,this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",Dh),this.listenTo(t,"applyOperation",((t,e)=>{const n=e[0];n.isDocumentOperation&&this.differ.bufferOperation(n)}),{priority:"high"}),this.listenTo(t,"applyOperation",((t,e)=>{const n=e[0];n.isDocumentOperation&&this.history.addOperation(n)}),{priority:"low"}),this.listenTo(this.selection,"change",(()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(t.markers,"update",((t,e,n,o,i)=>{const r=Eh(xh({},e.getData()),{range:o});this.differ.bufferMarkerChange(e.name,i,r),null===n&&e.on("change",((t,n)=>{const o=e.getData();this.differ.bufferMarkerChange(e.name,Eh(xh({},o),{range:n}),o)}))})),this.registerPostFixer((t=>{let e=!1;for(const n of this.roots)n.isAttached()||n.isEmpty||(t.remove(t.createRangeIn(n)),e=!0);for(const n of this.model.markers)n.getRange().root.isAttached()||(t.removeMarker(n),e=!0);return e}))}get version(){return this.history.version}set version(t){this.history.version=t}get graveyard(){return this.getRoot(Dh)}createRoot(t="$root",e="main"){if(this.roots.get(e))throw new k("model-document-createroot-name-exists",this,{name:e});const n=new kh(this,t,e);return this.roots.add(n),n}destroy(){this.selection.destroy(),this.stopListening()}getRoot(t="main"){return this.roots.get(t)}getRootNames(t=!1){return this.getRoots(t).map((t=>t.rootName))}getRoots(t=!1){return Array.from(this.roots).filter((e=>e!=this.graveyard&&(t||e.isAttached())&&e._isLoaded))}registerPostFixer(t){this._postFixers.add(t)}toJSON(){const t=tr(this);return t.selection="[engine.model.DocumentSelection]",t.model="[engine.model.Model]",t}_handleChangeBlock(t){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(t),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",t.batch):this.fire("change",t.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){const t=this.getRoots();return t.length?t[0]:this.graveyard}_getDefaultRange(){const t=this._getDefaultRoot(),e=this.model,n=e.schema,o=e.createPositionFromPath(t,[0]);return n.getNearestSelectionRange(o)||e.createRange(o)}_validateSelectionRange(t){return Sh(t.start)&&Sh(t.end)}_callPostFixers(t){let e=!1;do{for(const n of this._postFixers)if(this.selection.refresh(),e=n(t),e)break}while(e)}}function Sh(t){const e=t.textNode;if(e){const n=e.data,o=t.offset-e.startOffset;return!Si(n,o)&&!Mi(n,o)}return!0}var Mh=Object.defineProperty,Th=Object.defineProperties,Bh=Object.getOwnPropertyDescriptors,Nh=Object.getOwnPropertySymbols,Ph=Object.prototype.hasOwnProperty,zh=Object.prototype.propertyIsEnumerable,Oh=(t,e,n)=>e in t?Mh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class Lh extends(S()){constructor(){super(...arguments),this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(t){const e=t instanceof jh?t.name:t;return this._markers.has(e)}get(t){return this._markers.get(t)||null}_set(t,e,n=!1,o=!1){const i=t instanceof jh?t.name:t;if(i.includes(","))throw new k("markercollection-incorrect-marker-name",this);const r=this._markers.get(i);if(r){const t=r.getData(),s=r.getRange();let a=!1;return s.isEqual(e)||(r._attachLiveRange(el.fromRange(e)),a=!0),n!=r.managedUsingOperations&&(r._managedUsingOperations=n,a=!0),"boolean"==typeof o&&o!=r.affectsData&&(r._affectsData=o,a=!0),a&&this.fire(`update:${i}`,r,s,e,t),r}const s=el.fromRange(e),a=new jh(i,s,n,o);var c;return this._markers.set(i,a),this.fire(`update:${i}`,a,null,e,(c=((t,e)=>{for(var n in e||(e={}))Ph.call(e,n)&&Oh(t,n,e[n]);if(Nh)for(var n of Nh(e))zh.call(e,n)&&Oh(t,n,e[n]);return t})({},a.getData()),Th(c,Bh({range:null})))),a}_remove(t){const e=t instanceof jh?t.name:t,n=this._markers.get(e);return!!n&&(this._markers.delete(e),this.fire(`update:${e}`,n,n.getRange(),null,n.getData()),this._destroyMarker(n),!0)}_refresh(t){const e=t instanceof jh?t.name:t,n=this._markers.get(e);if(!n)throw new k("markercollection-refresh-marker-not-exists",this);const o=n.getRange();this.fire(`update:${e}`,n,o,o,n.getData())}*getMarkersAtPosition(t){for(const e of this)e.getRange().containsPosition(t)&&(yield e)}*getMarkersIntersectingRange(t){for(const e of this)null!==e.getRange().getIntersection(t)&&(yield e)}destroy(){for(const t of this._markers.values())this._destroyMarker(t);this._markers=null,this.stopListening()}*getMarkersGroup(t){for(const e of this._markers.values())e.name.startsWith(t+":")&&(yield e)}_destroyMarker(t){t.stopListening(),t._detachLiveRange()}}class jh extends(S(bc)){constructor(t,e,n,o){super(),this.name=t,this._liveRange=this._attachLiveRange(e),this._managedUsingOperations=n,this._affectsData=o}get managedUsingOperations(){if(!this._liveRange)throw new k("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new k("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new k("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new k("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new k("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(t){return this._liveRange&&this._detachLiveRange(),t.delegate("change:range").to(this),t.delegate("change:content").to(this),this._liveRange=t,t}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}jh.prototype.is=function(t){return"marker"===t||"model:marker"===t};class Rh extends _d{constructor(t,e){super(null),this.sourcePosition=t.clone(),this.howMany=e}get type(){return"detach"}get affectedSelectable(){return null}toJSON(){const t=super.toJSON();return t.sourcePosition=this.sourcePosition.toJSON(),t}_validate(){if(this.sourcePosition.root.document)throw new k("detach-operation-on-document-node",this)}_execute(){yd(Bc._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class Fh extends bc{constructor(t){super(),this.markers=new Map,this._children=new Ac,t&&this._insertChild(0,t)}[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(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}getPath(){return[]}getNodeByPath(t){let e=this;for(const n of t)e=e.getChild(e.offsetToIndex(n));return e}offsetToIndex(t){return this._children.offsetToIndex(t)}toJSON(){const t=[];for(const e of this._children)t.push(e.toJSON());return t}static fromJSON(t){const e=[];for(const n of t)n.name?e.push(vc.fromJSON(n)):e.push(Cc.fromJSON(n));return new Fh(e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const n=function(t){if("string"==typeof t)return[new Cc(t)];J(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new Cc(t):t instanceof _c?new Cc(t.data,t.getAttributes()):t))}(e);for(const t of n)null!==t.parent&&t._remove(),t.parent=this;this._children._insertNodes(t,n)}_removeChildren(t,e=1){const n=this._children._removeNodes(t,e);for(const t of n)t.parent=null;return n}}Fh.prototype.is=function(t){return"documentFragment"===t||"model:documentFragment"===t};class Vh{constructor(t,e){this.model=t,this.batch=e}createText(t,e){return new Cc(t,e)}createElement(t,e){return new vc(t,e)}createDocumentFragment(){return new Fh}cloneElement(t,e=!0){return t._clone(e)}insert(t,e,n=0){if(this._assertWriterUsedCorrectly(),t instanceof Cc&&""==t.data)return;const o=Ec._createAt(e,n);if(t.parent){if(Wh(t.root,o.root))return void this.move(Bc._createOn(t),o);if(t.root.document)throw new k("model-writer-insert-forbidden-move",this);this.remove(t)}const i=o.root.document?o.root.document.version:null,r=new Td(o,t,i);if(t instanceof Cc&&(r.shouldReceiveAttributes=!0),this.batch.addOperation(r),this.model.applyOperation(r),t instanceof Fh)for(const[e,n]of t.markers){const t=Ec._createAt(n.root,0),i={range:new Bc(n.start._getCombined(t,o),n.end._getCombined(t,o)),usingOperation:!0,affectsData:!0};this.model.markers.has(e)?this.updateMarker(e,i):this.addMarker(e,i)}}insertText(t,e,n,o){e instanceof Fh||e instanceof vc||e instanceof Ec?this.insert(this.createText(t),e,n):this.insert(this.createText(t,e),n,o)}insertElement(t,e,n,o){e instanceof Fh||e instanceof vc||e instanceof Ec?this.insert(this.createElement(t),e,n):this.insert(this.createElement(t,e),n,o)}append(t,e){this.insert(t,e,"end")}appendText(t,e,n){e instanceof Fh||e instanceof vc?this.insert(this.createText(t),e,"end"):this.insert(this.createText(t,e),n,"end")}appendElement(t,e,n){e instanceof Fh||e instanceof vc?this.insert(this.createElement(t),e,"end"):this.insert(this.createElement(t,e),n,"end")}setAttribute(t,e,n){if(this._assertWriterUsedCorrectly(),n instanceof Bc){const o=n.getMinimalFlatRanges();for(const n of o)Uh(this,t,e,n)}else Hh(this,t,e,n)}setAttributes(t,e){for(const[n,o]of Di(t))this.setAttribute(n,o,e)}removeAttribute(t,e){if(this._assertWriterUsedCorrectly(),e instanceof Bc){const n=e.getMinimalFlatRanges();for(const e of n)Uh(this,t,null,e)}else Hh(this,t,null,e)}clearAttributes(t){this._assertWriterUsedCorrectly();const e=t=>{for(const e of t.getAttributeKeys())this.removeAttribute(e,t)};if(t instanceof Bc)for(const n of t.getItems())e(n);else e(t)}move(t,e,n){if(this._assertWriterUsedCorrectly(),!(t instanceof Bc))throw new k("writer-move-invalid-range",this);if(!t.isFlat)throw new k("writer-move-range-not-flat",this);const o=Ec._createAt(e,n);if(o.isEqual(t.start))return;if(this._addOperationForAffectedMarkers("move",t),!Wh(t.root,o.root))throw new k("writer-move-different-document",this);const i=t.root.document?t.root.document.version:null,r=new Md(t.start,t.end.offset-t.start.offset,o,i);this.batch.addOperation(r),this.model.applyOperation(r)}remove(t){this._assertWriterUsedCorrectly();const e=(t instanceof Bc?t:Bc._createOn(t)).getMinimalFlatRanges().reverse();for(const t of e)this._addOperationForAffectedMarkers("move",t),qh(t.start,t.end.offset-t.start.offset,this.batch,this.model)}merge(t){this._assertWriterUsedCorrectly();const e=t.nodeBefore,n=t.nodeAfter;if(this._addOperationForAffectedMarkers("merge",t),!(e instanceof vc))throw new k("writer-merge-no-element-before",this);if(!(n instanceof vc))throw new k("writer-merge-no-element-after",this);t.root.document?this._merge(t):this._mergeDetached(t)}createPositionFromPath(t,e,n){return this.model.createPositionFromPath(t,e,n)}createPositionAt(t,e){return this.model.createPositionAt(t,e)}createPositionAfter(t){return this.model.createPositionAfter(t)}createPositionBefore(t){return this.model.createPositionBefore(t)}createRange(t,e){return this.model.createRange(t,e)}createRangeIn(t){return this.model.createRangeIn(t)}createRangeOn(t){return this.model.createRangeOn(t)}createSelection(...t){return this.model.createSelection(...t)}_mergeDetached(t){const e=t.nodeBefore,n=t.nodeAfter;this.move(Bc._createIn(n),Ec._createAt(e,"end")),this.remove(n)}_merge(t){const e=Ec._createAt(t.nodeBefore,"end"),n=Ec._createAt(t.nodeAfter,0),o=t.root.document.graveyard,i=new Ec(o,[0]),r=t.root.document.version,s=new Nd(n,t.nodeAfter.maxOffset,e,i,r);this.batch.addOperation(s),this.model.applyOperation(s)}rename(t,e){if(this._assertWriterUsedCorrectly(),!(t instanceof vc))throw new k("writer-rename-not-element-instance",this);const n=t.root.document?t.root.document.version:null,o=new jd(Ec._createBefore(t),t.name,e,n);this.batch.addOperation(o),this.model.applyOperation(o)}split(t,e){this._assertWriterUsedCorrectly();let n,o,i=t.parent;if(!i.parent)throw new k("writer-split-element-no-parent",this);if(e||(e=i.parent),!t.parent.getAncestors({includeSelf:!0}).includes(e))throw new k("writer-split-invalid-limit-element",this);do{const e=i.root.document?i.root.document.version:null,r=i.maxOffset-t.offset,s=Bd.getInsertionPosition(t),a=new Bd(t,r,s,null,e);this.batch.addOperation(a),this.model.applyOperation(a),n||o||(n=i,o=t.parent.nextSibling),i=(t=this.createPositionAfter(t.parent)).parent}while(i!==e);return{position:t,range:new Bc(Ec._createAt(n,"end"),Ec._createAt(o,0))}}wrap(t,e){if(this._assertWriterUsedCorrectly(),!t.isFlat)throw new k("writer-wrap-range-not-flat",this);const n=e instanceof vc?e:new vc(e);if(n.childCount>0)throw new k("writer-wrap-element-not-empty",this);if(null!==n.parent)throw new k("writer-wrap-element-attached",this);this.insert(n,t.start);const o=new Bc(t.start.getShiftedBy(1),t.end.getShiftedBy(1));this.move(o,Ec._createAt(n,0))}unwrap(t){if(this._assertWriterUsedCorrectly(),null===t.parent)throw new k("writer-unwrap-element-no-parent",this);this.move(Bc._createIn(t),this.createPositionAfter(t)),this.remove(t)}addMarker(t,e){if(this._assertWriterUsedCorrectly(),!e||"boolean"!=typeof e.usingOperation)throw new k("writer-addmarker-no-usingoperation",this);const n=e.usingOperation,o=e.range,i=void 0!==e.affectsData&&e.affectsData;if(this.model.markers.has(t))throw new k("writer-addmarker-marker-exists",this);if(!o)throw new k("writer-addmarker-no-range",this);return n?(Gh(this,t,null,o,i),this.model.markers.get(t)):this.model.markers._set(t,o,n,i)}updateMarker(t,e){this._assertWriterUsedCorrectly();const n="string"==typeof t?t:t.name,o=this.model.markers.get(n);if(!o)throw new k("writer-updatemarker-marker-not-exists",this);if(!e)return b("writer-updatemarker-reconvert-using-editingcontroller",{markerName:n}),void this.model.markers._refresh(o);const i="boolean"==typeof e.usingOperation,r="boolean"==typeof e.affectsData,s=r?e.affectsData:o.affectsData;if(!i&&!e.range&&!r)throw new k("writer-updatemarker-wrong-options",this);const a=o.getRange(),c=e.range?e.range:a;i&&e.usingOperation!==o.managedUsingOperations?e.usingOperation?Gh(this,n,null,c,s):(Gh(this,n,a,null,s),this.model.markers._set(n,c,void 0,s)):o.managedUsingOperations?Gh(this,n,a,c,s):this.model.markers._set(n,c,void 0,s)}removeMarker(t){this._assertWriterUsedCorrectly();const e="string"==typeof t?t:t.name;if(!this.model.markers.has(e))throw new k("writer-removemarker-no-marker",this);const n=this.model.markers.get(e);if(!n.managedUsingOperations)return void this.model.markers._remove(e);Gh(this,e,n.getRange(),null,n.affectsData)}addRoot(t,e="$root"){this._assertWriterUsedCorrectly();const n=this.model.document.getRoot(t);if(n&&n.isAttached())throw new k("writer-addroot-root-exists",this);const o=this.model.document,i=new Fd(t,e,!0,o,o.version);return this.batch.addOperation(i),this.model.applyOperation(i),this.model.document.getRoot(t)}detachRoot(t){this._assertWriterUsedCorrectly();const e="string"==typeof t?this.model.document.getRoot(t):t;if(!e||!e.isAttached())throw new k("writer-detachroot-no-root",this);for(const t of this.model.markers)t.getRange().root===e&&this.removeMarker(t);for(const t of e.getAttributeKeys())this.removeAttribute(t,e);this.remove(this.createRangeIn(e));const n=this.model.document,o=new Fd(e.rootName,e.name,!1,n,n.version);this.batch.addOperation(o),this.model.applyOperation(o)}setSelection(...t){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...t)}setSelectionFocus(t,e){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(t,e)}setSelectionAttribute(t,e){if(this._assertWriterUsedCorrectly(),"string"==typeof t)this._setSelectionAttribute(t,e);else for(const[e,n]of Di(t))this._setSelectionAttribute(e,n)}removeSelectionAttribute(t){if(this._assertWriterUsedCorrectly(),"string"==typeof t)this._removeSelectionAttribute(t);else for(const e of t)this._removeSelectionAttribute(e)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(t){this.model.document.selection._restoreGravity(t)}_setSelectionAttribute(t,e){const n=this.model.document.selection;if(n.isCollapsed&&n.anchor.parent.isEmpty){const o=rl._getStoreAttributeKey(t);this.setAttribute(o,e,n.anchor.parent)}n._setAttribute(t,e)}_removeSelectionAttribute(t){const e=this.model.document.selection;if(e.isCollapsed&&e.anchor.parent.isEmpty){const n=rl._getStoreAttributeKey(t);this.removeAttribute(n,e.anchor.parent)}e._removeAttribute(t)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new k("writer-incorrect-use",this)}_addOperationForAffectedMarkers(t,e){for(const n of this.model.markers){if(!n.managedUsingOperations)continue;const o=n.getRange();let i=!1;if("move"===t){const t=e;i=t.containsPosition(o.start)||t.start.isEqual(o.start)||t.containsPosition(o.end)||t.end.isEqual(o.end)}else{const t=e,n=t.nodeBefore,r=t.nodeAfter,s=o.start.parent==n&&o.start.isAtEnd,a=o.end.parent==r&&0==o.end.offset,c=o.end.nodeAfter==r,l=o.start.nodeAfter==r;i=s||a||c||l}i&&this.updateMarker(n.name,{range:o})}}}function Uh(t,e,n,o){const i=t.model,r=i.document;let s,a,c,l=o.start;for(const t of o.getWalker({shallow:!0}))c=t.item.getAttribute(e),s&&a!=c&&(a!=n&&d(),l=s),s=t.nextPosition,a=c;function d(){const o=new Bc(l,s),c=o.root.document?r.version:null,d=new Od(o,e,a,n,c);t.batch.addOperation(d),i.applyOperation(d)}s instanceof Ec&&s!=l&&a!=n&&d()}function Hh(t,e,n,o){const i=t.model,r=i.document,s=o.getAttribute(e);let a,c;if(s!=n){if(o.root===o){const t=o.document?r.version:null;c=new Rd(o,e,s,n,t)}else{a=new Bc(Ec._createBefore(o),t.createPositionAfter(o));const i=a.root.document?r.version:null;c=new Od(a,e,s,n,i)}t.batch.addOperation(c),i.applyOperation(c)}}function Gh(t,e,n,o,i){const r=t.model,s=r.document,a=new Pd(e,n,o,r.markers,!!i,s.version);t.batch.addOperation(a),r.applyOperation(a)}function qh(t,e,n,o){let i;if(t.root.document){const n=o.document,r=new Ec(n.graveyard,[0]);i=new Md(t,e,r,n.version)}else i=new Rh(t,e);n.addOperation(i),o.applyOperation(i)}function Wh(t,e){return t===e||t instanceof kh&&e instanceof kh}function Kh(t,e,n={}){if(e.isCollapsed)return;const o=e.getFirstRange();if("$graveyard"==o.root.rootName)return;const i=t.schema;t.change((t=>{if(!n.doNotResetEntireContent&&function(t,e){const n=t.getLimitElement(e);if(!e.containsEntireContent(n))return!1;const o=e.getFirstRange();if(o.start.parent==o.end.parent)return!1;return t.checkChild(n,"paragraph")}(i,e))return void function(t,e){const n=t.model.schema.getLimitElement(e);t.remove(t.createRangeIn(n)),Qh(t,t.createPositionAt(n,0),e)}(t,e);const r={};if(!n.doNotAutoparagraph){const t=e.getSelectedElement();t&&Object.assign(r,i.getAttributesWithProperty(t,"copyOnReplace",!0))}const[s,a]=function(t){const e=t.root.document.model,n=t.start;let o=t.end;if(e.hasContent(t,{ignoreMarkers:!0})){const n=function(t){const e=t.parent,n=e.root.document.model.schema,o=e.getAncestors({parentFirst:!0,includeSelf:!0});for(const t of o){if(n.isLimit(t))return null;if(n.isBlock(t))return t}}(o);if(n&&o.isTouching(e.createPositionAt(n,0))){const n=e.createSelection(t);e.modifySelection(n,{direction:"backward"});const i=n.getLastPosition(),r=e.createRange(i,o);e.hasContent(r,{ignoreMarkers:!0})||(o=i)}}return[th.fromPosition(n,"toPrevious"),th.fromPosition(o,"toNext")]}(o);s.isTouching(a)||t.remove(t.createRange(s,a)),n.leaveUnmerged||(!function(t,e,n){const o=t.model;if(!Zh(t.model.schema,e,n))return;const[i,r]=function(t,e){const n=t.getAncestors(),o=e.getAncestors();let i=0;for(;n[i]&&n[i]==o[i];)i++;return[n[i],o[i]]}(e,n);if(!i||!r)return;!o.hasContent(i,{ignoreMarkers:!0})&&o.hasContent(r,{ignoreMarkers:!0})?$h(t,e,n,i.parent):Yh(t,e,n,i.parent)}(t,s,a),i.removeDisallowedAttributes(s.parent.getChildren(),t)),Jh(t,e,s),!n.doNotAutoparagraph&&function(t,e){const n=t.checkChild(e,"$text"),o=t.checkChild(e,"paragraph");return!n&&o}(i,s)&&Qh(t,s,e,r),s.detach(),a.detach()}))}function Yh(t,e,n,o){const i=e.parent,r=n.parent;if(i!=o&&r!=o){for(e=t.createPositionAfter(i),(n=t.createPositionBefore(r)).isEqual(e)||t.insert(r,e),t.merge(e);n.parent.isEmpty;){const e=n.parent;n=t.createPositionBefore(e),t.remove(e)}Zh(t.model.schema,e,n)&&Yh(t,e,n,o)}}function $h(t,e,n,o){const i=e.parent,r=n.parent;if(i!=o&&r!=o){for(e=t.createPositionAfter(i),(n=t.createPositionBefore(r)).isEqual(e)||t.insert(i,n);e.parent.isEmpty;){const n=e.parent;e=t.createPositionBefore(n),t.remove(n)}n=t.createPositionBefore(r),function(t,e){const n=e.nodeBefore,o=e.nodeAfter;n.name!=o.name&&t.rename(n,o.name);t.clearAttributes(n),t.setAttributes(Object.fromEntries(o.getAttributes()),n),t.merge(e)}(t,n),Zh(t.model.schema,e,n)&&$h(t,e,n,o)}}function Zh(t,e,n){const o=e.parent,i=n.parent;return o!=i&&(!t.isLimit(o)&&!t.isLimit(i)&&function(t,e,n){const o=new Bc(t,e);for(const t of o.getWalker())if(n.isLimit(t.item))return!1;return!0}(e,n,t))}function Qh(t,e,n,o={}){const i=t.createElement("paragraph");t.model.schema.setAllowedAttributes(i,o,t),t.insert(i,e),Jh(t,n,t.createPositionAt(i,0))}function Jh(t,e,n){e instanceof rl?t.setSelection(n):e.setTo(n)}function Xh(t,e){const n=[];Array.from(t.getItems({direction:"backward"})).map((t=>e.createRangeOn(t))).filter((e=>(e.start.isAfter(t.start)||e.start.isEqual(t.start))&&(e.end.isBefore(t.end)||e.end.isEqual(t.end)))).forEach((t=>{n.push(t.start.parent),e.remove(t)})),n.forEach((t=>{let n=t;for(;n.parent&&n.isEmpty;){const t=e.createRangeOn(n);n=n.parent,e.remove(t)}}))}class tu{constructor(t,e,n){this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null,this._nodeToSelect=null,this.model=t,this.writer=e,this.position=n,this.canMergeWith=new Set([this.position.parent]),this.schema=t.schema,this._documentFragment=e.createDocumentFragment(),this._documentFragmentPosition=e.createPositionAt(this._documentFragment,0)}handleNodes(t){for(const e of Array.from(t))this._handleNode(e);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(t){const e=this.writer.createPositionAfter(this._lastNode),n=this.writer.createPositionAfter(t);if(n.isAfter(e)){if(this._lastNode=t,this.position.parent!=t||!this.position.isAtEnd)throw new k("insertcontent-invalid-insertion-position",this);this.position=n,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?Bc._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new Bc(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(t){if(this.schema.isObject(t))return void this._handleObject(t);let e=this._checkAndAutoParagraphToAllowedPosition(t);e||(e=this._checkAndSplitToAllowedPosition(t),e)?(this._appendToFragment(t),this._firstNode||(this._firstNode=t),this._lastNode=t):this._handleDisallowedNode(t)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const t=th.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=t.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=t.toPosition(),t.detach()}_handleObject(t){this._checkAndSplitToAllowedPosition(t)?this._appendToFragment(t):this._tryAutoparagraphing(t)}_handleDisallowedNode(t){t.is("element")?this.handleNodes(t.getChildren()):this._tryAutoparagraphing(t)}_appendToFragment(t){if(!this.schema.checkChild(this.position,t))throw new k("insertcontent-wrong-position",this,{node:t,position:this.position});this.writer.insert(t,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(t.offsetSize),this.schema.isObject(t)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=t:this._nodeToSelect=null,this._filterAttributesOf.push(t)}_setAffectedBoundaries(t){this._affectedStart||(this._affectedStart=th.fromPosition(t,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(t)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=th.fromPosition(t,"toNext"))}_mergeOnLeft(){const t=this._firstNode;if(!(t instanceof vc))return;if(!this._canMergeLeft(t))return;const e=th._createBefore(t);e.stickiness="toNext";const n=th.fromPosition(this.position,"toNext");this._affectedStart.isEqual(e)&&(this._affectedStart.detach(),this._affectedStart=th._createAt(e.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=e.nodeBefore,this._lastNode=e.nodeBefore),this.writer.merge(e),e.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=th._createAt(e.nodeBefore,"end","toNext")),this.position=n.toPosition(),n.detach(),this._filterAttributesOf.push(this.position.parent),e.detach()}_mergeOnRight(){const t=this._lastNode;if(!(t instanceof vc))return;if(!this._canMergeRight(t))return;const e=th._createAfter(t);if(e.stickiness="toNext",!this.position.isEqual(e))throw new k("insertcontent-invalid-insertion-position",this);this.position=Ec._createAt(e.nodeBefore,"end");const n=th.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(e)&&(this._affectedEnd.detach(),this._affectedEnd=th._createAt(e.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=e.nodeBefore,this._lastNode=e.nodeBefore),this.writer.merge(e),e.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=th._createAt(e.nodeBefore,0,"toPrevious")),this.position=n.toPosition(),n.detach(),this._filterAttributesOf.push(this.position.parent),e.detach()}_canMergeLeft(t){const e=t.previousSibling;return e instanceof vc&&this.canMergeWith.has(e)&&this.model.schema.checkMerge(e,t)}_canMergeRight(t){const e=t.nextSibling;return e instanceof vc&&this.canMergeWith.has(e)&&this.model.schema.checkMerge(t,e)}_tryAutoparagraphing(t){const e=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,e)&&this.schema.checkChild(e,t)&&(e._appendChild(t),this._handleNode(e))}_checkAndAutoParagraphToAllowedPosition(t){if(this.schema.checkChild(this.position.parent,t))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",t))return!1;this._insertPartialFragment();const e=this.writer.createElement("paragraph");return this.writer.insert(e,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=e,this.position=this.writer.createPositionAt(e,0),!0}_checkAndSplitToAllowedPosition(t){const e=this._getAllowedIn(this.position.parent,t);if(!e)return!1;for(e!=this.position.parent&&this._insertPartialFragment();e!=this.position.parent;)if(this.position.isAtStart){const t=this.position.parent;this.position=this.writer.createPositionBefore(t),t.isEmpty&&t.parent===e&&this.writer.remove(t)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const t=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=t,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(t,e){return this.schema.checkChild(t,e)?t:this.schema.isLimit(t)?null:this._getAllowedIn(t.parent,e)}}function eu(t,e,n="auto"){const o=t.getSelectedElement();if(o&&e.schema.isObject(o)&&!e.schema.isInline(o))return"before"==n||"after"==n?e.createRange(e.createPositionAt(o,n)):e.createRangeOn(o);const i=yi(t.getSelectedBlocks());if(!i)return e.createRange(t.focus);if(i.isEmpty)return e.createRange(e.createPositionAt(i,0));const r=e.createPositionAfter(i);return t.focus.isTouching(r)?e.createRange(r):e.createRange(e.createPositionBefore(i))}function nu(t,e,n,o={}){if(!t.schema.isObject(e))throw new k("insertobject-element-not-an-object",t,{object:e});const i=n||t.document.selection;let r=i;o.findOptimalPosition&&t.schema.isBlock(e)&&(r=t.createSelection(eu(i,t,o.findOptimalPosition)));const s=yi(i.getSelectedBlocks()),a={};return s&&Object.assign(a,t.schema.getAttributesWithProperty(s,"copyOnReplace",!0)),t.change((n=>{r.isCollapsed||t.deleteContent(r,{doNotAutoparagraph:!0});let i=e;const s=r.anchor.parent;!t.schema.checkChild(s,e)&&t.schema.checkChild(s,"paragraph")&&t.schema.checkChild("paragraph",e)&&(i=n.createElement("paragraph"),n.insert(e,i)),t.schema.setAllowedAttributes(i,a,n);const c=t.insertContent(i,r);return c.isCollapsed||o.setSelection&&function(t,e,n,o){const i=t.model;if("on"==n)return void t.setSelection(e,"on");if("after"!=n)throw new k("insertobject-invalid-place-parameter-value",i);let r=e.nextSibling;if(i.schema.isInline(e))return void t.setSelection(e,"after");const s=r&&i.schema.checkChild(r,"$text");!s&&i.schema.checkChild(e.parent,"paragraph")&&(r=t.createElement("paragraph"),i.schema.setAllowedAttributes(r,o,t),i.insertContent(r,t.createPositionAfter(e)));r&&t.setSelection(r,0)}(n,e,o.setSelection,a),c}))}const ou=' ,.?!:;"-()';function iu(t,e){const{isForward:n,walker:o,unit:i,schema:r,treatEmojiAsSingleUnit:s}=t,{type:a,item:c,nextPosition:l}=e;if("text"==a)return"word"===t.unit?function(t,e){let n=t.position.textNode;n||(n=e?t.position.nodeAfter:t.position.nodeBefore);for(;n&&n.is("$text");){const o=t.position.offset-n.startOffset;if(au(n,o,e))n=e?t.position.nodeAfter:t.position.nodeBefore;else{if(su(n.data,o,e))break;t.next()}}return t.position}(o,n):function(t,e,n){const o=t.position.textNode;if(o){const i=o.data;let r=t.position.offset-o.startOffset;for(;Si(i,r)||"character"==e&&Mi(i,r)||n&&Bi(i,r);)t.next(),r=t.position.offset-o.startOffset}return t.position}(o,i,s);if(a==(n?"elementStart":"elementEnd")){if(r.isSelectable(c))return Ec._createAt(c,n?"after":"before");if(r.checkChild(l,"$text"))return l}else{if(r.isLimit(c))return void o.skip((()=>!0));if(r.checkChild(l,"$text"))return l}}function ru(t,e){const n=t.root,o=Ec._createAt(n,e?"end":0);return e?new Bc(t,o):new Bc(o,t)}function su(t,e,n){const o=e+(n?0:-1);return ou.includes(t.charAt(o))}function au(t,e,n){return e===(n?t.offsetSize:0)}class cu extends(G()){constructor(){super(),this.markers=new Lh,this.document=new Ih(this),this.schema=new Kl,this._pendingChanges=[],this._currentWriter=null,["deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach((t=>this.decorate(t))),this.on("applyOperation",((t,e)=>{e[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(((t,e)=>{if("$marker"===e.name)return!0})),Rl(this),this.document.registerPostFixer(_l),this.on("insertContent",((t,[e,n])=>{t.return=function(t,e,n){return t.change((o=>{const i=n||t.document.selection;i.isCollapsed||t.deleteContent(i,{doNotAutoparagraph:!0});const r=new tu(t,o,i.anchor),s=[];let a;if(e.is("documentFragment")){if(e.markers.size){const t=[];for(const[n,o]of e.markers){const{start:e,end:i}=o,r=e.isEqual(i);t.push({position:e,name:n,isCollapsed:r},{position:i,name:n,isCollapsed:r})}t.sort((({position:t},{position:e})=>t.isBefore(e)?1:-1));for(const{position:n,name:i,isCollapsed:r}of t){let t=null,a=null;const c=n.parent===e&&n.isAtStart,l=n.parent===e&&n.isAtEnd;c||l?r&&(a=c?"start":"end"):(t=o.createElement("$marker"),o.insert(t,n)),s.push({name:i,element:t,collapsed:a})}}a=e.getChildren()}else a=[e];r.handleNodes(a);let c=r.getSelectionRange();if(e.is("documentFragment")&&s.length){const t=c?el.fromRange(c):null,e={};for(let t=s.length-1;t>=0;t--){const{name:n,element:i,collapsed:a}=s[t],c=!e[n];if(c&&(e[n]=[]),i){const t=o.createPositionAt(i,"before");e[n].push(t),o.remove(i)}else{const t=r.getAffectedRange();if(!t){a&&e[n].push(r.position);continue}a?e[n].push(t[a]):e[n].push(c?t.start:t.end)}}for(const[t,[n,i]]of Object.entries(e))n&&i&&n.root===i.root&&o.addMarker(t,{usingOperation:!0,affectsData:!0,range:new Bc(n,i)});t&&(c=t.toRange(),t.detach())}c&&(i instanceof rl?o.setSelection(c):i.setTo(c));const l=r.getAffectedRange()||t.createRange(i.anchor);return r.destroy(),l}))}(this,e,n)})),this.on("insertObject",((t,[e,n,o])=>{t.return=nu(this,e,n,o)})),this.on("canEditAt",(t=>{const e=!this.document.isReadOnly;t.return=e,e||t.stop()}))}change(t){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new oh,callback:t}),this._runPendingChanges()[0]):t(this._currentWriter)}catch(t){k.rethrowUnexpectedError(t,this)}}enqueueChange(t,e){try{t?"function"==typeof t?(e=t,t=new oh):t instanceof oh||(t=new oh(t)):t=new oh,this._pendingChanges.push({batch:t,callback:e}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(t){k.rethrowUnexpectedError(t,this)}}applyOperation(t){t._execute()}insertContent(t,e,n,...o){const i=lu(e,n);return this.fire("insertContent",[t,i,n,...o])}insertObject(t,e,n,o,...i){const r=lu(e,n);return this.fire("insertObject",[t,r,o,o,...i])}deleteContent(t,e){Kh(this,t,e)}modifySelection(t,e){!function(t,e,n={}){const o=t.schema,i="backward"!=n.direction,r=n.unit?n.unit:"character",s=!!n.treatEmojiAsSingleUnit,a=e.focus,c=new yc({boundaries:ru(a,i),singleCharacters:!0,direction:i?"forward":"backward"}),l={walker:c,schema:o,isForward:i,unit:r,treatEmojiAsSingleUnit:s};let d;for(;d=c.next();){if(d.done)return;const n=iu(l,d.value);if(n)return void(e instanceof rl?t.change((t=>{t.setSelectionFocus(n)})):e.setFocus(n))}}(this,t,e)}getSelectedContent(t){return function(t,e){return t.change((t=>{const n=t.createDocumentFragment(),o=e.getFirstRange();if(!o||o.isCollapsed)return n;const i=o.start.root,r=o.start.getCommonPath(o.end),s=i.getNodeByPath(r);let a;a=o.start.parent==o.end.parent?o:t.createRange(t.createPositionAt(s,o.start.path[r.length]),t.createPositionAt(s,o.end.path[r.length]+1));const c=a.end.offset-a.start.offset;for(const e of a.getItems({shallow:!0}))e.is("$textProxy")?t.appendText(e.data,e.getAttributes(),n):t.append(t.cloneElement(e,!0),n);if(a!=o){const e=o._getTransformedByMove(a.start,t.createPositionAt(n,0),c)[0],i=t.createRange(t.createPositionAt(n,0),e.start);Xh(t.createRange(e.end,t.createPositionAt(n,"end")),t),Xh(i,t)}return n}))}(this,t)}hasContent(t,e={}){const n=t instanceof Bc?t:Bc._createIn(t);if(n.isCollapsed)return!1;const{ignoreWhitespaces:o=!1,ignoreMarkers:i=!1}=e;if(!i)for(const t of this.markers.getMarkersIntersectingRange(n))if(t.affectsData)return!0;for(const t of n.getItems())if(this.schema.isContent(t)){if(!t.is("$textProxy"))return!0;if(!o)return!0;if(-1!==t.data.search(/\S/))return!0}return!1}canEditAt(t){const e=lu(t);return this.fire("canEditAt",[e])}createPositionFromPath(t,e,n){return new Ec(t,e,n)}createPositionAt(t,e){return Ec._createAt(t,e)}createPositionAfter(t){return Ec._createAfter(t)}createPositionBefore(t){return Ec._createBefore(t)}createRange(t,e){return new Bc(t,e)}createRangeIn(t){return Bc._createIn(t)}createRangeOn(t){return Bc._createOn(t)}createSelection(...t){return new Yc(...t)}createBatch(t){return new oh(t)}createOperationFromJSON(t){return Ud.fromJSON(t,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const t=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const e=this._pendingChanges[0].batch;this._currentWriter=new Vh(this,e);const n=this._pendingChanges[0].callback(this._currentWriter);t.push(n),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return t}}function lu(t,e){if(t)return t instanceof Yc||t instanceof rl?t:t instanceof wc?e||0===e?new Yc(t,e):t.is("rootElement")?new Yc(t,"in"):new Yc(t,"on"):new Yc(t)}class du extends va{constructor(){super(...arguments),this.domEventType="click"}onDomEvent(t){this.fire(t.type,t)}}class hu extends va{constructor(){super(...arguments),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(t){this.fire(t.type,t)}}class uu{constructor(t){this.document=t}createDocumentFragment(t){return new zs(this.document,t)}createElement(t,e,n){return new is(this.document,t,e,n)}createText(t){return new nr(this.document,t)}clone(t,e=!1){return t._clone(e)}appendChild(t,e){return e._appendChild(t)}insertChild(t,e,n){return n._insertChild(t,e)}removeChildren(t,e,n){return n._removeChildren(t,e)}remove(t){const e=t.parent;return e?this.removeChildren(e.getChildIndex(t),1,e):[]}replace(t,e){const n=t.parent;if(n){const o=n.getChildIndex(t);return this.removeChildren(o,1,n),this.insertChild(o,e,n),!0}return!1}unwrapElement(t){const e=t.parent;if(e){const n=e.getChildIndex(t);this.remove(t),this.insertChild(n,t.getChildren(),e)}}rename(t,e){const n=new is(this.document,t,e.getAttributes(),e.getChildren());return this.replace(e,n)?n:null}setAttribute(t,e,n){n._setAttribute(t,e)}removeAttribute(t,e){e._removeAttribute(t)}addClass(t,e){e._addClass(t)}removeClass(t,e){e._removeClass(t)}setStyle(t,e,n){vt(t)&&void 0===n?e._setStyle(t):n._setStyle(t,e)}removeStyle(t,e){e._removeStyle(t)}setCustomProperty(t,e,n){n._setCustomProperty(t,e)}removeCustomProperty(t,e){return e._removeCustomProperty(t)}createPositionAt(t,e){return us._createAt(t,e)}createPositionAfter(t){return us._createAfter(t)}createPositionBefore(t){return us._createBefore(t)}createRange(t,e){return new gs(t,e)}createRangeOn(t){return gs._createOn(t)}createRangeIn(t){return gs._createIn(t)}createSelection(...t){return new ms(...t)}}class gu{constructor(){this._commands=new Map}add(t,e){this._commands.set(t,e)}get(t){return this._commands.get(t)}execute(t,...e){const n=this.get(t);if(!n)throw new k("commandcollection-command-not-found",this,{commandName:t});return n.execute(...e)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const t of this.commands())t.destroy()}}class pu extends(G()){constructor(t={}){super();const e=this.constructor,n=t.language||e.defaultConfig&&e.defaultConfig.language;this._context=t.context||new Ri({language:n}),this._context._addEditor(this,!t.context);const o=Array.from(e.builtinPlugins||[]);this.config=new _o(t,e.defaultConfig),this.config.define("plugins",o),this.config.define(this._context._getEditorConfig()),this.plugins=new ji(this,o,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new gu,this.set("state","initializing"),this.once("ready",(()=>this.state="ready"),{priority:"high"}),this.once("destroy",(()=>this.state="destroyed"),{priority:"high"}),this.model=new cu,this.on("change:isReadOnly",(()=>{this.model.document.isReadOnly=this.isReadOnly}));const i=new es;this.data=new bd(this.model,i),this.editing=new Hl(this.model,i),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new wd([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 Vi(this),this.keystrokes.listenTo(this.editing.view.document)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(t){throw new k("editor-isreadonly-has-no-setter")}enableReadOnlyMode(t){if("string"!=typeof t&&"symbol"!=typeof t)throw new k("editor-read-only-lock-id-invalid",null,{lockId:t});this._readOnlyLocks.has(t)||(this._readOnlyLocks.add(t),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(t){if("string"!=typeof t&&"symbol"!=typeof t)throw new k("editor-read-only-lock-id-invalid",null,{lockId:t});this._readOnlyLocks.has(t)&&(this._readOnlyLocks.delete(t),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}initPlugins(){const t=this.config,e=t.get("plugins"),n=t.get("removePlugins")||[],o=t.get("extraPlugins")||[],i=t.get("substitutePlugins")||[];return this.plugins.init(e.concat(o),n,i)}destroy(){let t=Promise.resolve();return"initializing"==this.state&&(t=new Promise((t=>this.once("ready",t)))),t.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(t,...e){try{return this.commands.execute(t,...e)}catch(t){k.rethrowUnexpectedError(t,this)}}focus(){this.editing.view.focus()}static create(...t){throw new Error("This is an abstract method.")}}function mu(t){return class extends t{setData(t){this.data.set(t)}getData(t){return this.data.get(t)}}}{const t=mu(Object);mu.setData=t.prototype.setData,mu.getData=t.prototype.getData}function fu(t){return class extends t{updateSourceElement(t=this.data.get()){if(!this.sourceElement)throw new k("editor-missing-sourceelement",this);const e=this.config.get("updateSourceElementOnDestroy"),n=this.sourceElement instanceof HTMLTextAreaElement;Go(this.sourceElement,e||n?t:"")}}}fu.updateSourceElement=fu(Object).prototype.updateSourceElement;class ku extends Fi{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new vi({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(t){if("string"!=typeof t)throw new k("pendingactions-add-invalid-message",this);const e=new(G());return e.set("message",t),this._actions.add(e),this.hasAny=!0,e}remove(t){this._actions.remove(t),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}const bu={bold:'',cancel:'',caption:'',check:'',cog:'',eraser:'',image:'',lowVision:'',importExport:'',paragraph:'',plus:'',text:'',alignBottom:'',alignMiddle:'',alignTop:'',alignLeft:'',alignCenter:'',alignRight:'',alignJustify:'',objectLeft:'',objectCenter:'',objectRight:'',objectFullWidth:'',objectInline:'',objectBlockLeft:'',objectBlockRight:'',objectSizeFull:'',objectSizeLarge:'',objectSizeSmall:'',objectSizeMedium:'',pencil:'',pilcrow:'',quote:'',threeVerticalDots:''};function wu({emitter:t,activator:e,callback:n,contextElements:o}){t.listenTo(document,"mousedown",((t,i)=>{if(!e())return;const r="function"==typeof i.composedPath?i.composedPath():[],s="function"==typeof o?o():o;for(const t of s)if(t.contains(i.target)||r.includes(t))return;n()}))}function Au(t){return class extends t{disableCssTransitions(){this._isCssTransitionsDisabled=!0}enableCssTransitions(){this._isCssTransitionsDisabled=!1}constructor(...t){super(...t),this.set("_isCssTransitionsDisabled",!1),this.initializeCssTransitionDisablerMixin()}initializeCssTransitionDisablerMixin(){this.extendTemplate({attributes:{class:[this.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}}}function Cu({view:t}){t.listenTo(t.element,"submit",((e,n)=>{n.preventDefault(),t.fire("submit")}),{useCapture:!0})}class _u extends vi{constructor(t=[]){super(t,{idProperty:"viewUid"}),this.on("add",((t,e,n)=>{this._renderViewIntoCollectionParent(e,n)})),this.on("remove",((t,e)=>{e.element&&this._parentElement&&e.element.remove()})),this._parentElement=null}destroy(){this.map((t=>t.destroy()))}setParent(t){this._parentElement=t;for(const t of this)this._renderViewIntoCollectionParent(t)}delegate(...t){if(!t.length||!t.every((t=>"string"==typeof t)))throw new k("ui-viewcollection-delegate-wrong-events",this);return{to:e=>{for(const n of this)for(const o of t)n.delegate(o).to(e);this.on("add",((n,o)=>{for(const n of t)o.delegate(n).to(e)})),this.on("remove",((n,o)=>{for(const n of t)o.stopDelegating(n,e)}))}}}_renderViewIntoCollectionParent(t,e){t.isRendered||t.render(),t.element&&this._parentElement&&this._parentElement.insertBefore(t.element,this._parentElement.children[e])}remove(t){return super.remove(t)}}var vu=n(4793),yu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(vu.Z,yu);vu.Z.locals;class xu extends(Io(G())){constructor(t){super(),this.element=null,this.isRendered=!1,this.locale=t,this.t=t&&t.t,this._viewCollections=new vi,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",((e,n)=>{n.locale=t,n.t=t&&t.t})),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=Eu.bind(this,this)}createCollection(t){const e=new _u(t);return this._viewCollections.add(e),e}registerChild(t){J(t)||(t=[t]);for(const e of t)this._unboundChildren.add(e)}deregisterChild(t){J(t)||(t=[t]);for(const e of t)this._unboundChildren.remove(e)}setTemplate(t){this.template=new Eu(t)}extendTemplate(t){Eu.extend(this.template,t)}render(){if(this.isRendered)throw new k("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((t=>t.destroy())),this.template&&this.template._revertData&&this.template.revert(this.element)}}class Eu extends(S()){constructor(t){super(),Object.assign(this,Ou(zu(t))),this._isRendered=!1,this._revertData=null}render(){const t=this._renderNode({intoFragment:!0});return this._isRendered=!0,t}apply(t){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:t,intoFragment:!1,isApplying:!0,revertData:this._revertData}),t}revert(t){if(!this._revertData)throw new k("ui-template-revert-not-applied",[this,t]);this._revertTemplateFromNode(t,this._revertData)}*getViews(){yield*function*t(e){if(e.children)for(const n of e.children)Uu(n)?yield n:Hu(n)&&(yield*t(n))}(this)}static bind(t,e){return{to:(n,o)=>new Iu({eventNameOrFunction:n,attribute:n,observable:t,emitter:e,callback:o}),if:(n,o,i)=>new Su({observable:t,emitter:e,attribute:n,valueIfTrue:o,callback:i})}}static extend(t,e){if(t._isRendered)throw new k("template-extend-render",[this,t]);Fu(t,Ou(zu(e)))}_renderNode(t){let e;if(e=t.node?this.tag&&this.text:this.tag?this.text:!this.text,e)throw new k("ui-template-wrong-syntax",this);return this.text?this._renderText(t):this._renderElement(t)}_renderElement(t){let e=t.node;return e||(e=t.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(t),this._renderElementChildren(t),this._setUpListeners(t),e}_renderText(t){let e=t.node;return e?t.revertData.text=e.textContent:e=t.node=document.createTextNode(""),Mu(this.text)?this._bindToObservable({schema:this.text,updater:Bu(e),data:t}):e.textContent=this.text.join(""),e}_renderAttributes(t){if(!this.attributes)return;const e=t.node,n=t.revertData;for(const o in this.attributes){const i=e.getAttribute(o),r=this.attributes[o];n&&(n.attributes[o]=i);const s=qu(r)?r[0].ns:null;if(Mu(r)){const a=qu(r)?r[0].value:r;n&&Wu(o)&&a.unshift(i),this._bindToObservable({schema:a,updater:Nu(e,o,s),data:t})}else if("style"==o&&"string"!=typeof r[0])this._renderStyleAttribute(r[0],t);else{n&&i&&Wu(o)&&r.unshift(i);const t=r.map((t=>t&&t.value||t)).reduce(((t,e)=>t.concat(e)),[]).reduce(ju,"");Vu(t)||e.setAttributeNS(s,o,t)}}}_renderStyleAttribute(t,e){const n=e.node;for(const o in t){const i=t[o];Mu(i)?this._bindToObservable({schema:[i],updater:Pu(n,o),data:e}):n.style[o]=i}}_renderElementChildren(t){const e=t.node,n=t.intoFragment?document.createDocumentFragment():e,o=t.isApplying;let i=0;for(const r of this.children)if(Gu(r)){if(!o){r.setParent(e);for(const t of r)n.appendChild(t.element)}}else if(Uu(r))o||(r.isRendered||r.render(),n.appendChild(r.element));else if(xo(r))n.appendChild(r);else if(o){const e={children:[],bindings:[],attributes:{}};t.revertData.children.push(e),r._renderNode({intoFragment:!1,node:n.childNodes[i++],isApplying:!0,revertData:e})}else n.appendChild(r.render());t.intoFragment&&e.appendChild(n)}_setUpListeners(t){if(this.eventListeners)for(const e in this.eventListeners){const n=this.eventListeners[e].map((n=>{const[o,i]=e.split("@");return n.activateDomEventListener(o,i,t)}));t.revertData&&t.revertData.bindings.push(n)}}_bindToObservable({schema:t,updater:e,data:n}){const o=n.revertData;Tu(t,e,n);const i=t.filter((t=>!Vu(t))).filter((t=>t.observable)).map((o=>o.activateAttributeListener(t,e,n)));o&&o.bindings.push(i)}_revertTemplateFromNode(t,e){for(const t of e.bindings)for(const e of t)e();if(e.text)return void(t.textContent=e.text);const n=t;for(const t in e.attributes){const o=e.attributes[t];null===o?n.removeAttribute(t):n.setAttribute(t,o)}for(let t=0;tTu(t,e,n);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,o),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,o)}}}class Iu extends Du{constructor(t){super(t),this.eventNameOrFunction=t.eventNameOrFunction}activateDomEventListener(t,e,n){const o=(t,n)=>{e&&!n.target.matches(e)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(n):this.observable.fire(this.eventNameOrFunction,n))};return this.emitter.listenTo(n.node,t,o),()=>{this.emitter.stopListening(n.node,t,o)}}}class Su extends Du{constructor(t){super(t),this.valueIfTrue=t.valueIfTrue}getValue(t){return!Vu(super.getValue(t))&&(this.valueIfTrue||!0)}}function Mu(t){return!!t&&(t.value&&(t=t.value),Array.isArray(t)?t.some(Mu):t instanceof Du)}function Tu(t,e,{node:n}){const o=function(t,e){return t.map((t=>t instanceof Du?t.getValue(e):t))}(t,n);let i;i=1==t.length&&t[0]instanceof Su?o[0]:o.reduce(ju,""),Vu(i)?e.remove():e.set(i)}function Bu(t){return{set(e){t.textContent=e},remove(){t.textContent=""}}}function Nu(t,e,n){return{set(o){t.setAttributeNS(n,e,o)},remove(){t.removeAttributeNS(n,e)}}}function Pu(t,e){return{set(n){t.style[e]=n},remove(){t.style[e]=null}}}function zu(t){return Ao(t,(t=>{if(t&&(t instanceof Du||Hu(t)||Uu(t)||Gu(t)))return t}))}function Ou(t){if("string"==typeof t?t=function(t){return{text:[t]}}(t):t.text&&function(t){t.text=bi(t.text)}(t),t.on&&(t.eventListeners=function(t){for(const e in t)Lu(t,e);return t}(t.on),delete t.on),!t.text){t.attributes&&function(t){for(const e in t)t[e].value&&(t[e].value=bi(t[e].value)),Lu(t,e)}(t.attributes);const e=[];if(t.children)if(Gu(t.children))e.push(t.children);else for(const n of t.children)Hu(n)||Uu(n)||xo(n)?e.push(n):e.push(new Eu(n));t.children=e}return t}function Lu(t,e){t[e]=bi(t[e])}function ju(t,e){return Vu(e)?t:Vu(t)?e:`${t} ${e}`}function Ru(t,e){for(const n in e)t[n]?t[n].push(...e[n]):t[n]=e[n]}function Fu(t,e){if(e.attributes&&(t.attributes||(t.attributes={}),Ru(t.attributes,e.attributes)),e.eventListeners&&(t.eventListeners||(t.eventListeners={}),Ru(t.eventListeners,e.eventListeners)),e.text&&t.text.push(...e.text),e.children&&e.children.length){if(t.children.length!=e.children.length)throw new k("ui-template-extend-children-mismatch",t);let n=0;for(const o of e.children)Fu(t.children[n++],o)}}function Vu(t){return!t&&0!==t}function Uu(t){return t instanceof xu}function Hu(t){return t instanceof Eu}function Gu(t){return t instanceof _u}function qu(t){return L(t[0])&&t[0].ns}function Wu(t){return"class"==t||"style"==t}class Ku extends _u{constructor(t,e=[]){super(e),this.locale=t}get bodyCollectionContainer(){return this._bodyCollectionContainer}attachToDom(){this._bodyCollectionContainer=new Eu({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let t=document.querySelector(".ck-body-wrapper");t||(t=mt(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(t)),t.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const t=document.querySelector(".ck-body-wrapper");t&&0==t.childElementCount&&t.remove()}}var Yu=n(6574),$u={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Yu.Z,$u);Yu.Z.locals;const Zu=class extends xu{constructor(){super();const t=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.set("isColorInherited",!0),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon","ck-reset_all-excluded",t.if("isColorInherited","ck-icon_inherit-color")],viewBox:t.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 t=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),e=t.getAttribute("viewBox");e&&(this.viewBox=e);for(const{name:e,value:n}of Array.from(t.attributes))Zu.presentationalAttributeNames.includes(e)&&this.element.setAttribute(e,n);for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;t.childNodes.length>0;)this.element.appendChild(t.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach((t=>{t.style.fill=this.fillColor}))}};let Qu=Zu;Qu.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"];var Ju=n(4906),Xu={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Ju.Z,Xu);Ju.Z.locals;class tg extends xu{constructor(t){super(t),this._focusDelayed=null;const e=this.bindTemplate,n=g();this.set("ariaChecked",void 0),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._createLabelView(),this.iconView=new Qu,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 o={tag:"button",attributes:{class:["ck","ck-button",e.to("class"),e.if("isEnabled","ck-disabled",(t=>!t)),e.if("isVisible","ck-hidden",(t=>!t)),e.to("isOn",(t=>t?"ck-on":"ck-off")),e.if("withText","ck-button_with-text"),e.if("withKeystroke","ck-button_with-keystroke")],role:e.to("role"),type:e.to("type",(t=>t||"button")),tabindex:e.to("tabindex"),"aria-label":e.to("ariaLabel"),"aria-labelledby":e.to("ariaLabelledBy"),"aria-disabled":e.if("isEnabled",!0,(t=>!t)),"aria-checked":e.to("isOn"),"aria-pressed":e.to("isOn",(t=>!!this.isToggleable&&String(!!t))),"data-cke-tooltip-text":e.to("_tooltipString"),"data-cke-tooltip-position":e.to("tooltipPosition")},children:this.children,on:{click:e.to((t=>{this.isEnabled?this.fire("execute"):t.preventDefault()}))}};i.isSafari&&(this._focusDelayed||(this._focusDelayed=Ii((()=>this.focus()),0)),o.on.mousedown=e.to((()=>{this._focusDelayed()})),o.on.mouseup=e.to((()=>{this._focusDelayed.cancel()}))),this.setTemplate(o)}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()}_createLabelView(){const t=new xu,e=this.bindTemplate;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:e.to("labelStyle"),id:this.ariaLabelledBy},children:[{text:e.to("label")}]}),t}_createKeystrokeView(){const t=new xu;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",(t=>fi(t)))}]}),t}_getTooltipString(t,e,n){return t?"string"==typeof t?t:(n&&(n=fi(n)),t instanceof Function?t(e,n):`${e}${n?` (${n})`:""}`):""}}var eg=n(5332),ng={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(eg.Z,ng);eg.Z.locals;class og extends tg{constructor(t){super(t),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const t=new xu;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),t}}var ig=n(6781),rg={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(ig.Z,rg);ig.Z.locals;n(1103);n(841);var sg=n(3662),ag={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(sg.Z,ag);sg.Z.locals;class cg extends xu{constructor(t){super(t),this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${g()}`;const e=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:e.to("for")},children:[{text:e.to("text")}]})}}var lg=n(2577),dg={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(lg.Z,dg);lg.Z.locals;class hg extends xu{constructor(t,e){super(t);const n=`ck-labeled-field-view-${g()}`,o=`ck-labeled-field-view-status-${g()}`;this.fieldView=e(this,n,o),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(n),this.statusView=this._createStatusView(o),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",((t,e)=>t||e));const i=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",i.to("class"),i.if("isEnabled","ck-disabled",(t=>!t)),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(t){const e=new cg(this.locale);return e.for=t,e.bind("text").to(this,"label"),e}_createStatusView(t){const e=new xu(this.locale),n=this.bindTemplate;return e.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",n.if("errorText","ck-labeled-field-view__status_error"),n.if("_statusText","ck-hidden",(t=>!t))],id:t,role:n.if("errorText","alert")},children:[{text:n.to("_statusText")}]}),e}focus(){this.fieldView.focus()}}var ug=n(4879),gg={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(ug.Z,gg);ug.Z.locals;class pg extends xu{constructor(t){super(t),this.set("value",void 0),this.set("id",void 0),this.set("placeholder",void 0),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById",void 0),this.focusTracker=new xi,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0),this.set("inputMode","text");const e=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",e.if("isFocused","ck-input_focused"),e.if("isEmpty","ck-input-text_empty"),e.if("hasError","ck-error")],id:e.to("id"),placeholder:e.to("placeholder"),readonly:e.to("isReadOnly"),inputmode:e.to("inputMode"),"aria-invalid":e.if("hasError",!0),"aria-describedby":e.to("ariaDescribedById")},on:{input:e.to(((...t)=>{this.fire("input",...t),this._updateIsEmpty()})),change:e.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",((t,e,n)=>{this._setDomElementValue(n),this._updateIsEmpty()}))}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(t){this.element.value=t||0===t?t:""}}class mg extends pg{constructor(t){super(t),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}class fg extends xu{constructor(t){super(t);const e=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",e.to("position",(t=>`ck-dropdown__panel_${t}`)),e.if("isVisible","ck-dropdown__panel-visible")],tabindex:"-1"},children:this.children,on:{selectstart:e.to((t=>{"input"!==t.target.tagName.toLocaleLowerCase()&&t.preventDefault()}))}})}focus(){if(this.children.length){const t=this.children.first;"function"==typeof t.focus?t.focus():b("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this})}}focusLast(){if(this.children.length){const t=this.children.last;"function"==typeof t.focusLast?t.focusLast():t.focus()}}}var kg=n(5485),bg={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(kg.Z,bg);kg.Z.locals;const wg=class extends xu{constructor(t,e,n){super(t);const o=this.bindTemplate;this.buttonView=e,this.panelView=n,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class",void 0),this.set("id",void 0),this.set("panelPosition","auto"),this.keystrokes=new Ei,this.focusTracker=new xi,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",o.to("class"),o.if("isEnabled","ck-disabled",(t=>!t))],id:o.to("id"),"aria-describedby":o.to("ariaDescribedById")},children:[e,n]}),e.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":o.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.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",((t,e,n)=>{n&&("auto"===this.panelPosition?this.panelView.position=wg._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions}).name:this.panelView.position=this.panelPosition)})),this.keystrokes.listenTo(this.element);const t=(t,e)=>{this.isOpen&&(this.isOpen=!1,e())};this.keystrokes.set("arrowdown",((t,e)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,e())})),this.keystrokes.set("arrowright",((t,e)=>{this.isOpen&&e()})),this.keystrokes.set("arrowleft",t),this.keystrokes.set("esc",t)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:t,north:e,southEast:n,southWest:o,northEast:i,northWest:r,southMiddleEast:s,southMiddleWest:a,northMiddleEast:c,northMiddleWest:l}=wg.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[n,o,s,a,t,i,r,c,l,e]:[o,n,a,s,t,r,i,l,c,e]}};let Ag=wg;Ag.defaultPanelPositions={south:(t,e)=>({top:t.bottom,left:t.left-(e.width-t.width)/2,name:"s"}),southEast:t=>({top:t.bottom,left:t.left,name:"se"}),southWest:(t,e)=>({top:t.bottom,left:t.left-e.width+t.width,name:"sw"}),southMiddleEast:(t,e)=>({top:t.bottom,left:t.left-(e.width-t.width)/4,name:"sme"}),southMiddleWest:(t,e)=>({top:t.bottom,left:t.left-3*(e.width-t.width)/4,name:"smw"}),north:(t,e)=>({top:t.top-e.height,left:t.left-(e.width-t.width)/2,name:"n"}),northEast:(t,e)=>({top:t.top-e.height,left:t.left,name:"ne"}),northWest:(t,e)=>({top:t.top-e.height,left:t.left-e.width+t.width,name:"nw"}),northMiddleEast:(t,e)=>({top:t.top-e.height,left:t.left-(e.width-t.width)/4,name:"nme"}),northMiddleWest:(t,e)=>({top:t.top-e.height,left:t.left-3*(e.width-t.width)/4,name:"nmw"})},Ag._getOptimalPosition=Qo;const Cg='';class _g extends tg{constructor(t){super(t),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",(t=>String(t)))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const t=new Qu;return t.content=Cg,t.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),t}}class vg{constructor(t){if(this.focusables=t.focusables,this.focusTracker=t.focusTracker,this.keystrokeHandler=t.keystrokeHandler,this.actions=t.actions,t.actions&&t.keystrokeHandler)for(const e in t.actions){let n=t.actions[e];"string"==typeof n&&(n=[n]);for(const o of n)t.keystrokeHandler.set(o,((t,n)=>{this[e](),n()}))}}get first(){return this.focusables.find(yg)||null}get last(){return this.focusables.filter(yg).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let t=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find(((e,n)=>{const o=e.element===this.focusTracker.focusedElement;return o&&(t=n),o})),t)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(t){t&&t.focus()}_getFocusableItem(t){const e=this.current,n=this.focusables.length;if(!n)return null;if(null===e)return this[1===t?"first":"last"];let o=(e+n+t)%n;do{const e=this.focusables.get(o);if(yg(e))return e;o=(o+n+t)%n}while(o!==e);return null}}function yg(t){return!(!t.focus||!$o(t.element))}class xg extends xu{constructor(t){super(t),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class Eg extends xu{constructor(t){super(t),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}function Dg(t){return Array.isArray(t)?{items:t,removeItems:[]}:t?Object.assign({items:[],removeItems:[]},t):{items:[],removeItems:[]}}var Ig=n(5542),Sg={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Ig.Z,Sg);Ig.Z.locals;const{threeVerticalDots:Mg}=bu,Tg={alignLeft:bu.alignLeft,bold:bu.bold,importExport:bu.importExport,paragraph:bu.paragraph,plus:bu.plus,text:bu.text,threeVerticalDots:bu.threeVerticalDots};class Bg extends xu{constructor(t,e){super(t);const n=this.bindTemplate,o=this.t;this.options=e||{},this.set("ariaLabel",o("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new xi,this.keystrokes=new Ei,this.set("class",void 0),this.set("isCompact",!1),this.itemsView=new Ng(t),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const i="rtl"===t.uiLanguageDirection;this._focusCycler=new vg({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",n.to("class"),n.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":n.to("ariaLabel"),style:{maxWidth:n.to("maxWidth")},tabindex:-1},children:this.children,on:{mousedown:(s=this,s.bindTemplate.to((t=>{t.target===s.element&&t.preventDefault()})))}}),this._behavior=this.options.shouldGroupWhenFull?new zg(this):new Pg(this)}render(){super.render(),this.focusTracker.add(this.element);for(const t of this.items)this.focusTracker.add(t.element);this.items.on("add",((t,e)=>{this.focusTracker.add(e.element)})),this.items.on("remove",((t,e)=>{this.focusTracker.remove(e.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(t,e,n){this.items.addMany(this._buildItemsFromConfig(t,e,n))}_buildItemsFromConfig(t,e,n){const o=Dg(t),i=n||o.removeItems;return this._cleanItemsConfiguration(o.items,e,i).map((t=>L(t)?this._createNestedToolbarDropdown(t,e,i):"|"===t?new xg:"-"===t?new Eg:e.create(t))).filter((t=>!!t))}_cleanItemsConfiguration(t,e,n){const o=t.filter(((t,o,i)=>"|"===t||-1===n.indexOf(t)&&("-"===t?!this.options.shouldGroupWhenFull||(b("toolbarview-line-break-ignored-when-grouping-items",i),!1):!(!L(t)&&!e.has(t))||(b("toolbarview-item-unavailable",{item:t}),!1))));return this._cleanSeparatorsAndLineBreaks(o)}_cleanSeparatorsAndLineBreaks(t){const e=t=>"-"!==t&&"|"!==t,n=t.length,o=t.findIndex(e);if(-1===o)return[];const i=n-t.slice().reverse().findIndex(e);return t.slice(o,i).filter(((t,n,o)=>{if(e(t))return!0;return!(n>0&&o[n-1]===t)}))}_createNestedToolbarDropdown(t,e,n){let{label:o,icon:i,items:r,tooltip:s=!0,withText:a=!1}=t;if(r=this._cleanItemsConfiguration(r,e,n),!r.length)return null;const c=Yg(this.locale);return o||b("toolbarview-nested-toolbar-dropdown-missing-label",t),c.class="ck-toolbar__nested-toolbar-dropdown",c.buttonView.set({label:o,tooltip:s,withText:!!a}),!1!==i?c.buttonView.icon=Tg[i]||i||Mg:c.buttonView.withText=!0,$g(c,(()=>c.toolbarView._buildItemsFromConfig(r,e,n))),c}}class Ng extends xu{constructor(t){super(t),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class Pg{constructor(t){const e=t.bindTemplate;t.set("isVertical",!1),t.itemsView.children.bindTo(t.items).using((t=>t)),t.focusables.bindTo(t.items).using((t=>t)),t.extendTemplate({attributes:{class:[e.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class zg{constructor(t){this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,this.view=t,this.viewChildren=t.children,this.viewFocusables=t.focusables,this.viewItemsView=t.itemsView,this.viewFocusTracker=t.focusTracker,this.viewLocale=t.locale,this.ungroupedItems=t.createCollection(),this.groupedItems=t.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),t.itemsView.children.bindTo(this.ungroupedItems).using((t=>t)),this.ungroupedItems.on("change",this._updateFocusCycleableItems.bind(this)),t.children.on("change",this._updateFocusCycleableItems.bind(this)),t.items.on("change",((t,e)=>{const n=e.index,o=Array.from(e.added);for(const t of e.removed)n>=this.ungroupedItems.length?this.groupedItems.remove(t):this.ungroupedItems.remove(t);for(let t=n;tthis.ungroupedItems.length?this.groupedItems.add(e,t-this.ungroupedItems.length):this.ungroupedItems.add(e,t)}this._updateGrouping()})),t.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(t){this.viewElement=t.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(t)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!$o(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const t=this.groupedItems.length;let e;for(;this._areItemsOverflowing;)this._groupLastItem(),e=!0;if(!e&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==t&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const t=this.viewElement,e=this.viewLocale.uiLanguageDirection,n=new Lo(t.lastChild),o=new Lo(t);if(!this.cachedPadding){const n=Bo.window.getComputedStyle(t),o="ltr"===e?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(n[o])}return"ltr"===e?n.right>o.right-this.cachedPadding:n.left{t&&t===e.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),t=e.contentRect.width)})),this._updateGrouping()}_enableGroupingOnMaxWidthChange(t){t.on("change:maxWidth",(()=>{this._updateGrouping()}))}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new xg),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 t=this.viewLocale,e=t.t,n=Yg(t);return n.class="ck-toolbar__grouped-dropdown",n.panelPosition="ltr"===t.uiLanguageDirection?"sw":"se",$g(n,this.groupedItems),n.buttonView.set({label:e("Show more items"),tooltip:!0,tooltipPosition:"rtl"===t.uiLanguageDirection?"se":"sw",icon:Mg}),n}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map((t=>{this.viewFocusables.add(t)})),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}var Og=n(1046),Lg={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Og.Z,Lg);Og.Z.locals;class jg extends xu{constructor(t){super(t);const e=this.bindTemplate;this.items=this.createCollection(),this.focusTracker=new xi,this.keystrokes=new Ei,this._focusCycler=new vg({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.set("ariaLabel",void 0),this.set("role",void 0),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"],role:e.to("role"),"aria-label":e.to("ariaLabel")},children:this.items})}render(){super.render();for(const t of this.items)this.focusTracker.add(t.element);this.items.on("add",((t,e)=>{this.focusTracker.add(e.element)})),this.items.on("remove",((t,e)=>{this.focusTracker.remove(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class Rg extends xu{constructor(t){super(t);const e=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",e.if("isVisible","ck-hidden",(t=>!t))],role:"presentation"},children:this.children})}focus(){this.children.first.focus()}}class Fg extends xu{constructor(t){super(t),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}var Vg=n(7686),Ug={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Vg.Z,Ug);Vg.Z.locals;class Hg extends xu{constructor(t){super(t);const e=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(),this.arrowView=this._createArrowView(),this.keystrokes=new Ei,this.focusTracker=new xi,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",e.to("class"),e.if("isVisible","ck-hidden",(t=>!t)),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",((t,e)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),e())})),this.keystrokes.set("arrowleft",((t,e)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),e())}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(){const t=new tg;return 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 t=new tg,e=t.bindTemplate;return t.icon=Cg,t.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":e.to("isOn"),"aria-haspopup":!0,"aria-expanded":e.to("isOn",(t=>String(t)))}}),t.bind("isEnabled").to(this),t.bind("label").to(this),t.bind("tooltip").to(this),t.delegate("execute").to(this,"open"),t}}var Gg=n(7339),qg={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Gg.Z,qg);Gg.Z.locals;var Wg=n(3949),Kg={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Wg.Z,Kg);Wg.Z.locals;function Yg(t,e=_g){const n=new e(t),o=new fg(t),i=new Ag(t,n,o);return n.bind("isEnabled").to(i),n instanceof Hg?n.arrowView.bind("isOn").to(i,"isOpen"):n.bind("isOn").to(i,"isOpen"),function(t){(function(t){t.on("render",(()=>{wu({emitter:t,activator:()=>t.isOpen,callback:()=>{t.isOpen=!1},contextElements:()=>[t.element,...t.focusTracker._elements]})}))})(t),function(t){t.on("execute",(e=>{e.source instanceof og||(t.isOpen=!1)}))}(t),function(t){t.focusTracker.on("change:isFocused",((e,n,o)=>{t.isOpen&&!o&&(t.isOpen=!1)}))}(t),function(t){t.keystrokes.set("arrowdown",((e,n)=>{t.isOpen&&(t.panelView.focus(),n())})),t.keystrokes.set("arrowup",((e,n)=>{t.isOpen&&(t.panelView.focusLast(),n())}))}(t),function(t){t.on("change:isOpen",((e,n,o)=>{if(o)return;const i=t.panelView.element;i&&i.contains(Bo.document.activeElement)&&t.buttonView.focus()}))}(t),function(t){t.on("change:isOpen",((e,n,o)=>{o&&t.panelView.focus()}),{priority:"low"})}(t)}(i),i}function $g(t,e,n={}){t.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),t.isOpen?Zg(t,e,n):t.once("change:isOpen",(()=>Zg(t,e,n)),{priority:"highest"}),n.enableActiveItemFocusOnDropdownOpen&&Xg(t,(()=>t.toolbarView.items.find((t=>t.isOn))))}function Zg(t,e,n){const o=t.locale,i=o.t,r=t.toolbarView=new Bg(o),s="function"==typeof e?e():e;r.ariaLabel=n.ariaLabel||i("Dropdown toolbar"),n.maxWidth&&(r.maxWidth=n.maxWidth),n.class&&(r.class=n.class),n.isCompact&&(r.isCompact=n.isCompact),n.isVertical&&(r.isVertical=!0),s instanceof _u?r.items.bindTo(s).using((t=>t)):r.items.addMany(s),t.panelView.children.add(r),r.items.delegate("execute").to(t)}function Qg(t,e,n={}){t.isOpen?Jg(t,e,n):t.once("change:isOpen",(()=>Jg(t,e,n)),{priority:"highest"}),Xg(t,(()=>t.listView.items.find((t=>t instanceof Rg&&t.children.first.isOn))))}function Jg(t,e,n){const o=t.locale,i=t.listView=new jg(o),r="function"==typeof e?e():e;i.ariaLabel=n.ariaLabel,i.role=n.role,i.items.bindTo(r).using((t=>{if("separator"===t.type)return new Fg(o);if("button"===t.type||"switchbutton"===t.type){const e=new Rg(o);let n;return n="button"===t.type?new tg(o):new og(o),n.bind(...Object.keys(t.model)).to(t.model),n.delegate("execute").to(e),e.children.add(n),e}return null})),t.panelView.children.add(i),i.items.delegate("execute").to(t)}function Xg(t,e){t.on("change:isOpen",(()=>{if(!t.isOpen)return;const n=e();n&&("function"==typeof n.focus?n.focus():b("ui-dropdown-focus-child-on-open-child-missing-focus",{view:n}))}),{priority:p.low-10})}function tp(t,e,n){const o=new mg(t.locale);return o.set({id:e,ariaDescribedById:n}),o.bind("isReadOnly").to(t,"isEnabled",(t=>!t)),o.bind("hasError").to(t,"errorText",(t=>!!t)),o.on("input",(()=>{t.errorText=null})),t.bind("isEmpty","isFocused","placeholder").to(o),o}const ep=(t,e=0,n=1)=>t>n?n:tMath.round(n*t)/n,op=(Math.PI,t=>("#"===t[0]&&(t=t.substring(1)),t.length<6?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:4===t.length?np(parseInt(t[3]+t[3],16)/255,2):1}:{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16),a:8===t.length?np(parseInt(t.substring(6,8),16)/255,2):1})),ip=({h:t,s:e,v:n,a:o})=>{const i=(200-e)*n/100;return{h:np(t),s:np(i>0&&i<200?e*n/100/(i<=100?i:200-i)*100:0),l:np(i/2),a:np(o,2)}},rp=t=>{const{h:e,s:n,l:o}=ip(t);return`hsl(${e}, ${n}%, ${o}%)`},sp=({h:t,s:e,v:n,a:o})=>{t=t/360*6,e/=100,n/=100;const i=Math.floor(t),r=n*(1-e),s=n*(1-(t-i)*e),a=n*(1-(1-t+i)*e),c=i%6;return{r:np(255*[n,s,r,r,a,n][c]),g:np(255*[a,n,n,s,r,r][c]),b:np(255*[r,r,a,n,n,s][c]),a:np(o,2)}},ap=t=>{const e=t.toString(16);return e.length<2?"0"+e:e},cp=({r:t,g:e,b:n,a:o})=>{const i=o<1?ap(np(255*o)):"";return"#"+ap(t)+ap(e)+ap(n)+i},lp=({r:t,g:e,b:n,a:o})=>{const i=Math.max(t,e,n),r=i-Math.min(t,e,n),s=r?i===t?(e-n)/r:i===e?2+(n-t)/r:4+(t-e)/r:0;return{h:np(60*(s<0?s+6:s)),s:np(i?r/i*100:0),v:np(i/255*100),a:o}},dp=(t,e)=>{if(t===e)return!0;for(const n in t)if(t[n]!==e[n])return!1;return!0},hp={},up=t=>{let e=hp[t];return e||(e=document.createElement("template"),e.innerHTML=t,hp[t]=e),e},gp=(t,e,n)=>{t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:n}))};let pp=!1;const mp=t=>"touches"in t,fp=(t,e)=>{const n=mp(e)?e.touches[0]:e,o=t.el.getBoundingClientRect();gp(t.el,"move",t.getMove({x:ep((n.pageX-(o.left+window.pageXOffset))/o.width),y:ep((n.pageY-(o.top+window.pageYOffset))/o.height)}))};class kp{constructor(t,e,n,o){const i=up(`
`);t.appendChild(i.content.cloneNode(!0));const r=t.querySelector(`[part=${e}]`);r.addEventListener("mousedown",this),r.addEventListener("touchstart",this),r.addEventListener("keydown",this),this.el=r,this.xy=o,this.nodes=[r.firstChild,r]}set dragging(t){const e=t?document.addEventListener:document.removeEventListener;e(pp?"touchmove":"mousemove",this),e(pp?"touchend":"mouseup",this)}handleEvent(t){switch(t.type){case"mousedown":case"touchstart":if(t.preventDefault(),!(t=>!(pp&&!mp(t)||(pp||(pp=mp(t)),0)))(t)||!pp&&0!=t.button)return;this.el.focus(),fp(this,t),this.dragging=!0;break;case"mousemove":case"touchmove":t.preventDefault(),fp(this,t);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":((t,e)=>{const n=e.keyCode;n>40||t.xy&&n<37||n<33||(e.preventDefault(),gp(t.el,"move",t.getMove({x:39===n?.01:37===n?-.01:34===n?.05:33===n?-.05:35===n?1:36===n?-1:0,y:40===n?.01:38===n?-.01:0},!0)))})(this,t)}}style(t){t.forEach(((t,e)=>{for(const n in t)this.nodes[e].style.setProperty(n,t[n])}))}}class bp extends kp{constructor(t){super(t,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:t}){this.h=t,this.style([{left:t/360*100+"%",color:rp({h:t,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${np(t)}`)}getMove(t,e){return{h:e?ep(this.h+360*t.x,0,360):360*t.x}}}class wp extends kp{constructor(t){super(t,"saturation",'aria-label="Color"',!0)}update(t){this.hsva=t,this.style([{top:100-t.v+"%",left:`${t.s}%`,color:rp(t)},{"background-color":rp({h:t.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${np(t.s)}%, Brightness ${np(t.v)}%`)}getMove(t,e){return{s:e?ep(this.hsva.s+100*t.x,0,100):100*t.x,v:e?ep(this.hsva.v-100*t.y,0,100):Math.round(100-100*t.y)}}}const Ap=Symbol("same"),Cp=Symbol("color"),_p=Symbol("hsva"),vp=Symbol("update"),yp=Symbol("parts"),xp=Symbol("css"),Ep=Symbol("sliders");class Dp extends HTMLElement{static get observedAttributes(){return["color"]}get[xp](){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[Ep](){return[wp,bp]}get color(){return this[Cp]}set color(t){if(!this[Ap](t)){const e=this.colorModel.toHsva(t);this[vp](e),this[Cp]=t}}constructor(){super();const t=up(``),e=this.attachShadow({mode:"open"});e.appendChild(t.content.cloneNode(!0)),e.addEventListener("move",this),this[yp]=this[Ep].map((t=>new t(e)))}connectedCallback(){if(this.hasOwnProperty("color")){const t=this.color;delete this.color,this.color=t}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(t,e,n){const o=this.colorModel.fromAttr(n);this[Ap](o)||(this.color=o)}handleEvent(t){const e=this[_p],n={...e,...t.detail};let o;this[vp](n),dp(n,e)||this[Ap](o=this.colorModel.fromHsva(n))||(this[Cp]=o,gp(this,"color-changed",{value:o}))}[Ap](t){return this.color&&this.colorModel.equal(t,this.color)}[vp](t){this[_p]=t,this[yp].forEach((e=>e.update(t)))}}const Ip={defaultColor:"#000",toHsva:t=>lp(op(t)),fromHsva:({h:t,s:e,v:n})=>cp(sp({h:t,s:e,v:n,a:1})),equal:(t,e)=>t.toLowerCase()===e.toLowerCase()||dp(op(t),op(e)),fromAttr:t=>t};class Sp extends Dp{get colorModel(){return Ip}}customElements.define("hex-color-picker",class extends Sp{});var Mp=n(3398),Tp={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Mp.Z,Tp);Mp.Z.locals;G(vi);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var Bp=n(4157),Np={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Bp.Z,Np);Bp.Z.locals;class Pp{constructor(t){this._components=new Map,this.editor=t}*names(){for(const t of this._components.values())yield t.originalName}add(t,e){this._components.set(zp(t),{callback:e,originalName:t})}create(t){if(!this.has(t))throw new k("componentfactory-item-missing",this,{name:t});return this._components.get(zp(t)).callback(this.editor.locale)}has(t){return this._components.has(zp(t))}}function zp(t){return String(t).toLowerCase()}var Op=n(8793),Lp={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Op.Z,Lp);Op.Z.locals;var jp=Object.defineProperty,Rp=Object.getOwnPropertySymbols,Fp=Object.prototype.hasOwnProperty,Vp=Object.prototype.propertyIsEnumerable,Up=(t,e,n)=>e in t?jp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hp=(t,e)=>{for(var n in e||(e={}))Fp.call(e,n)&&Up(t,n,e[n]);if(Rp)for(var n of Rp(e))Vp.call(e,n)&&Up(t,n,e[n]);return t};const Gp=qo("px"),qp=Bo.document.body,Wp=class extends xu{constructor(t){super(t);const e=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.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",e.to("position",(t=>`ck-balloon-panel_${t}`)),e.if("isVisible","ck-balloon-panel_visible"),e.if("withArrow","ck-balloon-panel_with-arrow"),e.to("class")],style:{top:e.to("top",Gp),left:e.to("left",Gp)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(t){this.show();const e=Wp.defaultPositions,n=Object.assign({},{element:this.element,positions:[e.southArrowNorth,e.southArrowNorthMiddleWest,e.southArrowNorthMiddleEast,e.southArrowNorthWest,e.southArrowNorthEast,e.northArrowSouth,e.northArrowSouthMiddleWest,e.northArrowSouthMiddleEast,e.northArrowSouthWest,e.northArrowSouthEast,e.viewportStickyNorth],limiter:qp,fitInViewport:!0},t),o=Wp._getOptimalPosition(n),i=parseInt(o.left),r=parseInt(o.top),s=o.name,a=o.config||{},{withArrow:c=!0}=a;this.top=r,this.left=i,this.position=s,this.withArrow=c}pin(t){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(t):this._stopPinning()},this._startPinning(t),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(t){this.attachTo(t);const e=Yp(t.target),n=t.limiter?Yp(t.limiter):qp;this.listenTo(Bo.document,"scroll",((o,i)=>{const r=i.target,s=e&&r.contains(e),a=n&&r.contains(n);!s&&!a&&e&&n||this.attachTo(t)}),{useCapture:!0}),this.listenTo(Bo.window,"resize",(()=>{this.attachTo(t)}))}_stopPinning(){this.stopListening(Bo.document,"scroll"),this.stopListening(Bo.window,"resize")}};let Kp=Wp;function Yp(t){return Co(t)?t:Po(t)?t.commonAncestorContainer:"function"==typeof t?Yp(t()):null}function $p(t={}){const{sideOffset:e=Kp.arrowSideOffset,heightOffset:n=Kp.arrowHeightOffset,stickyVerticalOffset:o=Kp.stickyVerticalOffset,config:i}=t;return{northWestArrowSouthWest:(t,n)=>Hp({top:r(t,n),left:t.left-e,name:"arrow_sw"},i&&{config:i}),northWestArrowSouthMiddleWest:(t,n)=>Hp({top:r(t,n),left:t.left-.25*n.width-e,name:"arrow_smw"},i&&{config:i}),northWestArrowSouth:(t,e)=>Hp({top:r(t,e),left:t.left-e.width/2,name:"arrow_s"},i&&{config:i}),northWestArrowSouthMiddleEast:(t,n)=>Hp({top:r(t,n),left:t.left-.75*n.width+e,name:"arrow_sme"},i&&{config:i}),northWestArrowSouthEast:(t,n)=>Hp({top:r(t,n),left:t.left-n.width+e,name:"arrow_se"},i&&{config:i}),northArrowSouthWest:(t,n)=>Hp({top:r(t,n),left:t.left+t.width/2-e,name:"arrow_sw"},i&&{config:i}),northArrowSouthMiddleWest:(t,n)=>Hp({top:r(t,n),left:t.left+t.width/2-.25*n.width-e,name:"arrow_smw"},i&&{config:i}),northArrowSouth:(t,e)=>Hp({top:r(t,e),left:t.left+t.width/2-e.width/2,name:"arrow_s"},i&&{config:i}),northArrowSouthMiddleEast:(t,n)=>Hp({top:r(t,n),left:t.left+t.width/2-.75*n.width+e,name:"arrow_sme"},i&&{config:i}),northArrowSouthEast:(t,n)=>Hp({top:r(t,n),left:t.left+t.width/2-n.width+e,name:"arrow_se"},i&&{config:i}),northEastArrowSouthWest:(t,n)=>Hp({top:r(t,n),left:t.right-e,name:"arrow_sw"},i&&{config:i}),northEastArrowSouthMiddleWest:(t,n)=>Hp({top:r(t,n),left:t.right-.25*n.width-e,name:"arrow_smw"},i&&{config:i}),northEastArrowSouth:(t,e)=>Hp({top:r(t,e),left:t.right-e.width/2,name:"arrow_s"},i&&{config:i}),northEastArrowSouthMiddleEast:(t,n)=>Hp({top:r(t,n),left:t.right-.75*n.width+e,name:"arrow_sme"},i&&{config:i}),northEastArrowSouthEast:(t,n)=>Hp({top:r(t,n),left:t.right-n.width+e,name:"arrow_se"},i&&{config:i}),southWestArrowNorthWest:t=>Hp({top:s(t),left:t.left-e,name:"arrow_nw"},i&&{config:i}),southWestArrowNorthMiddleWest:(t,n)=>Hp({top:s(t),left:t.left-.25*n.width-e,name:"arrow_nmw"},i&&{config:i}),southWestArrowNorth:(t,e)=>Hp({top:s(t),left:t.left-e.width/2,name:"arrow_n"},i&&{config:i}),southWestArrowNorthMiddleEast:(t,n)=>Hp({top:s(t),left:t.left-.75*n.width+e,name:"arrow_nme"},i&&{config:i}),southWestArrowNorthEast:(t,n)=>Hp({top:s(t),left:t.left-n.width+e,name:"arrow_ne"},i&&{config:i}),southArrowNorthWest:t=>Hp({top:s(t),left:t.left+t.width/2-e,name:"arrow_nw"},i&&{config:i}),southArrowNorthMiddleWest:(t,n)=>Hp({top:s(t),left:t.left+t.width/2-.25*n.width-e,name:"arrow_nmw"},i&&{config:i}),southArrowNorth:(t,e)=>Hp({top:s(t),left:t.left+t.width/2-e.width/2,name:"arrow_n"},i&&{config:i}),southArrowNorthMiddleEast:(t,n)=>Hp({top:s(t),left:t.left+t.width/2-.75*n.width+e,name:"arrow_nme"},i&&{config:i}),southArrowNorthEast:(t,n)=>Hp({top:s(t),left:t.left+t.width/2-n.width+e,name:"arrow_ne"},i&&{config:i}),southEastArrowNorthWest:t=>Hp({top:s(t),left:t.right-e,name:"arrow_nw"},i&&{config:i}),southEastArrowNorthMiddleWest:(t,n)=>Hp({top:s(t),left:t.right-.25*n.width-e,name:"arrow_nmw"},i&&{config:i}),southEastArrowNorth:(t,e)=>Hp({top:s(t),left:t.right-e.width/2,name:"arrow_n"},i&&{config:i}),southEastArrowNorthMiddleEast:(t,n)=>Hp({top:s(t),left:t.right-.75*n.width+e,name:"arrow_nme"},i&&{config:i}),southEastArrowNorthEast:(t,n)=>Hp({top:s(t),left:t.right-n.width+e,name:"arrow_ne"},i&&{config:i}),westArrowEast:(t,e)=>Hp({top:t.top+t.height/2-e.height/2,left:t.left-e.width-n,name:"arrow_e"},i&&{config:i}),eastArrowWest:(t,e)=>Hp({top:t.top+t.height/2-e.height/2,left:t.right+n,name:"arrow_w"},i&&{config:i}),viewportStickyNorth:(t,e,n)=>t.getIntersection(n)?{top:n.top+o,left:t.left+t.width/2-e.width/2,name:"arrowless",config:Hp({withArrow:!1},i)}:null};function r(t,e){return t.top-e.height-n}function s(t){return t.bottom+n}}Kp.arrowSideOffset=25,Kp.arrowHeightOffset=10,Kp.stickyVerticalOffset=20,Kp._getOptimalPosition=Qo,Kp.defaultPositions=$p();var Zp=n(3332),Qp={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Zp.Z,Qp);Zp.Z.locals;const Jp="ck-tooltip",Xp=class extends(Io()){constructor(t){if(super(),this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._resizeObserver=null,Xp._editors.add(t),Xp._instance)return Xp._instance;Xp._instance=this,this.tooltipTextView=new xu(t.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 Kp(t.locale),this.balloonPanelView.class=Jp,this.balloonPanelView.content.add(this.tooltipTextView),this._pinTooltipDebounced=La(this._pinTooltip,600),this.listenTo(Bo.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(Bo.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(Bo.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(Bo.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(Bo.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(t){const e=t.ui.view&&t.ui.view.body;Xp._editors.delete(t),this.stopListening(t.ui),e&&e.has(this.balloonPanelView)&&e.remove(this.balloonPanelView),Xp._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),Xp._instance=null)}static getPositioningFunctions(t){const e=Xp.defaultBalloonPositions;return{s:[e.southArrowNorth,e.southArrowNorthEast,e.southArrowNorthWest],n:[e.northArrowSouth],e:[e.eastArrowWest],w:[e.westArrowEast],sw:[e.southArrowNorthEast],se:[e.southArrowNorthWest]}[t]}_onEnterOrFocus(t,{target:e}){const n=em(e);var o;n&&(n!==this._currentElementWithTooltip&&(this._unpinTooltip(),this._pinTooltipDebounced(n,{text:(o=n).dataset.ckeTooltipText,position:o.dataset.ckeTooltipPosition||"s",cssClass:o.dataset.ckeTooltipClass||""})))}_onLeaveOrBlur(t,{target:e,relatedTarget:n}){if("mouseleave"===t.name){if(!Co(e))return;if(this._currentElementWithTooltip&&e!==this._currentElementWithTooltip)return;const t=em(e),o=em(n);t&&t!==o&&this._unpinTooltip()}else{if(this._currentElementWithTooltip&&e!==this._currentElementWithTooltip)return;this._unpinTooltip()}}_onScroll(t,{target:e}){this._currentElementWithTooltip&&(e.contains(this.balloonPanelView.element)&&e.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(t,{text:e,position:n,cssClass:o}){const i=yi(Xp._editors.values()).ui.view.body;i.has(this.balloonPanelView)||i.add(this.balloonPanelView),this.tooltipTextView.text=e,this.balloonPanelView.pin({target:t,positions:Xp.getPositioningFunctions(n)}),this._resizeObserver=new Ho(t,(()=>{$o(t)||this._unpinTooltip()})),this.balloonPanelView.class=[Jp,o].filter((t=>t)).join(" ");for(const t of Xp._editors)this.listenTo(t.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=t,this._currentTooltipPosition=n}_unpinTooltip(){this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const t of Xp._editors)this.stopListening(t.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._resizeObserver&&this._resizeObserver.destroy()}_updateTooltipPosition(){$o(this._currentElementWithTooltip)?this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:Xp.getPositioningFunctions(this._currentTooltipPosition)}):this._unpinTooltip()}};let tm=Xp;function em(t){return Co(t)?t.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}tm.defaultBalloonPositions=$p({heightOffset:5,sideOffset:13}),tm._editors=new Set,tm._instance=null;const nm=function(t,e,n){var o=!0,i=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return L(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),La(t,e,{leading:o,maxWait:e,trailing:i})};var om=Object.defineProperty,im=Object.getOwnPropertySymbols,rm=Object.prototype.hasOwnProperty,sm=Object.prototype.propertyIsEnumerable,am=(t,e,n)=>e in t?om(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cm=(t,e)=>{for(var n in e||(e={}))rm.call(e,n)&&am(t,n,e[n]);if(im)for(var n of im(e))sm.call(e,n)&&am(t,n,e[n]);return t};const lm=50,dm=350,hm="Powered by",um={top:-99999,left:-99999,name:"invalid",config:{withArrow:!1}};class gm extends(Io()){constructor(t){super(),this.editor=t,this._balloonView=null,this._lastFocusedEditableElement=null,this._showBalloonThrottled=nm(this._showBalloon.bind(this),50,{leading:!0}),t.on("ready",this._handleEditorReady.bind(this))}destroy(){const t=this._balloonView;t&&(t.unpin(),this._balloonView=null),this._showBalloonThrottled.cancel(),this.stopListening()}_handleEditorReady(){const t=this.editor;(!!t.config.get("ui.poweredBy.forceVisible")||"VALID"!==function(t){function e(t){return t.length>=40&&t.length<=255?"VALID":"INVALID"}if(!t)return"INVALID";let n="";try{n=atob(t)}catch(t){return"INVALID"}const o=n.split("-"),i=o[0],r=o[1];if(!r)return e(t);try{atob(r)}catch(n){try{if(atob(i),!atob(i).length)return e(t)}catch(n){return e(t)}}if(i.length<40||i.length>255)return"INVALID";let s="";try{atob(i),s=atob(r)}catch(t){return"INVALID"}if(8!==s.length)return"INVALID";const a=Number(s.substring(0,4)),c=Number(s.substring(4,6))-1,l=Number(s.substring(6,8)),d=new Date(a,c,l);return d{this._updateLastFocusedEditableElement(),n?this._showBalloon():this._hideBalloon()})),t.ui.focusTracker.on("change:focusedElement",((t,e,n)=>{this._updateLastFocusedEditableElement(),n&&this._showBalloon()})),t.ui.on("update",(()=>{this._showBalloonThrottled()})))}_createBalloonView(){const t=this.editor,e=this._balloonView=new Kp,n=fm(t),o=new pm(t.locale,n.label);e.content.add(o),e.set({class:"ck-powered-by-balloon"}),t.ui.view.body.add(e),t.ui.focusTracker.add(e.element),this._balloonView=e}_showBalloon(){if(!this._lastFocusedEditableElement)return;const t=function(t,e){const n=fm(t),o="right"===n.side?function(t,e){return mm(t,e,((t,n)=>t.left+t.width-n.width-e.horizontalOffset))}(e,n):function(t,e){return mm(t,e,(t=>t.left+e.horizontalOffset))}(e,n);return{target:e,positions:[o]}}(this.editor,this._lastFocusedEditableElement);t&&(this._balloonView||this._createBalloonView(),this._balloonView.pin(t))}_hideBalloon(){this._balloonView&&this._balloonView.unpin()}_updateLastFocusedEditableElement(){const t=this.editor,e=t.ui.focusTracker.isFocused,n=t.ui.focusTracker.focusedElement;if(!e||!n)return void(this._lastFocusedEditableElement=null);const o=Array.from(t.ui.getEditableElementsNames()).map((e=>t.ui.getEditableElement(e)));o.includes(n)?this._lastFocusedEditableElement=n:this._lastFocusedEditableElement=o[0]}}class pm extends xu{constructor(t,e){super(t);const n=new Qu,o=this.bindTemplate;n.set({content:'\n',isColorInherited:!1}),n.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:[...e?[{tag:"span",attributes:{class:["ck","ck-powered-by__label"]},children:[e]}]:[],n],on:{dragstart:o.to((t=>t.preventDefault()))}}]})}}function mm(t,e,n){return(o,i)=>{const r=o.getVisible();if(!r)return um;if(o.widtht.bottom,a="left"===e.side?o.leftt.right;if(s||a)return um}}return{top:s,left:a,name:`position_${e.position}-side_${e.side}`,config:{withArrow:!1}}}}function fm(t){const e=t.config.get("ui.poweredBy"),n=e&&e.position||"border";return cm({position:n,label:hm,verticalOffset:"inside"===n?5:0,horizontalOffset:5,side:"ltr"===t.locale.contentLanguageDirection?"right":"left"},e)}var km=Object.defineProperty,bm=Object.getOwnPropertySymbols,wm=Object.prototype.hasOwnProperty,Am=Object.prototype.propertyIsEnumerable,Cm=(t,e,n)=>e in t?km(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class _m extends(G()){constructor(t){super(),this.isReady=!1,this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[];const e=t.editing.view;this.editor=t,this.componentFactory=new Pp(t),this.focusTracker=new xi,this.tooltipManager=new tm(t),this.poweredBy=new gm(t),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.once("ready",(()=>{this.isReady=!0})),this.listenTo(e.document,"layoutChanged",this.update.bind(this)),this.listenTo(e,"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 t of this._editableElementsMap.values())t.ckeditorInstance=null,this.editor.keystrokes.stopListening(t);this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[]}setEditableElement(t,e){this._editableElementsMap.set(t,e),e.ckeditorInstance||(e.ckeditorInstance=this.editor),this.focusTracker.add(e);const n=()=>{this.editor.editing.view.getDomRoot(t)||this.editor.keystrokes.listenTo(e)};this.isReady?n():this.once("ready",n)}removeEditableElement(t){const e=this._editableElementsMap.get(t);e&&(this._editableElementsMap.delete(t),this.editor.keystrokes.stopListening(e),this.focusTracker.remove(e),e.ckeditorInstance=null)}getEditableElement(t="main"){return this._editableElementsMap.get(t)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(t,e={}){t.isRendered?(this.focusTracker.add(t.element),this.editor.keystrokes.listenTo(t.element)):t.once("render",(()=>{this.focusTracker.add(t.element),this.editor.keystrokes.listenTo(t.element)})),this._focusableToolbarDefinitions.push({toolbarView:t,options: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}_readViewportOffsetFromConfig(){const t=this.editor,e=t.config.get("ui.viewportOffset");if(e)return e;const n=t.config.get("toolbar.viewportTopOffset");return n?(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:n}):{top:0}}_initFocusTracking(){const t=this.editor,e=t.editing.view;let n,o;t.keystrokes.set("Alt+F10",((t,i)=>{const r=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(r)&&!Array.from(e.domRoots.values()).includes(r)&&(n=r);const s=this._getCurrentFocusedToolbarDefinition();s&&o||(o=this._getFocusableCandidateToolbarDefinitions());for(let t=0;t{const i=this._getCurrentFocusedToolbarDefinition();i&&(n?(n.focus(),n=null):t.editing.view.focus(),i.options.afterBlur&&i.options.afterBlur(),o())}))}_getFocusableCandidateToolbarDefinitions(){const t=[];for(const e of this._focusableToolbarDefinitions){const{toolbarView:n,options:o}=e;($o(n.element)||o.beforeFocus)&&t.push(e)}return t.sort(((t,e)=>vm(t)-vm(e))),t}_getCurrentFocusedToolbarDefinition(){for(const t of this._focusableToolbarDefinitions)if(t.toolbarView.element&&t.toolbarView.element.contains(this.focusTracker.focusedElement))return t;return null}_focusFocusableCandidateToolbar(t){const{toolbarView:e,options:{beforeFocus:n}}=t;return n&&n(),!!$o(e.element)&&(e.focus(),!0)}_handleScrollToTheSelection(t,e){const n=((t,e)=>{for(var n in e||(e={}))wm.call(e,n)&&Cm(t,n,e[n]);if(bm)for(var n of bm(e))Am.call(e,n)&&Cm(t,n,e[n]);return t})({top:0,bottom:0,left:0,right:0},this.viewportOffset);e.viewportOffset.top+=n.top,e.viewportOffset.bottom+=n.bottom,e.viewportOffset.left+=n.left,e.viewportOffset.right+=n.right}}function vm(t){const{toolbarView:e,options:n}=t;let o=10;return $o(e.element)&&o--,n.isContextual&&o--,o}var ym=n(9688),xm={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(ym.Z,xm);ym.Z.locals;class Em extends xu{constructor(t){super(t),this.body=new Ku(t)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}class Dm extends xu{constructor(t,e,n){super(t),this.name=null,this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:t.contentLanguage,dir:t.contentLanguageDirection}}),this.set("isFocused",!1),this._editableElement=n,this._hasExternalElement=!!this._editableElement,this._editingView=e}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 t=this._editingView;function e(e){t.change((n=>{const o=t.document.getRoot(e.name);n.addClass(e.isFocused?"ck-focused":"ck-blurred",o),n.removeClass(e.isFocused?"ck-blurred":"ck-focused",o)}))}t.isRenderingInProgress?function n(o){t.once("change:isRenderingInProgress",((t,i,r)=>{r?n(o):e(o)}))}(this):e(this)}}class Im extends Dm{constructor(t,e,n,o={}){super(t,e,n);const i=t.t;this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}}),this._generateLabel=o.label||(()=>i("Editor editing area: %0",this.name))}render(){super.render();const t=this._editingView;t.change((e=>{const n=t.document.getRoot(this.name);e.setAttribute("aria-label",this._generateLabel(this),n)}))}}var Sm=n(8847),Mm={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Sm.Z,Mm);Sm.Z.locals;class Tm extends Fi{static get pluginName(){return"Notification"}init(){this.on("show:warning",((t,e)=>{window.alert(e.message)}),{priority:"lowest"})}showSuccess(t,e={}){this._showNotification({message:t,type:"success",namespace:e.namespace,title:e.title})}showInfo(t,e={}){this._showNotification({message:t,type:"info",namespace:e.namespace,title:e.title})}showWarning(t,e={}){this._showNotification({message:t,type:"warning",namespace:e.namespace,title:e.title})}_showNotification(t){const e=t.namespace?`show:${t.type}:${t.namespace}`:`show:${t.type}`;this.fire(e,{message:t.message,type:t.type,title:t.title||""})}}class Bm extends(G()){constructor(t,e){super(),e&&Ca(this,e),t&&this.set(t)}}var Nm=n(4650),Pm={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Nm.Z,Pm);Nm.Z.locals;var zm=n(7676),Om={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(zm.Z,Om);zm.Z.locals;const Lm=qo("px");class jm extends Ni{constructor(t){super(t),this._viewToStack=new Map,this._idToStack=new Map,this._view=null,this._rotatorView=null,this._fakePanelsView=null,this.positionLimiter=()=>{const t=this.editor.editing.view,e=t.document.selection.editableElement;return e?t.domConverter.mapViewToDom(e.root):null},this.set("visibleView",null),this.set("_numberOfStacks",0),this.set("_singleViewMode",!1)}static get pluginName(){return"ContextualBalloon"}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(t){return Array.from(this._viewToStack.keys()).includes(t)}add(t){if(this._view||this._createPanelView(),this.hasView(t.view))throw new k("contextualballoon-add-view-exist",[this,t]);const e=t.stackId||"main";if(!this._idToStack.has(e))return this._idToStack.set(e,new Map([[t.view,t]])),this._viewToStack.set(t.view,this._idToStack.get(e)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!t.singleViewMode||this.showStack(e));const n=this._idToStack.get(e);t.singleViewMode&&this.showStack(e),n.set(t.view,t),this._viewToStack.set(t.view,n),n===this._visibleStack&&this._showView(t)}remove(t){if(!this.hasView(t))throw new k("contextualballoon-remove-view-not-exist",[this,t]);const e=this._viewToStack.get(t);this._singleViewMode&&this.visibleView===t&&(this._singleViewMode=!1),this.visibleView===t&&(1===e.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(e.values())[e.size-2])),1===e.size?(this._idToStack.delete(this._getStackId(e)),this._numberOfStacks=this._idToStack.size):e.delete(t),this._viewToStack.delete(t)}updatePosition(t){t&&(this._visibleStack.get(this.visibleView).position=t),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(t){this.visibleStack=t;const e=this._idToStack.get(t);if(!e)throw new k("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==e&&this._showView(Array.from(e.values()).pop())}_createPanelView(){this._view=new Kp(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(t){return Array.from(this._idToStack.entries()).find((e=>e[1]===t))[0]}_showNextStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)+1;t[e]||(e=0),this.showStack(this._getStackId(t[e]))}_showPrevStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)-1;t[e]||(e=t.length-1),this.showStack(this._getStackId(t[e]))}_createRotatorView(){const t=new Rm(this.editor.locale),e=this.editor.locale.t;return this.view.content.add(t),t.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",((t,e)=>!e&&t>1)),t.on("change:isNavigationVisible",(()=>this.updatePosition()),{priority:"low"}),t.bind("counter").to(this,"visibleView",this,"_numberOfStacks",((t,n)=>{if(n<2)return"";const o=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return e("%0 of %1",[o,n])})),t.buttonNextView.on("execute",(()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()})),t.buttonPrevView.on("execute",(()=>{t.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()})),t}_createFakePanelsView(){const t=new Fm(this.editor.locale,this.view);return t.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",((t,e)=>!e&&t>=2?Math.min(t-1,2):0)),t.listenTo(this.view,"change:top",(()=>t.updatePosition())),t.listenTo(this.view,"change:left",(()=>t.updatePosition())),this.editor.ui.view.body.add(t),t}_showView({view:t,balloonClassName:e="",withArrow:n=!0,singleViewMode:o=!1}){this.view.class=e,this.view.withArrow=n,this._rotatorView.showView(t),this.visibleView=t,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),o&&(this._singleViewMode=!0)}_getBalloonPosition(){let t=Array.from(this._visibleStack.values()).pop().position;return t&&(t.limiter||(t=Object.assign({},t,{limiter:this.positionLimiter})),t=Object.assign({},t,{viewportOffsetConfig:this.editor.ui.viewportOffset})),t}}class Rm extends xu{constructor(t){super(t);const e=t.t,n=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new xi,this.buttonPrevView=this._createButtonView(e("Previous"),''),this.buttonNextView=this._createButtonView(e("Next"),''),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",n.to("isNavigationVisible",(t=>t?"":"ck-hidden"))]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:n.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(t){this.hideView(),this.content.add(t)}hideView(){this.content.clear()}_createButtonView(t,e){const n=new tg(this.locale);return n.set({label:t,icon:e,tooltip:!0}),n}}class Fm extends xu{constructor(t,e){super(t);const n=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=e,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",n.to("numberOfPanels",(t=>t?"":"ck-hidden"))],style:{top:n.to("top",Lm),left:n.to("left",Lm),width:n.to("width",Lm),height:n.to("height",Lm)}},children:this.content}),this.on("change:numberOfPanels",((t,e,n,o)=>{n>o?this._addPanels(n-o):this._removePanels(o-n),this.updatePosition()}))}_addPanels(t){for(;t--;){const t=new xu;t.setTemplate({tag:"div"}),this.content.add(t),this.registerChild(t)}}_removePanels(t){for(;t--;){const t=this.content.last;this.content.remove(t),this.deregisterChild(t),t.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:t,left:e}=this._balloonPanelView,{width:n,height:o}=new Lo(this._balloonPanelView.element);Object.assign(this,{top:t,left:e,width:n,height:o})}}}var Vm=n(5868),Um={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Vm.Z,Um);Vm.Z.locals,qo("px");const Hm=qo("px");class Gm extends Ni{constructor(t){super(t),this._resizeObserver=null,this._balloonConfig=Dg(t.config.get("balloonToolbar")),this.toolbarView=this._createToolbarView(),this.focusTracker=new xi,t.ui.once("ready",(()=>{this.focusTracker.add(t.ui.getEditableElement()),this.focusTracker.add(this.toolbarView.element)})),t.ui.addToolbar(this.toolbarView,{beforeFocus:()=>this.show(!0),afterBlur:()=>this.hide(),isContextual:!0}),this._balloon=t.plugins.get(jm),this._fireSelectionChangeDebounced=La((()=>this.fire("_selectionChangeDebounced")),200),this.decorate("show")}static get pluginName(){return"BalloonToolbar"}static get requires(){return[jm]}init(){const t=this.editor,e=t.model.document.selection;this.listenTo(this.focusTracker,"change:isFocused",((t,e,n)=>{const o=this._balloon.visibleView===this.toolbarView;!n&&o?this.hide():n&&this.show()})),this.listenTo(e,"change:range",((t,n)=>{(n.directChange||e.isCollapsed)&&this.hide(),this._fireSelectionChangeDebounced()})),this.listenTo(this,"_selectionChangeDebounced",(()=>{this.editor.editing.view.document.isFocused&&this.show()})),this._balloonConfig.shouldNotGroupWhenFull||this.listenTo(t,"ready",(()=>{const e=t.ui.view.editable.element;this._resizeObserver=new Ho(e,(t=>{this.toolbarView.maxWidth=Hm(.9*t.contentRect.width)}))})),this.listenTo(this.toolbarView,"groupedItemsUpdate",(()=>{this._updatePosition()}))}afterInit(){const t=this.editor.ui.componentFactory;this.toolbarView.fillFromConfig(this._balloonConfig,t)}_createToolbarView(){const t=this.editor.locale.t,e=!this._balloonConfig.shouldNotGroupWhenFull,n=new Bg(this.editor.locale,{shouldGroupWhenFull:e,isFloating:!0});return n.ariaLabel=t("Editor contextual toolbar"),n.render(),n}show(t=!1){const e=this.editor,n=e.model.document.selection,o=e.model.schema;this._balloon.hasView(this.toolbarView)||n.isCollapsed&&!t||function(t,e){if(1===t.rangeCount)return!1;return[...t.getRanges()].every((t=>{const n=t.getContainedElement();return n&&e.isSelectable(n)}))}(n,o)||Array.from(this.toolbarView.items).every((t=>void 0!==t.isEnabled&&!t.isEnabled))||(this.listenTo(this.editor.ui,"update",(()=>{this._updatePosition()})),this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:"ck-toolbar-container"}))}hide(){this._balloon.hasView(this.toolbarView)&&(this.stopListening(this.editor.ui,"update"),this._balloon.remove(this.toolbarView))}_getBalloonPositionData(){const t=this.editor.editing.view,e=t.document,n=e.selection,o=e.selection.isBackward;return{target:()=>{const e=o?n.getFirstRange():n.getLastRange(),i=Lo.getDomRangeRects(t.domConverter.viewRangeToDom(e));return o?i[0]:(i.length>1&&0===i[i.length-1].width&&i.pop(),i[i.length-1])},positions:this._getBalloonPositions(o)}}_updatePosition(){this._balloon.updatePosition(this._getBalloonPositionData())}destroy(){super.destroy(),this.stopListening(),this._fireSelectionChangeDebounced.cancel(),this.toolbarView.destroy(),this.focusTracker.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_getBalloonPositions(t){const e=i.isSafari&&i.isiOS?$p({heightOffset:Math.max(Kp.arrowHeightOffset,Math.round(20/Bo.window.visualViewport.scale))}):Kp.defaultPositions;return t?[e.northWestArrowSouth,e.northWestArrowSouthWest,e.northWestArrowSouthEast,e.northWestArrowSouthMiddleEast,e.northWestArrowSouthMiddleWest,e.southWestArrowNorth,e.southWestArrowNorthWest,e.southWestArrowNorthEast,e.southWestArrowNorthMiddleWest,e.southWestArrowNorthMiddleEast]:[e.southEastArrowNorth,e.southEastArrowNorthEast,e.southEastArrowNorthWest,e.southEastArrowNorthMiddleEast,e.southEastArrowNorthMiddleWest,e.northEastArrowSouth,e.northEastArrowSouthEast,e.northEastArrowSouthWest,e.northEastArrowSouthMiddleEast,e.northEastArrowSouthMiddleWest]}}var qm=n(9695),Wm={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(qm.Z,Wm);qm.Z.locals;const Km=qo("px");class Ym extends tg{constructor(t){super(t);const e=this.bindTemplate;this.isVisible=!1,this.isToggleable=!0,this.set("top",0),this.set("left",0),this.extendTemplate({attributes:{class:"ck-block-toolbar-button",style:{top:e.to("top",(t=>Km(t))),left:e.to("left",(t=>Km(t)))}}})}}const $m=qo("px"),{pilcrow:Zm}=bu;class Qm{constructor(t){if(this.crashes=[],this.state="initializing",this._now=Date.now,this.crashes=[],this._crashNumberLimit="number"==typeof t.crashNumberLimit?t.crashNumberLimit:3,this._minimumNonErrorTimePeriod="number"==typeof t.minimumNonErrorTimePeriod?t.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=t=>{const e="error"in t?t.error:t.reason;e instanceof Error&&this._handleError(e,t)},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(t,e){this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e)}off(t,e){this._listeners[t]=this._listeners[t].filter((t=>t!==e))}_fire(t,...e){const n=this._listeners[t]||[];for(const t of n)t.apply(this,[null,...e])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(t,e){if(this._shouldReactToError(t)){this.crashes.push({message:t.message,stack:t.stack,filename:e instanceof ErrorEvent?e.filename:void 0,lineno:e instanceof ErrorEvent?e.lineno:void 0,colno:e instanceof ErrorEvent?e.colno:void 0,date:this._now()});const n=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:t,causesRestart:n}),n?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(t){return t.is&&t.is("CKEditorError")&&void 0!==t.context&&null!==t.context&&"ready"===this.state&&this._isErrorComingFromThisItem(t)}_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 Jm(t,e=new Set){const n=[t],o=new Set;let i=0;for(;n.length>i;){const t=n[i++];if(!o.has(t)&&Xm(t)&&!e.has(t))if(o.add(t),Symbol.iterator in t)try{for(const e of t)n.push(e)}catch(t){}else for(const e in t)"defaultValue"!==e&&n.push(t[e])}return o}function Xm(t){const e=Object.prototype.toString.call(t),n=typeof t;return!("number"===n||"boolean"===n||"string"===n||"symbol"===n||"function"===n||"[object Date]"===e||"[object RegExp]"===e||"[object Module]"===e||null==t||t._watchdogExcluded||t instanceof EventTarget||t instanceof Event)}function tf(t,e,n=new Set){if(t===e&&("object"==typeof(o=t)&&null!==o))return!0;var o;const i=Jm(t,n),r=Jm(e,n);for(const t of i)if(r.has(t))return!0;return!1}var ef=Object.defineProperty,nf=Object.defineProperties,of=Object.getOwnPropertyDescriptors,rf=Object.getOwnPropertySymbols,sf=Object.prototype.hasOwnProperty,af=Object.prototype.propertyIsEnumerable,cf=(t,e,n)=>e in t?ef(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lf=(t,e)=>{for(var n in e||(e={}))sf.call(e,n)&&cf(t,n,e[n]);if(rf)for(var n of rf(e))af.call(e,n)&&cf(t,n,e[n]);return t};class df extends Qm{constructor(t,e={}){super(e),this._editor=null,this._initUsingData=!0,this._editables={},this._throttledSave=nm(this._save.bind(this),"number"==typeof e.saveInterval?e.saveInterval:5e3),t&&(this._creator=(e,n)=>t.create(e,n)),this._destructor=t=>t.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(t){this._creator=t}setDestructor(t){this._destructor=t}_restart(){return Promise.resolve().then((()=>(this.state="initializing",this._fire("stateChange"),this._destroy()))).catch((t=>{console.error("An error happened during the editor destroying.",t)})).then((()=>{const t={},e=[],n=this._config.rootsAttributes||{},o={};for(const[i,r]of Object.entries(this._data.roots))r.isLoaded?(t[i]="",o[i]=n[i]||{}):e.push(i);const i=(r=lf({},this._config),s={extraPlugins:this._config.extraPlugins||[],lazyRoots:e,rootsAttributes:o,_watchdogInitialData:this._data},nf(r,of(s)));var r,s;return delete i.initialData,i.extraPlugins.push(hf),this._initUsingData?this.create(t,i,i.context):Co(this._elementOrData)?this.create(this._elementOrData,i,i.context):this.create(this._editables,i,i.context)})).then((()=>{this._fire("restart")}))}create(t=this._elementOrData,e=this._config,n){return Promise.resolve().then((()=>(super._startErrorHandling(),this._elementOrData=t,this._initUsingData="string"==typeof t||Object.keys(t).length>0&&"string"==typeof Object.values(t)[0],this._config=this._cloneEditorConfiguration(e)||{},this._config.context=n,this._creator(t,this._config)))).then((t=>{this._editor=t,t.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=t.model.document.version,this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this.state="ready",this._fire("stateChange")}))}destroy(){return Promise.resolve().then((()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling(),this._throttledSave.cancel();const t=this._editor;return this._editor=null,t.model.document.off("change:data",this._throttledSave),this._destructor(t)}))}_save(){const t=this._editor.model.document.version;try{this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this._lastDocumentVersion=t}catch(t){console.error(t,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(t){this._excludedProps=t}_getData(){const t=this._editor,e=t.model.document.roots.filter((t=>t.isAttached()&&"$graveyard"!=t.rootName)),{plugins:n}=t,o=n.has("CommentsRepository")&&n.get("CommentsRepository"),i=n.has("TrackChanges")&&n.get("TrackChanges"),r={roots:{},markers:{},commentThreads:JSON.stringify([]),suggestions:JSON.stringify([])};e.forEach((t=>{r.roots[t.rootName]={content:JSON.stringify(Array.from(t.getChildren())),attributes:JSON.stringify(Array.from(t.getAttributes())),isLoaded:t._isLoaded}}));for(const e of t.model.markers)e._affectsData&&(r.markers[e.name]={rangeJSON:e.getRange().toJSON(),usingOperation:e._managedUsingOperations,affectsData:e._affectsData});return o&&(r.commentThreads=JSON.stringify(o.getCommentThreads({toJSON:!0,skipNotAttached:!0}))),i&&(r.suggestions=JSON.stringify(i.getSuggestions({toJSON:!0,skipNotAttached:!0}))),r}_getEditables(){const t={};for(const e of this.editor.model.document.getRootNames()){const n=this.editor.ui.getEditableElement(e);n&&(t[e]=n)}return t}_isErrorComingFromThisItem(t){return tf(this._editor,t.context,this._excludedProps)}_cloneEditorConfiguration(t){return Ao(t,((t,e)=>Co(t)||"context"===e?t:void 0))}}class hf{constructor(t){this.editor=t,this._data=t.config.get("_watchdogInitialData")}init(){this.editor.data.on("init",(t=>{t.stop(),this.editor.model.enqueueChange({isUndoable:!1},(t=>{this._restoreCollaborationData(),this._restoreEditorData(t)})),this.editor.data.fire("ready")}),{priority:999})}_createNode(t,e){if("name"in e){const n=t.createElement(e.name,e.attributes);if(e.children)for(const o of e.children)n._appendChild(this._createNode(t,o));return n}return t.createText(e.data,e.attributes)}_restoreEditorData(t){const e=this.editor;Object.entries(this._data.roots).forEach((([n,{content:o,attributes:i}])=>{const r=JSON.parse(o),s=JSON.parse(i),a=e.model.document.getRoot(n);for(const[e,n]of s)t.setAttribute(e,n,a);for(const e of r){const n=this._createNode(t,e);t.insert(n,a,"end")}})),Object.entries(this._data.markers).forEach((([n,o])=>{const{document:i}=e.model,r=o,{rangeJSON:{start:s,end:a}}=r,c=((t,e)=>{var n={};for(var o in t)sf.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&rf)for(var o of rf(t))e.indexOf(o)<0&&af.call(t,o)&&(n[o]=t[o]);return n})(r,["rangeJSON"]),l=i.getRoot(s.root),d=t.createPositionFromPath(l,s.path,s.stickiness),h=t.createPositionFromPath(l,a.path,a.stickiness),u=t.createRange(d,h);t.addMarker(n,lf({range:u},c))}))}_restoreCollaborationData(){const t=JSON.parse(this._data.commentThreads),e=JSON.parse(this._data.suggestions);t.forEach((t=>{const e=this.editor.config.get("collaboration.channelId"),n=this.editor.plugins.get("CommentsRepository");if(n.hasCommentThread(t.threadId)){n.getCommentThread(t.threadId).remove()}n.addCommentThread(lf({channelId:e},t))})),e.forEach((t=>{const e=this.editor.plugins.get("TrackChangesEditing");if(e.hasSuggestion(t.id)){e.getSuggestion(t.id).attributes=t.attributes}else e.addSuggestionData(t)}))}}const uf=Symbol("MainQueueId");class gf{constructor(){this._onEmptyCallbacks=[],this._queues=new Map,this._activeActions=0}onEmpty(t){this._onEmptyCallbacks.push(t)}enqueue(t,e){const n=t===uf;this._activeActions++,this._queues.get(t)||this._queues.set(t,Promise.resolve());const o=(n?Promise.all(this._queues.values()):Promise.all([this._queues.get(uf),this._queues.get(t)])).then(e),i=o.catch((()=>{}));return this._queues.set(t,i),o.finally((()=>{this._activeActions--,this._queues.get(t)===i&&0===this._activeActions&&this._onEmptyCallbacks.forEach((t=>t()))}))}}function pf(t){return Array.isArray(t)?t:[t]}class mf extends _m{constructor(t,e){super(t),this.view=e}get element(){return this.view.editable.element}init(){const t=this.editor,e=this.view,n=t.editing.view,o=e.editable,i=n.document.getRoot();o.name=i.rootName,e.render();const r=o.element;this.setEditableElement(o.name,r),o.bind("isFocused").to(this.focusTracker),n.attachDomRoot(r),this._initPlaceholder(),this.fire("ready")}destroy(){super.destroy();const t=this.view;this.editor.editing.view.detachDomRoot(t.editable.name),t.destroy()}_initPlaceholder(){const t=this.editor,e=t.editing.view,n=e.document.getRoot(),o=t.config.get("placeholder");if(o){const t="string"==typeof o?o:o[n.rootName];t&&(n.placeholder=t)}Yi({view:e,element:n,isDirectHost:!1,keepOnFocus:!0})}}class ff extends Em{constructor(t,e,n){super(t);const o=t.t;this.editable=new Im(t,e,n,{label:t=>o("Rich Text Editor. Editing area: %0",t.name)})}render(){super.render(),this.registerChild(this.editable)}}class kf extends(mu(fu(pu))){constructor(t,e={}){if(!bf(t)&&void 0!==e.initialData)throw new k("editor-create-initial-data",null);super(e),void 0===this.config.get("initialData")&&this.config.set("initialData",function(t){return bf(t)?(e=t,e instanceof HTMLTextAreaElement?e.value:e.innerHTML):t;var e}(t)),bf(t)&&(this.sourceElement=t,function(t,e){if(e.ckeditorInstance)throw new k("editor-source-element-already-used",t);e.ckeditorInstance=t,t.once("destroy",(()=>{delete e.ckeditorInstance}))}(this,t));const n=this.config.get("plugins");n.push(Gm),this.config.set("plugins",n),this.config.define("balloonToolbar",this.config.get("toolbar")),this.model.document.createRoot();const o=new ff(this.locale,this.editing.view,this.sourceElement);this.ui=new mf(this,o),function(t){if(!jt(t.updateSourceElement))throw new k("attachtoform-missing-elementapi-interface",t);const e=t.sourceElement;if(function(t){return!!t&&"textarea"===t.tagName.toLowerCase()}(e)&&e.form){let n;const o=e.form,i=()=>t.updateSourceElement();jt(o.submit)&&(n=o.submit,o.submit=()=>{i(),n.apply(o)}),o.addEventListener("submit",i),t.on("destroy",(()=>{o.removeEventListener("submit",i),n&&(o.submit=n)}))}}(this)}destroy(){const t=this.getData();return this.ui.destroy(),super.destroy().then((()=>{this.sourceElement&&this.updateSourceElement(t)}))}static create(t,e={}){return new Promise((n=>{if(bf(t)&&"TEXTAREA"===t.tagName)throw new k("editor-wrong-element",null);const o=new this(t,e);n(o.initPlugins().then((()=>o.ui.init())).then((()=>o.data.init(o.config.get("initialData")))).then((()=>o.fire("ready"))).then((()=>o)))}))}}function bf(t){return Co(t)}kf.Context=Ri,kf.EditorWatchdog=df,kf.ContextWatchdog=class extends Qm{constructor(t,e={}){super(e),this._watchdogs=new Map,this._context=null,this._contextProps=new Set,this._actionQueues=new gf,this._watchdogConfig=e,this._creator=e=>t.create(e),this._destructor=t=>t.destroy(),this._actionQueues.onEmpty((()=>{"initializing"===this.state&&(this.state="ready",this._fire("stateChange"))}))}setCreator(t){this._creator=t}setDestructor(t){this._destructor=t}get context(){return this._context}create(t={}){return this._actionQueues.enqueue(uf,(()=>(this._contextConfig=t,this._create())))}getItem(t){return this._getWatchdog(t)._item}getItemState(t){return this._getWatchdog(t).state}add(t){const e=pf(t);return Promise.all(e.map((t=>this._actionQueues.enqueue(t.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 e;if(this._watchdogs.has(t.id))throw new Error(`Item with the given id is already added: '${t.id}'.`);if("editor"===t.type)return e=new df(null,this._watchdogConfig),e.setCreator(t.creator),e._setExcludedProperties(this._contextProps),t.destructor&&e.setDestructor(t.destructor),this._watchdogs.set(t.id,e),e.on("error",((n,{error:o,causesRestart:i})=>{this._fire("itemError",{itemId:t.id,error:o}),i&&this._actionQueues.enqueue(t.id,(()=>new Promise((n=>{const o=()=>{e.off("restart",o),this._fire("itemRestart",{itemId:t.id}),n()};e.on("restart",o)}))))})),e.create(t.sourceElementOrData,t.config,this._context);throw new Error(`Not supported item type: '${t.type}'.`)})))))}remove(t){const e=pf(t);return Promise.all(e.map((t=>this._actionQueues.enqueue(t,(()=>{const e=this._getWatchdog(t);return this._watchdogs.delete(t),e.destroy()})))))}destroy(){return this._actionQueues.enqueue(uf,(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())))}_restart(){return this._actionQueues.enqueue(uf,(()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch((t=>{console.error("An error happened during destroying the context or items.",t)})).then((()=>this._create())).then((()=>this._fire("restart"))))))}_create(){return Promise.resolve().then((()=>(this._startErrorHandling(),this._creator(this._contextConfig)))).then((t=>(this._context=t,this._contextProps=Jm(this._context),Promise.all(Array.from(this._watchdogs.values()).map((t=>(t._setExcludedProperties(this._contextProps),t.create(void 0,void 0,this._context))))))))}_destroy(){return Promise.resolve().then((()=>{this._stopErrorHandling();const t=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map((t=>t.destroy()))).then((()=>this._destructor(t)))}))}_getWatchdog(t){const e=this._watchdogs.get(t);if(!e)throw new Error(`Item with the given id was not registered: ${t}.`);return e}_isErrorComingFromThisItem(t){for(const e of this._watchdogs.values())if(e._isErrorComingFromThisItem(t))return!1;return tf(this._context,t.context)}};class wf extends va{constructor(t){super(t),this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"];const e=this.document;function n(t){return(n,o)=>{o.preventDefault();const i=o.dropRange?[o.dropRange]:null,r=new h(e,t);e.fire(r,{dataTransfer:o.dataTransfer,method:n.name,targetRanges:i,target:o.target,domEvent:o.domEvent}),r.stop.called&&o.stopPropagation()}}this.listenTo(e,"paste",n("clipboardInput"),{priority:"low"}),this.listenTo(e,"drop",n("clipboardInput"),{priority:"low"}),this.listenTo(e,"dragover",n("dragging"),{priority:"low"})}onDomEvent(t){const e="clipboardData"in t?t.clipboardData:t.dataTransfer,n="drop"==t.type||"paste"==t.type,o={dataTransfer:new hc(e,{cacheFiles:n})};"drop"!=t.type&&"dragover"!=t.type||(o.dropRange=function(t,e){const n=e.target.ownerDocument,o=e.clientX,i=e.clientY;let r;n.caretRangeFromPoint&&n.caretRangeFromPoint(o,i)?r=n.caretRangeFromPoint(o,i):e.rangeParent&&(r=n.createRange(),r.setStart(e.rangeParent,e.rangeOffset),r.collapse(!0));if(r)return t.domConverter.domRangeToView(r);return null}(this.view,t)),this.fire(t.type,t,o)}}const Af=["figcaption","li"];function Cf(t){let e="";if(t.is("$text")||t.is("$textProxy"))e=t.data;else if(t.is("element","img")&&t.hasAttribute("alt"))e=t.getAttribute("alt");else if(t.is("element","br"))e="\n";else{let n=null;for(const o of t.getChildren()){const t=Cf(o);n&&(n.is("containerElement")||o.is("containerElement"))&&(Af.includes(n.name)||Af.includes(o.name)?e+="\n":e+="\n\n"),e+=t,n=o}}return e}class _f extends Ni{static get pluginName(){return"ClipboardPipeline"}init(){this.editor.editing.view.addObserver(wf),this._setupPasteDrop(),this._setupCopyCut()}_setupPasteDrop(){const t=this.editor,e=t.model,n=t.editing.view,o=n.document;this.listenTo(o,"clipboardInput",((e,n)=>{"paste"!=n.method||t.model.canEditAt(t.model.document.selection)||e.stop()}),{priority:"highest"}),this.listenTo(o,"clipboardInput",((t,e)=>{const o=e.dataTransfer;let i;if(e.content)i=e.content;else{let t="";o.getData("text/html")?t=function(t){return t.replace(/(\s+)<\/span>/g,((t,e)=>1==e.length?" ":e)).replace(//g,"")}(o.getData("text/html")):o.getData("text/plain")&&(((r=(r=o.getData("text/plain")).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}

`),t=r),i=this.editor.data.htmlProcessor.toView(t)}var r;const s=new h(this,"inputTransformation");this.fire(s,{content:i,dataTransfer:o,targetRanges:e.targetRanges,method:e.method}),s.stop.called&&t.stop(),n.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((t,n)=>{if(n.content.isEmpty)return;const o=this.editor.data.toModel(n.content,"$clipboardHolder");0!=o.childCount&&(t.stop(),e.change((()=>{this.fire("contentInsertion",{content:o,method:n.method,dataTransfer:n.dataTransfer,targetRanges:n.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((t,n)=>{n.resultRange=e.insertContent(n.content)}),{priority:"low"})}_setupCopyCut(){const t=this.editor,e=t.model.document,n=t.editing.view.document,o=(o,i)=>{const r=i.dataTransfer;i.preventDefault();const s=t.data.toView(t.model.getSelectedContent(e.selection));n.fire("clipboardOutput",{dataTransfer:r,content:s,method:o.name})};this.listenTo(n,"copy",o,{priority:"low"}),this.listenTo(n,"cut",((e,n)=>{t.model.canEditAt(t.model.document.selection)?o(e,n):n.preventDefault()}),{priority:"low"}),this.listenTo(n,"clipboardOutput",((n,o)=>{o.content.isEmpty||(o.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(o.content)),o.dataTransfer.setData("text/plain",Cf(o.content))),"cut"==o.method&&t.model.deleteContent(e.selection)}),{priority:"low"})}}class vf{constructor(t,e=20){this._batch=null,this.model=t,this._size=0,this.limit=e,this._isLocked=!1,this._changeCallback=(t,e)=>{e.isLocal&&e.isUndoable&&e!==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(t){this._size+=t,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(t=!1){this.isLocked&&!t||(this._batch=null,this._size=0)}}class yf extends zi{constructor(t,e){super(t),this._buffer=new vf(t.model,e),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(t={}){const e=this.editor.model,n=e.document,o=t.text||"",i=o.length;let r=n.selection;if(t.selection?r=t.selection:t.range&&(r=e.createSelection(t.range)),!e.canEditAt(r))return;const s=t.resultRange;e.enqueueChange(this._buffer.batch,(t=>{this._buffer.lock(),e.deleteContent(r),o&&e.insertContent(t.createText(o,n.selection.getAttributes()),r),s?t.setSelection(s):r.is("documentSelection")||t.setSelection(r),this._buffer.unlock(),this._buffer.input(i)}))}}const xf=["insertText","insertReplacementText"];class Ef extends Aa{constructor(t){super(t),this.focusObserver=t.getObserver(cc),i.isAndroid&&xf.push("insertCompositionText");const e=t.document;e.on("beforeinput",((n,o)=>{if(!this.isEnabled)return;const{data:i,targetRanges:r,inputType:s,domEvent:a}=o;if(!xf.includes(s))return;this.focusObserver.flush();const c=new h(e,"insertText");e.fire(c,new _a(t,a,{text:i,selection:t.createSelection(r)})),c.stop.called&&n.stop()})),e.on("compositionend",((n,{data:o,domEvent:r})=>{this.isEnabled&&!i.isAndroid&&o&&e.fire("insertText",new _a(t,r,{text:o,selection:e.selection}))}),{priority:"lowest"})}observe(){}stopObserving(){}}class Df extends Ni{static get pluginName(){return"Input"}init(){const t=this.editor,e=t.model,n=t.editing.view,o=e.document.selection;n.addObserver(Ef);const r=new yf(t,t.config.get("typing.undoStep")||20);t.commands.add("insertText",r),t.commands.add("input",r),this.listenTo(n.document,"insertText",((o,r)=>{n.document.isComposing||r.preventDefault();const{text:s,selection:a,resultRange:c}=r,l=Array.from(a.getRanges()).map((e=>t.editing.mapper.toModelRange(e)));let d=s;if(i.isAndroid){const t=Array.from(l[0].getItems()).reduce(((t,e)=>t+(e.is("$textProxy")?e.data:"")),"");t&&(t.length<=d.length?d.startsWith(t)&&(d=d.substring(t.length),l[0].start=l[0].start.getShiftedBy(t.length)):t.startsWith(d)&&(l[0].start=l[0].start.getShiftedBy(d.length),d=""))}const h={text:d,selection:e.createSelection(l)};c&&(h.resultRange=t.editing.mapper.toModelRange(c)),t.execute("insertText",h),n.scrollToTheSelection()})),i.isAndroid?this.listenTo(n.document,"keydown",((t,i)=>{!o.isCollapsed&&229==i.keyCode&&n.document.isComposing&&If(e,r)})):this.listenTo(n.document,"compositionstart",(()=>{o.isCollapsed||If(e,r)}))}}function If(t,e){if(!e.isEnabled)return;const n=e.buffer;n.lock(),t.enqueueChange(n.batch,(()=>{t.deleteContent(t.document.selection)})),n.unlock()}class Sf extends zi{constructor(t,e){super(t),this.direction=e,this._buffer=new vf(t.model,t.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(t={}){const e=this.editor.model,n=e.document;e.enqueueChange(this._buffer.batch,(o=>{this._buffer.lock();const i=o.createSelection(t.selection||n.selection);if(!e.canEditAt(i))return;const r=t.sequence||1,s=i.isCollapsed;if(i.isCollapsed&&e.modifySelection(i,{direction:this.direction,unit:t.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(r))return void this._replaceEntireContentWithParagraph(o);if(this._shouldReplaceFirstBlockWithParagraph(i,r))return void this.editor.execute("paragraph",{selection:i});if(i.isCollapsed)return;let a=0;i.getFirstRange().getMinimalFlatRanges().forEach((t=>{a+=Z(t.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))})),e.deleteContent(i,{doNotResetEntireContent:s,direction:this.direction}),this._buffer.input(a),o.setSelection(i),this._buffer.unlock()}))}_shouldEntireContentBeReplacedWithParagraph(t){if(t>1)return!1;const e=this.editor.model,n=e.document.selection,o=e.schema.getLimitElement(n);if(!(n.isCollapsed&&n.containsEntireContent(o)))return!1;if(!e.schema.checkChild(o,"paragraph"))return!1;const i=o.getChild(0);return!i||!i.is("element","paragraph")}_replaceEntireContentWithParagraph(t){const e=this.editor.model,n=e.document.selection,o=e.schema.getLimitElement(n),i=t.createElement("paragraph");t.remove(t.createRangeIn(o)),t.insert(i,o),t.setSelection(i,0)}_shouldReplaceFirstBlockWithParagraph(t,e){const n=this.editor.model;if(e>1||"backward"!=this.direction)return!1;if(!t.isCollapsed)return!1;const o=t.getFirstPosition(),i=n.schema.getLimitElement(o),r=i.getChild(0);return o.parent==r&&(!!t.containsEntireContent(r)&&(!!n.schema.checkChild(i,"paragraph")&&"paragraph"!=r.name))}}const Mf="word",Tf="selection",Bf="backward",Nf="forward",Pf={deleteContent:{unit:Tf,direction:Bf},deleteContentBackward:{unit:"codePoint",direction:Bf},deleteWordBackward:{unit:Mf,direction:Bf},deleteHardLineBackward:{unit:Tf,direction:Bf},deleteSoftLineBackward:{unit:Tf,direction:Bf},deleteContentForward:{unit:"character",direction:Nf},deleteWordForward:{unit:Mf,direction:Nf},deleteHardLineForward:{unit:Tf,direction:Nf},deleteSoftLineForward:{unit:Tf,direction:Nf}};class zf extends Aa{constructor(t){super(t);const e=t.document;let n=0;e.on("keydown",(()=>{n++})),e.on("keyup",(()=>{n=0})),e.on("beforeinput",((o,r)=>{if(!this.isEnabled)return;const{targetRanges:s,domEvent:a,inputType:c}=r,l=Pf[c];if(!l)return;const d={direction:l.direction,unit:l.unit,sequence:n};d.unit==Tf&&(d.selectionToRemove=t.createSelection(s[0])),"deleteContentBackward"===c&&(i.isAndroid&&(d.sequence=1),function(t){if(1!=t.length||t[0].isCollapsed)return!1;const e=t[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let n=0;for(const{nextPosition:t}of e){if(t.parent.is("$text")){const e=t.parent.data,o=t.offset;if(Si(e,o)||Mi(e,o)||Bi(e,o))continue;n++}else n++;if(n>1)return!0}return!1}(s)&&(d.unit=Tf,d.selectionToRemove=t.createSelection(s)));const h=new ks(e,"delete",s[0]);e.fire(h,new _a(t,a,d)),h.stop.called&&o.stop()})),i.isBlink&&function(t){const e=t.view,n=e.document;let o=null,i=!1;function r(t){return t==ui.backspace||t==ui.delete}function s(t){return t==ui.backspace?Bf:Nf}n.on("keydown",((t,{keyCode:e})=>{o=e,i=!1})),n.on("keyup",((a,{keyCode:c,domEvent:l})=>{const d=n.selection,h=t.isEnabled&&c==o&&r(c)&&!d.isCollapsed&&!i;if(o=null,h){const t=d.getFirstRange(),o=new ks(n,"delete",t),i={unit:Tf,direction:s(c),selectionToRemove:d};n.fire(o,new _a(e,l,i))}})),n.on("beforeinput",((t,{inputType:e})=>{const n=Pf[e];r(o)&&n&&n.direction==s(o)&&(i=!0)}),{priority:"high"}),n.on("beforeinput",((t,{inputType:e,data:n})=>{o==ui.delete&&"insertText"==e&&""==n&&t.stop()}),{priority:"high"})}(this)}observe(){}stopObserving(){}}class Of extends Ni{static get pluginName(){return"Delete"}init(){const t=this.editor,e=t.editing.view,n=e.document,o=t.model.document;e.addObserver(zf),this._undoOnBackspace=!1;const i=new Sf(t,"forward");t.commands.add("deleteForward",i),t.commands.add("forwardDelete",i),t.commands.add("delete",new Sf(t,"backward")),this.listenTo(n,"delete",((o,i)=>{n.isComposing||i.preventDefault();const{direction:r,sequence:s,selectionToRemove:a,unit:c}=i,l="forward"===r?"deleteForward":"delete",d={sequence:s};if("selection"==c){const e=Array.from(a.getRanges()).map((e=>t.editing.mapper.toModelRange(e)));d.selection=t.model.createSelection(e)}else d.unit=c;t.execute(l,d),e.scrollToTheSelection()}),{priority:"low"}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(n,"delete",((e,n)=>{this._undoOnBackspace&&"backward"==n.direction&&1==n.sequence&&"codePoint"==n.unit&&(this._undoOnBackspace=!1,t.execute("undo"),n.preventDefault(),e.stop())}),{context:"$capture"}),this.listenTo(o,"change",(()=>{this._undoOnBackspace=!1})))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class Lf extends Ni{static get requires(){return[Df,Of]}static get pluginName(){return"Typing"}}function jf(t,e){let n=t.start;return{text:Array.from(t.getWalker({ignoreElementEnd:!1})).reduce(((t,{item:o})=>o.is("$text")||o.is("$textProxy")?t+o.data:(n=e.createPositionAfter(o),"")),""),range:e.createRange(n,t.end)}}class Rf extends(G()){constructor(t,e){super(),this.model=t,this.testCallback=e,this._hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",(()=>{this.isEnabled?this._startListening():(this.stopListening(t.document.selection),this.stopListening(t.document))})),this._startListening()}get hasMatch(){return this._hasMatch}_startListening(){const t=this.model.document;this.listenTo(t.selection,"change:range",((e,{directChange:n})=>{n&&(t.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1))})),this.listenTo(t,"change:data",((t,e)=>{!e.isUndo&&e.isLocal&&this._evaluateTextBeforeSelection("data",{batch:e})}))}_evaluateTextBeforeSelection(t,e={}){const n=this.model,o=n.document.selection,i=n.createRange(n.createPositionAt(o.focus.parent,0),o.focus),{text:r,range:s}=jf(i,n),a=this.testCallback(r);if(!a&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!a,a){const n=Object.assign(e,{text:r,range:s});"object"==typeof a&&Object.assign(n,a),this.fire(`matched:${t}`,n)}}}class Ff extends Ni{constructor(t){super(t),this.attributes=new Set,this._overrideUid=null}static get pluginName(){return"TwoStepCaretMovement"}init(){const t=this.editor,e=t.model,n=t.editing.view,o=t.locale,i=e.document.selection;this.listenTo(n.document,"arrowKey",((t,e)=>{if(!i.isCollapsed)return;if(e.shiftKey||e.altKey||e.ctrlKey)return;const n=e.keyCode==ui.arrowright,r=e.keyCode==ui.arrowleft;if(!n&&!r)return;const s=o.contentLanguageDirection;let a=!1;a="ltr"===s&&n||"rtl"===s&&r?this._handleForwardMovement(e):this._handleBackwardMovement(e),!0===a&&t.stop()}),{context:"$text",priority:"highest"}),this._isNextGravityRestorationSkipped=!1,this.listenTo(i,"change:range",((t,e)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!e.directChange&&Gf(i.getFirstPosition(),this.attributes)||this._restoreGravity())}))}registerAttribute(t){this.attributes.add(t)}_handleForwardMovement(t){const e=this.attributes,n=this.editor.model.document.selection,o=n.getFirstPosition();return!this._isGravityOverridden&&((!o.isAtStart||!Vf(n,e))&&(!!Gf(o,e)&&(Hf(t),this._overrideGravity(),!0)))}_handleBackwardMovement(t){const e=this.attributes,n=this.editor.model,o=n.document.selection,i=o.getFirstPosition();return this._isGravityOverridden?(Hf(t),this._restoreGravity(),Uf(n,e,i),!0):i.isAtStart?!!Vf(o,e)&&(Hf(t),Uf(n,e,i),!0):!!function(t,e){const n=t.getShiftedBy(-1);return Gf(n,e)}(i,e)&&(i.isAtEnd&&!Vf(o,e)&&Gf(i,e)?(Hf(t),Uf(n,e,i),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1))}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change((t=>t.overrideSelectionGravity()))}_restoreGravity(){this.editor.model.change((t=>{t.restoreSelectionGravity(this._overrideUid),this._overrideUid=null}))}}function Vf(t,e){for(const n of e)if(t.hasAttribute(n))return!0;return!1}function Uf(t,e,n){const o=n.nodeBefore;t.change((n=>{if(o){const e=[],i=t.schema.isObject(o)&&t.schema.isInline(o);for(const[n,r]of o.getAttributes())!t.schema.checkAttribute("$text",n)||i&&!1===t.schema.getAttributeProperties(n).copyFromObject||e.push([n,r]);n.setSelectionAttribute(e)}else n.removeSelectionAttribute(e)}))}function Hf(t){t.preventDefault()}function Gf(t,e){const{nodeBefore:n,nodeAfter:o}=t;for(const t of e){const e=n?n.getAttribute(t):void 0;if((o?o.getAttribute(t):void 0)!==e)return!0}return!1}var qf=/[\\^$.*+?()[\]{}|]/g,Wf=RegExp(qf.source);const Kf=function(t){return(t=_r(t))&&Wf.test(t)?t.replace(qf,"\\$&"):t},Yf={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"⅓",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"⅔",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},lessThanOrEqual:{from:"<=",to:"≤"},greaterThanOrEqual:{from:">=",to:"≥"},notEqual:{from:"!=",to:"≠"},arrowLeft:{from:"<-",to:"←"},arrowRight:{from:"->",to:"→"},horizontalEllipsis:{from:"...",to:"…"},enDash:{from:/(^| )(--)( )$/,to:[null,"–",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"—",null]},quotesPrimary:{from:tk('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:tk("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:tk("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:tk('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:tk('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:tk("'"),to:[null,"‚",null,"’"]}},$f={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},Zf=["symbols","mathematical","typography","quotes"];function Qf(t){return"string"==typeof t?new RegExp(`(${Kf(t)})$`):t}function Jf(t){return"string"==typeof t?()=>[t]:t instanceof Array?()=>t:t}function Xf(t){return(t.textNode?t.textNode:t.nodeAfter).getAttributes()}function tk(t){return new RegExp(`(^|\\s)(${t})([^${t}]*)(${t})$`)}function ek(t,e,n,o){return o.createRange(nk(t,e,n,!0,o),nk(t,e,n,!1,o))}function nk(t,e,n,o,i){let r=t.textNode||(o?t.nodeBefore:t.nodeAfter),s=null;for(;r&&r.getAttribute(e)==n;)s=r,r=o?r.previousSibling:r.nextSibling;return s?i.createPositionAt(s,o?"before":"after"):t}function*ok(t,e){for(const n of e)n&&t.getAttributeProperties(n[0]).copyOnEnter&&(yield n)}class ik extends zi{execute(){this.editor.model.change((t=>{this.enterBlock(t),this.fire("afterExecute",{writer:t})}))}enterBlock(t){const e=this.editor.model,n=e.document.selection,o=e.schema,i=n.isCollapsed,r=n.getFirstRange(),s=r.start.parent,a=r.end.parent;if(o.isLimit(s)||o.isLimit(a))return i||s!=a||e.deleteContent(n),!1;if(i){const e=ok(t.model.schema,n.getAttributes());return rk(t,r.start),t.setSelectionAttribute(e),!0}{const o=!(r.start.isAtStart&&r.end.isAtEnd),i=s==a;if(e.deleteContent(n,{leaveUnmerged:o}),o){if(i)return rk(t,n.focus),!0;t.setSelection(a,0)}}return!1}}function rk(t,e){t.split(e),t.setSelection(e.parent.nextSibling,0)}const sk={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class ak extends Aa{constructor(t){super(t);const e=this.document;let n=!1;e.on("keydown",((t,e)=>{n=e.shiftKey})),e.on("beforeinput",((o,r)=>{if(!this.isEnabled)return;let s=r.inputType;i.isSafari&&n&&"insertParagraph"==s&&(s="insertLineBreak");const a=r.domEvent,c=sk[s];if(!c)return;const l=new ks(e,"enter",r.targetRanges[0]);e.fire(l,new _a(t,a,{isSoft:c.isSoft})),l.stop.called&&o.stop()}))}observe(){}stopObserving(){}}class ck extends Ni{static get pluginName(){return"Enter"}init(){const t=this.editor,e=t.editing.view,n=e.document;e.addObserver(ak),t.commands.add("enter",new ik(t)),this.listenTo(n,"enter",((o,i)=>{n.isComposing||i.preventDefault(),i.isSoft||(t.execute("enter"),e.scrollToTheSelection())}),{priority:"low"})}}class lk extends zi{execute(){const t=this.editor.model,e=t.document;t.change((n=>{!function(t,e,n){const o=n.isCollapsed,i=n.getFirstRange(),r=i.start.parent,s=i.end.parent,a=r==s;if(o){const o=ok(t.schema,n.getAttributes());dk(t,e,i.end),e.removeSelectionAttribute(n.getAttributeKeys()),e.setSelectionAttribute(o)}else{const o=!(i.start.isAtStart&&i.end.isAtEnd);t.deleteContent(n,{leaveUnmerged:o}),a?dk(t,e,n.focus):o&&e.setSelection(s,0)}}(t,n,e.selection),this.fire("afterExecute",{writer:n})}))}refresh(){const t=this.editor.model,e=t.document;this.isEnabled=function(t,e){if(e.rangeCount>1)return!1;const n=e.anchor;if(!n||!t.checkChild(n,"softBreak"))return!1;const o=e.getFirstRange(),i=o.start.parent,r=o.end.parent;if((hk(i,t)||hk(r,t))&&i!==r)return!1;return!0}(t.schema,e.selection)}}function dk(t,e,n){const o=e.createElement("softBreak");t.insertContent(o,n),e.setSelection(o,"after")}function hk(t,e){return!t.is("rootElement")&&(e.isLimit(t)||hk(t.parent,e))}class uk extends Ni{static get pluginName(){return"ShiftEnter"}init(){const t=this.editor,e=t.model.schema,n=t.conversion,o=t.editing.view,i=o.document;e.register("softBreak",{allowWhere:"$text",isInline:!0}),n.for("upcast").elementToElement({model:"softBreak",view:"br"}),n.for("downcast").elementToElement({model:"softBreak",view:(t,{writer:e})=>e.createEmptyElement("br")}),o.addObserver(ak),t.commands.add("shiftEnter",new lk(t)),this.listenTo(i,"enter",((e,n)=>{i.isComposing||n.preventDefault(),n.isSoft&&(t.execute("shiftEnter"),o.scrollToTheSelection())}),{priority:"low"})}}class gk extends(S()){constructor(){super(...arguments),this._stack=[]}add(t,e){const n=this._stack,o=n[0];this._insertDescriptor(t);const i=n[0];o===i||pk(o,i)||this.fire("change:top",{oldDescriptor:o,newDescriptor:i,writer:e})}remove(t,e){const n=this._stack,o=n[0];this._removeDescriptor(t);const i=n[0];o===i||pk(o,i)||this.fire("change:top",{oldDescriptor:o,newDescriptor:i,writer:e})}_insertDescriptor(t){const e=this._stack,n=e.findIndex((e=>e.id===t.id));if(pk(t,e[n]))return;n>-1&&e.splice(n,1);let o=0;for(;e[o]&&mk(e[o],t);)o++;e.splice(o,0,t)}_removeDescriptor(t){const e=this._stack,n=e.findIndex((e=>e.id===t));n>-1&&e.splice(n,1)}}function pk(t,e){return t&&e&&t.priority==e.priority&&fk(t.classes)==fk(e.classes)}function mk(t,e){return t.priority>e.priority||!(t.priorityfk(e.classes)}function fk(t){return Array.isArray(t)?t.sort().join(","):t}const kk='',bk="ck-widget",wk="ck-widget_selected";function Ak(t){return!!t.is("element")&&!!t.getCustomProperty("widget")}function Ck(t,e,n={}){if(!t.is("containerElement"))throw new k("widget-to-widget-wrong-element-type",null,{element:t});return e.setAttribute("contenteditable","false",t),e.addClass(bk,t),e.setCustomProperty("widget",!0,t),t.getFillerOffset=Dk,e.setCustomProperty("widgetLabel",[],t),n.label&&function(t,e){const n=t.getCustomProperty("widgetLabel");n.push(e)}(t,n.label),n.hasSelectionHandle&&function(t,e){const n=e.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(t){const e=this.toDomElement(t),n=new Qu;return n.set("content",kk),n.render(),e.appendChild(n.element),e}));e.insert(e.createPositionAt(t,0),n),e.addClass(["ck-widget_with-selection-handle"],t)}(t,e),yk(t,e),t}function _k(t,e,n){if(e.classes&&n.addClass(bi(e.classes),t),e.attributes)for(const o in e.attributes)n.setAttribute(o,e.attributes[o],t)}function vk(t,e,n){if(e.classes&&n.removeClass(bi(e.classes),t),e.attributes)for(const o in e.attributes)n.removeAttribute(o,t)}function yk(t,e,n=_k,o=vk){const i=new gk;i.on("change:top",((e,i)=>{i.oldDescriptor&&o(t,i.oldDescriptor,i.writer),i.newDescriptor&&n(t,i.newDescriptor,i.writer)}));e.setCustomProperty("addHighlight",((t,e,n)=>i.add(e,n)),t),e.setCustomProperty("removeHighlight",((t,e,n)=>i.remove(e,n)),t)}function xk(t,e,n={}){return e.addClass(["ck-editor__editable","ck-editor__nested-editable"],t),e.setAttribute("role","textbox",t),n.label&&e.setAttribute("aria-label",n.label,t),e.setAttribute("contenteditable",t.isReadOnly?"false":"true",t),t.on("change:isReadOnly",((n,o,i)=>{e.setAttribute("contenteditable",i?"false":"true",t)})),t.on("change:isFocused",((n,o,i)=>{i?e.addClass("ck-editor__nested-editable_focused",t):e.removeClass("ck-editor__nested-editable_focused",t)})),yk(t,e),t}function Ek(t,e){const n=t.getSelectedElement();if(n){const o=Mk(t);if(o)return e.createRange(e.createPositionAt(n,o))}return eu(t,e)}function Dk(){return null}const Ik="widget-type-around";function Sk(t,e,n){return!!t&&Ak(t)&&!n.isInline(e)}function Mk(t){return t.getAttribute(Ik)}var Tk=n(4921),Bk={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Tk.Z,Bk);Tk.Z.locals;const Nk=["before","after"],Pk=(new DOMParser).parseFromString('',"image/svg+xml").firstChild,zk="ck-widget__type-around_disabled";class Ok extends Ni{constructor(){super(...arguments),this._currentFakeCaretModelElement=null}static get pluginName(){return"WidgetTypeAround"}static get requires(){return[ck,Of]}init(){const t=this.editor,e=t.editing.view;this.on("change:isEnabled",((n,o,i)=>{e.change((t=>{for(const n of e.document.roots)i?t.removeClass(zk,n):t.addClass(zk,n)})),i||t.model.change((t=>{t.removeSelectionAttribute(Ik)}))})),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(t,e){const n=this.editor,o=n.editing.view,i=n.model.schema.getAttributesWithProperty(t,"copyOnReplace",!0);n.execute("insertParagraph",{position:n.model.createPositionAt(t,e),attributes:i}),o.focus(),o.scrollToTheSelection()}_listenToIfEnabled(t,e,n,o){this.listenTo(t,e,((...t)=>{this.isEnabled&&n(...t)}),o)}_insertParagraphAccordingToFakeCaretPosition(){const t=this.editor.model.document.selection,e=Mk(t);if(!e)return!1;const n=t.getSelectedElement();return this._insertParagraph(n,e),!0}_enableTypeAroundUIInjection(){const t=this.editor,e=t.model.schema,n=t.locale.t,o={before:n("Insert paragraph before block"),after:n("Insert paragraph after block")};t.editing.downcastDispatcher.on("insert",((t,i,r)=>{const s=r.mapper.toViewElement(i.item);if(s&&Sk(s,i.item,e)){!function(t,e,n){const o=t.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(t){const n=this.toDomElement(t);return function(t,e){for(const n of Nk){const o=new Eu({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${n}`],title:e[n],"aria-hidden":"true"},children:[t.ownerDocument.importNode(Pk,!0)]});t.appendChild(o.render())}}(n,e),function(t){const e=new Eu({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});t.appendChild(e.render())}(n),n}));t.insert(t.createPositionAt(n,"end"),o)}(r.writer,o,s);s.getCustomProperty("widgetLabel").push((()=>this.isEnabled?n("Press Enter to type after or press Shift + Enter to type before the widget"):""))}}),{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const t=this.editor,e=t.model,n=e.document.selection,o=e.schema,i=t.editing.view;function r(t){return`ck-widget_type-around_show-fake-caret_${t}`}this._listenToIfEnabled(i.document,"arrowKey",((t,e)=>{this._handleArrowKeyPress(t,e)}),{context:[Ak,"$text"],priority:"high"}),this._listenToIfEnabled(n,"change:range",((e,n)=>{n.directChange&&t.model.change((t=>{t.removeSelectionAttribute(Ik)}))})),this._listenToIfEnabled(e.document,"change:data",(()=>{const e=n.getSelectedElement();if(e){if(Sk(t.editing.mapper.toViewElement(e),e,o))return}t.model.change((t=>{t.removeSelectionAttribute(Ik)}))})),this._listenToIfEnabled(t.editing.downcastDispatcher,"selection",((t,e,n)=>{const i=n.writer;if(this._currentFakeCaretModelElement){const t=n.mapper.toViewElement(this._currentFakeCaretModelElement);t&&(i.removeClass(Nk.map(r),t),this._currentFakeCaretModelElement=null)}const s=e.selection.getSelectedElement();if(!s)return;const a=n.mapper.toViewElement(s);if(!Sk(a,s,o))return;const c=Mk(e.selection);c&&(i.addClass(r(c),a),this._currentFakeCaretModelElement=s)})),this._listenToIfEnabled(t.ui.focusTracker,"change:isFocused",((e,n,o)=>{o||t.model.change((t=>{t.removeSelectionAttribute(Ik)}))}))}_handleArrowKeyPress(t,e){const n=this.editor,o=n.model,i=o.document.selection,r=o.schema,s=n.editing.view,a=function(t,e){const n=ki(t,e);return"down"===n||"right"===n}(e.keyCode,n.locale.contentLanguageDirection),c=s.document.selection.getSelectedElement();let l;Sk(c,n.editing.mapper.toModelElement(c),r)?l=this._handleArrowKeyPressOnSelectedWidget(a):i.isCollapsed?l=this._handleArrowKeyPressWhenSelectionNextToAWidget(a):e.shiftKey||(l=this._handleArrowKeyPressWhenNonCollapsedSelection(a)),l&&(e.preventDefault(),t.stop())}_handleArrowKeyPressOnSelectedWidget(t){const e=this.editor.model,n=Mk(e.document.selection);return e.change((e=>{if(!n)return e.setSelectionAttribute(Ik,t?"after":"before"),!0;if(!(n===(t?"after":"before")))return e.removeSelectionAttribute(Ik),!0;return!1}))}_handleArrowKeyPressWhenSelectionNextToAWidget(t){const e=this.editor,n=e.model,o=n.schema,i=e.plugins.get("Widget"),r=i._getObjectElementNextToSelection(t);return!!Sk(e.editing.mapper.toViewElement(r),r,o)&&(n.change((e=>{i._setSelectionOverElement(r),e.setSelectionAttribute(Ik,t?"before":"after")})),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(t){const e=this.editor,n=e.model,o=n.schema,i=e.editing.mapper,r=n.document.selection,s=t?r.getLastPosition().nodeBefore:r.getFirstPosition().nodeAfter;return!!Sk(i.toViewElement(s),s,o)&&(n.change((e=>{e.setSelection(s,"on"),e.setSelectionAttribute(Ik,t?"after":"before")})),!0)}_enableInsertingParagraphsOnButtonClick(){const t=this.editor,e=t.editing.view;this._listenToIfEnabled(e.document,"mousedown",((n,o)=>{const i=o.domTarget.closest(".ck-widget__type-around__button");if(!i)return;const r=function(t){return t.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(i),s=function(t,e){const n=t.closest(".ck-widget");return e.mapDomToView(n)}(i,e.domConverter),a=t.editing.mapper.toModelElement(s);this._insertParagraph(a,r),o.preventDefault(),n.stop()}))}_enableInsertingParagraphsOnEnterKeypress(){const t=this.editor,e=t.model.document.selection,n=t.editing.view;this._listenToIfEnabled(n.document,"enter",((n,o)=>{if("atTarget"!=n.eventPhase)return;const i=e.getSelectedElement(),r=t.editing.mapper.toViewElement(i),s=t.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:Sk(r,i,s)&&(this._insertParagraph(i,o.isSoft?"before":"after"),a=!0),a&&(o.preventDefault(),n.stop())}),{context:Ak})}_enableInsertingParagraphsOnTypingKeystroke(){const t=this.editor.editing.view.document;this._listenToIfEnabled(t,"insertText",((e,n)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(n.selection=t.selection)}),{priority:"high"}),i.isAndroid?this._listenToIfEnabled(t,"keydown",((t,e)=>{229==e.keyCode&&this._insertParagraphAccordingToFakeCaretPosition()})):this._listenToIfEnabled(t,"compositionstart",(()=>{this._insertParagraphAccordingToFakeCaretPosition()}),{priority:"high"})}_enableDeleteIntegration(){const t=this.editor,e=t.editing.view,n=t.model,o=n.schema;this._listenToIfEnabled(e.document,"delete",((e,i)=>{if("atTarget"!=e.eventPhase)return;const r=Mk(n.document.selection);if(!r)return;const s=i.direction,a=n.document.selection.getSelectedElement(),c="forward"==s;if("before"===r===c)t.execute("delete",{selection:n.createSelection(a,"on")});else{const e=o.getNearestSelectionRange(n.createPositionAt(a,r),s);if(e)if(e.isCollapsed){const i=n.createSelection(e.start);if(n.modifySelection(i,{direction:s}),i.focus.isEqual(e.start)){const t=function(t,e){let n=e;for(const o of e.getAncestors({parentFirst:!0})){if(o.childCount>1||t.isLimit(o))break;n=o}return n}(o,e.start.parent);n.deleteContent(n.createSelection(t,"on"),{doNotAutoparagraph:!0})}else n.change((n=>{n.setSelection(e),t.execute(c?"deleteForward":"delete")}))}else n.change((n=>{n.setSelection(e),t.execute(c?"deleteForward":"delete")}))}i.preventDefault(),e.stop()}),{context:Ak})}_enableInsertContentIntegration(){const t=this.editor,e=this.editor.model,n=e.document.selection;this._listenToIfEnabled(t.model,"insertContent",((t,[o,i])=>{if(i&&!i.is("documentSelection"))return;const r=Mk(n);return r?(t.stop(),e.change((t=>{const i=n.getSelectedElement(),s=e.createPositionAt(i,r),a=t.createSelection(s),c=e.insertContent(o,a);return t.setSelection(a),c}))):void 0}),{priority:"high"})}_enableInsertObjectIntegration(){const t=this.editor,e=this.editor.model.document.selection;this._listenToIfEnabled(t.model,"insertObject",((t,n)=>{const[,o,i={}]=n;if(o&&!o.is("documentSelection"))return;const r=Mk(e);r&&(i.findOptimalPosition=r,n[3]=i)}),{priority:"high"})}_enableDeleteContentIntegration(){const t=this.editor,e=this.editor.model.document.selection;this._listenToIfEnabled(t.model,"deleteContent",((t,[n])=>{if(n&&!n.is("documentSelection"))return;Mk(e)&&t.stop()}),{priority:"high"})}}function Lk(t){const e=t.model;return(n,o)=>{const i=o.keyCode==ui.arrowup,r=o.keyCode==ui.arrowdown,s=o.shiftKey,a=e.document.selection;if(!i&&!r)return;const c=r;if(s&&function(t,e){return!t.isCollapsed&&t.isBackward==e}(a,c))return;const l=function(t,e,n){const o=t.model;if(n){const t=e.isCollapsed?e.focus:e.getLastPosition(),n=jk(o,t,"forward");if(!n)return null;const i=o.createRange(t,n),r=Rk(o.schema,i,"backward");return r?o.createRange(t,r):null}{const t=e.isCollapsed?e.focus:e.getFirstPosition(),n=jk(o,t,"backward");if(!n)return null;const i=o.createRange(n,t),r=Rk(o.schema,i,"forward");return r?o.createRange(r,t):null}}(t,a,c);if(l){if(l.isCollapsed){if(a.isCollapsed)return;if(s)return}(l.isCollapsed||function(t,e,n){const o=t.model,i=t.view.domConverter;if(n){const t=o.createSelection(e.start);o.modifySelection(t),t.focus.isAtEnd||e.start.isEqual(t.focus)||(e=o.createRange(t.focus,e.end))}const r=t.mapper.toViewRange(e),s=i.viewRangeToDom(r),a=Lo.getDomRangeRects(s);let c;for(const t of a)if(void 0!==c){if(Math.round(t.top)>=c)return!1;c=Math.max(c,Math.round(t.bottom))}else c=Math.round(t.bottom);return!0}(t,l,c))&&(e.change((t=>{const n=c?l.end:l.start;if(s){const o=e.createSelection(a.anchor);o.setFocus(n),t.setSelection(o)}else t.setSelection(n)})),n.stop(),o.preventDefault(),o.stopPropagation())}}}function jk(t,e,n){const o=t.schema,i=t.createRangeIn(e.root),r="forward"==n?"elementStart":"elementEnd";for(const{previousPosition:t,item:s,type:a}of i.getWalker({startPosition:e,direction:n})){if(o.isLimit(s)&&!o.isInline(s))return t;if(a==r&&o.isBlock(s))return null}return null}function Rk(t,e,n){const o="backward"==n?e.end:e.start;if(t.checkChild(o,"$text"))return o;for(const{nextPosition:o}of e.getWalker({direction:n}))if(t.checkChild(o,"$text"))return o;return null}var Fk=n(3488),Vk={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Fk.Z,Vk);Fk.Z.locals;class Uk extends Ni{constructor(){super(...arguments),this._previouslySelected=new Set}static get pluginName(){return"Widget"}static get requires(){return[Ok,Of]}init(){const t=this.editor,e=t.editing.view,n=e.document;this.editor.editing.downcastDispatcher.on("selection",((e,n,o)=>{const i=o.writer,r=n.selection;if(r.isCollapsed)return;const s=r.getSelectedElement();if(!s)return;const a=t.editing.mapper.toViewElement(s);var c;Ak(a)&&(o.consumable.consume(r,"selection")&&i.setSelection(i.createRangeOn(a),{fake:!0,label:(c=a,c.getCustomProperty("widgetLabel").reduce(((t,e)=>"function"==typeof e?t?t+". "+e():e():t?t+". "+e:e),""))}))})),this.editor.editing.downcastDispatcher.on("selection",((t,e,n)=>{this._clearPreviouslySelectedWidgets(n.writer);const o=n.writer,i=o.document.selection;let r=null;for(const t of i.getRanges())for(const e of t){const t=e.item;Ak(t)&&!Hk(t,r)&&(o.addClass(wk,t),this._previouslySelected.add(t),r=t)}}),{priority:"low"}),e.addObserver(hu),this.listenTo(n,"mousedown",((...t)=>this._onMousedown(...t))),this.listenTo(n,"arrowKey",((...t)=>{this._handleSelectionChangeOnArrowKeyPress(...t)}),{context:[Ak,"$text"]}),this.listenTo(n,"arrowKey",((...t)=>{this._preventDefaultOnArrowKeyPress(...t)}),{context:"$root"}),this.listenTo(n,"arrowKey",Lk(this.editor.editing),{context:"$text"}),this.listenTo(n,"delete",((t,e)=>{this._handleDelete("forward"==e.direction)&&(e.preventDefault(),t.stop())}),{context:"$root"})}_onMousedown(t,e){const n=this.editor,o=n.editing.view,r=o.document;let s=e.target;if(function(t){let e=t;for(;e;){if(e.is("editableElement")&&!e.is("rootElement"))return!0;if(Ak(e))return!1;e=e.parent}return!1}(s)){if((i.isSafari||i.isGecko)&&e.domEvent.detail>=3){const t=n.editing.mapper,o=s.is("attributeElement")?s.findAncestor((t=>!t.is("attributeElement"))):s,i=t.toModelElement(o);e.preventDefault(),this.editor.model.change((t=>{t.setSelection(i,"in")}))}return}if(!Ak(s)&&(s=s.findAncestor(Ak),!s))return;i.isAndroid&&e.preventDefault(),r.isFocused||o.focus();const a=n.editing.mapper.toModelElement(s);this._setSelectionOverElement(a)}_handleSelectionChangeOnArrowKeyPress(t,e){const n=e.keyCode,o=this.editor.model,i=o.schema,r=o.document.selection,s=r.getSelectedElement(),a=ki(n,this.editor.locale.contentLanguageDirection),c="down"==a||"right"==a,l="up"==a||"down"==a;if(s&&i.isObject(s)){const n=c?r.getLastPosition():r.getFirstPosition(),s=i.getNearestSelectionRange(n,c?"forward":"backward");return void(s&&(o.change((t=>{t.setSelection(s)})),e.preventDefault(),t.stop()))}if(!r.isCollapsed&&!e.shiftKey){const n=r.getFirstPosition(),s=r.getLastPosition(),a=n.nodeAfter,l=s.nodeBefore;return void((a&&i.isObject(a)||l&&i.isObject(l))&&(o.change((t=>{t.setSelection(c?s:n)})),e.preventDefault(),t.stop()))}if(!r.isCollapsed)return;const d=this._getObjectElementNextToSelection(c);if(d&&i.isObject(d)){if(i.isInline(d)&&l)return;this._setSelectionOverElement(d),e.preventDefault(),t.stop()}}_preventDefaultOnArrowKeyPress(t,e){const n=this.editor.model,o=n.schema,i=n.document.selection.getSelectedElement();i&&o.isObject(i)&&(e.preventDefault(),t.stop())}_handleDelete(t){const e=this.editor.model.document.selection;if(!this.editor.model.canEditAt(e))return;if(!e.isCollapsed)return;const n=this._getObjectElementNextToSelection(t);return n?(this.editor.model.change((t=>{let o=e.anchor.parent;for(;o.isEmpty;){const e=o;o=e.parent,t.remove(e)}this._setSelectionOverElement(n)})),!0):void 0}_setSelectionOverElement(t){this.editor.model.change((e=>{e.setSelection(e.createRangeOn(t))}))}_getObjectElementNextToSelection(t){const e=this.editor.model,n=e.schema,o=e.document.selection,i=e.createSelection(o);if(e.modifySelection(i,{direction:t?"forward":"backward"}),i.isEqual(o))return null;const r=t?i.focus.nodeBefore:i.focus.nodeAfter;return r&&n.isObject(r)?r:null}_clearPreviouslySelectedWidgets(t){for(const e of this._previouslySelected)t.removeClass(wk,e);this._previouslySelected.clear()}}function Hk(t,e){return!!e&&Array.from(t.getAncestors()).includes(e)}class Gk extends Ni{constructor(){super(...arguments),this._toolbarDefinitions=new Map}static get requires(){return[jm]}static get pluginName(){return"WidgetToolbarRepository"}init(){const t=this.editor;if(t.plugins.has("BalloonToolbar")){const e=t.plugins.get("BalloonToolbar");this.listenTo(e,"show",(e=>{(function(t){const e=t.getSelectedElement();return!(!e||!Ak(e))})(t.editing.view.document.selection)&&e.stop()}),{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",(()=>{this._updateToolbarsVisibility()})),this.listenTo(t.ui,"update",(()=>{this._updateToolbarsVisibility()})),this.listenTo(t.ui.focusTracker,"change:isFocused",(()=>{this._updateToolbarsVisibility()}),{priority:"low"})}destroy(){super.destroy();for(const t of this._toolbarDefinitions.values())t.view.destroy()}register(t,{ariaLabel:e,items:n,getRelatedElement:o,balloonClassName:i="ck-toolbar-container"}){if(!n.length)return void b("widget-toolbar-no-items",{toolbarId:t});const r=this.editor,s=r.t,a=new Bg(r.locale);if(a.ariaLabel=e||s("Widget toolbar"),this._toolbarDefinitions.has(t))throw new k("widget-toolbar-duplicated",this,{toolbarId:t});const c={view:a,getRelatedElement:o,balloonClassName:i,itemsConfig:n,initialized:!1};r.ui.addToolbar(a,{isContextual:!0,beforeFocus:()=>{const t=o(r.editing.view.document.selection);t&&this._showToolbar(c,t)},afterBlur:()=>{this._hideToolbar(c)}}),this._toolbarDefinitions.set(t,c)}_updateToolbarsVisibility(){let t=0,e=null,n=null;for(const o of this._toolbarDefinitions.values()){const i=o.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&i)if(this.editor.ui.focusTracker.isFocused){const r=i.getAncestors().length;r>t&&(t=r,e=i,n=o)}else this._isToolbarVisible(o)&&this._hideToolbar(o);else this._isToolbarInBalloon(o)&&this._hideToolbar(o)}n&&this._showToolbar(n,e)}_hideToolbar(t){this._balloon.remove(t.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(t,e){this._isToolbarVisible(t)?qk(this.editor,e):this._isToolbarInBalloon(t)||(t.initialized||(t.initialized=!0,t.view.fillFromConfig(t.itemsConfig,this.editor.ui.componentFactory)),this._balloon.add({view:t.view,position:Wk(this.editor,e),balloonClassName:t.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",(()=>{for(const t of this._toolbarDefinitions.values())if(this._isToolbarVisible(t)){const e=t.getRelatedElement(this.editor.editing.view.document.selection);qk(this.editor,e)}})))}_isToolbarVisible(t){return this._balloon.visibleView===t.view}_isToolbarInBalloon(t){return this._balloon.hasView(t.view)}}function qk(t,e){const n=t.plugins.get("ContextualBalloon"),o=Wk(t,e);n.updatePosition(o)}function Wk(t,e){const n=t.editing.view,o=Kp.defaultPositions;return{target:n.domConverter.mapViewToDom(e),positions:[o.northArrowSouth,o.northArrowSouthWest,o.northArrowSouthEast,o.southArrowNorth,o.southArrowNorthWest,o.southArrowNorthEast,o.viewportStickyNorth]}}G();Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;G();var Kk=n(8506),Yk={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Kk.Z,Yk);Kk.Z.locals;var $k=n(903),Zk={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()($k.Z,Zk);$k.Z.locals;class Qk extends Ni{static get pluginName(){return"DragDrop"}static get requires(){return[_f,Uk]}init(){const t=this.editor,e=t.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,this._updateDropMarkerThrottled=nm((t=>this._updateDropMarker(t)),40),this._removeDropMarkerDelayed=Ii((()=>this._removeDropMarker()),40),this._clearDraggableAttributesDelayed=Ii((()=>this._clearDraggableAttributes()),40),t.plugins.has("DragDropExperimental")?this.forceDisabled("DragDropExperimental"):(e.addObserver(wf),e.addObserver(hu),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDropMarker(),this._setupDraggableAttributeHandling(),this.listenTo(t,"change:isReadOnly",((t,e,n)=>{n?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((t,e,n)=>{n||this._finalizeDragging(!1)})),i.isAndroid&&this.forceDisabled("noAndroidSupport"))}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._updateDropMarkerThrottled.cancel(),this._removeDropMarkerDelayed.cancel(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const t=this.editor,e=t.model,n=e.document,o=t.editing.view,r=o.document;this.listenTo(r,"dragstart",((o,i)=>{const s=n.selection;if(i.target&&i.target.is("editableElement"))return void i.preventDefault();const a=i.target?tb(i.target):null;if(a){const n=t.editing.mapper.toModelElement(a);if(this._draggedRange=el.fromRange(e.createRangeOn(n)),t.plugins.has("WidgetToolbarRepository")){t.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}}else if(!r.selection.isCollapsed){const t=r.selection.getSelectedElement();t&&Ak(t)||(this._draggedRange=el.fromRange(s.getFirstRange()))}if(!this._draggedRange)return void i.preventDefault();this._draggingUid=g();const c=this.isEnabled&&t.model.canEditAt(this._draggedRange);i.dataTransfer.effectAllowed=c?"copyMove":"copy",i.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const l=e.createSelection(this._draggedRange.toRange()),d=t.data.toView(e.getSelectedContent(l));r.fire("clipboardOutput",{dataTransfer:i.dataTransfer,content:d,method:"dragstart"}),c||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(r,"dragend",((t,e)=>{this._finalizeDragging(!e.dataTransfer.isCanceled&&"move"==e.dataTransfer.dropEffect)}),{priority:"low"}),this.listenTo(r,"dragenter",(()=>{this.isEnabled&&o.focus()})),this.listenTo(r,"dragleave",(()=>{this._removeDropMarkerDelayed()})),this.listenTo(r,"dragging",((e,n)=>{if(!this.isEnabled)return void(n.dataTransfer.dropEffect="none");this._removeDropMarkerDelayed.cancel();const o=Jk(t,n.targetRanges,n.target);t.model.canEditAt(o)?(this._draggedRange||(n.dataTransfer.dropEffect="copy"),i.isGecko||("copy"==n.dataTransfer.effectAllowed?n.dataTransfer.dropEffect="copy":["all","copyMove"].includes(n.dataTransfer.effectAllowed)&&(n.dataTransfer.dropEffect="move")),o&&this._updateDropMarkerThrottled(o)):n.dataTransfer.dropEffect="none"}),{priority:"low"})}_setupClipboardInputIntegration(){const t=this.editor,e=t.editing.view.document;this.listenTo(e,"clipboardInput",((e,n)=>{if("drop"!=n.method)return;const o=Jk(t,n.targetRanges,n.target);if(this._removeDropMarker(),!o||!t.model.canEditAt(o))return this._finalizeDragging(!1),void e.stop();this._draggedRange&&this._draggingUid!=n.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==Xk(n.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(o,!0))return this._finalizeDragging(!1),void e.stop();n.targetRanges=[t.editing.mapper.toViewRange(o)]}),{priority:"high"})}_setupContentInsertionIntegration(){const t=this.editor.plugins.get(_f);t.on("contentInsertion",((t,e)=>{if(!this.isEnabled||"drop"!==e.method)return;const n=e.targetRanges.map((t=>this.editor.editing.mapper.toModelRange(t)));this.editor.model.change((t=>t.setSelection(n)))}),{priority:"high"}),t.on("contentInsertion",((t,e)=>{if(!this.isEnabled||"drop"!==e.method)return;const n="move"==Xk(e.dataTransfer),o=!e.resultRange||!e.resultRange.isCollapsed;this._finalizeDragging(o&&n)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const t=this.editor,e=t.editing.view,n=e.document;this.listenTo(n,"mousedown",((o,r)=>{if(i.isAndroid||!r)return;this._clearDraggableAttributesDelayed.cancel();let s=tb(r.target);if(i.isBlink&&!s&&!n.selection.isCollapsed){const t=n.selection.getSelectedElement();if(!t||!Ak(t)){const t=n.selection.editableElement;t&&!t.isReadOnly&&(s=t)}}s&&(e.change((t=>{t.setAttribute("draggable","true",s)})),this._draggableElement=t.editing.mapper.toModelElement(s))})),this.listenTo(n,"mouseup",(()=>{i.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const t=this.editor.editing;t.view.change((e=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&e.removeAttribute("draggable",t.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_setupDropMarker(){const t=this.editor;t.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),t.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(e,{writer:n})=>{if(t.model.schema.checkChild(e.markerRange.start,"$text"))return n.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(t){const e=this.toDomElement(t);return e.append("⁠",t.createElement("span"),"⁠"),e}))}})}_updateDropMarker(t){const e=this.editor,n=e.model.markers;e.model.change((e=>{n.has("drop-target")?n.get("drop-target").getRange().isEqual(t)||e.updateMarker("drop-target",{range:t}):e.addMarker("drop-target",{range:t,usingOperation:!1,affectsData:!1})}))}_removeDropMarker(){const t=this.editor.model;this._removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),t.markers.has("drop-target")&&t.change((t=>{t.removeMarker("drop-target")}))}_finalizeDragging(t){const e=this.editor,n=e.model;if(this._removeDropMarker(),this._clearDraggableAttributes(),e.plugins.has("WidgetToolbarRepository")){e.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop")}this._draggingUid="",this._draggedRange&&(t&&this.isEnabled&&n.deleteContent(n.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}}function Jk(t,e,n){const o=t.model,r=t.editing.mapper;let s=null;const a=e?e[0].start:null;if(n.is("uiElement")&&(n=n.parent),s=function(t,e){const n=t.model,o=t.editing.mapper;if(Ak(e))return n.createRangeOn(o.toModelElement(e));if(!e.is("editableElement")){const t=e.findAncestor((t=>Ak(t)||t.is("editableElement")));if(Ak(t))return n.createRangeOn(o.toModelElement(t))}return null}(t,n),s)return s;const c=function(t,e){const n=t.editing.mapper,o=t.editing.view,i=n.toModelElement(e);if(i)return i;const r=o.createPositionBefore(e),s=n.findMappedViewAncestor(r);return n.toModelElement(s)}(t,n),l=a?r.toModelPosition(a):null;return l?(s=function(t,e,n){const o=t.model;if(!o.schema.checkChild(n,"$block"))return null;const i=o.createPositionAt(n,0),r=e.path.slice(0,i.path.length),s=o.createPositionFromPath(e.root,r),a=s.nodeAfter;if(a&&o.schema.isObject(a))return o.createRangeOn(a);return null}(t,l,c),s||(s=o.schema.getNearestSelectionRange(l,i.isGecko?"forward":"backward"),s||function(t,e){const n=t.model;let o=e;for(;o;){if(n.schema.isObject(o))return n.createRangeOn(o);o=o.parent}return null}(t,l.parent))):function(t,e){const n=t.model,o=n.schema,i=n.createPositionAt(e,0);return o.getNearestSelectionRange(i,"forward")}(t,c)}function Xk(t){return i.isGecko?t.dropEffect:["all","copyMove"].includes(t.effectAllowed)?"move":"copy"}function tb(t){if(t.is("editableElement"))return null;if(t.hasClass("ck-widget__selection-handle"))return t.findAncestor(Ak);if(Ak(t))return t;const e=t.findAncestor((t=>Ak(t)||t.is("editableElement")));return Ak(e)?e:null}class eb extends Ni{static get pluginName(){return"PastePlainText"}static get requires(){return[_f]}init(){const t=this.editor,e=t.model,n=t.editing.view,o=n.document,i=e.document.selection;let r=!1;n.addObserver(wf),this.listenTo(o,"keydown",((t,e)=>{r=e.shiftKey})),t.plugins.get(_f).on("contentInsertion",((t,n)=>{(r||function(t,e){if(t.childCount>1)return!1;const n=t.getChild(0);if(e.isObject(n))return!1;return 0==Array.from(n.getAttributeKeys()).length}(n.content,e.schema))&&e.change((t=>{const o=Array.from(i.getAttributes()).filter((([t])=>e.schema.getAttributeProperties(t).isFormatting));i.isCollapsed||e.deleteContent(i,{doNotAutoparagraph:!0}),o.push(...i.getAttributes());const r=t.createRangeIn(n.content);for(const e of r.getItems())e.is("$textProxy")&&t.setAttributes(o,e)}))}))}}class nb extends Ni{static get pluginName(){return"Clipboard"}static get requires(){return[_f,Qk,eb]}}qo("px");Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;class ob extends zi{constructor(t){super(t),this.affectsData=!1}execute(){const t=this.editor.model,e=t.document.selection;let n=t.schema.getLimitElement(e);if(e.containsEntireContent(n)||!ib(t.schema,n))do{if(n=n.parent,!n)return}while(!ib(t.schema,n));t.change((t=>{t.setSelection(n,"in")}))}}function ib(t,e){return t.isLimit(e)&&(t.checkChild(e,"$text")||t.checkChild(e,"paragraph"))}const rb=mi("Ctrl+A");class sb extends Ni{static get pluginName(){return"SelectAllEditing"}init(){const t=this.editor,e=t.editing.view.document;t.commands.add("selectAll",new ob(t)),this.listenTo(e,"keydown",((e,n)=>{pi(n)===rb&&(t.execute("selectAll"),n.preventDefault())}))}}class ab extends Ni{static get pluginName(){return"SelectAllUI"}init(){const t=this.editor;t.ui.componentFactory.add("selectAll",(e=>{const n=t.commands.get("selectAll"),o=new tg(e),i=e.t;return o.set({label:i("Select all"),icon:'',keystroke:"Ctrl+A",tooltip:!0}),o.bind("isEnabled").to(n,"isEnabled"),this.listenTo(o,"execute",(()=>{t.execute("selectAll"),t.editing.view.focus()})),o}))}}class cb extends Ni{static get requires(){return[sb,ab]}static get pluginName(){return"SelectAll"}}var lb=Object.defineProperty,db=Object.getOwnPropertySymbols,hb=Object.prototype.hasOwnProperty,ub=Object.prototype.propertyIsEnumerable,gb=(t,e,n)=>e in t?lb(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class pb extends zi{constructor(t){super(t),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(t.data,"set",((t,e)=>{e[1]=((t,e)=>{for(var n in e||(e={}))hb.call(e,n)&&gb(t,n,e[n]);if(db)for(var n of db(e))ub.call(e,n)&&gb(t,n,e[n]);return t})({},e[1]);const n=e[1];n.batchType||(n.batchType={isUndoable:!1})}),{priority:"high"}),this.listenTo(t.data,"set",((t,e)=>{e[1].batchType.isUndoable||this.clearStack()}))}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(t){const e=this.editor.model.document.selection,n={ranges:e.hasOwnRange?Array.from(e.getRanges()):[],isBackward:e.isBackward};this._stack.push({batch:t,selection:n}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(t,e,n){const o=this.editor.model,i=o.document,r=[],s=t.map((t=>t.getTransformedByOperations(n))),a=s.flat();for(const t of s){const e=t.filter((t=>t.root!=i.graveyard)).filter((t=>!fb(t,a)));e.length&&(mb(e),r.push(e[0]))}r.length&&o.change((t=>{t.setSelection(r,{backward:e})}))}_undo(t,e){const n=this.editor.model,o=n.document;this._createdBatches.add(e);const i=t.operations.slice().filter((t=>t.isDocumentOperation));i.reverse();for(const t of i){const i=t.baseVersion+1,r=Array.from(o.history.getOperations(i)),s=Kd([t.getReversed()],r,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(let i of s){const r=i.affectedSelectable;r&&!n.canEditAt(r)&&(i=new Ld(i.baseVersion)),e.addOperation(i),n.applyOperation(i),o.history.setOperationAsUndone(t,i)}}}}function mb(t){t.sort(((t,e)=>t.start.isBefore(e.start)?-1:1));for(let e=1;ee!==t&&e.containsRange(t,!0)))}class kb extends pb{execute(t=null){const e=t?this._stack.findIndex((e=>e.batch==t)):this._stack.length-1,n=this._stack.splice(e,1)[0],o=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(o,(()=>{this._undo(n.batch,o);const t=this.editor.model.document.history.getOperations(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,t)})),this.fire("revert",n.batch,o),this.refresh()}}class bb extends pb{execute(){const t=this._stack.pop(),e=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(e,(()=>{const n=t.batch.operations[t.batch.operations.length-1].baseVersion+1,o=this.editor.model.document.history.getOperations(n);this._restoreSelection(t.selection.ranges,t.selection.isBackward,o),this._undo(t.batch,e)})),this.refresh()}}class wb extends Ni{constructor(){super(...arguments),this._batchRegistry=new WeakSet}static get pluginName(){return"UndoEditing"}init(){const t=this.editor;this._undoCommand=new kb(t),this._redoCommand=new bb(t),t.commands.add("undo",this._undoCommand),t.commands.add("redo",this._redoCommand),this.listenTo(t.model,"applyOperation",((t,e)=>{const n=e[0];if(!n.isDocumentOperation)return;const o=n.batch,i=this._redoCommand.createdBatches.has(o),r=this._undoCommand.createdBatches.has(o);this._batchRegistry.has(o)||(this._batchRegistry.add(o),o.isUndoable&&(i?this._undoCommand.addBatch(o):r||(this._undoCommand.addBatch(o),this._redoCommand.clearStack())))}),{priority:"highest"}),this.listenTo(this._undoCommand,"revert",((t,e,n)=>{this._redoCommand.addBatch(n)})),t.keystrokes.set("CTRL+Z","undo"),t.keystrokes.set("CTRL+Y","redo"),t.keystrokes.set("CTRL+SHIFT+Z","redo")}}const Ab='',Cb='';class _b extends Ni{static get pluginName(){return"UndoUI"}init(){const t=this.editor,e=t.locale,n=t.t,o="ltr"==e.uiLanguageDirection?Ab:Cb,i="ltr"==e.uiLanguageDirection?Cb:Ab;this._addButton("undo",n("Undo"),"CTRL+Z",o),this._addButton("redo",n("Redo"),"CTRL+Y",i)}_addButton(t,e,n,o){const i=this.editor;i.ui.componentFactory.add(t,(r=>{const s=i.commands.get(t),a=new tg(r);return a.set({label:e,icon:o,keystroke:n,tooltip:!0}),a.bind("isEnabled").to(s,"isEnabled"),this.listenTo(a,"execute",(()=>{i.execute(t),i.editing.view.focus()})),a}))}}class vb extends Ni{static get requires(){return[wb,_b]}static get pluginName(){return"Undo"}}class yb extends(G()){constructor(){super();const t=new window.FileReader;this._reader=t,this._data=void 0,this.set("loaded",0),t.onprogress=t=>{this.loaded=t.loaded}}get error(){return this._reader.error}get data(){return this._data}read(t){const e=this._reader;return this.total=t.size,new Promise(((n,o)=>{e.onload=()=>{const t=e.result;this._data=t,n(t)},e.onerror=()=>{o("error")},e.onabort=()=>{o("aborted")},this._reader.readAsDataURL(t)}))}abort(){this._reader.abort()}}class xb extends Ni{constructor(){super(...arguments),this.loaders=new vi,this._loadersMap=new Map,this._pendingAction=null}static get pluginName(){return"FileRepository"}static get requires(){return[ku]}init(){this.loaders.on("change",(()=>this._updatePendingAction())),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((t,e)=>e?t/e*100:0))}getLoader(t){return this._loadersMap.get(t)||null}createLoader(t){if(!this.createUploadAdapter)return b("filerepository-no-upload-adapter"),null;const e=new Eb(Promise.resolve(t),this.createUploadAdapter);return this.loaders.add(e),this._loadersMap.set(t,e),t instanceof Promise&&e.file.then((t=>{this._loadersMap.set(t,e)})).catch((()=>{})),e.on("change:uploaded",(()=>{let t=0;for(const e of this.loaders)t+=e.uploaded;this.uploaded=t})),e.on("change:uploadTotal",(()=>{let t=0;for(const e of this.loaders)e.uploadTotal&&(t+=e.uploadTotal);this.uploadTotal=t})),e}destroyLoader(t){const e=t instanceof Eb?t:this.getLoader(t);e._destroy(),this.loaders.remove(e),this._loadersMap.forEach(((t,n)=>{t===e&&this._loadersMap.delete(n)}))}_updatePendingAction(){const t=this.editor.plugins.get(ku);if(this.loaders.length){if(!this._pendingAction){const e=this.editor.t,n=t=>`${e("Upload in progress")} ${parseInt(t)}%.`;this._pendingAction=t.add(n(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",n)}}else t.remove(this._pendingAction),this._pendingAction=null}}class Eb extends(G()){constructor(t,e){super(),this.id=g(),this._filePromiseWrapper=this._createFilePromiseWrapper(t),this._adapter=e(this),this._reader=new yb,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((t,e)=>e?t/e*100:0)),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then((t=>this._filePromiseWrapper?t:null)):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new k("filerepository-read-wrong-status",this);return this.status="reading",this.file.then((t=>this._reader.read(t))).then((t=>{if("reading"!==this.status)throw this.status;return this.status="idle",t})).catch((t=>{if("aborted"===t)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:t}))}upload(){if("idle"!=this.status)throw new k("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then((()=>this._adapter.upload())).then((t=>(this.uploadResponse=t,this.status="idle",t))).catch((t=>{if("aborted"===this.status)throw"aborted";throw this.status="error",t}))}abort(){const t=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==t?this._reader.abort():"uploading"==t&&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(t){const e={};return e.promise=new Promise(((n,o)=>{e.rejecter=o,e.isFulfilled=!1,t.then((t=>{e.isFulfilled=!0,n(t)})).catch((t=>{e.isFulfilled=!0,o(t)}))})),e}}class Db extends xu{constructor(t){super(t),this.buttonView=new tg(t),this._fileInputView=new Ib(t),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.setTemplate({tag:"span",attributes:{class:"ck-file-dialog-button"},children:[this.buttonView,this._fileInputView]}),this.buttonView.on("execute",(()=>{this._fileInputView.open()}))}focus(){this.buttonView.focus()}}class Ib extends xu{constructor(t){super(t),this.set("acceptedType",void 0),this.set("allowMultipleFiles",!1);const e=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:e.to("acceptedType"),multiple:e.to("allowMultipleFiles")},on:{change:e.to((()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""}))}})}open(){this.element.click()}}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;const Sb="ckCsrfToken",Mb="abcdefghijklmnopqrstuvwxyz0123456789";function Tb(){let t=function(t){t=t.toLowerCase();const e=document.cookie.split(";");for(const n of e){const e=n.split("=");if(decodeURIComponent(e[0].trim().toLowerCase())===t)return decodeURIComponent(e[1])}return null}(Sb);var e,n;return t&&40==t.length||(t=function(t){let e="";const n=new Uint8Array(t);window.crypto.getRandomValues(n);for(let t=0;t.5?o.toUpperCase():o}return e}(40),e=Sb,n=t,document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(n)+";path=/"),t}class Bb{constructor(t,e,n){this.loader=t,this.url=e,this.t=n}upload(){return this.loader.file.then((t=>new Promise(((e,n)=>{this._initRequest(),this._initListeners(e,n,t),this._sendRequest(t)}))))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const t=this.xhr=new XMLHttpRequest;t.open("POST",this.url,!0),t.responseType="json"}_initListeners(t,e,n){const o=this.xhr,i=this.loader,r=(0,this.t)("Cannot upload file:")+` ${n.name}.`;o.addEventListener("error",(()=>e(r))),o.addEventListener("abort",(()=>e())),o.addEventListener("load",(()=>{const n=o.response;if(!n||!n.uploaded)return e(n&&n.error&&n.error.message?n.error.message:r);t({default:n.url})})),o.upload&&o.upload.addEventListener("progress",(t=>{t.lengthComputable&&(i.uploadTotal=t.total,i.uploaded=t.loaded)}))}_sendRequest(t){const e=new FormData;e.append("upload",t),e.append("ckCsrfToken",Tb()),this.xhr.send(e)}}function Nb(t,e,n,o){let i,r=null;"function"==typeof o?i=o:(r=t.commands.get(o),i=()=>{t.execute(o)}),t.model.document.on("change:data",((s,a)=>{if(r&&!r.isEnabled||!e.isEnabled)return;const c=yi(t.model.document.selection.getRanges());if(!c.isCollapsed)return;if(a.isUndo||!a.isLocal)return;const l=Array.from(t.model.document.differ.getChanges()),d=l[0];if(1!=l.length||"insert"!==d.type||"$text"!=d.name||1!=d.length)return;const h=d.position.parent;if(h.is("element","codeBlock"))return;if(h.is("element","listItem")&&"function"!=typeof o&&!["numberedList","bulletedList","todoList"].includes(o))return;if(r&&!0===r.value)return;const u=h.getChild(0),g=t.model.createRangeOn(u);if(!g.containsRange(c)&&!c.end.isEqual(g.end))return;const p=n.exec(u.data.substr(0,c.end.offset));p&&t.model.enqueueChange((e=>{const n=e.createPositionAt(h,0),o=e.createPositionAt(h,p[0].length),r=new el(n,o);if(!1!==i({match:p})){e.remove(r);const n=t.model.document.selection.getFirstRange(),o=e.createRangeIn(h);!h.isEmpty||o.isEqual(n)||o.containsRange(n,!0)||e.remove(h)}r.detach(),t.model.enqueueChange((()=>{t.plugins.get("Delete").requestUndoOnBackspace()}))}))}))}function Pb(t,e,n,o){let i,r;n instanceof RegExp?i=n:r=n,r=r||(t=>{let e;const n=[],o=[];for(;null!==(e=i.exec(t))&&!(e&&e.length<4);){let{index:t,1:i,2:r,3:s}=e;const a=i+r+s;t+=e[0].length-a.length;const c=[t,t+i.length],l=[t+i.length+r.length,t+i.length+r.length+s.length];n.push(c),n.push(l),o.push([t+i.length,t+i.length+r.length])}return{remove:n,format:o}}),t.model.document.on("change:data",((n,i)=>{if(i.isUndo||!i.isLocal||!e.isEnabled)return;const s=t.model,a=s.document.selection;if(!a.isCollapsed)return;const c=Array.from(s.document.differ.getChanges()),l=c[0];if(1!=c.length||"insert"!==l.type||"$text"!=l.name||1!=l.length)return;const d=a.focus,h=d.parent,{text:u,range:g}=function(t,e){let n=t.start;const o=Array.from(t.getItems()).reduce(((t,o)=>!o.is("$text")&&!o.is("$textProxy")||o.getAttribute("code")?(n=e.createPositionAfter(o),""):t+o.data),"");return{text:o,range:e.createRange(n,t.end)}}(s.createRange(s.createPositionAt(h,0),d),s),p=r(u),m=zb(g.start,p.format,s),f=zb(g.start,p.remove,s);m.length&&f.length&&s.enqueueChange((e=>{if(!1!==o(e,m)){for(const t of f.reverse())e.remove(t);s.enqueueChange((()=>{t.plugins.get("Delete").requestUndoOnBackspace()}))}}))}))}function zb(t,e,n){return e.filter((t=>void 0!==t[0]&&void 0!==t[1])).map((e=>n.createRange(t.getShiftedBy(e[0]),t.getShiftedBy(e[1]))))}function Ob(t,e){return(n,o)=>{if(!t.commands.get(e).isEnabled)return!1;const i=t.model.schema.getValidRanges(o,e);for(const t of i)n.setAttribute(e,!0,t);n.removeSelectionAttribute(e)}}class Lb extends zi{constructor(t,e){super(t),this.attributeKey=e}refresh(){const t=this.editor.model,e=t.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const e=this.editor.model,n=e.document.selection,o=void 0===t.forceValue?!this.value:t.forceValue;e.change((t=>{if(n.isCollapsed)o?t.setSelectionAttribute(this.attributeKey,!0):t.removeSelectionAttribute(this.attributeKey);else{const i=e.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const e of i)o?t.setAttribute(this.attributeKey,o,e):t.removeAttribute(this.attributeKey,e)}}))}_getValueFromFirstAllowedNode(){const t=this.editor.model,e=t.schema,n=t.document.selection;if(n.isCollapsed)return n.hasAttribute(this.attributeKey);for(const t of n.getRanges())for(const n of t.getItems())if(e.checkAttribute(n,this.attributeKey))return n.hasAttribute(this.attributeKey);return!1}}const jb="bold";class Rb extends Ni{static get pluginName(){return"BoldEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:jb}),t.model.schema.setAttributeProperties(jb,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:jb,view:"strong",upcastAlso:["b",t=>{const e=t.getStyle("font-weight");return e&&("bold"==e||Number(e)>=600)?{name:!0,styles:["font-weight"]}:null}]}),t.commands.add(jb,new Lb(t,jb)),t.keystrokes.set("CTRL+B",jb)}}const Fb="bold";class Vb extends Ni{static get pluginName(){return"BoldUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(Fb,(n=>{const o=t.commands.get(Fb),i=new tg(n);return i.set({label:e("Bold"),icon:bu.bold,keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute(Fb),t.editing.view.focus()})),i}))}}var Ub=n(8603),Hb={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Ub.Z,Hb);Ub.Z.locals;const Gb="italic";class qb extends Ni{static get pluginName(){return"ItalicEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:Gb}),t.model.schema.setAttributeProperties(Gb,{isFormatting:!0,copyOnEnter:!0}),t.conversion.attributeToElement({model:Gb,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),t.commands.add(Gb,new Lb(t,Gb)),t.keystrokes.set("CTRL+I",Gb)}}const Wb="italic";class Kb extends Ni{static get pluginName(){return"ItalicUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add(Wb,(n=>{const o=t.commands.get(Wb),i=new tg(n);return i.set({label:e("Italic"),icon:'',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute(Wb),t.editing.view.focus()})),i}))}}class Yb extends zi{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,n=e.schema,o=e.document.selection,i=Array.from(o.getSelectedBlocks()),r=void 0===t.forceValue?!this.value:t.forceValue;e.change((t=>{if(r){const e=i.filter((t=>$b(t)||Qb(n,t)));this._applyQuote(t,e)}else this._removeQuote(t,i.filter($b))}))}_getValue(){const t=yi(this.editor.model.document.selection.getSelectedBlocks());return!(!t||!$b(t))}_checkEnabled(){if(this.value)return!0;const t=this.editor.model.document.selection,e=this.editor.model.schema,n=yi(t.getSelectedBlocks());return!!n&&Qb(e,n)}_removeQuote(t,e){Zb(t,e).reverse().forEach((e=>{if(e.start.isAtStart&&e.end.isAtEnd)return void t.unwrap(e.start.parent);if(e.start.isAtStart){const n=t.createPositionBefore(e.start.parent);return void t.move(e,n)}e.end.isAtEnd||t.split(e.end);const n=t.createPositionAfter(e.end.parent);t.move(e,n)}))}_applyQuote(t,e){const n=[];Zb(t,e).reverse().forEach((e=>{let o=$b(e.start);o||(o=t.createElement("blockQuote"),t.wrap(e,o)),n.push(o)})),n.reverse().reduce(((e,n)=>e.nextSibling==n?(t.merge(t.createPositionAfter(e)),e):n))}}function $b(t){return"blockQuote"==t.parent.name?t.parent:null}function Zb(t,e){let n,o=0;const i=[];for(;o{const o=t.model.document.differ.getChanges();for(const t of o)if("insert"==t.type){const o=t.position.nodeAfter;if(!o)continue;if(o.is("element","blockQuote")&&o.isEmpty)return n.remove(o),!0;if(o.is("element","blockQuote")&&!e.checkChild(t.position,o))return n.unwrap(o),!0;if(o.is("element")){const t=n.createRangeIn(o);for(const o of t.getItems())if(o.is("element","blockQuote")&&!e.checkChild(n.createPositionBefore(o),o))return n.unwrap(o),!0}}else if("remove"==t.type){const e=t.position.parent;if(e.is("element","blockQuote")&&e.isEmpty)return n.remove(e),!0}return!1}));const n=this.editor.editing.view.document,o=t.model.document.selection,i=t.commands.get("blockQuote");this.listenTo(n,"enter",((e,n)=>{if(!o.isCollapsed||!i.value)return;o.getLastPosition().parent.isEmpty&&(t.execute("blockQuote"),t.editing.view.scrollToTheSelection(),n.preventDefault(),e.stop())}),{context:"blockquote"}),this.listenTo(n,"delete",((e,n)=>{if("backward"!=n.direction||!o.isCollapsed||!i.value)return;const r=o.getLastPosition().parent;r.isEmpty&&!r.previousSibling&&(t.execute("blockQuote"),t.editing.view.scrollToTheSelection(),n.preventDefault(),e.stop())}),{context:"blockquote"})}}var Xb=n(3062),tw={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Xb.Z,tw);Xb.Z.locals;class ew extends Ni{static get pluginName(){return"BlockQuoteUI"}init(){const t=this.editor,e=t.t;t.ui.componentFactory.add("blockQuote",(n=>{const o=t.commands.get("blockQuote"),i=new tg(n);return i.set({label:e("Block quote"),icon:bu.quote,tooltip:!0,isToggleable:!0}),i.bind("isOn","isEnabled").to(o,"value","isEnabled"),this.listenTo(i,"execute",(()=>{t.execute("blockQuote"),t.editing.view.focus()})),i}))}}class nw extends Ni{static get pluginName(){return"CKBoxUI"}afterInit(){const t=this.editor,e=t.commands.get("ckbox");if(!e)return;const n=t.t;t.ui.componentFactory.add("ckbox",(o=>{const i=new tg(o);return i.set({label:n("Open file manager"),icon:'',tooltip:!0}),i.bind("isOn","isEnabled").to(e,"value","isEnabled"),i.on("execute",(()=>{t.execute("ckbox")})),i}))}}function ow(t){const e=[];let n=0;for(const o in t){const i=parseInt(o,10);isNaN(i)||(i>n&&(n=i),e.push(`${t[o]} ${o}w`))}const o=[{srcset:e.join(","),sizes:`(max-width: ${n}px) 100vw, ${n}px`,type:"image/webp"}];return{imageFallbackUrl:t.default,imageSources:o}}class iw extends zi{constructor(t){super(t),this._chosenAssets=new Set,this._wrapper=null,this._initListeners()}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(){this.fire("ckbox:open")}_getValue(){return null!==this._wrapper}_checkEnabled(){const t=this.editor.commands.get("insertImage"),e=this.editor.commands.get("link");return!(!t.isEnabled&&!e.isEnabled)}_prepareOptions(){const t=this.editor.config.get("ckbox");return{theme:t.theme,language:t.language,tokenUrl:t.tokenUrl,serviceOrigin:t.serviceOrigin,dialog:{onClose:()=>this.fire("ckbox:close")},assets:{onChoose:t=>this.fire("ckbox:choose",t)}}}_initListeners(){const t=this.editor,e=t.model,n=!t.config.get("ckbox.ignoreDataId");this.on("ckbox",(()=>{this.refresh()}),{priority:"low"}),this.on("ckbox:open",(()=>{this.isEnabled&&!this.value&&(this._wrapper=mt(document,"div",{class:"ck ckbox-wrapper"}),document.body.appendChild(this._wrapper),window.CKBox.mount(this._wrapper,this._prepareOptions()))})),this.on("ckbox:close",(()=>{this.value&&(this._wrapper.remove(),this._wrapper=null)})),this.on("ckbox:choose",((o,i)=>{if(!this.isEnabled)return;const r=t.commands.get("insertImage"),s=t.commands.get("link"),a=function({assets:t,isImageAllowed:e,isLinkAllowed:n}){return t.map((t=>function(t){const e=t.data.metadata;if(!e)return!1;return e.width&&e.height}(t)?{id:t.data.id,type:"image",attributes:rw(t)}:{id:t.data.id,type:"link",attributes:sw(t)})).filter((t=>"image"===t.type?e:n))}({assets:i,isImageAllowed:r.isEnabled,isLinkAllowed:s.isEnabled});0!==a.length&&e.change((t=>{for(const e of a){const o=e===a[a.length-1];this._insertAsset(e,o,t),n&&(setTimeout((()=>this._chosenAssets.delete(e)),1e3),this._chosenAssets.add(e))}}))})),this.listenTo(t,"destroy",(()=>{this.fire("ckbox:close"),this._chosenAssets.clear()}))}_insertAsset(t,e,n){const o=this.editor.model.document.selection;n.removeSelectionAttribute("linkHref"),"image"===t.type?this._insertImage(t):this._insertLink(t,n),e||n.setSelection(o.getLastPosition())}_insertImage(t){const e=this.editor,{imageFallbackUrl:n,imageSources:o,imageTextAlternative:i}=t.attributes;e.execute("insertImage",{source:{src:n,sources:o,alt:i}})}_insertLink(t,e){const n=this.editor,o=n.model,i=o.document.selection,{linkName:r,linkHref:s}=t.attributes;if(i.isCollapsed){const t=Di(i.getAttributes()),n=e.createText(r,t),s=o.insertContent(n);e.setSelection(s)}n.execute("link",s)}}function rw(t){const{imageFallbackUrl:e,imageSources:n}=ow(t.data.imageUrls);return{imageFallbackUrl:e,imageSources:n,imageTextAlternative:t.data.metadata.description||""}}function sw(t){return{linkName:t.data.name,linkHref:aw(t)}}function aw(t){const e=new URL(t.data.url);return e.searchParams.set("download","true"),e.toString()}var cw=(t,e,n)=>new Promise(((o,i)=>{var r=t=>{try{a(n.next(t))}catch(t){i(t)}},s=t=>{try{a(n.throw(t))}catch(t){i(t)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((n=n.apply(t,e)).next())}));class lw extends Ni{static get requires(){return["ImageUploadEditing","ImageUploadProgress",xb,hw]}static get pluginName(){return"CKBoxUploadAdapter"}afterInit(){return cw(this,null,(function*(){const t=this.editor,e=!!t.config.get("ckbox"),n=!!window.CKBox;if(!e&&!n)return;const o=t.plugins.get(xb),i=t.plugins.get(hw);o.createUploadAdapter=e=>new dw(e,i.getToken(),t);const r=!t.config.get("ckbox.ignoreDataId"),s=t.plugins.get("ImageUploadEditing");r&&s.on("uploadComplete",((e,{imageElement:n,data:o})=>{t.model.change((t=>{t.setAttribute("ckboxImageId",o.ckboxImageId,n)}))}))}))}}class dw{constructor(t,e,n){this.loader=t,this.token=e,this.editor=n,this.controller=new AbortController,this.serviceOrigin=n.config.get("ckbox.serviceOrigin")}getWorkspaceId(){const t=(0,this.editor.t)("Cannot access default workspace."),e=this.editor.config.get("ckbox.defaultUploadWorkspaceId"),n=function(t,e){const[,n]=t.value.split("."),o=JSON.parse(atob(n)),i=o.auth&&o.auth.ckbox&&o.auth.ckbox.workspaces||[o.aud];return e?"superadmin"==(o.auth&&o.auth.ckbox&&o.auth.ckbox.role)||i.includes(e)?e:null:i[0]}(this.token,e);if(null==n)throw w("ckbox-access-default-workspace-error"),t;return n}getAvailableCategories(t=0){return cw(this,null,(function*(){const e=new URL("categories",this.serviceOrigin);return e.searchParams.set("limit",50..toString()),e.searchParams.set("offset",t.toString()),e.searchParams.set("workspaceId",this.getWorkspaceId()),this._sendHttpRequest({url:e}).then((e=>cw(this,null,(function*(){if(e.totalCount-(t+50)>0){const n=yield this.getAvailableCategories(t+50);return[...e.items,...n]}return e.items})))).catch((()=>{this.controller.signal.throwIfAborted(),w("ckbox-fetch-category-http-error")}))}))}getCategoryIdForFile(t){return cw(this,null,(function*(){const e=function(t){const e=new RegExp("\\.(?[^.]+)$");return t.match(e).groups.ext.toLowerCase()}(t.name),n=yield this.getAvailableCategories();if(!n)return null;const o=this.editor.config.get("ckbox.defaultUploadCategories");if(o){const t=Object.keys(o).find((t=>o[t].find((t=>t.toLowerCase()==e))));if(t){const e=n.find((e=>e.id===t||e.name===t));return e?e.id:null}}const i=n.find((t=>t.extensions.find((t=>t.toLowerCase()==e))));return i?i.id:null}))}upload(){return cw(this,null,(function*(){const t=this.editor.t,e=t("Cannot determine a category for the uploaded file."),n=yield this.loader.file,o=yield this.getCategoryIdForFile(n);if(!o)return Promise.reject(e);const i=new URL("assets",this.serviceOrigin),r=new FormData;i.searchParams.set("workspaceId",this.getWorkspaceId()),r.append("categoryId",o),r.append("file",n);const s={method:"POST",url:i,data:r,onUploadProgress:t=>{t.lengthComputable&&(this.loader.uploadTotal=t.total,this.loader.uploaded=t.loaded)}};return this._sendHttpRequest(s).then((t=>cw(this,null,(function*(){const e=ow(t.imageUrls);return{ckboxImageId:t.id,default:e.imageFallbackUrl,sources:e.imageSources}})))).catch((()=>{const e=t("Cannot upload file:")+` ${n.name}.`;return Promise.reject(e)}))}))}abort(){this.controller.abort()}_sendHttpRequest({url:t,method:e="GET",data:n,onUploadProgress:o}){const i=this.controller.signal,r=new XMLHttpRequest;r.open(e,t.toString(),!0),r.setRequestHeader("Authorization",this.token.value),r.setRequestHeader("CKBox-Version","CKEditor 5"),r.responseType="json";const s=()=>{r.abort()};return new Promise(((t,e)=>{i.addEventListener("abort",s),r.addEventListener("loadstart",(()=>{i.addEventListener("abort",s)})),r.addEventListener("loadend",(()=>{i.removeEventListener("abort",s)})),r.addEventListener("error",(()=>{e()})),r.addEventListener("abort",(()=>{e()})),r.addEventListener("load",(()=>cw(this,null,(function*(){const n=r.response;return!n||n.statusCode>=400?e(n&&n.message):t(n)})))),o&&r.upload.addEventListener("progress",(t=>{o(t)})),r.send(n)}))}}class hw extends Ni{static get pluginName(){return"CKBoxEditing"}static get requires(){return["CloudServices","LinkEditing","PictureEditing",lw]}init(){return t=this,e=null,n=function*(){const t=this.editor,e=!!t.config.get("ckbox"),n=!!window.CKBox;if(!e&&!n)return;this._initConfig();const o=t.plugins.get("CloudServicesCore"),i=t.config.get("ckbox.tokenUrl");if(i===t.config.get("cloudServices.tokenUrl")){const e=t.plugins.get("CloudServices");this._token=e.token}else this._token=yield o.createToken(i).init();t.config.get("ckbox.ignoreDataId")||(this._initSchema(),this._initConversion(),this._initFixers()),n&&t.commands.add("ckbox",new iw(t))},new Promise(((o,i)=>{var r=t=>{try{a(n.next(t))}catch(t){i(t)}},s=t=>{try{a(n.throw(t))}catch(t){i(t)}},a=t=>t.done?o(t.value):Promise.resolve(t.value).then(r,s);a((n=n.apply(t,e)).next())}));var t,e,n}getToken(){return this._token}_initConfig(){const t=this.editor;t.config.define("ckbox",{serviceOrigin:"https://api.ckbox.io",defaultUploadCategories:null,ignoreDataId:!1,language:t.locale.uiLanguage,theme:"default",tokenUrl:t.config.get("cloudServices.tokenUrl")});if(!t.config.get("ckbox.tokenUrl"))throw new k("ckbox-plugin-missing-token-url",this);t.plugins.has("ImageBlockEditing")||t.plugins.has("ImageInlineEditing")||w("ckbox-plugin-image-feature-missing",t)}_initSchema(){const t=this.editor.model.schema;t.extend("$text",{allowAttributes:"ckboxLinkId"}),t.isRegistered("imageBlock")&&t.extend("imageBlock",{allowAttributes:["ckboxImageId","ckboxLinkId"]}),t.isRegistered("imageInline")&&t.extend("imageInline",{allowAttributes:["ckboxImageId","ckboxLinkId"]}),t.addAttributeCheck(((t,e)=>{if(!!!t.last.getAttribute("linkHref")&&"ckboxLinkId"===e)return!1}))}_initConversion(){const t=this.editor;t.conversion.for("downcast").add((t=>{t.on("attribute:ckboxLinkId:imageBlock",((t,e,n)=>{const{writer:o,mapper:i,consumable:r}=n;if(!r.consume(e.item,t.name))return;const s=[...i.toViewElement(e.item).getChildren()].find((t=>"a"===t.name));s&&(e.item.hasAttribute("ckboxLinkId")?o.setAttribute("data-ckbox-resource-id",e.item.getAttribute("ckboxLinkId"),s):o.removeAttribute("data-ckbox-resource-id",s))}),{priority:"low"}),t.on("attribute:ckboxLinkId",((t,e,n)=>{const{writer:o,mapper:i,consumable:r}=n;if(r.consume(e.item,t.name)){if(e.attributeOldValue){const t=gw(o,e.attributeOldValue);o.unwrap(i.toViewRange(e.range),t)}if(e.attributeNewValue){const t=gw(o,e.attributeNewValue);if(e.item.is("selection")){const e=o.document.selection;o.wrap(e.getFirstRange(),t)}else o.wrap(i.toViewRange(e.range),t)}}}),{priority:"low"})})),t.conversion.for("upcast").add((t=>{t.on("element:a",((t,e,n)=>{const{writer:o,consumable:i}=n;if(!e.viewItem.getAttribute("href"))return;if(!i.consume(e.viewItem,{attributes:["data-ckbox-resource-id"]}))return;const r=e.viewItem.getAttribute("data-ckbox-resource-id");if(r)if(e.modelRange)for(let t of e.modelRange.getItems())t.is("$textProxy")&&(t=t.textNode),pw(t)&&o.setAttribute("ckboxLinkId",r,t);else{const t=e.modelCursor.nodeBefore||e.modelCursor.parent;o.setAttribute("ckboxLinkId",r,t)}}),{priority:"low"})})),t.conversion.for("downcast").attributeToAttribute({model:"ckboxImageId",view:"data-ckbox-resource-id"}),t.conversion.for("upcast").elementToAttribute({model:{key:"ckboxImageId",value:t=>t.getAttribute("data-ckbox-resource-id")},view:{attributes:{"data-ckbox-resource-id":/[\s\S]+/}}})}_initFixers(){const t=this.editor,e=t.model,n=e.document.selection;e.document.registerPostFixer(function(t){return e=>{let n=!1;const o=t.model,i=t.commands.get("ckbox");if(!i)return n;for(const t of o.document.differ.getChanges()){if("insert"!==t.type&&"attribute"!==t.type)continue;const o="insert"===t.type?new Bc(t.position,t.position.getShiftedBy(t.length)):t.range,r="attribute"===t.type&&"linkHref"===t.attributeKey&&null===t.attributeNewValue;for(const t of o.getItems()){if(r&&t.hasAttribute("ckboxLinkId")){e.removeAttribute("ckboxLinkId",t),n=!0;continue}const o=uw(t,i._chosenAssets);for(const i of o){const o="image"===i.type?"ckboxImageId":"ckboxLinkId";i.id!==t.getAttribute(o)&&(e.setAttribute(o,i.id,t),n=!0)}}}return n}}(t)),e.document.registerPostFixer(function(t){return e=>!(t.hasAttribute("linkHref")||!t.hasAttribute("ckboxLinkId"))&&(e.removeSelectionAttribute("ckboxLinkId"),!0)}(n))}}function uw(t,e){const n=t.is("element","imageInline")||t.is("element","imageBlock"),o=t.hasAttribute("linkHref");return[...e].filter((e=>"image"===e.type&&n?e.attributes.imageFallbackUrl===t.getAttribute("src"):"link"===e.type&&o?e.attributes.linkHref===t.getAttribute("linkHref"):void 0))}function gw(t,e){const n=t.createAttributeElement("a",{"data-ckbox-resource-id":e},{priority:5});return t.setCustomProperty("link",!0,n),n}function pw(t){return!!t.is("$text")||!(!t.is("element","imageInline")&&!t.is("element","imageBlock"))}class mw extends Ni{static get pluginName(){return"CKFinderUI"}init(){const t=this.editor,e=t.ui.componentFactory,n=t.t;e.add("ckfinder",(e=>{const o=t.commands.get("ckfinder"),i=new tg(e);return i.set({label:n("Insert image or file"),icon:'',tooltip:!0}),i.bind("isEnabled").to(o),i.on("execute",(()=>{t.execute("ckfinder"),t.editing.view.focus()})),i}))}}class fw extends zi{constructor(t){super(t),this.affectsData=!1,this.stopListening(this.editor.model.document,"change"),this.listenTo(this.editor.model.document,"change",(()=>this.refresh()),{priority:"low"})}refresh(){const t=this.editor.commands.get("insertImage"),e=this.editor.commands.get("link");this.isEnabled=t.isEnabled||e.isEnabled}execute(){const t=this.editor,e=this.editor.config.get("ckfinder.openerMethod")||"modal";if("popup"!=e&&"modal"!=e)throw new k("ckfinder-unknown-openermethod",t);const n=this.editor.config.get("ckfinder.options")||{};n.chooseFiles=!0;const o=n.onInit;n.language||(n.language=t.locale.uiLanguage),n.onInit=e=>{o&&o(e),e.on("files:choose",(n=>{const o=n.data.files.toArray(),i=o.filter((t=>!t.isImage())),r=o.filter((t=>t.isImage()));for(const e of i)t.execute("link",e.getUrl());const s=[];for(const t of r){const n=t.getUrl();s.push(n||e.request("file:getProxyUrl",{file:t}))}s.length&&kw(t,s)})),e.on("file:choose:resizedImage",(e=>{const n=e.data.resizedUrl;if(n)kw(t,[n]);else{const e=t.plugins.get("Notification"),n=t.locale.t;e.showWarning(n("Could not obtain resized image URL."),{title:n("Selecting resized image failed"),namespace:"ckfinder"})}}))},window.CKFinder[e](n)}}function kw(t,e){if(t.commands.get("insertImage").isEnabled)t.execute("insertImage",{source:e});else{const e=t.plugins.get("Notification"),n=t.locale.t;e.showWarning(n("Could not insert image at the current position."),{title:n("Inserting image failed"),namespace:"ckfinder"})}}class bw extends Ni{static get pluginName(){return"CKFinderEditing"}static get requires(){return[Tm,"LinkEditing"]}init(){const t=this.editor;if(!t.plugins.has("ImageBlockEditing")&&!t.plugins.has("ImageInlineEditing"))throw new k("ckfinder-missing-image-plugin",t);t.commands.add("ckfinder",new fw(t))}}class ww extends Ni{static get pluginName(){return"CloudServicesUploadAdapter"}static get requires(){return["CloudServices",xb]}init(){const t=this.editor,e=t.plugins.get("CloudServices"),n=e.token,o=e.uploadUrl;if(!n)return;const i=t.plugins.get("CloudServicesCore");this._uploadGateway=i.createUploadGateway(n,o),t.plugins.get(xb).createUploadAdapter=t=>new Aw(this._uploadGateway,t)}}class Aw{constructor(t,e){this.uploadGateway=t,this.loader=e}upload(){return this.loader.file.then((t=>(this.fileUploader=this.uploadGateway.upload(t),this.fileUploader.on("progress",((t,e)=>{this.loader.uploadTotal=e.total,this.loader.uploaded=e.uploaded})),this.fileUploader.send())))}abort(){this.fileUploader.abort()}}class Cw extends zi{constructor(t){super(t),this._isEnabledBasedOnSelection=!1}refresh(){const t=this.editor.model,e=yi(t.document.selection.getSelectedBlocks());this.value=!!e&&e.is("element","paragraph"),this.isEnabled=!!e&&_w(e,t.schema)}execute(t={}){const e=this.editor.model,n=e.document,o=t.selection||n.selection;e.canEditAt(o)&&e.change((t=>{const n=o.getSelectedBlocks();for(const o of n)!o.is("element","paragraph")&&_w(o,e.schema)&&t.rename(o,"paragraph")}))}}function _w(t,e){return e.checkChild(t.parent,"paragraph")&&!e.isObject(t)}class vw extends zi{constructor(t){super(t),this._isEnabledBasedOnSelection=!1}execute(t){const e=this.editor.model,n=t.attributes;let o=t.position;e.canEditAt(o)&&e.change((t=>{if(o=this._findPositionToInsertParagraph(o,t),!o)return;const i=t.createElement("paragraph");n&&e.schema.setAllowedAttributes(i,n,t),e.insertContent(i,o),t.setSelection(i,"in")}))}_findPositionToInsertParagraph(t,e){const n=this.editor.model;if(n.schema.checkChild(t,"paragraph"))return t;const o=n.schema.findAllowedParent(t,"paragraph");if(!o)return null;const i=t.parent,r=n.schema.checkChild(i,"$text");return i.isEmpty||r&&t.isAtEnd?n.createPositionAfter(i):!i.isEmpty&&r&&t.isAtStart?n.createPositionBefore(i):e.split(t,o).position}}const yw=class extends Ni{static get pluginName(){return"Paragraph"}init(){const t=this.editor,e=t.model;t.commands.add("paragraph",new Cw(t)),t.commands.add("insertParagraph",new vw(t)),e.schema.register("paragraph",{inheritAllFrom:"$block"}),t.conversion.elementToElement({model:"paragraph",view:"p"}),t.conversion.for("upcast").elementToElement({model:(t,{writer:e})=>yw.paragraphLikeElements.has(t.name)?t.isEmpty?null:e.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}};let xw=yw;xw.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);class Ew extends zi{constructor(t,e){super(t),this.modelElements=e}refresh(){const t=yi(this.editor.model.document.selection.getSelectedBlocks());this.value=!!t&&this.modelElements.includes(t.name)&&t.name,this.isEnabled=!!t&&this.modelElements.some((e=>Dw(t,e,this.editor.model.schema)))}execute(t){const e=this.editor.model,n=e.document,o=t.value;e.change((t=>{const i=Array.from(n.selection.getSelectedBlocks()).filter((t=>Dw(t,o,e.schema)));for(const e of i)e.is("element",o)||t.rename(e,o)}))}}function Dw(t,e,n){return n.checkChild(t.parent,e)&&!n.isObject(t)}const Iw="paragraph";class Sw extends Ni{static get pluginName(){return"HeadingEditing"}constructor(t){super(t),t.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[xw]}init(){const t=this.editor,e=t.config.get("heading.options"),n=[];for(const o of e)"paragraph"!==o.model&&(t.model.schema.register(o.model,{inheritAllFrom:"$block"}),t.conversion.elementToElement(o),n.push(o.model));this._addDefaultH1Conversion(t),t.commands.add("heading",new Ew(t,n))}afterInit(){const t=this.editor,e=t.commands.get("enter"),n=t.config.get("heading.options");e&&this.listenTo(e,"afterExecute",((e,o)=>{const i=t.model.document.selection.getFirstPosition().parent;n.some((t=>i.is("element",t.model)))&&!i.is("element",Iw)&&0===i.childCount&&o.writer.rename(i,Iw)}))}_addDefaultH1Conversion(t){t.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:p.low+1})}}var Mw=n(8733),Tw={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Mw.Z,Tw);Mw.Z.locals;class Bw extends Ni{static get pluginName(){return"HeadingUI"}init(){const t=this.editor,e=t.t,n=function(t){const e=t.t,n={Paragraph:e("Paragraph"),"Heading 1":e("Heading 1"),"Heading 2":e("Heading 2"),"Heading 3":e("Heading 3"),"Heading 4":e("Heading 4"),"Heading 5":e("Heading 5"),"Heading 6":e("Heading 6")};return t.config.get("heading.options").map((t=>{const e=n[t.title];return e&&e!=t.title&&(t.title=e),t}))}(t),o=e("Choose heading"),i=e("Heading");t.ui.componentFactory.add("heading",(e=>{const r={},s=new vi,a=t.commands.get("heading"),c=t.commands.get("paragraph"),l=[a];for(const t of n){const e={type:"button",model:new Bm({label:t.title,class:t.class,role:"menuitemradio",withText:!0})};"paragraph"===t.model?(e.model.bind("isOn").to(c,"value"),e.model.set("commandName","paragraph"),l.push(c)):(e.model.bind("isOn").to(a,"value",(e=>e===t.model)),e.model.set({commandName:"heading",commandValue:t.model})),s.add(e),r[t.model]=t.title}const d=Yg(e);return Qg(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(l,"isEnabled",((...t)=>t.some((t=>t)))),d.buttonView.bind("label").to(a,"value",c,"value",((t,e)=>{const n=t||e&&"paragraph";return"boolean"==typeof n?o:r[n]?r[n]:o})),this.listenTo(d,"execute",(e=>{const{commandName:n,commandValue:o}=e.source;t.execute(n,o?{value:o}:void 0),t.editing.view.focus()})),d}))}}function Nw(t){return t.createContainerElement("figure",{class:"image"},[t.createEmptyElement("img"),t.createSlot("children")])}function Pw(t,e){const n=t.plugins.get("ImageUtils"),o=t.plugins.has("ImageInlineEditing")&&t.plugins.has("ImageBlockEditing");return t=>{if(!n.isInlineImageView(t))return null;if(!o)return i(t);return("block"==t.getStyle("display")||t.findAncestor(n.isBlockImageView)?"imageBlock":"imageInline")!==e?null:i(t)};function i(t){const e={name:!0};return t.hasAttribute("src")&&(e.attributes=["src"]),e}}function zw(t,e){const n=yi(e.getSelectedBlocks());return!n||t.isObject(n)||n.isEmpty&&"listItem"!=n.name?"imageBlock":"imageInline"}var Ow=Object.defineProperty,Lw=Object.getOwnPropertySymbols,jw=Object.prototype.hasOwnProperty,Rw=Object.prototype.propertyIsEnumerable,Fw=(t,e,n)=>e in t?Ow(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Vw=(t,e)=>{for(var n in e||(e={}))jw.call(e,n)&&Fw(t,n,e[n]);if(Lw)for(var n of Lw(e))Rw.call(e,n)&&Fw(t,n,e[n]);return t};class Uw extends Ni{static get pluginName(){return"ImageUtils"}isImage(t){return this.isInlineImage(t)||this.isBlockImage(t)}isInlineImageView(t){return!!t&&t.is("element","img")}isBlockImageView(t){return!!t&&t.is("element","figure")&&t.hasClass("image")}insertImage(t={},e=null,n=null){const o=this.editor,i=o.model,r=i.document.selection;n=Hw(o,e||r,n),t=Vw(Vw({},Object.fromEntries(r.getAttributes())),t);for(const e in t)i.schema.checkAttribute(n,e)||delete t[e];return i.change((o=>{const r=o.createElement(n,t);return i.insertObject(r,e,null,{setSelection:"on",findOptimalPosition:e||"imageInline"==n?void 0:"auto"}),r.parent?r:null}))}getClosestSelectedImageWidget(t){const e=t.getFirstPosition();if(!e)return null;const n=t.getSelectedElement();if(n&&this.isImageWidget(n))return n;let o=e.parent;for(;o;){if(o.is("element")&&this.isImageWidget(o))return o;o=o.parent}return null}getClosestSelectedImageElement(t){const e=t.getSelectedElement();return this.isImage(e)?e:t.getFirstPosition().findAncestor("imageBlock")}isImageAllowed(){const t=this.editor.model.document.selection;return function(t,e){const n=Hw(t,e,null);if("imageBlock"==n){const n=function(t,e){const n=Ek(t,e),o=n.start.parent;if(o.isEmpty&&!o.is("element","$root"))return o.parent;return o}(e,t.model);if(t.model.schema.checkChild(n,"imageBlock"))return!0}else if(t.model.schema.checkChild(e.focus,"imageInline"))return!0;return!1}(this.editor,t)&&function(t){return[...t.focus.getAncestors()].every((t=>!t.is("element","imageBlock")))}(t)}toImageWidget(t,e,n){e.setCustomProperty("image",!0,t);return Ck(t,e,{label:()=>{const e=this.findViewImgElement(t).getAttribute("alt");return e?`${e} ${n}`:n}})}isImageWidget(t){return!!t.getCustomProperty("image")&&Ak(t)}isBlockImage(t){return!!t&&t.is("element","imageBlock")}isInlineImage(t){return!!t&&t.is("element","imageInline")}findViewImgElement(t){if(this.isInlineImageView(t))return t;const e=this.editor.editing.view;for(const{item:n}of e.createRangeIn(t))if(this.isInlineImageView(n))return n}}function Hw(t,e,n){const o=t.model.schema,i=t.config.get("image.insert.type");return t.plugins.has("ImageBlockEditing")?t.plugins.has("ImageInlineEditing")?n||("inline"===i?"imageInline":"block"===i?"imageBlock":e.is("selection")?zw(o,e):o.checkChild(e,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;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 Gw extends zi{refresh(){const t=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!t,this.isEnabled&&t.hasAttribute("alt")?this.value=t.getAttribute("alt"):this.value=!1}execute(t){const e=this.editor,n=e.plugins.get("ImageUtils"),o=e.model,i=n.getClosestSelectedImageElement(o.document.selection);o.change((e=>{e.setAttribute("alt",t.newValue,i)}))}}class qw extends Ni{static get requires(){return[Uw]}static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new Gw(this.editor))}}var Ww=n(1905),Kw={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Ww.Z,Kw);Ww.Z.locals;var Yw=n(6764),$w={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Yw.Z,$w);Yw.Z.locals;class Zw extends xu{constructor(t){super(t);const e=this.locale.t;this.focusTracker=new xi,this.keystrokes=new Ei,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(e("Save"),bu.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(e("Cancel"),bu.cancel,"ck-button-cancel","cancel"),this._focusables=new _u,this._focusCycler=new vg({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),Cu({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(t,e,n,o){const i=new tg(this.locale);return i.set({label:t,icon:e,tooltip:!0}),i.extendTemplate({attributes:{class:n}}),o&&i.delegate("execute").to(this,o),i}_createLabeledInputView(){const t=this.locale.t,e=new hg(this.locale,tp);return e.label=t("Text alternative"),e}}function Qw(t){const e=t.editing.view,n=Kp.defaultPositions,o=t.plugins.get("ImageUtils");return{target:e.domConverter.mapViewToDom(o.getClosestSelectedImageWidget(e.document.selection)),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,n.viewportStickyNorth]}}class Jw extends Ni{static get requires(){return[jm]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton()}destroy(){super.destroy(),this._form&&this._form.destroy()}_createButton(){const t=this.editor,e=t.t;t.ui.componentFactory.add("imageTextAlternative",(n=>{const o=t.commands.get("imageTextAlternative"),i=new tg(n);return i.set({label:e("Change image text alternative"),icon:bu.lowVision,tooltip:!0}),i.bind("isEnabled").to(o,"isEnabled"),i.bind("isOn").to(o,"value",(t=>!!t)),this.listenTo(i,"execute",(()=>{this._showForm()})),i}))}_createForm(){const t=this.editor,e=t.editing.view.document,n=t.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(Au(Zw))(t.locale),this._form.render(),this.listenTo(this._form,"submit",(()=>{t.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",((t,e)=>{this._hideForm(!0),e()})),this.listenTo(t.ui,"update",(()=>{n.getClosestSelectedImageWidget(e.selection)?this._isVisible&&function(t){const e=t.plugins.get("ContextualBalloon");if(t.plugins.get("ImageUtils").getClosestSelectedImageWidget(t.editing.view.document.selection)){const n=Qw(t);e.updatePosition(n)}}(t):this._hideForm(!0)})),wu({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;this._form||this._createForm();const t=this.editor,e=t.commands.get("imageTextAlternative"),n=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:Qw(t)}),n.fieldView.value=n.fieldView.element.value=e.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(t=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),t&&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 Xw extends Ni{static get requires(){return[qw,Jw]}static get pluginName(){return"ImageTextAlternative"}}function tA(t,e){const n=(e,n,o)=>{if(!o.consumable.consume(n.item,e.name))return;const i=o.writer,r=o.mapper.toViewElement(n.item),s=t.findViewImgElement(r);if(null===n.attributeNewValue){const t=n.attributeOldValue;t&&t.data&&(i.removeAttribute("srcset",s),i.removeAttribute("sizes",s),t.width&&i.removeAttribute("width",s))}else{const t=n.attributeNewValue;t&&t.data&&(i.setAttribute("srcset",t.data,s),i.setAttribute("sizes","100vw",s),t.width&&i.setAttribute("width",t.width,s))}};return t=>{t.on(`attribute:srcset:${e}`,n)}}function eA(t,e,n){const o=(e,n,o)=>{if(!o.consumable.consume(n.item,e.name))return;const i=o.writer,r=o.mapper.toViewElement(n.item),s=t.findViewImgElement(r);i.setAttribute(n.attributeKey,n.attributeNewValue||"",s)};return t=>{t.on(`attribute:${n}:${e}`,o)}}class nA extends Aa{observe(t){this.listenTo(t,"load",((t,e)=>{const n=e.target;this.checkShouldIgnoreEventFromTarget(n)||"IMG"==n.tagName&&this._fireEvents(e)}),{useCapture:!0})}stopObserving(t){this.stopListening(t)}_fireEvents(t){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",t))}}var oA=Object.defineProperty,iA=Object.getOwnPropertySymbols,rA=Object.prototype.hasOwnProperty,sA=Object.prototype.propertyIsEnumerable,aA=(t,e,n)=>e in t?oA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cA=(t,e)=>{for(var n in e||(e={}))rA.call(e,n)&&aA(t,n,e[n]);if(iA)for(var n of iA(e))sA.call(e,n)&&aA(t,n,e[n]);return t};class lA extends zi{constructor(t){super(t);const e=t.config.get("image.insert.type");t.plugins.has("ImageBlockEditing")||"block"===e&&b("image-block-plugin-required"),t.plugins.has("ImageInlineEditing")||"inline"===e&&b("image-inline-plugin-required")}refresh(){const t=this.editor.plugins.get("ImageUtils");this.isEnabled=t.isImageAllowed()}execute(t){const e=bi(t.source),n=this.editor.model.document.selection,o=this.editor.plugins.get("ImageUtils"),i=Object.fromEntries(n.getAttributes());e.forEach(((t,e)=>{const r=n.getSelectedElement();if("string"==typeof t&&(t={src:t}),e&&r&&o.isImage(r)){const e=this.editor.model.createPositionAfter(r);o.insertImage(cA(cA({},t),i),e)}else o.insertImage(cA(cA({},t),i))}))}}class dA extends zi{refresh(){const t=this.editor.plugins.get("ImageUtils"),e=this.editor.model.document.selection.getSelectedElement();this.isEnabled=t.isImage(e),this.value=this.isEnabled?e.getAttribute("src"):null}execute(t){const e=this.editor.model.document.selection.getSelectedElement();this.editor.model.change((n=>{n.setAttribute("src",t.source,e),n.removeAttribute("srcset",e),n.removeAttribute("sizes",e)}))}}class hA extends Ni{static get requires(){return[Uw]}static get pluginName(){return"ImageEditing"}init(){const t=this.editor,e=t.conversion;t.editing.view.addObserver(nA),e.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:{key:"srcset",value:t=>{const e={data:t.getAttribute("srcset")};return t.hasAttribute("width")&&(e.width=t.getAttribute("width")),e}}});const n=new lA(t),o=new dA(t);t.commands.add("insertImage",n),t.commands.add("replaceImageSource",o),t.commands.add("imageInsert",n)}}class uA extends zi{constructor(t,e){super(t),this._modelElementName=e}refresh(){const t=this.editor.plugins.get("ImageUtils"),e=t.getClosestSelectedImageElement(this.editor.model.document.selection);"imageBlock"===this._modelElementName?this.isEnabled=t.isInlineImage(e):this.isEnabled=t.isBlockImage(e)}execute(){const t=this.editor,e=this.editor.model,n=t.plugins.get("ImageUtils"),o=n.getClosestSelectedImageElement(e.document.selection),i=Object.fromEntries(o.getAttributes());return i.src||i.uploadId?e.change((t=>{const r=Array.from(e.markers).filter((t=>t.getRange().containsItem(o))),s=n.insertImage(i,e.createSelection(o,"on"),this._modelElementName);if(!s)return null;const a=t.createRangeOn(s);for(const e of r){const n=e.getRange(),o="$graveyard"!=n.root.rootName?n.getJoined(a,!0):a;t.updateMarker(e,{range:o})}return{oldElement:o,newElement:s}})):null}}class gA extends Ni{static get requires(){return[hA,Uw,_f]}static get pluginName(){return"ImageBlockEditing"}init(){const t=this.editor;t.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),t.plugins.has("ImageInlineEditing")&&(t.commands.add("imageTypeBlock",new uA(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const t=this.editor,e=t.t,n=t.conversion,o=t.plugins.get("ImageUtils");n.for("dataDowncast").elementToStructure({model:"imageBlock",view:(t,{writer:e})=>Nw(e)}),n.for("editingDowncast").elementToStructure({model:"imageBlock",view:(t,{writer:n})=>o.toImageWidget(Nw(n),n,e("image widget"))}),n.for("downcast").add(eA(o,"imageBlock","src")).add(eA(o,"imageBlock","alt")).add(tA(o,"imageBlock")),n.for("upcast").elementToElement({view:Pw(t,"imageBlock"),model:(t,{writer:e})=>e.createElement("imageBlock",t.hasAttribute("src")?{src:t.getAttribute("src")}:void 0)}).add(function(t){const e=(e,n,o)=>{if(!o.consumable.test(n.viewItem,{name:!0,classes:"image"}))return;const i=t.findViewImgElement(n.viewItem);if(!i||!o.consumable.test(i,{name:!0}))return;o.consumable.consume(n.viewItem,{name:!0,classes:"image"});const r=yi(o.convertItem(i,n.modelCursor).modelRange.getItems());r?(o.convertChildren(n.viewItem,r),o.updateConversionResult(r,n)):o.consumable.revert(n.viewItem,{name:!0,classes:"image"})};return t=>{t.on("element:figure",e)}}(o))}_setupClipboardIntegration(){const t=this.editor,e=t.model,n=t.editing.view,o=t.plugins.get("ImageUtils"),i=t.plugins.get("ClipboardPipeline");this.listenTo(i,"inputTransformation",((i,r)=>{const s=Array.from(r.content.getChildren());let a;if(!s.every(o.isInlineImageView))return;a=r.targetRanges?t.editing.mapper.toModelRange(r.targetRanges[0]):e.document.selection.getFirstRange();const c=e.createSelection(a);if("imageBlock"===zw(e.schema,c)){const t=new uu(n.document),e=s.map((e=>t.createElement("figure",{class:"image"},e)));r.content=t.createDocumentFragment(e)}}))}}var pA=n(3508),mA={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(pA.Z,mA);pA.Z.locals;class fA extends Ni{static get requires(){return[gA,Uk,Xw]}static get pluginName(){return"ImageBlock"}}class kA extends Ni{static get requires(){return[hA,Uw,_f]}static get pluginName(){return"ImageInlineEditing"}init(){const t=this.editor,e=t.model.schema;e.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"]}),e.addChildCheck(((t,e)=>{if(t.endsWith("caption")&&"imageInline"===e.name)return!1})),this._setupConversion(),t.plugins.has("ImageBlockEditing")&&(t.commands.add("imageTypeInline",new uA(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const t=this.editor,e=t.t,n=t.conversion,o=t.plugins.get("ImageUtils");n.for("dataDowncast").elementToElement({model:"imageInline",view:(t,{writer:e})=>e.createEmptyElement("img")}),n.for("editingDowncast").elementToStructure({model:"imageInline",view:(t,{writer:n})=>o.toImageWidget(function(t){return t.createContainerElement("span",{class:"image-inline"},t.createEmptyElement("img"))}(n),n,e("image widget"))}),n.for("downcast").add(eA(o,"imageInline","src")).add(eA(o,"imageInline","alt")).add(tA(o,"imageInline")),n.for("upcast").elementToElement({view:Pw(t,"imageInline"),model:(t,{writer:e})=>e.createElement("imageInline",t.hasAttribute("src")?{src:t.getAttribute("src")}:void 0)})}_setupClipboardIntegration(){const t=this.editor,e=t.model,n=t.editing.view,o=t.plugins.get("ImageUtils"),i=t.plugins.get("ClipboardPipeline");this.listenTo(i,"inputTransformation",((i,r)=>{const s=Array.from(r.content.getChildren());let a;if(!s.every(o.isBlockImageView))return;a=r.targetRanges?t.editing.mapper.toModelRange(r.targetRanges[0]):e.document.selection.getFirstRange();const c=e.createSelection(a);if("imageInline"===zw(e.schema,c)){const t=new uu(n.document),e=s.map((e=>1===e.childCount?(Array.from(e.getAttributes()).forEach((n=>t.setAttribute(...n,o.findViewImgElement(e)))),e.getChild(0)):e));r.content=t.createDocumentFragment(e)}}))}}class bA extends Ni{static get requires(){return[kA,Uk,Xw]}static get pluginName(){return"ImageInline"}}class wA extends Ni{static get pluginName(){return"ImageCaptionUtils"}static get requires(){return[Uw]}getCaptionFromImageModelElement(t){for(const e of t.getChildren())if(e&&e.is("element","caption"))return e;return null}getCaptionFromModelSelection(t){const e=this.editor.plugins.get("ImageUtils"),n=t.getFirstPosition().findAncestor("caption");return n&&e.isBlockImage(n.parent)?n:null}matchImageCaptionViewElement(t){const e=this.editor.plugins.get("ImageUtils");return"figcaption"==t.name&&e.isBlockImageView(t.parent)?{name:!0}:null}}class AA extends zi{refresh(){const t=this.editor,e=t.plugins.get("ImageCaptionUtils"),n=t.plugins.get("ImageUtils");if(!t.plugins.has(gA))return this.isEnabled=!1,void(this.value=!1);const o=t.model.document.selection,i=o.getSelectedElement();if(!i){const t=e.getCaptionFromModelSelection(o);return this.isEnabled=!!t,void(this.value=!!t)}this.isEnabled=n.isImage(i),this.isEnabled?this.value=!!e.getCaptionFromImageModelElement(i):this.value=!1}execute(t={}){const{focusCaptionOnShow:e}=t;this.editor.model.change((t=>{this.value?this._hideImageCaption(t):this._showImageCaption(t,e)}))}_showImageCaption(t,e){const n=this.editor.model.document.selection,o=this.editor.plugins.get("ImageCaptionEditing"),i=this.editor.plugins.get("ImageUtils");let r=n.getSelectedElement();const s=o._getSavedCaption(r);i.isInlineImage(r)&&(this.editor.execute("imageTypeBlock"),r=n.getSelectedElement());const a=s||t.createElement("caption");t.append(a,r),e&&t.setSelection(a,"in")}_hideImageCaption(t){const e=this.editor,n=e.model.document.selection,o=e.plugins.get("ImageCaptionEditing"),i=e.plugins.get("ImageCaptionUtils");let r,s=n.getSelectedElement();s?r=i.getCaptionFromImageModelElement(s):(r=i.getCaptionFromModelSelection(n),s=r.parent),o._saveCaption(s,r),t.setSelection(s,"on"),t.remove(r)}}class CA extends Ni{constructor(t){super(t),this._savedCaptionsMap=new WeakMap}static get requires(){return[Uw,wA]}static get pluginName(){return"ImageCaptionEditing"}init(){const t=this.editor,e=t.model.schema;e.isRegistered("caption")?e.extend("caption",{allowIn:"imageBlock"}):e.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),t.commands.add("toggleImageCaption",new AA(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration(),this._registerCaptionReconversion()}_setupConversion(){const t=this.editor,e=t.editing.view,n=t.plugins.get("ImageUtils"),o=t.plugins.get("ImageCaptionUtils"),i=t.t;t.conversion.for("upcast").elementToElement({view:t=>o.matchImageCaptionViewElement(t),model:"caption"}),t.conversion.for("dataDowncast").elementToElement({model:"caption",view:(t,{writer:e})=>n.isBlockImage(t.parent)?e.createContainerElement("figcaption"):null}),t.conversion.for("editingDowncast").elementToElement({model:"caption",view:(t,{writer:o})=>{if(!n.isBlockImage(t.parent))return null;const r=o.createEditableElement("figcaption");o.setCustomProperty("imageCaption",!0,r),r.placeholder=i("Enter image caption"),Yi({view:e,element:r,keepOnFocus:!0});const s=t.parent.getAttribute("alt");return xk(r,o,{label:s?i("Caption for image: %0",[s]):i("Caption for the image")})}})}_setupImageTypeCommandsIntegration(){const t=this.editor,e=t.plugins.get("ImageUtils"),n=t.plugins.get("ImageCaptionUtils"),o=t.commands.get("imageTypeInline"),i=t.commands.get("imageTypeBlock"),r=t=>{if(!t.return)return;const{oldElement:o,newElement:i}=t.return;if(!o)return;if(e.isBlockImage(o)){const t=n.getCaptionFromImageModelElement(o);if(t)return void this._saveCaption(i,t)}const r=this._getSavedCaption(o);r&&this._saveCaption(i,r)};o&&this.listenTo(o,"execute",r,{priority:"low"}),i&&this.listenTo(i,"execute",r,{priority:"low"})}_getSavedCaption(t){const e=this._savedCaptionsMap.get(t);return e?vc.fromJSON(e):null}_saveCaption(t,e){this._savedCaptionsMap.set(t,e.toJSON())}_registerCaptionReconversion(){const t=this.editor,e=t.model,n=t.plugins.get("ImageUtils"),o=t.plugins.get("ImageCaptionUtils");e.document.on("change:data",(()=>{const i=e.document.differ.getChanges();for(const e of i){if("alt"!==e.attributeKey)continue;const i=e.range.start.nodeAfter;if(n.isBlockImage(i)){const e=o.getCaptionFromImageModelElement(i);if(!e)return;t.editing.reconvertItem(e)}}}))}}class _A extends Ni{static get requires(){return[wA]}static get pluginName(){return"ImageCaptionUI"}init(){const t=this.editor,e=t.editing.view,n=t.plugins.get("ImageCaptionUtils"),o=t.t;t.ui.componentFactory.add("toggleImageCaption",(i=>{const r=t.commands.get("toggleImageCaption"),s=new tg(i);return s.set({icon:bu.caption,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.bind("label").to(r,"value",(t=>o(t?"Toggle caption off":"Toggle caption on"))),this.listenTo(s,"execute",(()=>{t.execute("toggleImageCaption",{focusCaptionOnShow:!0});const o=n.getCaptionFromModelSelection(t.model.document.selection);if(o){const n=t.editing.mapper.toViewElement(o);e.scrollToTheSelection(),e.change((t=>{t.addClass("image__caption_highlighted",n)}))}t.editing.view.focus()})),s}))}}var vA=n(2640),yA={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(vA.Z,yA);vA.Z.locals;function xA(t){const e=t.map((t=>t.replace("+","\\+")));return new RegExp(`^image\\/(${e.join("|")})$`)}function EA(t){return new Promise(((e,n)=>{const o=t.getAttribute("src");fetch(o).then((t=>t.blob())).then((t=>{const n=DA(t,o),i=n.replace("image/",""),r=new File([t],`image.${i}`,{type:n});e(r)})).catch((t=>t&&"TypeError"===t.name?function(t){return function(t){return new Promise(((e,n)=>{const o=Bo.document.createElement("img");o.addEventListener("load",(()=>{const t=Bo.document.createElement("canvas");t.width=o.width,t.height=o.height;t.getContext("2d").drawImage(o,0,0),t.toBlob((t=>t?e(t):n()))})),o.addEventListener("error",(()=>n())),o.src=t}))}(t).then((e=>{const n=DA(e,t),o=n.replace("image/","");return new File([e],`image.${o}`,{type:n})}))}(o).then(e).catch(n):n(t)))}))}function DA(t,e){return t.type?t.type:e.match(/data:(image\/\w+);base64/)?e.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}class IA extends Ni{static get pluginName(){return"ImageUploadUI"}init(){const t=this.editor,e=t.t,n=n=>{const o=new Db(n),i=t.commands.get("uploadImage"),r=t.config.get("image.upload.types"),s=xA(r);return o.set({acceptedType:r.map((t=>`image/${t}`)).join(","),allowMultipleFiles:!0}),o.buttonView.set({label:e("Insert image"),icon:bu.image,tooltip:!0}),o.buttonView.bind("isEnabled").to(i),o.on("done",((e,n)=>{const o=Array.from(n).filter((t=>s.test(t.type)));o.length&&(t.execute("uploadImage",{file:o}),t.editing.view.focus())})),o};t.ui.componentFactory.add("uploadImage",n),t.ui.componentFactory.add("imageUpload",n)}}var SA=n(3689),MA={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(SA.Z,MA);SA.Z.locals;var TA=n(4036),BA={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(TA.Z,BA);TA.Z.locals;var NA=n(3773),PA={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(NA.Z,PA);NA.Z.locals;class zA extends Ni{constructor(t){super(t),this.uploadStatusChange=(t,e,n)=>{const o=this.editor,i=e.item,r=i.getAttribute("uploadId");if(!n.consumable.consume(e.item,t.name))return;const s=o.plugins.get("ImageUtils"),a=o.plugins.get(xb),c=r?e.attributeNewValue:null,l=this.placeholder,d=o.editing.mapper.toViewElement(i),h=n.writer;if("reading"==c)return OA(d,h),void LA(s,l,d,h);if("uploading"==c){const t=a.loaders.get(r);return OA(d,h),void(t?(jA(d,h),function(t,e,n,o){const i=function(t){const e=t.createUIElement("div",{class:"ck-progress-bar"});return t.setCustomProperty("progressBar",!0,e),e}(e);e.insert(e.createPositionAt(t,"end"),i),n.on("change:uploadedPercent",((t,e,n)=>{o.change((t=>{t.setStyle("width",n+"%",i)}))}))}(d,h,t,o.editing.view),function(t,e,n,o){if(o.data){const i=t.findViewImgElement(e);n.setAttribute("src",o.data,i)}}(s,d,h,t)):LA(s,l,d,h))}"complete"==c&&a.loaders.get(r)&&function(t,e,n){const o=e.createUIElement("div",{class:"ck-image-upload-complete-icon"});e.insert(e.createPositionAt(t,"end"),o),setTimeout((()=>{n.change((t=>t.remove(t.createRangeOn(o))))}),3e3)}(d,h,o.editing.view),function(t,e){FA(t,e,"progressBar")}(d,h),jA(d,h),function(t,e){e.removeClass("ck-appear",t)}(d,h)},this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}static get pluginName(){return"ImageUploadProgress"}init(){const t=this.editor;t.plugins.has("ImageBlockEditing")&&t.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",this.uploadStatusChange),t.plugins.has("ImageInlineEditing")&&t.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",this.uploadStatusChange)}}function OA(t,e){t.hasClass("ck-appear")||e.addClass("ck-appear",t)}function LA(t,e,n,o){n.hasClass("ck-image-upload-placeholder")||o.addClass("ck-image-upload-placeholder",n);const i=t.findViewImgElement(n);i.getAttribute("src")!==e&&o.setAttribute("src",e,i),RA(n,"placeholder")||o.insert(o.createPositionAfter(i),function(t){const e=t.createUIElement("div",{class:"ck-upload-placeholder-loader"});return t.setCustomProperty("placeholder",!0,e),e}(o))}function jA(t,e){t.hasClass("ck-image-upload-placeholder")&&e.removeClass("ck-image-upload-placeholder",t),FA(t,e,"placeholder")}function RA(t,e){for(const n of t.getChildren())if(n.getCustomProperty(e))return n}function FA(t,e,n){const o=RA(t,n);o&&e.remove(e.createRangeOn(o))}var VA=Object.defineProperty,UA=Object.defineProperties,HA=Object.getOwnPropertyDescriptors,GA=Object.getOwnPropertySymbols,qA=Object.prototype.hasOwnProperty,WA=Object.prototype.propertyIsEnumerable,KA=(t,e,n)=>e in t?VA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;class YA extends zi{refresh(){const t=this.editor,e=t.plugins.get("ImageUtils"),n=t.model.document.selection.getSelectedElement();this.isEnabled=e.isImageAllowed()||e.isImage(n)}execute(t){const e=bi(t.file),n=this.editor.model.document.selection,o=this.editor.plugins.get("ImageUtils"),i=Object.fromEntries(n.getAttributes());e.forEach(((t,e)=>{const r=n.getSelectedElement();if(e&&r&&o.isImage(r)){const e=this.editor.model.createPositionAfter(r);this._uploadImage(t,i,e)}else this._uploadImage(t,i)}))}_uploadImage(t,e,n){const o=this.editor,i=o.plugins.get(xb).createLoader(t),r=o.plugins.get("ImageUtils");var s,a;i&&r.insertImage((s=((t,e)=>{for(var n in e||(e={}))qA.call(e,n)&&KA(t,n,e[n]);if(GA)for(var n of GA(e))WA.call(e,n)&&KA(t,n,e[n]);return t})({},e),a={uploadId:i.id},UA(s,HA(a))),n)}}class $A extends Ni{constructor(t){super(t),t.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}static get requires(){return[xb,Tm,_f,Uw]}static get pluginName(){return"ImageUploadEditing"}init(){const t=this.editor,e=t.model.document,n=t.conversion,o=t.plugins.get(xb),i=t.plugins.get("ImageUtils"),r=t.plugins.get("ClipboardPipeline"),s=xA(t.config.get("image.upload.types")),a=new YA(t);t.commands.add("uploadImage",a),t.commands.add("imageUpload",a),n.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(t.editing.view.document,"clipboardInput",((e,n)=>{if(o=n.dataTransfer,Array.from(o.types).includes("text/html")&&""!==o.getData("text/html"))return;var o;const i=Array.from(n.dataTransfer.files).filter((t=>!!t&&s.test(t.type)));i.length&&(e.stop(),t.model.change((e=>{n.targetRanges&&e.setSelection(n.targetRanges.map((e=>t.editing.mapper.toModelRange(e)))),t.model.enqueueChange((()=>{t.execute("uploadImage",{file:i})}))})))})),this.listenTo(r,"inputTransformation",((e,n)=>{const r=Array.from(t.editing.view.createRangeIn(n.content)).map((t=>t.item)).filter((t=>function(t,e){return!(!t.isInlineImageView(e)||!e.getAttribute("src")||!e.getAttribute("src").match(/^data:image\/\w+;base64,/g)&&!e.getAttribute("src").match(/^blob:/g))}(i,t)&&!t.getAttribute("uploadProcessed"))).map((t=>({promise:EA(t),imageElement:t})));if(!r.length)return;const s=new uu(t.editing.view.document);for(const t of r){s.setAttribute("uploadProcessed",!0,t.imageElement);const e=o.createLoader(t.promise);e&&(s.setAttribute("src","",t.imageElement),s.setAttribute("uploadId",e.id,t.imageElement))}})),t.editing.view.document.on("dragover",((t,e)=>{e.preventDefault()})),e.on("change",(()=>{const n=e.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),i=new Set;for(const e of n)if("insert"==e.type&&"$text"!=e.name){const n=e.position.nodeAfter,r="$graveyard"==e.position.root.rootName;for(const e of ZA(t,n)){const t=e.getAttribute("uploadId");if(!t)continue;const n=o.loaders.get(t);n&&(r?i.has(t)||n.abort():(i.add(t),this._uploadImageElements.set(t,e),"idle"==n.status&&this._readAndUpload(n)))}}})),this.on("uploadComplete",((t,{imageElement:e,data:n})=>{const o=n.urls?n.urls:n;this.editor.model.change((t=>{t.setAttribute("src",o.default,e),this._parseAndSetSrcsetAttributeOnImage(o,e,t)}))}),{priority:"low"})}afterInit(){const t=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&t.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this.editor.plugins.has("ImageInlineEditing")&&t.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]})}_readAndUpload(t){const e=this.editor,n=e.model,o=e.locale.t,r=e.plugins.get(xb),s=e.plugins.get(Tm),a=e.plugins.get("ImageUtils"),c=this._uploadImageElements;return n.enqueueChange({isUndoable:!1},(e=>{e.setAttribute("uploadStatus","reading",c.get(t.id))})),t.read().then((()=>{const o=t.upload(),r=c.get(t.id);if(i.isSafari){const t=e.editing.mapper.toViewElement(r),n=a.findViewImgElement(t);e.editing.view.once("render",(()=>{if(!n.parent)return;const t=e.editing.view.domConverter.mapViewToDom(n.parent);if(!t)return;const o=t.style.display;t.style.display="none",t._ckHack=t.offsetHeight,t.style.display=o}))}return n.enqueueChange({isUndoable:!1},(t=>{t.setAttribute("uploadStatus","uploading",r)})),o})).then((e=>{n.enqueueChange({isUndoable:!1},(n=>{const o=c.get(t.id);n.setAttribute("uploadStatus","complete",o),this.fire("uploadComplete",{data:e,imageElement:o})})),l()})).catch((e=>{if("error"!==t.status&&"aborted"!==t.status)throw e;"error"==t.status&&e&&s.showWarning(e,{title:o("Upload failed"),namespace:"upload"}),n.enqueueChange({isUndoable:!1},(e=>{e.remove(c.get(t.id))})),l()}));function l(){n.enqueueChange({isUndoable:!1},(e=>{const n=c.get(t.id);e.removeAttribute("uploadId",n),e.removeAttribute("uploadStatus",n),c.delete(t.id)})),r.destroyLoader(t)}}_parseAndSetSrcsetAttributeOnImage(t,e,n){let o=0;const i=Object.keys(t).filter((t=>{const e=parseInt(t,10);if(!isNaN(e))return o=Math.max(o,e),!0})).map((e=>`${t[e]} ${e}w`)).join(", ");""!=i&&n.setAttribute("srcset",{data:i,width:o},e)}}function ZA(t,e){const n=t.plugins.get("ImageUtils");return Array.from(t.model.createRangeOn(e)).filter((t=>n.isImage(t.item))).map((t=>t.item))}var QA=n(1568),JA={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(QA.Z,JA);QA.Z.locals;var XA=n(3535),tC={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(XA.Z,tC);XA.Z.locals;var eC=n(6270),nC={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(eC.Z,nC);eC.Z.locals;class oC extends zi{constructor(t,e){super(t),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(e.map((t=>{if(t.isDefault)for(const e of t.modelElements)this._defaultStyles[e]=t.name;return[t.name,t]})))}refresh(){const t=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!t,this.isEnabled?t.hasAttribute("imageStyle")?this.value=t.getAttribute("imageStyle"):this.value=this._defaultStyles[t.name]:this.value=!1}execute(t={}){const e=this.editor,n=e.model,o=e.plugins.get("ImageUtils");n.change((e=>{const i=t.value;let r=o.getClosestSelectedImageElement(n.document.selection);i&&this.shouldConvertImageType(i,r)&&(this.editor.execute(o.isBlockImage(r)?"imageTypeInline":"imageTypeBlock"),r=o.getClosestSelectedImageElement(n.document.selection)),!i||this._styles.get(i).isDefault?e.removeAttribute("imageStyle",r):e.setAttribute("imageStyle",i,r)}))}shouldConvertImageType(t,e){return!this._styles.get(t).modelElements.includes(e.name)}}var iC=Object.defineProperty,rC=Object.getOwnPropertySymbols,sC=Object.prototype.hasOwnProperty,aC=Object.prototype.propertyIsEnumerable,cC=(t,e,n)=>e in t?iC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lC=(t,e)=>{for(var n in e||(e={}))sC.call(e,n)&&cC(t,n,e[n]);if(rC)for(var n of rC(e))aC.call(e,n)&&cC(t,n,e[n]);return t};const{objectFullWidth:dC,objectInline:hC,objectLeft:uC,objectRight:gC,objectCenter:pC,objectBlockLeft:mC,objectBlockRight:fC}=bu,kC={get inline(){return{name:"inline",title:"In line",icon:hC,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:uC,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:mC,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:pC,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:gC,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:fC,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:pC,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:gC,modelElements:["imageBlock"],className:"image-style-side"}}},bC={full:dC,left:mC,right:fC,center:pC,inlineLeft:uC,inlineRight:gC,inline:hC},wC=[{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 AC(t){b("image-style-configuration-definition-invalid",t)}const CC={normalizeStyles:function(t){return(t.configuredStyles.options||[]).map((t=>function(t){t="string"==typeof t?kC[t]?lC({},kC[t]):{name:t}:function(t,e){const n=lC({},e);for(const o in t)Object.prototype.hasOwnProperty.call(e,o)||(n[o]=t[o]);return n}(kC[t.name],t);"string"==typeof t.icon&&(t.icon=bC[t.icon]||t.icon);return t}(t))).filter((e=>function(t,{isBlockPluginLoaded:e,isInlinePluginLoaded:n}){const{modelElements:o,name:i}=t;if(!(o&&o.length&&i))return AC({style:t}),!1;{const i=[e?"imageBlock":null,n?"imageInline":null];if(!o.some((t=>i.includes(t))))return b("image-style-missing-dependency",{style:t,missingPlugins:o.map((t=>"imageBlock"===t?"ImageBlockEditing":"ImageInlineEditing"))}),!1}return!0}(e,t)))},getDefaultStylesConfiguration:function(t,e){return t&&e?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:t?{options:["block","side"]}:e?{options:["inline","alignLeft","alignRight"]}:{}},getDefaultDropdownDefinitions:function(t){return t.has("ImageBlockEditing")&&t.has("ImageInlineEditing")?[...wC]:[]},warnInvalidStyle:AC,DEFAULT_OPTIONS:kC,DEFAULT_ICONS:bC,DEFAULT_DROPDOWN_DEFINITIONS:wC};function _C(t,e){for(const n of e)if(n.name===t)return n}class vC extends Ni{static get pluginName(){return"ImageStyleEditing"}static get requires(){return[Uw]}init(){const{normalizeStyles:t,getDefaultStylesConfiguration:e}=CC,n=this.editor,o=n.plugins.has("ImageBlockEditing"),i=n.plugins.has("ImageInlineEditing");n.config.define("image.styles",e(o,i)),this.normalizedStyles=t({configuredStyles:n.config.get("image.styles"),isBlockPluginLoaded:o,isInlinePluginLoaded:i}),this._setupConversion(o,i),this._setupPostFixer(),n.commands.add("imageStyle",new oC(n,this.normalizedStyles))}_setupConversion(t,e){const n=this.editor,o=n.model.schema,i=(r=this.normalizedStyles,(t,e,n)=>{if(!n.consumable.consume(e.item,t.name))return;const o=_C(e.attributeNewValue,r),i=_C(e.attributeOldValue,r),s=n.mapper.toViewElement(e.item),a=n.writer;i&&a.removeClass(i.className,s),o&&a.addClass(o.className,s)});var r;const s=function(t){const e={imageInline:t.filter((t=>!t.isDefault&&t.modelElements.includes("imageInline"))),imageBlock:t.filter((t=>!t.isDefault&&t.modelElements.includes("imageBlock")))};return(t,n,o)=>{if(!n.modelRange)return;const i=n.viewItem,r=yi(n.modelRange.getItems());if(r&&o.schema.checkAttribute(r,"imageStyle"))for(const t of e[r.name])o.consumable.consume(i,{classes:t.className})&&o.writer.setAttribute("imageStyle",t.name,r)}}(this.normalizedStyles);n.editing.downcastDispatcher.on("attribute:imageStyle",i),n.data.downcastDispatcher.on("attribute:imageStyle",i),t&&(o.extend("imageBlock",{allowAttributes:"imageStyle"}),n.data.upcastDispatcher.on("element:figure",s,{priority:"low"})),e&&(o.extend("imageInline",{allowAttributes:"imageStyle"}),n.data.upcastDispatcher.on("element:img",s,{priority:"low"}))}_setupPostFixer(){const t=this.editor,e=t.model.document,n=t.plugins.get(Uw),o=new Map(this.normalizedStyles.map((t=>[t.name,t])));e.registerPostFixer((t=>{let i=!1;for(const r of e.differ.getChanges())if("insert"==r.type||"attribute"==r.type&&"imageStyle"==r.attributeKey){let e="insert"==r.type?r.position.nodeAfter:r.range.start.nodeAfter;if(e&&e.is("element","paragraph")&&e.childCount>0&&(e=e.getChild(0)),!n.isImage(e))continue;const s=e.getAttribute("imageStyle");if(!s)continue;const a=o.get(s);a&&a.modelElements.includes(e.name)||(t.removeAttribute("imageStyle",e),i=!0)}return i}))}}var yC=n(5083),xC={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(yC.Z,xC);yC.Z.locals;class EC extends Ni{static get requires(){return[vC]}static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const t=this.editor.t;return{"Wrap text":t("Wrap text"),"Break text":t("Break text"),"In line":t("In line"),"Full size image":t("Full size image"),"Side image":t("Side image"),"Left aligned image":t("Left aligned image"),"Centered image":t("Centered image"),"Right aligned image":t("Right aligned image")}}init(){const t=this.editor.plugins,e=this.editor.config.get("image.toolbar")||[],n=DC(t.get("ImageStyleEditing").normalizedStyles,this.localizedDefaultStylesTitles);for(const t of n)this._createButton(t);const o=DC([...e.filter(L),...CC.getDefaultDropdownDefinitions(t)],this.localizedDefaultStylesTitles);for(const t of o)this._createDropdown(t,n)}_createDropdown(t,e){const n=this.editor.ui.componentFactory;n.add(t.name,(o=>{let i;const{defaultItem:r,items:s,title:a}=t,c=s.filter((t=>e.find((({name:e})=>IC(e)===t)))).map((t=>{const e=n.create(t);return t===r&&(i=e),e}));s.length!==c.length&&CC.warnInvalidStyle({dropdown:t});const l=Yg(o,Hg),d=l.buttonView,h=d.arrowView;return $g(l,c,{enableActiveItemFocusOnDropdownOpen:!0}),d.set({label:SC(a,i.label),class:null,tooltip:!0}),h.unbind("label"),h.set({label:a}),d.bind("icon").toMany(c,"isOn",((...t)=>{const e=t.findIndex(Rr);return e<0?i.icon:c[e].icon})),d.bind("label").toMany(c,"isOn",((...t)=>{const e=t.findIndex(Rr);return SC(a,e<0?i.label:c[e].label)})),d.bind("isOn").toMany(c,"isOn",((...t)=>t.some(Rr))),d.bind("class").toMany(c,"isOn",((...t)=>t.some(Rr)?"ck-splitbutton_flatten":void 0)),d.on("execute",(()=>{c.some((({isOn:t})=>t))?l.isOpen=!l.isOpen:i.fire("execute")})),l.bind("isEnabled").toMany(c,"isEnabled",((...t)=>t.some(Rr))),this.listenTo(l,"execute",(()=>{this.editor.editing.view.focus()})),l}))}_createButton(t){const e=t.name;this.editor.ui.componentFactory.add(IC(e),(n=>{const o=this.editor.commands.get("imageStyle"),i=new tg(n);return i.set({label:t.title,icon:t.icon,tooltip:!0,isToggleable:!0}),i.bind("isEnabled").to(o,"isEnabled"),i.bind("isOn").to(o,"value",(t=>t===e)),i.on("execute",this._executeCommand.bind(this,e)),i}))}_executeCommand(t){this.editor.execute("imageStyle",{value:t}),this.editor.editing.view.focus()}}function DC(t,e){for(const n of t)e[n.title]&&(n.title=e[n.title]);return t}function IC(t){return`imageStyle:${t}`}function SC(t,e){return(t?t+": ":"")+e}class MC extends Ni{static get pluginName(){return"IndentEditing"}init(){const t=this.editor;t.commands.add("indent",new Li(t)),t.commands.add("outdent",new Li(t))}}const TC='',BC='';class NC extends Ni{static get pluginName(){return"IndentUI"}init(){const t=this.editor,e=t.locale,n=t.t,o="ltr"==e.uiLanguageDirection?TC:BC,i="ltr"==e.uiLanguageDirection?BC:TC;this._defineButton("indent",n("Increase indent"),o),this._defineButton("outdent",n("Decrease indent"),i)}_defineButton(t,e,n){const o=this.editor;o.ui.componentFactory.add(t,(i=>{const r=o.commands.get(t),s=new tg(i);return s.set({label:e,icon:n,tooltip:!0}),s.bind("isEnabled").to(r,"isEnabled"),this.listenTo(s,"execute",(()=>{o.execute(t),o.editing.view.focus()})),s}))}}class PC{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(t){Array.isArray(t)?t.forEach((t=>this._definitions.add(t))):this._definitions.add(t)}getDispatcher(){return t=>{t.on("attribute:linkHref",((t,e,n)=>{if(!n.consumable.test(e.item,"attribute:linkHref"))return;if(!e.item.is("selection")&&!n.schema.isInline(e.item))return;const o=n.writer,i=o.document.selection;for(const t of this._definitions){const r=o.createAttributeElement("a",t.attributes,{priority:5});t.classes&&o.addClass(t.classes,r);for(const e in t.styles)o.setStyle(e,t.styles[e],r);o.setCustomProperty("link",!0,r),t.callback(e.attributeNewValue)?e.item.is("selection")?o.wrap(i.getFirstRange(),r):o.wrap(n.mapper.toViewRange(e.range),r):o.unwrap(n.mapper.toViewRange(e.range),r)}}),{priority:"high"})}}getDispatcherForLinkedImage(){return t=>{t.on("attribute:linkHref:imageBlock",((t,e,{writer:n,mapper:o})=>{const i=o.toViewElement(e.item),r=Array.from(i.getChildren()).find((t=>t.is("element","a")));for(const t of this._definitions){const o=Di(t.attributes);if(t.callback(e.attributeNewValue)){for(const[t,e]of o)"class"===t?n.addClass(e,r):n.setAttribute(t,e,r);t.classes&&n.addClass(t.classes,r);for(const e in t.styles)n.setStyle(e,t.styles[e],r)}else{for(const[t,e]of o)"class"===t?n.removeClass(e,r):n.removeAttribute(t,r);t.classes&&n.removeClass(t.classes,r);for(const e in t.styles)n.removeStyle(e,r)}}}))}}}const zC=function(t,e,n){var o=t.length;return n=void 0===n?o:n,!e&&n>=o?t:Dr(t,e,n)};var OC=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const LC=function(t){return OC.test(t)};const jC=function(t){return t.split("")};var RC="\\ud800-\\udfff",FC="["+RC+"]",VC="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",UC="\\ud83c[\\udffb-\\udfff]",HC="[^"+RC+"]",GC="(?:\\ud83c[\\udde6-\\uddff]){2}",qC="[\\ud800-\\udbff][\\udc00-\\udfff]",WC="(?:"+VC+"|"+UC+")"+"?",KC="[\\ufe0e\\ufe0f]?",YC=KC+WC+("(?:\\u200d(?:"+[HC,GC,qC].join("|")+")"+KC+WC+")*"),$C="(?:"+[HC+VC+"?",VC,GC,qC,FC].join("|")+")",ZC=RegExp(UC+"(?="+UC+")|"+$C+YC,"g");const QC=function(t){return t.match(ZC)||[]};const JC=function(t){return LC(t)?QC(t):jC(t)};const XC=function(t){return function(e){e=_r(e);var n=LC(e)?JC(e):void 0,o=n?n[0]:e.charAt(0),i=n?zC(n,1).join(""):e.slice(1);return o[t]()+i}}("toUpperCase"),t_=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,e_=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,n_=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,o_=/^((\w+:(\/{2,})?)|(\W))/i,i_="Ctrl+K";function r_(t,{writer:e}){const n=e.createAttributeElement("a",{href:t},{priority:5});return e.setCustomProperty("link",!0,n),n}function s_(t){const e=String(t);return function(t){const e=t.replace(t_,"");return!!e.match(e_)}(e)?e:"#"}function a_(t,e){return!!t&&e.checkAttribute(t.name,"linkHref")}function c_(t,e){const n=(o=t,n_.test(o)?"mailto:":e);var o;const i=!!n&&!l_(t);return t&&i?n+t:t}function l_(t){return o_.test(t)}function d_(t){window.open(t,"_blank","noopener")}class h_ extends zi{constructor(){super(...arguments),this.manualDecorators=new vi,this.automaticDecorators=new PC}restoreManualDecoratorStates(){for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id)}refresh(){const t=this.editor.model,e=t.document.selection,n=e.getSelectedElement()||yi(e.getSelectedBlocks());a_(n,t.schema)?(this.value=n.getAttribute("linkHref"),this.isEnabled=t.schema.checkAttribute(n,"linkHref")):(this.value=e.getAttribute("linkHref"),this.isEnabled=t.schema.checkAttributeInSelection(e,"linkHref"));for(const t of this.manualDecorators)t.value=this._getDecoratorStateFromModel(t.id)}execute(t,e={}){const n=this.editor.model,o=n.document.selection,i=[],r=[];for(const t in e)e[t]?i.push(t):r.push(t);n.change((e=>{if(o.isCollapsed){const s=o.getFirstPosition();if(o.hasAttribute("linkHref")){const a=u_(o);let c=ek(s,"linkHref",o.getAttribute("linkHref"),n);o.getAttribute("linkHref")===a&&(c=this._updateLinkContent(n,e,c,t)),e.setAttribute("linkHref",t,c),i.forEach((t=>{e.setAttribute(t,!0,c)})),r.forEach((t=>{e.removeAttribute(t,c)})),e.setSelection(e.createPositionAfter(c.end.nodeBefore))}else if(""!==t){const r=Di(o.getAttributes());r.set("linkHref",t),i.forEach((t=>{r.set(t,!0)}));const{end:a}=n.insertContent(e.createText(t,r),s);e.setSelection(a)}["linkHref",...i,...r].forEach((t=>{e.removeSelectionAttribute(t)}))}else{const s=n.schema.getValidRanges(o.getRanges(),"linkHref"),a=[];for(const t of o.getSelectedBlocks())n.schema.checkAttribute(t,"linkHref")&&a.push(e.createRangeOn(t));const c=a.slice();for(const t of s)this._isRangeToUpdate(t,a)&&c.push(t);for(const s of c){let a=s;if(1===c.length){const i=u_(o);o.getAttribute("linkHref")===i&&(a=this._updateLinkContent(n,e,s,t),e.setSelection(e.createSelection(a)))}e.setAttribute("linkHref",t,a),i.forEach((t=>{e.setAttribute(t,!0,a)})),r.forEach((t=>{e.removeAttribute(t,a)}))}}}))}_getDecoratorStateFromModel(t){const e=this.editor.model,n=e.document.selection,o=n.getSelectedElement();return a_(o,e.schema)?o.getAttribute(t):n.getAttribute(t)}_isRangeToUpdate(t,e){for(const n of e)if(n.containsRange(t))return!1;return!0}_updateLinkContent(t,e,n,o){const i=e.createText(o,{linkHref:o});return t.insertContent(i,n)}}function u_(t){if(t.isCollapsed){const e=t.getFirstPosition();return e.textNode&&e.textNode.data}{const e=Array.from(t.getFirstRange().getItems());if(e.length>1)return null;const n=e[0];return n.is("$text")||n.is("$textProxy")?n.data:null}}class g_ extends zi{refresh(){const t=this.editor.model,e=t.document.selection,n=e.getSelectedElement();a_(n,t.schema)?this.isEnabled=t.schema.checkAttribute(n,"linkHref"):this.isEnabled=t.schema.checkAttributeInSelection(e,"linkHref")}execute(){const t=this.editor,e=this.editor.model,n=e.document.selection,o=t.commands.get("link");e.change((t=>{const i=n.isCollapsed?[ek(n.getFirstPosition(),"linkHref",n.getAttribute("linkHref"),e)]:e.schema.getValidRanges(n.getRanges(),"linkHref");for(const e of i)if(t.removeAttribute("linkHref",e),o)for(const n of o.manualDecorators)t.removeAttribute(n.id,e)}))}}class p_ extends(G()){constructor({id:t,label:e,attributes:n,classes:o,styles:i,defaultValue:r}){super(),this.id=t,this.set("value",void 0),this.defaultValue=r,this.label=e,this.attributes=n,this.classes=o,this.styles=i}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}var m_=n(9773),f_={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(m_.Z,f_);m_.Z.locals;var k_=Object.defineProperty,b_=Object.getOwnPropertySymbols,w_=Object.prototype.hasOwnProperty,A_=Object.prototype.propertyIsEnumerable,C_=(t,e,n)=>e in t?k_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,__=(t,e)=>{for(var n in e||(e={}))w_.call(e,n)&&C_(t,n,e[n]);if(b_)for(var n of b_(e))A_.call(e,n)&&C_(t,n,e[n]);return t};const v_="automatic",y_=/^(https?:)?\/\//;class x_ extends Ni{static get pluginName(){return"LinkEditing"}static get requires(){return[Ff,Df,_f]}constructor(t){super(t),t.config.define("link",{addTargetToExternalLinks:!1})}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:"linkHref"}),t.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:r_}),t.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(t,e)=>r_(s_(t),e)}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:t=>t.getAttribute("href")}}),t.commands.add("link",new h_(t)),t.commands.add("unlink",new g_(t));const e=function(t,e){const n={"Open in a new tab":t("Open in a new tab"),Downloadable:t("Downloadable")};return e.forEach((t=>("label"in t&&n[t.label]&&(t.label=n[t.label]),t))),e}(t.t,function(t){const e=[];if(t)for(const[n,o]of Object.entries(t)){const t=Object.assign({},o,{id:`link${XC(n)}`});e.push(t)}return e}(t.config.get("link.decorators")));this._enableAutomaticDecorators(e.filter((t=>t.mode===v_))),this._enableManualDecorators(e.filter((t=>"manual"===t.mode)));t.plugins.get(Ff).registerAttribute("linkHref"),function(t,e,n,o){const i=t.editing.view,r=new Set;i.document.registerPostFixer((i=>{const s=t.model.document.selection;let a=!1;if(s.hasAttribute(e)){const c=ek(s.getFirstPosition(),e,s.getAttribute(e),t.model),l=t.editing.mapper.toViewRange(c);for(const t of l.getItems())t.is("element",n)&&!t.hasClass(o)&&(i.addClass(o,t),r.add(t),a=!0)}return a})),t.conversion.for("editingDowncast").add((t=>{function e(){i.change((t=>{for(const e of r.values())t.removeClass(o,e),r.delete(e)}))}t.on("insert",e,{priority:"highest"}),t.on("remove",e,{priority:"highest"}),t.on("attribute",e,{priority:"highest"}),t.on("selection",e,{priority:"highest"})}))}(t,"linkHref","a","ck-link_selected"),this._enableLinkOpen(),this._enableInsertContentSelectionAttributesFixer(),this._enableClickingAfterLink(),this._enableTypingOverLink(),this._handleDeleteContentAfterLink(),this._enableClipboardIntegration()}_enableAutomaticDecorators(t){const e=this.editor,n=e.commands.get("link").automaticDecorators;e.config.get("link.addTargetToExternalLinks")&&n.add({id:"linkIsExternal",mode:v_,callback:t=>!!t&&y_.test(t),attributes:{target:"_blank",rel:"noopener noreferrer"}}),n.add(t),n.length&&e.conversion.for("downcast").add(n.getDispatcher())}_enableManualDecorators(t){if(!t.length)return;const e=this.editor,n=e.commands.get("link").manualDecorators;t.forEach((t=>{e.model.schema.extend("$text",{allowAttributes:t.id});const o=new p_(t);n.add(o),e.conversion.for("downcast").attributeToElement({model:o.id,view:(t,{writer:e,schema:n},{item:i})=>{if((i.is("selection")||n.isInline(i))&&t){const t=e.createAttributeElement("a",o.attributes,{priority:5});o.classes&&e.addClass(o.classes,t);for(const n in o.styles)e.setStyle(n,o.styles[n],t);return e.setCustomProperty("link",!0,t),t}}}),e.conversion.for("upcast").elementToAttribute({view:__({name:"a"},o._createPattern()),model:{key:o.id}})}))}_enableLinkOpen(){const t=this.editor,e=t.editing.view.document;this.listenTo(e,"click",((t,e)=>{if(!(i.isMac?e.domEvent.metaKey:e.domEvent.ctrlKey))return;let n=e.domTarget;if("a"!=n.tagName.toLowerCase()&&(n=n.closest("a")),!n)return;const o=n.getAttribute("href");o&&(t.stop(),e.preventDefault(),d_(o))}),{context:"$capture"}),this.listenTo(e,"keydown",((e,n)=>{const o=t.commands.get("link").value;!!o&&n.keyCode===ui.enter&&n.altKey&&(e.stop(),d_(o))}))}_enableInsertContentSelectionAttributesFixer(){const t=this.editor.model,e=t.document.selection;this.listenTo(t,"insertContent",(()=>{const n=e.anchor.nodeBefore,o=e.anchor.nodeAfter;e.hasAttribute("linkHref")&&n&&n.hasAttribute("linkHref")&&(o&&o.hasAttribute("linkHref")||t.change((e=>{E_(e,I_(t.schema))})))}),{priority:"low"})}_enableClickingAfterLink(){const t=this.editor,e=t.model;t.editing.view.addObserver(hu);let n=!1;this.listenTo(t.editing.view.document,"mousedown",(()=>{n=!0})),this.listenTo(t.editing.view.document,"selectionChange",(()=>{if(!n)return;n=!1;const t=e.document.selection;if(!t.isCollapsed)return;if(!t.hasAttribute("linkHref"))return;const o=t.getFirstPosition(),i=ek(o,"linkHref",t.getAttribute("linkHref"),e);(o.isTouching(i.start)||o.isTouching(i.end))&&e.change((t=>{E_(t,I_(e.schema))}))}))}_enableTypingOverLink(){const t=this.editor,e=t.editing.view;let n=null,o=!1;this.listenTo(e.document,"delete",(()=>{o=!0}),{priority:"high"}),this.listenTo(t.model,"deleteContent",(()=>{const e=t.model.document.selection;e.isCollapsed||(o?o=!1:D_(t)&&function(t){const e=t.document.selection,n=e.getFirstPosition(),o=e.getLastPosition(),i=n.nodeAfter;if(!i)return!1;if(!i.is("$text"))return!1;if(!i.hasAttribute("linkHref"))return!1;const r=o.textNode||o.nodeBefore;if(i===r)return!0;return ek(n,"linkHref",i.getAttribute("linkHref"),t).containsRange(t.createRange(n,o),!0)}(t.model)&&(n=e.getAttributes()))}),{priority:"high"}),this.listenTo(t.model,"insertContent",((e,[i])=>{o=!1,D_(t)&&n&&(t.model.change((t=>{for(const[e,o]of n)t.setAttribute(e,o,i)})),n=null)}),{priority:"high"})}_handleDeleteContentAfterLink(){const t=this.editor,e=t.model,n=e.document.selection,o=t.editing.view;let i=!1,r=!1;this.listenTo(o.document,"delete",((t,e)=>{r="backward"===e.direction}),{priority:"high"}),this.listenTo(e,"deleteContent",(()=>{i=!1;const t=n.getFirstPosition(),o=n.getAttribute("linkHref");if(!o)return;const r=ek(t,"linkHref",o,e);i=r.containsPosition(t)||r.end.isEqual(t)}),{priority:"high"}),this.listenTo(e,"deleteContent",(()=>{r&&(r=!1,i||t.model.enqueueChange((t=>{E_(t,I_(e.schema))})))}),{priority:"low"})}_enableClipboardIntegration(){const t=this.editor,e=t.model,n=this.editor.config.get("link.defaultProtocol");n&&this.listenTo(t.plugins.get("ClipboardPipeline"),"contentInsertion",((t,o)=>{e.change((t=>{const e=t.createRangeIn(o.content);for(const o of e.getItems())if(o.hasAttribute("linkHref")){const e=c_(o.getAttribute("linkHref"),n);t.setAttribute("linkHref",e,o)}}))}))}}function E_(t,e){t.removeSelectionAttribute("linkHref");for(const n of e)t.removeSelectionAttribute(n)}function D_(t){return t.model.change((t=>t.batch)).isTyping}function I_(t){return t.getDefinition("$text").allowAttributes.filter((t=>t.startsWith("link")))}var S_=n(7754),M_={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(S_.Z,M_);S_.Z.locals;class T_ extends xu{constructor(t,e){super(t),this.focusTracker=new xi,this.keystrokes=new Ei,this._focusables=new _u;const n=t.t;this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),bu.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("Cancel"),bu.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(e),this.children=this._createFormChildren(e.manualDecorators),this._focusCycler=new vg({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const o=["ck","ck-link-form","ck-responsive-form"];e.manualDecorators.length&&o.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:o,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce(((t,e)=>(t[e.name]=e.isOn,t)),{})}render(){super.render(),Cu({view:this});[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const t=this.locale.t,e=new hg(this.locale,tp);return e.label=t("Link URL"),e}_createButton(t,e,n,o){const i=new tg(this.locale);return i.set({label:t,icon:e,tooltip:!0}),i.extendTemplate({attributes:{class:n}}),o&&i.delegate("execute").to(this,o),i}_createManualDecoratorSwitches(t){const e=this.createCollection();for(const n of t.manualDecorators){const o=new og(this.locale);o.set({name:n.id,label:n.label,withText:!0}),o.bind("isOn").toMany([n,t],"value",((t,e)=>void 0===e&&void 0===t?!!n.defaultValue:!!t)),o.on("execute",(()=>{n.set("value",!o.isOn)})),e.add(o)}return e}_createFormChildren(t){const e=this.createCollection();if(e.add(this.urlInputView),t.length){const t=new xu;t.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map((t=>({tag:"li",children:[t],attributes:{class:["ck","ck-list__item"]}}))),attributes:{class:["ck","ck-reset","ck-list"]}}),e.add(t)}return e.add(this.saveButtonView),e.add(this.cancelButtonView),e}}var B_=n(2347),N_={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(B_.Z,N_);B_.Z.locals;class P_ extends xu{constructor(t){super(t),this.focusTracker=new xi,this.keystrokes=new Ei,this._focusables=new _u;const e=t.t;this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(e("Unlink"),'',"unlink"),this.editButtonView=this._createButton(e("Edit link"),bu.pencil,"edit"),this.set("href",void 0),this._focusCycler=new vg({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((t=>{this._focusables.add(t),this.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createButton(t,e,n){const o=new tg(this.locale);return o.set({label:t,icon:e,tooltip:!0}),o.delegate("execute").to(this,n),o}_createPreviewButton(){const t=new tg(this.locale),e=this.bindTemplate,n=this.t;return t.set({withText:!0,tooltip:n("Open link in new tab")}),t.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:e.to("href",(t=>t&&s_(t))),target:"_blank",rel:"noopener noreferrer"}}),t.bind("label").to(this,"href",(t=>t||n("This link has no URL"))),t.bind("isEnabled").to(this,"href",(t=>!!t)),t.template.tag="a",t.template.eventListeners={},t}}const z_="link-ui";class O_ extends Ni{constructor(){super(...arguments),this.actionsView=null,this.formView=null}static get requires(){return[jm]}static get pluginName(){return"LinkUI"}init(){const t=this.editor;t.editing.view.addObserver(du),this._balloon=t.plugins.get(jm),this._createToolbarLinkButton(),this._enableBalloonActivators(),t.conversion.for("editingDowncast").markerToHighlight({model:z_,view:{classes:["ck-fake-link-selection"]}}),t.conversion.for("editingDowncast").markerToElement({model:z_,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}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 t=this.editor,e=new P_(t.locale),n=t.commands.get("link"),o=t.commands.get("unlink");return e.bind("href").to(n,"value"),e.editButtonView.bind("isEnabled").to(n),e.unlinkButtonView.bind("isEnabled").to(o),this.listenTo(e,"edit",(()=>{this._addFormView()})),this.listenTo(e,"unlink",(()=>{t.execute("unlink"),this._hideUI()})),e.keystrokes.set("Esc",((t,e)=>{this._hideUI(),e()})),e.keystrokes.set(i_,((t,e)=>{this._addFormView(),e()})),e}_createFormView(){const t=this.editor,e=t.commands.get("link"),n=t.config.get("link.defaultProtocol"),o=new(Au(T_))(t.locale,e);return o.urlInputView.fieldView.bind("value").to(e,"value"),o.urlInputView.bind("isEnabled").to(e,"isEnabled"),o.saveButtonView.bind("isEnabled").to(e),this.listenTo(o,"submit",(()=>{const{value:e}=o.urlInputView.fieldView.element,i=c_(e,n);t.execute("link",i,o.getDecoratorSwitchesState()),this._closeFormView()})),this.listenTo(o,"cancel",(()=>{this._closeFormView()})),o.keystrokes.set("Esc",((t,e)=>{this._closeFormView(),e()})),o}_createToolbarLinkButton(){const t=this.editor,e=t.commands.get("link"),n=t.t;t.ui.componentFactory.add("link",(t=>{const o=new tg(t);return o.isEnabled=!0,o.label=n("Link"),o.icon='',o.keystroke=i_,o.tooltip=!0,o.isToggleable=!0,o.bind("isEnabled").to(e,"isEnabled"),o.bind("isOn").to(e,"value",(t=>!!t)),this.listenTo(o,"execute",(()=>this._showUI(!0))),o}))}_enableBalloonActivators(){const t=this.editor,e=t.editing.view.document;this.listenTo(e,"click",(()=>{this._getSelectedLinkElement()&&this._showUI()})),t.keystrokes.set(i_,((e,n)=>{n(),t.commands.get("link").isEnabled&&this._showUI(!0)}))}_enableUserBalloonInteractions(){this.editor.keystrokes.set("Tab",((t,e)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),e())}),{priority:"high"}),this.editor.keystrokes.set("Esc",((t,e)=>{this._isUIVisible&&(this._hideUI(),e())})),wu({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 t=this.editor.commands.get("link");this.formView.disableCssTransitions(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions(),this.formView.urlInputView.fieldView.element.value=t.value||""}_closeFormView(){const t=this.editor.commands.get("link");t.restoreManualDecoratorStates(),void 0!==t.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(t=!1){this.formView||this._createViews(),this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),t&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),t&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const t=this.editor;this.stopListening(t.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),t.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const t=this.editor,e=t.editing.view.document;let n=this._getSelectedLinkElement(),o=r();const i=()=>{const t=this._getSelectedLinkElement(),e=r();n&&!t||!n&&e!==o?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),n=t,o=e};function r(){return e.selection.focus.getAncestors().reverse().find((t=>t.is("element")))}this.listenTo(t.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 t=this._balloon.visibleView;return!!this.formView&&t==this.formView||this._areActionsVisible}_getBalloonPositionData(){const t=this.editor.editing.view,e=this.editor.model,n=t.document;let o;if(e.markers.has(z_)){const e=Array.from(this.editor.editing.mapper.markerNameToElements(z_)),n=t.createRange(t.createPositionBefore(e[0]),t.createPositionAfter(e[e.length-1]));o=t.domConverter.viewRangeToDom(n)}else o=()=>{const e=this._getSelectedLinkElement();return e?t.domConverter.mapViewToDom(e):t.domConverter.viewRangeToDom(n.selection.getFirstRange())};return{target:o}}_getSelectedLinkElement(){const t=this.editor.editing.view,e=t.document.selection,n=e.getSelectedElement();if(e.isCollapsed||n&&Ak(n))return L_(e.getFirstPosition());{const n=e.getFirstRange().getTrimmed(),o=L_(n.start),i=L_(n.end);return o&&o==i&&t.createRangeIn(o).getTrimmed().isEqual(n)?o:null}}_showFakeVisualSelection(){const t=this.editor.model;t.change((e=>{const n=t.document.selection.getFirstRange();if(t.markers.has(z_))e.updateMarker(z_,{range:n});else if(n.start.isAtEnd){const o=n.start.getLastMatchingPosition((({item:e})=>!t.schema.isContent(e)),{boundaries:n});e.addMarker(z_,{usingOperation:!1,affectsData:!1,range:e.createRange(o,n.end)})}else e.addMarker(z_,{usingOperation:!1,affectsData:!1,range:n})}))}_hideFakeVisualSelection(){const t=this.editor.model;t.markers.has(z_)&&t.change((t=>{t.removeMarker(z_)}))}}function L_(t){return t.getAncestors().find((t=>{return(e=t).is("attributeElement")&&!!e.getCustomProperty("link");var e}))||null}const j_=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 R_ extends Ni{static get requires(){return[Of]}static get pluginName(){return"AutoLink"}init(){const t=this.editor.model.document.selection;t.on("change:range",(()=>{this.isEnabled=!t.anchor.parent.is("element","codeBlock")})),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling()}_enableTypingHandling(){const t=this.editor,e=new Rf(t.model,(t=>{if(!function(t){return t.length>4&&" "===t[t.length-1]&&" "!==t[t.length-2]}(t))return;const e=F_(t.substr(0,t.length-1));return e?{url:e}:void 0}));e.on("matched:data",((e,n)=>{const{batch:o,range:i,url:r}=n;if(!o.isTyping)return;const s=i.end.getShiftedBy(-1),a=s.getShiftedBy(-r.length),c=t.model.createRange(a,s);this._applyAutoLink(r,c)})),e.bind("isEnabled").to(this)}_enableEnterHandling(){const t=this.editor,e=t.model,n=t.commands.get("enter");n&&n.on("execute",(()=>{const t=e.document.selection.getFirstPosition();if(!t.parent.previousSibling)return;const n=e.createRangeIn(t.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(n)}))}_enableShiftEnterHandling(){const t=this.editor,e=t.model,n=t.commands.get("shiftEnter");n&&n.on("execute",(()=>{const t=e.document.selection.getFirstPosition(),n=e.createRange(e.createPositionAt(t.parent,0),t.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(n)}))}_checkAndApplyAutoLinkOnRange(t){const e=this.editor.model,{text:n,range:o}=jf(t,e),i=F_(n);if(i){const t=e.createRange(o.end.getShiftedBy(-i.length),o.end);this._applyAutoLink(i,t)}}_applyAutoLink(t,e){const n=this.editor.model,o=c_(t,this.editor.config.get("link.defaultProtocol"));this.isEnabled&&function(t,e){return e.schema.checkAttributeInSelection(e.createSelection(t),"linkHref")}(e,n)&&l_(o)&&!function(t){const e=t.start.nodeAfter;return!!e&&e.hasAttribute("linkHref")}(e)&&this._persistAutoLink(o,e)}_persistAutoLink(t,e){const n=this.editor.model,o=this.editor.plugins.get("Delete");n.enqueueChange((i=>{i.setAttribute("linkHref",t,e),n.enqueueChange((()=>{o.requestUndoOnBackspace()}))}))}}function F_(t){const e=j_.exec(t);return e?e[2]:null}var V_=n(111),U_={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(V_.Z,U_);V_.Z.locals;Symbol.iterator;Symbol.iterator;Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var H_=n(5730),G_={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(H_.Z,G_);H_.Z.locals;var q_=n(4564),W_={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(q_.Z,W_);q_.Z.locals;function K_(t,e){const n=e.mapper,o=e.writer,i="numbered"==t.getAttribute("listType")?"ol":"ul",r=function(t){const e=t.createContainerElement("li");return e.getFillerOffset=nv,e}(o),s=o.createContainerElement(i,null);return o.insert(o.createPositionAt(s,0),r),n.bindElements(t,r),r}function Y_(t,e,n,o){const i=e.parent,r=n.mapper,s=n.writer;let a=r.toViewPosition(o.createPositionBefore(t));const c=Q_(t.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:t.getAttribute("listIndent")}),l=t.previousSibling;if(c&&c.getAttribute("listIndent")==t.getAttribute("listIndent")){const t=r.toViewElement(c);a=s.breakContainer(s.createPositionAfter(t))}else if(l&&"listItem"==l.name){a=r.toViewPosition(o.createPositionAt(l,"end"));const t=r.findMappedViewAncestor(a),e=function(t){for(const e of t.getChildren())if("ul"==e.name||"ol"==e.name)return e;return null}(t);a=e?s.createPositionBefore(e):s.createPositionAt(t,"end")}else a=r.toViewPosition(o.createPositionBefore(t));if(a=Z_(a),s.insert(a,i),l&&"listItem"==l.name){const t=r.toViewElement(l),n=s.createRange(s.createPositionAt(t,0),a).getWalker({ignoreElementEnd:!0});for(const t of n)if(t.item.is("element","li")){const o=s.breakContainer(s.createPositionBefore(t.item)),i=t.item.parent,r=s.createPositionAt(e,"end");$_(s,r.nodeBefore,r.nodeAfter),s.move(s.createRangeOn(i),r),n._position=o}}else{const n=i.nextSibling;if(n&&(n.is("element","ul")||n.is("element","ol"))){let o=null;for(const e of n.getChildren()){const n=r.toModelElement(e);if(!(n&&n.getAttribute("listIndent")>t.getAttribute("listIndent")))break;o=e}o&&(s.breakContainer(s.createPositionAfter(o)),s.move(s.createRangeOn(o.parent),s.createPositionAt(e,"end")))}}$_(s,i,i.nextSibling),$_(s,i.previousSibling,i)}function $_(t,e,n){return!e||!n||"ul"!=e.name&&"ol"!=e.name||e.name!=n.name||e.getAttribute("class")!==n.getAttribute("class")?null:t.mergeContainers(t.createPositionAfter(e))}function Z_(t){return t.getLastMatchingPosition((t=>t.item.is("uiElement")))}function Q_(t,e){const n=!!e.sameIndent,o=!!e.smallerIndent,i=e.listIndent;let r=t;for(;r&&"listItem"==r.name;){const t=r.getAttribute("listIndent");if(n&&i==t||o&&i>t)return r;r="forward"===e.direction?r.nextSibling:r.previousSibling}return null}function J_(t,e,n,o){t.ui.componentFactory.add(e,(i=>{const r=t.commands.get(e),s=new tg(i);return s.set({label:n,icon:o,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.on("execute",(()=>{t.execute(e),t.editing.view.focus()})),s}))}function X_(t,e){const n=[],o=t.parent,i={ignoreElementEnd:!1,startPosition:t,shallow:!0,direction:e},r=o.getAttribute("listIndent"),s=[...new yc(i)].filter((t=>t.item.is("element"))).map((t=>t.item));for(const t of s){if(!t.is("element","listItem"))break;if(t.getAttribute("listIndent")r)){if(t.getAttribute("listType")!==o.getAttribute("listType"))break;if(t.getAttribute("listStyle")!==o.getAttribute("listStyle"))break;if(t.getAttribute("listReversed")!==o.getAttribute("listReversed"))break;if(t.getAttribute("listStart")!==o.getAttribute("listStart"))break;"backward"===e?n.unshift(t):n.push(t)}}return n}const tv=["disc","circle","square"],ev=["decimal","decimal-leading-zero","lower-roman","upper-roman","lower-latin","upper-latin"];function nv(){const t=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||t?0:as.call(this)}class ov extends Ni{static get pluginName(){return"ListUI"}init(){const t=this.editor.t;J_(this.editor,"numberedList",t("Numbered List"),''),J_(this.editor,"bulletedList",t("Bulleted List"),'')}}const iv={},rv={},sv={},av=[{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:t,typeAttribute:e,listType:n}of av)iv[t]=n,rv[t]=e,e&&(sv[e]=t);var cv=n(4721),lv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(cv.Z,lv);cv.Z.locals;var dv=n(6082),hv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(dv.Z,hv);dv.Z.locals;var uv=n(2417),gv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(uv.Z,gv);uv.Z.locals;class pv extends zi{constructor(t,e){super(t),this._indentBy="forward"==e?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=t.document;let n=Array.from(e.selection.getSelectedBlocks());t.change((t=>{const e=n[n.length-1];let o=e.nextSibling;for(;o&&"listItem"==o.name&&o.getAttribute("listIndent")>e.getAttribute("listIndent");)n.push(o),o=o.nextSibling;this._indentBy<0&&(n=n.reverse());for(const e of n){const n=e.getAttribute("listIndent")+this._indentBy;n<0?t.rename(e,"paragraph"):t.setAttribute("listIndent",n,e)}this.fire("_executeCleanup",n)}))}_checkEnabled(){const t=yi(this.editor.model.document.selection.getSelectedBlocks());if(!t||!t.is("element","listItem"))return!1;if(this._indentBy>0){const e=t.getAttribute("listIndent"),n=t.getAttribute("listType");let o=t.previousSibling;for(;o&&o.is("element","listItem")&&o.getAttribute("listIndent")>=e;){if(o.getAttribute("listIndent")==e)return o.getAttribute("listType")==n;o=o.previousSibling}return!1}return!0}}class mv extends zi{constructor(t,e){super(t),this.type=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,n=e.document,o=Array.from(n.selection.getSelectedBlocks()).filter((t=>kv(t,e.schema))),i=void 0!==t.forceValue?!t.forceValue:this.value;e.change((t=>{if(i){let e=o[o.length-1].nextSibling,n=Number.POSITIVE_INFINITY,i=[];for(;e&&"listItem"==e.name&&0!==e.getAttribute("listIndent");){const t=e.getAttribute("listIndent");t=n;)r>i.getAttribute("listIndent")&&(r=i.getAttribute("listIndent")),i.getAttribute("listIndent")==r&&t[e?"unshift":"push"](i),i=i[e?"previousSibling":"nextSibling"]}}function kv(t,e){return e.checkChild(t.parent,"listItem")&&!e.isObject(t)}class bv extends Ni{static get pluginName(){return"ListUtils"}getListTypeFromListStyleType(t){return function(t){return tv.includes(t)?"bulleted":ev.includes(t)?"numbered":null}(t)}getSelectedListItems(t){return function(t){let e=[...t.document.selection.getSelectedBlocks()].filter((t=>t.is("element","listItem"))).map((e=>{const n=t.change((t=>t.createPositionAt(e,0)));return[...X_(n,"backward"),...X_(n,"forward")]})).flat();return e=[...new Set(e)],e}(t)}getSiblingNodes(t,e){return X_(t,e)}}function wv(t){return(e,n,o)=>{const i=o.consumable;if(!i.test(n.item,"insert")||!i.test(n.item,"attribute:listType")||!i.test(n.item,"attribute:listIndent"))return;i.consume(n.item,"insert"),i.consume(n.item,"attribute:listType"),i.consume(n.item,"attribute:listIndent");const r=n.item;Y_(r,K_(r,o),o,t)}}const Av=(t,e,n)=>{if(!n.consumable.test(e.item,t.name))return;const o=n.mapper.toViewElement(e.item),i=n.writer;i.breakContainer(i.createPositionBefore(o)),i.breakContainer(i.createPositionAfter(o));const r=o.parent,s="numbered"==e.attributeNewValue?"ol":"ul";i.rename(s,r)},Cv=(t,e,n)=>{n.consumable.consume(e.item,t.name);const o=n.mapper.toViewElement(e.item).parent,i=n.writer;$_(i,o,o.nextSibling),$_(i,o.previousSibling,o)};const _v=(t,e,n)=>{if(n.consumable.test(e.item,t.name)&&"listItem"!=e.item.name){let t=n.mapper.toViewPosition(e.range.start);const o=n.writer,i=[];for(;("ul"==t.parent.name||"ol"==t.parent.name)&&(t=o.breakContainer(t),"li"==t.parent.name);){const e=t,n=o.createPositionAt(t.parent,"end");if(!e.isEqual(n)){const t=o.remove(o.createRange(e,n));i.push(t)}t=o.createPositionAfter(t.parent)}if(i.length>0){for(let e=0;e0){const e=$_(o,n,n.nextSibling);e&&e.parent==n&&t.offset--}}$_(o,t.nodeBefore,t.nodeAfter)}}},vv=(t,e,n)=>{const o=n.mapper.toViewPosition(e.position),i=o.nodeBefore,r=o.nodeAfter;$_(n.writer,i,r)},yv=(t,e,n)=>{if(n.consumable.consume(e.viewItem,{name:!0})){const t=n.writer,o=t.createElement("listItem"),i=function(t){let e=0,n=t.parent;for(;n;){if(n.is("element","li"))e++;else{const t=n.previousSibling;t&&t.is("element","li")&&e++}n=n.parent}return e}(e.viewItem);t.setAttribute("listIndent",i,o);const r=e.viewItem.parent&&"ol"==e.viewItem.parent.name?"numbered":"bulleted";if(t.setAttribute("listType",r,o),!n.safeInsert(o,e.modelCursor))return;const s=function(t,e,n){const{writer:o,schema:i}=n;let r=o.createPositionAfter(t);for(const s of e)if("ul"==s.name||"ol"==s.name)r=n.convertItem(s,r).modelCursor;else{const e=n.convertItem(s,o.createPositionAt(t,"end")),a=e.modelRange.start.nodeAfter;a&&a.is("element")&&!i.checkChild(t,a.name)&&(t=e.modelCursor.parent.is("element","listItem")?e.modelCursor.parent:Sv(e.modelCursor),r=o.createPositionAfter(t))}return r}(o,e.viewItem.getChildren(),n);e.modelRange=t.createRange(e.modelCursor,s),n.updateConversionResult(o,e)}},xv=(t,e,n)=>{if(n.consumable.test(e.viewItem,{name:!0})){const t=Array.from(e.viewItem.getChildren());for(const e of t){!(e.is("element","li")||Tv(e))&&e._remove()}}},Ev=(t,e,n)=>{if(n.consumable.test(e.viewItem,{name:!0})){if(0===e.viewItem.childCount)return;const t=[...e.viewItem.getChildren()];let n=!1;for(const e of t)n&&!Tv(e)&&e._remove(),Tv(e)&&(n=!0)}};function Dv(t){return(e,n)=>{if(n.isPhantom)return;const o=n.modelPosition.nodeBefore;if(o&&o.is("element","listItem")){const e=n.mapper.toViewElement(o),i=e.getAncestors().find(Tv),r=t.createPositionAt(e,0).getWalker();for(const t of r){if("elementStart"==t.type&&t.item.is("element","li")){n.viewPosition=t.previousPosition;break}if("elementEnd"==t.type&&t.item==i){n.viewPosition=t.nextPosition;break}}}}}const Iv=function(t,[e,n]){const o=this;let i,r=e.is("documentFragment")?e.getChild(0):e;if(i=n?o.createSelection(n):o.document.selection,r&&r.is("element","listItem")){const t=i.getFirstPosition();let e=null;if(t.parent.is("element","listItem")?e=t.parent:t.nodeBefore&&t.nodeBefore.is("element","listItem")&&(e=t.nodeBefore),e){const t=e.getAttribute("listIndent");if(t>0)for(;r&&r.is("element","listItem");)r._setAttribute("listIndent",r.getAttribute("listIndent")+t),r=r.nextSibling}}};function Sv(t){const e=new yc({startPosition:t});let n;do{n=e.next()}while(!n.value.item.is("element","listItem"));return n.value.item}function Mv(t,e,n,o,i,r){const s=Q_(e.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:t}),a=i.mapper,c=i.writer,l=s?s.getAttribute("listIndent"):null;let d;if(s)if(l==t){const t=a.toViewElement(s).parent;d=c.createPositionAfter(t)}else{const t=r.createPositionAt(s,"end");d=a.toViewPosition(t)}else d=n;d=Z_(d);for(const t of[...o.getChildren()])Tv(t)&&(d=c.move(c.createRangeOn(t),d).end,$_(c,t,t.nextSibling),$_(c,t.previousSibling,t))}function Tv(t){return t.is("element","ol")||t.is("element","ul")}class Bv extends Ni{static get pluginName(){return"ListEditing"}static get requires(){return[ck,Of,bv]}init(){const t=this.editor;t.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const e=t.data,n=t.editing;var o;t.model.document.registerPostFixer((e=>function(t,e){const n=t.document.differ.getChanges(),o=new Map;let i=!1;for(const o of n)if("insert"==o.type&&"listItem"==o.name)r(o.position);else if("insert"==o.type&&"listItem"!=o.name){if("$text"!=o.name){const n=o.position.nodeAfter;n.hasAttribute("listIndent")&&(e.removeAttribute("listIndent",n),i=!0),n.hasAttribute("listType")&&(e.removeAttribute("listType",n),i=!0),n.hasAttribute("listStyle")&&(e.removeAttribute("listStyle",n),i=!0),n.hasAttribute("listReversed")&&(e.removeAttribute("listReversed",n),i=!0),n.hasAttribute("listStart")&&(e.removeAttribute("listStart",n),i=!0);for(const e of Array.from(t.createRangeIn(n)).filter((t=>t.item.is("element","listItem"))))r(e.previousPosition)}r(o.position.getShiftedBy(o.length))}else"remove"==o.type&&"listItem"==o.name?r(o.position):("attribute"==o.type&&"listIndent"==o.attributeKey||"attribute"==o.type&&"listType"==o.attributeKey)&&r(o.range.start);for(const t of o.values())s(t),a(t);return i;function r(t){const e=t.nodeBefore;if(e&&e.is("element","listItem")){let t=e;if(o.has(t))return;for(let e=t.previousSibling;e&&e.is("element","listItem");e=t.previousSibling)if(t=e,o.has(t))return;o.set(e,t)}else{const e=t.nodeAfter;e&&e.is("element","listItem")&&o.set(e,e)}}function s(t){let n=0,o=null;for(;t&&t.is("element","listItem");){const r=t.getAttribute("listIndent");if(r>n){let s;null===o?(o=r-n,s=n):(o>r&&(o=r),s=r-o),e.setAttribute("listIndent",s,t),i=!0}else o=null,n=t.getAttribute("listIndent")+1;t=t.nextSibling}}function a(t){let n=[],o=null;for(;t&&t.is("element","listItem");){const r=t.getAttribute("listIndent");if(o&&o.getAttribute("listIndent")>r&&(n=n.slice(0,r+1)),0!=r)if(n[r]){const o=n[r];t.getAttribute("listType")!=o&&(e.setAttribute("listType",o,t),i=!0)}else n[r]=t.getAttribute("listType");o=t,t=t.nextSibling}}}(t.model,e))),n.mapper.registerViewToModelLength("li",Nv),e.mapper.registerViewToModelLength("li",Nv),n.mapper.on("modelToViewPosition",Dv(n.view)),n.mapper.on("viewToModelPosition",(o=t.model,(t,e)=>{const n=e.viewPosition,i=n.parent,r=e.mapper;if("ul"==i.name||"ol"==i.name){if(n.isAtEnd){const t=r.toModelElement(n.nodeBefore),i=r.getModelLength(n.nodeBefore);e.modelPosition=o.createPositionBefore(t).getShiftedBy(i)}else{const t=r.toModelElement(n.nodeAfter);e.modelPosition=o.createPositionBefore(t)}t.stop()}else if("li"==i.name&&n.nodeBefore&&("ul"==n.nodeBefore.name||"ol"==n.nodeBefore.name)){const s=r.toModelElement(i);let a=1,c=n.nodeBefore;for(;c&&Tv(c);)a+=r.getModelLength(c),c=c.previousSibling;e.modelPosition=o.createPositionBefore(s).getShiftedBy(a),t.stop()}})),e.mapper.on("modelToViewPosition",Dv(n.view)),t.conversion.for("editingDowncast").add((e=>{e.on("insert",_v,{priority:"high"}),e.on("insert:listItem",wv(t.model)),e.on("attribute:listType:listItem",Av,{priority:"high"}),e.on("attribute:listType:listItem",Cv,{priority:"low"}),e.on("attribute:listIndent:listItem",function(t){return(e,n,o)=>{if(!o.consumable.consume(n.item,"attribute:listIndent"))return;const i=o.mapper.toViewElement(n.item),r=o.writer;r.breakContainer(r.createPositionBefore(i)),r.breakContainer(r.createPositionAfter(i));const s=i.parent,a=s.previousSibling,c=r.createRangeOn(s);r.remove(c),a&&a.nextSibling&&$_(r,a,a.nextSibling),Mv(n.attributeOldValue+1,n.range.start,c.start,i,o,t),Y_(n.item,i,o,t);for(const t of n.item.getChildren())o.consumable.consume(t,"insert")}}(t.model)),e.on("remove:listItem",function(t){return(e,n,o)=>{const i=o.mapper.toViewPosition(n.position).getLastMatchingPosition((t=>!t.item.is("element","li"))).nodeAfter,r=o.writer;r.breakContainer(r.createPositionBefore(i)),r.breakContainer(r.createPositionAfter(i));const s=i.parent,a=s.previousSibling,c=r.createRangeOn(s),l=r.remove(c);a&&a.nextSibling&&$_(r,a,a.nextSibling),Mv(o.mapper.toModelElement(i).getAttribute("listIndent")+1,n.position,c.start,i,o,t);for(const t of r.createRangeIn(l).getItems())o.mapper.unbindViewElement(t);e.stop()}}(t.model)),e.on("remove",vv,{priority:"low"})})),t.conversion.for("dataDowncast").add((e=>{e.on("insert",_v,{priority:"high"}),e.on("insert:listItem",wv(t.model))})),t.conversion.for("upcast").add((t=>{t.on("element:ul",xv,{priority:"high"}),t.on("element:ol",xv,{priority:"high"}),t.on("element:li",Ev,{priority:"high"}),t.on("element:li",yv)})),t.model.on("insertContent",Iv,{priority:"high"}),t.commands.add("numberedList",new mv(t,"numbered")),t.commands.add("bulletedList",new mv(t,"bulleted")),t.commands.add("indentList",new pv(t,"forward")),t.commands.add("outdentList",new pv(t,"backward"));const i=n.view.document;this.listenTo(i,"enter",((t,e)=>{const n=this.editor.model.document,o=n.selection.getLastPosition().parent;n.selection.isCollapsed&&"listItem"==o.name&&o.isEmpty&&(this.editor.execute("outdentList"),e.preventDefault(),t.stop())}),{context:"li"}),this.listenTo(i,"delete",((t,e)=>{if("backward"!==e.direction)return;const n=this.editor.model.document.selection;if(!n.isCollapsed)return;const o=n.getFirstPosition();if(!o.isAtStart)return;const i=o.parent;if("listItem"!==i.name)return;i.previousSibling&&"listItem"===i.previousSibling.name||(this.editor.execute("outdentList"),e.preventDefault(),t.stop())}),{context:"li"}),this.listenTo(t.editing.view.document,"tab",((e,n)=>{const o=n.shiftKey?"outdentList":"indentList";this.editor.commands.get(o).isEnabled&&(t.execute(o),n.stopPropagation(),n.preventDefault(),e.stop())}),{context:"li"})}afterInit(){const t=this.editor.commands,e=t.get("indent"),n=t.get("outdent");e&&e.registerChildCommand(t.get("indentList")),n&&n.registerChildCommand(t.get("outdentList"))}}function Nv(t){let e=1;for(const n of t.getChildren())if("ul"==n.name||"ol"==n.name)for(const t of n.getChildren())e+=Nv(t);return e}mi("Ctrl+Enter");var Pv=n(1199),zv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Pv.Z,zv);Pv.Z.locals;function Ov(t,e){const n=(n,o,i)=>{if(!i.consumable.consume(o.item,n.name))return;const r=o.attributeNewValue,s=i.writer,a=i.mapper.toViewElement(o.item),c=[...a.getChildren()].find((t=>t.getCustomProperty("media-content")));s.remove(c);const l=t.getMediaViewElement(s,r,e);s.insert(s.createPositionAt(a,0),l)};return t=>{t.on("attribute:url:media",n)}}function Lv(t,e,n,o){return t.createContainerElement("figure",{class:"media"},[e.getMediaViewElement(t,n,o),t.createSlot()])}function jv(t){const e=t.getSelectedElement();return e&&e.is("element","media")?e:null}function Rv(t,e,n,o){t.change((i=>{const r=i.createElement("media",{url:e});t.insertObject(r,n,null,{setSelection:"on",findOptimalPosition:o?"auto":void 0})}))}class Fv extends zi{refresh(){const t=this.editor.model,e=t.document.selection,n=jv(e);this.value=n?n.getAttribute("url"):void 0,this.isEnabled=function(t){const e=t.getSelectedElement();return!!e&&"media"===e.name}(e)||function(t,e){const n=Ek(t,e);let o=n.start.parent;o.isEmpty&&!e.schema.isLimit(o)&&(o=o.parent);return e.schema.checkChild(o,"media")}(e,t)}execute(t){const e=this.editor.model,n=e.document.selection,o=jv(n);o?e.change((e=>{e.setAttribute("url",t,o)})):Rv(e,t,n,!0)}}class Vv{constructor(t,e){const n=e.providers,o=e.extraProviders||[],i=new Set(e.removeProviders),r=n.concat(o).filter((t=>{const e=t.name;return e?!i.has(e):(b("media-embed-no-provider-name",{provider:t}),!1)}));this.locale=t,this.providerDefinitions=r}hasMedia(t){return!!this._getMedia(t)}getMediaViewElement(t,e,n){return this._getMedia(e).getViewElement(t,n)}_getMedia(t){if(!t)return new Uv(this.locale);t=t.trim();for(const e of this.providerDefinitions){const n=e.html,o=bi(e.url);for(const e of o){const o=this._getUrlMatches(t,e);if(o)return new Uv(this.locale,t,o,n)}}return null}_getUrlMatches(t,e){let n=t.match(e);if(n)return n;let o=t.replace(/^https?:\/\//,"");return n=o.match(e),n||(o=o.replace(/^www\./,""),n=o.match(e),n||null)}}class Uv{constructor(t,e,n,o){this.url=this._getValidUrl(e),this._locale=t,this._match=n,this._previewRenderer=o}getViewElement(t,e){const n={};let o;if(e.renderForEditingView||e.renderMediaPreview&&this.url&&this._previewRenderer){this.url&&(n["data-oembed-url"]=this.url),e.renderForEditingView&&(n.class="ck-media__wrapper");const i=this._getPreviewHtml(e);o=t.createRawElement("div",n,((t,e)=>{e.setContentOf(t,i)}))}else this.url&&(n.url=this.url),o=t.createEmptyElement(e.elementName,n);return t.setCustomProperty("media-content",!0,o),o}_getPreviewHtml(t){return this._previewRenderer?this._previewRenderer(this._match):this.url&&t.renderForEditingView?this._getPlaceholderHtml():""}_getPlaceholderHtml(){const t=new Qu,e=this._locale.t;t.content='',t.viewBox="0 0 64 42";return new Eu({tag:"div",attributes:{class:"ck ck-reset_all ck-media__placeholder"},children:[{tag:"div",attributes:{class:"ck-media__placeholder__icon"},children:[t]},{tag:"a",attributes:{class:"ck-media__placeholder__url",target:"_blank",rel:"noopener noreferrer",href:this.url,"data-cke-tooltip-text":e("Open media in new tab")},children:[{tag:"span",attributes:{class:"ck-media__placeholder__url__text"},children:[this.url]}]}]}).render().outerHTML}_getValidUrl(t){return t?t.match(/^https?/)?t:"https://"+t:null}}var Hv=n(7442),Gv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Hv.Z,Gv);Hv.Z.locals;class qv extends Ni{constructor(t){super(t),t.config.define("mediaEmbed",{elementName:"oembed",providers:[{name:"dailymotion",url:/^dailymotion\.com\/video\/(\w+)/,html:t=>`
`},{name:"spotify",url:[/^open\.spotify\.com\/(artist\/\w+)/,/^open\.spotify\.com\/(album\/\w+)/,/^open\.spotify\.com\/(track\/\w+)/],html:t=>`
`},{name:"youtube",url:[/^(?:m\.)?youtube\.com\/watch\?v=([\w-]+)(?:&t=(\d+))?/,/^(?:m\.)?youtube\.com\/v\/([\w-]+)(?:\?t=(\d+))?/,/^youtube\.com\/embed\/([\w-]+)(?:\?start=(\d+))?/,/^youtu\.be\/([\w-]+)(?:\?t=(\d+))?/],html:t=>{const e=t[1],n=t[2];return`
`}},{name:"vimeo",url:[/^vimeo\.com\/(\d+)/,/^vimeo\.com\/[^/]+\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/album\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/channels\/[^/]+\/(\d+)/,/^vimeo\.com\/groups\/[^/]+\/videos\/(\d+)/,/^vimeo\.com\/ondemand\/[^/]+\/(\d+)/,/^player\.vimeo\.com\/video\/(\d+)/],html:t=>`
`},{name:"instagram",url:/^instagram\.com\/p\/(\w+)/},{name:"twitter",url:/^twitter\.com/},{name:"googleMaps",url:[/^google\.com\/maps/,/^goo\.gl\/maps/,/^maps\.google\.com/,/^maps\.app\.goo\.gl/]},{name:"flickr",url:/^flickr\.com/},{name:"facebook",url:/^facebook\.com/}]}),this.registry=new Vv(t.locale,t.config.get("mediaEmbed"))}static get pluginName(){return"MediaEmbedEditing"}init(){const t=this.editor,e=t.model.schema,n=t.t,o=t.conversion,i=t.config.get("mediaEmbed.previewsInData"),r=t.config.get("mediaEmbed.elementName"),s=this.registry;t.commands.add("mediaEmbed",new Fv(t)),e.register("media",{inheritAllFrom:"$blockObject",allowAttributes:["url"]}),o.for("dataDowncast").elementToStructure({model:"media",view:(t,{writer:e})=>{const n=t.getAttribute("url");return Lv(e,s,n,{elementName:r,renderMediaPreview:!!n&&i})}}),o.for("dataDowncast").add(Ov(s,{elementName:r,renderMediaPreview:i})),o.for("editingDowncast").elementToStructure({model:"media",view:(t,{writer:e})=>{const o=t.getAttribute("url");return function(t,e,n){return e.setCustomProperty("media",!0,t),Ck(t,e,{label:n})}(Lv(e,s,o,{elementName:r,renderForEditingView:!0}),e,n("media widget"))}}),o.for("editingDowncast").add(Ov(s,{elementName:r,renderForEditingView:!0})),o.for("upcast").elementToElement({view:t=>["oembed",r].includes(t.name)&&t.getAttribute("url")?{name:!0}:null,model:(t,{writer:e})=>{const n=t.getAttribute("url");return s.hasMedia(n)?e.createElement("media",{url:n}):null}}).elementToElement({view:{name:"div",attributes:{"data-oembed-url":!0}},model:(t,{writer:e})=>{const n=t.getAttribute("data-oembed-url");return s.hasMedia(n)?e.createElement("media",{url:n}):null}}).add((t=>{t.on("element:figure",((t,e,n)=>{if(!n.consumable.consume(e.viewItem,{name:!0,classes:"media"}))return;const{modelRange:o,modelCursor:i}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=o,e.modelCursor=i;yi(o.getItems())||n.consumable.revert(e.viewItem,{name:!0,classes:"media"})}))}))}}const Wv=/^(?:http(s)?:\/\/)?[\w-]+\.[\w-.~:/?#[\]@!$&'()*+,;=%]+$/;class Kv extends Ni{constructor(t){super(t),this._timeoutId=null,this._positionToInsert=null}static get requires(){return[nb,Of,vb]}static get pluginName(){return"AutoMediaEmbed"}init(){const t=this.editor,e=t.model.document,n=t.plugins.get("ClipboardPipeline");this.listenTo(n,"inputTransformation",(()=>{const t=e.selection.getFirstRange(),n=th.fromPosition(t.start);n.stickiness="toPrevious";const o=th.fromPosition(t.end);o.stickiness="toNext",e.once("change:data",(()=>{this._embedMediaBetweenPositions(n,o),n.detach(),o.detach()}),{priority:"high"})}));t.commands.get("undo").on("execute",(()=>{this._timeoutId&&(Bo.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)}),{priority:"high"})}_embedMediaBetweenPositions(t,e){const n=this.editor,o=n.plugins.get(qv).registry,i=new el(t,e),r=i.getWalker({ignoreElementEnd:!0});let s="";for(const t of r)t.item.is("$textProxy")&&(s+=t.item.data);if(s=s.trim(),!s.match(Wv))return void i.detach();if(!o.hasMedia(s))return void i.detach();n.commands.get("mediaEmbed").isEnabled?(this._positionToInsert=th.fromPosition(t),this._timeoutId=Bo.window.setTimeout((()=>{n.model.change((t=>{this._timeoutId=null,t.remove(i),i.detach();let e=null;"$graveyard"!==this._positionToInsert.root.rootName&&(e=this._positionToInsert),Rv(n.model,s,e,!1),this._positionToInsert.detach(),this._positionToInsert=null})),n.plugins.get(Of).requestUndoOnBackspace()}),100)):i.detach()}}var Yv=n(9292),$v={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Yv.Z,$v);Yv.Z.locals;class Zv extends xu{constructor(t,e){super(e);const n=e.t;this.focusTracker=new xi,this.keystrokes=new Ei,this.set("mediaURLInputValue",""),this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),bu.check,"ck-button-save"),this.saveButtonView.type="submit",this.saveButtonView.bind("isEnabled").to(this,"mediaURLInputValue",(t=>!!t)),this.cancelButtonView=this._createButton(n("Cancel"),bu.cancel,"ck-button-cancel","cancel"),this._focusables=new _u,this._focusCycler=new vg({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this._validators=t,this.setTemplate({tag:"form",attributes:{class:["ck","ck-media-form","ck-responsive-form"],tabindex:"-1"},children:[this.urlInputView,this.saveButtonView,this.cancelButtonView]})}render(){super.render(),Cu({view:this});[this.urlInputView,this.saveButtonView,this.cancelButtonView].forEach((t=>{this._focusables.add(t),this.focusTracker.add(t.element)})),this.keystrokes.listenTo(this.element);const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}get url(){return this.urlInputView.fieldView.element.value.trim()}set url(t){this.urlInputView.fieldView.element.value=t.trim()}isValid(){this.resetFormStatus();for(const t of this._validators){const e=t(this);if(e)return this.urlInputView.errorText=e,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null,this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){const t=this.locale.t,e=new hg(this.locale,tp),n=e.fieldView;return this._urlInputViewInfoDefault=t("Paste the media URL in the input."),this._urlInputViewInfoTip=t("Tip: Paste the URL into the content to embed faster."),e.label=t("Media URL"),e.infoText=this._urlInputViewInfoDefault,n.on("input",(()=>{e.infoText=n.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault,this.mediaURLInputValue=n.element.value.trim()})),e}_createButton(t,e,n,o){const i=new tg(this.locale);return i.set({label:t,icon:e,tooltip:!0}),i.extendTemplate({attributes:{class:n}}),o&&i.delegate("execute").to(this,o),i}}class Qv extends Ni{static get requires(){return[qv]}static get pluginName(){return"MediaEmbedUI"}init(){const t=this.editor,e=t.commands.get("mediaEmbed");t.ui.componentFactory.add("mediaEmbed",(t=>{const n=Yg(t);return this._setUpDropdown(n,e),n}))}_setUpDropdown(t,e){const n=this.editor,o=n.t,i=t.buttonView,r=n.plugins.get(qv).registry;t.once("change:isOpen",(()=>{const o=new(Au(Zv))(function(t,e){return[e=>{if(!e.url.length)return t("The URL must not be empty.")},n=>{if(!e.hasMedia(n.url))return t("This media URL is not supported.")}]}(n.t,r),n.locale);t.panelView.children.add(o),i.on("open",(()=>{o.disableCssTransitions(),o.url=e.value||"",o.urlInputView.fieldView.select(),o.enableCssTransitions()}),{priority:"low"}),t.on("submit",(()=>{o.isValid()&&(n.execute("mediaEmbed",o.url),n.editing.view.focus())})),t.on("change:isOpen",(()=>o.resetFormStatus())),t.on("cancel",(()=>{n.editing.view.focus()})),o.delegate("submit","cancel").to(t),o.urlInputView.fieldView.bind("value").to(e,"value"),o.urlInputView.bind("isEnabled").to(e,"isEnabled")})),t.bind("isEnabled").to(e),i.set({label:o("Insert media"),icon:'',tooltip:!0})}}var Jv=n(4652),Xv={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};Hi()(Jv.Z,Xv);Jv.Z.locals;function ty(t,e){if(!t.childCount)return;const n=new uu(t.document),o=function(t,e){const n=e.createRangeIn(t),o=new ir({name:/^p|h\d+$/,styles:{"mso-list":/.*/}}),i=[];for(const t of n)if("elementStart"===t.type&&o.match(t.item)){const e=oy(t.item);i.push({element:t.item,id:e.id,order:e.order,indent:e.indent})}return i}(t,n);if(!o.length)return;let i=null,r=1;o.forEach(((t,s)=>{const a=function(t,e){if(!t)return!0;if(t.id!==e.id)return e.indent-t.indent!=1;const n=e.element.previousSibling;if(!n)return!0;return o=n,!(o.is("element","ol")||o.is("element","ul"));var o}(o[s-1],t),c=a?null:o[s-1],l=(h=t,(d=c)?h.indent-d.indent:h.indent-1);var d,h;if(a&&(i=null,r=1),!i||0!==l){const o=function(t,e){const n=new RegExp(`@list l${t.id}:level${t.indent}\\s*({[^}]*)`,"gi"),o=/mso-level-number-format:([^;]{0,100});/gi,i=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,r=n.exec(e);let s="decimal",a="ol",c=null;if(r&&r[1]){const e=o.exec(r[1]);if(e&&e[1]&&(s=e[1].trim(),a="bullet"!==s&&"image"!==s?"ol":"ul"),"bullet"===s){const e=function(t){const e=function(t){if(t.getChild(0).is("$text"))return null;for(const e of t.getChildren()){if(!e.is("element","span"))continue;const t=e.getChild(0);if(t)return t.is("$text")?t:t.getChild(0)}return null}(t);if(!e)return null;const n=e._data;if("o"===n)return"circle";if("·"===n)return"disc";if("§"===n)return"square";return null}(t.element);e&&(s=e)}else{const t=i.exec(r[1]);t&&t[1]&&(c=parseInt(t[1]))}}return{type:a,startIndex:c,style:ey(s)}}(t,e);if(i){if(t.indent>r){const t=i.getChild(i.childCount-1),e=t.getChild(t.childCount-1);i=ny(o,e,n),r+=1}else if(t.indent1&&n.setAttribute("start",t.startIndex,i),i}function oy(t){const e={},n=t.getStyle("mso-list");if(n){const t=n.match(/(^|\s{1,100})l(\d+)/i),o=n.match(/\s{0,100}lfo(\d+)/i),i=n.match(/\s{0,100}level(\d+)/i);t&&o&&i&&(e.id=t[2],e.order=o[1],e.indent=parseInt(i[1]))}return e}function iy(t,e){if(!t.childCount)return;const n=new uu(t.document),o=function(t,e){const n=e.createRangeIn(t),o=new ir({name:/v:(.+)/}),i=[];for(const t of n){if("elementStart"!=t.type)continue;const e=t.item,n=e.previousSibling,r=n&&n.is("element")?n.name:null;o.match(e)&&e.getAttribute("o:gfxdata")&&"v:shapetype"!==r&&i.push(t.item.getAttribute("id"))}return i}(t,n);!function(t,e,n){const o=n.createRangeIn(e),i=new ir({name:"img"}),r=[];for(const e of o)if(e.item.is("element")&&i.match(e.item)){const n=e.item,o=n.getAttribute("v:shapes")?n.getAttribute("v:shapes").split(" "):[];o.length&&o.every((e=>t.indexOf(e)>-1))?r.push(n):n.getAttribute("src")||r.push(n)}for(const t of r)n.remove(t)}(o,t,n),function(t,e,n){const o=n.createRangeIn(e),i=[];for(const e of o)if("elementStart"==e.type&&e.item.is("element","v:shape")){const n=e.item.getAttribute("id");if(t.includes(n))continue;r(e.item.parent.getChildren(),n)||i.push(e.item)}for(const t of i){const e={src:s(t)};t.hasAttribute("alt")&&(e.alt=t.getAttribute("alt"));const o=n.createElement("img",e);n.insertChild(t.index+1,o,t.parent)}function r(t,e){for(const n of t)if(n.is("element")){if("img"==n.name&&n.getAttribute("v:shapes")==e)return!0;if(r(n.getChildren(),e))return!0}return!1}function s(t){for(const e of t.getChildren())if(e.is("element")&&e.getAttribute("src"))return e.getAttribute("src")}}(o,t,n),function(t,e){const n=e.createRangeIn(t),o=new ir({name:/v:(.+)/}),i=[];for(const t of n)"elementStart"==t.type&&o.match(t.item)&&i.push(t.item);for(const t of i)e.remove(t)}(t,n);const i=function(t,e){const n=e.createRangeIn(t),o=new ir({name:"img"}),i=[];for(const t of n)t.item.is("element")&&o.match(t.item)&&t.item.getAttribute("src").startsWith("file://")&&i.push(t.item);return i}(t,n);i.length&&function(t,e,n){if(t.length===e.length)for(let o=0;oString.fromCharCode(parseInt(t,16)))).join(""))}const sy=//i,ay=/xmlns:o="urn:schemas-microsoft-com/i;class cy{constructor(t){this.document=t}isActive(t){return sy.test(t)||ay.test(t)}execute(t){const{body:e,stylesString:n}=t._parsedData;ty(e,n),iy(e,t.dataTransfer.getData("text/rtf")),function(t){const e=new uu(t.document);for(const n of t.getChildren()){if(!n.is("element"))continue;if(n.is("element","table")){e.setAttribute("align","left",n);continue}const t=n.getAttribute("align"),o=n.getChild(0);"div"===n.name&&t&&o&&o.is("element","table")&&e.setAttribute("align","center"===t?"none":t,o)}}(e),t.content=e}}function ly(t,e,n,{blockElements:o,inlineObjectElements:i}){let r=n.createPositionAt(t,"forward"==e?"after":"before");return r=r.getLastMatchingPosition((({item:t})=>t.is("element")&&!o.includes(t.name)&&!i.includes(t.name)),{direction:e}),"forward"==e?r.nodeAfter:r.nodeBefore}function dy(t,e){return!!t&&t.is("element")&&e.includes(t.name)}const hy=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class uy{constructor(t){this.document=t}isActive(t){return hy.test(t)}execute(t){const e=new uu(this.document),{body:n}=t._parsedData;!function(t,e){for(const n of t.getChildren())if(n.is("element","b")&&"normal"===n.getStyle("font-weight")){const o=t.getChildIndex(n);e.remove(n),e.insertChild(o,n.getChildren(),t)}}(n,e),function(t,e){for(const n of e.createRangeIn(t)){const t=n.item;if(t.is("element","li")){const n=t.getChild(0);n&&n.is("element","p")&&e.unwrapElement(n)}}}(n,e),function(t,e){const n=new ys(e.document.stylesProcessor),o=new ma(n,{renderingMode:"data"}),i=o.blockElements,r=o.inlineObjectElements,s=[];for(const n of e.createRangeIn(t)){const t=n.item;if(t.is("element","br")){const n=ly(t,"forward",e,{blockElements:i,inlineObjectElements:r}),o=ly(t,"backward",e,{blockElements:i,inlineObjectElements:r}),a=dy(n,i);(dy(o,i)||a)&&s.push(t)}}for(const t of s)t.hasClass("Apple-interchange-newline")?e.remove(t):e.replace(t,e.createElement("p"))}(n,e),t.content=n}}const gy=/(\s+)<\/span>/g,((t,e)=>1===e.length?" ":Array(e.length+1).join("  ").substr(0,e.length)))}function fy(t,e){const n=new DOMParser,o=function(t){return my(my(t)).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," <\/o:p>/g," ").replace(/( |\u00A0)<\/o:p>/g,"").replace(/>([^\S\r\n]*[\r\n]\s*)<")}(function(t){const e="",n="",o=t.indexOf(e);if(o<0)return t;const i=t.indexOf(n,o+e.length);return t.substring(0,o+e.length)+(i>=0?t.substring(i):"")}(t=t.replace(/

abc

\n\t\t\t//\n\t\t\tif ( isAttribute && this._wrapAttributeElement( wrapElement, child ) ) {\n\t\t\t\twrapPositions.push( new Position( parent, i ) );\n\t\t\t}\n\t\t\t//\n\t\t\t// Wrap the child if it is not an attribute element or if it is an attribute element that should be inside\n\t\t\t// `wrapElement` (due to priority).\n\t\t\t//\n\t\t\t//

abc

-->

abc

\n\t\t\t//

abc

-->

abc

\n\t\t\telse if ( isText || !isAttribute || shouldABeOutsideB( wrapElement, child ) ) {\n\t\t\t\t// Clone attribute.\n\t\t\t\tconst newAttribute = wrapElement._clone();\n\n\t\t\t\t// Wrap current node with new attribute.\n\t\t\t\tchild._remove();\n\t\t\t\tnewAttribute._appendChild( child );\n\n\t\t\t\tparent._insertChild( i, newAttribute );\n\t\t\t\tthis._addToClonedElementsGroup( newAttribute );\n\n\t\t\t\twrapPositions.push( new Position( parent, i ) );\n\t\t\t}\n\t\t\t//\n\t\t\t// If other nested attribute is found and it wasn't wrapped (see above), continue wrapping inside it.\n\t\t\t//\n\t\t\t//

abc

-->

abc

\n\t\t\t//\n\t\t\telse /* if ( isAttribute ) */ {\n\t\t\t\tthis._wrapChildren( child, 0, child.childCount, wrapElement );\n\t\t\t}\n\n\t\t\ti++;\n\t\t}\n\n\t\t// Merge at each wrap.\n\t\tlet offsetChange = 0;\n\n\t\tfor ( const position of wrapPositions ) {\n\t\t\tposition.offset -= offsetChange;\n\n\t\t\t// Do not merge with elements outside selected children.\n\t\t\tif ( position.offset == startOffset ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst newPosition = this.mergeAttributes( position );\n\n\t\t\t// If nodes were merged - other merge offsets will change.\n\t\t\tif ( !newPosition.isEqual( position ) ) {\n\t\t\t\toffsetChange++;\n\t\t\t\tendOffset--;\n\t\t\t}\n\t\t}\n\n\t\treturn Range._createFromParentsAndOffsets( parent, startOffset, parent, endOffset );\n\t}\n\n\t/**\n\t * Unwraps children from provided `unwrapElement`. Only children contained in `parent` element between\n\t * `startOffset` and `endOffset` will be unwrapped.\n\t */\n\tprivate _unwrapChildren( parent: Element, startOffset: number, endOffset: number, unwrapElement: AttributeElement ) {\n\t\tlet i = startOffset;\n\t\tconst unwrapPositions: Array = [];\n\n\t\t// Iterate over each element between provided offsets inside parent.\n\t\t// We don't use tree walker or range iterator because we will be removing and merging potentially multiple nodes,\n\t\t// so it could get messy. It is safer to it manually in this case.\n\t\twhile ( i < endOffset ) {\n\t\t\tconst child = parent.getChild( i )!;\n\n\t\t\t// Skip all text nodes. There should be no container element's here either.\n\t\t\tif ( !child.is( 'attributeElement' ) ) {\n\t\t\t\ti++;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//\n\t\t\t// (In all examples, assume that `unwrapElement` is `` element.)\n\t\t\t//\n\t\t\t// If the child is similar to the given attribute element, unwrap it - it will be completely removed.\n\t\t\t//\n\t\t\t//

abcxyz

-->

abcxyz

\n\t\t\t//\n\t\t\tif ( child.isSimilar( unwrapElement ) ) {\n\t\t\t\tconst unwrapped = child.getChildren();\n\t\t\t\tconst count = child.childCount;\n\n\t\t\t\t// Replace wrapper element with its children\n\t\t\t\tchild._remove();\n\t\t\t\tparent._insertChild( i, unwrapped );\n\n\t\t\t\tthis._removeFromClonedElementsGroup( child );\n\n\t\t\t\t// Save start and end position of moved items.\n\t\t\t\tunwrapPositions.push(\n\t\t\t\t\tnew Position( parent, i ),\n\t\t\t\t\tnew Position( parent, i + count )\n\t\t\t\t);\n\n\t\t\t\t// Skip elements that were unwrapped. Assuming there won't be another element to unwrap in child elements.\n\t\t\t\ti += count;\n\t\t\t\tendOffset += count - 1;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//\n\t\t\t// If the child is not similar but is an attribute element, try partial unwrapping - remove the same attributes/styles/classes.\n\t\t\t// Partial unwrapping will happen only if the elements have the same name.\n\t\t\t//\n\t\t\t//

abcxyz

-->

abcxyz

\n\t\t\t//

abcxyz

-->

abcxyz

\n\t\t\t//\n\t\t\tif ( this._unwrapAttributeElement( unwrapElement, child ) ) {\n\t\t\t\tunwrapPositions.push(\n\t\t\t\t\tnew Position( parent, i ),\n\t\t\t\t\tnew Position( parent, i + 1 )\n\t\t\t\t);\n\n\t\t\t\ti++;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//\n\t\t\t// If other nested attribute is found, look through it's children for elements to unwrap.\n\t\t\t//\n\t\t\t//

abc

-->

abc

\n\t\t\t//\n\t\t\tthis._unwrapChildren( child, 0, child.childCount, unwrapElement );\n\n\t\t\ti++;\n\t\t}\n\n\t\t// Merge at each unwrap.\n\t\tlet offsetChange = 0;\n\n\t\tfor ( const position of unwrapPositions ) {\n\t\t\tposition.offset -= offsetChange;\n\n\t\t\t// Do not merge with elements outside selected children.\n\t\t\tif ( position.offset == startOffset || position.offset == endOffset ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst newPosition = this.mergeAttributes( position );\n\n\t\t\t// If nodes were merged - other merge offsets will change.\n\t\t\tif ( !newPosition.isEqual( position ) ) {\n\t\t\t\toffsetChange++;\n\t\t\t\tendOffset--;\n\t\t\t}\n\t\t}\n\n\t\treturn Range._createFromParentsAndOffsets( parent, startOffset, parent, endOffset );\n\t}\n\n\t/**\n\t * Helper function for `view.writer.wrap`. Wraps range with provided attribute element.\n\t * This method will also merge newly added attribute element with its siblings whenever possible.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n\t * an instance of {@link module:engine/view/attributeelement~AttributeElement AttributeElement}.\n\t *\n\t * @returns New range after wrapping, spanning over wrapping attribute element.\n\t */\n\tprivate _wrapRange( range: Range, attribute: AttributeElement ): Range {\n\t\t// Break attributes at range start and end.\n\t\tconst { start: breakStart, end: breakEnd } = this._breakAttributesRange( range, true );\n\t\tconst parentContainer = breakStart.parent as Element;\n\n\t\t// Wrap all children with attribute.\n\t\tconst newRange = this._wrapChildren( parentContainer, breakStart.offset, breakEnd.offset, attribute );\n\n\t\t// Merge attributes at the both ends and return a new range.\n\t\tconst start = this.mergeAttributes( newRange.start );\n\n\t\t// If start position was merged - move end position back.\n\t\tif ( !start.isEqual( newRange.start ) ) {\n\t\t\tnewRange.end.offset--;\n\t\t}\n\t\tconst end = this.mergeAttributes( newRange.end );\n\n\t\treturn new Range( start, end );\n\t}\n\n\t/**\n\t * Helper function for {@link #wrap}. Wraps position with provided attribute element.\n\t * This method will also merge newly added attribute element with its siblings whenever possible.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n\t * an instance of {@link module:engine/view/attributeelement~AttributeElement AttributeElement}.\n\t *\n\t * @returns New position after wrapping.\n\t */\n\tprivate _wrapPosition( position: Position, attribute: AttributeElement ): Position {\n\t\t// Return same position when trying to wrap with attribute similar to position parent.\n\t\tif ( attribute.isSimilar( position.parent as any ) ) {\n\t\t\treturn movePositionToTextNode( position.clone() );\n\t\t}\n\n\t\t// When position is inside text node - break it and place new position between two text nodes.\n\t\tif ( position.parent.is( '$text' ) ) {\n\t\t\tposition = breakTextNode( position );\n\t\t}\n\n\t\t// Create fake element that will represent position, and will not be merged with other attributes.\n\t\tconst fakeElement = this.createAttributeElement( '_wrapPosition-fake-element' );\n\t\t( fakeElement as any )._priority = Number.POSITIVE_INFINITY;\n\t\tfakeElement.isSimilar = () => false;\n\n\t\t// Insert fake element in position location.\n\t\t( position.parent as Element )._insertChild( position.offset, fakeElement );\n\n\t\t// Range around inserted fake attribute element.\n\t\tconst wrapRange = new Range( position, position.getShiftedBy( 1 ) );\n\n\t\t// Wrap fake element with attribute (it will also merge if possible).\n\t\tthis.wrap( wrapRange, attribute );\n\n\t\t// Remove fake element and place new position there.\n\t\tconst newPosition = new Position( fakeElement.parent!, fakeElement.index! );\n\t\tfakeElement._remove();\n\n\t\t// If position is placed between text nodes - merge them and return position inside.\n\t\tconst nodeBefore = newPosition.nodeBefore;\n\t\tconst nodeAfter = newPosition.nodeAfter;\n\n\t\tif ( nodeBefore instanceof Text && nodeAfter instanceof Text ) {\n\t\t\treturn mergeTextNodes( nodeBefore, nodeAfter );\n\t\t}\n\n\t\t// If position is next to text node - move position inside.\n\t\treturn movePositionToTextNode( newPosition );\n\t}\n\n\t/**\n\t * Wraps one {@link module:engine/view/attributeelement~AttributeElement AttributeElement} into another by\n\t * merging them if possible. When merging is possible - all attributes, styles and classes are moved from wrapper\n\t * element to element being wrapped.\n\t *\n\t * @param wrapper Wrapper AttributeElement.\n\t * @param toWrap AttributeElement to wrap using wrapper element.\n\t * @returns Returns `true` if elements are merged.\n\t */\n\tprivate _wrapAttributeElement( wrapper: AttributeElement, toWrap: AttributeElement ): boolean {\n\t\tif ( !canBeJoined( wrapper, toWrap ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Can't merge if name or priority differs.\n\t\tif ( wrapper.name !== toWrap.name || wrapper.priority !== toWrap.priority ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if attributes can be merged.\n\t\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t\t// Classes and styles should be checked separately.\n\t\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If some attributes are different we cannot wrap.\n\t\t\tif ( toWrap.hasAttribute( key ) && toWrap.getAttribute( key ) !== wrapper.getAttribute( key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Check if styles can be merged.\n\t\tfor ( const key of wrapper.getStyleNames() ) {\n\t\t\tif ( toWrap.hasStyle( key ) && toWrap.getStyle( key ) !== wrapper.getStyle( key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Move all attributes/classes/styles from wrapper to wrapped AttributeElement.\n\t\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t\t// Classes and styles should be checked separately.\n\t\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Move only these attributes that are not present - other are similar.\n\t\t\tif ( !toWrap.hasAttribute( key ) ) {\n\t\t\t\tthis.setAttribute( key, wrapper.getAttribute( key )!, toWrap );\n\t\t\t}\n\t\t}\n\n\t\tfor ( const key of wrapper.getStyleNames() ) {\n\t\t\tif ( !toWrap.hasStyle( key ) ) {\n\t\t\t\tthis.setStyle( key, wrapper.getStyle( key )!, toWrap );\n\t\t\t}\n\t\t}\n\n\t\tfor ( const key of wrapper.getClassNames() ) {\n\t\t\tif ( !toWrap.hasClass( key ) ) {\n\t\t\t\tthis.addClass( key, toWrap );\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Unwraps {@link module:engine/view/attributeelement~AttributeElement AttributeElement} from another by removing\n\t * corresponding attributes, classes and styles. All attributes, classes and styles from wrapper should be present\n\t * inside element being unwrapped.\n\t *\n\t * @param wrapper Wrapper AttributeElement.\n\t * @param toUnwrap AttributeElement to unwrap using wrapper element.\n\t * @returns Returns `true` if elements are unwrapped.\n\t **/\n\tprivate _unwrapAttributeElement( wrapper: AttributeElement, toUnwrap: AttributeElement ): boolean {\n\t\tif ( !canBeJoined( wrapper, toUnwrap ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Can't unwrap if name or priority differs.\n\t\tif ( wrapper.name !== toUnwrap.name || wrapper.priority !== toUnwrap.priority ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if AttributeElement has all wrapper attributes.\n\t\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t\t// Classes and styles should be checked separately.\n\t\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If some attributes are missing or different we cannot unwrap.\n\t\t\tif ( !toUnwrap.hasAttribute( key ) || toUnwrap.getAttribute( key ) !== wrapper.getAttribute( key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Check if AttributeElement has all wrapper classes.\n\t\tif ( !toUnwrap.hasClass( ...wrapper.getClassNames() ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if AttributeElement has all wrapper styles.\n\t\tfor ( const key of wrapper.getStyleNames() ) {\n\t\t\t// If some styles are missing or different we cannot unwrap.\n\t\t\tif ( !toUnwrap.hasStyle( key ) || toUnwrap.getStyle( key ) !== wrapper.getStyle( key ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Remove all wrapper's attributes from unwrapped element.\n\t\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t\t// Classes and styles should be checked separately.\n\t\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tthis.removeAttribute( key, toUnwrap );\n\t\t}\n\n\t\t// Remove all wrapper's classes from unwrapped element.\n\t\tthis.removeClass( Array.from( wrapper.getClassNames() ), toUnwrap );\n\n\t\t// Remove all wrapper's styles from unwrapped element.\n\t\tthis.removeStyle( Array.from( wrapper.getStyleNames() ), toUnwrap );\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Helper function used by other `DowncastWriter` methods. Breaks attribute elements at the boundaries of given range.\n\t *\n\t * @param range Range which `start` and `end` positions will be used to break attributes.\n\t * @param forceSplitText If set to `true`, will break text nodes even if they are directly in container element.\n\t * This behavior will result in incorrect view state, but is needed by other view writing methods which then fixes view state.\n\t * @returns New range with located at break positions.\n\t */\n\tprivate _breakAttributesRange( range: Range, forceSplitText: boolean = false ) {\n\t\tconst rangeStart = range.start;\n\t\tconst rangeEnd = range.end;\n\n\t\tvalidateRangeContainer( range, this.document );\n\n\t\t// Break at the collapsed position. Return new collapsed range.\n\t\tif ( range.isCollapsed ) {\n\t\t\tconst position = this._breakAttributes( range.start, forceSplitText );\n\n\t\t\treturn new Range( position, position );\n\t\t}\n\n\t\tconst breakEnd = this._breakAttributes( rangeEnd, forceSplitText );\n\t\tconst count = ( breakEnd.parent as Element ).childCount;\n\t\tconst breakStart = this._breakAttributes( rangeStart, forceSplitText );\n\n\t\t// Calculate new break end offset.\n\t\tbreakEnd.offset += ( breakEnd.parent as Element ).childCount - count;\n\n\t\treturn new Range( breakStart, breakEnd );\n\t}\n\n\t/**\n\t * Helper function used by other `DowncastWriter` methods. Breaks attribute elements at given position.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-cannot-break-empty-element` when break position\n\t * is placed inside {@link module:engine/view/emptyelement~EmptyElement EmptyElement}.\n\t *\n\t * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-cannot-break-ui-element` when break position\n\t * is placed inside {@link module:engine/view/uielement~UIElement UIElement}.\n\t *\n\t * @param position Position where to break attributes.\n\t * @param forceSplitText If set to `true`, will break text nodes even if they are directly in container element.\n\t * This behavior will result in incorrect view state, but is needed by other view writing methods which then fixes view state.\n\t * @returns New position after breaking the attributes.\n\t */\n\tprivate _breakAttributes( position: Position, forceSplitText: boolean = false ): Position {\n\t\tconst positionOffset = position.offset;\n\t\tconst positionParent = position.parent;\n\n\t\t// If position is placed inside EmptyElement - throw an exception as we cannot break inside.\n\t\tif ( position.parent.is( 'emptyElement' ) ) {\n\t\t\t/**\n\t\t\t * Cannot break an `EmptyElement` instance.\n\t\t\t *\n\t\t\t * This error is thrown if\n\t\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#breakAttributes `DowncastWriter#breakAttributes()`}\n\t\t\t * was executed in an incorrect position.\n\t\t\t *\n\t\t\t * @error view-writer-cannot-break-empty-element\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-cannot-break-empty-element', this.document );\n\t\t}\n\n\t\t// If position is placed inside UIElement - throw an exception as we cannot break inside.\n\t\tif ( position.parent.is( 'uiElement' ) ) {\n\t\t\t/**\n\t\t\t * Cannot break a `UIElement` instance.\n\t\t\t *\n\t\t\t * This error is thrown if\n\t\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#breakAttributes `DowncastWriter#breakAttributes()`}\n\t\t\t * was executed in an incorrect position.\n\t\t\t *\n\t\t\t * @error view-writer-cannot-break-ui-element\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-cannot-break-ui-element', this.document );\n\t\t}\n\n\t\t// If position is placed inside RawElement - throw an exception as we cannot break inside.\n\t\tif ( position.parent.is( 'rawElement' ) ) {\n\t\t\t/**\n\t\t\t * Cannot break a `RawElement` instance.\n\t\t\t *\n\t\t\t * This error is thrown if\n\t\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#breakAttributes `DowncastWriter#breakAttributes()`}\n\t\t\t * was executed in an incorrect position.\n\t\t\t *\n\t\t\t * @error view-writer-cannot-break-raw-element\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-cannot-break-raw-element', this.document );\n\t\t}\n\n\t\t// There are no attributes to break and text nodes breaking is not forced.\n\t\tif ( !forceSplitText && positionParent.is( '$text' ) && isContainerOrFragment( positionParent.parent! ) ) {\n\t\t\treturn position.clone();\n\t\t}\n\n\t\t// Position's parent is container, so no attributes to break.\n\t\tif ( isContainerOrFragment( positionParent ) ) {\n\t\t\treturn position.clone();\n\t\t}\n\n\t\t// Break text and start again in new position.\n\t\tif ( positionParent.is( '$text' ) ) {\n\t\t\treturn this._breakAttributes( breakTextNode( position ), forceSplitText );\n\t\t}\n\n\t\tconst length = ( positionParent as any ).childCount;\n\n\t\t//

foobar{}

\n\t\t//

foobar[]

\n\t\t//

foobar[]

\n\t\tif ( positionOffset == length ) {\n\t\t\tconst newPosition = new Position( positionParent.parent as any, ( positionParent as any ).index + 1 );\n\n\t\t\treturn this._breakAttributes( newPosition, forceSplitText );\n\t\t} else {\n\t\t\t//

foo{}bar

\n\t\t\t//

foo[]bar

\n\t\t\t//

foo{}bar

\n\t\t\tif ( positionOffset === 0 ) {\n\t\t\t\tconst newPosition = new Position( positionParent.parent as Element, ( positionParent as any ).index );\n\n\t\t\t\treturn this._breakAttributes( newPosition, forceSplitText );\n\t\t\t}\n\t\t\t//

foob{}ar

\n\t\t\t//

foob[]ar

\n\t\t\t//

foob[]ar

\n\t\t\t//

foob[]ar

\n\t\t\telse {\n\t\t\t\tconst offsetAfter = ( positionParent as any ).index + 1;\n\n\t\t\t\t// Break element.\n\t\t\t\tconst clonedNode = ( positionParent as any )._clone();\n\n\t\t\t\t// Insert cloned node to position's parent node.\n\t\t\t\t( positionParent.parent as any )._insertChild( offsetAfter, clonedNode );\n\t\t\t\tthis._addToClonedElementsGroup( clonedNode );\n\n\t\t\t\t// Get nodes to move.\n\t\t\t\tconst count = ( positionParent as any ).childCount - positionOffset;\n\t\t\t\tconst nodesToMove = ( positionParent as any )._removeChildren( positionOffset, count );\n\n\t\t\t\t// Move nodes to cloned node.\n\t\t\t\tclonedNode._appendChild( nodesToMove );\n\n\t\t\t\t// Create new position to work on.\n\t\t\t\tconst newPosition = new Position( ( positionParent as any ).parent, offsetAfter );\n\n\t\t\t\treturn this._breakAttributes( newPosition, forceSplitText );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Stores the information that an {@link module:engine/view/attributeelement~AttributeElement attribute element} was\n\t * added to the tree. Saves the reference to the group in the given element and updates the group, so other elements\n\t * from the group now keep a reference to the given attribute element.\n\t *\n\t * The clones group can be obtained using {@link module:engine/view/attributeelement~AttributeElement#getElementsWithSameId}.\n\t *\n\t * Does nothing if added element has no {@link module:engine/view/attributeelement~AttributeElement#id id}.\n\t *\n\t * @param element Attribute element to save.\n\t */\n\tprivate _addToClonedElementsGroup( element: Node ): void {\n\t\t// Add only if the element is in document tree.\n\t\tif ( !element.root.is( 'rootElement' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Traverse the element's children recursively to find other attribute elements that also might got inserted.\n\t\t// The loop is at the beginning so we can make fast returns later in the code.\n\t\tif ( element.is( 'element' ) ) {\n\t\t\tfor ( const child of element.getChildren() ) {\n\t\t\t\tthis._addToClonedElementsGroup( child );\n\t\t\t}\n\t\t}\n\n\t\tconst id = ( element as any ).id;\n\n\t\tif ( !id ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet group = this._cloneGroups.get( id );\n\n\t\tif ( !group ) {\n\t\t\tgroup = new Set();\n\t\t\tthis._cloneGroups.set( id, group );\n\t\t}\n\n\t\tgroup.add( element as AttributeElement );\n\t\t( element as any )._clonesGroup = group;\n\t}\n\n\t/**\n\t * Removes all the information about the given {@link module:engine/view/attributeelement~AttributeElement attribute element}\n\t * from its clones group.\n\t *\n\t * Keep in mind, that the element will still keep a reference to the group (but the group will not keep a reference to it).\n\t * This allows to reference the whole group even if the element was already removed from the tree.\n\t *\n\t * Does nothing if the element has no {@link module:engine/view/attributeelement~AttributeElement#id id}.\n\t *\n\t * @param element Attribute element to remove.\n\t */\n\tprivate _removeFromClonedElementsGroup( element: Node ) {\n\t\t// Traverse the element's children recursively to find other attribute elements that also got removed.\n\t\t// The loop is at the beginning so we can make fast returns later in the code.\n\t\tif ( element.is( 'element' ) ) {\n\t\t\tfor ( const child of element.getChildren() ) {\n\t\t\t\tthis._removeFromClonedElementsGroup( child );\n\t\t\t}\n\t\t}\n\n\t\tconst id = ( element as any ).id;\n\n\t\tif ( !id ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst group = this._cloneGroups.get( id );\n\n\t\tif ( !group ) {\n\t\t\treturn;\n\t\t}\n\n\t\tgroup.delete( element as AttributeElement );\n\t\t// Not removing group from element on purpose!\n\t\t// If other parts of code have reference to this element, they will be able to get references to other elements from the group.\n\t}\n}\n\n// Helper function for `view.writer.wrap`. Checks if given element has any children that are not ui elements.\nfunction _hasNonUiChildren( parent: Element ): boolean {\n\treturn Array.from( parent.getChildren() ).some( child => !child.is( 'uiElement' ) );\n}\n\n/**\n * The `attribute` passed to {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#wrap()`}\n * must be an instance of {@link module:engine/view/attributeelement~AttributeElement `AttributeElement`}.\n *\n * @error view-writer-wrap-invalid-attribute\n */\n\n/**\n * Returns first parent container of specified {@link module:engine/view/position~Position Position}.\n * Position's parent node is checked as first, then next parents are checked.\n * Note that {@link module:engine/view/documentfragment~DocumentFragment DocumentFragment} is treated like a container.\n *\n * @param position Position used as a start point to locate parent container.\n * @returns Parent container element or `undefined` if container is not found.\n */\nfunction getParentContainer( position: Position ): ContainerElement | DocumentFragment | undefined {\n\tlet parent = position.parent;\n\n\twhile ( !isContainerOrFragment( parent ) ) {\n\t\tif ( !parent ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tparent = parent.parent as any;\n\t}\n\n\treturn ( parent as ContainerElement | DocumentFragment );\n}\n\n/**\n * Checks if first {@link module:engine/view/attributeelement~AttributeElement AttributeElement} provided to the function\n * can be wrapped outside second element. It is done by comparing elements'\n * {@link module:engine/view/attributeelement~AttributeElement#priority priorities}, if both have same priority\n * {@link module:engine/view/element~Element#getIdentity identities} are compared.\n */\nfunction shouldABeOutsideB( a: AttributeElement, b: AttributeElement ): boolean {\n\tif ( a.priority < b.priority ) {\n\t\treturn true;\n\t} else if ( a.priority > b.priority ) {\n\t\treturn false;\n\t}\n\n\t// When priorities are equal and names are different - use identities.\n\treturn a.getIdentity() < b.getIdentity();\n}\n\n/**\n * Returns new position that is moved to near text node. Returns same position if there is no text node before of after\n * specified position.\n *\n * ```html\n *

foo[]

->

foo{}

\n *

[]foo

->

{}foo

\n * ```\n *\n * @returns Position located inside text node or same position if there is no text nodes\n * before or after position location.\n */\nfunction movePositionToTextNode( position: Position ): Position {\n\tconst nodeBefore = position.nodeBefore;\n\n\tif ( nodeBefore && nodeBefore.is( '$text' ) ) {\n\t\treturn new Position( nodeBefore, nodeBefore.data.length );\n\t}\n\n\tconst nodeAfter = position.nodeAfter;\n\n\tif ( nodeAfter && nodeAfter.is( '$text' ) ) {\n\t\treturn new Position( nodeAfter, 0 );\n\t}\n\n\treturn position;\n}\n\n/**\n * Breaks text node into two text nodes when possible.\n *\n * ```html\n *

foo{}bar

->

foo[]bar

\n *

{}foobar

->

[]foobar

\n *

foobar{}

->

foobar[]

\n * ```\n *\n * @param position Position that need to be placed inside text node.\n * @returns New position after breaking text node.\n */\nfunction breakTextNode( position: Position ): Position {\n\tif ( position.offset == ( position.parent as Text ).data.length ) {\n\t\treturn new Position( position.parent.parent as any, ( position.parent as Text ).index! + 1 );\n\t}\n\n\tif ( position.offset === 0 ) {\n\t\treturn new Position( position.parent.parent as any, ( position.parent as Text ).index! );\n\t}\n\n\t// Get part of the text that need to be moved.\n\tconst textToMove = ( position.parent as Text ).data.slice( position.offset );\n\n\t// Leave rest of the text in position's parent.\n\t( position.parent as Text )._data = ( position.parent as Text ).data.slice( 0, position.offset );\n\n\t// Insert new text node after position's parent text node.\n\t( position.parent.parent as any )._insertChild(\n\t\t( position.parent as Text ).index! + 1,\n\t\tnew Text( position.root.document, textToMove )\n\t);\n\n\t// Return new position between two newly created text nodes.\n\treturn new Position( position.parent.parent as any, ( position.parent as Text ).index! + 1 );\n}\n\n/**\n * Merges two text nodes into first node. Removes second node and returns merge position.\n *\n * @param t1 First text node to merge. Data from second text node will be moved at the end of this text node.\n * @param t2 Second text node to merge. This node will be removed after merging.\n * @returns Position after merging text nodes.\n */\nfunction mergeTextNodes( t1: Text, t2: Text ): Position {\n\t// Merge text data into first text node and remove second one.\n\tconst nodeBeforeLength = t1.data.length;\n\tt1._data += t2.data;\n\tt2._remove();\n\n\treturn new Position( t1, nodeBeforeLength );\n}\n\nconst validNodesToInsert = [ Text, AttributeElement, ContainerElement, EmptyElement, RawElement, UIElement ];\n\n/**\n * Checks if provided nodes are valid to insert.\n *\n * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-insert-invalid-node` when nodes to insert\n * contains instances that are not supported ones (see error description for valid ones.\n */\nfunction validateNodesToInsert( nodes: Iterable, errorContext: Document ): void {\n\tfor ( const node of nodes ) {\n\t\tif ( !validNodesToInsert.some( ( validNode => node instanceof validNode ) ) ) { // eslint-disable-line no-use-before-define\n\t\t\t/**\n\t\t\t * One of the nodes to be inserted is of an invalid type.\n\t\t\t *\n\t\t\t * Nodes to be inserted with {@link module:engine/view/downcastwriter~DowncastWriter#insert `DowncastWriter#insert()`} should be\n\t\t\t * of the following types:\n\t\t\t *\n\t\t\t * * {@link module:engine/view/attributeelement~AttributeElement AttributeElement},\n\t\t\t * * {@link module:engine/view/containerelement~ContainerElement ContainerElement},\n\t\t\t * * {@link module:engine/view/emptyelement~EmptyElement EmptyElement},\n\t\t\t * * {@link module:engine/view/uielement~UIElement UIElement},\n\t\t\t * * {@link module:engine/view/rawelement~RawElement RawElement},\n\t\t\t * * {@link module:engine/view/text~Text Text}.\n\t\t\t *\n\t\t\t * @error view-writer-insert-invalid-node-type\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-insert-invalid-node-type', errorContext );\n\t\t}\n\n\t\tif ( !node.is( '$text' ) ) {\n\t\t\tvalidateNodesToInsert( ( node as Element ).getChildren(), errorContext );\n\t\t}\n\t}\n}\n\n/**\n * Checks if node is ContainerElement or DocumentFragment, because in most cases they should be treated the same way.\n *\n * @returns Returns `true` if node is instance of ContainerElement or DocumentFragment.\n */\nfunction isContainerOrFragment( node: Node | DocumentFragment ): boolean {\n\treturn node && ( node.is( 'containerElement' ) || node.is( 'documentFragment' ) );\n}\n\n/**\n * Checks if {@link module:engine/view/range~Range#start range start} and {@link module:engine/view/range~Range#end range end} are placed\n * inside same {@link module:engine/view/containerelement~ContainerElement container element}.\n * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when validation fails.\n */\nfunction validateRangeContainer( range: Range, errorContext: Document ) {\n\tconst startContainer = getParentContainer( range.start );\n\tconst endContainer = getParentContainer( range.end );\n\n\tif ( !startContainer || !endContainer || startContainer !== endContainer ) {\n\t\t/**\n\t\t * The container of the given range is invalid.\n\t\t *\n\t\t * This may happen if {@link module:engine/view/range~Range#start range start} and\n\t\t * {@link module:engine/view/range~Range#end range end} positions are not placed inside the same container element or\n\t\t * a parent container for these positions cannot be found.\n\t\t *\n\t\t * Methods like {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#remove()`},\n\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#clean()`},\n\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#wrap()`},\n\t\t * {@link module:engine/view/downcastwriter~DowncastWriter#wrap `DowncastWriter#unwrap()`} need to be called\n\t\t * on a range that has its start and end positions located in the same container element. Both positions can be\n\t\t * nested within other elements (e.g. an attribute element) but the closest container ancestor must be the same.\n\t\t *\n\t\t * @error view-writer-invalid-range-container\n\t\t */\n\t\tthrow new CKEditorError( 'view-writer-invalid-range-container', errorContext );\n\t}\n}\n\n/**\n * Checks if two attribute elements can be joined together. Elements can be joined together if, and only if\n * they do not have ids specified.\n */\nfunction canBeJoined( a: AttributeElement, b: AttributeElement ) {\n\treturn a.id === null && b.id === null;\n}\n","/**\n * @license Copyright (c) 2003-2023, 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\nimport { keyCodes, isText, type KeystrokeInfo } from '@ckeditor/ckeditor5-utils';\nimport type View from './view';\nimport type DomEventData from './observer/domeventdata';\nimport type { ViewDocumentArrowKeyEvent } from './observer/arrowkeysobserver';\n\n/**\n * Set of utilities related to handling block and inline fillers.\n *\n * Browsers do not allow to put caret in elements which does not have height. Because of it, we need to fill all\n * empty elements which should be selectable with elements or characters called \"fillers\". Unfortunately there is no one\n * universal filler, this is why two types are uses:\n *\n * * Block filler is an element which fill block elements, like `

`. CKEditor uses `
` as a block filler during the editing,\n * as browsers do natively. So instead of an empty `

` there will be `


`. The advantage of block filler is that\n * it is transparent for the selection, so when the caret is before the `
` and user presses right arrow he will be\n * moved to the next paragraph, not after the `
`. The disadvantage is that it breaks a block, so it can not be used\n * in the middle of a line of text. The {@link module:engine/view/filler~BR_FILLER `
` filler} can be replaced with any other\n * character in the data output, for instance {@link module:engine/view/filler~NBSP_FILLER non-breaking space} or\n * {@link module:engine/view/filler~MARKED_NBSP_FILLER marked non-breaking space}.\n *\n * * Inline filler is a filler which does not break a line of text, so it can be used inside the text, for instance in the empty\n * `` surrendered by text: `foobar`, if we want to put the caret there. CKEditor uses a sequence of the zero-width\n * spaces as an {@link module:engine/view/filler~INLINE_FILLER inline filler} having the predetermined\n * {@link module:engine/view/filler~INLINE_FILLER_LENGTH length}. A sequence is used, instead of a single character to\n * avoid treating random zero-width spaces as the inline filler. Disadvantage of the inline filler is that it is not\n * transparent for the selection. The arrow key moves the caret between zero-width spaces characters, so the additional\n * code is needed to handle the caret.\n *\n * Both inline and block fillers are handled by the {@link module:engine/view/renderer~Renderer renderer} and are not present in the\n * view.\n *\n * @module engine/view/filler\n */\n\n/**\n * Non-breaking space filler creator. This function creates the ` ` text node.\n * It defines how the filler is created.\n *\n * @see module:engine/view/filler~MARKED_NBSP_FILLER\n * @see module:engine/view/filler~BR_FILLER\n */\nexport const NBSP_FILLER = ( domDocument: Document ): Text => domDocument.createTextNode( '\\u00A0' );\n\n/**\n * Marked non-breaking space filler creator. This function creates the ` ` element.\n * It defines how the filler is created.\n *\n * @see module:engine/view/filler~NBSP_FILLER\n * @see module:engine/view/filler~BR_FILLER\n */\nexport const MARKED_NBSP_FILLER = ( domDocument: Document ): HTMLSpanElement => {\n\tconst span = domDocument.createElement( 'span' );\n\tspan.dataset.ckeFiller = 'true';\n\tspan.innerText = '\\u00A0';\n\n\treturn span;\n};\n\n/**\n * `
` filler creator. This function creates the `
` element.\n * It defines how the filler is created.\n *\n * @see module:engine/view/filler~NBSP_FILLER\n * @see module:engine/view/filler~MARKED_NBSP_FILLER\n */\nexport const BR_FILLER = ( domDocument: Document ): HTMLBRElement => {\n\tconst fillerBr = domDocument.createElement( 'br' );\n\tfillerBr.dataset.ckeFiller = 'true';\n\n\treturn fillerBr;\n};\n\n/**\n * Length of the {@link module:engine/view/filler~INLINE_FILLER INLINE_FILLER}.\n */\nexport const INLINE_FILLER_LENGTH = 7;\n\n/**\n * Inline filler which is a sequence of the word joiners.\n */\nexport const INLINE_FILLER = '\\u2060'.repeat( INLINE_FILLER_LENGTH );\n\n/**\n * Checks if the node is a text node which starts with the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n *\n * ```ts\n * startsWithFiller( document.createTextNode( INLINE_FILLER ) ); // true\n * startsWithFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ); // true\n * startsWithFiller( document.createTextNode( 'foo' ) ); // false\n * startsWithFiller( document.createElement( 'p' ) ); // false\n * ```\n *\n * @param domNode DOM node.\n * @returns True if the text node starts with the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n */\nexport function startsWithFiller( domNode: Node | string ): boolean {\n\tif ( typeof domNode == 'string' ) {\n\t\treturn domNode.substr( 0, INLINE_FILLER_LENGTH ) === INLINE_FILLER;\n\t}\n\n\treturn isText( domNode ) && ( domNode.data.substr( 0, INLINE_FILLER_LENGTH ) === INLINE_FILLER );\n}\n\n/**\n * Checks if the text node contains only the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n *\n * ```ts\n * isInlineFiller( document.createTextNode( INLINE_FILLER ) ); // true\n * isInlineFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ); // false\n * ```\n *\n * @param domText DOM text node.\n * @returns True if the text node contains only the {@link module:engine/view/filler~INLINE_FILLER inline filler}.\n */\nexport function isInlineFiller( domText: Text ): boolean {\n\treturn domText.data.length == INLINE_FILLER_LENGTH && startsWithFiller( domText );\n}\n\n/**\n * Get string data from the text node, removing an {@link module:engine/view/filler~INLINE_FILLER inline filler} from it,\n * if text node contains it.\n *\n * ```ts\n * getDataWithoutFiller( document.createTextNode( INLINE_FILLER + 'foo' ) ) == 'foo' // true\n * getDataWithoutFiller( document.createTextNode( 'foo' ) ) == 'foo' // true\n * ```\n *\n * @param domText DOM text node, possible with inline filler.\n * @returns Data without filler.\n */\nexport function getDataWithoutFiller( domText: Text | string ): string {\n\tconst data = typeof domText == 'string' ? domText : domText.data;\n\n\tif ( startsWithFiller( domText ) ) {\n\t\treturn data.slice( INLINE_FILLER_LENGTH );\n\t}\n\n\treturn data;\n}\n\n/**\n * Assign key observer which move cursor from the end of the inline filler to the beginning of it when\n * the left arrow is pressed, so the filler does not break navigation.\n *\n * @param view View controller instance we should inject quirks handling on.\n */\nexport function injectQuirksHandling( view: View ): void {\n\tview.document.on( 'arrowKey', jumpOverInlineFiller, { priority: 'low' } );\n}\n\n/**\n * Move cursor from the end of the inline filler to the beginning of it when, so the filler does not break navigation.\n */\nfunction jumpOverInlineFiller( evt: unknown, data: DomEventData & KeystrokeInfo ) {\n\tif ( data.keyCode == keyCodes.arrowleft ) {\n\t\tconst domSelection = data.domTarget.ownerDocument.defaultView!.getSelection()!;\n\n\t\tif ( domSelection.rangeCount == 1 && domSelection.getRangeAt( 0 ).collapsed ) {\n\t\t\tconst domParent = domSelection.getRangeAt( 0 ).startContainer;\n\t\t\tconst domOffset = domSelection.getRangeAt( 0 ).startOffset;\n\n\t\t\tif ( startsWithFiller( domParent ) && domOffset <= INLINE_FILLER_LENGTH ) {\n\t\t\t\tdomSelection.collapse( domParent, 0 );\n\t\t\t}\n\t\t}\n\t}\n}\n","import api from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./renderer.css\";\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","/**\n * @license Copyright (c) 2003-2023, 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 * @module engine/view/renderer\n */\n\nimport ViewText from './text';\nimport ViewPosition from './position';\nimport { INLINE_FILLER, INLINE_FILLER_LENGTH, startsWithFiller, isInlineFiller } from './filler';\n\nimport {\n\tCKEditorError,\n\tObservableMixin,\n\tdiff,\n\tenv,\n\tfastDiff,\n\tinsertAt,\n\tisComment,\n\tisNode,\n\tisText,\n\tremove,\n\ttype DiffResult,\n\ttype ObservableChangeEvent\n} from '@ckeditor/ckeditor5-utils';\n\nimport type { ChangeType } from './document';\nimport type DocumentSelection from './documentselection';\nimport type DomConverter from './domconverter';\nimport type ViewElement from './element';\nimport type ViewNode from './node';\n\nimport '../../theme/renderer.css';\n\ntype DomText = globalThis.Text;\ntype DomNode = globalThis.Node;\ntype DomDocument = globalThis.Document;\ntype DomElement = globalThis.HTMLElement;\ntype DomSelection = globalThis.Selection;\n\n/**\n * Renderer is responsible for updating the DOM structure and the DOM selection based on\n * the {@link module:engine/view/renderer~Renderer#markToSync information about updated view nodes}.\n * In other words, it renders the view to the DOM.\n *\n * Its main responsibility is to make only the necessary, minimal changes to the DOM. However, unlike in many\n * virtual DOM implementations, the primary reason for doing minimal changes is not the performance but ensuring\n * that native editing features such as text composition, autocompletion, spell checking, selection's x-index are\n * affected as little as possible.\n *\n * Renderer uses {@link module:engine/view/domconverter~DomConverter} to transform view nodes and positions\n * to and from the DOM.\n */\nexport default class Renderer extends ObservableMixin() {\n\t/**\n\t * Set of DOM Documents instances.\n\t */\n\tpublic readonly domDocuments: Set = new Set();\n\n\t/**\n\t * Converter instance.\n\t */\n\tpublic readonly domConverter: DomConverter;\n\n\t/**\n\t * Set of nodes which attributes changed and may need to be rendered.\n\t */\n\tpublic readonly markedAttributes: Set = new Set();\n\n\t/**\n\t * Set of elements which child lists changed and may need to be rendered.\n\t */\n\tpublic readonly markedChildren: Set = new Set();\n\n\t/**\n\t * Set of text nodes which text data changed and may need to be rendered.\n\t */\n\tpublic readonly markedTexts: Set = new Set();\n\n\t/**\n\t * View selection. Renderer updates DOM selection based on the view selection.\n\t */\n\tpublic readonly selection: DocumentSelection;\n\n\t/**\n\t * Indicates if the view document is focused and selection can be rendered. Selection will not be rendered if\n\t * this is set to `false`.\n\t *\n\t * @observable\n\t */\n\tdeclare public readonly isFocused: boolean;\n\n\t/**\n\t * Indicates whether the user is making a selection in the document (e.g. holding the mouse button and moving the cursor).\n\t * When they stop selecting, the property goes back to `false`.\n\t *\n\t * Note: In some browsers, the renderer will stop rendering the selection and inline fillers while the user is making\n\t * a selection to avoid glitches in DOM selection\n\t * (https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723).\n\t *\n\t * @observable\n\t */\n\tdeclare public readonly isSelecting: boolean;\n\n\t/**\n\t * True if composition is in progress inside the document.\n\t *\n\t * This property is bound to the {@link module:engine/view/document~Document#isComposing `Document#isComposing`} property.\n\t *\n\t * @observable\n\t */\n\tdeclare public readonly isComposing: boolean;\n\n\t/**\n\t * The text node in which the inline filler was rendered.\n\t */\n\tprivate _inlineFiller: DomText | null = null;\n\n\t/**\n\t * DOM element containing fake selection.\n\t */\n\tprivate _fakeSelectionContainer: DomElement | null = null;\n\n\t/**\n\t * Creates a renderer instance.\n\t *\n\t * @param domConverter Converter instance.\n\t * @param selection View selection.\n\t */\n\tconstructor( domConverter: DomConverter, selection: DocumentSelection ) {\n\t\tsuper();\n\n\t\tthis.domConverter = domConverter;\n\t\tthis.selection = selection;\n\n\t\tthis.set( 'isFocused', false );\n\t\tthis.set( 'isSelecting', false );\n\n\t\t// Rendering the selection and inline filler manipulation should be postponed in (non-Android) Blink until the user finishes\n\t\t// creating the selection in DOM to avoid accidental selection collapsing\n\t\t// (https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723).\n\t\t// When the user stops selecting, all pending changes should be rendered ASAP, though.\n\t\tif ( env.isBlink && !env.isAndroid ) {\n\t\t\tthis.on( 'change:isSelecting', () => {\n\t\t\t\tif ( !this.isSelecting ) {\n\t\t\t\t\tthis.render();\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tthis.set( 'isComposing', false );\n\n\t\tthis.on( 'change:isComposing', () => {\n\t\t\tif ( !this.isComposing ) {\n\t\t\t\tthis.render();\n\t\t\t}\n\t\t} );\n\t}\n\n\t/**\n\t * Marks a view node to be updated in the DOM by {@link #render `render()`}.\n\t *\n\t * Note that only view nodes whose parents have corresponding DOM elements need to be marked to be synchronized.\n\t *\n\t * @see #markedAttributes\n\t * @see #markedChildren\n\t * @see #markedTexts\n\t *\n\t * @param type Type of the change.\n\t * @param node ViewNode to be marked.\n\t */\n\tpublic markToSync( type: ChangeType, node: ViewNode ): void {\n\t\tif ( type === 'text' ) {\n\t\t\tif ( this.domConverter.mapViewToDom( node.parent! ) ) {\n\t\t\t\tthis.markedTexts.add( node );\n\t\t\t}\n\t\t} else {\n\t\t\t// If the node has no DOM element it is not rendered yet,\n\t\t\t// its children/attributes do not need to be marked to be sync.\n\t\t\tif ( !this.domConverter.mapViewToDom( node as ViewElement ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( type === 'attributes' ) {\n\t\t\t\tthis.markedAttributes.add( node as ViewElement );\n\t\t\t} else if ( type === 'children' ) {\n\t\t\t\tthis.markedChildren.add( node as ViewElement );\n\t\t\t} else {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t\t\t\tconst unreachable: never = type;\n\n\t\t\t\t/**\n\t\t\t\t * Unknown type passed to Renderer.markToSync.\n\t\t\t\t *\n\t\t\t\t * @error view-renderer-unknown-type\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'view-renderer-unknown-type', this );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Renders all buffered changes ({@link #markedAttributes}, {@link #markedChildren} and {@link #markedTexts}) and\n\t * the current view selection (if needed) to the DOM by applying a minimal set of changes to it.\n\t *\n\t * Renderer tries not to break the text composition (e.g. IME) and x-index of the selection,\n\t * so it does as little as it is needed to update the DOM.\n\t *\n\t * Renderer also handles {@link module:engine/view/filler fillers}. Especially, it checks if the inline filler is needed\n\t * at the selection position and adds or removes it. To prevent breaking text composition inline filler will not be\n\t * removed as long as the selection is in the text node which needed it at first.\n\t */\n\tpublic render(): void {\n\t\t// Ignore rendering while in the composition mode. Composition events are not cancellable and browser will modify the DOM tree.\n\t\t// All marked elements, attributes, etc. will wait until next render after the composition ends.\n\t\t// On Android composition events are immediately applied to the model, so we don't need to skip rendering,\n\t\t// and we should not do it because the difference between view and DOM could lead to position mapping problems.\n\t\tif ( this.isComposing && !env.isAndroid ) {\n\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( '%c[Renderer]%c Rendering aborted while isComposing',\n\t\t\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', ''\n\t\t\t// @if CK_DEBUG_TYPING // \t);\n\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\treturn;\n\t\t}\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.group( '%c[Renderer]%c Rendering',\n\t\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', ''\n\t\t// @if CK_DEBUG_TYPING // \t);\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\tlet inlineFillerPosition: ViewPosition | null = null;\n\t\tconst isInlineFillerRenderingPossible = env.isBlink && !env.isAndroid ? !this.isSelecting : true;\n\n\t\t// Refresh mappings.\n\t\tfor ( const element of this.markedChildren ) {\n\t\t\tthis._updateChildrenMappings( element );\n\t\t}\n\n\t\t// Don't manipulate inline fillers while the selection is being made in (non-Android) Blink to prevent accidental\n\t\t// DOM selection collapsing\n\t\t// (https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723).\n\t\tif ( isInlineFillerRenderingPossible ) {\n\t\t\t// There was inline filler rendered in the DOM but it's not\n\t\t\t// at the selection position any more, so we can remove it\n\t\t\t// (cause even if it's needed, it must be placed in another location).\n\t\t\tif ( this._inlineFiller && !this._isSelectionInInlineFiller() ) {\n\t\t\t\tthis._removeInlineFiller();\n\t\t\t}\n\n\t\t\t// If we've got the filler, let's try to guess its position in the view.\n\t\t\tif ( this._inlineFiller ) {\n\t\t\t\tinlineFillerPosition = this._getInlineFillerPosition();\n\t\t\t}\n\t\t\t// Otherwise, if it's needed, create it at the selection position.\n\t\t\telse if ( this._needsInlineFillerAtSelection() ) {\n\t\t\t\tinlineFillerPosition = this.selection.getFirstPosition()!;\n\n\t\t\t\t// Do not use `markToSync` so it will be added even if the parent is already added.\n\t\t\t\tthis.markedChildren.add( inlineFillerPosition.parent as ViewElement );\n\t\t\t}\n\t\t}\n\t\t// Make sure the inline filler has any parent, so it can be mapped to view position by DomConverter.\n\t\telse if ( this._inlineFiller && this._inlineFiller.parentNode ) {\n\t\t\t// While the user is making selection, preserve the inline filler at its original position.\n\t\t\tinlineFillerPosition = this.domConverter.domPositionToView( this._inlineFiller )!;\n\n\t\t\t// While down-casting the document selection attributes, all existing empty\n\t\t\t// attribute elements (for selection position) are removed from the view and DOM,\n\t\t\t// so make sure that we were able to map filler position.\n\t\t\t// https://github.com/ckeditor/ckeditor5/issues/12026\n\t\t\tif ( inlineFillerPosition && inlineFillerPosition.parent.is( '$text' ) ) {\n\t\t\t\t// The inline filler position is expected to be before the text node.\n\t\t\t\tinlineFillerPosition = ViewPosition._createBefore( inlineFillerPosition.parent );\n\t\t\t}\n\t\t}\n\n\t\tfor ( const element of this.markedAttributes ) {\n\t\t\tthis._updateAttrs( element );\n\t\t}\n\n\t\tfor ( const element of this.markedChildren ) {\n\t\t\tthis._updateChildren( element, { inlineFillerPosition } );\n\t\t}\n\n\t\tfor ( const node of this.markedTexts ) {\n\t\t\tif ( !this.markedChildren.has( node.parent as ViewElement ) && this.domConverter.mapViewToDom( node.parent as ViewElement ) ) {\n\t\t\t\tthis._updateText( node as ViewText, { inlineFillerPosition } );\n\t\t\t}\n\t\t}\n\n\t\t// * Check whether the inline filler is required and where it really is in the DOM.\n\t\t// At this point in most cases it will be in the DOM, but there are exceptions.\n\t\t// For example, if the inline filler was deep in the created DOM structure, it will not be created.\n\t\t// Similarly, if it was removed at the beginning of this function and then neither text nor children were updated,\n\t\t// it will not be present. Fix those and similar scenarios.\n\t\t// * Don't manipulate inline fillers while the selection is being made in (non-Android) Blink to prevent accidental\n\t\t// DOM selection collapsing\n\t\t// (https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723).\n\t\tif ( isInlineFillerRenderingPossible ) {\n\t\t\tif ( inlineFillerPosition ) {\n\t\t\t\tconst fillerDomPosition = this.domConverter.viewPositionToDom( inlineFillerPosition )!;\n\t\t\t\tconst domDocument = fillerDomPosition.parent.ownerDocument!;\n\n\t\t\t\tif ( !startsWithFiller( fillerDomPosition.parent ) ) {\n\t\t\t\t\t// Filler has not been created at filler position. Create it now.\n\t\t\t\t\tthis._inlineFiller = addInlineFiller( domDocument, fillerDomPosition.parent, fillerDomPosition.offset );\n\t\t\t\t} else {\n\t\t\t\t\t// Filler has been found, save it.\n\t\t\t\t\tthis._inlineFiller = fillerDomPosition.parent as DomText;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// There is no filler needed.\n\t\t\t\tthis._inlineFiller = null;\n\t\t\t}\n\t\t}\n\n\t\t// First focus the new editing host, then update the selection.\n\t\t// Otherwise, FF may throw an error (https://github.com/ckeditor/ckeditor5/issues/721).\n\t\tthis._updateFocus();\n\t\tthis._updateSelection();\n\n\t\tthis.markedTexts.clear();\n\t\tthis.markedAttributes.clear();\n\t\tthis.markedChildren.clear();\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t// @if CK_DEBUG_TYPING // }\n\t}\n\n\t/**\n\t * Updates mappings of view element's children.\n\t *\n\t * Children that were replaced in the view structure by similar elements (same tag name) are treated as 'replaced'.\n\t * This means that their mappings can be updated so the new view elements are mapped to the existing DOM elements.\n\t * Thanks to that these elements do not need to be re-rendered completely.\n\t *\n\t * @param viewElement The view element whose children mappings will be updated.\n\t */\n\tprivate _updateChildrenMappings( viewElement: ViewElement ): void {\n\t\tconst domElement = this.domConverter.mapViewToDom( viewElement );\n\n\t\tif ( !domElement ) {\n\t\t\t// If there is no `domElement` it means that it was already removed from DOM and there is no need to process it.\n\t\t\treturn;\n\t\t}\n\n\t\t// Removing nodes from the DOM as we iterate can cause `actualDomChildren`\n\t\t// (which is a live-updating `NodeList`) to get out of sync with the\n\t\t// indices that we compute as we iterate over `actions`.\n\t\t// This would produce incorrect element mappings.\n\t\t//\n\t\t// Converting live list to an array to make the list static.\n\t\tconst actualDomChildren = Array.from(\n\t\t\tthis.domConverter.mapViewToDom( viewElement )!.childNodes\n\t\t);\n\t\tconst expectedDomChildren = Array.from(\n\t\t\tthis.domConverter.viewChildrenToDom( viewElement, { withChildren: false } )\n\t\t);\n\t\tconst diff = this._diffNodeLists( actualDomChildren, expectedDomChildren );\n\t\tconst actions = this._findUpdateActions( diff, actualDomChildren, expectedDomChildren, areSimilarElements );\n\n\t\tif ( actions.indexOf( 'update' ) !== -1 ) {\n\t\t\tconst counter = { equal: 0, insert: 0, delete: 0 };\n\n\t\t\tfor ( const action of actions ) {\n\t\t\t\tif ( action === 'update' ) {\n\t\t\t\t\tconst insertIndex = counter.equal + counter.insert;\n\t\t\t\t\tconst deleteIndex = counter.equal + counter.delete;\n\t\t\t\t\tconst viewChild = viewElement.getChild( insertIndex );\n\n\t\t\t\t\t// UIElement and RawElement are special cases. Their children are not stored in a view (#799)\n\t\t\t\t\t// so we cannot use them with replacing flow (since they use view children during rendering\n\t\t\t\t\t// which will always result in rendering empty elements).\n\t\t\t\t\tif ( viewChild && !( viewChild.is( 'uiElement' ) || viewChild.is( 'rawElement' ) ) ) {\n\t\t\t\t\t\tthis._updateElementMappings( viewChild as ViewElement, actualDomChildren[ deleteIndex ] as DomElement );\n\t\t\t\t\t}\n\n\t\t\t\t\tremove( expectedDomChildren[ insertIndex ] );\n\t\t\t\t\tcounter.equal++;\n\t\t\t\t} else {\n\t\t\t\t\tcounter[ action ]++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Updates mappings of a given view element.\n\t *\n\t * @param viewElement The view element whose mappings will be updated.\n\t * @param domElement The DOM element representing the given view element.\n\t */\n\tprivate _updateElementMappings( viewElement: ViewElement, domElement: DomElement ): void {\n\t\t// Remap 'DomConverter' bindings.\n\t\tthis.domConverter.unbindDomElement( domElement );\n\t\tthis.domConverter.bindElements( domElement, viewElement );\n\n\t\t// View element may have children which needs to be updated, but are not marked, mark them to update.\n\t\tthis.markedChildren.add( viewElement );\n\n\t\t// Because we replace new view element mapping with the existing one, the corresponding DOM element\n\t\t// will not be rerendered. The new view element may have different attributes than the previous one.\n\t\t// Since its corresponding DOM element will not be rerendered, new attributes will not be added\n\t\t// to the DOM, so we need to mark it here to make sure its attributes gets updated. See #1427 for more\n\t\t// detailed case study.\n\t\t// Also there are cases where replaced element is removed from the view structure and then has\n\t\t// its attributes changed or removed. In such cases the element will not be present in `markedAttributes`\n\t\t// and also may be the same (`element.isSimilar()`) as the reused element not having its attributes updated.\n\t\t// To prevent such situations we always mark reused element to have its attributes rerenderd (#1560).\n\t\tthis.markedAttributes.add( viewElement );\n\t}\n\n\t/**\n\t * Gets the position of the inline filler based on the current selection.\n\t * Here, we assume that we know that the filler is needed and\n\t * {@link #_isSelectionInInlineFiller is at the selection position}, and, since it is needed,\n\t * it is somewhere at the selection position.\n\t *\n\t * Note: The filler position cannot be restored based on the filler's DOM text node, because\n\t * when this method is called (before rendering), the bindings will often be broken. View-to-DOM\n\t * bindings are only dependable after rendering.\n\t */\n\tprivate _getInlineFillerPosition(): ViewPosition {\n\t\tconst firstPos = this.selection.getFirstPosition()!;\n\n\t\tif ( firstPos.parent.is( '$text' ) ) {\n\t\t\treturn ViewPosition._createBefore( firstPos.parent );\n\t\t} else {\n\t\t\treturn firstPos;\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` if the selection has not left the inline filler's text node.\n\t * If it is `true`, it means that the filler had been added for a reason and the selection did not\n\t * leave the filler's text node. For example, the user can be in the middle of a composition so it should not be touched.\n\t *\n\t * @returns `true` if the inline filler and selection are in the same place.\n\t */\n\tprivate _isSelectionInInlineFiller(): boolean {\n\t\tif ( this.selection.rangeCount != 1 || !this.selection.isCollapsed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Note, we can't check if selection's position equals position of the\n\t\t// this._inlineFiller node, because of #663. We may not be able to calculate\n\t\t// the filler's position in the view at this stage.\n\t\t// Instead, we check it the other way – whether selection is anchored in\n\t\t// that text node or next to it.\n\n\t\t// Possible options are:\n\t\t// \"FILLER{}\"\n\t\t// \"FILLERadded-text{}\"\n\t\tconst selectionPosition = this.selection.getFirstPosition()!;\n\t\tconst position = this.domConverter.viewPositionToDom( selectionPosition );\n\n\t\tif ( position && isText( position.parent ) && startsWithFiller( position.parent ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * Removes the inline filler.\n\t */\n\tprivate _removeInlineFiller(): void {\n\t\tconst domFillerNode = this._inlineFiller!;\n\n\t\t// Something weird happened and the stored node doesn't contain the filler's text.\n\t\tif ( !startsWithFiller( domFillerNode ) ) {\n\t\t\t/**\n\t\t\t * The inline filler node was lost. Most likely, something overwrote the filler text node\n\t\t\t * in the DOM.\n\t\t\t *\n\t\t\t * @error view-renderer-filler-was-lost\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-renderer-filler-was-lost', this );\n\t\t}\n\n\t\tif ( isInlineFiller( domFillerNode ) ) {\n\t\t\tdomFillerNode.remove();\n\t\t} else {\n\t\t\tdomFillerNode.data = domFillerNode.data.substr( INLINE_FILLER_LENGTH );\n\t\t}\n\n\t\tthis._inlineFiller = null;\n\t}\n\n\t/**\n\t * Checks if the inline {@link module:engine/view/filler filler} should be added.\n\t *\n\t * @returns `true` if the inline filler should be added.\n\t */\n\tprivate _needsInlineFillerAtSelection(): boolean {\n\t\tif ( this.selection.rangeCount != 1 || !this.selection.isCollapsed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst selectionPosition = this.selection.getFirstPosition()!;\n\t\tconst selectionParent = selectionPosition.parent;\n\t\tconst selectionOffset = selectionPosition.offset;\n\n\t\t// If there is no DOM root we do not care about fillers.\n\t\tif ( !this.domConverter.mapViewToDom( selectionParent.root ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !( selectionParent.is( 'element' ) ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Prevent adding inline filler inside elements with contenteditable=false.\n\t\t// https://github.com/ckeditor/ckeditor5-engine/issues/1170\n\t\tif ( !isEditable( selectionParent ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// We have block filler, we do not need inline one.\n\t\tif ( selectionOffset === selectionParent.getFillerOffset!() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst nodeBefore = selectionPosition.nodeBefore;\n\t\tconst nodeAfter = selectionPosition.nodeAfter;\n\n\t\tif ( nodeBefore instanceof ViewText || nodeAfter instanceof ViewText ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Do not use inline filler while typing outside inline elements on Android.\n\t\t// The deleteContentBackward would remove part of the inline filler instead of removing last letter in a link.\n\t\tif ( env.isAndroid && ( nodeBefore || nodeAfter ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks if text needs to be updated and possibly updates it.\n\t *\n\t * @param viewText View text to update.\n\t * @param options.inlineFillerPosition The position where the inline filler should be rendered.\n\t */\n\tprivate _updateText( viewText: ViewText, options: { inlineFillerPosition?: ViewPosition | null } ) {\n\t\tconst domText = this.domConverter.findCorrespondingDomText( viewText )!;\n\t\tconst newDomText = this.domConverter.viewToDom( viewText ) as DomText;\n\n\t\tlet expectedText = newDomText.data;\n\t\tconst filler = options.inlineFillerPosition;\n\n\t\tif ( filler && filler.parent == viewText.parent && filler.offset == viewText.index ) {\n\t\t\texpectedText = INLINE_FILLER + expectedText;\n\t\t}\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.group( '%c[Renderer]%c Update text',\n\t\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', ''\n\t\t// @if CK_DEBUG_TYPING // \t);\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\tupdateTextNode( domText, expectedText );\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t// @if CK_DEBUG_TYPING // }\n\t}\n\n\t/**\n\t * Checks if attribute list needs to be updated and possibly updates it.\n\t *\n\t * @param viewElement The view element to update.\n\t */\n\tprivate _updateAttrs( viewElement: ViewElement ): void {\n\t\tconst domElement = this.domConverter.mapViewToDom( viewElement );\n\n\t\tif ( !domElement ) {\n\t\t\t// If there is no `domElement` it means that 'viewElement' is outdated as its mapping was updated\n\t\t\t// in 'this._updateChildrenMappings()'. There is no need to process it as new view element which\n\t\t\t// replaced old 'viewElement' mapping was also added to 'this.markedAttributes'\n\t\t\t// in 'this._updateChildrenMappings()' so it will be processed separately.\n\t\t\treturn;\n\t\t}\n\n\t\tconst domAttrKeys = Array.from( ( domElement as DomElement ).attributes ).map( attr => attr.name );\n\t\tconst viewAttrKeys = viewElement.getAttributeKeys();\n\n\t\t// Add or overwrite attributes.\n\t\tfor ( const key of viewAttrKeys ) {\n\t\t\tthis.domConverter.setDomElementAttribute( domElement as DomElement, key, viewElement.getAttribute( key )!, viewElement );\n\t\t}\n\n\t\t// Remove from DOM attributes which do not exists in the view.\n\t\tfor ( const key of domAttrKeys ) {\n\t\t\t// All other attributes not present in the DOM should be removed.\n\t\t\tif ( !viewElement.hasAttribute( key ) ) {\n\t\t\t\tthis.domConverter.removeDomElementAttribute( domElement as DomElement, key );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if elements child list needs to be updated and possibly updates it.\n\t *\n\t * Note that on Android, to reduce the risk of composition breaks, it tries to update data of an existing\n\t * child text nodes instead of replacing them completely.\n\t *\n\t * @param viewElement View element to update.\n\t * @param options.inlineFillerPosition The position where the inline filler should be rendered.\n\t */\n\tprivate _updateChildren( viewElement: ViewElement, options: { inlineFillerPosition: ViewPosition | null } ) {\n\t\tconst domElement = this.domConverter.mapViewToDom( viewElement );\n\n\t\tif ( !domElement ) {\n\t\t\t// If there is no `domElement` it means that it was already removed from DOM.\n\t\t\t// There is no need to process it. It will be processed when re-inserted.\n\t\t\treturn;\n\t\t}\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.group( '%c[Renderer]%c Update children',\n\t\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', ''\n\t\t// @if CK_DEBUG_TYPING // \t);\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t// IME on Android inserts a new text node while typing after a link\n\t\t// instead of updating an existing text node that follows the link.\n\t\t// We must normalize those text nodes so the diff won't get confused.\n\t\t// https://github.com/ckeditor/ckeditor5/issues/12574.\n\t\tif ( env.isAndroid ) {\n\t\t\tlet previousDomNode = null;\n\n\t\t\tfor ( const domNode of Array.from( domElement.childNodes ) ) {\n\t\t\t\tif ( previousDomNode && isText( previousDomNode ) && isText( domNode ) ) {\n\t\t\t\t\tdomElement.normalize();\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tpreviousDomNode = domNode;\n\t\t\t}\n\t\t}\n\n\t\tconst inlineFillerPosition = options.inlineFillerPosition;\n\t\tconst actualDomChildren = domElement.childNodes;\n\t\tconst expectedDomChildren = Array.from(\n\t\t\tthis.domConverter.viewChildrenToDom( viewElement, { bind: true } )\n\t\t);\n\n\t\t// Inline filler element has to be created as it is present in the DOM, but not in the view. It is required\n\t\t// during diffing so text nodes could be compared correctly and also during rendering to maintain\n\t\t// proper order and indexes while updating the DOM.\n\t\tif ( inlineFillerPosition && inlineFillerPosition.parent === viewElement ) {\n\t\t\taddInlineFiller( ( domElement as DomElement ).ownerDocument, expectedDomChildren, inlineFillerPosition.offset );\n\t\t}\n\n\t\tconst diff = this._diffNodeLists( actualDomChildren, expectedDomChildren );\n\n\t\t// We need to make sure that we update the existing text node and not replace it with another one.\n\t\t// The composition and different \"language\" browser extensions are fragile to text node being completely replaced.\n\t\tconst actions = this._findUpdateActions( diff, actualDomChildren, expectedDomChildren, areTextNodes );\n\n\t\tlet i = 0;\n\t\tconst nodesToUnbind: Set = new Set();\n\n\t\t// Handle deletions first.\n\t\t// This is to prevent a situation where an element that already exists in `actualDomChildren` is inserted at a different\n\t\t// index in `actualDomChildren`. Since `actualDomChildren` is a `NodeList`, this works like move, not like an insert,\n\t\t// and it disrupts the whole algorithm. See https://github.com/ckeditor/ckeditor5/issues/6367.\n\t\t//\n\t\t// It doesn't matter in what order we remove or add nodes, as long as we remove and add correct nodes at correct indexes.\n\t\tfor ( const action of actions ) {\n\t\t\tif ( action === 'delete' ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( '%c[Renderer]%c Remove node',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', '', actualDomChildren[ i ]\n\t\t\t\t// @if CK_DEBUG_TYPING // \t);\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t\t\tnodesToUnbind.add( actualDomChildren[ i ] as DomElement );\n\t\t\t\tremove( actualDomChildren[ i ] );\n\t\t\t} else if ( action === 'equal' || action === 'update' ) {\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\n\t\ti = 0;\n\n\t\tfor ( const action of actions ) {\n\t\t\tif ( action === 'insert' ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.info( '%c[Renderer]%c Insert node',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', '', expectedDomChildren[ i ]\n\t\t\t\t// @if CK_DEBUG_TYPING // \t);\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t\tinsertAt( domElement as DomElement, i, expectedDomChildren[ i ] );\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t// Update the existing text node data. Note that replace action is generated only for Android for now.\n\t\t\telse if ( action === 'update' ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.group( '%c[Renderer]%c Update text node',\n\t\t\t\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', ''\n\t\t\t\t// @if CK_DEBUG_TYPING // \t);\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\n\t\t\t\tupdateTextNode( actualDomChildren[ i ] as DomText, ( expectedDomChildren[ i ] as DomText ).data );\n\t\t\t\ti++;\n\n\t\t\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t\t\t// @if CK_DEBUG_TYPING // }\n\t\t\t} else if ( action === 'equal' ) {\n\t\t\t\t// Force updating text nodes inside elements which did not change and do not need to be re-rendered (#1125).\n\t\t\t\t// Do it here (not in the loop above) because only after insertions the `i` index is correct.\n\t\t\t\tthis._markDescendantTextToSync( this.domConverter.domToView( expectedDomChildren[ i ] ) as any );\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\n\t\t// Unbind removed nodes. When node does not have a parent it means that it was removed from DOM tree during\n\t\t// comparison with the expected DOM. We don't need to check child nodes, because if child node was reinserted,\n\t\t// it was moved to DOM tree out of the removed node.\n\t\tfor ( const node of nodesToUnbind ) {\n\t\t\tif ( !node.parentNode ) {\n\t\t\t\tthis.domConverter.unbindDomElement( node as DomElement );\n\t\t\t}\n\t\t}\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.groupEnd();\n\t\t// @if CK_DEBUG_TYPING // }\n\t}\n\n\t/**\n\t * Shorthand for diffing two arrays or node lists of DOM nodes.\n\t *\n\t * @param actualDomChildren Actual DOM children\n\t * @param expectedDomChildren Expected DOM children.\n\t * @returns The list of actions based on the {@link module:utils/diff~diff} function.\n\t */\n\tprivate _diffNodeLists( actualDomChildren: Array | NodeList, expectedDomChildren: Array | NodeList ) {\n\t\tactualDomChildren = filterOutFakeSelectionContainer( actualDomChildren, this._fakeSelectionContainer );\n\n\t\treturn diff( actualDomChildren, expectedDomChildren, sameNodes.bind( null, this.domConverter ) );\n\t}\n\n\t/**\n\t * Finds DOM nodes that were replaced with the similar nodes (same tag name) in the view. All nodes are compared\n\t * within one `insert`/`delete` action group, for example:\n\t *\n\t * ```\n\t * Actual DOM:\t\t

FooBarBazBax

\n\t * Expected DOM:\t

Bar123Baz456

\n\t * Input actions:\t[ insert, insert, delete, delete, equal, insert, delete ]\n\t * Output actions:\t[ insert, replace, delete, equal, replace ]\n\t * ```\n\t *\n\t * @param actions Actions array which is a result of the {@link module:utils/diff~diff} function.\n\t * @param actualDom Actual DOM children\n\t * @param expectedDom Expected DOM children.\n\t * @param comparator A comparator function that should return `true` if the given node should be reused\n\t * (either by the update of a text node data or an element children list for similar elements).\n\t * @returns Actions array modified with the `update` actions.\n\t */\n\tprivate _findUpdateActions(\n\t\tactions: Array,\n\t\tactualDom: Array | NodeList,\n\t\texpectedDom: Array,\n\t\tcomparator: ( a: DomNode, b: DomNode ) => boolean\n\t): Array {\n\t\t// If there is no both 'insert' and 'delete' actions, no need to check for replaced elements.\n\t\tif ( actions.indexOf( 'insert' ) === -1 || actions.indexOf( 'delete' ) === -1 ) {\n\t\t\treturn actions;\n\t\t}\n\n\t\tlet newActions: Array = [];\n\t\tlet actualSlice = [];\n\t\tlet expectedSlice = [];\n\n\t\tconst counter = { equal: 0, insert: 0, delete: 0 };\n\n\t\tfor ( const action of actions ) {\n\t\t\tif ( action === 'insert' ) {\n\t\t\t\texpectedSlice.push( expectedDom[ counter.equal + counter.insert ] );\n\t\t\t} else if ( action === 'delete' ) {\n\t\t\t\tactualSlice.push( actualDom[ counter.equal + counter.delete ] );\n\t\t\t} else { // equal\n\t\t\t\tnewActions = newActions.concat(\n\t\t\t\t\tdiff( actualSlice, expectedSlice, comparator )\n\t\t\t\t\t\t.map( action => action === 'equal' ? 'update' : action )\n\t\t\t\t);\n\n\t\t\t\tnewActions.push( 'equal' );\n\n\t\t\t\t// Reset stored elements on 'equal'.\n\t\t\t\tactualSlice = [];\n\t\t\t\texpectedSlice = [];\n\t\t\t}\n\t\t\tcounter[ action ]++;\n\t\t}\n\n\t\treturn newActions.concat(\n\t\t\tdiff( actualSlice, expectedSlice, comparator )\n\t\t\t\t.map( action => action === 'equal' ? 'update' : action )\n\t\t);\n\t}\n\n\t/**\n\t * Marks text nodes to be synchronized.\n\t *\n\t * If a text node is passed, it will be marked. If an element is passed, all descendant text nodes inside it will be marked.\n\t *\n\t * @param viewNode View node to sync.\n\t */\n\tprivate _markDescendantTextToSync( viewNode: ViewNode | undefined ): void {\n\t\tif ( !viewNode ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( viewNode.is( '$text' ) ) {\n\t\t\tthis.markedTexts.add( viewNode );\n\t\t} else if ( viewNode.is( 'element' ) ) {\n\t\t\tfor ( const child of viewNode.getChildren() ) {\n\t\t\t\tthis._markDescendantTextToSync( child );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the selection needs to be updated and possibly updates it.\n\t */\n\tprivate _updateSelection(): void {\n\t\t// Block updating DOM selection in (non-Android) Blink while the user is selecting to prevent accidental selection collapsing.\n\t\t// Note: Structural changes in DOM must trigger selection rendering, though. Nodes the selection was anchored\n\t\t// to, may disappear in DOM which would break the selection (e.g. in real-time collaboration scenarios).\n\t\t// https://github.com/ckeditor/ckeditor5/issues/10562, https://github.com/ckeditor/ckeditor5/issues/10723\n\t\tif ( env.isBlink && !env.isAndroid && this.isSelecting && !this.markedChildren.size ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there is no selection - remove DOM and fake selections.\n\t\tif ( this.selection.rangeCount === 0 ) {\n\t\t\tthis._removeDomSelection();\n\t\t\tthis._removeFakeSelection();\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst domRoot = this.domConverter.mapViewToDom( this.selection.editableElement! );\n\n\t\t// Do nothing if there is no focus, or there is no DOM element corresponding to selection's editable element.\n\t\tif ( !this.isFocused || !domRoot ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Render fake selection - create the fake selection container (if needed) and move DOM selection to it.\n\t\tif ( this.selection.isFake ) {\n\t\t\tthis._updateFakeSelection( domRoot );\n\t\t}\n\t\t// There was a fake selection so remove it and update the DOM selection.\n\t\t// This is especially important on Android because otherwise IME will try to compose over the fake selection container.\n\t\telse if ( this._fakeSelectionContainer && this._fakeSelectionContainer.isConnected ) {\n\t\t\tthis._removeFakeSelection();\n\t\t\tthis._updateDomSelection( domRoot );\n\t\t}\n\t\t// Update the DOM selection in case of a plain selection change (no fake selection is involved).\n\t\t// On non-Android the whole rendering is disabled in composition mode (including DOM selection update),\n\t\t// but updating DOM selection should be also disabled on Android if in the middle of the composition\n\t\t// (to not interrupt it).\n\t\telse if ( !( this.isComposing && env.isAndroid ) ) {\n\t\t\tthis._updateDomSelection( domRoot );\n\t\t}\n\t}\n\n\t/**\n\t * Updates the fake selection.\n\t *\n\t * @param domRoot A valid DOM root where the fake selection container should be added.\n\t */\n\tprivate _updateFakeSelection( domRoot: DomElement ): void {\n\t\tconst domDocument = domRoot.ownerDocument;\n\n\t\tif ( !this._fakeSelectionContainer ) {\n\t\t\tthis._fakeSelectionContainer = createFakeSelectionContainer( domDocument );\n\t\t}\n\n\t\tconst container = this._fakeSelectionContainer;\n\n\t\t// Bind fake selection container with the current selection *position*.\n\t\tthis.domConverter.bindFakeSelection( container, this.selection );\n\n\t\tif ( !this._fakeSelectionNeedsUpdate( domRoot ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !container.parentElement || container.parentElement != domRoot ) {\n\t\t\tdomRoot.appendChild( container );\n\t\t}\n\n\t\tcontainer.textContent = this.selection.fakeSelectionLabel || '\\u00A0';\n\n\t\tconst domSelection = domDocument.getSelection()!;\n\t\tconst domRange = domDocument.createRange();\n\n\t\tdomSelection.removeAllRanges();\n\t\tdomRange.selectNodeContents( container );\n\t\tdomSelection.addRange( domRange );\n\t}\n\n\t/**\n\t * Updates the DOM selection.\n\t *\n\t * @param domRoot A valid DOM root where the DOM selection should be rendered.\n\t */\n\tprivate _updateDomSelection( domRoot: DomElement ) {\n\t\tconst domSelection = domRoot.ownerDocument.defaultView!.getSelection()!;\n\n\t\t// Let's check whether DOM selection needs updating at all.\n\t\tif ( !this._domSelectionNeedsUpdate( domSelection ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Multi-range selection is not available in most browsers, and, at least in Chrome, trying to\n\t\t// set such selection, that is not continuous, throws an error. Because of that, we will just use anchor\n\t\t// and focus of view selection.\n\t\t// Since we are not supporting multi-range selection, we also do not need to check if proper editable is\n\t\t// selected. If there is any editable selected, it is okay (editable is taken from selection anchor).\n\t\tconst anchor = this.domConverter.viewPositionToDom( this.selection.anchor! )!;\n\t\tconst focus = this.domConverter.viewPositionToDom( this.selection.focus! )!;\n\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.info( '%c[Renderer]%c Update DOM selection:',\n\t\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', '', anchor, focus\n\t\t// @if CK_DEBUG_TYPING // \t);\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\tdomSelection.setBaseAndExtent( anchor.parent, anchor.offset, focus.parent, focus.offset );\n\n\t\t// Firefox–specific hack (https://github.com/ckeditor/ckeditor5-engine/issues/1439).\n\t\tif ( env.isGecko ) {\n\t\t\tfixGeckoSelectionAfterBr( focus, domSelection );\n\t\t}\n\t}\n\n\t/**\n\t * Checks whether a given DOM selection needs to be updated.\n\t *\n\t * @param domSelection The DOM selection to check.\n\t */\n\tprivate _domSelectionNeedsUpdate( domSelection: Selection ): boolean {\n\t\tif ( !this.domConverter.isDomSelectionCorrect( domSelection ) ) {\n\t\t\t// Current DOM selection is in incorrect position. We need to update it.\n\t\t\treturn true;\n\t\t}\n\n\t\tconst oldViewSelection = domSelection && this.domConverter.domSelectionToView( domSelection );\n\n\t\tif ( oldViewSelection && this.selection.isEqual( oldViewSelection ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If selection is not collapsed, it does not need to be updated if it is similar.\n\t\tif ( !this.selection.isCollapsed && this.selection.isSimilar( oldViewSelection ) ) {\n\t\t\t// Selection did not changed and is correct, do not update.\n\t\t\treturn false;\n\t\t}\n\n\t\t// Selections are not similar.\n\t\treturn true;\n\t}\n\n\t/**\n\t * Checks whether the fake selection needs to be updated.\n\t *\n\t * @param domRoot A valid DOM root where a new fake selection container should be added.\n\t */\n\tprivate _fakeSelectionNeedsUpdate( domRoot: DomElement ): boolean {\n\t\tconst container = this._fakeSelectionContainer;\n\t\tconst domSelection = domRoot.ownerDocument.getSelection()!;\n\n\t\t// Fake selection needs to be updated if there's no fake selection container, or the container currently sits\n\t\t// in a different root.\n\t\tif ( !container || container.parentElement !== domRoot ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Make sure that the selection actually is within the fake selection.\n\t\tif ( domSelection.anchorNode !== container && !container.contains( domSelection.anchorNode ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn container.textContent !== this.selection.fakeSelectionLabel;\n\t}\n\n\t/**\n\t * Removes the DOM selection.\n\t */\n\tprivate _removeDomSelection(): void {\n\t\tfor ( const doc of this.domDocuments ) {\n\t\t\tconst domSelection = doc.getSelection()!;\n\n\t\t\tif ( domSelection.rangeCount ) {\n\t\t\t\tconst activeDomElement = doc.activeElement!;\n\t\t\t\tconst viewElement = this.domConverter.mapDomToView( activeDomElement as DomElement );\n\n\t\t\t\tif ( activeDomElement && viewElement ) {\n\t\t\t\t\tdomSelection.removeAllRanges();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Removes the fake selection.\n\t */\n\tprivate _removeFakeSelection(): void {\n\t\tconst container = this._fakeSelectionContainer;\n\n\t\tif ( container ) {\n\t\t\tcontainer.remove();\n\t\t}\n\t}\n\n\t/**\n\t * Checks if focus needs to be updated and possibly updates it.\n\t */\n\tprivate _updateFocus(): void {\n\t\tif ( this.isFocused ) {\n\t\t\tconst editable = this.selection.editableElement;\n\n\t\t\tif ( editable ) {\n\t\t\t\tthis.domConverter.focus( editable );\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Checks if provided element is editable.\n */\nfunction isEditable( element: ViewElement ): boolean {\n\tif ( element.getAttribute( 'contenteditable' ) == 'false' ) {\n\t\treturn false;\n\t}\n\n\tconst parent = element.findAncestor( element => element.hasAttribute( 'contenteditable' ) );\n\n\treturn !parent || parent.getAttribute( 'contenteditable' ) == 'true';\n}\n\n/**\n * Adds inline filler at a given position.\n *\n * The position can be given as an array of DOM nodes and an offset in that array,\n * or a DOM parent element and an offset in that element.\n *\n * @returns The DOM text node that contains an inline filler.\n */\nfunction addInlineFiller( domDocument: DomDocument, domParentOrArray: DomNode | Array, offset: number ): DomText {\n\tconst childNodes = domParentOrArray instanceof Array ? domParentOrArray : domParentOrArray.childNodes;\n\tconst nodeAfterFiller = childNodes[ offset ];\n\n\tif ( isText( nodeAfterFiller ) ) {\n\t\tnodeAfterFiller.data = INLINE_FILLER + nodeAfterFiller.data;\n\n\t\treturn nodeAfterFiller;\n\t} else {\n\t\tconst fillerNode = domDocument.createTextNode( INLINE_FILLER );\n\n\t\tif ( Array.isArray( domParentOrArray ) ) {\n\t\t\t( childNodes as Array ).splice( offset, 0, fillerNode );\n\t\t} else {\n\t\t\tinsertAt( domParentOrArray as DomElement, offset, fillerNode );\n\t\t}\n\n\t\treturn fillerNode;\n\t}\n}\n\n/**\n * Whether two DOM nodes should be considered as similar.\n * Nodes are considered similar if they have the same tag name.\n */\nfunction areSimilarElements( node1: DomNode, node2: DomNode ): boolean {\n\treturn isNode( node1 ) && isNode( node2 ) &&\n\t\t!isText( node1 ) && !isText( node2 ) &&\n\t\t!isComment( node1 ) && !isComment( node2 ) &&\n\t\t( node1 as DomElement ).tagName.toLowerCase() === ( node2 as DomElement ).tagName.toLowerCase();\n}\n\n/**\n * Whether two DOM nodes are text nodes.\n */\nfunction areTextNodes( node1: DomNode, node2: DomNode ): boolean {\n\treturn isNode( node1 ) && isNode( node2 ) &&\n\t\tisText( node1 ) && isText( node2 );\n}\n\n/**\n * Whether two dom nodes should be considered as the same.\n * Two nodes which are considered the same are:\n *\n * * Text nodes with the same text.\n * * Element nodes represented by the same object.\n * * Two block filler elements.\n *\n * @param blockFillerMode Block filler mode, see {@link module:engine/view/domconverter~DomConverter#blockFillerMode}.\n */\nfunction sameNodes( domConverter: DomConverter, actualDomChild: DomNode, expectedDomChild: DomNode ): boolean {\n\t// Elements.\n\tif ( actualDomChild === expectedDomChild ) {\n\t\treturn true;\n\t}\n\t// Texts.\n\telse if ( isText( actualDomChild ) && isText( expectedDomChild ) ) {\n\t\treturn actualDomChild.data === expectedDomChild.data;\n\t}\n\t// Block fillers.\n\telse if ( domConverter.isBlockFiller( actualDomChild ) &&\n\t\tdomConverter.isBlockFiller( expectedDomChild ) ) {\n\t\treturn true;\n\t}\n\n\t// Not matching types.\n\treturn false;\n}\n\n/**\n * The following is a Firefox–specific hack (https://github.com/ckeditor/ckeditor5-engine/issues/1439).\n * When the native DOM selection is at the end of the block and preceded by
e.g.\n *\n * ```html\n *

foo
[]

\n * ```\n *\n * which happens a lot when using the soft line break, the browser fails to (visually) move the\n * caret to the new line. A quick fix is as simple as force–refreshing the selection with the same range.\n */\nfunction fixGeckoSelectionAfterBr( focus: ReturnType, domSelection: DomSelection ) {\n\tconst parent = focus!.parent;\n\n\t// This fix works only when the focus point is at the very end of an element.\n\t// There is no point in running it in cases unrelated to the browser bug.\n\tif ( parent.nodeType != Node.ELEMENT_NODE || focus!.offset != parent.childNodes.length - 1 ) {\n\t\treturn;\n\t}\n\n\tconst childAtOffset = parent.childNodes[ focus!.offset ];\n\n\t// To stay on the safe side, the fix being as specific as possible, it targets only the\n\t// selection which is at the very end of the element and preceded by
.\n\tif ( childAtOffset && ( childAtOffset as DomElement ).tagName == 'BR' ) {\n\t\tdomSelection.addRange( domSelection.getRangeAt( 0 ) );\n\t}\n}\n\nfunction filterOutFakeSelectionContainer( domChildList: Array | NodeList, fakeSelectionContainer: DomElement | null ) {\n\tconst childList = Array.from( domChildList );\n\n\tif ( childList.length == 0 || !fakeSelectionContainer ) {\n\t\treturn childList;\n\t}\n\n\tconst last = childList[ childList.length - 1 ];\n\n\tif ( last == fakeSelectionContainer ) {\n\t\tchildList.pop();\n\t}\n\n\treturn childList;\n}\n\n/**\n * Creates a fake selection container for a given document.\n */\nfunction createFakeSelectionContainer( domDocument: DomDocument ): DomElement {\n\tconst container = domDocument.createElement( 'div' );\n\n\tcontainer.className = 'ck-fake-selection-container';\n\n\tObject.assign( container.style, {\n\t\tposition: 'fixed',\n\t\ttop: 0,\n\t\tleft: '-9999px',\n\t\t// See https://github.com/ckeditor/ckeditor5/issues/752.\n\t\twidth: '42px'\n\t} );\n\n\t// Fill it with a text node so we can update it later.\n\tcontainer.textContent = '\\u00A0';\n\n\treturn container;\n}\n\n/**\n * Checks if text needs to be updated and possibly updates it by removing and inserting only parts\n * of the data from the existing text node to reduce impact on the IME composition.\n *\n * @param domText DOM text node to update.\n * @param expectedText The expected data of a text node.\n */\nfunction updateTextNode( domText: DomText, expectedText: string ) {\n\tconst actualText = domText.data;\n\n\tif ( actualText == expectedText ) {\n\t\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t\t// @if CK_DEBUG_TYPING // \tconsole.info( '%c[Renderer]%c Text node does not need update:',\n\t\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', '',\n\t\t// @if CK_DEBUG_TYPING // \t\t`\"${ domText.data }\" (${ domText.data.length })`\n\t\t// @if CK_DEBUG_TYPING // \t);\n\t\t// @if CK_DEBUG_TYPING // }\n\n\t\treturn;\n\t}\n\n\t// @if CK_DEBUG_TYPING // if ( ( window as any ).logCKETyping ) {\n\t// @if CK_DEBUG_TYPING // \tconsole.info( '%c[Renderer]%c Update text node:',\n\t// @if CK_DEBUG_TYPING // \t\t'color: green;font-weight: bold', '',\n\t// @if CK_DEBUG_TYPING // \t\t`\"${ domText.data }\" (${ domText.data.length }) -> \"${ expectedText }\" (${ expectedText.length })`\n\t// @if CK_DEBUG_TYPING // \t);\n\t// @if CK_DEBUG_TYPING // }\n\n\tconst actions = fastDiff( actualText, expectedText );\n\n\tfor ( const action of actions ) {\n\t\tif ( action.type === 'insert' ) {\n\t\t\tdomText.insertData( action.index, action.values.join( '' ) );\n\t\t} else { // 'delete'\n\t\t\tdomText.deleteData( action.index, action.howMany );\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2023, 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 * @module engine/view/domconverter\n */\n\n/* globals Node, NodeFilter, DOMParser, Text */\n\nimport ViewText from './text';\nimport ViewElement from './element';\nimport ViewUIElement from './uielement';\nimport ViewPosition from './position';\nimport ViewRange from './range';\nimport ViewSelection from './selection';\nimport ViewDocumentFragment from './documentfragment';\nimport ViewTreeWalker from './treewalker';\nimport { default as Matcher, type MatcherPattern } from './matcher';\nimport {\n\tBR_FILLER, INLINE_FILLER_LENGTH, NBSP_FILLER, MARKED_NBSP_FILLER,\n\tgetDataWithoutFiller, isInlineFiller, startsWithFiller\n} from './filler';\n\nimport {\n\tglobal,\n\tlogWarning,\n\tindexOf,\n\tgetAncestors,\n\tisText,\n\tisComment,\n\tisValidAttributeName,\n\tfirst\n} from '@ckeditor/ckeditor5-utils';\n\nimport type ViewNode from './node';\nimport type Document from './document';\nimport type DocumentSelection from './documentselection';\nimport type EditableElement from './editableelement';\nimport type ViewTextProxy from './textproxy';\nimport type ViewRawElement from './rawelement';\n\ntype DomNode = globalThis.Node;\ntype DomElement = globalThis.HTMLElement;\ntype DomDocument = globalThis.Document;\ntype DomDocumentFragment = globalThis.DocumentFragment;\ntype DomComment = globalThis.Comment;\ntype DomRange = globalThis.Range;\ntype DomText = globalThis.Text;\ntype DomSelection = globalThis.Selection;\n\nconst BR_FILLER_REF = BR_FILLER( global.document ); // eslint-disable-line new-cap\nconst NBSP_FILLER_REF = NBSP_FILLER( global.document ); // eslint-disable-line new-cap\nconst MARKED_NBSP_FILLER_REF = MARKED_NBSP_FILLER( global.document ); // eslint-disable-line new-cap\nconst UNSAFE_ATTRIBUTE_NAME_PREFIX = 'data-ck-unsafe-attribute-';\nconst UNSAFE_ELEMENT_REPLACEMENT_ATTRIBUTE = 'data-ck-unsafe-element';\n\n/**\n * `DomConverter` is a set of tools to do transformations between DOM nodes and view nodes. It also handles\n * {@link module:engine/view/domconverter~DomConverter#bindElements bindings} between these nodes.\n *\n * An instance of the DOM converter is available under\n * {@link module:engine/view/view~View#domConverter `editor.editing.view.domConverter`}.\n *\n * The DOM converter does not check which nodes should be rendered (use {@link module:engine/view/renderer~Renderer}), does not keep the\n * state of a tree nor keeps the synchronization between the tree view and the DOM tree (use {@link module:engine/view/document~Document}).\n *\n * The DOM converter keeps DOM elements to view element bindings, so when the converter gets destroyed, the bindings are lost.\n * Two converters will keep separate binding maps, so one tree view can be bound with two DOM trees.\n */\nexport default class DomConverter {\n\tpublic readonly document: Document;\n\n\t/**\n\t * Whether to leave the View-to-DOM conversion result unchanged or improve editing experience by filtering out interactive data.\n\t */\n\tpublic readonly renderingMode: 'data' | 'editing';\n\n\t/**\n\t * The mode of a block filler used by the DOM converter.\n\t */\n\tpublic blockFillerMode: BlockFillerMode;\n\n\t/**\n\t * Elements which are considered pre-formatted elements.\n\t */\n\tpublic readonly preElements: Array;\n\n\t/**\n\t * Elements which are considered block elements (and hence should be filled with a\n\t * {@link #isBlockFiller block filler}).\n\t *\n\t * Whether an element is considered a block element also affects handling of trailing whitespaces.\n\t *\n\t * You can extend this array if you introduce support for block elements which are not yet recognized here.\n\t */\n\tpublic readonly blockElements: Array;\n\n\t/**\n\t * A list of elements that exist inline (in text) but their inner structure cannot be edited because\n\t * of the way they are rendered by the browser. They are mostly HTML form elements but there are other\n\t * elements such as `` or `' +\n\t\t\t\t\t\t\t''\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'spotify',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^open\\.spotify\\.com\\/(artist\\/\\w+)/,\n\t\t\t\t\t\t/^open\\.spotify\\.com\\/(album\\/\\w+)/,\n\t\t\t\t\t\t/^open\\.spotify\\.com\\/(track\\/\\w+)/\n\t\t\t\t\t],\n\t\t\t\t\thtml: match => {\n\t\t\t\t\t\tconst id = match[ 1 ];\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t'
' +\n\t\t\t\t\t\t\t\t`' +\n\t\t\t\t\t\t\t'
'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'youtube',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^(?:m\\.)?youtube\\.com\\/watch\\?v=([\\w-]+)(?:&t=(\\d+))?/,\n\t\t\t\t\t\t/^(?:m\\.)?youtube\\.com\\/v\\/([\\w-]+)(?:\\?t=(\\d+))?/,\n\t\t\t\t\t\t/^youtube\\.com\\/embed\\/([\\w-]+)(?:\\?start=(\\d+))?/,\n\t\t\t\t\t\t/^youtu\\.be\\/([\\w-]+)(?:\\?t=(\\d+))?/\n\t\t\t\t\t],\n\t\t\t\t\thtml: match => {\n\t\t\t\t\t\tconst id = match[ 1 ];\n\t\t\t\t\t\tconst time = match[ 2 ];\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t'
' +\n\t\t\t\t\t\t\t\t`' +\n\t\t\t\t\t\t\t'
'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'vimeo',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^vimeo\\.com\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/[^/]+\\/[^/]+\\/video\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/album\\/[^/]+\\/video\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/channels\\/[^/]+\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/groups\\/[^/]+\\/videos\\/(\\d+)/,\n\t\t\t\t\t\t/^vimeo\\.com\\/ondemand\\/[^/]+\\/(\\d+)/,\n\t\t\t\t\t\t/^player\\.vimeo\\.com\\/video\\/(\\d+)/\n\t\t\t\t\t],\n\t\t\t\t\thtml: match => {\n\t\t\t\t\t\tconst id = match[ 1 ];\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t'
' +\n\t\t\t\t\t\t\t\t`' +\n\t\t\t\t\t\t\t'
'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\t{\n\t\t\t\t\tname: 'instagram',\n\t\t\t\t\turl: /^instagram\\.com\\/p\\/(\\w+)/\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'twitter',\n\t\t\t\t\turl: /^twitter\\.com/\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'googleMaps',\n\t\t\t\t\turl: [\n\t\t\t\t\t\t/^google\\.com\\/maps/,\n\t\t\t\t\t\t/^goo\\.gl\\/maps/,\n\t\t\t\t\t\t/^maps\\.google\\.com/,\n\t\t\t\t\t\t/^maps\\.app\\.goo\\.gl/\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'flickr',\n\t\t\t\t\turl: /^flickr\\.com/\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'facebook',\n\t\t\t\t\turl: /^facebook\\.com/\n\t\t\t\t}\n\t\t\t]\n\t\t} as MediaEmbedConfig );\n\n\t\tthis.registry = new MediaRegistry( editor.locale, editor.config.get( 'mediaEmbed' )! );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst schema = editor.model.schema;\n\t\tconst t = editor.t;\n\t\tconst conversion = editor.conversion;\n\t\tconst renderMediaPreview = editor.config.get( 'mediaEmbed.previewsInData' );\n\t\tconst elementName = editor.config.get( 'mediaEmbed.elementName' )!;\n\n\t\tconst registry = this.registry;\n\n\t\teditor.commands.add( 'mediaEmbed', new MediaEmbedCommand( editor ) );\n\n\t\t// Configure the schema.\n\t\tschema.register( 'media', {\n\t\t\tinheritAllFrom: '$blockObject',\n\t\t\tallowAttributes: [ 'url' ]\n\t\t} );\n\n\t\t// Model -> Data\n\t\tconversion.for( 'dataDowncast' ).elementToStructure( {\n\t\t\tmodel: 'media',\n\t\t\tview: ( modelElement, { writer } ) => {\n\t\t\t\tconst url = modelElement.getAttribute( 'url' ) as string;\n\n\t\t\t\treturn createMediaFigureElement( writer, registry, url, {\n\t\t\t\t\telementName,\n\t\t\t\t\trenderMediaPreview: !!url && renderMediaPreview\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\t// Model -> Data (url -> data-oembed-url)\n\t\tconversion.for( 'dataDowncast' ).add(\n\t\t\tmodelToViewUrlAttributeConverter( registry, {\n\t\t\t\telementName,\n\t\t\t\trenderMediaPreview\n\t\t\t} ) );\n\n\t\t// Model -> View (element)\n\t\tconversion.for( 'editingDowncast' ).elementToStructure( {\n\t\t\tmodel: 'media',\n\t\t\tview: ( modelElement, { writer } ) => {\n\t\t\t\tconst url = modelElement.getAttribute( 'url' ) as string;\n\t\t\t\tconst figure = createMediaFigureElement( writer, registry, url, {\n\t\t\t\t\telementName,\n\t\t\t\t\trenderForEditingView: true\n\t\t\t\t} );\n\n\t\t\t\treturn toMediaWidget( figure, writer, t( 'media widget' ) );\n\t\t\t}\n\t\t} );\n\n\t\t// Model -> View (url -> data-oembed-url)\n\t\tconversion.for( 'editingDowncast' ).add(\n\t\t\tmodelToViewUrlAttributeConverter( registry, {\n\t\t\t\telementName,\n\t\t\t\trenderForEditingView: true\n\t\t\t} ) );\n\n\t\t// View -> Model (data-oembed-url -> url)\n\t\tconversion.for( 'upcast' )\n\t\t\t// Upcast semantic media.\n\t\t\t.elementToElement( {\n\t\t\t\tview: element => [ 'oembed', elementName ].includes( element.name ) && element.getAttribute( 'url' ) ?\n\t\t\t\t\t{ name: true } :\n\t\t\t\t\tnull,\n\t\t\t\tmodel: ( viewMedia, { writer } ) => {\n\t\t\t\t\tconst url = viewMedia.getAttribute( 'url' ) as string;\n\n\t\t\t\t\tif ( registry.hasMedia( url ) ) {\n\t\t\t\t\t\treturn writer.createElement( 'media', { url } );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} )\n\t\t\t// Upcast non-semantic media.\n\t\t\t.elementToElement( {\n\t\t\t\tview: {\n\t\t\t\t\tname: 'div',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\t'data-oembed-url': true\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmodel: ( viewMedia, { writer } ) => {\n\t\t\t\t\tconst url = viewMedia.getAttribute( 'data-oembed-url' ) as string;\n\n\t\t\t\t\tif ( registry.hasMedia( url ) ) {\n\t\t\t\t\t\treturn writer.createElement( 'media', { url } );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} )\n\t\t\t// Consume `
` elements, that were left after upcast.\n\t\t\t.add( dispatcher => {\n\t\t\t\tconst converter: GetCallback = ( evt, data, conversionApi ) => {\n\t\t\t\t\tif ( !conversionApi.consumable.consume( data.viewItem, { name: true, classes: 'media' } ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst { modelRange, modelCursor } = conversionApi.convertChildren( data.viewItem, data.modelCursor );\n\n\t\t\t\t\tdata.modelRange = modelRange;\n\t\t\t\t\tdata.modelCursor = modelCursor;\n\n\t\t\t\t\tconst modelElement = first( modelRange!.getItems() );\n\n\t\t\t\t\tif ( !modelElement ) {\n\t\t\t\t\t\t// Revert consumed figure so other features can convert it.\n\t\t\t\t\t\tconversionApi.consumable.revert( data.viewItem, { name: true, classes: 'media' } );\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tdispatcher.on( 'element:figure', converter );\n\t\t\t} );\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2023, 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 * @module media-embed/automediaembed\n */\n\nimport { type Editor, Plugin } from 'ckeditor5/src/core';\nimport { LiveRange, LivePosition } from 'ckeditor5/src/engine';\nimport { Clipboard, type ClipboardPipeline } from 'ckeditor5/src/clipboard';\nimport { Delete } from 'ckeditor5/src/typing';\nimport { Undo, type UndoCommand } from 'ckeditor5/src/undo';\nimport { global } from 'ckeditor5/src/utils';\n\nimport MediaEmbedEditing from './mediaembedediting';\nimport { insertMedia } from './utils';\nimport type MediaEmbedCommand from './mediaembedcommand';\n\nconst URL_REGEXP = /^(?:http(s)?:\\/\\/)?[\\w-]+\\.[\\w-.~:/?#[\\]@!$&'()*+,;=%]+$/;\n\n/**\n * The auto-media embed plugin. It recognizes media links in the pasted content and embeds\n * them shortly after they are injected into the document.\n */\nexport default class AutoMediaEmbed extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ Clipboard, Delete, Undo ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'AutoMediaEmbed' as const;\n\t}\n\n\t/**\n\t * The paste–to–embed `setTimeout` ID. Stored as a property to allow\n\t * cleaning of the timeout.\n\t */\n\tprivate _timeoutId: number | null;\n\n\t/**\n\t * The position where the `` element will be inserted after the timeout,\n\t * determined each time the new content is pasted into the document.\n\t */\n\tprivate _positionToInsert: LivePosition | null;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis._timeoutId = null;\n\t\tthis._positionToInsert = null;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst modelDocument = editor.model.document;\n\n\t\t// We need to listen on `Clipboard#inputTransformation` because we need to save positions of selection.\n\t\t// After pasting, the content between those positions will be checked for a URL that could be transformed\n\t\t// into media.\n\t\tconst clipboardPipeline: ClipboardPipeline = editor.plugins.get( 'ClipboardPipeline' );\n\t\tthis.listenTo( clipboardPipeline, 'inputTransformation', () => {\n\t\t\tconst firstRange = modelDocument.selection.getFirstRange()!;\n\n\t\t\tconst leftLivePosition = LivePosition.fromPosition( firstRange.start );\n\t\t\tleftLivePosition.stickiness = 'toPrevious';\n\n\t\t\tconst rightLivePosition = LivePosition.fromPosition( firstRange.end );\n\t\t\trightLivePosition.stickiness = 'toNext';\n\n\t\t\tmodelDocument.once( 'change:data', () => {\n\t\t\t\tthis._embedMediaBetweenPositions( leftLivePosition, rightLivePosition );\n\n\t\t\t\tleftLivePosition.detach();\n\t\t\t\trightLivePosition.detach();\n\t\t\t}, { priority: 'high' } );\n\t\t} );\n\n\t\tconst undoCommand: UndoCommand = editor.commands.get( 'undo' )!;\n\t\tundoCommand.on( 'execute', () => {\n\t\t\tif ( this._timeoutId ) {\n\t\t\t\tglobal.window.clearTimeout( this._timeoutId );\n\t\t\t\tthis._positionToInsert!.detach();\n\n\t\t\t\tthis._timeoutId = null;\n\t\t\t\tthis._positionToInsert = null;\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * Analyzes the part of the document between provided positions in search for a URL representing media.\n\t * When the URL is found, it is automatically converted into media.\n\t *\n\t * @param leftPosition Left position of the selection.\n\t * @param rightPosition Right position of the selection.\n\t */\n\tprivate _embedMediaBetweenPositions( leftPosition: LivePosition, rightPosition: LivePosition ): void {\n\t\tconst editor = this.editor;\n\t\tconst mediaRegistry = editor.plugins.get( MediaEmbedEditing ).registry;\n\t\t// TODO: Use marker instead of LiveRange & LivePositions.\n\t\tconst urlRange = new LiveRange( leftPosition, rightPosition );\n\t\tconst walker = urlRange.getWalker( { ignoreElementEnd: true } );\n\n\t\tlet url = '';\n\n\t\tfor ( const node of walker ) {\n\t\t\tif ( node.item.is( '$textProxy' ) ) {\n\t\t\t\turl += node.item.data;\n\t\t\t}\n\t\t}\n\n\t\turl = url.trim();\n\n\t\t// If the URL does not match to universal URL regexp, let's skip that.\n\t\tif ( !url.match( URL_REGEXP ) ) {\n\t\t\turlRange.detach();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// If the URL represents a media, let's use it.\n\t\tif ( !mediaRegistry.hasMedia( url ) ) {\n\t\t\turlRange.detach();\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst mediaEmbedCommand: MediaEmbedCommand = editor.commands.get( 'mediaEmbed' )!;\n\n\t\t// Do not anything if media element cannot be inserted at the current position (#47).\n\t\tif ( !mediaEmbedCommand.isEnabled ) {\n\t\t\turlRange.detach();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Position won't be available in the `setTimeout` function so let's clone it.\n\t\tthis._positionToInsert = LivePosition.fromPosition( leftPosition );\n\n\t\t// This action mustn't be executed if undo was called between pasting and auto-embedding.\n\t\tthis._timeoutId = global.window.setTimeout( () => {\n\t\t\teditor.model.change( writer => {\n\t\t\t\tthis._timeoutId = null;\n\n\t\t\t\twriter.remove( urlRange );\n\t\t\t\turlRange.detach();\n\n\t\t\t\tlet insertionPosition: LivePosition | null = null;\n\n\t\t\t\t// Check if position where the media element should be inserted is still valid.\n\t\t\t\t// Otherwise leave it as undefined to use document.selection - default behavior of model.insertContent().\n\t\t\t\tif ( this._positionToInsert!.root.rootName !== '$graveyard' ) {\n\t\t\t\t\tinsertionPosition = this._positionToInsert;\n\t\t\t\t}\n\n\t\t\t\tinsertMedia( editor.model, url, insertionPosition, false );\n\n\t\t\t\tthis._positionToInsert!.detach();\n\t\t\t\tthis._positionToInsert = null;\n\t\t\t} );\n\n\t\t\teditor.plugins.get( Delete ).requestUndoOnBackspace();\n\t\t}, 100 );\n\t}\n}\n","import api from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./mediaform.css\";\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","/**\n * @license Copyright (c) 2003-2023, 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 * @module media-embed/ui/mediaformview\n */\n\nimport {\n\ttype InputTextView,\n\tButtonView,\n\tFocusCycler,\n\tLabeledFieldView,\n\tView,\n\tViewCollection,\n\tcreateLabeledInputText,\n\tsubmitHandler\n} from 'ckeditor5/src/ui';\nimport { FocusTracker, KeystrokeHandler, type Locale } from 'ckeditor5/src/utils';\nimport { icons } from 'ckeditor5/src/core';\n\n// See: #8833.\n// eslint-disable-next-line ckeditor5-rules/ckeditor-imports\nimport '@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css';\nimport '../../theme/mediaform.css';\n\n/**\n * The media form view controller class.\n *\n * See {@link module:media-embed/ui/mediaformview~MediaFormView}.\n */\nexport default class MediaFormView extends View {\n\t/**\n\t * Tracks information about the DOM focus in the form.\n\t */\n\tpublic readonly focusTracker: FocusTracker;\n\n\t/**\n\t * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.\n\t */\n\tpublic readonly keystrokes: KeystrokeHandler;\n\n\t/**\n\t * The value of the URL input.\n\t */\n\tdeclare public mediaURLInputValue: string;\n\n\t/**\n\t * The URL input view.\n\t */\n\tpublic urlInputView: LabeledFieldView;\n\n\t/**\n\t * The Save button view.\n\t */\n\tpublic saveButtonView: ButtonView;\n\n\t/**\n\t * The Cancel button view.\n\t */\n\tpublic cancelButtonView: ButtonView;\n\n\t/**\n\t * A collection of views that can be focused in the form.\n\t */\n\tprivate readonly _focusables: ViewCollection;\n\n\t/**\n\t * Helps cycling over {@link #_focusables} in the form.\n\t */\n\tprivate readonly _focusCycler: FocusCycler;\n\n\t/**\n\t * An array of form validators used by {@link #isValid}.\n\t */\n\tprivate readonly _validators: Array<( v: MediaFormView ) => string | undefined>;\n\n\t/**\n\t * The default info text for the {@link #urlInputView}.\n\t */\n\tprivate _urlInputViewInfoDefault?: string;\n\n\t/**\n\t * The info text with an additional tip for the {@link #urlInputView},\n\t * displayed when the input has some value.\n\t */\n\tprivate _urlInputViewInfoTip?: string;\n\n\t/**\n\t * @param validators Form validators used by {@link #isValid}.\n\t * @param locale The localization services instance.\n\t */\n\tconstructor( validators: Array<( v: MediaFormView ) => string | undefined>, locale: Locale ) {\n\t\tsuper( locale );\n\n\t\tconst t = locale.t;\n\n\t\tthis.focusTracker = new FocusTracker();\n\t\tthis.keystrokes = new KeystrokeHandler();\n\t\tthis.set( 'mediaURLInputValue', '' );\n\t\tthis.urlInputView = this._createUrlInput();\n\n\t\tthis.saveButtonView = this._createButton( t( 'Save' ), icons.check, 'ck-button-save' );\n\t\tthis.saveButtonView.type = 'submit';\n\t\tthis.saveButtonView.bind( 'isEnabled' ).to( this, 'mediaURLInputValue', value => !!value );\n\n\t\tthis.cancelButtonView = this._createButton( t( 'Cancel' ), icons.cancel, 'ck-button-cancel', 'cancel' );\n\n\t\tthis._focusables = new ViewCollection();\n\n\t\tthis._focusCycler = new FocusCycler( {\n\t\t\tfocusables: this._focusables,\n\t\t\tfocusTracker: this.focusTracker,\n\t\t\tkeystrokeHandler: this.keystrokes,\n\t\t\tactions: {\n\t\t\t\t// Navigate form fields backwards using the Shift + Tab keystroke.\n\t\t\t\tfocusPrevious: 'shift + tab',\n\n\t\t\t\t// Navigate form fields forwards using the Tab key.\n\t\t\t\tfocusNext: 'tab'\n\t\t\t}\n\t\t} );\n\n\t\tthis._validators = validators;\n\n\t\tthis.setTemplate( {\n\t\t\ttag: 'form',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck',\n\t\t\t\t\t'ck-media-form',\n\t\t\t\t\t'ck-responsive-form'\n\t\t\t\t],\n\n\t\t\t\ttabindex: '-1'\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\tthis.urlInputView,\n\t\t\t\tthis.saveButtonView,\n\t\t\t\tthis.cancelButtonView\n\t\t\t]\n\t\t} );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override render(): void {\n\t\tsuper.render();\n\n\t\tsubmitHandler( {\n\t\t\tview: this\n\t\t} );\n\n\t\tconst childViews = [\n\t\t\tthis.urlInputView,\n\t\t\tthis.saveButtonView,\n\t\t\tthis.cancelButtonView\n\t\t];\n\n\t\tchildViews.forEach( v => {\n\t\t\t// Register the view as focusable.\n\t\t\tthis._focusables.add( v );\n\n\t\t\t// Register the view in the focus tracker.\n\t\t\tthis.focusTracker.add( v.element! );\n\t\t} );\n\n\t\t// Start listening for the keystrokes coming from #element.\n\t\tthis.keystrokes.listenTo( this.element! );\n\n\t\tconst stopPropagation = ( data: KeyboardEvent ) => data.stopPropagation();\n\n\t\t// Since the form is in the dropdown panel which is a child of the toolbar, the toolbar's\n\t\t// keystroke handler would take over the key management in the URL input. We need to prevent\n\t\t// this ASAP. Otherwise, the basic caret movement using the arrow keys will be impossible.\n\t\tthis.keystrokes.set( 'arrowright', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowleft', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowup', stopPropagation );\n\t\tthis.keystrokes.set( 'arrowdown', stopPropagation );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic override destroy(): void {\n\t\tsuper.destroy();\n\n\t\tthis.focusTracker.destroy();\n\t\tthis.keystrokes.destroy();\n\t}\n\n\t/**\n\t * Focuses the fist {@link #_focusables} in the form.\n\t */\n\tpublic focus(): void {\n\t\tthis._focusCycler.focusFirst();\n\t}\n\n\t/**\n\t * The native DOM `value` of the {@link #urlInputView} element.\n\t *\n\t * **Note**: Do not confuse it with the {@link module:ui/inputtext/inputtextview~InputTextView#value}\n\t * which works one way only and may not represent the actual state of the component in the DOM.\n\t */\n\tpublic get url(): string {\n\t\treturn this.urlInputView.fieldView.element!.value.trim();\n\t}\n\n\tpublic set url( url: string ) {\n\t\tthis.urlInputView.fieldView.element!.value = url.trim();\n\t}\n\n\t/**\n\t * Validates the form and returns `false` when some fields are invalid.\n\t */\n\tpublic isValid(): boolean {\n\t\tthis.resetFormStatus();\n\n\t\tfor ( const validator of this._validators ) {\n\t\t\tconst errorText = validator( this );\n\n\t\t\t// One error per field is enough.\n\t\t\tif ( errorText ) {\n\t\t\t\t// Apply updated error.\n\t\t\t\tthis.urlInputView.errorText = errorText;\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Cleans up the supplementary error and information text of the {@link #urlInputView}\n\t * bringing them back to the state when the form has been displayed for the first time.\n\t *\n\t * See {@link #isValid}.\n\t */\n\tpublic resetFormStatus(): void {\n\t\tthis.urlInputView.errorText = null;\n\t\tthis.urlInputView.infoText = this._urlInputViewInfoDefault!;\n\t}\n\n\t/**\n\t * Creates a labeled input view.\n\t *\n\t * @returns Labeled input view instance.\n\t */\n\tprivate _createUrlInput(): LabeledFieldView {\n\t\tconst t = this.locale!.t;\n\n\t\tconst labeledInput = new LabeledFieldView( this.locale, createLabeledInputText );\n\t\tconst inputField = labeledInput.fieldView;\n\n\t\tthis._urlInputViewInfoDefault = t( 'Paste the media URL in the input.' );\n\t\tthis._urlInputViewInfoTip = t( 'Tip: Paste the URL into the content to embed faster.' );\n\n\t\tlabeledInput.label = t( 'Media URL' );\n\t\tlabeledInput.infoText = this._urlInputViewInfoDefault;\n\n\t\tinputField.on( 'input', () => {\n\t\t\t// Display the tip text only when there is some value. Otherwise fall back to the default info text.\n\t\t\tlabeledInput.infoText = inputField.element!.value ? this._urlInputViewInfoTip! : this._urlInputViewInfoDefault!;\n\t\t\tthis.mediaURLInputValue = inputField.element!.value.trim();\n\t\t} );\n\n\t\treturn labeledInput;\n\t}\n\n\t/**\n\t * Creates a button view.\n\t *\n\t * @param label The button label.\n\t * @param icon The button icon.\n\t * @param className The additional button CSS class name.\n\t * @param eventName An event name that the `ButtonView#execute` event will be delegated to.\n\t * @returns The button view instance.\n\t */\n\tprivate _createButton( label: string, icon: string, className: string, eventName?: string ): ButtonView {\n\t\tconst button = new ButtonView( this.locale );\n\n\t\tbutton.set( {\n\t\t\tlabel,\n\t\t\ticon,\n\t\t\ttooltip: true\n\t\t} );\n\n\t\tbutton.extendTemplate( {\n\t\t\tattributes: {\n\t\t\t\tclass: className\n\t\t\t}\n\t\t} );\n\n\t\tif ( eventName ) {\n\t\t\tbutton.delegate( 'execute' ).to( this, eventName );\n\t\t}\n\n\t\treturn button;\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2023, 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 * @module media-embed/mediaembedui\n */\n\nimport { Plugin } from 'ckeditor5/src/core';\nimport { createDropdown, CssTransitionDisablerMixin, type DropdownView } from 'ckeditor5/src/ui';\n\nimport MediaFormView from './ui/mediaformview';\nimport MediaEmbedEditing from './mediaembedediting';\nimport mediaIcon from '../theme/icons/media.svg';\nimport type MediaEmbedCommand from './mediaembedcommand';\nimport type { LocaleTranslate } from 'ckeditor5/src/utils';\nimport type MediaRegistry from './mediaregistry';\n\n/**\n * The media embed UI plugin.\n */\nexport default class MediaEmbedUI extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ MediaEmbedEditing ] as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'MediaEmbedUI' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tconst editor = this.editor;\n\t\tconst command: MediaEmbedCommand = editor.commands.get( 'mediaEmbed' )!;\n\n\t\teditor.ui.componentFactory.add( 'mediaEmbed', locale => {\n\t\t\tconst dropdown = createDropdown( locale );\n\n\t\t\tthis._setUpDropdown( dropdown, command );\n\n\t\t\treturn dropdown;\n\t\t} );\n\t}\n\n\tprivate _setUpDropdown( dropdown: DropdownView, command: MediaEmbedCommand ): void {\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\t\tconst button = dropdown.buttonView;\n\t\tconst registry = editor.plugins.get( MediaEmbedEditing ).registry;\n\n\t\tdropdown.once( 'change:isOpen', () => {\n\t\t\tconst form = new ( CssTransitionDisablerMixin( MediaFormView ) )( getFormValidators( editor.t, registry ), editor.locale );\n\n\t\t\tdropdown.panelView.children.add( form );\n\n\t\t\t// Note: Use the low priority to make sure the following listener starts working after the\n\t\t\t// default action of the drop-down is executed (i.e. the panel showed up). Otherwise, the\n\t\t\t// invisible form/input cannot be focused/selected.\n\t\t\tbutton.on( 'open', () => {\n\t\t\t\tform.disableCssTransitions();\n\n\t\t\t\t// Make sure that each time the panel shows up, the URL field remains in sync with the value of\n\t\t\t\t// the command. If the user typed in the input, then canceled (`urlInputView#fieldView#value` stays\n\t\t\t\t// unaltered) and re-opened it without changing the value of the media command (e.g. because they\n\t\t\t\t// didn't change the selection), they would see the old value instead of the actual value of the\n\t\t\t\t// command.\n\t\t\t\tform.url = command.value || '';\n\t\t\t\tform.urlInputView.fieldView.select();\n\t\t\t\tform.enableCssTransitions();\n\t\t\t}, { priority: 'low' } );\n\n\t\t\tdropdown.on( 'submit', () => {\n\t\t\t\tif ( form.isValid() ) {\n\t\t\t\t\teditor.execute( 'mediaEmbed', form.url );\n\t\t\t\t\teditor.editing.view.focus();\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tdropdown.on( 'change:isOpen', () => form.resetFormStatus() );\n\t\t\tdropdown.on( 'cancel', () => {\n\t\t\t\teditor.editing.view.focus();\n\t\t\t} );\n\n\t\t\tform.delegate( 'submit', 'cancel' ).to( dropdown );\n\t\t\tform.urlInputView.fieldView.bind( 'value' ).to( command, 'value' );\n\n\t\t\t// Form elements should be read-only when corresponding commands are disabled.\n\t\t\tform.urlInputView.bind( 'isEnabled' ).to( command, 'isEnabled' );\n\t\t} );\n\n\t\tdropdown.bind( 'isEnabled' ).to( command );\n\n\t\tbutton.set( {\n\t\t\tlabel: t( 'Insert media' ),\n\t\t\ticon: mediaIcon,\n\t\t\ttooltip: true\n\t\t} );\n\t}\n}\n\nfunction getFormValidators( t: LocaleTranslate, registry: MediaRegistry ): Array<( v: MediaFormView ) => string | undefined> {\n\treturn [\n\t\tform => {\n\t\t\tif ( !form.url.length ) {\n\t\t\t\treturn t( 'The URL must not be empty.' );\n\t\t\t}\n\t\t},\n\t\tform => {\n\t\t\tif ( !registry.hasMedia( form.url ) ) {\n\t\t\t\treturn t( 'This media URL is not supported.' );\n\t\t\t}\n\t\t}\n\t];\n}\n","export default \"\";","import api from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./mediaembed.css\";\n\nvar options = {\"injectType\":\"singletonStyleTag\",\"attributes\":{\"data-cke\":true}};\n\noptions.insert = \"head\";\noptions.singleton = true;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};","/**\n * @license Copyright (c) 2003-2023, 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 * @module paste-from-office/filters/list\n */\n\nimport {\n\tMatcher,\n\tUpcastWriter,\n\ttype ViewDocumentFragment,\n\ttype ViewElement,\n\ttype ViewNode,\n\ttype ViewText\n} from 'ckeditor5/src/engine';\n\n/**\n * Transforms Word specific list-like elements to the semantic HTML lists.\n *\n * Lists in Word are represented by block elements with special attributes like:\n *\n * ```xml\n *

...

// Paragraph based list.\n *

...

// Heading 1 based list.\n * ```\n *\n * @param documentFragment The view structure to be transformed.\n * @param stylesString Styles from which list-like elements styling will be extracted.\n */\nexport function transformListItemLikeElementsIntoLists(\n\tdocumentFragment: ViewDocumentFragment,\n\tstylesString: string\n): void {\n\tif ( !documentFragment.childCount ) {\n\t\treturn;\n\t}\n\n\tconst writer = new UpcastWriter( documentFragment.document );\n\tconst itemLikeElements = findAllItemLikeElements( documentFragment, writer );\n\n\tif ( !itemLikeElements.length ) {\n\t\treturn;\n\t}\n\n\tlet currentList: ViewElement | null = null;\n\tlet currentIndentation = 1;\n\n\titemLikeElements.forEach( ( itemLikeElement, i ) => {\n\t\tconst isDifferentList = isNewListNeeded( itemLikeElements[ i - 1 ], itemLikeElement );\n\t\tconst previousItemLikeElement = isDifferentList ? null : itemLikeElements[ i - 1 ];\n\t\tconst indentationDifference = getIndentationDifference( previousItemLikeElement, itemLikeElement );\n\n\t\tif ( isDifferentList ) {\n\t\t\tcurrentList = null;\n\t\t\tcurrentIndentation = 1;\n\t\t}\n\n\t\tif ( !currentList || indentationDifference !== 0 ) {\n\t\t\tconst listStyle = detectListStyle( itemLikeElement, stylesString );\n\n\t\t\tif ( !currentList ) {\n\t\t\t\tcurrentList = insertNewEmptyList( listStyle, itemLikeElement.element, writer );\n\t\t\t} else if ( itemLikeElement.indent > currentIndentation ) {\n\t\t\t\tconst lastListItem = currentList.getChild( currentList.childCount - 1 ) as ViewElement;\n\t\t\t\tconst lastListItemChild = lastListItem!.getChild( lastListItem.childCount - 1 ) as ViewElement;\n\n\t\t\t\tcurrentList = insertNewEmptyList( listStyle, lastListItemChild, writer );\n\t\t\t\tcurrentIndentation += 1;\n\t\t\t} else if ( itemLikeElement.indent < currentIndentation ) {\n\t\t\t\tconst differentIndentation = currentIndentation - itemLikeElement.indent;\n\n\t\t\t\tcurrentList = findParentListAtLevel( currentList, differentIndentation );\n\t\t\t\tcurrentIndentation = itemLikeElement.indent;\n\t\t\t}\n\n\t\t\tif ( itemLikeElement.indent <= currentIndentation ) {\n\t\t\t\tif ( !currentList.is( 'element', listStyle.type ) ) {\n\t\t\t\t\tcurrentList = writer.rename( listStyle.type, currentList );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst listItem = transformElementIntoListItem( itemLikeElement.element, writer );\n\n\t\twriter.appendChild( listItem, currentList! );\n\t} );\n}\n\n/**\n * Removes paragraph wrapping content inside a list item.\n */\nexport function unwrapParagraphInListItem(\n\tdocumentFragment: ViewDocumentFragment,\n\twriter: UpcastWriter\n): void {\n\tfor ( const value of writer.createRangeIn( documentFragment ) ) {\n\t\tconst element = value.item;\n\n\t\tif ( element.is( 'element', 'li' ) ) {\n\t\t\t// Google Docs allows for single paragraph inside LI.\n\t\t\tconst firstChild = element.getChild( 0 );\n\n\t\t\tif ( firstChild && firstChild.is( 'element', 'p' ) ) {\n\t\t\t\twriter.unwrapElement( firstChild );\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Finds all list-like elements in a given document fragment.\n *\n * @param documentFragment Document fragment in which to look for list-like nodes.\n * @returns Array of found list-like items. Each item is an object containing:\n */\nfunction findAllItemLikeElements(\n\tdocumentFragment: ViewDocumentFragment,\n\twriter: UpcastWriter\n): Array {\n\tconst range = writer.createRangeIn( documentFragment );\n\n\t// Matcher for finding list-like elements.\n\tconst itemLikeElementsMatcher = new Matcher( {\n\t\tname: /^p|h\\d+$/,\n\t\tstyles: {\n\t\t\t'mso-list': /.*/\n\t\t}\n\t} );\n\n\tconst itemLikeElements: Array = [];\n\n\tfor ( const value of range ) {\n\t\tif ( value.type === 'elementStart' && itemLikeElementsMatcher.match( value.item as ViewElement ) ) {\n\t\t\tconst itemData = getListItemData( value.item as ViewElement );\n\n\t\t\titemLikeElements.push( {\n\t\t\t\telement: value.item as ViewElement,\n\t\t\t\tid: itemData.id,\n\t\t\t\torder: itemData.order,\n\t\t\t\tindent: itemData.indent\n\t\t\t} );\n\t\t}\n\t}\n\n\treturn itemLikeElements;\n}\n\n/**\n * Extracts list item style from the provided CSS.\n *\n * List item style is extracted from the CSS stylesheet. Each list with its specific style attribute\n * value (`mso-list:l1 level1 lfo1`) has its dedicated properties in a CSS stylesheet defined with a selector like:\n *\n * ```css\n * @list l1:level1 { ... }\n * ```\n *\n * It contains `mso-level-number-format` property which defines list numbering/bullet style. If this property\n * is not defined it means default `decimal` numbering.\n *\n * Here CSS string representation is used as `mso-level-number-format` property is an invalid CSS property\n * and will be removed during CSS parsing.\n *\n * @param listLikeItem List-like item for which list style will be searched for. Usually\n * a result of `findAllItemLikeElements()` function.\n * @param stylesString CSS stylesheet.\n * @returns An object with properties:\n *\n * * type - List type, could be `ul` or `ol`.\n * * startIndex - List start index, valid only for ordered lists.\n * * style - List style, for example: `decimal`, `lower-roman`, etc. It is extracted\n * directly from Word stylesheet and adjusted to represent proper values for the CSS `list-style-type` property.\n * If it cannot be adjusted, the `null` value is returned.\n */\nfunction detectListStyle( listLikeItem: ListLikeElement, stylesString: string ) {\n\tconst listStyleRegexp = new RegExp( `@list l${ listLikeItem.id }:level${ listLikeItem.indent }\\\\s*({[^}]*)`, 'gi' );\n\tconst listStyleTypeRegex = /mso-level-number-format:([^;]{0,100});/gi;\n\tconst listStartIndexRegex = /mso-level-start-at:\\s{0,100}([0-9]{0,10})\\s{0,100};/gi;\n\n\tconst listStyleMatch = listStyleRegexp.exec( stylesString );\n\n\tlet listStyleType = 'decimal'; // Decimal is default one.\n\tlet type = 'ol'; //
    is default list.\n\tlet startIndex = null;\n\n\tif ( listStyleMatch && listStyleMatch[ 1 ] ) {\n\t\tconst listStyleTypeMatch = listStyleTypeRegex.exec( listStyleMatch[ 1 ] );\n\n\t\tif ( listStyleTypeMatch && listStyleTypeMatch[ 1 ] ) {\n\t\t\tlistStyleType = listStyleTypeMatch[ 1 ].trim();\n\t\t\ttype = listStyleType !== 'bullet' && listStyleType !== 'image' ? 'ol' : 'ul';\n\t\t}\n\n\t\t// Styles for the numbered lists are always defined in the Word CSS stylesheet.\n\t\t// Unordered lists MAY contain a value for the Word CSS definition `mso-level-text` but sometimes\n\t\t// this tag is missing. And because of that, we cannot depend on that. We need to predict the list style value\n\t\t// based on the list style marker element.\n\t\tif ( listStyleType === 'bullet' ) {\n\t\t\tconst bulletedStyle = findBulletedListStyle( listLikeItem.element );\n\n\t\t\tif ( bulletedStyle ) {\n\t\t\t\tlistStyleType = bulletedStyle;\n\t\t\t}\n\t\t} else {\n\t\t\tconst listStartIndexMatch = listStartIndexRegex.exec( listStyleMatch[ 1 ] );\n\n\t\t\tif ( listStartIndexMatch && listStartIndexMatch[ 1 ] ) {\n\t\t\t\tstartIndex = parseInt( listStartIndexMatch[ 1 ] );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn {\n\t\ttype,\n\t\tstartIndex,\n\t\tstyle: mapListStyleDefinition( listStyleType )\n\t};\n}\n\n/**\n * Tries to extract the `list-style-type` value based on the marker element for bulleted list.\n */\nfunction findBulletedListStyle( element: ViewElement ) {\n\tconst listMarkerElement = findListMarkerNode( element );\n\n\tif ( !listMarkerElement ) {\n\t\treturn null;\n\t}\n\n\tconst listMarker = listMarkerElement._data;\n\n\tif ( listMarker === 'o' ) {\n\t\treturn 'circle';\n\t} else if ( listMarker === '·' ) {\n\t\treturn 'disc';\n\t}\n\t// Word returns '§' instead of '■' for the square list style.\n\telse if ( listMarker === '§' ) {\n\t\treturn 'square';\n\t}\n\n\treturn null;\n}\n\n/**\n * Tries to find a text node that represents the marker element (list-style-type).\n */\nfunction findListMarkerNode( element: ViewElement ): ViewText | null {\n\t// If the first child is a text node, it is the data for the element.\n\t// The list-style marker is not present here.\n\tif ( element.getChild( 0 )!.is( '$text' ) ) {\n\t\treturn null;\n\t}\n\n\tfor ( const childNode of element.getChildren() ) {\n\t\t// The list-style marker will be inside the `` element. Let's ignore all non-span elements.\n\t\t// It may happen that the `` element is added as the first child. Most probably, it's an anchor element.\n\t\tif ( !childNode.is( 'element', 'span' ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst textNodeOrElement = childNode.getChild( 0 );\n\n\t\tif ( !textNodeOrElement ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// If already found the marker element, use it.\n\t\tif ( textNodeOrElement.is( '$text' ) ) {\n\t\t\treturn textNodeOrElement;\n\t\t}\n\n\t\treturn ( textNodeOrElement as any ).getChild( 0 );\n\t}\n\n\t/* istanbul ignore next -- @preserve */\n\treturn null;\n}\n\n/**\n * Parses the `list-style-type` value extracted directly from the Word CSS stylesheet and returns proper CSS definition.\n */\nfunction mapListStyleDefinition( value: string ) {\n\tif ( value.startsWith( 'arabic-leading-zero' ) ) {\n\t\treturn 'decimal-leading-zero';\n\t}\n\n\tswitch ( value ) {\n\t\tcase 'alpha-upper':\n\t\t\treturn 'upper-alpha';\n\t\tcase 'alpha-lower':\n\t\t\treturn 'lower-alpha';\n\t\tcase 'roman-upper':\n\t\t\treturn 'upper-roman';\n\t\tcase 'roman-lower':\n\t\t\treturn 'lower-roman';\n\t\tcase 'circle':\n\t\tcase 'disc':\n\t\tcase 'square':\n\t\t\treturn value;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\n/**\n * Creates an empty list of a given type and inserts it after a specified element.\n *\n * @param listStyle List style object which determines the type of newly created list.\n * Usually a result of `detectListStyle()` function.\n * @param element Element after which list is inserted.\n * @returns Newly created list element.\n */\nfunction insertNewEmptyList(\n\tlistStyle: ReturnType,\n\telement: ViewElement,\n\twriter: UpcastWriter\n) {\n\tconst parent = element.parent!;\n\tconst list = writer.createElement( listStyle.type );\n\tconst position = parent.getChildIndex( element ) + 1;\n\n\twriter.insertChild( position, list, parent );\n\n\t// We do not support modifying the marker for a particular list item.\n\t// Set the value for the `list-style-type` property directly to the list container.\n\tif ( listStyle.style ) {\n\t\twriter.setStyle( 'list-style-type', listStyle.style, list );\n\t}\n\n\tif ( listStyle.startIndex && listStyle.startIndex > 1 ) {\n\t\twriter.setAttribute( 'start', listStyle.startIndex, list );\n\t}\n\n\treturn list;\n}\n\n/**\n * Transforms a given element into a semantic list item. As the function operates on a provided\n * {module:engine/src/view/element~Element element} it will modify the view structure to which this element belongs.\n *\n * @param element Element which will be transformed into a list item.\n * @returns New element to which the given one was transformed. It is\n * inserted in place of the old element (the reference to the old element is lost due to renaming).\n */\nfunction transformElementIntoListItem( element: ViewElement, writer: UpcastWriter ) {\n\tremoveBulletElement( element, writer );\n\twriter.removeStyle( 'text-indent', element ); // #12361\n\n\treturn writer.rename( 'li', element )!;\n}\n\n/**\n * Extracts list item information from Word specific list-like element style:\n *\n * ```\n * `style=\"mso-list:l1 level1 lfo1\"`\n * ```\n *\n * where:\n *\n * ```\n * * `l1` is a list id (however it does not mean this is a continuous list - see #43),\n * * `level1` is a list item indentation level,\n * * `lfo1` is a list insertion order in a document.\n * ```\n *\n * @param element Element from which style data is extracted.\n */\nfunction getListItemData( element: ViewElement ): ListItemData {\n\tconst data: ListItemData = {} as any;\n\tconst listStyle = element.getStyle( 'mso-list' );\n\n\tif ( listStyle ) {\n\t\tconst idMatch = listStyle.match( /(^|\\s{1,100})l(\\d+)/i );\n\t\tconst orderMatch = listStyle.match( /\\s{0,100}lfo(\\d+)/i );\n\t\tconst indentMatch = listStyle.match( /\\s{0,100}level(\\d+)/i );\n\n\t\tif ( idMatch && orderMatch && indentMatch ) {\n\t\t\tdata.id = idMatch[ 2 ];\n\t\t\tdata.order = orderMatch[ 1 ];\n\t\t\tdata.indent = parseInt( indentMatch[ 1 ] );\n\t\t}\n\t}\n\n\treturn data;\n}\n\n/**\n * Removes span with a numbering/bullet from a given element.\n */\nfunction removeBulletElement( element: ViewElement, writer: UpcastWriter ) {\n\t// Matcher for finding `span` elements holding lists numbering/bullets.\n\tconst bulletMatcher = new Matcher( {\n\t\tname: 'span',\n\t\tstyles: {\n\t\t\t'mso-list': 'Ignore'\n\t\t}\n\t} );\n\n\tconst range = writer.createRangeIn( element );\n\n\tfor ( const value of range ) {\n\t\tif ( value.type === 'elementStart' && bulletMatcher.match( value.item as ViewElement ) ) {\n\t\t\twriter.remove( value.item as ViewElement );\n\t\t}\n\t}\n}\n\n/**\n * Whether the previous and current items belong to the same list. It is determined based on `item.id`\n * (extracted from `mso-list` style, see #getListItemData) and a previous sibling of the current item.\n *\n * However, it's quite easy to change the `id` attribute for nested lists in Word. It will break the list feature while pasting.\n * Let's check also the `indent` attribute. If the difference between those two elements is equal to 1, we can assume that\n * the `currentItem` is a beginning of the nested list because lists in CKEditor 5 always start with the `indent=0` attribute.\n * See: https://github.com/ckeditor/ckeditor5/issues/7805.\n */\nfunction isNewListNeeded( previousItem: ListLikeElement, currentItem: ListLikeElement ) {\n\tif ( !previousItem ) {\n\t\treturn true;\n\t}\n\n\tif ( previousItem.id !== currentItem.id ) {\n\t\t// See: https://github.com/ckeditor/ckeditor5/issues/7805.\n\t\t//\n\t\t// * List item 1.\n\t\t// - Nested list item 1.\n\t\tif ( currentItem.indent - previousItem.indent === 1 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\tconst previousSibling = currentItem.element.previousSibling;\n\n\tif ( !previousSibling ) {\n\t\treturn true;\n\t}\n\n\t// Even with the same id the list does not have to be continuous (#43).\n\treturn !isList( previousSibling );\n}\n\nfunction isList( element: ViewNode ) {\n\treturn element.is( 'element', 'ol' ) || element.is( 'element', 'ul' );\n}\n\n/**\n * Calculates the indentation difference between two given list items (based on the indent attribute\n * extracted from the `mso-list` style, see #getListItemData).\n */\nfunction getIndentationDifference( previousItem: ListLikeElement | null, currentItem: ListLikeElement ) {\n\treturn previousItem ? currentItem.indent - previousItem.indent : currentItem.indent - 1;\n}\n\n/**\n * Finds the parent list element (ul/ol) of a given list element with indentation level lower by a given value.\n *\n * @param listElement List element from which to start looking for a parent list.\n * @param indentationDifference Indentation difference between lists.\n * @returns Found list element with indentation level lower by a given value.\n */\nfunction findParentListAtLevel( listElement: ViewElement, indentationDifference: number ) {\n\tconst ancestors = listElement.getAncestors( { parentFirst: true } );\n\n\tlet parentList = null;\n\tlet levelChange = 0;\n\n\tfor ( const ancestor of ancestors ) {\n\t\tif ( ancestor.is( 'element', 'ul' ) || ancestor.is( 'element', 'ol' ) ) {\n\t\t\tlevelChange++;\n\t\t}\n\n\t\tif ( levelChange === indentationDifference ) {\n\t\t\tparentList = ancestor;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn parentList as ViewElement;\n}\n\ninterface ListItemData {\n\n\t/**\n\t * Parent list id.\n\t */\n\tid: string;\n\n\t/**\n\t * List item creation order.\n\t */\n\torder: string;\n\n\t/**\n\t * List item indentation level.\n\t */\n\tindent: number;\n}\n\ninterface ListLikeElement extends ListItemData {\n\n\t/**\n\t * List-like element.\n\t */\n\telement: ViewElement;\n}\n","/**\n * @license Copyright (c) 2003-2023, 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 * @module paste-from-office/filters/image\n */\n\n/* globals btoa */\n\nimport {\n\tMatcher,\n\tUpcastWriter,\n\ttype ViewDocumentFragment,\n\ttype ViewElement,\n\ttype ViewNode\n} from 'ckeditor5/src/engine';\n\n/**\n * Replaces source attribute of all `` elements representing regular\n * images (not the Word shapes) with inlined base64 image representation extracted from RTF or Blob data.\n *\n * @param documentFragment Document fragment on which transform images.\n * @param rtfData The RTF data from which images representation will be used.\n */\nexport function replaceImagesSourceWithBase64( documentFragment: ViewDocumentFragment, rtfData: string ): void {\n\tif ( !documentFragment.childCount ) {\n\t\treturn;\n\t}\n\n\tconst upcastWriter = new UpcastWriter( documentFragment.document );\n\tconst shapesIds = findAllShapesIds( documentFragment, upcastWriter );\n\n\tremoveAllImgElementsRepresentingShapes( shapesIds, documentFragment, upcastWriter );\n\tinsertMissingImgs( shapesIds, documentFragment, upcastWriter );\n\tremoveAllShapeElements( documentFragment, upcastWriter );\n\n\tconst images = findAllImageElementsWithLocalSource( documentFragment, upcastWriter );\n\n\tif ( images.length ) {\n\t\treplaceImagesFileSourceWithInlineRepresentation( images, extractImageDataFromRtf( rtfData ), upcastWriter );\n\t}\n}\n\n/**\n * Converts given HEX string to base64 representation.\n *\n * @internal\n * @param hexString The HEX string to be converted.\n * @returns Base64 representation of a given HEX string.\n */\nexport function _convertHexToBase64( hexString: string ): string {\n\treturn btoa( hexString.match( /\\w{2}/g )!.map( char => {\n\t\treturn String.fromCharCode( parseInt( char, 16 ) );\n\t} ).join( '' ) );\n}\n\n/**\n * Finds all shapes (`...`) ids. Shapes can represent images (canvas)\n * or Word shapes (which does not have RTF or Blob representation).\n *\n * @param documentFragment Document fragment from which to extract shape ids.\n * @returns Array of shape ids.\n */\nfunction findAllShapesIds( documentFragment: ViewDocumentFragment, writer: UpcastWriter ): Array {\n\tconst range = writer.createRangeIn( documentFragment );\n\n\tconst shapeElementsMatcher = new Matcher( {\n\t\tname: /v:(.+)/\n\t} );\n\n\tconst shapesIds = [];\n\n\tfor ( const value of range ) {\n\t\tif ( value.type != 'elementStart' ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst el = value.item as ViewElement;\n\t\tconst previousSibling = el.previousSibling;\n\t\tconst prevSiblingName = previousSibling && previousSibling.is( 'element' ) ? previousSibling.name : null;\n\n\t\t// If shape element have 'o:gfxdata' attribute and is not directly before `` element it means it represent Word shape.\n\t\tif ( shapeElementsMatcher.match( el ) && el.getAttribute( 'o:gfxdata' ) && prevSiblingName !== 'v:shapetype' ) {\n\t\t\tshapesIds.push( ( value.item as ViewElement ).getAttribute( 'id' )! );\n\t\t}\n\t}\n\n\treturn shapesIds;\n}\n\n/**\n * Removes all `` elements which represents Word shapes and not regular images.\n *\n * @param shapesIds Shape ids which will be checked against `` elements.\n * @param documentFragment Document fragment from which to remove `` elements.\n */\nfunction removeAllImgElementsRepresentingShapes(\n\tshapesIds: Array,\n\tdocumentFragment: ViewDocumentFragment,\n\twriter: UpcastWriter\n): void {\n\tconst range = writer.createRangeIn( documentFragment );\n\n\tconst imageElementsMatcher = new Matcher( {\n\t\tname: 'img'\n\t} );\n\n\tconst imgs = [];\n\n\tfor ( const value of range ) {\n\t\tif ( value.item.is( 'element' ) && imageElementsMatcher.match( value.item ) ) {\n\t\t\tconst el = value.item;\n\t\t\tconst shapes = el.getAttribute( 'v:shapes' ) ? el.getAttribute( 'v:shapes' )!.split( ' ' ) : [];\n\n\t\t\tif ( shapes.length && shapes.every( shape => shapesIds.indexOf( shape ) > -1 ) ) {\n\t\t\t\timgs.push( el );\n\t\t\t// Shapes may also have empty source while content is paste in some browsers (Safari).\n\t\t\t} else if ( !el.getAttribute( 'src' ) ) {\n\t\t\t\timgs.push( el );\n\t\t\t}\n\t\t}\n\t}\n\n\tfor ( const img of imgs ) {\n\t\twriter.remove( img );\n\t}\n}\n\n/**\n * Removes all shape elements (`...`) so they do not pollute the output structure.\n *\n * @param documentFragment Document fragment from which to remove shape elements.\n */\nfunction removeAllShapeElements( documentFragment: ViewDocumentFragment, writer: UpcastWriter ) {\n\tconst range = writer.createRangeIn( documentFragment );\n\n\tconst shapeElementsMatcher = new Matcher( {\n\t\tname: /v:(.+)/\n\t} );\n\n\tconst shapes = [];\n\n\tfor ( const value of range ) {\n\t\tif ( value.type == 'elementStart' && shapeElementsMatcher.match( value.item as ViewElement ) ) {\n\t\t\tshapes.push( value.item as ViewElement );\n\t\t}\n\t}\n\n\tfor ( const shape of shapes ) {\n\t\twriter.remove( shape );\n\t}\n}\n\n/**\n * Inserts `img` tags if there is none after a shape.\n */\nfunction insertMissingImgs( shapeIds: Array, documentFragment: ViewDocumentFragment, writer: UpcastWriter ) {\n\tconst range = writer.createRangeIn( documentFragment );\n\n\tconst shapes: Array = [];\n\n\tfor ( const value of range ) {\n\t\tif ( value.type == 'elementStart' && value.item.is( 'element', 'v:shape' ) ) {\n\t\t\tconst id = value.item.getAttribute( 'id' )!;\n\n\t\t\tif ( shapeIds.includes( id ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( !containsMatchingImg( value.item.parent!.getChildren(), id ) ) {\n\t\t\t\tshapes.push( value.item );\n\t\t\t}\n\t\t}\n\t}\n\n\tfor ( const shape of shapes ) {\n\t\tconst attrs: Record = {\n\t\t\tsrc: findSrc( shape )\n\t\t};\n\n\t\tif ( shape.hasAttribute( 'alt' ) ) {\n\t\t\tattrs.alt = shape.getAttribute( 'alt' );\n\t\t}\n\n\t\tconst img = writer.createElement( 'img', attrs );\n\n\t\twriter.insertChild( shape.index! + 1, img, shape.parent! );\n\t}\n\n\tfunction containsMatchingImg( nodes: Iterable, id: string ): boolean {\n\t\tfor ( const node of nodes ) {\n\t\t\t/* istanbul ignore else -- @preserve */\n\t\t\tif ( node.is( 'element' ) ) {\n\t\t\t\tif ( node.name == 'img' && node.getAttribute( 'v:shapes' ) == id ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tif ( containsMatchingImg( node.getChildren(), id ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tfunction findSrc( shape: ViewElement ) {\n\t\tfor ( const child of shape.getChildren() ) {\n\t\t\t/* istanbul ignore else -- @preserve */\n\t\t\tif ( child.is( 'element' ) && child.getAttribute( 'src' ) ) {\n\t\t\t\treturn child.getAttribute( 'src' );\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Finds all `` elements in a given document fragment which have source pointing to local `file://` resource.\n *\n * @param documentFragment Document fragment in which to look for `` elements.\n * @returns result All found images grouped by source type.\n */\nfunction findAllImageElementsWithLocalSource(\n\tdocumentFragment: ViewDocumentFragment,\n\twriter: UpcastWriter\n): Array {\n\tconst range = writer.createRangeIn( documentFragment );\n\n\tconst imageElementsMatcher = new Matcher( {\n\t\tname: 'img'\n\t} );\n\n\tconst imgs = [];\n\n\tfor ( const value of range ) {\n\t\tif ( value.item.is( 'element' ) && imageElementsMatcher.match( value.item ) ) {\n\t\t\tif ( value.item.getAttribute( 'src' )!.startsWith( 'file://' ) ) {\n\t\t\t\timgs.push( value.item );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn imgs;\n}\n\n/**\n * Extracts all images HEX representations from a given RTF data.\n *\n * @param rtfData The RTF data from which to extract images HEX representation.\n * @returns Array of found HEX representations. Each array item is an object containing:\n *\n * * hex Image representation in HEX format.\n * * type Type of image, `image/png` or `image/jpeg`.\n */\nfunction extractImageDataFromRtf( rtfData: string ): Array<{ hex: string; type: string }> {\n\tif ( !rtfData ) {\n\t\treturn [];\n\t}\n\n\tconst regexPictureHeader = /{\\\\pict[\\s\\S]+?\\\\bliptag-?\\d+(\\\\blipupi-?\\d+)?({\\\\\\*\\\\blipuid\\s?[\\da-fA-F]+)?[\\s}]*?/;\n\tconst regexPicture = new RegExp( '(?:(' + regexPictureHeader.source + '))([\\\\da-fA-F\\\\s]+)\\\\}', 'g' );\n\tconst images = rtfData.match( regexPicture );\n\tconst result = [];\n\n\tif ( images ) {\n\t\tfor ( const image of images ) {\n\t\t\tlet imageType: string | false = false;\n\n\t\t\tif ( image.includes( '\\\\pngblip' ) ) {\n\t\t\t\timageType = 'image/png';\n\t\t\t} else if ( image.includes( '\\\\jpegblip' ) ) {\n\t\t\t\timageType = 'image/jpeg';\n\t\t\t}\n\n\t\t\tif ( imageType ) {\n\t\t\t\tresult.push( {\n\t\t\t\t\thex: image.replace( regexPictureHeader, '' ).replace( /[^\\da-fA-F]/g, '' ),\n\t\t\t\t\ttype: imageType\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n}\n\n/**\n * Replaces `src` attribute value of all given images with the corresponding base64 image representation.\n *\n * @param imageElements Array of image elements which will have its source replaced.\n * @param imagesHexSources Array of images hex sources (usually the result of `extractImageDataFromRtf()` function).\n * The array should be the same length as `imageElements` parameter.\n */\nfunction replaceImagesFileSourceWithInlineRepresentation(\n\timageElements: Array,\n\timagesHexSources: ReturnType,\n\twriter: UpcastWriter\n) {\n\t// Assume there is an equal amount of image elements and images HEX sources so they can be matched accordingly based on existing order.\n\tif ( imageElements.length === imagesHexSources.length ) {\n\t\tfor ( let i = 0; i < imageElements.length; i++ ) {\n\t\t\tconst newSrc = `data:${ imagesHexSources[ i ].type };base64,${ _convertHexToBase64( imagesHexSources[ i ].hex ) }`;\n\t\t\twriter.setAttribute( 'src', newSrc, imageElements[ i ] );\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2023, 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 * @module paste-from-office/normalizers/mswordnormalizer\n */\n\nimport { transformListItemLikeElementsIntoLists } from '../filters/list';\nimport { replaceImagesSourceWithBase64 } from '../filters/image';\nimport { setTableAlignment } from '../filters/table';\nimport type { ViewDocument } from 'ckeditor5/src/engine';\nimport type { Normalizer, NormalizerData } from '../normalizer';\n\nconst msWordMatch1 = //i;\nconst msWordMatch2 = /xmlns:o=\"urn:schemas-microsoft-com/i;\n\n/**\n * Normalizer for the content pasted from Microsoft Word.\n */\nexport default class MSWordNormalizer implements Normalizer {\n\tpublic readonly document: ViewDocument;\n\n\t/**\n\t * Creates a new `MSWordNormalizer` instance.\n\t *\n\t * @param document View document.\n\t */\n\tconstructor( document: ViewDocument ) {\n\t\tthis.document = document;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic isActive( htmlString: string ): boolean {\n\t\treturn msWordMatch1.test( htmlString ) || msWordMatch2.test( htmlString );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic execute( data: NormalizerData ): void {\n\t\tconst { body: documentFragment, stylesString } = data._parsedData;\n\n\t\ttransformListItemLikeElementsIntoLists( documentFragment, stylesString );\n\t\treplaceImagesSourceWithBase64( documentFragment, data.dataTransfer.getData( 'text/rtf' ) );\n\t\tsetTableAlignment( documentFragment );\n\t\tdata.content = documentFragment;\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2023, 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 * @module paste-from-office/filters/table\n */\n\nimport { UpcastWriter, type ViewDocumentFragment } from 'ckeditor5/src/engine';\n\n/**\n * Set alignment for table pasted from MS Word.\n *\n * @param documentFragment The view structure to be transformed.\n */\nexport function setTableAlignment( documentFragment: ViewDocumentFragment ): void {\n\tconst upcastWriter = new UpcastWriter( documentFragment.document );\n\n\tfor ( const item of documentFragment.getChildren() ) {\n\t\tif ( !item.is( 'element' ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// If table is not wrapped into div[align], it should be aligned left.\n\t\t// More details: https://github.com/ckeditor/ckeditor5/issues/8752#issuecomment-1623507171.\n\t\t// RTL tables have the `align` attribute set explicitly -\n\t\t// see https://github.com/ckeditor/ckeditor5/issues/8752#issuecomment-1628876074.\n\t\tif ( item.is( 'element', 'table' ) ) {\n\t\t\tupcastWriter.setAttribute( 'align', 'left', item );\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst align = item.getAttribute( 'align' );\n\t\tconst child = item.getChild( 0 );\n\n\t\t// We're looking for the `
    ` elements with `align` attribute and a child.\n\t\tif ( item.name !== 'div' || !align || !child ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// If table is wrapped in div[align], the defined alignment value should be preserved.\n\t\t// More details: https://github.com/ckeditor/ckeditor5/issues/8752#issuecomment-1629065676.\n\t\tif ( child.is( 'element', 'table' ) ) {\n\t\t\tupcastWriter.setAttribute( 'align', align === 'center' ? 'none' : align, child );\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2023, 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 * @module paste-from-office/filters/br\n */\n\nimport {\n\tDomConverter,\n\tViewDocument,\n\ttype UpcastWriter,\n\ttype ViewDocumentFragment,\n\ttype ViewElement,\n\ttype ViewNode\n} from 'ckeditor5/src/engine';\n\n/**\n * Transforms `
    ` elements that are siblings to some block element into a paragraphs.\n *\n * @param documentFragment The view structure to be transformed.\n */\nexport default function transformBlockBrsToParagraphs(\n\tdocumentFragment: ViewDocumentFragment,\n\twriter: UpcastWriter\n): void {\n\tconst viewDocument = new ViewDocument( writer.document.stylesProcessor );\n\tconst domConverter = new DomConverter( viewDocument, { renderingMode: 'data' } );\n\n\tconst blockElements = domConverter.blockElements;\n\tconst inlineObjectElements = domConverter.inlineObjectElements;\n\n\tconst elementsToReplace = [];\n\n\tfor ( const value of writer.createRangeIn( documentFragment ) ) {\n\t\tconst element = value.item;\n\n\t\tif ( element.is( 'element', 'br' ) ) {\n\t\t\tconst nextSibling = findSibling( element, 'forward', writer, { blockElements, inlineObjectElements } );\n\t\t\tconst previousSibling = findSibling( element, 'backward', writer, { blockElements, inlineObjectElements } );\n\n\t\t\tconst nextSiblingIsBlock = isBlockViewElement( nextSibling, blockElements );\n\t\t\tconst previousSiblingIsBlock = isBlockViewElement( previousSibling, blockElements );\n\n\t\t\t// If the
    is surrounded by blocks then convert it to a paragraph:\n\t\t\t// *

    foo

    [
    ]

    bar

    ->

    foo

    [

    ]

    bar

    \n\t\t\t// *

    foo

    [
    ] ->

    foo

    [

    ]\n\t\t\t// * [
    ]

    foo

    -> [

    ]

    foo

    \n\t\t\tif ( previousSiblingIsBlock || nextSiblingIsBlock ) {\n\t\t\t\telementsToReplace.push( element );\n\t\t\t}\n\t\t}\n\t}\n\n\tfor ( const element of elementsToReplace ) {\n\t\tif ( element.hasClass( 'Apple-interchange-newline' ) ) {\n\t\t\twriter.remove( element );\n\t\t} else {\n\t\t\twriter.replace( element, writer.createElement( 'p' ) );\n\t\t}\n\t}\n}\n\n/**\n * Returns sibling node, threats inline elements as transparent (but should stop on an inline objects).\n */\nfunction findSibling(\n\tviewElement: ViewElement,\n\tdirection: 'forward' | 'backward',\n\twriter: UpcastWriter,\n\t{ blockElements, inlineObjectElements }: { blockElements: Array; inlineObjectElements: Array }\n) {\n\tlet position = writer.createPositionAt( viewElement, direction == 'forward' ? 'after' : 'before' );\n\n\t// Find first position that is just before a first:\n\t// * text node,\n\t// * block element,\n\t// * inline object element.\n\t// It's ignoring any inline (non-object) elements like span, strong, etc.\n\tposition = position.getLastMatchingPosition( ( { item } ) => (\n\t\titem.is( 'element' ) &&\n\t\t!blockElements.includes( item.name ) &&\n\t\t!inlineObjectElements.includes( item.name )\n\t), { direction } );\n\n\treturn direction == 'forward' ? position.nodeAfter : position.nodeBefore;\n}\n\n/**\n * Returns true for view elements that are listed as block view elements.\n */\nfunction isBlockViewElement( node: ViewNode | null, blockElements: Array ) {\n\treturn !!node && node.is( 'element' ) && blockElements.includes( node.name );\n}\n","/**\n * @license Copyright (c) 2003-2023, 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 * @module paste-from-office/normalizers/googledocsnormalizer\n */\n\nimport { UpcastWriter, type ViewDocument } from 'ckeditor5/src/engine';\n\nimport removeBoldWrapper from '../filters/removeboldwrapper';\nimport transformBlockBrsToParagraphs from '../filters/br';\nimport { unwrapParagraphInListItem } from '../filters/list';\nimport type { Normalizer, NormalizerData } from '../normalizer';\n\nconst googleDocsMatch = /id=(\"|')docs-internal-guid-[-0-9a-f]+(\"|')/i;\n\n/**\n * Normalizer for the content pasted from Google Docs.\n */\nexport default class GoogleDocsNormalizer implements Normalizer {\n\tpublic readonly document: ViewDocument;\n\n\t/**\n\t * Creates a new `GoogleDocsNormalizer` instance.\n\t *\n\t * @param document View document.\n\t */\n\tconstructor( document: ViewDocument ) {\n\t\tthis.document = document;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic isActive( htmlString: string ): boolean {\n\t\treturn googleDocsMatch.test( htmlString );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic execute( data: NormalizerData ): void {\n\t\tconst writer = new UpcastWriter( this.document );\n\t\tconst { body: documentFragment } = data._parsedData;\n\n\t\tremoveBoldWrapper( documentFragment, writer );\n\t\tunwrapParagraphInListItem( documentFragment, writer );\n\t\ttransformBlockBrsToParagraphs( documentFragment, writer );\n\n\t\tdata.content = documentFragment;\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2023, 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 * @module paste-from-office/filters/removeboldwrapper\n */\n\nimport type { UpcastWriter, ViewDocumentFragment } from 'ckeditor5/src/engine';\n\n/**\n * Removes the `` tag wrapper added by Google Docs to a copied content.\n *\n * @param documentFragment element `data.content` obtained from clipboard\n */\nexport default function removeBoldWrapper( documentFragment: ViewDocumentFragment, writer: UpcastWriter ): void {\n\tfor ( const child of documentFragment.getChildren() ) {\n\t\tif ( child.is( 'element', 'b' ) && child.getStyle( 'font-weight' ) === 'normal' ) {\n\t\t\tconst childIndex = documentFragment.getChildIndex( child );\n\n\t\t\twriter.remove( child );\n\t\t\twriter.insertChild( childIndex, child.getChildren(), documentFragment );\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2023, 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 * @module paste-from-office/normalizers/googlesheetsnormalizer\n */\n\nimport { UpcastWriter, type ViewDocument } from 'ckeditor5/src/engine';\n\nimport removeXmlns from '../filters/removexmlns';\nimport removeGoogleSheetsTag from '../filters/removegooglesheetstag';\nimport removeInvalidTableWidth from '../filters/removeinvalidtablewidth';\nimport removeStyleBlock from '../filters/removestyleblock';\nimport type { Normalizer, NormalizerData } from '../normalizer';\n\nconst googleSheetsMatch = /` tag wrapper added by Google Sheets to a copied content.\n *\n * @param documentFragment element `data.content` obtained from clipboard\n */\nexport default function removeGoogleSheetsTag( documentFragment: ViewDocumentFragment, writer: UpcastWriter ): void {\n\tfor ( const child of documentFragment.getChildren() ) {\n\t\tif ( child.is( 'element', 'google-sheets-html-origin' ) ) {\n\t\t\tconst childIndex = documentFragment.getChildIndex( child );\n\n\t\t\twriter.remove( child );\n\t\t\twriter.insertChild( childIndex, child.getChildren(), documentFragment );\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2023, 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 * @module paste-from-office/filters/removexmlns\n */\n\nimport type { UpcastWriter, ViewDocumentFragment } from 'ckeditor5/src/engine';\n\n/**\n * Removes the `xmlns` attribute from table pasted from Google Sheets.\n *\n * @param documentFragment element `data.content` obtained from clipboard\n */\nexport default function removeXmlns( documentFragment: ViewDocumentFragment, writer: UpcastWriter ): void {\n\tfor ( const child of documentFragment.getChildren() ) {\n\t\tif ( child.is( 'element', 'table' ) && child.hasAttribute( 'xmlns' ) ) {\n\t\t\twriter.removeAttribute( 'xmlns', child );\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2023, 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 * @module paste-from-office/filters/removeinvalidtablewidth\n */\n\nimport type { UpcastWriter, ViewDocumentFragment } from 'ckeditor5/src/engine';\n\n/**\n * Removes the `width:0px` style from table pasted from Google Sheets.\n *\n * @param documentFragment element `data.content` obtained from clipboard\n */\nexport default function removeInvalidTableWidth( documentFragment: ViewDocumentFragment, writer: UpcastWriter ): void {\n\tfor ( const child of documentFragment.getChildren() ) {\n\t\tif ( child.is( 'element', 'table' ) && child.getStyle( 'width' ) === '0px' ) {\n\t\t\twriter.removeStyle( 'width', child );\n\t\t}\n\t}\n}\n","/**\n * @license Copyright (c) 2003-2023, 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 * @module paste-from-office/filters/removestyleblock\n */\n\nimport type { UpcastWriter, ViewDocumentFragment } from 'ckeditor5/src/engine';\n\n/**\n * Removes `"):'')})),w('column2')&&t.add('column2',e(e({},M),{label:a.labelColumn2,media:"\n \n ",content:"
    \n
    \n
    \n
    \n ").concat(r?""):'')})),w('column3')&&t.add('column3',e(e({},M),{label:a.labelColumn3,media:"\n \n ",content:"
    \n
    \n
    \n
    \n
    \n ").concat(r?""):'')})),w('column3-7')&&t.add('column3-7',e(e({},M),{label:a.labelColumn37,media:"\n \n ",content:"
    \n
    \n
    \n
    \n ").concat(r?""):'')})),w('text')&&t.add('text',e(e({},M),{activate:!0,label:a.labelText,media:"\n \n ",content:{type:'text',content:'Insert your text here',style:{padding:'10px'}}})),w('link')&&t.add('link',e(e({},M),{label:a.labelLink,media:"\n \n ",content:{type:'link',content:'Link',style:{color:'#d983a6'}}})),w('image')&&t.add('image',e(e({},M),{activate:!0,label:a.labelImage,media:"\n \n ",content:{style:{color:'black'},type:'image'}})),w('video')&&t.add('video',e(e({},M),{label:a.labelVideo,media:"\n \n ",content:{type:'video',src:'img/video2.webm',style:{height:'350px',width:'615px'}}})),w('map')&&t.add('map',e(e({},M),{label:a.labelMap,media:"\n \n ",content:{type:'map',style:{height:'350px'}}}))}(n,t({blocks:['column1','column2','column3','column3-7','text','link','image','video','map'],flexGrid:!1,stylePrefix:'gjs-',addBasicStyle:!0,category:'Basic',labelColumn1:'1 Column',labelColumn2:'2 Columns',labelColumn3:'3 Columns',labelColumn37:'2 Columns 3/7',labelText:'Text',labelLink:'Link',labelImage:'Image',labelVideo:'Video',labelMap:'Map',rowHeight:75},a))};return a})())); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/web/static/grapesjs-plugin-ckeditor@1.0.1.min.js b/web/static/grapesjs-plugin-ckeditor@1.0.1.min.js deleted file mode 100644 index 269a212..0000000 --- a/web/static/grapesjs-plugin-ckeditor@1.0.1.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! grapesjs-plugin-ckeditor - 1.0.1 */ -!function(e,t){'object'==typeof exports&&'object'==typeof module?module.exports=t():'function'==typeof define&&define.amd?define([],t):'object'==typeof exports?exports["grapesjs-plugin-ckeditor"]=t():e["grapesjs-plugin-ckeditor"]=t()}('undefined'!=typeof globalThis?globalThis:'undefined'!=typeof window?window:this,(()=>(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(e,'__esModule',{value:!0})}},t={};e.r(t),e.d(t,{default:()=>i});var n=void 0&&(void 0).__assign||function(){return n=Object.assign||function(e){for(var t,n=1,o=arguments.length;n(()=>{"use strict";var e={d:(n,t)=>{for(var o in t)e.o(t,o)&&!e.o(n,o)&&Object.defineProperty(n,o,{enumerable:!0,get:t[o]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(e,'__esModule',{value:!0})}},n={};e.r(n),e.d(n,{default:()=>u});var t=void 0&&(void 0).__assign||function(){return t=Object.assign||function(e){for(var n,t=1,o=arguments.length;t=0&&e.Blocks.add(o,t(t({select:!0,category:'Basic'},r),n.block(o)))};o('link-block',{label:'Link Block',media:"\n \n ",content:{type:'link',editable:!1,droppable:!0,style:{display:'inline-block',padding:'5px','min-height':'50px','min-width':'50px'}}}),o('quote',{label:'Quote',media:"\n \n ",content:"
    \n Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore ipsum dolor sit\n
    "}),o('text-basic',{label:'Text section',media:"\n \n ",content:"
    \n

    Insert title here

    \n

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua

    \n
    "})}(e,l),s(e,l),function(e,n){var t=e.Panels,l=e.getConfig(),s='sw-visibility',d='export-template',u='open-sm',m='open-tm',p='open-layers',v='open-blocks',H='fullscreen',C='preview',f='style="display: block; max-width:22px"';l.showDevices=!1,t.getPanels().reset([{id:'commands',buttons:[{}]},{id:'devices-c',buttons:[{id:r,command:r,active:!0,label:"\n \n ")},{id:i,command:i,label:"\n \n ")},{id:a,command:a,label:"\n \n ")}]},{id:'options',buttons:[{id:s,command:s,context:s,label:"\n \n ")},{id:C,context:C,command:function(){return e.runCommand(C)},label:"")},{id:H,command:H,context:H,label:"\n \n ")},{id:d,command:function(){return e.runCommand(d)},label:"\n \n ")},{id:'undo',command:function(){return e.runCommand('core:undo')},label:"\n \n ")},{id:'redo',command:function(){return e.runCommand('core:redo')},label:"\n \n ")},{id:o,command:function(){return e.runCommand(o)},label:"\n \n ")},{id:c,command:function(){return e.runCommand(c)},label:"\n \n ")}]},{id:'views',buttons:[{id:u,command:u,active:!0,label:"\n \n ")},{id:m,command:m,label:"\n \n ")},{id:p,command:p,label:"\n \n ")},{id:v,command:v,label:"\n \n ")}]}]);var g=t.getButton('views',v);e.on('load',(function(){return null==g?void 0:g.set('active',!0)})),n.showStylesOnChange&&e.on('component:selected',(function(){var n=t.getButton('views',u),o=t.getButton('views',p);o&&o.get('active')||!e.getSelected()||null==n||n.set('active',!0)}))}(e,l)};return n})())); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/web/static/grapesjs@0.21.4.min.css b/web/static/grapesjs@0.21.4.min.css deleted file mode 100644 index 182b713..0000000 --- a/web/static/grapesjs@0.21.4.min.css +++ /dev/null @@ -1 +0,0 @@ -.CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:black}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:blue}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255, 150, 0, 0.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll !important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255, 255, 0, 0.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42 !important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0px}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498 !important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom{color:#c85e7c}.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-property,.cm-s-hopscotch span.cm-attribute{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}.sp-container{position:absolute;top:0;left:0;display:inline-block;z-index:9999994;overflow:hidden}.sp-container.sp-flat{position:relative}.sp-container,.sp-container *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.sp-top{position:relative;width:100%;display:inline-block}.sp-top-inner{position:absolute;top:0;left:0;bottom:0;right:0}.sp-color{position:absolute;top:0;left:0;bottom:0;right:20%}.sp-hue{position:absolute;top:0;right:0;bottom:0;left:84%;height:100%}.sp-clear-enabled .sp-hue{top:33px;height:77.5%}.sp-fill{padding-top:80%}.sp-sat,.sp-val{position:absolute;top:0;left:0;right:0;bottom:0}.sp-alpha-enabled .sp-top{margin-bottom:18px}.sp-alpha-enabled .sp-alpha{display:block}.sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:6px;left:50%;cursor:pointer;border:1px solid #000;background:#fff;opacity:.8}.sp-alpha{display:none;position:absolute;bottom:-14px;right:0;left:0;height:8px}.sp-alpha-inner{border:solid 1px #333}.sp-clear{display:none}.sp-clear.sp-clear-display{background-position:center}.sp-clear-enabled .sp-clear{display:block;position:absolute;top:0px;right:0;bottom:0;left:84%;height:28px}.sp-container,.sp-replacer,.sp-preview,.sp-dragger,.sp-slider,.sp-alpha,.sp-clear,.sp-alpha-handle,.sp-container.sp-dragging .sp-input,.sp-container button{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.sp-container.sp-input-disabled .sp-input-container{display:none}.sp-container.sp-buttons-disabled .sp-button-container{display:none}.sp-container.sp-palette-buttons-disabled .sp-palette-button-container{display:none}.sp-palette-only .sp-picker-container{display:none}.sp-palette-disabled .sp-palette-container{display:none}.sp-initial-disabled .sp-initial{display:none}.sp-sat{background-image:-webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0)));background-image:-webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0));background-image:-moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0));background-image:-o-linear-gradient(left, #fff, rgba(204, 154, 129, 0));background-image:-ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0));background-image:linear-gradient(to right, #fff, rgba(204, 154, 129, 0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr="#FFFFFFFF", endColorstr="#00CC9A81")}.sp-val{background-image:-webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0)));background-image:-webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0));background-image:-moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));background-image:-o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));background-image:-ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));background-image:linear-gradient(to top, #000, rgba(204, 154, 129, 0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00CC9A81", endColorstr="#FF000000")}.sp-hue{background:-moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);background:-ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);background:-o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);background:-webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000));background:-webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);background:linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%)}.sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff0000", endColorstr="#ffff00")}.sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffff00", endColorstr="#00ff00")}.sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00ff00", endColorstr="#00ffff")}.sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00ffff", endColorstr="#0000ff")}.sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#0000ff", endColorstr="#ff00ff")}.sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ff00ff", endColorstr="#ff0000")}.sp-hidden{display:none !important}.sp-cf:before,.sp-cf:after{content:"";display:table}.sp-cf:after{clear:both}@media(max-device-width: 480px){.sp-color{right:40%}.sp-hue{left:63%}.sp-fill{padding-top:60%}}.sp-dragger{border-radius:5px;height:5px;width:5px;border:1px solid #fff;background:#000;cursor:pointer;position:absolute;top:0;left:0}.sp-slider{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:#fff;opacity:.8}.sp-container{border-radius:0;background-color:#ececec;border:solid 1px #f0c49b;padding:0}.sp-container,.sp-container button,.sp-container input,.sp-color,.sp-hue,.sp-clear{font:normal 12px "Lucida Grande","Lucida Sans Unicode","Lucida Sans",Geneva,Verdana,sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.sp-top{margin-bottom:3px}.sp-color,.sp-hue,.sp-clear{border:solid 1px #666}.sp-input-container{float:right;width:100px;margin-bottom:4px}.sp-initial-disabled .sp-input-container{width:100%}.sp-input{font-size:12px !important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:rgba(0,0,0,0);border-radius:3px;color:#222}.sp-input:focus{border:1px solid orange}.sp-input.sp-validation-error{border:1px solid red;background:#fdd}.sp-picker-container,.sp-palette-container{float:left;position:relative;padding:10px;padding-bottom:300px;margin-bottom:-290px}.sp-picker-container{width:172px;border-left:solid 1px #fff}.sp-palette-container{border-right:solid 1px #ccc}.sp-palette-only .sp-palette-container{border:0}.sp-palette .sp-thumb-el{display:block;position:relative;float:left;width:24px;height:15px;margin:3px;cursor:pointer;border:solid 2px rgba(0,0,0,0)}.sp-palette .sp-thumb-el:hover,.sp-palette .sp-thumb-el.sp-thumb-active{border-color:orange}.sp-thumb-el{position:relative}.sp-initial{float:left;border:solid 1px #333}.sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.sp-initial .sp-clear-display{background-position:center}.sp-palette-button-container,.sp-button-container{float:right}.sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:4px;display:inline-block;border:solid 1px #91765d;background:#eee;color:#333;vertical-align:middle}.sp-replacer:hover,.sp-replacer.sp-active{border-color:#f0c49b;color:#111}.sp-replacer.sp-disabled{cursor:default;border-color:silver;color:silver}.sp-dd{padding:2px 0;height:16px;line-height:16px;float:left;font-size:10px}.sp-preview{position:relative;width:25px;height:20px;border:solid 1px #222;margin-right:5px;float:left;z-index:0}.sp-palette{max-width:220px}.sp-palette .sp-thumb-el{width:16px;height:16px;margin:2px 1px;border:solid 1px #d0d0d0}.sp-container{padding-bottom:0}.sp-container button{background-color:#eee;background-image:-webkit-linear-gradient(top, #eeeeee, #cccccc);background-image:-moz-linear-gradient(top, #eeeeee, #cccccc);background-image:-ms-linear-gradient(top, #eeeeee, #cccccc);background-image:-o-linear-gradient(top, #eeeeee, #cccccc);background-image:linear-gradient(to bottom, #eeeeee, #cccccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.sp-container button:hover{background-color:#ddd;background-image:-webkit-linear-gradient(top, #dddddd, #bbbbbb);background-image:-moz-linear-gradient(top, #dddddd, #bbbbbb);background-image:-ms-linear-gradient(top, #dddddd, #bbbbbb);background-image:-o-linear-gradient(top, #dddddd, #bbbbbb);background-image:linear-gradient(to bottom, #dddddd, #bbbbbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-moz-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-ms-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-o-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee}.sp-cancel{font-size:11px;color:#d93f3f !important;margin:0;padding:2px;margin-right:5px;vertical-align:middle;text-decoration:none}.sp-cancel:hover{color:#d93f3f !important;text-decoration:underline}.sp-palette span:hover,.sp-palette span.sp-thumb-active{border-color:#000}.sp-preview,.sp-alpha,.sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.sp-preview-inner,.sp-alpha-inner,.sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.sp-palette .sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.sp-clear-display{background-repeat:no-repeat;background-position:center;background-image:url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==)}.gjs-is__grab,.gjs-is__grab *{cursor:grab !important}.gjs-is__grabbing,.gjs-is__grabbing *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;cursor:grabbing !important}.gjs-one-bg{background-color:#444}.gjs-one-color{color:#444}.gjs-one-color-h:hover{color:#444}.gjs-two-bg{background-color:#ddd}.gjs-two-color{color:#ddd}.gjs-two-color-h:hover{color:#ddd}.gjs-three-bg{background-color:#804f7b}.gjs-three-color{color:#804f7b}.gjs-three-color-h:hover{color:#804f7b}.gjs-four-bg{background-color:#d278c9}.gjs-four-color{color:#d278c9}.gjs-four-color-h:hover{color:#d278c9}.gjs-danger-bg{background-color:#dd3636}.gjs-danger-color{color:#dd3636}.gjs-danger-color-h:hover{color:#dd3636}.gjs-bg-main,.gjs-sm-colorp-c,.gjs-off-prv{background-color:#444}.gjs-color-main,.gjs-sm-stack #gjs-sm-add,.gjs-off-prv{color:#ddd;fill:#ddd}.gjs-color-active{color:#f8f8f8;fill:#f8f8f8}.gjs-color-warn{color:#ffca6f;fill:#ffca6f}.gjs-color-hl{color:#71b7f1;fill:#71b7f1}.gjs-invis-invis,.gjs-clm-tags #gjs-clm-new,.gjs-no-app{background-color:rgba(0,0,0,0);border:none;color:inherit}.gjs-no-app{height:10px}.gjs-test::btn{color:"#fff"}.opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-checker-bg,.gjs-field-colorp-c,.checker-bg,.gjs-sm-layer-preview{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==")}.gjs-no-user-select,.gjs-rte-toolbar,.gjs-layer-name,.gjs-grabbing,.gjs-grabbing *{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-pointer-events,.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el,.gjs-resizer-c{pointer-events:none}.gjs-bdrag{pointer-events:none !important;position:absolute !important;z-index:10 !important;width:auto}.gjs-drag-helper{background-color:#3b97e3 !important;pointer-events:none !important;position:absolute !important;z-index:10 !important;transform:scale(0.3) !important;transform-origin:top left !important;-webkit-transform-origin:top left !important;margin:15px !important;transition:none !important;outline:none !important}.gjs-grabbing,.gjs-grabbing *{cursor:grabbing !important;cursor:-webkit-grabbing !important}.gjs-grabbing{overflow:hidden}.gjs-off-prv{position:relative;z-index:10;padding:5px;cursor:pointer}.gjs-editor-cont ::-webkit-scrollbar-track{background:rgba(0,0,0,.1)}.gjs-editor-cont ::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.2)}.gjs-editor-cont ::-webkit-scrollbar{width:8px}.clear{clear:both}.no-select,.gjs-clm-tags #gjs-clm-close,.gjs-category-title,.gjs-layer-title,.gjs-block-category .gjs-title,.gjs-sm-sector-title,.gjs-com-no-select,.gjs-com-no-select img{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.gjs-no-touch-actions{touch-action:none}.gjs-disabled{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;opacity:.5;filter:alpha(opacity=50)}.gjs-editor{font-family:Helvetica,sans-serif;font-size:.75rem;position:relative;box-sizing:border-box;height:100%}.gjs-freezed,.gjs-freezed{opacity:.5;filter:alpha(opacity=50);pointer-events:none}.gjs-traits-label{border-bottom:1px solid rgba(0,0,0,.2);font-weight:lighter;margin-bottom:5px;padding:10px;text-align:left}.gjs-label-wrp{width:30%;min-width:30%}.gjs-field-wrp{flex-grow:1}.gjs-trt-header{font-weight:lighter;padding:10px}.gjs-trt-trait{display:flex;justify-content:flex-start;padding:5px 10px;font-weight:lighter;align-items:center;text-align:left}.gjs-trt-traits{font-size:.75rem}.gjs-trt-trait .gjs-label{text-align:left;text-overflow:ellipsis;overflow:hidden}.gjs-guide-info{position:absolute}.gjs-guide-info__content{position:absolute;height:100%;display:flex;width:100%;padding:5px}.gjs-guide-info__line{position:relative;margin:auto}.gjs-guide-info__line::before,.gjs-guide-info__line::after{content:"";display:block;position:absolute;background-color:inherit}.gjs-guide-info__y{padding:0 5px}.gjs-guide-info__y .gjs-guide-info__content{justify-content:center}.gjs-guide-info__y .gjs-guide-info__line{width:100%;height:1px}.gjs-guide-info__y .gjs-guide-info__line::before,.gjs-guide-info__y .gjs-guide-info__line::after{width:1px;height:10px;top:0;bottom:0;left:0;margin:auto}.gjs-guide-info__y .gjs-guide-info__line::after{left:auto;right:0}.gjs-guide-info__x{padding:5px 0}.gjs-guide-info__x .gjs-guide-info__content{align-items:center}.gjs-guide-info__x .gjs-guide-info__line{height:100%;width:1px}.gjs-guide-info__x .gjs-guide-info__line::before,.gjs-guide-info__x .gjs-guide-info__line::after{width:10px;height:1px;left:0;right:0;top:0;margin:auto;transform:translateX(-50%)}.gjs-guide-info__x .gjs-guide-info__line::after{top:auto;bottom:0}.gjs-badge{white-space:nowrap}.gjs-badge__icon{vertical-align:middle;display:inline-block;width:15px;height:15px}.gjs-badge__icon svg{fill:currentColor}.gjs-badge__name{display:inline-block;vertical-align:middle}.gjs-frame-wrapper{position:absolute;width:100%;height:100%;left:0;right:0;margin:auto}.gjs-frame-wrapper--anim{transition:width .35s ease,height .35s ease}.gjs-frame-wrapper__top{transform:translateY(-100%) translateX(-50%);display:flex;padding:5px 0;position:absolute;width:100%;left:50%;top:0}.gjs-frame-wrapper__top-r{margin-left:auto}.gjs-frame-wrapper__left{position:absolute;left:0;transform:translateX(-100%) translateY(-50%);height:100%;top:50%}.gjs-frame-wrapper__bottom{position:absolute;bottom:0;transform:translateY(100%) translateX(-50%);width:100%;left:50%}.gjs-frame-wrapper__right{position:absolute;right:0;transform:translateX(100%) translateY(-50%);height:100%;top:50%}.gjs-frame-wrapper__icon{width:24px;cursor:pointer}.gjs-frame-wrapper__icon>svg{fill:currentColor}.gjs-padding-v-top,.gjs-fixedpadding-v-top{width:100%;top:0;left:0}.gjs-padding-v-right,.gjs-fixedpadding-v-right{right:0}.gjs-padding-v-bottom,.gjs-fixedpadding-v-bottom{width:100%;left:0;bottom:0}.gjs-padding-v-left,.gjs-fixedpadding-v-left{left:0}.gjs-cv-canvas{box-sizing:border-box;width:85%;height:calc(100% - 40px);bottom:0;overflow:hidden;z-index:1;position:absolute;left:0;top:40px}.gjs-cv-canvas-bg{background-color:rgba(0,0,0,.15)}.gjs-cv-canvas.gjs-cui{width:100%;height:100%;top:0}.gjs-cv-canvas.gjs-is__grab .gjs-cv-canvas__frames,.gjs-cv-canvas.gjs-is__grabbing .gjs-cv-canvas__frames{pointer-events:none}.gjs-cv-canvas__frames{position:absolute;top:0;left:0;width:100%;height:100%}.gjs-cv-canvas .gjs-ghost{display:none;pointer-events:none;background-color:#5b5b5b;border:2px dashed #ccc;position:absolute;z-index:10;opacity:.55;filter:alpha(opacity=55)}.gjs-cv-canvas .gjs-highlighter,.gjs-cv-canvas .gjs-highlighter-sel{position:absolute;outline:1px solid #3b97e3;outline-offset:-1px;pointer-events:none;width:100%;height:100%}.gjs-cv-canvas .gjs-highlighter-warning{outline:3px solid #ffca6f}.gjs-cv-canvas .gjs-highlighter-sel{outline:2px solid #3b97e3;outline-offset:-2px}.gjs-cv-canvas #gjs-tools,.gjs-cv-canvas .gjs-tools{width:100%;height:100%;position:absolute;top:0;left:0;outline:none;z-index:1}.gjs-cv-canvas *{box-sizing:border-box}.gjs-frame{outline:medium none;height:100%;width:100%;border:none;margin:auto;display:block;transition:width .35s ease,height .35s ease;position:absolute;top:0;bottom:0;left:0;right:0}.gjs-toolbar{position:absolute;background-color:#3b97e3;white-space:nowrap;color:#fff;z-index:10;top:0;left:0}.gjs-toolbar-item{width:26px;padding:5px;cursor:pointer;display:inline-block}.gjs-toolbar-item svg{fill:currentColor;vertical-align:middle}.gjs-resizer-c{position:absolute;left:0;top:0;width:100%;height:100%;z-index:9}.gjs-margin-v-el,.gjs-padding-v-el,.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.1;filter:alpha(opacity=10);position:absolute;background-color:#ff0}.gjs-fixedmargin-v-el,.gjs-fixedpadding-v-el{opacity:.2;filter:alpha(opacity=20)}.gjs-padding-v-el,.gjs-fixedpadding-v-el{background-color:navy}.gjs-resizer-h{pointer-events:all;position:absolute;border:3px solid #3b97e3;width:10px;height:10px;background-color:#fff;margin:-5px}.gjs-resizer-h-tl{top:0;left:0;cursor:nwse-resize}.gjs-resizer-h-tr{top:0;right:0;cursor:nesw-resize}.gjs-resizer-h-tc{top:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-cl{left:0;margin:auto -5px;top:0;bottom:0;cursor:ew-resize}.gjs-resizer-h-cr{margin:auto -5px;top:0;bottom:0;right:0;cursor:ew-resize}.gjs-resizer-h-bl{bottom:0;left:0;cursor:nesw-resize}.gjs-resizer-h-bc{bottom:0;margin:-5px auto;left:0;right:0;cursor:ns-resize}.gjs-resizer-h-br{bottom:0;right:0;cursor:nwse-resize}.gjs-pn-panel .gjs-resizer-h{background-color:rgba(0,0,0,.2);border:none;opacity:0;transition:opacity .25s}.gjs-pn-panel .gjs-resizer-h:hover{opacity:1}.gjs-pn-panel .gjs-resizer-h-tc,.gjs-pn-panel .gjs-resizer-h-bc{margin:0 auto;width:100%}.gjs-pn-panel .gjs-resizer-h-cr,.gjs-pn-panel .gjs-resizer-h-cl{margin:auto 0;height:100%}.gjs-resizing .gjs-highlighter,.gjs-resizing .gjs-badge{display:none !important}.gjs-resizing-tl *{cursor:nwse-resize !important}.gjs-resizing-tr *{cursor:nesw-resize !important}.gjs-resizing-tc *{cursor:ns-resize !important}.gjs-resizing-cl *{cursor:ew-resize !important}.gjs-resizing-cr *{cursor:ew-resize !important}.gjs-resizing-bl *{cursor:nesw-resize !important}.gjs-resizing-bc *{cursor:ns-resize !important}.gjs-resizing-br *{cursor:nwse-resize !important}.btn-cl,.gjs-am-close,.gjs-mdl-btn-close{opacity:.3;filter:alpha(opacity=30);font-size:25px;cursor:pointer}.btn-cl:hover,.gjs-am-close:hover,.gjs-mdl-btn-close:hover{opacity:.7;filter:alpha(opacity=70)}.no-dots,.ui-resizable-handle{border:none !important;margin:0 !important;outline:none !important}.gjs-com-dashed *{outline:1px dashed #888;outline-offset:-2px;box-sizing:border-box}.gjs-com-badge,.gjs-badge{pointer-events:none;background-color:#3b97e3;color:#fff;padding:2px 5px;position:absolute;z-index:1;font-size:12px;outline:none;display:none}.gjs-badge-warning{background-color:#ffca6f}.gjs-placeholder,.gjs-com-placeholder,.gjs-placeholder{position:absolute;z-index:10;pointer-events:none;display:none}.gjs-placeholder,.gjs-placeholder{border-style:solid !important;outline:none;box-sizing:border-box;transition:top .2s,left .2s,width .2s,height .2s}.gjs-placeholder.horizontal,.gjs-com-placeholder.horizontal,.gjs-placeholder.horizontal{border-color:rgba(0,0,0,0) #62c462;border-width:3px 5px;margin:-3px 0 0}.gjs-placeholder.vertical,.gjs-com-placeholder.vertical,.gjs-placeholder.vertical{border-color:#62c462 rgba(0,0,0,0);border-width:5px 3px;margin:0 0 0 -3px}.gjs-placeholder-int,.gjs-com-placeholder-int,.gjs-placeholder-int{background-color:#62c462;box-shadow:0 0 3px rgba(0,0,0,.2);height:100%;width:100%;pointer-events:none;padding:1.5px;outline:none}.gjs-pn-panel{display:inline-block;position:absolute;box-sizing:border-box;text-align:center;padding:5px;z-index:3}.gjs-pn-panel .icon-undo,.gjs-pn-panel .icon-redo{font-size:20px;height:30px;width:25px}.gjs-pn-commands{width:85%;left:0;top:0;box-shadow:0 0 5px rgba(0,0,0,.2)}.gjs-pn-options{right:15%;top:0}.gjs-pn-views{border-bottom:2px solid rgba(0,0,0,.2);right:0;width:15%;z-index:4}.gjs-pn-views-container{height:100%;padding:42px 0 0;right:0;width:15%;overflow:auto;box-shadow:0 0 5px rgba(0,0,0,.2)}.gjs-pn-buttons{align-items:center;display:flex;justify-content:space-between}.gjs-pn-btn{box-sizing:border-box;min-height:30px;min-width:30px;line-height:21px;background-color:rgba(0,0,0,0);border:none;font-size:18px;margin-right:5px;border-radius:2px;padding:4px;position:relative;cursor:pointer}.gjs-pn-btn.gjs-pn-active{background-color:rgba(0,0,0,.15);box-shadow:0 0 3px rgba(0,0,0,.25) inset}.gjs-pn-btn svg{fill:currentColor}.gjs-label{line-height:18px}.gjs-fields{display:flex}.gjs-select{padding:0;width:100%}.gjs-select select{padding-right:10px}.gjs-select:-moz-focusring,.gjs-select select:-moz-focusring{color:rgba(0,0,0,0);text-shadow:0 0 0 rgba(255,255,255,.7)}.gjs-input:focus,.gjs-button:focus,.gjs-btn-prim:focus,.gjs-select:focus,.gjs-select select:focus{outline:none}.gjs-field input,.gjs-field select,.gjs-field textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;color:inherit;border:none;background-color:rgba(0,0,0,0);box-sizing:border-box;width:100%;position:relative;padding:5px;z-index:1}.gjs-field input:focus,.gjs-field select:focus,.gjs-field textarea:focus{outline:none}.gjs-field input[type=number]{-moz-appearance:textfield}.gjs-field input[type=number]::-webkit-outer-spin-button,.gjs-field input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.gjs-field-range{flex:9 1 auto}.gjs-field-integer input{padding-right:30px}.gjs-select option,.gjs-field-select option,.gjs-clm-select option,.gjs-sm-select option,.gjs-fields option,.gjs-sm-unit option{background-color:#444;color:#ddd}.gjs-field{background-color:rgba(0,0,0,.2);border:none;box-shadow:none;border-radius:2px;box-sizing:border-box;padding:0;position:relative}.gjs-field textarea{resize:vertical}.gjs-field .gjs-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;z-index:0}.gjs-field .gjs-d-s-arrow{bottom:0;top:0;margin:auto;right:5px;border-top:4px solid rgba(255,255,255,.7);position:absolute;height:0;width:0;border-left:3px solid rgba(0,0,0,0);border-right:4px solid rgba(0,0,0,0);cursor:pointer}.gjs-field-arrows{position:absolute;cursor:ns-resize;margin:auto;height:20px;width:9px;z-index:10;bottom:0;right:3px;top:0}.gjs-field-color,.gjs-field-radio{width:100%}.gjs-field-color input{padding-right:22px;box-sizing:border-box}.gjs-field-colorp{border-left:1px solid rgba(0,0,0,.2);box-sizing:border-box;height:100%;padding:2px;position:absolute;right:0;top:0;width:22px;z-index:10}.gjs-field-colorp .gjs-checker-bg,.gjs-field-colorp .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-field-colorp-c{height:100%;position:relative;width:100%}.gjs-field-color-picker{background-color:#ddd;cursor:pointer;height:100%;width:100%;box-shadow:0 0 1px rgba(0,0,0,.2);border-radius:1px;position:absolute;top:0}.gjs-field-checkbox{padding:0;width:17px;height:17px;display:block;cursor:pointer}.gjs-field-checkbox input{display:none}.gjs-field-checkbox input:checked+.gjs-chk-icon{border-color:rgba(255,255,255,.5);border-width:0 2px 2px 0;border-style:solid}.gjs-radio-item{flex:1 1 auto;text-align:center;border-left:1px solid rgba(0,0,0,.2)}.gjs-radio-item:first-child{border:none}.gjs-radio-item:hover{background:rgba(0,0,0,.2)}.gjs-radio-item input{display:none}.gjs-radio-item input:checked+.gjs-radio-item-label{background-color:rgba(255,255,255,.2)}.gjs-radio-items{display:flex}.gjs-radio-item-label{cursor:pointer;display:block;padding:5px}.gjs-field-units{position:absolute;margin:auto;right:10px;bottom:0;top:0}.gjs-field-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,.7);cursor:pointer}.gjs-input-unit{text-align:center}.gjs-field-arrow-u,.gjs-field-arrow-d{position:absolute;height:0;width:0;border-left:3px solid rgba(0,0,0,0);border-right:4px solid rgba(0,0,0,0);border-top:4px solid rgba(255,255,255,.7);bottom:4px;cursor:pointer}.gjs-field-arrow-u{border-bottom:4px solid rgba(255,255,255,.7);border-top:none;top:4px}.gjs-field-select{padding:0}.gjs-field-range{background-color:rgba(0,0,0,0);border:none;box-shadow:none;padding:0}.gjs-field-range input{margin:0;height:100%}.gjs-field-range input:focus{outline:none}.gjs-field-range input::-webkit-slider-thumb{-webkit-appearance:none;margin-top:-4px;height:10px;width:10px;border:1px solid rgba(0,0,0,.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-ms-thumb{height:10px;width:10px;border:1px solid rgba(0,0,0,.2);border-radius:100%;background-color:#ddd;cursor:pointer}.gjs-field-range input::-moz-range-track{background-color:rgba(0,0,0,.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-webkit-slider-runnable-track{background-color:rgba(0,0,0,.2);border-radius:1px;margin-top:3px;height:3px}.gjs-field-range input::-ms-track{background-color:rgba(0,0,0,.2);border-radius:1px;margin-top:3px;height:3px}.gjs-btn-prim{color:inherit;background-color:rgba(255,255,255,.1);border-radius:2px;padding:3px 6px;padding:5px;cursor:pointer;border:none}.gjs-btn-prim:active{background-color:rgba(255,255,255,.1)}.gjs-btn--full{width:100%}.gjs-chk-icon{-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg);box-sizing:border-box;display:block;height:14px;margin:0 5px;width:6px}.gjs-add-trasp{background:none;border:none;color:#ddd;cursor:pointer;font-size:1em;border-radius:2px;opacity:.75;filter:alpha(opacity=75)}.gjs-add-trasp:hover{opacity:1;filter:alpha(opacity=100)}.gjs-add-trasp:active{background-color:rgba(0,0,0,.2)}.gjs-devices-c{display:flex;align-items:center;padding:2px 3px 3px 3px}.gjs-devices-c .gjs-device-label{flex-grow:2;text-align:left;margin-right:10px}.gjs-devices-c .gjs-select{flex-grow:20}.gjs-devices-c .gjs-add-trasp{flex-grow:1;margin-left:5px}.gjs-category-open,.gjs-block-category.gjs-open,.gjs-sm-sector.gjs-sm-open{border-bottom:1px solid rgba(0,0,0,.25)}.gjs-category-title,.gjs-layer-title,.gjs-block-category .gjs-title,.gjs-sm-sector-title{font-weight:lighter;background-color:rgba(0,0,0,.1);letter-spacing:1px;padding:9px 10px 9px 20px;border-bottom:1px solid rgba(0,0,0,.25);text-align:left;position:relative;cursor:pointer}.gjs-sm-clear{cursor:pointer;width:14px;min-width:14px;height:14px;margin-left:3px}.gjs-sm-header{font-weight:lighter;padding:10px}.gjs-sm-sector{clear:both;font-weight:lighter;text-align:left}.gjs-sm-sector-title{display:flex;align-items:center}.gjs-sm-sector-caret{width:17px;height:17px;min-width:17px;transform:rotate(-90deg)}.gjs-sm-sector-label{margin-left:5px}.gjs-sm-sector.gjs-sm-open .gjs-sm-sector-caret{transform:none}.gjs-sm-properties{font-size:.75rem;padding:10px 5px;display:flex;flex-wrap:wrap;align-items:flex-end;box-sizing:border-box;width:100%}.gjs-sm-label{margin:5px 5px 3px 0;display:flex;align-items:center}.gjs-sm-close-btn,.gjs-sm-preview-file-close{display:block;font-size:23px;position:absolute;cursor:pointer;right:5px;top:0;opacity:.7;filter:alpha(opacity=70)}.gjs-sm-close-btn:hover,.gjs-sm-preview-file-close:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-sm-field,.gjs-clm-select,.gjs-clm-field{width:100%;position:relative}.gjs-sm-field input,.gjs-clm-select input,.gjs-clm-field input,.gjs-sm-field select,.gjs-clm-select select,.gjs-clm-field select{background-color:rgba(0,0,0,0);color:rgba(255,255,255,.7);border:none;width:100%}.gjs-sm-field input,.gjs-clm-select input,.gjs-clm-field input{box-sizing:border-box}.gjs-sm-field select,.gjs-clm-select select,.gjs-clm-field select{position:relative;z-index:1;-webkit-appearance:none;-moz-appearance:none;appearance:none}.gjs-sm-field select::-ms-expand,.gjs-clm-select select::-ms-expand,.gjs-clm-field select::-ms-expand{display:none}.gjs-sm-field select:-moz-focusring,.gjs-clm-select select:-moz-focusring,.gjs-clm-field select:-moz-focusring{color:rgba(0,0,0,0);text-shadow:0 0 0 rgba(255,255,255,.7)}.gjs-sm-field input:focus,.gjs-clm-select input:focus,.gjs-clm-field input:focus,.gjs-sm-field select:focus,.gjs-clm-select select:focus,.gjs-clm-field select:focus{outline:none}.gjs-sm-field .gjs-sm-unit,.gjs-clm-select .gjs-sm-unit,.gjs-clm-field .gjs-sm-unit{position:absolute;right:10px;top:3px;font-size:10px;color:rgba(255,255,255,.7);cursor:pointer}.gjs-sm-field .gjs-clm-sel-arrow,.gjs-clm-select .gjs-clm-sel-arrow,.gjs-clm-field .gjs-clm-sel-arrow,.gjs-sm-field .gjs-sm-int-arrows,.gjs-clm-select .gjs-sm-int-arrows,.gjs-clm-field .gjs-sm-int-arrows,.gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-select .gjs-sm-sel-arrow,.gjs-clm-field .gjs-sm-sel-arrow{height:100%;width:9px;position:absolute;right:0;top:0;cursor:ns-resize}.gjs-sm-field .gjs-sm-sel-arrow,.gjs-clm-select .gjs-sm-sel-arrow,.gjs-clm-field .gjs-sm-sel-arrow{cursor:pointer}.gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-select .gjs-clm-d-s-arrow,.gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-select .gjs-sm-d-arrow,.gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-select .gjs-sm-d-s-arrow,.gjs-clm-field .gjs-sm-d-s-arrow,.gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-select .gjs-sm-u-arrow,.gjs-clm-field .gjs-sm-u-arrow{position:absolute;height:0;width:0;border-left:3px solid rgba(0,0,0,0);border-right:4px solid rgba(0,0,0,0);cursor:pointer}.gjs-sm-field .gjs-sm-u-arrow,.gjs-clm-select .gjs-sm-u-arrow,.gjs-clm-field .gjs-sm-u-arrow{border-bottom:4px solid rgba(255,255,255,.7);top:4px}.gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-select .gjs-clm-d-s-arrow,.gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-field .gjs-sm-d-arrow,.gjs-clm-select .gjs-sm-d-arrow,.gjs-clm-field .gjs-sm-d-arrow,.gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-select .gjs-sm-d-s-arrow,.gjs-clm-field .gjs-sm-d-s-arrow{border-top:4px solid rgba(255,255,255,.7);bottom:4px}.gjs-sm-field .gjs-clm-d-s-arrow,.gjs-clm-select .gjs-clm-d-s-arrow,.gjs-clm-field .gjs-clm-d-s-arrow,.gjs-sm-field .gjs-sm-d-s-arrow,.gjs-clm-select .gjs-sm-d-s-arrow,.gjs-clm-field .gjs-sm-d-s-arrow{bottom:7px}.gjs-sm-field.gjs-sm-color,.gjs-sm-color.gjs-clm-field,.gjs-sm-field.gjs-sm-input,.gjs-sm-input.gjs-clm-field,.gjs-sm-field.gjs-sm-integer,.gjs-sm-integer.gjs-clm-field,.gjs-sm-field.gjs-sm-list,.gjs-sm-list.gjs-clm-field,.gjs-sm-field.gjs-sm-select,.gjs-clm-select,.gjs-sm-select.gjs-clm-field{background-color:rgba(0,0,0,.2);border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 0 rgba(255,255,255,.1);color:rgba(255,255,255,.7);border-radius:2px;box-sizing:border-box;padding:0 5px}.gjs-sm-field.gjs-sm-composite,.gjs-sm-composite.gjs-clm-select,.gjs-sm-composite.gjs-clm-field{border-radius:2px}.gjs-sm-field.gjs-sm-select,.gjs-clm-select,.gjs-sm-select.gjs-clm-field{padding:0}.gjs-sm-field.gjs-sm-select select,.gjs-clm-select select,.gjs-sm-select.gjs-clm-field select{height:20px}.gjs-sm-field.gjs-sm-select option,.gjs-clm-select option,.gjs-sm-select.gjs-clm-field option{padding:3px 0}.gjs-sm-field.gjs-sm-composite,.gjs-sm-composite.gjs-clm-select,.gjs-sm-composite.gjs-clm-field{background-color:rgba(0,0,0,.1);border:1px solid rgba(0,0,0,.25)}.gjs-sm-field.gjs-sm-list,.gjs-sm-list.gjs-clm-select,.gjs-sm-list.gjs-clm-field{width:auto;padding:0;overflow:hidden;float:left}.gjs-sm-field.gjs-sm-list input,.gjs-sm-list.gjs-clm-select input,.gjs-sm-list.gjs-clm-field input{display:none}.gjs-sm-field.gjs-sm-list label,.gjs-sm-list.gjs-clm-select label,.gjs-sm-list.gjs-clm-field label{cursor:pointer;padding:5px;display:block}.gjs-sm-field.gjs-sm-list .gjs-sm-radio:checked+label,.gjs-sm-list.gjs-clm-select .gjs-sm-radio:checked+label,.gjs-sm-list.gjs-clm-field .gjs-sm-radio:checked+label{background-color:rgba(255,255,255,.2)}.gjs-sm-field.gjs-sm-list .gjs-sm-icon,.gjs-sm-list.gjs-clm-select .gjs-sm-icon,.gjs-sm-list.gjs-clm-field .gjs-sm-icon{background-repeat:no-repeat;background-position:center;text-shadow:none;line-height:normal}.gjs-sm-field.gjs-sm-integer select,.gjs-sm-integer.gjs-clm-select select,.gjs-sm-integer.gjs-clm-field select{width:auto;padding:0}.gjs-sm-list .gjs-sm-el{float:left;border-left:1px solid rgba(0,0,0,.2)}.gjs-sm-list .gjs-sm-el:first-child{border:none}.gjs-sm-list .gjs-sm-el:hover{background:rgba(0,0,0,.2)}.gjs-sm-slider .gjs-field-integer{flex:1 1 65px}.gjs-sm-property{box-sizing:border-box;float:left;width:50%;margin-bottom:5px;padding:0 5px}.gjs-sm-property--full,.gjs-sm-property.gjs-sm-composite,.gjs-sm-property.gjs-sm-file,.gjs-sm-property.gjs-sm-list,.gjs-sm-property.gjs-sm-stack,.gjs-sm-property.gjs-sm-slider,.gjs-sm-property.gjs-sm-color{width:100%}.gjs-sm-property .gjs-sm-btn{background-color:rgba(33,33,33,.2);border-radius:2px;box-shadow:1px 1px 0 rgba(5,5,5,.2),1px 1px 0 rgba(43,43,43,.2) inset;padding:5px;position:relative;text-align:center;height:auto;width:100%;cursor:pointer;color:#ddd;box-sizing:border-box;text-shadow:-1px -1px 0 rgba(0,0,0,.2);border:none;opacity:.85;filter:alpha(opacity=85)}.gjs-sm-property .gjs-sm-btn-c{box-sizing:border-box;float:left;width:100%}.gjs-sm-property__text-shadow .gjs-sm-layer-preview-cnt::after{color:#000;content:"T";font-weight:900;line-height:17px;padding:0 4px}.gjs-sm-preview-file{background-color:rgba(255,255,255,.05);border-radius:2px;margin-top:5px;position:relative;overflow:hidden;border:1px solid rgba(252,252,252,.05);padding:3px 20px}.gjs-sm-preview-file-cnt{background-size:auto 100%;background-repeat:no-repeat;background-position:center center;height:50px}.gjs-sm-preview-file-close{top:-5px;width:14px;height:14px}.gjs-sm-layers{margin-top:5px;padding:1px 3px;min-height:30px}.gjs-sm-layer{background-color:rgba(255,255,255,.055);border-radius:2px;margin:2px 0;padding:7px;position:relative}.gjs-sm-layer.gjs-sm-active{background-color:rgba(255,255,255,.12)}.gjs-sm-layer .gjs-sm-label-wrp{display:flex;align-items:center}.gjs-sm-layer #gjs-sm-move{height:14px;width:14px;min-width:14px;cursor:grab}.gjs-sm-layer #gjs-sm-label{flex-grow:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0 5px}.gjs-sm-layer-preview{height:15px;width:15px;min-width:15px;margin-right:5px;border-radius:2px}.gjs-sm-layer-preview-cnt{border-radius:2px;background-color:#fff;height:100%;width:100%;background-size:cover !important}.gjs-sm-layer #gjs-sm-close-layer{display:block;cursor:pointer;height:14px;width:14px;min-width:14px;opacity:.5;filter:alpha(opacity=50)}.gjs-sm-layer #gjs-sm-close-layer:hover{opacity:.8;filter:alpha(opacity=80)}.gjs-sm-stack .gjs-sm-properties{padding:5px 0 0}.gjs-sm-stack #gjs-sm-add{background:none;border:none;cursor:pointer;outline:none;position:absolute;right:0;top:-17px;opacity:.75;padding:0;width:18px;height:18px}.gjs-sm-stack #gjs-sm-add:hover{opacity:1;filter:alpha(opacity=100)}.gjs-sm-colorp-c{height:100%;width:20px;position:absolute;right:0;top:0;box-sizing:border-box;border-radius:2px;padding:2px}.gjs-sm-colorp-c .gjs-checker-bg,.gjs-sm-colorp-c .gjs-field-colorp-c{height:100%;width:100%;border-radius:1px}.gjs-sm-color-picker{background-color:#ddd;cursor:pointer;height:16px;width:100%;margin-top:-16px;box-shadow:0 0 1px rgba(0,0,0,.2);border-radius:1px}.gjs-sm-btn-upload #gjs-sm-upload{left:0;top:0;position:absolute;width:100%;opacity:0;cursor:pointer}.gjs-sm-btn-upload #gjs-sm-label{padding:2px 0}.gjs-sm-layer>#gjs-sm-move{opacity:.7;filter:alpha(opacity=70);cursor:move;font-size:12px;float:left;margin:0 5px 0 0}.gjs-sm-layer>#gjs-sm-move:hover{opacity:.9;filter:alpha(opacity=90)}.gjs-blocks-c{display:flex;flex-wrap:wrap;justify-content:flex-start}.gjs-block-categories{display:flex;flex-direction:column}.gjs-block-category{width:100%}.gjs-block-category .gjs-caret-icon{margin-right:5px}.gjs-block{-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;width:45%;min-width:45px;padding:1em;box-sizing:border-box;min-height:90px;cursor:all-scroll;font-size:11px;font-weight:lighter;text-align:center;display:flex;flex-direction:column;justify-content:space-between;border:1px solid rgba(0,0,0,.2);border-radius:3px;margin:10px 2.5% 5px;box-shadow:0 1px 0 0 rgba(0,0,0,.15);transition:all .2s ease 0s;transition-property:box-shadow,color}.gjs-block:hover{box-shadow:0 3px 4px 0 rgba(0,0,0,.15)}.gjs-block svg{fill:currentColor}.gjs-block__media{margin-bottom:10px;pointer-events:none}.gjs-block-svg{width:54px;fill:currentColor}.gjs-block-svg-path{fill:currentColor}.gjs-block.fa{font-size:2em;line-height:2em;padding:11px}.gjs-block-label{line-height:normal;font-size:.65rem;font-weight:normal;font-family:Helvetica,sans-serif;overflow:hidden;text-overflow:ellipsis;pointer-events:none}.gjs-block.gjs-bdrag{width:auto;padding:0}.gjs-selected-parent{border:1px solid #ffca6f}.gjs-opac50{opacity:.5;filter:alpha(opacity=50)}.gjs-layer{font-weight:lighter;text-align:left;position:relative;background-color:rgba(0,0,0,.1);font-size:.75rem;display:grid}.gjs-layer-hidden{opacity:.55;filter:alpha(opacity=55)}.gjs-layer-count{position:absolute;right:27px;top:9px}.gjs-layer-vis{left:0;top:0;padding:7px 5px 7px 10px;position:absolute;box-sizing:content-box;cursor:pointer;width:13px;z-index:1}.gjs-layer-vis-off{display:none}.gjs-layer-vis.gjs-layer-off .gjs-layer-vis-on{display:none}.gjs-layer-vis.gjs-layer-off .gjs-layer-vis-off{display:block}.gjs-layer-caret{width:15px;padding:2px;cursor:pointer;position:absolute;box-sizing:content-box;left:-15px;top:0;transform:rotate(90deg);opacity:.7;filter:alpha(opacity=70)}.gjs-layer-caret:hover{opacity:1;filter:alpha(opacity=100)}.gjs-layer-caret.gjs-layer-open{transform:rotate(180deg)}.gjs-layer-title{padding:3px 10px 5px 30px;display:flex;align-items:center}.gjs-layer-title-inn{align-items:center;position:relative;display:flex;width:100%}.gjs-layer__icon{display:block;width:100%;max-width:15px;max-height:15px;padding-left:5px}.gjs-layer__icon svg{fill:currentColor}.gjs-layer-name{padding:5px 0;display:inline-block;box-sizing:content-box;overflow:hidden;white-space:nowrap;margin:0 30px 0 5px;max-width:170px}.gjs-layer-name--no-edit{text-overflow:ellipsis}.gjs-layer>.gjs-layer-children{display:none}.gjs-layer.open>.gjs-layer-children{display:block}.gjs-layer-no-chld>.gjs-layer-title-inn>.gjs-layer-caret{display:none}.gjs-layer-move{padding:9px 7px;position:absolute;width:13px;box-sizing:content-box;cursor:move;right:0;top:0}.gjs-layer.gjs-hovered .gjs-layer-title{background-color:rgba(255,255,255,.015)}.gjs-layer.gjs-selected .gjs-layer-title{background-color:rgba(255,255,255,.1)}.gjs-layers{position:relative;height:100%}.gjs-layers #gjs-placeholder{width:100%;position:absolute}.gjs-layers #gjs-placeholder #gjs-plh-int{height:100%;padding:1px}.gjs-layers #gjs-placeholder #gjs-plh-int.gjs-insert{background-color:#62c462}#gjs-clm-add-tag,.gjs-clm-tags-btn{background-color:rgba(255,255,255,.15);border-radius:2px;padding:3px;margin-right:3px;border:1px solid rgba(0,0,0,.15);width:24px;height:24px;box-sizing:border-box;cursor:pointer}.gjs-clm-tags-btn svg{fill:currentColor;display:block}.gjs-clm-header{display:flex;align-items:center;margin:7px 0}.gjs-clm-header-status{flex-shrink:1;margin-left:auto}.gjs-clm-tag{display:flex;overflow:hidden;align-items:center;border-radius:3px;margin:0 3px 3px 0;padding:5px;cursor:default}.gjs-clm-tag-status,.gjs-clm-tag-close{width:12px;height:12px;flex-shrink:1}.gjs-clm-tag-status svg,.gjs-clm-tag-close svg{vertical-align:middle;fill:currentColor}.gjs-clm-sels-info{margin:7px 0;text-align:left}.gjs-clm-sel-id{font-size:.9em;opacity:.5;filter:alpha(opacity=50)}.gjs-clm-label-sel{float:left;padding-right:5px}.gjs-clm-tags{font-size:.75rem;padding:10px 5px}.gjs-clm-tags #gjs-clm-sel{padding:7px 0;float:left}.gjs-clm-tags #gjs-clm-sel{font-style:italic;margin-left:5px}.gjs-clm-tags #gjs-clm-tags-field{clear:both;padding:5px;margin-bottom:5px;display:flex;flex-wrap:wrap}.gjs-clm-tags #gjs-clm-tags-c{display:flex;flex-wrap:wrap;vertical-align:top;overflow:hidden}.gjs-clm-tags #gjs-clm-new{color:#ddd;padding:5px 6px;display:none}.gjs-clm-tags #gjs-clm-close{opacity:.85;filter:alpha(opacity=85);font-size:20px;line-height:0;cursor:pointer;color:rgba(255,255,255,.9)}.gjs-clm-tags #gjs-clm-close:hover{opacity:1;filter:alpha(opacity=100)}.gjs-clm-tags #gjs-clm-checkbox{color:rgba(255,255,255,.9);vertical-align:middle;cursor:pointer;font-size:9px}.gjs-clm-tags #gjs-clm-tag-label{flex-grow:1;text-overflow:ellipsis;overflow:hidden;padding:0 3px;cursor:text}.gjs-mdl-container{font-family:Helvetica,sans-serif;overflow-y:auto;position:fixed;background-color:rgba(0,0,0,.5);display:flex;top:0;left:0;right:0;bottom:0;z-index:100}.gjs-mdl-dialog{text-shadow:-1px -1px 0 rgba(0,0,0,.05);animation:gjs-slide-down .215s;margin:auto;max-width:850px;width:90%;border-radius:3px;font-weight:lighter;position:relative;z-index:2}.gjs-mdl-title{font-size:1rem}.gjs-mdl-btn-close{position:absolute;right:15px;top:5px}.gjs-mdl-active .gjs-mdl-dialog{animation:gjs-mdl-slide-down .216s}.gjs-mdl-header,.gjs-mdl-content{padding:10px 15px;clear:both}.gjs-mdl-header{position:relative;border-bottom:1px solid rgba(0,0,0,.2);padding:15px 15px 7px}.gjs-export-dl::after{content:"";clear:both;display:block;margin-bottom:10px}.gjs-dropzone{display:none;opacity:0;position:absolute;top:0;left:0;z-index:11;width:100%;height:100%;transition:opacity .25s;pointer-events:none}.gjs-dropzone-active .gjs-dropzone{display:block;opacity:1}.gjs-am-assets{height:290px;overflow:auto;clear:both;display:flex;flex-wrap:wrap;align-items:flex-start;align-content:flex-start}.gjs-am-assets-header{padding:5px}.gjs-am-add-asset .gjs-am-add-field{width:70%;float:left}.gjs-am-add-asset button{width:25%;float:right}.gjs-am-preview-cont{position:relative;height:70px;width:30%;background-color:#444;border-radius:2px;float:left;overflow:hidden}.gjs-am-preview{position:absolute;background-position:center center;background-size:cover;background-repeat:no-repeat;height:100%;width:100%;z-index:1}.gjs-am-preview-bg{opacity:.5;filter:alpha(opacity=50);position:absolute;height:100%;width:100%;z-index:0}.gjs-am-dimensions{opacity:.5;filter:alpha(opacity=50);font-size:10px}.gjs-am-meta{width:70%;float:left;font-size:12px;padding:5px 0 0 5px;box-sizing:border-box}.gjs-am-meta>div{margin-bottom:5px}.gjs-am-close{cursor:pointer;position:absolute;right:5px;top:0;display:none}.gjs-am-asset{border-bottom:1px solid rgba(0,0,0,.2);padding:5px;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.gjs-am-asset:hover .gjs-am-close{display:block}.gjs-am-highlight{background-color:rgba(255,255,255,.1)}.gjs-am-assets-cont{background-color:rgba(0,0,0,.1);border-radius:3px;box-sizing:border-box;padding:10px;width:45%;float:right;height:325px;overflow:hidden}.gjs-am-file-uploader{width:55%;float:left}.gjs-am-file-uploader>form{background-color:rgba(0,0,0,.1);border:2px dashed;border-radius:3px;position:relative;text-align:center;margin-bottom:15px}.gjs-am-file-uploader>form.gjs-am-hover{border:2px solid #62c462;color:#75cb75}.gjs-am-file-uploader>form.gjs-am-disabled{border-color:red}.gjs-am-file-uploader>form #gjs-am-uploadFile{opacity:0;filter:alpha(opacity=0);padding:150px 10px;width:100%;box-sizing:border-box}.gjs-am-file-uploader #gjs-am-title{position:absolute;padding:150px 10px;width:100%}.gjs-cm-editor-c{float:left;box-sizing:border-box;width:50%}.gjs-cm-editor-c .CodeMirror{height:450px}.gjs-cm-editor{font-size:12px}.gjs-cm-editor#gjs-cm-htmlmixed{padding-right:10px;border-right:1px solid rgba(0,0,0,.2)}.gjs-cm-editor#gjs-cm-htmlmixed #gjs-cm-title{color:#a97d44}.gjs-cm-editor#gjs-cm-css{padding-left:10px}.gjs-cm-editor#gjs-cm-css #gjs-cm-title{color:#ddca7e}.gjs-cm-editor #gjs-cm-title{background-color:rgba(0,0,0,.2);font-size:12px;padding:5px 10px 3px;text-align:right}.gjs-rte-toolbar{position:absolute;z-index:10}.gjs-rte-toolbar-ui{border:1px solid rgba(0,0,0,.2);border-radius:3px}.gjs-rte-actionbar{display:flex}.gjs-rte-action{display:flex;align-items:center;justify-content:center;padding:5px;width:25px;border-right:1px solid rgba(0,0,0,.2);text-align:center;cursor:pointer;outline:none}.gjs-rte-action:last-child{border-right:none}.gjs-rte-action:hover{background-color:rgba(255,255,255,.1)}.gjs-rte-active{background-color:rgba(255,255,255,.1)}.gjs-rte-disabled{color:rgba(255,255,255,.1);cursor:not-allowed}.gjs-rte-disabled:hover{background-color:unset}.gjs-editor-cont .sp-hue,.gjs-editor-cont .sp-slider{cursor:row-resize}.gjs-editor-cont .sp-color,.gjs-editor-cont .sp-dragger{cursor:crosshair}.gjs-editor-cont .sp-alpha-inner,.gjs-editor-cont .sp-alpha-handle{cursor:col-resize}.gjs-editor-cont .sp-hue{left:90%}.gjs-editor-cont .sp-color{right:15%}.gjs-editor-cont .sp-container{border:1px solid rgba(0,0,0,.2);box-shadow:0 0 7px rgba(0,0,0,.2);border-radius:3px}.gjs-editor-cont .sp-picker-container{border:none}.gjs-editor-cont .colpick_dark .colpick_color{outline:1px solid rgba(0,0,0,.2)}.gjs-editor-cont .sp-cancel,.gjs-editor-cont .sp-cancel:hover{bottom:-8px;color:#777 !important;font-size:25px;left:0;position:absolute;text-decoration:none}.gjs-editor-cont .sp-alpha-handle{background-color:#ccc;border:1px solid #555;width:4px}.gjs-editor-cont .sp-color,.gjs-editor-cont .sp-hue{border:1px solid #333}.gjs-editor-cont .sp-slider{background-color:#ccc;border:1px solid #555;height:3px;left:-4px;width:22px}.gjs-editor-cont .sp-dragger{background:rgba(0,0,0,0);box-shadow:0 0 0 1px #111}.gjs-editor-cont .sp-button-container{float:none;width:100%;position:relative;text-align:right}.gjs-editor-cont .sp-container button,.gjs-editor-cont .sp-container button:hover,.gjs-editor-cont .sp-container button:active{background:rgba(0,0,0,.2);border-color:rgba(0,0,0,.2);color:#ddd;text-shadow:none;box-shadow:none;padding:3px 5px}.gjs-editor-cont .sp-palette-container{border:none;float:none;margin:0;padding:5px 10px 0}.gjs-editor-cont .sp-palette .sp-thumb-el,.gjs-editor-cont .sp-palette .sp-thumb-el:hover{border:1px solid rgba(0,0,0,.9)}.gjs-editor-cont .sp-palette .sp-thumb-el:hover,.gjs-editor-cont .sp-palette .sp-thumb-el.sp-thumb-active{border-color:rgba(0,0,0,.9)}.gjs-hidden{display:none}@keyframes gjs-slide-down{0%{transform:translate(0, -3rem);opacity:0}100%{transform:translate(0, 0);opacity:1}}@keyframes gjs-slide-up{0%{transform:translate(0, 0);opacity:1}100%{transform:translate(0, -3rem);opacity:0}}.cm-s-hopscotch span.cm-error{color:#fff} diff --git a/web/static/grapesjs@0.21.4.min.js b/web/static/grapesjs@0.21.4.min.js deleted file mode 100644 index 7a16df4..0000000 --- a/web/static/grapesjs@0.21.4.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/*! grapesjs - 0.21.4 */ -!function(t,e){if('object'==typeof exports&&'object'==typeof module)module.exports=e();else if('function'==typeof define&&define.amd)define([],e);else{var n=e();for(var o in n)('object'==typeof exports?exports:t)[o]=n[o]}}('undefined'!=typeof globalThis?globalThis:'undefined'!=typeof window?window:this,(()=>(()=>{var t={410:(t,e,n)=>{var o,r,i;1&&(r=[n(50),n(316)],void 0===(i='function'==typeof(o=function(t,e){var n=Array.prototype.slice;function o(t,e,n){return n.length<=4?t.call(e,n[0],n[1],n[2],n[3]):t.apply(e,n)}function r(t,e){return n.call(t,e)}function i(e,n){return null!=e&&(t.isArray(n)||(n=r(arguments,1)),t.all(n,(function(t){return t in e})))}var s=function(){var e=!1,n=-1;function o(){n++,e=!0,t.defer((function(){e=!1}))}return function(){return e||o(),n}}();function a(){this.registeredObjects=[],this.cidIndexes=[]}function l(e,n,o,r){for(var i,s=0,a=n.length;st.maximumStackLength&&(t.shift(),t.pointer--)}}}a.prototype={isRegistered:function(e){return e&&e.cid?this.registeredObjects[e.cid]:t.contains(this.registeredObjects,e)},register:function(t){return!this.isRegistered(t)&&(t&&t.cid?(this.registeredObjects[t.cid]=t,this.cidIndexes.push(t.cid)):this.registeredObjects.push(t),!0)},unregister:function(e){if(this.isRegistered(e)){if(e&&e.cid)delete this.registeredObjects[e.cid],this.cidIndexes.splice(t.indexOf(this.cidIndexes,e.cid),1);else{var n=t.indexOf(this.registeredObjects,e);this.registeredObjects.splice(n,1)}return!0}return!1},get:function(){return t.map(this.cidIndexes,(function(t){return this.registeredObjects[t]}),this).concat(this.registeredObjects)}};var f={add:{undo:function(t,e,n,o){t.remove(n,o)},redo:function(t,e,n,o){o.index&&(o.at=o.index),t.add(n,o)},on:function(e,n,o){return{object:n,before:void 0,after:e,options:t.clone(o)}}},remove:{undo:function(t,e,n,o){"index"in o&&(o.at=o.index),t.add(e,o)},redo:function(t,e,n,o){t.remove(e,o)},on:function(e,n,o){return{object:n,before:e,after:void 0,options:t.clone(o)}}},change:{undo:function(e,n,o,r){t.isEmpty(n)?t.each(t.keys(o),e.unset,e):(e.set(n),r&&r.unsetData&&r.unsetData.before&&r.unsetData.before.length&&t.each(r.unsetData.before,e.unset,e))},redo:function(e,n,o,r){t.isEmpty(o)?t.each(t.keys(n),e.unset,e):(e.set(o),r&&r.unsetData&&r.unsetData.after&&r.unsetData.after.length&&t.each(r.unsetData.after,e.unset,e))},on:function(e,n){var o=e.changedAttributes(),r=t.keys(o),i=t.pick(e.previousAttributes(),r),s=t.keys(i),a=(n||(n={})).unsetData={after:[],before:[]};return r.length!=s.length&&(r.length>s.length?t.each(r,(function(t){t in i||a.before.push(t)}),this):t.each(s,(function(t){t in o||a.after.push(t)}))),{object:e,before:i,after:o,options:t.clone(n)}}},reset:{undo:function(t,e,n){t.reset(e)},redo:function(t,e,n){t.reset(n)},on:function(e,n){return{object:e,before:n.previousModels,after:t.clone(e.models)}}}};function h(){}function g(e,n,o,r){if("object"==typeof n)return t.each(n,(function(t,n){2===e?g(e,t,o,r):g(e,n,t,o)}));switch(e){case 0:i(o,"undo","redo","on")&&t.all(t.pick(o,"undo","redo","on"),t.isFunction)&&(r[n]=o);break;case 1:r[n]&&t.isObject(o)&&(r[n]=t.extend({},r[n],o));break;case 2:delete r[n]}return this}h.prototype=f;var v=e.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(t){c("undo",this.attributes)},redo:function(t){c("redo",this.attributes)}}),y=e.Collection.extend({model:v,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(t){this.maximumStackLength=t}}),m=e.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(e){this.stack=new y,this.objectRegistry=new a,this.undoTypes=new h,this.stack.setMaxLength(this.get("maximumStackLength")),this.on("change:maximumStackLength",(function(t,e){this.stack.setMaxLength(e)}),this),e&&e.track&&this.startTracking(),e&&e.register&&(t.isArray(e.register)||t.isArguments(e.register)?o(this.register,this,e.register):this.register(e.register))},startTracking:function(){this.set("track",!0),this.stack.track=!0},stopTracking:function(){this.set("track",!1),this.stack.track=!1},isTracking:function(){return this.get("track")},_addToStack:function(t){d(this.stack,t,r(arguments,1),this.undoTypes)},register:function(){l("on",arguments,this._addToStack,this)},unregister:function(){l("off",arguments,this._addToStack,this)},unregisterAll:function(){o(this.unregister,this,this.objectRegistry.get())},undo:function(t){u("undo",this,this.stack,t)},undoAll:function(){u("undo",this,this.stack,!1,!0)},redo:function(t){u("redo",this,this.stack,t)},redoAll:function(){u("redo",this,this.stack,!1,!0)},isAvailable:function(t){var e=this.stack,n=e.length;switch(t){case"undo":return n>0&&e.pointer>-1;case"redo":return n>0&&e.pointer{var o,r;!function(i){var s='object'==typeof self&&self.self===self&&self||'object'==typeof n.g&&n.g.global===n.g&&n.g;if(1)o=[n(50),n(895),e],r=function(t,e,n){s.Backbone=function(t,e,n,o){var r=t.Backbone,i=Array.prototype.slice;e.VERSION='1.4.1',e.$=o,e.noConflict=function(){return t.Backbone=r,this},e.emulateHTTP=!1,e.emulateJSON=!1;var s,a=e.Events={},l=/\s+/,c=function(t,e,o,r,i){var s,a=0;if(o&&'object'==typeof o){void 0!==r&&'context'in i&&void 0===i.context&&(i.context=r);for(s=n.keys(o);athis.length&&(r=this.length),r<0&&(r+=this.length+1);var i,s,a=[],l=[],c=[],u=[],p={},d=e.add,f=e.merge,h=e.remove,g=!1,v=this.comparator&&null==r&&!1!==e.sort,y=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=('/'+this.root+'/').replace(W,'/'),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||'/';return this.location.replace(e+'#'+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement('iframe'),this.iframe.src='javascript:0',this.iframe.style.display='none',this.iframe.tabIndex=-1;var o=document.body,r=o.insertBefore(this.iframe,o.firstChild).contentWindow;r.document.open(),r.document.close(),r.location.hash='#'+this.fragment}var i=window.addEventListener||function(t,e){return attachEvent('on'+t,e)};if(this._usePushState?i('popstate',this.checkUrl,!1):this._useHashChange&&!this.iframe?i('hashchange',this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent('on'+t,e)};this._usePushState?t('popstate',this.checkUrl,!1):this._useHashChange&&!this.iframe&&t('hashchange',this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),B.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),n.some(this.handlers,(function(e){if(e.route.test(t))return e.callback(t),!0})))},navigate:function(t,e){if(!B.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||'');var n=this.root;''!==t&&'?'!==t.charAt(0)||(n=n.slice(0,-1)||'/');var o=n+t;t=t.replace($,'');var r=this.decodeFragment(t);if(this.fragment!==r){if(this.fragment=r,this._usePushState)this.history[e.replace?'replaceState':'pushState']({},document.title,o);else{if(!this._wantsHashChange)return this.location.assign(o);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;e.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var o=t.href.replace(/(javascript:|#).*$/,'');t.replace(o+'#'+e)}else t.hash='#'+e}}),e.history=new B;var q=function(t,e){var o,r=this;return o=t&&n.has(t,'constructor')?t.constructor:function(){return r.apply(this,arguments)},n.extend(o,r,e),o.prototype=n.create(r.prototype,t),o.prototype.constructor=o,o.__super__=r.prototype,o};y.extend=m.extend=F.extend=k.extend=B.extend=q;var G=function(){throw new Error('A "url" property or function must be specified')},K=function(t,e){var n=e.error;e.error=function(o){n&&n.call(e.context,t,o,e),t.trigger('error',t,o,e)}};return e}(s,n,t,e)}.apply(e,o),void 0===r||(t.exports=r);else;}()},210:(t,e,n)=>{1&&function(t){t.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e){return/^[;{}]$/.test(e)}}),t.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e,n,o){return this.jsonMode?/^[\[,{]$/.test(e)||/^}/.test(n):(";"!=e||!o.lexical||")"!=o.lexical.type)&&/^[;{}]$/.test(e)&&!/^;/.test(n)}});var e=/^(a|abbr|acronym|area|base|bdo|big|br|button|caption|cite|code|col|colgroup|dd|del|dfn|em|frame|hr|iframe|img|input|ins|kbd|label|legend|link|map|object|optgroup|option|param|q|samp|script|select|small|span|strong|sub|sup|textarea|tt|var)$/;t.extendMode("xml",{commentStart:"\x3c!--",commentEnd:"--\x3e",newlineAfterToken:function(t,n,o,r){var i=!1;return"html"==this.configuration&&(i=!!r.context&&e.test(r.context.tagName)),!i&&("tag"==t&&/>$/.test(n)&&r.context||/^-1&&a>-1&&a>s&&(t=t.substr(0,s)+t.substring(s+i.commentStart.length,a)+t.substr(a+i.commentEnd.length)),r.replaceRange(t,n,o)}}))})),t.defineExtension("autoIndentRange",(function(t,e){var n=this;this.operation((function(){for(var o=t.line;o<=e.line;o++)n.indentLine(o,"smart")}))})),t.defineExtension("autoFormatRange",(function(e,n){var o=this,r=o.getMode(),i=o.getRange(e,n).split("\n"),s=t.copyState(r,o.getTokenAt(e).state),a=o.getOption("tabSize"),l="",c=0,u=0===e.ch;function p(){l+="\n",u=!0,++c}for(var d=0;d2),y=/Android/.test(t),m=v||y||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),b=v||/Mac/.test(e),_=/\bCrOS\b/.test(t),w=/win/i.test(e),x=d&&t.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(d=!1,l=!0);var C=b&&(c||d&&(null==x||x<12.11)),S=n||s&&a>=9;function O(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var T,k=function(t,e){var n=t.className,o=O(e).exec(n);if(o){var r=n.slice(o.index+o[0].length);t.className=n.slice(0,o.index)+(r?o[1]+r:"")}};function E(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function P(t,e){return E(t).appendChild(e)}function A(t,e,n,o){var r=document.createElement(t);if(n&&(r.className=n),o&&(r.style.cssText=o),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var i=0;i=e)return s+(e-i);s+=a-i,s+=n-s%n,i=a+1}}v?I=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:s&&(I=function(t){try{t.select()}catch(t){}});var H=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};function z(t,e){for(var n=0;n=e)return o+Math.min(s,e-r);if(r+=i-o,o=i+1,(r+=n-r%n)>=e)return o}}var K=[""];function Y(t){for(;K.length<=t;)K.push(X(K)+" ");return K[t]}function X(t){return t[t.length-1]}function J(t,e){for(var n=[],o=0;o"€"&&(t.toUpperCase()!=t.toLowerCase()||et.test(t))}function ot(t,e){return e?!!(e.source.indexOf("\\w")>-1&&nt(t))||e.test(t):nt(t)}function rt(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var it=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function st(t){return t.charCodeAt(0)>=768&&it.test(t)}function at(t,e,n){for(;(n<0?e>0:en?-1:1;;){if(e==n)return e;var r=(e+n)/2,i=o<0?Math.ceil(r):Math.floor(r);if(i==e)return t(i)?e:n;t(i)?n=i:e=i+o}}function ct(t,e,n,o){if(!t)return o(e,n,"ltr",0);for(var r=!1,i=0;ie||e==n&&s.to==e)&&(o(Math.max(s.from,e),Math.min(s.to,n),1==s.level?"rtl":"ltr",i),r=!0)}r||o(e,n,"ltr")}var ut=null;function pt(t,e,n){var o;ut=null;for(var r=0;re)return r;i.to==e&&(i.from!=i.to&&"before"==n?o=r:ut=r),i.from==e&&(i.from!=i.to&&"before"!=n?o=r:ut=r)}return null!=o?o:ut}var dt=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?t.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?e.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,i=/[LRr]/,s=/[Lb1n]/,a=/[1n]/;function l(t,e,n){this.level=t,this.from=e,this.to=n}return function(t,e){var c="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!o.test(t))return!1;for(var u=t.length,p=[],d=0;d-1&&(o[e]=r.slice(0,i).concat(r.slice(i+1)))}}}function mt(t,e){var n=vt(t,e);if(n.length)for(var o=Array.prototype.slice.call(arguments,2),r=0;r0}function xt(t){t.prototype.on=function(t,e){gt(this,t,e)},t.prototype.off=function(t,e){yt(this,t,e)}}function Ct(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function St(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Ot(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Tt(t){Ct(t),St(t)}function kt(t){return t.target||t.srcElement}function Et(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),b&&t.ctrlKey&&1==e&&(e=3),e}var Pt,At,jt=function(){if(s&&a<9)return!1;var t=A('div');return"draggable"in t||"dragDrop"in t}();function Mt(t){if(null==Pt){var e=A("span","​");P(t,A("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Pt=e.offsetWidth<=1&&e.offsetHeight>2&&!(s&&a<8))}var n=Pt?A("span","​"):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Lt(t){if(null!=At)return At;var e=P(t,document.createTextNode("AخA")),n=T(e,0,1).getBoundingClientRect(),o=T(e,1,2).getBoundingClientRect();return E(t),!(!n||n.left==n.right)&&(At=o.right-n.right<3)}var Dt,Nt=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],o=t.length;e<=o;){var r=t.indexOf("\n",e);-1==r&&(r=t.length);var i=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),s=i.indexOf("\r");-1!=s?(n.push(i.slice(0,s)),e+=s+1):(n.push(i),e=r+1)}return n}:function(t){return t.split(/\r\n?|\n/)},It=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Ft="oncopy"in(Dt=A("div"))||(Dt.setAttribute("oncopy","return;"),"function"==typeof Dt.oncopy),Vt=null;function Rt(t){if(null!=Vt)return Vt;var e=P(t,A("span","x")),n=e.getBoundingClientRect(),o=T(e,0,1).getBoundingClientRect();return Vt=Math.abs(n.left-o.left)>1}var Ht={},zt={};function Bt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Ht[t]=e}function Ut(t,e){zt[t]=e}function Wt(t){if("string"==typeof t&&zt.hasOwnProperty(t))t=zt[t];else if(t&&"string"==typeof t.name&&zt.hasOwnProperty(t.name)){var e=zt[t.name];"string"==typeof e&&(e={name:e}),(t=tt(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Wt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Wt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function $t(t,e){e=Wt(e);var n=Ht[e.name];if(!n)return $t(t,"text/plain");var o=n(t,e);if(qt.hasOwnProperty(e.name)){var r=qt[e.name];for(var i in r)r.hasOwnProperty(i)&&(o.hasOwnProperty(i)&&(o["_"+i]=o[i]),o[i]=r[i])}if(o.name=e.name,e.helperType&&(o.helperType=e.helperType),e.modeProps)for(var s in e.modeProps)o[s]=e.modeProps[s];return o}var qt={};function Gt(t,e){V(e,qt.hasOwnProperty(t)?qt[t]:qt[t]={})}function Kt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var o in e){var r=e[o];r instanceof Array&&(r=r.concat([])),n[o]=r}return n}function Yt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function Xt(t,e,n){return!t.startState||t.startState(e,n)}var Jt=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Zt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var o=0;;++o){var r=n.children[o],i=r.chunkSize();if(e=t.first&&en?se(n,Zt(t,n).text.length):he(e,Zt(t,e.line).text.length)}function he(t,e){var n=t.ch;return null==n||n>e?se(t.line,e):n<0?se(t.line,0):t}function ge(t,e){for(var n=[],o=0;o=this.string.length},Jt.prototype.sol=function(){return this.pos==this.lineStart},Jt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Jt.prototype.next=function(){if(this.pose},Jt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Jt.prototype.skipToEnd=function(){this.pos=this.string.length},Jt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Jt.prototype.backUp=function(t){this.pos-=t},Jt.prototype.column=function(){return this.lastColumnPos0?null:(o&&!1!==e&&(this.pos+=o[0].length),o)}var r=function(t){return n?t.toLowerCase():t};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},Jt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Jt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Jt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Jt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ve=function(t,e){this.state=t,this.lookAhead=e},ye=function(t,e,n,o){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=o||0,this.baseTokens=null,this.baseTokenPos=1};function me(t,e,n,o){var r=[t.state.modeGen],i={};ke(t,e.text,t.doc.mode,n,(function(t,e){return r.push(t,e)}),i,o);for(var s=n.state,a=function(o){n.baseTokens=r;var a=t.state.overlays[o],l=1,c=0;n.state=!0,ke(t,e.text,a.mode,n,(function(t,e){for(var n=l;ct&&r.splice(l,1,t,r[l+1],o),l+=2,c=Math.min(t,o)}if(e)if(a.opaque)r.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;nt.options.maxHighlightLength&&Kt(t.doc.mode,o.state),i=me(t,e,o);r&&(o.state=r),e.stateAfter=o.save(!r),e.styles=i.styles,i.classes?e.styleClasses=i.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function _e(t,e,n){var o=t.doc,r=t.display;if(!o.mode.startState)return new ye(o,!0,e);var i=Ee(t,e,n),s=i>o.first&&Zt(o,i-1).stateAfter,a=s?ye.fromSaved(o,s,i):new ye(o,Xt(o.mode),i);return o.iter(i,e,(function(n){we(t,n.text,a);var o=a.line;n.stateAfter=o==e-1||o%5==0||o>=r.viewFrom&&oe.start)return i}throw new Error("Mode "+t.name+" failed to advance stream.")}ye.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},ye.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},ye.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ye.fromSaved=function(t,e,n){return e instanceof ve?new ye(t,Kt(t.mode,e.state),n,e.lookAhead):new ye(t,Kt(t.mode,e),n)},ye.prototype.save=function(t){var e=!1!==t?Kt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ve(e,this.maxLookAhead):e};var Se=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function Oe(t,e,n,o){var r,i,s=t.doc,a=s.mode,l=Zt(s,(e=fe(s,e)).line),c=_e(t,e.line,n),u=new Jt(l.text,t.options.tabSize,c);for(o&&(i=[]);(o||u.post.options.maxHighlightLength?(a=!1,s&&we(t,e,o,p.pos),p.pos=e.length,l=null):l=Te(Ce(n,p,o.state,d),i),d){var f=d[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cs;--a){if(a<=i.first)return i.first;var l=Zt(i,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof ve?c.lookAhead:0)<=i.modeFrontier))return a;var u=R(l.text,null,t.options.tabSize);(null==r||o>u)&&(r=a-1,o=u)}return r}function Pe(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;o--){var r=Zt(t,o).stateAfter;if(r&&(!(r instanceof ve)||o+r.lookAhead=e:i.to>e);(o||(o=[])).push(new De(s,i.from,a?null:i.to))}}return o}function Re(t,e,n){var o;if(t)for(var r=0;r=e:i.to>e)||i.from==e&&"bookmark"==s.type&&(!n||i.marker.insertLeft)){var a=null==i.from||(s.inclusiveLeft?i.from<=e:i.from0&&a)for(var b=0;b0)){var u=[l,1],p=ae(c.from,a.from),d=ae(c.to,a.to);(p<0||!s.inclusiveLeft&&!p)&&u.push({from:c.from,to:a.from}),(d>0||!s.inclusiveRight&&!d)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function Ue(t){var e=t.markedSpans;if(e){for(var n=0;ne)&&(!n||Ge(n,i.marker)<0)&&(n=i.marker)}return n}function Ze(t,e,n,o,r){var i=Zt(t,e),s=je&&i.markedSpans;if(s)for(var a=0;a=0&&p<=0||u<=0&&p>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?ae(c.to,n)>=0:ae(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?ae(c.from,o)<=0:ae(c.from,o)<0)))return!0}}}function Qe(t){for(var e;e=Ye(t);)t=e.find(-1,!0).line;return t}function tn(t){for(var e;e=Xe(t);)t=e.find(1,!0).line;return t}function en(t){for(var e,n;e=Xe(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function nn(t,e){var n=Zt(t,e),o=Qe(n);return n==o?e:ne(o)}function on(t,e){if(e>t.lastLine())return e;var n,o=Zt(t,e);if(!rn(t,o))return e;for(;n=Xe(o);)o=n.find(1,!0).line;return ne(o)+1}function rn(t,e){var n=je&&e.markedSpans;if(n)for(var o=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)}))}var un=function(t,e,n){this.text=t,We(this,e),this.height=n?n(this):1};function pn(t,e,n,o){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),Ue(t),We(t,n);var r=o?o(t):1;r!=t.height&&ee(t,r)}function dn(t){t.parent=null,Ue(t)}un.prototype.lineNo=function(){return ne(this)},xt(un);var fn={},hn={};function gn(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?hn:fn;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function vn(t,e){var n=j("span",null,null,l?"padding-right: .1px":null),o={pre:j("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var r=0;r<=(e.rest?e.rest.length:0);r++){var i=r?e.rest[r-1]:e.line,s=void 0;o.pos=0,o.addToken=mn,Lt(t.display.measure)&&(s=ft(i,t.doc.direction))&&(o.addToken=_n(o.addToken,s)),o.map=[],xn(i,o,be(t,i,e!=t.display.externalMeasured&&ne(i))),i.styleClasses&&(i.styleClasses.bgClass&&(o.bgClass=N(i.styleClasses.bgClass,o.bgClass||"")),i.styleClasses.textClass&&(o.textClass=N(i.styleClasses.textClass,o.textClass||""))),0==o.map.length&&o.map.push(0,0,o.content.appendChild(Mt(t.display.measure))),0==r?(e.measure.map=o.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(o.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var a=o.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(o.content.className="cm-tab-wrap-hack")}return mt(t,"renderLine",t,e.line,o.pre),o.pre.className&&(o.textClass=N(o.pre.className,o.textClass||"")),o}function yn(t){var e=A("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function mn(t,e,n,o,r,i,l){if(e){var c,u=t.splitSpaces?bn(e,t.trailingSpace):e,p=t.cm.state.specialChars,d=!1;if(p.test(e)){c=document.createDocumentFragment();for(var f=0;1;){p.lastIndex=f;var h=p.exec(e),g=h?h.index-f:e.length-f;if(g){var v=document.createTextNode(u.slice(f,f+g));s&&a<9?c.appendChild(A("span",[v])):c.appendChild(v),t.map.push(t.pos,t.pos+g,v),t.col+=g,t.pos+=g}if(!h)break;f+=g+1;var y=void 0;if("\t"==h[0]){var m=t.cm.options.tabSize,b=m-t.col%m;(y=c.appendChild(A("span",Y(b),"cm-tab"))).setAttribute("role","presentation"),y.setAttribute("cm-text","\t"),t.col+=b}else"\r"==h[0]||"\n"==h[0]?((y=c.appendChild(A("span","\r"==h[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",h[0]),t.col+=1):((y=t.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),s&&a<9?c.appendChild(A("span",[y])):c.appendChild(y),t.col+=1);t.map.push(t.pos,t.pos+1,y),t.pos++}}else t.col+=e.length,c=document.createTextNode(u),t.map.push(t.pos,t.pos+e.length,c),s&&a<9&&(d=!0),t.pos+=e.length;if(t.trailingSpace=32==u.charCodeAt(e.length-1),n||o||r||d||i||l){var _=n||"";o&&(_+=o),r&&(_+=r);var w=A("span",[c],_,i);if(l)for(var x in l)l.hasOwnProperty(x)&&"style"!=x&&"class"!=x&&w.setAttribute(x,l[x]);return t.content.appendChild(w)}t.content.appendChild(c)}}function bn(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,o="",r=0;rc&&p.from<=c);d++);if(p.to>=u)return t(n,o,r,i,s,a,l);t(n,o.slice(0,p.to-c),r,i,null,a,l),i=null,o=o.slice(p.to-c),c=p.to}}}function wn(t,e,n,o){var r=!o&&n.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!o&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function xn(t,e,n){var o=t.markedSpans,r=t.text,i=0;if(o)for(var s,a,l,c,u,p,d,f=r.length,h=0,g=1,v="",y=0;;){if(y==h){l=c=u=a="",d=null,p=null,y=1/0;for(var m=[],b=void 0,_=0;_h||x.collapsed&&w.to==h&&w.from==h)){if(null!=w.to&&w.to!=h&&y>w.to&&(y=w.to,c=""),x.className&&(l+=" "+x.className),x.css&&(a=(a?a+";":"")+x.css),x.startStyle&&w.from==h&&(u+=" "+x.startStyle),x.endStyle&&w.to==y&&(b||(b=[])).push(x.endStyle,w.to),x.title&&((d||(d={})).title=x.title),x.attributes)for(var C in x.attributes)(d||(d={}))[C]=x.attributes[C];x.collapsed&&(!p||Ge(p.marker,x)<0)&&(p=w)}else w.from>h&&y>w.from&&(y=w.from)}if(b)for(var S=0;S=f)break;for(var T=Math.min(f,y);1;){if(v){var k=h+v.length;if(!p){var E=k>T?v.slice(0,T-h):v;e.addToken(e,E,s?s+l:l,u,h+E.length==y?c:"",a,d)}if(k>=T){v=v.slice(T-h),h=T;break}h=k,u=""}v=r.slice(i,i=n[g++]),s=gn(n[g++],e.cm.options)}}else for(var P=1;P2&&i.push((l.bottom+c.top)/2-n.top)}}i.push(n.bottom-n.top)}}function Qn(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};if(t.rest){for(var o=0;on)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}}function to(t,e){var n=ne(e=Qe(e)),o=t.display.externalMeasured=new Cn(t.doc,e,n);o.lineN=n;var r=o.built=vn(t,o);return o.text=r.pre,P(t.display.lineMeasure,r.pre),o}function eo(t,e,n,o){return ro(t,oo(t,e),n,o)}function no(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(r=(i=l-a)-1,e>=l&&(s="right")),null!=r){if(o=t[c+2],a==l&&n==(o.insertLeft?"left":"right")&&(s=n),"left"==n&&0==r)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)o=t[(c-=3)+2],s="left";if("right"==n&&r==l-a)for(;c=0&&(n=t[r]).left==n.right;r--);return n}function co(t,e,n,o){var r,i=ao(e.map,n,o),l=i.node,c=i.start,u=i.end,p=i.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&st(e.line.text.charAt(i.coverStart+c));)--c;for(;i.coverStart+u0&&(p=o="right"),r=t.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==o?f.length-1:0]:l.getBoundingClientRect()}if(s&&a<9&&!c&&(!r||!r.left&&!r.right)){var h=l.parentNode.getClientRects()[0];r=h?{left:h.left,right:h.left+Mo(t.display),top:h.top,bottom:h.bottom}:so}for(var g=r.top-e.rect.top,v=r.bottom-e.rect.top,y=(g+v)/2,m=e.view.measure.heights,b=0;b=o.text.length?(l=o.text.length,c="before"):l<=0&&(l=0,c="after"),!a)return s("before"==c?l-1:l,"before"==c);function u(t,e,n){return s(n?t-1:t,1==a[e].level!=n)}var p=pt(a,l,c),d=ut,f=u(l,p,"before"==c);return null!=d&&(f.other=u(l,d,"before"!=c)),f}function xo(t,e){var n=0;e=fe(t.doc,e),t.options.lineWrapping||(n=Mo(t.display)*e.ch);var o=Zt(t.doc,e.line),r=an(o)+qn(t.display);return{left:n,right:n,top:r,bottom:r+o.height}}function Co(t,e,n,o,r){var i=se(t,e,n);return i.xRel=r,o&&(i.outside=o),i}function So(t,e,n){var o=t.doc;if((n+=t.display.viewOffset)<0)return Co(o.first,0,null,-1,-1);var r=oe(o,n),i=o.first+o.size-1;if(r>i)return Co(o.first+o.size-1,Zt(o,i).text.length,null,1,1);e<0&&(e=0);for(var s=Zt(o,r);;){var a=Eo(t,s,r,e,n),l=Je(s,a.ch+(a.xRel>0||a.outside>0?1:0));if(!l)return a;var c=l.find(1);if(c.line==r)return c;s=Zt(o,r=c.line)}}function Oo(t,e,n,o){o-=yo(e);var r=e.text.length,i=lt((function(e){return ro(t,n,e-1).bottom<=o}),r,0);return{begin:i,end:r=lt((function(e){return ro(t,n,e).top>o}),i,r)}}function To(t,e,n,o){return n||(n=oo(t,e)),Oo(t,e,n,mo(t,e,ro(t,n,o),"line").top)}function ko(t,e,n,o){return!(t.bottom<=n)&&(t.top>n||(o?t.left:t.right)>e)}function Eo(t,e,n,o,r){r-=an(e);var i=oo(t,e),s=yo(e),a=0,l=e.text.length,c=!0,u=ft(e,t.doc.direction);if(u){var p=(t.options.lineWrapping?Ao:Po)(t,e,n,i,u,o,r);a=(c=1!=p.level)?p.from:p.to-1,l=c?p.to:p.from-1}var d,f,h=null,g=null,v=lt((function(e){var n=ro(t,i,e);return n.top+=s,n.bottom+=s,!!ko(n,o,r,!1)&&(n.top<=r&&n.left<=o&&(h=e,g=n),!0)}),a,l),y=!1;if(g){var m=o-g.left=_.bottom?1:0}return Co(n,v=at(e.text,v,1),f,y,o-d)}function Po(t,e,n,o,r,i,s){var a=lt((function(a){var l=r[a],c=1!=l.level;return ko(wo(t,se(n,c?l.to:l.from,c?"before":"after"),"line",e,o),i,s,!0)}),0,r.length-1),l=r[a];if(a>0){var c=1!=l.level,u=wo(t,se(n,c?l.from:l.to,c?"after":"before"),"line",e,o);ko(u,i,s,!0)&&u.top>s&&(l=r[a-1])}return l}function Ao(t,e,n,o,r,i,s){var a=Oo(t,e,o,s),l=a.begin,c=a.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,p=null,d=0;d=c||f.to<=l)){var h=ro(t,o,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,g=hg)&&(u=f,p=g)}}return u||(u=r[r.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function jo(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==io){io=A("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)io.appendChild(document.createTextNode("x")),io.appendChild(A("br"));io.appendChild(document.createTextNode("x"))}P(t.measure,io);var n=io.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),E(t.measure),n||1}function Mo(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=A("span","xxxxxxxxxx"),n=A("pre",[e],"CodeMirror-line-like");P(t.measure,n);var o=e.getBoundingClientRect(),r=(o.right-o.left)/10;return r>2&&(t.cachedCharWidth=r),r||10}function Lo(t){for(var e=t.display,n={},o={},r=e.gutters.clientLeft,i=e.gutters.firstChild,s=0;i;i=i.nextSibling,++s){var a=t.display.gutterSpecs[s].className;n[a]=i.offsetLeft+i.clientLeft+r,o[a]=i.clientWidth}return{fixedPos:Do(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:o,wrapperWidth:e.wrapper.clientWidth}}function Do(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function No(t){var e=jo(t.display),n=t.options.lineWrapping,o=n&&Math.max(5,t.display.scroller.clientWidth/Mo(t.display)-3);return function(r){if(rn(t.doc,r))return 0;var i=0;if(r.widgets)for(var s=0;s0&&(l=Zt(t.doc,c.line).text).length==c.ch){var u=R(l,l.length,t.options.tabSize)-l.length;c=se(c.line,Math.max(0,Math.round((i-Kn(t.display).left)/Mo(t.display))-u))}return c}function Vo(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,o=0;oe)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)je&&nn(t.doc,e)r.viewFrom?zo(t):(r.viewFrom+=o,r.viewTo+=o);else if(e<=r.viewFrom&&n>=r.viewTo)zo(t);else if(e<=r.viewFrom){var i=Bo(t,n,n+o,1);i?(r.view=r.view.slice(i.index),r.viewFrom=i.lineN,r.viewTo+=o):zo(t)}else if(n>=r.viewTo){var s=Bo(t,e,e,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):zo(t)}else{var a=Bo(t,e,e,-1),l=Bo(t,n,n+o,1);a&&l?(r.view=r.view.slice(0,a.index).concat(Sn(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=o):zo(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=o.viewTo)){var i=o.view[Vo(t,e)];if(null!=i.node){var s=i.changes||(i.changes=[]);-1==z(s,n)&&s.push(n)}}}function zo(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function Bo(t,e,n,o){var r,i=Vo(t,e),s=t.display.view;if(!je||n==t.doc.first+t.doc.size)return{index:i,lineN:n};for(var a=t.display.viewFrom,l=0;l0){if(i==s.length-1)return null;r=a+s[i].size-e,i++}else r=a-e;e+=r,n+=r}for(;nn(t.doc,n)!=n;){if(i==(o<0?0:s.length-1))return null;n+=o*s[i-(o<0?1:0)].size,i+=o}return{index:i,lineN:n}}function Uo(t,e,n){var o=t.display;0==o.view.length||e>=o.viewTo||n<=o.viewFrom?(o.view=Sn(t,e,n),o.viewFrom=e):(o.viewFrom>e?o.view=Sn(t,e,o.viewFrom).concat(o.view):o.viewFromn&&(o.view=o.view.slice(0,Vo(t,n)))),o.viewTo=n}function Wo(t){for(var e=t.display.view,n=0,o=0;o=t.display.viewTo||l.to().line0?s:t.defaultCharWidth())+"px"}if(o.other){var a=n.appendChild(A("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=o.other.left+"px",a.style.top=o.other.top+"px",a.style.height=.85*(o.other.bottom-o.other.top)+"px"}}function Ko(t,e){return t.top-e.top||t.left-e.left}function Yo(t,e,n){var o=t.display,r=t.doc,i=document.createDocumentFragment(),s=Kn(t.display),a=s.left,l=Math.max(o.sizerWidth,Xn(t)-o.sizer.offsetLeft)-s.right,c="ltr"==r.direction;function u(t,e,n,o){e<0&&(e=0),e=Math.round(e),o=Math.round(o),i.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==n?l-t:n)+"px;\n height: "+(o-e)+"px"))}function p(e,n,o){var i,s,p=Zt(r,e),d=p.text.length;function f(n,o){return _o(t,se(e,n),"div",p,o)}function h(e,n,o){var r=To(t,p,null,e),i="ltr"==n==("after"==o)?"left":"right";return f("after"==o?r.begin:r.end-(/\s/.test(p.text.charAt(r.end-1))?2:1),i)[i]}var g=ft(p,r.direction);return ct(g,n||0,null==o?d:o,(function(t,e,r,p){var v="ltr"==r,y=f(t,v?"left":"right"),m=f(e-1,v?"right":"left"),b=null==n&&0==t,_=null==o&&e==d,w=0==p,x=!g||p==g.length-1;if(m.top-y.top<=3){var C=(c?_:b)&&x,S=(c?b:_)&&w?a:(v?y:m).left,O=C?l:(v?m:y).right;u(S,y.top,O-S,y.bottom)}else{var T,k,E,P;v?(T=c&&b&&w?a:y.left,k=c?l:h(t,r,"before"),E=c?a:h(e,r,"after"),P=c&&_&&x?l:m.right):(T=c?h(t,r,"before"):a,k=!c&&b&&w?l:y.right,E=!c&&_&&x?a:m.left,P=c?h(e,r,"after"):l),u(T,y.top,k-T,y.bottom),y.bottom0?e.blinker=setInterval((function(){t.hasFocus()||tr(t),e.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Jo(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||Qo(t))}function Zo(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&tr(t))}),100)}function Qo(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(mt(t,"focus",t,e),t.state.focused=!0,D(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),Xo(t))}function tr(t,e){t.state.delayingBlurEvent||(t.state.focused&&(mt(t,"blur",t,e),t.state.focused=!1,k(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function er(t){for(var e=t.display,n=e.lineDiv.offsetTop,o=Math.max(0,e.scroller.getBoundingClientRect().top),r=e.lineDiv.getBoundingClientRect().top,i=0,l=0;l.005||g<-.005)&&(rt.display.sizerWidth){var y=Math.ceil(d/Mo(t.display));y>t.display.maxLineLength&&(t.display.maxLineLength=y,t.display.maxLine=c.line,t.display.maxLineChanged=!0)}}}Math.abs(i)>2&&(e.scroller.scrollTop+=i)}function nr(t){if(t.widgets)for(var e=0;e=s&&(i=oe(e,an(Zt(e,l))-t.wrapper.clientHeight),s=l)}return{from:i,to:Math.max(s,i+1)}}function rr(t,e){if(!bt(t,"scrollCursorIntoView")){var n=t.display,o=n.sizer.getBoundingClientRect(),r=null;if(e.top+o.top<0?r=!0:e.bottom+o.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!g){var i=A("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-qn(t.display))+"px;\n height: "+(e.bottom-e.top+Yn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(i),i.scrollIntoView(r),t.display.lineSpace.removeChild(i)}}}function ir(t,e,n,o){var r;null==o&&(o=0),t.options.lineWrapping||e!=n||(n="before"==e.sticky?se(e.line,e.ch+1,"before"):e,e=e.ch?se(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e);for(var i=0;i<5;i++){var s=!1,a=wo(t,e),l=n&&n!=e?wo(t,n):a,c=ar(t,r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-o,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+o}),u=t.doc.scrollTop,p=t.doc.scrollLeft;if(null!=c.scrollTop&&(hr(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(vr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-p)>1&&(s=!0)),!s)break}return r}function sr(t,e){var n=ar(t,e);null!=n.scrollTop&&hr(t,n.scrollTop),null!=n.scrollLeft&&vr(t,n.scrollLeft)}function ar(t,e){var n=t.display,o=jo(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,i=Jn(t),s={};e.bottom-e.top>i&&(e.bottom=e.top+i);var a=t.doc.height+Gn(n),l=e.topa-o;if(e.topr+i){var u=Math.min(e.top,(c?a:e.bottom)-i);u!=r&&(s.scrollTop=u)}var p=t.options.fixedGutter?0:n.gutters.offsetWidth,d=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-p,f=Xn(t)-n.gutters.offsetWidth,h=e.right-e.left>f;return h&&(e.right=e.left+f),e.left<10?s.scrollLeft=0:e.leftf+d-3&&(s.scrollLeft=e.right+(h?0:10)-f),s}function lr(t,e){null!=e&&(dr(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function cr(t){dr(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function ur(t,e,n){null==e&&null==n||dr(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function pr(t,e){dr(t),t.curOp.scrollToPos=e}function dr(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,fr(t,xo(t,e.from),xo(t,e.to),e.margin))}function fr(t,e,n,o){var r=ar(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-o,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+o});ur(t,r.scrollLeft,r.scrollTop)}function hr(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||$r(t,{top:e}),gr(t,e,!0),n&&$r(t),Fr(t,100))}function gr(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function vr(t,e,n,o){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!o||(t.doc.scrollLeft=e,Yr(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function yr(t){var e=t.display,n=e.gutters.offsetWidth,o=Math.round(t.doc.height+Gn(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:o,scrollHeight:o+Yn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var mr=function(t,e,n){this.cm=n;var o=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");o.tabIndex=r.tabIndex=-1,t(o),t(r),gt(o,"scroll",(function(){o.clientHeight&&e(o.scrollTop,"vertical")})),gt(r,"scroll",(function(){r.clientWidth&&e(r.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,s&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};mr.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,o=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?o+"px":"0";var r=t.viewHeight-(e?o:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?o+"px":"0",this.horiz.style.left=t.barLeft+"px";var i=t.viewWidth-t.barLeft-(n?o:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==o&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?o:0,bottom:e?o:0}},mr.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},mr.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},mr.prototype.zeroWidthHack=function(){var t=b&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new H,this.disableVert=new H},mr.prototype.enableZeroWidthBar=function(t,e,n){function o(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.visibility="hidden":e.set(1e3,o)}t.style.visibility="",e.set(1e3,o)},mr.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var br=function(){};function _r(t,e){e||(e=yr(t));var n=t.display.barWidth,o=t.display.barHeight;wr(t,e);for(var r=0;r<4&&n!=t.display.barWidth||o!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&er(t),wr(t,yr(t)),n=t.display.barWidth,o=t.display.barHeight}function wr(t,e){var n=t.display,o=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=o.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=o.bottom)+"px",n.heightForcer.style.borderBottom=o.bottom+"px solid transparent",o.right&&o.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=o.bottom+"px",n.scrollbarFiller.style.width=o.right+"px"):n.scrollbarFiller.style.display="",o.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=o.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}br.prototype.update=function(){return{bottom:0,right:0}},br.prototype.setScrollLeft=function(){},br.prototype.setScrollTop=function(){},br.prototype.clear=function(){};var xr={native:mr,null:br};function Cr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&k(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new xr[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),gt(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,n){"horizontal"==n?vr(t,e):hr(t,e)}),t),t.display.scrollbars.addClass&&D(t.display.wrapper,t.display.scrollbars.addClass)}var Sr=0;function Or(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Sr,markArrays:null},Tn(t.curOp)}function Tr(t){var e=t.curOp;e&&En(e,(function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new Rr(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Pr(t){t.updatedDisplay=t.mustUpdate&&Ur(t.cm,t.update)}function Ar(t){var e=t.cm,n=e.display;t.updatedDisplay&&er(e),t.barMeasure=yr(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=eo(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Yn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Xn(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function jr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft=t.display.viewTo)){var n=+new Date+t.options.workTime,o=_e(t,e.highlightFrontier),r=[];e.iter(o.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(i){if(o.line>=t.display.viewFrom){var s=i.styles,a=i.text.length>t.options.maxHighlightLength?Kt(e.mode,o.state):null,l=me(t,i,o,!0);a&&(o.state=a),i.styles=l.styles;var c=i.styleClasses,u=l.classes;u?i.styleClasses=u:c&&(i.styleClasses=null);for(var p=!s||s.length!=i.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!p&&dn)return Fr(t,t.options.workDelay),!0})),e.highlightFrontier=o.line,e.modeFrontier=Math.max(e.modeFrontier,o.line),r.length&&Lr(t,(function(){for(var e=0;e=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Wo(t))return!1;Xr(t)&&(zo(t),e.dims=Lo(t));var r=o.first+o.size,i=Math.max(e.visible.from-t.options.viewportMargin,o.first),s=Math.min(r,e.visible.to+t.options.viewportMargin);n.viewFroms&&n.viewTo-s<20&&(s=Math.min(r,n.viewTo)),je&&(i=nn(t.doc,i),s=on(t.doc,s));var a=i!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;Uo(t,i,s),n.viewOffset=an(Zt(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var l=Wo(t);if(!a&&0==l&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=zr(t);return l>4&&(n.lineDiv.style.display="none"),qr(t,n.updateLineNumbers,e.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Br(c),E(n.cursorDiv),E(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,Fr(t,400)),n.updateLineNumbers=null,!0}function Wr(t,e){for(var n=e.viewport,o=!0;;o=!1){if(o&&t.options.lineWrapping&&e.oldDisplayWidth!=Xn(t))o&&(e.visible=or(t.display,t.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Gn(t.display)-Jn(t),n.top)}),e.visible=or(t.display,t.doc,n),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!Ur(t,e))break;er(t);var r=yr(t);$o(t),_r(t,r),Kr(t,r),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function $r(t,e){var n=new Rr(t,e);if(Ur(t,n)){er(t),Wr(t,n);var o=yr(t);$o(t),_r(t,o),Kr(t,o),n.finish()}}function qr(t,e,n){var o=t.display,r=t.options.lineNumbers,i=o.lineDiv,s=i.firstChild;function a(e){var n=e.nextSibling;return l&&b&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=o.view,u=o.viewFrom,p=0;p-1&&(f=!1),Mn(t,d,u,n)),f&&(E(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(ie(t.options,u)))),s=d.node.nextSibling}else{var h=Hn(t,d,u,n);i.insertBefore(h,s)}u+=d.size}for(;s;)s=a(s)}function Gr(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px",An(t,"gutterChanged",t)}function Kr(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Yn(t)+"px"}function Yr(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var o=Do(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,i=o+"px",s=0;s=102&&(null==t.display.chromeScrollHack?t.display.sizer.style.pointerEvents="none":clearTimeout(t.display.chromeScrollHack),t.display.chromeScrollHack=setTimeout((function(){t.display.chromeScrollHack=null,t.display.sizer.style.pointerEvents=""}),100));var o=oi(e),r=o.x,i=o.y,s=ni;0===e.deltaMode&&(r=e.deltaX,i=e.deltaY,s=1);var a=t.display,c=a.scroller,f=c.scrollWidth>c.clientWidth,h=c.scrollHeight>c.clientHeight;if(r&&f||i&&h){if(i&&b&&l)t:for(var g=e.target,v=a.view;g!=c;g=g.parentNode)for(var y=0;y=0&&ae(t,o.to())<=0)return n}return-1};var ai=function(t,e){this.anchor=t,this.head=e};function li(t,e,n){var o=t&&t.options.selectionsMayTouch,r=e[n];e.sort((function(t,e){return ae(t.from(),e.from())})),n=z(e,r);for(var i=1;i0:l>=0){var c=pe(a.from(),s.from()),u=ue(a.to(),s.to()),p=a.empty()?s.from()==s.head:a.from()==a.head;i<=n&&--n,e.splice(--i,2,new ai(p?u:c,p?c:u))}}return new si(e,n)}function ci(t,e){return new si([new ai(t,e||t)],0)}function ui(t){return t.text?se(t.from.line+t.text.length-1,X(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function pi(t,e){if(ae(t,e.from)<0)return t;if(ae(t,e.to)<=0)return ui(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,o=t.ch;return t.line==e.to.line&&(o+=ui(e).ch-e.to.ch),se(n,o)}function di(t,e){for(var n=[],o=0;o1&&t.remove(a.line+1,h-1),t.insert(a.line+1,y)}An(t,"change",t,e)}function bi(t,e,n){function o(t,r,i){if(t.linked)for(var s=0;s1&&!t.done[t.done.length-2].ranges?(t.done.pop(),X(t.done)):void 0}function ki(t,e,n,o){var r=t.history;r.undone.length=0;var i,s,a=+new Date;if((r.lastOp==o||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&r.lastModTime>a-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(i=Ti(r,r.lastOp==o)))s=X(i.changes),0==ae(e.from,e.to)&&0==ae(e.from,s.to)?s.to=ui(e):i.changes.push(Si(t,e));else{var l=X(r.done);for(l&&l.ranges||Ai(t.sel,r.done),i={changes:[Si(t,e)],generation:r.generation},r.done.push(i);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=a,r.lastOp=r.lastSelOp=o,r.lastOrigin=r.lastSelOrigin=e.origin,s||mt(t,"historyAdded")}function Ei(t,e,n,o){var r=e.charAt(0);return"*"==r||"+"==r&&n.ranges.length==o.ranges.length&&n.somethingSelected()==o.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function Pi(t,e,n,o){var r=t.history,i=o&&o.origin;n==r.lastSelOp||i&&r.lastSelOrigin==i&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==i||Ei(t,i,X(r.done),e))?r.done[r.done.length-1]=e:Ai(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=i,r.lastSelOp=n,o&&!1!==o.clearRedo&&Oi(r.undone)}function Ai(t,e){var n=X(e);n&&n.ranges&&n.equals(t)||e.push(t)}function ji(t,e,n,o){var r=e["spans_"+t.id],i=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,o),(function(n){n.markedSpans&&((r||(r=e["spans_"+t.id]={}))[i]=n.markedSpans),++i}))}function Mi(t){if(!t)return null;for(var e,n=0;n-1&&(X(a)[p]=c[p],delete c[p])}}}return o}function Ii(t,e,n,o){if(o){var r=t.anchor;if(n){var i=ae(e,r)<0;i!=ae(n,r)<0?(r=e,e=n):i!=ae(e,n)<0&&(e=n)}return new ai(r,e)}return new ai(n||e,e)}function Fi(t,e,n,o,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),Ui(t,new si([Ii(t.sel.primary(),e,n,r)],0),o)}function Vi(t,e,n){for(var o=[],r=t.cm&&(t.cm.display.shift||t.extend),i=0;i=e.ch:a.to>e.ch))){if(r&&(mt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(i.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var p=l.find(o<0?1:-1),d=void 0;if((o<0?u:c)&&(p=Xi(t,p,-o,p&&p.line==e.line?i:null)),p&&p.line==e.line&&(d=ae(p,n))&&(o<0?d<0:d>0))return Ki(t,p,e,o,r)}var f=l.find(o<0?-1:1);return(o<0?c:u)&&(f=Xi(t,f,o,f.line==e.line?i:null)),f?Ki(t,f,e,o,r):null}}return e}function Yi(t,e,n,o,r){var i=o||1,s=Ki(t,e,n,i,r)||!r&&Ki(t,e,n,i,!0)||Ki(t,e,n,-i,r)||!r&&Ki(t,e,n,-i,!0);return s||(t.cantEdit=!0,se(t.first,0))}function Xi(t,e,n,o){return n<0&&0==e.ch?e.line>t.first?fe(t,se(e.line-1)):null:n>0&&e.ch==(o||Zt(t,e.line)).text.length?e.line=0;--r)ts(t,{from:o[r].from,to:o[r].to,text:r?[""]:e.text,origin:e.origin});else ts(t,e)}}function ts(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ae(e.from,e.to)){var n=di(t,e);ki(t,e,n,t.cm?t.cm.curOp.id:NaN),os(t,e,n,He(t,e));var o=[];bi(t,(function(t,n){n||-1!=z(o,t.history)||(ls(t.history,e),o.push(t.history)),os(t,e,null,He(t,e))}))}}function es(t,e,n){var o=t.cm&&t.cm.state.suppressEdits;if(!o||n){for(var r,i=t.history,s=t.sel,a="undo"==e?i.done:i.undone,l="undo"==e?i.undone:i.done,c=0;c=0;--f){var h=d(f);if(h)return h.v}}}}function ns(t,e){if(0!=e&&(t.first+=e,t.sel=new si(J(t.sel.ranges,(function(t){return new ai(se(t.anchor.line+e,t.anchor.ch),se(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){Ro(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,o=n.viewFrom;ot.lastLine())){if(e.from.linei&&(e={from:e.from,to:se(i,Zt(t,i).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Qt(t,e.from,e.to),n||(n=di(t,e)),t.cm?rs(t.cm,e,o):mi(t,e,o),Wi(t,n,W),t.cantEdit&&Yi(t,se(t.firstLine(),0))&&(t.cantEdit=!1)}}function rs(t,e,n){var o=t.doc,r=t.display,i=e.from,s=e.to,a=!1,l=i.line;t.options.lineWrapping||(l=ne(Qe(Zt(o,i.line))),o.iter(l,s.line+1,(function(t){if(t==r.maxLine)return a=!0,!0}))),o.sel.contains(e.from,e.to)>-1&&_t(t),mi(o,e,n,No(t)),t.options.lineWrapping||(o.iter(l,i.line+e.text.length,(function(t){var e=ln(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)})),a&&(t.curOp.updateMaxLine=!0)),Pe(o,i.line),Fr(t,400);var c=e.text.length-(s.line-i.line)-1;e.full?Ro(t):i.line!=s.line||1!=e.text.length||yi(t.doc,e)?Ro(t,i.line,s.line+1,c):Ho(t,i.line,"text");var u=wt(t,"changes"),p=wt(t,"change");if(p||u){var d={from:i,to:s,text:e.text,removed:e.removed,origin:e.origin};p&&An(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function is(t,e,n,o,r){var i;o||(o=n),ae(o,n)<0&&(n=(i=[o,n])[0],o=i[1]),"string"==typeof e&&(e=t.splitLines(e)),Qi(t,{from:n,to:o,text:e,origin:r})}function ss(t,e,n,o){n1||!(this.children[0]instanceof us))){var a=[];this.collapse(a),this.children=[new us(a)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var s=r.lines.length%25+25,a=s;a10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var o=0;o0||0==s&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=j("span",[i.replacedWith],"CodeMirror-widget"),o.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),o.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Ze(t,e.line,e,n,i)||e.line!=n.line&&Ze(t,n.line,e,n,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");Le()}i.addToHistory&&ki(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var a,l=e.line,c=t.cm;if(t.iter(l,n.line+1,(function(o){c&&i.collapsed&&!c.options.lineWrapping&&Qe(o)==c.display.maxLine&&(a=!0),i.collapsed&&l!=e.line&&ee(o,0),Fe(o,new De(i,l==e.line?e.ch:null,l==n.line?n.ch:null),t.cm&&t.cm.curOp),++l})),i.collapsed&&t.iter(e.line,n.line+1,(function(e){rn(t,e)&&ee(e,0)})),i.clearOnEnter&>(i,"beforeCursorEnter",(function(){return i.clear()})),i.readOnly&&(Me(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),i.collapsed&&(i.id=++gs,i.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),i.collapsed)Ro(c,e.line,n.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var u=e.line;u<=n.line;u++)Ho(c,u,"text");i.atomic&&qi(c.doc),An(c,"markerAdded",c,i)}return i}vs.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Or(t),wt(this,"clear")){var n=this.find();n&&An(this,"clear",n.from,n.to)}for(var o=null,r=null,i=0;it.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=o&&t&&this.collapsed&&Ro(t,o,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&qi(t.doc)),t&&An(t,"markerCleared",t,this,o,r),e&&Tr(t),this.parent&&this.parent.clear()}},vs.prototype.find=function(t,e){var n,o;null==t&&"bookmark"==this.type&&(t=1);for(var r=0;r=0;l--)Qi(this,o[l]);a?Bi(this,a):this.cm&&cr(this.cm)})),undo:Ir((function(){es(this,"undo")})),redo:Ir((function(){es(this,"redo")})),undoSelection:Ir((function(){es(this,"undo",!0)})),redoSelection:Ir((function(){es(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,o=0;o=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,n){t=fe(this,t),e=fe(this,e);var o=[],r=t.line;return this.iter(t.line,e.line+1,(function(i){var s=i.markedSpans;if(s)for(var a=0;a=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||n&&!n(l.marker)||o.push(l.marker.parent||l.marker)}++r})),o},getAllMarks:function(){var t=[];return this.iter((function(e){var n=e.markedSpans;if(n)for(var o=0;ot)return e=t,!0;t-=i,++n})),fe(this,se(n,e))},indexFromPos:function(t){var e=(t=fe(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var p=t.dataTransfer.getData("Text");if(p){var d;if(e.state.draggingText&&!e.state.draggingText.copy&&(d=e.listSelections()),Wi(e.doc,ci(n,n)),d)for(var f=0;f=0;e--)is(t.doc,"",o[e].from,o[e].to,"+delete");cr(t)}))}function Ks(t,e,n){var o=at(t.text,e+n,n);return o<0||o>t.text.length?null:o}function Ys(t,e,n){var o=Ks(t,e.ch,n);return null==o?null:new se(e.line,o,n<0?"after":"before")}function Xs(t,e,n,o,r){if(t){"rtl"==e.doc.direction&&(r=-r);var i=ft(n,e.doc.direction);if(i){var s,a=r<0?X(i):i[0],l=r<0==(1==a.level)?"after":"before";if(a.level>0||"rtl"==e.doc.direction){var c=oo(e,n);s=r<0?n.text.length-1:0;var u=ro(e,c,s).top;s=lt((function(t){return ro(e,c,t).top==u}),r<0==(1==a.level)?a.from:a.to-1,s),"before"==l&&(s=Ks(n,s,1))}else s=r<0?a.to:a.from;return new se(o,s,l)}}return new se(o,r<0?n.text.length:0,r<0?"before":"after")}function Js(t,e,n,o){var r=ft(e,t.doc.direction);if(!r)return Ys(e,n,o);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var i=pt(r,n.ch,n.sticky),s=r[i];if("ltr"==t.doc.direction&&s.level%2==0&&(o>0?s.to>n.ch:s.from=s.from&&d>=u.begin)){var f=p?"before":"after";return new se(n.line,d,f)}}var h=function(t,e,o){for(var i=function(t,e){return e?new se(n.line,l(t,1),"before"):new se(n.line,t,"after")};t>=0&&t0==(1!=s.level),c=a?o.begin:l(o.end,-1);if(s.from<=c&&c0?u.end:l(u.begin,-1);return null==v||o>0&&v==e.text.length||!(g=h(o>0?0:r.length-1,o,c(v)))?null:g}Rs.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Rs.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Rs.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Rs.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Rs["default"]=b?Rs.macDefault:Rs.pcDefault;var Zs={selectAll:Ji,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),W)},killLine:function(t){return Gs(t,(function(e){if(e.empty()){var n=Zt(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line0)r=new se(r.line,r.ch+1),t.replaceRange(i.charAt(r.ch-1)+i.charAt(r.ch-2),se(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var s=Zt(t.doc,r.line-1).text;s&&(r=new se(r.line,1),t.replaceRange(i.charAt(0)+t.doc.lineSeparator()+s.charAt(s.length-1),se(r.line-1,s.length-1),r,"+transpose"))}n.push(new ai(r,r))}t.setSelections(n)}))},newlineAndIndent:function(t){return Lr(t,(function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var o=0;o-1&&(ae((r=a.ranges[r]).from(),e)<0||e.xRel>0)&&(ae(r.to(),e)>0||e.xRel<0)?Ca(t,o,e,i):Oa(t,o,e,i)}function Ca(t,e,n,o){var r=t.display,i=!1,c=Dr(t,(function(e){l&&(r.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:Zo(t)),yt(r.wrapper.ownerDocument,"mouseup",c),yt(r.wrapper.ownerDocument,"mousemove",u),yt(r.scroller,"dragstart",p),yt(r.scroller,"drop",c),i||(Ct(e),o.addNew||Fi(t.doc,n,null,null,o.extend),l&&!f||s&&9==a?setTimeout((function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()}),20):r.input.focus())})),u=function(t){i=i||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},p=function(){return i=!0};l&&(r.scroller.draggable=!0),t.state.draggingText=c,c.copy=!o.moveOnDrag,gt(r.wrapper.ownerDocument,"mouseup",c),gt(r.wrapper.ownerDocument,"mousemove",u),gt(r.scroller,"dragstart",p),gt(r.scroller,"drop",c),t.state.delayingBlurEvent=!0,setTimeout((function(){return r.input.focus()}),20),r.scroller.dragDrop&&r.scroller.dragDrop()}function Sa(t,e,n){if("char"==n)return new ai(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new ai(se(e.line,0),fe(t.doc,se(e.line+1,0)));var o=n(t,e);return new ai(o.from,o.to)}function Oa(t,e,n,o){s&&Zo(t);var r=t.display,i=t.doc;Ct(e);var a,l,c=i.sel,u=c.ranges;if(o.addNew&&!o.extend?(l=i.sel.contains(n),a=l>-1?u[l]:new ai(n,n)):(a=i.sel.primary(),l=i.sel.primIndex),"rectangle"==o.unit)o.addNew||(a=new ai(n,n)),n=Fo(t,e,!0,!0),l=-1;else{var p=Sa(t,n,o.unit);a=o.extend?Ii(a,p.anchor,p.head,o.extend):p}o.addNew?-1==l?(l=u.length,Ui(i,li(t,u.concat([a]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==o.unit&&!o.extend?(Ui(i,li(t,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=i.sel):Ri(i,l,a,$):(l=0,Ui(i,new si([a],0),$),c=i.sel);var d=n;function f(e){if(0!=ae(d,e))if(d=e,"rectangle"==o.unit){for(var r=[],s=t.options.tabSize,u=R(Zt(i,n.line).text,n.ch,s),p=R(Zt(i,e.line).text,e.ch,s),f=Math.min(u,p),h=Math.max(u,p),g=Math.min(n.line,e.line),v=Math.min(t.lastLine(),Math.max(n.line,e.line));g<=v;g++){var y=Zt(i,g).text,m=G(y,f,s);f==h?r.push(new ai(se(g,m),se(g,m))):y.length>m&&r.push(new ai(se(g,m),se(g,G(y,h,s))))}r.length||r.push(new ai(n,n)),Ui(i,li(t,c.ranges.slice(0,l).concat(r),l),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,_=a,w=Sa(t,e,o.unit),x=_.anchor;ae(w.anchor,x)>0?(b=w.head,x=pe(_.from(),w.anchor)):(b=w.anchor,x=ue(_.to(),w.head));var C=c.ranges.slice(0);C[l]=Ta(t,new ai(fe(i,x),b)),Ui(i,li(t,C,l),$)}}var h=r.wrapper.getBoundingClientRect(),g=0;function v(e){var n=++g,s=Fo(t,e,!0,"rectangle"==o.unit);if(s)if(0!=ae(s,d)){t.curOp.focus=L(),f(s);var a=or(r,i);(s.line>=a.to||s.lineh.bottom?20:0;l&&setTimeout(Dr(t,(function(){g==n&&(r.scroller.scrollTop+=l,v(e))})),50)}}function y(e){t.state.selectingText=!1,g=1/0,e&&(Ct(e),r.input.focus()),yt(r.wrapper.ownerDocument,"mousemove",m),yt(r.wrapper.ownerDocument,"mouseup",b),i.history.lastSelOrigin=null}var m=Dr(t,(function(t){0!==t.buttons&&Et(t)?v(t):y(t)})),b=Dr(t,y);t.state.selectingText=b,gt(r.wrapper.ownerDocument,"mousemove",m),gt(r.wrapper.ownerDocument,"mouseup",b)}function Ta(t,e){var n=e.anchor,o=e.head,r=Zt(t.doc,n.line);if(0==ae(n,o)&&n.sticky==o.sticky)return e;var i=ft(r);if(!i)return e;var s=pt(i,n.ch,n.sticky),a=i[s];if(a.from!=n.ch&&a.to!=n.ch)return e;var l,c=s+(a.from==n.ch==(1!=a.level)?0:1);if(0==c||c==i.length)return e;if(o.line!=n.line)l=(o.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=pt(i,o.ch,o.sticky),p=u-s||(o.ch-n.ch)*(1==a.level?-1:1);l=u==c-1||u==c?p<0:p>0}var d=i[c+(l?-1:0)],f=l==(1==d.level),h=f?d.from:d.to,g=f?"after":"before";return n.ch==h&&n.sticky==g?e:new ai(new se(n.line,h,g),o)}function ka(t,e,n,o){var r,i;if(e.touches)r=e.touches[0].clientX,i=e.touches[0].clientY;else try{r=e.clientX,i=e.clientY}catch(t){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;o&&Ct(e);var s=t.display,a=s.lineDiv.getBoundingClientRect();if(i>a.bottom||!wt(t,n))return Ot(e);i-=a.top-s.viewOffset;for(var l=0;l=r)return mt(t,n,t,oe(t.doc,i),t.display.gutterSpecs[l].className,e),Ot(e)}}function Ea(t,e){return ka(t,e,"gutterClick",!0)}function Pa(t,e){$n(t.display,e)||Aa(t,e)||bt(t,e,"contextmenu")||S||t.display.input.onContextMenu(e)}function Aa(t,e){return!!wt(t,"gutterContextMenu")&&ka(t,e,"gutterContextMenu",!1)}function ja(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ho(t)}ya.prototype.compare=function(t,e,n){return this.time+va>t&&0==ae(e,this.pos)&&n==this.button};var Ma={toString:function(){return"CodeMirror.Init"}},La={},Da={};function Na(t){var e=t.optionHandlers;function n(n,o,r,i){t.defaults[n]=o,r&&(e[n]=i?function(t,e,n){n!=Ma&&r(t,e,n)}:r)}t.defineOption=n,t.Init=Ma,n("value","",(function(t,e){return t.setValue(e)}),!0),n("mode",null,(function(t,e){t.doc.modeOption=e,gi(t)}),!0),n("indentUnit",2,gi,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(t){vi(t),ho(t),Ro(t)}),!0),n("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var n=[],o=t.doc.first;t.doc.iter((function(t){for(var r=0;;){var i=t.text.indexOf(e,r);if(-1==i)break;r=i+e.length,n.push(se(o,i))}o++}));for(var r=n.length-1;r>=0;r--)is(t.doc,e,n[r],se(n[r].line,n[r].ch+e.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=Ma&&t.refresh()})),n("specialCharPlaceholder",yn,(function(t){return t.refresh()}),!0),n("electricChars",!0),n("inputStyle",m?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),n("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),n("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(t){ja(t),Qr(t)}),!0),n("keyMap","default",(function(t,e,n){var o=qs(e),r=n!=Ma&&qs(n);r&&r.detach&&r.detach(t,o),o.attach&&o.attach(t,r||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Fa,!0),n("gutters",[],(function(t,e){t.display.gutterSpecs=Jr(e,t.options.lineNumbers),Qr(t)}),!0),n("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?Do(t.display)+"px":"0",t.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(t){return _r(t)}),!0),n("scrollbarStyle","native",(function(t){Cr(t),_r(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=Jr(t.options.gutters,e),Qr(t)}),!0),n("firstLineNumber",1,Qr,!0),n("lineNumberFormatter",(function(t){return t}),Qr,!0),n("showCursorWhenSelecting",!1,$o,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(t,e){"nocursor"==e&&(tr(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),n("screenReaderLabel",null,(function(t,e){e=''===e?null:e,t.display.input.screenReaderLabelChanged(e)})),n("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),n("dragDrop",!0,Ia),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,$o,!0),n("singleCursorHeightPerLine",!0,$o,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,vi,!0),n("addModeClass",!1,vi,!0),n("pollInterval",100),n("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),n("historyEventDelay",1250),n("viewportMargin",10,(function(t){return t.refresh()}),!0),n("maxHighlightLength",1e4,vi,!0),n("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),n("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),n("autofocus",null),n("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),n("phrases",null)}function Ia(t,e,n){if(!e!=!(n&&n!=Ma)){var o=t.display.dragFunctions,r=e?gt:yt;r(t.display.scroller,"dragstart",o.start),r(t.display.scroller,"dragenter",o.enter),r(t.display.scroller,"dragover",o.over),r(t.display.scroller,"dragleave",o.leave),r(t.display.scroller,"drop",o.drop)}}function Fa(t){t.options.lineWrapping?(D(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(k(t.display.wrapper,"CodeMirror-wrap"),cn(t)),Io(t),Ro(t),ho(t),setTimeout((function(){return _r(t)}),100)}function Va(t,e){var n=this;if(!(this instanceof Va))return new Va(t,e);this.options=e=e?V(e):{},V(La,e,!1);var o=e.value;"string"==typeof o?o=new Ss(o,e.mode,null,e.lineSeparator,e.direction):e.mode&&(o.modeOption=e.mode),this.doc=o;var r=new Va.inputStyles[e.inputStyle](this),i=this.display=new ti(t,o,r,e);for(var c in i.wrapper.CodeMirror=this,ja(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Cr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new H,keySeq:null,specialChars:null},e.autofocus&&!m&&i.input.focus(),s&&a<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Ra(this),Ms(),Or(this),this.curOp.forceUpdate=!0,_i(this,o),e.autofocus&&!m||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Qo(n)}),20):tr(this),Da)Da.hasOwnProperty(c)&&Da[c](this,e[c],Ma);Xr(this),e.finishInit&&e.finishInit(this);for(var u=0;u20*20}gt(e.scroller,"touchstart",(function(r){if(!bt(t,r)&&!i(r)&&!Ea(t,r)){e.input.ensurePolled(),clearTimeout(n);var s=+new Date;e.activeTouch={start:s,moved:!1,prev:s-o.end<=300?o:null},1==r.touches.length&&(e.activeTouch.left=r.touches[0].pageX,e.activeTouch.top=r.touches[0].pageY)}})),gt(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),gt(e.scroller,"touchend",(function(n){var o=e.activeTouch;if(o&&!$n(e,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var i,s=t.coordsChar(e.activeTouch,"page");i=!o.prev||l(o,o.prev)?new ai(s,s):!o.prev.prev||l(o,o.prev.prev)?t.findWordAt(s):new ai(se(s.line,0),fe(t.doc,se(s.line+1,0))),t.setSelection(i.anchor,i.head),t.focus(),Ct(n)}r()})),gt(e.scroller,"touchcancel",r),gt(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(hr(t,e.scroller.scrollTop),vr(t,e.scroller.scrollLeft,!0),mt(t,"scroll",t))})),gt(e.scroller,"mousewheel",(function(e){return ii(t,e)})),gt(e.scroller,"DOMMouseScroll",(function(e){return ii(t,e)})),gt(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){bt(t,e)||Tt(e)},over:function(e){bt(t,e)||(Es(t,e),Tt(e))},start:function(e){return ks(t,e)},drop:Dr(t,Ts),leave:function(e){bt(t,e)||Ps(t)}};var c=e.input.getField();gt(c,"keyup",(function(e){return da.call(t,e)})),gt(c,"keydown",Dr(t,ua)),gt(c,"keypress",Dr(t,fa)),gt(c,"focus",(function(e){return Qo(t,e)})),gt(c,"blur",(function(e){return tr(t,e)}))}Va.defaults=La,Va.optionHandlers=Da;var Ha=[];function za(t,e,n,o){var r,i=t.doc;null==n&&(n="add"),"smart"==n&&(i.mode.indent?r=_e(t,e).state:n="prev");var s=t.options.tabSize,a=Zt(i,e),l=R(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(o||/\S/.test(a.text)){if("smart"==n&&((c=i.mode.indent(r,a.text.slice(u.length),a.text))==U||c>150)){if(!o)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>i.first?R(Zt(i,e-1).text,null,s):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var p="",d=0;if(t.options.indentWithTabs)for(var f=Math.floor(c/s);f;--f)d+=s,p+="\t";if(ds,l=Nt(e),c=null;if(a&&o.ranges.length>1)if(Ba&&Ba.text.join("\n")==e){if(o.ranges.length%Ba.text.length==0){c=[];for(var u=0;u=0;d--){var f=o.ranges[d],h=f.from(),g=f.to();f.empty()&&(n&&n>0?h=se(h.line,h.ch-n):t.state.overwrite&&!a?g=se(g.line,Math.min(Zt(i,g.line).text.length,g.ch+X(l).length)):a&&Ba&&Ba.lineWise&&Ba.text.join("\n")==l.join("\n")&&(h=g=se(h.line,0)));var v={from:h,to:g,text:c?c[d%c.length]:l,origin:r||(a?"paste":t.state.cutIncoming>s?"cut":"+input")};Qi(t.doc,v),An(t,"inputRead",t,v)}e&&!a&&qa(t,e),cr(t),t.curOp.updateInput<2&&(t.curOp.updateInput=p),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function $a(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||!e.hasFocus()||Lr(e,(function(){return Wa(e,n,0,null,"paste")})),!0}function qa(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,o=n.ranges.length-1;o>=0;o--){var r=n.ranges[o];if(!(r.head.ch>100||o&&n.ranges[o-1].head.line==r.head.line)){var i=t.getModeAt(r.head),s=!1;if(i.electricChars){for(var a=0;a-1){s=za(t,r.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(Zt(t.doc,r.head.line).text.slice(0,r.head.ch))&&(s=za(t,r.head.line,"smart"));s&&An(t,"electricInput",t,r.head.line)}}}function Ga(t){for(var e=[],n=[],o=0;on&&(za(this,r.head.line,t,!0),n=r.head.line,o==this.doc.sel.primIndex&&cr(this));else{var i=r.from(),s=r.to(),a=Math.max(n,i.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l0&&Ri(this.doc,o,new ai(i,c[o].to()),W)}}})),getTokenAt:function(t,e){return Oe(this,t,e)},getLineTokens:function(t,e){return Oe(this,se(t),e,!0)},getTokenTypeAt:function(t){t=fe(this.doc,t);var e,n=be(this,Zt(this.doc,t.line)),o=0,r=(n.length-1)/2,i=t.ch;if(0==i)e=n[2];else for(;;){var s=o+r>>1;if((s?n[2*s-1]:0)>=i)r=s;else{if(!(n[2*s+1]i&&(t=i,r=!0),o=Zt(this.doc,t)}else o=t;return mo(this,o,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-an(o):0)},defaultTextHeight:function(){return jo(this.display)},defaultCharWidth:function(){return Mo(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,o,r){var i=this.display,s=(t=wo(this,fe(this.doc,t))).bottom,a=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),i.sizer.appendChild(e),"over"==o)s=t.top;else if("above"==o||"near"==o){var l=Math.max(i.wrapper.clientHeight,this.doc.height),c=Math.max(i.sizer.clientWidth,i.lineSpace.clientWidth);('above'==o||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?s=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(s=t.bottom),a+e.offsetWidth>c&&(a=c-e.offsetWidth)}e.style.top=s+"px",e.style.left=e.style.right="","right"==r?(a=i.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?a=0:"middle"==r&&(a=(i.sizer.clientWidth-e.offsetWidth)/2),e.style.left=a+"px"),n&&sr(this,{left:a,top:s,right:a+e.offsetWidth,bottom:s+e.offsetHeight})},triggerOnKeyDown:Nr(ua),triggerOnKeyPress:Nr(fa),triggerOnKeyUp:da,triggerOnMouseDown:Nr(ba),execCommand:function(t){if(Zs.hasOwnProperty(t))return Zs[t].call(null,this)},triggerElectric:Nr((function(t){qa(this,t)})),findPosH:function(t,e,n,o){var r=1;e<0&&(r=-1,e=-e);for(var i=fe(this.doc,t),s=0;s0&&s(e.charAt(n-1));)--n;for(;o.5||this.options.lineWrapping)&&Io(this),mt(this,"refresh",this)})),swapDoc:Nr((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),_i(this,t),ho(this),this.display.input.reset(),ur(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,An(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},xt(t),t.registerHelper=function(e,o,r){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][o]=r},t.registerGlobalHelper=function(e,o,r,i){t.registerHelper(e,o,i),n[e]._global.push({pred:r,val:i})}}function Ja(t,e,n,o,r){var i=e,s=n,a=Zt(t,e.line),l=r&&"rtl"==t.direction?-n:n;function c(){var n=e.line+l;return!(n=t.first+t.size)&&(e=new se(n,e.ch,e.sticky),a=Zt(t,n))}function u(i){var s;if("codepoint"==o){var u=a.text.charCodeAt(e.ch+(n>0?0:-1));if(isNaN(u))s=null;else{var p=n>0?u>=55296&&u<56320:u>=56320&&u<57343;s=new se(e.line,Math.max(0,Math.min(a.text.length,e.ch+n*(p?2:1))),-n)}}else s=r?Js(t.cm,a,e,n):Ys(a,e,n);if(null==s){if(i||!c())return!1;e=Xs(r,t.cm,a,e.line,l)}else e=s;return!0}if("char"==o||"codepoint"==o)u();else if("column"==o)u(!0);else if("word"==o||"group"==o)for(var p=null,d="group"==o,f=t.cm&&t.cm.getHelper(e,"wordChars"),h=!0;!(n<0)||u(!h);h=!1){var g=a.text.charAt(e.ch)||"\n",v=ot(g,f)?"w":d&&"\n"==g?"n":!d||/\s/.test(g)?null:"p";if(!d||h||v||(v="s"),p&&p!=v){n<0&&(n=1,u(),e.sticky="after");break}if(v&&(p=v),n>0&&!u(!h))break}var y=Yi(t,e,i,s,!0);return le(i,y)&&(y.hitSide=!0),y}function Za(t,e,n,o){var r,i,s=t.doc,a=e.left;if("page"==o){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*jo(t.display),3);r=(n>0?e.bottom:e.top)+n*c}else"line"==o&&(r=n>0?e.bottom+3:e.top-3);for(;(i=So(t,a,r)).outside;){if(n<0?r<=0:r>=s.height){i.hitSide=!0;break}r+=5*n}return i}var Qa=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new H,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function tl(t,e){var n=no(t,e.line);if(!n||n.hidden)return null;var o=Zt(t.doc,e.line),r=Qn(n,o,e.line),i=ft(o,t.doc.direction),s="left";i&&(s=pt(i,e.ch)%2?"right":"left");var a=ao(r.map,e.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function el(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function nl(t,e){return e&&(t.bad=!0),t}function ol(t,e,n,o,r){var i="",s=!1,a=t.doc.lineSeparator(),l=!1;function c(t){return function(e){return e.id==t}}function u(){s&&(i+=a,l&&(i+=a),s=l=!1)}function p(t){t&&(u(),i+=t)}function d(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void p(n);var i,f=e.getAttribute("cm-marker");if(f){var h=t.findMarks(se(o,0),se(r+1,0),c(+f));return void(h.length&&(i=h[0].find(0))&&p(Qt(t.doc,i.from,i.to).join(a)))}if("false"==e.getAttribute("contenteditable"))return;var g=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;g&&u();for(var v=0;v=e.display.viewTo||i.line=e.display.viewFrom&&tl(e,r)||{node:l[0].measure.map[2],offset:0},u=i.lineo.firstLine()&&(s=se(s.line-1,Zt(o.doc,s.line-1).length)),a.ch==Zt(o.doc,a.line).text.length&&a.liner.viewTo-1)return!1;s.line==r.viewFrom||0==(t=Vo(o,s.line))?(e=ne(r.view[0].line),n=r.view[0].node):(e=ne(r.view[t].line),n=r.view[t-1].node.nextSibling);var l,c,u=Vo(o,a.line);if(u==r.view.length-1?(l=r.viewTo-1,c=r.lineDiv.lastChild):(l=ne(r.view[u+1].line)-1,c=r.view[u+1].node.previousSibling),!n)return!1;for(var p=o.doc.splitLines(ol(o,n,c,e,l)),d=Qt(o.doc,se(e,0),se(l,Zt(o.doc,l).text.length));p.length>1&&d.length>1;)if(X(p)==X(d))p.pop(),d.pop(),l--;else{if(p[0]!=d[0])break;p.shift(),d.shift(),e++}for(var f=0,h=0,g=p[0],v=d[0],y=Math.min(g.length,v.length);fs.ch&&m.charCodeAt(m.length-h-1)==b.charCodeAt(b.length-h-1);)f--,h++;p[p.length-1]=m.slice(0,m.length-h).replace(/^\u200b+/,""),p[0]=p[0].slice(f).replace(/\u200b+$/,"");var w=se(e,f),x=se(l,d.length?X(d).length-h:0);return p.length>1||p[0]||ae(w,x)?(is(o.doc,p,w,x,"+input"),!0):void 0},Qa.prototype.ensurePolled=function(){this.forceCompositionEnd()},Qa.prototype.reset=function(){this.forceCompositionEnd()},Qa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Qa.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},Qa.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Lr(this.cm,(function(){return Ro(t.cm)}))},Qa.prototype.setUneditable=function(t){t.contentEditable="false"},Qa.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Dr(this.cm,Wa)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Qa.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Qa.prototype.onContextMenu=function(){},Qa.prototype.resetPosition=function(){},Qa.prototype.needsContentAttribute=!0;var sl=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new H,this.hasSelection=!1,this.composing=null};function al(t,e){if((e=e?V(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=L();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function o(){t.value=a.getValue()}var r;if(t.form&&(gt(t.form,"submit",o),!e.leaveSubmitMethodAlone)){var i=t.form;r=i.submit;try{var s=i.submit=function(){o(),i.submit=r,i.submit(),i.submit=s}}catch(t){}}e.finishInit=function(n){n.save=o,n.getTextArea=function(){return t},n.toTextArea=function(){n.toTextArea=isNaN,o(),t.parentNode.removeChild(n.getWrapperElement()),t.style.display="",t.form&&(yt(t.form,"submit",o),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=r))}},t.style.display="none";var a=Va((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return a}function ll(t){t.off=yt,t.on=gt,t.wheelEventPixels=ri,t.Doc=Ss,t.splitLines=Nt,t.countColumn=R,t.findColumn=G,t.isWordChar=nt,t.Pass=U,t.signal=mt,t.Line=un,t.changeEnd=ui,t.scrollbarModel=xr,t.Pos=se,t.cmpPos=ae,t.modes=Ht,t.mimeModes=zt,t.resolveMode=Wt,t.getMode=$t,t.modeExtensions=qt,t.extendMode=Gt,t.copyState=Kt,t.startState=Xt,t.innerMode=Yt,t.commands=Zs,t.keyMap=Rs,t.keyName=$s,t.isModifierKey=Us,t.lookupKey=Bs,t.normalizeKeyMap=zs,t.StringStream=Jt,t.SharedTextMarker=ms,t.TextMarker=vs,t.LineWidget=ds,t.e_preventDefault=Ct,t.e_stopPropagation=St,t.e_stop=Tt,t.addClass=D,t.contains=M,t.rmClass=k,t.keyNames=Ns}sl.prototype.init=function(t){var e=this,n=this,o=this.cm;this.createField(t);var r=this.textarea;function i(t){if(!bt(o,t)){if(o.somethingSelected())Ua({lineWise:!1,text:o.getSelections()});else{if(!o.options.lineWiseCopyCut)return;var e=Ga(o);Ua({lineWise:!0,text:e.text}),"cut"==t.type?o.setSelections(e.ranges,null,W):(n.prevInput="",r.value=e.text.join("\n"),I(r))}"cut"==t.type&&(o.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),v&&(r.style.width="0px"),gt(r,"input",(function(){s&&a>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()})),gt(r,"paste",(function(t){bt(o,t)||$a(t,o)||(o.state.pasteIncoming=+new Date,n.fastPoll())})),gt(r,"cut",i),gt(r,"copy",i),gt(t.scroller,"paste",(function(e){if(!$n(t,e)&&!bt(o,e)){if(!r.dispatchEvent)return o.state.pasteIncoming=+new Date,void n.focus();var i=new Event("paste");i.clipboardData=e.clipboardData,r.dispatchEvent(i)}})),gt(t.lineSpace,"selectstart",(function(e){$n(t,e)||Ct(e)})),gt(r,"compositionstart",(function(){var t=o.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:o.markText(t,o.getCursor("to"),{className:"CodeMirror-composing"})}})),gt(r,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},sl.prototype.createField=function(t){this.wrapper=Ya(),this.textarea=this.wrapper.firstChild},sl.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute('aria-label',t):this.textarea.removeAttribute('aria-label')},sl.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,o=qo(t);if(t.options.moveInputWithCursor){var r=wo(t,n.sel.primary().head,"div"),i=e.wrapper.getBoundingClientRect(),s=e.lineDiv.getBoundingClientRect();o.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+s.top-i.top)),o.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+s.left-i.left))}return o},sl.prototype.showSelection=function(t){var e=this.cm.display;P(e.cursorDiv,t.cursors),P(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},sl.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&I(this.textarea),s&&a>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",s&&a>=9&&(this.hasSelection=null))}},sl.prototype.getField=function(){return this.textarea},sl.prototype.supportsTouch=function(){return!1},sl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||L()!=this.textarea))try{this.textarea.focus()}catch(t){}},sl.prototype.blur=function(){this.textarea.blur()},sl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},sl.prototype.receivedFocus=function(){this.slowPoll()},sl.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},sl.prototype.fastPoll=function(){var t=!1,e=this;function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))}e.pollingFast=!0,e.polling.set(20,n)},sl.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,o=this.prevInput;if(this.contextMenuPending||!e.state.focused||It(n)&&!o&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=n.value;if(r==o&&!e.somethingSelected())return!1;if(s&&a>=9&&this.hasSelection===r||b&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||o||(o="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(o.length,r.length);l1e3||r.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},sl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},sl.prototype.onKeyPress=function(){s&&a>=9&&(this.hasSelection=null),this.fastPoll()},sl.prototype.onContextMenu=function(t){var e=this,n=e.cm,o=n.display,r=e.textarea;e.contextMenuPending&&e.contextMenuPending();var i=Fo(n,t),c=o.scroller.scrollTop;if(i&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(i)&&Dr(n,Ui)(n.doc,ci(i),W);var u,p=r.style.cssText,f=e.wrapper.style.cssText,h=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",r.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-h.top-5)+"px; left: "+(t.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(s?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),o.input.focus(),l&&window.scrollTo(null,u),o.input.reset(),n.somethingSelected()||(r.value=e.prevInput=" "),e.contextMenuPending=y,o.selForContextMenu=n.doc.sel,clearTimeout(o.detectingSelectAll),s&&a>=9&&v(),S){Tt(t);var g=function(){yt(window,"mouseup",g),setTimeout(y,20)};gt(window,"mouseup",g)}else setTimeout(y,50)}function v(){if(null!=r.selectionStart){var t=n.somethingSelected(),i="​"+(t?r.value:"");r.value="⇚",r.value=i,e.prevInput=t?"":"​",r.selectionStart=1,r.selectionEnd=i.length,o.selForContextMenu=n.doc.sel}}function y(){if(e.contextMenuPending==y&&(e.contextMenuPending=!1,e.wrapper.style.cssText=f,r.style.cssText=p,s&&a<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=c),null!=r.selectionStart)){(!s||s&&a<9)&&v();var t=0,i=function(){o.selForContextMenu==n.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&"​"==e.prevInput?Dr(n,Ji)(n):t++<10?o.detectingSelectAll=setTimeout(i,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(i,200)}}},sl.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},sl.prototype.setUneditable=function(){},sl.prototype.needsContentAttribute=!1,Na(Va),Xa(Va);var cl="iter insert remove copy getEditor constructor".split(" ");for(var ul in Ss.prototype)Ss.prototype.hasOwnProperty(ul)&&z(cl,ul)<0&&(Va.prototype[ul]=function(t){return function(){return t.apply(this.doc,arguments)}}(Ss.prototype[ul]));return xt(Ss),Va.inputStyles={textarea:sl,contenteditable:Qa},Va.defineMode=function(t){Va.defaults.mode||"null"==t||(Va.defaults.mode=t),Bt.apply(this,arguments)},Va.defineMIME=Ut,Va.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Va.defineMIME("text/plain","null"),Va.defineExtension=function(t,e){Va.prototype[t]=e},Va.defineDocExtension=function(t,e){Ss.prototype[t]=e},Va.fromTextArea=al,ll(Va),Va.version="5.65.6",Va}())},629:(t,e,n)=>{1&&function(t){"use strict";function e(t){for(var e={},n=0;n*\/]/.test(n)?x(null,"select-op"):"."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i)?x("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?x(null,n):t.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(t.current())&&(e.tokenize=O),x("variable callee","variable")):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),x("property","word")):x(null,null):/[\d.]/.test(t.peek())?(t.eatWhile(/[\w.%]/),x("number","unit")):t.match(/^-[\w\\\-]*/)?(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?x("variable-2","variable-definition"):x("variable-2","variable")):t.match(/^\w+-/)?x("meta","meta"):void 0}function S(t){return function(e,n){for(var o,r=!1;null!=(o=e.next());){if(o==t&&!r){")"==t&&e.backUp(1);break}r=!r&&"\\"==o}return(o==t||!r&&")"!=t)&&(n.tokenize=null),x("string","string")}}function O(t,e){return t.next(),t.match(/^\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=S(")"),x(null,"(")}function T(t,e,n){this.type=t,this.indent=e,this.prev=n}function k(t,e,n,o){return t.context=new T(n,e.indentation()+(!1===o?0:s),t.context),n}function E(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function P(t,e,n){return M[n.context.type](t,e,n)}function A(t,e,n,o){for(var r=o||1;r>0;r--)n.context=n.context.prev;return P(t,e,n)}function j(t){var e=t.current().toLowerCase();i=y.hasOwnProperty(e)?"atom":v.hasOwnProperty(e)?"keyword":"variable"}var M={top:function(t,e,n){if("{"==t)return k(n,e,"block");if("}"==t&&n.context.prev)return E(n);if(_&&/@component/i.test(t))return k(n,e,"atComponentBlock");if(/^@(-moz-)?document$/i.test(t))return k(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(t))return k(n,e,"atBlock");if(/^@(font-face|counter-style)/i.test(t))return n.stateArg=t,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(t))return"keyframes";if(t&&"@"==t.charAt(0))return k(n,e,"at");if("hash"==t)i="builtin";else if("word"==t)i="tag";else{if("variable-definition"==t)return"maybeprop";if("interpolation"==t)return k(n,e,"interpolation");if(":"==t)return"pseudo";if(m&&"("==t)return k(n,e,"parens")}return n.context.type},block:function(t,e,n){if("word"==t){var o=e.current().toLowerCase();return d.hasOwnProperty(o)?(i="property","maybeprop"):f.hasOwnProperty(o)?(i=w?"string-2":"property","maybeprop"):m?(i=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(i+=" error","maybeprop")}return"meta"==t?"block":m||"hash"!=t&&"qualifier"!=t?M.top(t,e,n):(i="error","block")},maybeprop:function(t,e,n){return":"==t?k(n,e,"prop"):P(t,e,n)},prop:function(t,e,n){if(";"==t)return E(n);if("{"==t&&m)return k(n,e,"propBlock");if("}"==t||"{"==t)return A(t,e,n);if("("==t)return k(n,e,"parens");if("hash"!=t||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(e.current())){if("word"==t)j(e);else if("interpolation"==t)return k(n,e,"interpolation")}else i+=" error";return"prop"},propBlock:function(t,e,n){return"}"==t?E(n):"word"==t?(i="property","maybeprop"):n.context.type},parens:function(t,e,n){return"{"==t||"}"==t?A(t,e,n):")"==t?E(n):"("==t?k(n,e,"parens"):"interpolation"==t?k(n,e,"interpolation"):("word"==t&&j(e),"parens")},pseudo:function(t,e,n){return"meta"==t?"pseudo":"word"==t?(i="variable-3",n.context.type):P(t,e,n)},documentTypes:function(t,e,n){return"word"==t&&l.hasOwnProperty(e.current())?(i="tag",n.context.type):M.atBlock(t,e,n)},atBlock:function(t,e,n){if("("==t)return k(n,e,"atBlock_parens");if("}"==t||";"==t)return A(t,e,n);if("{"==t)return E(n)&&k(n,e,m?"block":"top");if("interpolation"==t)return k(n,e,"interpolation");if("word"==t){var o=e.current().toLowerCase();i="only"==o||"not"==o||"and"==o||"or"==o?"keyword":c.hasOwnProperty(o)?"attribute":u.hasOwnProperty(o)?"property":p.hasOwnProperty(o)?"keyword":d.hasOwnProperty(o)?"property":f.hasOwnProperty(o)?w?"string-2":"property":y.hasOwnProperty(o)?"atom":v.hasOwnProperty(o)?"keyword":"error"}return n.context.type},atComponentBlock:function(t,e,n){return"}"==t?A(t,e,n):"{"==t?E(n)&&k(n,e,m?"block":"top",!1):("word"==t&&(i="error"),n.context.type)},atBlock_parens:function(t,e,n){return")"==t?E(n):"{"==t||"}"==t?A(t,e,n,2):M.atBlock(t,e,n)},restricted_atBlock_before:function(t,e,n){return"{"==t?k(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(i="variable","restricted_atBlock_before"):P(t,e,n)},restricted_atBlock:function(t,e,n){return"}"==t?(n.stateArg=null,E(n)):"word"==t?(i="@font-face"==n.stateArg&&!h.hasOwnProperty(e.current().toLowerCase())||"@counter-style"==n.stateArg&&!g.hasOwnProperty(e.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(t,e,n){return"word"==t?(i="variable","keyframes"):"{"==t?k(n,e,"top"):P(t,e,n)},at:function(t,e,n){return";"==t?E(n):"{"==t||"}"==t?A(t,e,n):("word"==t?i="tag":"hash"==t&&(i="builtin"),"at")},interpolation:function(t,e,n){return"}"==t?E(n):"{"==t||";"==t?A(t,e,n):("word"==t?i="variable":"variable"!=t&&"("!=t&&")"!=t&&(i="error"),"interpolation")}};return{startState:function(t){return{tokenize:null,state:o?"block":"top",stateArg:null,context:new T(o?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||C)(t,e);return n&&"object"==typeof n&&(r=n[1],n=n[0]),i=n,"comment"!=r&&(e.state=M[e.state](r,t,e)),i},indent:function(t,e){var n=t.context,o=e&&e.charAt(0),r=n.indent;return"prop"!=n.type||"}"!=o&&")"!=o||(n=n.prev),n.prev&&("}"!=o||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=o||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=o||"at"!=n.type&&"atBlock"!=n.type)||(r=Math.max(0,n.indent-s)):r=(n=n.prev).indent),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}}));var n=["domain","regexp","url","url-prefix"],o=e(n),r=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=e(r),s=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],a=e(s),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],c=e(l),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],p=e(u),d=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],f=e(d),h=e(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=e(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),v=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","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","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","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","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],y=e(v),m=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=e(m),_=n.concat(r).concat(s).concat(l).concat(u).concat(d).concat(v).concat(m);function w(t,e){for(var n,o=!1;null!=(n=t.next());){if(o&&"/"==n){e.tokenize=null;break}o="*"==n}return["comment","comment"]}t.registerHelper("hintWords","css",_),t.defineMIME("text/css",{documentTypes:o,mediaTypes:i,mediaFeatures:a,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:h,counterDescriptors:g,colorKeywords:y,valueKeywords:b,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=w,w(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:a,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:y,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=w,w(t,e)):["operator","operator"]},":":function(t){return!!t.match(/^\s*\{/,!1)&&[null,null]},$:function(t){return t.match(/^[\w-]+/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return!!t.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:a,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:f,colorKeywords:y,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=w,w(t,e)):["operator","operator"]},"@":function(t){return t.eat("{")?[null,"interpolation"]:!t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),t.defineMIME("text/x-gss",{documentTypes:o,mediaTypes:i,mediaFeatures:a,propertyKeywords:p,nonStandardPropertyKeywords:f,fontProperties:h,counterDescriptors:g,colorKeywords:y,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=w,w(t,e))}},name:"css",helperType:"gss"})}(n(631))},531:(t,e,n)=>{1&&function(t){"use strict";var e={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function n(t,e,n){var o=t.current(),r=o.search(e);return r>-1?t.backUp(o.length-r):o.match(/<\/?$/)&&(t.backUp(o.length),t.match(e,!1)||t.match(o)),n}var o={};function r(t){var e=o[t];return e||(o[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}function i(t,e){var n=t.match(r(e));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function s(t,e){return new RegExp((e?"^":"")+"","i")}function a(t,e){for(var n in t)for(var o=e[n]||(e[n]=[]),r=t[n],i=r.length-1;i>=0;i--)o.unshift(r[i])}function l(t,e){for(var n=0;n=0;d--)c.script.unshift(["type",p[d].matches,p[d].mode]);function f(e,r){var a,u=i.token(e,r.htmlState),p=/\btag\b/.test(u);if(p&&!/[<>\s\/]/.test(e.current())&&(a=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&c.hasOwnProperty(a))r.inTag=a+" ";else if(r.inTag&&p&&/>$/.test(e.current())){var d=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var h=">"==e.current()&&l(c[d[1]],d[2]),g=t.getMode(o,h),v=s(d[1],!0),y=s(d[1],!1);r.token=function(t,e){return t.match(v,!1)?(e.token=f,e.localState=e.localMode=null,null):n(t,y,e.localMode.token(t,e.localState))},r.localMode=g,r.localState=t.startState(g,i.indent(r.htmlState,"",""))}else r.inTag&&(r.inTag+=e.current(),e.eol()&&(r.inTag+=" "));return u}return{startState:function(){return{token:f,inTag:null,localMode:null,localState:null,htmlState:t.startState(i)}},copyState:function(e){var n;return e.localState&&(n=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:n,htmlState:t.copyState(i,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,o){return!e.localMode||/^\s*<\//.test(n)?i.indent(e.htmlState,n,o):e.localMode.indent?e.localMode.indent(e.localState,n,o):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||i}}}}),"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")}(n(631),n(589),n(876),n(629))},876:(t,e,n)=>{1&&function(t){"use strict";t.defineMode("javascript",(function(e,n){var o,r,i=e.indentUnit,s=n.statementIndent,a=n.jsonld,l=n.json||a,c=!1!==n.trackScope,u=n.typescript,p=n.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function t(t){return{type:t,style:"keyword"}}var e=t("keyword a"),n=t("keyword b"),o=t("keyword c"),r=t("keyword d"),i=t("operator"),s={type:"atom",style:"atom"};return{if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:r,break:r,continue:r,new:t("new"),delete:o,void:o,throw:o,debugger:t("debugger"),var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:i,typeof:i,instanceof:i,true:s,false:s,null:s,undefined:s,NaN:s,Infinity:s,this:t("this"),class:t("class"),super:t("atom"),yield:o,export:t("export"),import:t("import"),extends:o,await:o}}(),f=/[+\-*&%=<>!?|~^@]/,h=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function g(t){for(var e,n=!1,o=!1;null!=(e=t.next());){if(!n){if("/"==e&&!o)return;"["==e?o=!0:o&&"]"==e&&(o=!1)}n=!n&&"\\"==e}}function v(t,e,n){return o=t,r=n,e}function y(t,e){var n=t.next();if('"'==n||"'"==n)return e.tokenize=m(n),e.tokenize(t,e);if("."==n&&t.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return v("number","number");if("."==n&&t.match(".."))return v("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return v(n);if("="==n&&t.eat(">"))return v("=>","operator");if("0"==n&&t.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return v("number","number");if(/\d/.test(n))return t.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),v("number","number");if("/"==n)return t.eat("*")?(e.tokenize=b,b(t,e)):t.eat("/")?(t.skipToEnd(),v("comment","comment")):re(t,e,1)?(g(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),v("regexp","string-2")):(t.eat("="),v("operator","operator",t.current()));if("`"==n)return e.tokenize=_,_(t,e);if("#"==n&&"!"==t.peek())return t.skipToEnd(),v("meta","meta");if("#"==n&&t.eatWhile(p))return v("variable","property");if("<"==n&&t.match("!--")||"-"==n&&t.match("->")&&!/\S/.test(t.string.slice(0,t.start)))return t.skipToEnd(),v("comment","comment");if(f.test(n))return">"==n&&e.lexical&&">"==e.lexical.type||(t.eat("=")?"!"!=n&&"="!=n||t.eat("="):/[<>*+\-|&?]/.test(n)&&(t.eat(n),">"==n&&t.eat(n))),"?"==n&&t.eat(".")?v("."):v("operator","operator",t.current());if(p.test(n)){t.eatWhile(p);var o=t.current();if("."!=e.lastType){if(d.propertyIsEnumerable(o)){var r=d[o];return v(r.type,r.style,o)}if("async"==o&&t.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return v("async","keyword",o)}return v("variable","variable",o)}}function m(t){return function(e,n){var o,r=!1;if(a&&"@"==e.peek()&&e.match(h))return n.tokenize=y,v("jsonld-keyword","meta");for(;null!=(o=e.next())&&(o!=t||r);)r=!r&&"\\"==o;return r||(n.tokenize=y),v("string","string")}}function b(t,e){for(var n,o=!1;n=t.next();){if("/"==n&&o){e.tokenize=y;break}o="*"==n}return v("comment","comment")}function _(t,e){for(var n,o=!1;null!=(n=t.next());){if(!o&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=y;break}o=!o&&"\\"==n}return v("quasi","string-2",t.current())}var w="([{}])";function x(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(u){var o=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,n));o&&(n=o.index)}for(var r=0,i=!1,s=n-1;s>=0;--s){var a=t.string.charAt(s),l=w.indexOf(a);if(l>=0&&l<3){if(!r){++s;break}if(0==--r){"("==a&&(i=!0);break}}else if(l>=3&&l<6)++r;else if(p.test(a))i=!0;else if(/["'\/`]/.test(a))for(;;--s){if(0==s)return;if(t.string.charAt(s-1)==a&&"\\"!=t.string.charAt(s-2)){s--;break}}else if(i&&!r){++s;break}}i&&!r&&(e.fatArrowAt=s)}}var C={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function S(t,e,n,o,r,i){this.indented=t,this.column=e,this.type=n,this.prev=r,this.info=i,null!=o&&(this.align=o)}function O(t,e){if(!c)return!1;for(var n=t.localVars;n;n=n.next)if(n.name==e)return!0;for(var o=t.context;o;o=o.prev)for(n=o.vars;n;n=n.next)if(n.name==e)return!0}function T(t,e,n,o,r){var i=t.cc;for(k.state=t,k.stream=r,k.marked=null,k.cc=i,k.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);1;)if((i.length?i.pop():l?$:U)(n,o)){for(;i.length&&i[i.length-1].lex;)i.pop()();return k.marked?k.marked:"variable"==n&&O(t,o)?"variable-2":e}}var k={state:null,column:null,marked:null,cc:null};function E(){for(var t=arguments.length-1;t>=0;t--)k.cc.push(arguments[t])}function P(){return E.apply(null,arguments),!0}function A(t,e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}function j(t){var e=k.state;if(k.marked="def",c){if(e.context)if("var"==e.lexical.info&&e.context&&e.context.block){var o=M(t,e.context);if(null!=o)return void(e.context=o)}else if(!A(t,e.localVars))return void(e.localVars=new N(t,e.localVars));n.globalVars&&!A(t,e.globalVars)&&(e.globalVars=new N(t,e.globalVars))}}function M(t,e){if(e){if(e.block){var n=M(t,e.prev);return n?n==e.prev?e:new D(n,e.vars,!0):null}return A(t,e.vars)?e:new D(e.prev,new N(t,e.vars),!1)}return null}function L(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function D(t,e,n){this.prev=t,this.vars=e,this.block=n}function N(t,e){this.name=t,this.next=e}var I=new N("this",new N("arguments",null));function F(){k.state.context=new D(k.state.context,k.state.localVars,!1),k.state.localVars=I}function V(){k.state.context=new D(k.state.context,k.state.localVars,!0),k.state.localVars=null}function R(){k.state.localVars=k.state.context.vars,k.state.context=k.state.context.prev}function H(t,e){var n=function(){var n=k.state,o=n.indented;if("stat"==n.lexical.type)o=n.lexical.indented;else for(var r=n.lexical;r&&")"==r.type&&r.align;r=r.prev)o=r.indented;n.lexical=new S(o,k.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function z(){var t=k.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function B(t){function e(n){return n==t?P():";"==t||"}"==n||")"==n||"]"==n?E():P(e)}return e}function U(t,e){return"var"==t?P(H("vardef",e),Et,B(";"),z):"keyword a"==t?P(H("form"),G,U,z):"keyword b"==t?P(H("form"),U,z):"keyword d"==t?k.stream.match(/^\s*$/,!1)?P():P(H("stat"),Y,B(";"),z):"debugger"==t?P(B(";")):"{"==t?P(H("}"),V,dt,z,R):";"==t?P():"if"==t?("else"==k.state.lexical.info&&k.state.cc[k.state.cc.length-1]==z&&k.state.cc.pop()(),P(H("form"),G,U,z,Dt)):"function"==t?P(Vt):"for"==t?P(H("form"),V,Nt,U,R,z):"class"==t||u&&"interface"==e?(k.marked="keyword",P(H("form","class"==t?t:e),Ut,z)):"variable"==t?u&&"declare"==e?(k.marked="keyword",P(U)):u&&("module"==e||"enum"==e||"type"==e)&&k.stream.match(/^\s*\w/,!1)?(k.marked="keyword","enum"==e?P(ee):"type"==e?P(Ht,B("operator"),yt,B(";")):P(H("form"),Pt,B("{"),H("}"),dt,z,z)):u&&"namespace"==e?(k.marked="keyword",P(H("form"),$,U,z)):u&&"abstract"==e?(k.marked="keyword",P(U)):P(H("stat"),it):"switch"==t?P(H("form"),G,B("{"),H("}","switch"),V,dt,z,z,R):"case"==t?P($,B(":")):"default"==t?P(B(":")):"catch"==t?P(H("form"),F,W,U,z,R):"export"==t?P(H("stat"),Gt,z):"import"==t?P(H("stat"),Yt,z):"async"==t?P(U):"@"==e?P($,U):E(H("stat"),$,B(";"),z)}function W(t){if("("==t)return P(zt,B(")"))}function $(t,e){return K(t,e,!1)}function q(t,e){return K(t,e,!0)}function G(t){return"("!=t?E():P(H(")"),Y,B(")"),z)}function K(t,e,n){if(k.state.fatArrowAt==k.stream.start){var o=n?et:tt;if("("==t)return P(F,H(")"),ut(zt,")"),z,B("=>"),o,R);if("variable"==t)return E(F,Pt,B("=>"),o,R)}var r=n?J:X;return C.hasOwnProperty(t)?P(r):"function"==t?P(Vt,r):"class"==t||u&&"interface"==e?(k.marked="keyword",P(H("form"),Bt,z)):"keyword c"==t||"async"==t?P(n?q:$):"("==t?P(H(")"),Y,B(")"),z,r):"operator"==t||"spread"==t?P(n?q:$):"["==t?P(H("]"),te,z,r):"{"==t?pt(at,"}",null,r):"quasi"==t?E(Z,r):"new"==t?P(nt(n)):P()}function Y(t){return t.match(/[;\}\)\],]/)?E():E($)}function X(t,e){return","==t?P(Y):J(t,e,!1)}function J(t,e,n){var o=0==n?X:J,r=0==n?$:q;return"=>"==t?P(F,n?et:tt,R):"operator"==t?/\+\+|--/.test(e)||u&&"!"==e?P(o):u&&"<"==e&&k.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?P(H(">"),ut(yt,">"),z,o):"?"==e?P($,B(":"),r):P(r):"quasi"==t?E(Z,o):";"!=t?"("==t?pt(q,")","call",o):"."==t?P(st,o):"["==t?P(H("]"),Y,B("]"),z,o):u&&"as"==e?(k.marked="keyword",P(yt,o)):"regexp"==t?(k.state.lastType=k.marked="operator",k.stream.backUp(k.stream.pos-k.stream.start-1),P(r)):void 0:void 0}function Z(t,e){return"quasi"!=t?E():"${"!=e.slice(e.length-2)?P(Z):P(Y,Q)}function Q(t){if("}"==t)return k.marked="string-2",k.state.tokenize=_,P(Z)}function tt(t){return x(k.stream,k.state),E("{"==t?U:$)}function et(t){return x(k.stream,k.state),E("{"==t?U:q)}function nt(t){return function(e){return"."==e?P(t?rt:ot):"variable"==e&&u?P(Ot,t?J:X):E(t?q:$)}}function ot(t,e){if("target"==e)return k.marked="keyword",P(X)}function rt(t,e){if("target"==e)return k.marked="keyword",P(J)}function it(t){return":"==t?P(z,U):E(X,B(";"),z)}function st(t){if("variable"==t)return k.marked="property",P()}function at(t,e){return"async"==t?(k.marked="property",P(at)):"variable"==t||"keyword"==k.style?(k.marked="property","get"==e||"set"==e?P(lt):(u&&k.state.fatArrowAt==k.stream.start&&(n=k.stream.match(/^\s*:\s*/,!1))&&(k.state.fatArrowAt=k.stream.pos+n[0].length),P(ct))):"number"==t||"string"==t?(k.marked=a?"property":k.style+" property",P(ct)):"jsonld-keyword"==t?P(ct):u&&L(e)?(k.marked="keyword",P(at)):"["==t?P($,ft,B("]"),ct):"spread"==t?P(q,ct):"*"==e?(k.marked="keyword",P(at)):":"==t?E(ct):void 0;var n}function lt(t){return"variable"!=t?E(ct):(k.marked="property",P(Vt))}function ct(t){return":"==t?P(q):"("==t?E(Vt):void 0}function ut(t,e,n){function o(r,i){if(n?n.indexOf(r)>-1:","==r){var s=k.state.lexical;return"call"==s.info&&(s.pos=(s.pos||0)+1),P((function(n,o){return n==e||o==e?E():E(t)}),o)}return r==e||i==e?P():n&&n.indexOf(";")>-1?E(t):P(B(e))}return function(n,r){return n==e||r==e?P():E(t,o)}}function pt(t,e,n){for(var o=3;o"),yt):"quasi"==t?E(wt,St):void 0}function mt(t){if("=>"==t)return P(yt)}function bt(t){return t.match(/[\}\)\]]/)?P():","==t||";"==t?P(bt):E(_t,bt)}function _t(t,e){return"variable"==t||"keyword"==k.style?(k.marked="property",P(_t)):"?"==e||"number"==t||"string"==t?P(_t):":"==t?P(yt):"["==t?P(B("variable"),ht,B("]"),_t):"("==t?E(Rt,_t):t.match(/[;\}\)\],]/)?void 0:P()}function wt(t,e){return"quasi"!=t?E():"${"!=e.slice(e.length-2)?P(wt):P(yt,xt)}function xt(t){if("}"==t)return k.marked="string-2",k.state.tokenize=_,P(wt)}function Ct(t,e){return"variable"==t&&k.stream.match(/^\s*[?:]/,!1)||"?"==e?P(Ct):":"==t?P(yt):"spread"==t?P(Ct):E(yt)}function St(t,e){return"<"==e?P(H(">"),ut(yt,">"),z,St):"|"==e||"."==t||"&"==e?P(yt):"["==t?P(yt,B("]"),St):"extends"==e||"implements"==e?(k.marked="keyword",P(yt)):"?"==e?P(yt,B(":"),yt):void 0}function Ot(t,e){if("<"==e)return P(H(">"),ut(yt,">"),z,St)}function Tt(){return E(yt,kt)}function kt(t,e){if("="==e)return P(yt)}function Et(t,e){return"enum"==e?(k.marked="keyword",P(ee)):E(Pt,ft,Mt,Lt)}function Pt(t,e){return u&&L(e)?(k.marked="keyword",P(Pt)):"variable"==t?(j(e),P()):"spread"==t?P(Pt):"["==t?pt(jt,"]"):"{"==t?pt(At,"}"):void 0}function At(t,e){return"variable"!=t||k.stream.match(/^\s*:/,!1)?("variable"==t&&(k.marked="property"),"spread"==t?P(Pt):"}"==t?E():"["==t?P($,B(']'),B(':'),At):P(B(":"),Pt,Mt)):(j(e),P(Mt))}function jt(){return E(Pt,Mt)}function Mt(t,e){if("="==e)return P(q)}function Lt(t){if(","==t)return P(Et)}function Dt(t,e){if("keyword b"==t&&"else"==e)return P(H("form","else"),U,z)}function Nt(t,e){return"await"==e?P(Nt):"("==t?P(H(")"),It,z):void 0}function It(t){return"var"==t?P(Et,Ft):"variable"==t?P(Ft):E(Ft)}function Ft(t,e){return")"==t?P():";"==t?P(Ft):"in"==e||"of"==e?(k.marked="keyword",P($,Ft)):E($,Ft)}function Vt(t,e){return"*"==e?(k.marked="keyword",P(Vt)):"variable"==t?(j(e),P(Vt)):"("==t?P(F,H(")"),ut(zt,")"),z,gt,U,R):u&&"<"==e?P(H(">"),ut(Tt,">"),z,Vt):void 0}function Rt(t,e){return"*"==e?(k.marked="keyword",P(Rt)):"variable"==t?(j(e),P(Rt)):"("==t?P(F,H(")"),ut(zt,")"),z,gt,R):u&&"<"==e?P(H(">"),ut(Tt,">"),z,Rt):void 0}function Ht(t,e){return"keyword"==t||"variable"==t?(k.marked="type",P(Ht)):"<"==e?P(H(">"),ut(Tt,">"),z):void 0}function zt(t,e){return"@"==e&&P($,zt),"spread"==t?P(zt):u&&L(e)?(k.marked="keyword",P(zt)):u&&"this"==t?P(ft,Mt):E(Pt,ft,Mt)}function Bt(t,e){return"variable"==t?Ut(t,e):Wt(t,e)}function Ut(t,e){if("variable"==t)return j(e),P(Wt)}function Wt(t,e){return"<"==e?P(H(">"),ut(Tt,">"),z,Wt):"extends"==e||"implements"==e||u&&","==t?("implements"==e&&(k.marked="keyword"),P(u?yt:$,Wt)):"{"==t?P(H("}"),$t,z):void 0}function $t(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||u&&L(e))&&k.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(k.marked="keyword",P($t)):"variable"==t||"keyword"==k.style?(k.marked="property",P(qt,$t)):"number"==t||"string"==t?P(qt,$t):"["==t?P($,ft,B("]"),qt,$t):"*"==e?(k.marked="keyword",P($t)):u&&"("==t?E(Rt,$t):";"==t||","==t?P($t):"}"==t?P():"@"==e?P($,$t):void 0}function qt(t,e){if("!"==e)return P(qt);if("?"==e)return P(qt);if(":"==t)return P(yt,Mt);if("="==e)return P(q);var n=k.state.lexical.prev;return E(n&&"interface"==n.info?Rt:Vt)}function Gt(t,e){return"*"==e?(k.marked="keyword",P(Qt,B(";"))):"default"==e?(k.marked="keyword",P($,B(";"))):"{"==t?P(ut(Kt,"}"),Qt,B(";")):E(U)}function Kt(t,e){return"as"==e?(k.marked="keyword",P(B("variable"))):"variable"==t?E(q,Kt):void 0}function Yt(t){return"string"==t?P():"("==t?E($):"."==t?E(X):E(Xt,Jt,Qt)}function Xt(t,e){return"{"==t?pt(Xt,"}"):("variable"==t&&j(e),"*"==e&&(k.marked="keyword"),P(Zt))}function Jt(t){if(","==t)return P(Xt,Jt)}function Zt(t,e){if("as"==e)return k.marked="keyword",P(Xt)}function Qt(t,e){if("from"==e)return k.marked="keyword",P($)}function te(t){return"]"==t?P():E(ut(q,"]"))}function ee(){return E(H("form"),Pt,B("{"),H("}"),ut(ne,"}"),z,z)}function ne(){return E(Pt,Mt)}function oe(t,e){return"operator"==t.lastType||","==t.lastType||f.test(e.charAt(0))||/[,.]/.test(e.charAt(0))}function re(t,e,n){return e.tokenize==y&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}return F.lex=V.lex=!0,R.lex=!0,z.lex=!0,{startState:function(t){var e={tokenize:y,lastType:"sof",cc:[],lexical:new S((t||0)-i,0,"block",!1),localVars:n.localVars,context:n.localVars&&new D(null,null,!1),indented:t||0};return n.globalVars&&"object"==typeof n.globalVars&&(e.globalVars=n.globalVars),e},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),x(t,e)),e.tokenize!=b&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==o?n:(e.lastType="operator"!=o||"++"!=r&&"--"!=r?o:"incdec",T(e,n,o,r,t))},indent:function(e,o){if(e.tokenize==b||e.tokenize==_)return t.Pass;if(e.tokenize!=y)return 0;var r,a=o&&o.charAt(0),l=e.lexical;if(!/^\s*else\b/.test(o))for(var c=e.cc.length-1;c>=0;--c){var u=e.cc[c];if(u==z)l=l.prev;else if(u!=Dt&&u!=R)break}for(;("stat"==l.type||"form"==l.type)&&("}"==a||(r=e.cc[e.cc.length-1])&&(r==X||r==J)&&!/^[,\.=+\-*:?[\(]/.test(o));)l=l.prev;s&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var p=l.type,d=a==p;return"vardef"==p?l.indented+("operator"==e.lastType||","==e.lastType?l.info.length+1:0):"form"==p&&"{"==a?l.indented:"form"==p?l.indented+i:"stat"==p?l.indented+(oe(e,o)?s||i:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:i):l.indented+(/^(?:case|default)\b/.test(o)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:a,jsonMode:l,expressionAllowed:re,skipExpression:function(e){T(e,"atom","atom","true",new t.StringStream("",2,null))}}})),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/manifest+json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(631))},589:(t,e,n)=>{1&&function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",(function(o,r){var i,s,a=o.indentUnit,l={},c=r.htmlMode?e:n;for(var u in c)l[u]=c[u];for(var u in r)l[u]=r[u];function p(t,e){function n(n){return e.tokenize=n,n(t,e)}var o=t.next();return"<"==o?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(h("atom","]]>")):null:t.match("--")?n(h("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(g(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=h("meta","?>"),"meta"):(i=t.eat("/")?"closeTag":"openTag",e.tokenize=d,"tag bracket"):"&"==o?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function d(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=p,i=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return i="equals",null;if("<"==n){e.tokenize=p,e.state=_,e.tagName=e.tagStart=null;var o=e.tokenize(t,e);return o?o+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=f(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=d;break}return"string"};return e.isInAttribute=!0,e}function h(t,e){return function(n,o){for(;!n.eol();){if(n.match(e)){o.tokenize=p;break}n.next()}return t}}function g(t){return function(e,n){for(var o;null!=(o=e.next());){if("<"==o)return n.tokenize=g(t+1),n.tokenize(e,n);if(">"==o){if(1==t){n.tokenize=p;break}return n.tokenize=g(t-1),n.tokenize(e,n)}}return"meta"}}function v(t){return t&&t.toLowerCase()}function y(t,e,n){this.prev=t.context,this.tagName=e||"",this.indent=t.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function m(t){t.context&&(t.context=t.context.prev)}function b(t,e){for(var n;1;){if(!t.context)return;if(n=t.context.tagName,!l.contextGrabbers.hasOwnProperty(v(n))||!l.contextGrabbers[v(n)].hasOwnProperty(v(e)))return;m(t)}}function _(t,e,n){return"openTag"==t?(n.tagStart=e.column(),w):"closeTag"==t?x:_}function w(t,e,n){return"word"==t?(n.tagName=e.current(),s="tag",O):l.allowMissingTagName&&"endTag"==t?(s="tag bracket",O(t,e,n)):(s="error",w)}function x(t,e,n){if("word"==t){var o=e.current();return n.context&&n.context.tagName!=o&&l.implicitlyClosed.hasOwnProperty(v(n.context.tagName))&&m(n),n.context&&n.context.tagName==o||!1===l.matchClosing?(s="tag",C):(s="tag error",S)}return l.allowMissingTagName&&"endTag"==t?(s="tag bracket",C(t,e,n)):(s="error",S)}function C(t,e,n){return"endTag"!=t?(s="error",C):(m(n),_)}function S(t,e,n){return s="error",C(t,e,n)}function O(t,e,n){if("word"==t)return s="attribute",T;if("endTag"==t||"selfcloseTag"==t){var o=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(v(o))?b(n,o):(b(n,o),n.context=new y(n,o,r==n.indented)),_}return s="error",O}function T(t,e,n){return"equals"==t?k:(l.allowMissing||(s="error"),O(t,e,n))}function k(t,e,n){return"string"==t?E:"word"==t&&l.allowUnquoted?(s="string",O):(s="error",O(t,e,n))}function E(t,e,n){return"string"==t?E:O(t,e,n)}return p.isInText=!0,{startState:function(t){var e={tokenize:p,state:_,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;i=null;var n=e.tokenize(t,e);return(n||i)&&"comment"!=n&&(s=null,e.state=e.state(i||n,t,e),s&&(n="error"==s?n+" error":s)),n},indent:function(e,n,o){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+a;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=d&&e.tokenize!=p)return o?o.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+a*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==k&&(t.state=O)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],n=t.context;n;n=n.prev)e.push(n.tagName);return e.reverse()}}})),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(631))},858:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o={run:function(t){t.DomComponents.clear(),t.CssComposer.clear()}}},884:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>s});var o=n(50),r=n(163),i=n(668);const s={run:function(t){(0,o.bindAll)(this,'onKeyUp','enableDragger','disableDragger'),this.editor=t,this.canvasModel=this.canvas.getCanvasView().model,this.toggleMove(1)},stop:function(t){this.toggleMove(),this.disableDragger()},onKeyUp:function(t){' '===(0,r.getKeyChar)(t)&&this.editor.stopCommand(this.id)},enableDragger:function(t){this.toggleDragger(1,t)},disableDragger:function(t){this.toggleDragger(0,t)},toggleDragger:function(t,e){var n=this.canvasModel,o=this.em,r=this.dragger,s=t?'add':'remove';this.getCanvas().classList[s]("".concat(this.ppfx,"is__grabbing")),r||(r=new i.Z({getPosition:function(){return{x:n.get('x'),y:n.get('y')}},setPosition:function(t){var e=t.x,o=t.y;n.set({x:e,y:o})},onStart:function(t,e){o.trigger('canvas:move:start',e)},onDrag:function(t,e){o.trigger('canvas:move',e)},onEnd:function(t,e){o.trigger('canvas:move:end',e)}}),this.dragger=r),t?r.start(e):r.stop()},toggleMove:function(t){var e=this.ppfx,n=t?'add':'remove',o=t?'on':'off',i={on:r.on,off:r.off},s=this.getCanvas(),a=["".concat(e,"is__grab")];!t&&a.push("".concat(e,"is__grabbing")),a.forEach((function(t){return s.classList[n](t)})),i[o](document,'keyup',this.onKeyUp),i[o](s,'mousedown',this.enableDragger),i[o](document,'mouseup',this.disableDragger)}}},790:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>a,defineCommand:()=>s});var o,r=n(346),i=void 0&&(void 0).__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function s(t){return t}const a=function(t){function e(e){var n=t.call(this,0)||this;n.config=e||{},n.em=n.config.em||{};var o=n.config.stylePrefix;return n.pfx=o,n.ppfx=n.config.pStylePrefix,n.hoverClass="".concat(o,"hover"),n.badgeClass="".concat(o,"badge"),n.plhClass="".concat(o,"placeholder"),n.freezClass="".concat(n.ppfx,"freezed"),n.canvas=n.em.Canvas,n.init(n.config),n}return i(e,t),e.prototype.onFrameScroll=function(t){},e.prototype.getCanvas=function(){return this.canvas.getElement()},e.prototype.getCanvasBody=function(){return this.canvas.getBody()},e.prototype.getCanvasTools=function(){return this.canvas.getToolsEl()},e.prototype.offset=function(t){var e=t.getBoundingClientRect();return{top:e.top+t.ownerDocument.body.scrollTop,left:e.left+t.ownerDocument.body.scrollLeft}},e.prototype.init=function(t){},e.prototype.callRun=function(t,e){void 0===e&&(e={});var n=this.id;if(t.trigger("run:".concat(n,":before"),e),!e||!e.abort){var o=e.sender||t,r=this.run(t,o,e);return t.trigger("run:".concat(n),r,e),t.trigger('run',n,r,e),r}t.trigger("abort:".concat(n),e)},e.prototype.callStop=function(t,e){void 0===e&&(e={});var n=this.id,o=e.sender||t;t.trigger("stop:".concat(n,":before"),e);var r=this.stop(t,o,e);return t.trigger("stop:".concat(n),r,e),t.trigger('stop',n,r,e),r},e.prototype.stopCommand=function(t){this.em.Commands.stop(this.id,t)},e.prototype.run=function(t,e,n){},e.prototype.stop=function(t,e,n){},e}(r.Hn)},180:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});var o=n(50),r=void 0&&(void 0).__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,r=0,i=e.length;r{"use strict";n.r(e),n.d(e,{default:()=>a});var o=n(50),r=n(668),i=void 0&&(void 0).__assign||function(){return i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
    \n
    ");(e=document.createElement('div')).className="".concat(a,"guides"),l.className="".concat(a,"guide-info ").concat(a,"guide-info__x"),c.className="".concat(a,"guide-info ").concat(a,"guide-info__y"),l.innerHTML=u,c.innerHTML=u,e.appendChild(l),e.appendChild(c),r.Canvas.getGlobalToolsEl().appendChild(e),this.guidesEl=e,this.elGuideInfoX=l,this.elGuideInfoY=c,this.elGuideInfoContentX=l.querySelector(".".concat(a,"guide-info__content")),this.elGuideInfoContentY=c.querySelector(".".concat(a,"guide-info__content")),i.on('canvas:update frame:scroll',(0,o.debounce)((function(){var e;t.updateGuides(),s.debug&&(null===(e=t.guides)||void 0===e||e.forEach((function(e){return t.renderGuide(e)})))}),200))}return e},getGuidesStatic:function(){var t=this,e=[],n=this.target.getEl(),r=n.parentNode,i=void 0===r?{}:r;return(0,o.each)(i.children,(function(o){return e=e.concat(n!==o?t.getElementGuides(o):[])})),e.concat(this.getElementGuides(i))},getGuidesTarget:function(){return this.getElementGuides(this.target.getEl())},updateGuides:function(t){var e,n,r=this;(t||this.guides).forEach((function(t){var i=t.origin,s=e===i?n:r.getElementPos(i);e=i,n=s,(0,o.each)(r.getGuidePosUpdate(t,s),(function(e,n){return t[n]=e})),t.originRect=s}))},getGuidePosUpdate:function(t,e){var n={},o=e.top,r=e.height,i=e.left,s=e.width;switch(t.type){case't':n.y=o;break;case'b':n.y=o+r;break;case'l':n.x=i;break;case'r':n.x=i+s;break;case'x':n.x=i+s/2;break;case'y':n.y=o+r/2}return n},renderGuide:function(t){void 0===t&&(t={});var e=t.guide||document.createElement('div'),n='px',o=t.active?2:1,r=e.children[0];return e.style="position: absolute; background-color: ".concat(t.active?'green':'red',";"),e.children.length||((r=document.createElement('div')).style='position: absolute; color: red; padding: 5px; top: 0; left: 0;',e.appendChild(r)),t.y?(e.style.width='100%',e.style.height="".concat(o).concat(n),e.style.top="".concat(t.y).concat(n),e.style.left=0):(e.style.width="".concat(o).concat(n),e.style.height='100%',e.style.left="".concat(t.x).concat(n),e.style.top="0".concat(n)),!t.guide&&this.guidesContainer.appendChild(e),e},getElementPos:function(t){return this.editor.Canvas.getElementPos(t,{noScroll:1})},getElementGuides:function(t){var e=this,n=this.opts,o=this.getElementPos(t),r=o.top,s=o.height,a=o.left,l=o.width,c=[{type:'t',y:r},{type:'b',y:r+s},{type:'l',x:a},{type:'r',x:a+l},{type:'x',x:a+l/2},{type:'y',y:r+s/2}].map((function(r){return i(i({},r),{origin:t,originRect:o,guide:n.debug&&e.renderGuide(r)})}));return c.forEach((function(t){var n;return null===(n=e.guides)||void 0===n?void 0:n.push(t)})),c},getTranslate:function(t,e){void 0===e&&(e='x');var n=0;return(t||'').split(' ').forEach((function(t){var o=t.trim(),r="translate".concat(e.toUpperCase(),"(");0===o.indexOf(r)&&(n=parseFloat(o.replace(r,'')))})),n},setTranslate:function(t,e,n){var o="translate".concat(e.toUpperCase(),"("),r="".concat(o).concat(n,")"),i=(t||'').split(' ').map((function(t){return 0===t.trim().indexOf(o)&&(t=r),t})).join(' ');return i.indexOf(o)<0&&(i+=" ".concat(r)),i},getPosition:function(){var t=this.target,e=this.isTran,n=t.getStyle(),o=n.left,r=n.top,i=n.transform,s=0,a=0;return e?(s=this.getTranslate(i),a=this.getTranslate(i,'y')):(s=parseFloat(o||0),a=parseFloat(r||0)),{x:s,y:a}},setPosition:function(t){var e=t.x,n=t.y,r=t.end,i=t.position,s=t.width,a=t.height,l=this,c=l.target,u=l.isTran,p=l.em,d='px',f=!r,h="".concat(parseInt(e,10)).concat(d),g="".concat(parseInt(n,10)).concat(d),v={};if(u){var y=c.getStyle()['transform']||'';y=this.setTranslate(y,'x',h),v={transform:y=this.setTranslate(y,'y',g),__p:f},c.addStyle(v,{avoidStore:!r})}else{var m={position:i,width:s,height:a},b={left:h,top:g,__p:f};(0,o.keys)(m).forEach((function(t){var e=m[t];e&&(b[t]=e)})),v=b,c.addStyle(v,{avoidStore:!r})}null==p||p.Styles.__emitCmpStyleUpdate(v,{components:p.getSelected()})},_getDragData:function(){var t=this.target;return{target:t,parent:t.parent(),index:t.index()}},onStart:function(t){var e=this,n=e.target,o=e.editor,r=e.isTran,i=e.opts,s=i.center,a=i.onStart,l=o.Canvas,c=n.getStyle(),u='absolute',p=[u,'relative'];if(a&&a(this._getDragData()),!r&&c.position!==u){var d=l.offset(n.getEl()),f=d.left,h=d.top,g=d.width,v=d.height,y=n.parent(),m=void 0;do{var b=y.getStyle();m=p.indexOf(b.position)>=0?y:null,y=y.parent()}while(y&&!m);if(s){var _=l.getMouseRelativeCanvas(t);f=_.x,h=_.y}else if(m){var w=l.offset(m.getEl());f-=w.left,h-=w.top}this.setPosition({x:f,y:h,width:"".concat(g,"px"),height:"".concat(v,"px"),position:u})}},onDrag:function(){for(var t=this,e=[],n=0;n0})).sort((function(t,e){return t.gap-e.gap})).map((function(t){return t.guide}))[0];if(m){var b=m.originRect,_=b.left,w=b.width,x=b.top,C=b.height,S=b.rect,O=u?_{"use strict";n.r(e),n.d(e,{default:()=>o});const o={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach((function(t){var n=t.components(),o=n&&n.filter((function(t){return t.get('selectable')}))[0];o&&e.push(o)})),e.length&&t.select(e)}}}},368:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o={run:function(t,e,n){if(void 0===n&&(n={}),t.Canvas.hasFocus()||n.force){var o=[];t.getSelectedAll().forEach((function(t){for(var e=t.parent();e&&!e.get('selectable');)e=e.parent();e&&o.push(e)})),o.length&&t.select(o)}}}},243:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach((function(t){var n=t.parent();if(n){var o,r=n.components().length,i=0,s=0;do{i++,o=(s=t.index()+i)<=r?n.getChildAt(s):null}while(o&&!o.get('selectable'));e.push(o||t)}})),e.length&&t.select(e)}}}},400:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach((function(t){var n=t.parent();if(n){var o,r=0,i=0;do{r++,o=(i=t.index()-r)>=0?n.getChildAt(i):null}while(o&&!o.get('selectable'));e.push(o||t)}})),e.length&&t.select(e)}}}},910:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var o=n(50);const r={run:function(t,e,n){void 0===n&&(n={});var r=n.target,i=[];if(!r.get('styles'))return i;var s=r.get('type'),a=t.Pages.getAllWrappers();if(!(0,o.flatten)(a.map((function(t){return t.findType(s)}))).length){var l=t.CssComposer.getAll();i=l.filter((function(t){return t.get('group')==="cmp:".concat(s)})),l.remove(i)}return i}}},744:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var o=void 0&&(void 0).__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,r=0,i=e.length;r{"use strict";n.r(e),n.d(e,{default:()=>s});var o=n(50),r=n(895),i=n(407);const s=(0,o.extend)({},i["default"],{init:function(){(0,o.bindAll)(this,'startDelete','stopDelete','onDelete'),this.hoverClass=this.pfx+'hover-delete',this.badgeClass=this.pfx+'badge-red'},enable:function(){this.$el.find('*').mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(t){t.stopPropagation();var e=(0,r["default"])(t.target);e.data('model').get('removable')&&(e.addClass(this.hoverClass),this.attachBadge(e.get(0)))},stopDelete:function(t){t.stopPropagation(),(0,r["default"])(t.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(t){t.stopPropagation();var e=(0,r["default"])(t.target);e.data('model').get('removable')&&(e.data('model').destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(t){this.badge.html('Remove '+t.getName())}})},457:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var o=n(491);const r={run:function(t,e,n){var r=this;void 0===n&&(n={}),e&&e.set&&e.set('active',0);var i=t.getConfig(),s=t.Modal,a=i.stylePrefix;if(this.cm=t.CodeManager||null,!this.editors){var l=this.buildEditor('htmlmixed','hopscotch','HTML'),c=this.buildEditor('css','hopscotch','CSS');this.htmlEditor=l.model,this.cssEditor=c.model;var u=(0,o.ut)('div',{class:"".concat(a,"export-dl")});u.appendChild(l.el),u.appendChild(c.el),this.editors=u}s.open({title:i.textViewCode,content:this.editors}).getModel().once('change:open',(function(){return t.stopCommand("".concat(r.id))})),this.htmlEditor.setContent(t.getHtml(n.optsHtml)),this.cssEditor.setContent(t.getCss(n.optsCss))},stop:function(t){var e=t.Modal;e&&e.close()},buildEditor:function(t,e,n){var o=this.em.CodeManager,r=o.createViewer({label:n,codeName:t,theme:e});return{model:r,el:new o.EditorView({model:r,config:o.getConfig()}).render().el}}}},975:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var o=n(50);const r={isEnabled:function(){var t=document;return!!(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement)},enable:function(t){var e='';return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?(e='webkit',t.webkitRequestFullscreen()):t.mozRequestFullScreen?(e='moz',t.mozRequestFullScreen()):t.msRequestFullscreen&&t.msRequestFullscreen(),e},disable:function(){var t=document;this.isEnabled()&&(t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen())},fsChanged:function(t){this.isEnabled()||(this.stopCommand({sender:this.sender}),document.removeEventListener("".concat(t||'',"fullscreenchange"),this.fsChanged))},run:function(t,e,n){void 0===n&&(n={}),this.sender=e;var r=n.target,i=(0,o.isElement)(r)?r:document.querySelector(r),s=this.enable(i||t.getContainer());this.fsChanged=this.fsChanged.bind(this,s),document.addEventListener(s+'fullscreenchange',this.fsChanged),t.trigger('change:canvasOffset')},stop:function(t,e){e&&e.set&&e.set('active',!1),this.disable(),t&&t.trigger('change:canvasOffset')}}},191:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>l});var o=n(50),r=n(895),i=n(163),s=n(407),a=n(189);const l=(0,o.extend)({},a["default"],s["default"],{init:function(t){s["default"].init.apply(this,arguments),(0,o.bindAll)(this,'initSorter','rollback','onEndMove'),this.opt=t,this.hoverClass=this.ppfx+'highlighter-warning',this.badgeClass=this.ppfx+'badge-warning',this.noSelClass=this.ppfx+'no-select'},enable:function(){for(var t=[],e=0;e{"use strict";n.r(e),n.d(e,{default:()=>i});var o=n(50),r=n(491);const i={open:function(t){var e=this,n=this,r=n.editor,i=n.title,s=n.config,a=n.am,l=s.custom;if((0,o.isFunction)(l.open))return l.open(a.__customData());r.Modal.open({title:i,content:t}).onceClose((function(){return r.stopCommand(e.id)}))},close:function(){var t=this.config.custom;if((0,o.isFunction)(t.close))return t.close(this.am.__customData());var e=this.editor.Modal;e&&e.close()},run:function(t,e,n){void 0===n&&(n={});var o=t.AssetManager,i=o.getConfig(),s=n.types,a=void 0===s?[]:s,l=n.accept,c=n.select;if(this.title=n.modalTitle||t.t('assetManager.modalTitle')||'',this.editor=t,this.config=i,this.am=o,o.setTarget(n.target),o.onClick(n.onClick),o.onDblClick(n.onDblClick),o.onSelect(n.onSelect),o.__behaviour({select:c,types:a,options:n}),i.custom)this.rendered=this.rendered||(0,r.ut)('div'),this.rendered.className="".concat(i.stylePrefix,"custom-wrp"),o.__behaviour({container:this.rendered}),o.__trgCustom();else{if(!this.rendered||a){var u=o.getAll().filter((function(t){return t}));a&&a.length&&(u=u.filter((function(t){return-1!==a.indexOf(t.get('type'))}))),o.render(u),this.rendered=o.getContainer()}if(l){var p=this.rendered.querySelector("input#".concat(i.stylePrefix,"uploadFile"));p&&p.setAttribute('accept',l)}}return this.open(this.rendered),this},stop:function(t){this.editor=t,this.close(this.rendered)}}},117:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});var o=n(50),r=n(491);const i={open:function(){var t=this,e=t.container,n=t.editor,r=t.bm,i=t.config,s=i.custom,a=i.appendTo;if((0,o.isFunction)(s.open))return s.open(r.__customData());if(this.firstRender&&!a){var l='views-container',c=n.Panels;(c.getPanel(l)||c.addPanel({id:l})).set('appendContent',e).trigger('change:appendContent'),s||e.appendChild(r.render())}e&&(e.style.display='block')},close:function(){var t=this.container,e=this.config.custom;if((0,o.isFunction)(e.close))return e.close(this.bm.__customData());t&&(t.style.display='none')},run:function(t){var e=t.Blocks;this.config=e.getConfig(),this.firstRender=!this.container,this.container=this.container||(0,r.ut)('div'),this.editor=t,this.bm=e;var n=this.container;e.__behaviour({container:n}),this.config.custom&&e.__trgCustom(),this.open()},stop:function(){this.close()}}},614:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o={run:function(t){var e=t.LayerManager,n=t.Panels,o=e.getConfig();if(!o.appendTo){if(!this.layers){var r='views-container',i=document.createElement('div'),s=n.getPanel(r)||n.addPanel({id:r});o.custom?e.__trgCustom({container:i}):i.appendChild(e.render()),s.set('appendContent',i).trigger('change:appendContent'),this.layers=i}this.layers.style.display='block'}},stop:function(){var t=this.layers;t&&(t.style.display='none')}}},801:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var o=n(895);const r={run:function(t,e){if(this.sender=e,!this.$cnt){var n=t.getConfig(),r=t.Panels,i=t.DeviceManager,s=t.SelectorManager,a=t.StyleManager,l='change:appendContent',c=(0,o["default"])('
    '),u=(0,o["default"])('
    '),p=(0,o["default"])('
    '),d=(0,o["default"])('
    ');if(this.$cnt=c,this.$cntInner=u,u.append(p),u.append(d),c.append(u),i&&n.showDevices){var f=r.addPanel({id:'devices-c'}),h=i.render();f.set('appendContent',h).trigger(l)}var g=s.getConfig();g.custom?s.__trgCustom({container:p.get(0)}):g.appendTo||p.append(s.render([])),this.sm=a;var v=a.getConfig(),y=v.stylePrefix;this.$header=(0,o["default"])("
    ").concat(t.t('styleManager.empty'),"
    ")),c.append(this.$header),v.custom?a.__trgCustom({container:d.get(0)}):v.appendTo||d.append(a.render());var m='views-container';(r.getPanel(m)||r.addPanel({id:m})).set('appendContent',c).trigger(l);var b=t.getModel();this.listenTo(b,a.events.target,this.toggleSm)}this.toggleSm()},toggleSm:function(){var t=this,e=t.sender,n=t.sm,o=t.$cntInner,r=t.$header;e&&e.get&&!e.get('active')||!n||(n.getSelected()?(null==o||o.show(),null==r||r.hide()):(null==o||o.hide(),null==r||r.show()))},stop:function(){var t,e;null===(t=this.$cntInner)||void 0===t||t.hide(),null===(e=this.$header)||void 0===e||e.hide()}}},395:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var o=n(895);const r={run:function(t,e){this.sender=e;var n,r=t.getModel(),i=t.Config.stylePrefix,s=t.TraitManager,a=s.getConfig();if(!a.appendTo){if(!this.$cn){this.$cn=(0,o["default"])('
    '),this.$cn2=(0,o["default"])('
    '),this.$cn.append(this.$cn2),this.$header=(0,o["default"])('
    ').append("
    ").concat(r.t('traitManager.empty'),"
    ")),this.$cn.append(this.$header),a.custom?s.__trgCustom({container:this.$cn2.get(0)}):(this.$cn2.append("
    ").concat(r.t('traitManager.label'),"
    ")),this.$cn2.append(s.render()));var l=t.Panels;null==(n=l.getPanel('views-container')?l.getPanel('views-container'):l.addPanel({id:'views-container'}))||n.set('appendContent',this.$cn.get(0)).trigger('change:appendContent'),this.target=t.getModel(),this.listenTo(this.target,'component:toggled',this.toggleTm)}this.toggleTm()}},toggleTm:function(){var t=this.sender;t&&t.get&&!t.get('active')||(1===this.target.getSelectedAll().length?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},98:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var o=n(50);const r={run:function(t,e,n){void 0===n&&(n={});var r=t.getModel().get('clipboard'),i=t.getSelected();r&&i&&(t.getSelectedAll().forEach((function(e){var i=e.collection;if(i){var s,a={at:e.index()+1,action:n.action||'paste-component'};if((0,o.contains)(r,e)&&e.get('copyable'))s=i.add(e.clone(),a);else{var l=r.filter((function(t){return t.get('copyable')})).filter((function(n){return t.Components.canMove(e.parent(),n).result}));s=i.add(l.map((function(t){return t.clone()})),a)}(s=(0,o.isArray)(s)?s:[s]).forEach((function(e){return t.trigger('component:paste',e)}))}})),i.emitUpdate())}}},129:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>s});var o=n(50),r=void 0&&(void 0).__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,r=0,i=e.length;r{"use strict";n.r(e),n.d(e,{default:()=>r});var o=void 0&&(void 0).__assign||function(){return o=Object.assign||function(t){for(var e,n=1,o=arguments.length;n{"use strict";n.r(e),n.d(e,{default:()=>C});var o,r=n(50),i=n(895),s=n(346),a=void 0&&(void 0).__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.defaults=function(){return{command:'',attributes:{}}},e}(s.Hn);var c=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e}(s.FE);const p=u;u.prototype.model=l;var d=n(330),f=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),h=void 0&&(void 0).__assign||function(){return h=Object.assign||function(t){for(var e,n=1,o=arguments.length;n").concat(l,"
    "):'',"\n
    ").concat(r.getName(),"
    ");s.innerHTML=p?p(r):d}var f='px',h=s.style;h.display='block';var g=o.getTargetToElementFixed(t,s,{pos:e}).top,v=n.leftOff<0?-n.leftOff:0;h.top=g+f,h.left=v+f}},showHighlighter:function(t){this.canvas.getHighlighter(t).style.opacity=''},initResize:function(t){var e,n=this.em,o=this.canvas,i=null==n?void 0:n.Editor,s=(null==n?void 0:n.config).stylePrefix||'',a="".concat(s,"resizing"),l=!(0,r.isElement)(t)&&(0,w.isTaggableNode)(t)?t:n.getSelected(),c=l&&l.get('resizable'),u={},p=function(t,e,n){var o=n.docs;o&&o.forEach((function(e){var n=e.body,o=n.className||'';n.className=('add'==t?"".concat(o," ").concat(a):o.replace(a,'')).trim()}))};if(i&&c){var d=(0,r.isElement)(t)?t:l.getEl();u={onStart:function(t,r){void 0===r&&(r={});var i=r.el,s=r.config,a=r.resizer,c=s.keyHeight,u=s.keyWidth,d=s.currentUnit,f=s.keepAutoHeight,h=s.keepAutoWidth;p('add',0,r),e=n.Styles.getModelToStyle(l),o.toggleFramesEvents(!1);var g=getComputedStyle(i),v=e.getStyle(),y=v[u];s.autoWidth=h&&'auto'===y,isNaN(parseFloat(y))&&(y=g[u]);var m=v[c];s.autoHeight=f&&'auto'===m,isNaN(parseFloat(m))&&(m=g[c]),a.startDim.w=parseFloat(y),a.startDim.h=parseFloat(m),b=!1,d&&(s.unitHeight=(0,w.getUnitFromValue)(m),s.unitWidth=(0,w.getUnitFromValue)(y))},onMove:function(){i.trigger('component:resize')},onEnd:function(t,e){p('remove',0,e),i.trigger('component:resize'),o.toggleFramesEvents(!0),b=!0},updateTarget:function(t,r,i){if(void 0===i&&(i={}),e){var s=i.store,a=i.selectedHandler,c=i.config,u=c.keyHeight,p=c.keyWidth,d=c.autoHeight,f=c.autoWidth,h=c.unitWidth,g=c.unitHeight,v=['tc','bc'].indexOf(a)>=0,y=['cl','cr'].indexOf(a)>=0,m={};if(!v){var b=o.getBody().offsetWidth,_=r.w{"use strict";n.r(e),n.d(e,{default:()=>r});var o=n(895);const r={startSelectPosition:function(t,e,n){var o=this;void 0===n&&(n={}),this.isPointed=!1;var r=this.em.Utils,i=t.ownerDocument.body;r&&!this.sorter&&(this.sorter=new r.Sorter({container:i,placer:this.canvas.getPlacerEl(),containerSel:'*',itemSel:'*',pfx:this.ppfx,direction:'a',document:e,wmargin:1,nested:1,em:this.em,canvasRelative:1,scale:function(){return o.em.getZoomDecimal()}})),n.onStart&&(this.sorter.onStart=n.onStart),t&&this.sorter.startSort(t,{container:i})},getOffsetDim:function(){var t=this.offset(this.canvas.getFrameEl()),e=this.offset(this.canvas.getElement());return{top:t.top-e.top,left:t.left-e.left}},stopSelectPosition:function(){this.posTargetCollection=null,this.posIndex='after'==this.posMethod&&0!==this.cDim.length?this.posIndex+1:this.posIndex,this.sorter&&(this.sorter.moved=0,this.sorter.endMove()),this.cDim&&(this.posIsLastEl=0!==this.cDim.length&&'after'==this.posMethod&&this.posIndex==this.cDim.length,this.posTargetEl=0===this.cDim.length?(0,o["default"])(this.outsideElem):!this.posIsLastEl&&this.cDim[this.posIndex]?(0,o["default"])(this.cDim[this.posIndex][5]).parent():(0,o["default"])(this.outsideElem),this.posTargetModel=this.posTargetEl.data('model'),this.posTargetCollection=this.posTargetEl.data('model-comp'))},enable:function(){this.startSelectPosition()},nearFloat:function(t,e,n){var o=t||0,r=e||'before',i=n.length,s=0!==i&&'after'==r&&o==i;return 0!==i&&(!s&&!n[o][4]||n[o-1]&&!n[o-1][4]||s&&!n[o-1][4])?1:0},run:function(){this.enable()},stop:function(){this.stopSelectPosition(),this.$wrapper.css('cursor',''),this.$wrapper.unbind()}}},804:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>a});var o=n(50),r=n(895),i=n(163),s=void 0&&(void 0).__assign||function(){return s=Object.assign||function(t){for(var e,n=1,o=arguments.length;n")).get(0),A=(0,r["default"])("
    ")).get(0),j=g+E+'-el',M="".concat(g+k+'-el'," ").concat(g+k),L="".concat(j," ").concat(g+E);m=(0,r["default"])("
    ")).get(0),b=(0,r["default"])("
    ")).get(0),_=(0,r["default"])("
    ")).get(0),w=(0,r["default"])("
    ")).get(0),x=(0,r["default"])("
    ")).get(0),C=(0,r["default"])("
    ")).get(0),S=(0,r["default"])("
    ")).get(0),O=(0,r["default"])("
    ")).get(0),this['marginT'+l]=m,this['marginB'+l]=b,this['marginL'+l]=_,this['marginR'+l]=w,this['padT'+l]=x,this['padB'+l]=C,this['padL'+l]=S,this['padR'+l]=O,P.appendChild(m),P.appendChild(b),P.appendChild(_),P.appendChild(w),A.appendChild(x),A.appendChild(C),A.appendChild(S),A.appendChild(O),y.appendChild(P),y.appendChild(A),this[v]='1'}var D='px',N=parseFloat(h.marginLeft.replace(D,''))*u,I=parseFloat(h.marginRight.replace(D,''))*u,F=parseFloat(h.marginTop.replace(D,''))*u,V=parseFloat(h.marginBottom.replace(D,''))*u,R=m.style,H=b.style,z=_.style,B=w.style,U=x.style,W=C.style,$=S.style,q=O.style,G=parseFloat(f.left),K=parseFloat(h.width)*u+D;R.height=F+D,R.width=K,R.top=f.top-F+D,R.left=G+D,H.height=V+D,H.width=K,H.top=f.top+f.height+D,H.left=G+D;var Y=f.height+F+V+D,X=f.top-F+D;z.height=Y,z.width=N+D,z.top=X,z.left=G-N+D,B.height=Y,B.width=I+D,B.top=X,B.left=G+f.width+D;var J=parseFloat(h.paddingTop)*u;U.height=J+D;var Z=parseFloat(h.paddingBottom)*u;W.height=Z+D;var Q=f.height-Z-J+D,tt=f.top+J+D;$.height=Q,$.width=parseFloat(h.paddingLeft)*u+D,$.top=tt;var et=parseFloat(h.paddingRight)*u;q.height=Q,q.width=et+D,q.top=tt}},stop:function(t,e,n){void 0===n&&(n={});var o=(n||{}).state||'',r=this.getOffsetMethod(o);t.Canvas[r](n.view).style.opacity=0}}},434:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});var o=n(50),r=n(163);const i={init:function(){(0,o.bindAll)(this,'_onFramesChange')},run:function(t){this.toggleVis(t,!0)},stop:function(t){this.toggleVis(t,!1)},toggleVis:function(t,e){if(void 0===e&&(e=!0),!t.Commands.isActive('preview')){var n=t.Canvas,o=e?'on':'off';n.getModel()[o]('change:frames',this._onFramesChange),this.handleFrames(n.getFrames(),e)}},handleFrames:function(t,e){var n=this;t.forEach((function(t){var o;(null===(o=t.view)||void 0===o?void 0:o.loaded)&&n._upFrame(t,e),t.__ol||(t.on('loaded',(function(){return n._upFrame(t)})),t.__ol=!0)}))},_onFramesChange:function(t,e){this.handleFrames(e)},_upFrame:function(t,e){var n,o=this,i=o.ppfx,s=o.em,a=o.id,l=((0,r.isDef)(e)?e:s.Commands.isActive(a))?'add':'remove',c="".concat(i,"dashed");null===(n=t.view)||void 0===n||n.getBody().classList[l](c)}}},346:(t,e,n)=>{"use strict";n.d(e,{FE:()=>l,G7:()=>c,Hn:()=>a});var o,r=n(316),i=n.n(r),s=void 0&&(void 0).__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e}(i().Model),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e}(i().Collection),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e}(i().View)},330:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var o,r=n(50),i=n(346),s=void 0&&(void 0).__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),a=function(t){function e(e,n,o){void 0===e&&(e={}),void 0===o&&(o=!1);var r=t.call(this,e)||this;return r.itemsView='',r.itemType='type',r.reuseView=!1,r.config=n||e.config||{},o&&r.listenTo(r.collection,'add',r.addTo),r.items=[],r}return s(e,t),e.prototype.addTo=function(t){this.add(t)},e.prototype.itemViewNotFound=function(t){var e=this.config,n=this.ns,o=e.em,r="".concat(n?"[".concat(n,"]: "):'',"'").concat(t,"' type not found");o&&o.logWarning(r)},e.prototype.add=function(t,e){var n,o=this,i=o.config,s=o.reuseView,a=o.items,l=this.itemsView||{},c=e||null,u=this.itemView,p=t.get(this.itemType);l[p]?u=l[p]:!p||l[p]||(0,r.includes)(['button','checkbox','color','date','datetime-local','email','file','hidden','image','month','number','password','radio','range','reset','search','submit','tel','text','time','url','week'],p)||this.itemViewNotFound(p),n=t.view&&s?t.view:new u({model:t,config:i},i),a&&a.push(n);var d=n.render().el;c?c.appendChild(d):this.$el.append(d)},e.prototype.render=function(){var t=document.createDocumentFragment();return this.clearItems(),this.$el.empty(),this.collection.length&&this.collection.each((function(e){this.add(e,t)}),this),this.$el.append(t),this.onRender(),this},e.prototype.onRender=function(){},e.prototype.onRemoveBefore=function(t,e){},e.prototype.onRemove=function(t,e){},e.prototype.remove=function(e){void 0===e&&(e={});var n=this.items;return this.onRemoveBefore(n,e),this.clearItems(),t.prototype.remove.call(this),this.onRemove(n,e),this},e.prototype.clearItems=function(){this.items},e}(i.G7);const l=a;a.prototype.itemView=''},668:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var o=n(50),r=n(163),i=void 0&&(void 0).__assign||function(){return i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=e&&t<=e+o||t<=e&&t>=e-o},t.prototype.setGuideLock=function(t,e){var n=(0,o.isUndefined)(t.x)?'Y':'X',r="trg".concat(n);return null!==e?(t.active=!0,t.lock=e,this[r]=t):(delete t.active,delete t.lock,delete this[r]),t},t.prototype.stop=function(t,e){void 0===e&&(e={});var n=this.delta,r=!!e.cancel,i=r?0:n.x,s=r?0:n.y;this.toggleDrag(),this.lockedAxis=null,this.move(i,s,!0);var a=this.opts.onEnd;(0,o.isFunction)(a)&&a(t,this,{cancelled:r})},t.prototype.keyHandle=function(t){(0,r.isEscKey)(t)&&this.stop(t,{cancel:!0})},t.prototype.move=function(t,e,n){var r=this.el,i=this.opts,s=this.startPosition;if(s){var a=i.setPosition,l=s.x+t,c=s.y+e;this.position={x:l,y:c,end:n},(0,o.isFunction)(a)&&a(this.position),r&&(r.style.left="".concat(l,"px"),r.style.top="".concat(c,"px"))}},t.prototype.getContainerEl=function(){var t=this.opts.container;return t?[t]:this.getDocumentEl()},t.prototype.getWindowEl=function(){return this.getContainerEl().map((function(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow}))},t.prototype.getDocumentEl=function(t){var e=this.opts.doc;if(t=t||this.el,!this.docs.length){var n=[document];t&&n.push(t.ownerDocument),e&&n.push(e),this.docs=n}return this.docs},t.prototype.getPointerPos=function(t){var e=this.opts.getPointerPosition,n=(0,r.getPointerEvent)(t);return e?e(t):{x:n.clientX,y:n.clientY}},t.prototype.getStartPosition=function(){var t=this.el,e=this.opts.getPosition,n={x:0,y:0};return(0,o.isFunction)(e)?n=e():t&&(n={x:parseFloat(t.style.left),y:parseFloat(t.style.top)}),n},t.prototype.getScrollInfo=function(){var t=this.opts.doc,e=t&&t.body;return{y:e?e.scrollTop:0,x:e?e.scrollLeft:0}},t.prototype.detectAxisLock=function(t,e){var n=t,o=e,r=Math.abs(n),i=Math.abs(o);return o>=r||o<=-r?'x':n>i||n<-i?'y':void 0},t}()},895:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>vt});var o='undefined'!=typeof document?document:null,r='undefined'!=typeof window?window:null,i=Array.prototype,s=i.filter,a=i.indexOf,l=i.map,c=i.push,u=i.reverse,p=i.slice,d=i.splice,f=/^#[\w-]*$/,h=/^\.[\w-]*$/,g=/<.+>/,v=/^\w+$/;function y(t,e){return void 0===e&&(e=o),h.test(t)?e.getElementsByClassName(t.slice(1)):v.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function m(t,e){if(void 0===e&&(e=o),t){if(t.__cash)return t;var n=t;if(E(t)){if(e.__cash&&(e=e[0]),!(n=f.test(t)?e.getElementById(t.slice(1)):g.test(t)?ft(t):y(t,e)))return}else if(k(t))return this.ready(t);(n.nodeType||n===r)&&(n=[n]),this.length=n.length;for(var i=0,s=this.length;i=0})):n.value=r}))},_.clone=function(){return this.map((function(t,e){return e.cloneNode(!0)}))},_.detach=function(){return this.each((function(t,e){e.parentNode&&e.parentNode.removeChild(e)}))};var ut,pt=/^\s*<(\w+)[^>]*>/,dt=/^\s*<(\w+)\s*\/?>(?:<\/\1>)?\s*$/;function ft(t){if(function(){if(!ut){var t=o.createElement('table'),e=o.createElement('tr');ut={'*':o.createElement('div'),tr:o.createElement('tbody'),td:e,th:e,thead:t,tbody:t,tfoot:t}}}(),!E(t))return[];if(dt.test(t))return[o.createElement(RegExp.$1)];var e=pt.test(t)&&RegExp.$1,n=ut[e]||ut['*'];return n.innerHTML=t,b(n.childNodes).detach().get()}function ht(t,e,n){if(void 0!==e){var o=E(e);!o&&e.length?S(e,(function(e){return ht(t,e,n)})):S(t,o?function(t){t.insertAdjacentHTML(n?'afterbegin':'beforeend',e)}:function(t,o){return function(t,e,n){n?t.insertBefore(e,t.childNodes[0]):t.appendChild(e)}(t,o?e.cloneNode(!0):e,n)})}}b.parseHTML=ft,_.empty=function(){var t=this[0];if(t)for(;t.firstChild;)t.removeChild(t.firstChild);return this},_.append=function(){var t=this;return S(arguments,(function(e){ht(t,e)})),this},_.appendTo=function(t){return ht(b(t),this),this},_.html=function(t){if(void 0===t)return this[0]&&this[0].innerHTML;var e=t.nodeType?t[0].outerHTML:t;return this.each((function(t,n){n.innerHTML=e}))},_.insertAfter=function(t){var e=this;return b(t).each((function(t,n){var o=n.parentNode;e.each((function(e,r){o.insertBefore(t?r.cloneNode(!0):r,n.nextSibling)}))})),this},_.after=function(){var t=this;return S(u.apply(arguments),(function(e){u.apply(b(e).slice()).insertAfter(t)})),this},_.insertBefore=function(t){var e=this;return b(t).each((function(t,n){var o=n.parentNode;e.each((function(e,r){o.insertBefore(t?r.cloneNode(!0):r,n)}))})),this},_.before=function(){var t=this;return S(arguments,(function(e){b(e).insertBefore(t)})),this},_.prepend=function(){var t=this;return S(arguments,(function(e){ht(t,e,!0)})),this},_.prependTo=function(t){return ht(b(t),u.apply(this.slice()),!0),this},_.remove=function(){return this.detach().off()},_.replaceWith=function(t){var e=this;return this.each((function(n,o){var r=o.parentNode;if(r){var i=n?b(t).clone():b(t);if(!i[0])return e.remove(),!1;r.replaceChild(i[0],o),b(i[0]).after(i.slice(1))}}))},_.replaceAll=function(t){return b(t).replaceWith(this),this},_.text=function(t){return void 0===t?this[0]?this[0].textContent:'':this.each((function(e,n){n.textContent=t}))};var gt=o&&o.documentElement;_.offset=function(){var t=this[0];if(t){var e=t.getBoundingClientRect();return{top:e.top+r.pageYOffset-gt.clientTop,left:e.left+r.pageXOffset-gt.clientLeft}}},_.offsetParent=function(){return b(this[0]&&this[0].offsetParent)},_.position=function(){var t=this[0];if(t)return{left:t.offsetLeft,top:t.offsetTop}},_.children=function(t){var e=[];return this.each((function(t,n){c.apply(e,n.children)})),e=b(D(e)),t?e.filter((function(e,n){return T(n,t)})):e},_.contents=function(){var t=[];return this.each((function(e,n){c.apply(t,'IFRAME'===n.tagName?[n.contentDocument]:n.childNodes)})),b(t.length&&D(t))},_.find=function(t){for(var e=[],n=0,o=this.length;n{"use strict";n.d(e,{$Q:()=>g,FW:()=>d,G1:()=>a,GX:()=>w,L_:()=>c,Mx:()=>l,R3:()=>v,SJ:()=>_,cx:()=>u,dL:()=>h,pn:()=>f,rw:()=>m,sE:()=>p,t3:()=>b,ut:()=>y});var o=n(50),r=void 0&&(void 0).__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,r=0,i=e.length;r=i?t.appendChild(e):t.insertBefore(e,r[s])},v=function(t,e){return g(t,e)},y=function(t,e,n){void 0===e&&(e={});var r=document.createElement(t);return e&&(0,o.each)(e,(function(t,e){return r.setAttribute(e,t)})),n&&((0,o.isString)(n)?r.innerHTML=n:r.appendChild(n)),r},m=function(t){return document.createTextNode(t)},b=function(t,e){var n,o=t.type;try{n=new window[e](o,t)}catch(t){(n=document.createEvent(e)).initEvent(o,!0,!0)}return n._parentEvent=t,0===o.indexOf('key')&&(n.keyCodeVal=t.keyCode,['keyCode','which'].forEach((function(t){Object.defineProperty(n,t,{get:function(){return this.keyCodeVal}})}))),n},_=function(t,e){void 0===e&&(e=[]),(Array.isArray(e)?e:[e]).forEach((function(e){var n=e[i]||'div',r=e[s]||{},a=document.createElement(n);(0,o.each)(r,(function(t,e){a.setAttribute(e,t)})),t.appendChild(a)}))},w=function(t){var e=(null==t?void 0:t.ownerDocument)||document,n=e.documentElement,o=e.defaultView||window;return{x:(o.pageXOffset||n.scrollLeft||0)-(n.clientLeft||0),y:(o.pageYOffset||n.scrollTop||0)-(n.clientTop||0)}}},163:(t,e,n)=>{"use strict";n.r(e),n.d(e,{appendStyles:()=>f,buildBase64UrlFromSvg:()=>$,camelCase:()=>b,capitalize:()=>R,createId:()=>W,deepMerge:()=>P,escape:()=>k,escapeNodeContent:()=>E,find:()=>T,getElRect:()=>j,getElement:()=>x,getGlobal:()=>l,getKeyChar:()=>D,getKeyCode:()=>L,getModel:()=>A,getPointerEvent:()=>M,getUiClass:()=>d,getUnitFromValue:()=>y,getViewEl:()=>B,hasDnd:()=>w,hasWin:()=>a,isCommentNode:()=>S,isComponent:()=>H,isDef:()=>s,isEmptyObj:()=>V,isEnterKey:()=>I,isEscKey:()=>N,isObject:()=>F,isRule:()=>z,isTaggableNode:()=>O,isTextNode:()=>C,matches:()=>p,normalizeFloat:()=>_,off:()=>v,on:()=>g,setViewEl:()=>U,shallowDiff:()=>h,toLowerCase:()=>c,upFirst:()=>m});var o=n(50),r=void 0&&(void 0).__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0?s!==a&&(n[i]=a):n[i]=null}for(var i in e)e.hasOwnProperty(i)&&(0,o.isUndefined)(t[i])&&(n[i]=e[i]);return n},g=function(t,e,n,o){var r=e.split(/\s+/);t=t instanceof Array?t:[t];for(var i=function(e){t.forEach((function(t){return t&&t.addEventListener(r[e],n,o)}))},s=0;s/g,'>').replace(/"/g,'"').replace(/'/g,''').replace(/`/g,'`')},E=function(t){return void 0===t&&(t=''),"".concat(t).replace(/&/g,'&').replace(//g,'>')},P=function(){for(var t=[],e=0;e{var o={"./CanvasClear":858,"./CanvasClear.ts":858,"./CanvasMove":884,"./CanvasMove.ts":884,"./CommandAbstract":790,"./CommandAbstract.ts":790,"./ComponentDelete":180,"./ComponentDelete.ts":180,"./ComponentDrag":544,"./ComponentDrag.ts":544,"./ComponentEnter":236,"./ComponentEnter.ts":236,"./ComponentExit":368,"./ComponentExit.ts":368,"./ComponentNext":243,"./ComponentNext.ts":243,"./ComponentPrev":400,"./ComponentPrev.ts":400,"./ComponentStyleClear":910,"./ComponentStyleClear.ts":910,"./CopyComponent":744,"./CopyComponent.ts":744,"./DeleteComponent":517,"./DeleteComponent.ts":517,"./ExportTemplate":457,"./ExportTemplate.ts":457,"./Fullscreen":975,"./Fullscreen.ts":975,"./MoveComponent":191,"./MoveComponent.ts":191,"./OpenAssets":912,"./OpenAssets.ts":912,"./OpenBlocks":117,"./OpenBlocks.ts":117,"./OpenLayers":614,"./OpenLayers.ts":614,"./OpenStyleManager":801,"./OpenStyleManager.ts":801,"./OpenTraitManager":395,"./OpenTraitManager.ts":395,"./PasteComponent":98,"./PasteComponent.ts":98,"./Preview":129,"./Preview.ts":129,"./Resize":116,"./Resize.ts":116,"./SelectComponent":407,"./SelectComponent.ts":407,"./SelectPosition":189,"./SelectPosition.ts":189,"./ShowOffset":804,"./ShowOffset.ts":804,"./SwitchVisibility":434,"./SwitchVisibility.ts":434};function r(t){var e=i(t);return n(e)}function i(t){if(!n.o(o,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code='MODULE_NOT_FOUND',e}return o[t]}r.keys=function(){return Object.keys(o)},r.resolve=i,t.exports=r,r.id=828},50:(t,e,n)=>{"use strict";n.r(e),n.d(e,{VERSION:()=>r,after:()=>Ne,all:()=>en,allKeys:()=>vt,any:()=>nn,assign:()=>Nt,before:()=>Ie,bind:()=>Ce,bindAll:()=>Te,chain:()=>be,chunk:()=>Rn,clone:()=>Rt,collect:()=>Ye,compact:()=>En,compose:()=>De,constant:()=>Z,contains:()=>on,countBy:()=>mn,create:()=>Vt,debounce:()=>je,default:()=>Wn,defaults:()=>It,defer:()=>Pe,delay:()=>Ee,detect:()=>qe,difference:()=>An,drop:()=>Tn,each:()=>Ke,escape:()=>ae,every:()=>en,extend:()=>Dt,extendOwn:()=>Nt,filter:()=>Qe,find:()=>qe,findIndex:()=>He,findKey:()=>Ve,findLastIndex:()=>ze,findWhere:()=>Ge,first:()=>On,flatten:()=>Pn,foldl:()=>Je,foldr:()=>Ze,forEach:()=>Ke,functions:()=>Mt,get:()=>Wt,groupBy:()=>vn,has:()=>$t,head:()=>On,identity:()=>qt,include:()=>on,includes:()=>on,indexBy:()=>yn,indexOf:()=>We,initial:()=>Sn,inject:()=>Je,intersection:()=>Dn,invert:()=>jt,invoke:()=>rn,isArguments:()=>Y,isArray:()=>q,isArrayBuffer:()=>F,isBoolean:()=>E,isDataView:()=>$,isDate:()=>L,isElement:()=>P,isEmpty:()=>lt,isEqual:()=>gt,isError:()=>N,isFinite:()=>X,isFunction:()=>H,isMap:()=>Ot,isMatch:()=>ct,isNaN:()=>J,isNull:()=>T,isNumber:()=>M,isObject:()=>O,isRegExp:()=>D,isSet:()=>kt,isString:()=>j,isSymbol:()=>I,isTypedArray:()=>rt,isUndefined:()=>k,isWeakMap:()=>Tt,isWeakSet:()=>Et,iteratee:()=>Jt,keys:()=>at,last:()=>kn,lastIndexOf:()=>$e,map:()=>Ye,mapObject:()=>Qt,matcher:()=>Gt,matches:()=>Gt,max:()=>ln,memoize:()=>ke,methods:()=>Mt,min:()=>cn,mixin:()=>zn,negate:()=>Le,noop:()=>te,now:()=>re,object:()=>Fn,omit:()=>Cn,once:()=>Fe,pairs:()=>At,partial:()=>xe,partition:()=>bn,pick:()=>xn,pluck:()=>sn,property:()=>Kt,propertyOf:()=>ee,random:()=>oe,range:()=>Vn,reduce:()=>Je,reduceRight:()=>Ze,reject:()=>tn,rest:()=>Tn,restArguments:()=>S,result:()=>ve,sample:()=>dn,select:()=>Qe,shuffle:()=>fn,size:()=>_n,some:()=>nn,sortBy:()=>hn,sortedIndex:()=>Be,tail:()=>Tn,take:()=>On,tap:()=>Ht,template:()=>ge,templateSettings:()=>ce,throttle:()=>Ae,times:()=>ne,toArray:()=>pn,toPath:()=>zt,transpose:()=>Nn,unescape:()=>le,union:()=>Ln,uniq:()=>Mn,unique:()=>Mn,uniqueId:()=>me,unzip:()=>Nn,values:()=>Pt,where:()=>an,without:()=>jn,wrap:()=>Me,zip:()=>In});var o={};n.r(o),n.d(o,{VERSION:()=>r,after:()=>Ne,all:()=>en,allKeys:()=>vt,any:()=>nn,assign:()=>Nt,before:()=>Ie,bind:()=>Ce,bindAll:()=>Te,chain:()=>be,chunk:()=>Rn,clone:()=>Rt,collect:()=>Ye,compact:()=>En,compose:()=>De,constant:()=>Z,contains:()=>on,countBy:()=>mn,create:()=>Vt,debounce:()=>je,default:()=>Bn,defaults:()=>It,defer:()=>Pe,delay:()=>Ee,detect:()=>qe,difference:()=>An,drop:()=>Tn,each:()=>Ke,escape:()=>ae,every:()=>en,extend:()=>Dt,extendOwn:()=>Nt,filter:()=>Qe,find:()=>qe,findIndex:()=>He,findKey:()=>Ve,findLastIndex:()=>ze,findWhere:()=>Ge,first:()=>On,flatten:()=>Pn,foldl:()=>Je,foldr:()=>Ze,forEach:()=>Ke,functions:()=>Mt,get:()=>Wt,groupBy:()=>vn,has:()=>$t,head:()=>On,identity:()=>qt,include:()=>on,includes:()=>on,indexBy:()=>yn,indexOf:()=>We,initial:()=>Sn,inject:()=>Je,intersection:()=>Dn,invert:()=>jt,invoke:()=>rn,isArguments:()=>Y,isArray:()=>q,isArrayBuffer:()=>F,isBoolean:()=>E,isDataView:()=>$,isDate:()=>L,isElement:()=>P,isEmpty:()=>lt,isEqual:()=>gt,isError:()=>N,isFinite:()=>X,isFunction:()=>H,isMap:()=>Ot,isMatch:()=>ct,isNaN:()=>J,isNull:()=>T,isNumber:()=>M,isObject:()=>O,isRegExp:()=>D,isSet:()=>kt,isString:()=>j,isSymbol:()=>I,isTypedArray:()=>rt,isUndefined:()=>k,isWeakMap:()=>Tt,isWeakSet:()=>Et,iteratee:()=>Jt,keys:()=>at,last:()=>kn,lastIndexOf:()=>$e,map:()=>Ye,mapObject:()=>Qt,matcher:()=>Gt,matches:()=>Gt,max:()=>ln,memoize:()=>ke,methods:()=>Mt,min:()=>cn,mixin:()=>zn,negate:()=>Le,noop:()=>te,now:()=>re,object:()=>Fn,omit:()=>Cn,once:()=>Fe,pairs:()=>At,partial:()=>xe,partition:()=>bn,pick:()=>xn,pluck:()=>sn,property:()=>Kt,propertyOf:()=>ee,random:()=>oe,range:()=>Vn,reduce:()=>Je,reduceRight:()=>Ze,reject:()=>tn,rest:()=>Tn,restArguments:()=>S,result:()=>ve,sample:()=>dn,select:()=>Qe,shuffle:()=>fn,size:()=>_n,some:()=>nn,sortBy:()=>hn,sortedIndex:()=>Be,tail:()=>Tn,take:()=>On,tap:()=>Ht,template:()=>ge,templateSettings:()=>ce,throttle:()=>Ae,times:()=>ne,toArray:()=>pn,toPath:()=>zt,transpose:()=>Nn,unescape:()=>le,union:()=>Ln,uniq:()=>Mn,unique:()=>Mn,uniqueId:()=>me,unzip:()=>Nn,values:()=>Pt,where:()=>an,without:()=>jn,wrap:()=>Me,zip:()=>In});var r='1.13.4',i='object'==typeof self&&self.self===self&&self||'object'==typeof global&&global.global===global&&global||Function('return this')()||{},s=Array.prototype,a=Object.prototype,l='undefined'!=typeof Symbol?Symbol.prototype:null,c=s.push,u=s.slice,p=a.toString,d=a.hasOwnProperty,f='undefined'!=typeof ArrayBuffer,h='undefined'!=typeof DataView,g=Array.isArray,v=Object.keys,y=Object.create,m=f&&ArrayBuffer.isView,b=isNaN,_=isFinite,w=!{toString:null}.propertyIsEnumerable('toString'),x=['valueOf','isPrototypeOf','toString','propertyIsEnumerable','hasOwnProperty','toLocaleString'],C=Math.pow(2,53)-1;function S(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),o=Array(n),r=0;r=0&&n<=C}}function tt(t){return function(e){return null==e?void 0:e[t]}}const et=tt('byteLength'),nt=Q(et);var ot=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;const rt=f?function(t){return m?m(t)&&!$(t):nt(t)&&ot.test(p.call(t))}:Z(!1),it=tt('length');function st(t,e){e=function(t){for(var e={},n=t.length,o=0;o':'>','"':'"',"'":''','`':'`'},ae=ie(se),le=ie(jt(se)),ce=ut.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var ue=/(.)^/,pe={"'":"'",'\\':'\\','\r':'r','\n':'n','\u2028':'u2028','\u2029':'u2029'},de=/\\|'|\r|\n|\u2028|\u2029/g;function fe(t){return'\\'+pe[t]}var he=/^\s*(\w|\$)+\s*$/;function ge(t,e,n){!e&&n&&(e=n),e=It({},e,ut.templateSettings);var o=RegExp([(e.escape||ue).source,(e.interpolate||ue).source,(e.evaluate||ue).source].join('|')+'|$','g'),r=0,i="__p+='";t.replace(o,(function(e,n,o,s,a){return i+=t.slice(r,a).replace(de,fe),r=a+e.length,n?i+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":o?i+="'+\n((__t=("+o+"))==null?'':__t)+\n'":s&&(i+="';\n"+s+"\n__p+='"),e})),i+="';\n";var s,a=e.variable;if(a){if(!he.test(a))throw new Error('variable is not a bare identifier: '+a)}else i='with(obj||{}){\n'+i+'}\n',a='obj';i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+'return __p;\n';try{s=new Function(a,'_',i)}catch(t){throw t.source=i,t}var l=function(t){return s.call(this,t,ut)};return l.source='function('+a+'){\n'+i+'}',l}function ve(t,e,n){var o=(e=Bt(e)).length;if(!o)return H(n)?n.call(t):n;for(var r=0;r1)Oe(a,e-1,n,o),r=o.length;else for(var l=0,c=a.length;le?(o&&(clearTimeout(o),o=null),a=c,s=t.apply(r,i),o||(r=i=null)):o||!1===n.trailing||(o=setTimeout(l,u)),s};return c.cancel=function(){clearTimeout(o),a=0,o=r=i=null},c}function je(t,e,n){var o,r,i,s,a,l=function(){var c=re()-r;e>c?o=setTimeout(l,e-c):(o=null,n||(s=t.apply(a,i)),o||(i=a=null))},c=S((function(c){return a=this,i=c,r=re(),o||(o=setTimeout(l,e),n&&(s=t.apply(a,i))),s}));return c.cancel=function(){clearTimeout(o),o=i=a=null},c}function Me(t,e){return xe(e,t)}function Le(t){return function(){return!t.apply(this,arguments)}}function De(){var t=arguments,e=t.length-1;return function(){for(var n=e,o=t[e].apply(this,arguments);n--;)o=t[n].call(this,o);return o}}function Ne(t,e){return function(){if(--t<1)return e.apply(this,arguments)}}function Ie(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}}const Fe=xe(Ie,2);function Ve(t,e,n){e=Zt(e,n);for(var o,r=at(t),i=0,s=r.length;i0?0:r-1;i>=0&&i0?s=i>=0?i:Math.max(i+a,s):a=i>=0?Math.min(i+1,a):i+a+1;else if(n&&i&&a)return o[i=n(o,r)]===r?i:-1;if(r!=r)return(i=e(u.call(o,s,a),J))>=0?i+s:-1;for(i=t>0?s:a-1;i>=0&&i0?0:s-1;for(r||(o=e[i?i[a]:a],a+=t);a>=0&&a=3;return e(t,Yt(n,r,4),o,i)}}const Je=Xe(1),Ze=Xe(-1);function Qe(t,e,n){var o=[];return e=Zt(e,n),Ke(t,(function(t,n,r){e(t,n,r)&&o.push(t)})),o}function tn(t,e,n){return Qe(t,Le(Zt(e)),n)}function en(t,e,n){e=Zt(e,n);for(var o=!Se(t)&&at(t),r=(o||t).length,i=0;i=0}const rn=S((function(t,e,n){var o,r;return H(e)?r=e:(e=Bt(e),o=e.slice(0,-1),e=e[e.length-1]),Ye(t,(function(t){var i=r;if(!i){if(o&&o.length&&(t=Ut(t,o)),null==t)return;i=t[e]}return null==i?i:i.apply(t,n)}))}));function sn(t,e){return Ye(t,Kt(e))}function an(t,e){return Qe(t,Gt(e))}function ln(t,e,n){var o,r,i=-1/0,s=-1/0;if(null==e||'number'==typeof e&&'object'!=typeof t[0]&&null!=t)for(var a=0,l=(t=Se(t)?t:Pt(t)).length;ai&&(i=o);else e=Zt(e,n),Ke(t,(function(t,n,o){((r=e(t,n,o))>s||r===-1/0&&i===-1/0)&&(i=t,s=r)}));return i}function cn(t,e,n){var o,r,i=1/0,s=1/0;if(null==e||'number'==typeof e&&'object'!=typeof t[0]&&null!=t)for(var a=0,l=(t=Se(t)?t:Pt(t)).length;ao||void 0===n)return 1;if(n1&&(o=Yt(o,e[1])),e=vt(t)):(o=wn,e=Oe(e,!1,!1),t=Object(t));for(var r=0,i=e.length;r1&&(n=e[1])):(e=Ye(Oe(e,!1,!1),String),o=function(t,n){return!on(e,n)}),xn(t,o,n)}));function Sn(t,e,n){return u.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))}function On(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[0]:Sn(t,t.length-e)}function Tn(t,e,n){return u.call(t,null==e||n?1:e)}function kn(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[t.length-1]:Tn(t,Math.max(0,t.length-e))}function En(t){return Qe(t,Boolean)}function Pn(t,e){return Oe(t,e,!1)}const An=S((function(t,e){return e=Oe(e,!0,!0),Qe(t,(function(t){return!on(e,t)}))})),jn=S((function(t,e){return An(t,e)}));function Mn(t,e,n,o){E(e)||(o=n,n=e,e=!1),null!=n&&(n=Zt(n,o));for(var r=[],i=[],s=0,a=it(t);s{var e=t&&t.__esModule?()=>t['default']:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.g=function(){if('object'==typeof globalThis)return globalThis;try{return this||new Function('return this')()}catch(t){if('object'==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(t,'__esModule',{value:!0})};var o={};return(()=>{"use strict";n.r(o),n.d(o,{default:()=>Nh,grapesjs:()=>Dh,usePlugin:()=>Lh});var t=n(50),e=n(163);function r(t){for(var n=[],o=1;o',move:'',plus:'',caret:'',delete:'',copy:'',arrowUp:'',chevron:'',eye:'',eyeOff:''},i18n:{},undoManager:{},assetManager:{},canvas:{},layerManager:{},storageManager:{},richTextEditor:{},domComponents:{},modal:{},codeManager:{},panels:{},commands:{},cssComposer:{},selectorManager:{},deviceManager:{},styleManager:{},blockManager:{},traitManager:{},textViewCode:'Code',keepUnusedStyles:!1,multiFrames:!1,customUI:!1};var s=n(316),a=n.n(s),l=n(895);var c,u=n(346),p=void 0&&(void 0).__extends||(c=function(t,e){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},c(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e}(u.Hn);const f=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return p(n,e),n.prototype.getByComponent=function(t){var e=this;return this.filter((function(n){return e.getComponent(n)===t}))[0]},n.prototype.addComponent=function(e,n){var o=this,r=((0,t.isArray)(e)?e:[e]).filter((function(t){return!o.hasComponent(t)})).map((function(t){return new d({component:t})}))[0];return this.push(r,n)},n.prototype.getComponent=function(t){return t.get('component')},n.prototype.hasComponent=function(t){var e=this.getByComponent(t);return e&&this.contains(e)},n.prototype.lastComponent=function(){var t=this.last();return t?this.getComponent(t):void 0},n.prototype.allComponents=function(){var t=this;return this.map((function(e){return t.getComponent(e)})).filter((function(t){return t}))},n.prototype.removeComponent=function(e,n){var o=this,r=((0,t.isArray)(e)?e:[e]).map((function(t){return o.getByComponent(t)}));return this.remove(r,n)},n}(u.FE);var h=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),g=void 0&&(void 0).__assign||function(){return g=Object.assign||function(t){for(var e,n=1,o=arguments.length;n',frameStyle:"\n body { background-color: #fff }\n * ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.1) }\n * ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2) }\n * ::-webkit-scrollbar { width: 10px }\n ",notTextable:['button','a','input[type=checkbox]','input[type=radio]'],allowExternalDrop:!0};var w=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const x=function(t){function e(e,n,o){var r=t.call(this,n,o)||this;return r._module=e,r}return w(e,t),Object.defineProperty(e.prototype,"module",{get:function(){return this._module},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"config",{get:function(){return this._module.config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"em",{get:function(){return this._module.em},enumerable:!1,configurable:!0}),e}(u.Hn);var C=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const S=function(e){function n(t,n,o){return e.call(this,n,{module:t,modelConstructor:o})||this}return C(n,e),n.prototype.add=function(n,o){var r,i=this,s=(0,t.isArray)(n)?n:(0,t.isUndefined)(n)?void 0:[n];return s=null!==(r=null==s?void 0:s.map((function(t){return t instanceof i.newModel?t:new i.newModel(i.module,t)})))&&void 0!==r?r:[void 0],e.prototype.add.call(this,(0,t.isArray)(n)?s:s[0],o)},n.prototype.preinitialize=function(t,e){this.newModel=e.modelConstructor,this.module=e.module},n}(u.FE);var O=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),T=void 0&&(void 0).__assign||function(){return T=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0&&this.head.splice(r,1)},o.prototype.addLink=function(t){var e='link';!this.getHeadByAttr('href',t,e)&&this.addHeadItem({tag:e,attributes:{href:t,rel:'stylesheet'}})},o.prototype.removeLink=function(t){this.removeHeadByAttr('href',t,'link')},o.prototype.addScript=function(t){var e='script';!this.getHeadByAttr('src',t,e)&&this.addHeadItem({tag:e,attributes:{src:t}})},o.prototype.removeScript=function(t){this.removeHeadByAttr('src',t,'script')},o.prototype.getPage=function(){var t;return null===(t=this.collection)||void 0===t?void 0:t.page},o.prototype._emitUpdated=function(t){void 0===t&&(t={}),this.em.trigger('frame:updated',T({frame:this},t))},o.prototype.toJSON=function(e){void 0===e&&(e={});var n=x.prototype.toJSON.call(this,e),o=(0,t.result)(this,'defaults');return e.fromUndo&&delete n.component,delete n.styles,delete n.changesCount,n[E]&&delete n.width,n[P]&&delete n.height,(0,t.forEach)(n,(function(t,e){0===e.indexOf('_')&&delete n[e]})),(0,t.forEach)(o,(function(t,e){n[e]===t&&delete n[e]})),(0,t.forEach)(['attributes','head'],(function(e){(0,t.isEmpty)(n[e])&&delete n[e]})),n},o}(x);const M=j;var L=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const D=function(e){function n(n,o){void 0===o&&(o=[]);var r=e.call(this,n,o,M)||this;return r.loadedItems=0,r.itemsToLoad=0,(0,t.bindAll)(r,'itemLoaded'),r.on('reset',r.onReset),r.on('remove',r.onRemove),r}return L(n,e),n.prototype.onReset=function(t,e){var n=this;((null==e?void 0:e.previousModels)||[]).map((function(t){return n.onRemove(t)}))},n.prototype.onRemove=function(t){null==t||t.onRemove()},n.prototype.itemLoaded=function(){this.loadedItems++,this.loadedItems>=this.itemsToLoad&&(this.trigger('loaded:all'),this.listenToLoadItems(!1))},n.prototype.listenToLoad=function(){this.loadedItems=0,this.itemsToLoad=this.length,this.listenToLoadItems(!0)},n.prototype.listenToLoadItems=function(t){var e=this;this.forEach((function(n){return n[t?'on':'off']('loaded',e.itemLoaded)}))},n}(S);var N=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const I=function(e){function n(t,n){void 0===n&&(n={});var o=e.call(this,t,n)||this,r=n.em,i={};o.em=r,t.frames||(i.component=t.component,i.styles=t.styles,['component','styles'].map((function(t){return o.unset(t)})));var s=t.frames||[i],a=new D(r.Canvas,s);a.page=o,o.set('frames',a),!o.getId()&&o.set('id',null==r?void 0:r.get('PageManager')._createId());var l=null==r?void 0:r.get('UndoManager');return null==l||l.add(a),o}return N(n,e),n.prototype.defaults=function(){return{name:'',frames:[],_undo:!0}},n.prototype.onRemove=function(){this.getFrames().reset()},n.prototype.getFrames=function(){return this.get('frames')},n.prototype.getId=function(){return this.id},n.prototype.getName=function(){return this.get('name')},n.prototype.setName=function(t){return this.set({name:t})},n.prototype.getAllFrames=function(){return this.getFrames().models||[]},n.prototype.getMainFrame=function(){return this.getFrames().at(0)},n.prototype.getMainComponent=function(){var t=this.getMainFrame();return null==t?void 0:t.getComponent()},n.prototype.toJSON=function(e){void 0===e&&(e={});var n=u.Hn.prototype.toJSON.call(this,e),o=(0,t.result)(this,'defaults');return(0,t.forEach)(n,(function(t,e){0===e.indexOf('_')&&delete n[e]})),(0,t.forEach)(o,(function(t,e){n[e]===t&&delete n[e]})),n},n}(u.Hn);var F=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),V=void 0&&(void 0).__assign||function(){return V=Object.assign||function(t){for(var e,n=1,o=arguments.length;n","
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n \n "],["\n
    ","
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n \n "])),e,n,e,e,e,e,e,e,e)},e.prototype.events=function(){return{change:'updateDevice','click [data-add-trasp]':'startAdd'}},e.prototype.startAdd=function(){},e.prototype.updateDevice=function(){var t=this.em;if(t){var e=this.devicesEl;t.set('device',e?e.val():'')}},e.prototype.updateSelect=function(){var t=this.em,e=this.devicesEl;if(t&&t.getDeviceModel&&e){var n=t.getDeviceModel();e.val(n?n.get('id'):'')}},e.prototype.getOptions=function(){var t=this.collection,e=this.em,n='';return t.forEach((function(t){var o=t.attributes,r=o.name,i=o.id,s=e&&e.t&&e.t("deviceManager.devices.".concat(i))||r;n+="")})),n},e.prototype.render=function(){var t=this,e=t.em,n=t.ppfx,o=t.$el,r=t.el,i=e&&e.t&&e.t('deviceManager.device');return o.html(this.template({ppfx:n,label:i})),this.devicesEl=o.find(".".concat(n,"devices")),this.devicesEl.append(this.getOptions()),this.devicesEl.val(e.get('device')),r.className="".concat(n,"devices-c"),this},e}(u.G7);var pt,dt=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ft=void 0&&(void 0).__assign||function(){return ft=Object.assign||function(t){for(var e,n=1,o=arguments.length;n';if(n.stopDefault(),n.inAbsoluteMode()){var u=n.Components.getWrapper(),p=u.append({})[0],d=n.Commands.run('core:component-drag',{event:t,guidesInfo:1,center:1,target:p,onEnd:function(t,n,i){var s;if(!i.cancelled){s=u.append(c)[0];var a=o.getOffset(),l=p.getStyle(),d=l.top,f=l.left,h=l.position,g=(0,At.GX)(t.target),v=parseInt("".concat(parseFloat(f)+g.x-a.left),10),y=parseInt("".concat(parseFloat(d)+g.y-a.top),10);s.addStyle({left:v+'px',top:y+'px',position:h})}e.handleDragEnd(s,r),p.remove()}});s=function(e){return d.stop(t,{cancel:e})},a=function(t){return c=t}}else{var f=new l.Sorter(zt({em:n,wmargin:1,nested:1,canvasRelative:1,direction:'a',container:this.el,placer:o.getPlacerEl(),containerSel:'*',itemSel:'*',pfx:'gjs-',onEndMove:function(t){return e.handleDragEnd(t,r)},document:this.el.ownerDocument},this.sortOpts||{}));f.setDropContent(c),f.startSort(),this.sorter=f,s=function(t){t&&(f.moved=!1),f.endMove()},a=function(t){return f.setDropContent(t)}}this.dragStop=s,this.dragContent=a,n.trigger('canvas:dragenter',r,c)}},n.prototype.handleDragEnd=function(t,e){var n=this.em;this.over=!1,t&&(n.set('dragResult',t),n.trigger('canvas:drop',e,t)),n.runDefault({preserveSelected:1})},n.prototype.handleDragOver=function(t){t.preventDefault(),this.em.trigger('canvas:dragover',t)},n.prototype.handleDrop=function(t){t.preventDefault();var e=this.dragContent,n=t.dataTransfer,o=this.getContentByData(n).content;t.target.style.border='',o&&e&&e(o),this.endDrop(!o,t)},n.prototype.getContentByData=function(e){var n=this.em,o=e&&e.types,r=e&&e.files||[],i=n.get('dragContent'),s=e&&e.getData('text');if(r.length){s=[];for(var a=0;a=0)s=e&&e.getData('text/html').replace(/<\/?meta[^>]*>/g,'');else if((0,t.indexOf)(o,'text/uri-list')>=0)s={type:'link',attributes:{href:s},content:s};else if((0,t.indexOf)(o,'text/json')>=0){var u=e&&e.getData('text/json');u&&(s=JSON.parse(u))}else 1===o.length&&'text/plain'===o[0]&&(s="
    ".concat(s,"
    "));var p={content:s};return n.trigger('canvas:dragdata',e,p),p},n}();const Ut=Bt;var Wt=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),$t=void 0&&(void 0).__assign||function(){return $t=Object.assign||function(t){for(var e,n=1,o=arguments.length;na&&(l+=i-a),!(0,t.isUndefined)(e)&&l!==r&&l>0&&l0){var l=n.shift(),u=(0,At.ut)('script',$t({type:'text/javascript'},(0,t.isString)(l)?{src:l}:l));u.onerror=u.onload=c.bind(null,n),null===(r=o.contentDocument)||void 0===r||r.head.appendChild(u)}else e.renderBody(),i&&i.trigger(s,a)};o.onload=function(){var t=e.config.frameContent;if(t){var n=e.getDoc();n.open(),n.write(t),n.close()}i&&i.trigger("".concat(s,":before"),a),c(qt([],l.get('scripts'),!0))}},o.prototype.renderStyles=function(e){void 0===e&&(e={});var n=this.getHead(),o=this.getCanvasModel(),r=function(e){return e.map((function(e){return{tag:'link',attributes:$t({rel:'stylesheet'},(0,t.isString)(e)?{href:e}:e)}}))},i=r(e.prev||o.previous('styles')),s=r(o.get('styles')),a=[],l=[],c=function(t,e,n){t.forEach((function(t){var o=t.attributes.href;!e.some((function(t){return t.attributes.href===o}))&&n.push(t)}))};c(s,i,l),c(i,s,a),a.forEach((function(t){var e,o=n.querySelector("link[href=\"".concat(t.attributes.href,"\"]"));null===(e=null==o?void 0:o.parentNode)||void 0===e||e.removeChild(o)})),(0,At.SJ)(n,l)},o.prototype.renderBody=function(){var t,n,o=this,r=this,i=r.config,s=r.em,a=r.model,l=r.ppfx,c=this.getDoc(),u=this.getBody(),p=this.getWindow(),d=s.config;p._isEditor=!0,this.renderStyles({prev:[]});(0,At.R3)(u,""));var f=a.getComponent(),h=s.Components.getType('wrapper').view;this.wrapper=new h({model:f,config:$t($t({},f.config),{em:s,frameView:this})}).render(),(0,At.R3)(u,null===(t=this.wrapper)||void 0===t?void 0:t.el),(0,At.R3)(u,new Ht({collection:a.getStyles(),config:$t($t({},s.Css.getConfig()),{frameView:this})}).render().el),(0,At.R3)(u,this.getJsContainer()),(0,e.on)(u,'click',(function(t){var e;return t&&'A'==(null===(e=t.target)||void 0===e?void 0:e.tagName)&&t.preventDefault()})),(0,e.on)(u,'submit',(function(t){return t&&t.preventDefault()})),[{event:'keydown keyup keypress',class:'KeyboardEvent'},{event:'mousedown mousemove mouseup',class:'MouseEvent'},{event:'pointerdown pointermove pointerup',class:'PointerEvent'},{event:'wheel',class:'WheelEvent'}].forEach((function(t){return t.event.split(' ').forEach((function(e){c.addEventListener(e,(function(e){return o.el.dispatchEvent((0,At.t3)(e,t.class))}))}))})),this._toggleEffects(!0),(0,e.hasDnd)(s)&&(this.droppable=new Ut(s,null===(n=this.wrapper)||void 0===n?void 0:n.el)),this.loaded=!0,a.trigger('loaded')},o.prototype._toggleEffects=function(t){var n=t?e.on:e.off,o=this.getWindow();o&&n(o,"".concat(At.G1," resize"),this._emitUpdate)},o.prototype._emitUpdate=function(){this.model._emitUpdated()},o}(Pt);const Kt=Gt;var Yt=n(668),Xt=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Jt=void 0&&(void 0).__assign||function(){return Jt=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
    \n ").concat(i.get('name')||'',"\n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n ")).append(e.el);var l=(0,At.ut)('div',{class:"".concat(o,"tools"),style:'pointer-events:none; display: none'},"\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n "));this.elTools=l;var c=null==r?void 0:r.toolsWrapper;return c&&c.appendChild(l),a&&a({el:s,elTop:s.querySelector('[data-frame-top]'),elRight:s.querySelector('[data-frame-right]'),elBottom:s.querySelector('[data-frame-bottom]'),elLeft:s.querySelector('[data-frame-left]'),frame:i,frameWrapperView:this,remove:this.remove,startDrag:this.startDrag}),this},n}(Pt);var Qt=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),te=function(t){function e(e,n){void 0===e&&(e={});var o=t.call(this,e,!0)||this;return o.listenTo(o.collection,'reset',o.render),o.canvasView=n.canvasView,o._module=n.module,o}return Qt(e,t),e.prototype.onRemoveBefore=function(t,e){void 0===e&&(e={}),t.forEach((function(t){return t.remove(e)}))},e.prototype.onRender=function(){var t=this.$el,e=this.ppfx;t.attr({class:"".concat(e,"frames")})},e.prototype.clearItems=function(){(this.viewCollection||[]).forEach((function(t){return t.remove()})),this.viewCollection=[]},e.prototype.renderView=function(t,e){return new Zt(t,this.canvasView)},e}(Mt);const ee=te;var ne=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),oe=void 0&&(void 0).__assign||function(){return oe=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
    \n ")},o.prototype._onFramesUpdate=function(){this._initFrames(),this._renderFrames()},o.prototype._initFrames=function(){var t=this,e=t.frames,n=t.model,o=t.config,r=t.em,i=n.frames;r.set('readyCanvas',0),i.once('loaded:all',(function(){return r.set('readyCanvas',1)})),null==e||e.remove(),this.frames=new ee({collection:i},oe(oe({},o),{canvasView:this}))},o.prototype.checkSelected=function(t,e){var n;void 0===e&&(e={});var o=e.scroll,r=this.em.get('currentFrame');o&&(null===(n=t.views)||void 0===n||n.forEach((function(t){t._getFrame()===r&&t.scrollIntoView(o)})))},o.prototype.remove=function(){for(var t,e=[],n=0;n=S?S/2-x/2:-_)+_)*E,y:(-g.y+O/2-C/2+w)*E};if(y){var j=s.getZoomMultiplier(),M=(O*j-O)/2;A.y=(-g.y+w)*E-M/j}s.setCoords(A.x,A.y)},o.prototype.isElInViewport=function(t){var n=(0,e.getElement)(t),o=(0,e.getElRect)(n),r=this.getFrameOffset(n),i=o.top,s=o.left;return i>=0&&s>=0&&i<=r.height&&s<=r.width},o.prototype.offset=function(t,n){void 0===n&&(n={});var o=n.noScroll,r=(0,e.getElRect)(t),i=o?{x:0,y:0}:(0,At.GX)(t);return{top:r.top+i.y,left:r.left+i.x,width:r.width,height:r.height}},o.prototype.getElBoxRect=function(t){var n=(0,e.getElRect)(t),o=n.width,r=n.height;return{x:n.left,y:n.top,width:o,height:r}},o.prototype.getViewportRect=function(t){void 0===t&&(t={});var e=this.getCanvasOffset(),n=e.top,o=e.left,r=e.width,i=e.height,s=this.module;if(t.toWorld){var a=s.getZoomMultiplier(),l=s.getCoords(),c=this.getViewportDelta();return{x:(-l.x-c.x||0)*a,y:(-l.y-c.y||0)*a,width:r*a,height:i*a}}return{x:o,y:n,width:r,height:i}},o.prototype.getViewportDelta=function(){var t=this.module.getZoomMultiplier(),e=this.getCanvasOffset(),n=e.width,o=e.height;return{x:(n*t-n)/2/t,y:(o*t-o)/2/t}},o.prototype.clearOff=function(){this.frmOff=void 0,this.cvsOff=void 0},o.prototype.getFrameOffset=function(t){var e;if(!this.frmOff||t){var n=null===(e=this.frame)||void 0===e?void 0:e.el,o=null==t?void 0:t.ownerDocument.defaultView,r=o?o.frameElement:n;this.frmOff=this.offset(r||n)}return this.frmOff},o.prototype.getCanvasOffset=function(){return this.cvsOff||(this.cvsOff=this.offset(this.el)),this.cvsOff},o.prototype.getElementPos=function(t,e){void 0===e&&(e={});var n=this.module.getZoomDecimal(),o=this.getFrameOffset(t),r=this.el,i=this.getCanvasOffset(),s=this.offset(t,e),a=e.avoidFrameOffset?0:o.top,l=e.avoidFrameOffset?0:o.left,c=e.avoidFrameZoom?s.top:s.top*n,u=e.avoidFrameZoom?s.left:s.left*n;return{top:e.avoidFrameOffset?c:c+a-i.top+r.scrollTop,left:e.avoidFrameOffset?u:u+l-i.left+r.scrollLeft,height:e.avoidFrameZoom?s.height:s.height*n,width:e.avoidFrameZoom?s.width:s.width*n,zoom:n,rect:s}},o.prototype.getElementOffsets=function(t){if(!t||(0,e.isTextNode)(t))return{};var n={},o=window.getComputedStyle(t),r=this.module.getZoomDecimal();return['marginTop','marginRight','marginBottom','marginLeft','paddingTop','paddingRight','paddingBottom','paddingLeft'].forEach((function(t){n[t]=parseFloat(o[t])*r})),n},o.prototype.getPosition=function(t){var e;void 0===t&&(t={});var n=null===(e=this.frame)||void 0===e?void 0:e.el.contentDocument;if(!n)return{top:0,left:0,width:0,height:0};var o=n.body,r=this.module.getZoomDecimal(),i=this.getFrameOffset(),s=this.getCanvasOffset(),a=t.noScroll;return{top:i.top+(a?0:o.scrollTop)*r-s.top,left:i.left+(a?0:o.scrollLeft)*r-s.left,width:s.width,height:s.height}},o.prototype.updateScript=function(t){var e=t.model,n=e.getId();t.scriptContainer||(t.scriptContainer=(0,At.ut)('div',{'data-id':n}),this.getJsContainer().appendChild(t.scriptContainer)),t.el.id=n,t.scriptContainer.innerHTML='';var o=document.createElement('script'),r=e.getScriptString(),i=e.get('script-props')?r:"function(){\n".concat(r,"\n;}"),s=JSON.stringify(e.__getScriptProps());o.innerHTML="\n setTimeout(function() {\n var item = document.getElementById('".concat(n,"');\n if (!item) return;\n (").concat(i,".bind(item))(").concat(s,")\n }, 1);"),setTimeout((function(){var e=t.scriptContainer;null==e||e.appendChild(o)}),0)},o.prototype.getJsContainer=function(t){var e=this.getFrameView(t);return e&&e.getJsContainer()},o.prototype.getFrameView=function(t){return(null==t?void 0:t._getFrame())||this.em.get('currentFrame')},o.prototype._renderFrames=function(){if(this.ready){var t=this,e=t.model,n=t.frames,o=t.em,r=t.framesArea,i=e.frames;i.listenToLoad(),n.render();var s=i.at(0),a=null==s?void 0:s.view;o.setCurrentFrame(a),null==r||r.appendChild(n.el),this.frame=a,this.updateFramesArea()}},o.prototype.renderFrames=function(){this._renderFrames()},o.prototype.render=function(){var t=this,n=t.el,o=t.$el,r=t.ppfx,i=t.config,s=t.em;o.html(this.template());var a=o.find('[data-frames]');this.framesArea=a.get(0);var l=o.find('[data-tools]');return this.toolsWrapper=l.get(0),l.append("\n
    \n
    \n
    \n
    \n
    \n
    \n ").concat(i.extHl?"
    "):'',"\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n ")),this.toolsEl=n.querySelector("#".concat(r,"tools")),this.hlEl=n.querySelector(".".concat(r,"highlighter")),this.badgeEl=n.querySelector(".".concat(r,"badge")),this.placerEl=n.querySelector(".".concat(r,"placeholder")),this.ghostEl=n.querySelector(".".concat(r,"ghost")),this.toolbarEl=n.querySelector(".".concat(r,"toolbar")),this.resizerEl=n.querySelector(".".concat(r,"resizer")),this.offsetEl=n.querySelector(".".concat(r,"offset-v")),this.fixedOffsetEl=n.querySelector(".".concat(r,"offset-fixed-v")),this.toolsGlobEl=n.querySelector(".".concat(r,"tools-gl")),this.el.className=(0,e.getUiClass)(s,this.className),this.ready=!0,this._renderFrames(),this},o}(Pt);const ie=re;var se=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ae=void 0&&(void 0).__assign||function(){return ae=Object.assign||function(t){for(var e,n=1,o=arguments.length;ni.top+i.height?i.top+i.height:f,left:d,elementTop:i.top,elementLeft:i.left,elementWidth:i.width,elementHeight:i.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:r.top,canvasLeft:r.left,canvasWidth:r.width,canvasHeight:r.height};return c&&this.em&&this.em.trigger(c,h),h}},o.prototype.canvasRectOffset=function(t,e,n){var o=this;void 0===n&&(n={});var r=function(t,e,r){void 0===e&&(e=1);var i=o.em.getZoomDecimal(),s=e?'top':'left',a=t.ownerDocument,l=n.offset?function(t){var e=t.defaultView;return null==e?void 0:e.frameElement}(a):{},c=l.offsetTop,u=void 0===c?0:c,p=l.offsetLeft,d=void 0===p?0:p,f=a.body||{},h=f.scrollTop,g=void 0===h?0:h,v=f.scrollLeft,y=e?g:void 0===v?0:v,m=e?u:d;return r[s]-(y-m)*i};return{top:r(t,1,e),left:r(t,0,e)}},o.prototype.getTargetToElementFixed=function(e,n,o){void 0===o&&(o={});var r=o.pos||this.getElementPos(e,{noScroll:!0}),i=o.canvasOff||this.canvasRectOffset(e,r),s=n.offsetHeight||0,a=n.offsetWidth||0,l=r.left+r.width,c=this.getCanvasView(),u=c.getPosition(),p=c.getFrameOffset(e),d=o.event,f=-s,h=(0,t.isUndefined)(o.left)?r.width-a:o.left;if(h=r.left<-h?-r.left:h,h=l>u.width?h-(l-u.width):h,i.top=0;){var o=e.indexOf('/*'),r=e.indexOf('*/')+2;e=e.replace(e.slice(o,r),'')}for(var i=e.split(';'),s=0,a=i.length;s'!=="".concat(a.outerHTML).slice(-2)||(f.void=!0);var T=f.components;if(!f.type&&T){for(var k=1,E=0,P=0;P".concat(e,""),l=r.parseFromString(a,i);if(s){var c=l.head,u=l.body,p=c.querySelectorAll('script');(0,t.each)(p,(function(t){return u.appendChild(t)}));var d=[];(0,t.each)(c.children,(function(t){return d.push(t)})),(0,t.each)(d,(function(t,e){return u.insertBefore(t,u.children[e])})),o=u}else o=l.firstChild;return o}(o,u),d=p.querySelectorAll('script'),f=d.length;if(!((0,t.isUndefined)(a.allowScripts)?u.allowScripts:a.allowScripts))for(;f--;)d[f].parentNode.removeChild(d[f]);if(u.allowUnsafeAttr||this.__clearUnsafeAttr(p),r){for(var h=p.querySelectorAll('style'),g=h.length,v='';g--;)v=h[g].innerHTML+v,h[g].parentNode.removeChild(h[g]);v&&(l.css=r.parse(v))}e&&e.trigger("".concat(ve,":root"),{input:o,root:p});var y=this.parseNode(p,c),m=1!==y.length||c.returnArray?y:y[0];return l.html=m,e&&e.trigger(ve,{input:o,output:l}),l},__clearUnsafeAttr:function(e){var n=this,o=e.attributes||[],r=e.childNodes||[],i=[];(0,t.each)(o,(function(t){var e=t.nodeName||'';0===e.indexOf('on')&&i.push(e)})),i.map((function(t){return e.removeAttribute(t)})),(0,t.each)(r,(function(t){return n.__clearUnsafeAttr(t)}))}}};var me=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),be=void 0&&(void 0).__assign||function(){return be=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0:r;if('__'===e.substring(0,2))return"continue";var s=o[e];((0,t.isArray)(s)?s:[s]).forEach((function(t){var o="".concat(t).concat(i?' !important':'');o&&n.push("".concat(e,":").concat(o,";"))}))};for(var s in o)i(s);return n.join('')},o.prototype.getSelectors=function(){return this.get('selectors')||this.get('classes')},o.prototype.getSelectorsString=function(t){return this.selectorsToString?this.selectorsToString(t):this.getSelectors().getFullString()},o}(u.Hn);var Ce=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Se=void 0&&(void 0).__assign||function(){return Se=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&f.reset(d,o)}else p.components=d}return p}))},Pe=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Ce(n,e),n.prototype.initialize=function(t,e){void 0===e&&(e={}),this.opt=e,this.listenTo(this,'add',this.onAdd),this.listenTo(this,'remove',this.removeChildren),this.listenTo(this,'reset',this.resetChildren);var n=e.em,o=e.config;this.config=o,this.em=n,this.domc=e.domc||(null==n?void 0:n.Components)},n.prototype.resetChildren=function(t,e){var n=this;void 0===e&&(e={});var o=this,r=e.previousModels||[],i=r.filter((function(e){return!t.get(e.cid)})),s=ke(t),a=ke(r).filter((function(t){return s.indexOf(t)>=0}));e.keepIds=(e.keepIds||[]).concat(a),i.forEach((function(t){return n.removeChildren(t,o,e)})),t.each((function(t){return n.onAdd(t)}))},n.prototype.resetFromString=function(t,e){var n,o;void 0===t&&(t=''),void 0===e&&(e={}),e.keepIds=ke(this);var r=this,i=r.domc,s=r.em,a=r.parent,l=null==s?void 0:s.Css,c=(null==i?void 0:i.allById())||{},u=this.parseString(t,e),p=Ee(u,c,e),d=e.visitedCmps,f=void 0===d?{}:d;Object.keys(f).forEach((function(t){var e=f[t];if(e.length){var n=(null==l?void 0:l.getRules("#".concat(t)))||[];n.length&&e.forEach((function(t){n.forEach((function(e){var n=e.clone();n.set('selectors',["#".concat(t.attributes.id)]),l.getAll().add(n)}))}))}})),this.reset(p,e),null==s||s.trigger('component:content',a,e,t),null===(o=(n=a).__checkInnerChilds)||void 0===o||o.call(n)},n.prototype.removeChildren=function(t,e,n){var o=this;if(void 0===n&&(n={}),t){var r=this.domc,i=this.em,s=n.temporary||n.fromUndo;if(t.prevColl=this,!s){var a=t.getId(),l=i.Selectors.getAll(),c=i.Css.getAll(),u=(n.keepIds||[]).indexOf(a)<0;delete(r?r.allById():{})[a];var p=u?c.remove(c.filter((function(t){return t.getSelectors().getFullString()==="#".concat(a)})),n):[];l.remove(p.map((function(t){return t.getSelectors().at(0)}))),t.opt.temporary||(i.Commands.run('core:component-style-clear',{target:t}),t.removed(),t.trigger('removed'),i.trigger('component:remove',t)),t.components().forEach((function(t){return o.removeChildren(t,e,n)}))}var d=t.components();i.stopListening(d),i.stopListening(t),i.stopListening(t.get('classes')),t.__postRemove()}},n.prototype.model=function(t,e){var n,o=e.collection.opt,r=o.em,i=r.Components.componentTypes;e.em=r,e.config=o.config,e.componentTypes=i,e.domc=o.domc;for(var s=0;s=0&&this.set('void',!0),n.em=i,this.opt=n,this.em=i,this.frame=n.frame,this.config=n.config||{},this.set('attributes',Ke(Ke({},(0,t.result)(this,'defaults').attributes||{}),this.get('attributes')||{})),this.ccid=o.createId(this,n),this.initClasses(),this.initComponents(),this.initTraits(),this.initToolbar(),this.initScriptProps(),this.listenTo(this,'change:script',this.scriptUpdated),this.listenTo(this,'change:tagName',this.tagUpdated),this.listenTo(this,'change:attributes',this.attrUpdated),this.listenTo(this,'change:attributes:id',this._idUpdated),this.on('change:toolbar',this.__emitUpdateTlb),this.on('change',this.__onChange),this.on(on,this.__propToParent),this.set('status',''),this.views=[],['classes','traits','components'].forEach((function(t){var e="add remove ".concat('components'!==t?'change':'');r.listenTo(r.get(t),e.trim(),(function(){for(var e=[],n=0;n=0}))},o.prototype.__getSymbToUp=function(t){var e=this;void 0===t&&(t={});var n=[],o=t.changed;if(t.fromInstance||t.noPropagate||t.fromUndo||o&&this.__isSymbOvrd(o))return n;var r=this.__getSymbols()||[],i=this.__getSymbol();return n=(i?Ye([i],i.__getSymbols()||[],!0):r).filter((function(t){return t!==e})).filter((function(t){return!(o&&t.__isSymbOvrd(o))}))},o.prototype.__getSymbTop=function(t){for(var e=this,n=this.parent(t);n&&(n.__isSymbol()||n.__getSymbol());)e=n,n=n.parent(t);return e},o.prototype.__upSymbProps=function(n,o){var r=this;void 0===o&&(o={});var i=this.changedAttributes()||{},s=i.attributes||{};if(delete i.status,delete i.open,delete i[Qe],delete i[tn],delete i[en],delete i.attributes,delete s.id,(0,e.isEmptyObj)(s)||(i.attributes=s),!(0,e.isEmptyObj)(i)){var a=this.__getSymbToUp(o);(0,t.keys)(i).map((function(t){r.__isSymbOvrd(t)&&delete i[t]})),this.__logSymbol('props',a,{opts:o,changed:i}),a.forEach((function(e){var n=Ke({},i);(0,t.keys)(n).map((function(t){e.__isSymbOvrd(t)&&delete n[t]})),e.set(n,Ke({fromInstance:r},o))}))}},o.prototype.__upSymbCls=function(t,e,n){var o=this;void 0===n&&(n={});var r=this.__getSymbToUp(n);this.__logSymbol('classes',r,{opts:n}),r.forEach((function(t){t.set('classes',o.get('classes'),{fromInstance:o})})),this.__changesUp(n)},o.prototype.__upSymbComps=function(t,e,n){var o=this,r=n||e||{},i={fromInstance:r.fromInstance,fromUndo:r.fromUndo},s=t.opt.temporary;if(n)if(n.add){var a=[],l=!!this.__getSymbols();if((y=this.__getSymbToUp(Ke(Ke({},i),{changed:'components:add'}))).length){var c=t.__getSymbol();a=(c?c.__getSymbols():t.__getSymbols())||[],(a=Ye([],a,!0)).push(c||t)}!s&&this.__logSymbol('add',y,{opts:n,addedInstances:a.map((function(t){return t.cid})),added:t.cid}),y.forEach((function(e){var r=e.__getSymbTop(),i=a.filter((function(t){var e=t.__getSymbTop({prev:1});return r&&e&&e===r}))[0]||t.clone({symbol:!0,symbolInv:l});e.append(i,Ke({fromInstance:o},n))}))}else{var u=t.__getSymbol();if(u&&!n.temporary&&u.set(Qe,u.__getSymbols().filter((function(e){return e!==t}))),!t.__isSymbolTop()){var p='components:remove',d=n.index,f=t.parent(),h=Ke({fromInstance:t},n),g=t.__isSymbolNested(),v=function(t){var e=t.parent();e&&!e.__isSymbOvrd(p)&&t.remove(h)};y=(null==f?void 0:f.__isSymbOvrd(p))?[]:t.__getSymbToUp(i);g&&(y=null==f?void 0:f.__getSymbToUp(Ke(Ke({},i),{changed:p})),v=function(t){var e=t.components().at(d);e&&e.remove(Ke({fromInstance:f},h))}),!s&&this.__logSymbol('remove',y,{opts:n,removed:t.cid,isSymbNested:g}),y.forEach(v)}}else{var y=this.__getSymbToUp(Ke(Ke({},i),{changed:'components:reset'})),m=t.models;this.__logSymbol('reset',y,{components:m}),y.forEach((function(t){var n=m.map((function(t){return t.clone({symbol:!0})}));t.components().reset(n,Ke({fromInstance:o},e))}))}this.__changesUp(r)},o.prototype.initClasses=function(e,n,o){void 0===o&&(o={});var r=this.get('attributes').class||[],i=[this,'change:classes',this.initClasses],s=this.get('classes')||r,a=(0,t.isString)(s)?s.split(' '):s;this.stopListening.apply(this,i);var l=this.normalizeClasses(a),c=new Re([]);return this.set('classes',c,o),c.add(l),c.on('add remove reset',this.__upSymbCls),this.listenTo.apply(this,i),this},o.prototype.initComponents=function(){var e=[this,'change:components',this.initComponents];this.stopListening.apply(this,e);var n=new Ae([],this.opt);n.parent=this;var o=this.get('components'),r=!this.opt.avoidChildren;return this.set('components',n),r&&o&&n.add((0,t.isFunction)(o)?o(this):o,this.opt),n.on('add remove reset',this.__upSymbComps),this.listenTo.apply(this,e),this},o.prototype.initTraits=function(t){var e=this.em,n='change:traits';this.off(n,this.initTraits),this.__loadTraits();var o=Ke({},this.get('attributes')),r=this.traits;return r.each((function(t){if(!t.get('changeProp')){var e=t.get('name'),n=t.getInitValue();e&&n&&(o[e]=n)}})),r.length&&this.set('attributes',o),this.on(n,this.initTraits),t&&e&&e.trigger('component:toggled'),this},o.prototype.initScriptProps=function(){if(!this.opt.temporary){var t='script-props',e=["change:".concat(t),this.initScriptProps];this.off.apply(this,e);var n=this.previous(t)||[],o=this.get(t)||[],r=n.map((function(t){return"change:".concat(t)})).join(' '),i=o.map((function(t){return"change:".concat(t)})).join(' ');r&&this.off(r,this.__scriptPropsChange),i&&this.on(i,this.__scriptPropsChange),this.on.apply(this,e)}},o.prototype.__scriptPropsChange=function(t,e,n){void 0===n&&(n={}),n.avoidStore||this.trigger('rerender')},o.prototype.append=function(e,n){void 0===n&&(n={});var o=((0,t.isArray)(e)?Ye([],e,!0):[e]).map((function(e){return(0,t.isString)(e)||e.collection&&e.collection.remove(e,{temporary:!0}),e})),r=this.components().add(o,n);return(0,t.isArray)(r)?r:[r]},o.prototype.components=function(e,n){void 0===n&&(n={});var o=this.get('components');return(0,t.isUndefined)(e)?o:(o.reset(void 0,n),e?this.append(e,n):[])},o.prototype.getChildAt=function(t){return this.components().at(t||0)||void 0},o.prototype.getLastChild=function(){var t=this.components();return t.at(t.length-1)||null},o.prototype.empty=function(t){return void 0===t&&(t={}),this.components().reset(void 0,t),this},o.prototype.parent=function(t){void 0===t&&(t={});var e=this.collection||t.prev&&this.prevColl;return e?e.parent:void 0},o.prototype.parents=function(){var t=this.parent();return t?[t].concat(t.parents()):[]},o.prototype.scriptUpdated=function(){this.set('scriptUpdated',1)},o.prototype.initToolbar=function(){var t=this.em,e=this,n=t&&t.getConfig().stylePrefix||'';if(!e.get('toolbar')&&t){var o=[];e.collection&&o.push({label:t.getIcon('arrowUp'),command:function(t){return t.runCommand('core:component-exit',{force:1})}}),e.get('draggable')&&o.push({attributes:{class:"".concat(n,"no-touch-actions"),draggable:!0},label:t.getIcon('move'),command:'tlb-move'}),e.get('copyable')&&o.push({label:t.getIcon('copy'),command:'tlb-clone'}),e.get('removable')&&o.push({label:t.getIcon('delete'),command:'tlb-delete'}),e.set('toolbar',o)}},o.prototype.__loadTraits=function(e,n){void 0===n&&(n={});var o=e||this.traits;if(!(o instanceof qe)){o=(0,t.isFunction)(o)?o(this):o;var r=new qe([],this.opt);r.setTarget(this),o.length&&(o.forEach((function(t){return t.attributes&&delete t.attributes.value})),r.add(o)),this.set({traits:r},n)}return this},o.prototype.getTraits=function(){return this.__loadTraits(),Ye([],this.traits.models,!0)},o.prototype.setTraits=function(e){var n=(0,t.isArray)(e)?e:[e];return this.set({traits:n}),this.getTraits()},o.prototype.getTrait=function(t){return this.getTraits().filter((function(e){return e.get('id')===t||e.get('name')===t}))[0]||null},o.prototype.updateTrait=function(t,e){var n,o=this.getTrait(t);return o&&o.set(e),null===(n=this.em)||void 0===n||n.trigger('component:toggled'),this},o.prototype.getTraitIndex=function(t){var e=this.getTrait(t);return e?this.traits.indexOf(e):-1},o.prototype.removeTrait=function(e){var n,o=this,r=((0,t.isArray)(e)?e:[e]).map((function(t){return o.getTrait(t)})),i=this.traits,s=r.length?i.remove(r):[];return null===(n=this.em)||void 0===n||n.trigger('component:toggled'),(0,t.isArray)(s)?s:[s]},o.prototype.addTrait=function(e,n){var o;void 0===n&&(n={}),this.__loadTraits();var r=this.traits.add(e,n);return null===(o=this.em)||void 0===o||o.trigger('component:toggled'),(0,t.isArray)(r)?r:[r]},o.prototype.normalizeClasses=function(t){var e=[],n=this.em,o=null==n?void 0:n.Selectors;return o?t.models?Ye([],t.models,!0):(t.forEach((function(t){return e.push(o.add(t))})),e):[]},o.prototype.clone=function(t){void 0===t&&(t={});var e=this.em,n=Ke({},this.attributes),o=Ke({},this.opt),r=this.getId(),i=null==e?void 0:e.Css;n.attributes=Ke({},n.attributes),delete n.attributes.id,n.components=[],n.classes=[],n.traits=[],this.__isSymbolTop()&&(t.symbol=!0),this.get('components').each((function(e,o){n.components[o]=e.clone(Ke(Ke({},t),{_inner:1}))})),this.get('traits').each((function(t,e){n.traits[e]=t.clone()})),this.get('classes').each((function(t,e){n.classes[e]=t.get('name')})),n.status='',o.collection=null;var s=new this.constructor(n,o),a="#".concat(s.getId());(i?i.getRules("#".concat(r)):[]).forEach((function(t){var e=t.clone();e.set('selectors',[a]),i.getAll().add(e)})),s.set(Qe,0);var l=this.__getSymbol(),c=this.__getSymbols();t.symbol||!l&&!c?l?(l.set(Qe,Ye(Ye([],l.__getSymbols(),!0),[s],!1)),s.__initSymb()):t.symbol&&(this.__isSymbol()?(this.set(Qe,Ye(Ye([],c,!0),[s],!1)),s.set(tn,this),s.__initSymb()):t.symbolInv?(this.set(Qe,[s]),s.set(tn,this),[this,s].map((function(t){return t.__initSymb()}))):(s.set(Qe,[this]),[this,s].map((function(t){return t.__initSymb()})),this.set(tn,s))):(s.set(tn,0),s.set(Qe,0));var u='component:clone';return e&&e.trigger(u,s),this.trigger(u,s),s},o.prototype.getName=function(t){void 0===t&&(t={});var n=this.em,o=this.attributes,r=o.type,i=o.tagName,s=o.name,a=r||i,l=r?'':i,c='domComponents.names.',u=s&&(null==n?void 0:n.t("".concat(c).concat(s))),p=l&&(null==n?void 0:n.t("".concat(c).concat(l))),d=n&&(n.t("".concat(c).concat(r))||n.t("".concat(c).concat(i))),f=this.get('custom-name');return(t.noCustom?'':f)||u||s||p||(0,e.capitalize)(l)||d||(0,e.capitalize)(a)},o.prototype.getIcon=function(){var t=this.get('icon');return t?t+' ':''},o.prototype.toHTML=function(n){void 0===n&&(n={});var o=this,r=[],i=n.tag||o.get('tagName'),s=o.get('void'),a=n.attributes,l=this.getAttrToHTML();if(delete n.tag,a&&((0,t.isFunction)(a)?l=a(o,l)||{}:(0,e.isObject)(a)&&(l=a)),n.withProps){var c=this.toJSON();(0,t.forEach)(c,(function(n,o){'_'!==o[0]&&['classes','attributes','components'].indexOf(o)<0&&(l["data-gjs-".concat(o)]=(0,t.isArray)(n)||(0,e.isObject)(n)?JSON.stringify(n):n)}))}for(var u in l){var p=l[u];if(!(0,t.isUndefined)(p)&&null!==p)if((0,t.isBoolean)(p))p&&r.push(u);else{var d='';if(n.altQuoteAttr&&(0,t.isString)(p)&&p.indexOf('"')>=0)d="'".concat(p.replace(/'/g,'''),"'");else{var f=(0,t.isString)(p)?p.replace(/"/g,'"'):p;d="\"".concat(f,"\"")}r.push("".concat(u,"=").concat(d))}}var h=r.length?" ".concat(r.join(' ')):'',g=o.getInnerHTML(n),v="<".concat(i).concat(h).concat(s?'/':'',">").concat(g);return!s&&(v+="")),v},o.prototype.getInnerHTML=function(t){return this.__innerHTML(t)},o.prototype.__innerHTML=function(t){void 0===t&&(t={});var e=this.components();return e.length?e.map((function(e){return e.toHTML(t)})).join(''):this.content},o.prototype.getAttrToHTML=function(){var t=this.getAttributes();return Je(this.em)&&delete t.style,t},o.prototype.toJSON=function(e){void 0===e&&(e={});var n=s.Model.prototype.toJSON.call(this,e);if(n.attributes=this.getAttributes(),delete n.attributes.class,delete n.toolbar,delete n.traits,delete n.status,delete n.open,delete n._undoexc,!e.fromUndo){var o=n[tn],r=n[Qe];r&&(0,t.isArray)(r)&&(n[Qe]=r.filter((function(t){return t})).map((function(t){return t.getId?t.getId():t}))),o&&!(0,t.isString)(o)&&(n[tn]=o.getId())}return this.em.getConfig().avoidDefaults&&this.getChangedProps(n),n},o.prototype.getChangedProps=function(e){var n=e||s.Model.prototype.toJSON.apply(this),o=(0,t.result)(this,'defaults');return(0,t.forEach)(o,(function(t,e){-1===['type'].indexOf(e)&&n[e]===t&&delete n[e]})),(0,t.isEmpty)(n.type)&&delete n.type,(0,t.forEach)(['attributes','style'],(function(e){(0,t.isEmpty)(o[e])&&(0,t.isEmpty)(n[e])&&delete n[e]})),(0,t.forEach)(['classes','components'],(function(e){(!n[e]||(0,t.isEmpty)(o[e])&&!n[e].length)&&delete n[e]})),n},o.prototype.getId=function(){return(this.get('attributes')||{}).id||this.ccid||this.cid},o.prototype.setId=function(t,e){var n=Ke({},this.get('attributes'));return n.id=t,this.set('attributes',n,e),this},o.prototype.getEl=function(t){void 0===t&&(t=void 0);var e=this.getView(t);return e&&e.el},o.prototype.getView=function(t){var e=this.view,n=this.views;return t&&(e=n.filter((function(e){return e._getFrame()===t.view}))[0]),e},o.prototype.getCurrentView=function(){var t=(this.em.get('currentFrame')||{}).model;return this.getView(t)},o.prototype.__getScriptProps=function(){var t=this.props();return(this.get('script-props')||[]).reduce((function(e,n){return e[n]=t[n],e}),{})},o.prototype.getScriptString=function(e){var n=this,o=e||this.get('script')||'';if(!o)return o;if(this.get('script-props'))o=o.toString().trim();else{if('function'==typeof o){var r=o.toString().trim();o=(r=r.replace(/^function[\s\w]*\(\)\s?\{/,'').replace(/\}$/,'')).trim()}var i=this.em.getConfig(),s=Xe(i.tagVarStart||'{[ '),a=Xe(i.tagVarEnd||' ]}'),l=new RegExp("".concat(s,"([\\w\\d-]*)").concat(a),'g');o=o.replace(l,(function(e,o){n.scriptUpdated();var r=n.attributes[o]||'';return(0,t.isArray)(r)||'object'==typeof r?JSON.stringify(r):r}))}return o},o.prototype.emitUpdate=function(t){for(var e,n=[],o=1;o=0&&this.__propSelfToParent({component:this,changed:(e={},e[t]=s,e),options:n[2]||n[1]||{}})},o.prototype.onAll=function(e){return(0,t.isFunction)(e)&&(e(this),this.components().forEach((function(t){return t.onAll(e)}))),this},o.prototype.forEachChild=function(e){(0,t.isFunction)(e)&&this.components().forEach((function(t){e(t),t.forEachChild(e)}))},o.prototype.remove=function(t){var e=this;void 0===t&&(t={});var n=this.em,o=this.collection,r=function(){o&&o.remove(e,Ke(Ke({},t),{action:'remove-component'})),o||(e.components('',t),e.components().removeChildren(e,void 0,t))},i=Ke({},t);return[this,n].map((function(t){return t.trigger('component:remove:before',e,r,i)})),!i.abort&&r(),this},o.prototype.move=function(t,e){if(void 0===e&&(e={}),t){var n=e.at,o=this.index(),r=t===this.parent();r&&(o===n||o===n-1)||(r&&n&&n>o&&(e.at=n-1),this.remove({temporary:1}),t.append(this,e),this.emitUpdate())}return this},o.prototype.isInstanceOf=function(t){var e,n,o=null===(n=null===(e=this.em)||void 0===e?void 0:e.Components.getType(t))||void 0===n?void 0:n.model;return!!o&&this instanceof o},o.prototype.isChildOf=function(e){for(var n=(0,t.isString)(e),o=this.parent();o;){if(n){if(o.isInstanceOf(e))return!0}else if(o===e)return!0;o=o.parent()}return!1},o.prototype.resetId=function(t){void 0===t&&(t={});var e=this.em,n=this.getId();if(!n)return this;var r=o.createId(this);this.setId(r);var i=null==e?void 0:e.Css.getIdRule(n),s=null==i?void 0:i.get('selectors').at(0);return null==s||s.set('name',r),this},o.prototype._getStyleRule=function(t){var e=(void 0===t?{}:t).id,n=this.em,o=e||this.getId();return null==n?void 0:n.Css.getIdRule(o)},o.prototype._getStyleSelector=function(t){var e=this._getStyleRule(t);return null==e?void 0:e.get('selectors').at(0)},o.prototype._idUpdated=function(t,e,n){if(void 0===n&&(n={}),!n.idUpdate){var r=this.ccid,i=(this.get('attributes')||{}).id,s=(this.previous('attributes')||{}).id||r,a=o.getList(this);if(a[i]||!i&&s)return this.setId(s,{idUpdate:!0});delete a[s],a[i]=this,this.ccid=i;var l=this._getStyleSelector({id:s});l&&l.set({name:i,label:i})}},o.getDefaults=function(){return(0,t.result)(this.prototype,'defaults')},o.isComponent=function(t){return{tagName:(0,e.toLowerCase)(t.tagName)}},o.ensureInList=function(t){var e=o.getList(t),n=t.getId(),r=e[n];if(r){if(r!==t){var i=o.getIncrementId(n,e);t.setId(i),e[i]=t}}else e[n]=t;t.components().forEach((function(t){return o.ensureInList(t)}))},o.createId=function(t,e){void 0===e&&(e={});var n,r=o.getList(t),i=e.idMap,s=void 0===i?{}:i,a=t.get('attributes').id;return a?(n=o.getIncrementId(a,r,e),t.setId(n),a!==n&&(s[a]=n)):n=o.getNewId(r),r[n]=t,n},o.getNewId=function(t){for(var e=Object.keys(t).length.toString().length+2,n=(Math.random()+1.1).toString(36).slice(-e),r="i".concat(n);t[r];)r=o.getNewId(t);return r},o.getIncrementId=function(t,e,n){void 0===n&&(n={});var o=n.keepIds,r=1,i=t;if((void 0===o?[]:o).indexOf(t)<0)for(;e[i];)r++,i="".concat(t,"-").concat(r);return i},o.getList=function(t){var e=t.opt,n=void 0===e?{}:e,o=n.domc,r=n.em,i=o||(null==r?void 0:r.Components);return i?i.componentsById:{}},o.checkId=function(e,n,r,i){void 0===n&&(n=[]),void 0===r&&(r={}),void 0===i&&(i={});var s=(0,t.isArray)(e)?e:[e],a=i.keepIds,l=void 0===a?[]:a;s.forEach((function(e){e.attributes;var s=e.attributes,a=void 0===s?{}:s,c=e.components,u=a.id;if(u&&r[u]&&l.indexOf(u)<0){var p=o.getIncrementId(u,r);a.id=p,(0,t.isArray)(n)&&n.forEach((function(t){var e=t.selectors;e.forEach((function(t,n){t==="#".concat(u)&&(e[n]="#".concat(p))}))}))}c&&o.checkId(c,n,r,i)}))},o}(xe);const sn=rn;var an=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ln=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.compView=fn,t}return an(n,e),n.prototype.initialize=function(t){this.opts=t||{},this.config=t.config||{},this.em=this.config.em;var e=this.collection;this.listenTo(e,'add',this.addTo),this.listenTo(e,'reset',this.resetChildren),this.listenTo(e,'remove',this.removeChildren)},n.prototype.removeChildren=function(t,e,n){var o=this;void 0===n&&(n={}),t.views.forEach((function(t){if(t){var e=t.childrenView,n=t.scriptContainer;e&&e.stopListening(),(0,At.L_)(n),t.remove.apply(t)}})),t.components().forEach((function(t){return o.removeChildren(t,e,n)}))},n.prototype.addTo=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var o=this.em,r=this.collection.indexOf(t);if(this.addToCollection(t,null,r),o&&!n.temporary){var i=function(t){o.trigger('component:add',t),t.components().forEach((function(t){return i(t)}))};i(t)}},n.prototype.addToCollection=function(e,n,o){for(var r=this,i=r.config,s=r.opts,a=r.em,l=n||null,c=i.frameView,u=(null==c?void 0:c.model)&&e.getView(c.model),p=s.componentTypes||(null==a?void 0:a.Components.getTypes()),d=e.get('type')||'default',f=this.compView,h=0;h=c.scrollTop&&l>=c.scrollLeft&&a<=c.scrollBottom&&l<=(null==i?void 0:i.offsetWidth)+r.scrollLeft},o.prototype.scrollIntoView=function(t){var e;void 0===t&&(t={});var n=this.getOffsetRect();if(!this.isInViewport({rect:n})||t.force){var o=this.el;'smooth'!==t.behavior?null===(e=o.ownerDocument.defaultView)||void 0===e||e.scrollTo(0,n.top):o.scrollIntoView(pn({behavior:'smooth',block:'nearest'},t))}},o.prototype.reset=function(){var t=this.el;this.el='',this._ensureElement(),this._setData(),(0,At.dL)(t,this.el),this.render()},o.prototype._setData=function(){var t=this.model,e=t.components();this.$el.data({model:t,collection:e,view:this})},o.prototype._getFrame=function(){var t;return null===(t=this.em)||void 0===t?void 0:t.get('Canvas').config.frameView},o.prototype.renderChildren=function(){this.updateContent();var t=this.getChildrenContainer(),e=this.childrenView||new cn({collection:this.model.get('components'),config:this.config,componentTypes:this.opts.componentTypes});e.render(t),this.childrenView=e;for(var n=Array.prototype.slice.call(e.el.childNodes),o=0,r=n.length;o=0},n}(sn);var bn=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const _n=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return bn(e,t),e}(fn);var wn=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),xn=void 0&&(void 0).__assign||function(){return xn=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n \n "),fallback:"\n \n "),file:''})},enumerable:!1,configurable:!0}),o.prototype.initialize=function(o,r){n.prototype.initialize.call(this,o,r);var i=this.get('attributes').src;i&&(0,e.buildBase64UrlFromSvg)((0,t.result)(this,'defaults').src)!==i&&this.set('src',i,{silent:!0})},o.prototype.initToolbar=function(){n.prototype.initToolbar.call(this);var t=this.em;if(t){var e='image-editor';if(t.Commands.has(e)){for(var o=!1,r=this.get('toolbar'),i=0;i=0)&&delete r.editable}))}return r},o}(fo);const mo=yo;var bo=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),_o=void 0&&(void 0).__assign||function(){return _o=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]-1;return Pr(Pr({},i),!u||p?{reason:2}:{result:!0})},n.prototype.allById=function(){return this.componentsById},n.prototype.getById=function(t){return this.componentsById[t]||null},n.prototype.destroy=function(){var t,e=this.allById();Object.keys(e).forEach((function(t){return e[t]&&e[t].remove()})),null===(t=this.componentView)||void 0===t||t.remove(),[this.em,this.componentsById,this.componentView].forEach((function(t){return{}}))},n}(b);const Mr=jr;const Lr={stylePrefix:'css-',rules:[]};var Dr=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Nr=Number.MAX_VALUE,Ir=function(n){function o(){var e=n.call(this)||this;return(0,t.bindAll)(e,'sortRules'),e.compCls=[],e.ids=[],e}return Dr(o,n),o.prototype.buildFromModel=function(t,e){var n=this;void 0===e&&(e={});var o='',r=this.em,i=r&&r.getConfig().avoidInlineStyle,s=t.styleToString(),a=t.classes;return this.ids.push("#".concat(t.getId())),a.forEach((function(t){return n.compCls.push(t.getFullName())})),!i&&s&&(o="#".concat(t.getId(),"{").concat(s,"}")),t.components().forEach((function(t){return o+=n.buildFromModel(t,e)})),o},o.prototype.build=function(n,o){var r=this;void 0===o&&(o={});var i=o.json,s=o.em,a=o.cssc||(null==s?void 0:s.Css);this.em=s,this.compCls=[],this.ids=[],this.model=n;var l=[],c=n?this.buildFromModel(n,o):'',u=(0,t.isUndefined)(o.clearStyles)&&s?s.getConfig().clearStyles:o.clearStyles;if(a){var p=o.rules||a.getAll(),d={},f=[];o.onlyMatched&&n&&(0,e.hasWin)()&&(p=this.matchedRules(n,p)),p.forEach((function(t){var e=t.getAtRule();if(e){var n=d[e];n?n.push(t):d[e]=[t]}else{var s=r.buildFromRule(t,f,o);i?l.push(s):c+=s}})),this.sortMediaObject(d).forEach((function(t){var e='',n=t.key;t.value.forEach((function(t){var s=r.buildFromRule(t,f,o);t.get('singleAtRule')?c+="".concat(n,"{").concat(s,"}"):e+=s,i&&l.push(s)})),e&&(c+="".concat(n,"{").concat(e,"}"))})),s&&u&&p.remove&&p.remove(f)}return i?l.filter((function(t){return t})):c},o.prototype.buildFromRule=function(t,e,n){var o,r=this;void 0===n&&(n={});var i,s='',a=this.model,l=t.selectorsToString({skipAdd:1}),c=t.get('selectorsAdd'),u=t.get('singleAtRule');if(null===(o=t.get('selectors'))||void 0===o||o.forEach((function(t){var e=t.getFullName();(r.compCls.indexOf(e)>=0||r.ids.indexOf(e)>=0||n.keepUnusedStyles)&&(i=1)})),l&&i||c||u||!a){var p=t.getDeclaration({body:1});p&&(n.json?s=t:s+=p)}else e.push(t);return s},o.prototype.matchedRules=function(t,e){var n=this,o=t.getEl(),r=[];return e.forEach((function(t){try{t.selectorsToString().split(',').some((function(t){return null==o?void 0:o.matches(n.__cleanSelector(t))}))&&r.push(t)}catch(t){}})),t.components().forEach((function(t){r=r.concat(n.matchedRules(t,e))})),r=r.filter((function(t,e){return r.indexOf(t)===e}))},o.prototype.getQueryLength=function(t){var e=/(-?\d*\.?\d+)\w{0,}/.exec(t);return e?parseFloat(e[1]):Nr},o.prototype.sortMediaObject=function(e){var n=this;void 0===e&&(e={});var o=[];return(0,t.each)(e,(function(t,e){return o.push({key:e,value:t})})),o.sort((function(t,e){var o=[t.key,e.key].every((function(t){return-1!==t.indexOf('min-width')})),r=o?t.key:e.key,i=o?e.key:t.key;return n.getQueryLength(r)-n.getQueryLength(i)}))},o.prototype.sortRules=function(t,e){var n=function(t){return t.get('mediaText')||''},o=[n(t),n(e)].every((function(t){return-1!==t.indexOf('min-width')})),r=n(o?t:e),i=n(o?e:t);return this.getQueryLength(r)-this.getQueryLength(i)},o.prototype.__cleanSelector=function(t){return t.split(' ').map((function(t){return t.split(':')[0]})).join(' ')},o}(u.Hn);const Fr=Ir;var Vr=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Rr=void 0&&(void 0).__assign||function(){return Rr=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0}))},o.prototype.setIdRule=function(e,n,o){void 0===n&&(n={}),void 0===o&&(o={});var r=o.addOpts,i=void 0===r?{}:r,s=o.mediaText,a=o.state||'',l=(0,t.isUndefined)(s)?this.em.getCurrentMedia():s,c=this.em.Selectors.add({name:e,type:Ne.TYPE_ID},i),u=this.add(c,a,l,{},i);return u.setStyle(n,Kr(Kr({},o),i)),u},o.prototype.getIdRule=function(e,n){void 0===n&&(n={});var o=n.mediaText,r=n.state||'',i=(0,t.isUndefined)(o)?this.em.getCurrentMedia():o,s=this.em.Selectors.get(e,Ne.TYPE_ID);return s&&this.get(s,r,i)},o.prototype.setClassRule=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var o=n.state||'',r=n.mediaText||this.em.getCurrentMedia(),i=this.em.Selectors.add({name:t,type:Ne.TYPE_CLASS}),s=this.add(i,o,r);return s.setStyle(e,n),s},o.prototype.getClassRule=function(t,e){void 0===e&&(e={});var n=e.state||'',o=e.mediaText||this.em.getCurrentMedia(),r=this.em.Selectors.get(t,Ne.TYPE_CLASS);return r&&this.get(r,n,o)},o.prototype.remove=function(e,n){var o=(0,t.isString)(e)?this.getRules(e):e,r=this.getAll().remove(o,n);return(0,t.isArray)(r)?r:[r]},o.prototype.clear=function(t){return void 0===t&&(t={}),this.getAll().reset([],t),this},o.prototype.getComponentRules=function(e,n){void 0===n&&(n={});var o=n.state,r=n.mediaText;n.current&&(o=this.em.get('state')||'',r=this.em.getCurrentMedia());var i=e.getId();return this.getAll().filter((function(e){return!(!(0,t.isUndefined)(o)&&e.get('state')!==o)&&(!(!(0,t.isUndefined)(r)&&e.get('mediaText')!==r)&&e.getSelectorsString()==="#".concat(i))}))},o.prototype.render=function(){var t;return null===(t=this.rulesView)||void 0===t||t.remove(),this.rulesView=new Ht({collection:this.rules,config:this.config}),this.rulesView.render().el},o.prototype.destroy=function(){var t;this.rules.reset(),this.rules.stopListening(),null===(t=this.rulesView)||void 0===t||t.remove()},o}(b);const Jr=Xr;const Zr={appendTo:'',blocks:[],appendOnClick:!1,custom:!1};var Qr=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const ti=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Qr(n,e),n.prototype.defaults=function(){return{label:'',content:'',media:'',category:'',activate:!1,select:void 0,resetId:!1,disable:!1,onClick:void 0,attributes:{}}},n.prototype.getId=function(){return this.id},n.prototype.getLabel=function(){return this.get('label')},n.prototype.getMedia=function(){return this.get('media')},n.prototype.getContent=function(){return this.get('content')},n.prototype.getCategoryLabel=function(){var e=this.get('category');return(0,t.isFunction)(null==e?void 0:e.get)?e.get('label'):(null==e?void 0:e.label)?null==e?void 0:e.label:e},n}(u.Hn);var ei=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ni=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ei(e,t),e}(u.FE);const oi=ni;ni.prototype.model=ti;var ri=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const ii=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ri(e,t),e.prototype.defaults=function(){return{id:'',label:'',open:!0,attributes:{}}},e}(u.Hn);var si=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ai=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return si(e,t),e}(u.FE);const li=ai;ai.prototype.model=ii;var ci=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ui=function(n){function o(t,e){void 0===e&&(e={});var o=n.call(this,t)||this,r=o.model;return o.em=e.em,o.config=e,o.endDrag=o.endDrag.bind(o),o.ppfx=e.pStylePrefix||'',o.listenTo(r,'destroy remove',o.remove),o.listenTo(r,'change',o.render),o}return ci(o,n),o.prototype.events=function(){return{click:'handleClick',mousedown:'startDrag',dragstart:'handleDragStart',drag:'handleDrag',dragend:'handleDragEnd'}},o.prototype.__getModule=function(){return this.em.Blocks},o.prototype.handleClick=function(e){var n=this,o=n.config,r=n.model,i=n.em,s=r.get('onClick')||o.appendOnClick;if(i.trigger('block:click',r,e),s){if((0,t.isFunction)(s))return s(r,null==i?void 0:i.getEditor(),{event:e});var a,l,c=o.getSorter(),u=r.get('content'),p=i.getSelected();if(c.setDropContent(u),p)if(c.validTarget(p.getEl(),u).valid)a=p;else{var d=p.parent();d&&c.validTarget(d.getEl(),u).valid&&(a=d,l=d.components().indexOf(p)+1)}if(!a){var f=i.getWrapper();c.validTarget(f.getEl(),u).valid&&(a=f)}var h=a&&a.append(u,{at:l})[0];h&&i.setSelected(h,{scroll:1})}},o.prototype.startDrag=function(t){var n=this,o=n.config,r=n.em,i=n.model,s=i.get('disable');if(0===t.button&&o.getSorter&&!this.el.draggable&&!s){r.refreshCanvas();var a=o.getSorter();a.__currentBlock=i,a.setDragHelper(this.el,t),a.setDropContent(this.model.get('content')),a.startSort(this.el),(0,e.on)(document,'mouseup',this.endDrag)}},o.prototype.handleDragStart=function(t){this.__getModule().__startDrag(this.model,t)},o.prototype.handleDrag=function(t){this.__getModule().__drag(t)},o.prototype.handleDragEnd=function(){this.__getModule().__endDrag()},o.prototype.endDrag=function(){(0,e.off)(document,'mouseup',this.endDrag);var t=this.config.getSorter();t.moved=0,t.endMove()},o.prototype.render=function(){var t,n=this,o=n.em,r=n.el,i=n.$el,s=n.ppfx,a=n.model,l=a.get('disable'),c=a.get('attributes')||{},u=c.class||'',p="".concat(s,"block"),d=o&&o.t("blockManager.labels.".concat(a.id))||a.get('label'),f=a.get('render'),h=a.get('media'),g=l?"".concat(p,"--disable"):"".concat(s,"four-color-h");i.attr(c),r.className="".concat(u," ").concat(p," ").concat(s,"one-bg ").concat(g).trim(),r.innerHTML="\n ".concat(h?"
    ").concat(h,"
    "):'',"\n
    ").concat(d,"
    \n "),r.title=c.title||(null===(t=r.textContent)||void 0===t?void 0:t.trim()),r.setAttribute('draggable',"".concat(!(!(0,e.hasDnd)(o)||l)));var v=f&&f({el:r,model:a,className:p,prefix:s});return v&&(r.innerHTML=v),this},o}(u.G7);const pi=ui;var di=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fi=void 0&&(void 0).__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},hi=function(t){function e(e,n){var o=t.call(this,e)||this;o.config=n;var r=n.pStylePrefix||'';return o.em=n.em,o.pfx=r,o.caretR='fa fa-caret-right',o.caretD='fa fa-caret-down',o.iconClass="".concat(r,"caret-icon"),o.activeClass="".concat(r,"open"),o.className="".concat(r,"block-category"),o.listenTo(o.model,'change:open',o.updateVisibility),o.model.view=o,o}return di(e,t),e.prototype.events=function(){return{'click [data-title]':'toggle'}},e.prototype.template=function(t){var e=t.pfx,n=t.label;return r(vi||(vi=fi(["\n
    \n \n ","\n
    \n
    \n "],["\n
    \n \n ","\n
    \n
    \n "])),e,e,n,e)},e.prototype.attributes=function(){return this.model.get('attributes')||{}},e.prototype.updateVisibility=function(){this.model.get('open')?this.open():this.close()},e.prototype.open=function(){this.$el.addClass(this.activeClass),this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretD),this.getBlocksEl().style.display=''},e.prototype.close=function(){this.$el.removeClass(this.activeClass),this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretR),this.getBlocksEl().style.display='none'},e.prototype.toggle=function(){var t=this.model;t.set('open',!t.get('open'))},e.prototype.getIconEl=function(){return this.iconEl||(this.iconEl=this.el.querySelector(".".concat(this.iconClass))),this.iconEl},e.prototype.getBlocksEl=function(){return this.blocksEl||(this.blocksEl=this.el.querySelector(".".concat(this.pfx,"blocks-c"))),this.blocksEl},e.prototype.append=function(t){this.getBlocksEl().appendChild(t)},e.prototype.render=function(){var t=this,e=t.em,n=t.el,o=t.$el,r=t.model,i=t.pfx,s=e.t("blockManager.categories.".concat(r.id))||r.get('label');return n.innerHTML=this.template({pfx:i,label:s}),o.addClass(this.className),o.css({order:r.get('order')}),this.updateVisibility(),this},e}(u.G7);const gi=hi;var vi,yi=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),mi=void 0&&(void 0).__assign||function(){return mi=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
    \n
    \n
    \n "),this.collection.each((function(e){return t.add(e,n)})),this.append(n);var o="".concat(this.blockContClass,"s ").concat(e,"one-bg ").concat(e,"two-color");return this.$el.addClass(o),this.rendered=!0,this},n}(u.G7);const _i=bi;var wi=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),xi=void 0&&(void 0).__assign||function(){return xi=Object.assign||function(t){for(var e,n=1,o=arguments.length;n',iconSync:'',iconTagOn:'',iconTagOff:'',iconTagRemove:'',componentFirst:!1,custom:!1};var Di=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Ni=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Di(e,t),e.prototype.defaults=function(){return{name:'',label:''}},e.prototype.getName=function(){return this.get('name')},e.prototype.getLabel=function(){return this.get('label')||this.getName()},e}(u.Hn);const Ii=Ni;Ni.prototype.idAttribute='name';var Fi=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Vi=void 0&&(void 0).__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},Ri='contentEditable',Hi=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this,o=e.config||{};return n.config=o,n.module=e.module,n.coll=e.coll||null,n.pfx=o.stylePrefix||'',n.ppfx=o.pStylePrefix||'',n.em=o.em,n.listenTo(n.model,'change:active',n.updateStatus),n}return Fi(e,t),e.prototype.template=function(){var t=this,e=t.pfx,n=t.model,o=t.config,i=n.get('label')||'';return r(Bi||(Bi=Vi(["\n \n ","\n $"," \n "],["\n \n ","\n $"," \n "])),e,e,e,i,e,e,o.iconTagRemove)},e.prototype.events=function(){return{'click [data-tag-remove]':'removeTag','click [data-tag-status]':'changeStatus','dblclick [data-tag-name]':'startEditTag','focusout [data-tag-name]':'endEditTag'}},e.prototype.getInputEl=function(){return this.inputEl||(this.inputEl=this.el.querySelector('[data-tag-name]')),this.inputEl},e.prototype.startEditTag=function(){var t=this.em,e=this.getInputEl();e[Ri]='true',e.focus(),null==t||t.setEditing(!0)},e.prototype.endEditTag=function(){var t=this.model,e=this.em,n=this.getInputEl(),o=n.textContent||'',r=null==e?void 0:e.Selectors;n[Ri]='false',null==e||e.setEditing(!1),r&&r.rename(t,o)!==t&&(n.innerText=t.get('label'))},e.prototype.changeStatus=function(){var t=this.model;t.set('active',!t.get('active'))},e.prototype.removeTag=function(){this.module.removeSelected(this.model)},e.prototype.updateStatus=function(){var t=this,e=t.model,n=t.$el,o=t.config,r=o.iconTagOn,i=o.iconTagOff,s=n.find('[data-tag-status]');e.get('active')?(s.html(r),n.removeClass('opac50')):(s.html(i),n.addClass('opac50'))},e.prototype.render=function(){var t=this.pfx,e=this.ppfx;return this.$el.html(this.template()),this.$el.attr('class',"".concat(t,"tag ").concat(e,"three-bg")),this.updateStatus(),this},e}(u.G7);const zi=Hi;var Bi,Ui=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Wi=void 0&&(void 0).__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},$i=function(e){function n(n){void 0===n&&(n={});var o=e.call(this,n)||this;o.config=n.config||{},o.pfx=o.config.stylePrefix||'',o.ppfx=o.config.pStylePrefix||'',o.className=o.pfx+'tags',o.stateInputId=o.pfx+'states',o.stateInputC=o.pfx+'input-c',o.states=o.config.states||[];var r=o.config.em,i=o.collection;o.target=r;var s=r.Selectors;o.module=s,o.em=r,o.componentChanged=(0,t.debounce)(o.componentChanged.bind(o),0),o.checkSync=(0,t.debounce)(o.checkSync.bind(o),0);return o.listenTo(r,'component:toggled component:update:classes',o.componentChanged),o.listenTo(r,'styleManager:update',o.componentChanged),o.listenTo(r,'component:update:classes change:state',o.__handleStateChange),o.listenTo(r,'styleable:change change:device',o.checkSync),o.listenTo(i,'add',o.addNew),o.listenTo(i,'reset',o.renderClasses),o.listenTo(i,'remove',o.tagRemoved),o.listenTo(s.getAll(),s.events.state,(0,t.debounce)((function(){return o.renderStates()}),0)),o.delegateEvents(),o}return Ui(n,e),n.prototype.template=function(t){var e=t.labelInfo,n=t.labelHead,o=t.iconSync,i=t.iconAdd,s=t.pfx,a=t.ppfx;return r(Gi||(Gi=Wi(["
    \n
    ","
    \n
    \n \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n $"," \n $"," \n
    \n
    \n
    ",":
    \n
    \n
    "],["
    \n
    ","
    \n
    \n \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n $"," \n $"," \n
    \n
    \n
    ",":
    \n
    \n
    "])),s,s,s,s,n,s,s,s,a,a,a,s,a,a,s,a,s,s,s,s,s,i,s,s,o,s,s,e,s)},n.prototype.events=function(){return{'change [data-states]':'stateChanged','click [data-add]':'startNewTag','focusout [data-input]':'endNewTag','keyup [data-input]':'onInputKeyUp','click [data-sync-style]':'syncStyle'}},n.prototype.syncStyle=function(){var t,e=this.em,n=this.getTarget(),o=e.Css,r=this.getCommonSelectors({opts:{noDisabled:1}}),i=e.get('state'),s=e.getCurrentMedia(),a=[],l=o.get(r,i,s)||o.add(r,i,s);this.getTargets().forEach((function(e){var n=o.getIdRule(e.getId(),{state:i,mediaText:s});t=n.getStyle(),n.setStyle({}),a.push(n)})),t&&l.addStyle(t),e.trigger('component:toggled'),e.trigger('component:sync-style',{component:n,selectors:r,mediaText:s,rule:l,ruleComponents:a,state:i})},n.prototype.tagRemoved=function(t){this.updateStateVis()},n.prototype.addNew=function(t){this.addToClasses(t)},n.prototype.startNewTag=function(){var t,e;null===(t=this.$addBtn)||void 0===t||t.css({display:'none'}),null===(e=this.$input)||void 0===e||e.show().focus()},n.prototype.endNewTag=function(){var t,e;null===(t=this.$addBtn)||void 0===t||t.css({display:''}),null===(e=this.$input)||void 0===e||e.hide().val('')},n.prototype.onInputKeyUp=function(t){var e;13===t.keyCode?(t.preventDefault(),this.addNewTag(null===(e=this.$input)||void 0===e?void 0:e.val())):27===t.keyCode&&this.endNewTag()},n.prototype.checkStates=function(){var t=this.em.getState(),e=this.getStates();e&&e.val(t)},n.prototype.componentChanged=function(t){var e=(void 0===t?{}:t).targets;this.updateSelection(e)},n.prototype.updateSelection=function(e){var n=e||this.getTargets(),o=[];return(n=(0,t.isArray)(n)?n:[n])&&n.length&&(o=this.getCommonSelectors({targets:n}),this.checkSync({validSelectors:o})),this.collection.reset(o),this.updateStateVis(n),this.module.__trgCustom(),o},n.prototype.getCommonSelectors=function(t){var e=void 0===t?{}:t,n=e.targets,o=e.opts,r=void 0===o?{}:o,i=n||this.getTargets();return this.module.__getCommonSelectors(i,r)},n.prototype._commonSelectors=function(){for(var t,e=[],n=0;n","
    "],["",""])),i,e);else{var u=null==e?void 0:e.getSelectors();if(!u)return'';var p=u.getStyleable(),d=a.get('state'),f=e.getId?r(Yi||(Yi=Wi(["","\n #",""],["","\n #",""])),i,e.getName(),i,e.getId()):'';n=(n=this.collection.getFullString(p))?r(Xi||(Xi=Wi(["",""],["",""])),i,n):e.get('selectorsAdd')||f,n=c&&f?f:n,n+=d?r(Ji||(Ji=Wi([":",""],[":",""])),i,d):'',n=l?l({result:n,state:d,target:e}):n}return n&&"").concat(n,"")},n.prototype.stateChanged=function(t){var e=this.em,n=t.target.value;e.set('state',n)},n.prototype.addNewTag=function(t){var e=t.trim();e&&(this.module.addSelected({label:e}),this.endNewTag())},n.prototype.addToClasses=function(t,e){var n=e,o=this.getClasses(),r=new zi({model:t,config:this.config,coll:this.collection,module:this.module}).render().el;return n?n.appendChild(r):o.append(r),r},n.prototype.renderClasses=function(){var t=this,e=document.createDocumentFragment(),n=this.getClasses();n.empty(),this.collection.each((function(n){return t.addToClasses(n,e)})),n.append(e)},n.prototype.getClasses=function(){return this.$el.find('[data-selectors]')},n.prototype.getStates=function(){if(!this.$states){var t=this.$el.find('[data-states]');this.$states=t[0]&&t}return this.$states},n.prototype.getStatesC=function(){return this.$statesC||(this.$statesC=this.$el.find('#'+this.stateInputC)),this.$statesC},n.prototype.renderStates=function(){var t=this.module,e=this.em,n=e.t('selectorManager.emptyState'),o=t.getStates().map((function(t){var n=e.t("selectorManager.states.".concat(t.id))||t.getLabel()||t.id;return"")})).join(''),r=this.getStates();r&&r.html("").concat(o)),this.checkStates()},n.prototype.render=function(){var t=this,e=t.em,n=t.pfx,o=t.ppfx,r=t.config,i=t.$el,s=t.el,a=r.render,l={iconSync:r.iconSync,iconAdd:r.iconAdd,labelHead:e.t('selectorManager.label'),labelInfo:e.t('selectorManager.selected'),ppfx:o,pfx:n,el:s};i.html(this.template(l));var c=a&&a(l);return c&&c!==s&&i.empty().append(c),this.$input=i.find('[data-input]'),this.$addBtn=i.find('[data-add]'),this.$classes=i.find('#'+n+'tags-c'),this.$btnSyncEl=i.find('[data-sync-style]'),this.$input.hide(),this.renderStates(),this.renderClasses(),i.attr('class',"".concat(this.className," ").concat(o,"one-bg ").concat(o,"two-color")),this},n}(u.G7);const qi=$i;var Gi,Ki,Yi,Xi,Ji,Zi=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Qi=void 0&&(void 0).__assign||function(){return Qi=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0})):e.slice(1).reduce((function(e,n){return t.__common(e,n)}),e[0]):[]},o.prototype.__updateSelectedByComponents=function(){this.selected.reset(this.__getCommon())},o}(b);const fs=ds;const hs={textTags:['br','b','i','u','a','ul','ol'],parserCss:void 0,parserHtml:void 0,optionsHtml:{htmlType:'text/html',allowScripts:!1,allowUnsafeAttr:!1,keepEmptyTextNodes:!1}};var gs={4:'media',5:'font-face',6:'page',7:'keyframes',11:'counter-style',12:'supports',13:'document',14:'font-feature-values',15:'viewport'},vs=(0,t.keys)(gs),ys=['5','6','11','15'],ms=['font-face','page','counter-style','viewport'],bs=function(t){void 0===t&&(t='');for(var e=[],n=[],o=t.split(','),r=0,i=o.length;r=0&&(o.singleAtRule=!0),l&&(o.atRuleType=l),c&&(o.selectorsAdd=c),u&&(o.mediaText=u),a&&(t[r-1]=s[0],o.state=a,s.splice(s.length-1,1)),o.selectors=t,o.style=e,o},Cs=function(t){for(var e=[],n=t.cssRules||[],o=0,r=n.length;o=0;if(p)a=!0,l=gs[s],c=ws(i);else if(vs.indexOf(s)>=0){var d=Cs(i);c=ws(i);for(var f=0,h=d.length;f0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]").concat(n,"")},o.prototype.templateInput=function(t){var e=this.clsField;return"
    ")},o.prototype.getClbOpts=function(){return{component:this.target,trait:this.model,elInput:this.getInputElem()}},o.prototype.removeView=function(){this.remove(),this.removed()},o.prototype.init=function(){},o.prototype.removed=function(){},o.prototype.onRender=function(t){},o.prototype.onUpdate=function(t){},o.prototype.onEvent=function(t){},o.prototype.onChange=function(e){var n=this.getInputElem();n&&!(0,t.isUndefined)(n.value)&&this.model.set('value',n.value),this.onEvent(ha(ha({},this.getClbOpts()),{event:e}))},o.prototype.getValueForTarget=function(){return this.model.get('value')},o.prototype.setInputValue=function(t){var e=this.getInputElem();e&&(e.value=t)},o.prototype.onValueChange=function(t,e,n){if(void 0===n&&(n={}),n.fromTarget)this.setInputValue(t.get('value')),this.postUpdate();else{var o=this.getValueForTarget();t.setTargetValue(o,n)}},o.prototype.renderLabel=function(){var t=this.$el,e=this.target,n=this.getLabel(),o=this.templateLabel(e);this.createLabel&&(o=this.createLabel({label:n,component:e,trait:this})||''),t.find('[data-label]').append(o)},o.prototype.getLabel=function(){var t=this.em,n=this.model.attributes,o=n.label,r=n.name;return t.t("traitManager.traits.labels.".concat(r))||(0,e.capitalize)(o||r).replace(/-/g,' ')},o.prototype.getComponent=function(){return this.target},o.prototype.getInputEl=function(){if(!this.$input){var e=this.em,n=this.model,o=n,r=n.attributes.name,i=o.get('placeholder')||o.get('default')||'',s=o.get('type')||'text',a=o.get('min'),c=o.get('max'),u=this.getModelValue(),p=(0,l["default"])("")),d=e.t("traitManager.traits.attributes.".concat(r))||{};p.attr(ha({placeholder:i},d)),(0,t.isUndefined)(u)||(o.set({value:u},{silent:!0}),p.prop('value',u)),a&&p.prop('min',a),c&&p.prop('max',c),this.$input=p}return this.$input.get(0)},o.prototype.getInputElem=function(){var t=this.input,e=this.$input;return t||e&&e.get&&e.get(0)||this.getElInput()},o.prototype.getModelValue=function(){var e,n=this.model,o=this.target,r=n.getName();if(n.get('changeProp'))e=o.get(r);else{var i=o.get('attributes');e=n.get('value')||i[r]}return(0,t.isUndefined)(e)?'':e},o.prototype.getElInput=function(){return this.elInput},o.prototype.renderField=function(){var e=this,n=e.$el,o=e.appendInput,r=e.model,i=n.find('[data-input]'),s=i[i.length-1],a=r.el;a||(a=this.createInput?this.createInput(this.getClbOpts()):this.getInputEl()),(0,t.isString)(a)?(s.innerHTML=a,this.elInput=s.firstChild):(o?s.appendChild(a):s.insertBefore(a,s.firstChild),this.elInput=a),r.el=this.elInput},o.prototype.hasLabel=function(){var t=this.model.attributes.label;return!this.noLabel&&!1!==t},o.prototype.rerender=function(){delete this.model.el,this.render()},o.prototype.postUpdate=function(){this.onUpdate(this.getClbOpts())},o.prototype.render=function(){var e=this,n=e.$el,o=e.pfx,r=e.ppfx,i=e.model.attributes,s=i.type,a=i.id,l=this.hasLabel&&this.hasLabel(),c="".concat(o,"trait");delete this.$input;var u="
    \n ").concat(l?"
    "):'',"\n
    \n ").concat(this.templateInput?(0,t.isFunction)(this.templateInput)?this.templateInput(this.getClbOpts()):this.templateInput:'',"\n
    \n
    ");return n.empty().append(u),l&&this.renderLabel(),this.renderField(),this.el.className="".concat(c,"__wrp ").concat(c,"__wrp-").concat(a),this.postUpdate(),this.onRender(this.getClbOpts()),this},o}(u.G7);const va=ga;ga.prototype.eventCapture=['change'];var ya=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ma=function(t){function e(e,n){void 0===e&&(e={});var o=t.call(this,e)||this;o.reuseView=!0,o.itemsView=n;var r=e.config||{},i=e.editor;return o.config=r,o.em=i,o.ppfx=r.pStylePrefix||'',o.pfx=o.ppfx+r.stylePrefix||'',o.className="".concat(o.pfx,"traits"),o.listenTo(i,'component:toggled',o.updatedCollection),o.updatedCollection(),o}return ya(e,t),e.prototype.updatedCollection=function(){var t=this,e=t.ppfx,n=t.className,o=t.em.getSelected();this.el.className="".concat(n," ").concat(e,"one-bg ").concat(e,"two-color"),this.collection=o?o.traits:[],this.render()},e}(da.Z);const ba=ma;ma.prototype.itemView=va;var _a=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const wa=function(e){function n(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.listenTo(n.model,'change:options',n.rerender),n}return _a(n,e),n.prototype.templateInput=function(){var t=this.ppfx,e=this.clsField;return"
    \n
    \n
    \n
    \n
    \n
    ")},n.prototype.getInputEl=function(){if(!this.$input){var e=this.model,n=this.em,o=e.get('name'),r=e.get('options')||[],i=[],s='',this.$input=(0,l["default"])(s);var a=e.getTargetValue(),c=i.indexOf(a)>=0?a:e.get('default');!(0,t.isUndefined)(c)&&this.$input.val(c)}return this.$input.get(0)},n}(va);var xa=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const Ca=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.appendInput=!1,t}return xa(n,e),n.prototype.templateInput=function(){var t=this.ppfx,e=this.clsField;return"")},n.prototype.onChange=function(){this.model.set('value',this.getInputElem().checked)},n.prototype.setInputValue=function(t){var e=this.getInputElem();e&&(e.checked=!!t)},n.prototype.getInputEl=function(){for(var e=[],n=0;n")},e.prototype.inputClass=function(){return"".concat(this.ppfx,"field")},e.prototype.holderClass=function(){return"".concat(this.ppfx,"input-holder")},e.prototype.elementUpdated=function(){this.model.trigger('el:change')},e.prototype.setValue=function(t,e){var n=this.model,o=t||n.get('defaults'),r=this.getInputEl();r&&(r.value=o)},e.prototype.handleModelChange=function(t,e,n){this.setValue(e,n)},e.prototype.handleChange=function(t){t.stopPropagation();var e=this.getInputEl().value;this.__onInputChange(e),this.elementUpdated()},e.prototype.__onInputChange=function(t){this.model.set({value:t},{fromInput:1})},e.prototype.getInputEl=function(){if(!this.inputEl){var t=this.model,e=this.opts.type||'text',n=t.get('placeholder')||t.get('defaults')||t.get('default')||'';this.inputEl=(0,l["default"])(""))}return this.inputEl.get(0)},e.prototype.render=function(){this.inputEl=null;var t=this.$el;return t.addClass(this.inputClass()),t.html(this.template()),t.find(".".concat(this.holderClass())).append(this.getInputEl()),this},e}(u.G7);const Ta=Oa;Oa.prototype.events={change:'handleChange'};var ka=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Ea=function(n){function o(e){void 0===e&&(e={});var o=n.call(this,e)||this;return(0,t.bindAll)(o,'moveIncrement','upIncrement'),o.doc=document,o.listenTo(o.model,'change:unit',o.handleModelChange),o}return ka(o,n),o.prototype.template=function(){var t=this.ppfx;return"\n \n \n
    \n
    \n
    \n
    \n ")},o.prototype.inputClass=function(){var t=this.ppfx;return this.opts.contClass||"".concat(t,"field ").concat(t,"field-integer")},o.prototype.setValue=function(t,e){var n=e||{},o=this.validateInputValue(t,{deepCheck:1}),r={value:o.value,unit:''};(o.unit||o.force)&&(r.unit=o.unit),this.model.set(r,n),n.silent&&this.handleModelChange()},o.prototype.handleChange=function(t){t.stopPropagation(),this.setValue(this.getInputEl().value),this.elementUpdated()},o.prototype.handleUnitChange=function(t){t.stopPropagation();var e=this.getUnitEl().value;this.model.set('unit',e),this.elementUpdated()},o.prototype.handleKeyDown=function(t){'ArrowUp'===t.key&&(t.preventDefault(),this.upArrowClick()),'ArrowDown'===t.key&&(t.preventDefault(),this.downArrowClick())},o.prototype.elementUpdated=function(){this.model.trigger('el:change')},o.prototype.handleModelChange=function(){var t=this.model;this.getInputEl().value=t.get('value');var e=this.getUnitEl();e&&(e.value=t.get('unit')||'')},o.prototype.getUnitEl=function(){if(!this.unitEl){var t=this.model,e=t.get('units')||[];if(e.length){var n=[''];e.forEach((function(e){var o=e==t.get('unit')?'selected':'';n.push(""))}));var o=document.createElement('div');o.innerHTML=""),this.unitEl=o.firstChild}}return this.unitEl},o.prototype.upArrowClick=function(){var t=this.model,e=t.get('step'),n=parseFloat(t.get('value'));this.setValue(this.normalizeValue(n+e)),this.elementUpdated()},o.prototype.downArrowClick=function(){var t=this.model,e=t.get('step'),n=parseFloat(t.get('value'));this.setValue(this.normalizeValue(n-e)),this.elementUpdated()},o.prototype.downIncrement=function(t){t.preventDefault(),this.moved=!1;var n=this.model.get('value')||0;n=this.normalizeValue(n),this.current={y:t.pageY,val:n},(0,e.on)(this.doc,'mousemove',this.moveIncrement),(0,e.on)(this.doc,'mouseup',this.upIncrement)},o.prototype.moveIncrement=function(t){this.moved=!0;var e=this.model,n=e.get('step'),o=this.current,r=this.normalizeValue(o.val+(o.y-t.pageY)*n),i=this.validateInputValue(r),s=i.value,a=i.unit;return this.prValue=s,e.set({value:s,unit:a},{avoidStore:1}),!1},o.prototype.upIncrement=function(){var t=this.model,n=t.get('step');if((0,e.off)(this.doc,'mouseup',this.upIncrement),(0,e.off)(this.doc,'mousemove',this.moveIncrement),this.prValue&&this.moved){var o=this.prValue-n;t.set('value',o,{avoidStore:1}).set('value',o+n),this.elementUpdated()}},o.prototype.normalizeValue=function(t,e){void 0===e&&(e=0);var n=this.model.get('step'),o=0;if(isNaN(t))return e;if(t=parseFloat(t),Math.floor(t)!==t){var r=n.toString().split('.')[1];o=r?r.length:0}return o?parseFloat(t.toFixed(o)):t},o.prototype.validateInputValue=function(e,n){void 0===n&&(n={});var o=0,r=n||{},i=this.model,s='',a=(0,t.isUndefined)(e)?s:e,l=n.units||i.get('units')||[],c=i.get('unit')||l.length&&l[0]||'',u=(0,t.isUndefined)(n.max)?i.get('max'):n.max,p=(0,t.isUndefined)(n.min)?i.get('min'):n.min,d=!!i.get('limitlessMax'),f=!!i.get('limitlessMin');if(r.deepCheck){var h=i.get('fixedValues')||[];if(''===a&&(c=''),a){var g=new RegExp('^'+h.join('|'),'g');if(h.length&&g.test(a))a=a.match(g)[0],c='',o=1;else{var v=a+'';a+='',a=parseFloat(a.replace(',','.')),a=isNaN(a)?s:a;var y=v.replace(a,'');(0,t.indexOf)(l,y)>=0&&(c=y)}}}return d||(0,t.isUndefined)(u)||''===u||(a=a>u?u:a),f||(0,t.isUndefined)(p)||''===p||(a=a","
    ","
    ",''].join(''),l=function(){var t='';if(i)for(var e=1;e<=6;e++)t+="
    ";return["
    '].join('')}(),c='spectrum.id';t.fn.spectrum=function(e,n){if('string'==typeof e){var o=this,i=Array.prototype.slice.call(arguments,1);return this.each((function(){var n=r[t(this).data(c)];if(n){var s=n[e];if(!s)throw new Error("Spectrum: no such method: '"+e+"'");'get'==e?o=n.get():'container'==e?o=n.container:'option'==e?o=n.option.apply(n,i):'destroy'==e?(n.destroy(),t(this).removeData(c)):s.apply(n,i)}})),o}return this.spectrum('destroy').each((function(){var n=T(this,t.extend({},e,t(this).data()));t(this).data(c,n.id)}))},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=A,t.fn.spectrum.defaults=o,t.fn.spectrum.inputTypeColorSupport=function e(){if(void 0===e._cachedResult){var n=t("")[0];e._cachedResult='color'===n.type&&''!==n.value}return e._cachedResult},t.spectrum={},t.spectrum.localization={},t.spectrum.palettes={},t.fn.spectrum.processNativeColorInputs=function(){var e=t('input[type=color]');e.length&&!j()&&e.spectrum({preferredFormat:'hex6'})};var u=/^[\s,#]+/,p=/\s+$/,d=0,f=Math,h=f.round,g=f.min,v=f.max,y=f.random,m=function(t,e){if(e=e||{},(t=t||'')instanceof m)return t;if(!(this instanceof m))return new m(t,e);var n=function(t){var e={r:0,g:0,b:0},n=1,o=!1,r=!1;'string'==typeof t&&(t=function(t){t=t.replace(u,'').replace(p,'').toLowerCase();var e,n=!1;if(x[t])t=x[t],n=!0;else if('transparent'==t)return{r:0,g:0,b:0,a:0,format:'name'};if(e=S.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=S.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=S.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=S.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=S.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=S.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=S.hex8.exec(t))return{a:et(e[1]),r:Z(e[2]),g:Z(e[3]),b:Z(e[4]),format:n?'name':'hex8'};if(e=S.hex6.exec(t))return{r:Z(e[1]),g:Z(e[2]),b:Z(e[3]),format:n?'name':'hex'};if(e=S.hex3.exec(t))return{r:Z(e[1]+''+e[1]),g:Z(e[2]+''+e[2]),b:Z(e[3]+''+e[3]),format:n?'name':'hex'};return!1}(t));'object'==typeof t&&(t.hasOwnProperty('r')&&t.hasOwnProperty('g')&&t.hasOwnProperty('b')?(i=t.r,s=t.g,a=t.b,e={r:255*X(i,255),g:255*X(s,255),b:255*X(a,255)},o=!0,r='%'===String(t.r).substr(-1)?'prgb':'rgb'):t.hasOwnProperty('h')&&t.hasOwnProperty('s')&&t.hasOwnProperty('v')?(t.s=tt(t.s),t.v=tt(t.v),e=function(t,e,n){t=6*X(t,360),e=X(e,100),n=X(n,100);var o=f.floor(t),r=t-o,i=n*(1-e),s=n*(1-r*e),a=n*(1-(1-r)*e),l=o%6,c=[n,s,i,i,a,n][l],u=[a,n,n,s,i,i][l],p=[i,i,a,n,n,s][l];return{r:255*c,g:255*u,b:255*p}}(t.h,t.s,t.v),o=!0,r='hsv'):t.hasOwnProperty('h')&&t.hasOwnProperty('s')&&t.hasOwnProperty('l')&&(t.s=tt(t.s),t.l=tt(t.l),e=function(t,e,n){var o,r,i;function s(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=X(t,360),e=X(e,100),n=X(n,100),0===e)o=r=i=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;o=s(l,a,t+1/3),r=s(l,a,t),i=s(l,a,t-1/3)}return{r:255*o,g:255*r,b:255*i}}(t.h,t.s,t.l),o=!0,r='hsl'),t.hasOwnProperty('a')&&(n=t.a));var i,s,a;return n=Y(n),{ok:o,format:t.format||r,r:g(255,v(e.r,0)),g:g(255,v(e.g,0)),b:g(255,v(e.b,0)),a:n}}(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=h(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=h(this._r)),this._g<1&&(this._g=h(this._g)),this._b<1&&(this._b=h(this._b)),this._ok=n.ok,this._tc_id=d++};m.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},setAlpha:function(t){return this._a=Y(t),this._roundA=h(100*this._a)/100,this},toHsv:function(){var t=L(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=L(this._r,this._g,this._b),e=h(360*t.h),n=h(100*t.s),o=h(100*t.v);return 1==this._a?'hsv('+e+', '+n+'%, '+o+'%)':'hsva('+e+', '+n+'%, '+o+'%, '+this._roundA+')'},toHsl:function(){var t=M(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=M(this._r,this._g,this._b),e=h(360*t.h),n=h(100*t.s),o=h(100*t.l);return 1==this._a?'hsl('+e+', '+n+'%, '+o+'%)':'hsla('+e+', '+n+'%, '+o+'%, '+this._roundA+')'},toHex:function(t){return D(this._r,this._g,this._b,t)},toHexString:function(t){return'#'+this.toHex(t)},toHex8:function(){return N(this._r,this._g,this._b,this._a)},toHex8String:function(){return'#'+this.toHex8()},toRgb:function(){return{r:h(this._r),g:h(this._g),b:h(this._b),a:this._a}},toRgbString:function(){return 1==this._a?'rgb('+h(this._r)+', '+h(this._g)+', '+h(this._b)+')':'rgba('+h(this._r)+', '+h(this._g)+', '+h(this._b)+', '+this._roundA+')'},toPercentageRgb:function(){return{r:h(100*X(this._r,255))+'%',g:h(100*X(this._g,255))+'%',b:h(100*X(this._b,255))+'%',a:this._a}},toPercentageRgbString:function(){return 1==this._a?'rgb('+h(100*X(this._r,255))+'%, '+h(100*X(this._g,255))+'%, '+h(100*X(this._b,255))+'%)':'rgba('+h(100*X(this._r,255))+'%, '+h(100*X(this._g,255))+'%, '+h(100*X(this._b,255))+'%, '+this._roundA+')'},toName:function(){return 0===this._a?'transparent':!(this._a<1)&&(C[D(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e='#'+N(this._r,this._g,this._b,this._a),n=e,o=this._gradientType?'GradientType = 1, ':'';t&&(n=m(t).toHex8String());return'progid:DXImageTransform.Microsoft.gradient('+o+'startColorstr='+e+',endColorstr='+n+')'},toString:function(t){var e=!!t;t=t||this._format;var n=!1,o=this._a<1&&this._a>=0;return e||!o||'hex'!==t&&'hex6'!==t&&'hex3'!==t&&'name'!==t?('rgb'===t&&(n=this.toRgbString()),'prgb'===t&&(n=this.toPercentageRgbString()),'hex'!==t&&'hex6'!==t||(n=this.toHexString()),'hex3'===t&&(n=this.toHexString(!0)),'hex8'===t&&(n=this.toHex8String()),'name'===t&&(n=this.toName()),'hsl'===t&&(n=this.toHslString()),'hsv'===t&&(n=this.toHsvString()),n||this.toHexString()):'name'===t&&0===this._a?this.toName():this.toRgbString()},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(R,arguments)},brighten:function(){return this._applyModification(H,arguments)},darken:function(){return this._applyModification(z,arguments)},desaturate:function(){return this._applyModification(I,arguments)},saturate:function(){return this._applyModification(F,arguments)},greyscale:function(){return this._applyModification(V,arguments)},spin:function(){return this._applyModification(B,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(G,arguments)},complement:function(){return this._applyCombination(U,arguments)},monochromatic:function(){return this._applyCombination(K,arguments)},splitcomplement:function(){return this._applyCombination(q,arguments)},triad:function(){return this._applyCombination(W,arguments)},tetrad:function(){return this._applyCombination($,arguments)}},m.fromRatio=function(t,e){if('object'==typeof t){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]='a'===o?t[o]:tt(t[o]));t=n}return m(t,e)},m.equals=function(t,e){return!(!t||!e)&&m(t).toRgbString()==m(e).toRgbString()},m.random=function(){return m.fromRatio({r:y(),g:y(),b:y()})},m.mix=function(t,e,n){n=0===n?0:n||50;var o,r=m(t).toRgb(),i=m(e).toRgb(),s=n/100,a=2*s-1,l=i.a-r.a,c=1-(o=((o=a*l==-1?a:(a+l)/(1+a*l))+1)/2),u={r:i.r*o+r.r*c,g:i.g*o+r.g*c,b:i.b*o+r.b*c,a:i.a*s+r.a*(1-s)};return m(u)},m.readability=function(t,e){var n=m(t),o=m(e),r=n.toRgb(),i=o.toRgb(),s=n.getBrightness(),a=o.getBrightness(),l=Math.max(r.r,i.r)-Math.min(r.r,i.r)+Math.max(r.g,i.g)-Math.min(r.g,i.g)+Math.max(r.b,i.b)-Math.min(r.b,i.b);return{brightness:Math.abs(s-a),color:l}},m.isReadable=function(t,e){var n=m.readability(t,e);return n.brightness>125&&n.color>500},m.mostReadable=function(t,e){for(var n=null,o=0,r=!1,i=0;i125&&s.color>500,l=3*(s.brightness/125)+s.color/500;(a&&!r||a&&r&&l>o||!a&&!r&&l>o)&&(r=a,o=l,n=m(e[i]))}return n};var b,_,w,x=m.names={aliceblue:'f0f8ff',antiquewhite:'faebd7',aqua:'0ff',aquamarine:'7fffd4',azure:'f0ffff',beige:'f5f5dc',bisque:'ffe4c4',black:'000',blanchedalmond:'ffebcd',blue:'00f',blueviolet:'8a2be2',brown:'a52a2a',burlywood:'deb887',burntsienna:'ea7e5d',cadetblue:'5f9ea0',chartreuse:'7fff00',chocolate:'d2691e',coral:'ff7f50',cornflowerblue:'6495ed',cornsilk:'fff8dc',crimson:'dc143c',cyan:'0ff',darkblue:'00008b',darkcyan:'008b8b',darkgoldenrod:'b8860b',darkgray:'a9a9a9',darkgreen:'006400',darkgrey:'a9a9a9',darkkhaki:'bdb76b',darkmagenta:'8b008b',darkolivegreen:'556b2f',darkorange:'ff8c00',darkorchid:'9932cc',darkred:'8b0000',darksalmon:'e9967a',darkseagreen:'8fbc8f',darkslateblue:'483d8b',darkslategray:'2f4f4f',darkslategrey:'2f4f4f',darkturquoise:'00ced1',darkviolet:'9400d3',deeppink:'ff1493',deepskyblue:'00bfff',dimgray:'696969',dimgrey:'696969',dodgerblue:'1e90ff',firebrick:'b22222',floralwhite:'fffaf0',forestgreen:'228b22',fuchsia:'f0f',gainsboro:'dcdcdc',ghostwhite:'f8f8ff',gold:'ffd700',goldenrod:'daa520',gray:'808080',green:'008000',greenyellow:'adff2f',grey:'808080',honeydew:'f0fff0',hotpink:'ff69b4',indianred:'cd5c5c',indigo:'4b0082',ivory:'fffff0',khaki:'f0e68c',lavender:'e6e6fa',lavenderblush:'fff0f5',lawngreen:'7cfc00',lemonchiffon:'fffacd',lightblue:'add8e6',lightcoral:'f08080',lightcyan:'e0ffff',lightgoldenrodyellow:'fafad2',lightgray:'d3d3d3',lightgreen:'90ee90',lightgrey:'d3d3d3',lightpink:'ffb6c1',lightsalmon:'ffa07a',lightseagreen:'20b2aa',lightskyblue:'87cefa',lightslategray:'789',lightslategrey:'789',lightsteelblue:'b0c4de',lightyellow:'ffffe0',lime:'0f0',limegreen:'32cd32',linen:'faf0e6',magenta:'f0f',maroon:'800000',mediumaquamarine:'66cdaa',mediumblue:'0000cd',mediumorchid:'ba55d3',mediumpurple:'9370db',mediumseagreen:'3cb371',mediumslateblue:'7b68ee',mediumspringgreen:'00fa9a',mediumturquoise:'48d1cc',mediumvioletred:'c71585',midnightblue:'191970',mintcream:'f5fffa',mistyrose:'ffe4e1',moccasin:'ffe4b5',navajowhite:'ffdead',navy:'000080',oldlace:'fdf5e6',olive:'808000',olivedrab:'6b8e23',orange:'ffa500',orangered:'ff4500',orchid:'da70d6',palegoldenrod:'eee8aa',palegreen:'98fb98',paleturquoise:'afeeee',palevioletred:'db7093',papayawhip:'ffefd5',peachpuff:'ffdab9',peru:'cd853f',pink:'ffc0cb',plum:'dda0dd',powderblue:'b0e0e6',purple:'800080',rebeccapurple:'663399',red:'f00',rosybrown:'bc8f8f',royalblue:'4169e1',saddlebrown:'8b4513',salmon:'fa8072',sandybrown:'f4a460',seagreen:'2e8b57',seashell:'fff5ee',sienna:'a0522d',silver:'c0c0c0',skyblue:'87ceeb',slateblue:'6a5acd',slategray:'708090',slategrey:'708090',snow:'fffafa',springgreen:'00ff7f',steelblue:'4682b4',tan:'d2b48c',teal:'008080',thistle:'d8bfd8',tomato:'ff6347',turquoise:'40e0d0',violet:'ee82ee',wheat:'f5deb3',white:'fff',whitesmoke:'f5f5f5',yellow:'ff0',yellowgreen:'9acd32'},C=m.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(x),S=(_='[\\s|\\(]+('+(b='(?:'+'[-\\+]?\\d*\\.\\d+%?'+')|(?:'+'[-\\+]?\\d+%?'+')')+')[,|\\s]+('+b+')[,|\\s]+('+b+')\\s*\\)?',w='[\\s|\\(]+('+b+')[,|\\s]+('+b+')[,|\\s]+('+b+')[,|\\s]+('+b+')\\s*\\)?',{rgb:new RegExp('rgb'+_),rgba:new RegExp('rgba'+w),hsl:new RegExp('hsl'+_),hsla:new RegExp('hsla'+w),hsv:new RegExp('hsv'+_),hsva:new RegExp('hsva'+w),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});window.tinycolor=m,t((function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()}))}function O(e,n,o,r){for(var i=[],a=0;a')}else{i.push(t('
    ').append(t('').attr('title',r.noColorSelectedText)).html())}}return"
    "+i.join('')+'
    '}function T(e,c){var u,p,d,f,h=function(e,n){var r=t.extend({},o,e);return r.callbacks={move:P(r.move,n),change:P(r.change,n),show:P(r.show,n),hide:P(r.hide,n),beforeShow:P(r.beforeShow,n)},r}(c,e),g=h.flat,v=h.showSelectionPalette,y=h.localStorageKey,b=h.theme,_=h.callbacks,w=(u=$t,p=10,function(){var t=this,e=arguments,n=function(){f=null,u.apply(t,e)};d&&clearTimeout(f),!d&&f||(f=setTimeout(n,p))}),x=!1,C=!1,S=!0,T=0,k=0,M=0,L=0,D=0,N=0,I=0,F=0,V=0,R=0,H=1,z=[],B=[],U={},W=h.selectionPalette.slice(0),$=h.maxSelectionSize,q='sp-dragging',G=null,K=e.ownerDocument,Y=(K.body,t(e)),X=!1,J=t(l,K).addClass(b),Z=J.find('.sp-picker-container'),Q=J.find('.sp-color'),tt=J.find('.sp-dragger'),et=J.find('.sp-hue'),nt=J.find('.sp-slider'),ot=J.find('.sp-alpha-inner'),rt=J.find('.sp-alpha'),it=J.find('.sp-alpha-handle'),st=J.find('.sp-input'),at=J.find('.sp-palette'),lt=J.find('.sp-initial'),ct=J.find('.sp-cancel'),ut=J.find('.sp-clear'),pt=J.find('.sp-choose'),dt=J.find('.sp-palette-toggle'),ft=Y.is('input'),ht=ft&&'color'===Y.attr('type')&&j(),gt=ft&&!g,vt=gt?t(a).addClass(b).addClass(h.className).addClass(h.replacerClassName):t([]),yt=gt?vt:Y,mt=vt.find('.sp-preview-inner'),bt=h.color||ft&&Y.val(),_t=!1,wt=h.preferredFormat,xt=!h.showButtons||h.clickoutFiresChange,Ct=!bt,St=h.allowEmpty&&!ht;function Ot(){if(h.showPaletteOnly&&(h.showPalette=!0),dt.text(h.showPaletteOnly?h.togglePaletteMoreText:h.togglePaletteLessText),h.palette){z=h.palette.slice(0),B=t.isArray(z[0])?z:[z],U={};for(var e=0;e1&&(delete window.localStorage[y],t.each(e,(function(t,e){kt(e)})))}catch(t){}try{W=window.localStorage[y].split(';')}catch(t){}}}function kt(e){if(v){var n=m(e).toRgbString();if(!U[n]&&-1===t.inArray(n,W))for(W.push(n);W.length>$;)W.shift();if(y&&window.localStorage)try{window.localStorage[y]=W.join(';')}catch(t){}}}function Et(){var e=Ht(),n=t.map(B,(function(t,n){return O(t,e,'sp-palette-row sp-palette-row-'+n,h)}));Tt(),W&&n.push(O(function(){var t=[];if(h.showPalette)for(var e=0;ef&&f>r?Math.abs(g.left+r-f):0),g.top-=Math.min(g.top,g.top+i>h&&h>i?Math.abs(i+s-o):o),g}(J,yt))),Ut(),h.showPalette&&Et(),Y.trigger('reflow.spectrum'))}function qt(){Ft(),X=!0,Y.attr('disabled',!0),yt.addClass('sp-disabled')}!function(){if(i&&J.find('*:not(input)').attr('unselectable','on'),Ot(),gt&&Y.after(vt).hide(),St||ut.hide(),g)Y.after(J).hide();else{var e='parent'===h.appendTo?Y.parent():t(h.appendTo);1!==e.length&&(e=t('body')),e.append(J)}function n(e){return e.data&&e.data.ignore?(Rt(t(e.target).closest('.sp-thumb-el').data('color')),zt()):(Rt(t(e.target).closest('.sp-thumb-el').data('color')),zt(),h.hideAfterPaletteSelect&&(Wt(!0),Ft())),!1}Tt(),yt.bind('click.spectrum touchstart.spectrum',(function(e){X||Lt(),e.stopPropagation(),t(e.target).is('input')||e.preventDefault()})),(Y.is(':disabled')||!0===h.disabled)&&qt(),J.click(E),st.change(Mt),st.bind('paste',(function(){setTimeout(Mt,1)})),st.keydown((function(t){13==t.keyCode&&Mt()})),ct.text(h.cancelText),ct.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),Vt(),Ft()})),ut.attr('title',h.clearText),ut.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),Ct=!0,zt(),g&&Wt(!0)})),pt.text(h.chooseText),pt.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),i&&st.is(':focus')&&st.trigger('change'),st.hasClass('sp-validation-error')||(Wt(!0),Ft())})),dt.text(h.showPaletteOnly?h.togglePaletteMoreText:h.togglePaletteLessText),dt.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),h.showPaletteOnly=!h.showPaletteOnly,h.showPaletteOnly||g||J.css('left','-='+(Z.outerWidth(!0)+5)),Ot()})),A(rt,(function(t,e,n){H=t/D,Ct=!1,n.shiftKey&&(H=Math.round(10*H)/10),zt()}),At,jt),A(et,(function(t,e){F=parseFloat(e/L),Ct=!1,h.showAlpha||(H=1),zt()}),At,jt),A(Q,(function(t,e,n){if(n.shiftKey){if(!G){var o=V*T,r=k-R*k,i=Math.abs(t-o)>Math.abs(e-r);G=i?'x':'y'}}else G=null;var s=!G||'y'===G;(!G||'x'===G)&&(V=parseFloat(t/T)),s&&(R=parseFloat((k-e)/k)),Ct=!1,h.showAlpha||(H=1),zt()}),At,jt),bt?(Rt(bt),Bt(),wt=h.preferredFormat||m(bt).getFormat(),kt(bt)):Bt(),g&&Dt();var o=i?'mousedown.spectrum':'click.spectrum touchstart.spectrum';at.delegate('.sp-thumb-el',o,n),lt.delegate('.sp-thumb-el:nth-child(1)',o,{ignore:!0},n)}();var Gt={show:Dt,hide:Ft,toggle:Lt,reflow:$t,option:function(e,o){return e===n?t.extend({},h):o===n?h[e]:(h[e]=o,'preferredFormat'===e&&(wt=h.preferredFormat),void Ot())},enable:function(){X=!1,Y.attr('disabled',!1),yt.removeClass('sp-disabled')},disable:qt,offset:function(t){h.offset=t,$t()},set:function(t){Rt(t),Wt()},get:Ht,destroy:function(){Y.show(),yt.unbind('click.spectrum touchstart.spectrum'),J.remove(),vt.remove(),r[Gt.id]=null},container:J};return Gt.id=r.push(Gt)-1,Gt}function k(){}function E(t){t.stopPropagation()}function P(t,e){var n=Array.prototype.slice,o=n.call(arguments,2);return function(){return t.apply(e,o.concat(n.call(arguments)))}}function A(e,n,o,r){n=n||function(){},o=o||function(){},r=r||function(){};var s=document,a=!1,l={},c=0,u=0,p='ontouchstart'in window,d={};function f(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function h(t){if(a){if(i&&s.documentMode<9&&!t.button)return g();var o=t&&t.touches&&t.touches[0],r=o&&o.pageX||t.pageX,d=o&&o.pageY||t.pageY,h=Math.max(0,Math.min(r-l.left,u)),v=Math.max(0,Math.min(d-l.top,c));p&&f(t),n.apply(e,[h,v,t])}}function g(){a&&(t(s).unbind(d),t(s.body).removeClass('sp-dragging'),setTimeout((function(){r.apply(e,arguments)}),0)),a=!1}d['selectstart']=f,d['dragstart']=f,d['touchmove mousemove']=h,d['touchend mouseup']=g,t(e).bind('touchstart mousedown',(function(n){var r=n.which?3==n.which:2==n.button;r||a||!1!==o.apply(e,arguments)&&(a=!0,c=t(e).height(),u=t(e).width(),l=t(e).offset(),t(s).bind(d),t(s.body).addClass('sp-dragging'),h(n),f(n))}))}function j(){return t.fn.spectrum.inputTypeColorSupport()}function M(t,e,n){t=X(t,255),e=X(e,255),n=X(n,255);var o,r,i=v(t,e,n),s=g(t,e,n),a=(i+s)/2;if(i==s)o=r=0;else{var l=i-s;switch(r=a>.5?l/(2-i-s):l/(i+s),i){case t:o=(e-n)/l+(e>1)+720)%360;--e;)o.h=(o.h+r)%360,i.push(m(o));return i}function K(t,e){e=e||6;for(var n=m(t).toHsv(),o=n.h,r=n.s,i=n.v,s=[],a=1/e;e--;)s.push(m({h:o,s:r,v:i})),i=(i+a)%1;return s}function Y(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function X(t,e){(function(t){return'string'==typeof t&&-1!=t.indexOf('.')&&1===parseFloat(t)})(t)&&(t='100%');var n=function(t){return'string'==typeof t&&-1!=t.indexOf('%')}(t);return t=g(e,v(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),f.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function J(t){return g(1,v(0,t))}function Z(t){return parseInt(t,16)}function Q(t){return 1==t.length?'0'+t:''+t}function tt(t){return t<=1&&(t=100*t+'%'),t}function et(t){return Z(t)/255}}(l["default"]);var Da=function(t){var e='name'===t.getFormat()&&t.toName(),n=1==t.getAlpha()?t.toHexString():t.toRgbString();return e||n.replace(/ /g,'')};const Na=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Ma(n,e),n.prototype.template=function(){var t=this.ppfx;return"\n
    \n
    \n
    \n
    \n
    \n
    \n ")},n.prototype.inputClass=function(){var t=this.ppfx;return"".concat(t,"field ").concat(t,"field-color")},n.prototype.holderClass=function(){return"".concat(this.ppfx,"input-holder")},n.prototype.remove=function(){return e.prototype.remove.call(this),this.colorEl.spectrum('destroy'),this},n.prototype.handleChange=function(e){e.stopPropagation();var n=e.target.value;(0,t.isUndefined)(n)||this.__onInputChange(n)},n.prototype.__onInputChange=function(t){var e=this.model,n=this.opts.onChange,o=t,r=this.getColorEl();if(r){r.spectrum('set',o);var i=r.spectrum('get'),s=o&&Da(i);s&&(o=s)}n?n(o):e.set({value:o},{fromInput:1})},n.prototype.setValue=function(e,n){void 0===n&&(n={});var o=this.model,r=(0,t.isUndefined)(n.def)?o.get('defaults'):n.def,i=(0,t.isUndefined)(e)?(0,t.isUndefined)(r)?'':r:e,s=this.getInputEl(),a=this.getColorEl(),l='none'!=i?i:'';s.value=i,a.get(0).style.backgroundColor=l,(n.fromTarget||n.fromInput&&!n.avoidStore)&&(a.spectrum('set',l),this.noneColor='none'==i,this.movedColor=l)},n.prototype.getColorEl=function(){var t=this;if(!this.colorEl){var e=this,n=e.em,o=e.model,r=e.opts,i=this.ppfx,s=r.onChange,a=(0,l["default"])("
    ")),c=a.get(0).style,u=n&&n.config?n.config.el:'',p=n&&n.getConfig&&n.getConfig().colorPicker||{};this.movedColor='';var d,f=!1;this.$el.find('[data-colorp-c]').append(a);var h=function(t,e){void 0===e&&(e=!0),s?s(t,!e):(e&&o.setValueFromInput(0,!1),o.setValueFromInput(t,e))};a.spectrum(La(La(La({color:o.getValue()||!1,containerClassName:"".concat(i,"one-bg ").concat(i,"two-color"),appendTo:u||'body',maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:'Ok',cancelText:'⨯',palette:[]},p),o.get('colorPicker')||{}),{move:function(e){var n=Da(e);t.movedColor=n,c.backgroundColor=n,h(n,!1)},change:function(e){f=!0;var n=Da(e);c.backgroundColor=n,h(n),t.noneColor=!1},show:function(e){f=!1,t.movedColor='',d=s?o.getValue({noDefault:!0}):Da(e)},hide:function(){f||!d&&!s||(t.noneColor&&(d=''),c.backgroundColor=d,a.spectrum('set',d),h(d,!1))}})),n&&n.on&&this.listenTo(n,'component:selected',(function(){t.movedColor&&h(t.movedColor),f=!0,t.movedColor='',a.spectrum('hide')})),this.colorEl=a}return this.colorEl},n.prototype.render=function(){return Ta.prototype.render.call(this),this.getColorEl(),this},n}(Ta);var Ia=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const Fa=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ia(e,t),e.prototype.templateInput=function(){return''},e.prototype.getInputEl=function(){if(!this.input){var t=this.model,e=this.getModelValue(),n=new Na({model:t,target:this.config.em,contClass:this.ppfx+'field-color',ppfx:this.ppfx}).render();n.setValue(e,{fromTarget:1}),this.input=n.el}return this.input},e}(va);var Va=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Ra=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Va(n,e),n.prototype.templateInput=function(){return''},n.prototype.onChange=function(){this.handleClick()},n.prototype.handleClick=function(){var e=this.model,n=this.em,o=e.get('command');o&&((0,t.isString)(o)?n.Commands.run(o):o(n.Editor,e))},n.prototype.renderLabel=function(){this.model.get('label')&&va.prototype.renderLabel.apply(this)},n.prototype.getInputEl=function(){var t=this.model,e=this.ppfx,n=t.props(),o=n.labelButton,r=n.text,i=n.full,s=o||r,a="".concat(e,"btn");return"")},n}(va);const Ha=Ra;Ra.prototype.eventCapture=['click button'];var za=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Ba='trait',Ua="".concat(Ba,":"),Wa="".concat(Ua,"custom"),$a={text:va,number:ja,select:wa,checkbox:Ca,color:Fa,button:Ha},qa=function(e){function n(n){var o=e.call(this,n,'TraitManager',pa)||this;o.TraitsView=ba,o.events={all:Ba,custom:Wa};var r=new u.Hn;o.model=r,o.types=$a;var i=(0,t.debounce)((function(){return o.__upSel()}),0);r.listenTo(n,'component:toggled',i);var s=(0,t.debounce)((function(){return o.__onUp()}),0);return r.listenTo(n,'trait:update',s),o}return za(n,e),n.prototype.__upSel=function(){this.select(this.em.getSelected())},n.prototype.__onUp=function(){this.select(this.getSelected())},n.prototype.select=function(t){var e=t?t.getTraits():[];this.model.set({component:t,traits:e}),this.__trgCustom()},n.prototype.getSelected=function(){return this.model.get('component')},n.prototype.getCurrent=function(){return this.model.get('traits')||[]},n.prototype.__trgCustom=function(t){void 0===t&&(t={}),this.__ctn=this.__ctn||t.container,this.em.trigger(this.events.custom,{container:this.__ctn})},n.prototype.postRender=function(){this.__appendTo()},n.prototype.getTraitsViewer=function(){return this.view},n.prototype.addType=function(t,e){var n=this.getType('text');this.types[t]=n.extend(e)},n.prototype.getType=function(t){return this.getTypes()[t]},n.prototype.getTypes=function(){return this.types},n.prototype.render=function(){var t=this.view,e=this.em,n=this.getConfig(),o=t&&t.el;return t=new ba({el:o,collection:[],editor:e,config:n},this.getTypes()),this.view=t,t.el},n.prototype.destroy=function(){this.model.stopListening(),this.model.clear()},n}(m);const Ga=qa;const Ka={stylePrefix:'',appendTo:'',sortable:!0,hidable:!0,hideTextnode:!0,root:'',showWrapper:!0,showHover:!0,scrollCanvas:{behavior:'smooth',block:'nearest'},scrollLayers:{behavior:'auto',block:'nearest'},highlightHover:!0,custom:!1,onInit:function(){},onRender:function(){},extend:{}};var Ya=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Xa=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;n.items=[],n.opt=e;var o=e.config||{};n.config=o,n.parentView=e.parentView;var r=o.stylePrefix||'',i=o.pStylePrefix||'',s=n.collection;n.listenTo(s,'add',n.addTo),n.listenTo(s,'reset resetNavigator',n.render),n.listenTo(s,'remove',n.removeChildren),n.className="".concat(r,"layers");var a=o.em;if(o.sortable&&!n.opt.sorter){var l=a.Utils;n.opt.sorter=new l.Sorter({container:o.sortContainer||n.el,containerSel:".".concat(n.className),itemSel:".".concat(r,"layer"),ignoreViewChildren:1,onEndMove:function(t,e,n){var o=e.getSourceModel();a.setSelected(o,{forceChange:1}),a.trigger("".concat(Ze,":end"),n)},avoidSelectOnEnd:1,nested:1,ppfx:i,pfx:r})}return n.$el.data('collection',s),e.parent&&n.$el.data('model',e.parent),n}return Ya(e,t),e.prototype.removeChildren=function(t){var e=t.viewLayer;e&&(e.remove(),delete t.viewLayer)},e.prototype.addTo=function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},e.prototype.addToCollection=function(t,e,n){var o=this,r=o.parentView,i=o.opt,s=o.config,a=i.ItemView,l=i.opened,c=i.module,u=e||null,p=new a({ItemView:a,level:i.level,model:t,parentView:r,config:s,sorter:i.sorter,opened:l,module:c}),d=p.render().el;if(u)u.appendChild(d);else if(void 0!==n){var f='before';this.$el.children().length==n&&(n--,f='after'),n<0?this.$el.append(d):this.$el.children().eq(n)[f](d)}else this.$el.append(d);return this.items.push(p),d},e.prototype.remove=function(){for(var t=[],e=0;e\n ").concat(x,"\n ").concat(C,"\n "):'',"\n
    \n
    \n
    \n ").concat(S,"\n ").concat(m?"").concat(m,""):'',"\n ").concat(y,"\n
    \n
    \n
    \n
    ").concat(u||'',"
    \n
    ").concat(w||'',"
    \n
    ")},Object.defineProperty(o.prototype,"em",{get:function(){return this.module.em},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"ppfx",{get:function(){return this.em.getConfig().stylePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"pfx",{get:function(){return this.config.stylePrefix},enumerable:!1,configurable:!0}),o.prototype.initComponent=function(){var t=this,e=this.model,n=this.config.onInit,o=e.components();this.listenTo(o,'remove add reset',this.checkChildren),[['change:status',this.updateStatus],['change:open',this.updateOpening],['change:layerable',this.updateLayerable],['change:style:display',this.updateVisibility],['rerender:layer',this.render],['change:name change:custom-name',this.updateName]].forEach((function(n){return t.listenTo(e,n[0],n[1])})),this.$el.data('model',e),this.$el.data('collection',o),e.viewLayer=this,n.bind(this)({component:e,render:this.__render,listenTo:this.listenTo})},o.prototype.updateName=function(){this.getInputName().innerText=this.model.getName()},o.prototype.getVisibilityEl=function(){return this.eyeEl||(this.eyeEl=this.$el.children(".".concat(this.pfx,"layer-vis"))),this.eyeEl},o.prototype.updateVisibility=function(){var t=this,e=t.pfx,n=t.model,o=t.module,r="".concat(e,"layer-hidden"),i=!o.isVisible(n)?'addClass':'removeClass';this.$el[i](r),this.getVisibilityEl()[i]("".concat(e,"layer-off"))},o.prototype.toggleVisibility=function(t){null==t||t.stopPropagation();var e=this.module,n=this.model;e.setVisible(n,!e.isVisible(n))},o.prototype.handleEdit=function(t){null==t||t.stopPropagation();var e=this,n=e.em,o=e.$el,r=e.clsNoEdit,i=e.clsEdit,s=this.getInputName();s[Qa]='true',s.focus(),document.execCommand('selectAll',!1),n.setEditing(!0),o.find(".".concat(this.inputNameCls)).removeClass(r).addClass(i)},o.prototype.handleEditKey=function(t){t.stopPropagation(),((0,e.isEscKey)(t)||(0,e.isEnterKey)(t))&&this.handleEditEnd(t)},o.prototype.handleEditEnd=function(t){null==t||t.stopPropagation();var e=this,n=e.em,o=e.$el,r=e.clsNoEdit,i=e.clsEdit,s=this.getInputName(),a=s.textContent;s.scrollLeft=0,s[Qa]='false',this.setName(a,{component:this.model,propName:'custom-name'}),n.setEditing(!1),o.find(".".concat(this.inputNameCls)).addClass(r).removeClass(i),this.updateName()},o.prototype.setName=function(t,e){var n=e.propName;this.model.set(n,t)},o.prototype.getInputName=function(){return this.inputName||(this.inputName=this.el.querySelector(".".concat(this.inputNameCls))),this.inputName},o.prototype.updateOpening=function(){var t=this,e=t.$el,n=t.model,o=t.pfx,r='open',i="".concat(o,"layer-open"),s=this.getCaret();this.module.isOpen(n)?(e.addClass(r),s.addClass(i)):(e.removeClass(r),s.removeClass(i))},o.prototype.toggleOpening=function(t){var e=this.model,n=this.module;null==t||t.stopImmediatePropagation(),e.get('components').length&&n.setOpen(e,!n.isOpen(e))},o.prototype.handleSelect=function(t){null==t||t.stopPropagation();var e=this.module,n=this.model;e.setLayerData(n,{selected:!0},{event:t})},o.prototype.handleHover=function(t){null==t||t.stopPropagation();var e=this.module,n=this.model;e.setLayerData(n,{hovered:!0})},o.prototype.handleHoverOut=function(t){null==t||t.stopPropagation();var e=this.module,n=this.model;e.setLayerData(n,{hovered:!1})},o.prototype.startSort=function(t){t.stopPropagation();var e=this.em,n=this.sorter;t.button&&0!==t.button||n&&(n.onStart=function(t){return e.trigger("".concat(Ze,":start"),t)},n.onMoveClb=function(t){return e.trigger(Ze,t)},n.startSort(t.target))},o.prototype.updateStatus=function(){fn.prototype.updateStatus.apply(this,[{avoidHover:!this.config.highlightHover,noExtHl:!0}])},o.prototype.checkChildren=function(){var t=this,e=t.model,n=t.clsNoChild,o=t.$el,r=t.module,i=r.getComponents(e).length,s=o.children(".".concat(this.clsTitleC)).children(".".concat(this.clsTitle)),a=this.cnt;a||(a=o.children('[data-count]').get(0),this.cnt=a),s[i?'removeClass':'addClass'](n),a&&(a.innerHTML=i||''),!i&&r.setOpen(e,!1)},o.prototype.getCaret=function(){return this.caret&&this.caret.length||(this.caret=this.$el.children(".".concat(this.clsTitleC)).find(".".concat(this.clsCaret))),this.caret},o.prototype.setRoot=function(n){var o;n=(0,t.isString)(n)?null===(o=this.em.getWrapper())||void 0===o?void 0:o.find(n)[0]:n;var r=(0,e.getModel)(n,0);r&&(this.stopListening(),this.model=r,this.initComponent(),this._rendered&&this.render())},o.prototype.updateLayerable=function(){(this.parentView||this).render()},o.prototype.__clearItems=function(){var t;null===(t=this.items)||void 0===t||t.remove()},o.prototype.remove=function(){for(var t=[],e=0;e\n ").concat(this.getPreview(),"\n
    \n
    \n ").concat(this.getInfo(),"\n
    \n
    \n ⨯\n
    \n ")},n.prototype.updateTarget=function(e){e&&e.set&&(e.set('attributes',(0,t.clone)(e.get('attributes'))),e.set('src',this.model.get('src')))},n.prototype.getPreview=function(){return''},n.prototype.getInfo=function(){return''},n.prototype.render=function(){var t=this.el;return t.innerHTML=this.template(this,this.model),t.className=this.className,this},n}(u.G7);const Cl=xl;var Sl=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Ol=void 0&&(void 0).__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},Tl=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Sl(n,e),n.prototype.getPreview=function(){var t=this,e=t.pfx,n=t.ppfx,o=t.model.get('src');return r(El||(El=Ol(["\n
    \n
    \n "],["\n
    \n
    \n "])),e,o,e,n)},n.prototype.getInfo=function(){var t=this.pfx,e=this.model,n=e.get('name'),o=e.get('width'),i=e.get('height'),s=e.get('unitDim'),a=o&&i?"".concat(o,"x").concat(i).concat(s):'';return n=n||e.getFilename(),r(Pl||(Pl=Ol(["\n
    ","
    \n
    ","
    \n "],["\n
    ","
    \n
    ","
    \n "])),t,n,t,a)},n.prototype.init=function(t){var e=this.pfx;this.className+=" ".concat(e,"asset-image")},n.prototype.onClick=function(){var e=this.model,n=this.pfx,o=this.__getBhv().select,r=this.config.onClick,i=this.collection;i.trigger('deselectAll'),this.$el.addClass(n+'highlight'),(0,t.isFunction)(o)?o(e,!1):(0,t.isFunction)(r)?r(e):this.updateTarget(i.target)},n.prototype.onDblClick=function(){var e=this.em,n=this.model,o=this.__getBhv().select,r=this.config.onDblClick,i=this.collection,s=i.target,a=i.onSelect;(0,t.isFunction)(o)?o(n,!0):(0,t.isFunction)(r)?r(n):(this.updateTarget(s),null==e||e.Modal.close()),(0,t.isFunction)(a)&&a(n)},n.prototype.onRemove=function(t){t.stopImmediatePropagation(),this.model.collection.remove(this.model)},n}(Cl);const kl=Tl;var El,Pl;Tl.prototype.events={'click [data-toggle=asset-remove]':'onRemove',click:'onClick',dblclick:'onDblClick'};var Al=void 0&&(void 0).__assign||function(){return Al=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
    \n \n
    \n \n
    \n \n ")),"\n
    \n
    \n ").concat(r,"\n
    \n
    \n
    \n
    \n ")},e.prototype.handleSubmit=function(t){t.preventDefault();var e=this.getAddInput(),n=e&&e.value.trim(),o=this.config.handleAdd;if(n){e.value='';var r=this.getAssetsEl();r&&(r.scrollTop=0),o?o.bind(this)(n):this.options.globalCollection.add(n,{at:0})}},e.prototype.getAssetsEl=function(){return this.el.querySelector(".".concat(this.pfx,"assets"))},e.prototype.getAddInput=function(){return this.inputUrl&&this.inputUrl.value||(this.inputUrl=this.el.querySelector(".".concat(this.pfx,"add-asset input"))),this.inputUrl},e.prototype.removedAsset=function(t){this.collection.length||this.toggleNoAssets()},e.prototype.addToAsset=function(t){1==this.collection.length&&this.toggleNoAssets(!0),this.addAsset(t)},e.prototype.addAsset=function(t,e){void 0===e&&(e=null);var n=e,o=this.collection,r=this.config,i=new t.typeView({model:t,collection:o,config:r}).render().el;if(n)n.appendChild(i);else{var s=this.getAssetsEl();s&&s.insertBefore(i,s.firstChild)}return i},e.prototype.toggleNoAssets=function(t){void 0===t&&(t=!1);var e=this.$el.find(".".concat(this.pfx,"assets"));if(t)e.empty();else{var n=this.config.noAssets;n&&e.append(n)}},e.prototype.deselectAll=function(){var t=this.pfx;this.$el.find(".".concat(t,"highlight")).removeClass("".concat(t,"highlight"))},e.prototype.renderAssets=function(){var t=this,e=document.createDocumentFragment(),n=this.$el.find(".".concat(this.pfx,"assets"));n.empty(),this.toggleNoAssets(!!this.collection.length),this.collection.each((function(n){return t.addAsset(n,e)})),n.append(e)},e.prototype.render=function(){var t=this.options.fu.render().el;return this.$el.empty(),this.$el.append(t).append(this.template(this)),this.el.className="".concat(this.ppfx,"asset-manager"),this.renderAssets(),this},e}(u.G7);const Vl=Fl;Fl.prototype.events={submit:'handleSubmit'};var Rl=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Hl=void 0&&(void 0).__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},zl=function(t){function e(n){void 0===n&&(n={});var o=t.call(this,n)||this;o.options=n;var r=n.config||{};o.module=n.module,o.config=r,o.em=o.config.em,o.pfx=r.stylePrefix||'',o.ppfx=r.pStylePrefix||'',o.target=o.options.globalCollection||{},o.uploadId=o.pfx+'uploadFile',o.disabled=void 0!==r.disableUpload?r.disableUpload:!r.upload&&!r.embedAsBase64,o.multiUpload=void 0===r.multiUpload||r.multiUpload;var i=r.uploadFile;return i?o.uploadFile=i.bind(o):!r.upload&&r.embedAsBase64&&(o.uploadFile=e.embedAsBase64),o.delegateEvents(),o}return Rl(e,t),e.prototype.template=function(t){var e=t.pfx,n=t.title,o=t.uploadId,i=t.disabled,s=t.multiUpload;return r(Ul||(Ul=Hl(["\n
    \n
    ","
    \n \n
    \n \n "],["\n
    \n
    ","
    \n \n
    \n \n "])),e,n,o,i?'disabled':'',s?'multiple':'')},e.prototype.events=function(){return{'change [data-input]':'uploadFile'}},e.prototype.onUploadStart=function(){var t=this.module;t&&t.__propEv('asset:upload:start')},e.prototype.onUploadEnd=function(t){var e=this.$el,n=this.module;n&&n.__propEv('asset:upload:end',t);var o=e.find('input');o&&o.val('')},e.prototype.onUploadError=function(t){var e=this.module;console.error(t),this.onUploadEnd(t),e&&e.__propEv('asset:upload:error',t)},e.prototype.onUploadResponse=function(t,e){var n,o=this,r=o.module,i=o.config,s=o.target;try{n='string'==typeof t?JSON.parse(t):t}catch(e){n=t}r&&r.__propEv('asset:upload:response',n),i.autoAdd&&s&&s.add(n.data,{at:0}),this.onUploadEnd(t),null==e||e(n)},e.prototype.uploadFile=function(t,e){var n=this,o=t.dataTransfer?t.dataTransfer.files:t.target.files,r=this.config,i=r.beforeUpload;if(!1!==(i&&i(o))){var s=new FormData,a=r.params,l=r.customFetch,c=r.fetchOptions;for(var u in a)s.append(u,a[u]);if(this.multiUpload)for(var p=0;p").concat(o.dropzoneContent,"")),p(),'draggable'in i&&[i,a].forEach((function(t){t.ondragover=d,t.ondragleave=f,t.ondrop=h}))},e.prototype.render=function(){var t=this,e=t.$el,n=t.pfx,o=t.em;return e.html(this.template({title:o&&o.t('assetManager.uploadTitle'),uploadId:this.uploadId,disabled:this.disabled,multiUpload:this.multiUpload,pfx:n})),this.initDrop(),e.attr('class',n+'file-uploader'),this},e.embedAsBase64=function(t,e){var n=this,o=t.dataTransfer?t.dataTransfer.files:t.target.files,r={data:[]};if(FileReader){for(var i=[],s=/^(.+)\/(.+)$/,a=function(t){var e=new Promise((function(e,n){var o=new FileReader;o.addEventListener('load',(function(r){var i,a=t.name,l=s.exec(t.type);if('image'===(i=l?l[1]:t.type)){var c={src:o.result,name:a,type:i,height:0,width:0},u=new Image;u.addEventListener('error',(function(t){n(t)})),u.addEventListener('load',(function(){c.height=u.height,c.width=u.width,e(c)})),u.src=c.src}else e(i?{src:o.result,name:a,type:i}:o.result)})),o.addEventListener('error',(function(t){n(t)})),o.addEventListener('abort',(function(t){n('Aborted')})),o.readAsDataURL(t)}));i.push(e)},l=0,c=o;l0&&(i=e.split('.').reduce((function(e,n){if(!(0,t.isUndefined)(e))return e[n]}),r)),i}},o.prototype._debug=function(t,e){void 0===e&&(e={});var n=this.em,o=this.config;(e.debug||o.debug)&&n&&n.logWarning(t)},o.prototype.destroy=function(){},o}(m);const vc=gc;var yc=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),mc=void 0&&(void 0).__assign||function(){return mc=Object.assign||function(t){for(var e,n=1,o=arguments.length;na+u-e||il+c-e)return 1},o.prototype.getCurrentPos=function(){var t=this.eventMove;return{x:(null==t?void 0:t.pageX)||0,y:(null==t?void 0:t.pageY)||0}},o.prototype.getDim=function(t){var e,n,o,r,i=this.em,s=this.canvasRelative,a=null==i?void 0:i.Canvas,l=a?a.getElementOffsets(t):{};if(s&&i){var c=a.getElementPos(t,{noScroll:1});e=c.top,n=c.left,o=c.height,r=c.width}else{var u=this.offset(t);e=this.relative?t.offsetTop:u.top-(this.wmargin?-1:1)*this.elT,n=this.relative?t.offsetLeft:u.left-(this.wmargin?-1:1)*this.elL,o=t.offsetHeight,r=t.offsetWidth}return{top:e,left:n,height:o,width:r,offsets:l}},o.prototype.getChildrenDim=function(n){var o=this,r=[];if(!n)return r;var i=this.getTargetModel(n);if(i&&i.view&&!this.ignoreViewChildren){var s=i.getCurrentView?i.getCurrentView():i.view;n=s.getChildrenContainer()}return(0,t.each)(n.children,(function(t,i){var s=t,a=(0,e.getModel)(s,l["default"]),c=a&&a.index?a.index():i;if((0,e.isTextNode)(s)||o.matches(s,o.itemSel)){var u,p=o.getDim(s),d=o.direction;u='v'==d||'h'!=d&&o.isInFlow(s,n),p.dir=u,p.el=s,p.indexEl=c,r.push(p)}})),r},o.prototype.nearBorders=function(t,e,n){var o=!1,r=this.borderOffset,i=e||0,s=n||0,a=t.top,l=t.left,c=t.height,u=t.width;return(a+r>s||s>a+c-r||l+r>i||i>l+u-r)&&(o=!0),o},o.prototype.findPosition=function(t,e,n){for(var o,r={index:0,indexEl:0,method:'before'},i=0,s=0,a=0,l=0,c=0,u=0,p=0,d=t.length;ps||a&&c>=a||i&&h+vx&&(_.at=f-1))}i&&(w?(delete _.at,s=v.getView().insertComponent(i,_)):s=g.add(i,_)),delete this.dropContent,delete this.prevTarget}else if(a){var S=h.dropInfo||(null==v?void 0:v.get('droppable')),O=h.dragInfo||(null==y?void 0:y.get('draggable'));!g&&d.push('Target collection not found'),!b&&S&&d.push("Target is not droppable, accepts [".concat(S,"]")),!m&&O&&d.push("Component not draggable, acceptable by [".concat(O,"]")),a.logWarning('Invalid target position',{errors:d,model:y,context:'sorter',target:v})}return null==a||a.trigger('sorter:drag:end',{targetCollection:g,modelToDrop:i,warns:d,validResult:h,dst:n,srcEl:p}),s},o.prototype.rollback=function(t){(0,e.off)(this.getDocuments(),'keydown',this.rollback),27==(t.which||t.keyCode)&&(this.moved=!1,this.endMove())},o}(u.G7);const wc=_c;var xc=void 0&&(void 0).__assign||function(){return xc=Object.assign||function(t){for(var e,n=1,o=arguments.length;nb?v.h=Math.round(v.w/b):v.w=Math.round(v.h*b)}for(var _ in~y.indexOf('l')&&(v.l+=i.w-v.w),~y.indexOf('t')&&(v.t+=i.h-v.h),v){var w=_;v[w]=parseInt("".concat(v[w]),10)}return v}},n}();const Sc=Cc;var Oc=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Tc=void 0&&(void 0).__assign||function(){return Tc=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0&&Nc.splice(o,1),93!=n&&224!=n||(n=91),n in Ac)for(e in Ac[n]=!1,Mc)Mc[e]==n&&(Bc[e]=!1)}function zc(){for(Ec in Ac)Ac[Ec]=!1;for(Ec in Mc)Bc[Ec]=!1}function Bc(t,e,n){var o,r;o=Wc(t),void 0===n&&(n=e,e='all');for(var i=0;i1&&(r=$c(t),t=[t[t.length-1]]),t=t[0],(t=Dc(t))in Pc||(Pc[t]=[]),Pc[t].push({shortcut:o[i],scope:e,method:n,key:o[i],mods:r})}for(Ec in Mc)Bc[Ec]=!1;function Uc(){return jc||'all'}function Wc(t){var e;return''==(e=(t=t.replace(/\s/g,'')).split(','))[e.length-1]&&(e[e.length-2]+=','),e}function $c(t){for(var e=t.slice(0,t.length-1),n=0;n1&&(a=$c(o)),t=o[o.length-1],t=Dc(t),void 0===e&&(e=Uc()),!Pc[t])return;for(r=0;r0,Ac)(!Ac[o]&&Ic(n.mods,+o)>-1||Ac[o]&&-1==Ic(n.mods,+o))&&(i=!1);(0!=n.mods.length||Ac[16]||Ac[18]||Ac[17]||Ac[91])&&!i||!1===n.method(t,n)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}(t)})),qc(t.document,'keyup',Hc),qc(t,'focus',zc)};const Gc=Bc;const Kc={defaults:{'core:undo':{keys:'⌘+z, ctrl+z',handler:'core:undo'},'core:redo':{keys:'⌘+shift+z, ctrl+shift+z',handler:'core:redo'},'core:copy':{keys:'⌘+c, ctrl+c',handler:'core:copy'},'core:paste':{keys:'⌘+v, ctrl+v',handler:'core:paste'},'core:component-next':{keys:'s',handler:'core:component-next'},'core:component-prev':{keys:'w',handler:'core:component-prev'},'core:component-enter':{keys:'d',handler:'core:component-enter'},'core:component-exit':{keys:'a',handler:'core:component-exit'},'core:component-delete':{keys:'backspace, delete',handler:'core:component-delete',opts:{prevent:!0}}}};var Yc=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Xc=void 0&&(void 0).__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,r=0,i=e.length;r\n
    \n
    ").concat(r,"
    \n
    \n
    \n
    \n
    ").concat(o,"
    \n
    \n
    \n \n
    ")},e.prototype.events=function(){return{click:'onClick','click [data-close-modal]':'hide'}},e.prototype.onClick=function(t){this.config.backdrop&&t.target===this.el&&this.hide()},e.prototype.getCollector=function(){return this.$collector||(this.$collector=this.$el.find('.'+this.pfx+'collector')),this.$collector},e.prototype.getContent=function(){var t=this.pfx;return this.$content||(this.$content=this.$el.find(".".concat(t,"content #").concat(t,"c"))),this.$content},e.prototype.getTitle=function(t){return void 0===t&&(t={}),this.$title||(this.$title=this.$el.find('.'+this.pfx+'title')),t.$?this.$title:this.$title.get(0)},e.prototype.updateContent=function(){var t=this.getContent(),e=t.children(),n=this.getCollector(),o=this.model.get('content');e.length&&n.append(e),t.empty().append(o)},e.prototype.updateTitle=function(){var t=this.getTitle({$:!0});t&&t.empty().append(this.model.get('title'))},e.prototype.updateOpen=function(){this.el.style.display=this.model.get('open')?'':'none'},e.prototype.hide=function(){this.model.close()},e.prototype.show=function(){this.model.open()},e.prototype.updateAttr=function(t){var e=this,n=e.pfx,o=e.$el,r=e.el,i=[].slice.call(r.attributes).map((function(t){return t.name}));o.removeAttr(i.join(' ')),o.attr(ou(ou({},t||{}),{class:"".concat(n,"container ").concat(t&&t.class||'').trim()}))},e.prototype.render=function(){var t=this.$el,e=this.model.toJSON();return e.pfx=this.pfx,e.ppfx=this.ppfx,t.html(this.template(e)),this.updateAttr(),this.updateOpen(),this},e}(Pt);var iu=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const su=function(e){function n(n){var o=e.call(this,n,'Modal',Qc)||this;return o.model=new eu(o),o.model.on('change:open',(function(t,e){n.trigger("modal:".concat(e?'open':'close'))})),o.model.on('change',(0,t.debounce)((function(){var e=o._evData(),r=o.config.custom;(0,t.isFunction)(r)&&r(e),n.trigger('modal',e)}),0)),o}return iu(n,e),n.prototype._evData=function(){var e=this,n=this.getTitle(),o=this.getContent(),r=this.model.attributes;return{open:r.open,attributes:r.attributes,title:(0,t.isString)(n)?(0,At.rw)(n):n,content:(0,t.isString)(o)?(0,At.rw)(o):o.get?o.get(0):o,close:function(){e.close()}}},n.prototype.postRender=function(t){var e=t.model.config.el||t.el,n=this.render();n&&(null==e||e.appendChild(n))},n.prototype.open=function(t){void 0===t&&(t={});var e=t.attributes||{};return t.title&&this.setTitle(t.title),t.content&&this.setContent(t.content),this.model.set('attributes',e),this.model.open(),this.modal&&this.modal.updateAttr(e),this},n.prototype.close=function(){return this.model.close(),this},n.prototype.onceClose=function(t){return this.em.once('modal:close',t),this},n.prototype.onceOpen=function(t){return this.em.once('modal:open',t),this},n.prototype.isOpen=function(){return!!this.model.get('open')},n.prototype.setTitle=function(t){return this.model.set('title',t),this},n.prototype.getTitle=function(){return this.model.get('title')},n.prototype.setContent=function(t){return this.model.set('content',' '),this.model.set('content',t),this},n.prototype.getContent=function(){return this.model.get('content')},n.prototype.getContentEl=function(){var t;return null===(t=this.modal)||void 0===t?void 0:t.getContent().get(0)},n.prototype.getModel=function(){return this.model},n.prototype.render=function(){var t;if(!this.config.custom){var e=ru.extend(this.config.extend),n=this.modal&&this.modal.el;return this.modal=new e({el:n,model:this.model,config:this.config}),null===(t=this.modal)||void 0===t?void 0:t.render().el}},n.prototype.destroy=function(){var t;null===(t=this.modal)||void 0===t||t.remove()},n}(m);var au='sw-visibility',lu='export-template',cu='open-sm',uu='open-tm',pu='open-layers',du='open-blocks',fu='fullscreen',hu='preview';const gu={stylePrefix:'pn-',defaults:[{id:'commands',buttons:[{}]},{id:'options',buttons:[{active:!0,id:au,className:'fa fa-square-o',command:'core:component-outline',context:au,attributes:{title:'View components'}},{id:hu,className:'fa fa-eye',command:hu,context:hu,attributes:{title:'Preview'}},{id:fu,className:'fa fa-arrows-alt',command:fu,context:fu,attributes:{title:'Fullscreen'}},{id:lu,className:'fa fa-code',command:lu,attributes:{title:'View code'}}]},{id:'views',buttons:[{id:cu,className:'fa fa-paint-brush',command:cu,active:!0,togglable:!1,attributes:{title:'Open Style Manager'}},{id:uu,className:'fa fa-cog',command:uu,togglable:!1,attributes:{title:'Settings'}},{id:pu,className:'fa fa-bars',command:pu,togglable:!1,attributes:{title:'Open Layer Manager'}},{id:du,className:'fa fa-th-large',command:du,togglable:!1,attributes:{title:'Open Blocks'}}]}]};var vu=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const yu=function(t){function e(e,n){var o=t.call(this,e,n)||this;return o.get('buttons').length&&o.set('buttons',new _u(o.module,o.get('buttons'))),o}return vu(e,t),e.prototype.defaults=function(){return{id:'',label:'',tagName:'span',className:'',command:'',context:'',buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,togglable:!0,runDefaultCommand:!0,stopDefaultCommand:!1,disable:!1}},Object.defineProperty(e.prototype,"className",{get:function(){return this.get('className')},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"command",{get:function(){return this.get('command')},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this.get('active')},set:function(t){this.set('active',t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"togglable",{get:function(){return this.get('togglable')},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"runDefaultCommand",{get:function(){return this.get('runDefaultCommand')},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stopDefaultCommand",{get:function(){return this.get('stopDefaultCommand')},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disable",{get:function(){return this.get('disable')},enumerable:!1,configurable:!0}),e}(x);var mu=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),bu=function(t){function e(e,n){return t.call(this,e,n,yu)||this}return mu(e,t),e.prototype.deactivateAllExceptOne=function(t,e){this.forEach((function(n,o){n!==t&&(n.set('active',!1),e&&n.get('buttons').length&&n.get('buttons').deactivateAllExceptOne(t,e))}))},e.prototype.deactivateAll=function(t,e){var n=t||'';this.forEach((function(t){t.get('context')==n&&t!==e&&t.set('active',!1,{fromCollection:!0})}))},e.prototype.disableAllButtons=function(t){var e=t||'';this.forEach((function(t,n){t.get('context')==e&&t.set('disable',!0)}))},e.prototype.disableAllButtonsExceptOne=function(t,e){this.forEach((function(n,o){n!==t&&(n.set('disable',!0),e&&n.get('buttons').length&&n.get('buttons').disableAllButtonsExceptOne(t,e))}))},e}(S);const _u=bu;bu.prototype.model=yu;var wu=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const xu=function(t){function e(e,n){var o=t.call(this,e,n)||this,r=o.get('buttons')||[];return o.buttons=new _u(e,r),o}return wu(e,t),e.prototype.defaults=function(){return{id:'',content:'',visible:!0,buttons:[],attributes:{}}},Object.defineProperty(e.prototype,"buttons",{get:function(){return this.get('buttons')},set:function(t){this.set('buttons',t)},enumerable:!1,configurable:!0}),e}(x);var Cu=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Su=function(t){function e(e,n){return t.call(this,e,n,xu)||this}return Cu(e,t),e}(S);const Ou=Su;Su.prototype.model=xu;var Tu=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ku=void 0&&(void 0).__assign||function(){return ku=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
    ","
    \n
    \n \n "],["\n
    \n
    ","
    \n
    \n
    \n "])),e,e,n,e,o,e)},e.prototype.initialize=function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix},e.prototype.render=function(){var t,e,n=this,o=n.model,r=n.pfx,i=n.$el,s=o.toJSON(),a=o.get('input')||(null===(e=(t=o).getElement)||void 0===e?void 0:e.call(t));return s.pfx=r,i.html(this.template(s)),i.attr('class',"".concat(r,"editor-c")),i.find("#".concat(r,"code")).append(a),this},e}(u.G7);var rp,ip=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),sp=void 0&&(void 0).__assign||function(){return sp=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0})))return!1;if((0,t.isBoolean)(n))return!0;if((0,t.isArray)(n)&&yp(e).some((function(t){return n.indexOf(t)>=0})))return!0}return!1},on:function(e,n,o){var i=this;!this.beforeCache&&(this.beforeCache=e.previousAttributes());var s=o||n||{};if(s.noUndo&&setTimeout((function(){i.beforeCache=null})),!vp(s)){var a=e.toJSON({fromUndo:r}),l={object:e,before:this.beforeCache,after:a};if(this.beforeCache=null,!(0,t.isEmpty)(a))return l}}}),o.um.changeUndoType('add',{on:function(t,e,n){if(void 0===n&&(n={}),!vp(n)&&o.isRegistered(e))return{object:e,before:void 0,after:t,options:hp(hp({},n),{fromUndo:r})}}}),o.um.changeUndoType('remove',{on:function(t,e,n){if(void 0===n&&(n={}),!vp(n)&&o.isRegistered(e))return{object:e,before:t,after:void 0,options:hp(hp({},n),{fromUndo:r})}}}),o.um.changeUndoType('reset',{undo:function(t,e){t.reset(e,{fromUndo:r})},redo:function(t,e,n){t.reset(n,{fromUndo:r})},on:function(t,e){if(void 0===e&&(e={}),!vp(e)&&o.isRegistered(t))return{object:t,before:e.previousModels,after:gp([],t.models,!0),options:hp(hp({},e),{fromUndo:r})}}}),o.um.on('undo redo',(function(){n.trigger('change:canvasOffset'),n.getSelectedAll().map((function(t){return t.trigger('rerender:layer')}))})),['undo','redo'].forEach((function(t){return o.um.on(t,(function(){return n.trigger(t)}))})),o}return fp(n,e),n.prototype.postLoad=function(){var t=this.config,e=this.em;t.trackSelection&&e&&this.add(e.get('selected'))},n.prototype.add=function(t){return this.um.register(t),this},n.prototype.remove=function(t){return this.um.unregister(t),this},n.prototype.removeAll=function(){return this.um.unregisterAll(),this},n.prototype.start=function(){return this.um.startTracking(),this},n.prototype.stop=function(){return this.um.stopTracking(),this},n.prototype.undo=function(t){void 0===t&&(t=!0);var e=this.em,n=this.um;return!e.isEditing()&&n.undo(t),this},n.prototype.undoAll=function(){return this.um.undoAll(),this},n.prototype.redo=function(t){void 0===t&&(t=!0);var e=this.em,n=this.um;return!e.isEditing()&&n.redo(t),this},n.prototype.redoAll=function(){return this.um.redoAll(),this},n.prototype.hasUndo=function(){return!!this.um.isAvailable('undo')},n.prototype.hasRedo=function(){return!!this.um.isAvailable('redo')},n.prototype.isRegistered=function(t){return!!this.getInstance().objectRegistry.isRegistered(t)},n.prototype.getStack=function(){return this.um.stack},n.prototype.getStackGroup=function(){var t=[],e=[];return this.getStack().forEach((function(n){var o=n.get('magicFusionIndex');e.indexOf(o)<0&&(e.push(o),t.push(n))})),t},n.prototype.skip=function(t){this.stop(),t(),this.start()},n.prototype.getGroupedStack=function(){var e={},n=this.getStack();return n.forEach((function(t,n){var o=t.get('magicFusionIndex'),r=function(t,e){var n=t.attributes,o=n.type,r=n.after,i=n.before,s=n.object,a=n.options;return{index:e,type:o,after:r,before:i,object:s,options:void 0===a?{}:a}}(t,n);e[o]?e[o].push(r):e[o]=[r]})),Object.keys(e).map((function(n){var o=e[n];return{index:o[o.length-1].index,actions:o,labels:(0,t.unique)(o.reduce((function(t,e){var n,o=null===(n=e.options)||void 0===n?void 0:n.action;return o&&t.push(o),t}),[]))}}))},n.prototype.goToGroup=function(e){var n=this;if(e){var o=this.getPointer(),r=e.index-o;(0,t.times)(Math.abs(r),(function(){n[r<0?'undo':'redo'](!1)}))}},n.prototype.getPointer=function(){return this.getStack().pointer},n.prototype.clear=function(){return this.um.clear(),this},n.prototype.getInstance=function(){return this.um},n.prototype.destroy=function(){this.clear().removeAll()},n}(m);const bp=mp;const _p={stylePrefix:'rte-',adjustToolbar:!0,actions:['bold','italic','underline','strikethrough','link','wrap'],custom:!1};var wp,xp=void 0&&(void 0).__assign||function(){return xp=Object.assign||function(t){for(var e,n=1,o=arguments.length;nB
    ',attributes:{title:'Bold'},result:function(t){return t.exec('bold')}},italic:{name:'italic',icon:'I',attributes:{title:'Italic'},result:function(t){return t.exec('italic')}},underline:{name:'underline',icon:'U',attributes:{title:'Underline'},result:function(t){return t.exec('underline')}},strikethrough:{name:'strikethrough',icon:'S',attributes:{title:'Strike-through'},result:function(t){return t.exec('strikeThrough')}},link:{icon:"\n \n ",name:'link',attributes:{style:'font-size:1.4rem;padding:0 4px 2px;',title:'Link'},state:function(t){return t&&t.selection()&&kp(t)?Sp:Op},result:function(t){kp(t)?t.exec('unlink'):t.insertHTML("").concat(t.selection(),""),{select:!0})}},wrap:{name:'wrap',icon:"\n \n ",attributes:{title:'Wrap for style'},state:function(t){return(null==t?void 0:t.selection())&&kp(t,'SPAN')?Tp:Op},result:function(t){!kp(t,'SPAN')&&t.insertHTML("").concat(t.selection(),""),{select:!0})}}},Ap=function(){function n(e,n,o){void 0===o&&(o={});var r=this;if(this.em=e,this.settings=o,n[Cp])return n[Cp];n[Cp]=this,this.setEl(n),this.updateActiveActions=this.updateActiveActions.bind(this),this.__onKeydown=this.__onKeydown.bind(this),this.__onPaste=this.__onPaste.bind(this);var i=(o.actions||[]).map((function(e){var n=e;return(0,t.isString)(e)?n=xp({},Pp[e]):Pp[e.name]&&(n=xp(xp({},Pp[e.name]),e)),n})),s=i.length?i:Object.keys(Pp).map((function(t){return Pp[t]}));o.classes=xp({actionbar:'actionbar',button:'action',active:'active',disabled:'disabled',inactive:'inactive'},o.classes);var a=o.classes,l=o.actionbar;if(this.actionbar=l,this.classes=a,this.actions=s,!l){if(!this.isCustom(o.module)){var c=o.actionbarContainer;(l=document.createElement('div')).className=a.actionbar,null==c||c.appendChild(l),this.actionbar=l}s.forEach((function(t){return r.addAction(t)}))}return o.styleWithCSS&&this.exec('styleWithCSS'),this}return n.prototype.isCustom=function(t){var e=t||this.em.RichTextEditor;return!(!(null==e?void 0:e.config.custom)&&!(null==e?void 0:e.customRte))},n.prototype.destroy=function(){},n.prototype.setEl=function(t){this.el=t,this.doc=t.ownerDocument},n.prototype.updateActiveActions=function(){var t=this,e=this.getActions();e.forEach((function(e){var n=e.update,o=e.btn,r=t.classes,i=r.active,s=r.inactive,a=r.disabled,l=e.state,c=e.name,u=t.doc,p=wp.INACTIVE;if(o&&(o.className=o.className.replace(i,'').trim(),o.className=o.className.replace(s,'').trim(),o.className=o.className.replace(a,'').trim()),l){var d=l(t,u);if(p=d,o)switch(d){case Sp:o.className+=" ".concat(i);break;case Op:o.className+=" ".concat(s);break;case Tp:o.className+=" ".concat(a)}}else u.queryCommandSupported(c)&&u.queryCommandState(c)&&(o&&(o.className+=" ".concat(i)),p=wp.ACTIVE);e.currentState=p,null==n||n(t,e)})),e.length&&this.em.RichTextEditor.__dbdTrgCustom()},n.prototype.enable=function(t){return this.enabled?this:this.__toggleEffects(!0,t)},n.prototype.disable=function(){return this.__toggleEffects(!1)},n.prototype.__toggleEffects=function(t,n){void 0===t&&(t=!1),void 0===n&&(n={});var o=t?e.on:e.off,r=this.el,i=this.doc,s=this.actionbarEl();if(s&&(s.style.display=t?'':'none'),r.contentEditable="".concat(!!t),o(r,'mouseup keyup',this.updateActiveActions),o(i,'keydown',this.__onKeydown),o(i,'paste',this.__onPaste),this.enabled=t,t){var a=n.event;if(this.syncActions(),this.updateActiveActions(),a){var l=null;if(i.caretRangeFromPoint){var c=(0,e.getPointerEvent)(a);l=i.caretRangeFromPoint(c.clientX,c.clientY)}else a.rangeParent&&(l=i.createRange()).setStart(a.rangeParent,a.rangeOffset);var u=i.getSelection();null==u||u.removeAllRanges(),l&&(null==u||u.addRange(l))}r.focus()}return this},n.prototype.__onKeydown=function(t){var e=t,n=this.doc;'Enter'!==e.key||['insertOrderedList','insertUnorderedList'].some((function(t){return n.queryCommandState(t)}))||(n.execCommand('insertLineBreak'),e.preventDefault())},n.prototype.__onPaste=function(t){var e=t.clipboardData||window.clipboardData,n=e.getData('text'),o=e.getData('text/html');if(n&&!o){t.preventDefault();var r=n.replace(/(?:\r\n|\r|\n)/g,'
    ');this.doc.execCommand('insertHTML',!1,r)}},n.prototype.syncActions=function(){var t=this;this.getActions().forEach((function(e){if(t.actionbar&&(!e.state||e.state&&e.state(t,t.doc)>=0)){var n=e.event||'click',o=e.btn;o&&(o["on".concat(n)]=function(){e.result(t,e),t.updateActiveActions()})}}))},n.prototype.addAction=function(t,e){void 0===e&&(e={});var n=e.sync,o=this.actionbarEl();if(o){var r=t.icon,i=t.attributes,s=void 0===i?{}:i,a=document.createElement('span');for(var l in a.className=this.classes.button,t.btn=a,s)a.setAttribute(l,s[l]);'string'==typeof r?a.innerHTML=r:a.appendChild(r),o.appendChild(a)}n&&(this.actions.push(t),this.syncActions())},n.prototype.getActions=function(){return this.actions},n.prototype.selection=function(){return this.doc.getSelection()},n.prototype.exec=function(t,e){this.doc.execCommand(t,!1,e)},n.prototype.actionbarEl=function(){return this.actionbar},n.prototype.insertHTML=function(n,o){var r=(void 0===o?{}:o).select,i=this,s=i.em,a=i.doc,l=i.el,c=a.getSelection();if(c&&c.rangeCount){var u=(0,e.getModel)(l),p=a.createElement('div'),d=c.getRangeAt(0);d.deleteContents(),(0,t.isString)(n)?p.innerHTML=n:n&&p.appendChild(n),Array.prototype.slice.call(p.childNodes).forEach((function(t){d.insertNode(t)})),c.removeAllRanges(),c.addRange(d),l.focus(),r&&u&&(u.once('rte:disable',(function(){var t=u.find("[".concat(Ep,"]"))[0];t&&(s.setSelected(t),t.removeAttributes(Ep))})),u.trigger('disable'))}},n}();const jp=Ap;var Mp=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Lp=void 0&&(void 0).__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function s(t){try{l(o.next(t))}catch(t){i(t)}}function a(t){try{l(o["throw"](t))}catch(t){i(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((o=o.apply(t,e||[])).next())}))},Dp=void 0&&(void 0).__generator||function(t,e){var n,o,r,i,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,o&&(r=2&a[0]?o["return"]:a[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;switch(o=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,o=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]=0}))),g=this.get('onChange'),v={property:this,from:p,to:u,value:l,opts:n};i.__trgEv(i.events.propertyUpdate,v),g&&g(v),h&&this.__upTargetsStyle(((o={})[s]=l,o),n)},o.prototype.__upTargetsStyle=function(t,e){var n,o=null===(n=this.em)||void 0===n?void 0:n.get('StyleManager');null==o||o.addStyleTargets(Xp(Xp({},t),{__p:!!e.avoidStore}),e)},o.prototype._up=function(t,e){void 0===e&&(e={}),e.noTarget&&(e.__up=!0);var n=e.partial,o=Jp(e,["partial"]);return t.__p=!(!o.avoidStore&&!n),this.set(t,Xp(Xp({},o),{avoidStore:t.__p}))},o.prototype.up=function(t,e){void 0===e&&(e={}),this.set(t,Xp(Xp({},e),{__up:!0}))},o.prototype.init=function(){},o.prototype.getId=function(){return this.get('id')},o.prototype.getType=function(){return this.get('type')},o.prototype.getName=function(){return this.get('property')},o.prototype.getLabel=function(t){var e;void 0===t&&(t={});var n=t.locale,o=void 0===n||n,r=this.getId(),i=this.get('name')||this.get('label');return o&&(null===(e=this.em)||void 0===e?void 0:e.t("styleManager.properties.".concat(r)))||i},o.prototype.getValue=function(t){void 0===t&&(t={});var e=t.noDefault,n=this.get('value');return this.hasValue()||e?n:this.getDefaultValue()},o.prototype.hasValue=function(e){void 0===e&&(e={});var n=e.noParent&&this.getParentTarget(),o=this.get('value');return!(0,t.isUndefined)(o)&&''!==o&&!n},o.prototype.hasValueParent=function(){return this.hasValue()&&!this.hasValue({noParent:!0})},o.prototype.getStyle=function(t){var n;void 0===t&&(t={});var o=this.getName();return(n={})[t.camelCase?(0,e.camelCase)(o):o]=this.__getFullValue(t),n},o.prototype.getDefaultValue=function(){var e=this.get('default');return"".concat((0,t.isUndefined)(e)?this.get('defaults'):e)},o.prototype.upValue=function(t,e){void 0===e&&(e={});var n=null===t||''===t?this.__getClearProps():this.__parseValue(t,e);return this._up(n,e)},o.prototype.isVisible=function(){return!!this.get('visible')},o.prototype.clear=function(t){return void 0===t&&(t={}),this._up(this.__getClearProps(),Xp(Xp({},t),{__clear:!0})),this},o.prototype.canClear=function(){var t=this.getParent();return t?t.__canClearProp(this):this.hasValue({noParent:!0})},o.prototype.getParent=function(){return this.__getParentProp()},o.prototype.isFull=function(){return!!this.get('full')},o.prototype.__parseValue=function(t,e){return this.parseValue(t,e)},o.prototype.__getClearProps=function(){return{value:''}},o.prototype.setValue=function(t,e,n){void 0===e&&(e=!0),void 0===n&&(n={});var o=this.parseValue(t),r=!e;!r&&this.set({value:void 0},{avoidStore:r,silent:!0}),this.set(o,Xp({avoidStore:r},n))},o.prototype.setValueFromInput=function(t,e,n){void 0===n&&(n={}),this.setValue(t,e,Xp(Xp({},n),{fromInput:1}))},o.prototype.parseValue=function(e,n){void 0===n&&(n={});var o={value:e},r='!important';if((0,t.isString)(e)&&-1!==e.indexOf(r)&&(o.value=e.replace(r,'').trim(),o.important=!0),!this.get('functionName')&&!n.complete)return o;var i=[],s="".concat(o.value),a=s.indexOf('(')+1,l=s.lastIndexOf(')'),c=s.substring(0,a-1);if(c&&(o.functionName=c),i.push(a),l>=0&&i.push(l),o.value=String.prototype.substring.apply(s,i),n.numeric){var u=parseFloat(o.value);o.unit=o.value.replace(u,''),o.value=u}return o},o.prototype.__getFullValue=function(t){var e=(void 0===t?{}:t).withDefault;return!this.hasValue()&&e?this.getDefaultValue():this.getFullValue()},o.prototype.getFullValue=function(e,n){void 0===n&&(n={});var o=this.get('functionName'),r=this.getDefaultValue(),i=(0,t.isUndefined)(e)?this.get('value'):e,s=!(0,t.isUndefined)(i)&&''!==i;if(i&&r&&i===r)return r;if(o&&s){var a='url'===o?"'".concat(i.replace(/'|"/g,''),"'"):i;i="".concat(o,"(").concat(a,")")}return s&&this.get('important')&&!n.skipImportant&&(i="".concat(i," !important")),i||''},o.prototype.__setParentTarget=function(t){this.up({parentTarget:t})},o.prototype.getParentTarget=function(){return this.get('parentTarget')||null},o.prototype.__parseFn=function(t){void 0===t&&(t='');var e=t.indexOf('(')+1,n=t.lastIndexOf(')');return{name:t.substring(0,e-1).trim(),value:String.prototype.substring.apply(t,[e,n>=0?n:void 0]).trim()}},o.prototype.__checkVisibility=function(n){var o=n.target,r=n.component,i=n.sectors,s=r||o;if(!s)return!1;var a=this.getId(),l=this.getName(),c=this.get('toRequire'),u=this.get('requires'),p=this.get('requiresParent'),d=s.get('unstylable'),f=s.get('stylable-require'),h=s.get('stylable');if((0,t.isArray)(h)&&(h=h.indexOf(l)>=0),(0,t.isArray)(d)&&(h=d.indexOf(l)<0),c&&(h=!o||f&&(f.indexOf(a)>=0||f.indexOf(l)>=0)),i&&u){var g=(0,t.keys)(u);i.forEach((function(e){e.getProperties().forEach((function(e){if((0,t.includes)(g,e.id)){var n=u[e.id];h=h&&(0,t.includes)(n,e.get('value'))}}))}))}if(p){var v=r&&r.parent(),y=v&&v.getEl();if(y){var m=(0,e.hasWin)()?window.getComputedStyle(y):{};(0,t.each)(p,(function(e,n){h=h&&m[n]&&(0,t.includes)(e,m[n])}))}else h=!1}return!!h},o}(u.Hn);const td=Qp;Qp.callParentInit=function(t,e,n,o){void 0===o&&(o={}),t.prototype.initialize.apply(e,[n,Xp(Xp({},o),{skipInit:1})])},Qp.callInit=function(t,e,n){void 0===n&&(n={}),!n.skipInit&&t.init(e,n)};var ed=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),nd=void 0&&(void 0).__assign||function(){return nd=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0?t:void 0},o.prototype.selectLayer=function(t){return this.set('selectedLayer',t,{__select:!0})},o.prototype.selectLayerAt=function(t){void 0===t&&(t=0);var e=this.getLayer(t);return e&&this.selectLayer(e)},o.prototype.moveLayer=function(e,n){void 0===n&&(n=0);var o=e?e.getIndex():-1;o>=0&&(0,t.isNumber)(n)&&n>=0&&n0&&!e},o.prototype.clear=function(t){return void 0===t&&(t={}),this.__getLayers().reset(),this.__upTargetsStyleProps(t),td.prototype.clear.call(this),this},o.prototype.__canClearProp=function(){return!1},o}(fd);const _d=bd;var wd=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),xd=void 0&&(void 0).__assign||function(){return xd=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
    \n ")},o.prototype.templateLabel=function(t){var e=this.pfx,n=this.em,o=t.parent,r=t.attributes,i=r.icon,s=void 0===i?'':i,a=r.info,l=void 0===a?'':a,c=null==n?void 0:n.getConfig().icons,u=(null==c?void 0:c.close)||'';return"\n \n ").concat(t.getLabel(),"\n \n ").concat(o?'':"
    ").concat(u,"
    "),"\n ")},o.prototype.templateInput=function(t){return"\n
    \n \n
    \n ")},o.prototype.remove=function(){var t=this;return u.G7.prototype.remove.apply(this,arguments),['em','input','$input','view'].forEach((function(e){return t[e]=null})),this.__destroyFn(this._getClbOpts()),this},o.prototype.updateStatus=function(){var t,e=this,n=e.model,o=e.pfx,r=e.ppfx,i=e.config,s="".concat(r,"four-color"),a="".concat(r,"color-warn"),l=this.$el.children(".".concat(o,"label")),c=this.getClearEl(),u=c?c.style:{};l.removeClass("".concat(s," ").concat(a)),u.display='none',n.hasValue({noParent:!0})&&i.highlightChanged?(l.addClass(s),i.clearProperties&&(u.display='')):n.hasValue()&&i.highlightComputed&&l.addClass(a),null===(t=this.parent)||void 0===t||t.updateStatus()},o.prototype.clear=function(t){t&&t.stopPropagation(),this.model.clear()},o.prototype.getClearEl=function(){return this.clearEl||(this.clearEl=this.el.querySelector("[".concat(Od,"]"))),this.clearEl},o.prototype.inputValueChanged=function(t){t&&t.stopPropagation(),this.emit||this.model.upValue(t.target.value)},o.prototype.onValueChange=function(t,e,n){void 0===n&&(n={}),this.setValue(this.model.getFullValue(void 0,{skipImportant:!0})),this.updateStatus()},o.prototype.setValue=function(e){var n=this.model,o=(0,t.isUndefined)(e)||''===e?n.getDefaultValue():e;if(this.update)return this.__update(o);this.__setValueInput(o)},o.prototype.__setValueInput=function(t){var e=this.getInputEl();e&&(e.value=t)},o.prototype.getInputEl=function(){return this.input||(this.input=this.el.querySelector('input')),this.input},o.prototype.updateVisibility=function(){this.el.style.display=this.model.isVisible()?'':'none'},o.prototype.clearCached=function(){delete this.clearEl,delete this.input,delete this.$input},o.prototype.__unset=function(){var t=this.unset&&this.unset.bind(this);t&&t(this._getClbOpts())},o.prototype.__update=function(t){var e=this.update&&this.update.bind(this);e&&e(xd(xd({},this._getClbOpts()),{value:t}))},o.prototype.__change=function(){for(var t=[],e=0;e\n \n \n ")},e.prototype.remove=function(){var t;return null===(t=this.props)||void 0===t||t.remove(),kd.prototype.remove.apply(this,arguments),this},e.prototype.onValueChange=function(){},e.prototype.onRender=function(){var t=this.pfx,e=this.model,n=e.get('properties');if(n.length&&!this.props){var o=e.isDetached(),r=new Ad({config:Md(Md({},this.config),{highlightComputed:o,highlightChanged:o}),collection:n,parent:this});r.render(),this.$el.find("#".concat(t,"input-holder")).append(r.el),this.props=r}},e.prototype.clearCached=function(){kd.prototype.clearCached.apply(this,arguments),delete this.props},e}(kd);var Dd=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Nd=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Dd(n,e),n.prototype.events=function(){return{click:'select','click [data-close-layer]':'removeItem','mousedown [data-move-layer]':'initSorter','touchstart [data-move-layer]':'initSorter'}},n.prototype.template=function(){var t=this,e=t.pfx,n=t.ppfx,o=t.em,r=null==o?void 0:o.getConfig().icons,i=(null==r?void 0:r.close)||'',s=(null==r?void 0:r.move)||'';return"\n
    \n
    \n ").concat(s,"\n
    \n
    \n
    \n
    \n
    \n
    \n ").concat(i,"\n
    \n
    \n
    \n ")},n.prototype.initialize=function(t){void 0===t&&(t={});var e=this.model,n=t.config||{};this.em=n.em,this.config=n,this.sorter=t.sorter,this.pfx=n.stylePrefix||'',this.ppfx=n.pStylePrefix||'',this.propertyView=t.propertyView;var o=this.propertyView.model;this.listenTo(e,'destroy remove',this.remove),this.listenTo(e,'change:values',this.updateLabel),this.listenTo(o,'change:selectedLayer',this.updateVisibility),e.view=this,e.set({droppable:0,draggable:1}),this.$el.data('model',e)},n.prototype.initSorter=function(){var t;null===(t=this.sorter)||void 0===t||t.startSort(this.el)},n.prototype.removeItem=function(t){t&&t.stopPropagation(),this.model.remove()},n.prototype.select=function(){this.model.select()},n.prototype.getPropertiesWrapper=function(){return this.propsWrapEl||(this.propsWrapEl=this.el.querySelector('[data-properties]')),this.propsWrapEl},n.prototype.getPreviewEl=function(){return this.previewEl||(this.previewEl=this.el.querySelector('[data-preview]')),this.previewEl},n.prototype.getLabelEl=function(){return this.labelEl||(this.labelEl=this.el.querySelector('[data-label]')),this.labelEl},n.prototype.updateLabel=function(){var e=this.model,n=e.getLabel();if(this.getLabelEl().innerHTML=n,e.hasPreview()){var o=this.getPreviewEl(),r=e.getStylePreview({number:{min:-3,max:3}}),i=(0,t.keys)(r).map((function(t){return"".concat(t,":").concat(r[t])})).join(';');o.setAttribute('style',i)}},n.prototype.updateVisibility=function(){var t,e=this,n=e.pfx,o=e.model,r=e.propertyView,i=this.getPropertiesWrapper(),s=o.isSelected();i.style.display=s?'':'none',this.$el[s?'addClass':'removeClass']("".concat(n,"active")),s&&i.appendChild(null===(t=r.props)||void 0===t?void 0:t.el)},n.prototype.render=function(){var t=this,e=t.el,n=t.pfx,o=t.model;return e.innerHTML=this.template(),e.className="".concat(n,"layer"),o.hasPreview()&&(e.querySelector('[data-preview-box]').style.display=''),this.updateLabel(),this.updateVisibility(),this},n}(u.G7);const Id=Nd;var Fd=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Vd=function(t){function e(e){var n=t.call(this,e)||this,o=n.collection,r=e.config||{},i=r.em,s=r.stylePrefix||'',a=r.pStylePrefix||'';n.config=r,n.pfx=s,n.ppfx=a,n.propertyView=e.propertyView,n.className="".concat(s,"layers ").concat(a,"field"),n.listenTo(o,'add',n.addTo),n.listenTo(o,'reset',n.reset),n.items=[];var l=null==i?void 0:i.Utils;return n.sorter=l?new l.Sorter({container:n.el,ignoreViewChildren:1,containerSel:".".concat(s,"layers"),itemSel:".".concat(s,"layer"),pfx:r.pStylePrefix}):'',o.view=n,n.$el.data('model',o),n.$el.data('collection',o),n}return Fd(e,t),e.prototype.addTo=function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},e.prototype.addToCollection=function(t,e,n){var o=e||null,r=this,i=r.propertyView,s=r.config,a=r.sorter,l=r.$el,c=new Id({model:t,config:s,sorter:a,propertyView:i}),u=c.render().el;if(this.items.push(c),o)o.appendChild(u);else if(void 0!==n){var p='before';l.children().length===n&&(n--,p='after'),n<0?l.append(u):l.children().eq(n)[p](u)}else l.append(u);return u},e.prototype.reset=function(t,e){this.clearItems(),this.render()},e.prototype.remove=function(){return this.clearItems(),u.G7.prototype.remove.apply(this,arguments),this},e.prototype.clearItems=function(){this.items.forEach((function(t){return t.remove()})),this.items=[]},e.prototype.render=function(){var t=this,e=this.$el,n=this.sorter,o=document.createDocumentFragment();return e.empty(),this.collection.forEach((function(e){return t.addToCollection(e,o)})),e.append(o),e.attr('class',this.className),n&&(n.plh=null),this},e}(u.G7);const Rd=Vd;var Hd=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),zd=void 0&&(void 0).__assign||function(){return zd=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n \n
    \n \n ")},e.prototype.init=function(){var t=this.model;this.listenTo(t.__getLayers(),'change reset',this.updateStatus)},e.prototype.addLayer=function(){this.model.addLayer({},{at:0})},e.prototype.setValue=function(){},e.prototype.remove=function(){var t;return null===(t=this.layersView)||void 0===t||t.remove(),Ld.prototype.remove.apply(this,arguments),this},e.prototype.clearCached=function(){Ld.prototype.clearCached.apply(this,arguments),delete this.layersView},e.prototype.onRender=function(){var t=this,e=t.model,n=t.el,o=t.config,r=e.get('properties');if(r.length&&!this.props){var i=new Ad({config:zd(zd({},o),{highlightComputed:!1,highlightChanged:!1}),collection:r,parent:this});i.render();var s=new Rd({collection:e.__getLayers(),config:o,propertyView:this});s.render(),n.querySelector('[data-layers-wrapper]').appendChild(s.el),this.props=i,this.layersView=s}},e}(Ld);const Ud=Bd;var Wd=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),$d=void 0&&(void 0).__assign||function(){return $d=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    ").concat(r,"
    \n
    \n \n ")},n.prototype.__setValueInput=function(t){var e=this.model,n=this.el,o=e.getDefaultValue(),r=n.querySelector('[data-preview-box]'),i=n.querySelector('[data-preview]');r.style.display=t&&t!==o?'':'none',i.style.backgroundImage=t||e.getDefaultValue()},n.prototype.openAssetManager=function(){var e,n=this,o=null===(e=this.em)||void 0===e?void 0:e.Assets;null==o||o.open({select:function(e,r){var i=(0,t.isString)(e)?e:e.get('src');n.model.upValue(i,{partial:!r}),r&&o.close()},types:['image'],accept:'image/*'})},n}(kd);var Gd=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const Kd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Gd(e,t),e.prototype.templateInput=function(t){return''},e.prototype.init=function(){var t=this.model;this.listenTo(t,'change:unit',this.onValueChange),this.listenTo(t,'change:units',this.render)},e.prototype.setValue=function(t){},e.prototype.onRender=function(){var t=this,e=t.ppfx,n=t.model,o=t.el;if(!this.inputInst){var r=n.input;r.ppfx=e,r.render(),o.querySelector(".".concat(e,"fields")).appendChild(r.el),this.input=r.inputEl.get(0),this.inputInst=r}},e.prototype.clearCached=function(){kd.prototype.clearCached.apply(this,arguments),this.inputInst=null},e}(kd);var Yd=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const Xd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Yd(e,t),e.prototype.setValue=function(t){var e;null===(e=this.inputInst)||void 0===e||e.setValue(t,{fromTarget:1,def:this.model.getDefaultValue()})},e.prototype.remove=function(){var t=this;Kd.prototype.remove.apply(this,arguments);var e=this.inputInst;return e&&e.remove&&e.remove(),['inputInst','$color'].forEach((function(e){return t[e]=null})),this},e.prototype.__handleChange=function(t,e){this.model.upValue(t,{partial:e})},e.prototype.onRender=function(){var t;if(!this.inputInst){this.__handleChange=this.__handleChange.bind(this);var e=this,n=e.ppfx,o=e.model,r=e.em,i=e.el,s=new Na({target:r,model:o,ppfx:n,onChange:this.__handleChange}).render();i.querySelector(".".concat(n,"fields")).appendChild(s.el),this.input=null===(t=s.inputEl)||void 0===t?void 0:t.get(0),this.inputInst=s}},e}(Kd);var Jd=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Zd=void 0&&(void 0).__assign||function(){return Zd=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n \n
    \n
    \n
    \n \n ")},e.prototype.updateOptions=function(){delete this.input,this.onRender()},e.prototype.onRender=function(){var t=this.pfx,e=this.model,n=e.getOptions();if(!this.input){var o=[];n.forEach((function(t){var n=e.getOptionId(t),r=e.getOptionLabel(n),i=t.style?t.style.replace(/"/g,'"'):'',s=i?"style=\"".concat(i,"\""):'',a=n.replace(/"/g,'"');o.push(""))}));var r=this.el.querySelector("#".concat(t,"input-holder"));r.innerHTML=""),this.input=r.firstChild}},e.prototype.__setValueInput=function(t){var e=this.model,n=this.getInputEl(),o=e.getOptions()[0],r=o?e.getOptionId(o):'';n&&(n.value=t||r)},e}(kd);var of=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),rf=void 0&&(void 0).__assign||function(){return rf=Object.assign||function(t){for(var e,n=1,o=arguments.length;n")},e.prototype.onRender=function(){var t=this.pfx,e=this.ppfx,n=this.model,o="".concat(e,"radio-item-label"),r=n.getName(),i=n.getOptions(),s="".concat(t,"radio ").concat(t,"radio-").concat(r),a=n.cid;if(!this.input){var l=[];i.forEach((function(i){var c=i.className?"".concat(i.className," ").concat(t,"icon ").concat(o):'',u=n.getOptionId(i),p="".concat(r,"-").concat(u,"-").concat(a),d=c?'':n.getOptionLabel(u),f=i.title?"title=\"".concat(i.title,"\""):'',h=n.getValue()===u?'checked':'';l.push("\n
    \n \n \n
    \n "))}));var c=this.el.querySelector(".".concat(e,"field"));c.innerHTML="
    ").concat(l.join(''),"
    "),this.input=c.firstChild}},e.prototype.__setValueInput=function(t){var e,n=this.model,o=t||n.getDefaultValue(),r=null===(e=this.getInputEl())||void 0===e?void 0:e.querySelector("[value=\"".concat(o,"\"]"));r&&(r.checked=!0)},e}(nf);var cf=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),uf=void 0&&(void 0).__assign||function(){return uf=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n \n \n ")},e.prototype.getSliderEl=function(){return this.slider||(this.slider=this.el.querySelector('input[type=range]')),this.slider},e.prototype.inputValueChanged=function(t){t.stopPropagation(),this.model.upValue(this.getSliderEl().value)},e.prototype.inputValueChangedSoft=function(t){t.stopPropagation(),this.model.upValue(this.getSliderEl().value,{partial:!0})},e.prototype.setValue=function(t){var e=this.model,n=e.parseValue(t);this.getSliderEl().value=''===t?e.getDefaultValue():parseFloat(n.value),Kd.prototype.setValue.apply(this,arguments)},e.prototype.onRender=function(){Kd.prototype.onRender.apply(this,arguments),this.model.get('showInput')||(this.inputInst.el.style.display='none')},e.prototype.clearCached=function(){Kd.prototype.clearCached.apply(this,arguments),delete this.slider},e}(Kd);const mf=u.FE.extend(Ml).extend({extendViewApi:1,init:function(){var t=this.opts,e=this.em,n=t.module||(null==e?void 0:e.get('StyleManager'));n&&(n.__listenAdd(this,n.events.propertyAdd),n.__listenRemove(this,n.events.propertyRemove))},types:[{id:'stack',model:_d,view:Ud,isType:function(t){if(t&&'stack'==t.type)return t}},{id:'composite',model:fd,view:Ld,isType:function(t){if(t&&'composite'==t.type)return t}},{id:'file',model:td,view:qd,isType:function(t){if(t&&'file'==t.type)return t}},{id:'color',model:td,view:Xd,isType:function(t){if(t&&'color'==t.type)return t}},{id:'select',model:tf,view:nf,isType:function(t){if(t&&'select'==t.type)return t}},{id:'radio',model:sf,view:lf,isType:function(t){if(t&&'radio'==t.type)return t}},{id:'slider',model:hf,view:yf,isType:function(t){if(t&&'slider'==t.type)return t}},{id:'integer',model:pf,view:Kd,isType:function(t){if(t&&'integer'==t.type)return t}},{id:'number',model:pf,view:Kd,isType:function(t){if(t&&'number'==t.type)return t}},{id:'base',model:td,view:kd,isType:function(t){return t.type='base',t}}]});var bf=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),_f=void 0&&(void 0).__assign||function(){return _f=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
    $","
    \n
    ","
    \n \n "],["\n
    \n
    $","
    \n
    ","
    \n
    \n "])),a,a,s,a,o)},e.prototype.events=function(){return{'click [data-sector-title]':'toggle'}},e.prototype.updateOpen=function(){var t=this,e=t.$el,n=t.model,o=t.pfx,r=n.isOpen();e[r?'addClass':'removeClass']("".concat(o,"open")),this.getPropertiesEl().style.display=r?'':'none'},e.prototype.updateVisibility=function(){this.el.style.display=this.model.isVisible()?'':'none'},e.prototype.getPropertiesEl=function(){var t=this.$el,e=this.pfx;return t.find(".".concat(e,"properties")).get(0)},e.prototype.toggle=function(){var t=this.model;t.setOpen(!t.get('open'))},e.prototype.renderProperties=function(){var t=this.model,e=this.config,n=t.get('properties');if(n){var o=new Ad({collection:n,config:e});this.$el.append(o.render().el)}},e.prototype.render=function(){var t=this,e=t.pfx,n=t.model,o=t.$el,r=n.getId(),i=n.getName();return o.html(this.template({pfx:e,label:i})),this.renderProperties(),o.attr('class',"".concat(e,"sector ").concat(e,"sector__").concat(r," no-select")),this.updateOpen(),this},e}(u.G7);const If=Nf;var Ff,Vf=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Rf=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this,o=e.module,r=e.config,i=n.collection;return n.pfx=(null==r?void 0:r.stylePrefix)||'',n.ppfx=(null==r?void 0:r.pStylePrefix)||'',n.config=r,n.module=o,n.listenTo(i,'add',n.addTo),n.listenTo(i,'reset',n.render),n}return Vf(e,t),e.prototype.remove=function(){var t=this;return u.G7.prototype.remove.apply(this,arguments),['config','module','em'].forEach((function(e){return t[e]={}})),this},e.prototype.addTo=function(t,e,n){void 0===n&&(n={}),this.addToCollection(t,null,n)},e.prototype.addToCollection=function(t,e,n){void 0===n&&(n={});var o=this.config,r=this.el,i=e||r,s=new If({model:t,config:o}).render().el;return(0,At.$Q)(i,s,n.at),s},e.prototype.render=function(){var t=this,e=this,n=e.$el,o=e.pfx,r=e.ppfx;n.empty();var i=document.createDocumentFragment();return this.collection.each((function(e){return t.addToCollection(e,i)})),n.append(i),n.addClass("".concat(o,"sectors ").concat(r,"one-bg ").concat(r,"two-color")),this},e}(u.G7);const Hf=Rf;var zf=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Bf=void 0&&(void 0).__assign||function(){return Bf=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]=e.getStepsBeforeSave()&&this.store().catch((function(e){return t.logError(e)}))},o.prototype.loadModule=function(t){var e=new t(this);return this.set(e.name,e),e.onLoad&&this.toLoad.push(e),this.modules.push(e),e},o.prototype.loadStorableModule=function(t){var e=this.loadModule(t);return this.storables.push(e),e},o.prototype.init=function(t,e){void 0===e&&(e={}),this.destroyed&&(this.initialize(e),this.destroyed=!1),this.set('Editor',t)},o.prototype.getEditor=function(){return this.get('Editor')},o.prototype.handleUpdates=function(t,e,n){var o=this;void 0===n&&(n={}),this.__skip||n.temporary||n.noCount||n.avoidStore||!this.get('ready')||(this.timedInterval&&clearTimeout(this.timedInterval),this.timedInterval=setTimeout((function(){var t=o.getDirtyCount()||0,e=(n.unset,ph(n,["unset"]));o.set('changesCount',t+1,e)}),0))},o.prototype.changesUp=function(t){this.handleUpdates(0,0,t)},o.prototype.componentHovered=function(t,e,n){var o=this.previous('componentHovered');o&&this.trigger('component:unhovered',o,n),e&&this.trigger('component:hovered',e,n)},o.prototype.getSelected=function(){return this.selected.lastComponent()},o.prototype.getSelectedAll=function(){return this.selected.allComponents()},o.prototype.setSelected=function(n,o){var r=this;void 0===o&&(o={});var i=o.event,s=i&&(i.ctrlKey||i.metaKey),a=(i||{}).shiftKey,c=((0,t.isArray)(n)?n:[n]).map((function(t){return(0,e.getModel)(t,l["default"])})),u=this.getSelectedAll(),p=this.getConfig().multipleSelection,d=(0,t.isArray)(n);d&&this.removeSelected(u.filter((function(e){return!(0,t.contains)(c,e)}))),c.forEach((function(n){var i=(0,e.getModel)(n,void 0);if(i&&(r.trigger('component:select:before',i,o),!i.get('selectable')||o.abort)){if(!o.useValid)return;for(var l=i.parent();l&&!l.get('selectable');)l=l.parent();i=l}if(s&&p)return r.toggleSelected(i);if(a&&p){r.clearSelection(r.get('Canvas').getWindow());var c,f,h=i.collection,g=i.index();if(r.getSelectedAll().forEach((function(e){var n=e.collection,o=e.index();n===h&&(og&&(f=(0,t.isUndefined)(f)?o:Math.min(f,o)))})),!(0,t.isUndefined)(c))for(;c!==g;)r.addSelected(h.at(c)),c++;if(!(0,t.isUndefined)(f))for(;f!==g;)r.addSelected(h.at(f)),f--;return r.addSelected(i)}!d&&r.removeSelected(u.filter((function(t){return t!==i}))),r.addSelected(i,o),i}))},o.prototype.addSelected=function(n,o){var r=this;void 0===o&&(o={});var i=(0,e.getModel)(n,l["default"]);((0,t.isArray)(i)?i:[i]).forEach((function(e){var n=r.selected;e&&e.get('selectable')&&!e.parents().some((function(t){return n.hasComponent(t)}))&&(o.forceChange&&r.removeSelected(e,o),n.allComponents().filter((function(n){return(0,t.contains)(n.parents(),e)})).forEach((function(t){return r.removeSelected(t,o)})),n.addComponent(e,o),e&&r.trigger('component:select',e,o))}))},o.prototype.removeSelected=function(t,n){void 0===n&&(n={}),this.selected.removeComponent((0,e.getModel)(t,l["default"]),n)},o.prototype.toggleSelected=function(n,o){var r=this;void 0===o&&(o={});var i=(0,e.getModel)(n,l["default"]);((0,t.isArray)(i)?i:[i]).forEach((function(t){r.selected.hasComponent(t)?r.removeSelected(t,o):r.addSelected(t,o)}))},o.prototype.setHovered=function(t,n){if(void 0===n&&(n={}),!t)return this.set('componentHovered','');var o='component:hover',r=(0,e.getModel)(t,void 0);if(r){if(n.forceChange&&this.set('componentHovered',''),this.trigger("".concat(o,":before"),r,n),!r.get('hoverable')){if(!n.useValid||n.abort)return;for(var i=r&&r.parent();i&&!i.get('hoverable');)i=i.parent();r=i}n.abort||(this.set('componentHovered',r,n),this.trigger(o,r,n))}},o.prototype.getHovered=function(){return this.get('componentHovered')},o.prototype.setComponents=function(t,e){return void 0===e&&(e={}),this.Components.setComponents(t,e)},o.prototype.getComponents=function(){var t=this.Components,e=this.CodeManager;if(t&&e){var n=t.getComponents();return e.getCode(n,'json')}},o.prototype.setStyle=function(t,e){void 0===e&&(e={});var n=this.Css;return n.clear(e),n.getAll().add(t,e),this},o.prototype.addStyle=function(e,n){void 0===n&&(n={});var o=this.getStyle().add(e,n);return(0,t.isArray)(o)?o:[o]},o.prototype.getStyle=function(){return this.Css.getAll()},o.prototype.setState=function(t){return this.set('state',t),this},o.prototype.getState=function(){return this.get('state')||''},o.prototype.getHtml=function(t){void 0===t&&(t={});var e=this.config,n=e.optsHtml,o=e.jsInHtml?this.getJs(t):'',r=t.component||this.Components.getComponent(),i=r?this.CodeManager.getCode(r,'html',lh(lh({},n),t)):'';return i+=o?" - - -{{- end }} - {{ define "title" -}} {{- /*gotype: dev.tandem.ws/tandem/camper/pkg/campsite/types.typeForm*/ -}} {{ if .Slug}} @@ -49,8 +41,8 @@ + {{ template "error-message" . }} {{- end }}