!function(e,t){"use strict";functionn(e,t){for(varn,r=[],i=0;i<e.length;++i){if(n=c[e[i]]||o(e[i]),!n)throw"module definition dependecy not found: "+e[i];r.push(n)}t.apply(null,r)}functionr(e,r,o){if("string"!=typeofe)throw"invalid module definition, module id must be defined and be a string";if(r===t)throw"invalid module definition, dependencies must be specified";if(o===t)throw"invalid module definition, definition function must be specified";n(r,function(){c[e]=o.apply(null,arguments)})}functiono(t){for(varn=e,r=t.split(/[.\/]/),o=0;o<r.length;++o){if(!n[r[o]])return;n=n[r[o]]}returnn}functioni(n){for(varr=0;r<n.length;r++){for(varo=e,i=n[r],a=i.split(/[.\/]/),l=0;l<a.length-1;++l)o[a[l]]===t&&(o[a[l]]={}),o=o[a[l]];o[a[a.length-1]]=c[i]}}varc={};r("tinymce/spellcheckerplugin/DomTextMatcher",[],function(){returnfunction(e,t,n){functionr(e){if(!e[0])throw"findAndReplaceDOMText cannot handle zero-length matches";vart=e.index;return[t,t+e[0].length,[e[0]]]}functiono(e){vart;if(3===e.nodeType)returne.data;if(p[e.nodeName]&&!h[e.nodeName])return"";if(t="",(h[e.nodeName]||g[e.nodeName])&&(t+="\n"),e=e.firstChild)dot+=o(e);while(e=e.nextSibling);returnt}functioni(e,t,n){varr,o,i,c,a=[],l=0,d=e,s=t.shift(),u=0;e:for(;;){if((h[d.nodeName]||g[d.nodeName])&&l++,3===d.nodeType&&(!o&&d.length+l>=s[1]?(o=d,c=s[1]-l):r&&a.push(d),!r&&d.length+l>s[0]&&(r=d,i=s[0]-l),l+=d.length),r&&o){if(d=n({startNode:r,startNodeIndex:i,endNode:o,endNodeIndex:c,innerNodes:a,match:s[2],matchIndex:u}),l-=o.length-c,r=null,o=null,a=[],s=t.shift(),u++,!s)break}else{if((!p[d.nodeName]||h[d.nodeName])&&d.firstChild){d=d.firstChild;continue}if(d.nextSibling){d=d.nextSibling;continue}}for(;;){if(d.nextSibling){d=d.nextSibling;break}if(d.parentNode===e)breake;d=d.parentNode}}}functionc(e){vart;if("function"!=typeofe){varn=e.nodeType?e:f.createElement(e);t=function(e,t){varr=n.cloneNode(!1);returnr.setAttribute("data-mce-index",t),e&&r.appendChild(f.createTextNode(e)),r}}elset=e;returnfunction(e){varn,r,o,i=e.startNode,c=e.endNode,a=e.matchIndex;if(i===c){varl=i;o=l.parentNode,e.startNodeIndex>0&&(n=f.createTextNode(l.data.substring(0,e.startNodeIndex)),o.insertBefore(n,l));vard=t(e.match[0],a);returno.insertBefore(d,l),e.endNodeIndex<l.length&&(r=f.createTextNode(l.data.substring(e.endNodeIndex)),o.insertBefore(r,l)),l.parentNode.removeChild(l),d}n=f.createTextNode(i.data.substring(0,e.startNodeIndex)),r=f.createTextNode(c.data.substring(e.endNodeIndex));for(vars=t(i.data.substring(e.startNodeIndex),a),u=[],h=0,p=e.innerNodes.length;p>h;++h){varg=e.innerNodes[h],m=t(g.data,a);g.parentNode.replaceChild(m,g),u.push(m)}varv=t(c.data.substring(0,e.endNodeIndex),a);returno=i.parentNode,o.insertBefore(n,i),o.insertBefore(s,i),o.removeChild(i),o=c.parentNode,o.insertBefore(v,c),o.insertBefore(r,c),o.removeChild(c),v}}functiona(e){vart=[];returnl(function(n,r){e(n,r)&&t.push(n)}),m=t,this}functionl(e){for(vart=0,n=m.length;n>t&&e(m[t],t)!==!1;t++);returnthis}functiond(e){returnm.length&&(v=m.length,i(t,m,c(e))),this}vars,u,f,h,p,g,m=[],v=0;if(f=t.ownerDocument,h=n.getBlockElements(),p=n.getWhiteSpaceElements(),g=n.getShortEndedElements(),u=o(t),u&&e.global)for(;s=e.exec(u);)m.push(r(s));return{text:u,count:v,matches:m,each:l,filter:a,mark:d}}}),r("tinymce/spellcheckerplugin/Plugin",["tinymce/spellcheckerplugin/DomTextMatcher","tinymce/PluginManager","tinymce/util/Tools","tinymce/ui/Menu","tinymce/dom/DOMUtils","tinymce/util/JSONRequest","tinymce/util/URI"],function(e,t,n,r,o,i,c){t.add("spellchecker",function(t,a){functionl(e){for(vartine)return!1;return!0}functiond(e,i){varc=[],a=m[i];n.each(a,function(e){c.push({text:e,onclick:function(){t.insertContent(e),u()}})}),c.push.apply(c,[{text:"-"},{text:"Ignore",onclick:function(){h(e,i)}},{text:"Ignore all",onclick:function(){h(e,i,!0)}},{text:"Finish",onclick:p}]),x=newr({items:c,context:"contextmenu",onautohide:function(e){-1!=e.target.className.indexOf("spellchecker")&&e.preventDefault()},onhide:function(){x.remove(),x=null}}),x.renderTo(document.body);varl=o.D