mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-04 22:01:05 +01:00
1 line
9.1 KiB
JavaScript
1 line
9.1 KiB
JavaScript
|
!function(){"use strict";var e,t,n,r,o,i,a,u,l,c,s,d,f,m=tinymce.util.Tools.resolve("tinymce.PluginManager"),p=function(e){return function(){return e}},h=function(i){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var a=new Array(arguments.length-1),n=1;n<arguments.length;n++)a[n-1]=arguments[n];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];var o=a.concat(n);return i.apply(null,o)}},y=p(!1),g=p(!0),k=y,v=g,b=function(){return w},w=(r={fold:function(e,t){return e()},is:k,isSome:k,isNone:v,getOr:n=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:n,orThunk:t,map:b,ap:b,each:function(){},bind:b,flatten:b,exists:k,forall:v,filter:b,equals:e=function(e){return e.isNone()},equals_:e,toArray:function(){return[]},toString:p("none()")},Object.freeze&&Object.freeze(r),r),x=function(n){var e=function(){return n},t=function(){return o},r=function(e){return e(n)},o={fold:function(e,t){return t(n)},is:function(e){return n===e},isSome:v,isNone:k,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:t,orThunk:t,map:function(e){return x(e(n))},ap:function(e){return e.fold(b,function(e){return x(e(n))})},each:function(e){e(n)},bind:r,flatten:e,exists:r,forall:r,filter:function(e){return e(n)?o:w},equals:function(e){return e.is(n)},equals_:function(e,t){return e.fold(k,function(e){return t(n,e)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},A={some:x,none:b,from:function(e){return null===e||e===undefined?w:x(e)}},O=(o="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)===o}),S=(i=Array.prototype.indexOf)===undefined?function(e,t){return T(e,t)}:function(e,t){return i.call(e,t)},C=function(e,t){return-1<S(e,t)},P=function(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o,e)}return r},T=function(e,t){for(var n=0,r=e.length;n<r;++n)if(e[n]===t)return n;return-1},_=(Array.prototype.slice,O(Array.from)&&Array.from,tinymce.util.Tools.resolve("tinymce.util.I18n")),F="undefined"!=typeof window?window:Function("return this;")(),M=function(e,t){return function(e,t){for(var n=t!==undefined&&null!==t?t:F,r=0;r<e.length&&n!==undefined&&null!==n;++r)n=n[e[r]];return n}(e.split("."),t)},H=function(e,t){var n=M(e,t);if(n===undefined||null===n)throw e+" not available on this browser";return n},I=function(){return H("URL")},E=function(e){return I().createObjectURL(e)},j=navigator,N=j.userAgent,L=function(e){return"matchMedia"in window&&matchMedia(e).matches};/Android/.test(N),u=(u=!(a=/WebKit/.test(N))&&/MSIE/gi.test(N)&&/Explorer/gi.test(j.appName))&&/MSIE (\w+)\./.exec(N)[1],l=-1!==N.indexOf("Trident/")&&(-1!==N.indexOf("rv:")||-1!==j.appName.indexOf("Netscape"))&&11,c=-1!==N.indexOf("Edge/")&&!u&&!l&&12,u=u||l||c,!a&&!l&&/Gecko/.test(N),s=-1!==N.indexOf("Mac"),d=/(iPad|iPhone)/.test(N),f="FormData"in window&&"FileReader"in window&&"URL"in window&&!!E,L("only screen and (max-device-width: 480px)"),L("only screen and (min-width: 800px)"),N.indexOf("Windows Phone"),c&&(a=!1);var D=s,U=(!d||f||parseInt(N.match(/AppleWebKit\/(\d*)/)[1],10),window.getSelection&&window,u&&!c&&document.documentMode,D?"\u2318":"Ctrl"),B=D?"Ctrl + Alt":"Shift + Alt",R={shortcuts:[{shortcut:U+" + B",action:"Bold"},{shortcut:U+" + I",action:"Italic"},{shortcut:U+" + U",action:"Underline"},{shortcut:U+" + A",action:"Select all"},{shortcut:U+" + Y or "+U+" + Shift + Z",action:"Redo"},{shortcut:U+" + Z",action:"Undo"},{shortcut:B+" + 1",action:"Header 1"},{shortcut:B+" + 2",action:"Header 2"},{shortcut:B+" + 3",action:"Header 3"},{shortcut:B+" + 4",action:"Header 4"},{shortcut:B+" + 5",action:"Header 5"},{shortcut:B+" + 6",action:"Header 6"},{shortcut:B+" + 7",action:"Paragraph"},{
|