Y-SLD/assets/playkit/plugins/tinymce/themes/modern/theme.min.js

1 line
13 KiB
JavaScript
Raw Normal View History

2024-03-01 11:23:55 +00:00
!function(){var e={},t=function(t){for(var n=e[t],i=n.deps,o=n.defn,a=i.length,s=new Array(a),l=0;l<a;++l)s[l]=r(i[l]);var c=o.apply(null,s);if(void 0===c)throw"module ["+t+"] returned undefined";n.instance=c},n=function(t,n,r){if("string"!=typeof t)throw"module id must be a string";if(void 0===n)throw"no dependencies for "+t;if(void 0===r)throw"no definition function for "+t;e[t]={deps:n,defn:r,instance:void 0}},r=function(n){var r=e[n];if(void 0===r)throw"module ["+n+"] was undefined";return void 0===r.instance&&t(n),r.instance},i=function(e,t){for(var n=e.length,i=new Array(n),o=0;o<n;++o)i.push(r(e[o]));t.apply(null,t)},o={};o.bolt={module:{api:{define:n,require:i,demand:r}}};var a=n,s=function(e,t){a(e,[],function(){return t})};s("1",tinymce.Env),s("2",tinymce.EditorManager),s("3",tinymce.ThemeManager),s("8",tinymce.util.Tools),s("9",tinymce.ui.Factory),s("a",tinymce.DOM),a("b",["8","9"],function(e,t){var n="undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",r=function(n,r,i){var o,a=[];if(r)return e.each(r.split(/[ ,]/),function(e){var r,s=function(){var t=n.selection;e.settings.stateSelector&&t.selectorChanged(e.settings.stateSelector,function(t){e.active(t)},!0),e.settings.disabledStateSelector&&t.selectorChanged(e.settings.disabledStateSelector,function(t){e.disabled(t)})};"|"==e?o=null:t.has(e)?(e={type:e,size:i},a.push(e),o=null):(o||(o={type:"buttongroup",items:[]},a.push(o)),n.buttons[e]&&(r=e,e=n.buttons[r],"function"==typeof e&&(e=e()),e.type=e.type||"button",e.size=i,e=t.create(e),o.items.push(e),n.initialized?s():n.on("init",s)))}),{type:"toolbar",layout:"flow",items:a}},i=function(t,i){var o=[],a=t.settings,s=function(e){if(e)return o.push(r(t,e,i)),!0};if(e.isArray(a.toolbar)){if(0===a.toolbar.length)return;e.each(a.toolbar,function(e,t){a["toolbar"+(t+1)]=e}),delete a.toolbar}for(var l=1;l<10&&s(a["toolbar"+l]);l++);if(o.length||a.toolbar===!1||s(a.toolbar||n),o.length)return{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:o}};return{createToolbar:r,createToolbars:i}}),a("c",["8"],function(e){var t={file:{title:"File",items:"newdocument"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},insert:{title:"Insert",items:"|"},view:{title:"View",items:"visualaid |"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript | formats | removeformat"},table:{title:"Table"},tools:{title:"Tools"}},n=function(e,t){var n;return"|"==t?{text:"|"}:n=e[t]},r=function(r,i,o){var a,s,l,c,u;if(u=e.makeMap((i.removed_menuitems||"").split(/[ ,]/)),i.menu?(s=i.menu[o],c=!0):s=t[o],s){a={text:s.title},l=[],e.each((s.items||"").split(/[ ,]/),function(e){var t=n(r,e);t&&!u[e]&&l.push(n(r,e))}),c||e.each(r,function(e){e.context==o&&("before"==e.separator&&l.push({text:"|"}),e.prependToContext?l.unshift(e):l.push(e),"after"==e.separator&&l.push({text:"|"}))});for(var d=0;d<l.length;d++)"|"==l[d].text&&(0!==d&&d!=l.length-1||l.splice(d,1));if(a.menu=l,!a.menu.length)return null}return a},i=function(e){var n,i=[],o=e.settings,a=[];if(o.menu)for(n in o.menu)a.push(n);else for(n in t)a.push(n);for(var s="string"==typeof o.menubar?o.menubar.split(/[ ,]/):a,l=0;l<s.length;l++){var c=s[l];c=r(e.menuItems,e.settings,c),c&&i.push(c)}return i};return{createMenuButtons:i}}),s("j",tinymce.util.Delay),s("k",tinymce.geom.Rect),a("d",["a","8","j","b","9","k"],function(e,t,n,r,i,o){var a=function(e){return{left:e.x,top:e.y,width:e.w,height:e.h,right:e.x+e.w,bottom:e.y+e.h}},s=function(e){t.each(e.contextToolbars,function(e){e.panel&&e.panel.hide()})},l=function(e,t){e.moveTo(t.left,t.top)},c=function(e,n,r){n=n?n.substr(0,2):"",t.each({t:"down",b:"up"},function(t,i){e.classes.toggle("arrow-"+t,r(i,n.substr(0,1)))}),t.each({l:"left",r:"right"},function(t,i){e.classes.toggle("arrow-"+t,r(i,n.substr(1,1)))})},u=function(e,t,n,r,i,o){return o=a({x:t,y:n,w:o.w,h:o.h}),e&&(o=e({elementRect:a(r),contentAreaRect:a(i),panelRect:o})),o},d=function(a){var d,f=a.settings,p=function(