!function(){vara={},b=function(b){for(varc=a[b],e=c.deps,f=c.defn,g=e.length,h=newArray(g),i=0;i<g;++i)h[i]=d(e[i]);varj=f.apply(null,h);if(void0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeofb)throw"module id must be a string";if(void0===c)throw"no dependencies for "+b;if(void0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void0}},d=function(c){vard=a[c];if(void0===d)throw"module ["+c+"] was undefined";returnvoid0===d.instance&&b(c),d.instance},e=function(a,b){for(varc=a.length,e=newArray(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}}};varg=c,h=function(a,b){g(a,[],function(){returnb})};h("7",tinymce.util.Tools.resolve),g("1",["7"],function(a){returna("tinymce.PluginManager")}),g("2",["7"],function(a){returna("tinymce.util.Delay")}),g("3",["7"],function(a){returna("tinymce.util.VK")}),g("8",["7"],function(a){returna("tinymce.dom.TreeWalker")}),g("9",["7"],function(a){returna("tinymce.util.Tools")}),g("a",[],function(){vara=function(a){returna.sort(function(a,b){returna.start.length>b.start.length?-1:a.start.length<b.start.length?1:0})},b=function(a,b){for(varc=0;c<a.length;c++)if(0===b.indexOf(a[c].start)&&(!a[c].end||b.lastIndexOf(a[c].end)===b.length-a[c].end.length))returna[c]},c=function(a,b,c,d){vare=b.substr(c-a.end.length-d,a.end.length);returne===a.end},d=function(a,b,c){returna-b-c.end.length-c.start.length>0},e=function(b,e,f,g){varh,i,j=a(b);for(i=0;i<j.length;i++)if(h=j[i],void0!==h.end&&c(h,e,f,g)&&d(f,g,h))returnh};return{findPattern:b,findEndPattern:e}}),g("4",["8","9","a"],function(a,b,c){vard=function(a,b,c,d,e){returna=d>0?a.splitText(d):a,a.splitText(c-d-e),a.deleteData(0,b.start.length),a.deleteData(a.data.length-b.end.length,b.end.length),a},e=function(a,b,e){varf,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=e===!0?1:0,3==i.nodeType&&(n=c.findEndPattern(b,l,j,o),void0!==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.findPattern(b,m.toString()),n&&n.end&&!(i.data.length<=n.start.length+n.end.length))))))returnp=a.formatter.get(n.format),p&&p[0].inline?(a.undoManager.transact(function(){i=d(i,n,j,k,o),a.formatter.apply(n.format,{},i)}),i):void0},f=function(d,e){varf,g,h,i,j,k,l,m,n,o,p;if(f=d.selection,g=d.dom,f.isCollapsed()&&(l=g.getParent(f.getStart(),"p"))){for(n=newa(l,l);j=n.next();)if(3==j.nodeType){i=j;break}if(i){if(m=c.findPattern(e,i.data),!m)return;if(o=f.getRng(!0),h=o.startContainer,p=o.startOffset,i==h&&(p=Math.max(0,p-m.start.length)),b.trim(i.data).length==m.start.length)return;m.format&&(k=d.formatter.get(m.format),k&&k[0].block&&(i.deleteData(0,m.start.length),d.formatter.apply(m.format,{},i),o.setStart(h,p),o.collapse(!0),f.setRng(o))),m.cmd&&d.undoManager.transact(function(){i.deleteData(0,m.start.length),d.execCommand(m.cmd)})}}};return{applyInlineFormat:e,applyBlockFormat:f}}),g("5",["3","4"],function(a,b){functionc(a,c){vard,e;e=b.applyInlineFormat(a,c,!1),e&&(d=a.dom.createRng(),d.setStart(e,e.data.length),d.setEnd(e,e.data.length),a.selection.setRng(d)),b.applyBlockFormat(a,c)}functiond(a,c){vard,e,f,g,h;d=b.applyInlineFormat(a,c,!0),d&&(h=a.dom,e=d.data.slice(-1),/[\u00a0 ]/.test(e)&&(d.deleteData(d.data.length-1,1),f=h.doc.createTextNode(e),d.nextSibling?h.insertAfter(f,d.nextSibling):d.parentNode.appendChild(f),g=h.createRng(),g.setStart(f,1),g.setEnd(f,1),a.selection.setRng(g)))}vare=function(a,b,c){for(vard=0;d<a.length;d++)if(c(a[d],b))return!0},f=function(b,c){returne(b,c,function(b,c){returnb===c.keyCode&&a.modifierPressed(c)===!1})},g=function(a,b){returne(a,b,function(a,b){returna.charCodeAt(0)===b.charCode})};return{handleEnter:c,handleInlineKey:d,checkCharCode:g,checkKeyCode:f}}),g("6",[],function(){vara=[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1"},{start:"##",format:"h2"},{star