tinymce-rails 4.4.3 → 4.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/source/tinymce/tinymce.js +2044 -391
- data/lib/tinymce/rails/version.rb +2 -2
- data/vendor/assets/javascripts/tinymce/jquery.tinymce.js +1 -1
- 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 +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/autosave/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/codesample/plugin.dev.js +141 -0
- data/vendor/assets/javascripts/tinymce/plugins/codesample/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/contextmenu/plugin.js +1 -1
- 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/image/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/imagetools/plugin.js +1 -1
- 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.dev.js +143 -0
- data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/preview/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/save/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/spellchecker/plugin.dev.js +139 -0
- 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.dev.js +143 -0
- data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +2 -2
- data/vendor/assets/javascripts/tinymce/plugins/template/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/textpattern/plugin.js +1 -1
- data/vendor/assets/javascripts/tinymce/plugins/toc/plugin.js +1 -0
- 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/lightgray/AbsoluteLayout.less +17 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Animations.less +10 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Arrows.less +115 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Button.less +175 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/ButtonGroup.less +71 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Checkbox.less +49 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/ColorBox.less +6 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/ColorButton.less +72 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/ColorPicker.less +80 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/ComboBox.less +97 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Container.less +9 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Content.Inline.less +4 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Content.Objects.less +178 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Content.less +27 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/CropRect.less +62 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/FieldSet.less +15 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/FitLayout.less +9 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/FloatPanel.less +69 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/FlowLayout.less +36 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Icons.Ie7.less +136 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Icons.less +182 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Iframe.less +6 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/ImagePanel.less +25 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/InfoBox.less +71 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Label.less +38 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/ListBox.less +26 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Menu.less +34 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/MenuBar.less +32 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/MenuButton.less +34 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/MenuItem.less +176 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Mixins.less +54 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Notification.less +142 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Panel.less +7 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Path.less +45 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Progress.less +34 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Radio.less +1 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Reset.less +32 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/ResizeHandle.less +18 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Scrollable.less +44 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/SelectBox.less +6 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Sidebar.less +49 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Slider.less +33 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Spacer.less +5 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/SplitButton.less +49 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/StackLayout.less +5 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/TabPanel.less +44 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/TextBox.less +41 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Throbber.less +19 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/TinyMCE.less +159 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/ToolTip.less +133 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Variables.less +218 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/Window.less +127 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/content.inline.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/lightgray/content.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/tinymce.svg +2 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.dev.less +48 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.ie7.dev.less +47 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.ie7.less +2777 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.ie7.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.less +2874 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.min.css +1 -1
- data/vendor/assets/javascripts/tinymce/themes/inlite/theme.js +1 -1
- data/vendor/assets/javascripts/tinymce/themes/modern/theme.js +1 -1
- data/vendor/assets/javascripts/tinymce/tinymce.js +14 -14
- metadata +65 -4
- data/vendor/assets/javascripts/tinymce/plugins/media/moxieplayer.swf +0 -0
@@ -1 +1 @@
|
|
1
|
-
!function(a,b){"use strict";function c(a,b){for(var c,d=[],f=0;f<a.length;++f){if(c=g[a[f]]||e(a[f]),!c)throw"module definition dependecy not found: "+a[f];d.push(c)}b.apply(null,d)}function d(a,d,e){if("string"!=typeof a)throw"invalid module definition, module id must be defined and be a string";if(d===b)throw"invalid module definition, dependencies must be specified";if(e===b)throw"invalid module definition, definition function must be specified";c(d,function(){g[a]=e.apply(null,arguments)})}function e(b){for(var c=a,d=b.split(/[.\/]/),e=0;e<d.length;++e){if(!c[d[e]])return;c=c[d[e]]}return c}function f(c){var d,e,f,h,i;for(d=0;d<c.length;d++){e=a,f=c[d],h=f.split(/[.\/]/);for(var j=0;j<h.length-1;++j)e[h[j]]===b&&(e[h[j]]={}),e=e[h[j]];e[h[h.length-1]]=g[f]}if(a.AMDLC_TESTS){i=a.privateModules||{};for(f in g)i[f]=g[f];for(d=0;d<c.length;d++)delete i[c[d]];a.privateModules=i}}var g={};d("tinymce/spellcheckerplugin/DomTextMatcher",[],function(){function a(a){return a&&1==a.nodeType&&"false"===a.contentEditable}return function(b,c){function d(a,b){if(!a[0])throw"findAndReplaceDOMText cannot handle zero-length matches";return{start:a.index,end:a.index+a[0].length,text:a[0],data:b}}function e(b){var c;if(3===b.nodeType)return b.data;if(y[b.nodeName]&&!x[b.nodeName])return"";if(a(b))return"\n";if(c="",(x[b.nodeName]||z[b.nodeName])&&(c+="\n"),b=b.firstChild)do c+=e(b);while(b=b.nextSibling);return c}function f(b,c,d){var e,f,g,h,i,j=[],k=0,l=b,m=0;c=c.slice(0),c.sort(function(a,b){return a.start-b.start}),i=c.shift();a:for(;;){if((x[l.nodeName]||z[l.nodeName]||a(l))&&k++,3===l.nodeType&&(!f&&l.length+k>=i.end?(f=l,h=i.end-k):e&&j.push(l),!e&&l.length+k>i.start&&(e=l,g=i.start-k),k+=l.length),e&&f){if(l=d({startNode:e,startNodeIndex:g,endNode:f,endNodeIndex:h,innerNodes:j,match:i.text,matchIndex:m}),k-=f.length-h,e=null,f=null,j=[],i=c.shift(),m++,!i)break}else if(y[l.nodeName]&&!x[l.nodeName]||!l.firstChild){if(l.nextSibling){l=l.nextSibling;continue}}else if(!a(l)){l=l.firstChild;continue}for(;;){if(l.nextSibling){l=l.nextSibling;break}if(l.parentNode===b)break a;l=l.parentNode}}}function g(a){function b(b,c){var d=A[c];d.stencil||(d.stencil=a(d));var e=d.stencil.cloneNode(!1);return e.setAttribute("data-mce-index",c),b&&e.appendChild(B.doc.createTextNode(b)),e}return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex,i=B.doc;if(f===g){var j=f;e=j.parentNode,a.startNodeIndex>0&&(c=i.createTextNode(j.data.substring(0,a.startNodeIndex)),e.insertBefore(c,j));var k=b(a.match,h);return e.insertBefore(k,j),a.endNodeIndex<j.length&&(d=i.createTextNode(j.data.substring(a.endNodeIndex)),e.insertBefore(d,j)),j.parentNode.removeChild(j),k}c=i.createTextNode(f.data.substring(0,a.startNodeIndex)),d=i.createTextNode(g.data.substring(a.endNodeIndex));for(var l=b(f.data.substring(a.startNodeIndex),h),m=[],n=0,o=a.innerNodes.length;o>n;++n){var p=a.innerNodes[n],q=b(p.data,h);p.parentNode.replaceChild(q,p),m.push(q)}var r=b(g.data.substring(0,a.endNodeIndex),h);return e=f.parentNode,e.insertBefore(c,f),e.insertBefore(l,f),e.removeChild(f),e=g.parentNode,e.insertBefore(r,g),e.insertBefore(d,g),e.removeChild(g),r}}function h(a){var b=a.parentNode;b.insertBefore(a.firstChild,a),a.parentNode.removeChild(a)}function i(a){var c=b.getElementsByTagName("*"),d=[];a="number"==typeof a?""+a:null;for(var e=0;e<c.length;e++){var f=c[e],g=f.getAttribute("data-mce-index");null!==g&&g.length&&(g!==a&&null!==a||d.push(f))}return d}function j(a){for(var b=A.length;b--;)if(A[b]===a)return b;return-1}function k(a){var b=[];return l(function(c,d){a(c,d)&&b.push(c)}),A=b,this}function l(a){for(var b=0,c=A.length;c>b&&a(A[b],b)!==!1;b++);return this}function m(a){return A.length&&f(b,A,g(a)),this}function n(a,b){if(w&&a.global)for(;v=a.exec(w);)A.push(d(v,b));return this}function o(a){var b,c=i(a?j(a):null);for(b=c.length;b--;)h(c[b]);return this}function p(a){return A[a.getAttribute("data-mce-index")]}function q(a){return i(j(a))[0]}function r(a,b,c){return A.push({start:a,end:a+b,text:w.substr(a,b),data:c}),this}function s(a){var b=i(j(a)),d=c.dom.createRng();return d.setStartBefore(b[0]),d.setEndAfter(b[b.length-1]),d}function t(a,b){var d=s(a);return d.deleteContents(),b.length>0&&d.insertNode(c.dom.doc.createTextNode(b)),d}function u(){return A.splice(0,A.length),o(),this}var v,w,x,y,z,A=[],B=c.dom;return x=c.schema.getBlockElements(),y=c.schema.getWhiteSpaceElements(),z=c.schema.getShortEndedElements(),w=e(b),{text:w,matches:A,each:l,filter:k,reset:u,matchFromElement:p,elementFromMatch:q,find:n,add:r,wrap:m,unwrap:o,replace:t,rangeFromMatch:s,indexOf:j}}}),d("tinymce/spellcheckerplugin/Plugin",["tinymce/spellcheckerplugin/DomTextMatcher","tinymce/PluginManager","tinymce/util/Tools","tinymce/ui/Menu","tinymce/dom/DOMUtils","tinymce/util/XHR","tinymce/util/URI","tinymce/util/JSON"],function(a,b,c,d,e,f,g,h){b.add("spellchecker",function(i,j){function k(){return F.textMatcher||(F.textMatcher=new a(i.getBody(),i)),F.textMatcher}function l(a,b){var d=[];return c.each(b,function(a){d.push({selectable:!0,text:a.name,data:a.value})}),d}function m(a){for(var b in a)return!1;return!0}function n(a,b){var f=[],g=B[a];c.each(g,function(a){f.push({text:a,onclick:function(){i.insertContent(i.dom.encode(a)),i.dom.remove(b),s()}})}),f.push({text:"-"}),E&&f.push({text:"Add to Dictionary",onclick:function(){t(a,b)}}),f.push.apply(f,[{text:"Ignore",onclick:function(){u(a,b)}},{text:"Ignore all",onclick:function(){u(a,b,!0)}}]),D=new d({items:f,context:"contextmenu",onautohide:function(a){-1!=a.target.className.indexOf("spellchecker")&&a.preventDefault()},onhide:function(){D.remove(),D=null}}),D.renderTo(document.body);var h=e.DOM.getPos(i.getContentAreaContainer()),j=i.dom.getPos(b[0]),k=i.dom.getRoot();"BODY"==k.nodeName?(j.x-=k.ownerDocument.documentElement.scrollLeft||k.scrollLeft,j.y-=k.ownerDocument.documentElement.scrollTop||k.scrollTop):(j.x-=k.scrollLeft,j.y-=k.scrollTop),h.x+=j.x,h.y+=j.y,D.moveTo(h.x,h.y+b[0].offsetHeight)}function o(){return i.getParam("spellchecker_wordchar_pattern")||new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g")}function p(a,b,d,e){var k={method:a,lang:G.spellchecker_language},l="";k["addToDictionary"==a?"word":"text"]=b,c.each(k,function(a,b){l&&(l+="&"),l+=b+"="+encodeURIComponent(a)}),f.send({url:new g(j).toAbsolute(G.spellchecker_rpc_url),type:"post",content_type:"application/x-www-form-urlencoded",data:l,success:function(a){if(a=h.parse(a))a.error?e(a.error):d(a);else{var b=i.translate("Server response wasn't proper JSON.");e(b)}},error:function(){var a=i.translate("The spelling service was not found: (")+G.spellchecker_rpc_url+i.translate(")");e(a)}})}function q(a,b,c,d){var e=G.spellchecker_callback||p;e.call(F,a,b,c,d)}function r(){function a(a){i.notificationManager.open({text:a,type:"error"}),i.setProgressState(!1),v()}v()||(i.setProgressState(!0),q("spellcheck",k().text,z,a),i.focus())}function s(){i.dom.select("span.mce-spellchecker-word").length||v()}function t(a,b){i.setProgressState(!0),q("addToDictionary",a,function(){i.setProgressState(!1),i.dom.remove(b,!0),s()},function(a){i.notificationManager.open({text:a,type:"error"}),i.setProgressState(!1)})}function u(a,b,d){i.selection.collapse(),d?c.each(i.dom.select("span.mce-spellchecker-word"),function(b){b.getAttribute("data-mce-word")==a&&i.dom.remove(b,!0)}):i.dom.remove(b,!0),s()}function v(){return k().reset(),F.textMatcher=null,C?(C=!1,i.fire("SpellcheckEnd"),!0):void 0}function w(a){var b=a.getAttribute("data-mce-index");return"number"==typeof b?""+b:b}function x(a){var b,d=[];if(b=c.toArray(i.getBody().getElementsByTagName("span")),b.length)for(var e=0;e<b.length;e++){var f=w(b[e]);null!==f&&f.length&&f===a.toString()&&d.push(b[e])}return d}function y(a){var b=G.spellchecker_language;a.control.items().each(function(a){a.active(a.settings.data===b)})}function z(a){var b;if(a.words?(E=!!a.dictionary,b=a.words):b=a,i.setProgressState(!1),m(b)){var c=i.translate("No misspellings found.");return i.notificationManager.open({text:c,type:"info"}),void(C=!1)}B=b,k().find(o()).filter(function(a){return!!b[a.text]}).wrap(function(a){return i.dom.create("span",{"class":"mce-spellchecker-word","data-mce-bogus":1,"data-mce-word":a.text})}),C=!0,i.fire("SpellcheckStart")}var A,B,C,D,E,F=this,G=i.settings;if(/(^|[ ,])tinymcespellchecker([, ]|$)/.test(G.plugins)&&b.get("tinymcespellchecker"))return void("undefined"!=typeof console&&console.log&&console.log("Spell Checker Pro is incompatible with Spell Checker plugin! Remove 'spellchecker' from the 'plugins' option."));var H=G.spellchecker_languages||"English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv";A=l("Language",c.map(H.split(","),function(a){return a=a.split("="),{name:a[0],value:a[1]}})),i.on("click",function(a){var b=a.target;if("mce-spellchecker-word"==b.className){a.preventDefault();var c=x(w(b));if(c.length>0){var d=i.dom.createRng();d.setStartBefore(c[0]),d.setEndAfter(c[c.length-1]),i.selection.setRng(d),n(b.getAttribute("data-mce-word"),c)}}}),i.addMenuItem("spellchecker",{text:"Spellcheck",context:"tools",onclick:r,selectable:!0,onPostRender:function(){var a=this;a.active(C),i.on("SpellcheckStart SpellcheckEnd",function(){a.active(C)})}});var I={tooltip:"Spellcheck",onclick:r,onPostRender:function(){var a=this;i.on("SpellcheckStart SpellcheckEnd",function(){a.active(C)})}};A.length>1&&(I.type="splitbutton",I.menu=A,I.onshow=y,I.onselect=function(a){G.spellchecker_language=a.control.settings.data}),i.addButton("spellchecker",I),i.addCommand("mceSpellCheck",r),i.on("remove",function(){D&&(D.remove(),D=null)}),i.on("change",s),this.getTextMatcher=k,this.getWordCharPattern=o,this.markErrors=z,this.getLanguage=function(){return G.spellchecker_language},G.spellchecker_language=G.spellchecker_language||G.language||"en"})}),f(["tinymce/spellcheckerplugin/DomTextMatcher"])}(this);
|
1
|
+
!function(a,b){"use strict";function c(a,b){for(var c,d=[],f=0;f<a.length;++f){if(c=g[a[f]]||e(a[f]),!c)throw"module definition dependecy not found: "+a[f];d.push(c)}b.apply(null,d)}function d(a,d,e){if("string"!=typeof a)throw"invalid module definition, module id must be defined and be a string";if(d===b)throw"invalid module definition, dependencies must be specified";if(e===b)throw"invalid module definition, definition function must be specified";c(d,function(){g[a]=e.apply(null,arguments)})}function e(b){for(var c=a,d=b.split(/[.\/]/),e=0;e<d.length;++e){if(!c[d[e]])return;c=c[d[e]]}return c}function f(c){var d,e,f,h,i;for(d=0;d<c.length;d++){e=a,f=c[d],h=f.split(/[.\/]/);for(var j=0;j<h.length-1;++j)e[h[j]]===b&&(e[h[j]]={}),e=e[h[j]];e[h[h.length-1]]=g[f]}if(a.AMDLC_TESTS){i=a.privateModules||{};for(f in g)i[f]=g[f];for(d=0;d<c.length;d++)delete i[c[d]];a.privateModules=i}}var g={};d("tinymce/spellcheckerplugin/DomTextMatcher",[],function(){function a(a){return a&&1==a.nodeType&&"false"===a.contentEditable}return function(b,c){function d(a,b){if(!a[0])throw"findAndReplaceDOMText cannot handle zero-length matches";return{start:a.index,end:a.index+a[0].length,text:a[0],data:b}}function e(b){var c;if(3===b.nodeType)return b.data;if(y[b.nodeName]&&!x[b.nodeName])return"";if(a(b))return"\n";if(c="",(x[b.nodeName]||z[b.nodeName])&&(c+="\n"),b=b.firstChild)do c+=e(b);while(b=b.nextSibling);return c}function f(b,c,d){var e,f,g,h,i,j=[],k=0,l=b,m=0;c=c.slice(0),c.sort(function(a,b){return a.start-b.start}),i=c.shift();a:for(;;){if((x[l.nodeName]||z[l.nodeName]||a(l))&&k++,3===l.nodeType&&(!f&&l.length+k>=i.end?(f=l,h=i.end-k):e&&j.push(l),!e&&l.length+k>i.start&&(e=l,g=i.start-k),k+=l.length),e&&f){if(l=d({startNode:e,startNodeIndex:g,endNode:f,endNodeIndex:h,innerNodes:j,match:i.text,matchIndex:m}),k-=f.length-h,e=null,f=null,j=[],i=c.shift(),m++,!i)break}else if(y[l.nodeName]&&!x[l.nodeName]||!l.firstChild){if(l.nextSibling){l=l.nextSibling;continue}}else if(!a(l)){l=l.firstChild;continue}for(;;){if(l.nextSibling){l=l.nextSibling;break}if(l.parentNode===b)break a;l=l.parentNode}}}function g(a){function b(b,c){var d=A[c];d.stencil||(d.stencil=a(d));var e=d.stencil.cloneNode(!1);return e.setAttribute("data-mce-index",c),b&&e.appendChild(B.doc.createTextNode(b)),e}return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex,i=B.doc;if(f===g){var j=f;e=j.parentNode,a.startNodeIndex>0&&(c=i.createTextNode(j.data.substring(0,a.startNodeIndex)),e.insertBefore(c,j));var k=b(a.match,h);return e.insertBefore(k,j),a.endNodeIndex<j.length&&(d=i.createTextNode(j.data.substring(a.endNodeIndex)),e.insertBefore(d,j)),j.parentNode.removeChild(j),k}c=i.createTextNode(f.data.substring(0,a.startNodeIndex)),d=i.createTextNode(g.data.substring(a.endNodeIndex));for(var l=b(f.data.substring(a.startNodeIndex),h),m=[],n=0,o=a.innerNodes.length;n<o;++n){var p=a.innerNodes[n],q=b(p.data,h);p.parentNode.replaceChild(q,p),m.push(q)}var r=b(g.data.substring(0,a.endNodeIndex),h);return e=f.parentNode,e.insertBefore(c,f),e.insertBefore(l,f),e.removeChild(f),e=g.parentNode,e.insertBefore(r,g),e.insertBefore(d,g),e.removeChild(g),r}}function h(a){var b=a.parentNode;b.insertBefore(a.firstChild,a),a.parentNode.removeChild(a)}function i(a){var c=b.getElementsByTagName("*"),d=[];a="number"==typeof a?""+a:null;for(var e=0;e<c.length;e++){var f=c[e],g=f.getAttribute("data-mce-index");null!==g&&g.length&&(g!==a&&null!==a||d.push(f))}return d}function j(a){for(var b=A.length;b--;)if(A[b]===a)return b;return-1}function k(a){var b=[];return l(function(c,d){a(c,d)&&b.push(c)}),A=b,this}function l(a){for(var b=0,c=A.length;b<c&&a(A[b],b)!==!1;b++);return this}function m(a){return A.length&&f(b,A,g(a)),this}function n(a,b){if(w&&a.global)for(;v=a.exec(w);)A.push(d(v,b));return this}function o(a){var b,c=i(a?j(a):null);for(b=c.length;b--;)h(c[b]);return this}function p(a){return A[a.getAttribute("data-mce-index")]}function q(a){return i(j(a))[0]}function r(a,b,c){return A.push({start:a,end:a+b,text:w.substr(a,b),data:c}),this}function s(a){var b=i(j(a)),d=c.dom.createRng();return d.setStartBefore(b[0]),d.setEndAfter(b[b.length-1]),d}function t(a,b){var d=s(a);return d.deleteContents(),b.length>0&&d.insertNode(c.dom.doc.createTextNode(b)),d}function u(){return A.splice(0,A.length),o(),this}var v,w,x,y,z,A=[],B=c.dom;return x=c.schema.getBlockElements(),y=c.schema.getWhiteSpaceElements(),z=c.schema.getShortEndedElements(),w=e(b),{text:w,matches:A,each:l,filter:k,reset:u,matchFromElement:p,elementFromMatch:q,find:n,add:r,wrap:m,unwrap:o,replace:t,rangeFromMatch:s,indexOf:j}}}),d("tinymce/spellcheckerplugin/Plugin",["tinymce/spellcheckerplugin/DomTextMatcher","tinymce/PluginManager","tinymce/util/Tools","tinymce/ui/Menu","tinymce/dom/DOMUtils","tinymce/util/XHR","tinymce/util/URI","tinymce/util/JSON"],function(a,b,c,d,e,f,g,h){b.add("spellchecker",function(i,j){function k(){return F.textMatcher||(F.textMatcher=new a(i.getBody(),i)),F.textMatcher}function l(a,b){var d=[];return c.each(b,function(a){d.push({selectable:!0,text:a.name,data:a.value})}),d}function m(a){for(var b in a)return!1;return!0}function n(a,b){var f=[],g=B[a];c.each(g,function(a){f.push({text:a,onclick:function(){i.insertContent(i.dom.encode(a)),i.dom.remove(b),s()}})}),f.push({text:"-"}),E&&f.push({text:"Add to Dictionary",onclick:function(){t(a,b)}}),f.push.apply(f,[{text:"Ignore",onclick:function(){u(a,b)}},{text:"Ignore all",onclick:function(){u(a,b,!0)}}]),D=new d({items:f,context:"contextmenu",onautohide:function(a){a.target.className.indexOf("spellchecker")!=-1&&a.preventDefault()},onhide:function(){D.remove(),D=null}}),D.renderTo(document.body);var h=e.DOM.getPos(i.getContentAreaContainer()),j=i.dom.getPos(b[0]),k=i.dom.getRoot();"BODY"==k.nodeName?(j.x-=k.ownerDocument.documentElement.scrollLeft||k.scrollLeft,j.y-=k.ownerDocument.documentElement.scrollTop||k.scrollTop):(j.x-=k.scrollLeft,j.y-=k.scrollTop),h.x+=j.x,h.y+=j.y,D.moveTo(h.x,h.y+b[0].offsetHeight)}function o(){return i.getParam("spellchecker_wordchar_pattern")||new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g")}function p(a,b,d,e){var k={method:a,lang:G.spellchecker_language},l="";k["addToDictionary"==a?"word":"text"]=b,c.each(k,function(a,b){l&&(l+="&"),l+=b+"="+encodeURIComponent(a)}),f.send({url:new g(j).toAbsolute(G.spellchecker_rpc_url),type:"post",content_type:"application/x-www-form-urlencoded",data:l,success:function(a){if(a=h.parse(a))a.error?e(a.error):d(a);else{var b=i.translate("Server response wasn't proper JSON.");e(b)}},error:function(){var a=i.translate("The spelling service was not found: (")+G.spellchecker_rpc_url+i.translate(")");e(a)}})}function q(a,b,c,d){var e=G.spellchecker_callback||p;e.call(F,a,b,c,d)}function r(){function a(a){i.notificationManager.open({text:a,type:"error"}),i.setProgressState(!1),v()}v()||(i.setProgressState(!0),q("spellcheck",k().text,z,a),i.focus())}function s(){i.dom.select("span.mce-spellchecker-word").length||v()}function t(a,b){i.setProgressState(!0),q("addToDictionary",a,function(){i.setProgressState(!1),i.dom.remove(b,!0),s()},function(a){i.notificationManager.open({text:a,type:"error"}),i.setProgressState(!1)})}function u(a,b,d){i.selection.collapse(),d?c.each(i.dom.select("span.mce-spellchecker-word"),function(b){b.getAttribute("data-mce-word")==a&&i.dom.remove(b,!0)}):i.dom.remove(b,!0),s()}function v(){if(k().reset(),F.textMatcher=null,C)return C=!1,i.fire("SpellcheckEnd"),!0}function w(a){var b=a.getAttribute("data-mce-index");return"number"==typeof b?""+b:b}function x(a){var b,d=[];if(b=c.toArray(i.getBody().getElementsByTagName("span")),b.length)for(var e=0;e<b.length;e++){var f=w(b[e]);null!==f&&f.length&&f===a.toString()&&d.push(b[e])}return d}function y(a){var b=G.spellchecker_language;a.control.items().each(function(a){a.active(a.settings.data===b)})}function z(a){var b;if(a.words?(E=!!a.dictionary,b=a.words):b=a,i.setProgressState(!1),m(b)){var c=i.translate("No misspellings found.");return i.notificationManager.open({text:c,type:"info"}),void(C=!1)}B=b,k().find(o()).filter(function(a){return!!b[a.text]}).wrap(function(a){return i.dom.create("span",{class:"mce-spellchecker-word","data-mce-bogus":1,"data-mce-word":a.text})}),C=!0,i.fire("SpellcheckStart")}var A,B,C,D,E,F=this,G=i.settings;if(/(^|[ ,])tinymcespellchecker([, ]|$)/.test(G.plugins)&&b.get("tinymcespellchecker"))return void("undefined"!=typeof console&&console.log&&console.log("Spell Checker Pro is incompatible with Spell Checker plugin! Remove 'spellchecker' from the 'plugins' option."));var H=G.spellchecker_languages||"English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv";A=l("Language",c.map(H.split(","),function(a){return a=a.split("="),{name:a[0],value:a[1]}})),i.on("click",function(a){var b=a.target;if("mce-spellchecker-word"==b.className){a.preventDefault();var c=x(w(b));if(c.length>0){var d=i.dom.createRng();d.setStartBefore(c[0]),d.setEndAfter(c[c.length-1]),i.selection.setRng(d),n(b.getAttribute("data-mce-word"),c)}}}),i.addMenuItem("spellchecker",{text:"Spellcheck",context:"tools",onclick:r,selectable:!0,onPostRender:function(){var a=this;a.active(C),i.on("SpellcheckStart SpellcheckEnd",function(){a.active(C)})}});var I={tooltip:"Spellcheck",onclick:r,onPostRender:function(){var a=this;i.on("SpellcheckStart SpellcheckEnd",function(){a.active(C)})}};A.length>1&&(I.type="splitbutton",I.menu=A,I.onshow=y,I.onselect=function(a){G.spellchecker_language=a.control.settings.data}),i.addButton("spellchecker",I),i.addCommand("mceSpellCheck",r),i.on("remove",function(){D&&(D.remove(),D=null)}),i.on("change",s),this.getTextMatcher=k,this.getWordCharPattern=o,this.markErrors=z,this.getLanguage=function(){return G.spellchecker_language},G.spellchecker_language=G.spellchecker_language||G.language||"en"})}),f(["tinymce/spellcheckerplugin/DomTextMatcher"])}(this);
|
@@ -1 +1 @@
|
|
1
|
-
tinymce.PluginManager.add("tabfocus",function(a){function b(a){9!==a.keyCode||a.ctrlKey||a.altKey||a.metaKey||a.preventDefault()}function c(b){function c(c){function f(a){return"BODY"===a.nodeName||"hidden"!=a.type&&"none"!=a.style.display&&"hidden"!=a.style.visibility&&f(a.parentNode)}function i(a){return/INPUT|TEXTAREA|BUTTON/.test(a.tagName)&&tinymce.get(b.id)
|
1
|
+
tinymce.PluginManager.add("tabfocus",function(a){function b(a){9!==a.keyCode||a.ctrlKey||a.altKey||a.metaKey||a.preventDefault()}function c(b){function c(c){function f(a){return"BODY"===a.nodeName||"hidden"!=a.type&&"none"!=a.style.display&&"hidden"!=a.style.visibility&&f(a.parentNode)}function i(a){return/INPUT|TEXTAREA|BUTTON/.test(a.tagName)&&tinymce.get(b.id)&&a.tabIndex!=-1&&f(a)}if(h=d.select(":input:enabled,*[tabindex]:not(iframe)"),e(h,function(b,c){if(b.id==a.id)return g=c,!1}),c>0){for(j=g+1;j<h.length;j++)if(i(h[j]))return h[j]}else for(j=g-1;j>=0;j--)if(i(h[j]))return h[j];return null}var g,h,i,j;if(!(9!==b.keyCode||b.ctrlKey||b.altKey||b.metaKey||b.isDefaultPrevented())&&(i=f(a.getParam("tab_focus",a.getParam("tabfocus_elements",":prev,:next"))),1==i.length&&(i[1]=i[0],i[0]=":prev"),h=b.shiftKey?":prev"==i[0]?c(-1):d.get(i[0]):":next"==i[1]?c(1):d.get(i[1]))){var k=tinymce.get(h.id||h.name);h.id&&k?k.focus():tinymce.util.Delay.setTimeout(function(){tinymce.Env.webkit||window.focus(),h.focus()},10),b.preventDefault()}}var d=tinymce.DOM,e=tinymce.each,f=tinymce.explode;a.on("init",function(){a.inline&&tinymce.DOM.setAttrib(a.getBody(),"tabIndex",null),a.on("keyup",b),tinymce.Env.gecko?a.on("keypress keydown",c):a.on("keydown",c)})});
|
@@ -0,0 +1,143 @@
|
|
1
|
+
/**
|
2
|
+
* Inline development version. Only to be used while developing since it uses document.write to load scripts.
|
3
|
+
*/
|
4
|
+
|
5
|
+
/*jshint smarttabs:true, undef:true, latedef:true, curly:true, bitwise:true, camelcase:true */
|
6
|
+
/*globals $code */
|
7
|
+
|
8
|
+
(function(exports) {
|
9
|
+
"use strict";
|
10
|
+
|
11
|
+
var html = "", baseDir;
|
12
|
+
var modules = {}, exposedModules = [], moduleCount = 0;
|
13
|
+
|
14
|
+
var scripts = document.getElementsByTagName('script');
|
15
|
+
for (var i = 0; i < scripts.length; i++) {
|
16
|
+
var src = scripts[i].src;
|
17
|
+
|
18
|
+
if (src.indexOf('/plugin.dev.js') != -1) {
|
19
|
+
baseDir = src.substring(0, src.lastIndexOf('/'));
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
function require(ids, callback) {
|
24
|
+
var module, defs = [];
|
25
|
+
|
26
|
+
for (var i = 0; i < ids.length; ++i) {
|
27
|
+
module = modules[ids[i]] || resolve(ids[i]);
|
28
|
+
if (!module) {
|
29
|
+
throw 'module definition dependecy not found: ' + ids[i];
|
30
|
+
}
|
31
|
+
|
32
|
+
defs.push(module);
|
33
|
+
}
|
34
|
+
|
35
|
+
callback.apply(null, defs);
|
36
|
+
}
|
37
|
+
|
38
|
+
function resolve(id) {
|
39
|
+
if (exports.privateModules && id in exports.privateModules) {
|
40
|
+
return;
|
41
|
+
}
|
42
|
+
|
43
|
+
var target = exports;
|
44
|
+
var fragments = id.split(/[.\/]/);
|
45
|
+
|
46
|
+
for (var fi = 0; fi < fragments.length; ++fi) {
|
47
|
+
if (!target[fragments[fi]]) {
|
48
|
+
return;
|
49
|
+
}
|
50
|
+
|
51
|
+
target = target[fragments[fi]];
|
52
|
+
}
|
53
|
+
|
54
|
+
return target;
|
55
|
+
}
|
56
|
+
|
57
|
+
function register(id) {
|
58
|
+
var target = exports;
|
59
|
+
var fragments = id.split(/[.\/]/);
|
60
|
+
|
61
|
+
for (var fi = 0; fi < fragments.length - 1; ++fi) {
|
62
|
+
if (target[fragments[fi]] === undefined) {
|
63
|
+
target[fragments[fi]] = {};
|
64
|
+
}
|
65
|
+
|
66
|
+
target = target[fragments[fi]];
|
67
|
+
}
|
68
|
+
|
69
|
+
target[fragments[fragments.length - 1]] = modules[id];
|
70
|
+
}
|
71
|
+
|
72
|
+
function define(id, dependencies, definition) {
|
73
|
+
var privateModules, i;
|
74
|
+
|
75
|
+
if (typeof id !== 'string') {
|
76
|
+
throw 'invalid module definition, module id must be defined and be a string';
|
77
|
+
}
|
78
|
+
|
79
|
+
if (dependencies === undefined) {
|
80
|
+
throw 'invalid module definition, dependencies must be specified';
|
81
|
+
}
|
82
|
+
|
83
|
+
if (definition === undefined) {
|
84
|
+
throw 'invalid module definition, definition function must be specified';
|
85
|
+
}
|
86
|
+
|
87
|
+
require(dependencies, function() {
|
88
|
+
modules[id] = definition.apply(null, arguments);
|
89
|
+
});
|
90
|
+
|
91
|
+
if (--moduleCount === 0) {
|
92
|
+
for (i = 0; i < exposedModules.length; i++) {
|
93
|
+
register(exposedModules[i]);
|
94
|
+
}
|
95
|
+
}
|
96
|
+
|
97
|
+
// Expose private modules for unit tests
|
98
|
+
if (exports.AMDLC_TESTS) {
|
99
|
+
privateModules = exports.privateModules || {};
|
100
|
+
|
101
|
+
for (id in modules) {
|
102
|
+
privateModules[id] = modules[id];
|
103
|
+
}
|
104
|
+
|
105
|
+
for (i = 0; i < exposedModules.length; i++) {
|
106
|
+
delete privateModules[exposedModules[i]];
|
107
|
+
}
|
108
|
+
|
109
|
+
exports.privateModules = privateModules;
|
110
|
+
}
|
111
|
+
|
112
|
+
}
|
113
|
+
|
114
|
+
function expose(ids) {
|
115
|
+
exposedModules = ids;
|
116
|
+
}
|
117
|
+
|
118
|
+
function writeScripts() {
|
119
|
+
document.write(html);
|
120
|
+
}
|
121
|
+
|
122
|
+
function load(path) {
|
123
|
+
html += '<script type="text/javascript" src="' + baseDir + '/' + path + '"></script>\n';
|
124
|
+
moduleCount++;
|
125
|
+
}
|
126
|
+
|
127
|
+
// Expose globally
|
128
|
+
exports.define = define;
|
129
|
+
exports.require = require;
|
130
|
+
|
131
|
+
load('classes/Utils.js');
|
132
|
+
load('classes/SplitCols.js');
|
133
|
+
load('classes/TableGrid.js');
|
134
|
+
load('classes/Quirks.js');
|
135
|
+
load('classes/CellSelection.js');
|
136
|
+
load('classes/Dialogs.js');
|
137
|
+
load('classes/ResizeBars.js');
|
138
|
+
load('classes/Plugin.js');
|
139
|
+
|
140
|
+
writeScripts();
|
141
|
+
})(this);
|
142
|
+
|
143
|
+
// $hash: 2bba25eafbcfe7cf5d371219f4309dbe
|
@@ -1,2 +1,2 @@
|
|
1
|
-
!function(a,b){"use strict";function c(a,b){for(var c,d=[],g=0;g<a.length;++g){if(c=f[a[g]]||e(a[g]),!c)throw"module definition dependecy not found: "+a[g];d.push(c)}b.apply(null,d)}function d(a,d,e){if("string"!=typeof a)throw"invalid module definition, module id must be defined and be a string";if(d===b)throw"invalid module definition, dependencies must be specified";if(e===b)throw"invalid module definition, definition function must be specified";c(d,function(){f[a]=e.apply(null,arguments)})}function e(b){for(var c=a,d=b.split(/[.\/]/),e=0;e<d.length;++e){if(!c[d[e]])return;c=c[d[e]]}return c}var f={};d("tinymce/tableplugin/Utils",["tinymce/Env"],function(a){function b(b){(!a.ie||a.ie>9)&&(b.hasChildNodes()||(b.innerHTML='<br data-mce-bogus="1" />'))}var c=function(a){return function(b,c){b&&(c=parseInt(c,10),1===c||0===c?b.removeAttribute(a,1):b.setAttribute(a,c,1))}},d=function(a){return function(b){return parseInt(b.getAttribute(a)||1,10)}};return{setColSpan:c("colSpan"),setRowSpan:c("rowspan"),getColSpan:d("colSpan"),getRowSpan:d("rowSpan"),setSpanVal:function(a,b,d){c(b)(a,d)},getSpanVal:function(a,b){return d(b)(a)},paddCell:b}}),d("tinymce/tableplugin/SplitCols",["tinymce/util/Tools","tinymce/tableplugin/Utils"],function(a,b){var c=function(a,b,c){return a[c]?a[c][b]:null},d=function(a,b,d){var e=c(a,b,d);return e?e.elm:null},e=function(a,b,e,f){var g,h,i=0,j=d(a,b,e);for(g=e;(f>0?g<a.length:g>=0)&&(h=c(a,b,g),j===h.elm);g+=f)i++;return i},f=function(a,b,c){for(var d,e=a[c],f=b;f<e.length;f++)if(d=e[f],d.real)return d.elm;return null},g=function(a,c){for(var d,f=[],g=a[c],h=0;h<g.length;h++)d=g[h],f.push({elm:d.elm,above:e(a,h,c,-1)-1,below:e(a,h,c,1)-1}),h+=b.getColSpan(d.elm)-1;return f},h=function(a,c){var d=a.elm.ownerDocument,e=d.createElement("td");return b.setColSpan(e,b.getColSpan(a.elm)),b.setRowSpan(e,c),b.paddCell(e),e},i=function(a,b,c,d){var e=f(a,c+1,d);e?e.parentNode.insertBefore(b,e):(e=f(a,0,d),e.parentNode.appendChild(b))},j=function(a,c,d,e){if(0!==c.above){b.setRowSpan(c.elm,c.above);var f=h(c,c.below+1);return i(a,f,d,e),f}return null},k=function(a,c,d,e){if(0!==c.below){b.setRowSpan(c.elm,c.above+1);var f=h(c,c.below);return i(a,f,d,e+1),f}return null},l=function(b,c,e,f){var h=g(b,e),i=d(b,c,e).parentNode,l=[];return a.each(h,function(a,c){var d=f?j(b,a,c,e):k(b,a,c,e);null!==d&&l.push(l)}),{cells:l,row:i}};return{splitAt:l}}),d("tinymce/tableplugin/TableGrid",["tinymce/util/Tools","tinymce/Env","tinymce/tableplugin/Utils","tinymce/tableplugin/SplitCols"],function(a,c,d,e){var f=a.each,g=d.getSpanVal,h=d.setSpanVal;return function(i,j,k){function l(){i.$("td[data-mce-selected],th[data-mce-selected]").removeAttr("data-mce-selected")}function m(a){return a===i.getBody()}function n(b,c){return b?(c=a.map(c.split(","),function(a){return a.toLowerCase()}),a.grep(b.childNodes,function(b){return-1!==a.inArray(c,b.nodeName.toLowerCase())})):[]}function o(){var a=0;X=[],Y=0,f(["thead","tbody","tfoot"],function(b){var c=n(j,b)[0],d=n(c,"tr");f(d,function(c,d){d+=a,f(n(c,"td,th"),function(a,c){var e,f,h,i;if(X[d])for(;X[d][c];)c++;for(h=g(a,"rowspan"),i=g(a,"colspan"),f=d;d+h>f;f++)for(X[f]||(X[f]=[]),e=c;c+i>e;e++)X[f][e]={part:b,real:f==d&&e==c,elm:a,rowspan:h,colspan:i};Y=Math.max(Y,c+1)})}),a+=d.length})}function p(a){return i.fire("newrow",{node:a}),a}function q(a){return i.fire("newcell",{node:a}),a}function r(a,b){return a=a.cloneNode(b),a.removeAttribute("id"),a}function s(a,b){var c;return c=X[b],c?c[a]:void 0}function t(a,b){return a[b]?a[b]:null}function u(a,b){for(var c=[],d=0;d<a.length;d++)c.push(s(b,d));return c}function v(a){return a&&(!!aa.getAttrib(a.elm,"data-mce-selected")||a==k)}function w(){var a=[];return f(j.rows,function(b){f(b.cells,function(c){return aa.getAttrib(c,"data-mce-selected")||k&&c==k.elm?(a.push(b),!1):void 0})}),a}function x(){var a=aa.createRng();m(j)||(a.setStartAfter(j),a.setEndAfter(j),_.setRng(a),aa.remove(j))}function y(b){var e,g={};return i.settings.table_clone_elements!==!1&&(g=a.makeMap((i.settings.table_clone_elements||"strong em b i span font h1 h2 h3 h4 h5 h6 p div").toUpperCase(),/[ ,]/)),a.walk(b,function(a){var d;return 3==a.nodeType?(f(aa.getParents(a.parentNode,null,b).reverse(),function(a){g[a.nodeName]&&(a=r(a,!1),e?d&&d.appendChild(a):e=d=a,d=a)}),d&&(d.innerHTML=c.ie&&c.ie<10?" ":'<br data-mce-bogus="1" />'),!1):void 0},"childNodes"),b=r(b,!1),q(b),h(b,"rowSpan",1),h(b,"colSpan",1),e?b.appendChild(e):d.paddCell(b),b}function z(){var a,b=aa.createRng();return f(aa.select("tr",j),function(a){0===a.cells.length&&aa.remove(a)}),0===aa.select("tr",j).length?(b.setStartBefore(j),b.setEndBefore(j),_.setRng(b),void aa.remove(j)):(f(aa.select("thead,tbody,tfoot",j),function(a){0===a.rows.length&&aa.remove(a)}),o(),void(Z&&(a=X[Math.min(X.length-1,Z.y)],a&&(_.select(a[Math.min(a.length-1,Z.x)].elm,!0),_.collapse(!0)))))}function A(a,b,c,d){var e,f,g,h,i;for(e=X[b][a].elm.parentNode,g=1;c>=g;g++)if(e=aa.getNext(e,"tr")){for(f=a;f>=0;f--)if(i=X[b+g][f].elm,i.parentNode==e){for(h=1;d>=h;h++)aa.insertAfter(y(i),i);break}if(-1==f)for(h=1;d>=h;h++)e.insertBefore(y(e.cells[0]),e.cells[0])}}function B(){f(X,function(a,b){f(a,function(a,c){var d,e,f;if(v(a)&&(a=a.elm,d=g(a,"colspan"),e=g(a,"rowspan"),d>1||e>1)){for(h(a,"rowSpan",1),h(a,"colSpan",1),f=0;d-1>f;f++)aa.insertAfter(y(a),a);A(c,b,e-1,d)}})})}function C(a,b,c){for(var d=[],e=0;e<a.length;e++)(b>e||e>c)&&d.push(a[e]);return d}function D(b){return a.grep(b,function(a){return a.real===!1})}function E(a){for(var b=[],c=0;c<a.length;c++){var d=a[c].elm;b[b.length-1]!==d&&b.push(d)}return b}function F(b,c,e,f,g){for(var h=0,i=e;g>=i;i++){var j=C(t(b,i),c,f),k=D(j);j.length===k.length&&(a.each(E(k),function(a){d.setRowSpan(a,d.getRowSpan(a)-1)}),h++)}return h}function G(b,c,e,f,g){for(var h=0,i=c;f>=i;i++){var j=C(u(b,i),e,g),k=D(j);j.length===k.length&&(a.each(E(k),function(a){d.setColSpan(a,d.getColSpan(a)-1)}),h++)}return h}function H(b,c,d){var e,g,i,j,k,l,m,n,p,q,r,t,u;if(b?(e=R(b),g=e.x,i=e.y,j=g+(c-1),k=i+(d-1)):(Z=$=null,f(X,function(a,b){f(a,function(a,c){v(a)&&(Z||(Z={x:c,y:b}),$={x:c,y:b})})}),Z&&(g=Z.x,i=Z.y,j=$.x,k=$.y)),n=s(g,i),p=s(j,k),n&&p&&n.part==p.part){B(),o(),t=F(X,g,i,j,k),u=G(X,g,i,j,k),n=s(g,i).elm;var w=j-g-u+1,x=k-i-t+1;for(w===Y&&x===X.length&&(w=1,x=1),w===Y&&x>1&&(x=1),h(n,"colSpan",w),h(n,"rowSpan",x),m=i;k>=m;m++)for(l=g;j>=l;l++)X[m]&&X[m][l]&&(b=X[m][l].elm,b!=n&&(q=a.grep(b.childNodes),f(q,function(a){n.appendChild(a)}),q.length&&(q=a.grep(n.childNodes),r=0,f(q,function(a){"BR"==a.nodeName&&r++<q.length-1&&n.removeChild(a)})),aa.remove(b)));z()}}function I(a){var c,d,e,i,j,k,l,m,n,o;if(f(X,function(b,d){return f(b,function(b){return v(b)&&(b=b.elm,j=b.parentNode,k=p(r(j,!1)),c=d,a)?!1:void 0}),a?!c:void 0}),c!==b){for(i=0,o=0;i<X[0].length;i+=o)if(X[c][i]&&(d=X[c][i].elm,o=g(d,"colspan"),d!=e)){if(a){if(c>0&&X[c-1][i]&&(m=X[c-1][i].elm,n=g(m,"rowSpan"),n>1)){h(m,"rowSpan",n+1);continue}}else if(n=g(d,"rowspan"),n>1){h(d,"rowSpan",n+1);continue}l=y(d),h(l,"colSpan",d.colSpan),k.appendChild(l),e=d}k.hasChildNodes()&&(a?j.parentNode.insertBefore(k,j):aa.insertAfter(k,j))}}function J(a){var b,c;f(X,function(c){return f(c,function(c,d){return v(c)&&(b=d,a)?!1:void 0}),a?!b:void 0}),f(X,function(d,e){var f,i,j;d[b]&&(f=d[b].elm,f!=c&&(j=g(f,"colspan"),i=g(f,"rowspan"),1==j?a?(f.parentNode.insertBefore(y(f),f),A(b,e,i-1,j)):(aa.insertAfter(y(f),f),A(b,e,i-1,j)):h(f,"colSpan",f.colSpan+1),c=f))})}function K(b){return a.grep(L(b),v)}function L(a){var b=[];return f(a,function(a){f(a,function(a){b.push(a)})}),b}function M(){var b=[];if(m(j)){if(1==X[0].length)return;if(K(X).length==L(X).length)return}f(X,function(c){f(c,function(c,d){v(c)&&-1===a.inArray(b,d)&&(f(X,function(a){var b,c=a[d].elm;b=g(c,"colSpan"),b>1?h(c,"colSpan",b-1):aa.remove(c)}),b.push(d))})}),z()}function N(){function a(a){var b,c;f(a.cells,function(a){var c=g(a,"rowSpan");c>1&&(h(a,"rowSpan",c-1),b=R(a),A(b.x,b.y,1,1))}),b=R(a.cells[0]),f(X[b.y],function(a){var b;a=a.elm,a!=c&&(b=g(a,"rowSpan"),1>=b?aa.remove(a):h(a,"rowSpan",b-1),c=a)})}var b;b=w(),m(j)&&b.length==j.rows.length||(f(b.reverse(),function(b){a(b)}),z())}function O(){var a=w();if(!m(j)||a.length!=j.rows.length)return aa.remove(a),z(),a}function P(){var a=w();return f(a,function(b,c){a[c]=r(b,!0)}),a}function Q(b,c){var d,g,i;b&&(d=e.splitAt(X,Z.x,Z.y,c),g=d.row,a.each(d.cells,q),i=a.map(b,function(a){return a.cloneNode(!0)}),c||i.reverse(),f(i,function(a){var b,d,e=a.cells.length;for(p(a),b=0;e>b;b++)d=a.cells[b],q(d),h(d,"colSpan",1),h(d,"rowSpan",1);for(b=e;Y>b;b++)a.appendChild(q(y(a.cells[e-1])));for(b=Y;e>b;b++)aa.remove(a.cells[b]);c?g.parentNode.insertBefore(a,g):aa.insertAfter(a,g)}),l())}function R(a){var b;return f(X,function(c,d){return f(c,function(c,e){return c.elm==a?(b={x:e,y:d},!1):void 0}),!b}),b}function S(a){Z=R(a)}function T(){var a,b;return a=b=0,f(X,function(c,d){f(c,function(c,e){var f,g;v(c)&&(c=X[d][e],e>a&&(a=e),d>b&&(b=d),c.real&&(f=c.colspan-1,g=c.rowspan-1,f&&e+f>a&&(a=e+f),g&&d+g>b&&(b=d+g)))})}),{x:a,y:b}}function U(a){var b,c,d,e,f,g,h,i,j,k;if($=R(a),Z&&$){for(b=Math.min(Z.x,$.x),c=Math.min(Z.y,$.y),d=Math.max(Z.x,$.x),e=Math.max(Z.y,$.y),f=d,g=e,k=c;e>=k;k++)for(j=b;d>=j;j++)a=X[k][j],a.real&&(h=a.colspan-1,i=a.rowspan-1,h&&j+h>f&&(f=j+h),i&&k+i>g&&(g=k+i));for(l(),k=c;g>=k;k++)for(j=b;f>=j;j++)X[k][j]&&aa.setAttrib(X[k][j].elm,"data-mce-selected","1")}}function V(a,b){var c,d,e;c=R(a),d=c.y*Y+c.x;do{if(d+=b,e=s(d%Y,Math.floor(d/Y)),!e)break;if(e.elm!=a)return _.select(e.elm,!0),aa.isEmpty(e.elm)&&_.collapse(!0),!0}while(e.elm==a);return!1}function W(b){if(Z){var c=e.splitAt(X,Z.x,Z.y,b);a.each(c.cells,q)}}var X,Y,Z,$,_=i.selection,aa=_.dom;j=j||aa.getParent(_.getStart(!0),"table"),o(),k=k||aa.getParent(_.getStart(!0),"th,td"),k&&(Z=R(k),$=T(),k=s(Z.x,Z.y)),a.extend(this,{deleteTable:x,split:B,merge:H,insertRow:I,insertCol:J,splitCols:W,deleteCols:M,deleteRows:N,cutRows:O,copyRows:P,pasteRows:Q,getPos:R,setStartCell:S,setEndCell:U,moveRelIdx:V,refresh:o})}}),d("tinymce/tableplugin/Quirks",["tinymce/util/VK","tinymce/util/Delay","tinymce/Env","tinymce/util/Tools","tinymce/tableplugin/Utils"],function(a,b,c,d,e){var f=d.each,g=e.getSpanVal;return function(h){function i(){function c(c){function d(a,b){var d=a?"previousSibling":"nextSibling",f=h.dom.getParent(b,"tr"),g=f[d];if(g)return r(h,b,g,a),c.preventDefault(),!0;var i=h.dom.getParent(f,"table"),l=f.parentNode,m=l.nodeName.toLowerCase();if("tbody"===m||m===(a?"tfoot":"thead")){var n=e(a,i,l,"tbody");if(null!==n)return j(a,n,b)}return k(a,f,d,i)}function e(a,b,c,d){var e=h.dom.select(">"+d,b),f=e.indexOf(c);if(a&&0===f||!a&&f===e.length-1)return i(a,b);if(-1===f){var g="thead"===c.tagName.toLowerCase()?0:e.length-1;return e[g]}return e[f+(a?-1:1)]}function i(a,b){var c=a?"thead":"tfoot",d=h.dom.select(">"+c,b);return 0!==d.length?d[0]:null}function j(a,b,d){var e=l(b,a);return e&&r(h,d,e,a),c.preventDefault(),!0}function k(a,b,e,f){var g=f[e];if(g)return m(g),!0;var i=h.dom.getParent(f,"td,th");if(i)return d(a,i,c);var j=l(b,!a);return m(j),c.preventDefault(),!1}function l(a,b){var c=a&&a[b?"lastChild":"firstChild"];return c&&"BR"===c.nodeName?h.dom.getParent(c,"td,th"):c}function m(a){h.selection.setCursorLocation(a,0)}function n(){return u==a.UP||u==a.DOWN}function o(a){var b=a.selection.getNode(),c=a.dom.getParent(b,"tr");return null!==c}function p(a){for(var b=0,c=a;c.previousSibling;)c=c.previousSibling,b+=g(c,"colspan");return b}function q(a,b){var c=0,d=0;return f(a.children,function(a,e){return c+=g(a,"colspan"),d=e,c>b?!1:void 0}),d}function r(a,b,c,d){var e=p(h.dom.getParent(b,"td,th")),f=q(c,e),g=c.childNodes[f],i=l(g,d);m(i||g)}function s(a){var b=h.selection.getNode(),c=h.dom.getParent(b,"td,th"),d=h.dom.getParent(a,"td,th");return c&&c!==d&&t(c,d)}function t(a,b){return h.dom.getParent(a,"TABLE")===h.dom.getParent(b,"TABLE")}var u=c.keyCode;if(n()&&o(h)){var v=h.selection.getNode();b.setEditorTimeout(h,function(){s(v)&&d(!c.shiftKey&&u===a.UP,v,c)},0)}}h.on("KeyDown",function(a){c(a)})}function j(){function a(a,b){var c,d=b.ownerDocument,e=d.createRange();return e.setStartBefore(b),e.setEnd(a.endContainer,a.endOffset),c=d.createElement("body"),c.appendChild(e.cloneContents()),0===c.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length}h.on("KeyDown",function(b){var c,d,e=h.dom;37!=b.keyCode&&38!=b.keyCode||(c=h.selection.getRng(),d=e.getParent(c.startContainer,"table"),d&&h.getBody().firstChild==d&&a(c,d)&&(c=e.createRng(),c.setStartBefore(d),c.setEndBefore(d),h.selection.setRng(c),b.preventDefault()))})}function k(){h.on("KeyDown SetContent VisualAid",function(){var a;for(a=h.getBody().lastChild;a;a=a.previousSibling)if(3==a.nodeType){if(a.nodeValue.length>0)break}else if(1==a.nodeType&&("BR"==a.tagName||!a.getAttribute("data-mce-bogus")))break;a&&"TABLE"==a.nodeName&&(h.settings.forced_root_block?h.dom.add(h.getBody(),h.settings.forced_root_block,h.settings.forced_root_block_attrs,c.ie&&c.ie<10?" ":'<br data-mce-bogus="1" />'):h.dom.add(h.getBody(),"br",{"data-mce-bogus":"1"}))}),h.on("PreProcess",function(a){var b=a.node.lastChild;b&&("BR"==b.nodeName||1==b.childNodes.length&&("BR"==b.firstChild.nodeName||"\xa0"==b.firstChild.nodeValue))&&b.previousSibling&&"TABLE"==b.previousSibling.nodeName&&h.dom.remove(b)})}function l(){function a(a,b,c,d){var e,f,g,h=3,i=a.dom.getParent(b.startContainer,"TABLE");return i&&(e=i.parentNode),f=b.startContainer.nodeType==h&&0===b.startOffset&&0===b.endOffset&&d&&("TR"==c.nodeName||c==e),g=("TD"==c.nodeName||"TH"==c.nodeName)&&!d,f||g}function b(){var b=h.selection.getRng(),c=h.selection.getNode(),d=h.dom.getParent(b.startContainer,"TD,TH");if(a(h,b,c,d)){d||(d=c);for(var e=d.lastChild;e.lastChild;)e=e.lastChild;3==e.nodeType&&(b.setEnd(e,e.data.length),h.selection.setRng(b))}}h.on("KeyDown",function(){b()}),h.on("MouseDown",function(a){2!=a.button&&b()})}function m(){function b(a){h.selection.select(a,!0),h.selection.collapse(!0)}function c(a){h.$(a).empty(),e.paddCell(a)}h.on("keydown",function(e){if((e.keyCode==a.DELETE||e.keyCode==a.BACKSPACE)&&!e.isDefaultPrevented()){var f,g,i,j;if(f=h.dom.getParent(h.selection.getStart(),"table")){if(g=h.dom.select("td,th",f),i=d.grep(g,function(a){return!!h.dom.getAttrib(a,"data-mce-selected")}),0===i.length)return j=h.dom.getParent(h.selection.getStart(),"td,th"),void(h.selection.isCollapsed()&&j&&h.dom.isEmpty(j)&&(e.preventDefault(),c(j),b(j)));e.preventDefault(),h.undoManager.transact(function(){g.length==i.length?h.execCommand("mceTableDelete"):(d.each(i,c),b(i[0]))})}}})}m(),c.webkit&&(i(),l()),c.gecko&&(j(),k()),c.ie>9&&(j(),k())}}),d("tinymce/tableplugin/CellSelection",["tinymce/tableplugin/TableGrid","tinymce/dom/TreeWalker","tinymce/util/Tools"],function(a,b,c){return function(d,e){function f(a){d.getBody().style.webkitUserSelect="",(a||p)&&(d.$("td[data-mce-selected],th[data-mce-selected]").removeAttr("data-mce-selected"),p=!1)}function g(a,b){return a&&b?a===o.getParent(b,"table"):!1}function h(b){var c,f,h=b.target;if(!m&&!n&&h!==l&&(l=h,k&&j)){if(f=o.getParent(h,"td,th"),g(k,f)||(f=o.getParent(k,"td,th")),j===f&&!p)return;if(e(!0),g(k,f)){b.preventDefault(),i||(i=new a(d,k,j),d.getBody().style.webkitUserSelect="none"),i.setEndCell(f),p=!0,c=d.selection.getSel();try{c.removeAllRanges?c.removeAllRanges():c.empty()}catch(q){}}}}var i,j,k,l,m,n,o=d.dom,p=!0,q=function(){j=i=k=l=null,e(!1)};return d.on("SelectionChange",function(a){p&&a.stopImmediatePropagation()},!0),d.on("MouseDown",function(a){2==a.button||m||n||(f(),j=o.getParent(a.target,"td,th"),k=o.getParent(j,"table"))}),d.on("mouseover",h),d.on("remove",function(){o.unbind(d.getDoc(),"mouseover",h),f()}),d.on("MouseUp",function(){function a(a,d){var f=new b(a,a);do{if(3==a.nodeType&&0!==c.trim(a.nodeValue).length)return void(d?e.setStart(a,0):e.setEnd(a,a.nodeValue.length));if("BR"==a.nodeName)return void(d?e.setStartBefore(a):e.setEndBefore(a))}while(a=d?f.next():f.prev())}var e,f,g,h,k,l=d.selection;if(j){if(i&&(d.getBody().style.webkitUserSelect=""),f=o.select("td[data-mce-selected],th[data-mce-selected]"),f.length>0){e=o.createRng(),h=f[0],e.setStartBefore(h),e.setEndAfter(h),a(h,1),g=new b(h,o.getParent(f[0],"table"));do if("TD"==h.nodeName||"TH"==h.nodeName){if(!o.getAttrib(h,"data-mce-selected"))break;k=h}while(h=g.next());a(k),l.setRng(e)}d.nodeChanged(),q()}}),d.on("KeyUp Drop SetContent",function(a){f("setcontent"==a.type),q(),m=!1}),d.on("ObjectResizeStart ObjectResized",function(a){m="objectresized"!=a.type}),d.on("dragstart",function(){n=!0}),d.on("drop dragend",function(){n=!1}),{clear:f}}}),d("tinymce/tableplugin/Dialogs",["tinymce/util/Tools","tinymce/Env"],function(a,b){var c=a.each;return function(d){function e(){var a=d.settings.color_picker_callback;return a?function(){var b=this;a.call(d,function(a){b.value(a).fire("change")},b.value())}:void 0}function f(a){return{title:"Advanced",type:"form",defaults:{onchange:function(){l(a,this.parents().reverse()[0],"style"==this.name())}},items:[{label:"Style",name:"style",type:"textbox"},{type:"form",padding:0,formItemDefaults:{layout:"grid",alignH:["start","right"]},defaults:{size:7},items:[{label:"Border color",type:"colorbox",name:"borderColor",onaction:e()},{label:"Background color",type:"colorbox",name:"backgroundColor",onaction:e()}]}]}}function g(a){return a?a.replace(/px$/,""):""}function h(a){return/^[0-9]+$/.test(a)&&(a+="px"),a}function i(a){c("left center right".split(" "),function(b){d.formatter.remove("align"+b,{},a)})}function j(a){c("top middle bottom".split(" "),function(b){d.formatter.remove("valign"+b,{},a)})}function k(b,c,d){function e(b,d){return d=d||[],a.each(b,function(a){var b={text:a.text||a.title};a.menu?b.menu=e(a.menu):(b.value=a.value,c&&c(b)),d.push(b)}),d}return e(b,d||[])}function l(a,b,c){var d=b.toJSON(),e=a.parseStyle(d.style);c?(b.find("#borderColor").value(e["border-color"]||"")[0].fire("change"),b.find("#backgroundColor").value(e["background-color"]||"")[0].fire("change")):(e["border-color"]=d.borderColor,e["background-color"]=d.backgroundColor),b.find("#style").value(a.serializeStyle(a.parseStyle(a.serializeStyle(e))))}function m(a,b,c){var d=a.parseStyle(a.getAttrib(c,"style"));d["border-color"]&&(b.borderColor=d["border-color"]),d["background-color"]&&(b.backgroundColor=d["background-color"]),b.style=a.serializeStyle(d)}function n(a,b,d){var e=a.parseStyle(a.getAttrib(b,"style"));c(d,function(a){e[a.name]=a.value}),a.setAttrib(b,"style",a.serializeStyle(a.parseStyle(a.serializeStyle(e))))}var o=this;o.tableProps=function(){o.table(!0)},o.table=function(e){function j(){function c(a,b,d){if("TD"===a.tagName||"TH"===a.tagName)v.setStyle(a,b,d);else if(a.children)for(var e=0;e<a.children.length;e++)c(a.children[e],b,d)}var e;l(v,this),w=a.extend(w,this.toJSON()),w["class"]===!1&&delete w["class"],d.undoManager.transact(function(){if(p||(p=d.plugins.table.insertTable(w.cols||1,w.rows||1)),d.dom.setAttribs(p,{style:w.style,"class":w["class"]}),d.settings.table_style_by_css){if(u=[],u.push({name:"border",value:w.border}),u.push({name:"border-spacing",value:h(w.cellspacing)}),n(v,p,u),v.setAttribs(p,{"data-mce-border-color":w.borderColor,"data-mce-cell-padding":w.cellpadding,"data-mce-border":w.border}),p.children)for(var a=0;a<p.children.length;a++)c(p.children[a],"border",w.border),c(p.children[a],"padding",h(w.cellpadding))}else d.dom.setAttribs(p,{border:w.border,cellpadding:w.cellpadding,cellspacing:w.cellspacing});v.getAttrib(p,"width")&&!d.settings.table_style_by_css?v.setAttrib(p,"width",g(w.width)):v.setStyle(p,"width",h(w.width)),v.setStyle(p,"height",h(w.height)),e=v.select("caption",p)[0],e&&!w.caption&&v.remove(e),!e&&w.caption&&(e=v.create("caption"),e.innerHTML=b.ie?"\xa0":'<br data-mce-bogus="1"/>',p.insertBefore(e,p.firstChild)),i(p),w.align&&d.formatter.apply("align"+w.align,{},p),d.focus(),d.addVisual()})}function o(a,b){function c(a,c){for(var d=0;d<c.length;d++){var e=v.getStyle(c[d],b);if("undefined"==typeof a&&(a=e),a!=e)return""}return a}var e,f=d.dom.select("td,th",a);return e=c(e,f)}var p,q,r,s,t,u,v=d.dom,w={};e===!0?(p=v.getParent(d.selection.getStart(),"table"),p&&(w={width:g(v.getStyle(p,"width")||v.getAttrib(p,"width")),height:g(v.getStyle(p,"height")||v.getAttrib(p,"height")),cellspacing:g(v.getStyle(p,"border-spacing")||v.getAttrib(p,"cellspacing")),cellpadding:v.getAttrib(p,"data-mce-cell-padding")||v.getAttrib(p,"cellpadding")||o(p,"padding"),border:v.getAttrib(p,"data-mce-border")||v.getAttrib(p,"border")||o(p,"border"),borderColor:v.getAttrib(p,"data-mce-border-color"),caption:!!v.select("caption",p)[0],"class":v.getAttrib(p,"class")},c("left center right".split(" "),function(a){d.formatter.matchNode(p,"align"+a)&&(w.align=a)}))):(q={label:"Cols",name:"cols"},r={label:"Rows",name:"rows"}),d.settings.table_class_list&&(w["class"]&&(w["class"]=w["class"].replace(/\s*mce\-item\-table\s*/g,"")),s={name:"class",type:"listbox",label:"Class",values:k(d.settings.table_class_list,function(a){a.value&&(a.textStyle=function(){return d.formatter.getCssText({block:"table",classes:[a.value]})})})}),t={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",labelGapCalc:!1,padding:0,layout:"grid",columns:2,defaults:{type:"textbox",maxWidth:50},items:d.settings.table_appearance_options!==!1?[q,r,{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell spacing",name:"cellspacing"},{label:"Cell padding",name:"cellpadding"},{label:"Border",name:"border"},{label:"Caption",name:"caption",type:"checkbox"}]:[q,r,{label:"Width",name:"width"},{label:"Height",name:"height"}]},{label:"Alignment",name:"align",type:"listbox",text:"None",values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},s]},d.settings.table_advtab!==!1?(m(v,w,p),d.windowManager.open({title:"Table properties",data:w,bodyType:"tabpanel",body:[{title:"General",type:"form",items:t},f(v)],onsubmit:j})):d.windowManager.open({title:"Table properties",data:w,body:t,onsubmit:j})},o.merge=function(a,b){d.windowManager.open({title:"Merge cells",body:[{label:"Cols",name:"cols",type:"textbox",value:"1",size:10},{label:"Rows",name:"rows",type:"textbox",value:"1",size:10}],onsubmit:function(){var c=this.toJSON();d.undoManager.transact(function(){a.merge(b,c.cols,c.rows)})}})},o.cell=function(){function b(){l(p,this),n=a.extend(n,this.toJSON()),d.undoManager.transact(function(){c(q,function(a){d.dom.setAttribs(a,{scope:n.scope,style:n.style,"class":n["class"]}),d.dom.setStyles(a,{width:h(n.width),height:h(n.height)}),n.type&&a.nodeName.toLowerCase()!=n.type&&(a=p.rename(a,n.type)),i(a),n.align&&d.formatter.apply("align"+n.align,{},a),j(a),n.valign&&d.formatter.apply("valign"+n.valign,{},a)}),d.focus()})}var e,n,o,p=d.dom,q=[];if(q=d.dom.select("td[data-mce-selected],th[data-mce-selected]"),e=d.dom.getParent(d.selection.getStart(),"td,th"),!q.length&&e&&q.push(e),e=e||q[0]){n={width:g(p.getStyle(e,"width")||p.getAttrib(e,"width")),height:g(p.getStyle(e,"height")||p.getAttrib(e,"height")),scope:p.getAttrib(e,"scope"),"class":p.getAttrib(e,"class")},n.type=e.nodeName.toLowerCase(),c("left center right".split(" "),function(a){d.formatter.matchNode(e,"align"+a)&&(n.align=a)}),c("top middle bottom".split(" "),function(a){d.formatter.matchNode(e,"valign"+a)&&(n.valign=a)}),d.settings.table_cell_class_list&&(o={name:"class",type:"listbox",label:"Class",values:k(d.settings.table_cell_class_list,function(a){a.value&&(a.textStyle=function(){return d.formatter.getCssText({block:"td",classes:[a.value]})})})});var r={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",layout:"grid",columns:2,labelGapCalc:!1,padding:0,defaults:{type:"textbox",maxWidth:50},items:[{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell type",name:"type",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{label:"Scope",name:"scope",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{label:"H Align",name:"align",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"V Align",name:"valign",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}]}]},o]};d.settings.table_cell_advtab!==!1?(m(p,n,e),d.windowManager.open({title:"Cell properties",bodyType:"tabpanel",data:n,body:[{title:"General",type:"form",items:r},f(p)],onsubmit:b})):d.windowManager.open({title:"Cell properties",data:n,body:r,onsubmit:b})}},o.row=function(){function b(){var b,e,f;l(r,this),p=a.extend(p,this.toJSON()),d.undoManager.transact(function(){var a=p.type;c(s,function(c){d.dom.setAttribs(c,{scope:p.scope,style:p.style,"class":p["class"]}),d.dom.setStyles(c,{height:h(p.height)}),a!=c.parentNode.nodeName.toLowerCase()&&(b=r.getParent(c,"table"),e=c.parentNode,f=r.select(a,b)[0],f||(f=r.create(a),b.firstChild?b.insertBefore(f,b.firstChild):b.appendChild(f)),f.appendChild(c),e.hasChildNodes()||r.remove(e)),i(c),p.align&&d.formatter.apply("align"+p.align,{},c)}),d.focus()})}var e,j,n,o,p,q,r=d.dom,s=[];e=d.dom.getParent(d.selection.getStart(),"table"),j=d.dom.getParent(d.selection.getStart(),"td,th"),c(e.rows,function(a){c(a.cells,function(b){return r.getAttrib(b,"data-mce-selected")||b==j?(s.push(a),!1):void 0})}),n=s[0],n&&(p={height:g(r.getStyle(n,"height")||r.getAttrib(n,"height")),scope:r.getAttrib(n,"scope"),"class":r.getAttrib(n,"class")},p.type=n.parentNode.nodeName.toLowerCase(),c("left center right".split(" "),function(a){d.formatter.matchNode(n,"align"+a)&&(p.align=a)}),d.settings.table_row_class_list&&(o={name:"class",type:"listbox",label:"Class",values:k(d.settings.table_row_class_list,function(a){a.value&&(a.textStyle=function(){return d.formatter.getCssText({block:"tr",classes:[a.value]})})})}),q={type:"form",columns:2,padding:0,defaults:{type:"textbox"},items:[{type:"listbox",name:"type",label:"Row type",text:"None",maxWidth:null,values:[{text:"Header",value:"thead"},{text:"Body",value:"tbody"},{text:"Footer",value:"tfoot"}]},{type:"listbox",name:"align",label:"Alignment",text:"None",maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height"},o]},d.settings.table_row_advtab!==!1?(m(r,p,n),d.windowManager.open({title:"Row properties",data:p,bodyType:"tabpanel",body:[{title:"General",type:"form",items:q},f(r)],onsubmit:b})):d.windowManager.open({title:"Row properties",data:p,body:q,onsubmit:b}))}}}),d("tinymce/tableplugin/ResizeBars",["tinymce/util/Tools","tinymce/util/VK"],function(a,c){var d;return function(e){function f(a,b){return{index:a,y:e.dom.getPos(b).y}}function g(a,b){return{index:a,y:e.dom.getPos(b).y+b.offsetHeight}}function h(a,b){return{index:a,x:e.dom.getPos(b).x}}function i(a,b){return{index:a,x:e.dom.getPos(b).x+b.offsetWidth}}function j(){var a=e.getBody().dir;return"rtl"===a}function k(){return e.inline}function l(){return k?e.getBody().ownerDocument.body:e.getBody()}function m(a,b){return j()?i(a,b):h(a,b)}function n(a,b){return j()?h(a,b):i(a,b)}function o(a,b){return p(a,"width")/p(b,"width")*100}function p(a,b){var c=e.dom.getStyle(a,b,!0),d=parseInt(c,10);return d}function q(a){var b=p(a,"width"),c=p(a.parentElement,"width");return b/c*100}function r(a,b){var c=p(a,"width");return b/c*100}function s(a,b){var c=p(a.parentElement,"width");return b/c*100}function t(a,b,c){for(var d=[],e=1;e<c.length;e++){var f=c[e].element;d.push(a(e-1,f))}var g=c[c.length-1];return d.push(b(c.length-1,g.element)),d}function u(){var b=e.dom.select("."+ma,l());a.each(b,function(a){e.dom.remove(a)})}function v(a){u(),F(a)}function w(a,b,c,d,e,f,g,h){var i={"data-mce-bogus":"all","class":ma+" "+a,unselectable:"on","data-mce-resize":!1,style:"cursor: "+b+"; margin: 0; padding: 0; position: absolute; left: "+c+"px; top: "+d+"px; height: "+e+"px; width: "+f+"px; "};return i[g]=h,i}function x(b,c,d){a.each(b,function(a){var b=d.x,f=a.y-va/2,g=va,h=c;e.dom.add(l(),"div",w(na,oa,b,f,g,h,pa,a.index))})}function y(b,c,d){a.each(b,function(a){var b=a.x-va/2,f=d.y,g=c,h=va;e.dom.add(l(),"div",w(ra,sa,b,f,g,h,ta,a.index))})}function z(b){return a.map(b.rows,function(b){var c=a.map(b.cells,function(a){var b=a.hasAttribute("rowspan")?parseInt(a.getAttribute("rowspan"),10):1,c=a.hasAttribute("colspan")?parseInt(a.getAttribute("colspan"),10):1;return{element:a,rowspan:b,colspan:c}});return{element:b,cells:c}})}function A(c){function d(a,b){return a+","+b}function e(a,b){return h[d(a,b)]}function f(){var b=[];return a.each(i,function(a){b=b.concat(a.cells)}),b}function g(){return i}var h={},i=[],j=0,k=0;return a.each(c,function(c,e){var f=[];a.each(c.cells,function(a){for(var c=0;h[d(e,c)]!==b;)c++;for(var g={element:a.element,colspan:a.colspan,rowspan:a.rowspan,rowIndex:e,colIndex:c},i=0;i<a.colspan;i++)for(var l=0;l<a.rowspan;l++){var m=e+l,n=c+i;h[d(m,n)]=g,j=Math.max(j,m+1),k=Math.max(k,n+1)}f.push(g)}),i.push({element:c.element,cells:f})}),{grid:{maxRows:j,maxCols:k},getAt:e,getAllCells:f,getAllRows:g}}function B(a,b){for(var c=[],d=a;b>d;d++)c.push(d);return c}function C(a,b,c){for(var d,e=a(),f=0;f<e.length;f++)b(e[f])&&(d=e[f]);return d?d:c()}function D(b){var c=B(0,b.grid.maxCols),d=B(0,b.grid.maxRows);return a.map(c,function(a){function c(){for(var c=[],e=0;e<d.length;e++){var f=b.getAt(e,a);f&&f.colIndex===a&&c.push(f)}return c}function e(a){return 1===a.colspan}function f(){for(var c,e=0;e<d.length;e++)if(c=b.getAt(e,a))return c;return null}return C(c,e,f)})}function E(b){var c=B(0,b.grid.maxCols),d=B(0,b.grid.maxRows);return a.map(d,function(a){function d(){for(var d=[],e=0;e<c.length;e++){var f=b.getAt(a,e);f&&f.rowIndex===a&&d.push(f)}return d}function e(a){return 1===a.rowspan}function f(){return b.getAt(a,0)}return C(d,e,f)})}function F(a){var b=z(a),c=A(b),d=E(c),h=D(c),i=e.dom.getPos(a),j=d.length>0?t(f,g,d):[],k=h.length>0?t(m,n,h):[];x(j,a.offsetWidth,i),y(k,a.offsetHeight,i)}function G(a,b,c,d){if(0>b||b>=a.length-1)return"";var e=a[b];if(e)e={value:e,delta:0};else for(var f=a.slice(0,b).reverse(),g=0;g<f.length;g++)f[g]&&(e={value:f[g],delta:g+1});var h=a[b+1];if(h)h={value:h,delta:1};else for(var i=a.slice(b+1),j=0;j<i.length;j++)i[j]&&(h={value:i[j],delta:j+1});var k=h.delta-e.delta,l=Math.abs(h.value-e.value)/k;return c?l/p(d,"width")*100:l}function H(a,b){var c=e.dom.getStyle(a,b);return c||(c=e.dom.getAttrib(a,b)),c||(c=e.dom.getStyle(a,b,!0)),c}function I(a,b,c){var d=H(a,"width"),e=parseInt(d,10),f=b?o(a,c):p(a,"width");return(b&&!R(d)||!b&&!S(d))&&(e=0),!isNaN(e)&&e>0?e:f}function J(b,c,d){for(var e=D(b),f=a.map(e,function(a){return m(a.colIndex,a.element).x}),g=[],h=0;h<e.length;h++){var i=e[h].element.hasAttribute("colspan")?parseInt(e[h].element.getAttribute("colspan"),10):1,j=i>1?G(f,h):I(e[h].element,c,d);j=j?j:wa,g.push(j)}return g}function K(a){var b=H(a,"height"),c=parseInt(b,10);return R(b)&&(c=0),!isNaN(c)&&c>0?c:p(a,"height")}function L(b){for(var c=E(b),d=a.map(c,function(a){return f(a.rowIndex,a.element).y}),e=[],g=0;g<c.length;g++){var h=c[g].element.hasAttribute("rowspan")?parseInt(c[g].element.getAttribute("rowspan"),10):1,i=h>1?G(d,g):K(c[g].element);i=i?i:xa,e.push(i)}return e}function M(b,c,d,e,f){function g(b){return a.map(b,function(){return 0})}function h(){var a;if(f)a=[100-l[0]];else{var b=Math.max(e,l[0]+d);a=[b-l[0]]}return a}function i(a,b){var c,f=g(l.slice(0,a)),h=g(l.slice(b+1));if(d>=0){var i=Math.max(e,l[b]-d);
|
2
|
-
c=f.concat([d,i-l[b]]).concat(h)}else{var j=Math.max(e,l[a]+d),k=l[a]-j;c=f.concat([j-l[a],k]).concat(h)}return c}function j(a,b){var c,f=g(l.slice(0,b));if(d>=0)c=f.concat([d]);else{var h=Math.max(e,l[b]+d);c=f.concat([h-l[b]])}return c}var k,l=b.slice(0);return k=0===b.length?[]:1===b.length?h():0===c?i(0,1):c>0&&c<b.length-1?i(c,c+1):c===b.length-1?j(c-1,c):[]}function N(a,b,c){for(var d=0,e=a;b>e;e++)d+=c[e];return d}function O(b,c){var d=b.getAllCells();return a.map(d,function(a){var b=N(a.colIndex,a.colIndex+a.colspan,c);return{element:a.element,width:b,colspan:a.colspan}})}function P(b,c){var d=b.getAllCells();return a.map(d,function(a){var b=N(a.rowIndex,a.rowIndex+a.rowspan,c);return{element:a.element,height:b,rowspan:a.rowspan}})}function Q(b,c){var d=b.getAllRows();return a.map(d,function(a,b){return{element:a.element,height:c[b]}})}function R(a){return za.test(a)}function S(a){return Aa.test(a)}function T(b,c,d){function f(b,c){a.each(b,function(a){e.dom.setStyle(a.element,"width",a.width+c),e.dom.setAttrib(a.element,"width",null)})}function g(){return d<k.grid.maxCols-1?q(b):q(b)+s(b,c)}function h(){return d<k.grid.maxCols-1?p(b,"width"):p(b,"width")+c}function i(a,c,f){d!=k.grid.maxCols-1&&f||(e.dom.setStyle(b,"width",a+c),e.dom.setAttrib(b,"width",null))}for(var j=z(b),k=A(j),l=R(b.width)||R(b.style.width),m=J(k,l,b),n=l?r(b,c):c,o=M(m,d,n,wa,l,b),t=[],u=0;u<o.length;u++)t.push(o[u]+m[u]);var v=O(k,t),w=l?"%":"px",x=l?g():h();e.undoManager.transact(function(){f(v,w),i(x,w,l)})}function U(b,c,d){for(var f=z(b),g=A(f),h=L(g),i=[],j=0,k=0;k<h.length;k++)i.push(k===d?c+h[k]:h[k]),j+=j[k];var l=P(g,i),m=Q(g,i);e.undoManager.transact(function(){a.each(m,function(a){e.dom.setStyle(a.element,"height",a.height+"px"),e.dom.setAttrib(a.element,"height",null)}),a.each(l,function(a){e.dom.setStyle(a.element,"height",a.height+"px"),e.dom.setAttrib(a.element,"height",null)}),e.dom.setStyle(b,"height",j+"px"),e.dom.setAttrib(b,"height",null)})}function V(){ga=setTimeout(function(){Z()},200)}function W(){clearTimeout(ga)}function X(){var a=document.createElement("div");return a.setAttribute("style","margin: 0; padding: 0; position: fixed; left: 0px; top: 0px; height: 100%; width: 100%;"),a.setAttribute("data-mce-bogus","all"),a}function Y(a,b){e.dom.bind(a,"mouseup",function(){Z()}),e.dom.bind(a,"mousemove",function(a){W(),ha&&b(a)}),e.dom.bind(a,"mouseout",function(){V()})}function Z(){if(e.dom.remove(ia),ha){e.dom.removeClass(ja,ya),ha=!1;var a,b;if(_(ja)){var c=parseInt(e.dom.getAttrib(ja,ua),10),f=e.dom.getPos(ja).x;a=parseInt(e.dom.getAttrib(ja,ta),10),b=j()?c-f:f-c,T(d,b,a)}else if(aa(ja)){var g=parseInt(e.dom.getAttrib(ja,qa),10),h=e.dom.getPos(ja).y;a=parseInt(e.dom.getAttrib(ja,pa),10),b=h-g,U(d,b,a)}v(d),e.nodeChanged()}}function $(a,b){ia=ia?ia:X(),ha=!0,e.dom.addClass(a,ya),ja=a,Y(ia,b),e.dom.add(l(),ia)}function _(a){return e.dom.hasClass(a,ra)}function aa(a){return e.dom.hasClass(a,na)}function ba(a){ka=ka!==b?ka:a.clientX;var c=a.clientX-ka;ka=a.clientX;var d=e.dom.getPos(ja).x;e.dom.setStyle(ja,"left",d+c+"px")}function ca(a){la=la!==b?la:a.clientY;var c=a.clientY-la;la=a.clientY;var d=e.dom.getPos(ja).y;e.dom.setStyle(ja,"top",d+c+"px")}function da(a){ka=b,$(a,ba)}function ea(a){la=b,$(a,ca)}function fa(a){var b=a.target,c=e.getBody();if(e.$.contains(c,d)||d===c)if(_(b)){a.preventDefault();var f=e.dom.getPos(b).x;e.dom.setAttrib(b,ua,f),da(b)}else if(aa(b)){a.preventDefault();var g=e.dom.getPos(b).y;e.dom.setAttrib(b,qa,g),ea(b)}else u()}var ga,ha,ia,ja,ka,la,ma="mce-resize-bar",na="mce-resize-bar-row",oa="row-resize",pa="data-row",qa="data-initial-top",ra="mce-resize-bar-col",sa="col-resize",ta="data-col",ua="data-initial-left",va=4,wa=10,xa=10,ya="mce-resize-bar-dragging",za=new RegExp(/(\d+(\.\d+)?%)/),Aa=new RegExp(/px|em/);return e.on("init",function(){e.dom.bind(l(),"mousedown",fa)}),e.on("ObjectResized",function(b){var c=b.target;if("TABLE"===c.nodeName){var d=[];a.each(c.rows,function(b){a.each(b.cells,function(a){var b=e.dom.getStyle(a,"width",!0);d.push({cell:a,width:b})})}),a.each(d,function(a){e.dom.setStyle(a.cell,"width",a.width),e.dom.setAttrib(a.cell,"width",null)})}}),e.on("mouseover",function(a){if(!ha){var b=e.dom.getParent(a.target,"table");("TABLE"===a.target.nodeName||b)&&(d=b,v(b))}}),e.on("keydown",function(a){switch(a.keyCode){case c.LEFT:case c.RIGHT:case c.UP:case c.DOWN:u()}}),e.on("remove",function(){u(),e.dom.unbind(l(),"mousedown",fa)}),{adjustWidth:T,adjustHeight:U,clearBars:u,drawBars:F,determineDeltas:M,getTableGrid:A,getTableDetails:z,getWidths:J,getPixelHeights:L,isPercentageBasedSize:R,isPixelBasedSize:S,recalculateWidths:O,recalculateCellHeights:P,recalculateRowHeights:Q}}}),d("tinymce/tableplugin/Plugin",["tinymce/tableplugin/TableGrid","tinymce/tableplugin/Quirks","tinymce/tableplugin/CellSelection","tinymce/tableplugin/Dialogs","tinymce/tableplugin/ResizeBars","tinymce/util/Tools","tinymce/dom/TreeWalker","tinymce/Env","tinymce/PluginManager"],function(a,b,c,d,e,f,g,h,i){function j(f){function g(a){return function(){f.execCommand(a)}}function i(a,b){var c,d,e,g;for(e='<table id="__mce"><tbody>',c=0;b>c;c++){for(e+="<tr>",d=0;a>d;d++)e+="<td>"+(h.ie&&h.ie<10?" ":"<br>")+"</td>";e+="</tr>"}return e+="</tbody></table>",f.undoManager.transact(function(){f.insertContent(e),g=f.dom.get("__mce"),f.dom.setAttrib(g,"id",null),f.$("tr",g).each(function(a,b){f.fire("newrow",{node:b}),f.$("th,td",b).each(function(a,b){f.fire("newcell",{node:b})})}),f.dom.setAttribs(g,f.settings.table_default_attributes||{}),f.dom.setStyles(g,f.settings.table_default_styles||{})}),g}function j(a,b,c){function d(){var d,e,g,h={},i=0;e=f.dom.select("td[data-mce-selected],th[data-mce-selected]"),d=e[0],d||(d=f.selection.getStart()),c&&e.length>0?(k(e,function(a){return h[a.parentNode.parentNode.nodeName]=1}),k(h,function(a){i+=a}),g=1!==i):g=!f.dom.getParent(d,b),a.disabled(g),f.selection.selectorChanged(b,function(b){a.disabled(!b)})}f.initialized?d():f.on("init",d)}function l(){j(this,"table")}function m(){j(this,"td,th")}function n(){j(this,"td,th",!0)}function o(){var a="";a='<table role="grid" class="mce-grid mce-grid-border" aria-readonly="true">';for(var b=0;10>b;b++){a+="<tr>";for(var c=0;10>c;c++)a+='<td role="gridcell" tabindex="-1"><a id="mcegrid'+(10*b+c)+'" href="#" data-mce-x="'+c+'" data-mce-y="'+b+'"></a></td>';a+="</tr>"}return a+="</table>",a+='<div class="mce-text-center" role="presentation">1 x 1</div>'}function p(a,b,c){var d,e,g,h,i,j=c.getEl().getElementsByTagName("table")[0],k=c.isRtl()||"tl-tr"==c.parent().rel;for(j.nextSibling.innerHTML=a+1+" x "+(b+1),k&&(a=9-a),e=0;10>e;e++)for(d=0;10>d;d++)h=j.rows[e].childNodes[d].firstChild,i=(k?d>=a:a>=d)&&b>=e,f.dom.toggleClass(h,"mce-active",i),i&&(g=h);return g.parentNode}function q(){f.addButton("tableprops",{title:"Table properties",onclick:y.tableProps,icon:"table"}),f.addButton("tabledelete",{title:"Delete table",onclick:g("mceTableDelete")}),f.addButton("tablecellprops",{title:"Cell properties",onclick:g("mceTableCellProps")}),f.addButton("tablemergecells",{title:"Merge cells",onclick:g("mceTableMergeCells")}),f.addButton("tablesplitcells",{title:"Split cell",onclick:g("mceTableSplitCells")}),f.addButton("tableinsertrowbefore",{title:"Insert row before",onclick:g("mceTableInsertRowBefore")}),f.addButton("tableinsertrowafter",{title:"Insert row after",onclick:g("mceTableInsertRowAfter")}),f.addButton("tabledeleterow",{title:"Delete row",onclick:g("mceTableDeleteRow")}),f.addButton("tablerowprops",{title:"Row properties",onclick:g("mceTableRowProps")}),f.addButton("tablecutrow",{title:"Cut row",onclick:g("mceTableCutRow")}),f.addButton("tablecopyrow",{title:"Copy row",onclick:g("mceTableCopyRow")}),f.addButton("tablepasterowbefore",{title:"Paste row before",onclick:g("mceTablePasteRowBefore")}),f.addButton("tablepasterowafter",{title:"Paste row after",onclick:g("mceTablePasteRowAfter")}),f.addButton("tableinsertcolbefore",{title:"Insert column before",onclick:g("mceTableInsertColBefore")}),f.addButton("tableinsertcolafter",{title:"Insert column after",onclick:g("mceTableInsertColAfter")}),f.addButton("tabledeletecol",{title:"Delete column",onclick:g("mceTableDeleteCol")})}function r(a){var b=f.dom.is(a,"table")&&f.getBody().contains(a);return b}function s(){var a=f.settings.table_toolbar;""!==a&&a!==!1&&(a||(a="tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol"),f.addContextToolbar(r,a))}function t(){return v}function u(a){v=a}var v,w,x=this,y=new d(f);!f.settings.object_resizing||f.settings.table_resize_bars===!1||f.settings.object_resizing!==!0&&"table"!==f.settings.object_resizing||(w=e(f)),f.settings.table_grid===!1?f.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",onclick:y.table}):f.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(a){a.aria&&(this.parent().hideAll(),a.stopImmediatePropagation(),y.table())},onshow:function(){p(0,0,this.menu.items()[0])},onhide:function(){var a=this.menu.items()[0].getEl().getElementsByTagName("a");f.dom.removeClass(a,"mce-active"),f.dom.addClass(a[0],"mce-active")},menu:[{type:"container",html:o(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(a){var b,c,d=a.target;"A"==d.tagName.toUpperCase()&&(b=parseInt(d.getAttribute("data-mce-x"),10),c=parseInt(d.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"==this.parent().rel)&&(b=9-b),b===this.lastX&&c===this.lastY||(p(b,c,a.control),this.lastX=b,this.lastY=c))},onclick:function(a){var b=this;"A"==a.target.tagName.toUpperCase()&&(a.preventDefault(),a.stopPropagation(),b.parent().cancel(),f.undoManager.transact(function(){i(b.lastX+1,b.lastY+1)}),f.addVisual())}}]}),f.addMenuItem("tableprops",{text:"Table properties",context:"table",onPostRender:l,onclick:y.tableProps}),f.addMenuItem("deletetable",{text:"Delete table",context:"table",onPostRender:l,cmd:"mceTableDelete"}),f.addMenuItem("cell",{separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:g("mceTableCellProps"),onPostRender:m},{text:"Merge cells",onclick:g("mceTableMergeCells"),onPostRender:n},{text:"Split cell",onclick:g("mceTableSplitCells"),onPostRender:m}]}),f.addMenuItem("row",{text:"Row",context:"table",menu:[{text:"Insert row before",onclick:g("mceTableInsertRowBefore"),onPostRender:m},{text:"Insert row after",onclick:g("mceTableInsertRowAfter"),onPostRender:m},{text:"Delete row",onclick:g("mceTableDeleteRow"),onPostRender:m},{text:"Row properties",onclick:g("mceTableRowProps"),onPostRender:m},{text:"-"},{text:"Cut row",onclick:g("mceTableCutRow"),onPostRender:m},{text:"Copy row",onclick:g("mceTableCopyRow"),onPostRender:m},{text:"Paste row before",onclick:g("mceTablePasteRowBefore"),onPostRender:m},{text:"Paste row after",onclick:g("mceTablePasteRowAfter"),onPostRender:m}]}),f.addMenuItem("column",{text:"Column",context:"table",menu:[{text:"Insert column before",onclick:g("mceTableInsertColBefore"),onPostRender:m},{text:"Insert column after",onclick:g("mceTableInsertColAfter"),onPostRender:m},{text:"Delete column",onclick:g("mceTableDeleteCol"),onPostRender:m}]});var z=[];k("inserttable tableprops deletetable | cell row column".split(" "),function(a){"|"==a?z.push({text:"-"}):z.push(f.menuItems[a])}),f.addButton("table",{type:"menubutton",title:"Table",menu:z}),h.isIE||f.on("click",function(a){a=a.target,"TABLE"===a.nodeName&&(f.selection.select(a),f.nodeChanged())}),x.quirks=new b(f),f.on("Init",function(){x.cellSelection=new c(f,function(a){a&&w.clearBars()}),x.resizeBars=w}),f.on("PreInit",function(){f.serializer.addAttributeFilter("data-mce-cell-padding,data-mce-border,data-mce-border-color",function(a,b){for(var c=a.length;c--;)a[c].attr(b,null)})}),k({mceTableSplitCells:function(a){a.split()},mceTableMergeCells:function(a){var b;b=f.dom.getParent(f.selection.getStart(),"th,td"),f.dom.select("td[data-mce-selected],th[data-mce-selected]").length?a.merge():y.merge(a,b)},mceTableInsertRowBefore:function(a){a.insertRow(!0)},mceTableInsertRowAfter:function(a){a.insertRow()},mceTableInsertColBefore:function(a){a.insertCol(!0)},mceTableInsertColAfter:function(a){a.insertCol()},mceTableDeleteCol:function(a){a.deleteCols()},mceTableDeleteRow:function(a){a.deleteRows()},mceTableCutRow:function(a){v=a.cutRows()},mceTableCopyRow:function(a){v=a.copyRows()},mceTablePasteRowBefore:function(a){a.pasteRows(v,!0)},mceTablePasteRowAfter:function(a){a.pasteRows(v)},mceSplitColsBefore:function(a){a.splitCols(!0)},mceSplitColsAfter:function(a){a.splitCols(!1)},mceTableDelete:function(a){w&&w.clearBars(),a.deleteTable()}},function(b,c){f.addCommand(c,function(){var c=new a(f);c&&(b(c),f.execCommand("mceRepaint"),x.cellSelection.clear())})}),k({mceInsertTable:y.table,mceTableProps:function(){y.table(!0)},mceTableRowProps:y.row,mceTableCellProps:y.cell},function(a,b){f.addCommand(b,function(b,c){a(c)})}),q(),s(),f.settings.table_tab_navigation!==!1&&f.on("keydown",function(b){var c,d,e;9==b.keyCode&&(c=f.dom.getParent(f.selection.getStart(),"th,td"),c&&(b.preventDefault(),d=new a(f),e=b.shiftKey?-1:1,f.undoManager.transact(function(){!d.moveRelIdx(c,e)&&e>0&&(d.insertRow(),d.refresh(),d.moveRelIdx(c,e))})))}),x.insertTable=i,x.setClipboardRows=u,x.getClipboardRows=t}var k=f.each;i.add("table",j)})}(this);
|
1
|
+
!function(a,b){"use strict";function c(a,b){for(var c,d=[],g=0;g<a.length;++g){if(c=f[a[g]]||e(a[g]),!c)throw"module definition dependecy not found: "+a[g];d.push(c)}b.apply(null,d)}function d(a,d,e){if("string"!=typeof a)throw"invalid module definition, module id must be defined and be a string";if(d===b)throw"invalid module definition, dependencies must be specified";if(e===b)throw"invalid module definition, definition function must be specified";c(d,function(){f[a]=e.apply(null,arguments)})}function e(b){for(var c=a,d=b.split(/[.\/]/),e=0;e<d.length;++e){if(!c[d[e]])return;c=c[d[e]]}return c}var f={};d("tinymce/tableplugin/Utils",["tinymce/Env"],function(a){function b(b){(!a.ie||a.ie>9)&&(b.hasChildNodes()||(b.innerHTML='<br data-mce-bogus="1" />'))}var c=function(a){return function(b,c){b&&(c=parseInt(c,10),1===c||0===c?b.removeAttribute(a,1):b.setAttribute(a,c,1))}},d=function(a){return function(b){return parseInt(b.getAttribute(a)||1,10)}};return{setColSpan:c("colSpan"),setRowSpan:c("rowspan"),getColSpan:d("colSpan"),getRowSpan:d("rowSpan"),setSpanVal:function(a,b,d){c(b)(a,d)},getSpanVal:function(a,b){return d(b)(a)},paddCell:b}}),d("tinymce/tableplugin/SplitCols",["tinymce/util/Tools","tinymce/tableplugin/Utils"],function(a,b){var c=function(a,b,c){return a[c]?a[c][b]:null},d=function(a,b,d){var e=c(a,b,d);return e?e.elm:null},e=function(a,b,e,f){var g,h,i=0,j=d(a,b,e);for(g=e;(f>0?g<a.length:g>=0)&&(h=c(a,b,g),j===h.elm);g+=f)i++;return i},f=function(a,b,c){for(var d,e=a[c],f=b;f<e.length;f++)if(d=e[f],d.real)return d.elm;return null},g=function(a,c){for(var d,f=[],g=a[c],h=0;h<g.length;h++)d=g[h],f.push({elm:d.elm,above:e(a,h,c,-1)-1,below:e(a,h,c,1)-1}),h+=b.getColSpan(d.elm)-1;return f},h=function(a,c){var d=a.elm.ownerDocument,e=d.createElement("td");return b.setColSpan(e,b.getColSpan(a.elm)),b.setRowSpan(e,c),b.paddCell(e),e},i=function(a,b,c,d){var e=f(a,c+1,d);e?e.parentNode.insertBefore(b,e):(e=f(a,0,d),e.parentNode.appendChild(b))},j=function(a,c,d,e){if(0!==c.above){b.setRowSpan(c.elm,c.above);var f=h(c,c.below+1);return i(a,f,d,e),f}return null},k=function(a,c,d,e){if(0!==c.below){b.setRowSpan(c.elm,c.above+1);var f=h(c,c.below);return i(a,f,d,e+1),f}return null},l=function(b,c,e,f){var h=g(b,e),i=d(b,c,e).parentNode,l=[];return a.each(h,function(a,c){var d=f?j(b,a,c,e):k(b,a,c,e);null!==d&&l.push(l)}),{cells:l,row:i}};return{splitAt:l}}),d("tinymce/tableplugin/TableGrid",["tinymce/util/Tools","tinymce/Env","tinymce/tableplugin/Utils","tinymce/tableplugin/SplitCols"],function(a,c,d,e){var f=a.each,g=d.getSpanVal,h=d.setSpanVal;return function(i,j,k){function l(){i.$("td[data-mce-selected],th[data-mce-selected]").removeAttr("data-mce-selected")}function m(a){return a===i.getBody()}function n(b,c){return b?(c=a.map(c.split(","),function(a){return a.toLowerCase()}),a.grep(b.childNodes,function(b){return a.inArray(c,b.nodeName.toLowerCase())!==-1})):[]}function o(){var a=0;X=[],Y=0,f(["thead","tbody","tfoot"],function(b){var c=n(j,b)[0],d=n(c,"tr");f(d,function(c,d){d+=a,f(n(c,"td,th"),function(a,c){var e,f,h,i;if(X[d])for(;X[d][c];)c++;for(h=g(a,"rowspan"),i=g(a,"colspan"),f=d;f<d+h;f++)for(X[f]||(X[f]=[]),e=c;e<c+i;e++)X[f][e]={part:b,real:f==d&&e==c,elm:a,rowspan:h,colspan:i};Y=Math.max(Y,c+1)})}),a+=d.length})}function p(a){return i.fire("newrow",{node:a}),a}function q(a){return i.fire("newcell",{node:a}),a}function r(a,b){return a=a.cloneNode(b),a.removeAttribute("id"),a}function s(a,b){var c;if(c=X[b])return c[a]}function t(a,b){return a[b]?a[b]:null}function u(a,b){for(var c=[],d=0;d<a.length;d++)c.push(s(b,d));return c}function v(a){return a&&(!!aa.getAttrib(a.elm,"data-mce-selected")||a==k)}function w(){var a=[];return f(j.rows,function(b){f(b.cells,function(c){if(aa.getAttrib(c,"data-mce-selected")||k&&c==k.elm)return a.push(b),!1})}),a}function x(){var a=aa.createRng();m(j)||(a.setStartAfter(j),a.setEndAfter(j),_.setRng(a),aa.remove(j))}function y(b){var e,g={};return i.settings.table_clone_elements!==!1&&(g=a.makeMap((i.settings.table_clone_elements||"strong em b i span font h1 h2 h3 h4 h5 h6 p div").toUpperCase(),/[ ,]/)),a.walk(b,function(a){var d;if(3==a.nodeType)return f(aa.getParents(a.parentNode,null,b).reverse(),function(a){g[a.nodeName]&&(a=r(a,!1),e?d&&d.appendChild(a):e=d=a,d=a)}),d&&(d.innerHTML=c.ie&&c.ie<10?" ":'<br data-mce-bogus="1" />'),!1},"childNodes"),b=r(b,!1),q(b),h(b,"rowSpan",1),h(b,"colSpan",1),e?b.appendChild(e):d.paddCell(b),b}function z(){var a,b=aa.createRng();return f(aa.select("tr",j),function(a){0===a.cells.length&&aa.remove(a)}),0===aa.select("tr",j).length?(b.setStartBefore(j),b.setEndBefore(j),_.setRng(b),void aa.remove(j)):(f(aa.select("thead,tbody,tfoot",j),function(a){0===a.rows.length&&aa.remove(a)}),o(),void(Z&&(a=X[Math.min(X.length-1,Z.y)],a&&(_.select(a[Math.min(a.length-1,Z.x)].elm,!0),_.collapse(!0)))))}function A(a,b,c,d){var e,f,g,h,i;for(e=X[b][a].elm.parentNode,g=1;g<=c;g++)if(e=aa.getNext(e,"tr")){for(f=a;f>=0;f--)if(i=X[b+g][f].elm,i.parentNode==e){for(h=1;h<=d;h++)aa.insertAfter(y(i),i);break}if(f==-1)for(h=1;h<=d;h++)e.insertBefore(y(e.cells[0]),e.cells[0])}}function B(){f(X,function(a,b){f(a,function(a,c){var d,e,f;if(v(a)&&(a=a.elm,d=g(a,"colspan"),e=g(a,"rowspan"),d>1||e>1)){for(h(a,"rowSpan",1),h(a,"colSpan",1),f=0;f<d-1;f++)aa.insertAfter(y(a),a);A(c,b,e-1,d)}})})}function C(a,b,c){for(var d=[],e=0;e<a.length;e++)(e<b||e>c)&&d.push(a[e]);return d}function D(b){return a.grep(b,function(a){return a.real===!1})}function E(a){for(var b=[],c=0;c<a.length;c++){var d=a[c].elm;b[b.length-1]!==d&&b.push(d)}return b}function F(b,c,e,f,g){var h=0;if(g-e<1)return 0;for(var i=e+1;i<=g;i++){var j=C(t(b,i),c,f),k=D(j);j.length===k.length&&(a.each(E(k),function(a){d.setRowSpan(a,d.getRowSpan(a)-1)}),h++)}return h}function G(b,c,e,f,g){var h=0;if(f-c<1)return 0;for(var i=c+1;i<=f;i++){var j=C(u(b,i),e,g),k=D(j);j.length===k.length&&(a.each(E(k),function(a){d.setColSpan(a,d.getColSpan(a)-1)}),h++)}return h}function H(b,c,d){var e,g,i,j,k,l,m,n,p,q,r,t,u;if(b?(e=R(b),g=e.x,i=e.y,j=g+(c-1),k=i+(d-1)):(Z=$=null,f(X,function(a,b){f(a,function(a,c){v(a)&&(Z||(Z={x:c,y:b}),$={x:c,y:b})})}),Z&&(g=Z.x,i=Z.y,j=$.x,k=$.y)),n=s(g,i),p=s(j,k),n&&p&&n.part==p.part){B(),o(),t=F(X,g,i,j,k),u=G(X,g,i,j,k),n=s(g,i).elm;var w=j-g-u+1,x=k-i-t+1;for(w===Y&&x===X.length&&(w=1,x=1),w===Y&&x>1&&(x=1),h(n,"colSpan",w),h(n,"rowSpan",x),m=i;m<=k;m++)for(l=g;l<=j;l++)X[m]&&X[m][l]&&(b=X[m][l].elm,b!=n&&(q=a.grep(b.childNodes),f(q,function(a){n.appendChild(a)}),q.length&&(q=a.grep(n.childNodes),r=0,f(q,function(a){"BR"==a.nodeName&&r++<q.length-1&&n.removeChild(a)})),aa.remove(b)));z()}}function I(a){var c,d,e,i,j,k,l,m,n,o;if(f(X,function(b,d){if(f(b,function(b){if(v(b)&&(b=b.elm,j=b.parentNode,k=p(r(j,!1)),c=d,a))return!1}),a)return!c}),c!==b){for(i=0,o=0;i<X[0].length;i+=o)if(X[c][i]&&(d=X[c][i].elm,o=g(d,"colspan"),d!=e)){if(a){if(c>0&&X[c-1][i]&&(m=X[c-1][i].elm,n=g(m,"rowSpan"),n>1)){h(m,"rowSpan",n+1);continue}}else if(n=g(d,"rowspan"),n>1){h(d,"rowSpan",n+1);continue}l=y(d),h(l,"colSpan",d.colSpan),k.appendChild(l),e=d}k.hasChildNodes()&&(a?j.parentNode.insertBefore(k,j):aa.insertAfter(k,j))}}function J(a){var b,c;f(X,function(c){if(f(c,function(c,d){if(v(c)&&(b=d,a))return!1}),a)return!b}),f(X,function(d,e){var f,i,j;d[b]&&(f=d[b].elm,f!=c&&(j=g(f,"colspan"),i=g(f,"rowspan"),1==j?a?(f.parentNode.insertBefore(y(f),f),A(b,e,i-1,j)):(aa.insertAfter(y(f),f),A(b,e,i-1,j)):h(f,"colSpan",f.colSpan+1),c=f))})}function K(b){return a.grep(L(b),v)}function L(a){var b=[];return f(a,function(a){f(a,function(a){b.push(a)})}),b}function M(){var b=[];if(m(j)){if(1==X[0].length)return;if(K(X).length==L(X).length)return}f(X,function(c){f(c,function(c,d){v(c)&&a.inArray(b,d)===-1&&(f(X,function(a){var b,c=a[d].elm;b=g(c,"colSpan"),b>1?h(c,"colSpan",b-1):aa.remove(c)}),b.push(d))})}),z()}function N(){function a(a){var b,c;f(a.cells,function(a){var c=g(a,"rowSpan");c>1&&(h(a,"rowSpan",c-1),b=R(a),A(b.x,b.y,1,1))}),b=R(a.cells[0]),f(X[b.y],function(a){var b;a=a.elm,a!=c&&(b=g(a,"rowSpan"),b<=1?aa.remove(a):h(a,"rowSpan",b-1),c=a)})}var b;b=w(),m(j)&&b.length==j.rows.length||(f(b.reverse(),function(b){a(b)}),z())}function O(){var a=w();if(!m(j)||a.length!=j.rows.length)return aa.remove(a),z(),a}function P(){var a=w();return f(a,function(b,c){a[c]=r(b,!0)}),a}function Q(b,c){var d,g,i;b&&(d=e.splitAt(X,Z.x,Z.y,c),g=d.row,a.each(d.cells,q),i=a.map(b,function(a){return a.cloneNode(!0)}),c||i.reverse(),f(i,function(a){var b,d,e=a.cells.length;for(p(a),b=0;b<e;b++)d=a.cells[b],q(d),h(d,"colSpan",1),h(d,"rowSpan",1);for(b=e;b<Y;b++)a.appendChild(q(y(a.cells[e-1])));for(b=Y;b<e;b++)aa.remove(a.cells[b]);c?g.parentNode.insertBefore(a,g):aa.insertAfter(a,g)}),l())}function R(a){var b;return f(X,function(c,d){return f(c,function(c,e){if(c.elm==a)return b={x:e,y:d},!1}),!b}),b}function S(a){Z=R(a)}function T(){var a,b;return a=b=0,f(X,function(c,d){f(c,function(c,e){var f,g;v(c)&&(c=X[d][e],e>a&&(a=e),d>b&&(b=d),c.real&&(f=c.colspan-1,g=c.rowspan-1,f&&e+f>a&&(a=e+f),g&&d+g>b&&(b=d+g)))})}),{x:a,y:b}}function U(a){var b,c,d,e,f,g,h,i,j,k;if($=R(a),Z&&$){for(b=Math.min(Z.x,$.x),c=Math.min(Z.y,$.y),d=Math.max(Z.x,$.x),e=Math.max(Z.y,$.y),f=d,g=e,k=c;k<=e;k++)for(j=b;j<=d;j++)a=X[k][j],a.real&&(h=a.colspan-1,i=a.rowspan-1,h&&j+h>f&&(f=j+h),i&&k+i>g&&(g=k+i));for(l(),k=c;k<=g;k++)for(j=b;j<=f;j++)X[k][j]&&aa.setAttrib(X[k][j].elm,"data-mce-selected","1")}}function V(a,b){var c,d,e;c=R(a),d=c.y*Y+c.x;do{if(d+=b,e=s(d%Y,Math.floor(d/Y)),!e)break;if(e.elm!=a)return _.select(e.elm,!0),aa.isEmpty(e.elm)&&_.collapse(!0),!0}while(e.elm==a);return!1}function W(b){if(Z){var c=e.splitAt(X,Z.x,Z.y,b);a.each(c.cells,q)}}var X,Y,Z,$,_=i.selection,aa=_.dom;j=j||aa.getParent(_.getStart(!0),"table"),o(),k=k||aa.getParent(_.getStart(!0),"th,td"),k&&(Z=R(k),$=T(),k=s(Z.x,Z.y)),a.extend(this,{deleteTable:x,split:B,merge:H,insertRow:I,insertCol:J,splitCols:W,deleteCols:M,deleteRows:N,cutRows:O,copyRows:P,pasteRows:Q,getPos:R,setStartCell:S,setEndCell:U,moveRelIdx:V,refresh:o})}}),d("tinymce/tableplugin/Quirks",["tinymce/util/VK","tinymce/util/Delay","tinymce/Env","tinymce/util/Tools","tinymce/tableplugin/Utils"],function(a,b,c,d,e){var f=d.each,g=e.getSpanVal;return function(h){function i(){function c(c){function d(a,b){var d=a?"previousSibling":"nextSibling",f=h.dom.getParent(b,"tr"),g=f[d];if(g)return r(h,b,g,a),c.preventDefault(),!0;var i=h.dom.getParent(f,"table"),l=f.parentNode,m=l.nodeName.toLowerCase();if("tbody"===m||m===(a?"tfoot":"thead")){var n=e(a,i,l,"tbody");if(null!==n)return j(a,n,b)}return k(a,f,d,i)}function e(a,b,c,d){var e=h.dom.select(">"+d,b),f=e.indexOf(c);if(a&&0===f||!a&&f===e.length-1)return i(a,b);if(f===-1){var g="thead"===c.tagName.toLowerCase()?0:e.length-1;return e[g]}return e[f+(a?-1:1)]}function i(a,b){var c=a?"thead":"tfoot",d=h.dom.select(">"+c,b);return 0!==d.length?d[0]:null}function j(a,b,d){var e=l(b,a);return e&&r(h,d,e,a),c.preventDefault(),!0}function k(a,b,e,f){var g=f[e];if(g)return m(g),!0;var i=h.dom.getParent(f,"td,th");if(i)return d(a,i,c);var j=l(b,!a);return m(j),c.preventDefault(),!1}function l(a,b){var c=a&&a[b?"lastChild":"firstChild"];return c&&"BR"===c.nodeName?h.dom.getParent(c,"td,th"):c}function m(a){h.selection.setCursorLocation(a,0)}function n(){return u==a.UP||u==a.DOWN}function o(a){var b=a.selection.getNode(),c=a.dom.getParent(b,"tr");return null!==c}function p(a){for(var b=0,c=a;c.previousSibling;)c=c.previousSibling,b+=g(c,"colspan");return b}function q(a,b){var c=0,d=0;return f(a.children,function(a,e){if(c+=g(a,"colspan"),d=e,c>b)return!1}),d}function r(a,b,c,d){var e=p(h.dom.getParent(b,"td,th")),f=q(c,e),g=c.childNodes[f],i=l(g,d);m(i||g)}function s(a){var b=h.selection.getNode(),c=h.dom.getParent(b,"td,th"),d=h.dom.getParent(a,"td,th");return c&&c!==d&&t(c,d)}function t(a,b){return h.dom.getParent(a,"TABLE")===h.dom.getParent(b,"TABLE")}var u=c.keyCode;if(n()&&o(h)){var v=h.selection.getNode();b.setEditorTimeout(h,function(){s(v)&&d(!c.shiftKey&&u===a.UP,v,c)},0)}}h.on("KeyDown",function(a){c(a)})}function j(){function a(a,b){var c,d=b.ownerDocument,e=d.createRange();return e.setStartBefore(b),e.setEnd(a.endContainer,a.endOffset),c=d.createElement("body"),c.appendChild(e.cloneContents()),0===c.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length}h.on("KeyDown",function(b){var c,d,e=h.dom;37!=b.keyCode&&38!=b.keyCode||(c=h.selection.getRng(),d=e.getParent(c.startContainer,"table"),d&&h.getBody().firstChild==d&&a(c,d)&&(c=e.createRng(),c.setStartBefore(d),c.setEndBefore(d),h.selection.setRng(c),b.preventDefault()))})}function k(){h.on("KeyDown SetContent VisualAid",function(){var a;for(a=h.getBody().lastChild;a;a=a.previousSibling)if(3==a.nodeType){if(a.nodeValue.length>0)break}else if(1==a.nodeType&&("BR"==a.tagName||!a.getAttribute("data-mce-bogus")))break;a&&"TABLE"==a.nodeName&&(h.settings.forced_root_block?h.dom.add(h.getBody(),h.settings.forced_root_block,h.settings.forced_root_block_attrs,c.ie&&c.ie<10?" ":'<br data-mce-bogus="1" />'):h.dom.add(h.getBody(),"br",{"data-mce-bogus":"1"}))}),h.on("PreProcess",function(a){var b=a.node.lastChild;b&&("BR"==b.nodeName||1==b.childNodes.length&&("BR"==b.firstChild.nodeName||"\xa0"==b.firstChild.nodeValue))&&b.previousSibling&&"TABLE"==b.previousSibling.nodeName&&h.dom.remove(b)})}function l(){function a(a,b,c,d){var e,f,g,h=3,i=a.dom.getParent(b.startContainer,"TABLE");return i&&(e=i.parentNode),f=b.startContainer.nodeType==h&&0===b.startOffset&&0===b.endOffset&&d&&("TR"==c.nodeName||c==e),g=("TD"==c.nodeName||"TH"==c.nodeName)&&!d,f||g}function b(){var b=h.selection.getRng(),c=h.selection.getNode(),d=h.dom.getParent(b.startContainer,"TD,TH");if(a(h,b,c,d)){d||(d=c);for(var e=d.lastChild;e.lastChild;)e=e.lastChild;3==e.nodeType&&(b.setEnd(e,e.data.length),h.selection.setRng(b))}}h.on("KeyDown",function(){b()}),h.on("MouseDown",function(a){2!=a.button&&b()})}function m(){function b(a){h.selection.select(a,!0),h.selection.collapse(!0)}function c(a){h.$(a).empty(),e.paddCell(a)}h.on("keydown",function(e){if((e.keyCode==a.DELETE||e.keyCode==a.BACKSPACE)&&!e.isDefaultPrevented()){var f,g,i,j;if(f=h.dom.getParent(h.selection.getStart(),"table")){if(g=h.dom.select("td,th",f),i=d.grep(g,function(a){return!!h.dom.getAttrib(a,"data-mce-selected")}),0===i.length)return j=h.dom.getParent(h.selection.getStart(),"td,th"),void(h.selection.isCollapsed()&&j&&h.dom.isEmpty(j)&&(e.preventDefault(),c(j),b(j)));e.preventDefault(),h.undoManager.transact(function(){g.length==i.length?h.execCommand("mceTableDelete"):(d.each(i,c),b(i[0]))})}}})}m(),c.webkit&&(i(),l()),c.gecko&&(j(),k()),c.ie>9&&(j(),k())}}),d("tinymce/tableplugin/CellSelection",["tinymce/tableplugin/TableGrid","tinymce/dom/TreeWalker","tinymce/util/Tools"],function(a,b,c){return function(d,e){function f(a){d.getBody().style.webkitUserSelect="",(a||p)&&(d.$("td[data-mce-selected],th[data-mce-selected]").removeAttr("data-mce-selected"),p=!1)}function g(a,b){return!(!a||!b)&&a===o.getParent(b,"table")}function h(b){var c,f,h=b.target;if(!m&&!n&&h!==l&&(l=h,k&&j)){if(f=o.getParent(h,"td,th"),g(k,f)||(f=o.getParent(k,"td,th")),j===f&&!p)return;if(e(!0),g(k,f)){b.preventDefault(),i||(i=new a(d,k,j),d.getBody().style.webkitUserSelect="none"),i.setEndCell(f),p=!0,c=d.selection.getSel();try{c.removeAllRanges?c.removeAllRanges():c.empty()}catch(a){}}}}var i,j,k,l,m,n,o=d.dom,p=!0,q=function(){j=i=k=l=null,e(!1)};return d.on("SelectionChange",function(a){p&&a.stopImmediatePropagation()},!0),d.on("MouseDown",function(a){2==a.button||m||n||(f(),j=o.getParent(a.target,"td,th"),k=o.getParent(j,"table"))}),d.on("mouseover",h),d.on("remove",function(){o.unbind(d.getDoc(),"mouseover",h),f()}),d.on("MouseUp",function(){function a(a,d){var f=new b(a,a);do{if(3==a.nodeType&&0!==c.trim(a.nodeValue).length)return void(d?e.setStart(a,0):e.setEnd(a,a.nodeValue.length));if("BR"==a.nodeName)return void(d?e.setStartBefore(a):e.setEndBefore(a))}while(a=d?f.next():f.prev())}var e,f,g,h,k,l=d.selection;if(j){if(i&&(d.getBody().style.webkitUserSelect=""),f=o.select("td[data-mce-selected],th[data-mce-selected]"),f.length>0){e=o.createRng(),h=f[0],e.setStartBefore(h),e.setEndAfter(h),a(h,1),g=new b(h,o.getParent(f[0],"table"));do if("TD"==h.nodeName||"TH"==h.nodeName){if(!o.getAttrib(h,"data-mce-selected"))break;k=h}while(h=g.next());a(k),l.setRng(e)}d.nodeChanged(),q()}}),d.on("KeyUp Drop SetContent",function(a){f("setcontent"==a.type),q(),m=!1}),d.on("ObjectResizeStart ObjectResized",function(a){m="objectresized"!=a.type}),d.on("dragstart",function(){n=!0}),d.on("drop dragend",function(){n=!1}),{clear:f}}}),d("tinymce/tableplugin/Dialogs",["tinymce/util/Tools","tinymce/Env"],function(a,b){var c=a.each;return function(d){function e(){var a=d.settings.color_picker_callback;if(a)return function(){var b=this;a.call(d,function(a){b.value(a).fire("change")},b.value())}}function f(a){return{title:"Advanced",type:"form",defaults:{onchange:function(){l(a,this.parents().reverse()[0],"style"==this.name())}},items:[{label:"Style",name:"style",type:"textbox"},{type:"form",padding:0,formItemDefaults:{layout:"grid",alignH:["start","right"]},defaults:{size:7},items:[{label:"Border color",type:"colorbox",name:"borderColor",onaction:e()},{label:"Background color",type:"colorbox",name:"backgroundColor",onaction:e()}]}]}}function g(a){return a?a.replace(/px$/,""):""}function h(a){return/^[0-9]+$/.test(a)&&(a+="px"),a}function i(a){c("left center right".split(" "),function(b){d.formatter.remove("align"+b,{},a)})}function j(a){c("top middle bottom".split(" "),function(b){d.formatter.remove("valign"+b,{},a)})}function k(b,c,d){function e(b,d){return d=d||[],a.each(b,function(a){var b={text:a.text||a.title};a.menu?b.menu=e(a.menu):(b.value=a.value,c&&c(b)),d.push(b)}),d}return e(b,d||[])}function l(a,b,c){var d=b.toJSON(),e=a.parseStyle(d.style);c?(b.find("#borderColor").value(e["border-color"]||"")[0].fire("change"),b.find("#backgroundColor").value(e["background-color"]||"")[0].fire("change")):(e["border-color"]=d.borderColor,e["background-color"]=d.backgroundColor),b.find("#style").value(a.serializeStyle(a.parseStyle(a.serializeStyle(e))))}function m(a,b,c){var d=a.parseStyle(a.getAttrib(c,"style"));d["border-color"]&&(b.borderColor=d["border-color"]),d["background-color"]&&(b.backgroundColor=d["background-color"]),b.style=a.serializeStyle(d)}function n(a,b,d){var e=a.parseStyle(a.getAttrib(b,"style"));c(d,function(a){e[a.name]=a.value}),a.setAttrib(b,"style",a.serializeStyle(a.parseStyle(a.serializeStyle(e))))}var o=this;o.tableProps=function(){o.table(!0)},o.table=function(e){function j(){function c(a,b,d){if("TD"===a.tagName||"TH"===a.tagName)v.setStyle(a,b,d);else if(a.children)for(var e=0;e<a.children.length;e++)c(a.children[e],b,d)}var e;l(v,this),w=a.extend(w,this.toJSON()),w.class===!1&&delete w.class,d.undoManager.transact(function(){if(p||(p=d.plugins.table.insertTable(w.cols||1,w.rows||1)),d.dom.setAttribs(p,{style:w.style,class:w.class}),d.settings.table_style_by_css){if(u=[],u.push({name:"border",value:w.border}),u.push({name:"border-spacing",value:h(w.cellspacing)}),n(v,p,u),v.setAttribs(p,{"data-mce-border-color":w.borderColor,"data-mce-cell-padding":w.cellpadding,"data-mce-border":w.border}),p.children)for(var a=0;a<p.children.length;a++)c(p.children[a],"border",w.border),c(p.children[a],"padding",h(w.cellpadding))}else d.dom.setAttribs(p,{border:w.border,cellpadding:w.cellpadding,cellspacing:w.cellspacing});v.getAttrib(p,"width")&&!d.settings.table_style_by_css?v.setAttrib(p,"width",g(w.width)):v.setStyle(p,"width",h(w.width)),v.setStyle(p,"height",h(w.height)),e=v.select("caption",p)[0],e&&!w.caption&&v.remove(e),!e&&w.caption&&(e=v.create("caption"),e.innerHTML=b.ie?"\xa0":'<br data-mce-bogus="1"/>',p.insertBefore(e,p.firstChild)),i(p),w.align&&d.formatter.apply("align"+w.align,{},p),d.focus(),d.addVisual()})}function o(a,b){function c(a,c){for(var d=0;d<c.length;d++){var e=v.getStyle(c[d],b);if("undefined"==typeof a&&(a=e),a!=e)return""}return a}var e,f=d.dom.select("td,th",a);return e=c(e,f)}var p,q,r,s,t,u,v=d.dom,w={};e===!0?(p=v.getParent(d.selection.getStart(),"table"),p&&(w={width:g(v.getStyle(p,"width")||v.getAttrib(p,"width")),height:g(v.getStyle(p,"height")||v.getAttrib(p,"height")),cellspacing:g(v.getStyle(p,"border-spacing")||v.getAttrib(p,"cellspacing")),cellpadding:v.getAttrib(p,"data-mce-cell-padding")||v.getAttrib(p,"cellpadding")||o(p,"padding"),border:v.getAttrib(p,"data-mce-border")||v.getAttrib(p,"border")||o(p,"border"),borderColor:v.getAttrib(p,"data-mce-border-color"),caption:!!v.select("caption",p)[0],class:v.getAttrib(p,"class")},c("left center right".split(" "),function(a){d.formatter.matchNode(p,"align"+a)&&(w.align=a)}))):(q={label:"Cols",name:"cols"},r={label:"Rows",name:"rows"}),d.settings.table_class_list&&(w.class&&(w.class=w.class.replace(/\s*mce\-item\-table\s*/g,"")),s={name:"class",type:"listbox",label:"Class",values:k(d.settings.table_class_list,function(a){a.value&&(a.textStyle=function(){return d.formatter.getCssText({block:"table",classes:[a.value]})})})}),t={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",labelGapCalc:!1,padding:0,layout:"grid",columns:2,defaults:{type:"textbox",maxWidth:50},items:d.settings.table_appearance_options!==!1?[q,r,{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell spacing",name:"cellspacing"},{label:"Cell padding",name:"cellpadding"},{label:"Border",name:"border"},{label:"Caption",name:"caption",type:"checkbox"}]:[q,r,{label:"Width",name:"width"},{label:"Height",name:"height"}]},{label:"Alignment",name:"align",type:"listbox",text:"None",values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},s]},d.settings.table_advtab!==!1?(m(v,w,p),d.windowManager.open({title:"Table properties",data:w,bodyType:"tabpanel",body:[{title:"General",type:"form",items:t},f(v)],onsubmit:j})):d.windowManager.open({title:"Table properties",data:w,body:t,onsubmit:j})},o.merge=function(a,b){d.windowManager.open({title:"Merge cells",body:[{label:"Cols",name:"cols",type:"textbox",value:"1",size:10},{label:"Rows",name:"rows",type:"textbox",value:"1",size:10}],onsubmit:function(){var c=this.toJSON();d.undoManager.transact(function(){a.merge(b,c.cols,c.rows)})}})},o.cell=function(){function b(a,b,c){(1===s.length||c)&&r.setAttrib(a,b,c)}function e(a,b,c){(1===s.length||c)&&r.setStyle(a,b,c)}function n(){l(r,this),p=a.extend(p,this.toJSON()),d.undoManager.transact(function(){c(s,function(a){b(a,"scope",p.scope),b(a,"style",p.style),b(a,"class",p.class),e(a,"width",h(p.width)),e(a,"height",h(p.height)),p.type&&a.nodeName.toLowerCase()!==p.type&&(a=r.rename(a,p.type)),1===s.length&&(i(a),j(a)),p.align&&d.formatter.apply("align"+p.align,{},a),p.valign&&d.formatter.apply("valign"+p.valign,{},a)}),d.focus()})}var o,p,q,r=d.dom,s=[];if(s=d.dom.select("td[data-mce-selected],th[data-mce-selected]"),o=d.dom.getParent(d.selection.getStart(),"td,th"),!s.length&&o&&s.push(o),o=o||s[0]){s.length>1?p={width:"",height:"",scope:"",class:"",align:"",style:"",type:o.nodeName.toLowerCase()}:(p={width:g(r.getStyle(o,"width")||r.getAttrib(o,"width")),height:g(r.getStyle(o,"height")||r.getAttrib(o,"height")),scope:r.getAttrib(o,"scope"),class:r.getAttrib(o,"class")},p.type=o.nodeName.toLowerCase(),c("left center right".split(" "),function(a){d.formatter.matchNode(o,"align"+a)&&(p.align=a)}),c("top middle bottom".split(" "),function(a){d.formatter.matchNode(o,"valign"+a)&&(p.valign=a)}),m(r,p,o)),d.settings.table_cell_class_list&&(q={name:"class",type:"listbox",label:"Class",values:k(d.settings.table_cell_class_list,function(a){a.value&&(a.textStyle=function(){return d.formatter.getCssText({block:"td",classes:[a.value]})})})});var t={type:"form",layout:"flex",direction:"column",labelGapCalc:"children",padding:0,items:[{type:"form",layout:"grid",columns:2,labelGapCalc:!1,padding:0,defaults:{type:"textbox",maxWidth:50},items:[{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell type",name:"type",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{label:"Scope",name:"scope",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{label:"H Align",name:"align",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"V Align",name:"valign",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}]}]},q]};d.settings.table_cell_advtab!==!1?d.windowManager.open({title:"Cell properties",bodyType:"tabpanel",data:p,body:[{title:"General",type:"form",items:t},f(r)],onsubmit:n}):d.windowManager.open({title:"Cell properties",data:p,body:t,onsubmit:n})}},o.row=function(){function b(a,b,c){(1===u.length||c)&&t.setAttrib(a,b,c)}function e(a,b,c){(1===u.length||c)&&t.setStyle(a,b,c)}function j(){var f,g,j;l(t,this),r=a.extend(r,this.toJSON()),d.undoManager.transact(function(){var a=r.type;c(u,function(c){b(c,"scope",r.scope),b(c,"style",r.style),b(c,"class",r.class),e(c,"height",h(r.height)),a!==c.parentNode.nodeName.toLowerCase()&&(f=t.getParent(c,"table"),g=c.parentNode,j=t.select(a,f)[0],j||(j=t.create(a),f.firstChild?f.insertBefore(j,f.firstChild):f.appendChild(j)),j.appendChild(c),g.hasChildNodes()||t.remove(g)),1===u.length&&i(c),r.align&&d.formatter.apply("align"+r.align,{},c)}),d.focus()})}var n,o,p,q,r,s,t=d.dom,u=[];n=d.dom.getParent(d.selection.getStart(),"table"),o=d.dom.getParent(d.selection.getStart(),"td,th"),c(n.rows,function(a){c(a.cells,function(b){if(t.getAttrib(b,"data-mce-selected")||b==o)return u.push(a),!1})}),p=u[0],p&&(u.length>1?r={height:"",scope:"",class:"",align:"",type:p.parentNode.nodeName.toLowerCase()}:(r={height:g(t.getStyle(p,"height")||t.getAttrib(p,"height")),scope:t.getAttrib(p,"scope"),class:t.getAttrib(p,"class")},r.type=p.parentNode.nodeName.toLowerCase(),c("left center right".split(" "),function(a){d.formatter.matchNode(p,"align"+a)&&(r.align=a)}),m(t,r,p)),d.settings.table_row_class_list&&(q={name:"class",type:"listbox",label:"Class",values:k(d.settings.table_row_class_list,function(a){a.value&&(a.textStyle=function(){return d.formatter.getCssText({block:"tr",classes:[a.value]})})})}),s={type:"form",columns:2,padding:0,defaults:{type:"textbox"},items:[{type:"listbox",name:"type",label:"Row type",text:"Header",maxWidth:null,values:[{text:"Header",value:"thead"},{text:"Body",value:"tbody"},{text:"Footer",value:"tfoot"}]},{type:"listbox",name:"align",label:"Alignment",text:"None",maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height"},q]},d.settings.table_row_advtab!==!1?d.windowManager.open({title:"Row properties",data:r,bodyType:"tabpanel",body:[{title:"General",type:"form",items:s},f(t)],onsubmit:j}):d.windowManager.open({title:"Row properties",data:r,body:s,onsubmit:j}))}}}),d("tinymce/tableplugin/ResizeBars",["tinymce/util/Tools","tinymce/util/VK"],function(a,c){var d;return function(e){function f(a,b){return{index:a,y:e.dom.getPos(b).y}}function g(a,b){return{index:a,y:e.dom.getPos(b).y+b.offsetHeight}}function h(a,b){return{index:a,x:e.dom.getPos(b).x}}function i(a,b){return{index:a,x:e.dom.getPos(b).x+b.offsetWidth}}function j(){var a=e.getBody().dir;return"rtl"===a}function k(){return e.inline}function l(){return k?e.getBody().ownerDocument.body:e.getBody()}function m(a,b){return j()?i(a,b):h(a,b)}function n(a,b){return j()?h(a,b):i(a,b)}function o(a,b){return p(a,"width")/p(b,"width")*100}function p(a,b){var c=e.dom.getStyle(a,b,!0),d=parseInt(c,10);return d}function q(a){var b=p(a,"width"),c=p(a.parentElement,"width");return b/c*100}function r(a,b){var c=p(a,"width");return b/c*100}function s(a,b){var c=p(a.parentElement,"width");return b/c*100}function t(a,b,c){for(var d=[],e=1;e<c.length;e++){var f=c[e].element;d.push(a(e-1,f))}var g=c[c.length-1];return d.push(b(c.length-1,g.element)),d}function u(){var b=e.dom.select("."+ma,l());a.each(b,function(a){e.dom.remove(a)})}function v(a){u(),F(a)}function w(a,b,c,d,e,f,g,h){var i={"data-mce-bogus":"all",class:ma+" "+a,unselectable:"on","data-mce-resize":!1,style:"cursor: "+b+"; margin: 0; padding: 0; position: absolute; left: "+c+"px; top: "+d+"px; height: "+e+"px; width: "+f+"px; "};return i[g]=h,i}function x(b,c,d){a.each(b,function(a){var b=d.x,f=a.y-va/2,g=va,h=c;e.dom.add(l(),"div",w(na,oa,b,f,g,h,pa,a.index))})}function y(b,c,d){a.each(b,function(a){var b=a.x-va/2,f=d.y,g=c,h=va;e.dom.add(l(),"div",w(ra,sa,b,f,g,h,ta,a.index))})}function z(b){return a.map(b.rows,function(b){var c=a.map(b.cells,function(a){var b=a.hasAttribute("rowspan")?parseInt(a.getAttribute("rowspan"),10):1,c=a.hasAttribute("colspan")?parseInt(a.getAttribute("colspan"),10):1;return{element:a,rowspan:b,colspan:c}});return{element:b,cells:c}})}function A(c){function d(a,b){return a+","+b}function e(a,b){return h[d(a,b)]}function f(){var b=[];return a.each(i,function(a){b=b.concat(a.cells)}),b}function g(){return i}var h={},i=[],j=0,k=0;return a.each(c,function(c,e){var f=[];a.each(c.cells,function(a){for(var c=0;h[d(e,c)]!==b;)c++;for(var g={element:a.element,colspan:a.colspan,rowspan:a.rowspan,rowIndex:e,colIndex:c},i=0;i<a.colspan;i++)for(var l=0;l<a.rowspan;l++){var m=e+l,n=c+i;h[d(m,n)]=g,j=Math.max(j,m+1),k=Math.max(k,n+1)}f.push(g)}),i.push({element:c.element,cells:f})}),{grid:{maxRows:j,maxCols:k},getAt:e,getAllCells:f,getAllRows:g}}function B(a,b){for(var c=[],d=a;d<b;d++)c.push(d);return c}function C(a,b,c){for(var d,e=a(),f=0;f<e.length;f++)b(e[f])&&(d=e[f]);return d?d:c()}function D(b){var c=B(0,b.grid.maxCols),d=B(0,b.grid.maxRows);return a.map(c,function(a){function c(){for(var c=[],e=0;e<d.length;e++){var f=b.getAt(e,a);f&&f.colIndex===a&&c.push(f)}return c}function e(a){return 1===a.colspan}function f(){for(var c,e=0;e<d.length;e++)if(c=b.getAt(e,a))return c;return null}return C(c,e,f)})}function E(b){var c=B(0,b.grid.maxCols),d=B(0,b.grid.maxRows);return a.map(d,function(a){function d(){for(var d=[],e=0;e<c.length;e++){var f=b.getAt(a,e);f&&f.rowIndex===a&&d.push(f)}return d}function e(a){return 1===a.rowspan}function f(){return b.getAt(a,0)}return C(d,e,f)})}function F(a){var b=z(a),c=A(b),d=E(c),h=D(c),i=e.dom.getPos(a),j=d.length>0?t(f,g,d):[],k=h.length>0?t(m,n,h):[];x(j,a.offsetWidth,i),y(k,a.offsetHeight,i)}function G(a,b,c,d){if(b<0||b>=a.length-1)return"";var e=a[b];if(e)e={value:e,delta:0};else for(var f=a.slice(0,b).reverse(),g=0;g<f.length;g++)f[g]&&(e={value:f[g],delta:g+1});var h=a[b+1];if(h)h={value:h,delta:1};else for(var i=a.slice(b+1),j=0;j<i.length;j++)i[j]&&(h={value:i[j],delta:j+1});var k=h.delta-e.delta,l=Math.abs(h.value-e.value)/k;return c?l/p(d,"width")*100:l}function H(a,b){var c=e.dom.getStyle(a,b);return c||(c=e.dom.getAttrib(a,b)),c||(c=e.dom.getStyle(a,b,!0)),c}function I(a,b,c){var d=H(a,"width"),e=parseInt(d,10),f=b?o(a,c):p(a,"width");return(b&&!R(d)||!b&&!S(d))&&(e=0),!isNaN(e)&&e>0?e:f}function J(b,c,d){for(var e=D(b),f=a.map(e,function(a){return m(a.colIndex,a.element).x}),g=[],h=0;h<e.length;h++){var i=e[h].element.hasAttribute("colspan")?parseInt(e[h].element.getAttribute("colspan"),10):1,j=i>1?G(f,h):I(e[h].element,c,d);j=j?j:wa,g.push(j)}return g}function K(a){var b=H(a,"height"),c=parseInt(b,10);return R(b)&&(c=0),!isNaN(c)&&c>0?c:p(a,"height")}function L(b){for(var c=E(b),d=a.map(c,function(a){return f(a.rowIndex,a.element).y}),e=[],g=0;g<c.length;g++){var h=c[g].element.hasAttribute("rowspan")?parseInt(c[g].element.getAttribute("rowspan"),10):1,i=h>1?G(d,g):K(c[g].element);
|
2
|
+
i=i?i:xa,e.push(i)}return e}function M(b,c,d,e,f){function g(b){return a.map(b,function(){return 0})}function h(){var a;if(f)a=[100-l[0]];else{var b=Math.max(e,l[0]+d);a=[b-l[0]]}return a}function i(a,b){var c,f=g(l.slice(0,a)),h=g(l.slice(b+1));if(d>=0){var i=Math.max(e,l[b]-d);c=f.concat([d,i-l[b]]).concat(h)}else{var j=Math.max(e,l[a]+d),k=l[a]-j;c=f.concat([j-l[a],k]).concat(h)}return c}function j(a,b){var c,f=g(l.slice(0,b));if(d>=0)c=f.concat([d]);else{var h=Math.max(e,l[b]+d);c=f.concat([h-l[b]])}return c}var k,l=b.slice(0);return k=0===b.length?[]:1===b.length?h():0===c?i(0,1):c>0&&c<b.length-1?i(c,c+1):c===b.length-1?j(c-1,c):[]}function N(a,b,c){for(var d=0,e=a;e<b;e++)d+=c[e];return d}function O(b,c){var d=b.getAllCells();return a.map(d,function(a){var b=N(a.colIndex,a.colIndex+a.colspan,c);return{element:a.element,width:b,colspan:a.colspan}})}function P(b,c){var d=b.getAllCells();return a.map(d,function(a){var b=N(a.rowIndex,a.rowIndex+a.rowspan,c);return{element:a.element,height:b,rowspan:a.rowspan}})}function Q(b,c){var d=b.getAllRows();return a.map(d,function(a,b){return{element:a.element,height:c[b]}})}function R(a){return za.test(a)}function S(a){return Aa.test(a)}function T(b,c,d){function f(b,c){a.each(b,function(a){e.dom.setStyle(a.element,"width",a.width+c),e.dom.setAttrib(a.element,"width",null)})}function g(){return d<k.grid.maxCols-1?q(b):q(b)+s(b,c)}function h(){return d<k.grid.maxCols-1?p(b,"width"):p(b,"width")+c}function i(a,c,f){d!=k.grid.maxCols-1&&f||(e.dom.setStyle(b,"width",a+c),e.dom.setAttrib(b,"width",null))}for(var j=z(b),k=A(j),l=R(b.width)||R(b.style.width),m=J(k,l,b),n=l?r(b,c):c,o=M(m,d,n,wa,l,b),t=[],u=0;u<o.length;u++)t.push(o[u]+m[u]);var v=O(k,t),w=l?"%":"px",x=l?g():h();e.undoManager.transact(function(){f(v,w),i(x,w,l)})}function U(b,c,d){for(var f=z(b),g=A(f),h=L(g),i=[],j=0,k=0;k<h.length;k++)i.push(k===d?c+h[k]:h[k]),j+=j[k];var l=P(g,i),m=Q(g,i);e.undoManager.transact(function(){a.each(m,function(a){e.dom.setStyle(a.element,"height",a.height+"px"),e.dom.setAttrib(a.element,"height",null)}),a.each(l,function(a){e.dom.setStyle(a.element,"height",a.height+"px"),e.dom.setAttrib(a.element,"height",null)}),e.dom.setStyle(b,"height",j+"px"),e.dom.setAttrib(b,"height",null)})}function V(){ga=setTimeout(function(){Z()},200)}function W(){clearTimeout(ga)}function X(){var a=document.createElement("div");return a.setAttribute("style","margin: 0; padding: 0; position: fixed; left: 0px; top: 0px; height: 100%; width: 100%;"),a.setAttribute("data-mce-bogus","all"),a}function Y(a,b){e.dom.bind(a,"mouseup",function(){Z()}),e.dom.bind(a,"mousemove",function(a){W(),ha&&b(a)}),e.dom.bind(a,"mouseout",function(){V()})}function Z(){if(e.dom.remove(ia),ha){e.dom.removeClass(ja,ya),ha=!1;var a,b;if(_(ja)){var c=parseInt(e.dom.getAttrib(ja,ua),10),f=e.dom.getPos(ja).x;a=parseInt(e.dom.getAttrib(ja,ta),10),b=j()?c-f:f-c,Math.abs(b)>=1&&T(d,b,a)}else if(aa(ja)){var g=parseInt(e.dom.getAttrib(ja,qa),10),h=e.dom.getPos(ja).y;a=parseInt(e.dom.getAttrib(ja,pa),10),b=h-g,Math.abs(b)>=1&&U(d,b,a)}v(d),e.nodeChanged()}}function $(a,b){ia=ia?ia:X(),ha=!0,e.dom.addClass(a,ya),ja=a,Y(ia,b),e.dom.add(l(),ia)}function _(a){return e.dom.hasClass(a,ra)}function aa(a){return e.dom.hasClass(a,na)}function ba(a){ka=ka!==b?ka:a.clientX;var c=a.clientX-ka;ka=a.clientX;var d=e.dom.getPos(ja).x;e.dom.setStyle(ja,"left",d+c+"px")}function ca(a){la=la!==b?la:a.clientY;var c=a.clientY-la;la=a.clientY;var d=e.dom.getPos(ja).y;e.dom.setStyle(ja,"top",d+c+"px")}function da(a){ka=b,$(a,ba)}function ea(a){la=b,$(a,ca)}function fa(a){var b=a.target,c=e.getBody();if(e.$.contains(c,d)||d===c)if(_(b)){a.preventDefault();var f=e.dom.getPos(b).x;e.dom.setAttrib(b,ua,f),da(b)}else if(aa(b)){a.preventDefault();var g=e.dom.getPos(b).y;e.dom.setAttrib(b,qa,g),ea(b)}else u()}var ga,ha,ia,ja,ka,la,ma="mce-resize-bar",na="mce-resize-bar-row",oa="row-resize",pa="data-row",qa="data-initial-top",ra="mce-resize-bar-col",sa="col-resize",ta="data-col",ua="data-initial-left",va=4,wa=10,xa=10,ya="mce-resize-bar-dragging",za=new RegExp(/(\d+(\.\d+)?%)/),Aa=new RegExp(/px|em/);return e.on("init",function(){e.dom.bind(l(),"mousedown",fa)}),e.on("ObjectResized",function(b){var c=b.target;if("TABLE"===c.nodeName){var d=[];a.each(c.rows,function(b){a.each(b.cells,function(a){var b=e.dom.getStyle(a,"width",!0);d.push({cell:a,width:b})})}),a.each(d,function(a){e.dom.setStyle(a.cell,"width",a.width),e.dom.setAttrib(a.cell,"width",null)})}}),e.on("mouseover",function(a){if(!ha){var b=e.dom.getParent(a.target,"table");("TABLE"===a.target.nodeName||b)&&(d=b,v(b))}}),e.on("keydown",function(a){switch(a.keyCode){case c.LEFT:case c.RIGHT:case c.UP:case c.DOWN:u()}}),e.on("remove",function(){u(),e.dom.unbind(l(),"mousedown",fa)}),{adjustWidth:T,adjustHeight:U,clearBars:u,drawBars:F,determineDeltas:M,getTableGrid:A,getTableDetails:z,getWidths:J,getPixelHeights:L,isPercentageBasedSize:R,isPixelBasedSize:S,recalculateWidths:O,recalculateCellHeights:P,recalculateRowHeights:Q}}}),d("tinymce/tableplugin/Plugin",["tinymce/tableplugin/TableGrid","tinymce/tableplugin/Quirks","tinymce/tableplugin/CellSelection","tinymce/tableplugin/Dialogs","tinymce/tableplugin/ResizeBars","tinymce/util/Tools","tinymce/dom/TreeWalker","tinymce/Env","tinymce/PluginManager"],function(a,b,c,d,e,f,g,h,i){function j(f){function g(a){return function(){f.execCommand(a)}}function i(a,b){var c,d,e,g;for(e='<table id="__mce"><tbody>',c=0;c<b;c++){for(e+="<tr>",d=0;d<a;d++)e+="<td>"+(h.ie&&h.ie<10?" ":"<br>")+"</td>";e+="</tr>"}return e+="</tbody></table>",f.undoManager.transact(function(){f.insertContent(e),g=f.dom.get("__mce"),f.dom.setAttrib(g,"id",null),f.$("tr",g).each(function(a,b){f.fire("newrow",{node:b}),f.$("th,td",b).each(function(a,b){f.fire("newcell",{node:b})})}),f.dom.setAttribs(g,f.settings.table_default_attributes||{}),f.dom.setStyles(g,f.settings.table_default_styles||{})}),g}function j(a,b,c){function d(){var d,e,g,h={},i=0;e=f.dom.select("td[data-mce-selected],th[data-mce-selected]"),d=e[0],d||(d=f.selection.getStart()),c&&e.length>0?(k(e,function(a){return h[a.parentNode.parentNode.nodeName]=1}),k(h,function(a){i+=a}),g=1!==i):g=!f.dom.getParent(d,b),a.disabled(g),f.selection.selectorChanged(b,function(b){a.disabled(!b)})}f.initialized?d():f.on("init",d)}function l(){j(this,"table")}function m(){j(this,"td,th")}function n(){j(this,"td,th",!0)}function o(){var a="";a='<table role="grid" class="mce-grid mce-grid-border" aria-readonly="true">';for(var b=0;b<10;b++){a+="<tr>";for(var c=0;c<10;c++)a+='<td role="gridcell" tabindex="-1"><a id="mcegrid'+(10*b+c)+'" href="#" data-mce-x="'+c+'" data-mce-y="'+b+'"></a></td>';a+="</tr>"}return a+="</table>",a+='<div class="mce-text-center" role="presentation">1 x 1</div>'}function p(a,b,c){var d,e,g,h,i,j=c.getEl().getElementsByTagName("table")[0],k=c.isRtl()||"tl-tr"==c.parent().rel;for(j.nextSibling.innerHTML=a+1+" x "+(b+1),k&&(a=9-a),e=0;e<10;e++)for(d=0;d<10;d++)h=j.rows[e].childNodes[d].firstChild,i=(k?d>=a:d<=a)&&e<=b,f.dom.toggleClass(h,"mce-active",i),i&&(g=h);return g.parentNode}function q(){f.addButton("tableprops",{title:"Table properties",onclick:y.tableProps,icon:"table"}),f.addButton("tabledelete",{title:"Delete table",onclick:g("mceTableDelete")}),f.addButton("tablecellprops",{title:"Cell properties",onclick:g("mceTableCellProps")}),f.addButton("tablemergecells",{title:"Merge cells",onclick:g("mceTableMergeCells")}),f.addButton("tablesplitcells",{title:"Split cell",onclick:g("mceTableSplitCells")}),f.addButton("tableinsertrowbefore",{title:"Insert row before",onclick:g("mceTableInsertRowBefore")}),f.addButton("tableinsertrowafter",{title:"Insert row after",onclick:g("mceTableInsertRowAfter")}),f.addButton("tabledeleterow",{title:"Delete row",onclick:g("mceTableDeleteRow")}),f.addButton("tablerowprops",{title:"Row properties",onclick:g("mceTableRowProps")}),f.addButton("tablecutrow",{title:"Cut row",onclick:g("mceTableCutRow")}),f.addButton("tablecopyrow",{title:"Copy row",onclick:g("mceTableCopyRow")}),f.addButton("tablepasterowbefore",{title:"Paste row before",onclick:g("mceTablePasteRowBefore")}),f.addButton("tablepasterowafter",{title:"Paste row after",onclick:g("mceTablePasteRowAfter")}),f.addButton("tableinsertcolbefore",{title:"Insert column before",onclick:g("mceTableInsertColBefore")}),f.addButton("tableinsertcolafter",{title:"Insert column after",onclick:g("mceTableInsertColAfter")}),f.addButton("tabledeletecol",{title:"Delete column",onclick:g("mceTableDeleteCol")})}function r(a){var b=f.dom.is(a,"table")&&f.getBody().contains(a);return b}function s(){var a=f.settings.table_toolbar;""!==a&&a!==!1&&(a||(a="tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol"),f.addContextToolbar(r,a))}function t(){return v}function u(a){v=a}var v,w,x=this,y=new d(f);!f.settings.object_resizing||f.settings.table_resize_bars===!1||f.settings.object_resizing!==!0&&"table"!==f.settings.object_resizing||(w=e(f)),f.settings.table_grid===!1?f.addMenuItem("inserttable",{text:"Table",icon:"table",context:"table",onclick:y.table}):f.addMenuItem("inserttable",{text:"Table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(a){a.aria&&(this.parent().hideAll(),a.stopImmediatePropagation(),y.table())},onshow:function(){p(0,0,this.menu.items()[0])},onhide:function(){var a=this.menu.items()[0].getEl().getElementsByTagName("a");f.dom.removeClass(a,"mce-active"),f.dom.addClass(a[0],"mce-active")},menu:[{type:"container",html:o(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(a){var b,c,d=a.target;"A"==d.tagName.toUpperCase()&&(b=parseInt(d.getAttribute("data-mce-x"),10),c=parseInt(d.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"==this.parent().rel)&&(b=9-b),b===this.lastX&&c===this.lastY||(p(b,c,a.control),this.lastX=b,this.lastY=c))},onclick:function(a){var b=this;"A"==a.target.tagName.toUpperCase()&&(a.preventDefault(),a.stopPropagation(),b.parent().cancel(),f.undoManager.transact(function(){i(b.lastX+1,b.lastY+1)}),f.addVisual())}}]}),f.addMenuItem("tableprops",{text:"Table properties",context:"table",onPostRender:l,onclick:y.tableProps}),f.addMenuItem("deletetable",{text:"Delete table",context:"table",onPostRender:l,cmd:"mceTableDelete"}),f.addMenuItem("cell",{separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:g("mceTableCellProps"),onPostRender:m},{text:"Merge cells",onclick:g("mceTableMergeCells"),onPostRender:n},{text:"Split cell",onclick:g("mceTableSplitCells"),onPostRender:m}]}),f.addMenuItem("row",{text:"Row",context:"table",menu:[{text:"Insert row before",onclick:g("mceTableInsertRowBefore"),onPostRender:m},{text:"Insert row after",onclick:g("mceTableInsertRowAfter"),onPostRender:m},{text:"Delete row",onclick:g("mceTableDeleteRow"),onPostRender:m},{text:"Row properties",onclick:g("mceTableRowProps"),onPostRender:m},{text:"-"},{text:"Cut row",onclick:g("mceTableCutRow"),onPostRender:m},{text:"Copy row",onclick:g("mceTableCopyRow"),onPostRender:m},{text:"Paste row before",onclick:g("mceTablePasteRowBefore"),onPostRender:m},{text:"Paste row after",onclick:g("mceTablePasteRowAfter"),onPostRender:m}]}),f.addMenuItem("column",{text:"Column",context:"table",menu:[{text:"Insert column before",onclick:g("mceTableInsertColBefore"),onPostRender:m},{text:"Insert column after",onclick:g("mceTableInsertColAfter"),onPostRender:m},{text:"Delete column",onclick:g("mceTableDeleteCol"),onPostRender:m}]});var z=[];k("inserttable tableprops deletetable | cell row column".split(" "),function(a){"|"==a?z.push({text:"-"}):z.push(f.menuItems[a])}),f.addButton("table",{type:"menubutton",title:"Table",menu:z}),h.isIE||f.on("click",function(a){a=a.target,"TABLE"===a.nodeName&&(f.selection.select(a),f.nodeChanged())}),x.quirks=new b(f),f.on("Init",function(){x.cellSelection=new c(f,function(a){a&&w&&w.clearBars()}),x.resizeBars=w}),f.on("PreInit",function(){f.serializer.addAttributeFilter("data-mce-cell-padding,data-mce-border,data-mce-border-color",function(a,b){for(var c=a.length;c--;)a[c].attr(b,null)})}),k({mceTableSplitCells:function(a){a.split()},mceTableMergeCells:function(a){var b;b=f.dom.getParent(f.selection.getStart(),"th,td"),f.dom.select("td[data-mce-selected],th[data-mce-selected]").length?a.merge():y.merge(a,b)},mceTableInsertRowBefore:function(a){a.insertRow(!0)},mceTableInsertRowAfter:function(a){a.insertRow()},mceTableInsertColBefore:function(a){a.insertCol(!0)},mceTableInsertColAfter:function(a){a.insertCol()},mceTableDeleteCol:function(a){a.deleteCols()},mceTableDeleteRow:function(a){a.deleteRows()},mceTableCutRow:function(a){v=a.cutRows()},mceTableCopyRow:function(a){v=a.copyRows()},mceTablePasteRowBefore:function(a){a.pasteRows(v,!0)},mceTablePasteRowAfter:function(a){a.pasteRows(v)},mceSplitColsBefore:function(a){a.splitCols(!0)},mceSplitColsAfter:function(a){a.splitCols(!1)},mceTableDelete:function(a){w&&w.clearBars(),a.deleteTable()}},function(b,c){f.addCommand(c,function(){var c=new a(f);c&&(b(c),f.execCommand("mceRepaint"),x.cellSelection.clear())})}),k({mceInsertTable:y.table,mceTableProps:function(){y.table(!0)},mceTableRowProps:y.row,mceTableCellProps:y.cell},function(a,b){f.addCommand(b,function(b,c){a(c)})}),q(),s(),f.settings.table_tab_navigation!==!1&&f.on("keydown",function(b){var c,d,e;9==b.keyCode&&(c=f.dom.getParent(f.selection.getStart(),"th,td"),c&&(b.preventDefault(),d=new a(f),e=b.shiftKey?-1:1,f.undoManager.transact(function(){!d.moveRelIdx(c,e)&&e>0&&(d.insertRow(),d.refresh(),d.moveRelIdx(c,e))})))}),x.insertTable=i,x.setClipboardRows=u,x.getClipboardRows=t}var k=f.each;i.add("table",j)})}(this);
|
@@ -1 +1 @@
|
|
1
|
-
tinymce.PluginManager.add("template",function(a){function b(b){return function(){var c=a.settings.templates;return"function"==typeof c?void c(b):void("string"==typeof c?tinymce.util.XHR.send({url:c,success:function(a){b(tinymce.util.JSON.parse(a))}}):b(c))}}function c(b){function c(b){function c(b){if(
|
1
|
+
tinymce.PluginManager.add("template",function(a){function b(b){return function(){var c=a.settings.templates;return"function"==typeof c?void c(b):void("string"==typeof c?tinymce.util.XHR.send({url:c,success:function(a){b(tinymce.util.JSON.parse(a))}}):b(c))}}function c(b){function c(b){function c(b){if(b.indexOf("<html>")==-1){var c="";tinymce.each(a.contentCSS,function(b){c+='<link type="text/css" rel="stylesheet" href="'+a.documentBaseURI.toAbsolute(b)+'">'});var e=a.settings.body_class||"";e.indexOf("=")!=-1&&(e=a.getParam("body_class","","hash"),e=e[a.id]||""),b="<!DOCTYPE html><html><head>"+c+'</head><body class="'+e+'">'+b+"</body></html>"}b=f(b,"template_preview_replace_values");var g=d.find("iframe")[0].getEl().contentWindow.document;g.open(),g.write(b),g.close()}var g=b.control.value();g.url?tinymce.util.XHR.send({url:g.url,success:function(a){e=a,c(e)}}):(e=g.content,c(e)),d.find("#description")[0].text(b.control.value().description)}var d,e,h=[];if(!b||0===b.length){var i=a.translate("No templates defined.");return void a.notificationManager.open({text:i,type:"info"})}tinymce.each(b,function(a){h.push({selected:!h.length,text:a.title,value:{url:a.url,content:a.content,description:a.description}})}),d=a.windowManager.open({title:"Insert template",layout:"flex",direction:"column",align:"stretch",padding:15,spacing:10,items:[{type:"form",flex:0,padding:0,items:[{type:"container",label:"Templates",items:{type:"listbox",label:"Templates",name:"template",values:h,onselect:c}}]},{type:"label",name:"description",label:"Description",text:"\xa0"},{type:"iframe",flex:1,border:1}],onsubmit:function(){g(!1,e)},minWidth:Math.min(tinymce.DOM.getViewPort().w,a.getParam("template_popup_width",600)),minHeight:Math.min(tinymce.DOM.getViewPort().h,a.getParam("template_popup_height",500))}),d.find("listbox")[0].fire("select")}function d(b,c){function d(a,b){if(a=""+a,a.length<b)for(var c=0;c<b-a.length;c++)a="0"+a;return a}var e="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),f="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),g="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),h="January February March April May June July August September October November December".split(" ");return c=c||new Date,b=b.replace("%D","%m/%d/%Y"),b=b.replace("%r","%I:%M:%S %p"),b=b.replace("%Y",""+c.getFullYear()),b=b.replace("%y",""+c.getYear()),b=b.replace("%m",d(c.getMonth()+1,2)),b=b.replace("%d",d(c.getDate(),2)),b=b.replace("%H",""+d(c.getHours(),2)),b=b.replace("%M",""+d(c.getMinutes(),2)),b=b.replace("%S",""+d(c.getSeconds(),2)),b=b.replace("%I",""+((c.getHours()+11)%12+1)),b=b.replace("%p",""+(c.getHours()<12?"AM":"PM")),b=b.replace("%B",""+a.translate(h[c.getMonth()])),b=b.replace("%b",""+a.translate(g[c.getMonth()])),b=b.replace("%A",""+a.translate(f[c.getDay()])),b=b.replace("%a",""+a.translate(e[c.getDay()])),b=b.replace("%%","%")}function e(b){var c=a.dom,d=a.getParam("template_replace_values");h(c.select("*",b),function(a){h(d,function(b,e){c.hasClass(a,e)&&"function"==typeof d[e]&&d[e](a)})})}function f(b,c){return h(a.getParam(c),function(a,c){"function"==typeof a&&(a=a(c)),b=b.replace(new RegExp("\\{\\$"+c+"\\}","g"),a)}),b}function g(b,c){function g(a,b){return new RegExp("\\b"+b+"\\b","g").test(a.className)}var i,j,k=a.dom,l=a.selection.getContent();c=f(c,"template_replace_values"),i=k.create("div",null,c),j=k.select(".mceTmpl",i),j&&j.length>0&&(i=k.create("div",null),i.appendChild(j[0].cloneNode(!0))),h(k.select("*",i),function(b){g(b,a.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(b.innerHTML=d(a.getParam("template_cdate_format",a.getLang("template.cdate_format")))),g(b,a.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(b.innerHTML=d(a.getParam("template_mdate_format",a.getLang("template.mdate_format")))),g(b,a.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(b.innerHTML=l)}),e(i),a.execCommand("mceInsertContent",!1,i.innerHTML),a.addVisual()}var h=tinymce.each;a.addCommand("mceInsertTemplate",g),a.addButton("template",{title:"Insert template",onclick:b(c)}),a.addMenuItem("template",{text:"Template",onclick:b(c),context:"insert"}),a.on("PreProcess",function(b){var c=a.dom;h(c.select("div",b.node),function(b){c.hasClass(b,"mceTmpl")&&(h(c.select("*",b),function(b){c.hasClass(b,a.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(b.innerHTML=d(a.getParam("template_mdate_format",a.getLang("template.mdate_format"))))}),e(b))})})});
|
@@ -1 +1 @@
|
|
1
|
-
tinymce.PluginManager.add("textpattern",function(a){function b(){return j&&(i.sort(function(a,b){return a.start.length>b.start.length?-1:a.start.length<b.start.length?1:0}),j=!1),i}function c(a){for(var c=b(),d=0;d<c.length;d++)if(0===a.indexOf(c[d].start)&&(!c[d].end||a.lastIndexOf(c[d].end)==a.length-c[d].end.length))return c[d]}function d(a,c,d){var e,f,g;for(e=b(),g=0;g<e.length;g++)if(f=e[g],f.end&&a.substr(c-f.end.length-d,f.end.length)==f.end)return f}function e(b){function e(){i=i.splitText(k),i.splitText(j-k-o),i.deleteData(0,n.start.length),i.deleteData(i.data.length-n.end.length,n.end.length)}var f,g,h,i,j,k,l,m,n,o,p;
|
1
|
+
tinymce.PluginManager.add("textpattern",function(a){function b(){return j&&(i.sort(function(a,b){return a.start.length>b.start.length?-1:a.start.length<b.start.length?1:0}),j=!1),i}function c(a){for(var c=b(),d=0;d<c.length;d++)if(0===a.indexOf(c[d].start)&&(!c[d].end||a.lastIndexOf(c[d].end)==a.length-c[d].end.length))return c[d]}function d(a,c,d){var e,f,g;for(e=b(),g=0;g<e.length;g++)if(f=e[g],f.end&&a.substr(c-f.end.length-d,f.end.length)==f.end)return f}function e(b){function e(){i=i.splitText(k),i.splitText(j-k-o),i.deleteData(0,n.start.length),i.deleteData(i.data.length-n.end.length,n.end.length)}var f,g,h,i,j,k,l,m,n,o,p;if(f=a.selection,g=a.dom,f.isCollapsed()&&(h=f.getRng(!0),i=h.startContainer,j=h.startOffset,l=i.data,o=b?1:0,3==i.nodeType&&(n=d(l,j,o),n&&(k=Math.max(0,j-o),k=l.lastIndexOf(n.start,k-n.end.length-1),k!==-1&&(m=g.createRng(),m.setStart(i,k),m.setEnd(i,j-o),n=c(m.toString()),n&&n.end&&!(i.data.length<=n.start.length+n.end.length))))))return p=a.formatter.get(n.format),p&&p[0].inline?(e(),a.formatter.apply(n.format,{},i),i):void 0}function f(){var b,d,e,f,g,h,i,j,k,l,m;if(b=a.selection,d=a.dom,b.isCollapsed()&&(i=d.getParent(b.getStart(),"p"))){for(k=new tinymce.dom.TreeWalker(i,i);g=k.next();)if(3==g.nodeType){f=g;break}if(f){if(j=c(f.data),!j)return;if(l=b.getRng(!0),e=l.startContainer,m=l.startOffset,f==e&&(m=Math.max(0,m-j.start.length)),tinymce.trim(f.data).length==j.start.length)return;j.format&&(h=a.formatter.get(j.format),h&&h[0].block&&(f.deleteData(0,j.start.length),a.formatter.apply(j.format,{},f),l.setStart(e,m),l.collapse(!0),b.setRng(l))),j.cmd&&a.undoManager.transact(function(){f.deleteData(0,j.start.length),a.execCommand(j.cmd)})}}}function g(){var b,c;c=e(),c&&(b=a.dom.createRng(),b.setStart(c,c.data.length),b.setEnd(c,c.data.length),a.selection.setRng(b)),f()}function h(){var b,c,d,f,g;b=e(!0),b&&(g=a.dom,c=b.data.slice(-1),/[\u00a0 ]/.test(c)&&(b.deleteData(b.data.length-1,1),d=g.doc.createTextNode(c),b.nextSibling?g.insertAfter(d,b.nextSibling):b.parentNode.appendChild(d),f=g.createRng(),f.setStart(d,1),f.setEnd(d,1),a.selection.setRng(f)))}var i,j=!0;i=a.settings.textpattern_patterns||[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}],a.on("keydown",function(a){13!=a.keyCode||tinymce.util.VK.modifierPressed(a)||g()},!0),a.on("keyup",function(a){32!=a.keyCode||tinymce.util.VK.modifierPressed(a)||h()}),this.getPatterns=b,this.setPatterns=function(a){i=a,j=!0}});
|
@@ -0,0 +1 @@
|
|
1
|
+
tinymce.PluginManager.add("toc",function(a){function b(b){return a.schema.isValidChild("div",b)}function c(b){return b&&a.dom.is(b,"."+l.className)&&a.getBody().contains(b)}function d(){var b=this;b.disabled(a.readonly||!f()),a.on("LoadContent SetContent change",function(){b.disabled(a.readonly||!f())})}function e(a){var b,c=[];for(b=1;b<=a;b++)c.push("h"+b);return c.join(",")}function f(){return!(!l||!g(l).length)}function g(b){var c=e(b.depth),d=m(c);return d.length&&/^h[1-9]$/i.test(b.headerTag)&&(d=d.filter(function(c,d){return!a.dom.hasClass(d.parentNode,b.className)})),tinymce.map(d,function(a){return a.id||(a.id=p()),{id:a.id,level:parseInt(a.nodeName.replace(/^H/i,""),10),title:m.text(a)}})}function h(a){var b,c=9;for(b=0;b<a.length;b++)if(a[b].level<c&&(c=a[b].level),1==c)return c;return c}function i(b,c){var d="<"+b+' contenteditable="true">',e="</"+b+">";return d+a.dom.encode(c)+e}function j(a){var b=k(a);return'<div class="'+a.className+'" contenteditable="false">'+b+"</div>"}function k(a){var b,c,d,e,f="",j=g(a),k=h(j)-1;if(!j.length)return"";for(f+=i(a.headerTag,tinymce.translate("Table of Contents")),b=0;b<j.length;b++){if(d=j[b],e=j[b+1]&&j[b+1].level,k===d.level)f+="<li>";else for(c=k;c<d.level;c++)f+="<ul><li>";if(f+='<a href="#'+d.id+'">'+d.title+"</a>",e!==d.level&&e)for(c=d.level;c>e;c--)f+="</li></ul><li>";else f+="</li>",e||(f+="</ul>");k=d.level}return f}var l,m=a.$,n={depth:3,headerTag:"h2",className:"mce-toc"},o=function(a){var b=0;return function(){var c=(new Date).getTime().toString(32);return a+c+(b++).toString(32)}},p=o("mcetoc_");a.on("PreInit",function(){var c=a.settings,d=parseInt(c.toc_depth,10)||0;l={depth:d>=1&&d<=9?d:n.depth,headerTag:b(c.toc_header)?c.toc_header:n.headerTag,className:c.toc_class?a.dom.encode(c.toc_class):n.className}}),a.on("PreProcess",function(a){var b=m("."+l.className,a.node);b.length&&(b.removeAttr("contentEditable"),b.find("[contenteditable]").removeAttr("contentEditable"))}),a.on("SetContent",function(){var a=m("."+l.className);a.length&&(a.attr("contentEditable",!1),a.children(":first-child").attr("contentEditable",!0))}),a.addCommand("mceInsertToc",function(){m("."+l.className).length?a.execCommand("mceUpdateToc"):a.insertContent(j(l))}),a.addCommand("mceUpdateToc",function(){var b=m("."+l.className);b.length&&a.undoManager.transact(function(){b.html(k(l))})}),a.addButton("toc",{tooltip:"Table of Contents",cmd:"mceInsertToc",icon:"toc",onPostRender:d}),a.addButton("tocupdate",{tooltip:"Update",cmd:"mceUpdateToc",icon:"reload"}),a.addContextToolbar(c,"tocupdate"),a.addMenuItem("toc",{text:"Table of Contents",context:"insert",cmd:"mceInsertToc",onPostRender:d})});
|
@@ -1 +1 @@
|
|
1
|
-
tinymce.PluginManager.add("visualchars",function(a){function b(b){function c(a){return'<span data-mce-bogus="1" class="mce-'+n[a]+'">'+a+"</span>"}function f(){var a,b="";for(a in n)b+=a;return new RegExp("["+b+"]","g")}function g(){var a,b="";for(a in n)b&&(b+=","),b+="span.mce-"+n[a];return b}var h,i,j,k,l,m,n,o,p=a.getBody(),q=a.selection;if(n={"\xa0":"nbsp","\xad":"shy"},d=!d,e.state=d,a.fire("VisualChars",{state:d}),o=f(),b&&(m=q.getBookmark()),d)for(i=[],tinymce.walk(p,function(a){3==a.nodeType&&a.nodeValue&&o.test(a.nodeValue)&&i.push(a)},"childNodes"),j=0;j<i.length;j++){for(k=i[j].nodeValue,k=k.replace(o,c),l=a.dom.create("div",null,k);h=l.lastChild;)a.dom.insertAfter(h,i[j]);a.dom.remove(i[j])}else for(i=a.dom.select(g(),p),j=i.length-1;j>=0;j--)a.dom.remove(i[j],1);q.moveToBookmark(m)}function c(){var b=this;a.on("VisualChars",function(a){b.active(a.state)})}var d,e=this;a.addCommand("mceVisualChars",b),a.addButton("visualchars",{title:"Show invisible characters",cmd:"mceVisualChars",onPostRender:c}),a.addMenuItem("visualchars",{text:"Show invisible characters",cmd:"mceVisualChars",onPostRender:c,selectable:!0,context:"view",prependToContext:!0})
|
1
|
+
tinymce.PluginManager.add("visualchars",function(a){function b(b){function c(a){return'<span data-mce-bogus="1" class="mce-'+n[a]+'">'+a+"</span>"}function f(){var a,b="";for(a in n)b+=a;return new RegExp("["+b+"]","g")}function g(){var a,b="";for(a in n)b&&(b+=","),b+="span.mce-"+n[a];return b}var h,i,j,k,l,m,n,o,p=a.getBody(),q=a.selection;if(n={"\xa0":"nbsp","\xad":"shy"},d=!d,e.state=d,a.fire("VisualChars",{state:d}),o=f(),b&&(m=q.getBookmark()),d)for(i=[],tinymce.walk(p,function(a){3==a.nodeType&&a.nodeValue&&o.test(a.nodeValue)&&i.push(a)},"childNodes"),j=0;j<i.length;j++){for(k=i[j].nodeValue,k=k.replace(o,c),l=a.dom.create("div",null,k);h=l.lastChild;)a.dom.insertAfter(h,i[j]);a.dom.remove(i[j])}else for(i=a.dom.select(g(),p),j=i.length-1;j>=0;j--)a.dom.remove(i[j],1);q.moveToBookmark(m)}function c(){var b=this;a.on("VisualChars",function(a){b.active(a.state)})}var d,e=this;a.addCommand("mceVisualChars",b),a.addButton("visualchars",{title:"Show invisible characters",cmd:"mceVisualChars",onPostRender:c}),a.addMenuItem("visualchars",{text:"Show invisible characters",cmd:"mceVisualChars",onPostRender:c,selectable:!0,context:"view",prependToContext:!0})});
|
@@ -1 +1 @@
|
|
1
|
-
tinymce.PluginManager.add("wordcount",function(a){function b(){a.theme.panel.find("#wordcount").text(["Words: {0}",e.getCount()])}var c,d,e=this;c=a.getParam("wordcount_countregex",/[\w\u2019\x27\-\u00C0-\u1FFF]+/g),d=a.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\x27\x22_+=\\\/\-]*/g),a.on("init",function(){var c=a.theme.panel&&a.theme.panel.find("#statusbar")[0];c&&tinymce.util.Delay.setEditorTimeout(a,function(){c.insert({type:"label",name:"wordcount",text:["Words: {0}",e.getCount()],classes:"wordcount",disabled:a.settings.readonly},0),a.on("setcontent beforeaddundo",b),a.on("keyup",function(a){32==a.keyCode&&b()})},0)}),e.getCount=function(){var b=a.getContent({format:"raw"}),e=0;if(b){b=b.replace(/\.\.\./g," "),b=b.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," "),b=b.replace(/(\w+)(&#?[a-z0-9]+;)+(\w+)/i,"$1$3").replace(/&.+?;/g," "),b=b.replace(d,"");var f=b.match(c);f&&(e=f.length)}return e}});
|
1
|
+
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("1",tinymce.PluginManager),h("2",tinymce.util.Delay),g("4",[],function(){var a={aletter:"[A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f3\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u10a0-\u10c5\u10d0-\u10fa\u10fc\u1100-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1a00-\u1a16\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bc0-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u24b6-\u24e9\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2d00-\u2d25\u2d30-\u2d65\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005\u303b\u303c\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790\ua791\ua7a0-\ua7a9\ua7fa-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]",midnumlet:"['\\.\u2018\u2019\u2024\ufe52\uff07\uff0e]",midletter:"[:\xb7\xb7\u05f4\u2027\ufe13\ufe55\uff1a]",midnum:"[,;;\u0589\u060c\u060d\u066c\u07f8\u2044\ufe10\ufe14\ufe50\ufe54\uff0c\uff1b]",numeric:"[0-9\u0660-\u0669\u066b\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9]",cr:"\\r",lf:"\\n",newline:"[\v\f\x85\u2028\u2029]",extend:"[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f\u109a-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b6-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u192b\u1930-\u193b\u19b0-\u19c0\u19c8\u19c9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f\u1b00-\u1b04\u1b34-\u1b44\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1baa\u1be6-\u1bf3\u1c24-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe3-\uabea\uabec\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]",format:"[\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200e\u200f\u202a-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb]",katakana:"[\u3031-\u3035\u309b\u309c\u30a0-\u30fa\u30fc-\u30ff\u31f0-\u31ff\u32d0-\u32fe\u3300-\u3357\uff66-\uff9d]",extendnumlet:"[_\u203f\u2040\u2054\ufe33\ufe34\ufe4d-\ufe4f\uff3f]",punctuation:"[!-#%-*,-\\/:;?@\\[-\\]_{}\xa1\xab\xb7\xbb\xbf;\xb7\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1361-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u3008\u3009\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30\u2e31\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]"},b={ALETTER:0,MIDNUMLET:1,MIDLETTER:2,MIDNUM:3,NUMERIC:4,CR:5,LF:6,NEWLINE:7,EXTEND:8,FORMAT:9,KATAKANA:10,EXTENDNUMLET:11,OTHER:12},c=[new RegExp(a.aletter),new RegExp(a.midnumlet),new RegExp(a.midletter),new RegExp(a.midnum),new RegExp(a.numeric),new RegExp(a.cr),new RegExp(a.lf),new RegExp(a.newline),new RegExp(a.extend),new RegExp(a.format),new RegExp(a.katakana),new RegExp(a.extendnumlet)],d="",e=new RegExp("^"+a.punctuation+"$"),f=/\s/;return{characterIndices:b,SETS:c,EMPTY_STRING:d,PUNCTUATION:e,WHITESPACE:f}}),g("7",[],function(){var a=function(a,b,c){var d,e;if(!a)return 0;if(c=c||a,void 0!==a.length){for(d=0,e=a.length;d<e;d++)if(b.call(c,a[d],d,a)===!1)return 0}else for(d in a)if(a.hasOwnProperty(d)&&b.call(c,a[d],d,a)===!1)return 0;return 1},b=function(b,c){var d=[];return a(b,function(a,e){d.push(c(a,e,b))}),d};return{each:a,map:b}}),g("5",["4","7"],function(a,b){var c=a.SETS,d=a.characterIndices.OTHER,e=function(a){var b,e,f=d,g=c.length;for(b=0;b<g;++b)if(e=c[b],e&&e.test(a)){f=b;break}return f},f=function(a){var b={};return function(c){if(b[c])return b[c];var d=a(c);return b[c]=d,d}},g=function(a){var c=f(e);return b.map(a.split(""),c)};return{classify:g}}),g("6",["4"],function(a){var b=a.characterIndices,c=function(a,c){var d,e,f=a[c],g=a[c+1];return!(c<0||c>a.length-1&&0!==c)&&((f!==b.ALETTER||g!==b.ALETTER)&&(e=a[c+2],(f!==b.ALETTER||g!==b.MIDLETTER&&g!==b.MIDNUMLET||e!==b.ALETTER)&&(d=a[c-1],(f!==b.MIDLETTER&&f!==b.MIDNUMLET||g!==b.ALETTER||d!==b.ALETTER)&&((f!==b.NUMERIC&&f!==b.ALETTER||g!==b.NUMERIC&&g!==b.ALETTER)&&((f!==b.MIDNUM&&f!==b.MIDNUMLET||g!==b.NUMERIC||d!==b.NUMERIC)&&((f!==b.NUMERIC||g!==b.MIDNUM&&g!==b.MIDNUMLET||e!==b.NUMERIC)&&(f!==b.EXTEND&&f!==b.FORMAT&&d!==b.EXTEND&&d!==b.FORMAT&&g!==b.EXTEND&&g!==b.FORMAT&&((f!==b.CR||g!==b.LF)&&(f===b.NEWLINE||f===b.CR||f===b.LF||(g===b.NEWLINE||g===b.CR||g===b.LF||(f!==b.KATAKANA||g!==b.KATAKANA)&&((g!==b.EXTENDNUMLET||f!==b.ALETTER&&f!==b.NUMERIC&&f!==b.KATAKANA&&f!==b.EXTENDNUMLET)&&(f!==b.EXTENDNUMLET||g!==b.ALETTER&&g!==b.NUMERIC&&g!==b.KATAKANA))))))))))))};return{isWordBoundary:c}}),g("3",["4","5","6"],function(a,b,c){var d=a.EMPTY_STRING,e=a.WHITESPACE,f=a.PUNCTUATION,g=function(a,g){var h,i,j,k=0,l=b.classify(a),m=l.length,n=[],o=[];for(g||(g={}),g.ignoreCase&&(a=a.toLowerCase()),i=g.includePunctuation,j=g.includeWhitespace;k<m;++k)h=a.charAt(k),n.push(h),c.isWordBoundary(l,k)&&(n=n.join(d),!n||!j&&e.test(n)||!i&&f.test(n)||o.push(n),n=[]);return o};return{getWords:g}}),g("0",["1","2","3"],function(a,b,c){return a.add("wordcount",function(a){var d=function(a){return a.removed?"":a.getBody().innerText},e=function(){return c.getWords(d(a)).length},f=function(){a.theme.panel.find("#wordcount").text(["Words: {0}",e()])};return a.on("init",function(){var c=a.theme.panel&&a.theme.panel.find("#statusbar")[0],d=b.debounce(f,300);c&&tinymce.util.Delay.setEditorTimeout(a,function(){c.insert({type:"label",name:"wordcount",text:["Words: {0}",e()],classes:"wordcount",disabled:a.settings.readonly},0),a.on("setcontent beforeaddundo undo redo keyup",d)},0)}),{getCount:e}}),function(){}}),d("0")()}();
|
@@ -0,0 +1,17 @@
|
|
1
|
+
// AbsoluteLayout
|
2
|
+
|
3
|
+
.@{prefix}-abs-layout {
|
4
|
+
position: relative;
|
5
|
+
}
|
6
|
+
|
7
|
+
body .@{prefix}-abs-layout-item, .@{prefix}-abs-end {
|
8
|
+
position: absolute;
|
9
|
+
}
|
10
|
+
|
11
|
+
.@{prefix}-abs-end {
|
12
|
+
width: 1px; height: 1px;
|
13
|
+
}
|
14
|
+
|
15
|
+
.@{prefix}-container-body.@{prefix}-abs-layout {
|
16
|
+
overflow: hidden;
|
17
|
+
}
|
@@ -0,0 +1,115 @@
|
|
1
|
+
// Arrows
|
2
|
+
|
3
|
+
.@{prefix}-arrow-up {
|
4
|
+
margin-top: 12px;
|
5
|
+
}
|
6
|
+
|
7
|
+
.@{prefix}-arrow-down {
|
8
|
+
margin-top: -12px;
|
9
|
+
}
|
10
|
+
|
11
|
+
.@{prefix}-arrow:before,
|
12
|
+
.@{prefix}-arrow:after {
|
13
|
+
position: absolute;
|
14
|
+
left: 50%;
|
15
|
+
display: block;
|
16
|
+
width: 0;
|
17
|
+
height: 0;
|
18
|
+
border-style: solid;
|
19
|
+
border-color: transparent;
|
20
|
+
content: "";
|
21
|
+
}
|
22
|
+
|
23
|
+
.@{prefix}-arrow.@{prefix}-arrow-up:before {
|
24
|
+
top: -9px;
|
25
|
+
border-bottom-color: @panel-border;
|
26
|
+
border-width: 0 9px 9px;
|
27
|
+
margin-left: -9px;
|
28
|
+
}
|
29
|
+
|
30
|
+
.@{prefix}-arrow.@{prefix}-arrow-down:before {
|
31
|
+
bottom: -9px;
|
32
|
+
border-top-color: @panel-border;
|
33
|
+
border-width: 9px 9px 0;
|
34
|
+
margin-left: -9px;
|
35
|
+
}
|
36
|
+
|
37
|
+
.@{prefix}-arrow.@{prefix}-arrow-up:after {
|
38
|
+
top: -8px;
|
39
|
+
border-bottom-color: mix(@panel-bg, @panel-bg-hlight, 60%);
|
40
|
+
border-width: 0 8px 8px;
|
41
|
+
margin-left: -8px;
|
42
|
+
}
|
43
|
+
|
44
|
+
.@{prefix}-arrow.@{prefix}-arrow-down:after {
|
45
|
+
bottom: -8px;
|
46
|
+
border-top-color: mix(@panel-bg, @panel-bg-hlight, 60%);
|
47
|
+
border-width: 8px 8px 0;
|
48
|
+
margin-left: -8px;
|
49
|
+
}
|
50
|
+
|
51
|
+
.@{prefix}-arrow.@{prefix}-arrow-left:before,
|
52
|
+
.@{prefix}-arrow.@{prefix}-arrow-left:after {
|
53
|
+
margin: 0;
|
54
|
+
}
|
55
|
+
|
56
|
+
.@{prefix}-arrow.@{prefix}-arrow-left:before {
|
57
|
+
left: 8px;
|
58
|
+
}
|
59
|
+
.@{prefix}-arrow.@{prefix}-arrow-left:after {
|
60
|
+
left: 9px;
|
61
|
+
}
|
62
|
+
|
63
|
+
.@{prefix}-arrow.@{prefix}-arrow-right:before,
|
64
|
+
.@{prefix}-arrow.@{prefix}-arrow-right:after {
|
65
|
+
left: auto;
|
66
|
+
margin: 0;
|
67
|
+
}
|
68
|
+
|
69
|
+
.@{prefix}-arrow.@{prefix}-arrow-right:before {
|
70
|
+
right: 8px;
|
71
|
+
}
|
72
|
+
|
73
|
+
.@{prefix}-arrow.@{prefix}-arrow-right:after {
|
74
|
+
right: 9px;
|
75
|
+
}
|
76
|
+
|
77
|
+
.@{prefix}-arrow.@{prefix}-arrow-center.@{prefix}-arrow.@{prefix}-arrow-left:before {
|
78
|
+
left: -9px;
|
79
|
+
top: 50%;
|
80
|
+
border-right-color: @panel-border;
|
81
|
+
border-width: 9px 9px 9px 0;
|
82
|
+
margin-top: -9px;
|
83
|
+
}
|
84
|
+
|
85
|
+
.@{prefix}-arrow.@{prefix}-arrow-center.@{prefix}-arrow.@{prefix}-arrow-left:after {
|
86
|
+
left: -8px;
|
87
|
+
top: 50%;
|
88
|
+
border-right-color: mix(@panel-bg, @panel-bg-hlight, 60%);
|
89
|
+
border-width: 8px 8px 8px 0;
|
90
|
+
margin-top: -8px;
|
91
|
+
}
|
92
|
+
|
93
|
+
.@{prefix}-arrow.@{prefix}-arrow-center.@{prefix}-arrow.@{prefix}-arrow-left {
|
94
|
+
margin-left: 12px;
|
95
|
+
}
|
96
|
+
|
97
|
+
.@{prefix}-arrow.@{prefix}-arrow-center.@{prefix}-arrow.@{prefix}-arrow-right:before {
|
98
|
+
right: -9px;
|
99
|
+
top: 50%;
|
100
|
+
border-left-color: @panel-border;
|
101
|
+
border-width: 9px 0 9px 9px;
|
102
|
+
margin-top: -9px;
|
103
|
+
}
|
104
|
+
|
105
|
+
.@{prefix}-arrow.@{prefix}-arrow-center.@{prefix}-arrow.@{prefix}-arrow-right:after {
|
106
|
+
right: -8px;
|
107
|
+
top: 50%;
|
108
|
+
border-left-color: mix(@panel-bg, @panel-bg-hlight, 60%);
|
109
|
+
border-width: 8px 0 8px 8px;
|
110
|
+
margin-top: -8px;
|
111
|
+
}
|
112
|
+
|
113
|
+
.@{prefix}-arrow.@{prefix}-arrow-center.@{prefix}-arrow.@{prefix}-arrow-right {
|
114
|
+
margin-left: -14px;
|
115
|
+
}
|
@@ -0,0 +1,175 @@
|
|
1
|
+
// Button
|
2
|
+
|
3
|
+
.@{prefix}-btn {
|
4
|
+
border: 1px solid mix(rgb(red(@btn-border-right), green(@btn-border-right), blue(@btn-border-right)), @panel-bg, 30%);
|
5
|
+
border-color: @btn-border-top @btn-border-right @btn-border-bottom @btn-border-left;
|
6
|
+
position: relative;
|
7
|
+
text-shadow: @text-shadow;
|
8
|
+
|
9
|
+
.inline-block();
|
10
|
+
.border-radius(3px);
|
11
|
+
.box-shadow(@btn-box-shadow);
|
12
|
+
.vertical-gradient(@btn-bg, @btn-bg-hlight);
|
13
|
+
|
14
|
+
&:hover, &:focus {
|
15
|
+
color: @btn-text;
|
16
|
+
.vertical-gradient(darken(@btn-bg, 5%), darken(@btn-bg-hlight, 5%));
|
17
|
+
border-color: @btn-border-hover;
|
18
|
+
}
|
19
|
+
|
20
|
+
&.@{prefix}-disabled button, &.@{prefix}-disabled:hover button {
|
21
|
+
cursor: default;
|
22
|
+
.box-shadow(none);
|
23
|
+
.opacity(@btn-box-disabled-opacity);
|
24
|
+
}
|
25
|
+
|
26
|
+
&.@{prefix}-active, &.@{prefix}-active:hover {
|
27
|
+
.vertical-gradient(darken(@btn-bg, 10%), darken(@btn-bg-hlight, 5%));
|
28
|
+
.box-shadow(@btn-box-shadow-active);
|
29
|
+
border-color: darken(@btn-bg, 20%);
|
30
|
+
}
|
31
|
+
|
32
|
+
&:active {
|
33
|
+
.vertical-gradient(darken(@btn-bg, 7%), darken(@btn-bg-hlight, 5%));
|
34
|
+
.box-shadow(@btn-box-shadow-active);
|
35
|
+
border-color: @btn-border-active;
|
36
|
+
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
.@{prefix}-btn button {
|
41
|
+
padding: @btn-padding;
|
42
|
+
font-size: @font-size;
|
43
|
+
line-height: @line-height;
|
44
|
+
*line-height: @line-height - 4px;
|
45
|
+
cursor: pointer;
|
46
|
+
color: @btn-text;
|
47
|
+
text-align: center;
|
48
|
+
|
49
|
+
// Fixes for default inner padding of button
|
50
|
+
overflow: visible; // IE7
|
51
|
+
-webkit-appearance: none; // WebKit
|
52
|
+
&::-moz-focus-inner { // Gecko
|
53
|
+
border: 0;
|
54
|
+
padding: 0;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
.@{prefix}-btn i {
|
59
|
+
text-shadow: 1px 1px @btn-text-shadow;
|
60
|
+
}
|
61
|
+
|
62
|
+
.@{prefix}-primary.@{prefix}-btn-has-text {
|
63
|
+
min-width: 50px;
|
64
|
+
}
|
65
|
+
|
66
|
+
.@{prefix}-primary {
|
67
|
+
color: @btn-primary-text;
|
68
|
+
border: 1px solid transparent;
|
69
|
+
border-color: @btn-primary-border;
|
70
|
+
.vertical-gradient(@btn-primary-bg, @btn-primary-bg-hlight);
|
71
|
+
|
72
|
+
&:hover, &:focus {
|
73
|
+
.vertical-gradient(darken(@btn-primary-bg, 5%), darken(@btn-primary-bg-hlight, 5%));
|
74
|
+
border-color: @btn-primary-border-hover;
|
75
|
+
}
|
76
|
+
|
77
|
+
&.@{prefix}-disabled button, &.@{prefix}-disabled:hover button {
|
78
|
+
cursor: default;
|
79
|
+
.box-shadow(none);
|
80
|
+
.opacity(@btn-box-disabled-opacity);
|
81
|
+
}
|
82
|
+
|
83
|
+
&.@{prefix}-active, &.@{prefix}-active:hover, &:not(.@{prefix}-disabled):active {
|
84
|
+
.vertical-gradient(darken(@btn-primary-bg, 10%), darken(@btn-primary-bg-hlight, 10%));
|
85
|
+
.box-shadow(@btn-box-shadow-active);
|
86
|
+
}
|
87
|
+
}
|
88
|
+
|
89
|
+
.@{prefix}-primary button, .@{prefix}-primary button i {
|
90
|
+
color: @btn-primary-text;
|
91
|
+
text-shadow: 1px 1px @btn-primary-text-shadow;
|
92
|
+
}
|
93
|
+
|
94
|
+
.@{prefix}-btn .@{prefix}-txt {
|
95
|
+
font-size: inherit;
|
96
|
+
line-height: inherit;
|
97
|
+
color: inherit;
|
98
|
+
}
|
99
|
+
|
100
|
+
.@{prefix}-btn-large button {
|
101
|
+
padding: 9px 14px;
|
102
|
+
font-size: @font-size + 2px;
|
103
|
+
line-height: normal;
|
104
|
+
.border-radius(5px);
|
105
|
+
}
|
106
|
+
|
107
|
+
.@{prefix}-btn-large i {
|
108
|
+
margin-top: 2px;
|
109
|
+
}
|
110
|
+
|
111
|
+
.@{prefix}-btn-small button {
|
112
|
+
padding: 1px 5px;
|
113
|
+
font-size: @font-size - 2px;
|
114
|
+
*padding-bottom: 2px;
|
115
|
+
}
|
116
|
+
|
117
|
+
.@{prefix}-btn-small i {
|
118
|
+
line-height: 20px;
|
119
|
+
vertical-align: top;
|
120
|
+
*line-height: 18px;
|
121
|
+
}
|
122
|
+
|
123
|
+
.@{prefix}-btn .@{prefix}-caret {
|
124
|
+
margin-top: 8px;
|
125
|
+
margin-left: 0;
|
126
|
+
}
|
127
|
+
|
128
|
+
.@{prefix}-btn-small .@{prefix}-caret {
|
129
|
+
margin-top: 8px;
|
130
|
+
margin-left: 0;
|
131
|
+
}
|
132
|
+
|
133
|
+
.@{prefix}-caret {
|
134
|
+
.inline-block();
|
135
|
+
width: 0; height: 0;
|
136
|
+
vertical-align: top;
|
137
|
+
border-top: 4px solid @btn-caret-border;
|
138
|
+
border-right: 4px solid transparent;
|
139
|
+
border-left: 4px solid transparent;
|
140
|
+
content: "";
|
141
|
+
}
|
142
|
+
|
143
|
+
.@{prefix}-disabled .@{prefix}-caret {
|
144
|
+
border-top-color: @text-disabled;
|
145
|
+
}
|
146
|
+
|
147
|
+
.@{prefix}-caret.@{prefix}-up {
|
148
|
+
border-bottom: 4px solid @btn-caret-border;
|
149
|
+
border-top: 0;
|
150
|
+
}
|
151
|
+
|
152
|
+
.@{prefix}-btn-flat {
|
153
|
+
border: 0;
|
154
|
+
background: transparent;
|
155
|
+
.border-radius(0);
|
156
|
+
.box-shadow(none);
|
157
|
+
filter: none;
|
158
|
+
}
|
159
|
+
|
160
|
+
.@{prefix}-btn-flat:hover, .@{prefix}-btn-flat.@{prefix}-active, .@{prefix}-btn-flat:focus, .@{prefix}-btn-flat:active {
|
161
|
+
border: 0;
|
162
|
+
background: @menubar-bg-active;
|
163
|
+
filter: none;
|
164
|
+
.box-shadow(none);
|
165
|
+
}
|
166
|
+
|
167
|
+
.@{prefix}-btn-has-text .@{prefix}-ico {
|
168
|
+
padding-right: 5px;
|
169
|
+
}
|
170
|
+
|
171
|
+
// RTL
|
172
|
+
|
173
|
+
.@{prefix}-rtl .@{prefix}-btn button {
|
174
|
+
direction: rtl;
|
175
|
+
}
|