jodit-pro 4.18.2 → 4.18.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +2 -0
- package/config.js +1 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +30 -18
- package/es2015/jodit.js +465 -131
- package/es2015/jodit.min.js +11 -11
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.css +1 -1
- package/es2015/plugins/autocomplete/autocomplete.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2015/plugins/backup/backup.css +1 -1
- package/es2015/plugins/backup/backup.js +1 -1
- package/es2015/plugins/backup/backup.min.js +1 -1
- package/es2015/plugins/button-generator/button-generator.css +1 -1
- package/es2015/plugins/button-generator/button-generator.js +1 -1
- package/es2015/plugins/button-generator/button-generator.min.js +1 -1
- package/es2015/plugins/change-case/change-case.js +1 -1
- package/es2015/plugins/change-case/change-case.min.js +1 -1
- package/es2015/plugins/chart/chart.css +173 -0
- package/es2015/plugins/chart/chart.js +1479 -0
- package/es2015/plugins/chart/chart.min.css +1 -0
- package/es2015/plugins/chart/chart.min.js +20 -0
- package/es2015/plugins/color-picker/color-picker.css +1 -1
- package/es2015/plugins/color-picker/color-picker.js +1 -1
- package/es2015/plugins/color-picker/color-picker.min.js +1 -1
- package/es2015/plugins/emoji/emoji.css +1 -1
- package/es2015/plugins/emoji/emoji.js +1 -1
- package/es2015/plugins/emoji/emoji.min.js +1 -1
- package/es2015/plugins/export-docs/export-docs.js +1 -1
- package/es2015/plugins/export-docs/export-docs.min.js +1 -1
- package/es2015/plugins/finder/finder.css +1 -1
- package/es2015/plugins/finder/finder.js +1 -1
- package/es2015/plugins/finder/finder.min.js +1 -1
- package/es2015/plugins/google-maps/google-maps.css +1 -1
- package/es2015/plugins/google-maps/google-maps.js +1 -1
- package/es2015/plugins/google-maps/google-maps.min.js +1 -1
- package/es2015/plugins/google-search/google-search.js +1 -1
- package/es2015/plugins/google-search/google-search.min.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2015/plugins/keyboard/keyboard.css +1 -1
- package/es2015/plugins/keyboard/keyboard.js +1 -1
- package/es2015/plugins/keyboard/keyboard.min.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2015/plugins/page-break/page-break.js +1 -1
- package/es2015/plugins/page-break/page-break.min.js +1 -1
- package/es2015/plugins/paste-code/paste-code.css +1 -1
- package/es2015/plugins/paste-code/paste-code.js +1 -1
- package/es2015/plugins/paste-code/paste-code.min.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2015/plugins/style/style.css +1 -1
- package/es2015/plugins/style/style.js +1 -1
- package/es2015/plugins/style/style.min.js +1 -1
- package/es2015/plugins/templates/templates.css +1 -1
- package/es2015/plugins/templates/templates.js +1 -1
- package/es2015/plugins/templates/templates.min.js +1 -1
- package/es2015/plugins/todo-list/todo-list.css +1 -1
- package/es2015/plugins/todo-list/todo-list.js +1 -1
- package/es2015/plugins/todo-list/todo-list.min.js +1 -1
- package/es2015/plugins/translate/translate.css +1 -1
- package/es2015/plugins/translate/translate.js +1 -1
- package/es2015/plugins/translate/translate.min.js +1 -1
- package/es2015/plugins/tune-block/tune-block.css +1 -1
- package/es2015/plugins/tune-block/tune-block.js +2 -1
- package/es2015/plugins/tune-block/tune-block.min.js +2 -2
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +75 -63
- package/es2018/jodit.min.js +9 -9
- package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/chart/chart.min.css +1 -0
- package/es2018/plugins/chart/chart.min.js +20 -0
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +1 -1
- package/es2018/plugins/finder/finder.min.js +1 -1
- package/es2018/plugins/google-maps/google-maps.min.js +1 -1
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2018/plugins/style/style.min.js +1 -1
- package/es2018/plugins/templates/templates.min.js +1 -1
- package/es2018/plugins/todo-list/todo-list.min.js +1 -1
- package/es2018/plugins/translate/translate.min.js +1 -1
- package/es2018/plugins/tune-block/tune-block.min.js +2 -2
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +32 -20
- package/es2021/jodit.js +417 -131
- package/es2021/jodit.min.js +16 -16
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021/plugins/backup/backup.css +1 -1
- package/es2021/plugins/backup/backup.js +1 -1
- package/es2021/plugins/backup/backup.min.js +1 -1
- package/es2021/plugins/button-generator/button-generator.css +1 -1
- package/es2021/plugins/button-generator/button-generator.js +1 -1
- package/es2021/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021/plugins/change-case/change-case.js +1 -1
- package/es2021/plugins/change-case/change-case.min.js +1 -1
- package/es2021/plugins/chart/chart.css +173 -0
- package/es2021/plugins/chart/chart.js +1424 -0
- package/es2021/plugins/chart/chart.min.css +1 -0
- package/es2021/plugins/chart/chart.min.js +20 -0
- package/es2021/plugins/color-picker/color-picker.css +1 -1
- package/es2021/plugins/color-picker/color-picker.js +1 -1
- package/es2021/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021/plugins/emoji/emoji.css +1 -1
- package/es2021/plugins/emoji/emoji.js +1 -1
- package/es2021/plugins/emoji/emoji.min.js +1 -1
- package/es2021/plugins/export-docs/export-docs.js +1 -1
- package/es2021/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021/plugins/finder/finder.css +1 -1
- package/es2021/plugins/finder/finder.js +1 -1
- package/es2021/plugins/finder/finder.min.js +1 -1
- package/es2021/plugins/google-maps/google-maps.css +1 -1
- package/es2021/plugins/google-maps/google-maps.js +1 -1
- package/es2021/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021/plugins/google-search/google-search.js +1 -1
- package/es2021/plugins/google-search/google-search.min.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2021/plugins/keyboard/keyboard.css +1 -1
- package/es2021/plugins/keyboard/keyboard.js +1 -1
- package/es2021/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021/plugins/page-break/page-break.js +1 -1
- package/es2021/plugins/page-break/page-break.min.js +1 -1
- package/es2021/plugins/paste-code/paste-code.css +1 -1
- package/es2021/plugins/paste-code/paste-code.js +1 -1
- package/es2021/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021/plugins/style/style.css +1 -1
- package/es2021/plugins/style/style.js +1 -1
- package/es2021/plugins/style/style.min.js +1 -1
- package/es2021/plugins/templates/templates.css +1 -1
- package/es2021/plugins/templates/templates.js +1 -1
- package/es2021/plugins/templates/templates.min.js +1 -1
- package/es2021/plugins/todo-list/todo-list.css +1 -1
- package/es2021/plugins/todo-list/todo-list.js +1 -1
- package/es2021/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021/plugins/translate/translate.css +1 -1
- package/es2021/plugins/translate/translate.js +1 -1
- package/es2021/plugins/translate/translate.min.js +1 -1
- package/es2021/plugins/tune-block/tune-block.css +1 -1
- package/es2021/plugins/tune-block/tune-block.js +2 -1
- package/es2021/plugins/tune-block/tune-block.min.js +2 -2
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +32 -20
- package/es2021.en/jodit.js +417 -131
- package/es2021.en/jodit.min.js +16 -16
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021.en/plugins/backup/backup.css +1 -1
- package/es2021.en/plugins/backup/backup.js +1 -1
- package/es2021.en/plugins/backup/backup.min.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.css +1 -1
- package/es2021.en/plugins/button-generator/button-generator.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021.en/plugins/change-case/change-case.js +1 -1
- package/es2021.en/plugins/change-case/change-case.min.js +1 -1
- package/es2021.en/plugins/chart/chart.css +173 -0
- package/es2021.en/plugins/chart/chart.js +1424 -0
- package/es2021.en/plugins/chart/chart.min.css +1 -0
- package/es2021.en/plugins/chart/chart.min.js +20 -0
- package/es2021.en/plugins/color-picker/color-picker.css +1 -1
- package/es2021.en/plugins/color-picker/color-picker.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021.en/plugins/emoji/emoji.css +1 -1
- package/es2021.en/plugins/emoji/emoji.js +1 -1
- package/es2021.en/plugins/emoji/emoji.min.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021.en/plugins/finder/finder.css +1 -1
- package/es2021.en/plugins/finder/finder.js +1 -1
- package/es2021.en/plugins/finder/finder.min.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.css +1 -1
- package/es2021.en/plugins/google-maps/google-maps.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021.en/plugins/google-search/google-search.js +1 -1
- package/es2021.en/plugins/google-search/google-search.min.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.css +1 -1
- package/es2021.en/plugins/keyboard/keyboard.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021.en/plugins/page-break/page-break.js +1 -1
- package/es2021.en/plugins/page-break/page-break.min.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.css +1 -1
- package/es2021.en/plugins/paste-code/paste-code.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021.en/plugins/style/style.css +1 -1
- package/es2021.en/plugins/style/style.js +1 -1
- package/es2021.en/plugins/style/style.min.js +1 -1
- package/es2021.en/plugins/templates/templates.css +1 -1
- package/es2021.en/plugins/templates/templates.js +1 -1
- package/es2021.en/plugins/templates/templates.min.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.css +1 -1
- package/es2021.en/plugins/todo-list/todo-list.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021.en/plugins/translate/translate.css +1 -1
- package/es2021.en/plugins/translate/translate.js +1 -1
- package/es2021.en/plugins/translate/translate.min.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.css +1 -1
- package/es2021.en/plugins/tune-block/tune-block.js +2 -1
- package/es2021.en/plugins/tune-block/tune-block.min.js +2 -2
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +529 -135
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.css +1 -1
- package/es5/plugins/autocomplete/autocomplete.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es5/plugins/backup/backup.css +1 -1
- package/es5/plugins/backup/backup.js +1 -1
- package/es5/plugins/backup/backup.min.js +1 -1
- package/es5/plugins/button-generator/button-generator.css +1 -1
- package/es5/plugins/button-generator/button-generator.js +1 -1
- package/es5/plugins/button-generator/button-generator.min.js +1 -1
- package/es5/plugins/change-case/change-case.js +1 -1
- package/es5/plugins/change-case/change-case.min.js +1 -1
- package/es5/plugins/chart/chart.css +173 -0
- package/es5/plugins/chart/chart.js +1661 -0
- package/es5/plugins/chart/chart.min.css +1 -0
- package/es5/plugins/chart/chart.min.js +8 -0
- package/es5/plugins/color-picker/color-picker.css +1 -1
- package/es5/plugins/color-picker/color-picker.js +1 -1
- package/es5/plugins/color-picker/color-picker.min.js +1 -1
- package/es5/plugins/emoji/emoji.css +1 -1
- package/es5/plugins/emoji/emoji.js +1 -1
- package/es5/plugins/emoji/emoji.min.js +1 -1
- package/es5/plugins/export-docs/export-docs.js +1 -1
- package/es5/plugins/export-docs/export-docs.min.js +1 -1
- package/es5/plugins/finder/finder.css +1 -1
- package/es5/plugins/finder/finder.js +1 -1
- package/es5/plugins/finder/finder.min.js +1 -1
- package/es5/plugins/google-maps/google-maps.css +1 -1
- package/es5/plugins/google-maps/google-maps.js +1 -1
- package/es5/plugins/google-maps/google-maps.min.js +1 -1
- package/es5/plugins/google-search/google-search.js +1 -1
- package/es5/plugins/google-search/google-search.min.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es5/plugins/keyboard/keyboard.css +1 -1
- package/es5/plugins/keyboard/keyboard.js +1 -1
- package/es5/plugins/keyboard/keyboard.min.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es5/plugins/page-break/page-break.js +1 -1
- package/es5/plugins/page-break/page-break.min.js +1 -1
- package/es5/plugins/paste-code/paste-code.css +1 -1
- package/es5/plugins/paste-code/paste-code.js +1 -1
- package/es5/plugins/paste-code/paste-code.min.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es5/plugins/style/style.css +1 -1
- package/es5/plugins/style/style.js +1 -1
- package/es5/plugins/style/style.min.js +1 -1
- package/es5/plugins/templates/templates.css +1 -1
- package/es5/plugins/templates/templates.js +1 -1
- package/es5/plugins/templates/templates.min.js +1 -1
- package/es5/plugins/todo-list/todo-list.css +1 -1
- package/es5/plugins/todo-list/todo-list.js +1 -1
- package/es5/plugins/todo-list/todo-list.min.js +1 -1
- package/es5/plugins/translate/translate.css +1 -1
- package/es5/plugins/translate/translate.js +1 -1
- package/es5/plugins/translate/translate.min.js +1 -1
- package/es5/plugins/tune-block/tune-block.css +1 -1
- package/es5/plugins/tune-block/tune-block.js +2 -1
- package/es5/plugins/tune-block/tune-block.min.js +2 -2
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/config.d.ts +27 -1
- package/esm/plugins/all.js +1 -1
- package/esm/plugins/chart/assets/chart.svg.js +1 -0
- package/esm/plugins/chart/chart.d.ts +56 -0
- package/esm/plugins/chart/chart.js +1 -0
- package/esm/plugins/chart/config.d.ts +33 -0
- package/esm/plugins/chart/config.js +1 -0
- package/esm/plugins/chart/helpers.d.ts +22 -0
- package/esm/plugins/chart/helpers.js +1 -0
- package/esm/plugins/chart/interface.d.ts +34 -0
- package/esm/plugins/chart/interface.js +0 -0
- package/esm/plugins/chart/render/bar.d.ts +8 -0
- package/esm/plugins/chart/render/bar.js +1 -0
- package/esm/plugins/chart/render/common.d.ts +40 -0
- package/esm/plugins/chart/render/common.js +1 -0
- package/esm/plugins/chart/render/index.d.ts +7 -0
- package/esm/plugins/chart/render/index.js +1 -0
- package/esm/plugins/chart/render/line.d.ts +7 -0
- package/esm/plugins/chart/render/line.js +1 -0
- package/esm/plugins/chart/render/pie.d.ts +7 -0
- package/esm/plugins/chart/render/pie.js +1 -0
- package/esm/plugins/chart/render/radar.d.ts +7 -0
- package/esm/plugins/chart/render/radar.js +1 -0
- package/esm/plugins/chart/ui/editor/editor.d.ts +52 -0
- package/esm/plugins/chart/ui/editor/editor.js +13 -0
- package/esm/plugins/tune-block/config.js +1 -1
- package/package.json +1 -1
- package/types/config.d.ts +27 -1
- package/types/plugins/chart/chart.d.ts +56 -0
- package/types/plugins/chart/config.d.ts +33 -0
- package/types/plugins/chart/helpers.d.ts +22 -0
- package/types/plugins/chart/interface.d.ts +34 -0
- package/types/plugins/chart/render/bar.d.ts +8 -0
- package/types/plugins/chart/render/common.d.ts +40 -0
- package/types/plugins/chart/render/index.d.ts +7 -0
- package/types/plugins/chart/render/line.d.ts +7 -0
- package/types/plugins/chart/render/pie.d.ts +7 -0
- package/types/plugins/chart/render/radar.d.ts +7 -0
- package/types/plugins/chart/ui/editor/editor.d.ts +52 -0
package/es2021/jodit.fat.min.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.18.
|
|
4
|
+
* Version: v4.18.6
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
8
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(self,function(){return function(){var e,t,i={94668:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M13 3H5v18h14V9l-6-6Zm0 0v6h6M12 12v6m-3-3h6"/> </g> </svg>'},86428:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> \x3c!-- Background rounded rect --\x3e <rect x="1" y="1" width="22" height="22" rx="3"/> \x3c!-- Letter A - outer shape --\x3e <polygon points="8,5 2,19 5,19 6.5,16 11.5,16 13,19 16,19 10,5" fill="white"/> \x3c!-- Letter A - inner triangle (hole) --\x3e <polygon points="9,9 7.5,13 10.5,13" fill="currentColor"/> \x3c!-- Letter I --\x3e <rect x="17" y="5" width="3" height="14" fill="white"/> </svg>'},75966:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 17 11-11 4 4L7 21Zm8-8 4 4M5 3v4M3 5h4M19 2v4m-2-2h4m-1 12v4m-2-2h4"/> </g> </svg>'},83207:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m10 6 6 6-6 6"/> </g> </svg>'},99219:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 10 18-7-7 18-3-8-8-3Zm8 3L21 3"/> </g> </svg>'},63674:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 2 4 5v7c0 5 8 10 8 10s8-5 8-10V5l-8-3Z"/> </g> </svg>'},4133:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m13 2-9 12h6l-1 8 11-13h-7V2Z"/> </g> </svg>'},68583:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 4v6h6M3 10l4-4a8 8 0 1 1-1 12M12 8v5l3 2"/> </g> </svg>'},34586:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2" y="5" width="20" height="13" rx="3"/><path d="m11 11 2 11 2-4 4-1-8-6"/> </g> </svg>'},91729:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2 19 8 5l6 14M4.5 13h7M21 12v7m0-5a3 3 0 1 0 0 3"/> </g> </svg>'},46995:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <circle cx="12" cy="12" r="9"/><path d="M8 9h0m8 0h0M8 15a5 5 0 0 0 8 0"/> </g> </svg>'},83556:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M12 5.5v6" fill="none" /> <path d="M9 9l3 3l3 -3" fill="none" /> <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4" fill="none" /> <path d="M2 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1" fill="none" /> <path d="M17 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0" fill="none" /> <path d="M9.5 15a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1 -3 0v-3a1.5 1.5 0 0 1 1.5 -1.5" fill="none" /> <path d="M19.5 15l3 6" fill="none" /> <path d="M19.5 21l3 -6" fill="none" /> </svg>'},4872:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M12 5.5v6" fill="none" /> <path d="M9 9l3 3l3 -3" fill="none" /> <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4" fill="none" /> <path d="M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6" fill="none" /> <path d="M17 18h2" fill="none" /> <path d="M20 15h-3v6" fill="none" /> <path d="M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1" fill="none" /> </svg>'},53121:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 3H5v18h14v-7M12 12l9-9m-6 0h6v6"/> </g> </svg>'},7307:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 21 3.5 12.5a5 5 0 0 1 7-7L12 7l1.5-1.5a5 5 0 0 1 7 7L12 21Z"/> </g> </svg>'},24928:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m2 11 10-8 10 8M5 9v12h5v-7h4v7h5V9"/> </g> </svg>'},96910:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 7V4h6l3 3h9v14H3V7ZM12 11v7m-3.5-3.5h7"/> </g> </svg>'},81122:function(e){e.exports='<svg viewBox="0 0 83 84" fill="none" xmlns="http://www.w3.org/2000/svg"> <circle cx="40" cy="44" r="37" stroke="black" stroke-width="6"/> <path d="M40 4V44H79" stroke="black" stroke-width="5"/> <circle cx="40" cy="6" r="6" fill="#C8C8C8"/> <circle cx="40" cy="43" r="6" fill="#C8C8C8"/> <circle cx="77" cy="44" r="6" fill="#C8C8C8"/> </svg>'},49377:function(e){e.exports='<svg viewBox="0 0 76 76" xmlns="http://www.w3.org/2000/svg"> <path d="M38 6.90909C36.2517 6.90909 34.7591 7.58381 33.5221 8.93324C32.2852 10.2827 31.6667 11.911 31.6667 13.8182V20.7273H30.0833V15.7074C30.0833 13.9801 29.5556 12.5137 28.5 11.3082C27.4444 10.1027 26.125 9.5 24.5417 9.5C23.0243 9.5 21.7214 10.0938 20.6328 11.2813C19.5443 12.4688 19 13.8902 19 15.5455V38.7017L17.4167 37.0824V27.7983C17.4167 26.071 16.8889 24.6046 15.8333 23.3991C14.7778 22.1937 13.4583 21.5909 11.875 21.5909C10.3576 21.5909 9.05469 22.1847 7.96615 23.3722C6.8776 24.5597 6.33333 25.9811 6.33333 27.6364V39.7273C6.33333 41.4186 6.91059 42.8939 8.0651 44.1534L23.4036 60.1307C24.6901 61.5341 25.3333 63.3693 25.3333 65.6364C25.3333 66.572 25.6467 67.3816 26.2734 68.0653C26.9002 68.7491 27.6424 69.0909 28.5 69.0909H60.1667C61.0243 69.0909 61.7665 68.7491 62.3932 68.0653C63.02 67.3816 63.3333 66.572 63.3333 65.6364V64.2869C63.3333 62.8116 63.4983 61.4261 63.8281 60.1307L69.1719 36.5966C69.5017 35.3011 69.6667 33.9157 69.6667 32.4403V19.1619C69.6667 17.4347 69.1389 15.9683 68.0833 14.7628C67.0278 13.5573 65.7083 12.9545 64.125 12.9545C62.6076 12.9545 61.3047 13.5483 60.2161 14.7358C59.1276 15.9233 58.5833 17.3447 58.5833 19V20.7273H57V13.9801C57 12.5407 56.5877 11.2363 55.763 10.0668C54.9384 8.89725 53.8828 8.16856 52.5964 7.88068C52.1345 7.80871 51.7552 7.77273 51.4583 7.77273C49.941 7.77273 48.638 8.36648 47.5495 9.55398C46.4609 10.7415 45.9167 12.1629 45.9167 13.8182V20.7273H44.3333V14.142C44.3333 12.3068 43.7973 10.6965 42.7253 9.31108C41.6532 7.92566 40.2925 7.14299 38.6432 6.96307C38.4783 6.92708 38.2639 6.90909 38 6.90909ZM38 0C40.7708 0 43.2283 0.899621 45.3724 2.69886C47.2526 1.47538 49.2813 0.863636 51.4583 0.863636C53.4045 0.863636 55.2352 1.34943 56.9505 2.32102C58.6658 3.29261 60.0842 4.66004 61.2057 6.4233C62.0964 6.1714 63.0694 6.04545 64.125 6.04545C67.4236 6.04545 70.2274 7.33191 72.5365 9.90483C74.8455 12.4777 76 15.5634 76 19.1619V32.4403C76 34.2756 75.7856 36.2188 75.3568 38.2699L69.9635 61.804C69.7656 62.6676 69.6667 63.9451 69.6667 65.6364C69.6667 68.5152 68.7431 70.9621 66.8958 72.9773C65.0486 74.9924 62.8056 76 60.1667 76H28.5C25.7292 76 23.4531 74.9474 21.6719 72.8423C19.8906 70.7372 19 68.1733 19 65.1506L3.76042 49.1733C1.25347 46.5464 0 43.3977 0 39.7273V27.6364C0 24.0739 1.16276 21.0241 3.48828 18.4872C5.8138 15.9503 8.60938 14.6818 11.875 14.6818C12.2378 14.6818 12.5017 14.6998 12.6667 14.7358C12.8646 11.3172 14.1098 8.43845 16.4023 6.09943C18.6949 3.76042 21.408 2.59091 24.5417 2.59091C26.2569 2.59091 27.8733 2.96875 29.3906 3.72443C31.7656 1.24148 34.6354 0 38 0Z"/> </svg>'},46425:function(e){e.exports='<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> <g> <path d="M23,13.6l5,5V4c0-0.6-0.4-1-1-1h-4V13.6z"/> <polygon points="12.4,3 16.7,7.3 19.7,10.3 21,11.6 21,3"/> <path d="M14.6,8l-5-5H5C4.4,3,4,3.4,4,4v14.6L14.6,8z"/> </g> <path d="M28.8,29.2L26,26.4c0.7-1,1-2.1,1-3.4c0-3.3-2.7-6-6-6s-6,2.7-6,6s2.7,6,6,6c1.2,0,2.4-0.4,3.4-1l2.8,2.8 c0.4,0.4,1.2,0.4,1.6,0C29.2,30.4,29.2,29.6,28.8,29.2z"/> <path d="M13,23c0-4.4,3.6-8,8-8c0.2,0,0.4,0,0.6,0l-0.3-0.3c0,0,0,0,0,0l-3-3L16,9.4l-12,12V26c0,0.6,0.4,1,1,1h9.1 C13.4,25.8,13,24.5,13,23z"/> </svg>'},86820:function(e){e.exports='<svg viewBox="0 0 88 88" fill="none" xmlns="http://www.w3.org/2000/svg"> <g> <path d="M44 0.513519C27.2931 0.513519 13.75 13.8981 13.75 30.4095C13.75 46.9208 44 87.4835 44 87.4835C44 87.4835 74.25 46.9208 74.25 30.4095C74.25 13.8981 60.7069 0.513519 44 0.513519ZM19.25 30.4095C19.25 16.921 30.3518 5.94914 44 5.94914C57.6482 5.94914 68.75 16.921 68.75 30.4095C68.75 39.8049 54.9945 62.4871 44 78.1329C33.0055 62.4871 19.25 39.8049 19.25 30.4095ZM44 16.8204C36.4052 16.8204 30.25 22.9035 30.25 30.4095C30.25 37.9154 36.4052 43.9985 44 43.9985C51.5948 43.9985 57.75 37.9154 57.75 30.4095C57.75 22.9035 51.5948 16.8204 44 16.8204ZM44 38.5629C39.4508 38.5629 35.75 34.9054 35.75 30.4095C35.75 25.9135 39.4508 22.256 44 22.256C48.5492 22.256 52.25 25.9135 52.25 30.4095C52.25 34.9054 48.5492 38.5629 44 38.5629Z" fill="#404040"/> </g> <defs> <rect width="88" height="86.97" fill="white" transform="translate(0 0.513519)"/> </defs> </svg>'},36576:function(e){e.exports='<svg viewBox="0 0 77 86" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7 38.6056L33.1367 7.96263L69.5477 45.7058L36.2444 72.166L7 76.9673V38.6056Z" stroke="black" stroke-width="6"/> <circle cx="71" cy="45" r="6" fill="#C8C8C8"/> <circle cx="35" cy="73" r="6" fill="#C8C8C8"/> <circle cx="6" cy="79" r="6" fill="#C8C8C8"/> <circle cx="6" cy="39" r="6" fill="#C8C8C8"/> <circle cx="33" cy="6" r="6" fill="#C8C8C8"/> </svg>'},27622:function(e){e.exports='<svg width="72" height="86" viewBox="0 0 72 86" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M17.1832 79.1351L13.6833 45.0811L49.6832 58.4595L47.6832 5.35135" stroke="black" stroke-width="6"/> <circle cx="13" cy="44" r="6" fill="#C8C8C8"/> <circle cx="17" cy="77" r="6" fill="#C8C8C8"/> <circle cx="51" cy="59" r="6" fill="#C8C8C8"/> <circle cx="48" cy="6" r="6" fill="#C8C8C8"/> </svg>'},89687:function(e){e.exports='<svg viewBox="0 0 47 61" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M46.7671 7.12793H27.3433V61H19.416V7.12793H0.0336914V0.570312H46.7671V7.12793Z" fill="black"/> </svg>'},25088:function(e){e.exports='<svg width="11" height="15" viewBox="0 0 11 15" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M10.925 7.122V14H9.747L9.462 13.164C9.044 13.4933 8.55 13.7467 7.98 13.924C7.42267 14.1013 6.82733 14.19 6.194 14.19C5.054 14.19 4.066 13.9177 3.23 13.373C2.394 12.8157 1.75433 12.024 1.311 10.998C0.867667 9.972 0.646 8.756 0.646 7.35C0.646 5.96933 0.880333 4.766 1.349 3.74C1.83033 2.714 2.50167 1.92233 3.363 1.365C4.237 0.794999 5.25667 0.509999 6.422 0.509999C7.41 0.509999 8.284 0.693666 9.044 1.061C9.804 1.42833 10.3613 1.935 10.716 2.581L9.747 3.55C9.41767 3.03067 8.968 2.638 8.398 2.372C7.84067 2.09333 7.18833 1.954 6.441 1.954C5.17433 1.954 4.18633 2.429 3.477 3.379C2.76767 4.329 2.413 5.65267 2.413 7.35C2.413 9.07267 2.755 10.4153 3.439 11.378C4.13567 12.3407 5.10467 12.822 6.346 12.822C6.92867 12.822 7.46067 12.7397 7.942 12.575C8.436 12.4103 8.854 12.1697 9.196 11.853V8.414H6.023V7.122H10.925Z" fill="black"/> </svg>'},67008:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2" y="3" width="20" height="18" rx="2"/><path d="M2 8h20m-13 4-3 3 3 3m6-6 3 3-3 3"/> </g> </svg>'},63643:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2" y="5" width="20" height="14" rx="2"/><path d="M6 9h0m4 0h0m4 0h0m4 0h0M6 13h0m4 0h0m4 0h0m4 0h0M8 16h8"/> </g> </svg>'},27926:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M9 5h12v14H9l-7-7 7-7Zm3 4 6 6m0-6-6 6"/> </g> </svg>'},10690:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 11 8-8 8 8h-5v6H9v-6H4ZM8 21h8"/> </g> </svg>'},91997:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M5 12h0m7 0h0m7 0h0"/> </g> </svg>'},11699:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 11 8-8 8 8h-5v10H9V11H4Z"/> </g> </svg>'},98126:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 12h14m-4-4 4 4-4 4M21 5v14"/> </g> </svg>'},27222:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="6" y="2" width="12" height="20" rx="3"/><path d="M10 5h4M12 18h0"/> </g> </svg>'},17405:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M5 8V3h14v5M5 16v5h14v-5M2 12h3m4 0h3m4 0h3m3 0h0"/> </g> </svg>'},75689:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="4" y="5" width="16" height="16" rx="2"/><rect x="9" y="3" width="6" height="4" rx="1"/><path d="m9 11-3 3 3 3m6-6 3 3-3 3"/> </g> </svg>'},78879:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 7V3h4m4 0h3m4 0h3v4m0 4v3m0 4v3h-4m-4 0h-3m-4 0H3v-4m0-4v-3M7 8h10M7 12h10M7 16h6"/> </g> </svg>'},78955:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><path d="M14 6h7m-7 4h4m-4 7h7m-7 4h4"/> </g> </svg>'},18993:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18M10 9v12M14 13h3m-3 4h3"/> </g> </svg>'},11373:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 6 2 2 3-4M12 6h9m-18 7 2 2 3-4m4 2h9M3 20h4m5 0h9"/> </g> </svg>'},74922:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 7h18m-4-4 4 4-4 4M21 17H3m4-4-4 4 4 4"/> </g> </svg>'},34575:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 5h11M8 3v2m4 0c-1 6-4 10-9 12M5 8c1 3 3 5 6 7m2 7 4-11 4 11m-6-4h4"/> </g> </svg>'},46146:function(e){"u">typeof self&&self,e.exports=function(){var e=[function(e,t,i){"use strict";var o=i(3);function n(e){return!0===o(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,i;return!1!==n(e)&&"function"==typeof(t=e.constructor)&&!1!==n(i=t.prototype)&&!1!==i.hasOwnProperty("isPrototypeOf")}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=t.PALETTE_MATERIAL_CHROME=t.PALETTE_MATERIAL_500=t.COLOR_NAMES=t.getLuminance=t.intToRgb=t.rgbToInt=t.rgbToHsv=t.rgbToHsl=t.hslToRgb=t.rgbToHex=t.parseColor=t.parseColorToHsla=t.parseColorToHsl=t.parseColorToRgba=t.parseColorToRgb=t.from=t.createPicker=void 0;var o=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,n=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,r=e}finally{try{!o&&a.return&&a.return()}finally{if(n)throw r}}return i}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},r=i(2),s=l(i(0)),a=l(i(4));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function d(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var u="u">typeof window&&window.navigator.userAgent.indexOf("Edge")>-1,h="u">typeof window&&window.navigator.userAgent.indexOf("rv:")>-1,p={id:null,attachTo:"body",showHSL:!0,showRGB:!0,showHEX:!0,showAlpha:!1,color:"#ff0000",palette:null,paletteEditable:!1,useAlphaInPalette:"auto",slBarSize:[232,150],hueBarSize:[150,11],alphaBarSize:[150,11]},f="COLOR",m="RGBA_USER",g="HSLA_USER";function b(e,t,i){return e?e instanceof HTMLElement?e:e instanceof NodeList?e[0]:"string"==typeof e?document.querySelector(e):e.jquery?e.get(0):i?t:null:t}function v(e){var t=e.getContext("2d"),i=+e.width,o=+e.height,s=t.createLinearGradient(1,1,1,o-1);return s.addColorStop(0,"white"),s.addColorStop(1,"black"),{setHue:function(e){var n=t.createLinearGradient(1,0,i-1,0);n.addColorStop(0,"hsla("+e+", 100%, 50%, 0)"),n.addColorStop(1,"hsla("+e+", 100%, 50%, 1)"),t.fillStyle=s,t.fillRect(0,0,i,o),t.fillStyle=n,t.globalCompositeOperation="multiply",t.fillRect(0,0,i,o),t.globalCompositeOperation="source-over"},grabColor:function(e,i){return t.getImageData(e,i,1,1).data},findColor:function(e,t,s){var a=n((0,r.rgbToHsv)(e,t,s),3);return[a[1]*i,o-a[2]*o]}}}function y(e,t,i){return null===e?t:/^\s*$/.test(e)?i:!!/true|yes|1/i.test(e)||!/false|no|0/i.test(e)&&t}function w(e,t,i){if(null===e)return t;if(/^\s*$/.test(e))return i;var o=e.split(",").map(Number);return 2===o.length&&o[0]&&o[1]?o:t}var _=function(){function e(t,i){if(c(this,e),i?(t=b(t),this.options=Object.assign({},p,i)):t&&(0,s.default)(t)?(this.options=Object.assign({},p,t),t=b(this.options.attachTo)):(this.options=Object.assign({},p),t=b((0,r.nvl)(t,this.options.attachTo))),!t)throw Error("Container not found: "+this.options.attachTo);!function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"acp-";if(t.hasAttribute(i+"show-hsl")&&(e.showHSL=y(t.getAttribute(i+"show-hsl"),p.showHSL,!0)),t.hasAttribute(i+"show-rgb")&&(e.showRGB=y(t.getAttribute(i+"show-rgb"),p.showRGB,!0)),t.hasAttribute(i+"show-hex")&&(e.showHEX=y(t.getAttribute(i+"show-hex"),p.showHEX,!0)),t.hasAttribute(i+"show-alpha")&&(e.showAlpha=y(t.getAttribute(i+"show-alpha"),p.showAlpha,!0)),t.hasAttribute(i+"palette-editable")&&(e.paletteEditable=y(t.getAttribute(i+"palette-editable"),p.paletteEditable,!0)),t.hasAttribute(i+"sl-bar-size")&&(e.slBarSize=w(t.getAttribute(i+"sl-bar-size"),p.slBarSize,[232,150])),t.hasAttribute(i+"hue-bar-size")&&(e.hueBarSize=w(t.getAttribute(i+"hue-bar-size"),p.hueBarSize,[150,11]),e.alphaBarSize=e.hueBarSize),t.hasAttribute(i+"palette")){var o=t.getAttribute(i+"palette");switch(o){case"PALETTE_MATERIAL_500":e.palette=r.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":case"":e.palette=r.PALETTE_MATERIAL_CHROME;break;default:e.palette=o.split(/[;|]/)}}t.hasAttribute(i+"color")&&(e.color=t.getAttribute(i+"color"))}(this.options,t),this.H=0,this.S=0,this.L=0,this.R=0,this.G=0,this.B=0,this.A=1,this.palette={},this.element=document.createElement("div"),this.options.id&&(this.element.id=this.options.id),this.element.className="a-color-picker",this.element.innerHTML=a.default,t.appendChild(this.element);var o=this.element.querySelector(".a-color-picker-h");this.setupHueCanvas(o),this.hueBarHelper=v(o),this.huePointer=this.element.querySelector(".a-color-picker-h+.a-color-picker-dot");var n=this.element.querySelector(".a-color-picker-sl");this.setupSlCanvas(n),this.slBarHelper=v(n),this.slPointer=this.element.querySelector(".a-color-picker-sl+.a-color-picker-dot"),this.preview=this.element.querySelector(".a-color-picker-preview"),this.setupClipboard(this.preview.querySelector(".a-color-picker-clipbaord")),this.options.showHSL?(this.setupInput(this.inputH=this.element.querySelector(".a-color-picker-hsl>input[nameref=H]")),this.setupInput(this.inputS=this.element.querySelector(".a-color-picker-hsl>input[nameref=S]")),this.setupInput(this.inputL=this.element.querySelector(".a-color-picker-hsl>input[nameref=L]"))):this.element.querySelector(".a-color-picker-hsl").remove(),this.options.showRGB?(this.setupInput(this.inputR=this.element.querySelector(".a-color-picker-rgb>input[nameref=R]")),this.setupInput(this.inputG=this.element.querySelector(".a-color-picker-rgb>input[nameref=G]")),this.setupInput(this.inputB=this.element.querySelector(".a-color-picker-rgb>input[nameref=B]"))):this.element.querySelector(".a-color-picker-rgb").remove(),this.options.showHEX?this.setupInput(this.inputRGBHEX=this.element.querySelector("input[nameref=RGBHEX]")):this.element.querySelector(".a-color-picker-rgbhex").remove(),this.options.paletteEditable||this.options.palette&&this.options.palette.length>0?this.setPalette(this.paletteRow=this.element.querySelector(".a-color-picker-palette")):(this.paletteRow=this.element.querySelector(".a-color-picker-palette"),this.paletteRow.remove()),this.options.showAlpha?(this.setupAlphaCanvas(this.element.querySelector(".a-color-picker-a")),this.alphaPointer=this.element.querySelector(".a-color-picker-a+.a-color-picker-dot")):this.element.querySelector(".a-color-picker-alpha").remove(),this.element.style.width=this.options.slBarSize[0]+"px",this.onValueChanged(f,this.options.color)}return o(e,[{key:"setupHueCanvas",value:function(e){var t=this;e.width=this.options.hueBarSize[0],e.height=this.options.hueBarSize[1];for(var i=e.getContext("2d"),o=i.createLinearGradient(0,0,this.options.hueBarSize[0],0),n=0;n<=1;n+=1/360)o.addColorStop(n,"hsl("+360*n+", 100%, 50%)");i.fillStyle=o,i.fillRect(0,0,this.options.hueBarSize[0],this.options.hueBarSize[1]);var s=function(i){var o=(0,r.limit)(i.clientX-e.getBoundingClientRect().left,0,t.options.hueBarSize[0]),n=Math.round(360*o/t.options.hueBarSize[0]);t.huePointer.style.left=o-7+"px",t.onValueChanged("H",n)},a=function e(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){s(e),document.addEventListener("mousemove",s),document.addEventListener("mouseup",a)})}},{key:"setupSlCanvas",value:function(e){var t=this;e.width=this.options.slBarSize[0],e.height=this.options.slBarSize[1];var i=function(i){var o=(0,r.limit)(i.clientX-e.getBoundingClientRect().left,0,t.options.slBarSize[0]-1),n=(0,r.limit)(i.clientY-e.getBoundingClientRect().top,0,t.options.slBarSize[1]-1),s=t.slBarHelper.grabColor(o,n);t.slPointer.style.left=o-7+"px",t.slPointer.style.top=n-7+"px",t.onValueChanged("RGB",s)},o=function e(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){i(e),document.addEventListener("mousemove",i),document.addEventListener("mouseup",o)})}},{key:"setupAlphaCanvas",value:function(e){var t=this;e.width=this.options.alphaBarSize[0],e.height=this.options.alphaBarSize[1];var i=e.getContext("2d"),o=i.createLinearGradient(0,0,e.width-1,0);o.addColorStop(0,"hsla(0, 0%, 50%, 0)"),o.addColorStop(1,"hsla(0, 0%, 50%, 1)"),i.fillStyle=o,i.fillRect(0,0,this.options.alphaBarSize[0],this.options.alphaBarSize[1]);var n=function(i){var o=(0,r.limit)(i.clientX-e.getBoundingClientRect().left,0,t.options.alphaBarSize[0]),n=+(o/t.options.alphaBarSize[0]).toFixed(2);t.alphaPointer.style.left=o-7+"px",t.onValueChanged("ALPHA",n)},s=function e(){document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){n(e),document.addEventListener("mousemove",n),document.addEventListener("mouseup",s)})}},{key:"setupInput",value:function(e){var t=this,i=+e.min,o=+e.max,n=e.getAttribute("nameref");e.hasAttribute("select-on-focus")&&e.addEventListener("focus",function(){e.select()}),"text"===e.type?e.addEventListener("change",function(){t.onValueChanged(n,e.value)}):((u||h)&&e.addEventListener("keydown",function(s){"Up"===s.key?(e.value=(0,r.limit)(+e.value+1,i,o),t.onValueChanged(n,e.value),s.returnValue=!1):"Down"===s.key&&(e.value=(0,r.limit)(e.value-1,i,o),t.onValueChanged(n,e.value),s.returnValue=!1)}),e.addEventListener("change",function(){var s=+e.value;t.onValueChanged(n,(0,r.limit)(s,i,o))}))}},{key:"setupClipboard",value:function(e){var t=this;e.title="click to copy",e.addEventListener("click",function(){e.value=(0,r.parseColor)([t.R,t.G,t.B,t.A],"hexcss4"),e.select(),document.execCommand("copy")})}},{key:"setPalette",value:function(e){var t=this,i="auto"===this.options.useAlphaInPalette?this.options.showAlpha:this.options.useAlphaInPalette,o=null;switch(this.options.palette){case"PALETTE_MATERIAL_500":o=r.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":o=r.PALETTE_MATERIAL_CHROME;break;default:o=(0,r.ensureArray)(this.options.palette)}if(this.options.paletteEditable||o.length>0){var n=function(i,o,n){var r=e.querySelector('.a-color-picker-palette-color[data-color="'+i+'"]')||document.createElement("div");r.className="a-color-picker-palette-color",r.style.backgroundColor=i,r.setAttribute("data-color",i),r.title=i,e.insertBefore(r,o),t.palette[i]=!0,n&&t.onPaletteColorAdd(i)},s=function(i,o){i?(e.removeChild(i),t.palette[i.getAttribute("data-color")]=!1,o&&t.onPaletteColorRemove(i.getAttribute("data-color"))):(e.querySelectorAll(".a-color-picker-palette-color[data-color]").forEach(function(t){e.removeChild(t)}),Object.keys(t.palette).forEach(function(e){t.palette[e]=!1}),o&&t.onPaletteColorRemove())};if(o.map(function(e){return(0,r.parseColor)(e,i?"rgbcss4":"hex")}).filter(function(e){return!!e}).forEach(function(e){return n(e)}),this.options.paletteEditable){var a=document.createElement("div");a.className="a-color-picker-palette-color a-color-picker-palette-add",a.innerHTML="+",e.appendChild(a),e.addEventListener("click",function(e){/a-color-picker-palette-add/.test(e.target.className)?e.shiftKey?s(null,!0):n(i?(0,r.parseColor)([t.R,t.G,t.B,t.A],"rgbcss4"):(0,r.rgbToHex)(t.R,t.G,t.B),e.target,!0):/a-color-picker-palette-color/.test(e.target.className)&&(e.shiftKey?s(e.target,!0):t.onValueChanged(f,e.target.getAttribute("data-color")))})}else e.addEventListener("click",function(e){/a-color-picker-palette-color/.test(e.target.className)&&t.onValueChanged(f,e.target.getAttribute("data-color"))})}else e.style.display="none"}},{key:"updatePalette",value:function(e){this.paletteRow.innerHTML="",this.palette={},this.paletteRow.parentElement||this.element.appendChild(this.paletteRow),this.options.palette=e,this.setPalette(this.paletteRow)}},{key:"onValueChanged",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{silent:!1};switch(e){case"H":this.H=t;var o=n((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=o[0],this.G=o[1],this.B=o[2],this.slBarHelper.setHue(t),this.updatePointerH(this.H),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"S":this.S=t;var s=n((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=s[0],this.G=s[1],this.B=s[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"L":this.L=t;var a=n((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=a[0],this.G=a[1],this.B=a[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"R":this.R=t;var l=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=l[0],this.S=l[1],this.L=l[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"G":this.G=t;var c=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=c[0],this.S=c[1],this.L=c[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"B":this.B=t;var d=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=d[0],this.S=d[1],this.L=d[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"RGB":var u=n(t,3);this.R=u[0],this.G=u[1],this.B=u[2];var h=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=h[0],this.S=h[1],this.L=h[2],this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case m:var p=n(t,4);this.R=p[0],this.G=p[1],this.B=p[2],this.A=p[3];var b=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=b[0],this.S=b[1],this.L=b[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case g:var v=n(t,4);this.H=v[0],this.S=v[1],this.L=v[2],this.A=v[3];var y=n((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=y[0],this.G=y[1],this.B=y[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"RGBHEX":var w=n((0,r.cssColorToRgb)(t)||[this.R,this.G,this.B],3);this.R=w[0],this.G=w[1],this.B=w[2];var _=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=_[0],this.S=_[1],this.L=_[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B);break;case f:var k=n((0,r.parseColor)(t,"rgba")||[0,0,0,1],4);this.R=k[0],this.G=k[1],this.B=k[2],this.A=k[3];var C=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=C[0],this.S=C[1],this.L=C[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"ALPHA":this.A=t}1===this.A?this.preview.style.backgroundColor="rgb("+this.R+","+this.G+","+this.B+")":this.preview.style.backgroundColor="rgba("+this.R+","+this.G+","+this.B+","+this.A+")",i&&i.silent||this.onchange&&this.onchange(this.preview.style.backgroundColor)}},{key:"onPaletteColorAdd",value:function(e){this.oncoloradd&&this.oncoloradd(e)}},{key:"onPaletteColorRemove",value:function(e){this.oncolorremove&&this.oncolorremove(e)}},{key:"updateInputHSL",value:function(e,t,i){this.options.showHSL&&(this.inputH.value=e,this.inputS.value=t,this.inputL.value=i)}},{key:"updateInputRGB",value:function(e,t,i){this.options.showRGB&&(this.inputR.value=e,this.inputG.value=t,this.inputB.value=i)}},{key:"updateInputRGBHEX",value:function(e,t,i){this.options.showHEX&&(this.inputRGBHEX.value=(0,r.rgbToHex)(e,t,i))}},{key:"updatePointerH",value:function(e){var t=this.options.hueBarSize[0]*e/360;this.huePointer.style.left=t-7+"px"}},{key:"updatePointerSL",value:function(e,t,i){var o=n((0,r.hslToRgb)(e,t,i),3),s=o[0],a=o[1],l=o[2],c=n(this.slBarHelper.findColor(s,a,l),2),d=c[0],u=c[1];d>=0&&(this.slPointer.style.left=d-7+"px",this.slPointer.style.top=u-7+"px")}},{key:"updatePointerA",value:function(e){if(this.options.showAlpha){var t=this.options.alphaBarSize[0]*e;this.alphaPointer.style.left=t-7+"px"}}}]),e}(),k=function(){function e(t){c(this,e),this.name=t,this.listeners=[]}return o(e,[{key:"on",value:function(e){e&&this.listeners.push(e)}},{key:"off",value:function(e){this.listeners=e?this.listeners.filter(function(t){return t!==e}):[]}},{key:"emit",value:function(e,t){for(var i=this.listeners.slice(0),o=0;o<i.length;o++)i[o].apply(t,e)}}]),e}();function C(e,t){var i=new _(e,t),o={change:new k("change"),coloradd:new k("coloradd"),colorremove:new k("colorremove")},s=!0,a={},l={get element(){return i.element},get rgb(){return[i.R,i.G,i.B]},set rgb(e){var t=n(e,3),o=t[0],s=t[1],a=t[2],l=[(0,r.limit)(o,0,255),(0,r.limit)(s,0,255),(0,r.limit)(a,0,255)];o=l[0],s=l[1],a=l[2],i.onValueChanged(m,[o,s,a,1])},get hsl(){return[i.H,i.S,i.L]},set hsl(e){var t=n(e,3),o=t[0],s=t[1],a=t[2],l=[(0,r.limit)(o,0,360),(0,r.limit)(s,0,100),(0,r.limit)(a,0,100)];o=l[0],s=l[1],a=l[2],i.onValueChanged(g,[o,s,a,1])},get rgbhex(){return this.all.hex},get rgba(){return[i.R,i.G,i.B,i.A]},set rgba(e){var t=n(e,4),o=t[0],s=t[1],a=t[2],l=t[3],c=[(0,r.limit)(o,0,255),(0,r.limit)(s,0,255),(0,r.limit)(a,0,255),(0,r.limit)(l,0,1)];o=c[0],s=c[1],a=c[2],l=c[3],i.onValueChanged(m,[o,s,a,l])},get hsla(){return[i.H,i.S,i.L,i.A]},set hsla(e){var t=n(e,4),o=t[0],s=t[1],a=t[2],l=t[3],c=[(0,r.limit)(o,0,360),(0,r.limit)(s,0,100),(0,r.limit)(a,0,100),(0,r.limit)(l,0,1)];o=c[0],s=c[1],a=c[2],l=c[3],i.onValueChanged(g,[o,s,a,l])},get color(){return this.all.toString()},set color(e){i.onValueChanged(f,e)},setColor:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];i.onValueChanged(f,e,{silent:t})},get all(){if(s){var e=[i.R,i.G,i.B,i.A],t=i.A<1?"rgba("+i.R+","+i.G+","+i.B+","+i.A+")":r.rgbToHex.apply(void 0,e);(a=(0,r.parseColor)(e,a)).toString=function(){return t},s=!1}return Object.assign({},a)},get onchange(){return o.change&&o.change.listeners[0]},set onchange(e){this.off("change").on("change",e)},get oncoloradd(){return o.coloradd&&o.coloradd.listeners[0]},set oncoloradd(e){this.off("coloradd").on("coloradd",e)},get oncolorremove(){return o.colorremove&&o.colorremove.listeners[0]},set oncolorremove(e){this.off("colorremove").on("colorremove",e)},get palette(){return Object.keys(i.palette).filter(function(e){return i.palette[e]})},set palette(e){i.updatePalette(e)},show:function(){i.element.classList.remove("hidden")},hide:function(){i.element.classList.add("hidden")},toggle:function(){i.element.classList.toggle("hidden")},on:function(e,t){return e&&o[e]&&o[e].on(t),this},off:function(e,t){return e&&o[e]&&o[e].off(t),this},destroy:function(){o.change.off(),o.coloradd.off(),o.colorremove.off(),i.element.remove(),o=null,i=null}};return i.onchange=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];s=!0,o.change.emit([l].concat(t),l)},i.oncoloradd=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];o.coloradd.emit([l].concat(t),l)},i.oncolorremove=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];o.colorremove.emit([l].concat(t),l)},i.element.ctrl=l,l}if("u">typeof window&&!document.querySelector('head>style[data-source="a-color-picker"]')){var S=i(5).toString(),x=document.createElement("style");x.setAttribute("type","text/css"),x.setAttribute("data-source","a-color-picker"),x.innerHTML=S,document.querySelector("head").appendChild(x)}t.createPicker=C,t.from=function(e,t){var i=(e?Array.isArray(e)?e:e instanceof HTMLElement?[e]:e instanceof NodeList?[].concat(d(e)):"string"==typeof e?[].concat(d(document.querySelectorAll(e))):e.jquery?e.get():[]:[]).map(function(e,i){var o=C(e,t);return o.index=i,o});return i.on=function(e,t){return i.forEach(function(i){return i.on(e,t)}),this},i.off=function(e){return i.forEach(function(t){return t.off(e)}),this},i},t.parseColorToRgb=r.parseColorToRgb,t.parseColorToRgba=r.parseColorToRgba,t.parseColorToHsl=r.parseColorToHsl,t.parseColorToHsla=r.parseColorToHsla,t.parseColor=r.parseColor,t.rgbToHex=r.rgbToHex,t.hslToRgb=r.hslToRgb,t.rgbToHsl=r.rgbToHsl,t.rgbToHsv=r.rgbToHsv,t.rgbToInt=r.rgbToInt,t.intToRgb=r.intToRgb,t.getLuminance=r.getLuminance,t.COLOR_NAMES=r.COLOR_NAMES,t.PALETTE_MATERIAL_500=r.PALETTE_MATERIAL_500,t.PALETTE_MATERIAL_CHROME=r.PALETTE_MATERIAL_CHROME,t.VERSION="1.2.1"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nvl=t.ensureArray=t.limit=t.getLuminance=t.parseColor=t.parseColorToHsla=t.parseColorToHsl=t.cssHslaToHsla=t.cssHslToHsl=t.parseColorToRgba=t.parseColorToRgb=t.cssRgbaToRgba=t.cssRgbToRgb=t.cssColorToRgba=t.cssColorToRgb=t.intToRgb=t.rgbToInt=t.rgbToHsv=t.rgbToHsl=t.hslToRgb=t.rgbToHex=t.PALETTE_MATERIAL_CHROME=t.PALETTE_MATERIAL_500=t.COLOR_NAMES=void 0;var o,n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,n=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,r=e}finally{try{!o&&a.return&&a.return()}finally{if(n)throw r}}return i}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},r=(o=i(0))&&o.__esModule?o:{default:o};function s(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var a={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",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:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",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",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",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:"#FF0000",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:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};function l(e,t,i){return isNaN(e*=1)||t>e?t:e>i?i:e}function c(e,t){return null==e?t:e}function d(e,t,i){var o=[l(e,0,255),l(t,0,255),l(i,0,255)];return"#"+("000000"+((e=o[0])<<16|(t=o[1])<<8|(i=o[2])).toString(16)).slice(-6)}function u(e,t,i){var o=void 0,n=void 0,r=void 0,s=[l(e,0,360)/360,l(t,0,100)/100,l(i,0,100)/100];if(e=s[0],i=s[2],0==(t=s[1]))o=n=r=i;else{var a=function(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e},c=i<.5?i*(1+t):i+t-i*t,d=2*i-c;o=a(d,c,e+1/3),n=a(d,c,e),r=a(d,c,e-1/3)}return[255*o,255*n,255*r].map(Math.round)}function h(e,t,i){var o=[l(e,0,255)/255,l(t,0,255)/255,l(i,0,255)/255],n=Math.max(e=o[0],t=o[1],i=o[2]),r=Math.min(e,t,i),s=void 0,a=void 0,c=(n+r)/2;if(n==r)s=a=0;else{var d=n-r;switch(a=c>.5?d/(2-n-r):d/(n+r),n){case e:s=(t-i)/d+6*(t<i);break;case t:s=(i-e)/d+2;break;case i:s=(e-t)/d+4}s/=6}return[360*s,100*a,100*c].map(Math.round)}function p(e,t,i){return e<<16|t<<8|i}function f(e){if(e){var t=a[e.toString().toLowerCase()],i=n(/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F]))|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})))\s*$/i.exec(t||e)||[],10),o=i[3],r=i[4],s=i[5],l=i[7],c=i[8],d=i[9];if(void 0!==o)return[parseInt(o+o,16),parseInt(r+r,16),parseInt(s+s,16)];if(void 0!==l)return[parseInt(l,16),parseInt(c,16),parseInt(d,16)]}}function m(e){if(e){var t=a[e.toString().toLowerCase()],i=n(/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F])([0-9A-F])?)|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?))\s*$/i.exec(t||e)||[],12),o=i[3],r=i[4],s=i[5],l=i[6],c=i[8],d=i[9],u=i[10],h=i[11];if(void 0!==o)return[parseInt(o+o,16),parseInt(r+r,16),parseInt(s+s,16),l?+(parseInt(l+l,16)/255).toFixed(2):1];if(void 0!==c)return[parseInt(c,16),parseInt(d,16),parseInt(u,16),h?+(parseInt(h,16)/255).toFixed(2):1]}}function g(e){if(e){var t=n(/^rgb\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(e)||[],4),i=t[0],o=t[1],r=t[2],s=t[3];return i?[l(o,0,255),l(r,0,255),l(s,0,255)]:void 0}}function b(e){if(e){var t=n(/^rgba?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(e)||[],6),i=t[0],o=t[1],r=t[2],s=t[3],a=t[5];return i?[l(o,0,255),l(r,0,255),l(s,0,255),l(c(a,1),0,1)]:void 0}}function v(e){if(Array.isArray(e))return[l(e[0],0,255),l(e[1],0,255),l(e[2],0,255),l(c(e[3],1),0,1)];var t=m(e)||b(e);return t&&3===t.length&&t.push(1),t}function y(e){if(e){var t=n(/^hsl\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(e)||[],4),i=t[0],o=t[1],r=t[2],s=t[3];return i?[l(o,0,360),l(r,0,100),l(s,0,100)]:void 0}}function w(e){if(e){var t=n(/^hsla?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(e)||[],6),i=t[0],o=t[1],r=t[2],s=t[3],a=t[5];return i?[l(o,0,255),l(r,0,255),l(s,0,255),l(c(a,1),0,1)]:void 0}}function _(e){if(Array.isArray(e))return[l(e[0],0,360),l(e[1],0,100),l(e[2],0,100),l(c(e[3],1),0,1)];var t=w(e);return t&&3===t.length&&t.push(1),t}function k(e,t){switch(t){case"rgb":default:return e.slice(0,3);case"rgbcss":return"rgb("+e[0]+", "+e[1]+", "+e[2]+")";case"rgbcss4":return"rgb("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")";case"rgba":return e;case"rgbacss":return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")";case"hsl":return h.apply(void 0,s(e));case"hslcss":return"hsl("+(e=h.apply(void 0,s(e)))[0]+", "+e[1]+", "+e[2]+")";case"hslcss4":var i=h.apply(void 0,s(e));return"hsl("+i[0]+", "+i[1]+", "+i[2]+", "+e[3]+")";case"hsla":return[].concat(s(h.apply(void 0,s(e))),[e[3]]);case"hslacss":var o=h.apply(void 0,s(e));return"hsla("+o[0]+", "+o[1]+", "+o[2]+", "+e[3]+")";case"hex":return d.apply(void 0,s(e));case"hexcss4":return d.apply(void 0,s(e))+("00"+parseInt(255*e[3]).toString(16)).slice(-2);case"int":return p.apply(void 0,s(e))}}t.COLOR_NAMES=a,t.PALETTE_MATERIAL_500=["#F44336","#E91E63","#E91E63","#9C27B0","#9C27B0","#673AB7","#673AB7","#3F51B5","#3F51B5","#2196F3","#2196F3","#03A9F4","#03A9F4","#00BCD4","#00BCD4","#009688","#009688","#4CAF50","#4CAF50","#8BC34A","#8BC34A","#CDDC39","#CDDC39","#FFEB3B","#FFEB3B","#FFC107","#FFC107","#FF9800","#FF9800","#FF5722","#FF5722","#795548","#795548","#9E9E9E","#9E9E9E","#607D8B","#607D8B"],t.PALETTE_MATERIAL_CHROME=["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#9e9e9e","#607d8b"],t.rgbToHex=d,t.hslToRgb=u,t.rgbToHsl=h,t.rgbToHsv=function(e,t,i){var o=[l(e,0,255)/255,l(t,0,255)/255,l(i,0,255)/255],n,r=Math.max(e=o[0],t=o[1],i=o[2]),s=Math.min(e,t,i),a=void 0,c=r-s;if(n=0===r?0:c/r,r==s)a=0;else{switch(r){case e:a=(t-i)/c+6*(t<i);break;case t:a=(i-e)/c+2;break;case i:a=(e-t)/c+4}a/=6}return[a,n,r]},t.rgbToInt=p,t.intToRgb=function(e){return[e>>16&255,e>>8&255,255&e]},t.cssColorToRgb=f,t.cssColorToRgba=m,t.cssRgbToRgb=g,t.cssRgbaToRgba=b,t.parseColorToRgb=function(e){return Array.isArray(e)?e=[l(e[0],0,255),l(e[1],0,255),l(e[2],0,255)]:f(e)||g(e)},t.parseColorToRgba=v,t.cssHslToHsl=y,t.cssHslaToHsla=w,t.parseColorToHsl=function(e){return Array.isArray(e)?e=[l(e[0],0,360),l(e[1],0,100),l(e[2],0,100)]:y(e)},t.parseColorToHsla=_,t.parseColor=function(e,t){if(t=t||"rgb",null!=e){var i=void 0;if((i=v(e))||(i=_(e))&&(i=[].concat(s(u.apply(void 0,s(i))),[i[3]])))return(0,r.default)(t)?["rgb","rgbcss","rgbcss4","rgba","rgbacss","hsl","hslcss","hslcss4","hsla","hslacss","hex","hexcss4","int"].reduce(function(e,t){return e[t]=k(i,t),e},t||{}):k(i,t.toString().toLowerCase())}},t.getLuminance=function(e,t,i){return .2126*(e=(e/=255)<.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t=(t/=255)<.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*((i/=255)<.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))},t.limit=l,t.ensureArray=function(e){return e?Array.from(e):[]},t.nvl=c},function(e,t,i){"use strict";e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},function(e,t){e.exports='<div class="a-color-picker-row a-color-picker-stack a-color-picker-row-top"> <canvas class="a-color-picker-sl a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> <div class=a-color-picker-row> <div class="a-color-picker-stack a-color-picker-transparent a-color-picker-circle"> <div class=a-color-picker-preview> <input class=a-color-picker-clipbaord type=text> </div> </div> <div class=a-color-picker-column> <div class="a-color-picker-cell a-color-picker-stack"> <canvas class=a-color-picker-h></canvas> <div class=a-color-picker-dot></div> </div> <div class="a-color-picker-cell a-color-picker-alpha a-color-picker-stack" show-on-alpha> <canvas class="a-color-picker-a a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> </div> </div> <div class="a-color-picker-row a-color-picker-hsl" show-on-hsl> <label>H</label> <input nameref=H type=number maxlength=3 min=0 max=360 value=0> <label>S</label> <input nameref=S type=number maxlength=3 min=0 max=100 value=0> <label>L</label> <input nameref=L type=number maxlength=3 min=0 max=100 value=0> </div> <div class="a-color-picker-row a-color-picker-rgb" show-on-rgb> <label>R</label> <input nameref=R type=number maxlength=3 min=0 max=255 value=0> <label>G</label> <input nameref=G type=number maxlength=3 min=0 max=255 value=0> <label>B</label> <input nameref=B type=number maxlength=3 min=0 max=255 value=0> </div> <div class="a-color-picker-row a-color-picker-rgbhex a-color-picker-single-input" show-on-single-input> <label>HEX</label> <input nameref=RGBHEX type=text select-on-focus> </div> <div class="a-color-picker-row a-color-picker-palette"></div>'},function(e,t,i){var o=i(6);e.exports="string"==typeof o?o:o.toString()},function(e,t,i){(e.exports=i(7)(!1)).push([e.i,`/*!
|
|
8
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var o in i)("object"==typeof exports?exports:e)[o]=i[o]}}(self,function(){return function(){var e,t,i={94668:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M13 3H5v18h14V9l-6-6Zm0 0v6h6M12 12v6m-3-3h6"/> </g> </svg>'},86428:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> \x3c!-- Background rounded rect --\x3e <rect x="1" y="1" width="22" height="22" rx="3"/> \x3c!-- Letter A - outer shape --\x3e <polygon points="8,5 2,19 5,19 6.5,16 11.5,16 13,19 16,19 10,5" fill="white"/> \x3c!-- Letter A - inner triangle (hole) --\x3e <polygon points="9,9 7.5,13 10.5,13" fill="currentColor"/> \x3c!-- Letter I --\x3e <rect x="17" y="5" width="3" height="14" fill="white"/> </svg>'},75966:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 17 11-11 4 4L7 21Zm8-8 4 4M5 3v4M3 5h4M19 2v4m-2-2h4m-1 12v4m-2-2h4"/> </g> </svg>'},83207:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m10 6 6 6-6 6"/> </g> </svg>'},99219:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 10 18-7-7 18-3-8-8-3Zm8 3L21 3"/> </g> </svg>'},63674:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 2 4 5v7c0 5 8 10 8 10s8-5 8-10V5l-8-3Z"/> </g> </svg>'},4133:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m13 2-9 12h6l-1 8 11-13h-7V2Z"/> </g> </svg>'},68583:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 4v6h6M3 10l4-4a8 8 0 1 1-1 12M12 8v5l3 2"/> </g> </svg>'},34586:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2" y="5" width="20" height="13" rx="3"/><path d="m11 11 2 11 2-4 4-1-8-6"/> </g> </svg>'},91729:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2 19 8 5l6 14M4.5 13h7M21 12v7m0-5a3 3 0 1 0 0 3"/> </g> </svg>'},97467:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M5 20v-7M12 20V4M19 20v-5M3 20h18"/> </g> </svg>'},46995:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <circle cx="12" cy="12" r="9"/><path d="M8 9h0m8 0h0M8 15a5 5 0 0 0 8 0"/> </g> </svg>'},83556:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M12 5.5v6" fill="none" /> <path d="M9 9l3 3l3 -3" fill="none" /> <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4" fill="none" /> <path d="M2 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1" fill="none" /> <path d="M17 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0" fill="none" /> <path d="M9.5 15a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1 -3 0v-3a1.5 1.5 0 0 1 1.5 -1.5" fill="none" /> <path d="M19.5 15l3 6" fill="none" /> <path d="M19.5 21l3 -6" fill="none" /> </svg>'},4872:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M12 5.5v6" fill="none" /> <path d="M9 9l3 3l3 -3" fill="none" /> <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4" fill="none" /> <path d="M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6" fill="none" /> <path d="M17 18h2" fill="none" /> <path d="M20 15h-3v6" fill="none" /> <path d="M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1" fill="none" /> </svg>'},53121:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 3H5v18h14v-7M12 12l9-9m-6 0h6v6"/> </g> </svg>'},7307:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 21 3.5 12.5a5 5 0 0 1 7-7L12 7l1.5-1.5a5 5 0 0 1 7 7L12 21Z"/> </g> </svg>'},24928:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m2 11 10-8 10 8M5 9v12h5v-7h4v7h5V9"/> </g> </svg>'},96910:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 7V4h6l3 3h9v14H3V7ZM12 11v7m-3.5-3.5h7"/> </g> </svg>'},81122:function(e){e.exports='<svg viewBox="0 0 83 84" fill="none" xmlns="http://www.w3.org/2000/svg"> <circle cx="40" cy="44" r="37" stroke="black" stroke-width="6"/> <path d="M40 4V44H79" stroke="black" stroke-width="5"/> <circle cx="40" cy="6" r="6" fill="#C8C8C8"/> <circle cx="40" cy="43" r="6" fill="#C8C8C8"/> <circle cx="77" cy="44" r="6" fill="#C8C8C8"/> </svg>'},49377:function(e){e.exports='<svg viewBox="0 0 76 76" xmlns="http://www.w3.org/2000/svg"> <path d="M38 6.90909C36.2517 6.90909 34.7591 7.58381 33.5221 8.93324C32.2852 10.2827 31.6667 11.911 31.6667 13.8182V20.7273H30.0833V15.7074C30.0833 13.9801 29.5556 12.5137 28.5 11.3082C27.4444 10.1027 26.125 9.5 24.5417 9.5C23.0243 9.5 21.7214 10.0938 20.6328 11.2813C19.5443 12.4688 19 13.8902 19 15.5455V38.7017L17.4167 37.0824V27.7983C17.4167 26.071 16.8889 24.6046 15.8333 23.3991C14.7778 22.1937 13.4583 21.5909 11.875 21.5909C10.3576 21.5909 9.05469 22.1847 7.96615 23.3722C6.8776 24.5597 6.33333 25.9811 6.33333 27.6364V39.7273C6.33333 41.4186 6.91059 42.8939 8.0651 44.1534L23.4036 60.1307C24.6901 61.5341 25.3333 63.3693 25.3333 65.6364C25.3333 66.572 25.6467 67.3816 26.2734 68.0653C26.9002 68.7491 27.6424 69.0909 28.5 69.0909H60.1667C61.0243 69.0909 61.7665 68.7491 62.3932 68.0653C63.02 67.3816 63.3333 66.572 63.3333 65.6364V64.2869C63.3333 62.8116 63.4983 61.4261 63.8281 60.1307L69.1719 36.5966C69.5017 35.3011 69.6667 33.9157 69.6667 32.4403V19.1619C69.6667 17.4347 69.1389 15.9683 68.0833 14.7628C67.0278 13.5573 65.7083 12.9545 64.125 12.9545C62.6076 12.9545 61.3047 13.5483 60.2161 14.7358C59.1276 15.9233 58.5833 17.3447 58.5833 19V20.7273H57V13.9801C57 12.5407 56.5877 11.2363 55.763 10.0668C54.9384 8.89725 53.8828 8.16856 52.5964 7.88068C52.1345 7.80871 51.7552 7.77273 51.4583 7.77273C49.941 7.77273 48.638 8.36648 47.5495 9.55398C46.4609 10.7415 45.9167 12.1629 45.9167 13.8182V20.7273H44.3333V14.142C44.3333 12.3068 43.7973 10.6965 42.7253 9.31108C41.6532 7.92566 40.2925 7.14299 38.6432 6.96307C38.4783 6.92708 38.2639 6.90909 38 6.90909ZM38 0C40.7708 0 43.2283 0.899621 45.3724 2.69886C47.2526 1.47538 49.2813 0.863636 51.4583 0.863636C53.4045 0.863636 55.2352 1.34943 56.9505 2.32102C58.6658 3.29261 60.0842 4.66004 61.2057 6.4233C62.0964 6.1714 63.0694 6.04545 64.125 6.04545C67.4236 6.04545 70.2274 7.33191 72.5365 9.90483C74.8455 12.4777 76 15.5634 76 19.1619V32.4403C76 34.2756 75.7856 36.2188 75.3568 38.2699L69.9635 61.804C69.7656 62.6676 69.6667 63.9451 69.6667 65.6364C69.6667 68.5152 68.7431 70.9621 66.8958 72.9773C65.0486 74.9924 62.8056 76 60.1667 76H28.5C25.7292 76 23.4531 74.9474 21.6719 72.8423C19.8906 70.7372 19 68.1733 19 65.1506L3.76042 49.1733C1.25347 46.5464 0 43.3977 0 39.7273V27.6364C0 24.0739 1.16276 21.0241 3.48828 18.4872C5.8138 15.9503 8.60938 14.6818 11.875 14.6818C12.2378 14.6818 12.5017 14.6998 12.6667 14.7358C12.8646 11.3172 14.1098 8.43845 16.4023 6.09943C18.6949 3.76042 21.408 2.59091 24.5417 2.59091C26.2569 2.59091 27.8733 2.96875 29.3906 3.72443C31.7656 1.24148 34.6354 0 38 0Z"/> </svg>'},46425:function(e){e.exports='<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> <g> <path d="M23,13.6l5,5V4c0-0.6-0.4-1-1-1h-4V13.6z"/> <polygon points="12.4,3 16.7,7.3 19.7,10.3 21,11.6 21,3"/> <path d="M14.6,8l-5-5H5C4.4,3,4,3.4,4,4v14.6L14.6,8z"/> </g> <path d="M28.8,29.2L26,26.4c0.7-1,1-2.1,1-3.4c0-3.3-2.7-6-6-6s-6,2.7-6,6s2.7,6,6,6c1.2,0,2.4-0.4,3.4-1l2.8,2.8 c0.4,0.4,1.2,0.4,1.6,0C29.2,30.4,29.2,29.6,28.8,29.2z"/> <path d="M13,23c0-4.4,3.6-8,8-8c0.2,0,0.4,0,0.6,0l-0.3-0.3c0,0,0,0,0,0l-3-3L16,9.4l-12,12V26c0,0.6,0.4,1,1,1h9.1 C13.4,25.8,13,24.5,13,23z"/> </svg>'},86820:function(e){e.exports='<svg viewBox="0 0 88 88" fill="none" xmlns="http://www.w3.org/2000/svg"> <g> <path d="M44 0.513519C27.2931 0.513519 13.75 13.8981 13.75 30.4095C13.75 46.9208 44 87.4835 44 87.4835C44 87.4835 74.25 46.9208 74.25 30.4095C74.25 13.8981 60.7069 0.513519 44 0.513519ZM19.25 30.4095C19.25 16.921 30.3518 5.94914 44 5.94914C57.6482 5.94914 68.75 16.921 68.75 30.4095C68.75 39.8049 54.9945 62.4871 44 78.1329C33.0055 62.4871 19.25 39.8049 19.25 30.4095ZM44 16.8204C36.4052 16.8204 30.25 22.9035 30.25 30.4095C30.25 37.9154 36.4052 43.9985 44 43.9985C51.5948 43.9985 57.75 37.9154 57.75 30.4095C57.75 22.9035 51.5948 16.8204 44 16.8204ZM44 38.5629C39.4508 38.5629 35.75 34.9054 35.75 30.4095C35.75 25.9135 39.4508 22.256 44 22.256C48.5492 22.256 52.25 25.9135 52.25 30.4095C52.25 34.9054 48.5492 38.5629 44 38.5629Z" fill="#404040"/> </g> <defs> <rect width="88" height="86.97" fill="white" transform="translate(0 0.513519)"/> </defs> </svg>'},36576:function(e){e.exports='<svg viewBox="0 0 77 86" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7 38.6056L33.1367 7.96263L69.5477 45.7058L36.2444 72.166L7 76.9673V38.6056Z" stroke="black" stroke-width="6"/> <circle cx="71" cy="45" r="6" fill="#C8C8C8"/> <circle cx="35" cy="73" r="6" fill="#C8C8C8"/> <circle cx="6" cy="79" r="6" fill="#C8C8C8"/> <circle cx="6" cy="39" r="6" fill="#C8C8C8"/> <circle cx="33" cy="6" r="6" fill="#C8C8C8"/> </svg>'},27622:function(e){e.exports='<svg width="72" height="86" viewBox="0 0 72 86" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M17.1832 79.1351L13.6833 45.0811L49.6832 58.4595L47.6832 5.35135" stroke="black" stroke-width="6"/> <circle cx="13" cy="44" r="6" fill="#C8C8C8"/> <circle cx="17" cy="77" r="6" fill="#C8C8C8"/> <circle cx="51" cy="59" r="6" fill="#C8C8C8"/> <circle cx="48" cy="6" r="6" fill="#C8C8C8"/> </svg>'},89687:function(e){e.exports='<svg viewBox="0 0 47 61" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M46.7671 7.12793H27.3433V61H19.416V7.12793H0.0336914V0.570312H46.7671V7.12793Z" fill="black"/> </svg>'},25088:function(e){e.exports='<svg width="11" height="15" viewBox="0 0 11 15" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M10.925 7.122V14H9.747L9.462 13.164C9.044 13.4933 8.55 13.7467 7.98 13.924C7.42267 14.1013 6.82733 14.19 6.194 14.19C5.054 14.19 4.066 13.9177 3.23 13.373C2.394 12.8157 1.75433 12.024 1.311 10.998C0.867667 9.972 0.646 8.756 0.646 7.35C0.646 5.96933 0.880333 4.766 1.349 3.74C1.83033 2.714 2.50167 1.92233 3.363 1.365C4.237 0.794999 5.25667 0.509999 6.422 0.509999C7.41 0.509999 8.284 0.693666 9.044 1.061C9.804 1.42833 10.3613 1.935 10.716 2.581L9.747 3.55C9.41767 3.03067 8.968 2.638 8.398 2.372C7.84067 2.09333 7.18833 1.954 6.441 1.954C5.17433 1.954 4.18633 2.429 3.477 3.379C2.76767 4.329 2.413 5.65267 2.413 7.35C2.413 9.07267 2.755 10.4153 3.439 11.378C4.13567 12.3407 5.10467 12.822 6.346 12.822C6.92867 12.822 7.46067 12.7397 7.942 12.575C8.436 12.4103 8.854 12.1697 9.196 11.853V8.414H6.023V7.122H10.925Z" fill="black"/> </svg>'},67008:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2" y="3" width="20" height="18" rx="2"/><path d="M2 8h20m-13 4-3 3 3 3m6-6 3 3-3 3"/> </g> </svg>'},63643:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2" y="5" width="20" height="14" rx="2"/><path d="M6 9h0m4 0h0m4 0h0m4 0h0M6 13h0m4 0h0m4 0h0m4 0h0M8 16h8"/> </g> </svg>'},27926:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M9 5h12v14H9l-7-7 7-7Zm3 4 6 6m0-6-6 6"/> </g> </svg>'},10690:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 11 8-8 8 8h-5v6H9v-6H4ZM8 21h8"/> </g> </svg>'},91997:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M5 12h0m7 0h0m7 0h0"/> </g> </svg>'},11699:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 11 8-8 8 8h-5v10H9V11H4Z"/> </g> </svg>'},98126:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 12h14m-4-4 4 4-4 4M21 5v14"/> </g> </svg>'},27222:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="6" y="2" width="12" height="20" rx="3"/><path d="M10 5h4M12 18h0"/> </g> </svg>'},17405:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M5 8V3h14v5M5 16v5h14v-5M2 12h3m4 0h3m4 0h3m3 0h0"/> </g> </svg>'},75689:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="4" y="5" width="16" height="16" rx="2"/><rect x="9" y="3" width="6" height="4" rx="1"/><path d="m9 11-3 3 3 3m6-6 3 3-3 3"/> </g> </svg>'},78879:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 7V3h4m4 0h3m4 0h3v4m0 4v3m0 4v3h-4m-4 0h-3m-4 0H3v-4m0-4v-3M7 8h10M7 12h10M7 16h6"/> </g> </svg>'},78955:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><path d="M14 6h7m-7 4h4m-4 7h7m-7 4h4"/> </g> </svg>'},18993:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18M10 9v12M14 13h3m-3 4h3"/> </g> </svg>'},11373:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 6 2 2 3-4M12 6h9m-18 7 2 2 3-4m4 2h9M3 20h4m5 0h9"/> </g> </svg>'},74922:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 7h18m-4-4 4 4-4 4M21 17H3m4-4-4 4 4 4"/> </g> </svg>'},34575:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 5h11M8 3v2m4 0c-1 6-4 10-9 12M5 8c1 3 3 5 6 7m2 7 4-11 4 11m-6-4h4"/> </g> </svg>'},46146:function(e){"u">typeof self&&self,e.exports=function(){var e=[function(e,t,i){"use strict";var o=i(3);function n(e){return!0===o(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,i;return!1!==n(e)&&"function"==typeof(t=e.constructor)&&!1!==n(i=t.prototype)&&!1!==i.hasOwnProperty("isPrototypeOf")}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=t.PALETTE_MATERIAL_CHROME=t.PALETTE_MATERIAL_500=t.COLOR_NAMES=t.getLuminance=t.intToRgb=t.rgbToInt=t.rgbToHsv=t.rgbToHsl=t.hslToRgb=t.rgbToHex=t.parseColor=t.parseColorToHsla=t.parseColorToHsl=t.parseColorToRgba=t.parseColorToRgb=t.from=t.createPicker=void 0;var o=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,n=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,r=e}finally{try{!o&&a.return&&a.return()}finally{if(n)throw r}}return i}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},r=i(2),s=l(i(0)),a=l(i(4));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function d(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var u="u">typeof window&&window.navigator.userAgent.indexOf("Edge")>-1,h="u">typeof window&&window.navigator.userAgent.indexOf("rv:")>-1,p={id:null,attachTo:"body",showHSL:!0,showRGB:!0,showHEX:!0,showAlpha:!1,color:"#ff0000",palette:null,paletteEditable:!1,useAlphaInPalette:"auto",slBarSize:[232,150],hueBarSize:[150,11],alphaBarSize:[150,11]},f="COLOR",m="RGBA_USER",g="HSLA_USER";function b(e,t,i){return e?e instanceof HTMLElement?e:e instanceof NodeList?e[0]:"string"==typeof e?document.querySelector(e):e.jquery?e.get(0):i?t:null:t}function v(e){var t=e.getContext("2d"),i=+e.width,o=+e.height,s=t.createLinearGradient(1,1,1,o-1);return s.addColorStop(0,"white"),s.addColorStop(1,"black"),{setHue:function(e){var n=t.createLinearGradient(1,0,i-1,0);n.addColorStop(0,"hsla("+e+", 100%, 50%, 0)"),n.addColorStop(1,"hsla("+e+", 100%, 50%, 1)"),t.fillStyle=s,t.fillRect(0,0,i,o),t.fillStyle=n,t.globalCompositeOperation="multiply",t.fillRect(0,0,i,o),t.globalCompositeOperation="source-over"},grabColor:function(e,i){return t.getImageData(e,i,1,1).data},findColor:function(e,t,s){var a=n((0,r.rgbToHsv)(e,t,s),3);return[a[1]*i,o-a[2]*o]}}}function y(e,t,i){return null===e?t:/^\s*$/.test(e)?i:!!/true|yes|1/i.test(e)||!/false|no|0/i.test(e)&&t}function w(e,t,i){if(null===e)return t;if(/^\s*$/.test(e))return i;var o=e.split(",").map(Number);return 2===o.length&&o[0]&&o[1]?o:t}var _=function(){function e(t,i){if(c(this,e),i?(t=b(t),this.options=Object.assign({},p,i)):t&&(0,s.default)(t)?(this.options=Object.assign({},p,t),t=b(this.options.attachTo)):(this.options=Object.assign({},p),t=b((0,r.nvl)(t,this.options.attachTo))),!t)throw Error("Container not found: "+this.options.attachTo);!function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"acp-";if(t.hasAttribute(i+"show-hsl")&&(e.showHSL=y(t.getAttribute(i+"show-hsl"),p.showHSL,!0)),t.hasAttribute(i+"show-rgb")&&(e.showRGB=y(t.getAttribute(i+"show-rgb"),p.showRGB,!0)),t.hasAttribute(i+"show-hex")&&(e.showHEX=y(t.getAttribute(i+"show-hex"),p.showHEX,!0)),t.hasAttribute(i+"show-alpha")&&(e.showAlpha=y(t.getAttribute(i+"show-alpha"),p.showAlpha,!0)),t.hasAttribute(i+"palette-editable")&&(e.paletteEditable=y(t.getAttribute(i+"palette-editable"),p.paletteEditable,!0)),t.hasAttribute(i+"sl-bar-size")&&(e.slBarSize=w(t.getAttribute(i+"sl-bar-size"),p.slBarSize,[232,150])),t.hasAttribute(i+"hue-bar-size")&&(e.hueBarSize=w(t.getAttribute(i+"hue-bar-size"),p.hueBarSize,[150,11]),e.alphaBarSize=e.hueBarSize),t.hasAttribute(i+"palette")){var o=t.getAttribute(i+"palette");switch(o){case"PALETTE_MATERIAL_500":e.palette=r.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":case"":e.palette=r.PALETTE_MATERIAL_CHROME;break;default:e.palette=o.split(/[;|]/)}}t.hasAttribute(i+"color")&&(e.color=t.getAttribute(i+"color"))}(this.options,t),this.H=0,this.S=0,this.L=0,this.R=0,this.G=0,this.B=0,this.A=1,this.palette={},this.element=document.createElement("div"),this.options.id&&(this.element.id=this.options.id),this.element.className="a-color-picker",this.element.innerHTML=a.default,t.appendChild(this.element);var o=this.element.querySelector(".a-color-picker-h");this.setupHueCanvas(o),this.hueBarHelper=v(o),this.huePointer=this.element.querySelector(".a-color-picker-h+.a-color-picker-dot");var n=this.element.querySelector(".a-color-picker-sl");this.setupSlCanvas(n),this.slBarHelper=v(n),this.slPointer=this.element.querySelector(".a-color-picker-sl+.a-color-picker-dot"),this.preview=this.element.querySelector(".a-color-picker-preview"),this.setupClipboard(this.preview.querySelector(".a-color-picker-clipbaord")),this.options.showHSL?(this.setupInput(this.inputH=this.element.querySelector(".a-color-picker-hsl>input[nameref=H]")),this.setupInput(this.inputS=this.element.querySelector(".a-color-picker-hsl>input[nameref=S]")),this.setupInput(this.inputL=this.element.querySelector(".a-color-picker-hsl>input[nameref=L]"))):this.element.querySelector(".a-color-picker-hsl").remove(),this.options.showRGB?(this.setupInput(this.inputR=this.element.querySelector(".a-color-picker-rgb>input[nameref=R]")),this.setupInput(this.inputG=this.element.querySelector(".a-color-picker-rgb>input[nameref=G]")),this.setupInput(this.inputB=this.element.querySelector(".a-color-picker-rgb>input[nameref=B]"))):this.element.querySelector(".a-color-picker-rgb").remove(),this.options.showHEX?this.setupInput(this.inputRGBHEX=this.element.querySelector("input[nameref=RGBHEX]")):this.element.querySelector(".a-color-picker-rgbhex").remove(),this.options.paletteEditable||this.options.palette&&this.options.palette.length>0?this.setPalette(this.paletteRow=this.element.querySelector(".a-color-picker-palette")):(this.paletteRow=this.element.querySelector(".a-color-picker-palette"),this.paletteRow.remove()),this.options.showAlpha?(this.setupAlphaCanvas(this.element.querySelector(".a-color-picker-a")),this.alphaPointer=this.element.querySelector(".a-color-picker-a+.a-color-picker-dot")):this.element.querySelector(".a-color-picker-alpha").remove(),this.element.style.width=this.options.slBarSize[0]+"px",this.onValueChanged(f,this.options.color)}return o(e,[{key:"setupHueCanvas",value:function(e){var t=this;e.width=this.options.hueBarSize[0],e.height=this.options.hueBarSize[1];for(var i=e.getContext("2d"),o=i.createLinearGradient(0,0,this.options.hueBarSize[0],0),n=0;n<=1;n+=1/360)o.addColorStop(n,"hsl("+360*n+", 100%, 50%)");i.fillStyle=o,i.fillRect(0,0,this.options.hueBarSize[0],this.options.hueBarSize[1]);var s=function(i){var o=(0,r.limit)(i.clientX-e.getBoundingClientRect().left,0,t.options.hueBarSize[0]),n=Math.round(360*o/t.options.hueBarSize[0]);t.huePointer.style.left=o-7+"px",t.onValueChanged("H",n)},a=function e(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){s(e),document.addEventListener("mousemove",s),document.addEventListener("mouseup",a)})}},{key:"setupSlCanvas",value:function(e){var t=this;e.width=this.options.slBarSize[0],e.height=this.options.slBarSize[1];var i=function(i){var o=(0,r.limit)(i.clientX-e.getBoundingClientRect().left,0,t.options.slBarSize[0]-1),n=(0,r.limit)(i.clientY-e.getBoundingClientRect().top,0,t.options.slBarSize[1]-1),s=t.slBarHelper.grabColor(o,n);t.slPointer.style.left=o-7+"px",t.slPointer.style.top=n-7+"px",t.onValueChanged("RGB",s)},o=function e(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){i(e),document.addEventListener("mousemove",i),document.addEventListener("mouseup",o)})}},{key:"setupAlphaCanvas",value:function(e){var t=this;e.width=this.options.alphaBarSize[0],e.height=this.options.alphaBarSize[1];var i=e.getContext("2d"),o=i.createLinearGradient(0,0,e.width-1,0);o.addColorStop(0,"hsla(0, 0%, 50%, 0)"),o.addColorStop(1,"hsla(0, 0%, 50%, 1)"),i.fillStyle=o,i.fillRect(0,0,this.options.alphaBarSize[0],this.options.alphaBarSize[1]);var n=function(i){var o=(0,r.limit)(i.clientX-e.getBoundingClientRect().left,0,t.options.alphaBarSize[0]),n=+(o/t.options.alphaBarSize[0]).toFixed(2);t.alphaPointer.style.left=o-7+"px",t.onValueChanged("ALPHA",n)},s=function e(){document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){n(e),document.addEventListener("mousemove",n),document.addEventListener("mouseup",s)})}},{key:"setupInput",value:function(e){var t=this,i=+e.min,o=+e.max,n=e.getAttribute("nameref");e.hasAttribute("select-on-focus")&&e.addEventListener("focus",function(){e.select()}),"text"===e.type?e.addEventListener("change",function(){t.onValueChanged(n,e.value)}):((u||h)&&e.addEventListener("keydown",function(s){"Up"===s.key?(e.value=(0,r.limit)(+e.value+1,i,o),t.onValueChanged(n,e.value),s.returnValue=!1):"Down"===s.key&&(e.value=(0,r.limit)(e.value-1,i,o),t.onValueChanged(n,e.value),s.returnValue=!1)}),e.addEventListener("change",function(){var s=+e.value;t.onValueChanged(n,(0,r.limit)(s,i,o))}))}},{key:"setupClipboard",value:function(e){var t=this;e.title="click to copy",e.addEventListener("click",function(){e.value=(0,r.parseColor)([t.R,t.G,t.B,t.A],"hexcss4"),e.select(),document.execCommand("copy")})}},{key:"setPalette",value:function(e){var t=this,i="auto"===this.options.useAlphaInPalette?this.options.showAlpha:this.options.useAlphaInPalette,o=null;switch(this.options.palette){case"PALETTE_MATERIAL_500":o=r.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":o=r.PALETTE_MATERIAL_CHROME;break;default:o=(0,r.ensureArray)(this.options.palette)}if(this.options.paletteEditable||o.length>0){var n=function(i,o,n){var r=e.querySelector('.a-color-picker-palette-color[data-color="'+i+'"]')||document.createElement("div");r.className="a-color-picker-palette-color",r.style.backgroundColor=i,r.setAttribute("data-color",i),r.title=i,e.insertBefore(r,o),t.palette[i]=!0,n&&t.onPaletteColorAdd(i)},s=function(i,o){i?(e.removeChild(i),t.palette[i.getAttribute("data-color")]=!1,o&&t.onPaletteColorRemove(i.getAttribute("data-color"))):(e.querySelectorAll(".a-color-picker-palette-color[data-color]").forEach(function(t){e.removeChild(t)}),Object.keys(t.palette).forEach(function(e){t.palette[e]=!1}),o&&t.onPaletteColorRemove())};if(o.map(function(e){return(0,r.parseColor)(e,i?"rgbcss4":"hex")}).filter(function(e){return!!e}).forEach(function(e){return n(e)}),this.options.paletteEditable){var a=document.createElement("div");a.className="a-color-picker-palette-color a-color-picker-palette-add",a.innerHTML="+",e.appendChild(a),e.addEventListener("click",function(e){/a-color-picker-palette-add/.test(e.target.className)?e.shiftKey?s(null,!0):n(i?(0,r.parseColor)([t.R,t.G,t.B,t.A],"rgbcss4"):(0,r.rgbToHex)(t.R,t.G,t.B),e.target,!0):/a-color-picker-palette-color/.test(e.target.className)&&(e.shiftKey?s(e.target,!0):t.onValueChanged(f,e.target.getAttribute("data-color")))})}else e.addEventListener("click",function(e){/a-color-picker-palette-color/.test(e.target.className)&&t.onValueChanged(f,e.target.getAttribute("data-color"))})}else e.style.display="none"}},{key:"updatePalette",value:function(e){this.paletteRow.innerHTML="",this.palette={},this.paletteRow.parentElement||this.element.appendChild(this.paletteRow),this.options.palette=e,this.setPalette(this.paletteRow)}},{key:"onValueChanged",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{silent:!1};switch(e){case"H":this.H=t;var o=n((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=o[0],this.G=o[1],this.B=o[2],this.slBarHelper.setHue(t),this.updatePointerH(this.H),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"S":this.S=t;var s=n((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=s[0],this.G=s[1],this.B=s[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"L":this.L=t;var a=n((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=a[0],this.G=a[1],this.B=a[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"R":this.R=t;var l=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=l[0],this.S=l[1],this.L=l[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"G":this.G=t;var c=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=c[0],this.S=c[1],this.L=c[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"B":this.B=t;var d=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=d[0],this.S=d[1],this.L=d[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"RGB":var u=n(t,3);this.R=u[0],this.G=u[1],this.B=u[2];var h=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=h[0],this.S=h[1],this.L=h[2],this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case m:var p=n(t,4);this.R=p[0],this.G=p[1],this.B=p[2],this.A=p[3];var b=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=b[0],this.S=b[1],this.L=b[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case g:var v=n(t,4);this.H=v[0],this.S=v[1],this.L=v[2],this.A=v[3];var y=n((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=y[0],this.G=y[1],this.B=y[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"RGBHEX":var w=n((0,r.cssColorToRgb)(t)||[this.R,this.G,this.B],3);this.R=w[0],this.G=w[1],this.B=w[2];var _=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=_[0],this.S=_[1],this.L=_[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B);break;case f:var k=n((0,r.parseColor)(t,"rgba")||[0,0,0,1],4);this.R=k[0],this.G=k[1],this.B=k[2],this.A=k[3];var C=n((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=C[0],this.S=C[1],this.L=C[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"ALPHA":this.A=t}1===this.A?this.preview.style.backgroundColor="rgb("+this.R+","+this.G+","+this.B+")":this.preview.style.backgroundColor="rgba("+this.R+","+this.G+","+this.B+","+this.A+")",i&&i.silent||this.onchange&&this.onchange(this.preview.style.backgroundColor)}},{key:"onPaletteColorAdd",value:function(e){this.oncoloradd&&this.oncoloradd(e)}},{key:"onPaletteColorRemove",value:function(e){this.oncolorremove&&this.oncolorremove(e)}},{key:"updateInputHSL",value:function(e,t,i){this.options.showHSL&&(this.inputH.value=e,this.inputS.value=t,this.inputL.value=i)}},{key:"updateInputRGB",value:function(e,t,i){this.options.showRGB&&(this.inputR.value=e,this.inputG.value=t,this.inputB.value=i)}},{key:"updateInputRGBHEX",value:function(e,t,i){this.options.showHEX&&(this.inputRGBHEX.value=(0,r.rgbToHex)(e,t,i))}},{key:"updatePointerH",value:function(e){var t=this.options.hueBarSize[0]*e/360;this.huePointer.style.left=t-7+"px"}},{key:"updatePointerSL",value:function(e,t,i){var o=n((0,r.hslToRgb)(e,t,i),3),s=o[0],a=o[1],l=o[2],c=n(this.slBarHelper.findColor(s,a,l),2),d=c[0],u=c[1];d>=0&&(this.slPointer.style.left=d-7+"px",this.slPointer.style.top=u-7+"px")}},{key:"updatePointerA",value:function(e){if(this.options.showAlpha){var t=this.options.alphaBarSize[0]*e;this.alphaPointer.style.left=t-7+"px"}}}]),e}(),k=function(){function e(t){c(this,e),this.name=t,this.listeners=[]}return o(e,[{key:"on",value:function(e){e&&this.listeners.push(e)}},{key:"off",value:function(e){this.listeners=e?this.listeners.filter(function(t){return t!==e}):[]}},{key:"emit",value:function(e,t){for(var i=this.listeners.slice(0),o=0;o<i.length;o++)i[o].apply(t,e)}}]),e}();function C(e,t){var i=new _(e,t),o={change:new k("change"),coloradd:new k("coloradd"),colorremove:new k("colorremove")},s=!0,a={},l={get element(){return i.element},get rgb(){return[i.R,i.G,i.B]},set rgb(e){var t=n(e,3),o=t[0],s=t[1],a=t[2],l=[(0,r.limit)(o,0,255),(0,r.limit)(s,0,255),(0,r.limit)(a,0,255)];o=l[0],s=l[1],a=l[2],i.onValueChanged(m,[o,s,a,1])},get hsl(){return[i.H,i.S,i.L]},set hsl(e){var t=n(e,3),o=t[0],s=t[1],a=t[2],l=[(0,r.limit)(o,0,360),(0,r.limit)(s,0,100),(0,r.limit)(a,0,100)];o=l[0],s=l[1],a=l[2],i.onValueChanged(g,[o,s,a,1])},get rgbhex(){return this.all.hex},get rgba(){return[i.R,i.G,i.B,i.A]},set rgba(e){var t=n(e,4),o=t[0],s=t[1],a=t[2],l=t[3],c=[(0,r.limit)(o,0,255),(0,r.limit)(s,0,255),(0,r.limit)(a,0,255),(0,r.limit)(l,0,1)];o=c[0],s=c[1],a=c[2],l=c[3],i.onValueChanged(m,[o,s,a,l])},get hsla(){return[i.H,i.S,i.L,i.A]},set hsla(e){var t=n(e,4),o=t[0],s=t[1],a=t[2],l=t[3],c=[(0,r.limit)(o,0,360),(0,r.limit)(s,0,100),(0,r.limit)(a,0,100),(0,r.limit)(l,0,1)];o=c[0],s=c[1],a=c[2],l=c[3],i.onValueChanged(g,[o,s,a,l])},get color(){return this.all.toString()},set color(e){i.onValueChanged(f,e)},setColor:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];i.onValueChanged(f,e,{silent:t})},get all(){if(s){var e=[i.R,i.G,i.B,i.A],t=i.A<1?"rgba("+i.R+","+i.G+","+i.B+","+i.A+")":r.rgbToHex.apply(void 0,e);(a=(0,r.parseColor)(e,a)).toString=function(){return t},s=!1}return Object.assign({},a)},get onchange(){return o.change&&o.change.listeners[0]},set onchange(e){this.off("change").on("change",e)},get oncoloradd(){return o.coloradd&&o.coloradd.listeners[0]},set oncoloradd(e){this.off("coloradd").on("coloradd",e)},get oncolorremove(){return o.colorremove&&o.colorremove.listeners[0]},set oncolorremove(e){this.off("colorremove").on("colorremove",e)},get palette(){return Object.keys(i.palette).filter(function(e){return i.palette[e]})},set palette(e){i.updatePalette(e)},show:function(){i.element.classList.remove("hidden")},hide:function(){i.element.classList.add("hidden")},toggle:function(){i.element.classList.toggle("hidden")},on:function(e,t){return e&&o[e]&&o[e].on(t),this},off:function(e,t){return e&&o[e]&&o[e].off(t),this},destroy:function(){o.change.off(),o.coloradd.off(),o.colorremove.off(),i.element.remove(),o=null,i=null}};return i.onchange=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];s=!0,o.change.emit([l].concat(t),l)},i.oncoloradd=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];o.coloradd.emit([l].concat(t),l)},i.oncolorremove=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];o.colorremove.emit([l].concat(t),l)},i.element.ctrl=l,l}if("u">typeof window&&!document.querySelector('head>style[data-source="a-color-picker"]')){var S=i(5).toString(),x=document.createElement("style");x.setAttribute("type","text/css"),x.setAttribute("data-source","a-color-picker"),x.innerHTML=S,document.querySelector("head").appendChild(x)}t.createPicker=C,t.from=function(e,t){var i=(e?Array.isArray(e)?e:e instanceof HTMLElement?[e]:e instanceof NodeList?[].concat(d(e)):"string"==typeof e?[].concat(d(document.querySelectorAll(e))):e.jquery?e.get():[]:[]).map(function(e,i){var o=C(e,t);return o.index=i,o});return i.on=function(e,t){return i.forEach(function(i){return i.on(e,t)}),this},i.off=function(e){return i.forEach(function(t){return t.off(e)}),this},i},t.parseColorToRgb=r.parseColorToRgb,t.parseColorToRgba=r.parseColorToRgba,t.parseColorToHsl=r.parseColorToHsl,t.parseColorToHsla=r.parseColorToHsla,t.parseColor=r.parseColor,t.rgbToHex=r.rgbToHex,t.hslToRgb=r.hslToRgb,t.rgbToHsl=r.rgbToHsl,t.rgbToHsv=r.rgbToHsv,t.rgbToInt=r.rgbToInt,t.intToRgb=r.intToRgb,t.getLuminance=r.getLuminance,t.COLOR_NAMES=r.COLOR_NAMES,t.PALETTE_MATERIAL_500=r.PALETTE_MATERIAL_500,t.PALETTE_MATERIAL_CHROME=r.PALETTE_MATERIAL_CHROME,t.VERSION="1.2.1"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nvl=t.ensureArray=t.limit=t.getLuminance=t.parseColor=t.parseColorToHsla=t.parseColorToHsl=t.cssHslaToHsla=t.cssHslToHsl=t.parseColorToRgba=t.parseColorToRgb=t.cssRgbaToRgba=t.cssRgbToRgb=t.cssColorToRgba=t.cssColorToRgb=t.intToRgb=t.rgbToInt=t.rgbToHsv=t.rgbToHsl=t.hslToRgb=t.rgbToHex=t.PALETTE_MATERIAL_CHROME=t.PALETTE_MATERIAL_500=t.COLOR_NAMES=void 0;var o,n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],o=!0,n=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(i.push(s.value),!t||i.length!==t);o=!0);}catch(e){n=!0,r=e}finally{try{!o&&a.return&&a.return()}finally{if(n)throw r}}return i}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},r=(o=i(0))&&o.__esModule?o:{default:o};function s(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var a={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",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:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",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",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",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:"#FF0000",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:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};function l(e,t,i){return isNaN(e*=1)||t>e?t:e>i?i:e}function c(e,t){return null==e?t:e}function d(e,t,i){var o=[l(e,0,255),l(t,0,255),l(i,0,255)];return"#"+("000000"+((e=o[0])<<16|(t=o[1])<<8|(i=o[2])).toString(16)).slice(-6)}function u(e,t,i){var o=void 0,n=void 0,r=void 0,s=[l(e,0,360)/360,l(t,0,100)/100,l(i,0,100)/100];if(e=s[0],i=s[2],0==(t=s[1]))o=n=r=i;else{var a=function(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e},c=i<.5?i*(1+t):i+t-i*t,d=2*i-c;o=a(d,c,e+1/3),n=a(d,c,e),r=a(d,c,e-1/3)}return[255*o,255*n,255*r].map(Math.round)}function h(e,t,i){var o=[l(e,0,255)/255,l(t,0,255)/255,l(i,0,255)/255],n=Math.max(e=o[0],t=o[1],i=o[2]),r=Math.min(e,t,i),s=void 0,a=void 0,c=(n+r)/2;if(n==r)s=a=0;else{var d=n-r;switch(a=c>.5?d/(2-n-r):d/(n+r),n){case e:s=(t-i)/d+6*(t<i);break;case t:s=(i-e)/d+2;break;case i:s=(e-t)/d+4}s/=6}return[360*s,100*a,100*c].map(Math.round)}function p(e,t,i){return e<<16|t<<8|i}function f(e){if(e){var t=a[e.toString().toLowerCase()],i=n(/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F]))|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})))\s*$/i.exec(t||e)||[],10),o=i[3],r=i[4],s=i[5],l=i[7],c=i[8],d=i[9];if(void 0!==o)return[parseInt(o+o,16),parseInt(r+r,16),parseInt(s+s,16)];if(void 0!==l)return[parseInt(l,16),parseInt(c,16),parseInt(d,16)]}}function m(e){if(e){var t=a[e.toString().toLowerCase()],i=n(/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F])([0-9A-F])?)|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?))\s*$/i.exec(t||e)||[],12),o=i[3],r=i[4],s=i[5],l=i[6],c=i[8],d=i[9],u=i[10],h=i[11];if(void 0!==o)return[parseInt(o+o,16),parseInt(r+r,16),parseInt(s+s,16),l?+(parseInt(l+l,16)/255).toFixed(2):1];if(void 0!==c)return[parseInt(c,16),parseInt(d,16),parseInt(u,16),h?+(parseInt(h,16)/255).toFixed(2):1]}}function g(e){if(e){var t=n(/^rgb\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(e)||[],4),i=t[0],o=t[1],r=t[2],s=t[3];return i?[l(o,0,255),l(r,0,255),l(s,0,255)]:void 0}}function b(e){if(e){var t=n(/^rgba?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(e)||[],6),i=t[0],o=t[1],r=t[2],s=t[3],a=t[5];return i?[l(o,0,255),l(r,0,255),l(s,0,255),l(c(a,1),0,1)]:void 0}}function v(e){if(Array.isArray(e))return[l(e[0],0,255),l(e[1],0,255),l(e[2],0,255),l(c(e[3],1),0,1)];var t=m(e)||b(e);return t&&3===t.length&&t.push(1),t}function y(e){if(e){var t=n(/^hsl\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(e)||[],4),i=t[0],o=t[1],r=t[2],s=t[3];return i?[l(o,0,360),l(r,0,100),l(s,0,100)]:void 0}}function w(e){if(e){var t=n(/^hsla?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(e)||[],6),i=t[0],o=t[1],r=t[2],s=t[3],a=t[5];return i?[l(o,0,255),l(r,0,255),l(s,0,255),l(c(a,1),0,1)]:void 0}}function _(e){if(Array.isArray(e))return[l(e[0],0,360),l(e[1],0,100),l(e[2],0,100),l(c(e[3],1),0,1)];var t=w(e);return t&&3===t.length&&t.push(1),t}function k(e,t){switch(t){case"rgb":default:return e.slice(0,3);case"rgbcss":return"rgb("+e[0]+", "+e[1]+", "+e[2]+")";case"rgbcss4":return"rgb("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")";case"rgba":return e;case"rgbacss":return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")";case"hsl":return h.apply(void 0,s(e));case"hslcss":return"hsl("+(e=h.apply(void 0,s(e)))[0]+", "+e[1]+", "+e[2]+")";case"hslcss4":var i=h.apply(void 0,s(e));return"hsl("+i[0]+", "+i[1]+", "+i[2]+", "+e[3]+")";case"hsla":return[].concat(s(h.apply(void 0,s(e))),[e[3]]);case"hslacss":var o=h.apply(void 0,s(e));return"hsla("+o[0]+", "+o[1]+", "+o[2]+", "+e[3]+")";case"hex":return d.apply(void 0,s(e));case"hexcss4":return d.apply(void 0,s(e))+("00"+parseInt(255*e[3]).toString(16)).slice(-2);case"int":return p.apply(void 0,s(e))}}t.COLOR_NAMES=a,t.PALETTE_MATERIAL_500=["#F44336","#E91E63","#E91E63","#9C27B0","#9C27B0","#673AB7","#673AB7","#3F51B5","#3F51B5","#2196F3","#2196F3","#03A9F4","#03A9F4","#00BCD4","#00BCD4","#009688","#009688","#4CAF50","#4CAF50","#8BC34A","#8BC34A","#CDDC39","#CDDC39","#FFEB3B","#FFEB3B","#FFC107","#FFC107","#FF9800","#FF9800","#FF5722","#FF5722","#795548","#795548","#9E9E9E","#9E9E9E","#607D8B","#607D8B"],t.PALETTE_MATERIAL_CHROME=["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#9e9e9e","#607d8b"],t.rgbToHex=d,t.hslToRgb=u,t.rgbToHsl=h,t.rgbToHsv=function(e,t,i){var o=[l(e,0,255)/255,l(t,0,255)/255,l(i,0,255)/255],n,r=Math.max(e=o[0],t=o[1],i=o[2]),s=Math.min(e,t,i),a=void 0,c=r-s;if(n=0===r?0:c/r,r==s)a=0;else{switch(r){case e:a=(t-i)/c+6*(t<i);break;case t:a=(i-e)/c+2;break;case i:a=(e-t)/c+4}a/=6}return[a,n,r]},t.rgbToInt=p,t.intToRgb=function(e){return[e>>16&255,e>>8&255,255&e]},t.cssColorToRgb=f,t.cssColorToRgba=m,t.cssRgbToRgb=g,t.cssRgbaToRgba=b,t.parseColorToRgb=function(e){return Array.isArray(e)?e=[l(e[0],0,255),l(e[1],0,255),l(e[2],0,255)]:f(e)||g(e)},t.parseColorToRgba=v,t.cssHslToHsl=y,t.cssHslaToHsla=w,t.parseColorToHsl=function(e){return Array.isArray(e)?e=[l(e[0],0,360),l(e[1],0,100),l(e[2],0,100)]:y(e)},t.parseColorToHsla=_,t.parseColor=function(e,t){if(t=t||"rgb",null!=e){var i=void 0;if((i=v(e))||(i=_(e))&&(i=[].concat(s(u.apply(void 0,s(i))),[i[3]])))return(0,r.default)(t)?["rgb","rgbcss","rgbcss4","rgba","rgbacss","hsl","hslcss","hslcss4","hsla","hslacss","hex","hexcss4","int"].reduce(function(e,t){return e[t]=k(i,t),e},t||{}):k(i,t.toString().toLowerCase())}},t.getLuminance=function(e,t,i){return .2126*(e=(e/=255)<.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t=(t/=255)<.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*((i/=255)<.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))},t.limit=l,t.ensureArray=function(e){return e?Array.from(e):[]},t.nvl=c},function(e,t,i){"use strict";e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},function(e,t){e.exports='<div class="a-color-picker-row a-color-picker-stack a-color-picker-row-top"> <canvas class="a-color-picker-sl a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> <div class=a-color-picker-row> <div class="a-color-picker-stack a-color-picker-transparent a-color-picker-circle"> <div class=a-color-picker-preview> <input class=a-color-picker-clipbaord type=text> </div> </div> <div class=a-color-picker-column> <div class="a-color-picker-cell a-color-picker-stack"> <canvas class=a-color-picker-h></canvas> <div class=a-color-picker-dot></div> </div> <div class="a-color-picker-cell a-color-picker-alpha a-color-picker-stack" show-on-alpha> <canvas class="a-color-picker-a a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> </div> </div> <div class="a-color-picker-row a-color-picker-hsl" show-on-hsl> <label>H</label> <input nameref=H type=number maxlength=3 min=0 max=360 value=0> <label>S</label> <input nameref=S type=number maxlength=3 min=0 max=100 value=0> <label>L</label> <input nameref=L type=number maxlength=3 min=0 max=100 value=0> </div> <div class="a-color-picker-row a-color-picker-rgb" show-on-rgb> <label>R</label> <input nameref=R type=number maxlength=3 min=0 max=255 value=0> <label>G</label> <input nameref=G type=number maxlength=3 min=0 max=255 value=0> <label>B</label> <input nameref=B type=number maxlength=3 min=0 max=255 value=0> </div> <div class="a-color-picker-row a-color-picker-rgbhex a-color-picker-single-input" show-on-single-input> <label>HEX</label> <input nameref=RGBHEX type=text select-on-focus> </div> <div class="a-color-picker-row a-color-picker-palette"></div>'},function(e,t,i){var o=i(6);e.exports="string"==typeof o?o:o.toString()},function(e,t,i){(e.exports=i(7)(!1)).push([e.i,`/*!
|
|
9
9
|
* a-color-picker
|
|
10
10
|
* https://github.com/narsenico/a-color-picker
|
|
11
11
|
*
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
*/.a-color-picker{background-color:#fff;padding:0;display:inline-flex;flex-direction:column;user-select:none;width:232px;font:400 10px Helvetica,Arial,sans-serif;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.25)}.a-color-picker,.a-color-picker-row,.a-color-picker input{box-sizing:border-box}.a-color-picker-row{padding:15px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;user-select:none}.a-color-picker-row-top{padding:0}.a-color-picker-row:not(:first-child){border-top:1px solid #f5f5f5}.a-color-picker-column{display:flex;flex-direction:column}.a-color-picker-cell{flex:1 1 auto;margin-bottom:4px}.a-color-picker-cell:last-child{margin-bottom:0}.a-color-picker-stack{position:relative}.a-color-picker-dot{position:absolute;width:14px;height:14px;top:0;left:0;background:#fff;pointer-events:none;border-radius:50px;z-index:1000;box-shadow:0 1px 2px rgba(0,0,0,.75)}.a-color-picker-a,.a-color-picker-h,.a-color-picker-sl{cursor:cell}.a-color-picker-a+.a-color-picker-dot,.a-color-picker-h+.a-color-picker-dot{top:-2px}.a-color-picker-a,.a-color-picker-h{border-radius:2px}.a-color-picker-preview{box-sizing:border-box;width:30px;height:30px;user-select:none;border-radius:15px}.a-color-picker-circle{border-radius:50px;border:1px solid #eee}.a-color-picker-hsl,.a-color-picker-rgb,.a-color-picker-single-input{justify-content:space-evenly}.a-color-picker-hsl>label,.a-color-picker-rgb>label,.a-color-picker-single-input>label{padding:0 8px;flex:0 0 auto;color:#969696}.a-color-picker-hsl>input,.a-color-picker-rgb>input,.a-color-picker-single-input>input{text-align:center;padding:2px 0;width:0;flex:1 1 auto;border:1px solid #e0e0e0;line-height:20px}.a-color-picker-hsl>input::-webkit-inner-spin-button,.a-color-picker-rgb>input::-webkit-inner-spin-button,.a-color-picker-single-input>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.a-color-picker-hsl>input:focus,.a-color-picker-rgb>input:focus,.a-color-picker-single-input>input:focus{border-color:#04a9f4;outline:none}.a-color-picker-transparent{background-image:linear-gradient(-45deg,#cdcdcd 25%,transparent 0),linear-gradient(45deg,#cdcdcd 25%,transparent 0),linear-gradient(-45deg,transparent 75%,#cdcdcd 0),linear-gradient(45deg,transparent 75%,#cdcdcd 0);background-size:11px 11px;background-position:0 0,0 -5.5px,-5.5px 5.5px,5.5px 0}.a-color-picker-sl{border-radius:3px 3px 0 0}.a-color-picker.hide-alpha [show-on-alpha],.a-color-picker.hide-hsl [show-on-hsl],.a-color-picker.hide-rgb [show-on-rgb],.a-color-picker.hide-single-input [show-on-single-input]{display:none}.a-color-picker-clipbaord{width:100%;height:100%;opacity:0;cursor:pointer}.a-color-picker-palette{flex-flow:wrap;flex-direction:row;justify-content:flex-start;padding:10px}.a-color-picker-palette-color{width:15px;height:15px;flex:0 1 15px;margin:3px;box-sizing:border-box;cursor:pointer;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.a-color-picker-palette-add{text-align:center;line-height:13px;color:#607d8b}.a-color-picker.hidden{display:none}`,""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var i=function(e,t){var i=e[1]||"",o=e[3];if(!o)return i;if(t&&"function"==typeof btoa){var n="/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */";return[i].concat(o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"})).concat([n]).join(`
|
|
15
15
|
`)}return[i].join(`
|
|
16
16
|
`)}(t,e);return t[2]?"@media "+t[2]+"{"+i+"}":i}).join("")},t.i=function(e,i){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},n=0;n<this.length;n++){var r=this[n][0];"number"==typeof r&&(o[r]=!0)}for(n=0;n<e.length;n++){var s=e[n];"number"==typeof s[0]&&o[s[0]]||(i&&!s[2]?s[2]=i:i&&(s[2]="("+s[2]+") and ("+i+")"),t.push(s))}},t}}],t={};function i(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,(function(t){return e[t]}).bind(null,n));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=1)}()},6441:function(e,t,i){"use strict";i.d(t,{Config:function(){return r}});var o=i(82758);let n={};class r{static get defaultOptions(){return r.__defaultOptions||(r.__defaultOptions=new r),r.__defaultOptions}constructor(){this.cache=!0,this.defaultTimeout=100,this.namespace="",this.safeMode=!1,this.width="auto",this.height="auto",this.safePluginsList=["about","enter","backspace","size","bold","hotkeys"],this.license="",this.preset="custom",this.presets={inline:{inline:!0,toolbar:!1,toolbarInline:!0,toolbarInlineForSelection:!0,showXPathInStatusbar:!1,showCharsCounter:!1,showWordsCounter:!1,showPlaceholder:!1}},this.ownerDocument=o.globalDocument,this.ownerWindow=o.globalWindow,this.shadowRoot=null,this.nonce="",this.zIndex=0,this.readonly=!1,this.disabled=!1,this.activeButtonsInReadOnly=["source","fullsize","print","about","dots","selectall"],this.allowCommandsInReadOnly=["selectall","preview","print"],this.toolbarButtonSize="middle",this.allowTabNavigation=!1,this.inline=!1,this.theme="default",this.saveModeInStorage=!1,this.asyncStorage={},this.editorClassName=!1,this.className=!1,this.style=!1,this.containerStyle=!1,this.styleValues={},this.triggerChangeEvent=!0,this.direction="",this.language="auto",this.debugLanguage=!1,this.i18n=!1,this.tabIndex=-1,this.toolbar=!0,this.statusbar=!0,this.showTooltip=!0,this.showTooltipDelay=200,this.useNativeTooltip=!1,this.defaultActionOnPaste=o.INSERT_AS_HTML,this.enter=o.PARAGRAPH,this.iframe=!1,this.editHTMLDocumentMode=!1,this.enterBlock="br"!==this.enter?this.enter:o.PARAGRAPH,this.defaultMode=o.MODE_WYSIWYG,this.useSplitMode=!1,this.colors={greyscale:["#000000","#434343","#666666","#999999","#B7B7B7","#CCCCCC","#D9D9D9","#EFEFEF","#F3F3F3","#FFFFFF"],palette:["#980000","#FF0000","#FF9900","#FFFF00","#00F0F0","#00FFFF","#4A86E8","#0000FF","#9900FF","#FF00FF"],full:["#E6B8AF","#F4CCCC","#FCE5CD","#FFF2CC","#D9EAD3","#D0E0E3","#C9DAF8","#CFE2F3","#D9D2E9","#EAD1DC","#DD7E6B","#EA9999","#F9CB9C","#FFE599","#B6D7A8","#A2C4C9","#A4C2F4","#9FC5E8","#B4A7D6","#D5A6BD","#CC4125","#E06666","#F6B26B","#FFD966","#93C47D","#76A5AF","#6D9EEB","#6FA8DC","#8E7CC3","#C27BA0","#A61C00","#CC0000","#E69138","#F1C232","#6AA84F","#45818E","#3C78D8","#3D85C6","#674EA7","#A64D79","#85200C","#990000","#B45F06","#BF9000","#38761D","#134F5C","#1155CC","#0B5394","#351C75","#733554","#5B0F00","#660000","#783F04","#7F6000","#274E13","#0C343D","#1C4587","#073763","#20124D","#4C1130"]},this.colorPickerDefaultTab="background",this.imageDefaultWidth=300,this.imageDefaultAlign="normal",this.imageAlignClasses=null,this.alignClasses={},this.mediaDefaultAlign="normal",this.removeButtons=[],this.disablePlugins=[],this.extraPlugins=[],this.extraButtons=[],this.extraIcons={},this.createAttributes={table:{style:"border-collapse:collapse;width: 100%;"}},this.sizeLG=900,this.sizeMD=700,this.sizeSM=400,this.buttons=[{group:"font-style",buttons:[]},{group:"list",buttons:[]},{group:"font",buttons:[]},"---",{group:"script",buttons:[]},{group:"media",buttons:[]},`
|
|
17
|
-
`,{group:"state",buttons:[]},{group:"clipboard",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},{group:"form",buttons:[]},"---",{group:"history",buttons:[]},{group:"search",buttons:[]},{group:"source",buttons:[]},{group:"other",buttons:[]},{group:"info",buttons:[]}],this.events={},this.textIcons=!1,this.popupRoot=null,this.showBrowserColorPicker=!0,Object.assign(this,n)}}n=r.prototype,r.prototype.controls={}},26992:function(e,t,i){"use strict";i.d(t,{Async:function(){return f}});var o=i(82758),n=i(91898),r=i(12045),s=i(23282),a=i(84767),l=i(72430),c=i(14773),d=i(70799),u=i(86068),h=i(38837),p=i(93661);class f{delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...i){if(this.isDestructed)return 0;let o={};(0,u.isVoid)(t)&&(t=0),(0,a.isNumber)(t)||(t=(o=t).timeout||0),o.label&&this.clearLabel(o.label);let r=(0,n.setTimeout)(e,t,...i),s=o.label||r;return this.timers.set(s,r),this.__callbacks.set(s,e),r}updateTimeout(e,t){if((0,h.assert)(e&&this.timers.has(e),"Label does not exist"),!e||!this.timers.has(e))return null;let i=this.__callbacks.get(e);return(0,h.assert)((0,s.isFunction)(i),"Callback is not a function"),this.setTimeout(i,{label:e,timeout:t})}clearLabel(e){e&&this.timers.has(e)&&((0,n.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if((0,d.isString)(e))return this.clearLabel(e);(0,n.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,i=!1){let o=0,a=!1,d=[],u=(...t)=>{if(!a){o=0;let i=e(...t);if(a=!0,d.length){let e=()=>{d.forEach(e=>e()),d.length=0};(0,c.isPromise)(i)?i.finally(e):e()}}},h=(...r)=>{a=!1,t?(!o&&i&&u(...r),(0,n.clearTimeout)(o),o=this.setTimeout(()=>u(...r),(0,s.isFunction)(t)?t():t),this.timers.set(e,o)):u(...r)};return(0,l.isPlainObject)(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{d.push(e)}).catch(e=>{if((0,r.isAbortError)(e))return null;throw e});return h(...e),t}:h}microDebounce(e,t=!1){let i,o=!1,n=!0;return(...r)=>{if(i=r,o){n=!0;return}n=!0,t&&(n=!1,e(...i)),o=!0,this.__queueMicrotaskNative(()=>{o=!1,!this.isDestructed&&n&&e(...i)})}}throttle(e,t,i=!1){let o=null,n,r,a;return(...i)=>{(n=!0,a=i,t)?o||(r=()=>{n?(e(...a),n=!1,o=this.setTimeout(r,(0,s.isFunction)(t)?t():t),this.timers.set(r,o)):o=null})():e(...a)}}promise(e){let t=()=>{},i=new Promise((i,o)=>{t=()=>o((0,p.abort)("Abort async")),this.promisesRejections.add(t),e(i,o)});return!i.finally&&"u">typeof process&&!o.IS_ES_NEXT&&(i.finally=e=>(i.then(e).catch(e),i)),i.finally(()=>{this.promisesRejections.delete(t)}).catch(()=>null),i.rejectCallback=t,i}promiseState(e){if(e.status)return e.status;if(!Promise.race)return new Promise(t=>{e.then(e=>(t("fulfilled"),e),e=>{throw t("rejected"),e}),this.setTimeout(()=>{t("pending")},100)});let t={};return Promise.race([e,t]).then(e=>e===t?"pending":"fulfilled",()=>"rejected")}requestIdleCallback(e,t={timeout:100}){let i=this.__requestIdleCallbackNative(e,t);return this.__requestsIdle.add(i),i}requestIdlePromise(e){return this.promise(t=>{let i=this.requestIdleCallback(()=>t(i),e)})}schedulerPostTask(e,t={delay:0,priority:"user-visible"}){let i=new AbortController;if(t.signal&&t.signal.addEventListener("abort",()=>i.abort()),this.__controllers.add(i),void 0!==globalThis.scheduler){let o=globalThis.scheduler.postTask(e,{...t,signal:i.signal});return o.finally(()=>{this.__controllers.delete(i)}).catch(()=>null),o}return this.promise((o,n)=>{let r=this.setTimeout(()=>{try{o(e())}catch(e){n(e)}this.__controllers.delete(i)},t.delay||1);i.signal.addEventListener("abort",()=>{this.clearTimeout(r),this.__controllers.delete(i),n((0,p.abort)())})})}schedulerYield(){return this.schedulerPostTask(()=>{},{priority:"user-visible"})}cancelIdleCallback(e){return this.__requestsIdle.delete(e),this.__cancelIdleCallbackNative(e)}requestAnimationFrame(e){let t=requestAnimationFrame(e);return this.__requestsRaf.add(t),t}cancelAnimationFrame(e){this.__requestsRaf.delete(e),cancelAnimationFrame(e)}clear(){this.__requestsIdle.forEach(e=>this.cancelIdleCallback(e)),this.__requestsRaf.forEach(e=>this.cancelAnimationFrame(e)),this.__controllers.forEach(e=>e.abort()),this.timers.forEach(e=>(0,n.clearTimeout)(this.timers.get(e))),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){var e,t,i,o,n;this.timers=new Map,this.__callbacks=new Map,this.__queueMicrotaskNative=null!=(e=null==queueMicrotask?void 0:queueMicrotask.bind(window))?e:Promise.resolve().then.bind(Promise.resolve()),this.promisesRejections=new Set,this.__requestsIdle=new Set,this.__controllers=new Set,this.__requestsRaf=new Set,this.__requestIdleCallbackNative=null!=(i=null==(t=window.requestIdleCallback)?void 0:t.bind(window))?i:(e,t)=>{var i;let o=Date.now();return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-o))})},null!=(i=null==t?void 0:t.timeout)?i:1)},this.__cancelIdleCallbackNative=null!=(n=null==(o=window.cancelIdleCallback)?void 0:o.bind(window))?n:e=>{this.clearTimeout(e)},this.isDestructed=!1}}},8884:function(e,t,i){"use strict";i.d(t,{Async:function(){return o.Async}});var o=i(26992)},4012:function(e,t,i){"use strict";i.d(t,{Component:function(){return l}});var o=i(8884),n=i(78213),r=i(580),s=i(21537);let a=new Map;class l{get componentName(){return this.__componentName||(this.__componentName="jodit-"+(0,s.kebabCase)(((0,s.isFunction)(this.className)?this.className():"")||(0,s.getClassName)(this))),this.__componentName}getFullElName(e,t,i){let o=[this.componentName];return e&&o.push("__"+(e=e.replace(/[^a-z0-9-]/gi,"-"))),t&&(o.push("_",t),o.push("_",(0,s.isVoid)(i)?"true":i.toString())),o.join("")}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(e,t){return(0,s.get)(e,t||this)}get isReady(){return this.componentStatus===n.STATUSES.ready}get isDestructed(){return this.componentStatus===n.STATUSES.destructed}get isInDestruct(){return n.STATUSES.beforeDestruct===this.componentStatus||n.STATUSES.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(n.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(n.STATUSES.destructed),this.async&&(this.async.destruct(),this.async=void 0),a.get(this)&&a.delete(this),this.ownerWindow=void 0}get componentStatus(){return this.__componentStatus}set componentStatus(e){this.setStatus(e)}setStatus(e){return this.setStatusComponent(e,this)}setStatusComponent(e,t){if(e===this.__componentStatus)return;t===this&&(this.__componentStatus=e);let i=Object.getPrototypeOf(this);i&&(0,s.isFunction)(i.setStatusComponent)&&i.setStatusComponent(e,t);let o=a.get(this),n=null==o?void 0:o[e];n&&n.length&&n.forEach(e=>e(t))}hookStatus(e,t){let i=a.get(this);i||(i={},a.set(this,i)),i[e]||(i[e]=[]),i[e].push(t)}static isInstanceOf(e,t){return e instanceof t}constructor(){this.async=new o.Async,this.ownerWindow=window,this.__componentStatus=n.STATUSES.beforeInit,this.uid="jodit-uid-"+(0,r.uniqueUid)()}}l.STATUSES=n.STATUSES},91907:function(e,t,i){"use strict";i.d(t,{Component:function(){return o.Component},STATUSES:function(){return n.STATUSES},ViewComponent:function(){return r.ViewComponent}});var o=i(4012),n=i(78213),r=i(80480)},78213:function(e,t,i){"use strict";i.d(t,["STATUSES",0,{beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}])},80480:function(e,t,i){"use strict";i.d(t,{ViewComponent:function(){return n}});var o=i(4012);class n extends o.Component{get j(){return this.jodit}get defaultTimeout(){return this.j.defaultTimeout}i18n(e,...t){return this.j.i18n(e,...t)}setParentView(e){return this.jodit=e,e.ow&&(this.ownerWindow=e.ow),e.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}constructor(e){super(),this.setParentView(e)}}},82758:function(e,t,i){"use strict";i.r(t),i.d(t,{IS_TEST:function(){return o}});let o=!1,n="u">typeof window?window:void 0,r="u">typeof document?document:void 0,s=new Set(["ul","ol"]),a=["img","video","svg","iframe","script","input","textarea","link","jodit","jodit-media"],l=new Set([...a,"br","hr"]),c=new Set(a),d="Meta",u="Backspace",h="Enter",p="Escape",f="ArrowLeft",m="ArrowUp",g="ArrowRight",b="ArrowDown",v="Delete",y=[d,u,v,m,b,g,f,h,p,"F3","Tab"],w="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),_=void 0!==n&&/Mac|iPod|iPhone|iPad/.test(n.navigator.platform),k=e=>{let t=e.split("/");return/\.js/.test(t[t.length-1])?{basePath:t.slice(0,t.length-1).join("/")+"/",isMin:!0}:{basePath:e,isMin:!0}},{basePath:C,isMin:S}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let e=r.currentScript;if(e)return k(e.src);let t=r.querySelectorAll("script[src]");return t&&t.length?k(t[t.length-1].src):k(n.location.href)})(),x=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"]);i.d(t,["ACCURACY",0,10,"APP_VERSION",0,"4.18.2","BASE_PATH",0,C,"BASE_PATH_IS_MIN",0,S,"BR",0,"br","CLIPBOARD_ID",0,"clipboard","COMMAND_KEYS",0,y,"EMULATE_DBLCLICK_TIMEOUT",0,300,"ES",0,"es2021","FAT_MODE",0,!0,"HOMEPAGE",0,"https://xdsoft.net/jodit/pro/","INSEPARABLE_TAGS",0,l,"INSERT_AS_HTML",0,"insert_as_html","INSERT_AS_TEXT",0,"insert_as_text","INSERT_CLEAR_HTML",0,"insert_clear_html","INSERT_ONLY_TEXT",0,"insert_only_text","INVISIBLE_SPACE",0,"\uFEFF","INVISIBLE_SPACE_REG_EXP",0,()=>/[\uFEFF]/g,"INVISIBLE_SPACE_REG_EXP_END",0,()=>/[\uFEFF]+$/g,"INVISIBLE_SPACE_REG_EXP_START",0,()=>/^[\uFEFF]+/g,"IS_BLOCK",0,/^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|CANVAS|DD|DFN|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[1-6]|HEADER|HGROUP|HR|LI|MAIN|NAV|NOSCRIPT|OUTPUT|P|PRE|RUBY|SCRIPT|STYLE|OBJECT|OL|SECTION|IFRAME|JODIT|JODIT-MEDIA|UL|TR|TD|TH|TBODY|THEAD|TFOOT|TABLE|BODY|HTML|VIDEO)$/i,"IS_ES_MODERN",0,!0,"IS_ES_NEXT",0,!0,"IS_IE",0,w,"IS_INLINE",0,/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,"IS_MAC",0,_,"IS_PROD",0,!0,"KEY_ALIASES",0,{add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:_?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:"space",spacebar:"space",up:"arrowup",win:"meta",windows:"meta"},"KEY_ALT",0,"Alt","KEY_BACKSPACE",0,u,"KEY_DELETE",0,v,"KEY_DOWN",0,b,"KEY_END",0,"End","KEY_ENTER",0,h,"KEY_ESC",0,p,"KEY_F3",0,"F3","KEY_HOME",0,"Home","KEY_LEFT",0,f,"KEY_META",0,d,"KEY_RIGHT",0,g,"KEY_SPACE",0,"Space","KEY_TAB",0,"Tab","KEY_UP",0,m,"LIST_TAGS",0,s,"MARKER_CLASS",0,"jodit-selection_marker","MODE_SOURCE",0,2,"MODE_SPLIT",0,3,"MODE_WYSIWYG",0,1,"NBSP_SPACE",0," ","NEARBY",0,5,"NO_EMPTY_TAGS",0,c,"PARAGRAPH",0,"p","PASSIVE_EVENTS",0,x,"SAFE_COUNT_CHANGE_CALL",0,10,"SET_TEST",0,()=>o=!0,"SOURCE_CONSUMER",0,"source-consumer","SPACE_REG_EXP",0,()=>/[\s\n\t\r\uFEFF\u200b]+/g,"SPACE_REG_EXP_END",0,()=>/[\s\n\t\r\uFEFF\u200b]+$/g,"SPACE_REG_EXP_START",0,()=>/^[\s\n\t\r\uFEFF\u200b]+/g,"TEMP_ATTR",0,"data-jodit-temp","TEXT_HTML",0,w?"html":"text/html","TEXT_PLAIN",0,w?"text":"text/plain","TEXT_RTF",0,w?"rtf":"text/rtf","TOKENS",0,{},"globalDocument",0,r,"globalWindow",0,n,"lang",0,{}])},20218:function(e,t,i){"use strict";i.d(t,{Create:function(){return a}});var o=i(82758),n=i(2748),r=i(21537),s=i(38837);class a{get doc(){return(0,r.isFunction)(this.document)?this.document():this.document}element(e,t,i){let o=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(o),t&&((0,r.isPlainObject)(t)?(0,r.attr)(o,t):i=t),i&&(0,r.asArray)(i).forEach(e=>n.Dom.append(o,(0,r.isString)(e)?this.fromHTML(e):e)),o}div(e,t,i){let o=this.element("div",t,i);return e&&(o.className=e),o}sandbox(){var e;let t=this.element("iframe",{sandbox:"allow-same-origin"});n.Dom.append(this.doc.body,t);let i=null==(e=t.contentWindow)?void 0:e.document;if((0,s.assert)(i,"iframe.contentWindow.document"),!i)throw Error("Iframe error");return i.open(),i.write("<!DOCTYPE html><html><head></head><body></body></html>"),i.close(),[i.body,t]}span(e,t,i){let o=this.element("span",t,i);return e&&(o.className=e),o}a(e,t,i){let o=this.element("a",t,i);return e&&(o.className=e),o}text(e){return this.doc.createTextNode(e)}fake(){return this.text(o.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let i=this.div();i.innerHTML=e.toString();let o=i.firstChild===i.lastChild&&i.firstChild?i.firstChild:i;if(n.Dom.safeRemove(o),t){let e=(0,r.refs)(o);Object.keys(t).forEach(i=>{let o=e[i];o&&!1===t[i]&&n.Dom.hide(o)})}return o}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let i=t[e.tagName.toLowerCase()];(0,r.isFunction)(i)?i(e):(0,r.isPlainObject)(i)&&(0,r.attr)(e,i)}}}constructor(e,t){this.document=e,this.createAttributes=t}}},12060:function(e,t,i){"use strict";i.d(t,{Create:function(){return o.Create}});var o=i(20218)},45219:function(e,t,i){"use strict";i.d(t,{autobind:function(){return n}});var o=i(23282);function n(e,t,i){if(!(0,o.isFunction)(i.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let n=i.value;return{configurable:!0,get(){let e=n.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}},33433:function(e,t,i){"use strict";i.d(t,{cache:function(){return l},cacheHTML:function(){return c},cached:function(){return a}});var o=i(78213),n=i(2748),r=i(27613),s=i(82760);function a(e,t){let i=Object.getOwnPropertyDescriptor(e,t);return!i||(0,r.isFunction)(i.get)?null:i.value}function l(e,t,i){let o=i.get;if(!o)throw(0,s.error)("Getter property descriptor expected");i.get=function(){let e=o.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:e}),e}}function c(e,t,i){let a=i.value;if(!(0,r.isFunction)(a))throw(0,s.error)("Handler must be a Function");let l=!0,c=new WeakMap;i.value=function(...e){var t;let i,o=null!=(i=this.od)?i:document,r=c.get(o);if(l&&(null==r?void 0:r.has(this.constructor)))return null==(t=r.get(this.constructor))?void 0:t.cloneNode(!0);let s=a.apply(this,e);return l&&n.Dom.isElement(s)&&(r?r.set(this.constructor,s):c.set(o,new WeakMap([[this.constructor,s]]))),l?s.cloneNode(!0):s},e.hookStatus(o.STATUSES.ready,e=>{l=!!((0,r.isViewObject)(e)?e:e.jodit).options.cache})}},87325:function(e,t,i){"use strict";i.d(t,{component:function(){return s},getComponentClass:function(){return a}});var o=i(82758),n=i(80568);let r=new Map;function s(e){class t extends e{constructor(...e){super(...e),this.constructor===t&&(this instanceof t||Object.setPrototypeOf(this,t.prototype),this.setStatus("ready"))}}let i=(0,n.getClassName)(e.prototype);if(r.has(i)&&!o.IS_PROD)throw Error(`Component with name "${i}" is already registered`);return r.set(i,t),t}function a(e){return r.get(e)}},81577:function(e,t,i){"use strict";i.d(t,{debounce:function(){return a},throttle:function(){return l}});var o=i(91907),n=i(27613),r=i(38837),s=i(89890);function a(e,t=!1,i="debounce"){return(a,l)=>{let c=a[l];if(!(0,n.isFunction)(c))throw(0,s.error)("Handler must be a Function");return a.hookStatus(o.STATUSES.ready,o=>{let{async:s}=o;(0,r.assert)(null!=s,`Component ${o.componentName||o.constructor.name} should have "async:IAsync" field`);let a=(0,n.isFunction)(e)?e(o):e,c=(0,n.isNumber)(a)||(0,n.isPlainObject)(a)?a:o.defaultTimeout;Object.defineProperty(o,l,{configurable:!0,value:s[i](o[l].bind(o),c,t)})}),{configurable:!0,get(){return c.bind(this)}}}}function l(e,t=!1){return a(e,t,"throttle")}},55153:function(e,t,i){"use strict";i.d(t,{derive:function(){return n}});var o=i(23282);function n(...e){return t=>{let i=t.prototype;for(let t=0;t<e.length;t++){let n=e[t],r=Object.getOwnPropertyNames(n.prototype);for(let e=0;e<r.length;e++){let t=r[e],s=Object.getOwnPropertyDescriptor(n.prototype,t);null!=s&&(0,o.isFunction)(s.value)&&!(0,o.isFunction)(i[t])&&Object.defineProperty(i,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return s.value.call(this,...e)}})}}}}},97357:function(e,t,i){"use strict";i.d(t,{hook:function(){return r}});var o=i(23282),n=i(89890);function r(e){return(t,i)=>{if(!(0,o.isFunction)(t[i]))throw(0,n.error)("Handler must be a Function");t.hookStatus(e,e=>{e[i].call(e)})}}},78927:function(e,t,i){"use strict";i.d(t,{idle:function(){return s}});var o=i(91907),n=i(23282),r=i(89890);function s(){return(e,t)=>{if(!(0,n.isFunction)(e[t]))throw(0,r.error)("Handler must be a Function");e.hookStatus(o.STATUSES.ready,e=>{let{async:i}=e,o=e[t];e[t]=(...t)=>i.requestIdleCallback(o.bind(e,...t))})}}},65478:function(e,t,i){"use strict";i.r(t),i.d(t,{autobind:function(){return o.autobind},cache:function(){return n.cache},cacheHTML:function(){return n.cacheHTML},cached:function(){return n.cached},component:function(){return r.component},debounce:function(){return s.debounce},derive:function(){return a.derive},getComponentClass:function(){return r.getComponentClass},hook:function(){return l.hook},idle:function(){return c.idle},nonenumerable:function(){return d.nonenumerable},persistent:function(){return u.persistent},throttle:function(){return s.throttle},wait:function(){return h.wait},watch:function(){return p.watch}});var o=i(45219),n=i(33433),r=i(87325),s=i(81577),a=i(55153),l=i(97357),c=i(78927),d=i(31589),u=i(53213),h=i(13525),p=i(37133)},31589:function(e,t,i){"use strict";i.d(t,["nonenumerable",0,(e,t)=>{!1!==(Object.getOwnPropertyDescriptor(e,t)||{}).enumerable&&Object.defineProperty(e,t,{enumerable:!1,set(e){Object.defineProperty(this,t,{enumerable:!1,writable:!0,value:e})}})}])},53213:function(e,t,i){"use strict";i.d(t,{persistent:function(){return r}});var o=i(78213),n=i(39955);function r(e,t){e.hookStatus(o.STATUSES.ready,e=>{let i=(0,n.isViewObject)(e)?e:e.jodit,o=`${i.options.namespace}${e.componentName}_prop_${t}`,r=e[t];Object.defineProperty(e,t,{get(){var e;return null!=(e=i.storage.get(o))?e:r},set(e){i.storage.set(o,e)}})})}},13525:function(e,t,i){"use strict";i.d(t,{wait:function(){return s}});var o=i(78213),n=i(23282),r=i(89890);function s(e){return(t,i)=>{let s=t[i];if(!(0,n.isFunction)(s))throw(0,r.error)("Handler must be a Function");t.hookStatus(o.STATUSES.ready,t=>{let{async:o}=t,n=t[i],r=0;Object.defineProperty(t,i,{configurable:!0,value:function i(...s){o.clearTimeout(r),e(t)?n.apply(t,s):r=o.setTimeout(()=>i(...s),10)}})})}}},37133:function(e,t,i){"use strict";i.d(t,{watch:function(){return u}});var o=i(78213),n=i(73026),r=i(46559),s=i(23282),a=i(72430),l=i(39955),c=i(89890),d=i(37790);function u(e,t){return(i,u)=>{var h;if(!(0,s.isFunction)(i[u]))throw(0,c.error)("Handler must be a Function");let p=null==(h=null==t?void 0:t.immediately)||h,f=null==t?void 0:t.context,m=t=>{let o=(0,l.isViewObject)(t)?t:t.jodit,c=(e,...i)=>{if(!t.isInDestruct)return t[u](e,...i)};p||(c=t.async.microDebounce(c,!0)),(0,r.splitArray)(e).forEach(e=>{if(/:/.test(e)){let[i,n]=e.split(":"),r=f;i.length&&(r=t.get(i)),(0,s.isFunction)(r)&&(r=r(t)),o.events.on(r||t,n,c),r||o.events.on(n,c),t.hookStatus("beforeDestruct",()=>{o.events.off(r||t,n,c).off(n,c)});return}let r=e.split("."),[l]=r,u=r.slice(1),h=t[l];(0,a.isPlainObject)(h)&&(0,n.observable)(h).on("change."+u.join("."),c);let p=(0,d.getPropertyDescriptor)(i,l);Object.defineProperty(t,l,{configurable:!0,set(e){let i=h;i!==e&&(h=e,p&&p.set&&p.set.call(t,e),(0,a.isPlainObject)(h)&&(h=(0,n.observable)(h)).on("change."+u.join("."),c),c(l,i,h))},get:()=>p&&p.get?p.get.call(t):h})})};(0,s.isFunction)(i.hookStatus)?i.hookStatus(o.STATUSES.ready,m):m(i)}}},2748:function(e,t,i){"use strict";i.d(t,{Dom:function(){return y}});var o=i(82758),n=i(4510),r=i(68345),s=i(23282),a=i(58487),l=i(42320),c=i(70799),d=i(86068),u=i(49055),h=i(38837),p=i(29960),f=i(41180),m=i(86583),g=i(89890),b=i(37790);let v=RegExp(`<([a-z]+)[^>]+${o.TEMP_ATTR}[^>]*>(.+?)</\\1>`,"gi");class y{static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(e,t,i){let o,n,r=e;i.s.save();do n=!1,(o=r.nextSibling)&&!y.isBlock(o)&&!y.isTag(o,"br")&&(n=!0,r=o);while(n)return y.__wrapElements(t,i,e,r)}static __wrapElements(e,t,i,o){let n=(0,c.isString)(e)?t.createInside.element(e):e;i.parentNode&&i.parentNode.insertBefore(n,i);let r=i;for(;r&&(r=i.nextSibling,n.appendChild(i),i!==o&&r);)i=r;return t.s.restore(),n}static wrapInline(e,t,i){let o,n,r=e,s=e;i.s.save();do n=!1,(o=r.previousSibling)&&!y.isBlock(o)&&(n=!0,r=o);while(n)do n=!1,(o=s.nextSibling)&&!y.isBlock(o)&&(n=!0,s=o);while(n)return y.__wrapElements(t,i,r,s)}static wrap(e,t,i){let o=(0,c.isString)(t)?i.element(t):t;if(y.isNode(e)){if(!e.parentNode)throw(0,g.error)("Element should be in DOM");e.parentNode.insertBefore(o,e),o.appendChild(e)}else{let t=e.extractContents();e.insertNode(o),o.appendChild(t)}return o}static unwrap(e){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);y.safeRemove(e)}}static between(e,t,i){let o=e;for(;o&&o!==t&&!(e!==o&&i(o));){let e=o.firstChild||o.nextSibling;if(!e){for(;o&&!o.nextSibling;)if((o=o.parentNode)===t)return;e=null==o?void 0:o.nextSibling}o=e}}static replace(e,t,i,o=!1,r=!1){let s;if((0,a.isHTML)(t)&&((0,h.assert)(i,"Need create instance for new tag"),t=i.fromHTML(t)),(0,c.isString)(t)?((0,h.assert)(i,"Need create instance for new tag"),s=i.element(t)):s=t,!r)for(;e.firstChild;)s.appendChild(e.firstChild);return o&&y.isElement(e)&&y.isElement(s)&&(0,n.toArray)(e.attributes).forEach(e=>{s.setAttribute(e.name,e.value)}),e.parentNode&&e.parentNode.replaceChild(s,e),s}static isEmptyTextNode(e){return y.isText(e)&&(!e.nodeValue||0===e.nodeValue.replace(o.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(e){return y.each(e,e=>y.isEmptyTextNode(e))}static isContentEditable(e,t){return y.isNode(e)&&!y.closest(e,e=>y.isElement(e)&&"false"===e.getAttribute("contenteditable"),t)}static isEmpty(e,t=o.NO_EMPTY_TAGS){let i;if(!e)return!0;i=(0,s.isFunction)(t)?t:e=>t.has(e.nodeName.toLowerCase());let n=e=>null==e.nodeValue||0===(0,u.trim)(e.nodeValue).length;return y.isText(e)?n(e):!(y.isElement(e)&&i(e))&&y.each(e,e=>{if(y.isText(e)&&!n(e)||y.isElement(e)&&i(e))return!1})}static isNode(e){return!!(e&&(0,c.isString)(e.nodeName)&&"number"==typeof e.nodeType&&e.childNodes&&(0,s.isFunction)(e.appendChild))}static isCell(e){return y.isNode(e)&&("TD"===e.nodeName||"TH"===e.nodeName)}static isList(e){return y.isTag(e,o.LIST_TAGS)}static isLeaf(e){return y.isTag(e,"li")}static isImage(e){return y.isNode(e)&&/^(img|svg|picture|canvas)$/i.test(e.nodeName)}static isBlock(e){return!(0,d.isVoid)(e)&&"object"==typeof e&&y.isNode(e)&&o.IS_BLOCK.test(e.nodeName)}static isText(e){return!!(e&&e.nodeType===Node.TEXT_NODE)}static isComment(e){return!!(e&&e.nodeType===Node.COMMENT_NODE)}static isElement(e){return!!y.isNode(e)&&e.nodeType===Node.ELEMENT_NODE}static isFragment(e){return!!y.isNode(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}static isHTMLElement(e){var t;if(!y.isNode(e))return!1;let i=null==(t=e.ownerDocument)?void 0:t.defaultView;return e instanceof(i?i.HTMLElement:HTMLElement)}static isInlineBlock(e){return y.isElement(e)&&!/^(BR|HR)$/i.test(e.tagName)&&-1!==["inline","inline-block"].indexOf((0,f.css)(e,"display").toString())}static canSplitBlock(e){return!(0,d.isVoid)(e)&&y.isHTMLElement(e)&&y.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&void 0!==e.style&&!/^(fixed|absolute)/i.test(e.style.position)}static first(e,t){return y.__deepMost(e,t,!1)}static last(e,t){return y.__deepMost(e,t,!0)}static __deepMost(e,t,i){let o=i?"lastChild":"firstChild",n=i?"previousSibling":"nextSibling",r=null==e?void 0:e[o];if(!r)return null;do{if(t(r))return r;let i=r[o]||r[n];if(!i&&r.parentNode!==e){do r=r.parentNode;while(r&&!r[n]&&r.parentNode!==e)i=null==r?void 0:r[n]}r=i}while(r)return null}static prev(e,t,i,o=!0){return y.find(e,t,i,!1,o)}static next(e,t,i,o=!0){return y.find(e,t,i,!0,o)}static prevWithClass(e,t){return y.__siblingWithClass(e,t,!0)}static nextWithClass(e,t){return y.__siblingWithClass(e,t,!1)}static __siblingWithClass(e,t,i){let o=e=>y.isElement(e)&&e.classList.contains(t),n=e.parentNode;return i?y.prev(e,o,n):y.next(e,o,n)}static find(e,t,i,o=!0,n=!0){let r=this.nextGen(e,i,o,n),s=r.next();for(;!s.done;){if(t(s.value))return s.value;s=r.next()}return null}static*nextGen(e,t,i=!0,o=!0){let n=[],r=e;do{let t=i?r.nextSibling:r.previousSibling;for(;t;)n.push(t),t=i?t.nextSibling:t.previousSibling;n.reverse(),yield*this.runInStack(e,n,i,o),r=r.parentNode}while(r&&r!==t)return null}static each(e,t,i=!0){let o=this.eachGen(e,i),n=o.next();for(;!n.done;){if(!1===t(n.value))return!1;n=o.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,i,o=!0){for(;t.length;){let n=t.pop();if(o){let e=i?n.lastChild:n.firstChild;for(;e;)t.push(e),e=i?e.previousSibling:e.nextSibling}e!==n&&(yield n)}}static findWithCurrent(e,t,i,o="nextSibling",n="firstChild"){let r=e;do{if(t(r))return r||null;if(n&&r&&r[n]){let e=y.findWithCurrent(r[n],t,r,o,n);if(e)return e}for(;r&&!r[o]&&r!==i;)r=r.parentNode;r&&r[o]&&r!==i&&(r=r[o])}while(r&&r!==i)return null}static findSibling(e,t=!0,i=e=>!y.isEmptyTextNode(e)){let o=y.sibling(e,t);for(;o&&!i(o);)o=y.sibling(o,t);return o&&i(o)?o:null}static findNotEmptySibling(e,t){return y.findSibling(e,t,e=>{var t;return!y.isEmptyTextNode(e)&&!!(!y.isText(e)||(null==(t=e.nodeValue)?void 0:t.length)&&(0,u.trim)(e.nodeValue))})}static findNotEmptyNeighbor(e,t,i){return(0,b.call)(t?y.prev:y.next,e,e=>!!(e&&(!(y.isText(e)||y.isComment(e))||(0,u.trim)((null==e?void 0:e.nodeValue)||"").length)),i)}static sibling(e,t){return t?e.previousSibling:e.nextSibling}static up(e,t,i,o=!1){let n=e;if(!n)return null;do{if(t(n))return n;if(n===i||!n.parentNode)break;n=n.parentNode}while(n&&n!==i)return n===i&&o&&t(n)?n:null}static closest(e,t,i){let o,n=e=>e.toLowerCase();if((0,s.isFunction)(t))o=t;else if((0,r.isArray)(t)||(0,l.isSet)(t)){let e=(0,l.isSet)(t)?t:new Set(t.map(n));o=t=>!!(t&&e.has(n(t.nodeName)))}else o=e=>!!(e&&n(t)===n(e.nodeName));return y.up(e,o,i)}static furthest(e,t,i){let o=null,n=null==e?void 0:e.parentElement;for(;n&&n!==i;)t(n)&&(o=n),n=null==n?void 0:n.parentElement;return o}static appendChildFirst(e,t){e.firstChild!==t&&y.prepend(e,t)}static after(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e.nextSibling)}static before(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e)}static prepend(e,t){e.insertBefore(t,e.firstChild)}static append(e,t){(0,r.isArray)(t)?t.forEach(t=>{this.append(e,t)}):e.appendChild(t)}static moveContent(e,t,i=!1,r=()=>!0){let s=(e.ownerDocument||o.globalDocument).createDocumentFragment();(0,n.toArray)(e.childNodes).filter(e=>!!r(e)||(y.safeRemove(e),!1)).forEach(e=>{s.appendChild(e)}),t.insertBefore(s,i?t.firstChild:null)}static isOrContains(e,t,i=!1){return e===t?!i:!!(t&&e&&this.up(t,t=>t===e,e,!0))}static safeRemove(...e){e.forEach(e=>y.isNode(e)&&e.parentNode&&e.parentNode.removeChild(e))}static safeInsertNode(e,t){e.collapsed||e.deleteContents();let i=y.isFragment(t)?t.lastChild:t;e.startContainer===e.endContainer&&e.collapsed&&y.isTag(e.startContainer,o.INSEPARABLE_TAGS)?y.after(e.startContainer,t):(e.insertNode(t),i&&e.setStartBefore(i)),e.collapse(!0),[t.nextSibling,t.previousSibling].forEach(e=>y.isText(e)&&!e.nodeValue&&y.safeRemove(e))}static hide(e){e&&((0,m.dataBind)(e,"__old_display",e.style.getPropertyValue("display")),e.style.setProperty("display","none"))}static show(e){if(!e)return;let t=(0,m.dataBind)(e,"__old_display");"none"===e.style.getPropertyValue("display")&&e.style.setProperty("display",t||null)}static isTag(e,t){if(Array.isArray(t))throw TypeError("Dom.isTag does not support array");if(!this.isElement(e))return!1;let i=e.tagName.toLowerCase();return t instanceof Set?t.has(i)||t.has(e.tagName.toUpperCase()):i===t||e.tagName.toUpperCase()===t}static markTemporary(e,t){return t&&(0,p.attr)(e,t),(0,p.attr)(e,o.TEMP_ATTR,!0),e}static isTemporary(e){return!!y.isElement(e)&&(y.isMarker(e)||"true"===(0,p.attr)(e,o.TEMP_ATTR))}static isMarker(e){return y.isNode(e)&&y.isTag(e,"span")&&e.hasAttribute("data-"+o.MARKER_CLASS)}static replaceTemporaryFromString(e){return e.replace(v,"$2")}static temporaryList(e){let t=[];return y.each(e,e=>{y.isHTMLElement(e)&&e.hasAttribute(o.TEMP_ATTR)&&t.push(e)}),t}constructor(){throw Error("Dom is static module")}}},22732:function(e,t,i){"use strict";i.d(t,{Dom:function(){return o.Dom},LazyWalker:function(){return n.LazyWalker}});var o=i(2748),n=i(70071)},70071:function(e,t,i){"use strict";i.d(t,{LazyWalker:function(){return s}});var o=i(45219),n=i(2748),r=i(72757);class s extends r.Eventify{setWork(e){return this.isWorked?this.break():this.stop(),this.workNodes=n.Dom.eachGen(e,!this.options.reverse),this.isFinished=!1,this.hadAffect=!1,this._requestStarting(),this}_requestStarting(){this.__schedulerController=new AbortController,this.async.schedulerPostTask(this.__workPerform,{delay:this.options.timeout,signal:this.__schedulerController.signal}).catch(()=>null)}break(e){this.isWorked&&(this.stop(),this.emit("break",e))}end(){this.isWorked&&(this.stop(),this.emit("end",this.hadAffect),this.hadAffect=!1)}stop(){var e;this.isWorked=!1,this.isFinished=!0,this.workNodes=null,null==(e=this.__schedulerController)||e.abort(),this.__schedulerController=null}destruct(){super.destruct(),this.stop()}__workPerform(){var e;if(this.workNodes){this.isWorked=!0;let t=0,i=null!=(e=this.options.timeoutChunkSize)?e:50;for(;!this.isFinished&&t<i;){let e=this.workNodes.next();if(t+=1,this.visitNode(e.value)&&(this.hadAffect=!0),e.done)return void this.end()}}else this.end();this.isFinished||this._requestStarting()}visitNode(e){var t;return!!e&&(void 0===this.options.whatToShow||e.nodeType===this.options.whatToShow)&&null!=(t=this.emit("visit",e))&&t}constructor(e,t={}){super(),this.async=e,this.options=t,this.workNodes=null,this.hadAffect=!1,this.isWorked=!1,this.isFinished=!1,this.__schedulerController=null}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([o.autobind],s.prototype,"__workPerform",null)},98220:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return d}});var o=i(82758),n=i(46559),r=i(68345),s=i(23282),a=i(70799),l=i(89890),c=i(15738);class d{mute(e){return this.__mutedEvents.add(null!=e?e:"*"),this}isMuted(e){return!!(e&&this.__mutedEvents.has(e))||this.__mutedEvents.has("*")}unmute(e){return this.__mutedEvents.delete(null!=e?e:"*"),this}__eachEvent(e,t){(0,n.splitArray)(e).map(e=>e.trim()).forEach(e=>{let i=e.split("."),o=i[1]||c.defaultNameSpace;t.call(this,i[0],o)})}__getStore(e){if(!e)throw(0,l.error)("Need subject");if(void 0===e[this.__key]){let t=new c.EventHandlersStore;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:t})}return e[this.__key]}__removeStoreFromSubject(e){void 0!==e[this.__key]&&delete e[this.__key]}__triggerNativeEvent(e,t){let i=this.__doc.createEvent("HTMLEvents");(0,a.isString)(t)?i.initEvent(t,!0,!0):(i.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(e=>{Object.defineProperty(i,e,{value:t[e],enumerable:!0})}),Object.defineProperty(i,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(i)}get current(){return this.currents[this.currents.length-1]}on(e,t,i,n){let c,d,h,p;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(c=this,d=e,h=t,p=i):(c=e,d=t,h=i,p=n),!((0,a.isString)(d)||(0,a.isStringArray)(d))||0===d.length)throw(0,l.error)("Need events names");if(!(0,s.isFunction)(h))throw(0,l.error)("Need event handler");if((0,r.isArray)(c))return c.forEach(e=>{this.on(e,d,h,p)}),this;let f=c,m=this.__getStore(f),g=this,b=function(e,...t){if(!g.isMuted(e))return h&&h.call(this,...t)};return u(f)&&(b=function(e){if(!g.isMuted(e.type)&&(g.__prepareEvent(e),h&&!1===h.call(this,e)))return e.preventDefault(),e.stopImmediatePropagation(),!1}),this.__eachEvent(d,(e,t)=>{var i,n;if(0===e.length)throw(0,l.error)("Need event name");if(!1===m.indexOf(e,t,h)){let r={event:e,originalCallback:h,syntheticCallback:b};if(m.set(e,t,r,null==p?void 0:p.top),u(f)){let t=o.PASSIVE_EVENTS.has(e)?{passive:!0,capture:null!=(i=null==p?void 0:p.capture)&&i}:null!=(n=null==p?void 0:p.capture)&&n;b.options=t,f.addEventListener(e,b,t),this.__memoryDOMSubjectToHandler(f,b)}}}),this}__memoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap.get(e)||new Set;i.add(t),this.__domEventsMap.set(e,i)}__unmemoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap,o=i.get(e)||new Set;o.delete(t),o.size?i.set(e,o):i.delete(e)}one(e,t,i,o){let n,r,s,l;(0,a.isString)(e)||(0,a.isStringArray)(e)?(n=this,r=e,s=t,l=i):(n=e,r=t,s=i,l=o);let c=(...e)=>(this.off(n,r,c),s(...e));return this.on(n,r,c,l),this}off(e,t,i){let o,n,l;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(o=this,n=e,l=t):(o=e,n=t,l=i),(0,r.isArray)(o))return o.forEach(e=>{this.off(e,n,l)}),this;let d=o,h=this.__getStore(d);if(!((0,a.isString)(n)||(0,a.isStringArray)(n))||0===n.length)return h.namespaces().forEach(e=>{this.off(d,"."+e)}),this.__removeStoreFromSubject(d),this;let p=e=>{var t;u(d)&&(d.removeEventListener(e.event,e.syntheticCallback,null!=(t=e.syntheticCallback.options)&&t),this.__unmemoryDOMSubjectToHandler(d,e.syntheticCallback))},f=(e,t)=>{if(""===e)return void h.events(t).forEach(e=>{""!==e&&f(e,t)});let i=h.get(e,t);if(i&&i.length)if((0,s.isFunction)(l)){let o=h.indexOf(e,t,l);!1!==o&&(p(i[o]),i.splice(o,1),i.length||h.clearEvents(t,e))}else i.forEach(p),i.length=0,h.clearEvents(t,e)};return this.__eachEvent(n,(e,t)=>{t===c.defaultNameSpace?h.namespaces().forEach(t=>{f(e,t)}):f(e,t)}),h.isEmpty()&&this.__removeStoreFromSubject(d),this}stopPropagation(e,t){let i=(0,a.isString)(e)?this:e,o=(0,a.isString)(e)?e:t;if("string"!=typeof o)throw(0,l.error)("Need event names");let n=this.__getStore(i);this.__eachEvent(o,(e,t)=>{let o=n.get(e,t);o&&this.__stopped.push(o),t===c.defaultNameSpace&&n.namespaces(!0).forEach(t=>this.stopPropagation(i,e+"."+t))})}__removeStop(e){if(e){let t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(0,t+1)}}__isStopped(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)}fire(e,t,...i){let o,n,r=(0,a.isString)(e)?this:e,s=(0,a.isString)(e)?e:t,d=(0,a.isString)(e)?[t,...i]:i;if(!u(r)&&!(0,a.isString)(s))throw(0,l.error)("Need events names");let h=this.__getStore(r);return!(0,a.isString)(s)&&u(r)?this.__triggerNativeEvent(r,t):this.__eachEvent(s,(e,t)=>{if(u(r))this.__triggerNativeEvent(r,e);else{let i=h.get(e,t);if(i)try{[...i].every(t=>!this.__isStopped(i)&&(this.currents.push(e),n=t.syntheticCallback.call(r,e,...d),this.currents.pop(),void 0!==n&&(o=n),!0))}finally{this.__removeStop(i)}t!==c.defaultNameSpace||u(r)||h.namespaces().filter(e=>e!==t).forEach(t=>{let i=this.fire.apply(this,[r,e+"."+t,...d]);void 0!==i&&(o=i)})}}),o}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__domEventsMap.forEach((e,t)=>{this.off(t)}),this.__domEventsMap.clear(),this.__mutedEvents.clear(),this.currents.length=0,this.__stopped.length=0,this.off(this),this.__getStore(this).clear(),this.__removeStoreFromSubject(this))}constructor(e){this.__domEventsMap=new Map,this.__mutedEvents=new Set,this.__key="__JoditEventEmitterNamespaces",this.__doc=o.globalDocument,this.__prepareEvent=e=>{!e.cancelBubble&&(e.composed&&(0,s.isFunction)(e.composedPath)&&e.composedPath()[0]&&Object.defineProperty(e,"target",{value:e.composedPath()[0],configurable:!0,enumerable:!0}),e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(t=>{Object.defineProperty(e,t,{value:e.changedTouches[0][t],configurable:!0,enumerable:!0})}),e.originalEvent||(e.originalEvent=e),"paste"===e.type&&void 0===e.clipboardData&&this.__doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:()=>this.__doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))},this.currents=[],this.__stopped=[],this.__isDestructed=!1,e&&(this.__doc=e),this.__key+=new Date().getTime()}}function u(e){return e&&(0,s.isFunction)(e.addEventListener)}},72757:function(e,t,i){"use strict";i.d(t,{Eventify:function(){return o}});class o{on(e,t){var i;return this.__map.has(e)||this.__map.set(e,new Set),null==(i=this.__map.get(e))||i.add(t),this}off(e,t){var i;return this.__map.has(e)&&(null==(i=this.__map.get(e))||i.delete(t)),this}destruct(){this.__map.clear()}emit(e,...t){var i;let o;return this.__map.has(e)&&(null==(i=this.__map.get(e))||i.forEach(e=>{o=e(...t)})),o}constructor(){this.__map=new Map}}},57012:function(e,t,i){"use strict";let o=new(i(98220)).EventEmitter;i.d(t,["eventEmitter",0,o])},3827:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return o.EventEmitter},EventHandlersStore:function(){return s.EventHandlersStore},Eventify:function(){return n.Eventify},defaultNameSpace:function(){return s.defaultNameSpace},observable:function(){return r.observable}});var o=i(98220),n=i(72757),r=i(73026),s=i(15738)},73026:function(e,t,i){"use strict";i.d(t,{observable:function(){return c}});var o=i(68345),n=i(59292),r=i(72430),s=i(37790);let a=Symbol("observable-object");function l(e){return void 0!==e[a]}function c(e){if(l(e))return e;let t={},i={},c=(t,n)=>((0,o.isArray)(t)?t.map(e=>c(e,n)):(i[t]||(i[t]=[]),i[t].push(n)),e),d=(n,...r)=>{if((0,o.isArray)(n))return void n.map(e=>d(e,...r));try{!t[n]&&i[n]&&(t[n]=!0,i[n].forEach(t=>t.call(e,...r)))}finally{t[n]=!1}},u=(t,i=[])=>{let o={};l(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach(a=>{let l=i.concat(a).filter(e=>e.length);o[a]=t[a];let c=(0,s.getPropertyDescriptor)(t,a);Object.defineProperty(t,a,{set(t){let i=o[a];if(!(0,n.isFastEqual)(o[a],t)){d(["beforeChange","beforeChange."+l.join(".")],a,t),(0,r.isPlainObject)(t)&&u(t,l),c&&c.set?c.set.call(e,t):o[a]=t;let n=[];d(["change",...l.reduce((e,t)=>(n.push(t),e.push("change."+n.join(".")),e),[])],l.join("."),i,(null==t?void 0:t.valueOf)?t.valueOf():t)}},get:()=>c&&c.get?c.get.call(e):o[a],enumerable:!0,configurable:!0}),(0,r.isPlainObject)(o[a])&&u(o[a],l)}),Object.defineProperty(e,"on",{value:c}))};return u(e),e}},15738:function(e,t,i){"use strict";i.d(t,{EventHandlersStore:function(){return s}});var o=i(4510),n=i(38837);let r="JoditEventDefaultNamespace";class s{get(e,t){if(this.__store.has(t)){let i=this.__store.get(t);return(0,n.assert)(i,"-"),i[e]}}indexOf(e,t,i){let o=this.get(e,t);if(o){for(let e=0;e<o.length;e+=1)if(o[e].originalCallback===i)return e}return!1}namespaces(e=!1){let t=(0,o.toArray)(this.__store.keys());return e?t.filter(e=>e!==r):t}events(e){let t=this.__store.get(e);return t?Object.keys(t):[]}set(e,t,i,o=!1){let n=this.__store.get(t);n||(n={},this.__store.set(t,n)),void 0===n[e]&&(n[e]=[]),o?n[e].unshift(i):n[e].push(i)}clear(){this.__store.clear()}clearEvents(e,t){let i=this.__store.get(e);i&&i[t]&&(delete i[t],Object.keys(i).length||this.__store.delete(e))}isEmpty(){return 0===this.__store.size}constructor(){this.__store=new Map}}i.d(t,["defaultNameSpace",0,r])},580:function(e,t,i){"use strict";i.d(t,{getContainer:function(){return y},getPopupViewRoot:function(){return w},uniqueUid:function(){return g}});var o=i(19306),n=i(70799),r=i(39955),s=i(12475),a=i(29960),l=i(41180),c=i(80568),d=i(41876),u=i(57012),h=i(82758),p=i(22732);let f=1,m=new Set;function g(){function e(){return Math.round(f+=10*(Math.random()+1)).toString(16)}let t=e();for(;m.has(t);)t=e();return m.add(t),t}let b=new d.PluginSystem({getContainer:y}),v=new WeakMap;function y(e,t,i="div",l=!1){let d,u=(0,n.isString)(t)?t:t?(0,c.getClassName)(t.prototype):"jodit-utils",h=v.get(e)||{},f=u+i,m=(0,r.isViewObject)(e)?e:e.j;if(!h[f]){let t=m.c;if(d=w(m.o,m.container,e.od.body),l&&(0,o.isJoditObject)(e)&&e.od!==e.ed){t=e.createInside;let n="style"===i?e.ed.head:e.ed.body;d=(0,o.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:n}let n=t.element(i,{className:`jodit jodit-${(0,s.kebabCase)(u)}-container jodit-box`});m.o.nonce&&("style"===i||"script"===i)&&(0,a.attr)(n,"nonce",m.o.nonce),n.classList.add("jodit_theme_"+(m.o.theme||"default")),p.Dom.append(d,n),h[f]=n,e.hookStatus("beforeDestruct",()=>{m.events.off(n),p.Dom.safeRemove(n),delete h[f],Object.keys(h).length&&v.delete(e)}),v.set(e,h),m.events.fire("getContainer",n)}return h[f].classList.remove("jodit_theme_default","jodit_theme_dark"),h[f].classList.add("jodit_theme_"+(m.o.theme||"default")),h[f]}function w(e,t,i){var o,n,r;return null!=(r=null!=(n=null!=(o=e.popupRoot)?o:e.shadowRoot)?n:p.Dom.closest(t,e=>p.Dom.isHTMLElement(e)&&(p.Dom.isTag(e,"dialog")||["fixed","absolute"].includes((0,l.css)(e,"position"))),i))?r:i}let _=u.eventEmitter;i.d(t,["eventEmitter",0,_,"extendLang",0,e=>{Object.keys(e).forEach(t=>{h.lang[t]?Object.assign(h.lang[t],e[t]):h.lang[t]=e[t]})},"instances",0,{},"modules",0,{},"pluginSystem",0,b])},29999:function(e,t,i){"use strict";var o=i(68345);i.d(t,["asArray",0,e=>(0,o.isArray)(e)?e:[e]])},76855:function(e,t,i){"use strict";i.d(t,{asArray:function(){return o.asArray},splitArray:function(){return n.splitArray},toArray:function(){return r.toArray}});var o=i(29999),n=i(46559),r=i(4510)},46559:function(e,t,i){"use strict";function o(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}i.d(t,{splitArray:function(){return o}})},4510:function(e,t,i){"use strict";var o=i(70722),n=i(58844);i.d(t,["toArray",0,function(...e){var t;return((0,o.isNativeFunction)(Array.from)?Array.from:null!=(t=(0,n.reset)("Array.from"))?t:Array.from).apply(Array,e)}])},91898:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return o.clearTimeout},setTimeout:function(){return o.setTimeout}});var o=i(13252)},13252:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return r},setTimeout:function(){return n}});var o=i(82758);function n(e,t,...i){return t?o.globalWindow.setTimeout(e,t,...i):(e.call(null,...i),0)}function r(e){o.globalWindow.clearTimeout(e)}},54765:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return n}});var o=i(82758);function n(){let e;try{let t=o.globalDocument.createElement("input");t.type="color",t.value="!",e="color"===t.type&&"!"!==t.value}catch(t){e=!1}return e}},27613:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return o.hasBrowserColorPicker},hasContainer:function(){return u.hasContainer},isAbortError:function(){return n.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return u.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return c.isHTML},isHtmlFromWord:function(){return d.isHtmlFromWord},isInitable:function(){return u.isInitable},isInt:function(){return h.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return f.isLicense},isMarker:function(){return m.isMarker},isNativeFunction:function(){return g.isNativeFunction},isNumber:function(){return b.isNumber},isNumeric:function(){return v.isNumeric},isPlainObject:function(){return y.isPlainObject},isPromise:function(){return w.isPromise},isSet:function(){return _.isSet},isString:function(){return k.isString},isStringArray:function(){return k.isStringArray},isURL:function(){return C.isURL},isValidName:function(){return S.isValidName},isViewObject:function(){return x.isViewObject},isVoid:function(){return I.isVoid},isWindow:function(){return E.isWindow}});var o=i(54765),n=i(12045),r=i(68345),s=i(87612),a=i(59292),l=i(23282),c=i(58487),d=i(29673),u=i(60132),h=i(72913),p=i(19306),f=i(45603),m=i(78116),g=i(70722),b=i(84767),v=i(29807),y=i(72430),w=i(14773),_=i(42320),k=i(70799),C=i(26049),S=i(37508),x=i(39955),I=i(86068),E=i(52742)},12045:function(e,t,i){"use strict";function o(e){return!!e&&e instanceof DOMException&&"AbortError"===e.name}i.d(t,{isAbortError:function(){return o}})},68345:function(e,t,i){"use strict";function o(e){return Array.isArray(e)}i.d(t,{isArray:function(){return o}})},87612:function(e,t,i){"use strict";function o(e){return"boolean"==typeof e}i.d(t,{isBoolean:function(){return o}})},59292:function(e,t,i){"use strict";i.d(t,{isEqual:function(){return n},isFastEqual:function(){return r}});var o=i(67462);function n(e,t){return e===t||(0,o.stringify)(e)===(0,o.stringify)(t)}function r(e,t){return e===t}},23282:function(e,t,i){"use strict";function o(e){return"function"==typeof e}i.d(t,{isFunction:function(){return o}})},29673:function(e,t,i){"use strict";function o(e){return -1!==e.search(/<meta.*?Microsoft Excel\s[\d].*?>/)||-1!==e.search(/<meta.*?Microsoft Word\s[\d].*?>/)||-1!==e.search(/<meta[^>]*?ProgId[^>]*?(Word|Excel)\./i)||-1!==e.search(/<meta[^>]*?(LibreOffice|OpenOffice)/i)||-1!==e.search(/urn:schemas-microsoft-com:office:(word|excel)/)||-1!==e.search(/<\w[^>]*\sclass=("|')?Mso/)||-1!==e.search(/style='[^']*mso-/)||-1!==e.search(/style="[^"]*mso-/)&&-1!==e.search(/<font/)}i.d(t,{isHtmlFromWord:function(){return o}})},58487:function(e,t,i){"use strict";var o=i(70799);i.d(t,["isHTML",0,e=>(0,o.isString)(e)&&/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(e.replace(/[\r\n]/g,""))])},60132:function(e,t,i){"use strict";i.d(t,{hasContainer:function(){return l},isDestructable:function(){return a},isInitable:function(){return s}});var o=i(2748),n=i(23282),r=i(86068);function s(e){return!(0,r.isVoid)(e)&&(0,n.isFunction)(e.init)}function a(e){return!(0,r.isVoid)(e)&&(0,n.isFunction)(e.destruct)}function l(e){return!(0,r.isVoid)(e)&&o.Dom.isElement(e.container)}},72913:function(e,t,i){"use strict";i.d(t,{isInt:function(){return r}});var o=i(29807),n=i(70799);function r(e){return(0,n.isString)(e)&&(0,o.isNumeric)(e)&&(e=parseFloat(e)),"number"==typeof e&&Number.isFinite(e)&&!(e%1)}},19306:function(e,t,i){"use strict";i.d(t,{isJoditObject:function(){return n}});var o=i(23282);function n(e){return!!(e&&e instanceof Object&&(0,o.isFunction)(e.constructor)&&("u">typeof Jodit&&e instanceof Jodit||e.isJodit))}},45603:function(e,t,i){"use strict";var o=i(70799);i.d(t,["isLicense",0,e=>(0,o.isString)(e)&&23===e.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(e)])},78116:function(e,t,i){"use strict";i.d(t,{isMarker:function(){return n}});var o=i(2748);function n(e){return o.Dom.isMarker(e)}},70722:function(e,t,i){"use strict";function o(e){return!!e&&"function"===(typeof e).toLowerCase()&&(e===Function.prototype||/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code]\s*}\s*$/i.test(e+""))}i.d(t,{isNativeFunction:function(){return o}})},84767:function(e,t,i){"use strict";function o(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}i.d(t,{isNumber:function(){return o}})},29807:function(e,t,i){"use strict";i.d(t,{isNumeric:function(){return n}});var o=i(70799);function n(e){if((0,o.isString)(e)){if(!e.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},72430:function(e,t,i){"use strict";i.d(t,{isPlainObject:function(){return n}});var o=i(52742);function n(e){return!(!e||"object"!=typeof e||e.nodeType||(0,o.isWindow)(e))&&!(e.constructor&&!({}).hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},14773:function(e,t,i){"use strict";function o(e){return e&&"function"==typeof e.then}i.d(t,{isPromise:function(){return o}})},42320:function(e,t,i){"use strict";i.d(t,{isSet:function(){return n}});var o=i(23282);function n(e){return!!e&&(0,o.isFunction)(e.has)&&(0,o.isFunction)(e.add)&&(0,o.isFunction)(e.delete)}},70799:function(e,t,i){"use strict";i.d(t,{isString:function(){return n},isStringArray:function(){return r}});var o=i(68345);function n(e){return"string"==typeof e}function r(e){return(0,o.isArray)(e)&&n(e[0])}},26049:function(e,t,i){"use strict";i.d(t,{isURL:function(){return n}});var o=i(82758);function n(e){if(e.includes(" "))return!1;if("u">typeof URL)try{let t=new URL(e);return["https:","http:","ftp:","file:","rtmp:"].includes(t.protocol)}catch(e){return!1}let t=o.globalDocument.createElement("a");return t.href=e,!!t.hostname}},37508:function(e,t,i){"use strict";function o(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(e)&&e.trim().length>0}i.d(t,{isValidName:function(){return o}})},39955:function(e,t,i){"use strict";i.d(t,{isViewObject:function(){return n}});var o=i(23282);function n(e){return!!(e&&e instanceof Object&&(0,o.isFunction)(e.constructor)&&e.isView)}},86068:function(e,t,i){"use strict";function o(e){return null==e}i.d(t,{isVoid:function(){return o}})},52742:function(e,t,i){"use strict";function o(e){return null!=e&&e===e.window}i.d(t,{isWindow:function(){return o}})},35278:function(e,t,i){"use strict";i.d(t,["colorToHex",0,e=>{if("rgba(0, 0, 0, 0)"===e||""===e)return!1;if(!e)return"#000000";if("#"===e.substr(0,1))return e;let t=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!t)return"#000000";let i=parseInt(t[2],10),o=parseInt(t[3],10),n=(parseInt(t[4],10)|o<<8|i<<16).toString(16).toUpperCase();for(;n.length<6;)n="0"+n;return t[1]+"#"+n}])},32574:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return d}});var o=i(82758),n=i(2748),r=i(49055),s=i(29960),a=i(41180),l=i(76078);function c(e){return e.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi,"").replace(/mso-[a-z-]+:[\s]*[^";']+$/gi,"").replace(/border[a-z-]*:[\s]*[^;]+;/gi,"").replace(/([0-9.]+)(pt|cm)/gi,(e,t,i)=>{switch(i.toLowerCase()){case"pt":return(1.328*parseFloat(t)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(t)).toFixed(0)+"px"}return e})}function d(e){let t=/<html(?:\s[^>]*)?>/i.exec(e);if(!t)return e;let i=(e=e.substring(t.index)).toLowerCase().lastIndexOf("</html>");-1!==i&&(e=e.substring(0,i+7));let d=o.globalDocument.createElement("iframe");(0,a.css)(d,"display","none"),n.Dom.append(o.globalDocument.body,d);let u="";try{let t=d.contentDocument||(d.contentWindow?d.contentWindow.document:null);if(t){t.open(),t.write(e),t.close(),n.Dom.each(t.body,e=>{n.Dom.isElement(e)&&/mso-list:\s*ignore/i.test((0,s.attr)(e,"style")||"")&&n.Dom.safeRemove(e)});try{for(let e=0;e<t.styleSheets.length;e+=1){let i=t.styleSheets[e].cssRules;for(let e=0;e<i.length;e+=1)""!==i[e].selectorText&&(0,l.$$)(i[e].selectorText,t.body).forEach(t=>{t.style.cssText=c(i[e].style.cssText+";"+t.style.cssText)})}}catch(e){if(!o.IS_PROD)throw e}n.Dom.each(t.body,e=>{if(n.Dom.isElement(e)){let t=(0,s.attr)(e,"style");t&&(e.style.cssText=c(t)),(0,s.attr)(e,"style")||(0,s.attr)(e,"style",null)}}),u=t.firstChild?(0,r.trim)(t.body.innerHTML):""}}catch(e){}finally{n.Dom.safeRemove(d)}return u&&(e=u),(0,r.trim)(e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,""))}},53212:function(e,t,i){"use strict";i.d(t,{cleanFromWord:function(){return l}});var o=i(82758),n=i(2748),r=i(4510),s=i(49055),a=i(29960);function l(e){-1!==e.indexOf("<html ")&&(e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7));let t="";try{let i=o.globalDocument.createElement("div");i.innerHTML=e;let s=[];i.firstChild&&n.Dom.each(i,e=>{if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case"STYLE":case"LINK":case"META":s.push(e);break;case"W:SDT":case"W:SDTPR":case"FONT":n.Dom.unwrap(e);break;default:if(/mso-list:\s*ignore/i.test((0,a.attr)(e,"style")||"")){s.push(e);break}(0,r.toArray)(e.attributes).forEach(t=>{-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&(0,a.attrRaw)(e,t.name,null)})}break;case Node.TEXT_NODE:break;default:s.push(e)}}),n.Dom.safeRemove.apply(null,s),t=i.innerHTML}catch(e){}return t&&(e=t),(e=e.split(/(\n)/).filter(s.trim).join(`
|
|
18
|
-
`)).replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,"")}},53326:function(e,t,i){"use strict";i.d(t,{htmlspecialchars:function(){return n}});var o=i(82758);function n(e){let t=o.globalDocument.createElement("div");return t.textContent=e,t.innerHTML}},75275:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return o.applyStyles},cleanFromWord:function(){return n.cleanFromWord},htmlspecialchars:function(){return r.htmlspecialchars},nl2br:function(){return s.nl2br},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},stripTags:function(){return l.stripTags}});var o=i(32574),n=i(53212),r=i(53326),s=i(45971),a=i(86518),l=i(91003)},45971:function(e,t,i){"use strict";function o(e){return e.replace(/\r\n|\r|\n/g,"<br/>")}i.d(t,{nl2br:function(){return o}})},86518:function(e,t,i){"use strict";i.d(t,{safeHTML:function(){return l},sanitizeHTMLElement:function(){return p}});var o=i(2748),n=i(43555),r=i(29960);let s=new Set(["foreignobject","annotation-xml","desc","title"]),a=e=>!!(e&&/^(math|svg)$/i.test(e.nodeName));function l(e,t){var i;if(!o.Dom.isElement(e)&&!o.Dom.isFragment(e))return;let r=[];for(let t of(o.Dom.each(e,e=>{o.Dom.isElement(e)&&o.Dom.up(e.parentNode,a)&&r.push(e)}),r))o.Dom.isOrContains(e,t)&&function(e){if("http://www.w3.org/1999/xhtml"!==e.namespaceURI||null==o.Dom.up(e,a))return!1;for(let t=e.parentElement;t;t=t.parentElement){let e=t.nodeName.toLowerCase();if("math"===e||"svg"===e)break;if(s.has(e))return!1}return!0}(t)&&o.Dom.safeRemove(t);let l=[];for(let t of(o.Dom.each(e,e=>{o.Dom.isElement(e)&&"NOSCRIPT"===e.nodeName&&l.push(e)}),l))o.Dom.safeRemove(t);let d=null!=(i=t.removeEventAttributes)?i:t.removeOnError,u=e=>{if(o.Dom.isElement(e)&&(d&&c(e),p(e,t),t.safeLinksTarget&&"A"===e.nodeName&&"_blank"===(0,n.attr)(e,"target"))){let t=((0,n.attr)(e,"rel")||"").split(/\s+/).filter(Boolean);t.includes("noopener")||t.push("noopener"),t.includes("noreferrer")||t.push("noreferrer"),(0,n.attr)(e,"rel",t.join(" "))}};u(e),o.Dom.each(e,u)}function c(e){if(!o.Dom.isElement(e))return!1;let t=!1,i=[];for(let t=0;t<e.attributes.length;t++)e.attributes[t].name.toLowerCase().startsWith("on")&&i.push(e.attributes[t].name);for(let o of i)(0,r.attrRaw)(e,o,null),t=!0;return t}let d=["src","data","action","formaction","poster","background","xlink:href"],u=new Set(["iframe","frame","object","embed"]);function h(e,t){let i=e.replace(/[\u0000-\u0020]+/g,"").toLowerCase();return!!(/^(?:javascript|vbscript|livescript|mocha):/.test(i)||/^data:(?:text\/html|application\/xhtml)/.test(i))||/^data:image\/svg/.test(i)&&u.has(t)}function p(e,{safeJavaScriptLink:t,removeOnError:i,removeEventAttributes:s}={safeJavaScriptLink:!0,removeOnError:!0}){if(!o.Dom.isElement(e))return!1;let a=!1;s&&c(e)&&(a=!0),i&&e.hasAttribute("onerror")&&((0,n.attr)(e,"onerror",null),a=!0);let l=e.nodeName.toLowerCase(),u=(0,n.attr)(e,"href");if(t&&u&&h(u,l)){let t="u">typeof location?location.protocol:"http:";(0,n.attr)(e,"href",t+"//"+u),a=!0}if(t)for(let t of(e.hasAttribute("srcdoc")&&((0,n.attr)(e,"srcdoc",null),a=!0),d)){let i=(0,r.attrRaw)(e,t);i&&h(i,l)&&((0,n.attr)(e,t,null),a=!0)}return a}},91003:function(e,t,i){"use strict";i.d(t,{stripTags:function(){return function e(t,i=document,c=null,d=!1){let u=i.createElement("div");(0,n.isString)(t)?u.innerHTML=t:o.Dom.append(u,t);let h=[];return o.Dom.each(u,e=>{o.Dom.isElement(e)&&h.push(e)}),h.forEach(t=>{if(!t.parentNode)return;if(c&&o.Dom.isTag(t,c)){let n=t.nodeName.toLowerCase(),r=o.Dom.isTag(t,l)?`%%%jodit-single-${n}%%%`:`%%%jodit-${n}%%%${e(t.innerHTML,i,c,d)}%%%/jodit-${n}%%%`;o.Dom.before(t,i.createTextNode(r)),o.Dom.safeRemove(t);return}if(o.Dom.isTag(t,a))return void o.Dom.safeRemove(t);if(!o.Dom.isTag(t,s))return;let n=t.nextSibling;!(o.Dom.isText(n)&&/^\s/.test(n.nodeValue||""))&&n&&o.Dom.before(n,i.createTextNode(d?"%%%jodit-single-br%%%":" "))}),(0,r.trim)(u.innerText).replace(/%%%(\/)?jodit(-single)?-([\w\n]+)%%%/g,(e,t,i,o)=>`<${t?"/":""}${o}>`)}}});var o=i(2748),n=i(70799),r=i(49055);let s=new Set(["div","p","br","h1","h2","h3","h4","h5","h6","hr"]),a=new Set(["script","style"]),l=new Set(["br","hr","input"])},21537:function(e,t,i){"use strict";i.r(t),i.d(t,{$$:function(){return u.$$},CamelCaseToKebabCase:function(){return d.CamelCaseToKebabCase},ConfigDeepFlatten:function(){return u.ConfigDeepFlatten},ConfigFlatten:function(){return u.ConfigFlatten},ConfigMerge:function(){return u.ConfigMerge},ConfigProto:function(){return u.ConfigProto},ConnectionError:function(){return u.ConnectionError},LimitedStack:function(){return u.LimitedStack},NUMBER_FIELDS_REG:function(){return l.NUMBER_FIELDS_REG},OptionsError:function(){return u.OptionsError},UNSAFE_PROTO_KEYS:function(){return u.UNSAFE_PROTO_KEYS},abort:function(){return u.abort},alignElement:function(){return u.alignElement},alreadyLoadedList:function(){return u.alreadyLoadedList},appendScriptAsync:function(){return u.appendScriptAsync},appendStyleAsync:function(){return u.appendStyleAsync},applyStyles:function(){return a.applyStyles},asArray:function(){return o.asArray},assert:function(){return u.assert},attr:function(){return u.attr},attrRaw:function(){return u.attrRaw},browser:function(){return u.browser},buildQuery:function(){return u.buildQuery},call:function(){return u.call},callPromise:function(){return u.callPromise},callThis:function(){return u.callThis},camelCase:function(){return d.camelCase},cleanFromWord:function(){return a.cleanFromWord},clearAlign:function(){return u.clearAlign},clearCenterAlign:function(){return u.clearCenterAlign},clearTimeout:function(){return n.clearTimeout},cns:function(){return u.cns},colorToHex:function(){return s.colorToHex},completeUrl:function(){return u.completeUrl},connection:function(){return u.connection},convertMediaUrlToVideoEmbed:function(){return u.convertMediaUrlToVideoEmbed},createMediaWrapper:function(){return u.createMediaWrapper},css:function(){return u.css},cssInline:function(){return u.cssInline},cssPath:function(){return u.cssPath},ctrlKey:function(){return u.ctrlKey},dataBind:function(){return u.dataBind},defaultLanguage:function(){return u.defaultLanguage},error:function(){return u.error},fastClone:function(){return u.fastClone},fuzzySearchIndex:function(){return d.fuzzySearchIndex},get:function(){return u.get},getAlignClasses:function(){return u.getAlignClasses},getClassName:function(){return u.getClassName},getContentWidth:function(){return c.getContentWidth},getDataTransfer:function(){return u.getDataTransfer},getFixedPositionOffset:function(){return c.getFixedPositionOffset},getHAlign:function(){return u.getHAlign},getMediaWrapper:function(){return u.getMediaWrapper},getPropertyDescriptor:function(){return u.getPropertyDescriptor},getScrollParent:function(){return c.getScrollParent},getWrappedMedia:function(){return u.getWrappedMedia},getXPathByElement:function(){return u.getXPathByElement},hAlignElement:function(){return u.hAlignElement},hasBrowserColorPicker:function(){return r.hasBrowserColorPicker},hasContainer:function(){return r.hasContainer},htmlspecialchars:function(){return a.htmlspecialchars},humanSizeToBytes:function(){return u.humanSizeToBytes},i18n:function(){return d.i18n},inView:function(){return u.inView},innerWidth:function(){return c.innerWidth},isAbortError:function(){return r.isAbortError},isArray:function(){return r.isArray},isAtom:function(){return u.isAtom},isBoolean:function(){return r.isBoolean},isDestructable:function(){return r.isDestructable},isEqual:function(){return r.isEqual},isFastEqual:function(){return r.isFastEqual},isFunction:function(){return r.isFunction},isHTML:function(){return r.isHTML},isHtmlFromWord:function(){return r.isHtmlFromWord},isInitable:function(){return r.isInitable},isInt:function(){return r.isInt},isJoditObject:function(){return r.isJoditObject},isLicense:function(){return r.isLicense},isMarker:function(){return r.isMarker},isNativeFunction:function(){return r.isNativeFunction},isNumber:function(){return r.isNumber},isNumeric:function(){return r.isNumeric},isPlainObject:function(){return r.isPlainObject},isPromise:function(){return r.isPromise},isSet:function(){return r.isSet},isString:function(){return r.isString},isStringArray:function(){return r.isStringArray},isURL:function(){return r.isURL},isUnsafeProtoKey:function(){return u.isUnsafeProtoKey},isValidName:function(){return r.isValidName},isViewObject:function(){return r.isViewObject},isVoid:function(){return r.isVoid},isWindow:function(){return r.isWindow},kebabCase:function(){return d.kebabCase},keepNames:function(){return u.keepNames},keys:function(){return u.keys},loadImage:function(){return u.loadImage},loadNext:function(){return u.loadNext},loadNextStyle:function(){return u.loadNextStyle},markAsAtomic:function(){return u.markAsAtomic},markDeprecated:function(){return u.markDeprecated},markOwner:function(){return u.markOwner},memorizeExec:function(){return u.memorizeExec},nl2br:function(){return a.nl2br},normalizeColor:function(){return l.normalizeColor},normalizeCssNumericValue:function(){return l.normalizeCssNumericValue},normalizeCssValue:function(){return l.normalizeCssValue},normalizeKeyAliases:function(){return l.normalizeKeyAliases},normalizeLicense:function(){return l.normalizeLicense},normalizePath:function(){return l.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return l.normalizeSize},normalizeUrl:function(){return l.normalizeUrl},offset:function(){return c.offset},options:function(){return u.options},parseQuery:function(){return u.parseQuery},position:function(){return c.position},previewBox:function(){return u.previewBox},refs:function(){return u.refs},reset:function(){return u.reset},resolveElement:function(){return u.resolveElement},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},scrollIntoViewIfNeeded:function(){return u.scrollIntoViewIfNeeded},set:function(){return u.set},setTimeout:function(){return n.setTimeout},size:function(){return c.size},splitArray:function(){return o.splitArray},sprintf:function(){return d.sprintf},stringify:function(){return d.stringify},stripTags:function(){return a.stripTags},toArray:function(){return o.toArray},trim:function(){return d.trim},trimChars:function(){return d.trimChars},trimInv:function(){return d.trimInv},ucfirst:function(){return d.ucfirst},wrapMedia:function(){return u.wrapMedia}});var o=i(76855),n=i(91898),r=i(27613),s=i(35278),a=i(75275),l=i(71521),c=i(56175),d=i(59007),u=i(43555)},71521:function(e,t,i){"use strict";i.d(t,{NUMBER_FIELDS_REG:function(){return n.NUMBER_FIELDS_REG},normalizeColor:function(){return o.normalizeColor},normalizeCssNumericValue:function(){return n.normalizeCssNumericValue},normalizeCssValue:function(){return n.normalizeCssValue},normalizeKeyAliases:function(){return r.normalizeKeyAliases},normalizeLicense:function(){return s.normalizeLicense},normalizePath:function(){return a.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return c.normalizeSize},normalizeUrl:function(){return d.normalizeUrl}});var o=i(21224),n=i(3760),r=i(49033),s=i(12972),a=i(9992),l=i(70091),c=i(46334),d=i(37406)},21224:function(e,t,i){"use strict";var o=i(35278),n=i(49055);i.d(t,["normalizeColor",0,e=>{let t=["#"],i=(0,o.colorToHex)(e);if(!i)return!1;if(3===(i=(i=(0,n.trim)(i.toUpperCase())).substring(1)).length){for(let e=0;e<3;e+=1)t.push(i[e]),t.push(i[e]);return t.join("")}return i.length>6&&(i=i.slice(0,6)),"#"+i}])},3760:function(e,t,i){"use strict";i.d(t,{normalizeCssNumericValue:function(){return l},normalizeCssValue:function(){return c}});var o=i(29807),n=i(86068),r=i(35278),s=i(12475);let a=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;function l(e,t){return!(0,n.isVoid)(t)&&a.test(e)&&(0,o.isNumeric)(t.toString())?parseInt(t.toString(),10)+"px":t}function c(e,t){if("font-weight"===(0,s.kebabCase)(e)){switch(t.toString().toLowerCase()){case"700":case"bold":return 700;case"400":case"normal":return 400;case"900":case"heavy":return 900}return(0,o.isNumeric)(t)?Number(t):t}return/color/i.test(e)&&/^rgb/i.test(t.toString())&&(0,r.colorToHex)(t.toString())||t}i.d(t,["NUMBER_FIELDS_REG",0,a])},49033:function(e,t,i){"use strict";i.d(t,{normalizeKeyAliases:function(){return r}});var o=i(82758),n=i(49055);function r(e){let t={},i={meta:1,ctrl:2,control:2,alt:3,shift:4,space:5};return e.replace(/\+\+/g,"+add").split(/[\s]*\+[\s]*/).map(e=>(0,n.trim)(e.toLowerCase())).map(e=>o.KEY_ALIASES[e]||e).sort((e,t)=>i[e]&&!i[t]?-1:!i[e]&&i[t]?1:i[e]&&i[t]?i[e]-i[t]:e>t?1:-1).filter(e=>!t[e]&&""!==e&&(t[e]=!0)).join("+")}},12972:function(e,t,i){"use strict";i.d(t,["normalizeLicense",0,(e,t=8)=>{let i=[];for(;e.length;)i.push(e.substr(0,t)),e=e.substr(t);return i[1]=i[1].replace(/./g,"*"),i[2]=i[2].replace(/./g,"*"),i.join("-")}])},9992:function(e,t,i){"use strict";var o=i(49055);i.d(t,["normalizePath",0,(...e)=>e.filter(e=>(0,o.trim)(e).length).map((t,i)=>(t=t.replace(/([^:])[\\/]+/g,"$1/"),i&&(t=t.replace(/^\//,"")),i!==e.length-1&&(t=t.replace(/\/$/,"")),t)).join("/")])},70091:function(e,t,i){"use strict";i.d(t,["normalizeRelativePath",0,e=>e.split("/").reduce((e,t)=>{switch(t){case"":case".":break;case"..":e.pop();break;default:e.push(t)}return e},[]).join("/")+(e.endsWith("/")?"/":"")])},46334:function(e,t,i){"use strict";i.d(t,["normalizeSize",0,(e,t)=>/^[0-9]+$/.test(e.toString())?e+t:e.toString()])},37406:function(e,t,i){"use strict";i.d(t,["normalizeUrl",0,(...e)=>e.filter(e=>e.length).map(e=>e.replace(/\/$/,"")).join("/").replace(/([^:])[\\/]+/g,"$1/")])},44506:function(e,t,i){"use strict";i.d(t,["getContentWidth",0,(e,t)=>{let i=t.getComputedStyle(e);return e.offsetWidth-parseInt(i.getPropertyValue("padding-left")||"0",10)-parseInt(i.getPropertyValue("padding-right")||"0",10)}])},35224:function(e,t,i){"use strict";function o(e){var t,i;let o=null==(t=e.ownerDocument)?void 0:t.defaultView,n=e.parentElement;for(;o&&n;){if(""!==(i=o.getComputedStyle(n)).transform&&"none"!==i.transform||""!==i.perspective&&"none"!==i.perspective||""!==i.filter&&"none"!==i.filter||"transform"===i.willChange||"perspective"===i.willChange||"filter"===i.willChange||"paint"===i.contain||"layout"===i.contain||"strict"===i.contain||"content"===i.contain){let e=n.getBoundingClientRect();return{x:e.left,y:e.top}}n=n.parentElement}return{x:0,y:0}}i.d(t,{getFixedPositionOffset:function(){return o}})},16442:function(e,t,i){"use strict";i.d(t,{getScrollParent:function(){return function e(t){if(!t)return null;let i=n.Dom.isHTMLElement(t),s=i&&(0,r.css)(t,"overflowY");return i&&"visible"!==s&&"hidden"!==s&&t.scrollHeight>=t.clientHeight?t:e(t.parentNode)||o.globalDocument.scrollingElement||o.globalDocument.body}}});var o=i(82758),n=i(2748),r=i(43555)},56175:function(e,t,i){"use strict";i.d(t,{getContentWidth:function(){return o.getContentWidth},getFixedPositionOffset:function(){return n.getFixedPositionOffset},getScrollParent:function(){return r.getScrollParent},innerWidth:function(){return s.innerWidth},offset:function(){return l.offset},position:function(){return c.position},size:function(){return a.size}});var o=i(44506),n=i(35224),r=i(16442),s=i(81630),a=i(21496),l=i(81284),c=i(5700)},81630:function(e,t,i){"use strict";i.d(t,["innerWidth",0,(e,t)=>{let i=t.getComputedStyle(e);return e.clientWidth-(parseFloat(i.paddingLeft||"0")+parseFloat(i.paddingRight||"0"))}])},21496:function(e,t,i){"use strict";i.d(t,{size:function(){return n}});var o=i(27613);function n(e){return(0,o.isString)(e)||(0,o.isArray)(e)?e.length:(0,o.isPlainObject)(e)?Object.keys(e).length:0}},81284:function(e,t,i){"use strict";let o=(e,t,i,n=!1)=>{let r,s,a;try{r=e.getBoundingClientRect()}catch(e){r={top:0,bottom:0,left:0,right:0,width:0,height:0}}let l=i.body,c=i.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},d=i.defaultView||i.parentWindow,u=d.pageYOffset||c.scrollTop||l.scrollTop,h=d.pageXOffset||c.scrollLeft||l.scrollLeft,p=c.clientTop||l.clientTop||0,f=c.clientLeft||l.clientLeft||0,m=t.iframe;if(!n&&t&&t.options&&t.o.iframe&&m){let{top:e,left:i}=o(m,t,t.od,!0);s=r.top+e,a=r.left+i}else s=r.top+u-p,a=r.left+h-f;return{top:Math.round(s),left:Math.round(a),width:r.width,height:r.height}};i.d(t,["offset",0,o])},5700:function(e,t,i){"use strict";i.d(t,{position:function(){return function e(t,i,n=!1){var r,s;let a=t.getBoundingClientRect(),l=a.left,c=a.top;if((0,o.isJoditObject)(i)&&i.iframe&&i.ed.body.contains(t)&&!n){let{left:t,top:o}=e(i.iframe,i,!0);l+=t,c+=o}return{left:Math.round(l),top:Math.round(c),width:Math.round(null!=(r=t.offsetWidth)?r:a.width),height:Math.round(null!=(s=t.offsetHeight)?s:a.height)}}}});var o=i(19306)},87058:function(e,t,i){"use strict";i.d(t,["camelCase",0,e=>e.replace(/([-_])(.)/g,(e,t,i)=>i.toUpperCase())])},67477:function(e,t,i){"use strict";i.d(t,{fuzzySearchIndex:function(){return n}});var o=i(82758);function n(e,t,i=0,r=1){let s=0,a,l=-1,c=0,d=0;for(a=i;s<e.length&&a<t.length;)e[s].toLowerCase()===t[a].toLowerCase()?(s++,c++,d=0,-1===l&&(l=a)):s>0&&(d>=r&&t[a]!==o.INVISIBLE_SPACE?(s=0,l=-1,c=0,d=0,a--):(d++,c++)),a++;return s===e.length?[l,c]:[-1,0]}},56967:function(e,t,i){"use strict";i.d(t,{i18n:function(){return c}});var o=i(82758),n=i(70799),r=i(36409),s=i(43555),a=i(6441);let l=(e,t)=>{if(!t||!t.length)return e;let i=/%([sd])/g,o=i.exec(e),n=e,r=0;for(;o&&void 0!==t[r];)n=n.replace(o[0],t[r].toString()),r+=1,o=i.exec(e);return n};function c(e,t,i){if(!(0,n.isString)(e))throw(0,s.error)("i18n: Need string in first argument");if(!e.length)return e;let c=!!(null==i?void 0:i.debugLanguage),d={},u=e=>t&&t.length?l(e,t):e,h=(0,s.defaultLanguage)(a.Config.defaultOptions.language,a.Config.defaultOptions.language),p=(0,s.defaultLanguage)(null==i?void 0:i.language,h),f=t=>{if(!t)return;if((0,n.isString)(t[e]))return u(t[e]);let i=e.toLowerCase();if((0,n.isString)(t[i]))return u(t[i]);let o=(0,r.ucfirst)(e);if((0,n.isString)(t[o]))return u(t[o])};void 0!==o.lang[p]?d=o.lang[p]:c||(d=void 0!==o.lang[h]?o.lang[h]:o.lang.en);let m=null==i?void 0:i.i18n;if(m&&m[p]){let e=f(m[p]);if(e)return e}return f(d)||(!c&&o.lang.en&&(0,n.isString)(o.lang.en[e])&&o.lang.en[e]?u(o.lang.en[e]):c?"{"+e+"}":(o.IS_PROD,u(e)))}i.d(t,["sprintf",0,l])},59007:function(e,t,i){"use strict";i.d(t,{CamelCaseToKebabCase:function(){return s.CamelCaseToKebabCase},camelCase:function(){return o.camelCase},fuzzySearchIndex:function(){return n.fuzzySearchIndex},i18n:function(){return r.i18n},kebabCase:function(){return s.kebabCase},sprintf:function(){return r.sprintf},stringify:function(){return a.stringify},trim:function(){return l.trim},trimChars:function(){return l.trimChars},trimInv:function(){return l.trimInv},ucfirst:function(){return c.ucfirst}});var o=i(87058),n=i(67477),r=i(56967),s=i(12475),a=i(67462),l=i(49055),c=i(36409)},12475:function(e,t,i){"use strict";i.d(t,["CamelCaseToKebabCase",0,e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),"kebabCase",0,e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()])},67462:function(e,t,i){"use strict";function o(e,t={}){if("object"!=typeof e)return e+"";let i=new Set(t.excludeKeys),n=new WeakMap;return JSON.stringify(e,(e,t)=>{if(!i.has(e)){if("object"==typeof t&&null!=t){if(n.get(t))return"[refObject]";n.set(t,!0)}return t}},t.prettify)}i.d(t,{stringify:function(){return o}})},49055:function(e,t,i){"use strict";i.d(t,{trim:function(){return n},trimChars:function(){return r},trimInv:function(){return s}});var o=i(82758);function n(e){return e.replace((0,o.SPACE_REG_EXP_END)(),"").replace((0,o.SPACE_REG_EXP_START)(),"")}function r(e,t){return e.replace(RegExp(`[${t}]+$`),"").replace(RegExp(`^[${t}]+`),"")}function s(e){return e.replace((0,o.INVISIBLE_SPACE_REG_EXP_END)(),"").replace((0,o.INVISIBLE_SPACE_REG_EXP_START)(),"")}},36409:function(e,t,i){"use strict";function o(e){return e.length?e[0].toUpperCase()+e.substring(1):""}i.d(t,{ucfirst:function(){return o}})},25726:function(e,t,i){"use strict";i.d(t,{alignElement:function(){return p},clearAlign:function(){return u},getAlignClasses:function(){return c},getHAlign:function(){return d},hAlignElement:function(){return function e(t,i,o){var n;if(o){e(t,"normal"),Object.values(o).forEach(e=>l(e).forEach(e=>t.classList.remove(...e))),t.classList.add(...null!=(n=l(o[i||"normal"])[0])?n:[]),["class","style"].forEach(e=>{var i;(null==(i=(0,r.attr)(t,e))?void 0:i.trim())||(0,r.attr)(t,e,null)});return}i&&"normal"!==i?"center"!==i?((0,s.css)(t,"float",i),(0,s.clearCenterAlign)(t)):(0,s.css)(t,{float:"",display:"block",marginLeft:"auto",marginRight:"auto"}):((0,s.css)(t,"float")&&-1!==["right","left"].indexOf((0,s.css)(t,"float").toString().toLowerCase())&&(0,s.css)(t,"float",""),(0,s.clearCenterAlign)(t))}}});var o=i(22732),n=i(68345),r=i(29960),s=i(41180),a=i(61477);let l=e=>((0,n.isArray)(e)?e:[null!=e?e:""]).map(e=>e.split(/\s+/).filter(Boolean)).filter(e=>e.length);function c(e,t){var i,n;if(!t)return null;let r=o.Dom.isTag(t,new Set(["jodit","jodit-media"]))?t.firstElementChild:(0,a.getWrappedMedia)(e,t),s=(null!=r?r:t).nodeName.toLowerCase();return null!=(n=null==(i=e.o.alignClasses)?void 0:i[s])?n:"img"===s?e.o.imageAlignClasses:null}function d(e,t){if(t){for(let i of["left","right","center","normal"])if(l(t[i]).some(t=>t.every(t=>e.classList.contains(t))))return i}let i=(0,s.cssInline)(e,"float").toLowerCase();return"left"===i||"right"===i?i:"block"===(0,s.css)(e,"display")&&"auto"===(0,s.cssInline)(e,"margin-left")&&"auto"===(0,s.cssInline)(e,"margin-right")?"center":"normal"}function u(e){o.Dom.each(e,e=>{o.Dom.isHTMLElement(e)&&(0,s.cssInline)(e,"textAlign")&&((0,s.css)(e,"textAlign",""),((0,r.attr)(e,"style")||"").trim().length||(0,r.attr)(e,"style",null))})}let h=new Map([["justifyfull","justify"],["justifyright","right"],["justifyleft","left"],["justifycenter","center"]]);function p(e,t){if(o.Dom.isNode(t)&&o.Dom.isElement(t)){u(t);let i=h.get(e.toLowerCase());i&&(0,s.css)(t,"textAlign",i)}}},63799:function(e,t,i){"use strict";i.d(t,{loadNext:function(){return function e(t,i,o=0){return(0,n.isString)(i[o])?c(t,i[o]).then(()=>e(t,i,o+1)):Promise.resolve()}},loadNextStyle:function(){return function e(t,i,o=0){return(0,n.isString)(i[o])?d(t,i[o]).then(()=>e(t,i,o+1)):Promise.resolve()}}});var o=i(2748),n=i(70799),r=i(29960),s=i(66292);let a=new Map,l=e=>(t,i)=>{if(a.has(i))return a.get(i);let o=e(t,i);return a.set(i,o),o},c=l((e,t)=>e.async.promise((i,n)=>{if(e.isInDestruct)return n();let a=e.c.element("script",{type:"text/javascript",crossorigin:"anonymous",referrerpolicy:"no-referrer",async:!0,src:(0,s.completeUrl)(t)});e.o.nonce&&(0,r.attr)(a,"nonce",e.o.nonce),e.e.one(a,"error",n).one(a,"load",i),o.Dom.append(e.od.body,a)})),d=l((e,t)=>e.async.promise((i,n)=>{if(e.isInDestruct)return n();let a=e.c.element("link",{rel:"stylesheet",media:"all",crossorigin:"anonymous"});e.o.nonce&&(0,r.attr)(a,"nonce",e.o.nonce),e.isInDestruct||e.e.on(a,"load",()=>i(a)).on(a,"error",n),(0,r.attr)(a,"href",(0,s.completeUrl)(t)),e.o.shadowRoot?o.Dom.append(e.o.shadowRoot,a):o.Dom.append(e.od.body,a)}));i.d(t,["alreadyLoadedList",0,a,"appendScriptAsync",0,c,"appendStyleAsync",0,d])},38837:function(e,t,i){"use strict";i.d(t,{assert:function(){return n}});class o extends Error{constructor(e){super(e),this.name="AssertionError"}}function n(e,t){if(!e)throw new o("Assertion failed: "+t)}},29960:function(e,t,i){"use strict";i.d(t,{attr:function(){return function e(t,i,l){if(!t||!(0,o.isFunction)(t.getAttribute))return null;if(!(0,r.isString)(i))return Object.keys(i).forEach(o=>{let r=i[o];(0,n.isPlainObject)(r)&&"style"===o?(0,a.css)(t,r):("className"===o&&(o="class"),e(t,o,r))}),null;let c=(0,s.CamelCaseToKebabCase)(i);if(/^-/.test(c)){let i=e(t,"data"+c);if(i)return i;c=c.substr(1)}if(void 0!==l)if(null==l)t.hasAttribute(c)&&t.removeAttribute(c);else{let e=l.toString();return"IMG"===t.nodeName&&("width"===c||"height"===c)&&(e=e.replace("px","")),t.setAttribute(c,e),e}return t.getAttribute(c)}},attrRaw:function(){return l}});var o=i(23282),n=i(72430),r=i(70799),s=i(12475),a=i(41180);function l(e,t,i){if(void 0===i)return e.getAttribute(t);if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}e.setAttribute(t,i)}},97639:function(e,t,i){"use strict";i.d(t,["browser",0,e=>{let t=navigator.userAgent.toLowerCase(),i=/(firefox)[\s/]([\w.]+)/.exec(t)||/(chrome)[\s/]([\w.]+)/.exec(t)||/(webkit)[\s/]([\w.]+)/.exec(t)||/(opera)(?:.*version)[\s/]([\w.]+)/.exec(t)||/(msie)[\s]([\w.]+)/.exec(t)||/(trident)\/([\w.]+)/.exec(t)||0>t.indexOf("compatible")||[];return"version"===e?i[2]:"webkit"===e?"chrome"===i[1]||"webkit"===i[1]:"ff"===e?"firefox"===i[1]:"msie"===e?"trident"===i[1]||"msie"===i[1]:i[1]===e}])},44710:function(e,t,i){"use strict";var o=i(72430);let n=(e,t)=>{let i=[],r=encodeURIComponent;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)){let a=t?t+"["+s+"]":s,l=e[s];i.push((0,o.isPlainObject)(l)?n(l,a):r(a)+"="+r(l))}return i.join("&")};i.d(t,["buildQuery",0,n])},66292:function(e,t,i){"use strict";var o=i(82758);i.d(t,["completeUrl",0,e=>("file:"===o.globalWindow.location.protocol&&/^\/\//.test(e)&&(e="https:"+e),e)])},68934:function(e,t,i){"use strict";i.d(t,{ConfigDeepFlatten:function(){return function e(t){return(0,d.keys)(t,!1).reduce((i,o)=>(i[o]=(0,n.isPlainObject)(t[o])?e(t[o]):t[o],i),{})}},ConfigFlatten:function(){return u},ConfigMerge:function(){return function e(t,i){Object.keys(i).forEach(o=>{if((0,c.isUnsafeProtoKey)(o))return;let r=i[o],s=t[o];(0,n.isPlainObject)(r)&&(0,n.isPlainObject)(s)&&!(0,l.isAtom)(r)?e(s,r):t[o]=r})}},ConfigProto:function(){return function e(t,i,d=0){if(Object.getPrototypeOf(t)!==Object.prototype)return t;let u=a.Config.defaultOptions;if((0,r.isString)(t.preset)){if(void 0!==u.presets[t.preset]){let e=u.presets[t.preset];Object.keys(e).forEach(i=>{(0,s.isVoid)(t[i])&&(t[i]=e[i])})}delete t.preset}let h={};return Object.keys(t).forEach(r=>{if((0,c.isUnsafeProtoKey)(r))return;let s=t[r],a=i?i[r]:null;if((0,n.isPlainObject)(s)&&(0,n.isPlainObject)(a)&&!(0,l.isAtom)(s)){h[r]=e(s,a,d+1);return}if(0!==d&&(0,o.isArray)(s)&&!(0,l.isAtom)(s)&&(0,o.isArray)(a)){h[r]=[...s,...a.slice(s.length)];return}h[r]=s}),Object.setPrototypeOf(h,i),h}}});var o=i(68345),n=i(72430),r=i(70799),s=i(86068),a=i(6441),l=i(97735),c=i(69175),d=i(37790);function u(e){return(0,d.keys)(e,!1).reduce((t,i)=>(t[i]=e[i],t),{})}},55877:function(e,t,i){"use strict";var o=i(82758),n=i(26049),r=i(82501);i.d(t,["convertMediaUrlToVideoEmbed",0,(e,{width:t=400,height:i=345}={})=>{if(!(0,n.isURL)(e))return e;let s=o.globalDocument.createElement("a");s.href=e,t||(t=400),i||(i=345);let a=s.protocol||"";switch(s.hostname){case"www.vimeo.com":case"vimeo.com":{let o=s.pathname.split("/").filter(Boolean),n=o.findIndex(e=>/^\d+$/.test(e));if(-1===n)return e;let r=o[n],l=o[n+1];return l&&0===n&&(r+="/"+l),'<iframe width="'+t+'" height="'+i+'" src="'+a+"//player.vimeo.com/video/"+r+'" frameborder="0" allowfullscreen></iframe>'}case"youtube.com":case"www.youtube.com":case"m.youtube.com":case"music.youtube.com":case"youtu.be":case"www.youtu.be":{let o=(s.search?(0,r.parseQuery)(s.search):{}).v||s.pathname.substring(1);return(o=o.replace(/^(watch|embed|shorts|live|v)\//,"").replace(/\/$/,""))?'<iframe width="'+t+'" height="'+i+'" src="'+a+"//www.youtube.com/embed/"+o+'" frameborder="0" allowfullscreen></iframe>':e}}return e}])},41180:function(e,t,i){"use strict";i.d(t,{css:function(){return l},cssInline:function(){return c}});var o=i(87612),n=i(72430),r=i(3760),s=i(87058),a=i(12475);function l(e,t,i,c=!1){if((0,o.isBoolean)(i)&&(c=i,i=void 0),(0,n.isPlainObject)(t)||void 0!==i){let o=(e,t,i)=>{void 0!==(i=(0,r.normalizeCssNumericValue)(t,i))&&(null==i||l(e,t,!0)!==(0,r.normalizeCssValue)(t,i))&&(e.style[t]=i)};if((0,n.isPlainObject)(t)){let i=Object.keys(t);for(let n=0;n<i.length;n+=1)o(e,(0,s.camelCase)(i[n]),t[i[n]])}else o(e,(0,s.camelCase)(t),i);return""}let d=(0,a.kebabCase)(t),u=e.ownerDocument||document,h=!!u&&(u.defaultView||u.parentWindow),p=e.style[t],f="";return void 0!==p&&""!==p?f=p:h&&!c&&(f=h.getComputedStyle(e).getPropertyValue(d)),r.NUMBER_FIELDS_REG.test(t)&&/^[-+]?[0-9.]+px$/.test(f.toString())&&(f=parseInt(f.toString(),10)),(0,r.normalizeCssValue)(t,f)}function c(e,t){return e.style.getPropertyValue((0,a.kebabCase)(t))}i.d(t,["clearCenterAlign",0,e=>{"block"===l(e,"display")&&l(e,"display","");let{style:t}=e;"auto"===t.marginLeft&&"auto"===t.marginRight&&(t.marginLeft="",t.marginRight="")}])},15456:function(e,t,i){"use strict";i.d(t,["ctrlKey",0,e=>{if("u">typeof navigator&&-1!==navigator.userAgent.indexOf("Mac OS X")){if(e.metaKey&&!e.altKey)return!0}else if(e.ctrlKey&&!e.altKey)return!0;return!1}])},86583:function(e,t,i){"use strict";var o=i(39955);let n=new WeakMap;i.d(t,["dataBind",0,(e,t,i)=>{let r=n.get(e);if(!r){r={},n.set(e,r);let t=null;(0,o.isViewObject)(e.j)&&(t=e.j.e),(0,o.isViewObject)(e)&&(t=e.e),t&&t.on("beforeDestruct",()=>{n.delete(e)})}return void 0===i?r[t]:(r[t]=i,i)}])},96325:function(e,t,i){"use strict";var o=i(82758),n=i(70799);i.d(t,["defaultLanguage",0,(e,t="en")=>"auto"!==e&&(0,n.isString)(e)?e:o.globalDocument.documentElement&&o.globalDocument.documentElement.lang?o.globalDocument.documentElement.lang:navigator.language?navigator.language.substring(0,2):t])},82760:function(e,t,i){"use strict";i.d(t,{connection:function(){return r},error:function(){return n},options:function(){return s}});var o=i(32880);function n(e){return TypeError(e)}function r(e){return new o.ConnectionError(e)}function s(e){return new o.OptionsError(e)}},93661:function(e,t,i){"use strict";function o(e="Aborted"){return new DOMException(e,"AbortError")}i.d(t,{abort:function(){return o}})},86397:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return o}});class o extends Error{constructor(e){super(e),Object.setPrototypeOf(this,o.prototype)}}},32880:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return n.ConnectionError},OptionsError:function(){return r.OptionsError},abort:function(){return o.abort}});var o=i(93661),n=i(86397),r=i(57865)},57865:function(e,t,i){"use strict";i.d(t,{OptionsError:function(){return o}});class o extends TypeError{constructor(e){super(e),Object.setPrototypeOf(this,o.prototype)}}},89890:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return n.ConnectionError},OptionsError:function(){return n.OptionsError},abort:function(){return n.abort},connection:function(){return o.connection},error:function(){return o.error},options:function(){return o.options}});var o=i(82760),n=i(32880)},97735:function(e,t,i){"use strict";i.d(t,{fastClone:function(){return s},isAtom:function(){return n},markAsAtomic:function(){return r}});var o=i(67462);function n(e){return e&&e.isAtom}function r(e){return Object.defineProperty(e,"isAtom",{enumerable:!1,value:!0,configurable:!1}),e}function s(e){return JSON.parse((0,o.stringify)(e))}},80568:function(e,t,i){"use strict";var o=i(23282);let n=new Map;i.d(t,["getClassName",0,e=>{var t;if((0,o.isFunction)(e.className))return e.className();let i=(null==(t=e.constructor)?void 0:t.originalConstructor)||e.constructor;if(n.has(i))return n.get(i);if(i.name)return i.name;let r=new RegExp(/^\s*function\s*(\S*)\s*\(/),s=i.toString().match(r);return s?s[1]:""},"keepNames",0,n])},94643:function(e,t,i){"use strict";i.d(t,{get:function(){return r}});var o=i(70799),n=i(86068);function r(e,t){if(!(0,o.isString)(e)||!e.length)return null;let i=e.split("."),r=t;try{for(let e of i){if((0,n.isVoid)(r[e]))return null;r=r[e]}}catch(e){return null}return(0,n.isVoid)(r)?null:r}},38420:function(e,t,i){"use strict";i.d(t,["humanSizeToBytes",0,e=>{if(/^[0-9.]+$/.test(e.toString()))return parseFloat(e);let t=e.substr(-2,2).toUpperCase(),i=["KB","MB","GB","TB"],o=parseFloat(e.substr(0,e.length-2));return -1!==i.indexOf(t)?o*Math.pow(1024,i.indexOf(t)+1):parseInt(e,10)}])},43555:function(e,t,i){"use strict";i.d(t,{$$:function(){return T.$$},ConfigDeepFlatten:function(){return d.ConfigDeepFlatten},ConfigFlatten:function(){return d.ConfigFlatten},ConfigMerge:function(){return d.ConfigMerge},ConfigProto:function(){return d.ConfigProto},ConnectionError:function(){return g.ConnectionError},LimitedStack:function(){return D.LimitedStack},OptionsError:function(){return g.OptionsError},UNSAFE_PROTO_KEYS:function(){return _.UNSAFE_PROTO_KEYS},abort:function(){return g.abort},alignElement:function(){return o.alignElement},alreadyLoadedList:function(){return n.alreadyLoadedList},appendScriptAsync:function(){return n.appendScriptAsync},appendStyleAsync:function(){return n.appendStyleAsync},assert:function(){return r.assert},attr:function(){return s.attr},attrRaw:function(){return s.attrRaw},browser:function(){return a.browser},buildQuery:function(){return l.buildQuery},call:function(){return A.call},callPromise:function(){return A.callPromise},callThis:function(){return A.callThis},clearAlign:function(){return o.clearAlign},clearCenterAlign:function(){return h.clearCenterAlign},cns:function(){return k.cns},completeUrl:function(){return c.completeUrl},connection:function(){return g.connection},convertMediaUrlToVideoEmbed:function(){return u.convertMediaUrlToVideoEmbed},createMediaWrapper:function(){return C.createMediaWrapper},css:function(){return h.css},cssInline:function(){return h.cssInline},cssPath:function(){return T.cssPath},ctrlKey:function(){return p.ctrlKey},dataBind:function(){return f.dataBind},defaultLanguage:function(){return m.defaultLanguage},error:function(){return g.error},fastClone:function(){return b.fastClone},get:function(){return v.get},getAlignClasses:function(){return o.getAlignClasses},getClassName:function(){return y.getClassName},getDataTransfer:function(){return A.getDataTransfer},getHAlign:function(){return o.getHAlign},getMediaWrapper:function(){return C.getMediaWrapper},getPropertyDescriptor:function(){return A.getPropertyDescriptor},getWrappedMedia:function(){return C.getWrappedMedia},getXPathByElement:function(){return T.getXPathByElement},hAlignElement:function(){return o.hAlignElement},humanSizeToBytes:function(){return w.humanSizeToBytes},inView:function(){return E.inView},isAtom:function(){return b.isAtom},isUnsafeProtoKey:function(){return _.isUnsafeProtoKey},keepNames:function(){return y.keepNames},keys:function(){return A.keys},loadImage:function(){return A.loadImage},loadNext:function(){return n.loadNext},loadNextStyle:function(){return n.loadNextStyle},markAsAtomic:function(){return b.markAsAtomic},markDeprecated:function(){return k.markDeprecated},markOwner:function(){return A.markOwner},memorizeExec:function(){return A.memorizeExec},options:function(){return g.options},parseQuery:function(){return S.parseQuery},previewBox:function(){return x.previewBox},refs:function(){return T.refs},reset:function(){return I.reset},resolveElement:function(){return T.resolveElement},scrollIntoViewIfNeeded:function(){return E.scrollIntoViewIfNeeded},set:function(){return j.set},wrapMedia:function(){return C.wrapMedia}});var o=i(25726),n=i(63799),r=i(38837),s=i(29960),a=i(97639),l=i(44710),c=i(66292),d=i(68934),u=i(55877),h=i(41180),p=i(15456),f=i(86583),m=i(96325),g=i(89890),b=i(97735),v=i(94643),y=i(80568),w=i(38420),_=i(69175),k=i(95942),C=i(61477),S=i(82501),x=i(11628),I=i(58844),E=i(26395),T=i(76078),j=i(3703),D=i(50535),A=i(37790)},69175:function(e,t,i){"use strict";i.d(t,{isUnsafeProtoKey:function(){return n}});let o=["__proto__","constructor","prototype"];function n(e){return -1!==o.indexOf(e)}i.d(t,["UNSAFE_PROTO_KEYS",0,o])},95942:function(e,t,i){"use strict";i.d(t,{markDeprecated:function(){return n}});let o=console;function n(e,t=[""],i=null){return(...n)=>(o.warn(`Method "${t[0]}" deprecated.`+(t[1]?` Use "${t[1]}" instead`:"")),e.call(i,...n))}i.d(t,["cns",0,o])},61477:function(e,t,i){"use strict";i.d(t,{createMediaWrapper:function(){return a},getMediaWrapper:function(){return s},getWrappedMedia:function(){return r},wrapMedia:function(){return l}});var o=i(2748);let n=(e,t)=>o.Dom.isHTMLElement(e)&&e.nodeName.toLowerCase()===t.tag.toLowerCase()&&e.classList.contains(t.className);function r(e,t){var i;for(let[o,r]of Object.entries(null!=(i=e.o.mediaWrappers)?i:{}))if(n(t,r)){let e=t.querySelector(o);if(e)return e}return null}function s(e,t){return o.Dom.closest(t,t=>!!r(e,t),e.editor)}function a(e,t){var i;let o=null==(i=e.o.mediaWrappers)?void 0:i[t.toLowerCase()];return o?e.createInside.element(o.tag,{class:o.className,contenteditable:!1,draggable:!0}):null}function l(e,t){let i=a(e,t.nodeName);return i?(t.parentNode&&o.Dom.before(t,i),o.Dom.append(i,t),i):t}},82501:function(e,t,i){"use strict";i.d(t,["parseQuery",0,e=>{let t={},i=e.substring(1).split("&");for(let e=0;e<i.length;e+=1){let o=i[e].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1]||"")}return t}])},11628:function(e,t,i){"use strict";i.d(t,{previewBox:function(){return a}});var o=i(2748),n=i(70799),r=i(29960),s=i(41180);function a(e,t,i="px",l=null){let c=[],d=function(e,t){let i=[],n=[];o.Dom.each(e.editor,e=>{o.Dom.isTag(e,"img")&&n.push(e)});try{n.forEach(n=>{let s=[(0,r.attr)(n,"width"),(0,r.attr)(n,"height"),(0,r.attr)(n,"src")];(0,r.attr)(n,{width:n.offsetWidth+t,height:n.offsetHeight+t});let a=e.createInside.a();o.Dom.append(e.ed.body,a),(0,r.attr)(a,"href",(0,r.attr)(n,"src")||""),(0,r.attr)(n,"src",a.href),o.Dom.safeRemove(a),i.push(()=>{(0,r.attr)(n,{src:s[2],width:s[0]||null,height:s[1]||null})})})}catch(e){throw i.forEach(e=>e()),i.length=0,e}return i}(e,i);try{let a=e.e.fire("beforePreviewBox",t,i);if(null!=a)return a;let d=e.c.div("jodit__preview-box jodit-context");l&&o.Dom.append(l,d),(0,s.css)(d,{position:"relative",padding:16});let u=e.value||`<div style='position: absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);color:#ccc;'>${e.i18n("Empty")}</div>`;if(e.iframe){let t=e.create.element("iframe");(0,s.css)(t,{minWidth:800,minHeight:600,border:0}),o.Dom.append(d,t);let i=t.contentWindow;if(i&&(e.e.fire("generateDocumentStructure.iframe",i.document,e),d=i.document.body,"function"==typeof ResizeObserver)){let o=!1,n=i.document.body,r=new ResizeObserver(e.async.debounce(()=>{r.unobserve(n),(0,s.css)(t,"height",n.offsetHeight+20),e.async.requestAnimationFrame(()=>{o||r.observe(n)})},100)),a=()=>{o=!0,r.unobserve(n),r.disconnect(),e.e.off("beforeDestruct",a)};c.push(a),e.e.on("beforeDestruct",a)}}else(0,s.css)(d,{minWidth:1024,minHeight:600,border:0});let h=(t,i)=>{let s=(0,n.isString)(i)?e.c.div():i;(0,n.isString)(i)&&(s.innerHTML=i);for(let e=0;e<s.childNodes.length;e+=1){let i=s.childNodes[e];if(o.Dom.isElement(i)){let e=t.ownerDocument.createElement(i.nodeName);for(let t=0;t<i.attributes.length;t+=1)(0,r.attr)(e,i.attributes[t].name,i.attributes[t].value);0===i.childNodes.length||o.Dom.isTag(i,"table")?"SCRIPT"===i.nodeName?i.textContent&&(e.textContent=i.textContent):i.innerHTML&&(e.innerHTML=i.innerHTML):h(e,i);try{o.Dom.append(t,e)}catch(e){}}else try{o.Dom.append(t,i.cloneNode(!0))}catch(e){}}};return h(d,u),e.e.fire("afterPreviewBox",d),[d,()=>{c.forEach(e=>e())}]}finally{d.forEach(e=>e())}}},58844:function(e,t,i){"use strict";i.d(t,{reset:function(){return a}});var o=i(82758),n=i(23282),r=i(94643);let s={};function a(e){var t,i;if(!(e in s)){let i=o.globalDocument.createElement("iframe");try{if(i.src="about:blank",o.globalDocument.body.appendChild(i),!i.contentWindow)return null;let t=(0,r.get)(e,i.contentWindow),a=(0,r.get)(e.split(".").slice(0,-1).join("."),i.contentWindow);(0,n.isFunction)(t)&&(s[e]=t.bind(a))}catch(e){if(!o.IS_PROD)throw e}finally{null==(t=i.parentNode)||t.removeChild(i)}}return null!=(i=s[e])?i:null}},26395:function(e,t,i){"use strict";i.d(t,{inView:function(){return n},scrollIntoViewIfNeeded:function(){return r}});var o=i(2748);function n(e,t,i){let o=e.getBoundingClientRect(),n=e,r=o.top,s=o.height;for(;n&&n!==t&&n.parentNode;)if(r+s>(o=(n=n.parentNode).getBoundingClientRect()).bottom+1&&r>o.top||r+s<=o.top)return!1;return(r+s<=(i.documentElement&&i.documentElement.clientHeight||0)+1||r<=0)&&r+s>=0}function r(e,t,i){if(o.Dom.isHTMLElement(e)&&!n(e,t,i)){if(t.clientHeight!==t.scrollHeight){let i=e.offsetTop+e.offsetHeight-t.clientHeight;t.scrollTop=t.scrollTop<i?i:e.offsetTop}n(e,t,i)||e.scrollIntoView({block:"nearest"})}}},76078:function(e,t,i){"use strict";i.d(t,{$$:function(){return u},resolveElement:function(){return p}});var o=i(82758),n=i(2748),r=i(4510),s=i(70799),a=i(87058),l=i(29960),c=i(89890);let d=1;function u(e,t){let i;if(!o.IS_ES_NEXT&&/:scope/.test(e)&&o.IS_IE&&!(t&&t.nodeType===Node.DOCUMENT_NODE)){let o=t.id,n=o||"_selector_id_"+(Math.random()+"").slice(2)+ ++d;e=e.replace(/:scope/g,"#"+n),o||t.setAttribute("id",n),i=t.parentNode.querySelectorAll(e),o||t.removeAttribute("id")}else i=t.querySelectorAll(e);return[].slice.call(i)}let h=(e,t)=>{if(!e||e.nodeType!==Node.ELEMENT_NODE||!e.parentNode||t===e)return"";if(e.id)return"//*[@id='"+e.id+"']";let i=[].filter.call(e.parentNode.childNodes,t=>t.nodeName===e.nodeName);return h(e.parentNode,t)+"/"+e.nodeName.toLowerCase()+(i.length>1?"["+((0,r.toArray)(i).indexOf(e)+1)+"]":"")};function p(e,t){let i=e;if((0,s.isString)(e))try{i=t.querySelector(e)}catch(t){throw(0,c.error)('String "'+e+'" should be valid HTML selector')}if(!i||"object"!=typeof i||!n.Dom.isElement(i)||!i.cloneNode)throw(0,c.error)('Element "'+e+'" should be string or HTMLElement instance');return i}i.d(t,["cssPath",0,e=>{if(!n.Dom.isElement(e))return null;let t=[],i=e;for(;i&&i.nodeType===Node.ELEMENT_NODE;){let e=i.nodeName.toLowerCase();if(i.id){e+="#"+i.id,t.unshift(e);break}{let t=i,o=1;do(t=t.previousElementSibling)&&t.nodeName.toLowerCase()===e&&o++;while(t)e+=":nth-of-type("+o+")"}t.unshift(e),i=i.parentNode}return t.join(" > ")},"getXPathByElement",0,h,"refs",0,e=>{"container"in e&&(e=e.container);let t={};return n.Dom.each(e,e=>{if(n.Dom.isElement(e)&&(e.hasAttribute("ref")||e.hasAttribute("data-ref"))){let i=(0,l.attr)(e,"-ref");i&&(0,s.isString)(i)&&(t[(0,a.camelCase)(i)]=e,t[i]=e)}}),t}])},3703:function(e,t,i){"use strict";i.d(t,{set:function(){return l}});var o=i(68345),n=i(29807),r=i(72430),s=i(70799),a=i(69175);function l(e,t,i){if(!(0,s.isString)(e)||!e.length)return;let l=e.split(".");if(l.some(a.isUnsafeProtoKey))return;let c=i;for(let e=0;e<l.length-1;e+=1){let t=l[e];(0,o.isArray)(c[t])||(0,r.isPlainObject)(c[t])||(c[t]=(0,n.isNumeric)(l[e+1])?[]:{}),c=c[t]}c&&(c[l[l.length-1]]=t)}},50535:function(e,t,i){"use strict";i.d(t,{LimitedStack:function(){return o}});class o{push(e){return this.stack.push(e),this.stack.length>this.limit&&this.stack.shift(),this}pop(){return this.stack.pop()}find(e){return this.stack.find(e)}constructor(e){this.limit=e,this.stack=[]}}},37790:function(e,t,i){"use strict";i.d(t,{call:function(){return a},callPromise:function(){return d},callThis:function(){return l},getPropertyDescriptor:function(){return u},markOwner:function(){return c}});var o=i(14773),n=i(86068),r=i(29960),s=i(86583);function a(e,...t){return e(...t)}function l(e,t,...i){return e.apply(t,i)}function c(e,t){(0,r.attr)(t,"data-editor_id",e.id),t.component||Object.defineProperty(t,"jodit",{value:e})}function d(e,t){return(0,o.isPromise)(e)?e.then(e=>e,()=>null).finally(t):null==t?void 0:t()}function u(e,t){let i;do i=Object.getOwnPropertyDescriptor(e,t),e=Object.getPrototypeOf(e);while(!i&&e)return i}i.d(t,["getDataTransfer",0,e=>{if(e.clipboardData)return e.clipboardData;try{return e.dataTransfer||new DataTransfer}catch(e){return null}},"keys",0,(e,t=!0)=>{if(t)return Object.keys(e);let i=[];for(let t in e)i.push(t);return i},"loadImage",0,(e,t)=>t.async.promise((i,o)=>{let n=new Image,r=()=>{t.e.off(n),null==o||o()},s=()=>{t.e.off(n),i(n)};t.e.one(n,"load",s).one(n,"error",r).one(n,"abort",r),n.src=e,n.complete&&s()}),"memorizeExec",0,(e,t,{control:i},o)=>{var r;let a="button"+i.command,l=null!=(r=i.args&&i.args[0])?r:(0,s.dataBind)(e,a);if((0,n.isVoid)(l))return!1;(0,s.dataBind)(e,a,l),o&&(l=o(l)),e.execCommand(i.command,!1,null!=l?l:void 0)}])},31359:function(e,t,i){"use strict";i.d(t,{init:function(){return s}});var o=i(82758),n=i(60132),r=i(14041);function s(e,t,i,s,a,l,c){if((0,n.isInitable)(s))try{s.init(e)}catch(e){if(!o.IS_PROD)throw e}a.set(t,s),l.delete(t),s.hasStyle&&(0,r.loadStyle)(e,t).catch(e=>{o.IS_PROD}),s.styles&&(c(e,t,"style").innerHTML=s.styles)}},14041:function(e,t,i){"use strict";i.d(t,{loadExtras:function(){return d},loadStyle:function(){return l}});var o=i(82758),n=i(12475),r=i(63799),s=i(89672);let a=new Set;async function l(e,t){let i=c(e,t,!1);if(!a.has(i))return a.add(i),(0,r.appendStyleAsync)(e,i)}function c(e,t,i){t=(0,n.kebabCase)(t);let o=e.minified?".min":"";return e.basePath+"plugins/"+t+"/"+t+o+"."+(i?"js":"css")}function d(e,t,i,n){try{let o=i.filter(t=>!e.has((0,s.normalizeName)(t.name)));o.length&&o.map(e=>{let i=e.url||c(t,e.name,!0);return(0,r.appendScriptAsync)(t,i).then(n).catch(()=>null)})}catch(e){if(!o.IS_PROD)throw e}}},48591:function(e,t,i){"use strict";i.d(t,{makeInstance:function(){return r}});var o=i(82758),n=i(23282);function r(e,t){try{try{return(0,n.isFunction)(t)?new t(e):t}catch(i){if((0,n.isFunction)(t)&&!t.prototype)return t(e)}}catch(e){if(!o.IS_PROD)throw e}return null}},89672:function(e,t,i){"use strict";i.d(t,{normalizeName:function(){return n}});var o=i(12475);function n(e){return(0,o.kebabCase)(e).toLowerCase()}},50911:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return o.Plugin}});var o=i(20356);i(41876)},41876:function(e,t,i){"use strict";i.d(t,{PluginSystem:function(){return p}});var o=i(82758),n=i(57012),r=i(46559),s=i(68345),a=i(60132),l=i(70799),c=i(31359),d=i(14041),u=i(48591),h=i(89672);class p{get size(){return this.__items.size}add(e,t){this.__items.set((0,h.normalizeName)(e),t),n.eventEmitter.fire(`plugin:${e}:ready`)}get(e){return this.__items.get((0,h.normalizeName)(e))}remove(e){this.__items.delete((0,h.normalizeName)(e))}__getFullPluginsList(e){let t=[];return this.__items.forEach((i,o)=>{(!e||e.has(o))&&t.push([o,i])}),t}__init(e){let{extraList:t,disableList:i,filter:n}={extraList:e.o.extraPlugins.map(e=>(0,l.isString)(e)?{name:e}:e),disableList:new Set((0,r.splitArray)(e.o.disablePlugins).map(h.normalizeName)),filter:e.o.safeMode?new Set(e.o.safePluginsList):null},p=new Map,f={},m=new Set;e.__plugins=f;let g=()=>{if(e.isInDestruct)return;let t=!1;this.__getFullPluginsList(n).forEach(([o,n])=>{if(i.has(o)||p.has(o))return;let r=null==n?void 0:n.requires;if(r&&(0,s.isArray)(r)&&r.length){if(r.some(e=>i.has(e)))return;if(!r.every(e=>p.has(e)))return void m.add(o)}t=!0;let a=(0,u.makeInstance)(e,n);if(!a){p.set(o,null),m.delete(o);return}(0,c.init)(e,o,n,a,p,m,this.opts.getContainer),f[o]=a}),t&&(e.e.fire("updatePlugins"),g())};t&&t.length&&(0,d.loadExtras)(this.__items,e,t,g),g(),e.e.on("beforeDestruct",()=>{Object.keys(f).forEach(t=>{let i=f[t];(0,a.isDestructable)(i)&&i.destruct(e),delete f[t]}),delete e.__plugins}),o.IS_PROD||m.size}wait(e){return new Promise(t=>{if(this.get(e))return t();let i=()=>{t(),n.eventEmitter.off(`plugin:${e}:ready`,i)};n.eventEmitter.on(`plugin:${e}:ready`,i)})}constructor(e){this.opts=e,this.__items=new Map}}},20356:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return a}});var o=i(91907),n=i(65478),r=i(19306),s=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class a extends o.ViewComponent{className(){return"Plugin"}__afterPluginSystemInit(){let{j:e,buttons:t}=this;t&&(0,r.isJoditObject)(e)&&t.forEach(t=>{e.registerButton(t)})}__afterInit(){this.__inited=!0,this.setStatus(o.STATUSES.ready),this.afterInit(this.jodit)}init(e){this.jodit.isReady&&(this.afterInit(this.jodit),this.__afterPluginSystemInit(),this.jodit.e.fire("rebuildToolbar"))}__beforeDestruct(){var e;if(this.isInDestruct)return;let{j:t}=this;if(t.e.off("afterPluginSystemInit",this.__afterPluginSystemInit).off("afterInit",this.__afterInit).off("beforeDestruct",this.destruct),this.setStatus(o.STATUSES.beforeDestruct),!this.__inited)return super.destruct();(0,r.isJoditObject)(t)&&(null==(e=this.buttons)||e.forEach(e=>{null==t||t.unregisterButton(e)})),this.beforeDestruct(this.j),super.destruct()}constructor(e){super(e),this.buttons=[],this.hasStyle=!1,this.__inited=!1,e.e.on("afterPluginSystemInit",this.__afterPluginSystemInit).on("afterInit",this.__afterInit).on("beforeDestruct",this.__beforeDestruct)}}a.requires=[],s([n.autobind],a.prototype,"__afterPluginSystemInit",null),s([n.autobind],a.prototype,"__afterInit",null),s([n.autobind],a.prototype,"__beforeDestruct",null)},54079:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return d}});var o=i(8884),n=i(82758),r=i(45219),s=i(21537),a=i(89890),l=i(6441);i(57459);var c=i(98582);class d{className(){return"Ajax"}__buildParams(e,t){return(0,s.isPlainObject)(e)&&this.options.contentType&&this.options.contentType.includes("application/json")?JSON.stringify(e):(0,s.isFunction)(this.o.queryBuild)?this.o.queryBuild.call(this,e,t):(0,s.isString)(e)||e instanceof n.globalWindow.FormData||"object"==typeof e&&null!=e&&(0,s.isFunction)(e.append)?e:(0,s.buildQuery)(e)}get o(){return this.options}abort(){if(this.__isFulfilled)return this;try{this.__isFulfilled=!0,this.xhr.abort()}catch(e){}return this}send(){this.__activated=!0;let{xhr:e,o:t}=this,i=this.prepareRequest();return this.__async.promise(async(o,n)=>{var r;let l=()=>{this.__isFulfilled=!0,n(a.connection("Connection error"))},d=()=>{this.__isFulfilled=!0,o(new c.Response(i,e.status,e.statusText,!e.responseType?e.responseText:e.response))};e.onload=d,e.onabort=()=>{this.__isFulfilled=!0,n(a.abort("Abort connection"))},e.onerror=l,e.ontimeout=l,t.responseType&&(e.responseType=t.responseType),e.onprogress=e=>{var t,i;let o=0;e.lengthComputable&&(o=e.loaded/e.total*100),null==(i=(t=this.options).onProgress)||i.call(t,o)},e.onreadystatechange=()=>{var i,o;null==(o=(i=this.options).onProgress)||o.call(i,10),e.readyState===XMLHttpRequest.DONE&&(t.successStatuses.includes(e.status)?d():e.statusText&&(this.__isFulfilled=!0,n(a.connection(e.statusText))))},e.withCredentials=null!=(r=t.withCredentials)&&r;let{url:u,data:h,method:p}=i;e.open(p,u,!0),t.contentType&&e.setRequestHeader&&e.setRequestHeader("Content-type",t.contentType);let{headers:f}=t;(0,s.isFunction)(f)&&(f=await f.call(this)),f&&e.setRequestHeader&&Object.keys(f).forEach(t=>{e.setRequestHeader(t,f[t])}),this.__async.setTimeout(()=>{e.send(h?this.__buildParams(h):void 0)},0)})}async *stream(){var e;this.__activated=!0;let{xhr:t,o:i}=this,o=this.prepareRequest(),n=0,r="",l=[],c=null,d=!1,u=null,h=()=>{if(c){let e=c;c=null,e()}},p=e=>{var i;let o=t.responseText;r+=o.substring(n),n=o.length;let s=r.split(`
|
|
17
|
+
`,{group:"state",buttons:[]},{group:"clipboard",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},{group:"form",buttons:[]},"---",{group:"history",buttons:[]},{group:"search",buttons:[]},{group:"source",buttons:[]},{group:"other",buttons:[]},{group:"info",buttons:[]}],this.events={},this.textIcons=!1,this.popupRoot=null,this.showBrowserColorPicker=!0,Object.assign(this,n)}}n=r.prototype,r.prototype.controls={}},26992:function(e,t,i){"use strict";i.d(t,{Async:function(){return f}});var o=i(82758),n=i(91898),r=i(12045),s=i(23282),a=i(84767),l=i(72430),c=i(14773),d=i(70799),u=i(86068),h=i(38837),p=i(93661);class f{delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...i){if(this.isDestructed)return 0;let o={};(0,u.isVoid)(t)&&(t=0),(0,a.isNumber)(t)||(t=(o=t).timeout||0),o.label&&this.clearLabel(o.label);let r=(0,n.setTimeout)(e,t,...i),s=o.label||r;return this.timers.set(s,r),this.__callbacks.set(s,e),r}updateTimeout(e,t){if((0,h.assert)(e&&this.timers.has(e),"Label does not exist"),!e||!this.timers.has(e))return null;let i=this.__callbacks.get(e);return(0,h.assert)((0,s.isFunction)(i),"Callback is not a function"),this.setTimeout(i,{label:e,timeout:t})}clearLabel(e){e&&this.timers.has(e)&&((0,n.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if((0,d.isString)(e))return this.clearLabel(e);(0,n.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,i=!1){let o=0,a=!1,d=[],u=(...t)=>{if(!a){o=0;let i=e(...t);if(a=!0,d.length){let e=()=>{d.forEach(e=>e()),d.length=0};(0,c.isPromise)(i)?i.finally(e):e()}}},h=(...r)=>{a=!1,t?(!o&&i&&u(...r),(0,n.clearTimeout)(o),o=this.setTimeout(()=>u(...r),(0,s.isFunction)(t)?t():t),this.timers.set(e,o)):u(...r)};return(0,l.isPlainObject)(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{d.push(e)}).catch(e=>{if((0,r.isAbortError)(e))return null;throw e});return h(...e),t}:h}microDebounce(e,t=!1){let i,o=!1,n=!0;return(...r)=>{if(i=r,o){n=!0;return}n=!0,t&&(n=!1,e(...i)),o=!0,this.__queueMicrotaskNative(()=>{o=!1,!this.isDestructed&&n&&e(...i)})}}throttle(e,t,i=!1){let o=null,n,r,a;return(...i)=>{(n=!0,a=i,t)?o||(r=()=>{n?(e(...a),n=!1,o=this.setTimeout(r,(0,s.isFunction)(t)?t():t),this.timers.set(r,o)):o=null})():e(...a)}}promise(e){let t=()=>{},i=new Promise((i,o)=>{t=()=>o((0,p.abort)("Abort async")),this.promisesRejections.add(t),e(i,o)});return!i.finally&&"u">typeof process&&!o.IS_ES_NEXT&&(i.finally=e=>(i.then(e).catch(e),i)),i.finally(()=>{this.promisesRejections.delete(t)}).catch(()=>null),i.rejectCallback=t,i}promiseState(e){if(e.status)return e.status;if(!Promise.race)return new Promise(t=>{e.then(e=>(t("fulfilled"),e),e=>{throw t("rejected"),e}),this.setTimeout(()=>{t("pending")},100)});let t={};return Promise.race([e,t]).then(e=>e===t?"pending":"fulfilled",()=>"rejected")}requestIdleCallback(e,t={timeout:100}){let i=this.__requestIdleCallbackNative(e,t);return this.__requestsIdle.add(i),i}requestIdlePromise(e){return this.promise(t=>{let i=this.requestIdleCallback(()=>t(i),e)})}schedulerPostTask(e,t={delay:0,priority:"user-visible"}){let i=new AbortController;if(t.signal&&t.signal.addEventListener("abort",()=>i.abort()),this.__controllers.add(i),void 0!==globalThis.scheduler){let o=globalThis.scheduler.postTask(e,{...t,signal:i.signal});return o.finally(()=>{this.__controllers.delete(i)}).catch(()=>null),o}return this.promise((o,n)=>{let r=this.setTimeout(()=>{try{o(e())}catch(e){n(e)}this.__controllers.delete(i)},t.delay||1);i.signal.addEventListener("abort",()=>{this.clearTimeout(r),this.__controllers.delete(i),n((0,p.abort)())})})}schedulerYield(){return this.schedulerPostTask(()=>{},{priority:"user-visible"})}cancelIdleCallback(e){return this.__requestsIdle.delete(e),this.__cancelIdleCallbackNative(e)}requestAnimationFrame(e){let t=requestAnimationFrame(e);return this.__requestsRaf.add(t),t}cancelAnimationFrame(e){this.__requestsRaf.delete(e),cancelAnimationFrame(e)}clear(){this.__requestsIdle.forEach(e=>this.cancelIdleCallback(e)),this.__requestsRaf.forEach(e=>this.cancelAnimationFrame(e)),this.__controllers.forEach(e=>e.abort()),this.timers.forEach(e=>(0,n.clearTimeout)(this.timers.get(e))),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){var e,t,i,o,n;this.timers=new Map,this.__callbacks=new Map,this.__queueMicrotaskNative=null!=(e=null==queueMicrotask?void 0:queueMicrotask.bind(window))?e:Promise.resolve().then.bind(Promise.resolve()),this.promisesRejections=new Set,this.__requestsIdle=new Set,this.__controllers=new Set,this.__requestsRaf=new Set,this.__requestIdleCallbackNative=null!=(i=null==(t=window.requestIdleCallback)?void 0:t.bind(window))?i:(e,t)=>{var i;let o=Date.now();return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-o))})},null!=(i=null==t?void 0:t.timeout)?i:1)},this.__cancelIdleCallbackNative=null!=(n=null==(o=window.cancelIdleCallback)?void 0:o.bind(window))?n:e=>{this.clearTimeout(e)},this.isDestructed=!1}}},8884:function(e,t,i){"use strict";i.d(t,{Async:function(){return o.Async}});var o=i(26992)},4012:function(e,t,i){"use strict";i.d(t,{Component:function(){return l}});var o=i(8884),n=i(78213),r=i(580),s=i(21537);let a=new Map;class l{get componentName(){return this.__componentName||(this.__componentName="jodit-"+(0,s.kebabCase)(((0,s.isFunction)(this.className)?this.className():"")||(0,s.getClassName)(this))),this.__componentName}getFullElName(e,t,i){let o=[this.componentName];return e&&o.push("__"+(e=e.replace(/[^a-z0-9-]/gi,"-"))),t&&(o.push("_",t),o.push("_",(0,s.isVoid)(i)?"true":i.toString())),o.join("")}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(e,t){return(0,s.get)(e,t||this)}get isReady(){return this.componentStatus===n.STATUSES.ready}get isDestructed(){return this.componentStatus===n.STATUSES.destructed}get isInDestruct(){return n.STATUSES.beforeDestruct===this.componentStatus||n.STATUSES.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(n.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(n.STATUSES.destructed),this.async&&(this.async.destruct(),this.async=void 0),a.get(this)&&a.delete(this),this.ownerWindow=void 0}get componentStatus(){return this.__componentStatus}set componentStatus(e){this.setStatus(e)}setStatus(e){return this.setStatusComponent(e,this)}setStatusComponent(e,t){if(e===this.__componentStatus)return;t===this&&(this.__componentStatus=e);let i=Object.getPrototypeOf(this);i&&(0,s.isFunction)(i.setStatusComponent)&&i.setStatusComponent(e,t);let o=a.get(this),n=null==o?void 0:o[e];n&&n.length&&n.forEach(e=>e(t))}hookStatus(e,t){let i=a.get(this);i||(i={},a.set(this,i)),i[e]||(i[e]=[]),i[e].push(t)}static isInstanceOf(e,t){return e instanceof t}constructor(){this.async=new o.Async,this.ownerWindow=window,this.__componentStatus=n.STATUSES.beforeInit,this.uid="jodit-uid-"+(0,r.uniqueUid)()}}l.STATUSES=n.STATUSES},91907:function(e,t,i){"use strict";i.d(t,{Component:function(){return o.Component},STATUSES:function(){return n.STATUSES},ViewComponent:function(){return r.ViewComponent}});var o=i(4012),n=i(78213),r=i(80480)},78213:function(e,t,i){"use strict";i.d(t,["STATUSES",0,{beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}])},80480:function(e,t,i){"use strict";i.d(t,{ViewComponent:function(){return n}});var o=i(4012);class n extends o.Component{get j(){return this.jodit}get defaultTimeout(){return this.j.defaultTimeout}i18n(e,...t){return this.j.i18n(e,...t)}setParentView(e){return this.jodit=e,e.ow&&(this.ownerWindow=e.ow),e.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}constructor(e){super(),this.setParentView(e)}}},82758:function(e,t,i){"use strict";i.r(t),i.d(t,{IS_TEST:function(){return o}});let o=!1,n="u">typeof window?window:void 0,r="u">typeof document?document:void 0,s=new Set(["ul","ol"]),a=["img","video","svg","iframe","script","input","textarea","link","jodit","jodit-media"],l=new Set([...a,"br","hr"]),c=new Set(a),d="Meta",u="Backspace",h="Enter",p="Escape",f="ArrowLeft",m="ArrowUp",g="ArrowRight",b="ArrowDown",v="Delete",y=[d,u,v,m,b,g,f,h,p,"F3","Tab"],w="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),_=void 0!==n&&/Mac|iPod|iPhone|iPad/.test(n.navigator.platform),k=e=>{let t=e.split("/");return/\.js/.test(t[t.length-1])?{basePath:t.slice(0,t.length-1).join("/")+"/",isMin:!0}:{basePath:e,isMin:!0}},{basePath:C,isMin:S}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let e=r.currentScript;if(e)return k(e.src);let t=r.querySelectorAll("script[src]");return t&&t.length?k(t[t.length-1].src):k(n.location.href)})(),x=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"]);i.d(t,["ACCURACY",0,10,"APP_VERSION",0,"4.18.6","BASE_PATH",0,C,"BASE_PATH_IS_MIN",0,S,"BR",0,"br","CLIPBOARD_ID",0,"clipboard","COMMAND_KEYS",0,y,"EMULATE_DBLCLICK_TIMEOUT",0,300,"ES",0,"es2021","FAT_MODE",0,!0,"HOMEPAGE",0,"https://xdsoft.net/jodit/pro/","INSEPARABLE_TAGS",0,l,"INSERT_AS_HTML",0,"insert_as_html","INSERT_AS_TEXT",0,"insert_as_text","INSERT_CLEAR_HTML",0,"insert_clear_html","INSERT_ONLY_TEXT",0,"insert_only_text","INVISIBLE_SPACE",0,"\uFEFF","INVISIBLE_SPACE_REG_EXP",0,()=>/[\uFEFF]/g,"INVISIBLE_SPACE_REG_EXP_END",0,()=>/[\uFEFF]+$/g,"INVISIBLE_SPACE_REG_EXP_START",0,()=>/^[\uFEFF]+/g,"IS_BLOCK",0,/^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|CANVAS|DD|DFN|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[1-6]|HEADER|HGROUP|HR|LI|MAIN|NAV|NOSCRIPT|OUTPUT|P|PRE|RUBY|SCRIPT|STYLE|OBJECT|OL|SECTION|IFRAME|JODIT|JODIT-MEDIA|UL|TR|TD|TH|TBODY|THEAD|TFOOT|TABLE|BODY|HTML|VIDEO)$/i,"IS_ES_MODERN",0,!0,"IS_ES_NEXT",0,!0,"IS_IE",0,w,"IS_INLINE",0,/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,"IS_MAC",0,_,"IS_PROD",0,!0,"KEY_ALIASES",0,{add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:_?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:"space",spacebar:"space",up:"arrowup",win:"meta",windows:"meta"},"KEY_ALT",0,"Alt","KEY_BACKSPACE",0,u,"KEY_DELETE",0,v,"KEY_DOWN",0,b,"KEY_END",0,"End","KEY_ENTER",0,h,"KEY_ESC",0,p,"KEY_F3",0,"F3","KEY_HOME",0,"Home","KEY_LEFT",0,f,"KEY_META",0,d,"KEY_RIGHT",0,g,"KEY_SPACE",0,"Space","KEY_TAB",0,"Tab","KEY_UP",0,m,"LIST_TAGS",0,s,"MARKER_CLASS",0,"jodit-selection_marker","MODE_SOURCE",0,2,"MODE_SPLIT",0,3,"MODE_WYSIWYG",0,1,"NBSP_SPACE",0," ","NEARBY",0,5,"NO_EMPTY_TAGS",0,c,"PARAGRAPH",0,"p","PASSIVE_EVENTS",0,x,"SAFE_COUNT_CHANGE_CALL",0,10,"SET_TEST",0,()=>o=!0,"SOURCE_CONSUMER",0,"source-consumer","SPACE_REG_EXP",0,()=>/[\s\n\t\r\uFEFF\u200b]+/g,"SPACE_REG_EXP_END",0,()=>/[\s\n\t\r\uFEFF\u200b]+$/g,"SPACE_REG_EXP_START",0,()=>/^[\s\n\t\r\uFEFF\u200b]+/g,"TEMP_ATTR",0,"data-jodit-temp","TEXT_HTML",0,w?"html":"text/html","TEXT_PLAIN",0,w?"text":"text/plain","TEXT_RTF",0,w?"rtf":"text/rtf","TOKENS",0,{},"globalDocument",0,r,"globalWindow",0,n,"lang",0,{}])},20218:function(e,t,i){"use strict";i.d(t,{Create:function(){return a}});var o=i(82758),n=i(2748),r=i(21537),s=i(38837);class a{get doc(){return(0,r.isFunction)(this.document)?this.document():this.document}element(e,t,i){let o=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(o),t&&((0,r.isPlainObject)(t)?(0,r.attr)(o,t):i=t),i&&(0,r.asArray)(i).forEach(e=>n.Dom.append(o,(0,r.isString)(e)?this.fromHTML(e):e)),o}div(e,t,i){let o=this.element("div",t,i);return e&&(o.className=e),o}sandbox(){var e;let t=this.element("iframe",{sandbox:"allow-same-origin"});n.Dom.append(this.doc.body,t);let i=null==(e=t.contentWindow)?void 0:e.document;if((0,s.assert)(i,"iframe.contentWindow.document"),!i)throw Error("Iframe error");return i.open(),i.write("<!DOCTYPE html><html><head></head><body></body></html>"),i.close(),[i.body,t]}span(e,t,i){let o=this.element("span",t,i);return e&&(o.className=e),o}a(e,t,i){let o=this.element("a",t,i);return e&&(o.className=e),o}text(e){return this.doc.createTextNode(e)}fake(){return this.text(o.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let i=this.div();i.innerHTML=e.toString();let o=i.firstChild===i.lastChild&&i.firstChild?i.firstChild:i;if(n.Dom.safeRemove(o),t){let e=(0,r.refs)(o);Object.keys(t).forEach(i=>{let o=e[i];o&&!1===t[i]&&n.Dom.hide(o)})}return o}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let i=t[e.tagName.toLowerCase()];(0,r.isFunction)(i)?i(e):(0,r.isPlainObject)(i)&&(0,r.attr)(e,i)}}}constructor(e,t){this.document=e,this.createAttributes=t}}},12060:function(e,t,i){"use strict";i.d(t,{Create:function(){return o.Create}});var o=i(20218)},45219:function(e,t,i){"use strict";i.d(t,{autobind:function(){return n}});var o=i(23282);function n(e,t,i){if(!(0,o.isFunction)(i.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let n=i.value;return{configurable:!0,get(){let e=n.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}},33433:function(e,t,i){"use strict";i.d(t,{cache:function(){return l},cacheHTML:function(){return c},cached:function(){return a}});var o=i(78213),n=i(2748),r=i(27613),s=i(82760);function a(e,t){let i=Object.getOwnPropertyDescriptor(e,t);return!i||(0,r.isFunction)(i.get)?null:i.value}function l(e,t,i){let o=i.get;if(!o)throw(0,s.error)("Getter property descriptor expected");i.get=function(){let e=o.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:e}),e}}function c(e,t,i){let a=i.value;if(!(0,r.isFunction)(a))throw(0,s.error)("Handler must be a Function");let l=!0,c=new WeakMap;i.value=function(...e){var t;let i,o=null!=(i=this.od)?i:document,r=c.get(o);if(l&&(null==r?void 0:r.has(this.constructor)))return null==(t=r.get(this.constructor))?void 0:t.cloneNode(!0);let s=a.apply(this,e);return l&&n.Dom.isElement(s)&&(r?r.set(this.constructor,s):c.set(o,new WeakMap([[this.constructor,s]]))),l?s.cloneNode(!0):s},e.hookStatus(o.STATUSES.ready,e=>{l=!!((0,r.isViewObject)(e)?e:e.jodit).options.cache})}},87325:function(e,t,i){"use strict";i.d(t,{component:function(){return s},getComponentClass:function(){return a}});var o=i(82758),n=i(80568);let r=new Map;function s(e){class t extends e{constructor(...e){super(...e),this.constructor===t&&(this instanceof t||Object.setPrototypeOf(this,t.prototype),this.setStatus("ready"))}}let i=(0,n.getClassName)(e.prototype);if(r.has(i)&&!o.IS_PROD)throw Error(`Component with name "${i}" is already registered`);return r.set(i,t),t}function a(e){return r.get(e)}},81577:function(e,t,i){"use strict";i.d(t,{debounce:function(){return a},throttle:function(){return l}});var o=i(91907),n=i(27613),r=i(38837),s=i(89890);function a(e,t=!1,i="debounce"){return(a,l)=>{let c=a[l];if(!(0,n.isFunction)(c))throw(0,s.error)("Handler must be a Function");return a.hookStatus(o.STATUSES.ready,o=>{let{async:s}=o;(0,r.assert)(null!=s,`Component ${o.componentName||o.constructor.name} should have "async:IAsync" field`);let a=(0,n.isFunction)(e)?e(o):e,c=(0,n.isNumber)(a)||(0,n.isPlainObject)(a)?a:o.defaultTimeout;Object.defineProperty(o,l,{configurable:!0,value:s[i](o[l].bind(o),c,t)})}),{configurable:!0,get(){return c.bind(this)}}}}function l(e,t=!1){return a(e,t,"throttle")}},55153:function(e,t,i){"use strict";i.d(t,{derive:function(){return n}});var o=i(23282);function n(...e){return t=>{let i=t.prototype;for(let t=0;t<e.length;t++){let n=e[t],r=Object.getOwnPropertyNames(n.prototype);for(let e=0;e<r.length;e++){let t=r[e],s=Object.getOwnPropertyDescriptor(n.prototype,t);null!=s&&(0,o.isFunction)(s.value)&&!(0,o.isFunction)(i[t])&&Object.defineProperty(i,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return s.value.call(this,...e)}})}}}}},97357:function(e,t,i){"use strict";i.d(t,{hook:function(){return r}});var o=i(23282),n=i(89890);function r(e){return(t,i)=>{if(!(0,o.isFunction)(t[i]))throw(0,n.error)("Handler must be a Function");t.hookStatus(e,e=>{e[i].call(e)})}}},78927:function(e,t,i){"use strict";i.d(t,{idle:function(){return s}});var o=i(91907),n=i(23282),r=i(89890);function s(){return(e,t)=>{if(!(0,n.isFunction)(e[t]))throw(0,r.error)("Handler must be a Function");e.hookStatus(o.STATUSES.ready,e=>{let{async:i}=e,o=e[t];e[t]=(...t)=>i.requestIdleCallback(o.bind(e,...t))})}}},65478:function(e,t,i){"use strict";i.r(t),i.d(t,{autobind:function(){return o.autobind},cache:function(){return n.cache},cacheHTML:function(){return n.cacheHTML},cached:function(){return n.cached},component:function(){return r.component},debounce:function(){return s.debounce},derive:function(){return a.derive},getComponentClass:function(){return r.getComponentClass},hook:function(){return l.hook},idle:function(){return c.idle},nonenumerable:function(){return d.nonenumerable},persistent:function(){return u.persistent},throttle:function(){return s.throttle},wait:function(){return h.wait},watch:function(){return p.watch}});var o=i(45219),n=i(33433),r=i(87325),s=i(81577),a=i(55153),l=i(97357),c=i(78927),d=i(31589),u=i(53213),h=i(13525),p=i(37133)},31589:function(e,t,i){"use strict";i.d(t,["nonenumerable",0,(e,t)=>{!1!==(Object.getOwnPropertyDescriptor(e,t)||{}).enumerable&&Object.defineProperty(e,t,{enumerable:!1,set(e){Object.defineProperty(this,t,{enumerable:!1,writable:!0,value:e})}})}])},53213:function(e,t,i){"use strict";i.d(t,{persistent:function(){return r}});var o=i(78213),n=i(39955);function r(e,t){e.hookStatus(o.STATUSES.ready,e=>{let i=(0,n.isViewObject)(e)?e:e.jodit,o=`${i.options.namespace}${e.componentName}_prop_${t}`,r=e[t];Object.defineProperty(e,t,{get(){var e;return null!=(e=i.storage.get(o))?e:r},set(e){i.storage.set(o,e)}})})}},13525:function(e,t,i){"use strict";i.d(t,{wait:function(){return s}});var o=i(78213),n=i(23282),r=i(89890);function s(e){return(t,i)=>{let s=t[i];if(!(0,n.isFunction)(s))throw(0,r.error)("Handler must be a Function");t.hookStatus(o.STATUSES.ready,t=>{let{async:o}=t,n=t[i],r=0;Object.defineProperty(t,i,{configurable:!0,value:function i(...s){o.clearTimeout(r),e(t)?n.apply(t,s):r=o.setTimeout(()=>i(...s),10)}})})}}},37133:function(e,t,i){"use strict";i.d(t,{watch:function(){return u}});var o=i(78213),n=i(73026),r=i(46559),s=i(23282),a=i(72430),l=i(39955),c=i(89890),d=i(37790);function u(e,t){return(i,u)=>{var h;if(!(0,s.isFunction)(i[u]))throw(0,c.error)("Handler must be a Function");let p=null==(h=null==t?void 0:t.immediately)||h,f=null==t?void 0:t.context,m=t=>{let o=(0,l.isViewObject)(t)?t:t.jodit,c=(e,...i)=>{if(!t.isInDestruct)return t[u](e,...i)};p||(c=t.async.microDebounce(c,!0)),(0,r.splitArray)(e).forEach(e=>{if(/:/.test(e)){let[i,n]=e.split(":"),r=f;i.length&&(r=t.get(i)),(0,s.isFunction)(r)&&(r=r(t)),o.events.on(r||t,n,c),r||o.events.on(n,c),t.hookStatus("beforeDestruct",()=>{o.events.off(r||t,n,c).off(n,c)});return}let r=e.split("."),[l]=r,u=r.slice(1),h=t[l];(0,a.isPlainObject)(h)&&(0,n.observable)(h).on("change."+u.join("."),c);let p=(0,d.getPropertyDescriptor)(i,l);Object.defineProperty(t,l,{configurable:!0,set(e){let i=h;i!==e&&(h=e,p&&p.set&&p.set.call(t,e),(0,a.isPlainObject)(h)&&(h=(0,n.observable)(h)).on("change."+u.join("."),c),c(l,i,h))},get:()=>p&&p.get?p.get.call(t):h})})};(0,s.isFunction)(i.hookStatus)?i.hookStatus(o.STATUSES.ready,m):m(i)}}},2748:function(e,t,i){"use strict";i.d(t,{Dom:function(){return y}});var o=i(82758),n=i(4510),r=i(68345),s=i(23282),a=i(58487),l=i(42320),c=i(70799),d=i(86068),u=i(49055),h=i(38837),p=i(29960),f=i(41180),m=i(86583),g=i(89890),b=i(37790);let v=RegExp(`<([a-z]+)[^>]+${o.TEMP_ATTR}[^>]*>(.+?)</\\1>`,"gi");class y{static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(e,t,i){let o,n,r=e;i.s.save();do n=!1,(o=r.nextSibling)&&!y.isBlock(o)&&!y.isTag(o,"br")&&(n=!0,r=o);while(n)return y.__wrapElements(t,i,e,r)}static __wrapElements(e,t,i,o){let n=(0,c.isString)(e)?t.createInside.element(e):e;i.parentNode&&i.parentNode.insertBefore(n,i);let r=i;for(;r&&(r=i.nextSibling,n.appendChild(i),i!==o&&r);)i=r;return t.s.restore(),n}static wrapInline(e,t,i){let o,n,r=e,s=e;i.s.save();do n=!1,(o=r.previousSibling)&&!y.isBlock(o)&&(n=!0,r=o);while(n)do n=!1,(o=s.nextSibling)&&!y.isBlock(o)&&(n=!0,s=o);while(n)return y.__wrapElements(t,i,r,s)}static wrap(e,t,i){let o=(0,c.isString)(t)?i.element(t):t;if(y.isNode(e)){if(!e.parentNode)throw(0,g.error)("Element should be in DOM");e.parentNode.insertBefore(o,e),o.appendChild(e)}else{let t=e.extractContents();e.insertNode(o),o.appendChild(t)}return o}static unwrap(e){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);y.safeRemove(e)}}static between(e,t,i){let o=e;for(;o&&o!==t&&!(e!==o&&i(o));){let e=o.firstChild||o.nextSibling;if(!e){for(;o&&!o.nextSibling;)if((o=o.parentNode)===t)return;e=null==o?void 0:o.nextSibling}o=e}}static replace(e,t,i,o=!1,r=!1){let s;if((0,a.isHTML)(t)&&((0,h.assert)(i,"Need create instance for new tag"),t=i.fromHTML(t)),(0,c.isString)(t)?((0,h.assert)(i,"Need create instance for new tag"),s=i.element(t)):s=t,!r)for(;e.firstChild;)s.appendChild(e.firstChild);return o&&y.isElement(e)&&y.isElement(s)&&(0,n.toArray)(e.attributes).forEach(e=>{s.setAttribute(e.name,e.value)}),e.parentNode&&e.parentNode.replaceChild(s,e),s}static isEmptyTextNode(e){return y.isText(e)&&(!e.nodeValue||0===e.nodeValue.replace(o.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(e){return y.each(e,e=>y.isEmptyTextNode(e))}static isContentEditable(e,t){return y.isNode(e)&&!y.closest(e,e=>y.isElement(e)&&"false"===e.getAttribute("contenteditable"),t)}static isEmpty(e,t=o.NO_EMPTY_TAGS){let i;if(!e)return!0;i=(0,s.isFunction)(t)?t:e=>t.has(e.nodeName.toLowerCase());let n=e=>null==e.nodeValue||0===(0,u.trim)(e.nodeValue).length;return y.isText(e)?n(e):!(y.isElement(e)&&i(e))&&y.each(e,e=>{if(y.isText(e)&&!n(e)||y.isElement(e)&&i(e))return!1})}static isNode(e){return!!(e&&(0,c.isString)(e.nodeName)&&"number"==typeof e.nodeType&&e.childNodes&&(0,s.isFunction)(e.appendChild))}static isCell(e){return y.isNode(e)&&("TD"===e.nodeName||"TH"===e.nodeName)}static isList(e){return y.isTag(e,o.LIST_TAGS)}static isLeaf(e){return y.isTag(e,"li")}static isImage(e){return y.isNode(e)&&/^(img|svg|picture|canvas)$/i.test(e.nodeName)}static isBlock(e){return!(0,d.isVoid)(e)&&"object"==typeof e&&y.isNode(e)&&o.IS_BLOCK.test(e.nodeName)}static isText(e){return!!(e&&e.nodeType===Node.TEXT_NODE)}static isComment(e){return!!(e&&e.nodeType===Node.COMMENT_NODE)}static isElement(e){return!!y.isNode(e)&&e.nodeType===Node.ELEMENT_NODE}static isFragment(e){return!!y.isNode(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}static isHTMLElement(e){var t;if(!y.isNode(e))return!1;let i=null==(t=e.ownerDocument)?void 0:t.defaultView;return e instanceof(i?i.HTMLElement:HTMLElement)}static isInlineBlock(e){return y.isElement(e)&&!/^(BR|HR)$/i.test(e.tagName)&&-1!==["inline","inline-block"].indexOf((0,f.css)(e,"display").toString())}static canSplitBlock(e){return!(0,d.isVoid)(e)&&y.isHTMLElement(e)&&y.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&void 0!==e.style&&!/^(fixed|absolute)/i.test(e.style.position)}static first(e,t){return y.__deepMost(e,t,!1)}static last(e,t){return y.__deepMost(e,t,!0)}static __deepMost(e,t,i){let o=i?"lastChild":"firstChild",n=i?"previousSibling":"nextSibling",r=null==e?void 0:e[o];if(!r)return null;do{if(t(r))return r;let i=r[o]||r[n];if(!i&&r.parentNode!==e){do r=r.parentNode;while(r&&!r[n]&&r.parentNode!==e)i=null==r?void 0:r[n]}r=i}while(r)return null}static prev(e,t,i,o=!0){return y.find(e,t,i,!1,o)}static next(e,t,i,o=!0){return y.find(e,t,i,!0,o)}static prevWithClass(e,t){return y.__siblingWithClass(e,t,!0)}static nextWithClass(e,t){return y.__siblingWithClass(e,t,!1)}static __siblingWithClass(e,t,i){let o=e=>y.isElement(e)&&e.classList.contains(t),n=e.parentNode;return i?y.prev(e,o,n):y.next(e,o,n)}static find(e,t,i,o=!0,n=!0){let r=this.nextGen(e,i,o,n),s=r.next();for(;!s.done;){if(t(s.value))return s.value;s=r.next()}return null}static*nextGen(e,t,i=!0,o=!0){let n=[],r=e;do{let t=i?r.nextSibling:r.previousSibling;for(;t;)n.push(t),t=i?t.nextSibling:t.previousSibling;n.reverse(),yield*this.runInStack(e,n,i,o),r=r.parentNode}while(r&&r!==t)return null}static each(e,t,i=!0){let o=this.eachGen(e,i),n=o.next();for(;!n.done;){if(!1===t(n.value))return!1;n=o.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,i,o=!0){for(;t.length;){let n=t.pop();if(o){let e=i?n.lastChild:n.firstChild;for(;e;)t.push(e),e=i?e.previousSibling:e.nextSibling}e!==n&&(yield n)}}static findWithCurrent(e,t,i,o="nextSibling",n="firstChild"){let r=e;do{if(t(r))return r||null;if(n&&r&&r[n]){let e=y.findWithCurrent(r[n],t,r,o,n);if(e)return e}for(;r&&!r[o]&&r!==i;)r=r.parentNode;r&&r[o]&&r!==i&&(r=r[o])}while(r&&r!==i)return null}static findSibling(e,t=!0,i=e=>!y.isEmptyTextNode(e)){let o=y.sibling(e,t);for(;o&&!i(o);)o=y.sibling(o,t);return o&&i(o)?o:null}static findNotEmptySibling(e,t){return y.findSibling(e,t,e=>{var t;return!y.isEmptyTextNode(e)&&!!(!y.isText(e)||(null==(t=e.nodeValue)?void 0:t.length)&&(0,u.trim)(e.nodeValue))})}static findNotEmptyNeighbor(e,t,i){return(0,b.call)(t?y.prev:y.next,e,e=>!!(e&&(!(y.isText(e)||y.isComment(e))||(0,u.trim)((null==e?void 0:e.nodeValue)||"").length)),i)}static sibling(e,t){return t?e.previousSibling:e.nextSibling}static up(e,t,i,o=!1){let n=e;if(!n)return null;do{if(t(n))return n;if(n===i||!n.parentNode)break;n=n.parentNode}while(n&&n!==i)return n===i&&o&&t(n)?n:null}static closest(e,t,i){let o,n=e=>e.toLowerCase();if((0,s.isFunction)(t))o=t;else if((0,r.isArray)(t)||(0,l.isSet)(t)){let e=(0,l.isSet)(t)?t:new Set(t.map(n));o=t=>!!(t&&e.has(n(t.nodeName)))}else o=e=>!!(e&&n(t)===n(e.nodeName));return y.up(e,o,i)}static furthest(e,t,i){let o=null,n=null==e?void 0:e.parentElement;for(;n&&n!==i;)t(n)&&(o=n),n=null==n?void 0:n.parentElement;return o}static appendChildFirst(e,t){e.firstChild!==t&&y.prepend(e,t)}static after(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e.nextSibling)}static before(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e)}static prepend(e,t){e.insertBefore(t,e.firstChild)}static append(e,t){(0,r.isArray)(t)?t.forEach(t=>{this.append(e,t)}):e.appendChild(t)}static moveContent(e,t,i=!1,r=()=>!0){let s=(e.ownerDocument||o.globalDocument).createDocumentFragment();(0,n.toArray)(e.childNodes).filter(e=>!!r(e)||(y.safeRemove(e),!1)).forEach(e=>{s.appendChild(e)}),t.insertBefore(s,i?t.firstChild:null)}static isOrContains(e,t,i=!1){return e===t?!i:!!(t&&e&&this.up(t,t=>t===e,e,!0))}static safeRemove(...e){e.forEach(e=>y.isNode(e)&&e.parentNode&&e.parentNode.removeChild(e))}static safeInsertNode(e,t){e.collapsed||e.deleteContents();let i=y.isFragment(t)?t.lastChild:t;e.startContainer===e.endContainer&&e.collapsed&&y.isTag(e.startContainer,o.INSEPARABLE_TAGS)?y.after(e.startContainer,t):(e.insertNode(t),i&&e.setStartBefore(i)),e.collapse(!0),[t.nextSibling,t.previousSibling].forEach(e=>y.isText(e)&&!e.nodeValue&&y.safeRemove(e))}static hide(e){e&&((0,m.dataBind)(e,"__old_display",e.style.getPropertyValue("display")),e.style.setProperty("display","none"))}static show(e){if(!e)return;let t=(0,m.dataBind)(e,"__old_display");"none"===e.style.getPropertyValue("display")&&e.style.setProperty("display",t||null)}static isTag(e,t){if(Array.isArray(t))throw TypeError("Dom.isTag does not support array");if(!this.isElement(e))return!1;let i=e.tagName.toLowerCase();return t instanceof Set?t.has(i)||t.has(e.tagName.toUpperCase()):i===t||e.tagName.toUpperCase()===t}static markTemporary(e,t){return t&&(0,p.attr)(e,t),(0,p.attr)(e,o.TEMP_ATTR,!0),e}static isTemporary(e){return!!y.isElement(e)&&(y.isMarker(e)||"true"===(0,p.attr)(e,o.TEMP_ATTR))}static isMarker(e){return y.isNode(e)&&y.isTag(e,"span")&&e.hasAttribute("data-"+o.MARKER_CLASS)}static replaceTemporaryFromString(e){return e.replace(v,"$2")}static temporaryList(e){let t=[];return y.each(e,e=>{y.isHTMLElement(e)&&e.hasAttribute(o.TEMP_ATTR)&&t.push(e)}),t}constructor(){throw Error("Dom is static module")}}},22732:function(e,t,i){"use strict";i.d(t,{Dom:function(){return o.Dom},LazyWalker:function(){return n.LazyWalker}});var o=i(2748),n=i(70071)},70071:function(e,t,i){"use strict";i.d(t,{LazyWalker:function(){return s}});var o=i(45219),n=i(2748),r=i(72757);class s extends r.Eventify{setWork(e){return this.isWorked?this.break():this.stop(),this.workNodes=n.Dom.eachGen(e,!this.options.reverse),this.isFinished=!1,this.hadAffect=!1,this._requestStarting(),this}_requestStarting(){this.__schedulerController=new AbortController,this.async.schedulerPostTask(this.__workPerform,{delay:this.options.timeout,signal:this.__schedulerController.signal}).catch(()=>null)}break(e){this.isWorked&&(this.stop(),this.emit("break",e))}end(){this.isWorked&&(this.stop(),this.emit("end",this.hadAffect),this.hadAffect=!1)}stop(){var e;this.isWorked=!1,this.isFinished=!0,this.workNodes=null,null==(e=this.__schedulerController)||e.abort(),this.__schedulerController=null}destruct(){super.destruct(),this.stop()}__workPerform(){var e;if(this.workNodes){this.isWorked=!0;let t=0,i=null!=(e=this.options.timeoutChunkSize)?e:50;for(;!this.isFinished&&t<i;){let e=this.workNodes.next();if(t+=1,this.visitNode(e.value)&&(this.hadAffect=!0),e.done)return void this.end()}}else this.end();this.isFinished||this._requestStarting()}visitNode(e){var t;return!!e&&(void 0===this.options.whatToShow||e.nodeType===this.options.whatToShow)&&null!=(t=this.emit("visit",e))&&t}constructor(e,t={}){super(),this.async=e,this.options=t,this.workNodes=null,this.hadAffect=!1,this.isWorked=!1,this.isFinished=!1,this.__schedulerController=null}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([o.autobind],s.prototype,"__workPerform",null)},98220:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return d}});var o=i(82758),n=i(46559),r=i(68345),s=i(23282),a=i(70799),l=i(89890),c=i(15738);class d{mute(e){return this.__mutedEvents.add(null!=e?e:"*"),this}isMuted(e){return!!(e&&this.__mutedEvents.has(e))||this.__mutedEvents.has("*")}unmute(e){return this.__mutedEvents.delete(null!=e?e:"*"),this}__eachEvent(e,t){(0,n.splitArray)(e).map(e=>e.trim()).forEach(e=>{let i=e.split("."),o=i[1]||c.defaultNameSpace;t.call(this,i[0],o)})}__getStore(e){if(!e)throw(0,l.error)("Need subject");if(void 0===e[this.__key]){let t=new c.EventHandlersStore;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:t})}return e[this.__key]}__removeStoreFromSubject(e){void 0!==e[this.__key]&&delete e[this.__key]}__triggerNativeEvent(e,t){let i=this.__doc.createEvent("HTMLEvents");(0,a.isString)(t)?i.initEvent(t,!0,!0):(i.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(e=>{Object.defineProperty(i,e,{value:t[e],enumerable:!0})}),Object.defineProperty(i,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(i)}get current(){return this.currents[this.currents.length-1]}on(e,t,i,n){let c,d,h,p;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(c=this,d=e,h=t,p=i):(c=e,d=t,h=i,p=n),!((0,a.isString)(d)||(0,a.isStringArray)(d))||0===d.length)throw(0,l.error)("Need events names");if(!(0,s.isFunction)(h))throw(0,l.error)("Need event handler");if((0,r.isArray)(c))return c.forEach(e=>{this.on(e,d,h,p)}),this;let f=c,m=this.__getStore(f),g=this,b=function(e,...t){if(!g.isMuted(e))return h&&h.call(this,...t)};return u(f)&&(b=function(e){if(!g.isMuted(e.type)&&(g.__prepareEvent(e),h&&!1===h.call(this,e)))return e.preventDefault(),e.stopImmediatePropagation(),!1}),this.__eachEvent(d,(e,t)=>{var i,n;if(0===e.length)throw(0,l.error)("Need event name");if(!1===m.indexOf(e,t,h)){let r={event:e,originalCallback:h,syntheticCallback:b};if(m.set(e,t,r,null==p?void 0:p.top),u(f)){let t=o.PASSIVE_EVENTS.has(e)?{passive:!0,capture:null!=(i=null==p?void 0:p.capture)&&i}:null!=(n=null==p?void 0:p.capture)&&n;b.options=t,f.addEventListener(e,b,t),this.__memoryDOMSubjectToHandler(f,b)}}}),this}__memoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap.get(e)||new Set;i.add(t),this.__domEventsMap.set(e,i)}__unmemoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap,o=i.get(e)||new Set;o.delete(t),o.size?i.set(e,o):i.delete(e)}one(e,t,i,o){let n,r,s,l;(0,a.isString)(e)||(0,a.isStringArray)(e)?(n=this,r=e,s=t,l=i):(n=e,r=t,s=i,l=o);let c=(...e)=>(this.off(n,r,c),s(...e));return this.on(n,r,c,l),this}off(e,t,i){let o,n,l;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(o=this,n=e,l=t):(o=e,n=t,l=i),(0,r.isArray)(o))return o.forEach(e=>{this.off(e,n,l)}),this;let d=o,h=this.__getStore(d);if(!((0,a.isString)(n)||(0,a.isStringArray)(n))||0===n.length)return h.namespaces().forEach(e=>{this.off(d,"."+e)}),this.__removeStoreFromSubject(d),this;let p=e=>{var t;u(d)&&(d.removeEventListener(e.event,e.syntheticCallback,null!=(t=e.syntheticCallback.options)&&t),this.__unmemoryDOMSubjectToHandler(d,e.syntheticCallback))},f=(e,t)=>{if(""===e)return void h.events(t).forEach(e=>{""!==e&&f(e,t)});let i=h.get(e,t);if(i&&i.length)if((0,s.isFunction)(l)){let o=h.indexOf(e,t,l);!1!==o&&(p(i[o]),i.splice(o,1),i.length||h.clearEvents(t,e))}else i.forEach(p),i.length=0,h.clearEvents(t,e)};return this.__eachEvent(n,(e,t)=>{t===c.defaultNameSpace?h.namespaces().forEach(t=>{f(e,t)}):f(e,t)}),h.isEmpty()&&this.__removeStoreFromSubject(d),this}stopPropagation(e,t){let i=(0,a.isString)(e)?this:e,o=(0,a.isString)(e)?e:t;if("string"!=typeof o)throw(0,l.error)("Need event names");let n=this.__getStore(i);this.__eachEvent(o,(e,t)=>{let o=n.get(e,t);o&&this.__stopped.push(o),t===c.defaultNameSpace&&n.namespaces(!0).forEach(t=>this.stopPropagation(i,e+"."+t))})}__removeStop(e){if(e){let t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(0,t+1)}}__isStopped(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)}fire(e,t,...i){let o,n,r=(0,a.isString)(e)?this:e,s=(0,a.isString)(e)?e:t,d=(0,a.isString)(e)?[t,...i]:i;if(!u(r)&&!(0,a.isString)(s))throw(0,l.error)("Need events names");let h=this.__getStore(r);return!(0,a.isString)(s)&&u(r)?this.__triggerNativeEvent(r,t):this.__eachEvent(s,(e,t)=>{if(u(r))this.__triggerNativeEvent(r,e);else{let i=h.get(e,t);if(i)try{[...i].every(t=>!this.__isStopped(i)&&(this.currents.push(e),n=t.syntheticCallback.call(r,e,...d),this.currents.pop(),void 0!==n&&(o=n),!0))}finally{this.__removeStop(i)}t!==c.defaultNameSpace||u(r)||h.namespaces().filter(e=>e!==t).forEach(t=>{let i=this.fire.apply(this,[r,e+"."+t,...d]);void 0!==i&&(o=i)})}}),o}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__domEventsMap.forEach((e,t)=>{this.off(t)}),this.__domEventsMap.clear(),this.__mutedEvents.clear(),this.currents.length=0,this.__stopped.length=0,this.off(this),this.__getStore(this).clear(),this.__removeStoreFromSubject(this))}constructor(e){this.__domEventsMap=new Map,this.__mutedEvents=new Set,this.__key="__JoditEventEmitterNamespaces",this.__doc=o.globalDocument,this.__prepareEvent=e=>{!e.cancelBubble&&(e.composed&&(0,s.isFunction)(e.composedPath)&&e.composedPath()[0]&&Object.defineProperty(e,"target",{value:e.composedPath()[0],configurable:!0,enumerable:!0}),e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(t=>{Object.defineProperty(e,t,{value:e.changedTouches[0][t],configurable:!0,enumerable:!0})}),e.originalEvent||(e.originalEvent=e),"paste"===e.type&&void 0===e.clipboardData&&this.__doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:()=>this.__doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))},this.currents=[],this.__stopped=[],this.__isDestructed=!1,e&&(this.__doc=e),this.__key+=new Date().getTime()}}function u(e){return e&&(0,s.isFunction)(e.addEventListener)}},72757:function(e,t,i){"use strict";i.d(t,{Eventify:function(){return o}});class o{on(e,t){var i;return this.__map.has(e)||this.__map.set(e,new Set),null==(i=this.__map.get(e))||i.add(t),this}off(e,t){var i;return this.__map.has(e)&&(null==(i=this.__map.get(e))||i.delete(t)),this}destruct(){this.__map.clear()}emit(e,...t){var i;let o;return this.__map.has(e)&&(null==(i=this.__map.get(e))||i.forEach(e=>{o=e(...t)})),o}constructor(){this.__map=new Map}}},57012:function(e,t,i){"use strict";let o=new(i(98220)).EventEmitter;i.d(t,["eventEmitter",0,o])},3827:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return o.EventEmitter},EventHandlersStore:function(){return s.EventHandlersStore},Eventify:function(){return n.Eventify},defaultNameSpace:function(){return s.defaultNameSpace},observable:function(){return r.observable}});var o=i(98220),n=i(72757),r=i(73026),s=i(15738)},73026:function(e,t,i){"use strict";i.d(t,{observable:function(){return c}});var o=i(68345),n=i(59292),r=i(72430),s=i(37790);let a=Symbol("observable-object");function l(e){return void 0!==e[a]}function c(e){if(l(e))return e;let t={},i={},c=(t,n)=>((0,o.isArray)(t)?t.map(e=>c(e,n)):(i[t]||(i[t]=[]),i[t].push(n)),e),d=(n,...r)=>{if((0,o.isArray)(n))return void n.map(e=>d(e,...r));try{!t[n]&&i[n]&&(t[n]=!0,i[n].forEach(t=>t.call(e,...r)))}finally{t[n]=!1}},u=(t,i=[])=>{let o={};l(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach(a=>{let l=i.concat(a).filter(e=>e.length);o[a]=t[a];let c=(0,s.getPropertyDescriptor)(t,a);Object.defineProperty(t,a,{set(t){let i=o[a];if(!(0,n.isFastEqual)(o[a],t)){d(["beforeChange","beforeChange."+l.join(".")],a,t),(0,r.isPlainObject)(t)&&u(t,l),c&&c.set?c.set.call(e,t):o[a]=t;let n=[];d(["change",...l.reduce((e,t)=>(n.push(t),e.push("change."+n.join(".")),e),[])],l.join("."),i,(null==t?void 0:t.valueOf)?t.valueOf():t)}},get:()=>c&&c.get?c.get.call(e):o[a],enumerable:!0,configurable:!0}),(0,r.isPlainObject)(o[a])&&u(o[a],l)}),Object.defineProperty(e,"on",{value:c}))};return u(e),e}},15738:function(e,t,i){"use strict";i.d(t,{EventHandlersStore:function(){return s}});var o=i(4510),n=i(38837);let r="JoditEventDefaultNamespace";class s{get(e,t){if(this.__store.has(t)){let i=this.__store.get(t);return(0,n.assert)(i,"-"),i[e]}}indexOf(e,t,i){let o=this.get(e,t);if(o){for(let e=0;e<o.length;e+=1)if(o[e].originalCallback===i)return e}return!1}namespaces(e=!1){let t=(0,o.toArray)(this.__store.keys());return e?t.filter(e=>e!==r):t}events(e){let t=this.__store.get(e);return t?Object.keys(t):[]}set(e,t,i,o=!1){let n=this.__store.get(t);n||(n={},this.__store.set(t,n)),void 0===n[e]&&(n[e]=[]),o?n[e].unshift(i):n[e].push(i)}clear(){this.__store.clear()}clearEvents(e,t){let i=this.__store.get(e);i&&i[t]&&(delete i[t],Object.keys(i).length||this.__store.delete(e))}isEmpty(){return 0===this.__store.size}constructor(){this.__store=new Map}}i.d(t,["defaultNameSpace",0,r])},580:function(e,t,i){"use strict";i.d(t,{getContainer:function(){return y},getPopupViewRoot:function(){return w},uniqueUid:function(){return g}});var o=i(19306),n=i(70799),r=i(39955),s=i(12475),a=i(29960),l=i(41180),c=i(80568),d=i(41876),u=i(57012),h=i(82758),p=i(22732);let f=1,m=new Set;function g(){function e(){return Math.round(f+=10*(Math.random()+1)).toString(16)}let t=e();for(;m.has(t);)t=e();return m.add(t),t}let b=new d.PluginSystem({getContainer:y}),v=new WeakMap;function y(e,t,i="div",l=!1){let d,u=(0,n.isString)(t)?t:t?(0,c.getClassName)(t.prototype):"jodit-utils",h=v.get(e)||{},f=u+i,m=(0,r.isViewObject)(e)?e:e.j;if(!h[f]){let t=m.c;if(d=w(m.o,m.container,e.od.body),l&&(0,o.isJoditObject)(e)&&e.od!==e.ed){t=e.createInside;let n="style"===i?e.ed.head:e.ed.body;d=(0,o.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:n}let n=t.element(i,{className:`jodit jodit-${(0,s.kebabCase)(u)}-container jodit-box`});m.o.nonce&&("style"===i||"script"===i)&&(0,a.attr)(n,"nonce",m.o.nonce),n.classList.add("jodit_theme_"+(m.o.theme||"default")),p.Dom.append(d,n),h[f]=n,e.hookStatus("beforeDestruct",()=>{m.events.off(n),p.Dom.safeRemove(n),delete h[f],Object.keys(h).length&&v.delete(e)}),v.set(e,h),m.events.fire("getContainer",n)}return h[f].classList.remove("jodit_theme_default","jodit_theme_dark"),h[f].classList.add("jodit_theme_"+(m.o.theme||"default")),h[f]}function w(e,t,i){var o,n,r;return null!=(r=null!=(n=null!=(o=e.popupRoot)?o:e.shadowRoot)?n:p.Dom.closest(t,e=>p.Dom.isHTMLElement(e)&&(p.Dom.isTag(e,"dialog")||["fixed","absolute"].includes((0,l.css)(e,"position"))),i))?r:i}let _=u.eventEmitter;i.d(t,["eventEmitter",0,_,"extendLang",0,e=>{Object.keys(e).forEach(t=>{h.lang[t]?Object.assign(h.lang[t],e[t]):h.lang[t]=e[t]})},"instances",0,{},"modules",0,{},"pluginSystem",0,b])},29999:function(e,t,i){"use strict";var o=i(68345);i.d(t,["asArray",0,e=>(0,o.isArray)(e)?e:[e]])},76855:function(e,t,i){"use strict";i.d(t,{asArray:function(){return o.asArray},splitArray:function(){return n.splitArray},toArray:function(){return r.toArray}});var o=i(29999),n=i(46559),r=i(4510)},46559:function(e,t,i){"use strict";function o(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}i.d(t,{splitArray:function(){return o}})},4510:function(e,t,i){"use strict";var o=i(70722),n=i(58844);i.d(t,["toArray",0,function(...e){var t;return((0,o.isNativeFunction)(Array.from)?Array.from:null!=(t=(0,n.reset)("Array.from"))?t:Array.from).apply(Array,e)}])},91898:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return o.clearTimeout},setTimeout:function(){return o.setTimeout}});var o=i(13252)},13252:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return r},setTimeout:function(){return n}});var o=i(82758);function n(e,t,...i){return t?o.globalWindow.setTimeout(e,t,...i):(e.call(null,...i),0)}function r(e){o.globalWindow.clearTimeout(e)}},54765:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return n}});var o=i(82758);function n(){let e;try{let t=o.globalDocument.createElement("input");t.type="color",t.value="!",e="color"===t.type&&"!"!==t.value}catch(t){e=!1}return e}},27613:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return o.hasBrowserColorPicker},hasContainer:function(){return u.hasContainer},isAbortError:function(){return n.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return u.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return c.isHTML},isHtmlFromWord:function(){return d.isHtmlFromWord},isInitable:function(){return u.isInitable},isInt:function(){return h.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return f.isLicense},isMarker:function(){return m.isMarker},isNativeFunction:function(){return g.isNativeFunction},isNumber:function(){return b.isNumber},isNumeric:function(){return v.isNumeric},isPlainObject:function(){return y.isPlainObject},isPromise:function(){return w.isPromise},isSet:function(){return _.isSet},isString:function(){return k.isString},isStringArray:function(){return k.isStringArray},isURL:function(){return C.isURL},isValidName:function(){return S.isValidName},isViewObject:function(){return x.isViewObject},isVoid:function(){return I.isVoid},isWindow:function(){return E.isWindow}});var o=i(54765),n=i(12045),r=i(68345),s=i(87612),a=i(59292),l=i(23282),c=i(58487),d=i(29673),u=i(60132),h=i(72913),p=i(19306),f=i(45603),m=i(78116),g=i(70722),b=i(84767),v=i(29807),y=i(72430),w=i(14773),_=i(42320),k=i(70799),C=i(26049),S=i(37508),x=i(39955),I=i(86068),E=i(52742)},12045:function(e,t,i){"use strict";function o(e){return!!e&&e instanceof DOMException&&"AbortError"===e.name}i.d(t,{isAbortError:function(){return o}})},68345:function(e,t,i){"use strict";function o(e){return Array.isArray(e)}i.d(t,{isArray:function(){return o}})},87612:function(e,t,i){"use strict";function o(e){return"boolean"==typeof e}i.d(t,{isBoolean:function(){return o}})},59292:function(e,t,i){"use strict";i.d(t,{isEqual:function(){return n},isFastEqual:function(){return r}});var o=i(67462);function n(e,t){return e===t||(0,o.stringify)(e)===(0,o.stringify)(t)}function r(e,t){return e===t}},23282:function(e,t,i){"use strict";function o(e){return"function"==typeof e}i.d(t,{isFunction:function(){return o}})},29673:function(e,t,i){"use strict";function o(e){return -1!==e.search(/<meta.*?Microsoft Excel\s[\d].*?>/)||-1!==e.search(/<meta.*?Microsoft Word\s[\d].*?>/)||-1!==e.search(/<meta[^>]*?ProgId[^>]*?(Word|Excel)\./i)||-1!==e.search(/<meta[^>]*?(LibreOffice|OpenOffice)/i)||-1!==e.search(/urn:schemas-microsoft-com:office:(word|excel)/)||-1!==e.search(/<\w[^>]*\sclass=("|')?Mso/)||-1!==e.search(/style='[^']*mso-/)||-1!==e.search(/style="[^"]*mso-/)&&-1!==e.search(/<font/)}i.d(t,{isHtmlFromWord:function(){return o}})},58487:function(e,t,i){"use strict";var o=i(70799);i.d(t,["isHTML",0,e=>(0,o.isString)(e)&&/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(e.replace(/[\r\n]/g,""))])},60132:function(e,t,i){"use strict";i.d(t,{hasContainer:function(){return l},isDestructable:function(){return a},isInitable:function(){return s}});var o=i(2748),n=i(23282),r=i(86068);function s(e){return!(0,r.isVoid)(e)&&(0,n.isFunction)(e.init)}function a(e){return!(0,r.isVoid)(e)&&(0,n.isFunction)(e.destruct)}function l(e){return!(0,r.isVoid)(e)&&o.Dom.isElement(e.container)}},72913:function(e,t,i){"use strict";i.d(t,{isInt:function(){return r}});var o=i(29807),n=i(70799);function r(e){return(0,n.isString)(e)&&(0,o.isNumeric)(e)&&(e=parseFloat(e)),"number"==typeof e&&Number.isFinite(e)&&!(e%1)}},19306:function(e,t,i){"use strict";i.d(t,{isJoditObject:function(){return n}});var o=i(23282);function n(e){return!!(e&&e instanceof Object&&(0,o.isFunction)(e.constructor)&&("u">typeof Jodit&&e instanceof Jodit||e.isJodit))}},45603:function(e,t,i){"use strict";var o=i(70799);i.d(t,["isLicense",0,e=>(0,o.isString)(e)&&23===e.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(e)])},78116:function(e,t,i){"use strict";i.d(t,{isMarker:function(){return n}});var o=i(2748);function n(e){return o.Dom.isMarker(e)}},70722:function(e,t,i){"use strict";function o(e){return!!e&&"function"===(typeof e).toLowerCase()&&(e===Function.prototype||/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code]\s*}\s*$/i.test(e+""))}i.d(t,{isNativeFunction:function(){return o}})},84767:function(e,t,i){"use strict";function o(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}i.d(t,{isNumber:function(){return o}})},29807:function(e,t,i){"use strict";i.d(t,{isNumeric:function(){return n}});var o=i(70799);function n(e){if((0,o.isString)(e)){if(!e.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},72430:function(e,t,i){"use strict";i.d(t,{isPlainObject:function(){return n}});var o=i(52742);function n(e){return!(!e||"object"!=typeof e||e.nodeType||(0,o.isWindow)(e))&&!(e.constructor&&!({}).hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},14773:function(e,t,i){"use strict";function o(e){return e&&"function"==typeof e.then}i.d(t,{isPromise:function(){return o}})},42320:function(e,t,i){"use strict";i.d(t,{isSet:function(){return n}});var o=i(23282);function n(e){return!!e&&(0,o.isFunction)(e.has)&&(0,o.isFunction)(e.add)&&(0,o.isFunction)(e.delete)}},70799:function(e,t,i){"use strict";i.d(t,{isString:function(){return n},isStringArray:function(){return r}});var o=i(68345);function n(e){return"string"==typeof e}function r(e){return(0,o.isArray)(e)&&n(e[0])}},26049:function(e,t,i){"use strict";i.d(t,{isURL:function(){return n}});var o=i(82758);function n(e){if(e.includes(" "))return!1;if("u">typeof URL)try{let t=new URL(e);return["https:","http:","ftp:","file:","rtmp:"].includes(t.protocol)}catch(e){return!1}let t=o.globalDocument.createElement("a");return t.href=e,!!t.hostname}},37508:function(e,t,i){"use strict";function o(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(e)&&e.trim().length>0}i.d(t,{isValidName:function(){return o}})},39955:function(e,t,i){"use strict";i.d(t,{isViewObject:function(){return n}});var o=i(23282);function n(e){return!!(e&&e instanceof Object&&(0,o.isFunction)(e.constructor)&&e.isView)}},86068:function(e,t,i){"use strict";function o(e){return null==e}i.d(t,{isVoid:function(){return o}})},52742:function(e,t,i){"use strict";function o(e){return null!=e&&e===e.window}i.d(t,{isWindow:function(){return o}})},35278:function(e,t,i){"use strict";i.d(t,["colorToHex",0,e=>{if("rgba(0, 0, 0, 0)"===e||""===e)return!1;if(!e)return"#000000";if("#"===e.substr(0,1))return e;let t=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!t)return"#000000";let i=parseInt(t[2],10),o=parseInt(t[3],10),n=(parseInt(t[4],10)|o<<8|i<<16).toString(16).toUpperCase();for(;n.length<6;)n="0"+n;return t[1]+"#"+n}])},32574:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return d}});var o=i(82758),n=i(2748),r=i(49055),s=i(29960),a=i(41180),l=i(76078);function c(e){return e.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi,"").replace(/mso-[a-z-]+:[\s]*[^";']+$/gi,"").replace(/border[a-z-]*:[\s]*[^;]+;/gi,"").replace(/([0-9.]+)(pt|cm)/gi,(e,t,i)=>{switch(i.toLowerCase()){case"pt":return(1.328*parseFloat(t)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(t)).toFixed(0)+"px"}return e})}function d(e){let t=/<html(?:\s[^>]*)?>/i.exec(e);if(!t)return e;let i=(e=e.substring(t.index)).toLowerCase().lastIndexOf("</html>");-1!==i&&(e=e.substring(0,i+7));let d=o.globalDocument.createElement("iframe");(0,a.css)(d,"display","none"),n.Dom.append(o.globalDocument.body,d);let u="";try{let t=d.contentDocument||(d.contentWindow?d.contentWindow.document:null);if(t){t.open(),t.write(e),t.close(),n.Dom.each(t.body,e=>{n.Dom.isElement(e)&&/mso-list:\s*ignore/i.test((0,s.attr)(e,"style")||"")&&n.Dom.safeRemove(e)});try{for(let e=0;e<t.styleSheets.length;e+=1){let i=t.styleSheets[e].cssRules;for(let e=0;e<i.length;e+=1)""!==i[e].selectorText&&(0,l.$$)(i[e].selectorText,t.body).forEach(t=>{t.style.cssText=c(i[e].style.cssText+";"+t.style.cssText)})}}catch(e){if(!o.IS_PROD)throw e}n.Dom.each(t.body,e=>{if(n.Dom.isElement(e)){let t=(0,s.attr)(e,"style");t&&(e.style.cssText=c(t)),(0,s.attr)(e,"style")||(0,s.attr)(e,"style",null)}}),u=t.firstChild?(0,r.trim)(t.body.innerHTML):""}}catch(e){}finally{n.Dom.safeRemove(d)}return u&&(e=u),(0,r.trim)(e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,""))}},53212:function(e,t,i){"use strict";i.d(t,{cleanFromWord:function(){return l}});var o=i(82758),n=i(2748),r=i(4510),s=i(49055),a=i(29960);function l(e){-1!==e.indexOf("<html ")&&(e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7));let t="";try{let i=o.globalDocument.createElement("div");i.innerHTML=e;let s=[];i.firstChild&&n.Dom.each(i,e=>{if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case"STYLE":case"LINK":case"META":s.push(e);break;case"W:SDT":case"W:SDTPR":case"FONT":n.Dom.unwrap(e);break;default:if(/mso-list:\s*ignore/i.test((0,a.attr)(e,"style")||"")){s.push(e);break}(0,r.toArray)(e.attributes).forEach(t=>{-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&(0,a.attrRaw)(e,t.name,null)})}break;case Node.TEXT_NODE:break;default:s.push(e)}}),n.Dom.safeRemove.apply(null,s),t=i.innerHTML}catch(e){}return t&&(e=t),(e=e.split(/(\n)/).filter(s.trim).join(`
|
|
18
|
+
`)).replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,"")}},53326:function(e,t,i){"use strict";i.d(t,{htmlspecialchars:function(){return n}});var o=i(82758);function n(e){let t=o.globalDocument.createElement("div");return t.textContent=e,t.innerHTML}},75275:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return o.applyStyles},cleanFromWord:function(){return n.cleanFromWord},htmlspecialchars:function(){return r.htmlspecialchars},nl2br:function(){return s.nl2br},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},stripTags:function(){return l.stripTags}});var o=i(32574),n=i(53212),r=i(53326),s=i(45971),a=i(86518),l=i(91003)},45971:function(e,t,i){"use strict";function o(e){return e.replace(/\r\n|\r|\n/g,"<br/>")}i.d(t,{nl2br:function(){return o}})},86518:function(e,t,i){"use strict";i.d(t,{safeHTML:function(){return l},sanitizeHTMLElement:function(){return p}});var o=i(2748),n=i(43555),r=i(29960);let s=new Set(["foreignobject","annotation-xml","desc","title"]),a=e=>!!(e&&/^(math|svg)$/i.test(e.nodeName));function l(e,t){var i;if(!o.Dom.isElement(e)&&!o.Dom.isFragment(e))return;let r=[];for(let t of(o.Dom.each(e,e=>{o.Dom.isElement(e)&&o.Dom.up(e.parentNode,a)&&r.push(e)}),r))o.Dom.isOrContains(e,t)&&function(e){if("http://www.w3.org/1999/xhtml"!==e.namespaceURI||null==o.Dom.up(e,a))return!1;for(let t=e.parentElement;t;t=t.parentElement){let e=t.nodeName.toLowerCase();if("math"===e||"svg"===e)break;if(s.has(e))return!1}return!0}(t)&&o.Dom.safeRemove(t);let l=[];for(let t of(o.Dom.each(e,e=>{o.Dom.isElement(e)&&"NOSCRIPT"===e.nodeName&&l.push(e)}),l))o.Dom.safeRemove(t);let d=null!=(i=t.removeEventAttributes)?i:t.removeOnError,u=e=>{if(o.Dom.isElement(e)&&(d&&c(e),p(e,t),t.safeLinksTarget&&"A"===e.nodeName&&"_blank"===(0,n.attr)(e,"target"))){let t=((0,n.attr)(e,"rel")||"").split(/\s+/).filter(Boolean);t.includes("noopener")||t.push("noopener"),t.includes("noreferrer")||t.push("noreferrer"),(0,n.attr)(e,"rel",t.join(" "))}};u(e),o.Dom.each(e,u)}function c(e){if(!o.Dom.isElement(e))return!1;let t=!1,i=[];for(let t=0;t<e.attributes.length;t++)e.attributes[t].name.toLowerCase().startsWith("on")&&i.push(e.attributes[t].name);for(let o of i)(0,r.attrRaw)(e,o,null),t=!0;return t}let d=["src","data","action","formaction","poster","background","xlink:href"],u=new Set(["iframe","frame","object","embed"]);function h(e,t){let i=e.replace(/[\u0000-\u0020]+/g,"").toLowerCase();return!!(/^(?:javascript|vbscript|livescript|mocha):/.test(i)||/^data:(?:text\/html|application\/xhtml)/.test(i))||/^data:image\/svg/.test(i)&&u.has(t)}function p(e,{safeJavaScriptLink:t,removeOnError:i,removeEventAttributes:s}={safeJavaScriptLink:!0,removeOnError:!0}){if(!o.Dom.isElement(e))return!1;let a=!1;s&&c(e)&&(a=!0),i&&e.hasAttribute("onerror")&&((0,n.attr)(e,"onerror",null),a=!0);let l=e.nodeName.toLowerCase(),u=(0,n.attr)(e,"href");if(t&&u&&h(u,l)){let t="u">typeof location?location.protocol:"http:";(0,n.attr)(e,"href",t+"//"+u),a=!0}if(t)for(let t of(e.hasAttribute("srcdoc")&&((0,n.attr)(e,"srcdoc",null),a=!0),d)){let i=(0,r.attrRaw)(e,t);i&&h(i,l)&&((0,n.attr)(e,t,null),a=!0)}return a}},91003:function(e,t,i){"use strict";i.d(t,{stripTags:function(){return function e(t,i=document,c=null,d=!1){let u=i.createElement("div");(0,n.isString)(t)?u.innerHTML=t:o.Dom.append(u,t);let h=[];return o.Dom.each(u,e=>{o.Dom.isElement(e)&&h.push(e)}),h.forEach(t=>{if(!t.parentNode)return;if(c&&o.Dom.isTag(t,c)){let n=t.nodeName.toLowerCase(),r=o.Dom.isTag(t,l)?`%%%jodit-single-${n}%%%`:`%%%jodit-${n}%%%${e(t.innerHTML,i,c,d)}%%%/jodit-${n}%%%`;o.Dom.before(t,i.createTextNode(r)),o.Dom.safeRemove(t);return}if(o.Dom.isTag(t,a))return void o.Dom.safeRemove(t);if(!o.Dom.isTag(t,s))return;let n=t.nextSibling;!(o.Dom.isText(n)&&/^\s/.test(n.nodeValue||""))&&n&&o.Dom.before(n,i.createTextNode(d?"%%%jodit-single-br%%%":" "))}),(0,r.trim)(u.innerText).replace(/%%%(\/)?jodit(-single)?-([\w\n]+)%%%/g,(e,t,i,o)=>`<${t?"/":""}${o}>`)}}});var o=i(2748),n=i(70799),r=i(49055);let s=new Set(["div","p","br","h1","h2","h3","h4","h5","h6","hr"]),a=new Set(["script","style"]),l=new Set(["br","hr","input"])},21537:function(e,t,i){"use strict";i.r(t),i.d(t,{$$:function(){return u.$$},CamelCaseToKebabCase:function(){return d.CamelCaseToKebabCase},ConfigDeepFlatten:function(){return u.ConfigDeepFlatten},ConfigFlatten:function(){return u.ConfigFlatten},ConfigMerge:function(){return u.ConfigMerge},ConfigProto:function(){return u.ConfigProto},ConnectionError:function(){return u.ConnectionError},LimitedStack:function(){return u.LimitedStack},NUMBER_FIELDS_REG:function(){return l.NUMBER_FIELDS_REG},OptionsError:function(){return u.OptionsError},UNSAFE_PROTO_KEYS:function(){return u.UNSAFE_PROTO_KEYS},abort:function(){return u.abort},alignElement:function(){return u.alignElement},alreadyLoadedList:function(){return u.alreadyLoadedList},appendScriptAsync:function(){return u.appendScriptAsync},appendStyleAsync:function(){return u.appendStyleAsync},applyStyles:function(){return a.applyStyles},asArray:function(){return o.asArray},assert:function(){return u.assert},attr:function(){return u.attr},attrRaw:function(){return u.attrRaw},browser:function(){return u.browser},buildQuery:function(){return u.buildQuery},call:function(){return u.call},callPromise:function(){return u.callPromise},callThis:function(){return u.callThis},camelCase:function(){return d.camelCase},cleanFromWord:function(){return a.cleanFromWord},clearAlign:function(){return u.clearAlign},clearCenterAlign:function(){return u.clearCenterAlign},clearTimeout:function(){return n.clearTimeout},cns:function(){return u.cns},colorToHex:function(){return s.colorToHex},completeUrl:function(){return u.completeUrl},connection:function(){return u.connection},convertMediaUrlToVideoEmbed:function(){return u.convertMediaUrlToVideoEmbed},createMediaWrapper:function(){return u.createMediaWrapper},css:function(){return u.css},cssInline:function(){return u.cssInline},cssPath:function(){return u.cssPath},ctrlKey:function(){return u.ctrlKey},dataBind:function(){return u.dataBind},defaultLanguage:function(){return u.defaultLanguage},error:function(){return u.error},fastClone:function(){return u.fastClone},fuzzySearchIndex:function(){return d.fuzzySearchIndex},get:function(){return u.get},getAlignClasses:function(){return u.getAlignClasses},getClassName:function(){return u.getClassName},getContentWidth:function(){return c.getContentWidth},getDataTransfer:function(){return u.getDataTransfer},getFixedPositionOffset:function(){return c.getFixedPositionOffset},getHAlign:function(){return u.getHAlign},getMediaWrapper:function(){return u.getMediaWrapper},getPropertyDescriptor:function(){return u.getPropertyDescriptor},getScrollParent:function(){return c.getScrollParent},getWrappedMedia:function(){return u.getWrappedMedia},getXPathByElement:function(){return u.getXPathByElement},hAlignElement:function(){return u.hAlignElement},hasBrowserColorPicker:function(){return r.hasBrowserColorPicker},hasContainer:function(){return r.hasContainer},htmlspecialchars:function(){return a.htmlspecialchars},humanSizeToBytes:function(){return u.humanSizeToBytes},i18n:function(){return d.i18n},inView:function(){return u.inView},innerWidth:function(){return c.innerWidth},isAbortError:function(){return r.isAbortError},isArray:function(){return r.isArray},isAtom:function(){return u.isAtom},isBoolean:function(){return r.isBoolean},isDestructable:function(){return r.isDestructable},isEqual:function(){return r.isEqual},isFastEqual:function(){return r.isFastEqual},isFunction:function(){return r.isFunction},isHTML:function(){return r.isHTML},isHtmlFromWord:function(){return r.isHtmlFromWord},isInitable:function(){return r.isInitable},isInt:function(){return r.isInt},isJoditObject:function(){return r.isJoditObject},isLicense:function(){return r.isLicense},isMarker:function(){return r.isMarker},isNativeFunction:function(){return r.isNativeFunction},isNumber:function(){return r.isNumber},isNumeric:function(){return r.isNumeric},isPlainObject:function(){return r.isPlainObject},isPromise:function(){return r.isPromise},isSet:function(){return r.isSet},isString:function(){return r.isString},isStringArray:function(){return r.isStringArray},isURL:function(){return r.isURL},isUnsafeProtoKey:function(){return u.isUnsafeProtoKey},isValidName:function(){return r.isValidName},isViewObject:function(){return r.isViewObject},isVoid:function(){return r.isVoid},isWindow:function(){return r.isWindow},kebabCase:function(){return d.kebabCase},keepNames:function(){return u.keepNames},keys:function(){return u.keys},loadImage:function(){return u.loadImage},loadNext:function(){return u.loadNext},loadNextStyle:function(){return u.loadNextStyle},markAsAtomic:function(){return u.markAsAtomic},markDeprecated:function(){return u.markDeprecated},markOwner:function(){return u.markOwner},memorizeExec:function(){return u.memorizeExec},nl2br:function(){return a.nl2br},normalizeColor:function(){return l.normalizeColor},normalizeCssNumericValue:function(){return l.normalizeCssNumericValue},normalizeCssValue:function(){return l.normalizeCssValue},normalizeKeyAliases:function(){return l.normalizeKeyAliases},normalizeLicense:function(){return l.normalizeLicense},normalizePath:function(){return l.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return l.normalizeSize},normalizeUrl:function(){return l.normalizeUrl},offset:function(){return c.offset},options:function(){return u.options},parseQuery:function(){return u.parseQuery},position:function(){return c.position},prepareEmbedCode:function(){return u.prepareEmbedCode},prepareMedia:function(){return u.prepareMedia},previewBox:function(){return u.previewBox},refs:function(){return u.refs},reset:function(){return u.reset},resolveElement:function(){return u.resolveElement},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},scrollIntoViewIfNeeded:function(){return u.scrollIntoViewIfNeeded},set:function(){return u.set},setTimeout:function(){return n.setTimeout},size:function(){return c.size},splitArray:function(){return o.splitArray},sprintf:function(){return d.sprintf},stringify:function(){return d.stringify},stripTags:function(){return a.stripTags},toArray:function(){return o.toArray},trim:function(){return d.trim},trimChars:function(){return d.trimChars},trimInv:function(){return d.trimInv},ucfirst:function(){return d.ucfirst},wrapMedia:function(){return u.wrapMedia}});var o=i(76855),n=i(91898),r=i(27613),s=i(35278),a=i(75275),l=i(71521),c=i(56175),d=i(59007),u=i(43555)},71521:function(e,t,i){"use strict";i.d(t,{NUMBER_FIELDS_REG:function(){return n.NUMBER_FIELDS_REG},normalizeColor:function(){return o.normalizeColor},normalizeCssNumericValue:function(){return n.normalizeCssNumericValue},normalizeCssValue:function(){return n.normalizeCssValue},normalizeKeyAliases:function(){return r.normalizeKeyAliases},normalizeLicense:function(){return s.normalizeLicense},normalizePath:function(){return a.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return c.normalizeSize},normalizeUrl:function(){return d.normalizeUrl}});var o=i(21224),n=i(3760),r=i(49033),s=i(12972),a=i(9992),l=i(70091),c=i(46334),d=i(37406)},21224:function(e,t,i){"use strict";var o=i(35278),n=i(49055);i.d(t,["normalizeColor",0,e=>{let t=["#"],i=(0,o.colorToHex)(e);if(!i)return!1;if(3===(i=(i=(0,n.trim)(i.toUpperCase())).substring(1)).length){for(let e=0;e<3;e+=1)t.push(i[e]),t.push(i[e]);return t.join("")}return i.length>6&&(i=i.slice(0,6)),"#"+i}])},3760:function(e,t,i){"use strict";i.d(t,{normalizeCssNumericValue:function(){return l},normalizeCssValue:function(){return c}});var o=i(29807),n=i(86068),r=i(35278),s=i(12475);let a=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;function l(e,t){return!(0,n.isVoid)(t)&&a.test(e)&&(0,o.isNumeric)(t.toString())?parseInt(t.toString(),10)+"px":t}function c(e,t){if("font-weight"===(0,s.kebabCase)(e)){switch(t.toString().toLowerCase()){case"700":case"bold":return 700;case"400":case"normal":return 400;case"900":case"heavy":return 900}return(0,o.isNumeric)(t)?Number(t):t}return/color/i.test(e)&&/^rgb/i.test(t.toString())&&(0,r.colorToHex)(t.toString())||t}i.d(t,["NUMBER_FIELDS_REG",0,a])},49033:function(e,t,i){"use strict";i.d(t,{normalizeKeyAliases:function(){return r}});var o=i(82758),n=i(49055);function r(e){let t={},i={meta:1,ctrl:2,control:2,alt:3,shift:4,space:5};return e.replace(/\+\+/g,"+add").split(/[\s]*\+[\s]*/).map(e=>(0,n.trim)(e.toLowerCase())).map(e=>o.KEY_ALIASES[e]||e).sort((e,t)=>i[e]&&!i[t]?-1:!i[e]&&i[t]?1:i[e]&&i[t]?i[e]-i[t]:e>t?1:-1).filter(e=>!t[e]&&""!==e&&(t[e]=!0)).join("+")}},12972:function(e,t,i){"use strict";i.d(t,["normalizeLicense",0,(e,t=8)=>{let i=[];for(;e.length;)i.push(e.substr(0,t)),e=e.substr(t);return i[1]=i[1].replace(/./g,"*"),i[2]=i[2].replace(/./g,"*"),i.join("-")}])},9992:function(e,t,i){"use strict";var o=i(49055);i.d(t,["normalizePath",0,(...e)=>e.filter(e=>(0,o.trim)(e).length).map((t,i)=>(t=t.replace(/([^:])[\\/]+/g,"$1/"),i&&(t=t.replace(/^\//,"")),i!==e.length-1&&(t=t.replace(/\/$/,"")),t)).join("/")])},70091:function(e,t,i){"use strict";i.d(t,["normalizeRelativePath",0,e=>e.split("/").reduce((e,t)=>{switch(t){case"":case".":break;case"..":e.pop();break;default:e.push(t)}return e},[]).join("/")+(e.endsWith("/")?"/":"")])},46334:function(e,t,i){"use strict";i.d(t,["normalizeSize",0,(e,t)=>/^[0-9]+$/.test(e.toString())?e+t:e.toString()])},37406:function(e,t,i){"use strict";i.d(t,["normalizeUrl",0,(...e)=>e.filter(e=>e.length).map(e=>e.replace(/\/$/,"")).join("/").replace(/([^:])[\\/]+/g,"$1/")])},44506:function(e,t,i){"use strict";i.d(t,["getContentWidth",0,(e,t)=>{let i=t.getComputedStyle(e);return e.offsetWidth-parseInt(i.getPropertyValue("padding-left")||"0",10)-parseInt(i.getPropertyValue("padding-right")||"0",10)}])},35224:function(e,t,i){"use strict";function o(e){var t,i;let o=null==(t=e.ownerDocument)?void 0:t.defaultView,n=e.parentElement;for(;o&&n;){if(""!==(i=o.getComputedStyle(n)).transform&&"none"!==i.transform||""!==i.perspective&&"none"!==i.perspective||""!==i.filter&&"none"!==i.filter||"transform"===i.willChange||"perspective"===i.willChange||"filter"===i.willChange||"paint"===i.contain||"layout"===i.contain||"strict"===i.contain||"content"===i.contain){let e=n.getBoundingClientRect();return{x:e.left,y:e.top}}n=n.parentElement}return{x:0,y:0}}i.d(t,{getFixedPositionOffset:function(){return o}})},16442:function(e,t,i){"use strict";i.d(t,{getScrollParent:function(){return function e(t){if(!t)return null;let i=n.Dom.isHTMLElement(t),s=i&&(0,r.css)(t,"overflowY");return i&&"visible"!==s&&"hidden"!==s&&t.scrollHeight>=t.clientHeight?t:e(t.parentNode)||o.globalDocument.scrollingElement||o.globalDocument.body}}});var o=i(82758),n=i(2748),r=i(43555)},56175:function(e,t,i){"use strict";i.d(t,{getContentWidth:function(){return o.getContentWidth},getFixedPositionOffset:function(){return n.getFixedPositionOffset},getScrollParent:function(){return r.getScrollParent},innerWidth:function(){return s.innerWidth},offset:function(){return l.offset},position:function(){return c.position},size:function(){return a.size}});var o=i(44506),n=i(35224),r=i(16442),s=i(81630),a=i(21496),l=i(81284),c=i(5700)},81630:function(e,t,i){"use strict";i.d(t,["innerWidth",0,(e,t)=>{let i=t.getComputedStyle(e);return e.clientWidth-(parseFloat(i.paddingLeft||"0")+parseFloat(i.paddingRight||"0"))}])},21496:function(e,t,i){"use strict";i.d(t,{size:function(){return n}});var o=i(27613);function n(e){return(0,o.isString)(e)||(0,o.isArray)(e)?e.length:(0,o.isPlainObject)(e)?Object.keys(e).length:0}},81284:function(e,t,i){"use strict";let o=(e,t,i,n=!1)=>{let r,s,a;try{r=e.getBoundingClientRect()}catch(e){r={top:0,bottom:0,left:0,right:0,width:0,height:0}}let l=i.body,c=i.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},d=i.defaultView||i.parentWindow,u=d.pageYOffset||c.scrollTop||l.scrollTop,h=d.pageXOffset||c.scrollLeft||l.scrollLeft,p=c.clientTop||l.clientTop||0,f=c.clientLeft||l.clientLeft||0,m=t.iframe;if(!n&&t&&t.options&&t.o.iframe&&m){let{top:e,left:i}=o(m,t,t.od,!0);s=r.top+e,a=r.left+i}else s=r.top+u-p,a=r.left+h-f;return{top:Math.round(s),left:Math.round(a),width:r.width,height:r.height}};i.d(t,["offset",0,o])},5700:function(e,t,i){"use strict";i.d(t,{position:function(){return function e(t,i,n=!1){var r,s;let a=t.getBoundingClientRect(),l=a.left,c=a.top;if((0,o.isJoditObject)(i)&&i.iframe&&i.ed.body.contains(t)&&!n){let{left:t,top:o}=e(i.iframe,i,!0);l+=t,c+=o}return{left:Math.round(l),top:Math.round(c),width:Math.round(null!=(r=t.offsetWidth)?r:a.width),height:Math.round(null!=(s=t.offsetHeight)?s:a.height)}}}});var o=i(19306)},87058:function(e,t,i){"use strict";i.d(t,["camelCase",0,e=>e.replace(/([-_])(.)/g,(e,t,i)=>i.toUpperCase())])},67477:function(e,t,i){"use strict";i.d(t,{fuzzySearchIndex:function(){return n}});var o=i(82758);function n(e,t,i=0,r=1){let s=0,a,l=-1,c=0,d=0;for(a=i;s<e.length&&a<t.length;)e[s].toLowerCase()===t[a].toLowerCase()?(s++,c++,d=0,-1===l&&(l=a)):s>0&&(d>=r&&t[a]!==o.INVISIBLE_SPACE?(s=0,l=-1,c=0,d=0,a--):(d++,c++)),a++;return s===e.length?[l,c]:[-1,0]}},56967:function(e,t,i){"use strict";i.d(t,{i18n:function(){return c}});var o=i(82758),n=i(70799),r=i(36409),s=i(43555),a=i(6441);let l=(e,t)=>{if(!t||!t.length)return e;let i=/%([sd])/g,o=i.exec(e),n=e,r=0;for(;o&&void 0!==t[r];)n=n.replace(o[0],t[r].toString()),r+=1,o=i.exec(e);return n};function c(e,t,i){if(!(0,n.isString)(e))throw(0,s.error)("i18n: Need string in first argument");if(!e.length)return e;let c=!!(null==i?void 0:i.debugLanguage),d={},u=e=>t&&t.length?l(e,t):e,h=(0,s.defaultLanguage)(a.Config.defaultOptions.language,a.Config.defaultOptions.language),p=(0,s.defaultLanguage)(null==i?void 0:i.language,h),f=t=>{if(!t)return;if((0,n.isString)(t[e]))return u(t[e]);let i=e.toLowerCase();if((0,n.isString)(t[i]))return u(t[i]);let o=(0,r.ucfirst)(e);if((0,n.isString)(t[o]))return u(t[o])};void 0!==o.lang[p]?d=o.lang[p]:c||(d=void 0!==o.lang[h]?o.lang[h]:o.lang.en);let m=null==i?void 0:i.i18n;if(m&&m[p]){let e=f(m[p]);if(e)return e}return f(d)||(!c&&o.lang.en&&(0,n.isString)(o.lang.en[e])&&o.lang.en[e]?u(o.lang.en[e]):c?"{"+e+"}":(o.IS_PROD,u(e)))}i.d(t,["sprintf",0,l])},59007:function(e,t,i){"use strict";i.d(t,{CamelCaseToKebabCase:function(){return s.CamelCaseToKebabCase},camelCase:function(){return o.camelCase},fuzzySearchIndex:function(){return n.fuzzySearchIndex},i18n:function(){return r.i18n},kebabCase:function(){return s.kebabCase},sprintf:function(){return r.sprintf},stringify:function(){return a.stringify},trim:function(){return l.trim},trimChars:function(){return l.trimChars},trimInv:function(){return l.trimInv},ucfirst:function(){return c.ucfirst}});var o=i(87058),n=i(67477),r=i(56967),s=i(12475),a=i(67462),l=i(49055),c=i(36409)},12475:function(e,t,i){"use strict";i.d(t,["CamelCaseToKebabCase",0,e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),"kebabCase",0,e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()])},67462:function(e,t,i){"use strict";function o(e,t={}){if("object"!=typeof e)return e+"";let i=new Set(t.excludeKeys),n=new WeakMap;return JSON.stringify(e,(e,t)=>{if(!i.has(e)){if("object"==typeof t&&null!=t){if(n.get(t))return"[refObject]";n.set(t,!0)}return t}},t.prettify)}i.d(t,{stringify:function(){return o}})},49055:function(e,t,i){"use strict";i.d(t,{trim:function(){return n},trimChars:function(){return r},trimInv:function(){return s}});var o=i(82758);function n(e){return e.replace((0,o.SPACE_REG_EXP_END)(),"").replace((0,o.SPACE_REG_EXP_START)(),"")}function r(e,t){return e.replace(RegExp(`[${t}]+$`),"").replace(RegExp(`^[${t}]+`),"")}function s(e){return e.replace((0,o.INVISIBLE_SPACE_REG_EXP_END)(),"").replace((0,o.INVISIBLE_SPACE_REG_EXP_START)(),"")}},36409:function(e,t,i){"use strict";function o(e){return e.length?e[0].toUpperCase()+e.substring(1):""}i.d(t,{ucfirst:function(){return o}})},25726:function(e,t,i){"use strict";i.d(t,{alignElement:function(){return p},clearAlign:function(){return u},getAlignClasses:function(){return c},getHAlign:function(){return d},hAlignElement:function(){return function e(t,i,o){var n;if(o){e(t,"normal"),Object.values(o).forEach(e=>l(e).forEach(e=>t.classList.remove(...e))),t.classList.add(...null!=(n=l(o[i||"normal"])[0])?n:[]),["class","style"].forEach(e=>{var i;(null==(i=(0,r.attr)(t,e))?void 0:i.trim())||(0,r.attr)(t,e,null)});return}i&&"normal"!==i?"center"!==i?((0,s.css)(t,"float",i),(0,s.clearCenterAlign)(t)):(0,s.css)(t,{float:"",display:"block",marginLeft:"auto",marginRight:"auto"}):((0,s.css)(t,"float")&&-1!==["right","left"].indexOf((0,s.css)(t,"float").toString().toLowerCase())&&(0,s.css)(t,"float",""),(0,s.clearCenterAlign)(t))}}});var o=i(22732),n=i(68345),r=i(29960),s=i(41180),a=i(61477);let l=e=>((0,n.isArray)(e)?e:[null!=e?e:""]).map(e=>e.split(/\s+/).filter(Boolean)).filter(e=>e.length);function c(e,t){var i,n;if(!t)return null;let r=o.Dom.isTag(t,new Set(["jodit","jodit-media"]))?t.firstElementChild:(0,a.getWrappedMedia)(e,t),s=(null!=r?r:t).nodeName.toLowerCase();return null!=(n=null==(i=e.o.alignClasses)?void 0:i[s])?n:"img"===s?e.o.imageAlignClasses:null}function d(e,t){if(t){for(let i of["left","right","center","normal"])if(l(t[i]).some(t=>t.every(t=>e.classList.contains(t))))return i}let i=(0,s.cssInline)(e,"float").toLowerCase();return"left"===i||"right"===i?i:"block"===(0,s.css)(e,"display")&&"auto"===(0,s.cssInline)(e,"margin-left")&&"auto"===(0,s.cssInline)(e,"margin-right")?"center":"normal"}function u(e){o.Dom.each(e,e=>{o.Dom.isHTMLElement(e)&&(0,s.cssInline)(e,"textAlign")&&((0,s.css)(e,"textAlign",""),((0,r.attr)(e,"style")||"").trim().length||(0,r.attr)(e,"style",null))})}let h=new Map([["justifyfull","justify"],["justifyright","right"],["justifyleft","left"],["justifycenter","center"]]);function p(e,t){if(o.Dom.isNode(t)&&o.Dom.isElement(t)){u(t);let i=h.get(e.toLowerCase());i&&(0,s.css)(t,"textAlign",i)}}},63799:function(e,t,i){"use strict";i.d(t,{loadNext:function(){return function e(t,i,o=0){return(0,n.isString)(i[o])?c(t,i[o]).then(()=>e(t,i,o+1)):Promise.resolve()}},loadNextStyle:function(){return function e(t,i,o=0){return(0,n.isString)(i[o])?d(t,i[o]).then(()=>e(t,i,o+1)):Promise.resolve()}}});var o=i(2748),n=i(70799),r=i(29960),s=i(66292);let a=new Map,l=e=>(t,i)=>{if(a.has(i))return a.get(i);let o=e(t,i);return a.set(i,o),o},c=l((e,t)=>e.async.promise((i,n)=>{if(e.isInDestruct)return n();let a=e.c.element("script",{type:"text/javascript",crossorigin:"anonymous",referrerpolicy:"no-referrer",async:!0,src:(0,s.completeUrl)(t)});e.o.nonce&&(0,r.attr)(a,"nonce",e.o.nonce),e.e.one(a,"error",n).one(a,"load",i),o.Dom.append(e.od.body,a)})),d=l((e,t)=>e.async.promise((i,n)=>{if(e.isInDestruct)return n();let a=e.c.element("link",{rel:"stylesheet",media:"all",crossorigin:"anonymous"});e.o.nonce&&(0,r.attr)(a,"nonce",e.o.nonce),e.isInDestruct||e.e.on(a,"load",()=>i(a)).on(a,"error",n),(0,r.attr)(a,"href",(0,s.completeUrl)(t)),e.o.shadowRoot?o.Dom.append(e.o.shadowRoot,a):o.Dom.append(e.od.body,a)}));i.d(t,["alreadyLoadedList",0,a,"appendScriptAsync",0,c,"appendStyleAsync",0,d])},38837:function(e,t,i){"use strict";i.d(t,{assert:function(){return n}});class o extends Error{constructor(e){super(e),this.name="AssertionError"}}function n(e,t){if(!e)throw new o("Assertion failed: "+t)}},29960:function(e,t,i){"use strict";i.d(t,{attr:function(){return function e(t,i,l){if(!t||!(0,o.isFunction)(t.getAttribute))return null;if(!(0,r.isString)(i))return Object.keys(i).forEach(o=>{let r=i[o];(0,n.isPlainObject)(r)&&"style"===o?(0,a.css)(t,r):("className"===o&&(o="class"),e(t,o,r))}),null;let c=(0,s.CamelCaseToKebabCase)(i);if(/^-/.test(c)){let i=e(t,"data"+c);if(i)return i;c=c.substr(1)}if(void 0!==l)if(null==l)t.hasAttribute(c)&&t.removeAttribute(c);else{let e=l.toString();return"IMG"===t.nodeName&&("width"===c||"height"===c)&&(e=e.replace("px","")),t.setAttribute(c,e),e}return t.getAttribute(c)}},attrRaw:function(){return l}});var o=i(23282),n=i(72430),r=i(70799),s=i(12475),a=i(41180);function l(e,t,i){if(void 0===i)return e.getAttribute(t);if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}e.setAttribute(t,i)}},97639:function(e,t,i){"use strict";i.d(t,["browser",0,e=>{let t=navigator.userAgent.toLowerCase(),i=/(firefox)[\s/]([\w.]+)/.exec(t)||/(chrome)[\s/]([\w.]+)/.exec(t)||/(webkit)[\s/]([\w.]+)/.exec(t)||/(opera)(?:.*version)[\s/]([\w.]+)/.exec(t)||/(msie)[\s]([\w.]+)/.exec(t)||/(trident)\/([\w.]+)/.exec(t)||0>t.indexOf("compatible")||[];return"version"===e?i[2]:"webkit"===e?"chrome"===i[1]||"webkit"===i[1]:"ff"===e?"firefox"===i[1]:"msie"===e?"trident"===i[1]||"msie"===i[1]:i[1]===e}])},44710:function(e,t,i){"use strict";var o=i(72430);let n=(e,t)=>{let i=[],r=encodeURIComponent;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)){let a=t?t+"["+s+"]":s,l=e[s];i.push((0,o.isPlainObject)(l)?n(l,a):r(a)+"="+r(l))}return i.join("&")};i.d(t,["buildQuery",0,n])},66292:function(e,t,i){"use strict";var o=i(82758);i.d(t,["completeUrl",0,e=>("file:"===o.globalWindow.location.protocol&&/^\/\//.test(e)&&(e="https:"+e),e)])},68934:function(e,t,i){"use strict";i.d(t,{ConfigDeepFlatten:function(){return function e(t){return(0,d.keys)(t,!1).reduce((i,o)=>(i[o]=(0,n.isPlainObject)(t[o])?e(t[o]):t[o],i),{})}},ConfigFlatten:function(){return u},ConfigMerge:function(){return function e(t,i){Object.keys(i).forEach(o=>{if((0,c.isUnsafeProtoKey)(o))return;let r=i[o],s=t[o];(0,n.isPlainObject)(r)&&(0,n.isPlainObject)(s)&&!(0,l.isAtom)(r)?e(s,r):t[o]=r})}},ConfigProto:function(){return function e(t,i,d=0){if(Object.getPrototypeOf(t)!==Object.prototype)return t;let u=a.Config.defaultOptions;if((0,r.isString)(t.preset)){if(void 0!==u.presets[t.preset]){let e=u.presets[t.preset];Object.keys(e).forEach(i=>{(0,s.isVoid)(t[i])&&(t[i]=e[i])})}delete t.preset}let h={};return Object.keys(t).forEach(r=>{if((0,c.isUnsafeProtoKey)(r))return;let s=t[r],a=i?i[r]:null;if((0,n.isPlainObject)(s)&&(0,n.isPlainObject)(a)&&!(0,l.isAtom)(s)){h[r]=e(s,a,d+1);return}if(0!==d&&(0,o.isArray)(s)&&!(0,l.isAtom)(s)&&(0,o.isArray)(a)){h[r]=[...s,...a.slice(s.length)];return}h[r]=s}),Object.setPrototypeOf(h,i),h}}});var o=i(68345),n=i(72430),r=i(70799),s=i(86068),a=i(6441),l=i(97735),c=i(69175),d=i(37790);function u(e){return(0,d.keys)(e,!1).reduce((t,i)=>(t[i]=e[i],t),{})}},55877:function(e,t,i){"use strict";var o=i(82758),n=i(26049),r=i(82501);i.d(t,["convertMediaUrlToVideoEmbed",0,(e,{width:t=400,height:i=345}={})=>{if(!(0,n.isURL)(e))return e;let s=o.globalDocument.createElement("a");s.href=e,t||(t=400),i||(i=345);let a=s.protocol||"";switch(s.hostname){case"www.vimeo.com":case"vimeo.com":{let o=s.pathname.split("/").filter(Boolean),n=o.findIndex(e=>/^\d+$/.test(e));if(-1===n)return e;let r=o[n],l=o[n+1];return l&&0===n&&(r+="/"+l),'<iframe width="'+t+'" height="'+i+'" src="'+a+"//player.vimeo.com/video/"+r+'" frameborder="0" allowfullscreen></iframe>'}case"youtube.com":case"www.youtube.com":case"m.youtube.com":case"music.youtube.com":case"youtu.be":case"www.youtu.be":{let o=(s.search?(0,r.parseQuery)(s.search):{}).v||s.pathname.substring(1);return(o=o.replace(/^(watch|embed|shorts|live|v)\//,"").replace(/\/$/,""))?'<iframe width="'+t+'" height="'+i+'" src="'+a+"//www.youtube.com/embed/"+o+'" frameborder="0" allowfullscreen></iframe>':e}}return e}])},41180:function(e,t,i){"use strict";i.d(t,{css:function(){return l},cssInline:function(){return c}});var o=i(87612),n=i(72430),r=i(3760),s=i(87058),a=i(12475);function l(e,t,i,c=!1){if((0,o.isBoolean)(i)&&(c=i,i=void 0),(0,n.isPlainObject)(t)||void 0!==i){let o=(e,t,i)=>{void 0!==(i=(0,r.normalizeCssNumericValue)(t,i))&&(null==i||l(e,t,!0)!==(0,r.normalizeCssValue)(t,i))&&(e.style[t]=i)};if((0,n.isPlainObject)(t)){let i=Object.keys(t);for(let n=0;n<i.length;n+=1)o(e,(0,s.camelCase)(i[n]),t[i[n]])}else o(e,(0,s.camelCase)(t),i);return""}let d=(0,a.kebabCase)(t),u=e.ownerDocument||document,h=!!u&&(u.defaultView||u.parentWindow),p=e.style[t],f="";return void 0!==p&&""!==p?f=p:h&&!c&&(f=h.getComputedStyle(e).getPropertyValue(d)),r.NUMBER_FIELDS_REG.test(t)&&/^[-+]?[0-9.]+px$/.test(f.toString())&&(f=parseInt(f.toString(),10)),(0,r.normalizeCssValue)(t,f)}function c(e,t){return e.style.getPropertyValue((0,a.kebabCase)(t))}i.d(t,["clearCenterAlign",0,e=>{"block"===l(e,"display")&&l(e,"display","");let{style:t}=e;"auto"===t.marginLeft&&"auto"===t.marginRight&&(t.marginLeft="",t.marginRight="")}])},15456:function(e,t,i){"use strict";i.d(t,["ctrlKey",0,e=>{if("u">typeof navigator&&-1!==navigator.userAgent.indexOf("Mac OS X")){if(e.metaKey&&!e.altKey)return!0}else if(e.ctrlKey&&!e.altKey)return!0;return!1}])},86583:function(e,t,i){"use strict";var o=i(39955);let n=new WeakMap;i.d(t,["dataBind",0,(e,t,i)=>{let r=n.get(e);if(!r){r={},n.set(e,r);let t=null;(0,o.isViewObject)(e.j)&&(t=e.j.e),(0,o.isViewObject)(e)&&(t=e.e),t&&t.on("beforeDestruct",()=>{n.delete(e)})}return void 0===i?r[t]:(r[t]=i,i)}])},96325:function(e,t,i){"use strict";var o=i(82758),n=i(70799);i.d(t,["defaultLanguage",0,(e,t="en")=>"auto"!==e&&(0,n.isString)(e)?e:o.globalDocument.documentElement&&o.globalDocument.documentElement.lang?o.globalDocument.documentElement.lang:navigator.language?navigator.language.substring(0,2):t])},82760:function(e,t,i){"use strict";i.d(t,{connection:function(){return r},error:function(){return n},options:function(){return s}});var o=i(32880);function n(e){return TypeError(e)}function r(e){return new o.ConnectionError(e)}function s(e){return new o.OptionsError(e)}},93661:function(e,t,i){"use strict";function o(e="Aborted"){return new DOMException(e,"AbortError")}i.d(t,{abort:function(){return o}})},86397:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return o}});class o extends Error{constructor(e){super(e),Object.setPrototypeOf(this,o.prototype)}}},32880:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return n.ConnectionError},OptionsError:function(){return r.OptionsError},abort:function(){return o.abort}});var o=i(93661),n=i(86397),r=i(57865)},57865:function(e,t,i){"use strict";i.d(t,{OptionsError:function(){return o}});class o extends TypeError{constructor(e){super(e),Object.setPrototypeOf(this,o.prototype)}}},89890:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return n.ConnectionError},OptionsError:function(){return n.OptionsError},abort:function(){return n.abort},connection:function(){return o.connection},error:function(){return o.error},options:function(){return o.options}});var o=i(82760),n=i(32880)},97735:function(e,t,i){"use strict";i.d(t,{fastClone:function(){return s},isAtom:function(){return n},markAsAtomic:function(){return r}});var o=i(67462);function n(e){return e&&e.isAtom}function r(e){return Object.defineProperty(e,"isAtom",{enumerable:!1,value:!0,configurable:!1}),e}function s(e){return JSON.parse((0,o.stringify)(e))}},80568:function(e,t,i){"use strict";var o=i(23282);let n=new Map;i.d(t,["getClassName",0,e=>{var t;if((0,o.isFunction)(e.className))return e.className();let i=(null==(t=e.constructor)?void 0:t.originalConstructor)||e.constructor;if(n.has(i))return n.get(i);if(i.name)return i.name;let r=new RegExp(/^\s*function\s*(\S*)\s*\(/),s=i.toString().match(r);return s?s[1]:""},"keepNames",0,n])},94643:function(e,t,i){"use strict";i.d(t,{get:function(){return r}});var o=i(70799),n=i(86068);function r(e,t){if(!(0,o.isString)(e)||!e.length)return null;let i=e.split("."),r=t;try{for(let e of i){if((0,n.isVoid)(r[e]))return null;r=r[e]}}catch(e){return null}return(0,n.isVoid)(r)?null:r}},38420:function(e,t,i){"use strict";i.d(t,["humanSizeToBytes",0,e=>{if(/^[0-9.]+$/.test(e.toString()))return parseFloat(e);let t=e.substr(-2,2).toUpperCase(),i=["KB","MB","GB","TB"],o=parseFloat(e.substr(0,e.length-2));return -1!==i.indexOf(t)?o*Math.pow(1024,i.indexOf(t)+1):parseInt(e,10)}])},43555:function(e,t,i){"use strict";i.d(t,{$$:function(){return j.$$},ConfigDeepFlatten:function(){return d.ConfigDeepFlatten},ConfigFlatten:function(){return d.ConfigFlatten},ConfigMerge:function(){return d.ConfigMerge},ConfigProto:function(){return d.ConfigProto},ConnectionError:function(){return g.ConnectionError},LimitedStack:function(){return A.LimitedStack},OptionsError:function(){return g.OptionsError},UNSAFE_PROTO_KEYS:function(){return _.UNSAFE_PROTO_KEYS},abort:function(){return g.abort},alignElement:function(){return o.alignElement},alreadyLoadedList:function(){return n.alreadyLoadedList},appendScriptAsync:function(){return n.appendScriptAsync},appendStyleAsync:function(){return n.appendStyleAsync},assert:function(){return r.assert},attr:function(){return s.attr},attrRaw:function(){return s.attrRaw},browser:function(){return a.browser},buildQuery:function(){return l.buildQuery},call:function(){return P.call},callPromise:function(){return P.callPromise},callThis:function(){return P.callThis},clearAlign:function(){return o.clearAlign},clearCenterAlign:function(){return h.clearCenterAlign},cns:function(){return k.cns},completeUrl:function(){return c.completeUrl},connection:function(){return g.connection},convertMediaUrlToVideoEmbed:function(){return u.convertMediaUrlToVideoEmbed},createMediaWrapper:function(){return C.createMediaWrapper},css:function(){return h.css},cssInline:function(){return h.cssInline},cssPath:function(){return j.cssPath},ctrlKey:function(){return p.ctrlKey},dataBind:function(){return f.dataBind},defaultLanguage:function(){return m.defaultLanguage},error:function(){return g.error},fastClone:function(){return b.fastClone},get:function(){return v.get},getAlignClasses:function(){return o.getAlignClasses},getClassName:function(){return y.getClassName},getDataTransfer:function(){return P.getDataTransfer},getHAlign:function(){return o.getHAlign},getMediaWrapper:function(){return C.getMediaWrapper},getPropertyDescriptor:function(){return P.getPropertyDescriptor},getWrappedMedia:function(){return C.getWrappedMedia},getXPathByElement:function(){return j.getXPathByElement},hAlignElement:function(){return o.hAlignElement},humanSizeToBytes:function(){return w.humanSizeToBytes},inView:function(){return T.inView},isAtom:function(){return b.isAtom},isUnsafeProtoKey:function(){return _.isUnsafeProtoKey},keepNames:function(){return y.keepNames},keys:function(){return P.keys},loadImage:function(){return P.loadImage},loadNext:function(){return n.loadNext},loadNextStyle:function(){return n.loadNextStyle},markAsAtomic:function(){return b.markAsAtomic},markDeprecated:function(){return k.markDeprecated},markOwner:function(){return P.markOwner},memorizeExec:function(){return P.memorizeExec},options:function(){return g.options},parseQuery:function(){return S.parseQuery},prepareEmbedCode:function(){return x.prepareEmbedCode},prepareMedia:function(){return x.prepareMedia},previewBox:function(){return I.previewBox},refs:function(){return j.refs},reset:function(){return E.reset},resolveElement:function(){return j.resolveElement},scrollIntoViewIfNeeded:function(){return T.scrollIntoViewIfNeeded},set:function(){return D.set},wrapMedia:function(){return C.wrapMedia}});var o=i(25726),n=i(63799),r=i(38837),s=i(29960),a=i(97639),l=i(44710),c=i(66292),d=i(68934),u=i(55877),h=i(41180),p=i(15456),f=i(86583),m=i(96325),g=i(89890),b=i(97735),v=i(94643),y=i(80568),w=i(38420),_=i(69175),k=i(95942),C=i(61477),S=i(82501),x=i(96437),I=i(11628),E=i(58844),T=i(26395),j=i(76078),D=i(3703),A=i(50535),P=i(37790)},69175:function(e,t,i){"use strict";i.d(t,{isUnsafeProtoKey:function(){return n}});let o=["__proto__","constructor","prototype"];function n(e){return -1!==o.indexOf(e)}i.d(t,["UNSAFE_PROTO_KEYS",0,o])},95942:function(e,t,i){"use strict";i.d(t,{markDeprecated:function(){return n}});let o=console;function n(e,t=[""],i=null){return(...n)=>(o.warn(`Method "${t[0]}" deprecated.`+(t[1]?` Use "${t[1]}" instead`:"")),e.call(i,...n))}i.d(t,["cns",0,o])},61477:function(e,t,i){"use strict";i.d(t,{createMediaWrapper:function(){return a},getMediaWrapper:function(){return s},getWrappedMedia:function(){return r},wrapMedia:function(){return l}});var o=i(2748);let n=(e,t)=>o.Dom.isHTMLElement(e)&&e.nodeName.toLowerCase()===t.tag.toLowerCase()&&e.classList.contains(t.className);function r(e,t){var i;for(let[o,r]of Object.entries(null!=(i=e.o.mediaWrappers)?i:{}))if(n(t,r)){let e=t.querySelector(o);if(e)return e}return null}function s(e,t){return o.Dom.closest(t,t=>!!r(e,t),e.editor)}function a(e,t){var i;let o=null==(i=e.o.mediaWrappers)?void 0:i[t.toLowerCase()];return o?e.createInside.element(o.tag,{class:o.className,contenteditable:!1,draggable:!0}):null}function l(e,t){let i=a(e,t.nodeName);return i?(t.parentNode&&o.Dom.before(t,i),o.Dom.append(i,t),i):t}},82501:function(e,t,i){"use strict";i.d(t,["parseQuery",0,e=>{let t={},i=e.substring(1).split("&");for(let e=0;e<i.length;e+=1){let o=i[e].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1]||"")}return t}])},96437:function(e,t,i){"use strict";i.d(t,{prepareEmbedCode:function(){return s},prepareMedia:function(){return r}});var o=i(25726),n=i(61477);function r(e,t){let i=(0,n.wrapMedia)(e,t),{mediaDefaultAlign:r}=e.o;return r&&"normal"!==r&&(0,o.hAlignElement)(i,r,(0,o.getAlignClasses)(e,i)),i}function s(e,t){let i=e.createInside.div();i.innerHTML=t.trim();let o=i.firstElementChild;return o&&1===i.childNodes.length?r(e,o):t}},11628:function(e,t,i){"use strict";i.d(t,{previewBox:function(){return a}});var o=i(2748),n=i(70799),r=i(29960),s=i(41180);function a(e,t,i="px",l=null){let c=[],d=function(e,t){let i=[],n=[];o.Dom.each(e.editor,e=>{o.Dom.isTag(e,"img")&&n.push(e)});try{n.forEach(n=>{let s=[(0,r.attr)(n,"width"),(0,r.attr)(n,"height"),(0,r.attr)(n,"src")];(0,r.attr)(n,{width:n.offsetWidth+t,height:n.offsetHeight+t});let a=e.createInside.a();o.Dom.append(e.ed.body,a),(0,r.attr)(a,"href",(0,r.attr)(n,"src")||""),(0,r.attr)(n,"src",a.href),o.Dom.safeRemove(a),i.push(()=>{(0,r.attr)(n,{src:s[2],width:s[0]||null,height:s[1]||null})})})}catch(e){throw i.forEach(e=>e()),i.length=0,e}return i}(e,i);try{let a=e.e.fire("beforePreviewBox",t,i);if(null!=a)return a;let d=e.c.div("jodit__preview-box jodit-context");l&&o.Dom.append(l,d),(0,s.css)(d,{position:"relative",padding:16});let u=e.value||`<div style='position: absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);color:#ccc;'>${e.i18n("Empty")}</div>`;if(e.iframe){let t=e.create.element("iframe");(0,s.css)(t,{minWidth:800,minHeight:600,border:0}),o.Dom.append(d,t);let i=t.contentWindow;if(i&&(e.e.fire("generateDocumentStructure.iframe",i.document,e),d=i.document.body,"function"==typeof ResizeObserver)){let o=!1,n=i.document.body,r=new ResizeObserver(e.async.debounce(()=>{r.unobserve(n),(0,s.css)(t,"height",n.offsetHeight+20),e.async.requestAnimationFrame(()=>{o||r.observe(n)})},100)),a=()=>{o=!0,r.unobserve(n),r.disconnect(),e.e.off("beforeDestruct",a)};c.push(a),e.e.on("beforeDestruct",a)}}else(0,s.css)(d,{minWidth:1024,minHeight:600,border:0});let h=(t,i)=>{let s=(0,n.isString)(i)?e.c.div():i;(0,n.isString)(i)&&(s.innerHTML=i);for(let e=0;e<s.childNodes.length;e+=1){let i=s.childNodes[e];if(o.Dom.isElement(i)){let e=t.ownerDocument.createElement(i.nodeName);for(let t=0;t<i.attributes.length;t+=1)(0,r.attr)(e,i.attributes[t].name,i.attributes[t].value);0===i.childNodes.length||o.Dom.isTag(i,"table")?"SCRIPT"===i.nodeName?i.textContent&&(e.textContent=i.textContent):i.innerHTML&&(e.innerHTML=i.innerHTML):h(e,i);try{o.Dom.append(t,e)}catch(e){}}else try{o.Dom.append(t,i.cloneNode(!0))}catch(e){}}};return h(d,u),e.e.fire("afterPreviewBox",d),[d,()=>{c.forEach(e=>e())}]}finally{d.forEach(e=>e())}}},58844:function(e,t,i){"use strict";i.d(t,{reset:function(){return a}});var o=i(82758),n=i(23282),r=i(94643);let s={};function a(e){var t,i;if(!(e in s)){let i=o.globalDocument.createElement("iframe");try{if(i.src="about:blank",o.globalDocument.body.appendChild(i),!i.contentWindow)return null;let t=(0,r.get)(e,i.contentWindow),a=(0,r.get)(e.split(".").slice(0,-1).join("."),i.contentWindow);(0,n.isFunction)(t)&&(s[e]=t.bind(a))}catch(e){if(!o.IS_PROD)throw e}finally{null==(t=i.parentNode)||t.removeChild(i)}}return null!=(i=s[e])?i:null}},26395:function(e,t,i){"use strict";i.d(t,{inView:function(){return n},scrollIntoViewIfNeeded:function(){return r}});var o=i(2748);function n(e,t,i){let o=e.getBoundingClientRect(),n=e,r=o.top,s=o.height;for(;n&&n!==t&&n.parentNode;)if(r+s>(o=(n=n.parentNode).getBoundingClientRect()).bottom+1&&r>o.top||r+s<=o.top)return!1;return(r+s<=(i.documentElement&&i.documentElement.clientHeight||0)+1||r<=0)&&r+s>=0}function r(e,t,i){if(o.Dom.isHTMLElement(e)&&!n(e,t,i)){if(t.clientHeight!==t.scrollHeight){let i=e.offsetTop+e.offsetHeight-t.clientHeight;t.scrollTop=t.scrollTop<i?i:e.offsetTop}n(e,t,i)||e.scrollIntoView({block:"nearest"})}}},76078:function(e,t,i){"use strict";i.d(t,{$$:function(){return u},resolveElement:function(){return p}});var o=i(82758),n=i(2748),r=i(4510),s=i(70799),a=i(87058),l=i(29960),c=i(89890);let d=1;function u(e,t){let i;if(!o.IS_ES_NEXT&&/:scope/.test(e)&&o.IS_IE&&!(t&&t.nodeType===Node.DOCUMENT_NODE)){let o=t.id,n=o||"_selector_id_"+(Math.random()+"").slice(2)+ ++d;e=e.replace(/:scope/g,"#"+n),o||t.setAttribute("id",n),i=t.parentNode.querySelectorAll(e),o||t.removeAttribute("id")}else i=t.querySelectorAll(e);return[].slice.call(i)}let h=(e,t)=>{if(!e||e.nodeType!==Node.ELEMENT_NODE||!e.parentNode||t===e)return"";if(e.id)return"//*[@id='"+e.id+"']";let i=[].filter.call(e.parentNode.childNodes,t=>t.nodeName===e.nodeName);return h(e.parentNode,t)+"/"+e.nodeName.toLowerCase()+(i.length>1?"["+((0,r.toArray)(i).indexOf(e)+1)+"]":"")};function p(e,t){let i=e;if((0,s.isString)(e))try{i=t.querySelector(e)}catch(t){throw(0,c.error)('String "'+e+'" should be valid HTML selector')}if(!i||"object"!=typeof i||!n.Dom.isElement(i)||!i.cloneNode)throw(0,c.error)('Element "'+e+'" should be string or HTMLElement instance');return i}i.d(t,["cssPath",0,e=>{if(!n.Dom.isElement(e))return null;let t=[],i=e;for(;i&&i.nodeType===Node.ELEMENT_NODE;){let e=i.nodeName.toLowerCase();if(i.id){e+="#"+i.id,t.unshift(e);break}{let t=i,o=1;do(t=t.previousElementSibling)&&t.nodeName.toLowerCase()===e&&o++;while(t)e+=":nth-of-type("+o+")"}t.unshift(e),i=i.parentNode}return t.join(" > ")},"getXPathByElement",0,h,"refs",0,e=>{"container"in e&&(e=e.container);let t={};return n.Dom.each(e,e=>{if(n.Dom.isElement(e)&&(e.hasAttribute("ref")||e.hasAttribute("data-ref"))){let i=(0,l.attr)(e,"-ref");i&&(0,s.isString)(i)&&(t[(0,a.camelCase)(i)]=e,t[i]=e)}}),t}])},3703:function(e,t,i){"use strict";i.d(t,{set:function(){return l}});var o=i(68345),n=i(29807),r=i(72430),s=i(70799),a=i(69175);function l(e,t,i){if(!(0,s.isString)(e)||!e.length)return;let l=e.split(".");if(l.some(a.isUnsafeProtoKey))return;let c=i;for(let e=0;e<l.length-1;e+=1){let t=l[e];(0,o.isArray)(c[t])||(0,r.isPlainObject)(c[t])||(c[t]=(0,n.isNumeric)(l[e+1])?[]:{}),c=c[t]}c&&(c[l[l.length-1]]=t)}},50535:function(e,t,i){"use strict";i.d(t,{LimitedStack:function(){return o}});class o{push(e){return this.stack.push(e),this.stack.length>this.limit&&this.stack.shift(),this}pop(){return this.stack.pop()}find(e){return this.stack.find(e)}constructor(e){this.limit=e,this.stack=[]}}},37790:function(e,t,i){"use strict";i.d(t,{call:function(){return a},callPromise:function(){return d},callThis:function(){return l},getPropertyDescriptor:function(){return u},markOwner:function(){return c}});var o=i(14773),n=i(86068),r=i(29960),s=i(86583);function a(e,...t){return e(...t)}function l(e,t,...i){return e.apply(t,i)}function c(e,t){(0,r.attr)(t,"data-editor_id",e.id),t.component||Object.defineProperty(t,"jodit",{value:e})}function d(e,t){return(0,o.isPromise)(e)?e.then(e=>e,()=>null).finally(t):null==t?void 0:t()}function u(e,t){let i;do i=Object.getOwnPropertyDescriptor(e,t),e=Object.getPrototypeOf(e);while(!i&&e)return i}i.d(t,["getDataTransfer",0,e=>{if(e.clipboardData)return e.clipboardData;try{return e.dataTransfer||new DataTransfer}catch(e){return null}},"keys",0,(e,t=!0)=>{if(t)return Object.keys(e);let i=[];for(let t in e)i.push(t);return i},"loadImage",0,(e,t)=>t.async.promise((i,o)=>{let n=new Image,r=()=>{t.e.off(n),null==o||o()},s=()=>{t.e.off(n),i(n)};t.e.one(n,"load",s).one(n,"error",r).one(n,"abort",r),n.src=e,n.complete&&s()}),"memorizeExec",0,(e,t,{control:i},o)=>{var r;let a="button"+i.command,l=null!=(r=i.args&&i.args[0])?r:(0,s.dataBind)(e,a);if((0,n.isVoid)(l))return!1;(0,s.dataBind)(e,a,l),o&&(l=o(l)),e.execCommand(i.command,!1,null!=l?l:void 0)}])},31359:function(e,t,i){"use strict";i.d(t,{init:function(){return s}});var o=i(82758),n=i(60132),r=i(14041);function s(e,t,i,s,a,l,c){if((0,n.isInitable)(s))try{s.init(e)}catch(e){if(!o.IS_PROD)throw e}a.set(t,s),l.delete(t),s.hasStyle&&(0,r.loadStyle)(e,t).catch(e=>{o.IS_PROD}),s.styles&&(c(e,t,"style").innerHTML=s.styles)}},14041:function(e,t,i){"use strict";i.d(t,{loadExtras:function(){return d},loadStyle:function(){return l}});var o=i(82758),n=i(12475),r=i(63799),s=i(89672);let a=new Set;async function l(e,t){let i=c(e,t,!1);if(!a.has(i))return a.add(i),(0,r.appendStyleAsync)(e,i)}function c(e,t,i){t=(0,n.kebabCase)(t);let o=e.minified?".min":"";return e.basePath+"plugins/"+t+"/"+t+o+"."+(i?"js":"css")}function d(e,t,i,n){try{let o=i.filter(t=>!e.has((0,s.normalizeName)(t.name)));o.length&&o.map(e=>{let i=e.url||c(t,e.name,!0);return(0,r.appendScriptAsync)(t,i).then(n).catch(()=>null)})}catch(e){if(!o.IS_PROD)throw e}}},48591:function(e,t,i){"use strict";i.d(t,{makeInstance:function(){return r}});var o=i(82758),n=i(23282);function r(e,t){try{try{return(0,n.isFunction)(t)?new t(e):t}catch(i){if((0,n.isFunction)(t)&&!t.prototype)return t(e)}}catch(e){if(!o.IS_PROD)throw e}return null}},89672:function(e,t,i){"use strict";i.d(t,{normalizeName:function(){return n}});var o=i(12475);function n(e){return(0,o.kebabCase)(e).toLowerCase()}},50911:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return o.Plugin}});var o=i(20356);i(41876)},41876:function(e,t,i){"use strict";i.d(t,{PluginSystem:function(){return p}});var o=i(82758),n=i(57012),r=i(46559),s=i(68345),a=i(60132),l=i(70799),c=i(31359),d=i(14041),u=i(48591),h=i(89672);class p{get size(){return this.__items.size}add(e,t){this.__items.set((0,h.normalizeName)(e),t),n.eventEmitter.fire(`plugin:${e}:ready`)}get(e){return this.__items.get((0,h.normalizeName)(e))}remove(e){this.__items.delete((0,h.normalizeName)(e))}__getFullPluginsList(e){let t=[];return this.__items.forEach((i,o)=>{(!e||e.has(o))&&t.push([o,i])}),t}__init(e){let{extraList:t,disableList:i,filter:n}={extraList:e.o.extraPlugins.map(e=>(0,l.isString)(e)?{name:e}:e),disableList:new Set((0,r.splitArray)(e.o.disablePlugins).map(h.normalizeName)),filter:e.o.safeMode?new Set(e.o.safePluginsList):null},p=new Map,f={},m=new Set;e.__plugins=f;let g=()=>{if(e.isInDestruct)return;let t=!1;this.__getFullPluginsList(n).forEach(([o,n])=>{if(i.has(o)||p.has(o))return;let r=null==n?void 0:n.requires;if(r&&(0,s.isArray)(r)&&r.length){if(r.some(e=>i.has(e)))return;if(!r.every(e=>p.has(e)))return void m.add(o)}t=!0;let a=(0,u.makeInstance)(e,n);if(!a){p.set(o,null),m.delete(o);return}(0,c.init)(e,o,n,a,p,m,this.opts.getContainer),f[o]=a}),t&&(e.e.fire("updatePlugins"),g())};t&&t.length&&(0,d.loadExtras)(this.__items,e,t,g),g(),e.e.on("beforeDestruct",()=>{Object.keys(f).forEach(t=>{let i=f[t];(0,a.isDestructable)(i)&&i.destruct(e),delete f[t]}),delete e.__plugins}),o.IS_PROD||m.size}wait(e){return new Promise(t=>{if(this.get(e))return t();let i=()=>{t(),n.eventEmitter.off(`plugin:${e}:ready`,i)};n.eventEmitter.on(`plugin:${e}:ready`,i)})}constructor(e){this.opts=e,this.__items=new Map}}},20356:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return a}});var o=i(91907),n=i(65478),r=i(19306),s=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class a extends o.ViewComponent{className(){return"Plugin"}__afterPluginSystemInit(){let{j:e,buttons:t}=this;t&&(0,r.isJoditObject)(e)&&t.forEach(t=>{e.registerButton(t)})}__afterInit(){this.__inited=!0,this.setStatus(o.STATUSES.ready),this.afterInit(this.jodit)}init(e){this.jodit.isReady&&(this.afterInit(this.jodit),this.__afterPluginSystemInit(),this.jodit.e.fire("rebuildToolbar"))}__beforeDestruct(){var e;if(this.isInDestruct)return;let{j:t}=this;if(t.e.off("afterPluginSystemInit",this.__afterPluginSystemInit).off("afterInit",this.__afterInit).off("beforeDestruct",this.destruct),this.setStatus(o.STATUSES.beforeDestruct),!this.__inited)return super.destruct();(0,r.isJoditObject)(t)&&(null==(e=this.buttons)||e.forEach(e=>{null==t||t.unregisterButton(e)})),this.beforeDestruct(this.j),super.destruct()}constructor(e){super(e),this.buttons=[],this.hasStyle=!1,this.__inited=!1,e.e.on("afterPluginSystemInit",this.__afterPluginSystemInit).on("afterInit",this.__afterInit).on("beforeDestruct",this.__beforeDestruct)}}a.requires=[],s([n.autobind],a.prototype,"__afterPluginSystemInit",null),s([n.autobind],a.prototype,"__afterInit",null),s([n.autobind],a.prototype,"__beforeDestruct",null)},54079:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return d}});var o=i(8884),n=i(82758),r=i(45219),s=i(21537),a=i(89890),l=i(6441);i(57459);var c=i(98582);class d{className(){return"Ajax"}__buildParams(e,t){return(0,s.isPlainObject)(e)&&this.options.contentType&&this.options.contentType.includes("application/json")?JSON.stringify(e):(0,s.isFunction)(this.o.queryBuild)?this.o.queryBuild.call(this,e,t):(0,s.isString)(e)||e instanceof n.globalWindow.FormData||"object"==typeof e&&null!=e&&(0,s.isFunction)(e.append)?e:(0,s.buildQuery)(e)}get o(){return this.options}abort(){if(this.__isFulfilled)return this;try{this.__isFulfilled=!0,this.xhr.abort()}catch(e){}return this}send(){this.__activated=!0;let{xhr:e,o:t}=this,i=this.prepareRequest();return this.__async.promise(async(o,n)=>{var r;let l=()=>{this.__isFulfilled=!0,n(a.connection("Connection error"))},d=()=>{this.__isFulfilled=!0,o(new c.Response(i,e.status,e.statusText,!e.responseType?e.responseText:e.response))};e.onload=d,e.onabort=()=>{this.__isFulfilled=!0,n(a.abort("Abort connection"))},e.onerror=l,e.ontimeout=l,t.responseType&&(e.responseType=t.responseType),e.onprogress=e=>{var t,i;let o=0;e.lengthComputable&&(o=e.loaded/e.total*100),null==(i=(t=this.options).onProgress)||i.call(t,o)},e.onreadystatechange=()=>{var i,o;null==(o=(i=this.options).onProgress)||o.call(i,10),e.readyState===XMLHttpRequest.DONE&&(t.successStatuses.includes(e.status)?d():e.statusText&&(this.__isFulfilled=!0,n(a.connection(e.statusText))))},e.withCredentials=null!=(r=t.withCredentials)&&r;let{url:u,data:h,method:p}=i;e.open(p,u,!0),t.contentType&&e.setRequestHeader&&e.setRequestHeader("Content-type",t.contentType);let{headers:f}=t;(0,s.isFunction)(f)&&(f=await f.call(this)),f&&e.setRequestHeader&&Object.keys(f).forEach(t=>{e.setRequestHeader(t,f[t])}),this.__async.setTimeout(()=>{e.send(h?this.__buildParams(h):void 0)},0)})}async *stream(){var e;this.__activated=!0;let{xhr:t,o:i}=this,o=this.prepareRequest(),n=0,r="",l=[],c=null,d=!1,u=null,h=()=>{if(c){let e=c;c=null,e()}},p=e=>{var i;let o=t.responseText;r+=o.substring(n),n=o.length;let s=r.split(`
|
|
19
19
|
|
|
20
20
|
`);for(let t of(r=e?"":null!=(i=s.pop())?i:"",s)){let e=t.trim();if(!e)continue;let i=[];for(let t of e.split(`
|
|
21
21
|
`))t.startsWith("data: ")?i.push(t.slice(6)):t.startsWith("data:")&&i.push(t.slice(5));i.length&&l.push(i.join(`
|
|
22
|
-
`))}h()};t.onprogress=()=>p(!1),t.onload=()=>{p(!0),d=!0,this.__isFulfilled=!0,h()},t.onerror=()=>{u=a.connection("Connection error"),d=!0,this.__isFulfilled=!0,h()},t.onabort=()=>{u=a.abort("Abort connection"),d=!0,this.__isFulfilled=!0,h()},t.withCredentials=null!=(e=i.withCredentials)&&e;let{url:f,data:m,method:g}=o;t.open(g,f,!0),i.contentType&&t.setRequestHeader&&t.setRequestHeader("Content-type",i.contentType);let{headers:b}=i;(0,s.isFunction)(b)&&(b=await b.call(this)),b&&t.setRequestHeader&&Object.keys(b).forEach(e=>{t.setRequestHeader(e,b[e])}),t.send(m?this.__buildParams(m):void 0);try{for(;;)if(l.length>0)yield l.shift();else if(d)break;else await new Promise(e=>{c=e})}finally{this.__isFulfilled||this.abort()}if(u)throw u}prepareRequest(){if(!this.o.url)throw a.error("Need URL for AJAX request");let e=this.o.url,t=this.o.data,i=(this.o.method||"get").toLowerCase();if("get"===i&&t&&(0,s.isPlainObject)(t)){let i=e.indexOf("?");if(-1!==i){let o=(0,s.parseQuery)(e.substring(i));e=e.substring(0,i)+"?"+(0,s.buildQuery)({...o,...t})}else e+="?"+(0,s.buildQuery)(this.o.data)}let o={url:e,method:i,data:t};return d.log.splice(100),d.log.push(o),o}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__activated&&!this.__isFulfilled&&(this.abort(),this.__isFulfilled=!0),this.__async.destruct())}constructor(e,t=l.Config.prototype.defaultAjaxOptions){this.__async=new o.Async,this.__isFulfilled=!1,this.__activated=!1,this.__isDestructed=!1,this.options=(0,s.ConfigProto)(e||{},t),this.xhr=this.o.xhr?this.o.xhr():new XMLHttpRequest}}d.log=[],function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([r.autobind],d.prototype,"destruct",null)},57459:function(e,t,i){"use strict";i(6441).Config.prototype.defaultAjaxOptions={successStatuses:[200,201,202],method:"GET",url:"",data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!1,xhr:()=>new XMLHttpRequest}},41601:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return o.Ajax},Response:function(){return n.Response}});var o=i(54079),n=i(98582)},98582:function(e,t,i){"use strict";i.d(t,{Response:function(){return o}});class o{get url(){return this.request.url}async json(){return JSON.parse(this.body)}text(){return Promise.resolve(this.body)}async blob(){return this.body}constructor(e,t,i,o){this.request=e,this.status=t,this.statusText=i,this.body=o}}},79505:function(e,t,i){"use strict";i.d(t,{composedRanges:function(){return n}});var o=i(27613);function n(e,t){let i=e.getComposedRanges;if(!(0,o.isFunction)(i))return null;for(let o of[[{shadowRoots:[t]}],[t]]){let n;try{n=i.apply(e,o)}catch(e){continue}if(function(e,t){return Array.isArray(e)&&e.length>0&&e.every(e=>{var i;return(i=e.startContainer)===t||t.contains(i)})}(n,t))return n}return null}},45124:function(e,t,i){"use strict";i.d(t,{composedRanges:function(){return r.composedRanges},cursorInTheEdgeOfString:function(){return a},findCorrectCurrentNode:function(){return l},moveNodeInsideStart:function(){return s.moveNodeInsideStart}});var o=i(82758),n=i(2748),r=i(79505),s=i(26716);function a(e,t,i,n){var r;let s=(null==(r=e.nodeValue)?void 0:r.length)?e.nodeValue:"";if(n&&s.replace((0,o.INVISIBLE_SPACE_REG_EXP_END)(),"").length>t)return!0;let a=(0,o.INVISIBLE_SPACE_REG_EXP_START)().exec(s);return i&&(a&&a[0].length<t||!a&&t>0)}function l(e,t,i,o,r,s){if((e=t.startContainer.childNodes[t.startOffset])||(e=t.startContainer.childNodes[t.startOffset-1],i=!0),e&&o&&!n.Dom.isText(e)){if(!i&&n.Dom.isText(e.previousSibling))e=e.previousSibling;else if(r){let t=e=>i?e.lastChild:s(e),o=t(e);for(;o;){if(o&&n.Dom.isText(o)){e=o;break}o=t(o)}}}if(e&&!o&&!n.Dom.isText(e)){let t=e,i=e;do t=t.firstChild,i=i.lastChild;while(t&&i&&!n.Dom.isText(t))t===i&&t&&n.Dom.isText(t)&&(e=t)}return{node:e,rightMode:i}}i(43463)},26716:function(e,t,i){"use strict";i.d(t,{moveNodeInsideStart:function(){return r}});var o=i(82758),n=i(2748);function r(e,t,i){let r=n.Dom.findSibling(t,i),s=n.Dom.findSibling(t,!i);for(;n.Dom.isElement(r)&&!n.Dom.isTag(r,o.INSEPARABLE_TAGS)&&n.Dom.isContentEditable(r,e.editor)&&(!s||!n.Dom.closest(t,n.Dom.isElement,e.editor));)i||!r.firstChild?n.Dom.append(r,t):n.Dom.before(r.firstChild,t),r=n.Dom.sibling(t,i),s=n.Dom.sibling(t,!i)}},43463:function(e,t,i){"use strict";i.d(t,{moveTheNodeAlongTheEdgeOutward:function(){return n}});var o=i(2748);function n(e,t,i){let n=e;for(;n&&n!==i&&!(o.Dom.findSibling(n,t)||o.Dom.isBlock(n.parentElement));)(n=n.parentElement)&&n!==i&&(t?o.Dom.before(n,e):o.Dom.after(n,e))}},59242:function(e,t,i){"use strict";i.d(t,{CHANGE:function(){return"change"},CommitStyle:function(){return n.CommitStyle},REPLACE:function(){return r.REPLACE},Selection:function(){return o.Selection},UNWRAP:function(){return"unwrap"},WRAP:function(){return"wrap"}});var o=i(79348),n=i(25639),r=i(77361)},79348:function(e,t,i){"use strict";i.d(t,{Selection:function(){return f}});var o=i(82758),n=i(65478),r=i(2748),s=i(21537),a=i(27613),l=i(25726),c=i(38837),d=i(43463),u=i(25639),h=i(45124),p=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class f{get j(){return this.jodit}errorNode(e){if(!r.Dom.isNode(e))throw(0,s.error)("Parameter node must be instance of Node")}get area(){return this.j.editor}get win(){return this.j.ew}get doc(){return this.j.ed}get sel(){let{shadowRoot:e}=this.j.o;if(e){if((0,a.isFunction)(e.getSelection))return e.getSelection();let t=this.__composedSelection(e);if(t)return t}return this.win.getSelection()}__composedSelection(e){let t=this.win.getSelection();if(!t)return null;let{anchorNode:i}=t;if(i&&r.Dom.isOrContains(e,i))return null;let o=(0,h.composedRanges)(t,e);if(!o)return null;let n=o.map(e=>{let t=this.createRange();return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),t}),s=n[0],l={rangeCount:n.length,getRangeAt:e=>n[e],isCollapsed:n.every(e=>e.collapsed),anchorNode:s?s.startContainer:null,anchorOffset:s?s.startOffset:0,focusNode:s?s.endContainer:null,focusOffset:s?s.endOffset:0,toString:()=>n.map(e=>e.toString()).join("")};return new Proxy(t,{get(e,t){if((0,a.isString)(t)&&t in l)return l[t];let i=Reflect.get(e,t,e);return(0,a.isFunction)(i)?i.bind(e):i}})}__nativeRangeCount(){var e,t,i,o;let{shadowRoot:n}=this.j.o;return n&&(0,a.isFunction)(n.getSelection)?null!=(t=null==(e=n.getSelection())?void 0:e.rangeCount)?t:0:null!=(o=null==(i=this.win.getSelection())?void 0:i.rangeCount)?o:0}get range(){let e=this.sel;return e&&e.rangeCount?e.getRangeAt(0):this.createRange()}get isInsideArea(){let{sel:e}=this;if(!(null==e?void 0:e.rangeCount))return!1;for(let t=0;t<e.rangeCount;t+=1)if(!r.Dom.isOrContains(this.area,e.getRangeAt(t).commonAncestorContainer))return!1;return!0}createRange(e=!1){let t=this.doc.createRange();return e&&this.selectRange(t),t}remove(){let e=this.sel,t=this.current();if(e&&t)for(let t=0;t<e.rangeCount;t+=1){let i=e.getRangeAt(t);r.Dom.isOrContains(this.area,i.commonAncestorContainer)&&(i.deleteContents(),i.collapse(!0))}}clear(){var e,t;(null==(e=this.sel)?void 0:e.rangeCount)&&(null==(t=this.sel)||t.removeAllRanges())}removeNode(e){if(!r.Dom.isOrContains(this.j.editor,e,!0))throw(0,s.error)("Selection.removeNode can remove only editor's children");r.Dom.safeRemove(e),this.j.e.fire("afterRemoveNode",e)}insertCursorAtPoint(e,t){var i,o,n,s;try{let a=this.createRange(),l=null==(o=(i=this.doc).caretPositionFromPoint)?void 0:o.call(i,e,t),c=l?null:null==(s=(n=this.doc).caretRangeFromPoint)?void 0:s.call(n,e,t);if(l)a.setStart(l.offsetNode,l.offset);else{if(!c)return!1;a.setStart(c.startContainer,c.startOffset)}if(!r.Dom.isOrContains(this.area,a.startContainer))return!1;return a.collapse(!0),this.removeMarkers(),this.selectRange(a),!0}catch(e){}return!1}get hasMarkers(){return!!this.markers.length}get markers(){return(0,s.$$)("span[data-"+o.MARKER_CLASS+"]",this.area)}removeMarkers(){r.Dom.safeRemove(...this.markers)}marker(e=!1,t){var i;let n=null;t&&(n=t.cloneRange()).collapse(e);let a=this.j.createInside.span();if(a.id=o.MARKER_CLASS+"_"+Number(new Date)+"_"+(Math.random()+"").slice(2),(0,s.css)(a,{lineHeight:"0",display:"none"}),r.Dom.markTemporary(a),(0,s.attr)(a,"data-"+o.MARKER_CLASS,e?"start":"end"),r.Dom.append(a,this.j.createInside.text(o.INVISIBLE_SPACE)),n&&r.Dom.isOrContains(this.area,e?n.startContainer:n.endContainer)){let{startContainer:e,startOffset:t}=n;r.Dom.isText(e)&&0===t?r.Dom.before(e,a):r.Dom.isText(e)&&t===(null==(i=e.nodeValue)?void 0:i.length)?r.Dom.after(e,a):n.insertNode(a)}return a}restore(){var e,t;let i=this.markers,n=new Map(i.map(e=>[e.id,e])),a=[],l=!1;for(let c=0;c<i.length;c+=1){let d=i[c];if("start"!==(0,s.attr)(d,"data-"+o.MARKER_CLASS))continue;l||(l="true"===(0,s.attr)(d,"data-selection-backward"));let u=(0,s.attr)(d,"data-selection-end"),h=u?n.get(u):void 0;!u&&i[c+1]&&"end"===(0,s.attr)(i[c+1],"data-"+o.MARKER_CLASS)&&(h=i[c+1]);let p=this.createRange();if(h)p.setStartAfter(d),p.setEndBefore(h);else{let i=d.previousSibling;r.Dom.isText(i)?p.setStart(i,null!=(t=null==(e=i.nodeValue)?void 0:e.length)?t:0):p.setStartBefore(d),p.collapse(!0)}a.push(p)}r.Dom.safeRemove(...i),a.length&&this.__selectRanges(a,l)}__isBackward(){let e=this.sel;return!!(e&&1===e.rangeCount&&!e.isCollapsed&&e.anchorNode===e.getRangeAt(0).endContainer&&e.anchorOffset===e.getRangeAt(0).endOffset)}__ranges(){let e=this.sel;return e?Array.from({length:e.rangeCount},(t,i)=>e.getRangeAt(i).cloneRange()):[]}fakes(){if(!this.isInsideArea)return[];let e=this.__isBackward(),t=this.__ranges(),i=t.map(e=>{let t=e.collapsed,i=e.cloneRange();i.collapse(!0);let o=this.j.createInside.fake();r.Dom.safeInsertNode(i,o),e.setStartBefore(o);let n=[o];if(t)e.collapse(!0);else{let t=e.cloneRange();t.collapse(!1);let i=this.j.createInside.fake();r.Dom.safeInsertNode(t,i),e.setEndAfter(i),n.push(i)}return n});return this.__fakeSelections.set(i[0][0],{pairs:i,backward:e}),this.__selectRanges(t,e),i[0]}restoreFakes(e){var t,i,o;if(!e.length)return;let n=this.__fakeSelections.get(e[0]);if(this.__fakeSelections.delete(e[0]),this.j.isInDestruct)return;let s=[];for(let a of null!=(t=null==n?void 0:n.pairs)?t:[e]){let e=a.filter(e=>e.isConnected&&r.Dom.isOrContains(this.area,e,!0));if(!e.length)continue;let[t,n]=e,l=this.createRange();for(let s of(l.setStartAfter(t),n?l.setEndBefore(n):l.collapse(!0),e))(null==(i=s.parentNode)?void 0:i.firstChild)!==(null==(o=s.parentNode)?void 0:o.lastChild)&&r.Dom.safeRemove(s);s.push(l)}s.length&&this.__selectRanges(s,null==n?void 0:n.backward)}save(e=!1){if(this.hasMarkers)return[];let t=this.sel;if(!t||!t.rangeCount)return[];let i=this.__isBackward(),o=[],n=t.rangeCount,a=[];for(let e=0;n>e;e+=1)if(a[e]=t.getRangeAt(e),!r.Dom.isOrContains(this.area,a[e].commonAncestorContainer))return[];for(let e=0;n>e;e+=1)if(a[e].collapsed){let t=this.marker(!0,a[e]);o[e]={startId:t.id,collapsed:!0,startMarker:t.outerHTML}}else{let t=this.marker(!0,a[e]),r=this.marker(!1,a[e]);n>1&&(0,s.attr)(t,"data-selection-end",r.id),i&&(0,s.attr)(t,"data-selection-backward","true"),o[e]={startId:t.id,endId:r.id,collapsed:!1,startMarker:t.outerHTML,endMarker:r.outerHTML}}if(!e){t.removeAllRanges();for(let e=n-1;e>=0;--e){let i=this.area.querySelector("#"+o[e].startId);if(i){if(o[e].collapsed)a[e].setStartAfter(i),a[e].collapse(!0);else if(a[e].setStartBefore(i),o[e].endId){let t=this.area.querySelector("#"+o[e].endId);t&&a[e].setEndAfter(t)}try{t.addRange(a[e].cloneRange())}catch(e){}}}}return o}focus(e={preventScroll:!0}){var t,i;if(!this.isFocused()){let o=(0,s.getScrollParent)(this.j.container),n=null==o?void 0:o.scrollTop;this.j.iframe&&"complete"===this.doc.readyState&&this.j.iframe.focus(e),this.win.focus(),this.area.focus(e),n&&(null==o?void 0:o.scrollTo)&&o.scrollTo(0,n);let a=this.sel,l=(null==a?void 0:a.rangeCount)?null==a?void 0:a.getRangeAt(0):null;if(!l||!r.Dom.isOrContains(this.area,l.startContainer)){let e=this.createRange();e.setStart(this.area,0),e.collapse(!0),this.selectRange(e,!1)}return this.j.editorIsActive||null==(i=null==(t=this.j)?void 0:t.events)||i.fire("focus"),!0}return!1}isCollapsed(){let e=this.sel;for(let t=0;e&&t<e.rangeCount;t+=1)if(!e.getRangeAt(t).collapsed)return!1;return!0}isFocused(){return this.doc.hasFocus&&this.doc.hasFocus()&&this.area===this.doc.activeElement}current(e=!0){if(this.j.getRealMode()!==o.MODE_WYSIWYG)return null;let t=this.sel;if(!t||0===t.rangeCount)return null;let i=t.getRangeAt(0),n=i.startContainer,s=!1;if(!r.Dom.isOrContains(this.area,n))return null;if(r.Dom.isTag(n,"br")&&t.isCollapsed)return n;if(!r.Dom.isText(n)){let o=(0,h.findCorrectCurrentNode)(n,i,s,t.isCollapsed,e,e=>s?e.lastChild:e.firstChild);n=o.node,s=o.rightMode}return n&&r.Dom.isOrContains(this.area,n)?n:null}insertNode(e,t=!0,i=!0){this.errorNode(e),this.j.e.fire("safeHTML",e);let n=r.Dom.isFragment(e)?e.lastChild:e;if(!n||this.j.isInDestruct)return;!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore());let a=this.sel;this.j.history.snapshot.transaction(()=>{if(this.isCollapsed()||this.j.execCommand("Delete"),this.j.e.fire("beforeInsertNode",e),!(n=r.Dom.isFragment(e)?e.lastChild:e)||this.j.isInDestruct)return;if(a&&a.rangeCount){let t=a.getRangeAt(0),{firstChild:i}=e;r.Dom.isOrContains(this.area,t.commonAncestorContainer)?r.Dom.safeInsertNode(t,e):r.Dom.append(this.area,e),[()=>null==i?void 0:i.previousSibling,()=>null==i?void 0:i.previousSibling,()=>{var e;return null==(e=null==i?void 0:i.previousSibling)?void 0:e.lastChild}].forEach(e=>{var t;let i=e();i&&r.Dom.isText(i)&&0===(null!=(t=i.nodeValue)?t:"").replace(o.INVISIBLE_SPACE_REG_EXP(),"").length&&r.Dom.safeRemove(i)})}else r.Dom.append(this.area,e);let i=e=>{if(r.Dom.isBlock(e)){let t=e.lastChild;if(t)return i(t)}this.setCursorAfter(e)};t&&(r.Dom.isFragment(e)?n&&i(n):i(e)),this.j.o.scrollToPastedContent&&(0,s.scrollIntoViewIfNeeded)(null!=n?n:e,this.j.editor,this.doc)}),i&&this.j.events&&this.j.__imdSynchronizeValues(),this.j.events&&this.j.e.fire("afterInsertNode",r.Dom.isFragment(e)?n:e)}insertHTML(e,t=!0){if(""===e)return;let i=this.j.createInside.div(),o=this.j.createInside.fragment();!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore()),r.Dom.isNode(e)?r.Dom.append(i,e):i.innerHTML=e.toString(),!this.j.isEditorMode()&&!1===this.j.e.fire("insertHTML",i.innerHTML)||i.lastChild&&(r.Dom.moveContent(i,o),this.insertNode(o,t,!1),this.j.__imdSynchronizeValues())}insertImage(e,t=null,i=null){let o=(0,a.isString)(e)?this.j.createInside.element("img"):e;if((0,a.isString)(e)&&(0,s.attr)(o,"src",e),null!=i){let e=i.toString();e&&"auto"!==e&&0>(e+"").indexOf("px")&&0>(e+"").indexOf("%")&&(e+="px"),(0,s.attr)(o,"width",e)}t&&"object"==typeof t&&(0,s.css)(o,t);let{imageDefaultAlign:n}=this.j.o;n&&"normal"!==n&&(0,l.hAlignElement)(o,n,(0,l.getAlignClasses)(this.j,o));let r=()=>{(o.naturalHeight<o.offsetHeight||o.naturalWidth<o.offsetWidth)&&(0,s.css)(o,{width:"",height:""}),o.removeEventListener("load",r)};this.j.e.on(o,"load",r),o.complete&&r(),this.insertNode(o),this.j.e.fire("afterInsertImage",o)}eachSelection(e){let t=new Set;for(let i of this.__ranges())r.Dom.isOrContains(this.area,i.commonAncestorContainer)&&this.__eachRange(i,i=>{t.has(i)||(t.add(i),e(i))})}__eachRange(e,t){var i;let n=e.commonAncestorContainer;r.Dom.isHTMLElement(n)||(n=n.parentElement);let l=[],c=e.startOffset,d=n.childNodes.length,u=e.startContainer===this.area?n.childNodes[c<d?c:d-1]:e.startContainer,h=e.endContainer===this.area?n.childNodes[e.endOffset-1]:e.endContainer;r.Dom.isText(u)&&u===e.startContainer&&e.startOffset===(null==(i=u.nodeValue)?void 0:i.length)&&u.nextSibling&&(u=u.nextSibling),r.Dom.isText(h)&&h===e.endContainer&&0===e.endOffset&&h.previousSibling&&(h=h.previousSibling);let p=e=>{!e||e===n||r.Dom.isEmptyTextNode(e)||(0,a.isMarker)(e)||l.push(e)};p(u),u!==h&&r.Dom.isOrContains(n,u,!0)&&r.Dom.find(u,e=>(p(e),e===h||e&&e.contains&&e.contains(h)),n,!0,!1);let f=e=>{if(r.Dom.isOrContains(this.j.editor,e,!0)){if(e.nodeName.match(/^(UL|OL)$/))return(0,s.toArray)(e.childNodes).forEach(f);if(r.Dom.isTag(e,"li"))if(e.firstChild)e=e.firstChild;else{let t=this.j.createInside.text(o.INVISIBLE_SPACE);r.Dom.append(e,t),e=t}t(e)}};0===l.length&&(r.Dom.isEmptyTextNode(u)&&l.push(u),(null==u?void 0:u.firstChild)&&l.push(u.firstChild)),l.forEach(f)}cursorInTheEdge(e,t,i=null){let o=!e,n=this.sel,s=(null==n?void 0:n.rangeCount)?n.getRangeAt(0):null;if(!s)return null;let a=e?s.startContainer:s.endContainer,l=e?s.startOffset:s.endOffset;if(null!=i||(i=a),!r.Dom.isOrContains(t,a)||!r.Dom.isOrContains(t,i))return null;let c=e=>!!(e&&!r.Dom.isTag(e,"br")&&!r.Dom.isEmptyTextNode(e)&&!r.Dom.isTemporary(e)&&!(r.Dom.isElement(e)&&!0===this.j.e.fire("isInvisibleForCursor",e)));if(r.Dom.isText(a)){if((0,h.cursorInTheEdgeOfString)(a,l,e,o))return!1}else{let e=a.childNodes,t=o?e.length:l;for(let i=o?l:0;t>i;i+=1)if(c(e[i]))return!1}let d=i;for(;d&&d!==t;){let t=r.Dom.sibling(d,e);if(!t){d=d.parentNode;continue}if(c(d=t))return!1}return!0}cursorOnTheLeft(e,t){return this.cursorInTheEdge(!0,e,t)}cursorOnTheRight(e,t){return this.cursorInTheEdge(!1,e,t)}setCursorAfter(e){return this.setCursorNearWith(e,!1)}setCursorBefore(e){return this.setCursorNearWith(e,!0)}setCursorNearWith(e,t){var i,o;if(this.errorNode(e),!r.Dom.isOrContains(this.area,e,!0))throw(0,s.error)("Node element must be in editor");let n=this.createRange(),a=null;return r.Dom.isText(e)?t?n.setStart(e,0):n.setEnd(e,null!=(o=null==(i=e.nodeValue)?void 0:i.length)?o:0):(a=this.j.createInside.fake(),t?n.setStartBefore(e):n.setEndAfter(e),n.collapse(t),r.Dom.safeInsertNode(n,a),n.selectNode(a)),n.collapse(t),this.selectRange(n),a}setCursorIn(e,t=!1){if(this.errorNode(e),!r.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,s.error)("Node element must be in editor");let i=this.createRange(),n=e,a=e;do{if(r.Dom.isText(n)||r.Dom.isTag(n,o.INSEPARABLE_TAGS))break;a=n,n=t?n.firstChild:n.lastChild}while(n)if(!n){let e=this.j.createInside.text(o.INVISIBLE_SPACE);r.Dom.isTag(a,o.INSEPARABLE_TAGS)?n=a:(r.Dom.append(a,e),a=e)}let l=n||a;return r.Dom.isTag(l,o.INSEPARABLE_TAGS)?t||r.Dom.isTag(l,"br")?i.setStartBefore(l):i.setEndAfter(l):i.selectNodeContents(l),i.collapse(t),this.selectRange(i),a}selectRange(e,t=!0){return this.__selectRanges([e],!1,t)}__selectRanges(e,t=!1,i=!0){let o=this.sel;if(i&&!this.isFocused()&&"focus"!==this.j.e.current&&this.focus(),o){if(o.removeAllRanges(),e.forEach(e=>o.addRange(e)),t&&1===e.length){let t=e[0];o.setBaseAndExtent(t.endContainer,t.endOffset,t.startContainer,t.startOffset)}else if(1===e.length&&!this.__nativeRangeCount()&&(0,a.isFunction)(o.setBaseAndExtent)){let t=e[0];o.setBaseAndExtent(t.startContainer,t.startOffset,t.endContainer,t.endOffset)}}return this.j.e.fire("changeSelection"),this}select(e,t=!1){if(this.errorNode(e),!r.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,s.error)("Node element must be in editor");let i=!t&&this.__closestNotEditable(e)||e,o=this.createRange();return o[t||i===this.area?"selectNodeContents":"selectNode"](i),this.selectRange(o)}__closestNotEditable(e){let{area:t}=this,i=null,o=e.parentNode;for(;o&&o!==t&&t.contains(o);)r.Dom.isElement(o)&&"false"===o.getAttribute("contenteditable")&&(i=o),o=o.parentNode;return i}get html(){let e=this.sel;if(e&&e.rangeCount>0){let e=this.j.createInside.div();return this.__ranges().forEach(t=>r.Dom.append(e,t.cloneContents())),e.innerHTML}return""}__wrapSelectionFragments(e){this.__splitSelectionBoundaries(e);let t=e.commonAncestorContainer;return(r.Dom.isText(t)&&(t=t.parentNode),t)?this.__wrapSelectionRuns(this.__collectContainedNodes(t,e)):[]}__splitSelectionBoundaries(e){var t,i,o,n;let{endContainer:s,endOffset:a}=e;r.Dom.isText(s)&&a>0&&a<(null!=(i=null==(t=s.nodeValue)?void 0:t.length)?i:0)&&s.splitText(a);let{startContainer:l,startOffset:c}=e;if(r.Dom.isText(l)&&c>0&&c<(null!=(n=null==(o=l.nodeValue)?void 0:o.length)?n:0)){let t=l.splitText(c);e.setStart(t,0)}this.__normalizeRangeBoundary(e,!0),this.__normalizeRangeBoundary(e,!1)}__normalizeRangeBoundary(e,t){var i,o;let n=t?e.startContainer:e.endContainer;if(!r.Dom.isText(n))return;let s=t?e.startOffset:e.endOffset,a=null!=(o=null==(i=n.nodeValue)?void 0:i.length)?o:0;0===s?t?e.setStartBefore(n):e.setEndBefore(n):s>=a&&(t?e.setStartAfter(n):e.setEndAfter(n))}__collectContainedNodes(e,t,i=this.createRange()){let o=[];return(0,s.toArray)(e.childNodes).forEach(e=>{this.__isFullyContained(t,e,i)?o.push(e):e.childNodes.length&&t.intersectsNode(e)&&o.push(...this.__collectContainedNodes(e,t,i))}),o}__isFullyContained(e,t,i){return i.selectNode(t),0>=e.compareBoundaryPoints(Range.START_TO_START,i)&&e.compareBoundaryPoints(Range.END_TO_END,i)>=0}__wrapSelectionRuns(e){let t=[],i=[],o=()=>{i.length&&(t.push(this.__wrapRunInFont(i)),i=[])};return e.forEach(e=>{r.Dom.isElement(e)&&this.__isOrContainsBlock(e)?(o(),t.push(...this.__wrapSelectionRuns((0,s.toArray)(e.childNodes)))):(i.length&&i[i.length-1].parentNode!==e.parentNode&&o(),i.push(e))}),o(),t}__isOrContainsBlock(e){return!!r.Dom.isBlock(e)||(0,s.toArray)(e.childNodes).some(e=>this.__isOrContainsBlock(e))}__wrapRunInFont(e){let t=this.j.createInside.element("font"),[i]=e;return r.Dom.before(i,t),e.forEach(e=>r.Dom.append(t,e)),t}*wrapInTagGen(e){var t;if((null==(t=this.sel)?void 0:t.rangeCount)&&!this.isInsideArea)return;if(this.isCollapsed()){let t=this.jodit.createInside.element("font",o.INVISIBLE_SPACE);this.insertNode(t,!1,!1),e&&e[0]&&r.Dom.append(t,e[0]);try{yield t}finally{r.Dom.unwrap(t)}return}let i=this.__ranges().flatMap(e=>this.__wrapSelectionFragments(e));try{for(let e of i){if(this.j.isInDestruct||!r.Dom.isOrContains(this.area,e,!0))continue;let{firstChild:t,lastChild:i}=e;if(t&&t===i&&(0,a.isMarker)(t)){r.Dom.unwrap(e);continue}t&&(0,a.isMarker)(t)&&r.Dom.before(e,t),i&&(0,a.isMarker)(i)&&r.Dom.after(e,i),yield e,r.Dom.unwrap(e)}}finally{i.forEach(e=>r.Dom.unwrap(e))}}wrapInTag(e){let t=[];for(let i of this.wrapInTagGen())try{if(i.firstChild&&i.firstChild===i.lastChild&&(0,a.isMarker)(i.firstChild))continue;(0,a.isFunction)(e)?e(i):t.push(r.Dom.replace(i,e,this.j.createInside))}finally{let e=i.parentNode;e&&(r.Dom.unwrap(i),r.Dom.isEmpty(e)&&r.Dom.unwrap(e))}return t}commitStyle(e){(0,c.assert)((0,s.size)(e)>0,"Need to pass at least one option"),new u.CommitStyle(e).apply(this.j)}splitSelection(e,t){if(!this.isCollapsed()||!this.isInsideArea||!r.Dom.isOrContains(this.area,e,!0)||!r.Dom.isOrContains(e,this.range.startContainer)||t&&!r.Dom.isOrContains(e,t,!0))return null;let i=this.createRange(),n=this.range;i.setStartBefore(e);let s=this.cursorOnTheRight(e,t),a=this.cursorOnTheLeft(e,t),l=this.j.createInside.element("br"),d=this.j.createInside.fake(),u=d.cloneNode();try{if(s||a){t?r.Dom.before(t,l):r.Dom.safeInsertNode(n,l);let e=(e,t)=>{let i=t(e);for(;i;){let e=t(i);if(i&&(r.Dom.isTag(i,"br")||r.Dom.isEmptyTextNode(i)))r.Dom.safeRemove(i);else break;i=e}};e(l,e=>e.nextSibling),e(l,e=>e.previousSibling),r.Dom.after(l,u),r.Dom.before(l,d),s?(i.setEndBefore(l),n.setEndBefore(l)):(i.setEndAfter(l),n.setEndAfter(l))}else i.setEnd(n.startContainer,n.startOffset);let h=i.extractContents(),p=e=>r.Dom.each(e,e=>r.Dom.isEmptyTextNode(e)&&r.Dom.safeRemove(e));(0,c.assert)(e.parentNode,"Splitting fails");try{if(p(h),p(e),r.Dom.before(e,h),!t&&s&&(null==l?void 0:l.parentNode)){let e=this.createRange();e.setStartBefore(l),this.selectRange(e)}}catch(e){if(!o.IS_PROD)throw e}let f=e=>{let t=null==e?void 0:e.parentNode;t&&t.firstChild===t.lastChild&&r.Dom.append(t,l.cloneNode())};f(d),f(u)}finally{r.Dom.safeRemove(d),r.Dom.safeRemove(u)}return e.previousElementSibling}expandSelection(){if(this.isCollapsed()||!this.isInsideArea)return this;let e=this.__isBackward(),t=this.__ranges().map(e=>this.__expandRange(e));return this.__selectRanges(t,e),this}__expandRange(e){let t=e.cloneRange();if(!r.Dom.isOrContains(this.j.editor,e.commonAncestorContainer,!0))return e;let i=t=>{let i=this.j.createInside.fake(),o=e.cloneRange();return o.collapse(t),r.Dom.safeInsertNode(o,i),(0,d.moveTheNodeAlongTheEdgeOutward)(i,t,this.j.editor),i},o=i(!0),n=i(!1);t.setStartAfter(o),t.setEndBefore(n);let a=r.Dom.findSibling(o,!1),l=r.Dom.findSibling(n,!0);if(a!==l){let e=r.Dom.isElement(a)&&r.Dom.isOrContains(a,n),i=!e&&r.Dom.isElement(l)&&r.Dom.isOrContains(l,o);if(e||i){let i=e?a:l,s=i;for(;r.Dom.isElement(i);)(i=e?i.firstElementChild:i.lastElementChild)&&(e?r.Dom.isOrContains(i,n):r.Dom.isOrContains(i,o))&&(s=i);e?t.setStart(s,0):t.setEnd(s,s.childNodes.length)}}if(r.Dom.safeRemove(o,n),t.collapsed)throw(0,s.error)("Selection is collapsed");return t}constructor(e){this.jodit=e,this.__fakeSelections=new WeakMap,e.e.on("removeMarkers",()=>{this.removeMarkers()})}}p([n.autobind],f.prototype,"createRange",null),p([n.autobind],f.prototype,"focus",null),p([n.autobind],f.prototype,"setCursorAfter",null),p([n.autobind],f.prototype,"setCursorBefore",null),p([n.autobind],f.prototype,"setCursorIn",null)},32526:function(e,t,i){"use strict";i.d(t,{extractSelectedPart:function(){return s}});var o=i(2748),n=i(78116),r=i(37790);function s(e,t,i){let o=i.s.createRange(),r=(0,n.isMarker)(t.previousSibling)?t.previousSibling:t;o.setStartBefore(e),o.setEndBefore(r),a(e,o,!0);let s=(0,n.isMarker)(t.nextSibling)?t.nextSibling:t;o.setStartAfter(s),o.setEndAfter(e),a(e,o,!1)}function a(e,t,i){let n=t.extractContents();o.Dom.isEmpty(n)&&n.firstChild&&o.Dom.unwrap(n.firstChild),e.parentNode&&(0,r.call)(i?o.Dom.before:o.Dom.after,e,n)}},49996:function(e,t,i){"use strict";i.d(t,{FiniteStateMachine:function(){return s}});var o=i(82758),n=i(70799),r=i(38837);class s{setState(e){(0,r.assert)(!this.__previewsStates.has(e),"Circled states"),this.__previewsStates.add(e),this.__state=e}getState(){return this.__state}disableSilent(){this.silent=!1}dispatch(e,t){let i=this.transitions[this.getState()][e];if(i){let e=i.call(this,t);return(0,r.assert)(e&&e!==t,"Action should return new value"),(0,r.assert)((0,n.isString)(e.next),"Value should contain the next state"),(0,r.assert)(e.next!==this.getState(),"The new state should not be equal to the old one."),this.setState(e.next),o.IS_PROD||this.silent,e}throw Error(`invalid action: ${this.getState()}.${e.toString()}`)}constructor(e,t){this.transitions=t,this.silent=!0,this.__previewsStates=new Set,this.setState(e)}}},23738:function(e,t,i){"use strict";i.d(t,{getSuitChild:function(){return s}});var o=i(2748),n=i(29136),r=i(97380);function s(e,t){let{firstChild:i}=t;for(;i&&!(0,n.isNormalNode)(i);)if(!(i=i.nextSibling))return null;return i&&!o.Dom.next(i,n.isNormalNode,t)&&(0,r.isSuitElement)(e,i,!1)?i:null}},44602:function(e,t,i){"use strict";i.d(t,{getSuitParent:function(){return function e(t,i,s){var a;let{parentNode:l}=i;return l===s||!o.Dom.isHTMLElement(l)||o.Dom.next(i,n.isNormalNode,l)||o.Dom.prev(i,n.isNormalNode,l)?null:t.isElementCommit&&t.elementIsBlock&&!o.Dom.isBlock(l)?e(t,l,s):o.Dom.isTag(l,"li")&&!t.isElementCommit&&(null==(a=t.options.attributes)?void 0:a.style)||(0,r.isSuitElement)(t,l,!1)&&(!o.Dom.isBlock(l)||t.elementIsBlock)?l:t.isElementCommit&&!o.Dom.isBlock(l)?e(t,l,s):null}}});var o=i(2748),n=i(29136),r=i(97380)},22030:function(e,t,i){"use strict";i.d(t,{hasSameStyle:function(){return c},hasSameStyleKeys:function(){return d}});var o=i(82758),n=i(2748),r=i(86068),s=i(3760),a=i(38837),l=i(41180);function c(e,t){return!!(!n.Dom.isTag(e,"font")&&n.Dom.isHTMLElement(e)&&Object.keys(t).every(i=>{let o=(0,l.css)(e,i,!0);return""===o&&(""===t[i]||null==t[i])||!(0,r.isVoid)(o)&&""!==o&&!(0,r.isVoid)(t[i])&&(0,s.normalizeCssValue)(i,t[i]).toString().toLowerCase()===o.toString().toLowerCase()}))}if(o.globalDocument){let e=o.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(c(e,{color:"red"}),"Style test"),(0,a.assert)(c(e,{fontSize:null}),"Style test"),(0,a.assert)(c(e,{fontSize:""}),"Style test")}function d(e,t){return!!(!n.Dom.isTag(e,"font")&&n.Dom.isHTMLElement(e)&&Object.keys(t).every(t=>""!==(0,l.css)(e,t,!0)))}if(o.globalDocument){let e=o.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(d(e,{color:"red"}),"Style test"),(0,a.assert)(!d(e,{font:"Arial",color:"red"}),"Style test"),(0,a.assert)(!d(e,{border:"1px solid #ccc"}),"Style test")}},63687:function(e,t,i){"use strict";i.d(t,{FiniteStateMachine:function(){return n.FiniteStateMachine},WRAP_NODES:function(){return h.WRAP_NODES},extractSelectedPart:function(){return o.extractSelectedPart},getSuitChild:function(){return r.getSuitChild},getSuitParent:function(){return s.getSuitParent},isInsideInvisibleElement:function(){return a.isInsideInvisibleElement},suitableClosest:function(){return l.suitableClosest},toggleAttributes:function(){return d.toggleAttributes},toggleOrderedList:function(){return c.toggleOrderedList},unwrapChildren:function(){return u.unwrapChildren},wrap:function(){return h.wrap}});var o=i(32526),n=i(49996),r=i(23738),s=i(44602);i(22030);var a=i(64291);i(29136),i(94466);var l=i(97380),c=i(20199);i(82515);var d=i(44253),u=i(75882),h=i(19263);i(6980)},64291:function(e,t,i){"use strict";i.d(t,{isInsideInvisibleElement:function(){return n}});var o=i(2748);function n(e,t){return!!o.Dom.closest(e,["style","script"],t)}},29136:function(e,t,i){"use strict";i.d(t,{isNormalNode:function(){return r}});var o=i(2748),n=i(78116);function r(e){return!!(e&&!o.Dom.isEmptyTextNode(e)&&!o.Dom.isTemporary(e)&&!(0,n.isMarker)(e))}},94466:function(e,t,i){"use strict";i.d(t,{elementsEqualAttributes:function(){return c},isSameAttributes:function(){return l}});var o=i(21496),n=i(43555),r=i(38837),s=i(29960),a=i(22030);function l(e,t){return!(0,o.size)(t)||((0,r.assert)(t,"Attrs must be a non-empty object"),Object.keys(t).every(i=>{var o;if("class"===i||"className"===i)return(null!=(o=(t[i]+"").match(/[^\t\n\f\r ]+/g))?o:[]).every(t=>e.classList.contains(t));if("style"===i)return(0,a.hasSameStyle)(e,t[i]);let r=t[i];return(0,n.attr)(e,i)===(null==r?r:r+"")}))}function c(e,t){return e.attributes.length===t.attributes.length&&Array.from(e.attributes).every(e=>(0,s.attrRaw)(t,e.name)===e.value)}},97380:function(e,t,i){"use strict";i.d(t,{isSuitElement:function(){return s},suitableClosest:function(){return a}});var o=i(2748),n=i(22030),r=i(29136);function s(e,t,i,a=!0){var l;if(!t||!(0,r.isNormalNode)(t))return!1;let{element:c,elementIsDefault:d,options:u}=e;if(o.Dom.isList(t)&&e.elementIsList)return!0;let h=o.Dom.isTag(t,c);return!!(h&&!(d&&i)||(null==(l=u.attributes)?void 0:l.style)&&(a?(0,n.hasSameStyle)(t,u.attributes.style):(0,n.hasSameStyleKeys)(t,u.attributes.style))&&!e.elementIsList)||!h&&!i&&d&&o.Dom.isInlineBlock(t)}function a(e,t,i){return o.Dom.closest(t,t=>s(e,t,!0,!1),i)}},20199:function(e,t,i){"use strict";i.d(t,{toggleOrderedList:function(){return c}});var o=i(2748),n=i(38837),r=i(32526),s=i(44253),a=i(77361),l=i(82515);function c(e,t,i,o){if(!t)return o;let n=t.parentElement;if(!n)return o;let r=i.e.fire(`${a._PREFIX}BeforeToggleList`,o,e,n);if(void 0!==r)return r;let c=i.e.fire.bind(i.e,`${a._PREFIX}AfterToggleList`);if("unwrap"!==o){let r="change"===(0,s.toggleAttributes)(e,t.parentElement,i,a.INITIAL,!0);if(o===a.REPLACE||r||n.tagName.toLowerCase()!==e.element){let o=d(a.REPLACE,n,t,i,e),r=(0,l.wrapList)(e,o,i);return c(a.REPLACE,r,e),a.REPLACE}}return c("unwrap",d("unwrap",n,t,i,e),e),"unwrap"}function d(e,t,i,s,l){let c=s.e.fire(`${a._PREFIX}BeforeUnwrapList`,e,t,l);return c?((0,n.assert)(o.Dom.isHTMLElement(c),`${a._PREFIX}BeforeUnwrapList hook must return HTMLElement`),c):((0,r.extractSelectedPart)(t,i,s),(0,n.assert)(o.Dom.isHTMLElement(i.parentElement),"Element should be inside the list"),o.Dom.unwrap(i.parentElement),e===a.REPLACE)?i:o.Dom.replace(i,"br"!==s.o.enter.toLowerCase()?s.o.enter:s.createInside.fragment(),s.createInside)}},82515:function(e,t,i){"use strict";i.d(t,{wrapList:function(){return a}});var o=i(2748),n=i(94466),r=i(44253),s=i(77361);function a(e,t,i){let a=i.e.fire(`${s._PREFIX}BeforeWrapList`,s.REPLACE,t,e),l=null!=a?a:o.Dom.replace(t,"li",i.createInside),c=l.previousElementSibling,d=l.nextElementSibling,u=o.Dom.isTag(c,e.element)?c:null;return null!=u||(u=o.Dom.isTag(d,e.element)?d:null),o.Dom.isList(u)&&(0,n.isSameAttributes)(u,e.options.attributes)||(u=i.createInside.element(e.element),(0,r.toggleAttributes)(e,u,i,s.INITIAL),o.Dom.before(l,u)),c===u?o.Dom.append(u,l):o.Dom.prepend(u,l),o.Dom.isTag(u.nextElementSibling,e.element)&&(0,n.elementsEqualAttributes)(u,u.nextElementSibling)&&(o.Dom.append(u,Array.from(u.nextElementSibling.childNodes)),o.Dom.safeRemove(u.nextElementSibling)),i.e.fire(`${s._PREFIX}AfterWrapList`,"wrap",u,e),u}},44253:function(e,t,i){"use strict";i.d(t,{toggleAttributes:function(){return f}});var o=i(82758),n=i(2748),r=i(580),s=i(27613),a=i(3760),l=i(21496),c=i(43555),d=i(41180),u=i(86583),h=i(77361);let p="toggleAttributes";function f(e,t,i,m,g=!1){var b;if(!g&&e.isApplied(t,p))return m;g||e.setApplied(t,p);let{attributes:v}=e.options;return v&&(0,l.size)(v)>0&&Object.keys(v).forEach(e=>{var p,f;let b=v[e];switch(e){case"style":p=m,(0,c.assert)((0,s.isPlainObject)(b)&&(0,l.size)(b),"Style must be an object"),Object.keys(b).forEach(e=>{let s=(0,d.cssInline)(t,e),l=b[e];if(""!==s||null!=l){let h,f,m,b;if(null==l||""===l){s&&(g||(0,d.css)(t,e,null),p="change");return}if(h=function(e){var t;if(void 0!==(0,u.dataBind)(e,"shadowRoot"))return(0,u.dataBind)(e,"shadowRoot");let i=(0,r.getContainer)(e),s=o.globalDocument.createElement("iframe");(0,d.css)(s,{width:0,height:0,position:"absolute",border:0}),(0,c.attr)(s,"src","about:blank"),n.Dom.append(i,s);let a=null==(t=s.contentWindow)?void 0:t.document,l=a?a.body:e.od.body;return(0,u.dataBind)(e,"shadowRoot",l),l}(i),f=i.create.element("div"),(0,d.css)(f,"color",(0,d.css)(i.editor,"color")),m=i.create.element(t.tagName.toLowerCase()),(0,c.attr)(m,"style",(0,c.attr)(t,"style")),n.Dom.append(f,m),n.Dom.append(h,f),b=(0,d.css)(m,e),n.Dom.safeRemove(f),b===(0,a.normalizeCssValue)(e,l)){if(!s)return;g||(0,d.css)(t,e,null),p="unset";return}p="change",g||(0,d.css)(t,e,l)}}),m=p;break;case"className":case"class":m=function(e,t,i,o,n){var r;(0,c.assert)((0,s.isString)(t),"Class name must be a string");let a=null!=(r=t.match(/[^\t\n\f\r ]+/g))?r:[];if(!a.length)return o;let l=e.e.fire.bind(e.e,`${h._PREFIX}AfterToggleAttribute`);return a.every(e=>i.classList.contains(e))?(o="unset",n||(i.classList.remove(...a),0===i.classList.length&&(0,c.attr)(i,"class",null),l(o,i,"class",(0,c.attr)(i,"class")))):(o="change",n||(i.classList.add(...a),l(o,i,"class",t))),o}(i,b,t,m,g);break;default:let y;f=m,(0,c.assert)((0,s.isString)(b)||(0,s.isNumber)(b)||(0,s.isBoolean)(b)||null==b,"Attribute value must be a string or number or boolean or null"),y=i.e.fire.bind(i.e,`${h._PREFIX}AfterToggleAttribute`),(0,c.attr)(t,e)===(null==b?b:b+"")?(g||(0,c.attr)(t,e,null),f="unset",g||y(f,t,e,b)):(f="change",g||((0,c.attr)(t,e,b),y(f,t,e,b))),m=f}}),!g&&(null==v?void 0:v.style)?(b=m,!(0,c.attr)(t,"style")&&((0,c.attr)(t,"style",null),t.attributes.length||t.tagName.toLowerCase()!==e.defaultTag||(n.Dom.unwrap(t),b="unwrap")),b):m}},75882:function(e,t,i){"use strict";i.d(t,{unwrapChildren:function(){return a}});var o=i(2748),n=i(43555),r=i(22030),s=i(97380);function a(e,t){var i;let a,l=[],c=[],d=null==(i=e.options.attributes)?void 0:i.style,u=Object.keys(null!=d?d:{}),h={};u.forEach(e=>{h[e]=null});let p=t=>{(0,n.css)(t,h),(0,n.attr)(t,"style")||(0,n.attr)(t,"style",null),!t.attributes.length&&o.Dom.isTag(t,e.element)&&l.push(t)};for(let i of o.Dom.eachGen(t))o.Dom.isContentEditable(i,t)&&((0,s.isSuitElement)(e,i,!0)&&(!d||(0,r.hasSameStyleKeys)(i,d))?(void 0===a&&(a=!0),d?c.push(()=>p(i)):l.push(i)):d&&o.Dom.isHTMLElement(i)&&u.some(e=>""!==(0,n.css)(i,e,!0))?(void 0===a&&(a=!1),c.push(()=>p(i))):o.Dom.isEmptyTextNode(i)||void 0!==a||(a=!1));return c.forEach(e=>e()),l.forEach(o.Dom.unwrap),!!a}},6980:function(e,t,i){"use strict";i.d(t,{wrapUnwrappedText:function(){return r}});var o=i(2748),n=i(78116);function r(e,t,i){let r=i.editor,s=i.createInside,a=(e,t="previousSibling")=>{let s=e,a=e;for(;a&&!(0,n.isMarker)(a)&&!o.Dom.isTag(a,i.o.enter)&&(s=a,a=a[t]?a[t]:a.parentNode&&!o.Dom.isBlock(a.parentNode)&&a.parentNode!==r?a.parentNode:null,!o.Dom.isBlock(a)););return s},l=a(t),c=a(t,"nextSibling"),d=i.s.createRange();d.setStartBefore(l),d.setEndAfter(c);let u=d.extractContents(),h=s.element(e.element);return o.Dom.append(h,u),o.Dom.safeInsertNode(d,h),e.elementIsBlock&&o.Dom.isEmpty(h)&&!o.Dom.isTag(h.firstElementChild,"br")&&o.Dom.append(h,s.element("br")),h}},19263:function(e,t,i){"use strict";i.d(t,{wrap:function(){return l}});var o=i(22732),n=i(29960),r=i(41180),s=i(82515),a=i(6980);function l(e,t,i){var l,d,u;let h=(l=e,d=t,u=i,l.elementIsBlock?o.Dom.up(d,e=>o.Dom.isBlock(e)&&!o.Dom.isTag(e,c)&&!Array.from(e.childNodes).some(e=>o.Dom.isBlock(e)),u.editor)||(0,a.wrapUnwrappedText)(l,d,u):((0,n.attr)(d,"size",null),d));if(e.elementIsList)return(0,s.wrapList)(e,h,i);let p=o.Dom.replace(h,e.element,i.createInside,!0);return e.elementIsBlock&&((0,r.css)(p,"fontSize",null),(0,r.css)(p,"fontWeight",null),(0,n.attr)(p,"style")||(0,n.attr)(p,"style",null)),p}let c=new Set(["td","th","tr","tbody","table","li","ul","ol"]);i.d(t,["WRAP_NODES",0,c])},83632:function(e,t,i){"use strict";i.d(t,{ApplyStyle:function(){return s}});var o=i(63687),n=i(77361),r=i(55307);function s(e,t){var i;let{s:s,editor:a}=e;null==(i=a.firstChild)||i.normalize();let l=s.fakes(),c=s.isCollapsed(),d=n.INITIAL;try{for(let i of s.wrapInTagGen(l)){let n={collapsed:c,mode:d,element:i,next:r.states.START,jodit:e,style:t},s=new o.FiniteStateMachine(r.states.START,r.transactions);for(;!e.isInDestruct&&s.getState()!==r.states.END;)n=s.dispatch("exec",n);d=n.mode}}finally{s.restoreFakes(l)}}},25639:function(e,t,i){"use strict";i.d(t,{CommitStyle:function(){return a}});var o=i(82758),n=i(87058),r=i(77361),s=i(83632);class a{isApplied(e,t){let i=this.__applyMap.get(e);return!!i&&!!i[t]}setApplied(e,t){var i;let o=null!=(i=this.__applyMap.get(e))?i:{};o[t]=!0,this.__applyMap.set(e,o)}get elementIsList(){return!!(this.options.element&&o.LIST_TAGS.has(this.options.element))}get element(){return this.options.element||this.defaultTag}get elementIsBlock(){return!!(this.options.element&&o.IS_BLOCK.test(this.options.element))}get isElementCommit(){return!!(this.options.element&&this.options.element!==this.options.defaultTag)}get defaultTag(){return this.options.defaultTag?this.options.defaultTag:this.elementIsBlock?"p":"span"}get elementIsDefault(){return this.element===this.defaultTag}apply(e){let{hooks:t}=this.options,i=t?Object.keys(t):[];try{i.forEach(i=>{e.e.on((0,n.camelCase)(r._PREFIX+"_"+i),t[i])}),(0,s.ApplyStyle)(e,this)}finally{i.forEach(i=>{e.e.off((0,n.camelCase)(r._PREFIX+"_"+i),t[i])}),this.__applyMap=new WeakMap}e.isInDestruct||(e.synchronizeValues(),e.e.fire("afterCommitStyle",this))}constructor(e){this.options=e,this.__applyMap=new WeakMap}}},77361:function(e,t,i){"use strict";i.d(t,["INITIAL",0,"initial","REPLACE",0,"replace","_PREFIX",0,"commitStyle"])},55307:function(e,t,i){"use strict";var o=i(82758),n=i(2748),r=i(38837),s=i(63687),a=i(77361);let l={START:"START",ELEMENT:"ELEMENT",UNWRAP:"UNWRAP",UNWRAP_CHILDREN:"UNWRAP_CHILDREN",CHANGE:"CHANGE",REPLACE_DEFAULT:"REPLACE_DEFAULT",LIST:"LIST",TOGGLE_LIST:"TOGGLE_LIST",WRAP:"WRAP",EXTRACT:"EXTRACT",END:"END"},c={[l.START]:{exec(e){let{element:t,jodit:i,style:o,mode:r,collapsed:a}=e;if(!n.Dom.isContentEditable(t,i.editor)||(0,s.isInsideInvisibleElement)(t,i.editor)||!a&&n.Dom.isEmptyContent(t))return{...e,next:l.END};let c=(0,s.getSuitParent)(o,t,i.editor)||(0,s.getSuitChild)(o,t);if(c)return{...e,next:l.ELEMENT,element:c};let d=(0,s.suitableClosest)(o,t,i.editor);return o.elementIsList&&n.Dom.isList(d)?{...e,next:l.LIST}:d?{...e,next:l.EXTRACT}:{...e,next:"unwrap"!==r?l.UNWRAP_CHILDREN:l.END}}},[l.LIST]:{exec(e){let{element:t,jodit:i,mode:r}=e;if(r!==a.INITIAL&&"unwrap"!==r&&r!==a.REPLACE)return{...e,next:l.END};let s=n.Dom.closest(t,"li",i.editor);return s&&n.Dom.closest(t,o.LIST_TAGS,i.editor)?{...e,element:s,next:l.TOGGLE_LIST}:{...e,next:l.END}}},[l.TOGGLE_LIST]:{exec:e=>({...e,mode:(0,s.toggleOrderedList)(e.style,e.element,e.jodit,e.mode),next:l.END})},[l.EXTRACT]:{exec(e){var t;let{element:i,jodit:o,style:a}=e,c=(0,s.suitableClosest)(a,i,o.editor);return((0,r.assert)(c,"This place should have an element"),!a.elementIsBlock&&(null==(t=a.options.attributes)?void 0:t.style)&&n.Dom.isBlock(c))?{...e,next:l.WRAP}:(a.elementIsBlock||(0,s.extractSelectedPart)(c,i,o),{...e,element:c,next:l.ELEMENT})}},[l.UNWRAP_CHILDREN]:{exec(e){let{element:t,style:i}=e;return(0,s.unwrapChildren)(i,t)?{...e,mode:"unwrap",next:l.END}:{...e,next:l.WRAP}}},[l.WRAP]:{exec(e){let{element:t,jodit:i,style:o}=e,n=(0,s.wrap)(o,t,i);return{...e,next:o.elementIsList?l.END:l.CHANGE,mode:"wrap",element:n}}},[l.ELEMENT]:{exec(e){let{style:t,element:i,jodit:o}=e;return(0,s.toggleAttributes)(t,i,o,a.INITIAL,!0)!==a.INITIAL?{...e,next:l.CHANGE}:n.Dom.isTag(i,t.element)?{...e,next:l.UNWRAP}:{...e,next:l.END}}},[l.CHANGE]:{exec(e){let{style:t,element:i,jodit:o,mode:r}=e,a=(0,s.toggleAttributes)(t,i,o,e.mode);return"wrap"!==r&&"unset"===a&&!i.attributes.length&&n.Dom.isTag(i,t.element)?{...e,next:l.UNWRAP}:{...e,mode:a,next:l.END}}},[l.UNWRAP]:{exec(e){let{element:t,style:i,jodit:o}=e;if(t.attributes.length&&n.Dom.isTag(t,i.element))return{...e,next:l.REPLACE_DEFAULT};let r=t.parentElement;return i.elementIsBlock&&!i.elementIsDefault&&r&&r!==o.editor&&n.Dom.isBlock(r)&&!n.Dom.isTag(r,s.WRAP_NODES)?{...e,next:l.REPLACE_DEFAULT}:(n.Dom.unwrap(t),{...e,mode:"unwrap",next:l.END})}},[l.REPLACE_DEFAULT]:{exec:e=>(n.Dom.replace(e.element,e.style.defaultTag,e.jodit.createInside,!0),{...e,mode:a.REPLACE,next:l.END})},[l.END]:{exec:e=>e}};i.d(t,["states",0,l,"transactions",0,c])},97333:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return a}});var o=i(87058),n=i(2621),r=i(65638),s=i(21162);class a{async set(e,t){let i=await this.provider;return await i.set((0,o.camelCase)(this.prefix+e),t),this}async delete(e){let t=await this.provider;return await t.delete((0,o.camelCase)(this.prefix+e)),this}async get(e){return(await this.provider).get((0,o.camelCase)(this.prefix+e))}async exists(e){return(await this.provider).exists((0,o.camelCase)(this.prefix+e))}async clear(){let e=await this.provider;return await e.clear(),this}async close(){let e=await this.provider;"close"in e&&"function"==typeof e.close&&await e.close()}static makeStorage(e=!1,t,i){let o,l=null==i?void 0:i.defaultProvider;return null!=l?new a(Promise.resolve(o="local"===l?(0,r.canUsePersistentStorage)("localStorage")?new r.LocalStorageProvider("Jodit_"+(t||"")):new s.MemoryStorageProvider:"memory"===l?new s.MemoryStorageProvider:l),t):("localStorage"===e||"sessionStorage"===e?(0,r.canUsePersistentStorage)(e)&&(o=new r.LocalStorageProvider("Jodit_"+(t||""),e)):("indexedDB"===e||!0===e)&&(o=(0,n.canUseIndexedDB)().then(e=>e?new n.IndexedDBProvider("Jodit_"+(t||""),"keyValueStore"):new s.MemoryStorageProvider)),o||(o=new s.MemoryStorageProvider),new a(Promise.resolve(o),t))}constructor(e,t){this.provider=e,this.prefix="Jodit_",t&&(this.prefix+=t)}}},2621:function(e,t,i){"use strict";i.d(t,{IndexedDBProvider:function(){return n},canUseIndexedDB:function(){return a},clearUseIndexedDBCache:function(){return s}});var o=i(82758);class n{getDB(){return this.dbPromise||(this.dbPromise=new Promise((e,t)=>{let i=indexedDB.open(this.dbName,this.DB_VERSION);i.onerror=()=>{t(i.error)},i.onsuccess=()=>{e(i.result)},i.onupgradeneeded=e=>{let t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName)}})),this.dbPromise}async performTransaction(e,t){try{let i=(await this.getDB()).transaction([this.storeName],e).objectStore(this.storeName),o=t(i);return new Promise((e,t)=>{o.onsuccess=()=>{e(o.result)},o.onerror=()=>{t(o.error)}})}catch(e){return Promise.reject(e)}}async set(e,t){try{await this.performTransaction("readwrite",i=>i.put(t,e))}catch(e){o.IS_PROD}return this}async delete(e){try{await this.performTransaction("readwrite",t=>t.delete(e))}catch(e){}return this}async get(e){try{return await this.performTransaction("readonly",t=>t.get(e))}catch(e){return}}async exists(e){try{let t=await this.performTransaction("readonly",t=>t.get(e));return void 0!==t}catch(e){return!1}}async clear(){try{await this.performTransaction("readwrite",e=>e.clear())}catch(e){}return this}async close(){if(this.dbPromise){try{(await this.dbPromise).close()}catch(e){}this.dbPromise=null}}async keys(){try{let e=await this.performTransaction("readonly",e=>e.getAllKeys());return e&&"object"==typeof e&&"then"in e&&(e=await e),e.map(e=>e+"")}catch(e){return[]}}async values(){try{let e=await this.performTransaction("readonly",e=>e.getAll());return e&&"object"==typeof e&&"then"in e&&(e=await e),e}catch(e){return[]}}async entries(){try{let[e,t]=await Promise.all([this.keys(),this.values()]);return e.map((e,i)=>[e,t[i]])}catch(e){return[]}}constructor(e="JoditDB",t="keyValueStore"){this.dbName=e,this.dbPromise=null,this.DB_VERSION=1,this.storeName=t}}let r=null;function s(){r=null}async function a(){if(null!=r)return r;try{if("u"<typeof indexedDB)return r=!1,!1;let e="___Jodit___"+Math.random().toString(),t=indexedDB.open(e);return r=await new Promise(i=>{t.onerror=()=>{i(!1)},t.onsuccess=()=>{indexedDB.deleteDatabase(e),i(!0)}})}catch(e){return r=!1,!1}}},65638:function(e,t,i){"use strict";i.d(t,{LocalStorageProvider:function(){return o}});class o{get storage(){return"sessionStorage"===this.strategy?sessionStorage:localStorage}set(e,t){try{let i=this.storage.getItem(this.rootKey),o=i?JSON.parse(i):{};o[e]=t,this.storage.setItem(this.rootKey,JSON.stringify(o))}catch(e){}return this}delete(e){try{let t=this.storage.getItem(this.rootKey);if(t){let i=JSON.parse(t);delete i[e],this.storage.setItem(this.rootKey,JSON.stringify(i))}}catch(e){}return this}get(e){try{let t=this.storage.getItem(this.rootKey),i=t?JSON.parse(t):{};return void 0!==i[e]?i[e]:void 0}catch(e){}}exists(e){return null!=this.get(e)}clear(){try{this.storage.removeItem(this.rootKey)}catch(e){}return this}constructor(e,t="localStorage"){this.rootKey=e,this.strategy=t}}i.d(t,["canUsePersistentStorage",0,(e="localStorage")=>{let t=new Map;if(t.has(e))return t.get(e);let i="___Jodit___"+Math.random().toString(),o="sessionStorage"===e?sessionStorage:localStorage;try{o.setItem(i,"1");let n="1"===o.getItem(i);return o.removeItem(i),t.set(e,n),n}catch(e){}return t.set(e,!1),!1}])},21162:function(e,t,i){"use strict";i.d(t,{MemoryStorageProvider:function(){return o}});class o{set(e,t){return this.data.set(e,t),this}delete(e){return this.data.delete(e),this}get(e){return this.data.get(e)}exists(e){return this.data.has(e)}clear(){return this.data.clear(),this}constructor(){this.data=new Map}}},12081:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return o.AsyncStorage},IndexedDBProvider:function(){return n.IndexedDBProvider},LocalStorageProvider:function(){return r.LocalStorageProvider},MemoryStorageProvider:function(){return s.MemoryStorageProvider},Storage:function(){return a.Storage},StorageKey:function(){return"Jodit_"},canUseIndexedDB:function(){return n.canUseIndexedDB},canUsePersistentStorage:function(){return r.canUsePersistentStorage},clearUseIndexedDBCache:function(){return n.clearUseIndexedDBCache}});var o=i(97333),n=i(2621),r=i(65638),s=i(21162),a=i(6700)},6700:function(e,t,i){"use strict";i.d(t,{Storage:function(){return a}});var o=i(87058),n=i(65638),r=i(21162);let s="Jodit_";class a{set(e,t){return this.provider.set((0,o.camelCase)(this.prefix+e),t),this}delete(e){return this.provider.delete((0,o.camelCase)(this.prefix+e)),this}get(e){return this.provider.get((0,o.camelCase)(this.prefix+e))}exists(e){return this.provider.exists((0,o.camelCase)(this.prefix+e))}clear(){return this.provider.clear(),this}static makeStorage(e=!1,t){let i;return"localStorage"===e||"sessionStorage"===e?(0,n.canUsePersistentStorage)(e)&&(i=new n.LocalStorageProvider(s+(t||""),e)):!0===e&&(0,n.canUsePersistentStorage)("localStorage")&&(i=new n.LocalStorageProvider(s+(t||""))),i||(i=new r.MemoryStorageProvider),new a(i,t)}constructor(e,t){this.provider=e,this.prefix=s,t&&(this.prefix+=t)}}},70231:function(e,t,i){"use strict";i.d(t,{Dlgs:function(){return a}});var o=i(580),n=i(27613),r=i(37790),s=i(638);class a{dlg(e){let t=(0,o.getPopupViewRoot)(this.o,this.container,this.od.body),i=new s.Dialog({language:this.o.language,shadowRoot:this.o.shadowRoot,popupRoot:t,ownerWindow:this.o.ownerWindow,defaultTimeout:this.o.defaultTimeout,direction:this.o.direction,theme:this.o.theme,globalFullSize:this.o.globalFullSize,...e});return(0,r.markOwner)(this,i.container),i.parent=this,i.bindDestruct(this)}confirm(e,t,i){return e=l(e,this),t=l(t,this),s.Confirm.call(this.dlg({closeOnClickOverlay:!0}),e,t,i)}prompt(e,t,i,o,n){return e=l(e,this),t=l(t,this),o=l(o,this),s.Prompt.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,o,n)}alert(e,t,i,o){return e=l(e,this),t=l(t,this),s.Alert.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,o)}}function l(e,t){return(0,n.isString)(e)&&!(0,n.isHTML)(e)&&(e=t.i18n(e)),e}},14316:function(e,t,i){"use strict";i.d(t,{Elms:function(){return n}});var o=i(2748);class n{getElm(e){let t=this.getFullElName(e);return o.Dom.first(this.container,e=>o.Dom.isHTMLElement(e)&&e.classList.contains(t))}getElms(e){let t=this.getFullElName(e),i=[];return o.Dom.each(this.container,e=>{o.Dom.isHTMLElement(e)&&e.classList.contains(t)&&i.push(e)}),i}}},34176:function(e,t,i){"use strict";i.d(t,{Mods:function(){return n}});var o=i(86068);class n{afterSetMod(e,t){}setMod(e,t,i){e=e.toLowerCase();let n=this.mods[e];if(n===t)return this;let r=`${this.componentName}_${e}_`,s=(i||this.container).classList;return null!=n&&s.remove(`${r}${n.toString().toLowerCase()}`),(0,o.isVoid)(t)||""===t||s.add(`${r}${t.toString().toLowerCase()}`),this.mods[e]=t,this.afterSetMod(e,t),this}getMod(e){var t;return null!=(t=this.mods[e])?t:null}}},10830:function(e,t,i){"use strict";i.d(t,{Button:function(){return b},UIButton:function(){return g}});var o=i(78213),n=i(33433),r=i(87325),s=i(37133),a=i(2748),l=i(23282),c=i(70799),d=i(38837),u=i(29960),h=i(48538),p=i(12153),f=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let m=()=>({size:"middle",type:"button",role:"button",name:"",value:"",variant:"initial",disabled:!1,activated:!1,icon:{name:"empty",fill:"",iconURL:"",scale:void 0},tooltip:"",text:"",tabIndex:void 0}),g=class e extends h.UIElement{className(){return"UIButton"}setState(e){return Object.assign(this.state,e),this}get text(){let e=this.getElm("text");return(0,d.assert)(e,"Text element not found"),e}get icon(){let e=this.getElm("icon");return(0,d.assert)(e,"Icon element not found"),e}onChangeSize(){this.setMod("size",this.state.size)}onChangeType(){(0,u.attr)(this.container,"type",this.state.type)}onChangeRole(){(0,u.attr)(this.container,"role",this.state.role)}updateSize(){let e=(0,r.getComponentClass)("UIList"),t=this.closest(e);if(t){this.state.size=t.buttonSize;return}}onChangeStatus(){this.setMod("variant",this.state.variant)}onChangeText(){this.text.textContent=this.jodit.i18n(this.state.text),this.updateAriaLabel()}onChangeTextSetMode(){this.setMod("text-icons",!!this.state.text.trim().length)}onChangeDisabled(){(0,u.attr)(this.container,"disabled",this.state.disabled||null)}onChangeActivated(){(0,u.attr)(this.container,"aria-pressed",this.state.activated)}onChangeName(){this.container.classList.add(`${this.componentName}_${this.clearName(this.state.name)}`),this.name=this.state.name,(0,u.attr)(this.container,"data-ref",this.state.name),(0,u.attr)(this.container,"ref",this.state.name),this.updateAriaLabel()}onChangeTooltip(){let e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;this.get("j.o.useNativeTooltip")&&(0,u.attr)(this.container,"title",e),(0,u.attr)(this.container,"aria-label",e),this.updateAriaLabel()}updateAriaLabel(){let e=this.state.text.trim().length>0,t=this.state.tooltip?this.jodit.i18n(this.state.tooltip):!e&&this.state.name?this.state.name:null;(0,u.attr)(this.container,"aria-label",t),(0,u.attr)(this.button,"aria-label",e?null:t)}onChangeTabIndex(){(0,u.attr)(this.container,"tabindex",this.state.tabIndex)}onChangeIcon(){let e=this.get("j.o.textIcons");if(!0===e||(0,l.isFunction)(e)&&e(this.state.name))return;a.Dom.detach(this.icon);let t=p.Icon.makeIcon(this.j,this.state.icon);t&&a.Dom.append(this.icon,t)}focus(){this.container.focus()}isFocused(){let{activeElement:e}=this.od;return!!(e&&a.Dom.isOrContains(this.container,e))}createContainer(){let e=this.componentName,t=this.j.c.element("button",{class:e,type:"button",role:"button",ariaPressed:!1}),i=this.j.c.span(e+"__icon"),o=this.j.c.span(e+"__text");return a.Dom.append(t,i),a.Dom.append(t,o),t}destruct(){return this.j.e.off(this),this.j.e.off(this.container),super.destruct()}onAction(e){return this.actionHandlers.push(e),this}__onActionFire(e){e.buffer={actionTrigger:this},this.actionHandlers.forEach(t=>t.call(this,e)),this.j.e.fire(this,"click",e)}constructor(e,t){super(e),this.isButton=!0,this.state=m(),this.actionHandlers=[],this.button=this.container,this.updateSize(),this.onChangeSize(),this.onChangeStatus(),t&&this.hookStatus(o.STATUSES.ready,()=>{this.setState(t)})}};function b(e,t,i,o){let n=new g(e);return n.state.tabIndex=e.o.allowTabNavigation?0:-1,(0,c.isString)(t)?(n.state.icon.name=t,n.state.name=t,o&&(n.state.variant=o),i&&(n.state.text=i)):n.setState(t),n}f([n.cache],g.prototype,"text",null),f([n.cache],g.prototype,"icon",null),f([(0,s.watch)("state.size",{immediately:!1})],g.prototype,"onChangeSize",null),f([(0,s.watch)("state.type",{immediately:!1})],g.prototype,"onChangeType",null),f([(0,s.watch)("state.role",{immediately:!1})],g.prototype,"onChangeRole",null),f([(0,s.watch)("parentElement")],g.prototype,"updateSize",null),f([(0,s.watch)("state.variant",{immediately:!1})],g.prototype,"onChangeStatus",null),f([(0,s.watch)("state.text",{immediately:!1})],g.prototype,"onChangeText",null),f([(0,s.watch)("state.text",{immediately:!1})],g.prototype,"onChangeTextSetMode",null),f([(0,s.watch)("state.disabled")],g.prototype,"onChangeDisabled",null),f([(0,s.watch)("state.activated")],g.prototype,"onChangeActivated",null),f([(0,s.watch)("state.name",{immediately:!1})],g.prototype,"onChangeName",null),f([(0,s.watch)("state.tooltip",{immediately:!1})],g.prototype,"onChangeTooltip",null),f([(0,s.watch)("state.tabIndex",{immediately:!1})],g.prototype,"onChangeTabIndex",null),f([(0,s.watch)("state.icon",{immediately:!1})],g.prototype,"onChangeIcon",null),f([n.cacheHTML],g.prototype,"createContainer",null),f([(0,s.watch)("button:click")],g.prototype,"__onActionFire",null),g=f([r.component],g),i.d(t,["UIButtonState",0,m])},71916:function(e,t,i){"use strict";i.d(t,{UIButtonGroup:function(){return l}});var o=i(87325),n=i(2748),r=i(38837),s=i(10830),a=i(62405);let l=class e extends a.UIGroup{className(){return"UIButtonGroup"}render(e){return`<div>
|
|
22
|
+
`))}h()};t.onprogress=()=>p(!1),t.onload=()=>{p(!0),d=!0,this.__isFulfilled=!0,h()},t.onerror=()=>{u=a.connection("Connection error"),d=!0,this.__isFulfilled=!0,h()},t.onabort=()=>{u=a.abort("Abort connection"),d=!0,this.__isFulfilled=!0,h()},t.withCredentials=null!=(e=i.withCredentials)&&e;let{url:f,data:m,method:g}=o;t.open(g,f,!0),i.contentType&&t.setRequestHeader&&t.setRequestHeader("Content-type",i.contentType);let{headers:b}=i;(0,s.isFunction)(b)&&(b=await b.call(this)),b&&t.setRequestHeader&&Object.keys(b).forEach(e=>{t.setRequestHeader(e,b[e])}),t.send(m?this.__buildParams(m):void 0);try{for(;;)if(l.length>0)yield l.shift();else if(d)break;else await new Promise(e=>{c=e})}finally{this.__isFulfilled||this.abort()}if(u)throw u}prepareRequest(){if(!this.o.url)throw a.error("Need URL for AJAX request");let e=this.o.url,t=this.o.data,i=(this.o.method||"get").toLowerCase();if("get"===i&&t&&(0,s.isPlainObject)(t)){let i=e.indexOf("?");if(-1!==i){let o=(0,s.parseQuery)(e.substring(i));e=e.substring(0,i)+"?"+(0,s.buildQuery)({...o,...t})}else e+="?"+(0,s.buildQuery)(this.o.data)}let o={url:e,method:i,data:t};return d.log.splice(100),d.log.push(o),o}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__activated&&!this.__isFulfilled&&(this.abort(),this.__isFulfilled=!0),this.__async.destruct())}constructor(e,t=l.Config.prototype.defaultAjaxOptions){this.__async=new o.Async,this.__isFulfilled=!1,this.__activated=!1,this.__isDestructed=!1,this.options=(0,s.ConfigProto)(e||{},t),this.xhr=this.o.xhr?this.o.xhr():new XMLHttpRequest}}d.log=[],function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([r.autobind],d.prototype,"destruct",null)},57459:function(e,t,i){"use strict";i(6441).Config.prototype.defaultAjaxOptions={successStatuses:[200,201,202],method:"GET",url:"",data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!1,xhr:()=>new XMLHttpRequest}},41601:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return o.Ajax},Response:function(){return n.Response}});var o=i(54079),n=i(98582)},98582:function(e,t,i){"use strict";i.d(t,{Response:function(){return o}});class o{get url(){return this.request.url}async json(){return JSON.parse(this.body)}text(){return Promise.resolve(this.body)}async blob(){return this.body}constructor(e,t,i,o){this.request=e,this.status=t,this.statusText=i,this.body=o}}},79505:function(e,t,i){"use strict";i.d(t,{composedRanges:function(){return n}});var o=i(27613);function n(e,t){let i=e.getComposedRanges;if(!(0,o.isFunction)(i))return null;for(let o of[[{shadowRoots:[t]}],[t]]){let n;try{n=i.apply(e,o)}catch(e){continue}if(function(e,t){return Array.isArray(e)&&e.length>0&&e.every(e=>{var i;return(i=e.startContainer)===t||t.contains(i)})}(n,t))return n}return null}},45124:function(e,t,i){"use strict";i.d(t,{composedRanges:function(){return r.composedRanges},cursorInTheEdgeOfString:function(){return a},findCorrectCurrentNode:function(){return l},moveNodeInsideStart:function(){return s.moveNodeInsideStart}});var o=i(82758),n=i(2748),r=i(79505),s=i(26716);function a(e,t,i,n){var r;let s=(null==(r=e.nodeValue)?void 0:r.length)?e.nodeValue:"";if(n&&s.replace((0,o.INVISIBLE_SPACE_REG_EXP_END)(),"").length>t)return!0;let a=(0,o.INVISIBLE_SPACE_REG_EXP_START)().exec(s);return i&&(a&&a[0].length<t||!a&&t>0)}function l(e,t,i,o,r,s){if((e=t.startContainer.childNodes[t.startOffset])||(e=t.startContainer.childNodes[t.startOffset-1],i=!0),e&&o&&!n.Dom.isText(e)){if(!i&&n.Dom.isText(e.previousSibling))e=e.previousSibling;else if(r){let t=e=>i?e.lastChild:s(e),o=t(e);for(;o;){if(o&&n.Dom.isText(o)){e=o;break}o=t(o)}}}if(e&&!o&&!n.Dom.isText(e)){let t=e,i=e;do t=t.firstChild,i=i.lastChild;while(t&&i&&!n.Dom.isText(t))t===i&&t&&n.Dom.isText(t)&&(e=t)}return{node:e,rightMode:i}}i(43463)},26716:function(e,t,i){"use strict";i.d(t,{moveNodeInsideStart:function(){return r}});var o=i(82758),n=i(2748);function r(e,t,i){let r=n.Dom.findSibling(t,i),s=n.Dom.findSibling(t,!i);for(;n.Dom.isElement(r)&&!n.Dom.isTag(r,o.INSEPARABLE_TAGS)&&n.Dom.isContentEditable(r,e.editor)&&(!s||!n.Dom.closest(t,n.Dom.isElement,e.editor));)i||!r.firstChild?n.Dom.append(r,t):n.Dom.before(r.firstChild,t),r=n.Dom.sibling(t,i),s=n.Dom.sibling(t,!i)}},43463:function(e,t,i){"use strict";i.d(t,{moveTheNodeAlongTheEdgeOutward:function(){return n}});var o=i(2748);function n(e,t,i){let n=e;for(;n&&n!==i&&!(o.Dom.findSibling(n,t)||o.Dom.isBlock(n.parentElement));)(n=n.parentElement)&&n!==i&&(t?o.Dom.before(n,e):o.Dom.after(n,e))}},59242:function(e,t,i){"use strict";i.d(t,{CHANGE:function(){return"change"},CommitStyle:function(){return n.CommitStyle},REPLACE:function(){return r.REPLACE},Selection:function(){return o.Selection},UNWRAP:function(){return"unwrap"},WRAP:function(){return"wrap"}});var o=i(79348),n=i(25639),r=i(77361)},79348:function(e,t,i){"use strict";i.d(t,{Selection:function(){return f}});var o=i(82758),n=i(65478),r=i(2748),s=i(21537),a=i(27613),l=i(25726),c=i(38837),d=i(43463),u=i(25639),h=i(45124),p=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class f{get j(){return this.jodit}errorNode(e){if(!r.Dom.isNode(e))throw(0,s.error)("Parameter node must be instance of Node")}get area(){return this.j.editor}get win(){return this.j.ew}get doc(){return this.j.ed}get sel(){let{shadowRoot:e}=this.j.o;if(e){if((0,a.isFunction)(e.getSelection))return e.getSelection();let t=this.__composedSelection(e);if(t)return t}return this.win.getSelection()}__composedSelection(e){let t=this.win.getSelection();if(!t)return null;let{anchorNode:i}=t;if(i&&r.Dom.isOrContains(e,i))return null;let o=(0,h.composedRanges)(t,e);if(!o)return null;let n=o.map(e=>{let t=this.createRange();return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),t}),s=n[0],l={rangeCount:n.length,getRangeAt:e=>n[e],isCollapsed:n.every(e=>e.collapsed),anchorNode:s?s.startContainer:null,anchorOffset:s?s.startOffset:0,focusNode:s?s.endContainer:null,focusOffset:s?s.endOffset:0,toString:()=>n.map(e=>e.toString()).join("")};return new Proxy(t,{get(e,t){if((0,a.isString)(t)&&t in l)return l[t];let i=Reflect.get(e,t,e);return(0,a.isFunction)(i)?i.bind(e):i}})}__nativeRangeCount(){var e,t,i,o;let{shadowRoot:n}=this.j.o;return n&&(0,a.isFunction)(n.getSelection)?null!=(t=null==(e=n.getSelection())?void 0:e.rangeCount)?t:0:null!=(o=null==(i=this.win.getSelection())?void 0:i.rangeCount)?o:0}get range(){let e=this.sel;return e&&e.rangeCount?e.getRangeAt(0):this.createRange()}get isInsideArea(){let{sel:e}=this;if(!(null==e?void 0:e.rangeCount))return!1;for(let t=0;t<e.rangeCount;t+=1)if(!r.Dom.isOrContains(this.area,e.getRangeAt(t).commonAncestorContainer))return!1;return!0}createRange(e=!1){let t=this.doc.createRange();return e&&this.selectRange(t),t}remove(){let e=this.sel,t=this.current();if(e&&t)for(let t=0;t<e.rangeCount;t+=1){let i=e.getRangeAt(t);r.Dom.isOrContains(this.area,i.commonAncestorContainer)&&(i.deleteContents(),i.collapse(!0))}}clear(){var e,t;(null==(e=this.sel)?void 0:e.rangeCount)&&(null==(t=this.sel)||t.removeAllRanges())}removeNode(e){if(!r.Dom.isOrContains(this.j.editor,e,!0))throw(0,s.error)("Selection.removeNode can remove only editor's children");r.Dom.safeRemove(e),this.j.e.fire("afterRemoveNode",e)}insertCursorAtPoint(e,t){var i,o,n,s;try{let a=this.createRange(),l=null==(o=(i=this.doc).caretPositionFromPoint)?void 0:o.call(i,e,t),c=l?null:null==(s=(n=this.doc).caretRangeFromPoint)?void 0:s.call(n,e,t);if(l)a.setStart(l.offsetNode,l.offset);else{if(!c)return!1;a.setStart(c.startContainer,c.startOffset)}if(!r.Dom.isOrContains(this.area,a.startContainer))return!1;return a.collapse(!0),this.removeMarkers(),this.selectRange(a),!0}catch(e){}return!1}get hasMarkers(){return!!this.markers.length}get markers(){return(0,s.$$)("span[data-"+o.MARKER_CLASS+"]",this.area)}removeMarkers(){r.Dom.safeRemove(...this.markers)}marker(e=!1,t){var i;let n=null;t&&(n=t.cloneRange()).collapse(e);let a=this.j.createInside.span();if(a.id=o.MARKER_CLASS+"_"+Number(new Date)+"_"+(Math.random()+"").slice(2),(0,s.css)(a,{lineHeight:"0",display:"none"}),r.Dom.markTemporary(a),(0,s.attr)(a,"data-"+o.MARKER_CLASS,e?"start":"end"),r.Dom.append(a,this.j.createInside.text(o.INVISIBLE_SPACE)),n&&r.Dom.isOrContains(this.area,e?n.startContainer:n.endContainer)){let{startContainer:e,startOffset:t}=n;r.Dom.isText(e)&&0===t?r.Dom.before(e,a):r.Dom.isText(e)&&t===(null==(i=e.nodeValue)?void 0:i.length)?r.Dom.after(e,a):n.insertNode(a)}return a}restore(){var e,t;let i=this.markers,n=new Map(i.map(e=>[e.id,e])),a=[],l=!1;for(let c=0;c<i.length;c+=1){let d=i[c];if("start"!==(0,s.attr)(d,"data-"+o.MARKER_CLASS))continue;l||(l="true"===(0,s.attr)(d,"data-selection-backward"));let u=(0,s.attr)(d,"data-selection-end"),h=u?n.get(u):void 0;!u&&i[c+1]&&"end"===(0,s.attr)(i[c+1],"data-"+o.MARKER_CLASS)&&(h=i[c+1]);let p=this.createRange();if(h)p.setStartAfter(d),p.setEndBefore(h);else{let i=d.previousSibling;r.Dom.isText(i)?p.setStart(i,null!=(t=null==(e=i.nodeValue)?void 0:e.length)?t:0):p.setStartBefore(d),p.collapse(!0)}a.push(p)}r.Dom.safeRemove(...i),a.length&&this.__selectRanges(a,l)}__isBackward(){let e=this.sel;return!!(e&&1===e.rangeCount&&!e.isCollapsed&&e.anchorNode===e.getRangeAt(0).endContainer&&e.anchorOffset===e.getRangeAt(0).endOffset)}__ranges(){let e=this.sel;return e?Array.from({length:e.rangeCount},(t,i)=>e.getRangeAt(i).cloneRange()):[]}fakes(){if(!this.isInsideArea)return[];let e=this.__isBackward(),t=this.__ranges(),i=t.map(e=>{let t=e.collapsed,i=e.cloneRange();i.collapse(!0);let o=this.j.createInside.fake();r.Dom.safeInsertNode(i,o),e.setStartBefore(o);let n=[o];if(t)e.collapse(!0);else{let t=e.cloneRange();t.collapse(!1);let i=this.j.createInside.fake();r.Dom.safeInsertNode(t,i),e.setEndAfter(i),n.push(i)}return n});return this.__fakeSelections.set(i[0][0],{pairs:i,backward:e}),this.__selectRanges(t,e),i[0]}restoreFakes(e){var t,i,o;if(!e.length)return;let n=this.__fakeSelections.get(e[0]);if(this.__fakeSelections.delete(e[0]),this.j.isInDestruct)return;let s=[];for(let a of null!=(t=null==n?void 0:n.pairs)?t:[e]){let e=a.filter(e=>e.isConnected&&r.Dom.isOrContains(this.area,e,!0));if(!e.length)continue;let[t,n]=e,l=this.createRange();for(let s of(l.setStartAfter(t),n?l.setEndBefore(n):l.collapse(!0),e))(null==(i=s.parentNode)?void 0:i.firstChild)!==(null==(o=s.parentNode)?void 0:o.lastChild)&&r.Dom.safeRemove(s);s.push(l)}s.length&&this.__selectRanges(s,null==n?void 0:n.backward)}save(e=!1){if(this.hasMarkers)return[];let t=this.sel;if(!t||!t.rangeCount)return[];let i=this.__isBackward(),o=[],n=t.rangeCount,a=[];for(let e=0;n>e;e+=1)if(a[e]=t.getRangeAt(e),!r.Dom.isOrContains(this.area,a[e].commonAncestorContainer))return[];for(let e=0;n>e;e+=1)if(a[e].collapsed){let t=this.marker(!0,a[e]);o[e]={startId:t.id,collapsed:!0,startMarker:t.outerHTML}}else{let t=this.marker(!0,a[e]),r=this.marker(!1,a[e]);n>1&&(0,s.attr)(t,"data-selection-end",r.id),i&&(0,s.attr)(t,"data-selection-backward","true"),o[e]={startId:t.id,endId:r.id,collapsed:!1,startMarker:t.outerHTML,endMarker:r.outerHTML}}if(!e){t.removeAllRanges();for(let e=n-1;e>=0;--e){let i=this.area.querySelector("#"+o[e].startId);if(i){if(o[e].collapsed)a[e].setStartAfter(i),a[e].collapse(!0);else if(a[e].setStartBefore(i),o[e].endId){let t=this.area.querySelector("#"+o[e].endId);t&&a[e].setEndAfter(t)}try{t.addRange(a[e].cloneRange())}catch(e){}}}}return o}focus(e={preventScroll:!0}){var t,i;if(!this.isFocused()){let o=(0,s.getScrollParent)(this.j.container),n=null==o?void 0:o.scrollTop;this.j.iframe&&"complete"===this.doc.readyState&&this.j.iframe.focus(e),this.win.focus(),this.area.focus(e),n&&(null==o?void 0:o.scrollTo)&&o.scrollTo(0,n);let a=this.sel,l=(null==a?void 0:a.rangeCount)?null==a?void 0:a.getRangeAt(0):null;if(!l||!r.Dom.isOrContains(this.area,l.startContainer)){let e=this.createRange();e.setStart(this.area,0),e.collapse(!0),this.selectRange(e,!1)}return this.j.editorIsActive||null==(i=null==(t=this.j)?void 0:t.events)||i.fire("focus"),!0}return!1}isCollapsed(){let e=this.sel;for(let t=0;e&&t<e.rangeCount;t+=1)if(!e.getRangeAt(t).collapsed)return!1;return!0}isFocused(){return this.doc.hasFocus&&this.doc.hasFocus()&&this.area===this.doc.activeElement}current(e=!0){if(this.j.getRealMode()!==o.MODE_WYSIWYG)return null;let t=this.sel;if(!t||0===t.rangeCount)return null;let i=t.getRangeAt(0),n=i.startContainer,s=!1;if(!r.Dom.isOrContains(this.area,n))return null;if(r.Dom.isTag(n,"br")&&t.isCollapsed)return n;if(!r.Dom.isText(n)){let o=(0,h.findCorrectCurrentNode)(n,i,s,t.isCollapsed,e,e=>s?e.lastChild:e.firstChild);n=o.node,s=o.rightMode}return n&&r.Dom.isOrContains(this.area,n)?n:null}insertNode(e,t=!0,i=!0){this.errorNode(e),this.j.e.fire("safeHTML",e);let n=r.Dom.isFragment(e)?e.lastChild:e;if(!n||this.j.isInDestruct)return;!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore());let a=this.sel;this.j.history.snapshot.transaction(()=>{if(this.isCollapsed()||this.j.execCommand("Delete"),this.j.e.fire("beforeInsertNode",e),!(n=r.Dom.isFragment(e)?e.lastChild:e)||this.j.isInDestruct)return;if(a&&a.rangeCount){let t=a.getRangeAt(0),{firstChild:i}=e;r.Dom.isOrContains(this.area,t.commonAncestorContainer)?r.Dom.safeInsertNode(t,e):r.Dom.append(this.area,e),[()=>null==i?void 0:i.previousSibling,()=>null==i?void 0:i.previousSibling,()=>{var e;return null==(e=null==i?void 0:i.previousSibling)?void 0:e.lastChild}].forEach(e=>{var t;let i=e();i&&r.Dom.isText(i)&&0===(null!=(t=i.nodeValue)?t:"").replace(o.INVISIBLE_SPACE_REG_EXP(),"").length&&r.Dom.safeRemove(i)})}else r.Dom.append(this.area,e);let i=e=>{if(r.Dom.isBlock(e)){let t=e.lastChild;if(t)return i(t)}this.setCursorAfter(e)};t&&(r.Dom.isFragment(e)?n&&i(n):i(e)),this.j.o.scrollToPastedContent&&(0,s.scrollIntoViewIfNeeded)(null!=n?n:e,this.j.editor,this.doc)}),i&&this.j.events&&this.j.__imdSynchronizeValues(),this.j.events&&this.j.e.fire("afterInsertNode",r.Dom.isFragment(e)?n:e)}insertHTML(e,t=!0){if(""===e)return;let i=this.j.createInside.div(),o=this.j.createInside.fragment();!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore()),r.Dom.isNode(e)?r.Dom.append(i,e):i.innerHTML=e.toString(),!this.j.isEditorMode()&&!1===this.j.e.fire("insertHTML",i.innerHTML)||i.lastChild&&(r.Dom.moveContent(i,o),this.insertNode(o,t,!1),this.j.__imdSynchronizeValues())}insertImage(e,t=null,i=null){let o=(0,a.isString)(e)?this.j.createInside.element("img"):e;if((0,a.isString)(e)&&(0,s.attr)(o,"src",e),null!=i){let e=i.toString();e&&"auto"!==e&&0>(e+"").indexOf("px")&&0>(e+"").indexOf("%")&&(e+="px"),(0,s.attr)(o,"width",e)}t&&"object"==typeof t&&(0,s.css)(o,t);let{imageDefaultAlign:n}=this.j.o;n&&"normal"!==n&&(0,l.hAlignElement)(o,n,(0,l.getAlignClasses)(this.j,o));let r=()=>{(o.naturalHeight<o.offsetHeight||o.naturalWidth<o.offsetWidth)&&(0,s.css)(o,{width:"",height:""}),o.removeEventListener("load",r)};this.j.e.on(o,"load",r),o.complete&&r(),this.insertNode(o),this.j.e.fire("afterInsertImage",o)}eachSelection(e){let t=new Set;for(let i of this.__ranges())r.Dom.isOrContains(this.area,i.commonAncestorContainer)&&this.__eachRange(i,i=>{t.has(i)||(t.add(i),e(i))})}__eachRange(e,t){var i;let n=e.commonAncestorContainer;r.Dom.isHTMLElement(n)||(n=n.parentElement);let l=[],c=e.startOffset,d=n.childNodes.length,u=e.startContainer===this.area?n.childNodes[c<d?c:d-1]:e.startContainer,h=e.endContainer===this.area?n.childNodes[e.endOffset-1]:e.endContainer;r.Dom.isText(u)&&u===e.startContainer&&e.startOffset===(null==(i=u.nodeValue)?void 0:i.length)&&u.nextSibling&&(u=u.nextSibling),r.Dom.isText(h)&&h===e.endContainer&&0===e.endOffset&&h.previousSibling&&(h=h.previousSibling);let p=e=>{!e||e===n||r.Dom.isEmptyTextNode(e)||(0,a.isMarker)(e)||l.push(e)};p(u),u!==h&&r.Dom.isOrContains(n,u,!0)&&r.Dom.find(u,e=>(p(e),e===h||e&&e.contains&&e.contains(h)),n,!0,!1);let f=e=>{if(r.Dom.isOrContains(this.j.editor,e,!0)){if(e.nodeName.match(/^(UL|OL)$/))return(0,s.toArray)(e.childNodes).forEach(f);if(r.Dom.isTag(e,"li"))if(e.firstChild)e=e.firstChild;else{let t=this.j.createInside.text(o.INVISIBLE_SPACE);r.Dom.append(e,t),e=t}t(e)}};0===l.length&&(r.Dom.isEmptyTextNode(u)&&l.push(u),(null==u?void 0:u.firstChild)&&l.push(u.firstChild)),l.forEach(f)}cursorInTheEdge(e,t,i=null){let o=!e,n=this.sel,s=(null==n?void 0:n.rangeCount)?n.getRangeAt(0):null;if(!s)return null;let a=e?s.startContainer:s.endContainer,l=e?s.startOffset:s.endOffset;if(null!=i||(i=a),!r.Dom.isOrContains(t,a)||!r.Dom.isOrContains(t,i))return null;let c=e=>!!(e&&!r.Dom.isTag(e,"br")&&!r.Dom.isEmptyTextNode(e)&&!r.Dom.isTemporary(e)&&!(r.Dom.isElement(e)&&!0===this.j.e.fire("isInvisibleForCursor",e)));if(r.Dom.isText(a)){if((0,h.cursorInTheEdgeOfString)(a,l,e,o))return!1}else{let e=a.childNodes,t=o?e.length:l;for(let i=o?l:0;t>i;i+=1)if(c(e[i]))return!1}let d=i;for(;d&&d!==t;){let t=r.Dom.sibling(d,e);if(!t){d=d.parentNode;continue}if(c(d=t))return!1}return!0}cursorOnTheLeft(e,t){return this.cursorInTheEdge(!0,e,t)}cursorOnTheRight(e,t){return this.cursorInTheEdge(!1,e,t)}setCursorAfter(e){return this.setCursorNearWith(e,!1)}setCursorBefore(e){return this.setCursorNearWith(e,!0)}setCursorNearWith(e,t){var i,o;if(this.errorNode(e),!r.Dom.isOrContains(this.area,e,!0))throw(0,s.error)("Node element must be in editor");let n=this.createRange(),a=null;return r.Dom.isText(e)?t?n.setStart(e,0):n.setEnd(e,null!=(o=null==(i=e.nodeValue)?void 0:i.length)?o:0):(a=this.j.createInside.fake(),t?n.setStartBefore(e):n.setEndAfter(e),n.collapse(t),r.Dom.safeInsertNode(n,a),n.selectNode(a)),n.collapse(t),this.selectRange(n),a}setCursorIn(e,t=!1){if(this.errorNode(e),!r.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,s.error)("Node element must be in editor");let i=this.createRange(),n=e,a=e;do{if(r.Dom.isText(n)||r.Dom.isTag(n,o.INSEPARABLE_TAGS))break;a=n,n=t?n.firstChild:n.lastChild}while(n)if(!n){let e=this.j.createInside.text(o.INVISIBLE_SPACE);r.Dom.isTag(a,o.INSEPARABLE_TAGS)?n=a:(r.Dom.append(a,e),a=e)}let l=n||a;return r.Dom.isTag(l,o.INSEPARABLE_TAGS)?t||r.Dom.isTag(l,"br")?i.setStartBefore(l):i.setEndAfter(l):i.selectNodeContents(l),i.collapse(t),this.selectRange(i),a}selectRange(e,t=!0){return this.__selectRanges([e],!1,t)}__selectRanges(e,t=!1,i=!0){let o=this.sel;if(i&&!this.isFocused()&&"focus"!==this.j.e.current&&this.focus(),o){if(o.removeAllRanges(),e.forEach(e=>o.addRange(e)),t&&1===e.length){let t=e[0];o.setBaseAndExtent(t.endContainer,t.endOffset,t.startContainer,t.startOffset)}else if(1===e.length&&!this.__nativeRangeCount()&&(0,a.isFunction)(o.setBaseAndExtent)){let t=e[0];o.setBaseAndExtent(t.startContainer,t.startOffset,t.endContainer,t.endOffset)}}return this.j.e.fire("changeSelection"),this}select(e,t=!1){if(this.errorNode(e),!r.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,s.error)("Node element must be in editor");let i=!t&&this.__closestNotEditable(e)||e,o=this.createRange();return o[t||i===this.area?"selectNodeContents":"selectNode"](i),this.selectRange(o)}__closestNotEditable(e){let{area:t}=this,i=null,o=e.parentNode;for(;o&&o!==t&&t.contains(o);)r.Dom.isElement(o)&&"false"===o.getAttribute("contenteditable")&&(i=o),o=o.parentNode;return i}get html(){let e=this.sel;if(e&&e.rangeCount>0){let e=this.j.createInside.div();return this.__ranges().forEach(t=>r.Dom.append(e,t.cloneContents())),e.innerHTML}return""}__wrapSelectionFragments(e){this.__splitSelectionBoundaries(e);let t=e.commonAncestorContainer;return(r.Dom.isText(t)&&(t=t.parentNode),t)?this.__wrapSelectionRuns(this.__collectContainedNodes(t,e)):[]}__splitSelectionBoundaries(e){var t,i,o,n;let{endContainer:s,endOffset:a}=e;r.Dom.isText(s)&&a>0&&a<(null!=(i=null==(t=s.nodeValue)?void 0:t.length)?i:0)&&s.splitText(a);let{startContainer:l,startOffset:c}=e;if(r.Dom.isText(l)&&c>0&&c<(null!=(n=null==(o=l.nodeValue)?void 0:o.length)?n:0)){let t=l.splitText(c);e.setStart(t,0)}this.__normalizeRangeBoundary(e,!0),this.__normalizeRangeBoundary(e,!1)}__normalizeRangeBoundary(e,t){var i,o;let n=t?e.startContainer:e.endContainer;if(!r.Dom.isText(n))return;let s=t?e.startOffset:e.endOffset,a=null!=(o=null==(i=n.nodeValue)?void 0:i.length)?o:0;0===s?t?e.setStartBefore(n):e.setEndBefore(n):s>=a&&(t?e.setStartAfter(n):e.setEndAfter(n))}__collectContainedNodes(e,t,i=this.createRange()){let o=[];return(0,s.toArray)(e.childNodes).forEach(e=>{this.__isFullyContained(t,e,i)?o.push(e):e.childNodes.length&&t.intersectsNode(e)&&o.push(...this.__collectContainedNodes(e,t,i))}),o}__isFullyContained(e,t,i){return i.selectNode(t),0>=e.compareBoundaryPoints(Range.START_TO_START,i)&&e.compareBoundaryPoints(Range.END_TO_END,i)>=0}__wrapSelectionRuns(e){let t=[],i=[],o=()=>{i.length&&(t.push(this.__wrapRunInFont(i)),i=[])};return e.forEach(e=>{r.Dom.isElement(e)&&this.__isOrContainsBlock(e)?(o(),t.push(...this.__wrapSelectionRuns((0,s.toArray)(e.childNodes)))):(i.length&&i[i.length-1].parentNode!==e.parentNode&&o(),i.push(e))}),o(),t}__isOrContainsBlock(e){return!!r.Dom.isBlock(e)||(0,s.toArray)(e.childNodes).some(e=>this.__isOrContainsBlock(e))}__wrapRunInFont(e){let t=this.j.createInside.element("font"),[i]=e;return r.Dom.before(i,t),e.forEach(e=>r.Dom.append(t,e)),t}*wrapInTagGen(e){var t;if((null==(t=this.sel)?void 0:t.rangeCount)&&!this.isInsideArea)return;if(this.isCollapsed()){let t=this.jodit.createInside.element("font",o.INVISIBLE_SPACE);this.insertNode(t,!1,!1),e&&e[0]&&r.Dom.append(t,e[0]);try{yield t}finally{r.Dom.unwrap(t)}return}let i=this.__ranges().flatMap(e=>this.__wrapSelectionFragments(e));try{for(let e of i){if(this.j.isInDestruct||!r.Dom.isOrContains(this.area,e,!0))continue;let{firstChild:t,lastChild:i}=e;if(t&&t===i&&(0,a.isMarker)(t)){r.Dom.unwrap(e);continue}t&&(0,a.isMarker)(t)&&r.Dom.before(e,t),i&&(0,a.isMarker)(i)&&r.Dom.after(e,i),yield e,r.Dom.unwrap(e)}}finally{i.forEach(e=>r.Dom.unwrap(e))}}wrapInTag(e){let t=[];for(let i of this.wrapInTagGen())try{if(i.firstChild&&i.firstChild===i.lastChild&&(0,a.isMarker)(i.firstChild))continue;(0,a.isFunction)(e)?e(i):t.push(r.Dom.replace(i,e,this.j.createInside))}finally{let e=i.parentNode;e&&(r.Dom.unwrap(i),r.Dom.isEmpty(e)&&r.Dom.unwrap(e))}return t}commitStyle(e){(0,c.assert)((0,s.size)(e)>0,"Need to pass at least one option"),new u.CommitStyle(e).apply(this.j)}splitSelection(e,t){if(!this.isCollapsed()||!this.isInsideArea||!r.Dom.isOrContains(this.area,e,!0)||!r.Dom.isOrContains(e,this.range.startContainer)||t&&!r.Dom.isOrContains(e,t,!0))return null;let i=this.createRange(),n=this.range;i.setStartBefore(e);let s=this.cursorOnTheRight(e,t),a=this.cursorOnTheLeft(e,t),l=this.j.createInside.element("br"),d=this.j.createInside.fake(),u=d.cloneNode();try{if(s||a){t?r.Dom.before(t,l):r.Dom.safeInsertNode(n,l);let e=(e,t)=>{let i=t(e);for(;i;){let e=t(i);if(i&&(r.Dom.isTag(i,"br")||r.Dom.isEmptyTextNode(i)))r.Dom.safeRemove(i);else break;i=e}};e(l,e=>e.nextSibling),e(l,e=>e.previousSibling),r.Dom.after(l,u),r.Dom.before(l,d),s?(i.setEndBefore(l),n.setEndBefore(l)):(i.setEndAfter(l),n.setEndAfter(l))}else i.setEnd(n.startContainer,n.startOffset);let h=i.extractContents(),p=e=>r.Dom.each(e,e=>r.Dom.isEmptyTextNode(e)&&r.Dom.safeRemove(e));(0,c.assert)(e.parentNode,"Splitting fails");try{if(p(h),p(e),r.Dom.before(e,h),!t&&s&&(null==l?void 0:l.parentNode)){let e=this.createRange();e.setStartBefore(l),this.selectRange(e)}}catch(e){if(!o.IS_PROD)throw e}let f=e=>{let t=null==e?void 0:e.parentNode;t&&t.firstChild===t.lastChild&&r.Dom.append(t,l.cloneNode())};f(d),f(u)}finally{r.Dom.safeRemove(d),r.Dom.safeRemove(u)}return e.previousElementSibling}expandSelection(){if(this.isCollapsed()||!this.isInsideArea)return this;let e=this.__isBackward(),t=this.__ranges().map(e=>this.__expandRange(e));return this.__selectRanges(t,e),this}__expandRange(e){let t=e.cloneRange();if(!r.Dom.isOrContains(this.j.editor,e.commonAncestorContainer,!0))return e;let i=t=>{let i=this.j.createInside.fake(),o=e.cloneRange();return o.collapse(t),r.Dom.safeInsertNode(o,i),(0,d.moveTheNodeAlongTheEdgeOutward)(i,t,this.j.editor),i},o=i(!0),n=i(!1);t.setStartAfter(o),t.setEndBefore(n);let a=r.Dom.findSibling(o,!1),l=r.Dom.findSibling(n,!0);if(a!==l){let e=r.Dom.isElement(a)&&r.Dom.isOrContains(a,n),i=!e&&r.Dom.isElement(l)&&r.Dom.isOrContains(l,o);if(e||i){let i=e?a:l,s=i;for(;r.Dom.isElement(i);)(i=e?i.firstElementChild:i.lastElementChild)&&(e?r.Dom.isOrContains(i,n):r.Dom.isOrContains(i,o))&&(s=i);e?t.setStart(s,0):t.setEnd(s,s.childNodes.length)}}if(r.Dom.safeRemove(o,n),t.collapsed)throw(0,s.error)("Selection is collapsed");return t}constructor(e){this.jodit=e,this.__fakeSelections=new WeakMap,e.e.on("removeMarkers",()=>{this.removeMarkers()})}}p([n.autobind],f.prototype,"createRange",null),p([n.autobind],f.prototype,"focus",null),p([n.autobind],f.prototype,"setCursorAfter",null),p([n.autobind],f.prototype,"setCursorBefore",null),p([n.autobind],f.prototype,"setCursorIn",null)},32526:function(e,t,i){"use strict";i.d(t,{extractSelectedPart:function(){return s}});var o=i(2748),n=i(78116),r=i(37790);function s(e,t,i){let o=i.s.createRange(),r=(0,n.isMarker)(t.previousSibling)?t.previousSibling:t;o.setStartBefore(e),o.setEndBefore(r),a(e,o,!0);let s=(0,n.isMarker)(t.nextSibling)?t.nextSibling:t;o.setStartAfter(s),o.setEndAfter(e),a(e,o,!1)}function a(e,t,i){let n=t.extractContents();o.Dom.isEmpty(n)&&n.firstChild&&o.Dom.unwrap(n.firstChild),e.parentNode&&(0,r.call)(i?o.Dom.before:o.Dom.after,e,n)}},49996:function(e,t,i){"use strict";i.d(t,{FiniteStateMachine:function(){return s}});var o=i(82758),n=i(70799),r=i(38837);class s{setState(e){(0,r.assert)(!this.__previewsStates.has(e),"Circled states"),this.__previewsStates.add(e),this.__state=e}getState(){return this.__state}disableSilent(){this.silent=!1}dispatch(e,t){let i=this.transitions[this.getState()][e];if(i){let e=i.call(this,t);return(0,r.assert)(e&&e!==t,"Action should return new value"),(0,r.assert)((0,n.isString)(e.next),"Value should contain the next state"),(0,r.assert)(e.next!==this.getState(),"The new state should not be equal to the old one."),this.setState(e.next),o.IS_PROD||this.silent,e}throw Error(`invalid action: ${this.getState()}.${e.toString()}`)}constructor(e,t){this.transitions=t,this.silent=!0,this.__previewsStates=new Set,this.setState(e)}}},23738:function(e,t,i){"use strict";i.d(t,{getSuitChild:function(){return s}});var o=i(2748),n=i(29136),r=i(97380);function s(e,t){let{firstChild:i}=t;for(;i&&!(0,n.isNormalNode)(i);)if(!(i=i.nextSibling))return null;return i&&!o.Dom.next(i,n.isNormalNode,t)&&(0,r.isSuitElement)(e,i,!1)?i:null}},44602:function(e,t,i){"use strict";i.d(t,{getSuitParent:function(){return function e(t,i,s){var a;let{parentNode:l}=i;return l===s||!o.Dom.isHTMLElement(l)||o.Dom.next(i,n.isNormalNode,l)||o.Dom.prev(i,n.isNormalNode,l)?null:t.isElementCommit&&t.elementIsBlock&&!o.Dom.isBlock(l)?e(t,l,s):o.Dom.isTag(l,"li")&&!t.isElementCommit&&(null==(a=t.options.attributes)?void 0:a.style)||(0,r.isSuitElement)(t,l,!1)&&(!o.Dom.isBlock(l)||t.elementIsBlock)?l:t.isElementCommit&&!o.Dom.isBlock(l)?e(t,l,s):null}}});var o=i(2748),n=i(29136),r=i(97380)},22030:function(e,t,i){"use strict";i.d(t,{hasSameStyle:function(){return c},hasSameStyleKeys:function(){return d}});var o=i(82758),n=i(2748),r=i(86068),s=i(3760),a=i(38837),l=i(41180);function c(e,t){return!!(!n.Dom.isTag(e,"font")&&n.Dom.isHTMLElement(e)&&Object.keys(t).every(i=>{let o=(0,l.css)(e,i,!0);return""===o&&(""===t[i]||null==t[i])||!(0,r.isVoid)(o)&&""!==o&&!(0,r.isVoid)(t[i])&&(0,s.normalizeCssValue)(i,t[i]).toString().toLowerCase()===o.toString().toLowerCase()}))}if(o.globalDocument){let e=o.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(c(e,{color:"red"}),"Style test"),(0,a.assert)(c(e,{fontSize:null}),"Style test"),(0,a.assert)(c(e,{fontSize:""}),"Style test")}function d(e,t){return!!(!n.Dom.isTag(e,"font")&&n.Dom.isHTMLElement(e)&&Object.keys(t).every(t=>""!==(0,l.css)(e,t,!0)))}if(o.globalDocument){let e=o.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(d(e,{color:"red"}),"Style test"),(0,a.assert)(!d(e,{font:"Arial",color:"red"}),"Style test"),(0,a.assert)(!d(e,{border:"1px solid #ccc"}),"Style test")}},63687:function(e,t,i){"use strict";i.d(t,{FiniteStateMachine:function(){return n.FiniteStateMachine},WRAP_NODES:function(){return h.WRAP_NODES},extractSelectedPart:function(){return o.extractSelectedPart},getSuitChild:function(){return r.getSuitChild},getSuitParent:function(){return s.getSuitParent},isInsideInvisibleElement:function(){return a.isInsideInvisibleElement},suitableClosest:function(){return l.suitableClosest},toggleAttributes:function(){return d.toggleAttributes},toggleOrderedList:function(){return c.toggleOrderedList},unwrapChildren:function(){return u.unwrapChildren},wrap:function(){return h.wrap}});var o=i(32526),n=i(49996),r=i(23738),s=i(44602);i(22030);var a=i(64291);i(29136),i(94466);var l=i(97380),c=i(20199);i(82515);var d=i(44253),u=i(75882),h=i(19263);i(6980)},64291:function(e,t,i){"use strict";i.d(t,{isInsideInvisibleElement:function(){return n}});var o=i(2748);function n(e,t){return!!o.Dom.closest(e,["style","script"],t)}},29136:function(e,t,i){"use strict";i.d(t,{isNormalNode:function(){return r}});var o=i(2748),n=i(78116);function r(e){return!!(e&&!o.Dom.isEmptyTextNode(e)&&!o.Dom.isTemporary(e)&&!(0,n.isMarker)(e))}},94466:function(e,t,i){"use strict";i.d(t,{elementsEqualAttributes:function(){return c},isSameAttributes:function(){return l}});var o=i(21496),n=i(43555),r=i(38837),s=i(29960),a=i(22030);function l(e,t){return!(0,o.size)(t)||((0,r.assert)(t,"Attrs must be a non-empty object"),Object.keys(t).every(i=>{var o;if("class"===i||"className"===i)return(null!=(o=(t[i]+"").match(/[^\t\n\f\r ]+/g))?o:[]).every(t=>e.classList.contains(t));if("style"===i)return(0,a.hasSameStyle)(e,t[i]);let r=t[i];return(0,n.attr)(e,i)===(null==r?r:r+"")}))}function c(e,t){return e.attributes.length===t.attributes.length&&Array.from(e.attributes).every(e=>(0,s.attrRaw)(t,e.name)===e.value)}},97380:function(e,t,i){"use strict";i.d(t,{isSuitElement:function(){return s},suitableClosest:function(){return a}});var o=i(2748),n=i(22030),r=i(29136);function s(e,t,i,a=!0){var l;if(!t||!(0,r.isNormalNode)(t))return!1;let{element:c,elementIsDefault:d,options:u}=e;if(o.Dom.isList(t)&&e.elementIsList)return!0;let h=o.Dom.isTag(t,c);return!!(h&&!(d&&i)||(null==(l=u.attributes)?void 0:l.style)&&(a?(0,n.hasSameStyle)(t,u.attributes.style):(0,n.hasSameStyleKeys)(t,u.attributes.style))&&!e.elementIsList)||!h&&!i&&d&&o.Dom.isInlineBlock(t)}function a(e,t,i){return o.Dom.closest(t,t=>s(e,t,!0,!1),i)}},20199:function(e,t,i){"use strict";i.d(t,{toggleOrderedList:function(){return c}});var o=i(2748),n=i(38837),r=i(32526),s=i(44253),a=i(77361),l=i(82515);function c(e,t,i,o){if(!t)return o;let n=t.parentElement;if(!n)return o;let r=i.e.fire(`${a._PREFIX}BeforeToggleList`,o,e,n);if(void 0!==r)return r;let c=i.e.fire.bind(i.e,`${a._PREFIX}AfterToggleList`);if("unwrap"!==o){let r="change"===(0,s.toggleAttributes)(e,t.parentElement,i,a.INITIAL,!0);if(o===a.REPLACE||r||n.tagName.toLowerCase()!==e.element){let o=d(a.REPLACE,n,t,i,e),r=(0,l.wrapList)(e,o,i);return c(a.REPLACE,r,e),a.REPLACE}}return c("unwrap",d("unwrap",n,t,i,e),e),"unwrap"}function d(e,t,i,s,l){let c=s.e.fire(`${a._PREFIX}BeforeUnwrapList`,e,t,l);return c?((0,n.assert)(o.Dom.isHTMLElement(c),`${a._PREFIX}BeforeUnwrapList hook must return HTMLElement`),c):((0,r.extractSelectedPart)(t,i,s),(0,n.assert)(o.Dom.isHTMLElement(i.parentElement),"Element should be inside the list"),o.Dom.unwrap(i.parentElement),e===a.REPLACE)?i:o.Dom.replace(i,"br"!==s.o.enter.toLowerCase()?s.o.enter:s.createInside.fragment(),s.createInside)}},82515:function(e,t,i){"use strict";i.d(t,{wrapList:function(){return a}});var o=i(2748),n=i(94466),r=i(44253),s=i(77361);function a(e,t,i){let a=i.e.fire(`${s._PREFIX}BeforeWrapList`,s.REPLACE,t,e),l=null!=a?a:o.Dom.replace(t,"li",i.createInside),c=l.previousElementSibling,d=l.nextElementSibling,u=o.Dom.isTag(c,e.element)?c:null;return null!=u||(u=o.Dom.isTag(d,e.element)?d:null),o.Dom.isList(u)&&(0,n.isSameAttributes)(u,e.options.attributes)||(u=i.createInside.element(e.element),(0,r.toggleAttributes)(e,u,i,s.INITIAL),o.Dom.before(l,u)),c===u?o.Dom.append(u,l):o.Dom.prepend(u,l),o.Dom.isTag(u.nextElementSibling,e.element)&&(0,n.elementsEqualAttributes)(u,u.nextElementSibling)&&(o.Dom.append(u,Array.from(u.nextElementSibling.childNodes)),o.Dom.safeRemove(u.nextElementSibling)),i.e.fire(`${s._PREFIX}AfterWrapList`,"wrap",u,e),u}},44253:function(e,t,i){"use strict";i.d(t,{toggleAttributes:function(){return f}});var o=i(82758),n=i(2748),r=i(580),s=i(27613),a=i(3760),l=i(21496),c=i(43555),d=i(41180),u=i(86583),h=i(77361);let p="toggleAttributes";function f(e,t,i,m,g=!1){var b;if(!g&&e.isApplied(t,p))return m;g||e.setApplied(t,p);let{attributes:v}=e.options;return v&&(0,l.size)(v)>0&&Object.keys(v).forEach(e=>{var p,f;let b=v[e];switch(e){case"style":p=m,(0,c.assert)((0,s.isPlainObject)(b)&&(0,l.size)(b),"Style must be an object"),Object.keys(b).forEach(e=>{let s=(0,d.cssInline)(t,e),l=b[e];if(""!==s||null!=l){let h,f,m,b;if(null==l||""===l){s&&(g||(0,d.css)(t,e,null),p="change");return}if(h=function(e){var t;if(void 0!==(0,u.dataBind)(e,"shadowRoot"))return(0,u.dataBind)(e,"shadowRoot");let i=(0,r.getContainer)(e),s=o.globalDocument.createElement("iframe");(0,d.css)(s,{width:0,height:0,position:"absolute",border:0}),(0,c.attr)(s,"src","about:blank"),n.Dom.append(i,s);let a=null==(t=s.contentWindow)?void 0:t.document,l=a?a.body:e.od.body;return(0,u.dataBind)(e,"shadowRoot",l),l}(i),f=i.create.element("div"),(0,d.css)(f,"color",(0,d.css)(i.editor,"color")),m=i.create.element(t.tagName.toLowerCase()),(0,c.attr)(m,"style",(0,c.attr)(t,"style")),n.Dom.append(f,m),n.Dom.append(h,f),b=(0,d.css)(m,e),n.Dom.safeRemove(f),b===(0,a.normalizeCssValue)(e,l)){if(!s)return;g||(0,d.css)(t,e,null),p="unset";return}p="change",g||(0,d.css)(t,e,l)}}),m=p;break;case"className":case"class":m=function(e,t,i,o,n){var r;(0,c.assert)((0,s.isString)(t),"Class name must be a string");let a=null!=(r=t.match(/[^\t\n\f\r ]+/g))?r:[];if(!a.length)return o;let l=e.e.fire.bind(e.e,`${h._PREFIX}AfterToggleAttribute`);return a.every(e=>i.classList.contains(e))?(o="unset",n||(i.classList.remove(...a),0===i.classList.length&&(0,c.attr)(i,"class",null),l(o,i,"class",(0,c.attr)(i,"class")))):(o="change",n||(i.classList.add(...a),l(o,i,"class",t))),o}(i,b,t,m,g);break;default:let y;f=m,(0,c.assert)((0,s.isString)(b)||(0,s.isNumber)(b)||(0,s.isBoolean)(b)||null==b,"Attribute value must be a string or number or boolean or null"),y=i.e.fire.bind(i.e,`${h._PREFIX}AfterToggleAttribute`),(0,c.attr)(t,e)===(null==b?b:b+"")?(g||(0,c.attr)(t,e,null),f="unset",g||y(f,t,e,b)):(f="change",g||((0,c.attr)(t,e,b),y(f,t,e,b))),m=f}}),!g&&(null==v?void 0:v.style)?(b=m,!(0,c.attr)(t,"style")&&((0,c.attr)(t,"style",null),t.attributes.length||t.tagName.toLowerCase()!==e.defaultTag||(n.Dom.unwrap(t),b="unwrap")),b):m}},75882:function(e,t,i){"use strict";i.d(t,{unwrapChildren:function(){return a}});var o=i(2748),n=i(43555),r=i(22030),s=i(97380);function a(e,t){var i;let a,l=[],c=[],d=null==(i=e.options.attributes)?void 0:i.style,u=Object.keys(null!=d?d:{}),h={};u.forEach(e=>{h[e]=null});let p=t=>{(0,n.css)(t,h),(0,n.attr)(t,"style")||(0,n.attr)(t,"style",null),!t.attributes.length&&o.Dom.isTag(t,e.element)&&l.push(t)};for(let i of o.Dom.eachGen(t))o.Dom.isContentEditable(i,t)&&((0,s.isSuitElement)(e,i,!0)&&(!d||(0,r.hasSameStyleKeys)(i,d))?(void 0===a&&(a=!0),d?c.push(()=>p(i)):l.push(i)):d&&o.Dom.isHTMLElement(i)&&u.some(e=>""!==(0,n.css)(i,e,!0))?(void 0===a&&(a=!1),c.push(()=>p(i))):o.Dom.isEmptyTextNode(i)||void 0!==a||(a=!1));return c.forEach(e=>e()),l.forEach(o.Dom.unwrap),!!a}},6980:function(e,t,i){"use strict";i.d(t,{wrapUnwrappedText:function(){return r}});var o=i(2748),n=i(78116);function r(e,t,i){let r=i.editor,s=i.createInside,a=(e,t="previousSibling")=>{let s=e,a=e;for(;a&&!(0,n.isMarker)(a)&&!o.Dom.isTag(a,i.o.enter)&&(s=a,a=a[t]?a[t]:a.parentNode&&!o.Dom.isBlock(a.parentNode)&&a.parentNode!==r?a.parentNode:null,!o.Dom.isBlock(a)););return s},l=a(t),c=a(t,"nextSibling"),d=i.s.createRange();d.setStartBefore(l),d.setEndAfter(c);let u=d.extractContents(),h=s.element(e.element);return o.Dom.append(h,u),o.Dom.safeInsertNode(d,h),e.elementIsBlock&&o.Dom.isEmpty(h)&&!h.querySelector("br")&&o.Dom.append(h,s.element("br")),h}},19263:function(e,t,i){"use strict";i.d(t,{wrap:function(){return l}});var o=i(22732),n=i(29960),r=i(41180),s=i(82515),a=i(6980);function l(e,t,i){var l,d,u;let h=(l=e,d=t,u=i,l.elementIsBlock?o.Dom.up(d,e=>o.Dom.isBlock(e)&&!o.Dom.isTag(e,c)&&!Array.from(e.childNodes).some(e=>o.Dom.isBlock(e)),u.editor)||(0,a.wrapUnwrappedText)(l,d,u):((0,n.attr)(d,"size",null),d));if(e.elementIsList)return(0,s.wrapList)(e,h,i);let p=o.Dom.replace(h,e.element,i.createInside,!0);return e.elementIsBlock&&((0,r.css)(p,"fontSize",null),(0,r.css)(p,"fontWeight",null),(0,n.attr)(p,"style")||(0,n.attr)(p,"style",null)),p}let c=new Set(["td","th","tr","tbody","table","li","ul","ol"]);i.d(t,["WRAP_NODES",0,c])},83632:function(e,t,i){"use strict";i.d(t,{ApplyStyle:function(){return s}});var o=i(63687),n=i(77361),r=i(55307);function s(e,t){var i;let{s:s,editor:a}=e;null==(i=a.firstChild)||i.normalize();let l=s.fakes(),c=s.isCollapsed(),d=n.INITIAL;try{for(let i of s.wrapInTagGen(l)){let n={collapsed:c,mode:d,element:i,next:r.states.START,jodit:e,style:t},s=new o.FiniteStateMachine(r.states.START,r.transactions);for(;!e.isInDestruct&&s.getState()!==r.states.END;)n=s.dispatch("exec",n);d=n.mode}}finally{s.restoreFakes(l)}}},25639:function(e,t,i){"use strict";i.d(t,{CommitStyle:function(){return a}});var o=i(82758),n=i(87058),r=i(77361),s=i(83632);class a{isApplied(e,t){let i=this.__applyMap.get(e);return!!i&&!!i[t]}setApplied(e,t){var i;let o=null!=(i=this.__applyMap.get(e))?i:{};o[t]=!0,this.__applyMap.set(e,o)}get elementIsList(){return!!(this.options.element&&o.LIST_TAGS.has(this.options.element))}get element(){return this.options.element||this.defaultTag}get elementIsBlock(){return!!(this.options.element&&o.IS_BLOCK.test(this.options.element))}get isElementCommit(){return!!(this.options.element&&this.options.element!==this.options.defaultTag)}get defaultTag(){return this.options.defaultTag?this.options.defaultTag:this.elementIsBlock?"p":"span"}get elementIsDefault(){return this.element===this.defaultTag}apply(e){let{hooks:t}=this.options,i=t?Object.keys(t):[];try{i.forEach(i=>{e.e.on((0,n.camelCase)(r._PREFIX+"_"+i),t[i])}),(0,s.ApplyStyle)(e,this)}finally{i.forEach(i=>{e.e.off((0,n.camelCase)(r._PREFIX+"_"+i),t[i])}),this.__applyMap=new WeakMap}e.isInDestruct||(e.synchronizeValues(),e.e.fire("afterCommitStyle",this))}constructor(e){this.options=e,this.__applyMap=new WeakMap}}},77361:function(e,t,i){"use strict";i.d(t,["INITIAL",0,"initial","REPLACE",0,"replace","_PREFIX",0,"commitStyle"])},55307:function(e,t,i){"use strict";var o=i(82758),n=i(2748),r=i(38837),s=i(63687),a=i(77361);let l={START:"START",ELEMENT:"ELEMENT",UNWRAP:"UNWRAP",UNWRAP_CHILDREN:"UNWRAP_CHILDREN",CHANGE:"CHANGE",REPLACE_DEFAULT:"REPLACE_DEFAULT",LIST:"LIST",TOGGLE_LIST:"TOGGLE_LIST",WRAP:"WRAP",EXTRACT:"EXTRACT",END:"END"},c={[l.START]:{exec(e){let{element:t,jodit:i,style:o,mode:r,collapsed:a}=e;if(!n.Dom.isContentEditable(t,i.editor)||(0,s.isInsideInvisibleElement)(t,i.editor)||!a&&n.Dom.isEmptyContent(t))return{...e,next:l.END};let c=(0,s.getSuitParent)(o,t,i.editor)||(0,s.getSuitChild)(o,t);if(c)return{...e,next:l.ELEMENT,element:c};let d=(0,s.suitableClosest)(o,t,i.editor);return o.elementIsList&&n.Dom.isList(d)?{...e,next:l.LIST}:d?{...e,next:l.EXTRACT}:{...e,next:"unwrap"!==r?l.UNWRAP_CHILDREN:l.END}}},[l.LIST]:{exec(e){let{element:t,jodit:i,mode:r}=e;if(r!==a.INITIAL&&"unwrap"!==r&&r!==a.REPLACE)return{...e,next:l.END};let s=n.Dom.closest(t,"li",i.editor);return s&&n.Dom.closest(t,o.LIST_TAGS,i.editor)?{...e,element:s,next:l.TOGGLE_LIST}:{...e,next:l.END}}},[l.TOGGLE_LIST]:{exec:e=>({...e,mode:(0,s.toggleOrderedList)(e.style,e.element,e.jodit,e.mode),next:l.END})},[l.EXTRACT]:{exec(e){var t;let{element:i,jodit:o,style:a}=e,c=(0,s.suitableClosest)(a,i,o.editor);return((0,r.assert)(c,"This place should have an element"),!a.elementIsBlock&&(null==(t=a.options.attributes)?void 0:t.style)&&n.Dom.isBlock(c))?{...e,next:l.WRAP}:(a.elementIsBlock||(0,s.extractSelectedPart)(c,i,o),{...e,element:c,next:l.ELEMENT})}},[l.UNWRAP_CHILDREN]:{exec(e){let{element:t,style:i}=e;return(0,s.unwrapChildren)(i,t)?{...e,mode:"unwrap",next:l.END}:{...e,next:l.WRAP}}},[l.WRAP]:{exec(e){let{element:t,jodit:i,style:o}=e,n=(0,s.wrap)(o,t,i);return{...e,next:o.elementIsList?l.END:l.CHANGE,mode:"wrap",element:n}}},[l.ELEMENT]:{exec(e){let{style:t,element:i,jodit:o}=e;return(0,s.toggleAttributes)(t,i,o,a.INITIAL,!0)!==a.INITIAL?{...e,next:l.CHANGE}:n.Dom.isTag(i,t.element)?{...e,next:l.UNWRAP}:{...e,next:l.END}}},[l.CHANGE]:{exec(e){let{style:t,element:i,jodit:o,mode:r}=e,a=(0,s.toggleAttributes)(t,i,o,e.mode);return"wrap"!==r&&"unset"===a&&!i.attributes.length&&n.Dom.isTag(i,t.element)?{...e,next:l.UNWRAP}:{...e,mode:a,next:l.END}}},[l.UNWRAP]:{exec(e){let{element:t,style:i,jodit:o}=e;if(t.attributes.length&&n.Dom.isTag(t,i.element))return{...e,next:l.REPLACE_DEFAULT};let r=t.parentElement;return i.elementIsBlock&&!i.elementIsDefault&&r&&r!==o.editor&&n.Dom.isBlock(r)&&!n.Dom.isTag(r,s.WRAP_NODES)?{...e,next:l.REPLACE_DEFAULT}:(n.Dom.unwrap(t),{...e,mode:"unwrap",next:l.END})}},[l.REPLACE_DEFAULT]:{exec:e=>(n.Dom.replace(e.element,e.style.defaultTag,e.jodit.createInside,!0),{...e,mode:a.REPLACE,next:l.END})},[l.END]:{exec:e=>e}};i.d(t,["states",0,l,"transactions",0,c])},97333:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return a}});var o=i(87058),n=i(2621),r=i(65638),s=i(21162);class a{async set(e,t){let i=await this.provider;return await i.set((0,o.camelCase)(this.prefix+e),t),this}async delete(e){let t=await this.provider;return await t.delete((0,o.camelCase)(this.prefix+e)),this}async get(e){return(await this.provider).get((0,o.camelCase)(this.prefix+e))}async exists(e){return(await this.provider).exists((0,o.camelCase)(this.prefix+e))}async clear(){let e=await this.provider;return await e.clear(),this}async close(){let e=await this.provider;"close"in e&&"function"==typeof e.close&&await e.close()}static makeStorage(e=!1,t,i){let o,l=null==i?void 0:i.defaultProvider;return null!=l?new a(Promise.resolve(o="local"===l?(0,r.canUsePersistentStorage)("localStorage")?new r.LocalStorageProvider("Jodit_"+(t||"")):new s.MemoryStorageProvider:"memory"===l?new s.MemoryStorageProvider:l),t):("localStorage"===e||"sessionStorage"===e?(0,r.canUsePersistentStorage)(e)&&(o=new r.LocalStorageProvider("Jodit_"+(t||""),e)):("indexedDB"===e||!0===e)&&(o=(0,n.canUseIndexedDB)().then(e=>e?new n.IndexedDBProvider("Jodit_"+(t||""),"keyValueStore"):new s.MemoryStorageProvider)),o||(o=new s.MemoryStorageProvider),new a(Promise.resolve(o),t))}constructor(e,t){this.provider=e,this.prefix="Jodit_",t&&(this.prefix+=t)}}},2621:function(e,t,i){"use strict";i.d(t,{IndexedDBProvider:function(){return n},canUseIndexedDB:function(){return a},clearUseIndexedDBCache:function(){return s}});var o=i(82758);class n{getDB(){return this.dbPromise||(this.dbPromise=new Promise((e,t)=>{let i=indexedDB.open(this.dbName,this.DB_VERSION);i.onerror=()=>{t(i.error)},i.onsuccess=()=>{e(i.result)},i.onupgradeneeded=e=>{let t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName)}})),this.dbPromise}async performTransaction(e,t){try{let i=(await this.getDB()).transaction([this.storeName],e).objectStore(this.storeName),o=t(i);return new Promise((e,t)=>{o.onsuccess=()=>{e(o.result)},o.onerror=()=>{t(o.error)}})}catch(e){return Promise.reject(e)}}async set(e,t){try{await this.performTransaction("readwrite",i=>i.put(t,e))}catch(e){o.IS_PROD}return this}async delete(e){try{await this.performTransaction("readwrite",t=>t.delete(e))}catch(e){}return this}async get(e){try{return await this.performTransaction("readonly",t=>t.get(e))}catch(e){return}}async exists(e){try{let t=await this.performTransaction("readonly",t=>t.get(e));return void 0!==t}catch(e){return!1}}async clear(){try{await this.performTransaction("readwrite",e=>e.clear())}catch(e){}return this}async close(){if(this.dbPromise){try{(await this.dbPromise).close()}catch(e){}this.dbPromise=null}}async keys(){try{let e=await this.performTransaction("readonly",e=>e.getAllKeys());return e&&"object"==typeof e&&"then"in e&&(e=await e),e.map(e=>e+"")}catch(e){return[]}}async values(){try{let e=await this.performTransaction("readonly",e=>e.getAll());return e&&"object"==typeof e&&"then"in e&&(e=await e),e}catch(e){return[]}}async entries(){try{let[e,t]=await Promise.all([this.keys(),this.values()]);return e.map((e,i)=>[e,t[i]])}catch(e){return[]}}constructor(e="JoditDB",t="keyValueStore"){this.dbName=e,this.dbPromise=null,this.DB_VERSION=1,this.storeName=t}}let r=null;function s(){r=null}async function a(){if(null!=r)return r;try{if("u"<typeof indexedDB)return r=!1,!1;let e="___Jodit___"+Math.random().toString(),t=indexedDB.open(e);return r=await new Promise(i=>{t.onerror=()=>{i(!1)},t.onsuccess=()=>{indexedDB.deleteDatabase(e),i(!0)}})}catch(e){return r=!1,!1}}},65638:function(e,t,i){"use strict";i.d(t,{LocalStorageProvider:function(){return o}});class o{get storage(){return"sessionStorage"===this.strategy?sessionStorage:localStorage}set(e,t){try{let i=this.storage.getItem(this.rootKey),o=i?JSON.parse(i):{};o[e]=t,this.storage.setItem(this.rootKey,JSON.stringify(o))}catch(e){}return this}delete(e){try{let t=this.storage.getItem(this.rootKey);if(t){let i=JSON.parse(t);delete i[e],this.storage.setItem(this.rootKey,JSON.stringify(i))}}catch(e){}return this}get(e){try{let t=this.storage.getItem(this.rootKey),i=t?JSON.parse(t):{};return void 0!==i[e]?i[e]:void 0}catch(e){}}exists(e){return null!=this.get(e)}clear(){try{this.storage.removeItem(this.rootKey)}catch(e){}return this}constructor(e,t="localStorage"){this.rootKey=e,this.strategy=t}}i.d(t,["canUsePersistentStorage",0,(e="localStorage")=>{let t=new Map;if(t.has(e))return t.get(e);let i="___Jodit___"+Math.random().toString(),o="sessionStorage"===e?sessionStorage:localStorage;try{o.setItem(i,"1");let n="1"===o.getItem(i);return o.removeItem(i),t.set(e,n),n}catch(e){}return t.set(e,!1),!1}])},21162:function(e,t,i){"use strict";i.d(t,{MemoryStorageProvider:function(){return o}});class o{set(e,t){return this.data.set(e,t),this}delete(e){return this.data.delete(e),this}get(e){return this.data.get(e)}exists(e){return this.data.has(e)}clear(){return this.data.clear(),this}constructor(){this.data=new Map}}},12081:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return o.AsyncStorage},IndexedDBProvider:function(){return n.IndexedDBProvider},LocalStorageProvider:function(){return r.LocalStorageProvider},MemoryStorageProvider:function(){return s.MemoryStorageProvider},Storage:function(){return a.Storage},StorageKey:function(){return"Jodit_"},canUseIndexedDB:function(){return n.canUseIndexedDB},canUsePersistentStorage:function(){return r.canUsePersistentStorage},clearUseIndexedDBCache:function(){return n.clearUseIndexedDBCache}});var o=i(97333),n=i(2621),r=i(65638),s=i(21162),a=i(6700)},6700:function(e,t,i){"use strict";i.d(t,{Storage:function(){return a}});var o=i(87058),n=i(65638),r=i(21162);let s="Jodit_";class a{set(e,t){return this.provider.set((0,o.camelCase)(this.prefix+e),t),this}delete(e){return this.provider.delete((0,o.camelCase)(this.prefix+e)),this}get(e){return this.provider.get((0,o.camelCase)(this.prefix+e))}exists(e){return this.provider.exists((0,o.camelCase)(this.prefix+e))}clear(){return this.provider.clear(),this}static makeStorage(e=!1,t){let i;return"localStorage"===e||"sessionStorage"===e?(0,n.canUsePersistentStorage)(e)&&(i=new n.LocalStorageProvider(s+(t||""),e)):!0===e&&(0,n.canUsePersistentStorage)("localStorage")&&(i=new n.LocalStorageProvider(s+(t||""))),i||(i=new r.MemoryStorageProvider),new a(i,t)}constructor(e,t){this.provider=e,this.prefix=s,t&&(this.prefix+=t)}}},70231:function(e,t,i){"use strict";i.d(t,{Dlgs:function(){return a}});var o=i(580),n=i(27613),r=i(37790),s=i(638);class a{dlg(e){let t=(0,o.getPopupViewRoot)(this.o,this.container,this.od.body),i=new s.Dialog({language:this.o.language,shadowRoot:this.o.shadowRoot,popupRoot:t,ownerWindow:this.o.ownerWindow,defaultTimeout:this.o.defaultTimeout,direction:this.o.direction,theme:this.o.theme,globalFullSize:this.o.globalFullSize,...e});return(0,r.markOwner)(this,i.container),i.parent=this,i.bindDestruct(this)}confirm(e,t,i){return e=l(e,this),t=l(t,this),s.Confirm.call(this.dlg({closeOnClickOverlay:!0}),e,t,i)}prompt(e,t,i,o,n){return e=l(e,this),t=l(t,this),o=l(o,this),s.Prompt.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,o,n)}alert(e,t,i,o){return e=l(e,this),t=l(t,this),s.Alert.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,o)}}function l(e,t){return(0,n.isString)(e)&&!(0,n.isHTML)(e)&&(e=t.i18n(e)),e}},14316:function(e,t,i){"use strict";i.d(t,{Elms:function(){return n}});var o=i(2748);class n{getElm(e){let t=this.getFullElName(e);return o.Dom.first(this.container,e=>o.Dom.isHTMLElement(e)&&e.classList.contains(t))}getElms(e){let t=this.getFullElName(e),i=[];return o.Dom.each(this.container,e=>{o.Dom.isHTMLElement(e)&&e.classList.contains(t)&&i.push(e)}),i}}},34176:function(e,t,i){"use strict";i.d(t,{Mods:function(){return n}});var o=i(86068);class n{afterSetMod(e,t){}setMod(e,t,i){e=e.toLowerCase();let n=this.mods[e];if(n===t)return this;let r=`${this.componentName}_${e}_`,s=(i||this.container).classList;return null!=n&&s.remove(`${r}${n.toString().toLowerCase()}`),(0,o.isVoid)(t)||""===t||s.add(`${r}${t.toString().toLowerCase()}`),this.mods[e]=t,this.afterSetMod(e,t),this}getMod(e){var t;return null!=(t=this.mods[e])?t:null}}},10830:function(e,t,i){"use strict";i.d(t,{Button:function(){return b},UIButton:function(){return g}});var o=i(78213),n=i(33433),r=i(87325),s=i(37133),a=i(2748),l=i(23282),c=i(70799),d=i(38837),u=i(29960),h=i(48538),p=i(12153),f=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let m=()=>({size:"middle",type:"button",role:"button",name:"",value:"",variant:"initial",disabled:!1,activated:!1,icon:{name:"empty",fill:"",iconURL:"",scale:void 0},tooltip:"",text:"",tabIndex:void 0}),g=class e extends h.UIElement{className(){return"UIButton"}setState(e){return Object.assign(this.state,e),this}get text(){let e=this.getElm("text");return(0,d.assert)(e,"Text element not found"),e}get icon(){let e=this.getElm("icon");return(0,d.assert)(e,"Icon element not found"),e}onChangeSize(){this.setMod("size",this.state.size)}onChangeType(){(0,u.attr)(this.container,"type",this.state.type)}onChangeRole(){(0,u.attr)(this.container,"role",this.state.role)}updateSize(){let e=(0,r.getComponentClass)("UIList"),t=this.closest(e);if(t){this.state.size=t.buttonSize;return}}onChangeStatus(){this.setMod("variant",this.state.variant)}onChangeText(){this.text.textContent=this.jodit.i18n(this.state.text),this.updateAriaLabel()}onChangeTextSetMode(){this.setMod("text-icons",!!this.state.text.trim().length)}onChangeDisabled(){(0,u.attr)(this.container,"disabled",this.state.disabled||null)}onChangeActivated(){(0,u.attr)(this.container,"aria-pressed",this.state.activated)}onChangeName(){this.container.classList.add(`${this.componentName}_${this.clearName(this.state.name)}`),this.name=this.state.name,(0,u.attr)(this.container,"data-ref",this.state.name),(0,u.attr)(this.container,"ref",this.state.name),this.updateAriaLabel()}onChangeTooltip(){let e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;this.get("j.o.useNativeTooltip")&&(0,u.attr)(this.container,"title",e),(0,u.attr)(this.container,"aria-label",e),this.updateAriaLabel()}updateAriaLabel(){let e=this.state.text.trim().length>0,t=this.state.tooltip?this.jodit.i18n(this.state.tooltip):!e&&this.state.name?this.state.name:null;(0,u.attr)(this.container,"aria-label",t),(0,u.attr)(this.button,"aria-label",e?null:t)}onChangeTabIndex(){(0,u.attr)(this.container,"tabindex",this.state.tabIndex)}onChangeIcon(){let e=this.get("j.o.textIcons");if(!0===e||(0,l.isFunction)(e)&&e(this.state.name))return;a.Dom.detach(this.icon);let t=p.Icon.makeIcon(this.j,this.state.icon);t&&a.Dom.append(this.icon,t)}focus(){this.container.focus()}isFocused(){let{activeElement:e}=this.od;return!!(e&&a.Dom.isOrContains(this.container,e))}createContainer(){let e=this.componentName,t=this.j.c.element("button",{class:e,type:"button",role:"button",ariaPressed:!1}),i=this.j.c.span(e+"__icon"),o=this.j.c.span(e+"__text");return a.Dom.append(t,i),a.Dom.append(t,o),t}destruct(){return this.j.e.off(this),this.j.e.off(this.container),super.destruct()}onAction(e){return this.actionHandlers.push(e),this}__onActionFire(e){e.buffer={actionTrigger:this},this.actionHandlers.forEach(t=>t.call(this,e)),this.j.e.fire(this,"click",e)}constructor(e,t){super(e),this.isButton=!0,this.state=m(),this.actionHandlers=[],this.button=this.container,this.updateSize(),this.onChangeSize(),this.onChangeStatus(),t&&this.hookStatus(o.STATUSES.ready,()=>{this.setState(t)})}};function b(e,t,i,o){let n=new g(e);return n.state.tabIndex=e.o.allowTabNavigation?0:-1,(0,c.isString)(t)?(n.state.icon.name=t,n.state.name=t,o&&(n.state.variant=o),i&&(n.state.text=i)):n.setState(t),n}f([n.cache],g.prototype,"text",null),f([n.cache],g.prototype,"icon",null),f([(0,s.watch)("state.size",{immediately:!1})],g.prototype,"onChangeSize",null),f([(0,s.watch)("state.type",{immediately:!1})],g.prototype,"onChangeType",null),f([(0,s.watch)("state.role",{immediately:!1})],g.prototype,"onChangeRole",null),f([(0,s.watch)("parentElement")],g.prototype,"updateSize",null),f([(0,s.watch)("state.variant",{immediately:!1})],g.prototype,"onChangeStatus",null),f([(0,s.watch)("state.text",{immediately:!1})],g.prototype,"onChangeText",null),f([(0,s.watch)("state.text",{immediately:!1})],g.prototype,"onChangeTextSetMode",null),f([(0,s.watch)("state.disabled")],g.prototype,"onChangeDisabled",null),f([(0,s.watch)("state.activated")],g.prototype,"onChangeActivated",null),f([(0,s.watch)("state.name",{immediately:!1})],g.prototype,"onChangeName",null),f([(0,s.watch)("state.tooltip",{immediately:!1})],g.prototype,"onChangeTooltip",null),f([(0,s.watch)("state.tabIndex",{immediately:!1})],g.prototype,"onChangeTabIndex",null),f([(0,s.watch)("state.icon",{immediately:!1})],g.prototype,"onChangeIcon",null),f([n.cacheHTML],g.prototype,"createContainer",null),f([(0,s.watch)("button:click")],g.prototype,"__onActionFire",null),g=f([r.component],g),i.d(t,["UIButtonState",0,m])},71916:function(e,t,i){"use strict";i.d(t,{UIButtonGroup:function(){return l}});var o=i(87325),n=i(2748),r=i(38837),s=i(10830),a=i(62405);let l=class e extends a.UIGroup{className(){return"UIButtonGroup"}render(e){return`<div>
|
|
23
23
|
<div class="&__label">~${e.label}~</div>
|
|
24
24
|
<div class="&__options"></div>
|
|
25
25
|
</div>`}appendChildToContainer(e){let t=this.getElm("options");(0,r.assert)(null!=t,"Options does not exist"),n.Dom.append(t,e)}select(e){var t,i;this.elements.forEach((t,i)=>{i===e||t.state.value===e?t.state.activated=!0:this.options.radio&&(t.state.activated=!1)});let o=this.elements.filter(e=>e.state.activated).map(e=>({text:e.state.text,value:e.state.value}));this.jodit.e.fire(this,"select",o),null==(i=(t=this.options).onChange)||i.call(t,o)}constructor(e,t={radio:!0}){var i,o;super(e,null==(i=t.options)?void 0:i.map(t=>{let i=new s.UIButton(e,{text:t.text,value:t.value,variant:"primary"});return i.onAction(()=>{this.select(t.value)}),i}),t),this.options=t,this.select(null!=(o=t.value)?o:0)}};l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([o.component],l)},62843:function(e,t,i){"use strict";i.d(t,{Button:function(){return o.Button},UIButton:function(){return o.UIButton},UIButtonGroup:function(){return n.UIButtonGroup},UIButtonState:function(){return o.UIButtonState},UITooltip:function(){return r.UITooltip}});var o=i(10830),n=i(71916),r=i(57340)},57340:function(e,t,i){"use strict";i.d(t,{UITooltip:function(){return m}});var o,n=i(91907),r=i(65478),s=i(22732),a=i(580),l=i(35224),c=i(5700),d=i(43555),u=i(48538),h=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let p=["scroll.tooltip","joditCloseDialog","mouseleave.tooltip"],f=["escape.tooltip","change.tooltip","changePlace.tooltip","afterOpenPopup.tooltip","hidePopup.tooltip","beforePopupClose.tooltip","closeAllPopups.tooltip"],m=o=class e extends u.UIElement{className(){return"UITooltip"}render(){return'<div><div class="&__content"></div></div>'}__onAttach(e){s.Dom.append((0,a.getContainer)(this.j,o),this.container),this.__attachedContainers.add(e),this.__attachedContainers.add(this.j.container),this.j.e.on(e,"mouseenter.tooltip",this.__onMouseEnter,{capture:!0}).on(e,"mouseleave.tooltip",this.__onMouseLeave,{capture:!0}).on(this.j.container,"mouseleave.tooltip",this.__onMouseLeave,{capture:!0})}__addListenersOnEnter(){if(this.__listenClose)return;this.__listenClose=!0;let e=this.j;e.e.on(e.ow,p,this.__hide).on(f,this.__hide)}__removeListenersOnLeave(){if(!this.__listenClose)return;this.__listenClose=!1;let e=this.j;e.e.off(e.ow,p,this.__hide).off(f,this.__hide)}__onMouseLeave(e){this.__currentTarget===e.target&&(this.__hideDelay(),this.__currentTarget=null)}__onMouseEnter(e){if(!s.Dom.isHTMLElement(e.target))return;let t=(0,d.attr)(e.target,"aria-label");if(!t||(0,d.attr)(e.target,"disabled")||!e.target.className.includes("jodit"))return;this.__currentTarget=e.target;let i=e.target;this.__open(()=>{let e=(0,c.position)(i);return{x:e.left+e.width/2,y:e.top+e.height}},t)}__open(e,t){this.__addListenersOnEnter(),this.__isOpened=!0,this.j.async.clearTimeout(this.__hideTimeout),this.j.async.clearTimeout(this.__delayShowTimeout);let i=this.j.o.showTooltipDelay||this.j.defaultTimeout;i?this.__delayShowTimeout=this.j.async.setTimeout(()=>this.__show(e,t),i):this.__show(e,t)}__show(e,t){this.setMod("visible",!0),this.setMod("above",!1),this.getElm("content").innerHTML=t;let i=e(),o=(0,l.getFixedPositionOffset)(this.container);(0,d.css)(this.container,{left:i.x-o.x,top:i.y-o.y});let n=(0,c.position)(this.container),r=this.j.ow.innerHeight;if(n.top+n.height>r){let e=(0,c.position)(this.__currentTarget);this.setMod("above",!0),(0,d.css)(this.container,{top:e.top-n.height-o.y})}}__hide(){this.j.async.clearTimeout(this.__delayShowTimeout),this.j.async.clearTimeout(this.__hideTimeout),this.__removeListenersOnLeave(),this.__isOpened&&(this.__isOpened=!1,this.setMod("visible",!1),s.Dom.detach(this.getElm("content")),(0,d.css)(this.container,{left:-5e3}))}__hideDelay(){this.j.async.clearTimeout(this.__delayShowTimeout),this.j.async.clearTimeout(this.__hideTimeout),this.__isOpened&&(this.__hideTimeout=this.async.setTimeout(this.__hide,this.j.defaultTimeout))}destruct(){this.__attachedContainers.forEach(e=>{this.j.e.off(e,"mouseenter.tooltip",this.__onMouseEnter).off(e,"mouseleave.tooltip",this.__onMouseLeave)}),this.__hide(),super.destruct()}constructor(e){super(e),this.__isOpened=!1,this.__attachedContainers=new Set,this.__listenClose=!1,this.__currentTarget=null,this.__delayShowTimeout=0,this.__hideTimeout=0,e.o.textIcons||!e.o.showTooltip||e.o.useNativeTooltip||(this.j.e.on("getContainer",e=>{this.__onAttach(e)}),e.hookStatus(n.STATUSES.ready,()=>{this.__onAttach(this.j.container)}))}};h([r.autobind],m.prototype,"__onMouseLeave",null),h([r.autobind],m.prototype,"__onMouseEnter",null),h([r.autobind],m.prototype,"__hide",null),h([r.autobind],m.prototype,"__hideDelay",null),m=o=h([r.component],m)},48538:function(e,t,i){"use strict";i.d(t,{UIElement:function(){return h}});var o,n=i(91907),r=i(55153),s=i(2748),a=i(70799),l=i(29960),c=i(14316),d=i(34176),u=i(12153);let h=o=class e extends n.ViewComponent{getRole(){var e;return(null==(e=this.options)?void 0:e.role)||""}get parentElement(){return this.__parentElement}set parentElement(e){this.__parentElement=e,e&&e.hookStatus("beforeDestruct",()=>this.destruct()),this.updateParentElement(this)}bubble(e){let t=this.parentElement;for(;t;)e(t),t=t.parentElement;return this}updateParentElement(e){var t;return null==(t=this.__parentElement)||t.updateParentElement(e),this}get(e,t){return super.get(e,t)||this.getElm(e)}closest(e){let t="object"==typeof e?t=>t===e:t=>n.Component.isInstanceOf(t,e),i=this.__parentElement;for(;i;){if(t(i))return i;i=!i.parentElement&&i.container.parentElement?o.closestElement(i.container.parentElement,o):i.parentElement}return null}static closestElement(e,t){let i=s.Dom.up(e,e=>{if(e){let{component:i}=e;return i&&n.Component.isInstanceOf(i,t)}return!1});return i?null==i?void 0:i.component:null}update(){}appendTo(e){return s.Dom.append(e,this.container),this}clearName(e){return e.replace(/[^a-zA-Z0-9]/g,"_")}render(e){return this.j.c.div(this.componentName)}createContainer(e){let t=this.render(e);if((0,a.isString)(t)){let e=this.parseTemplate(t);return e.classList.add(this.componentName),e}return t}parseTemplate(e){return this.j.c.fromHTML(e.replace(/\*([^*]+?)\*/g,(e,t)=>u.Icon.get(t)||"").replace(/&_/g,this.componentName+"_").replace(/~([^~]+?)~/g,(e,t)=>this.i18n(t)))}destruct(){return s.Dom.safeRemove(this.container),this.parentElement=null,super.destruct()}constructor(e,t){super(e),this.name="",this.__parentElement=null,this.mods={},this.options=t,this.container=this.createContainer(t);let i=this.getRole();i&&(0,l.attr)(this.container,"role",i),Object.defineProperty(this.container,"component",{value:this,configurable:!0})}};h=o=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(0,r.derive)(d.Mods,c.Elms)],h)},19070:function(e,t,i){"use strict";i.d(t,{UIBlock:function(){return s}});var o=i(87325),n=i(43555),r=i(62405);let s=class e extends r.UIGroup{className(){return"UIBlock"}constructor(e,t,i={align:"left"}){super(e,t),this.options=i,this.setMod("align",this.options.align||"left"),this.setMod("width",this.options.width||""),this.options.mod&&this.setMod(this.options.mod,!0),this.options.className&&this.container.classList.add(this.options.className),(0,n.attr)(this.container,"data-ref",i.ref),(0,n.attr)(this.container,"ref",i.ref)}};s=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([o.component],s)},86327:function(e,t,i){"use strict";i.d(t,{UIForm:function(){return c}});var o=i(4012),n=i(87325),r=i(43555),s=i(80256),a=i(12234),l=i(62405);let c=class e extends l.UIGroup{className(){return"UIForm"}submit(){this.j.e.fire(this.container,"submit")}validate(){for(let e of this.allChildren.filter(e=>o.Component.isInstanceOf(e,s.UIInput)))if(!e.validate())return!1;for(let e of this.allChildren.filter(e=>o.Component.isInstanceOf(e,a.UISelect)))if(!e.validate())return!1;return!0}onSubmit(e){return this.j.e.on(this.container,"submit",()=>{let t=this.allChildren.filter(e=>o.Component.isInstanceOf(e,s.UIInput));return!!this.validate()&&(e(t.reduce((e,t)=>(e[t.state.name]=t.value,e),{})),!1)}),this}createContainer(){let e=this.j.c.element("form");return e.classList.add(this.componentName),(0,r.attr)(e,"dir",this.j.o.direction||"auto"),(0,r.attr)(e,"novalidate",""),e}constructor(...e){var t,i;super(...e),(null==(t=this.options)?void 0:t.className)&&this.container.classList.add(null==(i=this.options)?void 0:i.className)}};c=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([n.component],c)},2525:function(e,t,i){"use strict";i.d(t,{UIBlock:function(){return o.UIBlock},UICheckbox:function(){return r.UICheckbox},UIFileInput:function(){return r.UIFileInput},UIForm:function(){return n.UIForm},UIInput:function(){return r.UIInput},UISelect:function(){return r.UISelect},UITextArea:function(){return r.UITextArea}});var o=i(19070),n=i(86327),r=i(8959)},85120:function(e,t,i){"use strict";i.d(t,{UITextArea:function(){return c}});var o,n=i(65478),r=i(87325),s=i(41180),a=i(80256),l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let c=o=class e extends a.UIInput{className(){return"UITextArea"}createNativeInput(e){return this.j.create.element("textarea")}onChangeStateSize(){let{size:e,resizable:t}=this.state;(0,s.css)(this.nativeInput,"resize",t?"auto":"none"),this.nativeInput.rows=null!=e?e:5}constructor(e,t){super(e,t),this.state={...o.defaultState},Object.assign(this.state,t),!1===this.state.resizable&&(0,s.css)(this.nativeInput,"resize","none")}};c.defaultState={...a.UIInput.defaultState,size:5,resizable:!0},l([(0,n.watch)(["state.size","state.resizable"])],c.prototype,"onChangeStateSize",null),c=o=l([r.component],c)},17328:function(e,t,i){"use strict";i.d(t,{UICheckbox:function(){return l}});var o,n=i(65478),r=i(2748),s=i(80256),a=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let l=o=class e extends s.UIInput{className(){return"UICheckbox"}render(){return this.j.c.element("label",{className:this.componentName})}onChangeChecked(){this.value=this.state.checked.toString(),this.nativeInput.checked=this.state.checked,this.setMod("checked",this.state.checked)}onChangeNativeCheckBox(){this.state.checked=this.nativeInput.checked}onChangeSwitch(){this.setMod("switch",this.state.switch);let e=this.getElm("switch-slider");this.state.switch?(e||(e=this.j.c.div(this.getFullElName("switch-slider"))),r.Dom.after(this.nativeInput,e)):r.Dom.safeRemove(e)}constructor(e,t){super(e,{...t,type:"checkbox"}),this.state={...o.defaultState},Object.assign(this.state,t)}};l.defaultState={...s.UIInput.defaultState,checked:!1,switch:!1},a([(0,n.watch)("state.checked"),(0,n.hook)("ready")],l.prototype,"onChangeChecked",null),a([(0,n.watch)("nativeInput:change")],l.prototype,"onChangeNativeCheckBox",null),a([(0,n.watch)("state.switch"),(0,n.hook)("ready")],l.prototype,"onChangeSwitch",null),l=o=a([n.component],l)},4242:function(e,t,i){"use strict";i.d(t,{UIFileInput:function(){return a}});var o=i(87325),n=i(2748),r=i(10830),s=i(80256);let a=class e extends s.UIInput{className(){return"UIFileInput"}createContainer(e){this.button=new r.UIButton(this.j,{tooltip:e.tooltip,icon:{name:"plus"}});let{container:t}=this.button;this.nativeInput||(this.nativeInput=this.createNativeInput(e));let{nativeInput:i}=this;return i.classList.add(this.getFullElName("input")),t.classList.add(this.componentName),n.Dom.append(t,i),t}createNativeInput(e){return this.j.create.fromHTML(`<input
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
loading="lazy"
|
|
63
63
|
/>
|
|
64
64
|
${r||s||a?c:""}
|
|
65
|
-
</a>`},ajax:{...a.Config.prototype.defaultAjaxOptions,url:"",data:{},cache:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",method:"POST",processData:!0,headers:{},prepareData:e=>e,process:e=>e},create:{data:{action:"folderCreate"}},getLocalFileByUrl:{data:{action:"getLocalFileByUrl"}},resize:{data:{action:"imageResize"}},crop:{data:{action:"imageCrop"}},fileMove:{data:{action:"fileMove"}},folderMove:{data:{action:"folderMove"}},fileRename:{data:{action:"fileRename"}},folderRename:{data:{action:"folderRename"}},fileRemove:{data:{action:"fileRemove"}},folderRemove:{data:{action:"folderRemove"}},items:{data:{action:"files"}},folder:{data:{action:"folders"}},permissions:{data:{action:"permissions"}}},a.Config.prototype.controls.filebrowser={upload:{icon:"plus",tooltip:"Upload file",isInput:!0,isDisabled:e=>!e.dataProvider.canI("FileUpload"),getContent(e,t){let i=new s.UIFileInput(e,{tooltip:t.control.tooltip,onlyImages:e.state.onlyImages});return e.e.fire("bindUploader.filebrowser",i.container),i.container}},remove:{icon:"bin",tooltip:"Remove file",isDisabled:e=>!e.state.activeElements.length||!e.dataProvider.canI("FileRemove"),exec(e){e.e.fire("fileRemove.filebrowser")}},update:{tooltip:"Update file list",exec(e){e.e.fire("update.filebrowser")}},select:{tooltip:"Select file",icon:"check",isDisabled:e=>!e.state.activeElements.length,exec(e){e.e.fire("select.filebrowser")}},edit:{tooltip:"Edit image",icon:"pencil",isDisabled(e){let t=e.state.activeElements;return 1!==t.length||!t[0].isImage||!(e.dataProvider.canI("ImageCrop")||e.dataProvider.canI("ImageResize"))},exec(e){e.e.fire("edit.filebrowser")}},tiles:{tooltip:"Tiles view",icon:"th",isActive:e=>"tiles"===e.state.view,exec(e){e.e.fire("view.filebrowser","tiles")}},list:{tooltip:"List view",icon:"th-list",isActive:e=>"list"===e.state.view,exec(e){e.e.fire("view.filebrowser","list")}},filter:{isInput:!0,getContent(e,t){let i=o.Dom.first(t.container,e=>o.Dom.isHTMLElement(e)&&e.classList.contains("jodit-input"));if(i)return i;let n=e.c.element("input",{class:"jodit-input",placeholder:e.i18n("Filter")});return n.value=e.state.filterWord,e.e.on(n,"keydown mousedown",e.async.debounce(()=>{e.e.fire("filter.filebrowser",n.value)},e.defaultTimeout)),n}},sort:{isInput:!0,getContent(e){let t=e.c.fromHTML(`<select class="jodit-input jodit-select"><option value="changed-asc">${e.i18n("Sort by changed")} (↑)</option><option value="changed-desc">${e.i18n("Sort by changed")} (↓)</option><option value="name-asc">${e.i18n("Sort by name")} (↑)</option><option value="name-desc">${e.i18n("Sort by name")} (↓)</option><option value="size-asc">${e.i18n("Sort by size")} (↑)</option><option value="size-desc">${e.i18n("Sort by size")} (↓)</option></select>`);return t.value=e.state.sortBy,e.e.on("sort.filebrowser",e=>{t.value!==e&&(t.value=e)}).on(t,"change",()=>{e.e.fire("sort.filebrowser",t.value)}),t}}}},11787:function(e,t,i){"use strict";i.d(t,{default:function(){return v}});var o=i(82758),n=i(45219),r=i(68345),s=i(23282),a=i(72430),l=i(70091),c=i(68934),d=i(89890),u=i(3703),h=i(54079),p=i(159),f=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let m=new Set(["allowFiles","allowFileMove","allowFileUpload","allowFileUploadRemote","allowFileRemove","allowFileRename","allowFolders","allowFolderMove","allowFolderCreate","allowFolderRemove","allowFolderRename","allowImageResize","allowImageCrop"]);function g(e,t,i){let o=e=>{throw Error(`File browser: the connector answer for action "${t}" (option "filebrowser.${i}") ${e}. See https://xdsoft.net/jodit/docs/modules/file_browser.html`)};if(!(0,a.isPlainObject)(e)||!(0,a.isPlainObject)(e.data))return o('has no "data" object');let{sources:n}=e.data;return(0,r.isArray)(n)?(n.forEach((e,t)=>{if(!(0,a.isPlainObject)(e))return o(`has a non-object entry at "data.sources[${t}]"`);(0,r.isArray)(e.files)||(e.files=[]),(0,r.isArray)(e.folders)||(e.folders=[])}),e):o(void 0===n?'has no "data.sources" array':'must contain "data.sources" as an array of sources, got '+((0,a.isPlainObject)(n)?"an object keyed by source name":typeof n))}let b=new Set(["items","folder","permissions","getLocalFileByUrl"]);class v{get o(){return this.options}get(e){let t=this.__ajaxInstances,i=b.has(e),o=i?e:`${e}#${++this.__requestSerial}`;if(i&&t.has(o)){let e=t.get(o);null==e||e.abort(),t.delete(o)}let n=(0,c.ConfigProto)(void 0!==this.options[e]?this.options[e]:{},(0,c.ConfigProto)({onProgress:this.progressHandler},this.o.ajax));n.prepareData&&(n.data=n.prepareData.call(this,n.data));let r=new h.Ajax(n);t.set(o,r);let s=r.send();return s.finally(()=>{r.destruct(),t.delete(o),this.progressHandler(100)}).catch(()=>null),s.then(e=>e.json()).then(e=>{if(e&&!this.isSuccess(e))throw Error(this.getMessage(e));return e})}onProgress(e){this.progressHandler=e}async permissions(e,t){return this.o.permissions&&(this.o.permissions.data.path=e,this.o.permissions.data.source=t,this.o.permissions.url)?this.get("permissions").then(e=>{var t;if(this.parent.isInDestruct)throw(0,d.abort)();let i=this.o.permissions.process;if(i||(i=this.o.ajax.process),i){let o=i.call(self,e);(null==(t=null==o?void 0:o.data)?void 0:t.permissions)&&(this.parent.events.fire(this,"changePermissions",this.__currentPermissions,o.data.permissions),this.__currentPermissions=o.data.permissions)}return this.__currentPermissions}):null}canI(e){let t="allow"+e;if(!o.IS_PROD&&!m.has(t))throw(0,d.error)("Wrong action "+e);let i=this.o.permissionsPresets[t];return void 0!==i?i:null==this.__currentPermissions||void 0===this.__currentPermissions[t]||this.__currentPermissions[t]}__items(e,t,i,o){let n=this.options;return n.items?(n.items.data.path=e,n.items.data.source=t,n.items.data.mods=i,this.get("items").then(e=>{let t=this.o.items.process;return t||(t=this.o.ajax.process),t&&(e=t.call(self,e)),o(g(e,"files","items"))})):Promise.reject(Error("Set Items api options"))}items(e,t,i={}){return this.__items(e,t,i,e=>this.__generateItemsList(e.data.sources,i))}itemsEx(e,t,i={}){return this.__items(e,t,i,e=>({items:this.__generateItemsList(e.data.sources,i),loadedTotal:e.data.sources.reduce((e,t)=>e+t.files.length,0)}))}__generateItemsList(e,t={}){let i=[],o=e=>{var i;return!(null==(i=t.filterWord)?void 0:i.length)||void 0===this.o.filter||this.o.filter(e,t.filterWord)};return e.forEach(e=>{if(e.files&&e.files.length){let{sort:n}=this.o;(0,s.isFunction)(n)&&t.sortBy&&e.files.sort((e,i)=>n(e,i,t.sortBy)),e.files.forEach(n=>{o(n)&&("folder"===n.type||!t.onlyImages||void 0===n.isImage||n.isImage)&&i.push(p.FileBrowserItem.create({...n,sourceName:e.name,source:e}))})}}),i}async tree(e,t){return(e=(0,l.normalizeRelativePath)(e),this.o.folder)?(await this.permissions(e,t),this.o.folder.data.path=e,this.o.folder.data.source=t,this.get("folder").then(e=>{let t=this.o.folder.process;return t||(t=this.o.ajax.process),t&&(e=t.call(self,e)),g(e,"folders","folder").data.sources})):Promise.reject(Error("Set Folder Api options"))}getPathByUrl(e){return(0,u.set)("options.getLocalFileByUrl.data.url",e,this),this.get("getLocalFileByUrl").then(e=>{if(this.isSuccess(e))return e.data;throw(0,d.error)(this.getMessage(e))})}createFolder(e,t,i){let{create:o}=this.o;if(!o)throw(0,d.error)("Set Create api options");return o.data.source=i,o.data.path=t,o.data.name=e,this.get("create").then(e=>{if(this.isSuccess(e))return!0;throw(0,d.error)(this.getMessage(e))})}move(e,t,i,o){let n=o?"fileMove":"folderMove",r=this.options[n];if(!r)throw(0,d.error)("Set Move api options");return r.data.from=e,r.data.path=t,r.data.source=i,this.get(n).then(e=>{if(this.isSuccess(e))return!0;throw(0,d.error)(this.getMessage(e))})}__remove(e,t,i,o){let n=this.o[e];if(!n)throw(0,d.error)(`Set "${e}" api options`);return n.data.path=t,n.data.name=i,n.data.source=o,this.get(e).then(e=>(n.process&&(e=n.process.call(this,e)),this.getMessage(e)))}fileRemove(e,t,i){return this.__remove("fileRemove",e,t,i)}folderRemove(e,t,i){return this.__remove("folderRemove",e,t,i)}__rename(e,t,i,o,n){let r=this.o[e];if(!r)throw(0,d.error)(`Set "${e}" api options`);return r.data.path=t,r.data.name=i,r.data.newname=o,r.data.source=n,this.get(e).then(e=>(r.process&&(e=r.process.call(self,e)),this.getMessage(e)))}folderRename(e,t,i,o){return this.__rename("folderRename",e,t,i,o)}fileRename(e,t,i,o){return this.__rename("fileRename",e,t,i,o)}__changeImage(e,t,i,o,n,r){this.o[e]||(this.o[e]={data:{}});let s=this.o[e];return void 0===s.data&&(s.data={action:e}),s.data.newname=n||o,r&&(s.data.box=r),s.data.path=t,s.data.name=o,s.data.source=i,this.get(e).then(e=>e.data.newPath||!0)}crop(e,t,i,o,n){return this.__changeImage("crop",e,t,i,o,n)}resize(e,t,i,o,n){return this.__changeImage("resize",e,t,i,o,n)}getMessage(e){return this.options.getMessage(e)}isSuccess(e){return this.options.isSuccess(e)}destruct(){this.__ajaxInstances.forEach(e=>e.destruct()),this.__ajaxInstances.clear()}constructor(e,t){this.parent=e,this.options=t,this.__currentPermissions=null,this.__ajaxInstances=new Map,this.__requestSerial=0,this.progressHandler=e=>{}}}f([n.autobind],v.prototype,"onProgress",null),f([n.autobind],v.prototype,"permissions",null),f([n.autobind],v.prototype,"canI",null),f([n.autobind],v.prototype,"items",null),f([n.autobind],v.prototype,"itemsEx",null),f([n.autobind],v.prototype,"tree",null),f([n.autobind],v.prototype,"getPathByUrl",null),f([n.autobind],v.prototype,"createFolder",null),f([n.autobind],v.prototype,"move",null),f([n.autobind],v.prototype,"fileRemove",null),f([n.autobind],v.prototype,"folderRemove",null),f([n.autobind],v.prototype,"folderRename",null),f([n.autobind],v.prototype,"fileRename",null),f([n.autobind],v.prototype,"crop",null),f([n.autobind],v.prototype,"resize",null),f([n.autobind],v.prototype,"getMessage",null),f([n.autobind],v.prototype,"isSuccess",null),f([n.autobind],v.prototype,"destruct",null),i.d(t,["DEFAULT_SOURCE_NAME",0,"default"])},63399:function(e,t,i){"use strict";i.d(t,{makeContextMenu:function(){return s},makeDataProvider:function(){return r}});var o=i(80870),n=i(11787);function r(e,t){return new n.default(e,t)}function s(e){return new o.ContextMenu(e)}},44450:function(e,t,i){"use strict";function o(e,t,i){return e.dataProvider.fileRemove(e.state.currentPath,t,i).then(i=>{e.status(i||e.i18n('File "%s" was deleted',t),!0)}).catch(e.status)}i.d(t,{deleteFile:function(){return o}})},30465:function(e,t,i){"use strict";function o(e){return e.files.setMod("active",!0),e.files.setMod("loading",!0),e.dataProvider.items(e.state.currentPath,e.state.currentSource,{sortBy:e.state.sortBy,onlyImages:e.state.onlyImages,filterWord:e.state.filterWord}).then(t=>{t&&(e.state.elements=t,e.state.activeElements=[])}).catch(e.status).finally(()=>e.files.setMod("loading",!1))}i.d(t,{loadItems:function(){return o}})},20201:function(e,t,i){"use strict";i.d(t,{loadTree:function(){return r}});var o=i(22732),n=i(30465);async function r(e){e.tree.setMod("active",!0),o.Dom.detach(e.tree.container);let t=(0,n.loadItems)(e);return e.o.showFoldersPanel?(e.tree.setMod("loading",!0),Promise.all([e.dataProvider.tree(e.state.currentPath,e.state.currentSource).then(t=>{e.state.sources=t}).catch(e.status).finally(()=>e.tree.setMod("loading",!1)),t])):(e.tree.setMod("active",!1),t)}},75330:function(e,t,i){"use strict";i.d(t,{FileBrowser:function(){return S}});var o=i(91907),n=i(82758),r=i(65478),s=i(37133),a=i(2748),l=i(3827),c=i(21537),d=i(41180),u=i(12081),h=i(70231),p=i(84075),f=i(6441);i(61251);var m=i(30465),g=i(20201),b=i(73948),v=i(33281),y=i(94538),w=i(11787),_=i(63399),k=i(8172),C=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let S=class e extends p.ViewWithToolbar{className(){return"FileBrowser"}get dataProvider(){return(0,_.makeDataProvider)(this,this.options)}onSelect(e){return()=>{if(this.state.activeElements.length){let t=[],i=[];this.state.activeElements.forEach(e=>{let o=e.fileURL;o&&(t.push(o),i.push(e.isImage||!1))}),this.close(),(0,c.isFunction)(e)&&e({baseurl:"",files:t,isImages:i}),this.close()}return!1}}get _dialog(){var e;let t=this.dlg({minWidth:Math.min(700,screen.width),minHeight:300,buttons:null!=(e=this.o.headerButtons)?e:["fullsize","dialog.close"]});return["beforeClose","afterClose","beforeOpen"].forEach(e=>t.events.on(t,e,()=>this.e.fire(e))),t.setSize(this.o.width,this.o.height),t}get storage(){return u.Storage.makeStorage(!!this.o.saveStateInStorage,this.componentName)}get isOpened(){return this._dialog.isOpened&&"none"!==(0,d.cssInline)(this.browser,"display")}status(e,t){!e||(0,c.isAbortError)(e)||((0,c.isString)(e)||(e=e.message),(0,c.isString)(e)&&(0,c.trim)(e).length&&this.message.message(e,t?"success":"error",this.o.howLongShowMsg))}open(e=this.o.defaultCallback,t=!1){return this.state.onlyImages=t,this.async.promise((t,i)=>{var o;if(!this.o.items||!this.o.items.url)throw(0,c.error)("Need set options.filebrowser.ajax.url");let r=0;this.e.off(this.files.container,"dblclick").on(this.files.container,"dblclick",this.onSelect(e)).on(this.files.container,"touchstart",()=>{let t=new Date().getTime();t-r<n.EMULATE_DBLCLICK_TIMEOUT&&this.onSelect(e)(),r=t}).off("select.filebrowser").on("select.filebrowser",this.onSelect(e));let s=this.c.div();null==(o=this.toolbar)||o.appendTo(s),this.__updateToolbarButtons(),this._dialog.open(this.browser,s),this.e.fire("sort.filebrowser",this.state.sortBy),(0,g.loadTree)(this).then(t,i).finally(()=>{var e;this.isInDestruct||null==(e=this===null||void 0===this?void 0:this.e)||e.fire("fileBrowserReady.filebrowser")})}).catch(e=>{if(!(0,c.isAbortError)(e)&&!n.IS_PROD)throw e})}__getButtons(){var e;return(null!=(e=this.o.buttons)?e:[]).filter(e=>{if(!(0,c.isString)(e))return!0;switch(e){case"filebrowser.upload":return this.dataProvider.canI("FileUpload");case"filebrowser.edit":return this.dataProvider.canI("ImageResize")||this.dataProvider.canI("ImageCrop");case"filebrowser.remove":return this.dataProvider.canI("FileRemove")}return!0})}initUploader(e){var t;let i=this,o=null==(t=null==e?void 0:e.options)?void 0:t.uploader,n=(0,c.ConfigProto)(o||{},f.Config.defaultOptions.uploader),r=()=>(0,m.loadItems)(this);i.uploader=i.getInstance("Uploader",n),i.uploader.setPath(i.state.currentPath).setSource(i.state.currentSource).bind(i.browser,r,i.errorHandler),this.state.on(["change.currentPath","change.currentSource"],()=>{this.uploader.setPath(this.state.currentPath).setSource(this.state.currentSource)}),i.e.on("bindUploader.filebrowser",e=>{i.uploader.bind(e,r,i.errorHandler)})}destruct(){var e;!this.isInDestruct&&(null==(e=(0,r.cached)(this,"_dialog"))||e.destruct(),super.destruct(),this.events&&this.e.off(".filebrowser"),this.uploader&&this.uploader.destruct())}__updateToolbarButtons(){var e;let t=this.__getButtons();!function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}(this.__prevButtons,t)&&(this.__prevButtons=t,null==(e=this.toolbar)||e.build(t))}constructor(e){super(e),this.browser=this.c.div(this.componentName),this.status_line=this.c.div(this.getFullElName("status")),this.tree=new k.FileBrowserTree(this),this.files=new k.FileBrowserFiles(this),this.state=(0,l.observable)({currentPath:"",currentSource:w.DEFAULT_SOURCE_NAME,currentBaseUrl:"",activeElements:[],elements:[],sources:[],view:"tiles",sortBy:"changed-desc",filterWord:"",onlyImages:!1}),this.errorHandler=e=>{(0,c.isAbortError)(e)||(e instanceof Error?this.status(this.i18n(e.message)):this.status(this.dataProvider.getMessage(e)))},this.close=()=>{this._dialog.close()},this.__prevButtons=[],this.attachEvents(e),this.options=(0,c.ConfigProto)(e||{},f.Config.defaultOptions.filebrowser),this.browser.component=this,this.container=this.browser,this.o.showFoldersPanel&&a.Dom.append(this.browser,this.tree.container),a.Dom.append(this.browser,this.files.container),a.Dom.append(this.browser,this.status_line),v.selfListeners.call(this),b.nativeListeners.call(this),y.stateListeners.call(this),["getLocalFileByUrl","crop","resize","create","fileMove","folderMove","fileRename","folderRename","fileRemove","folderRemove","folder","items","permissions"].forEach(e=>{null!=this.options[e]&&(this.options[e]=(0,c.ConfigProto)(this.options[e],this.o.ajax))});let{storeView:t,storeSortBy:i,storeLastOpenedFolder:n}=this.o.saveStateInStorage||{storeLastOpenedFolder:!1,storeView:!1,storeSortBy:!1},r=t&&this.storage.get("view");r&&null==this.o.view?this.state.view="list"===r?"list":"tiles":this.state.view="list"===this.o.view?"list":"tiles",this.files.setMod("view",this.state.view);let s=i&&this.storage.get("sortBy");if(s){let e=s.split("-");this.state.sortBy=["changed","name","size"].includes(e[0])?s:"changed-desc"}else this.state.sortBy=this.o.sortBy||"changed-desc";if(n){let e=this.storage.get("currentPath"),t=this.storage.get("currentSource");this.state.currentPath=null!=e?e:"",this.state.currentSource=null!=t?t:""}this.initUploader(this),this.setStatus(o.STATUSES.ready)}};C([r.cache],S.prototype,"dataProvider",null),C([r.cache],S.prototype,"_dialog",null),C([r.cache],S.prototype,"storage",null),C([r.autobind],S.prototype,"status",null),C([r.autobind],S.prototype,"open",null),C([(0,s.watch)("dataProvider:changePermissions")],S.prototype,"__updateToolbarButtons",null),S=C([(0,r.derive)(h.Dlgs)],S)},78513:function(e,t,i){"use strict";i.d(t,{FileBrowser:function(){return o.FileBrowser}});var o=i(75330)},73948:function(e,t,i){"use strict";i.d(t,{nativeListeners:function(){return c}});var o=i(29960),n=i(15456),r=i(41457),s=i(32118),a=i(21735),l=i(20201);function c(){let e=!1,t=(0,s.elementsMap)(this),i=this;i.e.on(i.tree.container,"dragstart",t=>{let o=(0,a.getItem)(t.target,i.container);o&&i.o.moveFolder&&(e=o)}).on(i.tree.container,"drop",t=>{if((i.o.moveFile||i.o.moveFolder)&&e){let n=(0,o.attr)(e,"-path")||"";if(!i.o.moveFolder&&e.classList.contains(this.tree.getFullElName("item"))||e.classList.contains(this.files.getFullElName("item"))&&(n+=(0,o.attr)(e,"-name"),!i.o.moveFile))return!1;let r=(0,a.getItem)(t.target,i.container);r&&(i.dataProvider.move(n,(0,o.attr)(r,"-path")||"",(0,o.attr)(r,"-source")||"",e.classList.contains(this.files.getFullElName("item"))).then(()=>(0,l.loadTree)(this)).catch(i.status),e=!1)}}).on(i.files.container,"contextmenu",(0,r.default)(i)).on(i.files.container,"click",e=>{(0,n.ctrlKey)(e)||(this.state.activeElements=[])}).on(i.files.container,"click",e=>{let o=(0,a.getItem)(e.target,i.container);if(!o)return;let r=(0,a.elementToItem)(o,t);if(r)return(0,n.ctrlKey)(e)?i.state.activeElements=[...i.state.activeElements,r]:i.state.activeElements=[r],e.stopPropagation(),!1}).on(i.files.container,"dragstart",t=>{if(i.o.moveFile){let o=(0,a.getItem)(t.target,i.container);o&&(e=o)}}).on(i.container,"drop",e=>e.preventDefault())}},33281:function(e,t,i){"use strict";i.d(t,{selfListeners:function(){return d}});var o=i(21537),n=i(27613),r=i(11787),s=i(44450),a=i(30465),l=i(20201),c=i(50050);function d(){let e=this.state,t=this.dataProvider,i=this;i.e.on("view.filebrowser",t=>{t!==e.view&&(e.view=t)}).on("sort.filebrowser",t=>{t!==e.sortBy&&(e.sortBy=t,(0,a.loadItems)(i))}).on("filter.filebrowser",t=>{t!==e.filterWord&&(e.filterWord=t,(0,a.loadItems)(i))}).on("openFolder.filebrowser",e=>{let t;t=".."===e.name?e.path.split("/").filter(e=>e.length).slice(0,-1).join("/"):(0,o.normalizePath)(e.path,e.name),i.state.currentPath=t,i.state.currentSource="."===e.name?r.DEFAULT_SOURCE_NAME:e.source}).on("removeFolder.filebrowser",e=>{i.confirm("Are you sure?","Delete",o=>{o&&t.folderRemove(e.path,e.name,e.source).then(e=>(i.status(e,!0),(0,l.loadTree)(i))).catch(i.status)})}).on("renameFolder.filebrowser",e=>{i.prompt("Enter new name","Rename",o=>{if(!(0,n.isValidName)(o))return i.status(i.i18n("Enter new name")),!1;t.folderRename(e.path,e.name,o,e.source).then(e=>(i.state.activeElements=[],i.status(e,!0),(0,l.loadTree)(i))).catch(i.status)},"type name",e.name)}).on("addFolder.filebrowser",e=>{i.prompt("Enter Directory name","Create directory",o=>{t.createFolder(o,e.path,e.source).then(()=>(0,l.loadTree)(i)).catch(i.status)},"type dir name")}).on("fileRemove.filebrowser",()=>{i.state.activeElements.length&&i.confirm("Are you sure?","",e=>{if(e){let e=[];i.state.activeElements.forEach(t=>{e.push((0,s.deleteFile)(i,t.file||t.name||"",t.sourceName))}),i.state.activeElements=[],Promise.all(e).then(()=>(0,l.loadTree)(i).catch(i.status),i.status)}})}).on("edit.filebrowser",()=>{if(1===i.state.activeElements.length){let[e]=this.state.activeElements;c.openImageEditor.call(i,e.fileURL,e.file||"",e.path,e.sourceName)}}).on("fileRename.filebrowser",(e,o,r)=>{1===i.state.activeElements.length&&i.prompt("Enter new name","Rename",s=>{if(!(0,n.isValidName)(s))return i.status(i.i18n("Enter new name")),!1;t.fileRename(o,e,s,r).then(e=>{i.state.activeElements=[],i.status(e,!0),(0,a.loadItems)(i)}).catch(i.status)},"type name",e)}).on("update.filebrowser",()=>{(0,l.loadTree)(this).then(this.status,this.status)})}},94538:function(e,t,i){"use strict";i.d(t,{stateListeners:function(){return l}});var o=i(22732),n=i(71521),r=i(10830),s=i(32118),a=i(20201);function l(){let e=(0,s.elementsMap)(this),{state:t,files:i,create:l,options:c}=this,d=t=>{let i=t.uniqueHashKey;if(e[i])return e[i].elm;let o=l.fromHTML(c.getThumbTemplate.call(this,t,t.source,t.sourceName.toString()));return o.dataset.key=i,e[i]={item:t,elm:o},e[i].elm};t.on(["change.currentPath","change.currentSource"],this.async.debounce(()=>{this.o.saveStateInStorage&&this.o.saveStateInStorage.storeLastOpenedFolder&&this.storage.set("currentPath",this.state.currentPath).set("currentSource",this.state.currentSource),(0,a.loadTree)(this).catch(this.status)},this.defaultTimeout)).on("beforeChange.activeElements",()=>{t.activeElements.forEach(t=>{let{elm:o}=e[t.uniqueHashKey];o&&o.classList.remove(i.getFullElName("item","active",!0))})}).on("change.activeElements",()=>{this.e.fire("changeSelection"),t.activeElements.forEach(t=>{let{elm:o}=e[t.uniqueHashKey];o&&o.classList.add(i.getFullElName("item","active",!0))})}).on("change.view",()=>{i.setMod("view",t.view),this.o.saveStateInStorage&&this.o.saveStateInStorage.storeView&&this.storage.set("view",t.view)}).on("change.sortBy",()=>{this.o.saveStateInStorage&&this.o.saveStateInStorage.storeSortBy&&this.storage.set("sortBy",t.sortBy)}).on("change.elements",this.async.debounce(()=>{o.Dom.detach(i.container),t.elements.length?t.elements.forEach(e=>{o.Dom.append(this.files.container,d(e))}):o.Dom.append(i.container,l.div(this.componentName+"_no-files_true",this.i18n("There are no files")))},this.defaultTimeout)).on("change.sources",this.async.debounce(()=>{o.Dom.detach(this.tree.container),t.sources.forEach(e=>{let t=e.name;if(t&&"default"!==t&&o.Dom.append(this.tree.container,l.div(this.tree.getFullElName("source-title"),t)),e.folders.forEach(i=>{let s=l.a(this.tree.getFullElName("item"),{draggable:"draggable",href:"#","data-path":(0,n.normalizePath)(e.path,i+"/"),"data-name":i,"data-source":t,"data-source-path":e.path},l.span(this.tree.getFullElName("item-title"),i)),a=o=>r=>{this.e.fire(`${o}.filebrowser`,{name:i,path:(0,n.normalizePath)(e.path+"/"),source:t}),r.stopPropagation(),r.preventDefault()};if(this.e.on(s,"click",a("openFolder")),o.Dom.append(this.tree.container,s),".."!==i&&"."!==i){if(c.renameFolder&&this.dataProvider.canI("FolderRename")){let e=(0,r.Button)(this,{icon:{name:"pencil"},name:"rename",tooltip:"Rename",size:"tiny"});e.onAction(a("renameFolder")),o.Dom.append(s,e.container)}if(c.deleteFolder&&this.dataProvider.canI("FolderRemove")){let e=(0,r.Button)(this,{icon:{name:"cancel"},name:"remove",tooltip:"Delete",size:"tiny"});e.onAction(a("removeFolder")),o.Dom.append(s,e.container)}}}),c.createNewFolder&&this.dataProvider.canI("FolderCreate")){let i=(0,r.Button)(this,"plus","Add folder","secondary");i.onAction(()=>{this.e.fire("addFolder",{path:(0,n.normalizePath)(e.path+"/"),source:t})}),this.tree.append(i)}})},this.defaultTimeout))}},97379:function(e,t,i){"use strict";i.d(t,{FileBrowserFiles:function(){return n}});var o=i(67510);class n extends o.UIGroup{className(){return"FileBrowserFiles"}}},8172:function(e,t,i){"use strict";i.d(t,{FileBrowserFiles:function(){return o.FileBrowserFiles},FileBrowserTree:function(){return n.FileBrowserTree}});var o=i(97379),n=i(8193)},8193:function(e,t,i){"use strict";i.d(t,{FileBrowserTree:function(){return n}});var o=i(67510);class n extends o.UIGroup{className(){return"FileBrowserTree"}}},92643:function(e,t,i){"use strict";i.d(t,{Command:function(){return o}});class o{undo(){this.history.snapshot.restore(this.oldValue)}redo(){this.history.snapshot.restore(this.newValue)}constructor(e,t,i,o){this.oldValue=e,this.newValue=t,this.history=i,this.tick=o}}},78818:function(e,t,i){"use strict";i.d(t,{History:function(){return c}});var o=i(80480),n=i(81577),r=i(6441),s=i(92643),a=i(52604),l=i(57034);r.Config.prototype.history={enable:!0,maxHistoryLength:1/0,timeout:1e3};class c extends o.ViewComponent{className(){return"History"}redo(){this.__stack.redo()&&(this.startValue=this.snapshot.make(),this.fireChangeStack())}canRedo(){return this.__stack.canRedo()}undo(){this.__stack.undo()&&(this.startValue=this.snapshot.make(),this.fireChangeStack())}canUndo(){return this.__stack.canUndo()}clear(){this.startValue=this.snapshot.make(),this.__stack.clear(),this.fireChangeStack()}get length(){return this.__stack.length}get startValue(){return this.__startValue}set startValue(e){this.__startValue=e}__upTick(){this.updateTick+=1}onChange(){this.__processChanges()}__processChanges(){!this.snapshot.isBlocked&&this.j.o.history.enable&&this.updateStack()}updateStack(e=!1){let t=this.snapshot.make();if(a.Snapshot.equal(t,this.startValue))return;if(t.html===this.startValue.html){this.startValue=t;return}let i=new s.Command(this.startValue,t,this,this.updateTick);if(e){let e=this.__stack.current();e&&this.updateTick===e.tick&&this.__stack.replace(i)}else this.__stack.push(i);this.startValue=t,this.fireChangeStack()}fireChangeStack(){var e;this.j&&!this.j.isInDestruct&&(null==(e=this.j.events)||e.fire("changeStack"))}destruct(){this.isInDestruct||(this.j.events&&this.j.e.off(".history"),this.snapshot.destruct(),super.destruct())}constructor(e,t=new l.Stack(e.o.history.maxHistoryLength),i=new a.Snapshot(e)){super(e),this.updateTick=0,this.__stack=t,this.snapshot=i,e.o.history.enable&&e.e.on("afterAddPlace.history",()=>{this.isInDestruct||(this.startValue=this.snapshot.make(),e.events.on("internalChange internalUpdate",()=>{this.startValue=this.snapshot.make()}).on(e.editor,["changeSelection","selectionstart","selectionchange","mousedown","mouseup","keydown","keyup"].map(e=>e+".history").join(" "),()=>{this.startValue.html===this.j.getNativeEditorValue()&&(this.startValue=this.snapshot.make())}).on(this,"change.history",this.onChange))})}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,n.debounce)()],c.prototype,"onChange",null)},52604:function(e,t,i){"use strict";i.d(t,{Snapshot:function(){return s}});var o=i(91907),n=i(82758),r=i(2748);class s extends o.ViewComponent{className(){return"Snapshot"}static equal(e,t){return e.html===t.html&&JSON.stringify(e.range)===JSON.stringify(t.range)&&JSON.stringify(e.ranges)===JSON.stringify(t.ranges)&&!!e.backward==!!t.backward}static countNodesBeforeInParent(e){if(!e.parentNode)return 0;let t=e.parentNode.childNodes,i=0,o=null;for(let n=0;n<t.length;n+=1){if(!o||this.isIgnoredNode(t[n])||r.Dom.isText(o)&&r.Dom.isText(t[n])||(i+=1),t[n]===e)return i;o=t[n]}return 0}static strokeOffset(e,t){for(;r.Dom.isText(e);)e=e.previousSibling,r.Dom.isText(e)&&e.nodeValue&&(t+=e.nodeValue.length);return t}calcHierarchyLadder(e){let t=[];if(!e||!e.parentNode||!r.Dom.isOrContains(this.j.editor,e))return[];for(;e&&e!==this.j.editor;)e&&!s.isIgnoredNode(e)&&t.push(s.countNodesBeforeInParent(e)),e=e.parentNode;return t.reverse()}getElementByLadder(e){let t=this.j.editor,i;for(i=0;t&&i<e.length;i+=1)t=t.childNodes[e[i]];return t}get isBlocked(){return this.__isBlocked}__block(e){this.__isBlocked=e}transaction(e){this.__block(!0),this.__levelOfTransaction+=1;try{e()}catch(e){if(!n.IS_PROD)throw e}finally{this.__levelOfTransaction-=1,0===this.__levelOfTransaction&&this.__block(!1)}}make(){let e={html:"",range:{startContainer:[],startOffset:0,endContainer:[],endOffset:0}};e.html=this.__getCleanedEditorValue(this.j.editor);let t=this.j.s.sel;if(t&&t.rangeCount){let i=[];for(let e=0;e<t.rangeCount;e+=1){let o=t.getRangeAt(e),n=this.calcHierarchyLadder(o.startContainer),r=this.calcHierarchyLadder(o.endContainer),a=s.strokeOffset(o.startContainer,o.startOffset),l=s.strokeOffset(o.endContainer,o.endOffset);n.length||o.startContainer===this.j.editor||(a=0),r.length||o.endContainer===this.j.editor||(l=0),i.push({startContainer:n,startOffset:a,endContainer:r,endOffset:l})}e.range=i[0],i.length>1?e.ranges=i:t.isCollapsed||t.anchorNode!==t.getRangeAt(0).endContainer||t.anchorOffset!==t.getRangeAt(0).endOffset||(e.backward=!0)}return e}restore(e){this.transaction(()=>{let t=this.storeScrollState();this.__getCleanedEditorValue(this.j.editor)!==e.html&&(this.j.value=e.html),this.restoreOnlySelection(e),this.restoreScrollState(t)})}storeScrollState(){return[this.j.ow.scrollY,this.j.editor.scrollTop]}restoreScrollState(e){let{j:t}=this,{ow:i}=t;i.scrollTo(i.scrollX,e[0]),t.editor.scrollTop=e[1]}restoreOnlySelection(e){var t;try{if(e.range){let i=(null!=(t=e.ranges)?t:[e.range]).map(e=>{let t=this.j.ed.createRange();return t.setStart(this.getElementByLadder(e.startContainer),e.startOffset),t.setEnd(this.getElementByLadder(e.endContainer),e.endOffset),t});this.j.s.selectRange(i[0]);let o=this.j.s.sel;if(i.slice(1).forEach(e=>null==o?void 0:o.addRange(e)),e.backward&&1===i.length){let e=i[0];null==o||o.setBaseAndExtent(e.endContainer,e.endOffset,e.startContainer,e.startOffset)}}}catch(e){this.j.editor.lastChild&&this.j.s.setCursorAfter(this.j.editor.lastChild),n.IS_PROD}}destruct(){this.__block(!1),super.destruct()}static isIgnoredNode(e){return r.Dom.isText(e)&&!e.nodeValue||r.Dom.isTemporary(e)}__getCleanedEditorValue(e){let t=e.cloneNode(!0);return r.Dom.temporaryList(t).forEach(r.Dom.unwrap),t.innerHTML}constructor(){super(...arguments),this.__isBlocked=!1,this.__levelOfTransaction=0}}},57034:function(e,t,i){"use strict";i.d(t,{Stack:function(){return o}});class o{get length(){return this.commands.length}clearRedo(){this.commands.length=this.stackPosition+1}clear(){this.commands.length=0,this.stackPosition=-1}push(e){this.clearRedo(),this.commands.push(e),this.stackPosition+=1,this.commands.length>this.size&&(this.commands.shift(),this.stackPosition-=1)}replace(e){this.commands[this.stackPosition]=e}current(){return this.commands[this.stackPosition]}undo(){return!!this.canUndo()&&(this.commands[this.stackPosition]&&this.commands[this.stackPosition].undo(),this.stackPosition-=1,!0)}redo(){return!!this.canRedo()&&(this.stackPosition+=1,this.commands[this.stackPosition]&&this.commands[this.stackPosition].redo(),!0)}canUndo(){return this.stackPosition>=0}canRedo(){return this.stackPosition<this.commands.length-1}constructor(e){this.size=e,this.commands=[],this.stackPosition=-1}}},62489:function(e,t,i){"use strict";var o=i(12153),n=i(6441),r=i(49922),s=i(72144);n.Config.prototype.imageeditor={min_width:20,min_height:20,closeAfterSave:!1,width:"85%",height:"85%",crop:!0,resize:!0,resizeUseRatio:!0,resizeMinWidth:20,resizeMinHeight:20,cropUseRatio:!0,cropDefaultWidth:"70%",cropDefaultHeight:"70%"},o.Icon.set("crop",r.default).set("resize",s.default)},49922:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M7 2v15h15M2 7h15v15"/> </g> </svg> '},72144:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2"/><path d="M8 16 16 8m-6 0h6v6"/> </g> </svg> '},50050:function(e,t,i){"use strict";i.d(t,{ImageEditor:function(){return k},openImageEditor:function(){return C}});var o,n=i(91907),r=i(65478),s=i(22732),a=i(49055),l=i(29960),c=i(41180),d=i(76078),u=i(37790),h=i(62843),p=i(6441);i(62489);var f=i(22461),m=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let g="jodit-image-editor",b=e=>t=>t.classList.contains(e);function v(e,t){return s.Dom.first(e,e=>s.Dom.isHTMLElement(e)&&t(e))}function y(e,t){let i=[];return s.Dom.each(e,e=>{s.Dom.isHTMLElement(e)&&t(e)&&i.push(e)}),i}let w="resize",_="crop",k=o=class e extends n.ViewComponent{className(){return"ImageEditor"}get o(){return this.options}hide(){this._dialog.close()}open(e,t){return this.j.async.promise(i=>{let o=new Date().getTime();this.image=this.j.c.element("img");let n=e=>s.Dom.isTag(e,"img")||b("jodit-icon_loader")(e);y(this.resize_box,n).forEach(s.Dom.safeRemove),y(this.crop_box,n).forEach(s.Dom.safeRemove),(0,c.css)(this.cropHandler,"background","transparent"),this.onSave=t,s.Dom.append(this.resize_box,this.j.c.element("i",{class:"jodit-icon_loader"})),s.Dom.append(this.crop_box,this.j.c.element("i",{class:"jodit-icon_loader"})),/\?/.test(e)?e+="&_tst="+o:e+="?_tst="+o,(0,l.attr)(this.image,"src",e),this._dialog.open();let{widthInput:r,heightInput:a}=(0,d.refs)(this.editor),u=()=>{this.isDestructed||(this.image.removeEventListener("load",u),this.naturalWidth=this.image.naturalWidth,this.naturalHeight=this.image.naturalHeight,r.value=this.naturalWidth.toString(),a.value=this.naturalHeight.toString(),this.ratio=this.naturalWidth/this.naturalHeight,s.Dom.append(this.resize_box,this.image),this.cropImage=this.image.cloneNode(!0),s.Dom.append(this.crop_box,this.cropImage),s.Dom.safeRemove.apply(null,y(this.editor,b("jodit-icon_loader"))),this.activeTab===_&&this.showCrop(),this.j.e.fire(this.resizeHandler,"updatesize"),this.j.e.fire(this.cropHandler,"updatesize"),this._dialog.setPosition(),this.j.e.fire("afterImageEditor"),i(this._dialog))};this.image.addEventListener("load",u),this.image.complete&&u()})}onTitleModeClick(e){let t=this,i=e.target,o=null==i?void 0:i.parentElement;if(!o)return;y(t.editor,e=>b(`${g}__slider`)(e)||b(`${g}__area`)(e)).forEach(e=>e.classList.remove(`${g}_active`)),o.classList.add(`${g}_active`),this.activeTab=(0,l.attr)(o,"-area")||w;let n=v(t.editor,e=>b(`${g}__area`)(e)&&b(`${g}__area_`+t.activeTab)(e));n&&n.classList.add(`${g}_active`),t.activeTab===_&&t.showCrop()}onChangeSizeInput(e){let t,i=e.target,{widthInput:o,heightInput:n}=(0,d.refs)(this.editor),r="widthInput"===(0,l.attr)(i,"data-ref"),s=parseInt(i.value,10),a=r?this.o.min_width:this.o.min_height,u=r?this.o.min_height:this.o.min_width;s>a&&((0,c.css)(this.image,r?"width":"height",s),this.resizeUseRatio&&(t=r?Math.round(s/this.ratio):Math.round(s*this.ratio))>u&&((0,c.css)(this.image,r?"height":"width",t),r?n.value=t.toString():o.value=t.toString())),this.j.e.fire(this.resizeHandler,"updatesize")}onResizeHandleMouseDown(e){this.target=e.target,e.preventDefault(),e.stopImmediatePropagation(),this.clicked=!0,this.start_x=e.clientX,this.start_y=e.clientY,this.activeTab===_?(this.top_x=(0,c.css)(this.cropHandler,"left"),this.top_y=(0,c.css)(this.cropHandler,"top"),this.width=this.cropHandler.offsetWidth,this.height=this.cropHandler.offsetHeight):(this.width=this.image.offsetWidth,this.height=this.image.offsetHeight),this.j.e.on(this.j.ow,"mousemove",this.onGlobalMouseMove).one(this.j.ow,"mouseup",this.onGlobalMouseUp)}onGlobalMouseUp(e){this.clicked&&(this.clicked=!1,e.stopImmediatePropagation(),this.j.e.off(this.j.ow,"mousemove",this.onGlobalMouseMove))}onGlobalMouseMove(e){if(!this.clicked)return;let{widthInput:t,heightInput:i}=(0,d.refs)(this.editor);this.diff_x=e.clientX-this.start_x,this.diff_y=e.clientY-this.start_y,this.activeTab===w&&this.resizeUseRatio||this.activeTab===_&&this.cropUseRatio?this.diff_x?(this.new_w=this.width+this.diff_x,this.new_h=Math.round(this.new_w/this.ratio)):(this.new_h=this.height+this.diff_y,this.new_w=Math.round(this.new_h*this.ratio)):(this.new_w=this.width+this.diff_x,this.new_h=this.height+this.diff_y),this.activeTab===w?(this.new_w>this.o.resizeMinWidth&&((0,c.css)(this.image,"width",this.new_w+"px"),t.value=this.new_w.toString()),this.new_h>this.o.resizeMinHeight&&((0,c.css)(this.image,"height",this.new_h+"px"),i.value=this.new_h.toString()),this.j.e.fire(this.resizeHandler,"updatesize")):(this.target!==this.cropHandler?(this.top_x+this.new_w>this.cropImage.offsetWidth&&(this.new_w=this.cropImage.offsetWidth-this.top_x),this.top_y+this.new_h>this.cropImage.offsetHeight&&(this.new_h=this.cropImage.offsetHeight-this.top_y),(0,c.css)(this.cropHandler,{width:this.new_w,height:this.new_h})):(this.top_x+this.diff_x+this.cropHandler.offsetWidth>this.cropImage.offsetWidth&&(this.diff_x=this.cropImage.offsetWidth-this.top_x-this.cropHandler.offsetWidth),(0,c.css)(this.cropHandler,"left",this.top_x+this.diff_x),this.top_y+this.diff_y+this.cropHandler.offsetHeight>this.cropImage.offsetHeight&&(this.diff_y=this.cropImage.offsetHeight-this.top_y-this.cropHandler.offsetHeight),(0,c.css)(this.cropHandler,"top",this.top_y+this.diff_y)),this.j.e.fire(this.cropHandler,"updatesize"))}destruct(){this.isDestructed||(this._dialog&&!this._dialog.isInDestruct&&this._dialog.destruct(),s.Dom.safeRemove(this.editor),this.j.e&&this.j.e.off(this.j.ow,"mousemove",this.onGlobalMouseMove).off(this.j.ow,"mouseup",this.onGlobalMouseUp).off(this.ow,"."+g).off("."+g),super.destruct())}constructor(e){super(e),this.resizeUseRatio=!0,this.cropUseRatio=!0,this.clicked=!1,this.start_x=0,this.start_y=0,this.top_x=0,this.top_y=0,this.width=0,this.height=0,this.activeTab=w,this.naturalWidth=0,this.naturalHeight=0,this.ratio=0,this.new_h=0,this.new_w=0,this.diff_x=0,this.diff_y=0,this.cropBox={x:0,y:0,w:0,h:0},this.resizeBox={w:0,h:0},this.calcCropBox=()=>{let e,t,i=this.crop_box.parentNode,o=.8*i.offsetWidth,n=.8*i.offsetHeight,{naturalWidth:r,naturalHeight:s}=this;o>r&&n>s?(e=r,t=s):this.ratio>o/n?(e=o,t=o/r*s):(e=n/s*r,t=n),(0,c.css)(this.crop_box,{width:e,height:t})},this.showCrop=()=>{if(!this.cropImage)return;this.calcCropBox();let e=this.cropImage.offsetWidth||this.image.offsetWidth||this.image.naturalWidth;this.new_w=o.calcValueByPercent(e,this.o.cropDefaultWidth);let t=this.cropImage.offsetHeight||this.image.offsetHeight||this.image.naturalHeight;this.cropUseRatio?this.new_h=this.new_w/this.ratio:this.new_h=o.calcValueByPercent(t,this.o.cropDefaultHeight),(0,c.css)(this.cropHandler,{backgroundImage:"url("+(0,l.attr)(this.cropImage,"src")+")",width:this.new_w,height:this.new_h,left:e/2-this.new_w/2,top:t/2-this.new_h/2}),this.j.e.fire(this.cropHandler,"updatesize")},this.updateCropBox=()=>{if(!this.cropImage)return;let e=this.cropImage.offsetWidth/this.naturalWidth,t=this.cropImage.offsetHeight/this.naturalHeight;this.cropBox.x=(0,c.css)(this.cropHandler,"left")/e,this.cropBox.y=(0,c.css)(this.cropHandler,"top")/t,this.cropBox.w=this.cropHandler.offsetWidth/e,this.cropBox.h=this.cropHandler.offsetHeight/t,this.sizes.textContent=this.cropBox.w.toFixed(0)+"x"+this.cropBox.h.toFixed(0)},this.updateResizeBox=()=>{this.resizeBox.w=this.image.offsetWidth||this.naturalWidth,this.resizeBox.h=this.image.offsetHeight||this.naturalHeight},this.setHandlers=()=>{let e=this,{widthInput:t,heightInput:i}=(0,d.refs)(this.editor);e.j.e.on([v(e.editor,b("jodit_bottomright")),e.cropHandler],"mousedown."+g,this.onResizeHandleMouseDown).on(this.j.ow,"resize."+g,()=>{this.j.e.fire(e.resizeHandler,"updatesize"),e.showCrop(),this.j.e.fire(e.cropHandler,"updatesize")}),e.j.e.on(y(this.editor,b(`${g}__slider-title`)),"click",this.onTitleModeClick).on([t,i],"input",this.onChangeSizeInput);let{keepAspectRatioResize:o,keepAspectRatioCrop:n}=(0,d.refs)(this.editor);o&&o.addEventListener("change",()=>{this.resizeUseRatio=o.checked}),n&&n.addEventListener("change",()=>{this.cropUseRatio=n.checked}),e.j.e.on(e.resizeHandler,"updatesize",()=>{(0,c.css)(e.resizeHandler,{top:0,left:0,width:e.image.offsetWidth||e.naturalWidth,height:e.image.offsetHeight||e.naturalHeight}),this.updateResizeBox()}).on(e.cropHandler,"updatesize",()=>{if(!e.cropImage)return;let t=(0,c.css)(e.cropHandler,"left"),i=(0,c.css)(e.cropHandler,"top"),o=e.cropHandler.offsetWidth,n=e.cropHandler.offsetHeight;t<0&&(t=0),i<0&&(i=0),t+o>e.cropImage.offsetWidth&&(o=e.cropImage.offsetWidth-t,e.cropUseRatio&&(n=o/e.ratio)),i+n>e.cropImage.offsetHeight&&(n=e.cropImage.offsetHeight-i,e.cropUseRatio&&(o=n*e.ratio)),(0,c.css)(e.cropHandler,{width:o,height:n,left:t,top:i,backgroundPosition:-t-1+"px "+(-i-1)+"px",backgroundSize:e.cropImage.offsetWidth+"px "+e.cropImage.offsetHeight+"px"}),e.updateCropBox()}),Object.values(e.buttons).forEach(o=>{o.onAction(()=>{let n={action:e.activeTab,box:e.activeTab===w?e.resizeBox:e.cropBox};switch(o){case e.buttons.saveas:e.j.prompt("Enter new name","Save in new file",t=>{if(!(0,a.trim)(t))return e.j.alert("The name should not be empty"),!1;e.j.e.fire("afterImageEditorSave",n,t),e.onSave(t,n,e.hide,t=>{e.j.alert(t.message)})});break;case e.buttons.save:e.j.e.fire("afterImageEditorSave",n),e.onSave(void 0,n,e.hide,t=>{e.j.alert(t.message)});break;case e.buttons.reset:e.activeTab===w?((0,c.css)(e.image,{width:null,height:null}),t.value=e.naturalWidth.toString(),i.value=e.naturalHeight.toString(),e.j.e.fire(e.resizeHandler,"updatesize")):e.showCrop()}})})},this.options=e&&e.o&&e.o.imageeditor?e.o.imageeditor:p.Config.defaultOptions.imageeditor;let t=this.options;this.resizeUseRatio=t.resizeUseRatio,this.cropUseRatio=t.cropUseRatio,this.buttons={reset:(0,h.Button)(this.j,"update","Reset"),save:(0,h.Button)(this.j,"save","Save"),saveas:(0,h.Button)(this.j,{icon:{name:"save"},name:"save-as",text:"Save as ..."})},this.activeTab=t.resize?w:_,this.editor=(0,f.form)(this.j,this.options);let{resizeBox:i,cropBox:n}=(0,d.refs)(this.editor);this.resize_box=i,this.crop_box=n,this.sizes=v(this.editor,e=>b(`${g}__sizes`)(e)&&!!s.Dom.closest(e,e=>s.Dom.isHTMLElement(e)&&b(`${g}__area_crop`)(e),this.editor)),this.resizeHandler=v(this.editor,b(`${g}__resizer`)),this.cropHandler=v(this.editor,b(`${g}__croper`)),this._dialog=this.j.dlg({buttons:["fullsize","dialog.close"]}),this._dialog.setContent(this.editor),this._dialog.setSize(this.o.width,this.o.height),this._dialog.setHeader([this.buttons.reset,this.buttons.save,this.buttons.saveas]),this.setHandlers()}};function C(e,t,i,o,n,r){return this.getInstance("ImageEditor",this.o).open(e,(e,s,a,l)=>{if("saved"===s.action){a(),n&&n(s.newPath);return}(0,u.call)("resize"===s.action?this.dataProvider.resize:this.dataProvider.crop,i,o,t,e,s.box).then(e=>{e&&(a(),n&&n("string"==typeof e?e:void 0))}).catch(e=>{l(e),r&&r(e)})})}k.calcValueByPercent=(e,t)=>{let i,o=t.toString(),n=parseFloat(e.toString());return(i=/^[-+]?[0-9]+(px)?$/.exec(o))?parseInt(o,10):(i=/^([-+]?[0-9.]+)%$/.exec(o))?Math.round(n*(parseFloat(i[1])/100)):n||0},m([r.autobind],k.prototype,"hide",null),m([r.autobind],k.prototype,"open",null),m([r.autobind],k.prototype,"onTitleModeClick",null),m([(0,r.debounce)(),r.autobind],k.prototype,"onChangeSizeInput",null),m([r.autobind],k.prototype,"onResizeHandleMouseDown",null),m([r.autobind],k.prototype,"onGlobalMouseUp",null),m([(0,r.throttle)(10)],k.prototype,"onGlobalMouseMove",null),k=o=m([r.component],k)},22461:function(e,t,i){"use strict";var o=i(67510);let n="jodit-image-editor",r=o.Icon.get.bind(o.Icon),s=(e,t="jodti-image-editor_active")=>e?t:"";i.d(t,["form",0,(e,t)=>{let i=e.i18n.bind(e),o=(e,t,o=!0)=>`<div class="jodit-form__group">
|
|
65
|
+
</a>`},ajax:{...a.Config.prototype.defaultAjaxOptions,url:"",data:{},cache:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",method:"POST",processData:!0,headers:{},prepareData:e=>e,process:e=>e},create:{data:{action:"folderCreate"}},getLocalFileByUrl:{data:{action:"getLocalFileByUrl"}},resize:{data:{action:"imageResize"}},crop:{data:{action:"imageCrop"}},fileMove:{data:{action:"fileMove"}},folderMove:{data:{action:"folderMove"}},fileRename:{data:{action:"fileRename"}},folderRename:{data:{action:"folderRename"}},fileRemove:{data:{action:"fileRemove"}},folderRemove:{data:{action:"folderRemove"}},items:{data:{action:"files"}},folder:{data:{action:"folders"}},permissions:{data:{action:"permissions"}}},a.Config.prototype.controls.filebrowser={upload:{icon:"plus",tooltip:"Upload file",isInput:!0,isDisabled:e=>!e.dataProvider.canI("FileUpload"),getContent(e,t){let i=new s.UIFileInput(e,{tooltip:t.control.tooltip,onlyImages:e.state.onlyImages});return e.e.fire("bindUploader.filebrowser",i.container),i.container}},remove:{icon:"bin",tooltip:"Remove file",isDisabled:e=>!e.state.activeElements.length||!e.dataProvider.canI("FileRemove"),exec(e){e.e.fire("fileRemove.filebrowser")}},update:{tooltip:"Update file list",exec(e){e.e.fire("update.filebrowser")}},select:{tooltip:"Select file",icon:"check",isDisabled:e=>!e.state.activeElements.length,exec(e){e.e.fire("select.filebrowser")}},edit:{tooltip:"Edit image",icon:"pencil",isDisabled(e){let t=e.state.activeElements;return 1!==t.length||!t[0].isImage||!(e.dataProvider.canI("ImageCrop")||e.dataProvider.canI("ImageResize"))},exec(e){e.e.fire("edit.filebrowser")}},tiles:{tooltip:"Tiles view",icon:"th",isActive:e=>"tiles"===e.state.view,exec(e){e.e.fire("view.filebrowser","tiles")}},list:{tooltip:"List view",icon:"th-list",isActive:e=>"list"===e.state.view,exec(e){e.e.fire("view.filebrowser","list")}},filter:{isInput:!0,getContent(e,t){let i=o.Dom.first(t.container,e=>o.Dom.isHTMLElement(e)&&e.classList.contains("jodit-input"));if(i)return i;let n=e.c.element("input",{class:"jodit-input",placeholder:e.i18n("Filter")});return n.value=e.state.filterWord,e.e.on(n,"keydown mousedown",e.async.debounce(()=>{e.e.fire("filter.filebrowser",n.value)},e.defaultTimeout)),n}},sort:{isInput:!0,getContent(e){let t=e.c.fromHTML(`<select class="jodit-input jodit-select"><option value="changed-asc">${e.i18n("Sort by changed")} (↑)</option><option value="changed-desc">${e.i18n("Sort by changed")} (↓)</option><option value="name-asc">${e.i18n("Sort by name")} (↑)</option><option value="name-desc">${e.i18n("Sort by name")} (↓)</option><option value="size-asc">${e.i18n("Sort by size")} (↑)</option><option value="size-desc">${e.i18n("Sort by size")} (↓)</option></select>`);return t.value=e.state.sortBy,e.e.on("sort.filebrowser",e=>{t.value!==e&&(t.value=e)}).on(t,"change",()=>{e.e.fire("sort.filebrowser",t.value)}),t}}}},11787:function(e,t,i){"use strict";i.d(t,{default:function(){return v}});var o=i(82758),n=i(45219),r=i(68345),s=i(23282),a=i(72430),l=i(70091),c=i(68934),d=i(89890),u=i(3703),h=i(54079),p=i(159),f=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let m=new Set(["allowFiles","allowFileMove","allowFileUpload","allowFileUploadRemote","allowFileRemove","allowFileRename","allowFolders","allowFolderMove","allowFolderCreate","allowFolderRemove","allowFolderRename","allowImageResize","allowImageCrop"]);function g(e,t,i){let o=e=>{throw Error(`File browser: the connector answer for action "${t}" (option "filebrowser.${i}") ${e}. See https://xdsoft.net/jodit/docs/modules/file_browser.html`)};if(!(0,a.isPlainObject)(e)||!(0,a.isPlainObject)(e.data))return o('has no "data" object');let{sources:n}=e.data;return(0,r.isArray)(n)?(n.forEach((e,t)=>{if(!(0,a.isPlainObject)(e))return o(`has a non-object entry at "data.sources[${t}]"`);(0,r.isArray)(e.files)||(e.files=[]),(0,r.isArray)(e.folders)||(e.folders=[])}),e):o(void 0===n?'has no "data.sources" array':'must contain "data.sources" as an array of sources, got '+((0,a.isPlainObject)(n)?"an object keyed by source name":typeof n))}let b=new Set(["items","folder","permissions","getLocalFileByUrl"]);class v{get o(){return this.options}get(e){let t=this.__ajaxInstances,i=b.has(e),o=i?e:`${e}#${++this.__requestSerial}`;if(i&&t.has(o)){let e=t.get(o);null==e||e.abort(),t.delete(o)}let n=(0,c.ConfigProto)(void 0!==this.options[e]?this.options[e]:{},(0,c.ConfigProto)({onProgress:this.progressHandler},this.o.ajax));n.prepareData&&(n.data=n.prepareData.call(this,n.data));let r=new h.Ajax(n);t.set(o,r);let s=r.send();return s.finally(()=>{r.destruct(),t.delete(o),this.progressHandler(100)}).catch(()=>null),s.then(e=>e.json()).then(e=>{if(e&&!this.isSuccess(e))throw Error(this.getMessage(e));return e})}onProgress(e){this.progressHandler=e}async permissions(e,t){return this.o.permissions&&(this.o.permissions.data.path=e,this.o.permissions.data.source=t,this.o.permissions.url)?this.get("permissions").then(e=>{var t;if(this.parent.isInDestruct)throw(0,d.abort)();let i=this.o.permissions.process;if(i||(i=this.o.ajax.process),i){let o=i.call(self,e);(null==(t=null==o?void 0:o.data)?void 0:t.permissions)&&(this.parent.events.fire(this,"changePermissions",this.__currentPermissions,o.data.permissions),this.__currentPermissions=o.data.permissions)}return this.__currentPermissions}):null}canI(e){let t="allow"+e;if(!o.IS_PROD&&!m.has(t))throw(0,d.error)("Wrong action "+e);let i=this.o.permissionsPresets[t];return void 0!==i?i:null==this.__currentPermissions||void 0===this.__currentPermissions[t]||this.__currentPermissions[t]}__items(e,t,i,o){let n=this.options;return n.items?(n.items.data.path=e,n.items.data.source=t,n.items.data.mods=i,this.get("items").then(e=>{let t=this.o.items.process;return t||(t=this.o.ajax.process),t&&(e=t.call(self,e)),o(g(e,"files","items"))})):Promise.reject(Error("Set Items api options"))}items(e,t,i={}){return this.__items(e,t,i,e=>this.__generateItemsList(e.data.sources,i))}itemsEx(e,t,i={}){return this.__items(e,t,i,e=>({items:this.__generateItemsList(e.data.sources,i),loadedTotal:e.data.sources.reduce((e,t)=>e+t.files.length,0)}))}__generateItemsList(e,t={}){let i=[],o=e=>{var i;return!(null==(i=t.filterWord)?void 0:i.length)||void 0===this.o.filter||this.o.filter(e,t.filterWord)};return e.forEach(e=>{if(e.files&&e.files.length){let{sort:n}=this.o;(0,s.isFunction)(n)&&t.sortBy&&e.files.sort((e,i)=>n(e,i,t.sortBy)),e.files.forEach(n=>{o(n)&&("folder"===n.type||!t.onlyImages||void 0===n.isImage||n.isImage)&&i.push(p.FileBrowserItem.create({...n,sourceName:e.name,source:e}))})}}),i}async tree(e,t){return(e=(0,l.normalizeRelativePath)(e),this.o.folder)?(await this.permissions(e,t),this.o.folder.data.path=e,this.o.folder.data.source=t,this.get("folder").then(e=>{let t=this.o.folder.process;return t||(t=this.o.ajax.process),t&&(e=t.call(self,e)),g(e,"folders","folder").data.sources})):Promise.reject(Error("Set Folder Api options"))}getPathByUrl(e){return(0,u.set)("options.getLocalFileByUrl.data.url",e,this),this.get("getLocalFileByUrl").then(e=>{if(this.isSuccess(e))return e.data;throw(0,d.error)(this.getMessage(e))})}createFolder(e,t,i){let{create:o}=this.o;if(!o)throw(0,d.error)("Set Create api options");return o.data.source=i,o.data.path=t,o.data.name=e,this.get("create").then(e=>{if(this.isSuccess(e))return!0;throw(0,d.error)(this.getMessage(e))})}move(e,t,i,o){let n=o?"fileMove":"folderMove",r=this.options[n];if(!r)throw(0,d.error)("Set Move api options");return r.data.from=e,r.data.path=t,r.data.source=i,this.get(n).then(e=>{if(this.isSuccess(e))return!0;throw(0,d.error)(this.getMessage(e))})}__remove(e,t,i,o){let n=this.o[e];if(!n)throw(0,d.error)(`Set "${e}" api options`);return n.data.path=t,n.data.name=i,n.data.source=o,this.get(e).then(e=>(n.process&&(e=n.process.call(this,e)),this.getMessage(e)))}fileRemove(e,t,i){return this.__remove("fileRemove",e,t,i)}folderRemove(e,t,i){return this.__remove("folderRemove",e,t,i)}__rename(e,t,i,o,n){let r=this.o[e];if(!r)throw(0,d.error)(`Set "${e}" api options`);return r.data.path=t,r.data.name=i,r.data.newname=o,r.data.source=n,this.get(e).then(e=>(r.process&&(e=r.process.call(self,e)),this.getMessage(e)))}folderRename(e,t,i,o){return this.__rename("folderRename",e,t,i,o)}fileRename(e,t,i,o){return this.__rename("fileRename",e,t,i,o)}__changeImage(e,t,i,o,n,r){this.o[e]||(this.o[e]={data:{}});let s=this.o[e];return void 0===s.data&&(s.data={action:e}),s.data.newname=n||o,r&&(s.data.box=r),s.data.path=t,s.data.name=o,s.data.source=i,this.get(e).then(e=>e.data.newPath||!0)}crop(e,t,i,o,n){return this.__changeImage("crop",e,t,i,o,n)}resize(e,t,i,o,n){return this.__changeImage("resize",e,t,i,o,n)}getMessage(e){return this.options.getMessage(e)}isSuccess(e){return this.options.isSuccess(e)}destruct(){this.__ajaxInstances.forEach(e=>e.destruct()),this.__ajaxInstances.clear()}constructor(e,t){this.parent=e,this.options=t,this.__currentPermissions=null,this.__ajaxInstances=new Map,this.__requestSerial=0,this.progressHandler=e=>{}}}f([n.autobind],v.prototype,"onProgress",null),f([n.autobind],v.prototype,"permissions",null),f([n.autobind],v.prototype,"canI",null),f([n.autobind],v.prototype,"items",null),f([n.autobind],v.prototype,"itemsEx",null),f([n.autobind],v.prototype,"tree",null),f([n.autobind],v.prototype,"getPathByUrl",null),f([n.autobind],v.prototype,"createFolder",null),f([n.autobind],v.prototype,"move",null),f([n.autobind],v.prototype,"fileRemove",null),f([n.autobind],v.prototype,"folderRemove",null),f([n.autobind],v.prototype,"folderRename",null),f([n.autobind],v.prototype,"fileRename",null),f([n.autobind],v.prototype,"crop",null),f([n.autobind],v.prototype,"resize",null),f([n.autobind],v.prototype,"getMessage",null),f([n.autobind],v.prototype,"isSuccess",null),f([n.autobind],v.prototype,"destruct",null),i.d(t,["DEFAULT_SOURCE_NAME",0,"default"])},63399:function(e,t,i){"use strict";i.d(t,{makeContextMenu:function(){return s},makeDataProvider:function(){return r}});var o=i(80870),n=i(11787);function r(e,t){return new n.default(e,t)}function s(e){return new o.ContextMenu(e)}},44450:function(e,t,i){"use strict";function o(e,t,i){return e.dataProvider.fileRemove(e.state.currentPath,t,i).then(i=>{e.status(i||e.i18n('File "%s" was deleted',t),!0)}).catch(e.status)}i.d(t,{deleteFile:function(){return o}})},30465:function(e,t,i){"use strict";function o(e){return e.files.setMod("active",!0),e.files.setMod("loading",!0),e.dataProvider.items(e.state.currentPath,e.state.currentSource,{sortBy:e.state.sortBy,onlyImages:e.state.onlyImages,filterWord:e.state.filterWord}).then(t=>{t&&(e.state.elements=t,e.state.activeElements=[])}).catch(e.status).finally(()=>e.files.setMod("loading",!1))}i.d(t,{loadItems:function(){return o}})},20201:function(e,t,i){"use strict";i.d(t,{loadTree:function(){return r}});var o=i(22732),n=i(30465);async function r(e){e.tree.setMod("active",!0),o.Dom.detach(e.tree.container);let t=(0,n.loadItems)(e);return e.o.showFoldersPanel?(e.tree.setMod("loading",!0),Promise.all([e.dataProvider.tree(e.state.currentPath,e.state.currentSource).then(t=>{e.state.sources=t}).catch(e.status).finally(()=>e.tree.setMod("loading",!1)),t])):(e.tree.setMod("active",!1),t)}},75330:function(e,t,i){"use strict";i.d(t,{FileBrowser:function(){return S}});var o=i(91907),n=i(82758),r=i(65478),s=i(37133),a=i(2748),l=i(3827),c=i(21537),d=i(41180),u=i(12081),h=i(70231),p=i(84075),f=i(6441);i(61251);var m=i(30465),g=i(20201),b=i(73948),v=i(33281),y=i(94538),w=i(11787),_=i(63399),k=i(8172),C=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let S=class e extends p.ViewWithToolbar{className(){return"FileBrowser"}get dataProvider(){return(0,_.makeDataProvider)(this,this.options)}onSelect(e){return()=>{if(this.state.activeElements.length){let t=[],i=[];this.state.activeElements.forEach(e=>{let o=e.fileURL;o&&(t.push(o),i.push(e.isImage||!1))}),this.close(),(0,c.isFunction)(e)&&e({baseurl:"",files:t,isImages:i}),this.close()}return!1}}get _dialog(){var e;let t=this.dlg({minWidth:Math.min(700,screen.width),minHeight:300,buttons:null!=(e=this.o.headerButtons)?e:["fullsize","dialog.close"]});return["beforeClose","afterClose","beforeOpen"].forEach(e=>t.events.on(t,e,()=>this.e.fire(e))),t.setSize(this.o.width,this.o.height),t}get storage(){return u.Storage.makeStorage(!!this.o.saveStateInStorage,this.componentName)}get isOpened(){return this._dialog.isOpened&&"none"!==(0,d.cssInline)(this.browser,"display")}status(e,t){!e||(0,c.isAbortError)(e)||((0,c.isString)(e)||(e=e.message),(0,c.isString)(e)&&(0,c.trim)(e).length&&this.message.message(e,t?"success":"error",this.o.howLongShowMsg))}open(e=this.o.defaultCallback,t=!1){return this.state.onlyImages=t,this.async.promise((t,i)=>{var o;if(!this.o.items||!this.o.items.url)throw(0,c.error)("Need set options.filebrowser.ajax.url");let r=0;this.e.off(this.files.container,"dblclick").on(this.files.container,"dblclick",this.onSelect(e)).on(this.files.container,"touchstart",()=>{let t=new Date().getTime();t-r<n.EMULATE_DBLCLICK_TIMEOUT&&this.onSelect(e)(),r=t}).off("select.filebrowser").on("select.filebrowser",this.onSelect(e));let s=this.c.div();null==(o=this.toolbar)||o.appendTo(s),this.__updateToolbarButtons(),this._dialog.open(this.browser,s),this.e.fire("sort.filebrowser",this.state.sortBy),(0,g.loadTree)(this).then(t,i).finally(()=>{var e;this.isInDestruct||null==(e=this===null||void 0===this?void 0:this.e)||e.fire("fileBrowserReady.filebrowser")})}).catch(e=>{if(!(0,c.isAbortError)(e)&&!n.IS_PROD)throw e})}__getButtons(){var e;return(null!=(e=this.o.buttons)?e:[]).filter(e=>{if(!(0,c.isString)(e))return!0;switch(e){case"filebrowser.upload":return this.dataProvider.canI("FileUpload");case"filebrowser.edit":return this.dataProvider.canI("ImageResize")||this.dataProvider.canI("ImageCrop");case"filebrowser.remove":return this.dataProvider.canI("FileRemove")}return!0})}initUploader(e){var t;let i=this,o=null==(t=null==e?void 0:e.options)?void 0:t.uploader,n=(0,c.ConfigProto)(o||{},f.Config.defaultOptions.uploader),r=()=>(0,m.loadItems)(this);i.uploader=i.getInstance("Uploader",n),i.uploader.setPath(i.state.currentPath).setSource(i.state.currentSource).bind(i.browser,r,i.errorHandler),this.state.on(["change.currentPath","change.currentSource"],()=>{this.uploader.setPath(this.state.currentPath).setSource(this.state.currentSource)}),i.e.on("bindUploader.filebrowser",e=>{i.uploader.bind(e,r,i.errorHandler)})}destruct(){var e;!this.isInDestruct&&(null==(e=(0,r.cached)(this,"_dialog"))||e.destruct(),super.destruct(),this.events&&this.e.off(".filebrowser"),this.uploader&&this.uploader.destruct())}__updateToolbarButtons(){var e;let t=this.__getButtons();!function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}(this.__prevButtons,t)&&(this.__prevButtons=t,null==(e=this.toolbar)||e.build(t))}constructor(e){super(e),this.browser=this.c.div(this.componentName),this.status_line=this.c.div(this.getFullElName("status")),this.tree=new k.FileBrowserTree(this),this.files=new k.FileBrowserFiles(this),this.state=(0,l.observable)({currentPath:"",currentSource:w.DEFAULT_SOURCE_NAME,currentBaseUrl:"",activeElements:[],elements:[],sources:[],view:"tiles",sortBy:"changed-desc",filterWord:"",onlyImages:!1}),this.errorHandler=e=>{(0,c.isAbortError)(e)||(e instanceof Error?this.status(this.i18n(e.message)):this.status(this.dataProvider.getMessage(e)))},this.close=()=>{this._dialog.close()},this.__prevButtons=[],this.attachEvents(e),this.options=(0,c.ConfigProto)(e||{},f.Config.defaultOptions.filebrowser),this.browser.component=this,this.container=this.browser,this.o.showFoldersPanel&&a.Dom.append(this.browser,this.tree.container),a.Dom.append(this.browser,this.files.container),a.Dom.append(this.browser,this.status_line),v.selfListeners.call(this),b.nativeListeners.call(this),y.stateListeners.call(this),["getLocalFileByUrl","crop","resize","create","fileMove","folderMove","fileRename","folderRename","fileRemove","folderRemove","folder","items","permissions"].forEach(e=>{null!=this.options[e]&&(this.options[e]=(0,c.ConfigProto)(this.options[e],this.o.ajax))});let{storeView:t,storeSortBy:i,storeLastOpenedFolder:n}=this.o.saveStateInStorage||{storeLastOpenedFolder:!1,storeView:!1,storeSortBy:!1},r=t&&this.storage.get("view");r&&null==this.o.view?this.state.view="list"===r?"list":"tiles":this.state.view="list"===this.o.view?"list":"tiles",this.files.setMod("view",this.state.view);let s=i&&this.storage.get("sortBy");if(s){let e=s.split("-");this.state.sortBy=["changed","name","size"].includes(e[0])?s:"changed-desc"}else this.state.sortBy=this.o.sortBy||"changed-desc";if(n){let e=this.storage.get("currentPath"),t=this.storage.get("currentSource");this.state.currentPath=null!=e?e:"",this.state.currentSource=null!=t?t:""}this.initUploader(this),this.setStatus(o.STATUSES.ready)}};C([r.cache],S.prototype,"dataProvider",null),C([r.cache],S.prototype,"_dialog",null),C([r.cache],S.prototype,"storage",null),C([r.autobind],S.prototype,"status",null),C([r.autobind],S.prototype,"open",null),C([(0,s.watch)("dataProvider:changePermissions")],S.prototype,"__updateToolbarButtons",null),S=C([(0,r.derive)(h.Dlgs)],S)},78513:function(e,t,i){"use strict";i.d(t,{FileBrowser:function(){return o.FileBrowser}});var o=i(75330)},73948:function(e,t,i){"use strict";i.d(t,{nativeListeners:function(){return c}});var o=i(29960),n=i(15456),r=i(41457),s=i(32118),a=i(21735),l=i(20201);function c(){let e=!1,t=(0,s.elementsMap)(this),i=this;i.e.on(i.tree.container,"dragstart",t=>{let o=(0,a.getItem)(t.target,i.container);o&&i.o.moveFolder&&(e=o)}).on(i.tree.container,"drop",t=>{if((i.o.moveFile||i.o.moveFolder)&&e){let n=(0,o.attr)(e,"-path")||"";if(!i.o.moveFolder&&e.classList.contains(this.tree.getFullElName("item"))||e.classList.contains(this.files.getFullElName("item"))&&(n+=(0,o.attr)(e,"-name"),!i.o.moveFile))return!1;let r=(0,a.getItem)(t.target,i.container);r&&(i.dataProvider.move(n,(0,o.attr)(r,"-path")||"",(0,o.attr)(r,"-source")||"",e.classList.contains(this.files.getFullElName("item"))).then(()=>(0,l.loadTree)(this)).catch(i.status),e=!1)}}).on(i.files.container,"contextmenu",(0,r.default)(i)).on(i.files.container,"click",e=>{(0,n.ctrlKey)(e)||(this.state.activeElements=[])}).on(i.files.container,"click",e=>{let o=(0,a.getItem)(e.target,i.container);if(!o)return;let r=(0,a.elementToItem)(o,t);if(r)return(0,n.ctrlKey)(e)?i.state.activeElements=[...i.state.activeElements,r]:i.state.activeElements=[r],e.stopPropagation(),!1}).on(i.files.container,"dragstart",t=>{if(i.o.moveFile){let o=(0,a.getItem)(t.target,i.container);o&&(e=o)}}).on(i.container,"drop",e=>e.preventDefault())}},33281:function(e,t,i){"use strict";i.d(t,{selfListeners:function(){return d}});var o=i(21537),n=i(27613),r=i(11787),s=i(44450),a=i(30465),l=i(20201),c=i(50050);function d(){let e=this.state,t=this.dataProvider,i=this;i.e.on("view.filebrowser",t=>{t!==e.view&&(e.view=t)}).on("sort.filebrowser",t=>{t!==e.sortBy&&(e.sortBy=t,(0,a.loadItems)(i))}).on("filter.filebrowser",t=>{t!==e.filterWord&&(e.filterWord=t,(0,a.loadItems)(i))}).on("openFolder.filebrowser",e=>{let t;t=".."===e.name?e.path.split("/").filter(e=>e.length).slice(0,-1).join("/"):(0,o.normalizePath)(e.path,e.name),i.state.currentPath=t,i.state.currentSource="."===e.name?r.DEFAULT_SOURCE_NAME:e.source}).on("removeFolder.filebrowser",e=>{i.confirm("Are you sure?","Delete",o=>{o&&t.folderRemove(e.path,e.name,e.source).then(e=>(i.status(e,!0),(0,l.loadTree)(i))).catch(i.status)})}).on("renameFolder.filebrowser",e=>{i.prompt("Enter new name","Rename",o=>{if(!(0,n.isValidName)(o))return i.status(i.i18n("Enter new name")),!1;t.folderRename(e.path,e.name,o,e.source).then(e=>(i.state.activeElements=[],i.status(e,!0),(0,l.loadTree)(i))).catch(i.status)},"type name",e.name)}).on("addFolder.filebrowser",e=>{i.prompt("Enter Directory name","Create directory",o=>{t.createFolder(o,e.path,e.source).then(()=>(0,l.loadTree)(i)).catch(i.status)},"type dir name")}).on("fileRemove.filebrowser",()=>{i.state.activeElements.length&&i.confirm("Are you sure?","",e=>{if(e){let e=[];i.state.activeElements.forEach(t=>{e.push((0,s.deleteFile)(i,t.file||t.name||"",t.sourceName))}),i.state.activeElements=[],Promise.all(e).then(()=>(0,l.loadTree)(i).catch(i.status),i.status)}})}).on("edit.filebrowser",()=>{if(1===i.state.activeElements.length){let[e]=this.state.activeElements;c.openImageEditor.call(i,e.fileURL,e.file||"",e.path,e.sourceName)}}).on("fileRename.filebrowser",(e,o,r)=>{1===i.state.activeElements.length&&i.prompt("Enter new name","Rename",s=>{if(!(0,n.isValidName)(s))return i.status(i.i18n("Enter new name")),!1;t.fileRename(o,e,s,r).then(e=>{i.state.activeElements=[],i.status(e,!0),(0,a.loadItems)(i)}).catch(i.status)},"type name",e)}).on("update.filebrowser",()=>{(0,l.loadTree)(this).then(this.status,this.status)})}},94538:function(e,t,i){"use strict";i.d(t,{stateListeners:function(){return l}});var o=i(22732),n=i(71521),r=i(10830),s=i(32118),a=i(20201);function l(){let e=(0,s.elementsMap)(this),{state:t,files:i,create:l,options:c}=this,d=t=>{let i=t.uniqueHashKey;if(e[i])return e[i].elm;let o=l.fromHTML(c.getThumbTemplate.call(this,t,t.source,t.sourceName.toString()));return o.dataset.key=i,e[i]={item:t,elm:o},e[i].elm};t.on(["change.currentPath","change.currentSource"],this.async.debounce(()=>{this.o.saveStateInStorage&&this.o.saveStateInStorage.storeLastOpenedFolder&&this.storage.set("currentPath",this.state.currentPath).set("currentSource",this.state.currentSource),(0,a.loadTree)(this).catch(this.status)},this.defaultTimeout)).on("beforeChange.activeElements",()=>{t.activeElements.forEach(t=>{let{elm:o}=e[t.uniqueHashKey];o&&o.classList.remove(i.getFullElName("item","active",!0))})}).on("change.activeElements",()=>{this.e.fire("changeSelection"),t.activeElements.forEach(t=>{let{elm:o}=e[t.uniqueHashKey];o&&o.classList.add(i.getFullElName("item","active",!0))})}).on("change.view",()=>{i.setMod("view",t.view),this.o.saveStateInStorage&&this.o.saveStateInStorage.storeView&&this.storage.set("view",t.view)}).on("change.sortBy",()=>{this.o.saveStateInStorage&&this.o.saveStateInStorage.storeSortBy&&this.storage.set("sortBy",t.sortBy)}).on("change.elements",this.async.debounce(()=>{o.Dom.detach(i.container),t.elements.length?t.elements.forEach(e=>{o.Dom.append(this.files.container,d(e))}):o.Dom.append(i.container,l.div(this.componentName+"_no-files_true",this.i18n("There are no files")))},this.defaultTimeout)).on("change.sources",this.async.debounce(()=>{o.Dom.detach(this.tree.container),t.sources.forEach(e=>{let t=e.name;if(t&&"default"!==t&&o.Dom.append(this.tree.container,l.div(this.tree.getFullElName("source-title"),t)),e.folders.forEach(i=>{let s=l.a(this.tree.getFullElName("item"),{draggable:"draggable",href:"#","data-path":(0,n.normalizePath)(e.path,i+"/"),"data-name":i,"data-source":t,"data-source-path":e.path},l.span(this.tree.getFullElName("item-title"),i)),a=o=>r=>{this.e.fire(`${o}.filebrowser`,{name:i,path:(0,n.normalizePath)(e.path+"/"),source:t}),r.stopPropagation(),r.preventDefault()};if(this.e.on(s,"click",a("openFolder")),o.Dom.append(this.tree.container,s),".."!==i&&"."!==i){if(c.renameFolder&&this.dataProvider.canI("FolderRename")){let e=(0,r.Button)(this,{icon:{name:"pencil"},name:"rename",tooltip:"Rename",size:"tiny"});e.onAction(a("renameFolder")),o.Dom.append(s,e.container)}if(c.deleteFolder&&this.dataProvider.canI("FolderRemove")){let e=(0,r.Button)(this,{icon:{name:"cancel"},name:"remove",tooltip:"Delete",size:"tiny"});e.onAction(a("removeFolder")),o.Dom.append(s,e.container)}}}),c.createNewFolder&&this.dataProvider.canI("FolderCreate")){let i=(0,r.Button)(this,"plus","Add folder","secondary");i.onAction(()=>{this.e.fire("addFolder",{path:(0,n.normalizePath)(e.path+"/"),source:t})}),this.tree.append(i)}})},this.defaultTimeout))}},97379:function(e,t,i){"use strict";i.d(t,{FileBrowserFiles:function(){return n}});var o=i(67510);class n extends o.UIGroup{className(){return"FileBrowserFiles"}}},8172:function(e,t,i){"use strict";i.d(t,{FileBrowserFiles:function(){return o.FileBrowserFiles},FileBrowserTree:function(){return n.FileBrowserTree}});var o=i(97379),n=i(8193)},8193:function(e,t,i){"use strict";i.d(t,{FileBrowserTree:function(){return n}});var o=i(67510);class n extends o.UIGroup{className(){return"FileBrowserTree"}}},92643:function(e,t,i){"use strict";i.d(t,{Command:function(){return o}});class o{undo(){this.history.snapshot.restore(this.oldValue)}redo(){this.history.snapshot.restore(this.newValue)}constructor(e,t,i,o){this.oldValue=e,this.newValue=t,this.history=i,this.tick=o}}},78818:function(e,t,i){"use strict";i.d(t,{History:function(){return l}});var o=i(80480),n=i(6441),r=i(92643),s=i(52604),a=i(57034);n.Config.prototype.history={enable:!0,maxHistoryLength:1/0,timeout:1e3};class l extends o.ViewComponent{className(){return"History"}redo(){this.__processPendingChanges(),this.__stack.redo()&&(this.startValue=this.snapshot.make(),this.fireChangeStack())}canRedo(){return!this.__hasPendingChanges&&this.__stack.canRedo()}undo(){this.__processPendingChanges(),this.__stack.undo()&&(this.startValue=this.snapshot.make(),this.fireChangeStack())}canUndo(){return this.__hasPendingChanges||this.__stack.canUndo()}clear(){this.startValue=this.snapshot.make(),this.async.clearTimeout(this.__timer),this.__hasPendingChanges=!1,this.__stack.clear(),this.fireChangeStack()}get length(){return this.__stack.length}get startValue(){return this.__startValue}set startValue(e){this.__startValue=e}__upTick(){this.updateTick+=1}onChange(){this.snapshot.isBlocked||this.__hasPendingChanges||(this.__hasPendingChanges=!0,this.__timer=this.async.setTimeout(()=>this.__processPendingChanges(),this.j.o.history.timeout),this.__hasPendingChanges&&this.fireChangeStack())}__processPendingChanges(){this.__hasPendingChanges&&this.__processChanges()}__processChanges(){!this.snapshot.isBlocked&&this.j.o.history.enable&&(this.async.clearTimeout(this.__timer),this.__hasPendingChanges=!1,this.updateStack())}updateStack(e=!1){let t=this.snapshot.make();if(s.Snapshot.equal(t,this.startValue))return;if(t.html===this.startValue.html){this.startValue=t;return}let i=new r.Command(this.startValue,t,this,this.updateTick);if(e){let e=this.__stack.current();e&&this.updateTick===e.tick&&this.__stack.replace(i)}else this.__stack.push(i);this.startValue=t,this.fireChangeStack()}fireChangeStack(){var e;this.j&&!this.j.isInDestruct&&(null==(e=this.j.events)||e.fire("changeStack"))}destruct(){this.isInDestruct||(this.j.events&&this.j.e.off(".history"),this.snapshot.destruct(),super.destruct())}constructor(e,t=new a.Stack(e.o.history.maxHistoryLength),i=new s.Snapshot(e)){super(e),this.updateTick=0,this.__hasPendingChanges=!1,this.__timer=0,this.__stack=t,this.snapshot=i,e.o.history.enable&&e.e.on("afterAddPlace.history",()=>{this.isInDestruct||(this.startValue=this.snapshot.make(),e.events.on("internalChange internalUpdate",()=>{this.__processPendingChanges(),this.startValue=this.snapshot.make()}).on(e.editor,["changeSelection","selectionstart","selectionchange","mousedown","mouseup","keydown","keyup"].map(e=>e+".history").join(" "),()=>{this.startValue.html===this.j.getNativeEditorValue()&&(this.startValue=this.snapshot.make())}).on(this,"change.history",()=>this.onChange()))})}}},52604:function(e,t,i){"use strict";i.d(t,{Snapshot:function(){return s}});var o=i(91907),n=i(82758),r=i(2748);class s extends o.ViewComponent{className(){return"Snapshot"}static equal(e,t){return e.html===t.html&&JSON.stringify(e.range)===JSON.stringify(t.range)&&JSON.stringify(e.ranges)===JSON.stringify(t.ranges)&&!!e.backward==!!t.backward}static countNodesBeforeInParent(e){if(!e.parentNode)return 0;let t=e.parentNode.childNodes,i=0,o=null;for(let n=0;n<t.length;n+=1){if(!o||this.isIgnoredNode(t[n])||r.Dom.isText(o)&&r.Dom.isText(t[n])||(i+=1),t[n]===e)return i;o=t[n]}return 0}static strokeOffset(e,t){for(;r.Dom.isText(e);)e=e.previousSibling,r.Dom.isText(e)&&e.nodeValue&&(t+=e.nodeValue.length);return t}calcHierarchyLadder(e){let t=[];if(!e||!e.parentNode||!r.Dom.isOrContains(this.j.editor,e))return[];for(;e&&e!==this.j.editor;)e&&!s.isIgnoredNode(e)&&t.push(s.countNodesBeforeInParent(e)),e=e.parentNode;return t.reverse()}getElementByLadder(e){let t=this.j.editor,i;for(i=0;t&&i<e.length;i+=1)t=t.childNodes[e[i]];return t}get isBlocked(){return this.__isBlocked}__block(e){this.__isBlocked=e}transaction(e){this.__block(!0),this.__levelOfTransaction+=1;try{e()}catch(e){if(!n.IS_PROD)throw e}finally{this.__levelOfTransaction-=1,0===this.__levelOfTransaction&&this.__block(!1)}}make(){let e={html:"",range:{startContainer:[],startOffset:0,endContainer:[],endOffset:0}};e.html=this.__getCleanedEditorValue(this.j.editor);let t=this.j.s.sel;if(t&&t.rangeCount){let i=[];for(let e=0;e<t.rangeCount;e+=1){let o=t.getRangeAt(e),n=this.calcHierarchyLadder(o.startContainer),r=this.calcHierarchyLadder(o.endContainer),a=s.strokeOffset(o.startContainer,o.startOffset),l=s.strokeOffset(o.endContainer,o.endOffset);n.length||o.startContainer===this.j.editor||(a=0),r.length||o.endContainer===this.j.editor||(l=0),i.push({startContainer:n,startOffset:a,endContainer:r,endOffset:l})}e.range=i[0],i.length>1?e.ranges=i:t.isCollapsed||t.anchorNode!==t.getRangeAt(0).endContainer||t.anchorOffset!==t.getRangeAt(0).endOffset||(e.backward=!0)}return e}restore(e){this.transaction(()=>{let t=this.storeScrollState();this.__getCleanedEditorValue(this.j.editor)!==e.html&&(this.j.value=e.html),this.restoreOnlySelection(e),this.restoreScrollState(t)})}storeScrollState(){return[this.j.ow.scrollY,this.j.editor.scrollTop]}restoreScrollState(e){let{j:t}=this,{ow:i}=t;i.scrollTo(i.scrollX,e[0]),t.editor.scrollTop=e[1]}restoreOnlySelection(e){var t;try{if(e.range){let i=(null!=(t=e.ranges)?t:[e.range]).map(e=>{let t=this.j.ed.createRange();return t.setStart(this.getElementByLadder(e.startContainer),e.startOffset),t.setEnd(this.getElementByLadder(e.endContainer),e.endOffset),t});this.j.s.selectRange(i[0]);let o=this.j.s.sel;if(i.slice(1).forEach(e=>null==o?void 0:o.addRange(e)),e.backward&&1===i.length){let e=i[0];null==o||o.setBaseAndExtent(e.endContainer,e.endOffset,e.startContainer,e.startOffset)}}}catch(e){this.j.editor.lastChild&&this.j.s.setCursorAfter(this.j.editor.lastChild),n.IS_PROD}}destruct(){this.__block(!1),super.destruct()}static isIgnoredNode(e){return r.Dom.isText(e)&&!e.nodeValue||r.Dom.isTemporary(e)}__getCleanedEditorValue(e){let t=e.cloneNode(!0);return r.Dom.temporaryList(t).forEach(r.Dom.unwrap),t.innerHTML}constructor(){super(...arguments),this.__isBlocked=!1,this.__levelOfTransaction=0}}},57034:function(e,t,i){"use strict";i.d(t,{Stack:function(){return o}});class o{get length(){return this.commands.length}clearRedo(){this.commands.length=this.stackPosition+1}clear(){this.commands.length=0,this.stackPosition=-1}push(e){this.clearRedo(),this.commands.push(e),this.stackPosition+=1,this.commands.length>this.size&&(this.commands.shift(),this.stackPosition-=1)}replace(e){this.commands[this.stackPosition]=e}current(){return this.commands[this.stackPosition]}undo(){return!!this.canUndo()&&(this.commands[this.stackPosition]&&this.commands[this.stackPosition].undo(),this.stackPosition-=1,!0)}redo(){return!!this.canRedo()&&(this.stackPosition+=1,this.commands[this.stackPosition]&&this.commands[this.stackPosition].redo(),!0)}canUndo(){return this.stackPosition>=0}canRedo(){return this.stackPosition<this.commands.length-1}constructor(e){this.size=e,this.commands=[],this.stackPosition=-1}}},62489:function(e,t,i){"use strict";var o=i(12153),n=i(6441),r=i(49922),s=i(72144);n.Config.prototype.imageeditor={min_width:20,min_height:20,closeAfterSave:!1,width:"85%",height:"85%",crop:!0,resize:!0,resizeUseRatio:!0,resizeMinWidth:20,resizeMinHeight:20,cropUseRatio:!0,cropDefaultWidth:"70%",cropDefaultHeight:"70%"},o.Icon.set("crop",r.default).set("resize",s.default)},49922:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M7 2v15h15M2 7h15v15"/> </g> </svg> '},72144:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2"/><path d="M8 16 16 8m-6 0h6v6"/> </g> </svg> '},50050:function(e,t,i){"use strict";i.d(t,{ImageEditor:function(){return k},openImageEditor:function(){return C}});var o,n=i(91907),r=i(65478),s=i(22732),a=i(49055),l=i(29960),c=i(41180),d=i(76078),u=i(37790),h=i(62843),p=i(6441);i(62489);var f=i(22461),m=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let g="jodit-image-editor",b=e=>t=>t.classList.contains(e);function v(e,t){return s.Dom.first(e,e=>s.Dom.isHTMLElement(e)&&t(e))}function y(e,t){let i=[];return s.Dom.each(e,e=>{s.Dom.isHTMLElement(e)&&t(e)&&i.push(e)}),i}let w="resize",_="crop",k=o=class e extends n.ViewComponent{className(){return"ImageEditor"}get o(){return this.options}hide(){this._dialog.close()}open(e,t){return this.j.async.promise(i=>{let o=new Date().getTime();this.image=this.j.c.element("img");let n=e=>s.Dom.isTag(e,"img")||b("jodit-icon_loader")(e);y(this.resize_box,n).forEach(s.Dom.safeRemove),y(this.crop_box,n).forEach(s.Dom.safeRemove),(0,c.css)(this.cropHandler,"background","transparent"),this.onSave=t,s.Dom.append(this.resize_box,this.j.c.element("i",{class:"jodit-icon_loader"})),s.Dom.append(this.crop_box,this.j.c.element("i",{class:"jodit-icon_loader"})),/\?/.test(e)?e+="&_tst="+o:e+="?_tst="+o,(0,l.attr)(this.image,"src",e),this._dialog.open();let{widthInput:r,heightInput:a}=(0,d.refs)(this.editor),u=()=>{this.isDestructed||(this.image.removeEventListener("load",u),this.naturalWidth=this.image.naturalWidth,this.naturalHeight=this.image.naturalHeight,r.value=this.naturalWidth.toString(),a.value=this.naturalHeight.toString(),this.ratio=this.naturalWidth/this.naturalHeight,s.Dom.append(this.resize_box,this.image),this.cropImage=this.image.cloneNode(!0),s.Dom.append(this.crop_box,this.cropImage),s.Dom.safeRemove.apply(null,y(this.editor,b("jodit-icon_loader"))),this.activeTab===_&&this.showCrop(),this.j.e.fire(this.resizeHandler,"updatesize"),this.j.e.fire(this.cropHandler,"updatesize"),this._dialog.setPosition(),this.j.e.fire("afterImageEditor"),i(this._dialog))};this.image.addEventListener("load",u),this.image.complete&&u()})}onTitleModeClick(e){let t=this,i=e.target,o=null==i?void 0:i.parentElement;if(!o)return;y(t.editor,e=>b(`${g}__slider`)(e)||b(`${g}__area`)(e)).forEach(e=>e.classList.remove(`${g}_active`)),o.classList.add(`${g}_active`),this.activeTab=(0,l.attr)(o,"-area")||w;let n=v(t.editor,e=>b(`${g}__area`)(e)&&b(`${g}__area_`+t.activeTab)(e));n&&n.classList.add(`${g}_active`),t.activeTab===_&&t.showCrop()}onChangeSizeInput(e){let t,i=e.target,{widthInput:o,heightInput:n}=(0,d.refs)(this.editor),r="widthInput"===(0,l.attr)(i,"data-ref"),s=parseInt(i.value,10),a=r?this.o.min_width:this.o.min_height,u=r?this.o.min_height:this.o.min_width;s>a&&((0,c.css)(this.image,r?"width":"height",s),this.resizeUseRatio&&(t=r?Math.round(s/this.ratio):Math.round(s*this.ratio))>u&&((0,c.css)(this.image,r?"height":"width",t),r?n.value=t.toString():o.value=t.toString())),this.j.e.fire(this.resizeHandler,"updatesize")}onResizeHandleMouseDown(e){this.target=e.target,e.preventDefault(),e.stopImmediatePropagation(),this.clicked=!0,this.start_x=e.clientX,this.start_y=e.clientY,this.activeTab===_?(this.top_x=(0,c.css)(this.cropHandler,"left"),this.top_y=(0,c.css)(this.cropHandler,"top"),this.width=this.cropHandler.offsetWidth,this.height=this.cropHandler.offsetHeight):(this.width=this.image.offsetWidth,this.height=this.image.offsetHeight),this.j.e.on(this.j.ow,"mousemove",this.onGlobalMouseMove).one(this.j.ow,"mouseup",this.onGlobalMouseUp)}onGlobalMouseUp(e){this.clicked&&(this.clicked=!1,e.stopImmediatePropagation(),this.j.e.off(this.j.ow,"mousemove",this.onGlobalMouseMove))}onGlobalMouseMove(e){if(!this.clicked)return;let{widthInput:t,heightInput:i}=(0,d.refs)(this.editor);this.diff_x=e.clientX-this.start_x,this.diff_y=e.clientY-this.start_y,this.activeTab===w&&this.resizeUseRatio||this.activeTab===_&&this.cropUseRatio?this.diff_x?(this.new_w=this.width+this.diff_x,this.new_h=Math.round(this.new_w/this.ratio)):(this.new_h=this.height+this.diff_y,this.new_w=Math.round(this.new_h*this.ratio)):(this.new_w=this.width+this.diff_x,this.new_h=this.height+this.diff_y),this.activeTab===w?(this.new_w>this.o.resizeMinWidth&&((0,c.css)(this.image,"width",this.new_w+"px"),t.value=this.new_w.toString()),this.new_h>this.o.resizeMinHeight&&((0,c.css)(this.image,"height",this.new_h+"px"),i.value=this.new_h.toString()),this.j.e.fire(this.resizeHandler,"updatesize")):(this.target!==this.cropHandler?(this.top_x+this.new_w>this.cropImage.offsetWidth&&(this.new_w=this.cropImage.offsetWidth-this.top_x),this.top_y+this.new_h>this.cropImage.offsetHeight&&(this.new_h=this.cropImage.offsetHeight-this.top_y),(0,c.css)(this.cropHandler,{width:this.new_w,height:this.new_h})):(this.top_x+this.diff_x+this.cropHandler.offsetWidth>this.cropImage.offsetWidth&&(this.diff_x=this.cropImage.offsetWidth-this.top_x-this.cropHandler.offsetWidth),(0,c.css)(this.cropHandler,"left",this.top_x+this.diff_x),this.top_y+this.diff_y+this.cropHandler.offsetHeight>this.cropImage.offsetHeight&&(this.diff_y=this.cropImage.offsetHeight-this.top_y-this.cropHandler.offsetHeight),(0,c.css)(this.cropHandler,"top",this.top_y+this.diff_y)),this.j.e.fire(this.cropHandler,"updatesize"))}destruct(){this.isDestructed||(this._dialog&&!this._dialog.isInDestruct&&this._dialog.destruct(),s.Dom.safeRemove(this.editor),this.j.e&&this.j.e.off(this.j.ow,"mousemove",this.onGlobalMouseMove).off(this.j.ow,"mouseup",this.onGlobalMouseUp).off(this.ow,"."+g).off("."+g),super.destruct())}constructor(e){super(e),this.resizeUseRatio=!0,this.cropUseRatio=!0,this.clicked=!1,this.start_x=0,this.start_y=0,this.top_x=0,this.top_y=0,this.width=0,this.height=0,this.activeTab=w,this.naturalWidth=0,this.naturalHeight=0,this.ratio=0,this.new_h=0,this.new_w=0,this.diff_x=0,this.diff_y=0,this.cropBox={x:0,y:0,w:0,h:0},this.resizeBox={w:0,h:0},this.calcCropBox=()=>{let e,t,i=this.crop_box.parentNode,o=.8*i.offsetWidth,n=.8*i.offsetHeight,{naturalWidth:r,naturalHeight:s}=this;o>r&&n>s?(e=r,t=s):this.ratio>o/n?(e=o,t=o/r*s):(e=n/s*r,t=n),(0,c.css)(this.crop_box,{width:e,height:t})},this.showCrop=()=>{if(!this.cropImage)return;this.calcCropBox();let e=this.cropImage.offsetWidth||this.image.offsetWidth||this.image.naturalWidth;this.new_w=o.calcValueByPercent(e,this.o.cropDefaultWidth);let t=this.cropImage.offsetHeight||this.image.offsetHeight||this.image.naturalHeight;this.cropUseRatio?this.new_h=this.new_w/this.ratio:this.new_h=o.calcValueByPercent(t,this.o.cropDefaultHeight),(0,c.css)(this.cropHandler,{backgroundImage:"url("+(0,l.attr)(this.cropImage,"src")+")",width:this.new_w,height:this.new_h,left:e/2-this.new_w/2,top:t/2-this.new_h/2}),this.j.e.fire(this.cropHandler,"updatesize")},this.updateCropBox=()=>{if(!this.cropImage)return;let e=this.cropImage.offsetWidth/this.naturalWidth,t=this.cropImage.offsetHeight/this.naturalHeight;this.cropBox.x=(0,c.css)(this.cropHandler,"left")/e,this.cropBox.y=(0,c.css)(this.cropHandler,"top")/t,this.cropBox.w=this.cropHandler.offsetWidth/e,this.cropBox.h=this.cropHandler.offsetHeight/t,this.sizes.textContent=this.cropBox.w.toFixed(0)+"x"+this.cropBox.h.toFixed(0)},this.updateResizeBox=()=>{this.resizeBox.w=this.image.offsetWidth||this.naturalWidth,this.resizeBox.h=this.image.offsetHeight||this.naturalHeight},this.setHandlers=()=>{let e=this,{widthInput:t,heightInput:i}=(0,d.refs)(this.editor);e.j.e.on([v(e.editor,b("jodit_bottomright")),e.cropHandler],"mousedown."+g,this.onResizeHandleMouseDown).on(this.j.ow,"resize."+g,()=>{this.j.e.fire(e.resizeHandler,"updatesize"),e.showCrop(),this.j.e.fire(e.cropHandler,"updatesize")}),e.j.e.on(y(this.editor,b(`${g}__slider-title`)),"click",this.onTitleModeClick).on([t,i],"input",this.onChangeSizeInput);let{keepAspectRatioResize:o,keepAspectRatioCrop:n}=(0,d.refs)(this.editor);o&&o.addEventListener("change",()=>{this.resizeUseRatio=o.checked}),n&&n.addEventListener("change",()=>{this.cropUseRatio=n.checked}),e.j.e.on(e.resizeHandler,"updatesize",()=>{(0,c.css)(e.resizeHandler,{top:0,left:0,width:e.image.offsetWidth||e.naturalWidth,height:e.image.offsetHeight||e.naturalHeight}),this.updateResizeBox()}).on(e.cropHandler,"updatesize",()=>{if(!e.cropImage)return;let t=(0,c.css)(e.cropHandler,"left"),i=(0,c.css)(e.cropHandler,"top"),o=e.cropHandler.offsetWidth,n=e.cropHandler.offsetHeight;t<0&&(t=0),i<0&&(i=0),t+o>e.cropImage.offsetWidth&&(o=e.cropImage.offsetWidth-t,e.cropUseRatio&&(n=o/e.ratio)),i+n>e.cropImage.offsetHeight&&(n=e.cropImage.offsetHeight-i,e.cropUseRatio&&(o=n*e.ratio)),(0,c.css)(e.cropHandler,{width:o,height:n,left:t,top:i,backgroundPosition:-t-1+"px "+(-i-1)+"px",backgroundSize:e.cropImage.offsetWidth+"px "+e.cropImage.offsetHeight+"px"}),e.updateCropBox()}),Object.values(e.buttons).forEach(o=>{o.onAction(()=>{let n={action:e.activeTab,box:e.activeTab===w?e.resizeBox:e.cropBox};switch(o){case e.buttons.saveas:e.j.prompt("Enter new name","Save in new file",t=>{if(!(0,a.trim)(t))return e.j.alert("The name should not be empty"),!1;e.j.e.fire("afterImageEditorSave",n,t),e.onSave(t,n,e.hide,t=>{e.j.alert(t.message)})});break;case e.buttons.save:e.j.e.fire("afterImageEditorSave",n),e.onSave(void 0,n,e.hide,t=>{e.j.alert(t.message)});break;case e.buttons.reset:e.activeTab===w?((0,c.css)(e.image,{width:null,height:null}),t.value=e.naturalWidth.toString(),i.value=e.naturalHeight.toString(),e.j.e.fire(e.resizeHandler,"updatesize")):e.showCrop()}})})},this.options=e&&e.o&&e.o.imageeditor?e.o.imageeditor:p.Config.defaultOptions.imageeditor;let t=this.options;this.resizeUseRatio=t.resizeUseRatio,this.cropUseRatio=t.cropUseRatio,this.buttons={reset:(0,h.Button)(this.j,"update","Reset"),save:(0,h.Button)(this.j,"save","Save"),saveas:(0,h.Button)(this.j,{icon:{name:"save"},name:"save-as",text:"Save as ..."})},this.activeTab=t.resize?w:_,this.editor=(0,f.form)(this.j,this.options);let{resizeBox:i,cropBox:n}=(0,d.refs)(this.editor);this.resize_box=i,this.crop_box=n,this.sizes=v(this.editor,e=>b(`${g}__sizes`)(e)&&!!s.Dom.closest(e,e=>s.Dom.isHTMLElement(e)&&b(`${g}__area_crop`)(e),this.editor)),this.resizeHandler=v(this.editor,b(`${g}__resizer`)),this.cropHandler=v(this.editor,b(`${g}__croper`)),this._dialog=this.j.dlg({buttons:["fullsize","dialog.close"]}),this._dialog.setContent(this.editor),this._dialog.setSize(this.o.width,this.o.height),this._dialog.setHeader([this.buttons.reset,this.buttons.save,this.buttons.saveas]),this.setHandlers()}};function C(e,t,i,o,n,r){return this.getInstance("ImageEditor",this.o).open(e,(e,s,a,l)=>{if("saved"===s.action){a(),n&&n(s.newPath);return}(0,u.call)("resize"===s.action?this.dataProvider.resize:this.dataProvider.crop,i,o,t,e,s.box).then(e=>{e&&(a(),n&&n("string"==typeof e?e:void 0))}).catch(e=>{l(e),r&&r(e)})})}k.calcValueByPercent=(e,t)=>{let i,o=t.toString(),n=parseFloat(e.toString());return(i=/^[-+]?[0-9]+(px)?$/.exec(o))?parseInt(o,10):(i=/^([-+]?[0-9.]+)%$/.exec(o))?Math.round(n*(parseFloat(i[1])/100)):n||0},m([r.autobind],k.prototype,"hide",null),m([r.autobind],k.prototype,"open",null),m([r.autobind],k.prototype,"onTitleModeClick",null),m([(0,r.debounce)(),r.autobind],k.prototype,"onChangeSizeInput",null),m([r.autobind],k.prototype,"onResizeHandleMouseDown",null),m([r.autobind],k.prototype,"onGlobalMouseUp",null),m([(0,r.throttle)(10)],k.prototype,"onGlobalMouseMove",null),k=o=m([r.component],k)},22461:function(e,t,i){"use strict";var o=i(67510);let n="jodit-image-editor",r=o.Icon.get.bind(o.Icon),s=(e,t="jodti-image-editor_active")=>e?t:"";i.d(t,["form",0,(e,t)=>{let i=e.i18n.bind(e),o=(e,t,o=!0)=>`<div class="jodit-form__group">
|
|
66
66
|
<label class="jodit-switcher-wrapper">
|
|
67
67
|
<span class='jodit-switcher'>
|
|
68
68
|
<input ${s(o,"checked")} data-ref="${t}" type="checkbox"/>
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
</div>`:""}
|
|
122
122
|
</div>
|
|
123
123
|
</div>
|
|
124
|
-
</form>`)}])},41409:function(e,t,i){"use strict";i.r(t),i.d(t,{Ajax:function(){return p.Ajax},Alert:function(){return s.Alert},Async:function(){return l.Async},AsyncStorage:function(){return j.AsyncStorage},Button:function(){return f.Button},CommitStyle:function(){return T.CommitStyle},Component:function(){return o.Component},Confirm:function(){return s.Confirm},ContextMenu:function(){return r.ContextMenu},Create:function(){return c.Create},Dialog:function(){return s.Dialog},Dom:function(){return d.Dom},EventEmitter:function(){return u.EventEmitter},EventHandlersStore:function(){return u.EventHandlersStore},Eventify:function(){return u.Eventify},FileBrowser:function(){return a.FileBrowser},Helpers:function(){return n},History:function(){return b.History},Icon:function(){return f.Icon},ImageEditor:function(){return y.ImageEditor},IndexedDBProvider:function(){return j.IndexedDBProvider},LazyWalker:function(){return d.LazyWalker},LocalStorageProvider:function(){return j.LocalStorageProvider},MemoryStorageProvider:function(){return j.MemoryStorageProvider},Plugin:function(){return h.Plugin},PluginSystem:function(){return E.PluginSystem},Popup:function(){return f.Popup},ProgressBar:function(){return f.ProgressBar},Prompt:function(){return s.Prompt},Response:function(){return p.Response},STATUSES:function(){return o.STATUSES},Selection:function(){return T.Selection},Snapshot:function(){return v.Snapshot},StatusBar:function(){return _.StatusBar},Storage:function(){return j.Storage},StorageKey:function(){return j.StorageKey},Table:function(){return k.Table},ToolbarButton:function(){return C.ToolbarButton},ToolbarCollection:function(){return S.ToolbarCollection},ToolbarContent:function(){return C.ToolbarContent},ToolbarEditorCollection:function(){return x.ToolbarEditorCollection},ToolbarSelect:function(){return C.ToolbarSelect},UIBlock:function(){return f.UIBlock},UIButton:function(){return f.UIButton},UIButtonGroup:function(){return f.UIButtonGroup},UIButtonState:function(){return f.UIButtonState},UICheckbox:function(){return f.UICheckbox},UIElement:function(){return f.UIElement},UIFileInput:function(){return f.UIFileInput},UIForm:function(){return f.UIForm},UIGroup:function(){return f.UIGroup},UIInput:function(){return f.UIInput},UIList:function(){return f.UIList},UIMessages:function(){return w.UIMessages},UISelect:function(){return f.UISelect},UISeparator:function(){return f.UISeparator},UISpacer:function(){return f.UISpacer},UITextArea:function(){return f.UITextArea},UITooltip:function(){return f.UITooltip},Uploader:function(){return I.Uploader},View:function(){return m.View},ViewComponent:function(){return o.ViewComponent},ViewWithToolbar:function(){return g.ViewWithToolbar},canUseIndexedDB:function(){return j.canUseIndexedDB},canUsePersistentStorage:function(){return j.canUsePersistentStorage},clearUseIndexedDBCache:function(){return j.clearUseIndexedDBCache},defaultNameSpace:function(){return u.defaultNameSpace},observable:function(){return u.observable}});var o=i(91907),n=i(21537),r=i(80870),s=i(638),a=i(78513),l=i(8884),c=i(12060),d=i(22732),u=i(3827),h=i(50911),p=i(41601),f=i(67510),m=i(35608),g=i(84075),b=i(78818),v=i(52604),y=i(50050),w=i(1808),_=i(23512),k=i(76014),C=i(36646),S=i(11676),x=i(37426),I=i(57380),E=i(41876),T=i(59242),j=i(12081)},68389:function(e,t,i){"use strict";i.d(t,{UIMessage:function(){return r}});var o=i(87325),n=i(67510);let r=class e extends n.UIElement{className(){return"UIMessage"}constructor(e,t){super(e),this.setMod("active",!0),this.setMod("variant",t.variant),this.container.textContent=t.text}};r=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([o.component],r)},1808:function(e,t,i){"use strict";i.d(t,{UIMessages:function(){return l}});var o=i(87325),n=i(2748),r=i(41180),s=i(62405),a=i(68389);let l=class e extends s.UIGroup{className(){return"UIMessages"}info(e,t){this.__message(e,"info",t)}success(e,t){this.__message(e,"success",t)}error(e,t){this.__message(e,"error",t)}message(e,t,i){this.__message(e,t,i)}__message(e,t="info",i){let o=e+":"+t;if(this.__messages.has(o))return void this.async.updateTimeout(o,i||this.options.defaultTimeout);if(!this.__box)throw Error("Container is not defined: "+o);n.Dom.append(this.__box,this.container);let r=new a.UIMessage(this.j,{text:e,variant:t});this.append(r),this.__calcOffsets(),this.__messages.add(o);let s=this.__getRemoveCallback(r,o);this.j.e.on(r.container,"pointerdown",s),this.async.setTimeout(s,{label:o,timeout:i||this.options.defaultTimeout})}__getRemoveCallback(e,t){let i=o=>{o&&o.preventDefault(),e.isInDestruct||(this.async.clearTimeout(t),this.j.e.off(e.container,"pointerdown",i),this.__messages.delete(t),e.setMod("active",!1),this.async.setTimeout(()=>{this.remove(e),e.destruct(),this.__calcOffsets()},300))};return i}__calcOffsets(){let e=5;this.elements.forEach(t=>{(0,r.css)(t.container,"bottom",e+"px"),e+=t.container.offsetHeight+this.options.defaultOffset})}constructor(e,t,i={defaultTimeout:3e3,defaultOffset:5}){super(e),this.__box=t,this.options=i,this.__messages=new Set}};l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([o.component],l)},23512:function(e,t,i){"use strict";i.d(t,{StatusBar:function(){return l}});var o=i(91907),n=i(65478),r=i(2748),s=i(14316),a=i(34176);let l=class e extends o.ViewComponent{className(){return"StatusBar"}hide(){this.container.classList.add("jodit_hidden")}show(){this.container.classList.remove("jodit_hidden")}get isShown(){return!this.container.classList.contains("jodit_hidden")}getHeight(){var e,t;return null!=(t=null==(e=this.container)?void 0:e.offsetHeight)?t:0}findEmpty(e=!1){let t=this.getElms(e?"item-right":"item");for(let e=0;e<t.length;e+=1)if(!t[e].innerHTML.trim().length)return t[e]}append(e,t=!1){let i=this.findEmpty(t)||this.j.c.div(this.getFullElName("item"));t&&i.classList.add(this.getFullElName("item-right")),r.Dom.append(i,e),this.container&&r.Dom.append(this.container,i),this.j.o.statusbar&&this.show(),this.j.e.fire("resize")}destruct(){this.isInDestruct||(this.setStatus(o.STATUSES.beforeDestruct),r.Dom.safeRemove(this.container),super.destruct())}constructor(e,t){super(e),this.target=t,this.mods={},this.container=e.c.div("jodit-status-bar"),r.Dom.append(t,this.container),this.hide()}};l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([n.component,(0,n.derive)(a.Mods,s.Elms)],l)},76014:function(e,t,i){"use strict";i.d(t,{Table:function(){return u}});var o=i(91907),n=i(82758),r=i(65478),s=i(22732),a=i(580),l=i(21537),c=i(41180);let d=new WeakMap;class u extends o.ViewComponent{className(){return"Table"}__recalculateStyles(){let e=(0,a.getContainer)(this.j,u,"style",!0),t=[];this.selected.forEach(e=>{let i=(0,l.cssPath)(e);i&&t.push(i)}),e.innerHTML=t.length?t.join(",")+`{${this.jodit.options.table.selectionCellStyle}}`:""}addSelection(e){this.selected.add(e),this.__recalculateStyles();let t=s.Dom.closest(e,"table",this.j.editor);if(t){let i=u.__selectedByTable.get(t)||new Set;i.add(e),u.__selectedByTable.set(t,i)}}removeSelection(e){this.selected.delete(e),this.__recalculateStyles();let t=s.Dom.closest(e,"table",this.j.editor);if(t){let i=u.__selectedByTable.get(t);i&&(i.delete(e),i.size||u.__selectedByTable.delete(t))}}getAllSelectedCells(){return(0,l.toArray)(this.selected)}static __getSelectedCellsByTable(e){let t=u.__selectedByTable.get(e);return t?(0,l.toArray)(t):[]}destruct(){return this.selected.clear(),super.destruct()}static __getRowsCount(e){return e.rows.length}getRowsCount(e){return u.__getRowsCount(e)}static __getColumnsCount(e){return u.__formalMatrix(e).reduce((e,t)=>Math.max(e,t.length),0)}getColumnsCount(e){return u.__getColumnsCount(e)}static __formalMatrix(e,t){let i=[[]],o=(0,l.toArray)(e.rows),n=(e,o)=>{void 0===i[o]&&(i[o]=[]);let n=e.colSpan,r=e.rowSpan,s,a,l=0;for(;i[o][l];)l+=1;for(a=0;r>a;a+=1)for(s=0;s<n;s+=1){if(void 0===i[o+a]&&(i[o+a]=[]),t&&!1===t(e,o+a,l+s,n,r))return!1;i[o+a][l+s]=e}};for(let e=0;e<o.length;e+=1){let t=(0,l.toArray)(o[e].cells);for(let o=0;o<t.length;o+=1)if(!1===n(t[o],e))return i}return i}formalMatrix(e,t){return u.__formalMatrix(e,t)}static __formalCoordinate(e,t,i=!1){let o=0,n=0,r=1,s=1;return u.__formalMatrix(e,(e,a,l,c,d)=>{if(t===e)return o=a,n=l,r=c||1,s=d||1,i&&(n+=(c||1)-1,o+=(d||1)-1),!1}),[o,n,r,s]}formalCoordinate(e,t,i=!1){return u.__formalCoordinate(e,t,i)}static __appendRow(e,t,i,o){let n;if(t)n=t.cloneNode(!0),s.Dom.each(t,e=>{if(!s.Dom.isCell(e))return;let t=(0,l.attr)(e,"rowspan");if(t&&parseInt(t,10)>1){let i=parseInt(t,10)-1;(0,l.attr)(e,"rowspan",i>1?i:null)}}),s.Dom.each(n,e=>{s.Dom.isCell(e)&&s.Dom.detach(e)});else{let t=u.__getColumnsCount(e);n=o.element("tr");for(let e=0;e<t;e+=1)s.Dom.append(n,o.element("td"))}i&&t&&t.nextSibling?s.Dom.after(t,n):!i&&t?s.Dom.before(t,n):s.Dom.append(s.Dom.first(e,e=>s.Dom.isTag(e,"tbody"))||e,n)}appendRow(e,t,i){return u.__appendRow(e,t,i,this.j.createInside)}static __removeRow(e,t){let i,o=u.__formalMatrix(e),n=e.rows[t];o[t].forEach((r,a)=>{if(i=!1,t-1>=0&&o[t-1][a]===r)i=!0;else if(o[t+1]&&o[t+1][a]===r){if(r.parentNode===n&&r.parentNode.nextSibling){i=!0;let n=a+1;for(;o[t+1][n]===r;)n+=1;let l=s.Dom.next(r.parentNode,e=>s.Dom.isTag(e,"tr"),e);if(l){let e=null;for(let i=n;i<o[t+1].length;i+=1){let n=o[t+1][i];if(n&&n.parentNode===l){e=n;break}}e?s.Dom.before(e,r):s.Dom.append(l,r)}}}else s.Dom.safeRemove(r);if(i&&(r.parentNode===n||r!==o[t][a-1])){let e=r.rowSpan;(0,l.attr)(r,"rowspan",e-1>1?e-1:null)}}),s.Dom.safeRemove(n)}removeRow(e,t){return u.__removeRow(e,t)}appendColumn(e,t,i=!0){let o=u.__formalMatrix(e);if(!i&&s.Dom.isCell(t.previousElementSibling))return this.appendColumn(e,t.previousElementSibling,!0);let[,n]=u.__formalCoordinate(e,t,i),r=i?n+1:n;for(let e=0;e<o.length;){let t=o[e];if(t[n]!==t[r]||n===r){let e=this.j.createInside.element("td");i?s.Dom.after(t[n],e):s.Dom.before(t[n],e),t[n].rowSpan>1&&(e.rowSpan=t[n].rowSpan)}else t[n].colSpan+=1;e+=t[n].rowSpan||1}}static __removeColumn(e,t){let i,o=u.__formalMatrix(e);o.forEach((e,n)=>{let r=e[t];if(i=!1,t-1>=0&&o[n][t-1]===r||t+1<e.length&&o[n][t+1]===r?i=!0:s.Dom.safeRemove(r),i&&(n-1<0||r!==o[n-1][t])){let e=r.colSpan;(0,l.attr)(r,"colspan",e-1>1?(e-1).toString():null)}})}removeColumn(e,t){return u.__removeColumn(e,t)}static __getSelectedBound(e,t){let i,o,n,r=[[1/0,1/0],[0,0]],s=u.__formalMatrix(e);for(i=0;i<s.length;i+=1)for(o=0;s[i]&&o<s[i].length;o+=1)t.includes(s[i][o])&&(r[0][0]=Math.min(i,r[0][0]),r[0][1]=Math.min(o,r[0][1]),r[1][0]=Math.max(i,r[1][0]),r[1][1]=Math.max(o,r[1][1]));for(i=r[0][0];i<=r[1][0];i+=1)for(n=1,o=r[0][1];o<=r[1][1];o+=1){for(;s[i]&&s[i][o-n]&&s[i][o]===s[i][o-n];)r[0][1]=Math.min(o-n,r[0][1]),r[1][1]=Math.max(o-n,r[1][1]),n+=1;for(n=1;s[i]&&s[i][o+n]&&s[i][o]===s[i][o+n];)r[0][1]=Math.min(o+n,r[0][1]),r[1][1]=Math.max(o+n,r[1][1]),n+=1;for(n=1;s[i-n]&&s[i][o]===s[i-n][o];)r[0][0]=Math.min(i-n,r[0][0]),r[1][0]=Math.max(i-n,r[1][0]),n+=1;for(n=1;s[i+n]&&s[i][o]===s[i+n][o];)r[0][0]=Math.min(i+n,r[0][0]),r[1][0]=Math.max(i+n,r[1][0]),n+=1}return r}getSelectedBound(e,t){return u.__getSelectedBound(e,t)}static __normalizeTable(e){let t=[],i=u.__formalMatrix(e);u.__removeExtraColspans(i,t),u.__removeExtraRowspans(i,t);for(let e=0;e<i.length;e+=1)for(let t=0;t<i[e].length;t+=1)void 0!==i[e][t]&&(i[e][t].hasAttribute("rowspan")&&1===i[e][t].rowSpan&&(0,l.attr)(i[e][t],"rowspan",null),i[e][t].hasAttribute("colspan")&&1===i[e][t].colSpan&&(0,l.attr)(i[e][t],"colspan",null),i[e][t].hasAttribute("class")&&!(0,l.attr)(i[e][t],"class")&&(0,l.attr)(i[e][t],"class",null));u.__unmark(t)}static __removeExtraColspans(e,t){for(let i=0;i<e[0].length;i+=1){let o=1e6,n=!1;for(let t=0;t<e.length;t+=1)if(void 0!==e[t][i]){if(e[t][i].colSpan<2){n=!0;break}o=Math.min(o,e[t][i].colSpan)}if(!n)for(let n=0;n<e.length;n+=1)void 0!==e[n][i]&&u.__mark(e[n][i],"colspan",e[n][i].colSpan-o+1,t)}}static __removeExtraRowspans(e,t){let i,o;for(i=0;i<e.length;i+=1){let n=1e6,r=!1;for(o=0;o<e[i].length;o+=1)if(void 0!==e[i][o]){if(e[i][o].rowSpan<2){r=!0;break}n=Math.min(n,e[i][o].rowSpan)}if(!r)for(o=0;o<e[i].length;o+=1)void 0!==e[i][o]&&u.__mark(e[i][o],"rowspan",e[i][o].rowSpan-n+1,t)}}normalizeTable(e){return u.__normalizeTable(e)}static __mergeSelected(e,t){let i=[],o=u.__getSelectedBound(e,u.__getSelectedCellsByTable(e)),r=0,a=null,d=0,p=0,f=0,m=new Set,g=[];o&&(o[0][0]-o[1][0]||o[0][1]-o[1][1])&&(u.__formalMatrix(e,(e,n,s,b,v)=>{n>=o[0][0]&&n<=o[1][0]&&s>=o[0][1]&&s<=o[1][1]&&(m.has(e)||(m.add(e),n===o[0][0]&&(0,c.cssInline)(e,"width")&&(r+=e.offsetWidth),""!==(0,l.trim)(e.innerHTML.replace(/<br(\/)?>/g,""))&&i.push(e.innerHTML),b>1&&(p+=b-1),v>1&&(f+=v-1),a?(u.__mark(e,"remove",1,g),h(t).removeSelection(e)):(a=e,d=s)))}),p=o[1][1]-o[0][1]+1,f=o[1][0]-o[0][0]+1,a&&(p>1&&u.__mark(a,"colspan",p,g),f>1&&u.__mark(a,"rowspan",f,g),r&&(u.__mark(a,"width",(r/e.offsetWidth*100).toFixed(n.ACCURACY)+"%",g),d&&u.__setColumnWidthByDelta(e,d,0,!0,g)),a.innerHTML=i.join("<br/>"),h(t).addSelection(a),m.delete(a),u.__unmark(g),u.__normalizeTable(e),(0,l.toArray)(e.rows).forEach(e=>{e.cells.length||s.Dom.safeRemove(e)})))}mergeSelected(e){return u.__mergeSelected(e,this.j)}static __splitHorizontal(e,t){let i,o,n,r,a,l=[];u.__getSelectedCellsByTable(e).forEach(c=>{o=t.createInside.element("td"),s.Dom.append(o,t.createInside.element("br")),n=t.createInside.element("tr"),i=u.__formalCoordinate(e,c),c.rowSpan<2?(u.__formalMatrix(e,(e,t,o)=>{i[0]===t&&i[1]!==o&&e!==c&&u.__mark(e,"rowspan",e.rowSpan+1,l)}),s.Dom.after(s.Dom.closest(c,"tr",e),n),s.Dom.append(n,o)):(u.__mark(c,"rowspan",c.rowSpan-1,l),u.__formalMatrix(e,(t,o,n)=>{o>i[0]&&o<i[0]+c.rowSpan&&i[1]>n&&t.parentNode.rowIndex===o&&(a=t),i[0]<o&&t===c&&(r=e.rows[o])}),a?s.Dom.after(a,o):s.Dom.prepend(r,o)),c.colSpan>1&&u.__mark(o,"colspan",c.colSpan,l),u.__unmark(l),h(t).removeSelection(c)}),this.__normalizeTable(e)}splitHorizontal(e){return u.__splitHorizontal(e,this.j)}static __splitVertical(e,t){let i,o,r,a=[];u.__getSelectedCellsByTable(e).forEach(l=>{i=u.__formalCoordinate(e,l),l.colSpan<2?u.__formalMatrix(e,(e,t,o)=>{i[1]===o&&i[0]!==t&&e!==l&&u.__mark(e,"colspan",e.colSpan+1,a)}):u.__mark(l,"colspan",l.colSpan-1,a),o=t.createInside.element("td"),s.Dom.append(o,t.createInside.element("br")),l.rowSpan>1&&u.__mark(o,"rowspan",l.rowSpan,a);let c=l.offsetWidth;s.Dom.after(l,o),r=c/e.offsetWidth/2,u.__mark(l,"width",(100*r).toFixed(n.ACCURACY)+"%",a),u.__mark(o,"width",(100*r).toFixed(n.ACCURACY)+"%",a),u.__unmark(a),h(t).removeSelection(l)}),u.__normalizeTable(e)}splitVertical(e){return u.__splitVertical(e,this.j)}static __setColumnWidthByDelta(e,t,i,o,r){let s=u.__formalMatrix(e),a=0;for(let o=0;o<s.length;o+=1){let l=s[o][t];if(l.colSpan>1&&s.length>1)continue;let c=(l.offsetWidth+i)/e.offsetWidth*100;u.__mark(l,"width",c.toFixed(n.ACCURACY)+"%",r),a=o;break}for(let e=a+1;e<s.length;e+=1){let i=s[e][t];u.__mark(i,"width",null,r)}o||u.__unmark(r)}setColumnWidthByDelta(e,t,i,o,n){return u.__setColumnWidthByDelta(e,t,i,o,n)}static __mark(e,t,i,o){var n;o.push(e);let r=null!=(n=d.get(e))?n:{};r[t]=void 0===i?1:i,d.set(e,r)}static __unmark(e){e.forEach(e=>{let t=d.get(e);t&&(Object.keys(t).forEach(i=>{let o=t[i];switch(i){case"remove":s.Dom.safeRemove(e);break;case"rowspan":(0,l.attr)(e,"rowspan",(0,l.isNumber)(o)&&o>1?o:null);break;case"colspan":(0,l.attr)(e,"colspan",(0,l.isNumber)(o)&&o>1?o:null);break;case"width":null==o?(e.style.removeProperty("width"),(0,l.attr)(e,"style")||(0,l.attr)(e,"style",null)):(0,l.css)(e,"width",o.toString())}delete t[i]}),d.delete(e))})}constructor(){super(...arguments),this.selected=new Set}}u.__selectedByTable=new WeakMap,function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,r.debounce)()],u.prototype,"__recalculateStyles",null);let h=e=>e.getInstance("Table",e.o)},78644:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return E}});var o=i(78213),n=i(82758),r=i(45219),s=i(33433),a=i(87325),l=i(37133),c=i(2748),d=i(68345),u=i(23282),h=i(19306),p=i(72430),f=i(70799),m=i(56175),g=i(87058),b=i(38837),v=i(29960),y=i(37790),w=i(62843),_=i(72157),k=i(12153),C=i(56917),S=i(21491),x=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let I=new Set(["input","textarea","select"]),E=class e extends w.UIButton{className(){return"ToolbarButton"}getRole(){return"listitem"}updateAriaLabel(){if(super.updateAriaLabel(),this.trigger){let e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;(0,v.attr)(this.trigger,"aria-label",e)}}get toolbar(){let e=(0,a.getComponentClass)("ToolbarCollection");return this.closest(e)}update(){var e,t;let{control:i,state:o}=this,n=this.toolbar;if(!n)return;let r=null==(e=i.value)?void 0:e.call(i,n.jodit,this);void 0!==r&&(o.value=r),o.disabled=this.__calculateDisabledStatus(n),o.activated=this.__calculateActivatedStatus(n),null==(t=i.update)||t.call(i,n.jodit,this)}__calculateActivatedStatus(e){var t,i;return(!(0,h.isJoditObject)(this.j)||!!this.j.editorIsActive)&&(null!=(i=(t=this.control).isActive)&&!!i.call(t,this.j,this)||!!(e&&e.shouldBeActive(this)))}__calculateDisabledStatus(e){var t,i;return!!(this.j.o.disabled||this.j.o.readonly&&(!this.j.o.activeButtonsInReadOnly||!this.j.o.activeButtonsInReadOnly.includes(this.control.name))||(null==(i=(t=this.control).isDisabled)?void 0:i.call(t,this.j,this)))||!!(e&&e.shouldBeDisabled(this))}onChangeActivated(){(0,v.attr)(this.button,"aria-pressed",this.state.activated),super.onChangeActivated()}onChangeText(){(0,u.isFunction)(this.control.template)?this.text.innerHTML=this.control.template(this.j,this.control.name,this.j.i18n(this.state.text)):super.onChangeText(),this.setMod("text-icons",!!this.text.innerText.trim().length)}onChangeTabIndex(){(0,v.attr)(this.button,"tabindex",this.state.tabIndex),(0,v.attr)(this.trigger,"tabindex",this.state.tabIndex)}createContainer(){let e=this.componentName,t=this.j.c.span(e),i=super.createContainer();i.classList.remove(e),i.classList.add(e+"__button"),Object.defineProperty(i,"component",{value:this,configurable:!0}),c.Dom.append(t,i);let o=this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${e}__trigger">${k.Icon.get("chevron")}</span>`);return c.Dom.append(i,o),t}focus(){var e;null==(e=c.Dom.first(this.container,e=>c.Dom.isTag(e,"button")))||e.focus()}onChangeHasTrigger(){this.state.hasTrigger?c.Dom.append(this.container,this.trigger):c.Dom.safeRemove(this.trigger),this.setMod("with-trigger",this.state.hasTrigger||null)}onChangeDisabled(){let e=this.state.disabled?"disabled":null;(0,v.attr)(this.trigger,"disabled",e),(0,v.attr)(this.button,"disabled",e),(0,v.attr)(this.container,"disabled",e)}__initFromControl(){let{control:e,state:t}=this;this.updateSize(),t.name=e.name,this.__initIconFromControl(),e.tooltip&&(t.tooltip=(0,u.isFunction)(e.tooltip)?e.tooltip(this.j,e,this):e.tooltip),t.hasTrigger=!!(e.list||e.popup&&e.exec)}__initIconFromControl(){var e;let{control:t,state:i}=this,{textIcons:o}=this.j.o;if(!0===o||(0,u.isFunction)(o)&&o(t.name)||t.template){i.icon=(0,w.UIButtonState)().icon,i.text=t.text||t.name;return}if(!(0,f.isString)(t.icon)&&null!=t.icon){i.icon={name:t.icon.name||t.name,iconURL:t.icon.iconURL||"",fill:t.icon.fill||"",scale:t.icon.scale};return}if(t.iconURL)i.icon.iconURL=t.iconURL;else{let o=t.icon||t.name;i.icon.name=k.Icon.exists(o)||(null==(e=this.j.o.extraIcons)?void 0:e[o])?o:""}t.iconURL||i.icon.name||(i.text=t.text||t.name)}onTriggerClick(e){var t,i,o;if(this.openedPopup)return void this.__closePopup();let{control:n}=this;if((0,v.attr)(this.trigger,"aria-expanded",!0),e.buffer={actionTrigger:this},n.list)return this.__openControlList(n);if((0,u.isFunction)(n.popup)){let e=this.openPopup();e.parentElement=this;try{if(!1!==this.j.e.fire((0,g.camelCase)(`before-${n.name}-open-popup`),this.target,n,e)){let r=null!=(o=null!=(i=null==(t=this.toolbar)?void 0:t.getTarget(this))?i:this.target)?o:null,s=n.popup(this.j,r,this.__closePopup,this);s?e.setContent((0,f.isString)(s)?this.j.c.fromHTML(s):s).open(()=>(0,m.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0):this.__closePopup()}}catch(e){throw this.__closePopup(),e}this.j.e.fire((0,g.camelCase)(`after-${n.name}-open-popup`),e.container)}}onTriggerKeyDown(e){this.state.disabled||(e.key===n.KEY_DOWN?this.onButtonKeyDown(e):[n.KEY_ENTER,n.KEY_SPACE," "].includes(e.key)&&(e.preventDefault(),this.trigger.click()))}onButtonKeyDown(e){var t;e.key!==n.KEY_DOWN||this.state.disabled||!this.state.hasTrigger||e.altKey||e.ctrlKey||e.metaKey||(e.preventDefault(),e.stopPropagation(),this.openedPopup||this.trigger.click(),null==(t=this.__popupFocusables()[0])||t.focus())}__onPopupKeyDown(e){if(!this.openedPopup||e.altKey||e.ctrlKey||e.metaKey)return;let t=e.target;if(c.Dom.isTag(t,I)&&e.key!==n.KEY_ESC)return;let i=this.__popupFocusables(),o=i.indexOf(t);switch(e.key){case n.KEY_ESC:this.__closePopup();break;case n.KEY_UP:o<=0?this.__closePopup():i[o-1].focus();break;case n.KEY_DOWN:if(!i.length)return;i[(o+1)%i.length].focus();break;default:if(!this.control.list||!this.__typeAhead(e.key,i,o))return}e.preventDefault(),e.stopPropagation()}__onEditorKeyDown(e){if(this.openedPopup&&this.control.list&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&this.__typeAhead(e.key,this.__popupFocusables(),-1))return e.preventDefault(),!1}__typeAhead(e,t,i){var o,n;let r=Date.now();if((r-this.__typedAt>1e3||t[i]!==this.__typedTo)&&(this.__typed=""),1!==e.length||" "===e&&!this.__typed)return!1;this.__typedAt=r,this.__typed+=e,this.__typedTo=t[i];let{compare:s}=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"}),a=this.__typed,l=Array.from(a).every(e=>0===s(e,a[0])),c=l?a[0]:a,d=l?i+1:Math.max(i,0);for(let e=0;e<t.length;e+=1){let i=t[(d+e)%t.length];if(0===s((null!=(n=null==(o=i.textContent)?void 0:o.trim())?n:"").slice(0,c.length),c)){i.focus(),this.__typedTo=i;break}}return!0}__popupFocusables(){let e=this.openedPopup;return e?Array.from(e.container.querySelectorAll('button:not([disabled]),a[href],input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter(e=>!!e.offsetParent):[]}__openControlList(e){var t,i,o,n,r;let s=null!=(t=this.jodit.options.controls)?t:{},a=e=>(0,_.findControlType)(e,s),l=e.list,c=this.openPopup();c.parentElement=this;let u=null==(i=e.popup)?void 0:i.call(e,this.j,null!=(r=null!=(n=null==(o=this.toolbar)?void 0:o.getTarget(this))?n:this.target)?r:null,this.__closePopup,this);if(u)return this.__openMenu(c,u);let h=(0,S.makeCollection)(this.j);h.parentElement=c,h.mode="vertical";let m=(t,i)=>{let o;if((0,f.isString)(i)&&a(i))return{name:i.toString(),...a(i)};if((0,f.isString)(t)&&a(t))return{name:t.toString(),...a(t),..."object"==typeof i?i:{}};o=t,(0,p.isPlainObject)(o)&&"title"in o&&"value"in o&&(i=t.value,t=t.title);let{childTemplate:n}=e,r={name:t.toString(),template:n&&((e,t,i)=>n(e,t,i,this)),exec:e.childExec?(t,i,o)=>{var n;return null==(n=e.childExec)?void 0:n.call(e,t,i,{...o,parentControl:e})}:e.exec,data:e.data,command:e.command,isActive:e.isChildActive,value:e.value,isDisabled:e.isChildDisabled,mode:e.mode,args:[...e.args?e.args:[],t,i]};return(0,f.isString)(i)&&(r.text=i),r};h.build((0,d.isArray)(l)?l.map(m):(0,y.keys)(l,!1).map(e=>m(e,l[e])),this.target),this.__openMenu(c,h)}__openMenu(e,t){e.setContent(t).open(()=>(0,m.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0),this.state.activated=!0}onOutsideClick(e){this.openedPopup&&(e&&c.Dom.isNode(e.target)&&(c.Dom.isOrContains(this.container,e.target)||this.openedPopup.isOwnClick(e))||this.__closePopup())}openPopup(){return this.__closePopup(),this.openedPopup=new C.Popup(this.j,!1),this.j.e.on(this.ow,"mousedown touchstart",this.onOutsideClick).on("escape closeAllPopups",this.onOutsideClick).on("keydown",this.__onEditorKeyDown).on(this.openedPopup.container,"keydown",this.__onPopupKeyDown),this.openedPopup}__closePopup(){let e=this.openedPopup;if(!e)return;this.openedPopup=null,this.j.e.off(this.ow,"mousedown touchstart",this.onOutsideClick).off("escape closeAllPopups",this.onOutsideClick).off("keydown",this.__onEditorKeyDown);let{activeElement:t}=this.od,i=t&&c.Dom.isOrContains(e.container,t);this.state.activated=!1,e.close(),e.destruct(),this.trigger&&(0,v.attr)(this.trigger,"aria-expanded",!1),i&&this.focus()}onClick(e){var t,i,o,n,r,s,a;let{control:l}=this;if((0,u.isFunction)(l.exec)){let c=null!=(o=null!=(i=null==(t=this.toolbar)?void 0:t.getTarget(this))?i:this.target)?o:null,d=l.exec(this.j,c,{control:l,originalEvent:e,button:this});if(!1!==d&&!0!==d&&(null==(r=null==(n=this.j)?void 0:n.e)||r.fire("synchro"),this.parentElement&&this.parentElement.update(),null==(a=null==(s=this.j)?void 0:s.e)||a.fire("closeAllPopups afterExec")),!1!==d)return}return l.list?this.__openControlList(l):(0,u.isFunction)(l.popup)?this.onTriggerClick(e):void((l.command||l.name)&&((0,y.call)((0,h.isJoditObject)(this.j)?this.j.execCommand.bind(this.j):this.j.od.execCommand.bind(this.j.od),l.command||l.name,!1,l.args&&l.args[0]),this.j.e.fire("closeAllPopups")))}destruct(){return this.__closePopup(),super.destruct()}constructor(e,t,i=null){super(e),this.control=t,this.target=i,this.state={...(0,w.UIButtonState)(),theme:"toolbar",currentValue:"",hasTrigger:!1},this.__typed="",this.__typedAt=0,this.__typedTo=null,this.openedPopup=null;let n=this.getElm("button");(0,b.assert)(n,"Element button should exists"),this.button=n,Object.defineProperty(n,"component",{value:this,configurable:!0});let r=this.getElm("trigger");(0,b.assert)(r,"Element trigger should exists"),this.trigger=r,r.remove(),e.e.on([this.button,this.trigger],"mousedown",e=>e.preventDefault()),this.onAction(this.onClick),this.hookStatus(o.STATUSES.ready,()=>{this.__initFromControl(),this.update()}),t.mods&&Object.keys(t.mods).forEach(e=>{t.mods&&this.setMod(e,t.mods[e])})}};x([s.cacheHTML],E.prototype,"createContainer",null),x([(0,l.watch)("state.hasTrigger",{immediately:!1})],E.prototype,"onChangeHasTrigger",null),x([(0,l.watch)("trigger:click")],E.prototype,"onTriggerClick",null),x([(0,l.watch)("trigger:keydown")],E.prototype,"onTriggerKeyDown",null),x([(0,l.watch)("button:keydown")],E.prototype,"onButtonKeyDown",null),x([r.autobind],E.prototype,"__onPopupKeyDown",null),x([r.autobind],E.prototype,"__onEditorKeyDown",null),x([r.autobind],E.prototype,"onOutsideClick",null),x([r.autobind],E.prototype,"__closePopup",null),E=x([a.component],E)},80319:function(e,t,i){"use strict";i.d(t,{ToolbarContent:function(){return l}});var o=i(65478),n=i(22732),r=i(21537),s=i(62843);let a=new Set(["input","button","select","textarea"]),l=class e extends s.UIButton{className(){return"ToolbarContent"}getRole(){return"listitem"}onChangeActivated(){}update(){var e,t,i;let{control:o}=this,s=o.getContent(this.j,this);((0,r.isString)(s)||s.parentNode!==this.container)&&(n.Dom.detach(this.container),n.Dom.append(this.container,(0,r.isString)(s)?this.j.create.fromHTML(s):s)),this.state.disabled=!!(null==(e=o.isDisabled)?void 0:e.call(o,this.j,this)),this.state.activated=!!(null==(t=o.isActive)?void 0:t.call(o,this.j,this)),null==(i=o.update)||i.call(o,this.j,this),this.onChangeDisabled(),this.onChangeActivated(),super.update()}onChangeDisabled(){super.onChangeDisabled(),n.Dom.each(this.container,e=>{n.Dom.isTag(e,a)&&(0,r.attr)(e,"disabled",this.state.disabled||null)})}createContainer(){return this.j.c.span(this.componentName)}constructor(e,t,i=null){super(e),this.control=t,this.target=i,this.container.classList.add(`${this.componentName}_${this.clearName(t.name)}`)}};l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([o.component],l)},36646:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return o.ToolbarButton},ToolbarContent:function(){return n.ToolbarContent},ToolbarSelect:function(){return r.ToolbarSelect}});var o=i(78644),n=i(80319),r=i(83111)},83111:function(e,t,i){"use strict";i.d(t,{ToolbarSelect:function(){return a}});var o=i(65478),n=i(72430),r=i(70799),s=i(78644);let a=class e extends s.ToolbarButton{className(){return"ToolbarSelect"}update(){var e,t,i;super.update(),this.state.icon.name="";let{list:o,data:s}=this.control;if(o){let a=this.state.value||(s&&(0,r.isString)(s.currentValue)?s.currentValue:void 0);a||(a=Object.keys(o)[0]);let l=((0,n.isPlainObject)(o)&&o[a.toString()]||a).toString();this.state.text=null!=(i=null==(t=(e=this.control).textTemplate)?void 0:t.call(e,this.jodit,l))?i:l}}};a=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([o.component],a)},11676:function(e,t,i){"use strict";i.d(t,{ToolbarCollection:function(){return f}});var o=i(65478),n=i(45219),r=i(87325),s=i(97357),a=i(37133),l=i(29960),c=i(41180),d=i(82760),u=i(24536),h=i(21491),p=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let f=class e extends u.UIList{className(){return"ToolbarCollection"}getRole(){return"toolbar"}get firstButton(){let[e]=this.buttons;return e||null}makeButton(e,t=null){return(0,h.makeButton)(this.j,e,t)}makeSelect(e,t=null){return(0,h.makeSelect)(this.j,e,t)}shouldBeActive(e){}shouldBeDisabled(e){}getTarget(e){return e.target||null}__immediateUpdate(){this.isDestructed||this.j.isLocked||(super.update(),this.j.e.fire("afterUpdateToolbar",this))}update(){this.__immediateUpdate()}setDirection(e){(0,c.css)(this.container,"direction",e),(0,l.attr)(this.container,"dir",e)}__initEvents(){this.j.e.on(this.__listenEvents,this.update).on("afterSetMode focus",this.__immediateUpdate)}hide(){this.container.remove()}show(){this.appendTo(this.j.toolbarContainer)}showInline(e){throw(0,d.error)("The method is not implemented for this class.")}build(e,t=null){let i=this.j.e.fire("beforeToolbarBuild",e);return i&&(e=i),super.build(e,t),this}destruct(){this.isDestructed||(this.j.e.off(this.__listenEvents,this.update).off("afterSetMode focus",this.__immediateUpdate),super.destruct())}constructor(e){super(e),this.__listenEvents="updatePlugins updateToolbar changeStack mousedown mouseup keydown change readonly afterResize selectionchange changeSelection focus afterSetMode touchstart focus blur"}};p([(0,a.watch)(":afterInit"),n.autobind],f.prototype,"__immediateUpdate",null),p([(0,o.debounce)(e=>e.j.defaultTimeout,!0)],f.prototype,"update",null),p([(0,s.hook)("ready")],f.prototype,"__initEvents",null),f=p([r.component],f)},37426:function(e,t,i){"use strict";i.d(t,{ToolbarEditorCollection:function(){return l}});var o=i(82758),n=i(65478),r=i(22732),s=i(21537),a=i(11676);let l=class e extends a.ToolbarCollection{className(){return"ToolbarEditorCollection"}shouldBeDisabled(e){let t=super.shouldBeDisabled(e);if(void 0!==t)return t;let i=void 0===e.control.mode?o.MODE_WYSIWYG:e.control.mode;return i!==o.MODE_SPLIT&&i!==this.j.getRealMode()}shouldBeActive(e){let t,i=super.shouldBeActive(e);if(void 0!==i)return i;let o=this.j.selection?this.j.s.current():null;if(!o)return!1;if(e.control.tags){let i=e.control.tags;if(t=o,r.Dom.up(t,e=>{if(e&&-1!==i.indexOf(e.nodeName.toLowerCase()))return!0},this.j.editor))return!0}if(e.control.css){let i=e.control.css;if(t=o,r.Dom.up(t,e=>{if(e&&!r.Dom.isText(e)&&!r.Dom.isComment(e))return this.checkActiveStatus(i,e)},this.j.editor))return!0}return!1}getTarget(e){return e.target||this.j.s.current()||null}prependInvisibleInput(e){let t=this.j.create.element("input",{name:"jodit-toolbar-focus-helper_"+this.j.id,tabIndex:-1,disabled:!0,style:"width: 0; height:0; position: absolute; visibility: hidden;"});r.Dom.appendChildFirst(e,t)}showInline(e){this.jodit.e.fire("showInlineToolbar",e)}hide(){this.jodit.e.fire("hidePopup"),super.hide(),this.jodit.e.fire("toggleToolbar")}show(){super.show(),this.jodit.e.fire("toggleToolbar")}constructor(e){super(e),this.checkActiveStatus=(e,t)=>{let i=0,o=0;return Object.keys(e).forEach(n=>{let r=e[n];(0,s.isFunction)(r)?r(this.j,(0,s.css)(t,n).toString())&&(i+=1):-1!==r.indexOf((0,s.css)(t,n).toString())&&(i+=1),o+=1}),o===i},this.prependInvisibleInput(this.container)}};l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([n.component],l)},21491:function(e,t,i){"use strict";i.d(t,{makeButton:function(){return a},makeCollection:function(){return s},makeSelect:function(){return l}});var o=i(87325),n=i(23282),r=i(19306);function s(e,t){let i=(0,o.getComponentClass)("ToolbarCollection"),n=(0,o.getComponentClass)("ToolbarEditorCollection"),s=(0,r.isJoditObject)(e)?new n(e):new i(e);return e.o.textIcons&&s.container.classList.add("jodit_text_icons"),t&&(s.parentElement=t),e.o.toolbarButtonSize&&(s.buttonSize=e.o.toolbarButtonSize),s}function a(e,t,i=null){if((0,n.isFunction)(t.getContent))return new((0,o.getComponentClass)("ToolbarContent"))(e,t,i);let r=new((0,o.getComponentClass)("ToolbarButton"))(e,t,i);return r.state.tabIndex=e.o.allowTabNavigation?0:-1,r}function l(e,t,i=null){return new((0,o.getComponentClass)("ToolbarSelect"))(e,t,i)}},80536:function(e,t,i){"use strict";var o=i(68345),n=i(19306),r=i(29960),s=i(6441);s.Config.prototype.enableDragAndDropFileToEditor=!0,s.Config.prototype.uploader={url:"",insertImageAsBase64URI:!1,showTabInFileSelector:!0,imagesExtensions:["jpg","jpeg","png","gif","webp","bmp","svg","tiff","avif"],headers:null,data:null,filesVariableName:e=>`files[${e}]`,withCredentials:!1,pathVariableName:"path",format:"json",method:"POST",prepareData:e=>e,isSuccess:e=>e.success,getMessage:e=>void 0!==e.data.messages&&(0,o.isArray)(e.data.messages)?e.data.messages.join(" "):"",processFileName:(e,t,i)=>[e,t,i],process:e=>e.data,error(e){this.j.message.error(e.message,4e3)},getDisplayName:(e,t)=>e+t,defaultHandlerSuccess(e){let t=this.j||this;(0,n.isJoditObject)(t)&&e.files&&e.files.length&&e.files.forEach((i,o)=>{let[n,s]=e.isImages&&e.isImages[o]?["img","src"]:["a","href"],a=t.createInside.element(n);(0,r.attr)(a,s,e.baseurl+i),"a"===n&&(a.textContent=t.o.uploader.getDisplayName.call(this,e.baseurl,i)),"img"===n?t.s.insertImage(a,null,t.o.imageDefaultWidth):t.s.insertNode(a)})},defaultHandlerError(e){this.j.message.error(e.message)},contentType(e){return(void 0===this.ow.FormData||"string"==typeof e)&&"application/x-www-form-urlencoded; charset=UTF-8"}}},83987:function(e,t,i){"use strict";i.d(t,{buildData:function(){return n}});var o=i(21537);function n(e,t){if((0,o.isFunction)(e.o.buildData))return e.o.buildData.call(e,t);let i=e.ow.FormData;if(void 0!==i){if(t instanceof i||(0,o.isString)(t))return t;let e=new i;return Object.keys(t).forEach(i=>{e.append(i,t[i])}),e}return t}},74569:function(e,t,i){"use strict";function o(e){var t,i;let[o,...n]=e.split(","),r=n.join(","),s=null!=(i=null==(t=o.split(":")[1])?void 0:t.split(";")[0])?i:"",a=/;base64/i.test(o)?atob(r):decodeURIComponent(r),l=new Uint8Array(new ArrayBuffer(a.length));for(let e=0;e<a.length;e+=1)l[e]=a.charCodeAt(e);return new Blob([l.buffer],{type:s})}i.d(t,{dataURItoBlob:function(){return o}})},94122:function(e,t,i){"use strict";i.d(t,{ajaxInstances:function(){return n.ajaxInstances},hasFiles:function(){return s},hasItems:function(){return a},processOldBrowserDrag:function(){return o.processOldBrowserDrag},send:function(){return n.send},sendFiles:function(){return r.sendFiles}}),i(83987);var o=i(50373),n=i(71686),r=i(80020);function s(e){return!!(e&&e.files&&e.files.length>0)}function a(e){return!!(e&&e.items&&e.items.length>0)}},50373:function(e,t,i){"use strict";i.d(t,{processOldBrowserDrag:function(){return c}});var o=i(82758),n=i(22732),r=i(580),s=i(21537),a=i(74569),l=i(80020);function c(e,t,i,c,d){if(t&&(!t.types.length||t.types[0]!==o.TEXT_PLAIN)){let t=e.j.c.div("",{tabindex:-1,style:"left: -9999px; top: 0; width: 0; height: 100%;line-height: 140%; overflow: hidden; position: fixed; z-index: 2147483647; word-break: break-all;",contenteditable:!0});n.Dom.append((0,r.getContainer)(e.j,e.constructor),t);let o=(0,s.isJoditObject)(e.j)?e.j.s.save():null;t.focus(),e.j.async.setTimeout(()=>{let r=t.firstChild;if(n.Dom.safeRemove(t),r&&r.hasAttribute("src")){let t=(0,s.attr)(r,"src")||"";o&&(0,s.isJoditObject)(e.j)&&e.j.s.restore(),(0,l.sendFiles)(e,[(0,a.dataURItoBlob)(t)],i,c).finally(d)}},e.j.defaultTimeout)}}},80020:function(e,t,i){"use strict";i.d(t,{sendFiles:function(){return r}});var o=i(21537),n=i(71686);function r(e,t,i,r,s){if(!t)return Promise.reject((0,o.error)("Need files"));let{o:a}=e,l=(0,o.toArray)(t);if(!l.length)return Promise.reject((0,o.error)("Need files"));if((0,o.isFunction)(a.beforeUpload)&&!1===a.beforeUpload.call(e,l)){let t=(0,o.error)("Upload canceled");return(r||a.defaultHandlerError).call(e,t),Promise.reject(t)}let c=[];if(a.insertImageAsBase64URI&&function(e,t,i,n,r,s){let a,l,c=[];for(l=0;l<e.length;l+=1)if((a=e[l])&&a.type){let d=a.type.match(/\/([a-z0-9]+)/i),u=d[1]?d[1].toLowerCase():"";if(!t.includes(u))continue;let h=new FileReader,p=n.j.async.promise((e,t)=>{h.onerror=t,h.onloadend=()=>{let t={baseurl:"",files:[h.result],isImages:[!0]};((0,o.isFunction)(r)?r:s).call(n,t),e(t)},h.readAsDataURL(a)});c.push(p),i.push(p),e[l]=null}c.length&&Promise.all(c).then(()=>{n.j.events&&n.j.e.fire("filesWereUploaded")}).catch(()=>{})}(l,a.imagesExtensions,c,e,i,a.defaultHandlerSuccess),(l=l.filter(e=>e)).length){let t,d=new FormData;d.append(a.pathVariableName,e.path),d.append("source",e.source);for(let i=0;i<l.length;i+=1)if(t=l[i]){let o=/\.\w+$/.test(t.name),n=t.type.match(/\/([a-z0-9]+)/i),r=n&&n[1]?n[1].toLowerCase():"",s=l[i].name||Math.random().toString().replace(".","");if(!o&&r){let e=r;["jpeg","jpg"].includes(e)&&(e="jpeg|jpg"),RegExp(".("+e+")$","i").test(s)||(s+="."+r)}let[c,u,h]=a.processFileName.call(e,a.filesVariableName(i),l[i],s);d.append(c,u,h)}s&&s(d),a.data&&(0,o.isPlainObject)(a.data)&&Object.keys(a.data).forEach(e=>{d.append(e,a.data[e])}),a.prepareData.call(e,d),c.push((0,n.send)(e,d).then(t=>(a.isSuccess.call(e,t)?((0,o.isFunction)(i)?i:a.defaultHandlerSuccess).call(e,a.process.call(e,t)):((0,o.isFunction)(r)?r:a.defaultHandlerError).call(e,(0,o.error)(a.getMessage.call(e,t))),t)).then(()=>{e.j.events&&e.j.e.fire("filesWereUploaded")}))}return Promise.all(c)}},71686:function(e,t,i){"use strict";i.d(t,{send:function(){return a}});var o=i(21537),n=i(41601),r=i(83987);let s=new WeakMap;function a(e,t){let i=(0,r.buildData)(e,t),a=t=>{e.j.progressbar.show().progress(t),t>=100&&e.j.progressbar.hide()},l=(t,i)=>{let r=new n.Ajax({xhr(){let t=new XMLHttpRequest;return void 0!==e.j.ow.FormData&&t.upload?(i(10),t.upload.addEventListener("progress",e=>{if(e.lengthComputable){let t=e.loaded/e.total;i(t*=100)}},!1)):i(100),t},method:e.o.method||"POST",data:t,url:(0,o.isFunction)(e.o.url)?e.o.url(t):e.o.url,headers:e.o.headers,queryBuild:e.o.queryBuild,contentType:e.o.contentType.call(e,t),withCredentials:e.o.withCredentials||!1}),a=s.get(e);return a||(a=new Set,s.set(e,a)),a.add(r),e.j.e.one("beforeDestruct",r.destruct),r.send().then(e=>e.json()).catch(e=>({success:!1,data:{messages:[e]}})).finally(()=>{r.destruct(),null==a||a.delete(r)})};return((0,o.isFunction)(e.o.customUploadFunction)&&(l=e.o.customUploadFunction),(0,o.isPromise)(i))?i.then(e=>l(e,a)).catch(t=>{e.o.error.call(e,t)}):l(i,a)}i.d(t,["ajaxInstances",0,s])},57380:function(e,t,i){"use strict";i.d(t,{Uploader:function(){return c}});var o=i(91907),n=i(82758),r=i(2748),s=i(21537),a=i(6441),l=i(94122);i(80536);class c extends o.ViewComponent{get j(){return this.jodit}className(){return"Uploader"}get o(){return this.options}setPath(e){return this.path=e,this}setSource(e){return this.source=e,this}bind(e,t,i){let o=()=>{e.classList.remove("jodit_drag_hover")},r=this,s=e=>{let s,a,c,d=e.clipboardData,u=e=>{a&&(e.append("extension",c),e.append("mimetype",a.type))};if(!n.IS_IE&&(0,l.hasFiles)(d))return(0,l.sendFiles)(r,d.files,t,i).finally(o),!1;if(n.IS_IE&&!n.IS_ES_NEXT)return(0,l.processOldBrowserDrag)(r,d,t,i,o);if((0,l.hasItems)(d)){let{items:n}=d;for(s=0;s<n.length;s+=1)if("file"===n[s].kind&&"image/png"===n[s].type){if(a=n[s].getAsFile()){let e=a.type.match(/\/([a-z0-9]+)/i);c=e[1]?e[1].toLowerCase():"",(0,l.sendFiles)(r,[a],t,i,u).finally(o)}e.preventDefault();break}}};r.j&&r.j.editor!==e?r.j.e.on(e,"paste",s):r.j.e.on("beforePaste",s),this.attachEvents(e,t,i,o)}attachEvents(e,t,i,o){let n=this;n.j.e.on(e,"dragend dragover dragenter dragleave drop",e=>{e.preventDefault()}).on(e,"dragover",t=>{((0,l.hasFiles)(t.dataTransfer)||(0,l.hasItems)(t.dataTransfer))&&(e.classList.add("jodit_drag_hover"),t.preventDefault())}).on(e,"dragend dragleave",t=>{e.classList.remove("jodit_drag_hover"),(0,l.hasFiles)(t.dataTransfer)&&t.preventDefault()}).on(e,"drop",r=>{e.classList.remove("jodit_drag_hover"),(0,l.hasFiles)(r.dataTransfer)&&(r.preventDefault(),r.stopImmediatePropagation(),(0,l.sendFiles)(n,r.dataTransfer.files,t,i).finally(o))});let a=r.Dom.first(e,e=>{var t;return r.Dom.isTag(e,"input")&&(null==(t=(0,s.attr)(e,"type"))?void 0:t.toLowerCase())==="file"});a&&n.j.e.on(a,"change",()=>{(0,l.sendFiles)(n,a.files,t,i).then(()=>{a.value="",/safari/i.test(navigator.userAgent)||(a.type="",a.type="file")}).finally(o)})}uploadRemoteImage(e,t,i){let o=this,{o:n}=o,r=(0,s.isFunction)(i)?i:n.defaultHandlerError;(0,l.send)(o,{action:"fileUploadRemote",url:e}).then(e=>{n.isSuccess.call(o,e)?((0,s.isFunction)(t)?t:n.defaultHandlerSuccess).call(o,n.process.call(o,e)):r.call(o,(0,s.error)(n.getMessage.call(o,e)))}).catch(e=>r.call(o,e))}upload(e){return this.async.promise((t,i)=>{(0,l.sendFiles)(this,e,t,i)})}destruct(){this.setStatus(o.STATUSES.beforeDestruct);let e=l.ajaxInstances.get(this);e&&(e.forEach(e=>{try{e.destruct()}catch(e){}}),e.clear()),super.destruct()}constructor(e,t){super(e),this.path="",this.source="default",this.options=(0,s.ConfigProto)(t||{},(0,s.ConfigProto)(a.Config.defaultOptions.uploader,(0,s.isJoditObject)(e)?e.o.uploader:{}))}}},22859:function(e,t,i){"use strict";var o=i(22732),n=i(21537),r=i(67510),s=i(37068);r.Icon.set("palette",s.default),i.d(t,["ColorPickerWidget",0,(e,t,i)=>{let s="jodit-color-picker",a=(0,n.normalizeColor)(i),l=e.c.div(s),c=e.o.textIcons?`<span>${e.i18n("palette")}</span>`:r.Icon.get("palette"),d=e=>{let t=[];return(0,n.isPlainObject)(e)?Object.keys(e).forEach(i=>{t.push(`<div class="${s}__group ${s}__group-${i}">`),t.push(d(e[i])),t.push("</div>")}):(0,n.isArray)(e)&&e.forEach(e=>{t.push(`<span class='${s}__color-item ${a===e?s+"__color-item_active_true":""}' title="${e}" style="background-color:${e}" data-color="${e}"></span>`)}),t.join("")},u=(0,n.isArray)(e.o.colors)?`<div class="${s}__group">${d(e.o.colors)}</div>`:d(e.o.colors);o.Dom.append(l,e.c.fromHTML(`<div class="${s}__groups">${u}</div>`)),o.Dom.append(l,e.c.fromHTML(`<div data-ref="extra" class="${s}__extra"></div>`));let{extra:h}=(0,n.refs)(l);o.Dom.append(h,e.c.fromHTML(`<div class="${s}__hex"><input data-ref="hexInput" type="text" spellcheck="false" aria-label="HEX" placeholder="#FF0000" value="${a||""}"/></div>`));let{hexInput:p}=(0,n.refs)(l),f=null,m=()=>{let e=p.value.trim();if(e===f)return;let i=/^#?[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(e),o=/^rgba?\([\d\s.,%]+\)$/i.test(e);if(!i&&!o)return;let r=(0,n.normalizeColor)(i&&!e.startsWith("#")?"#"+e:e);r&&(0,n.isFunction)(t)&&(f=e,t(r))};return e.e.on(p,"keydown",e=>{e.stopPropagation(),"Enter"===e.key&&(e.preventDefault(),m())}).on(p,"change",e=>{e.stopPropagation(),m()}),o.Dom.append(h,e.c.fromHTML(`<span class="${s}__remove" data-color="" title="${e.i18n("Remove")}">${e.o.textIcons?e.i18n("Remove"):r.Icon.get("eraser")}</span>`)),e.o.showBrowserColorPicker&&(0,n.hasBrowserColorPicker)()&&(o.Dom.append(h,e.c.fromHTML(`<div class="${s}__native">${c}<input type="color" value="#ffffff"/></div>`)),e.e.on(l,"change",e=>{e.stopPropagation();let i=e.target;if(!i||!i.tagName||!o.Dom.isTag(i,"input")||"color"!==i.type)return;let r=i.value||"";(0,n.isFunction)(t)&&t(r),e.preventDefault()})),e.e.on(l,"mousedown touchend",i=>{if(o.Dom.isTag(i.target,"input"))return void i.stopPropagation();i.stopPropagation(),i.preventDefault();let r=i.target;if((!r||!r.tagName||o.Dom.isTag(r,"svg")||o.Dom.isTag(r,"path"))&&r.parentNode&&(r=o.Dom.closest(r.parentNode,"span",e.editor)),!o.Dom.isTag(r,"span")||!r.classList.contains(s+"__color-item")&&!r.classList.contains(s+"__remove"))return;let a=(0,n.attr)(r,"-color")||"";t&&(0,n.isFunction)(t)&&t(a)}),e.e.fire("afterGenerateColorPicker",l,h,t,a),l}])},37068:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 3a9 9 0 1 0 0 18h1a2 2 0 0 0 1.5-3.3 1.7 1.7 0 0 1 1.3-2.8H18a3 3 0 0 0 3-3A9 9 0 0 0 12 3Z"/><circle cx="7" cy="10" r="0.7"/><circle cx="10" cy="6.5" r="0.7"/><circle cx="15" cy="7" r="0.7"/><circle cx="17.5" cy="11" r="0.7"/> </g> </svg> '},34793:function(e,t,i){"use strict";var o=i(2748),n=i(21537),r=i(67510),s=i(38927);let a=(e,t,{label:i,accept:o})=>{let n=e.c.fromHTML(`<div class="jodit-drag-and-drop__file-box"><strong>${e.i18n(i)}</strong><span><br>${e.i18n("or click")}</span><input type="file" accept="${o}" tabindex="-1" dir="auto" multiple=""/></div>`);return e.uploader.bind(n,i=>{t.call(e,i),e.e.fire("closeAllPopups")},t=>{e.message.error(t.message),e.e.fire("closeAllPopups")}),{icon:"upload",name:"Upload",content:n}};function l(e,t,i){let r=o.Dom.first(e,e=>o.Dom.isTag(e,"input")&&(0,n.attr)(e,"name")===t);return r?(i&&(r.value=i),r.value):""}i.d(t,["FileSelectorWidget",0,(e,t,i,c,d=!0)=>{let u,h=[],p=e.o.uploader;if(t.upload&&!1!==p.showTabInFileSelector&&(p.url||p.insertImageAsBase64URI||p.customUploadFunction)){let{upload:i}=t;h.push(a(e,t=>{let o=(0,n.isFunction)(i)?i:p.defaultHandlerSuccess;(0,n.isFunction)(o)&&o.call(e,t)},d?{label:"Drop image",accept:"image/*"}:{label:"Drop file",accept:"*"}))}if(t.filebrowser&&(e.o.filebrowser.ajax.url||e.o.filebrowser.items.url)&&h.push({icon:"folder",name:"Browse",content(){c&&c(),t.filebrowser&&e.filebrowser.open(t.filebrowser,d)}}),t.url){let s=new r.UIButton(e,{type:"submit",variant:"primary",text:"Insert"}),a=new r.UIForm(e,[new r.UIInput(e,{required:!0,label:"URL",name:"url",type:"text",placeholder:"https://"}),new r.UIInput(e,{name:"text",label:"Alternative text"}),new r.UIBlock(e,[s])]);i&&!o.Dom.isText(i)&&!o.Dom.isComment(i)&&(o.Dom.isTag(i,"img")||(0,n.$$)("img",i).length)&&(u="IMG"===i.tagName?i:(0,n.$$)("img",i)[0],l(a.container,"url",(0,n.attr)(u,"src")),l(a.container,"text",(0,n.attr)(u,"alt")),s.state.text="Update"),i&&o.Dom.isTag(i,"a")&&(l(a.container,"url",(0,n.attr)(i,"href")),l(a.container,"text",(0,n.attr)(i,"title")),s.state.text="Update"),a.onSubmit(i=>{(0,n.isFunction)(t.url)&&t.url.call(e,i.url,i.text)}),h.push({icon:"link",name:"URL",content:a.container})}let f=(0,s.TabsWidget)(e,h);return f.classList.add("jodit-file-selector"),f},"UploadTab",0,a])},92762:function(e,t,i){"use strict";i.d(t,{ColorPickerWidget:function(){return o.ColorPickerWidget},FileSelectorWidget:function(){return n.FileSelectorWidget},TabsWidget:function(){return r.TabsWidget},UploadTab:function(){return n.UploadTab}});var o=i(22859),n=i(34793),r=i(38927)},38927:function(e,t,i){"use strict";var o=i(91907),n=i(2748),r=i(23282),s=i(29960),a=i(67510);i.d(t,["TabsWidget",0,(e,t,i)=>{let l=e.c.div("jodit-tabs"),c=e.c.div("jodit-tabs__wrapper"),d=e.c.div("jodit-tabs__buttons");(0,s.attr)(d,{role:"tablist","aria-orientation":"horizontal"});let u={},h=[],p="";n.Dom.append(l,d),n.Dom.append(l,c);let f=e=>{u[e]&&(h.forEach(e=>{e.state.activated=!1}),Object.values(u).forEach(({tab:e})=>e.classList.remove("jodit-tab_active")),u[e].button.state.activated=!0,u[e].tab.classList.add("jodit-tab_active"))};if(t.forEach(({icon:l,name:m,content:g})=>{let b=e.c.div("jodit-tab");(0,s.attr)(b,{role:"tabpanel"});let v=(0,a.Button)(e,l||m,m);v.state.role="tab",e.e.on(v.container,"pointerdown",e=>e.preventDefault()),p||(p=m),n.Dom.append(d,v.container),h.push(v),v.container.classList.add("jodit-tabs__button","jodit-tabs__button_columns_"+t.length),(0,r.isFunction)(g)?b.classList.add("jodit-tab_empty"):n.Dom.append(b,o.Component.isInstanceOf(g,a.UIElement)?g.container:g),n.Dom.append(c,b),v.onAction(()=>(f(m),(0,r.isFunction)(g)&&!n.Dom.isElement(g)&&g.call(e),i&&(i.activeTab=m),!1)),u[m]={button:v,tab:b}}),f(i&&i.activeTab&&u[i.activeTab]?i.activeTab:p),i){let e=i.activeTab;Object.defineProperty(i,"activeTab",{configurable:!0,enumerable:!1,get:()=>e,set(t){e=t,f(t)}})}return l}])},73391:function(e,t,i){"use strict";var o=i(82758),n=i(580),r=i(21537),s=i(12153),a=i(6441),l=i(49399);a.Config.prototype.controls.about={exec(e){let t=e.dlg({closeOnClickOverlay:!0}),i=e.i18n.bind(e);t.setMod("theme",e.o.theme).setHeader(i("About Jodit")).setContent(`<div class="jodit-about">
|
|
124
|
+
</form>`)}])},41409:function(e,t,i){"use strict";i.r(t),i.d(t,{Ajax:function(){return p.Ajax},Alert:function(){return s.Alert},Async:function(){return l.Async},AsyncStorage:function(){return j.AsyncStorage},Button:function(){return f.Button},CommitStyle:function(){return T.CommitStyle},Component:function(){return o.Component},Confirm:function(){return s.Confirm},ContextMenu:function(){return r.ContextMenu},Create:function(){return c.Create},Dialog:function(){return s.Dialog},Dom:function(){return d.Dom},EventEmitter:function(){return u.EventEmitter},EventHandlersStore:function(){return u.EventHandlersStore},Eventify:function(){return u.Eventify},FileBrowser:function(){return a.FileBrowser},Helpers:function(){return n},History:function(){return b.History},Icon:function(){return f.Icon},ImageEditor:function(){return y.ImageEditor},IndexedDBProvider:function(){return j.IndexedDBProvider},LazyWalker:function(){return d.LazyWalker},LocalStorageProvider:function(){return j.LocalStorageProvider},MemoryStorageProvider:function(){return j.MemoryStorageProvider},Plugin:function(){return h.Plugin},PluginSystem:function(){return E.PluginSystem},Popup:function(){return f.Popup},ProgressBar:function(){return f.ProgressBar},Prompt:function(){return s.Prompt},Response:function(){return p.Response},STATUSES:function(){return o.STATUSES},Selection:function(){return T.Selection},Snapshot:function(){return v.Snapshot},StatusBar:function(){return _.StatusBar},Storage:function(){return j.Storage},StorageKey:function(){return j.StorageKey},Table:function(){return k.Table},ToolbarButton:function(){return C.ToolbarButton},ToolbarCollection:function(){return S.ToolbarCollection},ToolbarContent:function(){return C.ToolbarContent},ToolbarEditorCollection:function(){return x.ToolbarEditorCollection},ToolbarSelect:function(){return C.ToolbarSelect},UIBlock:function(){return f.UIBlock},UIButton:function(){return f.UIButton},UIButtonGroup:function(){return f.UIButtonGroup},UIButtonState:function(){return f.UIButtonState},UICheckbox:function(){return f.UICheckbox},UIElement:function(){return f.UIElement},UIFileInput:function(){return f.UIFileInput},UIForm:function(){return f.UIForm},UIGroup:function(){return f.UIGroup},UIInput:function(){return f.UIInput},UIList:function(){return f.UIList},UIMessages:function(){return w.UIMessages},UISelect:function(){return f.UISelect},UISeparator:function(){return f.UISeparator},UISpacer:function(){return f.UISpacer},UITextArea:function(){return f.UITextArea},UITooltip:function(){return f.UITooltip},Uploader:function(){return I.Uploader},View:function(){return m.View},ViewComponent:function(){return o.ViewComponent},ViewWithToolbar:function(){return g.ViewWithToolbar},canUseIndexedDB:function(){return j.canUseIndexedDB},canUsePersistentStorage:function(){return j.canUsePersistentStorage},clearUseIndexedDBCache:function(){return j.clearUseIndexedDBCache},defaultNameSpace:function(){return u.defaultNameSpace},observable:function(){return u.observable}});var o=i(91907),n=i(21537),r=i(80870),s=i(638),a=i(78513),l=i(8884),c=i(12060),d=i(22732),u=i(3827),h=i(50911),p=i(41601),f=i(67510),m=i(35608),g=i(84075),b=i(78818),v=i(52604),y=i(50050),w=i(1808),_=i(23512),k=i(76014),C=i(36646),S=i(11676),x=i(37426),I=i(57380),E=i(41876),T=i(59242),j=i(12081)},68389:function(e,t,i){"use strict";i.d(t,{UIMessage:function(){return r}});var o=i(87325),n=i(67510);let r=class e extends n.UIElement{className(){return"UIMessage"}constructor(e,t){super(e),this.setMod("active",!0),this.setMod("variant",t.variant),this.container.textContent=t.text}};r=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([o.component],r)},1808:function(e,t,i){"use strict";i.d(t,{UIMessages:function(){return l}});var o=i(87325),n=i(2748),r=i(41180),s=i(62405),a=i(68389);let l=class e extends s.UIGroup{className(){return"UIMessages"}info(e,t){this.__message(e,"info",t)}success(e,t){this.__message(e,"success",t)}error(e,t){this.__message(e,"error",t)}message(e,t,i){this.__message(e,t,i)}__message(e,t="info",i){let o=e+":"+t;if(this.__messages.has(o))return void this.async.updateTimeout(o,i||this.options.defaultTimeout);if(!this.__box)throw Error("Container is not defined: "+o);n.Dom.append(this.__box,this.container);let r=new a.UIMessage(this.j,{text:e,variant:t});this.append(r),this.__calcOffsets(),this.__messages.add(o);let s=this.__getRemoveCallback(r,o);this.j.e.on(r.container,"pointerdown",s),this.async.setTimeout(s,{label:o,timeout:i||this.options.defaultTimeout})}__getRemoveCallback(e,t){let i=o=>{o&&o.preventDefault(),e.isInDestruct||(this.async.clearTimeout(t),this.j.e.off(e.container,"pointerdown",i),this.__messages.delete(t),e.setMod("active",!1),this.async.setTimeout(()=>{this.remove(e),e.destruct(),this.__calcOffsets()},300))};return i}__calcOffsets(){let e=5;this.elements.forEach(t=>{(0,r.css)(t.container,"bottom",e+"px"),e+=t.container.offsetHeight+this.options.defaultOffset})}constructor(e,t,i={defaultTimeout:3e3,defaultOffset:5}){super(e),this.__box=t,this.options=i,this.__messages=new Set}};l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([o.component],l)},23512:function(e,t,i){"use strict";i.d(t,{StatusBar:function(){return l}});var o=i(91907),n=i(65478),r=i(2748),s=i(14316),a=i(34176);let l=class e extends o.ViewComponent{className(){return"StatusBar"}hide(){this.container.classList.add("jodit_hidden")}show(){this.container.classList.remove("jodit_hidden")}get isShown(){return!this.container.classList.contains("jodit_hidden")}getHeight(){var e,t;return null!=(t=null==(e=this.container)?void 0:e.offsetHeight)?t:0}findEmpty(e=!1){let t=this.getElms(e?"item-right":"item");for(let e=0;e<t.length;e+=1)if(!t[e].innerHTML.trim().length)return t[e]}append(e,t=!1){let i=this.findEmpty(t)||this.j.c.div(this.getFullElName("item"));t&&i.classList.add(this.getFullElName("item-right")),r.Dom.append(i,e),this.container&&r.Dom.append(this.container,i),this.j.o.statusbar&&this.show(),this.j.e.fire("resize")}destruct(){this.isInDestruct||(this.setStatus(o.STATUSES.beforeDestruct),r.Dom.safeRemove(this.container),super.destruct())}constructor(e,t){super(e),this.target=t,this.mods={},this.container=e.c.div("jodit-status-bar"),r.Dom.append(t,this.container),this.hide()}};l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([n.component,(0,n.derive)(a.Mods,s.Elms)],l)},76014:function(e,t,i){"use strict";i.d(t,{Table:function(){return u}});var o=i(91907),n=i(82758),r=i(65478),s=i(22732),a=i(580),l=i(21537),c=i(41180);let d=new WeakMap;class u extends o.ViewComponent{className(){return"Table"}__recalculateStyles(){let e=(0,a.getContainer)(this.j,u,"style",!0),t=[];this.selected.forEach(e=>{let i=(0,l.cssPath)(e);i&&t.push(i)}),e.innerHTML=t.length?t.join(",")+`{${this.jodit.options.table.selectionCellStyle}}`:""}addSelection(e){this.selected.add(e),this.__recalculateStyles();let t=s.Dom.closest(e,"table",this.j.editor);if(t){let i=u.__selectedByTable.get(t)||new Set;i.add(e),u.__selectedByTable.set(t,i)}}removeSelection(e){this.selected.delete(e),this.__recalculateStyles();let t=s.Dom.closest(e,"table",this.j.editor);if(t){let i=u.__selectedByTable.get(t);i&&(i.delete(e),i.size||u.__selectedByTable.delete(t))}}getAllSelectedCells(){return(0,l.toArray)(this.selected)}static __getSelectedCellsByTable(e){let t=u.__selectedByTable.get(e);return t?(0,l.toArray)(t):[]}destruct(){return this.selected.clear(),super.destruct()}static __getRowsCount(e){return e.rows.length}getRowsCount(e){return u.__getRowsCount(e)}static __getColumnsCount(e){return u.__formalMatrix(e).reduce((e,t)=>Math.max(e,t.length),0)}getColumnsCount(e){return u.__getColumnsCount(e)}static __formalMatrix(e,t){let i=[[]],o=(0,l.toArray)(e.rows),n=(e,o)=>{void 0===i[o]&&(i[o]=[]);let n=e.colSpan,r=e.rowSpan,s,a,l=0;for(;i[o][l];)l+=1;for(a=0;r>a;a+=1)for(s=0;s<n;s+=1){if(void 0===i[o+a]&&(i[o+a]=[]),t&&!1===t(e,o+a,l+s,n,r))return!1;i[o+a][l+s]=e}};for(let e=0;e<o.length;e+=1){let t=(0,l.toArray)(o[e].cells);for(let o=0;o<t.length;o+=1)if(!1===n(t[o],e))return i}return i}formalMatrix(e,t){return u.__formalMatrix(e,t)}static __formalCoordinate(e,t,i=!1){let o=0,n=0,r=1,s=1;return u.__formalMatrix(e,(e,a,l,c,d)=>{if(t===e)return o=a,n=l,r=c||1,s=d||1,i&&(n+=(c||1)-1,o+=(d||1)-1),!1}),[o,n,r,s]}formalCoordinate(e,t,i=!1){return u.__formalCoordinate(e,t,i)}static __appendRow(e,t,i,o){let n;if(t)n=t.cloneNode(!0),s.Dom.each(t,e=>{if(!s.Dom.isCell(e))return;let t=(0,l.attr)(e,"rowspan");if(t&&parseInt(t,10)>1){let i=parseInt(t,10)-1;(0,l.attr)(e,"rowspan",i>1?i:null)}}),s.Dom.each(n,e=>{s.Dom.isCell(e)&&(s.Dom.detach(e),s.Dom.append(e,o.element("br")))});else{let t=u.__getColumnsCount(e);n=o.element("tr");for(let e=0;e<t;e+=1){let e=o.element("td");s.Dom.append(e,o.element("br")),s.Dom.append(n,e)}}i&&t&&t.nextSibling?s.Dom.after(t,n):!i&&t?s.Dom.before(t,n):s.Dom.append(s.Dom.first(e,e=>s.Dom.isTag(e,"tbody"))||e,n)}appendRow(e,t,i){return u.__appendRow(e,t,i,this.j.createInside)}static __removeRow(e,t){let i,o=u.__formalMatrix(e),n=e.rows[t];o[t].forEach((r,a)=>{if(i=!1,t-1>=0&&o[t-1][a]===r)i=!0;else if(o[t+1]&&o[t+1][a]===r){if(r.parentNode===n&&r.parentNode.nextSibling){i=!0;let n=a+1;for(;o[t+1][n]===r;)n+=1;let l=s.Dom.next(r.parentNode,e=>s.Dom.isTag(e,"tr"),e);if(l){let e=null;for(let i=n;i<o[t+1].length;i+=1){let n=o[t+1][i];if(n&&n.parentNode===l){e=n;break}}e?s.Dom.before(e,r):s.Dom.append(l,r)}}}else s.Dom.safeRemove(r);if(i&&(r.parentNode===n||r!==o[t][a-1])){let e=r.rowSpan;(0,l.attr)(r,"rowspan",e-1>1?e-1:null)}}),s.Dom.safeRemove(n)}removeRow(e,t){return u.__removeRow(e,t)}appendColumn(e,t,i=!0){let o=u.__formalMatrix(e);if(!i&&s.Dom.isCell(t.previousElementSibling))return this.appendColumn(e,t.previousElementSibling,!0);let[,n]=u.__formalCoordinate(e,t,i),r=i?n+1:n;for(let e=0;e<o.length;){let t=o[e];if(t[n]!==t[r]||n===r){let e=this.j.createInside.element("td");s.Dom.append(e,this.j.createInside.element("br")),i?s.Dom.after(t[n],e):s.Dom.before(t[n],e),t[n].rowSpan>1&&(e.rowSpan=t[n].rowSpan)}else t[n].colSpan+=1;e+=t[n].rowSpan||1}}static __removeColumn(e,t){let i,o=u.__formalMatrix(e);o.forEach((e,n)=>{let r=e[t];if(i=!1,t-1>=0&&o[n][t-1]===r||t+1<e.length&&o[n][t+1]===r?i=!0:s.Dom.safeRemove(r),i&&(n-1<0||r!==o[n-1][t])){let e=r.colSpan;(0,l.attr)(r,"colspan",e-1>1?(e-1).toString():null)}})}removeColumn(e,t){return u.__removeColumn(e,t)}static __getSelectedBound(e,t){let i,o,n,r=[[1/0,1/0],[0,0]],s=u.__formalMatrix(e);for(i=0;i<s.length;i+=1)for(o=0;s[i]&&o<s[i].length;o+=1)t.includes(s[i][o])&&(r[0][0]=Math.min(i,r[0][0]),r[0][1]=Math.min(o,r[0][1]),r[1][0]=Math.max(i,r[1][0]),r[1][1]=Math.max(o,r[1][1]));for(i=r[0][0];i<=r[1][0];i+=1)for(n=1,o=r[0][1];o<=r[1][1];o+=1){for(;s[i]&&s[i][o-n]&&s[i][o]===s[i][o-n];)r[0][1]=Math.min(o-n,r[0][1]),r[1][1]=Math.max(o-n,r[1][1]),n+=1;for(n=1;s[i]&&s[i][o+n]&&s[i][o]===s[i][o+n];)r[0][1]=Math.min(o+n,r[0][1]),r[1][1]=Math.max(o+n,r[1][1]),n+=1;for(n=1;s[i-n]&&s[i][o]===s[i-n][o];)r[0][0]=Math.min(i-n,r[0][0]),r[1][0]=Math.max(i-n,r[1][0]),n+=1;for(n=1;s[i+n]&&s[i][o]===s[i+n][o];)r[0][0]=Math.min(i+n,r[0][0]),r[1][0]=Math.max(i+n,r[1][0]),n+=1}return r}getSelectedBound(e,t){return u.__getSelectedBound(e,t)}static __normalizeTable(e){let t=[],i=u.__formalMatrix(e);u.__removeExtraColspans(i,t),u.__removeExtraRowspans(i,t);for(let e=0;e<i.length;e+=1)for(let t=0;t<i[e].length;t+=1)void 0!==i[e][t]&&(i[e][t].hasAttribute("rowspan")&&1===i[e][t].rowSpan&&(0,l.attr)(i[e][t],"rowspan",null),i[e][t].hasAttribute("colspan")&&1===i[e][t].colSpan&&(0,l.attr)(i[e][t],"colspan",null),i[e][t].hasAttribute("class")&&!(0,l.attr)(i[e][t],"class")&&(0,l.attr)(i[e][t],"class",null));u.__unmark(t)}static __removeExtraColspans(e,t){for(let i=0;i<e[0].length;i+=1){let o=1e6,n=!1;for(let t=0;t<e.length;t+=1)if(void 0!==e[t][i]){if(e[t][i].colSpan<2){n=!0;break}o=Math.min(o,e[t][i].colSpan)}if(!n)for(let n=0;n<e.length;n+=1)void 0!==e[n][i]&&u.__mark(e[n][i],"colspan",e[n][i].colSpan-o+1,t)}}static __removeExtraRowspans(e,t){let i,o;for(i=0;i<e.length;i+=1){let n=1e6,r=!1;for(o=0;o<e[i].length;o+=1)if(void 0!==e[i][o]){if(e[i][o].rowSpan<2){r=!0;break}n=Math.min(n,e[i][o].rowSpan)}if(!r)for(o=0;o<e[i].length;o+=1)void 0!==e[i][o]&&u.__mark(e[i][o],"rowspan",e[i][o].rowSpan-n+1,t)}}normalizeTable(e){return u.__normalizeTable(e)}static __mergeSelected(e,t){let i=[],o=u.__getSelectedBound(e,u.__getSelectedCellsByTable(e)),r=0,a=null,d=0,p=0,f=0,m=new Set,g=[];o&&(o[0][0]-o[1][0]||o[0][1]-o[1][1])&&(u.__formalMatrix(e,(e,n,s,b,v)=>{n>=o[0][0]&&n<=o[1][0]&&s>=o[0][1]&&s<=o[1][1]&&(m.has(e)||(m.add(e),n===o[0][0]&&(0,c.cssInline)(e,"width")&&(r+=e.offsetWidth),""!==(0,l.trim)(e.innerHTML.replace(/<br(\/)?>/g,""))&&i.push(e.innerHTML),b>1&&(p+=b-1),v>1&&(f+=v-1),a?(u.__mark(e,"remove",1,g),h(t).removeSelection(e)):(a=e,d=s)))}),p=o[1][1]-o[0][1]+1,f=o[1][0]-o[0][0]+1,a&&(p>1&&u.__mark(a,"colspan",p,g),f>1&&u.__mark(a,"rowspan",f,g),r&&(u.__mark(a,"width",(r/e.offsetWidth*100).toFixed(n.ACCURACY)+"%",g),d&&u.__setColumnWidthByDelta(e,d,0,!0,g)),a.innerHTML=i.join("<br/>")||"<br/>",h(t).addSelection(a),m.delete(a),u.__unmark(g),u.__normalizeTable(e),(0,l.toArray)(e.rows).forEach(e=>{e.cells.length||s.Dom.safeRemove(e)})))}mergeSelected(e){return u.__mergeSelected(e,this.j)}static __splitHorizontal(e,t){let i,o,n,r,a,l=[];u.__getSelectedCellsByTable(e).forEach(c=>{o=t.createInside.element("td"),s.Dom.append(o,t.createInside.element("br")),n=t.createInside.element("tr"),i=u.__formalCoordinate(e,c),c.rowSpan<2?(u.__formalMatrix(e,(e,t,o)=>{i[0]===t&&i[1]!==o&&e!==c&&u.__mark(e,"rowspan",e.rowSpan+1,l)}),s.Dom.after(s.Dom.closest(c,"tr",e),n),s.Dom.append(n,o)):(u.__mark(c,"rowspan",c.rowSpan-1,l),u.__formalMatrix(e,(t,o,n)=>{o>i[0]&&o<i[0]+c.rowSpan&&i[1]>n&&t.parentNode.rowIndex===o&&(a=t),i[0]<o&&t===c&&(r=e.rows[o])}),a?s.Dom.after(a,o):s.Dom.prepend(r,o)),c.colSpan>1&&u.__mark(o,"colspan",c.colSpan,l),u.__unmark(l),h(t).removeSelection(c)}),this.__normalizeTable(e)}splitHorizontal(e){return u.__splitHorizontal(e,this.j)}static __splitVertical(e,t){let i,o,r,a=[];u.__getSelectedCellsByTable(e).forEach(l=>{i=u.__formalCoordinate(e,l),l.colSpan<2?u.__formalMatrix(e,(e,t,o)=>{i[1]===o&&i[0]!==t&&e!==l&&u.__mark(e,"colspan",e.colSpan+1,a)}):u.__mark(l,"colspan",l.colSpan-1,a),o=t.createInside.element("td"),s.Dom.append(o,t.createInside.element("br")),l.rowSpan>1&&u.__mark(o,"rowspan",l.rowSpan,a);let c=l.offsetWidth;s.Dom.after(l,o),r=c/e.offsetWidth/2,u.__mark(l,"width",(100*r).toFixed(n.ACCURACY)+"%",a),u.__mark(o,"width",(100*r).toFixed(n.ACCURACY)+"%",a),u.__unmark(a),h(t).removeSelection(l)}),u.__normalizeTable(e)}splitVertical(e){return u.__splitVertical(e,this.j)}static __setColumnWidthByDelta(e,t,i,o,r){let s=u.__formalMatrix(e),a=0;for(let o=0;o<s.length;o+=1){let l=s[o][t];if(l.colSpan>1&&s.length>1)continue;let c=(l.offsetWidth+i)/e.offsetWidth*100;u.__mark(l,"width",c.toFixed(n.ACCURACY)+"%",r),a=o;break}for(let e=a+1;e<s.length;e+=1){let i=s[e][t];u.__mark(i,"width",null,r)}o||u.__unmark(r)}setColumnWidthByDelta(e,t,i,o,n){return u.__setColumnWidthByDelta(e,t,i,o,n)}static __mark(e,t,i,o){var n;o.push(e);let r=null!=(n=d.get(e))?n:{};r[t]=void 0===i?1:i,d.set(e,r)}static __unmark(e){e.forEach(e=>{let t=d.get(e);t&&(Object.keys(t).forEach(i=>{let o=t[i];switch(i){case"remove":s.Dom.safeRemove(e);break;case"rowspan":(0,l.attr)(e,"rowspan",(0,l.isNumber)(o)&&o>1?o:null);break;case"colspan":(0,l.attr)(e,"colspan",(0,l.isNumber)(o)&&o>1?o:null);break;case"width":null==o?(e.style.removeProperty("width"),(0,l.attr)(e,"style")||(0,l.attr)(e,"style",null)):(0,l.css)(e,"width",o.toString())}delete t[i]}),d.delete(e))})}constructor(){super(...arguments),this.selected=new Set}}u.__selectedByTable=new WeakMap,function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,r.debounce)()],u.prototype,"__recalculateStyles",null);let h=e=>e.getInstance("Table",e.o)},78644:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return E}});var o=i(78213),n=i(82758),r=i(45219),s=i(33433),a=i(87325),l=i(37133),c=i(2748),d=i(68345),u=i(23282),h=i(19306),p=i(72430),f=i(70799),m=i(56175),g=i(87058),b=i(38837),v=i(29960),y=i(37790),w=i(62843),_=i(72157),k=i(12153),C=i(56917),S=i(21491),x=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let I=new Set(["input","textarea","select"]),E=class e extends w.UIButton{className(){return"ToolbarButton"}getRole(){return"listitem"}updateAriaLabel(){if(super.updateAriaLabel(),this.trigger){let e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;(0,v.attr)(this.trigger,"aria-label",e)}}get toolbar(){let e=(0,a.getComponentClass)("ToolbarCollection");return this.closest(e)}update(){var e,t;let{control:i,state:o}=this,n=this.toolbar;if(!n)return;let r=null==(e=i.value)?void 0:e.call(i,n.jodit,this);void 0!==r&&(o.value=r),o.disabled=this.__calculateDisabledStatus(n),o.activated=this.__calculateActivatedStatus(n),null==(t=i.update)||t.call(i,n.jodit,this)}__calculateActivatedStatus(e){var t,i;return(!(0,h.isJoditObject)(this.j)||!!this.j.editorIsActive)&&(null!=(i=(t=this.control).isActive)&&!!i.call(t,this.j,this)||!!(e&&e.shouldBeActive(this)))}__calculateDisabledStatus(e){var t,i;return!!(this.j.o.disabled||this.j.o.readonly&&(!this.j.o.activeButtonsInReadOnly||!this.j.o.activeButtonsInReadOnly.includes(this.control.name))||(null==(i=(t=this.control).isDisabled)?void 0:i.call(t,this.j,this)))||!!(e&&e.shouldBeDisabled(this))}onChangeActivated(){(0,v.attr)(this.button,"aria-pressed",this.state.activated),super.onChangeActivated()}onChangeText(){(0,u.isFunction)(this.control.template)?this.text.innerHTML=this.control.template(this.j,this.control.name,this.j.i18n(this.state.text)):super.onChangeText(),this.setMod("text-icons",!!this.text.innerText.trim().length)}onChangeTabIndex(){(0,v.attr)(this.button,"tabindex",this.state.tabIndex),(0,v.attr)(this.trigger,"tabindex",this.state.tabIndex)}createContainer(){let e=this.componentName,t=this.j.c.span(e),i=super.createContainer();i.classList.remove(e),i.classList.add(e+"__button"),Object.defineProperty(i,"component",{value:this,configurable:!0}),c.Dom.append(t,i);let o=this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${e}__trigger">${k.Icon.get("chevron")}</span>`);return c.Dom.append(i,o),t}focus(){var e;null==(e=c.Dom.first(this.container,e=>c.Dom.isTag(e,"button")))||e.focus()}onChangeHasTrigger(){this.state.hasTrigger?c.Dom.append(this.container,this.trigger):c.Dom.safeRemove(this.trigger),this.setMod("with-trigger",this.state.hasTrigger||null)}onChangeDisabled(){let e=this.state.disabled?"disabled":null;(0,v.attr)(this.trigger,"disabled",e),(0,v.attr)(this.button,"disabled",e),(0,v.attr)(this.container,"disabled",e)}__initFromControl(){let{control:e,state:t}=this;this.updateSize(),t.name=e.name,this.__initIconFromControl(),e.tooltip&&(t.tooltip=(0,u.isFunction)(e.tooltip)?e.tooltip(this.j,e,this):e.tooltip),t.hasTrigger=!!(e.list||e.popup&&e.exec)}__initIconFromControl(){var e;let{control:t,state:i}=this,{textIcons:o}=this.j.o;if(!0===o||(0,u.isFunction)(o)&&o(t.name)||t.template){i.icon=(0,w.UIButtonState)().icon,i.text=t.text||t.name;return}if(!(0,f.isString)(t.icon)&&null!=t.icon){i.icon={name:t.icon.name||t.name,iconURL:t.icon.iconURL||"",fill:t.icon.fill||"",scale:t.icon.scale};return}if(t.iconURL)i.icon.iconURL=t.iconURL;else{let o=t.icon||t.name;i.icon.name=k.Icon.exists(o)||(null==(e=this.j.o.extraIcons)?void 0:e[o])?o:""}t.iconURL||i.icon.name||(i.text=t.text||t.name)}onTriggerClick(e){var t,i,o;if(this.openedPopup)return void this.__closePopup();let{control:n}=this;if((0,v.attr)(this.trigger,"aria-expanded",!0),e.buffer={actionTrigger:this},n.list)return this.__openControlList(n);if((0,u.isFunction)(n.popup)){let e=this.openPopup();e.parentElement=this;try{if(!1!==this.j.e.fire((0,g.camelCase)(`before-${n.name}-open-popup`),this.target,n,e)){let r=null!=(o=null!=(i=null==(t=this.toolbar)?void 0:t.getTarget(this))?i:this.target)?o:null,s=n.popup(this.j,r,this.__closePopup,this);s?e.setContent((0,f.isString)(s)?this.j.c.fromHTML(s):s).open(()=>(0,m.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0):this.__closePopup()}}catch(e){throw this.__closePopup(),e}this.j.e.fire((0,g.camelCase)(`after-${n.name}-open-popup`),e.container)}}onTriggerKeyDown(e){this.state.disabled||(e.key===n.KEY_DOWN?this.onButtonKeyDown(e):[n.KEY_ENTER,n.KEY_SPACE," "].includes(e.key)&&(e.preventDefault(),this.trigger.click()))}onButtonKeyDown(e){var t;e.key!==n.KEY_DOWN||this.state.disabled||!this.state.hasTrigger||e.altKey||e.ctrlKey||e.metaKey||(e.preventDefault(),e.stopPropagation(),this.openedPopup||this.trigger.click(),null==(t=this.__popupFocusables()[0])||t.focus())}__onPopupKeyDown(e){if(!this.openedPopup||e.altKey||e.ctrlKey||e.metaKey)return;let t=e.target;if(c.Dom.isTag(t,I)&&e.key!==n.KEY_ESC)return;let i=this.__popupFocusables(),o=i.indexOf(t);switch(e.key){case n.KEY_ESC:this.__closePopup();break;case n.KEY_UP:o<=0?this.__closePopup():i[o-1].focus();break;case n.KEY_DOWN:if(!i.length)return;i[(o+1)%i.length].focus();break;default:if(!this.control.list||!this.__typeAhead(e.key,i,o))return}e.preventDefault(),e.stopPropagation()}__onEditorKeyDown(e){if(this.openedPopup&&this.control.list&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&this.__typeAhead(e.key,this.__popupFocusables(),-1))return e.preventDefault(),!1}__typeAhead(e,t,i){var o,n;let r=Date.now();if((r-this.__typedAt>1e3||t[i]!==this.__typedTo)&&(this.__typed=""),1!==e.length||" "===e&&!this.__typed)return!1;this.__typedAt=r,this.__typed+=e,this.__typedTo=t[i];let{compare:s}=new Intl.Collator(void 0,{usage:"search",sensitivity:"base"}),a=this.__typed,l=Array.from(a).every(e=>0===s(e,a[0])),c=l?a[0]:a,d=l?i+1:Math.max(i,0);for(let e=0;e<t.length;e+=1){let i=t[(d+e)%t.length];if(0===s((null!=(n=null==(o=i.textContent)?void 0:o.trim())?n:"").slice(0,c.length),c)){i.focus(),this.__typedTo=i;break}}return!0}__popupFocusables(){let e=this.openedPopup;return e?Array.from(e.container.querySelectorAll('button:not([disabled]),a[href],input:not([disabled]):not([type="hidden"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])')).filter(e=>!!e.offsetParent):[]}__openControlList(e){var t,i,o,n,r;let s=null!=(t=this.jodit.options.controls)?t:{},a=e=>(0,_.findControlType)(e,s),l=e.list,c=this.openPopup();c.parentElement=this;let u=null==(i=e.popup)?void 0:i.call(e,this.j,null!=(r=null!=(n=null==(o=this.toolbar)?void 0:o.getTarget(this))?n:this.target)?r:null,this.__closePopup,this);if(u)return this.__openMenu(c,u);let h=(0,S.makeCollection)(this.j);h.parentElement=c,h.mode="vertical";let m=(t,i)=>{let o;if((0,f.isString)(i)&&a(i))return{name:i.toString(),...a(i)};if((0,f.isString)(t)&&a(t))return{name:t.toString(),...a(t),..."object"==typeof i?i:{}};o=t,(0,p.isPlainObject)(o)&&"title"in o&&"value"in o&&(i=t.value,t=t.title);let{childTemplate:n}=e,r={name:t.toString(),template:n&&((e,t,i)=>n(e,t,i,this)),exec:e.childExec?(t,i,o)=>{var n;return null==(n=e.childExec)?void 0:n.call(e,t,i,{...o,parentControl:e})}:e.exec,data:e.data,command:e.command,isActive:e.isChildActive,value:e.value,isDisabled:e.isChildDisabled,mode:e.mode,args:[...e.args?e.args:[],t,i]};return(0,f.isString)(i)&&(r.text=i),r};h.build((0,d.isArray)(l)?l.map(m):(0,y.keys)(l,!1).map(e=>m(e,l[e])),this.target),this.__openMenu(c,h)}__openMenu(e,t){e.setContent(t).open(()=>(0,m.position)(this.container),!1,this.j.o.allowTabNavigation?this.container:void 0),this.state.activated=!0}onOutsideClick(e){this.openedPopup&&(e&&c.Dom.isNode(e.target)&&(c.Dom.isOrContains(this.container,e.target)||this.openedPopup.isOwnClick(e))||this.__closePopup())}openPopup(){return this.__closePopup(),this.openedPopup=new C.Popup(this.j,!1),this.j.e.on(this.ow,"mousedown touchstart",this.onOutsideClick).on("escape closeAllPopups",this.onOutsideClick).on("keydown",this.__onEditorKeyDown).on(this.openedPopup.container,"keydown",this.__onPopupKeyDown),this.openedPopup}__closePopup(){let e=this.openedPopup;if(!e)return;this.openedPopup=null,this.j.e.off(this.ow,"mousedown touchstart",this.onOutsideClick).off("escape closeAllPopups",this.onOutsideClick).off("keydown",this.__onEditorKeyDown);let{activeElement:t}=this.od,i=t&&c.Dom.isOrContains(e.container,t);this.state.activated=!1,e.close(),e.destruct(),this.trigger&&(0,v.attr)(this.trigger,"aria-expanded",!1),i&&this.focus()}onClick(e){var t,i,o,n,r,s,a;let{control:l}=this;if((0,u.isFunction)(l.exec)){let c=null!=(o=null!=(i=null==(t=this.toolbar)?void 0:t.getTarget(this))?i:this.target)?o:null,d=l.exec(this.j,c,{control:l,originalEvent:e,button:this});if(!1!==d&&!0!==d&&(null==(r=null==(n=this.j)?void 0:n.e)||r.fire("synchro"),this.parentElement&&this.parentElement.update(),null==(a=null==(s=this.j)?void 0:s.e)||a.fire("closeAllPopups afterExec")),!1!==d)return}return l.list?this.__openControlList(l):(0,u.isFunction)(l.popup)?this.onTriggerClick(e):void((l.command||l.name)&&((0,y.call)((0,h.isJoditObject)(this.j)?this.j.execCommand.bind(this.j):this.j.od.execCommand.bind(this.j.od),l.command||l.name,!1,l.args&&l.args[0]),this.j.e.fire("closeAllPopups")))}destruct(){return this.__closePopup(),super.destruct()}constructor(e,t,i=null){super(e),this.control=t,this.target=i,this.state={...(0,w.UIButtonState)(),theme:"toolbar",currentValue:"",hasTrigger:!1},this.__typed="",this.__typedAt=0,this.__typedTo=null,this.openedPopup=null;let n=this.getElm("button");(0,b.assert)(n,"Element button should exists"),this.button=n,Object.defineProperty(n,"component",{value:this,configurable:!0});let r=this.getElm("trigger");(0,b.assert)(r,"Element trigger should exists"),this.trigger=r,r.remove(),e.e.on([this.button,this.trigger],"mousedown",e=>e.preventDefault()),this.onAction(this.onClick),this.hookStatus(o.STATUSES.ready,()=>{this.__initFromControl(),this.update()}),t.mods&&Object.keys(t.mods).forEach(e=>{t.mods&&this.setMod(e,t.mods[e])})}};x([s.cacheHTML],E.prototype,"createContainer",null),x([(0,l.watch)("state.hasTrigger",{immediately:!1})],E.prototype,"onChangeHasTrigger",null),x([(0,l.watch)("trigger:click")],E.prototype,"onTriggerClick",null),x([(0,l.watch)("trigger:keydown")],E.prototype,"onTriggerKeyDown",null),x([(0,l.watch)("button:keydown")],E.prototype,"onButtonKeyDown",null),x([r.autobind],E.prototype,"__onPopupKeyDown",null),x([r.autobind],E.prototype,"__onEditorKeyDown",null),x([r.autobind],E.prototype,"onOutsideClick",null),x([r.autobind],E.prototype,"__closePopup",null),E=x([a.component],E)},80319:function(e,t,i){"use strict";i.d(t,{ToolbarContent:function(){return l}});var o=i(65478),n=i(22732),r=i(21537),s=i(62843);let a=new Set(["input","button","select","textarea"]),l=class e extends s.UIButton{className(){return"ToolbarContent"}getRole(){return"listitem"}onChangeActivated(){}update(){var e,t,i;let{control:o}=this,s=o.getContent(this.j,this);((0,r.isString)(s)||s.parentNode!==this.container)&&(n.Dom.detach(this.container),n.Dom.append(this.container,(0,r.isString)(s)?this.j.create.fromHTML(s):s)),this.state.disabled=!!(null==(e=o.isDisabled)?void 0:e.call(o,this.j,this)),this.state.activated=!!(null==(t=o.isActive)?void 0:t.call(o,this.j,this)),null==(i=o.update)||i.call(o,this.j,this),this.onChangeDisabled(),this.onChangeActivated(),super.update()}onChangeDisabled(){super.onChangeDisabled(),n.Dom.each(this.container,e=>{n.Dom.isTag(e,a)&&(0,r.attr)(e,"disabled",this.state.disabled||null)})}createContainer(){return this.j.c.span(this.componentName)}constructor(e,t,i=null){super(e),this.control=t,this.target=i,this.container.classList.add(`${this.componentName}_${this.clearName(t.name)}`)}};l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([o.component],l)},36646:function(e,t,i){"use strict";i.d(t,{ToolbarButton:function(){return o.ToolbarButton},ToolbarContent:function(){return n.ToolbarContent},ToolbarSelect:function(){return r.ToolbarSelect}});var o=i(78644),n=i(80319),r=i(83111)},83111:function(e,t,i){"use strict";i.d(t,{ToolbarSelect:function(){return a}});var o=i(65478),n=i(72430),r=i(70799),s=i(78644);let a=class e extends s.ToolbarButton{className(){return"ToolbarSelect"}update(){var e,t,i;super.update(),this.state.icon.name="";let{list:o,data:s}=this.control;if(o){let a=this.state.value||(s&&(0,r.isString)(s.currentValue)?s.currentValue:void 0);a||(a=Object.keys(o)[0]);let l=((0,n.isPlainObject)(o)&&o[a.toString()]||a).toString();this.state.text=null!=(i=null==(t=(e=this.control).textTemplate)?void 0:t.call(e,this.jodit,l))?i:l}}};a=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([o.component],a)},11676:function(e,t,i){"use strict";i.d(t,{ToolbarCollection:function(){return f}});var o=i(65478),n=i(45219),r=i(87325),s=i(97357),a=i(37133),l=i(29960),c=i(41180),d=i(82760),u=i(24536),h=i(21491),p=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let f=class e extends u.UIList{className(){return"ToolbarCollection"}getRole(){return"toolbar"}get firstButton(){let[e]=this.buttons;return e||null}makeButton(e,t=null){return(0,h.makeButton)(this.j,e,t)}makeSelect(e,t=null){return(0,h.makeSelect)(this.j,e,t)}shouldBeActive(e){}shouldBeDisabled(e){}getTarget(e){return e.target||null}__immediateUpdate(){this.isDestructed||this.j.isLocked||(super.update(),this.j.e.fire("afterUpdateToolbar",this))}update(){this.__immediateUpdate()}setDirection(e){(0,c.css)(this.container,"direction",e),(0,l.attr)(this.container,"dir",e)}__initEvents(){this.j.e.on(this.__listenEvents,this.update).on("afterSetMode focus",this.__immediateUpdate)}hide(){this.container.remove()}show(){this.appendTo(this.j.toolbarContainer)}showInline(e){throw(0,d.error)("The method is not implemented for this class.")}build(e,t=null){let i=this.j.e.fire("beforeToolbarBuild",e);return i&&(e=i),super.build(e,t),this}destruct(){this.isDestructed||(this.j.e.off(this.__listenEvents,this.update).off("afterSetMode focus",this.__immediateUpdate),super.destruct())}constructor(e){super(e),this.__listenEvents="updatePlugins updateToolbar changeStack mousedown mouseup keydown change readonly afterResize selectionchange changeSelection focus afterSetMode touchstart focus blur"}};p([(0,a.watch)(":afterInit"),n.autobind],f.prototype,"__immediateUpdate",null),p([(0,o.debounce)(e=>e.j.defaultTimeout,!0)],f.prototype,"update",null),p([(0,s.hook)("ready")],f.prototype,"__initEvents",null),f=p([r.component],f)},37426:function(e,t,i){"use strict";i.d(t,{ToolbarEditorCollection:function(){return l}});var o=i(82758),n=i(65478),r=i(22732),s=i(21537),a=i(11676);let l=class e extends a.ToolbarCollection{className(){return"ToolbarEditorCollection"}shouldBeDisabled(e){let t=super.shouldBeDisabled(e);if(void 0!==t)return t;let i=void 0===e.control.mode?o.MODE_WYSIWYG:e.control.mode;return i!==o.MODE_SPLIT&&i!==this.j.getRealMode()}shouldBeActive(e){let t,i=super.shouldBeActive(e);if(void 0!==i)return i;let o=this.j.selection?this.j.s.current():null;if(!o)return!1;if(e.control.tags){let i=e.control.tags;if(t=o,r.Dom.up(t,e=>{if(e&&-1!==i.indexOf(e.nodeName.toLowerCase()))return!0},this.j.editor))return!0}if(e.control.css){let i=e.control.css;if(t=o,r.Dom.up(t,e=>{if(e&&!r.Dom.isText(e)&&!r.Dom.isComment(e))return this.checkActiveStatus(i,e)},this.j.editor))return!0}return!1}getTarget(e){return e.target||this.j.s.current()||null}prependInvisibleInput(e){let t=this.j.create.element("input",{name:"jodit-toolbar-focus-helper_"+this.j.id,tabIndex:-1,disabled:!0,style:"width: 0; height:0; position: absolute; visibility: hidden;"});r.Dom.appendChildFirst(e,t)}showInline(e){this.jodit.e.fire("showInlineToolbar",e)}hide(){this.jodit.e.fire("hidePopup"),super.hide(),this.jodit.e.fire("toggleToolbar")}show(){super.show(),this.jodit.e.fire("toggleToolbar")}constructor(e){super(e),this.checkActiveStatus=(e,t)=>{let i=0,o=0;return Object.keys(e).forEach(n=>{let r=e[n];(0,s.isFunction)(r)?r(this.j,(0,s.css)(t,n).toString())&&(i+=1):-1!==r.indexOf((0,s.css)(t,n).toString())&&(i+=1),o+=1}),o===i},this.prependInvisibleInput(this.container)}};l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([n.component],l)},21491:function(e,t,i){"use strict";i.d(t,{makeButton:function(){return a},makeCollection:function(){return s},makeSelect:function(){return l}});var o=i(87325),n=i(23282),r=i(19306);function s(e,t){let i=(0,o.getComponentClass)("ToolbarCollection"),n=(0,o.getComponentClass)("ToolbarEditorCollection"),s=(0,r.isJoditObject)(e)?new n(e):new i(e);return e.o.textIcons&&s.container.classList.add("jodit_text_icons"),t&&(s.parentElement=t),e.o.toolbarButtonSize&&(s.buttonSize=e.o.toolbarButtonSize),s}function a(e,t,i=null){if((0,n.isFunction)(t.getContent))return new((0,o.getComponentClass)("ToolbarContent"))(e,t,i);let r=new((0,o.getComponentClass)("ToolbarButton"))(e,t,i);return r.state.tabIndex=e.o.allowTabNavigation?0:-1,r}function l(e,t,i=null){return new((0,o.getComponentClass)("ToolbarSelect"))(e,t,i)}},80536:function(e,t,i){"use strict";var o=i(68345),n=i(19306),r=i(29960),s=i(6441);s.Config.prototype.enableDragAndDropFileToEditor=!0,s.Config.prototype.uploader={url:"",insertImageAsBase64URI:!1,showTabInFileSelector:!0,imagesExtensions:["jpg","jpeg","png","gif","webp","bmp","svg","tiff","avif"],headers:null,data:null,filesVariableName:e=>`files[${e}]`,withCredentials:!1,pathVariableName:"path",format:"json",method:"POST",prepareData:e=>e,isSuccess:e=>e.success,getMessage:e=>void 0!==e.data.messages&&(0,o.isArray)(e.data.messages)?e.data.messages.join(" "):"",processFileName:(e,t,i)=>[e,t,i],process:e=>e.data,error(e){this.j.message.error(e.message,4e3)},getDisplayName:(e,t)=>e+t,defaultHandlerSuccess(e){let t=this.j||this;(0,n.isJoditObject)(t)&&e.files&&e.files.length&&e.files.forEach((i,o)=>{let[n,s]=e.isImages&&e.isImages[o]?["img","src"]:["a","href"],a=t.createInside.element(n);(0,r.attr)(a,s,e.baseurl+i),"a"===n&&(a.textContent=t.o.uploader.getDisplayName.call(this,e.baseurl,i)),"img"===n?t.s.insertImage(a,null,t.o.imageDefaultWidth):t.s.insertNode(a)})},defaultHandlerError(e){this.j.message.error(e.message)},contentType(e){return(void 0===this.ow.FormData||"string"==typeof e)&&"application/x-www-form-urlencoded; charset=UTF-8"}}},83987:function(e,t,i){"use strict";i.d(t,{buildData:function(){return n}});var o=i(21537);function n(e,t){if((0,o.isFunction)(e.o.buildData))return e.o.buildData.call(e,t);let i=e.ow.FormData;if(void 0!==i){if(t instanceof i||(0,o.isString)(t))return t;let e=new i;return Object.keys(t).forEach(i=>{e.append(i,t[i])}),e}return t}},74569:function(e,t,i){"use strict";function o(e){var t,i;let[o,...n]=e.split(","),r=n.join(","),s=null!=(i=null==(t=o.split(":")[1])?void 0:t.split(";")[0])?i:"",a=/;base64/i.test(o)?atob(r):decodeURIComponent(r),l=new Uint8Array(new ArrayBuffer(a.length));for(let e=0;e<a.length;e+=1)l[e]=a.charCodeAt(e);return new Blob([l.buffer],{type:s})}i.d(t,{dataURItoBlob:function(){return o}})},94122:function(e,t,i){"use strict";i.d(t,{ajaxInstances:function(){return n.ajaxInstances},hasFiles:function(){return s},hasItems:function(){return a},processOldBrowserDrag:function(){return o.processOldBrowserDrag},send:function(){return n.send},sendFiles:function(){return r.sendFiles}}),i(83987);var o=i(50373),n=i(71686),r=i(80020);function s(e){return!!(e&&e.files&&e.files.length>0)}function a(e){return!!(e&&e.items&&e.items.length>0)}},50373:function(e,t,i){"use strict";i.d(t,{processOldBrowserDrag:function(){return c}});var o=i(82758),n=i(22732),r=i(580),s=i(21537),a=i(74569),l=i(80020);function c(e,t,i,c,d){if(t&&(!t.types.length||t.types[0]!==o.TEXT_PLAIN)){let t=e.j.c.div("",{tabindex:-1,style:"left: -9999px; top: 0; width: 0; height: 100%;line-height: 140%; overflow: hidden; position: fixed; z-index: 2147483647; word-break: break-all;",contenteditable:!0});n.Dom.append((0,r.getContainer)(e.j,e.constructor),t);let o=(0,s.isJoditObject)(e.j)?e.j.s.save():null;t.focus(),e.j.async.setTimeout(()=>{let r=t.firstChild;if(n.Dom.safeRemove(t),r&&r.hasAttribute("src")){let t=(0,s.attr)(r,"src")||"";o&&(0,s.isJoditObject)(e.j)&&e.j.s.restore(),(0,l.sendFiles)(e,[(0,a.dataURItoBlob)(t)],i,c).finally(d)}},e.j.defaultTimeout)}}},80020:function(e,t,i){"use strict";i.d(t,{sendFiles:function(){return r}});var o=i(21537),n=i(71686);function r(e,t,i,r,s){if(!t)return Promise.reject((0,o.error)("Need files"));let{o:a}=e,l=(0,o.toArray)(t);if(!l.length)return Promise.reject((0,o.error)("Need files"));if((0,o.isFunction)(a.beforeUpload)&&!1===a.beforeUpload.call(e,l)){let t=(0,o.error)("Upload canceled");return(r||a.defaultHandlerError).call(e,t),Promise.reject(t)}let c=[];if(a.insertImageAsBase64URI&&function(e,t,i,n,r,s){let a,l,c=[];for(l=0;l<e.length;l+=1)if((a=e[l])&&a.type){let d=a.type.match(/\/([a-z0-9]+)/i),u=d[1]?d[1].toLowerCase():"";if(!t.includes(u))continue;let h=new FileReader,p=n.j.async.promise((e,t)=>{h.onerror=t,h.onloadend=()=>{let t={baseurl:"",files:[h.result],isImages:[!0]};((0,o.isFunction)(r)?r:s).call(n,t),e(t)},h.readAsDataURL(a)});c.push(p),i.push(p),e[l]=null}c.length&&Promise.all(c).then(()=>{n.j.events&&n.j.e.fire("filesWereUploaded")}).catch(()=>{})}(l,a.imagesExtensions,c,e,i,a.defaultHandlerSuccess),(l=l.filter(e=>e)).length){let t,d=new FormData;d.append(a.pathVariableName,e.path),d.append("source",e.source);for(let i=0;i<l.length;i+=1)if(t=l[i]){let o=/\.\w+$/.test(t.name),n=t.type.match(/\/([a-z0-9]+)/i),r=n&&n[1]?n[1].toLowerCase():"",s=l[i].name||Math.random().toString().replace(".","");if(!o&&r){let e=r;["jpeg","jpg"].includes(e)&&(e="jpeg|jpg"),RegExp(".("+e+")$","i").test(s)||(s+="."+r)}let[c,u,h]=a.processFileName.call(e,a.filesVariableName(i),l[i],s);d.append(c,u,h)}s&&s(d),a.data&&(0,o.isPlainObject)(a.data)&&Object.keys(a.data).forEach(e=>{d.append(e,a.data[e])}),a.prepareData.call(e,d),c.push((0,n.send)(e,d).then(t=>(a.isSuccess.call(e,t)?((0,o.isFunction)(i)?i:a.defaultHandlerSuccess).call(e,a.process.call(e,t)):((0,o.isFunction)(r)?r:a.defaultHandlerError).call(e,(0,o.error)(a.getMessage.call(e,t))),t)).then(()=>{e.j.events&&e.j.e.fire("filesWereUploaded")}))}return Promise.all(c)}},71686:function(e,t,i){"use strict";i.d(t,{send:function(){return a}});var o=i(21537),n=i(41601),r=i(83987);let s=new WeakMap;function a(e,t){let i=(0,r.buildData)(e,t),a=t=>{e.j.progressbar.show().progress(t),t>=100&&e.j.progressbar.hide()},l=(t,i)=>{let r=new n.Ajax({xhr(){let t=new XMLHttpRequest;return void 0!==e.j.ow.FormData&&t.upload?(i(10),t.upload.addEventListener("progress",e=>{if(e.lengthComputable){let t=e.loaded/e.total;i(t*=100)}},!1)):i(100),t},method:e.o.method||"POST",data:t,url:(0,o.isFunction)(e.o.url)?e.o.url(t):e.o.url,headers:e.o.headers,queryBuild:e.o.queryBuild,contentType:e.o.contentType.call(e,t),withCredentials:e.o.withCredentials||!1}),a=s.get(e);return a||(a=new Set,s.set(e,a)),a.add(r),e.j.e.one("beforeDestruct",r.destruct),r.send().then(e=>e.json()).catch(e=>({success:!1,data:{messages:[e]}})).finally(()=>{r.destruct(),null==a||a.delete(r)})};return((0,o.isFunction)(e.o.customUploadFunction)&&(l=e.o.customUploadFunction),(0,o.isPromise)(i))?i.then(e=>l(e,a)).catch(t=>{e.o.error.call(e,t)}):l(i,a)}i.d(t,["ajaxInstances",0,s])},57380:function(e,t,i){"use strict";i.d(t,{Uploader:function(){return c}});var o=i(91907),n=i(82758),r=i(2748),s=i(21537),a=i(6441),l=i(94122);i(80536);class c extends o.ViewComponent{get j(){return this.jodit}className(){return"Uploader"}get o(){return this.options}setPath(e){return this.path=e,this}setSource(e){return this.source=e,this}bind(e,t,i){let o=()=>{e.classList.remove("jodit_drag_hover")},r=this,s=e=>{let s,a,c,d=e.clipboardData,u=e=>{a&&(e.append("extension",c),e.append("mimetype",a.type))};if(!n.IS_IE&&(0,l.hasFiles)(d))return(0,l.sendFiles)(r,d.files,t,i).finally(o),!1;if(n.IS_IE&&!n.IS_ES_NEXT)return(0,l.processOldBrowserDrag)(r,d,t,i,o);if((0,l.hasItems)(d)){let{items:n}=d;for(s=0;s<n.length;s+=1)if("file"===n[s].kind&&"image/png"===n[s].type){if(a=n[s].getAsFile()){let e=a.type.match(/\/([a-z0-9]+)/i);c=e[1]?e[1].toLowerCase():"",(0,l.sendFiles)(r,[a],t,i,u).finally(o)}e.preventDefault();break}}};r.j&&r.j.editor!==e?r.j.e.on(e,"paste",s):r.j.e.on("beforePaste",s),this.attachEvents(e,t,i,o)}attachEvents(e,t,i,o){let n=this;n.j.e.on(e,"dragend dragover dragenter dragleave drop",e=>{e.preventDefault()}).on(e,"dragover",t=>{((0,l.hasFiles)(t.dataTransfer)||(0,l.hasItems)(t.dataTransfer))&&(e.classList.add("jodit_drag_hover"),t.preventDefault())}).on(e,"dragend dragleave",t=>{e.classList.remove("jodit_drag_hover"),(0,l.hasFiles)(t.dataTransfer)&&t.preventDefault()}).on(e,"drop",r=>{e.classList.remove("jodit_drag_hover"),(0,l.hasFiles)(r.dataTransfer)&&(r.preventDefault(),r.stopImmediatePropagation(),(0,l.sendFiles)(n,r.dataTransfer.files,t,i).finally(o))});let a=r.Dom.first(e,e=>{var t;return r.Dom.isTag(e,"input")&&(null==(t=(0,s.attr)(e,"type"))?void 0:t.toLowerCase())==="file"});a&&n.j.e.on(a,"change",()=>{(0,l.sendFiles)(n,a.files,t,i).then(()=>{a.value="",/safari/i.test(navigator.userAgent)||(a.type="",a.type="file")}).finally(o)})}uploadRemoteImage(e,t,i){let o=this,{o:n}=o,r=(0,s.isFunction)(i)?i:n.defaultHandlerError;(0,l.send)(o,{action:"fileUploadRemote",url:e}).then(e=>{n.isSuccess.call(o,e)?((0,s.isFunction)(t)?t:n.defaultHandlerSuccess).call(o,n.process.call(o,e)):r.call(o,(0,s.error)(n.getMessage.call(o,e)))}).catch(e=>r.call(o,e))}upload(e){return this.async.promise((t,i)=>{(0,l.sendFiles)(this,e,t,i)})}destruct(){this.setStatus(o.STATUSES.beforeDestruct);let e=l.ajaxInstances.get(this);e&&(e.forEach(e=>{try{e.destruct()}catch(e){}}),e.clear()),super.destruct()}constructor(e,t){super(e),this.path="",this.source="default",this.options=(0,s.ConfigProto)(t||{},(0,s.ConfigProto)(a.Config.defaultOptions.uploader,(0,s.isJoditObject)(e)?e.o.uploader:{}))}}},22859:function(e,t,i){"use strict";var o=i(22732),n=i(21537),r=i(67510),s=i(37068);r.Icon.set("palette",s.default),i.d(t,["ColorPickerWidget",0,(e,t,i)=>{let s="jodit-color-picker",a=(0,n.normalizeColor)(i),l=e.c.div(s),c=e.o.textIcons?`<span>${e.i18n("palette")}</span>`:r.Icon.get("palette"),d=e=>{let t=[];return(0,n.isPlainObject)(e)?Object.keys(e).forEach(i=>{t.push(`<div class="${s}__group ${s}__group-${i}">`),t.push(d(e[i])),t.push("</div>")}):(0,n.isArray)(e)&&e.forEach(e=>{t.push(`<span class='${s}__color-item ${a===e?s+"__color-item_active_true":""}' title="${e}" style="background-color:${e}" data-color="${e}"></span>`)}),t.join("")},u=(0,n.isArray)(e.o.colors)?`<div class="${s}__group">${d(e.o.colors)}</div>`:d(e.o.colors);o.Dom.append(l,e.c.fromHTML(`<div class="${s}__groups">${u}</div>`)),o.Dom.append(l,e.c.fromHTML(`<div data-ref="extra" class="${s}__extra"></div>`));let{extra:h}=(0,n.refs)(l);o.Dom.append(h,e.c.fromHTML(`<div class="${s}__hex"><input data-ref="hexInput" type="text" spellcheck="false" aria-label="HEX" placeholder="#FF0000" value="${a||""}"/></div>`));let{hexInput:p}=(0,n.refs)(l),f=null,m=()=>{let e=p.value.trim();if(e===f)return;let i=/^#?[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(e),o=/^rgba?\([\d\s.,%]+\)$/i.test(e);if(!i&&!o)return;let r=(0,n.normalizeColor)(i&&!e.startsWith("#")?"#"+e:e);r&&(0,n.isFunction)(t)&&(f=e,t(r))};return e.e.on(p,"keydown",e=>{e.stopPropagation(),"Enter"===e.key&&(e.preventDefault(),m())}).on(p,"change",e=>{e.stopPropagation(),m()}),o.Dom.append(h,e.c.fromHTML(`<span class="${s}__remove" data-color="" title="${e.i18n("Remove")}">${e.o.textIcons?e.i18n("Remove"):r.Icon.get("eraser")}</span>`)),e.o.showBrowserColorPicker&&(0,n.hasBrowserColorPicker)()&&(o.Dom.append(h,e.c.fromHTML(`<div class="${s}__native">${c}<input type="color" value="#ffffff"/></div>`)),e.e.on(l,"change",e=>{e.stopPropagation();let i=e.target;if(!i||!i.tagName||!o.Dom.isTag(i,"input")||"color"!==i.type)return;let r=i.value||"";(0,n.isFunction)(t)&&t(r),e.preventDefault()})),e.e.on(l,"mousedown touchend",i=>{if(o.Dom.isTag(i.target,"input"))return void i.stopPropagation();i.stopPropagation(),i.preventDefault();let r=i.target;if((!r||!r.tagName||o.Dom.isTag(r,"svg")||o.Dom.isTag(r,"path"))&&r.parentNode&&(r=o.Dom.closest(r.parentNode,"span",e.editor)),!o.Dom.isTag(r,"span")||!r.classList.contains(s+"__color-item")&&!r.classList.contains(s+"__remove"))return;let a=(0,n.attr)(r,"-color")||"";t&&(0,n.isFunction)(t)&&t(a)}),e.e.fire("afterGenerateColorPicker",l,h,t,a),l}])},37068:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 3a9 9 0 1 0 0 18h1a2 2 0 0 0 1.5-3.3 1.7 1.7 0 0 1 1.3-2.8H18a3 3 0 0 0 3-3A9 9 0 0 0 12 3Z"/><circle cx="7" cy="10" r="0.7"/><circle cx="10" cy="6.5" r="0.7"/><circle cx="15" cy="7" r="0.7"/><circle cx="17.5" cy="11" r="0.7"/> </g> </svg> '},34793:function(e,t,i){"use strict";var o=i(2748),n=i(21537),r=i(67510),s=i(38927);let a=(e,t,{label:i,accept:o})=>{let n=e.c.fromHTML(`<div class="jodit-drag-and-drop__file-box"><strong>${e.i18n(i)}</strong><span><br>${e.i18n("or click")}</span><input type="file" accept="${o}" tabindex="-1" dir="auto" multiple=""/></div>`);return e.uploader.bind(n,i=>{t.call(e,i),e.e.fire("closeAllPopups")},t=>{e.message.error(t.message),e.e.fire("closeAllPopups")}),{icon:"upload",name:"Upload",content:n}};function l(e,t,i){let r=o.Dom.first(e,e=>o.Dom.isTag(e,"input")&&(0,n.attr)(e,"name")===t);return r?(i&&(r.value=i),r.value):""}i.d(t,["FileSelectorWidget",0,(e,t,i,c,d=!0)=>{let u,h=[],p=e.o.uploader;if(t.upload&&!1!==p.showTabInFileSelector&&(p.url||p.insertImageAsBase64URI||p.customUploadFunction)){let{upload:i}=t;h.push(a(e,t=>{let o=(0,n.isFunction)(i)?i:p.defaultHandlerSuccess;(0,n.isFunction)(o)&&o.call(e,t)},d?{label:"Drop image",accept:"image/*"}:{label:"Drop file",accept:"*"}))}if(t.filebrowser&&(e.o.filebrowser.ajax.url||e.o.filebrowser.items.url)&&h.push({icon:"folder",name:"Browse",content(){c&&c(),t.filebrowser&&e.filebrowser.open(t.filebrowser,d)}}),t.url){let s=new r.UIButton(e,{type:"submit",variant:"primary",text:"Insert"}),a=new r.UIForm(e,[new r.UIInput(e,{required:!0,label:"URL",name:"url",type:"text",placeholder:"https://"}),new r.UIInput(e,{name:"text",label:"Alternative text"}),new r.UIBlock(e,[s])]);i&&!o.Dom.isText(i)&&!o.Dom.isComment(i)&&(o.Dom.isTag(i,"img")||(0,n.$$)("img",i).length)&&(u="IMG"===i.tagName?i:(0,n.$$)("img",i)[0],l(a.container,"url",(0,n.attr)(u,"src")),l(a.container,"text",(0,n.attr)(u,"alt")),s.state.text="Update"),i&&o.Dom.isTag(i,"a")&&(l(a.container,"url",(0,n.attr)(i,"href")),l(a.container,"text",(0,n.attr)(i,"title")),s.state.text="Update"),a.onSubmit(i=>{(0,n.isFunction)(t.url)&&t.url.call(e,i.url,i.text)}),h.push({icon:"link",name:"URL",content:a.container})}let f=(0,s.TabsWidget)(e,h);return f.classList.add("jodit-file-selector"),f},"UploadTab",0,a])},92762:function(e,t,i){"use strict";i.d(t,{ColorPickerWidget:function(){return o.ColorPickerWidget},FileSelectorWidget:function(){return n.FileSelectorWidget},TabsWidget:function(){return r.TabsWidget},UploadTab:function(){return n.UploadTab}});var o=i(22859),n=i(34793),r=i(38927)},38927:function(e,t,i){"use strict";var o=i(91907),n=i(2748),r=i(23282),s=i(29960),a=i(67510);i.d(t,["TabsWidget",0,(e,t,i)=>{let l=e.c.div("jodit-tabs"),c=e.c.div("jodit-tabs__wrapper"),d=e.c.div("jodit-tabs__buttons");(0,s.attr)(d,{role:"tablist","aria-orientation":"horizontal"});let u={},h=[],p="";n.Dom.append(l,d),n.Dom.append(l,c);let f=e=>{u[e]&&(h.forEach(e=>{e.state.activated=!1}),Object.values(u).forEach(({tab:e})=>e.classList.remove("jodit-tab_active")),u[e].button.state.activated=!0,u[e].tab.classList.add("jodit-tab_active"))};if(t.forEach(({icon:l,name:m,content:g})=>{let b=e.c.div("jodit-tab");(0,s.attr)(b,{role:"tabpanel"});let v=(0,a.Button)(e,l||m,m);v.state.role="tab",e.e.on(v.container,"pointerdown",e=>e.preventDefault()),p||(p=m),n.Dom.append(d,v.container),h.push(v),v.container.classList.add("jodit-tabs__button","jodit-tabs__button_columns_"+t.length),(0,r.isFunction)(g)?b.classList.add("jodit-tab_empty"):n.Dom.append(b,o.Component.isInstanceOf(g,a.UIElement)?g.container:g),n.Dom.append(c,b),v.onAction(()=>(f(m),(0,r.isFunction)(g)&&!n.Dom.isElement(g)&&g.call(e),i&&(i.activeTab=m),!1)),u[m]={button:v,tab:b}}),f(i&&i.activeTab&&u[i.activeTab]?i.activeTab:p),i){let e=i.activeTab;Object.defineProperty(i,"activeTab",{configurable:!0,enumerable:!1,get:()=>e,set(t){e=t,f(t)}})}return l}])},73391:function(e,t,i){"use strict";var o=i(82758),n=i(580),r=i(21537),s=i(12153),a=i(6441),l=i(49399);a.Config.prototype.controls.about={exec(e){let t=e.dlg({closeOnClickOverlay:!0}),i=e.i18n.bind(e);t.setMod("theme",e.o.theme).setHeader(i("About Jodit")).setContent(`<div class="jodit-about">
|
|
125
125
|
<div>${i("Jodit Editor")} v.${e.getVersion()}</div>
|
|
126
126
|
<div>${i("License: %s",!(0,r.isLicense)(e.o.license)?e.o.license||"MIT":(0,r.normalizeLicense)(e.o.license))}</div>
|
|
127
127
|
<div>
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
<div class="&__spinner"></div>
|
|
142
142
|
</div>
|
|
143
143
|
</div>
|
|
144
|
-
</div>`}setPrompt(e){if(e){let{jodit:t}=this,i=t.o.aiAssistant[e],{aiCommonPrefixPrompt:o,aiCommonSuffixPrompt:n}=t.o.aiAssistant;this.promptInput.value=[o,(0,s.isString)(i)?i:"",n].filter(Boolean).join(" "),this.__toggleInsertButton(!0),this.promptInput.value&&(this.__formAiAssistant.submit(),this.__toggleSubmitButton(!0))}this.promptInput.focus()}onAiAssistentResponse(e){this.setMod("loading",!1),r.Dom.detach(this.__results),this.__aiResult=e,r.Dom.append(this.__results,this.jodit.c.fromHTML(e)),this.__toggleSubmitButton(!1),this.__toggleInsertButton(!1)}onAiAssistentError(e){this.__aiResult="",this.setMod("loading",!1),this.__error.textContent=e,r.Dom.detach(this.__results),this.__toggleSubmitButton(!1);let t=this.getFullElName("","hide","true");this.__results.classList.add(t),this.__toggleInsertButton(!0)}onChangePromptValue(){this.__toggleSubmitButton(!this.promptInput.value)}__toggleSubmitButton(e){this.__submitButton.state.disabled=e,this.__tryAgainButton.state.disabled=e}__toggleInsertButton(e){this.__insertButton.state.disabled=e,this.__insertAfterButton.state.disabled=e}constructor(e,{onInsert:t,onInsertAfter:i}){super(e),this.__aiResult="",this.__error=this.getElm("error"),this.__body=this.getElm("body"),this.__buttons=this.getElm("buttons"),this.__results=this.getElm("results"),this.__spinner=this.getElm("spinner"),this.__insertButton=(0,a.Button)(e,"","Insert","primary").onAction(()=>t(this.__aiResult)),this.__insertAfterButton=(0,a.Button)(e,"","Insert After","initial").onAction(()=>i(this.__aiResult));let o=()=>{this.__formAiAssistant.validate()&&(this.__formAiAssistant.submit(),this.__toggleInsertButton(!0),this.__toggleSubmitButton(!0))};this.__submitButton=(0,a.Button)(e,"ai-assistant","").onAction(o),this.__tryAgainButton=(0,a.Button)(e,"update","","initial").onAction(o),this.promptInput=new a.UITextArea(e,{name:"prompt",required:!0,label:"Prompt",placeholder:"Ask AI to improve generated text",className:this.getFullElName("prompt-row-input")});let n=new a.UIBlock(e,[this.__insertButton,this.__insertAfterButton,this.__tryAgainButton],{className:this.getFullElName("prompt-row")});this.__formAiAssistant=new a.UIForm(e,[new a.UIBlock(e,[this.promptInput,this.__submitButton],{className:this.getFullElName("prompt-row")})]).onSubmit(t=>{this.__error.textContent="",this.setMod("loading",!0),e.e.fire("invokeAiAssistant",t.prompt);let i=this.getFullElName("","hide","true");this.__results.classList.remove(i),this.__buttons.classList.remove(i),r.Dom.detach(this.__results),r.Dom.append(this.__results,this.__spinner),this.__insertButton.focus()}),r.Dom.append(this.__buttons,n.container),r.Dom.append(this.__body,this.__formAiAssistant.container),this.onChangePromptValue()}};c([(0,n.watch)(":ai-assistant-response")],d.prototype,"onAiAssistentResponse",null),c([(0,n.watch)(":ai-assistant-error")],d.prototype,"onAiAssistentError",null),c([(0,n.watch)("promptInput:change")],d.prototype,"onChangePromptValue",null),d=c([o.component],d)},25187:function(e,t,i){"use strict";i(73391),i(12391),i(93183),i(66707),i(41107),i(71255),i(82439),i(61323),i(93079),i(19063),i(19271),i(1255),i(575),i(11317),i(36243),i(23399),i(96111),i(2169),i(42263),i(16233),i(77469),i(23531),i(80763),i(3215),i(70045),i(93401),i(76295),i(59483),i(91071),i(61019),i(65517),i(20071),i(32309),i(64837),i(79799),i(31571),i(85407),i(59451),i(18363),i(8355),i(58519),i(6687),i(56113),i(9159),i(12019),i(36125),i(9881),i(28545),i(45927),i(52951),i(43809),i(7309),i(68687),i(59495),i(39627),i(767),i(43003),i(72439),i(94529),i(26551),i(72253),i(65735),i(83671),i(3115)},93183:function(e,t,i){"use strict";var o=i(82758),n=i(22732),r=i(580),s=i(23282),a=i(50911),l=i(45124);i(32496);var c=i(11338),d=i(14630);class u extends a.Plugin{afterInit(e){e.registerCommand("deleteButton",{exec:()=>this.onDelete(!1),hotkeys:e.o.delete.hotkeys.delete},{stopPropagation:!1}).registerCommand("backspaceButton",{exec:()=>this.onDelete(!0),hotkeys:e.o.delete.hotkeys.backspace},{stopPropagation:!1}).registerCommand("deleteWordButton",{exec:()=>this.onDelete(!1,"word"),hotkeys:e.o.delete.hotkeys.deleteWord}).registerCommand("backspaceWordButton",{exec:()=>this.onDelete(!0,"word"),hotkeys:e.o.delete.hotkeys.backspaceWord}).registerCommand("deleteSentenceButton",{exec:()=>this.onDelete(!1,"sentence"),hotkeys:e.o.delete.hotkeys.deleteSentence}).registerCommand("backspaceSentenceButton",{exec:()=>this.onDelete(!0,"sentence"),hotkeys:e.o.delete.hotkeys.backspaceSentence})}beforeDestruct(e){e.e.off("afterCommand.delete")}onDelete(e,t="char"){let i=this.j,r=i.selection;if(r.isFocused()||r.focus(),(0,c.checkNotCollapsed)(i))return i.e.fire("backSpaceAfterDelete",e),!1;let a=r.range,u=i.createInside.text(o.INVISIBLE_SPACE);try{if(n.Dom.safeInsertNode(a,u),!n.Dom.isOrContains(i.editor,u))return;if(i.e.fire("backSpaceBeforeCases",e,u))return!1;(0,l.moveNodeInsideStart)(i,u,e);let r=i.o.delete.disableCases;if(d.casesMap.some(([n,a])=>{if(!(r&&r.has(n))&&(0,s.isFunction)(a)&&a(i,u,e,t))return o.IS_PROD,!0}))return!1}catch(e){throw o.IS_PROD,e}finally{i.e.fire("backSpaceAfterDelete",e,u),this.safeRemoveEmptyNode(u)}return!1}safeRemoveEmptyNode(e){var t,i;let{range:o}=this.j.s;o.startContainer===e&&(e.previousSibling?n.Dom.isText(e.previousSibling)?o.setStart(e.previousSibling,null!=(i=null==(t=e.previousSibling.nodeValue)?void 0:t.length)?i:0):o.setStartAfter(e.previousSibling):e.nextSibling&&(n.Dom.isText(e.nextSibling)?o.setStart(e.nextSibling,0):o.setStartBefore(e.nextSibling)),o.collapse(!0),this.j.s.selectRange(o)),n.Dom.safeRemove(e)}}u.requires=["hotkeys"],r.pluginSystem.add("backspace",u)},62845:function(e,t,i){"use strict";i.d(t,{checkJoinNeighbors:function(){return s}});var o=i(82758),n=i(2748),r=i(63785);function s(e,t,i){let r=t,s=r;for(;r&&!n.Dom.findNotEmptySibling(r,i)&&r.parentElement!==e.editor;)s=r=r.parentElement;if(n.Dom.isElement(s)&&n.Dom.isContentEditable(s,e.editor)){var l,c;let r,d,u,h=n.Dom.findNotEmptySibling(s,i);if(n.Dom.isTag(h,"br"))return n.Dom.safeRemove(h),e.s.setCursorBefore(t),!0;if(h&&(l=s,c=h,r=n.Dom.isTag(c,o.LIST_TAGS),d=n.Dom.isTag(l,o.LIST_TAGS),u=(e,t)=>t?e.firstElementChild:e.lastElementChild,(d?(c=e.createInside.element(e.o.enterBlock),n.Dom.before(l,c),a(e,u(l,i),c,i)):!!c&&!!r&&!d&&a(e,l,u(c,!i),i))||a(e,s,function(e,t){if(!n.Dom.isTag(e,"table"))return e;let i=[];return n.Dom.each(e,e=>{n.Dom.isCell(e)&&i.push(e)}),i.length?i[t?i.length-1:0]:null}(h,i),i)))return e.s.setCursorBefore(t),!0}return!1}function a(e,t,i,o){if(t&&n.Dom.isElement(i)){n.Dom.moveContent(t,i,!o,(0,r.getMoveFilter)(e));let s=t;for(;s&&s!==e.editor&&n.Dom.isEmpty(s);){let e=s.parentElement;n.Dom.safeRemove(s),s=e}return!0}return!1}},91748:function(e,t,i){"use strict";i.d(t,{checkJoinTwoLists:function(){return s}});var o=i(2748),n=i(37790),r=i(63785);function s(e,t,i){let s=o.Dom.findSibling(t,i),a=o.Dom.findSibling(t,!i);if(!o.Dom.closest(t,o.Dom.isElement,e.editor)&&o.Dom.isList(s)&&o.Dom.isList(a)&&o.Dom.isTag(s.lastElementChild,"li")&&o.Dom.isTag(a.firstElementChild,"li")){let{setCursorBefore:l,setCursorAfter:c}=e.s,d=s.lastElementChild,u=a.firstElementChild;return(0,n.call)(i?o.Dom.prepend:o.Dom.append,u,t),o.Dom.moveContent(a,s,!i,(0,r.getMoveFilter)(e)),o.Dom.safeRemove(a),(0,n.call)(i?o.Dom.append:o.Dom.prepend,d,t),(0,n.call)(i?l:c,t),!0}return!1}},11338:function(e,t,i){"use strict";function o(e){return!e.s.isCollapsed()&&(e.execCommand("Delete"),!0)}i.d(t,{checkNotCollapsed:function(){return o}})},73792:function(e,t,i){"use strict";i.d(t,{checkRemoveChar:function(){return function e(t,i,s,l){var c,d,u,h;let p,f=s?-1:1,m=n.Dom.sibling(i,!s),g=n.Dom.sibling(i,s),b=null,v=!1;for(g||(g=a(i,s,t.editor));g&&(n.Dom.isText(g)||n.Dom.isInlineBlock(g));){for(;n.Dom.isInlineBlock(g);)g=s?null==g?void 0:g.lastChild:null==g?void 0:g.firstChild;if(!g)break;if((null==(c=g.nodeValue)?void 0:c.length)&&(p=function(e,t,i,s){let a=(0,r.toArray)(e.nodeValue),l=a.length,c=t?l-1:0;if(a[c]===o.INVISIBLE_SPACE)for(;a[c]===o.INVISIBLE_SPACE;)c+=i;let d=a[c];if(a[c+i]===o.INVISIBLE_SPACE){for(c+=i;a[c]===o.INVISIBLE_SPACE;)c+=i;c+=t?1:-1}return a=t&&c<0?[]:a.slice(t?0:c+1,t?c:l),function(e,t,i){var s;if(!e||!n.Dom.isText(e)||(!t?/ $/:/^ /).test(null!=(s=e.nodeValue)?s:"")||!(0,r.trimInv)(e.nodeValue||"").length)for(let e=t?i.length-1:0;t?e>=0:e<i.length;e+=t?-1:1)if(" "===i[e])i[e]=o.NBSP_SPACE;else break}(s,t,a),e.nodeValue=a.join(""),d}(g,s,f,m),!g.nodeValue.length&&n.Dom.isInlineBlock(g.parentNode)&&(g.nodeValue=o.INVISIBLE_SPACE)),(null==(d=g.nodeValue)?void 0:d.length)||(b=g),!(0,r.isVoid)(p)&&p!==o.INVISIBLE_SPACE){u=g,h=p,(0,r.call)(s?n.Dom.after:n.Dom.before,u,i),("sentence"===l||"word"===l&&" "!==h&&h!==o.NBSP_SPACE)&&e(t,i,s,l),v=!0;break}let y=a(g,s,t.editor);b&&(n.Dom.safeRemove(b),b=null),g=y}return b&&n.Dom.safeRemove(b),v&&(function(e){let t=e.parentElement;for(;t&&n.Dom.isInlineBlock(t)&&n.Dom.isTag(t,"a");){let i=t.parentElement;n.Dom.isEmpty(t)&&(n.Dom.after(t,e),n.Dom.safeRemove(t)),t=i}}(i),i.parentElement!==t.editor&&n.Dom.isBlock(i.parentElement)&&n.Dom.each(i.parentElement,n.Dom.isEmptyTextNode)&&n.Dom.after(i,t.createInside.element("br")),t.s.setCursorBefore(i),n.Dom.isTag(i.previousSibling,"br")&&!n.Dom.findNotEmptySibling(i,!1)&&n.Dom.after(i,t.createInside.element("br"))),v}}});var o=i(82758),n=i(22732),r=i(21537),s=i(63785);function a(e,t,i){let o=n.Dom.sibling(e,t);return!o&&e.parentNode&&e.parentNode!==i&&(o=(0,s.findMostNestedNeighbor)(e,!t,i,!0))&&n.Dom.closest(e,"li",i)!==n.Dom.closest(o,"li",i)?null:o}},87536:function(e,t,i){"use strict";i.d(t,{checkRemoveContentNotEditable:function(){return s}});var o=i(22732),n=i(21537),r=i(45124);function s(e,t,i){let s=o.Dom.findSibling(t,i);return!s&&t.parentElement&&t.parentElement!==e.editor&&(s=o.Dom.findSibling(t.parentElement,i)),!(!o.Dom.isElement(s)||o.Dom.isContentEditable(s,e.editor))&&((0,n.call)(i?o.Dom.before:o.Dom.after,s,t),o.Dom.safeRemove(s),(0,r.moveNodeInsideStart)(e,t,i),(0,n.call)(i?e.s.setCursorBefore:e.s.setCursorAfter,t),!0)}},12474:function(e,t,i){"use strict";i.d(t,{checkRemoveEmptyNeighbor:function(){return n}});var o=i(2748);function n(e,t,i){let n=o.Dom.closest(t,o.Dom.isElement,e.editor);if(!n)return!1;let r=o.Dom.findNotEmptySibling(n,i);return!!(r&&o.Dom.isEmpty(r))&&(o.Dom.safeRemove(r),e.s.setCursorBefore(t),!0)}},58940:function(e,t,i){"use strict";i.d(t,{checkRemoveEmptyParent:function(){return s}});var o=i(82758),n=i(22732),r=i(91748);function s(e,t,i){let s=!1,{setCursorBefore:a,setCursorIn:l}=e.s,c=n.Dom.closest(t,n.Dom.isElement,e.editor);if(!c||!n.Dom.isEmpty(c))return!1;let d=n.Dom.findNotEmptyNeighbor(t,i,e.editor);do if(c&&n.Dom.isEmpty(c)&&!n.Dom.isCell(c)){n.Dom.after(c,t);let i=n.Dom.closest(c,e=>n.Dom.isElement(e)&&e!==c,e.editor);n.Dom.safeRemove(c),s=!0,c=i}else break;while(c)return!!(s&&(0,r.checkJoinTwoLists)(e,t,i))||(!d||n.Dom.isText(d)||n.Dom.isTag(d,o.INSEPARABLE_TAGS)?a(t):l(d,!i),s)}},56825:function(e,t,i){"use strict";i.d(t,{checkRemoveUnbreakableElement:function(){return s}});var o=i(82758),n=i(2748),r=i(58940);function s(e,t,i){let s=n.Dom.findSibling(t,i);return!!(n.Dom.isElement(s)&&(n.Dom.isTag(s,o.INSEPARABLE_TAGS)||n.Dom.isEmpty(s)))&&(n.Dom.safeRemove(s),n.Dom.isTag(s,"br")&&!n.Dom.findNotEmptySibling(t,!1)&&n.Dom.after(t,e.createInside.element("br")),e.s.setCursorBefore(t),n.Dom.isTag(s,"br")&&(0,r.checkRemoveEmptyParent)(e,t,i),!0)}},90240:function(e,t,i){"use strict";i.d(t,{checkTableCell:function(){return n}});var o=i(2748);function n(e,t){let i=t.parentElement;return!!o.Dom.isCell(i)}},68034:function(e,t,i){"use strict";i.d(t,{checkUnwrapFirstListItem:function(){return r}});var o=i(2748),n=i(43555);function r(e,t,i){var r;let s=o.Dom.closest(t,o.Dom.isElement,e.editor),{s:a}=e;if(o.Dom.isLeaf(s)&&(null==(r=null==s?void 0:s.parentElement)?void 0:r[i?"firstElementChild":"lastElementChild"])===s&&a.cursorInTheEdge(i,s)){let r=s.parentElement,l=e.createInside.element(e.o.enterBlock);return(0,n.call)(i?o.Dom.before:o.Dom.after,r,l),o.Dom.moveContent(s,l),o.Dom.safeRemove(s),o.Dom.isEmpty(r)&&o.Dom.safeRemove(r),(0,n.call)(i?a.setCursorBefore:a.setCursorAfter,t),!0}return!1}},14630:function(e,t,i){"use strict";var o=i(62845),n=i(91748),r=i(73792),s=i(87536),a=i(12474),l=i(58940),c=i(56825),d=i(90240),u=i(68034);let h=[["remove-unbreakable",c.checkRemoveUnbreakableElement],["remove-not-editable",s.checkRemoveContentNotEditable],["remove-char",r.checkRemoveChar],["table-cell",d.checkTableCell],["remove-empty-parent",l.checkRemoveEmptyParent],["remove-empty-neighbor",a.checkRemoveEmptyNeighbor],["join-two-lists",n.checkJoinTwoLists],["join-neighbors",o.checkJoinNeighbors],["unwrap-first-list-item",u.checkUnwrapFirstListItem]];h.map(([,e])=>e),i.d(t,["casesMap",0,h])},32496:function(e,t,i){"use strict";i(6441).Config.prototype.delete={hotkeys:{delete:["delete","cmd+backspace"],deleteWord:["ctrl+delete","cmd+alt+backspace","ctrl+alt+backspace"],deleteSentence:["ctrl+shift+delete","cmd+shift+delete"],backspace:["backspace"],backspaceWord:["ctrl+backspace"],backspaceSentence:["ctrl+shift+backspace","cmd+shift+backspace"]}}},63785:function(e,t,i){"use strict";i.d(t,{findMostNestedNeighbor:function(){return n},getMoveFilter:function(){return r}});var o=i(22732);function n(e,t,i,r=!1){let s=e=>t?e.firstChild:e.lastChild,a=o.Dom.findNotEmptyNeighbor(e,!t,i);if(r&&o.Dom.isElement(a)&&!o.Dom.isInlineBlock(a))return null;if(a)do{if(!s(a))return a;a=s(a)}while(a)return null}function r(e){return t=>!0!==e.e.fire("backSpaceIsMovedIgnore",t)}},41107:function(e,t,i){"use strict";var o=i(580),n=i(21537),r=i(12153),s=i(6441);i(73674);var a=i(820),l=i(53651),c=i(16020),d=i(89758),u=i(98527),h=i(51855);o.pluginSystem.add("bold",function(e){let t=t=>{let i,o=s.Config.defaultOptions.controls[t],r={...o.css};return Object.keys(r).forEach(e=>{i||(i={}),i[e]=(0,n.isArray)(r[e])?r[e][0]:r[e]}),e.s.commitStyle({element:o.tags?o.tags[0]:void 0}),e.synchronizeValues(),!1};["bold","italic","underline","strikethrough"].forEach(t=>{e.registerButton({name:t,group:"font-style"})}),["superscript","subscript"].forEach(t=>{e.registerButton({name:t,group:"script"})}),e.registerCommand("bold",{exec:t,hotkeys:["ctrl+b","cmd+b"]}).registerCommand("italic",{exec:t,hotkeys:["ctrl+i","cmd+i"]}).registerCommand("underline",{exec:t,hotkeys:["ctrl+u","cmd+u"]}).registerCommand("strikethrough",{exec:t}).registerCommand("subscript",{exec:t}).registerCommand("superscript",{exec:t})}),r.Icon.set("bold",a.default).set("italic",l.default).set("strikethrough",c.default).set("subscript",d.default).set("superscript",u.default).set("underline",h.default)},73674:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.controls.subscript={tags:["sub"],tooltip:"subscript"},o.Config.prototype.controls.superscript={tags:["sup"],tooltip:"superscript"},o.Config.prototype.controls.bold={tagRegExp:/^(strong|b)$/i,tags:["strong","b"],css:{"font-weight":["bold","700"]},tooltip:"Bold"},o.Config.prototype.controls.italic={tagRegExp:/^(em|i)$/i,tags:["em","i"],css:{"font-style":"italic"},tooltip:"Italic"},o.Config.prototype.controls.underline={tagRegExp:/^(u)$/i,tags:["u"],css:{"text-decoration-line":"underline"},tooltip:"Underline"},o.Config.prototype.controls.strikethrough={tagRegExp:/^(s)$/i,tags:["s"],css:{"text-decoration-line":"line-through"},tooltip:"Strike through"}},820:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.75" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M6 4h7a4 4 0 0 1 0 8H6V4Zm0 8h8a4 4 0 0 1 0 8H6v-8Z"/> </g> </svg> '},53651:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M10 4h9M5 20h9M15 4 9 20"/> </g> </svg> '},16020:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M17 6c-1-1.5-2.5-2-5-2-3 0-5 1.5-5 4 0 1.8 1.5 3 5 4s5 2.2 5 4c0 2.5-2 4-5 4-2.5 0-4-.5-5-2M3 12h18"/> </g> </svg> '},89758:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 4 9 12M12 4 3 16M16 16a2 2 0 0 1 4 0c0 1.5-4 3-4 5h4"/> </g> </svg> '},98527:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 8 9 12M12 8 3 20M16 4a2 2 0 0 1 4 0c0 1.5-4 3-4 5h4"/> </g> </svg> '},51855:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M6 3v8a6 6 0 0 0 12 0V3M4 21h16"/> </g> </svg> '},71255:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(37790),s=i(50911),a=i(12153),l=i(6441),c=i(31151);l.Config.prototype.controls.classSpan={command:"applyClassName",exec:r.memorizeExec,list:["enabled","disabled","activated","text-left","text-center","text-right","warning","error"],isChildActive(e,t){let i=e.s.current();if(i){let n=o.Dom.closest(i,o.Dom.isElement,e.editor)||e.editor;return!!(t.control.args&&n.classList.contains(t.control.args[0].toString()))}return!1},isActive(e,t){let i=e.s.current();if(i){let n=o.Dom.closest(i,o.Dom.isElement,e.editor)||e.editor,r=!1;return t.control.list&&Object.keys(t.control.list).forEach(e=>{n.classList.contains(e)&&(r=!0)}),!!(n&&n!==e.editor&&void 0!==t.control.list&&r)}return!1},childTemplate:(e,t,i)=>`<span class="${t}">${e.i18n(i)}</span>`,tooltip:"Insert className"};class d extends s.Plugin{afterInit(e){e.registerCommand("applyClassName",(t,i,o)=>(e.s.commitStyle({attributes:{class:o}}),!1))}beforeDestruct(){}constructor(){super(...arguments),this.buttons=[{name:"classSpan",group:"script"}]}}n.pluginSystem.add("classSpan",d),a.Icon.set("class-span",c.default)},31151:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M8 4H5v16h3m8-16h3v16h-3M9 15l3-7 3 7m-5-2h4"/> </g> </svg> '},82439:function(e,t,i){"use strict";var o=i(65478),n=i(2748),r=i(70071),s=i(580),a=i(86518),l=i(20356);i(46776);var c=i(59498),d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class u extends l.Plugin{afterInit(){this.onChangeCleanHTML()}get isEditMode(){return!(this.j.isInDestruct||!this.j.isEditorMode()||this.j.getReadOnly())}onChangeCleanHTML(){if(!this.isEditMode)return;let e=this.j;this.walker.setWork(e.editor),this.currentSelectionNode=e.s.current()}startWalker(){let{jodit:e}=this,t=(0,c.getHash)(this.j.o.cleanHTML.allowTags),i=(0,c.getHash)(this.j.o.cleanHTML.denyTags);this.walker.on("visit",o=>(0,c.visitNodeWalker)(e,o,t,i,this.currentSelectionNode)).on("end",e=>{this.j.e.fire(e?"internalChange finishedCleanHTMLWorker":"finishedCleanHTMLWorker")})}beforeCommand(e){if("removeformat"===e.toLowerCase())return this.j.s.isCollapsed()?(0,c.removeFormatForCollapsedSelection)(this.j):(0,c.removeFormatForSelection)(this.j),!1}onAfterSetNativeEditorValue(){(0,a.safeHTML)(this.j.editor,this.j.o.cleanHTML)}onBeforeSetNativeEditorValue(e){let[t,i]=this.j.o.cleanHTML.useIframeSandbox?this.j.createInside.sandbox():[this.j.od.implementation.createHTMLDocument("").body];return t.innerHTML=e.value,this.j.e.fire("safeHTML",t),e.value=t.innerHTML,(0,a.safeHTML)(t,{safeJavaScriptLink:!0,removeOnError:!0}),n.Dom.safeRemove(i),!1}onAfterGetValueFromEditor(e){if(this.__singleQuotesInFontFamily(e),this.__removeTrailingBr(e),!this.j.o.cleanHTML.collapseEmptyValueToEmptyString)return;let t=/^<([a-z][a-z0-9]*)\b[^>]*>(?:<br\/?>)?<\/\1>$/i.exec(e.value.trim());t&&/^(p|div|h[1-6]|blockquote|pre)$/i.test(t[1])&&(e.value="")}__removeTrailingBr(e){if(!this.j.o.cleanHTML.removeTrailingBr||!/<br/i.test(e.value))return;let t=this.j.c.div();t.innerHTML=e.value,[t,...t.querySelectorAll("p, div, li, td, th, h1, h2, h3, h4, h5, h6, blockquote")].forEach(e=>{var t;let i=e.lastChild;if(!n.Dom.isTag(i,"br"))return;let o=i.previousSibling;!o||n.Dom.isTag(o,"br")||(!n.Dom.isText(o)||(null==(t=o.nodeValue)?void 0:t.trim())||o.previousSibling)&&n.Dom.safeRemove(i)}),e.value=t.innerHTML}__singleQuotesInFontFamily(e){this.j.o.cleanHTML.singleQuotesInFontFamily&&e.value.includes(""")&&(e.value=e.value.replace(/\sstyle="([^"]*)"/gi,(e,t)=>{if(!t.includes(""")||!/font-family/i.test(t))return e;let i=t.replace(/font-family\s*:(?:"|[^;])*/gi,e=>e.includes("'")?e:e.replace(/"/g,"'"));return e.replace(t,i)}))}onSafeHTML(e){let t=this.j.o.cleanHTML.sanitizer;t&&(e.innerHTML=t(e.innerHTML)),(0,a.safeHTML)(e,this.j.o.cleanHTML)}beforeDestruct(){this.j.e.off("safeHTML",this.onSafeHTML).off("beforeSetNativeEditorValue",this.onBeforeSetNativeEditorValue).off("afterSetNativeEditorValue",this.onAfterSetNativeEditorValue),this.walker.destruct()}constructor(e){super(e),this.buttons=[{name:"eraser",group:"font-style"}],this.currentSelectionNode=null,this.walker=new r.LazyWalker(this.j.async,{timeout:this.j.o.cleanHTML.timeout}),e.e.on("safeHTML",this.onSafeHTML).on("beforeSetNativeEditorValue",this.onBeforeSetNativeEditorValue).on("afterSetNativeEditorValue",this.onAfterSetNativeEditorValue)}}d([(0,o.watch)([":change",":afterSetMode",":afterInit",":mousedown",":keydown"])],u.prototype,"onChangeCleanHTML",null),d([(0,o.hook)("ready")],u.prototype,"startWalker",null),d([(0,o.watch)(":beforeCommand")],u.prototype,"beforeCommand",null),d([o.autobind],u.prototype,"onAfterSetNativeEditorValue",null),d([o.autobind],u.prototype,"onBeforeSetNativeEditorValue",null),d([(0,o.watch)(":afterGetValueFromEditor")],u.prototype,"onAfterGetValueFromEditor",null),d([o.autobind],u.prototype,"onSafeHTML",null),s.pluginSystem.add("cleanHtml",u)},46776:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.cleanHTML={timeout:300,removeEmptyElements:!0,fillEmptyParagraph:!0,collapseEmptyValueToEmptyString:!1,singleQuotesInFontFamily:!0,removeTrailingBr:!1,replaceNBSP:!0,replaceOldTags:{i:"em",b:"strong"},allowTags:!1,denyTags:"script,iframe,object,embed",useIframeSandbox:!1,removeOnError:!0,removeEventAttributes:!0,safeJavaScriptLink:!0,safeLinksTarget:!0,allowedStyles:!1,sanitizer:!1,sandboxIframesInContent:!0,convertUnsafeEmbeds:["object","embed"],disableCleanFilter:null},o.Config.prototype.controls.eraser={command:"removeFormat",tooltip:"Clear Formatting"}},83447:function(e,t,i){"use strict";i.d(t,{getHash:function(){return r}});var o=i(70799),n=i(49055);function r(e){let t=/([^[]*)\[([^\]]+)]/,i=/[\s]*,[\s]*/,r=/^(.*)[\s]*=[\s]*(.*)$/,s={};return(0,o.isString)(e)?(e.split(i).map(e=>{e=(0,n.trim)(e);let o=t.exec(e),a={};if(o){let e=o[2].split(i);o[1]&&(e.forEach(e=>{e=(0,n.trim)(e);let t=r.exec(e);t?a[t[1]]=t[2]:a[e]=!0}),s[o[1].toUpperCase()]=a)}else s[e.toUpperCase()]=!0}),s):!!e&&(Object.keys(e).forEach(t=>{s[t.toUpperCase()]=e[t]}),s)}},59498:function(e,t,i){"use strict";i.d(t,{getHash:function(){return o.getHash},removeFormatForCollapsedSelection:function(){return n.removeFormatForCollapsedSelection},removeFormatForSelection:function(){return r.removeFormatForSelection},visitNodeWalker:function(){return s.visitNodeWalker}});var o=i(83447),n=i(84272),r=i(42312),s=i(39516)},15908:function(e,t,i){"use strict";i.d(t,{isAllowedMediaEmbed:function(){return r}});let o=/^(https?:)?\/\/(www\.|m\.|music\.)?youtube(-nocookie)?\.com\/embed\//i,n=/^(https?:)?\/\/player\.vimeo\.com\/video\//i;function r(e){return o.test(e)||n.test(e)}},84272:function(e,t,i){"use strict";i.d(t,{isInlineBlock:function(){return s},removeFormatForCollapsedSelection:function(){return r}});var o=i(82758),n=i(2748);function r(e,t){let{s:i}=e,o=t;if(!o){o=e.createInside.fake();let{range:t}=i;n.Dom.safeInsertNode(t,o),t.collapse()}let r=n.Dom.furthest(o,s,e.editor);if(r)if(i.cursorOnTheLeft(r))n.Dom.before(r,o);else if(i.cursorOnTheRight(r))n.Dom.after(r,o);else{let e=i.splitSelection(r);e&&n.Dom.after(e,o)}t||(i.setCursorBefore(o),n.Dom.safeRemove(o))}function s(e){return n.Dom.isInlineBlock(e)&&!n.Dom.isTag(e,o.INSEPARABLE_TAGS)}},42312:function(e,t,i){"use strict";i.d(t,{removeFormatForSelection:function(){return s}});var o=i(2748),n=i(43555),r=i(84272);function s(e){let{s:t,editor:i,createInside:s}=e,{range:a}=t,l=a.cloneRange(),c=a.cloneRange(),d=s.fake(),u=s.fake();l.collapse(!0),c.collapse(!1),o.Dom.safeInsertNode(l,d),o.Dom.safeInsertNode(c,u),a.setStartBefore(d),a.collapse(!0),t.selectRange(a),(0,r.removeFormatForCollapsedSelection)(e,d),a.setEndAfter(u),a.collapse(!1),t.selectRange(a),(0,r.removeFormatForCollapsedSelection)(e,u);let h=[];o.Dom.between(d,u,e=>{(0,r.isInlineBlock)(e)&&!o.Dom.isTag(e,"a")&&h.push(e),o.Dom.isElement(e)&&(0,n.attr)(e,"style")&&(0,n.attr)(e,"style",null)}),h.forEach(e=>o.Dom.unwrap(e));let p=(e,t)=>{if(!o.Dom.findNotEmptySibling(e,t)){let o=e.parentNode;if(o&&o!==i&&(0,n.attr)(o,"style"))return(0,n.attr)(o,"style",null),p(o,t),!0}};p(d,!0)&&p(u,!1),a.setStartAfter(d),a.setEndBefore(u),t.selectRange(a),o.Dom.safeRemove(d),o.Dom.safeRemove(u)}},82558:function(e,t,i){"use strict";i.d(t,{allowAttributes:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i,r){let s=r&&o.Dom.isElement(t)&&r[t.nodeName];if(r&&o.Dom.isElement(t)&&!0!==s){if(!s)return i;let e=t.attributes;if(e&&e.length){let o=[];for(let t=0;t<e.length;t+=1){let i=s[e[t].name];i&&(!0===i||i===e[t].value)||o.push(e[t].name)}o.length&&(i=!0),o.forEach(e=>{(0,n.attrRaw)(t,e,null)})}}return i}},1962:function(e,t,i){"use strict";i.d(t,{convertUnsafeEmbeds:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i){let r=e.o.cleanHTML.convertUnsafeEmbeds;if(!r||!o.Dom.isElement(t))return i;let s=t.nodeName.toLowerCase();if(!r.includes(s))return i;let a=(0,n.attr)(t,"data")||(0,n.attr)(t,"src")||(0,n.attr)(t,"movie")||"";if(!a)return o.Dom.safeRemove(t),!0;let l=e.createInside.element("iframe");return(0,n.attr)(l,{src:a,sandbox:"",frameborder:"0",width:(0,n.attr)(t,"width"),height:(0,n.attr)(t,"height")}),o.Dom.replace(t,l,void 0,!1,!0),!0}},39433:function(e,t,i){"use strict";i.d(t,{fillEmptyParagraph:function(){return s}});var o=i(82758),n=i(2748);let r=new Set(["table","tbody","thead","tfoot","tr"]);function s(e,t,i){if(e.o.cleanHTML.fillEmptyParagraph&&n.Dom.isBlock(t)&&n.Dom.isEmpty(t,o.INSEPARABLE_TAGS)&&!n.Dom.isTag(t,r)){let i=e.createInside.element("br");return n.Dom.append(t,i),!0}return i}},45235:function(e,t,i){"use strict";i.r(t),i.d(t,{allowAttributes:function(){return o.allowAttributes},convertUnsafeEmbeds:function(){return n.convertUnsafeEmbeds},fillEmptyParagraph:function(){return r.fillEmptyParagraph},removeEmptyTextNode:function(){return s.removeEmptyTextNode},removeInvTextNodes:function(){return a.removeInvTextNodes},replaceOldTags:function(){return l.replaceOldTags},safeLinksTarget:function(){return c.safeLinksTarget},sandboxIframesInContent:function(){return d.sandboxIframesInContent},sanitizeAttributes:function(){return u.sanitizeAttributes},sanitizeStyles:function(){return h.sanitizeStyles},tryRemoveNode:function(){return p.tryRemoveNode}});var o=i(82558),n=i(1962),r=i(39433),s=i(53392),a=i(25813),l=i(80973),c=i(95614),d=i(85978),u=i(384),h=i(15583),p=i(28800)},53392:function(e,t,i){"use strict";i.d(t,{removeEmptyTextNode:function(){return n}});var o=i(2748);function n(e,t,i,n,r,s){return o.Dom.isText(t)&&!t.nodeValue?(t===s&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),o.Dom.safeRemove(t),!0):i}},25813:function(e,t,i){"use strict";i.d(t,{removeInvTextNodes:function(){return r}});var o=i(82758),n=i(2748);function r(e,t,i,r,s,a){if(a===t||!n.Dom.isText(t)||null==t.nodeValue||!(0,o.INVISIBLE_SPACE_REG_EXP)().test(t.nodeValue))return i;let l=n.Dom.furthest(a,n.Dom.isBlock,e.editor);return!l||n.Dom.isOrContains(l,t)?i:(t.nodeValue=t.nodeValue.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),""),t===a&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),t.nodeValue||n.Dom.safeRemove(t),!0)}},80973:function(e,t,i){"use strict";i.d(t,{replaceOldTags:function(){return n}});var o=i(2748);function n(e,t,i){let n=function(e,t,i){if(!i||!o.Dom.isHTMLElement(t))return t;let n=i[t.nodeName.toLowerCase()]||i[t.nodeName];return n?o.Dom.replace(t,n,e.createInside,!0,!1):t}(e,t,e.o.cleanHTML.replaceOldTags);return t!==n||i}},95614:function(e,t,i){"use strict";i.d(t,{safeLinksTarget:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i){if(!e.o.cleanHTML.safeLinksTarget||!o.Dom.isElement(t)||"A"!==t.nodeName||"_blank"!==(0,n.attr)(t,"target"))return i;let r=((0,n.attr)(t,"rel")||"").split(/\s+/).filter(Boolean),s=!1;return(r.includes("noopener")||(r.push("noopener"),s=!0),r.includes("noreferrer")||(r.push("noreferrer"),s=!0),s)?((0,n.attr)(t,"rel",r.join(" ")),!0):i}},85978:function(e,t,i){"use strict";i.d(t,{sandboxIframesInContent:function(){return s}});var o=i(2748),n=i(29960),r=i(15908);function s(e,t,i){return e.o.cleanHTML.sandboxIframesInContent&&o.Dom.isElement(t)&&"IFRAME"===t.nodeName?(0,r.isAllowedMediaEmbed)((0,n.attr)(t,"src")||"")||t.hasAttribute("sandbox")?i:((0,n.attr)(t,"sandbox",""),!0):i}},384:function(e,t,i){"use strict";i.d(t,{sanitizeAttributes:function(){return r}});var o=i(2748),n=i(21537);function r(e,t,i){if(!o.Dom.isElement(t))return i;let r=e.options.cleanHTML;return!!(0,n.sanitizeHTMLElement)(t,{safeJavaScriptLink:r.safeJavaScriptLink,removeOnError:r.removeOnError,removeEventAttributes:r.removeEventAttributes,safeLinksTarget:r.safeLinksTarget})||i}},15583:function(e,t,i){"use strict";i.d(t,{sanitizeStyles:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i){let r=e.o.cleanHTML.allowedStyles;if(!r||!o.Dom.isElement(t))return i;let s=(0,n.attr)(t,"style");if(!s)return i;let a=function(e,t){let i=t[e],o=t["*"];if(!i&&!o)return null;let n=new Set;if(o)for(let e of o)n.add(e.toLowerCase());if(i)for(let e of i)n.add(e.toLowerCase());return n}(t.nodeName.toLowerCase(),r);if(!a)return i;let l=s.split(";").map(e=>e.trim()).filter(e=>{if(!e)return!1;let t=e.indexOf(":");if(-1===t)return!1;let i=e.substring(0,t).trim().toLowerCase();return a.has(i)}).join("; ").replace(/;\s*$/,"");return l!==s?((0,n.attr)(t,"style",l||null),!0):i}},28800:function(e,t,i){"use strict";i.d(t,{tryRemoveNode:function(){return l}});var o=i(82758),n=i(2748),r=i(49055),s=i(29960),a=i(15908);function l(e,t,i,l,c,d){return!function(e,t,i,l,c){if(!n.Dom.isText(t)){let e=t.nodeName.toUpperCase();if(l&&!l[e])return!0;let i="IFRAME"===e&&(0,a.isAllowedMediaEmbed)((0,s.attr)(t,"src")||"");if(!l&&c&&c[e]&&!i)return!0}if(!e.o.cleanHTML.removeEmptyElements)return!1;let d=e.s.isCollapsed()?e.s.range.startContainer:null;return n.Dom.isElement(t)&&null!=t.nodeName.match(o.IS_INLINE)&&!n.Dom.isTemporary(t)&&!(t.hasAttribute("id")||"A"===t.nodeName&&t.hasAttribute("name"))&&0===(0,r.trimInv)(t.innerHTML).length&&(null==i||!n.Dom.isOrContains(t,i))&&(null==d||!n.Dom.isOrContains(t,d))}(e,t,d,l,c)?i:(n.Dom.safeRemove(t),!0)}},39516:function(e,t,i){"use strict";i.d(t,{visitNodeWalker:function(){return s}});var o=i(82758),n=i(45235);let r=Object.keys(n);function s(e,t,i,s,a){let l=!1,c=e.o.cleanHTML.disableCleanFilter;for(let d of r)if(!(c&&c.has(d))&&(l=(0,n[d])(e,t,l,i,s,a),o.IS_PROD,!t.isConnected))return!0;return l}},61323:function(e,t,i){"use strict";var o=i(82758),n=i(33433),r=i(2748),s=i(580),a=i(21537);i(79419);class l{init(e){var t;null==(t=this.buttons)||t.forEach(t=>e.registerButton(t)),e.e.off(`copy.${o.CLIPBOARD_ID} cut.${o.CLIPBOARD_ID}`).on(`copy.${o.CLIPBOARD_ID} cut.${o.CLIPBOARD_ID}`,t=>{var i;let n=function(e,t){if(!t||e.s.isCollapsed())return t;let i=e.s.range.commonAncestorContainer;r.Dom.isElement(i)||(i=i.parentElement);let o=t;for(;i&&i!==e.editor&&r.Dom.isElement(i)&&!r.Dom.isBlock(i);){let e=i.cloneNode(!1);e.innerHTML=o,o=e.outerHTML,i=i.parentElement}return o}(e,e.s.html),s=(0,a.getDataTransfer)(t)||(0,a.getDataTransfer)(e.ew)||(0,a.getDataTransfer)(t.originalEvent);s&&(s.setData(o.TEXT_PLAIN,(0,a.stripTags)(n)),s.setData(o.TEXT_HTML,n)),e.buffer.set(o.CLIPBOARD_ID,n),e.e.fire("pasteStack",{html:n,action:e.o.defaultActionOnPaste||o.INSERT_AS_HTML}),"cut"===t.type&&(e.s.remove(),e.s.focus()),t.preventDefault(),null==(i=null==e?void 0:e.events)||i.fire("afterCopy",n)})}destruct(e){var t,i;null==(t=(0,n.cached)(e,"buffer"))||t.set(o.CLIPBOARD_ID,""),null==(i=null==e?void 0:e.events)||i.off("."+o.CLIPBOARD_ID)}constructor(){this.buttons=[{name:"cut",group:"clipboard"},{name:"copy",group:"clipboard"},{name:"paste",group:"clipboard"},{name:"selectall",group:"clipboard"}]}}s.pluginSystem.add("clipboard",l)},79419:function(e,t,i){"use strict";var o=i(12153),n=i(6441),r=i(94775),s=i(23140),a=i(92699),l=i(10052);n.Config.prototype.controls.cut={command:"cut",isDisabled:e=>e.s.isCollapsed(),tooltip:"Cut selection"},n.Config.prototype.controls.copy={command:"copy",isDisabled:e=>e.s.isCollapsed(),tooltip:"Copy selection"},n.Config.prototype.controls.selectall={icon:"select-all",command:"selectall",tooltip:"Select all"},o.Icon.set("copy",r.default).set("cut",s.default).set("paste",a.default).set("select-all",l.default)},94775:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="8" y="8" width="13" height="13" rx="2"/><path d="M16 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h3"/> </g> </svg> '},23140:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <circle cx="6" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><path d="m8.2 8.2 12.3 12.3M8.2 15.8 20.5 3.5"/> </g> </svg> '},92699:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="4" y="5" width="16" height="16" rx="2"/><rect x="9" y="3" width="6" height="4" rx="1"/> </g> </svg> '},10052:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 6V3h3m4 0h4m4 0h3v3m0 4v4m0 4v3h-3m-4 0h-4m-4 0H3v-3m0-4v-4"/><rect x="7" y="7" width="10" height="10" rx="1"/> </g> </svg> '},46104:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 3c-2 3.2-5.5 7-5.5 10a5.5 5.5 0 0 0 11 0c0-3-3.5-6.8-5.5-10Z"/> </g> <rect x="5" y="21" width="14" height="2" rx="1" fill="inherit" stroke="none"/> </svg> '},93079:function(e,t,i){"use strict";var o=i(580),n=i(21537);i(21988),o.pluginSystem.add("color",function(e){e.registerButton({name:"brush",group:"color"});let t=(t,i,o)=>{var r;let s=(0,n.normalizeColor)(o)||"",a="background"===t?{backgroundColor:s}:{color:s},l=e.getInstance("Table",e.o).getAllSelectedCells();return l.length&&e.s.isCollapsed()?(l.forEach(t=>{e.s.select(t,!0),e.s.commitStyle({attributes:{style:a}})}),null==(r=e.s.sel)||r.removeAllRanges()):e.s.commitStyle({attributes:{style:a}}),e.synchronizeValues(),!1};e.registerCommand("forecolor",t).registerCommand("background",t)})},21988:function(e,t,i){"use strict";var o=i(2748),n=i(21537),r=i(12153),s=i(6441),a=i(92762),l=i(46104);function c(e,t,i){(0,n.css)(e,t,i),(0,n.attr)(e,"style")||(0,n.attr)(e,"style",null)}r.Icon.set("brush",l.default),s.Config.prototype.controls.brushCell={isVisible:e=>!e.o.disablePlugins.includes("color"),icon:"brush",popup(e,t,i){if(!(0,n.isJoditObject)(e))return;let o=e.getInstance("Table",e.o).getAllSelectedCells();if(!o.length)return!1;let r=t=>(0,a.ColorPickerWidget)(e,n=>{o.forEach(e=>{c(e,t,n)}),e.lock(),e.synchronizeValues(),i(),e.unlock()},(0,n.css)(o[0],t));return(0,a.TabsWidget)(e,[{name:"Background",content:r("background-color")},{name:"Text",content:r("color")},{name:"Border",content:r("border-color")}])},tooltip:"Background"},s.Config.prototype.controls.brush={isVisible:e=>!e.o.disablePlugins.includes("color"),update(e,t){let i=(0,n.dataBind)(t,"color"),r=(i,o)=>!!o&&o!==(0,n.css)(e.editor,i).toString()&&(t.state.icon.fill=o,!0);if(i){let e=(0,n.dataBind)(t,"color");r("color"===e?e:"background-color",i);return}let s=e.s.current();if(s&&!t.state.disabled){let t=o.Dom.closest(s,o.Dom.isElement,e.editor)||e.editor,i=r("color",(0,n.css)(t,"color").toString()),a=r("background-color",(0,n.css)(t,"background-color").toString());if(i||a)return}t.state.icon.fill="",t.state.activated=!1},popup(e,t,i,r){let s="",l="",d,u=null;return t&&t!==e.editor&&o.Dom.isNode(t)&&(o.Dom.isElement(t)&&e.s.isCollapsed()&&!o.Dom.isTag(t,new Set(["br","hr"]))&&(u=t),o.Dom.up(t,e=>{if(o.Dom.isHTMLElement(e)){let t=(0,n.css)(e,"color",!0),i=(0,n.css)(e,"background-color",!0);if(t)return s=t.toString(),!0;if(i)return l=i.toString(),!0}},e.editor)),d=[{name:"Background",content:(0,a.ColorPickerWidget)(e,t=>{u?c(u,"backgroundColor",t):e.execCommand("background",!1,t),(0,n.dataBind)(r,"color",t),(0,n.dataBind)(r,"color-mode","background"),i()},l)},{name:"Text",content:(0,a.ColorPickerWidget)(e,t=>{u?c(u,"color",t):e.execCommand("forecolor",!1,t),(0,n.dataBind)(r,"color",t),(0,n.dataBind)(r,"color-mode","color"),i()},s)}],"background"!==e.o.colorPickerDefaultTab&&(d=d.reverse()),(0,a.TabsWidget)(e,d,u)},exec(e,t,{button:i}){let r=(0,n.dataBind)(i,"color-mode"),s=(0,n.dataBind)(i,"color");if(!r)return!1;if(t&&t!==e.editor&&o.Dom.isNode(t)&&o.Dom.isElement(t))switch(r){case"color":c(t,"color",s);break;case"background":c(t,"backgroundColor",s)}else e.execCommand("background"===r?r:"forecolor",!1,s)},tooltip:"Fill color or set the text color"}},19063:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(41180),s=i(12153),a=i(6441),l=i(57487),c=i(23914);let d="copy-format",u=["lineHeight","fontWeight","fontStyle","fontSize","fontFamily","color","margin","padding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textDecorationLine"],h=(e,t,i,o)=>{let n=(0,r.css)(i,t);return n===o[t]&&(n=i.parentNode&&i!==e.editor&&i.parentNode!==e.editor?h(e,t,i.parentNode,o):void 0),n};a.Config.prototype.controls.copyformat={exec(e,t,{button:i}){if(t){if(e.buffer.exists(d))e.buffer.delete(d),e.e.off(e.editor,"mouseup."+d);else{let i,n={},s=o.Dom.up(t,e=>e&&!o.Dom.isText(e),e.editor)||e.editor,a=e.createInside.span();o.Dom.append(e.editor,a),u.forEach(e=>{n[e]=(0,r.css)(a,e)}),a!==e.editor&&o.Dom.safeRemove(a);let l=(i={},s&&u.forEach(t=>{i[t]=h(e,t,s,n),t.match(/border(Style|Color)/)&&!i.borderWidth&&(i[t]=void 0)}),i);e.e.on(e.editor,"mouseup."+d,()=>{e.buffer.delete(d);let t=e.s.current();t&&(o.Dom.isTag(t,"img")?(0,r.css)(t,l):e.s.commitStyle({attributes:{style:l}})),e.e.off(e.editor,"mouseup."+d)}),e.buffer.set(d,!0)}i.update()}},isActive:e=>e.buffer.exists(d),tooltip:"Paint format"},n.pluginSystem.add("copyformat",function(e){e.registerButton({name:"copyformat",group:"clipboard"}),(0,n.extendLang)(c)}),s.Icon.set("copyformat",l.default)},57487:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="14" height="6" rx="1"/><path d="M17 6h4v7H11v3"/><rect x="9" y="16" width="4" height="6" rx="1"/> </g> </svg> '},63819:function(e){"use strict";e.exports={"copy-format":"نسخ التنسيق"}},72392:function(e){"use strict";e.exports={"copy-format":"Kopírovat formát"}},74551:function(e){"use strict";e.exports={"copy-format":"Format kopierenт"}},2536:function(e){"use strict";e.exports={"copy-format":"Copiar formato"}},52285:function(e){"use strict";e.exports={"copy-format":"کپی کردن قالب"}},12117:function(e){"use strict";e.exports={"copy-format":"Kopioi muotoilu"}},35140:function(e){"use strict";e.exports={"copy-format":"Format de copie"}},28435:function(e){"use strict";e.exports={"copy-format":"העתק עיצוב"}},98019:function(e){"use strict";e.exports={"copy-format":"Formátum másolás"}},96457:function(e){"use strict";e.exports={"copy-format":"salin format"}},23914:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o},cs_cz:function(){return n},de:function(){return r},es:function(){return s},fa:function(){return a},fi:function(){return l},fr:function(){return c},he:function(){return d},hu:function(){return u},id:function(){return h},it:function(){return p},ja:function(){return f},ko:function(){return m},mn:function(){return g},nl:function(){return b},pl:function(){return v},pt_br:function(){return y},ru:function(){return w},tr:function(){return _},zh_cn:function(){return k},zh_tw:function(){return C}});var o=i(63819),n=i(72392),r=i(74551),s=i(2536),a=i(52285),l=i(12117),c=i(35140),d=i(28435),u=i(98019),h=i(96457),p=i(33561),f=i(96545),m=i(52230),g=i(33307),b=i(71042),v=i(32172),y=i(39179),w=i(60629),_=i(68278),k=i(1172),C=i(4164)},33561:function(e){"use strict";e.exports={"copy-format":"Copia il formato"}},96545:function(e){"use strict";e.exports={"copy-format":"copyformat"}},52230:function(e){"use strict";e.exports={"copy-format":"복사 형식"}},33307:function(e){"use strict";e.exports={"copy-format":"Формат хуулах"}},71042:function(e){"use strict";e.exports={"copy-format":"opmaak kopiëren"}},32172:function(e){"use strict";e.exports={"copy-format":"format kopii"}},39179:function(e){"use strict";e.exports={"copy-format":"Copiar formato"}},60629:function(e){"use strict";e.exports={"copy-format":"Копировать формат"}},68278:function(e){"use strict";e.exports={"copy-format":"Kopyalama Biçimi"}},1172:function(e){"use strict";e.exports={"copy-format":"复制格式"}},4164:function(e){"use strict";e.exports={"copy-format":"複製格式"}},66707:function(e,t,i){"use strict";var o=i(22732),n=i(580),r=i(21537),s=i(49055),a=i(50911);let l=new Set(["img","table","jodit","iframe","hr"]);class c extends a.Plugin{afterInit(e){e.e.on("afterCommand.delete",e=>{"delete"===e&&this.__afterDeleteCommand()}),e.registerCommand("delete",{exec:this.__onDeleteCommand.bind(this)},{stopPropagation:!1})}beforeDestruct(e){e.e.off("afterCommand.delete")}__afterDeleteCommand(){let e=this.j,t=e.s.current();if(t&&o.Dom.isTag(t.firstChild,"br")&&e.s.removeNode(t.firstChild),!(0,s.trim)(e.editor.textContent||"")&&!o.Dom.first(e.editor,e=>o.Dom.isTag(e,l))&&(!t||!o.Dom.closest(t,"table",e.editor))){o.Dom.detach(e.editor);let t=e.s.setCursorIn(e.editor);e.s.removeNode(t)}}__onDeleteCommand(){let{jodit:e}=this;if(e.s.isCollapsed())return;e.s.expandSelection();let t=e.s.range;t.deleteContents();let i=e.createInside.fake();t.insertNode(i);let n=o.Dom.findSibling(i,!0),r=o.Dom.findSibling(i,!1);return this.__moveContentInLeftSibling(i,n,r),t.setStartBefore(i),t.collapse(!0),this.__moveCursorInEditableSibling(e,n,i,t),this.__addBrInEmptyBlock(i,r,t),o.Dom.safeRemove(i),e.s.selectRange(t),!1}__moveContentInLeftSibling(e,t,i){t=this.__defineRightLeftBox(t),!o.Dom.isList(i)&&!o.Dom.isTag(i,"table")&&o.Dom.isBlock(i)&&o.Dom.isBlock(t)&&(o.Dom.append(t,e),o.Dom.moveContent(i,t),o.Dom.safeRemove(i)),o.Dom.isList(i)&&o.Dom.isLeaf(i.firstElementChild)&&o.Dom.isEmpty(i.firstElementChild)&&o.Dom.safeRemove(i.firstElementChild)}__defineRightLeftBox(e){if(!o.Dom.isList(e))return e;let t=e.lastElementChild;return o.Dom.isLeaf(t)||(t=this.j.createInside.element("li"),o.Dom.append(e,t)),t}__addBrInEmptyBlock(e,t,i){let n=this.j;if(e.isConnected&&o.Dom.isBlock(e.parentNode)&&!e.nextSibling&&!e.previousSibling){let t=n.createInside.element("br");o.Dom.after(e,t),i.setStartBefore(t),i.collapse(!0)}if(o.Dom.isTag(t,"table")){let e=(0,r.$$)("td,th",t).shift();o.Dom.isCell(e)&&o.Dom.isEmpty(e)&&o.Dom.append(e,n.createInside.element("br"))}}__moveCursorInEditableSibling(e,t,i,n){var r;if(!t||!o.Dom.isText(t)){let t=null!=(r=o.Dom.closest(i,o.Dom.isBlock,e.editor))?r:e.editor,s=o.Dom.prev(i,o.Dom.isText,t);s&&(n.setStartAfter(s),n.collapse(!0),o.Dom.safeRemove(i))}}}c.requires=["backspace"],n.pluginSystem.add("deleteCommand",c)},44586:function(e,t,i){"use strict";i(6441).Config.prototype.draggableTags=["img","jodit-media","jodit"]},1255:function(e,t,i){"use strict";var o,n,r=i(65478),s=i(22732),a=i(580),l=i(21537),c=i(50911);i(44586);var d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};(o=n||(n={}))[o.IDLE=0]="IDLE",o[o.WAIT_DRAGGING=1]="WAIT_DRAGGING",o[o.DRAGGING=2]="DRAGGING";class u extends c.Plugin{afterInit(){this.dragList=this.j.o.draggableTags?(0,l.splitArray)(this.j.o.draggableTags).filter(Boolean).map(e=>e.toLowerCase()):[],this.j.e.on("startDragElement",this.onStartDragElement),this.dragList.length&&this.j.e.on("mousedown dragstart",this.onDragStart)}onStartDragElement(e,t){this.isInDestruct||this.state>n.IDLE||!e||this.startDragging(e,t)}onDragStart(e){if("dragstart"===e.type&&this.draggable)return!1;if(this.state>n.IDLE)return;let t=e.target;if(!this.dragList.length||!t)return;let i=e=>!!(e&&this.dragList.includes(e.nodeName.toLowerCase())),o=s.Dom.furthest(t,i,this.j.editor)||(i(t)?t:null);o&&(s.Dom.isTag(o.parentElement,"a")&&o.parentElement.firstChild===o&&o.parentElement.lastChild===o&&(o=o.parentElement),this.startDragging(o,e))}startDragging(e,t){this.startX=t.clientX,this.startY=t.clientY,this.isCopyMode=(0,l.ctrlKey)(t),this.draggable=e.cloneNode(!0),(0,l.dataBind)(this.draggable,"target",e),this.state=n.WAIT_DRAGGING,this.addDragListeners()}onDrag(e){var t,i;if(!this.draggable||this.state===n.IDLE)return;let o=e.clientX,r=e.clientY;if(this.state===n.WAIT_DRAGGING&&Math.sqrt(Math.pow(o-this.startX,2)+Math.pow(r-this.startY,2))<this.diffStep)return;this.state===n.WAIT_DRAGGING&&(this.j.lock("drag-and-drop-element"),this.state=n.DRAGGING),this.j.e.fire("hidePopup hideResizer");let c=this.__ghostOffset();if(!this.draggable.parentNode){let o=(0,l.dataBind)(this.draggable,"target");(0,l.css)(this.draggable,{zIndex:1e13,pointerEvents:"none",pointer:"drag",position:"fixed",opacity:.7,display:"inline-block",left:e.clientX+c.left,top:e.clientY+c.top,width:null!=(t=null==o?void 0:o.offsetWidth)?t:100,height:null!=(i=null==o?void 0:o.offsetHeight)?i:100}),s.Dom.append((0,a.getContainer)(this.j,u),this.draggable)}(0,l.css)(this.draggable,{left:e.clientX+c.left,top:e.clientY+c.top}),this.j.s.insertCursorAtPoint(e.clientX,e.clientY)}__ghostOffset(){let e=this.j.iframe;if(!e)return{left:0,top:0};let t=e.getBoundingClientRect();return{left:t.left,top:t.top}}onDragEnd(){!this.isInDestruct&&(this.removeDragListeners(),this.j.unlock(),this.state=n.IDLE,this.draggable&&(s.Dom.safeRemove(this.draggable),this.draggable=null))}onDrop(){if(!this.draggable||this.state<n.DRAGGING)return void this.onDragEnd();let e=(0,l.dataBind)(this.draggable,"target");this.onDragEnd(),this.isCopyMode&&(e=e.cloneNode(!0));let{parentElement:t}=e;this.j.s.insertNode(e,!0,!1),[e.previousSibling,e.nextSibling].forEach(e=>{s.Dom.isEmptyTextNode(e)&&s.Dom.safeRemove(e)}),t&&s.Dom.isEmpty(t)&&!s.Dom.isCell(t)&&s.Dom.safeRemove(t),s.Dom.isTag(e,"img")&&this.j.e&&this.j.e.fire("afterInsertImage",e),this.j.e.fire("synchro")}addDragListeners(){this.j.e.on(this.j.editor,"mousemove",this.onDrag).on("mouseup",this.onDrop).on([this.j.ew,this.ow],"mouseup",this.onDragEnd)}removeDragListeners(){this.j.e.off(this.j.editor,"mousemove",this.onDrag).off("mouseup",this.onDrop).off([this.j.ew,this.ow],"mouseup",this.onDragEnd)}beforeDestruct(){this.onDragEnd(),this.j.e.off("mousedown dragstart",this.onDragStart).off("startDragElement",this.onStartDragElement),this.removeDragListeners()}constructor(){super(...arguments),this.dragList=[],this.draggable=null,this.isCopyMode=!1,this.diffStep=10,this.startX=0,this.startY=0,this.state=n.IDLE}}d([r.autobind],u.prototype,"onStartDragElement",null),d([r.autobind],u.prototype,"onDragStart",null),d([(0,r.throttle)(e=>e.defaultTimeout/10)],u.prototype,"onDrag",null),d([r.autobind],u.prototype,"onDragEnd",null),d([r.autobind],u.prototype,"onDrop",null),a.pluginSystem.add("dragAndDropElement",u)},19271:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(50911),c=i(8172),d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class u extends l.Plugin{afterInit(){this.j.e.on([window,this.j.ed,this.j.editor],"dragstart.DragAndDrop",this.onDragStart).on("drop.DragAndDrop",this.onDrop)}onDragStart(e){var t;let i=e.target;if(this.onDragEnd(),this.isFragmentFromEditor=r.Dom.isOrContains(this.j.editor,i,!0),this.isCopyMode=!this.isFragmentFromEditor||(0,a.ctrlKey)(e),this.isFragmentFromEditor){let e=this.j.s.sel,t=e&&e.rangeCount?e.getRangeAt(0):null;t&&(this.bufferRange=t.cloneRange())}else this.bufferRange=null;this.startDragPoint.x=e.clientX,this.startDragPoint.y=e.clientY,t=i,r.Dom.isElement(t)&&t.classList.contains(c.FileBrowserFiles.prototype.getFullElName("item"))&&(i=r.Dom.first(i,e=>r.Dom.isTag(e,"img"))),r.Dom.isTag(i,"img")&&(this.draggable=i.cloneNode(!0),(0,a.dataBind)(this.draggable,"target",i)),this.addDragListeners()}addDragListeners(){this.j.e.on("dragover",this.onDrag).on(window,"dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop",this.onDragEnd)}removeDragListeners(){this.j.e.off("dragover",this.onDrag).off(window,"dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop",this.onDragEnd)}onDrag(e){this.draggable&&(this.j.e.fire("hidePopup"),this.j.s.insertCursorAtPoint(e.clientX,e.clientY),e.preventDefault(),e.stopPropagation())}onDragEnd(){this.draggable&&(r.Dom.safeRemove(this.draggable),this.draggable=null),this.isCopyMode=!1,this.removeDragListeners()}onDrop(e){if(!e.dataTransfer||!e.dataTransfer.files||!e.dataTransfer.files.length){if(!this.isFragmentFromEditor&&!this.draggable)return this.j.e.fire("paste",e),e.preventDefault(),e.stopPropagation(),!1;let t=this.j.s.sel,i=this.bufferRange||(t&&t.rangeCount?t.getRangeAt(0):null),o=this.__getWorkFragment(i,e);t&&t.removeAllRanges(),this.j.s.insertCursorAtPoint(e.clientX,e.clientY),o&&this.__insertFragment.call(this,o,i),e.preventDefault(),e.stopPropagation()}this.isFragmentFromEditor=!1,this.removeDragListeners()}__getWorkFragment(e,t){let i=null;if(!this.draggable&&e)i=this.isCopyMode?e.cloneContents():e.extractContents();else if(this.draggable)if(this.isCopyMode){let[e,t]="1"===(0,a.attr)(this.draggable,"-is-file")?["a","href"]:["img","src"];i=this.j.createInside.element(e),(0,a.attr)(i,t,(0,a.attr)(this.draggable,"data-src")||(0,a.attr)(this.draggable,"src")||""),"a"===e&&(i.textContent=(0,a.attr)(i,t)||"")}else i=(0,a.dataBind)(this.draggable,"target");else if(this.getText(t)){let e=this.j.createInside.div();e.innerHTML=this.getText(t),this.j.e.fire("safeHTML",e),i=e.firstChild===e.lastChild&&e.firstChild?e.firstChild:e}return i}__insertFragment(e,t){this.j.s.insertNode(e,!1,!1),t&&e.firstChild&&e.lastChild&&(t.setStartBefore(e.firstChild),t.setEndAfter(e.lastChild),this.j.s.selectRange(t),this.j.e.fire("synchro")),r.Dom.isTag(e,"img")&&this.j.events&&this.j.e.fire("afterInsertImage",e)}beforeDestruct(){this.onDragEnd(),this.j.e.off(window,".DragAndDrop").off(".DragAndDrop").off([window,this.j.ed,this.j.editor],"dragstart.DragAndDrop",this.onDragStart)}constructor(){super(...arguments),this.isFragmentFromEditor=!1,this.isCopyMode=!1,this.startDragPoint={x:0,y:0},this.draggable=null,this.bufferRange=null,this.getText=e=>{let t=(0,a.getDataTransfer)(e);return t?t.getData(o.TEXT_HTML)||t.getData(o.TEXT_PLAIN):null}}}d([n.autobind],u.prototype,"onDragStart",null),d([(0,n.throttle)(e=>e.defaultTimeout/10)],u.prototype,"onDrag",null),d([n.autobind],u.prototype,"onDragEnd",null),d([n.autobind],u.prototype,"onDrop",null),s.pluginSystem.add("dragAndDrop",u)},46124:function(e,t,i){"use strict";i.r(t),i.d(t,{removeExtraBr:function(){return o.removeExtraBr}});var o=i(94870)},94870:function(e,t,i){"use strict";i.d(t,{removeExtraBr:function(){return r}});var o=i(2748);let n=new Set(["table","pre","blockquote","code"]);function r(e,t){if(!e.o.dtd.removeExtraBr||o.Dom.isTag(t,"br"))return;let i=o.Dom.furthest(t,o.Dom.isBlock,e.editor);if(i&&!o.Dom.isTag(i,n)){let i=o.Dom.isTag(t,"br")?t:o.Dom.findNotEmptySibling(t,!1);if(!o.Dom.isTag(i,"br")||o.Dom.findNotEmptySibling(i,!1))return;o.Dom.isOrContains(t,e.s.range.startContainer)||e.s.setCursorBefore(i),o.Dom.safeRemove(i)}}},78720:function(e,t,i){"use strict";i.d(t,{checkBlockNesting:function(){return n}});var o=i(2748);function n(e,t){var i,n;if(o.Dom.isFragment(t)&&(t=t.firstChild),e.o.dtd.checkBlockNesting&&o.Dom.isBlock(t)){let r=null,s=null!=(n=null==(i=e.s.current())?void 0:i.parentElement)?n:null;for(;s&&s!==e.editor;){if(o.Dom.isBlock(s)){let t=!r&&o.Dom.isTag(s,e.o.enter)&&o.Dom.isEmpty(s);if(e.o.dtd.blockLimits[s.nodeName.toLowerCase()]&&!t)break;r=s}s=s.parentElement}o.Dom.isLeaf(s)&&o.Dom.isList(t)&&o.Dom.isFragment(t.parentNode)&&!o.Dom.findNotEmptySibling(t,!1)&&(o.Dom.unwrap(t),r=s),r&&(e.s.setCursorAfter(r),o.Dom.isEmpty(r)&&o.Dom.safeRemove(r))}}},43267:function(e,t,i){"use strict";i.r(t),i.d(t,{checkBlockNesting:function(){return o.checkBlockNesting}});var o=i(78720)},9045:function(e,t,i){"use strict";i(6441).Config.prototype.dtd={removeExtraBr:!0,checkBlockNesting:!0,blockLimits:{article:1,aside:1,audio:1,body:1,caption:1,dd:1,details:1,dir:1,div:1,dl:1,dt:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,li:1,main:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1}}},65735:function(e,t,i){"use strict";var o=i(37133),n=i(580),r=i(50911);i(9045);var s=i(46124),a=i(43267),l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class c extends r.Plugin{afterInit(e){}beforeDestruct(e){}__onBeforeInsertNode(e){Object.keys(a).forEach(t=>{a[t](this.j,e)})}__onAfterInsertNode(e){Object.keys(s).forEach(t=>{s[t](this.j,e)})}}l([(0,o.watch)(":beforeInsertNode")],c.prototype,"__onBeforeInsertNode",null),l([(0,o.watch)(":afterInsertNode")],c.prototype,"__onAfterInsertNode",null),n.pluginSystem.add("dtd",c)},575:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(87612),l=i(20356),c=i(35399);class d extends l.Plugin{afterInit(e){let t=e.o.enter.toLowerCase(),i=t===o.BR.toLowerCase();e.o.enterBlock||(e.o.enterBlock=i?o.PARAGRAPH:t),e.registerCommand("enter",(e,t,i={})=>this.onEnter(i))}onEnterKeyDown(e){if(e.key===o.KEY_ENTER){let t=this.j,i=t.e.fire("beforeEnter",e);return void 0!==i?i:(t.history.snapshot.transaction(()=>{t.s.isCollapsed()||t.execCommand("Delete"),t.s.focus(),this.onEnter(e),t.e.fire("afterEnter",e)}),t.synchronizeValues(),!1)}}onEnter(e){let{jodit:t}=this,i=t.createInside.fake();try{r.Dom.safeInsertNode(t.s.range,i),(0,c.moveCursorOutFromSpecialTags)(t,i,["a"]);let o=(0,c.getBlockWrapper)(i,t),n=r.Dom.isLeaf(o);if((!n||(null==e?void 0:e.shiftKey))&&(0,c.checkBR)(i,t,null==e?void 0:e.shiftKey,o))return!1;if(o||(0,c.hasPreviousBlock)(i,t)||(o=(0,c.wrapText)(i,t)),!o)return(0,c.insertParagraph)(i,t,n?"li":t.o.enter),!1;if(!(0,c.checkUnsplittableBox)(i,t,o))return!1;if(n&&this.__isEmptyListLeaf(o))return(0,c.processEmptyLILeaf)(i,t,o),!1;(0,c.splitFragment)(i,t,o)}finally{i.isConnected&&t.s.setCursorBefore(i),r.Dom.safeRemove(i)}}__isEmptyListLeaf(e){let t=this.j.e.fire("enterIsEmptyListLeaf",e);return(0,a.isBoolean)(t)?t:r.Dom.isEmpty(e)}beforeDestruct(e){e.e.off("keydown.enter")}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,n.watch)(":keydown.enter")],d.prototype,"onEnterKeyDown",null),s.pluginSystem.add("enter",d)},41872:function(e,t,i){"use strict";i.d(t,{checkBR:function(){return s}});var o=i(82758),n=i(2748),r=i(26395);function s(e,t,i,s){let l=!!n.Dom.closest(e,["pre","blockquote"],t.editor),c=!l&&(s?n.Dom.isCell(s):!!n.Dom.closest(e,["td","th"],t.editor));if(t.o.enter.toLowerCase()===o.BR.toLowerCase()||c||i&&!l||!i&&l){var d;let i;if(l&&(i=a(a(d=e)))&&(n.Dom.safeRemove(a(d)),n.Dom.safeRemove(i),1))return!1;let o=t.createInside.element("br");if(n.Dom.before(e,o),!n.Dom.findNotEmptySibling(o,!1)){let t=o.cloneNode();n.Dom.after(o,t),n.Dom.before(t,e)}return(0,r.scrollIntoViewIfNeeded)(o,t.editor,t.ed),!0}return!1}function a(e){if(!e)return!1;let t=n.Dom.findSibling(e,!0);return!!t&&!!n.Dom.isTag(t,"br")&&t}},61991:function(e,t,i){"use strict";i.d(t,{checkUnsplittableBox:function(){return n}});var o=i(2748);function n(e,t,i){return!!o.Dom.canSplitBlock(i)||(o.Dom.before(e,t.createInside.element("br")),!1)}},54041:function(e,t,i){"use strict";i.d(t,{getBlockWrapper:function(){return function e(t,i,r=o.IS_BLOCK){let s=t,a=i.editor;do{if(!s||s===a)break;if(r.test(s.nodeName)){if(n.Dom.isLeaf(s))return s;return e(s.parentNode,i,/^li$/i)||s}s=s.parentNode}while(s&&s!==a)return null}}});var o=i(82758),n=i(2748)},19057:function(e,t,i){"use strict";i.d(t,{hasPreviousBlock:function(){return n}});var o=i(2748);function n(e,t){return!!o.Dom.prev(e,e=>o.Dom.isBlock(e)||o.Dom.isImage(e),t.editor)}},35399:function(e,t,i){"use strict";i.d(t,{checkBR:function(){return o.checkBR},checkUnsplittableBox:function(){return n.checkUnsplittableBox},getBlockWrapper:function(){return r.getBlockWrapper},hasPreviousBlock:function(){return s.hasPreviousBlock},insertParagraph:function(){return a.insertParagraph},moveCursorOutFromSpecialTags:function(){return l.moveCursorOutFromSpecialTags},processEmptyLILeaf:function(){return c.processEmptyLILeaf},splitFragment:function(){return d.splitFragment},wrapText:function(){return u.wrapText}});var o=i(41872),n=i(61991),r=i(54041),s=i(19057),a=i(44245),l=i(91388),c=i(65181),d=i(54600),u=i(5287)},44245:function(e,t,i){"use strict";i.d(t,{insertParagraph:function(){return s}});var o=i(2748),n=i(29960),r=i(26395);function s(e,t,i,s){let a="br"===i.toLowerCase(),{createInside:l}=t,c=l.element(i),d=l.element("br");return a||o.Dom.append(c,d),s&&s.cssText&&(0,n.attr)(c,"style",s.cssText),o.Dom.after(e,c),o.Dom.before(a?c:d,e),(0,r.scrollIntoViewIfNeeded)(c,t.editor,t.ed),c}},91388:function(e,t,i){"use strict";i.d(t,{moveCursorOutFromSpecialTags:function(){return n}});var o=i(2748);function n(e,t,i){let{s:n}=e,r=o.Dom.closest(t,i,e.editor);r&&(n.cursorOnTheRight(r,t)?o.Dom.after(r,t):n.cursorOnTheLeft(r,t)&&o.Dom.before(r,t))}},65181:function(e,t,i){"use strict";i.d(t,{processEmptyLILeaf:function(){return s}});var o=i(2748),n=i(76078),r=i(44245);function s(e,t,i){let s=o.Dom.closest(i,["ol","ul"],t.editor);if(!s)return;let a=s.parentElement,l=o.Dom.isLeaf(a),c=l?a:s,d=t.s.createRange();d.setStartAfter(i),d.setEndAfter(s);let u=d.extractContents();o.Dom.after(c,e),o.Dom.safeRemove(i),(0,n.$$)("li",s).length||o.Dom.safeRemove(s);let h=(0,r.insertParagraph)(e,t,l?"li":t.o.enter);o.Dom.first(u,e=>o.Dom.isTag(e,"li"))&&(l?o.Dom.append(h,u):o.Dom.after(h,u))}},54600:function(e,t,i){"use strict";i.d(t,{splitFragment:function(){return s}});var o=i(2748),n=i(26395),r=i(44245);function s(e,t,i){let s=t.s,{enter:a}=t.o,l=a.toLowerCase(),c=o.Dom.isLeaf(i),d=i.tagName.toLowerCase()===l||c,u=s.cursorOnTheRight(i,e),h=s.cursorOnTheLeft(i,e);if(!d&&(u||h)){u?o.Dom.after(i,e):o.Dom.before(i,e),(0,r.insertParagraph)(e,t,l),h&&!u&&o.Dom.prepend(i,e);return}let{scrollTop:p}=t.editor;s.splitSelection(i,e),t.editor.scrollTop!==p&&(t.editor.scrollTop=p),(0,n.scrollIntoViewIfNeeded)(i,t.editor,t.ed)}},5287:function(e,t,i){"use strict";i.d(t,{wrapText:function(){return n}});var o=i(2748);function n(e,t){let i=e;o.Dom.up(i,e=>{e&&e.hasChildNodes()&&e!==t.editor&&(i=e)},t.editor);let n=o.Dom.wrapInline(i,t.o.enter,t);if(o.Dom.isEmpty(n)){let i=t.createInside.element("br");o.Dom.append(n,i),o.Dom.before(i,e)}return n}},11317:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(29960),s=i(6441),a=i(92762);function l(e){var t;null==(t=e.files)||t.forEach(t=>{let i=this.createInside.element("a",{href:e.baseurl+t});i.textContent=this.o.uploader.getDisplayName.call(this.uploader,e.baseurl,t),this.s.insertNode(i)})}s.Config.prototype.file={defaultHandlerSuccess:l},s.Config.prototype.controls.file={popup(e,t,i){let n=(t,i="")=>{e.s.insertNode(e.createInside.fromHTML(`<a href="${t}" title="${i}">${i||t}</a>`))},s=null;return t&&(o.Dom.isTag(t,"a")||o.Dom.closest(t,"a",e.editor))&&(s=o.Dom.isTag(t,"a")?t:o.Dom.closest(t,"a",e.editor)),(0,a.FileSelectorWidget)(e,{filebrowser(e){e.files&&e.files.forEach(t=>n(e.baseurl+t)),i()},upload(t){var i,o;(null!=(o=null==(i=e.o.file)?void 0:i.defaultHandlerSuccess)?o:l).call(e,t)},url(e,t){s?((0,r.attr)(s,"href",e),(0,r.attr)(s,"title",t)):n(e,t),i()}},s,i,!1)},tags:["a"],tooltip:"Insert file"},n.pluginSystem.add("file",function(e){e.registerButton({name:"file",group:"media"})})},36243:function(e,t,i){"use strict";var o=i(22732),n=i(580),r=i(6441);r.Config.prototype.autofocus=!1,r.Config.prototype.cursorAfterAutofocus="end",r.Config.prototype.saveSelectionOnBlur=!0,n.pluginSystem.add("focus",function(e){if(e.o.saveSelectionOnBlur){let t=!1;e.e.on("blur",()=>{t=!1,e.isEditorMode()&&e.s.save(!0)}).on("mousedown touchstart",()=>{t=!e.editorIsActive}).on("focus",()=>{e.isEditorMode()&&(t?e.s.removeMarkers():e.s.restore()),t=!1})}let t=()=>{e.s.focus();let t=null;switch(e.o.cursorAfterAutofocus){case"start":t=o.Dom.first(e.editor,e=>o.Dom.isText(e));break;case"end":t=o.Dom.last(e.editor,e=>o.Dom.isText(e))}t&&e.s.setCursorIn(t,"start"===e.o.cursorAfterAutofocus)};e.e.on("afterInit",()=>{e.o.autofocus&&(e.defaultTimeout?e.async.setTimeout(t,300):t())}),e.e.on("afterInit afterAddPlace",()=>{e.e.off(e.editor,"mousedown.autofocus").on(e.editor,"mousedown.autofocus",t=>{e.isEditorMode()&&t.target&&o.Dom.isBlock(t.target)&&!t.target.childNodes.length&&(e.editor===t.target?e.s.focus():e.s.setCursorIn(t.target))})})})},28252:function(e,t,i){"use strict";var o=i(22732),n=i(68345),r=i(49055),s=i(41180),a=i(12153),l=i(6441),c=i(4104),d=i(83709),u=i(40222);l.Config.prototype.defaultFontSizePoints="px",l.Config.prototype.font={googleFonts:{url:""}},a.Icon.set("font",c.default).set("fontsize",d.default),l.Config.prototype.controls.fontsize={command:"fontsize",data:{cssRule:"font-size",normalize:e=>e.toString().replace(/(px|pt)$/i,"")},list:[8,9,10,11,12,14,16,18,24,30,32,34,36,48,60,72,96],textTemplate:(e,t)=>t+e.o.defaultFontSizePoints,childTemplate:(e,t,i)=>`${i}${e.o.defaultFontSizePoints}`,tooltip:"Font size",value(e,t){var i;let n=e.s.current();if(!n)return;let r=o.Dom.closest(n,o.Dom.isElement,e.editor);if(!r)return;let a=(null==(i=t.control.data)?void 0:i.cssRule)||"font-size",l=(0,s.css)(r,a);if("font-size"===a){let t=parseFloat(l.toString());return"pt"===e.o.defaultFontSizePoints?Math.round(.75*t).toString():Math.round(t).toString()}return l.toString()},isChildActive(e,t){var i,o;let n=t.state.value,r=null!=(o=null==(i=t.control.data)?void 0:i.normalize)?o:e=>e;return!!(n&&t.control.args&&r(t.control.args[0].toString())===r(n.toString()))},isActive(e,t){var i,o;let n=t.state.value;if(!n)return!1;let r=null!=(o=null==(i=t.control.data)?void 0:i.normalize)?o:e=>e,s=t.control.data.cacheListSet;return s||(s=new Set(Object.keys(t.control.list).map(r)),t.control.data.cacheListSet=s),s.has(r(n.toString()))}};let h=new WeakSet;l.Config.prototype.controls.font={...l.Config.prototype.controls.fontsize,command:"fontname",textTemplate(e,t){let[i]=t.split(",");return(0,r.trimChars)(i,"\"'")},list:{"":"Default","Arial, Helvetica, sans-serif":"Arial","'Courier New', Courier, monospace":"Courier New","Georgia, Palatino, serif":"Georgia","'Lucida Sans Unicode', 'Lucida Grande', sans-serif":"Lucida Sans Unicode","Tahoma, Geneva, sans-serif":"Tahoma","'Times New Roman', Times, serif":"Times New Roman","'Trebuchet MS', Helvetica, sans-serif":"Trebuchet MS","Helvetica, sans-serif":"Helvetica","Impact, Charcoal, sans-serif":"Impact","Verdana, Geneva, sans-serif":"Verdana"},childTemplate(e,t,i){let o=!1;try{o=-1===t.indexOf("dings")&&document.fonts.check("16px "+t,i)}catch(e){}return`<span data-style="${t}" style="${o?`font-family: ${t}!important;`:""}">${i}</span>`},popup:(e,t,i,o)=>!!e.o.font.googleFonts.url&&new u.UIFontPicker(e,o,i),data:{cssRule:"font-family",normalize:e=>e.toLowerCase().replace(/['"]+/g,"").replace(/[^a-z0-9-]+/g,",")},value(e,t){let i=e.s.current(),r=i&&o.Dom.closest(i,o.Dom.isElement,e.editor);if(r)h.add(t);else if(h.has(t))return;let a=(0,s.css)(r||e.editor,"font-family").toString(),{list:l}=t.control;return a===(0,s.css)(e.editor,"font-family").toString()&&((0,n.isArray)(l)?l.includes(""):""in(null!=l?l:{}))?"":a},tooltip:"Font family"}},40222:function(e,t,i){"use strict";i.d(t,{UIFontPicker:function(){return g}});var o=i(87325),n=i(37133),r=i(2748),s=i(580),a=i(68345),l=i(29960),c=i(41180),d=i(37790),u=i(48538),h=i(41870),p=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let f=["h1","h2","h3","h4","h5","h6"],m=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),g=class e extends u.UIElement{className(){return"UIFontPicker"}__render(){var e,t;let{control:i}=this.__button,{list:o={}}=i,n=(0,a.isArray)(o)?o.map(e=>({value:e.toString(),title:e.toString()})):(0,d.keys)(o,!1).map(e=>({value:e,title:o[e].toString()})),s=Array.from(this.__googleFonts.fonts.values(),e=>({value:this.__googleFonts.value(e),title:e.family,font:e})),l=new Map;[...s,...n].forEach(e=>l.set((0,h.firstFamily)(e.value),e));let c=new Map,u=new Map;this.__themeFonts().forEach(e=>{var t;let i=(0,h.firstFamily)(e),o=e.split(",")[0].replace(/["']/g,"").trim(),n=null!=(t=l.get(i))?t:!i||i.startsWith("-")||m.has(i)?void 0:{value:e,title:o};n&&!c.has(i)&&c.set(i,n)}),this.__usedFonts().forEach(e=>{let t=(0,h.firstFamily)(e),i=l.get(t);i&&!c.has(t)&&u.set(t,i)});let p=n.find(e=>""===e.value),f=(0,h.firstFamily)(null!=(t=null==(e=i.value)?void 0:e.call(i,this.j,this.__button))?t:"");r.Dom.detach(this.container),this.__fonts.clear(),p&&this.__append(f,[p]),this.__append(f,[...c.values()],"Theme fonts"),this.__append(f,[...u.values()],"Used fonts"),this.__append(f,n.filter(e=>e!==p),"System fonts"),this.__append(f,s,"Google Fonts"),this.__observeGoogleFonts()}__themeFonts(){let{editor:e}=this.j,t=[(0,c.css)(e,"font-family").toString()];return f.forEach(i=>{let o=this.j.createInside.element(i,{style:"display: none"});r.Dom.append(e,o),t.push((0,c.css)(o,"font-family").toString()),r.Dom.safeRemove(o)}),t}__usedFonts(){return Array.from(this.j.editor.querySelectorAll('[style*="font-family"]'),e=>e.style.fontFamily)}__append(e,t,i){if(!t.length)return;let{control:o}=this.__button,n=this.j.c.div(this.getFullElName("group"));if(i){let e=this.j.c.div(this.getFullElName("heading"),{id:`${this.getFullElName("heading")}-${(0,s.uniqueUid)()}`});e.textContent=this.i18n(i),(0,l.attr)(n,{role:"group","aria-labelledby":e.id}),r.Dom.append(n,e)}t.forEach(t=>{var i,s;let a=this.j.c.element("button",{type:"button",class:this.getFullElName("item"),"data-value":t.value,"aria-pressed":(0,h.firstFamily)(t.value)===e});t.font?(a.textContent=t.title,this.__fonts.set(a,t.font)):a.innerHTML=null!=(s=null==(i=o.childTemplate)?void 0:i.call(o,this.j,t.value,t.title,this.__button))?s:t.title,r.Dom.append(n,a)}),r.Dom.append(this.container,n)}__observeGoogleFonts(){this.j.async.requestAnimationFrame(()=>{var e;if(null==(e=this.__observer)||e.disconnect(),this.isDestructed||!this.__fonts.size)return;let t=new IntersectionObserver(e=>{let i=[];e.forEach(({isIntersecting:e,target:o})=>{let n=this.__fonts.get(o);e&&n&&(i.push(n),(0,c.css)(o,{fontFamily:this.__googleFonts.value(n)}),t.unobserve(o))}),this.__googleFonts.preview(i)},{root:this.container.parentElement,rootMargin:"0px 0px 400px 0px"});this.__fonts.forEach((e,i)=>t.observe(i)),this.__observer=t})}onMouseDown(e){e.preventDefault()}onClick(e){var t;let i=r.Dom.up(e.target,e=>r.Dom.isHTMLElement(e)&&e.hasAttribute("data-value"),this.container);if(!i)return;let o=null!=(t=(0,l.attr)(i,"data-value"))?t:"",n=this.__googleFonts.find(o),s=(0,h.firstFamily)(o)===(0,h.firstFamily)(this.__blockFont());n&&!s&&this.__googleFonts.load(n),this.j.execCommand("fontname",!1,s?"":o),this.__close()}__blockFont(){let e=r.Dom.up(this.j.s.current(),r.Dom.isBlock,this.j.editor);return(0,c.css)(null!=e?e:this.j.editor,"font-family").toString()}destruct(){var e;null==(e=this.__observer)||e.disconnect(),super.destruct()}constructor(e,t,i){super(e),this.__button=t,this.__close=i,this.__fonts=new Map,this.__observer=null,this.__googleFonts=e.getInstance(h.GoogleFonts),this.__render(),this.__googleFonts.fonts.size||this.__googleFonts.ready.then(()=>!this.isDestructed&&this.__render())}};p([(0,n.watch)("container:mousedown")],g.prototype,"onMouseDown",null),p([(0,n.watch)("container:click")],g.prototype,"onClick",null),g=p([o.component],g)},23399:function(e,t,i){"use strict";var o=i(580),n=i(21537);i(28252);var r=i(41870);o.pluginSystem.add("font",function(e){if(e.registerButton({name:"font",group:"font"}).registerButton({name:"fontsize",group:"font"}),e.o.font.googleFonts.url){let t=e.getInstance(r.GoogleFonts),i=e.async.debounce(()=>t.loadUsed(),e.defaultTimeout);t.ready.then(i),e.e.on("afterInit afterSetMode change",i)}e.e.on("afterInit",()=>{e.iframe&&e.e.on(e.ed,"load",()=>e.e.fire("updateToolbar"),{capture:!0})});let t=(t,i,o)=>{switch(t){case"fontsize":e.s.commitStyle({attributes:{style:{fontSize:(0,n.normalizeSize)(o,e.o.defaultFontSizePoints)}}});break;case"fontname":e.s.commitStyle({attributes:{style:{fontFamily:o}}})}return e.synchronizeValues(),!1};e.registerCommand("fontsize",t).registerCommand("fontname",t)})},41870:function(e,t,i){"use strict";i.d(t,{GoogleFonts:function(){return c},firstFamily:function(){return l}});var o=i(80480),n=i(2748),r=i(54079);let s={serif:"serif",monospace:"monospace"},a=new Map;function l(e){return e.split(",")[0].replace(/["']/g,"").trim().toLowerCase()}class c extends o.ViewComponent{className(){return"GoogleFonts"}find(e){return this.fonts.get(l(e))}value(e){var t;return`'${e.family}', ${null!=(t=s[e.category])?t:"sans-serif"}`}load(e){let t=this.__loadedInto(this.j.ed);if(t.has(e.family))return;t.add(e.family);let i=[["regular","0,400"],["700","0,700"],["italic","1,400"],["700italic","1,700"]].filter(([t])=>e.variants.includes(t)).map(([,e])=>e);this.__append(this.j.ed,`family=${this.__family(e)}:ital,wght@${i.join(";")}`)}loadUsed(){this.j.editor.querySelectorAll('[style*="font-family"]').forEach(e=>{let t=this.find(e.style.fontFamily);t&&this.load(t)})}preview(e){let t=this.__loadedInto(this.j.od);if(!(e=e.filter(e=>!this.__previewed.has(e.family)&&!t.has(e.family))).length)return;e.forEach(e=>this.__previewed.add(e.family));let i=e.map(e=>"family="+this.__family(e)),o=new Set(e.map(e=>e.family).join(""));this.__append(this.j.od,`${i.join("&")}&text=${encodeURIComponent([...o].join(""))}`)}__loadedInto(e){var t;let i=null!=(t=this.__loaded.get(e))?t:new Set;return this.__loaded.set(e,i),i}__family(e){return encodeURIComponent(e.family).replace(/%20/g,"+")}__append(e,t){let i=e.createElement("link");i.rel="stylesheet",i.href=`https://fonts.googleapis.com/css2?${t}&display=swap`,e.head.appendChild(i),this.__links.push(i)}destruct(){this.__links.forEach(e=>n.Dom.safeRemove(e)),super.destruct()}constructor(e){super(e),this.fonts=new Map,this.__links=[],this.__loaded=new WeakMap,this.__previewed=new Set,this.ready=(function(e,t){let i=a.get(t);if(!i){let o=new r.Ajax({url:t,method:"GET"},e.o.defaultAjaxOptions);i=o.send().then(e=>e.json()).then(({items:e})=>e.filter(e=>e.variants.includes("regular"))).catch(()=>(a.delete(t),[])).finally(()=>o.destruct()),a.set(t,i)}return i})(e,e.o.font.googleFonts.url).then(e=>{e.forEach(e=>this.fonts.set(e.family.toLowerCase(),e))})}}},4104:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m5 17 7-14 7 14M8 12h8M3 21h18"/> </g> </svg> '},83709:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2 5h9M6.5 5v15M4 20h5M19 4v16m-3-13 3-3 3 3m-6 10 3 3 3-3"/> </g> </svg> '},24630:function(e,t,i){"use strict";var o=i(2748),n=i(72430),r=i(12153),s=i(6441),a=i(89816);r.Icon.set("paragraph",a.default),s.Config.prototype.controls.paragraph={command:"formatBlock",value(e,t){var i,n;let r=t.control,s=e.s.current(),a=o.Dom.closest(s,o.Dom.isBlock,e.editor);return null!=(i=null==a?void 0:a.nodeName.toLowerCase())?i:null==(n=r.data)?void 0:n.currentValue},update(e,t){let i=t.control;if(!e.s.current())return!1;let o=t.state.value,r=i.list;return(0,n.isPlainObject)(r)&&r[o.toString()]&&e.o.textIcons&&(t.state.text=r[o.toString()].toString()),!1},data:{currentValue:"p"},list:{p:"Paragraph",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",blockquote:"Quote",pre:"Code"},isChildActive(e,t){var i,o;return t.state.value===(null==(o=null==(i=t.control)?void 0:i.args)?void 0:o[0])},isActive:(e,t)=>t.state.value!==e.o.enter&&(0,n.isPlainObject)(t.control.list)&&!!t.control.list[t.state.value],childTemplate:(e,t,i)=>`<${t} style="margin:0;padding:0"><span>${e.i18n(i)}</span></${t}>`,tooltip:"Insert format block"}},96111:function(e,t,i){"use strict";var o=i(580);i(24630),o.pluginSystem.add("formatBlock",function(e){e.registerButton({name:"paragraph",group:"font"}),e.registerCommand("formatblock",(t,i,o)=>(e.s.commitStyle({element:o}),e.synchronizeValues(),!1))})},89816:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M20 4H9a5 5 0 0 0 0 10h3M12 4v17M18 4v17"/> </g> </svg> '},99823:function(e,t,i){"use strict";var o=i(82758),n=i(12153),r=i(6441),s=i(6950),a=i(28911);r.Config.prototype.fullsize=!1,r.Config.prototype.globalFullSize=!0,n.Icon.set("fullsize",s.default).set("shrink",a.default),r.Config.prototype.controls.fullsize={exec(e){e.toggleFullSize()},update(e,t){let i=e.isFullSize?"shrink":"fullsize";t.state.activated=e.isFullSize,e.o.textIcons?t.state.text=i:t.state.icon.name=i},tooltip:"Open in fullsize",mode:o.MODE_SOURCE+o.MODE_WYSIWYG}},2169:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(19306),s=i(41180);i(99823);let a=new Set;n.pluginSystem.add("fullsize",function(e){e.registerButton({name:"fullsize"});let t=!1,i=0,n=0,l=0,c=0,d=!1,u=()=>{let{container:o,events:r}=e;r&&(t?(d||(i=(0,s.css)(o,"height",!0),n=(0,s.css)(o,"width",!0),d=!0),(0,s.css)(o,{height:e.ow.innerHeight,width:e.ow.innerWidth})):d&&((0,s.css)(o,{height:i||"auto",width:n||"auto"}),d=!1))},h=i=>{let{container:n,events:d}=e;if(n){if(void 0===i&&(i=!n.classList.contains("jodit_fullsize")),e.setMod("fullsize",i),e.o.fullsize=i,t=i,n.classList.toggle("jodit_fullsize",i),e.toolbar&&((0,r.isJoditObject)(e)&&e.toolbarContainer&&o.Dom.append(e.toolbarContainer,e.toolbar.container),(0,s.css)(e.toolbar.container,"width","auto")),i?a.add(n):a.delete(n),e.o.globalFullSize&&(1===a.size&&i||0===a.size&&!i)){i&&(l=e.ow.scrollX,c=e.ow.scrollY);let t=n.parentNode;for(;t&&t.nodeType!==Node.DOCUMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE;)t.classList.toggle("jodit_fullsize-box_true",i),t=t.parentNode;u(),i||e.ow.scrollTo(l,c)}d.fire("afterResize")}};e.o.globalFullSize&&e.e.on(e.ow,"resize",u),e.e.on("afterInit afterOpen",()=>{var t;e.toggleFullSize(null==(t=null==e?void 0:e.options)?void 0:t.fullsize)}).on("toggleFullSize",h).on("beforeDestruct",()=>{t&&h(!1)}).on("beforeDestruct",()=>{e.events&&e.e.off(e.ow,"resize",u)})})},6950:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M8 3H3v5m13-5h5v5M3 16v5h5m13-5v5h-5"/> </g> </svg> '},28911:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 8h5V3M8 8 3 3m13 0v5h5m-5 0 5-5M3 16h5v5m0-5-5 5m13 0v-5h5m-5 0 5 5"/> </g> </svg> '},78524:function(e,t,i){"use strict";i(6441).Config.prototype.commandToHotkeys={removeFormat:["ctrl+shift+m","cmd+shift+m"],insertOrderedList:["ctrl+shift+7","cmd+shift+7"],insertUnorderedList:["ctrl+shift+8","cmd+shift+8"],selectall:["ctrl+a","cmd+a"]}},42263:function(e,t,i){"use strict";var o=i(82758),n=i(580),r=i(21537),s=i(50911);i(78524);class a extends s.Plugin{afterInit(e){(0,r.keys)(e.o.commandToHotkeys,!1).forEach(t=>{let i=e.o.commandToHotkeys[t];i&&((0,r.isArray)(i)||(0,r.isString)(i))&&e.registerHotkeyToCommand(i,t)});let t=!1;e.e.off(".hotkeys").on([e.ow,e.ew],"keydown.hotkeys",e=>{if(e.key===o.KEY_ESC)return this.j.e.fire("escape",e)}).on("keydown.hotkeys",i=>{let o=this.onKeyPress(i),n={shouldStop:!0};if(!1===this.j.e.fire(o+".hotkey",i.type,n))if(n.shouldStop)return t=!0,e.e.stopPropagation("keydown"),!1;else i.preventDefault()},{top:!0}).on("keyup.hotkeys",()=>{if(t)return t=!1,e.e.stopPropagation("keyup"),!1},{top:!0})}beforeDestruct(e){e.events&&e.e.off(".hotkeys")}constructor(){super(...arguments),this.onKeyPress=e=>{let t=this.specialKeys[e.which],i=(e.key||String.fromCharCode(e.which)).toLowerCase(),o=[t||i];return["alt","ctrl","shift","meta"].forEach(i=>{e[i+"Key"]&&t!==i&&o.push(i)}),(0,r.normalizeKeyAliases)(o.join("+"))},this.specialKeys={8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",91:"meta",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}}}n.pluginSystem.add("hotkeys",a)},16233:function(e,t,i){"use strict";var o=i(22732),n=i(580),r=i(12153),s=i(6441),a=i(72337);r.Icon.set("hr",a.default),s.Config.prototype.controls.hr={command:"insertHorizontalRule",tags:["hr"],tooltip:"Insert Horizontal Line"},n.pluginSystem.add("hr",function(e){e.registerButton({name:"hr",group:"insert"}),e.registerCommand("insertHorizontalRule",()=>{let t=e.createInside.element("hr");e.s.insertNode(t,!1,!1);let i=o.Dom.closest(t.parentElement,o.Dom.isBlock,e.editor);i&&o.Dom.isEmpty(i)&&i!==e.editor&&(o.Dom.after(i,t),o.Dom.safeRemove(i));let n=o.Dom.next(t,o.Dom.isBlock,e.editor,!1);return n||(n=e.createInside.element(e.o.enter),o.Dom.after(t,n)),e.s.setCursorIn(n),!1})})},72337:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M4 12h16"/> </g> </svg> '},50963:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.iframeBaseUrl="",o.Config.prototype.iframeTitle="Jodit Editor",o.Config.prototype.iframeDoctype="<!DOCTYPE html>",o.Config.prototype.iframeDefaultSrc="about:blank",o.Config.prototype.iframeStyle='html{margin:0;padding:0;min-height: 100%;}body{box-sizing:border-box;font-size:13px;line-height:1.6;padding:10px;margin:0;background:transparent;color:#000;position:relative;z-index:2;user-select:auto;margin:0px;overflow:auto;outline:none;}table{width:100%;border:none;border-collapse:collapse;empty-cells: show;max-width: 100%;}th,td{padding: 2px 5px;border:1px solid #ccc;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}p{margin-top:0;}.jodit_editor .jodit_iframe_wrapper{display: block;clear: both;user-select: none;position: relative;}.jodit_editor .jodit_iframe_wrapper:after {position:absolute;content:"";z-index:1;top:0;left:0;right: 0;bottom: 0;cursor: pointer;display: block;background: rgba(0, 0, 0, 0);} .jodit-wysiwyg_image-selected::selection,.jodit-wysiwyg_image-selected *:not(img)::selection{background:transparent}.jodit_disabled{user-select: none;-o-user-select: none;-moz-user-select: none;-khtml-user-select: none;-webkit-user-select: none;-ms-user-select: none}',o.Config.prototype.iframeCSSLinks=[],o.Config.prototype.iframeSandbox=null},77469:function(e,t,i){"use strict";var o=i(82758),n=i(2748),r=i(580),s=i(21537);i(50963),r.pluginSystem.add("iframe",function(e){let t=e.options;e.e.on("afterSetMode",()=>{e.isEditorMode()&&e.s.focus()}).on("generateDocumentStructure.iframe",(e,i)=>{let o=e||i.iframe.contentWindow.document;if(o.open(),o.write(t.iframeDoctype+`<html dir="${t.direction}" class="jodit" lang="${(0,s.defaultLanguage)(t.language)}">`+"<head>"+`<title>${t.iframeTitle}</title>`+(t.iframeBaseUrl?`<base href="${t.iframeBaseUrl}"/>`:"")+'</head><body class="jodit-wysiwyg"></body></html>'),o.close(),t.iframeCSSLinks&&t.iframeCSSLinks.forEach(e=>{let t=o.createElement("link");(0,s.attr)(t,"rel","stylesheet"),(0,s.attr)(t,"href",e),o.head&&n.Dom.append(o.head,t)}),t.iframeStyle){let e=o.createElement("style");e.innerHTML=t.iframeStyle,o.head&&n.Dom.append(o.head,e)}}).on("createEditor",()=>{if(!t.iframe)return;let i=e.c.element("iframe");(0,s.css)(i,"display","block"),i.src="about:blank",i.className="jodit-wysiwyg_iframe",(0,s.attr)(i,{allowtransparency:"true",tabindex:t.tabIndex.toString(),frameborder:"0"}),null!=t.iframeSandbox&&(0,s.attr)(i,"sandbox",t.iframeSandbox),n.Dom.append(e.workplace,i),e.iframe=i;let r=e.e.fire("generateDocumentStructure.iframe",null,e);return(0,s.callPromise)(r,()=>{if(!e.iframe)return!1;let i=e.iframe.contentWindow.document;e.editorWindow=e.iframe.contentWindow;let n=t.editHTMLDocumentMode,r=()=>{(0,s.attr)(i.body,"contenteditable",e.getMode()!==o.MODE_SOURCE&&!e.getReadOnly()||null)},a=e=>{let t=/<body.*<\/body>/im,i="{%%BODY%%}",o=t.exec(e);return o&&(e=e.replace(t,i).replace(/<span([^>]*?)>(.*?)<\/span>/gim,"").replace(/<span([^&]*?)>(.*?)<\/span>/gim,"").replace(i,o[0].replace(/(<body[^>]+?)min-height["'\s]*:[\s"']*[0-9]+(px|%)/im,"$1").replace(/(<body[^>]+?)([\s]*["'])?contenteditable["'\s]*=[\s"']*true["']?/im,"$1").replace(/<(style|script|span)[^>]+jodit[^>]+>.*?<\/\1>/g,"")).replace(/(class\s*=\s*)(['"])([^"']*)(jodit-wysiwyg|jodit)([^"']*\2)/g,"$1$2$3$5").replace(/(<[^<]+?)\sclass="[\s]*"/gim,"$1").replace(/(<[^<]+?)\sstyle="[\s;]*"/gim,"$1").replace(/(<[^<]+?)\sdir="[\s]*"/gim,"$1")),e};if(n){let t=e.element.tagName;if("TEXTAREA"!==t&&"INPUT"!==t)throw(0,s.error)("If enable `editHTMLDocumentMode` - source element should be INPUT or TEXTAREA");e.e.on("beforeGetNativeEditorValue",()=>a(e.o.iframeDoctype+i.documentElement.outerHTML)).on("beforeSetNativeEditorValue",({value:t})=>{if(e.isLocked)return!1;if(/<(html|body)/i.test(t)){if(a(i.documentElement.outerHTML)!==a(t)){var o;let n;o=a(t),n=new DOMParser().parseFromString(o,"text/html"),e.e.fire("safeHTML",n.documentElement),i.replaceChild(i.adoptNode(n.documentElement),i.documentElement),e.editor=i.body,r(),e.e.fire("prepareWYSIWYGEditor"),e.e.stopPropagation("beforeSetNativeEditorValue")}return!0}return!1},{top:!0})}if(e.editor=i.body,e.e.on("afterSetMode afterInit afterAddPlace",r),"auto"===t.height){i.documentElement&&(0,s.css)(i.documentElement,"overflowY","hidden");let o=e.async.throttle((...i)=>{e.async.requestAnimationFrame(()=>{if(e.editor&&e.iframe&&"auto"===t.height){let t=e.ew.getComputedStyle(e.editor),i=parseInt(t.marginTop||"0",10)+parseInt(t.marginBottom||"0",10);(0,s.css)(e.iframe,"height",e.editor.offsetHeight+i)}})},e.defaultTimeout/2);if(e.e.on("change afterInit afterSetMode resize",o).on([e.iframe,e.ew,i.documentElement],"load",o).on(i,"readystatechange DOMContentLoaded",o),"function"==typeof ResizeObserver){let t=new ResizeObserver(o);t.observe(i.body),e.e.on("beforeDestruct",()=>{t.disconnect()})}}return i.documentElement&&e.e.on(i.documentElement,"mousedown touchend",()=>{e.s.isFocused()||(e.s.focus(),e.editor===i.body&&e.s.setCursorIn(i.body))}).on(e.ew,"mousedown touchstart keydown keyup touchend click mouseup mousemove scroll",t=>{var i;null==(i=e.events)||i.fire(e.ow,t)}),!1})})})},85745:function(e,t,i){"use strict";i(6441).Config.prototype.imageProcessor={replaceDataURIToBlobIdInView:!0}},80763:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(50911),c=i(74569);i(85745);var d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let u="__jodit_imageprocessor_binded",h=u+"blob-id",p="jodit-wysiwyg_image-selected";class f extends l.Plugin{afterInit(e){e.e.on(e.ed,"selectionchange",this.onSelectionChange)}beforeDestruct(e){e.e.off(e.ed,"selectionchange",this.onSelectionChange),e.editor.classList.remove(p);let t=(0,n.cached)(e,"buffer"),i=null==t?void 0:t.get(h);if(t&&i){for(let e of Object.keys(i))URL.revokeObjectURL(e);t.delete(h)}}onAfterGetValueFromEditor(e,t){if(t!==o.SOURCE_CONSUMER)return this.onBeforeSetElementValue(e)}onBeforeSetElementValue(e){let{jodit:t}=this;if(!t.o.imageProcessor.replaceDataURIToBlobIdInView)return;let i=t.buffer.get(h);if(i)for(let t of Object.keys(i))for(;e.value.includes(t);)e.value=e.value.replace(t,i[t])}onSelectionChange(){let{jodit:e}=this;e.editor.classList.toggle(p,function(e){let{sel:t}=e.s;if(!t||!t.rangeCount)return!1;let{startContainer:i,startOffset:o,endContainer:n,endOffset:s}=t.getRangeAt(0);return i===n&&s===o+1&&r.Dom.isTag(i.childNodes[o],"img")&&r.Dom.isOrContains(e.editor,i)}(e))}async afterChange(e){let{jodit:t}=this;t.editor&&(0,a.$$)("img",t.editor).forEach(e=>{(0,a.dataBind)(e,u)||((0,a.dataBind)(e,u,!0),e.complete||t.e.on(e,"load",function i(){var o;t.isInDestruct||null==(o=t.e)||o.fire("resize"),t.e.off(e,"load",i)}),e.src&&/^data:/.test(e.src)&&function(e,t){let i;if(!e.o.imageProcessor.replaceDataURIToBlobIdInView||"u"<typeof ArrayBuffer||"u"<typeof URL)return;let o=t.src;try{i=(0,c.dataURItoBlob)(o)}catch(e){return}t.src=URL.createObjectURL(i),e.e.fire("internalUpdate");let{buffer:n}=e,r=n.get(h)||{};r[t.src]=o,e.buffer.set(h,r)}(t,e),t.e.on(e,"mousedown touchstart",()=>{(function(e){var t;for(let i of["previousSibling","nextSibling"]){let n=e[i];for(;r.Dom.isText(n)&&!(null==(t=n.nodeValue)?void 0:t.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),""));){let e=n[i];r.Dom.safeRemove(n),n=e}}})(e),t.s.select(e)}))})}}d([(0,n.watch)(":afterGetValueFromEditor")],f.prototype,"onAfterGetValueFromEditor",null),d([(0,n.watch)(":beforeSetElementValue")],f.prototype,"onBeforeSetElementValue",null),d([n.autobind],f.prototype,"onSelectionChange",null),d([(0,n.watch)([":change",":afterInit",":changePlace"]),(0,n.debounce)()],f.prototype,"afterChange",null),s.pluginSystem.add("imageProcessor",f)},97536:function(e,t,i){"use strict";i(6441).Config.prototype.image={dialogWidth:600,openOnDblClick:!0,editSrc:!0,useImageEditor:!0,editTitle:!0,editAlt:!0,editLink:!0,editSize:!0,editBorderRadius:!0,editMargins:!0,editClass:!0,availableClasses:[],editStyle:!0,editId:!0,editAlign:!0,showPreview:!0,selectImageAfterClose:!0}},3215:function(e,t,i){"use strict";var o=i(65478),n=i(2748),r=i(580),s=i(21537),a=i(20356),l=i(62843);i(97536);var c=i(59436),d=i(53636),u=i(10263),h=i(94575),p=i(34755),f=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class m extends a.Plugin{get form(){return new c.UIImagePropertiesForm(this.j,this.state,this.activeTabState,{openImageEditor:()=>(0,d.openImageEditorDialog)(this.j,this.state),openImagePopup:e=>(0,u.openImagePopup)(this.j,this.dialog,this.state,e)})}get dialog(){let{j:e}=this,t=e.dlg({minWidth:Math.min(400,screen.width),minHeight:590,buttons:["fullsize","dialog.close"]}),i=this.__buttons;return i.check.onAction(()=>{(0,p.applyValuesToImage)(e,this.state,this.state.sourceImage),e.synchronizeValues(),t.close()}),i.remove.onAction(()=>{e.s.removeNode(this.state.sourceImage),t.close()}),i.cancel.onAction(()=>{t.close()}),t.setHeader(e.i18n("Image properties")),t.setContent(this.form),t.setFooter([[i.cancel,i.remove],i.check]),e.e.on(t,"afterClose",()=>{this.state.image.parentNode&&e.o.image.selectImageAfterClose&&e.s.select(this.state.sourceImage)}),t.setSize(e.o.image.dialogWidth),(0,s.markOwner)(e,t.container),t}get __buttons(){let{j:e}=this;return{check:(0,l.Button)(e,"ok","Apply","primary"),remove:(0,l.Button)(e,"bin","Delete"),cancel:(0,l.Button)(e,"cancel","Cancel")}}open(){return this.activeTabState.activeTab="Image",this.__lock(),this.dialog.open().setModal(!0).setPosition(),this.async.promise((e,t)=>(0,h.readValuesFromImage)(this.j,this.state).then(e,t)).catch(e=>{(0,s.isAbortError)(e)||this.dialog.message.error(e.message)}).finally(()=>this.__unlock()),!1}__lock(){this.dialog.lock(),this.form.setMod("lock",!0),Object.values(this.__buttons).forEach(e=>e.state.disabled=!0)}__unlock(){this.dialog.unlock(),this.form.setMod("lock",!1),Object.values(this.__buttons).forEach(e=>e.state.disabled=!1)}afterInit(e){let t=this;e.e.on("afterConstructor changePlace",()=>{e.e.off(e.editor,".imageproperties").on(e.editor,"dblclick.imageproperties",i=>{let o=i.target;if(n.Dom.isTag(o,"img"))if(e.o.image.openOnDblClick){if(!1===this.j.e.fire("openOnDblClick",o))return;t.state.sourceImage=o,t.state.image=o.cloneNode(!0),e.o.readonly||(i.stopImmediatePropagation(),i.preventDefault(),t.open())}else i.stopImmediatePropagation(),e.s.select(o)})}).on("openImageProperties.imageproperties",e=>{t.state.sourceImage=e,this.state.image=e.cloneNode(!0),this.open()})}async onStateValuesImageSrcChange(){let{image:e,values:t}=this.state;if(e.src)try{this.__lock();try{await e.decode()}catch(e){}if(this.state.sizeIsLocked&&(0,s.isNumeric)(t.imageWidth)){let e=parseFloat(t.imageWidth.toString());t.imageHeight=Math.round(e/this.state.ratio)}this.j.e.fire("updateImageProperties.imageproperties",e)}catch(e){this.j.alert(e.message)}finally{this.__unlock()}}beforeDestruct(e){var t,i,n;Object.values(null!=(t=(0,o.cached)(this,"__buttons"))?t:{}).forEach(e=>e.destruct()),null==(i=(0,o.cached)(this,"dialog"))||i.destruct(),null==(n=(0,o.cached)(this,"form"))||n.destruct(),e.e.off(e.editor,".imageproperties").off(".imageproperties")}constructor(){super(...arguments),this.state={image:new Image,sourceImage:new Image,get ratio(){let{naturalWidth:e,naturalHeight:t}=this.image;return e/t||1},sizeIsLocked:!0,marginIsLocked:!0,values:{style:"",imageSrc:"",borderRadius:0,imageTitle:"",imageAlt:"",imageLink:"",imageLinkOpenInNewTab:!1,imageWidth:0,imageHeight:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,classes:"",id:"",align:""}},this.activeTabState={activeTab:"Image"}}}f([o.cache],m.prototype,"form",null),f([o.cache],m.prototype,"dialog",null),f([o.cache],m.prototype,"__buttons",null),f([(0,o.watch)("state.image")],m.prototype,"onStateValuesImageSrcChange",null),r.pluginSystem.add("imageProperties",m)},51642:function(e,t,i){"use strict";i.d(t,{readAlign:function(){return n}});var o=i(25726);function n(e,t,i){let n=(0,o.getHAlign)(e,i);t.align="normal"===n?"":n}},94575:function(e,t,i){"use strict";i.d(t,{readValuesFromImage:function(){return d}});var o=i(25726),n=i(29960),r=i(41180),s=i(51642),a=i(75595),l=i(47749),c=i(32566);async function d(e,t){let{sourceImage:i,values:d}=t;return(0,s.readAlign)(i,d,(0,o.getAlignClasses)(e,i)),d.borderRadius=parseInt((0,r.cssInline)(i,"border-radius")||"0",10)||0,d.id=(0,n.attr)(i,"id")||"",d.imageTitle=(0,n.attr)(i,"title")||"",d.imageAlt=(0,n.attr)(i,"alt")||"",d.style=(0,n.attr)(i,"style")||"",d.classes=((0,n.attr)(i,"class")||"").replace(/jodit_focused_image[\s]*/,""),(0,l.readMargins)(i,d,t),(0,a.readLink)(t,e,d),d.imageSrc=(0,n.attr)(i,"src")||"",(0,c.readSizes)(i,d,t)}},75595:function(e,t,i){"use strict";i.d(t,{readLink:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i){let r=o.Dom.closest(e.sourceImage,"a",t.editor);r?(i.imageLink=(0,n.attr)(r,"href")||"",i.imageLinkOpenInNewTab="_blank"===(0,n.attr)(r,"target")):(i.imageLink="",i.imageLinkOpenInNewTab=!1)}},47749:function(e,t,i){"use strict";i.d(t,{readMargins:function(){return n}});var o=i(12475);function n(e,t,i){let n=!0,r=!1;["marginTop","marginRight","marginBottom","marginLeft"].forEach(i=>{let s=e.style.getPropertyValue((0,o.kebabCase)(i));if(!s){r=!0,t[i]=0;return}/^[0-9]+(px)?$/.test(s)&&(s=parseInt(s,10)),t[i]=s,(r&&t[i]||n&&"marginTop"!==i&&t[i]!==t.marginTop)&&(n=!1)}),i.marginIsLocked=n}},32566:function(e,t,i){"use strict";i.d(t,{readSizes:function(){return a}});var o=i(29807),n=i(29960),r=i(41180),s=i(14415);async function a(e,t,i){try{await e.decode()}catch(e){}let a=(0,r.css)(e,"width",!0)||(0,n.attr)(e,"width")||!1,l=(0,r.css)(e,"height",!0)||(0,n.attr)(e,"height")||!1;t.imageWidth=!1!==a?(0,s.normalSizeFromString)(a):e.offsetWidth||e.naturalWidth,(0,o.isNumeric)(t.imageWidth)?t.imageHeight=!1!==l?(0,s.normalSizeFromString)(l):e.offsetHeight||e.naturalHeight:t.imageHeight=l||"";let{imageWidth:c,imageHeight:d}=t,u=parseFloat(c.toString());if(!(0,o.isNumeric)(c)||!(0,o.isNumeric)(d)){i.sizeIsLocked=!1;return}if(!1===l){t.imageHeight=Math.round(u/i.ratio),i.sizeIsLocked=!0;return}i.sizeIsLocked=1>Math.abs(u-parseFloat(d.toString())*i.ratio)}},59436:function(e,t,i){"use strict";i.d(t,{UIImagePropertiesForm:function(){return p}});var o=i(65478),n=i(87325),r=i(2748),s=i(21537),a=i(62405),l=i(12153),c=i(92762),d=i(35105),u=i(29827),h=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let p=class e extends a.UIGroup{className(){return"UIImagePropertiesForm"}appendChildToContainer(){}getElm(e){let t=super.getElm(e);if(t)return t;for(let t of this.elements){let i=t.getElm(e);if(i)return i}return null}render(){return`<form>
|
|
144
|
+
</div>`}setPrompt(e){if(e){let{jodit:t}=this,i=t.o.aiAssistant[e],{aiCommonPrefixPrompt:o,aiCommonSuffixPrompt:n}=t.o.aiAssistant;this.promptInput.value=[o,(0,s.isString)(i)?i:"",n].filter(Boolean).join(" "),this.__toggleInsertButton(!0),this.promptInput.value&&(this.__formAiAssistant.submit(),this.__toggleSubmitButton(!0))}this.promptInput.focus()}onAiAssistentResponse(e){this.setMod("loading",!1),r.Dom.detach(this.__results),this.__aiResult=e,r.Dom.append(this.__results,this.jodit.c.fromHTML(e)),this.__toggleSubmitButton(!1),this.__toggleInsertButton(!1)}onAiAssistentError(e){this.__aiResult="",this.setMod("loading",!1),this.__error.textContent=e,r.Dom.detach(this.__results),this.__toggleSubmitButton(!1);let t=this.getFullElName("","hide","true");this.__results.classList.add(t),this.__toggleInsertButton(!0)}onChangePromptValue(){this.__toggleSubmitButton(!this.promptInput.value)}__toggleSubmitButton(e){this.__submitButton.state.disabled=e,this.__tryAgainButton.state.disabled=e}__toggleInsertButton(e){this.__insertButton.state.disabled=e,this.__insertAfterButton.state.disabled=e}constructor(e,{onInsert:t,onInsertAfter:i}){super(e),this.__aiResult="",this.__error=this.getElm("error"),this.__body=this.getElm("body"),this.__buttons=this.getElm("buttons"),this.__results=this.getElm("results"),this.__spinner=this.getElm("spinner"),this.__insertButton=(0,a.Button)(e,"","Insert","primary").onAction(()=>t(this.__aiResult)),this.__insertAfterButton=(0,a.Button)(e,"","Insert After","initial").onAction(()=>i(this.__aiResult));let o=()=>{this.__formAiAssistant.validate()&&(this.__formAiAssistant.submit(),this.__toggleInsertButton(!0),this.__toggleSubmitButton(!0))};this.__submitButton=(0,a.Button)(e,"ai-assistant","").onAction(o),this.__tryAgainButton=(0,a.Button)(e,"update","","initial").onAction(o),this.promptInput=new a.UITextArea(e,{name:"prompt",required:!0,label:"Prompt",placeholder:"Ask AI to improve generated text",className:this.getFullElName("prompt-row-input")});let n=new a.UIBlock(e,[this.__insertButton,this.__insertAfterButton,this.__tryAgainButton],{className:this.getFullElName("prompt-row")});this.__formAiAssistant=new a.UIForm(e,[new a.UIBlock(e,[this.promptInput,this.__submitButton],{className:this.getFullElName("prompt-row")})]).onSubmit(t=>{this.__error.textContent="",this.setMod("loading",!0),e.e.fire("invokeAiAssistant",t.prompt);let i=this.getFullElName("","hide","true");this.__results.classList.remove(i),this.__buttons.classList.remove(i),r.Dom.detach(this.__results),r.Dom.append(this.__results,this.__spinner),this.__insertButton.focus()}),r.Dom.append(this.__buttons,n.container),r.Dom.append(this.__body,this.__formAiAssistant.container),this.onChangePromptValue()}};c([(0,n.watch)(":ai-assistant-response")],d.prototype,"onAiAssistentResponse",null),c([(0,n.watch)(":ai-assistant-error")],d.prototype,"onAiAssistentError",null),c([(0,n.watch)("promptInput:change")],d.prototype,"onChangePromptValue",null),d=c([o.component],d)},25187:function(e,t,i){"use strict";i(73391),i(12391),i(93183),i(66707),i(41107),i(71255),i(82439),i(61323),i(93079),i(19063),i(19271),i(1255),i(575),i(11317),i(36243),i(23399),i(96111),i(2169),i(42263),i(16233),i(77469),i(23531),i(80763),i(3215),i(70045),i(93401),i(76295),i(59483),i(91071),i(61019),i(65517),i(20071),i(32309),i(64837),i(79799),i(31571),i(85407),i(59451),i(18363),i(8355),i(58519),i(6687),i(56113),i(9159),i(12019),i(36125),i(9881),i(28545),i(45927),i(52951),i(43809),i(7309),i(68687),i(59495),i(39627),i(767),i(43003),i(72439),i(94529),i(26551),i(72253),i(65735),i(83671),i(3115)},93183:function(e,t,i){"use strict";var o=i(82758),n=i(22732),r=i(580),s=i(23282),a=i(50911),l=i(45124);i(32496);var c=i(11338),d=i(14630);class u extends a.Plugin{afterInit(e){e.registerCommand("deleteButton",{exec:()=>this.onDelete(!1),hotkeys:e.o.delete.hotkeys.delete},{stopPropagation:!1}).registerCommand("backspaceButton",{exec:()=>this.onDelete(!0),hotkeys:e.o.delete.hotkeys.backspace},{stopPropagation:!1}).registerCommand("deleteWordButton",{exec:()=>this.onDelete(!1,"word"),hotkeys:e.o.delete.hotkeys.deleteWord}).registerCommand("backspaceWordButton",{exec:()=>this.onDelete(!0,"word"),hotkeys:e.o.delete.hotkeys.backspaceWord}).registerCommand("deleteSentenceButton",{exec:()=>this.onDelete(!1,"sentence"),hotkeys:e.o.delete.hotkeys.deleteSentence}).registerCommand("backspaceSentenceButton",{exec:()=>this.onDelete(!0,"sentence"),hotkeys:e.o.delete.hotkeys.backspaceSentence})}beforeDestruct(e){e.e.off("afterCommand.delete")}onDelete(e,t="char"){let i=this.j,r=i.selection;if(r.isFocused()||r.focus(),!r.isInsideArea)return;if((0,c.checkNotCollapsed)(i))return i.e.fire("backSpaceAfterDelete",e),!1;let a=r.range,u=i.createInside.text(o.INVISIBLE_SPACE);try{if(n.Dom.safeInsertNode(a,u),!n.Dom.isOrContains(i.editor,u))return;if(i.e.fire("backSpaceBeforeCases",e,u))return!1;(0,l.moveNodeInsideStart)(i,u,e);let r=i.o.delete.disableCases;if(d.casesMap.some(([n,a])=>{if(!(r&&r.has(n))&&(0,s.isFunction)(a)&&a(i,u,e,t))return o.IS_PROD,!0}))return!1}catch(e){throw o.IS_PROD,e}finally{i.e.fire("backSpaceAfterDelete",e,u),this.safeRemoveEmptyNode(u)}return!1}safeRemoveEmptyNode(e){var t,i;let{range:o}=this.j.s;o.startContainer===e&&(e.previousSibling?n.Dom.isText(e.previousSibling)?o.setStart(e.previousSibling,null!=(i=null==(t=e.previousSibling.nodeValue)?void 0:t.length)?i:0):o.setStartAfter(e.previousSibling):e.nextSibling&&(n.Dom.isText(e.nextSibling)?o.setStart(e.nextSibling,0):o.setStartBefore(e.nextSibling)),o.collapse(!0),this.j.s.selectRange(o)),n.Dom.safeRemove(e)}}u.requires=["hotkeys"],r.pluginSystem.add("backspace",u)},62845:function(e,t,i){"use strict";i.d(t,{checkJoinNeighbors:function(){return s}});var o=i(82758),n=i(2748),r=i(63785);function s(e,t,i){let r=t,s=r;for(;r&&!n.Dom.findNotEmptySibling(r,i)&&r.parentElement!==e.editor;)s=r=r.parentElement;if(n.Dom.isElement(s)&&n.Dom.isContentEditable(s,e.editor)){var l,c;let r,d,u,h=n.Dom.findNotEmptySibling(s,i);if(n.Dom.isTag(h,"br"))return n.Dom.safeRemove(h),e.s.setCursorBefore(t),!0;if(h&&(l=s,c=h,r=n.Dom.isTag(c,o.LIST_TAGS),d=n.Dom.isTag(l,o.LIST_TAGS),u=(e,t)=>t?e.firstElementChild:e.lastElementChild,(d?(c=e.createInside.element(e.o.enterBlock),n.Dom.before(l,c),a(e,u(l,i),c,i)):!!c&&!!r&&!d&&a(e,l,u(c,!i),i))||a(e,s,function(e,t){if(!n.Dom.isTag(e,"table"))return e;let i=[];return n.Dom.each(e,e=>{n.Dom.isCell(e)&&i.push(e)}),i.length?i[t?i.length-1:0]:null}(h,i),i)))return e.s.setCursorBefore(t),!0}return!1}function a(e,t,i,o){if(t&&n.Dom.isElement(i)){n.Dom.moveContent(t,i,!o,(0,r.getMoveFilter)(e));let s=t;for(;s&&s!==e.editor&&n.Dom.isEmpty(s);){let e=s.parentElement;n.Dom.safeRemove(s),s=e}return!0}return!1}},91748:function(e,t,i){"use strict";i.d(t,{checkJoinTwoLists:function(){return s}});var o=i(2748),n=i(37790),r=i(63785);function s(e,t,i){let s=o.Dom.findSibling(t,i),a=o.Dom.findSibling(t,!i);if(!o.Dom.closest(t,o.Dom.isElement,e.editor)&&o.Dom.isList(s)&&o.Dom.isList(a)&&o.Dom.isTag(s.lastElementChild,"li")&&o.Dom.isTag(a.firstElementChild,"li")){let{setCursorBefore:l,setCursorAfter:c}=e.s,d=s.lastElementChild,u=a.firstElementChild;return(0,n.call)(i?o.Dom.prepend:o.Dom.append,u,t),o.Dom.moveContent(a,s,!i,(0,r.getMoveFilter)(e)),o.Dom.safeRemove(a),(0,n.call)(i?o.Dom.append:o.Dom.prepend,d,t),(0,n.call)(i?l:c,t),!0}return!1}},11338:function(e,t,i){"use strict";function o(e){return!e.s.isCollapsed()&&(e.execCommand("Delete"),!0)}i.d(t,{checkNotCollapsed:function(){return o}})},73792:function(e,t,i){"use strict";i.d(t,{checkRemoveChar:function(){return function e(t,i,s,l){var c,d,u,h;let p,f=s?-1:1,m=n.Dom.sibling(i,!s),g=n.Dom.sibling(i,s),b=null,v=!1;for(g||(g=a(i,s,t.editor));g&&(n.Dom.isText(g)||n.Dom.isInlineBlock(g));){for(;n.Dom.isInlineBlock(g);)g=s?null==g?void 0:g.lastChild:null==g?void 0:g.firstChild;if(!g)break;if((null==(c=g.nodeValue)?void 0:c.length)&&(p=function(e,t,i,s){let a=(0,r.toArray)(e.nodeValue),l=a.length,c=t?l-1:0;if(a[c]===o.INVISIBLE_SPACE)for(;a[c]===o.INVISIBLE_SPACE;)c+=i;let d=a[c];if(a[c+i]===o.INVISIBLE_SPACE){for(c+=i;a[c]===o.INVISIBLE_SPACE;)c+=i;c+=t?1:-1}return a=t&&c<0?[]:a.slice(t?0:c+1,t?c:l),function(e,t,i){var s;if(!e||!n.Dom.isText(e)||(!t?/ $/:/^ /).test(null!=(s=e.nodeValue)?s:"")||!(0,r.trimInv)(e.nodeValue||"").length)for(let e=t?i.length-1:0;t?e>=0:e<i.length;e+=t?-1:1)if(" "===i[e])i[e]=o.NBSP_SPACE;else break}(s,t,a),e.nodeValue=a.join(""),d}(g,s,f,m),!g.nodeValue.length&&n.Dom.isInlineBlock(g.parentNode)&&(g.nodeValue=o.INVISIBLE_SPACE)),(null==(d=g.nodeValue)?void 0:d.length)||(b=g),!(0,r.isVoid)(p)&&p!==o.INVISIBLE_SPACE){u=g,h=p,(0,r.call)(s?n.Dom.after:n.Dom.before,u,i),("sentence"===l||"word"===l&&" "!==h&&h!==o.NBSP_SPACE)&&e(t,i,s,l),v=!0;break}let y=a(g,s,t.editor);b&&(n.Dom.safeRemove(b),b=null),g=y}return b&&n.Dom.safeRemove(b),v&&(function(e){let t=e.parentElement;for(;t&&n.Dom.isInlineBlock(t)&&n.Dom.isTag(t,"a");){let i=t.parentElement;n.Dom.isEmpty(t)&&(n.Dom.after(t,e),n.Dom.safeRemove(t)),t=i}}(i),i.parentElement!==t.editor&&n.Dom.isBlock(i.parentElement)&&n.Dom.each(i.parentElement,n.Dom.isEmptyTextNode)&&n.Dom.after(i,t.createInside.element("br")),t.s.setCursorBefore(i),n.Dom.isTag(i.previousSibling,"br")&&!n.Dom.findNotEmptySibling(i,!1)&&n.Dom.after(i,t.createInside.element("br"))),v}}});var o=i(82758),n=i(22732),r=i(21537),s=i(63785);function a(e,t,i){let o=n.Dom.sibling(e,t);return!o&&e.parentNode&&e.parentNode!==i&&(o=(0,s.findMostNestedNeighbor)(e,!t,i,!0))&&n.Dom.closest(e,"li",i)!==n.Dom.closest(o,"li",i)?null:o}},87536:function(e,t,i){"use strict";i.d(t,{checkRemoveContentNotEditable:function(){return s}});var o=i(22732),n=i(21537),r=i(45124);function s(e,t,i){let s=o.Dom.findSibling(t,i);return!s&&t.parentElement&&t.parentElement!==e.editor&&(s=o.Dom.findSibling(t.parentElement,i)),!(!o.Dom.isElement(s)||o.Dom.isContentEditable(s,e.editor))&&((0,n.call)(i?o.Dom.before:o.Dom.after,s,t),o.Dom.safeRemove(s),(0,r.moveNodeInsideStart)(e,t,i),(0,n.call)(i?e.s.setCursorBefore:e.s.setCursorAfter,t),!0)}},12474:function(e,t,i){"use strict";i.d(t,{checkRemoveEmptyNeighbor:function(){return n}});var o=i(2748);function n(e,t,i){let n=o.Dom.closest(t,o.Dom.isElement,e.editor);if(!n)return!1;let r=o.Dom.findNotEmptySibling(n,i);return!!(r&&o.Dom.isEmpty(r))&&(o.Dom.safeRemove(r),e.s.setCursorBefore(t),!0)}},58940:function(e,t,i){"use strict";i.d(t,{checkRemoveEmptyParent:function(){return s}});var o=i(82758),n=i(22732),r=i(91748);function s(e,t,i){let s=!1,{setCursorBefore:a,setCursorIn:l}=e.s,c=n.Dom.closest(t,n.Dom.isElement,e.editor);if(!c||!n.Dom.isEmpty(c))return!1;let d=n.Dom.findNotEmptyNeighbor(t,i,e.editor);do if(c&&n.Dom.isEmpty(c)&&!n.Dom.isCell(c)){n.Dom.after(c,t);let i=n.Dom.closest(c,e=>n.Dom.isElement(e)&&e!==c,e.editor);n.Dom.safeRemove(c),s=!0,c=i}else break;while(c)return!!(s&&(0,r.checkJoinTwoLists)(e,t,i))||(!d||n.Dom.isText(d)||n.Dom.isTag(d,o.INSEPARABLE_TAGS)?a(t):l(d,!i),s)}},56825:function(e,t,i){"use strict";i.d(t,{checkRemoveUnbreakableElement:function(){return s}});var o=i(82758),n=i(2748),r=i(58940);function s(e,t,i){let s=n.Dom.findSibling(t,i);return!!(n.Dom.isElement(s)&&(n.Dom.isTag(s,o.INSEPARABLE_TAGS)||n.Dom.isEmpty(s)))&&(n.Dom.safeRemove(s),n.Dom.isTag(s,"br")&&!n.Dom.findNotEmptySibling(t,!1)&&n.Dom.after(t,e.createInside.element("br")),e.s.setCursorBefore(t),n.Dom.isTag(s,"br")&&(0,r.checkRemoveEmptyParent)(e,t,i),!0)}},90240:function(e,t,i){"use strict";i.d(t,{checkTableCell:function(){return n}});var o=i(2748);function n(e,t){let i=t.parentElement;return!!o.Dom.isCell(i)}},68034:function(e,t,i){"use strict";i.d(t,{checkUnwrapFirstListItem:function(){return r}});var o=i(2748),n=i(43555);function r(e,t,i){var r;let s=o.Dom.closest(t,o.Dom.isElement,e.editor),{s:a}=e;if(o.Dom.isLeaf(s)&&(null==(r=null==s?void 0:s.parentElement)?void 0:r[i?"firstElementChild":"lastElementChild"])===s&&a.cursorInTheEdge(i,s)){let r=s.parentElement,l=e.createInside.element(e.o.enterBlock);return(0,n.call)(i?o.Dom.before:o.Dom.after,r,l),o.Dom.moveContent(s,l),o.Dom.safeRemove(s),o.Dom.isEmpty(r)&&o.Dom.safeRemove(r),(0,n.call)(i?a.setCursorBefore:a.setCursorAfter,t),!0}return!1}},14630:function(e,t,i){"use strict";var o=i(62845),n=i(91748),r=i(73792),s=i(87536),a=i(12474),l=i(58940),c=i(56825),d=i(90240),u=i(68034);let h=[["remove-unbreakable",c.checkRemoveUnbreakableElement],["remove-not-editable",s.checkRemoveContentNotEditable],["remove-char",r.checkRemoveChar],["table-cell",d.checkTableCell],["remove-empty-parent",l.checkRemoveEmptyParent],["remove-empty-neighbor",a.checkRemoveEmptyNeighbor],["join-two-lists",n.checkJoinTwoLists],["join-neighbors",o.checkJoinNeighbors],["unwrap-first-list-item",u.checkUnwrapFirstListItem]];h.map(([,e])=>e),i.d(t,["casesMap",0,h])},32496:function(e,t,i){"use strict";i(6441).Config.prototype.delete={hotkeys:{delete:["delete","cmd+backspace"],deleteWord:["ctrl+delete","cmd+alt+backspace","ctrl+alt+backspace"],deleteSentence:["ctrl+shift+delete","cmd+shift+delete"],backspace:["backspace"],backspaceWord:["ctrl+backspace"],backspaceSentence:["ctrl+shift+backspace","cmd+shift+backspace"]}}},63785:function(e,t,i){"use strict";i.d(t,{findMostNestedNeighbor:function(){return n},getMoveFilter:function(){return r}});var o=i(22732);function n(e,t,i,r=!1){let s=e=>t?e.firstChild:e.lastChild,a=o.Dom.findNotEmptyNeighbor(e,!t,i);if(r&&o.Dom.isElement(a)&&!o.Dom.isInlineBlock(a))return null;if(a)do{if(!s(a))return a;a=s(a)}while(a)return null}function r(e){return t=>!0!==e.e.fire("backSpaceIsMovedIgnore",t)}},41107:function(e,t,i){"use strict";var o=i(580),n=i(21537),r=i(12153),s=i(6441);i(73674);var a=i(820),l=i(53651),c=i(16020),d=i(89758),u=i(98527),h=i(51855);o.pluginSystem.add("bold",function(e){let t=t=>{let i,o=s.Config.defaultOptions.controls[t],r={...o.css};return Object.keys(r).forEach(e=>{i||(i={}),i[e]=(0,n.isArray)(r[e])?r[e][0]:r[e]}),e.s.commitStyle({element:o.tags?o.tags[0]:void 0}),e.synchronizeValues(),!1};["bold","italic","underline","strikethrough"].forEach(t=>{e.registerButton({name:t,group:"font-style"})}),["superscript","subscript"].forEach(t=>{e.registerButton({name:t,group:"script"})}),e.registerCommand("bold",{exec:t,hotkeys:["ctrl+b","cmd+b"]}).registerCommand("italic",{exec:t,hotkeys:["ctrl+i","cmd+i"]}).registerCommand("underline",{exec:t,hotkeys:["ctrl+u","cmd+u"]}).registerCommand("strikethrough",{exec:t}).registerCommand("subscript",{exec:t}).registerCommand("superscript",{exec:t})}),r.Icon.set("bold",a.default).set("italic",l.default).set("strikethrough",c.default).set("subscript",d.default).set("superscript",u.default).set("underline",h.default)},73674:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.controls.subscript={tags:["sub"],tooltip:"subscript"},o.Config.prototype.controls.superscript={tags:["sup"],tooltip:"superscript"},o.Config.prototype.controls.bold={tagRegExp:/^(strong|b)$/i,tags:["strong","b"],css:{"font-weight":["bold","700"]},tooltip:"Bold"},o.Config.prototype.controls.italic={tagRegExp:/^(em|i)$/i,tags:["em","i"],css:{"font-style":"italic"},tooltip:"Italic"},o.Config.prototype.controls.underline={tagRegExp:/^(u)$/i,tags:["u"],css:{"text-decoration-line":"underline"},tooltip:"Underline"},o.Config.prototype.controls.strikethrough={tagRegExp:/^(s)$/i,tags:["s"],css:{"text-decoration-line":"line-through"},tooltip:"Strike through"}},820:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.75" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M6 4h7a4 4 0 0 1 0 8H6V4Zm0 8h8a4 4 0 0 1 0 8H6v-8Z"/> </g> </svg> '},53651:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M10 4h9M5 20h9M15 4 9 20"/> </g> </svg> '},16020:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M17 6c-1-1.5-2.5-2-5-2-3 0-5 1.5-5 4 0 1.8 1.5 3 5 4s5 2.2 5 4c0 2.5-2 4-5 4-2.5 0-4-.5-5-2M3 12h18"/> </g> </svg> '},89758:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 4 9 12M12 4 3 16M16 16a2 2 0 0 1 4 0c0 1.5-4 3-4 5h4"/> </g> </svg> '},98527:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 8 9 12M12 8 3 20M16 4a2 2 0 0 1 4 0c0 1.5-4 3-4 5h4"/> </g> </svg> '},51855:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M6 3v8a6 6 0 0 0 12 0V3M4 21h16"/> </g> </svg> '},71255:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(37790),s=i(50911),a=i(12153),l=i(6441),c=i(31151);l.Config.prototype.controls.classSpan={command:"applyClassName",exec:r.memorizeExec,list:["enabled","disabled","activated","text-left","text-center","text-right","warning","error"],isChildActive(e,t){let i=e.s.current();if(i){let n=o.Dom.closest(i,o.Dom.isElement,e.editor)||e.editor;return!!(t.control.args&&n.classList.contains(t.control.args[0].toString()))}return!1},isActive(e,t){let i=e.s.current();if(i){let n=o.Dom.closest(i,o.Dom.isElement,e.editor)||e.editor,r=!1;return t.control.list&&Object.keys(t.control.list).forEach(e=>{n.classList.contains(e)&&(r=!0)}),!!(n&&n!==e.editor&&void 0!==t.control.list&&r)}return!1},childTemplate:(e,t,i)=>`<span class="${t}">${e.i18n(i)}</span>`,tooltip:"Insert className"};class d extends s.Plugin{afterInit(e){e.registerCommand("applyClassName",(t,i,o)=>(e.s.commitStyle({attributes:{class:o}}),!1))}beforeDestruct(){}constructor(){super(...arguments),this.buttons=[{name:"classSpan",group:"script"}]}}n.pluginSystem.add("classSpan",d),a.Icon.set("class-span",c.default)},31151:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M8 4H5v16h3m8-16h3v16h-3M9 15l3-7 3 7m-5-2h4"/> </g> </svg> '},82439:function(e,t,i){"use strict";var o=i(65478),n=i(2748),r=i(70071),s=i(580),a=i(86518),l=i(20356);i(46776);var c=i(80973),d=i(59498),u=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class h extends l.Plugin{afterInit(){this.onChangeCleanHTML()}get isEditMode(){return!(this.j.isInDestruct||!this.j.isEditorMode()||this.j.getReadOnly())}onChangeCleanHTML(){if(!this.isEditMode)return;let e=this.j;this.walker.setWork(e.editor),this.currentSelectionNode=e.s.current()}startWalker(){let{jodit:e}=this,t=(0,d.getHash)(this.j.o.cleanHTML.allowTags),i=(0,d.getHash)(this.j.o.cleanHTML.denyTags);this.walker.on("visit",o=>(0,d.visitNodeWalker)(e,o,t,i,this.currentSelectionNode)).on("end",e=>{this.j.e.fire(e?"internalChange finishedCleanHTMLWorker":"finishedCleanHTMLWorker")})}beforeCommand(e){if("removeformat"===e.toLowerCase())return this.j.s.isCollapsed()?(0,d.removeFormatForCollapsedSelection)(this.j):(0,d.removeFormatForSelection)(this.j),!1}onAfterSetNativeEditorValue(){(0,a.safeHTML)(this.j.editor,this.j.o.cleanHTML)}onBeforeSetNativeEditorValue(e){let[t,i]=this.j.o.cleanHTML.useIframeSandbox?this.j.createInside.sandbox():[this.j.od.implementation.createHTMLDocument("").body];return t.innerHTML=e.value,this.j.e.fire("safeHTML",t),this.__replaceOldTags(t),e.value=t.innerHTML,(0,a.safeHTML)(t,{safeJavaScriptLink:!0,removeOnError:!0}),n.Dom.safeRemove(i),!1}__replaceOldTags(e){let{replaceOldTags:t,disableCleanFilter:i}=this.j.o.cleanHTML;!t||(null==i?void 0:i.has("replaceOldTags"))||n.Dom.each(e,e=>{(0,c.replaceOldTags)(this.j,e,!1)})}onAfterGetValueFromEditor(e){if(this.__singleQuotesInFontFamily(e),this.__removeTrailingBr(e),!this.j.o.cleanHTML.collapseEmptyValueToEmptyString)return;let t=/^<([a-z][a-z0-9]*)\b[^>]*>(?:<br\/?>)?<\/\1>$/i.exec(e.value.trim());t&&/^(p|div|h[1-6]|blockquote|pre)$/i.test(t[1])&&(e.value="")}__removeTrailingBr(e){if(!this.j.o.cleanHTML.removeTrailingBr||!/<br/i.test(e.value))return;let t=this.j.c.div();t.innerHTML=e.value,[t,...t.querySelectorAll("p, div, li, td, th, h1, h2, h3, h4, h5, h6, blockquote")].forEach(e=>{var t;let i=e.lastChild;if(!n.Dom.isTag(i,"br"))return;let o=i.previousSibling;!o||n.Dom.isTag(o,"br")||(!n.Dom.isText(o)||(null==(t=o.nodeValue)?void 0:t.trim())||o.previousSibling)&&n.Dom.safeRemove(i)}),e.value=t.innerHTML}__singleQuotesInFontFamily(e){this.j.o.cleanHTML.singleQuotesInFontFamily&&e.value.includes(""")&&(e.value=e.value.replace(/\sstyle="([^"]*)"/gi,(e,t)=>{if(!t.includes(""")||!/font-family/i.test(t))return e;let i=t.replace(/font-family\s*:(?:"|[^;])*/gi,e=>e.includes("'")?e:e.replace(/"/g,"'"));return e.replace(t,i)}))}onSafeHTML(e){let t=this.j.o.cleanHTML.sanitizer;t&&(e.innerHTML=t(e.innerHTML)),(0,a.safeHTML)(e,this.j.o.cleanHTML)}beforeDestruct(){this.j.e.off("safeHTML",this.onSafeHTML).off("beforeSetNativeEditorValue",this.onBeforeSetNativeEditorValue).off("afterSetNativeEditorValue",this.onAfterSetNativeEditorValue),this.walker.destruct()}constructor(e){super(e),this.buttons=[{name:"eraser",group:"font-style"}],this.currentSelectionNode=null,this.walker=new r.LazyWalker(this.j.async,{timeout:this.j.o.cleanHTML.timeout}),e.e.on("safeHTML",this.onSafeHTML).on("beforeSetNativeEditorValue",this.onBeforeSetNativeEditorValue).on("afterSetNativeEditorValue",this.onAfterSetNativeEditorValue)}}u([(0,o.watch)([":change",":afterSetMode",":afterInit",":mousedown",":keydown"])],h.prototype,"onChangeCleanHTML",null),u([(0,o.hook)("ready")],h.prototype,"startWalker",null),u([(0,o.watch)(":beforeCommand")],h.prototype,"beforeCommand",null),u([o.autobind],h.prototype,"onAfterSetNativeEditorValue",null),u([o.autobind],h.prototype,"onBeforeSetNativeEditorValue",null),u([(0,o.watch)(":afterGetValueFromEditor")],h.prototype,"onAfterGetValueFromEditor",null),u([o.autobind],h.prototype,"onSafeHTML",null),s.pluginSystem.add("cleanHtml",h)},46776:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.cleanHTML={timeout:300,removeEmptyElements:!0,fillEmptyParagraph:!0,collapseEmptyValueToEmptyString:!1,singleQuotesInFontFamily:!0,removeTrailingBr:!1,replaceNBSP:!0,replaceOldTags:{i:"em",b:"strong"},allowTags:!1,denyTags:"script,iframe,object,embed",useIframeSandbox:!1,removeOnError:!0,removeEventAttributes:!0,safeJavaScriptLink:!0,safeLinksTarget:!0,allowedStyles:!1,sanitizer:!1,sandboxIframesInContent:!0,convertUnsafeEmbeds:["object","embed"],disableCleanFilter:null},o.Config.prototype.controls.eraser={command:"removeFormat",tooltip:"Clear Formatting"}},83447:function(e,t,i){"use strict";i.d(t,{getHash:function(){return r}});var o=i(70799),n=i(49055);function r(e){let t=/([^[]*)\[([^\]]+)]/,i=/[\s]*,[\s]*/,r=/^(.*)[\s]*=[\s]*(.*)$/,s={};return(0,o.isString)(e)?(e.split(i).map(e=>{e=(0,n.trim)(e);let o=t.exec(e),a={};if(o){let e=o[2].split(i);o[1]&&(e.forEach(e=>{e=(0,n.trim)(e);let t=r.exec(e);t?a[t[1]]=t[2]:a[e]=!0}),s[o[1].toUpperCase()]=a)}else s[e.toUpperCase()]=!0}),s):!!e&&(Object.keys(e).forEach(t=>{s[t.toUpperCase()]=e[t]}),s)}},59498:function(e,t,i){"use strict";i.d(t,{getHash:function(){return o.getHash},removeFormatForCollapsedSelection:function(){return n.removeFormatForCollapsedSelection},removeFormatForSelection:function(){return r.removeFormatForSelection},visitNodeWalker:function(){return s.visitNodeWalker}});var o=i(83447),n=i(84272),r=i(42312),s=i(39516)},15908:function(e,t,i){"use strict";i.d(t,{isAllowedMediaEmbed:function(){return r}});let o=/^(https?:)?\/\/(www\.|m\.|music\.)?youtube(-nocookie)?\.com\/embed\//i,n=/^(https?:)?\/\/player\.vimeo\.com\/video\//i;function r(e){return o.test(e)||n.test(e)}},84272:function(e,t,i){"use strict";i.d(t,{isInlineBlock:function(){return s},removeFormatForCollapsedSelection:function(){return r}});var o=i(82758),n=i(2748);function r(e,t){let{s:i}=e,o=t;if(!o){o=e.createInside.fake();let{range:t}=i;n.Dom.safeInsertNode(t,o),t.collapse()}let r=n.Dom.furthest(o,s,e.editor);if(r)if(i.cursorOnTheLeft(r))n.Dom.before(r,o);else if(i.cursorOnTheRight(r))n.Dom.after(r,o);else{let e=i.splitSelection(r);e&&n.Dom.after(e,o)}t||(i.setCursorBefore(o),n.Dom.safeRemove(o))}function s(e){return n.Dom.isInlineBlock(e)&&!n.Dom.isTag(e,o.INSEPARABLE_TAGS)}},42312:function(e,t,i){"use strict";i.d(t,{removeFormatForSelection:function(){return s}});var o=i(2748),n=i(43555),r=i(84272);function s(e){let{s:t,editor:i,createInside:s}=e,{range:a}=t,l=a.cloneRange(),c=a.cloneRange(),d=s.fake(),u=s.fake();l.collapse(!0),c.collapse(!1),o.Dom.safeInsertNode(l,d),o.Dom.safeInsertNode(c,u),a.setStartBefore(d),a.collapse(!0),t.selectRange(a),(0,r.removeFormatForCollapsedSelection)(e,d),a.setEndAfter(u),a.collapse(!1),t.selectRange(a),(0,r.removeFormatForCollapsedSelection)(e,u);let h=[];o.Dom.between(d,u,e=>{(0,r.isInlineBlock)(e)&&!o.Dom.isTag(e,"a")&&h.push(e),o.Dom.isElement(e)&&(0,n.attr)(e,"style")&&(0,n.attr)(e,"style",null)}),h.forEach(e=>o.Dom.unwrap(e));let p=(e,t)=>{if(!o.Dom.findNotEmptySibling(e,t)){let o=e.parentNode;if(o&&o!==i&&(0,n.attr)(o,"style"))return(0,n.attr)(o,"style",null),p(o,t),!0}};p(d,!0)&&p(u,!1),a.setStartAfter(d),a.setEndBefore(u),t.selectRange(a),o.Dom.safeRemove(d),o.Dom.safeRemove(u)}},82558:function(e,t,i){"use strict";i.d(t,{allowAttributes:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i,r){let s=r&&o.Dom.isElement(t)&&r[t.nodeName];if(r&&o.Dom.isElement(t)&&!0!==s){if(!s)return i;let e=t.attributes;if(e&&e.length){let o=[];for(let t=0;t<e.length;t+=1){let i=s[e[t].name];i&&(!0===i||i===e[t].value)||o.push(e[t].name)}o.length&&(i=!0),o.forEach(e=>{(0,n.attrRaw)(t,e,null)})}}return i}},1962:function(e,t,i){"use strict";i.d(t,{convertUnsafeEmbeds:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i){let r=e.o.cleanHTML.convertUnsafeEmbeds;if(!r||!o.Dom.isElement(t))return i;let s=t.nodeName.toLowerCase();if(!r.includes(s))return i;let a=(0,n.attr)(t,"data")||(0,n.attr)(t,"src")||(0,n.attr)(t,"movie")||"";if(!a)return o.Dom.safeRemove(t),!0;let l=e.createInside.element("iframe");return(0,n.attr)(l,{src:a,sandbox:"",frameborder:"0",width:(0,n.attr)(t,"width"),height:(0,n.attr)(t,"height")}),o.Dom.replace(t,l,void 0,!1,!0),!0}},39433:function(e,t,i){"use strict";i.d(t,{fillEmptyParagraph:function(){return s}});var o=i(82758),n=i(2748);let r=new Set(["table","tbody","thead","tfoot","tr"]);function s(e,t,i){if(e.o.cleanHTML.fillEmptyParagraph&&n.Dom.isBlock(t)&&n.Dom.isEmpty(t,o.INSEPARABLE_TAGS)&&!n.Dom.isTag(t,r)){let i=e.createInside.element("br");return n.Dom.append(t,i),!0}return i}},45235:function(e,t,i){"use strict";i.r(t),i.d(t,{allowAttributes:function(){return o.allowAttributes},convertUnsafeEmbeds:function(){return n.convertUnsafeEmbeds},fillEmptyParagraph:function(){return r.fillEmptyParagraph},removeEmptyTextNode:function(){return s.removeEmptyTextNode},removeInvTextNodes:function(){return a.removeInvTextNodes},replaceOldTags:function(){return l.replaceOldTags},safeLinksTarget:function(){return c.safeLinksTarget},sandboxIframesInContent:function(){return d.sandboxIframesInContent},sanitizeAttributes:function(){return u.sanitizeAttributes},sanitizeStyles:function(){return h.sanitizeStyles},tryRemoveNode:function(){return p.tryRemoveNode}});var o=i(82558),n=i(1962),r=i(39433),s=i(53392),a=i(25813),l=i(80973),c=i(95614),d=i(85978),u=i(384),h=i(15583),p=i(28800)},53392:function(e,t,i){"use strict";i.d(t,{removeEmptyTextNode:function(){return n}});var o=i(2748);function n(e,t,i,n,r,s){return o.Dom.isText(t)&&!t.nodeValue?(t===s&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),o.Dom.safeRemove(t),!0):i}},25813:function(e,t,i){"use strict";i.d(t,{removeInvTextNodes:function(){return r}});var o=i(82758),n=i(2748);function r(e,t,i,r,s,a){if(a===t||!n.Dom.isText(t)||null==t.nodeValue||!(0,o.INVISIBLE_SPACE_REG_EXP)().test(t.nodeValue))return i;let l=n.Dom.furthest(a,n.Dom.isBlock,e.editor);return!l||n.Dom.isOrContains(l,t)?i:(t.nodeValue=t.nodeValue.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),""),t===a&&e.s.isFocused()&&e.s.isCollapsed()&&e.s.setCursorAfter(t),t.nodeValue||n.Dom.safeRemove(t),!0)}},80973:function(e,t,i){"use strict";i.d(t,{replaceOldTags:function(){return n}});var o=i(2748);function n(e,t,i){let n=function(e,t,i){if(!i||!o.Dom.isHTMLElement(t))return t;let n=i[t.nodeName.toLowerCase()]||i[t.nodeName];if(n){let i=function(e,t){let{sel:i}=e.s;if(!(null==i?void 0:i.anchorNode)||!i.focusNode||!e.s.isFocused())return null;let{anchorNode:n,anchorOffset:r,focusNode:s,focusOffset:a}=i;return o.Dom.isOrContains(t,n)||o.Dom.isOrContains(t,s)?e=>{i.setBaseAndExtent(n===t?e:n,r,s===t?e:s,a)}:null}(e,t),r=o.Dom.replace(t,n,e.createInside,!0,!1);return null==i||i(r),r}return t}(e,t,e.o.cleanHTML.replaceOldTags);return t!==n||i}},95614:function(e,t,i){"use strict";i.d(t,{safeLinksTarget:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i){if(!e.o.cleanHTML.safeLinksTarget||!o.Dom.isElement(t)||"A"!==t.nodeName||"_blank"!==(0,n.attr)(t,"target"))return i;let r=((0,n.attr)(t,"rel")||"").split(/\s+/).filter(Boolean),s=!1;return(r.includes("noopener")||(r.push("noopener"),s=!0),r.includes("noreferrer")||(r.push("noreferrer"),s=!0),s)?((0,n.attr)(t,"rel",r.join(" ")),!0):i}},85978:function(e,t,i){"use strict";i.d(t,{sandboxIframesInContent:function(){return s}});var o=i(2748),n=i(29960),r=i(15908);function s(e,t,i){return e.o.cleanHTML.sandboxIframesInContent&&o.Dom.isElement(t)&&"IFRAME"===t.nodeName?(0,r.isAllowedMediaEmbed)((0,n.attr)(t,"src")||"")||t.hasAttribute("sandbox")?i:((0,n.attr)(t,"sandbox",""),!0):i}},384:function(e,t,i){"use strict";i.d(t,{sanitizeAttributes:function(){return r}});var o=i(2748),n=i(21537);function r(e,t,i){if(!o.Dom.isElement(t))return i;let r=e.options.cleanHTML;return!!(0,n.sanitizeHTMLElement)(t,{safeJavaScriptLink:r.safeJavaScriptLink,removeOnError:r.removeOnError,removeEventAttributes:r.removeEventAttributes,safeLinksTarget:r.safeLinksTarget})||i}},15583:function(e,t,i){"use strict";i.d(t,{sanitizeStyles:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i){let r=e.o.cleanHTML.allowedStyles;if(!r||!o.Dom.isElement(t))return i;let s=(0,n.attr)(t,"style");if(!s)return i;let a=function(e,t){let i=t[e],o=t["*"];if(!i&&!o)return null;let n=new Set;if(o)for(let e of o)n.add(e.toLowerCase());if(i)for(let e of i)n.add(e.toLowerCase());return n}(t.nodeName.toLowerCase(),r);if(!a)return i;let l=s.split(";").map(e=>e.trim()).filter(e=>{if(!e)return!1;let t=e.indexOf(":");if(-1===t)return!1;let i=e.substring(0,t).trim().toLowerCase();return a.has(i)}).join("; ").replace(/;\s*$/,"");return l!==s?((0,n.attr)(t,"style",l||null),!0):i}},28800:function(e,t,i){"use strict";i.d(t,{tryRemoveNode:function(){return l}});var o=i(82758),n=i(2748),r=i(49055),s=i(29960),a=i(15908);function l(e,t,i,l,c,d){return!function(e,t,i,l,c){if(!n.Dom.isText(t)){let e=t.nodeName.toUpperCase();if(l&&!l[e])return!0;let i="IFRAME"===e&&(0,a.isAllowedMediaEmbed)((0,s.attr)(t,"src")||"");if(!l&&c&&c[e]&&!i)return!0}if(!e.o.cleanHTML.removeEmptyElements)return!1;let d=e.s.isCollapsed()?e.s.range.startContainer:null;return n.Dom.isElement(t)&&null!=t.nodeName.match(o.IS_INLINE)&&!n.Dom.isTemporary(t)&&!(t.hasAttribute("id")||"A"===t.nodeName&&t.hasAttribute("name"))&&0===(0,r.trimInv)(t.innerHTML).length&&(null==i||!n.Dom.isOrContains(t,i))&&(null==d||!n.Dom.isOrContains(t,d))}(e,t,d,l,c)?i:(n.Dom.safeRemove(t),!0)}},39516:function(e,t,i){"use strict";i.d(t,{visitNodeWalker:function(){return s}});var o=i(82758),n=i(45235);let r=Object.keys(n);function s(e,t,i,s,a){let l=!1,c=e.o.cleanHTML.disableCleanFilter;for(let d of r)if(!(c&&c.has(d))&&(l=(0,n[d])(e,t,l,i,s,a),o.IS_PROD,!t.isConnected))return!0;return l}},61323:function(e,t,i){"use strict";var o=i(82758),n=i(33433),r=i(2748),s=i(580),a=i(21537);i(79419);class l{init(e){var t;null==(t=this.buttons)||t.forEach(t=>e.registerButton(t)),e.e.off(`copy.${o.CLIPBOARD_ID} cut.${o.CLIPBOARD_ID}`).on(`copy.${o.CLIPBOARD_ID} cut.${o.CLIPBOARD_ID}`,t=>{var i;let n=function(e,t){if(!t||e.s.isCollapsed())return t;let i=e.s.range.commonAncestorContainer;r.Dom.isElement(i)||(i=i.parentElement);let o=t;for(;i&&i!==e.editor&&r.Dom.isElement(i)&&!r.Dom.isBlock(i);){let e=i.cloneNode(!1);e.innerHTML=o,o=e.outerHTML,i=i.parentElement}return o}(e,e.s.html),s=(0,a.getDataTransfer)(t)||(0,a.getDataTransfer)(e.ew)||(0,a.getDataTransfer)(t.originalEvent);s&&(s.setData(o.TEXT_PLAIN,(0,a.stripTags)(n)),s.setData(o.TEXT_HTML,n)),e.buffer.set(o.CLIPBOARD_ID,n),e.e.fire("pasteStack",{html:n,action:e.o.defaultActionOnPaste||o.INSERT_AS_HTML}),"cut"===t.type&&(e.s.remove(),e.s.focus()),t.preventDefault(),null==(i=null==e?void 0:e.events)||i.fire("afterCopy",n)})}destruct(e){var t,i;null==(t=(0,n.cached)(e,"buffer"))||t.set(o.CLIPBOARD_ID,""),null==(i=null==e?void 0:e.events)||i.off("."+o.CLIPBOARD_ID)}constructor(){this.buttons=[{name:"cut",group:"clipboard"},{name:"copy",group:"clipboard"},{name:"paste",group:"clipboard"},{name:"selectall",group:"clipboard"}]}}s.pluginSystem.add("clipboard",l)},79419:function(e,t,i){"use strict";var o=i(12153),n=i(6441),r=i(94775),s=i(23140),a=i(92699),l=i(10052);n.Config.prototype.controls.cut={command:"cut",isDisabled:e=>e.s.isCollapsed(),tooltip:"Cut selection"},n.Config.prototype.controls.copy={command:"copy",isDisabled:e=>e.s.isCollapsed(),tooltip:"Copy selection"},n.Config.prototype.controls.selectall={icon:"select-all",command:"selectall",tooltip:"Select all"},o.Icon.set("copy",r.default).set("cut",s.default).set("paste",a.default).set("select-all",l.default)},94775:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="8" y="8" width="13" height="13" rx="2"/><path d="M16 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h3"/> </g> </svg> '},23140:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <circle cx="6" cy="6" r="3"/><circle cx="6" cy="18" r="3"/><path d="m8.2 8.2 12.3 12.3M8.2 15.8 20.5 3.5"/> </g> </svg> '},92699:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="4" y="5" width="16" height="16" rx="2"/><rect x="9" y="3" width="6" height="4" rx="1"/> </g> </svg> '},10052:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 6V3h3m4 0h4m4 0h3v3m0 4v4m0 4v3h-3m-4 0h-4m-4 0H3v-3m0-4v-4"/><rect x="7" y="7" width="10" height="10" rx="1"/> </g> </svg> '},46104:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 3c-2 3.2-5.5 7-5.5 10a5.5 5.5 0 0 0 11 0c0-3-3.5-6.8-5.5-10Z"/> </g> <rect x="5" y="21" width="14" height="2" rx="1" fill="inherit" stroke="none"/> </svg> '},93079:function(e,t,i){"use strict";var o=i(580),n=i(21537);i(21988),o.pluginSystem.add("color",function(e){e.registerButton({name:"brush",group:"color"});let t=(t,i,o)=>{var r;let s=(0,n.normalizeColor)(o)||"",a="background"===t?{backgroundColor:s}:{color:s},l=e.getInstance("Table",e.o).getAllSelectedCells();return l.length&&e.s.isCollapsed()?(l.forEach(t=>{e.s.select(t,!0),e.s.commitStyle({attributes:{style:a}})}),null==(r=e.s.sel)||r.removeAllRanges()):e.s.commitStyle({attributes:{style:a}}),e.synchronizeValues(),!1};e.registerCommand("forecolor",t).registerCommand("background",t)})},21988:function(e,t,i){"use strict";var o=i(2748),n=i(21537),r=i(12153),s=i(6441),a=i(92762),l=i(46104);function c(e,t,i){(0,n.css)(e,t,i),(0,n.attr)(e,"style")||(0,n.attr)(e,"style",null)}r.Icon.set("brush",l.default),s.Config.prototype.controls.brushCell={isVisible:e=>!e.o.disablePlugins.includes("color"),icon:"brush",popup(e,t,i){if(!(0,n.isJoditObject)(e))return;let o=e.getInstance("Table",e.o).getAllSelectedCells();if(!o.length)return!1;let r=t=>(0,a.ColorPickerWidget)(e,n=>{o.forEach(e=>{c(e,t,n)}),e.lock(),e.synchronizeValues(),i(),e.unlock()},(0,n.css)(o[0],t));return(0,a.TabsWidget)(e,[{name:"Background",content:r("background-color")},{name:"Text",content:r("color")},{name:"Border",content:r("border-color")}])},tooltip:"Background"},s.Config.prototype.controls.brush={isVisible:e=>!e.o.disablePlugins.includes("color"),update(e,t){let i=(0,n.dataBind)(t,"color"),r=(i,o)=>!!o&&o!==(0,n.css)(e.editor,i).toString()&&(t.state.icon.fill=o,!0);if(i){let e=(0,n.dataBind)(t,"color");r("color"===e?e:"background-color",i);return}let s=e.s.current();if(s&&!t.state.disabled){let t=o.Dom.closest(s,o.Dom.isElement,e.editor)||e.editor,i=r("color",(0,n.css)(t,"color").toString()),a=r("background-color",(0,n.css)(t,"background-color").toString());if(i||a)return}t.state.icon.fill="",t.state.activated=!1},popup(e,t,i,r){let s="",l="",d,u=null;return t&&t!==e.editor&&o.Dom.isNode(t)&&(o.Dom.isElement(t)&&e.s.isCollapsed()&&!o.Dom.isTag(t,new Set(["br","hr"]))&&(u=t),o.Dom.up(t,e=>{if(o.Dom.isHTMLElement(e)){let t=(0,n.css)(e,"color",!0),i=(0,n.css)(e,"background-color",!0);if(t)return s=t.toString(),!0;if(i)return l=i.toString(),!0}},e.editor)),d=[{name:"Background",content:(0,a.ColorPickerWidget)(e,t=>{u?c(u,"backgroundColor",t):e.execCommand("background",!1,t),(0,n.dataBind)(r,"color",t),(0,n.dataBind)(r,"color-mode","background"),i()},l)},{name:"Text",content:(0,a.ColorPickerWidget)(e,t=>{u?c(u,"color",t):e.execCommand("forecolor",!1,t),(0,n.dataBind)(r,"color",t),(0,n.dataBind)(r,"color-mode","color"),i()},s)}],"background"!==e.o.colorPickerDefaultTab&&(d=d.reverse()),(0,a.TabsWidget)(e,d,u)},exec(e,t,{button:i}){let r=(0,n.dataBind)(i,"color-mode"),s=(0,n.dataBind)(i,"color");if(!r)return!1;if(t&&t!==e.editor&&o.Dom.isNode(t)&&o.Dom.isElement(t))switch(r){case"color":c(t,"color",s);break;case"background":c(t,"backgroundColor",s)}else e.execCommand("background"===r?r:"forecolor",!1,s)},tooltip:"Fill color or set the text color"}},19063:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(41180),s=i(12153),a=i(6441),l=i(57487),c=i(23914);let d="copy-format",u=["lineHeight","fontWeight","fontStyle","fontSize","fontFamily","color","margin","padding","borderWidth","borderStyle","borderColor","borderRadius","backgroundColor","textDecorationLine"],h=(e,t,i,o)=>{let n=(0,r.css)(i,t);return n===o[t]&&(n=i.parentNode&&i!==e.editor&&i.parentNode!==e.editor?h(e,t,i.parentNode,o):void 0),n};a.Config.prototype.controls.copyformat={exec(e,t,{button:i}){if(t){if(e.buffer.exists(d))e.buffer.delete(d),e.e.off(e.editor,"mouseup."+d);else{let i,n={},s=o.Dom.up(t,e=>e&&!o.Dom.isText(e),e.editor)||e.editor,a=e.createInside.span();o.Dom.append(e.editor,a),u.forEach(e=>{n[e]=(0,r.css)(a,e)}),a!==e.editor&&o.Dom.safeRemove(a);let l=(i={},s&&u.forEach(t=>{i[t]=h(e,t,s,n),t.match(/border(Style|Color)/)&&!i.borderWidth&&(i[t]=void 0)}),i);e.e.on(e.editor,"mouseup."+d,()=>{e.buffer.delete(d);let t=e.s.current();t&&(o.Dom.isTag(t,"img")?(0,r.css)(t,l):e.s.commitStyle({attributes:{style:l}})),e.e.off(e.editor,"mouseup."+d)}),e.buffer.set(d,!0)}i.update()}},isActive:e=>e.buffer.exists(d),tooltip:"Paint format"},n.pluginSystem.add("copyformat",function(e){e.registerButton({name:"copyformat",group:"clipboard"}),(0,n.extendLang)(c)}),s.Icon.set("copyformat",l.default)},57487:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="14" height="6" rx="1"/><path d="M17 6h4v7H11v3"/><rect x="9" y="16" width="4" height="6" rx="1"/> </g> </svg> '},63819:function(e){"use strict";e.exports={"copy-format":"نسخ التنسيق"}},72392:function(e){"use strict";e.exports={"copy-format":"Kopírovat formát"}},74551:function(e){"use strict";e.exports={"copy-format":"Format kopierenт"}},2536:function(e){"use strict";e.exports={"copy-format":"Copiar formato"}},52285:function(e){"use strict";e.exports={"copy-format":"کپی کردن قالب"}},12117:function(e){"use strict";e.exports={"copy-format":"Kopioi muotoilu"}},35140:function(e){"use strict";e.exports={"copy-format":"Format de copie"}},28435:function(e){"use strict";e.exports={"copy-format":"העתק עיצוב"}},98019:function(e){"use strict";e.exports={"copy-format":"Formátum másolás"}},96457:function(e){"use strict";e.exports={"copy-format":"salin format"}},23914:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o},cs_cz:function(){return n},de:function(){return r},es:function(){return s},fa:function(){return a},fi:function(){return l},fr:function(){return c},he:function(){return d},hu:function(){return u},id:function(){return h},it:function(){return p},ja:function(){return f},ko:function(){return m},mn:function(){return g},nl:function(){return b},pl:function(){return v},pt_br:function(){return y},ru:function(){return w},tr:function(){return _},zh_cn:function(){return k},zh_tw:function(){return C}});var o=i(63819),n=i(72392),r=i(74551),s=i(2536),a=i(52285),l=i(12117),c=i(35140),d=i(28435),u=i(98019),h=i(96457),p=i(33561),f=i(96545),m=i(52230),g=i(33307),b=i(71042),v=i(32172),y=i(39179),w=i(60629),_=i(68278),k=i(1172),C=i(4164)},33561:function(e){"use strict";e.exports={"copy-format":"Copia il formato"}},96545:function(e){"use strict";e.exports={"copy-format":"copyformat"}},52230:function(e){"use strict";e.exports={"copy-format":"복사 형식"}},33307:function(e){"use strict";e.exports={"copy-format":"Формат хуулах"}},71042:function(e){"use strict";e.exports={"copy-format":"opmaak kopiëren"}},32172:function(e){"use strict";e.exports={"copy-format":"format kopii"}},39179:function(e){"use strict";e.exports={"copy-format":"Copiar formato"}},60629:function(e){"use strict";e.exports={"copy-format":"Копировать формат"}},68278:function(e){"use strict";e.exports={"copy-format":"Kopyalama Biçimi"}},1172:function(e){"use strict";e.exports={"copy-format":"复制格式"}},4164:function(e){"use strict";e.exports={"copy-format":"複製格式"}},66707:function(e,t,i){"use strict";var o=i(22732),n=i(580),r=i(21537),s=i(49055),a=i(50911);let l=new Set(["img","table","jodit","iframe","hr"]);class c extends a.Plugin{afterInit(e){e.e.on("afterCommand.delete",e=>{"delete"===e&&this.__afterDeleteCommand()}),e.registerCommand("delete",{exec:this.__onDeleteCommand.bind(this)},{stopPropagation:!1})}beforeDestruct(e){e.e.off("afterCommand.delete")}__afterDeleteCommand(){let e=this.j,t=e.s.current();if(t&&o.Dom.isTag(t.firstChild,"br")&&e.s.removeNode(t.firstChild),!(0,s.trim)(e.editor.textContent||"")&&!o.Dom.first(e.editor,e=>o.Dom.isTag(e,l))&&(!t||!o.Dom.closest(t,"table",e.editor))){o.Dom.detach(e.editor);let t=e.s.setCursorIn(e.editor);e.s.removeNode(t)}}__onDeleteCommand(){let{jodit:e}=this;if(e.s.isCollapsed())return;e.s.expandSelection();let t=e.s.range;t.deleteContents();let i=e.createInside.fake();t.insertNode(i);let n=o.Dom.findSibling(i,!0),r=o.Dom.findSibling(i,!1);return this.__moveContentInLeftSibling(i,n,r),t.setStartBefore(i),t.collapse(!0),this.__moveCursorInEditableSibling(e,n,i,t),this.__addBrInEmptyBlock(i,r,t),o.Dom.safeRemove(i),e.s.selectRange(t),!1}__moveContentInLeftSibling(e,t,i){t=this.__defineRightLeftBox(t),!o.Dom.isList(i)&&!o.Dom.isTag(i,"table")&&o.Dom.isBlock(i)&&o.Dom.isBlock(t)&&(o.Dom.append(t,e),o.Dom.moveContent(i,t),o.Dom.safeRemove(i)),o.Dom.isList(i)&&o.Dom.isLeaf(i.firstElementChild)&&o.Dom.isEmpty(i.firstElementChild)&&o.Dom.safeRemove(i.firstElementChild)}__defineRightLeftBox(e){if(!o.Dom.isList(e))return e;let t=e.lastElementChild;return o.Dom.isLeaf(t)||(t=this.j.createInside.element("li"),o.Dom.append(e,t)),t}__addBrInEmptyBlock(e,t,i){let n=this.j;if(e.isConnected&&o.Dom.isBlock(e.parentNode)&&!e.nextSibling&&!e.previousSibling){let t=n.createInside.element("br");o.Dom.after(e,t),i.setStartBefore(t),i.collapse(!0)}if(o.Dom.isTag(t,"table")){let e=(0,r.$$)("td,th",t).shift();o.Dom.isCell(e)&&o.Dom.isEmpty(e)&&o.Dom.append(e,n.createInside.element("br"))}}__moveCursorInEditableSibling(e,t,i,n){var r;if(!t||!o.Dom.isText(t)){let t=null!=(r=o.Dom.closest(i,o.Dom.isBlock,e.editor))?r:e.editor,s=o.Dom.prev(i,o.Dom.isText,t);s&&(n.setStartAfter(s),n.collapse(!0),o.Dom.safeRemove(i))}}}c.requires=["backspace"],n.pluginSystem.add("deleteCommand",c)},44586:function(e,t,i){"use strict";i(6441).Config.prototype.draggableTags=["img","jodit-media","jodit"]},1255:function(e,t,i){"use strict";var o,n,r=i(65478),s=i(22732),a=i(580),l=i(21537),c=i(50911);i(44586);var d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};(o=n||(n={}))[o.IDLE=0]="IDLE",o[o.WAIT_DRAGGING=1]="WAIT_DRAGGING",o[o.DRAGGING=2]="DRAGGING";class u extends c.Plugin{afterInit(){this.dragList=this.j.o.draggableTags?(0,l.splitArray)(this.j.o.draggableTags).filter(Boolean).map(e=>e.toLowerCase()):[],this.j.e.on("startDragElement",this.onStartDragElement),this.dragList.length&&this.j.e.on("mousedown dragstart",this.onDragStart)}onStartDragElement(e,t){this.isInDestruct||this.state>n.IDLE||!e||this.startDragging(e,t)}onDragStart(e){if("dragstart"===e.type&&this.draggable)return!1;if(this.state>n.IDLE)return;let t=e.target;if(!this.dragList.length||!t)return;let i=e=>!!(e&&this.dragList.includes(e.nodeName.toLowerCase())),o=s.Dom.furthest(t,i,this.j.editor)||(i(t)?t:null);o&&(s.Dom.isTag(o.parentElement,"a")&&o.parentElement.firstChild===o&&o.parentElement.lastChild===o&&(o=o.parentElement),this.startDragging(o,e))}startDragging(e,t){this.startX=t.clientX,this.startY=t.clientY,this.isCopyMode=(0,l.ctrlKey)(t),this.draggable=e.cloneNode(!0),(0,l.dataBind)(this.draggable,"target",e),this.state=n.WAIT_DRAGGING,this.addDragListeners()}onDrag(e){var t,i;if(!this.draggable||this.state===n.IDLE)return;let o=e.clientX,r=e.clientY;if(this.state===n.WAIT_DRAGGING&&Math.sqrt(Math.pow(o-this.startX,2)+Math.pow(r-this.startY,2))<this.diffStep)return;this.state===n.WAIT_DRAGGING&&(this.j.lock("drag-and-drop-element"),this.state=n.DRAGGING),this.j.e.fire("hidePopup hideResizer");let c=this.__ghostOffset();if(!this.draggable.parentNode){let o=(0,l.dataBind)(this.draggable,"target");(0,l.css)(this.draggable,{zIndex:1e13,pointerEvents:"none",pointer:"drag",position:"fixed",opacity:.7,display:"inline-block",left:e.clientX+c.left,top:e.clientY+c.top,width:null!=(t=null==o?void 0:o.offsetWidth)?t:100,height:null!=(i=null==o?void 0:o.offsetHeight)?i:100}),s.Dom.append((0,a.getContainer)(this.j,u),this.draggable)}(0,l.css)(this.draggable,{left:e.clientX+c.left,top:e.clientY+c.top}),this.j.s.insertCursorAtPoint(e.clientX,e.clientY)}__ghostOffset(){let e=this.j.iframe;if(!e)return{left:0,top:0};let t=e.getBoundingClientRect();return{left:t.left,top:t.top}}onDragEnd(){!this.isInDestruct&&(this.removeDragListeners(),this.j.unlock(),this.state=n.IDLE,this.draggable&&(s.Dom.safeRemove(this.draggable),this.draggable=null))}onDrop(){if(!this.draggable||this.state<n.DRAGGING)return void this.onDragEnd();let e=(0,l.dataBind)(this.draggable,"target");this.onDragEnd(),this.isCopyMode&&(e=e.cloneNode(!0));let{parentElement:t}=e;this.j.s.insertNode(e,!0,!1),[e.previousSibling,e.nextSibling].forEach(e=>{s.Dom.isEmptyTextNode(e)&&s.Dom.safeRemove(e)}),t&&s.Dom.isEmpty(t)&&!s.Dom.isCell(t)&&s.Dom.safeRemove(t),s.Dom.isTag(e,"img")&&this.j.e&&this.j.e.fire("afterInsertImage",e),this.j.e.fire("synchro")}addDragListeners(){this.j.e.on(this.j.editor,"mousemove",this.onDrag).on("mouseup",this.onDrop).on([this.j.ew,this.ow],"mouseup",this.onDragEnd)}removeDragListeners(){this.j.e.off(this.j.editor,"mousemove",this.onDrag).off("mouseup",this.onDrop).off([this.j.ew,this.ow],"mouseup",this.onDragEnd)}beforeDestruct(){this.onDragEnd(),this.j.e.off("mousedown dragstart",this.onDragStart).off("startDragElement",this.onStartDragElement),this.removeDragListeners()}constructor(){super(...arguments),this.dragList=[],this.draggable=null,this.isCopyMode=!1,this.diffStep=10,this.startX=0,this.startY=0,this.state=n.IDLE}}d([r.autobind],u.prototype,"onStartDragElement",null),d([r.autobind],u.prototype,"onDragStart",null),d([(0,r.throttle)(e=>e.defaultTimeout/10)],u.prototype,"onDrag",null),d([r.autobind],u.prototype,"onDragEnd",null),d([r.autobind],u.prototype,"onDrop",null),a.pluginSystem.add("dragAndDropElement",u)},19271:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(50911),c=i(8172),d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class u extends l.Plugin{afterInit(){this.j.e.on([window,this.j.ed,this.j.editor],"dragstart.DragAndDrop",this.onDragStart).on("drop.DragAndDrop",this.onDrop)}onDragStart(e){var t;let i=e.target;if(this.onDragEnd(),this.isFragmentFromEditor=r.Dom.isOrContains(this.j.editor,i,!0),this.isCopyMode=!this.isFragmentFromEditor||(0,a.ctrlKey)(e),this.isFragmentFromEditor){let e=this.j.s.sel,t=e&&e.rangeCount?e.getRangeAt(0):null;t&&(this.bufferRange=t.cloneRange())}else this.bufferRange=null;this.startDragPoint.x=e.clientX,this.startDragPoint.y=e.clientY,t=i,r.Dom.isElement(t)&&t.classList.contains(c.FileBrowserFiles.prototype.getFullElName("item"))&&(i=r.Dom.first(i,e=>r.Dom.isTag(e,"img"))),r.Dom.isTag(i,"img")&&(this.draggable=i.cloneNode(!0),(0,a.dataBind)(this.draggable,"target",i)),this.addDragListeners()}addDragListeners(){this.j.e.on("dragover",this.onDrag).on(window,"dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop",this.onDragEnd)}removeDragListeners(){this.j.e.off("dragover",this.onDrag).off(window,"dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop",this.onDragEnd)}onDrag(e){this.draggable&&(this.j.e.fire("hidePopup"),this.j.s.insertCursorAtPoint(e.clientX,e.clientY),e.preventDefault(),e.stopPropagation())}onDragEnd(){this.draggable&&(r.Dom.safeRemove(this.draggable),this.draggable=null),this.isCopyMode=!1,this.removeDragListeners()}onDrop(e){if(!e.dataTransfer||!e.dataTransfer.files||!e.dataTransfer.files.length){if(!this.isFragmentFromEditor&&!this.draggable)return this.j.e.fire("paste",e),e.preventDefault(),e.stopPropagation(),!1;let t=this.j.s.sel,i=this.bufferRange||(t&&t.rangeCount?t.getRangeAt(0):null),o=this.__getWorkFragment(i,e);t&&t.removeAllRanges(),this.j.s.insertCursorAtPoint(e.clientX,e.clientY),o&&this.__insertFragment.call(this,o,i),e.preventDefault(),e.stopPropagation()}this.isFragmentFromEditor=!1,this.removeDragListeners()}__getWorkFragment(e,t){let i=null;if(!this.draggable&&e)i=this.isCopyMode?e.cloneContents():e.extractContents();else if(this.draggable)if(this.isCopyMode){let[e,t]="1"===(0,a.attr)(this.draggable,"-is-file")?["a","href"]:["img","src"];i=this.j.createInside.element(e),(0,a.attr)(i,t,(0,a.attr)(this.draggable,"data-src")||(0,a.attr)(this.draggable,"src")||""),"a"===e&&(i.textContent=(0,a.attr)(i,t)||"")}else i=(0,a.dataBind)(this.draggable,"target");else if(this.getText(t)){let e=this.j.createInside.div();e.innerHTML=this.getText(t),this.j.e.fire("safeHTML",e),i=e.firstChild===e.lastChild&&e.firstChild?e.firstChild:e}return i}__insertFragment(e,t){this.j.s.insertNode(e,!1,!1),t&&e.firstChild&&e.lastChild&&(t.setStartBefore(e.firstChild),t.setEndAfter(e.lastChild),this.j.s.selectRange(t),this.j.e.fire("synchro")),r.Dom.isTag(e,"img")&&this.j.events&&this.j.e.fire("afterInsertImage",e)}beforeDestruct(){this.onDragEnd(),this.j.e.off(window,".DragAndDrop").off(".DragAndDrop").off([window,this.j.ed,this.j.editor],"dragstart.DragAndDrop",this.onDragStart)}constructor(){super(...arguments),this.isFragmentFromEditor=!1,this.isCopyMode=!1,this.startDragPoint={x:0,y:0},this.draggable=null,this.bufferRange=null,this.getText=e=>{let t=(0,a.getDataTransfer)(e);return t?t.getData(o.TEXT_HTML)||t.getData(o.TEXT_PLAIN):null}}}d([n.autobind],u.prototype,"onDragStart",null),d([(0,n.throttle)(e=>e.defaultTimeout/10)],u.prototype,"onDrag",null),d([n.autobind],u.prototype,"onDragEnd",null),d([n.autobind],u.prototype,"onDrop",null),s.pluginSystem.add("dragAndDrop",u)},46124:function(e,t,i){"use strict";i.r(t),i.d(t,{removeExtraBr:function(){return o.removeExtraBr}});var o=i(94870)},94870:function(e,t,i){"use strict";i.d(t,{removeExtraBr:function(){return r}});var o=i(2748);let n=new Set(["table","pre","blockquote","code"]);function r(e,t){if(!e.o.dtd.removeExtraBr||o.Dom.isTag(t,"br"))return;let i=o.Dom.furthest(t,o.Dom.isBlock,e.editor);if(i&&!o.Dom.isTag(i,n)){let i=o.Dom.isTag(t,"br")?t:o.Dom.findNotEmptySibling(t,!1);if(!o.Dom.isTag(i,"br")||o.Dom.findNotEmptySibling(i,!1))return;o.Dom.isOrContains(t,e.s.range.startContainer)||e.s.setCursorBefore(i),o.Dom.safeRemove(i)}}},78720:function(e,t,i){"use strict";i.d(t,{checkBlockNesting:function(){return n}});var o=i(2748);function n(e,t){var i,n;if(o.Dom.isFragment(t)&&(t=t.firstChild),e.o.dtd.checkBlockNesting&&o.Dom.isBlock(t)){let r=null,s=null!=(n=null==(i=e.s.current())?void 0:i.parentElement)?n:null;for(;s&&s!==e.editor;){if(o.Dom.isBlock(s)){let t=!r&&o.Dom.isTag(s,e.o.enter)&&o.Dom.isEmpty(s);if(e.o.dtd.blockLimits[s.nodeName.toLowerCase()]&&!t)break;r=s}s=s.parentElement}o.Dom.isLeaf(s)&&o.Dom.isList(t)&&o.Dom.isFragment(t.parentNode)&&!o.Dom.findNotEmptySibling(t,!1)&&(o.Dom.unwrap(t),r=s),r&&function(e,t){var i;let{s:n}=e;if(o.Dom.isEmpty(t)){n.setCursorAfter(t),o.Dom.safeRemove(t);return}n.cursorOnTheRight(t)?n.setCursorAfter(t):n.cursorOnTheLeft(t)?n.setCursorBefore(t):n.setCursorAfter(null!=(i=n.splitSelection(t))?i:t)}(e,r)}}},43267:function(e,t,i){"use strict";i.r(t),i.d(t,{checkBlockNesting:function(){return o.checkBlockNesting}});var o=i(78720)},9045:function(e,t,i){"use strict";i(6441).Config.prototype.dtd={removeExtraBr:!0,checkBlockNesting:!0,blockLimits:{article:1,aside:1,audio:1,body:1,caption:1,dd:1,details:1,dir:1,div:1,dl:1,dt:1,fieldset:1,figcaption:1,figure:1,footer:1,form:1,header:1,hgroup:1,li:1,main:1,menu:1,nav:1,ol:1,section:1,table:1,td:1,th:1,tr:1,ul:1,video:1}}},65735:function(e,t,i){"use strict";var o=i(37133),n=i(580),r=i(50911);i(9045);var s=i(46124),a=i(43267),l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class c extends r.Plugin{afterInit(e){}beforeDestruct(e){}__onBeforeInsertNode(e){Object.keys(a).forEach(t=>{a[t](this.j,e)})}__onAfterInsertNode(e){Object.keys(s).forEach(t=>{s[t](this.j,e)})}}l([(0,o.watch)(":beforeInsertNode")],c.prototype,"__onBeforeInsertNode",null),l([(0,o.watch)(":afterInsertNode")],c.prototype,"__onAfterInsertNode",null),n.pluginSystem.add("dtd",c)},575:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(87612),l=i(20356),c=i(35399);class d extends l.Plugin{afterInit(e){let t=e.o.enter.toLowerCase(),i=t===o.BR.toLowerCase();e.o.enterBlock||(e.o.enterBlock=i?o.PARAGRAPH:t),e.registerCommand("enter",(e,t,i={})=>this.onEnter(i))}onEnterKeyDown(e){if(e.key===o.KEY_ENTER){let t=this.j,i=t.e.fire("beforeEnter",e);return void 0!==i?i:(t.history.snapshot.transaction(()=>{t.s.isCollapsed()||t.execCommand("Delete"),t.s.focus(),this.onEnter(e),t.e.fire("afterEnter",e)}),t.synchronizeValues(),!1)}}onEnter(e){let{jodit:t}=this,i=t.createInside.fake();try{r.Dom.safeInsertNode(t.s.range,i),(0,c.moveCursorOutFromSpecialTags)(t,i,["a"]);let o=(0,c.getBlockWrapper)(i,t),n=r.Dom.isLeaf(o);if((!n||(null==e?void 0:e.shiftKey))&&(0,c.checkBR)(i,t,null==e?void 0:e.shiftKey,o))return!1;if(o||(0,c.hasPreviousBlock)(i,t)||(o=(0,c.wrapText)(i,t)),!o)return(0,c.insertParagraph)(i,t,n?"li":t.o.enter),!1;if(!(0,c.checkUnsplittableBox)(i,t,o))return!1;if(n&&this.__isEmptyListLeaf(o))return(0,c.processEmptyLILeaf)(i,t,o),!1;(0,c.splitFragment)(i,t,o)}finally{i.isConnected&&t.s.setCursorBefore(i),r.Dom.safeRemove(i)}}__isEmptyListLeaf(e){let t=this.j.e.fire("enterIsEmptyListLeaf",e);return(0,a.isBoolean)(t)?t:r.Dom.isEmpty(e)}beforeDestruct(e){e.e.off("keydown.enter")}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,n.watch)(":keydown.enter")],d.prototype,"onEnterKeyDown",null),s.pluginSystem.add("enter",d)},41872:function(e,t,i){"use strict";i.d(t,{checkBR:function(){return s}});var o=i(82758),n=i(2748),r=i(26395);function s(e,t,i,s){let l=!!n.Dom.closest(e,["pre","blockquote"],t.editor),c=!l&&(s?n.Dom.isCell(s):!!n.Dom.closest(e,["td","th"],t.editor));if(t.o.enter.toLowerCase()===o.BR.toLowerCase()||c||i&&!l||!i&&l){var d;let i;if(l&&(i=a(a(d=e)))&&(n.Dom.safeRemove(a(d)),n.Dom.safeRemove(i),1))return!1;let o=t.createInside.element("br");if(n.Dom.before(e,o),!n.Dom.findNotEmptySibling(o,!1)){let t=o.cloneNode();n.Dom.after(o,t),n.Dom.before(t,e)}return(0,r.scrollIntoViewIfNeeded)(o,t.editor,t.ed),!0}return!1}function a(e){if(!e)return!1;let t=n.Dom.findSibling(e,!0);return!!t&&!!n.Dom.isTag(t,"br")&&t}},61991:function(e,t,i){"use strict";i.d(t,{checkUnsplittableBox:function(){return n}});var o=i(2748);function n(e,t,i){return!!o.Dom.canSplitBlock(i)||(o.Dom.before(e,t.createInside.element("br")),!1)}},54041:function(e,t,i){"use strict";i.d(t,{getBlockWrapper:function(){return function e(t,i,r=o.IS_BLOCK){let s=t,a=i.editor;do{if(!s||s===a)break;if(r.test(s.nodeName)){if(n.Dom.isLeaf(s))return s;return e(s.parentNode,i,/^li$/i)||s}s=s.parentNode}while(s&&s!==a)return null}}});var o=i(82758),n=i(2748)},19057:function(e,t,i){"use strict";i.d(t,{hasPreviousBlock:function(){return n}});var o=i(2748);function n(e,t){return!!o.Dom.prev(e,e=>o.Dom.isBlock(e)||o.Dom.isImage(e),t.editor)}},35399:function(e,t,i){"use strict";i.d(t,{checkBR:function(){return o.checkBR},checkUnsplittableBox:function(){return n.checkUnsplittableBox},getBlockWrapper:function(){return r.getBlockWrapper},hasPreviousBlock:function(){return s.hasPreviousBlock},insertParagraph:function(){return a.insertParagraph},moveCursorOutFromSpecialTags:function(){return l.moveCursorOutFromSpecialTags},processEmptyLILeaf:function(){return c.processEmptyLILeaf},splitFragment:function(){return d.splitFragment},wrapText:function(){return u.wrapText}});var o=i(41872),n=i(61991),r=i(54041),s=i(19057),a=i(44245),l=i(91388),c=i(65181),d=i(54600),u=i(5287)},44245:function(e,t,i){"use strict";i.d(t,{insertParagraph:function(){return s}});var o=i(2748),n=i(29960),r=i(26395);function s(e,t,i,s){let a="br"===i.toLowerCase(),{createInside:l}=t,c=l.element(i),d=l.element("br");return a||o.Dom.append(c,d),s&&s.cssText&&(0,n.attr)(c,"style",s.cssText),o.Dom.after(e,c),o.Dom.before(a?c:d,e),(0,r.scrollIntoViewIfNeeded)(c,t.editor,t.ed),c}},91388:function(e,t,i){"use strict";i.d(t,{moveCursorOutFromSpecialTags:function(){return n}});var o=i(2748);function n(e,t,i){let{s:n}=e,r=o.Dom.closest(t,i,e.editor);if(r){if(n.cursorOnTheRight(r,t))o.Dom.after(r,t);else{if(!n.cursorOnTheLeft(r,t))return;o.Dom.before(r,t)}let e=n.createRange();e.setStartBefore(t),n.selectRange(e)}}},65181:function(e,t,i){"use strict";i.d(t,{processEmptyLILeaf:function(){return s}});var o=i(2748),n=i(76078),r=i(44245);function s(e,t,i){let s=o.Dom.closest(i,["ol","ul"],t.editor);if(!s)return;let a=s.parentElement,l=o.Dom.isLeaf(a),c=l?a:s,d=t.s.createRange();d.setStartAfter(i),d.setEndAfter(s);let u=d.extractContents();o.Dom.after(c,e),o.Dom.safeRemove(i),(0,n.$$)("li",s).length||o.Dom.safeRemove(s);let h=(0,r.insertParagraph)(e,t,l?"li":t.o.enter);o.Dom.first(u,e=>o.Dom.isTag(e,"li"))&&(l?o.Dom.append(h,u):o.Dom.after(h,u))}},54600:function(e,t,i){"use strict";i.d(t,{splitFragment:function(){return s}});var o=i(2748),n=i(26395),r=i(44245);function s(e,t,i){let s=t.s,{enter:a}=t.o,l=a.toLowerCase(),c=o.Dom.isLeaf(i),d=i.tagName.toLowerCase()===l||c,u=s.cursorOnTheRight(i,e),h=s.cursorOnTheLeft(i,e);if(!d&&(u||h)){u?o.Dom.after(i,e):o.Dom.before(i,e),(0,r.insertParagraph)(e,t,l),h&&!u&&o.Dom.prepend(i,e);return}let{scrollTop:p}=t.editor;s.splitSelection(i,e),t.editor.scrollTop!==p&&(t.editor.scrollTop=p),(0,n.scrollIntoViewIfNeeded)(i,t.editor,t.ed)}},5287:function(e,t,i){"use strict";i.d(t,{wrapText:function(){return n}});var o=i(2748);function n(e,t){let i=e;o.Dom.up(i,e=>{e&&e.hasChildNodes()&&e!==t.editor&&(i=e)},t.editor);let n=o.Dom.wrapInline(i,t.o.enter,t);if(o.Dom.isEmpty(n)){let i=t.createInside.element("br");o.Dom.append(n,i),o.Dom.before(i,e)}return n}},11317:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(29960),s=i(6441),a=i(92762);function l(e){var t;null==(t=e.files)||t.forEach(t=>{let i=this.createInside.element("a",{href:e.baseurl+t});i.textContent=this.o.uploader.getDisplayName.call(this.uploader,e.baseurl,t),this.s.insertNode(i)})}s.Config.prototype.file={defaultHandlerSuccess:l},s.Config.prototype.controls.file={popup(e,t,i){let n=(t,i="")=>{e.s.insertNode(e.createInside.fromHTML(`<a href="${t}" title="${i}">${i||t}</a>`))},s=null;return t&&(o.Dom.isTag(t,"a")||o.Dom.closest(t,"a",e.editor))&&(s=o.Dom.isTag(t,"a")?t:o.Dom.closest(t,"a",e.editor)),(0,a.FileSelectorWidget)(e,{filebrowser(e){e.files&&e.files.forEach(t=>n(e.baseurl+t)),i()},upload(t){var i,o;(null!=(o=null==(i=e.o.file)?void 0:i.defaultHandlerSuccess)?o:l).call(e,t)},url(e,t){s?((0,r.attr)(s,"href",e),(0,r.attr)(s,"title",t)):n(e,t),i()}},s,i,!1)},tags:["a"],tooltip:"Insert file"},n.pluginSystem.add("file",function(e){e.registerButton({name:"file",group:"media"})})},36243:function(e,t,i){"use strict";var o=i(82758),n=i(22732),r=i(580),s=i(6441);s.Config.prototype.autofocus=!1,s.Config.prototype.cursorAfterAutofocus="end",s.Config.prototype.saveSelectionOnBlur=!0,r.pluginSystem.add("focus",function(e){if(e.o.saveSelectionOnBlur){let t=!1;e.e.on("blur",()=>{t=!1,e.isEditorMode()&&e.s.save(!0)}).on("mousedown touchstart",()=>{t=!e.editorIsActive}).on("focus",()=>{e.isEditorMode()&&(t?e.s.removeMarkers():e.s.restore()),t=!1})}let t=()=>{e.s.focus();let t=null;switch(e.o.cursorAfterAutofocus){case"start":t=n.Dom.first(e.editor,e=>n.Dom.isText(e));break;case"end":t=n.Dom.last(e.editor,e=>n.Dom.isText(e))}t&&e.s.setCursorIn(t,"start"===e.o.cursorAfterAutofocus)};e.e.on("afterInit",()=>{e.o.autofocus&&(e.defaultTimeout?e.async.setTimeout(t,300):t())}),e.e.on("afterInit afterAddPlace",()=>{e.e.off(e.editor,"mousedown.autofocus").on(e.editor,"mousedown.autofocus",t=>{e.isEditorMode()&&t.target&&n.Dom.isBlock(t.target)&&!n.Dom.isTag(t.target,o.INSEPARABLE_TAGS)&&!t.target.childNodes.length&&(e.editor===t.target?e.s.focus():e.s.setCursorIn(t.target))})})})},28252:function(e,t,i){"use strict";var o=i(22732),n=i(68345),r=i(49055),s=i(41180),a=i(12153),l=i(6441),c=i(4104),d=i(83709),u=i(40222);l.Config.prototype.defaultFontSizePoints="px",l.Config.prototype.font={googleFonts:{url:""}},a.Icon.set("font",c.default).set("fontsize",d.default),l.Config.prototype.controls.fontsize={command:"fontsize",data:{cssRule:"font-size",normalize:e=>e.toString().replace(/(px|pt)$/i,"")},list:[8,9,10,11,12,14,16,18,24,30,32,34,36,48,60,72,96],textTemplate:(e,t)=>t+e.o.defaultFontSizePoints,childTemplate:(e,t,i)=>`${i}${e.o.defaultFontSizePoints}`,tooltip:"Font size",value(e,t){var i;let n=e.s.current();if(!n)return;let r=o.Dom.closest(n,o.Dom.isElement,e.editor);if(!r)return;let a=(null==(i=t.control.data)?void 0:i.cssRule)||"font-size",l=(0,s.css)(r,a);if("font-size"===a){let t=parseFloat(l.toString());return"pt"===e.o.defaultFontSizePoints?Math.round(.75*t).toString():Math.round(t).toString()}return l.toString()},isChildActive(e,t){var i,o;let n=t.state.value,r=null!=(o=null==(i=t.control.data)?void 0:i.normalize)?o:e=>e;return!!(n&&t.control.args&&r(t.control.args[0].toString())===r(n.toString()))},isActive(e,t){var i,o;let n=t.state.value;if(!n)return!1;let r=null!=(o=null==(i=t.control.data)?void 0:i.normalize)?o:e=>e,s=t.control.data.cacheListSet;return s||(s=new Set(Object.keys(t.control.list).map(r)),t.control.data.cacheListSet=s),s.has(r(n.toString()))}};let h=new WeakSet;l.Config.prototype.controls.font={...l.Config.prototype.controls.fontsize,command:"fontname",textTemplate(e,t){let[i]=t.split(",");return(0,r.trimChars)(i,"\"'")},list:{"":"Default","Arial, Helvetica, sans-serif":"Arial","'Courier New', Courier, monospace":"Courier New","Georgia, Palatino, serif":"Georgia","'Lucida Sans Unicode', 'Lucida Grande', sans-serif":"Lucida Sans Unicode","Tahoma, Geneva, sans-serif":"Tahoma","'Times New Roman', Times, serif":"Times New Roman","'Trebuchet MS', Helvetica, sans-serif":"Trebuchet MS","Helvetica, sans-serif":"Helvetica","Impact, Charcoal, sans-serif":"Impact","Verdana, Geneva, sans-serif":"Verdana"},childTemplate(e,t,i){let o=!1;try{o=-1===t.indexOf("dings")&&document.fonts.check("16px "+t,i)}catch(e){}return`<span data-style="${t}" style="${o?`font-family: ${t}!important;`:""}">${i}</span>`},popup:(e,t,i,o)=>!!e.o.font.googleFonts.url&&new u.UIFontPicker(e,o,i),data:{cssRule:"font-family",normalize:e=>e.toLowerCase().replace(/['"]+/g,"").replace(/[^a-z0-9-]+/g,",")},value(e,t){let i=e.s.current(),r=i&&o.Dom.closest(i,o.Dom.isElement,e.editor);if(r)h.add(t);else if(h.has(t))return;let a=(0,s.css)(r||e.editor,"font-family").toString(),{list:l}=t.control;return a===(0,s.css)(e.editor,"font-family").toString()&&((0,n.isArray)(l)?l.includes(""):""in(null!=l?l:{}))?"":a},tooltip:"Font family"}},40222:function(e,t,i){"use strict";i.d(t,{UIFontPicker:function(){return g}});var o=i(87325),n=i(37133),r=i(2748),s=i(580),a=i(68345),l=i(29960),c=i(41180),d=i(37790),u=i(48538),h=i(41870),p=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let f=["h1","h2","h3","h4","h5","h6"],m=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),g=class e extends u.UIElement{className(){return"UIFontPicker"}__render(){var e,t;let{control:i}=this.__button,{list:o={}}=i,n=(0,a.isArray)(o)?o.map(e=>({value:e.toString(),title:e.toString()})):(0,d.keys)(o,!1).map(e=>({value:e,title:o[e].toString()})),s=Array.from(this.__googleFonts.fonts.values(),e=>({value:this.__googleFonts.value(e),title:e.family,font:e})),l=new Map;[...s,...n].forEach(e=>l.set((0,h.firstFamily)(e.value),e));let c=new Map,u=new Map;this.__themeFonts().forEach(e=>{var t;let i=(0,h.firstFamily)(e),o=e.split(",")[0].replace(/["']/g,"").trim(),n=null!=(t=l.get(i))?t:!i||i.startsWith("-")||m.has(i)?void 0:{value:e,title:o};n&&!c.has(i)&&c.set(i,n)}),this.__usedFonts().forEach(e=>{let t=(0,h.firstFamily)(e),i=l.get(t);i&&!c.has(t)&&u.set(t,i)});let p=n.find(e=>""===e.value),f=(0,h.firstFamily)(null!=(t=null==(e=i.value)?void 0:e.call(i,this.j,this.__button))?t:"");r.Dom.detach(this.container),this.__fonts.clear(),p&&this.__append(f,[p]),this.__append(f,[...c.values()],"Theme fonts"),this.__append(f,[...u.values()],"Used fonts"),this.__append(f,n.filter(e=>e!==p),"System fonts"),this.__append(f,s,"Google Fonts"),this.__observeGoogleFonts()}__themeFonts(){let{editor:e}=this.j,t=[(0,c.css)(e,"font-family").toString()];return f.forEach(i=>{let o=this.j.createInside.element(i,{style:"display: none"});r.Dom.append(e,o),t.push((0,c.css)(o,"font-family").toString()),r.Dom.safeRemove(o)}),t}__usedFonts(){return Array.from(this.j.editor.querySelectorAll('[style*="font-family"]'),e=>e.style.fontFamily)}__append(e,t,i){if(!t.length)return;let{control:o}=this.__button,n=this.j.c.div(this.getFullElName("group"));if(i){let e=this.j.c.div(this.getFullElName("heading"),{id:`${this.getFullElName("heading")}-${(0,s.uniqueUid)()}`});e.textContent=this.i18n(i),(0,l.attr)(n,{role:"group","aria-labelledby":e.id}),r.Dom.append(n,e)}t.forEach(t=>{var i,s;let a=this.j.c.element("button",{type:"button",class:this.getFullElName("item"),"data-value":t.value,"aria-pressed":(0,h.firstFamily)(t.value)===e});t.font?(a.textContent=t.title,this.__fonts.set(a,t.font)):a.innerHTML=null!=(s=null==(i=o.childTemplate)?void 0:i.call(o,this.j,t.value,t.title,this.__button))?s:t.title,r.Dom.append(n,a)}),r.Dom.append(this.container,n)}__observeGoogleFonts(){this.j.async.requestAnimationFrame(()=>{var e;if(null==(e=this.__observer)||e.disconnect(),this.isDestructed||!this.__fonts.size)return;let t=new IntersectionObserver(e=>{let i=[];e.forEach(({isIntersecting:e,target:o})=>{let n=this.__fonts.get(o);e&&n&&(i.push(n),(0,c.css)(o,{fontFamily:this.__googleFonts.value(n)}),t.unobserve(o))}),this.__googleFonts.preview(i)},{root:this.container.parentElement,rootMargin:"0px 0px 400px 0px"});this.__fonts.forEach((e,i)=>t.observe(i)),this.__observer=t})}onMouseDown(e){e.preventDefault()}onClick(e){var t;let i=r.Dom.up(e.target,e=>r.Dom.isHTMLElement(e)&&e.hasAttribute("data-value"),this.container);if(!i)return;let o=null!=(t=(0,l.attr)(i,"data-value"))?t:"",n=this.__googleFonts.find(o),s=(0,h.firstFamily)(o)===(0,h.firstFamily)(this.__blockFont());n&&!s&&this.__googleFonts.load(n),this.j.execCommand("fontname",!1,s?"":o),this.__close()}__blockFont(){let e=r.Dom.up(this.j.s.current(),r.Dom.isBlock,this.j.editor);return(0,c.css)(null!=e?e:this.j.editor,"font-family").toString()}destruct(){var e;null==(e=this.__observer)||e.disconnect(),super.destruct()}constructor(e,t,i){super(e),this.__button=t,this.__close=i,this.__fonts=new Map,this.__observer=null,this.__googleFonts=e.getInstance(h.GoogleFonts),this.__render(),this.__googleFonts.fonts.size||this.__googleFonts.ready.then(()=>!this.isDestructed&&this.__render())}};p([(0,n.watch)("container:mousedown")],g.prototype,"onMouseDown",null),p([(0,n.watch)("container:click")],g.prototype,"onClick",null),g=p([o.component],g)},23399:function(e,t,i){"use strict";var o=i(580),n=i(21537);i(28252);var r=i(41870);o.pluginSystem.add("font",function(e){if(e.registerButton({name:"font",group:"font"}).registerButton({name:"fontsize",group:"font"}),e.o.font.googleFonts.url){let t=e.getInstance(r.GoogleFonts),i=e.async.debounce(()=>t.loadUsed(),e.defaultTimeout);t.ready.then(i),e.e.on("afterInit afterSetMode change",i)}e.e.on("afterInit",()=>{e.iframe&&e.e.on(e.ed,"load",()=>e.e.fire("updateToolbar"),{capture:!0})});let t=(t,i,o)=>{switch(t){case"fontsize":e.s.commitStyle({attributes:{style:{fontSize:(0,n.normalizeSize)(o,e.o.defaultFontSizePoints)}}});break;case"fontname":e.s.commitStyle({attributes:{style:{fontFamily:o}}})}return e.synchronizeValues(),!1};e.registerCommand("fontsize",t).registerCommand("fontname",t)})},41870:function(e,t,i){"use strict";i.d(t,{GoogleFonts:function(){return c},firstFamily:function(){return l}});var o=i(80480),n=i(2748),r=i(54079);let s={serif:"serif",monospace:"monospace"},a=new Map;function l(e){return e.split(",")[0].replace(/["']/g,"").trim().toLowerCase()}class c extends o.ViewComponent{className(){return"GoogleFonts"}find(e){return this.fonts.get(l(e))}value(e){var t;return`'${e.family}', ${null!=(t=s[e.category])?t:"sans-serif"}`}load(e){let t=this.__loadedInto(this.j.ed);if(t.has(e.family))return;t.add(e.family);let i=[["regular","0,400"],["700","0,700"],["italic","1,400"],["700italic","1,700"]].filter(([t])=>e.variants.includes(t)).map(([,e])=>e);this.__append(this.j.ed,`family=${this.__family(e)}:ital,wght@${i.join(";")}`)}loadUsed(){this.j.editor.querySelectorAll('[style*="font-family"]').forEach(e=>{let t=this.find(e.style.fontFamily);t&&this.load(t)})}preview(e){let t=this.__loadedInto(this.j.od);if(!(e=e.filter(e=>!this.__previewed.has(e.family)&&!t.has(e.family))).length)return;e.forEach(e=>this.__previewed.add(e.family));let i=e.map(e=>"family="+this.__family(e)),o=new Set(e.map(e=>e.family).join(""));this.__append(this.j.od,`${i.join("&")}&text=${encodeURIComponent([...o].join(""))}`)}__loadedInto(e){var t;let i=null!=(t=this.__loaded.get(e))?t:new Set;return this.__loaded.set(e,i),i}__family(e){return encodeURIComponent(e.family).replace(/%20/g,"+")}__append(e,t){let i=e.createElement("link");i.rel="stylesheet",i.href=`https://fonts.googleapis.com/css2?${t}&display=swap`,e.head.appendChild(i),this.__links.push(i)}destruct(){this.__links.forEach(e=>n.Dom.safeRemove(e)),super.destruct()}constructor(e){super(e),this.fonts=new Map,this.__links=[],this.__loaded=new WeakMap,this.__previewed=new Set,this.ready=(function(e,t){let i=a.get(t);if(!i){let o=new r.Ajax({url:t,method:"GET"},e.o.defaultAjaxOptions);i=o.send().then(e=>e.json()).then(({items:e})=>e.filter(e=>e.variants.includes("regular"))).catch(()=>(a.delete(t),[])).finally(()=>o.destruct()),a.set(t,i)}return i})(e,e.o.font.googleFonts.url).then(e=>{e.forEach(e=>this.fonts.set(e.family.toLowerCase(),e))})}}},4104:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m5 17 7-14 7 14M8 12h8M3 21h18"/> </g> </svg> '},83709:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2 5h9M6.5 5v15M4 20h5M19 4v16m-3-13 3-3 3 3m-6 10 3 3 3-3"/> </g> </svg> '},24630:function(e,t,i){"use strict";var o=i(2748),n=i(72430),r=i(12153),s=i(6441),a=i(89816);r.Icon.set("paragraph",a.default),s.Config.prototype.controls.paragraph={command:"formatBlock",value(e,t){var i,n;let r=t.control,s=e.s.current(),a=o.Dom.closest(s,o.Dom.isBlock,e.editor);return null!=(i=null==a?void 0:a.nodeName.toLowerCase())?i:null==(n=r.data)?void 0:n.currentValue},update(e,t){let i=t.control;if(!e.s.current())return!1;let o=t.state.value,r=i.list;return(0,n.isPlainObject)(r)&&r[o.toString()]&&e.o.textIcons&&(t.state.text=r[o.toString()].toString()),!1},data:{currentValue:"p"},list:{p:"Paragraph",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",blockquote:"Quote",pre:"Code"},isChildActive(e,t){var i,o;return t.state.value===(null==(o=null==(i=t.control)?void 0:i.args)?void 0:o[0])},isActive:(e,t)=>t.state.value!==e.o.enter&&(0,n.isPlainObject)(t.control.list)&&!!t.control.list[t.state.value],childTemplate:(e,t,i)=>`<${t} style="margin:0;padding:0"><span>${e.i18n(i)}</span></${t}>`,tooltip:"Insert format block"}},96111:function(e,t,i){"use strict";var o=i(580);i(24630),o.pluginSystem.add("formatBlock",function(e){e.registerButton({name:"paragraph",group:"font"}),e.registerCommand("formatblock",(t,i,o)=>(e.s.commitStyle({element:o}),e.synchronizeValues(),!1))})},89816:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M20 4H9a5 5 0 0 0 0 10h3M12 4v17M18 4v17"/> </g> </svg> '},99823:function(e,t,i){"use strict";var o=i(82758),n=i(12153),r=i(6441),s=i(6950),a=i(28911);r.Config.prototype.fullsize=!1,r.Config.prototype.globalFullSize=!0,n.Icon.set("fullsize",s.default).set("shrink",a.default),r.Config.prototype.controls.fullsize={exec(e){e.toggleFullSize()},update(e,t){let i=e.isFullSize?"shrink":"fullsize";t.state.activated=e.isFullSize,e.o.textIcons?t.state.text=i:t.state.icon.name=i},tooltip:"Open in fullsize",mode:o.MODE_SOURCE+o.MODE_WYSIWYG}},2169:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(19306),s=i(41180);i(99823);let a=new Set;n.pluginSystem.add("fullsize",function(e){e.registerButton({name:"fullsize"});let t=!1,i=0,n=0,l=0,c=0,d=!1,u=()=>{let{container:o,events:r}=e;r&&(t?(d||(i=(0,s.css)(o,"height",!0),n=(0,s.css)(o,"width",!0),d=!0),(0,s.css)(o,{height:e.ow.innerHeight,width:e.ow.innerWidth})):d&&((0,s.css)(o,{height:i||"auto",width:n||"auto"}),d=!1))},h=i=>{let{container:n,events:d}=e;if(n){if(void 0===i&&(i=!n.classList.contains("jodit_fullsize")),e.setMod("fullsize",i),e.o.fullsize=i,t=i,n.classList.toggle("jodit_fullsize",i),e.toolbar&&((0,r.isJoditObject)(e)&&e.toolbarContainer&&o.Dom.append(e.toolbarContainer,e.toolbar.container),(0,s.css)(e.toolbar.container,"width","auto")),i?a.add(n):a.delete(n),e.o.globalFullSize&&(1===a.size&&i||0===a.size&&!i)){i&&(l=e.ow.scrollX,c=e.ow.scrollY);let t=n.parentNode;for(;t&&t.nodeType!==Node.DOCUMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE;)t.classList.toggle("jodit_fullsize-box_true",i),t=t.parentNode;u(),i||e.ow.scrollTo(l,c)}d.fire("afterResize")}};e.o.globalFullSize&&e.e.on(e.ow,"resize",u),e.e.on("afterInit afterOpen",()=>{var t;e.toggleFullSize(null==(t=null==e?void 0:e.options)?void 0:t.fullsize)}).on("toggleFullSize",h).on("beforeDestruct",()=>{t&&h(!1)}).on("beforeDestruct",()=>{e.events&&e.e.off(e.ow,"resize",u)})})},6950:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M8 3H3v5m13-5h5v5M3 16v5h5m13-5v5h-5"/> </g> </svg> '},28911:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 8h5V3M8 8 3 3m13 0v5h5m-5 0 5-5M3 16h5v5m0-5-5 5m13 0v-5h5m-5 0 5 5"/> </g> </svg> '},78524:function(e,t,i){"use strict";i(6441).Config.prototype.commandToHotkeys={removeFormat:["ctrl+shift+m","cmd+shift+m"],insertOrderedList:["ctrl+shift+7","cmd+shift+7"],insertUnorderedList:["ctrl+shift+8","cmd+shift+8"],selectall:["ctrl+a","cmd+a"]}},42263:function(e,t,i){"use strict";var o=i(82758),n=i(580),r=i(21537),s=i(50911);i(78524);class a extends s.Plugin{afterInit(e){(0,r.keys)(e.o.commandToHotkeys,!1).forEach(t=>{let i=e.o.commandToHotkeys[t];i&&((0,r.isArray)(i)||(0,r.isString)(i))&&e.registerHotkeyToCommand(i,t)});let t=!1;e.e.off(".hotkeys").on([e.ow,e.ew],"keydown.hotkeys",e=>{if(e.key===o.KEY_ESC)return this.j.e.fire("escape",e)}).on("keydown.hotkeys",i=>{let o=this.onKeyPress(i),n={shouldStop:!0};if(!1===this.j.e.fire(o+".hotkey",i.type,n))if(n.shouldStop)return t=!0,e.e.stopPropagation("keydown"),!1;else i.preventDefault()},{top:!0}).on("keyup.hotkeys",()=>{if(t)return t=!1,e.e.stopPropagation("keyup"),!1},{top:!0})}beforeDestruct(e){e.events&&e.e.off(".hotkeys")}constructor(){super(...arguments),this.onKeyPress=e=>{let t=this.specialKeys[e.which],i=(e.key||String.fromCharCode(e.which)).toLowerCase(),o=[t||i];return["alt","ctrl","shift","meta"].forEach(i=>{e[i+"Key"]&&t!==i&&o.push(i)}),(0,r.normalizeKeyAliases)(o.join("+"))},this.specialKeys={8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",91:"meta",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}}}n.pluginSystem.add("hotkeys",a)},16233:function(e,t,i){"use strict";var o=i(22732),n=i(580),r=i(12153),s=i(6441),a=i(72337);r.Icon.set("hr",a.default),s.Config.prototype.controls.hr={command:"insertHorizontalRule",tags:["hr"],tooltip:"Insert Horizontal Line"},n.pluginSystem.add("hr",function(e){e.registerButton({name:"hr",group:"insert"}),e.registerCommand("insertHorizontalRule",()=>{var t;let i=e.createInside.element("hr");e.s.insertNode(i,!1,!1);let n=o.Dom.closest(i.parentElement,o.Dom.isBlock,e.editor);n&&o.Dom.isEmpty(n)&&n!==e.editor&&!(null==(t=e.o.dtd)?void 0:t.blockLimits[n.nodeName.toLowerCase()])&&(o.Dom.after(n,i),o.Dom.safeRemove(n));let r=o.Dom.findNotEmptySibling(i,!1);if(o.Dom.isBlock(r))return e.s.setCursorIn(r,!0),!1;if(r||i.parentNode!==e.editor&&!o.Dom.isBlock(o.Dom.findNotEmptySibling(i,!0)))return e.s.setCursorAfter(i),!1;let s=e.createInside.element(e.o.enter);return o.Dom.after(i,s),e.s.setCursorIn(s),!1})})},72337:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M4 12h16"/> </g> </svg> '},50963:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.iframeBaseUrl="",o.Config.prototype.iframeTitle="Jodit Editor",o.Config.prototype.iframeDoctype="<!DOCTYPE html>",o.Config.prototype.iframeDefaultSrc="about:blank",o.Config.prototype.iframeStyle='html{margin:0;padding:0;min-height: 100%;}body{box-sizing:border-box;font-size:13px;line-height:1.6;padding:10px;margin:0;background:transparent;color:#000;position:relative;z-index:2;user-select:auto;margin:0px;overflow:auto;outline:none;}table{width:100%;border:none;border-collapse:collapse;empty-cells: show;max-width: 100%;}th,td{padding: 2px 5px;border:1px solid #ccc;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}p{margin-top:0;}[data-jodit_iframe_wrapper]{display: block;user-select: none;position: relative;}[data-jodit_iframe_wrapper] iframe{position: relative;}[data-jodit_iframe_wrapper]:after {position:absolute;content:"";z-index:1;top:0;left:0;right: 0;bottom: 0;cursor: pointer;display: block;background: rgba(0, 0, 0, 0);} [data-jodit_iframe_wrapper][data-jodit-wrapper_active=true] iframe{z-index: 2;}.jodit-wysiwyg_image-selected::selection,.jodit-wysiwyg_image-selected *:not(img)::selection{background:transparent}.jodit_disabled{user-select: none;-o-user-select: none;-moz-user-select: none;-khtml-user-select: none;-webkit-user-select: none;-ms-user-select: none}',o.Config.prototype.iframeCSSLinks=[],o.Config.prototype.iframeSandbox=null},77469:function(e,t,i){"use strict";var o=i(82758),n=i(2748),r=i(580),s=i(21537);i(50963),r.pluginSystem.add("iframe",function(e){let t=e.options;e.e.on("afterSetMode",()=>{e.isEditorMode()&&e.s.focus()}).on("generateDocumentStructure.iframe",(e,i)=>{let o=e||i.iframe.contentWindow.document;if(o.open(),o.write(t.iframeDoctype+`<html dir="${t.direction}" class="jodit" lang="${(0,s.defaultLanguage)(t.language)}">`+"<head>"+`<title>${t.iframeTitle}</title>`+(t.iframeBaseUrl?`<base href="${t.iframeBaseUrl}"/>`:"")+'</head><body class="jodit-wysiwyg"></body></html>'),o.close(),t.iframeCSSLinks&&t.iframeCSSLinks.forEach(e=>{let t=o.createElement("link");(0,s.attr)(t,"rel","stylesheet"),(0,s.attr)(t,"href",e),o.head&&n.Dom.append(o.head,t)}),t.iframeStyle){let e=o.createElement("style");e.innerHTML=t.iframeStyle,o.head&&n.Dom.append(o.head,e)}}).on("createEditor",()=>{if(!t.iframe)return;let i=e.c.element("iframe");(0,s.css)(i,"display","block"),i.src="about:blank",i.className="jodit-wysiwyg_iframe",(0,s.attr)(i,{allowtransparency:"true",tabindex:t.tabIndex.toString(),frameborder:"0"}),null!=t.iframeSandbox&&(0,s.attr)(i,"sandbox",t.iframeSandbox),n.Dom.append(e.workplace,i),e.iframe=i;let r=e.e.fire("generateDocumentStructure.iframe",null,e);return(0,s.callPromise)(r,()=>{if(!e.iframe)return!1;let i=e.iframe.contentWindow.document;e.editorWindow=e.iframe.contentWindow;let n=t.editHTMLDocumentMode,r=()=>{(0,s.attr)(i.body,"contenteditable",e.getMode()!==o.MODE_SOURCE&&!e.getReadOnly()||null)},a=e=>{let t=/<body.*<\/body>/im,i="{%%BODY%%}",o=t.exec(e);return o&&(e=e.replace(t,i).replace(/<span([^>]*?)>(.*?)<\/span>/gim,"").replace(/<span([^&]*?)>(.*?)<\/span>/gim,"").replace(i,o[0].replace(/(<body[^>]+?)min-height["'\s]*:[\s"']*[0-9]+(px|%)/im,"$1").replace(/(<body[^>]+?)([\s]*["'])?contenteditable["'\s]*=[\s"']*true["']?/im,"$1").replace(/<(style|script|span)[^>]+jodit[^>]+>.*?<\/\1>/g,"")).replace(/(class\s*=\s*)(['"])([^"']*)(jodit-wysiwyg|jodit)([^"']*\2)/g,"$1$2$3$5").replace(/(<[^<]+?)\sclass="[\s]*"/gim,"$1").replace(/(<[^<]+?)\sstyle="[\s;]*"/gim,"$1").replace(/(<[^<]+?)\sdir="[\s]*"/gim,"$1")),e};if(n){let t=e.element.tagName;if("TEXTAREA"!==t&&"INPUT"!==t)throw(0,s.error)("If enable `editHTMLDocumentMode` - source element should be INPUT or TEXTAREA");e.e.on("beforeGetNativeEditorValue",()=>a(e.o.iframeDoctype+i.documentElement.outerHTML)).on("beforeSetNativeEditorValue",({value:t})=>{if(e.isLocked)return!1;if(/<(html|body)/i.test(t)){if(a(i.documentElement.outerHTML)!==a(t)){var o;let n;o=a(t),n=new DOMParser().parseFromString(o,"text/html"),e.e.fire("safeHTML",n.documentElement),i.replaceChild(i.adoptNode(n.documentElement),i.documentElement),e.editor=i.body,r(),e.e.fire("prepareWYSIWYGEditor"),e.e.stopPropagation("beforeSetNativeEditorValue")}return!0}return!1},{top:!0})}if(e.editor=i.body,e.e.on("afterSetMode afterInit afterAddPlace",r),"auto"===t.height){i.documentElement&&(0,s.css)(i.documentElement,"overflowY","hidden");let o=e.async.throttle((...i)=>{e.async.requestAnimationFrame(()=>{if(e.editor&&e.iframe&&"auto"===t.height){let t=e.ew.getComputedStyle(e.editor),i=parseInt(t.marginTop||"0",10)+parseInt(t.marginBottom||"0",10);(0,s.css)(e.iframe,"height",e.editor.offsetHeight+i)}})},e.defaultTimeout/2);if(e.e.on("change afterInit afterSetMode resize",o).on([e.iframe,e.ew,i.documentElement],"load",o).on(i,"readystatechange DOMContentLoaded",o),"function"==typeof ResizeObserver){let t=new ResizeObserver(o);t.observe(i.body),e.e.on("beforeDestruct",()=>{t.disconnect()})}}return i.documentElement&&e.e.on(i.documentElement,"mousedown touchend",()=>{e.s.isFocused()||(e.s.focus(),e.editor===i.body&&e.s.setCursorIn(i.body))}).on(e.ew,"mousedown touchstart keydown keyup touchend click mouseup mousemove scroll",t=>{var i;null==(i=e.events)||i.fire(e.ow,t)}),!1})})})},85745:function(e,t,i){"use strict";i(6441).Config.prototype.imageProcessor={replaceDataURIToBlobIdInView:!0}},80763:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(50911),c=i(74569);i(85745);var d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let u="__jodit_imageprocessor_binded",h=u+"blob-id",p="jodit-wysiwyg_image-selected";class f extends l.Plugin{afterInit(e){e.e.on(e.ed,"selectionchange",this.onSelectionChange)}beforeDestruct(e){e.e.off(e.ed,"selectionchange",this.onSelectionChange),e.editor.classList.remove(p);let t=(0,n.cached)(e,"buffer"),i=null==t?void 0:t.get(h);if(t&&i){for(let e of Object.keys(i))URL.revokeObjectURL(e);t.delete(h)}}onAfterGetValueFromEditor(e,t){if(t!==o.SOURCE_CONSUMER)return this.onBeforeSetElementValue(e)}onBeforeSetElementValue(e){let{jodit:t}=this;if(!t.o.imageProcessor.replaceDataURIToBlobIdInView)return;let i=t.buffer.get(h);if(i)for(let t of Object.keys(i))for(;e.value.includes(t);)e.value=e.value.replace(t,i[t])}onSelectionChange(){let{jodit:e}=this;e.editor.classList.toggle(p,function(e){let{sel:t}=e.s;if(!t||!t.rangeCount)return!1;let{startContainer:i,startOffset:o,endContainer:n,endOffset:s}=t.getRangeAt(0);return i===n&&s===o+1&&r.Dom.isTag(i.childNodes[o],"img")&&r.Dom.isOrContains(e.editor,i)}(e))}async afterChange(e){let{jodit:t}=this;t.editor&&(0,a.$$)("img",t.editor).forEach(e=>{(0,a.dataBind)(e,u)||((0,a.dataBind)(e,u,!0),e.complete||t.e.on(e,"load",function i(){var o;t.isInDestruct||null==(o=t.e)||o.fire("resize"),t.e.off(e,"load",i)}),e.src&&/^data:/.test(e.src)&&function(e,t){let i;if(!e.o.imageProcessor.replaceDataURIToBlobIdInView||"u"<typeof ArrayBuffer||"u"<typeof URL)return;let o=t.src;try{i=(0,c.dataURItoBlob)(o)}catch(e){return}t.src=URL.createObjectURL(i),e.e.fire("internalUpdate");let{buffer:n}=e,r=n.get(h)||{};r[t.src]=o,e.buffer.set(h,r)}(t,e),t.e.on(e,"mousedown touchstart",()=>{(function(e){var t;for(let i of["previousSibling","nextSibling"]){let n=e[i];for(;r.Dom.isText(n)&&!(null==(t=n.nodeValue)?void 0:t.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),""));){let e=n[i];r.Dom.safeRemove(n),n=e}}})(e),t.s.select(e)}))})}}d([(0,n.watch)(":afterGetValueFromEditor")],f.prototype,"onAfterGetValueFromEditor",null),d([(0,n.watch)(":beforeSetElementValue")],f.prototype,"onBeforeSetElementValue",null),d([n.autobind],f.prototype,"onSelectionChange",null),d([(0,n.watch)([":change",":afterInit",":changePlace"]),(0,n.debounce)()],f.prototype,"afterChange",null),s.pluginSystem.add("imageProcessor",f)},97536:function(e,t,i){"use strict";i(6441).Config.prototype.image={dialogWidth:600,openOnDblClick:!0,editSrc:!0,useImageEditor:!0,editTitle:!0,editAlt:!0,editLink:!0,editSize:!0,editBorderRadius:!0,editMargins:!0,editClass:!0,availableClasses:[],editStyle:!0,editId:!0,editAlign:!0,showPreview:!0,selectImageAfterClose:!0}},3215:function(e,t,i){"use strict";var o=i(65478),n=i(2748),r=i(580),s=i(21537),a=i(20356),l=i(62843);i(97536);var c=i(59436),d=i(53636),u=i(10263),h=i(94575),p=i(34755),f=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class m extends a.Plugin{get form(){return new c.UIImagePropertiesForm(this.j,this.state,this.activeTabState,{openImageEditor:()=>(0,d.openImageEditorDialog)(this.j,this.state),openImagePopup:e=>(0,u.openImagePopup)(this.j,this.dialog,this.state,e)})}get dialog(){let{j:e}=this,t=e.dlg({minWidth:Math.min(400,screen.width),minHeight:590,buttons:["fullsize","dialog.close"]}),i=this.__buttons;return i.check.onAction(()=>{(0,p.applyValuesToImage)(e,this.state,this.state.sourceImage),e.synchronizeValues(),t.close()}),i.remove.onAction(()=>{e.s.removeNode(this.state.sourceImage),t.close()}),i.cancel.onAction(()=>{t.close()}),t.setHeader(e.i18n("Image properties")),t.setContent(this.form),t.setFooter([[i.cancel,i.remove],i.check]),e.e.on(t,"afterClose",()=>{this.state.image.parentNode&&e.o.image.selectImageAfterClose&&e.s.select(this.state.sourceImage)}),t.setSize(e.o.image.dialogWidth),(0,s.markOwner)(e,t.container),t}get __buttons(){let{j:e}=this;return{check:(0,l.Button)(e,"ok","Apply","primary"),remove:(0,l.Button)(e,"bin","Delete"),cancel:(0,l.Button)(e,"cancel","Cancel")}}open(){return this.activeTabState.activeTab="Image",this.__lock(),this.dialog.open().setModal(!0).setPosition(),this.async.promise((e,t)=>(0,h.readValuesFromImage)(this.j,this.state).then(e,t)).catch(e=>{(0,s.isAbortError)(e)||this.dialog.message.error(e.message)}).finally(()=>this.__unlock()),!1}__lock(){this.dialog.lock(),this.form.setMod("lock",!0),Object.values(this.__buttons).forEach(e=>e.state.disabled=!0)}__unlock(){this.dialog.unlock(),this.form.setMod("lock",!1),Object.values(this.__buttons).forEach(e=>e.state.disabled=!1)}afterInit(e){let t=this;e.e.on("afterConstructor changePlace",()=>{e.e.off(e.editor,".imageproperties").on(e.editor,"dblclick.imageproperties",i=>{let o=i.target;if(n.Dom.isTag(o,"img"))if(e.o.image.openOnDblClick){if(!1===this.j.e.fire("openOnDblClick",o))return;t.state.sourceImage=o,t.state.image=o.cloneNode(!0),e.o.readonly||(i.stopImmediatePropagation(),i.preventDefault(),t.open())}else i.stopImmediatePropagation(),e.s.select(o)})}).on("openImageProperties.imageproperties",e=>{t.state.sourceImage=e,this.state.image=e.cloneNode(!0),this.open()})}async onStateValuesImageSrcChange(){let{image:e,values:t}=this.state;if(e.src)try{this.__lock();try{await e.decode()}catch(e){}if(this.state.sizeIsLocked&&(0,s.isNumeric)(t.imageWidth)){let e=parseFloat(t.imageWidth.toString());t.imageHeight=Math.round(e/this.state.ratio)}this.j.e.fire("updateImageProperties.imageproperties",e)}catch(e){this.j.alert(e.message)}finally{this.__unlock()}}beforeDestruct(e){var t,i,n;Object.values(null!=(t=(0,o.cached)(this,"__buttons"))?t:{}).forEach(e=>e.destruct()),null==(i=(0,o.cached)(this,"dialog"))||i.destruct(),null==(n=(0,o.cached)(this,"form"))||n.destruct(),e.e.off(e.editor,".imageproperties").off(".imageproperties")}constructor(){super(...arguments),this.state={image:new Image,sourceImage:new Image,get ratio(){let{naturalWidth:e,naturalHeight:t}=this.image;return e/t||1},sizeIsLocked:!0,marginIsLocked:!0,values:{style:"",imageSrc:"",borderRadius:0,imageTitle:"",imageAlt:"",imageLink:"",imageLinkOpenInNewTab:!1,imageWidth:0,imageHeight:0,marginTop:0,marginRight:0,marginBottom:0,marginLeft:0,classes:"",id:"",align:""}},this.activeTabState={activeTab:"Image"}}}f([o.cache],m.prototype,"form",null),f([o.cache],m.prototype,"dialog",null),f([o.cache],m.prototype,"__buttons",null),f([(0,o.watch)("state.image")],m.prototype,"onStateValuesImageSrcChange",null),r.pluginSystem.add("imageProperties",m)},51642:function(e,t,i){"use strict";i.d(t,{readAlign:function(){return n}});var o=i(25726);function n(e,t,i){let n=(0,o.getHAlign)(e,i);t.align="normal"===n?"":n}},94575:function(e,t,i){"use strict";i.d(t,{readValuesFromImage:function(){return d}});var o=i(25726),n=i(29960),r=i(41180),s=i(51642),a=i(75595),l=i(47749),c=i(32566);async function d(e,t){let{sourceImage:i,values:d}=t;return(0,s.readAlign)(i,d,(0,o.getAlignClasses)(e,i)),d.borderRadius=parseInt((0,r.cssInline)(i,"border-radius")||"0",10)||0,d.id=(0,n.attr)(i,"id")||"",d.imageTitle=(0,n.attr)(i,"title")||"",d.imageAlt=(0,n.attr)(i,"alt")||"",d.style=(0,n.attr)(i,"style")||"",d.classes=((0,n.attr)(i,"class")||"").replace(/jodit_focused_image[\s]*/,""),(0,l.readMargins)(i,d,t),(0,a.readLink)(t,e,d),d.imageSrc=(0,n.attr)(i,"src")||"",(0,c.readSizes)(i,d,t)}},75595:function(e,t,i){"use strict";i.d(t,{readLink:function(){return r}});var o=i(2748),n=i(29960);function r(e,t,i){let r=o.Dom.closest(e.sourceImage,"a",t.editor);r?(i.imageLink=(0,n.attr)(r,"href")||"",i.imageLinkOpenInNewTab="_blank"===(0,n.attr)(r,"target")):(i.imageLink="",i.imageLinkOpenInNewTab=!1)}},47749:function(e,t,i){"use strict";i.d(t,{readMargins:function(){return n}});var o=i(12475);function n(e,t,i){let n=!0,r=!1;["marginTop","marginRight","marginBottom","marginLeft"].forEach(i=>{let s=e.style.getPropertyValue((0,o.kebabCase)(i));if(!s){r=!0,t[i]=0;return}/^[0-9]+(px)?$/.test(s)&&(s=parseInt(s,10)),t[i]=s,(r&&t[i]||n&&"marginTop"!==i&&t[i]!==t.marginTop)&&(n=!1)}),i.marginIsLocked=n}},32566:function(e,t,i){"use strict";i.d(t,{readSizes:function(){return a}});var o=i(29807),n=i(29960),r=i(41180),s=i(14415);async function a(e,t,i){try{await e.decode()}catch(e){}let a=(0,r.css)(e,"width",!0)||(0,n.attr)(e,"width")||!1,l=(0,r.css)(e,"height",!0)||(0,n.attr)(e,"height")||!1;t.imageWidth=!1!==a?(0,s.normalSizeFromString)(a):e.offsetWidth||e.naturalWidth,(0,o.isNumeric)(t.imageWidth)?t.imageHeight=!1!==l?(0,s.normalSizeFromString)(l):e.offsetHeight||e.naturalHeight:t.imageHeight=l||"";let{imageWidth:c,imageHeight:d}=t,u=parseFloat(c.toString());if(!(0,o.isNumeric)(c)||!(0,o.isNumeric)(d)){i.sizeIsLocked=!1;return}if(!1===l){t.imageHeight=Math.round(u/i.ratio),i.sizeIsLocked=!0;return}i.sizeIsLocked=1>Math.abs(u-parseFloat(d.toString())*i.ratio)}},59436:function(e,t,i){"use strict";i.d(t,{UIImagePropertiesForm:function(){return p}});var o=i(65478),n=i(87325),r=i(2748),s=i(21537),a=i(62405),l=i(12153),c=i(92762),d=i(35105),u=i(29827),h=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let p=class e extends a.UIGroup{className(){return"UIImagePropertiesForm"}appendChildToContainer(){}getElm(e){let t=super.getElm(e);if(t)return t;for(let t of this.elements){let i=t.getElm(e);if(i)return i}return null}render(){return`<form>
|
|
145
145
|
<div class="jodit-grid jodit-grid_xs-column">
|
|
146
146
|
<div class="jodit_col-lg-2-5 jodit_col-xs-5-5">
|
|
147
147
|
<div class="&__view-box">
|
|
@@ -224,11 +224,11 @@
|
|
|
224
224
|
`,"outdent","indent","fontsize","brush","cut",`
|
|
225
225
|
`,"paragraph","link","align","dots"]}},61122:function(e,t,i){"use strict";var o=i(29960);t.default=[{name:"eye",tooltip:"Open link",exec(e,t){let i=(0,o.attr)(t,"href");t&&i&&/^(https?:|mailto:|tel:)/i.test(i.trim())&&!/^(javascript:|data:|vbscript:)/i.test(i.trim())&&e.ow.open(i)}},{name:"link",tooltip:"Edit link",icon:"pencil"},"unlink","brush","file"]},62e3:function(e,t,i){"use strict";var o=i(27613),n=i(41180);let r=e=>e.args&&(0,o.isString)(e.args[0])?e.args[0].toLowerCase():"";t.default=["brushCell",{name:"valign",list:["Top","Middle","Bottom","Normal"],childTemplate:(e,t,i)=>i,exec(e,t,{control:i}){let o=r(i);e.getInstance("Table",e.o).getAllSelectedCells().forEach(e=>{(0,n.css)(e,"vertical-align","normal"===o?"":o)})},tooltip:"Vertical align"},{name:"splitv",list:{tablesplitv:"Split vertical",tablesplitg:"Split horizontal"},tooltip:"Split"},{name:"align",icon:"left"},`
|
|
226
226
|
`,{name:"merge",command:"tablemerge",tooltip:"Merge"},{name:"addcolumn",list:{tableaddcolumnbefore:"Insert column before",tableaddcolumnafter:"Insert column after"},exec(e,t,{control:i}){if(!(0,o.isJoditObject)(e))return;if(!i.args)return!1;let n=r(i);e.execCommand(n,!1,t)},tooltip:"Add column"},{name:"addrow",list:{tableaddrowbefore:"Insert row above",tableaddrowafter:"Insert row below"},exec(e,t,{control:i}){if(!(0,o.isJoditObject)(e))return;if(!i.args)return!1;let n=r(i);e.execCommand(n,!1,t)},tooltip:"Add row"},{name:"deleteTable",icon:"bin",list:{tablebin:"Delete table",tablebinrow:"Delete row",tablebincolumn:"Delete column",tableempty:"Empty cell"},exec(e,t,{control:i}){if(!(0,o.isJoditObject)(e))return;if(!i.args)return!1;let n=r(i);e.execCommand(n,!1,t),e.e.fire("hidePopup")},tooltip:"Delete"}]},66789:function(e,t,i){"use strict";var o=i(20882);t.default=[{name:"bin",tooltip:"Delete",exec(e,t){t&&e.s.removeNode(t)}},o.align]},20882:function(e,t,i){"use strict";var o=i(22732),n=i(70799),r=i(25726),s=i(41180),a=i(61477);let l=(e,t)=>t?(0,r.getHAlign)(t,(0,r.getAlignClasses)(e,t)):"normal",c={name:"left",childTemplate:(e,t,i)=>i,list:["Left","Right","Center","Normal"],update(e,t){let i=l(e,t.target);t.state.icon.name="normal"===i?((e,t)=>{let i=t&&o.Dom.closest(t,o.Dom.isBlock,e.editor)||e.editor,n="rtl"===(0,s.css)(i,"direction");switch((0,s.css)(i,"text-align")){case"center":case"-webkit-center":return"center";case"justify":return"justify";case"right":return"right";case"end":return n?"left":"right";case"start":return n?"right":"left";default:return"left"}})(e,t.target):i},isActive:(e,t)=>"normal"!==l(e,t.target),isChildActive(e,t){var i;let[o]=null!=(i=t.control.args)?i:[];return(0,n.isString)(o)&&l(e,t.target)===o.toLowerCase()},exec(e,t,{control:i}){if(!o.Dom.isHTMLElement(t)||!o.Dom.isTag(t,new Set(["img","jodit","jodit-media"]))&&(0,a.getMediaWrapper)(e,t)!==t)return;let s=i.args&&(0,n.isString)(i.args[0])?i.args[0].toLowerCase():"";if(!s)return!1;if((0,r.hAlignElement)(t,s,(0,r.getAlignClasses)(e,t)),o.Dom.isTag(t,new Set(["jodit","jodit-media"]))&&t.firstElementChild){let i=t.firstElementChild;(0,r.hAlignElement)(i,s,(0,r.getAlignClasses)(e,i))}e.synchronizeValues(),e.e.fire("recalcPositionPopup")},tooltip:"Horizontal align"};t.default=[{name:"delete",icon:"bin",tooltip:"Delete",exec(e,t){t&&e.s.removeNode(t)}},{name:"pencil",exec(e,t){"img"===t.tagName.toLowerCase()&&e.e.fire("openImageProperties",t)},tooltip:"Edit"},{name:"valign",list:["Top","Middle","Bottom","Normal"],tooltip:"Vertical align",isDisabled(e,t){let i=t.target;return!!(i&&(["left","right"].includes((0,s.css)(i,"float"))||"block"===(0,s.css)(i,"display")))},exec(e,t,{control:i}){if(!o.Dom.isTag(t,"img"))return;let r=i.args&&(0,n.isString)(i.args[0])?i.args[0].toLowerCase():"";if(!r)return!1;(0,s.css)(t,"vertical-align","normal"===r?"":r),e.e.fire("recalcPositionPopup")}},c],i.d(t,["align",0,c])},14306:function(e,t){"use strict";t.default=["bold","italic","|","ul","ol","eraser","|","fontsize","brush","paragraph","---","image","table",`
|
|
227
|
-
`,"link","|","align","|","undo","redo","|","copyformat","fullsize","---","dots"]},24231:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="7" height="18" rx="1"/><path d="M3 12h7M14 12h7m-3.5-3.5v7"/> </g> </svg> '},75393:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="7" rx="1"/><path d="M12 3v7M12 14v7m-3.5-3.5h7"/> </g> </svg> '},14862:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2.5" y="4" width="19" height="16" rx="1.5"/><path d="M12 4v2m0 12v2M3 12h6m-2.5-2.5L9 12l-2.5 2.5M21 12h-6m2.5-2.5L15 12l2.5 2.5" stroke-width="2"/> </g> </svg> '},96257:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 12h18"/> </g> </svg> '},9914:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2"/><path d="M12 3v18"/> </g> </svg> '},33489:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M9.3333 5.3333h12M9.3333 12h12M9.3333 18.6667h12" stroke-width="2.6667" stroke-linecap="butt"/><path d="M4 5.3333h0M4 12h0M4 18.6667h0" stroke-width="3.2"/> </g> </svg> '},53696:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/> </g> </svg> '},93401:function(e,t,i){"use strict";var o=i(65478),n=i(22732),r=i(580),s=i(21537),a=i(50911),l=i(67510),c=i(61259),d=i(21491);i(24526);var u=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class h extends a.Plugin{get popup(){return new c.Popup(this.jodit,!1)}get toolbar(){return(0,d.makeCollection)(this.jodit,this.popup)}onClick(e){let t=this.elmsList,i=(0,s.getMediaWrapper)(this.j,e),o=null!=i?i:n.Dom.isTag(e,"img")?e:n.Dom.closest(e,t,this.j.editor),r=i?"jodit-media":null==o?void 0:o.nodeName.toLowerCase();if(o&&r&&this.canShowPopupForType(r))return this.showPopup(()=>(0,s.position)(o,this.j),r,
|
|
228
|
-
`!==i&&!t.includes(i)})}}).on("hidePopup",this.hidePopup).on("showInlineToolbar",this.showInlineToolbar).on("showPopup",(e,t,i)=>{this.showPopup(t,i||((0,s.isString)(e)?e:e.nodeName),(0,s.isString)(e)?void 0:e)}).on("mousedown keydown",this.onSelectionStart).on("change",()=>{this.popup.isOpened&&this.previousTarget&&!this.previousTarget.parentNode&&(this.hidePopup(),this.previousTarget=void 0)}).on([this.j.ew,this.j.ow],"mouseup keyup",this.onSelectionEnd).on([this.j.ew,this.j.ow],"mousedown touchstart",this.__onDocumentMouseDown).on("closeAllPopups",this.__onCloseAllPopups),this.addListenersForElements()}__onDocumentMouseDown(e){this.popup.isOpened&&"selection"===this.type&&e.target&&l.UIElement.closestElement(e.target,c.Popup)&&(this.__reopenSelectionPopup=!0)}__onCloseAllPopups(){!this.__reopenSelectionPopup||(this.__reopenSelectionPopup=!1,this.j.o.toolbarInlineForSelection&&this.j.async.setTimeout(()=>{let e=this.j.s.sel;e&&!e.isCollapsed&&this.showPopup(()=>this.__selectionBound(),"selection")},1))}__selectionBound(){let e=this.j.s.range.getBoundingClientRect(),{left:t,top:i}=e;if(this.j.iframe){let e=(0,s.position)(this.j.iframe,this.j,!0);t+=e.left,i+=e.top}return{left:t,top:i,width:e.width,height:e.height}}onSelectionStart(){this.snapRange=this.j.s.range.cloneRange()}onSelectionEnd(e){if(e&&e.target&&l.UIElement.closestElement(e.target,c.Popup))return;let{snapRange:t}=this,{range:i}=this.j.s;(!t||i.collapsed||i.startContainer!==t.startContainer||i.startOffset!==t.startOffset||i.endContainer!==t.endContainer||i.endOffset!==t.endOffset)&&this.onSelectionChange()}onSelectionChange(){if(!this.j.o.toolbarInlineForSelection)return;let e="selection",t=this.j.s.sel,i=this.j.s.range;if((null==t?void 0:t.isCollapsed)||this.isSelectedTarget(i)){this.type===e&&this.popup.isOpened&&this.hidePopup();return}this.j.s.current()&&this.showPopup(()=>this.__selectionBound(),e)}isSelectedTarget(e){let t=e.startContainer;return n.Dom.isElement(t)&&t===e.endContainer&&n.Dom.isTag(t.childNodes[e.startOffset],new Set((0,s.keys)(this.j.o.popup,!1)))&&e.startOffset===e.endOffset-1}beforeDestruct(e){e.e.off("showPopup").off([this.j.ew,this.j.ow],"mouseup keyup",this.onSelectionEnd).off([this.j.ew,this.j.ow],"mousedown touchstart",this.__onDocumentMouseDown).off("closeAllPopups",this.__onCloseAllPopups),this.removeListenersForElements()}_eventsList(){var e;let t=Object.values(null!=(e=this.j.o.mediaWrappers)?e:{}).map(({tag:e})=>e.toLowerCase()),i=[...new Set(this.elmsList.concat(t))];return i.map(e=>(0,s.camelCase)("click_"+e)).concat(i.map(e=>(0,s.camelCase)("touchstart_"+e))).join(" ")}addListenersForElements(){this.j.e.on(this._eventsList(),this.onClick)}removeListenersForElements(){this.j.e.off(this._eventsList(),this.onClick)}showInlineToolbar(e){this.showPopup(()=>{if(e)return e;let{range:t}=this.j.s;return t.getBoundingClientRect()},"toolbar")}constructor(){super(...arguments),this.type=null,this.__reopenSelectionPopup=!1,this.snapRange=null,this.elmsList=(0,s.keys)(this.j.o.popup,!1).filter(e=>!this.isExcludedTarget(e))}}h.requires=["select"],u([o.cache],h.prototype,"popup",null),u([o.cache],h.prototype,"toolbar",null),u([o.autobind],h.prototype,"onClick",null),u([(0,o.wait)(e=>!e.j.isLocked)],h.prototype,"showPopup",null),u([(0,o.watch)([":clickEditor",":beforeCommandDelete",":backSpaceAfterDelete"]),o.autobind],h.prototype,"hidePopup",null),u([(0,o.watch)(":outsideClick")],h.prototype,"onOutsideClick",null),u([o.autobind],h.prototype,"__onDocumentMouseDown",null),u([o.autobind],h.prototype,"__onCloseAllPopups",null),u([o.autobind],h.prototype,"onSelectionStart",null),u([o.autobind],h.prototype,"onSelectionEnd",null),u([(0,o.debounce)(e=>e.defaultTimeout)],h.prototype,"onSelectionChange",null),u([o.autobind],h.prototype,"showInlineToolbar",null),r.pluginSystem.add("inlinePopup",h)},76295:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(21537),s=i(25726),a=i(41180),l=i(12153),c=i(6441),d=i(5567);l.Icon.set("justify",d.default),c.Config.prototype.controls.align={name:"left",tooltip:"Align",update(e,t){let i=t.control,n=e.s.current();if(n){let s=o.Dom.closest(n,o.Dom.isBlock,e.editor)||e.editor,l=(0,a.css)(s,"text-align").toString();i.defaultValue&&-1!==i.defaultValue.indexOf(l)&&(l="left");let{list:c,data:d}=i;d&&d.currentValue!==l&&c&&((0,r.isPlainObject)(c)?c[l]:c.includes(l))&&(e.o.textIcons||"select"===i.component?t.state.text=l:t.state.icon.name=l,d.currentValue=l)}},isActive(e,t){let i=e.s.current();if(!i||!t.control.defaultValue)return!1;let n=o.Dom.closest(i,o.Dom.isBlock,e.editor)||e.editor;return -1===t.control.defaultValue.indexOf((0,a.css)(n,"text-align").toString())},defaultValue:["left","start","inherit"],data:{currentValue:"left"},list:["center","left","right","justify"]},c.Config.prototype.controls.center={command:"justifyCenter",css:{"text-align":"center"},tooltip:"Align Center"},c.Config.prototype.controls.justify={command:"justifyFull",css:{"text-align":"justify"},tooltip:"Align Justify"},c.Config.prototype.controls.left={command:"justifyLeft",css:{"text-align":"left"},tooltip:"Align Left"},c.Config.prototype.controls.right={command:"justifyRight",css:{"text-align":"right"},tooltip:"Align Right"},n.pluginSystem.add("justify",function(e){e.registerButton({name:"align",group:"indent"});let t=t=>(e.s.focus(),e.s.eachSelection(i=>{if(!i)return;let n=o.Dom.up(i,o.Dom.isBlock,e.editor);n||(n=o.Dom.wrapInline(i,e.o.enterBlock,e)),(0,s.alignElement)(t,n)}),!1);e.registerCommand("justifyfull",t),e.registerCommand("justifyright",t),e.registerCommand("justifyleft",t),e.registerCommand("justifycenter",t)})},5567:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2.6667 5.3333h18.6666M2.6667 12h18.6666M2.6667 18.6667h18.6666" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg> '},59483:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(50911);class l extends a.Plugin{afterInit(e){}beforeDestruct(e){}onKeyDownArrow(e){var t;if(e.key!==o.KEY_RIGHT||!this.j.selection.isCollapsed())return;let{endContainer:i,endOffset:n}=this.j.selection.range;if(r.Dom.isText(i)&&(null==(t=i.nodeValue)?void 0:t.length)===n){let{parentNode:e}=i;r.Dom.isInlineBlock(e)&&!r.Dom.findNotEmptyNeighbor(e,!1,this.j.editor)&&r.Dom.after(e,this.j.createInside.text(o.NBSP_SPACE))}}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,n.watch)(":keydown")],l.prototype,"onKeyDownArrow",null),s.pluginSystem.add("keyArrowOutside",l)},57288:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.limitWords=!1,o.Config.prototype.limitChars=!1,o.Config.prototype.limitHTML=!1},91071:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(580),s=i(50911);i(57288);var a=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class l extends s.Plugin{afterInit(e){let{limitWords:t,limitChars:i}=e.o;if(e&&(t||i)){let t=null;e.e.off(".limit").on("beforePaste.limit",()=>{t=e.history.snapshot.make()}).on("keydown.limit keyup.limit beforeEnter.limit",this.checkPreventKeyPressOrPaste).on("change.limit",this.checkPreventChanging).on("afterPaste.limit",()=>{if(this.__shouldDenyInput(!0)&&t)return e.history.snapshot.restore(t),e.e.fire("denyPaste.limit"),!1})}}shouldPreventInsertHTML(e){return!(e&&(o.COMMAND_KEYS.includes(e.key)||e.ctrlKey||e.metaKey))&&this.__shouldDenyInput(!1)}__shouldDenyInput(e){var t;let{jodit:i}=this,{limitWords:n,limitChars:r}=i.o,s=i.o.limitHTML?i.value:i.text,a=this.__splitWords(s);if(n&&(t=a.length,e?t>n:t>=n))return i.e.fire("denyWords.limit limit.limit"),!0;let l=i.o.countTextSpaces?s.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),"").replace(/[\r\n]/g,"").length:a.join("").length,c=!!(r&&(e?l>r:l>=r));return c&&i.e.fire("denyChars.limit limit.limit"),c}checkPreventKeyPressOrPaste(e){if(this.shouldPreventInsertHTML(e))return!1}checkPreventChanging(e,t){let{jodit:i}=this;this.__shouldDenyInput(!0)&&(i.value=t)}__splitWords(e){return e.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),"").split((0,o.SPACE_REG_EXP)()).filter(e=>e.length)}beforeDestruct(e){e.e.off(".limit")}}a([n.autobind],l.prototype,"checkPreventKeyPressOrPaste",null),a([n.autobind],l.prototype,"checkPreventChanging",null),r.pluginSystem.add("limit",l)},26295:function(e,t,i){"use strict";var o=i(21537),n=i(12153),r=i(6441),s=i(53259);r.Config.prototype.defaultLineHeight=null,n.Icon.set("line-height",s.default),r.Config.prototype.controls.lineHeight={command:"applyLineHeight",tags:["ol"],tooltip:"Line height",list:[1,1.1,1.2,1.3,1.4,1.5,2],exec:(e,t,{control:i})=>(0,o.memorizeExec)(e,t,{control:i},e=>e)}},80084:function(e){"use strict";e.exports={"Line height":"ارتفاع الخط"}},76725:function(e){"use strict";e.exports={"Line height":"Výška čáry"}},71724:function(e){"use strict";e.exports={"Line height":"Zeilenhöhe"}},46295:function(e){"use strict";e.exports={"Line height":"Altura de la línea"}},70190:function(e){"use strict";e.exports={"Line height":"ارتفاع خط"}},67206:function(e){"use strict";e.exports={"Line height":"Rivin korkeus"}},85723:function(e){"use strict";e.exports={"Line height":"Hauteur de ligne"}},61072:function(e){"use strict";e.exports={"Line height":"גובה שורה"}},30592:function(e){"use strict";e.exports={"Line height":"Vonal magassága"}},89194:function(e){"use strict";e.exports={"Line height":"Tinggi baris"}},28143:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o||(o=i.t(I,2))},cs_cz:function(){return n||(n=i.t(E,2))},de:function(){return r||(r=i.t(T,2))},es:function(){return s||(s=i.t(j,2))},fa:function(){return a||(a=i.t(D,2))},fi:function(){return l||(l=i.t(A,2))},fr:function(){return c||(c=i.t(P,2))},he:function(){return d||(d=i.t(M,2))},hu:function(){return u||(u=i.t(L,2))},id:function(){return h||(h=i.t(R,2))},it:function(){return p||(p=i.t(z,2))},ja:function(){return f||(f=i.t(B,2))},ko:function(){return m||(m=i.t(N,2))},mn:function(){return g||(g=i.t(F,2))},nl:function(){return b||(b=i.t(O,2))},pl:function(){return v||(v=i.t(H,2))},pt_br:function(){return y||(y=i.t(U,2))},ru:function(){return w||(w=i.t(V,2))},sk:function(){return _||(_=i.t(W,2))},tr:function(){return k||(k=i.t($,2))},ua:function(){return C||(C=i.t(K,2))},zh_cn:function(){return S||(S=i.t(G,2))},zh_tw:function(){return x||(x=i.t(Y,2))}});var o,n,r,s,a,l,c,d,u,h,p,f,m,g,b,v,y,w,_,k,C,S,x,I=i(80084),E=i(76725),T=i(71724),j=i(46295),D=i(70190),A=i(67206),P=i(85723),M=i(61072),L=i(30592),R=i(89194),z=i(51834),B=i(5082),N=i(80105),F=i(26556),O=i(98689),H=i(42727),U=i(43646),V=i(53822),W=i(70717),$=i(41817),K=i(69625),G=i(28973),Y=i(19033)},51834:function(e){"use strict";e.exports={"Line height":"Altezza linea"}},5082:function(e){"use strict";e.exports={"Line height":"ラインの高さ"}},80105:function(e){"use strict";e.exports={"Line height":"선 높이"}},26556:function(e){"use strict";e.exports={"Line height":"Зураасны өндөр"}},98689:function(e){"use strict";e.exports={"Line height":"Lijnhoogte"}},42727:function(e){"use strict";e.exports={"Line height":"Wysokość linii"}},43646:function(e){"use strict";e.exports={"Line height":"Altura da linha"}},53822:function(e){"use strict";e.exports={"Line height":"Высота линии"}},70717:function(e){"use strict";e.exports={"Line height":"Výška riadku"}},41817:function(e){"use strict";e.exports={"Line height":"Çizgi yüksekliği"}},69625:function(e){"use strict";e.exports={"Line height":"Висота лінії"}},28973:function(e){"use strict";e.exports={"Line height":"线高"}},19033:function(e){"use strict";e.exports={"Line height":"行高"}},61019:function(e,t,i){"use strict";var o=i(65478),n=i(2748),r=i(580),s=i(21537),a=i(50911);i(26295);var l=i(28143);class c extends a.Plugin{afterInit(e){(0,s.css)(e.editor,{lineHeight:e.o.defaultLineHeight}),e.registerCommand("applyLineHeight",this.applyLineHeight)}applyLineHeight(e,t,i){let o,{s:r,createInside:a,editor:l,o:c}=this.j;r.isFocused()||r.focus(),r.save();let d=e=>{let t=n.Dom.closest(e,n.Dom.isBlock,l);t||(t=n.Dom.wrap(e,c.enter,a));let r=(0,s.css)(t,"lineHeight");void 0===o&&(o=r.toString()!==i.toString()),(0,s.css)(t,"lineHeight",o?i:null)};try{if(r.isCollapsed()){let e=a.fake();n.Dom.safeInsertNode(r.range,e),d(e),n.Dom.safeRemove(e)}else r.eachSelection(d)}finally{r.restore()}}beforeDestruct(e){(0,s.css)(e.editor,{lineHeight:null})}constructor(e){super(e),this.buttons=[{name:"lineHeight",group:"font"}],(0,r.extendLang)(l)}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([o.autobind],c.prototype,"applyLineHeight",null),r.pluginSystem.add("lineHeight",c)},53259:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2.6667 5.3333h9.3333M2.6667 12H12M2.6667 18.6667h9.3333" stroke-width="2.6667" stroke-linecap="butt"/><path d="M18 4v16m-3-13 3-3 3 3m-6 10 3 3 3-3"/> </g> </svg> '},5827:function(e,t,i){"use strict";var o=i(2748),n=i(12153),r=i(6441),s=i(27190),a=i(42345),l=i(10411);r.Config.prototype.link={formTemplate:l.formTemplate,followOnDblClick:!1,processVideoLink:!0,processPastedLink:!0,deriveUrlFromText:!1,noFollowCheckbox:!0,openInNewTabCheckbox:!0,openInNewTabCheckboxDefaultChecked:!1,ariaLabelInput:!1,modeClassName:"input",selectMultipleClassName:!0,preventReadOnlyNavigation:!0,selectSizeClassName:3,selectOptionsClassName:[],hotkeys:["ctrl+k","cmd+k"]},n.Icon.set("link",s.default).set("unlink",a.default),r.Config.prototype.controls.unlink={exec(e,t){let i=o.Dom.closest(t,"a",e.editor);i&&o.Dom.unwrap(i),e.synchronizeValues(),e.e.fire("hidePopup")},tooltip:"Unlink"},r.Config.prototype.controls.link={isActive(e){let t=e.s.current();return!!(t&&o.Dom.closest(t,"a",e.editor))},popup:(e,t,i)=>e.e.fire("generateLinkForm.link",t,i),tags:["a"],tooltip:"Insert link"}},27190:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m10 7 3-3a5 5 0 0 1 7 7l-3 3M14 17l-3 3a5 5 0 0 1-7-7l3-3m1 6 8-8"/> </g> </svg> '},42345:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m14 5 1-1a3.5 3.5 0 0 1 5 5l-1 1M10 19l-1 1a3.5 3.5 0 0 1-5-5l1-1M4 10l6-6m4 16 6-6"/> </g> </svg> '},65517:function(e,t,i){"use strict";var o=i(65478),n=i(22732),r=i(580),s=i(21537),a=i(50911);i(5827);var l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class c extends a.Plugin{afterInit(e){e.o.link.followOnDblClick&&e.e.on("dblclick.link",this.__onDblClickOnLink),e.e.on(e.editor,"click.link",this.__onClickReadOnlyLink),e.o.link.processPastedLink&&e.e.on("processPaste.link",this.onProcessPasteLink),e.e.on("generateLinkForm.link",this.__generateForm),e.registerCommand("openLinkDialog",{exec:()=>{let t=e.dlg({resizable:!1}),i=this.__generateForm(e.s.current(),()=>{t.close()});i.container.classList.add("jodit-dialog_alert"),t.setContent(i),t.open(),e.async.requestIdleCallback(()=>{let{url_input:e}=(0,s.refs)(i.container);null==e||e.focus()})},hotkeys:e.o.link.hotkeys})}__onDblClickOnLink(e){if(!n.Dom.isTag(e.target,"a"))return;let t=(0,s.attr)(e.target,"href");t&&(location.href=t,e.preventDefault())}onProcessPasteLink(e,t){var i,o,n,r;let{jodit:a}=this;if((0,s.isURL)(t)&&a.o.link.processPastedLink){if(a.e.stopPropagation("processPaste"),a.o.link.processVideoLink){let e=(0,s.call)(null!=(o=null==(i=a.o.video)?void 0:i.parseUrlToVideoEmbed)?o:s.convertMediaUrlToVideoEmbed,t,{width:null==(n=a.o.video)?void 0:n.defaultWidth,height:null==(r=a.o.video)?void 0:r.defaultHeight});if(e!==t)return a.createInside.fromHTML(e)}if(a.s.isCollapsed()){let e=a.createInside.element("a");return(0,s.attr)(e,"href",t),e.textContent=t,a.e.fire("applyLink",a,e,null),e}return a.s.commitStyle({element:"a",attributes:{href:t}}),!0}}__generateForm(e,t){let i,o,{jodit:r}=this,a=r.i18n.bind(r),{openInNewTabCheckbox:l,openInNewTabCheckboxDefaultChecked:c,noFollowCheckbox:d,formTemplate:u,formClassName:h,modeClassName:p}=r.o.link,f=u(r),m=(0,s.isString)(f)?r.c.fromHTML(f,{target_checkbox_box:l,nofollow_checkbox_box:d}):f,g=n.Dom.isElement(m)?m:m.container,b=(0,s.refs)(g),{insert:v,unlink:y,content_input_box:w}=b,{target_checkbox:_,nofollow_checkbox:k,url_input:C}=b,S=n.Dom.isImage(e),{content_input:x}=b,{className_input:I}=b,{className_select:E}=b,{aria_label_input:T}=b;x||(x=r.c.element("input",{type:"hidden",ref:"content_input"})),h&&g.classList.add(h),S&&n.Dom.hide(w);let j=()=>o?o.innerText:(0,s.stripTags)(r.s.range.cloneContents(),r.ed);o=!!(e&&n.Dom.closest(e,"a",r.editor))&&n.Dom.closest(e,"a",r.editor),!S&&e&&(x.value=j()),T&&(T.value=o&&(0,s.attr)(o,"aria-label")||""),o?(C.value=(0,s.attr)(o,"href")||"",p&&function(e,t,i,o){switch(e){case"input":t&&(t.value=(0,s.attr)(i,"class")||"");break;case"select":if(o){for(let e=0;e<o.selectedOptions.length;e++){let t=o.options.item(e);t&&(t.selected=!1)}((0,s.attr)(i,"class")||"").split(/\s+/).filter(e=>e.trim().length>0).forEach(e=>{if(e)for(let t=0;t<o.options.length;t++){let i=o.options.item(t);(null==i?void 0:i.value)&&i.value.split(/\s+/).map(e=>e.trim()).includes(e)&&(i.selected=!0)}})}}}(p,I,o,E),l&&_&&(_.checked="_blank"===(0,s.attr)(o,"target")),d&&k&&(k.checked=((0,s.attr)(o,"rel")||"").split(/\s+/).includes("nofollow")),v.textContent=a("Update")):(n.Dom.hide(y),r.o.link.deriveUrlFromText&&C&&!S&&!C.value.trim()&&(C.value=!(i=x.value.trim())||/\s/.test(i)?"":/^(https?:|mailto:|tel:|ftp:|#|\/|\.{1,2}\/)/i.test(i)?i:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i)?"mailto:"+i:/^[a-z0-9-]+(\.[a-z0-9-]+)+(\/\S*)?$/i.test(i)?"https://"+i:""),l&&_&&(_.checked=c)),r.editor.normalize();let D=r.history.snapshot.make();y&&r.e.on(y,"click",e=>{r.s.restore(),r.history.snapshot.restore(D),o&&n.Dom.unwrap(o),r.synchronizeValues(),t(),e.preventDefault()});let A=()=>{let e;if(!C.value.trim().length)return C.focus(),C.classList.add("jodit_error"),!1;r.s.restore(),r.s.removeMarkers(),r.editor.normalize(),r.history.snapshot.restore(D);let i=j()!==x.value.trim(),a=r.createInside,c=null;if(o&&n.Dom.isOrContains(r.editor,o))e=[o];else{if(r.s.isCollapsed()){let t=a.element("a");r.s.insertNode(t,!1,!1),e=[t],c=t}else{let t=r.s.current();e=n.Dom.isTag(t,"img")?[n.Dom.wrap(t,"a",a)]:r.s.wrapInTag("a")}e.forEach(e=>r.s.select(e))}return e.forEach(e=>{var t;let o;if((0,s.attr)(e,"href",C.value),function(e,t,i,o){var n;if(e&&(null!=t?t:i)){if("input"===e)""===t.value&&o.hasAttribute("class")&&(0,s.attr)(o,"class",null),""!==t.value&&(0,s.attr)(o,"class",t.value);else if("select"===e){o.hasAttribute("class")&&(0,s.attr)(o,"class",null);for(let e=0;e<i.selectedOptions.length;e++){let t=null==(n=i.selectedOptions.item(e))?void 0:n.value;t&&t.split(/\s+/).filter(e=>e.trim().length>0).forEach(e=>{o.classList.add(e)})}}}}(p,I,E,e),S||(t=x,o=e.textContent,t.value.trim().length?i&&(o=t.value):o=C.value,o!==e.textContent&&(e.textContent=o)),l&&_&&(0,s.attr)(e,"target",_.checked?"_blank":null),d&&k){let t=((0,s.attr)(e,"rel")||"").split(/\s+/).filter(Boolean),i=t.includes("nofollow");k.checked&&!i?t.push("nofollow"):!k.checked&&i&&t.splice(t.indexOf("nofollow"),1),(0,s.attr)(e,"rel",t.length?t.join(" "):null)}if(T){let t=T.value.trim();(0,s.attr)(e,"aria-label",t||null)}r.e.fire("applyLink",r,e,m)}),c&&r.s.setCursorAfter(c),r.synchronizeValues(),t(),!1};return n.Dom.isElement(m)?r.e.on(m,"submit",e=>(e.preventDefault(),e.stopImmediatePropagation(),A(),!1)):m.onSubmit(A),m}beforeDestruct(e){e.e.off("generateLinkForm.link",this.__generateForm).off("dblclick.link",this.__onDblClickOnLink).off(e.editor,"click.link",this.__onClickReadOnlyLink).off("processPaste.link",this.onProcessPasteLink)}__onClickReadOnlyLink(e){let{jodit:t}=this;t.o.readonly&&t.o.link.preventReadOnlyNavigation&&n.Dom.isTag(e.target,"a")&&e.preventDefault()}constructor(){super(...arguments),this.buttons=[{name:"link",group:"insert"}]}}l([o.autobind],c.prototype,"__onDblClickOnLink",null),l([o.autobind],c.prototype,"onProcessPasteLink",null),l([o.autobind],c.prototype,"__generateForm",null),l([o.autobind],c.prototype,"__onClickReadOnlyLink",null),r.pluginSystem.add("link",c)},10411:function(e,t,i){"use strict";var o=i(62843),n=i(2525);i.d(t,["formTemplate",0,e=>{let{openInNewTabCheckbox:t,noFollowCheckbox:i,ariaLabelInput:r,modeClassName:s,selectSizeClassName:a,selectMultipleClassName:l,selectOptionsClassName:c}=e.o.link;return new n.UIForm(e,[new n.UIBlock(e,[new n.UIInput(e,{name:"url",type:"text",ref:"url_input",label:"URL",placeholder:"http://",required:!0})]),r?new n.UIBlock(e,[new n.UIInput(e,{name:"ariaLabel",ref:"aria_label_input",label:"Aria label"})]):null,new n.UIBlock(e,[new n.UIInput(e,{name:"content",ref:"content_input",label:"Text"})],{ref:"content_input_box"}),s?new n.UIBlock(e,["input"===s?new n.UIInput(e,{name:"className",ref:"className_input",label:"Class name"}):"select"===s?new n.UISelect(e,{name:"className",ref:"className_select",label:"Class name",size:a,multiple:l,options:c}):null]):null,t?new n.UICheckbox(e,{name:"target",ref:"target_checkbox",label:"Open in new tab"}):null,i?new n.UICheckbox(e,{name:"nofollow",ref:"nofollow_checkbox",label:"No follow"}):null,new n.UIBlock(e,[new o.UIButton(e,{name:"unlink",variant:"default",text:"Unlink"}),new o.UIButton(e,{name:"insert",type:"submit",variant:"primary",text:"Insert"})],{align:"full"})])}])},757:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.mediaFakeTag="jodit-media",o.Config.prototype.mediaInFakeBlock=!0,o.Config.prototype.mediaBlocks=["video","audio"],o.Config.prototype.mediaWrappers={}},20071:function(e,t,i){"use strict";var o=i(82758),n=i(2748),r=i(580),s=i(43555),a=i(41180);i(757),r.pluginSystem.add("media",function(e){let t="jodit_fake_wrapper",{mediaFakeTag:i,mediaBlocks:r,mediaInFakeBlock:l,mediaWrappers:c}=e.options;(l||Object.keys(c).length)&&e.e.on("afterGetValueFromEditor",e=>{let o=RegExp(`<${i}[^>]+data-${t}[^>]+>([^]+?)</${i}>`,"ig");o.test(e.value)&&(e.value=e.value.replace(o,"$1"))}).on("change afterInit afterSetMode changePlace",e.async.debounce(()=>{e.isDestructed||e.getMode()===o.MODE_SOURCE||(0,s.$$)(r.join(","),e.editor).forEach(o=>{(0,s.dataBind)(o,t)||((0,s.dataBind)(o,t,!0),(o=>{var r;if(o.parentNode&&(0,s.attr)(o.parentNode,"data-jodit_iframe_wrapper"))o=o.parentNode;else if(c[o.nodeName.toLowerCase()])o=null!=(r=(0,s.getMediaWrapper)(e,o))?r:(0,s.wrapMedia)(e,o);else{if(!l)return;let r=e.createInside.element(i,{"data-jodit-temp":1,contenteditable:!1,draggable:!0,["data-"+t]:1});(0,s.attr)(r,"style",(0,s.attr)(o,"style")),(0,a.css)(r,{display:"inline-block"===(0,a.cssInline)(o,"display")?"inline-block":"block",width:o.offsetWidth,height:o.offsetHeight}),o.parentNode&&n.Dom.before(o,r),n.Dom.append(r,o),o=r}e.e.off(o,"mousedown.select touchstart.select").on(o,"mousedown.select touchstart.select",()=>{e.s.setCursorAfter(o)})})(o))})},e.defaultTimeout))})},37585:function(e,t,i){"use strict";var o=i(82758),n=i(21537),r=i(41180),s=i(6441),a=i(11676),l=i(21491);s.Config.prototype.mobileTapTimeout=300,s.Config.prototype.toolbarAdaptive=!0,s.Config.prototype.buttonsMD=[{group:"font-style",buttons:[]},{group:"list",buttons:[]},{group:"font",buttons:[]},"---",{group:"media",buttons:[]},`
|
|
227
|
+
`,"link","|","align","|","undo","redo","|","copyformat","fullsize","---","dots"]},24231:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="7" height="18" rx="1"/><path d="M3 12h7M14 12h7m-3.5-3.5v7"/> </g> </svg> '},75393:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="7" rx="1"/><path d="M12 3v7M12 14v7m-3.5-3.5h7"/> </g> </svg> '},14862:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2.5" y="4" width="19" height="16" rx="1.5"/><path d="M12 4v2m0 12v2M3 12h6m-2.5-2.5L9 12l-2.5 2.5M21 12h-6m2.5-2.5L15 12l2.5 2.5" stroke-width="2"/> </g> </svg> '},96257:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 12h18"/> </g> </svg> '},9914:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2"/><path d="M12 3v18"/> </g> </svg> '},33489:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M9.3333 5.3333h12M9.3333 12h12M9.3333 18.6667h12" stroke-width="2.6667" stroke-linecap="butt"/><path d="M4 5.3333h0M4 12h0M4 18.6667h0" stroke-width="3.2"/> </g> </svg> '},53696:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/> </g> </svg> '},93401:function(e,t,i){"use strict";var o=i(65478),n=i(22732),r=i(580),s=i(21537),a=i(50911),l=i(67510),c=i(61259),d=i(21491);i(24526);var u=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class h extends a.Plugin{get popup(){return new c.Popup(this.jodit,!1)}get toolbar(){return(0,d.makeCollection)(this.jodit,this.popup)}onClick(e){let t=this.elmsList,i=(0,s.getMediaWrapper)(this.j,e),o=null!=i?i:n.Dom.isTag(e,"img")?e:n.Dom.closest(e,t,this.j.editor),r=i?"jodit-media":null==o?void 0:o.nodeName.toLowerCase();if(o&&r&&this.canShowPopupForType(r)){let e="jodit-media"===r,t=i&&(0,s.getWrappedMedia)(this.j,i)||o;return this.showPopup(()=>this.__bound(t,e),r,o),!1}}__bound(e,t){let i=(0,s.position)(e,this.j),o=this.j.o.allowResizeTags;if(!t&&!(o&&n.Dom.isTag(e,o)))return i;let r=parseInt(this.j.ow.getComputedStyle(this.j.container).getPropertyValue("--jd-resizer-handle-size"),10)/2||0;return{...i,top:i.top-r,height:i.height+2*r}}showPopup(e,t,i){if(t=t.toLowerCase(),!this.canShowPopupForType(t))return!1;if(this.type!==t||i!==this.previousTarget){let e;this.previousTarget=i;let o=this.j.o.popup[t];if(e=(0,s.isFunction)(o)?o(this.j,i,this.popup.close):o,(0,s.isArray)(e)){let t=this.j.o.toolbarInlineDisabledButtons;this.toolbar.build(t.length?e.filter(e=>{let i=(0,s.isString)(e)?e:e.name;return!t.includes(null!=i?i:"")}):e,i),this.toolbar.buttonSize=this.j.o.toolbarButtonSize,e=this.toolbar.container}this.popup.setContent(e),this.type=t}return this.popup.open(e),!0}hidePopup(e){this.popup.isOpened&&(!(0,s.isString)(e)||e===this.type)&&this.popup.close()}onOutsideClick(){this.popup.close()}canShowPopupForType(e){let t=this.j.o.popup[e.toLowerCase()];return!this.j.o.readonly&&!!this.j.o.toolbarInline&&!!t&&!this.isExcludedTarget(e)}isExcludedTarget(e){return(0,s.splitArray)(this.j.o.toolbarInlineDisableFor).map(e=>e.toLowerCase()).includes(e.toLowerCase())}afterInit(e){this.j.e.on("getDiffButtons.mobile",t=>{if(this.toolbar===t){let t=this.toolbar.getButtonsNames();return(0,s.toArray)(e.registeredButtons).filter(e=>!this.j.o.toolbarInlineDisabledButtons.includes(e.name)).filter(e=>{let i=(0,s.isString)(e)?e:e.name;return i&&"|"!==i&&`
|
|
228
|
+
`!==i&&!t.includes(i)})}}).on("hidePopup",this.hidePopup).on("showInlineToolbar",this.showInlineToolbar).on("showPopup",(e,t,i)=>{this.showPopup(t,i||((0,s.isString)(e)?e:e.nodeName),(0,s.isString)(e)?void 0:e)}).on("mousedown keydown",this.onSelectionStart).on("change",()=>{this.popup.isOpened&&this.previousTarget&&!this.previousTarget.parentNode&&(this.hidePopup(),this.previousTarget=void 0)}).on([this.j.ew,this.j.ow],"mouseup keyup",this.onSelectionEnd).on([this.j.ew,this.j.ow],"mousedown touchstart",this.__onDocumentMouseDown).on("closeAllPopups",this.__onCloseAllPopups),this.addListenersForElements()}__onDocumentMouseDown(e){this.popup.isOpened&&"selection"===this.type&&e.target&&l.UIElement.closestElement(e.target,c.Popup)&&(this.__reopenSelectionPopup=!0)}__onCloseAllPopups(){!this.__reopenSelectionPopup||(this.__reopenSelectionPopup=!1,this.j.o.toolbarInlineForSelection&&this.j.async.setTimeout(()=>{let e=this.j.s.sel;e&&!e.isCollapsed&&this.showPopup(()=>this.__selectionBound(),"selection")},1))}__selectionBound(){let e=this.j.s.range.getBoundingClientRect(),{left:t,top:i}=e;if(this.j.iframe){let e=(0,s.position)(this.j.iframe,this.j,!0);t+=e.left,i+=e.top}return{left:t,top:i,width:e.width,height:e.height}}onSelectionStart(){this.snapRange=this.j.s.range.cloneRange()}onSelectionEnd(e){if(e&&e.target&&l.UIElement.closestElement(e.target,c.Popup))return;let{snapRange:t}=this,{range:i}=this.j.s;(!t||i.collapsed||i.startContainer!==t.startContainer||i.startOffset!==t.startOffset||i.endContainer!==t.endContainer||i.endOffset!==t.endOffset)&&this.onSelectionChange()}onSelectionChange(){if(!this.j.o.toolbarInlineForSelection)return;let e="selection",t=this.j.s.sel,i=this.j.s.range;if((null==t?void 0:t.isCollapsed)||this.isSelectedTarget(i)){this.type===e&&this.popup.isOpened&&this.hidePopup();return}this.j.s.current()&&this.showPopup(()=>this.__selectionBound(),e)}isSelectedTarget(e){let t=e.startContainer;return n.Dom.isElement(t)&&t===e.endContainer&&n.Dom.isTag(t.childNodes[e.startOffset],new Set((0,s.keys)(this.j.o.popup,!1)))&&e.startOffset===e.endOffset-1}beforeDestruct(e){e.e.off("showPopup").off([this.j.ew,this.j.ow],"mouseup keyup",this.onSelectionEnd).off([this.j.ew,this.j.ow],"mousedown touchstart",this.__onDocumentMouseDown).off("closeAllPopups",this.__onCloseAllPopups),this.removeListenersForElements()}_eventsList(){var e;let t=Object.values(null!=(e=this.j.o.mediaWrappers)?e:{}).map(({tag:e})=>e.toLowerCase()),i=[...new Set(this.elmsList.concat(t))];return i.map(e=>(0,s.camelCase)("click_"+e)).concat(i.map(e=>(0,s.camelCase)("touchstart_"+e))).join(" ")}addListenersForElements(){this.j.e.on(this._eventsList(),this.onClick)}removeListenersForElements(){this.j.e.off(this._eventsList(),this.onClick)}showInlineToolbar(e){this.showPopup(()=>{if(e)return e;let{range:t}=this.j.s;return t.getBoundingClientRect()},"toolbar")}constructor(){super(...arguments),this.type=null,this.__reopenSelectionPopup=!1,this.snapRange=null,this.elmsList=(0,s.keys)(this.j.o.popup,!1).filter(e=>!this.isExcludedTarget(e))}}h.requires=["select"],u([o.cache],h.prototype,"popup",null),u([o.cache],h.prototype,"toolbar",null),u([o.autobind],h.prototype,"onClick",null),u([(0,o.wait)(e=>!e.j.isLocked)],h.prototype,"showPopup",null),u([(0,o.watch)([":clickEditor",":beforeCommandDelete",":backSpaceAfterDelete"]),o.autobind],h.prototype,"hidePopup",null),u([(0,o.watch)(":outsideClick")],h.prototype,"onOutsideClick",null),u([o.autobind],h.prototype,"__onDocumentMouseDown",null),u([o.autobind],h.prototype,"__onCloseAllPopups",null),u([o.autobind],h.prototype,"onSelectionStart",null),u([o.autobind],h.prototype,"onSelectionEnd",null),u([(0,o.debounce)(e=>e.defaultTimeout)],h.prototype,"onSelectionChange",null),u([o.autobind],h.prototype,"showInlineToolbar",null),r.pluginSystem.add("inlinePopup",h)},76295:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(21537),s=i(25726),a=i(41180),l=i(12153),c=i(6441),d=i(5567);l.Icon.set("justify",d.default),c.Config.prototype.controls.align={name:"left",tooltip:"Align",update(e,t){let i=t.control,n=e.s.current();if(n){let s=o.Dom.closest(n,o.Dom.isBlock,e.editor)||e.editor,l=(0,a.css)(s,"text-align").toString();i.defaultValue&&-1!==i.defaultValue.indexOf(l)&&(l="left");let{list:c,data:d}=i;d&&d.currentValue!==l&&c&&((0,r.isPlainObject)(c)?c[l]:c.includes(l))&&(e.o.textIcons||"select"===i.component?t.state.text=l:t.state.icon.name=l,d.currentValue=l)}},isActive(e,t){let i=e.s.current();if(!i||!t.control.defaultValue)return!1;let n=o.Dom.closest(i,o.Dom.isBlock,e.editor)||e.editor;return -1===t.control.defaultValue.indexOf((0,a.css)(n,"text-align").toString())},defaultValue:["left","start","inherit"],data:{currentValue:"left"},list:["center","left","right","justify"]},c.Config.prototype.controls.center={command:"justifyCenter",css:{"text-align":"center"},tooltip:"Align Center"},c.Config.prototype.controls.justify={command:"justifyFull",css:{"text-align":"justify"},tooltip:"Align Justify"},c.Config.prototype.controls.left={command:"justifyLeft",css:{"text-align":"left"},tooltip:"Align Left"},c.Config.prototype.controls.right={command:"justifyRight",css:{"text-align":"right"},tooltip:"Align Right"},n.pluginSystem.add("justify",function(e){e.registerButton({name:"align",group:"indent"});let t=t=>(e.s.focus(),e.s.eachSelection(i=>{if(!i)return;let n=o.Dom.up(i,o.Dom.isBlock,e.editor);n||(n=o.Dom.wrapInline(i,e.o.enterBlock,e)),(0,s.alignElement)(t,n)}),!1);e.registerCommand("justifyfull",t),e.registerCommand("justifyright",t),e.registerCommand("justifyleft",t),e.registerCommand("justifycenter",t)})},5567:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2.6667 5.3333h18.6666M2.6667 12h18.6666M2.6667 18.6667h18.6666" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg> '},59483:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(50911);class l extends a.Plugin{afterInit(e){}beforeDestruct(e){}onKeyDownArrow(e){var t;if(e.key!==o.KEY_RIGHT||!this.j.selection.isCollapsed())return;let{endContainer:i,endOffset:n}=this.j.selection.range;if(r.Dom.isText(i)&&(null==(t=i.nodeValue)?void 0:t.length)===n){let{parentNode:e}=i;r.Dom.isInlineBlock(e)&&!r.Dom.findNotEmptyNeighbor(e,!1,this.j.editor)&&r.Dom.after(e,this.j.createInside.text(o.NBSP_SPACE))}}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,n.watch)(":keydown")],l.prototype,"onKeyDownArrow",null),s.pluginSystem.add("keyArrowOutside",l)},57288:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.limitWords=!1,o.Config.prototype.limitChars=!1,o.Config.prototype.limitHTML=!1},91071:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(580),s=i(50911);i(57288);var a=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class l extends s.Plugin{afterInit(e){let{limitWords:t,limitChars:i}=e.o;if(e&&(t||i)){let t=null;e.e.off(".limit").on("beforePaste.limit",()=>{t=e.history.snapshot.make()}).on("keydown.limit keyup.limit beforeEnter.limit",this.checkPreventKeyPressOrPaste).on("change.limit",this.checkPreventChanging).on("afterPaste.limit",()=>{if(this.__shouldDenyInput(!0)&&t)return e.history.snapshot.restore(t),e.e.fire("denyPaste.limit"),!1})}}shouldPreventInsertHTML(e){return!(e&&(o.COMMAND_KEYS.includes(e.key)||e.ctrlKey||e.metaKey))&&this.__shouldDenyInput(!1)}__shouldDenyInput(e){var t;let{jodit:i}=this,{limitWords:n,limitChars:r}=i.o,s=i.o.limitHTML?i.value:i.text,a=this.__splitWords(s);if(n&&(t=a.length,e?t>n:t>=n))return i.e.fire("denyWords.limit limit.limit"),!0;let l=i.o.countTextSpaces?s.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),"").replace(/[\r\n]/g,"").length:a.join("").length,c=!!(r&&(e?l>r:l>=r));return c&&i.e.fire("denyChars.limit limit.limit"),c}checkPreventKeyPressOrPaste(e){if(this.shouldPreventInsertHTML(e))return!1}checkPreventChanging(e,t){let{jodit:i}=this;this.__shouldDenyInput(!0)&&(i.value=t)}__splitWords(e){return e.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),"").split((0,o.SPACE_REG_EXP)()).filter(e=>e.length)}beforeDestruct(e){e.e.off(".limit")}}a([n.autobind],l.prototype,"checkPreventKeyPressOrPaste",null),a([n.autobind],l.prototype,"checkPreventChanging",null),r.pluginSystem.add("limit",l)},26295:function(e,t,i){"use strict";var o=i(21537),n=i(12153),r=i(6441),s=i(53259);r.Config.prototype.defaultLineHeight=null,n.Icon.set("line-height",s.default),r.Config.prototype.controls.lineHeight={command:"applyLineHeight",tags:["ol"],tooltip:"Line height",list:[1,1.1,1.2,1.3,1.4,1.5,2],exec:(e,t,{control:i})=>(0,o.memorizeExec)(e,t,{control:i},e=>e)}},80084:function(e){"use strict";e.exports={"Line height":"ارتفاع الخط"}},76725:function(e){"use strict";e.exports={"Line height":"Výška čáry"}},71724:function(e){"use strict";e.exports={"Line height":"Zeilenhöhe"}},46295:function(e){"use strict";e.exports={"Line height":"Altura de la línea"}},70190:function(e){"use strict";e.exports={"Line height":"ارتفاع خط"}},67206:function(e){"use strict";e.exports={"Line height":"Rivin korkeus"}},85723:function(e){"use strict";e.exports={"Line height":"Hauteur de ligne"}},61072:function(e){"use strict";e.exports={"Line height":"גובה שורה"}},30592:function(e){"use strict";e.exports={"Line height":"Vonal magassága"}},89194:function(e){"use strict";e.exports={"Line height":"Tinggi baris"}},28143:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o||(o=i.t(I,2))},cs_cz:function(){return n||(n=i.t(E,2))},de:function(){return r||(r=i.t(T,2))},es:function(){return s||(s=i.t(j,2))},fa:function(){return a||(a=i.t(D,2))},fi:function(){return l||(l=i.t(A,2))},fr:function(){return c||(c=i.t(P,2))},he:function(){return d||(d=i.t(M,2))},hu:function(){return u||(u=i.t(L,2))},id:function(){return h||(h=i.t(R,2))},it:function(){return p||(p=i.t(z,2))},ja:function(){return f||(f=i.t(B,2))},ko:function(){return m||(m=i.t(N,2))},mn:function(){return g||(g=i.t(F,2))},nl:function(){return b||(b=i.t(O,2))},pl:function(){return v||(v=i.t(H,2))},pt_br:function(){return y||(y=i.t(U,2))},ru:function(){return w||(w=i.t(V,2))},sk:function(){return _||(_=i.t(W,2))},tr:function(){return k||(k=i.t($,2))},ua:function(){return C||(C=i.t(K,2))},zh_cn:function(){return S||(S=i.t(G,2))},zh_tw:function(){return x||(x=i.t(Y,2))}});var o,n,r,s,a,l,c,d,u,h,p,f,m,g,b,v,y,w,_,k,C,S,x,I=i(80084),E=i(76725),T=i(71724),j=i(46295),D=i(70190),A=i(67206),P=i(85723),M=i(61072),L=i(30592),R=i(89194),z=i(51834),B=i(5082),N=i(80105),F=i(26556),O=i(98689),H=i(42727),U=i(43646),V=i(53822),W=i(70717),$=i(41817),K=i(69625),G=i(28973),Y=i(19033)},51834:function(e){"use strict";e.exports={"Line height":"Altezza linea"}},5082:function(e){"use strict";e.exports={"Line height":"ラインの高さ"}},80105:function(e){"use strict";e.exports={"Line height":"선 높이"}},26556:function(e){"use strict";e.exports={"Line height":"Зураасны өндөр"}},98689:function(e){"use strict";e.exports={"Line height":"Lijnhoogte"}},42727:function(e){"use strict";e.exports={"Line height":"Wysokość linii"}},43646:function(e){"use strict";e.exports={"Line height":"Altura da linha"}},53822:function(e){"use strict";e.exports={"Line height":"Высота линии"}},70717:function(e){"use strict";e.exports={"Line height":"Výška riadku"}},41817:function(e){"use strict";e.exports={"Line height":"Çizgi yüksekliği"}},69625:function(e){"use strict";e.exports={"Line height":"Висота лінії"}},28973:function(e){"use strict";e.exports={"Line height":"线高"}},19033:function(e){"use strict";e.exports={"Line height":"行高"}},61019:function(e,t,i){"use strict";var o=i(65478),n=i(2748),r=i(580),s=i(21537),a=i(50911);i(26295);var l=i(28143);class c extends a.Plugin{afterInit(e){(0,s.css)(e.editor,{lineHeight:e.o.defaultLineHeight}),e.registerCommand("applyLineHeight",this.applyLineHeight)}applyLineHeight(e,t,i){let o,{s:r,createInside:a,editor:l,o:c}=this.j;r.isFocused()||r.focus(),r.save();let d=e=>{let t=n.Dom.closest(e,n.Dom.isBlock,l);t||(t=n.Dom.wrap(e,c.enter,a));let r=(0,s.css)(t,"lineHeight");void 0===o&&(o=r.toString()!==i.toString()),(0,s.css)(t,"lineHeight",o?i:null)};try{if(r.isCollapsed()){let e=a.fake();n.Dom.safeInsertNode(r.range,e),d(e),n.Dom.safeRemove(e)}else r.eachSelection(d)}finally{r.restore()}}beforeDestruct(e){(0,s.css)(e.editor,{lineHeight:null})}constructor(e){super(e),this.buttons=[{name:"lineHeight",group:"font"}],(0,r.extendLang)(l)}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([o.autobind],c.prototype,"applyLineHeight",null),r.pluginSystem.add("lineHeight",c)},53259:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2.6667 5.3333h9.3333M2.6667 12H12M2.6667 18.6667h9.3333" stroke-width="2.6667" stroke-linecap="butt"/><path d="M18 4v16m-3-13 3-3 3 3m-6 10 3 3 3-3"/> </g> </svg> '},5827:function(e,t,i){"use strict";var o=i(2748),n=i(12153),r=i(6441),s=i(27190),a=i(42345),l=i(10411);r.Config.prototype.link={formTemplate:l.formTemplate,followOnDblClick:!1,processVideoLink:!0,processPastedLink:!0,deriveUrlFromText:!1,noFollowCheckbox:!0,openInNewTabCheckbox:!0,openInNewTabCheckboxDefaultChecked:!1,ariaLabelInput:!1,modeClassName:"input",selectMultipleClassName:!0,preventReadOnlyNavigation:!0,selectSizeClassName:3,selectOptionsClassName:[],hotkeys:["ctrl+k","cmd+k"]},n.Icon.set("link",s.default).set("unlink",a.default),r.Config.prototype.controls.unlink={exec(e,t){let i=o.Dom.closest(t,"a",e.editor);i&&o.Dom.unwrap(i),e.synchronizeValues(),e.e.fire("hidePopup")},tooltip:"Unlink"},r.Config.prototype.controls.link={isActive(e){let t=e.s.current();return!!(t&&o.Dom.closest(t,"a",e.editor))},popup:(e,t,i)=>e.e.fire("generateLinkForm.link",t,i),tags:["a"],tooltip:"Insert link"}},27190:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m10 7 3-3a5 5 0 0 1 7 7l-3 3M14 17l-3 3a5 5 0 0 1-7-7l3-3m1 6 8-8"/> </g> </svg> '},42345:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m14 5 1-1a3.5 3.5 0 0 1 5 5l-1 1M10 19l-1 1a3.5 3.5 0 0 1-5-5l1-1M4 10l6-6m4 16 6-6"/> </g> </svg> '},65517:function(e,t,i){"use strict";var o=i(65478),n=i(22732),r=i(580),s=i(21537),a=i(50911);i(5827);var l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class c extends a.Plugin{afterInit(e){e.o.link.followOnDblClick&&e.e.on("dblclick.link",this.__onDblClickOnLink),e.e.on(e.editor,"click.link",this.__onClickReadOnlyLink),e.o.link.processPastedLink&&e.e.on("processPaste.link",this.onProcessPasteLink),e.e.on("generateLinkForm.link",this.__generateForm),e.registerCommand("openLinkDialog",{exec:()=>{let t=e.dlg({resizable:!1}),i=this.__generateForm(e.s.current(),()=>{t.close()});i.container.classList.add("jodit-dialog_alert"),t.setContent(i),t.open(),e.async.requestIdleCallback(()=>{let{url_input:e}=(0,s.refs)(i.container);null==e||e.focus()})},hotkeys:e.o.link.hotkeys})}__onDblClickOnLink(e){if(!n.Dom.isTag(e.target,"a"))return;let t=(0,s.attr)(e.target,"href");t&&(location.href=t,e.preventDefault())}onProcessPasteLink(e,t){var i,o,n,r;let{jodit:a}=this;if((0,s.isURL)(t)&&a.o.link.processPastedLink){if(a.e.stopPropagation("processPaste"),a.o.link.processVideoLink){let e=(0,s.call)(null!=(o=null==(i=a.o.video)?void 0:i.parseUrlToVideoEmbed)?o:s.convertMediaUrlToVideoEmbed,t,{width:null==(n=a.o.video)?void 0:n.defaultWidth,height:null==(r=a.o.video)?void 0:r.defaultHeight});if(e!==t){let t=(0,s.prepareEmbedCode)(a,e);return(0,s.isString)(t)?a.createInside.fromHTML(t):t}}if(a.s.isCollapsed()){let e=a.createInside.element("a");return(0,s.attr)(e,"href",t),e.textContent=t,a.e.fire("applyLink",a,e,null),e}return a.s.commitStyle({element:"a",attributes:{href:t}}),!0}}__generateForm(e,t){let i,o,{jodit:r}=this,a=r.i18n.bind(r),{openInNewTabCheckbox:l,openInNewTabCheckboxDefaultChecked:c,noFollowCheckbox:d,formTemplate:u,formClassName:h,modeClassName:p}=r.o.link,f=u(r),m=(0,s.isString)(f)?r.c.fromHTML(f,{target_checkbox_box:l,nofollow_checkbox_box:d}):f,g=n.Dom.isElement(m)?m:m.container,b=(0,s.refs)(g),{insert:v,unlink:y,content_input_box:w}=b,{target_checkbox:_,nofollow_checkbox:k,url_input:C}=b,S=n.Dom.isImage(e),{content_input:x}=b,{className_input:I}=b,{className_select:E}=b,{aria_label_input:T}=b;x||(x=r.c.element("input",{type:"hidden",ref:"content_input"})),h&&g.classList.add(h),S&&n.Dom.hide(w);let j=()=>o?o.innerText:(0,s.stripTags)(r.s.range.cloneContents(),r.ed);o=!!(e&&n.Dom.closest(e,"a",r.editor))&&n.Dom.closest(e,"a",r.editor),!S&&e&&(x.value=j()),T&&(T.value=o&&(0,s.attr)(o,"aria-label")||""),o?(C.value=(0,s.attr)(o,"href")||"",p&&function(e,t,i,o){switch(e){case"input":t&&(t.value=(0,s.attr)(i,"class")||"");break;case"select":if(o){for(let e=0;e<o.selectedOptions.length;e++){let t=o.options.item(e);t&&(t.selected=!1)}((0,s.attr)(i,"class")||"").split(/\s+/).filter(e=>e.trim().length>0).forEach(e=>{if(e)for(let t=0;t<o.options.length;t++){let i=o.options.item(t);(null==i?void 0:i.value)&&i.value.split(/\s+/).map(e=>e.trim()).includes(e)&&(i.selected=!0)}})}}}(p,I,o,E),l&&_&&(_.checked="_blank"===(0,s.attr)(o,"target")),d&&k&&(k.checked=((0,s.attr)(o,"rel")||"").split(/\s+/).includes("nofollow")),v.textContent=a("Update")):(n.Dom.hide(y),r.o.link.deriveUrlFromText&&C&&!S&&!C.value.trim()&&(C.value=!(i=x.value.trim())||/\s/.test(i)?"":/^(https?:|mailto:|tel:|ftp:|#|\/|\.{1,2}\/)/i.test(i)?i:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i)?"mailto:"+i:/^[a-z0-9-]+(\.[a-z0-9-]+)+(\/\S*)?$/i.test(i)?"https://"+i:""),l&&_&&(_.checked=c)),r.editor.normalize();let D=r.history.snapshot.make();y&&r.e.on(y,"click",e=>{r.s.restore(),r.history.snapshot.restore(D),o&&n.Dom.unwrap(o),r.synchronizeValues(),t(),e.preventDefault()});let A=()=>{let e;if(!C.value.trim().length)return C.focus(),C.classList.add("jodit_error"),!1;r.s.restore(),r.s.removeMarkers(),r.editor.normalize(),r.history.snapshot.restore(D);let i=j()!==x.value.trim(),a=r.createInside,c=null;if(o&&n.Dom.isOrContains(r.editor,o))e=[o];else{if(r.s.isCollapsed()){let t=a.element("a");r.s.insertNode(t,!1,!1),e=[t],c=t}else{let t=r.s.current();e=n.Dom.isTag(t,"img")?[n.Dom.wrap(t,"a",a)]:r.s.wrapInTag("a")}e.forEach(e=>r.s.select(e))}return e.forEach(e=>{var t;let o;if((0,s.attr)(e,"href",C.value),function(e,t,i,o){var n;if(e&&(null!=t?t:i)){if("input"===e)""===t.value&&o.hasAttribute("class")&&(0,s.attr)(o,"class",null),""!==t.value&&(0,s.attr)(o,"class",t.value);else if("select"===e){o.hasAttribute("class")&&(0,s.attr)(o,"class",null);for(let e=0;e<i.selectedOptions.length;e++){let t=null==(n=i.selectedOptions.item(e))?void 0:n.value;t&&t.split(/\s+/).filter(e=>e.trim().length>0).forEach(e=>{o.classList.add(e)})}}}}(p,I,E,e),S||(t=x,o=e.textContent,t.value.trim().length?i&&(o=t.value):o=C.value,o!==e.textContent&&(e.textContent=o)),l&&_&&(0,s.attr)(e,"target",_.checked?"_blank":null),d&&k){let t=((0,s.attr)(e,"rel")||"").split(/\s+/).filter(Boolean),i=t.includes("nofollow");k.checked&&!i?t.push("nofollow"):!k.checked&&i&&t.splice(t.indexOf("nofollow"),1),(0,s.attr)(e,"rel",t.length?t.join(" "):null)}if(T){let t=T.value.trim();(0,s.attr)(e,"aria-label",t||null)}r.e.fire("applyLink",r,e,m)}),c&&r.s.setCursorAfter(c),r.synchronizeValues(),t(),!1};return n.Dom.isElement(m)?r.e.on(m,"submit",e=>(e.preventDefault(),e.stopImmediatePropagation(),A(),!1)):m.onSubmit(A),m}beforeDestruct(e){e.e.off("generateLinkForm.link",this.__generateForm).off("dblclick.link",this.__onDblClickOnLink).off(e.editor,"click.link",this.__onClickReadOnlyLink).off("processPaste.link",this.onProcessPasteLink)}__onClickReadOnlyLink(e){let{jodit:t}=this;t.o.readonly&&t.o.link.preventReadOnlyNavigation&&n.Dom.isTag(e.target,"a")&&e.preventDefault()}constructor(){super(...arguments),this.buttons=[{name:"link",group:"insert"}]}}l([o.autobind],c.prototype,"__onDblClickOnLink",null),l([o.autobind],c.prototype,"onProcessPasteLink",null),l([o.autobind],c.prototype,"__generateForm",null),l([o.autobind],c.prototype,"__onClickReadOnlyLink",null),r.pluginSystem.add("link",c)},10411:function(e,t,i){"use strict";var o=i(62843),n=i(2525);i.d(t,["formTemplate",0,e=>{let{openInNewTabCheckbox:t,noFollowCheckbox:i,ariaLabelInput:r,modeClassName:s,selectSizeClassName:a,selectMultipleClassName:l,selectOptionsClassName:c}=e.o.link;return new n.UIForm(e,[new n.UIBlock(e,[new n.UIInput(e,{name:"url",type:"text",ref:"url_input",label:"URL",placeholder:"http://",required:!0})]),r?new n.UIBlock(e,[new n.UIInput(e,{name:"ariaLabel",ref:"aria_label_input",label:"Aria label"})]):null,new n.UIBlock(e,[new n.UIInput(e,{name:"content",ref:"content_input",label:"Text"})],{ref:"content_input_box"}),s?new n.UIBlock(e,["input"===s?new n.UIInput(e,{name:"className",ref:"className_input",label:"Class name"}):"select"===s?new n.UISelect(e,{name:"className",ref:"className_select",label:"Class name",size:a,multiple:l,options:c}):null]):null,t?new n.UICheckbox(e,{name:"target",ref:"target_checkbox",label:"Open in new tab"}):null,i?new n.UICheckbox(e,{name:"nofollow",ref:"nofollow_checkbox",label:"No follow"}):null,new n.UIBlock(e,[new o.UIButton(e,{name:"unlink",variant:"default",text:"Unlink"}),new o.UIButton(e,{name:"insert",type:"submit",variant:"primary",text:"Insert"})],{align:"full"})])}])},757:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.mediaFakeTag="jodit-media",o.Config.prototype.mediaInFakeBlock=!0,o.Config.prototype.mediaBlocks=["video","audio"],o.Config.prototype.mediaWrappers={}},20071:function(e,t,i){"use strict";var o=i(82758),n=i(2748),r=i(580),s=i(43555),a=i(41180);i(757),r.pluginSystem.add("media",function(e){let t="jodit_fake_wrapper",{mediaFakeTag:i,mediaBlocks:l,mediaInFakeBlock:c,mediaWrappers:d}=e.options,u=Object.values(d);u.length&&e.e.on("afterInit",()=>{let t=e=>[...new Set(e)].join(","),i=({tag:e,className:t})=>`.jodit-wysiwyg ${e}.${t}`,n=t(u.filter(({tag:e})=>o.IS_INLINE.test(e)).map(i)),s=t(u.flatMap(e=>l.map(t=>`${i(e)}>${t}`)));(0,r.getContainer)(e,"media-wrappers","style",!0).innerHTML=(n?`:where(${n}){display:inline-block}`:"")+`${s}{pointer-events:none}`}),(c||Object.keys(d).length)&&e.e.on("afterGetValueFromEditor",e=>{let o=RegExp(`<${i}[^>]+data-${t}[^>]+>([^]+?)</${i}>`,"ig");o.test(e.value)&&(e.value=e.value.replace(o,"$1"))}).on("change afterInit afterSetMode changePlace",e.async.debounce(()=>{e.isDestructed||e.getMode()===o.MODE_SOURCE||(0,s.$$)(l.join(","),e.editor).forEach(o=>{(0,s.dataBind)(o,t)||((0,s.dataBind)(o,t,!0),(o=>{var r;if(o.parentNode&&(0,s.attr)(o.parentNode,"data-jodit_iframe_wrapper"))o=o.parentNode;else if(d[o.nodeName.toLowerCase()])o=null!=(r=(0,s.getMediaWrapper)(e,o))?r:(0,s.wrapMedia)(e,o);else{if(!c)return;let r=e.createInside.element(i,{"data-jodit-temp":1,contenteditable:!1,draggable:!0,["data-"+t]:1});(0,s.attr)(r,"style",(0,s.attr)(o,"style")),(0,a.css)(r,{display:"inline-block"===(0,a.cssInline)(o,"display")?"inline-block":"block",width:o.offsetWidth,height:o.offsetHeight}),o.parentNode&&n.Dom.before(o,r),n.Dom.append(r,o),o=r}e.e.off(o,"mousedown.select touchstart.select").on(o,"mousedown.select touchstart.select",()=>{e.s.select(o)})})(o))})},e.defaultTimeout))})},37585:function(e,t,i){"use strict";var o=i(82758),n=i(21537),r=i(41180),s=i(6441),a=i(11676),l=i(21491);s.Config.prototype.mobileTapTimeout=300,s.Config.prototype.toolbarAdaptive=!0,s.Config.prototype.buttonsMD=[{group:"font-style",buttons:[]},{group:"list",buttons:[]},{group:"font",buttons:[]},"---",{group:"media",buttons:[]},`
|
|
229
229
|
`,{group:"state",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},"---",{group:"history",buttons:[]},{group:"other",buttons:[]},"|","dots"],s.Config.prototype.buttonsSM=[{group:"font-style",buttons:[]},{group:"list",buttons:[]},"---",{group:"font",buttons:[]},`
|
|
230
230
|
`,{group:"state",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},"---",{group:"history",buttons:[]},"|","dots"],s.Config.prototype.buttonsXS=[{group:"font-style",buttons:[]},{group:"list",buttons:[]},"---",{group:"font",buttons:[]},{group:"color",buttons:[]},"---","dots"],s.Config.prototype.controls.dots={mode:o.MODE_SOURCE+o.MODE_WYSIWYG,popup(e,t,i,o){let s=o.control.data;return void 0===s&&(s={toolbar:(0,l.makeCollection)(e),rebuild(){var t,i;if(o){let l=e.e.fire("getDiffButtons.mobile",o.closest(a.ToolbarCollection));if(l&&s){s.toolbar.build((0,n.splitArray)(l));let o=(null==(i=null==(t=e.toolbar)?void 0:t.firstButton)?void 0:i.container.offsetWidth)||36;(0,r.css)(s.toolbar.container,"width",(o+4)*3)}}}},o.control.data=s),s.rebuild(),s.toolbar},tooltip:"Show all"}},32309:function(e,t,i){"use strict";var o=i(2748),n=i(580),r=i(21537),s=i(70799),a=i(43649);i(37585);let l=e=>"|"===e||"---"===e||`
|
|
231
|
-
`===e;function c(e,t){var i;let o=(0,a.flatButtonsSet)((0,r.splitArray)(t.o.buttons),t),n=t.getRegisteredButtonGroups(),s=!1,c=!1,d=[];for(let t of e)if((0,a.isButtonGroup)(t)){let e=[...t.buttons,...null!=(i=n[t.group])?i:[]],r=e.filter(e=>o.has(e));r.length!==e.length&&(s=!0),d.push(...r)}else l(t)?d.push(t):"dots"===t?c=!0:o.has(t)?d.push(t):s=!0;if(!s)return e;let u=[];for(let e of d)l(e)&&(0===u.length||l(u[u.length-1]))||u.push(e);for(;u.length&&l(u[u.length-1]);)u.pop();if(c){let e=(0,a.flatButtonsSet)(u,t);(0,r.toArray)(o).some(t=>!e.has(t))&&u.push("dots")}return u}n.pluginSystem.add("mobile",function(e){let t=0,i=(0,r.splitArray)(e.o.buttons);e.o.mobileTapTimeout&&e.e.on("touchend",i=>{if(i.changedTouches&&i.changedTouches.length){let o=new Date().getTime(),n=o-t;n>e.o.mobileTapTimeout&&(t=o,n<1.5*e.o.mobileTapTimeout&&e.s.insertCursorAtPoint(i.clientX,i.clientY))}}),e.e.on("getDiffButtons.mobile",t=>{if(t===e.toolbar){let t=(0,a.flatButtonsSet)((0,r.splitArray)(e.o.buttons),e),o=(0,a.flatButtonsSet)(i,e);return(0,r.toArray)(t).reduce((e,t)=>(o.has(t)||e.push(t),e),[])}}),e.o.toolbarAdaptive&&e.e.on("resize afterInit recalcAdaptive changePlace afterAddPlace",()=>{var t;if(!e.o.toolbar)return;let n=(()=>{if(e.isFullSize)return(0,r.splitArray)(e.o.buttons);let t=function(e){var t;let{toolbar:i}=e.o;if((0,s.isString)(i)||o.Dom.isHTMLElement(i)){let t=e.toolbarContainer.offsetWidth;if(t)return t}return(null!=(t=e.container.parentElement)?t:e.container).offsetWidth}(e);return t>=e.o.sizeLG?(0,r.splitArray)(e.o.buttons):t>=e.o.sizeMD?c((0,r.splitArray)(e.o.buttonsMD),e):t>=e.o.sizeSM?c((0,r.splitArray)(e.o.buttonsSM),e):c((0,r.splitArray)(e.o.buttonsXS),e)})();n.toString()!==i.toString()&&(i=n,e.e.fire("closeAllPopups"),null==(t=e.toolbar)||t.setRemoveButtons(e.o.removeButtons).build(i.concat(e.o.extraButtons)))}).on(e.ow,"load resize",()=>e.e.fire("recalcAdaptive"))})},57951:function(e,t,i){"use strict";var o=i(86583),n=i(12153),r=i(6441),s=i(13465),a=i(50267);let l=(e,t,{control:i})=>{var n;let r="button"+i.command,s=null!=(n=i.args&&i.args[0])?n:(0,o.dataBind)(e,r);(0,o.dataBind)(e,r,s),e.execCommand(i.command,!1,"default"===s?null:s)};n.Icon.set("ol",s.default).set("ul",a.default),r.Config.prototype.controls.ul={command:"insertUnorderedList",tags:["ul"],tooltip:"Insert Unordered List",list:{default:"Default",circle:"Circle",disc:"Dot",square:"Quadrate"},exec:l},r.Config.prototype.controls.ol={command:"insertOrderedList",tags:["ol"],tooltip:"Insert Ordered List",list:{default:"Default","lower-alpha":"Lower Alpha","lower-greek":"Lower Greek","lower-roman":"Lower Roman","upper-alpha":"Upper Alpha","upper-roman":"Upper Roman"},exec:l}},13465:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M10.6667 6.6667h10.6666M10.6667 17.3333h10.6666" stroke-width="2.6667" stroke-linecap="butt"/><path d="m2.5 5 2.5-2v7M2.5 10h5M2.5 16a2.5 2.5 0 0 1 5 0c0 1.5-1.5 2.5-5 5h5" stroke-width="2" /> </g> </svg> '},50267:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M9.3333 5.3333h12M9.3333 12h12M9.3333 18.6667h12" stroke-width="2.6667" stroke-linecap="butt"/><path d="M4 5.3333h0M4 12h0M4 18.6667h0" stroke-width="3.2"/> </g> </svg> '},64837:function(e,t,i){"use strict";var o=i(65478),n=i(580),r=i(50911);i(57951);class s extends r.Plugin{afterInit(e){e.registerCommand("insertUnorderedList",this.onCommand).registerCommand("insertOrderedList",this.onCommand)}onCommand(e,t,i){return this.jodit.s.commitStyle({element:"insertunorderedlist"===e?"ul":"ol",attributes:{style:{listStyleType:null!=i?i:null}}}),this.jodit.synchronizeValues(),!1}beforeDestruct(e){}constructor(){super(...arguments),this.buttons=[{name:"ul",group:"list"},{name:"ol",group:"list"}]}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([o.autobind],s.prototype,"onCommand",null),n.pluginSystem.add("orderedList",s)},71842:function(e,t,i){"use strict";var o=i(82758),n=i(6441);n.Config.prototype.askBeforePasteFromWord=!0,n.Config.prototype.processPasteFromWord=!0,n.Config.prototype.defaultActionOnPasteFromWord=null,n.Config.prototype.pasteFromWordActionList=[{value:o.INSERT_AS_HTML,text:"Keep"},{value:o.INSERT_AS_TEXT,text:"Clean"},{value:o.INSERT_ONLY_TEXT,text:"Insert only Text"}]},31571:function(e,t,i){"use strict";i.d(t,{pasteFromWord:function(){return c}});var o=i(82758),n=i(65478),r=i(580),s=i(21537),a=i(50911);i(71842);var l=i(117);class c extends a.Plugin{afterInit(e){}beforeDestruct(e){}processWordHTML(e,t,i){let{j:o}=this,{processPasteFromWord:n,askBeforePasteFromWord:r,defaultActionOnPasteFromWord:a,defaultActionOnPaste:c,pasteFromWordActionList:d}=o.o;return!!(n&&(0,s.isHtmlFromWord)(t))&&(r?(0,l.askInsertTypeDialog)(o,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?","Word Paste Detected",o=>{this.insertFromWordByType(e,t,o,i)},d):this.insertFromWordByType(e,t,a||c,i),!0)}insertFromWordByType(e,t,i,n){var r;switch(i){case o.INSERT_AS_HTML:{t=(0,s.applyStyles)(t);let e=null==(r=this.j.events)?void 0:r.fire("beautifyHTML",t);(0,s.isString)(e)&&(t=e);break}case o.INSERT_AS_TEXT:t=(0,s.cleanFromWord)(t);break;case o.INSERT_ONLY_TEXT:t=(0,s.stripTags)((0,s.cleanFromWord)(t),this.j.ed,new Set(this.j.o.pasteExcludeStripTags),this.j.o.nl2brInPlainText)}(0,l.pasteInsertHtml)(e,this.j,t)}}c.requires=["paste"],function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,n.watch)(":processHTML")],c.prototype,"processWordHTML",null),r.pluginSystem.add("pasteFromWord",c)},85407:function(e,t,i){"use strict";var o=i(82758),n=i(2748),r=i(580),s=i(21537),a=i(20356),l=i(10830);class c extends a.Plugin{createDialog(){this.dialog=this.j.dlg();let e=(0,l.Button)(this.j,"paste","Paste","primary");e.onAction(this.paste);let t=(0,l.Button)(this.j,"","Cancel");t.onAction(this.dialog.close),this.container=this.j.c.div(),this.container.classList.add("jodit-paste-storage"),this.listBox=this.j.c.div(),this.previewBox=this.j.c.div(),n.Dom.append(this.container,this.listBox),n.Dom.append(this.container,this.previewBox),this.dialog.setHeader(this.j.i18n("Choose Content to Paste")),this.dialog.setContent(this.container),this.dialog.setFooter([e,t]),this.j.e.on(this.listBox,"click dblclick",e=>{let t=e.target;return n.Dom.isTag(t,"a")&&t.hasAttribute("data-index")&&this.selectIndex(parseInt((0,s.attr)(t,"-index")||"0",10)),"dblclick"===e.type&&this.paste(),!1})}afterInit(){this.j.e.off("afterCopy.paste-storage").on("pasteStorageList.paste-storage",()=>this.list.length).on("afterCopy.paste-storage",e=>{-1!==this.list.indexOf(e)&&this.list.splice(this.list.indexOf(e),1),this.list.unshift(e),this.list.length>5&&(this.list.length=5)}),this.j.registerCommand("showPasteStorage",{exec:this.showDialog,hotkeys:["ctrl+shift+v","cmd+shift+v"]})}beforeDestruct(){this.dialog&&this.dialog.destruct(),this.j.e.off(".paste-storage"),n.Dom.safeRemove(this.previewBox),n.Dom.safeRemove(this.listBox),n.Dom.safeRemove(this.container),this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.list=[]}constructor(){super(...arguments),this.currentIndex=0,this.list=[],this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.paste=()=>{if(this.j.s.focus(),this.j.s.insertHTML(this.list[this.currentIndex]),0!==this.currentIndex){let e=this.list[0];this.list[0]=this.list[this.currentIndex],this.list[this.currentIndex]=e}this.dialog&&this.dialog.close(),this.j.synchronizeValues(),this.j.e.fire("afterPaste")},this.onKeyDown=e=>{let t=this.currentIndex;if(-1!==[o.KEY_UP,o.KEY_DOWN,o.KEY_ENTER].indexOf(e.key)){if(e.key===o.KEY_UP&&(0===t?t=this.list.length-1:t-=1),e.key===o.KEY_DOWN&&(t===this.list.length-1?t=0:t+=1),e.key===o.KEY_ENTER)return void this.paste();t!==this.currentIndex&&this.selectIndex(t),e.stopImmediatePropagation(),e.preventDefault()}},this.selectIndex=e=>{this.listBox&&(0,s.toArray)(this.listBox.childNodes).forEach((t,i)=>{t.classList.remove("jodit_active"),e===i&&this.previewBox&&(t.classList.add("jodit_active"),this.previewBox.innerHTML=this.list[e],t.focus())}),this.currentIndex=e},this.showDialog=()=>{this.list.length<2||(this.dialog||this.createDialog(),this.listBox&&n.Dom.detach(this.listBox),this.previewBox&&n.Dom.detach(this.previewBox),this.list.forEach((e,t)=>{let i=this.j.c.element("a");i.textContent=t+1+". "+e.replace((0,o.SPACE_REG_EXP)(),""),this.j.e.on(i,"keydown",this.onKeyDown),(0,s.attr)(i,"href","#"),(0,s.attr)(i,"data-index",t.toString()),(0,s.attr)(i,"tab-index","-1"),this.listBox&&n.Dom.append(this.listBox,i)}),this.dialog&&this.dialog.open(),this.j.async.setTimeout(()=>{this.selectIndex(0)},100))}}}r.pluginSystem.add("pasteStorage",c)},84380:function(e,t,i){"use strict";var o=i(82758),n=i(6441),r=i(117);n.Config.prototype.askBeforePasteHTML=!0,n.Config.prototype.processPasteHTML=!0,n.Config.prototype.scrollToPastedContent=!0,n.Config.prototype.pasteExcludeStripTags=["br","hr"],n.Config.prototype.pasteHTMLActionList=[{value:o.INSERT_AS_HTML,text:"Keep"},{value:o.INSERT_AS_TEXT,text:"Insert as Text"},{value:o.INSERT_ONLY_TEXT,text:"Insert only Text"}],n.Config.prototype.memorizeChoiceWhenPasteFragment=!1,n.Config.prototype.nl2brInPlainText=!0;let s="pasteStorage";n.Config.prototype.controls.paste={tooltip:"Paste from clipboard",async exec(e,t,{control:i}){var n;if(i.name===s)return void e.execCommand("showPasteStorage");e.s.focus();let a="",l=!0;if(navigator.clipboard){try{let e=await navigator.clipboard.read();if(e&&e.length){let t=e[0],i=(null==(n=t.types)?void 0:n.includes(o.TEXT_HTML))?o.TEXT_HTML:o.TEXT_PLAIN,r=await t.getType(i);a=await new Response(r).text()}l=!1}catch(e){o.IS_PROD}if(l)try{a=await navigator.clipboard.readText(),l=!1}catch(e){o.IS_PROD}}l&&(l=0===(a=e.buffer.get(o.CLIPBOARD_ID)||"").length);let c=e.value;l?(e.ed.execCommand("paste"),(l=c===e.value)||e.e.fire("afterPaste")):a.length?((0,r.pasteInsertHtml)(null,e,a),e.e.fire("afterPaste")):l&&e.alert("Your browser doesn't support direct access to the clipboard.",()=>void e.s.focus())},list:{[s]:"Paste Storage"},isChildDisabled:e=>2>e.e.fire("pasteStorageList")}},117:function(e,t,i){"use strict";i.d(t,{askInsertTypeDialog:function(){return c},getAllTypes:function(){return l},pasteInsertHtml:function(){return a}});var o=i(82758),n=i(2748),r=i(27613),s=i(10830);function a(e,t,i){var o;let s,a;if(t.isInDestruct)return;e&&"drop"===e.type&&t.s.insertCursorAtPoint(e.clientX,e.clientY);let l=t.e.fire("beforePasteInsert",i);!(0,r.isVoid)(l)&&((0,r.isString)(l)||(0,r.isNumber)(l)||n.Dom.isNode(l))&&(i=l),(0,r.isString)(i)&&(-1!==(s=(o=(o=i).replace(/<meta[^>]+?>/g,"")).search(/<!--StartFragment-->/i))&&(o=o.substring(s+20)),-1!==(a=o.search(/<!--EndFragment-->/i))&&(o=o.substring(0,a)),i=o),t.s.insertHTML(i)}function l(e){let t=e.types,i="";if((0,r.isArray)(t)||"[object DOMStringList]"===({}).toString.call(t))for(let e=0;e<t.length;e+=1)i+=t[e]+";";else i=(t||o.TEXT_PLAIN).toString()+";";return i}function c(e,t,i,o,n){if(!1===e.e.fire("beforeOpenPasteDialog",t,i,o,n))return;let r=e.confirm(`<div style="word-break: normal; white-space: normal">${e.i18n(t)}</div>`,e.i18n(i)),a=n.map(({text:t,value:i})=>(0,s.Button)(e,{text:t,name:t.toLowerCase(),tabIndex:0}).onAction(()=>{r.close(),o(i)}));r.e.on(r,"beforeClose",()=>{e.e.fire("beforeClosePasteDialog",r)}).one(r,"afterClose",()=>{e.s.isFocused()||e.s.focus(),e.e.fire("afterClosePasteDialog",r)});let l=(0,s.Button)(e,{text:"Cancel",tabIndex:0}).onAction(()=>{r.close()});return r.setFooter([...a,l]),a[0].focus(),a[0].state.variant="primary",e.e.fire("afterOpenPasteDialog",r,t,i,o,n),r}},79799:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(20356);i(84380);var c=i(117),d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class u extends l.Plugin{afterInit(e){e.e.on("paste.paste",this.onPaste).on("pasteStack.paste",e=>this.pasteStack.push(e)),this.j.e.on("processPaste.paste",this.onProcessPasteReplaceNl2Br)}beforeDestruct(e){e.e.off("paste.paste",this.onPaste).off("processPaste.paste",this.onProcessPasteReplaceNl2Br).off(".paste")}onPaste(e){try{if(!1===this.customPasteProcess(e)||!1===this.j.e.fire("beforePaste",e))return e.preventDefault(),!1;this.defaultPasteProcess(e)}finally{this.j.e.fire("afterPaste",e)}}customPasteProcess(e){if(!this.j.o.processPasteHTML)return;let t=(0,a.getDataTransfer)(e),i=[null==t?void 0:t.getData(o.TEXT_PLAIN),null==t?void 0:t.getData(o.TEXT_HTML),null==t?void 0:t.getData(o.TEXT_RTF)];for(let t of i)if((0,a.isHTML)(t)&&(this.j.e.fire("processHTML",e,t,{plain:i[0],html:i[1],rtf:i[2]})||this.processHTML(e,t)))return!1}defaultPasteProcess(e){let t=(0,a.getDataTransfer)(e),i=(null==t?void 0:t.getData(o.TEXT_HTML))||(null==t?void 0:t.getData(o.TEXT_PLAIN));if(t&&i&&""!==(0,a.trim)(i)){let o=this.j.e.fire("processPaste",e,i,(0,c.getAllTypes)(t));void 0!==o&&(i=o),((0,a.isString)(i)||r.Dom.isNode(i))&&this.__insertByType(e,i,this.j.o.defaultActionOnPaste),e.preventDefault(),e.stopPropagation()}}processHTML(e,t){if(!this.j.o.askBeforePasteHTML)return!1;if(this.j.o.memorizeChoiceWhenPasteFragment){let i=this.pasteStack.find(e=>e.html===t);if(i)return this.__insertByType(e,t,i.action||this.j.o.defaultActionOnPaste),!0}if(this._isDialogOpened)return!0;let i=(0,c.askInsertTypeDialog)(this.j,"Your code is similar to HTML. Keep as HTML?","Paste as HTML",i=>{this._isDialogOpened=!1,this.__insertByType(e,t,i)},this.j.o.pasteHTMLActionList);return i&&(this._isDialogOpened=!0,i.e.on("beforeClose",()=>{this._isDialogOpened=!1})),!0}__insertByType(e,t,i){if(this.pasteStack.push({html:t,action:i}),(0,a.isString)(t))switch(this.j.buffer.set(o.CLIPBOARD_ID,t),i){case o.INSERT_CLEAR_HTML:t=(0,a.cleanFromWord)(t);break;case o.INSERT_ONLY_TEXT:t=(0,a.stripTags)(t,this.j.ed,new Set(this.j.o.pasteExcludeStripTags),this.j.o.nl2brInPlainText);break;case o.INSERT_AS_TEXT:t=(0,a.htmlspecialchars)(t),this.j.o.nl2brInPlainText&&(t=(0,a.nl2br)(t));break;default:{let o=this.j.e.fire("onCustomPasteHTMLOption",i,t,e);"string"==typeof o&&(t=o)}}(0,c.pasteInsertHtml)(e,this.j,t)}onProcessPasteReplaceNl2Br(e,t,i){if(i===o.TEXT_PLAIN+";"&&!(0,a.isHTML)(t)){let e=(0,a.htmlspecialchars)(t);return this.j.o.nl2brInPlainText?(0,a.nl2br)(e):e}}constructor(){super(...arguments),this.pasteStack=new a.LimitedStack(20),this._isDialogOpened=!1}}d([n.autobind],u.prototype,"onPaste",null),d([n.autobind],u.prototype,"onProcessPasteReplaceNl2Br",null),s.pluginSystem.add("paste",u)},61926:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.showPlaceholder=!0,o.Config.prototype.placeholder="Type something",o.Config.prototype.useInputsPlaceholder=!0},59451:function(e,t,i){"use strict";i.d(t,{isEditorEmpty:function(){return u}});var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(78116),l=i(29960),c=i(41180),d=i(20356);function u(e){var t;if(!e.firstChild)return!0;let i=e.firstChild;if(o.INSEPARABLE_TAGS.has(null==(t=i.nodeName)?void 0:t.toLowerCase())||/^(TABLE)$/i.test(i.nodeName))return!1;let n=r.Dom.next(i,e=>e&&!r.Dom.isEmptyTextNode(e),e);return r.Dom.isText(i)&&!n?r.Dom.isEmptyTextNode(i):!n&&r.Dom.each(i,e=>!(r.Dom.isLeaf(e)||r.Dom.isList(e))&&(r.Dom.isEmpty(e)||r.Dom.isTag(e,"br")))}i(61926);class h extends d.Plugin{afterInit(e){e.o.showPlaceholder&&(this.placeholderElm=e.c.fromHTML(`<span data-ref="placeholder" style="display: none;" class="jodit-placeholder">${e.i18n(e.o.placeholder)}</span>`),"rtl"===e.o.direction&&(0,c.css)(this.placeholderElm,{right:0,direction:"rtl"}),e.e.on("readonly",e=>{e?this.hide():this.toggle()}).on("changePlace",this.addEvents),this.addEvents())}show(){let e=this.j;if(e.o.readonly)return;let t=0,i=0,o=e.s.current(),n=o&&r.Dom.closest(o,r.Dom.isBlock,e.editor)||e.editor,s=e.ew.getComputedStyle(n),l=e.ew.getComputedStyle(e.editor);r.Dom.append(e.workplace,this.placeholderElm);let{firstChild:d}=e.editor;if(r.Dom.isElement(d)&&!(0,a.isMarker)(d)){let o=e.ew.getComputedStyle(d);t=parseInt(o.getPropertyValue("margin-top"),10),i=parseInt(o.getPropertyValue("margin-left"),10),(0,c.css)(this.placeholderElm,{fontSize:parseInt(o.getPropertyValue("font-size"),10),lineHeight:o.getPropertyValue("line-height")})}else(0,c.css)(this.placeholderElm,{fontSize:parseInt(s.getPropertyValue("font-size"),10),lineHeight:s.getPropertyValue("line-height")});(0,c.css)(this.placeholderElm,{display:"block",textAlign:s.getPropertyValue("text-align"),paddingTop:parseInt(l.paddingTop,10)+"px",paddingLeft:parseInt(l.paddingLeft,10)+"px",paddingRight:parseInt(l.paddingRight,10)+"px",marginTop:Math.max(parseInt(s.getPropertyValue("margin-top"),10),t),marginLeft:Math.max(parseInt(s.getPropertyValue("margin-left"),10),i)})}hide(){r.Dom.safeRemove(this.placeholderElm)}toggle(){let e=this.j;if(e.editor&&!e.isInDestruct){if(e.getRealMode()!==o.MODE_WYSIWYG)return void this.hide();u(e.editor)?this.show():this.hide()}}beforeDestruct(e){this.hide(),e.e.off(".placeholder").off(window,"load",this.toggle)}constructor(){super(...arguments),this.addNativeListeners=()=>{this.j.e.off(this.j.editor,"input.placeholder keydown.placeholder").on(this.j.editor,"input.placeholder keydown.placeholder",this.toggle)},this.addEvents=()=>{let e=this.j;e.o.useInputsPlaceholder&&e.element.hasAttribute("placeholder")&&(this.placeholderElm.innerHTML=(0,l.attr)(e.element,"placeholder")||""),e.e.fire("placeholder",this.placeholderElm.innerHTML),e.e.off(".placeholder").on("changePlace.placeholder",this.addNativeListeners).on("change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder mousedown.placeholder afterSetMode.placeholder changePlace.placeholder internalChange.placeholder afterCommand.placeholder",this.toggle).on(window,"load",this.toggle),this.addNativeListeners(),this.toggle()}}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,n.debounce)(e=>e.defaultTimeout/10,!0)],h.prototype,"toggle",null),s.pluginSystem.add("placeholder",h)},18363:function(e,t,i){"use strict";i(580).pluginSystem.add("poweredByJodit",function(e){let{o:t}=e;!t.hidePoweredByJodit&&!t.inline&&(t.showCharsCounter||t.showWordsCounter||t.showXPathInStatusbar)&&e.hookStatus("ready",()=>{e.statusbar.append(e.create.fromHTML(`<a
|
|
231
|
+
`===e;function c(e,t){var i;let o=(0,a.flatButtonsSet)((0,r.splitArray)(t.o.buttons),t),n=t.getRegisteredButtonGroups(),s=!1,c=!1,d=[];for(let t of e)if((0,a.isButtonGroup)(t)){let e=[...t.buttons,...null!=(i=n[t.group])?i:[]],r=e.filter(e=>o.has(e));r.length!==e.length&&(s=!0),d.push(...r)}else l(t)?d.push(t):"dots"===t?c=!0:o.has(t)?d.push(t):s=!0;if(!s)return e;let u=[];for(let e of d)l(e)&&(0===u.length||l(u[u.length-1]))||u.push(e);for(;u.length&&l(u[u.length-1]);)u.pop();if(c){let e=(0,a.flatButtonsSet)(u,t);(0,r.toArray)(o).some(t=>!e.has(t))&&u.push("dots")}return u}n.pluginSystem.add("mobile",function(e){let t=0,i=(0,r.splitArray)(e.o.buttons);e.o.mobileTapTimeout&&e.e.on("touchend",i=>{if(i.changedTouches&&i.changedTouches.length){let o=new Date().getTime(),n=o-t;n>e.o.mobileTapTimeout&&(t=o,n<1.5*e.o.mobileTapTimeout&&e.s.insertCursorAtPoint(i.clientX,i.clientY))}}),e.e.on("getDiffButtons.mobile",t=>{if(t===e.toolbar){let t=(0,a.flatButtonsSet)((0,r.splitArray)(e.o.buttons),e),o=(0,a.flatButtonsSet)(i,e);return(0,r.toArray)(t).reduce((e,t)=>(o.has(t)||e.push(t),e),[])}}),e.o.toolbarAdaptive&&e.e.on("resize afterInit recalcAdaptive changePlace afterAddPlace",()=>{var t;if(!e.o.toolbar)return;let n=(()=>{if(e.isFullSize)return(0,r.splitArray)(e.o.buttons);let t=function(e){var t;let{toolbar:i}=e.o;if((0,s.isString)(i)||o.Dom.isHTMLElement(i)){let t=e.toolbarContainer.offsetWidth;if(t)return t}return(null!=(t=e.container.parentElement)?t:e.container).offsetWidth}(e);return t>=e.o.sizeLG?(0,r.splitArray)(e.o.buttons):t>=e.o.sizeMD?c((0,r.splitArray)(e.o.buttonsMD),e):t>=e.o.sizeSM?c((0,r.splitArray)(e.o.buttonsSM),e):c((0,r.splitArray)(e.o.buttonsXS),e)})();n.toString()!==i.toString()&&(i=n,e.e.fire("closeAllPopups"),null==(t=e.toolbar)||t.setRemoveButtons(e.o.removeButtons).build(i.concat(e.o.extraButtons)))}).on(e.ow,"load resize",()=>e.e.fire("recalcAdaptive"))})},57951:function(e,t,i){"use strict";var o=i(86583),n=i(12153),r=i(6441),s=i(13465),a=i(50267);let l=(e,t,{control:i})=>{var n;let r="button"+i.command,s=null!=(n=i.args&&i.args[0])?n:(0,o.dataBind)(e,r);(0,o.dataBind)(e,r,s),e.execCommand(i.command,!1,"default"===s?null:s)};n.Icon.set("ol",s.default).set("ul",a.default),r.Config.prototype.controls.ul={command:"insertUnorderedList",tags:["ul"],tooltip:"Insert Unordered List",list:{default:"Default",circle:"Circle",disc:"Dot",square:"Quadrate"},exec:l},r.Config.prototype.controls.ol={command:"insertOrderedList",tags:["ol"],tooltip:"Insert Ordered List",list:{default:"Default","lower-alpha":"Lower Alpha","lower-greek":"Lower Greek","lower-roman":"Lower Roman","upper-alpha":"Upper Alpha","upper-roman":"Upper Roman"},exec:l}},13465:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M10.6667 6.6667h10.6666M10.6667 17.3333h10.6666" stroke-width="2.6667" stroke-linecap="butt"/><path d="m2.5 5 2.5-2v7M2.5 10h5M2.5 16a2.5 2.5 0 0 1 5 0c0 1.5-1.5 2.5-5 5h5" stroke-width="2" /> </g> </svg> '},50267:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M9.3333 5.3333h12M9.3333 12h12M9.3333 18.6667h12" stroke-width="2.6667" stroke-linecap="butt"/><path d="M4 5.3333h0M4 12h0M4 18.6667h0" stroke-width="3.2"/> </g> </svg> '},64837:function(e,t,i){"use strict";var o=i(65478),n=i(580),r=i(50911);i(57951);class s extends r.Plugin{afterInit(e){e.registerCommand("insertUnorderedList",this.onCommand).registerCommand("insertOrderedList",this.onCommand)}onCommand(e,t,i){return this.jodit.s.commitStyle({element:"insertunorderedlist"===e?"ul":"ol",attributes:{style:{listStyleType:null!=i?i:null}}}),this.jodit.synchronizeValues(),!1}beforeDestruct(e){}constructor(){super(...arguments),this.buttons=[{name:"ul",group:"list"},{name:"ol",group:"list"}]}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([o.autobind],s.prototype,"onCommand",null),n.pluginSystem.add("orderedList",s)},71842:function(e,t,i){"use strict";var o=i(82758),n=i(6441);n.Config.prototype.askBeforePasteFromWord=!0,n.Config.prototype.processPasteFromWord=!0,n.Config.prototype.defaultActionOnPasteFromWord=null,n.Config.prototype.pasteFromWordActionList=[{value:o.INSERT_AS_HTML,text:"Keep"},{value:o.INSERT_AS_TEXT,text:"Clean"},{value:o.INSERT_ONLY_TEXT,text:"Insert only Text"}]},31571:function(e,t,i){"use strict";i.d(t,{pasteFromWord:function(){return c}});var o=i(82758),n=i(65478),r=i(580),s=i(21537),a=i(50911);i(71842);var l=i(117);class c extends a.Plugin{afterInit(e){}beforeDestruct(e){}processWordHTML(e,t,i){let{j:o}=this,{processPasteFromWord:n,askBeforePasteFromWord:r,defaultActionOnPasteFromWord:a,defaultActionOnPaste:c,pasteFromWordActionList:d}=o.o;return!!(n&&(0,s.isHtmlFromWord)(t))&&(r?(0,l.askInsertTypeDialog)(o,"The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?","Word Paste Detected",o=>{this.insertFromWordByType(e,t,o,i)},d):this.insertFromWordByType(e,t,a||c,i),!0)}insertFromWordByType(e,t,i,n){var r;switch(i){case o.INSERT_AS_HTML:{t=(0,s.applyStyles)(t);let e=null==(r=this.j.events)?void 0:r.fire("beautifyHTML",t);(0,s.isString)(e)&&(t=e);break}case o.INSERT_AS_TEXT:t=(0,s.cleanFromWord)(t);break;case o.INSERT_ONLY_TEXT:t=(0,s.stripTags)((0,s.cleanFromWord)(t),this.j.ed,new Set(this.j.o.pasteExcludeStripTags),this.j.o.nl2brInPlainText)}(0,l.pasteInsertHtml)(e,this.j,t)}}c.requires=["paste"],function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,n.watch)(":processHTML")],c.prototype,"processWordHTML",null),r.pluginSystem.add("pasteFromWord",c)},85407:function(e,t,i){"use strict";var o=i(82758),n=i(2748),r=i(580),s=i(21537),a=i(20356),l=i(10830);class c extends a.Plugin{createDialog(){this.dialog=this.j.dlg();let e=(0,l.Button)(this.j,"paste","Paste","primary");e.onAction(this.paste);let t=(0,l.Button)(this.j,"","Cancel");t.onAction(this.dialog.close),this.container=this.j.c.div(),this.container.classList.add("jodit-paste-storage"),this.listBox=this.j.c.div(),this.previewBox=this.j.c.div(),n.Dom.append(this.container,this.listBox),n.Dom.append(this.container,this.previewBox),this.dialog.setHeader(this.j.i18n("Choose Content to Paste")),this.dialog.setContent(this.container),this.dialog.setFooter([e,t]),this.j.e.on(this.listBox,"click dblclick",e=>{let t=e.target;return n.Dom.isTag(t,"a")&&t.hasAttribute("data-index")&&this.selectIndex(parseInt((0,s.attr)(t,"-index")||"0",10)),"dblclick"===e.type&&this.paste(),!1})}afterInit(){this.j.e.off("afterCopy.paste-storage").on("pasteStorageList.paste-storage",()=>this.list.length).on("afterCopy.paste-storage",e=>{-1!==this.list.indexOf(e)&&this.list.splice(this.list.indexOf(e),1),this.list.unshift(e),this.list.length>5&&(this.list.length=5)}),this.j.registerCommand("showPasteStorage",{exec:this.showDialog,hotkeys:["ctrl+shift+v","cmd+shift+v"]})}beforeDestruct(){this.dialog&&this.dialog.destruct(),this.j.e.off(".paste-storage"),n.Dom.safeRemove(this.previewBox),n.Dom.safeRemove(this.listBox),n.Dom.safeRemove(this.container),this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.list=[]}constructor(){super(...arguments),this.currentIndex=0,this.list=[],this.container=null,this.listBox=null,this.previewBox=null,this.dialog=null,this.paste=()=>{if(this.j.s.focus(),this.j.s.insertHTML(this.list[this.currentIndex]),0!==this.currentIndex){let e=this.list[0];this.list[0]=this.list[this.currentIndex],this.list[this.currentIndex]=e}this.dialog&&this.dialog.close(),this.j.synchronizeValues(),this.j.e.fire("afterPaste")},this.onKeyDown=e=>{let t=this.currentIndex;if(-1!==[o.KEY_UP,o.KEY_DOWN,o.KEY_ENTER].indexOf(e.key)){if(e.key===o.KEY_UP&&(0===t?t=this.list.length-1:t-=1),e.key===o.KEY_DOWN&&(t===this.list.length-1?t=0:t+=1),e.key===o.KEY_ENTER)return void this.paste();t!==this.currentIndex&&this.selectIndex(t),e.stopImmediatePropagation(),e.preventDefault()}},this.selectIndex=e=>{this.listBox&&(0,s.toArray)(this.listBox.childNodes).forEach((t,i)=>{t.classList.remove("jodit_active"),e===i&&this.previewBox&&(t.classList.add("jodit_active"),this.previewBox.innerHTML=this.list[e],t.focus())}),this.currentIndex=e},this.showDialog=()=>{this.list.length<2||(this.dialog||this.createDialog(),this.listBox&&n.Dom.detach(this.listBox),this.previewBox&&n.Dom.detach(this.previewBox),this.list.forEach((e,t)=>{let i=this.j.c.element("a");i.textContent=t+1+". "+e.replace((0,o.SPACE_REG_EXP)(),""),this.j.e.on(i,"keydown",this.onKeyDown),(0,s.attr)(i,"href","#"),(0,s.attr)(i,"data-index",t.toString()),(0,s.attr)(i,"tab-index","-1"),this.listBox&&n.Dom.append(this.listBox,i)}),this.dialog&&this.dialog.open(),this.j.async.setTimeout(()=>{this.selectIndex(0)},100))}}}r.pluginSystem.add("pasteStorage",c)},84380:function(e,t,i){"use strict";var o=i(82758),n=i(6441),r=i(117);n.Config.prototype.askBeforePasteHTML=!0,n.Config.prototype.processPasteHTML=!0,n.Config.prototype.scrollToPastedContent=!0,n.Config.prototype.pasteExcludeStripTags=["br","hr"],n.Config.prototype.pasteHTMLActionList=[{value:o.INSERT_AS_HTML,text:"Keep"},{value:o.INSERT_AS_TEXT,text:"Insert as Text"},{value:o.INSERT_ONLY_TEXT,text:"Insert only Text"}],n.Config.prototype.memorizeChoiceWhenPasteFragment=!1,n.Config.prototype.nl2brInPlainText=!0;let s="pasteStorage";n.Config.prototype.controls.paste={tooltip:"Paste from clipboard",async exec(e,t,{control:i}){var n;if(i.name===s)return void e.execCommand("showPasteStorage");e.s.focus();let a="",l=!0;if(navigator.clipboard){try{let e=await navigator.clipboard.read();if(e&&e.length){let t=e[0],i=(null==(n=t.types)?void 0:n.includes(o.TEXT_HTML))?o.TEXT_HTML:o.TEXT_PLAIN,r=await t.getType(i);a=await new Response(r).text()}l=!1}catch(e){o.IS_PROD}if(l)try{a=await navigator.clipboard.readText(),l=!1}catch(e){o.IS_PROD}}l&&(l=0===(a=e.buffer.get(o.CLIPBOARD_ID)||"").length);let c=e.value;l?(e.ed.execCommand("paste"),(l=c===e.value)||e.e.fire("afterPaste")):a.length?((0,r.pasteInsertHtml)(null,e,a),e.e.fire("afterPaste")):l&&e.alert("Your browser doesn't support direct access to the clipboard.",()=>void e.s.focus())},list:{[s]:"Paste Storage"},isChildDisabled:e=>2>e.e.fire("pasteStorageList")}},117:function(e,t,i){"use strict";i.d(t,{askInsertTypeDialog:function(){return u},getAllTypes:function(){return d},pasteInsertHtml:function(){return c},removeGoogleDocsWrapper:function(){return l}});var o=i(82758),n=i(2748),r=i(4510),s=i(27613),a=i(10830);function l(e){if(!/<b\s[^>]*docs-internal-guid-/i.test(e))return e;let{body:t}=new DOMParser().parseFromString(e,"text/html");return(0,r.toArray)(t.querySelectorAll('b[id^="docs-internal-guid-"]')).forEach(n.Dom.unwrap),t.innerHTML}function c(e,t,i){var o;let r,a;if(t.isInDestruct)return;e&&"drop"===e.type&&t.s.insertCursorAtPoint(e.clientX,e.clientY);let c=t.e.fire("beforePasteInsert",i);!(0,s.isVoid)(c)&&((0,s.isString)(c)||(0,s.isNumber)(c)||n.Dom.isNode(c))&&(i=c),(0,s.isString)(i)&&(-1!==(r=(o=(o=l(i)).replace(/<meta[^>]+?>/g,"")).search(/<!--StartFragment-->/i))&&(o=o.substring(r+20)),-1!==(a=o.search(/<!--EndFragment-->/i))&&(o=o.substring(0,a)),i=o),t.s.insertHTML(i)}function d(e){let t=e.types,i="";if((0,s.isArray)(t)||"[object DOMStringList]"===({}).toString.call(t))for(let e=0;e<t.length;e+=1)i+=t[e]+";";else i=(t||o.TEXT_PLAIN).toString()+";";return i}function u(e,t,i,o,n){if(!1===e.e.fire("beforeOpenPasteDialog",t,i,o,n))return;let r=e.confirm(`<div style="word-break: normal; white-space: normal">${e.i18n(t)}</div>`,e.i18n(i)),s=n.map(({text:t,value:i})=>(0,a.Button)(e,{text:t,name:t.toLowerCase(),tabIndex:0}).onAction(()=>{r.close(),o(i)}));r.e.on(r,"beforeClose",()=>{e.e.fire("beforeClosePasteDialog",r)}).one(r,"afterClose",()=>{e.s.isFocused()||e.s.focus(),e.e.fire("afterClosePasteDialog",r)});let l=(0,a.Button)(e,{text:"Cancel",tabIndex:0}).onAction(()=>{r.close()});return r.setFooter([...s,l]),s[0].focus(),s[0].state.variant="primary",e.e.fire("afterOpenPasteDialog",r,t,i,o,n),r}},79799:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(20356);i(84380);var c=i(117),d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class u extends l.Plugin{afterInit(e){e.e.on("paste.paste",this.onPaste).on("pasteStack.paste",e=>this.pasteStack.push(e)),this.j.e.on("processPaste.paste",this.onProcessPasteReplaceNl2Br)}beforeDestruct(e){e.e.off("paste.paste",this.onPaste).off("processPaste.paste",this.onProcessPasteReplaceNl2Br).off(".paste")}onPaste(e){try{if(!1===this.customPasteProcess(e)||!1===this.j.e.fire("beforePaste",e))return e.preventDefault(),!1;this.defaultPasteProcess(e)}finally{this.j.e.fire("afterPaste",e)}}customPasteProcess(e){if(!this.j.o.processPasteHTML)return;let t=(0,a.getDataTransfer)(e),i=[null==t?void 0:t.getData(o.TEXT_PLAIN),null==t?void 0:t.getData(o.TEXT_HTML),null==t?void 0:t.getData(o.TEXT_RTF)];for(let t of i)if((0,a.isHTML)(t)&&(this.j.e.fire("processHTML",e,t,{plain:i[0],html:i[1],rtf:i[2]})||this.processHTML(e,t)))return!1}defaultPasteProcess(e){let t=(0,a.getDataTransfer)(e),i=(null==t?void 0:t.getData(o.TEXT_HTML))||(null==t?void 0:t.getData(o.TEXT_PLAIN));if(t&&i&&""!==(0,a.trim)(i)){let o=this.j.e.fire("processPaste",e,i,(0,c.getAllTypes)(t));void 0!==o&&(i=o),((0,a.isString)(i)||r.Dom.isNode(i))&&this.__insertByType(e,i,this.j.o.defaultActionOnPaste),e.preventDefault(),e.stopPropagation()}}processHTML(e,t){if(!this.j.o.askBeforePasteHTML)return!1;if(this.j.o.memorizeChoiceWhenPasteFragment){let i=this.pasteStack.find(e=>e.html===t);if(i)return this.__insertByType(e,t,i.action||this.j.o.defaultActionOnPaste),!0}if(this._isDialogOpened)return!0;let i=(0,c.askInsertTypeDialog)(this.j,"Your code is similar to HTML. Keep as HTML?","Paste as HTML",i=>{this._isDialogOpened=!1,this.__insertByType(e,t,i)},this.j.o.pasteHTMLActionList);return i&&(this._isDialogOpened=!0,i.e.on("beforeClose",()=>{this._isDialogOpened=!1})),!0}__insertByType(e,t,i){if(this.pasteStack.push({html:t,action:i}),(0,a.isString)(t))switch(this.j.buffer.set(o.CLIPBOARD_ID,t),i){case o.INSERT_CLEAR_HTML:t=(0,a.cleanFromWord)((0,c.removeGoogleDocsWrapper)(t));break;case o.INSERT_ONLY_TEXT:t=(0,a.stripTags)(t,this.j.ed,new Set(this.j.o.pasteExcludeStripTags),this.j.o.nl2brInPlainText);break;case o.INSERT_AS_TEXT:t=(0,a.htmlspecialchars)(t),this.j.o.nl2brInPlainText&&(t=(0,a.nl2br)(t));break;default:{let o=this.j.e.fire("onCustomPasteHTMLOption",i,t,e);"string"==typeof o&&(t=o)}}(0,c.pasteInsertHtml)(e,this.j,t)}onProcessPasteReplaceNl2Br(e,t,i){if(i===o.TEXT_PLAIN+";"&&!(0,a.isHTML)(t)){let e=(0,a.htmlspecialchars)(t);return this.j.o.nl2brInPlainText?(0,a.nl2br)(e):e}}constructor(){super(...arguments),this.pasteStack=new a.LimitedStack(20),this._isDialogOpened=!1}}d([n.autobind],u.prototype,"onPaste",null),d([n.autobind],u.prototype,"onProcessPasteReplaceNl2Br",null),s.pluginSystem.add("paste",u)},61926:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.showPlaceholder=!0,o.Config.prototype.placeholder="Type something",o.Config.prototype.useInputsPlaceholder=!0},59451:function(e,t,i){"use strict";i.d(t,{isEditorEmpty:function(){return u}});var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(78116),l=i(29960),c=i(41180),d=i(20356);function u(e){var t;if(!e.firstChild)return!0;let i=e.firstChild;if(o.INSEPARABLE_TAGS.has(null==(t=i.nodeName)?void 0:t.toLowerCase())||/^(TABLE)$/i.test(i.nodeName))return!1;let n=r.Dom.next(i,e=>e&&!r.Dom.isEmptyTextNode(e),e);return r.Dom.isText(i)&&!n?r.Dom.isEmptyTextNode(i):!n&&r.Dom.each(i,e=>!(r.Dom.isLeaf(e)||r.Dom.isList(e))&&(r.Dom.isEmpty(e)||r.Dom.isTag(e,"br")))}i(61926);class h extends d.Plugin{afterInit(e){e.o.showPlaceholder&&(this.placeholderElm=e.c.fromHTML(`<span data-ref="placeholder" style="display: none;" class="jodit-placeholder">${e.i18n(e.o.placeholder)}</span>`),"rtl"===e.o.direction&&(0,c.css)(this.placeholderElm,{right:0,direction:"rtl"}),e.e.on("readonly",e=>{e?this.hide():this.toggle()}).on("changePlace",this.addEvents),this.addEvents())}show(){let e=this.j;if(e.o.readonly)return;let t=0,i=0,o=e.s.current(),n=o&&r.Dom.closest(o,r.Dom.isBlock,e.editor)||e.editor,s=e.ew.getComputedStyle(n),l=e.ew.getComputedStyle(e.editor);r.Dom.append(e.workplace,this.placeholderElm);let{firstChild:d}=e.editor;if(r.Dom.isElement(d)&&!(0,a.isMarker)(d)){let o=e.ew.getComputedStyle(d);t=parseInt(o.getPropertyValue("margin-top"),10),i=parseInt(o.getPropertyValue("margin-left"),10),(0,c.css)(this.placeholderElm,{fontSize:parseInt(o.getPropertyValue("font-size"),10),lineHeight:o.getPropertyValue("line-height")})}else(0,c.css)(this.placeholderElm,{fontSize:parseInt(s.getPropertyValue("font-size"),10),lineHeight:s.getPropertyValue("line-height")});(0,c.css)(this.placeholderElm,{display:"block",textAlign:s.getPropertyValue("text-align"),paddingTop:parseInt(l.paddingTop,10)+"px",paddingLeft:parseInt(l.paddingLeft,10)+"px",paddingRight:parseInt(l.paddingRight,10)+"px",marginTop:Math.max(parseInt(s.getPropertyValue("margin-top"),10),t),marginLeft:Math.max(parseInt(s.getPropertyValue("margin-left"),10),i)})}hide(){r.Dom.safeRemove(this.placeholderElm)}toggle(){let e=this.j;if(e.editor&&!e.isInDestruct){if(e.getRealMode()!==o.MODE_WYSIWYG)return void this.hide();u(e.editor)?this.show():this.hide()}}beforeDestruct(e){this.hide(),e.e.off(".placeholder").off(window,"load",this.toggle)}constructor(){super(...arguments),this.addNativeListeners=()=>{this.j.e.off(this.j.editor,"input.placeholder keydown.placeholder").on(this.j.editor,"input.placeholder keydown.placeholder",this.toggle)},this.addEvents=()=>{let e=this.j;e.o.useInputsPlaceholder&&e.element.hasAttribute("placeholder")&&(this.placeholderElm.innerHTML=(0,l.attr)(e.element,"placeholder")||""),e.e.fire("placeholder",this.placeholderElm.innerHTML),e.e.off(".placeholder").on("changePlace.placeholder",this.addNativeListeners).on("change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder mousedown.placeholder afterSetMode.placeholder changePlace.placeholder internalChange.placeholder afterCommand.placeholder",this.toggle).on(window,"load",this.toggle),this.addNativeListeners(),this.toggle()}}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,n.debounce)(e=>e.defaultTimeout/10,!0)],h.prototype,"toggle",null),s.pluginSystem.add("placeholder",h)},18363:function(e,t,i){"use strict";i(580).pluginSystem.add("poweredByJodit",function(e){let{o:t}=e;!t.hidePoweredByJodit&&!t.inline&&(t.showCharsCounter||t.showWordsCounter||t.showXPathInStatusbar)&&e.hookStatus("ready",()=>{e.statusbar.append(e.create.fromHTML(`<a
|
|
232
232
|
tabindex="-1"
|
|
233
233
|
style="text-transform: uppercase"
|
|
234
234
|
class="jodit-status-bar-link"
|
|
@@ -240,7 +240,7 @@
|
|
|
240
240
|
body {
|
|
241
241
|
-webkit-print-color-adjust: exact;
|
|
242
242
|
}
|
|
243
|
-
}`,n.Dom.append(o.document.head,t),o.focus(),o.print()}},mode:o.MODE_SOURCE+o.MODE_WYSIWYG,tooltip:"Print"},r.pluginSystem.add("print",function(e){e.registerButton({name:"print"})})},17583:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M7 8V3h10v5M7 17H5a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2M17 12h.01"/><rect x="7" y="14" width="10" height="7" rx="1"/> </g> </svg> '},66863:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m15 4 6 6-6 6m6-6H10a7 7 0 0 0-5 12"/> </g> </svg> '},64489:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M9 4 3 10l6 6M3 10h11a7 7 0 0 1 5 12"/> </g> </svg> '},6687:function(e,t,i){"use strict";var o=i(82758),n=i(580),r=i(20356),s=i(12153),a=i(6441),l=i(66863),c=i(64489);s.Icon.set("redo",l.default).set("undo",c.default),a.Config.prototype.controls.redo={mode:o.MODE_SPLIT,isDisabled:e=>!e.history.canRedo(),tooltip:"Redo"},a.Config.prototype.controls.undo={mode:o.MODE_SPLIT,isDisabled:e=>!e.history.canUndo(),tooltip:"Undo"};class d extends r.Plugin{beforeDestruct(){}afterInit(e){let t=t=>(e.history[t](),!1);e.registerCommand("redo",{exec:t,hotkeys:["ctrl+y","ctrl+shift+z","cmd+y","cmd+shift+z"]}),e.registerCommand("undo",{exec:t,hotkeys:["ctrl+z","cmd+z"]})}constructor(){super(...arguments),this.buttons=[{name:"undo",group:"history"},{name:"redo",group:"history"}]}}n.pluginSystem.add("redoUndo",d)},37467:function(e,t,i){"use strict";i(6441).Config.prototype.tableAllowCellResize=!0},56113:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(41180),c=i(41409);i(37467);var d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let u="table_processor_observer-resize";class h extends c.Plugin{get module(){return this.j.getInstance("Table",this.j.o)}get isRTL(){return"rtl"===this.j.o.direction}showResizeHandle(){this.j.async.clearTimeout(this.hideTimeout),r.Dom.append(this.j.workplace,this.resizeHandler)}hideResizeHandle(){this.hideTimeout=this.j.async.setTimeout(()=>{r.Dom.safeRemove(this.resizeHandler)},{timeout:this.j.defaultTimeout,label:"hideResizer"})}onHandleMouseDown(e){let t;if(!this.j.isLocked){if(this.drag=!0,this.j.e.on(this.j.ow,"mouseup.resize-cells touchend.resize-cells",this.onMouseUp).on(this.j.ew,"mousemove.table touchmove.table",this.onMouseMove),this.startX=e.clientX,this.j.lock(u),this.resizeHandler.classList.add("jodit-table-resizer_moved"),this.minX=0,this.maxX=1e6,null!=this.wholeTable){let e=this.workTable.parentNode.getBoundingClientRect();this.minX=e.left,this.maxX=this.minX+e.width}else{let e=this.module.formalCoordinate(this.workTable,this.workCell,!0);this.module.formalMatrix(this.workTable,(i,n,r)=>{e[1]===r&&(t=i.getBoundingClientRect(),this.minX=Math.max(t.left+o.NEARBY/2,this.minX)),e[1]+(this.isRTL?-1:1)===r&&(t=i.getBoundingClientRect(),this.maxX=Math.min(t.left+t.width-o.NEARBY/2,this.maxX))})}return!1}}onMouseMove(e){if(!this.drag)return;this.j.e.fire("closeAllPopups");let t=e.clientX,i=(0,a.offset)(this.resizeHandler.parentNode||this.j.od.documentElement,this.j,this.j.od,!0);t<this.minX&&(t=this.minX),t>this.maxX&&(t=this.maxX),this.resizeDelta=t-this.startX+(this.j.o.iframe?i.left:0),(0,l.css)(this.resizeHandler,"left",t-(this.j.o.iframe?0:i.left)+"px");let o=this.j.s.sel;o&&o.removeAllRanges()}onMouseUp(e){(this.selectMode||this.drag)&&(this.selectMode=!1,this.j.unlock()),this.resizeHandler&&this.drag&&(this.drag=!1,this.j.e.off(this.j.ew,"mousemove.table touchmove.table",this.onMouseMove),this.resizeHandler.classList.remove("jodit-table-resizer_moved"),this.startX!==e.clientX&&(null==this.wholeTable?this.resizeColumns():this.resizeTable()),this.j.synchronizeValues(),this.j.s.focus())}resizeColumns(){let e=this.resizeDelta,t=[],i=this.module;i.setColumnWidthByDelta(this.workTable,i.formalCoordinate(this.workTable,this.workCell,!0)[1],e,!0,t);let o=(0,a.call)(this.isRTL?r.Dom.prev:r.Dom.next,this.workCell,r.Dom.isCell,this.workCell.parentNode);i.setColumnWidthByDelta(this.workTable,i.formalCoordinate(this.workTable,o)[1],-e,!1,t)}resizeTable(){let e=this.resizeDelta*(this.isRTL?-1:1),t=this.workTable.offsetWidth,i=(0,a.getContentWidth)(this.workTable.parentNode,this.j.ew),o=!this.wholeTable;if(this.isRTL?!o:o)(0,l.css)(this.workTable,"width",(t+e)/i*100+"%");else{let o=this.isRTL?"marginRight":"marginLeft",n=parseInt(this.j.ew.getComputedStyle(this.workTable)[o]||"0",10);(0,l.css)(this.workTable,{width:(t-e)/i*100+"%",[o]:(n+e)/i*100+"%"})}}setWorkCell(e,t=null){this.wholeTable=t,this.workCell=e,this.workTable=r.Dom.up(e,e=>r.Dom.isTag(e,"table"),this.j.editor)}calcHandlePosition(e,t,i=0,n=0){let s=(0,a.offset)(t,this.j,this.j.ed);if(i>o.NEARBY&&i<s.width-o.NEARBY)return void this.hideResizeHandle();let c=(0,a.offset)(this.j.workplace,this.j,this.j.od,!0),d=(0,a.offset)(e,this.j,this.j.ed);if((0,l.css)(this.resizeHandler,"left",(i<=o.NEARBY?s.left:s.left+s.width)-c.left+n+"px"),Object.assign(this.resizeHandler.style,{height:d.height+"px",top:d.top-c.top+"px"}),this.showResizeHandle(),i<=o.NEARBY){let e=(0,a.call)(this.isRTL?r.Dom.next:r.Dom.prev,t,r.Dom.isCell,t.parentNode);this.setWorkCell(e||t,!e||null)}else{let e=(0,a.call)(this.isRTL?r.Dom.prev:r.Dom.next,t,r.Dom.isCell,t.parentNode);this.setWorkCell(t,!!e&&null)}}afterInit(e){e.o.tableAllowCellResize&&e.e.off(this.j.ow,".resize-cells").off(".resize-cells").on("change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells",()=>{(0,a.$$)("table",e.editor).forEach(this.observe)}).on(this.j.ow,"scroll.resize-cells",()=>{if(!this.drag)return;let t=r.Dom.up(this.workCell,e=>r.Dom.isTag(e,"table"),e.editor);if(t){let e=t.getBoundingClientRect();(0,l.css)(this.resizeHandler,"top",e.top+"px")}}).on("beforeSetMode.resize-cells",()=>{let t=this.module;t.getAllSelectedCells().forEach(i=>{t.removeSelection(i),t.normalizeTable(r.Dom.closest(i,"table",e.editor))})})}observe(e){(0,a.dataBind)(e,u)||((0,a.dataBind)(e,u,!0),this.j.e.on(e,"mouseleave.resize-cells",e=>{this.resizeHandler&&this.resizeHandler!==e.relatedTarget&&this.hideResizeHandle()}).on(e,"mousemove.resize-cells touchmove.resize-cells",this.j.async.throttle(t=>{if(this.j.isLocked)return;let i=r.Dom.up(t.target,r.Dom.isCell,e);i&&this.calcHandlePosition(e,i,t.offsetX)},{timeout:this.j.defaultTimeout})),this.createResizeHandle())}beforeDestruct(e){e.events&&(e.e.off(this.j.ow,".resize-cells"),e.e.off(".resize-cells"))}constructor(){super(...arguments),this.selectMode=!1,this.resizeDelta=0,this.createResizeHandle=()=>{this.resizeHandler||(this.resizeHandler=this.j.c.div("jodit-table-resizer"),this.j.e.on(this.resizeHandler,"mousedown.table touchstart.table",this.onHandleMouseDown).on(this.resizeHandler,"mouseenter.table",()=>{this.j.async.clearTimeout(this.hideTimeout)}))},this.hideTimeout=0,this.drag=!1,this.minX=0,this.maxX=0,this.startX=0}}d([n.autobind],h.prototype,"onHandleMouseDown",null),d([n.autobind],h.prototype,"onMouseMove",null),d([n.autobind],h.prototype,"onMouseUp",null),d([n.autobind],h.prototype,"observe",null),s.pluginSystem.add("resizeCells",h)},68252:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.allowResizeX=!1,o.Config.prototype.allowResizeY=!0},9159:function(e,t,i){"use strict";var o=i(65478),n=i(22732),r=i(580),s=i(21537),a=i(41180),l=i(50911),c=i(67510);i(68252);var d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class u extends l.Plugin{afterInit(e){let{height:t,width:i,allowResizeX:o}=e.o,{allowResizeY:r}=e.o;"auto"===t&&"auto"!==i&&(r=!1),("auto"!==t||"auto"!==i)&&(o||r)&&(e.statusbar.setMod("resize-handle",!0),e.statusbar.show(),e.e.on("toggleFullSize.resizeHandler",()=>{(0,a.css)(this.handle,"display",e.isFullSize?"none":"block")}).on(this.handle,"mousedown touchstart",this.onHandleResizeStart).on(e.ow,"mouseup touchend",this.onHandleResizeEnd),n.Dom.append(e.container,this.handle))}onHandleResizeStart(e){this.isResized=!0,this.start.x=e.clientX,this.start.y=e.clientY,this.start.w=this.j.container.offsetWidth,this.start.h=this.j.container.offsetHeight,this.j.lock(),this.j.e.on(this.j.ow,"mousemove touchmove",this.onHandleResize),e.preventDefault()}onHandleResize(e){if(!this.isResized)return;let{clientX:t,clientY:i}=e;if(e.view===this.j.ew&&this.j.ew!==this.j.ow){let e=(0,s.offset)(this.j.workplace,this.j,this.j.od,!0);t+=e.left,i+=e.top}this.j.o.allowResizeY&&this.j.e.fire("setHeight",this.start.h+i-this.start.y),this.j.o.allowResizeX&&this.j.e.fire("setWidth",this.start.w+t-this.start.x),this.j.e.fire("resize")}onHandleResizeEnd(){this.isResized&&(this.isResized=!1,this.j.e.off(this.j.ow,"mousemove touchmove",this.onHandleResize),this.j.unlock())}beforeDestruct(){n.Dom.safeRemove(this.handle),this.j.e.off(this.j.ow,"mouseup touchsend",this.onHandleResizeEnd)}constructor(){super(...arguments),this.isResized=!1,this.start={x:0,y:0,w:0,h:0},this.handle=this.j.c.div("jodit-editor__resize",c.Icon.get("resize_handler"))}}u.requires=["size"],d([o.autobind],u.prototype,"onHandleResizeStart",null),d([o.autobind],u.prototype,"onHandleResize",null),d([o.autobind],u.prototype,"onHandleResizeEnd",null),r.pluginSystem.add("resizeHandler",u)},71675:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.allowResizeTags=new Set(["img","iframe","table","jodit"]),o.Config.prototype.resizer={showSize:!0,hideSizeTimeout:1e3,forImageChangeAttributes:!0,min_width:10,min_height:10,useAspectRatio:new Set(["img"])}},12019:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(41180),c=i(20356);i(71675);var d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let u="__jodit-resizer_binded";function h(e,t){var i;let o=null==(i=(0,a.attr)(e,t))?void 0:i.trim();return o&&/^\d+(\.\d+)?(px)?$/i.test(o)?parseFloat(o):0}class p extends c.Plugin{afterInit(e){(0,a.$$)("div",this.rect).forEach(t=>{e.e.on(t,"mousedown.resizer touchstart.resizer",this.onStartResizing.bind(this,t))}),s.eventEmitter.on("hideHelpers",this.hide),e.e.on("readonly",e=>{e&&this.hide()}).on("afterInit changePlace",this.addEventListeners.bind(this)).on("afterGetValueFromEditor.resizer",e=>{let t=/<jodit[^>]+data-jodit_iframe_wrapper[^>]+>(.*?<iframe[^>]*>.*?<\/iframe>.*?)<\/jodit>/gi;t.test(e.value)&&(e.value=e.value.replace(t,"$1"))}),this.addEventListeners(),this.__onChangeEditor()}onEditorClick(e){let t=e.target,{editor:i,options:{allowResizeTags:o}}=this.j;for(;t&&t!==i;){if(r.Dom.isTag(t,o)){this.__bind(t),this.onClickElement(t);return}t=t.parentNode}}__afterInsertImage(e){if(this.j.o.resizer.forImageChangeAttributes)return;let t=(0,a.attr)(e,"width");t&&!(0,l.cssInline)(e,"width")&&((0,a.css)(e,"width",t),(0,a.attr)(e,"width",null))}addEventListeners(){let e=this.j;e.e.off(e.editor,".resizer").off(e.ow,".resizer").on(e.editor,"keydown.resizer",e=>{this.isShown&&e.key===o.KEY_DELETE&&this.element&&!r.Dom.isTag(this.element,"table")&&this.onDelete(e)}).on(e.ow,"resize.resizer",this.updateSize).on("resize.resizer",this.updateSize).on([e.ow,e.editor],"scroll.resizer",()=>{this.isShown&&!this.isResizeMode&&this.hide()}).on(e.ow,"keydown.resizer",this.onKeyDown).on(e.ow,"keyup.resizer",this.onKeyUp).on(e.ow,"mouseup.resizer touchend.resizer",this.onClickOutside)}onStartResizing(e,t){if(!this.element||!this.element.parentNode)return this.hide(),!1;this.handle=e,t.cancelable&&t.preventDefault(),t.stopImmediatePropagation(),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.ratio=this.width/this.height,this.isResizeMode=!0,this.startX=t.clientX,this.startY=t.clientY,this.pointerX=t.clientX,this.pointerY=t.clientY;let{j:i}=this;i.e.fire("hidePopup"),i.lock(this.LOCK_KEY),i.e.on(i.ow,"mousemove.resizer touchmove.resizer",this.onResize)}onEndResizing(){let{j:e}=this;e.unlock(),this.isResizeMode=!1,this.isAltMode=!1,e.synchronizeValues(),e.e.off(e.ow,"mousemove.resizer touchmove.resizer",this.onResize)}onResize(e){if(this.isResizeMode){let t,i,o,n;if(!this.element)return;if(this.pointerX=e.clientX,this.pointerY=e.clientY,this.j.options.iframe&&e.view===this.j.ew){let o=this.getWorkplacePosition();t=e.clientX+o.left-this.startX,i=e.clientY+o.top-this.startY}else t=this.pointerX-this.startX,i=this.pointerY-this.startY;let s=this.handle.className,l=this.j.o.resizer.useAspectRatio;!this.isAltMode&&(!0===l||l&&r.Dom.isTag(this.element,l))?(t?n=Math.round((o=this.width+(s.match(/left/)?-1:1)*t)/this.ratio):o=Math.round((n=this.height+(s.match(/top/)?-1:1)*i)*this.ratio),o>(0,a.innerWidth)(this.j.editor,this.j.ow)&&(n=Math.round((o=(0,a.innerWidth)(this.j.editor,this.j.ow))/this.ratio))):(o=this.width+(s.match(/left/)?-1:1)*t,n=this.height+(s.match(/top/)?-1:1)*i),o>this.j.o.resizer.min_width&&(o<this.rect.parentNode.offsetWidth?this.applySize(this.element,"width",o):this.applySize(this.element,"width","100%")),n>this.j.o.resizer.min_height&&this.applySize(this.element,"height",n),this.updateSize(),this.showSizeViewer(this.element.offsetWidth,this.element.offsetHeight),e.stopImmediatePropagation()}}onKeyDown(e){this.isAltMode=e.key===o.KEY_ALT,!this.isAltMode&&this.isResizeMode&&this.onEndResizing()}onKeyUp(){this.isAltMode&&this.isResizeMode&&this.element&&(this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.ratio=this.width/this.height,this.startX=this.pointerX,this.startY=this.pointerY),this.isAltMode=!1}onClickOutside(e){if(this.isShown){if(!this.isResizeMode)return this.hide();e.stopImmediatePropagation(),this.onEndResizing()}}getWorkplacePosition(){return(0,a.offset)(this.rect.parentNode||this.j.od.documentElement,this.j,this.j.od,!0)}applySize(e,t,i){let o=r.Dom.isImage(e)&&this.j.o.resizer.forImageChangeAttributes;o&&(0,a.attr)(e,t,i),(!o||(0,l.cssInline)(e,t))&&(0,a.css)(e,t,i)}onDelete(e){this.element&&("JODIT"!==this.element.tagName?this.j.s.select(this.element):(r.Dom.safeRemove(this.element),this.hide(),e.preventDefault()))}__onChangeEditor(){this.isShown&&(this.element&&this.element.parentNode?this.updateSize():this.hide()),(0,a.$$)("iframe",this.j.editor).forEach(this.__bind)}__bind(e){let t;if(!(!r.Dom.isHTMLElement(e)||!this.j.o.allowResizeTags.has(e.tagName.toLowerCase())||(0,a.dataBind)(e,u))){if((0,a.dataBind)(e,u,!0),r.Dom.isTag(e,"iframe")){let i=e;if(r.Dom.isHTMLElement(e.parentNode)&&(0,a.attr)(e.parentNode,"-jodit_iframe_wrapper"))e=e.parentNode;else{t=this.j.createInside.element("jodit",{"data-jodit-temp":1,contenteditable:!1,draggable:!0,"data-jodit_iframe_wrapper":1}),(0,a.attr)(t,"style",(0,a.attr)(e,"style"));let i=e.offsetWidth||h(e,"width"),o=e.offsetHeight||h(e,"height");(0,a.css)(t,{display:"inline-block"===(0,l.cssInline)(e,"display")?"inline-block":"block"}),i&&(0,a.css)(t,"width",i),o&&(0,a.css)(t,"height",o),e.parentNode&&r.Dom.before(e,t),r.Dom.append(t,e),this.j.e.on(t,"click",()=>{(0,a.attr)(t,"data-jodit-wrapper_active",!0)}),e=t}this.j.e.off(e,"mousedown.select touchstart.select").on(e,"mousedown.select touchstart.select",()=>{this.j.s.select(e)}).off(e,"changesize").on(e,"changesize",()=>{(0,a.attr)(i,"width",e.offsetWidth+"px"),(0,a.attr)(i,"height",e.offsetHeight+"px")})}this.j.e.on(e,"dragstart",this.hide),!o.IS_ES_NEXT&&o.IS_IE&&this.j.e.on(e,"mousedown",t=>{r.Dom.isTag(e,"img")&&t.preventDefault()})}}showSizeViewer(e,t){if(this.j.o.resizer.showSize){if(e<this.sizeViewer.offsetWidth||t<this.sizeViewer.offsetHeight)return void this.hideSizeViewer();(0,a.css)(this.sizeViewer,"opacity","1"),this.sizeViewer.textContent=`${e} x ${t}`,this.j.async.setTimeout(this.hideSizeViewer,{timeout:this.j.o.resizer.hideSizeTimeout,label:"hideSizeViewer"})}}show(){this.j.o.readonly||this.isShown||(this.isShown=!0,this.rect.parentNode||((0,a.markOwner)(this.j,this.rect),r.Dom.append(this.j.workplace,this.rect)),this.j.isFullSize&&(0,a.css)(this.rect,"zIndex",(0,a.css)(this.j.container,"zIndex").toString()),this.updateSize())}hide(){this.isResizeMode||(this.isResizeMode=!1,this.isShown=!1,this.element=null,r.Dom.safeRemove(this.rect),(0,a.$$)("[data-jodit-wrapper_active='true']",this.j.editor).forEach(e=>(0,a.attr)(e,"data-jodit-wrapper_active",!1)))}beforeDestruct(e){this.hide(),s.eventEmitter.off("hideHelpers",this.hide),e.e.off(this.j.ow,".resizer").off(".resizer")}constructor(){super(...arguments),this.LOCK_KEY="resizer",this.element=null,this.isResizeMode=!1,this.isShown=!1,this.startX=0,this.startY=0,this.width=0,this.height=0,this.ratio=0,this.rect=this.j.c.fromHTML(`<div title="${this.j.i18n("Press Alt for custom resizing")}" class="jodit-resizer">
|
|
243
|
+
}`,n.Dom.append(o.document.head,t),o.focus(),o.print()}},mode:o.MODE_SOURCE+o.MODE_WYSIWYG,tooltip:"Print"},r.pluginSystem.add("print",function(e){e.registerButton({name:"print"})})},17583:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M7 8V3h10v5M7 17H5a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2M17 12h.01"/><rect x="7" y="14" width="10" height="7" rx="1"/> </g> </svg> '},66863:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m15 4 6 6-6 6m6-6H10a7 7 0 0 0-5 12"/> </g> </svg> '},64489:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M9 4 3 10l6 6M3 10h11a7 7 0 0 1 5 12"/> </g> </svg> '},6687:function(e,t,i){"use strict";var o=i(82758),n=i(580),r=i(20356),s=i(12153),a=i(6441),l=i(66863),c=i(64489);s.Icon.set("redo",l.default).set("undo",c.default),a.Config.prototype.controls.redo={mode:o.MODE_SPLIT,isDisabled:e=>!e.history.canRedo(),tooltip:"Redo"},a.Config.prototype.controls.undo={mode:o.MODE_SPLIT,isDisabled:e=>!e.history.canUndo(),tooltip:"Undo"};class d extends r.Plugin{beforeDestruct(){}afterInit(e){let t=t=>(e.history[t](),!1);e.registerCommand("redo",{exec:t,hotkeys:["ctrl+y","ctrl+shift+z","cmd+y","cmd+shift+z"]}),e.registerCommand("undo",{exec:t,hotkeys:["ctrl+z","cmd+z"]})}constructor(){super(...arguments),this.buttons=[{name:"undo",group:"history"},{name:"redo",group:"history"}]}}n.pluginSystem.add("redoUndo",d)},37467:function(e,t,i){"use strict";i(6441).Config.prototype.tableAllowCellResize=!0},56113:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(41180),c=i(41409);i(37467);var d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let u="table_processor_observer-resize";class h extends c.Plugin{get module(){return this.j.getInstance("Table",this.j.o)}get isRTL(){return"rtl"===this.j.o.direction}showResizeHandle(){this.j.async.clearTimeout(this.hideTimeout),r.Dom.append(this.j.workplace,this.resizeHandler)}hideResizeHandle(){this.hideTimeout=this.j.async.setTimeout(()=>{r.Dom.safeRemove(this.resizeHandler)},{timeout:this.j.defaultTimeout,label:"hideResizer"})}onHandleMouseDown(e){let t;if(!this.j.isLocked){if(this.drag=!0,this.j.e.on(this.j.ow,"mouseup.resize-cells touchend.resize-cells",this.onMouseUp).on(this.j.ew,"mousemove.table touchmove.table",this.onMouseMove),this.startX=e.clientX,this.j.lock(u),this.resizeHandler.classList.add("jodit-table-resizer_moved"),this.minX=0,this.maxX=1e6,null!=this.wholeTable){let e=this.workTable.parentNode.getBoundingClientRect();this.minX=e.left,this.maxX=this.minX+e.width}else{let e=this.module.formalCoordinate(this.workTable,this.workCell,!0);this.module.formalMatrix(this.workTable,(i,n,r)=>{e[1]===r&&(t=i.getBoundingClientRect(),this.minX=Math.max(t.left+o.NEARBY/2,this.minX)),e[1]+(this.isRTL?-1:1)===r&&(t=i.getBoundingClientRect(),this.maxX=Math.min(t.left+t.width-o.NEARBY/2,this.maxX))})}return!1}}onMouseMove(e){if(!this.drag)return;this.j.e.fire("closeAllPopups");let t=e.clientX,i=(0,a.offset)(this.resizeHandler.parentNode||this.j.od.documentElement,this.j,this.j.od,!0);t<this.minX&&(t=this.minX),t>this.maxX&&(t=this.maxX),this.resizeDelta=t-this.startX+(this.j.o.iframe?i.left:0),(0,l.css)(this.resizeHandler,"left",t-(this.j.o.iframe?0:i.left)+"px");let o=this.j.s.sel;o&&o.removeAllRanges()}onMouseUp(e){(this.selectMode||this.drag)&&(this.selectMode=!1,this.j.unlock()),this.resizeHandler&&this.drag&&(this.drag=!1,this.j.e.off(this.j.ew,"mousemove.table touchmove.table",this.onMouseMove),this.resizeHandler.classList.remove("jodit-table-resizer_moved"),this.startX!==e.clientX&&(null==this.wholeTable?this.resizeColumns():this.resizeTable()),this.j.synchronizeValues(),this.j.s.focus())}resizeColumns(){let e=this.resizeDelta,t=[],i=this.module;i.setColumnWidthByDelta(this.workTable,i.formalCoordinate(this.workTable,this.workCell,!0)[1],e,!0,t);let o=(0,a.call)(this.isRTL?r.Dom.prev:r.Dom.next,this.workCell,r.Dom.isCell,this.workCell.parentNode);i.setColumnWidthByDelta(this.workTable,i.formalCoordinate(this.workTable,o)[1],-e,!1,t)}resizeTable(){let e=this.resizeDelta*(this.isRTL?-1:1),t=this.workTable.offsetWidth,i=(0,a.getContentWidth)(this.workTable.parentNode,this.j.ew),o=!this.wholeTable;if(this.isRTL?!o:o)(0,l.css)(this.workTable,"width",(t+e)/i*100+"%");else{let o=this.isRTL?"marginRight":"marginLeft",n=parseInt(this.j.ew.getComputedStyle(this.workTable)[o]||"0",10);(0,l.css)(this.workTable,{width:(t-e)/i*100+"%",[o]:(n+e)/i*100+"%"})}}setWorkCell(e,t=null){this.wholeTable=t,this.workCell=e,this.workTable=r.Dom.up(e,e=>r.Dom.isTag(e,"table"),this.j.editor)}calcHandlePosition(e,t,i=0,n=0){let s=(0,a.offset)(t,this.j,this.j.ed);if(i>o.NEARBY&&i<s.width-o.NEARBY)return void this.hideResizeHandle();let c=(0,a.offset)(this.j.workplace,this.j,this.j.od,!0),d=(0,a.offset)(e,this.j,this.j.ed);if((0,l.css)(this.resizeHandler,"left",(i<=o.NEARBY?s.left:s.left+s.width)-c.left+n+"px"),Object.assign(this.resizeHandler.style,{height:d.height+"px",top:d.top-c.top+"px"}),this.showResizeHandle(),i<=o.NEARBY){let e=(0,a.call)(this.isRTL?r.Dom.next:r.Dom.prev,t,r.Dom.isCell,t.parentNode);this.setWorkCell(e||t,!e||null)}else{let e=(0,a.call)(this.isRTL?r.Dom.prev:r.Dom.next,t,r.Dom.isCell,t.parentNode);this.setWorkCell(t,!!e&&null)}}afterInit(e){e.o.tableAllowCellResize&&e.e.off(this.j.ow,".resize-cells").off(".resize-cells").on("change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells",()=>{(0,a.$$)("table",e.editor).forEach(this.observe)}).on(this.j.ow,"scroll.resize-cells",()=>{if(!this.drag)return;let t=r.Dom.up(this.workCell,e=>r.Dom.isTag(e,"table"),e.editor);if(t){let e=t.getBoundingClientRect();(0,l.css)(this.resizeHandler,"top",e.top+"px")}}).on("beforeSetMode.resize-cells",()=>{let t=this.module;t.getAllSelectedCells().forEach(i=>{t.removeSelection(i),t.normalizeTable(r.Dom.closest(i,"table",e.editor))})})}observe(e){(0,a.dataBind)(e,u)||((0,a.dataBind)(e,u,!0),this.j.e.on(e,"mouseleave.resize-cells",e=>{this.resizeHandler&&this.resizeHandler!==e.relatedTarget&&this.hideResizeHandle()}).on(e,"mousemove.resize-cells touchmove.resize-cells",this.j.async.throttle(t=>{if(this.j.isLocked)return;let i=r.Dom.up(t.target,r.Dom.isCell,e);i&&this.calcHandlePosition(e,i,t.offsetX)},{timeout:this.j.defaultTimeout})),this.createResizeHandle())}beforeDestruct(e){e.events&&(e.e.off(this.j.ow,".resize-cells"),e.e.off(".resize-cells"))}constructor(){super(...arguments),this.selectMode=!1,this.resizeDelta=0,this.createResizeHandle=()=>{this.resizeHandler||(this.resizeHandler=this.j.c.div("jodit-table-resizer"),this.j.e.on(this.resizeHandler,"mousedown.table touchstart.table",this.onHandleMouseDown).on(this.resizeHandler,"mouseenter.table",()=>{this.j.async.clearTimeout(this.hideTimeout)}))},this.hideTimeout=0,this.drag=!1,this.minX=0,this.maxX=0,this.startX=0}}d([n.autobind],h.prototype,"onHandleMouseDown",null),d([n.autobind],h.prototype,"onMouseMove",null),d([n.autobind],h.prototype,"onMouseUp",null),d([n.autobind],h.prototype,"observe",null),s.pluginSystem.add("resizeCells",h)},68252:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.allowResizeX=!1,o.Config.prototype.allowResizeY=!0},9159:function(e,t,i){"use strict";var o=i(65478),n=i(22732),r=i(580),s=i(21537),a=i(41180),l=i(50911),c=i(67510);i(68252);var d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class u extends l.Plugin{afterInit(e){let{height:t,width:i,allowResizeX:o}=e.o,{allowResizeY:r}=e.o;"auto"===t&&"auto"!==i&&(r=!1),("auto"!==t||"auto"!==i)&&(o||r)&&(e.statusbar.setMod("resize-handle",!0),e.statusbar.show(),e.e.on("toggleFullSize.resizeHandler",()=>{(0,a.css)(this.handle,"display",e.isFullSize?"none":"block")}).on(this.handle,"mousedown touchstart",this.onHandleResizeStart).on(e.ow,"mouseup touchend",this.onHandleResizeEnd),n.Dom.append(e.container,this.handle))}onHandleResizeStart(e){this.isResized=!0,this.start.x=e.clientX,this.start.y=e.clientY,this.start.w=this.j.container.offsetWidth,this.start.h=this.j.container.offsetHeight,this.j.lock(),this.j.e.on(this.j.ow,"mousemove touchmove",this.onHandleResize),e.preventDefault()}onHandleResize(e){if(!this.isResized)return;let{clientX:t,clientY:i}=e;if(e.view===this.j.ew&&this.j.ew!==this.j.ow){let e=(0,s.offset)(this.j.workplace,this.j,this.j.od,!0);t+=e.left,i+=e.top}this.j.o.allowResizeY&&this.j.e.fire("setHeight",this.start.h+i-this.start.y),this.j.o.allowResizeX&&this.j.e.fire("setWidth",this.start.w+t-this.start.x),this.j.e.fire("resize")}onHandleResizeEnd(){this.isResized&&(this.isResized=!1,this.j.e.off(this.j.ow,"mousemove touchmove",this.onHandleResize),this.j.unlock())}beforeDestruct(){n.Dom.safeRemove(this.handle),this.j.e.off(this.j.ow,"mouseup touchsend",this.onHandleResizeEnd)}constructor(){super(...arguments),this.isResized=!1,this.start={x:0,y:0,w:0,h:0},this.handle=this.j.c.div("jodit-editor__resize",c.Icon.get("resize_handler"))}}u.requires=["size"],d([o.autobind],u.prototype,"onHandleResizeStart",null),d([o.autobind],u.prototype,"onHandleResize",null),d([o.autobind],u.prototype,"onHandleResizeEnd",null),r.pluginSystem.add("resizeHandler",u)},71675:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.allowResizeTags=new Set(["img","iframe","table","jodit"]),o.Config.prototype.resizer={showSize:!0,hideSizeTimeout:1e3,forImageChangeAttributes:!0,min_width:10,min_height:10,useAspectRatio:new Set(["img"])}},12019:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(41180),c=i(20356);i(71675);var d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let u="__jodit-resizer_binded";function h(e,t){var i;let o=null==(i=(0,a.attr)(e,t))?void 0:i.trim();return o&&/^\d+(\.\d+)?(px)?$/i.test(o)?parseFloat(o):0}class p extends c.Plugin{afterInit(e){(0,a.$$)("div",this.rect).forEach(t=>{e.e.on(t,"mousedown.resizer touchstart.resizer",this.onStartResizing.bind(this,t))}),s.eventEmitter.on("hideHelpers",this.hide),e.e.on("readonly",e=>{e&&this.hide()}).on("afterInit changePlace",this.addEventListeners.bind(this)).on("afterGetValueFromEditor.resizer",e=>{let t=/<jodit[^>]+data-jodit_iframe_wrapper[^>]+>(.*?<iframe[^>]*>.*?<\/iframe>.*?)<\/jodit>/gi;t.test(e.value)&&(e.value=e.value.replace(t,"$1"))}),this.addEventListeners(),this.__onChangeEditor()}onEditorClick(e){let t=e.target,{editor:i,options:{allowResizeTags:o}}=this.j;for(;t&&t!==i;){if(r.Dom.isTag(t,o)){this.__bind(t),this.onClickElement(t);return}t=t.parentNode}}__afterInsertImage(e){if(this.j.o.resizer.forImageChangeAttributes)return;let t=(0,a.attr)(e,"width");t&&!(0,l.cssInline)(e,"width")&&((0,a.css)(e,"width",t),(0,a.attr)(e,"width",null))}addEventListeners(){let e=this.j;e.e.off(e.editor,".resizer").off(e.ow,".resizer").on(e.editor,"keydown.resizer",e=>{this.isShown&&(e.key===o.KEY_DELETE||e.key===o.KEY_BACKSPACE)&&this.element&&!r.Dom.isTag(this.element,"table")&&this.onDelete(e)}).on(e.ow,"resize.resizer",this.updateSize).on("resize.resizer",this.updateSize).on([e.ow,e.editor],"scroll.resizer",()=>{this.isShown&&!this.isResizeMode&&this.hide()}).on(e.ow,"keydown.resizer",this.onKeyDown).on(e.ow,"keyup.resizer",this.onKeyUp).on(e.ow,"mouseup.resizer touchend.resizer",this.onClickOutside)}onStartResizing(e,t){if(!this.element||!this.element.parentNode)return this.hide(),!1;this.handle=e,t.cancelable&&t.preventDefault(),t.stopImmediatePropagation(),this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.ratio=this.width/this.height,this.isResizeMode=!0,this.startX=t.clientX,this.startY=t.clientY,this.pointerX=t.clientX,this.pointerY=t.clientY;let{j:i}=this;i.e.fire("hidePopup"),i.lock(this.LOCK_KEY),i.e.on(i.ow,"mousemove.resizer touchmove.resizer",this.onResize)}onEndResizing(){let{j:e}=this;e.unlock(),this.isResizeMode=!1,this.isAltMode=!1,e.synchronizeValues(),e.e.off(e.ow,"mousemove.resizer touchmove.resizer",this.onResize)}onResize(e){if(this.isResizeMode){let t,i,o,n;if(!this.element)return;if(this.pointerX=e.clientX,this.pointerY=e.clientY,this.j.options.iframe&&e.view===this.j.ew){let o=this.getWorkplacePosition();t=e.clientX+o.left-this.startX,i=e.clientY+o.top-this.startY}else t=this.pointerX-this.startX,i=this.pointerY-this.startY;let s=this.handle.className,l=this.j.o.resizer.useAspectRatio;!this.isAltMode&&(!0===l||l&&r.Dom.isTag(this.element,l))?(t?n=Math.round((o=this.width+(s.match(/left/)?-1:1)*t)/this.ratio):o=Math.round((n=this.height+(s.match(/top/)?-1:1)*i)*this.ratio),o>(0,a.innerWidth)(this.j.editor,this.j.ow)&&(n=Math.round((o=(0,a.innerWidth)(this.j.editor,this.j.ow))/this.ratio))):(o=this.width+(s.match(/left/)?-1:1)*t,n=this.height+(s.match(/top/)?-1:1)*i),o>this.j.o.resizer.min_width&&(o<this.rect.parentNode.offsetWidth?this.applySize(this.element,"width",o):this.applySize(this.element,"width","100%")),n>this.j.o.resizer.min_height&&this.applySize(this.element,"height",n),this.updateSize(),this.showSizeViewer(this.element.offsetWidth,this.element.offsetHeight),e.stopImmediatePropagation()}}onKeyDown(e){this.isAltMode=e.key===o.KEY_ALT,!this.isAltMode&&this.isResizeMode&&this.onEndResizing()}onKeyUp(){this.isAltMode&&this.isResizeMode&&this.element&&(this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.ratio=this.width/this.height,this.startX=this.pointerX,this.startY=this.pointerY),this.isAltMode=!1}onClickOutside(e){if(this.isShown){if(!this.isResizeMode)return this.hide();e.stopImmediatePropagation(),this.onEndResizing()}}getWorkplacePosition(){return(0,a.offset)(this.rect.parentNode||this.j.od.documentElement,this.j,this.j.od,!0)}applySize(e,t,i){let o=r.Dom.isImage(e)&&this.j.o.resizer.forImageChangeAttributes;o&&(0,a.attr)(e,t,i),(!o||(0,l.cssInline)(e,t))&&(0,a.css)(e,t,i)}onDelete(e){this.element&&("JODIT"!==this.element.tagName?this.j.s.select(this.element):(r.Dom.safeRemove(this.element),this.hide(),e.preventDefault()))}__onChangeEditor(){this.isShown&&(this.element&&this.element.parentNode?this.updateSize():this.hide()),(0,a.$$)("iframe",this.j.editor).forEach(this.__bind)}__bind(e){let t;if(!(!r.Dom.isHTMLElement(e)||!this.j.o.allowResizeTags.has(e.tagName.toLowerCase())||(0,a.dataBind)(e,u))){if((0,a.dataBind)(e,u,!0),r.Dom.isTag(e,"iframe")){let i=e;if(r.Dom.isHTMLElement(e.parentNode)&&(0,a.attr)(e.parentNode,"-jodit_iframe_wrapper"))e=e.parentNode;else{t=this.j.createInside.element("jodit",{"data-jodit-temp":1,contenteditable:!1,draggable:!0,"data-jodit_iframe_wrapper":1}),(0,a.attr)(t,"style",(0,a.attr)(e,"style"));let i=e.offsetWidth||h(e,"width"),o=e.offsetHeight||h(e,"height");(0,a.css)(t,{display:"inline-block"===(0,l.cssInline)(e,"display")?"inline-block":"block"}),i&&(0,a.css)(t,"width",i),o&&(0,a.css)(t,"height",o),e.parentNode&&r.Dom.before(e,t),r.Dom.append(t,e),this.j.e.on(t,"click",()=>{(0,a.attr)(t,"data-jodit-wrapper_active",!0)}),e=t}this.j.e.off(e,"mousedown.select touchstart.select").on(e,"mousedown.select touchstart.select",()=>{this.j.s.select(e)}).off(e,"changesize").on(e,"changesize",()=>{this.isResizeMode&&((0,a.attr)(i,"width",e.offsetWidth),(0,a.attr)(i,"height",e.offsetHeight))})}this.j.e.on(e,"dragstart",this.hide),!o.IS_ES_NEXT&&o.IS_IE&&this.j.e.on(e,"mousedown",t=>{r.Dom.isTag(e,"img")&&t.preventDefault()})}}showSizeViewer(e,t){if(this.j.o.resizer.showSize){if(e<this.sizeViewer.offsetWidth||t<this.sizeViewer.offsetHeight)return void this.hideSizeViewer();(0,a.css)(this.sizeViewer,"opacity","1"),this.sizeViewer.textContent=`${e} x ${t}`,this.j.async.setTimeout(this.hideSizeViewer,{timeout:this.j.o.resizer.hideSizeTimeout,label:"hideSizeViewer"})}}show(){this.j.o.readonly||this.isShown||(this.isShown=!0,this.rect.parentNode||((0,a.markOwner)(this.j,this.rect),r.Dom.append(this.j.workplace,this.rect)),this.j.isFullSize&&(0,a.css)(this.rect,"zIndex",(0,a.css)(this.j.container,"zIndex").toString()),this.updateSize())}hide(){this.isResizeMode||(this.isResizeMode=!1,this.isShown=!1,this.element=null,r.Dom.safeRemove(this.rect),(0,a.$$)("[data-jodit-wrapper_active='true']",this.j.editor).forEach(e=>(0,a.attr)(e,"data-jodit-wrapper_active",!1)))}beforeDestruct(e){this.hide(),s.eventEmitter.off("hideHelpers",this.hide),e.e.off(this.j.ow,".resizer").off(".resizer")}constructor(){super(...arguments),this.LOCK_KEY="resizer",this.element=null,this.isResizeMode=!1,this.isShown=!1,this.startX=0,this.startY=0,this.width=0,this.height=0,this.ratio=0,this.rect=this.j.c.fromHTML(`<div title="${this.j.i18n("Press Alt for custom resizing")}" class="jodit-resizer">
|
|
244
244
|
<div class="jodit-resizer__top-left"></div>
|
|
245
245
|
<div class="jodit-resizer__top-right"></div>
|
|
246
246
|
<div class="jodit-resizer__bottom-right"></div>
|
|
@@ -264,7 +264,7 @@
|
|
|
264
264
|
<button data-ref="replace-btn" tabindex="0" type="button" class="jodit-ui-button">~Replace~</button>
|
|
265
265
|
</div>
|
|
266
266
|
</div>
|
|
267
|
-
</div>`}get currentIndex(){return this._currentIndex}set currentIndex(e){this._currentIndex=e,this.currentBox.innerText=e.toString()}set count(e){this.countBox.innerText=e.toString()}get query(){return this.queryInput.value}get replace(){return this.replaceInput.value}onEditorKeyDown(e){if(!this.isOpened)return;let{j:t}=this;if(t.getRealMode()===o.MODE_WYSIWYG)switch(e.key){case o.KEY_ESC:this.close();break;case o.KEY_F3:this.queryInput.value&&(t.e.fire(e.shiftKey?"searchPrevious":"searchNext"),e.preventDefault())}}open(e,t,i=!1){this.isOpened||(r.Dom.append(this.j.workplace,this.container),this.isOpened=!0),this.calcSticky(this.j.e.fire("getStickyState.sticky")||!1),this.j.e.fire("hidePopup"),this.setMod("replace",i);let o=null!=e?e:(this.j.s.sel||"").toString();o&&(this.queryInput.value=o),t&&(this.replaceInput.value=t),this.setMod("empty-query",!o.length),this.j.e.fire(this,"needUpdateCounters"),o?this.queryInput.select():this.queryInput.focus()}close(){this.isOpened&&(this.j.s.restore(),r.Dom.safeRemove(this.container),this.isOpened=!1,this.j.e.fire(this,"afterClose"))}calcSticky(e){if(this.isOpened)if(this.setMod("sticky",e),e){let e=(0,s.position)(this.j.toolbarContainer);(0,s.css)(this.container,{top:e.top+e.height,left:e.left+e.width})}else(0,s.css)(this.container,{top:null,left:null})}constructor(e){let t;super(e),this.selInfo=null,this._currentIndex=0,this.isOpened=!1;let{query:i,replace:n,cancel:r,next:a,prev:l,replaceBtn:c,current:d,count:u}=(0,s.refs)(this.container);this.queryInput=i,this.replaceInput=n,this.closeButton=r,this.replaceButton=c,this.currentBox=d,this.countBox=u;let h=()=>this.close(),p=()=>void e.e.fire(this,"pressReplaceButton"),f=()=>void e.e.fire("searchNext"),m=()=>void e.e.fire("searchPrevious"),g=e=>t=>{t.detail||(t.preventDefault(),e())};e.e.on(this.closeButton,"pointerdown",()=>(h(),!1)).on(this.closeButton,"click",g(h)).on(this.queryInput,"input",()=>{this.currentIndex=0}).on(this.queryInput,"pointerdown",()=>{e.s.isFocused()&&(e.s.removeMarkers(),this.selInfo=e.s.save())}).on(this.replaceButton,"pointerdown",()=>(p(),!1)).on(this.replaceButton,"click",g(p)).on(a,"pointerdown",()=>(f(),!1)).on(a,"click",g(f)).on(l,"pointerdown",()=>(m(),!1)).on(l,"click",g(m)).on(this.queryInput,"input",()=>{this.setMod("empty-query",!(0,s.trim)(this.queryInput.value).length)}).on(this.queryInput,"keydown",(t=this.j.async.debounce(async t=>{t.key===o.KEY_ENTER?await e.e.fire("searchNext")&&this.close():e.e.fire(this,"needUpdateCounters")},this.j.defaultTimeout),e=>{e.key===o.KEY_ENTER&&(e.preventDefault(),e.stopImmediatePropagation()),t(e)}))}};l([(0,n.watch)([":keydown","queryInput:keydown"])],c.prototype,"onEditorKeyDown",null),l([n.autobind],c.prototype,"open",null),l([n.autobind],c.prototype,"close",null),l([(0,n.watch)(":toggleSticky")],c.prototype,"calcSticky",null),c=l([n.component],c)},55311:function(e,t,i){"use strict";i(6441).Config.prototype.tableAllowCellSelection=!0},28545:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(50911),c=i(76014);i(55311);var d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let u="table_processor_observer",h="onMoveTableSelectCell";class p extends l.Plugin{get __tableModule(){return this.j.getInstance(c.Table,this.j.o)}afterInit(e){e.o.tableAllowCellSelection&&e.e.on("keydown.select-cells",e=>{e.key===o.KEY_TAB&&this.unselectCells()}).on("beforeCommand.select-cells",this.onExecCommand).on("afterCommand.select-cells",this.onAfterCommand).on(["clickEditor","mousedownTd","mousedownTh","touchstartTd","touchstartTh"].map(e=>e+".select-cells").join(" "),this.onStartSelection).on("clickTr clickTbody",()=>{var e;let t=this.__tableModule.getAllSelectedCells().length;if(t)return t>1&&(null==(e=this.j.s.sel)||e.removeAllRanges()),!1})}onStartSelection(e,t){var i;if(this.j.o.readonly)return;let o=r.Dom.closest(e,"table",this.j.editor);return((null==t?void 0:t.ctrlKey)||(null==t?void 0:t.metaKey))&&e!==this.j.editor&&o&&r.Dom.isCell(e)?(this.__tableModule.getAllSelectedCells().includes(e)?this.__tableModule.removeSelection(e):(e.firstChild||r.Dom.append(e,this.j.createInside.element("br")),this.__tableModule.addSelection(e)),this.__selectedCell=e,null==(i=this.j.s.sel)||i.removeAllRanges(),this.__tableModule.getAllSelectedCells().length?this.j.e.fire("showPopup",o,()=>(0,a.position)(e,this.j),"cells"):this.j.e.fire("hidePopup","cells"),!1):(this.unselectCells(),e===this.j.editor)?void 0:e&&o?(e.firstChild||r.Dom.append(e,this.j.createInside.element("br")),this.__isSelectionMode=!0,this.__selectedCell=e,this.__tableModule.addSelection(e),this.j.e.on(o,"mousemove.select-cells touchmove.select-cells",this.j.async.throttle(this.__onMove.bind(this,o),{label:h,timeout:this.j.defaultTimeout/2})).on(o,"mouseup.select-cells touchend.select-cells",this.__onStopSelection.bind(this,o)),!1):void 0}onOutsideClick(){this.__selectedCell=null,this.__onRemoveSelection()}onChange(){this.j.isLocked||this.__isSelectionMode||this.__onRemoveSelection()}__onMove(e,t){var i,o;let n;if(this.j.o.readonly&&!this.j.isLocked||this.j.isLockedNotBy(u))return;let s=(null!=(i=this.j.o.shadowRoot)?i:this.j.ed).elementFromPoint(t.clientX,t.clientY);if(!s)return;let a=r.Dom.closest(s,["td","th"],e);if(!a||!this.__selectedCell)return;a!==this.__selectedCell&&this.j.lock(u),this.unselectCells();let l=this.__tableModule.getSelectedBound(e,[a,this.__selectedCell]),c=this.__tableModule.formalMatrix(e);for(let e=l[0][0];e<=l[1][0];e+=1)for(let t=l[0][1];t<=l[1][1];t+=1)this.__tableModule.addSelection(c[e][t]);this.__tableModule.getAllSelectedCells().length>1&&(null==(o=this.j.s.sel)||o.removeAllRanges()),this.j.e.fire("hidePopup"),t.stopPropagation(),n=this.j.createInside.fromHTML('<div style="color:rgba(0,0,0,0.01);width:0;height:0"> </div>'),r.Dom.append(a,n),this.j.async.setTimeout(()=>{r.Dom.safeRemove(n)},this.j.defaultTimeout/5)}__onRemoveSelection(e){var t;if(!(null==(t=null==e?void 0:e.buffer)?void 0:t.actionTrigger)&&!this.__selectedCell&&this.__tableModule.getAllSelectedCells().length){this.j.unlock(),this.unselectCells(),this.j.e.fire("hidePopup","cells");return}this.__isSelectionMode=!1,this.__selectedCell=null}__onStopSelection(e,t){var i,o,n;if(!this.__selectedCell)return;this.__isSelectionMode=!1,this.j.unlock();let s=(null!=(i=this.j.o.shadowRoot)?i:this.j.ed).elementFromPoint(t.clientX,t.clientY);if(!s)return;let l=r.Dom.closest(s,["td","th"],e);if(!l)return;let c=r.Dom.closest(l,"table",e);if(c&&c!==e)return;let d=this.__tableModule.getSelectedBound(e,[l,this.__selectedCell]),u=this.__tableModule.formalMatrix(e),p=null==(o=u[d[1][0]])?void 0:o[d[1][1]],f=null==(n=u[d[0][0]])?void 0:n[d[0][1]];f&&p&&(this.j.e.fire("showPopup",e,()=>{let e=(0,a.position)(f,this.j),t=(0,a.position)(p,this.j);return{left:e.left,top:e.top,width:t.left-e.left+t.width,height:t.top-e.top+t.height}},"cells"),(0,a.$$)("table",this.j.editor).forEach(e=>{this.j.e.off(e,"mousemove.select-cells touchmove.select-cells mouseup.select-cells touchend.select-cells")}),this.j.async.clearTimeout(h))}unselectCells(e){let t=this.__tableModule,i=t.getAllSelectedCells();i.length&&i.forEach(i=>{e&&e===i||t.removeSelection(i)})}onExecCommand(e){if(/^(delete|backspace)(word|sentence)?button$/.test(e)&&this.__tableModule.getAllSelectedCells().length>1){let e=this.__tableModule.getAllSelectedCells();return e.forEach(e=>{r.Dom.detach(e),r.Dom.append(e,this.j.createInside.element("br"))}),this.unselectCells(),this.j.s.setCursorIn(e[0]),this.j.synchronizeValues(),!1}if(/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow)/.test(e)){e=e.replace("table","");let t=this.__tableModule.getAllSelectedCells();if(t.length){let[i]=t;if(!i)return;let o=r.Dom.closest(i,"table",this.j.editor);if(!o)return;switch(e){case"splitv":this.__tableModule.splitVertical(o);break;case"splitg":this.__tableModule.splitHorizontal(o);break;case"merge":this.__tableModule.mergeSelected(o);break;case"empty":t.forEach(e=>r.Dom.detach(e));break;case"bin":r.Dom.safeRemove(o);break;case"binrow":new Set(t.map(e=>e.parentNode)).forEach(e=>{this.__tableModule.removeRow(o,e.rowIndex)});break;case"bincolumn":{let e=new Set,i=[];t.forEach(t=>{let[,n]=this.__tableModule.formalCoordinate(o,t);e.has(n)||(i.push(n),e.add(n))}),i.sort((e,t)=>t-e).forEach(e=>{this.__tableModule.removeColumn(o,e)})}break;case"addcolumnafter":case"addcolumnbefore":this.__tableModule.appendColumn(o,i,"addcolumnafter"===e);break;case"addrowafter":case"addrowbefore":this.__tableModule.appendRow(o,i.parentNode,"addrowafter"===e)}}return!1}}onAfterCommand(e){/^justify/.test(e)&&this.__tableModule.getAllSelectedCells().forEach(t=>(0,a.alignElement)(e,t))}beforeDestruct(e){this.__onRemoveSelection(),e.e.off(".select-cells")}constructor(){super(...arguments),this.__selectedCell=null,this.__isSelectionMode=!1}}p.requires=["select"],d([n.autobind],p.prototype,"onStartSelection",null),d([(0,n.watch)(":outsideClick")],p.prototype,"onOutsideClick",null),d([(0,n.watch)(":change")],p.prototype,"onChange",null),d([n.autobind],p.prototype,"__onRemoveSelection",null),d([n.autobind],p.prototype,"__onStopSelection",null),d([n.autobind],p.prototype,"onExecCommand",null),d([n.autobind],p.prototype,"onAfterCommand",null),s.pluginSystem.add("selectCells",p)},67215:function(e,t,i){"use strict";i(6441).Config.prototype.select={normalizeSelectionBeforeCutAndCopy:!1,normalizeTripleClick:!0}},9881:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(87058),l=i(50911),c=i(67510);i(67215);var d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class u extends l.Plugin{afterInit(e){this.proxyEventsList.forEach(t=>{e.e.on(t+".select",this.onStartSelection)})}beforeDestruct(e){this.proxyEventsList.forEach(t=>{e.e.on(t+".select",this.onStartSelection)})}onStartSelection(e){let{j:t}=this,i,o=e.target;for(;void 0===i&&o&&o!==t.editor;)i=t.e.fire((0,a.camelCase)(e.type+"_"+o.nodeName.toLowerCase()),o,e),o=o.parentElement;"click"===e.type&&void 0===i&&o===t.editor&&t.e.fire(e.type+"Editor",o,e)}onOutsidePress(e){this.__pressTarget=e.target}onOutsideClick(e){let t=e.target,i=this.__pressTarget;this.__pressTarget=null,r.Dom.up(t,e=>e===this.j.editor)||i&&c.UIElement.closestElement(i,c.Popup)||c.UIElement.closestElement(t,c.Popup)||this.j.e.fire("outsideClick",e)}beforeCommandCut(){let{s:e}=this.j;if(!e.isCollapsed()){let t=e.current();t&&r.Dom.isOrContains(this.j.editor,t)&&this.onCopyNormalizeSelectionBound()}}beforeCommandSelectAll(){let{s:e}=this.j;return e.focus(),e.select(this.j.editor,!0),e.expandSelection(),!1}onClickRightOfNestedListItem(e){let{s:t}=this.j,i=t.range;if(!i.collapsed||0!==i.startOffset||!r.Dom.isText(i.startContainer))return;let n=i.startContainer,s=n.parentNode;if(!r.Dom.isTag(s,"li")||!r.Dom.first(s,e=>r.Dom.isTag(e,o.LIST_TAGS)))return;let a=this.j.ed.createRange();a.selectNodeContents(n);let l=a.getBoundingClientRect();e.clientX>l.right&&t.setCursorAfter(n)}onClickKeepPendingFormat(){var e,t;let{s:i}=this.j,n=i.range;if(!n.collapsed||!r.Dom.isText(n.startContainer))return;let s=n.startContainer;if(n.startOffset!==(null!=(t=null==(e=s.nodeValue)?void 0:e.length)?t:0))return;let a=s.nextSibling;if(!r.Dom.isElement(a)||!a.nodeName.match(o.IS_INLINE)||!r.Dom.isEmpty(a))return;let l=a;for(;r.Dom.isElement(l.firstElementChild)&&l.firstElementChild.nodeName.match(o.IS_INLINE);)l=l.firstElementChild;i.setCursorIn(l)}onTripleClickNormalizeSelection(e){if(3!==e.detail||!this.j.o.select.normalizeTripleClick)return;let{s:t}=this.j,{startContainer:i,startOffset:o}=t.range;0===o&&r.Dom.isText(i)&&t.select(r.Dom.closest(i,r.Dom.isBlock,this.j.editor)||i,!0)}onCopyNormalizeSelectionBound(e){let{s:t,editor:i,o}=this.j;!o.select.normalizeSelectionBeforeCutAndCopy||t.isCollapsed()||(!e||e.isTrusted&&r.Dom.isNode(e.target)&&r.Dom.isOrContains(i,e.target))&&this.jodit.s.expandSelection()}constructor(){super(...arguments),this.proxyEventsList=["click","mousedown","touchstart","mouseup","touchend"],this.__pressTarget=null}}d([n.autobind],u.prototype,"onStartSelection",null),d([(0,n.watch)(["ow:mousedown","ow:touchstart"])],u.prototype,"onOutsidePress",null),d([(0,n.watch)("ow:click")],u.prototype,"onOutsideClick",null),d([(0,n.watch)([":beforeCommandCut"])],u.prototype,"beforeCommandCut",null),d([(0,n.watch)([":beforeCommandSelectall"])],u.prototype,"beforeCommandSelectAll",null),d([(0,n.watch)([":click"])],u.prototype,"onClickRightOfNestedListItem",null),d([(0,n.watch)([":click"])],u.prototype,"onClickKeepPendingFormat",null),d([(0,n.watch)([":click"])],u.prototype,"onTripleClickNormalizeSelection",null),d([(0,n.watch)([":copy",":cut"])],u.prototype,"onCopyNormalizeSelectionBound",null),s.pluginSystem.add("select",u)},80792:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.minWidth=200,o.Config.prototype.maxWidth="100%",o.Config.prototype.minHeight=200,o.Config.prototype.maxHeight="auto",o.Config.prototype.saveHeightInStorage=!1},45927:function(e,t,i){"use strict";var o=i(65478),n=i(580),r=i(84767),s=i(41180),a=i(20356);i(80792);var l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class c extends a.Plugin{afterInit(e){e.e.on("setHeight.size",this.__setHeight).on("setWidth.size",this.__setWidth).on("afterInit.size changePlace.size",this.__initialize,{top:!0}).on(e.ow,"load.size",this.__resizeWorkspaces).on("afterInit.size resize.size afterUpdateToolbar.size scroll.size afterResize.size",this.__resizeWorkspaces).on("toggleFullSize.size toggleToolbar.size",this.__resizeWorkspaceImd),this.__immediateInitialize()}__initialize(){this.__immediateInitialize()}__immediateInitialize(){let{j:e}=this;if(e.o.inline)return;let{height:t}=e.o;if(e.o.saveHeightInStorage&&"auto"!==t){let i=e.storage.get("height");i&&(t=i)}(0,s.css)(e.editor,{minHeight:"100%"}),(0,s.css)(e.container,{minHeight:e.o.minHeight,maxHeight:e.o.maxHeight,minWidth:e.o.minWidth,maxWidth:e.o.maxWidth}),e.isFullSize||(this.__setHeight(t),this.__setWidth(e.o.width))}__setHeight(e){let{clientHeight:t,clientWidth:i}=this.j.container;if((0,r.isNumber)(e)){let{minHeight:t,maxHeight:i}=this.j.o;(0,r.isNumber)(t)&&t>e&&(e=t),(0,r.isNumber)(i)&&i<e&&(e=i)}(0,s.css)(this.j.container,"height",e),this.j.o.saveHeightInStorage&&this.j.storage.set("height",e),this.__resizeWorkspaceImd({clientHeight:t,clientWidth:i})}__setWidth(e){let{clientHeight:t,clientWidth:i}=this.j.container;if((0,r.isNumber)(e)){let{minWidth:t,maxWidth:i}=this.j.o;(0,r.isNumber)(t)&&t>e&&(e=t),(0,r.isNumber)(i)&&e>i&&(e=i)}(0,s.css)(this.j.container,"width",e),this.__resizeWorkspaceImd({clientHeight:t,clientWidth:i})}__getNotWorkHeight(){var e;let t=this.j.toolbarContainer;return(t&&this.j.container.contains(t)?t.offsetHeight:0)+((null==(e=this.j.statusbar)?void 0:e.getHeight())||0)+2}__resizeWorkspaceImd({clientHeight:e,clientWidth:t}=this.j.container){if(!this.j||this.j.isDestructed||!this.j.o||this.j.o.inline||!this.j.container||!this.j.container.parentNode)return;let i=((0,s.css)(this.j.container,"minHeight")||0)-this.__getNotWorkHeight();if((0,r.isNumber)(i)&&i>0&&([this.j.workplace,this.j.currentPlace.slots.center,this.j.iframe,this.j.editor].map(e=>{e&&(0,s.css)(e,"minHeight",i)}),this.j.e.fire("setMinHeight",i)),(0,r.isNumber)(this.j.o.maxHeight)){let e=this.j.o.maxHeight-this.__getNotWorkHeight();[this.j.workplace,this.j.currentPlace.slots.center,this.j.iframe,this.j.editor].map(t=>{t&&(0,s.css)(t,"maxHeight",e)}),this.j.e.fire("setMaxHeight",e)}if(this.j.container){let e="auto"!==this.j.o.height||this.j.isFullSize?this.j.container.offsetHeight-this.__getNotWorkHeight():"auto";(0,s.css)(this.j.workplace,"height",e),this.j.container.style.setProperty("--jd-jodit-workplace-height",(0,r.isNumber)(e)?e+"px":e)}let{clientHeight:o,clientWidth:n}=this.j.container;(e!==o||t!==n)&&this.j.e.fire(this.j,"resize")}beforeDestruct(e){e.e.off(e.ow,"load.size",this.__resizeWorkspaces).off(".size")}constructor(){super(...arguments),this.__resizeWorkspaces=this.j.async.debounce(this.__resizeWorkspaceImd,this.j.defaultTimeout,!0)}}l([(0,o.throttle)()],c.prototype,"__initialize",null),l([o.autobind],c.prototype,"__setHeight",null),l([o.autobind],c.prototype,"__setWidth",null),l([o.autobind],c.prototype,"__resizeWorkspaceImd",null),n.pluginSystem.add("size",c)},36204:function(e,t,i){"use strict";var o=i(82758),n=i(12153),r=i(6441),s=i(35599);r.Config.prototype.beautifyHTML=!o.IS_IE,r.Config.prototype.sourceEditor="ace",r.Config.prototype.sourceEditorNativeOptions={showGutter:!0,theme:"ace/theme/idle_fingers",mode:"ace/mode/html",wrap:!0,highlightActiveLine:!0},r.Config.prototype.sourceEditorCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/ace/1.43.3/ace.js"],r.Config.prototype.beautifyHTMLCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.4/beautify.min.js","https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.4/beautify-html.min.js"],n.Icon.set("source",s.default),r.Config.prototype.controls.source={mode:o.MODE_SPLIT,exec(e){e.toggleMode()},isActive:e=>e.getRealMode()===o.MODE_SOURCE,tooltip:"Change mode"}},60031:function(e,t,i){"use strict";i.d(t,{AceEditor:function(){return l}});var o=i(82758),n=i(45219),r=i(2748),s=i(21537),a=i(23370);class l extends a.SourceEditor{aceExists(){return void 0!==this.j.ow.ace}getLastColumnIndex(e){return this.instance.session.getLine(e).length}getLastColumnIndices(){let e=this.instance.session.getLength(),t=[],i=0;for(let o=0;e>o;o++)i+=this.getLastColumnIndex(o),o>0&&(i+=1),t[o]=i;return t}getRowColumnIndices(e){let t=this.getLastColumnIndices();if(e<=t[0])return{row:0,column:e};let i=1;for(let o=1;o<t.length;o++)e>t[o]&&(i=o+1);let o=e-t[i-1]-1;return{row:i,column:o}}setSelectionRangeIndices(e,t){let i=this.getRowColumnIndices(e),o=this.getRowColumnIndices(t);this.instance.getSelection().setSelectionRange({start:i,end:o})}getIndexByRowColumn(e,t){return this.getLastColumnIndices()[e]-this.getLastColumnIndex(e)+t}init(e){let t=()=>{if(void 0!==this.instance||!this.aceExists())return;let t=this.j.c.div("jodit-source__mirror-fake");r.Dom.append(this.container,t);let i=e.ow.ace;this.instance=i.edit(t),"rtl"===e.o.direction&&(this.instance.setOption("rtlText",!0),this.instance.setOption("rtl",!0)),this.instance.setOptions(e.o.sourceEditorNativeOptions),this.instance.setTheme(e.o.sourceEditorNativeOptions.theme),this.instance.renderer.setShowGutter(e.o.sourceEditorNativeOptions.showGutter),this.instance.getSession().setMode(e.o.sourceEditorNativeOptions.mode),this.instance.setHighlightActiveLine(e.o.sourceEditorNativeOptions.highlightActiveLine),this.instance.getSession().setUseWrapMode(!0),this.instance.setOption("indentedSoftWrap",!1),this.instance.setOption("wrap",e.o.sourceEditorNativeOptions.wrap),this.instance.getSession().setUseWorker(!1),this.instance.$blockScrolling=1/0,this.instance.on("change",this.__onChange),this.instance.on("focus",this.proxyOnFocus),this.instance.on("mousedown",this.proxyOnMouseDown),this.instance.on("blur",this.proxyOnBlur),e.getRealMode()!==o.MODE_WYSIWYG&&this.setValue(this.getValue());let n=this.j.async.throttle(()=>{if(e.isInDestruct||e.getMode()===o.MODE_WYSIWYG)return;let t=this.instance.isFocused();"auto"!==e.o.height?this.instance.setOption("maxLines",e.workplace.offsetHeight/this.instance.renderer.lineHeight):this.instance.setOption("maxLines",1/0),this.instance.resize(),t&&this.focus()},2*this.j.defaultTimeout);e.e.on(e,"resize",n).on("afterResize afterSetMode",n),n(),this.onReady()},i=!1,n=()=>{if(!e.isInDestruct&&(e.getRealMode()===o.MODE_SOURCE||e.getMode()===o.MODE_SPLIT)){if(!this.aceExists()){i||(i=!0,(0,s.loadNext)(e,e.o.sourceEditorCDNUrlsJS).then(n).catch(()=>null));return}t()}};e.e.on("afterSetMode",n),n()}destruct(){var e,t;this.instance.off("change",this.__onChange),this.instance.off("focus",this.proxyOnFocus),this.instance.off("mousedown",this.proxyOnMouseDown),this.instance.destroy(),null==(t=null==(e=this.j)?void 0:e.events)||t.off("aceInited.source")}setValue(e){if(!this.j.o.editHTMLDocumentMode&&this.j.o.beautifyHTML){let t=this.j.e.fire("beautifyHTML",e);(0,s.isString)(t)&&(e=t)}this.__settingValue=!0;try{this.instance.setValue(e)}finally{this.__settingValue=!1}this.instance.clearSelection()}__onChange(){this.__settingValue||this.toWYSIWYG()}getValue(){return this.instance.getValue()}setReadOnly(e){this.instance.setReadOnly(e)}get isFocused(){return this.instance.isFocused()}focus(){this.instance.container.focus(),this.instance.focus()}blur(){this.instance.blur()}getSelectionStart(){let e=this.instance.selection.getRange();return this.getIndexByRowColumn(e.start.row,e.start.column)}getSelectionEnd(){let e=this.instance.selection.getRange();return this.getIndexByRowColumn(e.end.row,e.end.column)}selectAll(){this.instance.selection.selectAll()}insertRaw(e){let t=this.instance.selection.getCursor(),i=this.instance.session.insert(t,e);this.instance.selection.setRange({start:t,end:i},!1)}setSelectionRange(e,t){this.setSelectionRangeIndices(e,t)}setPlaceHolder(e){}replaceUndoManager(){let{history:e}=this.jodit;this.instance.commands.addCommand({name:"Undo",bindKey:{win:"Ctrl-Z",mac:"Command-Z"},exec(){e.undo()}}),this.instance.commands.addCommand({name:"Redo",bindKey:{win:"Ctrl-Shift-Z",mac:"Command-Shift-Z"},exec(){e.redo()}})}constructor(){super(...arguments),this.className="jodit_ace_editor",this.proxyOnBlur=e=>{this.j.e.fire("blur",e)},this.proxyOnFocus=e=>{this.j.e.fire("focus",e)},this.proxyOnMouseDown=e=>{this.j.e.fire("mousedown",e)},this.__settingValue=!1}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([n.autobind],l.prototype,"__onChange",null)},7483:function(e,t,i){"use strict";i.d(t,{TextAreaEditor:function(){return a}});var o=i(2748),n=i(29960),r=i(41180),s=i(23370);class a extends s.SourceEditor{init(e){this.instance=e.c.element("textarea",{class:"jodit-source__mirror",dir:"rtl"===e.o.direction?"rtl":void 0}),o.Dom.append(this.container,this.instance),e.e.on(this.instance,"mousedown keydown touchstart input",e.async.debounce(this.toWYSIWYG,e.defaultTimeout)).on("setMinHeight.source",e=>{(0,r.css)(this.instance,"minHeight",e)}).on(this.instance,"change keydown mousedown touchstart input",this.autosize).on("afterSetMode.source",this.autosize).on(this.instance,"mousedown focus blur",t=>{e.e.fire(t.type,t)}),this.autosize(),this.onReady()}destruct(){o.Dom.safeRemove(this.instance)}getValue(){return this.instance.value}setValue(e){this.instance.value=e}insertRaw(e){let t=this.getValue();if(this.getSelectionStart()>=0){let i=this.getSelectionStart(),o=this.getSelectionEnd();this.setValue(t.substring(0,i)+e+t.substring(o,t.length))}else this.setValue(t+e)}getSelectionStart(){return this.instance.selectionStart}getSelectionEnd(){return this.instance.selectionEnd}setSelectionRange(e,t=e){this.instance.setSelectionRange(e,t)}get isFocused(){return this.instance===this.j.od.activeElement}focus(){this.instance.focus()}blur(){this.instance.blur()}setPlaceHolder(e){(0,n.attr)(this.instance,"placeholder",e)}setReadOnly(e){(0,n.attr)(this.instance,"readonly",e?"true":null)}selectAll(){this.instance.select()}replaceUndoManager(){let{history:e}=this.jodit;this.j.e.on(this.instance,"keydown",t=>{if((t.ctrlKey||t.metaKey)&&"z"===t.key)return t.shiftKey?e.redo():e.undo(),this.setSelectionRange(this.getValue().length),!1})}constructor(){super(...arguments),this.autosize=this.j.async.debounce(()=>{(0,r.css)(this.instance,"height","auto"),(0,r.css)(this.instance,"height",this.instance.scrollHeight)},this.j.defaultTimeout,!0)}}},52968:function(e,t,i){"use strict";i.d(t,{AceEditor:function(){return o.AceEditor},TextAreaEditor:function(){return n.TextAreaEditor}});var o=i(60031),n=i(7483)},70022:function(e,t,i){"use strict";i.d(t,{createSourceEditor:function(){return r}});var o=i(21537),n=i(52968);function r(e,t,i,r,s){let a;if((0,o.isFunction)(e))a=e(t);else switch(e){case"ace":if(!t.o.shadowRoot){a=new n.AceEditor(t,i,r,s);break}default:a=new n.TextAreaEditor(t,i,r,s)}return a.init(t),a.onReadyAlways(()=>{a.setReadOnly(t.o.readonly)}),a}},23370:function(e,t,i){"use strict";i.d(t,{SourceEditor:function(){return o}});class o{get j(){return this.jodit}onReady(){this.replaceUndoManager(),this.isReady=!0,this.j.e.fire(this,"ready")}onReadyAlways(e){var t;this.isReady?e():null==(t=this.j.events)||t.on(this,"ready",e)}constructor(e,t,i,o){this.jodit=e,this.container=t,this.toWYSIWYG=i,this.fromWYSIWYG=o,this.className="",this.isReady=!1}}},52951:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(50911);i(36204);var c=i(70022),d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class u extends l.Plugin{onInsertHTML(e){var t;if(!this.j.o.readonly&&!this.j.isEditorMode())return null==(t=this.sourceEditor)||t.insertRaw(e),this.toWYSIWYG(),!1}fromWYSIWYG(e=!1){if(!this.__lock||!0===e){this.__lock=!0;let e=this.j.getEditorValue(!1,o.SOURCE_CONSUMER);e!==this.getMirrorValue()&&this.setMirrorValue(e),this.__filledValue=this.getMirrorValue(),this.__lock=!1}}toWYSIWYG(){if(this.__lock)return;let e=this.getMirrorValue();e!==this.__oldMirrorValue&&(this.__lock=!0,this.j.value=e,this.__lock=!1,this.__oldMirrorValue=e)}getNormalPosition(e,t){for(t=t.replace(/<(script|style|iframe)[^>]*>[^]*?<\/\1>/im,e=>{let t="";for(let i=0;i<e.length;i+=1)t+=o.INVISIBLE_SPACE;return t});e>0&&t[e]===o.INVISIBLE_SPACE;)e--;let i=e;for(;i>0;){if("<"===t[--i]&&void 0!==t[i+1]&&t[i+1].match(/[\w/]+/i))return i;if(">"===t[i])break}return e}clnInv(e){return e.replace(o.INVISIBLE_SPACE_REG_EXP(),"")}onSelectAll(e){var t;if("selectall"===e.toLowerCase()&&this.j.getRealMode()===o.MODE_SOURCE)return null==(t=this.sourceEditor)||t.selectAll(),!1}getMirrorValue(){var e;return(null==(e=this.sourceEditor)?void 0:e.getValue())||""}setMirrorValue(e){var t;null==(t=this.sourceEditor)||t.setValue(e)}setFocusToMirror(){var e;let t=this.j.od.activeElement;(!t||t===this.j.od.body||this.j.container.contains(t))&&(null==(e=this.sourceEditor)||e.focus())}saveSelection(){if(this.j.getRealMode()===o.MODE_WYSIWYG)this.j.s.save(),this.j.synchronizeValues(),this.fromWYSIWYG(!0);else{if(this.j.o.editHTMLDocumentMode)return;let e=this.getMirrorValue();if(this.getSelectionStart()===this.getSelectionEnd()){let t=this.j.s.marker(!0),i=this.getNormalPosition(this.getSelectionStart(),this.getMirrorValue());this.setMirrorValue(e.substring(0,i)+this.clnInv(t.outerHTML)+e.substring(i))}else{let t=this.j.s.marker(!0),i=this.j.s.marker(!1),o=this.getNormalPosition(this.getSelectionStart(),e),n=this.getNormalPosition(this.getSelectionEnd(),e);this.setMirrorValue(e.slice(0,o)+this.clnInv(t.outerHTML)+e.slice(o,n)+this.clnInv(i.outerHTML)+e.slice(n))}this.toWYSIWYG()}}removeSelection(){let e,t;if(this.j.getRealMode()===o.MODE_WYSIWYG){this.__lock=!0,this.j.s.restore(),this.__lock=!1;return}let i=this.getMirrorValue();try{if(i=i.replace(/<span[^>]+data-jodit-selection_marker=(["'])start\1[^>]*>[<>]*?<\/span>/gim,this.tempMarkerStart).replace(/<span[^>]+data-jodit-selection_marker=(["'])end\1[^>]*>[<>]*?<\/span>/gim,this.tempMarkerEnd),!this.j.o.editHTMLDocumentMode&&this.j.o.beautifyHTML){let e=this.j.e.fire("beautifyHTML",i);(0,a.isString)(e)&&(i=e)}if(t=e=i.indexOf(this.tempMarkerStart),i=i.replace(this.tempMarkerStartReg,""),-1!==e){let e=i.indexOf(this.tempMarkerEnd);-1!==e&&(t=e)}i=i.replace(this.tempMarkerEndReg,"")}finally{i=i.replace(this.tempMarkerEndReg,"").replace(this.tempMarkerStartReg,"")}this.setMirrorValue(i),this.setMirrorSelectionRange(e,t),this.toWYSIWYG(),this.setFocusToMirror()}setMirrorSelectionRange(e,t){var i;null==(i=this.sourceEditor)||i.setSelectionRange(e,t)}onReadonlyReact(){var e;null==(e=this.sourceEditor)||e.setReadOnly(this.j.o.readonly)}afterInit(e){if(this.mirrorContainer=e.c.div("jodit-source"),r.Dom.append(e.workplace,this.mirrorContainer),e.e.on("afterAddPlace changePlace afterInit",()=>{r.Dom.append(e.workplace,this.mirrorContainer)}),this.sourceEditor=(0,c.createSourceEditor)("area",e,this.mirrorContainer,this.toWYSIWYG,this.fromWYSIWYG),e.e.on(e.ow,"keydown",e=>{var t;e.key===o.KEY_ESC&&(null==(t=this.sourceEditor)?void 0:t.isFocused)&&this.sourceEditor.blur()}),this.onReadonlyReact(),e.e.on("placeholder.source",e=>{var t;null==(t=this.sourceEditor)||t.setPlaceHolder(e)}).on("change.source",this.syncValueFromWYSIWYG).on("beautifyHTML",e=>e),e.o.beautifyHTML){let t=()=>{var t;if(e.isInDestruct)return!1;let i=e.ow.html_beautify;return!!i&&!e.isInDestruct&&(null==(t=e.events)||t.off("beautifyHTML").on("beautifyHTML",e=>i(e)),!0)};if(!t()){let i=!1,n=()=>{i||e.getMode()!==o.MODE_SOURCE&&e.getMode()!==o.MODE_SPLIT||(i=!0,(0,a.loadNext)(e,e.o.beautifyHTMLCDNUrlsJS).then(()=>{t()&&this.beautifyUntouched()},()=>null))};e.e.on("afterSetMode.source",n),n()}}this.syncValueFromWYSIWYG(!0),this.initSourceEditor(e)}syncValueFromWYSIWYG(e=!1){let t=this.j;(t.getMode()===o.MODE_SPLIT||t.getMode()===o.MODE_SOURCE)&&this.fromWYSIWYG(e)}initSourceEditor(e){var t;if("area"!==e.o.sourceEditor){let t=(0,c.createSourceEditor)(e.o.sourceEditor,e,this.mirrorContainer,this.toWYSIWYG,this.fromWYSIWYG);t.onReadyAlways(()=>{var i;this.takeOver(t),null==(i=e.events)||i.fire("sourceEditorReady",e)})}else null==(t=this.sourceEditor)||t.onReadyAlways(()=>{var t;this.syncValueFromWYSIWYG(!0),null==(t=e.events)||t.fire("sourceEditorReady",e)})}takeOver(e){let t=this.sourceEditor;if(!t||t===e){this.sourceEditor=e,this.syncValueFromWYSIWYG(!0);return}let i=t.getValue(),o=t.getSelectionStart(),n=t.getSelectionEnd(),r=t.isFocused,s=i===this.__filledValue;t.destruct(),this.sourceEditor=e,s?this.syncValueFromWYSIWYG(!0):(e.setValue(i),this.toWYSIWYG()),o>=0&&e.setSelectionRange(o,n),r&&e.focus()}beautifyUntouched(){var e,t;let i=this.getMirrorValue();if(this.j.o.editHTMLDocumentMode||!i||i!==this.__filledValue)return;let o=this.j.e.fire("beautifyHTML",i);if((0,a.isString)(o)&&o!==i){let i=null==(e=this.sourceEditor)?void 0:e.isFocused;this.setMirrorValue(o),this.__filledValue=this.getMirrorValue(),i&&(null==(t=this.sourceEditor)||t.focus())}}beforeDestruct(){this.sourceEditor&&(this.sourceEditor.destruct(),delete this.sourceEditor),r.Dom.safeRemove(this.mirrorContainer)}constructor(){super(...arguments),this.buttons=[{name:"source",group:"source"}],this.__lock=!1,this.__oldMirrorValue="",this.__filledValue="",this.tempMarkerStart="{start-jodit-selection}",this.tempMarkerStartReg=/{start-jodit-selection}/g,this.tempMarkerEnd="{end-jodit-selection}",this.tempMarkerEndReg=/{end-jodit-selection}/g,this.getSelectionStart=()=>{var e,t;return null!=(t=null==(e=this.sourceEditor)?void 0:e.getSelectionStart())?t:0},this.getSelectionEnd=()=>{var e,t;return null!=(t=null==(e=this.sourceEditor)?void 0:e.getSelectionEnd())?t:0}}}d([(0,n.watch)(":insertHTML.source")],u.prototype,"onInsertHTML",null),d([n.autobind],u.prototype,"fromWYSIWYG",null),d([n.autobind],u.prototype,"toWYSIWYG",null),d([n.autobind],u.prototype,"getNormalPosition",null),d([(0,n.watch)(":beforeCommand.source")],u.prototype,"onSelectAll",null),d([(0,n.watch)(":beforeSetMode.source")],u.prototype,"saveSelection",null),d([(0,n.watch)(":afterSetMode.source")],u.prototype,"removeSelection",null),d([n.autobind],u.prototype,"setMirrorSelectionRange",null),d([(0,n.watch)(":readonly.source")],u.prototype,"onReadonlyReact",null),d([n.autobind],u.prototype,"syncValueFromWYSIWYG",null),s.pluginSystem.add("source",u)},35599:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m6.5 6-5 6 5 6m11-12 5 6-5 6M14 3l-4 18"/> </g> </svg> '},46614:function(e,t,i){"use strict";var o=i(87612),n=i(70799),r=i(29960),s=i(86583),a=i(12153),l=i(6441),c=i(26532),d=i(93602),u=i(75259);l.Config.prototype.speechRecognize={api:void 0!==c.SpeechRecognition?c.SpeechRecognition:null,sound:!0,continuous:!1,interimResults:!0,commands:{"newline|enter":"enter","delete|remove word|delete word":"backspaceWordButton",comma:"inserthtml::,",underline:"inserthtml::_",hyphen:"inserthtml::-",space:"inserthtml:: ",question:"inserthtml::?",dot:"inserthtml::.","quote|quotes|open quote":"inserthtml::'","header|header h1":"formatblock::h1","select all":"selectall"}},a.Icon.set("speech-recognize",u.default),l.Config.prototype.controls.speechRecognize={isVisible:e=>!!e.o.speechRecognize.api,isActive(e,t){let i=(0,s.dataBind)(e,"speech");return!!(null==i?void 0:i.isEnabled)},isDisabled:e=>!e.o.speechRecognize.api,exec(e,t,{button:i,control:a}){var l;let{api:c,lang:u,continuous:h,interimResults:p,sound:f}=e.o.speechRecognize;if(!c)return void e.alert("Speech recognize API unsupported in your browser");let m=(0,s.dataBind)(e,"speech");if(!m){let t=new c;(m=new d.RecognizeManager(e.async,t)).lang=(0,n.isString)(u)?u:null!=(l=(0,r.attr)(e.od.documentElement,"lang"))?l:void 0,m.continuous=h,m.interimResults=p,m.sound=f,(0,s.dataBind)(e,"speech",m),m.on("pulse",e=>{i.setMod("pulse",e)}),m.on("result",t=>e.e.fire("speechRecognizeResult",t)),m.on("progress",t=>e.e.fire("speechRecognizeProgressResult",t)),m.on("error",t=>e.message.error(t)),e.hookStatus("beforeDestruct",()=>{(0,s.dataBind)(e,"speech",null),m.destruct()})}if(a.args){let e=a.args[0];if((0,o.isBoolean)(m[e])){m[e]=!m[e],m.isEnabled&&m.restart();return}}m.toggle(),m.isEnabled&&i.setMod("pulse",!0),i.state.activated=m.isEnabled},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate(e,t,i){var o;let n=(0,s.dataBind)(e,"speech"),r=null!=(o=null==n?void 0:n[t])?o:e.o.speechRecognize[t];return`<span class='jodit-speech-recognize__list-item'><input ${r?"checked":""} class='jodit-checkbox' type='checkbox'> ${i}</span>`},mods:{stroke:!1}}},26532:function(e,t,i){"use strict";var o=i(82758);let n=o.globalWindow?o.globalWindow.SpeechRecognition||o.globalWindow.webkitSpeechRecognition:void 0;i.d(t,["SpeechRecognition",0,n])},54076:function(e,t,i){"use strict";function o(e,t){let[i,o]=t.split("::");"open"===i.toLowerCase()&&o&&/^(javascript:|data:|vbscript:)/i.test(o.trim())||e.execCommand(i,null,o)}i.d(t,{execSpellCommand:function(){return o}})},93602:function(e,t,i){"use strict";i.d(t,{RecognizeManager:function(){return a}});var o=i(65478),n=i(72757),r=i(37643),s=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class a extends n.Eventify{set lang(e){this._lang=e,this._api.lang=e}get lang(){return this._lang}set continuous(e){this._continuous=e,this._api.continuous=e}get continuous(){return this._continuous}set interimResults(e){this._interimResults=e,this._api.interimResults=e}get interimResults(){return this._interimResults}destruct(){this.stop(),(0,r.closeSound)(this),a._instances.delete(this),super.destruct()}get isEnabled(){return this._isEnabled}start(){if(!this._isEnabled){this._isEnabled=!0,a._instances.forEach(e=>{e!==this&&e.stop()});try{this._api.start()}catch(e){this._onError(e),this.stop();return}this.__on("speechstart",this._onSpeechStart).__on("error",this._onError).__on("result",this._onProgress).__on("end",this._onResults)}}stop(){this._isEnabled&&(this._api.abort(),this._api.stop(),this.__off("speechstart",this._onSpeechStart).__off("error",this._onError).__off("result",this._onProgress).__off("end",this._onResults),this.async.clearTimeout(this._restartTimeout),this._isEnabled=!1,this.emit("pulse",!1))}toggle(){this._isEnabled?this.stop():this.start()}restart(){this.stop(),this.start()}__on(e,t){return this._api.addEventListener(e,t),this}__off(e,t){return this._api.removeEventListener(e,t),this}_onResults(e){this.emit("pulse",!1),this.emit("result",this.__interimResults),this.__interimResults="",this._makeSound(440),this.restart()}_onProgress(e){if(this._isEnabled&&(this.__interimResults="",e.results)){for(let t=0;t<e.results.length;t++){let i=e.results.item(t);if(i.length){let{transcript:e}=i.item(0);this.__interimResults+=e}}this.__interimResults&&this.emit("progress",this.__interimResults)}}_onError(e){"voice-unavailable"===e.error&&this.emit("error","Voice unavailable"),"not-allowed"===e.error&&this.emit("error","Not allowed"),("language-unavailable"===e.error||"language-not-supported"===e.error)&&this.emit("error","Language unavailable"),this._makeSound(940),this.emit("pulse",!1),this.stop()}_makeSound(e){this.sound&&(0,r.sound)(this,{frequency:e})}constructor(e,t){super(),this.async=e,this._continuous=!1,this._interimResults=!1,this.sound=!0,this._isEnabled=!1,this._restartTimeout=0,this._onSpeechStart=e=>{this._isEnabled&&(this.async.clearTimeout(this._restartTimeout),this._restartTimeout=this.async.setTimeout(()=>{this.restart(),this.emit("pulse",!1),this._makeSound(940)},5e3),this.emit("pulse",!0))},this.__interimResults="",this._api=t,a._instances.add(this)}}a._instances=new Set,s([o.autobind],a.prototype,"_onResults",null),s([o.autobind],a.prototype,"_onProgress",null),s([o.autobind],a.prototype,"_onError",null)},37643:function(e,t,i){"use strict";i.d(t,{closeSound:function(){return s},sound:function(){return r}});var o=i(82758);let n=new WeakMap;function r(e,{sec:t=.1,frequency:i=440,gain:s=.1,type:a="sine"}={}){let l=function(e){if(!o.globalWindow)return null;let t=n.get(e);if(t&&"closed"!==t.state)return t;let i=o.globalWindow.AudioContext||o.globalWindow.webkitAudioContext;if(!i)return null;let r=new i;return n.set(e,r),r}(e);if(!l)return;let c=l.createGain(),d=l.createOscillator();d.type=a,d.frequency.value=i,c.gain.value=s,d.connect(c),c.connect(l.destination),d.start(),d.stop(l.currentTime+t)}function s(e){let t=n.get(e);t&&(n.delete(e),"closed"!==t.state&&t.close())}},71705:function(e){"use strict";e.exports={newline:"الخط الجديد",delete:"حذف",space:"الفضاء","Speech Recognize":"التعرف على الكلام",Sound:"الصوت","Interim Results":"النتائج المؤقتة"}},89930:function(e){"use strict";e.exports={newline:"řádek",delete:"odstranit",space:"prostora","Speech Recognize":"Rozpoznání Řeči",Sound:"Zvuk","Interim Results":"Průběžné Výsledky"}},34945:function(e){"use strict";e.exports={newline:"Zeilenumbruch",delete:"löschen",space:"Raum","Speech Recognize":"Sprache Erkennen",Sound:"Sound","Interim Results":"Zwischenergebnis"}},63134:function(e){"use strict";e.exports={newline:"nueva línea",delete:"eliminar",space:"espacio","Speech Recognize":"Reconocimiento de Voz",Sound:"Sonido","Interim Results":"Resultados Provisionales"}},66835:function(e){"use strict";e.exports={newline:"خط جدید",delete:"حذف",space:"فضا","Speech Recognize":"گفتار را تشخیص دهید",Sound:"صدا","Interim Results":"نتایج موقت"}},1115:function(e){"use strict";e.exports={"Speech Recognize":"Puheentunnistus",newline:"uusi rivi",delete:"poistaa",space:"tilaa",Sound:"Ääni","Interim Results":"Välitulokset"}},59302:function(e){"use strict";e.exports={newline:"nouvelle ligne",delete:"supprimer",space:"espace","Speech Recognize":"Reconnaissance Vocale",Sound:"Son","Interim Results":"Résultats Intermédiaires"}},94141:function(e){"use strict";e.exports={newline:"חדשות",delete:"מחק",space:"שטח","Speech Recognize":"דיבור מזהה",Sound:"קול","Interim Results":"תוצאות ביניים"}},24877:function(e){"use strict";e.exports={newline:"újsor",delete:"törlés",space:"tér","Speech Recognize":"A Beszéd Felismeri",Sound:"Hang","Interim Results":"Időközi Eredmények"}},80651:function(e){"use strict";e.exports={newline:"newline",delete:"Hapus",space:"ruang","Speech Recognize":"Pidato Mengenali",Sound:"Suara","Interim Results":"Hasil Sementara"}},90492:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o||(o=i.t(E,2))},cs_cz:function(){return n||(n=i.t(T,2))},de:function(){return r||(r=i.t(j,2))},es:function(){return s||(s=i.t(D,2))},fa:function(){return a||(a=i.t(A,2))},fi:function(){return l||(l=i.t(P,2))},fr:function(){return c||(c=i.t(M,2))},he:function(){return d||(d=i.t(L,2))},hu:function(){return u||(u=i.t(R,2))},id:function(){return h||(h=i.t(z,2))},it:function(){return p||(p=i.t(B,2))},ja:function(){return f||(f=i.t(N,2))},ko:function(){return m||(m=i.t(F,2))},mn:function(){return g||(g=i.t(O,2))},nl:function(){return b||(b=i.t(H,2))},no:function(){return v||(v=i.t(U,2))},pl:function(){return y||(y=i.t(V,2))},pt_br:function(){return w||(w=i.t(W,2))},ru:function(){return _||(_=i.t($,2))},sk:function(){return k||(k=i.t(K,2))},tr:function(){return C||(C=i.t(G,2))},ua:function(){return S||(S=i.t(Y,2))},zh_cn:function(){return x||(x=i.t(q,2))},zh_tw:function(){return I||(I=i.t(J,2))}});var o,n,r,s,a,l,c,d,u,h,p,f,m,g,b,v,y,w,_,k,C,S,x,I,E=i(71705),T=i(89930),j=i(34945),D=i(63134),A=i(66835),P=i(1115),M=i(59302),L=i(94141),R=i(24877),z=i(80651),B=i(62395),N=i(16407),F=i(37272),O=i(22113),H=i(22432),U=i(17081),V=i(30798),W=i(8661),$=i(19147),K=i(76220),G=i(93620),Y=i(40372),q=i(69874),J=i(88774)},62395:function(e){"use strict";e.exports={newline:"nuova riga",delete:"eliminare",space:"spazio","Speech Recognize":"Discorso Riconoscere",Sound:"Suono","Interim Results":"Risultati intermedi"}},16407:function(e){"use strict";e.exports={newline:"改行",delete:"削除",space:"スペース","Speech Recognize":"音声認識",Sound:"音","Interim Results":"中間結果"}},37272:function(e){"use strict";e.exports={newline:"줄 바꿈",delete:"삭제",space:"공간","Speech Recognize":"음성 인식",Sound:"소리","Interim Results":"중간 결과"}},22113:function(e){"use strict";e.exports={newline:"Шинэ мөр",delete:"Устгах",space:"Зай","Speech Recognize":"Дуу хоолой таних",Sound:"Дуу","Interim Results":"Түр зуурын үр дүн"}},22432:function(e){"use strict";e.exports={newline:"regel",delete:"verwijderen",space:"ruimte","Speech Recognize":"Spraak Herkennen",Sound:"Geluid","Interim Results":"Tussentijdse Resultaten"}},17081:function(e){"use strict";e.exports={newline:"nylinje",delete:"slette",space:"rom","Speech Recognize":"Talegjenkjenning",Sound:"Lyd","Interim Results":"Midlertidige resultater"}},30798:function(e){"use strict";e.exports={newline:"newline",delete:"usunąć",space:"przestrzeń","Speech Recognize":"Rozpoznawanie Mowy",Sound:"Dźwięk","Interim Results":"Wyniki Okresowe"}},8661:function(e){"use strict";e.exports={newline:"linha",delete:"excluir",space:"espaco","Speech Recognize":"Discurso Reconhecer",Sound:"Som","Interim Results":"Resultados Provisórios"}},19147:function(e){"use strict";e.exports={newline:"новая строка|перенос|энтер",delete:"удалить",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Промежуточные результаты"}},76220:function(e){"use strict";e.exports={newline:"nový riadok",delete:"vymazať",space:"medzera","Speech Recognize":"Rozpoznávanie reči",Sound:"Zvuk","Interim Results":"Predbežné výsledky"}},93620:function(e){"use strict";e.exports={newline:"yeni satır",delete:"silmek",space:"uzay","Speech Recognize":"Konuşma Tanıma",Sound:"Ses","Interim Results":"Ara Sonuçlar"}},40372:function(e){"use strict";e.exports={newline:"новая строка|перенос|ентер",delete:"видалити",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Проміжні результати"}},69874:function(e){"use strict";e.exports={newline:"新行",delete:"删除",space:"空间","Speech Recognize":"言语识别",Sound:"声音","Interim Results":"中期业绩"}},88774:function(e){"use strict";e.exports={newline:"換行",delete:"刪除",space:"空白","Speech Recognize":"語音辨識",Sound:"聲音","Interim Results":"階段性辨識結果"}},3115:function(e,t,i){"use strict";var o=i(37133),n=i(2748),r=i(580),s=i(37790),a=i(50911);i(46614);var l=i(2303),c=i(54076),d=i(90492),u=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class h extends a.Plugin{afterInit(e){let{commands:t}=e.o.speechRecognize;t&&((0,r.extendLang)(d),(0,s.keys)(t,!1).forEach(i=>{i.split("|").forEach(o=>{o=o.trim().toLowerCase(),this._commandToWord[o]=t[i];let n=e.i18n(o);n!==o&&n.split("|").forEach(e=>{this._commandToWord[e.trim().toLowerCase()]=t[i].trim()})})}))}beforeDestruct(e){n.Dom.safeRemove(this.messagePopup)}onSpeechRecognizeProgressResult(e){this.messagePopup||(this.messagePopup=this.j.create.div("jodit-speech-recognize__popup")),n.Dom.append(this.j.workplace,this.messagePopup),this.j.async.clearTimeout(this.__hidePopupTimeout),this.__hidePopupTimeout=this.j.async.setTimeout(()=>{n.Dom.safeRemove(this.messagePopup)},1e3),this.messagePopup.innerText=e+"|"}onSpeechRecognizeResult(e){this.j.async.clearTimeout(this.__hidePopupTimeout),n.Dom.safeRemove(this.messagePopup);let{j:t}=this,{s:i}=t;if(!this._checkCommand(e)){let{range:o}=i,r=i.current();if(i.isCollapsed()&&n.Dom.isText(r)&&n.Dom.isOrContains(t.editor,r)&&r.nodeValue){let n=r.nodeValue;r.nodeValue=n+(/[\u00A0 ]\uFEFF*$/.test(n)?"":" ")+e,o.setStartAfter(r),i.selectRange(o),t.synchronizeValues()}else i.insertHTML(e)}}_checkCommand(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,c.execSpellCommand)(this.j,this._commandToWord[e]),!0)}constructor(){super(...arguments),this.buttons=[{group:"state",name:"speechRecognize"}],this._commandToWord={}}}u([(0,o.watch)(":speechRecognizeProgressResult")],h.prototype,"onSpeechRecognizeProgressResult",null),u([(0,o.watch)(":speechRecognizeResult")],h.prototype,"onSpeechRecognizeResult",null),l.Jodit.plugins.add("speech-recognize",h)},75259:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="9" y="2" width="6" height="13" rx="3"/><path d="M5 10v2a7 7 0 0 0 14 0v-2M12 19v3m-4 0h8"/> </g> </svg> '},99085:function(e,t,i){"use strict";var o=i(12153),n=i(6441),r=i(10937);n.Config.prototype.spellcheck=!1,o.Icon.set("spellcheck",r.default),n.Config.prototype.controls.spellcheck={isActive:e=>e.o.spellcheck,icon:r.default,name:"spellcheck",command:"toggleSpellcheck",tooltip:"Spellcheck"}},28906:function(e){"use strict";e.exports={Spellcheck:"التدقيق الإملائي"}},24351:function(e){"use strict";e.exports={Spellcheck:"Kontrola pravopisu"}},32806:function(e){"use strict";e.exports={Spellcheck:"Rechtschreibprüfung"}},77725:function(e){"use strict";e.exports={Spellcheck:"Corrección ortográfica"}},26428:function(e){"use strict";e.exports={Spellcheck:"غلطیابی املایی"}},42820:function(e){"use strict";e.exports={Spellcheck:"Oikeinkirjoituksen tarkistus"}},60373:function(e){"use strict";e.exports={Spellcheck:"Vérification Orthographique"}},98370:function(e){"use strict";e.exports={Spellcheck:"בדיקת איות"}},44850:function(e){"use strict";e.exports={Spellcheck:"Helyesírás-ellenőrzés"}},3636:function(e){"use strict";e.exports={Spellcheck:"Spellchecking"}},26529:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o||(o=i.t(E,2))},cs_cz:function(){return n||(n=i.t(T,2))},de:function(){return r||(r=i.t(j,2))},es:function(){return s||(s=i.t(D,2))},fa:function(){return a||(a=i.t(A,2))},fi:function(){return l||(l=i.t(P,2))},fr:function(){return c||(c=i.t(M,2))},he:function(){return d||(d=i.t(L,2))},hu:function(){return u||(u=i.t(R,2))},id:function(){return h||(h=i.t(z,2))},it:function(){return p||(p=i.t(B,2))},ja:function(){return f||(f=i.t(N,2))},ko:function(){return m||(m=i.t(F,2))},mn:function(){return g||(g=i.t(O,2))},nl:function(){return b||(b=i.t(H,2))},no:function(){return v||(v=i.t(U,2))},pl:function(){return y||(y=i.t(V,2))},pt_br:function(){return w||(w=i.t(W,2))},ru:function(){return _||(_=i.t($,2))},sk:function(){return k||(k=i.t(K,2))},tr:function(){return C||(C=i.t(G,2))},ua:function(){return S||(S=i.t(Y,2))},zh_cn:function(){return x||(x=i.t(q,2))},zh_tw:function(){return I||(I=i.t(J,2))}});var o,n,r,s,a,l,c,d,u,h,p,f,m,g,b,v,y,w,_,k,C,S,x,I,E=i(28906),T=i(24351),j=i(32806),D=i(77725),A=i(26428),P=i(42820),M=i(60373),L=i(98370),R=i(44850),z=i(3636),B=i(73220),N=i(55776),F=i(13995),O=i(6402),H=i(1879),U=i(1322),V=i(53361),W=i(70824),$=i(65140),K=i(60407),G=i(42247),Y=i(68891),q=i(63195),J=i(42107)},73220:function(e){"use strict";e.exports={Spellcheck:"Controllo ortografico"}},55776:function(e){"use strict";e.exports={Spellcheck:"スペルチェック"}},13995:function(e){"use strict";e.exports={Spellcheck:"맞춤법 검사"}},6402:function(e){"use strict";e.exports={Spellcheck:"Дүрмийн алдаа шалгах"}},1879:function(e){"use strict";e.exports={Spellcheck:"Spellingcontrole"}},1322:function(e){"use strict";e.exports={Spellcheck:"Stavekontroll"}},53361:function(e){"use strict";e.exports={Spellcheck:"Sprawdzanie pisowni"}},70824:function(e){"use strict";e.exports={Spellcheck:"Verificação ortográfica"}},65140:function(e){"use strict";e.exports={Spellcheck:"Проверка орфографии"}},60407:function(e){"use strict";e.exports={Spellcheck:"Kontrola pravopisu"}},42247:function(e){"use strict";e.exports={Spellcheck:"Yazım denetimi"}},68891:function(e){"use strict";e.exports={Spellcheck:"Перевірка орфографії"}},63195:function(e){"use strict";e.exports={Spellcheck:"拼写检查"}},42107:function(e){"use strict";e.exports={Spellcheck:"拼字檢查"}},43809:function(e,t,i){"use strict";var o=i(65478),n=i(580),r=i(29960),s=i(50911);i(99085);var a=i(26529);class l extends s.Plugin{afterInit(e){e.e.on("afterInit afterAddPlace prepareWYSIWYGEditor",this.toggleSpellcheck),this.toggleSpellcheck(),e.registerCommand("toggleSpellcheck",()=>{this.jodit.o.spellcheck=!this.jodit.o.spellcheck,this.toggleSpellcheck(),this.j.e.fire("updateToolbar")})}toggleSpellcheck(){(0,r.attr)(this.jodit.editor,"spellcheck",this.jodit.o.spellcheck)}beforeDestruct(e){}constructor(e){super(e),this.buttons=[{group:"state",name:"spellcheck"}],(0,n.extendLang)(a)}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([o.autobind],l.prototype,"toggleSpellcheck",null),n.pluginSystem.add("spellcheck",l)},10937:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 14 5-11 5 11M5 10h6m0 8 3 3 7-8"/> </g> </svg> '},99649:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.showCharsCounter=!0,o.Config.prototype.countHTMLChars=!1,o.Config.prototype.countTextSpaces=!1,o.Config.prototype.showWordsCounter=!0},7309:function(e,t,i){"use strict";var o=i(82758),n=i(2748),r=i(580),s=i(20356);i(99649);class a extends s.Plugin{afterInit(){this.charCounter=this.j.c.span(),this.wordCounter=this.j.c.span(),this.j.e.on("afterInit changePlace afterAddPlace",this.reInit),this.reInit()}beforeDestruct(){n.Dom.safeRemove(this.charCounter),n.Dom.safeRemove(this.wordCounter),this.j.e.off("afterInit changePlace afterAddPlace",this.reInit),this.charCounter=null,this.wordCounter=null}constructor(){super(...arguments),this.charCounter=null,this.wordCounter=null,this.reInit=()=>{this.j.o.showCharsCounter&&this.charCounter&&this.j.statusbar.append(this.charCounter,!0),this.j.o.showWordsCounter&&this.wordCounter&&this.j.statusbar.append(this.wordCounter,!0),this.j.e.off("change keyup",this.calc).on("change keyup",this.calc),this.calc()},this.calc=this.j.async.throttle(()=>{let e=this.j.text;if(this.j.o.showCharsCounter&&this.charCounter){let t;t=this.j.o.countHTMLChars?this.j.value:this.j.o.countTextSpaces?e.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),"").replace(/[\r\n]/g,""):e.replace((0,o.SPACE_REG_EXP)(),""),this.charCounter.textContent=this.j.i18n("Chars: %d",t.length)}this.j.o.showWordsCounter&&this.wordCounter&&(this.wordCounter.textContent=this.j.i18n("Words: %d",e.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),"").split((0,o.SPACE_REG_EXP)()).filter(e=>e.length).length))},this.j.defaultTimeout)}}r.pluginSystem.add("stat",a)},48038:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.toolbarSticky=!0,o.Config.prototype.toolbarDisableStickyForMobile=!0,o.Config.prototype.toolbarStickyOffset=0},68687:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(20356);i(48038);let c=!o.IS_ES_NEXT&&o.IS_IE;class d extends l.Plugin{afterInit(e){e.e.on(e.ow,"scroll.sticky wheel.sticky mousewheel.sticky resize.sticky",this.__onScroll).on("getStickyState.sticky",()=>this.__isToolbarStuck)}__onScroll(){let{jodit:e}=this;if(!e.o.toolbarSticky||!e.o.toolbar)return;let t=e.ow.pageYOffset||e.od.documentElement&&e.od.documentElement.scrollTop||0,i=(0,a.offset)(e.container,e,e.od,!0),n=e.getMode()===o.MODE_WYSIWYG&&t+e.o.toolbarStickyOffset>i.top&&t+e.o.toolbarStickyOffset<i.top+i.height&&!(e.o.toolbarDisableStickyForMobile&&this.__isMobile());if(this.__isToolbarStuck===n)return;let r=e.toolbarContainer;r&&(n?this.addSticky(r):this.removeSticky(r)),e.e.fire("toggleSticky",n)}__isMobile(){let{j:e}=this;return e&&e.options&&e.container&&e.options.sizeSM>=e.container.offsetWidth}beforeDestruct(e){r.Dom.safeRemove(this.__dummyBox),e.e.off(e.ow,"scroll.sticky wheel.sticky mousewheel.sticky resize.sticky",this.__onScroll).off(".sticky")}constructor(){super(...arguments),this.__isToolbarStuck=!1,this.__createDummy=e=>{this.__dummyBox=this.j.c.div(),this.__dummyBox.classList.add("jodit_sticky-dummy_toolbar"),r.Dom.before(e,this.__dummyBox)},this.addSticky=e=>{this.__isToolbarStuck||(c&&!this.__dummyBox&&this.__createDummy(e),this.j.container.classList.add("jodit_sticky"),this.__isToolbarStuck=!0),(0,a.css)(e,{top:this.j.o.toolbarStickyOffset||null,width:this.j.container.offsetWidth-2}),this.__dummyBox&&(0,a.css)(this.__dummyBox,{height:e.offsetHeight})},this.removeSticky=e=>{this.__isToolbarStuck&&((0,a.css)(e,{width:"",top:""}),this.j.container.classList.remove("jodit_sticky"),this.__isToolbarStuck=!1)}}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,n.throttle)()],d.prototype,"__onScroll",null),s.pluginSystem.add("sticky",d)},87394:function(e,t,i){"use strict";var o=i(2748),n=i(12153),r=i(6441),s=i(5119);r.Config.prototype.usePopupForSpecialCharacters=!1,r.Config.prototype.specialCharacters=["!",""","#","$","%","&","'","(",")","*","+","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","€","‘","’","“","”","–","—","¡","¢","£","¤","¥","¦","§","¨","©","ª","«","»","¬","®","¯","°","²","³","´","µ","¶","·","¸","¹","º","¼","½","¾","¿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ","Œ","œ","Ŵ","Ŷ","ŵ","ŷ","‚","‛","„","…","™","►","•","→","⇒","⇔","♦","≈"],n.Icon.set("symbols",s.default),r.Config.prototype.controls.symbols={hotkeys:["ctrl+shift+i","cmd+shift+i"],tooltip:"Insert Special Character",popup(e,t,i){let n=e.e.fire("generateSpecialCharactersTable.symbols");if(n){if(e.o.usePopupForSpecialCharacters){let t=e.c.div();return t.classList.add("jodit-symbols"),o.Dom.append(t,n),e.e.on(n,"close_dialog",i),t}e.alert(n,"Select Special Character",void 0,"jodit-symbols").bindDestruct(e);let t=o.Dom.first(n,e=>o.Dom.isTag(e,"a"));t&&t.focus()}}}},20741:function(e){"use strict";e.exports={symbols:"رمز"}},3958:function(e){"use strict";e.exports={symbols:"symbol"}},53437:function(e){"use strict";e.exports={symbols:"Symbol"}},56882:function(e){"use strict";e.exports={symbols:"Símbolo"}},75703:function(e){"use strict";e.exports={symbols:"سمبل"}},49759:function(e){"use strict";e.exports={symbols:"Symbolit"}},44730:function(e){"use strict";e.exports={symbols:"caractère"}},70945:function(e){"use strict";e.exports={symbols:"תו מיוחד"}},49841:function(e){"use strict";e.exports={symbols:"Szimbólum"}},33295:function(e){"use strict";e.exports={symbols:"simbol"}},32824:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o||(o=i.t(x,2))},cs_cz:function(){return n||(n=i.t(I,2))},de:function(){return r||(r=i.t(E,2))},es:function(){return s||(s=i.t(T,2))},fa:function(){return a||(a=i.t(j,2))},fi:function(){return l||(l=i.t(D,2))},fr:function(){return c||(c=i.t(A,2))},he:function(){return d||(d=i.t(P,2))},hu:function(){return u||(u=i.t(M,2))},id:function(){return h||(h=i.t(L,2))},it:function(){return p||(p=i.t(R,2))},ja:function(){return f||(f=i.t(z,2))},ko:function(){return m||(m=i.t(B,2))},mn:function(){return g||(g=i.t(N,2))},nl:function(){return b||(b=i.t(F,2))},pl:function(){return v||(v=i.t(O,2))},pt_br:function(){return y||(y=i.t(H,2))},ru:function(){return w||(w=i.t(U,2))},tr:function(){return _||(_=i.t(V,2))},ua:function(){return k||(k=i.t(W,2))},zh_cn:function(){return C||(C=i.t($,2))},zh_tw:function(){return S||(S=i.t(K,2))}});var o,n,r,s,a,l,c,d,u,h,p,f,m,g,b,v,y,w,_,k,C,S,x=i(20741),I=i(3958),E=i(53437),T=i(56882),j=i(75703),D=i(49759),A=i(44730),P=i(70945),M=i(49841),L=i(33295),R=i(47615),z=i(83059),B=i(22396),N=i(58285),F=i(51804),O=i(53650),H=i(41369),U=i(57855),V=i(44328),W=i(91080),$=i(89702),K=i(66434)},47615:function(e){"use strict";e.exports={symbols:"Simbolo"}},83059:function(e){"use strict";e.exports={symbols:"symbol"}},22396:function(e){"use strict";e.exports={symbols:"기호"}},58285:function(e){"use strict";e.exports={symbols:"тэмдэгт"}},51804:function(e){"use strict";e.exports={symbols:"symbool"}},53650:function(e){"use strict";e.exports={symbols:"symbol"}},41369:function(e){"use strict";e.exports={symbols:"Símbolo"}},57855:function(e){"use strict";e.exports={symbols:"символ"}},44328:function(e){"use strict";e.exports={symbols:"Sembol"}},91080:function(e){"use strict";e.exports={symbols:"символ"}},89702:function(e){"use strict";e.exports={symbols:"符号"}},66434:function(e){"use strict";e.exports={symbols:"符號"}},59495:function(e,t,i){"use strict";var o=i(82758),n=i(2748),r=i(580),s=i(43555),a=i(20356);i(87394);var l=i(32824);class c extends a.Plugin{afterInit(e){e.e.on("generateSpecialCharactersTable.symbols",()=>{let t=e.c.fromHTML(`<div class="jodit-symbols__container">
|
|
267
|
+
</div>`}get currentIndex(){return this._currentIndex}set currentIndex(e){this._currentIndex=e,this.currentBox.innerText=e.toString()}set count(e){this.countBox.innerText=e.toString()}get query(){return this.queryInput.value}get replace(){return this.replaceInput.value}onEditorKeyDown(e){if(!this.isOpened)return;let{j:t}=this;if(t.getRealMode()===o.MODE_WYSIWYG)switch(e.key){case o.KEY_ESC:this.close();break;case o.KEY_F3:this.queryInput.value&&(t.e.fire(e.shiftKey?"searchPrevious":"searchNext"),e.preventDefault())}}open(e,t,i=!1){this.isOpened||(r.Dom.append(this.j.workplace,this.container),this.isOpened=!0),this.calcSticky(this.j.e.fire("getStickyState.sticky")||!1),this.j.e.fire("hidePopup"),this.setMod("replace",i);let o=null!=e?e:(this.j.s.sel||"").toString();o&&(this.queryInput.value=o),t&&(this.replaceInput.value=t),this.setMod("empty-query",!o.length),this.j.e.fire(this,"needUpdateCounters"),o?this.queryInput.select():this.queryInput.focus()}close(){this.isOpened&&(this.j.s.restore(),r.Dom.safeRemove(this.container),this.isOpened=!1,this.j.e.fire(this,"afterClose"))}calcSticky(e){if(this.isOpened)if(this.setMod("sticky",e),e){let e=(0,s.position)(this.j.toolbarContainer);(0,s.css)(this.container,{top:e.top+e.height,left:e.left+e.width})}else(0,s.css)(this.container,{top:null,left:null})}constructor(e){let t;super(e),this.selInfo=null,this._currentIndex=0,this.isOpened=!1;let{query:i,replace:n,cancel:r,next:a,prev:l,replaceBtn:c,current:d,count:u}=(0,s.refs)(this.container);this.queryInput=i,this.replaceInput=n,this.closeButton=r,this.replaceButton=c,this.currentBox=d,this.countBox=u;let h=()=>this.close(),p=()=>void e.e.fire(this,"pressReplaceButton"),f=()=>void e.e.fire("searchNext"),m=()=>void e.e.fire("searchPrevious"),g=e=>t=>{t.detail||(t.preventDefault(),e())};e.e.on(this.closeButton,"pointerdown",()=>(h(),!1)).on(this.closeButton,"click",g(h)).on(this.queryInput,"input",()=>{this.currentIndex=0}).on(this.queryInput,"pointerdown",()=>{e.s.isFocused()&&(e.s.removeMarkers(),this.selInfo=e.s.save())}).on(this.replaceButton,"pointerdown",()=>(p(),!1)).on(this.replaceButton,"click",g(p)).on(a,"pointerdown",()=>(f(),!1)).on(a,"click",g(f)).on(l,"pointerdown",()=>(m(),!1)).on(l,"click",g(m)).on(this.queryInput,"input",()=>{this.setMod("empty-query",!(0,s.trim)(this.queryInput.value).length)}).on(this.queryInput,"keydown",(t=this.j.async.debounce(async t=>{t.key===o.KEY_ENTER?await e.e.fire("searchNext")&&this.close():e.e.fire(this,"needUpdateCounters")},this.j.defaultTimeout),e=>{e.key===o.KEY_ENTER&&(e.preventDefault(),e.stopImmediatePropagation()),t(e)}))}};l([(0,n.watch)([":keydown","queryInput:keydown"])],c.prototype,"onEditorKeyDown",null),l([n.autobind],c.prototype,"open",null),l([n.autobind],c.prototype,"close",null),l([(0,n.watch)(":toggleSticky")],c.prototype,"calcSticky",null),c=l([n.component],c)},55311:function(e,t,i){"use strict";i(6441).Config.prototype.tableAllowCellSelection=!0},28545:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(50911),c=i(76014);i(55311);var d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let u="table_processor_observer",h="onMoveTableSelectCell";class p extends l.Plugin{get __tableModule(){return this.j.getInstance(c.Table,this.j.o)}afterInit(e){e.o.tableAllowCellSelection&&e.e.on("keydown.select-cells",e=>{e.key===o.KEY_TAB&&this.unselectCells()}).on("beforeCommand.select-cells",this.onExecCommand).on("afterCommand.select-cells",this.onAfterCommand).on(["clickEditor","mousedownTd","mousedownTh","touchstartTd","touchstartTh"].map(e=>e+".select-cells").join(" "),this.onStartSelection).on("clickTr clickTbody",()=>{var e;let t=this.__tableModule.getAllSelectedCells().length;if(t)return t>1&&(null==(e=this.j.s.sel)||e.removeAllRanges()),!1})}onStartSelection(e,t){var i;if(this.j.o.readonly)return;let o=r.Dom.closest(e,"table",this.j.editor);return((null==t?void 0:t.ctrlKey)||(null==t?void 0:t.metaKey))&&e!==this.j.editor&&o&&r.Dom.isCell(e)?(this.__tableModule.getAllSelectedCells().includes(e)?this.__tableModule.removeSelection(e):(e.firstChild||r.Dom.append(e,this.j.createInside.element("br")),this.__tableModule.addSelection(e)),this.__selectedCell=e,null==(i=this.j.s.sel)||i.removeAllRanges(),this.__tableModule.getAllSelectedCells().length?this.j.e.fire("showPopup",o,()=>(0,a.position)(e,this.j),"cells"):this.j.e.fire("hidePopup","cells"),!1):(this.unselectCells(),e===this.j.editor)?void 0:e&&o?(e.firstChild||r.Dom.append(e,this.j.createInside.element("br")),this.__isSelectionMode=!0,this.__selectedCell=e,this.__tableModule.addSelection(e),this.j.e.on(o,"mousemove.select-cells touchmove.select-cells",this.j.async.throttle(this.__onMove.bind(this,o),{label:h,timeout:this.j.defaultTimeout/2})).on(o,"mouseup.select-cells touchend.select-cells",this.__onStopSelection.bind(this,o)),!1):void 0}onOutsideClick(){this.__selectedCell=null,this.__onRemoveSelection()}onChange(){this.j.isLocked||this.__isSelectionMode||this.__onRemoveSelection()}__onMove(e,t){var i,o;let n;if(this.j.o.readonly&&!this.j.isLocked||this.j.isLockedNotBy(u))return;let s=(null!=(i=this.j.o.shadowRoot)?i:this.j.ed).elementFromPoint(t.clientX,t.clientY);if(!s)return;let a=r.Dom.closest(s,["td","th"],e);if(!a||!this.__selectedCell)return;a!==this.__selectedCell&&this.j.lock(u),this.unselectCells();let l=this.__tableModule.getSelectedBound(e,[a,this.__selectedCell]),c=this.__tableModule.formalMatrix(e);for(let e=l[0][0];e<=l[1][0];e+=1)for(let t=l[0][1];t<=l[1][1];t+=1)this.__tableModule.addSelection(c[e][t]);this.__tableModule.getAllSelectedCells().length>1&&(null==(o=this.j.s.sel)||o.removeAllRanges()),this.j.e.fire("hidePopup"),t.stopPropagation(),n=this.j.createInside.fromHTML('<div style="color:rgba(0,0,0,0.01);width:0;height:0"> </div>'),r.Dom.append(a,n),this.j.async.setTimeout(()=>{r.Dom.safeRemove(n)},this.j.defaultTimeout/5)}__onRemoveSelection(e){var t;if(!(null==(t=null==e?void 0:e.buffer)?void 0:t.actionTrigger)&&!this.__selectedCell&&this.__tableModule.getAllSelectedCells().length){this.j.unlock(),this.unselectCells(),this.j.e.fire("hidePopup","cells");return}this.__isSelectionMode=!1,this.__selectedCell=null}__onStopSelection(e,t){var i,o,n;if(!this.__selectedCell)return;this.__isSelectionMode=!1,this.j.unlock();let s=(null!=(i=this.j.o.shadowRoot)?i:this.j.ed).elementFromPoint(t.clientX,t.clientY);if(!s)return;let l=r.Dom.closest(s,["td","th"],e);if(!l)return;let c=r.Dom.closest(l,"table",e);if(c&&c!==e)return;let d=this.__tableModule.getSelectedBound(e,[l,this.__selectedCell]),u=this.__tableModule.formalMatrix(e),p=null==(o=u[d[1][0]])?void 0:o[d[1][1]],f=null==(n=u[d[0][0]])?void 0:n[d[0][1]];f&&p&&(this.j.e.fire("showPopup",e,()=>{let e=(0,a.position)(f,this.j),t=(0,a.position)(p,this.j);return{left:e.left,top:e.top,width:t.left-e.left+t.width,height:t.top-e.top+t.height}},"cells"),(0,a.$$)("table",this.j.editor).forEach(e=>{this.j.e.off(e,"mousemove.select-cells touchmove.select-cells mouseup.select-cells touchend.select-cells")}),this.j.async.clearTimeout(h))}unselectCells(e){let t=this.__tableModule,i=t.getAllSelectedCells();i.length&&i.forEach(i=>{e&&e===i||t.removeSelection(i)})}onExecCommand(e){if(/^(delete|backspace)(word|sentence)?button$/.test(e)&&this.__tableModule.getAllSelectedCells().length>1){let e=this.__tableModule.getAllSelectedCells();return e.forEach(e=>{r.Dom.detach(e),r.Dom.append(e,this.j.createInside.element("br"))}),this.unselectCells(),this.j.s.setCursorIn(e[0]),this.j.synchronizeValues(),!1}if(/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow)/.test(e)){e=e.replace("table","");let t=this.__tableModule.getAllSelectedCells();if(t.length){let[i]=t;if(!i)return;let o=r.Dom.closest(i,"table",this.j.editor);if(!o)return;switch(e){case"splitv":this.__tableModule.splitVertical(o);break;case"splitg":this.__tableModule.splitHorizontal(o);break;case"merge":this.__tableModule.mergeSelected(o);break;case"empty":t.forEach(e=>{r.Dom.detach(e),r.Dom.append(e,this.j.createInside.element("br"))});break;case"bin":this.__removeTable(o);break;case"binrow":{let e=new Set(t.map(e=>e.parentNode)),n=this.__nearestCell(o,i,(0,a.toArray)(e).map(e=>e.rowIndex),!0);e.forEach(e=>{this.__tableModule.removeRow(o,e.rowIndex)}),n&&this.j.s.setCursorIn(n)}break;case"bincolumn":{let e=new Set,n=[];t.forEach(t=>{let[,i]=this.__tableModule.formalCoordinate(o,t);e.has(i)||(n.push(i),e.add(i))});let r=this.__nearestCell(o,i,n,!1);n.sort((e,t)=>t-e).forEach(e=>{this.__tableModule.removeColumn(o,e)}),r&&this.j.s.setCursorIn(r)}break;case"addcolumnafter":case"addcolumnbefore":this.__tableModule.appendColumn(o,i,"addcolumnafter"===e);break;case"addrowafter":case"addrowbefore":this.__tableModule.appendRow(o,i.parentNode,"addrowafter"===e)}/^bin(row|column)$/.test(e)&&!this.__tableModule.getColumnsCount(o)&&this.__removeTable(o)}return!1}}__nearestCell(e,t,i,o){let n=this.__tableModule.formalMatrix(e),[r,s]=this.__tableModule.formalCoordinate(e,t),a=o?r:s,l=o?n.length:n[r].length,c=e=>!i.includes(e)&&(o?n[e][s]:n[r][e])||null;for(let e=a+1;e<l;e+=1){let t=c(e);if(t)return t}for(let e=a-1;e>=0;e-=1){let t=c(e);if(t)return t}return null}onAfterCommand(e){/^justify/.test(e)&&this.__tableModule.getAllSelectedCells().forEach(t=>(0,a.alignElement)(e,t))}__removeTable(e){let t=e.parentNode,i=r.Dom.findNotEmptySibling(e,!1),o=r.Dom.findNotEmptySibling(e,!0);r.Dom.safeRemove(e),this.j.s.setCursorIn(i||o||t,!!i)}beforeDestruct(e){this.__onRemoveSelection(),e.e.off(".select-cells")}constructor(){super(...arguments),this.__selectedCell=null,this.__isSelectionMode=!1}}p.requires=["select"],d([n.autobind],p.prototype,"onStartSelection",null),d([(0,n.watch)(":outsideClick")],p.prototype,"onOutsideClick",null),d([(0,n.watch)(":change")],p.prototype,"onChange",null),d([n.autobind],p.prototype,"__onRemoveSelection",null),d([n.autobind],p.prototype,"__onStopSelection",null),d([n.autobind],p.prototype,"onExecCommand",null),d([n.autobind],p.prototype,"onAfterCommand",null),s.pluginSystem.add("selectCells",p)},67215:function(e,t,i){"use strict";i(6441).Config.prototype.select={normalizeSelectionBeforeCutAndCopy:!1,normalizeTripleClick:!0}},9881:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(87058),l=i(50911),c=i(67510);i(67215);var d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class u extends l.Plugin{afterInit(e){this.proxyEventsList.forEach(t=>{e.e.on(t+".select",this.onStartSelection)})}beforeDestruct(e){this.proxyEventsList.forEach(t=>{e.e.on(t+".select",this.onStartSelection)})}onStartSelection(e){let{j:t}=this,i,o=e.target;for(;void 0===i&&o&&o!==t.editor;)i=t.e.fire((0,a.camelCase)(e.type+"_"+o.nodeName.toLowerCase()),o,e),o=o.parentElement;"click"===e.type&&void 0===i&&o===t.editor&&t.e.fire(e.type+"Editor",o,e)}onOutsidePress(e){this.__pressTarget=e.target}onOutsideClick(e){let t=e.target,i=this.__pressTarget;this.__pressTarget=null,r.Dom.up(t,e=>e===this.j.editor)||i&&c.UIElement.closestElement(i,c.Popup)||c.UIElement.closestElement(t,c.Popup)||this.j.e.fire("outsideClick",e)}beforeCommandCut(){let{s:e}=this.j;if(!e.isCollapsed()){let t=e.current();t&&r.Dom.isOrContains(this.j.editor,t)&&this.onCopyNormalizeSelectionBound()}}beforeCommandSelectAll(){let{s:e}=this.j;return e.focus(),e.select(this.j.editor,!0),e.expandSelection(),!1}onClickRightOfNestedListItem(e){let{s:t}=this.j,i=t.range;if(!i.collapsed||0!==i.startOffset||!r.Dom.isText(i.startContainer))return;let n=i.startContainer,s=n.parentNode;if(!r.Dom.isTag(s,"li")||!r.Dom.first(s,e=>r.Dom.isTag(e,o.LIST_TAGS)))return;let a=this.j.ed.createRange();a.selectNodeContents(n);let l=a.getBoundingClientRect();e.clientX>l.right&&t.setCursorAfter(n)}onClickKeepPendingFormat(){var e,t;let{s:i}=this.j,n=i.range;if(!n.collapsed||!r.Dom.isText(n.startContainer))return;let s=n.startContainer;if(n.startOffset!==(null!=(t=null==(e=s.nodeValue)?void 0:e.length)?t:0))return;let a=s.nextSibling;if(!r.Dom.isElement(a)||!a.nodeName.match(o.IS_INLINE)||!r.Dom.isEmpty(a))return;let l=a;for(;r.Dom.isElement(l.firstElementChild)&&l.firstElementChild.nodeName.match(o.IS_INLINE);)l=l.firstElementChild;i.setCursorIn(l)}onTripleClickNormalizeSelection(e){if(3!==e.detail||!this.j.o.select.normalizeTripleClick)return;let{s:t}=this.j,{startContainer:i,startOffset:o}=t.range;0===o&&r.Dom.isText(i)&&t.select(r.Dom.closest(i,r.Dom.isBlock,this.j.editor)||i,!0)}onCopyNormalizeSelectionBound(e){let{s:t,editor:i,o}=this.j;!o.select.normalizeSelectionBeforeCutAndCopy||t.isCollapsed()||(!e||e.isTrusted&&r.Dom.isNode(e.target)&&r.Dom.isOrContains(i,e.target))&&this.jodit.s.expandSelection()}constructor(){super(...arguments),this.proxyEventsList=["click","mousedown","touchstart","mouseup","touchend"],this.__pressTarget=null}}d([n.autobind],u.prototype,"onStartSelection",null),d([(0,n.watch)(["ow:mousedown","ow:touchstart"])],u.prototype,"onOutsidePress",null),d([(0,n.watch)("ow:click")],u.prototype,"onOutsideClick",null),d([(0,n.watch)([":beforeCommandCut"])],u.prototype,"beforeCommandCut",null),d([(0,n.watch)([":beforeCommandSelectall"])],u.prototype,"beforeCommandSelectAll",null),d([(0,n.watch)([":click"])],u.prototype,"onClickRightOfNestedListItem",null),d([(0,n.watch)([":click"])],u.prototype,"onClickKeepPendingFormat",null),d([(0,n.watch)([":click"])],u.prototype,"onTripleClickNormalizeSelection",null),d([(0,n.watch)([":copy",":cut"])],u.prototype,"onCopyNormalizeSelectionBound",null),s.pluginSystem.add("select",u)},80792:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.minWidth=200,o.Config.prototype.maxWidth="100%",o.Config.prototype.minHeight=200,o.Config.prototype.maxHeight="auto",o.Config.prototype.saveHeightInStorage=!1},45927:function(e,t,i){"use strict";var o=i(65478),n=i(580),r=i(84767),s=i(41180),a=i(20356);i(80792);var l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class c extends a.Plugin{afterInit(e){e.e.on("setHeight.size",this.__setHeight).on("setWidth.size",this.__setWidth).on("afterInit.size changePlace.size",this.__initialize,{top:!0}).on(e.ow,"load.size",this.__resizeWorkspaces).on("afterInit.size resize.size afterUpdateToolbar.size scroll.size afterResize.size",this.__resizeWorkspaces).on("toggleFullSize.size toggleToolbar.size",this.__resizeWorkspaceImd),this.__immediateInitialize()}__initialize(){this.__immediateInitialize()}__immediateInitialize(){let{j:e}=this;if(e.o.inline)return;let{height:t}=e.o;if(e.o.saveHeightInStorage&&"auto"!==t){let i=e.storage.get("height");i&&(t=i)}(0,s.css)(e.editor,{minHeight:"100%"}),(0,s.css)(e.container,{minHeight:e.o.minHeight,maxHeight:e.o.maxHeight,minWidth:e.o.minWidth,maxWidth:e.o.maxWidth}),e.isFullSize||(this.__setHeight(t),this.__setWidth(e.o.width))}__setHeight(e){let{clientHeight:t,clientWidth:i}=this.j.container;if((0,r.isNumber)(e)){let{minHeight:t,maxHeight:i}=this.j.o;(0,r.isNumber)(t)&&t>e&&(e=t),(0,r.isNumber)(i)&&i<e&&(e=i)}(0,s.css)(this.j.container,"height",e),this.j.o.saveHeightInStorage&&this.j.storage.set("height",e),this.__resizeWorkspaceImd({clientHeight:t,clientWidth:i})}__setWidth(e){let{clientHeight:t,clientWidth:i}=this.j.container;if((0,r.isNumber)(e)){let{minWidth:t,maxWidth:i}=this.j.o;(0,r.isNumber)(t)&&t>e&&(e=t),(0,r.isNumber)(i)&&e>i&&(e=i)}(0,s.css)(this.j.container,"width",e),this.__resizeWorkspaceImd({clientHeight:t,clientWidth:i})}__getNotWorkHeight(){var e;let t=this.j.toolbarContainer;return(t&&this.j.container.contains(t)?t.offsetHeight:0)+((null==(e=this.j.statusbar)?void 0:e.getHeight())||0)+2}__resizeWorkspaceImd({clientHeight:e,clientWidth:t}=this.j.container){if(!this.j||this.j.isDestructed||!this.j.o||this.j.o.inline||!this.j.container||!this.j.container.parentNode)return;let i=((0,s.css)(this.j.container,"minHeight")||0)-this.__getNotWorkHeight();if((0,r.isNumber)(i)&&i>0&&([this.j.workplace,this.j.currentPlace.slots.center,this.j.iframe,this.j.editor].map(e=>{e&&(0,s.css)(e,"minHeight",i)}),this.j.e.fire("setMinHeight",i)),(0,r.isNumber)(this.j.o.maxHeight)){let e=this.j.o.maxHeight-this.__getNotWorkHeight();[this.j.workplace,this.j.currentPlace.slots.center,this.j.iframe,this.j.editor].map(t=>{t&&(0,s.css)(t,"maxHeight",e)}),this.j.e.fire("setMaxHeight",e)}if(this.j.container){let e="auto"!==this.j.o.height||this.j.isFullSize?this.j.container.offsetHeight-this.__getNotWorkHeight():"auto";(0,s.css)(this.j.workplace,"height",e),this.j.container.style.setProperty("--jd-jodit-workplace-height",(0,r.isNumber)(e)?e+"px":e)}let{clientHeight:o,clientWidth:n}=this.j.container;(e!==o||t!==n)&&this.j.e.fire(this.j,"resize")}beforeDestruct(e){e.e.off(e.ow,"load.size",this.__resizeWorkspaces).off(".size")}constructor(){super(...arguments),this.__resizeWorkspaces=this.j.async.debounce(this.__resizeWorkspaceImd,this.j.defaultTimeout,!0)}}l([(0,o.throttle)()],c.prototype,"__initialize",null),l([o.autobind],c.prototype,"__setHeight",null),l([o.autobind],c.prototype,"__setWidth",null),l([o.autobind],c.prototype,"__resizeWorkspaceImd",null),n.pluginSystem.add("size",c)},36204:function(e,t,i){"use strict";var o=i(82758),n=i(12153),r=i(6441),s=i(35599);r.Config.prototype.beautifyHTML=!o.IS_IE,r.Config.prototype.sourceEditor="ace",r.Config.prototype.sourceEditorNativeOptions={showGutter:!0,theme:"ace/theme/idle_fingers",mode:"ace/mode/html",wrap:!0,highlightActiveLine:!0},r.Config.prototype.sourceEditorCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/ace/1.43.3/ace.js"],r.Config.prototype.beautifyHTMLCDNUrlsJS=["https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.4/beautify.min.js","https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.4/beautify-html.min.js"],n.Icon.set("source",s.default),r.Config.prototype.controls.source={mode:o.MODE_SPLIT,exec(e){e.toggleMode()},isActive:e=>e.getRealMode()===o.MODE_SOURCE,tooltip:"Change mode"}},60031:function(e,t,i){"use strict";i.d(t,{AceEditor:function(){return l}});var o=i(82758),n=i(45219),r=i(2748),s=i(21537),a=i(23370);class l extends a.SourceEditor{aceExists(){return void 0!==this.j.ow.ace}getLastColumnIndex(e){return this.instance.session.getLine(e).length}getLastColumnIndices(){let e=this.instance.session.getLength(),t=[],i=0;for(let o=0;e>o;o++)i+=this.getLastColumnIndex(o),o>0&&(i+=1),t[o]=i;return t}getRowColumnIndices(e){let t=this.getLastColumnIndices();if(e<=t[0])return{row:0,column:e};let i=1;for(let o=1;o<t.length;o++)e>t[o]&&(i=o+1);let o=e-t[i-1]-1;return{row:i,column:o}}setSelectionRangeIndices(e,t){let i=this.getRowColumnIndices(e),o=this.getRowColumnIndices(t);this.instance.getSelection().setSelectionRange({start:i,end:o})}getIndexByRowColumn(e,t){return this.getLastColumnIndices()[e]-this.getLastColumnIndex(e)+t}init(e){let t=()=>{if(void 0!==this.instance||!this.aceExists())return;let t=this.j.c.div("jodit-source__mirror-fake");r.Dom.append(this.container,t);let i=e.ow.ace;this.instance=i.edit(t),"rtl"===e.o.direction&&(this.instance.setOption("rtlText",!0),this.instance.setOption("rtl",!0)),this.instance.setOptions(e.o.sourceEditorNativeOptions),this.instance.setTheme(e.o.sourceEditorNativeOptions.theme),this.instance.renderer.setShowGutter(e.o.sourceEditorNativeOptions.showGutter),this.instance.getSession().setMode(e.o.sourceEditorNativeOptions.mode),this.instance.setHighlightActiveLine(e.o.sourceEditorNativeOptions.highlightActiveLine),this.instance.getSession().setUseWrapMode(!0),this.instance.setOption("indentedSoftWrap",!1),this.instance.setOption("wrap",e.o.sourceEditorNativeOptions.wrap),this.instance.getSession().setUseWorker(!1),this.instance.$blockScrolling=1/0,this.instance.on("change",this.__onChange),this.instance.on("focus",this.proxyOnFocus),this.instance.on("mousedown",this.proxyOnMouseDown),this.instance.on("blur",this.proxyOnBlur),e.getRealMode()!==o.MODE_WYSIWYG&&this.setValue(this.getValue());let n=this.j.async.throttle(()=>{if(e.isInDestruct||e.getMode()===o.MODE_WYSIWYG)return;let t=this.instance.isFocused();"auto"!==e.o.height?this.instance.setOption("maxLines",e.workplace.offsetHeight/this.instance.renderer.lineHeight):this.instance.setOption("maxLines",1/0),this.instance.resize(),t&&this.focus()},2*this.j.defaultTimeout);e.e.on(e,"resize",n).on("afterResize afterSetMode",n),n(),this.onReady()},i=!1,n=()=>{if(!e.isInDestruct&&(e.getRealMode()===o.MODE_SOURCE||e.getMode()===o.MODE_SPLIT)){if(!this.aceExists()){i||(i=!0,(0,s.loadNext)(e,e.o.sourceEditorCDNUrlsJS).then(n).catch(()=>null));return}t()}};e.e.on("afterSetMode",n),n()}destruct(){var e,t;this.instance.off("change",this.__onChange),this.instance.off("focus",this.proxyOnFocus),this.instance.off("mousedown",this.proxyOnMouseDown),this.instance.destroy(),null==(t=null==(e=this.j)?void 0:e.events)||t.off("aceInited.source")}setValue(e){if(!this.j.o.editHTMLDocumentMode&&this.j.o.beautifyHTML){let t=this.j.e.fire("beautifyHTML",e);(0,s.isString)(t)&&(e=t)}this.__settingValue=!0;try{this.instance.setValue(e)}finally{this.__settingValue=!1}this.instance.clearSelection()}__onChange(){this.__settingValue||this.toWYSIWYG()}getValue(){return this.instance.getValue()}setReadOnly(e){this.instance.setReadOnly(e)}get isFocused(){return this.instance.isFocused()}focus(){this.instance.container.focus(),this.instance.focus()}blur(){this.instance.blur()}getSelectionStart(){let e=this.instance.selection.getRange();return this.getIndexByRowColumn(e.start.row,e.start.column)}getSelectionEnd(){let e=this.instance.selection.getRange();return this.getIndexByRowColumn(e.end.row,e.end.column)}selectAll(){this.instance.selection.selectAll()}insertRaw(e){let t=this.instance.selection.getCursor(),i=this.instance.session.insert(t,e);this.instance.selection.setRange({start:t,end:i},!1)}setSelectionRange(e,t){this.setSelectionRangeIndices(e,t)}setPlaceHolder(e){}replaceUndoManager(){let{history:e}=this.jodit;this.instance.commands.addCommand({name:"Undo",bindKey:{win:"Ctrl-Z",mac:"Command-Z"},exec(){e.undo()}}),this.instance.commands.addCommand({name:"Redo",bindKey:{win:"Ctrl-Shift-Z",mac:"Command-Shift-Z"},exec(){e.redo()}})}constructor(){super(...arguments),this.className="jodit_ace_editor",this.proxyOnBlur=e=>{this.j.e.fire("blur",e)},this.proxyOnFocus=e=>{this.j.e.fire("focus",e)},this.proxyOnMouseDown=e=>{this.j.e.fire("mousedown",e)},this.__settingValue=!1}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([n.autobind],l.prototype,"__onChange",null)},7483:function(e,t,i){"use strict";i.d(t,{TextAreaEditor:function(){return a}});var o=i(2748),n=i(29960),r=i(41180),s=i(23370);class a extends s.SourceEditor{init(e){this.instance=e.c.element("textarea",{class:"jodit-source__mirror",dir:"rtl"===e.o.direction?"rtl":void 0}),o.Dom.append(this.container,this.instance),e.e.on(this.instance,"mousedown keydown touchstart input",e.async.debounce(this.toWYSIWYG,e.defaultTimeout)).on("setMinHeight.source",e=>{(0,r.css)(this.instance,"minHeight",e)}).on(this.instance,"change keydown mousedown touchstart input",this.autosize).on("afterSetMode.source",this.autosize).on(this.instance,"mousedown focus blur",t=>{e.e.fire(t.type,t)}),this.autosize(),this.onReady()}destruct(){o.Dom.safeRemove(this.instance)}getValue(){return this.instance.value}setValue(e){this.instance.value=e}insertRaw(e){let t=this.getValue();if(this.getSelectionStart()>=0){let i=this.getSelectionStart(),o=this.getSelectionEnd();this.setValue(t.substring(0,i)+e+t.substring(o,t.length))}else this.setValue(t+e)}getSelectionStart(){return this.instance.selectionStart}getSelectionEnd(){return this.instance.selectionEnd}setSelectionRange(e,t=e){this.instance.setSelectionRange(e,t)}get isFocused(){return this.instance===this.j.od.activeElement}focus(){this.instance.focus()}blur(){this.instance.blur()}setPlaceHolder(e){(0,n.attr)(this.instance,"placeholder",e)}setReadOnly(e){(0,n.attr)(this.instance,"readonly",e?"true":null)}selectAll(){this.instance.select()}replaceUndoManager(){let{history:e}=this.jodit;this.j.e.on(this.instance,"keydown",t=>{if((t.ctrlKey||t.metaKey)&&"z"===t.key)return t.shiftKey?e.redo():e.undo(),this.setSelectionRange(this.getValue().length),!1})}constructor(){super(...arguments),this.autosize=this.j.async.debounce(()=>{(0,r.css)(this.instance,"height","auto"),(0,r.css)(this.instance,"height",this.instance.scrollHeight)},this.j.defaultTimeout,!0)}}},52968:function(e,t,i){"use strict";i.d(t,{AceEditor:function(){return o.AceEditor},TextAreaEditor:function(){return n.TextAreaEditor}});var o=i(60031),n=i(7483)},70022:function(e,t,i){"use strict";i.d(t,{createSourceEditor:function(){return r}});var o=i(21537),n=i(52968);function r(e,t,i,r,s){let a;if((0,o.isFunction)(e))a=e(t);else switch(e){case"ace":if(!t.o.shadowRoot){a=new n.AceEditor(t,i,r,s);break}default:a=new n.TextAreaEditor(t,i,r,s)}return a.init(t),a.onReadyAlways(()=>{a.setReadOnly(t.o.readonly)}),a}},23370:function(e,t,i){"use strict";i.d(t,{SourceEditor:function(){return o}});class o{get j(){return this.jodit}onReady(){this.replaceUndoManager(),this.isReady=!0,this.j.e.fire(this,"ready")}onReadyAlways(e){var t;this.isReady?e():null==(t=this.j.events)||t.on(this,"ready",e)}constructor(e,t,i,o){this.jodit=e,this.container=t,this.toWYSIWYG=i,this.fromWYSIWYG=o,this.className="",this.isReady=!1}}},52951:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(50911);i(36204);var c=i(70022),d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class u extends l.Plugin{onInsertHTML(e){var t;if(!this.j.o.readonly&&!this.j.isEditorMode())return null==(t=this.sourceEditor)||t.insertRaw(e),this.toWYSIWYG(),!1}fromWYSIWYG(e=!1){if(!this.__lock||!0===e){this.__lock=!0;let e=this.j.getEditorValue(!1,o.SOURCE_CONSUMER);e!==this.getMirrorValue()&&this.setMirrorValue(e),this.__filledValue=this.getMirrorValue(),this.__lock=!1}}toWYSIWYG(){if(this.__lock)return;let e=this.getMirrorValue();e!==this.__oldMirrorValue&&(this.__lock=!0,this.j.value=e,this.__lock=!1,this.__oldMirrorValue=e)}getNormalPosition(e,t){for(t=t.replace(/<(script|style|iframe)[^>]*>[^]*?<\/\1>/im,e=>{let t="";for(let i=0;i<e.length;i+=1)t+=o.INVISIBLE_SPACE;return t});e>0&&t[e]===o.INVISIBLE_SPACE;)e--;let i=e;for(;i>0;){if("<"===t[--i]&&void 0!==t[i+1]&&t[i+1].match(/[\w/]+/i))return i;if(">"===t[i])break}return e}clnInv(e){return e.replace(o.INVISIBLE_SPACE_REG_EXP(),"")}onSelectAll(e){var t;if("selectall"===e.toLowerCase()&&this.j.getRealMode()===o.MODE_SOURCE)return null==(t=this.sourceEditor)||t.selectAll(),!1}getMirrorValue(){var e;return(null==(e=this.sourceEditor)?void 0:e.getValue())||""}setMirrorValue(e){var t;null==(t=this.sourceEditor)||t.setValue(e)}setFocusToMirror(){var e;let t=this.j.od.activeElement;(!t||t===this.j.od.body||this.j.container.contains(t))&&(null==(e=this.sourceEditor)||e.focus())}saveSelection(){if(this.j.getRealMode()===o.MODE_WYSIWYG)this.j.s.save(),this.j.synchronizeValues(),this.fromWYSIWYG(!0);else{if(this.j.o.editHTMLDocumentMode)return;let e=this.getMirrorValue();if(this.getSelectionStart()===this.getSelectionEnd()){let t=this.j.s.marker(!0),i=this.getNormalPosition(this.getSelectionStart(),this.getMirrorValue());this.setMirrorValue(e.substring(0,i)+this.clnInv(t.outerHTML)+e.substring(i))}else{let t=this.j.s.marker(!0),i=this.j.s.marker(!1),o=this.getNormalPosition(this.getSelectionStart(),e),n=this.getNormalPosition(this.getSelectionEnd(),e);this.setMirrorValue(e.slice(0,o)+this.clnInv(t.outerHTML)+e.slice(o,n)+this.clnInv(i.outerHTML)+e.slice(n))}this.toWYSIWYG()}}removeSelection(){let e,t;if(this.j.getRealMode()===o.MODE_WYSIWYG){this.__lock=!0,this.j.s.restore(),this.__lock=!1;return}let i=this.getMirrorValue();try{if(i=i.replace(/<span[^>]+data-jodit-selection_marker=(["'])start\1[^>]*>[<>]*?<\/span>/gim,this.tempMarkerStart).replace(/<span[^>]+data-jodit-selection_marker=(["'])end\1[^>]*>[<>]*?<\/span>/gim,this.tempMarkerEnd),!this.j.o.editHTMLDocumentMode&&this.j.o.beautifyHTML){let e=this.j.e.fire("beautifyHTML",i);(0,a.isString)(e)&&(i=e)}if(t=e=i.indexOf(this.tempMarkerStart),i=i.replace(this.tempMarkerStartReg,""),-1!==e){let e=i.indexOf(this.tempMarkerEnd);-1!==e&&(t=e)}i=i.replace(this.tempMarkerEndReg,"")}finally{i=i.replace(this.tempMarkerEndReg,"").replace(this.tempMarkerStartReg,"")}this.setMirrorValue(i),this.setMirrorSelectionRange(e,t),this.toWYSIWYG(),this.setFocusToMirror()}setMirrorSelectionRange(e,t){var i;null==(i=this.sourceEditor)||i.setSelectionRange(e,t)}onReadonlyReact(){var e;null==(e=this.sourceEditor)||e.setReadOnly(this.j.o.readonly)}afterInit(e){if(this.mirrorContainer=e.c.div("jodit-source"),r.Dom.append(e.workplace,this.mirrorContainer),e.e.on("afterAddPlace changePlace afterInit",()=>{r.Dom.append(e.workplace,this.mirrorContainer)}),this.sourceEditor=(0,c.createSourceEditor)("area",e,this.mirrorContainer,this.toWYSIWYG,this.fromWYSIWYG),e.e.on(e.ow,"keydown",e=>{var t;e.key===o.KEY_ESC&&(null==(t=this.sourceEditor)?void 0:t.isFocused)&&this.sourceEditor.blur()}),this.onReadonlyReact(),e.e.on("placeholder.source",e=>{var t;null==(t=this.sourceEditor)||t.setPlaceHolder(e)}).on("change.source",this.syncValueFromWYSIWYG).on("beautifyHTML",e=>e),e.o.beautifyHTML){let t=()=>{var t;if(e.isInDestruct)return!1;let i=e.ow.html_beautify;return!!i&&!e.isInDestruct&&(null==(t=e.events)||t.off("beautifyHTML").on("beautifyHTML",e=>i(e)),!0)};if(!t()){let i=!1,n=()=>{i||e.getMode()!==o.MODE_SOURCE&&e.getMode()!==o.MODE_SPLIT||(i=!0,(0,a.loadNext)(e,e.o.beautifyHTMLCDNUrlsJS).then(()=>{t()&&this.beautifyUntouched()},()=>null))};e.e.on("afterSetMode.source",n),n()}}this.syncValueFromWYSIWYG(!0),this.initSourceEditor(e)}syncValueFromWYSIWYG(e=!1){let t=this.j;(t.getMode()===o.MODE_SPLIT||t.getMode()===o.MODE_SOURCE)&&this.fromWYSIWYG(e)}initSourceEditor(e){var t;if("area"!==e.o.sourceEditor){let t=(0,c.createSourceEditor)(e.o.sourceEditor,e,this.mirrorContainer,this.toWYSIWYG,this.fromWYSIWYG);t.onReadyAlways(()=>{var i;this.takeOver(t),null==(i=e.events)||i.fire("sourceEditorReady",e)})}else null==(t=this.sourceEditor)||t.onReadyAlways(()=>{var t;this.syncValueFromWYSIWYG(!0),null==(t=e.events)||t.fire("sourceEditorReady",e)})}takeOver(e){let t=this.sourceEditor;if(!t||t===e){this.sourceEditor=e,this.syncValueFromWYSIWYG(!0);return}let i=t.getValue(),o=t.getSelectionStart(),n=t.getSelectionEnd(),r=t.isFocused,s=i===this.__filledValue;t.destruct(),this.sourceEditor=e,s?this.syncValueFromWYSIWYG(!0):(e.setValue(i),this.toWYSIWYG()),o>=0&&e.setSelectionRange(o,n),r&&e.focus()}beautifyUntouched(){var e,t;let i=this.getMirrorValue();if(this.j.o.editHTMLDocumentMode||!i||i!==this.__filledValue)return;let o=this.j.e.fire("beautifyHTML",i);if((0,a.isString)(o)&&o!==i){let i=null==(e=this.sourceEditor)?void 0:e.isFocused;this.setMirrorValue(o),this.__filledValue=this.getMirrorValue(),i&&(null==(t=this.sourceEditor)||t.focus())}}beforeDestruct(){this.sourceEditor&&(this.sourceEditor.destruct(),delete this.sourceEditor),r.Dom.safeRemove(this.mirrorContainer)}constructor(){super(...arguments),this.buttons=[{name:"source",group:"source"}],this.__lock=!1,this.__oldMirrorValue="",this.__filledValue="",this.tempMarkerStart="{start-jodit-selection}",this.tempMarkerStartReg=/{start-jodit-selection}/g,this.tempMarkerEnd="{end-jodit-selection}",this.tempMarkerEndReg=/{end-jodit-selection}/g,this.getSelectionStart=()=>{var e,t;return null!=(t=null==(e=this.sourceEditor)?void 0:e.getSelectionStart())?t:0},this.getSelectionEnd=()=>{var e,t;return null!=(t=null==(e=this.sourceEditor)?void 0:e.getSelectionEnd())?t:0}}}d([(0,n.watch)(":insertHTML.source")],u.prototype,"onInsertHTML",null),d([n.autobind],u.prototype,"fromWYSIWYG",null),d([n.autobind],u.prototype,"toWYSIWYG",null),d([n.autobind],u.prototype,"getNormalPosition",null),d([(0,n.watch)(":beforeCommand.source")],u.prototype,"onSelectAll",null),d([(0,n.watch)(":beforeSetMode.source")],u.prototype,"saveSelection",null),d([(0,n.watch)(":afterSetMode.source")],u.prototype,"removeSelection",null),d([n.autobind],u.prototype,"setMirrorSelectionRange",null),d([(0,n.watch)(":readonly.source")],u.prototype,"onReadonlyReact",null),d([n.autobind],u.prototype,"syncValueFromWYSIWYG",null),s.pluginSystem.add("source",u)},35599:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m6.5 6-5 6 5 6m11-12 5 6-5 6M14 3l-4 18"/> </g> </svg> '},46614:function(e,t,i){"use strict";var o=i(87612),n=i(70799),r=i(29960),s=i(86583),a=i(12153),l=i(6441),c=i(26532),d=i(93602),u=i(75259);l.Config.prototype.speechRecognize={api:void 0!==c.SpeechRecognition?c.SpeechRecognition:null,sound:!0,continuous:!1,interimResults:!0,commands:{"newline|enter":"enter","delete|remove word|delete word":"backspaceWordButton",comma:"inserthtml::,",underline:"inserthtml::_",hyphen:"inserthtml::-",space:"inserthtml:: ",question:"inserthtml::?",dot:"inserthtml::.","quote|quotes|open quote":"inserthtml::'","header|header h1":"formatblock::h1","select all":"selectall"}},a.Icon.set("speech-recognize",u.default),l.Config.prototype.controls.speechRecognize={isVisible:e=>!!e.o.speechRecognize.api,isActive(e,t){let i=(0,s.dataBind)(e,"speech");return!!(null==i?void 0:i.isEnabled)},isDisabled:e=>!e.o.speechRecognize.api,exec(e,t,{button:i,control:a}){var l;let{api:c,lang:u,continuous:h,interimResults:p,sound:f}=e.o.speechRecognize;if(!c)return void e.alert("Speech recognize API unsupported in your browser");let m=(0,s.dataBind)(e,"speech");if(!m){let t=new c;(m=new d.RecognizeManager(e.async,t)).lang=(0,n.isString)(u)?u:null!=(l=(0,r.attr)(e.od.documentElement,"lang"))?l:void 0,m.continuous=h,m.interimResults=p,m.sound=f,(0,s.dataBind)(e,"speech",m),m.on("pulse",e=>{i.setMod("pulse",e)}),m.on("result",t=>e.e.fire("speechRecognizeResult",t)),m.on("progress",t=>e.e.fire("speechRecognizeProgressResult",t)),m.on("error",t=>e.message.error(t)),e.hookStatus("beforeDestruct",()=>{(0,s.dataBind)(e,"speech",null),m.destruct()})}if(a.args){let e=a.args[0];if((0,o.isBoolean)(m[e])){m[e]=!m[e],m.isEnabled&&m.restart();return}}m.toggle(),m.isEnabled&&i.setMod("pulse",!0),i.state.activated=m.isEnabled},name:"speechRecognize",command:"toggleSpeechRecognize",tooltip:"Speech Recognize",list:{sound:"Sound",interimResults:"Interim Results"},childTemplate(e,t,i){var o;let n=(0,s.dataBind)(e,"speech"),r=null!=(o=null==n?void 0:n[t])?o:e.o.speechRecognize[t];return`<span class='jodit-speech-recognize__list-item'><input ${r?"checked":""} class='jodit-checkbox' type='checkbox'> ${i}</span>`},mods:{stroke:!1}}},26532:function(e,t,i){"use strict";var o=i(82758);let n=o.globalWindow?o.globalWindow.SpeechRecognition||o.globalWindow.webkitSpeechRecognition:void 0;i.d(t,["SpeechRecognition",0,n])},54076:function(e,t,i){"use strict";function o(e,t){let[i,o]=t.split("::");"open"===i.toLowerCase()&&o&&/^(javascript:|data:|vbscript:)/i.test(o.trim())||e.execCommand(i,null,o)}i.d(t,{execSpellCommand:function(){return o}})},93602:function(e,t,i){"use strict";i.d(t,{RecognizeManager:function(){return a}});var o=i(65478),n=i(72757),r=i(37643),s=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class a extends n.Eventify{set lang(e){this._lang=e,this._api.lang=e}get lang(){return this._lang}set continuous(e){this._continuous=e,this._api.continuous=e}get continuous(){return this._continuous}set interimResults(e){this._interimResults=e,this._api.interimResults=e}get interimResults(){return this._interimResults}destruct(){this.stop(),(0,r.closeSound)(this),a._instances.delete(this),super.destruct()}get isEnabled(){return this._isEnabled}start(){if(!this._isEnabled){this._isEnabled=!0,a._instances.forEach(e=>{e!==this&&e.stop()});try{this._api.start()}catch(e){this._onError(e),this.stop();return}this.__on("speechstart",this._onSpeechStart).__on("error",this._onError).__on("result",this._onProgress).__on("end",this._onResults)}}stop(){this._isEnabled&&(this._api.abort(),this._api.stop(),this.__off("speechstart",this._onSpeechStart).__off("error",this._onError).__off("result",this._onProgress).__off("end",this._onResults),this.async.clearTimeout(this._restartTimeout),this._isEnabled=!1,this.emit("pulse",!1))}toggle(){this._isEnabled?this.stop():this.start()}restart(){this.stop(),this.start()}__on(e,t){return this._api.addEventListener(e,t),this}__off(e,t){return this._api.removeEventListener(e,t),this}_onResults(e){this.emit("pulse",!1),this.emit("result",this.__interimResults),this.__interimResults="",this._makeSound(440),this.restart()}_onProgress(e){if(this._isEnabled&&(this.__interimResults="",e.results)){for(let t=0;t<e.results.length;t++){let i=e.results.item(t);if(i.length){let{transcript:e}=i.item(0);this.__interimResults+=e}}this.__interimResults&&this.emit("progress",this.__interimResults)}}_onError(e){"voice-unavailable"===e.error&&this.emit("error","Voice unavailable"),"not-allowed"===e.error&&this.emit("error","Not allowed"),("language-unavailable"===e.error||"language-not-supported"===e.error)&&this.emit("error","Language unavailable"),this._makeSound(940),this.emit("pulse",!1),this.stop()}_makeSound(e){this.sound&&(0,r.sound)(this,{frequency:e})}constructor(e,t){super(),this.async=e,this._continuous=!1,this._interimResults=!1,this.sound=!0,this._isEnabled=!1,this._restartTimeout=0,this._onSpeechStart=e=>{this._isEnabled&&(this.async.clearTimeout(this._restartTimeout),this._restartTimeout=this.async.setTimeout(()=>{this.restart(),this.emit("pulse",!1),this._makeSound(940)},5e3),this.emit("pulse",!0))},this.__interimResults="",this._api=t,a._instances.add(this)}}a._instances=new Set,s([o.autobind],a.prototype,"_onResults",null),s([o.autobind],a.prototype,"_onProgress",null),s([o.autobind],a.prototype,"_onError",null)},37643:function(e,t,i){"use strict";i.d(t,{closeSound:function(){return s},sound:function(){return r}});var o=i(82758);let n=new WeakMap;function r(e,{sec:t=.1,frequency:i=440,gain:s=.1,type:a="sine"}={}){let l=function(e){if(!o.globalWindow)return null;let t=n.get(e);if(t&&"closed"!==t.state)return t;let i=o.globalWindow.AudioContext||o.globalWindow.webkitAudioContext;if(!i)return null;let r=new i;return n.set(e,r),r}(e);if(!l)return;let c=l.createGain(),d=l.createOscillator();d.type=a,d.frequency.value=i,c.gain.value=s,d.connect(c),c.connect(l.destination),d.start(),d.stop(l.currentTime+t)}function s(e){let t=n.get(e);t&&(n.delete(e),"closed"!==t.state&&t.close())}},71705:function(e){"use strict";e.exports={newline:"الخط الجديد",delete:"حذف",space:"الفضاء","Speech Recognize":"التعرف على الكلام",Sound:"الصوت","Interim Results":"النتائج المؤقتة"}},89930:function(e){"use strict";e.exports={newline:"řádek",delete:"odstranit",space:"prostora","Speech Recognize":"Rozpoznání Řeči",Sound:"Zvuk","Interim Results":"Průběžné Výsledky"}},34945:function(e){"use strict";e.exports={newline:"Zeilenumbruch",delete:"löschen",space:"Raum","Speech Recognize":"Sprache Erkennen",Sound:"Sound","Interim Results":"Zwischenergebnis"}},63134:function(e){"use strict";e.exports={newline:"nueva línea",delete:"eliminar",space:"espacio","Speech Recognize":"Reconocimiento de Voz",Sound:"Sonido","Interim Results":"Resultados Provisionales"}},66835:function(e){"use strict";e.exports={newline:"خط جدید",delete:"حذف",space:"فضا","Speech Recognize":"گفتار را تشخیص دهید",Sound:"صدا","Interim Results":"نتایج موقت"}},1115:function(e){"use strict";e.exports={"Speech Recognize":"Puheentunnistus",newline:"uusi rivi",delete:"poistaa",space:"tilaa",Sound:"Ääni","Interim Results":"Välitulokset"}},59302:function(e){"use strict";e.exports={newline:"nouvelle ligne",delete:"supprimer",space:"espace","Speech Recognize":"Reconnaissance Vocale",Sound:"Son","Interim Results":"Résultats Intermédiaires"}},94141:function(e){"use strict";e.exports={newline:"חדשות",delete:"מחק",space:"שטח","Speech Recognize":"דיבור מזהה",Sound:"קול","Interim Results":"תוצאות ביניים"}},24877:function(e){"use strict";e.exports={newline:"újsor",delete:"törlés",space:"tér","Speech Recognize":"A Beszéd Felismeri",Sound:"Hang","Interim Results":"Időközi Eredmények"}},80651:function(e){"use strict";e.exports={newline:"newline",delete:"Hapus",space:"ruang","Speech Recognize":"Pidato Mengenali",Sound:"Suara","Interim Results":"Hasil Sementara"}},90492:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o||(o=i.t(E,2))},cs_cz:function(){return n||(n=i.t(T,2))},de:function(){return r||(r=i.t(j,2))},es:function(){return s||(s=i.t(D,2))},fa:function(){return a||(a=i.t(A,2))},fi:function(){return l||(l=i.t(P,2))},fr:function(){return c||(c=i.t(M,2))},he:function(){return d||(d=i.t(L,2))},hu:function(){return u||(u=i.t(R,2))},id:function(){return h||(h=i.t(z,2))},it:function(){return p||(p=i.t(B,2))},ja:function(){return f||(f=i.t(N,2))},ko:function(){return m||(m=i.t(F,2))},mn:function(){return g||(g=i.t(O,2))},nl:function(){return b||(b=i.t(H,2))},no:function(){return v||(v=i.t(U,2))},pl:function(){return y||(y=i.t(V,2))},pt_br:function(){return w||(w=i.t(W,2))},ru:function(){return _||(_=i.t($,2))},sk:function(){return k||(k=i.t(K,2))},tr:function(){return C||(C=i.t(G,2))},ua:function(){return S||(S=i.t(Y,2))},zh_cn:function(){return x||(x=i.t(q,2))},zh_tw:function(){return I||(I=i.t(J,2))}});var o,n,r,s,a,l,c,d,u,h,p,f,m,g,b,v,y,w,_,k,C,S,x,I,E=i(71705),T=i(89930),j=i(34945),D=i(63134),A=i(66835),P=i(1115),M=i(59302),L=i(94141),R=i(24877),z=i(80651),B=i(62395),N=i(16407),F=i(37272),O=i(22113),H=i(22432),U=i(17081),V=i(30798),W=i(8661),$=i(19147),K=i(76220),G=i(93620),Y=i(40372),q=i(69874),J=i(88774)},62395:function(e){"use strict";e.exports={newline:"nuova riga",delete:"eliminare",space:"spazio","Speech Recognize":"Discorso Riconoscere",Sound:"Suono","Interim Results":"Risultati intermedi"}},16407:function(e){"use strict";e.exports={newline:"改行",delete:"削除",space:"スペース","Speech Recognize":"音声認識",Sound:"音","Interim Results":"中間結果"}},37272:function(e){"use strict";e.exports={newline:"줄 바꿈",delete:"삭제",space:"공간","Speech Recognize":"음성 인식",Sound:"소리","Interim Results":"중간 결과"}},22113:function(e){"use strict";e.exports={newline:"Шинэ мөр",delete:"Устгах",space:"Зай","Speech Recognize":"Дуу хоолой таних",Sound:"Дуу","Interim Results":"Түр зуурын үр дүн"}},22432:function(e){"use strict";e.exports={newline:"regel",delete:"verwijderen",space:"ruimte","Speech Recognize":"Spraak Herkennen",Sound:"Geluid","Interim Results":"Tussentijdse Resultaten"}},17081:function(e){"use strict";e.exports={newline:"nylinje",delete:"slette",space:"rom","Speech Recognize":"Talegjenkjenning",Sound:"Lyd","Interim Results":"Midlertidige resultater"}},30798:function(e){"use strict";e.exports={newline:"newline",delete:"usunąć",space:"przestrzeń","Speech Recognize":"Rozpoznawanie Mowy",Sound:"Dźwięk","Interim Results":"Wyniki Okresowe"}},8661:function(e){"use strict";e.exports={newline:"linha",delete:"excluir",space:"espaco","Speech Recognize":"Discurso Reconhecer",Sound:"Som","Interim Results":"Resultados Provisórios"}},19147:function(e){"use strict";e.exports={newline:"новая строка|перенос|энтер",delete:"удалить",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Промежуточные результаты"}},76220:function(e){"use strict";e.exports={newline:"nový riadok",delete:"vymazať",space:"medzera","Speech Recognize":"Rozpoznávanie reči",Sound:"Zvuk","Interim Results":"Predbežné výsledky"}},93620:function(e){"use strict";e.exports={newline:"yeni satır",delete:"silmek",space:"uzay","Speech Recognize":"Konuşma Tanıma",Sound:"Ses","Interim Results":"Ara Sonuçlar"}},40372:function(e){"use strict";e.exports={newline:"новая строка|перенос|ентер",delete:"видалити",space:"пробел","Speech Recognize":"Распознавание речи",Sound:"Звук","Interim Results":"Проміжні результати"}},69874:function(e){"use strict";e.exports={newline:"新行",delete:"删除",space:"空间","Speech Recognize":"言语识别",Sound:"声音","Interim Results":"中期业绩"}},88774:function(e){"use strict";e.exports={newline:"換行",delete:"刪除",space:"空白","Speech Recognize":"語音辨識",Sound:"聲音","Interim Results":"階段性辨識結果"}},3115:function(e,t,i){"use strict";var o=i(37133),n=i(2748),r=i(580),s=i(37790),a=i(50911);i(46614);var l=i(2303),c=i(54076),d=i(90492),u=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class h extends a.Plugin{afterInit(e){let{commands:t}=e.o.speechRecognize;t&&((0,r.extendLang)(d),(0,s.keys)(t,!1).forEach(i=>{i.split("|").forEach(o=>{o=o.trim().toLowerCase(),this._commandToWord[o]=t[i];let n=e.i18n(o);n!==o&&n.split("|").forEach(e=>{this._commandToWord[e.trim().toLowerCase()]=t[i].trim()})})}))}beforeDestruct(e){n.Dom.safeRemove(this.messagePopup)}onSpeechRecognizeProgressResult(e){this.messagePopup||(this.messagePopup=this.j.create.div("jodit-speech-recognize__popup")),n.Dom.append(this.j.workplace,this.messagePopup),this.j.async.clearTimeout(this.__hidePopupTimeout),this.__hidePopupTimeout=this.j.async.setTimeout(()=>{n.Dom.safeRemove(this.messagePopup)},1e3),this.messagePopup.innerText=e+"|"}onSpeechRecognizeResult(e){this.j.async.clearTimeout(this.__hidePopupTimeout),n.Dom.safeRemove(this.messagePopup);let{j:t}=this,{s:i}=t;if(!this._checkCommand(e)){let{range:o}=i,r=i.current();if(i.isCollapsed()&&n.Dom.isText(r)&&n.Dom.isOrContains(t.editor,r)&&r.nodeValue){let n=r.nodeValue;r.nodeValue=n+(/[\u00A0 ]\uFEFF*$/.test(n)?"":" ")+e,o.setStartAfter(r),i.selectRange(o),t.synchronizeValues()}else i.insertHTML(e)}}_checkCommand(e){return e=e.toLowerCase().replace(/\./g,""),!!this._commandToWord[e]&&((0,c.execSpellCommand)(this.j,this._commandToWord[e]),!0)}constructor(){super(...arguments),this.buttons=[{group:"state",name:"speechRecognize"}],this._commandToWord={}}}u([(0,o.watch)(":speechRecognizeProgressResult")],h.prototype,"onSpeechRecognizeProgressResult",null),u([(0,o.watch)(":speechRecognizeResult")],h.prototype,"onSpeechRecognizeResult",null),l.Jodit.plugins.add("speech-recognize",h)},75259:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="9" y="2" width="6" height="13" rx="3"/><path d="M5 10v2a7 7 0 0 0 14 0v-2M12 19v3m-4 0h8"/> </g> </svg> '},99085:function(e,t,i){"use strict";var o=i(12153),n=i(6441),r=i(10937);n.Config.prototype.spellcheck=!1,o.Icon.set("spellcheck",r.default),n.Config.prototype.controls.spellcheck={isActive:e=>e.o.spellcheck,icon:r.default,name:"spellcheck",command:"toggleSpellcheck",tooltip:"Spellcheck"}},28906:function(e){"use strict";e.exports={Spellcheck:"التدقيق الإملائي"}},24351:function(e){"use strict";e.exports={Spellcheck:"Kontrola pravopisu"}},32806:function(e){"use strict";e.exports={Spellcheck:"Rechtschreibprüfung"}},77725:function(e){"use strict";e.exports={Spellcheck:"Corrección ortográfica"}},26428:function(e){"use strict";e.exports={Spellcheck:"غلطیابی املایی"}},42820:function(e){"use strict";e.exports={Spellcheck:"Oikeinkirjoituksen tarkistus"}},60373:function(e){"use strict";e.exports={Spellcheck:"Vérification Orthographique"}},98370:function(e){"use strict";e.exports={Spellcheck:"בדיקת איות"}},44850:function(e){"use strict";e.exports={Spellcheck:"Helyesírás-ellenőrzés"}},3636:function(e){"use strict";e.exports={Spellcheck:"Spellchecking"}},26529:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o||(o=i.t(E,2))},cs_cz:function(){return n||(n=i.t(T,2))},de:function(){return r||(r=i.t(j,2))},es:function(){return s||(s=i.t(D,2))},fa:function(){return a||(a=i.t(A,2))},fi:function(){return l||(l=i.t(P,2))},fr:function(){return c||(c=i.t(M,2))},he:function(){return d||(d=i.t(L,2))},hu:function(){return u||(u=i.t(R,2))},id:function(){return h||(h=i.t(z,2))},it:function(){return p||(p=i.t(B,2))},ja:function(){return f||(f=i.t(N,2))},ko:function(){return m||(m=i.t(F,2))},mn:function(){return g||(g=i.t(O,2))},nl:function(){return b||(b=i.t(H,2))},no:function(){return v||(v=i.t(U,2))},pl:function(){return y||(y=i.t(V,2))},pt_br:function(){return w||(w=i.t(W,2))},ru:function(){return _||(_=i.t($,2))},sk:function(){return k||(k=i.t(K,2))},tr:function(){return C||(C=i.t(G,2))},ua:function(){return S||(S=i.t(Y,2))},zh_cn:function(){return x||(x=i.t(q,2))},zh_tw:function(){return I||(I=i.t(J,2))}});var o,n,r,s,a,l,c,d,u,h,p,f,m,g,b,v,y,w,_,k,C,S,x,I,E=i(28906),T=i(24351),j=i(32806),D=i(77725),A=i(26428),P=i(42820),M=i(60373),L=i(98370),R=i(44850),z=i(3636),B=i(73220),N=i(55776),F=i(13995),O=i(6402),H=i(1879),U=i(1322),V=i(53361),W=i(70824),$=i(65140),K=i(60407),G=i(42247),Y=i(68891),q=i(63195),J=i(42107)},73220:function(e){"use strict";e.exports={Spellcheck:"Controllo ortografico"}},55776:function(e){"use strict";e.exports={Spellcheck:"スペルチェック"}},13995:function(e){"use strict";e.exports={Spellcheck:"맞춤법 검사"}},6402:function(e){"use strict";e.exports={Spellcheck:"Дүрмийн алдаа шалгах"}},1879:function(e){"use strict";e.exports={Spellcheck:"Spellingcontrole"}},1322:function(e){"use strict";e.exports={Spellcheck:"Stavekontroll"}},53361:function(e){"use strict";e.exports={Spellcheck:"Sprawdzanie pisowni"}},70824:function(e){"use strict";e.exports={Spellcheck:"Verificação ortográfica"}},65140:function(e){"use strict";e.exports={Spellcheck:"Проверка орфографии"}},60407:function(e){"use strict";e.exports={Spellcheck:"Kontrola pravopisu"}},42247:function(e){"use strict";e.exports={Spellcheck:"Yazım denetimi"}},68891:function(e){"use strict";e.exports={Spellcheck:"Перевірка орфографії"}},63195:function(e){"use strict";e.exports={Spellcheck:"拼写检查"}},42107:function(e){"use strict";e.exports={Spellcheck:"拼字檢查"}},43809:function(e,t,i){"use strict";var o=i(65478),n=i(580),r=i(29960),s=i(50911);i(99085);var a=i(26529);class l extends s.Plugin{afterInit(e){e.e.on("afterInit afterAddPlace prepareWYSIWYGEditor",this.toggleSpellcheck),this.toggleSpellcheck(),e.registerCommand("toggleSpellcheck",()=>{this.jodit.o.spellcheck=!this.jodit.o.spellcheck,this.toggleSpellcheck(),this.j.e.fire("updateToolbar")})}toggleSpellcheck(){(0,r.attr)(this.jodit.editor,"spellcheck",this.jodit.o.spellcheck)}beforeDestruct(e){}constructor(e){super(e),this.buttons=[{group:"state",name:"spellcheck"}],(0,n.extendLang)(a)}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([o.autobind],l.prototype,"toggleSpellcheck",null),n.pluginSystem.add("spellcheck",l)},10937:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m3 14 5-11 5 11M5 10h6m0 8 3 3 7-8"/> </g> </svg> '},99649:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.showCharsCounter=!0,o.Config.prototype.countHTMLChars=!1,o.Config.prototype.countTextSpaces=!1,o.Config.prototype.showWordsCounter=!0},7309:function(e,t,i){"use strict";var o=i(82758),n=i(2748),r=i(580),s=i(20356);i(99649);class a extends s.Plugin{afterInit(){this.charCounter=this.j.c.span(),this.wordCounter=this.j.c.span(),this.j.e.on("afterInit changePlace afterAddPlace",this.reInit),this.reInit()}beforeDestruct(){n.Dom.safeRemove(this.charCounter),n.Dom.safeRemove(this.wordCounter),this.j.e.off("afterInit changePlace afterAddPlace",this.reInit),this.charCounter=null,this.wordCounter=null}constructor(){super(...arguments),this.charCounter=null,this.wordCounter=null,this.reInit=()=>{this.j.o.showCharsCounter&&this.charCounter&&this.j.statusbar.append(this.charCounter,!0),this.j.o.showWordsCounter&&this.wordCounter&&this.j.statusbar.append(this.wordCounter,!0),this.j.e.off("change keyup",this.calc).on("change keyup",this.calc),this.calc()},this.calc=this.j.async.throttle(()=>{let e=this.j.text;if(this.j.o.showCharsCounter&&this.charCounter){let t;t=this.j.o.countHTMLChars?this.j.value:this.j.o.countTextSpaces?e.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),"").replace(/[\r\n]/g,""):e.replace((0,o.SPACE_REG_EXP)(),""),this.charCounter.textContent=this.j.i18n("Chars: %d",t.length)}this.j.o.showWordsCounter&&this.wordCounter&&(this.wordCounter.textContent=this.j.i18n("Words: %d",e.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),"").split((0,o.SPACE_REG_EXP)()).filter(e=>e.length).length))},this.j.defaultTimeout)}}r.pluginSystem.add("stat",a)},48038:function(e,t,i){"use strict";var o=i(6441);o.Config.prototype.toolbarSticky=!0,o.Config.prototype.toolbarDisableStickyForMobile=!0,o.Config.prototype.toolbarStickyOffset=0},68687:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(2748),s=i(580),a=i(21537),l=i(20356);i(48038);let c=!o.IS_ES_NEXT&&o.IS_IE;class d extends l.Plugin{afterInit(e){e.e.on(e.ow,"scroll.sticky wheel.sticky mousewheel.sticky resize.sticky",this.__onScroll).on("getStickyState.sticky",()=>this.__isToolbarStuck)}__onScroll(){let{jodit:e}=this;if(!e.o.toolbarSticky||!e.o.toolbar)return;let t=e.ow.pageYOffset||e.od.documentElement&&e.od.documentElement.scrollTop||0,i=(0,a.offset)(e.container,e,e.od,!0),n=e.getMode()===o.MODE_WYSIWYG&&t+e.o.toolbarStickyOffset>i.top&&t+e.o.toolbarStickyOffset<i.top+i.height&&!(e.o.toolbarDisableStickyForMobile&&this.__isMobile());if(this.__isToolbarStuck===n)return;let r=e.toolbarContainer;r&&(n?this.addSticky(r):this.removeSticky(r)),e.e.fire("toggleSticky",n)}__isMobile(){let{j:e}=this;return e&&e.options&&e.container&&e.options.sizeSM>=e.container.offsetWidth}beforeDestruct(e){r.Dom.safeRemove(this.__dummyBox),e.e.off(e.ow,"scroll.sticky wheel.sticky mousewheel.sticky resize.sticky",this.__onScroll).off(".sticky")}constructor(){super(...arguments),this.__isToolbarStuck=!1,this.__createDummy=e=>{this.__dummyBox=this.j.c.div(),this.__dummyBox.classList.add("jodit_sticky-dummy_toolbar"),r.Dom.before(e,this.__dummyBox)},this.addSticky=e=>{this.__isToolbarStuck||(c&&!this.__dummyBox&&this.__createDummy(e),this.j.container.classList.add("jodit_sticky"),this.__isToolbarStuck=!0),(0,a.css)(e,{top:this.j.o.toolbarStickyOffset||null,width:this.j.container.offsetWidth-2}),this.__dummyBox&&(0,a.css)(this.__dummyBox,{height:e.offsetHeight})},this.removeSticky=e=>{this.__isToolbarStuck&&((0,a.css)(e,{width:"",top:""}),this.j.container.classList.remove("jodit_sticky"),this.__isToolbarStuck=!1)}}}!function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([(0,n.throttle)()],d.prototype,"__onScroll",null),s.pluginSystem.add("sticky",d)},87394:function(e,t,i){"use strict";var o=i(2748),n=i(12153),r=i(6441),s=i(5119);r.Config.prototype.usePopupForSpecialCharacters=!1,r.Config.prototype.specialCharacters=["!",""","#","$","%","&","'","(",")","*","+","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","€","‘","’","“","”","–","—","¡","¢","£","¤","¥","¦","§","¨","©","ª","«","»","¬","®","¯","°","²","³","´","µ","¶","·","¸","¹","º","¼","½","¾","¿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ","Œ","œ","Ŵ","Ŷ","ŵ","ŷ","‚","‛","„","…","™","►","•","→","⇒","⇔","♦","≈"],n.Icon.set("symbols",s.default),r.Config.prototype.controls.symbols={hotkeys:["ctrl+shift+i","cmd+shift+i"],tooltip:"Insert Special Character",popup(e,t,i){let n=e.e.fire("generateSpecialCharactersTable.symbols");if(n){if(e.o.usePopupForSpecialCharacters){let t=e.c.div();return t.classList.add("jodit-symbols"),o.Dom.append(t,n),e.e.on(n,"close_dialog",i),t}e.alert(n,"Select Special Character",void 0,"jodit-symbols").bindDestruct(e);let t=o.Dom.first(n,e=>o.Dom.isTag(e,"a"));t&&t.focus()}}}},20741:function(e){"use strict";e.exports={symbols:"رمز"}},3958:function(e){"use strict";e.exports={symbols:"symbol"}},53437:function(e){"use strict";e.exports={symbols:"Symbol"}},56882:function(e){"use strict";e.exports={symbols:"Símbolo"}},75703:function(e){"use strict";e.exports={symbols:"سمبل"}},49759:function(e){"use strict";e.exports={symbols:"Symbolit"}},44730:function(e){"use strict";e.exports={symbols:"caractère"}},70945:function(e){"use strict";e.exports={symbols:"תו מיוחד"}},49841:function(e){"use strict";e.exports={symbols:"Szimbólum"}},33295:function(e){"use strict";e.exports={symbols:"simbol"}},32824:function(e,t,i){"use strict";i.r(t),i.d(t,{ar:function(){return o||(o=i.t(x,2))},cs_cz:function(){return n||(n=i.t(I,2))},de:function(){return r||(r=i.t(E,2))},es:function(){return s||(s=i.t(T,2))},fa:function(){return a||(a=i.t(j,2))},fi:function(){return l||(l=i.t(D,2))},fr:function(){return c||(c=i.t(A,2))},he:function(){return d||(d=i.t(P,2))},hu:function(){return u||(u=i.t(M,2))},id:function(){return h||(h=i.t(L,2))},it:function(){return p||(p=i.t(R,2))},ja:function(){return f||(f=i.t(z,2))},ko:function(){return m||(m=i.t(B,2))},mn:function(){return g||(g=i.t(N,2))},nl:function(){return b||(b=i.t(F,2))},pl:function(){return v||(v=i.t(O,2))},pt_br:function(){return y||(y=i.t(H,2))},ru:function(){return w||(w=i.t(U,2))},tr:function(){return _||(_=i.t(V,2))},ua:function(){return k||(k=i.t(W,2))},zh_cn:function(){return C||(C=i.t($,2))},zh_tw:function(){return S||(S=i.t(K,2))}});var o,n,r,s,a,l,c,d,u,h,p,f,m,g,b,v,y,w,_,k,C,S,x=i(20741),I=i(3958),E=i(53437),T=i(56882),j=i(75703),D=i(49759),A=i(44730),P=i(70945),M=i(49841),L=i(33295),R=i(47615),z=i(83059),B=i(22396),N=i(58285),F=i(51804),O=i(53650),H=i(41369),U=i(57855),V=i(44328),W=i(91080),$=i(89702),K=i(66434)},47615:function(e){"use strict";e.exports={symbols:"Simbolo"}},83059:function(e){"use strict";e.exports={symbols:"symbol"}},22396:function(e){"use strict";e.exports={symbols:"기호"}},58285:function(e){"use strict";e.exports={symbols:"тэмдэгт"}},51804:function(e){"use strict";e.exports={symbols:"symbool"}},53650:function(e){"use strict";e.exports={symbols:"symbol"}},41369:function(e){"use strict";e.exports={symbols:"Símbolo"}},57855:function(e){"use strict";e.exports={symbols:"символ"}},44328:function(e){"use strict";e.exports={symbols:"Sembol"}},91080:function(e){"use strict";e.exports={symbols:"символ"}},89702:function(e){"use strict";e.exports={symbols:"符号"}},66434:function(e){"use strict";e.exports={symbols:"符號"}},59495:function(e,t,i){"use strict";var o=i(82758),n=i(2748),r=i(580),s=i(43555),a=i(20356);i(87394);var l=i(32824);class c extends a.Plugin{afterInit(e){e.e.on("generateSpecialCharactersTable.symbols",()=>{let t=e.c.fromHTML(`<div class="jodit-symbols__container">
|
|
268
268
|
<div class="jodit-symbols__container_table">
|
|
269
269
|
<table class="jodit-symbols__table"><tbody></tbody></table>
|
|
270
270
|
</div>
|
|
@@ -276,10 +276,10 @@
|
|
|
276
276
|
data-index-j="${o}"
|
|
277
277
|
role="option"
|
|
278
278
|
tabindex="-1"
|
|
279
|
-
>${e.o.specialCharacters[t]}</a>`);a.push(s),n.Dom.append(r,s),n.Dom.append(i,r)}n.Dom.append(r,i)}let l=this;return e.e.on(a,"focus",function(){i.innerHTML=this.innerHTML}).on(a,"mousedown",function(t){n.Dom.isTag(this,"a")&&(e.s.focus(),e.s.insertHTML(this.innerHTML),(null==t?void 0:t.shiftKey)||e.e.fire(this,"close_dialog"),t&&t.preventDefault(),t&&t.stopImmediatePropagation())}).on(a,"mouseenter",function(){n.Dom.isTag(this,"a")&&this.focus()}).on(a,"keydown",t=>{let i=t.target;if(n.Dom.isTag(i,"a")){let n,r=parseInt((0,s.attr)(i,"-index")||"0",10),c=parseInt((0,s.attr)(i,"data-index-j")||"0",10);switch(t.key){case o.KEY_UP:case o.KEY_DOWN:void 0===a[n=t.key===o.KEY_UP?r-l.__countInRow:r+l.__countInRow]&&(n=t.key===o.KEY_UP?Math.floor(a.length/l.__countInRow)*l.__countInRow+c:c)>a.length-1&&(n-=l.__countInRow),a[n]&&a[n].focus();break;case o.KEY_RIGHT:case o.KEY_LEFT:void 0===a[n=t.key===o.KEY_LEFT?r-1:r+1]&&(n=t.key===o.KEY_LEFT?a.length-1:0),a[n]&&a[n].focus();break;case o.KEY_ENTER:e.e.fire(i,"mousedown"),t.stopImmediatePropagation(),t.preventDefault()}}}),t})}beforeDestruct(e){e.e.off("generateSpecialCharactersTable.symbols")}constructor(e){super(e),this.buttons=[{name:"symbols",group:"insert"}],this.__countInRow=17,(0,r.extendLang)(l)}}r.pluginSystem.add("symbols",c)},5119:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 17v3h7v-3a7 7 0 1 1 4 0v3h7v-3"/> </g> </svg> '},47686:function(e,t,i){"use strict";i.d(t,{onTabInsideLi:function(){return o.onTabInsideLi}});var o=i(26658)},26658:function(e,t,i){"use strict";i.d(t,{onTabInsideLi:function(){return r}});var o=i(2748),n=i(38837);function r(e,t=!1){let i,s,a,l;if(!e.o.tab.tabInsideLiInsertNewList)return!1;let[c,d]=(i=e.createInside.fake(),s=e.createInside.fake(),(a=e.s.range.cloneRange()).collapse(!0),a.insertNode(i),(l=e.s.range.cloneRange()).collapse(!1),l.insertNode(s),[i,s]);try{let i,r,s,a,l,d=!!(i=o.Dom.closest(c,"li",e.editor))&&(!!t||!!o.Dom.isLeaf(i.previousElementSibling))&&(!t||!!o.Dom.closest(i,"li",e.editor))&&i;if(!d||!(r=o.Dom.closest(c,"li",e.editor))||r!==d&&!d.contains(r))return!1;let u=o.Dom.closest(d,["ol","ul"],e.editor);if(!u||t&&!o.Dom.closest(u,"li",e.editor))return!1;return t?function(e,t,i){let r=o.Dom.closest(t,"li",e.editor);(0,n.assert)(r,"tab parent li is null");let s=Array.from(t.children).filter(e=>o.Dom.isLeaf(e));o.Dom.after(r,i);let a=s.indexOf(i);if((0===a||1===s.length)&&o.Dom.safeRemove(t),a!==s.length-1){let e=t.cloneNode();o.Dom.append(i,e);for(let t=a+1;t<s.length;t+=1)o.Dom.append(e,s[t])}}(e,u,d):(s=d.previousElementSibling,(0,n.assert)(s,"tab previousElementSibling is null"),a=s.lastElementChild,l=o.Dom.isTag(a,u.tagName)?a:e.createInside.element(u.tagName,Array.from(u.attributes).reduce((e,t)=>(e[t.name]=t.value,e),{})),o.Dom.append(l,d),a!==l&&o.Dom.append(s,l)),!0}finally{let t=e.s.createRange();t.setStartAfter(c),t.setEndBefore(d),e.s.selectRange(t),o.Dom.safeRemove(c),o.Dom.safeRemove(d)}}},66288:function(e,t,i){"use strict";i(6441).Config.prototype.tab={tabInsideLiInsertNewList:!0}},767:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(580),s=i(50911);i(66288);var a=i(47686),l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class c extends s.Plugin{afterInit(e){}__onTab(e){if(e.key===o.KEY_TAB&&this.__onShift(e.shiftKey))return!1}__onCommand(e){if(("indent"===e||"outdent"===e)&&this.__onShift("outdent"===e))return!1}__onShift(e){let t=(0,a.onTabInsideLi)(this.j,e);return t&&this.j.e.fire("afterTab",e),t}beforeDestruct(e){}}l([(0,n.watch)(":keydown.tab")],c.prototype,"__onTab",null),l([(0,n.watch)(":beforeCommand.tab")],c.prototype,"__onCommand",null),r.pluginSystem.add("tab",c)},72439:function(e,t,i){"use strict";var o=i(82758),n=i(2748),r=i(580),s=i(21537),a=i(76014);let l=new Set([o.KEY_TAB,o.KEY_LEFT,o.KEY_RIGHT,o.KEY_UP,o.KEY_DOWN]);r.pluginSystem.add("tableKeyboardNavigation",function(e){e.e.off(".tableKeyboardNavigation").on("keydown.tableKeyboardNavigation",t=>{let{key:i}=t,r=function(e,t){if(!l.has(t))return;let i=e.s.current();if(!i)return;let r=n.Dom.up(i,n.Dom.isCell,e.editor);if(!r)return;let{range:a}=e.s;if(t!==o.KEY_TAB&&i!==r){let e=t===o.KEY_RIGHT||t===o.KEY_DOWN,l=(0,s.call)(e?n.Dom.next:n.Dom.prev,i,e=>t===o.KEY_UP||t===o.KEY_DOWN?n.Dom.isTag(e,"br"):!!e,r);if(!e&&(l||t!==o.KEY_UP&&n.Dom.isText(i)&&0!==a.startOffset)||e&&(l||t!==o.KEY_DOWN&&n.Dom.isText(i)&&i.nodeValue&&a.startOffset!==i.nodeValue.length))return}return r}(e,i);if(!r)return;let c=e.getInstance(a.Table,e.o),d=n.Dom.closest(r,"table",e.editor),u=null,h=i===o.KEY_LEFT||t.shiftKey,p=()=>(0,s.call)(h?n.Dom.prev:n.Dom.next,r,n.Dom.isCell,d);switch(i){case o.KEY_TAB:case o.KEY_LEFT:(u=p())||(c.appendRow(d,!!h&&n.Dom.first(d,e=>n.Dom.isTag(e,"tr")),!h),u=p());break;case o.KEY_UP:case o.KEY_DOWN:{let e=c.formalMatrix(d),[t,n]=c.formalCoordinate(d,r);i===o.KEY_UP?void 0!==e[t-1]&&(u=e[t-1][n]):void 0!==e[t+1]&&(u=e[t+1][n])}}if(u){if(e.e.fire("hidePopup hideResizer"),u.firstChild)i
|
|
280
|
-
`)),n.Dom.append(
|
|
281
|
-
`)),n.Dom.append(
|
|
282
|
-
`);if(e.o.table.splitBlockOnInsertTable){let i=e.s.range;i.collapse(!1),i.insertNode(t),i.collapse(!1),e.s.selectRange(i);let o=e.s.splitSelection(v,t);o?n.Dom.after(o,p):n.Dom.after(v,p)}else n.Dom.after(v,t),n.Dom.after(t,p)}else e.s.insertNode(p,!1);f&&(e.s.setCursorIn(f),(0,r.scrollIntoViewIfNeeded)(f,e.editor,e.ed)),i()};if(e.e.on(g,"mousemove",e=>{n.Dom.isTag(e.target,"span")&&w(e.target)}).on(g,"touchstart mousedown",e=>{n.Dom.isTag(e.target,"span")&&(e.preventDefault(),e.stopImmediatePropagation(),_(e.target))}).on(g,"keydown",e=>{let t;if(!n.Dom.isTag(e.target,"span"))return;if(e.key===o.KEY_ENTER){e.preventDefault(),e.stopImmediatePropagation(),_(e.target);return}if(e.key===o.KEY_ESC){e.preventDefault(),e.stopImmediatePropagation(),i();return}let r=parseInt((0,s.attr)(e.target,"-index")||"0",10),a=Math.floor(r/h),l=r%h;switch(e.key){case o.KEY_LEFT:t=l>0?r-1:r;break;case o.KEY_RIGHT:t=l<h-1?r+1:r;break;case o.KEY_UP:t=a>0?r-h:r;break;case o.KEY_DOWN:t=a<u-1?r+h:r;break;default:return}e.preventDefault(),e.stopImmediatePropagation(),t!==r&&(v[r].tabIndex=-1,v[t].tabIndex=0,v[t].focus(),w(v[t]))}),a&&a.parentElement){for(let t=0;t<u;t+=1){let i=e.c.div();(0,s.attr)(i,"role","row");for(let e=0;e<h;e+=1)n.Dom.append(i,v[t*h+e]);n.Dom.append(g,i)}v[0]&&(v[0].className="hovered")}return p},tooltip:"Insert table"}},43003:function(e,t,i){"use strict";var o=i(580);i(40329),o.pluginSystem.add("table",function(e){e.registerButton({name:"table",group:"insert"})})},6091:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2.5"/><path d="M3 9h18M3 15h18M9 3v18M15 3v18"/> </g> </svg> '},94529:function(e,t,i){"use strict";var o=i(82758),n=i(45219),r=i(37133),s=i(2748),a=i(580),l=i(29960),c=i(50911),d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let u=new Set(["input","textarea","select"]);class h extends c.Plugin{afterInit(e){e.registerCommand("focusToolbar",{hotkeys:"alt+f10",exec:this.focusToolbar})}beforeDestruct(){}focusToolbar(){let[e]=this.__buttons();return null==e||e.focus(),!1}onKeyDown(e){if(e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey)return;let t=e.target;if(s.Dom.isTag(t,u)||s.Dom.isHTMLElement(t)&&t.isContentEditable)return;let i=this.__buttons();if(i.length){switch(e.key){case o.KEY_ESC:this.j.s.focus();break;case o.KEY_HOME:i[0].focus();break;case o.KEY_END:i[i.length-1].focus();break;case o.KEY_LEFT:case o.KEY_RIGHT:{let n=i.findIndex(e=>e.container.contains(t));if(-1===n)return;i[(n+(e.key===o.KEY_RIGHT!==this.__isRtl()?1:-1)+i.length)%i.length].focus();break}default:return}return e.preventDefault(),e.stopPropagation(),!1}}__buttons(){return this.j.toolbar.buttons.filter(e=>!e.state.disabled&&e.container.isConnected)}__isRtl(){return"rtl"===(0,l.attr)(this.j.toolbar.container,"dir")}}d([n.autobind],h.prototype,"focusToolbar",null),d([(0,r.watch)("j.toolbar.container:keydown.toolbar-navigation")],h.prototype,"onKeyDown",null),a.pluginSystem.add("toolbarNavigation",h)},14984:function(e,t,i){"use strict";var o=i(21537),n=i(62843),r=i(2525),s=i(12153),a=i(6441),l=i(92762),c=i(37775);function d(e,t){let i=(0,o.wrapMedia)(e,t),{mediaDefaultAlign:n}=e.o;return n&&"normal"!==n&&(0,o.hAlignElement)(i,n,(0,o.getAlignClasses)(e,i)),i}function u(e){var t;null==(t=e.files)||t.forEach(t=>{this.s.insertNode(d(this,this.createInside.element("video",{controls:"",src:e.baseurl+t})))})}a.Config.prototype.video={parseUrlToVideoEmbed:o.convertMediaUrlToVideoEmbed,defaultWidth:400,defaultHeight:345,defaultHandlerSuccess:u},s.Icon.set("video",c.default),a.Config.prototype.controls.video={popup(e,t,i){let s=new r.UIForm(e,[new r.UIBlock(e,[new r.UIInput(e,{name:"url",required:!0,label:"URL",placeholder:"https://",validators:["url"]})]),new r.UIBlock(e,[(0,n.Button)(e,"","Insert","primary").onAction(()=>s.submit())])]),a=new r.UIForm(e,[new r.UIBlock(e,[new r.UITextArea(e,{name:"code",required:!0,label:"Embed code"})]),new r.UIBlock(e,[(0,n.Button)(e,"","Insert","primary").onAction(()=>a.submit())])]),c=[],h=t=>{let o,n;e.s.restore(),e.s.insertHTML(((o=e.createInside.div()).innerHTML=t.trim(),(n=o.firstElementChild)&&1===o.childNodes.length?d(e,n):t)),i()};e.s.save();let{uploader:p}=e.o;return!1!==p.showTabInFileSelector&&(p.url||p.customUploadFunction)&&c.push((0,l.UploadTab)(e,t=>{var i,o;e.s.restore(),(null!=(o=null==(i=e.o.video)?void 0:i.defaultHandlerSuccess)?o:u).call(e,t)},{label:"Drop file",accept:"video/*"})),c.push({icon:"link",name:"Link",content:s.container},{icon:"source",name:"Code",content:a.container}),s.onSubmit(t=>{var i,n,r,s;h((0,o.call)(null!=(n=null==(i=e.o.video)?void 0:i.parseUrlToVideoEmbed)?n:o.convertMediaUrlToVideoEmbed,t.url,{width:null==(r=e.o.video)?void 0:r.defaultWidth,height:null==(s=e.o.video)?void 0:s.defaultHeight}))}),a.onSubmit(e=>{h(e.code)}),(0,l.TabsWidget)(e,c)},tags:["iframe"],tooltip:"Insert youtube/vimeo video"}},26551:function(e,t,i){"use strict";var o=i(580);i(14984),o.pluginSystem.add("video",function(e){e.registerButton({name:"video",group:"media"})})},37775:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2" y="5" width="13" height="14" rx="2"/><path d="m15 10 7-4v12l-7-4"/> </g> </svg> '},96967:function(e,t,i){"use strict";i(6441).Config.prototype.wrapNodes={exclude:new Set(["hr","style","br"]),emptyBlockAfterInit:!0}},72253:function(e,t,i){"use strict";var o=i(65478),n=i(22732),r=i(580),s=i(70799),a=i(50911);i(96967);var l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class c extends a.Plugin{afterInit(e){"br"!==e.o.enter.toLowerCase()&&e.e.on("drop.wtn focus.wtn keydown.wtn mousedown.wtn afterInit.wtn backSpaceAfterDelete.wtn",this.preprocessInput,{top:!0}).on("afterInit.wtn postProcessSetEditorValue.wtn afterCommitStyle.wtn backSpaceAfterDelete.wtn",this.postProcessSetEditorValue)}beforeDestruct(e){e.e.off(".wtn")}postProcessSetEditorValue(){let{jodit:e}=this;if(!e.isEditorMode())return;let t=e.editor.firstChild,i=!1;for(;t;){if(t=function(e,t){let i=e,o=e;do if(n.Dom.isElement(o)&&n.Dom.isLeaf(o)&&!n.Dom.isList(o.parentElement)){let e=n.Dom.findNotEmptySibling(o,!1);n.Dom.isTag(i,"ul")?n.Dom.append(i,o):i=n.Dom.wrap(o,"ul",t.createInside),o=e}else break;while(o)return i}(t,e),this.isSuitableStart(t)){i||e.s.save(),i=!0;let o=e.createInside.element(e.o.enter);for(n.Dom.before(t,o);t&&this.isSuitable(t);){let e=t.nextSibling;n.Dom.append(o,t),t=e}o.normalize(),t=o}t=t&&t.nextSibling}i&&(e.s.restore(),"afterInit"===e.e.current&&e.e.fire("internalChange"))}preprocessInput(){let{jodit:e}=this,t="afterInit"===e.e.current;if(!e.isEditorMode()||e.editor.firstChild||!e.o.wrapNodes.emptyBlockAfterInit&&t)return;let i=e.createInside.element(e.o.enter),o=e.createInside.element("br");n.Dom.append(i,o),n.Dom.append(e.editor,i),(e.s.isFocused()||"backSpaceAfterDelete"===e.e.current)&&e.s.setCursorBefore(o),e.e.fire("internalChange")}constructor(){super(...arguments),this.isSuitableStart=e=>{var t;return n.Dom.isText(e)&&(0,s.isString)(e.nodeValue)&&(/[^\s]/.test(e.nodeValue)||(null==(t=e.parentNode)?void 0:t.firstChild)===e&&this.isSuitable(e.nextSibling))||this.isNotWrapped(e)&&!n.Dom.isTemporary(e)},this.isSuitable=e=>n.Dom.isText(e)||this.isNotWrapped(e),this.isNotWrapped=e=>n.Dom.isElement(e)&&!(n.Dom.isBlock(e)||n.Dom.isTag(e,this.j.o.wrapNodes.exclude))}}l([o.autobind],c.prototype,"postProcessSetEditorValue",null),l([o.autobind],c.prototype,"preprocessInput",null),r.pluginSystem.add("wrapNodes",c)},86012:function(e,t,i){"use strict";i(6441).Config.prototype.showXPathInStatusbar=!0},83671:function(e,t,i){"use strict";var o=i(82758),n=i(22732),r=i(580),s=i(49055),a=i(29960),l=i(76078),c=i(50911),d=i(80870),u=i(21491);i(86012);class h extends c.Plugin{afterInit(){if(this.j.o.showXPathInStatusbar){this.container=this.j.c.div("jodit-xpath"),(0,a.attr)(this.container,"role","list");let e=()=>{this.j.o.showXPathInStatusbar&&this.container&&(this.j.statusbar.append(this.container),this.j.getRealMode()===o.MODE_WYSIWYG?this.calcPath():(this.container&&(this.container.innerHTML=o.INVISIBLE_SPACE),this.appendSelectAll()))};this.j.e.off(".xpath").on("pointerup.xpath change.xpath keydown.xpath changeSelection.xpath",this.calcPath).on("afterSetMode.xpath afterInit.xpath changePlace.xpath",e),e(),this.calcPath()}}beforeDestruct(){this.j&&this.j.events&&this.j.e.off(".xpath"),this.removeSelectAll(),this.menu&&this.menu.destruct(),n.Dom.safeRemove(this.container),delete this.menu,delete this.container}constructor(){super(...arguments),this.onContext=(e,t)=>(this.menu||(this.menu=new d.ContextMenu(this.j)),this.menu.show(t.clientX,t.clientY,[{icon:"bin",title:e===this.j.editor?"Clear":"Remove",exec:()=>{e!==this.j.editor?n.Dom.safeRemove(e):this.j.value="",this.j.synchronizeValues()}},{icon:"select-all",title:"Select",exec:()=>{this.j.s.select(e)}}]),!1),this.onSelectPath=(e,t)=>{this.j.s.focus();let i=(0,a.attr)(t.target,"-path")||"/";if("/"===i)return this.j.execCommand("selectall"),!1;try{let e=this.j.ed.evaluate(i,this.j.editor,null,XPathResult.ANY_TYPE,null).iterateNext();if(e)return this.j.s.select(e),!1}catch(e){}return this.j.s.select(e),!1},this.tpl=(e,t,i,o)=>{let n=this.j.c.fromHTML(`<span class="jodit-xpath__item"><a role="button" data-path="${t}" title="${o}" tabindex="-1"'>${(0,s.trim)(i)}</a></span>`),r=n.firstChild;return this.j.e.on(r,"click",this.onSelectPath.bind(this,e)).on(r,"contextmenu",this.onContext.bind(this,e)),n},this.removeSelectAll=()=>{this.selectAllButton&&(this.selectAllButton.destruct(),delete this.selectAllButton)},this.appendSelectAll=()=>{this.removeSelectAll(),this.selectAllButton=(0,u.makeButton)(this.j,{name:"selectall",...this.j.o.controls.selectall}),this.selectAllButton.state.size="tiny",this.container&&n.Dom.prepend(this.container,this.selectAllButton.container)},this.calcPathImd=()=>{if(this.isDestructed)return;let e=this.j.s.current();if(this.container&&(this.container.innerHTML=o.INVISIBLE_SPACE),e){let t,i,o;n.Dom.up(e,e=>{e&&this.j.editor!==e&&!n.Dom.isText(e)&&!n.Dom.isComment(e)&&(t=e.nodeName.toLowerCase(),i=(0,l.getXPathByElement)(e,this.j.editor).replace(/^\//,""),o=this.tpl(e,i,t,this.j.i18n("Select %s",t)),this.container&&n.Dom.prepend(this.container,o))},this.j.editor)}this.appendSelectAll()},this.calcPath=this.j.async.debounce(this.calcPathImd,2*this.j.defaultTimeout,!0)}}r.pluginSystem.add("xpath",h)},78173:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m6 10 6 6 6-6"/> </g> </svg> '},16260:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m14 6-6 6 6 6"/> </g> </svg> '},37663:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m10 6 6 6-6 6"/> </g> </svg> '},51036:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m6 14 6-6 6 6"/> </g> </svg> '},31554:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 6h18M9 6V4h6v2M5 6l1 14h12l1-14M10 10v6m4-6v6"/> </g> </svg> '},18309:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m6 6 12 12M18 6 6 18"/> </g> </svg> '},99762:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M5.3333 5.3333h13.3334M2.6667 12h18.6666M5.3333 18.6667h13.3334" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg> '},7903:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M20 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h9m-7 8 4 4L21 5"/> </g> </svg> '},58032:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 8 8 8 8-8"/> </g> </svg> '},52507:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <circle cx="12" cy="5" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="12" cy="19" r="1"/> </g> </svg> '},1647:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 3v13m-5-5 5 5 5-5M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"/> </g> </svg> '},98535:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 12 10-9 7 7-10 10H7l-4-4a3 3 0 0 1 1-4Zm3-3 8 7m-4 4h10"/> </g> </svg> '},43478:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z"/><circle cx="12" cy="12" r="3"/> </g> </svg> '},60097:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6Zm0 0v6h6"/> </g> </svg> '},49155:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 7V6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z"/> </g> </svg> '},17555:function(e,t,i){"use strict";i.r(t),i.d(t,{angle_down:function(){return o.default},angle_left:function(){return n.default},angle_right:function(){return r.default},angle_up:function(){return s.default},bin:function(){return a.default},cancel:function(){return l.default},center:function(){return c.default},check:function(){return d.default},chevron:function(){return u.default},dots:function(){return h.default},download:function(){return p.default},eraser:function(){return f.default},eye:function(){return m.default},file:function(){return g.default},folder:function(){return b.default},info_circle:function(){return v.default},left:function(){return y.default},lock:function(){return w.default},ok:function(){return _.default},pencil:function(){return k.default},plus:function(){return C.default},resize_handler:function(){return S.default},right:function(){return x.default},save:function(){return I.default},settings:function(){return E.default},unlock:function(){return T.default},update:function(){return j.default},upload:function(){return D.default},valign:function(){return A.default}});var o=i(78173),n=i(16260),r=i(37663),s=i(51036),a=i(31554),l=i(18309),c=i(99762),d=i(7903),u=i(58032),h=i(52507),p=i(1647),f=i(98535),m=i(43478),g=i(60097),b=i(49155),v=i(17176),y=i(57882),w=i(58908),_=i(24829),k=i(4038),C=i(45575),S=i(84858),x=i(445),I=i(36886),E=i(10766),T=i(33651),j=i(20362),D=i(12202),A=i(80152)},17176:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <circle cx="12" cy="12" r="9"/><path d="M12 11v6M12 7h.01"/> </g> </svg> '},57882:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2.6667 5.3333h18.6666M2.6667 12H16M2.6667 18.6667h18.6666" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg> '},58908:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="4" y="10" width="16" height="11" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3M12 14v3"/> </g> </svg> '},24829:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 12 5 5L20 6"/> </g> </svg> '},4038:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 15 11-11a2.8 2.8 0 0 1 4 4L8 19l-5 2 1-6Zm9-9 4 4"/> </g> </svg> '},45575:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 5v14M5 12h14"/> </g> </svg> '},84858:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m7 20 13-13m-6 13 6-6"/> </g> </svg> '},445:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2.6667 5.3333h18.6666M8 12h13.3333M2.6667 18.6667h18.6666" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg> '},36886:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M5 3h12l4 4v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2ZM7 3v6h9V3M7 21v-7h10v7"/> </g> </svg> '},10766:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m10 2-.5 2.5-2 1.2L5 5l-2 3.5 2 1.7v2.6l-2 1.7L5 18l2.5-.7 2 1.2L10 21h4l.5-2.5 2-1.2 2.5.7 2-3.5-2-1.7v-2.6l2-1.7L19 5l-2.5.7-2-1.2L14 2Z"/><circle cx="12" cy="11.5" r="3"/> </g> </svg> '},33651:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="4" y="10" width="16" height="11" rx="2"/><path d="M8 10V7a4 4 0 0 1 7.5-2M12 14v3"/> </g> </svg> '},20362:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M20 9a8.5 8.5 0 1 0 .5 7M20 3v6h-6"/> </g> </svg> '},12202:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 16V3m-5 5 5-5 5 5M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"/> </g> </svg> '},80152:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 3v18M7 8l5-5 5 5M7 16l5 5 5-5"/> </g> </svg> '},62357:function(e,t,i){"use strict";i.d(t,{UIRange:function(){return l}});var o=i(82749),n=i(31635),r=i(65478),s=i(21537),a=i(67510);class l extends a.UIInput{className(){return"UIRange"}appendUIRange(){let e=this.j.create.div(this.getFullElName("slider"));this.container.appendChild(e);let t=this.j.create.div(this.getFullElName("handle"));e.appendChild(t);let i=this.j.create.div(this.getFullElName("log")),o=this.getElm("label");o&&o.appendChild(i)}onDragStart(e){this.startValue=parseFloat(this.value)||0,this.startX=e.clientX;let t=this.getElm("slider");(0,s.assert)(null!=t,"slider element does not exists"),this.width=t.offsetWidth,this.j.e.on(this.j.ow,"mousemove",this.onDrag)}onDrag(e){let{min:t,max:i,step:o=1}=this.state,n=(e.clientX-this.startX)/this.width*(this.state.max-this.state.min),r=this.startValue+n;r<t&&(r=t),r>i&&(r=i),r=Math.round(r/o)*o,this.value=r.toFixed(10)}onDragEnd(){this.j.e.off(this.j.ow,"mousemove",this.onDrag)}onChangeSelfValue(){let e=this.getElm("handle"),t=parseFloat(this.value)||0;(0,s.assert)(null!=e,"Handle element does not exist"),(0,s.css)(e,{left:(t-this.state.min)/(this.state.max-this.state.min)*100+"%"});let i=this.getElm("log");(0,s.assert)(null!=i,"log element does not exist"),i.innerText=t.toString()}destruct(){return this.onDragEnd(),super.destruct()}constructor(e,t){super(e,{...t,type:"hidden"}),(0,o._)(this,"state",{...a.UIInput.defaultState,min:0,max:100,step:1}),(0,o._)(this,"startValue",0),(0,o._)(this,"startX",0),(0,o._)(this,"width",100),Object.assign(this.state,t),this.appendUIRange(),this.onChangeSelfValue()}}(0,n.__decorate)([(0,r.watch)(["handle:mousedown","handle:touchstart"])],l.prototype,"onDragStart",null),(0,n.__decorate)([r.autobind],l.prototype,"onDrag",null),(0,n.__decorate)([(0,r.watch)(["j.ow:mouseup","j.ow:touchend"])],l.prototype,"onDragEnd",null),(0,n.__decorate)([(0,r.watch)(":change")],l.prototype,"onChangeSelfValue",null),l=(0,n.__decorate)([r.component],l)},31356:function(e,t,i){"use strict";i.d(t,{ListReconciler:function(){return o}});class o{static reconcile(e,t,i){let{getId:o,isEqual:n=(e,t)=>o(e)===o(t),preserveOrder:r=!0}=i,s=new Map,a=new Map;e.forEach((e,t)=>{let i=o(e);s.set(i,e),a.set(i,t)});let l=new Map,c=new Map;t.forEach((e,t)=>{let i=o(e);l.set(i,e),c.set(i,t)});let d=[],u=[],h=[],p=[];return t.forEach((e,t)=>{let i=o(e),l=s.get(i);l?!n(l,e)||r&&a.get(i)!==t?u.push({oldItem:l,newItem:e,index:r?t:a.get(i)}):p.push(l):d.push(e)}),e.forEach(e=>{let t=o(e);l.has(t)||h.push(e)}),{toCreate:d,toUpdate:u,toRemove:h,unchanged:p}}static applyResult(e,t,i={}){t.toRemove.forEach(t=>{let o=e.indexOf(t);-1!==o&&(i.onRemove?.(t,o),e.splice(o,1))}),t.toUpdate.forEach(({oldItem:t,newItem:o,index:n})=>{let r=e.indexOf(t);-1!==r&&(i.onUpdate?.(t,o,n),e[r]=o)}),t.toCreate.forEach(t=>{i.onCreate?.(t,e.length),e.push(t)})}}},2692:function(e,t,i){"use strict";i.d(t,{JoditPro:function(){return a}});var o=i(82758),n=i(63799),r=i(41180),s=i(86019);class a extends s.Jodit{static make(e,t){return new this(e,t)}beforeInitHook(){if(o.IS_PROD&&!o.IS_TEST&&this.o.loadExternalConfig)return(0,n.appendScriptAsync)(this,this.basePath+"config.js")}afterInitHook(){(async()=>{if(await this.e.fire("checkReserve",location.host)!=="normal"){if(this.isInDestruct)return;let e=this.c.div("",'Trial version. Buy <a href="https://xdsoft.net/jodit/pro/">Jodit Pro</a>');o.IS_TEST||o.IS_PROD,(0,r.css)(e,{position:"absolute",color:"red",right:10,bottom:10}),this.addDisclaimer(e)}})().catch(()=>null),super.afterInitHook()}getVersion(){return"PRO "+o.APP_VERSION}}},41810:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(66645);var r=i(86449),s=i(21020),a=i(46166),l=i(62895),c=i(55487),d=i(27769),u=i(58579),h=i(63805),p=i(82758),f=i(65478),m=i(580),g=i(21537),b=i(50911),v=i(2692),y=i(18549),w=i(54747);class _ extends b.Plugin{get state(){return this.stateManager.state}get toolRegistry(){return new c.ToolRegistry(this.j)}get permissionManager(){return new s.PermissionManager(this.j,this.toolRegistry)}get apiClient(){return new r.APIClient(this.j,this.toolRegistry)}get storage(){let{storage:e,storageKey:t,maxConversations:i}=this.j.o.aiAssistantPro;if("string"==typeof e){let o=(0,l.createStorageProvider)(e,t);return new l.WebStorageConversationStorage(o,i)}return e}get stateManager(){return new a.StateManager(this.j)}get mainPanel(){return new d.UIMainPanel(this.j,this.stateManager.state,this.j.o.aiAssistantPro,e=>{let t=this.stateManager.getCurrentConversation();t&&this.stateManager.setCurrentConversation({...t,...e})})}get dialog(){let e=this.j.dlg({resizable:this.j.o.aiAssistantPro.resizable,eventEmmiter:this.j.e});return e.e.on(e,"afterClose",()=>{this.j.e.fire("closeAIAssistantPro.ai-assistant-pro")}),e}setupTextAutocomplete(){let{textAutocompleteEnabled:e,textAutocompleteApiRequest:t,textAutocompleteMinQueryLength:i,textAutocompleteMaxSuggestions:o,textAutocompleteDebounceMs:n,textAutocompleteCacheTTL:r,textAutocompleteCacheMaxSize:s}=this.j.o.aiAssistantPro;if(!e||!t)return;this.j.o.autocomplete={...this.j.o.autocomplete,displayMode:"inline"};let a=this.textAutocompleteCache,l=null;this.textAutocompleteSource=e=>{if(e.length<i)return[];let c=`${e}:${o}`;if(r>0){let e=a.get(c);if(e&&Date.now()-e.ts<r)return e.data.map(e=>({value:e,title:e}))}l&&clearTimeout(l);let d=new AbortController;return new Promise(i=>{l=setTimeout(async()=>{try{let n=await t(e,o,d.signal);if(Array.isArray(n)){let e=n.slice(0,o);if(r>0){if(a.size>=s){let e=a.keys().next().value;null!=e&&a.delete(e)}a.set(c,{ts:Date.now(),data:e})}i(e.map(e=>({value:e,title:e})));return}i([])}catch{i([])}},n)})},this.j.e.fire("registerAutocompleteSource",this.textAutocompleteSource)}afterInit(){(0,m.extendLang)(h),this.setupEventListeners(),this.setupTextAutocomplete(),this.j.async.promise(e=>{let{initiallyOpened:t,persistOpenState:i}=this.j.o.aiAssistantPro,o=t;i?this.storage.getGlobalSettings().then(e=>{if(e?.isOpen!=null&&(o=e.isOpen),o)return this.openAssistant()}).catch(()=>null).finally(()=>e(void 0)):e(void 0)}).catch(()=>null)}__loadData(){return this.__initedPromise?this.__initedPromise:this.isDestructed?Promise.reject():(this.__initedPromise=this.j.async.promise(e=>{this.loadInitialData().then(e)}).catch(()=>null),this.__initedPromise)}async loadInitialData(){this.mainPanel.setMod("ready",!0),await (0,u.loadInitialData)(this.j,this.storage,this.stateManager),await this.restorePendingToolCalls()}async restorePendingToolCalls(){let e=this.stateManager.getCurrentConversation();if(!e)return;let t=(0,u.findMessagesWithPendingToolCalls)(e);if(0!==t.length)for(let e of t)await this.handleToolCalls(e.id)}setupEventListeners(){this.j.e.on("selectConversation.ai-assistant-pro",async e=>{try{await this.__loadData(),await (0,u.handleConversationSelect)(e,this.storage,this.stateManager)}catch(e){p.IS_PROD}}),this.j.e.on("newConversation.ai-assistant-pro",async()=>{await this.__loadData();let e=(0,u.createNewConversation)(this.j,this.state.defaultModel,this.state.defaultTemperature);this.stateManager.setCurrentConversation(e)}),this.j.e.on("deleteConversation.ai-assistant-pro",async e=>{await this.__loadData(),await this.deleteConversation(e)}),this.j.e.on("renameConversation.ai-assistant-pro",async(e,t)=>{await this.__loadData(),await this.renameConversation(e,t)}),this.j.e.on("backToList.ai-assistant-pro",async()=>{await this.__loadData(),await (0,u.handleBackToList)(this.storage,this.stateManager)}),this.j.e.on("removeContext.ai-assistant-pro",async e=>{await this.__loadData(),this.stateManager.removeSelectionContext(e)}),this.j.e.on("approveToolCall.ai-assistant-pro",async(e,t)=>{try{await this.__loadData();let i=await (0,u.handleToolApproval)(e,t,this.stateManager,this.permissionManager,this.storage);if(i){let e=this.stateManager.getCurrentConversation();if(!e)return;let t=e.messages.find(e=>e.toolCalls?.some(e=>e.id===i.id));if(!t)return;await this.executeToolCall(t.id,i)}}catch(e){if((0,g.isAbortError)(e))return;this.stateManager.setError(e instanceof Error?e.message:e+"")}}),this.j.e.on("denyToolCall.ai-assistant-pro",async e=>{await this.__loadData(),await (0,u.handleToolDenial)(this.j,e,this.stateManager,this.storage)}),this.j.e.on("abortRequest.ai-assistant-pro",async()=>{await this.__loadData(),this.apiClient.abort(),this.stateManager.setLoading(!1)})}__applyTheme(){(0,u.applyTheme)(this.j,this.stateManager.state.theme,this.stateManager.state.displayMode,this.mainPanel.container,this.dialog)}async openAssistant(){if(this.stateManager.isOpen()){this.stateManager.close(),await this.__closeInContainer();return}await this.__loadData(),this.isDestructed||(this.stateManager.open(),await this.__openInContainer(),this.j.o.aiAssistantPro.includeSelectionByDefault&&!this.j.s.isCollapsed()&&this.addCurrentSelectionToContext())}async __openInContainer(){let{resizable:e,allowClose:t,flightPanelHeight:i}=this.j.o.aiAssistantPro,{displayMode:o="right",panelWidth:n,panelHeight:r}=this.stateManager.state;switch(this.__applyTheme(),this.mainPanel.setMod("displayMode",o),this.mainPanel.setMod("allowClose",t),this.mainPanel.setParentView("dialog"===o||"flight"===o?this.dialog:this.j),this.__openedMode=o,o){case"dialog":this.dialog.setSize(n,r).open().setContent(this.mainPanel.container);break;case"flight":y.UIFlightPosition.install(this.mainPanel,this.j.container,{panelHeight:i,containerClassName:this.getFullElName("flight-container")});break;default:e&&(w.UIResize.remove(this.mainPanel),w.UIResize.install(this.mainPanel,(0,u.invertMode)(o),{handleClassName:this.getFullElName("ai-assistent-resize-handle"),onResize:({newSize:e})=>{let t="left"===o||"right"===o?e:n,i="top"===o||"bottom"===o?e:r;return this.stateManager.state.panelWidth=t,this.stateManager.state.panelHeight=i,!0}})),this.j.currentPlace.slots[o].appendChild(this.mainPanel.container),(0,u.resizeInPanelView)(this.j,o,n,r)}}__onResizeInPanelView(){let{displayMode:e,panelWidth:t,panelHeight:i}=this.stateManager.state;(0,u.resizeInPanelView)(this.j,e,t,i)}async __closeInContainer(){let{displayMode:e}=await this.stateManager.state;switch(this.__openedMode!==e&&"dialog"===this.__openedMode&&this.dialog.close(),this.__openedMode!==e&&"flight"===this.__openedMode&&this.__closeFlightMode(),e){case"dialog":this.dialog.close();break;case"flight":this.__closeFlightMode();break;default:this.mainPanel.container.remove()}}__closeFlightMode(){y.UIFlightPosition.remove(this.mainPanel)}__onSavedStateChange(){let e=this.stateManager.state;return this.storage.saveGlobalSettings({displayMode:e.displayMode,panelWidth:e.panelWidth,panelHeight:e.panelHeight,theme:e.theme,defaultModel:e.defaultModel,defaultTemperature:e.defaultTemperature,currentConversationId:e.currentConversation?.id,...this.j.o.aiAssistantPro.persistOpenState?{isOpen:e.isOpen}:{}})}async closeAssistant(){this.stateManager.isOpen()&&(await this.__loadData(),this.stateManager.close(),this.__closeInContainer())}async addCurrentSelectionToContext(){await this.__loadData();let e=(0,u.getCurrentSelectionContext)(this.j);e&&this.stateManager.addSelectionContext(e)}async executeQuickCommand(e){let t,{quickCommandsSilentMode:i,quickCommandsDisplayMode:o}=this.j.o.aiAssistantPro,n=this.j.o.aiAssistant;if(n&&n[e]&&(0,g.isString)(n[e])&&(t=n[e]),!t)return void this.j.e.fire("error","Command not found: "+e);let r=this.j.s.isCollapsed()?this.j.value:this.j.s.html;if(!r)return;let s=n?.aiCommonPrefixPrompt||"",a=n?.aiCommonSuffixPrompt||"",l=`${s}${t}${a}
|
|
279
|
+
>${e.o.specialCharacters[t]}</a>`);a.push(s),n.Dom.append(r,s),n.Dom.append(i,r)}n.Dom.append(r,i)}let l=this;return e.e.on(a,"focus",function(){i.innerHTML=this.innerHTML}).on(a,"mousedown",function(t){n.Dom.isTag(this,"a")&&(e.s.focus(),e.s.insertHTML(this.innerHTML),(null==t?void 0:t.shiftKey)||e.e.fire(this,"close_dialog"),t&&t.preventDefault(),t&&t.stopImmediatePropagation())}).on(a,"mouseenter",function(){n.Dom.isTag(this,"a")&&this.focus()}).on(a,"keydown",t=>{let i=t.target;if(n.Dom.isTag(i,"a")){let n,r=parseInt((0,s.attr)(i,"-index")||"0",10),c=parseInt((0,s.attr)(i,"data-index-j")||"0",10);switch(t.key){case o.KEY_UP:case o.KEY_DOWN:void 0===a[n=t.key===o.KEY_UP?r-l.__countInRow:r+l.__countInRow]&&(n=t.key===o.KEY_UP?Math.floor(a.length/l.__countInRow)*l.__countInRow+c:c)>a.length-1&&(n-=l.__countInRow),a[n]&&a[n].focus();break;case o.KEY_RIGHT:case o.KEY_LEFT:void 0===a[n=t.key===o.KEY_LEFT?r-1:r+1]&&(n=t.key===o.KEY_LEFT?a.length-1:0),a[n]&&a[n].focus();break;case o.KEY_ENTER:e.e.fire(i,"mousedown"),t.stopImmediatePropagation(),t.preventDefault()}}}),t})}beforeDestruct(e){e.e.off("generateSpecialCharactersTable.symbols")}constructor(e){super(e),this.buttons=[{name:"symbols",group:"insert"}],this.__countInRow=17,(0,r.extendLang)(l)}}r.pluginSystem.add("symbols",c)},5119:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 17v3h7v-3a7 7 0 1 1 4 0v3h7v-3"/> </g> </svg> '},47686:function(e,t,i){"use strict";i.d(t,{onTabInsideLi:function(){return o.onTabInsideLi}});var o=i(26658)},26658:function(e,t,i){"use strict";i.d(t,{onTabInsideLi:function(){return r}});var o=i(2748),n=i(38837);function r(e,t=!1){let i,s,a,l;if(!e.o.tab.tabInsideLiInsertNewList)return!1;let[c,d]=(i=e.createInside.fake(),s=e.createInside.fake(),(a=e.s.range.cloneRange()).collapse(!0),a.insertNode(i),(l=e.s.range.cloneRange()).collapse(!1),l.insertNode(s),[i,s]);try{let i,r,s,a,l,d=!!(i=o.Dom.closest(c,"li",e.editor))&&(!!t||!!o.Dom.isLeaf(i.previousElementSibling))&&(!t||!!o.Dom.closest(i,"li",e.editor))&&i;if(!d||!(r=o.Dom.closest(c,"li",e.editor))||r!==d&&!d.contains(r))return!1;let u=o.Dom.closest(d,["ol","ul"],e.editor);if(!u||t&&!o.Dom.closest(u,"li",e.editor))return!1;return t?function(e,t,i){let r=o.Dom.closest(t,"li",e.editor);(0,n.assert)(r,"tab parent li is null");let s=Array.from(t.children).filter(e=>o.Dom.isLeaf(e));o.Dom.after(r,i);let a=s.indexOf(i);if((0===a||1===s.length)&&o.Dom.safeRemove(t),a!==s.length-1){let e=t.cloneNode();o.Dom.append(i,e);for(let t=a+1;t<s.length;t+=1)o.Dom.append(e,s[t])}}(e,u,d):(s=d.previousElementSibling,(0,n.assert)(s,"tab previousElementSibling is null"),a=s.lastElementChild,l=o.Dom.isTag(a,u.tagName)?a:e.createInside.element(u.tagName,Array.from(u.attributes).reduce((e,t)=>(e[t.name]=t.value,e),{})),o.Dom.append(l,d),a!==l&&o.Dom.append(s,l)),!0}finally{let t=e.s.createRange();t.setStartAfter(c),t.setEndBefore(d),e.s.selectRange(t),o.Dom.safeRemove(c),o.Dom.safeRemove(d)}}},66288:function(e,t,i){"use strict";i(6441).Config.prototype.tab={tabInsideLiInsertNewList:!0}},767:function(e,t,i){"use strict";var o=i(82758),n=i(65478),r=i(580),s=i(50911);i(66288);var a=i(47686),l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class c extends s.Plugin{afterInit(e){}__onTab(e){if(e.key===o.KEY_TAB&&this.__onShift(e.shiftKey))return!1}__onCommand(e){if(("indent"===e||"outdent"===e)&&this.__onShift("outdent"===e))return!1}__onShift(e){let t=(0,a.onTabInsideLi)(this.j,e);return t&&this.j.e.fire("afterTab",e),t}beforeDestruct(e){}}l([(0,n.watch)(":keydown.tab")],c.prototype,"__onTab",null),l([(0,n.watch)(":beforeCommand.tab")],c.prototype,"__onCommand",null),r.pluginSystem.add("tab",c)},72439:function(e,t,i){"use strict";var o=i(82758),n=i(2748),r=i(580),s=i(21537),a=i(76014);let l=new Set([o.KEY_TAB,o.KEY_LEFT,o.KEY_RIGHT,o.KEY_UP,o.KEY_DOWN]);r.pluginSystem.add("tableKeyboardNavigation",function(e){e.e.off(".tableKeyboardNavigation").on("keydown.tableKeyboardNavigation",t=>{let{key:i}=t,r=function(e,t){if(!l.has(t))return;let i=e.s.current();if(!i)return;let r=n.Dom.up(i,n.Dom.isCell,e.editor);if(!r)return;let{range:a}=e.s;if(t!==o.KEY_TAB&&i!==r){let e=t===o.KEY_RIGHT||t===o.KEY_DOWN,l=(0,s.call)(e?n.Dom.next:n.Dom.prev,i,e=>t===o.KEY_UP||t===o.KEY_DOWN?n.Dom.isTag(e,"br"):!!e,r);if(!e&&(l||t!==o.KEY_UP&&n.Dom.isText(i)&&0!==a.startOffset)||e&&(l||t!==o.KEY_DOWN&&n.Dom.isText(i)&&i.nodeValue&&a.startOffset!==i.nodeValue.length))return}return r}(e,i);if(!r)return;let c=e.getInstance(a.Table,e.o),d=n.Dom.closest(r,"table",e.editor),u=null,h=i===o.KEY_LEFT||t.shiftKey,p=()=>(0,s.call)(h?n.Dom.prev:n.Dom.next,r,n.Dom.isCell,d);switch(i){case o.KEY_TAB:case o.KEY_LEFT:(u=p())||(c.appendRow(d,!!h&&n.Dom.first(d,e=>n.Dom.isTag(e,"tr")),!h),u=p());break;case o.KEY_UP:case o.KEY_DOWN:{let e=c.formalMatrix(d),[t,n]=c.formalCoordinate(d,r);i===o.KEY_UP?void 0!==e[t-1]&&(u=e[t-1][n]):void 0!==e[t+1]&&(u=e[t+1][n])}}if(u){if(e.e.fire("hidePopup hideResizer"),u.firstChild)i!==o.KEY_TAB||n.Dom.isEmpty(u)?e.s.setCursorIn(u,i===o.KEY_RIGHT||i===o.KEY_DOWN):e.s.select(u,!0);else{let t=e.createInside.element("br");n.Dom.append(u,t),e.s.setCursorBefore(t)}return e.synchronizeValues(),!1}})})},40329:function(e,t,i){"use strict";var o=i(82758),n=i(22732),r=i(21537),s=i(43555),a=i(12153),l=i(6441),c=i(6091);l.Config.prototype.table={splitBlockOnInsertTable:!0,selectionCellStyle:"border: 1px double #1e88e5 !important;",useExtraClassesOptions:!1},a.Icon.set("table",c.default);let d=new Set(["table","thead","tbody","tfoot","tr","ul","ol","dl"]);l.Config.prototype.controls.table={data:{cols:10,rows:10,classList:{"table table-bordered":"Bootstrap Bordered","table table-striped":"Bootstrap Striped","table table-dark":"Bootstrap Dark"}},popup(e,t,i,a){let l;e.editor.normalize();let c=e.history.snapshot.make(),u=a.control,h=u.data&&u.data.rows?u.data.rows:10,p=u.data&&u.data.cols?u.data.cols:10,f=e.c.fromHTML('<form class="jodit-form jodit-form__inserter"><div class="jodit-form__table-creator-box"><div class="jodit-form__container"></div><div class="jodit-form__options">'+(()=>{if(!e.o.table.useExtraClassesOptions)return"";let t=[];if(u.data){let e=u.data.classList;Object.keys(e).forEach(i=>{t.push(`<label class="jodit_vertical_middle"><input class="jodit-checkbox" value="${i}" type="checkbox"/>${e[i]}</label>`)})}return t.join("")})()+'</div></div><label class="jodit-form__center"><span>1</span> × <span>1</span></label></form>'),[m,g]=(l=[],n.Dom.each(f,e=>{n.Dom.isTag(e,"span")&&l.push(e)}),l),b=n.Dom.first(f,e=>n.Dom.isHTMLElement(e)&&e.classList.contains("jodit-form__container")),v=n.Dom.first(f,e=>n.Dom.isHTMLElement(e)&&e.classList.contains("jodit-form__options")),y=[],w=h*p;(0,s.attr)(b,{role:"grid",ariaLabel:"Table size",ariaRowcount:h,ariaColcount:p});for(let t=0;t<w;t+=1)if(!y[t]){let i=Math.floor(t/p)+1,o=t%p+1;y.push(e.c.element("span",{dataIndex:t,role:"gridcell",tabindex:0===t?0:-1,ariaLabel:`${i} by ${o}`}))}let _=e=>{let t=parseInt((0,s.attr)(e,"-index")||"0",10),i=Math.ceil((t+1)/p),o=t%p+1;for(let e=0;e<y.length;e+=1)o>=e%p+1&&i>=Math.ceil((e+1)/p)?y[e].className="jodit_hovered":y[e].className="";g.textContent=o.toString(),m.textContent=i.toString()},k=t=>{let o,a,l=parseInt((0,s.attr)(t,"-index")||"0",10),u=Math.ceil((l+1)/p),h=l%p+1,f=e.createInside,m=f.element("tbody"),g=f.element("table");n.Dom.append(g,m);let b=null,y,w;for(let e=1;u>=e;e+=1){y=f.element("tr");for(let e=1;e<=h;e+=1)w=f.element("td"),b||(b=w),(0,r.css)(w,"width",(100/h).toFixed(4)+"%"),n.Dom.append(w,f.element("br")),n.Dom.append(y,f.text(`
|
|
280
|
+
`)),n.Dom.append(y,f.text(" ")),n.Dom.append(y,w);n.Dom.append(m,f.text(`
|
|
281
|
+
`)),n.Dom.append(m,y)}(0,r.$$)("input[type=checkbox]:checked",v).forEach(e=>{e.value.split(/[\s]+/).forEach(e=>{g.classList.add(e)})}),e.s.restore(),e.s.removeMarkers(),e.editor.normalize(),e.history.snapshot.restore(c);let _=e.s.current(),k=(o=n.Dom.closest(_,n.Dom.isBlock,e.editor),(a=n.Dom.closest(_,t=>{var i;if(!n.Dom.isElement(t)||t===o&&n.Dom.isTag(t,e.o.enter))return!1;let r=t.nodeName.toLowerCase();return!!(null==(i=e.o.dtd)?void 0:i.blockLimits[r])&&!d.has(r)},e.editor))&&n.Dom.isOrContains(a,e.s.range.startContainer)?a:null),C=k===_?null:n.Dom.furthest(_,n.Dom.isBlock,null!=k?k:e.editor);if(C&&n.Dom.isEmpty(C))n.Dom.replace(C,g,void 0,!1,!0);else if(C){let t=f.text(`
|
|
282
|
+
`);if(e.o.table.splitBlockOnInsertTable){let i=e.s.range;i.collapse(!1),i.insertNode(t),i.collapse(!1),e.s.selectRange(i);let o=e.s.splitSelection(C,t);o?n.Dom.after(o,g):n.Dom.after(C,g)}else n.Dom.after(C,t),n.Dom.after(t,g)}else!k||n.Dom.isEmpty(k)||e.o.table.splitBlockOnInsertTable?e.s.insertNode(g,!1):n.Dom.append(k,g);b&&(e.s.setCursorIn(b),(0,r.scrollIntoViewIfNeeded)(b,e.editor,e.ed)),i()};if(e.e.on(b,"mousemove",e=>{n.Dom.isTag(e.target,"span")&&_(e.target)}).on(b,"touchstart mousedown",e=>{n.Dom.isTag(e.target,"span")&&(e.preventDefault(),e.stopImmediatePropagation(),k(e.target))}).on(b,"keydown",e=>{let t;if(!n.Dom.isTag(e.target,"span"))return;if(e.key===o.KEY_ENTER){e.preventDefault(),e.stopImmediatePropagation(),k(e.target);return}if(e.key===o.KEY_ESC){e.preventDefault(),e.stopImmediatePropagation(),i();return}let r=parseInt((0,s.attr)(e.target,"-index")||"0",10),a=Math.floor(r/p),l=r%p;switch(e.key){case o.KEY_LEFT:t=l>0?r-1:r;break;case o.KEY_RIGHT:t=l<p-1?r+1:r;break;case o.KEY_UP:t=a>0?r-p:r;break;case o.KEY_DOWN:t=a<h-1?r+p:r;break;default:return}e.preventDefault(),e.stopImmediatePropagation(),t!==r&&(y[r].tabIndex=-1,y[t].tabIndex=0,y[t].focus(),_(y[t]))}),a&&a.parentElement){for(let t=0;t<h;t+=1){let i=e.c.div();(0,s.attr)(i,"role","row");for(let e=0;e<p;e+=1)n.Dom.append(i,y[t*p+e]);n.Dom.append(b,i)}y[0]&&(y[0].className="hovered")}return f},tooltip:"Insert table"}},43003:function(e,t,i){"use strict";var o=i(580);i(40329),o.pluginSystem.add("table",function(e){e.registerButton({name:"table",group:"insert"})})},6091:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="3" y="3" width="18" height="18" rx="2.5"/><path d="M3 9h18M3 15h18M9 3v18M15 3v18"/> </g> </svg> '},94529:function(e,t,i){"use strict";var o=i(82758),n=i(45219),r=i(37133),s=i(2748),a=i(580),l=i(29960),c=i(50911),d=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let u=new Set(["input","textarea","select"]);class h extends c.Plugin{afterInit(e){e.registerCommand("focusToolbar",{hotkeys:"alt+f10",exec:this.focusToolbar})}beforeDestruct(){}focusToolbar(){let[e]=this.__buttons();return null==e||e.focus(),!1}onKeyDown(e){if(e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey)return;let t=e.target;if(s.Dom.isTag(t,u)||s.Dom.isHTMLElement(t)&&t.isContentEditable)return;let i=this.__buttons();if(i.length){switch(e.key){case o.KEY_ESC:this.j.s.focus();break;case o.KEY_HOME:i[0].focus();break;case o.KEY_END:i[i.length-1].focus();break;case o.KEY_LEFT:case o.KEY_RIGHT:{let n=i.findIndex(e=>e.container.contains(t));if(-1===n)return;i[(n+(e.key===o.KEY_RIGHT!==this.__isRtl()?1:-1)+i.length)%i.length].focus();break}default:return}return e.preventDefault(),e.stopPropagation(),!1}}__buttons(){return this.j.toolbar.buttons.filter(e=>!e.state.disabled&&e.container.isConnected)}__isRtl(){return"rtl"===(0,l.attr)(this.j.toolbar.container,"dir")}}d([n.autobind],h.prototype,"focusToolbar",null),d([(0,r.watch)("j.toolbar.container:keydown.toolbar-navigation")],h.prototype,"onKeyDown",null),a.pluginSystem.add("toolbarNavigation",h)},14984:function(e,t,i){"use strict";var o=i(21537),n=i(62843),r=i(2525),s=i(12153),a=i(6441),l=i(92762),c=i(37775);function d(e){var t;null==(t=e.files)||t.forEach(t=>{this.s.insertNode((0,o.prepareMedia)(this,this.createInside.element("video",{controls:"",src:e.baseurl+t})))})}a.Config.prototype.video={parseUrlToVideoEmbed:o.convertMediaUrlToVideoEmbed,defaultWidth:400,defaultHeight:345,defaultHandlerSuccess:d},s.Icon.set("video",c.default),a.Config.prototype.controls.video={popup(e,t,i){let s=new r.UIForm(e,[new r.UIBlock(e,[new r.UIInput(e,{name:"url",required:!0,label:"URL",placeholder:"https://",validators:["url"]})]),new r.UIBlock(e,[(0,n.Button)(e,"","Insert","primary").onAction(()=>s.submit())])]),a=new r.UIForm(e,[new r.UIBlock(e,[new r.UITextArea(e,{name:"code",required:!0,label:"Embed code"})]),new r.UIBlock(e,[(0,n.Button)(e,"","Insert","primary").onAction(()=>a.submit())])]),c=[],u=t=>{e.s.restore(),e.s.insertHTML((0,o.prepareEmbedCode)(e,t)),i()};e.s.save();let{uploader:h}=e.o;!1!==h.showTabInFileSelector&&(h.url||h.customUploadFunction)&&c.push((0,l.UploadTab)(e,t=>{var i,o;e.s.restore(),(null!=(o=null==(i=e.o.video)?void 0:i.defaultHandlerSuccess)?o:d).call(e,t)},{label:"Drop file",accept:"video/*"})),c.push({icon:"link",name:"Link",content:s.container},{icon:"source",name:"Code",content:a.container}),s.onSubmit(t=>{var i,n,r,s;u((0,o.call)(null!=(n=null==(i=e.o.video)?void 0:i.parseUrlToVideoEmbed)?n:o.convertMediaUrlToVideoEmbed,t.url,{width:null==(r=e.o.video)?void 0:r.defaultWidth,height:null==(s=e.o.video)?void 0:s.defaultHeight}))}),a.onSubmit(e=>{u(e.code)});let p=(0,l.TabsWidget)(e,c);return p.classList.add("jodit-file-selector"),p},tags:["iframe"],tooltip:"Insert youtube/vimeo video"}},26551:function(e,t,i){"use strict";var o=i(580);i(14984),o.pluginSystem.add("video",function(e){e.registerButton({name:"video",group:"media"})})},37775:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="2" y="5" width="13" height="14" rx="2"/><path d="m15 10 7-4v12l-7-4"/> </g> </svg> '},96967:function(e,t,i){"use strict";i(6441).Config.prototype.wrapNodes={exclude:new Set(["hr","style","br"]),emptyBlockAfterInit:!0}},72253:function(e,t,i){"use strict";var o=i(65478),n=i(22732),r=i(580),s=i(70799),a=i(50911);i(96967);var l=function(e,t,i,o){var n,r=arguments.length,s=r<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(r<3?n(s):r>3?n(t,i,s):n(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class c extends a.Plugin{afterInit(e){"br"!==e.o.enter.toLowerCase()&&e.e.on("drop.wtn focus.wtn keydown.wtn mousedown.wtn afterInit.wtn backSpaceAfterDelete.wtn",this.preprocessInput,{top:!0}).on("afterInit.wtn postProcessSetEditorValue.wtn afterCommitStyle.wtn backSpaceAfterDelete.wtn",this.postProcessSetEditorValue)}beforeDestruct(e){e.e.off(".wtn")}postProcessSetEditorValue(){let{jodit:e}=this;if(!e.isEditorMode())return;let t=e.editor.firstChild,i=!1;for(;t;){if(t=function(e,t){let i=e,o=e;do if(n.Dom.isElement(o)&&n.Dom.isLeaf(o)&&!n.Dom.isList(o.parentElement)){let e=n.Dom.findNotEmptySibling(o,!1);n.Dom.isTag(i,"ul")?n.Dom.append(i,o):i=n.Dom.wrap(o,"ul",t.createInside),o=e}else break;while(o)return i}(t,e),this.isSuitableStart(t)){i||e.s.save(),i=!0;let o=e.createInside.element(e.o.enter);for(n.Dom.before(t,o);t&&this.isSuitable(t);){let e=t.nextSibling;n.Dom.append(o,t),t=e}o.normalize(),t=o}t=t&&t.nextSibling}i&&(e.s.restore(),"afterInit"===e.e.current&&e.e.fire("internalChange"))}preprocessInput(){let{jodit:e}=this,t="afterInit"===e.e.current;if(!e.isEditorMode()||e.editor.firstChild||!e.o.wrapNodes.emptyBlockAfterInit&&t)return;let i=e.createInside.element(e.o.enter),o=e.createInside.element("br");n.Dom.append(i,o),n.Dom.append(e.editor,i),(e.s.isFocused()||"backSpaceAfterDelete"===e.e.current)&&e.s.setCursorBefore(o),e.e.fire("internalChange")}constructor(){super(...arguments),this.isSuitableStart=e=>{var t;return n.Dom.isText(e)&&(0,s.isString)(e.nodeValue)&&(/[^\s]/.test(e.nodeValue)||(null==(t=e.parentNode)?void 0:t.firstChild)===e&&this.isSuitable(e.nextSibling))||this.isNotWrapped(e)&&!n.Dom.isTemporary(e)},this.isSuitable=e=>n.Dom.isText(e)||this.isNotWrapped(e),this.isNotWrapped=e=>n.Dom.isElement(e)&&!(n.Dom.isBlock(e)||n.Dom.isTag(e,this.j.o.wrapNodes.exclude))}}l([o.autobind],c.prototype,"postProcessSetEditorValue",null),l([o.autobind],c.prototype,"preprocessInput",null),r.pluginSystem.add("wrapNodes",c)},86012:function(e,t,i){"use strict";i(6441).Config.prototype.showXPathInStatusbar=!0},83671:function(e,t,i){"use strict";var o=i(82758),n=i(22732),r=i(580),s=i(49055),a=i(29960),l=i(76078),c=i(50911),d=i(80870),u=i(21491);i(86012);class h extends c.Plugin{afterInit(){if(this.j.o.showXPathInStatusbar){this.container=this.j.c.div("jodit-xpath"),(0,a.attr)(this.container,"role","list");let e=()=>{this.j.o.showXPathInStatusbar&&this.container&&(this.j.statusbar.append(this.container),this.j.getRealMode()===o.MODE_WYSIWYG?this.calcPath():(this.container&&(this.container.innerHTML=o.INVISIBLE_SPACE),this.appendSelectAll()))};this.j.e.off(".xpath").on("pointerup.xpath change.xpath keydown.xpath changeSelection.xpath",this.calcPath).on("afterSetMode.xpath afterInit.xpath changePlace.xpath",e),e(),this.calcPath()}}beforeDestruct(){this.j&&this.j.events&&this.j.e.off(".xpath"),this.removeSelectAll(),this.menu&&this.menu.destruct(),n.Dom.safeRemove(this.container),delete this.menu,delete this.container}constructor(){super(...arguments),this.onContext=(e,t)=>(this.menu||(this.menu=new d.ContextMenu(this.j)),this.menu.show(t.clientX,t.clientY,[{icon:"bin",title:e===this.j.editor?"Clear":"Remove",exec:()=>{e!==this.j.editor?n.Dom.safeRemove(e):this.j.value="",this.j.synchronizeValues()}},{icon:"select-all",title:"Select",exec:()=>{this.j.s.select(e)}}]),!1),this.onSelectPath=(e,t)=>{this.j.s.focus();let i=(0,a.attr)(t.target,"-path")||"/";if("/"===i)return this.j.execCommand("selectall"),!1;try{let e=this.j.ed.evaluate(i,this.j.editor,null,XPathResult.ANY_TYPE,null).iterateNext();if(e)return this.j.s.select(e),!1}catch(e){}return this.j.s.select(e),!1},this.tpl=(e,t,i,o)=>{let n=this.j.c.fromHTML(`<span class="jodit-xpath__item"><a role="button" data-path="${t}" title="${o}" tabindex="-1"'>${(0,s.trim)(i)}</a></span>`),r=n.firstChild;return this.j.e.on(r,"click",this.onSelectPath.bind(this,e)).on(r,"contextmenu",this.onContext.bind(this,e)),n},this.removeSelectAll=()=>{this.selectAllButton&&(this.selectAllButton.destruct(),delete this.selectAllButton)},this.appendSelectAll=()=>{this.removeSelectAll(),this.selectAllButton=(0,u.makeButton)(this.j,{name:"selectall",...this.j.o.controls.selectall}),this.selectAllButton.state.size="tiny",this.container&&n.Dom.prepend(this.container,this.selectAllButton.container)},this.calcPathImd=()=>{if(this.isDestructed)return;let e=this.j.s.current();if(this.container&&(this.container.innerHTML=o.INVISIBLE_SPACE),e){let t,i,o;n.Dom.up(e,e=>{e&&this.j.editor!==e&&!n.Dom.isText(e)&&!n.Dom.isComment(e)&&(t=e.nodeName.toLowerCase(),i=(0,l.getXPathByElement)(e,this.j.editor).replace(/^\//,""),o=this.tpl(e,i,t,this.j.i18n("Select %s",t)),this.container&&n.Dom.prepend(this.container,o))},this.j.editor)}this.appendSelectAll()},this.calcPath=this.j.async.debounce(this.calcPathImd,2*this.j.defaultTimeout,!0)}}r.pluginSystem.add("xpath",h)},78173:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m6 10 6 6 6-6"/> </g> </svg> '},16260:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m14 6-6 6 6 6"/> </g> </svg> '},37663:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m10 6 6 6-6 6"/> </g> </svg> '},51036:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m6 14 6-6 6 6"/> </g> </svg> '},31554:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 6h18M9 6V4h6v2M5 6l1 14h12l1-14M10 10v6m4-6v6"/> </g> </svg> '},18309:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m6 6 12 12M18 6 6 18"/> </g> </svg> '},99762:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M5.3333 5.3333h13.3334M2.6667 12h18.6666M5.3333 18.6667h13.3334" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg> '},7903:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M20 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h9m-7 8 4 4L21 5"/> </g> </svg> '},58032:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 8 8 8 8-8"/> </g> </svg> '},52507:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <circle cx="12" cy="5" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="12" cy="19" r="1"/> </g> </svg> '},1647:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 3v13m-5-5 5 5 5-5M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"/> </g> </svg> '},98535:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 12 10-9 7 7-10 10H7l-4-4a3 3 0 0 1 1-4Zm3-3 8 7m-4 4h10"/> </g> </svg> '},43478:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z"/><circle cx="12" cy="12" r="3"/> </g> </svg> '},60097:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6Zm0 0v6h6"/> </g> </svg> '},49155:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M3 7V6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z"/> </g> </svg> '},17555:function(e,t,i){"use strict";i.r(t),i.d(t,{angle_down:function(){return o.default},angle_left:function(){return n.default},angle_right:function(){return r.default},angle_up:function(){return s.default},bin:function(){return a.default},cancel:function(){return l.default},center:function(){return c.default},check:function(){return d.default},chevron:function(){return u.default},dots:function(){return h.default},download:function(){return p.default},eraser:function(){return f.default},eye:function(){return m.default},file:function(){return g.default},folder:function(){return b.default},info_circle:function(){return v.default},left:function(){return y.default},lock:function(){return w.default},ok:function(){return _.default},pencil:function(){return k.default},plus:function(){return C.default},resize_handler:function(){return S.default},right:function(){return x.default},save:function(){return I.default},settings:function(){return E.default},unlock:function(){return T.default},update:function(){return j.default},upload:function(){return D.default},valign:function(){return A.default}});var o=i(78173),n=i(16260),r=i(37663),s=i(51036),a=i(31554),l=i(18309),c=i(99762),d=i(7903),u=i(58032),h=i(52507),p=i(1647),f=i(98535),m=i(43478),g=i(60097),b=i(49155),v=i(17176),y=i(57882),w=i(58908),_=i(24829),k=i(4038),C=i(45575),S=i(84858),x=i(445),I=i(36886),E=i(10766),T=i(33651),j=i(20362),D=i(12202),A=i(80152)},17176:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <circle cx="12" cy="12" r="9"/><path d="M12 11v6M12 7h.01"/> </g> </svg> '},57882:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2.6667 5.3333h18.6666M2.6667 12H16M2.6667 18.6667h18.6666" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg> '},58908:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="4" y="10" width="16" height="11" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3M12 14v3"/> </g> </svg> '},24829:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 12 5 5L20 6"/> </g> </svg> '},4038:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m4 15 11-11a2.8 2.8 0 0 1 4 4L8 19l-5 2 1-6Zm9-9 4 4"/> </g> </svg> '},45575:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 5v14M5 12h14"/> </g> </svg> '},84858:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m7 20 13-13m-6 13 6-6"/> </g> </svg> '},445:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M2.6667 5.3333h18.6666M8 12h13.3333M2.6667 18.6667h18.6666" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg> '},36886:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M5 3h12l4 4v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2ZM7 3v6h9V3M7 21v-7h10v7"/> </g> </svg> '},10766:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="m10 2-.5 2.5-2 1.2L5 5l-2 3.5 2 1.7v2.6l-2 1.7L5 18l2.5-.7 2 1.2L10 21h4l.5-2.5 2-1.2 2.5.7 2-3.5-2-1.7v-2.6l2-1.7L19 5l-2.5.7-2-1.2L14 2Z"/><circle cx="12" cy="11.5" r="3"/> </g> </svg> '},33651:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <rect x="4" y="10" width="16" height="11" rx="2"/><path d="M8 10V7a4 4 0 0 1 7.5-2M12 14v3"/> </g> </svg> '},20362:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M20 9a8.5 8.5 0 1 0 .5 7M20 3v6h-6"/> </g> </svg> '},12202:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 16V3m-5 5 5-5 5 5M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"/> </g> </svg> '},80152:function(e,t){"use strict";t.default='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"> <g fill="none"> <path d="M12 3v18M7 8l5-5 5 5M7 16l5 5 5-5"/> </g> </svg> '},62357:function(e,t,i){"use strict";i.d(t,{UIRange:function(){return l}});var o=i(82749),n=i(31635),r=i(65478),s=i(21537),a=i(67510);class l extends a.UIInput{className(){return"UIRange"}appendUIRange(){let e=this.j.create.div(this.getFullElName("slider"));this.container.appendChild(e);let t=this.j.create.div(this.getFullElName("handle"));e.appendChild(t);let i=this.j.create.div(this.getFullElName("log")),o=this.getElm("label");o&&o.appendChild(i)}onDragStart(e){this.startValue=parseFloat(this.value)||0,this.startX=e.clientX;let t=this.getElm("slider");(0,s.assert)(null!=t,"slider element does not exists"),this.width=t.offsetWidth,this.j.e.on(this.j.ow,"mousemove",this.onDrag)}onDrag(e){let{min:t,max:i,step:o=1}=this.state,n=(e.clientX-this.startX)/this.width*(this.state.max-this.state.min),r=this.startValue+n;r<t&&(r=t),r>i&&(r=i),r=Math.round(r/o)*o,this.value=r.toFixed(10)}onDragEnd(){this.j.e.off(this.j.ow,"mousemove",this.onDrag)}onChangeSelfValue(){let e=this.getElm("handle"),t=parseFloat(this.value)||0;(0,s.assert)(null!=e,"Handle element does not exist"),(0,s.css)(e,{left:(t-this.state.min)/(this.state.max-this.state.min)*100+"%"});let i=this.getElm("log");(0,s.assert)(null!=i,"log element does not exist"),i.innerText=t.toString()}destruct(){return this.onDragEnd(),super.destruct()}constructor(e,t){super(e,{...t,type:"hidden"}),(0,o._)(this,"state",{...a.UIInput.defaultState,min:0,max:100,step:1}),(0,o._)(this,"startValue",0),(0,o._)(this,"startX",0),(0,o._)(this,"width",100),Object.assign(this.state,t),this.appendUIRange(),this.onChangeSelfValue()}}(0,n.__decorate)([(0,r.watch)(["handle:mousedown","handle:touchstart"])],l.prototype,"onDragStart",null),(0,n.__decorate)([r.autobind],l.prototype,"onDrag",null),(0,n.__decorate)([(0,r.watch)(["j.ow:mouseup","j.ow:touchend"])],l.prototype,"onDragEnd",null),(0,n.__decorate)([(0,r.watch)(":change")],l.prototype,"onChangeSelfValue",null),l=(0,n.__decorate)([r.component],l)},31356:function(e,t,i){"use strict";i.d(t,{ListReconciler:function(){return o}});class o{static reconcile(e,t,i){let{getId:o,isEqual:n=(e,t)=>o(e)===o(t),preserveOrder:r=!0}=i,s=new Map,a=new Map;e.forEach((e,t)=>{let i=o(e);s.set(i,e),a.set(i,t)});let l=new Map,c=new Map;t.forEach((e,t)=>{let i=o(e);l.set(i,e),c.set(i,t)});let d=[],u=[],h=[],p=[];return t.forEach((e,t)=>{let i=o(e),l=s.get(i);l?!n(l,e)||r&&a.get(i)!==t?u.push({oldItem:l,newItem:e,index:r?t:a.get(i)}):p.push(l):d.push(e)}),e.forEach(e=>{let t=o(e);l.has(t)||h.push(e)}),{toCreate:d,toUpdate:u,toRemove:h,unchanged:p}}static applyResult(e,t,i={}){t.toRemove.forEach(t=>{let o=e.indexOf(t);-1!==o&&(i.onRemove?.(t,o),e.splice(o,1))}),t.toUpdate.forEach(({oldItem:t,newItem:o,index:n})=>{let r=e.indexOf(t);-1!==r&&(i.onUpdate?.(t,o,n),e[r]=o)}),t.toCreate.forEach(t=>{i.onCreate?.(t,e.length),e.push(t)})}}},2692:function(e,t,i){"use strict";i.d(t,{JoditPro:function(){return a}});var o=i(82758),n=i(63799),r=i(41180),s=i(86019);class a extends s.Jodit{static make(e,t){return new this(e,t)}beforeInitHook(){if(o.IS_PROD&&!o.IS_TEST&&this.o.loadExternalConfig)return(0,n.appendScriptAsync)(this,this.basePath+"config.js")}afterInitHook(){(async()=>{if(await this.e.fire("checkReserve",location.host)!=="normal"){if(this.isInDestruct)return;let e=this.c.div("",'Trial version. Buy <a href="https://xdsoft.net/jodit/pro/">Jodit Pro</a>');o.IS_TEST||o.IS_PROD,(0,r.css)(e,{position:"absolute",color:"red",right:10,bottom:10}),this.addDisclaimer(e)}})().catch(()=>null),super.afterInitHook()}getVersion(){return"PRO "+o.APP_VERSION}}},41810:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(66645);var r=i(86449),s=i(21020),a=i(46166),l=i(62895),c=i(55487),d=i(27769),u=i(58579),h=i(63805),p=i(82758),f=i(65478),m=i(580),g=i(21537),b=i(50911),v=i(2692),y=i(18549),w=i(54747);class _ extends b.Plugin{get state(){return this.stateManager.state}get toolRegistry(){return new c.ToolRegistry(this.j)}get permissionManager(){return new s.PermissionManager(this.j,this.toolRegistry)}get apiClient(){return new r.APIClient(this.j,this.toolRegistry)}get storage(){let{storage:e,storageKey:t,maxConversations:i}=this.j.o.aiAssistantPro;if("string"==typeof e){let o=(0,l.createStorageProvider)(e,t);return new l.WebStorageConversationStorage(o,i)}return e}get stateManager(){return new a.StateManager(this.j)}get mainPanel(){return new d.UIMainPanel(this.j,this.stateManager.state,this.j.o.aiAssistantPro,e=>{let t=this.stateManager.getCurrentConversation();t&&this.stateManager.setCurrentConversation({...t,...e})})}get dialog(){let e=this.j.dlg({resizable:this.j.o.aiAssistantPro.resizable,eventEmmiter:this.j.e});return e.e.on(e,"afterClose",()=>{this.j.e.fire("closeAIAssistantPro.ai-assistant-pro")}),e}setupTextAutocomplete(){let{textAutocompleteEnabled:e,textAutocompleteApiRequest:t,textAutocompleteMinQueryLength:i,textAutocompleteMaxSuggestions:o,textAutocompleteDebounceMs:n,textAutocompleteCacheTTL:r,textAutocompleteCacheMaxSize:s}=this.j.o.aiAssistantPro;if(!e||!t)return;this.j.o.autocomplete={...this.j.o.autocomplete,displayMode:"inline"};let a=this.textAutocompleteCache,l=null;this.textAutocompleteSource=e=>{if(e.length<i)return[];let c=`${e}:${o}`;if(r>0){let e=a.get(c);if(e&&Date.now()-e.ts<r)return e.data.map(e=>({value:e,title:e}))}l&&clearTimeout(l);let d=new AbortController;return new Promise(i=>{l=setTimeout(async()=>{try{let n=await t(e,o,d.signal);if(Array.isArray(n)){let e=n.slice(0,o);if(r>0){if(a.size>=s){let e=a.keys().next().value;null!=e&&a.delete(e)}a.set(c,{ts:Date.now(),data:e})}i(e.map(e=>({value:e,title:e})));return}i([])}catch{i([])}},n)})},this.j.e.fire("registerAutocompleteSource",this.textAutocompleteSource)}afterInit(){(0,m.extendLang)(h),this.setupEventListeners(),this.setupTextAutocomplete(),this.j.async.promise(e=>{let{initiallyOpened:t,persistOpenState:i}=this.j.o.aiAssistantPro,o=t;i?this.storage.getGlobalSettings().then(e=>{if(e?.isOpen!=null&&(o=e.isOpen),o)return this.openAssistant()}).catch(()=>null).finally(()=>e(void 0)):e(void 0)}).catch(()=>null)}__loadData(){return this.__initedPromise?this.__initedPromise:this.isDestructed?Promise.reject():(this.__initedPromise=this.j.async.promise(e=>{this.loadInitialData().then(e)}).catch(()=>null),this.__initedPromise)}async loadInitialData(){this.mainPanel.setMod("ready",!0),await (0,u.loadInitialData)(this.j,this.storage,this.stateManager),await this.restorePendingToolCalls()}async restorePendingToolCalls(){let e=this.stateManager.getCurrentConversation();if(!e)return;let t=(0,u.findMessagesWithPendingToolCalls)(e);if(0!==t.length)for(let e of t)await this.handleToolCalls(e.id)}setupEventListeners(){this.j.e.on("selectConversation.ai-assistant-pro",async e=>{try{await this.__loadData(),await (0,u.handleConversationSelect)(e,this.storage,this.stateManager)}catch(e){p.IS_PROD}}),this.j.e.on("newConversation.ai-assistant-pro",async()=>{await this.__loadData();let e=(0,u.createNewConversation)(this.j,this.state.defaultModel,this.state.defaultTemperature);this.stateManager.setCurrentConversation(e)}),this.j.e.on("deleteConversation.ai-assistant-pro",async e=>{await this.__loadData(),await this.deleteConversation(e)}),this.j.e.on("renameConversation.ai-assistant-pro",async(e,t)=>{await this.__loadData(),await this.renameConversation(e,t)}),this.j.e.on("backToList.ai-assistant-pro",async()=>{await this.__loadData(),await (0,u.handleBackToList)(this.storage,this.stateManager)}),this.j.e.on("removeContext.ai-assistant-pro",async e=>{await this.__loadData(),this.stateManager.removeSelectionContext(e)}),this.j.e.on("approveToolCall.ai-assistant-pro",async(e,t)=>{try{await this.__loadData();let i=await (0,u.handleToolApproval)(e,t,this.stateManager,this.permissionManager,this.storage);if(i){let e=this.stateManager.getCurrentConversation();if(!e)return;let t=e.messages.find(e=>e.toolCalls?.some(e=>e.id===i.id));if(!t)return;await this.executeToolCall(t.id,i)}}catch(e){if((0,g.isAbortError)(e))return;this.stateManager.setError(e instanceof Error?e.message:e+"")}}),this.j.e.on("denyToolCall.ai-assistant-pro",async e=>{await this.__loadData(),await (0,u.handleToolDenial)(this.j,e,this.stateManager,this.storage)}),this.j.e.on("abortRequest.ai-assistant-pro",async()=>{await this.__loadData(),this.apiClient.abort(),this.stateManager.setLoading(!1)})}__applyTheme(){(0,u.applyTheme)(this.j,this.stateManager.state.theme,this.stateManager.state.displayMode,this.mainPanel.container,this.dialog)}async openAssistant(){if(this.stateManager.isOpen()){this.stateManager.close(),await this.__closeInContainer();return}await this.__loadData(),this.isDestructed||(this.stateManager.open(),await this.__openInContainer(),this.j.o.aiAssistantPro.includeSelectionByDefault&&!this.j.s.isCollapsed()&&this.addCurrentSelectionToContext())}async __openInContainer(){let{resizable:e,allowClose:t,flightPanelHeight:i}=this.j.o.aiAssistantPro,{displayMode:o="right",panelWidth:n,panelHeight:r}=this.stateManager.state;switch(this.__applyTheme(),this.mainPanel.setMod("displayMode",o),this.mainPanel.setMod("allowClose",t),this.mainPanel.setParentView("dialog"===o||"flight"===o?this.dialog:this.j),this.__openedMode=o,o){case"dialog":this.dialog.setSize(n,r).open().setContent(this.mainPanel.container);break;case"flight":y.UIFlightPosition.install(this.mainPanel,this.j.container,{panelHeight:i,containerClassName:this.getFullElName("flight-container")});break;default:e&&(w.UIResize.remove(this.mainPanel),w.UIResize.install(this.mainPanel,(0,u.invertMode)(o),{handleClassName:this.getFullElName("ai-assistent-resize-handle"),onResize:({newSize:e})=>{let t="left"===o||"right"===o?e:n,i="top"===o||"bottom"===o?e:r;return this.stateManager.state.panelWidth=t,this.stateManager.state.panelHeight=i,!0}})),this.j.currentPlace.slots[o].appendChild(this.mainPanel.container),(0,u.resizeInPanelView)(this.j,o,n,r)}}__onResizeInPanelView(){let{displayMode:e,panelWidth:t,panelHeight:i}=this.stateManager.state;(0,u.resizeInPanelView)(this.j,e,t,i)}async __closeInContainer(){let{displayMode:e}=await this.stateManager.state;switch(this.__openedMode!==e&&"dialog"===this.__openedMode&&this.dialog.close(),this.__openedMode!==e&&"flight"===this.__openedMode&&this.__closeFlightMode(),e){case"dialog":this.dialog.close();break;case"flight":this.__closeFlightMode();break;default:this.mainPanel.container.remove()}}__closeFlightMode(){y.UIFlightPosition.remove(this.mainPanel)}__onSavedStateChange(){let e=this.stateManager.state;return this.storage.saveGlobalSettings({displayMode:e.displayMode,panelWidth:e.panelWidth,panelHeight:e.panelHeight,theme:e.theme,defaultModel:e.defaultModel,defaultTemperature:e.defaultTemperature,currentConversationId:e.currentConversation?.id,...this.j.o.aiAssistantPro.persistOpenState?{isOpen:e.isOpen}:{}})}async closeAssistant(){this.stateManager.isOpen()&&(await this.__loadData(),this.stateManager.close(),this.__closeInContainer())}async addCurrentSelectionToContext(){await this.__loadData();let e=(0,u.getCurrentSelectionContext)(this.j);e&&this.stateManager.addSelectionContext(e)}async executeQuickCommand(e){let t,{quickCommandsSilentMode:i,quickCommandsDisplayMode:o}=this.j.o.aiAssistantPro,n=this.j.o.aiAssistant;if(n&&n[e]&&(0,g.isString)(n[e])&&(t=n[e]),!t)return void this.j.e.fire("error","Command not found: "+e);let r=this.j.s.isCollapsed()?this.j.value:this.j.s.html;if(!r)return;let s=n?.aiCommonPrefixPrompt||"",a=n?.aiCommonSuffixPrompt||"",l=`${s}${t}${a}
|
|
283
283
|
|
|
284
284
|
${r}`.trim();i?await this.__executeQuickCommandSilent(l,r):await this.__executeQuickCommandWithPanel(l,o)}async __executeQuickCommandSilent(e,t){await this.__loadData(),this.j.progressbar.show().progress(100);try{let t=(0,u.createUserMessage)(e),i=(0,u.createNewConversation)(this.j,this.state.defaultModel,this.state.defaultTemperature,[t]),o=await this.apiClient.sendRequest(i.id,i.messages,null,[],i.options);if("final"===o.mode){let e=o.response.content;e&&this.j.s.insertHTML(e)}}catch(e){(0,g.isAbortError)(e)||this.j.e.fire("error",e)}finally{this.j.progressbar.hide()}}async __executeQuickCommandWithPanel(e,t){await this.__loadData();let i=this.stateManager.state.displayMode;this.stateManager.state.displayMode=t;let o=(0,u.getCurrentSelectionContext)(this.j);o&&this.stateManager.addSelectionContext(o),this.stateManager.isOpen()||await this.openAssistant(),await this.sendMessage(e),this.stateManager.state.displayMode=i}async sendMessage(e){await this.__loadData();let t=this.stateManager.getCurrentConversation(),i=this.stateManager.getEditingMessageId();if(i&&t){let e=t.messages.findIndex(e=>e.id===i);if(-1!==e){let i=t.messages.slice(0,e),o={...t,messages:i,updatedAt:Date.now()};this.stateManager.setCurrentConversation(o),await this.storage.save(o),this.stateManager.clearEditingMessage(),t=o}}t||(t=(0,u.createNewConversation)(this.j,this.state.defaultModel,this.state.defaultTemperature),this.stateManager.setCurrentConversation(t));let o=null;e.trim()&&(o=(0,u.createUserMessage)(e),t.title||(t={...t,title:e}),t={...t,updated:Date.now(),messages:[...t.messages,o]}),this.stateManager.setCurrentConversation({...t}),o&&this.j.e.fire("messageSent.ai-assistant-pro",o),this.stateManager.setLoading(!0),this.stateManager.clearError();try{await this.sendRequestToAI(0),this.stateManager.clearSelectionContexts()}catch(e){if((0,g.isAbortError)(e))return;this.stateManager.setError(e instanceof Error?e.message:e+"")}finally{this.stateManager.setLoading(!1)}}async sendRequestToAI(e=0){let t,i,o=this.j.o.aiAssistantPro.maxRecursionToolCallDepth;if(e>=o)throw Error(`Max recursion depth ${o} reached for tool calls`);let n=this.stateManager.getCurrentConversation();if(!n)return;let r=(0,u.findParentMessageId)(n),[s]=await Promise.all([this.apiClient.sendRequest(n.id,n.messages,r,this.stateManager.getSelectionContexts(),n.options),this.storage.save(n)]);if("stream"===s.mode){let e=await (0,u.processStreamingResponse)(this.stateManager,s,n);t=e.aiMessage,i=e.index,n=e.conversation}else{let e=(0,u.processFinalResponse)(s,n);t=e.aiMessage,i=e.index,n=e.conversation}n=await (0,u.processArtifacts)(this.j,t,n,i),this.j.e.fire("messageReceived.ai-assistant-pro",t),this.stateManager.setCurrentConversation({...n}),await this.storage.save(n),await this.handleToolCalls(t.id,e)}async deleteConversation(e){await this.__loadData(),await (0,u.deleteConversationWithCleanup)(this.j,e,this.storage,this.stateManager,this.permissionManager)}async renameConversation(e,t){let i=await this.storage.get(e);if(!i)return;let o={...i,title:t,updated:Date.now()};await this.storage.save(o),this.state.currentConversation?.id===e&&this.stateManager.setCurrentConversation(o);let n=await this.storage.list();this.stateManager.setConversations(n)}async searchConversations(e){await this.__loadData(),await (0,u.handleConversationSearch)(e,this.storage,this.stateManager)}async handleToolCalls(e,t=0){let i=this.stateManager.getCurrentConversation();if(!i)return;let o=i.messages.find(t=>t.id===e);if(!o)return;let n=o.toolCalls;if(!n||0===n.length)return;let r=n.filter(e=>!(0,u.isTerminalToolCallStatus)(e.status));if(0===r.length)return;let{approved:s,needsPermission:a}=this.permissionManager.filterToolCalls(r,i.permissions);for(let i of(this.stateManager.setPendingToolCalls(a),s))await this.executeToolCall(e,i,t)}async executeToolCall(e,t,i=0){let o=this.stateManager.getCurrentConversation();if(!o)return;let n=await (0,u.executeToolCall)(this.j,t,this.toolRegistry),r=o.messages.findIndex(t=>t.id===e);if(-1===r)return;let s=o.messages[r],a=o.messages.slice();a[r]=(0,u.updateToolCallInMessage)(s,n),o={...o,messages:a,updated:Date.now()},this.stateManager.setCurrentConversation(o),(0,u.areAllToolCallsExecuted)(o)&&await this.sendRequestToAI(i+1)}async copyMessage(e){let t=this.stateManager.getCurrentConversation();if(!t)return;let i=t.messages.find(t=>t.id===e);if(i)try{await navigator.clipboard.writeText(i.content),this.j.message.success("Message copied to clipboard")}catch(e){this.j.e.fire("error",Error("Failed to copy message"))}}async restartFromMessage(e){let t=this.stateManager.getCurrentConversation();if(!t)return;let i=t.messages.findIndex(t=>t.id===e);if(-1===i)return;let o=t.messages[i];if("user"!==o.role)return;await this.__loadData();let n=t.messages.slice(0,i),r={...t,messages:n,updatedAt:Date.now()};this.stateManager.setCurrentConversation(r),await this.storage.save(r),await this.sendMessage(o.content)}async editMessage(e){let t=this.stateManager.getCurrentConversation();if(!t)return;let i=t.messages.find(t=>t.id===e);i&&"user"===i.role&&(this.stateManager.setEditingMessageId(e),this.mainPanel.inputArea.setValue(i.content),this.mainPanel.inputArea.focus())}cancelEditMessage(){this.stateManager.isEditingMessage()&&(this.stateManager.clearEditingMessage(),this.mainPanel.inputArea.setValue(""))}async deleteMessage(e){await this.__loadData();let t=this.stateManager.getCurrentConversation();if(!t||-1===t.messages.findIndex(t=>t.id===e))return;let i=t.messages.filter(t=>t.id!==e),o={...t,messages:i,updatedAt:Date.now()};this.stateManager.setCurrentConversation(o),await this.storage.save(o)}beforeDestruct(){this.textAutocompleteSource&&(this.j.e.fire("unregisterAutocompleteSource",this.textAutocompleteSource),this.textAutocompleteSource=null),this.textAutocompleteCache.clear(),this.__closeFlightMode(),(0,f.cached)(this,"toolRegistry")?.destruct(),(0,f.cached)(this,"permissionManager")?.destruct(),(0,f.cached)(this,"apiClient")?.destruct(),(0,f.cached)(this,"stateManager")?.destruct(),(0,f.cached)(this,"mainPanel")?.destruct(),(0,f.cached)(this,"dialog")?.destruct(),(0,f.cached)(this,"storage")?.close?.()}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"aiAssistantPro",group:"insert"},{name:"aiCommandsPro",group:"insert"}]),(0,o._)(this,"textAutocompleteSource",null),(0,o._)(this,"textAutocompleteCache",new Map),(0,o._)(this,"__initedPromise",null),(0,o._)(this,"__openedMode",null)}}(0,o._)(_,"requires",["license","autocomplete"]),(0,n.__decorate)([f.cache],_.prototype,"toolRegistry",null),(0,n.__decorate)([f.cache],_.prototype,"permissionManager",null),(0,n.__decorate)([f.cache],_.prototype,"apiClient",null),(0,n.__decorate)([f.cache],_.prototype,"storage",null),(0,n.__decorate)([f.cache],_.prototype,"stateManager",null),(0,n.__decorate)([f.cache],_.prototype,"mainPanel",null),(0,n.__decorate)([f.cache],_.prototype,"dialog",null),(0,n.__decorate)([(0,f.watch)("state.theme")],_.prototype,"__applyTheme",null),(0,n.__decorate)([(0,f.watch)(":openAIAssistantPro.ai-assistant-pro")],_.prototype,"openAssistant",null),(0,n.__decorate)([(0,f.watch)([":resize","state.panelWidth","state.panelHeight"])],_.prototype,"__onResizeInPanelView",null),(0,n.__decorate)([(0,f.watch)(["state.isOpen","state.displayMode","state.panelWidth","state.panelHeight","state.theme","state.defaultModel","state.defaultTemperature","state.currentConversation"]),(0,f.debounce)()],_.prototype,"__onSavedStateChange",null),(0,n.__decorate)([(0,f.watch)(":closeAIAssistantPro.ai-assistant-pro")],_.prototype,"closeAssistant",null),(0,n.__decorate)([(0,f.watch)(":addContextToAIAssistant.ai-assistant-pro")],_.prototype,"addCurrentSelectionToContext",null),(0,n.__decorate)([(0,f.watch)(":executeQuickCommand.ai-assistant-pro")],_.prototype,"executeQuickCommand",null),(0,n.__decorate)([(0,f.watch)(":sendMessage.ai-assistant-pro")],_.prototype,"sendMessage",null),(0,n.__decorate)([(0,f.watch)(":searchConversations.ai-assistant-pro")],_.prototype,"searchConversations",null),(0,n.__decorate)([(0,f.watch)(":copyMessage.ai-assistant-pro")],_.prototype,"copyMessage",null),(0,n.__decorate)([(0,f.watch)(":restartFromMessage.ai-assistant-pro")],_.prototype,"restartFromMessage",null),(0,n.__decorate)([(0,f.watch)(":editMessage.ai-assistant-pro")],_.prototype,"editMessage",null),(0,n.__decorate)([(0,f.watch)(":cancelEditMessage.ai-assistant-pro")],_.prototype,"cancelEditMessage",null),(0,n.__decorate)([(0,f.watch)(":deleteMessage.ai-assistant-pro")],_.prototype,"deleteMessage",null),_=(0,n.__decorate)([f.component],_),v.JoditPro.plugins.add("aiAssistantPro",_)},66645:function(e,t,i){"use strict";var o=i(47373),n=i(94668),r=i.n(n),s=i(86428),a=i.n(s),l=i(75966),c=i.n(l),d=i(83207),u=i.n(d),h=i(99219),p=i.n(h),f=i(63674),m=i.n(f),g=i(4133),b=i.n(g),v=i(94454),y=i(53835),w=i(6441),_=i(12153),k=i(31974),C=i(72573);_.Icon.set("ai-assistant-pro",a()).set("ai-commands-pro",c()).set("ai-add-context",r()).set("send",p()).set("tool-bolt",b()).set("chevron-right",u()).set("shield",m()),w.Config.prototype.aiAssistantPro={displayMode:"right",panelWidth:400,panelHeight:500,flightPanelHeight:250,dialogFullSize:!1,resizable:!0,apiMode:"incremental",apiRequest:null,maxRetries:3,requestTimeout:3e5,retryDelay:1e3,maxRecursionToolCallDepth:1e3,enabledTools:(0,y.getToolNames)(),customTools:[],toolPermissions:{},autoApproveTools:["readDocument","readBlocks","readSelection","insertHTML","addHTML"],alwaysDenyTools:[],defaultPermissionScope:"conversation",storage:"indexedDB",maxConversations:50,storageKey:"jodit-ai-assistant-pro",showConversationList:!0,enableMarkdown:!0,enableCodeHighlight:!0,maxMessageHeight:400,placeholderText:"Ask AI assistant...",sendShortcut:"Ctrl+Enter",showTimestamps:!0,formatTimestamp(e,t){let i=new Date(e),o=new Date().getTime()-i.getTime();return o<6e4?t("Just now"):o<36e5?t("%dm ago",Math.floor(o/6e4)):o<864e5?t("%dh ago",Math.floor(o/36e5)):i.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})},formatMessageContent:(e,t)=>C.marked.parse(e,{breaks:!0,gfm:!0}),showAvatars:!0,showTypingIndicator:!0,includeSelectionByDefault:!0,maxContextRanges:5,showContextPreview:!0,sendOnEnter:!0,instructions:void 0,includeEditorMetadata:!1,autoOpen:!0,rememberLastConversation:!0,autoFocusInput:!0,voiceInputEnabled:!1,closeAfterInsert:!1,enableSoundNotifications:!1,debug:!1,textAutocompleteEnabled:!1,textAutocompleteApiRequest:null,textAutocompleteMinQueryLength:3,textAutocompleteMaxSuggestions:3,textAutocompleteDebounceMs:500,textAutocompleteCacheTTL:3e4,textAutocompleteCacheMaxSize:50,quickCommandsSilentMode:!1,quickCommandsDisplayMode:"flight",showCopyMessageAction:!0,showRestartMessageAction:!0,showEditMessageAction:!0,showDeleteMessageAction:!0,dialogSettings:{},allowEditDialogSettings:!1,allowEditDisplayMode:!0,allowEditPanelWidth:!0,initiallyOpened:!1,allowClose:!0,persistOpenState:!0,theme:"parent",allowEditTheme:!0,async uploadBase64Artifact(e,t){if("image"===e.type&&e.data&&"base64"===e.data.kind)try{let i=(0,o.base64ToFile)(e.data.base64,e.id,e.mimeType),n=await t.uploader.upload([i]);return{...e,data:{kind:"url",url:n.baseurl+n.files[0]},metadata:{...e.metadata,filename:n.files[0]}}}catch(e){t.e.fire("error",e)}return e},getAIProviderOptions:(e,t)=>(0,v.getAIProviderOptions)(e,t),registerAIProvider(e,t){(0,v.registerAIProvider)(e,t)}},w.Config.prototype.controls.aiAssistantPro={icon:"ai-assistant-pro",tooltip:"AI Assistant",hotkeys:["ctrl+shift+a","cmd+shift+a"],exec(e){e.e.fire("openAIAssistantPro.ai-assistant-pro")},isDisabled:e=>!e.o.aiAssistantPro.apiRequest,getLabel:e=>e.o.aiAssistantPro.apiRequest?"AI Assistant":"AI Assistant (not configured)"},w.Config.prototype.controls.aiAddContext={icon:"ai-add-context",tooltip:"Add to AI Context",exec(e){e.e.fire("addContextToAIAssistant")},isDisabled:e=>!e.o.aiAssistantPro.apiRequest||e.s.isCollapsed()},w.Config.prototype.controls.aiCommandsPro={icon:"ai-commands-pro",tooltip:"AI Commands",isDisabled:e=>!e.o.aiAssistantPro.apiRequest,list:k.aiAssitentCommands,exec(e,t,{control:i}){e.e.fire("executeQuickCommand.ai-assistant-pro",i.name)}};let S=w.Config.prototype.tuneBlock?.popup||{},x={};["p","h1","h2","h3","h4","h5","h6","div","section","article","pre","blockquote","ul","ol","li","table","tr","td","th","img","figure"].forEach(e=>{let t=S[e]||["tune.up","tune.remove","tune.down"];x[e]=[...t,"|","aiAddContext"]}),w.Config.prototype.tuneBlock&&(w.Config.prototype.tuneBlock.popup={...S,...x})},6689:function(e,t,i){"use strict";i.d(t,{throwIfAborted:function(){return n}});var o=i(93661);function n(e){if(e.aborted)throw(0,o.abort)()}},61872:function(e,t,i){"use strict";i.d(t,{processArtifacts:function(){return s},processFinalResponse:function(){return r},processStreamingResponse:function(){return n}});var o=i(61558);async function n(e,t,i){let n=(0,o.createAIMessage)(),r=-1;for await(let s of t.stream){switch(s.type){case"created":n={...n,id:s.response.responseId,content:""},r=i.messages.length;break;case"text-delta":n={...n,content:n.content+s.delta};break;case"completed":n={...n,id:s.response.responseId,toolCalls:s.response.toolCalls||[],artifacts:s.response.artifacts||[]};break;case"error":{let e=(0,o.createErrorMessage)(s.error);n={...n,id:e.id,content:e.content}}}if(n.id){let t=i.messages.slice();t[r>=0?r:i.messages.length]=n,i={...i,messages:t,updated:Date.now()},e.setCurrentConversation(i)}}return{aiMessage:n,index:r,conversation:i}}function r(e,t){let i={...(0,o.createAIMessage)(),id:e.response.responseId,content:e.response.content,toolCalls:e.response.toolCalls||[],artifacts:e.response.artifacts||[]},n=t.messages.slice();return n.push(i),{aiMessage:i,index:(t={...t,messages:n,updated:Date.now()}).messages.length-1,conversation:t}}async function s(e,t,i,n){if(t.artifacts&&t.artifacts.length>0){let r=i.messages.slice();return r[n]={...r[n],artifacts:await (0,o.uploadArtifacts)(e,t.artifacts)},{...i,messages:r,updated:Date.now()}}return i}},49459:function(e,t,i){"use strict";function o(e,t,i={}){let n=e[t];if("string"!=typeof n||!i.allowEmpty&&""===n)throw Error(`Parameter "${t}" is required and must be a${i.allowEmpty?"":" non-empty"} string`);return n}i.d(t,{requireString:function(){return o}})},44526:function(e,t,i){"use strict";i.d(t,{resolveBlock:function(){return n}});var o=i(22732);function n(e,{selector:t,index:i,requireExactlyOne:r=!1}={}){let s=null!=t&&""!==t.trim(),a=null!=i;if(r&&s===a)throw Error("Either index or selector must be provided, but not both");if(!s&&!a)throw Error("Block identifier is required");if(s){if("string"!=typeof t)throw Error("Selector must be a string");let i=e.editor.querySelector(t);if(!i)throw Error(`No element found matching selector "${t}"`);if(!o.Dom.isElement(i))throw Error(`Selector "${t}" does not point to an element node`);return{element:i,identifier:`with selector "${t}"`}}if("number"!=typeof i)throw Error("Block index must be a number");let l=Array.from(e.editor.children);if(i<0||i>=l.length)throw Error(`Block index ${i} is out of range. Document has ${l.length} blocks`);let c=l[i];if(!o.Dom.isElement(c))throw Error(`Block at index ${i} is not a valid element`);return{element:c,identifier:"at index "+i}}},70308:function(e,t,i){"use strict";i.d(t,{areAllToolCallsExecuted:function(){return c},createNewConversation:function(){return n},findMessagesWithPendingToolCalls:function(){return d},findParentMessageId:function(){return s},isTerminalToolCallStatus:function(){return l}});var o=i(21064);function n(e,t,i,r=[]){let s=e.o.aiAssistantPro,a={id:(0,o.generateConversationId)(),created:Date.now(),updated:Date.now(),messages:r,permissions:[],options:{model:t??s.defaultModel,temperature:i??s.defaultTemperature}};return e.e.fire("conversationCreated.ai-assistant-pro",a),a}let r=["error_","stream_"];function s(e){for(let t=e.messages.length-1;t>=0;t--){let i=e.messages[t];if("assistant"===i.role&&function(e){return!r.some(t=>e.startsWith(t))}(i.id))return i.id}return null}let a=new Set(["executed","denied","error"]);function l(e){return a.has(e)}function c(e){let t=e.messages[e.messages.length-1];return!!t?.toolCalls&&t.toolCalls.every(e=>l(e.status))}function d(e){return e.messages.filter(e=>e.toolCalls&&e.toolCalls.length>0&&e.toolCalls.some(e=>!l(e.status)))}},473:function(e,t,i){"use strict";i.d(t,{handleBackToList:function(){return l},handleConversationSearch:function(){return c},handleConversationSelect:function(){return a},handleToolApproval:function(){return r},handleToolDenial:function(){return s}});var o=i(79078),n=i(82758);async function r(e,t,i,o,n){let r=i.getPendingToolCalls().find(t=>t.id===e);if(!r)return null;let s=o.grantPermission(r.name,t),a=i.getCurrentConversation();return a&&(a.permissions.push(s),await n.save(a)),i.removePendingToolCall(e),{...r,status:"approved"}}async function s(e,t,i,n){let r=i.getPendingToolCalls().find(e=>e.id===t);if(!r)return;let s=i.getCurrentConversation();if(!s)return;let a=s.messages.findIndex(e=>e.toolCalls?.find(e=>e.id===t));if(-1===a)return;let l=s.messages[a],c={...r,result:{error:"Tool call denied by user."},status:"denied"},d=(0,o.updateToolCallInMessage)(l,c),u=[...s.messages];u[a]=d,s={...s,messages:u,updated:Date.now()},i.setCurrentConversation(s),await n.save(s),e.e.fire("toolCallDenied.ai-assistant-pro",r),i.removePendingToolCall(t)}async function a(e,t,i){try{i.setLoading(!0);let o=await t.get(e);if(!o)throw Error("Conversation not found: "+e);i.setCurrentConversation({...o})}catch(e){n.IS_PROD}finally{i.setLoading(!1)}}async function l(e,t){t.setView("conversationList");try{t.setLoading(!0);let i=await e.list().catch(()=>[]);t.setConversations(i)}finally{t.setLoading(!1)}}async function c(e,t,i){i.setLoading(!0);try{let o=await t.list(e||void 0);i.setConversations(o),i.setView("conversationList")}finally{i.setLoading(!1)}}},58579:function(e,t,i){"use strict";i.d(t,{applyTheme:function(){return d.applyTheme},areAllToolCallsExecuted:function(){return n.areAllToolCallsExecuted},createNewConversation:function(){return n.createNewConversation},createUserMessage:function(){return s.createUserMessage},deleteConversationWithCleanup:function(){return c.deleteConversationWithCleanup},executeToolCall:function(){return u.executeToolCall},findMessagesWithPendingToolCalls:function(){return n.findMessagesWithPendingToolCalls},findParentMessageId:function(){return n.findParentMessageId},getCurrentSelectionContext:function(){return l.getCurrentSelectionContext},handleBackToList:function(){return r.handleBackToList},handleConversationSearch:function(){return r.handleConversationSearch},handleConversationSelect:function(){return r.handleConversationSelect},handleToolApproval:function(){return r.handleToolApproval},handleToolDenial:function(){return r.handleToolDenial},invertMode:function(){return a.invertMode},isTerminalToolCallStatus:function(){return n.isTerminalToolCallStatus},loadInitialData:function(){return c.loadInitialData},processArtifacts:function(){return o.processArtifacts},processFinalResponse:function(){return o.processFinalResponse},processStreamingResponse:function(){return o.processStreamingResponse},resizeInPanelView:function(){return a.resizeInPanelView},updateToolCallInMessage:function(){return u.updateToolCallInMessage}});var o=i(61872),n=i(70308),r=i(473),s=i(61558),a=i(71050),l=i(15927),c=i(56110),d=i(53014),u=i(79078)},61558:function(e,t,i){"use strict";i.d(t,{createAIMessage:function(){return r},createErrorMessage:function(){return s},createUserMessage:function(){return n},uploadArtifacts:function(){return a}});var o=i(21064);function n(e){return{id:(0,o.generateMessageId)(),role:"user",content:e,timestamp:Date.now()}}function r(){return{id:"",role:"assistant",content:"",artifacts:[],timestamp:Date.now(),toolCalls:[]}}function s(e){return{id:"error_"+(0,o.generateMessageId)(),role:"assistant",content:"❌ Error: "+e.message,timestamp:Date.now(),toolCalls:[],artifacts:[]}}async function a(e,t){if(!t||0===t.length)return t;let i=e.o.aiAssistantPro.uploadBase64Artifact;return i?Promise.all(t.map(async t=>i(t,e)??t)):t}},71050:function(e,t,i){"use strict";i.d(t,{invertMode:function(){return n},resizeInPanelView:function(){return r}});var o=i(41180);function n(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top"}}function r(e,t,i,r){if("dialog"===t||"flight"===t)return;("left"===t||"right"===t)&&(e.currentPlace.slots[n(t)]?.style.setProperty(`--jd-slot-${n(t)}-width`,"auto"),e.currentPlace.slots[t]?.style.setProperty(`--jd-slot-${t}-width`,`${i}px`));let s=(0,o.css)(e.currentPlace.workplace,"height")??0;e.currentPlace.slots[t]?.style.setProperty("min-height",`${Math.min(s,r)}px`)}},85696:function(e,t,i){"use strict";function o(e,t){let i=e.createInside.div();return i.innerHTML=t,n(e,i),i}function n(e,t){e.e.fire("safeHTML",t)}i.d(t,{createSanitizedContainer:function(){return o},sanitizeElement:function(){return n}})},15927:function(e,t,i){"use strict";function o(e){if(e.s.isCollapsed())return null;let t=e.s.html,i=e.s.range;return{html:t,rangeInfo:{startContainer:i.startContainer.nodeName,startOffset:i.startOffset,endContainer:i.endContainer.nodeName,endOffset:i.endOffset}}}i.d(t,{getCurrentSelectionContext:function(){return o}})},56110:function(e,t,i){"use strict";i.d(t,{deleteConversationWithCleanup:function(){return n},loadInitialData:function(){return r}});var o=i(82758);async function n(e,t,i,o,n){try{o.setLoading(!0),await i.delete(t),o.removeConversation(t),n.clearConversationPermissions(t);let r=o.getCurrentConversation();r?.id===t&&o.setCurrentConversation(null);let s=await i.list();o.setConversations(s),o.setView(0===s.length?"welcome":"conversationList"),e.e.fire("conversationDeleted.ai-assistant-pro",t)}catch(t){e.alert(e.i18n("Failed to delete conversation")+": "+(t?.message||"Unknown error"))}finally{o.setLoading(!1)}}async function r(e,t,i){i.setLoading(!0);try{let[o,n]=await Promise.all([t.list().catch(()=>[]),t.getGlobalSettings().catch(()=>null)]);if(i.setConversations(o),n&&i.setSavedState(n),0===o.length)i.setView("welcome");else if(e.o.aiAssistantPro.rememberLastConversation&&n?.currentConversationId){let e=o.find(e=>e.id===n.currentConversationId)??o[0],r=await t.get(e.id);r?i.setCurrentConversation(r):i.setView("conversationList")}else i.setView("conversationList")}catch(e){o.IS_PROD,i.setView("welcome")}finally{i.setLoading(!1)}}},53014:function(e,t,i){"use strict";i.d(t,{applyTheme:function(){return r}});let o=["jodit_theme_dark","jodit-ai-assistant-pro_theme_dark","jodit-dialog_theme_dark"],n=["jodit_theme_light","jodit-ai-assistant-pro_theme_light","jodit-dialog_theme_light"];function r(e,t,i,r,s){let a;if(r?.classList.remove(...o),r?.classList.remove(...n),"dialog"===i){let e=s?.container;e?.classList.remove(...o),e?.classList.remove(...n)}if(a="dark"===t?o:n,r?.classList.add(...a),"dialog"===i){let e=s?.container;e?.classList.add(...a)}}},79078:function(e,t,i){"use strict";async function o(e,t,i){let o;try{let e=new AbortController().signal,n=await i.executeTool(t.name,t.arguments,e);o={...t,result:{result:n},status:"executed"}}catch(i){o={...t,result:{error:i instanceof Error?i.message:i+""},status:"error"},e.e.fire("toolCallFailed.ai-assistant-pro",o)}return e.e.fire("toolCallExecuted.ai-assistant-pro",o,{toolCallId:o.id,result:o.result}),o}function n(e,t){let i=e.toolCalls?.findIndex(e=>e.id===t.id);if(null==i||-1===i)return e;let o=[...e?.toolCalls??[]];return o[i]=t,{...e,toolCalls:o}}i.d(t,{executeToolCall:function(){return o},updateToolCallInMessage:function(){return n}})},86449:function(e,t,i){"use strict";i.d(t,{APIClient:function(){return s}});var o=i(82749),n=i(82758),r=i(21537);class s{async sendRequest(e,t,i,o,s){let{apiRequest:a,requestTimeout:l,maxRetries:c}=this.jodit.o.aiAssistantPro;if(!a)throw Error("AI Assistant Pro callback is not configured");let d=new AbortController;this.abortControllers.add(d);try{let u=this.buildRequestContext(e,t,i,o,s),h=null;for(let e=0;c>=e;e++)try{if(d.signal.aborted)throw(0,r.abort)();let e=setTimeout(()=>{d.abort()},l);try{let t=await a(u,d.signal);return clearTimeout(e),this.validateResponse(t),t}catch(t){throw clearTimeout(e),t}}catch(t){if(h=t,n.IS_PROD,c>e){let t=this.calculateRetryDelay(e);await this.sleep(t)}else throw t}throw h||Error("API request failed after all retries")}finally{this.abortControllers.delete(d)}}abort(){this.abortControllers.forEach(e=>{e.abort()}),this.abortControllers.clear()}isInProgress(){return this.abortControllers.size>0}buildRequestContext(e,t,i,o,n){let r,{apiMode:s,instructions:a}=this.jodit.o.aiAssistantPro,l={mode:s,conversationId:e,tools:this.toolRegistry.getAllTools(),selectionContexts:o,conversationOptions:n,instructions:a};if("full"===s)r=t;else if(i){let e=t.findIndex(e=>e.id===i);r=-1!==e?t.slice(e+1):t,l={...l,parentMessageId:i}}else r=t;return{...l,messages:this.expandToolMessages(r,t.find(e=>e.id===i))}}expandToolMessages(e,t){let i=[];for(let t of e)i.push(t),this.expandToolResultsMessage(t,i);return t&&this.expandToolResultsMessage(t,i),i}expandToolResultsMessage(e,t){if(e.toolCalls&&e.toolCalls.length>0)for(let i of e.toolCalls){let o=i.result??{error:"result not found"};if(t.find(e=>e.id===`${i.id}-result`))continue;let n={id:`${i.id}-result`,role:"tool",content:o.error?"Error: "+o.error:JSON.stringify(o.result),timestamp:e.timestamp,toolResults:[{toolCallId:i.id,result:o}]};t.push(n)}}validateResponse(e){if("final"!==e.mode)return;let t=e.response;if(!t)throw Error("API returned empty response");if(!t.responseId)throw Error("API response missing responseId");if(void 0===t.content)throw Error("API response missing content");if(void 0===t.finished)throw Error("API response missing finished flag");if(t.toolCalls){if(!Array.isArray(t.toolCalls))throw Error("API response toolCalls must be an array");t.toolCalls.forEach((e,t)=>{if(!e.id)throw Error(`Tool call at index ${t} is missing id`);if(!e.name)throw Error(`Tool call at index ${t} is missing name`);if(!e.arguments||"object"!=typeof e.arguments)throw Error(`Tool call at index ${t} has invalid arguments`)})}}calculateRetryDelay(e){let{retryDelay:t}=this.jodit.o.aiAssistantPro;return t*Math.pow(2,e)+Math.random()*t}sleep(e){return new Promise(t=>setTimeout(t,e))}destruct(){this.abort()}constructor(e,t){(0,o._)(this,"jodit",void 0),(0,o._)(this,"toolRegistry",void 0),(0,o._)(this,"abortControllers",void 0),this.jodit=e,this.toolRegistry=t,this.abortControllers=new Set}}},47373:function(e,t,i){"use strict";function o(e,t,i="image/png"){let n=atob(e),r=n.length,s=new Uint8Array(r);for(let e=0;r>e;e++)s[e]=n.charCodeAt(e);return new File([new Blob([s],{type:i})],t,{type:i})}i.d(t,{base64ToFile:function(){return o}})},21020:function(e,t,i){"use strict";i.d(t,{PermissionManager:function(){return n}});var o=i(82749);class n{requiresPermission(e){let{autoApproveTools:t,alwaysDenyTools:i}=this.jodit.o.aiAssistantPro;if(i.includes(e))return!0;if(t.includes(e))return!1;let o=this.toolRegistry.getTool(e);return!o||o.requiresPermission}isAutoDenied(e){let{alwaysDenyTools:t}=this.jodit.o.aiAssistantPro;return t.includes(e)}isAutoApproved(e){let{autoApproveTools:t}=this.jodit.o.aiAssistantPro;return t.includes(e)}checkPermission(e,t){if(this.isAutoApproved(e))return{toolName:e,granted:!0,grantedAt:Date.now(),scope:"once"};if(this.isAutoDenied(e))return null;let i=this.permanentPermissions.get(e);return i&&i.granted?i:t.find(t=>t.toolName===e&&t.granted)||null}grantPermission(e,t){let i={toolName:e,granted:!0,grantedAt:Date.now(),scope:t};return"forever"===t&&(this.permanentPermissions.set(e,i),this.savePermanentPermissions()),i}denyPermission(e){return{toolName:e,granted:!1,grantedAt:Date.now(),scope:"once"}}filterToolCalls(e,t){let i=[],o=[],n=[];for(let r of e){if(this.isAutoDenied(r.name)){n.push({...r,status:"denied"});continue}if(this.isAutoApproved(r.name)){i.push({...r,status:"approved"});continue}let e=this.checkPermission(r.name,t);e&&e.granted?i.push({...r,status:"approved"}):this.requiresPermission(r.name)?(this.jodit.e.fire("permissionRequested.ai-assistant-pro",r.name),o.push({...r,status:"pending"})):i.push({...r,status:"approved"})}return{approved:i,needsPermission:o,denied:n}}clearConversationPermissions(e){}loadPermanentPermissions(){try{let e=localStorage.getItem(this.PERMANENT_PERMISSIONS_KEY);e&&JSON.parse(e).forEach(e=>{"forever"===e.scope&&e.granted&&this.permanentPermissions.set(e.toolName,e)})}catch(e){}}savePermanentPermissions(){try{let e=Array.from(this.permanentPermissions.values());localStorage.setItem(this.PERMANENT_PERMISSIONS_KEY,JSON.stringify(e))}catch(e){}}clearPermanentPermissions(){this.permanentPermissions.clear(),localStorage.removeItem(this.PERMANENT_PERMISSIONS_KEY)}getPermanentPermissions(){return Array.from(this.permanentPermissions.values())}revokePermanentPermission(e){this.permanentPermissions.delete(e),this.savePermanentPermissions()}destruct(){this.permanentPermissions.clear()}constructor(e,t){(0,o._)(this,"jodit",void 0),(0,o._)(this,"toolRegistry",void 0),(0,o._)(this,"permanentPermissions",void 0),(0,o._)(this,"PERMANENT_PERMISSIONS_KEY",void 0),this.jodit=e,this.toolRegistry=t,this.permanentPermissions=new Map,this.PERMANENT_PERMISSIONS_KEY="jodit-permissions.ai-assistant-pro",this.loadPermanentPermissions()}}},46166:function(e,t,i){"use strict";i.d(t,{StateManager:function(){return n}});var o=i(82749);class n{createInitialState(){return{isOpen:!1,currentView:"welcome",currentConversation:null,conversations:[],isLoading:!1,error:null,pendingToolCalls:[],selectionContexts:[],abortController:null,editingMessageId:null,theme:this.jodit.o.aiAssistantPro.theme||"parent",displayMode:this.jodit.o.aiAssistantPro.displayMode,panelWidth:this.jodit.o.aiAssistantPro.panelWidth,panelHeight:this.jodit.o.aiAssistantPro.panelHeight,defaultModel:this.jodit.o.aiAssistantPro.defaultModel,defaultTemperature:this.jodit.o.aiAssistantPro.defaultTemperature}}open(){this.state.isOpen=!0,this.jodit.e.fire("open.ai-assistant-pro",this.state.currentConversation)}close(){this.state.isOpen=!1,this.jodit.e.fire("close.ai-assistant-pro")}isOpen(){return this.state.isOpen}setView(e){this.state.currentView=e,this.jodit.e.fire("viewChanged.ai-assistant-pro",e)}getView(){return this.state.currentView}setConversations(e){this.state.conversations=e}setSavedState(e){e.theme&&(this.state.theme=e.theme),e.displayMode&&(this.state.displayMode=e.displayMode),e.panelWidth&&(this.state.panelWidth=e.panelWidth),e.panelHeight&&(this.state.panelHeight=e.panelHeight),e.defaultModel&&(this.state.defaultModel=e.defaultModel),e.defaultTemperature&&(this.state.defaultTemperature=e.defaultTemperature)}getConversations(){return this.state.conversations}setCurrentConversation(e){if(this.state.currentConversation===e)throw Error("Conversation is already current");this.state.currentConversation=e||null,e&&(this.setView("conversation"),this.jodit.e.fire("conversationSwitched.ai-assistant-pro",e))}getCurrentConversation(){return this.state.currentConversation}removeConversation(e){let t=this.state.conversations.filter(t=>t.id!==e);this.setConversations(t)}setLoading(e){this.state.isLoading=e}isLoading(){return this.state.isLoading}setError(e){this.state.error=e,e&&this.jodit.e.fire("error.ai-assistant-pro",Error(e))}getError(){return this.state.error}clearError(){this.setError(null)}setPendingToolCalls(e){this.state.pendingToolCalls=e}getPendingToolCalls(){return this.state.pendingToolCalls}addPendingToolCall(e){let t=[...this.state.pendingToolCalls,e];this.setPendingToolCalls(t)}removePendingToolCall(e){let t=this.state.pendingToolCalls.filter(t=>t.id!==e);this.setPendingToolCalls(t)}updateToolCallStatus(e,t){let i=this.state.pendingToolCalls.map(i=>i.id===e?{...i,status:t}:i);this.setPendingToolCalls(i)}setSelectionContexts(e){this.state.selectionContexts=e}getSelectionContexts(){return this.state.selectionContexts}addSelectionContext(e){let{maxContextRanges:t}=this.jodit.o.aiAssistantPro,i=[...this.state.selectionContexts,e];i.length>t&&(i=i.slice(-t)),this.setSelectionContexts(i),this.jodit.e.fire("contextAdded.ai-assistant-pro",e)}removeSelectionContext(e){let t=this.state.selectionContexts.filter((t,i)=>i!==e);this.setSelectionContexts(t),this.jodit.e.fire("contextRemoved.ai-assistant-pro",e)}clearSelectionContexts(){this.setSelectionContexts([])}setAbortController(e){this.state.abortController=e}getAbortController(){return this.state.abortController}setEditingMessageId(e){this.state.editingMessageId=e}getEditingMessageId(){return this.state.editingMessageId}isEditingMessage(){return null!=this.state.editingMessageId}clearEditingMessage(){this.setEditingMessageId(null)}reset(){this.state=this.createInitialState()}destruct(){this.state.abortController&&this.state.abortController.abort(),this.reset()}constructor(e){(0,o._)(this,"jodit",void 0),(0,o._)(this,"state",void 0),this.jodit=e,this.state=this.createInitialState()}}},62895:function(e,t,i){"use strict";i.d(t,{WebStorageConversationStorage:function(){return o.WebStorageConversationStorage},createStorageProvider:function(){return o.createStorageProvider}});var o=i(21064)},21064:function(e,t,i){"use strict";i.d(t,{WebStorageConversationStorage:function(){return r},createStorageProvider:function(){return s},generateConversationId:function(){return a},generateMessageId:function(){return l}});var o=i(82749),n=i(97333);class r{close(){return this.storage.close()}getConversationKey(e){return"conv:"+e}async getAllKeys(){let e=await this.storage.get("__conversation_index__");return e&&Array.isArray(e)?e:[]}async updateIndex(e){await this.storage.set("__conversation_index__",e)}async addToIndex(e){let t=await this.getAllKeys();t.includes(e)||(t.push(e),await this.updateIndex(t))}async removeFromIndex(e){let t=(await this.getAllKeys()).filter(t=>t!==e);await this.updateIndex(t)}async list(e){try{let t=await this.getAllKeys(),i=[],o=e?.toLowerCase().trim();for(let e of t){let t=await this.get(e);if(t){if(o){let e=t.title?.toLowerCase().includes(o),i=!e&&t.messages.some(e=>e.content.toLowerCase().includes(o));if(!e&&!i)continue}i.push({id:t.id,title:t.title??"",created:t.created,updated:t.updated,messageCount:t.messages.length})}}return i.sort((e,t)=>t.updated-e.updated),i}catch(e){return[]}}async get(e){try{let t=this.getConversationKey(e);return await this.storage.get(t)||null}catch(e){return null}}async save(e){try{if(0===e.messages.length)throw Error("Conversation must have at least one message.");let t=await this.getAllKeys();t.length>=this.maxConversations&&!t.includes(e.id)&&await this.evictOldest();let i=this.getConversationKey(e.id);await this.storage.set(i,e),await this.addToIndex(e.id)}catch(t){if(t?.name==="QuotaExceededError"||t?.code===22||t?.code===1014){await this.evictOldest();try{let t=this.getConversationKey(e.id);await this.storage.set(t,e),await this.addToIndex(e.id)}catch{throw Error("Storage quota exceeded. Please delete some conversations.")}}else throw Error("Failed to save conversation: "+(t?.message||"Unknown error"))}}async delete(e){try{let t=this.getConversationKey(e);await this.storage.delete(t),await this.removeFromIndex(e)}catch(e){}}async clear(){try{for(let e of(await this.getAllKeys())){let t=this.getConversationKey(e);await this.storage.delete(t)}await this.updateIndex([])}catch(e){}}async evictOldest(){try{let e=await this.list();if(0===e.length)return;e.sort((e,t)=>e.updated-t.updated);let t=e[0];await this.delete(t.id)}catch(e){}}async getGlobalSettings(){try{return await this.storage.get("global-settings")||null}catch(e){return null}}async saveGlobalSettings(e){try{let t={...await this.getGlobalSettings(),...e};await this.storage.set("global-settings",t)}catch{throw Error("Failed to save global settings")}}constructor(e,t){(0,o._)(this,"storage",void 0),(0,o._)(this,"maxConversations",void 0),this.storage=e,this.maxConversations=t}}function s(e,t){return n.AsyncStorage.makeStorage(e,t)}function a(){return`conv_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}function l(){return`msg_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}},55487:function(e,t,i){"use strict";i.d(t,{ToolRegistry:function(){return r}});var o=i(82749),n=i(53835);class r{registerBuiltInTools(e){e.forEach(e=>{let t=n.BUILT_IN_TOOLS[e];t&&this.tools.set(e,t)})}registerCustomTools(e){e.forEach(e=>{this.validateToolDefinition(e),this.tools.set(e.name,e)})}validateToolDefinition(e){if(!e.name||"string"!=typeof e.name)throw Error("Tool must have a valid name");if(!e.description||"string"!=typeof e.description)throw Error(`Tool "${e.name}" must have a description`);if(!Array.isArray(e.parameters))throw Error(`Tool "${e.name}" must have a parameters array`);if("function"!=typeof e.execute)throw Error(`Tool "${e.name}" must have an execute function`);e.parameters.forEach(t=>{if(!t.name||"string"!=typeof t.name)throw Error(`Tool "${e.name}" has a parameter without a valid name`);if(!t.type)throw Error(`Tool "${e.name}" parameter "${t.name}" must have a type`);if("boolean"!=typeof t.required)throw Error(`Tool "${e.name}" parameter "${t.name}" must specify if it's required`)})}getAllTools(){return Array.from(this.tools.values())}getTool(e){return this.tools.get(e)}hasTool(e){return this.tools.has(e)}getToolNames(){return Array.from(this.tools.keys())}async executeTool(e,t,i){let o=this.getTool(e);if(!o)throw Error(`Tool "${e}" not found`);let n=this.applyDefaults(o,t);this.validateArguments(o,n);try{return await o.execute(this.jodit,n,i)}catch(e){if(e?.name==="AbortError"||i.aborted)throw Error("Tool execution was aborted");throw e}}validateArguments(e,t){let i=Object.keys(t);for(let t of e.parameters.filter(e=>e.required).map(e=>e.name))if(!i.includes(t))throw Error(`Tool "${e.name}" requires parameter "${t}"`);for(let[i,o]of Object.entries(t)){let t=e.parameters.find(e=>e.name===i);if(!t){this.jodit.o.aiAssistantPro.debug;continue}let n=Array.isArray(o)?"array":"object"==typeof o&&null!=o?"object":typeof o;if(t.type!==n&&!("number"===t.type&&"string"===n&&!isNaN(Number(o))))throw Error(`Tool "${e.name}" parameter "${i}" expects type "${t.type}" but got "${n}"`);if(t.enum&&t.enum.length>0&&!t.enum.includes(o))throw Error(`Tool "${e.name}" parameter "${i}" must be one of: ${t.enum.join(", ")}`)}}applyDefaults(e,t){let i={...t};for(let t of e.parameters)void 0===i[t.name]&&void 0!==t.default&&(i[t.name]=t.default);return i}destruct(){this.tools.clear()}constructor(e){(0,o._)(this,"jodit",void 0),(0,o._)(this,"tools",void 0),this.jodit=e,this.tools=new Map,this.registerBuiltInTools(e.o.aiAssistantPro.enabledTools||[]),this.registerCustomTools(e.o.aiAssistantPro.customTools||[])}}},26612:function(e){e.exports={"AI Assistant":"AI Assistant","AI Assistant Pro":"AI Assistant Pro","Welcome to AI Assistant":"Welcome to AI Assistant","Start your first conversation":"Start your first conversation","Tip: Select text in editor to add context":"Tip: Select text in editor to add context","New Chat":"New Chat","Search conversations...":"Search conversations...","No conversations yet":"No conversations yet","Ask me anything...":"Ask me anything...","Ask a follow-up...":"Ask a follow-up...","Reply...":"Reply...","Type your message...":"Type your message...",Send:"Send",Cancel:"Cancel",Retry:"Retry",Insert:"Insert",Copy:"Copy",Edit:"Edit",Delete:"Delete",New:"New",Back:"Back","Permission Required":"Permission Required",Approve:"Approve",Deny:"Deny",Once:"Once","This conversation":"This conversation",Always:"Always","The AI wants to execute:":"The AI wants to execute:","This will modify your document content.":"This will modify your document content.","Executing...":"Executing...","Completed successfully":"Completed successfully",Failed:"Failed","Pending approval":"Pending approval","Denied by user":"Denied by user","Tool Result":"Tool Result","Tool Execution Error":"Tool Execution Error",Context:"Context",Contexts:"Contexts","Add to AI Context":"Add to AI Context",Remove:"Remove","Clear all":"Clear all","An error occurred":"An error occurred","Request failed":"Request failed","Connection error":"Connection error","AI Assistant is not configured":"AI Assistant is not configured","Thinking...":"Thinking...","Generating response...":"Generating response...",insertHTML:"Insert HTML",readDocument:"Read Document",readBlock:"Read Block",replaceInDocument:"Replace in Document",replaceInBlock:"Replace in Block",getSelection:"Get Selection","Just now":"Just now",Conversation:"Conversation","New Conversation":"New Conversation",Yesterday:"Yesterday","Delete conversation":"Delete conversation","Are you sure you want to delete this conversation?":"Are you sure you want to delete this conversation?","Failed to delete conversation":"Failed to delete conversation"}},63805:function(e,t,i){"use strict";i.r(t),i.d(t,{en:function(){return o},ru:function(){return n}});var o=i(26612),n=i(55790)},55790:function(e){e.exports={"AI Assistant":"AI Ассистент","AI Assistant Pro":"AI Ассистент Pro","Welcome to AI Assistant":"Добро пожаловать в AI Ассистент","Start your first conversation":"Начните первый диалог","Tip: Select text in editor to add context":"Подсказка: Выделите текст в редакторе для добавления контекста","New chat":"Новый чат","Search conversations...":"Поиск диалогов...","No conversations yet":"Пока нет диалогов","Ask me anything...":"Спросите меня о чем угодно...","Ask a follow-up...":"Задайте дополнительный вопрос...","Reply...":"Ответить...","Type your message...":"Введите ваше сообщение...",Send:"Отправить",Cancel:"Отмена",Retry:"Повторить",Insert:"Вставить",Copy:"Копировать",Edit:"Редактировать",Delete:"Удалить",New:"Новый",Back:"Назад","Permission Required":"Требуется разрешение",Approve:"Разрешить",Deny:"Отклонить",Once:"Один раз","This conversation":"Этот диалог",Always:"Всегда","The AI wants to execute:":"AI хочет выполнить:","This will modify your document content.":"Это изменит содержимое вашего документа.","Executing...":"Выполняется...","Completed successfully":"Успешно выполнено",Failed:"Ошибка","Pending approval":"Ожидает разрешения","Denied by user":"Отклонено пользователем","Tool Result":"Результат инструмента","Tool Execution Error":"Ошибка выполнения инструмента",Context:"Контекст",Contexts:"Контексты","Add to AI Context":"Добавить в контекст AI",Remove:"Удалить","Clear all":"Очистить все","An error occurred":"Произошла ошибка","Request failed":"Запрос не выполнен","Connection error":"Ошибка соединения","AI Assistant is not configured":"AI Ассистент не настроен","Thinking...":"Думаю...","Generating response...":"Генерирую ответ...",insertHTML:"Вставить HTML",readDocument:"Прочитать документ",readBlock:"Прочитать блок",replaceInDocument:"Заменить в документе",replaceInBlock:"Заменить в блоке",getSelection:"Получить выделение","Just now":"Только что",Conversation:"Диалог","New Conversation":"Новый диалог",Yesterday:"Вчера","Delete conversation":"Удалить диалог","Are you sure you want to delete this conversation?":"Вы уверены, что хотите удалить этот диалог?","Failed to delete conversation":"Не удалось удалить диалог",Settings:"Настройки","General Settings":"Общие настройки","Conversation Settings":"Настройки диалога","Display Mode":"Режим отображения","Panel Width":"Ширина панели",Theme:"Тема",Model:"Модель",Temperature:"Температура",Close:"Закрыть",Dialog:"Модальное окно",Left:"Левая панель",Right:"Правая панель",Top:"Верхняя панель",Bottom:"Нижняя панель",Inherit:"Наследовать от редактора",Light:"Светлая тема",Dark:"Тёмная тема","%dm ago":"%dм назад","%dh ago":"%dч назад"}},94454:function(e,t,i){"use strict";i.d(t,{getAIProviderOptions:function(){return o.getAIProviderOptions},registerAIProvider:function(){return o.registerAIProvider}}),i(82923);var o=i(58211)},82923:function(e,t,i){"use strict";var o=i(58211),n=i(54079);(0,o.registerAIProvider)("jodit-ai-adapter",e=>{let t=e.url.replace(/\/+$/,""),i=e.provider??"openai",o=!1!==e.stream;return{apiMode:"incremental",maxRetries:0,voiceInputEnabled:!0,voiceInputUrl:`${t.replace(/^http/,"ws")}/v1/ai/transcribe`,voiceInputApiKey:e.apiKey,textAutocompleteEnabled:!0,async textAutocompleteApiRequest(o,r,s){let a=new n.Ajax({url:`${t}/ai/autocomplete?query=${encodeURIComponent(o)}&key=${encodeURIComponent(e.apiKey)}`,method:"POST",contentType:"application/json",data:{provider:i,context:{maxSuggestions:r}}});s.addEventListener("abort",()=>a.abort(),{once:!0});let l=await a.send(),c=await l.json();return c.success&&c.result?.suggestions?c.result.suggestions:[]},async apiRequest(r,s){let a=new n.Ajax({url:`${t}/ai/request?key=${encodeURIComponent(e.apiKey)}`,method:"POST",contentType:"application/json",data:{provider:i,context:o?{...r,metadata:{...r.metadata,stream:!0}}:r}});if(s&&s.addEventListener("abort",()=>a.abort(),{once:!0}),!o){let e=await a.send();return{mode:"final",response:(await e.json()).result}}let l=a.stream();return{mode:"stream",stream:async function*(){for await(let e of l)yield JSON.parse(e)}()}}}})},58211:function(e,t,i){"use strict";i.d(t,{getAIProviderOptions:function(){return n},registerAIProvider:function(){return r}});let o=new Map;function n(e,t){let i=o.get(e);if(!i)throw Error(`AI provider "${e}" is not registered. Available providers: `+[...o.keys()].join(", "));return i(t)}function r(e,t){o.set(e,t)}},65374:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Add HTML content to the beginning or end of the document","name",0,"addHTML","parameters",0,[{name:"html",type:"string",description:"HTML content to add",required:!0},{name:"position",type:"string",description:'Where to add: "start" adds at the beginning of the document, "end" appends to the end',required:!1,default:"end"}],"requiresPermission",0,!0])},686:function(e,t,i){"use strict";i.d(t,{execute:function(){return a}});var o=i(6689),n=i(49459),r=i(85696),s=i(22732);async function a(e,t,i){let a=(0,n.requireString)(t,"html",{allowEmpty:!0}),{position:l="end"}=t;if(!a.trim())return{success:!0,message:"Nothing to add: HTML is empty"};(0,o.throwIfAborted)(i);try{let t=e.createInside.fragment(),i=(0,r.createSanitizedContainer)(e,a);for(;i.firstChild;)t.appendChild(i.firstChild);return"start"===l?s.Dom.prepend(e.editor,t):s.Dom.append(e.editor,t),e.synchronizeValues(),{success:!0,message:`Added ${a.length} characters of HTML at the ${"start"===l?"beginning":"end"} of the document`}}catch(e){throw Error("Failed to add HTML: "+(e?.message||"Unknown error"))}}},78907:function(e,t,i){"use strict";var o=i(65374),n=i(686);t.default={...o,execute:n.execute}},73943:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Apply or remove inline formatting to the current selection (bold, italic, underline, etc.) or to a specific block","name",0,"applyFormat","parameters",0,[{name:"element",type:"string",description:'HTML element to wrap selection (e.g., "strong", "em", "u", "span")',required:!1},{name:"attributes",type:"object",description:'Attributes to apply (e.g., {"className": "highlight"}, {"style": {"color": "red"}})',required:!1},{name:"remove",type:"boolean",description:"If true, remove the formatting instead of applying it",required:!1,default:!1},{name:"blockIndex",type:"number",description:"Zero-based index of the block to format (if not using current selection)",required:!1},{name:"selector",type:"string",description:"CSS selector to find the block to format (if not using current selection)",required:!1}],"requiresPermission",0,!0])},19127:function(e,t,i){"use strict";i.d(t,{execute:function(){return r}});var o=i(6689),n=i(44526);async function r(e,t,i){let{element:r,attributes:s,remove:a,blockIndex:l,selector:c}=t;if((0,o.throwIfAborted)(i),!r&&!s)throw Error('Either "element" or "attributes" must be provided');if(e.s.restore(),void 0!==l||c){let{element:t}=(0,n.resolveBlock)(e,{selector:c,index:l});e.s.select(t)}if(e.s.isCollapsed())throw Error("No selection found. Please select text to format");try{let t={};return r&&(t.element=r),s&&(t.attributes=s),a?e.s.commitStyle({...t,mode:"remove"}):e.s.commitStyle(t),e.synchronizeValues(),{success:!0,message:a?"Formatting removed successfully":"Formatting applied successfully"}}catch(e){throw Error(`Failed to ${a?"remove":"apply"} formatting: ${e.message}`)}}},39296:function(e,t,i){"use strict";var o=i(73943),n=i(19127);t.default={...o,execute:n.execute}},53835:function(e,t,i){"use strict";i.d(t,{getToolNames:function(){return f}});var o=i(78907),n=i(39296),r=i(16745),s=i(78717),a=i(5618),l=i(90991),c=i(2020),d=i(12570),u=i(95323),h=i(97603);let p={readDocument:a.default,readBlocks:s.default,readSelection:l.default,writeDocument:h.default,replaceSelection:u.default,replaceBlock:c.default,replaceInDocument:d.default,insertHTML:r.default,addHTML:o.default,applyFormat:n.default};function f(){return Object.keys(p)}i.d(t,["BUILT_IN_TOOLS",0,p])},56732:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Insert or replace HTML content at the current cursor position in the editor","name",0,"insertHTML","parameters",0,[{name:"html",type:"string",description:"HTML content to insert",required:!0},{name:"replace",type:"boolean",description:"If true, replaces current selection. If false, inserts at cursor",required:!1,default:!1}],"requiresPermission",0,!0])},39592:function(e,t,i){"use strict";i.d(t,{execute:function(){return r}});var o=i(6689),n=i(49459);async function r(e,t,i){let r=(0,n.requireString)(t,"html",{allowEmpty:!0}),{replace:s}=t;if(!r.trim())return{success:!0,message:"Nothing to insert: HTML is empty"};(0,o.throwIfAborted)(i);try{return e.s.focus(),s&&!e.s.isCollapsed()&&e.s.remove(),e.s.insertHTML(r),e.synchronizeValues(),{success:!0,message:`Inserted ${r.length} characters of HTML`}}catch(e){throw Error("Failed to insert HTML: "+(e?.message||"Unknown error"))}}},16745:function(e,t,i){"use strict";var o=i(56732),n=i(39592);t.default={...o,execute:n.execute}},75352:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Read blocks from the editor with optional filtering and pagination","name",0,"readBlocks","parameters",0,[{name:"offset",type:"number",description:"Number of blocks to skip from the beginning (default: 0)",required:!1,default:0},{name:"limit",type:"number",description:"Maximum number of blocks to return (default: all)",required:!1},{name:"query",type:"string",description:"Filter blocks by text content",required:!1}],"requiresPermission",0,!1])},91140:function(e,t,i){"use strict";i.d(t,{execute:function(){return r}});var o=i(6689),n=i(22732);async function r(e,t,i){let{offset:r,limit:s,query:a}=t;(0,o.throwIfAborted)(i);let l=[];Array.from(e.editor.children).forEach((e,t)=>{n.Dom.isElement(e)&&l.push({blockIndex:t,tagName:e.tagName.toLowerCase(),content:e.innerHTML,textContent:e.textContent||"",classList:Array.from(e.classList)})});let c=l;if(a&&"string"==typeof a){let e=a.toLowerCase();c=l.filter(t=>t.textContent.toLowerCase().includes(e)||t.tagName.includes(e)||t.content.toLowerCase().includes(e))}let d=Math.max(0,Math.min("number"==typeof r?r:0,c.length)),u=void 0!==s?Math.min(d+s,c.length):c.length;return{blocks:c.slice(d,u),total:l.length,offset:d,limit:void 0!==s?s:void 0}}},78717:function(e,t,i){"use strict";var o=i(75352),n=i(91140);t.default={...o,execute:n.execute}},93809:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Read the entire content of the editor document in HTML format","name",0,"readDocument","parameters",0,[{name:"start",type:"number",description:"Start character position (default: 0)",required:!1,default:0},{name:"end",type:"number",description:"End character position (default: length of document)",required:!1},{name:"aroundSelection",type:"boolean",description:"If true, return only the maximum block around the current selection",required:!1,default:!1}],"requiresPermission",0,!1])},28157:function(e,t,i){"use strict";i.d(t,{execute:function(){return r}});var o=i(6689),n=i(22732);async function r(e,t,i){let{start:r,end:s,aroundSelection:a}=t;(0,o.throwIfAborted)(i);let l=e.value,c=l.length;if(a&&!e.s.isCollapsed()){let t=e.s.range.commonAncestorContainer;for(;t&&t!==e.editor;){if(n.Dom.isElement(t)&&t.parentNode===e.editor){l=t.outerHTML;break}t=t.parentNode}return{html:l,length:c}}let d=void 0!==s?Math.min(s,c):c,u=Math.max(0,Math.min("number"==typeof r?r:0,c));return(u>0||c>d)&&(l=l.substring(u,d)),{html:l,length:c,start:u,end:d}}},5618:function(e,t,i){"use strict";var o=i(93809),n=i(28157);t.default={...o,execute:n.execute}},52826:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Get information about the current selection including HTML content and optional context","name",0,"readSelection","parameters",0,[{name:"contextCharsBefore",type:"number",description:"Number of characters to include before the selection",required:!1,default:0},{name:"contextCharsAfter",type:"number",description:"Number of characters to include after the selection",required:!1,default:0}],"requiresPermission",0,!1])},85130:function(e,t,i){"use strict";i.d(t,{execute:function(){return n}});var o=i(6689);async function n(e,t,i){let{contextCharsBefore:n,contextCharsAfter:r}=t;if((0,o.throwIfAborted)(i),e.s.restore(),e.s.isCollapsed())return{hasSelection:!1};let s=e.s.html,a=e.s.range,l=a.toString(),c={hasSelection:!0,html:s,text:l,startContainer:a.startContainer.nodeName,endContainer:a.endContainer.nodeName};if(n>0||r>0){let t=e.editor.textContent||"",i=t.substring(0,t.indexOf(l)),o=t.substring(t.indexOf(l)+l.length);n>0&&(c.contextBefore=i.slice(-n)),r>0&&(c.contextAfter=o.slice(0,r))}return c}},90991:function(e,t,i){"use strict";var o=i(52826),n=i(85130);t.default={...o,execute:n.execute}},96675:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Replace a specific block in the document by its index or CSS selector with new HTML content","name",0,"replaceBlock","parameters",0,[{name:"index",type:"number",description:"Zero-based index of the block to replace (use either index or selector, not both)",required:!1},{name:"selector",type:"string",description:'CSS selector to find the block to replace (e.g., "h1", ".my-class", "#my-id"). Use either selector or index, not both',required:!1},{name:"html",type:"string",description:"HTML content for the new block",required:!0}],"requiresPermission",0,!0])},3091:function(e,t,i){"use strict";i.d(t,{execute:function(){return l}});var o=i(6689),n=i(49459),r=i(44526),s=i(85696),a=i(22732);async function l(e,t,i){let{index:l,selector:c}=t,d=(0,n.requireString)(t,"html");if((0,o.throwIfAborted)(i),void 0===l&&!c||void 0!==l&&c)throw Error("Either index or selector must be provided, but not both");let{element:u,identifier:h}=(0,r.resolveBlock)(e,{selector:c,index:l,requireExactlyOne:!0});try{let t=(0,s.createSanitizedContainer)(e,d).firstChild;if(!t||!a.Dom.isElement(t))throw Error("Invalid HTML: must contain at least one element");return u.parentNode?.replaceChild(t,u),e.synchronizeValues(),{success:!0,message:`Block ${h} replaced successfully`}}catch(e){throw Error(`Failed to replace block ${h}: ${e.message}`)}}},2020:function(e,t,i){"use strict";var o=i(96675),n=i(3091);t.default={...o,execute:n.execute}},62553:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Find and replace text or HTML patterns throughout the entire document","name",0,"replaceInDocument","parameters",0,[{name:"search",type:"string",description:"Text or pattern to search for",required:!0},{name:"replace",type:"string",description:"Replacement text or HTML",required:!0},{name:"useRegex",type:"boolean",description:"If true, treats search as a regular expression",required:!1,default:!1},{name:"useSelector",type:"string",description:"CSS selector to narrow down the search scope to specific elements",required:!1}],"requiresPermission",0,!0])},56293:function(e,t,i){"use strict";i.d(t,{execute:function(){return s}});var o=i(6689),n=i(49459),r=i(85696);async function s(e,t,i){let s=(0,n.requireString)(t,"search"),a=(0,n.requireString)(t,"replace",{allowEmpty:!0}),{useRegex:l,useSelector:c}=t;(0,o.throwIfAborted)(i);try{let t;e.s.focus(),e.s.save();let n=0;if(c){let d=function(e,t,i,n,s,a){let l=e.editor.querySelectorAll(s);if(0===l.length)return{replacements:0,message:`No elements found matching selector "${s}"`};let c=0;return l.forEach(s=>{(0,o.throwIfAborted)(a);let l=s.innerHTML,d=l;if(n)try{let e=RegExp(t,"g");l=l.replace(e,()=>(c++,i))}catch(e){throw Error("Invalid regex pattern: "+(e?.message||"Unknown error"))}else{let e=t.length,n=0;for(;-1!==(n=l.indexOf(t,n));)(0,o.throwIfAborted)(a),l=l.substring(0,n)+i+l.substring(n+e),n+=i.length,c++}l!==d&&(s.innerHTML=l,(0,r.sanitizeElement)(e,s))}),c>0&&(e.synchronizeValues(),e.s.restore()),{replacements:c}}(e,s,a,l,c,i);n=d.replacements,t=d.message}else n=function(e,t,i,n,r,s){let a=0,l=t;if(r)try{let e=RegExp(i,"g");l=l.replace(e,()=>(a++,n))}catch(e){throw Error("Invalid regex pattern: "+(e?.message||"Unknown error"))}else{let e=i.length,t=0;for(;-1!==(t=l.indexOf(i,t));)(0,o.throwIfAborted)(s),l=l.substring(0,t)+n+l.substring(t+e),t+=n.length,a++}return a>0&&(e.value=l,e.s.restore(),e.synchronizeValues()),a}(e,e.value,s,a,l,i);return{replacements:n,message:t||(n>0?`Replaced ${n} occurrence(s)`:"No matches found")}}catch(t){throw e.s.restore(),Error("Failed to replace in document: "+(t?.message||"Unknown error"))}}},12570:function(e,t,i){"use strict";var o=i(62553),n=i(56293);t.default={...o,execute:n.execute}},70750:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Replace the current selection with new HTML content","name",0,"replaceSelection","parameters",0,[{name:"html",type:"string",description:"HTML content to insert in place of the selection",required:!0},{name:"collapseToEnd",type:"boolean",description:"Move cursor to the end of the inserted content",required:!1,default:!0}],"requiresPermission",0,!0])},36142:function(e,t,i){"use strict";i.d(t,{execute:function(){return r}});var o=i(6689),n=i(49459);async function r(e,t,i){let r=(0,n.requireString)(t,"html"),{collapseToEnd:s}=t;(0,o.throwIfAborted)(i);try{if(e.s.restore(),e.s.insertHTML(r),s){let t=e.s.range;t.collapse(!1),e.s.selectRange(t)}return e.e.fire("change"),{success:!0,message:"Selection replaced successfully"}}catch(e){throw Error("Failed to replace selection: "+e.message)}}},95323:function(e,t,i){"use strict";var o=i(70750),n=i(36142);t.default={...o,execute:n.execute}},90022:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Write (replace) the entire document content with new HTML","name",0,"writeDocument","parameters",0,[{name:"html",type:"string",description:"HTML content to set as the document",required:!0}],"requiresPermission",0,!0])},79766:function(e,t,i){"use strict";i.d(t,{execute:function(){return r}});var o=i(6689),n=i(49459);async function r(e,t,i){let r=(0,n.requireString)(t,"html",{allowEmpty:!0});(0,o.throwIfAborted)(i);try{return e.s.focus(),e.value=r,e.synchronizeValues(),{success:!0,message:`Document content was replaced with provided HTML(${r.length} characters)`}}catch(e){throw Error("Failed to replace HTML: "+(e?.message||"Unknown error"))}}},97603:function(e,t,i){"use strict";var o=i(90022),n=i(79766);t.default={...o,execute:n.execute}},80453:function(e,t,i){"use strict";i.d(t,{UIConversationListItem:function(){return c}});var o=i(82749),n=i(31635),r=i(65478),s=i(67510),a=i(62843),l=i(80870);class c extends s.UIElement{className(){return"UIConversationListItem"}render(){return'<div class="jodit-ui-conversation-list__item"></div>'}setActive(e){this.isActive=e,this.updateContent()}updateContent(){let e=this.container;e.innerHTML="",e.setAttribute("data-id",this.conversation.id),this.isActive?e.classList.add("jodit-ui-conversation-list__item_active"):e.classList.remove("jodit-ui-conversation-list__item_active");let t=this.j.c.div("jodit-ui-conversation-list__item-avatar");t.textContent="AI",e.appendChild(t);let i=this.j.c.div("jodit-ui-conversation-list__item-wrapper"),o=this.j.c.div("jodit-ui-conversation-list__item-content"),n=this.j.c.div("jodit-ui-conversation-list__item-title");if(n.textContent=this.conversation.title,this.titleElement=n,o.appendChild(n),this.opts.showTimestamps){let e=this.j.c.div("jodit-ui-conversation-list__item-meta");e.textContent=this.opts.formatTimestamp(this.conversation.updated,this.j.i18n.bind(this.j)),o.appendChild(e)}if(i.appendChild(o),this.conversation.messageCount>0){let e=this.j.c.div("jodit-ui-conversation-list__item-badge");e.textContent=this.conversation.messageCount+"",i.appendChild(e)}e.appendChild(i),this.actionsButton||(this.actionsButton=new a.UIButton(this.j,{icon:{name:"dots"},tooltip:"Actions",name:"conversationActions",size:"tiny"}),this.actionsButton.container.classList.add("jodit-ui-conversation-list__item-actions"),this.actionsButton.onAction(e=>{e.stopPropagation(),this.showActionsMenu(e)})),e.appendChild(this.actionsButton.container)}onClick(){this.isRenaming||this.j.e.fire("selectConversation.ai-assistant-pro",this.conversation.id)}showActionsMenu(e){if(!this.contextMenu||!this.actionsButton)return;let t=this.actionsButton.container.getBoundingClientRect();this.contextMenu.show(t.left,t.bottom,[{title:"Rename",icon:"pencil",exec:()=>{this.startInlineRename()}},{title:"Delete",icon:"bin",exec:()=>{this.onDelete()}}]),e.stopPropagation()}startInlineRename(){if(this.isRenaming||!this.titleElement)return;this.isRenaming=!0;let e=this.titleElement,t=this.conversation.title,i=this.j.c.element("input");i.type="text",i.value=t,i.className="jodit-ui-conversation-list__item-title-input",e.textContent="",e.appendChild(i),i.focus(),i.select();let o=()=>{if(!this.isRenaming)return;let o=i.value.trim();this.isRenaming=!1,o&&o!==t?(e.textContent=o,this.j.e.fire("renameConversation.ai-assistant-pro",this.conversation.id,o)):e.textContent=t};this.j.e.on(i,"blur",o),this.j.e.on(i,"keydown",o=>{"Enter"===o.key&&(o.preventDefault(),i.blur()),"Escape"===o.key&&(this.isRenaming=!1,e.textContent=t)}),this.j.e.on(i,"click",e=>{e.stopPropagation()})}onDelete(){this.j.e.fire("deleteConversation.ai-assistant-pro",this.conversation.id)}destruct(){this.actionsButton?.destruct(),this.contextMenu?.destruct(),super.destruct()}constructor(e,t,i=!1,n){super(e),(0,o._)(this,"opts",void 0),(0,o._)(this,"conversation",void 0),(0,o._)(this,"isActive",void 0),(0,o._)(this,"actionsButton",void 0),(0,o._)(this,"contextMenu",void 0),(0,o._)(this,"titleElement",void 0),(0,o._)(this,"isRenaming",void 0),this.opts=n,this.actionsButton=null,this.contextMenu=null,this.titleElement=null,this.isRenaming=!1,this.conversation=t,this.isActive=i,this.contextMenu=new l.ContextMenu(this.j),this.updateContent()}}(0,n.__decorate)([(0,r.watch)("container:click")],c.prototype,"onClick",null),(0,n.__decorate)([r.autobind],c.prototype,"showActionsMenu",null),(0,n.__decorate)([r.autobind],c.prototype,"startInlineRename",null),(0,n.__decorate)([r.autobind],c.prototype,"onDelete",null),c=(0,n.__decorate)([r.component],c)},68365:function(e,t,i){"use strict";i.d(t,{UIConversationList:function(){return d}});var o=i(82749),n=i(31635),r=i(31356),s=i(80453),a=i(65478),l=i(80256),c=i(62405);class d extends c.UIGroup{className(){return"UIConversationList"}render(){return`<div class="&__container">
|
|
285
285
|
<div class="&__header"></div>
|
|
@@ -424,7 +424,19 @@ ${r}`.trim();i?await this.__executeQuickCommandSilent(l,r):await this.__executeQ
|
|
|
424
424
|
</div>`}generateLibrary(){let e=new l.UIGroup(this.j);c.map(e=>p.mapKey(e,this.j)).forEach(t=>{let i=new d.UIGButton(this.j,t);i.setMod("mode","library"),e.append(i),this.j.e.on(i.container,"click",()=>{let{text:e}=this.state;Object.assign(this.state,t),Object.assign(this.state,{className:"",text:e}),this.update()})});let t=this.getElm("library");(0,a.assert)(null!=t,"library element does not exists"),t.appendChild(e.container)}static mapKey(e,t){return{bgEnd:e.be,bgStart:e.bs,borderColor:e.bc,borderRadius:e.br,borderSize:e.bse,boxShadow:e.bsh,boxShadowBlurRadius:e.bsbr,boxShadowColor:e.bsc,boxShadowInset:e.bsi,boxShadowOffsetX:e.bsox,boxShadowOffsetY:e.bsoy,boxShadowSpreadRadius:e.bssr,fontColor:e.fc,fontFamily:e.ff,fontSize:e.fs,fontStyle:e.fse,fontWeight:e.fw,paddingX:e.px,paddingY:e.py,previewBgColor:e.pbc,solid:e.s,text:(0,s.isString)(e.t)?t.i18n(e.t):e.t,textShadow:e.ts,textShadowBlurRadius:e.tsbr,textShadowColor:e.tsc,textShadowOffsetX:e.tsox,textShadowOffsetY:e.tsoy}}updateState(e,t){this.state[e]=t,this.update()}update(){this.isReady&&(this.form.update(),this.preview.update())}constructor(e){super(e),(0,o._)(this,"state",{text:"",className:"",href:"",bgEnd:"#5cbf2a",bgStart:"#44c767",borderColor:"#18ab29",borderRadius:28,borderSize:1,boxShadow:!1,boxShadowBlurRadius:0,boxShadowColor:"#3dc21b",boxShadowInset:!1,boxShadowOffsetX:0,boxShadowOffsetY:0,boxShadowSpreadRadius:0,fontColor:"#fff",fontFamily:"Arial",fontSize:17,fontStyle:!1,fontWeight:!1,fontItalic:!1,paddingX:31,paddingY:16,previewBgColor:"#f5f5f5",solid:!0,textShadow:!0,textShadowBlurRadius:0,textShadowColor:"#2f6627",textShadowOffsetX:0,textShadowOffsetY:1}),(0,o._)(this,"preview",new h.UIPreviewButtonGenerator(this.j,this.state,this.updateState)),(0,o._)(this,"form",new u.UIFormButtonGenerator(this.j,this.state,this.updateState)),(0,o._)(this,"target",void 0),this.generateLibrary();let t=this.getElm("preview");(0,a.assert)(null!=t,"preview element does not exists"),t.appendChild(this.preview.container);let i=this.getElm("form");(0,a.assert)(null!=i,"form element does not exists"),i.appendChild(this.form.container)}}(0,n.__decorate)([r.autobind],p.prototype,"updateState",null),p=(0,n.__decorate)([r.component],p)},26638:function(e,t,i){"use strict";i.d(t,{UIPreviewButtonGenerator:function(){return d}});var o=i(82749),n=i(31635),r=i(65478),s=i(38837),a=i(67510),l=i(82520),c=i(45128);class d extends a.UIElement{className(){return"UIPreviewButtonGenerator"}render(){return`<div>
|
|
425
425
|
<div class='&__button'></div>
|
|
426
426
|
<div class='&__colors'></div>
|
|
427
|
-
</div>`}update(){this.button.update(),this.lockUpdate=!0,this.colors.forEach(e=>{e.value!==this.state[e.state.name]&&(e.value=this.state[e.state.name])}),this.lockUpdate=!1}constructor(e,t,i){super(e),(0,o._)(this,"state",void 0),(0,o._)(this,"updateState",void 0),(0,o._)(this,"button",void 0),(0,o._)(this,"lockUpdate",void 0),(0,o._)(this,"colors",void 0),this.state=t,this.updateState=i,this.button=new l.UIGButton(this.j,this.state),this.lockUpdate=!1,this.colors=["bgStart","bgEnd","fontColor","borderColor","boxShadowColor","textShadowColor","previewBgColor"].map(e=>new c.ColorInput(this.j,{name:e,onChange:t=>{this.lockUpdate||("bgEnd"===e&&t!==this.state.bgStart&&this.updateState("solid",!1),this.updateState(e,t))}}).setMod("slim",!0)),this.setMod("mode","default");let n=this.getElm("button");(0,s.assert)(null!=n,"button element does not exists"),n.appendChild(this.button.container);let r=this.getElm("colors");(0,s.assert)(null!=r,"colors element does not exists"),this.colors.forEach(e=>{r.appendChild(e.container)}),this.update()}}d=(0,n.__decorate)([r.component],d)},8390:function(e,t,i){"use strict";var o=i(82749);i(89683);var n=i(2748),r=i(36409),s=i(50911),a=i(2692);class l extends s.Plugin{afterInit(e){e.registerCommand("changeCase",{exec:(t,i,o)=>{o=o.toLowerCase();let r=e.s.range,{startContainer:s,startOffset:a}=r;if(e.s.isCollapsed()){let t=e.s.current(!0);t&&t.parentElement&&this.applyCase(o,t.parentElement),r.setStart(s,a),e.s.selectRange(r)}else{let t=r.cloneRange(),i=r.cloneRange(),s=e.createInside.fake(),a=e.createInside.fake();t.collapse(!0),i.collapse(!1),t.insertNode(s),i.insertNode(a),n.Dom.between(s,a,e=>{this.applyCase(o,e)}),r.setStartAfter(s),r.setEndBefore(a),e.s.selectRange(r),n.Dom.safeRemove(s),n.Dom.safeRemove(a)}}})}applyCase(e,t){if(n.Dom.isText(t)){let i=t.nodeValue;i&&(t.nodeValue=(t=>{switch(e){case"lowercase":return t.toLowerCase();case"uppercase":return t.toUpperCase();default:return t.split(" ").map(r.ucfirst).join(" ")}})(i))}else n.Dom.each(t,t=>{this.applyCase(e,t)})}beforeDestruct(e){}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"changeCase",group:"font-style"}])}}(0,o._)(l,"requires",["license"]),a.JoditPro.plugins.add("change-case",l)},89683:function(e,t,i){"use strict";var o=i(91729),n=i.n(o),r=i(6441),s=i(86583);r.Config.prototype.controls.changeCase={tooltip:"Change case",icon:n(),list:["lowercase","UPPERCASE","Title Case"],isDisabled:e=>!e.s.current(),exec(e,t,{control:i}){let o=i.command+"Selected",n=i.args&&i.args[0]||(0,s.dataBind)(e,o);if(!n||!i.command)return!1;(0,s.dataBind)(e,o,n),e.execCommand(i.command,null,n)},command:"changeCase"}},29528:function(e,t,i){"use strict";var o=i(82749),n=i(31635),r=i(45128),s=i(65478),a=i(2748),l=i(50911),c=i(2692);class d extends l.Plugin{afterInit(e){e.e.on("afterGenerateColorPicker",this.onAfterGenerateColorPicker)}onAfterGenerateColorPicker(e,t,i,o){a.Dom.detach(t);let n=new r.ColorInput(this.j,{value:o||"#000",onChange:i});t.appendChild(n.container)}beforeDestruct(e){e.e.off("afterGenerateColorPicker",this.onAfterGenerateColorPicker)}constructor(...e){super(...e),(0,o._)(this,"hasStyle",!c.JoditPro.fatMode)}}(0,o._)(d,"requires",["license"]),(0,n.__decorate)([s.autobind],d.prototype,"onAfterGenerateColorPicker",null),c.JoditPro.plugins.add("color-picker",d)},45128:function(e,t,i){"use strict";i.d(t,{ColorInput:function(){return h}});var o=i(82749),n=i(31635),r=i(46146),s=i(82758),a=i(65478),l=i(21537),c=i(38837),d=i(67510),u=i(41409);class h extends d.UIInput{className(){return"ColorInput"}afterSetMode(e,t){"slim"===e&&t&&this.nativeInput.setAttribute("readonly","true")}onChangeSelfValue(){this.nativeInput.style.backgroundColor=this.value}onEscKeyDown(e){e.key===s.KEY_ESC&&this.popup?.close()}constructor(e,t){super(e,t),(0,o._)(this,"trigger",void 0),(0,o._)(this,"popup",void 0);let i=new d.Popup(e);this.popup=i,this.trigger=(0,d.Button)(this.j,"ok");let n=this.getElm("wrapper");(0,c.assert)(null!=n,"wrapper element does not exist"),n.appendChild(this.trigger.container),this.trigger.container.classList.add(this.getFullElName("trigger")),this.trigger.onAction(()=>{this.state.onChange?.(this.value),i.close()}),i.setMod("padding",!1).setMod("max-height",!1);let s=this.j.create.div(this.getFullElName("picker")),a=r.createPicker(s,{paletteEditable:!0,showAlpha:!0,palette:"PALETTE_MATERIAL_CHROME"}).on("change",(e,t)=>{this.isFocused||(this.value=r.parseColor(t||"","hex"))});this.j.e.on(this,"change",()=>{let e;e=this.value,r.parseColor(e,"hex")!==a.color&&(a.color=this.value)}),i.setContent(s),this.j.e.on(this.nativeInput,"click",()=>{i.parentElement=this,this.jodit instanceof u.Dialog&&i.setZIndex(this.jodit.getZIndex()+1),i.open(()=>(0,l.position)(this.container))}),this.onChangeValue(),this.onChangeSelfValue()}}(0,n.__decorate)([(0,a.watch)(":change")],h.prototype,"onChangeSelfValue",null),(0,n.__decorate)([(0,a.watch)("nativeInput:keydown")],h.prototype,"onEscKeyDown",null),h=(0,n.__decorate)([a.component],h)},3536:function(e,t,i){"use strict";var o=i(4941),n=i(41943),r=i(46995),s=i.n(r),a=i(6441);a.Config.prototype.emoji={data:()=>n,enableAutoComplete:!0,recentCountLimit:10},a.Config.prototype.controls.emoji={tooltip:"Insert Emoji",icon:s(),popup(e,t,i){e.s.save();let n=e.getInstance(o.Emoji);return e.e.off(n,"insert").on(n,"insert",t=>{e.s.restore(),e.s.insertNode(e.createInside.text(t),!0),i()}),e.e.one("beforePopupClose",()=>{e.s.restore()}),n.reset(),n.container}}},85174:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(3536);var r=i(4941),s=i(65478),a=i(49055),l=i(20356),c=i(2692);class d extends l.Plugin{async afterInit(e){let t=await e.o.emoji.data();!e.isInDestruct&&(this.data={...t,emoji:t.emoji.map(r.Emoji.normalizeEmoji)},e.o.emoji.enableAutoComplete&&e.e.fire("registerAutocompleteSource",this.onAutoComplete))}onAutoComplete(e){return e.length>2&&":"===e[0]&&(e=e.substr(1).toLowerCase(),(0,a.trim)(e).length)?this.data.emoji.filter(t=>t.description?.indexOf(e)===0).sort((t,i)=>t.description.indexOf(e)-i.description.indexOf(e)).map(e=>({title:`${e.emoji} ${e.description}`,value:e.emoji})):[]}beforeDestruct(e){}constructor(...e){super(...e),(0,o._)(this,"hasStyle",!c.JoditPro.fatMode),(0,o._)(this,"buttons",[{name:"emoji",group:"insert"}]),(0,o._)(this,"data",void 0)}}(0,o._)(d,"requires",["autocomplete","license"]),(0,n.__decorate)([s.autobind],d.prototype,"onAutoComplete",null),c.JoditPro.plugins.add("emoji",d)},4941:function(e,t,i){"use strict";i.d(t,{Emoji:function(){return d}});var o=i(82749),n=i(31635),r=i(65478),s=i(2748),a=i(21537),l=i(67510);let c="Recently";class d extends l.UIElement{className(){return"Emoji"}get defaultList(){return this.recent.concat(this.data?this.data.emoji:[])}reset(){this.data&&(this.input.nativeInput.value="",this.setItems(this.defaultList),this.setActiveCategory(0))}setItems(e){this.items=e.map(d.normalizeEmoji),this.list.scrollTo(0,0),this.columns=0,this.renderWindow()}createContainer(e){let t=this.j.c.div("jodit-emoji");this.input=new l.UIInput(this.j,{name:"search",icon:"search",autocomplete:!1,clearButton:!0,placeholder:"Search emoji"}),this.input.container.classList.add(this.getFullElName("input")),this.categories=this.j.c.div(this.getFullElName("categories")),this.list=this.j.c.div(this.getFullElName("emojis"));let i=this.j.c.div(this.getFullElName("navigate"));return s.Dom.append(i,[this.categories,this.input.container]),s.Dom.append(t,[i,this.list]),t}setActiveCategory(e,t=!1){let i=this.getElms("category"),o=i[this.activeIndex];i[e]||(e=i.length-1);let n=i[e],r=this.getFullElName("category","active",!0);if(o&&o.classList.remove(r),n&&n.classList.add(r),t){let t=this.data?.categories[e],i=this.rows.find(e=>e.title===t);if(i){this.list.scrollTop=i.top+this.paddingTop,this.renderWindow();let e=this.cache[i.title??""];e&&e.parentNode===this.list&&(this.list.scrollTop=e.offsetTop-this.list.offsetTop)}}this.activeIndex=e}generateCategoriesList(e){return e.map((t,i)=>this.j.c.div(this.getFullElName("category"),{"data-index":i,title:this.j.i18n(t),style:{width:100/e.length+"%"}}))}measure(){let{list:e}=this,t=e.querySelector("."+this.getFullElName("emoji")),i=e.querySelector("."+this.getFullElName("category-title"));if(t?.offsetWidth){let e=parseFloat(this.j.ow.getComputedStyle(t).marginBottom);return{cellWidth:t.offsetWidth,rowHeight:t.offsetHeight+(e||0),titleHeight:i?.offsetHeight||t.offsetHeight}}if(this.cellWidth)return{cellWidth:this.cellWidth,rowHeight:this.rowHeight,titleHeight:this.titleHeight};let o=this.j.ow.getComputedStyle(e),n=parseFloat(o.getPropertyValue("--jd-jodit-emoji-item-size"))||parseFloat(o.getPropertyValue("--jodit-emoji-item-size"))||28;return{cellWidth:n,rowHeight:n+n/7,titleHeight:n}}buildRows(){let{list:e}=this,t=parseFloat(this.j.ow.getComputedStyle(e).paddingTop);isNaN(t)||(this.paddingTop=t);let{cellWidth:i,rowHeight:o,titleHeight:n}=this.measure(),r=Math.max(1,Math.floor((e.clientWidth||308)/i));if(r===this.columns&&i===this.cellWidth&&o===this.rowHeight&&n===this.titleHeight)return;this.columns=r,this.cellWidth=i,this.rowHeight=o,this.titleHeight=n,this.window=[-1,-1];let s=this.data?.categories??[],a=[],l="",d=0,u=e=>(e.top=d,d+=e.height,a.push(e),e);this.items.forEach(e=>{let t=-1===e.category?c:s[e.category]??"";t!==l&&u({title:l=t,items:[],top:0,height:n});let i=a[a.length-1];(void 0!==i.title||i.items.length>=r)&&u({items:[],top:0,height:o}),a[a.length-1].items.push(e)}),this.rows=a}renderWindow(){this.renderRows(!1)}renderRows(e){if(this.isDestructed)return;this.buildRows();let{rows:t,list:i}=this,o=0,n=t.length;if(this.virtual){let e=i.scrollTop-300,r=i.scrollTop+(i.clientHeight||300)+300;for(-1===(o=t.findIndex(t=>t.top+t.height>e))&&(o=t.length),n=o;n<t.length&&t[n].top<r;)n+=1}if(o===this.window[0]&&n===this.window[1])return;this.window=[o,n];let r=t.length?t[t.length-1].top+t[t.length-1].height:0,a=o<t.length?t[o].top:r,l=n>o?r-t[n-1].top-t[n-1].height:0,c=[];a>0&&c.push(this.spacer(this.spacerTop,a));for(let e=o;n>e;e+=1)c.push(...this.renderRow(t[e]));if(l>0&&c.push(this.spacer(this.spacerBottom,l)),s.Dom.detach(i),s.Dom.append(i,c),this.virtual&&i.clientWidth&&!(o>=n)){if(Math.max(1,Math.floor(i.clientWidth/this.cellWidth))!==this.columns&&!e){this.columns=0,this.renderRows(!0);return}this.verifyLayout(o,n)}}verifyLayout(e,t){let{rows:i,list:o}=this,n=e=>this.rowElement(e).offsetTop-o.offsetTop,r=e=>1>=Math.abs(n(e)-(this.paddingTop+e.top)),s=r(i[e]),a=i.findIndex((i,o)=>o>=e&&t>o&&void 0===i.title);if(s&&-1!==a){let e=i[a],o=this.rowElement(e),n=this.cache[this.cellKey(e.items[e.items.length-1])],l=i[a+1];s=r(e)&&n.offsetTop===o.offsetTop&&(!l||a+1>=t||r(l))}s||(this.virtual=!1,this.window=[-1,-1],this.renderRows(!0))}rowElement(e){return void 0!==e.title?this.cache[e.title]:this.cache[this.cellKey(e.items[0])]}cellKey(e){return e.emoji+e.category}spacer(e,t){return e.style.height=t+"px",e}renderRow(e){if(void 0!==e.title){let t=e.title;return this.cache[t]??=this.j.c.div(this.getFullElName("category-title"),{"data-index":t===c?-1:this.data?.categories.indexOf(t)??-1},t?this.j.i18n(t):""),[this.cache[t]]}return e.items.map(e=>{let t=this.cellKey(e);return this.cache[t]??=this.j.c.div(this.getFullElName("emoji"),{"data-value":e.emoji},e.emoji),this.cache[t]})}updateActiveCategory(){let e=this.list.scrollTop,t=this.data?.categories??[],i=0;this.rows.forEach(o=>{void 0!==o.title&&o.title!==c&&e>o.top+this.paddingTop-20&&(i=Math.max(0,t.indexOf(o.title)))}),this.setActiveCategory(i)}static isShortCat(e){return e&&(0,a.isString)(e.e)}static normalizeEmoji(e){return d.isShortCat(e)?{emoji:e.e,description:e.d,category:e.c,aliases:e.a,tags:e.t}:e}onInsertCode(e){this.jodit.e.fire(this,"insert",e);let t=this.map[e];if(t){let i=[...this.recent],o=i.findIndex(t=>t.emoji===e);-1!==o&&i.splice(o,1),i.unshift({...t,category:-1}),this.recent=i}}onScrollList(){this.j.async.requestAnimationFrame(()=>{this.renderWindow(),this.updateActiveCategory()})}onAfterOpenPopup(){this.renderWindow()}onClickCategory(e){this.clearFilter();let t=e.target;t.classList.contains(this.getFullElName("category"))&&this.setActiveCategory(parseInt((0,a.attr)(t,"-index")||"0",10)||0,!0)}onClickItem(e){let t=e.target;if(t.classList.contains(this.getFullElName("emoji"))){let e=(0,a.attr)(t,"-value")||"";e&&this.onInsertCode(e)}e.preventDefault(),e.stopPropagation()}onInputFilter(){let e=this.input.value.toLowerCase();if(!e.length)return this.setItems(this.defaultList);this.setItems(this.defaultList.filter(t=>{let i=d.normalizeEmoji(t);return i.description?.toLowerCase().includes(e)||i.tags?.join(" ").toLowerCase().includes(e)||i.aliases?.join(" ").toLowerCase().includes(e)}))}clearFilter(){this.input.nativeInput.value.length&&this.reset()}onReady(){this.j.e.on(this.input.nativeInput,"input",this.onInputFilter).on(this.categories,"click",this.onClickCategory).on(this.list,"scroll",this.onScrollList).on(this.list,"mousedown touchstart",this.onClickItem)}destruct(){return this.input.destruct(),super.destruct()}constructor(e){super(e),(0,o._)(this,"data",null),(0,o._)(this,"recent",[]),(0,o._)(this,"map",{}),(0,o._)(this,"activeIndex",0),(0,o._)(this,"cache",{}),(0,o._)(this,"items",[]),(0,o._)(this,"rows",[]),(0,o._)(this,"columns",0),(0,o._)(this,"cellWidth",0),(0,o._)(this,"rowHeight",0),(0,o._)(this,"titleHeight",0),(0,o._)(this,"paddingTop",0),(0,o._)(this,"window",[-1,-1]),(0,o._)(this,"virtual",!0),(0,o._)(this,"spacerTop",this.j.c.div(this.getFullElName("spacer"))),(0,o._)(this,"spacerBottom",this.j.c.div(this.getFullElName("spacer"))),this.setMod("loading",!0),(async()=>{this.data=await e.o.emoji.data(),this.isInDestruct||(this.setMod("loading",!1),this.data.emoji.forEach(e=>{let t=d.normalizeEmoji(e);this.map[t.emoji]=t}),this.setItems(this.defaultList),s.Dom.append(this.categories,this.generateCategoriesList(this.data.categories)),this.setActiveCategory(0))})()}}(0,n.__decorate)([r.persistent],d.prototype,"recent",void 0),(0,n.__decorate)([r.autobind],d.prototype,"renderWindow",null),(0,n.__decorate)([r.autobind],d.prototype,"onScrollList",null),(0,n.__decorate)([(0,r.watch)(":afterEmojiOpenPopup")],d.prototype,"onAfterOpenPopup",null),(0,n.__decorate)([r.autobind],d.prototype,"onClickCategory",null),(0,n.__decorate)([r.autobind],d.prototype,"onClickItem",null),(0,n.__decorate)([(0,r.debounce)()],d.prototype,"onInputFilter",null),(0,n.__decorate)([(0,r.hook)("ready")],d.prototype,"onReady",null),d=(0,n.__decorate)([r.component],d)},90832:function(e,t,i){"use strict";var o=i(53121),n=i.n(o),r=i(83556),s=i.n(r),a=i(4872),l=i.n(a),c=i(6441),d=i(2748);c.Config.prototype.exportDocs={css:"",pdf:{externalFonts:[],allow:!0,converter:null,options:{defaultFont:"courier",format:"A4",page_orientation:"portrait"}},docx:{allow:!0,filename:"document.docx",converter:null}},c.Config.prototype.controls.exportDocs={tooltip:"Export",isDisabled:e=>d.Dom.isEmptyContent(e.editor),icon:n(),list:{exportToPDF:"Export to PDF",exportToDOCX:"Export to DOCX"},childExec(e,t,{control:i}){let o=i.name??"exportToPDF";e.execCommand(o)}},c.Config.prototype.controls.exportToPDF={tooltip:"Export to PDF",isDisabled:e=>d.Dom.isEmptyContent(e.editor),icon:{name:l(),scale:1.3}},c.Config.prototype.controls.exportToDOCX={...c.Config.prototype.controls.exportToPDF,tooltip:"Export to DOCX",icon:{name:s(),scale:1.3}}},90882:function(e,t,i){"use strict";var o=i(82749);i(90832);var n=i(22732),r=i(68934),s=i(11628),a=i(50911),l=i(54079),c=i(14625),d=i(2692);class u extends a.Plugin{afterInit(e){e.registerCommand("exportToPDF",async()=>{let{converter:t}=(0,r.ConfigDeepFlatten)(e.o.exportDocs.pdf);t?await this.clientExport(e,t,"document.pdf"):await this.sendExportRequest(e,{action:"generatePdf",filename:"document.pdf",data:{options:(0,r.ConfigDeepFlatten)(e.o.exportDocs.pdf).options}})}),e.registerCommand("exportToDOCX",async()=>{let t=(0,r.ConfigDeepFlatten)(e.o.exportDocs.docx),i=t.filename||"document.docx";t.converter?await this.clientExport(e,t.converter,i):await this.sendExportRequest(e,{action:"generateDocx",filename:i})})}async clientExport(e,t,i){e.progressbar.show().progress(50),await this.downloadBlob(e,i,async()=>t(u.getValue(e)))}async sendExportRequest(e,t){let i=new l.Ajax({...e.o.exportDocs.ajax??e.o.filebrowser.ajax,method:"POST",responseType:"blob",onProgress(t){e.progressbar.show().progress(t)},data:{action:t.action,html:u.getValue(e),...t.data}});e.e.on("beforeDestruct",i.destruct),await this.downloadBlob(e,t.filename,async()=>(await i.send()).blob())}async downloadBlob(e,t,i){try{let e=await i(),o=this.j.create.a();o.href=URL.createObjectURL(e),o.download=t,o.click(),this.j.progressbar.showFileUploadAnimation(),n.Dom.safeRemove(o),URL.revokeObjectURL(o.href)}catch(t){t.message&&e.alert(t.message)}finally{e.progressbar.progress(100),await e.async.delay(200),e.progressbar.hide()}}static getValue(e){let[t]=(0,s.previewBox)(e),i=[];return e.o.exportDocs.pdf.externalFonts.forEach(e=>{/^</.test(e)?i.push(e):i.push(`<link rel="stylesheet" href="${e}">`)}),i.push(`<style>${(0,c.generateCriticalCSS)(e)}</style>`),i.push(`<style>${e.o.exportDocs.css}</style>`),i.push(t.innerHTML),i.join(`
|
|
427
|
+
</div>`}update(){this.button.update(),this.lockUpdate=!0,this.colors.forEach(e=>{e.value!==this.state[e.state.name]&&(e.value=this.state[e.state.name])}),this.lockUpdate=!1}constructor(e,t,i){super(e),(0,o._)(this,"state",void 0),(0,o._)(this,"updateState",void 0),(0,o._)(this,"button",void 0),(0,o._)(this,"lockUpdate",void 0),(0,o._)(this,"colors",void 0),this.state=t,this.updateState=i,this.button=new l.UIGButton(this.j,this.state),this.lockUpdate=!1,this.colors=["bgStart","bgEnd","fontColor","borderColor","boxShadowColor","textShadowColor","previewBgColor"].map(e=>new c.ColorInput(this.j,{name:e,onChange:t=>{this.lockUpdate||("bgEnd"===e&&t!==this.state.bgStart&&this.updateState("solid",!1),this.updateState(e,t))}}).setMod("slim",!0)),this.setMod("mode","default");let n=this.getElm("button");(0,s.assert)(null!=n,"button element does not exists"),n.appendChild(this.button.container);let r=this.getElm("colors");(0,s.assert)(null!=r,"colors element does not exists"),this.colors.forEach(e=>{r.appendChild(e.container)}),this.update()}}d=(0,n.__decorate)([r.component],d)},8390:function(e,t,i){"use strict";var o=i(82749);i(89683);var n=i(2748),r=i(36409),s=i(50911),a=i(2692);class l extends s.Plugin{afterInit(e){e.registerCommand("changeCase",{exec:(t,i,o)=>{o=o.toLowerCase();let r=e.s.range,{startContainer:s,startOffset:a}=r;if(e.s.isCollapsed()){let t=e.s.current(!0);t&&t.parentElement&&this.applyCase(o,t.parentElement),r.setStart(s,a),e.s.selectRange(r)}else{let t=r.cloneRange(),i=r.cloneRange(),s=e.createInside.fake(),a=e.createInside.fake();t.collapse(!0),i.collapse(!1),t.insertNode(s),i.insertNode(a),n.Dom.between(s,a,e=>{this.applyCase(o,e)}),r.setStartAfter(s),r.setEndBefore(a),e.s.selectRange(r),n.Dom.safeRemove(s),n.Dom.safeRemove(a)}}})}applyCase(e,t){if(n.Dom.isText(t)){let i=t.nodeValue;i&&(t.nodeValue=(t=>{switch(e){case"lowercase":return t.toLowerCase();case"uppercase":return t.toUpperCase();default:return t.split(" ").map(r.ucfirst).join(" ")}})(i))}else n.Dom.each(t,t=>{this.applyCase(e,t)})}beforeDestruct(e){}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"changeCase",group:"font-style"}])}}(0,o._)(l,"requires",["license"]),a.JoditPro.plugins.add("change-case",l)},89683:function(e,t,i){"use strict";var o=i(91729),n=i.n(o),r=i(6441),s=i(86583);r.Config.prototype.controls.changeCase={tooltip:"Change case",icon:n(),list:["lowercase","UPPERCASE","Title Case"],isDisabled:e=>!e.s.current(),exec(e,t,{control:i}){let o=i.command+"Selected",n=i.args&&i.args[0]||(0,s.dataBind)(e,o);if(!n||!i.command)return!1;(0,s.dataBind)(e,o,n),e.execCommand(i.command,null,n)},command:"changeCase"}},57722:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(88902);var r=i(90142),s=i(99131),a=i(65478),l=i(2748),c=i(4510),d=i(5700),u=i(50911),h=i(10830),p=i(56917),f=i(78584),m=i(21491),g=i(2692);class b extends u.Plugin{afterInit(e){e.e.on("openChartEditor",this.openEditor).on("removeChart",this.removeChart).on("isChartEditorOpened",()=>!!this.__dialog?.isOpened),e.registerCommand("insertChart",()=>(this.openEditor(),!1)),this.__decorateAll()}beforeDestruct(){this.closePopup(),this.__popup?.destruct(),this.__dialog?.destruct()}openEditor(e){let t=(0,s.findChart)(this.j,e??null),i=t&&(0,s.readChartData)(this.j,t)||(0,s.defaultChartData)(this.j);this.closePopup(),this.j.s.save();let o=this.__getDialog(),n=this.__editor;n&&(n.setData(i),o.setHeader(this.j.i18n(t?"Edit chart":"Insert chart")).setFooter([(0,h.Button)(o,"cancel","Cancel","default").onAction(()=>{o.close()}),(0,h.Button)(o,"ok",t?"Save":"Insert","primary").onAction(()=>{this.__save(t,n.getData()),o.close()})]).open())}removeChart(e){let t=(0,s.findChart)(this.j,e??this.__target);this.closePopup(),t&&(this.j.s.setCursorAfter(t),l.Dom.safeRemove(t),this.j.synchronizeValues())}__save(e,t){e?(0,s.applyChartData)(this.j,e,t):(e=(0,s.createChart)(this.j,t),this.j.s.restore(),this.j.s.insertNode(e,!1,!1)),this.j.s.setCursorAfter(e),this.j.synchronizeValues()}__getDialog(){if(!this.__dialog){let{dialog:e}=this.j.o.chart;this.__dialog=new f.Dialog({language:this.j.o.language,theme:this.j.o.theme,shadowRoot:this.j.o.shadowRoot,events:this.j.o.events}),this.__editor=new r.UIChartEditor(this.j),this.__dialog.setContent(this.__editor).setSize(e.width,e.height),this.__dialog.e.on("beforeClose",()=>{this.j.s.restore()})}return this.__dialog}onClick(e){let t=(0,s.findChart)(this.j,e.target);t?this.openPopup(t):this.closePopup()}onDblClick(e){let t=(0,s.findChart)(this.j,e.target);t&&this.openEditor(t)}onOutsideClick(){this.closePopup()}openPopup(e){if(this.j.o.readonly||!this.j.o.chart.popup.length)return;this.__popup||(this.__popup=new p.Popup(this.j,!1),this.__toolbar=(0,m.makeCollection)(this.j,this.__popup));let t=this.__popup,i=this.__toolbar;i&&(this.__target=e,i.build(this.j.o.chart.popup,e),t.setContent(i.container),t.isOpened?t.updatePosition():t.open(()=>(0,d.position)(e,this.j)))}closePopup(){this.__target=null,this.__popup?.close()}onChange(){this.__decorateAll(),this.__target&&!this.j.editor.contains(this.__target)&&this.closePopup()}__decorateAll(){let e=!1;(0,c.toArray)(this.j.editor.querySelectorAll(`figure[${s.CHART_ATTR}]`)).forEach(t=>{(0,s.isChartElement)(t,this.j.o.chart.className)&&((0,s.decorateChart)(this.j,t),e=this.__syncResized(t)||e,e=this.__renderMissing(t)||e)}),e&&this.j.synchronizeValues()}__renderMissing(e){if(e.querySelector("svg"))return!1;let t=(0,s.readChartData)(this.j,e);return!!t&&((0,s.applyChartData)(this.j,e,t),!0)}__syncResized(e){let t=(0,s.readChartData)(this.j,e);if(!t)return!1;let i=(0,s.pixels)(e.style.width)||t.width,o=(0,s.pixels)(e.style.height)||t.height;return(i!==t.width||o!==t.height)&&((0,s.applyChartData)(this.j,e,{...t,width:i,height:o}),!0)}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"chart",group:"insert"}]),(0,o._)(this,"__dialog",null),(0,o._)(this,"__editor",null),(0,o._)(this,"__popup",null),(0,o._)(this,"__toolbar",null),(0,o._)(this,"__target",null)}}(0,o._)(b,"requires",["license"]),(0,n.__decorate)([a.autobind],b.prototype,"openEditor",null),(0,n.__decorate)([a.autobind],b.prototype,"removeChart",null),(0,n.__decorate)([(0,a.watch)(":click")],b.prototype,"onClick",null),(0,n.__decorate)([(0,a.watch)(":dblclick")],b.prototype,"onDblClick",null),(0,n.__decorate)([(0,a.watch)(":outsideClick")],b.prototype,"onOutsideClick",null),(0,n.__decorate)([(0,a.watch)([":change",":afterSetMode"]),(0,a.debounce)()],b.prototype,"onChange",null),g.JoditPro.plugins.add("chart",b)},88902:function(e,t,i){"use strict";var o=i(97467),n=i.n(o),r=i(6441),s=i(12153);r.Config.prototype.chart={className:"jodit-chart",types:["bar","horizontalBar","line","area","pie","donut","radar"],defaultType:"bar",defaultTitle:"Sample chart",defaultPoints:[{label:"Item 1",value:10},{label:"Item 2",value:20},{label:"Item 3",value:15},{label:"Item 4",value:25},{label:"Item 5",value:30}],colors:["#2a78d6","#eb6834","#1baf7a","#eda100","#e87ba4","#008300","#6250d6","#e34948"],defaultBackground:"#ffffff",defaultTextColor:"#111827",defaultBorderColor:"#e5e7eb",allowChangeBackground:!0,allowChangeTextColor:!0,allowChangeBorderColor:!0,fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",width:600,height:400,popup:["chartEdit","chartRemove"],dialog:{width:620,height:720}},r.Config.prototype.controls.chart={tooltip:"Insert chart",icon:"chart",isActive:e=>!!e.e.fire("isChartEditorOpened"),exec(e){e.e.fire("openChartEditor")}},r.Config.prototype.controls.chartEdit={tooltip:"Edit chart",icon:"pencil",exec(e,t){e.e.fire("openChartEditor",t)}},r.Config.prototype.controls.chartRemove={tooltip:"Delete chart",icon:"bin",exec(e,t){e.e.fire("removeChart",t)}},r.Config.prototype.allowResizeTags=new Set([...r.Config.prototype.allowResizeTags,"figure"]),s.Icon.set("chart",n())},99131:function(e,t,i){"use strict";i.d(t,{applyChartData:function(){return g},cloneChartData:function(){return d},createChart:function(){return b},decorateChart:function(){return m},defaultChartData:function(){return f},findChart:function(){return h},isChartElement:function(){return u},normalizePoint:function(){return c},pixels:function(){return v},readChartData:function(){return p}});var o=i(75787),n=i(2748),r=i(70799),s=i(29960);let a="data-jodit-chart",l=["bar","horizontalBar","line","area","pie","donut","radar"];function c(e){let t=Number(e.value),i={label:(e.label??"")+"",value:isFinite(t)?t:0};return e.color&&(i.color=e.color+""),i}function d(e){return{...e,points:e.points.map(e=>({...e}))}}function u(e,t){return n.Dom.isTag(e,"figure")&&(e.hasAttribute(a)||e.classList.contains(t))}function h(e,t){return n.Dom.closest(t,t=>u(t,e.o.chart.className),e.editor)}function p(e,t){let i=(0,s.attr)(t,a);if(!i)return null;try{var o,n,d;let t,s;return o=JSON.parse(i),n=f(e),t=Number(o.width),s=Number(o.height),{type:(d=o.type,l.includes(d))?o.type:n.type,title:(o.title??n.title)+"",points:Array.isArray(o.points)?o.points.map(c):n.points.map(c),width:t>0?Math.round(t):n.width,height:s>0?Math.round(s):n.height,background:(0,r.isString)(o.background)?o.background:n.background,textColor:(0,r.isString)(o.textColor)?o.textColor:n.textColor,borderColor:(0,r.isString)(o.borderColor)?o.borderColor:n.borderColor}}catch{return null}}function f(e){let{chart:t}=e.o;return{type:t.defaultType,title:t.defaultTitle,points:t.defaultPoints.map(c),width:t.width,height:t.height,background:t.defaultBackground,textColor:t.defaultTextColor,borderColor:t.defaultBorderColor}}function m(e,t){(0,s.attr)(t,{class:e.o.chart.className,contenteditable:!1})}function g(e,t,i){let{chart:n}=e.o;m(e,t),(0,s.attr)(t,a,JSON.stringify(i)),t.style.width=i.width+"px",t.style.maxWidth="100%",t.style.height="",t.innerHTML=(0,o.renderChart)(i,{colors:n.colors,fontFamily:n.fontFamily})}function b(e,t){let i=e.createInside.element("figure");return g(e,i,t),i}function v(e){return/^\d+(\.\d+)?px$/.test(e)?Math.round(parseFloat(e)):0}i.d(t,["CHART_ATTR",0,a,"CHART_TYPE_TITLES",0,{bar:"Bar chart",horizontalBar:"Horizontal bar",line:"Line chart",area:"Area chart",pie:"Pie chart",donut:"Donut chart",radar:"Radar chart"}])},93054:function(e,t,i){"use strict";i.d(t,{renderBar:function(){return n},renderHorizontalBar:function(){return r}});var o=i(36838);function n(e,t){let i=(0,o.ticks)(e.points),n=i[i.length-1],r=Math.max(...i.map(e=>(0,o.textWidth)((0,o.formatValue)(e),12))),s=(0,o.plotBox)(e,{x:r+12,y:28,width:0,height:28}),a=(0,o.chartTheme)(e),l=[(0,o.svgOpen)(e,t)];i.forEach(e=>{let t=s.y+s.height-e/n*s.height;l.push(`<line x1="${(0,o.num)(s.x)}" y1="${(0,o.num)(t)}" x2="${(0,o.num)(s.x+s.width)}" y2="${(0,o.num)(t)}" stroke="${a.grid}" stroke-dasharray="3 3"/>`,`<text x="${(0,o.num)(s.x-8)}" y="${(0,o.num)(t+4)}" font-size="12" fill="${a.inkMuted}" text-anchor="end">${(0,o.esc)((0,o.formatValue)(e))}</text>`)});let c=e.points.length||1,d=s.width/c,u=Math.max(2,.6*d),h=s.y+s.height;return e.points.forEach((e,i)=>{let r=(0,o.pointColor)(e,i,t),c=(e.value>0?e.value:0)/n*s.height,p=s.x+i*d+(d-u)/2,f=p+u/2;l.push(`<path d="${(0,o.roundedBarPath)(p,h-c,u,c,4,"top")}" fill="${r}"><title>${(0,o.esc)(e.label)}: ${(0,o.esc)((0,o.formatValue)(e.value))}</title></path>`,(0,o.valuePill)(f,h-c-18,e.value,r,a),`<text x="${(0,o.num)(f)}" y="${(0,o.num)(h+20)}" font-size="13" fill="${a.inkMuted}" text-anchor="middle">${(0,o.esc)((0,o.truncate)(e.label))}</text>`)}),l.push(`<line x1="${(0,o.num)(s.x)}" y1="${(0,o.num)(h)}" x2="${(0,o.num)(s.x+s.width)}" y2="${(0,o.num)(h)}" stroke="${a.border}"/>`,(0,o.svgClose)()),l.join("")}function r(e,t){let i=(0,o.ticks)(e.points),n=i[i.length-1],r=Math.min(160,Math.max(...e.points.map(e=>(0,o.textWidth)((0,o.truncate)(e.label),13)))),s=(0,o.plotBox)(e,{x:r+12,y:8,width:56,height:28}),a=(0,o.chartTheme)(e),l=[(0,o.svgOpen)(e,t)],c=s.y+s.height;i.forEach(e=>{let t=s.x+e/n*s.width;l.push(`<line x1="${(0,o.num)(t)}" y1="${(0,o.num)(s.y)}" x2="${(0,o.num)(t)}" y2="${(0,o.num)(c)}" stroke="${a.grid}" stroke-dasharray="3 3"/>`,`<text x="${(0,o.num)(t)}" y="${(0,o.num)(c+18)}" font-size="12" fill="${a.inkMuted}" text-anchor="middle">${(0,o.esc)((0,o.formatValue)(e))}</text>`)});let d=e.points.length||1,u=s.height/d,h=Math.max(2,.6*u);return e.points.forEach((e,i)=>{let r=(0,o.pointColor)(e,i,t),c=(e.value>0?e.value:0)/n*s.width,d=s.y+i*u+(u-h)/2,p=d+h/2;l.push(`<path d="${(0,o.roundedBarPath)(s.x,d,c,h,4,"right")}" fill="${r}"><title>${(0,o.esc)(e.label)}: ${(0,o.esc)((0,o.formatValue)(e.value))}</title></path>`,(0,o.valuePill)(s.x+c+12+(0,o.textWidth)((0,o.formatValue)(e.value),13)/2+8,p,e.value,r,a),`<text x="${(0,o.num)(s.x-12)}" y="${(0,o.num)(p+4.5)}" font-size="13" fill="${a.inkMuted}" text-anchor="end">${(0,o.esc)((0,o.truncate)(e.label))}</text>`)}),l.push(`<line x1="${(0,o.num)(s.x)}" y1="${(0,o.num)(s.y)}" x2="${(0,o.num)(s.x)}" y2="${(0,o.num)(c)}" stroke="${a.border}"/>`,(0,o.svgClose)()),l.join("")}},36838:function(e,t,i){"use strict";i.d(t,{chartTheme:function(){return s},esc:function(){return a},formatValue:function(){return c},num:function(){return l},plotBox:function(){return f},pointColor:function(){return u},roundedBarPath:function(){return b},svgClose:function(){return g},svgOpen:function(){return m},textWidth:function(){return p},ticks:function(){return h},truncate:function(){return d},valuePill:function(){return v}});let o="#ffffff",n="#111827";function r(e,t){let i=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);if(!i)return e;let[o,n,r]=[i[1],i[2],i[3]].map(e=>parseInt(e,16));return`rgba(${o}, ${n}, ${r}, ${t})`}function s(e){let t=e.textColor||n,i=e.background??o;return{surface:i||o,transparent:!i,border:e.borderColor||r(t,.12),grid:r(t,.12),ink:t,inkSecondary:r(t,.8),inkMuted:r(t,.6)}}function a(e){return(e+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function l(e){return Math.round(100*e)/100+""}function c(e){return l(e).replace(/\B(?=(\d{3})+(?!\d))/g," ")}function d(e,t=14){return e.length>t?e.slice(0,t-1)+"…":e}function u(e,t,i){let{colors:o}=i;return e.color||o[t%o.length]||"#2a78d6"}function h(e){let t=Math.max(0,...e.map(e=>e.value>0?e.value:0)),i=function(e){if(e<=0)return 1;let t=Math.pow(10,Math.floor(Math.log10(e))),i=e/t;return([1,2,2.5,5,10].find(e=>e>=i)??10)*t}((t||1)/4),o=Math.max(i,Math.ceil(t/i)*i),n=[];for(let e=0;e<=o+i/2;e+=i)n.push(Math.round(1e3*e)/1e3);return n}function p(e,t){return e.length*t*.58}function f(e,t){let i=24+40*!!e.title+t.y;return{x:24+t.x,y:i,width:Math.max(10,e.width-48-t.x-t.width),height:Math.max(10,e.height-i-24-t.height)}}function m(e,t){let i=s(e),o=e.title?` aria-label="${a(e.title)}"`:"",n=i.transparent?"":`<rect x="0.5" y="0.5" width="${e.width-1}" height="${e.height-1}" rx="12" fill="${i.surface}" stroke="${i.border}"/>`;return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${e.width} ${e.height}" width="100%" role="img"${o} font-family="${a(t.fontFamily)}">`+n+(e.title?`<text x="24" y="44" font-size="20" font-weight="600" fill="${i.ink}">${a(e.title)}</text>`:"")}function g(){return"</svg>"}function b(e,t,i,o,n,r){if(o<=0||i<=0)return"";let s=Math.min(n,i/2,o/2);return"top"===r?`M${l(e)},${l(t+o)}V`+l(t+s)+`a${l(s)},${l(s)} 0 0 1 ${l(s)},${l(-s)}`+"h"+l(i-2*s)+`a${l(s)},${l(s)} 0 0 1 ${l(s)},${l(s)}`+"V"+l(t+o)+"Z":`M${l(e)},${l(t)}H`+l(e+i-s)+`a${l(s)},${l(s)} 0 0 1 ${l(s)},${l(s)}`+"v"+l(o-2*s)+`a${l(s)},${l(s)} 0 0 1 ${l(-s)},${l(s)}`+"H"+l(e)+"Z"}function v(e,t,i,o,n){let r=c(i),s=p(r,13)+16;return`<rect x="${l(e-s/2)}" y="${l(t-11)}" width="${l(s)}" height="22" rx="6" fill="${o}" fill-opacity="0.14"/><text x="${l(e)}" y="${l(t+4.5)}" font-size="13" font-weight="600" fill="${n.inkSecondary}" text-anchor="middle">${a(r)}</text>`}i.d(t,["DEFAULT_BACKGROUND",0,o,"DEFAULT_TEXT_COLOR",0,n])},75787:function(e,t,i){"use strict";i.d(t,{renderChart:function(){return a}});var o=i(93054),n=i(73077),r=i(83349),s=i(67407);function a(e,t){switch(e.type){case"horizontalBar":return(0,o.renderHorizontalBar)(e,t);case"line":return(0,n.renderLine)(e,t,!1);case"area":return(0,n.renderLine)(e,t,!0);case"radar":return(0,s.renderRadar)(e,t);case"pie":return(0,r.renderPie)(e,t,!1);case"donut":return(0,r.renderPie)(e,t,!0);default:return(0,o.renderBar)(e,t)}}},73077:function(e,t,i){"use strict";i.d(t,{renderLine:function(){return n}});var o=i(36838);function n(e,t,i){let n=(0,o.ticks)(e.points),r=n[n.length-1],s=Math.max(...n.map(e=>(0,o.textWidth)((0,o.formatValue)(e),12))),a=(0,o.plotBox)(e,{x:s+12,y:28,width:0,height:28}),l=(0,o.chartTheme)(e),c=[(0,o.svgOpen)(e,t)],d=a.y+a.height;n.forEach(e=>{let t=d-e/r*a.height;c.push(`<line x1="${(0,o.num)(a.x)}" y1="${(0,o.num)(t)}" x2="${(0,o.num)(a.x+a.width)}" y2="${(0,o.num)(t)}" stroke="${l.grid}" stroke-dasharray="3 3"/>`,`<text x="${(0,o.num)(a.x-8)}" y="${(0,o.num)(t+4)}" font-size="12" fill="${l.inkMuted}" text-anchor="end">${(0,o.esc)((0,o.formatValue)(e))}</text>`)});let u=e.points.length||1,h=a.width/u,p=e.points.length?(0,o.pointColor)(e.points[0],0,t):t.colors[0],f=e.points.map((e,t)=>({x:a.x+t*h+h/2,y:d-(e.value>0?e.value:0)/r*a.height}));if(f.length>1){let e=f.map((e,t)=>`${t?"L":"M"}${(0,o.num)(e.x)},${(0,o.num)(e.y)}`).join("");i&&c.push(`<path d="${e}L${(0,o.num)(f[f.length-1].x)},${(0,o.num)(d)}L${(0,o.num)(f[0].x)},${(0,o.num)(d)}Z" fill="${p}" fill-opacity="0.18"/>`),c.push(`<path d="${e}" fill="none" stroke="${p}" stroke-width="2" stroke-linejoin="round" stroke-linecap="round"/>`)}return e.points.forEach((e,t)=>{let{x:i,y:n}=f[t];c.push(`<circle cx="${(0,o.num)(i)}" cy="${(0,o.num)(n)}" r="5" fill="${p}" stroke="${l.surface}" stroke-width="2"><title>${(0,o.esc)(e.label)}: ${(0,o.esc)((0,o.formatValue)(e.value))}</title></circle>`,(0,o.valuePill)(i,n-20,e.value,p,l),`<text x="${(0,o.num)(i)}" y="${(0,o.num)(d+20)}" font-size="13" fill="${l.inkMuted}" text-anchor="middle">${(0,o.esc)((0,o.truncate)(e.label))}</text>`)}),c.push(`<line x1="${(0,o.num)(a.x)}" y1="${(0,o.num)(d)}" x2="${(0,o.num)(a.x+a.width)}" y2="${(0,o.num)(d)}" stroke="${l.border}"/>`,(0,o.svgClose)()),c.join("")}},83349:function(e,t,i){"use strict";i.d(t,{renderPie:function(){return r}});var o=i(36838);function n(e,t,i,n){return`${(0,o.num)(e+i*Math.cos(n))},${(0,o.num)(t+i*Math.sin(n))}`}function r(e,t,i){let r=e.points.filter(e=>e.value>0),s=r.reduce((e,t)=>e+t.value,0),a=e.width<420,l=a?e.width-48:Math.min(180,Math.max(120,.3*e.width)),c=26*r.length;if(a){let t=48+40*!!e.title+160+c+12;e={...e,height:Math.max(e.height,t)}}let d=(0,o.plotBox)(e,{x:0,y:0,width:a?0:l+24,height:a?c+12:0}),u=Math.max(10,Math.min(d.width,d.height)/2-4),h=i?.58*u:0,p=d.x+d.width/2,f=d.y+d.height/2,m=(0,o.chartTheme)(e),g=[(0,o.svgOpen)(e,t)],b=-Math.PI/2;r.forEach((e,i)=>{let r=(0,o.pointColor)(e,i,t),a=s?e.value/s*Math.PI*2:0,l=s?Math.round(e.value/s*1e3)/10:0;g.push(`<path d="${function(e,t,i,r,s,a){if(a-s>=2*Math.PI-1e-4){let n=r?` M${(0,o.num)(e-r)},${(0,o.num)(t)} a${(0,o.num)(r)},${(0,o.num)(r)} 0 1 0 ${(0,o.num)(2*r)},0 a${(0,o.num)(r)},${(0,o.num)(r)} 0 1 0 ${(0,o.num)(-(2*r))},0`:"";return`M${(0,o.num)(e-i)},${(0,o.num)(t)} a${(0,o.num)(i)},${(0,o.num)(i)} 0 1 0 ${(0,o.num)(2*i)},0 a${(0,o.num)(i)},${(0,o.num)(i)} 0 1 0 ${(0,o.num)(-(2*i))},0${n}`}let l=+(a-s>Math.PI),c=["M"+n(e,t,i,s),`A${(0,o.num)(i)},${(0,o.num)(i)} 0 ${l} 1 ${n(e,t,i,a)}`];return r?c.push("L"+n(e,t,r,a),`A${(0,o.num)(r)},${(0,o.num)(r)} 0 ${l} 0 ${n(e,t,r,s)}`):c.push(`L${(0,o.num)(e)},${(0,o.num)(t)}`),c.join("")+"Z"}(p,f,u,h,b,b+a)}" fill="${r}" stroke="${m.surface}" stroke-width="2" fill-rule="evenodd"><title>${(0,o.esc)(e.label)}: ${(0,o.esc)((0,o.formatValue)(e.value))} (${(0,o.num)(l)}%)</title></path>`),b+=a}),i&&s&&g.push(`<text x="${(0,o.num)(p)}" y="${(0,o.num)(f+7)}" font-size="20" font-weight="600" fill="${m.ink}" text-anchor="middle">${(0,o.esc)((0,o.formatValue)(s))}</text>`);let v=a?24:e.width-24-l,y=Math.max(6,Math.floor((l-22-48)/(13*.58))),w=a?d.y+d.height+12+13:f-c/2+13;return r.forEach((e,i)=>{let n=(0,o.pointColor)(e,i,t),r=w+26*i,a=s?Math.round(e.value/s*1e3)/10:0;g.push(`<rect x="${(0,o.num)(v)}" y="${(0,o.num)(r-7)}" width="14" height="14" rx="4" fill="${n}"/>`,`<text x="${(0,o.num)(v+22)}" y="${(0,o.num)(r+4.5)}" font-size="13" fill="${m.inkSecondary}">${(0,o.esc)((0,o.truncate)(e.label,y))}</text>`,`<text x="${(0,o.num)(v+l)}" y="${(0,o.num)(r+4.5)}" font-size="13" fill="${m.inkMuted}" text-anchor="end">${(0,o.num)(a)}%</text>`)}),g.push((0,o.svgClose)()),g.join("")}},67407:function(e,t,i){"use strict";i.d(t,{renderRadar:function(){return r}});var o=i(36838);function n(e,t,i,o,n){let r=-Math.PI/2+o/n*Math.PI*2;return{x:e+i*Math.cos(r),y:t+i*Math.sin(r),angle:r}}function r(e,t){let i=(0,o.ticks)(e.points),r=i[i.length-1],s=(0,o.plotBox)(e,{x:60,y:24,width:60,height:24}),a=s.x+s.width/2,l=s.y+s.height/2,c=Math.max(10,Math.min(s.width,s.height)/2-4),d=Math.max(1,e.points.length),u=(0,o.chartTheme)(e),h=[(0,o.svgOpen)(e,t)],p=e.points.length?(0,o.pointColor)(e.points[0],0,t):t.colors[0];i.forEach((t,s)=>{if(!t)return;let p=t/r*c,f=e.points.map((e,t)=>n(a,l,p,t,d)).map((e,t)=>`${t?"L":"M"}${(0,o.num)(e.x)},${(0,o.num)(e.y)}`).join("");h.push(d>2?`<path d="${f}Z" fill="none" stroke="${u.grid}" stroke-dasharray="3 3"/>`:`<circle cx="${(0,o.num)(a)}" cy="${(0,o.num)(l)}" r="${(0,o.num)(p)}" fill="none" stroke="${u.grid}" stroke-dasharray="3 3"/>`,s===i.length-1?`<text x="${(0,o.num)(a+6)}" y="${(0,o.num)(l-p+12)}" font-size="12" fill="${u.inkMuted}">${(0,o.esc)((0,o.formatValue)(t))}</text>`:"")}),e.points.forEach((e,t)=>{let i,r=n(a,l,c,t,d),s=n(a,l,c+18,t,d);h.push(`<line x1="${(0,o.num)(a)}" y1="${(0,o.num)(l)}" x2="${(0,o.num)(r.x)}" y2="${(0,o.num)(r.y)}" stroke="${u.grid}"/>`,`<text x="${(0,o.num)(s.x)}" y="${(0,o.num)(s.y+4.5)}" font-size="13" fill="${u.inkMuted}" text-anchor="${.2>Math.abs(i=Math.cos(s.angle))?"middle":i>0?"start":"end"}">${(0,o.esc)((0,o.truncate)(e.label))}</text>`)});let f=e.points.map((e,t)=>n(a,l,(e.value>0?e.value:0)/r*c,t,d));if(f.length>1){let e=f.map((e,t)=>`${t?"L":"M"}${(0,o.num)(e.x)},${(0,o.num)(e.y)}`).join("");h.push(`<path d="${e}Z" fill="${p}" fill-opacity="0.18" stroke="${p}" stroke-width="2" stroke-linejoin="round"/>`)}return e.points.forEach((e,t)=>{let{x:i,y:n}=f[t];h.push(`<circle cx="${(0,o.num)(i)}" cy="${(0,o.num)(n)}" r="5" fill="${p}" stroke="${u.surface}" stroke-width="2"><title>${(0,o.esc)(e.label)}: ${(0,o.esc)((0,o.formatValue)(e.value))}</title></circle>`)}),h.push((0,o.svgClose)()),h.join("")}},90142:function(e,t,i){"use strict";i.d(t,{UIChartEditor:function(){return p}});var o=i(82749),n=i(31635),r=i(99131),s=i(75787),a=i(36838),l=i(65478),c=i(2748),d=i(38837),u=i(29960),h=i(67510);class p extends h.UIElement{className(){return"UIChartEditor"}render(){return`<div>
|
|
428
|
+
<div class="&__preview">
|
|
429
|
+
<div class="&__colors"></div>
|
|
430
|
+
<div class="&__canvas"></div>
|
|
431
|
+
</div>
|
|
432
|
+
<div class="&__fields"></div>
|
|
433
|
+
<div class="&__points-header">
|
|
434
|
+
<span class="&__points-title">~Data points~</span>
|
|
435
|
+
<span class="&__summary"></span>
|
|
436
|
+
<span class="&__add"></span>
|
|
437
|
+
</div>
|
|
438
|
+
<div class="&__points"></div>
|
|
439
|
+
</div>`}syncTransparent(){let e=!this.state.background;this.transparentButton.classList.toggle(this.getFullElName("transparent","active"),e),(0,u.attr)(this.transparentButton,"aria-pressed",e)}createColorInput(e,t){let i=this.j.c.element("input",{type:"color",name:e,title:this.j.i18n("background"===e?"Background":"Text color"),class:this.getFullElName("color-input")});return this.j.e.on(i,"input",()=>{t(i.value),this.refresh()}),i}colorField(e,t){return this.j.c.element("label",{class:this.getFullElName("color-field")},[t,this.j.c.span(this.getFullElName("color-label"),this.j.i18n(e))])}setData(e){this.state=(0,r.cloneChartData)(e),this.typeSelect.value=this.state.type,this.titleInput.value=this.state.title,this.backgroundInput.value=this.state.background||a.DEFAULT_BACKGROUND,this.textColorInput.value=this.state.textColor||a.DEFAULT_TEXT_COLOR,this.borderColorInput.value=this.state.borderColor||this.j.o.chart.defaultBorderColor,this.syncTransparent(),this.rebuildPoints(),this.__render()}getData(){return{...this.state,title:this.state.title.trim(),points:this.state.points.map(r.normalizePoint)}}addPoint(){let{points:e}=this.state;e.push({label:this.j.i18n("Item")+" "+(e.length+1),value:0}),this.rebuildPoints(),this.refresh();let t=this.getElms("point-label"),i=t[t.length-1]?.querySelector("input");i?.focus()}removePoint(e){this.state.points.splice(e,1),this.rebuildPoints(),this.refresh()}rebuildPoints(){let e=this.getElm("points");(0,d.assert)(null!=e,"points element does not exist"),c.Dom.detach(e),this.state.points.forEach((t,i)=>{e.appendChild(this.createPointRow(t,i))})}createPointRow(e,t){let{j:i}=this,o=new h.UIInput(i,{name:"label",label:"Label",value:e.label,className:this.getFullElName("point-label"),onChange:t=>{e.label=t,this.refresh()}}),n=new h.UIInput(i,{name:"value",label:"Value",type:"number",value:e.value,className:this.getFullElName("point-value"),onChange:t=>{let i=Number(t);e.value=isFinite(i)?i:0,this.refresh()}}),r=i.c.element("input",{type:"color",title:i.i18n("Color"),class:this.getFullElName("point-color"),value:(0,a.pointColor)(e,t,{colors:i.o.chart.colors,fontFamily:""})});i.e.on(r,"input",()=>{e.color=r.value,this.refresh()});let s=(0,h.Button)(i,"bin","","default").setMod("variant","remove").onAction(()=>this.removePoint(t));(0,u.attr)(s.container,"title",i.i18n("Remove point"));let l=i.c.element("span",{class:this.getFullElName("point-grip"),title:i.i18n("Drag to reorder")}),c=i.c.div(this.getFullElName("point"),[l,o.container,n.container,r,s.container]);return this.bindDragAndDrop(c,l,t),c}bindDragAndDrop(e,t,i){let{j:o}=this,n=t=>{e.classList.toggle(this.getFullElName("point","drop","before"),"before"===t),e.classList.toggle(this.getFullElName("point","drop","after"),"after"===t)},r=t=>{let i=e.getBoundingClientRect();return t.clientY>i.top+i.height/2};(0,u.attr)(t,"draggable",!0),o.e.on(t,"dragstart",t=>{this.__dragIndex=i,e.classList.add(this.getFullElName("point","dragging")),t.dataTransfer&&(t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",i+""),t.dataTransfer.setDragImage(e,10,10))}).on(t,"dragend",()=>{this.__dragIndex=-1,e.classList.remove(this.getFullElName("point","dragging")),this.getElms("point").forEach(e=>{e.classList.remove(this.getFullElName("point","drop","before"),this.getFullElName("point","drop","after"))})}),o.e.on(e,"dragover",e=>{this.__dragIndex<0||this.__dragIndex===i||(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="move"),n(r(e)?"after":"before"))}).on(e,"dragleave",()=>n(null)).on(e,"drop",e=>{this.__dragIndex<0||this.__dragIndex===i||(e.preventDefault(),this.movePoint(this.__dragIndex,i,r(e)),this.__dragIndex=-1)})}movePoint(e,t,i){let{points:o}=this.state;if(e===t||!o[e]||!o[t])return;let[n]=o.splice(e,1),r=t>e?t-1:t;i&&r++,o.splice(r,0,n),this.rebuildPoints(),this.refresh()}refresh(){this.__render()}__render(){let{chart:e}=this.j.o,t=this.getElm("canvas"),i=this.getElm("summary");if(t&&(t.innerHTML=(0,s.renderChart)(this.state,{colors:e.colors,fontFamily:e.fontFamily})),i){let e=this.state.points.reduce((e,t)=>e+t.value,0);i.textContent=this.state.points.length+" "+this.j.i18n("points")+" · "+this.j.i18n("Total")+": "+(0,a.formatValue)(e)}}constructor(e){super(e),(0,o._)(this,"state",void 0),(0,o._)(this,"typeSelect",void 0),(0,o._)(this,"titleInput",void 0),(0,o._)(this,"addButton",void 0),(0,o._)(this,"backgroundInput",void 0),(0,o._)(this,"textColorInput",void 0),(0,o._)(this,"borderColorInput",void 0),(0,o._)(this,"transparentButton",void 0),(0,o._)(this,"__dragIndex",-1),this.typeSelect=new h.UISelect(e,{name:"type",label:"Chart type",options:e.o.chart.types.map(t=>({value:t,text:e.i18n(r.CHART_TYPE_TITLES[t])})),onChange:e=>{this.state.type=e,this.refresh()}}),this.titleInput=new h.UIInput(e,{name:"title",label:"Chart title",placeholder:"Optional",onChange:e=>{this.state.title=e,this.refresh()}}),this.addButton=(0,h.Button)(e,"plus","Add point").onAction(this.addPoint.bind(this));let t=this.getElm("fields");(0,d.assert)(null!=t,"fields element does not exist"),t.appendChild(this.typeSelect.container),t.appendChild(this.titleInput.container);let i=this.getElm("add");(0,d.assert)(null!=i,"add element does not exist"),i.appendChild(this.addButton.container),this.backgroundInput=this.createColorInput("background",e=>{this.state.background=e,this.syncTransparent()}),this.textColorInput=this.createColorInput("textColor",e=>{this.state.textColor=e}),this.borderColorInput=this.createColorInput("borderColor",e=>{this.state.borderColor=e}),this.transparentButton=e.c.element("button",{type:"button",name:"transparent",class:this.getFullElName("transparent")}),e.e.on(this.transparentButton,"click",()=>{this.state.background=this.state.background?"":this.backgroundInput.value,this.syncTransparent(),this.refresh()});let n=this.getElm("colors");(0,d.assert)(null!=n,"colors element does not exist");let{chart:s}=e.o;s.allowChangeBackground&&n.appendChild(this.colorField("Background",this.backgroundInput)),s.allowChangeTextColor&&n.appendChild(this.colorField("Text",this.textColorInput)),s.allowChangeBorderColor&&n.appendChild(this.colorField("Border",this.borderColorInput)),s.allowChangeBackground&&n.appendChild(this.colorField("Transparent",this.transparentButton)),n.childNodes.length||c.Dom.safeRemove(n)}}(0,n.__decorate)([(0,l.debounce)(50)],p.prototype,"refresh",null),p=(0,n.__decorate)([l.component],p)},29528:function(e,t,i){"use strict";var o=i(82749),n=i(31635),r=i(45128),s=i(65478),a=i(2748),l=i(50911),c=i(2692);class d extends l.Plugin{afterInit(e){e.e.on("afterGenerateColorPicker",this.onAfterGenerateColorPicker)}onAfterGenerateColorPicker(e,t,i,o){a.Dom.detach(t);let n=new r.ColorInput(this.j,{value:o||"#000",onChange:i});t.appendChild(n.container)}beforeDestruct(e){e.e.off("afterGenerateColorPicker",this.onAfterGenerateColorPicker)}constructor(...e){super(...e),(0,o._)(this,"hasStyle",!c.JoditPro.fatMode)}}(0,o._)(d,"requires",["license"]),(0,n.__decorate)([s.autobind],d.prototype,"onAfterGenerateColorPicker",null),c.JoditPro.plugins.add("color-picker",d)},45128:function(e,t,i){"use strict";i.d(t,{ColorInput:function(){return h}});var o=i(82749),n=i(31635),r=i(46146),s=i(82758),a=i(65478),l=i(21537),c=i(38837),d=i(67510),u=i(41409);class h extends d.UIInput{className(){return"ColorInput"}afterSetMode(e,t){"slim"===e&&t&&this.nativeInput.setAttribute("readonly","true")}onChangeSelfValue(){this.nativeInput.style.backgroundColor=this.value}onEscKeyDown(e){e.key===s.KEY_ESC&&this.popup?.close()}constructor(e,t){super(e,t),(0,o._)(this,"trigger",void 0),(0,o._)(this,"popup",void 0);let i=new d.Popup(e);this.popup=i,this.trigger=(0,d.Button)(this.j,"ok");let n=this.getElm("wrapper");(0,c.assert)(null!=n,"wrapper element does not exist"),n.appendChild(this.trigger.container),this.trigger.container.classList.add(this.getFullElName("trigger")),this.trigger.onAction(()=>{this.state.onChange?.(this.value),i.close()}),i.setMod("padding",!1).setMod("max-height",!1);let s=this.j.create.div(this.getFullElName("picker")),a=r.createPicker(s,{paletteEditable:!0,showAlpha:!0,palette:"PALETTE_MATERIAL_CHROME"}).on("change",(e,t)=>{this.isFocused||(this.value=r.parseColor(t||"","hex"))});this.j.e.on(this,"change",()=>{let e;e=this.value,r.parseColor(e,"hex")!==a.color&&(a.color=this.value)}),i.setContent(s),this.j.e.on(this.nativeInput,"click",()=>{i.parentElement=this,this.jodit instanceof u.Dialog&&i.setZIndex(this.jodit.getZIndex()+1),i.open(()=>(0,l.position)(this.container))}),this.onChangeValue(),this.onChangeSelfValue()}}(0,n.__decorate)([(0,a.watch)(":change")],h.prototype,"onChangeSelfValue",null),(0,n.__decorate)([(0,a.watch)("nativeInput:keydown")],h.prototype,"onEscKeyDown",null),h=(0,n.__decorate)([a.component],h)},3536:function(e,t,i){"use strict";var o=i(4941),n=i(41943),r=i(46995),s=i.n(r),a=i(6441);a.Config.prototype.emoji={data:()=>n,enableAutoComplete:!0,recentCountLimit:10},a.Config.prototype.controls.emoji={tooltip:"Insert Emoji",icon:s(),popup(e,t,i){e.s.save();let n=e.getInstance(o.Emoji);return e.e.off(n,"insert").on(n,"insert",t=>{e.s.restore(),e.s.insertNode(e.createInside.text(t),!0),i()}),e.e.one("beforePopupClose",()=>{e.s.restore()}),n.reset(),n.container}}},85174:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(3536);var r=i(4941),s=i(65478),a=i(49055),l=i(20356),c=i(2692);class d extends l.Plugin{async afterInit(e){let t=await e.o.emoji.data();!e.isInDestruct&&(this.data={...t,emoji:t.emoji.map(r.Emoji.normalizeEmoji)},e.o.emoji.enableAutoComplete&&e.e.fire("registerAutocompleteSource",this.onAutoComplete))}onAutoComplete(e){return e.length>2&&":"===e[0]&&(e=e.substr(1).toLowerCase(),(0,a.trim)(e).length)?this.data.emoji.filter(t=>t.description?.indexOf(e)===0).sort((t,i)=>t.description.indexOf(e)-i.description.indexOf(e)).map(e=>({title:`${e.emoji} ${e.description}`,value:e.emoji})):[]}beforeDestruct(e){}constructor(...e){super(...e),(0,o._)(this,"hasStyle",!c.JoditPro.fatMode),(0,o._)(this,"buttons",[{name:"emoji",group:"insert"}]),(0,o._)(this,"data",void 0)}}(0,o._)(d,"requires",["autocomplete","license"]),(0,n.__decorate)([s.autobind],d.prototype,"onAutoComplete",null),c.JoditPro.plugins.add("emoji",d)},4941:function(e,t,i){"use strict";i.d(t,{Emoji:function(){return d}});var o=i(82749),n=i(31635),r=i(65478),s=i(2748),a=i(21537),l=i(67510);let c="Recently";class d extends l.UIElement{className(){return"Emoji"}get defaultList(){return this.recent.concat(this.data?this.data.emoji:[])}reset(){this.data&&(this.input.nativeInput.value="",this.setItems(this.defaultList),this.setActiveCategory(0))}setItems(e){this.items=e.map(d.normalizeEmoji),this.list.scrollTo(0,0),this.columns=0,this.renderWindow()}createContainer(e){let t=this.j.c.div("jodit-emoji");this.input=new l.UIInput(this.j,{name:"search",icon:"search",autocomplete:!1,clearButton:!0,placeholder:"Search emoji"}),this.input.container.classList.add(this.getFullElName("input")),this.categories=this.j.c.div(this.getFullElName("categories")),this.list=this.j.c.div(this.getFullElName("emojis"));let i=this.j.c.div(this.getFullElName("navigate"));return s.Dom.append(i,[this.categories,this.input.container]),s.Dom.append(t,[i,this.list]),t}setActiveCategory(e,t=!1){let i=this.getElms("category"),o=i[this.activeIndex];i[e]||(e=i.length-1);let n=i[e],r=this.getFullElName("category","active",!0);if(o&&o.classList.remove(r),n&&n.classList.add(r),t){let t=this.data?.categories[e],i=this.rows.find(e=>e.title===t);if(i){this.list.scrollTop=i.top+this.paddingTop,this.renderWindow();let e=this.cache[i.title??""];e&&e.parentNode===this.list&&(this.list.scrollTop=e.offsetTop-this.list.offsetTop)}}this.activeIndex=e}generateCategoriesList(e){return e.map((t,i)=>this.j.c.div(this.getFullElName("category"),{"data-index":i,title:this.j.i18n(t),style:{width:100/e.length+"%"}}))}measure(){let{list:e}=this,t=e.querySelector("."+this.getFullElName("emoji")),i=e.querySelector("."+this.getFullElName("category-title"));if(t?.offsetWidth){let e=parseFloat(this.j.ow.getComputedStyle(t).marginBottom);return{cellWidth:t.offsetWidth,rowHeight:t.offsetHeight+(e||0),titleHeight:i?.offsetHeight||t.offsetHeight}}if(this.cellWidth)return{cellWidth:this.cellWidth,rowHeight:this.rowHeight,titleHeight:this.titleHeight};let o=this.j.ow.getComputedStyle(e),n=parseFloat(o.getPropertyValue("--jd-jodit-emoji-item-size"))||parseFloat(o.getPropertyValue("--jodit-emoji-item-size"))||28;return{cellWidth:n,rowHeight:n+n/7,titleHeight:n}}buildRows(){let{list:e}=this,t=parseFloat(this.j.ow.getComputedStyle(e).paddingTop);isNaN(t)||(this.paddingTop=t);let{cellWidth:i,rowHeight:o,titleHeight:n}=this.measure(),r=Math.max(1,Math.floor((e.clientWidth||308)/i));if(r===this.columns&&i===this.cellWidth&&o===this.rowHeight&&n===this.titleHeight)return;this.columns=r,this.cellWidth=i,this.rowHeight=o,this.titleHeight=n,this.window=[-1,-1];let s=this.data?.categories??[],a=[],l="",d=0,u=e=>(e.top=d,d+=e.height,a.push(e),e);this.items.forEach(e=>{let t=-1===e.category?c:s[e.category]??"";t!==l&&u({title:l=t,items:[],top:0,height:n});let i=a[a.length-1];(void 0!==i.title||i.items.length>=r)&&u({items:[],top:0,height:o}),a[a.length-1].items.push(e)}),this.rows=a}renderWindow(){this.renderRows(!1)}renderRows(e){if(this.isDestructed)return;this.buildRows();let{rows:t,list:i}=this,o=0,n=t.length;if(this.virtual){let e=i.scrollTop-300,r=i.scrollTop+(i.clientHeight||300)+300;for(-1===(o=t.findIndex(t=>t.top+t.height>e))&&(o=t.length),n=o;n<t.length&&t[n].top<r;)n+=1}if(o===this.window[0]&&n===this.window[1])return;this.window=[o,n];let r=t.length?t[t.length-1].top+t[t.length-1].height:0,a=o<t.length?t[o].top:r,l=n>o?r-t[n-1].top-t[n-1].height:0,c=[];a>0&&c.push(this.spacer(this.spacerTop,a));for(let e=o;n>e;e+=1)c.push(...this.renderRow(t[e]));if(l>0&&c.push(this.spacer(this.spacerBottom,l)),s.Dom.detach(i),s.Dom.append(i,c),this.virtual&&i.clientWidth&&!(o>=n)){if(Math.max(1,Math.floor(i.clientWidth/this.cellWidth))!==this.columns&&!e){this.columns=0,this.renderRows(!0);return}this.verifyLayout(o,n)}}verifyLayout(e,t){let{rows:i,list:o}=this,n=e=>this.rowElement(e).offsetTop-o.offsetTop,r=e=>1>=Math.abs(n(e)-(this.paddingTop+e.top)),s=r(i[e]),a=i.findIndex((i,o)=>o>=e&&t>o&&void 0===i.title);if(s&&-1!==a){let e=i[a],o=this.rowElement(e),n=this.cache[this.cellKey(e.items[e.items.length-1])],l=i[a+1];s=r(e)&&n.offsetTop===o.offsetTop&&(!l||a+1>=t||r(l))}s||(this.virtual=!1,this.window=[-1,-1],this.renderRows(!0))}rowElement(e){return void 0!==e.title?this.cache[e.title]:this.cache[this.cellKey(e.items[0])]}cellKey(e){return e.emoji+e.category}spacer(e,t){return e.style.height=t+"px",e}renderRow(e){if(void 0!==e.title){let t=e.title;return this.cache[t]??=this.j.c.div(this.getFullElName("category-title"),{"data-index":t===c?-1:this.data?.categories.indexOf(t)??-1},t?this.j.i18n(t):""),[this.cache[t]]}return e.items.map(e=>{let t=this.cellKey(e);return this.cache[t]??=this.j.c.div(this.getFullElName("emoji"),{"data-value":e.emoji},e.emoji),this.cache[t]})}updateActiveCategory(){let e=this.list.scrollTop,t=this.data?.categories??[],i=0;this.rows.forEach(o=>{void 0!==o.title&&o.title!==c&&e>o.top+this.paddingTop-20&&(i=Math.max(0,t.indexOf(o.title)))}),this.setActiveCategory(i)}static isShortCat(e){return e&&(0,a.isString)(e.e)}static normalizeEmoji(e){return d.isShortCat(e)?{emoji:e.e,description:e.d,category:e.c,aliases:e.a,tags:e.t}:e}onInsertCode(e){this.jodit.e.fire(this,"insert",e);let t=this.map[e];if(t){let i=[...this.recent],o=i.findIndex(t=>t.emoji===e);-1!==o&&i.splice(o,1),i.unshift({...t,category:-1}),this.recent=i}}onScrollList(){this.j.async.requestAnimationFrame(()=>{this.renderWindow(),this.updateActiveCategory()})}onAfterOpenPopup(){this.renderWindow()}onClickCategory(e){this.clearFilter();let t=e.target;t.classList.contains(this.getFullElName("category"))&&this.setActiveCategory(parseInt((0,a.attr)(t,"-index")||"0",10)||0,!0)}onClickItem(e){let t=e.target;if(t.classList.contains(this.getFullElName("emoji"))){let e=(0,a.attr)(t,"-value")||"";e&&this.onInsertCode(e)}e.preventDefault(),e.stopPropagation()}onInputFilter(){let e=this.input.value.toLowerCase();if(!e.length)return this.setItems(this.defaultList);this.setItems(this.defaultList.filter(t=>{let i=d.normalizeEmoji(t);return i.description?.toLowerCase().includes(e)||i.tags?.join(" ").toLowerCase().includes(e)||i.aliases?.join(" ").toLowerCase().includes(e)}))}clearFilter(){this.input.nativeInput.value.length&&this.reset()}onReady(){this.j.e.on(this.input.nativeInput,"input",this.onInputFilter).on(this.categories,"click",this.onClickCategory).on(this.list,"scroll",this.onScrollList).on(this.list,"mousedown touchstart",this.onClickItem)}destruct(){return this.input.destruct(),super.destruct()}constructor(e){super(e),(0,o._)(this,"data",null),(0,o._)(this,"recent",[]),(0,o._)(this,"map",{}),(0,o._)(this,"activeIndex",0),(0,o._)(this,"cache",{}),(0,o._)(this,"items",[]),(0,o._)(this,"rows",[]),(0,o._)(this,"columns",0),(0,o._)(this,"cellWidth",0),(0,o._)(this,"rowHeight",0),(0,o._)(this,"titleHeight",0),(0,o._)(this,"paddingTop",0),(0,o._)(this,"window",[-1,-1]),(0,o._)(this,"virtual",!0),(0,o._)(this,"spacerTop",this.j.c.div(this.getFullElName("spacer"))),(0,o._)(this,"spacerBottom",this.j.c.div(this.getFullElName("spacer"))),this.setMod("loading",!0),(async()=>{this.data=await e.o.emoji.data(),this.isInDestruct||(this.setMod("loading",!1),this.data.emoji.forEach(e=>{let t=d.normalizeEmoji(e);this.map[t.emoji]=t}),this.setItems(this.defaultList),s.Dom.append(this.categories,this.generateCategoriesList(this.data.categories)),this.setActiveCategory(0))})()}}(0,n.__decorate)([r.persistent],d.prototype,"recent",void 0),(0,n.__decorate)([r.autobind],d.prototype,"renderWindow",null),(0,n.__decorate)([r.autobind],d.prototype,"onScrollList",null),(0,n.__decorate)([(0,r.watch)(":afterEmojiOpenPopup")],d.prototype,"onAfterOpenPopup",null),(0,n.__decorate)([r.autobind],d.prototype,"onClickCategory",null),(0,n.__decorate)([r.autobind],d.prototype,"onClickItem",null),(0,n.__decorate)([(0,r.debounce)()],d.prototype,"onInputFilter",null),(0,n.__decorate)([(0,r.hook)("ready")],d.prototype,"onReady",null),d=(0,n.__decorate)([r.component],d)},90832:function(e,t,i){"use strict";var o=i(53121),n=i.n(o),r=i(83556),s=i.n(r),a=i(4872),l=i.n(a),c=i(6441),d=i(2748);c.Config.prototype.exportDocs={css:"",pdf:{externalFonts:[],allow:!0,converter:null,options:{defaultFont:"courier",format:"A4",page_orientation:"portrait"}},docx:{allow:!0,filename:"document.docx",converter:null}},c.Config.prototype.controls.exportDocs={tooltip:"Export",isDisabled:e=>d.Dom.isEmptyContent(e.editor),icon:n(),list:{exportToPDF:"Export to PDF",exportToDOCX:"Export to DOCX"},childExec(e,t,{control:i}){let o=i.name??"exportToPDF";e.execCommand(o)}},c.Config.prototype.controls.exportToPDF={tooltip:"Export to PDF",isDisabled:e=>d.Dom.isEmptyContent(e.editor),icon:{name:l(),scale:1.3}},c.Config.prototype.controls.exportToDOCX={...c.Config.prototype.controls.exportToPDF,tooltip:"Export to DOCX",icon:{name:s(),scale:1.3}}},90882:function(e,t,i){"use strict";var o=i(82749);i(90832);var n=i(22732),r=i(68934),s=i(11628),a=i(50911),l=i(54079),c=i(14625),d=i(2692);class u extends a.Plugin{afterInit(e){e.registerCommand("exportToPDF",async()=>{let{converter:t}=(0,r.ConfigDeepFlatten)(e.o.exportDocs.pdf);t?await this.clientExport(e,t,"document.pdf"):await this.sendExportRequest(e,{action:"generatePdf",filename:"document.pdf",data:{options:(0,r.ConfigDeepFlatten)(e.o.exportDocs.pdf).options}})}),e.registerCommand("exportToDOCX",async()=>{let t=(0,r.ConfigDeepFlatten)(e.o.exportDocs.docx),i=t.filename||"document.docx";t.converter?await this.clientExport(e,t.converter,i):await this.sendExportRequest(e,{action:"generateDocx",filename:i})})}async clientExport(e,t,i){e.progressbar.show().progress(50),await this.downloadBlob(e,i,async()=>t(u.getValue(e)))}async sendExportRequest(e,t){let i=new l.Ajax({...e.o.exportDocs.ajax??e.o.filebrowser.ajax,method:"POST",responseType:"blob",onProgress(t){e.progressbar.show().progress(t)},data:{action:t.action,html:u.getValue(e),...t.data}});e.e.on("beforeDestruct",i.destruct),await this.downloadBlob(e,t.filename,async()=>(await i.send()).blob())}async downloadBlob(e,t,i){try{let e=await i(),o=this.j.create.a();o.href=URL.createObjectURL(e),o.download=t,o.click(),this.j.progressbar.showFileUploadAnimation(),n.Dom.safeRemove(o),URL.revokeObjectURL(o.href)}catch(t){t.message&&e.alert(t.message)}finally{e.progressbar.progress(100),await e.async.delay(200),e.progressbar.hide()}}static getValue(e){let[t]=(0,s.previewBox)(e),i=[];return e.o.exportDocs.pdf.externalFonts.forEach(e=>{/^</.test(e)?i.push(e):i.push(`<link rel="stylesheet" href="${e}">`)}),i.push(`<style>${(0,c.generateCriticalCSS)(e)}</style>`),i.push(`<style>${e.o.exportDocs.css}</style>`),i.push(t.innerHTML),i.join(`
|
|
428
440
|
`)}beforeDestruct(){}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"exportDocs",group:"media"},{name:"exportToPDF",group:"media"},{name:"exportToDOCX",group:"media"}])}}(0,o._)(u,"requires",["license"]),d.JoditPro.plugins.add("exportDocs",u)},5422:function(e,t,i){"use strict";i.d(t,{FileBrowserPro:function(){return E}});var o=i(82749),n=i(31635);i(34042);var r=i(8087),s=i(34698),a=i(77841),l=i(17578),c=i(97770),d=i(42663),u=i(55535),h=i(18250),p=i(69277),f=i(4278),m=i(95002),g=i(6441),b=i(82758),v=i(65478),y=i(21537),w=i(70231),_=i(41409),k=i(638),C=i(11787),S=i(50050),x=i(2692),I=i(21246);class E extends k.Dialog{className(){return"FileBrowserPro"}lock(e="any"){return this.container.classList.add("jodit_disabled"),super.lock(e)}unlock(){return this.container.classList.remove("jodit_disabled"),super.unlock()}status(e,t=!(e instanceof Error)){(0,y.isAbortError)(e)||(b.IS_PROD||(0,y.isString)(e),this.message.message((0,y.isString)(e)?e:e.message,t?"success":"error",this.options.howLongShowMsg))}errorHandler(e){(0,y.isAbortError)(e)||this.status(e instanceof Error?this.i18n(e.message):this.dataProvider.getMessage(e),!1)}get progressbar(){return new m.UIProgress(this,this.stateManager.state)}addDisclaimer(e){this.dialog.appendChild(e)}getMessageModule(){return super.getMessageModule(this.dialog)}async open(e=this.o.defaultCallback,t){return this.state.onlyImages=!!t,this.prepareOpening(e),super.open(this.panel.container),this.e.fire("update.filebrowser")}onResizeWindow(){(0,y.css)(this.dialog,{maxWidth:screen.width,minHeight:Math.min(this.options.height,screen.height),minWidth:Math.min(this.options.width,screen.width)})}onChangePath(){let{currentPath:e,currentSource:t}=this.state;this.state.activeElements=[],this.state.lastSelectedIndex=0,this.uploader.setPath(e),this.uploader.setSource(t)}onChangeTheme(){this.setMod("theme",this.state.theme),this.header.setMod("theme",this.state.theme),this.panel.setMod("theme",this.state.theme),this.options.theme=this.state.theme}onToggleSettings(){this.state.showSettings=!this.state.showSettings}prepareOpening(e){this.registerGlobalListeners(),e&&(this.state.onSelectCallBack=t=>{this.close(),e(t)}),this.persistent.syncWithState()}registerGlobalListeners(){this.e.on(this.ow,"keydown",this.onKeyPress)}onKeyPress(e){let{activeElement:t}=this.od;if(!this.state.activeElements.length||!t||!_.Dom.isOrContains(this.panel.items.container,t))return;let i=this.state.elements;switch(e.key){case b.KEY_ENTER:return this.onChooseItems();case b.KEY_DELETE:return this.onFileRemove();case b.KEY_RIGHT:case b.KEY_LEFT:case b.KEY_DOWN:case b.KEY_UP:{let t,o=e.key===b.KEY_RIGHT||e.key===b.KEY_DOWN,n=this.state.lastSelectedIndex;if([b.KEY_RIGHT,b.KEY_LEFT].includes(e.key))t=o?i[n+1]?n+1:0:i[n-1]?n-1:i.length-1;else{let{countInRow:e}=this.panel;t=Math.round(((n+1)/e+(o?1:-1))*e-1)}return i[t]&&this.stateManager.addActive(i[t],e.shiftKey),!1}}}removeGlobalListeners(){this.e.off(this.ow,"keydown",this.onKeyPress)}onCut(e){this.__fillClipboard("cut",e)}onCopy(e){this.__fillClipboard("copy",e)}__fillClipboard(e,t){this.state.clipboard=t?[{mode:e,type:"folder",from:(0,a.folderFullPath)(t),name:t.name,sourceName:t.sourceName}]:this.state.activeElements.filter(e=>e.file||e.name).map(t=>({mode:e,type:"folder"===t.type?"folder":"file",from:(0,a.normalizeItemPath)(t.path+(t.file||t.name||"")),name:t.file||t.name||"",sourceName:t.sourceName}))}getPasteTarget(){let{currentPath:e,currentSource:t,sources:i}=this.state;return{path:e||"/",sourceName:t||i[0]?.name||C.DEFAULT_SOURCE_NAME}}canPaste(e){let t=this.state.clipboard;if(!t.length||t.some(t=>t.sourceName!==e.sourceName))return!1;let i=this.dataProvider;if(!t.every(e=>"copy"===e.mode?i.canCopy("file"===e.type):i.canI("file"===e.type?"FileMove":"FolderMove")))return!1;let o=(0,a.normalizeItemPath)(e.path);return!t.some(e=>"folder"===e.type&&(o===e.from||o.startsWith(e.from+"/")))}onPaste(e){if(!this.canPaste(e))return;let t=this.state.clipboard;t.some(e=>"cut"===e.mode)&&(this.state.clipboard=[]);let i=(0,a.normalizeItemPath)(e.path),o=async()=>{let o=0;for(let n of t){let t="file"===n.type;if("cut"===n.mode){if((0,a.parentPath)(n.from)===i)continue;await this.dataProvider.move(n.from,i,e.sourceName,t)}else await this.dataProvider.copy(n.from,i,e.sourceName,t);o+=1}return o},n=t.every(e=>"copy"===e.mode);o().then(e=>{e>0&&this.status(this.i18n(n?"%s item(s) were copied":"%s item(s) were moved",e+""),!0)}).catch(this.status).finally(()=>(this.state.activeElements=[],Promise.allSettled([this.loadingManager.loadItems(),this.loadingManager.loadFolders()])))}onFileRemove(){this.state.activeElements.length&&this.confirm("Are you sure?","Delete",e=>{e&&this.__itemsRemove(this.state.activeElements)}).bindDestruct(this)}async __itemsRemove(e){if(e.length){for(let t of(this.state.activeElements.forEach(e=>{this.stateManager.isFavorite(e)&&this.stateManager.toggleFavorite(e)}),this.state.activeElements=[],e))await ("folder"===t.type?this.__folderRemove((0,a.parentPath)(t.path),t.name??"",t.sourceName):this.__removeFile(t.file||t.name||"",t.sourceName));return Promise.allSettled([this.loadingManager.loadItems(),this.loadingManager.loadFolders()])}}__removeFile(e,t){return this.dataProvider.fileRemove(this.state.currentPath,e,t).then(t=>{this.status(t||this.i18n('File "%s" was deleted',e),!0)}).catch(this.status)}__folderRemove(e,t,i){return this.dataProvider.folderRemove(e,t,i).then(o=>{this.status(o||this.i18n('Folder "%s" was deleted',t),!0),this.state.currentPath===e&&(this.state.currentPath=(0,a.parentPath)(e),this.state.currentSource=i)}).catch(this.status)}onFileEdit(){if(1===this.state.activeElements.length){let[e]=this.state.activeElements;S.openImageEditor.call(this,e.fileURL,e.file||"",e.path,e.sourceName,void 0,this.status)}}onFolderRename(e){this.prompt("Enter new name","Rename",t=>{if(!(0,y.isValidName)(t)||t===e.name)return this.status(this.i18n("Enter new name")),!1;this.dataProvider.folderRename((0,a.parentPath)(e.path),e.name,t,e.sourceName).then(i=>{this.state.activeElements=[],this.status(i,!0),this.state.currentPath=(0,a.parentPath)(e.path)+"/"+t,this.state.currentSource=e.sourceName,this.historyManager.updateCurrent(),this.loadingManager.loadFolders()}).catch(this.status)},this.i18n("type name"),e.name).bindDestruct(this)}onFolderRemove(e){this.confirm("Are you sure?","Delete",t=>{t&&this.__itemsRemove([{type:"folder",name:e.name,path:e.path,sourceName:e.sourceName}])}).bindDestruct(this)}onFolderCreate(e){this.prompt("Enter Directory name","Create directory",t=>{let i=e.path||"/";this.dataProvider.createFolder(t,e.path||"/",e.sourceName).then(()=>{this.state.currentSource===e.sourceName&&this.state.currentPath===i?this.e.fire("update.filebrowser"):(this.state.currentSource=e.sourceName,this.state.currentPath=i),this.historyManager.updateCurrent()},this.status)},this.i18n("type name")).bindDestruct(this)}onFileRename(e){let t=e.file||e.name||"";1===this.state.activeElements.length&&t&&this.prompt("Enter new name","Rename",e=>{if(!(0,y.isValidName)(e))return this.status(this.i18n("Enter new name")),!1;this.dataProvider.fileRename(this.state.currentPath,t,e,this.state.currentSource).then(e=>{this.state.activeElements=[],this.status(e,!0),this.loadingManager.loadItems()}).catch(this.status)},this.i18n("type name"),t).bindDestruct(this)}onChooseItems(){let e=this.stateManager.state.activeElements;if(e.length){if("folder"===e[0].type){this.state.currentPath=this.state.currentPath+"/"+e[0].name,this.state.currentSource=e[0].sourceName,this.e.fire("afterOpenFolder.filebrowser");return}this.state.onSelectCallBack?this.stateManager.callSelectHandler():this.onOpenLightBox(e[0])}}onOpenLightBox(e){p.UILightBox.open(this,e,this.state.elements)}initUploader(){let e=this,t=(0,y.ConfigProto)(e.o.uploader||{},g.Config.defaultOptions.uploader),i=()=>this.loadingManager.loadItems();e.uploader=e.getInstance("Uploader",t),e.uploader.bind(e.panel.container,i,e.errorHandler),e.e.on("bindUploader.filebrowser",t=>{e.uploader.bind(t,i,e.errorHandler)})}destruct(){this.removeGlobalListeners(),this.header.destruct(),this.panel.destruct(),super.destruct()}fullFillOptions(){["getLocalFileByUrl","crop","resize","create","fileMove","folderMove","fileCopy","folderCopy","fileRename","folderRename","fileRemove","folderRemove","folder","items","permissions"].forEach(e=>{null!=this.options[e]&&(this.options[e]=(0,y.ConfigProto)(this.options[e],this.o.ajax))})}constructor(e){super((0,y.ConfigProto)(Object.assign(e||{},{resizable:!0,draggable:!0,toolbarButtons:e?.toolbarButtons||g.Config.defaultOptions.filebrowser.buttons,buttons:x.JoditPro.atom(["filebrowser.settings","fullsize","dialog.close"])}),g.Config.defaultOptions.filebrowser)),(0,o._)(this,"dataProvider",new s.DataProviderPro(this,this.options)),(0,o._)(this,"state",(0,_.observable)({onSelectCallBack:null,theme:"default",showSideBar:!0,showFavorites:!0,showSettings:!1,showPreview:!1,withFolders:!0,foldersPosition:"bottom",info:"",metaInfo:null,currentPath:"",currentSource:"",currentBaseUrl:"",tree:[],activeElements:[],favorites:[],clipboard:[],progress:0,lastSelectedIndex:0,elements:[],messages:[],sources:[],view:"tiles",tileSize:"default",sortBy:"name-asc",filterWord:"",onlyImages:!1})),(0,o._)(this,"persistent",new d.PersistentStore(this,this.state)),(0,o._)(this,"loadingManager",new c.LoadingManager(this,this.state)),(0,o._)(this,"stateManager",new u.StateManager(this.state)),(0,o._)(this,"historyManager",new l.HistoryManager(this,this.state)),(0,o._)(this,"contextMenuManager",new r.ContextMenuManager(this)),(0,o._)(this,"header",new h.UIBrowserHeader(this,this.options,this.stateManager)),(0,o._)(this,"panel",new f.UIBrowserPanel(this,this.stateManager)),(0,o._)(this,"files",this.panel),(0,o._)(this,"tree",this.panel),(0,o._)(this,"uploader",void 0),I.license.make(this),!this.persistent.theme&&this.options.theme&&(this.persistent.theme=this.options.theme),this.panel.append(this.progressbar),this.toolbar.setMod("mode","header"),this.setSize(Math.min(this.options.width,screen.width),Math.min(this.options.height,screen.height)).setHeader(this.header),(0,y.attr)(this.container,"aria-label",this.i18n("File Browser")),this.onResizeWindow(),this.initUploader(),this.onChangeTheme(),this.fullFillOptions(),this.dataProvider.onProgress(e=>{0===e&&(e=30),this.state.progress=e}),this.e.on("beforeClose",this.removeGlobalListeners),this.e.fire("afterInit"),x.JoditPro.prototype.afterInitHook.call(this)}}(0,n.__decorate)([v.autobind],E.prototype,"status",null),(0,n.__decorate)([v.autobind],E.prototype,"errorHandler",null),(0,n.__decorate)([v.cache],E.prototype,"progressbar",null),(0,n.__decorate)([(0,v.watch)(":resize",{context:window})],E.prototype,"onResizeWindow",null),(0,n.__decorate)([(0,v.watch)(["state.currentPath","state.currentSource"])],E.prototype,"onChangePath",null),(0,n.__decorate)([(0,v.watch)("state.theme")],E.prototype,"onChangeTheme",null),(0,n.__decorate)([(0,v.watch)(":toggleSettings.filebrowser")],E.prototype,"onToggleSettings",null),(0,n.__decorate)([v.autobind],E.prototype,"onKeyPress",null),(0,n.__decorate)([v.autobind],E.prototype,"removeGlobalListeners",null),(0,n.__decorate)([(0,v.watch)(":cut.filebrowser")],E.prototype,"onCut",null),(0,n.__decorate)([(0,v.watch)(":copy.filebrowser")],E.prototype,"onCopy",null),(0,n.__decorate)([(0,v.watch)(":paste.filebrowser")],E.prototype,"onPaste",null),(0,n.__decorate)([(0,v.watch)(":fileRemove.filebrowser")],E.prototype,"onFileRemove",null),(0,n.__decorate)([(0,v.watch)(":edit.filebrowser")],E.prototype,"onFileEdit",null),(0,n.__decorate)([(0,v.watch)(":folderRename.filebrowser")],E.prototype,"onFolderRename",null),(0,n.__decorate)([(0,v.watch)(":folderRemove.filebrowser")],E.prototype,"onFolderRemove",null),(0,n.__decorate)([(0,v.watch)(":folderCreate.filebrowser")],E.prototype,"onFolderCreate",null),(0,n.__decorate)([(0,v.watch)(":fileRename.filebrowser")],E.prototype,"onFileRename",null),(0,n.__decorate)([(0,v.watch)(":select.filebrowser")],E.prototype,"onChooseItems",null),(0,n.__decorate)([(0,v.watch)(":openLightBox.filebrowser")],E.prototype,"onOpenLightBox",null),E=(0,n.__decorate)([v.component,(0,v.derive)(w.Dlgs)],E),Object.defineProperty(x.JoditPro.modules,"FileBrowserPro",{value:E,writable:!1,enumerable:!0,configurable:!0})},77894:function(e,t,i){"use strict";var o=i(76636),n=i(6441),r=i(580);let s=n.Config.prototype.controls.filebrowser;s.settings={icon:"settings",tooltip:"Settings",exec(e){(e.parent??e).e.fire("toggleSettings.filebrowser")}},s.home={icon:"home",tooltip:"Home",exec(e){e.e.fire("goHome.filebrowser")}},s.preview={icon:"eye",tooltip:"Preview",isDisabled:e=>0===e.state.activeElements.length,exec(e){e.e.fire("togglePreview.filebrowser")}},s.next={icon:"angle-right",tooltip:"History next",isDisabled:e=>!e.historyManager.canNext(),exec(e){e.historyManager.next()}},s.previous={icon:"angle-left",tooltip:"History previous",isDisabled:e=>!e.historyManager.canPrevious(),exec(e){e.historyManager.previous()}},s["new-folder"]={icon:"new-folder",exec(e){e.e.fire("folderCreate.filebrowser",{path:e.state.currentPath,sourceName:e.state.currentSource})},tooltip:"New folder"},s.paste={icon:"paste",tooltip:"Paste",isDisabled:e=>!e.canPaste(e.getPasteTarget()),exec(e){e.e.fire("paste.filebrowser",e.getPasteTarget())}},Object.assign(n.Config.prototype.filebrowser,{buttons:["filebrowser.home","filebrowser.previous","filebrowser.next","|","filebrowser.upload","filebrowser.new-folder","filebrowser.paste","filebrowser.remove","filebrowser.update","filebrowser.select","filebrowser.edit","|","filebrowser.preview","about"],sort:!1,pixelOffsetLoadNewChunk:300,width:900,height:400,previewOfficeURL:"https://view.officeapps.live.com/op/view.aspx?src=",fileCopy:{data:{action:"fileCopy"}},folderCopy:{data:{action:"folderCopy"}}}),(0,r.extendLang)(o)},97068:function(e,t,i){"use strict";var o=i(82749);i(77894);var n=i(5422),r=i(50911),s=i(2692);class a extends r.Plugin{afterInit(e){e.e.on("getInstanceFileBrowser",e=>(this.__instance||(this.__instance=new n.FileBrowserPro(e)),this.__instance))}beforeDestruct(e){e.e.off("getInstanceFileBrowser"),this.__instance?.destruct()}constructor(...e){super(...e),(0,o._)(this,"hasStyle",!s.JoditPro.fatMode),(0,o._)(this,"__instance",void 0)}}(0,o._)(a,"requires",["license"]),s.JoditPro.plugins.add("finder",a)},8087:function(e,t,i){"use strict";i.d(t,{ContextMenuManager:function(){return l}});var o=i(31635),n=i(77841),r=i(80480),s=i(65478),a=i(63399);class l extends r.ViewComponent{className(){return"ContextMenuManager"}onFolderContext(e,t){return this.buildContextItemMenu(this.getFolderContextActions(e),t),!1}onItemContext(e,t,i){return this.buildContextItemMenu(this.getItemContextActions(e),i),!1}onSourceContext(e,t){return this.buildContextItemMenu(this.getSourceContextActions(e),t),!1}onAreaContext(e){return this.buildContextItemMenu(this.getAreaContextActions(),e),!1}buildContextItemMenu(e,t){if(!this.j.o.contextMenu)return;let i=(0,a.makeContextMenu)(this.j).setMod("theme",this.j.state.theme);i.show(t.clientX,t.clientY,e.filter(e=>e&&!1!==e.enabled)),this.j.e.on(this.j,"afterClose",()=>{i.isOpened&&i.close()})}getItemContextActions(e){if(this.j.stateManager.isActive(e)||this.j.stateManager.addActive(e,this.j.state.activeElements.length>1),"folder"===e.type)return this.getFolderContextActions({type:"directory",children:[],name:e.name||"",path:e.path,sourceName:e.sourceName});let t=this.j.options,i=this.j.dataProvider,o=1===this.j.state.activeElements.length;return[{icon:"pencil",title:"Edit",enabled:!!e.isImage&&t.editImage&&o&&(i.canI("ImageResize")||i.canI("ImageCrop")),exec:()=>{this.j.e.fire("edit.filebrowser")}},{icon:"italic",title:"Rename",enabled:i.canI("FileRename")&&o,exec:()=>this.j.e.fire("fileRename.filebrowser",e)},{icon:"cut",title:"Cut",enabled:i.canI("FileMove"),exec:()=>this.j.e.fire("cut.filebrowser")},{icon:"copy",title:"Copy",enabled:i.canCopy(!0),exec:()=>this.j.e.fire("copy.filebrowser")},{icon:"bin",title:"Delete",enabled:i.canI("FileRemove"),exec:()=>this.j.e.fire("fileRemove.filebrowser",e)},{icon:"eye",title:"Preview",enabled:!!(e.isImage||"file"===e.type)&&t.preview&&o,exec:()=>this.j.e.fire("openLightBox.filebrowser",e)},{icon:"download",title:"Download",exec:()=>{e.fileURL&&this.j.ow.open(e.fileURL)}}]}getFolderContextActions(e){let t=this.j.dataProvider,i={path:(0,n.folderFullPath)(e),sourceName:e.sourceName};return[{icon:"pencil",title:"Rename",exec:()=>{this.j.e.fire("folderRename.filebrowser",e)},enabled:t.canI("FolderRename")},{icon:"cut",title:"Cut",enabled:t.canI("FolderMove"),exec:()=>{this.j.e.fire("cut.filebrowser",e)}},{icon:"copy",title:"Copy",enabled:t.canCopy(!1),exec:()=>{this.j.e.fire("copy.filebrowser",e)}},{icon:"paste",title:"Paste",enabled:this.j.canPaste(i),exec:()=>{this.j.e.fire("paste.filebrowser",i)}},{icon:"bin",title:"Delete",exec:()=>{this.j.e.fire("folderRemove.filebrowser",e)},enabled:t.canI("FolderRemove")},{icon:"plus",title:"Add folder",exec:()=>{this.j.e.fire("folderCreate.filebrowser",e)},enabled:t.canI("FolderCreate")}]}getSourceContextActions(e){let t={path:"/",sourceName:e.sourceName};return[{icon:"plus",title:"Create folder",exec:()=>{this.j.e.fire("folderCreate.filebrowser",e)}},{icon:"paste",title:"Paste",enabled:this.j.canPaste(t),exec:()=>{this.j.e.fire("paste.filebrowser",t)}}]}getAreaContextActions(){let e=this.j.getPasteTarget();return[{icon:"paste",title:"Paste",enabled:this.j.canPaste(e),exec:()=>{this.j.e.fire("paste.filebrowser",e)}},{icon:"plus",title:"Add folder",enabled:this.j.dataProvider.canI("FolderCreate"),exec:()=>{this.j.e.fire("folderCreate.filebrowser",{path:e.path,sourceName:e.sourceName})}}]}}(0,o.__decorate)([(0,s.watch)(":contextmenuFolder.filebrowser")],l.prototype,"onFolderContext",null),(0,o.__decorate)([(0,s.watch)(":contextmenuItem.filebrowser")],l.prototype,"onItemContext",null),(0,o.__decorate)([(0,s.watch)(":contextmenuSource.filebrowser")],l.prototype,"onSourceContext",null),(0,o.__decorate)([(0,s.watch)(":contextmenuArea.filebrowser")],l.prototype,"onAreaContext",null),l=(0,o.__decorate)([s.component],l)},34698:function(e,t,i){"use strict";i.d(t,{DataProviderPro:function(){return r}});var o=i(21537),n=i(11787);class r extends n.default{copy(e,t,i,n){let r=n?"fileCopy":"folderCopy",s=this.o[r];if(!s)throw(0,o.error)("Set Copy api options");return s.data.from=e,s.data.path=t,s.data.source=i,this.get(r).then(e=>{if(this.isSuccess(e))return!0;throw(0,o.error)(this.getMessage(e))})}canCopy(e){let t=e?"allowFileCopy":"allowFolderCopy",i=this.o.permissionsPresets[t];if(void 0!==i)return i;let{__currentPermissions:o}=this;return null==o||void 0===o[t]||!!o[t]}}},77841:function(e,t,i){"use strict";let o=e=>e.split("/").filter(e=>e.length).join("/")||"/";i.d(t,["folderFullPath",0,e=>e.path.endsWith("/")?o(e.path+e.name):e.path,"isCutItem",0,(e,t)=>{if(!e.length)return!1;let i=o(t.path+(t.file||t.name||""));return e.some(e=>"cut"===e.mode&&e.from===i&&e.sourceName===t.sourceName)},"normalizeItemPath",0,o,"parentPath",0,e=>{let t=e.split("/").filter(e=>e.length);return t.pop(),t.join("/")||"/"}])},17578:function(e,t,i){"use strict";i.d(t,{HistoryManager:function(){return l}});var o=i(82749),n=i(31635),r=i(80480),s=i(65478),a=i(97735);class l extends r.ViewComponent{className(){return"HistoryManager"}canNext(){return this.historyIndex<this.history.length-1}canPrevious(){return this.historyIndex>0}push(e){let{historyIndex:t}=this,i=this.history[t];if(i&&i.currentSource===e.currentSource&&i.currentPath===e.currentPath)return;let o=[...this.history];o.length-1!==t&&(o=o.slice(0,t+1)),o.push(e),i&&(t+=1),this.history=o,this.historyIndex=t}next(){this.canNext()&&(this.historyIndex+=1,this.updateState())}previous(){this.canPrevious()&&(this.historyIndex-=1,this.updateState())}updateCurrent(){this.history[this.historyIndex]={currentSource:this.state.currentSource,currentPath:this.state.currentPath,tree:(0,a.fastClone)(this.state.tree),elements:[...this.state.elements]}}onHome(){this.state.currentPath="",this.state.currentSource="",this.j.e.fire("afterOpenFolder.filebrowser update.filebrowser")}onOpenFolder(){this.push({tree:[],elements:[],currentPath:this.state.currentPath,currentSource:this.state.currentSource}),this.j.e.fire("changeSelection")}updateState(){let{tree:e,elements:t,currentSource:i,currentPath:o}=this.history[this.historyIndex];this.state.activeElements=[],this.state.elements=[...t],this.state.tree=[...e],this.state.currentSource=i,this.state.currentPath=o,this.j.e.fire("changeSelection")}constructor(e,t){super(e),(0,o._)(this,"state",void 0),(0,o._)(this,"history",void 0),(0,o._)(this,"historyIndex",void 0),this.state=t,this.history=[],this.historyIndex=0}}(0,n.__decorate)([(0,s.watch)(["state.elements","state.tree"])],l.prototype,"updateCurrent",null),(0,n.__decorate)([(0,s.watch)(":goHome.filebrowser")],l.prototype,"onHome",null),(0,n.__decorate)([(0,s.watch)(":afterOpenFolder.filebrowser")],l.prototype,"onOpenFolder",null),l=(0,n.__decorate)([s.component],l)},97770:function(e,t,i){"use strict";i.d(t,{LoadingManager:function(){return a}});var o=i(82749),n=i(31635),r=i(91907),s=i(65478);class a extends r.ViewComponent{className(){return"LoadingManager"}async onUpdateFileBrowser(){this.state.activeElements=[],this.j.panel.setMod("loading",!0),await Promise.all([this.loadFolders(),this.loadItems()]),this.j.panel.setMod("loading",!1)}async loadFolders(){if(!this.j.isOpened)return;let{currentPath:e,currentSource:t,onlyImages:i}=this.state;try{let o=this.j.dataProvider;o.o?.folder&&(o.o.folder.data.onlyImages=i);let n=await o.tree(e,t);this.j.stateManager.fillTreeForPath(n,e),this.state.sources=n}catch(e){this.j.status(e)}}async loadItems(){if(this.j.isOpened)try{this.__tick+=1;let{__tick:e}=this;this.offset=0,this.stopLoadingParts=!1,this.__callQueueCount=0;let{items:t,loadedTotal:i}=await l(this.state,this.j.dataProvider,this.offset,this.countInOneChunk);if(this.state.elements=t,this.stopLoadingParts=i<this.countInOneChunk,await this.loadItemsChunk(e),await this.async.requestIdlePromise(),this.__tick!==e)return;for(;!this.stopLoadingParts&&this.j.panel.countInColumn*this.j.panel.countInRow>=this.state.elements.length;)if(await this.loadItemsChunk(e),this.__tick!==e)return}catch(e){this.j.status(e)}}async __loadItemsChunk(e){if(this.__isLoadingPart){this.__callQueueCount+=1;return}if(this.stopLoadingParts){this.__callQueueCount=0;return}this.__isLoadingPart=!0,this.j.panel.items.setMod("chunk-loading",!0);try{this.offset+=this.countInOneChunk;let{items:t,loadedTotal:i}=await l(this.state,this.j.dataProvider,this.offset,this.countInOneChunk);if(this.__tick!==e)return;this.stopLoadingParts=i<this.countInOneChunk,t.length&&(this.state.elements=this.state.elements.concat(t))}catch(e){this.j.status(e)}if(this.j.panel.items.setMod("chunk-loading",!1),this.__isLoadingPart=!1,this.__callQueueCount>0)return this.__callQueueCount-=1,this.__loadItemsChunk(e)}loadItemsChunk(e=this.__tick){return e!==this.__tick?Promise.resolve():this.__loadItemsChunk(e)}constructor(e,t){super(e),(0,o._)(this,"state",void 0),(0,o._)(this,"__tick",void 0),(0,o._)(this,"offset",void 0),(0,o._)(this,"countInOneChunk",void 0),(0,o._)(this,"stopLoadingParts",void 0),(0,o._)(this,"__isLoadingPart",void 0),(0,o._)(this,"__callQueueCount",void 0),this.state=t,this.__tick=0,this.offset=0,this.countInOneChunk=20,this.stopLoadingParts=!1,this.__isLoadingPart=!1,this.__callQueueCount=0}}function l(e,t,i,o){let{currentPath:n,currentSource:r,sortBy:s,withFolders:a,foldersPosition:l,onlyImages:c,filterWord:d}=e;return t.itemsEx(n,r,{offset:i,limit:o,sortBy:s,withFolders:a,foldersPosition:l,onlyImages:c,filterWord:d})}(0,n.__decorate)([(0,s.watch)(":update.filebrowser")],a.prototype,"onUpdateFileBrowser",null),(0,n.__decorate)([(0,s.watch)(["state.currentPath","state.currentSource","state.onlyImages"]),(0,s.debounce)(e=>({timeout:e.defaultTimeout,promisify:!0}))],a.prototype,"loadFolders",null),(0,n.__decorate)([(0,s.watch)(["state.currentPath","state.currentSource","state.sortBy","state.onlyImages","state.foldersPosition","state.filterWord"]),(0,s.debounce)(e=>({timeout:e.defaultTimeout,promisify:!0}))],a.prototype,"loadItems",null),(0,n.__decorate)([(0,s.debounce)(e=>({timeout:e.defaultTimeout,promisify:!0}))],a.prototype,"loadItemsChunk",null),a=(0,n.__decorate)([s.component],a)},42663:function(e,t,i){"use strict";i.d(t,{PersistentStore:function(){return l}});var o=i(82749),n=i(31635),r=i(91907),s=i(65478),a=i(159);class l extends r.ViewComponent{className(){return"PersistentStore"}onChangeThemeSetField(){this.theme=this.state.theme}onChangeView(){this.__viewPersistenceEnabled()&&(this.view=this.state.view)}onChangeSortBy(){this.sortBy=this.state.sortBy}onChangeTileSize(){this.tileSize=this.state.tileSize}onChangeFavorites(){this.favorites=this.state.favorites}onChangeShowSideBar(){this.showSideBar=this.state.showSideBar}onChangeShowPreview(){this.showPreview=this.state.showPreview}onChangeShowFavorites(){this.showFavorites=this.state.showFavorites}onChangeFoldersPosition(){this.foldersPosition=this.state.foldersPosition}syncWithState(){this.state.tileSize=this.tileSize,this.state.favorites=this.favorites.map(e=>e instanceof a.FileBrowserItem?e:a.FileBrowserItem.create(e)),this.state.view=this.__resolveView(),this.state.theme=this.theme,this.state.showSideBar=this.showSideBar,this.state.showPreview=this.showPreview,this.state.showFavorites=this.showFavorites,this.state.sortBy=this.sortBy,this.state.foldersPosition=this.foldersPosition}__resolveView(){return this.__viewPersistenceEnabled()&&this.__hasStoredView()?this.view:this.__configView()??"tiles"}__configView(){let{view:e}=this.j.o;return"tiles"===e||"list"===e||"compact"===e?e:null}__viewPersistenceEnabled(){let{saveStateInStorage:e}=this.j.o;return!1!==e&&(!e||!1!==e.storeView)}__hasStoredView(){return null!=this.j.storage.get(`${this.j.o.namespace}${this.componentName}_prop_view`)}constructor(e,t){super(e),(0,o._)(this,"state",void 0),(0,o._)(this,"theme",void 0),(0,o._)(this,"sortBy",void 0),(0,o._)(this,"view",void 0),(0,o._)(this,"foldersPosition",void 0),(0,o._)(this,"tileSize",void 0),(0,o._)(this,"favorites",void 0),(0,o._)(this,"showSideBar",void 0),(0,o._)(this,"showPreview",void 0),(0,o._)(this,"showFavorites",void 0),this.state=t,this.sortBy="changed-desc",this.view="tiles",this.foldersPosition="top",this.tileSize="default",this.favorites=[],this.showSideBar=!0,this.showPreview=!1,this.showFavorites=!0}}(0,n.__decorate)([s.persistent],l.prototype,"theme",void 0),(0,n.__decorate)([s.persistent],l.prototype,"sortBy",void 0),(0,n.__decorate)([s.persistent],l.prototype,"view",void 0),(0,n.__decorate)([s.persistent],l.prototype,"foldersPosition",void 0),(0,n.__decorate)([s.persistent],l.prototype,"tileSize",void 0),(0,n.__decorate)([s.persistent],l.prototype,"favorites",void 0),(0,n.__decorate)([s.persistent],l.prototype,"showSideBar",void 0),(0,n.__decorate)([s.persistent],l.prototype,"showPreview",void 0),(0,n.__decorate)([s.persistent],l.prototype,"showFavorites",void 0),(0,n.__decorate)([(0,s.watch)("state.theme")],l.prototype,"onChangeThemeSetField",null),(0,n.__decorate)([(0,s.watch)("state.view")],l.prototype,"onChangeView",null),(0,n.__decorate)([(0,s.watch)("state.sortBy")],l.prototype,"onChangeSortBy",null),(0,n.__decorate)([(0,s.watch)("state.tileSize")],l.prototype,"onChangeTileSize",null),(0,n.__decorate)([(0,s.watch)("state.favorites")],l.prototype,"onChangeFavorites",null),(0,n.__decorate)([(0,s.watch)("state.showSideBar")],l.prototype,"onChangeShowSideBar",null),(0,n.__decorate)([(0,s.watch)("state.showPreview")],l.prototype,"onChangeShowPreview",null),(0,n.__decorate)([(0,s.watch)("state.showFavorites")],l.prototype,"onChangeShowFavorites",null),(0,n.__decorate)([(0,s.watch)("state.foldersPosition")],l.prototype,"onChangeFoldersPosition",null),l=(0,n.__decorate)([s.component],l)},55535:function(e,t,i){"use strict";i.d(t,{StateManager:function(){return s}});var o=i(82749),n=i(31635),r=i(65478);class s{getIndex(e,t=this.state.elements){return t.findIndex(t=>t.uniqueHashKey===e.uniqueHashKey)}isActive(e){return!!this.state.activeElements.find(t=>t.uniqueHashKey===e.uniqueHashKey)}isFavorite(e){return!!this.state.favorites.find(t=>t.uniqueHashKey===e.uniqueHashKey)}addActive(e,t){this.state.metaInfo=e,this.state.info=e.file??"",this.state.lastSelectedIndex=this.getIndex(e),this.state.activeElements=t?[...this.state.activeElements,e]:[e]}callSelectHandler(){let e=this.state.activeElements;this.state.onSelectCallBack?.call(this,{baseurl:"",files:e.map(e=>e.fileURL),isImages:e.map(e=>!!e.isImage)})}setFilter(e){this.state.filterWord=e}toggleFavorite(e){let t=this.getIndex(e,this.state.favorites),i=[...this.state.favorites];-1===t?i.push(e):i.splice(t,1),this.state.favorites=i}fillTreeForPath(e,t){if(!this.state.tree.length||!t||"/"===t){this.state.tree=e.map(c);return}this.removeActive(this.state.tree),e.forEach(e=>{var i;let o=a(this.state.tree,e.name);o||(o=c(e),this.state.tree.push(o)),o.isActive=!0;let n=(i=o,t.split("/").reduce((e,t)=>e&&a(e.children,t),i));n&&(n.isActive=!0,n.children=l(e.folders).map(i=>d(i,t+"/"+i,e.name)))}),this.state.tree=[...this.state.tree]}removeActive(e){e.forEach(e=>{e.isActive=!1,this.removeActive(e.children)})}get isFavoriteItems(){return this.state.favorites===this.state.elements}constructor(e){(0,o._)(this,"state",void 0),this.state=e}}function a(e,t){return e.find(e=>e.name===t)??null}function l(e){return e.filter(e=>"."!==e&&".."!==e)}function c(e){return{type:"source",name:e.name,title:e.title,sourceName:e.name,path:"/",children:l(e.folders).map(t=>d(t,t,e.name))}}function d(e,t,i){return{type:"directory",name:e,path:t,sourceName:i,children:[]}}(0,n.__decorate)([r.autobind],s.prototype,"getIndex",null),(0,n.__decorate)([r.autobind],s.prototype,"isActive",null),(0,n.__decorate)([r.autobind],s.prototype,"isFavorite",null)},46732:function(e){e.exports={Favorites:"Favoriten",Settings:"Einstellungen",Light:"Hell",Dark:"Dunkel",Theme:"Design",Show:"Anzeigen",Hide:"Ausblenden","Show favorites":"Favoriten anzeigen",Tiles:"Kacheln",List:"Liste",Compact:"Kompakt",View:"Ansicht","Folders position":"Ordnerposition","Sort by":"Sortieren nach","Extra small":"Sehr klein",Small:"Klein",Large:"Groß","Extra large":"Sehr groß","Tile size":"Kachelgröße",Cut:"Ausschneiden",Copy:"Kopieren",Preview:"Vorschau",Download:"Herunterladen","Create folder":"Ordner erstellen",Home:"Start","Select image":"Bild auswählen","%s item(s) were moved":"%s Element(e) wurden verschoben","%s item(s) were copied":"%s Element(e) wurden kopiert"}},76636:function(e,t,i){"use strict";i.r(t),i.d(t,{de:function(){return o},ru:function(){return n}});var o=i(46732),n=i(28125)},28125:function(e){e.exports={Favorites:"Избранное",Settings:"Настройки",Light:"Светлая",Dark:"Темная",Theme:"Тема",Show:"Показать",Hide:"Скрыть","Show favorites":"Показывать избранное",Tiles:"Плитка",List:"Список",Compact:"Компактный",View:"Отображение","Folders position":"Позиция папок","Sort by":"Сортировать по","Extra small":"Очень маленькие",Small:"Маленькие",Large:"Большие","Extra large":"Очень большие","Tile size":"Размер плитки",Cut:"Вырезать",Copy:"Копировать",Preview:"Просмотр",Download:"Скачать","Create folder":"Создать папку",Home:"Главная","Select image":"Выберите изображение","%s item(s) were moved":"Перемещено элементов: %s","%s item(s) were copied":"Скопировано элементов: %s"}},34042:function(e,t,i){"use strict";var o=i(7307),n=i(24928),r=i(96910),s=i(67510);s.Icon.set("heart",o+""),s.Icon.set("home",n+""),s.Icon.set("new-folder",r+"")},43692:function(e,t,i){"use strict";i.d(t,{UIBrowserFolder:function(){return l}});var o=i(82749),n=i(31635),r=i(87325),s=i(38837),a=i(67510);class l extends a.UIElement{className(){return"UIBrowserFolder"}render(){return`<div>
|
|
429
441
|
<div class="&__icon">
|
|
430
442
|
<div class='&__loader'></div>
|
|
@@ -602,7 +614,7 @@ ${r}`.trim();i?await this.__executeQuickCommandSilent(l,r):await this.__executeQ
|
|
|
602
614
|
</div>`}appendChildToContainer(){}constructor(e,t,i){super(e),(0,o._)(this,"options",void 0),(0,o._)(this,"drawing",void 0),(0,o._)(this,"toolbar",void 0),(0,o._)(this,"state",void 0),(0,o._)(this,"mapElements",void 0),(0,o._)(this,"apiLoaded",void 0),(0,o._)(this,"mapInitialized",void 0),(0,o._)(this,"failed",void 0),(0,o._)(this,"map",void 0),(0,o._)(this,"layers",void 0),this.options=i,this.toolbar=new g.ToolbarCollection(this.jodit),this.state={uid:"jd"+(0,h.uniqueUid)()+new Date().toString().replace(/[^0-9]/g,""),layer:this.options.googleMaps.map.layer,center:this.options.googleMaps.map.defaultCenter,zoom:this.options.googleMaps.map.defaultZoom,size:this.options.googleMaps.map.size,type:this.options.googleMaps.map.type,controls:{zoomControl:!0,mapTypeControl:!0,scaleControl:!0,streetViewControl:!0,rotateControl:!0,fullscreenControl:!0},mode:"hand",elements:[]},this.mapElements=[],this.apiLoaded=null,this.mapInitialized=!1,this.failed=!1,this.layers=[],Object.assign(this.state,t),this.toolbar.build(["gm.hand","gm.marker","gm.polyline","gm.polygon","gm.circle"]);let n=this.getElm("map-palette");(0,p.assert)(null!=n,"palette element does not exists"),n.appendChild(this.toolbar.container)}}(0,n.__decorate)([(0,c.hook)("ready")],y.prototype,"onReady",null),(0,n.__decorate)([(0,u.watch)("?:changeCreateMode.gm")],y.prototype,"changeCreateMode",null),(0,n.__decorate)([(0,u.watch)("state.mode")],y.prototype,"onChangeMode",null),(0,n.__decorate)([(0,u.watch)("state.elements")],y.prototype,"onChangeElementsList",null),(0,n.__decorate)([(0,u.watch)("state.center"),(0,d.wait)(e=>e.mapInitialized),(0,l.debounce)()],y.prototype,"onChangeCenter",null),(0,n.__decorate)([(0,u.watch)("state.zoom"),(0,l.debounce)()],y.prototype,"onChangeZoom",null),(0,n.__decorate)([(0,u.watch)("state.controls")],y.prototype,"onChangeControls",null),(0,n.__decorate)([(0,u.watch)(["state.center","state.zoom","state.controls","state.size","state.type","state.layer"]),(0,d.wait)(e=>e.mapInitialized),(0,l.debounce)()],y.prototype,"onChangeBound",null),(0,n.__decorate)([(0,u.watch)("state.size"),(0,l.debounce)()],y.prototype,"onChangeSize",null),(0,n.__decorate)([(0,u.watch)("state.type")],y.prototype,"onChangeMapType",null),(0,n.__decorate)([(0,u.watch)("state.layer")],y.prototype,"onChangeLayer",null)},22125:function(e,t,i){"use strict";i.d(t,{addNewInState:function(){return n}});var o=i(67912);function n(e){switch(this.state.mode){case"polyline":case"polygon":{let{mode:t}=this.state;this.state.elements=[...this.state.elements,{type:t,coordinates:(0,o.pathToArray)(e.getPath()),...this.options.googleMaps.map.defaultStates[t]}];break}case"circle":this.state.elements=[...this.state.elements,{type:this.state.mode,coordinates:[e.getCenter()?.lat()??0,e.getCenter()?.lng()??0],radius:e.getRadius(),...this.options.googleMaps.map.defaultStates.circle}];break;case"marker":this.state.elements=[...this.state.elements,{type:this.state.mode,coordinates:[e.getPosition()?.lat()??0,e.getPosition()?.lng()??0],...this.options.googleMaps.map.defaultStates.marker}]}}},76864:function(e,t,i){"use strict";i.d(t,{DrawingController:function(){return r}});var o=i(82749);let n=["marker","polyline","polygon","circle"];class r{setMode(e){let t=n.includes(e)?e:null;t!==this.mode&&(this.cancel(),this.unbind(),this.mode=t,t?(this.bind(),this.map.setOptions({draggableCursor:"crosshair",disableDoubleClickZoom:!0})):this.map.setOptions({draggableCursor:null,disableDoubleClickZoom:!1}))}destruct(){this.cancel(),this.unbind(),this.mode=null}bind(){this.listeners=[this.map.addListener("click",e=>this.onClick(e)),this.map.addListener("mousemove",e=>this.onMove(e)),this.map.addListener("dblclick",()=>this.onDblClick())].filter(Boolean)}unbind(){this.listeners.forEach(e=>e?.remove()),this.listeners=[]}onClick(e){let t=e.latLng;if(t)switch(this.mode){case"marker":this.onComplete(new google.maps.Marker({position:t}));break;case"circle":this.previewCircle?this.finishCircle():this.previewCircle=new google.maps.Circle({...this.defaultStates.circle,center:t,radius:0,clickable:!1,map:this.map});break;case"polyline":case"polygon":this.vertices.push(t),this.updatePolyPreview(t)}}onMove(e){let t=e.latLng;if(t){if(this.previewCircle){let e=this.previewCircle.getCenter();e&&this.previewCircle.setRadius(google.maps.geometry.spherical.computeDistanceBetween(e,t));return}this.vertices.length&&this.updatePolyPreview(t)}}onDblClick(){if("polyline"!==this.mode&&"polygon"!==this.mode)return;let e=this.vertices.filter((e,t,i)=>0===t||!e.equals(i[t-1])),t="polygon"===this.mode?3:2;if(e.length>=t&&this.preview){let t=this.preview;t.setPath(e),this.onComplete(t)}this.cancel()}finishCircle(){let e=this.previewCircle;e&&(this.previewCircle=null,this.onComplete(e),e.setMap(null))}updatePolyPreview(e){let t=[...this.vertices,e];if(!this.preview){let e={...this.defaultStates["polygon"===this.mode?"polygon":"polyline"],clickable:!1,map:this.map};this.preview="polygon"===this.mode?new google.maps.Polygon(e):new google.maps.Polyline(e)}this.preview.setPath(t)}cancel(){this.preview?.setMap(null),this.preview=null,this.previewCircle?.setMap(null),this.previewCircle=null,this.vertices=[]}constructor(e,t,i){(0,o._)(this,"map",void 0),(0,o._)(this,"defaultStates",void 0),(0,o._)(this,"onComplete",void 0),(0,o._)(this,"mode",void 0),(0,o._)(this,"listeners",void 0),(0,o._)(this,"preview",void 0),(0,o._)(this,"previewCircle",void 0),(0,o._)(this,"vertices",void 0),this.map=e,this.defaultStates=t,this.onComplete=i,this.mode=null,this.listeners=[],this.preview=null,this.previewCircle=null,this.vertices=[]}}},1475:function(e,t,i){"use strict";i.d(t,{initOrUpdateElementFromState:function(){return c}});var o=i(53454),n=i(11079),r=i(72690),s=i(580),a=i(12153),l=i(67912);function c(e,t){let i,c=this.mapElements[t];if(c){if(c.state.type===e.type)return r.updateStateAndGme.call(this,e,t);c.gme.setMap(null)}switch(e.type){case"text":i=new google.maps.Marker({position:new google.maps.LatLng(e.coordinates[0],e.coordinates[1]),draggable:!0,title:e.text,map:this.map});break;case"marker":i=new google.maps.Marker({position:new google.maps.LatLng(e.coordinates[0],e.coordinates[1]),draggable:!0,label:e.showCaption?e.title:"",title:e.title,icon:e.icon?a.Icon.get(e.icon):void 0,map:this.map});break;case"polyline":case"polygon":{let t=(0,l.arrayToPath)(e.coordinates);i=new google.maps["polygon"===e.type?"Polygon":"Polyline"]({path:t,strokeColor:e.strokeColor,fillColor:e.fillColor,strokeWeight:e.strokeWeight,editable:!0,draggable:!0,map:this.map,fillOpacity:"polygon"===e.type?e.fillOpacity:1})}break;case"circle":i=new google.maps.Circle({center:new google.maps.LatLng(e.coordinates[0],e.coordinates[1]),radius:e.radius,strokeColor:e.strokeColor,fillColor:e.fillColor,strokeWeight:e.strokeWeight,editable:!0,draggable:!0,map:this.map,fillOpacity:e.fillOpacity??1})}let d={type:e.type,uid:(0,s.uniqueUid)(),state:e,gme:i};"dragend radius_changed center_changed".split(" ").forEach(e=>i.addListener(e,()=>o.onChangeGeometries.call(this,d,t))),("polygon"===d.type||"polyline"===d.type)&&"insert_at set_at remove_at".split(" ").forEach(e=>d.gme.getPath().addListener(e,()=>o.onChangeGeometries.call(this,d,t))),i.addListener("click",()=>n.openPropsDialog.call(this,d,t)),this.mapElements[t]=d}},53454:function(e,t,i){"use strict";i.d(t,{onChangeGeometries:function(){return r}});var o=i(72690),n=i(67912);function r(e,t){switch(e.type){case"polyline":case"polygon":{let i=(0,n.pathToArray)(e.gme.getPath()),r={...e.state,coordinates:i};o.updateStateAndGme.call(this,r,t,!0);break}case"marker":{let i=e.gme.getPosition(),n={...e.state,coordinates:[i?.lat()??0,i?.lng()??0]};o.updateStateAndGme.call(this,n,t,!0);break}case"circle":{let i=e.gme.getCenter(),n={...e.state,radius:e.gme.getRadius(),coordinates:[i?.lat()??0,i?.lng()??0]};o.updateStateAndGme.call(this,n,t,!0)}}}},11079:function(e,t,i){"use strict";i.d(t,{openPropsDialog:function(){return a}});var o=i(47660),n=i(72690),r=i(90835);function s(){let e=new google.maps.InfoWindow({content:"<div>test</div>"});return e.addListener("domready",()=>{this.setMod("info-opened",!0)}),e.addListener("closeclick",()=>{this.setMod("info-opened",!1)}),e}function a(e,t){let i;switch(this.state.mode="hand",e.type){case"polyline":i=new r.UIPolylineEditor(this.jodit,e.state,this.options);break;case"marker":i=new r.UIMarkerEditor(this.jodit,e.state,this.options);break;case"circle":case"polygon":i=new r.UIPolygonEditor(this.jodit,e.state,this.options)}if(!i)return;this.append(i),this.j.e.on(i,"bin",()=>{o.removeElement.call(this,e)}).on(i,"change",(i,o)=>{n.updateStateAndGme.call(this,{...e.state,[i]:o},t)});let a=s.call(this);if("polygon"===e.type||"polyline"===e.type){let t=e.gme.getPath().getAt(0);a.setPosition(t)}"circle"===e.type&&a.setPosition(e.gme.getCenter()),a.setContent(i.container),a.open(this.map,e.gme),a.addListener("closeclick",()=>{i&&(this.remove(i),i.destruct())})}},47660:function(e,t,i){"use strict";function o(e){let t=this.mapElements.indexOf(e);-1!==t&&(this.mapElements[t].gme.setMap(null),this.mapElements.splice(t,1),this.state.elements.splice(t,1),this.state.elements=[...this.state.elements])}i.d(t,{removeElement:function(){return o}})},72690:function(e,t,i){"use strict";i.d(t,{updateStateAndGme:function(){return n}});var o=i(67912);function n(e,t,i=!1){let r=this.mapElements[t];if(r.state===e||r.state.type!==e.type)return;let s=r.state;if(!i){let t;for(t in e){let i=e[t],n=s[t];if(null!=i&&(null==n||i.toString()!==n.toString()))switch(t){case"strokeWeight":case"strokeColor":case"fillColor":case"fillOpacity":switch(r.type){case"polyline":case"circle":case"polygon":r.gme.setOptions({[t]:i})}break;case"coordinates":switch(r.type){case"polygon":case"polyline":r.gme.setPath((0,o.arrayToPath)(i))}}}}r.state=e,this.state.elements[t]=e}},8073:function(e,t,i){"use strict";i.d(t,{UIMapsControlsForm:function(){return a}});var o=i(82749),n=i(31635),r=i(87325),s=i(67510);class a extends s.UIForm{className(){return"UIMapsControlsForm"}onChangeSize(e,t){this.state.controls={...this.state.controls,[e]:"true"===t}}constructor(e,t){super(e),(0,o._)(this,"state",void 0),this.state=t;let i={zoomControl:"Zoom control",mapTypeControl:"Map Type control",scaleControl:"Scale control",streetViewControl:"Street View control ",rotateControl:"Rotate control",fullscreenControl:"Fullscreen control"},n=Object.keys(i);this.append(n.map(t=>new s.UICheckbox(e,{label:i[t],name:t,checked:this.state.controls[t],switch:!0,type:"checkbox",onChange:this.onChangeSize.bind(this,t)})))}}a=(0,n.__decorate)([r.component],a)},83039:function(e,t,i){"use strict";i.d(t,{UIMapsPropsForm:function(){return l}});var o=i(82749),n=i(31635),r=i(65478),s=i(76078),a=i(67510);class l extends a.UIForm{className(){return"UIMapsPropsForm"}onChangeSize(){let{width:e,height:t}=(0,s.refs)(this.container);this.state.size=[parseInt(e?.value,10)||0,parseInt(t?.value,10)||0]}onExternalChangeSize(){let{width:e,height:t}=(0,s.refs)(this.container),[i,o]=this.state.size;i.toString()!==e.value&&(e.value=i.toString()),o.toString()!==t.value&&(t.value=o.toString())}onChangeCenter(){let{lat:e,lng:t}=(0,s.refs)(this.container);this.state.center=[parseFloat(e?.value)||0,parseFloat(t?.value)||0]}onExternalChangeCenter(){let{lat:e,lng:t}=(0,s.refs)(this.container),[i,o]=this.state.center;i.toString()!==e.value&&(e.value=i.toString()),o.toString()!==t.value&&(t.value=o.toString())}onExternalChangeType(){let{mapType:e}=(0,s.refs)(this.container);this.state.type!==e.value&&(e.value=this.state.type)}onExternalChangeLayer(){let{layer:e}=(0,s.refs)(this.container);this.state.layer!==e.value&&(e.value=this.state.layer)}constructor(e,t){super(e),(0,o._)(this,"state",void 0),this.state=t;let[i,n]=t.size,[r,s]=t.center;this.append([new a.UIInput(e,{label:"Width",name:"width",value:i,type:"number",onChange:this.onChangeSize}),new a.UIInput(e,{label:"Height",name:"height",value:n,type:"number",onChange:this.onChangeSize}),new a.UIInput(e,{label:"Latitude",name:"lat",value:r,onChange:this.onChangeCenter}),new a.UIInput(e,{label:"Longitude",name:"lng",value:s,onChange:this.onChangeCenter}),new a.UISelect(e,{label:"Map type",value:t.type,name:"mapType",options:[{value:"hybrid",text:"Hybrid"},{value:"roadmap",text:"Roadmap"},{value:"satellite",text:"Satellite"},{value:"terrain",text:"Terrain"}],onChange(e){t.type=e}}),new a.UISelect(e,{label:"Layer",value:t.layer??"default",name:"layer",options:[{value:"default",text:"Default"},{value:"traffic",text:"Traffic"},{value:"transit",text:"Transit"},{value:"bicycling",text:"Bicycling"}],onChange(e){t.layer=e}})])}}(0,n.__decorate)([r.autobind],l.prototype,"onChangeSize",null),(0,n.__decorate)([(0,r.watch)("state.size")],l.prototype,"onExternalChangeSize",null),(0,n.__decorate)([r.autobind],l.prototype,"onChangeCenter",null),(0,n.__decorate)([(0,r.watch)(["state.center"])],l.prototype,"onExternalChangeCenter",null),(0,n.__decorate)([(0,r.watch)(["state.type"])],l.prototype,"onExternalChangeType",null),(0,n.__decorate)([(0,r.watch)(["state.layer"])],l.prototype,"onExternalChangeLayer",null),l=(0,n.__decorate)([r.component],l)},11093:function(e,t,i){"use strict";i.d(t,{UIWysiwyg:function(){return l}});var o=i(31635),n=i(87325),r=i(38837),s=i(48538),a=i(2692);class l extends s.UIElement{className(){return"UIWysiwyg"}render(){return`<div>
|
|
603
615
|
<div class='&__label'>~Info~</div>
|
|
604
616
|
<div class='&__editor'></div>
|
|
605
|
-
</div>`}constructor(e,t,i,o){super(e);let n=this.getElm("editor");(0,r.assert)(null!=n,"editor element does not exist");let s=a.JoditPro.make(n,{buttons:["bold","italic","image"],height:100,minHeight:100,allowResizeY:!1,allowResizeX:!1,disablePlugins:["mobile","backup","highlight-signature","tune-block","show-blocks"],toolbarButtonSize:"small",language:e.o.language,direction:e.o.direction,theme:e.o.theme,statusbar:!1,...t});s.value=i,s.e.on("change",()=>o(s.value))}}l=(0,o.__decorate)([n.component],l)},40650:function(e,t,i){"use strict";var o=i(82749),n=i(25088),r=i.n(n),s=i(6441),a=i(21537),l=i(50911),c=i(59451),d=i(2692);s.Config.prototype.controls.google={tooltip:"Google search",icon:r(),isDisabled:e=>(0,c.isEditorEmpty)(e.editor),command:"startSearch"};class u extends l.Plugin{afterInit(e){e.registerCommand("startSearch",{exec(){let t,{s:i}=e;if(t=i.isCollapsed()?i.current()?.parentElement?.innerText:i.sel?.toString()){let e="https://www.google.com/search?q="+encodeURIComponent((0,a.trim)(t));window.open(e,"_blank")}}})}beforeDestruct(e){}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"google",group:"search"}])}}(0,o._)(u,"requires",["license"]),d.JoditPro.plugins.add("google-search",u)},36347:function(e,t,i){"use strict";i(6441).Config.prototype.highlightSignature={processDelay:0,processInChunkCount:300,schema:{},excludeTags:["pre"]}},46958:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(36347);var r=i(65478),s=i(2748),a=i(29960),l=i(20356),c=i(2692);class d extends l.Plugin{afterInit(e){Object.keys(e.o.highlightSignature.schema).length&&(e.e.on("change afterSetMode",this.walkNodes).on("afterGetValueFromEditor",d.removeUtilWrappers),this.walkNodes())}beforeDestruct(e){e.e.off("change afterSetMode",this.walkNodes).off("afterGetValueFromEditor",d.removeUtilWrappers)}walkNodes(){if(!this.j.isEditorMode())return;this.checkUtilsBoxToSchema();let{j:e}=this,t=e.ed.createNodeIterator(e.editor,NodeFilter.SHOW_TEXT);this.abortController?.abort(),this.workLoop(t)}runWorker(e){let t;this.j.e.mute();let i=0,{processInChunkCount:o}=this.j.o.highlightSignature;try{do{if(i+=1,!(t=e.nextNode())||this.checkNormalizing(t))return;this.checkReplaceSchemas(t)}while(t&&o>i)}finally{this.j.e.unmute()}this.workLoop(e)}workLoop(e){this.abortController=new AbortController,this.j.async.schedulerPostTask(()=>this.runWorker(e),{delay:this.j.o.highlightSignature.processDelay}).catch(()=>null)}checkNormalizing(e){return!!s.Dom.isText(e.nextSibling)&&(this.j.editor.normalize(),this.walkNodes(),!0)}checkReplaceSchemas(e){if(d.hasUtilWrapper(e))return;let t=e.nodeValue;if(null==t)return;let{j:i}=this,o=i.o.highlightSignature;for(let i in o.schema){let n=RegExp(i);if(n.test(t)){let r=t.match(n);if(!r||void 0===r.index)continue;let a=o.schema[i](this.j,r);if(a){s.Dom.markTemporary(a,{dataHighlightSchema:i}),this.replaceMatchedTextToElm(e,t,r,a);return}}}}replaceMatchedTextToElm(e,t,i,o){let{j:n}=this,{range:r}=n.s,a=r.startContainer===e,l=r.startOffset,c=i.index??0;e.nodeValue=t.substring(0,c);let d=t.substring(c+i[0].length);if(d.length){let t=n.createInside.text(d);s.Dom.after(e,t)}o.innerText=i[0],s.Dom.after(e,o),a&&this.restoreCursorPosition(l,e,o.firstChild,o.nextSibling)}static hasUtilWrapper(e){return s.Dom.isTemporary(e.parentElement)}static removeUtilWrappers(e){e.value=s.Dom.replaceTemporaryFromString(e.value)}restoreCursorPosition(e,...t){for(let i of t)if(i&&i.nodeValue){let t=i.nodeValue;if(t.length>=e){let t=this.j.s.createRange();t.setStart(i,e),this.j.s.selectRange(t,!1);break}e-=t.length}}checkUtilsBoxToSchema(){s.Dom.temporaryList(this.j.editor).forEach(e=>{let t=(0,a.attr)(e,"dataHighlightSchema");if(!t)return;let i=RegExp(t),o=e.innerText??"";(!i.test(o)||o.replace(i,"").length)&&(this.j.s.save(),s.Dom.unwrap(e),this.j.s.restore())})}constructor(...e){super(...e),(0,o._)(this,"abortController",null)}}(0,o._)(d,"requires",["license"]),(0,n.__decorate)([(0,r.debounce)()],d.prototype,"walkNodes",null),(0,n.__decorate)([r.autobind],d.prototype,"runWorker",null),c.JoditPro.plugins.add("highlight-signature",d)},88092:function(e,t,i){"use strict";var o=i(67008),n=i.n(o),r=i(6441),s=i(2748),a=i(68345);r.Config.prototype.controls.iframeEditor={icon:n(),tooltip:"Iframe Editor",exec(e,t){s.Dom.isTag(t,"jodit")&&s.Dom.isTag(t.firstElementChild,"iframe")&&(t=t.firstElementChild),e.e.fire("toggleIframeEditor",s.Dom.isTag(t,"iframe")?t:null)}},(0,a.isArray)(r.Config.prototype.popup.iframe)&&r.Config.prototype.popup.iframe.push("iframeEditor")},1050:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(88092);var r=i(29744),s=i(65478),a=i(22732),l=i(21537),c=i(50911),d=i(62843),u=i(41409),h=i(2692);class p extends c.Plugin{afterInit(e){e.e.on("toggleIframeEditor",this.toggleEditor)}toggleEditor(e){this.__dialog||(this.__dialog=new u.Dialog({language:this.j.o.language,theme:this.j.o.theme}),this.__dialog.setHeader("Iframe Properties").setSize(470,400)),e&&!a.Dom.isTag(e,"iframe")&&(e=void 0);let t=new r.UIIframeEditor(this.__dialog,{src:e?.src??"",name:e?.name??"",title:e?.title??"",frameBorder:e?.frameBorder==="1"||e?.frameBorder==="yes",width:e?.offsetWidth??700,height:e?.offsetHeight??400});this.__dialog.setContent(t);let i=this.__dialog;i.isOpened?i.close():(i.setFooter([(0,d.Button)(i,"cancel","Cancel","default").onAction(()=>i.close()),(0,d.Button)(i,"ok",e?"Update":"Insert","primary").onAction(()=>{if(!t.srcField.value){t.srcField.validate(),t.srcField.focus();return}e||(e=this.j.createInside.element("iframe"),this.j.s.insertNode(e,!0,!1)),e.className=t.state.className||"",(0,l.attr)(e,{src:t.state.src,title:t.state.title,name:t.state.name,frameborder:t.state.frameBorder?"1":"0",width:t.state.width,height:t.state.height}),a.Dom.isTag(e.parentElement,"jodit")&&(0,l.css)(e.parentElement,{width:t.state.width,height:t.state.height}),this.jodit.e.fire("synchro"),i.close()})]).open(),this.jodit.async.requestIdleCallback(()=>{t.srcField.focus()}))}onDblClick(e){a.Dom.isTag(e.target,"iframe")&&this.toggleEditor(e.target)}beforeDestruct(e){this.__dialog?.destruct()}constructor(...e){super(...e),(0,o._)(this,"buttons",[{group:"form",name:"iframeEditor"}]),(0,o._)(this,"__dialog",void 0)}}(0,o._)(p,"requires",["license","color-picker"]),(0,n.__decorate)([s.autobind],p.prototype,"toggleEditor",null),(0,n.__decorate)([(0,s.watch)(":dblclick")],p.prototype,"onDblClick",null),h.JoditPro.plugins.add("iframe-editor",p)},29744:function(e,t,i){"use strict";i.d(t,{UIIframeEditor:function(){return a}});var o=i(82749),n=i(31635),r=i(87325),s=i(67510);class a extends s.UIGroup{className(){return"UIIframeEditor"}constructor(e,t){super(e),(0,o._)(this,"state",{src:"",className:"",width:400,height:200,frameBorder:!1,enableScrollbars:!1,name:"",title:""}),(0,o._)(this,"srcField",void 0),Object.assign(this.state,t),this.srcField=new s.UIInput(e,{label:"URL",type:"url",required:!0,value:this.state.src,onChange:e=>{this.state.src=e}}),this.append([this.srcField,new s.UIBlock(e,[new s.UIInput(e,{label:"Width",type:"number",value:this.state.width,onChange:e=>{this.state.width=parseInt(e,10)||0}}),new s.UIInput(e,{label:"Height",type:"number",value:this.state.height,onChange:e=>{this.state.height=parseInt(e,10)||0}})],{className:this.getFullElName("block"),align:"center"}),new s.UIBlock(e,[new s.UICheckbox(e,{label:"Show frame border",checked:!!t.frameBorder,onChange:e=>{this.state.frameBorder="true"===e}})]),new s.UIInput(e,{label:"Name",value:this.state.name,type:"text",onChange:e=>{this.state.name=e}}),new s.UIInput(e,{label:"Title",value:this.state.title,type:"text",onChange:e=>{this.state.title=e}})])}}a=(0,n.__decorate)([r.component],a)},76542:function(e,t,i){"use strict";i.d(t,{ProImageEditor:function(){return l}});var o=i(82749),n=i(85013),r=i(6441),s=i(91907),a=i(10830);class l extends s.ViewComponent{className(){return"ImageEditorPro"}async open(e,t){let i=this.j,o=r.Config.defaultOptions.imageEditorPro,s=i.c.div("jodit-image-editor-pro");s.style.width="100%",s.style.height="100%";let a=i.dlg();a.setSize(o.dialog.width,o.dialog.height),a.setContent(s),a.open();let l=null,c=null,d=()=>{c?.(),c=null,l?.destroy(),l=null,a.close()};a.e.on("beforeClose",()=>{c?.(),c=null,l?.destroy(),l=null}),l=new n.ImageEditor({container:s,state:{showToolbar:!1,status:"loading"},onSave:i=>{this.persist(l,e,void 0,i,t,d)},onSaveAs:i=>{this.saveAs(l,e,i,t,d)}}),c=this.mountToolbar(a,l);try{let t=await this.loadImage(e);await l.fromBlob(t),i.e.fire("afterImageEditor")}catch(e){l?.update({status:"error",error:e instanceof Error?e.message:e+""}),this.error(e)}}mountToolbar(e,t){let i=this.j,o=(0,a.Button)(i,{icon:{name:"save"},text:i.i18n("Save")},"primary"),r=(0,a.Button)(i,{icon:{name:"save"},name:"save-as",text:i.i18n("Save as")}),s=i.c.span("jodit-image-editor-pro__size"),l=(0,a.Button)(i,n.ICONS.minus),c=i.c.span("jodit-image-editor-pro__zoom"),d=(0,a.Button)(i,n.ICONS.plus),u=(0,a.Button)(i,"update",i.i18n("Reset")),h=(0,a.Button)(i,"undo",i.i18n("Undo")),p=(0,a.Button)(i,"redo",i.i18n("Redo"));l.setState({tooltip:"Zoom out"}),d.setState({tooltip:"Zoom in"});let f=null;o.onAction(()=>{f=o,t.save()}),r.onAction(()=>{f=r,t.saveAs()}),l.onAction(()=>t.update({zoom:t.state.zoom/1.2})),d.onAction(()=>t.update({zoom:1.2*t.state.zoom})),u.onAction(()=>t.reset()),h.onAction(()=>t.update({history:{step:-1}})),p.onAction(()=>t.update({history:{step:1}}));let m=(...e)=>{let t=i.c.div("jodit-image-editor-pro__group");return t.style.display="flex",t.style.alignItems="center",t.style.gap="4px",e.forEach(e=>t.appendChild(e)),t},g=i.c.div("jodit-image-editor-pro__toolbar");g.style.display="flex",g.style.alignItems="center",g.style.gap="12px",g.style.width="100%",s.style.opacity="0.75",c.style.minWidth="3.5em",c.style.textAlign="center",g.appendChild(m(o.container,r.container)),g.appendChild(m(s,l.container,c,d.container));let b=m(u.container,h.container,p.container);b.style.marginLeft="auto",g.appendChild(b),e.setHeader(g);let v="jodit-image-editor-pro__button_busy",y=e=>{let t=n.selectors.selectOutputSize(e),i="exporting"===e.status,a=i||"loading"===e.status,l=e.busyVisible,d=i&&(l??!0);i||(f=null),o.setState({disabled:!e.source||a}),r.setState({disabled:!e.source||a}),o.container.classList.toggle(v,d&&f!==r),r.container.classList.toggle(v,d&&f===r),u.setState({disabled:!n.selectors.selectIsDirty(e)}),h.setState({disabled:!n.selectors.selectCanUndo(e)}),p.setState({disabled:!n.selectors.selectCanRedo(e)}),s.textContent=t?`${t.width} \xd7 ${t.height}`:"";let m=n.selectors.selectViewportFit(e),g=m?Math.round(100*m.scale):Math.round(100*e.zoom);c.textContent=`${g}%`};y(t.state);let w=t.store.subscribe(y);return()=>{w(),[o,r,l,d,u,h,p].forEach(e=>e.destruct())}}saveAs(e,t,i,o,n){this.j.prompt("Enter new name","Save in new file",r=>{let s=(r||"").trim();if(!s)return this.j.alert("The name should not be empty"),!1;this.persist(e,t,s,i,o,n)})}async persist(e,t,i,o,n,r){e?.update({status:"exporting"});try{let e=await this.blobSize(o),s={action:this.coreSupportsSaved()?"saved":"resize",box:e};void 0!==i?this.j.e.fire("afterImageEditorSave",s,i):this.j.e.fire("afterImageEditorSave",s);let a=await this.uploadEdited(t,o,i),l=()=>{r(),this.j.e.fire("update.filebrowser")};n(i,this.coreSupportsSaved()?{action:"saved",box:e,newPath:a||void 0}:{action:"resize",box:e},l,e=>{r(),this.error(e)})}catch(e){r(),this.error(e)}}async uploadEdited(e,t,i){let{source:o,path:n,name:r}=await this.j.dataProvider.getPathByUrl(e),s=this.connectorUrl();if(!s)throw Error("No connector configured for imageSave");let a=(i||r||"image.png")+"",l=new FormData;l.append("action","imageSave"),l.append("source",(o??"")+""),l.append("path",(n??"")+""),l.append("name",a),l.append("files[0]",t,a);let c=s.includes("?")?"&":"?",d=await fetch(`${s}${c}action=imageSave`,{method:"POST",body:l,credentials:"include"}),u=await d.json();if(!u.success)throw Error(u.message||"Failed to save the edited image");return u.data?.newPath??""}coreSupportsSaved(){let[e=0,t=0,i=0]=(this.j.getVersion?this.j.getVersion():"").split(".").map(e=>parseInt(e,10)||0);return e>4||4===e&&(t>12||12===t&&i>=34)}connectorUrl(){let e=this.j.o.ajax?.url,t=this.j.o.uploader?.url;return"string"==typeof e&&e?e:"string"==typeof t&&t?t:""}async loadImage(e){let t=this.connectorUrl();if(t)try{return await this.loadViaConnector(t,e)}catch{}let i=e.includes("?")?"&":"?",o=await fetch(`${e}${i}_tst=${Date.now()}`,{credentials:"include"});if(!o.ok)throw Error(`Failed to load image (${o.status})`);return o.blob()}async loadViaConnector(e,t){let{source:i,path:o,name:n}=await this.j.dataProvider.getPathByUrl(t),r=new FormData;r.append("action","imageLoad"),r.append("source",(i??"")+""),r.append("path",(o??"")+""),r.append("name",(n??"")+"");let s=e.includes("?")?"&":"?",a=await fetch(`${e}${s}action=imageLoad`,{method:"POST",body:r,credentials:"include"}),l=await a.json();if(!l.success||!l.data?.content)throw Error(l.message||"Failed to load the image");return(await fetch(l.data.content)).blob()}async blobSize(e){let t=await createImageBitmap(e),i={w:t.width,h:t.height};return t.close(),i}error(e){this.j.e.fire("errorMessage",e.message)}constructor(...e){super(...e),(0,o._)(this,"isProImageEditor",!0)}}},45719:function(e,t,i){"use strict";i(6441).Config.prototype.imageEditorPro={dialog:{width:"90%",height:"90%"}}},98270:function(e,t,i){"use strict";var o=i(82749);i(45719);var n=i(76542),r=i(50911),s=i(2692);class a extends r.Plugin{afterInit(e){let t=n.ProImageEditor,i=s.JoditPro.modules;i.ImageEditorCore||i.ImageEditor===t||(i.ImageEditorCore=i.ImageEditor),i.ImageEditor=t}beforeDestruct(e){}}(0,o._)(a,"requires",["license"]),s.JoditPro.plugins.add("imageEditorPro",a)},12373:function(e,t,i){"use strict";i(25187),i(58858),i(21246),i(49934),i(3115),i(41810),i(61328),i(45632),i(8390),i(29528),i(85174),i(90882),i(97068),i(482),i(40650),i(46958),i(98270),i(1050),i(95618),i(74398),i(79850),i(41406),i(47682),i(75554),i(61886),i(19374),i(73098),i(13152)},41113:function(e,t,i){"use strict";var o=i(63643),n=i.n(o),r=i(6441);r.Config.prototype.keyboard={defaultLayoutSet:"en",showLayoutSwitcher:!0,extraKeyGroup:"other",extraKeyButtons:[],delayKeyRepeat:350,periodKeyRepeat:100,layoutList:{en:{title:"English",keys:[["` ~ ±","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 *","9 (","0 )","- _","= +","Backspace"],["Tab","q Q","w W","e E","r R","t T","y Y","u U","i I","o O","p P","[ {","] }","\\ |"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","; :","' \"","Enter"],["Shift","z Z","x X","c C","v V","b B","n N","m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},es:{title:"Español",keys:[["º ` ~","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 *","9 (","0 )","- _ |","¡ = +","Backspace"],["Tab","q Q","w W","e E","r R","t T","y Y","u U","i I","o O","p P","[ {","] }","ç Ç \\"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","ñ Ñ ; :","' \"","Enter"],["Shift","z Z","x X","c C","v V","b B","n N","m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},de:{title:"Deutsch",keys:[["` ~ ±","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 * :","9 ( {","0 ) }","- _","= +","Backspace"],["Tab","q Q","w W","e E","r R","t T","z Z","u U","i I","o O","p P","ü Ü [","] }","\\ |"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","ö Ö ;","ä Ä ' \"","Enter"],["Shift","y Y","x X","c C","v V","b B","n N","m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},ru:{title:"Русский",keys:[["` ~ ±","1 ! §",'2 @ "',"3 # :","4 $ <","5 % >","6 ^","7 &","8 *","9 (","0 )","- _","= +","Backspace"],["Tab","й Й","ц Ц","у У","к К","е Е","н Н","г Г","ш Ш","щ Щ","з З","х Х [","ъ ] {","\\ | }"],["Caps","ф Ф","ы Ы","в В","а А","п П","р Р","о О","л Л","д Д","ж Ж ;","э Э '","Enter"],["Shift","я Я","ч Ч","с С","м М","и И","т Т","ь Ь","б Б ,","ю Ю .","/ ?","Shift"],["Options","Space","Options"]]},tr:{title:"Türkçe",keys:[['" é` ~',"1 ! §",'2 @ "',"3 # :","4 $ <","5 % >","6 ^ ±","7 &","8 *","9 ( {","0 ) }","- _ [","= + ]","Backspace"],["Tab","q Q","w W","e E","r R","t T","y Y","u U","ı I","o O","p P","ğ Ğ","ü Ü",", \\ |"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","ş Ş","i̇ İ","Enter"],["Shift","z Z","x X","c C","v V","b B","n N","m M","ö Ö <","ç Ç >",". / ?","Shift"],["Options","Space","Options"]]},iw:{title:"Hebrew",keys:[["` ~ ±","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 *","9 (","0 )","- _","= +","Backspace"],["Tab","/ q Q","' w W","ק e E","ר r R","א t T","ט y Y","ו u U","ן i I","ם o O","פ p P","[ {","] }","\\ |"],["Caps","ש a A","ד s S","ג d D","כ f F","ע g G","י h H","ח j J","ל k K","ך l L","ף ; :","' \"","Enter"],["Shift","ז z Z","ס x X","ב c C","ה v V","נ b B","מ n N","צ m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},tata:{title:"Tata",keys:[["һ Һ` ~","1 ! §",'2 @ "',"3 # :","4 $ <","5 % >","6 ^ ±","7 &","8 *","9 ( {","0 )","- _","= +","Backspace"],["Tab","й Й","ө Ө","у У","к К","е Е","н Н","г Г","ш Ш","ә Ә","з З","х Х [","ү Ү ]","\\ | }"],["Caps","ф Ф","ы Ы","в В","а А","п П","р Р","о О","л Л","д Д","ң Ң ;","э Э '","Enter"],["Shift","я Я","ч Ч","с С","м М","и И","т Т","җ Җ","б Б ,","ю Ю .","ґ Ґ /","Shift"],["Options","Space","Options"]]}},layoutSwitchList:["en","es","de","ru","tr","iw","tata"],keySize:32,layout:[[1,1,1,1,1,1,1,1,1,1,1,1,1,2],[1.5,1,1,1,1,1,1,1,1,1,1,1,1,1.5],[1.8,1,1,1,1,1,1,1,1,1,1,1,2.2],[2.5,1,1,1,1,1,1,1,1,1,1,2.5],[3.5,9,3.5]]},r.Config.prototype.controls.keyboard={tooltip:"Keyboard",icon:n(),isActive:e=>!!e.e.fire("isKeyboardOpened"),command:"toggleKeyboard"},r.Config.prototype.controls.extraKeyboardButtons={}},95618:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(41113);var r=i(25241),s=i(6441),a=i(65478),l=i(27613),c=i(50911),d=i(67510),u=i(41409),h=i(2692);class p extends c.Plugin{afterInit(e){e.registerCommand("toggleKeyboard",this.toggleKeyboard).registerCommand("insertChar",this.insertChar),e.e.on("isKeyboardOpened",()=>this.__keyboard?.isOpened)}insertChar(e,t,i){this.j.s.insertNode(this.j.createInside.text(i))}toggleKeyboard(){if(!this.__keyboard){this.__keyboard=new u.Dialog({toolbarButtonSize:"tiny"});let e=new r.UIKeyboard(this.j);this.__keyboard.setMod("slim",!0).setMod("adaptive",!1).setContent(e);let{showLayoutSwitcher:t,layoutSwitchList:i,layoutList:o}=this.j.o.keyboard;if(t){let t=new d.UISelect(this.__keyboard,{value:e.state.currentLayout,options:i.map(e=>({text:o[e]?.title??e,value:e})),onChange(t){e.state.currentLayout=t}});t.setMod("size","tiny").setMod("width","auto").setMod("variant","outline"),this.__keyboard.setHeader(t)}}this.__keyboard.isOpened?this.__keyboard.close():this.__keyboard.open()}beforeDestruct(e){this.__keyboard?.destruct()}constructor(e){super(e),(0,o._)(this,"hasStyle",!h.JoditPro.fatMode),(0,o._)(this,"buttons",[{group:"insert",name:"keyboard"}]),(0,o._)(this,"__keyboard",void 0);let{extraKeyButtons:t,extraKeyGroup:i}=e.o.keyboard;t.length&&t.forEach((t,o)=>{let n=(0,l.isString)(t)?t:t.key,r=(0,l.isString)(t)||!t.hotkeys?["ctrl+"+(o+1)]:t.hotkeys;e.registerButton({name:"extraKeyboardButtons."+n,group:i});let{extraKeyboardButtons:a}=s.Config.defaultOptions.controls;a[n]={name:n,tooltip:n,args:[n],hotkeys:r,command:"insertChar"}})}}(0,o._)(p,"requires",["license"]),(0,n.__decorate)([a.autobind],p.prototype,"insertChar",null),(0,n.__decorate)([a.autobind],p.prototype,"toggleKeyboard",null),h.JoditPro.plugins.add("keyboard",p)},25241:function(e,t,i){"use strict";i.d(t,{UIKeyboard:function(){return y}});var o=i(82749),n=i(31635),r=i(82758),s=i(65478),a=i(43555),l=i(67510),c=i(27926),d=i.n(c),u=i(10690),h=i.n(u),p=i(91997),f=i.n(p),m=i(11699),g=i.n(m),b=i(98126),v=i.n(b);class y extends l.UIElement{className(){return"UIKeyboard"}render(){let{layout:e,keySize:t}=this.j.options.keyboard,i=e.length;return`<div>${(()=>{let o=[];for(let n=0;i>n;n+=1){let i=[];for(let o=0;o<e[n].length;o+=1)i.push(`<div style="width:${t*e[n][o]}px;height:${t}px;" class="&__key"></div>`);o.push(`<div class='&__row'>${i.join(`
|
|
617
|
+
</div>`}constructor(e,t,i,o){super(e);let n=this.getElm("editor");(0,r.assert)(null!=n,"editor element does not exist");let s=a.JoditPro.make(n,{buttons:["bold","italic","image"],height:100,minHeight:100,allowResizeY:!1,allowResizeX:!1,disablePlugins:["mobile","backup","highlight-signature","tune-block","show-blocks"],toolbarButtonSize:"small",language:e.o.language,direction:e.o.direction,theme:e.o.theme,statusbar:!1,...t});s.value=i,s.e.on("change",()=>o(s.value))}}l=(0,o.__decorate)([n.component],l)},40650:function(e,t,i){"use strict";var o=i(82749),n=i(25088),r=i.n(n),s=i(6441),a=i(21537),l=i(50911),c=i(59451),d=i(2692);s.Config.prototype.controls.google={tooltip:"Google search",icon:r(),isDisabled:e=>(0,c.isEditorEmpty)(e.editor),command:"startSearch"};class u extends l.Plugin{afterInit(e){e.registerCommand("startSearch",{exec(){let t,{s:i}=e;if(t=i.isCollapsed()?i.current()?.parentElement?.innerText:i.sel?.toString()){let e="https://www.google.com/search?q="+encodeURIComponent((0,a.trim)(t));window.open(e,"_blank")}}})}beforeDestruct(e){}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"google",group:"search"}])}}(0,o._)(u,"requires",["license"]),d.JoditPro.plugins.add("google-search",u)},36347:function(e,t,i){"use strict";i(6441).Config.prototype.highlightSignature={processDelay:0,processInChunkCount:300,schema:{},excludeTags:["pre"]}},46958:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(36347);var r=i(65478),s=i(2748),a=i(29960),l=i(20356),c=i(2692);class d extends l.Plugin{afterInit(e){Object.keys(e.o.highlightSignature.schema).length&&(e.e.on("change afterSetMode",this.walkNodes).on("afterGetValueFromEditor",d.removeUtilWrappers),this.walkNodes())}beforeDestruct(e){e.e.off("change afterSetMode",this.walkNodes).off("afterGetValueFromEditor",d.removeUtilWrappers)}walkNodes(){if(!this.j.isEditorMode())return;this.checkUtilsBoxToSchema();let{j:e}=this,t=e.ed.createNodeIterator(e.editor,NodeFilter.SHOW_TEXT);this.abortController?.abort(),this.workLoop(t)}runWorker(e){let t;this.j.e.mute();let i=0,{processInChunkCount:o}=this.j.o.highlightSignature;try{do{if(i+=1,!(t=e.nextNode())||this.checkNormalizing(t))return;this.checkReplaceSchemas(t)}while(t&&o>i)}finally{this.j.e.unmute()}this.workLoop(e)}workLoop(e){this.abortController=new AbortController,this.j.async.schedulerPostTask(()=>this.runWorker(e),{delay:this.j.o.highlightSignature.processDelay}).catch(()=>null)}checkNormalizing(e){return!!s.Dom.isText(e.nextSibling)&&(this.j.editor.normalize(),this.walkNodes(),!0)}checkReplaceSchemas(e){if(d.hasUtilWrapper(e))return;let t=e.nodeValue;if(null==t)return;let{j:i}=this,o=i.o.highlightSignature;for(let i in o.schema){let n=RegExp(i);if(n.test(t)){let r=t.match(n);if(!r||void 0===r.index)continue;let a=o.schema[i](this.j,r);if(a){s.Dom.markTemporary(a,{dataHighlightSchema:i}),this.replaceMatchedTextToElm(e,t,r,a);return}}}}replaceMatchedTextToElm(e,t,i,o){let{j:n}=this,{range:r}=n.s,a=r.startContainer===e,l=r.startOffset,c=i.index??0;e.nodeValue=t.substring(0,c);let d=t.substring(c+i[0].length);if(d.length){let t=n.createInside.text(d);s.Dom.after(e,t)}o.innerText=i[0],s.Dom.after(e,o),a&&this.restoreCursorPosition(l,e,o.firstChild,o.nextSibling)}static hasUtilWrapper(e){return s.Dom.isTemporary(e.parentElement)}static removeUtilWrappers(e){e.value=s.Dom.replaceTemporaryFromString(e.value)}restoreCursorPosition(e,...t){for(let i of t)if(i&&i.nodeValue){let t=i.nodeValue;if(t.length>=e){let t=this.j.s.createRange();t.setStart(i,e),this.j.s.selectRange(t,!1);break}e-=t.length}}checkUtilsBoxToSchema(){s.Dom.temporaryList(this.j.editor).forEach(e=>{let t=(0,a.attr)(e,"dataHighlightSchema");if(!t)return;let i=RegExp(t),o=e.innerText??"";(!i.test(o)||o.replace(i,"").length)&&(this.j.s.save(),s.Dom.unwrap(e),this.j.s.restore())})}constructor(...e){super(...e),(0,o._)(this,"abortController",null)}}(0,o._)(d,"requires",["license"]),(0,n.__decorate)([(0,r.debounce)()],d.prototype,"walkNodes",null),(0,n.__decorate)([r.autobind],d.prototype,"runWorker",null),c.JoditPro.plugins.add("highlight-signature",d)},88092:function(e,t,i){"use strict";var o=i(67008),n=i.n(o),r=i(6441),s=i(2748),a=i(68345);r.Config.prototype.controls.iframeEditor={icon:n(),tooltip:"Iframe Editor",exec(e,t){s.Dom.isTag(t,"jodit")&&s.Dom.isTag(t.firstElementChild,"iframe")&&(t=t.firstElementChild),e.e.fire("toggleIframeEditor",s.Dom.isTag(t,"iframe")?t:null)}},(0,a.isArray)(r.Config.prototype.popup.iframe)&&r.Config.prototype.popup.iframe.push("iframeEditor")},1050:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(88092);var r=i(29744),s=i(65478),a=i(22732),l=i(21537),c=i(50911),d=i(62843),u=i(41409),h=i(2692);class p extends c.Plugin{afterInit(e){e.e.on("toggleIframeEditor",this.toggleEditor)}toggleEditor(e){this.__dialog||(this.__dialog=new u.Dialog({language:this.j.o.language,theme:this.j.o.theme}),this.__dialog.setHeader("Iframe Properties").setSize(470,400)),e&&!a.Dom.isTag(e,"iframe")&&(e=void 0);let t=new r.UIIframeEditor(this.__dialog,{src:e?.src??"",name:e?.name??"",title:e?.title??"",frameBorder:e?.frameBorder==="1"||e?.frameBorder==="yes",width:e?.offsetWidth??700,height:e?.offsetHeight??400});this.__dialog.setContent(t);let i=this.__dialog;i.isOpened?i.close():(i.setFooter([(0,d.Button)(i,"cancel","Cancel","default").onAction(()=>i.close()),(0,d.Button)(i,"ok",e?"Update":"Insert","primary").onAction(()=>{if(!t.srcField.value){t.srcField.validate(),t.srcField.focus();return}e||(e=this.j.createInside.element("iframe"),this.j.s.insertNode(e,!0,!1)),e.className=t.state.className||"",(0,l.attr)(e,{src:t.state.src,title:t.state.title,name:t.state.name,frameborder:t.state.frameBorder?"1":"0",width:t.state.width,height:t.state.height}),a.Dom.isTag(e.parentElement,"jodit")&&(0,l.css)(e.parentElement,{width:t.state.width,height:t.state.height}),this.jodit.e.fire("synchro"),i.close()})]).open(),this.jodit.async.requestIdleCallback(()=>{t.srcField.focus()}))}onDblClick(e){a.Dom.isTag(e.target,"iframe")&&this.toggleEditor(e.target)}beforeDestruct(e){this.__dialog?.destruct()}constructor(...e){super(...e),(0,o._)(this,"buttons",[{group:"form",name:"iframeEditor"}]),(0,o._)(this,"__dialog",void 0)}}(0,o._)(p,"requires",["license","color-picker"]),(0,n.__decorate)([s.autobind],p.prototype,"toggleEditor",null),(0,n.__decorate)([(0,s.watch)(":dblclick")],p.prototype,"onDblClick",null),h.JoditPro.plugins.add("iframe-editor",p)},29744:function(e,t,i){"use strict";i.d(t,{UIIframeEditor:function(){return a}});var o=i(82749),n=i(31635),r=i(87325),s=i(67510);class a extends s.UIGroup{className(){return"UIIframeEditor"}constructor(e,t){super(e),(0,o._)(this,"state",{src:"",className:"",width:400,height:200,frameBorder:!1,enableScrollbars:!1,name:"",title:""}),(0,o._)(this,"srcField",void 0),Object.assign(this.state,t),this.srcField=new s.UIInput(e,{label:"URL",type:"url",required:!0,value:this.state.src,onChange:e=>{this.state.src=e}}),this.append([this.srcField,new s.UIBlock(e,[new s.UIInput(e,{label:"Width",type:"number",value:this.state.width,onChange:e=>{this.state.width=parseInt(e,10)||0}}),new s.UIInput(e,{label:"Height",type:"number",value:this.state.height,onChange:e=>{this.state.height=parseInt(e,10)||0}})],{className:this.getFullElName("block"),align:"center"}),new s.UIBlock(e,[new s.UICheckbox(e,{label:"Show frame border",checked:!!t.frameBorder,onChange:e=>{this.state.frameBorder="true"===e}})]),new s.UIInput(e,{label:"Name",value:this.state.name,type:"text",onChange:e=>{this.state.name=e}}),new s.UIInput(e,{label:"Title",value:this.state.title,type:"text",onChange:e=>{this.state.title=e}})])}}a=(0,n.__decorate)([r.component],a)},76542:function(e,t,i){"use strict";i.d(t,{ProImageEditor:function(){return l}});var o=i(82749),n=i(85013),r=i(6441),s=i(91907),a=i(10830);class l extends s.ViewComponent{className(){return"ImageEditorPro"}async open(e,t){let i=this.j,o=r.Config.defaultOptions.imageEditorPro,s=i.c.div("jodit-image-editor-pro");s.style.width="100%",s.style.height="100%";let a=i.dlg();a.setSize(o.dialog.width,o.dialog.height),a.setContent(s),a.open();let l=null,c=null,d=()=>{c?.(),c=null,l?.destroy(),l=null,a.close()};a.e.on("beforeClose",()=>{c?.(),c=null,l?.destroy(),l=null}),l=new n.ImageEditor({container:s,state:{showToolbar:!1,status:"loading"},onSave:i=>{this.persist(l,e,void 0,i,t,d)},onSaveAs:i=>{this.saveAs(l,e,i,t,d)}}),c=this.mountToolbar(a,l);try{let t=await this.loadImage(e);await l.fromBlob(t),i.e.fire("afterImageEditor")}catch(e){l?.update({status:"error",error:e instanceof Error?e.message:e+""}),this.error(e)}}mountToolbar(e,t){let i=this.j,o=(0,a.Button)(i,{icon:{name:"save"},text:i.i18n("Save")},"primary"),r=(0,a.Button)(i,{icon:{name:"save"},name:"save-as",text:i.i18n("Save as")}),s=i.c.span("jodit-image-editor-pro__size"),l=(0,a.Button)(i,n.ICONS.minus),c=i.c.span("jodit-image-editor-pro__zoom"),d=(0,a.Button)(i,n.ICONS.plus),u=(0,a.Button)(i,"update",i.i18n("Reset")),h=(0,a.Button)(i,"undo",i.i18n("Undo")),p=(0,a.Button)(i,"redo",i.i18n("Redo"));l.setState({tooltip:"Zoom out"}),d.setState({tooltip:"Zoom in"});let f=null;o.onAction(()=>{f=o,t.save()}),r.onAction(()=>{f=r,t.saveAs()}),l.onAction(()=>t.update({zoom:t.state.zoom/1.2})),d.onAction(()=>t.update({zoom:1.2*t.state.zoom})),u.onAction(()=>t.reset()),h.onAction(()=>t.update({history:{step:-1}})),p.onAction(()=>t.update({history:{step:1}}));let m=(...e)=>{let t=i.c.div("jodit-image-editor-pro__group");return t.style.display="flex",t.style.alignItems="center",t.style.gap="4px",e.forEach(e=>t.appendChild(e)),t},g=i.c.div("jodit-image-editor-pro__toolbar");g.style.display="flex",g.style.alignItems="center",g.style.gap="12px",g.style.width="100%",s.style.opacity="0.75",c.style.minWidth="3.5em",c.style.textAlign="center",g.appendChild(m(o.container,r.container)),g.appendChild(m(s,l.container,c,d.container));let b=m(u.container,h.container,p.container);b.style.marginLeft="auto",g.appendChild(b),e.setHeader(g);let v="jodit-image-editor-pro__button_busy",y=e=>{let t=n.selectors.selectOutputSize(e),i="exporting"===e.status,a=i||"loading"===e.status,l=e.busyVisible,d=i&&(l??!0);i||(f=null),o.setState({disabled:!e.source||a}),r.setState({disabled:!e.source||a}),o.container.classList.toggle(v,d&&f!==r),r.container.classList.toggle(v,d&&f===r),u.setState({disabled:!n.selectors.selectIsDirty(e)}),h.setState({disabled:!n.selectors.selectCanUndo(e)}),p.setState({disabled:!n.selectors.selectCanRedo(e)}),s.textContent=t?`${t.width} \xd7 ${t.height}`:"";let m=n.selectors.selectViewportFit(e),g=m?Math.round(100*m.scale):Math.round(100*e.zoom);c.textContent=`${g}%`};y(t.state);let w=t.store.subscribe(y);return()=>{w(),[o,r,l,d,u,h,p].forEach(e=>e.destruct())}}saveAs(e,t,i,o,n){this.j.prompt("Enter new name","Save in new file",r=>{let s=(r||"").trim();if(!s)return this.j.alert("The name should not be empty"),!1;this.persist(e,t,s,i,o,n)})}async persist(e,t,i,o,n,r){e?.update({status:"exporting"});try{let e=await this.blobSize(o),s={action:this.coreSupportsSaved()?"saved":"resize",box:e};void 0!==i?this.j.e.fire("afterImageEditorSave",s,i):this.j.e.fire("afterImageEditorSave",s);let a=await this.uploadEdited(t,o,i),l=()=>{r(),this.j.e.fire("update.filebrowser")};n(i,this.coreSupportsSaved()?{action:"saved",box:e,newPath:a||void 0}:{action:"resize",box:e},l,e=>{r(),this.error(e)})}catch(e){r(),this.error(e)}}async uploadEdited(e,t,i){let{source:o,path:n,name:r}=await this.j.dataProvider.getPathByUrl(e),s=this.connectorUrl();if(!s)throw Error("No connector configured for imageSave");let a=(i||r||"image.png")+"",l=new FormData;l.append("action","imageSave"),l.append("source",(o??"")+""),l.append("path",(n??"")+""),l.append("name",a),l.append("files[0]",t,a);let c=s.includes("?")?"&":"?",d=await fetch(`${s}${c}action=imageSave`,{method:"POST",body:l,credentials:"include"}),u=await d.json();if(!u.success)throw Error(u.message||"Failed to save the edited image");return u.data?.newPath??""}coreSupportsSaved(){let[e=0,t=0,i=0]=(this.j.getVersion?this.j.getVersion():"").split(".").map(e=>parseInt(e,10)||0);return e>4||4===e&&(t>12||12===t&&i>=34)}connectorUrl(){let e=this.j.o.ajax?.url,t=this.j.o.uploader?.url;return"string"==typeof e&&e?e:"string"==typeof t&&t?t:""}async loadImage(e){let t=this.connectorUrl();if(t)try{return await this.loadViaConnector(t,e)}catch{}let i=e.includes("?")?"&":"?",o=await fetch(`${e}${i}_tst=${Date.now()}`,{credentials:"include"});if(!o.ok)throw Error(`Failed to load image (${o.status})`);return o.blob()}async loadViaConnector(e,t){let{source:i,path:o,name:n}=await this.j.dataProvider.getPathByUrl(t),r=new FormData;r.append("action","imageLoad"),r.append("source",(i??"")+""),r.append("path",(o??"")+""),r.append("name",(n??"")+"");let s=e.includes("?")?"&":"?",a=await fetch(`${e}${s}action=imageLoad`,{method:"POST",body:r,credentials:"include"}),l=await a.json();if(!l.success||!l.data?.content)throw Error(l.message||"Failed to load the image");return(await fetch(l.data.content)).blob()}async blobSize(e){let t=await createImageBitmap(e),i={w:t.width,h:t.height};return t.close(),i}error(e){this.j.e.fire("errorMessage",e.message)}constructor(...e){super(...e),(0,o._)(this,"isProImageEditor",!0)}}},45719:function(e,t,i){"use strict";i(6441).Config.prototype.imageEditorPro={dialog:{width:"90%",height:"90%"}}},98270:function(e,t,i){"use strict";var o=i(82749);i(45719);var n=i(76542),r=i(50911),s=i(2692);class a extends r.Plugin{afterInit(e){let t=n.ProImageEditor,i=s.JoditPro.modules;i.ImageEditorCore||i.ImageEditor===t||(i.ImageEditorCore=i.ImageEditor),i.ImageEditor=t}beforeDestruct(e){}}(0,o._)(a,"requires",["license"]),s.JoditPro.plugins.add("imageEditorPro",a)},12373:function(e,t,i){"use strict";i(25187),i(58858),i(21246),i(49934),i(3115),i(41810),i(61328),i(45632),i(8390),i(57722),i(29528),i(85174),i(90882),i(97068),i(482),i(40650),i(46958),i(98270),i(1050),i(95618),i(74398),i(79850),i(41406),i(47682),i(75554),i(61886),i(19374),i(73098),i(13152)},41113:function(e,t,i){"use strict";var o=i(63643),n=i.n(o),r=i(6441);r.Config.prototype.keyboard={defaultLayoutSet:"en",showLayoutSwitcher:!0,extraKeyGroup:"other",extraKeyButtons:[],delayKeyRepeat:350,periodKeyRepeat:100,layoutList:{en:{title:"English",keys:[["` ~ ±","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 *","9 (","0 )","- _","= +","Backspace"],["Tab","q Q","w W","e E","r R","t T","y Y","u U","i I","o O","p P","[ {","] }","\\ |"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","; :","' \"","Enter"],["Shift","z Z","x X","c C","v V","b B","n N","m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},es:{title:"Español",keys:[["º ` ~","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 *","9 (","0 )","- _ |","¡ = +","Backspace"],["Tab","q Q","w W","e E","r R","t T","y Y","u U","i I","o O","p P","[ {","] }","ç Ç \\"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","ñ Ñ ; :","' \"","Enter"],["Shift","z Z","x X","c C","v V","b B","n N","m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},de:{title:"Deutsch",keys:[["` ~ ±","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 * :","9 ( {","0 ) }","- _","= +","Backspace"],["Tab","q Q","w W","e E","r R","t T","z Z","u U","i I","o O","p P","ü Ü [","] }","\\ |"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","ö Ö ;","ä Ä ' \"","Enter"],["Shift","y Y","x X","c C","v V","b B","n N","m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},ru:{title:"Русский",keys:[["` ~ ±","1 ! §",'2 @ "',"3 # :","4 $ <","5 % >","6 ^","7 &","8 *","9 (","0 )","- _","= +","Backspace"],["Tab","й Й","ц Ц","у У","к К","е Е","н Н","г Г","ш Ш","щ Щ","з З","х Х [","ъ ] {","\\ | }"],["Caps","ф Ф","ы Ы","в В","а А","п П","р Р","о О","л Л","д Д","ж Ж ;","э Э '","Enter"],["Shift","я Я","ч Ч","с С","м М","и И","т Т","ь Ь","б Б ,","ю Ю .","/ ?","Shift"],["Options","Space","Options"]]},tr:{title:"Türkçe",keys:[['" é` ~',"1 ! §",'2 @ "',"3 # :","4 $ <","5 % >","6 ^ ±","7 &","8 *","9 ( {","0 ) }","- _ [","= + ]","Backspace"],["Tab","q Q","w W","e E","r R","t T","y Y","u U","ı I","o O","p P","ğ Ğ","ü Ü",", \\ |"],["Caps","a A","s S","d D","f F","g G","h H","j J","k K","l L","ş Ş","i̇ İ","Enter"],["Shift","z Z","x X","c C","v V","b B","n N","m M","ö Ö <","ç Ç >",". / ?","Shift"],["Options","Space","Options"]]},iw:{title:"Hebrew",keys:[["` ~ ±","1 ! §","2 @","3 #","4 $","5 %","6 ^","7 &","8 *","9 (","0 )","- _","= +","Backspace"],["Tab","/ q Q","' w W","ק e E","ר r R","א t T","ט y Y","ו u U","ן i I","ם o O","פ p P","[ {","] }","\\ |"],["Caps","ש a A","ד s S","ג d D","כ f F","ע g G","י h H","ח j J","ל k K","ך l L","ף ; :","' \"","Enter"],["Shift","ז z Z","ס x X","ב c C","ה v V","נ b B","מ n N","צ m M",", <",". >","/ ?","Shift"],["Options","Space","Options"]]},tata:{title:"Tata",keys:[["һ Һ` ~","1 ! §",'2 @ "',"3 # :","4 $ <","5 % >","6 ^ ±","7 &","8 *","9 ( {","0 )","- _","= +","Backspace"],["Tab","й Й","ө Ө","у У","к К","е Е","н Н","г Г","ш Ш","ә Ә","з З","х Х [","ү Ү ]","\\ | }"],["Caps","ф Ф","ы Ы","в В","а А","п П","р Р","о О","л Л","д Д","ң Ң ;","э Э '","Enter"],["Shift","я Я","ч Ч","с С","м М","и И","т Т","җ Җ","б Б ,","ю Ю .","ґ Ґ /","Shift"],["Options","Space","Options"]]}},layoutSwitchList:["en","es","de","ru","tr","iw","tata"],keySize:32,layout:[[1,1,1,1,1,1,1,1,1,1,1,1,1,2],[1.5,1,1,1,1,1,1,1,1,1,1,1,1,1.5],[1.8,1,1,1,1,1,1,1,1,1,1,1,2.2],[2.5,1,1,1,1,1,1,1,1,1,1,2.5],[3.5,9,3.5]]},r.Config.prototype.controls.keyboard={tooltip:"Keyboard",icon:n(),isActive:e=>!!e.e.fire("isKeyboardOpened"),command:"toggleKeyboard"},r.Config.prototype.controls.extraKeyboardButtons={}},95618:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(41113);var r=i(25241),s=i(6441),a=i(65478),l=i(27613),c=i(50911),d=i(67510),u=i(41409),h=i(2692);class p extends c.Plugin{afterInit(e){e.registerCommand("toggleKeyboard",this.toggleKeyboard).registerCommand("insertChar",this.insertChar),e.e.on("isKeyboardOpened",()=>this.__keyboard?.isOpened)}insertChar(e,t,i){this.j.s.insertNode(this.j.createInside.text(i))}toggleKeyboard(){if(!this.__keyboard){this.__keyboard=new u.Dialog({toolbarButtonSize:"tiny"});let e=new r.UIKeyboard(this.j);this.__keyboard.setMod("slim",!0).setMod("adaptive",!1).setContent(e);let{showLayoutSwitcher:t,layoutSwitchList:i,layoutList:o}=this.j.o.keyboard;if(t){let t=new d.UISelect(this.__keyboard,{value:e.state.currentLayout,options:i.map(e=>({text:o[e]?.title??e,value:e})),onChange(t){e.state.currentLayout=t}});t.setMod("size","tiny").setMod("width","auto").setMod("variant","outline"),this.__keyboard.setHeader(t)}}this.__keyboard.isOpened?this.__keyboard.close():this.__keyboard.open()}beforeDestruct(e){this.__keyboard?.destruct()}constructor(e){super(e),(0,o._)(this,"hasStyle",!h.JoditPro.fatMode),(0,o._)(this,"buttons",[{group:"insert",name:"keyboard"}]),(0,o._)(this,"__keyboard",void 0);let{extraKeyButtons:t,extraKeyGroup:i}=e.o.keyboard;t.length&&t.forEach((t,o)=>{let n=(0,l.isString)(t)?t:t.key,r=(0,l.isString)(t)||!t.hotkeys?["ctrl+"+(o+1)]:t.hotkeys;e.registerButton({name:"extraKeyboardButtons."+n,group:i});let{extraKeyboardButtons:a}=s.Config.defaultOptions.controls;a[n]={name:n,tooltip:n,args:[n],hotkeys:r,command:"insertChar"}})}}(0,o._)(p,"requires",["license"]),(0,n.__decorate)([a.autobind],p.prototype,"insertChar",null),(0,n.__decorate)([a.autobind],p.prototype,"toggleKeyboard",null),h.JoditPro.plugins.add("keyboard",p)},25241:function(e,t,i){"use strict";i.d(t,{UIKeyboard:function(){return y}});var o=i(82749),n=i(31635),r=i(82758),s=i(65478),a=i(43555),l=i(67510),c=i(27926),d=i.n(c),u=i(10690),h=i.n(u),p=i(91997),f=i.n(p),m=i(11699),g=i.n(m),b=i(98126),v=i.n(b);class y extends l.UIElement{className(){return"UIKeyboard"}render(){let{layout:e,keySize:t}=this.j.options.keyboard,i=e.length;return`<div>${(()=>{let o=[];for(let n=0;i>n;n+=1){let i=[];for(let o=0;o<e[n].length;o+=1)i.push(`<div style="width:${t*e[n][o]}px;height:${t}px;" class="&__key"></div>`);o.push(`<div class='&__row'>${i.join(`
|
|
606
618
|
`)}</div>`)}return o.join(`
|
|
607
619
|
`)})()}</div>`}onStateChange(){let{currentLayout:e,options:t,shift:i,caps:o}=this.state,{keys:n}=this.j.o.keyboard.layoutList[e],r=0;for(let e=0;e<n.length;e+=1)for(let s=0;s<n[e].length;s+=1){let a=n[e][s].split(" "),l=a[0];i&&(l=a[1]),!i&&o&&a[1]&&y.isLetter(a[0])&&(l=a[1]),t&&(l=a[2]),this.setKeyValue(r,l??a[0]),r+=1}}static isLetter(e){return e.toLowerCase()!==e.toUpperCase()}setKeyValue(e,t){let i=this._keys[e];if(!i)return;let o=!1,{options:n,shift:r,caps:s}=this.state;switch(t){case"Caps":o=s;break;case"Options":o=n;break;case"Shift":o=r}i.innerHTML=y.decorate(t),i.classList.toggle(this.getFullElName("key","active",!0),o),(0,a.attr)(i,"-key",t)}onKeyUp(){this.pressed&&this.stopPress()}onReady(){this.j.e.on(this.getElms("key"),"mouseenter",this.stopPress)}stopPress(){this.pressed&&(this.pressed=!1,this.j.async.clearTimeout(this.reKeyDownTimeout),this._keys.forEach(e=>{e.classList.remove(this.getFullElName("key","pressed",!0))}))}onKeyDown(e,t=0){let i=e.target;if(!i||!i.classList.contains(this.getFullElName("key")))return!1;this.pressed=!0,i.classList.add(this.getFullElName("key","pressed",!0));let o=(0,a.attr)(i,"-key");switch(o){case"Caps":this.state.caps=!this.state.caps;break;case"Shift":this.state.shift=!this.state.shift;break;case"Options":this.state.options=!this.state.options;break;case"Enter":case"Backspace":this.j.e.fire("keydown",{key:o,preventDefault(){}});break;case"Space":case"Tab":this.j.s.insertNode(this.j.createInside.text(r.NBSP_SPACE));break;default:this.state.shift&&(this.state.shift=!1),o&&this.j.s.insertNode(this.j.createInside.text(o))}let{periodKeyRepeat:n,delayKeyRepeat:s}=this.j.o.keyboard;return this.reKeyDownTimeout=this.j.async.setTimeout(()=>this.onKeyDown(e,n),t||s),!1}static decorate(e){switch(e){case"Space":return"";case"Enter":return l.Icon.get("enter");case"Backspace":return d();case"Shift":return g();case"Caps":return h();case"Options":return f();case"Tab":return v();default:return e}}constructor(e){super(e),(0,o._)(this,"state",{caps:!1,shift:!1,options:!1,currentLayout:this.j.o.keyboard.defaultLayoutSet}),(0,o._)(this,"_keys",this.getElms("key")),(0,o._)(this,"pressed",!1),(0,o._)(this,"reKeyDownTimeout",0),this.onStateChange()}}(0,n.__decorate)([(0,s.watch)(["state.currentLayout","state.options","state.shift","state.caps"])],y.prototype,"onStateChange",null),(0,n.__decorate)([(0,s.watch)(["ow:mouseup"])],y.prototype,"onKeyUp",null),(0,n.__decorate)([(0,s.hook)("ready")],y.prototype,"onReady",null),(0,n.__decorate)([s.autobind],y.prototype,"stopPress",null),(0,n.__decorate)([(0,s.watch)(["container:mousedown","container:touchstart"])],y.prototype,"onKeyDown",null),y=(0,n.__decorate)([s.component],y)},38882:function(e,t,i){"use strict";i.d(t,{isAllowedSubdomain:function(){return n},validateLicense:function(){return function e(t,i){var o;let r;if(o=t=(t+"").toUpperCase().replace(/[‐-―−]/g,"-").replace(/\s+/g,"").replace(/[^A-Z0-9-]/g,"R"),/[A-Z0-9][013456][A-P0-9]{2}[ABC]-([0-3])[ELPDF][E-L4-8]{2}\1-[A-D][R0][J-P5-6]{3}-[DPGHYE][GFPOD]{3}[A-SX-Z]/.test(o)||n(i))return!0;let s=(r=i.split(".")).map(e=>{let t=e[0];return"string"==typeof t&&t.charCodeAt(0)?String.fromCharCode(t.charCodeAt(0)+1):t}).concat(r.map(e=>{let t=e[e.length-1];return"string"==typeof t&&t.charCodeAt(0)?String.fromCharCode(t.charCodeAt(0)-1):t})).map(e=>null!=e&&/\w/.test(e)?e:"r"),a=["[A-F013456][A-F0-9]{3}{part}","([0-3]){part}[E-L4-8]{2}\\1","[A-D]{part}[J-P5-6]{3}","{part}[A-R0-9]{3}[X-Z]"].map((e,t)=>e.replace("{part}",s[t]||"[R-T]"));if(RegExp(`^${a.join("-")}$`,"i").test(t))return!0;if(t.substring(12,13)!==(typeof!i).toUpperCase()[5])return!1;let l=i.split(".");return l.shift(),l.length>1&&e(t,l.join("."))}}});let o=["*127.0.0.*","*localhost*","*simple*","staging.","*.dev.","*.test.","*.stg.","stg.*","test.*","beta.*","*demo.*","*test.*","acceptatie.*"];function n(e){return o.some(t=>new RegExp(t.replace(/\*/g,"%ANY%").replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&").replace(/%ANY%/g,".*")).test(e))}},21246:function(e,t,i){"use strict";i.d(t,{license:function(){return d}});var o=i(38882),n=i(82758),r=i(2748),s=i(87612),a=i(70799),l=i(20356),c=i(2692);class d extends l.Plugin{static make(e){return new d(e)}afterInit(e){this.j.e.on("checkReserve",async e=>{let t=this.j.o.license;if((0,o.isAllowedSubdomain)(e))return"normal";if(!t||!(0,a.isString)(t))return"";let i=(0,o.validateLicense)(t,e);return i||n.IS_TEST||(i=await this.validateLicenseRemote(t,e)),i?"normal":""})}beforeDestruct(e){}async validateLicenseRemote(e,t){let i="validateJoditLicenseRemote",n=this.j.storage.get(i);if(n&&(0,o.validateLicense)(n,t))return!0;let a=document.createElement("script");return a.src=`https://xdsoft.net/jodit/pro/api/licenses/validate/?code=${encodeURIComponent(e)}&host=${encodeURIComponent(t)}`,this.j.async.promise(e=>{let n=!1,l=t=>{n||(n=!0,r.Dom.safeRemove(a),e(t))};window.onJoditResolveKeyCode=e=>{if((0,s.isBoolean)(e))return l(e);(0,o.validateLicense)(e,t)?(this.j.storage.set(i,e),l(!0)):l(!1)},a.onerror=()=>l(!0),document.body.appendChild(a),this.j.async.setTimeout(()=>l(!0),5e3)})}}c.JoditPro.plugins.add("license",d)},29606:function(e,t,i){"use strict";var o=i(27222),n=i.n(o),r=i(6441),s=i(29807),a=i(86583);r.Config.prototype.mobileView={mode:"default"};let l="buttonmobileSView",c="buttonmobileCView";r.Config.prototype.controls.mobileView={tooltip:"Mobile View",icon:n(),command:"mobileView",isActive:e=>(0,a.dataBind)(e,c)&&"default"!==(0,a.dataBind)(e,c),isChildActive(e,t){let i=t.control?.args?.[0];return(0,s.isNumeric)(i)&&(i=Number(i)),((0,a.dataBind)(e,c)||"default")===i},exec:e=>!!(0,a.dataBind)(e,l)&&void e.execCommand("mobileView",!1,(0,a.dataBind)(e,l)),childExec(e,t,{button:i}){let o=i.control?.args?.[0];e.execCommand("mobileView",!1,(0,s.isNumeric)(o)?Number(o):o)},list:{default:"Default",375:"iPhone SE",414:"iPhone XR",390:"iPhone 12 Pro",393:"Pixel 5",820:"iPad Air"}},i.d(t,["dataBindCurrentKey",0,c,"dataBindStoredKey",0,l])},74398:function(e,t,i){"use strict";var o=i(82749),n=i(31635),r=i(29606),s=i(65478),a=i(43555),l=i(50911),c=i(2692);class d extends l.Plugin{className(){return"MobileView"}afterInit(e){e.registerCommand("mobileView",{exec:(t,i,o)=>{this.__currentMode===o&&(o="default"),this.__currentMode=o,(0,a.dataBind)(e,r.dataBindCurrentKey,o),"default"!==this.__currentMode&&(0,a.dataBind)(e,r.dataBindStoredKey,o),"default"===o?(0,a.css)(this.jodit.currentPlace.slots.center,{width:null,margin:null}):(0,a.css)(this.j.currentPlace.slots.center,{width:o,margin:"0 auto"})}}),e.events.on("beforeSetMode",()=>{})}__beforeSetMode(){"default"!==this.__currentMode&&this.j.execCommand("mobileView",!1,"default")}beforeDestruct(e){}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"mobileView",group:"state"}]),(0,o._)(this,"__currentMode","default")}}(0,o._)(d,"requires",["license"]),(0,n.__decorate)([(0,s.watch)(":beforeSetMode.mobileView")],d.prototype,"__beforeSetMode",null),d=(0,n.__decorate)([s.component],d),c.JoditPro.plugins.add("mobileView",d)},13109:function(e,t,i){"use strict";var o=i(17405),n=i.n(o),r=i(64889),s=i(6441);s.Config.prototype.pageBreak={separator:'<div style="page-break-before: always"></div>'},s.Config.prototype.controls.pageBreak={tooltip:"Insert page break",icon:n(),command:"insertPageBreak"},s.Config.prototype.iframeStyle=`${s.Config.prototype.iframeStyle};${r.default.replace(/[\n\t]/g,"")}`},64889:function(e,t){"use strict";t.default=`[data-jodit-page-break] {
|
|
608
620
|
display: flex;
|
|
@@ -643,7 +655,7 @@ ${r}`.trim();i?await this.__executeQuickCommandSilent(l,r):await this.__executeQ
|
|
|
643
655
|
<div class='&__list &__target-list'></div>
|
|
644
656
|
</div>`}__onSwap(){let e=this.state.sourceLang;this.state.sourceLang=this.state.targetLang,this.state.targetLang=e,this.__sourceList.state.active=this.state.sourceLang,this.__targetList.state.active=this.state.targetLang,this.options.onChange({...this.state})}constructor(e,t,i){super(e),(0,o._)(this,"state",void 0),(0,o._)(this,"options",void 0),(0,o._)(this,"__sourceList",void 0),(0,o._)(this,"__targetList",void 0),this.state=t,this.options=i,this.__sourceList=new a.UITranslateList(e,{list:i.sourceList,active:t.sourceLang,onChange:e=>{this.state.sourceLang=e,this.options.onChange({...this.state})}}),this.getElm("source-list")?.appendChild(this.__sourceList.container),this.__targetList=new a.UITranslateList(e,{list:i.targetList,active:t.targetLang,onChange:e=>{this.state.targetLang=e,this.options.onChange({...this.state})}}),this.getElm("target-list")?.appendChild(this.__targetList.container)}}(0,n.__decorate)([(0,r.watch)("arrow-swap:click")],l.prototype,"__onSwap",null),l=(0,n.__decorate)([r.component],l)},8256:function(e,t,i){"use strict";var o=i(6441),n=i(22732),r=i(21537);let s=["tune.up","tune.remove","tune.down"],a=["tune.h1","tune.h2","tune.h3",`
|
|
645
657
|
`,"tune.h4","tune.h5","tune.h6",`
|
|
646
|
-
`,...s];function l(e){return{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><text dominant-baseline="text-before-edge" style="font: 45px sans-serif" x="0" y="0">'+e.toUpperCase()+"</text></svg>",isActive:(t,i)=>i?.target?.tagName.toLowerCase()===e,exec(t,i){if(i){t.selection.save();let o=n.Dom.replace(i,e,t.createInside);t.selection.restore(),t.e.fire("synchro"),t.e.fire("afterExecTune.tune",o)}return!0}}}function c(e){let t=e?"previousSibling":"nextSibling";return{icon:e?"angle-up":"angle-down",isDisabled:(e,i)=>!i?.target?.[t],exec(i,o){let s=o?.[t];return o&&s&&(i.selection.save(),(0,r.call)(e?n.Dom.before:n.Dom.after,s,o),i.selection.restore()),i.e.fire("synchro"),i.e.fire("afterExecTune.tune"),!0}}}o.Config.prototype.tuneBlock={popup:{p:s,table:s,img:s,blockquote:s,div:s,pre:["tune.editPre",...s],h1:a,h2:a,h3:a,h4:a,h5:a,h6:a}},o.Config.prototype.controls.tune={h1:l("h1"),h2:l("h2"),h3:l("h3"),h4:l("h4"),h5:l("h5"),h6:l("h6"),up:c(!0),down:c(!1),editPre:{icon:"pencil",exec(e,t){e.e.fire("editPreInPasteCode",t)}},remove:{icon:"bin",exec(e,t){n.Dom.safeRemove(t),e.e.fire("synchro"),e.e.fire("closeTuner.tune"),e.e.fire("hideTuner.tune")}}}},13152:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(8256);var r=i(40104),s=i(65478),a=i(50911),l=i(2692);class c extends a.Plugin{afterInit(e){this.tuner=new r.UITuner(e)}hideTuner(){this.tuner.hide()}onChangeSelection(){this.j.s.isCollapsed()||this.hideTuner()}onClickInBlock(e){this.j.s.isCollapsed()&&this.tuner.show()}beforeDestruct(e){this.tuner.destruct()}constructor(...e){super(...e),(0,o._)(this,"tuner",void 0)}}(0,o._)(c,"requires",["license"]),(0,n.__decorate)([(0,s.watch)(":outsideClick :keydown")],c.prototype,"hideTuner",null),(0,n.__decorate)([(0,s.watch)("j.ed:selectionchange"),(0,s.debounce)()],c.prototype,"onChangeSelection",null),(0,n.__decorate)([(0,s.watch)(":click")],c.prototype,"onClickInBlock",null),l.JoditPro.plugins.add("tune-block",c)},40104:function(e,t,i){"use strict";i.d(t,{UITuner:function(){return d}});var o=i(82749),n=i(31635),r=i(65478),s=i(22732),a=i(21537),l=i(67510),c=i(21491);class d extends l.UIElement{className(){return"UITuner"}render(){return`<div>
|
|
658
|
+
`,...s];function l(e){return{icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><text dominant-baseline="text-before-edge" style="font: 45px sans-serif" x="0" y="0">'+e.toUpperCase()+"</text></svg>",isActive:(t,i)=>i?.target?.tagName.toLowerCase()===e,exec(t,i){if(i){t.selection.save();let o=n.Dom.replace(i,e,t.createInside);t.selection.restore(),t.e.fire("synchro"),t.e.fire("afterExecTune.tune",o)}return!0}}}function c(e){let t=e?"previousSibling":"nextSibling";return{icon:e?"angle-up":"angle-down",isDisabled:(e,i)=>!i?.target?.[t],exec(i,o){let s=o?.[t];return o&&s&&(i.selection.save(),(0,r.call)(e?n.Dom.before:n.Dom.after,s,o),i.selection.restore()),i.e.fire("synchro"),i.e.fire("afterExecTune.tune"),!0}}}o.Config.prototype.tuneBlock={popup:{p:s,table:s,img:s,blockquote:s,div:s,figure:s,pre:["tune.editPre",...s],h1:a,h2:a,h3:a,h4:a,h5:a,h6:a}},o.Config.prototype.controls.tune={h1:l("h1"),h2:l("h2"),h3:l("h3"),h4:l("h4"),h5:l("h5"),h6:l("h6"),up:c(!0),down:c(!1),editPre:{icon:"pencil",exec(e,t){e.e.fire("editPreInPasteCode",t)}},remove:{icon:"bin",exec(e,t){n.Dom.safeRemove(t),e.e.fire("synchro"),e.e.fire("closeTuner.tune"),e.e.fire("hideTuner.tune")}}}},13152:function(e,t,i){"use strict";var o=i(82749),n=i(31635);i(8256);var r=i(40104),s=i(65478),a=i(50911),l=i(2692);class c extends a.Plugin{afterInit(e){this.tuner=new r.UITuner(e)}hideTuner(){this.tuner.hide()}onChangeSelection(){this.j.s.isCollapsed()||this.hideTuner()}onClickInBlock(e){this.j.s.isCollapsed()&&this.tuner.show()}beforeDestruct(e){this.tuner.destruct()}constructor(...e){super(...e),(0,o._)(this,"tuner",void 0)}}(0,o._)(c,"requires",["license"]),(0,n.__decorate)([(0,s.watch)(":outsideClick :keydown")],c.prototype,"hideTuner",null),(0,n.__decorate)([(0,s.watch)("j.ed:selectionchange"),(0,s.debounce)()],c.prototype,"onChangeSelection",null),(0,n.__decorate)([(0,s.watch)(":click")],c.prototype,"onClickInBlock",null),l.JoditPro.plugins.add("tune-block",c)},40104:function(e,t,i){"use strict";i.d(t,{UITuner:function(){return d}});var o=i(82749),n=i(31635),r=i(65478),s=i(22732),a=i(21537),l=i(67510),c=i(21491);class d extends l.UIElement{className(){return"UITuner"}render(){return`<div>
|
|
647
659
|
<div class='&__handle' title='~Click to tune~'/>
|
|
648
660
|
</div>`}show(){let e=this.j.s.current();if(!e)return this.hide();let t=s.Dom.isBlock(e)?e:s.Dom.closest(e,e=>!!(e&&this.j.o.tuneBlock.popup[e.nodeName.toLowerCase()]),this.j.editor);if(!t||t===this.j.editor||!this.j.o.tuneBlock.popup[t.tagName.toLowerCase()])return this.hide();this.currentBlock=t,this.isShown=!0,this.closeToolbar(),this.calcPosition(),this.container.parentNode||this.j.workplace.append(this.container)}hide(){this.isShown&&(this.isShown=!1,s.Dom.safeRemove(this.container),this.closeToolbar())}onEditorScroll(){this.isShown&&this.calcPosition()}calcPosition(){let e=(0,a.css)(this.j.editor,"marginLeft"),t=(0,a.css)(this.j.editor,"paddingLeft"),i=(0,a.css)(this.j.editor,"marginTop"),o=this.currentBlock.offsetWidth-15+e+t,n=this.currentBlock.offsetTop-this.j.editor.scrollTop+i;(0,a.css)(this.container,{transform:`translate3d(${o}px, ${n}px, 0)`}),this.popup.isOpened&&this.popup.updatePosition()}onAfterExecTune(e){e&&(this.currentBlock=e),this.calcPosition(),this.openToolbar()}onClickPrevent(e){e.preventDefault(),e.stopPropagation()}onTargetClick(){this.toggleToolbar()}openToolbar(){if(this.setMod("opened",!0),this.toolbar.build(this.j.o.tuneBlock.popup[this.currentBlock.tagName.toLowerCase()],this.currentBlock),this.popup.setContent(this.toolbar.container),!this.popup.isOpened){let e=this.getElm("handle");(0,a.assert)(null!=e,"Handle element does not exist"),this.popup.open(()=>(0,a.position)(e))}}closeToolbar(){this.setMod("opened",!1),this.popup.close()}toggleToolbar(){this.getMod("opened")?this.closeToolbar():this.openToolbar()}constructor(...e){super(...e),(0,o._)(this,"isShown",!1),(0,o._)(this,"toolbar",(0,c.makeCollection)(this.j,this)),(0,o._)(this,"popup",new l.Popup(this.j,!1)),(0,o._)(this,"currentBlock",void 0)}}(0,n.__decorate)([(0,r.watch)(":hideTuner.tune")],d.prototype,"hide",null),(0,n.__decorate)([(0,r.watch)("j.editor:scroll"),(0,r.throttle)(10)],d.prototype,"onEditorScroll",null),(0,n.__decorate)([(0,r.watch)(":afterExecTune.tune"),(0,r.idle)()],d.prototype,"onAfterExecTune",null),(0,n.__decorate)([(0,r.watch)("container:click container:mousedown")],d.prototype,"onClickPrevent",null),(0,n.__decorate)([(0,r.watch)("handle:click")],d.prototype,"onTargetClick",null),(0,n.__decorate)([(0,r.watch)(":closeTuner.tune")],d.prototype,"closeToolbar",null),d=(0,n.__decorate)([r.component],d)},18549:function(e,t,i){"use strict";i.d(t,{UIFlightPosition:function(){return r}});var o=i(2748);let n=new WeakMap;class r{static install(e,t,i={}){this.remove(e);let{panelHeight:o=250,containerClassName:r,toolbarSelector:s=".jodit-toolbar__box",gap:a=16}=i,l=e.j.c.div("jodit-flight-position");r&&l.classList.add(r),l.style.setProperty("--flight-panel-height",`${o}px`),l.appendChild(e.container),document.body.appendChild(l);let c={toolbarSelector:s,gap:a},d=()=>{this.updatePosition(l,t,c)},u=new ResizeObserver(d);u.observe(t),window.addEventListener("scroll",d,{passive:!0}),window.addEventListener("resize",d,{passive:!0}),n.set(e,{container:l,anchor:t,onScroll:d,resizeObserver:u,options:c}),this.updatePosition(l,t,c)}static updatePosition(e,t,i){let{toolbarSelector:o,gap:n}=i,r=t.getBoundingClientRect(),s=window.innerHeight,a=e.offsetHeight||250;e.style.left=`${r.left}px`,e.style.width=`${r.width}px`;let l=t.querySelector(o),c=l?l.getBoundingClientRect().bottom:r.top,d=r.bottom-c,u=r.bottom<=s;a<=d?u?(e.style.top="auto",e.style.bottom=`${s-r.bottom+n}px`):(e.style.top="auto",e.style.bottom=`${n}px`):(e.style.bottom="auto",e.style.top=`${c}px`)}static remove(e){let t=n.get(e);t&&(window.removeEventListener("scroll",t.onScroll),window.removeEventListener("resize",t.onScroll),t.resizeObserver.disconnect(),e.container.parentNode===t.container&&t.container.parentNode?.insertBefore(e.container,t.container),o.Dom.safeRemove(t.container),n.delete(e))}static isInstalled(e){return n.has(e)}static setPanelHeight(e,t){let i=n.get(e);i&&i.container.style.setProperty("--flight-panel-height",`${t}px`)}static refresh(e){let t=n.get(e);t&&this.updatePosition(t.container,t.anchor,t.options)}}},54747:function(e,t,i){"use strict";i.d(t,{UIResize:function(){return r}});var o=i(2748),n=i(41180);class r{static remove(e){e.container.classList.remove("jodit-ui-resize"),o.Dom.safeRemove(e.container.querySelector(".jodit-ui-resize__handle"))}static install(e,t,i={}){e.container.classList.add("jodit-ui-resize"),"static"===(0,n.css)(e.container,"position")&&(0,n.css)(e.container,"position","relative");let o=e.j.c.div("jodit-ui-resize__handle");o.classList.add("jodit-ui-resize__handle_type_"+t),i.handleClassName&&o.classList.add(i.handleClassName),e.container.appendChild(o),e.j.e.on(o,"mousedown touchstart",this.onStartResize.bind(this,e,t,i.onResize??(()=>void 0)))}static onStartResize(e,t,i,o){let n={x:o.clientX,y:o.clientY,w:e.container.offsetWidth,h:e.container.offsetHeight,direction:t},r=e.j.async.throttle(this.onResize.bind(this,e,n,i),e.j.defaultTimeout/10);e.j.lock(),e.j.e.on(e.j.ow,"mousemove touchmove",r).one(e.j.ow,"mouseup touchend",this.onEndResize.bind(this,e,r))}static onResize(e,t,i,o){let r,s=["left","right"].includes(t.direction),a=e.container.parentElement;a&&(r=s?t.w+(o.clientX-t.x)*("right"===t.direction?1:-1):t.h+(o.clientY-t.y)*("top"===t.direction?-1:1),!0!==i?.({newSize:r})&&(0,n.css)(e.container,s?"width":"height",r/(s?a.offsetWidth:a.offsetHeight)*100+"%"))}static onEndResize(e,t,i){e.j.e.off(e.j.ow,"mousemove touchmove",t),e.j.unlock()}}},36469:function(e,t,i){"use strict";i.d(t,{UISelectItems:function(){return r}});var o=i(2748),n=i(41180);class r{static remove(e){o.Dom.safeRemove(e.container.querySelector(".jodit-ui-select-items")),e.j.e.off(e.container,"mousedown.uiselectitems touchstart.uiselectitems")}static install(e){let t=e.j.c.div("jodit-ui-select-items");e.j.e.on(e.container,"mousedown.uiselectitems touchstart.uiselectitems",this.onStartSelect.bind(this,e,t))}static onStartSelect(e,t,i){if(i.target!==e.container)return;(0,n.css)(t,{width:0,height:0}),e.container.appendChild(t);let o={x:i.clientX,y:i.clientY,w:e.container.offsetWidth,h:e.container.offsetHeight},r=e.j.async.throttle(this.onSelect.bind(this,e,t,o),e.j.defaultTimeout/10);e.j.lock(),e.j.e.on(e.j.ow,"mousemove touchmove",r).one(e.j.ow,"mouseup touchend",this.onEndSelect.bind(this,e,t,r)),e.onSelectItems({left:o.x,top:o.y,width:0,height:0})}static onSelect(e,t,i,o){let r={left:i.x>o.clientX?o.clientX:i.x,top:i.y>o.clientY?o.clientY:i.y,width:Math.abs(i.x-o.clientX),height:Math.abs(i.y-o.clientY)};(0,n.css)(t,r),e.onSelectItems(r)}static onEndSelect(e,t,i,n){o.Dom.safeRemove(t),e.j.e.off(e.j.ow,"mousemove touchmove",i),e.j.unlock()}}},85013:function(e,t,i){"use strict";function o(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}i.d(t,{ImageEditor:function(){return eV}});try{if("u">typeof document){var n=document.createElement("style");n.appendChild(document.createTextNode(`/*
|
|
649
661
|
* Jodit Image Editor — design system & layout.
|