tinymce-rails 5.0.4 → 5.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/assets/source/tinymce/tinymce.js +30 -8
- data/lib/tinymce/rails/configuration.rb +2 -1
- data/lib/tinymce/rails/version.rb +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/advlist/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/autolink/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/autosave/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/bbcode/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/code/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/codesample/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/colorpicker/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/contextmenu/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/help/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/imagetools/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/importcss/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/lists/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/noneditable/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/pagebreak/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/preview/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/print/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/quickbars/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/save/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/spellchecker/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/tabfocus/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/template/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/textcolor/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/textpattern/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/toc/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/visualblocks/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/visualchars/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/content.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide-dark/skin.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.inline.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/content.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/ui/oxide/skin.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/themes/mobile/theme.js +2 -2
- data/vendor/assets/javascripts/tinymce/themes/silver/theme.js +2 -2
- data/vendor/assets/javascripts/tinymce/tinymce.js +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3825d9b3942f8c25ceadb1affeef6ce42722a18e44d09d6e3f0544a6f128dfbd
|
4
|
+
data.tar.gz: 77bec138b529b542312107e587982343af10d7900243e28eedbab2efc16fab0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de30dfac39f464b3e5ac7fe72b0e500931c6bdb9cbaf9a5b9a4f37881a2877aa86bb0c04cd45cb848337b9682e62bd8d0853c7726682eef79071ab46937172cc
|
7
|
+
data.tar.gz: 66b84cbdbb7b3b5fd917359b59447c116e73a3076a4ffa12f4371ddb2a3c2f54629b226956e366912b446e84d574cc4385340dfce0e189c11a1b94f9fc789a6a
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Rails Integration for TinyMCE
|
2
2
|
=============================
|
3
3
|
|
4
|
-
The `tinymce-rails` gem integrates the [TinyMCE](
|
4
|
+
The `tinymce-rails` gem integrates the [TinyMCE](https://www.tiny.cloud/) editor with the Rails asset pipeline.
|
5
5
|
|
6
6
|
This gem is compatible with Rails 4.2 and higher.
|
7
7
|
|
@@ -52,7 +52,7 @@ alternate:
|
|
52
52
|
- table
|
53
53
|
```
|
54
54
|
|
55
|
-
See the [TinyMCE
|
55
|
+
See the [TinyMCE 5 Documentation](https://www.tiny.cloud/docs/configure/) for a full list of configuration options.
|
56
56
|
|
57
57
|
|
58
58
|
**3. Include the TinyMCE assets**
|
@@ -4,7 +4,7 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
(function () {
|
10
10
|
(function (domGlobals) {
|
@@ -4325,9 +4325,15 @@
|
|
4325
4325
|
toOption: Option.none
|
4326
4326
|
};
|
4327
4327
|
};
|
4328
|
+
var fromOption = function (opt, err) {
|
4329
|
+
return opt.fold(function () {
|
4330
|
+
return error(err);
|
4331
|
+
}, value);
|
4332
|
+
};
|
4328
4333
|
var Result = {
|
4329
4334
|
value: value,
|
4330
|
-
error: error
|
4335
|
+
error: error,
|
4336
|
+
fromOption: fromOption
|
4331
4337
|
};
|
4332
4338
|
|
4333
4339
|
function StyleSheetLoader(document, settings) {
|
@@ -11356,6 +11362,9 @@
|
|
11356
11362
|
return ['default'];
|
11357
11363
|
}
|
11358
11364
|
};
|
11365
|
+
var getDirectionality = function (editor) {
|
11366
|
+
return editor.getParam('directionality', I18n.isRtl() ? 'rtl' : undefined);
|
11367
|
+
};
|
11359
11368
|
var Settings = {
|
11360
11369
|
getIframeAttrs: getIframeAttrs,
|
11361
11370
|
getDocType: getDocType,
|
@@ -11385,7 +11394,8 @@
|
|
11385
11394
|
getLanguageUrl: getLanguageUrl,
|
11386
11395
|
shouldIndentUseMargin: shouldIndentUseMargin,
|
11387
11396
|
getIndentation: getIndentation,
|
11388
|
-
getContentCss: getContentCss
|
11397
|
+
getContentCss: getContentCss,
|
11398
|
+
getDirectionality: getDirectionality
|
11389
11399
|
};
|
11390
11400
|
|
11391
11401
|
var defaultFormat = 'html';
|
@@ -12619,6 +12629,7 @@
|
|
12619
12629
|
'cancel': '<svg width="24" height="24"><path d="M12 4.6a7.4 7.4 0 1 1 0 14.8 7.4 7.4 0 0 1 0-14.8zM12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18zm0 8L14.8 8l1 1.1-2.7 2.8 2.7 2.7-1.1 1.1-2.7-2.7-2.7 2.7-1-1.1 2.6-2.7-2.7-2.7 1-1.1 2.8 2.7z" fill-rule="nonzero"/></svg>',
|
12620
12630
|
'change-case': '<svg width="24" height="24"><path d="M18.4 18.2v-.6c-.5.8-1.3 1.2-2.4 1.2-2.2 0-3.3-1.6-3.3-4.8 0-3.1 1-4.7 3.3-4.7 1.1 0 1.8.3 2.4 1.1v-.6c0-.5.4-.8.8-.8s.8.3.8.8v8.4c0 .5-.4.8-.8.8a.8.8 0 0 1-.8-.8zm-2-7.4c-1.3 0-1.8.9-1.8 3.2 0 2.4.5 3.3 1.7 3.3 1.3 0 1.8-.9 1.8-3.2 0-2.4-.5-3.3-1.7-3.3zM10 15.7H5.5l-.8 2.6a1 1 0 0 1-1 .7h-.2a.7.7 0 0 1-.7-1l4-12a1 1 0 1 1 2 0l4 12a.7.7 0 0 1-.8 1h-.2a1 1 0 0 1-1-.7l-.8-2.6zm-.3-1.5l-2-6.5-1.9 6.5h3.9z" fill-rule="evenodd"/></svg>',
|
12621
12631
|
'character-count': '<svg width="24" height="24"><path d="M4 11.5h16v1H4v-1zm4.8-6.8V10H7.7V5.8h-1v-1h2zM11 8.3V9h2v1h-3V7.7l2-1v-.9h-2v-1h3v2.4l-2 1zm6.3-3.4V10h-3.1V9h2.1V8h-2.1V6.8h2.1v-1h-2.1v-1h3.1zM5.8 16.4c0-.5.2-.8.5-1 .2-.2.6-.3 1.2-.3l.8.1c.2 0 .4.2.5.3l.4.4v2.8l.2.3H8.2v-.1-.2l-.6.3H7c-.4 0-.7 0-1-.2a1 1 0 0 1-.3-.9c0-.3 0-.6.3-.8.3-.2.7-.4 1.2-.4l.6-.2h.3v-.2l-.1-.2a.8.8 0 0 0-.5-.1 1 1 0 0 0-.4 0l-.3.4h-1zm2.3.8h-.2l-.2.1-.4.1a1 1 0 0 0-.4.2l-.2.2.1.3.5.1h.4l.4-.4v-.6zm2-3.4h1.2v1.7l.5-.3h.5c.5 0 .9.1 1.2.5.3.4.5.8.5 1.4 0 .6-.2 1.1-.5 1.5-.3.4-.7.6-1.3.6l-.6-.1-.4-.4v.4h-1.1v-5.4zm1.1 3.3c0 .3 0 .6.2.8a.7.7 0 0 0 1.2 0l.2-.8c0-.4 0-.6-.2-.8a.7.7 0 0 0-.6-.3l-.6.3-.2.8zm6.1-.5c0-.2 0-.3-.2-.4a.8.8 0 0 0-.5-.2c-.3 0-.5.1-.6.3l-.2.9c0 .3 0 .6.2.8.1.2.3.3.6.3.2 0 .4 0 .5-.2l.2-.4h1.1c0 .5-.3.8-.6 1.1a2 2 0 0 1-1.3.4c-.5 0-1-.2-1.3-.6a2 2 0 0 1-.5-1.4c0-.6.1-1.1.5-1.5.3-.4.8-.5 1.4-.5.5 0 1 0 1.2.3.4.3.5.7.5 1.2h-1v-.1z" fill-rule="evenodd"/></svg>',
|
12632
|
+
'checklist-rtl': '<svg width="24" height="24"><path d="M5 17h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2zm14.2 11c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 8c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',
|
12622
12633
|
'checklist': '<svg width="24" height="24"><path d="M11 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8a1 1 0 0 1 0 2h-8a1 1 0 0 1 0-2zM7.2 16c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 8c-.2.3-.7.4-1 0L3.8 6.9a.7.7 0 0 1 0-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',
|
12623
12634
|
'checkmark': '<svg width="24" height="24"><path d="M18.2 5.4a1 1 0 0 1 1.6 1.2l-8 12a1 1 0 0 1-1.5.1l-5-5a1 1 0 1 1 1.4-1.4l4.1 4.1 7.4-11z" fill-rule="nonzero"/></svg>',
|
12624
12635
|
'chevron-down': '<svg width="10" height="10"><path d="M8.7 2.2c.3-.3.8-.3 1 0 .4.4.4.9 0 1.2L5.7 7.8c-.3.3-.9.3-1.2 0L.2 3.4a.8.8 0 0 1 0-1.2c.3-.3.8-.3 1.1 0L5 6l3.7-3.8z" fill-rule="nonzero"/></svg>',
|
@@ -12631,7 +12642,8 @@
|
|
12631
12642
|
'color-picker': '<svg width="24" height="24"><path d="M12 3a9 9 0 0 0 0 18 1.5 1.5 0 0 0 1.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 0 0 5-5c0-4.4-4-8-9-8zm-5.5 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm3-4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm3 4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z" fill-rule="nonzero"/></svg>',
|
12632
12643
|
'color-swatch-remove-color': '<svg width="24" height="24"><path stroke="#000" stroke-width="2" d="M21 3L3 21" fill-rule="evenodd"/></svg>',
|
12633
12644
|
'color-swatch': '<svg width="24" height="24"><rect x="3" y="3" width="18" height="18" rx="1" fill-rule="evenodd"/></svg>',
|
12634
|
-
'comment': '<svg width="24" height="24"><path d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23z"
|
12645
|
+
'comment-add': '<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23z"/><path d="M13 10h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 0v-2H9a1 1 0 0 1 0-2h2V8a1 1 0 0 1 2 0v2z"/></g></svg>',
|
12646
|
+
'comment': '<svg width="24" height="24"><path fill-rule="nonzero" d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23z"/></svg>',
|
12635
12647
|
'contrast': '<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4zm-6 8a6 6 0 0 0 6 6V6a6 6 0 0 0-6 6z" fill-rule="evenodd"/></svg>',
|
12636
12648
|
'copy': '<svg width="24" height="24"><path d="M16 3H6a2 2 0 0 0-2 2v11h2V5h10V3zm1 4a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7zm0 12V9h-7v10h7z" fill-rule="nonzero"/></svg>',
|
12637
12649
|
'crop': '<svg width="24" height="24"><path d="M17 8v7h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v2c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-2H7V9H5a1 1 0 1 1 0-2h2V5c0-.6.4-1 1-1s1 .4 1 1v2h7l3-3 1 1-3 3zM9 9v5l5-5H9zm1 6h5v-5l-5 5z" fill-rule="evenodd"/></svg>',
|
@@ -12639,6 +12651,7 @@
|
|
12639
12651
|
'document-properties': '<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',
|
12640
12652
|
'drag': '<svg width="24" height="24"><path d="M13 5h2v2h-2V5zm0 4h2v2h-2V9zM9 9h2v2H9V9zm4 4h2v2h-2v-2zm-4 0h2v2H9v-2zm0 4h2v2H9v-2zm4 0h2v2h-2v-2zM9 5h2v2H9V5z" fill-rule="evenodd"/></svg>',
|
12641
12653
|
'duplicate': '<svg width="24" height="24"><g fill-rule="nonzero"><path d="M16 3v2H6v11H4V5c0-1.1.9-2 2-2h10zm3 8h-2V9h-7v10h9a2 2 0 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7a2 2 0 0 1 2 2v2z"/><path d="M17 14h1a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1h-1a1 1 0 0 1 0-2h1v-1a1 1 0 0 1 2 0v1z"/></g></svg>',
|
12654
|
+
'edit-block': '<svg width="24" height="24"><path fill-rule="nonzero" d="M19.8 8.8l-9.4 9.4c-.2.2-.5.4-.9.4l-5.4 1.2 1.2-5.4.5-.8 9.4-9.4c.7-.7 1.8-.7 2.5 0l2.1 2.1c.7.7.7 1.8 0 2.5zm-2-.2l1-.9v-.3l-2.2-2.2a.3.3 0 0 0-.3 0l-1 1L18 8.5zm-1 1l-2.5-2.4-6 6 2.5 2.5 6-6zm-7 7.1l-2.6-2.4-.3.3-.1.2-.7 3 3.1-.6h.1l.4-.5z"/></svg>',
|
12642
12655
|
'edit-image': '<svg width="24" height="24"><path d="M18 16h2V7a2 2 0 0 0-2-2H7v2h11v9zM6 17h15a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1H6a2 2 0 0 1-2-2V7H3a1 1 0 1 1 0-2h1V4a1 1 0 1 1 2 0v13zm3-5.3l1.3 2 3-4.7 3.7 6H7l2-3.3z" fill-rule="nonzero"/></svg>',
|
12643
12656
|
'embed-page': '<svg width="24" height="24"><path d="M19 6V5H5v14h2A13 13 0 0 1 19 6zm0 1.4c-.8.8-1.6 2.4-2.2 4.6H19V7.4zm0 5.6h-2.4c-.4 1.8-.6 3.8-.6 6h3v-6zm-4 6c0-2.2.2-4.2.6-6H13c-.7 1.8-1.1 3.8-1.1 6h3zm-4 0c0-2.2.4-4.2 1-6H9.6A12 12 0 0 0 8 19h3zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 0 0-4 4.5h2.2zm-3.4 0a12 12 0 0 1 2.8-4 12 12 0 0 0-5 4h2.2z" fill-rule="nonzero"/></svg>',
|
12644
12657
|
'embed': '<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm4.8 2.6l5.6 4a.5.5 0 0 1 0 .8l-5.6 4A.5.5 0 0 1 9 16V8a.5.5 0 0 1 .8-.4z" fill-rule="nonzero"/></svg>',
|
@@ -12648,6 +12661,7 @@
|
|
12648
12661
|
'flip-vertically': '<svg width="24" height="24"><path d="M5 14v2h2v-2H5zm8 4v2h2v-2h-2zm4-14H7a2 2 0 0 0-2 2v3h2V6h10v3h2V6a2 2 0 0 0-2-2zm2 14h-2v2a2 2 0 0 0 2-2zM3 11v2h18v-2H3zm6 7v2h2v-2H9zm8-4v2h2v-2h-2zM5 18c0 1.1.9 2 2 2v-2H5z" fill-rule="nonzero"/></svg>',
|
12649
12662
|
'format-painter': '<svg width="24" height="24"><path d="M18 5V4c0-.5-.4-1-1-1H5a1 1 0 0 0-1 1v4c0 .6.5 1 1 1h12c.6 0 1-.4 1-1V7h1v4H9v9c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-7h8V5h-3z" fill-rule="nonzero"/></svg>',
|
12650
12663
|
'fullscreen': '<svg width="24" height="24"><path d="M15.3 10l-1.2-1.3 2.9-3h-2.3a.9.9 0 1 1 0-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 1 1-1.8 0V7l-2.9 3zm0 4l3 3v-2.3a.9.9 0 1 1 1.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 1 1 0-1.8H17l-3-2.9 1.3-1.2zM10 15.4l-2.9 3h2.3a.9.9 0 1 1 0 1.7H5a.9.9 0 0 1-.9-.9v-4.4a.9.9 0 1 1 1.8 0V17l2.9-3 1.2 1.3zM8.7 10L5.7 7v2.3a.9.9 0 0 1-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 0 1 0 1.8H7l3 2.9-1.3 1.2z" fill-rule="nonzero"/></svg>',
|
12664
|
+
'gallery': '<svg width="24" height="24"><path fill-rule="nonzero" d="M5 15.7l2.3-2.2c.3-.3.7-.3 1 0L11 16l5.1-5c.3-.4.8-.4 1 0l2 1.9V8H5v7.7zM5 18V19h3l1.8-1.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V7c0-.6.4-1 1-1zm6 7a2 2 0 1 1 0-4 2 2 0 0 1 0 4zM4.5 4h15a.5.5 0 1 1 0 1h-15a.5.5 0 0 1 0-1zm2-2h11a.5.5 0 1 1 0 1h-11a.5.5 0 0 1 0-1z"/></svg>',
|
12651
12665
|
'gamma': '<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm6.5 11.8V14L9.2 8.7a5.1 5.1 0 0 0-.4-.8l-.1-.2H8 8v-1l.3-.1.3-.1h.7a1 1 0 0 1 .6.5l.1.3a8.5 8.5 0 0 1 .3.6l1.9 4.6 2-5.2a1 1 0 0 1 1-.6.5.5 0 0 1 .5.6L13 14v2.8a.7.7 0 0 1-1.4 0z" fill-rule="nonzero"/></svg>',
|
12652
12666
|
'help': '<svg width="24" height="24"><g fill-rule="evenodd"><path d="M12 5.5a6.5 6.5 0 0 0-6 9 6.3 6.3 0 0 0 1.4 2l1 1a6.3 6.3 0 0 0 3.6 1 6.5 6.5 0 0 0 6-9 6.3 6.3 0 0 0-1.4-2l-1-1a6.3 6.3 0 0 0-3.6-1zM12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4z"/><path d="M9.6 9.7a.7.7 0 0 1-.7-.8c0-1.1 1.5-1.8 3.2-1.8 1.8 0 3.2.8 3.2 2.4 0 1.4-.4 2.1-1.5 2.8-.2 0-.3.1-.3.2a2 2 0 0 0-.8.8.8.8 0 0 1-1.4-.6c.3-.7.8-1 1.3-1.5l.4-.2c.7-.4.8-.6.8-1.5 0-.5-.6-.9-1.7-.9-.5 0-1 .1-1.4.3-.2 0-.3.1-.3.2v-.2c0 .4-.4.8-.8.8z" fill-rule="nonzero"/><circle cx="12" cy="16" r="1"/></g></svg>',
|
12653
12667
|
'highlight-bg-color': '<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-highlight-bg-color__color" d="M3 18h18v3H3z"/><path fill-rule="nonzero" d="M7.7 16.7H3l3.3-3.3-.7-.8L10.2 8l4 4.1-4 4.2c-.2.2-.6.2-.8 0l-.6-.7-1.1 1.1zm5-7.5L11 7.4l3-2.9a2 2 0 0 1 2.6 0L18 6c.7.7.7 2 0 2.7l-2.9 2.9-1.8-1.8-.5-.6"/></g></svg>',
|
@@ -12666,11 +12680,17 @@
|
|
12666
12680
|
'list-bull-circle': '<svg width="48" height="48"><g fill-rule="evenodd"><path d="M11 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6zM11 26a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6zM11 36a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6z" fill-rule="nonzero"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',
|
12667
12681
|
'list-bull-default': '<svg width="48" height="48"><g fill-rule="evenodd"><circle cx="11" cy="14" r="3"/><circle cx="11" cy="24" r="3"/><circle cx="11" cy="34" r="3"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',
|
12668
12682
|
'list-bull-square': '<svg width="48" height="48"><g fill-rule="evenodd"><path d="M8 11h6v6H8zM8 21h6v6H8zM8 31h6v6H8z"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',
|
12683
|
+
'list-num-default-rtl': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 17v-4.8l-1.6 1v-1.1l1.6-1h1.2V17zM33.3 17.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm1.7 5.7c0-1.2 1-2 2.2-2 1.3 0 2.1.8 2.1 1.8 0 .7-.3 1.2-1.3 2.2l-1.2 1v.2h2.6v1h-4.3v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H35zm-1.7 4.3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm3.2 7.3v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H35c0-1.1 1-1.8 2.2-1.8 1.2 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.7.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .6 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm-3.3 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',
|
12669
12684
|
'list-num-default': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10 17v-4.8l-1.5 1v-1.1l1.6-1h1.2V17h-1.2zm3.6.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-5 5.7c0-1.2.8-2 2.1-2s2.1.8 2.1 1.8c0 .7-.3 1.2-1.4 2.2l-1.1 1v.2h2.6v1H8.6v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H8.5zm6.3 4.3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM10 34.4v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H8.6c0-1.1 1-1.8 2.2-1.8 1.3 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.8.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .7 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm4.7 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',
|
12685
|
+
'list-num-lower-alpha-rtl': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M36.5 16c-.9 0-1.5-.5-1.5-1.3s.6-1.3 1.8-1.4h1v-.4c0-.4-.2-.6-.7-.6-.4 0-.7.1-.8.4h-1.1c0-.8.8-1.4 2-1.4S39 12 39 13V16h-1.2v-.6c-.3.4-.8.7-1.4.7zm.4-.8c.6 0 1-.4 1-.9V14h-1c-.5.1-.7.3-.7.6 0 .4.3.6.7.6zM33.1 16.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zM37.7 26c-.7 0-1.2-.2-1.5-.7v.7H35v-6.3h1.2v2.5c.3-.5.8-.9 1.5-.9 1.1 0 1.8 1 1.8 2.4 0 1.5-.7 2.4-1.8 2.4zm-.5-3.6c-.6 0-1 .5-1 1.3s.4 1.4 1 1.4c.7 0 1-.6 1-1.4 0-.8-.3-1.3-1-1.3zM33.2 26.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm6 7h-1c-.1-.5-.4-.8-1-.8s-1 .5-1 1.4c0 1 .4 1.4 1 1.4.5 0 .9-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm-6.1 3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',
|
12670
12686
|
'list-num-lower-alpha': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.3 15.2c.5 0 1-.4 1-.9V14h-1c-.5.1-.8.3-.8.6 0 .4.3.6.8.6zm-.4.9c-1 0-1.5-.6-1.5-1.4 0-.8.6-1.3 1.7-1.4h1.1v-.4c0-.4-.2-.6-.7-.6-.5 0-.8.1-.9.4h-1c0-.8.8-1.4 2-1.4 1.1 0 1.8.6 1.8 1.6V16h-1.1v-.6h-.1c-.2.4-.7.7-1.3.7zm4.6 0c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-3.2 10c-.6 0-1.2-.3-1.4-.8v.7H8.5v-6.3H10v2.5c.3-.5.8-.9 1.4-.9 1.2 0 1.9 1 1.9 2.4 0 1.5-.7 2.4-1.9 2.4zm-.4-3.7c-.7 0-1 .5-1 1.3s.3 1.4 1 1.4c.6 0 1-.6 1-1.4 0-.8-.4-1.3-1-1.3zm4 3.7c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-2.2 7h-1.2c0-.5-.4-.8-.9-.8-.6 0-1 .5-1 1.4 0 1 .4 1.4 1 1.4.5 0 .8-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm1.8 3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',
|
12687
|
+
'list-num-lower-greek-rtl': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 16c-1.2 0-2-.8-2-2.3 0-1.5.8-2.4 2-2.4.6 0 1 .4 1.3 1v-.9H40v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1-.7h-.2c-.2.4-.7.8-1.3.8zm.3-1c.6 0 1-.5 1-1.3s-.4-1.3-1-1.3-1 .5-1 1.3.4 1.4 1 1.4zM33.3 16.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM36 21.9c0-1.5.8-2.3 2.1-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.9 1.3.9.3 1.3.8 1.3 1.7 0 1.2-.7 1.9-1.8 1.9-.6 0-1.1-.3-1.4-.8v2.2H36V22zm1.8 1.2v-1h.3c.5 0 .9-.2.9-.7 0-.5-.3-.8-.9-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1 1.3s1-.4 1-1-.4-1-1.2-1h-.3zM33.3 26.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM37.1 34.6L34.8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.2.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 0 0-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zM33.3 36.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',
|
12671
12688
|
'list-num-lower-greek': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.5 15c.7 0 1-.5 1-1.3s-.3-1.3-1-1.3c-.5 0-.9.5-.9 1.3s.4 1.4 1 1.4zm-.3 1c-1.1 0-1.8-.8-1.8-2.3 0-1.5.7-2.4 1.8-2.4.7 0 1.1.4 1.3 1h.1v-.9h1.2v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1.1-.7h-.1c-.2.4-.7.8-1.4.8zm5 .1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm-4.9 7v-1h.3c.6 0 1-.2 1-.7 0-.5-.4-.8-1-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1.1 1.3.6 0 1-.4 1-1s-.5-1-1.3-1h-.3zM8.6 22c0-1.5.7-2.3 2-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.8 1.3.8.3 1.3.8 1.3 1.7 0 1.2-.8 1.9-1.9 1.9-.6 0-1.1-.3-1.3-.8v2.2H8.5V22zm6.2 4.2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-4.5 8.5L8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.1.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 0 0-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zm4.5.5c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',
|
12689
|
+
'list-num-lower-roman-rtl': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M32.9 16v-1.2h-1.3V16H33zm0 10v-1.2h-1.3V26H33zm0 10v-1.2h-1.3V36H33z"/><path fill-rule="nonzero" d="M36 21h-1.5v5H36zM36 31h-1.5v5H36zM39 21h-1.5v5H39zM39 31h-1.5v5H39zM42 31h-1.5v5H42zM36 11h-1.5v5H36zM36 19h-1.5v1H36zM36 29h-1.5v1H36zM39 19h-1.5v1H39zM39 29h-1.5v1H39zM42 29h-1.5v1H42zM36 9h-1.5v1H36z"/></g></svg>',
|
12672
12690
|
'list-num-lower-roman': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 16v-1.2h1.3V16H15zm0 10v-1.2h1.3V26H15zm0 10v-1.2h1.3V36H15z"/><path fill-rule="nonzero" d="M12 21h1.5v5H12zM12 31h1.5v5H12zM9 21h1.5v5H9zM9 31h1.5v5H9zM6 31h1.5v5H6zM12 11h1.5v5H12zM12 19h1.5v1H12zM12 29h1.5v1H12zM9 19h1.5v1H9zM9 29h1.5v1H9zM6 29h1.5v1H6zM12 9h1.5v1H12z"/></g></svg>',
|
12691
|
+
'list-num-upper-alpha-rtl': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M39.3 17l-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3zm-1.6-4.7l-.7 2.3h1.6l-.8-2.3zM33.4 17c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm4.7 9.9h-2.7v-6H38c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zm-1.4-5v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4h1.1c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9h-1.1V26zM33 27.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm4.9 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm-4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',
|
12673
12692
|
'list-num-upper-alpha': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M12.6 17l-.5-1.4h-2L9.5 17H8.3l2-6H12l2 6h-1.3zM11 12.3l-.7 2.3h1.6l-.8-2.3zm4.7 4.8c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zM11.4 27H8.7v-6h2.6c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zM10 22v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4H11c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9H10V26zm5.4 1.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-4.1 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',
|
12693
|
+
'list-num-upper-roman-rtl': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M31.6 17v-1.2H33V17h-1.3zm0 10v-1.2H33V27h-1.3zm0 10v-1.2H33V37h-1.3z"/><path fill-rule="nonzero" d="M34.5 20H36v7h-1.5zM34.5 30H36v7h-1.5zM37.5 20H39v7h-1.5zM37.5 30H39v7h-1.5zM40.5 30H42v7h-1.5zM34.5 10H36v7h-1.5z"/></g></svg>',
|
12674
12694
|
'list-num-upper-roman': '<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 17v-1.2h1.3V17H15zm0 10v-1.2h1.3V27H15zm0 10v-1.2h1.3V37H15z"/><path fill-rule="nonzero" d="M12 20h1.5v7H12zM12 30h1.5v7H12zM9 20h1.5v7H9zM9 30h1.5v7H9zM6 30h1.5v7H6zM12 10h1.5v7H12z"/></g></svg>',
|
12675
12695
|
'lock': '<svg width="24" height="24"><path d="M16.3 11c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 0 1-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H8V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h.3zM10 8v3h4V8a1 1 0 0 0-.3-.7A1 1 0 0 0 13 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7z" fill-rule="evenodd"/></svg>',
|
12676
12696
|
'ltr': '<svg width="24" height="24"><path d="M11 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 7.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L11 5zM4.4 16.2L6.2 15l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6z" fill-rule="evenodd"/></svg>',
|
@@ -12679,6 +12699,7 @@
|
|
12679
12699
|
'new-tab': '<svg width="24" height="24"><path d="M15 13l2-2v8H5V7h8l-2 2H7v8h8v-4zm4-8v5.5l-2-2-5.6 5.5H10v-1.4L15.5 7l-2-2H19z" fill-rule="evenodd"/></svg>',
|
12680
12700
|
'non-breaking': '<svg width="24" height="24"><path d="M11 11H8a1 1 0 1 1 0-2h3V6c0-.6.4-1 1-1s1 .4 1 1v3h3c.6 0 1 .4 1 1s-.4 1-1 1h-3v3c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-3zm10 4v5H3v-5c0-.6.4-1 1-1s1 .4 1 1v3h14v-3c0-.6.4-1 1-1s1 .4 1 1z" fill-rule="evenodd"/></svg>',
|
12681
12701
|
'notice': '<svg width="24" height="24"><path d="M17.8 9.8L15.4 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7l2.3 5.8zm0 0l2.2 5.7-2.3-5.8zM13 17v-2h-2v2h2zm0-4V7h-2v6h2z" fill-rule="evenodd"/></svg>',
|
12702
|
+
'ordered-list-rtl': '<svg width="24" height="24"><path d="M6 17h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 1 1 0-2zm13-1v3.5a.5.5 0 1 1-1 0V5h-.5a.5.5 0 1 1 0-1H19zm-1 8.8l.2.2h1.3a.5.5 0 1 1 0 1h-1.6a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2h-1.3a.5.5 0 0 1-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zm2 4.2v2c0 .6-.4 1-1 1h-1.5a.5.5 0 0 1 0-1h1.2a.3.3 0 1 0 0-.6h-1.3a.4.4 0 1 1 0-.8h1.3a.3.3 0 0 0 0-.6h-1.2a.5.5 0 1 1 0-1H19c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',
|
12682
12703
|
'ordered-list': '<svg width="24" height="24"><path d="M10 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 1 1 0-2zM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 0 1-.5-.5V5h-.5a.5.5 0 0 1 0-1H6zm-1 8.8l.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2H4.5a.5.5 0 0 1-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zM7 17v2c0 .6-.4 1-1 1H4.5a.5.5 0 0 1 0-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 1 1 0-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 1 1 0-1H6c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',
|
12683
12704
|
'orientation': '<svg width="24" height="24"><path d="M7.3 6.4L1 13l6.4 6.5 6.5-6.5-6.5-6.5zM3.7 13l3.6-3.7L11 13l-3.7 3.7-3.6-3.7zM12 6l2.8 2.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0L9.2 5.7a.8.8 0 0 1 0-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 1 1-4.3 16.9l1.5-1.5A7 7 0 1 0 13 6h-1z" fill-rule="nonzero"/></svg>',
|
12684
12705
|
'outdent': '<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 1 1 0-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2zm1.6-3.8a1 1 0 0 1-1.2 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 0 1 1.2 1.6L6.8 12l1.8 1.2z" fill-rule="evenodd"/></svg>',
|
@@ -23849,8 +23870,9 @@
|
|
23849
23870
|
}
|
23850
23871
|
editor.quirks = Quirks(editor);
|
23851
23872
|
editor.fire('PostRender');
|
23852
|
-
|
23853
|
-
|
23873
|
+
var directionality = Settings.getDirectionality(editor);
|
23874
|
+
if (directionality !== undefined) {
|
23875
|
+
body.dir = directionality;
|
23854
23876
|
}
|
23855
23877
|
if (settings.protect) {
|
23856
23878
|
editor.on('BeforeSetContent', function (e) {
|
@@ -26773,8 +26795,8 @@
|
|
26773
26795
|
suffix: null,
|
26774
26796
|
$: DomQuery,
|
26775
26797
|
majorVersion: '5',
|
26776
|
-
minorVersion: '0.
|
26777
|
-
releaseDate: '2019-
|
26798
|
+
minorVersion: '0.5',
|
26799
|
+
releaseDate: '2019-05-09',
|
26778
26800
|
editors: legacyEditors,
|
26779
26801
|
i18n: I18n,
|
26780
26802
|
activeEditor: null,
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(){"use strict";var n,t,e,r,u=tinymce.util.Tools.resolve("tinymce.PluginManager"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),O=function(n,t,e){var r="UL"===t?"InsertUnorderedList":"InsertOrderedList";n.execCommand(r,!1,!1===e?null:{"list-style-type":e})},o=function(e){e.addCommand("ApplyUnorderedListStyle",function(n,t){O(e,"UL",t["list-style-type"])}),e.addCommand("ApplyOrderedListStyle",function(n,t){O(e,"OL",t["list-style-type"])})},i=function(n){var t=n.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");return t?t.split(/[ ,]/):[]},l=function(n){var t=n.getParam("advlist_bullet_styles","default,circle,square");return t?t.split(/[ ,]/):[]},c=function(n){return function(){return n}},s=c(!1),f=c(!0),a=s,d=f,g=function(){return p},p=(r={fold:function(n,t){return n()},is:a,isSome:a,isNone:d,getOr:e=function(n){return n},getOrThunk:t=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:e,orThunk:t,map:g,ap:g,each:function(){},bind:g,flatten:g,exists:a,forall:d,filter:g,equals:n=function(n){return n.isNone()},equals_:n,toArray:function(){return[]},toString:c("none()")},Object.freeze&&Object.freeze(r),r),m=function(e){var n=function(){return e},t=function(){return u},r=function(n){return n(e)},u={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:d,isNone:a,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return m(n(e))},ap:function(n){return n.fold(g,function(n){return m(n(e))})},each:function(n){n(e)},bind:r,flatten:n,exists:r,forall:r,filter:function(n){return n(e)?u:p},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(a,function(n){return t(e,n)})},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return u},y=function(n){return null===n||n===undefined?p:m(n)},h=function(n){return n&&/^(TH|TD)$/.test(n.nodeName)},L=function(r){return function(n){return n&&/^(OL|UL|DL)$/.test(n.nodeName)&&(e=n,(t=r).$.contains(t.getBody(),e));var t,e}},N=function(n){var t=n.dom.getParent(n.selection.getNode(),"ol,ul"),e=n.dom.getStyle(t,"listStyleType");return y(e)},S=function(n,t,e){var r=function(n,t){for(var e=0;e<n.length;e++)if(t(n[e]))return e;return-1}(t.parents,h),u=-1!==r?t.parents.slice(0,r):t.parents,o=v.grep(u,L(n));return 0<o.length&&o[0].nodeName===e},T=function(n,t,e,r,u,o){var i,l,c,s,f,a,d,g,p,m,y;0<o.length?(d=t,g=e,p=r,m=u,y=o,(a=n).ui.registry.addSplitButton(d,{tooltip:g,icon:"OL"===m?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:function(n){n(v.map(y,function(n){return{type:"choiceitem",value:"default"===n?"":n,icon:"list-"+("OL"===m?"num":"bull")+"-"+("disc"===n||"decimal"===n?"default":n),text:n.replace(/\-/g," ").replace(/\b\w/g,function(n){return n.toUpperCase()})}}))},onAction:function(){return a.execCommand(p)},onItemAction:function(n,t){O(a,m,t)},select:function(t){return N(a).map(function(n){return t===n}).getOr(!1)},onSetup:function(t){var n=function(n){t.setActive(S(a,n,m))};return a.on("NodeChange",n),function(){return a.off("NodeChange",n)}}})):(l=t,c=e,s=r,f=u,(i=n).ui.registry.addToggleButton(l,{active:!1,tooltip:c,icon:"OL"===f?"ordered-list":"unordered-list",onSetup:function(t){var n=function(n){t.setActive(S(i,n,f))};return i.on("NodeChange",n),function(){return i.off("NodeChange",n)}},onAction:function(){return i.execCommand(s)}}))},b=function(n){T(n,"numlist","Numbered list","InsertOrderedList","OL",i(n)),T(n,"bullist","Bullet list","InsertUnorderedList","UL",l(n))};u.add("advlist",function(n){var t,e,r;e="lists",r=(t=n).settings.plugins?t.settings.plugins:"",-1!==v.inArray(r.split(/[ ,]/),e)&&(b(n),o(n))}),function A(){}}();
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(e){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(e)},t=function(e){var t=e.selection.getNode();return"A"===t.tagName&&""===e.dom.getAttrib(t,"href")?t.getAttribute("id")||t.getAttribute("name"):""},r=function(e,t){var n=e.selection.getNode();"A"===n.tagName&&""===e.dom.getAttrib(n,"href")?(n.removeAttribute("name"),n.id=t,e.undoManager.add()):(e.focus(),e.selection.collapse(!0),e.execCommand("mceInsertContent",!1,e.dom.createHTML("a",{id:t})))},n=function(o){var e=t(o);o.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:e},onSubmit:function(e){var t,n;t=o,n=e.getData().id,(a(n)?(r(t,n),0):(t.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),1))||e.close()}})},o=function(e){e.addCommand("mceAnchor",function(){n(e)})},i=function(o){return function(e){for(var t=0;t<e.length;t++)(n=e[t]).attr("href")||!n.attr("id")&&!n.attr("name")||n.firstChild||e[t].attr("contenteditable",o);var n}},c=function(e){e.on("PreInit",function(){e.parser.addNodeFilter("a",i("false")),e.serializer.addNodeFilter("a",i(null))})},d=function(t){t.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:function(){return t.execCommand("mceAnchor")},onSetup:function(e){return t.selection.selectorChangedWithUnbind("a:not([href])",e.setActive).unbind}}),t.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:function(){return t.execCommand("mceAnchor")}})};e.add("anchor",function(e){c(e),o(e),d(e)}),function u(){}}();
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=tinymce.util.Tools.resolve("tinymce.Env"),m=function(e){return e.getParam("autolink_pattern",/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i)},y=function(e){return e.getParam("default_link_target","")},o=function(e,t){if(t<0&&(t=0),3===e.nodeType){var n=e.data.length;n<t&&(t=n)}return t},k=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setStart(t,o(t,n)):e.setStartBefore(t)},p=function(e,t,n){1!==t.nodeType||t.hasChildNodes()?e.setEnd(t,o(t,n)):e.setEndAfter(t)},r=function(e,t,n){var i,o,r,a,f,s,d,l,c,u,g=m(e),h=y(e);if("A"!==e.selection.getNode().tagName){if((i=e.selection.getRng(!0).cloneRange()).startOffset<5){if(!(l=i.endContainer.previousSibling)){if(!i.endContainer.firstChild||!i.endContainer.firstChild.nextSibling)return;l=i.endContainer.firstChild.nextSibling}if(c=l.length,k(i,l,c),p(i,l,c),i.endOffset<5)return;o=i.endOffset,a=l}else{if(3!==(a=i.endContainer).nodeType&&a.firstChild){for(;3!==a.nodeType&&a.firstChild;)a=a.firstChild;3===a.nodeType&&(k(i,a,0),p(i,a,a.nodeValue.length))}o=1===i.endOffset?2:i.endOffset-1-t}for(r=o;k(i,a,2<=o?o-2:0),p(i,a,1<=o?o-1:0),o-=1," "!==(u=i.toString())&&""!==u&&160!==u.charCodeAt(0)&&0<=o-2&&u!==n;);var C;(C=i.toString())===n||" "===C||160===C.charCodeAt(0)?(k(i,a,o),p(i,a,r),o+=1):(0===i.startOffset?k(i,a,0):k(i,a,o),p(i,a,r)),"."===(s=i.toString()).charAt(s.length-1)&&p(i,a,r-1),(d=(s=i.toString().trim()).match(g))&&("www."===d[1]?d[1]="http://www.":/@$/.test(d[1])&&!/^mailto:/.test(d[1])&&(d[1]="mailto:"+d[1]),f=e.selection.getBookmark(),e.selection.setRng(i),e.execCommand("createlink",!1,d[1]+d[2]),h&&e.dom.setAttrib(e.selection.getNode(),"target",h),e.selection.moveToBookmark(f),e.nodeChanged())}},t=function(t){var n;t.on("keydown",function(e){13!==e.keyCode||r(t,-1,"")}),i.ie?t.on("focus",function(){if(!n){n=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}}):(t.on("keypress",function(e){41!==e.keyCode||r(t,-1,"(")}),t.on("keyup",function(e){32!==e.keyCode||r(t,0,"")}))};e.add("autolink",function(e){t(e)}),function n(){}}();
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
|
-
!function(){"use strict";var i=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return i(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),
|
9
|
+
!function(){"use strict";var i=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return i(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),h=function(e){return e.getParam("min_height",e.getElement().offsetHeight,"number")},v=function(e){return e.getParam("max_height",0,"number")},o=function(e){return e.getParam("autoresize_overflow_padding",1,"number")},y=function(e){return e.getParam("autoresize_bottom_margin",50,"number")},u=function(e){return e.getParam("autoresize_on_init",!0,"boolean")},a=function(e,t,n,i,o){r.setEditorTimeout(e,function(){C(e,t),n--?a(e,t,n,i,o):o&&o()},i)},p=function(e,t){var n=e.getBody();n&&(n.style.overflowY=t?"":"hidden",t||(n.scrollTop=0))},z=function(e,t,n,i){var o=parseInt(e.getStyle(t,n,i),10);return isNaN(o)?0:o},C=function(e,t){var n,i,o,r=e.dom,u=e.getDoc();if(u)if((a=e).plugins.fullscreen&&a.plugins.fullscreen.isFullscreen())p(e,!0);else{var a,s=u.documentElement,c=y(e);i=h(e);var f=z(r,s,"margin-top",!0),g=z(r,s,"margin-bottom",!0);(o=s.offsetHeight+f+g+c)<0&&(o=0);var l=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight;o+l>h(e)&&(i=o+l);var m=v(e);m&&m<i?(i=m,p(e,!0)):p(e,!1),i!==t.get()&&(n=i-t.get(),r.setStyle(e.getContainer(),"height",i+"px"),t.set(i),d.webkit&&n<0&&C(e,t))}},n={setup:function(t,n){t.on("init",function(){var e=o(t);t.dom.setStyles(t.getBody(),{paddingLeft:e,paddingRight:e,"min-height":0})}),t.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",function(e){C(t,n)}),u(t)&&t.on("init",function(){a(t,n,20,100,function(){a(t,n,5,1e3)})})},resize:C},s=function(e,t){e.addCommand("mceAutoResize",function(){n.resize(e,t)})};e.add("autoresize",function(e){if(e.settings.hasOwnProperty("resize")||(e.settings.resize=!1),!e.inline){var t=i(0);s(e,t),n.setup(e,t)}}),function t(){}}();
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(o){"use strict";var a=function(t){var e=t,r=function(){return e};return{get:r,set:function(t){e=t},clone:function(){return a(r())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.Delay"),i=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),u=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=function(t,e){var r=t||e,n=/^(\d+)([ms]?)$/.exec(""+r);return(n[2]?{s:1e3,m:6e4}[n[2]]:1)*parseInt(r,10)},f=function(t){var e=t.getParam("autosave_prefix","tinymce-autosave-{path}{query}{hash}-{id}-");return e=(e=(e=(e=e.replace(/\{path\}/g,o.document.location.pathname)).replace(/\{query\}/g,o.document.location.search)).replace(/\{hash\}/g,o.document.location.hash)).replace(/\{id\}/g,t.id)},c=function(t,e){var r=t.settings.forced_root_block;return""===(e=u.trim(void 0===e?t.getBody().innerHTML:e))||new RegExp("^<"+r+"[^>]*>((\xa0| |[ \t]|<br[^>]*>)+?|)</"+r+">|<br>$","i").test(e)},l=function(t){var e=parseInt(i.getItem(f(t)+"time"),10)||0;return!((new Date).getTime()-e>s(t.settings.autosave_retention,"20m")&&(m(t,!1),1))},m=function(t,e){var r=f(t);i.removeItem(r+"draft"),i.removeItem(r+"time"),!1!==e&&t.fire("RemoveDraft")},v=function(t){var e=f(t);!c(t)&&t.isDirty()&&(i.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),i.setItem(e+"time",(new Date).getTime().toString()),t.fire("StoreDraft"))},d=function(t){var e=f(t);l(t)&&(t.setContent(i.getItem(e+"draft"),{format:"raw"}),t.fire("RestoreDraft"))},g=function(t,e){var r=s(t.settings.autosave_interval,"30s");e.get()||(n.setInterval(function(){t.removed||v(t)},r),e.set(!0))},y=function(t){t.undoManager.transact(function(){d(t),m(t)}),t.focus()};function p(n){for(var o=[],t=1;t<arguments.length;t++)o[t-1]=arguments[t];return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=o.concat(t);return n.apply(null,r)}}var D=tinymce.util.Tools.resolve("tinymce.EditorManager");D._beforeUnloadHandler=function(){var e;return u.each(D.get(),function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&t.getParam("autosave_ask_before_unload",!0)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e};var h=function(r,t){return function(t){t.setDisabled(!l(r));var e=function(){return t.setDisabled(!l(r))};return r.on("StoreDraft RestoreDraft RemoveDraft",e),function(){return r.off("StoreDraft RestoreDraft RemoveDraft",e)}}};t.add("autosave",function(t){var e,r,n=a(!1);return o.window.onbeforeunload=D._beforeUnloadHandler,g(e=t,n),e.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:function(){y(e)},onSetup:h(e)}),e.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:function(){y(e)},onSetup:h(e)}),t.on("init",function(){t.getParam("autosave_restore_when_empty",!1)&&t.dom.isEmpty(t.getBody())&&d(t)}),{hasDraft:p(l,r=t),storeDraft:p(v,r),restoreDraft:p(d,r),removeDraft:p(m,r),isEmpty:p(c,r)}}),function e(){}}(window);
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.Tools"),e=function(e){e=t.trim(e);var o=function(o,t){e=e.replace(o,t)};return o(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),o(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),o(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),o(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),o(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),o(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),o(/<font>(.*?)<\/font>/gi,"$1"),o(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),o(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),o(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),o(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),o(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),o(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),o(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),o(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),o(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),o(/<\/(strong|b)>/gi,"[/b]"),o(/<(strong|b)>/gi,"[b]"),o(/<\/(em|i)>/gi,"[/i]"),o(/<(em|i)>/gi,"[i]"),o(/<\/u>/gi,"[/u]"),o(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),o(/<u>/gi,"[u]"),o(/<blockquote[^>]*>/gi,"[quote]"),o(/<\/blockquote>/gi,"[/quote]"),o(/<br \/>/gi,"\n"),o(/<br\/>/gi,"\n"),o(/<br>/gi,"\n"),o(/<p>/gi,""),o(/<\/p>/gi,"\n"),o(/ |\u00a0/gi," "),o(/"/gi,'"'),o(/</gi,"<"),o(/>/gi,">"),o(/&/gi,"&"),e},i=function(e){e=t.trim(e);var o=function(o,t){e=e.replace(o,t)};return o(/\n/gi,"<br />"),o(/\[b\]/gi,"<strong>"),o(/\[\/b\]/gi,"</strong>"),o(/\[i\]/gi,"<em>"),o(/\[\/i\]/gi,"</em>"),o(/\[u\]/gi,"<u>"),o(/\[\/u\]/gi,"</u>"),o(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),o(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),o(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),o(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),o(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span> '),o(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span> '),e};o.add("bbcode",function(){return{init:function(o){o.on("BeforeSetContent",function(o){o.content=i(o.content)}),o.on("PostProcess",function(o){o.set&&(o.content=i(o.content)),o.get&&(o.content=e(o.content))})}}}),function n(){}}();
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(l){"use strict";var e,n,r,t,a,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(e,n){return e.fire("insertCustomChar",{chr:n})},f=function(e,n){var r=o(e,n).chr;e.execCommand("mceInsertContent",!1,r)},c=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=function(e){return e.settings.charmap},s=function(e){return e.settings.charmap_append},g=function(e){return function(){return e}},m=g(!1),h=g(!0),d=m,p=h,y=function(){return w},w=(t={fold:function(e,n){return e()},is:d,isSome:d,isNone:p,getOr:r=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:r,orThunk:n,map:y,ap:y,each:function(){},bind:y,flatten:y,exists:d,forall:p,filter:y,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:g("none()")},Object.freeze&&Object.freeze(t),t),b=function(r){var e=function(){return r},n=function(){return a},t=function(e){return e(r)},a={fold:function(e,n){return n(r)},is:function(e){return r===e},isSome:p,isNone:d,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return b(e(r))},ap:function(e){return e.fold(y,function(e){return b(e(r))})},each:function(e){e(r)},bind:t,flatten:e,exists:t,forall:t,filter:function(e){return e(r)?a:w},equals:function(e){return e.is(r)},equals_:function(e,n){return e.fold(d,function(e){return n(r,e)})},toArray:function(){return[r]},toString:function(){return"some("+r+")"}};return a},v={some:b,none:y,from:function(e){return null===e||e===undefined?w:b(e)}},k=(a="function",function(e){return function(e){if(null===e)return"null";var n=typeof e;return"object"===n&&Array.prototype.isPrototypeOf(e)?"array":"object"===n&&String.prototype.isPrototypeOf(e)?"string":n}(e)===a}),C=function(e,n){for(var r=e.length,t=new Array(r),a=0;a<r;a++){var i=e[a];t[a]=n(i,a,e)}return t},A=Array.prototype.push,O=function(e,n){return function(e){for(var n=[],r=0,t=e.length;r<t;++r){if(!Array.prototype.isPrototypeOf(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);A.apply(n,e[r])}return n}(C(e,n))},x=(Array.prototype.slice,k(Array.from)&&Array.from,c.isArray),q="User Defined",S=function(e){return x(e)?[].concat((n=e,c.grep(n,function(e){return x(e)&&2===e.length}))):"function"==typeof e?e():[];var n},T=function(e){var n=function(e,n){var r=u(e);r&&(n=[{name:q,characters:S(r)}]);var t=s(e);if(t){var a=c.grep(n,function(e){return e.name===q});return a.length?(a[0].characters=[].concat(a[0].characters).concat(S(t)),n):[].concat(n).concat({name:q,characters:S(t)})}return n}(e,[{name:"Currency",characters:[[36,"dollar sign"],[162,"cent sign"],[8364,"euro sign"],[163,"pound sign"],[165,"yen sign"],[164,"currency sign"],[8352,"euro-currency sign"],[8353,"colon sign"],[8354,"cruzeiro sign"],[8355,"french franc sign"],[8356,"lira sign"],[8357,"mill sign"],[8358,"naira sign"],[8359,"peseta sign"],[8360,"rupee sign"],[8361,"won sign"],[8362,"new sheqel sign"],[8363,"dong sign"],[8365,"kip sign"],[8366,"tugrik sign"],[8367,"drachma sign"],[8368,"german penny symbol"],[8369,"peso sign"],[8370,"guarani sign"],[8371,"austral sign"],[8372,"hryvnia sign"],[8373,"cedi sign"],[8374,"livre tournois sign"],[8375,"spesmilo sign"],[8376,"tenge sign"],[8377,"indian rupee sign"],[8378,"turkish lira sign"],[8379,"nordic mark sign"],[8380,"manat sign"],[8381,"ruble sign"],[20870,"yen character"],[20803,"yuan character"],[22291,"yuan character, in hong kong and taiwan"],[22278,"yen/yuan character variant one"]]},{name:"Text",characters:[[169,"copyright sign"],[174,"registered sign"],[8482,"trade mark sign"],[8240,"per mille sign"],[181,"micro sign"],[183,"middle dot"],[8226,"bullet"],[8230,"three dot leader"],[8242,"minutes / feet"],[8243,"seconds / inches"],[167,"section sign"],[182,"paragraph sign"],[223,"sharp s / ess-zed"]]},{name:"Quotations",characters:[[8249,"single left-pointing angle quotation mark"],[8250,"single right-pointing angle quotation mark"],[171,"left pointing guillemet"],[187,"right pointing guillemet"],[8216,"left single quotation mark"],[8217,"right single quotation mark"],[8220,"left double quotation mark"],[8221,"right double quotation mark"],[8218,"single low-9 quotation mark"],[8222,"double low-9 quotation mark"],[60,"less-than sign"],[62,"greater-than sign"],[8804,"less-than or equal to"],[8805,"greater-than or equal to"],[8211,"en dash"],[8212,"em dash"],[175,"macron"],[8254,"overline"],[164,"currency sign"],[166,"broken bar"],[168,"diaeresis"],[161,"inverted exclamation mark"],[191,"turned question mark"],[710,"circumflex accent"],[732,"small tilde"],[176,"degree sign"],[8722,"minus sign"],[177,"plus-minus sign"],[247,"division sign"],[8260,"fraction slash"],[215,"multiplication sign"],[185,"superscript one"],[178,"superscript two"],[179,"superscript three"],[188,"fraction one quarter"],[189,"fraction one half"],[190,"fraction three quarters"]]},{name:"Mathematical",characters:[[402,"function / florin"],[8747,"integral"],[8721,"n-ary sumation"],[8734,"infinity"],[8730,"square root"],[8764,"similar to"],[8773,"approximately equal to"],[8776,"almost equal to"],[8800,"not equal to"],[8801,"identical to"],[8712,"element of"],[8713,"not an element of"],[8715,"contains as member"],[8719,"n-ary product"],[8743,"logical and"],[8744,"logical or"],[172,"not sign"],[8745,"intersection"],[8746,"union"],[8706,"partial differential"],[8704,"for all"],[8707,"there exists"],[8709,"diameter"],[8711,"backward difference"],[8727,"asterisk operator"],[8733,"proportional to"],[8736,"angle"]]},{name:"Extended Latin",characters:[[192,"A - grave"],[193,"A - acute"],[194,"A - circumflex"],[195,"A - tilde"],[196,"A - diaeresis"],[197,"A - ring above"],[256,"A - macron"],[198,"ligature AE"],[199,"C - cedilla"],[200,"E - grave"],[201,"E - acute"],[202,"E - circumflex"],[203,"E - diaeresis"],[274,"E - macron"],[204,"I - grave"],[205,"I - acute"],[206,"I - circumflex"],[207,"I - diaeresis"],[298,"I - macron"],[208,"ETH"],[209,"N - tilde"],[210,"O - grave"],[211,"O - acute"],[212,"O - circumflex"],[213,"O - tilde"],[214,"O - diaeresis"],[216,"O - slash"],[332,"O - macron"],[338,"ligature OE"],[352,"S - caron"],[217,"U - grave"],[218,"U - acute"],[219,"U - circumflex"],[220,"U - diaeresis"],[362,"U - macron"],[221,"Y - acute"],[376,"Y - diaeresis"],[562,"Y - macron"],[222,"THORN"],[224,"a - grave"],[225,"a - acute"],[226,"a - circumflex"],[227,"a - tilde"],[228,"a - diaeresis"],[229,"a - ring above"],[257,"a - macron"],[230,"ligature ae"],[231,"c - cedilla"],[232,"e - grave"],[233,"e - acute"],[234,"e - circumflex"],[235,"e - diaeresis"],[275,"e - macron"],[236,"i - grave"],[237,"i - acute"],[238,"i - circumflex"],[239,"i - diaeresis"],[299,"i - macron"],[240,"eth"],[241,"n - tilde"],[242,"o - grave"],[243,"o - acute"],[244,"o - circumflex"],[245,"o - tilde"],[246,"o - diaeresis"],[248,"o slash"],[333,"o macron"],[339,"ligature oe"],[353,"s - caron"],[249,"u - grave"],[250,"u - acute"],[251,"u - circumflex"],[252,"u - diaeresis"],[363,"u - macron"],[253,"y - acute"],[254,"thorn"],[255,"y - diaeresis"],[563,"y - macron"],[913,"Alpha"],[914,"Beta"],[915,"Gamma"],[916,"Delta"],[917,"Epsilon"],[918,"Zeta"],[919,"Eta"],[920,"Theta"],[921,"Iota"],[922,"Kappa"],[923,"Lambda"],[924,"Mu"],[925,"Nu"],[926,"Xi"],[927,"Omicron"],[928,"Pi"],[929,"Rho"],[931,"Sigma"],[932,"Tau"],[933,"Upsilon"],[934,"Phi"],[935,"Chi"],[936,"Psi"],[937,"Omega"],[945,"alpha"],[946,"beta"],[947,"gamma"],[948,"delta"],[949,"epsilon"],[950,"zeta"],[951,"eta"],[952,"theta"],[953,"iota"],[954,"kappa"],[955,"lambda"],[956,"mu"],[957,"nu"],[958,"xi"],[959,"omicron"],[960,"pi"],[961,"rho"],[962,"final sigma"],[963,"sigma"],[964,"tau"],[965,"upsilon"],[966,"phi"],[967,"chi"],[968,"psi"],[969,"omega"]]},{name:"Symbols",characters:[[8501,"alef symbol"],[982,"pi symbol"],[8476,"real part symbol"],[978,"upsilon - hook symbol"],[8472,"Weierstrass p"],[8465,"imaginary part"]]},{name:"Arrows",characters:[[8592,"leftwards arrow"],[8593,"upwards arrow"],[8594,"rightwards arrow"],[8595,"downwards arrow"],[8596,"left right arrow"],[8629,"carriage return"],[8656,"leftwards double arrow"],[8657,"upwards double arrow"],[8658,"rightwards double arrow"],[8659,"downwards double arrow"],[8660,"left right double arrow"],[8756,"therefore"],[8834,"subset of"],[8835,"superset of"],[8836,"not a subset of"],[8838,"subset of or equal to"],[8839,"superset of or equal to"],[8853,"circled plus"],[8855,"circled times"],[8869,"perpendicular"],[8901,"dot operator"],[8968,"left ceiling"],[8969,"right ceiling"],[8970,"left floor"],[8971,"right floor"],[9001,"left-pointing angle bracket"],[9002,"right-pointing angle bracket"],[9674,"lozenge"],[9824,"black spade suit"],[9827,"black club suit"],[9829,"black heart suit"],[9830,"black diamond suit"],[8194,"en space"],[8195,"em space"],[8201,"thin space"],[8204,"zero width non-joiner"],[8205,"zero width joiner"],[8206,"left-to-right mark"],[8207,"right-to-left mark"]]}]);return 1<n.length?[{name:"All",characters:O(n,function(e){return e.characters})}].concat(n):n},E=function(n){return{getCharMap:function(){return T(n)},insertChar:function(e){f(n,e)}}},z=function(e){var n=e,r=function(){return n};return{get:r,set:function(e){n=e},clone:function(){return z(r())}}},U=function(e,n){return-1!==e.indexOf(n)},D=function(e,n){var a=[],i=n.toLowerCase();return function(e,n){for(var r=0,t=e.length;r<t;r++)n(e[r],r,e)}(e.characters,function(e){var n,r,t;n=e[0],r=e[1],t=i,(U(String.fromCharCode(n).toLowerCase(),t)||U(r.toLowerCase(),t)||U(r.toLowerCase().replace(/\s+/g,""),t))&&a.push(e)}),C(a,function(e){return{text:e[1],value:String.fromCharCode(e[0]),icon:String.fromCharCode(e[0])}})},I="pattern",N=function(r,e){var t,a,i,n=function(){return[{label:"Search",type:"input",name:I},{type:"collection",name:"results"}]},o=1===e.length?z(q):z("All"),c=function(r,t){(function(e,n){for(var r=0,t=e.length;r<t;r++){var a=e[r];if(n(a,r,e))return v.some(a)}return v.none()})(e,function(e){return e.name===o.get()}).each(function(e){var n=D(e,t);r.setData({results:n})})},u=(t=function(e){var n=e.getData().pattern;c(e,n)},a=40,i=null,{cancel:function(){null!==i&&(l.clearTimeout(i),i=null)},throttle:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];null!==i&&l.clearTimeout(i),i=l.setTimeout(function(){t.apply(null,e),i=null},a)}}),s={title:"Special Character",size:"normal",body:1===e.length?{type:"panel",items:n()}:{type:"tabpanel",tabs:C(e,function(e){return{title:e.name,items:n()}})},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{pattern:"",results:D(e[0],"")},onAction:function(e,n){"results"===n.name&&(f(r,n.value),e.close())},onTabChange:function(e,n){o.set(n),u.throttle(e)},onChange:function(e,n){n.name===I&&u.throttle(e)}};r.windowManager.open(s)},P=function(e,n){e.addCommand("mceShowCharmap",function(){N(e,n)})},j=tinymce.util.Tools.resolve("tinymce.util.Promise"),L=function(e){e.ui.registry.addButton("charmap",{icon:"insert-character",tooltip:"Special character",onAction:function(){return e.execCommand("mceShowCharmap")}}),e.ui.registry.addMenuItem("charmap",{icon:"insert-character",text:"Special character...",onAction:function(){return e.execCommand("mceShowCharmap")}})};i.add("charmap",function(e){var t,a,n=T(e);return P(e,n),L(e),t=e,a=n[0],t.ui.registry.addAutocompleter("charmap",{ch:":",columns:"auto",minChars:2,fetch:function(r,e){return new j(function(e,n){e(D(a,r))})},onAction:function(e,n,r){t.selection.setRng(n),t.insertContent(r),e.hide()}}),E(e)}),function M(){}}(window);
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e,n){e.focus(),e.undoManager.transact(function(){e.setContent(n)}),e.selection.setCursorLocation(),e.nodeChanged()},o=function(e){return e.getContent({source_view:!0})},n=function(n){var e=o(n);n.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:e},onSubmit:function(e){t(n,e.getData().code),e.close()}})},c=function(e){e.addCommand("mceCodeEditor",function(){n(e)})},i=function(e){e.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:function(){return n(e)}}),e.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:function(){return n(e)}})};e.add("code",function(e){return c(e),i(e),{}}),function u(){}}();
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(c){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),t={},n=t,g=void 0!==t?t:"undefined"!=typeof WorkerGlobalScope&&c.self instanceof WorkerGlobalScope?c.self:{},i=function(){var u=/\blang(?:uage)?-(?!\*)(\w+)\b/i,S=g.Prism={util:{encode:function(e){return e instanceof s?new s(e.type,S.util.encode(e.content),e.alias):"Array"===S.util.type(e)?e.map(S.util.encode):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){switch(S.util.type(e)){case"Object":var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=S.util.clone(e[n]));return t;case"Array":return e.map&&e.map(function(e){return S.util.clone(e)})}return e}},languages:{extend:function(e,t){var n=S.util.clone(S.languages[e]);for(var a in t)n[a]=t[a];return n},insertBefore:function(n,e,t,a){var r=(a=a||S.languages)[n];if(2===arguments.length){for(var i in t=e)t.hasOwnProperty(i)&&(r[i]=t[i]);return r}var o={};for(var s in r)if(r.hasOwnProperty(s)){if(s===e)for(var i in t)t.hasOwnProperty(i)&&(o[i]=t[i]);o[s]=r[s]}return S.languages.DFS(S.languages,function(e,t){t===a[n]&&e!==n&&(this[e]=o)}),a[n]=o},DFS:function(e,t,n){for(var a in e)e.hasOwnProperty(a)&&(t.call(e,a,e[a],n||a),"Object"===S.util.type(e[a])?S.languages.DFS(e[a],t):"Array"===S.util.type(e[a])&&S.languages.DFS(e[a],t,a))}},plugins:{},highlightAll:function(e,t){for(var n=c.document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'),a=0,r=void 0;r=n[a++];)S.highlightElement(r,!0===e,t)},highlightElement:function(e,t,n){for(var a,r,i=e;i&&!u.test(i.className);)i=i.parentNode;i&&(a=(i.className.match(u)||[,""])[1],r=S.languages[a]),e.className=e.className.replace(u,"").replace(/\s+/g," ")+" language-"+a,i=e.parentNode,/pre/i.test(i.nodeName)&&(i.className=i.className.replace(u,"").replace(/\s+/g," ")+" language-"+a);var o=e.textContent,s={element:e,language:a,grammar:r,code:o};if(o&&r)if(S.hooks.run("before-highlight",s),t&&g.Worker){var l=new c.Worker(S.filename);l.onmessage=function(e){s.highlightedCode=e.data,S.hooks.run("before-insert",s),s.element.innerHTML=s.highlightedCode,n&&n.call(s.element),S.hooks.run("after-highlight",s),S.hooks.run("complete",s)},l.postMessage(JSON.stringify({language:s.language,code:s.code,immediateClose:!0}))}else s.highlightedCode=S.highlight(s.code,s.grammar,s.language),S.hooks.run("before-insert",s),s.element.innerHTML=s.highlightedCode,n&&n.call(e),S.hooks.run("after-highlight",s),S.hooks.run("complete",s);else S.hooks.run("complete",s)},highlight:function(e,t,n){var a=S.tokenize(e,t);return s.stringify(S.util.encode(a),n)},tokenize:function(e,t,n){var a=S.Token,r=[e],i=t.rest;if(i){for(var o in i)t[o]=i[o];delete t.rest}e:for(var o in t)if(t.hasOwnProperty(o)&&t[o]){var s=t[o];s="Array"===S.util.type(s)?s:[s];for(var l=0;l<s.length;++l){var u=s[l],c=u.inside,g=!!u.lookbehind,d=0,p=u.alias;u=u.pattern||u;for(var f=0;f<r.length;f++){var h=r[f];if(r.length>e.length)break e;if(!(h instanceof a)){u.lastIndex=0;var m=u.exec(h);if(m){g&&(d=m[1].length);var b=m.index-1+d,y=b+(m=m[0].slice(d)).length,v=h.slice(0,b+1),k=h.slice(y+1),w=[f,1];v&&w.push(v);var x=new a(o,c?S.tokenize(m,c):m,p);w.push(x),k&&w.push(k),Array.prototype.splice.apply(r,w)}}}}}return r},hooks:{all:{},add:function(e,t){var n=S.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=S.hooks.all[e];if(n&&n.length)for(var a=0,r=void 0;r=n[a++];)r(t)}}},s=S.Token=function(e,t,n){this.type=e,this.content=t,this.alias=n};if(s.stringify=function(t,n,e){if("string"==typeof t)return t;if("Array"===S.util.type(t))return t.map(function(e){return s.stringify(e,n,t)}).join("");var a={type:t.type,content:s.stringify(t.content,n,e),tag:"span",classes:["token",t.type],attributes:{},language:n,parent:e};if("comment"===a.type&&(a.attributes.spellcheck="true"),t.alias){var r="Array"===S.util.type(t.alias)?t.alias:[t.alias];Array.prototype.push.apply(a.classes,r)}S.hooks.run("wrap",a);var i="";for(var o in a.attributes)i+=(i?" ":"")+o+'="'+(a.attributes[o]||"")+'"';return"<"+a.tag+' class="'+a.classes.join(" ")+'" '+i+">"+a.content+"</"+a.tag+">"},!g.document)return g.addEventListener&&g.addEventListener("message",function(e){var t=JSON.parse(e.data),n=t.language,a=t.code,r=t.immediateClose;g.postMessage(S.highlight(a,S.languages[n],n)),r&&g.close()},!1),g.Prism}();void 0!==n&&(n.Prism=i),i.languages.markup={comment:/<!--[\w\W]*?-->/,prolog:/<\?[\w\W]+?\?>/,doctype:/<!DOCTYPE[\w\W]+?>/,cdata:/<!\[CDATA\[[\w\W]*?]]>/i,tag:{pattern:/<\/?[^\s>\/=.]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:('|")[\w\W]*?(\1)|[^\s>]+)/i,inside:{punctuation:/[=>"']/}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},i.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),i.languages.xml=i.languages.markup,i.languages.html=i.languages.markup,i.languages.mathml=i.languages.markup,i.languages.svg=i.languages.markup,i.languages.css={comment:/\/\*[\w\W]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^\{\}\s][^\{\};]*?(?=\s*\{)/,string:/("|')(\\(?:\r\n|[\w\W])|(?!\1)[^\\\r\n])*\1/,property:/(\b|\B)[\w-]+(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},i.languages.css.atrule.inside.rest=i.util.clone(i.languages.css),i.languages.markup&&(i.languages.insertBefore("markup","tag",{style:{pattern:/<style[\w\W]*?>[\w\W]*?<\/style>/i,inside:{tag:{pattern:/<style[\w\W]*?>|<\/style>/i,inside:i.languages.markup.tag.inside},rest:i.languages.css},alias:"language-css"}}),i.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|').*?\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:i.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:i.languages.css}},alias:"language-css"}},i.languages.markup.tag)),i.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\w\W]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[a-z0-9_\.\\]+/i,lookbehind:!0,inside:{punctuation:/(\.|\\)/}},keyword:/\b(if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},i.languages.javascript=i.languages.extend("clike",{keyword:/\b(as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/,number:/\b-?(0x[\dA-Fa-f]+|0b[01]+|0o[0-7]+|\d*\.?\d+([Ee][+-]?\d+)?|NaN|Infinity)\b/,"function":/[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*(?=\()/i}),i.languages.insertBefore("javascript","keyword",{regex:{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\\\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}}),i.languages.insertBefore("javascript","class-name",{"template-string":{pattern:/`(?:\\`|\\?[^`])*`/,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:i.languages.javascript}},string:/[\s\S]+/}}}),i.languages.markup&&i.languages.insertBefore("markup","tag",{script:{pattern:/<script[\w\W]*?>[\w\W]*?<\/script>/i,inside:{tag:{pattern:/<script[\w\W]*?>|<\/script>/i,inside:i.languages.markup.tag.inside},rest:i.languages.javascript},alias:"language-javascript"}}),i.languages.js=i.languages.javascript,i.languages.c=i.languages.extend("clike",{keyword:/\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/\-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*\/]/,number:/\b-?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)[ful]*\b/i}),i.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+([^\r\n\\]|\\.|\\(?:\r\n?|\n))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(<.+?>|("|')(\\?.)+?\3)/,lookbehind:!0}}}}),delete i.languages.c["class-name"],delete i.languages.c["boolean"],i.languages.csharp=i.languages.extend("clike",{keyword:/\b(abstract|as|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|async|await|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b/,string:[/@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,/("|')(\\?.)*?\1/],number:/\b-?(0x[\da-f]+|\d*\.?\d+)\b/i}),i.languages.insertBefore("csharp","keyword",{preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0}}),i.languages.cpp=i.languages.extend("c",{keyword:/\b(alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,"boolean":/\b(true|false)\b/,operator:/[-+]{1,2}|!=?|<{1,2}=?|>{1,2}=?|\->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|?\||\?|\*|\/|\b(and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/}),i.languages.insertBefore("cpp","keyword",{"class-name":{pattern:/(class\s+)[a-z0-9_]+/i,lookbehind:!0}}),i.languages.java=i.languages.extend("clike",{keyword:/\b(abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp\-]+\b|\b\d*\.?\d+(?:e[+-]?\d+)?[df]?\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<<?=?|>>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,lookbehind:!0}}),i.languages.php=i.languages.extend("clike",{keyword:/\b(and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,constant:/\b[A-Z0-9_]{2,}\b/,comment:{pattern:/(^|[^\\])(?:\/\*[\w\W]*?\*\/|\/\/.*)/,lookbehind:!0}}),i.languages.insertBefore("php","class-name",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),i.languages.insertBefore("php","keyword",{delimiter:/\?>|<\?(?:php)?/i,variable:/\$\w+\b/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),i.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}}),i.languages.markup&&(i.hooks.add("before-highlight",function(t){"php"===t.language&&(t.tokenStack=[],t.backupCode=t.code,t.code=t.code.replace(/(?:<\?php|<\?)[\w\W]*?(?:\?>)/gi,function(e){return t.tokenStack.push(e),"{{{PHP"+t.tokenStack.length+"}}}"}))}),i.hooks.add("before-insert",function(e){"php"===e.language&&(e.code=e.backupCode,delete e.backupCode)}),i.hooks.add("after-highlight",function(e){if("php"===e.language){for(var t=0,n=void 0;n=e.tokenStack[t];t++)e.highlightedCode=e.highlightedCode.replace("{{{PHP"+(t+1)+"}}}",i.highlight(n,e.grammar,"php").replace(/\$/g,"$$$$"));e.element.innerHTML=e.highlightedCode}}),i.hooks.add("wrap",function(e){"php"===e.language&&"markup"===e.type&&(e.content=e.content.replace(/(\{\{\{PHP[0-9]+\}\}\})/g,'<span class="token php">$1</span>'))}),i.languages.insertBefore("php","comment",{markup:{pattern:/<[^?]\/?(.*?)>/,inside:i.languages.markup},php:/\{\{\{PHP[0-9]+\}\}\}/})),i.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/"""[\s\S]+?"""|'''[\s\S]+?'''|("|')(?:\\?.)*?\1/,"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_][a-zA-Z0-9_]*(?=\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)[a-z0-9_]+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/,"boolean":/\b(?:True|False)\b/,number:/\b-?(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/},function(e){e.languages.ruby=e.languages.extend("clike",{comment:/#(?!\{[^\r\n]*?\}).*/,keyword:/\b(alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var t={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.util.clone(e.languages.ruby)}};e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1[gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,inside:{interpolation:t}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,inside:{interpolation:t}},{pattern:/(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0}],variable:/[@$]+[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/,symbol:/:[a-zA-Z_][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.insertBefore("ruby","number",{builtin:/\b(Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|File|Fixnum|Fload|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z][a-zA-Z_0-9]*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s\{\(\[<])(?:[^\\]|\\[\s\S])*?\1/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,inside:{interpolation:t}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,inside:{interpolation:t}},{pattern:/("|')(#\{[^}]+\}|\\(?:\r?\n|\r)|\\?.)*?\1/,inside:{interpolation:t}}]}(i);var a,o,s,l,u,d={isCodeSample:function B(e){return e&&"PRE"===e.nodeName&&-1!==e.className.indexOf("language-")},trimArg:function M(n){return function(e,t){return n(t)}}},p=function(e){return function(){return e}},f=p(!1),h=p(!0),m=f,b=h,y=function(){return v},v=(l={fold:function(e,t){return e()},is:m,isSome:m,isNone:b,getOr:s=function(e){return e},getOrThunk:o=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:s,orThunk:o,map:y,ap:y,each:function(){},bind:y,flatten:y,exists:m,forall:b,filter:y,equals:a=function(e){return e.isNone()},equals_:a,toArray:function(){return[]},toString:p("none()")},Object.freeze&&Object.freeze(l),l),k=function(n){var e=function(){return n},t=function(){return r},a=function(e){return e(n)},r={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:b,isNone:m,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return k(e(n))},ap:function(e){return e.fold(y,function(e){return k(e(n))})},each:function(e){e(n)},bind:a,flatten:e,exists:a,forall:a,filter:function(e){return e(n)?r:v},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(m,function(e){return t(n,e)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return r},w={some:k,none:y,from:function(e){return null===e||e===undefined?v:k(e)}},x=function(e){var t=e.selection?e.selection.getNode():null;return d.isCodeSample(t)?w.some(t):w.none()},S=x,C=function(t,n,a){t.undoManager.transact(function(){var e=x(t);return a=r.DOM.encode(a),e.fold(function(){t.insertContent('<pre id="__new" class="language-'+n+'">'+a+"</pre>"),t.selection.select(t.$("#__new").removeAttr("id")[0])},function(e){t.dom.setAttrib(e,"class","language-"+n),e.innerHTML=a,i.highlightElement(e),t.selection.select(e)})})},A=function(e){return x(e).fold(function(){return""},function(e){return e.textContent})},_=function(e){return e.settings.codesample_languages},N=function(e){var t=_(e);return t||[{text:"HTML/XML",value:"markup"},{text:"JavaScript",value:"javascript"},{text:"CSS",value:"css"},{text:"PHP",value:"php"},{text:"Ruby",value:"ruby"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C",value:"c"},{text:"C#",value:"csharp"},{text:"C++",value:"cpp"}]},O=function(e,n){return S(e).fold(function(){return n},function(e){var t=e.className.match(/language-(\w+)/);return t?t[1]:n})},z=(u="function",function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(e)===u}),P=(Array.prototype.slice,z(Array.from)&&Array.from,function(n){var e,t=N(n),a=(e=t,0===e.length?w.none():w.some(e[0])).fold(function(){return""},function(e){return e.value}),r=O(n,a),i=A(n);n.windowManager.open({title:"Insert/Edit Code Sample",size:"large",body:{type:"panel",items:[{type:"selectbox",name:"language",label:"Language",items:t},{type:"textarea",name:"code",label:"Code view"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{language:r,code:i},onSubmit:function(e){var t=e.getData();C(n,t.language,t.code),e.close()}})}),W=function(t){t.addCommand("codesample",function(){var e=t.selection.getNode();t.selection.isCollapsed()||d.isCodeSample(e)?P(t):t.formatter.toggle("code")})},j=function(n){var r=n.$;n.on("PreProcess",function(e){r("pre[contenteditable=false]",e.node).filter(d.trimArg(d.isCodeSample)).each(function(e,t){var n=r(t),a=t.textContent;n.attr("class",r.trim(n.attr("class"))),n.removeAttr("contentEditable"),n.empty().append(r("<code></code>").each(function(){this.textContent=a}))})}),n.on("SetContent",function(){var e=r("pre").filter(d.trimArg(d.isCodeSample)).filter(function(e,t){return"false"!==t.contentEditable});e.length&&n.undoManager.transact(function(){e.each(function(e,t){r(t).find("br").each(function(e,t){t.parentNode.replaceChild(n.getDoc().createTextNode("\n"),t)}),t.contentEditable="false",t.innerHTML=n.dom.encode(t.textContent),i.highlightElement(t),t.className=r.trim(t.className)})})})},T=function(a){a.ui.registry.addToggleButton("codesample",{icon:"code-sample",tooltip:"Insert/edit code sample",onAction:function(){return P(a)},onSetup:function(n){var e=function(){var e,t;n.setActive((t=(e=a).selection.getStart(),e.dom.is(t,"pre.language-markup")))};return a.on("NodeChange",e),function(){return a.off("NodeChange",e)}}}),a.ui.registry.addMenuItem("codesample",{text:"Code sample...",icon:"code-sample",onAction:function(){return P(a)}})};e.add("codesample",function(t,e){j(t),T(t),W(t),t.on("dblclick",function(e){d.isCodeSample(e.target)&&P(t)})}),function F(){}}(window);
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(o){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("colorpicker",function(){o.console.warn("Color picker plugin is now built in to the core editor, please remove it from your editor configuration")}),function i(){}}(window);
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(n){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("contextmenu",function(){n.console.warn("Context menu plugin is now built in to the core editor, please remove it from your editor configuration")}),function o(){}}(window);
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(c){"use strict";var n,t,e,r,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.Tools"),i=function(n,t){var e,r=n.dom,o=n.selection.getSelectedBlocks();o.length&&(e=r.getAttrib(o[0],"dir"),u.each(o,function(n){r.getParent(n.parentNode,'*[dir="'+t+'"]',r.getRoot())||r.setAttrib(n,"dir",e!==t?t:null)}),n.nodeChanged())},f=function(n){n.addCommand("mceDirectionLTR",function(){i(n,"ltr")}),n.addCommand("mceDirectionRTL",function(){i(n,"rtl")})},d=function(n){return function(){return n}},l=d(!1),a=d(!0),N=l,m=a,s=function(){return T},T=(r={fold:function(n,t){return n()},is:N,isSome:N,isNone:m,getOr:e=function(n){return n},getOrThunk:t=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:e,orThunk:t,map:s,ap:s,each:function(){},bind:s,flatten:s,exists:N,forall:m,filter:s,equals:n=function(n){return n.isNone()},equals_:n,toArray:function(){return[]},toString:d("none()")},Object.freeze&&Object.freeze(r),r),g=function(e){var n=function(){return e},t=function(){return o},r=function(n){return n(e)},o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:m,isNone:N,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return g(n(e))},ap:function(n){return n.fold(s,function(n){return g(n(e))})},each:function(n){n(e)},bind:r,flatten:n,exists:r,forall:r,filter:function(n){return n(e)?o:T},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(N,function(n){return t(e,n)})},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},O=function(n){return null===n||n===undefined?T:g(n)},E=function(n){if(null===n||n===undefined)throw new Error("Node cannot be null or undefined");return{dom:d(n)}},y={fromHtml:function(n,t){var e=(t||c.document).createElement("div");if(e.innerHTML=n,!e.hasChildNodes()||1<e.childNodes.length)throw c.console.error("HTML does not have a single root node",n),new Error("HTML must have a single root node");return E(e.childNodes[0])},fromTag:function(n,t){var e=(t||c.document).createElement(n);return E(e)},fromText:function(n,t){var e=(t||c.document).createTextNode(n);return E(e)},fromDom:E,fromPoint:function(n,t,e){var r=n.dom();return O(r.elementFromPoint(t,e)).map(E)}},D=function(t){return function(n){return function(n){if(null===n)return"null";var t=typeof n;return"object"===t&&Array.prototype.isPrototypeOf(n)?"array":"object"===t&&String.prototype.isPrototypeOf(n)?"string":t}(n)===t}},p=(D("string"),D("boolean"),D("function")),h=(D("number"),Array.prototype.slice,p(Array.from)&&Array.from,Object.keys,function(n){return n.style!==undefined}),_=(c.Node.ATTRIBUTE_NODE,c.Node.CDATA_SECTION_NODE,c.Node.COMMENT_NODE,c.Node.DOCUMENT_NODE,c.Node.DOCUMENT_TYPE_NODE,c.Node.DOCUMENT_FRAGMENT_NODE,c.Node.ELEMENT_NODE),C=c.Node.TEXT_NODE,v=(c.Node.PROCESSING_INSTRUCTION_NODE,c.Node.ENTITY_REFERENCE_NODE,c.Node.ENTITY_NODE,c.Node.NOTATION_NODE,function(t){return function(n){return n.dom().nodeType===t}}),A=(v(_),v(C)),b=function(n,t){var e,r,o=n.dom(),u=c.window.getComputedStyle(o).getPropertyValue(t),i=""!==u||(r=A(e=n)?e.dom().parentNode:e.dom())!==undefined&&null!==r&&r.ownerDocument.body.contains(r)?u:S(o,t);return null===i?undefined:i},S=function(n,t){return h(n)?n.style.getPropertyValue(t):""},R=function(t,r){return function(e){var n=function(n){var t=y.fromDom(n.element);e.setActive(("rtl"===b(t,"direction")?"rtl":"ltr")===r)};return t.on("NodeChange",n),function(){return t.off("NodeChange",n)}}},w=function(n){n.ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:function(){return n.execCommand("mceDirectionLTR")},onSetup:R(n,"ltr")}),n.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:function(){return n.execCommand("mceDirectionRTL")},onSetup:R(n,"rtl")})};o.add("directionality",function(n){f(n),w(n)}),function M(){}}(window);
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
|
-
!function(d){"use strict";var n,t,e,r,o,u,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t]},a=function(n){return function(){return n}},l=function(n){return n},f=a(!1),s=a(!0),m=f,g=s,y=function(){return p},p=(r={fold:function(n,t){return n()},is:m,isSome:m,isNone:g,getOr:e=function(n){return n},getOrThunk:t=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:e,orThunk:t,map:y,ap:y,each:function(){},bind:y,flatten:y,exists:m,forall:g,filter:y,equals:n=function(n){return n.isNone()},equals_:n,toArray:function(){return[]},toString:a("none()")},Object.freeze&&Object.freeze(r),r),h=function(e){var n=function(){return e},t=function(){return o},r=function(n){return n(e)},o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:g,isNone:m,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return h(n(e))},ap:function(n){return n.fold(y,function(n){return h(n(e))})},each:function(n){n(e)},bind:r,flatten:n,exists:r,forall:r,filter:function(n){return n(e)?o:p},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(m,function(n){return t(e,n)})},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},v={some:h,none:y,from:function(n){return null===n||n===undefined?p:h(n)}},O=(o="function",function(n){return function(n){if(null===n)return"null";var t=typeof n;return"object"===t&&Array.prototype.isPrototypeOf(n)?"array":"object"===t&&String.prototype.isPrototypeOf(n)?"string":t}(n)===o}),b=function(n,t){for(var e=0,r=n.length;e<r;e++)if(t(n[e],e,n))return v.some(e);return v.none()},w=(Array.prototype.slice,O(Array.from)&&Array.from,function(n,t){return-1!==n.indexOf(t)}),k=function(n,t){return w(n.title.toLowerCase(),t)||(e=n.keywords,b(e,function(n){return w(n.toLowerCase(),t)}).isSome());var e},A=function(n,t,e){for(var r=[],o=t.toLowerCase(),i=e.fold(function(){return f},function(t){return function(n){return t<=n}}),u=0;u<n.length&&(0!==t.length&&!k(n[u],o)||(r.push({value:n[u]["char"],text:n[u].title,icon:n[u]["char"]}),!i(r.length)));u++);return r},j=function(n){var t=n,e=function(){return t};return{get:e,set:function(n){t=n},clone:function(){return j(e())}}},C="undefined"!=typeof d.window?d.window:Function("return this;")(),T=Object.keys,S=Object.hasOwnProperty,_=function(n,t){for(var e=T(n),r=0,o=e.length;r<o;r++){var i=e[r];t(n[i],i,n)}},x=function(r,o){var i={};return _(r,function(n,t){var e=o(n,t,r);i[e.k]=e.v}),i},D=function(e){return{is:function(n){return e===n},isValue:s,isError:f,getOr:a(e),getOrThunk:a(e),getOrDie:a(e),or:function(n){return D(e)},orThunk:function(n){return D(e)},fold:function(n,t){return t(e)},map:function(n){return D(n(e))},mapError:function(n){return D(e)},each:function(n){n(e)},bind:function(n){return n(e)},exists:function(n){return n(e)},forall:function(n){return n(e)},toOption:function(){return v.some(e)}}},L=function(e){return{is:f,isValue:f,isError:s,getOr:l,getOrThunk:function(n){return n()},getOrDie:function(){return n=String(e),function(){throw new Error(n)}();var n},or:function(n){return n},orThunk:function(n){return n()},fold:function(n,t){return n(e)},map:function(n){return L(e)},mapError:function(n){return L(n(e))},each:c,bind:function(n){return L(e)},exists:f,forall:s,toOption:v.none}},E={value:D,error:L},P=Object.prototype.hasOwnProperty,F=(u=function(n,t){return t},function(){for(var n=new Array(arguments.length),t=0;t<n.length;t++)n[t]=arguments[t];if(0===n.length)throw new Error("Can't merge zero objects");for(var e={},r=0;r<n.length;r++){var o=n[r];for(var i in o)P.call(o,i)&&(e[i]=u(e[i],o[i]))}return e}),N=tinymce.util.Tools.resolve("tinymce.dom.ScriptLoader"),q=tinymce.util.Tools.resolve("tinymce.util.Promise"),z=tinymce.util.Tools.resolve("tinymce.util.Delay"),I=function(n,t){return n.getParam("emoticons_database_url",t+"/js/emojis"+n.suffix+".js")},U=function(n){return n.getParam("emoticons_append",{},"object")},M="All",R={symbols:"Symbols",people:"People",animals_and_nature:"Animals and Nature",food_and_drink:"Food and Drink",activity:"Activity",travel_and_places:"Travel and Places",objects:"Objects",flags:"Flags",user:"User Defined"},V="emoticons_plugin_database",B=function(n,t){return e=n,r=t,S.call(e,r)?n[t]:t;var e,r},G=function(n){var r,t=U(n);return r=function(n){return F({keywords:[],category:"user"},n)},x(t,function(n,t,e){return{k:t,v:r(n,t,e)}})},H=function(r,o){var u=j(v.none()),c=j(v.none());r.on("init",function(){N.ScriptLoader.loadScript(o,function(){(function(n){if(C.tinymce[V]){var t=E.value(C.tinymce[V]);return delete C.tinymce[V],t}return E.error("URL "+n+" did not contain the expected format for emoticons")})(o).fold(function(n){d.console.log(n),u.set(v.some({})),c.set(v.some([]))},function(n){var t,o,i,e=G(r);t=F(n,e),o={},i=[],_(t,function(n,t){var e={title:t,keywords:n.keywords,"char":n["char"],category:B(R,n.category)},r=o[e.category]!==undefined?o[e.category]:[];o[e.category]=r.concat([e]),i.push(e)}),u.set(v.some(o)),c.set(v.some(i))})},function(){})});var n=function(){return c.get().getOr([])},i=function(){return u.get().isSome()&&c.get().isSome()};return{listCategories:function(){return[M].concat(T(u.get().getOr({})))},hasLoaded:i,waitForLoad:function(){return i()?q.resolve(!0):new q(function(n,t){var e=3,r=z.setInterval(function(){i()?(z.clearInterval(r),n(!0)):--e<0&&(d.console.log("Could not load emojis from url: "+o),z.clearInterval(r),t(!1))},500)})},listAll:n,listCategory:function(t){return t===M?n():u.get().bind(function(n){return v.from(n[t])}).getOr([])}}},J="pattern",K=function(o,c){var e,r,i,n={pattern:"",results:A(c.listAll(),"",v.some(300))},u=(e=function(n){var t,e,r,o,i,u=a.get();e=u,r=(t=n).getData(),o=c.listCategory(e),i=A(o,r[J],e===M?v.some(300):v.none()),t.setData({results:i})},r=200,i=null,{cancel:function(){null!==i&&(d.clearTimeout(i),i=null)},throttle:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];null!==i&&d.clearTimeout(i),i=d.setTimeout(function(){e.apply(null,n),i=null},r)}}),a=j(M),t={label:"Search",type:"input",name:J},l={type:"collection",name:"results"},f=function(){return{title:"Emoticons",size:"normal",body:{type:"tabpanel",tabs:function(n,t){for(var e=n.length,r=new Array(e),o=0;o<e;o++){var i=n[o];r[o]=t(i,o,n)}return r}(c.listCategories(),function(n){return{title:n,items:[t,l]}})},initialData:n,onTabChange:function(n,t){a.set(t),u.throttle(n)},onChange:u.throttle,onAction:function(n,t){var e,r;"results"===t.name&&(e=o,r=t.value,e.insertContent(r),n.close())},buttons:[{type:"cancel",text:"Close",primary:!0}]}},s=o.windowManager.open(f());s.focus(J),c.hasLoaded()||(s.block("Loading emoticons..."),c.waitForLoad().then(function(){s.redial(f()),u.throttle(s),s.focus(J),s.unblock()})["catch"](function(n){s.redial({title:"Emoticons",body:{type:"panel",items:[{type:"alertbanner",level:"error",icon:"warning",text:"<p>Could not load emoticons</p>"}]},buttons:[{type:"cancel",text:"Close",primary:!0}],initialData:{pattern:"",results:[]}}),s.focus(J),s.unblock()}))},Q=function(n,t){var e=function(){return K(n,t)};n.ui.registry.addButton("emoticons",{tooltip:"Emoticons",icon:"emoji",onAction:e}),n.ui.registry.addMenuItem("emoticons",{text:"Emoticons...",icon:"emoji",onAction:e})};i.add("emoticons",function(n,t){var r,o,e=I(n,t),i=H(n,e);Q(n,i),o=i,(r=n).ui.registry.addAutocompleter("emoticons",{ch:":",columns:"auto",minChars:2,fetch:function(t,e){return o.waitForLoad().then(function(){var n=o.listAll();return A(n,t,v.some(e))})},onAction:function(n,t,e){r.selection.setRng(t),r.insertContent(e),n.hide()}})}),function W(){}}(window);
|
9
|
+
!function(d){"use strict";var n,t,e,r,o,u,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t]},a=function(n){return function(){return n}},l=function(n){return n},f=a(!1),s=a(!0),m=f,g=s,y=function(){return p},p=(r={fold:function(n,t){return n()},is:m,isSome:m,isNone:g,getOr:e=function(n){return n},getOrThunk:t=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:e,orThunk:t,map:y,ap:y,each:function(){},bind:y,flatten:y,exists:m,forall:g,filter:y,equals:n=function(n){return n.isNone()},equals_:n,toArray:function(){return[]},toString:a("none()")},Object.freeze&&Object.freeze(r),r),h=function(e){var n=function(){return e},t=function(){return o},r=function(n){return n(e)},o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:g,isNone:m,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return h(n(e))},ap:function(n){return n.fold(y,function(n){return h(n(e))})},each:function(n){n(e)},bind:r,flatten:n,exists:r,forall:r,filter:function(n){return n(e)?o:p},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(m,function(n){return t(e,n)})},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},v={some:h,none:y,from:function(n){return null===n||n===undefined?p:h(n)}},O=(o="function",function(n){return function(n){if(null===n)return"null";var t=typeof n;return"object"===t&&Array.prototype.isPrototypeOf(n)?"array":"object"===t&&String.prototype.isPrototypeOf(n)?"string":t}(n)===o}),b=function(n,t){for(var e=0,r=n.length;e<r;e++)if(t(n[e],e,n))return v.some(e);return v.none()},w=(Array.prototype.slice,O(Array.from)&&Array.from,function(n,t){return-1!==n.indexOf(t)}),k=function(n,t){return w(n.title.toLowerCase(),t)||(e=n.keywords,b(e,function(n){return w(n.toLowerCase(),t)}).isSome());var e},A=function(n,t,e){for(var r=[],o=t.toLowerCase(),i=e.fold(function(){return f},function(t){return function(n){return t<=n}}),u=0;u<n.length&&(0!==t.length&&!k(n[u],o)||(r.push({value:n[u]["char"],text:n[u].title,icon:n[u]["char"]}),!i(r.length)));u++);return r},j=function(n){var t=n,e=function(){return t};return{get:e,set:function(n){t=n},clone:function(){return j(e())}}},C="undefined"!=typeof d.window?d.window:Function("return this;")(),T=Object.keys,S=Object.hasOwnProperty,_=function(n,t){for(var e=T(n),r=0,o=e.length;r<o;r++){var i=e[r];t(n[i],i,n)}},x=function(r,o){var i={};return _(r,function(n,t){var e=o(n,t,r);i[e.k]=e.v}),i},D=function(e){return{is:function(n){return e===n},isValue:s,isError:f,getOr:a(e),getOrThunk:a(e),getOrDie:a(e),or:function(n){return D(e)},orThunk:function(n){return D(e)},fold:function(n,t){return t(e)},map:function(n){return D(n(e))},mapError:function(n){return D(e)},each:function(n){n(e)},bind:function(n){return n(e)},exists:function(n){return n(e)},forall:function(n){return n(e)},toOption:function(){return v.some(e)}}},L=function(e){return{is:f,isValue:f,isError:s,getOr:l,getOrThunk:function(n){return n()},getOrDie:function(){return n=String(e),function(){throw new Error(n)}();var n},or:function(n){return n},orThunk:function(n){return n()},fold:function(n,t){return n(e)},map:function(n){return L(e)},mapError:function(n){return L(n(e))},each:c,bind:function(n){return L(e)},exists:f,forall:s,toOption:v.none}},E={value:D,error:L,fromOption:function(n,t){return n.fold(function(){return L(t)},D)}},P=Object.prototype.hasOwnProperty,F=(u=function(n,t){return t},function(){for(var n=new Array(arguments.length),t=0;t<n.length;t++)n[t]=arguments[t];if(0===n.length)throw new Error("Can't merge zero objects");for(var e={},r=0;r<n.length;r++){var o=n[r];for(var i in o)P.call(o,i)&&(e[i]=u(e[i],o[i]))}return e}),N=tinymce.util.Tools.resolve("tinymce.dom.ScriptLoader"),q=tinymce.util.Tools.resolve("tinymce.util.Promise"),z=tinymce.util.Tools.resolve("tinymce.util.Delay"),I=function(n,t){return n.getParam("emoticons_database_url",t+"/js/emojis"+n.suffix+".js")},U=function(n){return n.getParam("emoticons_append",{},"object")},M="All",R={symbols:"Symbols",people:"People",animals_and_nature:"Animals and Nature",food_and_drink:"Food and Drink",activity:"Activity",travel_and_places:"Travel and Places",objects:"Objects",flags:"Flags",user:"User Defined"},V="emoticons_plugin_database",B=function(n,t){return e=n,r=t,S.call(e,r)?n[t]:t;var e,r},G=function(n){var r,t=U(n);return r=function(n){return F({keywords:[],category:"user"},n)},x(t,function(n,t,e){return{k:t,v:r(n,t,e)}})},H=function(r,o){var u=j(v.none()),c=j(v.none());r.on("init",function(){N.ScriptLoader.loadScript(o,function(){(function(n){if(C.tinymce[V]){var t=E.value(C.tinymce[V]);return delete C.tinymce[V],t}return E.error("URL "+n+" did not contain the expected format for emoticons")})(o).fold(function(n){d.console.log(n),u.set(v.some({})),c.set(v.some([]))},function(n){var t,o,i,e=G(r);t=F(n,e),o={},i=[],_(t,function(n,t){var e={title:t,keywords:n.keywords,"char":n["char"],category:B(R,n.category)},r=o[e.category]!==undefined?o[e.category]:[];o[e.category]=r.concat([e]),i.push(e)}),u.set(v.some(o)),c.set(v.some(i))})},function(){})});var n=function(){return c.get().getOr([])},i=function(){return u.get().isSome()&&c.get().isSome()};return{listCategories:function(){return[M].concat(T(u.get().getOr({})))},hasLoaded:i,waitForLoad:function(){return i()?q.resolve(!0):new q(function(n,t){var e=3,r=z.setInterval(function(){i()?(z.clearInterval(r),n(!0)):--e<0&&(d.console.log("Could not load emojis from url: "+o),z.clearInterval(r),t(!1))},500)})},listAll:n,listCategory:function(t){return t===M?n():u.get().bind(function(n){return v.from(n[t])}).getOr([])}}},J="pattern",K=function(o,c){var e,r,i,n={pattern:"",results:A(c.listAll(),"",v.some(300))},u=(e=function(n){var t,e,r,o,i,u=a.get();e=u,r=(t=n).getData(),o=c.listCategory(e),i=A(o,r[J],e===M?v.some(300):v.none()),t.setData({results:i})},r=200,i=null,{cancel:function(){null!==i&&(d.clearTimeout(i),i=null)},throttle:function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];null!==i&&d.clearTimeout(i),i=d.setTimeout(function(){e.apply(null,n),i=null},r)}}),a=j(M),t={label:"Search",type:"input",name:J},l={type:"collection",name:"results"},f=function(){return{title:"Emoticons",size:"normal",body:{type:"tabpanel",tabs:function(n,t){for(var e=n.length,r=new Array(e),o=0;o<e;o++){var i=n[o];r[o]=t(i,o,n)}return r}(c.listCategories(),function(n){return{title:n,items:[t,l]}})},initialData:n,onTabChange:function(n,t){a.set(t),u.throttle(n)},onChange:u.throttle,onAction:function(n,t){var e,r;"results"===t.name&&(e=o,r=t.value,e.insertContent(r),n.close())},buttons:[{type:"cancel",text:"Close",primary:!0}]}},s=o.windowManager.open(f());s.focus(J),c.hasLoaded()||(s.block("Loading emoticons..."),c.waitForLoad().then(function(){s.redial(f()),u.throttle(s),s.focus(J),s.unblock()})["catch"](function(n){s.redial({title:"Emoticons",body:{type:"panel",items:[{type:"alertbanner",level:"error",icon:"warning",text:"<p>Could not load emoticons</p>"}]},buttons:[{type:"cancel",text:"Close",primary:!0}],initialData:{pattern:"",results:[]}}),s.focus(J),s.unblock()}))},Q=function(n,t){var e=function(){return K(n,t)};n.ui.registry.addButton("emoticons",{tooltip:"Emoticons",icon:"emoji",onAction:e}),n.ui.registry.addMenuItem("emoticons",{text:"Emoticons...",icon:"emoji",onAction:e})};i.add("emoticons",function(n,t){var r,o,e=I(n,t),i=H(n,e);Q(n,i),o=i,(r=n).ui.registry.addAutocompleter("emoticons",{ch:":",columns:"auto",minChars:2,fetch:function(t,e){return o.waitForLoad().then(function(){var n=o.listAll();return A(n,t,v.some(e))})},onAction:function(n,t,e){r.selection.setRng(t),r.insertContent(e),n.hide()}})}),function W(){}}(window);
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(m){"use strict";var o,i=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return i(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),g=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=tinymce.util.Tools.resolve("tinymce.html.DomParser"),f=tinymce.util.Tools.resolve("tinymce.html.Node"),p=tinymce.util.Tools.resolve("tinymce.html.Serializer"),h=function(e){return e.getParam("fullpage_hide_in_source_view")},l=function(e){return e.getParam("fullpage_default_xml_pi")},a=function(e){return e.getParam("fullpage_default_encoding")},c=function(e){return e.getParam("fullpage_default_font_family")},s=function(e){return e.getParam("fullpage_default_font_size")},u=function(e){return e.getParam("fullpage_default_text_color")},d=function(e){return e.getParam("fullpage_default_title")},y=function(e){return e.getParam("fullpage_default_doctype","<!DOCTYPE html>")},v=function(e){return t({validate:!1,root_name:"#document"}).parse(e)},_=v,n=function(e,t){var n,i,r=v(t),l={};function o(e,t){return e.attr(t)||""}return l.fontface=c(e),l.fontsize=s(e),7===(n=r.firstChild).type&&(l.xml_pi=!0,(i=/encoding="([^"]+)"/.exec(n.value))&&(l.docencoding=i[1])),(n=r.getAll("#doctype")[0])&&(l.doctype="<!DOCTYPE"+n.value+">"),(n=r.getAll("title")[0])&&n.firstChild&&(l.title=n.firstChild.value),g.each(r.getAll("meta"),function(e){var t,n=e.attr("name"),i=e.attr("http-equiv");n?l[n.toLowerCase()]=e.attr("content"):"Content-Type"===i&&(t=/charset\s*=\s*(.*)\s*/gi.exec(e.attr("content")))&&(l.docencoding=t[1])}),(n=r.getAll("html")[0])&&(l.langcode=o(n,"lang")||o(n,"xml:lang")),l.stylesheets=[],g.each(r.getAll("link"),function(e){"stylesheet"===e.attr("rel")&&l.stylesheets.push(e.attr("href"))}),(n=r.getAll("body")[0])&&(l.langdir=o(n,"dir"),l.style=o(n,"style"),l.visited_color=o(n,"vlink"),l.link_color=o(n,"link"),l.active_color=o(n,"alink")),l},b=function(e,l,t){var o,n,i,a,r,c=e.dom;function s(e,t,n){e.attr(t,n||undefined)}function u(e){n.firstChild?n.insert(e,n.firstChild):n.append(e)}o=v(t),(n=o.getAll("head")[0])||(a=o.getAll("html")[0],n=new f("head",1),a.firstChild?a.insert(n,a.firstChild,!0):a.append(n)),a=o.firstChild,l.xml_pi?(r='version="1.0"',l.docencoding&&(r+=' encoding="'+l.docencoding+'"'),7!==a.type&&(a=new f("xml",7),o.insert(a,o.firstChild,!0)),a.value=r):a&&7===a.type&&a.remove(),a=o.getAll("#doctype")[0],l.doctype?(a||(a=new f("#doctype",10),l.xml_pi?o.insert(a,o.firstChild):u(a)),a.value=l.doctype.substring(9,l.doctype.length-1)):a&&a.remove(),a=null,g.each(o.getAll("meta"),function(e){"Content-Type"===e.attr("http-equiv")&&(a=e)}),l.docencoding?(a||((a=new f("meta",1)).attr("http-equiv","Content-Type"),a.shortEnded=!0,u(a)),a.attr("content","text/html; charset="+l.docencoding)):a&&a.remove(),a=o.getAll("title")[0],l.title?(a?a.empty():u(a=new f("title",1)),a.append(new f("#text",3)).value=l.title):a&&a.remove(),g.each("keywords,description,author,copyright,robots".split(","),function(e){var t,n,i=o.getAll("meta"),r=l[e];for(t=0;t<i.length;t++)if((n=i[t]).attr("name")===e)return void(r?n.attr("content",r):n.remove());r&&((a=new f("meta",1)).attr("name",e),a.attr("content",r),a.shortEnded=!0,u(a))});var d={};return g.each(o.getAll("link"),function(e){"stylesheet"===e.attr("rel")&&(d[e.attr("href")]=e)}),g.each(l.stylesheets,function(e){d[e]||((a=new f("link",1)).attr({rel:"stylesheet",text:"text/css",href:e}),a.shortEnded=!0,u(a)),delete d[e]}),g.each(d,function(e){e.remove()}),(a=o.getAll("body")[0])&&(s(a,"dir",l.langdir),s(a,"style",l.style),s(a,"vlink",l.visited_color),s(a,"link",l.link_color),s(a,"alink",l.active_color),c.setAttribs(e.getBody(),{style:l.style,dir:l.dir,vLink:l.visited_color,link:l.link_color,aLink:l.active_color})),(a=o.getAll("html")[0])&&(s(a,"lang",l.langcode),s(a,"xml:lang",l.langcode)),n.firstChild||n.remove(),(i=p({validate:!1,indent:!0,indent_before:"head,html,body,meta,title,script,link,style",indent_after:"head,html,body,meta,title,script,link,style"}).serialize(o)).substring(0,i.indexOf("</body>"))},x=Object.prototype.hasOwnProperty,C=(o=function(e,t){return t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},i=0;i<e.length;i++){var r=e[i];for(var l in r)x.call(r,l)&&(n[l]=o(n[l],r[l]))}return n}),r=function(i,r){var l=n(i,r.get()),e=C({title:"",keywords:"",description:"",robots:"",author:"",docencoding:""},l);i.windowManager.open({title:"Metadata and Document Properties",size:"normal",body:{type:"panel",items:[{name:"title",type:"input",label:"Title"},{name:"keywords",type:"input",label:"Keywords"},{name:"description",type:"input",label:"Description"},{name:"robots",type:"input",label:"Robots"},{name:"author",type:"input",label:"Author"},{name:"docencoding",type:"input",label:"Encoding"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:e,onSubmit:function(e){var t=e.getData(),n=b(i,g.extend(l,t),r.get());r.set(n),e.close()}})},k=function(e,t){e.addCommand("mceFullPageProperties",function(){r(e,t)})},w=function(e,t){return g.each(e,function(e){t=t.replace(e,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})}),t},A=function(e){return e.replace(/<!--mce:protected ([\s\S]*?)-->/g,function(e,t){return unescape(t)})},P=g.each,T=function(e){return e.replace(/<\/?[A-Z]+/g,function(e){return e.toLowerCase()})},O=function(e){var t,n="",i="";if(l(e)){var r=a(e);n+='<?xml version="1.0" encoding="'+(r||"ISO-8859-1")+'" ?>\n'}return n+=y(e),n+="\n<html>\n<head>\n",(t=d(e))&&(n+="<title>"+t+"</title>\n"),(t=a(e))&&(n+='<meta http-equiv="Content-Type" content="text/html; charset='+t+'" />\n'),(t=c(e))&&(i+="font-family: "+t+";"),(t=s(e))&&(i+="font-size: "+t+";"),(t=u(e))&&(i+="color: "+t+";"),n+="</head>\n<body"+(i?' style="'+i+'"':"")+">\n"},D=function(l,o,a){l.on("BeforeSetContent",function(e){!function(e,t,n,i){var r,l,o,a,c="",s=e.dom;if(!(i.selection||(o=w(e.settings.protect,i.content),"raw"===i.format&&t.get()||i.source_view&&h(e)))){0!==o.length||i.source_view||(o=g.trim(t.get())+"\n"+g.trim(o)+"\n"+g.trim(n.get())),-1!==(r=(o=o.replace(/<(\/?)BODY/gi,"<$1body")).indexOf("<body"))?(r=o.indexOf(">",r),t.set(T(o.substring(0,r+1))),-1===(l=o.indexOf("</body",r))&&(l=o.length),i.content=g.trim(o.substring(r+1,l)),n.set(T(o.substring(l)))):(t.set(O(e)),n.set("\n</body>\n</html>")),a=_(t.get()),P(a.getAll("style"),function(e){e.firstChild&&(c+=e.firstChild.value)});var u=a.getAll("body")[0];u&&s.setAttribs(e.getBody(),{style:u.attr("style")||"",dir:u.attr("dir")||"",vLink:u.attr("vlink")||"",link:u.attr("link")||"",aLink:u.attr("alink")||""}),s.remove("fullpage_styles");var d=e.getDoc().getElementsByTagName("head")[0];c&&s.add(d,"style",{id:"fullpage_styles"}).appendChild(m.document.createTextNode(c));var f={};g.each(d.getElementsByTagName("link"),function(e){"stylesheet"===e.rel&&e.getAttribute("data-mce-fullpage")&&(f[e.href]=e)}),g.each(a.getAll("link"),function(e){var t=e.attr("href");if(!t)return!0;f[t]||"stylesheet"!==e.attr("rel")||s.add(d,"link",{rel:"stylesheet",text:"text/css",href:t,"data-mce-fullpage":"1"}),delete f[t]}),g.each(f,function(e){e.parentNode.removeChild(e)})}}(l,o,a,e)}),l.on("GetContent",function(e){var t,n,i,r;t=l,n=o.get(),i=a.get(),(r=e).selection||r.source_view&&h(t)||(r.content=A(g.trim(n)+"\n"+g.trim(r.content)+"\n"+g.trim(i)))})},E=function(e){e.ui.registry.addButton("fullpage",{tooltip:"Metadata and document properties",icon:"document-properties",onAction:function(){e.execCommand("mceFullPageProperties")}}),e.ui.registry.addMenuItem("fullpage",{text:"Metadata and document properties",icon:"document-properties",onAction:function(){e.execCommand("mceFullPageProperties")}})};e.add("fullpage",function(e){var t=i(""),n=i("");k(e,t),E(e),D(e,t,n)}),function z(){}}(window);
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(g){"use strict";var i=function(e){var n=e,t=function(){return n};return{get:t,set:function(e){n=e},clone:function(){return i(t())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){return{isFullscreen:function(){return null!==e.get()}}},n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),m=function(e,n){e.fire("FullscreenStateChanged",{state:n})},w=n.DOM,r=function(e,n){var t,r,o,i,l,c,u=g.document.body,s=g.document.documentElement,d=n.get(),a=function(){var e,n,t,i;w.setStyle(o,"height",(t=g.window,i=g.document.body,i.offsetWidth&&(e=i.offsetWidth,n=i.offsetHeight),t.innerWidth&&t.innerHeight&&(e=t.innerWidth,n=t.innerHeight),{w:e,h:n}).h-(r.clientHeight-o.clientHeight))},f=function(){w.unbind(g.window,"resize",a)};if(t=(r=e.getContainer()).style,i=(o=e.getContentAreaContainer().firstChild).style,d)i.width=d.iframeWidth,i.height=d.iframeHeight,d.containerWidth&&(t.width=d.containerWidth),d.containerHeight&&(t.height=d.containerHeight),w.removeClass(u,"tox-fullscreen"),w.removeClass(s,"tox-fullscreen"),w.removeClass(r,"tox-fullscreen"),l=d.scrollPos,g.window.scrollTo(l.x,l.y),w.unbind(g.window,"resize",d.resizeHandler),e.off("remove",d.removeHandler),n.set(null),m(e,!1);else{var h={scrollPos:(c=w.getViewPort(),{x:c.x,y:c.y}),containerWidth:t.width,containerHeight:t.height,iframeWidth:i.width,iframeHeight:i.height,resizeHandler:a,removeHandler:f};i.width=i.height="100%",t.width=t.height="",w.addClass(u,"tox-fullscreen"),w.addClass(s,"tox-fullscreen"),w.addClass(r,"tox-fullscreen"),w.bind(g.window,"resize",a),e.on("remove",f),a(),n.set(h),m(e,!0)}},o=function(e,n){e.addCommand("mceFullScreen",function(){r(e,n)})},l=function(t,i){return function(n){n.setActive(null!==i.get());var e=function(e){return n.setActive(e.state)};return t.on("FullscreenStateChanged",e),function(){return t.off("FullscreenStateChanged",e)}}},c=function(e,n){e.ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Meta+Shift+F",onAction:function(){return e.execCommand("mceFullScreen")},onSetup:l(e,n)}),e.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:function(){return e.execCommand("mceFullScreen")},onSetup:l(e,n)})};e.add("fullscreen",function(e){var n=i(null);return e.settings.inline||(o(e,n),c(e,n),e.addShortcut("Meta+Shift+F","","mceFullScreen")),t(n)}),function u(){}}(window);
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(e){return function(){return e}};function d(r){for(var a=[],e=1;e<arguments.length;e++)a[e-1]=arguments[e];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=a.concat(e);return r.apply(null,n)}}var n,r,a,o,i,c,u=t(!1),s=t(!0),l=u,m=s,f=function(){return p},p=(o={fold:function(e,t){return e()},is:l,isSome:l,isNone:m,getOr:a=function(e){return e},getOrThunk:r=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:a,orThunk:r,map:f,ap:f,each:function(){},bind:f,flatten:f,exists:l,forall:m,filter:f,equals:n=function(e){return e.isNone()},equals_:n,toArray:function(){return[]},toString:t("none()")},Object.freeze&&Object.freeze(o),o),y=function(n){var e=function(){return n},t=function(){return a},r=function(e){return e(n)},a={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:m,isNone:l,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return y(e(n))},ap:function(e){return e.fold(f,function(e){return y(e(n))})},each:function(e){e(n)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){return e(n)?a:p},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(l,function(e){return t(n,e)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return a},h={some:y,none:f,from:function(e){return null===e||e===undefined?p:y(e)}},k=(i="function",function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(e)===i}),g=(c=Array.prototype.indexOf)===undefined?function(e,t){return A(e,t)}:function(e,t){return c.call(e,t)},v=function(e,t){return-1<g(e,t)},b=function(e,t){for(var n=e.length,r=new Array(n),a=0;a<n;a++){var o=e[a];r[a]=t(o,a,e)}return r},A=function(e,t){for(var n=0,r=e.length;n<r;++n)if(e[n]===t)return n;return-1},C=(Array.prototype.slice,k(Array.from)&&Array.from,[{shortcuts:["Meta + B"],action:"Bold"},{shortcuts:["Meta + I"],action:"Italic"},{shortcuts:["Meta + U"],action:"Underline"},{shortcuts:["Meta + A"],action:"Select all"},{shortcuts:["Meta + Y","Meta + Shift + Z"],action:"Redo"},{shortcuts:["Meta + Z"],action:"Undo"},{shortcuts:["Access + 1"],action:"Header 1"},{shortcuts:["Access + 2"],action:"Header 2"},{shortcuts:["Access + 3"],action:"Header 3"},{shortcuts:["Access + 4"],action:"Header 4"},{shortcuts:["Access + 5"],action:"Header 5"},{shortcuts:["Access + 6"],action:"Header 6"},{shortcuts:["Access + 7"],action:"Paragraph"},{shortcuts:["Access + 8"],action:"Div"},{shortcuts:["Access + 9"],action:"Address"},{shortcuts:["Alt + 0"],action:"Open help dialog"},{shortcuts:["Alt + F9"],action:"Focus to menubar"},{shortcuts:["Alt + F10"],action:"Focus to toolbar"},{shortcuts:["Alt + F11"],action:"Focus to element path"},{shortcuts:["Ctrl + F9"],action:"Focus to contextual toolbar"},{shortcuts:["Shift + Enter"],action:"Open popup menu for split buttons"},{shortcuts:["Meta + K"],action:"Insert link (if link plugin activated)"},{shortcuts:["Meta + S"],action:"Save (if save plugin activated)"},{shortcuts:["Meta + F"],action:"Find (if searchreplace plugin activated)"},{shortcuts:["Meta + Shift + F"],action:"Switch to or from fullscreen mode"}]),P=Object.keys,M=Object.hasOwnProperty,S=tinymce.util.Tools.resolve("tinymce.Env"),O=function(e){var a=S.mac?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl ",access:"Shift + Alt "},t=e.split("+"),n=b(t,function(e){var t,n,r=e.toLowerCase().trim();return t=a,n=r,M.call(t,n)?a[r]:e});return S.mac?n.join("").replace(/\s/,""):n.join("+")},w=function(){return{title:"Handy Shortcuts",items:[{type:"table",header:["Action","Shortcut"],cells:b(C,function(e){var t=b(e.shortcuts,O).join(" or ");return[e.action,t]})}]}},T=function(e,a){return e.replace(/\$\{([^{}]*)\}/g,function(e,t){var n,r=a[t];return"string"==(n=typeof r)||"number"===n?r.toString():e})},x=tinymce.util.Tools.resolve("tinymce.util.I18n"),_=[{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"bbcode",name:"BBCode"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullpage",name:"Full Page"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"hr",name:"Horizontal Rule"},{key:"image",name:"Image"},{key:"imagetools",name:"Image Tools"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"legacyoutput",name:"Legacy Output"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"noneditable",name:"Noneditable"},{key:"pagebreak",name:"Page Break"},{key:"paste",name:"Paste"},{key:"preview",name:"Preview"},{key:"print",name:"Print"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"spellchecker",name:"Spell Checker"},{key:"tabfocus",name:"Tab Focus"},{key:"table",name:"Table"},{key:"template",name:"Template"},{key:"textcolor",name:"Text Color"},{key:"textpattern",name:"Text Pattern"},{key:"toc",name:"Table of Contents"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"},{key:"advcode",name:"Advanced Code Editor*"},{key:"formatpainter",name:"Format Painter*"},{key:"powerpaste",name:"PowerPaste*"},{key:"tinydrive",name:"Tiny Drive*"},{key:"tinymcespellchecker",name:"Spell Checker Pro*"},{key:"a11ychecker",name:"Accessibility Checker*"},{key:"linkchecker",name:"Link Checker*"},{key:"mentions",name:"Mentions*"},{key:"mediaembed",name:"Enhanced Media Embed*"},{key:"checklist",name:"Checklist*"},{key:"casechange",name:"Case Change*"},{key:"permanentpen",name:"Permanent Pen*"},{key:"pageembed",name:"Page Embed*"},{key:"tinycomments",name:"Tiny Comments*"}],F=function(e){var t,n,r,a,o,i,c,u,s,l,m=d(T,'<a href="${url}" target="_blank" rel="noopener">${name}</a>'),f=function(t,n){return function(e,t){for(var n=0,r=e.length;n<r;n++){var a=e[n];if(t(a,n,e))return h.some(a)}return h.none()}(_,function(e){return e.key===n}).fold(function(){var e=t.plugins[n].getMetadata;return"function"==typeof e?m(e()):n},function(e){return m({name:e.name,url:"https://www.tiny.cloud/docs/plugins/"+e.key})})};return{title:"Plugins",items:[{type:"htmlpanel",presets:"document",html:[(n=e,null==n?"":'<div data-mce-tabstop="1" tabindex="-1">'+(r=n,i=P((a=r).plugins),c=a.settings.forced_plugins===undefined?i:function(e,t){for(var n=[],r=0,a=e.length;r<a;r++){var o=e[r];t(o,r,e)&&n.push(o)}return n}(i,(o=d(v,a.settings.forced_plugins),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!o.apply(null,e)})),u=b(c,function(e){return"<li>"+f(r,e)+"</li>"}),s=u.length,l=u.join(""),"<p><b>"+x.translate(["Plugins installed ({0}):",s])+"</b></p><ul>"+l+"</ul>")+"</div>"),(t=b(["Accessibility Checker","Advanced Code Editor","Case Change","Checklist","Tiny Comments","Tiny Drive","Enhanced Media Embed","Format Painter","Link Checker","Mentions","MoxieManager","Page Embed","Permanent Pen","PowerPaste","Spell Checker Pro"],function(e){return"<li>"+x.translate(e)+"</li>"}).join(""),'<div data-mce-tabstop="1" tabindex="-1"><p><b>'+x.translate("Premium plugins:")+"</b></p><ul>"+t+'<li style="list-style: none; margin-top: 1em;"><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">'+x.translate("Learn more...")+"</a></li></ul></div>")].join("")}]}},E=tinymce.util.Tools.resolve("tinymce.EditorManager"),H=function(){var e,t,n='<a href="https://www.tinymce.com/docs/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" target="_blank">TinyMCE '+(e=E.majorVersion,t=E.minorVersion,0===e.indexOf("@")?"X.X.X":e+"."+t)+"</a>";return{type:"htmlpanel",html:"<p>"+x.translate(["You are using {0}",n])+"</p>",presets:"document"}},j=function(e){return e.getParam("help_version",H,"function")()},D=function(e){return{title:"Version",items:[j(e)]}},I=function(t){return function(){var e={type:"tabpanel",tabs:[w(),F(t),D(t)]};t.windowManager.open({title:"Help",size:"medium",body:e,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})}},L=function(e){e.addCommand("mceHelp",I(e))},B=function(e){e.ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:I(e)}),e.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:I(e)})};e.add("help",function(e){B(e),L(e),e.shortcuts.add("Alt+0","Open help dialog","mceHelp")}),function N(){}}();
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(n){n.addCommand("InsertHorizontalRule",function(){n.execCommand("mceInsertContent",!1,"<hr />")})},t=function(n){n.ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:function(){return n.execCommand("InsertHorizontalRule")}}),n.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:function(){return n.execCommand("InsertHorizontalRule")}})};n.add("hr",function(n){o(n),t(n)}),function e(){}}();
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
|
-
!function(s){"use strict";var e,n,t,r,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n]},h=function(e){return function(){return e}},a=function(e){return e},u=h(!1),c=h(!0),l=u,f=c,d=function(){return m},m=(r={fold:function(e,n){return e()},is:l,isSome:l,isNone:f,getOr:t=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:t,orThunk:n,map:d,ap:d,each:function(){},bind:d,flatten:d,exists:l,forall:f,filter:d,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:h("none()")},Object.freeze&&Object.freeze(r),r),g=function(t){var e=function(){return t},n=function(){return i},r=function(e){return e(t)},i={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:f,isNone:l,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return g(e(t))},ap:function(e){return e.fold(d,function(e){return g(e(t))})},each:function(e){e(t)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){return e(t)?i:m},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(l,function(e){return n(t,e)})},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return i},y={some:g,none:d,from:function(e){return null===e||e===undefined?m:g(e)}},p=function(n){return function(e){return function(e){if(null===e)return"null";var n=typeof e;return"object"===n&&Array.prototype.isPrototypeOf(e)?"array":"object"===n&&String.prototype.isPrototypeOf(e)?"string":n}(e)===n}},w=p("string"),v=p("object"),b=p("function"),O=p("number"),S=function(e,n){for(var t=0,r=e.length;t<r;t++)n(e[t],t,e)},N=Array.prototype.push,x=function(e){for(var n=[],t=0,r=e.length;t<r;++t){if(!Array.prototype.isPrototypeOf(e[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+e);N.apply(n,e[t])}return n},T=(Array.prototype.slice,b(Array.from)&&Array.from,function(){return(T=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e}).apply(this,arguments)}),E=function(e){var t=y.none(),n=[],r=function(e){i()?a(e):n.push(e)},i=function(){return t.isSome()},o=function(e){S(e,a)},a=function(n){t.each(function(e){s.setTimeout(function(){n(e)},0)})};return e(function(e){t=y.some(e),o(n),n=[]}),{get:r,map:function(t){return E(function(n){r(function(e){n(t(e))})})},isReady:i}},D={nu:E,pure:function(n){return E(function(e){e(n)})}},A=function(n){var e=function(e){var r;n((r=e,function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=this;s.setTimeout(function(){r.apply(t,e)},0)}))},t=function(){return D.nu(e)};return{map:function(r){return A(function(t){e(function(e){var n=r(e);t(n)})})},bind:function(t){return A(function(n){e(function(e){t(e).get(n)})})},anonBind:function(t){return A(function(n){e(function(e){t.get(n)})})},toLazy:t,toCached:function(){var n=null;return A(function(e){null===n&&(n=t()),n.get(e)})},get:e}},C={nu:A,pure:function(n){return A(function(e){e(n)})}},_=function(t){return{is:function(e){return t===e},isValue:c,isError:u,getOr:h(t),getOrThunk:h(t),getOrDie:h(t),or:function(e){return _(t)},orThunk:function(e){return _(t)},fold:function(e,n){return n(t)},map:function(e){return _(e(t))},mapError:function(e){return _(t)},each:function(e){e(t)},bind:function(e){return e(t)},exists:function(e){return e(t)},forall:function(e){return e(t)},toOption:function(){return y.some(t)}}},I=function(t){return{is:u,isValue:u,isError:c,getOr:a,getOrThunk:function(e){return e()},getOrDie:function(){return e=String(t),function(){throw new Error(e)}();var e},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,n){return e(t)},map:function(e){return I(t)},mapError:function(e){return I(e(t))},each:o,bind:function(e){return I(t)},exists:u,forall:c,toOption:y.none}},R={value:_,error:I},L=function(o){return T({},o,{toCached:function(){return L(o.toCached())},bindFuture:function(n){return L(o.bind(function(e){return e.fold(function(e){return C.pure(R.error(e))},function(e){return n(e)})}))},bindResult:function(n){return L(o.map(function(e){return e.bind(n)}))},mapResult:function(n){return L(o.map(function(e){return e.map(n)}))},mapError:function(n){return L(o.map(function(e){return e.mapError(n)}))},foldResult:function(n,t){return o.map(function(e){return e.fold(n,t)})},withTimeout:function(e,i){return L(C.nu(function(n){var t=!1,r=s.setTimeout(function(){t=!0,n(R.error(i()))},e);o.get(function(e){t||(s.clearTimeout(r),n(e))})}))}})},U=function(e){return L(C.nu(e))},P=U,k=Object.prototype.hasOwnProperty,M=function(a){return function(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Can't merge zero objects");for(var t={},r=0;r<e.length;r++){var i=e[r];for(var o in i)k.call(i,o)&&(t[o]=a(t[o],i[o]))}return t}},j=M(function(e,n){return v(e)&&v(n)?j(e,n):n}),z=M(function(e,n){return n}),B="undefined"!=typeof s.window?s.window:Function("return this;")(),F=function(e,n){return function(e,n){for(var t=n!==undefined&&null!==n?n:B,r=0;r<e.length&&t!==undefined&&null!==t;++r)t=t[e[r]];return t}(e.split("."),n)},H={getOrDie:function(e,n){var t=F(e,n);if(t===undefined||null===t)throw e+" not available on this browser";return t}},G=function(){return H.getOrDie("URL")},W=function(e){return G().createObjectURL(e)},X=function(e){G().revokeObjectURL(e)},$=function(e){var n=e.imageList.map(function(e){return{name:"images",type:"selectbox",label:"Image list",items:e}}),t=e.classList.map(function(e){return{name:"classes",type:"selectbox",label:"Class",items:e}});return x([[{name:"src",type:"urlinput",filetype:"image",label:"Source"}],n.toArray(),e.hasDescription?[{name:"alt",type:"input",label:"Image description"}]:[],e.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],e.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[{type:"grid",columns:2,items:x([t.toArray(),e.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])}]])},q=function(e){return{title:"General",items:$(e)}},V=$,J=tinymce.util.Tools.resolve("tinymce.util.Promise"),Y=tinymce.util.Tools.resolve("tinymce.util.Tools"),Z=tinymce.util.Tools.resolve("tinymce.util.XHR"),K=function(e){return!1!==e.settings.image_dimensions},Q=function(e){return!0===e.settings.image_advtab},ee=function(e){return e.getParam("image_prepend_url","")},ne=function(e){return e.getParam("image_class_list")},te=function(e){return!1!==e.settings.image_description},re=function(e){return!0===e.settings.image_title},ie=function(e){return!0===e.settings.image_caption},oe=function(e){return e.getParam("image_list",!1)},ae=function(e){return!!e.getParam("images_upload_url",!1)},ue=function(e){return!!e.getParam("images_upload_handler",!1)},se=function(e){return e.getParam("images_upload_url")},ce=function(e){return e.getParam("images_upload_handler")},le=function(e){return e.getParam("images_upload_base_path")},fe=function(e){return e.getParam("images_upload_credentials")},de=function(e,n){return Math.max(parseInt(e,10),parseInt(n,10))},me=function(e,n){var t=s.document.createElement("img");function r(e){t.parentNode&&t.parentNode.removeChild(t),n(e)}t.onload=function(){var e={width:de(t.width,t.clientWidth),height:de(t.height,t.clientHeight)};r(R.value(e))},t.onerror=function(){r(R.error(undefined))};var i=t.style;i.visibility="hidden",i.position="fixed",i.bottom=i.left="0px",i.width=i.height="auto",s.document.body.appendChild(t),t.src=e},ge=function(e){return e&&(e=e.replace(/px$/,"")),e},pe=function(e){return 0<e.length&&/^[0-9]+$/.test(e)&&(e+="px"),e},he=function(e){if(e.margin){var n=String(e.margin).split(" ");switch(n.length){case 1:e["margin-top"]=e["margin-top"]||n[0],e["margin-right"]=e["margin-right"]||n[0],e["margin-bottom"]=e["margin-bottom"]||n[0],e["margin-left"]=e["margin-left"]||n[0];break;case 2:e["margin-top"]=e["margin-top"]||n[0],e["margin-right"]=e["margin-right"]||n[1],e["margin-bottom"]=e["margin-bottom"]||n[0],e["margin-left"]=e["margin-left"]||n[1];break;case 3:e["margin-top"]=e["margin-top"]||n[0],e["margin-right"]=e["margin-right"]||n[1],e["margin-bottom"]=e["margin-bottom"]||n[2],e["margin-left"]=e["margin-left"]||n[1];break;case 4:e["margin-top"]=e["margin-top"]||n[0],e["margin-right"]=e["margin-right"]||n[1],e["margin-bottom"]=e["margin-bottom"]||n[2],e["margin-left"]=e["margin-left"]||n[3]}delete e.margin}return e},ve=function(e,n){var t=oe(e);"string"==typeof t?Z.send({url:t,success:function(e){n(JSON.parse(e))}}):"function"==typeof t?t(n):n(t)},be=function(e,n,t){function r(){t.onload=t.onerror=null,e.selection&&(e.selection.select(t),e.nodeChanged())}t.onload=function(){n.width||n.height||!K(e)||e.dom.setAttribs(t,{width:t.clientWidth,height:t.clientHeight}),r()},t.onerror=r},ye=function(i){return new J(function(e,n){var t=function r(){return new(H.getOrDie("FileReader"))}();t.onload=function(){e(t.result)},t.onerror=function(){n(t.error.message)},t.readAsDataURL(i)})},we=function(e){return"IMG"===e.nodeName&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder"))},Oe=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils").DOM,Se=function(e){return e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?ge(e.style.marginLeft):""},Ne=function(e){return e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?ge(e.style.marginTop):""},xe=function(e){return e.style.borderWidth?ge(e.style.borderWidth):""},Te=function(e,n){return e.hasAttribute(n)?e.getAttribute(n):""},Ee=function(e,n){return e.style[n]?e.style[n]:""},De=function(e){return null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName},Ae=function(e,n,t){e.setAttribute(n,t)},Ce=function(e){var n,t,r,i;De(e)?(i=(r=e).parentNode,Oe.insertAfter(r,i),Oe.remove(i)):(n=e,t=Oe.create("figure",{"class":"image"}),Oe.insertAfter(t,n),t.appendChild(n),t.appendChild(Oe.create("figcaption",{contentEditable:"true"},"Caption")),t.contentEditable="false")},_e=function(e,n){var t=e.getAttribute("style"),r=n(null!==t?t:"");0<r.length?(e.setAttribute("style",r),e.setAttribute("data-mce-style",r)):e.removeAttribute("style")},Ie=function(e,r){return function(e,n,t){e.style[n]?(e.style[n]=pe(t),_e(e,r)):Ae(e,n,t)}},Re=function(e,n){return e.style[n]?ge(e.style[n]):Te(e,n)},Le=function(e,n){var t=pe(n);e.style.marginLeft=t,e.style.marginRight=t},Ue=function(e,n){var t=pe(n);e.style.marginTop=t,e.style.marginBottom=t},Pe=function(e,n){var t=pe(n);e.style.borderWidth=t},ke=function(e,n){e.style.borderStyle=n},Me=function(e){return"FIGURE"===e.nodeName},je=function(e,n){var t=s.document.createElement("img");return Ae(t,"style",n.style),(Se(t)||""!==n.hspace)&&Le(t,n.hspace),(Ne(t)||""!==n.vspace)&&Ue(t,n.vspace),(xe(t)||""!==n.border)&&Pe(t,n.border),(Ee(t,"borderStyle")||""!==n.borderStyle)&&ke(t,n.borderStyle),e(t.getAttribute("style"))},ze=function(e,n){return{src:Te(n,"src"),alt:Te(n,"alt"),title:Te(n,"title"),width:Re(n,"width"),height:Re(n,"height"),"class":Te(n,"class"),style:e(Te(n,"style")),caption:De(n),hspace:Se(n),vspace:Ne(n),border:xe(n),borderStyle:Ee(n,"borderStyle")}},Be=function(e,n,t,r,i){t[r]!==n[r]&&i(e,r,t[r])},Fe=function(r,i){return function(e,n,t){r(e,t),_e(e,i)}},He=function(e,n,t){var r=ze(e,t);Be(t,r,n,"caption",function(e,n,t){return Ce(e)}),Be(t,r,n,"src",Ae),Be(t,r,n,"alt",Ae),Be(t,r,n,"title",Ae),Be(t,r,n,"width",Ie(0,e)),Be(t,r,n,"height",Ie(0,e)),Be(t,r,n,"class",Ae),Be(t,r,n,"style",Fe(function(e,n){return Ae(e,"style",n)},e)),Be(t,r,n,"hspace",Fe(Le,e)),Be(t,r,n,"vspace",Fe(Ue,e)),Be(t,r,n,"border",Fe(Pe,e)),Be(t,r,n,"borderStyle",Fe(ke,e))},Ge=function(e,n){var t=e.dom.styles.parse(n),r=he(t),i=e.dom.styles.parse(e.dom.styles.serialize(r));return e.dom.styles.serialize(i)},We=function(e){var n=e.selection.getNode(),t=e.dom.getParent(n,"figure.image");return t?e.dom.select("img",t)[0]:n&&("IMG"!==n.nodeName||we(n))?null:n},Xe=function(n,e){var t=n.dom,r=t.getParent(e.parentNode,function(e){return n.schema.getTextBlockElements()[e.nodeName]},n.getBody());return r?t.split(r,e):e},$e=function(n,e){var t=function(e,n){var t=s.document.createElement("img");if(He(e,z(n,{caption:!1}),t),Ae(t,"alt",n.alt),n.caption){var r=Oe.create("figure",{"class":"image"});return r.appendChild(t),r.appendChild(Oe.create("figcaption",{contentEditable:"true"},"Caption")),r.contentEditable="false",r}return t}(function(e){return Ge(n,e)},e);n.dom.setAttrib(t,"data-mce-id","__mcenew"),n.focus(),n.selection.setContent(t.outerHTML);var r=n.dom.select('*[data-mce-id="__mcenew"]')[0];if(n.dom.setAttrib(r,"data-mce-id",null),Me(r)){var i=Xe(n,r);n.selection.select(i)}else n.selection.select(r)},qe=function(e,n){var t=We(e);t?n.src?function(n,e){var t,r=We(n);if(He(function(e){return Ge(n,e)},e,r),t=r,n.dom.setAttrib(t,"src",t.getAttribute("src")),Me(r.parentNode)){var i=r.parentNode;Xe(n,i),n.selection.select(r.parentNode)}else n.selection.select(r),be(n,e,r)}(e,n):function(e,n){if(n){var t=e.dom.is(n.parentNode,"figure.image")?n.parentNode:n;e.dom.remove(t),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}}(e,t):n.src&&$e(e,n)},Ve=function(e){return w(e.value)?e.value:""},Je=function(e,i){var o=[];return Y.each(e,function(e){var n=w(e.text)?e.text:w(e.title)?e.title:"";if(e.menu!==undefined){var t=Je(e.menu,i);o.push({text:n,items:t})}else{var r=i(e);o.push({text:n,value:r})}}),o},Ye=function(n){return void 0===n&&(n=Ve),function(e){return e?y.from(e).map(function(e){return Je(e,n)}):y.none()}},Ze=function(e,t){return function(e,n){for(var t=0;t<e.length;t++){var r=n(e[t],t);if(r.isSome())return r}return y.none()}(e,function(e){return n=e,Object.prototype.hasOwnProperty.call(n,"items")?Ze(e.items,t):e.value===t?y.some(e):y.none();var n})},Ke=Ye,Qe=function(e){return Ye(Ve)(e)},en=function(e,n){return e.bind(function(e){return Ze(e,n)})},nn=function(){};function tn(u){var n=function(e,r,i,n){var o,t;(o=function a(){return new(H.getOrDie("XMLHttpRequest"))}()).open("POST",u.url),o.withCredentials=u.credentials,o.upload.onprogress=function(e){n(e.loaded/e.total*100)},o.onerror=function(){i("Image upload failed due to a XHR Transport error. Code: "+o.status)},o.onload=function(){var e,n,t;o.status<200||300<=o.status?i("HTTP Error: "+o.status):(e=JSON.parse(o.responseText))&&"string"==typeof e.location?r((n=u.basePath,t=e.location,n?n.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t)):i("Invalid JSON: "+o.responseText)},(t=new s.FormData).append("file",e.blob(),e.filename()),o.send(t)};return u=Y.extend({credentials:!1,handler:n},u),{upload:function(e){return u.url||u.handler!==n?(r=e,i=u.handler,new J(function(e,n){try{i(r,e,n,nn)}catch(t){n(t.message)}})):J.reject("Upload url missing from the settings.");var r,i}}}var rn,on,an,un=function(e){return{title:"Advanced",items:[{type:"input",label:"Style",name:"style"},{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace"},{type:"input",label:"Horizontal space",name:"hspace"},{type:"input",label:"Border width",name:"border"},{type:"selectbox",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"}]}]}]}},sn=function(t){var n,e,r=Ke(function(e){return t.convertURL(e.value||e.url,"src")}),i=C.nu(function(n){ve(t,function(e){n(r(e).map(function(e){return x([[{text:"None",value:""}],e])}))})}),o=Qe(ne(t)),a=Q(t),u=ae(t),s=ue(t),c=(e=We(n=t))?ze(function(e){return Ge(n,e)},e):{src:"",alt:"",title:"",width:"",height:"","class":"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:""},l=te(t),f=re(t),d=K(t),m=ie(t),g=se(t),p=le(t),h=fe(t),v=ce(t),b=y.some(ee(t)).filter(function(e){return w(e)&&0<e.length});return i.map(function(e){return{image:c,imageList:e,classList:o,hasAdvTab:a,hasUploadUrl:u,hasUploadHandler:s,hasDescription:l,hasImageTitle:f,hasDimensions:d,hasImageCaption:m,url:g,basePath:p,credentials:h,handler:v,prependURL:b}})},cn=function(e){return{title:"Upload",items:[{type:"dropzone",name:"fileinput"}]}},ln=function(e){return{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:[]}},fn=function(e){return{src:e.src.value,alt:e.alt,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}},dn=function(e,n){var t,r,i=n.getData();(t=e,r=i.src.value,/^(?:[a-zA-Z]+:)?\/\//.test(r)?y.none():t.prependURL.bind(function(e){return r.substring(0,e.length)!==e?y.some(e+r):y.none()})).each(function(e){n.setData({src:{value:e,meta:i.src.meta}})})},mn=function(e,n){(function(e,n){var t=n.src.meta;if(t===undefined)return y.none();var r=j({},n);return e.hasDescription&&w(t.alt)&&(r.alt=t.alt),e.hasImageTitle&&w(t.title)&&(r.title=t.title),e.hasDimensions&&(w(t.width)&&(r.dimensions.width=t.width),w(t.height)&&(r.dimensions.height=t.height)),w(t["class"])&&en(e.classList,t["class"]).each(function(e){r.classes=e.value}),e.hasAdvTab&&(w(t.vspace)&&(r.vspace=t.vspace),w(t.border)&&(r.border=t.border),w(t.hspace)&&(r.hspace=t.hspace),w(t.borderstyle)&&(r.borderstyle=t.borderstyle)),y.some(r)})(e,n.getData()).each(function(e){return n.setData(e)})},gn=function(e,n,t,r){var i,o,a,u,s,c,l,f,d,m,g,p;dn(n,r),mn(n,r),i=e,o=n,a=t,s=(u=r).getData(),c=s.src.value,(l=s.src.meta||{}).width||l.height||!o.hasDimensions||i.imageSize(c).get(function(e){e.each(function(e){a.open&&u.setData({dimensions:e})})}),f=n,d=t,g=(m=r).getData(),p=en(f.imageList,g.src.value),d.prevImage=p,m.setData({images:p.map(function(e){return e.value}).getOr("")})},pn=function(e,n,t){var r,i,o,a,u,s=he(e(t.style)),c=j({},t);return c.vspace=(r=s)["margin-top"]&&r["margin-bottom"]&&r["margin-top"]===r["margin-bottom"]?ge(String(r["margin-top"])):"",c.hspace=(i=s)["margin-right"]&&i["margin-left"]&&i["margin-right"]===i["margin-left"]?ge(String(i["margin-right"])):"",c.border=(o=s)["border-width"]?ge(String(o["border-width"])):"",c.borderstyle=(a=s)["border-style"]?String(a["border-style"]):"",c.style=(u=n)(e(u(s))),c},hn=function(a,u,s,c){var e,n=c.getData();c.block("Uploading image"),(e=n.fileinput,0===e.length?y.none():y.some(e[0])).fold(function(){c.unblock()},function(t){var r=W(t),i=tn({url:u.url,basePath:u.basePath,credentials:u.credentials,handler:u.handler}),o=function(){c.unblock(),X(r)};ye(t).then(function(e){var n=a.createBlobCache(t,r,e);i.upload(n).then(function(e){c.setData({src:{value:e,meta:{}}}),c.showTab("General"),gn(a,u,s,c),o()})["catch"](function(e){o(),a.alertErr(c,e)})})})},vn=function(h,v,b){return function(e,n){var t,r,i,o,a,u,s,c,l,f,d,m,g,p;"src"===n.name?gn(h,v,b,e):"images"===n.name?(l=h,f=v,d=b,g=(m=e).getData(),(p=en(f.imageList,g.images)).each(function(e){""===g.alt||d.prevImage.map(function(e){return e.text===g.alt}).getOr(!1)?""===e.value?m.setData({src:e,alt:d.prevAlt}):m.setData({src:e,alt:e.text}):m.setData({src:e})}),d.prevImage=p,gn(l,f,d,m)):"alt"===n.name?b.prevAlt=e.getData().alt:"style"===n.name?(a=h,s=(u=e).getData(),c=pn(a.parseStyle,a.serializeStyle,s),u.setData(c)):"vspace"===n.name||"hspace"===n.name||"border"===n.name||"borderstyle"===n.name?(t=h,r=e,i=j(ln(v.image),r.getData()),o=je(t.normalizeCss,fn(i)),r.setData({style:o})):"fileinput"===n.name&&hn(h,v,b,e)}},bn=function(o){return function(e){var n,t,r,i={prevImage:en((n=e).imageList,n.image.src),prevAlt:n.image.alt,open:!0};return{title:"Insert/Edit Image",size:"normal",body:(r=e,r.hasAdvTab||r.hasUploadUrl||r.hasUploadHandler?{type:"tabpanel",tabs:x([[q(r)],r.hasAdvTab?[un(r)]:[],r.hasUploadUrl||r.hasUploadHandler?[cn(r)]:[]])}:{type:"panel",items:V(r)}),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:ln(e.image),onSubmit:o.onSubmit(e),onChange:vn(o,e,i),onClose:(t=i,function(){t.open=!1})}}},yn=function(n){var t,r,i,o,a,u,s,e={onSubmit:(s=n,function(t){return function(e){var n=j(ln(t.image),e.getData());s.undoManager.transact(function(){qe(s,fn(n))}),s.editorUpload.uploadImagesAuto(),e.close()}}),imageSize:(u=n,function(e){return P(function(t){me(u.documentBaseURI.toAbsolute(e),function(e){var n=e.bind(function(e){return(w(e.width)||O(e.width))&&(w(e.height)||O(e.height))?R.value({width:String(e.width),height:String(e.height)}):R.error(undefined)});t(n)})})}),createBlobCache:(a=n,function(e,n,t){return a.editorUpload.blobCache.create({blob:e,blobUri:n,name:e.name?e.name.replace(/\.[^\.]+$/,""):null,base64:t.split(",")[1]})}),alertErr:(o=n,function(e,n){o.windowManager.alert(n,e.close)}),normalizeCss:(i=n,function(e){return Ge(i,e)}),parseStyle:(r=n,function(e){return r.dom.parseStyle(e)}),serializeStyle:(t=n,function(e,n){return t.dom.serializeStyle(e,n)})};return{open:function(){return sn(n).map(bn(e)).get(function(e){n.windowManager.open(e)})}}},wn=function(e){e.addCommand("mceImage",yn(e).open)},On=function(o){return function(e){for(var n,t,r=e.length,i=function(e){e.attr("contenteditable",o?"true":null)};r--;)n=e[r],(t=n.attr("class"))&&/\bimage\b/.test(t)&&(n.attr("contenteditable",o?"false":null),Y.each(n.getAll("figcaption"),i))}},Sn=function(e){e.on("PreInit",function(){e.parser.addNodeFilter("figure",On(!0)),e.serializer.addNodeFilter("figure",On(!1))})},Nn=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:h(e)}},xn={fromHtml:function(e,n){var t=(n||s.document).createElement("div");if(t.innerHTML=e,!t.hasChildNodes()||1<t.childNodes.length)throw s.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Nn(t.childNodes[0])},fromTag:function(e,n){var t=(n||s.document).createElement(e);return Nn(t)},fromText:function(e,n){var t=(n||s.document).createTextNode(e);return Nn(t)},fromDom:Nn,fromPoint:function(e,n,t){var r=e.dom();return y.from(r.elementFromPoint(n,t)).map(Nn)}},Tn=(s.Node.ATTRIBUTE_NODE,s.Node.CDATA_SECTION_NODE,s.Node.COMMENT_NODE,s.Node.DOCUMENT_NODE,s.Node.DOCUMENT_TYPE_NODE,s.Node.DOCUMENT_FRAGMENT_NODE,s.Node.ELEMENT_NODE,s.Node.TEXT_NODE,s.Node.PROCESSING_INSTRUCTION_NODE,s.Node.ENTITY_REFERENCE_NODE,s.Node.ENTITY_NODE,s.Node.NOTATION_NODE,function(e,n){var t=function(e,n){for(var t=0;t<e.length;t++){var r=e[t];if(r.test(n))return r}return undefined}(e,n);if(!t)return{major:0,minor:0};var r=function(e){return Number(n.replace(t,"$"+e))};return Dn(r(1),r(2))}),En=function(){return Dn(0,0)},Dn=function(e,n){return{major:e,minor:n}},An={nu:Dn,detect:function(e,n){var t=String(n).toLowerCase();return 0===e.length?En():Tn(e,t)},unknown:En},Cn="Firefox",_n=function(e,n){return function(){return n===e}},In=function(e){var n=e.current;return{current:n,version:e.version,isEdge:_n("Edge",n),isChrome:_n("Chrome",n),isIE:_n("IE",n),isOpera:_n("Opera",n),isFirefox:_n(Cn,n),isSafari:_n("Safari",n)}},Rn={unknown:function(){return In({current:undefined,version:An.unknown()})},nu:In,edge:h("Edge"),chrome:h("Chrome"),ie:h("IE"),opera:h("Opera"),firefox:h(Cn),safari:h("Safari")},Ln="Windows",Un="Android",Pn="Solaris",kn="FreeBSD",Mn=function(e,n){return function(){return n===e}},jn=function(e){var n=e.current;return{current:n,version:e.version,isWindows:Mn(Ln,n),isiOS:Mn("iOS",n),isAndroid:Mn(Un,n),isOSX:Mn("OSX",n),isLinux:Mn("Linux",n),isSolaris:Mn(Pn,n),isFreeBSD:Mn(kn,n)}},zn={unknown:function(){return jn({current:undefined,version:An.unknown()})},nu:jn,windows:h(Ln),ios:h("iOS"),android:h(Un),linux:h("Linux"),osx:h("OSX"),solaris:h(Pn),freebsd:h(kn)},Bn=function(e,n){var t=String(n).toLowerCase();return function(e,n){for(var t=0,r=e.length;t<r;t++){var i=e[t];if(n(i,t,e))return y.some(i)}return y.none()}(e,function(e){return e.search(t)})},Fn=function(e,t){return Bn(e,t).map(function(e){var n=An.detect(e.versionRegexes,t);return{current:e.name,version:n}})},Hn=function(e,t){return Bn(e,t).map(function(e){var n=An.detect(e.versionRegexes,t);return{current:e.name,version:n}})},Gn=function(e,n){return-1!==e.indexOf(n)},Wn=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Xn=function(n){return function(e){return Gn(e,n)}},$n=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return Gn(e,"edge/")&&Gn(e,"chrome")&&Gn(e,"safari")&&Gn(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Wn],search:function(e){return Gn(e,"chrome")&&!Gn(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return Gn(e,"msie")||Gn(e,"trident")}},{name:"Opera",versionRegexes:[Wn,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Xn("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Xn("firefox")},{name:"Safari",versionRegexes:[Wn,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(Gn(e,"safari")||Gn(e,"mobile/"))&&Gn(e,"applewebkit")}}],qn=[{name:"Windows",search:Xn("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return Gn(e,"iphone")||Gn(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Xn("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Xn("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Xn("linux"),versionRegexes:[]},{name:"Solaris",search:Xn("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Xn("freebsd"),versionRegexes:[]}],Vn={browsers:h($n),oses:h(qn)},Jn=function(e){var n,t,r,i,o,a,u,s,c,l,f,d=Vn.browsers(),m=Vn.oses(),g=Fn(d,e).fold(Rn.unknown,Rn.nu),p=Hn(m,e).fold(zn.unknown,zn.nu);return{browser:g,os:p,deviceType:(t=g,r=e,i=(n=p).isiOS()&&!0===/ipad/i.test(r),o=n.isiOS()&&!i,a=n.isAndroid()&&3===n.version.major,u=n.isAndroid()&&4===n.version.major,s=i||a||u&&!0===/mobile/i.test(r),c=n.isiOS()||n.isAndroid(),l=c&&!s,f=t.isSafari()&&n.isiOS()&&!1===/safari/i.test(r),{isiPad:h(i),isiPhone:h(o),isTablet:h(s),isPhone:h(l),isTouch:h(c),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:h(f)})}},Yn=((rn=function(){var e=s.navigator.userAgent;return Jn(e)},an=!1,function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return an||(an=!0,on=rn.apply(null,e)),on}()).browser.isIE(),function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n]}("element","offset"),function(o){o.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:yn(o).open,onSetup:function(e){return o.selection.selectorChangedWithUnbind("img:not([data-mce-object],[data-mce-placeholder]),figure.image",e.setActive).unbind}}),o.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:yn(o).open}),o.ui.registry.addContextMenu("image",{update:function(e){return Me(e)||"IMG"===e.nodeName&&!we(e)?[(i=e,{text:"Image",icon:"image",onAction:function(){var e,n,t,r=((rn=function(){var e=s.navigator.userAgent;return Jn(e)},an=!1,function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return an||(an=!0,on=rn.apply(null,e)),on}()).browser.isIE(),function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n]}("element","offset"),e=xn.fromDom(i),(n=e,t=n.dom(),y.from(t.parentNode).map(xn.fromDom)).filter(function(e){return"figure"===e.dom().nodeName.toLowerCase()}).getOr(e));o.selection.select(r.dom()),yn(o).open()}})]:[];var i}})});i.add("image",function(e){Sn(e),Yn(e),wn(e)}),function Zn(){}}(window);
|
9
|
+
!function(s){"use strict";var e,n,t,r,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n]},h=function(e){return function(){return e}},a=function(e){return e},u=h(!1),c=h(!0),l=u,f=c,d=function(){return m},m=(r={fold:function(e,n){return e()},is:l,isSome:l,isNone:f,getOr:t=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:t,orThunk:n,map:d,ap:d,each:function(){},bind:d,flatten:d,exists:l,forall:f,filter:d,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:h("none()")},Object.freeze&&Object.freeze(r),r),g=function(t){var e=function(){return t},n=function(){return i},r=function(e){return e(t)},i={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:f,isNone:l,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return g(e(t))},ap:function(e){return e.fold(d,function(e){return g(e(t))})},each:function(e){e(t)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){return e(t)?i:m},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(l,function(e){return n(t,e)})},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return i},y={some:g,none:d,from:function(e){return null===e||e===undefined?m:g(e)}},p=function(n){return function(e){return function(e){if(null===e)return"null";var n=typeof e;return"object"===n&&Array.prototype.isPrototypeOf(e)?"array":"object"===n&&String.prototype.isPrototypeOf(e)?"string":n}(e)===n}},w=p("string"),v=p("object"),b=p("function"),O=p("number"),S=function(e,n){for(var t=0,r=e.length;t<r;t++)n(e[t],t,e)},N=Array.prototype.push,x=function(e){for(var n=[],t=0,r=e.length;t<r;++t){if(!Array.prototype.isPrototypeOf(e[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+e);N.apply(n,e[t])}return n},T=(Array.prototype.slice,b(Array.from)&&Array.from,function(){return(T=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e}).apply(this,arguments)}),E=function(e){var t=y.none(),n=[],r=function(e){i()?a(e):n.push(e)},i=function(){return t.isSome()},o=function(e){S(e,a)},a=function(n){t.each(function(e){s.setTimeout(function(){n(e)},0)})};return e(function(e){t=y.some(e),o(n),n=[]}),{get:r,map:function(t){return E(function(n){r(function(e){n(t(e))})})},isReady:i}},D={nu:E,pure:function(n){return E(function(e){e(n)})}},A=function(n){var e=function(e){var r;n((r=e,function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=this;s.setTimeout(function(){r.apply(t,e)},0)}))},t=function(){return D.nu(e)};return{map:function(r){return A(function(t){e(function(e){var n=r(e);t(n)})})},bind:function(t){return A(function(n){e(function(e){t(e).get(n)})})},anonBind:function(t){return A(function(n){e(function(e){t.get(n)})})},toLazy:t,toCached:function(){var n=null;return A(function(e){null===n&&(n=t()),n.get(e)})},get:e}},C={nu:A,pure:function(n){return A(function(e){e(n)})}},_=function(t){return{is:function(e){return t===e},isValue:c,isError:u,getOr:h(t),getOrThunk:h(t),getOrDie:h(t),or:function(e){return _(t)},orThunk:function(e){return _(t)},fold:function(e,n){return n(t)},map:function(e){return _(e(t))},mapError:function(e){return _(t)},each:function(e){e(t)},bind:function(e){return e(t)},exists:function(e){return e(t)},forall:function(e){return e(t)},toOption:function(){return y.some(t)}}},I=function(t){return{is:u,isValue:u,isError:c,getOr:a,getOrThunk:function(e){return e()},getOrDie:function(){return e=String(t),function(){throw new Error(e)}();var e},or:function(e){return e},orThunk:function(e){return e()},fold:function(e,n){return e(t)},map:function(e){return I(t)},mapError:function(e){return I(e(t))},each:o,bind:function(e){return I(t)},exists:u,forall:c,toOption:y.none}},R={value:_,error:I,fromOption:function(e,n){return e.fold(function(){return I(n)},_)}},L=function(o){return T({},o,{toCached:function(){return L(o.toCached())},bindFuture:function(n){return L(o.bind(function(e){return e.fold(function(e){return C.pure(R.error(e))},function(e){return n(e)})}))},bindResult:function(n){return L(o.map(function(e){return e.bind(n)}))},mapResult:function(n){return L(o.map(function(e){return e.map(n)}))},mapError:function(n){return L(o.map(function(e){return e.mapError(n)}))},foldResult:function(n,t){return o.map(function(e){return e.fold(n,t)})},withTimeout:function(e,i){return L(C.nu(function(n){var t=!1,r=s.setTimeout(function(){t=!0,n(R.error(i()))},e);o.get(function(e){t||(s.clearTimeout(r),n(e))})}))}})},U=function(e){return L(C.nu(e))},P=U,k=Object.prototype.hasOwnProperty,M=function(a){return function(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Can't merge zero objects");for(var t={},r=0;r<e.length;r++){var i=e[r];for(var o in i)k.call(i,o)&&(t[o]=a(t[o],i[o]))}return t}},j=M(function(e,n){return v(e)&&v(n)?j(e,n):n}),z=M(function(e,n){return n}),B="undefined"!=typeof s.window?s.window:Function("return this;")(),F=function(e,n){return function(e,n){for(var t=n!==undefined&&null!==n?n:B,r=0;r<e.length&&t!==undefined&&null!==t;++r)t=t[e[r]];return t}(e.split("."),n)},H={getOrDie:function(e,n){var t=F(e,n);if(t===undefined||null===t)throw e+" not available on this browser";return t}},G=function(){return H.getOrDie("URL")},W=function(e){return G().createObjectURL(e)},X=function(e){G().revokeObjectURL(e)},$=function(e){var n=e.imageList.map(function(e){return{name:"images",type:"selectbox",label:"Image list",items:e}}),t=e.classList.map(function(e){return{name:"classes",type:"selectbox",label:"Class",items:e}});return x([[{name:"src",type:"urlinput",filetype:"image",label:"Source"}],n.toArray(),e.hasDescription?[{name:"alt",type:"input",label:"Image description"}]:[],e.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],e.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[{type:"grid",columns:2,items:x([t.toArray(),e.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])}]])},q=function(e){return{title:"General",items:$(e)}},V=$,J=tinymce.util.Tools.resolve("tinymce.util.Promise"),Y=tinymce.util.Tools.resolve("tinymce.util.Tools"),Z=tinymce.util.Tools.resolve("tinymce.util.XHR"),K=function(e){return!1!==e.settings.image_dimensions},Q=function(e){return!0===e.settings.image_advtab},ee=function(e){return e.getParam("image_prepend_url","")},ne=function(e){return e.getParam("image_class_list")},te=function(e){return!1!==e.settings.image_description},re=function(e){return!0===e.settings.image_title},ie=function(e){return!0===e.settings.image_caption},oe=function(e){return e.getParam("image_list",!1)},ae=function(e){return!!e.getParam("images_upload_url",!1)},ue=function(e){return!!e.getParam("images_upload_handler",!1)},se=function(e){return e.getParam("images_upload_url")},ce=function(e){return e.getParam("images_upload_handler")},le=function(e){return e.getParam("images_upload_base_path")},fe=function(e){return e.getParam("images_upload_credentials")},de=function(e,n){return Math.max(parseInt(e,10),parseInt(n,10))},me=function(e,n){var t=s.document.createElement("img");function r(e){t.parentNode&&t.parentNode.removeChild(t),n(e)}t.onload=function(){var e={width:de(t.width,t.clientWidth),height:de(t.height,t.clientHeight)};r(R.value(e))},t.onerror=function(){r(R.error(undefined))};var i=t.style;i.visibility="hidden",i.position="fixed",i.bottom=i.left="0px",i.width=i.height="auto",s.document.body.appendChild(t),t.src=e},ge=function(e){return e&&(e=e.replace(/px$/,"")),e},pe=function(e){return 0<e.length&&/^[0-9]+$/.test(e)&&(e+="px"),e},he=function(e){if(e.margin){var n=String(e.margin).split(" ");switch(n.length){case 1:e["margin-top"]=e["margin-top"]||n[0],e["margin-right"]=e["margin-right"]||n[0],e["margin-bottom"]=e["margin-bottom"]||n[0],e["margin-left"]=e["margin-left"]||n[0];break;case 2:e["margin-top"]=e["margin-top"]||n[0],e["margin-right"]=e["margin-right"]||n[1],e["margin-bottom"]=e["margin-bottom"]||n[0],e["margin-left"]=e["margin-left"]||n[1];break;case 3:e["margin-top"]=e["margin-top"]||n[0],e["margin-right"]=e["margin-right"]||n[1],e["margin-bottom"]=e["margin-bottom"]||n[2],e["margin-left"]=e["margin-left"]||n[1];break;case 4:e["margin-top"]=e["margin-top"]||n[0],e["margin-right"]=e["margin-right"]||n[1],e["margin-bottom"]=e["margin-bottom"]||n[2],e["margin-left"]=e["margin-left"]||n[3]}delete e.margin}return e},ve=function(e,n){var t=oe(e);"string"==typeof t?Z.send({url:t,success:function(e){n(JSON.parse(e))}}):"function"==typeof t?t(n):n(t)},be=function(e,n,t){function r(){t.onload=t.onerror=null,e.selection&&(e.selection.select(t),e.nodeChanged())}t.onload=function(){n.width||n.height||!K(e)||e.dom.setAttribs(t,{width:t.clientWidth,height:t.clientHeight}),r()},t.onerror=r},ye=function(i){return new J(function(e,n){var t=function r(){return new(H.getOrDie("FileReader"))}();t.onload=function(){e(t.result)},t.onerror=function(){n(t.error.message)},t.readAsDataURL(i)})},we=function(e){return"IMG"===e.nodeName&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder"))},Oe=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils").DOM,Se=function(e){return e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?ge(e.style.marginLeft):""},Ne=function(e){return e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?ge(e.style.marginTop):""},xe=function(e){return e.style.borderWidth?ge(e.style.borderWidth):""},Te=function(e,n){return e.hasAttribute(n)?e.getAttribute(n):""},Ee=function(e,n){return e.style[n]?e.style[n]:""},De=function(e){return null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName},Ae=function(e,n,t){e.setAttribute(n,t)},Ce=function(e){var n,t,r,i;De(e)?(i=(r=e).parentNode,Oe.insertAfter(r,i),Oe.remove(i)):(n=e,t=Oe.create("figure",{"class":"image"}),Oe.insertAfter(t,n),t.appendChild(n),t.appendChild(Oe.create("figcaption",{contentEditable:"true"},"Caption")),t.contentEditable="false")},_e=function(e,n){var t=e.getAttribute("style"),r=n(null!==t?t:"");0<r.length?(e.setAttribute("style",r),e.setAttribute("data-mce-style",r)):e.removeAttribute("style")},Ie=function(e,r){return function(e,n,t){e.style[n]?(e.style[n]=pe(t),_e(e,r)):Ae(e,n,t)}},Re=function(e,n){return e.style[n]?ge(e.style[n]):Te(e,n)},Le=function(e,n){var t=pe(n);e.style.marginLeft=t,e.style.marginRight=t},Ue=function(e,n){var t=pe(n);e.style.marginTop=t,e.style.marginBottom=t},Pe=function(e,n){var t=pe(n);e.style.borderWidth=t},ke=function(e,n){e.style.borderStyle=n},Me=function(e){return"FIGURE"===e.nodeName},je=function(e,n){var t=s.document.createElement("img");return Ae(t,"style",n.style),(Se(t)||""!==n.hspace)&&Le(t,n.hspace),(Ne(t)||""!==n.vspace)&&Ue(t,n.vspace),(xe(t)||""!==n.border)&&Pe(t,n.border),(Ee(t,"borderStyle")||""!==n.borderStyle)&&ke(t,n.borderStyle),e(t.getAttribute("style"))},ze=function(e,n){return{src:Te(n,"src"),alt:Te(n,"alt"),title:Te(n,"title"),width:Re(n,"width"),height:Re(n,"height"),"class":Te(n,"class"),style:e(Te(n,"style")),caption:De(n),hspace:Se(n),vspace:Ne(n),border:xe(n),borderStyle:Ee(n,"borderStyle")}},Be=function(e,n,t,r,i){t[r]!==n[r]&&i(e,r,t[r])},Fe=function(r,i){return function(e,n,t){r(e,t),_e(e,i)}},He=function(e,n,t){var r=ze(e,t);Be(t,r,n,"caption",function(e,n,t){return Ce(e)}),Be(t,r,n,"src",Ae),Be(t,r,n,"alt",Ae),Be(t,r,n,"title",Ae),Be(t,r,n,"width",Ie(0,e)),Be(t,r,n,"height",Ie(0,e)),Be(t,r,n,"class",Ae),Be(t,r,n,"style",Fe(function(e,n){return Ae(e,"style",n)},e)),Be(t,r,n,"hspace",Fe(Le,e)),Be(t,r,n,"vspace",Fe(Ue,e)),Be(t,r,n,"border",Fe(Pe,e)),Be(t,r,n,"borderStyle",Fe(ke,e))},Ge=function(e,n){var t=e.dom.styles.parse(n),r=he(t),i=e.dom.styles.parse(e.dom.styles.serialize(r));return e.dom.styles.serialize(i)},We=function(e){var n=e.selection.getNode(),t=e.dom.getParent(n,"figure.image");return t?e.dom.select("img",t)[0]:n&&("IMG"!==n.nodeName||we(n))?null:n},Xe=function(n,e){var t=n.dom,r=t.getParent(e.parentNode,function(e){return n.schema.getTextBlockElements()[e.nodeName]},n.getBody());return r?t.split(r,e):e},$e=function(n,e){var t=function(e,n){var t=s.document.createElement("img");if(He(e,z(n,{caption:!1}),t),Ae(t,"alt",n.alt),n.caption){var r=Oe.create("figure",{"class":"image"});return r.appendChild(t),r.appendChild(Oe.create("figcaption",{contentEditable:"true"},"Caption")),r.contentEditable="false",r}return t}(function(e){return Ge(n,e)},e);n.dom.setAttrib(t,"data-mce-id","__mcenew"),n.focus(),n.selection.setContent(t.outerHTML);var r=n.dom.select('*[data-mce-id="__mcenew"]')[0];if(n.dom.setAttrib(r,"data-mce-id",null),Me(r)){var i=Xe(n,r);n.selection.select(i)}else n.selection.select(r)},qe=function(e,n){var t=We(e);t?n.src?function(n,e){var t,r=We(n);if(He(function(e){return Ge(n,e)},e,r),t=r,n.dom.setAttrib(t,"src",t.getAttribute("src")),Me(r.parentNode)){var i=r.parentNode;Xe(n,i),n.selection.select(r.parentNode)}else n.selection.select(r),be(n,e,r)}(e,n):function(e,n){if(n){var t=e.dom.is(n.parentNode,"figure.image")?n.parentNode:n;e.dom.remove(t),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}}(e,t):n.src&&$e(e,n)},Ve=function(e){return w(e.value)?e.value:""},Je=function(e,i){var o=[];return Y.each(e,function(e){var n=w(e.text)?e.text:w(e.title)?e.title:"";if(e.menu!==undefined){var t=Je(e.menu,i);o.push({text:n,items:t})}else{var r=i(e);o.push({text:n,value:r})}}),o},Ye=function(n){return void 0===n&&(n=Ve),function(e){return e?y.from(e).map(function(e){return Je(e,n)}):y.none()}},Ze=function(e,t){return function(e,n){for(var t=0;t<e.length;t++){var r=n(e[t],t);if(r.isSome())return r}return y.none()}(e,function(e){return n=e,Object.prototype.hasOwnProperty.call(n,"items")?Ze(e.items,t):e.value===t?y.some(e):y.none();var n})},Ke=Ye,Qe=function(e){return Ye(Ve)(e)},en=function(e,n){return e.bind(function(e){return Ze(e,n)})},nn=function(){};function tn(u){var n=function(e,r,i,n){var o,t;(o=function a(){return new(H.getOrDie("XMLHttpRequest"))}()).open("POST",u.url),o.withCredentials=u.credentials,o.upload.onprogress=function(e){n(e.loaded/e.total*100)},o.onerror=function(){i("Image upload failed due to a XHR Transport error. Code: "+o.status)},o.onload=function(){var e,n,t;o.status<200||300<=o.status?i("HTTP Error: "+o.status):(e=JSON.parse(o.responseText))&&"string"==typeof e.location?r((n=u.basePath,t=e.location,n?n.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t)):i("Invalid JSON: "+o.responseText)},(t=new s.FormData).append("file",e.blob(),e.filename()),o.send(t)};return u=Y.extend({credentials:!1,handler:n},u),{upload:function(e){return u.url||u.handler!==n?(r=e,i=u.handler,new J(function(e,n){try{i(r,e,n,nn)}catch(t){n(t.message)}})):J.reject("Upload url missing from the settings.");var r,i}}}var rn,on,an,un=function(e){return{title:"Advanced",items:[{type:"input",label:"Style",name:"style"},{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace"},{type:"input",label:"Horizontal space",name:"hspace"},{type:"input",label:"Border width",name:"border"},{type:"selectbox",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"}]}]}]}},sn=function(t){var n,e,r=Ke(function(e){return t.convertURL(e.value||e.url,"src")}),i=C.nu(function(n){ve(t,function(e){n(r(e).map(function(e){return x([[{text:"None",value:""}],e])}))})}),o=Qe(ne(t)),a=Q(t),u=ae(t),s=ue(t),c=(e=We(n=t))?ze(function(e){return Ge(n,e)},e):{src:"",alt:"",title:"",width:"",height:"","class":"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:""},l=te(t),f=re(t),d=K(t),m=ie(t),g=se(t),p=le(t),h=fe(t),v=ce(t),b=y.some(ee(t)).filter(function(e){return w(e)&&0<e.length});return i.map(function(e){return{image:c,imageList:e,classList:o,hasAdvTab:a,hasUploadUrl:u,hasUploadHandler:s,hasDescription:l,hasImageTitle:f,hasDimensions:d,hasImageCaption:m,url:g,basePath:p,credentials:h,handler:v,prependURL:b}})},cn=function(e){return{title:"Upload",items:[{type:"dropzone",name:"fileinput"}]}},ln=function(e){return{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:[]}},fn=function(e){return{src:e.src.value,alt:e.alt,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}},dn=function(e,n){var t,r,i=n.getData();(t=e,r=i.src.value,/^(?:[a-zA-Z]+:)?\/\//.test(r)?y.none():t.prependURL.bind(function(e){return r.substring(0,e.length)!==e?y.some(e+r):y.none()})).each(function(e){n.setData({src:{value:e,meta:i.src.meta}})})},mn=function(e,n){(function(e,n){var t=n.src.meta;if(t===undefined)return y.none();var r=j({},n);return e.hasDescription&&w(t.alt)&&(r.alt=t.alt),e.hasImageTitle&&w(t.title)&&(r.title=t.title),e.hasDimensions&&(w(t.width)&&(r.dimensions.width=t.width),w(t.height)&&(r.dimensions.height=t.height)),w(t["class"])&&en(e.classList,t["class"]).each(function(e){r.classes=e.value}),e.hasAdvTab&&(w(t.vspace)&&(r.vspace=t.vspace),w(t.border)&&(r.border=t.border),w(t.hspace)&&(r.hspace=t.hspace),w(t.borderstyle)&&(r.borderstyle=t.borderstyle)),y.some(r)})(e,n.getData()).each(function(e){return n.setData(e)})},gn=function(e,n,t,r){var i,o,a,u,s,c,l,f,d,m,g,p;dn(n,r),mn(n,r),i=e,o=n,a=t,s=(u=r).getData(),c=s.src.value,(l=s.src.meta||{}).width||l.height||!o.hasDimensions||i.imageSize(c).get(function(e){e.each(function(e){a.open&&u.setData({dimensions:e})})}),f=n,d=t,g=(m=r).getData(),p=en(f.imageList,g.src.value),d.prevImage=p,m.setData({images:p.map(function(e){return e.value}).getOr("")})},pn=function(e,n,t){var r,i,o,a,u,s=he(e(t.style)),c=j({},t);return c.vspace=(r=s)["margin-top"]&&r["margin-bottom"]&&r["margin-top"]===r["margin-bottom"]?ge(String(r["margin-top"])):"",c.hspace=(i=s)["margin-right"]&&i["margin-left"]&&i["margin-right"]===i["margin-left"]?ge(String(i["margin-right"])):"",c.border=(o=s)["border-width"]?ge(String(o["border-width"])):"",c.borderstyle=(a=s)["border-style"]?String(a["border-style"]):"",c.style=(u=n)(e(u(s))),c},hn=function(a,u,s,c){var e,n=c.getData();c.block("Uploading image"),(e=n.fileinput,0===e.length?y.none():y.some(e[0])).fold(function(){c.unblock()},function(t){var r=W(t),i=tn({url:u.url,basePath:u.basePath,credentials:u.credentials,handler:u.handler}),o=function(){c.unblock(),X(r)};ye(t).then(function(e){var n=a.createBlobCache(t,r,e);i.upload(n).then(function(e){c.setData({src:{value:e,meta:{}}}),c.showTab("General"),gn(a,u,s,c),o()})["catch"](function(e){o(),a.alertErr(c,e)})})})},vn=function(h,v,b){return function(e,n){var t,r,i,o,a,u,s,c,l,f,d,m,g,p;"src"===n.name?gn(h,v,b,e):"images"===n.name?(l=h,f=v,d=b,g=(m=e).getData(),(p=en(f.imageList,g.images)).each(function(e){""===g.alt||d.prevImage.map(function(e){return e.text===g.alt}).getOr(!1)?""===e.value?m.setData({src:e,alt:d.prevAlt}):m.setData({src:e,alt:e.text}):m.setData({src:e})}),d.prevImage=p,gn(l,f,d,m)):"alt"===n.name?b.prevAlt=e.getData().alt:"style"===n.name?(a=h,s=(u=e).getData(),c=pn(a.parseStyle,a.serializeStyle,s),u.setData(c)):"vspace"===n.name||"hspace"===n.name||"border"===n.name||"borderstyle"===n.name?(t=h,r=e,i=j(ln(v.image),r.getData()),o=je(t.normalizeCss,fn(i)),r.setData({style:o})):"fileinput"===n.name&&hn(h,v,b,e)}},bn=function(o){return function(e){var n,t,r,i={prevImage:en((n=e).imageList,n.image.src),prevAlt:n.image.alt,open:!0};return{title:"Insert/Edit Image",size:"normal",body:(r=e,r.hasAdvTab||r.hasUploadUrl||r.hasUploadHandler?{type:"tabpanel",tabs:x([[q(r)],r.hasAdvTab?[un(r)]:[],r.hasUploadUrl||r.hasUploadHandler?[cn(r)]:[]])}:{type:"panel",items:V(r)}),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:ln(e.image),onSubmit:o.onSubmit(e),onChange:vn(o,e,i),onClose:(t=i,function(){t.open=!1})}}},yn=function(n){var t,r,i,o,a,u,s,e={onSubmit:(s=n,function(t){return function(e){var n=j(ln(t.image),e.getData());s.undoManager.transact(function(){qe(s,fn(n))}),s.editorUpload.uploadImagesAuto(),e.close()}}),imageSize:(u=n,function(e){return P(function(t){me(u.documentBaseURI.toAbsolute(e),function(e){var n=e.bind(function(e){return(w(e.width)||O(e.width))&&(w(e.height)||O(e.height))?R.value({width:String(e.width),height:String(e.height)}):R.error(undefined)});t(n)})})}),createBlobCache:(a=n,function(e,n,t){return a.editorUpload.blobCache.create({blob:e,blobUri:n,name:e.name?e.name.replace(/\.[^\.]+$/,""):null,base64:t.split(",")[1]})}),alertErr:(o=n,function(e,n){o.windowManager.alert(n,e.close)}),normalizeCss:(i=n,function(e){return Ge(i,e)}),parseStyle:(r=n,function(e){return r.dom.parseStyle(e)}),serializeStyle:(t=n,function(e,n){return t.dom.serializeStyle(e,n)})};return{open:function(){return sn(n).map(bn(e)).get(function(e){n.windowManager.open(e)})}}},wn=function(e){e.addCommand("mceImage",yn(e).open)},On=function(o){return function(e){for(var n,t,r=e.length,i=function(e){e.attr("contenteditable",o?"true":null)};r--;)n=e[r],(t=n.attr("class"))&&/\bimage\b/.test(t)&&(n.attr("contenteditable",o?"false":null),Y.each(n.getAll("figcaption"),i))}},Sn=function(e){e.on("PreInit",function(){e.parser.addNodeFilter("figure",On(!0)),e.serializer.addNodeFilter("figure",On(!1))})},Nn=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:h(e)}},xn={fromHtml:function(e,n){var t=(n||s.document).createElement("div");if(t.innerHTML=e,!t.hasChildNodes()||1<t.childNodes.length)throw s.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Nn(t.childNodes[0])},fromTag:function(e,n){var t=(n||s.document).createElement(e);return Nn(t)},fromText:function(e,n){var t=(n||s.document).createTextNode(e);return Nn(t)},fromDom:Nn,fromPoint:function(e,n,t){var r=e.dom();return y.from(r.elementFromPoint(n,t)).map(Nn)}},Tn=(s.Node.ATTRIBUTE_NODE,s.Node.CDATA_SECTION_NODE,s.Node.COMMENT_NODE,s.Node.DOCUMENT_NODE,s.Node.DOCUMENT_TYPE_NODE,s.Node.DOCUMENT_FRAGMENT_NODE,s.Node.ELEMENT_NODE,s.Node.TEXT_NODE,s.Node.PROCESSING_INSTRUCTION_NODE,s.Node.ENTITY_REFERENCE_NODE,s.Node.ENTITY_NODE,s.Node.NOTATION_NODE,function(e,n){var t=function(e,n){for(var t=0;t<e.length;t++){var r=e[t];if(r.test(n))return r}return undefined}(e,n);if(!t)return{major:0,minor:0};var r=function(e){return Number(n.replace(t,"$"+e))};return Dn(r(1),r(2))}),En=function(){return Dn(0,0)},Dn=function(e,n){return{major:e,minor:n}},An={nu:Dn,detect:function(e,n){var t=String(n).toLowerCase();return 0===e.length?En():Tn(e,t)},unknown:En},Cn="Firefox",_n=function(e,n){return function(){return n===e}},In=function(e){var n=e.current;return{current:n,version:e.version,isEdge:_n("Edge",n),isChrome:_n("Chrome",n),isIE:_n("IE",n),isOpera:_n("Opera",n),isFirefox:_n(Cn,n),isSafari:_n("Safari",n)}},Rn={unknown:function(){return In({current:undefined,version:An.unknown()})},nu:In,edge:h("Edge"),chrome:h("Chrome"),ie:h("IE"),opera:h("Opera"),firefox:h(Cn),safari:h("Safari")},Ln="Windows",Un="Android",Pn="Solaris",kn="FreeBSD",Mn=function(e,n){return function(){return n===e}},jn=function(e){var n=e.current;return{current:n,version:e.version,isWindows:Mn(Ln,n),isiOS:Mn("iOS",n),isAndroid:Mn(Un,n),isOSX:Mn("OSX",n),isLinux:Mn("Linux",n),isSolaris:Mn(Pn,n),isFreeBSD:Mn(kn,n)}},zn={unknown:function(){return jn({current:undefined,version:An.unknown()})},nu:jn,windows:h(Ln),ios:h("iOS"),android:h(Un),linux:h("Linux"),osx:h("OSX"),solaris:h(Pn),freebsd:h(kn)},Bn=function(e,n){var t=String(n).toLowerCase();return function(e,n){for(var t=0,r=e.length;t<r;t++){var i=e[t];if(n(i,t,e))return y.some(i)}return y.none()}(e,function(e){return e.search(t)})},Fn=function(e,t){return Bn(e,t).map(function(e){var n=An.detect(e.versionRegexes,t);return{current:e.name,version:n}})},Hn=function(e,t){return Bn(e,t).map(function(e){var n=An.detect(e.versionRegexes,t);return{current:e.name,version:n}})},Gn=function(e,n){return-1!==e.indexOf(n)},Wn=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Xn=function(n){return function(e){return Gn(e,n)}},$n=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return Gn(e,"edge/")&&Gn(e,"chrome")&&Gn(e,"safari")&&Gn(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Wn],search:function(e){return Gn(e,"chrome")&&!Gn(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return Gn(e,"msie")||Gn(e,"trident")}},{name:"Opera",versionRegexes:[Wn,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Xn("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Xn("firefox")},{name:"Safari",versionRegexes:[Wn,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(Gn(e,"safari")||Gn(e,"mobile/"))&&Gn(e,"applewebkit")}}],qn=[{name:"Windows",search:Xn("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return Gn(e,"iphone")||Gn(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Xn("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Xn("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Xn("linux"),versionRegexes:[]},{name:"Solaris",search:Xn("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Xn("freebsd"),versionRegexes:[]}],Vn={browsers:h($n),oses:h(qn)},Jn=function(e){var n,t,r,i,o,a,u,s,c,l,f,d=Vn.browsers(),m=Vn.oses(),g=Fn(d,e).fold(Rn.unknown,Rn.nu),p=Hn(m,e).fold(zn.unknown,zn.nu);return{browser:g,os:p,deviceType:(t=g,r=e,i=(n=p).isiOS()&&!0===/ipad/i.test(r),o=n.isiOS()&&!i,a=n.isAndroid()&&3===n.version.major,u=n.isAndroid()&&4===n.version.major,s=i||a||u&&!0===/mobile/i.test(r),c=n.isiOS()||n.isAndroid(),l=c&&!s,f=t.isSafari()&&n.isiOS()&&!1===/safari/i.test(r),{isiPad:h(i),isiPhone:h(o),isTablet:h(s),isPhone:h(l),isTouch:h(c),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:h(f)})}},Yn=((rn=function(){var e=s.navigator.userAgent;return Jn(e)},an=!1,function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return an||(an=!0,on=rn.apply(null,e)),on}()).browser.isIE(),function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n]}("element","offset"),function(o){o.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:yn(o).open,onSetup:function(e){return o.selection.selectorChangedWithUnbind("img:not([data-mce-object],[data-mce-placeholder]),figure.image",e.setActive).unbind}}),o.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:yn(o).open}),o.ui.registry.addContextMenu("image",{update:function(e){return Me(e)||"IMG"===e.nodeName&&!we(e)?[(i=e,{text:"Image",icon:"image",onAction:function(){var e,n,t,r=((rn=function(){var e=s.navigator.userAgent;return Jn(e)},an=!1,function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return an||(an=!0,on=rn.apply(null,e)),on}()).browser.isIE(),function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n]}("element","offset"),e=xn.fromDom(i),(n=e,t=n.dom(),y.from(t.parentNode).map(xn.fromDom)).filter(function(e){return"figure"===e.dom().nodeName.toLowerCase()}).getOr(e));o.selection.select(r.dom()),yn(o).open()}})]:[];var i}})});i.add("image",function(e){Sn(e),Yn(e),wn(e)}),function Zn(){}}(window);
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
|
-
!function(f){"use strict";var r=function(t){var e=t,n=function(){return e};return{get:n,set:function(t){e=t},clone:function(){return r(n())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.util.Tools");function n(t,e){return i(f.document.createElement("canvas"),t,e)}function o(t){return t.getContext("2d")}function i(t,e,n){return t.width=e,t.height=n,t}var e,u,c,s,l={create:n,clone:function De(t){var e;return o(e=n(t.width,t.height)).drawImage(t,0,0),e},resize:i,get2dContext:o,get3dContext:function je(t){var e=null;try{e=t.getContext("webgl")||t.getContext("experimental-webgl")}catch(n){}return e||(e=null),e}},d={getWidth:function Ue(t){return t.naturalWidth||t.width},getHeight:function Be(t){return t.naturalHeight||t.height}},h=window.Promise?window.Promise:function(){var t=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],s(t,r(o,this),r(u,this))},e=t.immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(t){f.setTimeout(t,1)};function r(t,e){return function(){t.apply(e,arguments)}}var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function i(r){var o=this;null!==this._state?e(function(){var t=o._state?r.onFulfilled:r.onRejected;if(null!==t){var e;try{e=t(o._value)}catch(n){return void r.reject(n)}r.resolve(e)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function o(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var e=t.then;if("function"==typeof e)return void s(r(e,t),r(o,this),r(u,this))}this._state=!0,this._value=t,a.call(this)}catch(n){u.call(this,n)}}function u(t){this._state=!1,this._value=t,a.call(this)}function a(){for(var t=0,e=this._deferreds.length;t<e;t++)i.call(this,this._deferreds[t]);this._deferreds=null}function c(t,e,n,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r}function s(t,e,n){var r=!1;try{t(function(t){r||(r=!0,e(t))},function(t){r||(r=!0,n(t))})}catch(o){if(r)return;r=!0,n(o)}}return t.prototype["catch"]=function(t){return this.then(null,t)},t.prototype.then=function(n,r){var o=this;return new t(function(t,e){i.call(o,new c(n,r,t,e))})},t.all=function(){var c=Array.prototype.slice.call(1===arguments.length&&n(arguments[0])?arguments[0]:arguments);return new t(function(o,i){if(0===c.length)return o([]);var u=c.length;function a(e,t){try{if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void n.call(t,function(t){a(e,t)},i)}c[e]=t,0==--u&&o(c)}catch(r){i(r)}}for(var t=0;t<c.length;t++)a(t,c[t])})},t.resolve=function(e){return e&&"object"==typeof e&&e.constructor===t?e:new t(function(t){t(e)})},t.reject=function(n){return new t(function(t,e){e(n)})},t.race=function(o){return new t(function(t,e){for(var n=0,r=o.length;n<r;n++)o[n].then(t,e)})},t}(),v=function(t){return function(){return t}},m=v(!1),g=v(!0),p=m,y=g,w=function(){return b},b=(s={fold:function(t,e){return t()},is:p,isSome:p,isNone:y,getOr:c=function(t){return t},getOrThunk:u=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:c,orThunk:u,map:w,ap:w,each:function(){},bind:w,flatten:w,exists:p,forall:y,filter:w,equals:e=function(t){return t.isNone()},equals_:e,toArray:function(){return[]},toString:v("none()")},Object.freeze&&Object.freeze(s),s),T=function(n){var t=function(){return n},e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:y,isNone:p,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return T(t(n))},ap:function(t){return t.fold(w,function(t){return T(t(n))})},each:function(t){t(n)},bind:r,flatten:t,exists:r,forall:r,filter:function(t){return t(n)?o:b},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(p,function(t){return e(n,t)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},O={some:T,none:w,from:function(t){return null===t||t===undefined?b:T(t)}},I="undefined"!=typeof f.window?f.window:Function("return this;")(),x=function(t,e){return function(t,e){for(var n=e!==undefined&&null!==e?e:I,r=0;r<t.length&&n!==undefined&&null!==n;++r)n=n[t[r]];return n}(t.split("."),e)},C={getOrDie:function(t,e){var n=x(t,e);if(n===undefined||null===n)throw t+" not available on this browser";return n}};function E(){return new(C.getOrDie("FileReader"))}var S={atob:function(t){return C.getOrDie("atob")(t)},requestAnimationFrame:function(t){C.getOrDie("requestAnimationFrame")(t)}};function N(a){return new h(function(t,e){var n=f.URL.createObjectURL(a),r=new f.Image,o=function(){r.removeEventListener("load",i),r.removeEventListener("error",u)};function i(){o(),t(r)}function u(){o(),e("Unable to load data of type "+a.type+": "+n)}r.addEventListener("load",i),r.addEventListener("error",u),r.src=n,r.complete&&i()})}function A(r){return new h(function(t,n){var e=new f.XMLHttpRequest;e.open("GET",r,!0),e.responseType="blob",e.onload=function(){200==this.status&&t(this.response)},e.onerror=function(){var t,e=this;n(0===this.status?((t=new Error("No access to download image")).code=18,t.name="SecurityError",t):new Error("Error "+e.status+" downloading image"))},e.send()})}function _(t){var e=t.split(","),n=/data:([^;]+)/.exec(e[0]);if(!n)return O.none();for(var r,o=n[1],i=e[1],u=S.atob(i),a=u.length,c=Math.ceil(a/1024),s=new Array(c),f=0;f<c;++f){for(var l=1024*f,d=Math.min(l+1024,a),h=new Array(d-l),m=l,g=0;m<d;++g,++m)h[g]=u[m].charCodeAt(0);s[f]=(r=h,new(C.getOrDie("Uint8Array"))(r))}return O.some(function v(t,e){return new(C.getOrDie("Blob"))(t,e)}(s,{type:o}))}function R(n){return new h(function(t,e){_(n).fold(function(){e("uri is not base64: "+n)},t)})}function D(n){return new h(function(t){var e=E();e.onloadend=function(){t(e.result)},e.readAsDataURL(n)})}var j={blobToImage:N,imageToBlob:function Me(t){var e=t.src;return 0===e.indexOf("data:")?R(e):A(e)},blobToArrayBuffer:function Le(n){return new h(function(t){var e=E();e.onloadend=function(){t(e.result)},e.readAsArrayBuffer(n)})},blobToDataUri:D,blobToBase64:function ke(t){return D(t).then(function(t){return t.split(",")[1]})},dataUriToBlobSync:_,canvasToBlob:function Pe(t,n,r){return n=n||"image/png",f.HTMLCanvasElement.prototype.toBlob?new h(function(e){t.toBlob(function(t){e(t)},n,r)}):R(t.toDataURL(n,r))},canvasToDataURL:function Fe(t,e,n){return e=e||"image/png",t.then(function(t){return t.toDataURL(e,n)})},blobToCanvas:function He(t){return N(t).then(function(t){var e;return function n(t){f.URL.revokeObjectURL(t.src)}(t),e=l.create(d.getWidth(t),d.getHeight(t)),l.get2dContext(e).drawImage(t,0,0),e})},uriToBlob:function ze(t){return 0===t.indexOf("blob:")?A(t):0===t.indexOf("data:")?R(t):null}},U=function(t){return j.blobToImage(t)},B=function(t){return j.imageToBlob(t)};function M(t,e,n){var r=e.type;function o(e,n){return t.then(function(t){return j.canvasToDataURL(t,e,n)})}return{getType:v(r),toBlob:function i(){return h.resolve(e)},toDataURL:function u(){return n},toBase64:function a(){return n.split(",")[1]},toAdjustedBlob:function c(e,n){return t.then(function(t){return j.canvasToBlob(t,e,n)})},toAdjustedDataURL:o,toAdjustedBase64:function s(t,e){return o(t,e).then(function(t){return t.split(",")[1]})},toCanvas:function f(){return t.then(l.clone)}}}function L(e){return j.blobToDataUri(e).then(function(t){return M(j.blobToCanvas(e),e,t)})}var k={fromBlob:L,fromCanvas:function qe(e,t){return j.canvasToBlob(e,t).then(function(t){return M(h.resolve(e),t,e.toDataURL())})},fromImage:function Ge(t){return j.imageToBlob(t).then(function(t){return L(t)})},fromBlobAndUrlSync:function(t,e){return M(j.blobToCanvas(t),t,e)}};function P(t,e,n){return n<(t=parseFloat(t))?t=n:t<e&&(t=e),t}var F=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10];function H(t,e){var n,r,o,i,u=[],a=new Array(10);for(n=0;n<5;n++){for(r=0;r<5;r++)u[r]=e[r+5*n];for(r=0;r<5;r++){for(o=i=0;o<5;o++)i+=t[r+5*o]*u[o];a[r+5*n]=i}}return a}function z(t,n){return n=P(n,0,1),t.map(function(t,e){return e%6==0?t=1-(1-t)*n:t*=n,P(t,0,1)})}var q={identity:function We(){return[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1]},adjust:z,multiply:H,adjustContrast:function $e(t,e){var n;return e=P(e,-1,1),H(t,[(n=(e*=100)<0?127+e/100*127:127*(n=0==(n=e%1)?F[e]:F[Math.floor(e)]*(1-n)+F[Math.floor(e)+1]*n)+127)/127,0,0,0,.5*(127-n),0,n/127,0,0,.5*(127-n),0,0,n/127,0,.5*(127-n),0,0,0,1,0,0,0,0,0,1])},adjustBrightness:function Xe(t,e){return H(t,[1,0,0,0,e=P(255*e,-255,255),0,1,0,0,e,0,0,1,0,e,0,0,0,1,0,0,0,0,0,1])},adjustSaturation:function Ve(t,e){var n;return H(t,[.3086*(1-(n=1+(0<(e=P(e,-1,1))?3*e:e)))+n,.6094*(1-n),.082*(1-n),0,0,.3086*(1-n),.6094*(1-n)+n,.082*(1-n),0,0,.3086*(1-n),.6094*(1-n),.082*(1-n)+n,0,0,0,0,0,1,0,0,0,0,0,1])},adjustHue:function Ye(t,e){var n,r,o,i,u;return e=P(e,-180,180)/180*Math.PI,H(t,[(o=.213)+.787*(n=Math.cos(e))+(r=Math.sin(e))*-o,(i=.715)+n*-i+r*-i,(u=.072)+n*-u+.928*r,0,0,o+n*-o+.143*r,i+n*(1-i)+.14*r,u+n*-u+-.283*r,0,0,o+n*-o+-.787*r,i+n*-i+r*i,u+.928*n+r*u,0,0,0,0,0,1,0,0,0,0,0,1])},adjustColors:function Je(t,e,n,r){return H(t,[e=P(e,0,2),0,0,0,0,0,n=P(n,0,2),0,0,0,0,0,r=P(r,0,2),0,0,0,0,0,1,0,0,0,0,0,1])},adjustSepia:function Ke(t,e){return H(t,z([.393,.769,.189,0,0,.349,.686,.168,0,0,.272,.534,.131,0,0,0,0,0,1,0,0,0,0,0,1],e=P(e,0,1)))},adjustGrayscale:function Qe(t,e){return H(t,z([.33,.34,.33,0,0,.33,.34,.33,0,0,.33,.34,.33,0,0,0,0,0,1,0,0,0,0,0,1],e=P(e,0,1)))}};function G(e,n){return e.toCanvas().then(function(t){return function i(t,e,n){var r,o=l.get2dContext(t);return r=function N(t,e){var n,r,o,i,u,a=t.data,c=e[0],s=e[1],f=e[2],l=e[3],d=e[4],h=e[5],m=e[6],g=e[7],v=e[8],p=e[9],y=e[10],w=e[11],b=e[12],T=e[13],O=e[14],I=e[15],x=e[16],C=e[17],E=e[18],S=e[19];for(u=0;u<a.length;u+=4)n=a[u],r=a[u+1],o=a[u+2],i=a[u+3],a[u]=n*c+r*s+o*f+i*l+d,a[u+1]=n*h+r*m+o*g+i*v+p,a[u+2]=n*y+r*w+o*b+i*T+O,a[u+3]=n*I+r*x+o*C+i*E+S;return t}(o.getImageData(0,0,t.width,t.height),n),o.putImageData(r,0,0),k.fromCanvas(t,e)}(t,e.getType(),n)})}function W(e,n){return e.toCanvas().then(function(t){return function u(t,e,n){var r,o,i=l.get2dContext(t);return r=i.getImageData(0,0,t.width,t.height),o=i.getImageData(0,0,t.width,t.height),o=function T(t,e,n){var r,o,i,u,a,c,s,f,l,d,h,m,g,v,p,y,w;function b(t,e,n){return n<t?t=n:t<e&&(t=e),t}for(i=Math.round(Math.sqrt(n.length)),u=Math.floor(i/2),r=t.data,o=e.data,y=t.width,w=t.height,c=0;c<w;c++)for(a=0;a<y;a++){for(s=f=l=0,h=0;h<i;h++)for(d=0;d<i;d++)m=b(a+d-u,0,y-1),g=b(c+h-u,0,w-1),v=4*(g*y+m),p=n[h*i+d],s+=r[v]*p,f+=r[v+1]*p,l+=r[v+2]*p;o[v=4*(c*y+a)]=b(s,0,255),o[v+1]=b(f,0,255),o[v+2]=b(l,0,255)}return e}(r,o,n),i.putImageData(o,0,0),k.fromCanvas(t,e)}(t,e.getType(),n)})}function $(c){return function(e,n){return e.toCanvas().then(function(t){return function(t,e,n){var r,o,i=l.get2dContext(t),u=new Array(256);for(o=0;o<u.length;o++)u[o]=c(o,n);return r=function a(t,e){var n,r=t.data;for(n=0;n<r.length;n+=4)r[n]=e[r[n]],r[n+1]=e[r[n+1]],r[n+2]=e[r[n+2]];return t}(i.getImageData(0,0,t.width,t.height),u),i.putImageData(r,0,0),k.fromCanvas(t,e)}(t,e.getType(),n)})}}function X(n){return function(t,e){return G(t,n(q.identity(),e))}}function V(e){return function(t){return W(t,e)}}(function Ze(e){return function(t){return G(t,e)}})([-1,0,0,0,255,0,-1,0,0,255,0,0,-1,0,255,0,0,0,1,0]),X(q.adjustBrightness),X(q.adjustHue),X(q.adjustSaturation),X(q.adjustContrast),X(q.adjustGrayscale),X(q.adjustSepia),V([0,-1,0,-1,5,-1,0,-1,0]),V([-2,-1,0,-1,1,1,0,1,2]),$(function(t,e){return 255*Math.pow(t/255,1-e)}),$(function(t,e){return 255*(1-Math.exp(-t/255*e))});var Y,J={scale:function tn(t,e,n){var r=d.getWidth(t),o=d.getHeight(t),i=e/r,u=n/o,a=!1;(i<.5||2<i)&&(i=i<.5?.5:2,a=!0),(u<.5||2<u)&&(u=u<.5?.5:2,a=!0);var c=function f(a,c,s){return new h(function(t){var e=d.getWidth(a),n=d.getHeight(a),r=Math.floor(e*c),o=Math.floor(n*s),i=l.create(r,o),u=l.get2dContext(i);u.drawImage(a,0,0,e,n,0,0,r,o),t(i)})}(t,i,u);return a?c.then(function(t){return tn(t,e,n)}):c}},K={rotate:function en(e,n){return e.toCanvas().then(function(t){return function a(t,e,n){var r=l.create(t.width,t.height),o=l.get2dContext(r),i=0,u=0;return 90!=(n=n<0?360+n:n)&&270!=n||l.resize(r,r.height,r.width),90!=n&&180!=n||(i=r.width),270!=n&&180!=n||(u=r.height),o.translate(i,u),o.rotate(n*Math.PI/180),o.drawImage(t,0,0),k.fromCanvas(r,e)}(t,e.getType(),n)})},flip:function nn(e,n){return e.toCanvas().then(function(t){return function i(t,e,n){var r=l.create(t.width,t.height),o=l.get2dContext(r);return"v"==n?(o.scale(1,-1),o.drawImage(t,0,-r.height)):(o.scale(-1,1),o.drawImage(t,-r.width,0)),k.fromCanvas(r,e)}(t,e.getType(),n)})},crop:function rn(e,n,r,o,i){return e.toCanvas().then(function(t){return function a(t,e,n,r,o,i){var u=l.create(o,i);return l.get2dContext(u).drawImage(t,-n,-r),k.fromCanvas(u,e)}(t,e.getType(),n,r,o,i)})},resize:function on(e,n,r){return e.toCanvas().then(function(t){return J.scale(t,n,r).then(function(t){return k.fromCanvas(t,e.getType())})})}},Q=(function(){function t(t){this.littleEndian=!1,this._dv=new DataView(t)}t.prototype.readByteAt=function(t){return this._dv.getUint8(t)},t.prototype.read=function(t,e){if(t+e>this.length())return null;for(var n=this.littleEndian?0:-8*(e-1),r=0,o=0;r<e;r++)o|=this.readByteAt(t+r)<<Math.abs(n+8*r);return o},t.prototype.BYTE=function(t){return this.read(t,1)},t.prototype.SHORT=function(t){return this.read(t,2)},t.prototype.LONG=function(t){return this.read(t,4)},t.prototype.SLONG=function(t){var e=this.read(t,4);return 2147483647<e?e-4294967296:e},t.prototype.CHAR=function(t){return String.fromCharCode(this.read(t,1))},t.prototype.STRING=function(t,e){return this.asArray("CHAR",t,e).join("")},t.prototype.SEGMENT=function(t,e){var n=this._dv.buffer;switch(arguments.length){case 2:return n.slice(t,t+e);case 1:return n.slice(t);default:return n}},t.prototype.asArray=function(t,e,n){for(var r=[],o=0;o<n;o++)r[o]=this[t](e+o);return r},t.prototype.length=function(){return this._dv?this._dv.byteLength:0}}(),function(t,e){return K.rotate(t,e)}),Z=function(t,e){return K.flip(t,e)},tt=Q,et=function(t){return k.fromBlob(t)},nt=function(){return C.getOrDie("URL")},rt=function(t){return nt().createObjectURL(t)},ot=function(t){nt().revokeObjectURL(t)},it=tinymce.util.Tools.resolve("tinymce.util.Delay"),ut=tinymce.util.Tools.resolve("tinymce.util.Promise"),at=tinymce.util.Tools.resolve("tinymce.util.URI"),ct={getImageSize:function un(t){var e,n;function r(t){return/^[0-9\.]+px$/.test(t)}return e=t.style.width,n=t.style.height,e||n?r(e)&&r(n)?{w:parseInt(e,10),h:parseInt(n,10)}:null:(e=t.width,n=t.height,e&&n?{w:parseInt(e,10),h:parseInt(n,10)}:null)},setImageSize:function an(t,e){var n,r;e&&(n=t.style.width,r=t.style.height,(n||r)&&(t.style.width=e.w+"px",t.style.height=e.h+"px",t.removeAttribute("data-mce-style")),n=t.width,r=t.height,(n||r)&&(t.setAttribute("width",e.w),t.setAttribute("height",e.h)))},getNaturalImageSize:function cn(t){return{w:t.naturalWidth,h:t.naturalHeight}}},st=(Y="function",function(t){return function(t){if(null===t)return"null";var e=typeof t;return"object"===e&&Array.prototype.isPrototypeOf(t)?"array":"object"===e&&String.prototype.isPrototypeOf(t)?"string":e}(t)===Y}),ft=function(t,e){for(var n=0,r=t.length;n<r;n++){var o=t[n];if(e(o,n,t))return O.some(o)}return O.none()};Array.prototype.slice;st(Array.from)&&Array.from;var lt,dt,ht,mt=function(t){return null!==t&&t!==undefined},gt=function(t,e){var n;return n=e.reduce(function(t,e){return mt(t)?t[e]:undefined},t),mt(n)?n:null},vt=function(e){return new ut(function(n){var t=E();t.onload=function(t){var e=t.target;n(e.result)},t.readAsText(e)})},pt=function(r,o,i){return new ut(function(t){var n;(n=function e(){return new(C.getOrDie("XMLHttpRequest"))}()).onreadystatechange=function(){4===n.readyState&&t({status:n.status,blob:this.response})},n.open("GET",r,!0),n.withCredentials=i,a.each(o,function(t,e){n.setRequestHeader(e,t)}),n.responseType="blob",n.send()})},yt=function(t){var e;try{e=JSON.parse(t)}catch(n){}return e},wt=[{code:404,message:"Could not find Image Proxy"},{code:403,message:"Rejected request"},{code:0,message:"Incorrect Image Proxy URL"}],bt=[{type:"key_missing",message:"The request did not include an api key."},{type:"key_not_found",message:"The provided api key could not be found."},{type:"domain_not_trusted",message:"The api key is not valid for the request origins."}],Tt=function(e){return"ImageProxy HTTP error: "+ft(wt,function(t){return e===t.code}).fold(v("Unknown ImageProxy error"),function(t){return t.message})},Ot=function(t){var e=Tt(t);return ut.reject(e)},It=function(e){return ft(bt,function(t){return t.type===e}).fold(v("Unknown service error"),function(t){return t.message})},xt=function(t,e){return vt(e).then(function(t){var e,n,r=(e=yt(t),"ImageProxy Service error: "+((n=gt(e,["error","type"]))?It(n):"Invalid JSON in service error message"));return ut.reject(r)})},Ct=function(t,e){return 400===(n=t)||403===n||500===n?xt(0,e):Ot(t);var n},Et=Ot,St=function(t,e){var n,r,o,i={"Content-Type":"application/json;charset=UTF-8","tiny-api-key":e};return pt((n=t,r=e,o=-1===n.indexOf("?")?"?":"&",/[?&]apiKey=/.test(n)||!r?n:n+o+"apiKey="+encodeURIComponent(r)),i,!1).then(function(t){return t.status<200||300<=t.status?Ct(t.status,t.blob):ut.resolve(t.blob)})},Nt=function(t,e,n){return e?St(t,e):function r(t,e){return pt(t,{},e).then(function(t){return t.status<200||300<=t.status?Et(t.status):ut.resolve(t.blob)})}(t,n)},At=function(t,e){var n=function(t,e){for(var n=0;n<t.length;n++){var r=t[n];if(r.test(e))return r}return undefined}(t,e);if(!n)return{major:0,minor:0};var r=function(t){return Number(e.replace(n,"$"+t))};return Rt(r(1),r(2))},_t=function(){return Rt(0,0)},Rt=function(t,e){return{major:t,minor:e}},Dt={nu:Rt,detect:function(t,e){var n=String(e).toLowerCase();return 0===t.length?_t():At(t,n)},unknown:_t},jt="Firefox",Ut=function(t,e){return function(){return e===t}},Bt=function(t){var e=t.current;return{current:e,version:t.version,isEdge:Ut("Edge",e),isChrome:Ut("Chrome",e),isIE:Ut("IE",e),isOpera:Ut("Opera",e),isFirefox:Ut(jt,e),isSafari:Ut("Safari",e)}},Mt={unknown:function(){return Bt({current:undefined,version:Dt.unknown()})},nu:Bt,edge:v("Edge"),chrome:v("Chrome"),ie:v("IE"),opera:v("Opera"),firefox:v(jt),safari:v("Safari")},Lt="Windows",kt="Android",Pt="Solaris",Ft="FreeBSD",Ht=function(t,e){return function(){return e===t}},zt=function(t){var e=t.current;return{current:e,version:t.version,isWindows:Ht(Lt,e),isiOS:Ht("iOS",e),isAndroid:Ht(kt,e),isOSX:Ht("OSX",e),isLinux:Ht("Linux",e),isSolaris:Ht(Pt,e),isFreeBSD:Ht(Ft,e)}},qt={unknown:function(){return zt({current:undefined,version:Dt.unknown()})},nu:zt,windows:v(Lt),ios:v("iOS"),android:v(kt),linux:v("Linux"),osx:v("OSX"),solaris:v(Pt),freebsd:v(Ft)},Gt=function(t,e){var n=String(e).toLowerCase();return ft(t,function(t){return t.search(n)})},Wt=function(t,n){return Gt(t,n).map(function(t){var e=Dt.detect(t.versionRegexes,n);return{current:t.name,version:e}})},$t=function(t,n){return Gt(t,n).map(function(t){var e=Dt.detect(t.versionRegexes,n);return{current:t.name,version:e}})},Xt=function(t,e){return-1!==t.indexOf(e)},Vt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Yt=function(e){return function(t){return Xt(t,e)}},Jt=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(t){return Xt(t,"edge/")&&Xt(t,"chrome")&&Xt(t,"safari")&&Xt(t,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Vt],search:function(t){return Xt(t,"chrome")&&!Xt(t,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(t){return Xt(t,"msie")||Xt(t,"trident")}},{name:"Opera",versionRegexes:[Vt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Yt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Yt("firefox")},{name:"Safari",versionRegexes:[Vt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(t){return(Xt(t,"safari")||Xt(t,"mobile/"))&&Xt(t,"applewebkit")}}],Kt=[{name:"Windows",search:Yt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(t){return Xt(t,"iphone")||Xt(t,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Yt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Yt("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Yt("linux"),versionRegexes:[]},{name:"Solaris",search:Yt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Yt("freebsd"),versionRegexes:[]}],Qt={browsers:v(Jt),oses:v(Kt)},Zt=function(t){var e,n,r,o,i,u,a,c,s,f,l,d=Qt.browsers(),h=Qt.oses(),m=Wt(d,t).fold(Mt.unknown,Mt.nu),g=$t(h,t).fold(qt.unknown,qt.nu);return{browser:m,os:g,deviceType:(n=m,r=t,o=(e=g).isiOS()&&!0===/ipad/i.test(r),i=e.isiOS()&&!o,u=e.isAndroid()&&3===e.version.major,a=e.isAndroid()&&4===e.version.major,c=o||u||a&&!0===/mobile/i.test(r),s=e.isiOS()||e.isAndroid(),f=s&&!c,l=n.isSafari()&&e.isiOS()&&!1===/safari/i.test(r),{isiPad:v(o),isiPhone:v(i),isTablet:v(c),isPhone:v(f),isTouch:v(s),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:v(l)})}},te={detect:(lt=function(){var t=f.navigator.userAgent;return Zt(t)},ht=!1,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return ht||(ht=!0,dt=lt.apply(null,t)),dt})},ee=function(t){if(null===t||t===undefined)throw new Error("Node cannot be null or undefined");return{dom:v(t)}},ne={fromHtml:function(t,e){var n=(e||f.document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||1<n.childNodes.length)throw f.console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return ee(n.childNodes[0])},fromTag:function(t,e){var n=(e||f.document).createElement(t);return ee(n)},fromText:function(t,e){var n=(e||f.document).createTextNode(t);return ee(n)},fromDom:ee,fromPoint:function(t,e,n){var r=t.dom();return O.from(r.elementFromPoint(e,n)).map(ee)}},re=(f.Node.ATTRIBUTE_NODE,f.Node.CDATA_SECTION_NODE,f.Node.COMMENT_NODE,f.Node.DOCUMENT_NODE,f.Node.DOCUMENT_TYPE_NODE,f.Node.DOCUMENT_FRAGMENT_NODE,f.Node.ELEMENT_NODE),oe=(f.Node.TEXT_NODE,f.Node.PROCESSING_INSTRUCTION_NODE,f.Node.ENTITY_REFERENCE_NODE,f.Node.ENTITY_NODE,f.Node.NOTATION_NODE,re),ie=(te.detect().browser.isIE(),0),ue=function(t){return te.detect().browser.isIE(),e=ne.fromDom(t),n="img",r=function(t){return function(t,e){var n=t.dom();if(n.nodeType!==oe)return!1;if(n.matches!==undefined)return n.matches(e);if(n.msMatchesSelector!==undefined)return n.msMatchesSelector(e);if(n.webkitMatchesSelector!==undefined)return n.webkitMatchesSelector(e);if(n.mozMatchesSelector!==undefined)return n.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}(t,n)},ft(e.dom().childNodes,(o=r,i=ne.fromDom,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(i.apply(null,t))})).map(ne.fromDom);var e,n,r,o,i},ae=function(t,e){return t.dom.is(e,"figure")},ce=function(t,e){t.notificationManager.open({text:e,type:"error"})},se=function(t){var e=t.selection.getNode();return ae(t,e)?ue(e):O.some(ne.fromDom(e))},fe=function(t,e){var n=e.src;return 0===n.indexOf("data:")||0===n.indexOf("blob:")||new at(n).host===t.documentBaseURI.host},le=function(t,e){return-1!==a.inArray(t.getParam("imagetools_cors_hosts",[],"string[]"),new at(e.src).host)},de=function(t,e){var n,r,o,i,u=e.src;return le(t,e)?Nt(e.src,null,(r=t,o=e,-1!==a.inArray(r.getParam("imagetools_credentials_hosts",[],"string[]"),new at(o.src).host))):fe(t,e)?B(e):(u=t.getParam("imagetools_proxy"),u+=(-1===u.indexOf("?")?"?":"&")+"url="+encodeURIComponent(e.src),n=(i=t).getParam("api_key",i.getParam("imagetools_api_key","","string"),"string"),Nt(u,n,!1))},he=function(t,e){var n;return(n=t.editorUpload.blobCache.getByUri(e.src))?ut.resolve(n.blob()):de(t,e)},me=function(t){it.clearTimeout(t.get())},ge=function(a,c,s,f,l,d){return c.toBlob().then(function(t){var e,n,r,o,i,u;return r=a.editorUpload.blobCache,e=l.src,a.getParam("images_reuse_filename",!1,"boolean")&&(n=(o=r.getByUri(e))?(e=o.uri(),o.name()):(i=a,(u=e.match(/\/([^\/\?]+)?\.(?:jpeg|jpg|png|gif)(?:\?|$)/i))?i.dom.encode(u[1]):null)),o=r.create({id:"imagetools"+ie++,blob:t,base64:c.toBase64(),uri:e,name:n}),r.add(o),a.undoManager.transact(function(){a.$(l).on("load",function r(){var t,e,n;a.$(l).off("load",r),a.nodeChanged(),s?a.editorUpload.uploadImagesAuto():(me(f),t=a,e=f,n=it.setEditorTimeout(t,function(){t.editorUpload.uploadImagesAuto()},t.getParam("images_upload_timeout",3e4,"number")),e.set(n))}),d&&a.$(l).attr({width:d.w,height:d.h}),a.$(l).attr({src:o.blobUri()}).removeAttr("data-mce-src")}),o})},ve=function(n,r,t,o){return function(){return se(n).fold(function(){ce(n,"Could not find selected image")},function(e){return n._scanForImages().then(function(){return he(n,e.dom())}).then(et).then(t).then(function(t){return ge(n,t,!1,r,e.dom(),o)},function(t){ce(n,t)})})}},pe=function(e,n,r){return function(){var t=se(e).fold(function(){return null},function(t){var e=ct.getImageSize(t.dom());return e?{w:e.h,h:e.w}:null});return ve(e,n,function(t){return tt(t,r)},t)()}},ye=function(t,e,n){return function(){return ve(t,e,function(t){return Z(t,n)})()}},we=function(n,t){var e=function(t){return e=t,n.dom.is(e,"img:not([data-mce-object],[data-mce-placeholder])")&&(fe(n,t)||le(n,t)||n.settings.imagetools_proxy);var e};return ae(n,t)?ue(t).map(function(t){return e(t.dom())?O.some(t.dom()):O.none()}):e(t)?O.some(t):O.none()},be=me,Te=he,Oe=se,Ie=function(e,n,r,o,i){return new ut(function(t){U(i).then(function(t){var e=ct.getNaturalImageSize(t);return o.w===e.w&&o.h===e.h||ct.getImageSize(r)&&ct.setImageSize(r,e),ot(t.src),i}).then(et).then(function(t){return ge(e,t,!0,n,r)},function(){})})},xe=v("save-state"),Ce=v("disable"),Ee=v("enable"),Se=function(i,u){return function(){var r=Oe(i),o=r.map(function(t){return ct.getNaturalImageSize(t.dom())});Oe(i).each(function(e){we(i,e.dom()).each(function(t){Te(i,e.dom()).then(function(t){var e,n={blob:e=t,url:rt(e)};i.windowManager.open({title:"Edit Image",size:"large",body:{type:"panel",items:[{type:"imagetools",name:"imagetools",label:"Edit Image",currentState:n}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0,disabled:!0}],onSubmit:function(t){var n=t.getData().imagetools.blob;r.each(function(e){o.each(function(t){Ie(i,u,e.dom(),t,n)})}),t.close()},onCancel:function(){},onAction:function(t,e){switch(e.name){case xe():e.value?t.enable("save"):t.disable("save");break;case Ce():t.disable("save"),t.disable("cancel");break;case Ee():t.enable("cancel")}}})})})})}},Ne=function(n,t){a.each({mceImageRotateLeft:pe(n,t,-90),mceImageRotateRight:pe(n,t,90),mceImageFlipVertical:ye(n,t,"v"),mceImageFlipHorizontal:ye(n,t,"h"),mceEditImage:Se(n,t)},function(t,e){n.addCommand(e,t)})},Ae=function(n,r,o){n.on("NodeChange",function(t){var e=o.get();e&&e.src!==t.element.src&&(be(r),n.editorUpload.uploadImagesAuto(),o.set(null)),we(n,t.element).each(o.set)})},_e=function(r){var e=function(t){return function(){return r.execCommand(t)}};r.ui.registry.addButton("rotateleft",{tooltip:"Rotate counterclockwise",icon:"rotate-left",onAction:e("mceImageRotateLeft")}),r.ui.registry.addButton("rotateright",{tooltip:"Rotate clockwise",icon:"rotate-right",onAction:e("mceImageRotateRight")}),r.ui.registry.addButton("flipv",{tooltip:"Flip vertically",icon:"flip-vertically",onAction:e("mceImageFlipVertical")}),r.ui.registry.addButton("fliph",{tooltip:"Flip horizontally",icon:"flip-horizontally",onAction:e("mceImageFlipHorizontal")}),r.ui.registry.addButton("editimage",{tooltip:"Edit image",icon:"edit-image",onAction:e("mceEditImage"),onSetup:function(n){var t=function(){Oe(r).each(function(t){var e=we(r,t.dom()).isNone();n.setDisabled(e)})};return r.on("NodeChange",t),function(){r.off("NodeChange",t)}}}),r.ui.registry.addButton("imageoptions",{tooltip:"Image options",icon:"image-options",onAction:e("mceImage")}),r.ui.registry.addContextMenu("imagetools",{update:function(t){return we(r,t).fold(function(){return[]},function(t){return[{text:"Edit image",icon:"edit-image",onAction:e("mceEditImage")}]})}})},Re=function(e){var t;e.ui.registry.addContextToolbar("imagetools",{items:(t=e,t.getParam("imagetools_toolbar","rotateleft rotateright flipv fliph editimage imageoptions")),predicate:function(t){return we(e,t).isSome()},position:"node",scope:"node"})};t.add("imagetools",function(t){var e=r(0),n=r(null);Ne(t,e),_e(t),Re(t),Ae(t,e,n)}),function sn(){}}(window);
|
9
|
+
!function(l){"use strict";var e,n,t,r,o=function(e){var n=e,t=function(){return n};return{get:t,set:function(e){n=e},clone:function(){return o(t())}}},i=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),v=function(e){return function(){return e}},u=v(!1),c=v(!0),s=u,f=c,d=function(){return m},m=(r={fold:function(e,n){return e()},is:s,isSome:s,isNone:f,getOr:t=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:t,orThunk:n,map:d,ap:d,each:function(){},bind:d,flatten:d,exists:s,forall:f,filter:d,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:v("none()")},Object.freeze&&Object.freeze(r),r),h=function(t){var e=function(){return t},n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:f,isNone:s,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return h(e(t))},ap:function(e){return e.fold(d,function(e){return h(e(t))})},each:function(e){e(t)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){return e(t)?o:m},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(s,function(e){return n(t,e)})},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},p={some:h,none:d,from:function(e){return null===e||e===undefined?m:h(e)}},g="undefined"!=typeof l.window?l.window:Function("return this;")(),y=function(e,n){return function(e,n){for(var t=n!==undefined&&null!==n?n:g,r=0;r<e.length&&t!==undefined&&null!==t;++r)t=t[e[r]];return t}(e.split("."),n)},w={getOrDie:function(e,n){var t=y(e,n);if(t===undefined||null===t)throw e+" not available on this browser";return t}};function b(){return new(w.getOrDie("FileReader"))}var O={atob:function(e){return w.getOrDie("atob")(e)},requestAnimationFrame:function(e){w.getOrDie("requestAnimationFrame")(e)}};function E(e,n){return N(l.document.createElement("canvas"),e,n)}function I(e){var n=E(e.width,e.height);return T(n).drawImage(e,0,0),n}function T(e){return e.getContext("2d")}function N(e,n,t){return e.width=n,e.height=t,e}var S=window.Promise?window.Promise:function(){var i=function(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],f(e,r(o,this),r(a,this))},e=i.immediateFn||"function"==typeof window.setImmediate&&window.setImmediate||function(e){l.setTimeout(e,1)};function r(e,n){return function(){return e.apply(n,arguments)}}var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function u(r){var o=this;null!==this._state?e(function(){var e=o._state?r.onFulfilled:r.onRejected;if(null!==e){var n;try{n=e(o._value)}catch(t){return void r.reject(t)}r.resolve(n)}else(o._state?r.resolve:r.reject)(o._value)}):this._deferreds.push(r)}function o(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void f(r(n,e),r(o,this),r(a,this))}this._state=!0,this._value=e,c.call(this)}catch(t){a.call(this,t)}}function a(e){this._state=!1,this._value=e,c.call(this)}function c(){for(var e=0,n=this._deferreds;e<n.length;e++){var t=n[e];u.call(this,t)}this._deferreds=[]}function s(e,n,t,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.resolve=t,this.reject=r}function f(e,n,t){var r=!1;try{e(function(e){r||(r=!0,n(e))},function(e){r||(r=!0,t(e))})}catch(o){if(r)return;r=!0,t(o)}}return i.prototype["catch"]=function(e){return this.then(null,e)},i.prototype.then=function(t,r){var o=this;return new i(function(e,n){u.call(o,new s(t,r,e,n))})},i.all=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var c=Array.prototype.slice.call(1===e.length&&t(e[0])?e[0]:e);return new i(function(o,i){if(0===c.length)return o([]);var u=c.length;function a(n,e){try{if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void t.call(e,function(e){a(n,e)},i)}c[n]=e,0==--u&&o(c)}catch(r){i(r)}}for(var e=0;e<c.length;e++)a(e,c[e])})},i.resolve=function(n){return n&&"object"==typeof n&&n.constructor===i?n:new i(function(e){e(n)})},i.reject=function(t){return new i(function(e,n){n(t)})},i.race=function(o){return new i(function(e,n){for(var t=0,r=o;t<r.length;t++)r[t].then(e,n)})},i}();function x(e){var n=e.src;return 0===n.indexOf("data:")?A(n):function t(r){return new S(function(e,t){var n=new l.XMLHttpRequest;n.open("GET",r,!0),n.responseType="blob",n.onload=function(){200===this.status&&e(this.response)},n.onerror=function(){var e,n=this;t(0===this.status?((e=new Error("No access to download image")).code=18,e.name="SecurityError",e):new Error("Error "+n.status+" downloading image"))},n.send()})}(n)}function _(a){return new S(function(e,n){var t=l.URL.createObjectURL(a),r=new l.Image,o=function(){r.removeEventListener("load",i),r.removeEventListener("error",u)};function i(){o(),e(r)}function u(){o(),n("Unable to load data of type "+a.type+": "+t)}r.addEventListener("load",i),r.addEventListener("error",u),r.src=t,r.complete&&i()})}function R(e){var n=e.split(","),t=/data:([^;]+)/.exec(n[0]);if(!t)return p.none();for(var r,o=t[1],i=n[1],u=O.atob(i),a=u.length,c=Math.ceil(a/1024),s=new Array(c),f=0;f<c;++f){for(var l=1024*f,d=Math.min(l+1024,a),m=new Array(d-l),h=l,g=0;h<d;++g,++h)m[g]=u[h].charCodeAt(0);s[f]=(r=m,new(w.getOrDie("Uint8Array"))(r))}return p.some(function v(e,n){return new(w.getOrDie("Blob"))(e,n)}(s,{type:o}))}function A(t){return new S(function(e,n){R(t).fold(function(){n("uri is not base64: "+t)},e)})}function D(e,r,o){return r=r||"image/png",l.HTMLCanvasElement.prototype.toBlob?new S(function(n,t){e.toBlob(function(e){e?n(e):t()},r,o)}):A(e.toDataURL(r,o))}function C(e){return _(e).then(function(e){!function t(e){l.URL.revokeObjectURL(e.src)}(e);var n=E(function r(e){return e.naturalWidth||e.width}(e),function o(e){return e.naturalHeight||e.height}(e));return T(n).drawImage(e,0,0),n})}function U(e,n,t){var r=n.type;function o(n,t){return e.then(function(e){return function r(e,n,t){return n=n||"image/png",e.toDataURL(n,t)}(e,n,t)})}return{getType:v(r),toBlob:function i(){return S.resolve(n)},toDataURL:function u(){return t},toBase64:function a(){return t.split(",")[1]},toAdjustedBlob:function c(n,t){return e.then(function(e){return D(e,n,t)})},toAdjustedDataURL:o,toAdjustedBase64:function s(e,n){return o(e,n).then(function(e){return e.split(",")[1]})},toCanvas:function f(){return e.then(I)}}}function j(n){return function e(t){return new S(function(e){var n=b();n.onloadend=function(){e(n.result)},n.readAsDataURL(t)})}(n).then(function(e){return U(C(n),n,e)})}function L(n,e){return D(n,e).then(function(e){return U(S.resolve(n),e,n.toDataURL())})}function k(n,t){return n.toCanvas().then(function(e){return function a(e,n,t){var r=E(e.width,e.height),o=T(r),i=0,u=0;return 90!==(t=t<0?360+t:t)&&270!==t||N(r,r.height,r.width),90!==t&&180!==t||(i=r.width),270!==t&&180!==t||(u=r.height),o.translate(i,u),o.rotate(t*Math.PI/180),o.drawImage(e,0,0),L(r,n)}(e,n.getType(),t)})}function P(n,t){return n.toCanvas().then(function(e){return function i(e,n,t){var r=E(e.width,e.height),o=T(r);return"v"===t?(o.scale(1,-1),o.drawImage(e,0,-r.height)):(o.scale(-1,1),o.drawImage(e,-r.width,0)),L(r,n)}(e,n.getType(),t)})}(function pn(e){return x(e).then(function(e){return j(e)})});var M,F=function(e){return j(e)},B=function(){return w.getOrDie("URL")},z=function(e){return B().createObjectURL(e)},H=function(e){B().revokeObjectURL(e)},q=tinymce.util.Tools.resolve("tinymce.util.Delay"),$=tinymce.util.Tools.resolve("tinymce.util.Promise"),X=tinymce.util.Tools.resolve("tinymce.util.URI"),W={getImageSize:function yn(e){var n,t;function r(e){return/^[0-9\.]+px$/.test(e)}return n=e.style.width,t=e.style.height,n||t?r(n)&&r(t)?{w:parseInt(n,10),h:parseInt(t,10)}:null:(n=e.width,t=e.height,n&&t?{w:parseInt(n,10),h:parseInt(t,10)}:null)},setImageSize:function wn(e,n){var t,r;n&&(t=e.style.width,r=e.style.height,(t||r)&&(e.style.width=n.w+"px",e.style.height=n.h+"px",e.removeAttribute("data-mce-style")),t=e.width,r=e.height,(t||r)&&(e.setAttribute("width",n.w),e.setAttribute("height",n.h)))},getNaturalImageSize:function bn(e){return{w:e.naturalWidth,h:e.naturalHeight}}},G=(M="function",function(e){return function(e){if(null===e)return"null";var n=typeof e;return"object"===n&&Array.prototype.isPrototypeOf(e)?"array":"object"===n&&String.prototype.isPrototypeOf(e)?"string":n}(e)===M}),V=function(e,n){for(var t=0,r=e.length;t<r;t++){var o=e[t];if(n(o,t,e))return p.some(o)}return p.none()};Array.prototype.slice;G(Array.from)&&Array.from;var Y,J,K,Q=function(e){return null!==e&&e!==undefined},Z=function(e,n){var t;return t=n.reduce(function(e,n){return Q(e)?e[n]:undefined},e),Q(t)?t:null},ee=function(n){return new $(function(t){var e=b();e.onload=function(e){var n=e.target;t(n.result)},e.readAsText(n)})},ne=function(r,o,i){return new $(function(e){var t;(t=function n(){return new(w.getOrDie("XMLHttpRequest"))}()).onreadystatechange=function(){4===t.readyState&&e({status:t.status,blob:this.response})},t.open("GET",r,!0),t.withCredentials=i,a.each(o,function(e,n){t.setRequestHeader(n,e)}),t.responseType="blob",t.send()})},te=function(e){var n;try{n=JSON.parse(e)}catch(t){}return n},re=[{code:404,message:"Could not find Image Proxy"},{code:403,message:"Rejected request"},{code:0,message:"Incorrect Image Proxy URL"}],oe=[{type:"key_missing",message:"The request did not include an api key."},{type:"key_not_found",message:"The provided api key could not be found."},{type:"domain_not_trusted",message:"The api key is not valid for the request origins."}],ie=function(n){return"ImageProxy HTTP error: "+V(re,function(e){return n===e.code}).fold(v("Unknown ImageProxy error"),function(e){return e.message})},ue=function(e){var n=ie(e);return $.reject(n)},ae=function(n){return V(oe,function(e){return e.type===n}).fold(v("Unknown service error"),function(e){return e.message})},ce=function(e,n){return ee(n).then(function(e){var n,t,r=(n=te(e),"ImageProxy Service error: "+((t=Z(n,["error","type"]))?ae(t):"Invalid JSON in service error message"));return $.reject(r)})},se=function(e,n){return 400===(t=e)||403===t||500===t?ce(0,n):ue(e);var t},fe=ue,le=function(e,n){var t,r,o,i={"Content-Type":"application/json;charset=UTF-8","tiny-api-key":n};return ne((t=e,r=n,o=-1===t.indexOf("?")?"?":"&",/[?&]apiKey=/.test(t)||!r?t:t+o+"apiKey="+encodeURIComponent(r)),i,!1).then(function(e){return e.status<200||300<=e.status?se(e.status,e.blob):$.resolve(e.blob)})},de=function(e,n,t){return n?le(e,n):function r(e,n){return ne(e,{},n).then(function(e){return e.status<200||300<=e.status?fe(e.status):$.resolve(e.blob)})}(e,t)},me=function(e,n){var t=function(e,n){for(var t=0;t<e.length;t++){var r=e[t];if(r.test(n))return r}return undefined}(e,n);if(!t)return{major:0,minor:0};var r=function(e){return Number(n.replace(t,"$"+e))};return ge(r(1),r(2))},he=function(){return ge(0,0)},ge=function(e,n){return{major:e,minor:n}},ve={nu:ge,detect:function(e,n){var t=String(n).toLowerCase();return 0===e.length?he():me(e,t)},unknown:he},pe="Firefox",ye=function(e,n){return function(){return n===e}},we=function(e){var n=e.current;return{current:n,version:e.version,isEdge:ye("Edge",n),isChrome:ye("Chrome",n),isIE:ye("IE",n),isOpera:ye("Opera",n),isFirefox:ye(pe,n),isSafari:ye("Safari",n)}},be={unknown:function(){return we({current:undefined,version:ve.unknown()})},nu:we,edge:v("Edge"),chrome:v("Chrome"),ie:v("IE"),opera:v("Opera"),firefox:v(pe),safari:v("Safari")},Oe="Windows",Ee="Android",Ie="Solaris",Te="FreeBSD",Ne=function(e,n){return function(){return n===e}},Se=function(e){var n=e.current;return{current:n,version:e.version,isWindows:Ne(Oe,n),isiOS:Ne("iOS",n),isAndroid:Ne(Ee,n),isOSX:Ne("OSX",n),isLinux:Ne("Linux",n),isSolaris:Ne(Ie,n),isFreeBSD:Ne(Te,n)}},xe={unknown:function(){return Se({current:undefined,version:ve.unknown()})},nu:Se,windows:v(Oe),ios:v("iOS"),android:v(Ee),linux:v("Linux"),osx:v("OSX"),solaris:v(Ie),freebsd:v(Te)},_e=function(e,n){var t=String(n).toLowerCase();return V(e,function(e){return e.search(t)})},Re=function(e,t){return _e(e,t).map(function(e){var n=ve.detect(e.versionRegexes,t);return{current:e.name,version:n}})},Ae=function(e,t){return _e(e,t).map(function(e){var n=ve.detect(e.versionRegexes,t);return{current:e.name,version:n}})},De=function(e,n){return-1!==e.indexOf(n)},Ce=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ue=function(n){return function(e){return De(e,n)}},je=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return De(e,"edge/")&&De(e,"chrome")&&De(e,"safari")&&De(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Ce],search:function(e){return De(e,"chrome")&&!De(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return De(e,"msie")||De(e,"trident")}},{name:"Opera",versionRegexes:[Ce,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ue("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ue("firefox")},{name:"Safari",versionRegexes:[Ce,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(De(e,"safari")||De(e,"mobile/"))&&De(e,"applewebkit")}}],Le=[{name:"Windows",search:Ue("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return De(e,"iphone")||De(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ue("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Ue("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ue("linux"),versionRegexes:[]},{name:"Solaris",search:Ue("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ue("freebsd"),versionRegexes:[]}],ke={browsers:v(je),oses:v(Le)},Pe=function(e){var n,t,r,o,i,u,a,c,s,f,l,d=ke.browsers(),m=ke.oses(),h=Re(d,e).fold(be.unknown,be.nu),g=Ae(m,e).fold(xe.unknown,xe.nu);return{browser:h,os:g,deviceType:(t=h,r=e,o=(n=g).isiOS()&&!0===/ipad/i.test(r),i=n.isiOS()&&!o,u=n.isAndroid()&&3===n.version.major,a=n.isAndroid()&&4===n.version.major,c=o||u||a&&!0===/mobile/i.test(r),s=n.isiOS()||n.isAndroid(),f=s&&!c,l=t.isSafari()&&n.isiOS()&&!1===/safari/i.test(r),{isiPad:v(o),isiPhone:v(i),isTablet:v(c),isPhone:v(f),isTouch:v(s),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:v(l)})}},Me={detect:(Y=function(){var e=l.navigator.userAgent;return Pe(e)},K=!1,function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return K||(K=!0,J=Y.apply(null,e)),J})},Fe=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:v(e)}},Be={fromHtml:function(e,n){var t=(n||l.document).createElement("div");if(t.innerHTML=e,!t.hasChildNodes()||1<t.childNodes.length)throw l.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Fe(t.childNodes[0])},fromTag:function(e,n){var t=(n||l.document).createElement(e);return Fe(t)},fromText:function(e,n){var t=(n||l.document).createTextNode(e);return Fe(t)},fromDom:Fe,fromPoint:function(e,n,t){var r=e.dom();return p.from(r.elementFromPoint(n,t)).map(Fe)}},ze=(l.Node.ATTRIBUTE_NODE,l.Node.CDATA_SECTION_NODE,l.Node.COMMENT_NODE,l.Node.DOCUMENT_NODE,l.Node.DOCUMENT_TYPE_NODE,l.Node.DOCUMENT_FRAGMENT_NODE,l.Node.ELEMENT_NODE),He=(l.Node.TEXT_NODE,l.Node.PROCESSING_INSTRUCTION_NODE,l.Node.ENTITY_REFERENCE_NODE,l.Node.ENTITY_NODE,l.Node.NOTATION_NODE,ze),qe=(Me.detect().browser.isIE(),0),$e=function(e){return Me.detect().browser.isIE(),n=Be.fromDom(e),t="img",r=function(e){return function(e,n){var t=e.dom();if(t.nodeType!==He)return!1;if(t.matches!==undefined)return t.matches(n);if(t.msMatchesSelector!==undefined)return t.msMatchesSelector(n);if(t.webkitMatchesSelector!==undefined)return t.webkitMatchesSelector(n);if(t.mozMatchesSelector!==undefined)return t.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")}(e,t)},V(n.dom().childNodes,(o=r,i=Be.fromDom,function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return o(i.apply(null,e))})).map(Be.fromDom);var n,t,r,o,i},Xe=function(e,n){return e.dom.is(n,"figure")},We=function(e,n){e.notificationManager.open({text:n,type:"error"})},Ge=function(e){var n=e.selection.getNode();return Xe(e,n)?$e(n):p.some(Be.fromDom(n))},Ve=function(e,n){var t=n.src;return 0===t.indexOf("data:")||0===t.indexOf("blob:")||new X(t).host===e.documentBaseURI.host},Ye=function(e,n){return-1!==a.inArray(e.getParam("imagetools_cors_hosts",[],"string[]"),new X(n.src).host)},Je=function(e,n){var t,r,o,i,u=n.src;return Ye(e,n)?de(n.src,null,(r=e,o=n,-1!==a.inArray(r.getParam("imagetools_credentials_hosts",[],"string[]"),new X(o.src).host))):Ve(e,n)?x(n):(u=e.getParam("imagetools_proxy"),u+=(-1===u.indexOf("?")?"?":"&")+"url="+encodeURIComponent(n.src),t=(i=e).getParam("api_key",i.getParam("imagetools_api_key","","string"),"string"),de(u,t,!1))},Ke=function(e,n){var t;return(t=e.editorUpload.blobCache.getByUri(n.src))?$.resolve(t.blob()):Je(e,n)},Qe=function(e){q.clearTimeout(e.get())},Ze=function(a,c,s,f,l,d){return c.toBlob().then(function(e){var n,t,r,o,i,u;return r=a.editorUpload.blobCache,n=l.src,a.getParam("images_reuse_filename",!1,"boolean")&&(t=(o=r.getByUri(n))?(n=o.uri(),o.name()):(i=a,(u=n.match(/\/([^\/\?]+)?\.(?:jpeg|jpg|png|gif)(?:\?|$)/i))?i.dom.encode(u[1]):null)),o=r.create({id:"imagetools"+qe++,blob:e,base64:c.toBase64(),uri:n,name:t}),r.add(o),a.undoManager.transact(function(){a.$(l).on("load",function r(){var e,n,t;a.$(l).off("load",r),a.nodeChanged(),s?a.editorUpload.uploadImagesAuto():(Qe(f),e=a,n=f,t=q.setEditorTimeout(e,function(){e.editorUpload.uploadImagesAuto()},e.getParam("images_upload_timeout",3e4,"number")),n.set(t))}),d&&a.$(l).attr({width:d.w,height:d.h}),a.$(l).attr({src:o.blobUri()}).removeAttr("data-mce-src")}),o})},en=function(t,r,e,o){return function(){return Ge(t).fold(function(){We(t,"Could not find selected image")},function(n){return t._scanForImages().then(function(){return Ke(t,n.dom())}).then(F).then(e).then(function(e){return Ze(t,e,!1,r,n.dom(),o)},function(e){We(t,e)})})}},nn=function(n,t,r){return function(){var e=Ge(n).fold(function(){return null},function(e){var n=W.getImageSize(e.dom());return n?{w:n.h,h:n.w}:null});return en(n,t,function(e){return k(e,r)},e)()}},tn=function(e,n,t){return function(){return en(e,n,function(e){return P(e,t)})()}},rn=function(t,e){var n=function(e){return n=e,t.dom.is(n,"img:not([data-mce-object],[data-mce-placeholder])")&&(Ve(t,e)||Ye(t,e)||t.settings.imagetools_proxy);var n};return Xe(t,e)?$e(e).map(function(e){return n(e.dom())?p.some(e.dom()):p.none()}):n(e)?p.some(e):p.none()},on=Qe,un=Ke,an=Ge,cn=function(t,r,o,i,u){return new $(function(e){var n;(n=u,_(n)).then(function(e){var n=W.getNaturalImageSize(e);return i.w===n.w&&i.h===n.h||W.getImageSize(o)&&W.setImageSize(o,n),H(e.src),u}).then(F).then(function(e){return Ze(t,e,!0,r,o)},function(){})})},sn=v("save-state"),fn=v("disable"),ln=v("enable"),dn=function(i,u){return function(){var r=an(i),o=r.map(function(e){return W.getNaturalImageSize(e.dom())});an(i).each(function(n){rn(i,n.dom()).each(function(e){un(i,n.dom()).then(function(e){var n,t={blob:n=e,url:z(n)};i.windowManager.open({title:"Edit Image",size:"large",body:{type:"panel",items:[{type:"imagetools",name:"imagetools",label:"Edit Image",currentState:t}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0,disabled:!0}],onSubmit:function(e){var t=e.getData().imagetools.blob;r.each(function(n){o.each(function(e){cn(i,u,n.dom(),e,t)})}),e.close()},onCancel:function(){},onAction:function(e,n){switch(n.name){case sn():n.value?e.enable("save"):e.disable("save");break;case fn():e.disable("save"),e.disable("cancel");break;case ln():e.enable("cancel")}}})})})})}},mn=function(t,e){a.each({mceImageRotateLeft:nn(t,e,-90),mceImageRotateRight:nn(t,e,90),mceImageFlipVertical:tn(t,e,"v"),mceImageFlipHorizontal:tn(t,e,"h"),mceEditImage:dn(t,e)},function(e,n){t.addCommand(n,e)})},hn=function(t,r,o){t.on("NodeChange",function(e){var n=o.get();n&&n.src!==e.element.src&&(on(r),t.editorUpload.uploadImagesAuto(),o.set(null)),rn(t,e.element).each(o.set)})},gn=function(r){var n=function(e){return function(){return r.execCommand(e)}};r.ui.registry.addButton("rotateleft",{tooltip:"Rotate counterclockwise",icon:"rotate-left",onAction:n("mceImageRotateLeft")}),r.ui.registry.addButton("rotateright",{tooltip:"Rotate clockwise",icon:"rotate-right",onAction:n("mceImageRotateRight")}),r.ui.registry.addButton("flipv",{tooltip:"Flip vertically",icon:"flip-vertically",onAction:n("mceImageFlipVertical")}),r.ui.registry.addButton("fliph",{tooltip:"Flip horizontally",icon:"flip-horizontally",onAction:n("mceImageFlipHorizontal")}),r.ui.registry.addButton("editimage",{tooltip:"Edit image",icon:"edit-image",onAction:n("mceEditImage"),onSetup:function(t){var e=function(){an(r).each(function(e){var n=rn(r,e.dom()).isNone();t.setDisabled(n)})};return r.on("NodeChange",e),function(){r.off("NodeChange",e)}}}),r.ui.registry.addButton("imageoptions",{tooltip:"Image options",icon:"image-options",onAction:n("mceImage")}),r.ui.registry.addContextMenu("imagetools",{update:function(e){return rn(r,e).fold(function(){return[]},function(e){return[{text:"Edit image",icon:"edit-image",onAction:n("mceEditImage")}]})}})},vn=function(n){var e;n.ui.registry.addContextToolbar("imagetools",{items:(e=n,e.getParam("imagetools_toolbar","rotateleft rotateright flipv fliph editimage imageoptions")),predicate:function(e){return rn(n,e).isSome()},position:"node",scope:"node"})};i.add("imagetools",function(e){var n=o(0),t=o(null);mn(e,n),gn(e),vn(e),hn(e,n,t)}),function On(){}}(window);
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(){"use strict";var t,e,n,r,i,o=tinymce.util.Tools.resolve("tinymce.PluginManager"),v=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),f=tinymce.util.Tools.resolve("tinymce.EditorManager"),m=tinymce.util.Tools.resolve("tinymce.Env"),d=tinymce.util.Tools.resolve("tinymce.util.Tools"),c=function(t){return t.getParam("importcss_merge_classes")},u=function(t){return t.getParam("importcss_exclusive")},h=function(t){return t.getParam("importcss_selector_converter")},l=function(t){return t.getParam("importcss_selector_filter")},p=function(t){return t.getParam("importcss_groups")},_=function(t){return t.getParam("importcss_append")},O=function(t){return t.getParam("importcss_file_filter")},s=function(t){return function(){return t}},a=s(!1),y=s(!0),g=function(){return x},x=(r={fold:function(t,e){return t()},is:a,isSome:a,isNone:y,getOr:n=function(t){return t},getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:n,orThunk:e,map:g,ap:g,each:function(){},bind:g,flatten:g,exists:a,forall:y,filter:g,equals:t=function(t){return t.isNone()},equals_:t,toArray:function(){return[]},toString:s("none()")},Object.freeze&&Object.freeze(r),r),T=(i="function",function(t){return function(t){if(null===t)return"null";var e=typeof t;return"object"===e&&Array.prototype.isPrototypeOf(t)?"array":"object"===e&&String.prototype.isPrototypeOf(t)?"string":e}(t)===i}),b=Array.prototype.push,k=function(t,e){return function(t){for(var e=[],n=0,r=t.length;n<r;++n){if(!Array.prototype.isPrototypeOf(t[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+t);b.apply(e,t[n])}return e}(function(t,e){for(var n=t.length,r=new Array(n),i=0;i<n;i++){var o=t[i];r[i]=e(o,i,t)}return r}(t,e))},P=(Array.prototype.slice,T(Array.from)&&Array.from,function(e){return"string"==typeof e?function(t){return-1!==t.indexOf(e)}:e instanceof RegExp?function(t){return e.test(t)}:e}),S=function(c,t,s){var a=[],n={};function l(t,e){var n,r,i,o=t.href;if(r=o,i=m.cacheSuffix,"string"==typeof r&&(r=r.replace("?"+i,"").replace("&"+i,"")),(o=r)&&s(o,e)&&!function(t,e){var n=t.settings,r=!1!==n.skin&&(n.skin||"oxide");if(r){var i=n.skin_url?t.documentBaseURI.toAbsolute(n.skin_url):f.baseURL+"/skins/ui/"+r,o=f.baseURL+"/skins/content/";return e===i+"/content"+(t.inline?".inline":"")+".min.css"||-1!==e.indexOf(o)}return!1}(c,o)){d.each(t.imports,function(t){l(t,!0)});try{n=t.cssRules||t.rules}catch(u){}d.each(n,function(t){t.styleSheet?l(t.styleSheet,!0):t.selectorText&&d.each(t.selectorText.split(","),function(t){a.push(d.trim(t))})})}}d.each(c.contentCSS,function(t){n[t]=!0}),s||(s=function(t,e){return e||n[t]});try{d.each(t.styleSheets,function(t){l(t)})}catch(e){}return a},A=function(t,e){var n,r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(e);if(r){var i=r[1],o=r[2].substr(1).split(".").join(" "),u=d.makeMap("a,img");return r[1]?(n={title:e},t.schema.getTextBlockElements()[i]?n.block=i:t.schema.getBlockElements()[i]||u[i.toLowerCase()]?n.selector=i:n.inline=i):r[2]&&(n={inline:"span",title:e.substr(1),classes:o}),!1!==c(t)?n.classes=o:n.attributes={"class":o},n}},w=function(t,e){return null===e||!1!==u(t)},E=A,I=function(g){g.on("init",function(t){var e,n,r,i,o=(e=[],n=[],r={},{addItemToGroup:function(t,e){r[t]?r[t].push(e):(n.push(t),r[t]=[e])},addItem:function(t){e.push(t)},toFormats:function(){return k(n,function(t){var e=r[t];return 0===e.length?[]:[{title:t,items:e}]}).concat(e)}}),y={},u=P(l(g)),c=(i=p(g),d.map(i,function(t){return d.extend({},t,{original:t,selectors:{},filter:P(t.filter),item:{text:t.title,menu:[]}})})),s=function(t,e){if(f=t,p=y,!(w(g,m=e)?f in p:f in m.selectors)){s=t,l=y,w(g,a=e)?l[s]=!0:a.selectors[s]=!0;var n=(o=(i=g).plugins.importcss,u=t,((c=e)&&c.selector_converter?c.selector_converter:h(i)?h(i):function(){return A(i,u)}).call(o,u,c));if(n){var r=n.name||v.DOM.uniqueId();return g.formatter.register(r,n),d.extend({},{title:n.title,format:r})}}var i,o,u,c,s,a,l,f,m,p;return null};d.each(S(g,g.getDoc(),P(O(g))),function(n){if(-1===n.indexOf(".mce-")&&(!u||u(n))){var t=(r=c,i=n,d.grep(r,function(t){return!t.filter||t.filter(i)}));if(0<t.length)d.each(t,function(t){var e=s(n,t);e&&o.addItemToGroup(t.title,e)});else{var e=s(n,null);e&&o.addItem(e)}}var r,i});var a=o.toFormats();g.fire("addStyleModifications",{items:a,replace:!_(g)})})},M=function(e){return{convertSelectorToFormat:function(t){return E(e,t)}}};o.add("importcss",function(t){return I(t),M(t)}),function j(){}}();
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))},r=function(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])},t=function(e){return e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d"))},a=n,i=r,o=function(e){var t=r(e);return 0<t.length?t[0]:n(e)},l=function(e){return e.getParam("insertdatetime_element",!1)},u="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),c="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),m="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),s="January February March April May June July August September October November December".split(" "),d=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},f=function(e,t,n){return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",d(n.getMonth()+1,2))).replace("%d",d(n.getDate(),2))).replace("%H",""+d(n.getHours(),2))).replace("%M",""+d(n.getMinutes(),2))).replace("%S",""+d(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(s[n.getMonth()]))).replace("%b",""+e.translate(m[n.getMonth()]))).replace("%A",""+e.translate(c[n.getDay()]))).replace("%a",""+e.translate(u[n.getDay()]))).replace("%%","%")},p=function(e,t){if(l(e)){var n=f(e,t),r=void 0;r=/%[HMSIp]/.test(t)?f(e,"%Y-%m-%dT%H:%M"):f(e,"%Y-%m-%d");var a=e.dom.getParent(e.selection.getStart(),"time");a?(o=a,u=r,c=n,m=(i=e).dom.create("time",{datetime:u},c),o.parentNode.insertBefore(m,o),i.dom.remove(o),i.selection.select(m,!0),i.selection.collapse(!1)):e.insertContent('<time datetime="'+r+'">'+n+"</time>")}else e.insertContent(f(e,t));var i,o,u,c,m},g=f,y=function(e){e.addCommand("mceInsertDate",function(){p(e,t(e))}),e.addCommand("mceInsertTime",function(){p(e,a(e))})},M=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return S(n())}}},v=function(n){var t=i(n),r=S(o(n));n.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:function(e){return e===r.get()},fetch:function(e){e(M.map(t,function(e){return{type:"choiceitem",text:g(n,e),value:e}}))},onAction:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];p(n,r.get())},onItemAction:function(e,t){r.set(t),p(n,t)}}),n.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:function(){return M.map(t,function(e){return{type:"menuitem",text:g(n,e),onAction:(t=e,function(){r.set(t),p(n,t)})};var t})}})};e.add("insertdatetime",function(e){y(e),v(e)}),function h(){}}();
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(e){return e.getParam("font_formats")},i=function(e){return e.getParam("fontsize_formats")},n=function(e,t){e.settings.fontsize_formats=t},s=function(e,t){e.settings.font_formats=t},o=function(e){return e.getParam("font_size_style_values")},r=function(e,t){e.settings.inline_styles=t},a=function(a){var e;r(e=a,!1),i(e)||n(e,"8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7"),t(e)||s(e,"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats"),a.on("init",function(){return e=a,t="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",i=l.explode(o(e)),n=e.schema,e.formatter.register({alignleft:{selector:t,attributes:{align:"left"}},aligncenter:{selector:t,attributes:{align:"center"}},alignright:{selector:t,attributes:{align:"right"}},alignjustify:{selector:t,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(e){return l.inArray(i,e.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),l.each("b,i,u,strike".split(","),function(e){n.addValidElements(e+"[*]")}),n.getElementRule("font")||n.addValidElements("font[face|size|color|style]"),void l.each(t.split(","),function(e){var t=n.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))});var e,t,i,n})};e.add("legacyoutput",function(e){a(e)}),function c(){}}();
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(c){"use strict";var n,t,e,r,o,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=tinymce.util.Tools.resolve("tinymce.util.VK"),a=function(n){return n.target_list},l=function(n){return n.rel_list},f=function(n){return n.link_class_list},v=function(n){return"boolean"==typeof n.link_assume_external_targets&&n.link_assume_external_targets},s=function(n){return"boolean"==typeof n.link_context_toolbar&&n.link_context_toolbar},g=function(n){return n.link_list},y=function(n){return"string"==typeof n.default_link_target},k=function(n){return n.default_link_target},m=a,d=function(n){return!1!==a(n)},h=l,p=function(n){return l(n)!==undefined},x=f,b=function(n){return f(n)!==undefined},O=function(n){return!1!==n.link_title},w=function(n){return"boolean"==typeof n.allow_unsafe_link_target&&n.allow_unsafe_link_target},_=function(n){return!0===n.link_quicklink},A=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),C=tinymce.util.Tools.resolve("tinymce.Env"),T=function(n){if(!C.ie||10<C.ie){var t=c.document.createElement("a");t.target="_blank",t.href=n,t.rel="noreferrer noopener";var e=c.document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,c.window,0,0,0,0,0,!1,!1,!1,!1,0,null),i=t,u=e,c.document.body.appendChild(i),i.dispatchEvent(u),c.document.body.removeChild(i)}else{var r=c.window.open("","_blank");if(r){r.opener=null;var o=r.document;o.open(),o.write('<meta http-equiv="refresh" content="0; url='+A.DOM.encode(n)+'">'),o.close()}}var i,u},N=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t]},S=function(n){return function(){return n}},D=S(!1),M=S(!0),L=D,E=M,U=function(){return P},P=(r={fold:function(n,t){return n()},is:L,isSome:L,isNone:E,getOr:e=function(n){return n},getOrThunk:t=function(n){return n()},getOrDie:function(n){throw new Error(n||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:e,orThunk:t,map:U,ap:U,each:function(){},bind:U,flatten:U,exists:L,forall:E,filter:U,equals:n=function(n){return n.isNone()},equals_:n,toArray:function(){return[]},toString:S("none()")},Object.freeze&&Object.freeze(r),r),R=function(e){var n=function(){return e},t=function(){return o},r=function(n){return n(e)},o={fold:function(n,t){return t(e)},is:function(n){return e===n},isSome:E,isNone:L,getOr:n,getOrThunk:n,getOrDie:n,getOrNull:n,getOrUndefined:n,or:t,orThunk:t,map:function(n){return R(n(e))},ap:function(n){return n.fold(U,function(n){return R(n(e))})},each:function(n){n(e)},bind:r,flatten:n,exists:r,forall:r,filter:function(n){return n(e)?o:P},equals:function(n){return n.is(e)},equals_:function(n,t){return n.fold(L,function(n){return t(e,n)})},toArray:function(){return[e]},toString:function(){return"some("+e+")"}};return o},z={some:R,none:U,from:function(n){return null===n||n===undefined?P:R(n)}},q=function(t){return function(n){return function(n){if(null===n)return"null";var t=typeof n;return"object"===t&&Array.prototype.isPrototypeOf(n)?"array":"object"===t&&String.prototype.isPrototypeOf(n)?"string":t}(n)===t}},K=q("string"),I=q("function"),j=(o=Array.prototype.indexOf)===undefined?function(n,t){return V(n,t)}:function(n,t){return o.call(n,t)},B=function(n,t){for(var e=0,r=n.length;e<r;e++)t(n[e],e,n)},V=function(n,t){for(var e=0,r=n.length;e<r;++e)if(n[e]===t)return e;return-1},F=Array.prototype.push,W=function(n){for(var t=[],e=0,r=n.length;e<r;++e){if(!Array.prototype.isPrototypeOf(n[e]))throw new Error("Arr.flatten item "+e+" was not an array, input: "+n);F.apply(t,n[e])}return t},H=function(n,t){var e=function(n,t){for(var e=n.length,r=new Array(e),o=0;o<e;o++){var i=n[o];r[o]=t(i,o,n)}return r}(n,t);return W(e)},$=(Array.prototype.slice,I(Array.from)&&Array.from,tinymce.util.Tools.resolve("tinymce.util.Tools")),G=function(n,t){var e,r,o=["noopener"],i=n?n.split(/\s+/):[],u=function(n){return n.filter(function(n){return-1===$.inArray(o,n)})},a=t?0<(e=u(e=i)).length?e.concat(o):o:u(i);return 0<a.length?(r=a,$.trim(r.sort().join(" "))):""},J=function(n,t){return t=t||n.selection.getNode(),Q(t)?n.dom.select("a[href]",t)[0]:n.dom.getParent(t,"a[href]")},X=function(n){return n&&"A"===n.nodeName&&!!n.href},Q=function(n){return n&&"FIGURE"===n.nodeName&&/\bimage\b/i.test(n.className)},Y=function(n){return t=["title","rel","class","target"],e=function(t,e){return n[e].each(function(n){t[e]=0<n.length?n:null}),t},r={href:n.href},B(t,function(n){r=e(r,n)}),r;var t,e,r},Z=function(n,t){var e=n.dom.select("img",t)[0];if(e){var r=n.dom.getParents(e,"a[href]",t)[0];r&&(r.parentNode.insertBefore(e,r),n.dom.remove(r))}},nn=function(n,t,e){var r=n.dom.select("img",t)[0];if(r){var o=n.dom.create("a",e);r.parentNode.insertBefore(o,r),o.appendChild(r)}},tn=function(g,m,d){g.undoManager.transact(function(){var t,n,e,r,o,i,u,a,c=g.selection.getNode(),l=J(g,c),f=Y(d);if(!p(g.settings)&&!1===w(g.settings)){var s=G(f.rel,"_blank"===f.target);f.rel=s||null}d.href===m.href&&m.attach(),l?(g.focus(),o=g,i=l,u=d.text,a=f,u.each(function(n){i.hasOwnProperty("innerText")?i.innerText=n:i.textContent=n}),o.dom.setAttribs(i,a),o.selection.select(i)):(t=g,n=c,e=d.text,r=f,Q(n)?nn(t,n,r):e.fold(function(){t.execCommand("mceInsertLink",!1,r)},function(n){t.insertContent(t.dom.createHTML("a",r,t.dom.encode(n)))}))})},en=function(e){e.undoManager.transact(function(){var n=e.selection.getNode();if(Q(n))Z(e,n);else{var t=e.dom.getParent(n,"a[href]",e.getBody());t&&e.dom.remove(t,!0)}e.focus()})},rn=function(n){return 0<$.grep(n,X).length},on=function(n){var t=n.getAttribute("data-mce-href");return t||n.getAttribute("href")},un=function(n){return!(/</.test(n)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(n)||-1===n.indexOf("href=")))},an=J,cn=function(n,t){var e=t?t.innerText||t.textContent:n.getContent({format:"text"});return e.replace(/\uFEFF/g,"")},ln=G,fn=function(n,t){for(var e=0;e<n.length;e++){var r=t(n[e],e);if(r.isSome())return r}return z.none()},sn=function(n){return K(n.value)?n.value:""},gn=function(e){return void 0===e&&(e=sn),function(n){return z.from(n).map(function(n){return t=n,r=e,o=[],$.each(t,function(n){var t=K(n.text)?n.text:K(n.title)?n.title:"";if(n.menu!==undefined);else{var e=r(n);o.push({text:t,value:e})}}),o;var t,r,o})}},mn={sanitize:function(n){return gn(sn)(n)},sanitizeWith:gn,createUi:function(t,e){return function(n){return{name:t,type:"selectbox",label:e,items:n}}},getValue:sn},dn=function(n){var t=n,e=function(){return t};return{get:e,set:function(n){t=n},clone:function(){return dn(e())}}},hn=function(t,n,e,r){var o,i,u=r[n],a=0<t.length;return u!==undefined?(o=u,i=e,fn(i,function(n){return z.some(n).filter(function(n){return n.value===o})})).map(function(n){return{url:{value:n.value,meta:{text:a?t:n.text,attach:N}},text:a?t:n.text}}):z.none()},pn=function(n,i){var u=dn(n.text),o=function(n,t){var e,r,o=(e=i,r=t.name,"link"===r?e.catalogs.link:"anchor"===r?e.catalogs.anchor:z.none()).getOr([]);return hn(u.get(),t.name,o,n)};return{onChange:function(n,t){return"url"===t.name?function(n){if(u.get().length<=0){var t=n.url.meta.text!==undefined?n.url.meta.text:n.url.value;return z.some({text:t})}return z.none()}(n()):(e=["anchor","link"],r=t.name,-1<j(e,r)?o(n(),t):("text"===t.name&&u.set(n().text),z.none()));var e,r}}},vn=function(){return(vn=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}).apply(this,arguments)},yn=function(n){var e=z.none(),t=[],r=function(n){o()?u(n):t.push(n)},o=function(){return e.isSome()},i=function(n){B(n,u)},u=function(t){e.each(function(n){c.setTimeout(function(){t(n)},0)})};return n(function(n){e=z.some(n),i(t),t=[]}),{get:r,map:function(e){return yn(function(t){r(function(n){t(e(n))})})},isReady:o}},kn={nu:yn,pure:function(t){return yn(function(n){n(t)})}},xn=function(t){var n=function(n){var r;t((r=n,function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var e=this;c.setTimeout(function(){r.apply(e,n)},0)}))},e=function(){return kn.nu(n)};return{map:function(r){return xn(function(e){n(function(n){var t=r(n);e(t)})})},bind:function(e){return xn(function(t){n(function(n){e(n).get(t)})})},anonBind:function(e){return xn(function(t){n(function(n){e.get(t)})})},toLazy:e,toCached:function(){var t=null;return xn(function(n){null===t&&(t=e()),t.get(n)})},get:n}},bn={nu:xn,pure:function(t){return xn(function(n){n(t)})}},On=tinymce.util.Tools.resolve("tinymce.util.Delay"),wn=function(n){var t=n.href;return 0<t.indexOf("@")&&-1===t.indexOf("//")&&-1===t.indexOf("mailto:")?z.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:function(n){return vn({},n,{href:"mailto:"+t})}}):z.none()},_n=function(u,n,a){return fn([wn,(e=n,function(n){var t=n.href;return!0===e&&!/^\w+:/i.test(t)||!1===e&&/^\s*www[\.|\d\.]/i.test(t)?z.some({message:"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",preprocess:function(n){return vn({},n,{href:"http://"+t})}}):z.none()})],function(n){return n(a)}).fold(function(){return bn.pure(a)},function(i){return bn.nu(function(t){var e,n,r,o;e=u,n=i.message,r=function(n){c.console.log("state",n),t(n?i.preprocess(a):a)},o=e.selection.getRng(),On.setEditorTimeout(e,function(){e.windowManager.confirm(n,function(n){e.selection.setRng(o),r(n)})})})});var e},An=function(n){var t=n.dom.select("a:not([href])"),e=H(t,function(n){var t=n.name||n.id;return t?[{text:t,value:"#"+t}]:[]});return 0<e.length?z.some([{text:"None",value:""}].concat(e)):z.none()},Cn=function(n){if(b(n.settings)){var t=x(n.settings);return mn.sanitize(t)}return z.none()},Tn=tinymce.util.Tools.resolve("tinymce.util.XHR"),Nn=function(t){var e=function(n){return t.convertURL(n.value||n.url,"href")},n=g(t.settings);return bn.nu(function(t){"string"==typeof n?Tn.send({url:n,success:function(n){return t(function(n){try{return z.some(JSON.parse(n))}catch(t){return z.none()}}(n))},error:function(n){return t(z.none())}}):"function"==typeof n?n(function(n){return t(z.some(n))}):t(z.from(n))}).map(function(n){return n.bind(mn.sanitizeWith(e))})},Sn=function(n,t){if(p(n.settings)){var e=h(n.settings),r=t.is("_blank");return(!1===w(n.settings)?mn.sanitizeWith(function(n){return ln(mn.getValue(n),r)}):mn.sanitize)(e)}return z.none()},Dn=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],Mn=function(n){if(d(n.settings)){var t=m(n.settings);return mn.sanitize(t).orThunk(function(){return z.some(Dn)})}return z.none()},Ln=function(n,t,e){var r=n.getAttrib(t,e);return null!==r&&0<r.length?z.some(r):z.none()},En=function(s,g,m){return Nn(s).map(function(n){var t,e,r,o,i,u,a,c,l,f=(e=m,r=(t=s).selection,o=t.dom,i=un(r.getContent())?z.some(cn(r,e)):z.none(),u=e?z.some(o.getAttrib(e,"href")):z.none(),a=e?z.from(o.getAttrib(e,"target")):z.none(),c=Ln(o,e,"rel"),l=Ln(o,e,"class"),{url:u,text:i,title:Ln(o,e,"title"),target:a,rel:c,linkClass:l});return{anchor:f,catalogs:{targets:Mn(s),rels:Sn(s,f.target),classes:Cn(s),anchor:An(s),link:n},optNode:z.from(m),flags:{titleEnabled:O(g)}}})},Un=function(p){var n,t,e;(t=(n=p).settings,e=an(n),En(n,t,e)).map(function(n){var i,u,a,t,e,r,o,c,l,f,s,g,m,d,h=(u=n,a=v((i=p).settings),function(n){var e=n.getData();if(!e.url.value)return en(i),void n.close();var t=function(t){return z.from(e[t]).filter(function(n){return!u.anchor[t].is(n)})},r={href:e.url.value,text:t("text"),target:t("target"),rel:t("rel"),"class":t("linkClass"),title:t("title")},o={href:e.url.value,attach:e.url.meta!==undefined&&e.url.meta.attach?e.url.meta.attach:function(){}};_n(i,a,r).get(function(n){tn(i,o,n)}),n.close()});return t=n,e=h,r=p.settings,l=t.anchor.text.map(function(){return{name:"text",type:"input",label:"Text to display"}}).toArray(),f=t.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],s=y(r)?z.some(k(r)):z.none(),c=s,g={url:{value:(o=t).anchor.url.getOr(""),meta:{attach:function(){},text:o.anchor.url.fold(function(){return""},function(){return o.anchor.text.getOr("")}),original:{value:o.anchor.url.getOr("")}}},text:o.anchor.text.getOr(""),title:o.anchor.title.getOr(""),anchor:o.anchor.url.getOr(""),link:o.anchor.url.getOr(""),rel:o.anchor.rel.getOr(""),target:o.anchor.target.or(c).getOr(""),linkClass:o.anchor.linkClass.getOr("")},m=pn(g,t),d=t.catalogs,{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:W([[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],l,f,function(n){for(var t=[],e=function(n){t.push(n)},r=0;r<n.length;r++)n[r].each(e);return t}([d.anchor.map(mn.createUi("anchor","Anchors")),d.rels.map(mn.createUi("rel","Rel")),d.targets.map(mn.createUi("target","Open link in...")),d.link.map(mn.createUi("link","Link list")),d.classes.map(mn.createUi("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:g,onChange:function(t,n){var e=n.name;m.onChange(t.getData,{name:e}).each(function(n){t.setData(n)})},onSubmit:e}}).get(function(n){p.windowManager.open(n)})},Pn=function(n,t){return n.dom.getParent(t,"a[href]")},Rn=function(n){return Pn(n,n.selection.getStart())},zn=function(n,t){if(t){var e=on(t);if(/^#/.test(e)){var r=n.$(e);r.length&&n.selection.scrollIntoView(r[0],!0)}else T(t.href)}},qn=function(n){return function(){Un(n)}},Kn=function(n){return function(){zn(n,Rn(n))}},In=function(r){r.on("click",function(n){var t=Pn(r,n.target);t&&u.metaKeyPressed(n)&&(n.preventDefault(),zn(r,t))}),r.on("keydown",function(n){var t,e=Rn(r);e&&13===n.keyCode&&!0===(t=n).altKey&&!1===t.shiftKey&&!1===t.ctrlKey&&!1===t.metaKey&&(n.preventDefault(),zn(r,e))})},jn=function(e){return function(t){var n=function(n){return t.setActive(!e.readonly&&!!an(e,n.element))};return e.on("NodeChange",n),function(){return e.off("NodeChange",n)}}},Bn=function(e){return function(t){t.setDisabled(!rn(e.dom.getParents(e.selection.getStart())));var n=function(n){return t.setDisabled(!rn(n.parents))};return e.on("NodeChange",n),function(){return e.off("NodeChange",n)}}},Vn=function(n){n.addCommand("mceLink",function(){_(n.settings)?n.fire("contexttoolbar-show",{toolbarKey:"quicklink"}):qn(n)()})},Fn=function(n){n.addShortcut("Meta+K","",function(){n.execCommand("mceLink")})},Wn=function(n){n.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:qn(n),onSetup:jn(n)}),n.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:function(){return en(n)},onSetup:Bn(n)})},Hn=function(n){n.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:Kn(n),onSetup:Bn(n)}),n.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:qn(n)}),n.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:function(){return en(n)},onSetup:Bn(n)})},$n=function(t){t.ui.registry.addContextMenu("link",{update:function(n){return rn(t.dom.getParents(n,"a"))?"link unlink openlink":"link"}})},Gn=function(i){var n=function(n){var t=i.selection.getNode();return n.setDisabled(!an(i,t)),function(){}};i.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:jn(i)},label:"Link",predicate:function(n){return!!an(i,n)&&s(i.settings)},initValue:function(){var n=an(i);return n?on(n):""},commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:function(n){var t=i.selection.getNode();return n.setActive(!!an(i,t)),jn(i)(n)},onAction:function(n){var t=an(i),e=n.getValue();if(t)i.dom.setAttrib(t,"href",e),i.selection.collapse(!1),n.hide();else{var r={href:e,attach:function(){}},o=un(i.selection.getContent())?z.some(cn(i.selection,t)).filter(function(n){return 0<n.length}).or(z.from(e)):z.none();tn(i,r,{href:e,text:o,title:z.none(),rel:z.none(),target:z.none(),"class":z.none()}),n.hide()}}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:n,onAction:function(n){en(i),n.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:n,onAction:function(n){Kn(i)(),n.hide()}}]})};i.add("link",function(n){Wn(n),Hn(n),$n(n),Gn(n),In(n),Vn(n),Fn(n)}),function Jn(){}}(window);
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(u){"use strict";var e,n,t,r,o,i,a,s,c=tinymce.util.Tools.resolve("tinymce.PluginManager"),f=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),d=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),l=tinymce.util.Tools.resolve("tinymce.util.VK"),p=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),m=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),g=function(e){return e&&"BR"===e.nodeName},h=function(e){return e&&3===e.nodeType},y=function(e){return e&&/^(OL|UL|DL)$/.test(e.nodeName)},N=function(e){return e&&/^(OL|UL)$/.test(e.nodeName)},S=function(e){return e&&/^(DT|DD)$/.test(e.nodeName)},O=function(e){return e&&/^(LI|DT|DD)$/.test(e.nodeName)},C=function(e){return e&&/^(TH|TD)$/.test(e.nodeName)},b=g,T=function(e,n){return n&&!!e.schema.getTextBlockElements()[n.nodeName]},L=function(e,n){return e&&e.nodeName in n},D=function(e,n){return!!g(n)&&!(!e.isBlock(n.nextSibling)||g(n.previousSibling))},E=function(e,n,t){var r=e.isEmpty(n);return!(t&&0<e.select("span[data-mce-type=bookmark]",n).length)&&r},w=function(e,n){return e.isChildOf(n,e.getRoot())},k=function(e,n){if(h(e))return{container:e,offset:n};var t=f.getNode(e,n);return h(t)?{container:t,offset:n>=e.childNodes.length?t.data.length:0}:t.previousSibling&&h(t.previousSibling)?{container:t.previousSibling,offset:t.previousSibling.data.length}:t.nextSibling&&h(t.nextSibling)?{container:t.nextSibling,offset:0}:{container:e,offset:n}},A=function(e){var n=e.cloneRange(),t=k(e.startContainer,e.startOffset);n.setStart(t.container,t.offset);var r=k(e.endContainer,e.endOffset);return n.setEnd(r.container,r.offset),n},x=m.DOM,R=function(o){var i={},e=function(e){var n,t,r;t=o[e?"startContainer":"endContainer"],r=o[e?"startOffset":"endOffset"],1===t.nodeType&&(n=x.create("span",{"data-mce-type":"bookmark"}),t.hasChildNodes()?(r=Math.min(r,t.childNodes.length-1),e?t.insertBefore(n,t.childNodes[r]):x.insertAfter(n,t.childNodes[r])):t.appendChild(n),t=n,r=0),i[e?"startContainer":"endContainer"]=t,i[e?"startOffset":"endOffset"]=r};return e(!0),o.collapsed||e(),i},I=function(o){function e(e){var n,t,r;n=r=o[e?"startContainer":"endContainer"],t=o[e?"startOffset":"endOffset"],n&&(1===n.nodeType&&(t=function(e){for(var n=e.parentNode.firstChild,t=0;n;){if(n===e)return t;1===n.nodeType&&"bookmark"===n.getAttribute("data-mce-type")||t++,n=n.nextSibling}return-1}(n),n=n.parentNode,x.remove(r),!n.hasChildNodes()&&x.isBlock(n)&&n.appendChild(x.create("br"))),o[e?"startContainer":"endContainer"]=n,o[e?"startOffset":"endOffset"]=t)}e(!0),e();var n=x.createRng();return n.setStart(o.startContainer,o.startOffset),o.endContainer&&n.setEnd(o.endContainer,o.endOffset),A(n)},_=function(e){return function(){return e}},B=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return!t.apply(null,e)}},P=_(!1),M=_(!0),U=P,F=M,j=function(){return H},H=(r={fold:function(e,n){return e()},is:U,isSome:U,isNone:F,getOr:t=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:t,orThunk:n,map:j,ap:j,each:function(){},bind:j,flatten:j,exists:U,forall:F,filter:j,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:_("none()")},Object.freeze&&Object.freeze(r),r),$=function(t){var e=function(){return t},n=function(){return o},r=function(e){return e(t)},o={fold:function(e,n){return n(t)},is:function(e){return t===e},isSome:F,isNone:U,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return $(e(t))},ap:function(e){return e.fold(j,function(e){return $(e(t))})},each:function(e){e(t)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){return e(t)?o:H},equals:function(e){return e.is(t)},equals_:function(e,n){return e.fold(U,function(e){return n(t,e)})},toArray:function(){return[t]},toString:function(){return"some("+t+")"}};return o},q={some:$,none:j,from:function(e){return null===e||e===undefined?H:$(e)}},W=function(n){return function(e){return function(e){if(null===e)return"null";var n=typeof e;return"object"===n&&Array.prototype.isPrototypeOf(e)?"array":"object"===n&&String.prototype.isPrototypeOf(e)?"string":n}(e)===n}},z=W("string"),K=W("boolean"),V=W("function"),X=W("number"),Q=(Array.prototype.indexOf,undefined,function(e,n){for(var t=e.length,r=new Array(t),o=0;o<t;o++){var i=e[o];r[o]=n(i,o,e)}return r}),Y=function(e,n){for(var t=0,r=e.length;t<r;t++)n(e[t],t,e)},G=function(e,n){for(var t=[],r=0,o=e.length;r<o;r++){var i=e[r];n(i,r,e)&&t.push(i)}return t},J=function(e,n){if(0===e.length)return[];for(var t=n(e[0]),r=[],o=[],i=0,u=e.length;i<u;i++){var a=e[i],s=n(a);s!==t&&(r.push(o),o=[]),t=s,o.push(a)}return 0!==o.length&&r.push(o),r},Z=function(e,n,t){return Y(e,function(e){t=n(t,e)}),t},ee=function(e,n){for(var t=0,r=e.length;t<r;t++){var o=e[t];if(n(o,t,e))return q.some(o)}return q.none()},ne=Array.prototype.push,te=function(e){for(var n=[],t=0,r=e.length;t<r;++t){if(!Array.prototype.isPrototypeOf(e[t]))throw new Error("Arr.flatten item "+t+" was not an array, input: "+e);ne.apply(n,e[t])}return n},re=function(e,n){var t=Q(e,n);return te(t)},oe=Array.prototype.slice,ie=function(e){var n=oe.call(e,0);return n.reverse(),n},ue=function(e){return 0===e.length?q.none():q.some(e[0])},ae=function(e){return 0===e.length?q.none():q.some(e[e.length-1])},se=(V(Array.from)&&Array.from,"undefined"!=typeof u.window?u.window:Function("return this;")()),ce=function(e,n){return function(e,n){for(var t=n!==undefined&&null!==n?n:se,r=0;r<e.length&&t!==undefined&&null!==t;++r)t=t[e[r]];return t}(e.split("."),n)},fe=function(e,n){var t=ce(e,n);if(t===undefined||null===t)throw e+" not available on this browser";return t},de=function(e){var n,t=ce("ownerDocument.defaultView",e);return(n=t,fe("HTMLElement",n)).prototype.isPrototypeOf(e)},le=tinymce.util.Tools.resolve("tinymce.dom.DomQuery"),me=function(e){var n=e.selection.getStart(!0);return e.dom.getParent(n,"OL,UL,DL",pe(e,n))},ge=function(e){var t,n,r,o=e.selection.getSelectedBlocks();return v.grep((t=e,n=o,r=v.map(n,function(e){var n=t.dom.getParent(e,"li,dd,dt",pe(t,e));return n||e}),le.unique(r)),function(e){return O(e)})},pe=function(e,n){var t=e.dom.getParents(n,"TD,TH");return 0<t.length?t[0]:e.getBody()},ve=function(e,n){var t=e.dom.getParents(n,"ol,ul",pe(e,n));return ae(t)},he=function(n,e){var t=Q(e,function(e){return ve(n,e).getOr(e)});return le.unique(t)},ye={isList:function(e){var n=me(e);return de(n)},getParentList:me,getSelectedSubLists:function(e){var n,t,r,o=me(e),i=e.selection.getSelectedBlocks();return r=i,(t=o)&&1===r.length&&r[0]===t?(n=o,v.grep(n.querySelectorAll("ol,ul,dl"),function(e){return y(e)})):v.grep(i,function(e){return y(e)&&o!==e})},getSelectedListItems:ge,getClosestListRootElm:pe,getSelectedDlItems:function(e){return G(ge(e),S)},getSelectedListRoots:function(e){var n,t,r,o=(t=ve(n=e,n.selection.getStart()),r=G(n.selection.getSelectedBlocks(),N),t.toArray().concat(r));return he(e,o)}},Ne=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:_(e)}},Se={fromHtml:function(e,n){var t=(n||u.document).createElement("div");if(t.innerHTML=e,!t.hasChildNodes()||1<t.childNodes.length)throw u.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Ne(t.childNodes[0])},fromTag:function(e,n){var t=(n||u.document).createElement(e);return Ne(t)},fromText:function(e,n){var t=(n||u.document).createTextNode(e);return Ne(t)},fromDom:Ne,fromPoint:function(e,n,t){var r=e.dom();return q.from(r.elementFromPoint(n,t)).map(Ne)}},Oe=function(e,n){for(var t=[],r=0;r<e.length;r++){var o=e[r];if(!o.isSome())return q.none();t.push(o.getOrDie())}return q.some(n.apply(null,t))},Ce=Object.keys,be=function(){return fe("Node")},Te=function(e,n,t){return 0!=(e.compareDocumentPosition(n)&t)},Le=function(e,n){return Te(e,n,be().DOCUMENT_POSITION_CONTAINED_BY)},De=function(e,n){var t=function(e,n){for(var t=0;t<e.length;t++){var r=e[t];if(r.test(n))return r}return undefined}(e,n);if(!t)return{major:0,minor:0};var r=function(e){return Number(n.replace(t,"$"+e))};return we(r(1),r(2))},Ee=function(){return we(0,0)},we=function(e,n){return{major:e,minor:n}},ke={nu:we,detect:function(e,n){var t=String(n).toLowerCase();return 0===e.length?Ee():De(e,t)},unknown:Ee},Ae="Firefox",xe=function(e,n){return function(){return n===e}},Re=function(e){var n=e.current;return{current:n,version:e.version,isEdge:xe("Edge",n),isChrome:xe("Chrome",n),isIE:xe("IE",n),isOpera:xe("Opera",n),isFirefox:xe(Ae,n),isSafari:xe("Safari",n)}},Ie={unknown:function(){return Re({current:undefined,version:ke.unknown()})},nu:Re,edge:_("Edge"),chrome:_("Chrome"),ie:_("IE"),opera:_("Opera"),firefox:_(Ae),safari:_("Safari")},_e="Windows",Be="Android",Pe="Solaris",Me="FreeBSD",Ue=function(e,n){return function(){return n===e}},Fe=function(e){var n=e.current;return{current:n,version:e.version,isWindows:Ue(_e,n),isiOS:Ue("iOS",n),isAndroid:Ue(Be,n),isOSX:Ue("OSX",n),isLinux:Ue("Linux",n),isSolaris:Ue(Pe,n),isFreeBSD:Ue(Me,n)}},je={unknown:function(){return Fe({current:undefined,version:ke.unknown()})},nu:Fe,windows:_(_e),ios:_("iOS"),android:_(Be),linux:_("Linux"),osx:_("OSX"),solaris:_(Pe),freebsd:_(Me)},He=function(e,n){var t=String(n).toLowerCase();return ee(e,function(e){return e.search(t)})},$e=function(e,t){return He(e,t).map(function(e){var n=ke.detect(e.versionRegexes,t);return{current:e.name,version:n}})},qe=function(e,t){return He(e,t).map(function(e){var n=ke.detect(e.versionRegexes,t);return{current:e.name,version:n}})},We=function(e,n){return-1!==e.indexOf(n)},ze=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Ke=function(n){return function(e){return We(e,n)}},Ve=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return We(e,"edge/")&&We(e,"chrome")&&We(e,"safari")&&We(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ze],search:function(e){return We(e,"chrome")&&!We(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return We(e,"msie")||We(e,"trident")}},{name:"Opera",versionRegexes:[ze,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Ke("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Ke("firefox")},{name:"Safari",versionRegexes:[ze,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(We(e,"safari")||We(e,"mobile/"))&&We(e,"applewebkit")}}],Xe=[{name:"Windows",search:Ke("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return We(e,"iphone")||We(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Ke("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Ke("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Ke("linux"),versionRegexes:[]},{name:"Solaris",search:Ke("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Ke("freebsd"),versionRegexes:[]}],Qe={browsers:_(Ve),oses:_(Xe)},Ye=function(e){var n,t,r,o,i,u,a,s,c,f,d,l=Qe.browsers(),m=Qe.oses(),g=$e(l,e).fold(Ie.unknown,Ie.nu),p=qe(m,e).fold(je.unknown,je.nu);return{browser:g,os:p,deviceType:(t=g,r=e,o=(n=p).isiOS()&&!0===/ipad/i.test(r),i=n.isiOS()&&!o,u=n.isAndroid()&&3===n.version.major,a=n.isAndroid()&&4===n.version.major,s=o||u||a&&!0===/mobile/i.test(r),c=n.isiOS()||n.isAndroid(),f=c&&!s,d=t.isSafari()&&n.isiOS()&&!1===/safari/i.test(r),{isiPad:_(o),isiPhone:_(i),isTablet:_(s),isPhone:_(f),isTouch:_(c),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:_(d)})}},Ge={detect:(o=function(){var e=u.navigator.userAgent;return Ye(e)},a=!1,function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return a||(a=!0,i=o.apply(null,e)),i})},Je=(u.Node.ATTRIBUTE_NODE,u.Node.CDATA_SECTION_NODE,u.Node.COMMENT_NODE,u.Node.DOCUMENT_NODE,u.Node.DOCUMENT_TYPE_NODE,u.Node.DOCUMENT_FRAGMENT_NODE,u.Node.ELEMENT_NODE),Ze=(u.Node.TEXT_NODE,u.Node.PROCESSING_INSTRUCTION_NODE,u.Node.ENTITY_REFERENCE_NODE,u.Node.ENTITY_NODE,u.Node.NOTATION_NODE,Je),en=function(e,n){return e.dom()===n.dom()},nn=Ge.detect().browser.isIE()?function(e,n){return Le(e.dom(),n.dom())}:function(e,n){var t=e.dom(),r=n.dom();return t!==r&&t.contains(r)},tn=function(e,n){var t=e.dom();if(t.nodeType!==Ze)return!1;if(t.matches!==undefined)return t.matches(n);if(t.msMatchesSelector!==undefined)return t.msMatchesSelector(n);if(t.webkitMatchesSelector!==undefined)return t.webkitMatchesSelector(n);if(t.mozMatchesSelector!==undefined)return t.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},rn=function(e){var n=e.dom();return q.from(n.parentNode).map(Se.fromDom)},on=function(e){var n=e.dom();return Q(n.childNodes,Se.fromDom)},un=function(e,n){var t=e.dom().childNodes;return q.from(t[n]).map(Se.fromDom)},an=function(e){return un(e,0)},sn=function(e){return un(e,e.dom().childNodes.length-1)},cn=(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n]}("element","offset"),function(n,t){rn(n).each(function(e){e.dom().insertBefore(t.dom(),n.dom())})}),fn=function(e,n){e.dom().appendChild(n.dom())},dn=function(n,e){Y(e,function(e){fn(n,e)})},ln=function(e){var n=e.dom();null!==n.parentNode&&n.parentNode.removeChild(n)},mn=function(e){return e.dom().nodeName.toLowerCase()},gn=function(e,n){var t=e.dom();!function(e,n){for(var t=Ce(e),r=0,o=t.length;r<o;r++){var i=t[r];n(e[i],i,e)}}(n,function(e,n){!function(e,n,t){if(!(z(t)||K(t)||X(t)))throw u.console.error("Invalid call to Attr.set. Key ",n,":: Value ",t,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(n,t+"")}(t,n,e)})},pn=function(e){return Z(e.dom().attributes,function(e,n){return e[n.name]=n.value,e},{})},vn=function(e,n,t){if(!z(t))throw u.console.error("Invalid call to CSS.set. Property ",n,":: Value ",t,":: Element ",e),new Error("CSS value must be a string: "+t);e.style!==undefined&&e.style.setProperty(n,t)},hn=function(e){return n=e,t=!0,Se.fromDom(n.dom().cloneNode(t));var n,t},yn=function(e,n){var t,r,o,i,u=(t=e,r=n,o=Se.fromTag(r),i=pn(t),gn(o,i),o);cn(e,u);var a=on(e);return dn(u,a),ln(e),u},Nn=function(e,n){fn(e.item,n.list)},Sn=function(f,e,d){var n=e.slice(0,d.depth);return ae(n).each(function(e){var n,t,r,o,i,u,a,s,c=(n=f,t=d.itemAttributes,r=d.content,o=Se.fromTag("li",n),gn(o,t),dn(o,r),o);u=c,fn((i=e).list,u),i.item=u,s=d,mn((a=e).list)!==s.listType&&(a.list=yn(a.list,s.listType)),gn(a.list,s.listAttributes)}),n},On=function(e,n,t){var r,o=function(e,n,t){for(var r,o,i,u=[],a=0;a<t;a++)u.push((r=e,o=n.listType,i={list:Se.fromTag(o,r),item:Se.fromTag("li",r)},fn(i.list,i.item),i));return u}(e,t,t.depth-n.length);return function(e){for(var n=1;n<e.length;n++)Nn(e[n-1],e[n])}(o),function(e,n){for(var t=0;t<e.length-1;t++)r=e[t].item,o="list-style-type",i="none",u=r.dom(),vn(u,o,i);var r,o,i,u;ae(e).each(function(e){gn(e.list,n.listAttributes),gn(e.item,n.itemAttributes),dn(e.item,n.content)})}(o,t),r=o,Oe([ae(n),ue(r)],Nn),n.concat(o)},Cn=function(e){return tn(e,"OL,UL")},bn=function(e){return an(e).map(Cn).getOr(!1)},Tn=function(e){return 0<e.depth},Ln=function(e){return e.isSelected},Dn=function(e){var n=on(e),t=sn(e).map(Cn).getOr(!1)?n.slice(0,-1):n;return Q(t,hn)},En=Object.prototype.hasOwnProperty,wn=(s=function(e,n){return n},function(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];if(0===e.length)throw new Error("Can't merge zero objects");for(var t={},r=0;r<e.length;r++){var o=e[r];for(var i in o)En.call(o,i)&&(t[i]=s(t[i],o[i]))}return t}),kn=function(n){Y(n,function(r,e){(function(e,n){for(var t=e[n].depth,r=n-1;0<=r;r--){if(e[r].depth===t)return q.some(e[r]);if(e[r].depth<t)break}return q.none()})(n,e).each(function(e){var n,t;t=e,(n=r).listType=t.listType,n.listAttributes=wn({},t.listAttributes)})})},An=function(e){var n=e,t=function(){return n};return{get:t,set:function(e){n=e},clone:function(){return An(t())}}},xn=function(i,u,a,s){return an(s).filter(Cn).fold(function(){u.each(function(e){en(e.start,s)&&a.set(!0)});var n,t,r,e=(n=s,t=i,r=a.get(),rn(n).map(function(e){return{depth:t,isSelected:r,content:Dn(n),itemAttributes:pn(n),listAttributes:pn(e),listType:mn(e)}}));u.each(function(e){en(e.end,s)&&a.set(!1)});var o=sn(s).filter(Cn).map(function(e){return Rn(i,u,a,e)}).getOr([]);return e.toArray().concat(o)},function(e){return Rn(i,u,a,e)})},Rn=function(n,t,r,e){return re(on(e),function(e){return(Cn(e)?Rn:xn)(n+1,t,r,e)})},In=tinymce.util.Tools.resolve("tinymce.Env"),_n=function(e,n){var t,r,o,i,u=e.dom,a=e.schema.getBlockElements(),s=u.createFragment();if(e.settings.forced_root_block&&(o=e.settings.forced_root_block),o&&((r=u.create(o)).tagName===e.settings.forced_root_block&&u.setAttribs(r,e.settings.forced_root_block_attrs),L(n.firstChild,a)||s.appendChild(r)),n)for(;t=n.firstChild;){var c=t.nodeName;i||"SPAN"===c&&"bookmark"===t.getAttribute("data-mce-type")||(i=!0),L(t,a)?(s.appendChild(t),r=null):o?(r||(r=u.create(o),s.appendChild(r)),r.appendChild(t)):s.appendChild(t)}return e.settings.forced_root_block?i||In.ie&&!(10<In.ie)||r.appendChild(u.create("br",{"data-mce-bogus":"1"})):s.appendChild(u.create("br")),s},Bn=function(e,n,t){return e.fire("ListMutation",{action:n,element:t})},Pn=function(i,e){return Q(e,function(e){var n,t,r,o=(n=e.content,r=(t||u.document).createDocumentFragment(),Y(n,function(e){r.appendChild(e.dom())}),Se.fromDom(r));return Se.fromDom(_n(i,o.dom()))})},Mn=function(e,n){return kn(n),(t=e.contentDocument,r=n,o=Z(r,function(e,n){return n.depth>e.length?On(t,e,n):Sn(t,e,n)},[]),ue(o).map(function(e){return e.list})).toArray();var t,r,o},Un=function(a,e,s){var n,t,r,o,i,u=(n=e,o=a,i=Q(ye.getSelectedListItems(o),Se.fromDom),t=Oe([ee(i,B(bn)),ee(ie(i),B(bn))],function(e,n){return{start:e,end:n}}),r=An(!1),Q(n,function(e){return{sourceList:e,entries:Rn(0,t,r,e)}}));Y(u,function(e){var n,t;n=e.entries,t=s,Y(G(n,Ln),function(e){return function(e,n){switch(e){case"Indent":n.depth++;break;case"Outdent":n.depth--;break;case"Flatten":n.depth=0}}(t,e)});var r,o,i,u=(r=a,o=e.entries,re(J(o,Tn),function(e){return ue(e).map(Tn).getOr(!1)?Mn(r,e):Pn(r,e)}));Y(u,function(e){Bn(a,"Indent"===s?"IndentList":"OutdentList",e.dom())}),i=e.sourceList,Y(u,function(e){cn(i,e)}),ln(e.sourceList)})},Fn=m.DOM,jn=function(e,n,t){var r,o,i,u,a,s;for(i=Fn.select('span[data-mce-type="bookmark"]',n),a=_n(e,t),(r=Fn.createRng()).setStartAfter(t),r.setEndAfter(n),u=(o=r.extractContents()).firstChild;u;u=u.firstChild)if("LI"===u.nodeName&&e.dom.isEmpty(u)){Fn.remove(u);break}e.dom.isEmpty(o)||Fn.insertAfter(o,n),Fn.insertAfter(a,n),E(e.dom,t.parentNode)&&(s=t.parentNode,v.each(i,function(e){s.parentNode.insertBefore(e,t.parentNode)}),Fn.remove(s)),Fn.remove(t),E(e.dom,n)&&Fn.remove(n)},Hn=function(e){tn(e,"DT")&&yn(e,"DD")},$n=function(r,e,n){Y(n,"Indent"===e?Hn:function(e){return n=r,void(tn(t=e,"DD")?yn(t,"DT"):tn(t,"DT")&&rn(t).each(function(e){return jn(n,e.dom(),t.dom())}));var n,t})},qn=function(e,n){var t=Q(ye.getSelectedListRoots(e),Se.fromDom),r=Q(ye.getSelectedDlItems(e),Se.fromDom),o=!1;if(t.length||r.length){var i=e.selection.getBookmark();Un(e,t,n),$n(e,n,r),e.selection.moveToBookmark(i),e.selection.setRng(A(e.selection.getRng())),e.nodeChanged(),o=!0}return o},Wn=function(e){return qn(e,"Indent")},zn=function(e){return qn(e,"Outdent")},Kn=function(e){return qn(e,"Flatten")},Vn=function(e){return/\btox\-/.test(e.className)},Xn=function(e){switch(e){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},Qn=function(t,e){v.each(e,function(e,n){t.setAttribute(n,e)})},Yn=function(e,n,t){var r,o,i,u,a,s,c;r=e,o=n,u=(i=t)["list-style-type"]?i["list-style-type"]:null,r.setStyle(o,"list-style-type",u),a=e,Qn(s=n,(c=t)["list-attributes"]),v.each(a.select("li",s),function(e){Qn(e,c["list-item-attributes"])})},Gn=function(e,n,t,r){var o,i;for(o=n[t?"startContainer":"endContainer"],i=n[t?"startOffset":"endOffset"],1===o.nodeType&&(o=o.childNodes[Math.min(i,o.childNodes.length-1)]||o),!t&&b(o.nextSibling)&&(o=o.nextSibling);o.parentNode!==r;){if(T(e,o))return o;if(/^(TD|TH)$/.test(o.parentNode.nodeName))return o;o=o.parentNode}return o},Jn=function(f,d,l){void 0===l&&(l={});var e,n=f.selection.getRng(!0),m="LI",t=ye.getClosestListRootElm(f,f.selection.getStart(!0)),g=f.dom;"false"!==g.getContentEditable(f.selection.getNode())&&("DL"===(d=d.toUpperCase())&&(m="DT"),e=R(n),v.each(function(t,e,r){for(var o,i=[],u=t.dom,n=Gn(t,e,!0,r),a=Gn(t,e,!1,r),s=[],c=n;c&&(s.push(c),c!==a);c=c.nextSibling);return v.each(s,function(e){if(T(t,e))return i.push(e),void(o=null);if(u.isBlock(e)||b(e))return b(e)&&u.remove(e),void(o=null);var n=e.nextSibling;p.isBookmarkNode(e)&&(T(t,n)||!n&&e.parentNode===r)?o=null:(o||(o=u.create("p"),e.parentNode.insertBefore(o,e),i.push(o)),o.appendChild(e))}),i}(f,n,t),function(e){var n,t,r,o,i,u,a,s,c;(t=e.previousSibling)&&y(t)&&t.nodeName===d&&(r=t,o=l,i=g.getStyle(r,"list-style-type"),u=o?o["list-style-type"]:"",i===(u=null===u?"":u))?(n=t,e=g.rename(e,m),t.appendChild(e)):(n=g.create(d),e.parentNode.insertBefore(n,e),n.appendChild(e),e=g.rename(e,m)),a=g,s=e,c=["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],v.each(c,function(e){var n;return a.setStyle(s,((n={})[e]="",n))}),Yn(g,n,l),et(f.dom,n)}),f.selection.setRng(I(e)))},Zn=function(e,n,t){return s=t,(a=n)&&s&&y(a)&&a.nodeName===s.nodeName&&(i=n,u=t,(o=e).getStyle(i,"list-style-type",!0)===o.getStyle(u,"list-style-type",!0))&&(r=t,n.className===r.className);var r,o,i,u,a,s},et=function(e,n){var t,r;if(t=n.nextSibling,Zn(e,n,t)){for(;r=t.firstChild;)n.appendChild(r);e.remove(t)}if(t=n.previousSibling,Zn(e,n,t)){for(;r=t.lastChild;)n.insertBefore(r,n.firstChild);e.remove(t)}},nt=function(n,e,t,r,o){if(e.nodeName!==r||tt(o)){var i=R(n.selection.getRng(!0));v.each([e].concat(t),function(e){!function(e,n,t,r){if(n.nodeName!==t){var o=e.dom.rename(n,t);Yn(e.dom,o,r),Bn(e,Xn(t),o)}else Yn(e.dom,n,r),Bn(e,Xn(t),n)}(n,e,r,o)}),n.selection.setRng(I(i))}else Kn(n)},tt=function(e){return"list-style-type"in e},rt={toggleList:function(e,n,t){var r=ye.getParentList(e),o=ye.getSelectedSubLists(e);t=t||{},r&&0<o.length?nt(e,r,o,n,t):function(e,n,t,r){if(n!==e.getBody())if(n)if(n.nodeName!==t||tt(r)||Vn(n)){var o=R(e.selection.getRng(!0));Yn(e.dom,n,r);var i=e.dom.rename(n,t);et(e.dom,i),e.selection.setRng(I(o)),Bn(e,Xn(t),i)}else Kn(e);else Jn(e,t,r),Bn(e,Xn(t),n)}(e,r,n,t)},mergeWithAdjacentLists:et},ot=m.DOM,it=function(e,n){var t,r=n.parentNode;"LI"===r.nodeName&&r.firstChild===n&&((t=r.previousSibling)&&"LI"===t.nodeName?(t.appendChild(n),E(e,r)&&ot.remove(r)):ot.setStyle(r,"listStyleType","none")),y(r)&&(t=r.previousSibling)&&"LI"===t.nodeName&&t.appendChild(n)},ut=function(n,e){v.each(v.grep(n.select("ol,ul",e)),function(e){it(n,e)})},at=function(e,n,t,r){var o=n.startContainer,i=n.startOffset;if(3===o.nodeType&&(t?i<o.data.length:0<i))return o;var u=e.schema.getNonEmptyElements();1===o.nodeType&&(o=f.getNode(o,i));var a=new d(o,r);for(t&&D(e.dom,o)&&a.next();o=a[t?"next":"prev2"]();){if("LI"===o.nodeName&&!o.hasChildNodes())return o;if(u[o.nodeName])return o;if(3===o.nodeType&&0<o.data.length)return o}},st=function(e,n){var t=n.childNodes;return 1===t.length&&!y(t[0])&&e.isBlock(t[0])},ct=function(e,n,t){var r,o,i,u;if(o=st(e,t)?t.firstChild:t,st(i=e,u=n)&&i.remove(u.firstChild,!0),!E(e,n,!0))for(;r=n.firstChild;)o.appendChild(r)},ft=function(n,e,t){var r,o,i=e.parentNode;if(w(n,e)&&w(n,t)){y(t.lastChild)&&(o=t.lastChild),i===t.lastChild&&b(i.previousSibling)&&n.remove(i.previousSibling),(r=t.lastChild)&&b(r)&&e.hasChildNodes()&&n.remove(r),E(n,t,!0)&&n.$(t).empty(),ct(n,e,t),o&&t.appendChild(o);var u=nn(Se.fromDom(t),Se.fromDom(e))?n.getParents(e,y,t):[];n.remove(e),Y(u,function(e){E(n,e)&&e!==n.getRoot()&&n.remove(e)})}},dt=function(e,n,t,r){var o,i,u,a=e.dom;if(a.isEmpty(r))i=t,u=r,(o=e).dom.$(u).empty(),ft(o.dom,i,u),o.selection.setCursorLocation(u);else{var s=R(n);ft(a,t,r),e.selection.setRng(I(s))}},lt=function(e,n){var t,r,o,i=e.dom,u=e.selection,a=u.getStart(),s=ye.getClosestListRootElm(e,a),c=i.getParent(u.getStart(),"LI",s);if(c){if((t=c.parentNode)===e.getBody()&&E(i,t))return!0;if(r=A(u.getRng(!0)),(o=i.getParent(at(e,r,n,s),"LI",s))&&o!==c)return n?dt(e,r,o,c):function(e,n,t,r){var o=R(n);ft(e.dom,t,r);var i=I(o);e.selection.setRng(i)}(e,r,c,o),!0;if(!o&&!n)return Kn(e),!0}return!1},mt=function(e,n){return lt(e,n)||function(o,i){var u=o.dom,e=o.selection.getStart(),a=ye.getClosestListRootElm(o,e),s=u.getParent(e,u.isBlock,a);if(s&&u.isEmpty(s)){var n=A(o.selection.getRng(!0)),c=u.getParent(at(o,n,i,a),"LI",a);if(c)return o.undoManager.transact(function(){var e,n,t,r;n=s,t=a,r=(e=u).getParent(n.parentNode,e.isBlock,t),e.remove(n),r&&e.isEmpty(r)&&e.remove(r),rt.mergeWithAdjacentLists(u,c.parentNode),o.selection.select(c,!0),o.selection.collapse(i)}),!0}return!1}(e,n)},gt=function(e,n){return e.selection.isCollapsed()?mt(e,n):(r=(t=e).selection.getStart(),o=ye.getClosestListRootElm(t,r),!!(t.dom.getParent(r,"LI,DT,DD",o)||0<ye.getSelectedListItems(t).length)&&(t.undoManager.transact(function(){t.execCommand("Delete"),ut(t.dom,t.getBody())}),!0));var t,r,o},pt=function(n){n.on("keydown",function(e){e.keyCode===l.BACKSPACE?gt(n,!1)&&e.preventDefault():e.keyCode===l.DELETE&>(n,!0)&&e.preventDefault()})},vt=gt,ht=function(n){return{backspaceDelete:function(e){vt(n,e)}}},yt=function(n,t){return function(){var e=n.dom.getParent(n.selection.getStart(),"UL,OL,DL");return e&&e.nodeName===t}},Nt=function(t){t.on("BeforeExecCommand",function(e){var n=e.command.toLowerCase();"indent"===n?Wn(t):"outdent"===n&&zn(t)}),t.addCommand("InsertUnorderedList",function(e,n){rt.toggleList(t,"UL",n)}),t.addCommand("InsertOrderedList",function(e,n){rt.toggleList(t,"OL",n)}),t.addCommand("InsertDefinitionList",function(e,n){rt.toggleList(t,"DL",n)}),t.addCommand("RemoveList",function(){Kn(t)}),t.addQueryStateHandler("InsertUnorderedList",yt(t,"UL")),t.addQueryStateHandler("InsertOrderedList",yt(t,"OL")),t.addQueryStateHandler("InsertDefinitionList",yt(t,"DL"))},St=function(e){return e.getParam("lists_indent_on_tab",!0)},Ot=function(e){var n;St(e)&&(n=e).on("keydown",function(e){e.keyCode!==l.TAB||l.metaKeyPressed(e)||n.undoManager.transact(function(){(e.shiftKey?zn(n):Wn(n))&&e.preventDefault()})}),pt(e)},Ct=function(n,i){return function(o){var e=function(e){var n=function(e,n){for(var t=0;t<e.length;t++)if(n(e[t]))return t;return-1}(e.parents,C),t=-1!==n?e.parents.slice(0,n):e.parents,r=v.grep(t,y);o.setActive(0<r.length&&r[0].nodeName===i&&!Vn(r[0]))};return n.on("NodeChange",e),function(){return n.off("NodeChange",e)}}},bt=function(n){var e,t,r,o=function(e){return function(){return n.execCommand(e)}};t="advlist",r=(e=n).settings.plugins?e.settings.plugins:"",-1===v.inArray(r.split(/[ ,]/),t)&&(n.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:o("InsertOrderedList"),onSetup:Ct(n,"OL")}),n.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:o("InsertUnorderedList"),onSetup:Ct(n,"UL")}))};c.add("lists",function(e){return Ot(e),bt(e),Nt(e),ht(e)}),function Tt(){}}(window);
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(){"use strict";var a,e,t,r,n,i=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(t){return function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&Array.prototype.isPrototypeOf(e)?"array":"object"===t&&String.prototype.isPrototypeOf(e)?"string":t}(e)===t}},v=o("string"),c=o("function"),u=Object.prototype.hasOwnProperty,b=(a=function(e,t){return t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var r={},n=0;n<e.length;n++){var i=e[n];for(var o in i)u.call(i,o)&&(r[o]=a(r[o],i[o]))}return r}),s=function(e){return function(){return e}},l=s(!1),m=s(!0),d=l,h=m,f=function(){return p},p=(n={fold:function(e,t){return e()},is:d,isSome:d,isNone:h,getOr:r=function(e){return e},getOrThunk:t=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:r,orThunk:t,map:f,ap:f,each:function(){},bind:f,flatten:f,exists:d,forall:h,filter:f,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:s("none()")},Object.freeze&&Object.freeze(n),n),g=function(r){var e=function(){return r},t=function(){return i},n=function(e){return e(r)},i={fold:function(e,t){return t(r)},is:function(e){return r===e},isSome:h,isNone:d,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return g(e(r))},ap:function(e){return e.fold(f,function(e){return g(e(r))})},each:function(e){e(r)},bind:n,flatten:e,exists:n,forall:n,filter:function(e){return e(r)?i:p},equals:function(e){return e.is(r)},equals_:function(e,t){return e.fold(d,function(e){return t(r,e)})},toArray:function(){return[r]},toString:function(){return"some("+r+")"}};return i},w=f,y=function(e){return null===e||e===undefined?p:g(e)},x=Object.hasOwnProperty,j=function(e,t){return O(e,t)?y(e[t]):w()},O=function(e,t){return x.call(e,t)},A=Array.prototype.push,_=(Array.prototype.slice,c(Array.from)&&Array.from,tinymce.util.Tools.resolve("tinymce.util.Tools")),C=function(e){return e.getParam("media_scripts")},M=function(e){return e.getParam("audio_template_callback")},F=function(e){return e.getParam("video_template_callback")},P=function(e){return e.getParam("media_live_embeds",!0)},S=function(e){return e.getParam("media_filter_html",!0)},k=function(e){return e.getParam("media_url_resolver")},T=function(e){return e.getParam("media_alt_source",!0)},$=function(e){return e.getParam("media_poster",!0)},z=function(e){return e.getParam("media_dimensions",!0)},D=tinymce.util.Tools.resolve("tinymce.html.SaxParser"),N=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),E=function(e,t){if(e)for(var r=0;r<e.length;r++)if(-1!==t.indexOf(e[r].filter))return e[r]},U=function(t){return function(e){return e?e.style[t].replace(/px$/,""):""}},R=function(n){return function(e,t){var r;e&&(e.style[n]=/^[0-9.]+$/.test(r=t)?r+"px":r)}},W={getMaxWidth:U("maxWidth"),getMaxHeight:U("maxHeight"),setMaxWidth:R("maxWidth"),setMaxHeight:R("maxHeight")},H=N.DOM,L=function(e){return H.getAttrib(e,"data-ephox-embed-iri")},I=function(e,t){return c=t,u=H.createFragment(c),""!==L(u.firstChild)?(o=t,a=H.createFragment(o).firstChild,{type:"ephox-embed-iri",source1:L(a),source2:"",poster:"",width:W.getMaxWidth(a),height:W.getMaxHeight(a)}):(n=e,r=t,D({validate:(i={},!1),allow_conditional_comments:!0,start:function(e,t){if(i.source1||"param"!==e||(i.source1=t.map.movie),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(i.type||(i.type=e),i=_.extend(t.map,i)),"script"===e){var r=E(n,t.map.src);if(!r)return;i={type:"script",source1:t.map.src,width:r.width,height:r.height}}"source"===e&&(i.source1?i.source2||(i.source2=t.map.src):i.source1=t.map.src),"img"!==e||i.poster||(i.poster=t.map.src)}}).parse(r),i.source1=i.source1||i.src||i.data,i.source2=i.source2||"",i.poster=i.poster||"",i);var n,r,i,o,a,c,u},q=tinymce.util.Tools.resolve("tinymce.util.Promise"),B=function(e){var t={mp3:"audio/mpeg",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"}[e.toLowerCase().split(".").pop()];return t||""},G=tinymce.util.Tools.resolve("tinymce.html.Writer"),J=tinymce.util.Tools.resolve("tinymce.html.Schema"),K=N.DOM,Q=function(e,t){var r,n,i,o;for(r in t)if(i=""+t[r],e.map[r])for(n=e.length;n--;)(o=e[n]).name===r&&(i?(e.map[r]=i,o.value=i):(delete e.map[r],e.splice(n,1)));else i&&(e.push({name:r,value:i}),e.map[r]=i)},V=function(e,t){var r,n,i=K.createFragment(e).firstChild;return W.setMaxWidth(i,t.width),W.setMaxHeight(i,t.height),r=i.outerHTML,n=G(),D(n).parse(r),n.getContent()},X=function(e,t,r){return s=e,l=K.createFragment(s),""!==K.getAttrib(l.firstChild,"data-ephox-embed-iri")?V(e,t):(n=e,i=t,o=r,c=G(),D({validate:!1,allow_conditional_comments:!(u=0),comment:function(e){c.comment(e)},cdata:function(e){c.cdata(e)},text:function(e,t){c.text(e,t)},start:function(e,t,r){switch(e){case"video":case"object":case"embed":case"img":case"iframe":i.height!==undefined&&i.width!==undefined&&Q(t,{width:i.width,height:i.height})}if(o)switch(e){case"video":Q(t,{poster:i.poster,src:""}),i.source2&&Q(t,{src:""});break;case"iframe":Q(t,{src:i.source1});break;case"source":if(++u<=2&&(Q(t,{src:i["source"+u],type:i["source"+u+"mime"]}),!i["source"+u]))return;break;case"img":if(!i.poster)return;a=!0}c.start(e,t,r)},end:function(e){if("video"===e&&o)for(var t=1;t<=2;t++)if(i["source"+t]){var r=[];r.map={},u<t&&(Q(r,{src:i["source"+t],type:i["source"+t+"mime"]}),c.start("source",r,!0))}if(i.poster&&"object"===e&&o&&!a){var n=[];n.map={},Q(n,{src:i.poster,width:i.width,height:i.height}),c.start("img",n,!0)}c.end(e)}},J({})).parse(n),c.getContent());var n,i,o,a,c,u,s,l},Y=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],Z=function(r,e){var n=_.extend({},e);if(!n.source1&&(_.extend(n,I(C(r),n.embed)),!n.source1))return"";n.source2||(n.source2=""),n.poster||(n.poster=""),n.source1=r.convertURL(n.source1,"source"),n.source2=r.convertURL(n.source2,"source"),n.source1mime=B(n.source1),n.source2mime=B(n.source2),n.poster=r.convertURL(n.poster,"poster");var t,i,o=(t=n.source1,0<(i=Y.filter(function(e){return e.regex.test(t)})).length?_.extend({},i[0],{url:function(e,t){for(var r=e.regex.exec(t),n=e.url,i=function(e){n=n.replace("$"+e,function(){return r[e]?r[e]:""})},o=0;o<r.length;o++)i(o);return n.replace(/\?$/,"")}(i[0],t)}):null);if(o&&(n.source1=o.url,n.type=o.type,n.allowFullscreen=o.allowFullscreen,n.width=n.width||o.w,n.height=n.height||o.h),n.embed)return X(n.embed,n,!0);var a=E(C(r),n.source1);a&&(n.type="script",n.width=a.width,n.height=a.height);var c,u,s,l,m,d,h,f,p=M(r),g=F(r);return n.width=n.width||300,n.height=n.height||150,_.each(n,function(e,t){n[t]=r.dom.encode(""+e)}),"iframe"===n.type?(f=(h=n).allowFullscreen?' allowFullscreen="1"':"",'<iframe src="'+h.source1+'" width="'+h.width+'" height="'+h.height+'"'+f+"></iframe>"):"application/x-shockwave-flash"===n.source1mime?(d='<object data="'+(m=n).source1+'" width="'+m.width+'" height="'+m.height+'" type="application/x-shockwave-flash">',m.poster&&(d+='<img src="'+m.poster+'" width="'+m.width+'" height="'+m.height+'" />'),d+="</object>"):-1!==n.source1mime.indexOf("audio")?(s=n,(l=p)?l(s):'<audio controls="controls" src="'+s.source1+'">'+(s.source2?'\n<source src="'+s.source2+'"'+(s.source2mime?' type="'+s.source2mime+'"':"")+" />\n":"")+"</audio>"):"script"===n.type?'<script src="'+n.source1+'"><\/script>':(c=n,(u=g)?u(c):'<video width="'+c.width+'" height="'+c.height+'"'+(c.poster?' poster="'+c.poster+'"':"")+' controls="controls">\n<source src="'+c.source1+'"'+(c.source1mime?' type="'+c.source1mime+'"':"")+" />\n"+(c.source2?'<source src="'+c.source2+'"'+(c.source2mime?' type="'+c.source2mime+'"':"")+" />\n":"")+"</video>")},ee={},te=function(t){return function(e){return Z(t,e)}},re=function(e,t){var r,n,i,o,a,c=k(e);return c?(i=t,o=te(e),a=c,new q(function(t,e){var r=function(e){return e.html&&(ee[i.source1]=e),t({url:i.source1,html:e.html?e.html:o(i)})};ee[i.source1]?r(ee[i.source1]):a({url:i.source1},r,e)})):(r=t,n=te(e),new q(function(e){e({html:n(r),url:r.source1})}))},ne=function(e){return ee.hasOwnProperty(e)},ie=function(e){return b(e,{source1:e.source1.value,source2:j(e,"source2").bind(function(e){return j(e,"value")}).getOr(""),poster:j(e,"poster").bind(function(e){return j(e,"value")}).getOr("")})},oe=function(e){return b(e,{source1:{value:j(e,"source1").getOr("")},source2:{value:j(e,"source2").getOr("")},poster:{value:j(e,"poster").getOr("")}})},ae=function(r){return function(e){var t=e&&e.msg?"Media embed handler error: "+e.msg:"Media embed handler threw unknown error.";r.notificationManager.open({type:"error",text:t})}},ce=function(e,t){return _.extend({},I(C(e),t))},ue=function(e,t){var r=e.dom.select("img[data-mce-object]");e.insertContent(t),function(e,t){var r,n,i=e.dom.select("img[data-mce-object]");for(r=0;r<t.length;r++)for(n=i.length-1;0<=n;n--)t[r]===i[n]&&i.splice(n,1);e.selection.select(i[0])}(e,r),e.nodeChanged()},se=function(a){var e,t,r,n,i,o=(t=(e=a).selection.getNode(),(r=t.getAttribute("data-ephox-embed-iri"))?{source1:r,width:W.getMaxWidth(t),height:W.getMaxHeight(t)}:t.getAttribute("data-mce-object")?I(C(e),e.serializer.serialize(t,{selection:!0})):{}),c={source1:"",source2:"",embed:(n=a,i=n.selection.getNode(),i.getAttribute("data-mce-object")||i.getAttribute("data-ephox-embed-iri")?n.selection.getContent():""),poster:"",dimensions:{height:o.height?o.height:"",width:o.width?o.width:""}},u=oe(b(c,o)),s=function(e){var t=ie(e.getData());return z(a)?b(t,{width:t.dimensions.width,height:t.dimensions.height}):t},l=function(e){var r,o,t=s(e);re(a,t).then((r=w,o=a,function(e){if(v(e.url)&&0<e.url.trim().length){var t=e.html,n=ce(o,t),i={source1:e.url,embed:t};!function(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r,e)}(["width","height"],function(r){j(n,r).each(function(e){var t=i.dimensions||{};t[r]=e,i.dimensions=t})}),r.setData(oe(i))}}))["catch"](ae(a))},m={title:"General",items:function(e){for(var t=[],r=0,n=e.length;r<n;++r){if(!Array.prototype.isPrototypeOf(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);A.apply(t,e[r])}return t}([[{name:"source1",type:"urlinput",filetype:"media",label:"Source"}],z(a)?[{type:"sizeinput",name:"dimensions",label:"Constrain proportions",constrain:!0}]:[]])},d={title:"Embed",items:[{type:"textarea",name:"embed",label:"Paste your embed code below:"}]},h=[];T(a)&&h.push({name:"source2",type:"urlinput",filetype:"media",label:"Alternative source URL"}),$(a)&&h.push({name:"poster",type:"urlinput",filetype:"image",label:"Media poster (Image URL)"});var f={title:"Advanced",items:h},p=[m,d];0<h.length&&p.push(f);var g={type:"tabpanel",tabs:p},w=a.windowManager.open({title:"Insert/Edit Media",size:"normal",body:g,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:function(e){var t,r,n=s(e);r=a,(t=n).embed=X(t.embed,t),t.embed&&ne(t.source1)?ue(r,t.embed):re(r,t).then(function(e){ue(r,e.html)})["catch"](ae(r)),e.close()},onChange:function(e,t){switch(t.name){case"source1":l(e);break;case"embed":n=ie((r=e).getData()),(i=ce(a,n.embed)).dimensions={width:i.width?i.width:n.dimensions.width,height:i.height?i.height:n.dimensions.height},r.setData(oe(i))}var r,n,i},initialData:u})},le=function(e){return{showDialog:function(){se(e)}}},me=function(e){e.addCommand("mceMedia",function(){se(e)})},de=tinymce.util.Tools.resolve("tinymce.html.Node"),he=tinymce.util.Tools.resolve("tinymce.Env"),fe=function(i,e){if(!1===S(i))return e;var o,a=G();return D({validate:!1,allow_conditional_comments:!1,comment:function(e){a.comment(e)},cdata:function(e){a.cdata(e)},text:function(e,t){a.text(e,t)},start:function(e,t,r){if(o=!0,"script"!==e&&"noscript"!==e){for(var n=0;n<t.length;n++){if(0===t[n].name.indexOf("on"))return;"style"===t[n].name&&(t[n].value=i.dom.serializeStyle(i.dom.parseStyle(t[n].value),e))}a.start(e,t,r),o=!1}},end:function(e){o||a.end(e)}},J({})).parse(e),a.getContent()},pe=function(e,t){var r,n=t.name;return(r=new de("img",1)).shortEnded=!0,we(e,t,r),r.attr({width:t.attr("width")||"300",height:t.attr("height")||("audio"===n?"30":"150"),style:t.attr("style"),src:he.transparentSrc,"data-mce-object":n,"class":"mce-object mce-object-"+n}),r},ge=function(e,t){var r,n,i,o=t.name;return(r=new de("span",1)).attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":o,"class":"mce-preview-object mce-object-"+o}),we(e,t,r),(n=new de(o,1)).attr({src:t.attr("src"),allowfullscreen:t.attr("allowfullscreen"),style:t.attr("style"),"class":t.attr("class"),width:t.attr("width"),height:t.attr("height"),frameborder:"0"}),(i=new de("span",1)).attr("class","mce-shim"),r.append(n),r.append(i),r},we=function(e,t,r){var n,i,o,a,c;for(a=(o=t.attributes).length;a--;)n=o[a].name,i=o[a].value,"width"!==n&&"height"!==n&&"style"!==n&&("data"!==n&&"src"!==n||(i=e.convertURL(i,n)),r.attr("data-mce-p-"+n,i));(c=t.firstChild&&t.firstChild.value)&&(r.attr("data-mce-html",escape(fe(e,c))),r.firstChild=null)},ve=function(e){for(;e=e.parent;)if(e.attr("data-ephox-embed-iri")||(t=e.attr("class"))&&/\btiny-pageembed\b/.test(t))return!0;var t;return!1},be=function(i){return function(e){for(var t,r,n=e.length;n--;)(t=e[n]).parent&&(t.parent.attr("data-mce-object")||("script"!==t.name||(r=E(C(i),t.attr("src"))))&&(r&&(r.width&&t.attr("width",r.width.toString()),r.height&&t.attr("height",r.height.toString())),"iframe"===t.name&&P(i)&&he.ceFalse?ve(t)||t.replace(ge(i,t)):ve(t)||t.replace(pe(i,t))))}},ye=function(d){d.on("preInit",function(){var t=d.schema.getSpecialElements();_.each("video audio iframe object".split(" "),function(e){t[e]=new RegExp("</"+e+"[^>]*>","gi")});var r=d.schema.getBoolAttrs();_.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){r[e]={}}),d.parser.addNodeFilter("iframe,video,audio,object,embed,script",be(d)),d.serializer.addAttributeFilter("data-mce-object",function(e,t){for(var r,n,i,o,a,c,u,s,l=e.length;l--;)if((r=e[l]).parent){for(u=r.attr(t),n=new de(u,1),"audio"!==u&&"script"!==u&&((s=r.attr("class"))&&-1!==s.indexOf("mce-preview-object")?n.attr({width:r.firstChild.attr("width"),height:r.firstChild.attr("height")}):n.attr({width:r.attr("width"),height:r.attr("height")})),n.attr({style:r.attr("style")}),i=(o=r.attributes).length;i--;){var m=o[i].name;0===m.indexOf("data-mce-p-")&&n.attr(m.substr(11),o[i].value)}"script"===u&&n.attr("type","text/javascript"),(a=r.attr("data-mce-html"))&&((c=new de("#text",3)).raw=!0,c.value=fe(d,unescape(a)),n.append(c)),r.replace(n)}})}),d.on("SetContent",function(){d.$("span.mce-preview-object").each(function(e,t){var r=d.$(t);0===r.find("span.mce-shim",t).length&&r.append('<span class="mce-shim"></span>')})})},xe=function(e){e.on("ResolveName",function(e){var t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)})},je=function(t){t.on("click keyup",function(){var e=t.selection.getNode();e&&t.dom.hasClass(e,"mce-preview-object")&&t.dom.getAttrib(e,"data-mce-selected")&&e.setAttribute("data-mce-selected","2")}),t.on("ObjectSelected",function(e){var t=e.target.getAttribute("data-mce-object");"audio"!==t&&"script"!==t||e.preventDefault()}),t.on("ObjectResized",function(e){var t,r=e.target;r.getAttribute("data-mce-object")&&(t=r.getAttribute("data-mce-html"))&&(t=unescape(t),r.setAttribute("data-mce-html",escape(X(t,{width:e.width,height:e.height}))))})},Oe=function(e){var t,r;e.ui.registry.addToggleButton("media",{tooltip:"Insert/edit media",icon:"embed",onAction:function(){e.execCommand("mceMedia")},onSetup:(t=e,r=["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"],function(e){return t.selection.selectorChangedWithUnbind(r.join(","),e.setActive).unbind})}),e.ui.registry.addMenuItem("media",{icon:"embed",text:"Media...",onAction:function(){e.execCommand("mceMedia")}})};i.add("media",function(e){return me(e),Oe(e),xe(e),ye(e),je(e),le(e)}),function Ae(){}}();
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=function(n,e){var o,t=(o=n).plugins.visualchars&&o.plugins.visualchars.isEnabled()?'<span class="mce-nbsp"> </span>':" ";n.insertContent(function(n,e){for(var o="",t=0;t<e;t++)o+=n;return o}(t,e)),n.dom.setAttrib(n.dom.select("span.mce-nbsp"),"data-mce-bogus","1")},e=function(n){n.addCommand("mceNonBreaking",function(){t(n,1)})},i=tinymce.util.Tools.resolve("tinymce.util.VK"),a=function(n){var e=n.getParam("nonbreaking_force_tab",0);return"boolean"==typeof e?!0===e?3:0:e},o=function(e){var o=a(e);0<o&&e.on("keydown",function(n){if(n.keyCode===i.TAB&&!n.isDefaultPrevented()){if(n.shiftKey)return;n.preventDefault(),n.stopImmediatePropagation(),t(e,o)}})},r=function(n){n.ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:function(){return n.execCommand("mceNonBreaking")}}),n.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:function(){return n.execCommand("mceNonBreaking")}})};n.add("nonbreaking",function(n){e(n),r(n),o(n)}),function c(){}}();
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=function(t){return t.getParam("noneditable_noneditable_class","mceNonEditable")},u=function(t){return t.getParam("noneditable_editable_class","mceEditable")},f=function(t){var n=t.getParam("noneditable_regexp",[]);return n&&n.constructor===RegExp?[n]:n},s=function(n){return function(t){return-1!==(" "+t.attr("class")+" ").indexOf(n)}},d=function(i,o,c){return function(t){var n=arguments,e=n[n.length-2],r=0<e?o.charAt(e-1):"";if('"'===r)return t;if(">"===r){var a=o.lastIndexOf("<",e);if(-1!==a&&-1!==o.substring(a,e).indexOf('contenteditable="false"'))return t}return'<span class="'+c+'" data-mce-content="'+i.dom.encode(n[0])+'">'+i.dom.encode("string"==typeof n[1]?n[1]:n[0])+"</span>"}},n=function(n){var t,e,r="contenteditable";t=" "+c.trim(u(n))+" ",e=" "+c.trim(l(n))+" ";var a=s(t),i=s(e),o=f(n);n.on("PreInit",function(){0<o.length&&n.on("BeforeSetContent",function(t){!function(t,n,e){var r=n.length,a=e.content;if("raw"!==e.format){for(;r--;)a=a.replace(n[r],d(t,a,l(t)));e.content=a}}(n,o,t)}),n.parser.addAttributeFilter("class",function(t){for(var n,e=t.length;e--;)n=t[e],a(n)?n.attr(r,"true"):i(n)&&n.attr(r,"false")}),n.serializer.addAttributeFilter(r,function(t){for(var n,e=t.length;e--;)n=t[e],(a(n)||i(n))&&(0<o.length&&n.attr("data-mce-content")?(n.name="#text",n.type=3,n.raw=!0,n.value=n.attr("data-mce-content")):n.attr(r,null))})})};t.add("noneditable",function(t){n(t)}),function e(){}}();
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),a=function(e){return e.getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e")},i=function(e){return e.getParam("pagebreak_split_block",!1)},t=function(){return"mce-pagebreak"},r=function(){return'<img src="'+n.transparentSrc+'" class="mce-pagebreak" data-mce-resize="false" data-mce-placeholder />'},o=function(o){var c=a(o),n=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi");o.on("BeforeSetContent",function(e){e.content=e.content.replace(n,r())}),o.on("PreInit",function(){o.serializer.addNodeFilter("img",function(e){for(var n,a,t=e.length;t--;)if((a=(n=e[t]).attr("class"))&&-1!==a.indexOf("mce-pagebreak")){var r=n.parent;if(o.schema.getBlockElements()[r.name]&&i(o)){r.type=3,r.value=c,r.raw=!0,n.remove();continue}n.type=3,n.value=c,n.raw=!0}})})},c=r,u=t,g=function(e){e.addCommand("mcePageBreak",function(){e.settings.pagebreak_split_block?e.insertContent("<p>"+c()+"</p>"):e.insertContent(c())})},m=function(n){n.on("ResolveName",function(e){"IMG"===e.target.nodeName&&n.dom.hasClass(e.target,u())&&(e.name="pagebreak")})},s=function(e){e.ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:function(){return e.execCommand("mcePageBreak")}}),e.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:function(){return e.execCommand("mcePageBreak")}})};e.add("pagebreak",function(e){g(e),s(e),o(e),m(e)}),function l(){}}();
|
@@ -4,6 +4,6 @@
|
|
4
4
|
* For LGPL see License.txt in the project root for license information.
|
5
5
|
* For commercial licenses see https://www.tiny.cloud/
|
6
6
|
*
|
7
|
-
* Version: 5.0.
|
7
|
+
* Version: 5.0.5 (2019-05-09)
|
8
8
|
*/
|
9
9
|
!function(v){"use strict";var i=function(t){var e=t,n=function(){return e};return{get:n,set:function(t){e=t},clone:function(){return i(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(t){return!(!/(^|[ ,])powerpaste([, ]|$)/.test(t.settings.plugins)||!e.get("powerpaste")||("undefined"!=typeof v.window.console&&v.window.console.log&&v.window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),0))},u=function(t,e){return{clipboard:t,quirks:e}},f=function(t,e,n,r){return t.fire("PastePreProcess",{content:e,internal:n,wordContent:r})},d=function(t,e,n,r){return t.fire("PastePostProcess",{node:e,internal:n,wordContent:r})},n=function(t,e){return t.fire("PastePlainTextToggle",{state:e})},r=function(t,e){return t.fire("paste",{ieFake:e})},o=function(t,e){"text"===e.pasteFormat.get()?(e.pasteFormat.set("html"),n(t,!1)):(e.pasteFormat.set("text"),n(t,!0)),t.focus()},s=function(t,n){t.addCommand("mceTogglePlainTextPaste",function(){o(t,n)}),t.addCommand("mceInsertClipboardContent",function(t,e){e.content&&n.pasteHtml(e.content,e.internal),e.text&&n.pasteText(e.text)})},h=tinymce.util.Tools.resolve("tinymce.Env"),y=tinymce.util.Tools.resolve("tinymce.util.Delay"),b=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=tinymce.util.Tools.resolve("tinymce.util.VK"),t="x-tinymce/html",c="\x3c!-- "+t+" --\x3e",m=function(t){return c+t},g=function(t){return t.replace(c,"")},x=function(t){return-1!==t.indexOf(c)},P=function(){return t},p=tinymce.util.Tools.resolve("tinymce.html.Entities"),w=function(t){return t.replace(/\r?\n/g,"<br>")},T=function(t,e,n){var r=t.split(/\n\n/),o=function(t,e){var n,r=[],o="<"+t;if("object"==typeof e){for(n in e)e.hasOwnProperty(n)&&r.push(n+'="'+p.encodeAllRaw(e[n])+'"');r.length&&(o+=" "+r.join(" "))}return o+">"}(e,n),i="</"+e+">",a=b.map(r,function(t){return t.split(/\n/).join("<br />")});return 1===a.length?a[0]:b.map(a,function(t){return o+t+i}).join("")},D=function(t){return!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(t)},_=function(t,e,n){return e?T(t,e,n):w(t)},C=tinymce.util.Tools.resolve("tinymce.html.DomParser"),k=tinymce.util.Tools.resolve("tinymce.html.Node"),S=tinymce.util.Tools.resolve("tinymce.html.Schema"),O=tinymce.util.Tools.resolve("tinymce.html.Serializer"),R={shouldBlockDrop:function(t){return t.getParam("paste_block_drop",!1)},shouldPasteDataImages:function(t){return t.getParam("paste_data_images",!1)},shouldFilterDrop:function(t){return t.getParam("paste_filter_drop",!0)},getPreProcess:function(t){return t.getParam("paste_preprocess")},getPostProcess:function(t){return t.getParam("paste_postprocess")},getWebkitStyles:function(t){return t.getParam("paste_webkit_styles")},shouldRemoveWebKitStyles:function(t){return t.getParam("paste_remove_styles_if_webkit",!0)},shouldMergeFormats:function(t){return t.getParam("paste_merge_formats",!0)},isSmartPasteEnabled:function(t){return t.getParam("smart_paste",!0)},isPasteAsTextEnabled:function(t){return t.getParam("paste_as_text",!1)},getRetainStyleProps:function(t){return t.getParam("paste_retain_style_properties")},getWordValidElements:function(t){return t.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody")},shouldConvertWordFakeLists:function(t){return t.getParam("paste_convert_word_fake_lists",!0)},shouldUseDefaultFilters:function(t){return t.getParam("paste_enable_default_filters",!0)}};function A(e,t){return b.each(t,function(t){e=t.constructor===RegExp?e.replace(t,""):e.replace(t[0],t[1])}),e}var E={filter:A,innerText:function Jt(t){var e=S(),n=C({},e),r="",o=e.getShortEndedElements(),i=b.makeMap("script noscript style textarea video audio iframe object"," "),a=e.getBlockElements();return t=A(t,[/<!\[[^\]]+\]>/g]),function u(t){var e=t.name,n=t;if("br"!==e){if("wbr"!==e)if(o[e]&&(r+=" "),i[e])r+=" ";else{if(3===t.type&&(r+=t.value),!t.shortEnded&&(t=t.firstChild))for(;u(t),t=t.next;);a[e]&&n.next&&(r+="\n","p"===e&&(r+="\n"))}}else r+="\n"}(n.parse(t)),r},trimHtml:function Qt(t){return t=A(t,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function r(t,e,n){return e||n?"\xa0":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])},createIdGenerator:function te(t){var e=0;return function(){return t+e++}},isMsEdge:function(){return-1!==v.navigator.userAgent.indexOf(" Edge/")}};function F(e){var n,t;return t=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],e=e.replace(/^[\u00a0 ]+/,""),b.each(t,function(t){if(t.test(e))return!(n=!0)}),n}function I(t){var i,a,u=1;function n(t){var e="";if(3===t.type)return t.value;if(t=t.firstChild)for(;e+=n(t),t=t.next;);return e}function s(t,e){if(3===t.type&&e.test(t.value))return t.value=t.value.replace(e,""),!1;if(t=t.firstChild)do{if(!s(t,e))return!1}while(t=t.next);return!0}function e(t,e,n){var r=t._listLevel||u;r!==u&&(r<u?i&&(i=i.parent.parent):(a=i,i=null)),i&&i.name===e?i.append(t):(a=a||i,i=new k(e,1),1<n&&i.attr("start",""+n),t.wrap(i)),t.name="li",u<r&&a&&a.lastChild.append(i),u=r,function o(t){if(t._listIgnore)t.remove();else if(t=t.firstChild)for(;o(t),t=t.next;);}(t),s(t,/^\u00a0+/),s(t,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),s(t,/^\u00a0+/)}for(var r=[],o=t.firstChild;null!=o;)if(r.push(o),null!==(o=o.walk()))for(;void 0!==o&&o.parent!==t;)o=o.walk();for(var l=0;l<r.length;l++)if("p"===(t=r[l]).name&&t.firstChild){var c=n(t);if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(c)){e(t,"ul");continue}if(F(c)){var f=/([0-9]+)\./.exec(c),d=1;f&&(d=parseInt(f[1],10)),e(t,"ol",d);continue}if(t._listLevel){e(t,"ul",1);continue}i=null}else a=i,i=null}function M(n,r,o,i){var a,u={},t=n.dom.parseStyle(i);return b.each(t,function(t,e){switch(e){case"mso-list":(a=/\w+ \w+([0-9]+)/i.exec(i))&&(o._listLevel=parseInt(a[1],10)),/Ignore/i.test(t)&&o.firstChild&&(o._listIgnore=!0,o.firstChild._listIgnore=!0);break;case"horiz-align":e="text-align";break;case"vert-align":e="vertical-align";break;case"font-color":case"mso-foreground":e="color";break;case"mso-background":case"mso-highlight":e="background";break;case"font-weight":case"font-style":return void("normal"!==t&&(u[e]=t));case"mso-element":if(/^(comment|comment-list)$/i.test(t))return void o.remove()}0!==e.indexOf("mso-comment")?0!==e.indexOf("mso-")&&("all"===R.getRetainStyleProps(n)||r&&r[e])&&(u[e]=t):o.remove()}),/(bold)/i.test(u["font-weight"])&&(delete u["font-weight"],o.wrap(new k("b",1))),/(italic)/i.test(u["font-style"])&&(delete u["font-style"],o.wrap(new k("i",1))),(u=n.dom.serializeStyle(u,o.name))||null}var B,H,j,L,N,$={preProcess:function(t,e){return R.shouldUseDefaultFilters(t)?function(r,t){var e,o;(e=R.getRetainStyleProps(r))&&(o=b.makeMap(e.split(/[, ]/))),t=E.filter(t,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\xa0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(t,e){return 0<e.length?e.replace(/./," ").slice(Math.floor(e.length/2)).split("").join("\xa0"):""}]]);var n=R.getWordValidElements(r),i=S({valid_elements:n,valid_children:"-li[p]"});b.each(i.elements,function(t){t.attributes["class"]||(t.attributes["class"]={},t.attributesOrder.push("class")),t.attributes.style||(t.attributes.style={},t.attributesOrder.push("style"))});var a=C({},i);a.addAttributeFilter("style",function(t){for(var e,n=t.length;n--;)(e=t[n]).attr("style",M(r,o,e,e.attr("style"))),"span"===e.name&&e.parent&&!e.attributes.length&&e.unwrap()}),a.addAttributeFilter("class",function(t){for(var e,n,r=t.length;r--;)n=(e=t[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&e.remove(),e.attr("class",null)}),a.addNodeFilter("del",function(t){for(var e=t.length;e--;)t[e].remove()}),a.addNodeFilter("a",function(t){for(var e,n,r,o=t.length;o--;)if(n=(e=t[o]).attr("href"),r=e.attr("name"),n&&-1!==n.indexOf("#_msocom_"))e.remove();else if(n&&0===n.indexOf("file://")&&(n=n.split("#")[1])&&(n="#"+n),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){e.unwrap();continue}e.attr({href:n,name:r})}else e.unwrap()});var u=a.parse(t);return R.shouldConvertWordFakeLists(r)&&I(u),t=O({validate:r.settings.validate},i).serialize(u)}(t,e):e},isWordContent:function ee(t){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(t)||/class="OutlineElement/.test(t)||/id="?docs\-internal\-guid\-/.test(t)}},W=function(t,e){return{content:t,cancelled:e}},z=function(t,e,n,r){var o,i,a,u,s,l,c=f(t,e,n,r);return t.hasEventListeners("PastePostProcess")&&!c.isDefaultPrevented()?(o=t,i=c.content,a=n,u=r,s=o.dom.create("div",{style:"display:none"},i),l=d(o,s,a,u),W(l.node.innerHTML,l.isDefaultPrevented())):W(c.content,c.isDefaultPrevented())},U=function(t,e,n){var r=$.isWordContent(e),o=r?$.preProcess(t,e):e;return z(t,o,n,r)},V=function(t,e){var n,r;return t.insertContent((n=e,r=t.dom.create("body",{},n),b.each(r.querySelectorAll("meta"),function(t){return t.parentNode.removeChild(t)}),r.innerHTML),{merge:R.shouldMergeFormats(t),paste:!0}),!0},q=function(t){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(t)},K=function(t){return q(t)&&/.(gif|jpe?g|png)$/.test(t)},G=function(t,e,n){return!(!1!==t.selection.isCollapsed()||!q(e)||(o=e,i=n,(r=t).undoManager.extra(function(){i(r,o)},function(){r.execCommand("mceInsertLink",!1,o)}),0));var r,o,i},X=function(t,e,n){return!!K(e)&&(o=e,i=n,(r=t).undoManager.extra(function(){i(r,o)},function(){r.insertContent('<img src="'+o+'">')}),!0);var r,o,i},Y=function(t,e){var n,r;!1===R.isSmartPasteEnabled(t)?V(t,e):(n=t,r=e,b.each([G,X,V],function(t){return!0!==t(n,r,V)}))},Z=function(t){return function(){return t}},J=Z(!1),Q=Z(!0),tt=J,et=Q,nt=function(){return rt},rt=(L={fold:function(t,e){return t()},is:tt,isSome:tt,isNone:et,getOr:j=function(t){return t},getOrThunk:H=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:j,orThunk:H,map:nt,ap:nt,each:function(){},bind:nt,flatten:nt,exists:tt,forall:et,filter:nt,equals:B=function(t){return t.isNone()},equals_:B,toArray:function(){return[]},toString:Z("none()")},Object.freeze&&Object.freeze(L),L),ot=function(n){var t=function(){return n},e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:et,isNone:tt,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return ot(t(n))},ap:function(t){return t.fold(nt,function(t){return ot(t(n))})},each:function(t){t(n)},bind:r,flatten:t,exists:r,forall:r,filter:function(t){return t(n)?o:rt},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(tt,function(t){return e(n,t)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},it={some:ot,none:nt,from:function(t){return null===t||t===undefined?rt:ot(t)}},at=(N="function",function(t){return function(t){if(null===t)return"null";var e=typeof t;return"object"===e&&Array.prototype.isPrototypeOf(t)?"array":"object"===e&&String.prototype.isPrototypeOf(t)?"string":e}(t)===N}),ut=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o,t)}return r},st=function(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n,t)},lt=Array.prototype.slice,ct=at(Array.from)?Array.from:function(t){return lt.call(t)},ft=function(t){var n=it.none(),e=[],r=function(t){o()?a(t):e.push(t)},o=function(){return n.isSome()},i=function(t){st(t,a)},a=function(e){n.each(function(t){v.setTimeout(function(){e(t)},0)})};return t(function(t){n=it.some(t),i(e),e=[]}),{get:r,map:function(n){return ft(function(e){r(function(t){e(n(t))})})},isReady:o}},dt={nu:ft,pure:function(e){return ft(function(t){t(e)})}},mt=function(e){var t=function(t){var r;e((r=t,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this;v.setTimeout(function(){r.apply(n,t)},0)}))},n=function(){return dt.nu(t)};return{map:function(r){return mt(function(n){t(function(t){var e=r(t);n(e)})})},bind:function(n){return mt(function(e){t(function(t){n(t).get(e)})})},anonBind:function(n){return mt(function(e){t(function(t){n.get(e)})})},toLazy:n,toCached:function(){var e=null;return mt(function(t){null===e&&(e=n()),e.get(t)})},get:t}},gt={nu:mt,pure:function(e){return mt(function(t){t(e)})}},pt=function(a,t){return t(function(r){var o=[],i=0;0===a.length?r([]):st(a,function(t,e){var n;t.get((n=e,function(t){o[n]=t,++i>=a.length&&r(o)}))})})},vt=function(t,e){var n=ut(t,e);return pt(n,gt.nu)},ht=function(t,e,n){var r=n||x(e),o=U(t,g(e),r);!1===o.cancelled&&Y(t,o.content)},yt=function(t,e){e=t.dom.encode(e).replace(/\r\n/g,"\n"),e=_(e,t.settings.forced_root_block,t.settings.forced_root_block_attrs),ht(t,e,!1)},bt=function(t){var e={};if(t){if(t.getData){var n=t.getData("Text");n&&0<n.length&&-1===n.indexOf("data:text/mce-internal,")&&(e["text/plain"]=n)}if(t.types)for(var r=0;r<t.types.length;r++){var o=t.types[r];try{e[o]=t.getData(o)}catch(i){e[o]=""}}}return e},xt=function(t,e){return e in t&&0<t[e].length},Pt=function(t){return xt(t,"text/html")||xt(t,"text/plain")},wt=E.createIdGenerator("mceclip"),Tt=function(e,t,n){var r,o,i,a,u="paste"===t.type?t.clipboardData:t.dataTransfer;if(e.settings.paste_data_images&&u){var s=(i=(o=u).items?ut(ct(o.items),function(t){return t.getAsFile()}):[],a=o.files?ct(o.files):[],function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r,t)&&n.push(i)}return n}(0<i.length?i:a,function(t){return/^image\/(jpeg|png|gif|bmp)$/.test(t.type)}));if(0<s.length)return t.preventDefault(),(r=s,vt(r,function(r){return gt.nu(function(t){var e=r.getAsFile?r.getAsFile():r,n=new window.FileReader;n.onload=function(){t({blob:e,uri:n.result})},n.readAsDataURL(e)})})).get(function(t){n&&e.selection.setRng(n),st(t,function(t){!function(t,e){var n,r,o,i,a,u,s,l=(n=e.uri,-1!==(r=n.indexOf(","))?n.substr(r+1):null),c=wt(),f=t.settings.images_reuse_filename&&e.blob.name?(o=t,i=e.blob.name,(a=i.match(/([\s\S]+?)\.(?:jpeg|jpg|png|gif)$/i))?o.dom.encode(a[1]):null):c,d=new v.Image;if(d.src=e.uri,u=t.settings,s=d,!u.images_dataimg_filter||u.images_dataimg_filter(s)){var m,g=t.editorUpload.blobCache,p=void 0;(m=g.findFirst(function(t){return t.base64()===l}))?p=m:(p=g.create(c,e.blob,l,f),g.add(p)),ht(t,'<img src="'+p.blobUri()+'">',!1)}else ht(t,'<img src="'+e.uri+'">',!1)}(e,t)})}),!0}return!1},Dt=function(t){return l.metaKeyPressed(t)&&86===t.keyCode||t.shiftKey&&45===t.keyCode},_t=function(c,f,d){var m,g=0;function p(t,e,n,r){var o,i;xt(t,"text/html")?o=t["text/html"]:(o=f.getHtml(),r=r||x(o),f.isDefaultContent(o)&&(n=!0)),o=E.trimHtml(o),f.remove(),i=!1===r&&D(o),o.length&&!i||(n=!0),n&&(o=xt(t,"text/plain")&&i?t["text/plain"]:E.innerText(o)),f.isDefaultContent(o)?e||c.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):n?yt(c,o):ht(c,o,r)}c.on("keydown",function(t){function e(t){Dt(t)&&!t.isDefaultPrevented()&&f.remove()}if(Dt(t)&&!t.isDefaultPrevented()){if((m=t.shiftKey&&86===t.keyCode)&&h.webkit&&-1!==v.navigator.userAgent.indexOf("Version/"))return;if(t.stopImmediatePropagation(),g=(new Date).getTime(),h.ie&&m)return t.preventDefault(),void r(c,!0);f.remove(),f.create(),c.once("keyup",e),c.once("paste",function(){c.off("keyup",e)})}}),c.on("paste",function(t){var e,n,r,o=(new Date).getTime(),i=(e=c,n=bt(t.clipboardData||e.getDoc().dataTransfer),E.isMsEdge()?b.extend(n,{"text/html":""}):n),a=(new Date).getTime()-o,u=(new Date).getTime()-g-a<1e3,s="text"===d.get()||m,l=xt(i,P());m=!1,t.isDefaultPrevented()||(r=t.clipboardData,-1!==v.navigator.userAgent.indexOf("Android")&&r&&r.items&&0===r.items.length)?f.remove():Pt(i)||!Tt(c,t,f.getLastRng()||c.selection.getRng())?(u||t.preventDefault(),!h.ie||u&&!t.ieFake||xt(i,"text/html")||(f.create(),c.dom.bind(f.getEl(),"paste",function(t){t.stopPropagation()}),c.getDoc().execCommand("Paste",!1,null),i["text/html"]=f.getHtml()),xt(i,"text/html")?(t.preventDefault(),l||(l=x(i["text/html"])),p(i,u,s,l)):y.setEditorTimeout(c,function(){p(i,u,s,l)},0)):f.remove()})},Ct=function(t){return h.ie&&t.inline?v.document.body:t.getBody()},kt=function(e,t,n){var r;Ct(r=e)!==r.getBody()&&e.dom.bind(t,"paste keyup",function(t){Rt(e,n)||e.fire("paste")})},St=function(t){return t.dom.get("mcepastebin")},Ot=function(t,e){return e===t},Rt=function(t,e){var n,r=St(t);return(n=r)&&"mcepastebin"===n.id&&Ot(e,r.innerHTML)},At=function(a){var u=i(null),s="%MCEPASTEBIN%";return{create:function(){return e=u,n=s,o=(t=a).dom,i=t.getBody(),e.set(t.selection.getRng()),r=t.dom.add(Ct(t),"div",{id:"mcepastebin","class":"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n),(h.ie||h.gecko)&&o.setStyle(r,"left","rtl"===o.getStyle(i,"direction",!0)?65535:-65535),o.bind(r,"beforedeactivate focusin focusout",function(t){t.stopPropagation()}),kt(t,r,n),r.focus(),void t.selection.select(r,!0);var t,e,n,r,o,i},remove:function(){return function(t,e){if(St(t)){for(var n=void 0,r=e.get();n=t.dom.get("mcepastebin");)t.dom.remove(n),t.dom.unbind(n);r&&t.selection.setRng(r)}e.set(null)}(a,u)},getEl:function(){return St(a)},getHtml:function(){return function(n){var e,t,r,o,i,a=function(t,e){t.appendChild(e),n.dom.remove(e,!0)};for(t=b.grep(Ct(n).childNodes,function(t){return"mcepastebin"===t.id}),e=t.shift(),b.each(t,function(t){a(e,t)}),r=(o=n.dom.select("div[id=mcepastebin]",e)).length-1;0<=r;r--)i=n.dom.create("div"),e.insertBefore(i,o[r]),a(i,o[r]);return e?e.innerHTML:""}(a)},getLastRng:function(){return u.get()},isDefault:function(){return Rt(a,s)},isDefaultContent:function(t){return Ot(s,t)}}},Et=function(n,t){var e=At(n);return n.on("PreInit",function(){return _t(a=n,e,t),void a.parser.addNodeFilter("img",function(t,e,n){var r,o=function(t){t.attr("data-mce-object")||u===h.transparentSrc||t.remove()};if(!a.settings.paste_data_images&&(r=n).data&&!0===r.data.paste)for(var i=t.length;i--;)(u=t[i].attr("src"))&&(0===u.indexOf("webkit-fake-url")?o(t[i]):a.settings.allow_html_data_urls||0!==u.indexOf("data:")||o(t[i]))});var a,u}),{pasteFormat:t,pasteHtml:function(t,e){return ht(n,t,e)},pasteText:function(t){return yt(n,t)},pasteImageData:function(t,e){return Tt(n,t,e)},getDataTransferItems:bt,hasHtmlOrText:Pt,hasContentType:xt}},Ft=function(){},It=function(t,e,n){if(r=t,!1!==h.iOS||r===undefined||"function"!=typeof r.setData||!0===E.isMsEdge())return!1;try{return t.clearData(),t.setData("text/html",e),t.setData("text/plain",n),t.setData(P(),e),!0}catch(o){return!1}var r},Mt=function(t,e,n,r){It(t.clipboardData,e.html,e.text)?(t.preventDefault(),r()):n(e.html,r)},Bt=function(u){return function(t,e){var n=m(t),r=u.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),o=u.dom.create("div",{contenteditable:"true"},n);u.dom.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(o),u.dom.add(u.getBody(),r);var i=u.selection.getRng();o.focus();var a=u.dom.createRng();a.selectNodeContents(o),u.selection.setRng(a),y.setTimeout(function(){u.selection.setRng(i),r.parentNode.removeChild(r),e()},0)}},Ht=function(t){return{html:t.selection.getContent({contextual:!0}),text:t.selection.getContent({format:"text"})}},jt=function(t){return!t.selection.isCollapsed()||!!(e=t).dom.getParent(e.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",e.getBody());var e},Lt=function(t){var e,n;t.on("cut",(e=t,function(t){jt(e)&&Mt(t,Ht(e),Bt(e),function(){y.setTimeout(function(){e.execCommand("Delete")},0)})})),t.on("copy",(n=t,function(t){jt(n)&&Mt(t,Ht(n),Bt(n),Ft)}))},Nt=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),$t=function(t,e){return Nt.getCaretRangeFromPoint(e.clientX,e.clientY,t.getDoc())},Wt=function(t,e){t.focus(),t.selection.setRng(e)},zt=function(a,u,s){R.shouldBlockDrop(a)&&a.on("dragend dragover draggesture dragdrop drop drag",function(t){t.preventDefault(),t.stopPropagation()}),R.shouldPasteDataImages(a)||a.on("drop",function(t){var e=t.dataTransfer;e&&e.files&&0<e.files.length&&t.preventDefault()}),a.on("drop",function(t){var e,n;if(n=$t(a,t),!t.isDefaultPrevented()&&!s.get()){e=u.getDataTransferItems(t.dataTransfer);var r,o=u.hasContentType(e,P());if((u.hasHtmlOrText(e)&&(!(r=e["text/plain"])||0!==r.indexOf("file://"))||!u.pasteImageData(t,n))&&n&&R.shouldFilterDrop(a)){var i=e["mce-internal"]||e["text/html"]||e["text/plain"];i&&(t.preventDefault(),y.setEditorTimeout(a,function(){a.undoManager.transact(function(){e["mce-internal"]&&a.execCommand("Delete"),Wt(a,n),i=E.trimHtml(i),e["text/html"]?u.pasteHtml(i,o):u.pasteText(i)})}))}}}),a.on("dragstart",function(t){s.set(!0)}),a.on("dragover dragend",function(t){R.shouldPasteDataImages(a)&&!1===s.get()&&(t.preventDefault(),Wt(a,$t(a,t))),"dragend"===t.type&&s.set(!1)})},Ut=function(t){var e=t.plugins.paste,n=R.getPreProcess(t);n&&t.on("PastePreProcess",function(t){n.call(e,e,t)});var r=R.getPostProcess(t);r&&t.on("PastePostProcess",function(t){r.call(e,e,t)})};function Vt(e,n){e.on("PastePreProcess",function(t){t.content=n(e,t.content,t.internal,t.wordContent)})}function qt(t,e){if(!$.isWordContent(e))return e;var n=[];b.each(t.schema.getBlockElements(),function(t,e){n.push(e)});var r=new RegExp("(?:<br> [\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br> [\\s\\r\\n]+|<br>)*","g");return e=E.filter(e,[[r,"$1"]]),e=E.filter(e,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function Kt(t,e,n,r){if(r||n)return e;var l,o=R.getWebkitStyles(t);if(!1===R.shouldRemoveWebKitStyles(t)||"all"===o)return e;if(o&&(l=o.split(/[, ]/)),l){var c=t.dom,f=t.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(t,e,n,r){var o=c.parseStyle(c.decode(n)),i={};if("none"===l)return e+r;for(var a=0;a<l.length;a++){var u=o[l[a]],s=c.getStyle(f,l[a],!0);/color/.test(l[a])&&(u=c.toHex(u),s=c.toHex(s)),s!==u&&(i[l[a]]=u)}return(i=c.serializeStyle(i,"span"))?e+' style="'+i+'"'+r:e+r})}else e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(t,e,n,r){return e+' style="'+n+'"'+r})}function Gt(n,t){n.$("a",t).find("font,u").each(function(t,e){n.dom.remove(e,!0)})}var Xt=function(t){h.webkit&&Vt(t,Kt),h.ie&&(Vt(t,qt),function r(e,n){e.on("PastePostProcess",function(t){n(e,t.node)})}(t,Gt))},Yt=function(n,r){return function(e){e.setActive("text"===r.pasteFormat.get());var t=function(t){return e.setActive(t.state)};return n.on("PastePlainTextToggle",t),function(){return n.off("PastePlainTextToggle",t)}}},Zt=function(t,e){t.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:function(){return t.execCommand("mceTogglePlainTextPaste")},onSetup:Yt(t,e)}),t.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",onAction:function(){return t.execCommand("mceTogglePlainTextPaste")},onSetup:Yt(t,e)})};e.add("paste",function(t){if(!1===a(t)){var e=i(!1),n=i(R.isPasteAsTextEnabled(t)?"text":"html"),r=Et(t,n),o=Xt(t);return Zt(t,r),s(t,r),Ut(t),Lt(t),zt(t,r,e),u(r,o)}}),function ne(){}}(window);
|