create-nextjs-cms 0.5.19 → 0.5.20
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/dist/index.js +7 -0
- package/package.json +4 -4
- package/templates/default/.uploads/.photos/categories/000e56fada378de1a84a4 +0 -0
- package/templates/default/.uploads/.photos/categories/121e7d13ee3b5fa03795b +0 -0
- package/templates/default/.uploads/.photos/categories/17a55c5a53eb62293c69e +0 -0
- package/templates/default/.uploads/.photos/categories/4c86ad8c1f51f1e3a953b +0 -0
- package/templates/default/.uploads/.photos/categories/4d360813741a45744327c +0 -0
- package/templates/default/.uploads/.photos/categories/5238fefaa3cbebf388178 +0 -0
- package/templates/default/.uploads/.photos/categories/541d7cf8c69895bcb15cd +0 -0
- package/templates/default/.uploads/.photos/categories/57a2f689a910a378247ea +0 -0
- package/templates/default/.uploads/.photos/categories/6de4bdb341a3e1f70ddc3 +0 -0
- package/templates/default/.uploads/.photos/categories/6f52739eaa686441a28f4 +0 -0
- package/templates/default/.uploads/.photos/categories/8a21b9fa8ecd88f460a15 +0 -0
- package/templates/default/.uploads/.photos/categories/91948abcb073c9445fdec +0 -0
- package/templates/default/.uploads/.photos/categories/9ae700d1abfd6b85780e8 +0 -0
- package/templates/default/.uploads/.photos/categories/9edee86e932985fc589b5 +0 -0
- package/templates/default/.uploads/.photos/categories/a520e77b082f35b575dba +0 -0
- package/templates/default/.uploads/.photos/categories/b19c449029330f0a74b20 +0 -0
- package/templates/default/.uploads/.photos/categories/b9802010f68afd4edb0e8 +0 -0
- package/templates/default/.uploads/.photos/categories/c1d7c3b986739bf496730 +0 -0
- package/templates/default/.uploads/.photos/categories/c25dc38567384513ffe93 +0 -0
- package/templates/default/.uploads/.photos/categories/cbe3874a3d13afba388df +0 -0
- package/templates/default/.uploads/.photos/categories/d450fdeb04f0d070442d6 +0 -0
- package/templates/default/.uploads/.photos/categories/f80bf3a4515680ead5a5c +0 -0
- package/templates/default/.uploads/.photos/categories/f8639c2d5b0d24cb76fb1 +0 -0
- package/templates/default/.uploads/.photos/categories/f8d997149d10aab046e40 +0 -0
- package/templates/default/.uploads/.photos/categories/fa2c55690ff96e33a16fe +0 -0
- package/templates/default/.uploads/.photos/featured_slider/d00be4edb4c38ca34b5a5 +0 -0
- package/templates/default/.uploads/.thumbs/categories/000e56fada378de1a84a4 +0 -0
- package/templates/default/.uploads/.thumbs/categories/121e7d13ee3b5fa03795b +0 -0
- package/templates/default/.uploads/.thumbs/categories/17a55c5a53eb62293c69e +0 -0
- package/templates/default/.uploads/.thumbs/categories/4c86ad8c1f51f1e3a953b +0 -0
- package/templates/default/.uploads/.thumbs/categories/4d360813741a45744327c +0 -0
- package/templates/default/.uploads/.thumbs/categories/5238fefaa3cbebf388178 +0 -0
- package/templates/default/.uploads/.thumbs/categories/541d7cf8c69895bcb15cd +0 -0
- package/templates/default/.uploads/.thumbs/categories/57a2f689a910a378247ea +0 -0
- package/templates/default/.uploads/.thumbs/categories/6de4bdb341a3e1f70ddc3 +0 -0
- package/templates/default/.uploads/.thumbs/categories/6f52739eaa686441a28f4 +0 -0
- package/templates/default/.uploads/.thumbs/categories/8a21b9fa8ecd88f460a15 +0 -0
- package/templates/default/.uploads/.thumbs/categories/91948abcb073c9445fdec +0 -0
- package/templates/default/.uploads/.thumbs/categories/9ae700d1abfd6b85780e8 +0 -0
- package/templates/default/.uploads/.thumbs/categories/9edee86e932985fc589b5 +0 -0
- package/templates/default/.uploads/.thumbs/categories/a520e77b082f35b575dba +0 -0
- package/templates/default/.uploads/.thumbs/categories/b19c449029330f0a74b20 +0 -0
- package/templates/default/.uploads/.thumbs/categories/b9802010f68afd4edb0e8 +0 -0
- package/templates/default/.uploads/.thumbs/categories/c1d7c3b986739bf496730 +0 -0
- package/templates/default/.uploads/.thumbs/categories/c25dc38567384513ffe93 +0 -0
- package/templates/default/.uploads/.thumbs/categories/cbe3874a3d13afba388df +0 -0
- package/templates/default/.uploads/.thumbs/categories/d450fdeb04f0d070442d6 +0 -0
- package/templates/default/.uploads/.thumbs/categories/f80bf3a4515680ead5a5c +0 -0
- package/templates/default/.uploads/.thumbs/categories/f8639c2d5b0d24cb76fb1 +0 -0
- package/templates/default/.uploads/.thumbs/categories/f8d997149d10aab046e40 +0 -0
- package/templates/default/.uploads/.thumbs/categories/fa2c55690ff96e33a16fe +0 -0
- package/templates/default/_gitignore +57 -0
- package/templates/default/components/form/helpers/_section-hot-reload.ts +11 -0
- package/templates/default/next-env.d.ts +6 -0
- package/templates/default/package.json +2 -2
- package/templates/default/public/tinymce/CHANGELOG.md +3785 -0
- package/templates/default/public/tinymce/README.md +77 -0
- package/templates/default/public/tinymce/bower.json +27 -0
- package/templates/default/public/tinymce/composer.json +52 -0
- package/templates/default/public/tinymce/icons/default/icons.js +231 -0
- package/templates/default/public/tinymce/icons/default/icons.min.js +1 -0
- package/templates/default/public/tinymce/icons/default/index.js +7 -0
- package/templates/default/public/tinymce/license.md +6 -0
- package/templates/default/public/tinymce/models/dom/index.js +7 -0
- package/templates/default/public/tinymce/models/dom/model.js +8994 -0
- package/templates/default/public/tinymce/models/dom/model.min.js +1 -0
- package/templates/default/public/tinymce/notices.txt +21 -0
- package/templates/default/public/tinymce/package.json +32 -0
- package/templates/default/public/tinymce/plugins/accordion/index.js +7 -0
- package/templates/default/public/tinymce/plugins/accordion/plugin.js +1349 -0
- package/templates/default/public/tinymce/plugins/accordion/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/advlist/index.js +7 -0
- package/templates/default/public/tinymce/plugins/advlist/plugin.js +471 -0
- package/templates/default/public/tinymce/plugins/advlist/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/anchor/index.js +7 -0
- package/templates/default/public/tinymce/plugins/anchor/plugin.js +237 -0
- package/templates/default/public/tinymce/plugins/anchor/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/autolink/index.js +7 -0
- package/templates/default/public/tinymce/plugins/autolink/plugin.js +318 -0
- package/templates/default/public/tinymce/plugins/autolink/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/autoresize/index.js +7 -0
- package/templates/default/public/tinymce/plugins/autoresize/plugin.js +223 -0
- package/templates/default/public/tinymce/plugins/autoresize/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/autosave/index.js +7 -0
- package/templates/default/public/tinymce/plugins/autosave/plugin.js +252 -0
- package/templates/default/public/tinymce/plugins/autosave/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/charmap/index.js +7 -0
- package/templates/default/public/tinymce/plugins/charmap/plugin.js +997 -0
- package/templates/default/public/tinymce/plugins/charmap/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/code/index.js +7 -0
- package/templates/default/public/tinymce/plugins/code/plugin.js +97 -0
- package/templates/default/public/tinymce/plugins/code/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/codesample/index.js +7 -0
- package/templates/default/public/tinymce/plugins/codesample/plugin.js +3654 -0
- package/templates/default/public/tinymce/plugins/codesample/plugin.min.js +9 -0
- package/templates/default/public/tinymce/plugins/directionality/index.js +7 -0
- package/templates/default/public/tinymce/plugins/directionality/plugin.js +636 -0
- package/templates/default/public/tinymce/plugins/directionality/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/emoticons/index.js +7 -0
- package/templates/default/public/tinymce/plugins/emoticons/js/emojiimages.js +1 -0
- package/templates/default/public/tinymce/plugins/emoticons/js/emojiimages.min.js +1 -0
- package/templates/default/public/tinymce/plugins/emoticons/js/emojis.js +1 -0
- package/templates/default/public/tinymce/plugins/emoticons/js/emojis.min.js +1 -0
- package/templates/default/public/tinymce/plugins/emoticons/plugin.js +809 -0
- package/templates/default/public/tinymce/plugins/emoticons/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/fullscreen/index.js +7 -0
- package/templates/default/public/tinymce/plugins/fullscreen/plugin.js +1609 -0
- package/templates/default/public/tinymce/plugins/fullscreen/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/help/index.js +7 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ar.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ca.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/cs.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/da.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/de.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/el.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/en.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/es.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/eu.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fa.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fi.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/he_IL.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hi.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hr.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/id.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/it.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ja.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/kk.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ms.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/nl.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pl.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ro.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ru.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sk.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/th_TH.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/tr.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/uk.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/vi.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +87 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +93 -0
- package/templates/default/public/tinymce/plugins/help/plugin.js +828 -0
- package/templates/default/public/tinymce/plugins/help/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/image/index.js +7 -0
- package/templates/default/public/tinymce/plugins/image/plugin.js +1689 -0
- package/templates/default/public/tinymce/plugins/image/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/importcss/index.js +7 -0
- package/templates/default/public/tinymce/plugins/importcss/plugin.js +403 -0
- package/templates/default/public/tinymce/plugins/importcss/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/insertdatetime/index.js +7 -0
- package/templates/default/public/tinymce/plugins/insertdatetime/plugin.js +186 -0
- package/templates/default/public/tinymce/plugins/insertdatetime/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/link/index.js +7 -0
- package/templates/default/public/tinymce/plugins/link/plugin.js +1577 -0
- package/templates/default/public/tinymce/plugins/link/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/lists/index.js +7 -0
- package/templates/default/public/tinymce/plugins/lists/plugin.js +2544 -0
- package/templates/default/public/tinymce/plugins/lists/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/media/index.js +7 -0
- package/templates/default/public/tinymce/plugins/media/plugin.js +1450 -0
- package/templates/default/public/tinymce/plugins/media/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/nonbreaking/index.js +7 -0
- package/templates/default/public/tinymce/plugins/nonbreaking/plugin.js +128 -0
- package/templates/default/public/tinymce/plugins/nonbreaking/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/pagebreak/index.js +7 -0
- package/templates/default/public/tinymce/plugins/pagebreak/plugin.js +123 -0
- package/templates/default/public/tinymce/plugins/pagebreak/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/preview/index.js +7 -0
- package/templates/default/public/tinymce/plugins/preview/plugin.js +765 -0
- package/templates/default/public/tinymce/plugins/preview/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/quickbars/index.js +7 -0
- package/templates/default/public/tinymce/plugins/quickbars/plugin.js +654 -0
- package/templates/default/public/tinymce/plugins/quickbars/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/save/index.js +7 -0
- package/templates/default/public/tinymce/plugins/save/plugin.js +136 -0
- package/templates/default/public/tinymce/plugins/save/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/searchreplace/index.js +7 -0
- package/templates/default/public/tinymce/plugins/searchreplace/plugin.js +1370 -0
- package/templates/default/public/tinymce/plugins/searchreplace/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/table/index.js +7 -0
- package/templates/default/public/tinymce/plugins/table/plugin.js +4019 -0
- package/templates/default/public/tinymce/plugins/table/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/visualblocks/index.js +7 -0
- package/templates/default/public/tinymce/plugins/visualblocks/plugin.js +106 -0
- package/templates/default/public/tinymce/plugins/visualblocks/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/visualchars/index.js +7 -0
- package/templates/default/public/tinymce/plugins/visualchars/plugin.js +809 -0
- package/templates/default/public/tinymce/plugins/visualchars/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/wordcount/index.js +7 -0
- package/templates/default/public/tinymce/plugins/wordcount/plugin.js +480 -0
- package/templates/default/public/tinymce/plugins/wordcount/plugin.min.js +1 -0
- package/templates/default/public/tinymce/skins/content/dark/content.css +75 -0
- package/templates/default/public/tinymce/skins/content/dark/content.js +10 -0
- package/templates/default/public/tinymce/skins/content/dark/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/content/default/content.css +70 -0
- package/templates/default/public/tinymce/skins/content/default/content.js +10 -0
- package/templates/default/public/tinymce/skins/content/default/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/content/document/content.css +75 -0
- package/templates/default/public/tinymce/skins/content/document/content.js +10 -0
- package/templates/default/public/tinymce/skins/content/document/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.css +70 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.js +10 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.css +75 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.js +10 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/content/writer/content.css +71 -0
- package/templates/default/public/tinymce/skins/content/writer/content.js +10 -0
- package/templates/default/public/tinymce/skins/content/writer/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.css +893 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.css +887 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.js +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.js +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.css +5141 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.js +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.css +30 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.js +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.css +881 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.css +887 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.js +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.js +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.css +5144 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.js +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +30 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.css +893 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.css +887 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.js +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.js +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.css +5260 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.js +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.css +30 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.css +881 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.css +887 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.js +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.js +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.css +5260 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.js +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.css +30 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
- package/templates/default/public/tinymce/themes/silver/index.js +7 -0
- package/templates/default/public/tinymce/themes/silver/theme.js +34798 -0
- package/templates/default/public/tinymce/themes/silver/theme.min.js +1 -0
- package/templates/default/public/tinymce/tinymce.d.ts +3350 -0
- package/templates/default/public/tinymce/tinymce.js +38694 -0
- package/templates/default/public/tinymce/tinymce.min.js +11 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=Object.getPrototypeOf,a=(e,t,a)=>{var i;return!!a(e,t.prototype)||(null===(i=e.constructor)||void 0===i?void 0:i.name)===t.name},i=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&a(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":t})(t)===e,s=e=>t=>typeof t===e,r=i("string"),o=i("object"),n=e=>((e,i)=>o(e)&&a(e,i,((e,a)=>t(e)===a)))(e,Object),l=i("array"),c=e=>null===e;const m=s("boolean"),d=e=>!(e=>null==e)(e),g=s("function"),u=s("number"),p=()=>{};class h{constructor(e,t){this.tag=e,this.value=t}static some(e){return new h(!0,e)}static none(){return h.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?h.some(e(this.value)):h.none()}bind(e){return this.tag?e(this.value):h.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:h.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return d(e)?h.some(e):h.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}h.singletonNone=new h(!1),Array.prototype.slice;const b=Array.prototype.push,v=e=>{const t=[];for(let a=0,i=e.length;a<i;++a){if(!l(e[a]))throw new Error("Arr.flatten item "+a+" was not an array, input: "+e);b.apply(t,e[a])}return t};g(Array.from)&&Array.from;const y=Object.keys,f=Object.hasOwnProperty,A=(e,t)=>f.call(e,t),w=(D=(e,t)=>n(e)&&n(t)?w(e,t):t,(...e)=>{if(0===e.length)throw new Error("Can't merge zero objects");const t={};for(let a=0;a<e.length;a++){const i=e[a];for(const e in i)A(i,e)&&(t[e]=D(t[e],i[e]))}return t});var D;const _=e=>e.length>0,C=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},I=C,U=(e,t,a)=>{((e,t,a)=>{if(!(r(a)||m(a)||u(a)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",a,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,a+"")})(e.dom,t,a)};var S=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),x=tinymce.util.Tools.resolve("tinymce.util.URI");const N=e=>t=>t.options.get(e),T=N("image_dimensions"),E=N("image_advtab"),L=N("image_uploadtab"),O=N("image_prepend_url"),j=N("image_class_list"),M=N("image_description"),R=N("image_title"),k=N("image_caption"),z=N("image_list"),B=N("a11y_advanced_options"),P=N("automatic_uploads"),H=(e,t)=>Math.max(parseInt(e,10),parseInt(t,10)),F=e=>(e&&(e=e.replace(/px$/,"")),e),G=e=>(e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e),W=e=>"IMG"===e.nodeName&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder")),$=(e,t)=>{const a=e.options.get;return x.isDomSafe(t,"img",{allow_html_data_urls:a("allow_html_data_urls"),allow_script_urls:a("allow_script_urls"),allow_svg_data_urls:a("allow_svg_data_urls")})},V=S.DOM,K=e=>e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?F(e.style.marginLeft):"",Z=e=>e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?F(e.style.marginTop):"",q=e=>e.style.borderWidth?F(e.style.borderWidth):"",J=(e,t)=>{var a;return e.hasAttribute(t)&&null!==(a=e.getAttribute(t))&&void 0!==a?a:""},Q=e=>null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName,X=(e,t,a)=>{""===a||null===a?e.removeAttribute(t):e.setAttribute(t,a)},Y=(e,t)=>{const a=e.getAttribute("style"),i=t(null!==a?a:"");i.length>0?(e.setAttribute("style",i),e.setAttribute("data-mce-style",i)):e.removeAttribute("style")},ee=(e,t)=>(e,a,i)=>{const s=e.style;s[a]?(s[a]=G(i),Y(e,t)):X(e,a,i)},te=(e,t)=>e.style[t]?F(e.style[t]):J(e,t),ae=(e,t)=>{const a=G(t);e.style.marginLeft=a,e.style.marginRight=a},ie=(e,t)=>{const a=G(t);e.style.marginTop=a,e.style.marginBottom=a},se=(e,t)=>{const a=G(t);e.style.borderWidth=a},re=(e,t)=>{e.style.borderStyle=t},oe=e=>{var t;return null!==(t=e.style.borderStyle)&&void 0!==t?t:""},ne=e=>d(e)&&"FIGURE"===e.nodeName,le=e=>0===V.getAttrib(e,"alt").length&&"presentation"===V.getAttrib(e,"role"),ce=e=>le(e)?"":J(e,"alt"),me=(e,t)=>{var a;const i=document.createElement("img");return X(i,"style",t.style),(K(i)||""!==t.hspace)&&ae(i,t.hspace),(Z(i)||""!==t.vspace)&&ie(i,t.vspace),(q(i)||""!==t.border)&&se(i,t.border),(oe(i)||""!==t.borderStyle)&&re(i,t.borderStyle),e(null!==(a=i.getAttribute("style"))&&void 0!==a?a:"")},de=(e,t)=>({src:J(t,"src"),alt:ce(t),title:J(t,"title"),width:te(t,"width"),height:te(t,"height"),class:J(t,"class"),style:e(J(t,"style")),caption:Q(t),hspace:K(t),vspace:Z(t),border:q(t),borderStyle:oe(t),isDecorative:le(t)}),ge=(e,t,a,i,s)=>{a[i]!==t[i]&&s(e,i,String(a[i]))},ue=(e,t,a)=>{if(a){V.setAttrib(e,"role","presentation");const t=I(e);U(t,"alt","")}else{if(c(t)){I(e).dom.removeAttribute("alt")}else{const a=I(e);U(a,"alt",t)}"presentation"===V.getAttrib(e,"role")&&V.setAttrib(e,"role","")}},pe=(e,t)=>(a,i,s)=>{e(a,s),Y(a,t)},he=(e,t,a)=>{const i=de(e,a);ge(a,i,t,"caption",((e,t,a)=>(e=>{Q(e)?(e=>{const t=e.parentNode;d(t)&&(V.insertAfter(e,t),V.remove(t))})(e):(e=>{const t=V.create("figure",{class:"image"});V.insertAfter(t,e),t.appendChild(e),t.appendChild(V.create("figcaption",{contentEditable:"true"},"Caption")),t.contentEditable="false"})(e)})(e))),ge(a,i,t,"src",X),ge(a,i,t,"title",X),ge(a,i,t,"width",ee(0,e)),ge(a,i,t,"height",ee(0,e)),ge(a,i,t,"class",X),ge(a,i,t,"style",pe(((e,t)=>X(e,"style",t)),e)),ge(a,i,t,"hspace",pe(ae,e)),ge(a,i,t,"vspace",pe(ie,e)),ge(a,i,t,"border",pe(se,e)),ge(a,i,t,"borderStyle",pe(re,e)),((e,t,a)=>{a.alt===t.alt&&a.isDecorative===t.isDecorative||ue(e,a.alt,a.isDecorative)})(a,i,t)},be=(e,t)=>{const a=(e=>{if(e.margin){const t=String(e.margin).split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e})(e.dom.styles.parse(t)),i=e.dom.styles.parse(e.dom.styles.serialize(a));return e.dom.styles.serialize(i)},ve=e=>{const t=e.selection.getNode(),a=e.dom.getParent(t,"figure.image");return a?e.dom.select("img",a)[0]:t&&("IMG"!==t.nodeName||W(t))?null:t},ye=(e,t)=>{var a;const i=e.dom,s=(t=>{const a={};var i;return((e,t,a,i)=>{((e,t)=>{const a=y(e);for(let i=0,s=a.length;i<s;i++){const s=a[i];t(e[s],s)}})(e,((e,s)=>{(t(e,s)?a:i)(e,s)}))})(t,((t,a)=>!e.schema.isValidChild(a,"figure")),(i=a,(e,t)=>{i[t]=e}),p),a})(e.schema.getTextBlockElements()),r=i.getParent(t.parentNode,(e=>{return t=s,a=e.nodeName,A(t,a)&&void 0!==t[a]&&null!==t[a];var t,a}),e.getBody());return r&&null!==(a=i.split(r,t))&&void 0!==a?a:t},fe=(e,t)=>{const a=((t,a)=>{const i=document.createElement("img");if(he((t=>be(e,t)),{...a,caption:!1},i),ue(i,a.alt,a.isDecorative),a.caption){const e=V.create("figure",{class:"image"});return e.appendChild(i),e.appendChild(V.create("figcaption",{contentEditable:"true"},"Caption")),e.contentEditable="false",e}return i})(0,t);e.dom.setAttrib(a,"data-mce-id","__mcenew"),e.focus(),e.selection.setContent(a.outerHTML);const i=e.dom.select('*[data-mce-id="__mcenew"]')[0];if(e.dom.setAttrib(i,"data-mce-id",null),ne(i)){const t=ye(e,i);e.selection.select(t)}else e.selection.select(i)},Ae=(e,t)=>{const a=ve(e);if(a){const i={...de((t=>be(e,t)),a),...t},s=((e,t)=>{const a=t.src;return{...t,src:$(e,a)?a:""}})(e,i);i.src?((e,t)=>{const a=ve(e);if(a)if(he((t=>be(e,t)),t,a),((e,t)=>{e.dom.setAttrib(t,"src",t.getAttribute("src"))})(e,a),ne(a.parentNode)){e.dom.setStyle(a,"float","");const t=a.parentNode;ye(e,t),e.selection.select(a.parentNode)}else e.selection.select(a),((e,t,a)=>{const i=()=>{a.onload=a.onerror=null,e.selection&&(e.selection.select(a),e.nodeChanged())};a.onload=()=>{t.width||t.height||!T(e)||e.dom.setAttribs(a,{width:String(a.clientWidth),height:String(a.clientHeight)}),i()},a.onerror=i})(e,t,a)})(e,s):((e,t)=>{if(t){const a=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(a),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}})(e,a)}else t.src&&fe(e,{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1,...t})};var we=tinymce.util.Tools.resolve("tinymce.util.ImageUploader"),De=tinymce.util.Tools.resolve("tinymce.util.Tools");const _e=e=>r(e.value)?e.value:"",Ce=(e,t)=>{const a=[];return De.each(e,(e=>{const i=(e=>r(e.text)?e.text:r(e.title)?e.title:"")(e);if(void 0!==e.menu){const s=Ce(e.menu,t);a.push({text:i,items:s})}else{const s=t(e);a.push({text:i,value:s})}})),a},Ie=(e=_e)=>t=>t?h.from(t).map((t=>Ce(t,e))):h.none(),Ue=(e,t)=>(e=>{for(let i=0;i<e.length;i++){const s=(e=>A(e,"items"))(a=e[i])?Ue(a.items,t):a.value===t?h.some(a):h.none();if(s.isSome())return s}var a;return h.none()})(e),Se=Ie,xe=(e,t)=>e.bind((e=>Ue(e,t))),Ne=e=>{const t=Se((t=>e.convertURL(t.value||t.url||"","src"))),a=new Promise((a=>{((e,t)=>{const a=z(e);r(a)?fetch(a).then((e=>{e.ok&&e.json().then(t)})):g(a)?a(t):t(a)})(e,(e=>{a(t(e).map((e=>v([[{text:"None",value:""}],e]))))}))})),i=(w=j(e),Ie(_e)(w)),s=E(e),o=L(e),n=(e=>_(e.options.get("images_upload_url")))(e),l=(e=>d(e.options.get("images_upload_handler")))(e),c=(e=>{const t=ve(e);return t?de((t=>be(e,t)),t):{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}})(e),m=M(e),u=R(e),p=T(e),b=k(e),y=B(e),f=P(e),A=h.some(O(e)).filter((e=>r(e)&&e.length>0));var w;return a.then((e=>({image:c,imageList:e,classList:i,hasAdvTab:s,hasUploadTab:o,hasUploadUrl:n,hasUploadHandler:l,hasDescription:m,hasImageTitle:u,hasDimensions:p,hasImageCaption:b,prependURL:A,hasAccessibilityOptions:y,automaticUploads:f})))},Te=e=>{const t=e.imageList.map((e=>({name:"images",type:"listbox",label:"Image list",items:e}))),a={name:"alt",type:"input",label:"Alternative description",enabled:!(e.hasAccessibilityOptions&&e.image.isDecorative)},i=e.classList.map((e=>({name:"classes",type:"listbox",label:"Class",items:e})));return v([[{name:"src",type:"urlinput",filetype:"image",label:"Source",picker_text:"Browse files"}],t.toArray(),e.hasAccessibilityOptions&&e.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],e.hasDescription?[a]:[],e.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],e.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[{...(s=e.classList.isSome()&&e.hasImageCaption,s?{type:"grid",columns:2}:{type:"panel"}),items:v([i.toArray(),e.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])}]]);var s},Ee=e=>({title:"General",name:"general",items:Te(e)}),Le=Te,Oe=e=>({src:{value:e.src,meta:{}},images:e.src,alt:e.alt,title:e.title,dimensions:{width:e.width,height:e.height},classes:e.class,caption:e.caption,style:e.style,vspace:e.vspace,border:e.border,hspace:e.hspace,borderstyle:e.borderStyle,fileinput:[],isDecorative:e.isDecorative}),je=(e,t)=>({src:e.src.value,alt:null!==e.alt&&0!==e.alt.length||!t?e.alt:null,title:e.title,width:e.dimensions.width,height:e.dimensions.height,class:e.classes,style:e.style,caption:e.caption,hspace:e.hspace,vspace:e.vspace,border:e.border,borderStyle:e.borderstyle,isDecorative:e.isDecorative}),Me=(e,t,a,i)=>{((e,t)=>{const a=t.getData();((e,t)=>/^(?:[a-zA-Z]+:)?\/\//.test(t)?h.none():e.prependURL.bind((e=>t.substring(0,e.length)!==e?h.some(e+t):h.none())))(e,a.src.value).each((e=>{t.setData({src:{value:e,meta:a.src.meta}})}))})(t,i),((e,t)=>{const a=t.getData(),i=a.src.meta;if(void 0!==i){const s=w({},a);((e,t,a)=>{e.hasDescription&&r(a.alt)&&(t.alt=a.alt),e.hasAccessibilityOptions&&(t.isDecorative=a.isDecorative||t.isDecorative||!1),e.hasImageTitle&&r(a.title)&&(t.title=a.title),e.hasDimensions&&(r(a.width)&&(t.dimensions.width=a.width),r(a.height)&&(t.dimensions.height=a.height)),r(a.class)&&xe(e.classList,a.class).each((e=>{t.classes=e.value})),e.hasImageCaption&&m(a.caption)&&(t.caption=a.caption),e.hasAdvTab&&(r(a.style)&&(t.style=a.style),r(a.vspace)&&(t.vspace=a.vspace),r(a.border)&&(t.border=a.border),r(a.hspace)&&(t.hspace=a.hspace),r(a.borderstyle)&&(t.borderstyle=a.borderstyle))})(e,s,i),t.setData(s)}})(t,i),((e,t,a,i)=>{const s=i.getData(),r=s.src.value,o=s.src.meta||{};o.width||o.height||!t.hasDimensions||(_(r)?e.imageSize(r).then((e=>{a.open&&i.setData({dimensions:e})})).catch((e=>console.error(e))):i.setData({dimensions:{width:"",height:""}}))})(e,t,a,i),((e,t,a)=>{const i=a.getData(),s=xe(e.imageList,i.src.value);t.prevImage=s,a.setData({images:s.map((e=>e.value)).getOr("")})})(t,a,i)},Re=(e,t,a,i)=>{const s=i.getData();var r;i.block("Uploading image"),(r=s.fileinput,(e=>0<e.length?h.some(e[0]):h.none())(r)).fold((()=>{i.unblock()}),(s=>{const r=URL.createObjectURL(s),o=()=>{i.unblock(),URL.revokeObjectURL(r)},n=s=>{i.setData({src:{value:s,meta:{}}}),i.showTab("general"),Me(e,t,a,i),i.focus("src")};var l;(l=s,new Promise(((e,t)=>{const a=new FileReader;a.onload=()=>{e(a.result)},a.onerror=()=>{var e;t(null===(e=a.error)||void 0===e?void 0:e.message)},a.readAsDataURL(l)}))).then((a=>{const l=e.createBlobCache(s,r,a);t.automaticUploads?e.uploadImage(l).then((e=>{n(e.url),o()})).catch((t=>{o(),e.alertErr(t,(()=>{i.focus("fileinput")}))})):(e.addToBlobCache(l),n(l.blobUri()),i.unblock())}))}))},ke=(e,t,a)=>(i,s)=>{"src"===s.name?Me(e,t,a,i):"images"===s.name?((e,t,a,i)=>{const s=i.getData(),r=xe(t.imageList,s.images);r.each((e=>{const t=""===s.alt||a.prevImage.map((e=>e.text===s.alt)).getOr(!1);t?""===e.value?i.setData({src:e,alt:a.prevAlt}):i.setData({src:e,alt:e.text}):i.setData({src:e})})),a.prevImage=r,Me(e,t,a,i)})(e,t,a,i):"alt"===s.name?a.prevAlt=i.getData().alt:"fileinput"===s.name?Re(e,t,a,i):"isDecorative"===s.name&&i.setEnabled("alt",!i.getData().isDecorative)},ze=e=>()=>{e.open=!1},Be=e=>e.hasAdvTab||e.hasUploadUrl||e.hasUploadHandler?{type:"tabpanel",tabs:v([[Ee(e)],e.hasAdvTab?[{title:"Advanced",name:"advanced",items:[{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"listbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}]:[],e.hasUploadTab&&(e.hasUploadUrl||e.hasUploadHandler)?[{title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}]:[]])}:{type:"panel",items:Le(e)},Pe=(e,t,a)=>i=>{const s=w(Oe(t.image),i.getData()),r={...s,style:me(a.normalizeCss,je(s,!1))};e.execCommand("mceUpdateImage",!1,je(r,t.hasAccessibilityOptions)),e.editorUpload.uploadImagesAuto(),i.close()},He=e=>t=>$(e,t)?(e=>new Promise((t=>{const a=document.createElement("img"),i=e=>{a.parentNode&&a.parentNode.removeChild(a),t(e)};a.addEventListener("load",(()=>{const e={width:H(a.width,a.clientWidth),height:H(a.height,a.clientHeight)};i(Promise.resolve(e))})),a.addEventListener("error",(()=>{i(Promise.reject(`Failed to get image dimensions for: ${e}`))}));const s=a.style;s.visibility="hidden",s.position="fixed",s.bottom=s.left="0px",s.width=s.height="auto",document.body.appendChild(a),a.src=e})))(e.documentBaseURI.toAbsolute(t)).then((e=>({width:String(e.width),height:String(e.height)}))):Promise.resolve({width:"",height:""}),Fe=e=>(t,a,i)=>{var s;return e.editorUpload.blobCache.create({blob:t,blobUri:a,name:null===(s=t.name)||void 0===s?void 0:s.replace(/\.[^\.]+$/,""),filename:t.name,base64:i.split(",")[1]})},Ge=e=>t=>{e.editorUpload.blobCache.add(t)},We=e=>(t,a)=>{e.windowManager.alert(t,a)},$e=e=>t=>be(e,t),Ve=e=>t=>e.dom.parseStyle(t),Ke=e=>(t,a)=>e.dom.serializeStyle(t,a),Ze=e=>t=>we(e).upload([t],!1).then((e=>{var t;return 0===e.length?Promise.reject("Failed to upload image"):!1===e[0].status?Promise.reject(null===(t=e[0].error)||void 0===t?void 0:t.message):e[0]})),qe=e=>{const t={imageSize:He(e),addToBlobCache:Ge(e),createBlobCache:Fe(e),alertErr:We(e),normalizeCss:$e(e),parseStyle:Ve(e),serializeStyle:Ke(e),uploadImage:Ze(e)};return{open:()=>{Ne(e).then((a=>{const i=(e=>({prevImage:xe(e.imageList,e.image.src),prevAlt:e.image.alt,open:!0}))(a);return{title:"Insert/Edit Image",size:"normal",body:Be(a),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Oe(a.image),onSubmit:Pe(e,a,t),onChange:ke(t,a,i),onClose:ze(i)}})).then(e.windowManager.open)}}},Je=e=>{const t=e.attr("class");return d(t)&&/\bimage\b/.test(t)},Qe=e=>t=>{let a=t.length;const i=t=>{t.attr("contenteditable",e?"true":null)};for(;a--;){const s=t[a];Je(s)&&(s.attr("contenteditable",e?"false":null),De.each(s.getAll("figcaption"),i))}},Xe=e=>t=>{const a=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",a),a(),()=>{e.off("NodeChange",a)}};e.add("image",(e=>{(e=>{const t=e.options.register;t("image_dimensions",{processor:"boolean",default:!0}),t("image_advtab",{processor:"boolean",default:!1}),t("image_uploadtab",{processor:"boolean",default:!0}),t("image_prepend_url",{processor:"string",default:""}),t("image_class_list",{processor:"object[]"}),t("image_description",{processor:"boolean",default:!0}),t("image_title",{processor:"boolean",default:!1}),t("image_caption",{processor:"boolean",default:!1}),t("image_list",{processor:e=>{const t=!1===e||r(e)||((e,t)=>{if(l(e)){for(let a=0,i=e.length;a<i;++a)if(!t(e[a]))return!1;return!0}return!1})(e,o)||g(e);return t?{value:e,valid:t}:{valid:!1,message:"Must be false, a string, an array or a function."}},default:!1})})(e),(e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("figure",Qe(!0)),e.serializer.addNodeFilter("figure",Qe(!1))}))})(e),(e=>{e.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:qe(e).open,onSetup:t=>{t.setActive(d(ve(e)));const a=e.selection.selectorChangedWithUnbind("img:not([data-mce-object]):not([data-mce-placeholder]),figure.image",t.setActive).unbind,i=Xe(e)(t);return()=>{a(),i()}}}),e.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:qe(e).open,onSetup:Xe(e)}),e.ui.registry.addContextMenu("image",{update:t=>e.selection.isEditable()&&(ne(t)||"IMG"===t.nodeName&&!W(t))?["image"]:[]})})(e),(e=>{e.addCommand("mceImage",qe(e).open),e.addCommand("mceUpdateImage",((t,a)=>{e.undoManager.transact((()=>Ae(e,a)))}))})(e)}))}();
|
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TinyMCE version 7.9.1 (2025-05-29)
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
(function () {
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
var global$4 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
9
|
+
|
|
10
|
+
/* eslint-disable @typescript-eslint/no-wrapper-object-types */
|
|
11
|
+
const hasProto = (v, constructor, predicate) => {
|
|
12
|
+
var _a;
|
|
13
|
+
if (predicate(v, constructor.prototype)) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
// String-based fallback time
|
|
18
|
+
return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const typeOf = (x) => {
|
|
22
|
+
const t = typeof x;
|
|
23
|
+
if (x === null) {
|
|
24
|
+
return 'null';
|
|
25
|
+
}
|
|
26
|
+
else if (t === 'object' && Array.isArray(x)) {
|
|
27
|
+
return 'array';
|
|
28
|
+
}
|
|
29
|
+
else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
|
|
30
|
+
return 'string';
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
return t;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const isType = (type) => (value) => typeOf(value) === type;
|
|
37
|
+
const isSimpleType = (type) => (value) => typeof value === type;
|
|
38
|
+
const isString = isType('string');
|
|
39
|
+
const isObject = isType('object');
|
|
40
|
+
const isArray = isType('array');
|
|
41
|
+
const isFunction = isSimpleType('function');
|
|
42
|
+
|
|
43
|
+
/* eslint-disable @typescript-eslint/unbound-method */
|
|
44
|
+
const nativeSlice = Array.prototype.slice;
|
|
45
|
+
const nativePush = Array.prototype.push;
|
|
46
|
+
const map = (xs, f) => {
|
|
47
|
+
// pre-allocating array size when it's guaranteed to be known
|
|
48
|
+
// http://jsperf.com/push-allocated-vs-dynamic/22
|
|
49
|
+
const len = xs.length;
|
|
50
|
+
const r = new Array(len);
|
|
51
|
+
for (let i = 0; i < len; i++) {
|
|
52
|
+
const x = xs[i];
|
|
53
|
+
r[i] = f(x, i);
|
|
54
|
+
}
|
|
55
|
+
return r;
|
|
56
|
+
};
|
|
57
|
+
const flatten = (xs) => {
|
|
58
|
+
// Note, this is possible because push supports multiple arguments:
|
|
59
|
+
// http://jsperf.com/concat-push/6
|
|
60
|
+
// Note that in the past, concat() would silently work (very slowly) for array-like objects.
|
|
61
|
+
// With this change it will throw an error.
|
|
62
|
+
const r = [];
|
|
63
|
+
for (let i = 0, len = xs.length; i < len; ++i) {
|
|
64
|
+
// Ensure that each value is an array itself
|
|
65
|
+
if (!isArray(xs[i])) {
|
|
66
|
+
throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
|
|
67
|
+
}
|
|
68
|
+
nativePush.apply(r, xs[i]);
|
|
69
|
+
}
|
|
70
|
+
return r;
|
|
71
|
+
};
|
|
72
|
+
const bind = (xs, f) => flatten(map(xs, f));
|
|
73
|
+
isFunction(Array.from) ? Array.from : (x) => nativeSlice.call(x);
|
|
74
|
+
|
|
75
|
+
var global$3 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
|
76
|
+
|
|
77
|
+
var global$2 = tinymce.util.Tools.resolve('tinymce.EditorManager');
|
|
78
|
+
|
|
79
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
|
|
80
|
+
|
|
81
|
+
var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
82
|
+
|
|
83
|
+
const option = (name) => (editor) => editor.options.get(name);
|
|
84
|
+
const register = (editor) => {
|
|
85
|
+
const registerOption = editor.options.register;
|
|
86
|
+
const filterProcessor = (value) => isString(value) || isFunction(value) || isObject(value);
|
|
87
|
+
registerOption('importcss_merge_classes', {
|
|
88
|
+
processor: 'boolean',
|
|
89
|
+
default: true
|
|
90
|
+
});
|
|
91
|
+
registerOption('importcss_exclusive', {
|
|
92
|
+
processor: 'boolean',
|
|
93
|
+
default: true
|
|
94
|
+
});
|
|
95
|
+
registerOption('importcss_selector_converter', {
|
|
96
|
+
processor: 'function'
|
|
97
|
+
});
|
|
98
|
+
registerOption('importcss_selector_filter', {
|
|
99
|
+
processor: filterProcessor
|
|
100
|
+
});
|
|
101
|
+
registerOption('importcss_file_filter', {
|
|
102
|
+
processor: filterProcessor
|
|
103
|
+
});
|
|
104
|
+
registerOption('importcss_groups', {
|
|
105
|
+
processor: 'object[]'
|
|
106
|
+
});
|
|
107
|
+
registerOption('importcss_append', {
|
|
108
|
+
processor: 'boolean',
|
|
109
|
+
default: false
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
const shouldMergeClasses = option('importcss_merge_classes');
|
|
113
|
+
const shouldImportExclusive = option('importcss_exclusive');
|
|
114
|
+
const getSelectorConverter = option('importcss_selector_converter');
|
|
115
|
+
const getSelectorFilter = option('importcss_selector_filter');
|
|
116
|
+
const getCssGroups = option('importcss_groups');
|
|
117
|
+
const shouldAppend = option('importcss_append');
|
|
118
|
+
const getFileFilter = option('importcss_file_filter');
|
|
119
|
+
const getSkin = option('skin');
|
|
120
|
+
const getSkinUrl = option('skin_url');
|
|
121
|
+
|
|
122
|
+
const generate = () => {
|
|
123
|
+
const ungroupedOrder = [];
|
|
124
|
+
const groupOrder = [];
|
|
125
|
+
const groups = {};
|
|
126
|
+
const addItemToGroup = (groupTitle, itemInfo) => {
|
|
127
|
+
if (groups[groupTitle]) {
|
|
128
|
+
groups[groupTitle].push(itemInfo);
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
groupOrder.push(groupTitle);
|
|
132
|
+
groups[groupTitle] = [itemInfo];
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
const addItem = (itemInfo) => {
|
|
136
|
+
ungroupedOrder.push(itemInfo);
|
|
137
|
+
};
|
|
138
|
+
const toFormats = () => {
|
|
139
|
+
const groupItems = bind(groupOrder, (g) => {
|
|
140
|
+
const items = groups[g];
|
|
141
|
+
return items.length === 0 ? [] : [{
|
|
142
|
+
title: g,
|
|
143
|
+
items
|
|
144
|
+
}];
|
|
145
|
+
});
|
|
146
|
+
return groupItems.concat(ungroupedOrder);
|
|
147
|
+
};
|
|
148
|
+
return {
|
|
149
|
+
addItemToGroup,
|
|
150
|
+
addItem,
|
|
151
|
+
toFormats
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
const internalEditorStyle = /^\.(?:ephox|tiny-pageembed|mce)(?:[.-]+\w+)+$/;
|
|
156
|
+
const removeCacheSuffix = (url) => {
|
|
157
|
+
const cacheSuffix = global$1.cacheSuffix;
|
|
158
|
+
if (isString(url)) {
|
|
159
|
+
url = url.replace('?' + cacheSuffix, '').replace('&' + cacheSuffix, '');
|
|
160
|
+
}
|
|
161
|
+
return url;
|
|
162
|
+
};
|
|
163
|
+
const isSkinContentCss = (editor, href) => {
|
|
164
|
+
const skin = getSkin(editor);
|
|
165
|
+
if (skin) {
|
|
166
|
+
const skinUrlBase = getSkinUrl(editor);
|
|
167
|
+
const skinUrl = skinUrlBase ? editor.documentBaseURI.toAbsolute(skinUrlBase) : global$2.baseURL + '/skins/ui/' + skin;
|
|
168
|
+
const contentSkinUrlPart = global$2.baseURL + '/skins/content/';
|
|
169
|
+
const suffix = editor.editorManager.suffix;
|
|
170
|
+
return href === skinUrl + '/content' + (editor.inline ? '.inline' : '') + `${suffix}.css` || href.indexOf(contentSkinUrlPart) !== -1;
|
|
171
|
+
}
|
|
172
|
+
return false;
|
|
173
|
+
};
|
|
174
|
+
const compileFilter = (filter) => {
|
|
175
|
+
if (isString(filter)) {
|
|
176
|
+
return (value) => {
|
|
177
|
+
return value.indexOf(filter) !== -1;
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
else if (filter instanceof RegExp) {
|
|
181
|
+
return (value) => {
|
|
182
|
+
return filter.test(value);
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
return filter;
|
|
186
|
+
};
|
|
187
|
+
const isCssImportRule = (rule) => rule.styleSheet;
|
|
188
|
+
const isCssPageRule = (rule) => rule.selectorText;
|
|
189
|
+
const getSelectors = (editor, doc, fileFilter) => {
|
|
190
|
+
const selectors = [];
|
|
191
|
+
const contentCSSUrls = {};
|
|
192
|
+
const append = (styleSheet, imported) => {
|
|
193
|
+
let href = styleSheet.href;
|
|
194
|
+
let rules;
|
|
195
|
+
href = removeCacheSuffix(href);
|
|
196
|
+
if (!href || fileFilter && !fileFilter(href, imported) || isSkinContentCss(editor, href)) {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
// TODO: Is this still need as TypeScript/MDN says imports doesn't exist?
|
|
200
|
+
global.each(styleSheet.imports, (styleSheet) => {
|
|
201
|
+
append(styleSheet, true);
|
|
202
|
+
});
|
|
203
|
+
try {
|
|
204
|
+
rules = styleSheet.cssRules || styleSheet.rules;
|
|
205
|
+
}
|
|
206
|
+
catch (_a) {
|
|
207
|
+
// Firefox fails on rules to remote domain for example:
|
|
208
|
+
// @import url(//fonts.googleapis.com/css?family=Pathway+Gothic+One);
|
|
209
|
+
}
|
|
210
|
+
global.each(rules, (cssRule) => {
|
|
211
|
+
if (isCssImportRule(cssRule) && cssRule.styleSheet) {
|
|
212
|
+
append(cssRule.styleSheet, true);
|
|
213
|
+
}
|
|
214
|
+
else if (isCssPageRule(cssRule)) {
|
|
215
|
+
global.each(cssRule.selectorText.split(','), (selector) => {
|
|
216
|
+
selectors.push(global.trim(selector));
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
};
|
|
221
|
+
global.each(editor.contentCSS, (url) => {
|
|
222
|
+
contentCSSUrls[url] = true;
|
|
223
|
+
});
|
|
224
|
+
if (!fileFilter) {
|
|
225
|
+
fileFilter = (href, imported) => {
|
|
226
|
+
return imported || contentCSSUrls[href];
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
try {
|
|
230
|
+
global.each(doc.styleSheets, (styleSheet) => {
|
|
231
|
+
append(styleSheet);
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
catch (_a) {
|
|
235
|
+
// Ignore
|
|
236
|
+
}
|
|
237
|
+
return selectors;
|
|
238
|
+
};
|
|
239
|
+
const defaultConvertSelectorToFormat = (editor, selectorText) => {
|
|
240
|
+
let format = {};
|
|
241
|
+
// Parse simple element.class1, .class1
|
|
242
|
+
const selector = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(selectorText);
|
|
243
|
+
if (!selector) {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
const elementName = selector[1];
|
|
247
|
+
const classes = selector[2].substr(1).split('.').join(' ');
|
|
248
|
+
const inlineSelectorElements = global.makeMap('a,img');
|
|
249
|
+
// element.class - Produce block formats
|
|
250
|
+
if (selector[1]) {
|
|
251
|
+
format = {
|
|
252
|
+
title: selectorText
|
|
253
|
+
};
|
|
254
|
+
if (editor.schema.getTextBlockElements()[elementName]) {
|
|
255
|
+
// Text block format ex: h1.class1
|
|
256
|
+
format.block = elementName;
|
|
257
|
+
}
|
|
258
|
+
else if (editor.schema.getBlockElements()[elementName] || inlineSelectorElements[elementName.toLowerCase()]) {
|
|
259
|
+
// Block elements such as table.class and special inline elements such as a.class or img.class
|
|
260
|
+
format.selector = elementName;
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
// Inline format strong.class1
|
|
264
|
+
format.inline = elementName;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
else if (selector[2]) {
|
|
268
|
+
// .class - Produce inline span with classes
|
|
269
|
+
format = {
|
|
270
|
+
inline: 'span',
|
|
271
|
+
title: selectorText.substr(1),
|
|
272
|
+
classes
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
// Append to or override class attribute
|
|
276
|
+
if (shouldMergeClasses(editor)) {
|
|
277
|
+
format.classes = classes;
|
|
278
|
+
}
|
|
279
|
+
else {
|
|
280
|
+
format.attributes = { class: classes };
|
|
281
|
+
}
|
|
282
|
+
return format;
|
|
283
|
+
};
|
|
284
|
+
const getGroupsBySelector = (groups, selector) => {
|
|
285
|
+
return global.grep(groups, (group) => {
|
|
286
|
+
return !group.filter || group.filter(selector);
|
|
287
|
+
});
|
|
288
|
+
};
|
|
289
|
+
const compileUserDefinedGroups = (groups) => {
|
|
290
|
+
return global.map(groups, (group) => {
|
|
291
|
+
return global.extend({}, group, {
|
|
292
|
+
original: group,
|
|
293
|
+
selectors: {},
|
|
294
|
+
filter: compileFilter(group.filter)
|
|
295
|
+
});
|
|
296
|
+
});
|
|
297
|
+
};
|
|
298
|
+
const isExclusiveMode = (editor, group) => {
|
|
299
|
+
// Exclusive mode can only be disabled when there are groups allowing the same style to be present in multiple groups
|
|
300
|
+
return group === null || shouldImportExclusive(editor);
|
|
301
|
+
};
|
|
302
|
+
const isUniqueSelector = (editor, selector, group, globallyUniqueSelectors) => {
|
|
303
|
+
return !(isExclusiveMode(editor, group) ? selector in globallyUniqueSelectors : selector in group.selectors);
|
|
304
|
+
};
|
|
305
|
+
const markUniqueSelector = (editor, selector, group, globallyUniqueSelectors) => {
|
|
306
|
+
if (isExclusiveMode(editor, group)) {
|
|
307
|
+
globallyUniqueSelectors[selector] = true;
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
group.selectors[selector] = true;
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
const convertSelectorToFormat = (editor, plugin, selector, group) => {
|
|
314
|
+
let selectorConverter;
|
|
315
|
+
const converter = getSelectorConverter(editor);
|
|
316
|
+
if (group && group.selector_converter) {
|
|
317
|
+
selectorConverter = group.selector_converter;
|
|
318
|
+
}
|
|
319
|
+
else if (converter) {
|
|
320
|
+
selectorConverter = converter;
|
|
321
|
+
}
|
|
322
|
+
else {
|
|
323
|
+
selectorConverter = () => {
|
|
324
|
+
return defaultConvertSelectorToFormat(editor, selector);
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
return selectorConverter.call(plugin, selector, group);
|
|
328
|
+
};
|
|
329
|
+
const setup = (editor) => {
|
|
330
|
+
editor.on('init', () => {
|
|
331
|
+
const model = generate();
|
|
332
|
+
const globallyUniqueSelectors = {};
|
|
333
|
+
const selectorFilter = compileFilter(getSelectorFilter(editor));
|
|
334
|
+
const groups = compileUserDefinedGroups(getCssGroups(editor));
|
|
335
|
+
const processSelector = (selector, group) => {
|
|
336
|
+
if (isUniqueSelector(editor, selector, group, globallyUniqueSelectors)) {
|
|
337
|
+
markUniqueSelector(editor, selector, group, globallyUniqueSelectors);
|
|
338
|
+
const format = convertSelectorToFormat(editor, editor.plugins.importcss, selector, group);
|
|
339
|
+
if (format) {
|
|
340
|
+
const formatName = format.name || global$3.DOM.uniqueId();
|
|
341
|
+
editor.formatter.register(formatName, format);
|
|
342
|
+
return {
|
|
343
|
+
title: format.title,
|
|
344
|
+
format: formatName
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
return null;
|
|
349
|
+
};
|
|
350
|
+
global.each(getSelectors(editor, editor.getDoc(), compileFilter(getFileFilter(editor))), (selector) => {
|
|
351
|
+
if (!internalEditorStyle.test(selector)) {
|
|
352
|
+
if (!selectorFilter || selectorFilter(selector)) {
|
|
353
|
+
const selectorGroups = getGroupsBySelector(groups, selector);
|
|
354
|
+
if (selectorGroups.length > 0) {
|
|
355
|
+
global.each(selectorGroups, (group) => {
|
|
356
|
+
const menuItem = processSelector(selector, group);
|
|
357
|
+
if (menuItem) {
|
|
358
|
+
model.addItemToGroup(group.title, menuItem);
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
else {
|
|
363
|
+
const menuItem = processSelector(selector, null);
|
|
364
|
+
if (menuItem) {
|
|
365
|
+
model.addItem(menuItem);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
const items = model.toFormats();
|
|
372
|
+
editor.dispatch('addStyleModifications', {
|
|
373
|
+
items,
|
|
374
|
+
replace: !shouldAppend(editor)
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
const get = (editor) => {
|
|
380
|
+
const convertSelectorToFormat = (selectorText) => {
|
|
381
|
+
return defaultConvertSelectorToFormat(editor, selectorText);
|
|
382
|
+
};
|
|
383
|
+
return {
|
|
384
|
+
convertSelectorToFormat
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
var Plugin = () => {
|
|
389
|
+
global$4.add('importcss', (editor) => {
|
|
390
|
+
register(editor);
|
|
391
|
+
setup(editor);
|
|
392
|
+
return get(editor);
|
|
393
|
+
});
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
Plugin();
|
|
397
|
+
/** *****
|
|
398
|
+
* DO NOT EXPORT ANYTHING
|
|
399
|
+
*
|
|
400
|
+
* IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
|
|
401
|
+
*******/
|
|
402
|
+
|
|
403
|
+
})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(s=r=e,(o=String).prototype.isPrototypeOf(s)||(null===(n=r.constructor)||void 0===n?void 0:n.name)===o.name)?"string":t;var s,r,o,n})(t)===e,s=t("string"),r=t("object"),o=t("array"),n=e=>"function"==typeof e;Array.prototype.slice;const c=Array.prototype.push;n(Array.from)&&Array.from;var i=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),l=tinymce.util.Tools.resolve("tinymce.EditorManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),p=tinymce.util.Tools.resolve("tinymce.util.Tools");const u=e=>t=>t.options.get(e),m=u("importcss_merge_classes"),f=u("importcss_exclusive"),y=u("importcss_selector_converter"),d=u("importcss_selector_filter"),h=u("importcss_groups"),g=u("importcss_append"),_=u("importcss_file_filter"),v=u("skin"),b=u("skin_url"),x=/^\.(?:ephox|tiny-pageembed|mce)(?:[.-]+\w+)+$/,T=e=>s(e)?t=>-1!==t.indexOf(e):e instanceof RegExp?t=>e.test(t):e,S=(e,t)=>{let s={};const r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(!r)return;const o=r[1],n=r[2].substr(1).split(".").join(" "),c=p.makeMap("a,img");return r[1]?(s={title:t},e.schema.getTextBlockElements()[o]?s.block=o:e.schema.getBlockElements()[o]||c[o.toLowerCase()]?s.selector=o:s.inline=o):r[2]&&(s={inline:"span",title:t.substr(1),classes:n}),m(e)?s.classes=n:s.attributes={class:n},s},A=(e,t)=>null===t||f(e),k=e=>{e.on("init",(()=>{const t=(()=>{const e=[],t=[],s={};return{addItemToGroup:(e,r)=>{s[e]?s[e].push(r):(t.push(e),s[e]=[r])},addItem:t=>{e.push(t)},toFormats:()=>{return(r=t,n=e=>{const t=s[e];return 0===t.length?[]:[{title:e,items:t}]},(e=>{const t=[];for(let s=0,r=e.length;s<r;++s){if(!o(e[s]))throw new Error("Arr.flatten item "+s+" was not an array, input: "+e);c.apply(t,e[s])}return t})(((e,t)=>{const s=e.length,r=new Array(s);for(let o=0;o<s;o++){const s=e[o];r[o]=t(s,o)}return r})(r,n))).concat(e);var r,n}}})(),r={},n=T(d(e)),u=(e=>p.map(e,(e=>p.extend({},e,{original:e,selectors:{},filter:T(e.filter)}))))(h(e)),m=(t,s)=>{if(((e,t,s,r)=>!(A(e,s)?t in r:t in s.selectors))(e,t,s,r)){((e,t,s,r)=>{A(e,s)?r[t]=!0:s.selectors[t]=!0})(e,t,s,r);const o=((e,t,s,r)=>{let o;const n=y(e);return o=r&&r.selector_converter?r.selector_converter:n||(()=>S(e,s)),o.call(t,s,r)})(e,e.plugins.importcss,t,s);if(o){const t=o.name||i.DOM.uniqueId();return e.formatter.register(t,o),{title:o.title,format:t}}}return null};p.each(((e,t,r)=>{const o=[],n={},c=(t,n)=>{let i,u=t.href;if(u=(e=>{const t=a.cacheSuffix;return s(e)&&(e=e.replace("?"+t,"").replace("&"+t,"")),e})(u),u&&(!r||r(u,n))&&!((e,t)=>{const s=v(e);if(s){const r=b(e),o=r?e.documentBaseURI.toAbsolute(r):l.baseURL+"/skins/ui/"+s,n=l.baseURL+"/skins/content/",c=e.editorManager.suffix;return t===o+"/content"+(e.inline?".inline":"")+`${c}.css`||-1!==t.indexOf(n)}return!1})(e,u)){p.each(t.imports,(e=>{c(e,!0)}));try{i=t.cssRules||t.rules}catch(e){}p.each(i,(e=>{e.styleSheet&&e.styleSheet?c(e.styleSheet,!0):e.selectorText&&p.each(e.selectorText.split(","),(e=>{o.push(p.trim(e))}))}))}};p.each(e.contentCSS,(e=>{n[e]=!0})),r||(r=(e,t)=>t||n[e]);try{p.each(t.styleSheets,(e=>{c(e)}))}catch(e){}return o})(e,e.getDoc(),T(_(e))),(e=>{if(!x.test(e)&&(!n||n(e))){const s=((e,t)=>p.grep(e,(e=>!e.filter||e.filter(t))))(u,e);if(s.length>0)p.each(s,(s=>{const r=m(e,s);r&&t.addItemToGroup(s.title,r)}));else{const s=m(e,null);s&&t.addItem(s)}}}));const f=t.toFormats();e.dispatch("addStyleModifications",{items:f,replace:!g(e)})}))};e.add("importcss",(e=>((e=>{const t=e.options.register,o=e=>s(e)||n(e)||r(e);t("importcss_merge_classes",{processor:"boolean",default:!0}),t("importcss_exclusive",{processor:"boolean",default:!0}),t("importcss_selector_converter",{processor:"function"}),t("importcss_selector_filter",{processor:o}),t("importcss_file_filter",{processor:o}),t("importcss_groups",{processor:"object[]"}),t("importcss_append",{processor:"boolean",default:!1})})(e),k(e),(e=>({convertSelectorToFormat:t=>S(e,t)}))(e))))}();
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TinyMCE version 7.9.1 (2025-05-29)
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
(function () {
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
9
|
+
|
|
10
|
+
const option = (name) => (editor) => editor.options.get(name);
|
|
11
|
+
const register$2 = (editor) => {
|
|
12
|
+
const registerOption = editor.options.register;
|
|
13
|
+
registerOption('insertdatetime_dateformat', {
|
|
14
|
+
processor: 'string',
|
|
15
|
+
default: editor.translate('%Y-%m-%d')
|
|
16
|
+
});
|
|
17
|
+
registerOption('insertdatetime_timeformat', {
|
|
18
|
+
processor: 'string',
|
|
19
|
+
default: editor.translate('%H:%M:%S')
|
|
20
|
+
});
|
|
21
|
+
registerOption('insertdatetime_formats', {
|
|
22
|
+
processor: 'string[]',
|
|
23
|
+
default: ['%H:%M:%S', '%Y-%m-%d', '%I:%M:%S %p', '%D']
|
|
24
|
+
});
|
|
25
|
+
registerOption('insertdatetime_element', {
|
|
26
|
+
processor: 'boolean',
|
|
27
|
+
default: false
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
const getDateFormat = option('insertdatetime_dateformat');
|
|
31
|
+
const getTimeFormat = option('insertdatetime_timeformat');
|
|
32
|
+
const getFormats = option('insertdatetime_formats');
|
|
33
|
+
const shouldInsertTimeElement = option('insertdatetime_element');
|
|
34
|
+
const getDefaultDateTime = (editor) => {
|
|
35
|
+
const formats = getFormats(editor);
|
|
36
|
+
return formats.length > 0 ? formats[0] : getTimeFormat(editor);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const daysShort = 'Sun Mon Tue Wed Thu Fri Sat Sun'.split(' ');
|
|
40
|
+
const daysLong = 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday'.split(' ');
|
|
41
|
+
const monthsShort = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' ');
|
|
42
|
+
const monthsLong = 'January February March April May June July August September October November December'.split(' ');
|
|
43
|
+
const addZeros = (value, len) => {
|
|
44
|
+
value = '' + value;
|
|
45
|
+
if (value.length < len) {
|
|
46
|
+
for (let i = 0; i < (len - value.length); i++) {
|
|
47
|
+
value = '0' + value;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return value;
|
|
51
|
+
};
|
|
52
|
+
const getDateTime = (editor, fmt, date = new Date()) => {
|
|
53
|
+
fmt = fmt.replace('%D', '%m/%d/%Y');
|
|
54
|
+
fmt = fmt.replace('%r', '%I:%M:%S %p');
|
|
55
|
+
fmt = fmt.replace('%Y', '' + date.getFullYear());
|
|
56
|
+
fmt = fmt.replace('%y', '' + date.getYear());
|
|
57
|
+
fmt = fmt.replace('%m', addZeros(date.getMonth() + 1, 2));
|
|
58
|
+
fmt = fmt.replace('%d', addZeros(date.getDate(), 2));
|
|
59
|
+
fmt = fmt.replace('%H', '' + addZeros(date.getHours(), 2));
|
|
60
|
+
fmt = fmt.replace('%M', '' + addZeros(date.getMinutes(), 2));
|
|
61
|
+
fmt = fmt.replace('%S', '' + addZeros(date.getSeconds(), 2));
|
|
62
|
+
fmt = fmt.replace('%I', '' + ((date.getHours() + 11) % 12 + 1));
|
|
63
|
+
fmt = fmt.replace('%p', '' + (date.getHours() < 12 ? 'AM' : 'PM'));
|
|
64
|
+
fmt = fmt.replace('%B', '' + editor.translate(monthsLong[date.getMonth()]));
|
|
65
|
+
fmt = fmt.replace('%b', '' + editor.translate(monthsShort[date.getMonth()]));
|
|
66
|
+
fmt = fmt.replace('%A', '' + editor.translate(daysLong[date.getDay()]));
|
|
67
|
+
fmt = fmt.replace('%a', '' + editor.translate(daysShort[date.getDay()]));
|
|
68
|
+
fmt = fmt.replace('%%', '%');
|
|
69
|
+
return fmt;
|
|
70
|
+
};
|
|
71
|
+
const updateElement = (editor, timeElm, computerTime, userTime) => {
|
|
72
|
+
const newTimeElm = editor.dom.create('time', { datetime: computerTime }, userTime);
|
|
73
|
+
editor.dom.replace(newTimeElm, timeElm);
|
|
74
|
+
editor.selection.select(newTimeElm, true);
|
|
75
|
+
editor.selection.collapse(false);
|
|
76
|
+
};
|
|
77
|
+
const insertDateTime = (editor, format) => {
|
|
78
|
+
if (shouldInsertTimeElement(editor) && editor.selection.isEditable()) {
|
|
79
|
+
const userTime = getDateTime(editor, format);
|
|
80
|
+
let computerTime;
|
|
81
|
+
if (/%[HMSIp]/.test(format)) {
|
|
82
|
+
computerTime = getDateTime(editor, '%Y-%m-%dT%H:%M');
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
computerTime = getDateTime(editor, '%Y-%m-%d');
|
|
86
|
+
}
|
|
87
|
+
const timeElm = editor.dom.getParent(editor.selection.getStart(), 'time');
|
|
88
|
+
if (timeElm) {
|
|
89
|
+
updateElement(editor, timeElm, computerTime, userTime);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
editor.insertContent('<time datetime="' + computerTime + '">' + userTime + '</time>');
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
editor.insertContent(getDateTime(editor, format));
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const register$1 = (editor) => {
|
|
101
|
+
editor.addCommand('mceInsertDate', (_ui, value) => {
|
|
102
|
+
insertDateTime(editor, value !== null && value !== void 0 ? value : getDateFormat(editor));
|
|
103
|
+
});
|
|
104
|
+
editor.addCommand('mceInsertTime', (_ui, value) => {
|
|
105
|
+
insertDateTime(editor, value !== null && value !== void 0 ? value : getTimeFormat(editor));
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const Cell = (initial) => {
|
|
110
|
+
let value = initial;
|
|
111
|
+
const get = () => {
|
|
112
|
+
return value;
|
|
113
|
+
};
|
|
114
|
+
const set = (v) => {
|
|
115
|
+
value = v;
|
|
116
|
+
};
|
|
117
|
+
return {
|
|
118
|
+
get,
|
|
119
|
+
set
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
124
|
+
|
|
125
|
+
const onSetupEditable = (editor) => (api) => {
|
|
126
|
+
const nodeChanged = () => {
|
|
127
|
+
api.setEnabled(editor.selection.isEditable());
|
|
128
|
+
};
|
|
129
|
+
editor.on('NodeChange', nodeChanged);
|
|
130
|
+
nodeChanged();
|
|
131
|
+
return () => {
|
|
132
|
+
editor.off('NodeChange', nodeChanged);
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
const register = (editor) => {
|
|
136
|
+
const formats = getFormats(editor);
|
|
137
|
+
const defaultFormat = Cell(getDefaultDateTime(editor));
|
|
138
|
+
const insertDateTime = (format) => editor.execCommand('mceInsertDate', false, format);
|
|
139
|
+
editor.ui.registry.addSplitButton('insertdatetime', {
|
|
140
|
+
icon: 'insert-time',
|
|
141
|
+
tooltip: 'Insert date/time',
|
|
142
|
+
select: (value) => value === defaultFormat.get(),
|
|
143
|
+
fetch: (done) => {
|
|
144
|
+
done(global.map(formats, (format) => ({ type: 'choiceitem', text: getDateTime(editor, format), value: format })));
|
|
145
|
+
},
|
|
146
|
+
onAction: (_api) => {
|
|
147
|
+
insertDateTime(defaultFormat.get());
|
|
148
|
+
},
|
|
149
|
+
onItemAction: (_api, value) => {
|
|
150
|
+
defaultFormat.set(value);
|
|
151
|
+
insertDateTime(value);
|
|
152
|
+
},
|
|
153
|
+
onSetup: onSetupEditable(editor)
|
|
154
|
+
});
|
|
155
|
+
const makeMenuItemHandler = (format) => () => {
|
|
156
|
+
defaultFormat.set(format);
|
|
157
|
+
insertDateTime(format);
|
|
158
|
+
};
|
|
159
|
+
editor.ui.registry.addNestedMenuItem('insertdatetime', {
|
|
160
|
+
icon: 'insert-time',
|
|
161
|
+
text: 'Date/time',
|
|
162
|
+
getSubmenuItems: () => global.map(formats, (format) => ({
|
|
163
|
+
type: 'menuitem',
|
|
164
|
+
text: getDateTime(editor, format),
|
|
165
|
+
onAction: makeMenuItemHandler(format)
|
|
166
|
+
})),
|
|
167
|
+
onSetup: onSetupEditable(editor)
|
|
168
|
+
});
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
var Plugin = () => {
|
|
172
|
+
global$1.add('insertdatetime', (editor) => {
|
|
173
|
+
register$2(editor);
|
|
174
|
+
register$1(editor);
|
|
175
|
+
register(editor);
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
Plugin();
|
|
180
|
+
/** *****
|
|
181
|
+
* DO NOT EXPORT ANYTHING
|
|
182
|
+
*
|
|
183
|
+
* IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
|
|
184
|
+
*******/
|
|
185
|
+
|
|
186
|
+
})();
|