agenda-libre-ruby/public/assets/tinymce/plugins/help/plugin-366b05965f3d6cfddaba02c6784e0f377497beda0f28cc8cd840510fd8b657f4.js
2019-05-11 17:19:15 +02:00

11 lines
9.1 KiB
JavaScript

/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.0.5 (2019-05-09)
*/
!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:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"}:{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(){}}();