orbit-basic/public/assets/tinymce/tiny_mce_jquery.js

6 lines
184 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function(a){var b=/^\s*|\s*$/g,c,d="B".replace(/A(.)|B/,"$1")==="$1",e={majorVersion:"3",minorVersion:"4.8",releaseDate:"2012-02-02",_init:function(){function l(a){return a.src&&/tiny_mce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(a.src)?(/_(src|dev)\.js/g.test(a.src)&&(b.suffix="_src"),(j=a.src.indexOf("?"))!=-1&&(b.query=a.src.substring(j+1)),b.baseURL=a.src.substring(0,a.src.lastIndexOf("/")),i&&b.baseURL.indexOf("://")==-1&&b.baseURL.indexOf("/")!==0&&(b.baseURL=i+b.baseURL),b.baseURL):null}var b=this,c=document,d=navigator,e=d.userAgent,f,g,h,i,j,k;b.isOpera=a.opera&&opera.buildNumber,b.isWebKit=/WebKit/.test(e),b.isIE=!b.isWebKit&&!b.isOpera&&/MSIE/gi.test(e)&&/Explorer/gi.test(d.appName),b.isIE6=b.isIE&&/MSIE [56]/.test(e),b.isIE7=b.isIE&&/MSIE [7]/.test(e),b.isIE8=b.isIE&&/MSIE [8]/.test(e),b.isIE9=b.isIE&&/MSIE [9]/.test(e),b.isGecko=!b.isWebKit&&/Gecko/.test(e),b.isMac=e.indexOf("Mac")!=-1,b.isAir=/adobeair/i.test(e),b.isIDevice=/(iPad|iPhone)/.test(e),b.isIOS5=b.isIDevice&&e.match(/AppleWebKit\/(\d*)/)[1]>=534;if(a.tinyMCEPreInit){b.suffix=tinyMCEPreInit.suffix,b.baseURL=tinyMCEPreInit.base,b.query=tinyMCEPreInit.query;return}b.suffix="",g=c.getElementsByTagName("base");for(f=0;f<g.length;f++)if(k=g[f].href)/^https?:\/\/[^\/]+$/.test(k)&&(k+="/"),i=k?k.match(/.*\//)[0]:"";g=c.getElementsByTagName("script");for(f=0;f<g.length;f++)if(l(g[f]))return;h=c.getElementsByTagName("head")[0];if(h){g=h.getElementsByTagName("script");for(f=0;f<g.length;f++)if(l(g[f]))return}return},is:function(a,b){return b?b=="array"&&a.hasOwnProperty&&a instanceof Array?!0:typeof a==b:a!==c},makeMap:function(a,b,c){var d;a=a||[],b=b||",",typeof a=="string"&&(a=a.split(b)),c=c||{},d=a.length;while(d--)c[a[d]]={};return c},each:function(a,b,d){var e,f;if(!a)return 0;d=d||a;if(a.length!==c){for(e=0,f=a.length;e<f;e++)if(b.call(d,a[e],e,a)===!1)return 0}else for(e in a)if(a.hasOwnProperty(e)&&b.call(d,a[e],e,a)===!1)return 0;return 1},trim:function(a){return(a?""+a:"").replace(b,"")},create:function(a,b,c){var d=this,e,f,g,h,i,j=0;a=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(a),g=a[3].match(/(^|\.)(\w+)$/i)[2],f=d.createNS(a[3].replace(/\.\w+$/,""),c);if(f[g])return;if(a[2]=="static"){f[g]=b,this.onCreate&&this.onCreate(a[2],a[3],f[g]);return}b[g]||(b[g]=function(){},j=1),f[g]=b[g],d.extend(f[g].prototype,b),a[5]&&(e=d.resolve(a[5]).prototype,h=a[5].match(/\.(\w+)$/i)[1],i=f[g],j?f[g]=function(){return e[h].apply(this,arguments)}:f[g]=function(){return this.parent=e[h],i.apply(this,arguments)},f[g].prototype[g]=f[g],d.each(e,function(a,b){f[g].prototype[b]=e[b]}),d.each(b,function(a,b){e[b]?f[g].prototype[b]=function(){return this.parent=e[b],a.apply(this,arguments)}:b!=g&&(f[g].prototype[b]=a)})),d.each(b["static"],function(a,b){f[g][b]=a}),this.onCreate&&this.onCreate(a[2],a[3],f[g].prototype)},walk:function(a,b,c,d){d=d||this,a&&(c&&(a=a[c]),e.each(a,function(a,g){if(b.call(d,a,g,c)===!1)return!1;e.walk(a,b,c,d)}))},createNS:function(b,c){var d,e;c=c||a,b=b.split(".");for(d=0;d<b.length;d++)e=b[d],c[e]||(c[e]={}),c=c[e];return c},resolve:function(b,c){var d,e;c=c||a,b=b.split(".");for(d=0,e=b.length;d<e;d++){c=c[b[d]];if(!c)break}return c},addUnload:function(b,c){var d=this;b={func:b,scope:c||this};if(!d.unloads){function e(){var b=d.unloads,c,g;if(b){for(g in b)c=b[g],c&&c.func&&c.func.call(c.scope,1);a.detachEvent?(a.detachEvent("onbeforeunload",f),a.detachEvent("onunload",e)):a.removeEventListener&&a.removeEventListener("unload",e,!1),d.unloads=c=b=w=e=0,a.CollectGarbage&&CollectGarbage()}}function f(){var b=document;if(b.readyState=="interactive"){function c(){b.detachEvent("onstop",c),e&&e(),b=0}b&&b.attachEvent("onstop",c),a.setTimeout(function(){b&&b.detachEvent("onstop",c)},0)}}a.attachEvent?(a.attachEvent("onunload",e),a.attachEvent("onbeforeunload",f)):a.addEventListener&&a.addEventListener("unload",e,!1),d.unloads=[b]}else d.unloads.push(b);return b},removeUnload:function(a){var b=this.unloads,c=null;return e.each(b,function(d,e){if(d&&d.func==a)return b.splice(e,1),c=a,!1}),c},explode:function(a,b){return a?e.map(a.split(b||","),e.trim):a},_addVer:function(a){var b;return this.query?(b=(a.indexOf("?")==-1?"?":"&")+this.query,a.indexOf("#")==-1?a+b:a.replace("#",b+"#")):a},_replace:function(a,b,e){return d?e.replace(a,function(){var a=b,d=arguments,e;for(e=0;e<d.length-2;e++)d[e]===c?a=a.replace(new RegExp("\\$"+e,"g"),""):a=a.replace(new RegExp("\\$"+e,"g"),d[e]);return a}):e.replace(a,b)}};e._init(),a.tinymce=a.tinyMCE=e})(window),function(a,b){var c=b.is,d=/^(href|src|style)$/i,e;if(!a&&window.console)return console.log("Load jQuery first!");b.$=a,b.adapter={patchEditor:function(b){function f(a,b){var d=this;return b&&d.removeAttr("data-mce-style"),c.css.apply(d,arguments)}function g(a,f){var g=this;return d.test(a)?f!==e?(g.each(function(c,d){b.dom.setAttrib(d,a,f)}),g):g.attr("data-mce-"+a):c.attr.apply(g,arguments)}function h(a){return function(c){return c&&(c=b.dom.processHTML(c)),a.call(this,c)}}function i(a){return a.css!==f&&(a.css=f,a.attr=g,a.html=h(c.html),a.append=h(c.append),a.prepend=h(c.prepend),a.after=h(c.after),a.before=h(c.before),a.replaceWith=h(c.replaceWith),a.tinymce=b,a.pushStack=function(){return i(c.pushStack.apply(this,arguments))}),a}var c=a.fn;b.$=function(c,d){var e=b.getDoc();return i(a(c||e,e||d))}}},b.extend=a.extend,b.extend(b,{map:a.map,grep:function(b,c){return a.grep(b,c||function(){return 1})},inArray:function(b,c){return a.inArray(c,b||[])}});var f={"tinymce.dom.DOMUtils":{select:function(b,c){var d=this;return a.find(b,d.get(c)||d.get(d.settings.root_element)||d.doc,[])},is:function(b,c){return a(this.get(b)).is(c)}}};b.onCreate=function(a,c,d){b.extend(d,f[c])}}(window.jQuery,tinymce),tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,Dispatcher:function(a){this.scope=a||this,this.listeners=[]},add:function(a,b){return this.listeners.push({cb:a,scope:b||this.scope}),a},addToTop:function(a,b){return this.listeners.unshift({cb:a,scope:b||this.scope}),a},remove:function(a){var b=this.listeners,c=null;return tinymce.each(b,function(d,e){if(a==d.cb)return c=a,b.splice(e,1),!1}),c},dispatch:function(){var a,b=arguments,c,d=this.listeners,e;for(c=0;c<d.length;c++){e=d[c],a=e.cb.apply(e.scope,b.length>0?b:[e.scope]);if(a===!1)break}return a}}),function(){var a=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(b,c){var d=this,e,f,g,h;b=tinymce.trim(b),c=d.settings=c||{};if(/^([\w\-]+):([^\/]{2})/i.test(b)||/^\s*#/.test(b)){d.source=b;return}b.indexOf("/")===0&&b.indexOf("//")!==0&&(b=(c.base_uri?c.base_uri.protocol||"http":"http")+"://mce_host"+b),/^[\w-]*:?\/\//.test(b)||(h=c.base_uri?c.base_uri.path:(new tinymce.util.URI(location.href)).directory,b=(c.base_uri&&c.base_uri.protocol||"http")+"://mce_host"+d.toAbsPath(h,b)),b=b.replace(/@@/g,"(mce_at)"),b=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(b),a(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(a,c){var e=b[c];e&&(e=e.replace(/\(mce_at\)/g,"@@")),d[a]=e});if(g=c.base_uri){d.protocol||(d.protocol=g.protocol),d.userInfo||(d.userInfo=g.userInfo),!d.port&&d.host=="mce_host"&&(d.port=g.port);if(!d.host||d.host=="mce_host")d.host=g.host;d.source=""}},setPath:function(a){var b=this;a=/^(.*?)\/?(\w+)?$/.exec(a),b.path=a[0],b.directory=a[1],b.file=a[2],b.source="",b.getURI()},toRelative:function(a){var b=this,c;return a==="./"?a:(a=new tinymce.util.URI(a,{base_uri:b}),a.host!="mce_host"&&b.host!=a.host&&a.host||b.port!=a.port||b.protocol!=a.protocol?a.getURI():(c=b.toRelPath(b.path,a.path),a.query&&(c+="?"+a.query),a.anchor&&(c+="#"+a.anchor),c))},toAbsolute:function(a,b){var a=new tinymce.util.URI(a,{base_uri:this});return a.getURI(this.host==a.host&&this.protocol==a.protocol?b:0)},toRelPath:function(a,b){var c,d=0,e="",f,g;a=a.substring(0,a.lastIndexOf("/")),a=a.split("/"),c=b.split("/");if(a.length>=c.length)for(f=0,g=a.length;f<g;f++)if(f>=c.length||a[f]!=c[f]){d=f+1;break}if(a.length<c.length)for(f=0,g=c.length;f<g;f++)if(f>=a.length||a[f]!=c[f]){d=f+1;break}if(d==1)return b;for(f=0,g=a.length-(d-1);f<g;f++)e+="../";for(f=d-1,g=c.length;f<g;f++)f!=d-1?e+="/"+c[f]:e+=c[f];return e},toAbsPath:function(b,c){var d,e=0,f=[],g,h;g=/\/$/.test(c)?"/":"",b=b.split("/"),c=c.split("/"),a(b,function(a){a&&f.push(a)}),b=f;for(d=c.length-1,f=[];d>=0;d--){if(c[d].length==0||c[d]==".")continue;if(c[d]==".."){e++;continue}if(e>0){e--;continue}f.push(c[d])}return d=b.length-e,d<=0?h=f.reverse().join("/"):h=b.slice(0,d).join("/")+"/"+f.reverse().join("/"),h.indexOf("/")!==0&&(h="/"+h),g&&h.lastIndexOf("/")!==h.length-1&&(h+=g),h},getURI:function(a){var b,c=this;if(!c.source||a)b="",a||(c.protocol&&(b+=c.protocol+"://"),c.userInfo&&(b+=c.userInfo+"@"),c.host&&(b+=c.host),c.port&&(b+=":"+c.port)),c.path&&(b+=c.path),c.query&&(b+="?"+c.query),c.anchor&&(b+="#"+c.anchor),c.source=b;return c.source}})}(),function(){var a=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(b){var c=this.get(b),d;return c&&a(c.split("&"),function(a){a=a.split("="),d=d||{},d[unescape(a[0])]=unescape(a[1])}),d},setHash:function(b,c,d,e,f,g){var h="";a(c,function(a,b){h+=(h?"&":"")+escape(b)+"="+escape(a)}),this.set(b,h,d,e,f,g)},get:function(a){var b=document.cookie,c,d=a+"=",e;if(!b)return;e=b.indexOf("; "+d);if(e==-1){e=b.indexOf(d);if(e!=0)return null}else e+=2;return c=b.indexOf(";",e),c==-1&&(c=b.length),unescape(b.substring(e+d.length,c))},set:function(a,b,c,d,e,f){document.cookie=a+"="+escape(b)+(c?"; expires="+c.toGMTString():"")+(d?"; path="+escape(d):"")+(e?"; domain="+e:"")+(f?"; secure":"")},remove:function(a,b){var c=new Date;c.setTime(c.getTime()-1e3),this.set(a,"",c,b,c)}})}(),function(){function serialize(a,b){var c,d,e;b=b||'"';if(a==null)return"null";e=typeof a;if(e=="string")return d="\bb\tt\nn\ff\rr\"\"''\\\\",b+a.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(a,e){return b==='"'&&a==="'"?a:(c=d.indexOf(e),c+1?"\\"+d.charAt(c+1):(a=e.charCodeAt().toString(16),"\\u"+"0000".substring(a.length)+a))})+b;if(e=="object"){if(a.hasOwnProperty&&a instanceof Array){for(c=0,d="[";c<a.length;c++)d+=(c>0?",":"")+serialize(a[c],b);return d+"]"}d="{";for(c in a)a.hasOwnProperty(c)&&(d+=typeof a[c]!="function"?(d.length>1?","+b:b)+c+b+":"+serialize(a[c],b):"");return d+"}"}return""+a}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}}(),tinymce.create("static tinymce.util.XHR",{send:function(a){function f(a){b=0;try{b=new ActiveXObject(a)}catch(c){}return b}var b,c,d=window,e=0;a.scope=a.scope||this,a.success_scope=a.success_scope||a.scope,a.error_scope=a.error_scope||a.scope,a.async=a.async===!1?!1:!0,a.data=a.data||"",b=d.XMLHttpRequest?new XMLHttpRequest:f("Microsoft.XMLHTTP")||f("Msxml2.XMLHTTP");if(b){b.overrideMimeType&&b.overrideMimeType(a.content_type),b.open(a.type||(a.data?"POST":"GET"),a.url,a.async),a.content_type&&b.setRequestHeader("Content-Type",a.content_type),b.setRequestHeader("X-Requested-With","XMLHttpRequest"),b.send(a.data);function g(){!a.async||b.readyState==4||e++>1e4?(a.success&&e<1e4&&b.status==200?a.success.call(a.success_scope,""+b.responseText,b,a):a.error&&a.error.call(a.error_scope,e>1e4?"TIMED_OUT":"GENERAL",b,a),b=null):d.setTimeout(g,10)}if(!a.async)return g();c=d.setTimeout(g,10)}}}),function(){var a=tinymce.extend,b=tinymce.util.JSON,c=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(b){this.settings=a({},b),this.count=0},send:function(d){var e=d.error,f=d.success;d=a(this.settings,d),d.success=function(a,c){a=b.parse(a),typeof a=="undefined"&&(a={error:"JSON Parse error."}),a.error?e.call(d.error_scope||d.scope,a.error,c):f.call(d.success_scope||d.scope,a.result)},d.error=function(a,b){e&&e.call(d.error_scope||d.scope,a,b)},d.data=b.serialize({id:d.id||"c"+this.count++,method:d.method,params:d.params}),d.content_type="application/json",c.send(d)},"static":{sendRPC:function(a){return(new tinymce.util.JSONRequest).send(a)}}})}(),function(a){a.VK={DELETE:46,BACKSPACE:8,ENTER:13,TAB:9,SPACEBAR:32,UP:38,DOWN:40,modifierPressed:function(a){return a.shiftKey||a.ctrlKey||a.altKey}}}(tinymce),function(a){function e(e){var f=e.dom,g=e.selection;e.onKeyDown.add(function(e,h){var i,j,k,l,m;m=h.keyCode==d;if((m||h.keyCode==c)&&!b.modifierPressed(h)){h.preventDefault(),i=g.getRng(),j=f.getParent(i.startContainer,f.isBlock),m&&(j=f.getNext(j,f.isBlock));if(j){k=j.firstChild;while(k&&k.nodeType==3&&k.nodeValue.length==0)k=k.nextSibling;k&&k.nodeName==="SPAN"&&(l=k.cloneNode(!1))}e.getDoc().execCommand(m?"ForwardDelete":"Delete",!1,null),j=f.getParent(i.startContainer,f.isBlock),a.each(f.select("span.Apple-style-span,font.Apple-style-span",j),function(a){var b=g.getBookmark();l?f.replace(l.cloneNode(!1),a,!0):f.remove(a,!0),g.moveToBookmark(b)})}})}function f(a){a.onKeyUp.add(function(a,b){var e=b.keyCode;if(e==d||e==c)if(a.dom.isEmpty(a.getBody())){a.setContent("",{format:"raw"}),a.nodeChanged();return}})}function g(a){a.dom.bind(a.getDoc(),"focusin",function(){a.selection.setRng(a.selection.getRng())})}function h(b){b.onKeyDown.add(function(b,d){if(d.keyCode===c&&b.selection.isCollapsed()&&b.selection.getRng(!0).startOffset===0){var e=b.selection.getNode(),f=e.previousSibling;f&&f.nodeName&&f.nodeName.toLowerCase()==="hr"&&(b.dom.remove(f),a.dom.Event.cancel(d))}})}function i(a){Range.prototype.getClientRects||a.onMouseDown.add(function(a,b){if(b.target.nodeName==="HTML"){var c=a.getBody();c.blur(),setTimeout(function(){c.focus()},0)}})}function j(a){a.onClick.add(function(a,b){b=b.target,/^(IMG|HR)$/.test(b.nodeName)&&a.selection.getSel().setBaseAndExtent(b,0,b,1),b.nodeName=="A"&&a.dom.hasClass(b,"mceItemAnchor")&&a.selection.select(b),a.nodeChanged()})}function k(a){a.onKeyDown.add(function(a,c){function d(a){var b=a.selection.getNode(),c="h1,h2,h3,h4,h5,h6";return a.dom.is(b,c)||a.dom.getParent(b,c)!==null}c.keyCode===b.ENTER&&!b.modifierPressed(c)&&d(a)&&setTimeout(function(){var b=a.selection.getNode();a.dom.is(b,"p")&&(a.dom.setAttrib(b,"style",null),a.execCommand("mceCleanup"))},0)})}function l(b){var c,d;b.dom.bind(b.getDoc(),"selectionchange",function(){d&&(clearTimeout(d),d=0),d=window.setTimeout(function(){var d=b.selection.getRng();if(!c||!a.dom.RangeUtils.compareRanges(d,c))b.nodeChanged(),c=d},50)})}function m(a){document.body.setAttribute("role","application")}var b=a.VK,c=b.BACKSPACE,d=b.DELETE;a.create("tinymce.util.Quirks",{Quirks:function(b){a.isWebKit&&(e(b),f(b),g(b),j(b),a.isIDevice&&l(b)),a.isIE&&(h(b),f(b),m(b),k(b)),a.isGecko&&(h(b),i(b))}})}(tinymce),function(a){function j(a){var b;return b=document.createElement("div"),b.innerHTML=a,b.textContent||b.innerText||a}function k(a,b){var d,e,f,g={};if(a){a=a.split(","),b=b||10;for(d=0;d<a.length;d+=2)e=String.fromCharCode(parseInt(a[d],b)),c[e]||(f="&"+a[d+1]+";",g[e]=f,g[f]=e);return g}}var b,c,d,e=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,g=/[<>&\"\']/g,h=/&(#x|#)?([\w]+);/g,i={128:"€",130:"",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"",140:"Œ",142:"Ž",145:"",146:"",147:"“",148:"”",149:"•",150:"",151:"—",152:"˜",153:"™",154:"š",155:"",156:"œ",158:"ž",159:"Ÿ"};c={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;"},d={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},b=k("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32),a.html=a.html||{},a.html.Entities={encodeRaw:function(a,b){return a.replace(b?e:f,function(a){return c[a]||a})},encodeAllRaw:function(a){return(""+a).replace(g,function(a){return c[a]||a})},encodeNumeric:function(a,b){return a.replace(b?e:f,function(a){return a.length>1?"&#"+((a.charCodeAt(0)-55296)*1024+(a.charCodeAt(1)-56320)+65536)+";":c[a]||"&#"+a.charCodeAt(0)+";"})},encodeNamed:function(a,d,g){return g=g||b,a.replace(d?e:f,function(a){return c[a]||g[a]||a})},getEncodeFunc:function(d,g){function i(a,b){return a.replace(b?e:f,function(a){return c[a]||g[a]||"&#"+a.charCodeAt(0)+";"||a})}function j(a,b){return h.encodeNamed(a,b,g)}var h=a.html.Entities;return g=k(g)||b,d=a.makeMap(d.replace(/\+/g,",")),d.named&&d.numeric?i:d.named?g?j:h.encodeNamed:d.numeric?h.encodeNumeric:h.encodeRaw},decode:function(a){return a.replace(h,function(a,c,e){return c?(e=parseInt(e,c.length===2?16:10),e>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(e&1023))):i[e]||String.fromCharCode(e)):d[a]||b[a]||j(a)})}}}(tinymce),tinymce.html.Styles=function(a,b){function l(a,b,c,d){function e(a){return a=parseInt(a).toString(16),a.length>1?a:"0"+a}return"#"+e(b)+e(c)+e(d)}var c=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,d=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,e=/\s*([^:]+):\s*([^;]+);?/g,f=/\s+$/,g=/rgb/,h,i,j={},k;a=a||{},k="\\\" \\' \\; \\: ; : ".split(" ");for(i=0;i<k.length;i++)j[k[i]]=""+i,j[""+i]=k[i];return{toHex:function(a){return a.replace(c,l)},parse:function(b){function p(a,b){var c,d,e,f;c=g[a+"-top"+b];if(!c)return;d=g[a+"-right"+b];if(c!=d)return;e=g[a+"-bottom"+b];if(d!=e)return;f=g[a+"-left"+b];if(e!=f)return;g[a+b]=f,delete g[a+"-top"+b],delete g[a+"-right"+b],delete g[a+"-bottom"+b],delete g[a+"-left"+b]}function q(a){var b=g[a],c;if(!b||b.indexOf(" ")<0)return;b=b.split(" "),c=b.length;while(c--)if(b[c]!==b[0])return!1;return g[a]=b[0],!0}function r(a,b,c,d){if(!q(b))return;if(!q(c))return;if(!q(d))return;g[a]=g[b]+" "+g[c]+" "+g[d],delete g[b],delete g[c],delete g[d]}function s(a){return m=!0,j[a]}function t(a,b){return m&&(a=a.replace(/\uFEFF[0-9]/g,function(a){return j[a]})),b||(a=a.replace(/\\([\'\";:])/g,"$1")),a}var g={},h,i,k,m,n=a.url_converter,o=a.url_converter_scope||this;if(b){b=b.replace(/\\[\"\';:\uFEFF]/g,s).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(a){return a.replace(/[;:]/g,s)});while(h=e.exec(b)){i=h[1].replace(f,"").toLowerCase(),k=h[2].replace(f,"");if(i&&k.length>0){if(i==="font-weight"&&k==="700")k="bold";else if(i==="color"||i==="background-color")k=k.toLowerCase();k=k.replace(c,l),k=k.replace(d,function(a,b,c,d,e,f){return e=e||f,e?(e=t(e),"'"+e.replace(/\'/g,"\\'")+"'"):(b=t(b||c||d),n&&(b=n.call(o,b,"style")),"url('"+b.replace(/\'/g,"\\'")+"')")}),g[i]=m?t(k,!0):k}e.lastIndex=h.index+h[0].length}p("border",""),p("border","-width"),p("border","-color"),p("border","-style"),p("padding",""),p("margin",""),r("border","border-width","border-style","border-color"),g.border==="medium none"&&delete g.border}return g},serialize:function(a,c){function g(c){var e,f,g,i;e=b.styles[c];if(e)for(f=0,g=e.length;f<g;f++)c=e[f],i=a[c],i!==h&&i.length>0&&(d+=(d.length>0?" ":"")+c+": "+i+";")}var d="",e,f;if(c&&b&&b.styles)g("*"),g(c);else for(e in a)f=a[e],f!==h&&f.length>0&&(d+=(d.length>0?" ":"")+e+": "+f+";");return d}}},function(a){function l(a,b){return a.split(b||",")}function m(a,b){function e(b){return b.replace(/[A-Z]+/g,function(b){return e(a[b])})}var c,d={};for(c in a)a.hasOwnProperty(c)&&(a[c]=e(a[c]));return e(b).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(a,b,c,e){c=l(c,"|"),d[b]={attributes:j(c),attributesOrder:c,children:j(e,"|",{"#comment":{}})}}),d}var b={},c,d,e,f,g={},h,i,j=a.makeMap,k=a.each;d="h1,h2,h3,h4,h5,h6,hr,p,div,address,pre,form,table,tbody,thead,tfoot,th,tr,td,li,ol,ul,caption,blockquote,center,dl,dt,dd,dir,fieldset,noscript,menu,isindex,samp,header,footer,article,section,hgroup",d=j(d,",",j(d.toUpperCase())),b=m({Z:"H|K|N|O|P",Y:"X|form|R|Q",ZG:"E|span|width|align|char|charoff|valign",X:"p|T|div|U|W|isindex|fieldset|table",ZF:"E|align|char|charoff|valign",W:"pre|hr|blockquote|address|center|noframes",ZE:"abbr|axis|headers|scope|rowspan|colspan|align|char|charoff|valign|nowrap|bgcolor|width|height",ZD:"[E][S]",U:"ul|ol|dl|menu|dir",ZC:"p|Y|div|U|W|table|br|span|bdo|object|applet|img|map|K|N|Q",T:"h1|h2|h3|h4|h5|h6",ZB:"X|S|Q",S:"R|P",ZA:"a|G|J|M|O|P",R:"a|H|K|N|O",Q:"noscript|P",P:"ins|del|script",O:"input|select|textarea|label|button",N:"M|L",M:"em|strong|dfn|code|q|samp|kbd|var|cite|abbr|acronym",L:"sub|sup",K:"J|I",J:"tt|i|b|u|s|strike",I:"big|small|font|basefont",H:"G|F",G:"br|span|bdo",F:"object|applet|img|map|iframe",E:"A|B|C",D:"accesskey|tabindex|onfocus|onblur",C:"onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"lang|xml:lang|dir",A:"id|class|style|title"},"script[id|charset|type|language|src|defer|xml:space][]style[B|id|type|media|title|xml:space][]object[E|declare|classid|codebase|data|type|codetype|archive|standby|width|height|usemap|name|tabindex|align|border|hspace|vspace][#|param|Y]param[id|name|value|valuetype|type][]p[E|align][#|S]a[E|D|charset|type|name|href|hreflang|rel|rev|shape|coords|target][#|Z]br[A|clear][]span[E][#|S]bdo[A|C|B][#|S]applet[A|codebase|archive|code|object|alt|name|width|height|align|hspace|vspace][#|param|Y]h1[E|align][#|S]img[E|src|alt|name|longdesc|width|height|usemap|ismap|align|border|hspace|vspace][]map[B|C|A|name][X|form|Q|area]h2[E|align][#|S]iframe[A|longdesc|name|src|frameborder|marginwidth|marginheight|scrolling|align|width|height][#|Y]h3[E|align][#|S]tt[E][#|S]i[E][#|S]b[E][#|S]u[E][#|S]s[E][#|S]strike[E][#|S]big[E][#|S]small[E][#|S]font[A|B|size|color|face][#|S]basefont[id|size|color|face][]em[E][#|S]strong[E][#|S]dfn[E][#|S]code[E][#|S]q[E|cite][#|S]samp[E][#|S]kbd[E][#|S]var[E][#|S]cite[E][#|S]abbr[E][#|S]acronym[E][#|S]sub[E][#|S]sup[E][#|S]input[E|D|type|name|value|checked|disabled|readonly|size|maxlength|src|alt|usemap|onselect|onchange|accept|align][]select[E|name|size|multiple|disabled|tabindex|onfocus|onblur|onchange][optgroup|option]optgroup[E|disabled|label][option]option[E|selected|disabled|label|value][]textarea[E|D|name|rows|cols|disabled|readonly|onselect|onchange][]label[E|for|accesskey|onfocus|onblur][#|S]button[E|D|name|value|type|disabled][#|p|T|div|U|W|table|G|object|applet|img|map|K|N|Q]h4[E|align][#|S]ins[E|cite|datetime][#|Y]h5[E|align][#|S]del[E|cite|datetime][#|Y]h6[E|align][#|S]div[E|align][#|Y]ul[E|type|compact][li]li[E|type|value][#|Y]ol[E|type|compact|start][li]dl[E|compact][dt|dd]dt[E][#|S]dd[E][#|Y]menu[E|compact][li]dir[E|compact][li]pre[E|width|xml:space][#|ZA]hr[E|align|noshade|size|width][]blockquote[E|cite][#|Y]address[E][#|S|p]center[E][#|Y]noframes[E][#|Y]isindex[A|B|prompt][]fieldset[E][#|legend|Y]legend[E|accesskey|align][#|S]table[E|summary|width|border|frame|rules|cellspacing|cellpadding|align|bgcolor][caption|col|colgroup|thead|tfoot|tbody|tr]caption[E|align][#|S]col[ZG][]colgroup[ZG][col]thead[ZF][tr]tr[ZF|bgcolor][th|td]th[E|ZE][#|Y]form[E|action|method|name|enctype|onsubmit|onreset|accept|accept-charset|target][#|X|R|Q]noscript[E][#|Y]td[E|ZE][#|Y]tfoot[ZF][tr]tbody[ZF][tr]area[E|D|shape|coords|href|nohref|alt|target][]base[id|href|target][]body[E|onload|onunload|background|bgcolor|text|link|vlink|alink][#|Y]"),c=j("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected,autoplay,loop,controls"),e=j("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,source"),f=a.extend(j("td,th,iframe,video,audio,object"),e),h=j("pre,script,style,textarea"),i=j("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),a.html.Schema=function(m){function t(a){return new RegExp("^"+a.replace(/([?+*])/g,".$1")+"$")}function u(b){var c,d,e,f,g,h,i,k,m,n,p,r,s,u,v,w,x,y,z,A,B,C,D=/^([#+-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,E=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,F=/[*?+]/;if(b){b=l(b),o["@"]&&(x=o["@"].attributes,y=o["@"].attributesOrder);for(c=0,d=b.length;c<d;c++){h=D.exec(b[c]);if(h){v=h[1],n=h[2],w=h[3],m=h[4],s={},u=[],i={attributes:s,attributesOrder:u},v==="#"&&(i.paddEmpty=!0),v==="-"&&(i.removeEmpty=!0);if(x){for(A in x)s[A]=x[A];u.push.apply(u,y)}if(m){m=l(m,"|");for(e=0,f=m.length;e<f;e++){h=E.exec(m[e]);if(h){k={},r=h[1],p=h[2].replace(/::/g,":"),v=h[3],C=h[4],r==="!"&&(i.attributesRequired=i.attributesRequired||[],i.attributesRequired.push(p),k.required=!0);if(r==="-"){delete s[p],u.splice(a.inArray(u,p),1);continue}v&&(v==="="&&(i.attributesDefault=i.attributesDefault||[],i.attributesDefault.push({name:p,value:C}),k.defaultValue=C),v===":"&&(i.attributesForced=i.attributesForced||[],i.attributesForced.push({name:p,value:C}),k.forcedValue=C),v==="<"&&(k.validValues=j(C,"?"))),F.test(p)?(i.attributePatterns=i.attributePatterns||[],k.pattern=t(p),i.attributePatterns.push(k)):(s[p]||u.push(p),s[p]=k)}}}!x&&n=="@"&&(x=s,y=u),w&&(i.outputName=n,o[w]=i),F.test(n)?(i.pattern=t(n),q.push(i)):o[n]=i}}}}function v(a){o={},q=[],u(a),k(b,function(a,b){p[b]=a.children})}function w(a){var b=/^(~)?(.+)$/;a&&k(l(a),function(a){var c=b.exec(a),e=c[1]==="~",f=e?"span":"div",h=c[2];p[h]=p[f],g[h]=f,e||(d[h]={}),k(p,function(a,b){a[f]&&(a[h]=a[f])})})}function x(a){var b=/^([+\-]?)(\w+)\[([^\]]+)\]$/;a&&k(l(a),function(a){var c=b.exec(a),d,e;c&&(e=c[1],e?d=p[c[2]]:d=p[c[2]]={"#comment":{}},d=p[c[2]],k(l(c[3],"|"),function(a){e==="-"?delete d[a]:d[a]={}}))})}function y(a){var b=o[a],c;if(b)return b;c=q.length;while(c--){b=q[c];if(b.pattern.test(a))return b}}var n=this,o={},p={},q=[],r,s;m=m||{},m.verify_html===!1&&(m.valid_elements="*[*]"),m.valid_styles&&(r={},k(m.valid_styles,function(b,c){r[c]=a.explode(b)})),s=m.whitespace_elements?j(m.whitespace_elements):h,m.valid_elements?v(m.valid_elements):(k(b,function(a,b){o[b]={attributes:a.attributes,attributesOrder:a.attributesOrder},p[b]=a.children}),k(l("strong/b,em/i"),function(a){a=l(a,"/"),o[a[1]].outputName=a[0]}),o.img.attributesDefault=[{name:"alt",value:""}],k(l("ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr"),function(a){o[a].removeEmpty=!0}),k(l("p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption"),function(a){o[a].paddEmpty=!0})),w(m.custom_elements),x(m.valid_children),u(m.extended_valid_elements),x("+ol[ul|ol],+ul[ul|ol]"),y("span")||u("span[!data-mce-type|*]"),m.invalid_elements&&a.each(a.explode(m.invalid_elements),function(a){o[a]&&delete o[a]}),n.children=p,n.styles=r,n.getBoolAttrs=function(){return c},n.getBlockElements=function(){return d},n.getShortEndedElements=function(){return e},n.getSelfClosingElements=function(){return i},n.getNonEmptyElements=function(){return f},n.getWhiteSpaceElements=function(){return s},n.isValidChild=function(a,b){var c=p[a];return!!c&&!!c[b]},n.getElementRule=y,n.getCustomElements=function(){return g},n.addValidElements=u,n.setValidElements=v,n.addCustomElements=w,n.addValidChildren=x},a.html.Schema.boolAttrMap=c,a.html.Schema.blockElementsMap=d}(tinymce),function(a){a.html.SaxParser=function(b,c){var d=this,e=function(){};b=b||{},d.schema=c=c||new a.html.Schema,b.fix_self_closing!==!1&&(b.fix_self_closing=!0),a.each("comment cdata text start end pi doctype".split(" "),function(a){a&&(d[a]=b[a]||e)}),d.parse=function(d){function N(a){var b,c;b=j.length;while(b--)if(j[b].name===a)break;if(b>=0){for(c=j.length-1;c>=b;c--)a=j[c],a.valid&&e.end(a.name);j.length=b}}var e=this,f,g=0,h,i,j=[],k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J=0,K=a.html.Entities.decode,L,M;F=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([^\\s\\/<>]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/)>))","g"),G=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:\\.|[^\"])*)\")|(?:\'((?:\\.|[^\'])*)\')|([^>\s]+)))?/g,H={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi},q=c.getShortEndedElements(),E=c.getSelfClosingElements(),r=c.getBoolAttrs(),t=b.validate,p=b.remove_internals,L=b.fix_self_closing,M=a.isIE,y=/^:/;while(f=F.exec(d)){g<f.index&&e.text(K(d.substr(g,f.index-g)));if(h=f[6])h=h.toLowerCase(),M&&y.test(h)&&(h=h.substr(1)),N(h);else if(h=f[7]){h=h.toLowerCase(),M&&y.test(h)&&(h=h.substr(1)),s=h in q,L&&E[h]&&j.length>0&&j[j.length-1].name===h&&N(h);if(!t||(u=c.getElementRule(h))){v=!0,t&&(z=u.attributes,A=u.attributePatterns),(x=f[8])?(o=x.indexOf("data-mce-type")!==-1,o&&p&&(v=!1),k=[],k.map={},x.replace(G,function(a,b,c,d,e){var f,g;b=b.toLowerCase(),c=b in r?b:K(c||d||e||"");if(t&&!o&&b.indexOf("data-")!==0){f=z[b];if(!f&&A){g=A.length;while(g--){f=A[g];if(f.pattern.test(b))break}g===-1&&(f=null)}if(!f)return;if(f.validValues&&!(c in f.validValues))return}k.map[b]=c,k.push({name:b,value:c})})):(k=[],k.map={});if(t&&!o){B=u.attributesRequired,C=u.attributesDefault,D=u.attributesForced;if(D){l=D.length;while(l--)w=D[l],n=w.name,I=w.value,I==="{$uid}"&&(I="mce_"+J++),k.map[n]=I,k.push({name:n,value:I})}if(C){l=C.length;while(l--)w=C[l],n=w.name,n in k.map||(I=w.value,I==="{$uid}"&&(I="mce_"+J++),k.map[n]=I,k.push({name:n,value:I}))}if(B){l=B.length;while(l--)if(B[l]in k.map)break;l===-1&&(v=!1)}k.map["data-mce-bogus"]&&(v=!1)}v&&e.start(h,k,s)}else v=!1;if(i=H[h]){i.lastIndex=g=f.index+f[0].length,(f=i.exec(d))?(v&&(m=d.substr(g,f.index-g)),g=f.index+f[0].length):(m=d.substr(g),g=d.length),v&&m.length>0&&e.text(m,!0),v&&e.end(h),F.lastIndex=g;continue}s||(!x||x.indexOf("/")!=x.length-1?j.push({name:h,valid:v}):v&&e.end(h))}else(h=f[1])?e.comment(h):(h=f[2])?e.cdata(h):(h=f[3])?e.doctype(h):(h=f[4])&&e.pi(h,f[5]);g=f.index+f[0].length}g<d.length&&e.text(K(d.substr(g)));for(l=j.length-1;l>=0;l--)h=j[l],h.valid&&e.end(h.name)}}}(tinymce),function(a){function d(a,b,c){var d,e,f=c?"lastChild":"firstChild",g=c?"prev":"next";if(a[f])return a[f];if(a!==b){d=a[g];if(d)return d;for(e=a.parent;e&&e!==b;e=e.parent){d=e[g];if(d)return d}}}function e(a,b){this.name=a,this.type=b,b===1&&(this.attributes=[],this.attributes.map={})}var b=/^[ \t\r\n]*$/,c={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};a.extend(e.prototype,{replace:function(a){var b=this;return a.parent&&a.remove(),b.insert(a,b),b.remove(),b},attr:function(a,b){var c=this,d,e,f;if(typeof a!="string"){for(e in a)c.attr(e,a[e]);return c}if(d=c.attributes){if(b!==f){if(b===null){if(a in d.map){delete d.map[a],e=d.length;while(e--)if(d[e].name===a)return d=d.splice(e,1),c}return c}if(a in d.map){e=d.length;while(e--)if(d[e].name===a){d[e].value=b;break}}else d.push({name:a,value:b});return d.map[a]=b,c}return d.map[a]}},clone:function(){var a=this,b=new e(a.name,a.type),c,d,f,g,h;if(f=a.attributes){h=[],h.map={};for(c=0,d=
f.length;c<d;c++)g=f[c],g.name!=="id"&&(h[h.length]={name:g.name,value:g.value},h.map[g.name]=g.value);b.attributes=h}return b.value=a.value,b.shortEnded=a.shortEnded,b},wrap:function(a){var b=this;return b.parent.insert(a,b),a.append(b),b},unwrap:function(){var a=this,b,c;for(b=a.firstChild;b;)c=b.next,a.insert(b,a,!0),b=c;a.remove()},remove:function(){var a=this,b=a.parent,c=a.next,d=a.prev;return b&&(b.firstChild===a?(b.firstChild=c,c&&(c.prev=null)):d.next=c,b.lastChild===a?(b.lastChild=d,d&&(d.next=null)):c.prev=d,a.parent=a.next=a.prev=null),a},append:function(a){var b=this,c;return a.parent&&a.remove(),c=b.lastChild,c?(c.next=a,a.prev=c,b.lastChild=a):b.lastChild=b.firstChild=a,a.parent=b,a},insert:function(a,b,c){var d;return a.parent&&a.remove(),d=b.parent||this,c?(b===d.firstChild?d.firstChild=a:b.prev.next=a,a.prev=b.prev,a.next=b,b.prev=a):(b===d.lastChild?d.lastChild=a:b.next.prev=a,a.next=b.next,a.prev=b,b.next=a),a.parent=d,a},getAll:function(a){var b=this,c,e=[];for(c=b.firstChild;c;c=d(c,b))c.name===a&&e.push(c);return e},empty:function(){var a=this,b,c,e;if(a.firstChild){b=[];for(e=a.firstChild;e;e=d(e,a))b.push(e);c=b.length;while(c--)e=b[c],e.parent=e.firstChild=e.lastChild=e.next=e.prev=null}return a.firstChild=a.lastChild=null,a},isEmpty:function(a){var c=this,e=c.firstChild,f,g;if(e)do{if(e.type===1){if(e.attributes.map["data-mce-bogus"])continue;if(a[e.name])return!1;f=e.attributes.length;while(f--){g=e.attributes[f].name;if(g==="name"||g.indexOf("data-")===0)return!1}}if(e.type===3&&!b.test(e.value))return!1}while(e=d(e,c));return!0},walk:function(a){return d(this,null,a)}}),a.extend(e,{create:function(a,b){var d,f;d=new e(a,c[a]||1);if(b)for(f in b)d.attr(f,b[f]);return d}}),a.html.Node=e}(tinymce),function(a){var b=a.html.Node;a.html.DomParser=function(c,d){function j(c){var f,g,h,i,j,k,l,m,n,o,p,q,r,s;q=a.makeMap("tr,td,th,tbody,thead,tfoot,table"),p=d.getNonEmptyElements();for(f=0;f<c.length;f++){g=c[f];if(!g.parent)continue;i=[g];for(h=g.parent;h&&!d.isValidChild(h.name,g.name)&&!q[h.name];h=h.parent)i.push(h);if(h&&i.length>1){i.reverse(),j=k=e.filterNode(i[0].clone());for(n=0;n<i.length-1;n++){d.isValidChild(k.name,i[n].name)?(l=e.filterNode(i[n].clone()),k.append(l)):l=k;for(m=i[n].firstChild;m&&m!=i[n+1];)s=m.next,l.append(m),m=s;k=l}j.isEmpty(p)?h.insert(g,i[0],!0):(h.insert(j,i[0],!0),h.insert(g,j)),h=i[0],(h.isEmpty(p)||h.firstChild===h.lastChild&&h.firstChild.name==="br")&&h.empty().remove()}else if(g.parent){if(g.name==="li"){r=g.prev;if(!r||r.name!=="ul"&&r.name!=="ul"){r=g.next;if(!r||r.name!=="ul"&&r.name!=="ul"){g.wrap(e.filterNode(new b("ul",1)));continue}r.insert(g,r.firstChild,!0);continue}r.append(g);continue}d.isValidChild(g.parent.name,"div")&&d.isValidChild("div",g.name)?g.wrap(e.filterNode(new b("div",1))):g.name==="style"||g.name==="script"?g.empty().remove():g.unwrap()}}}var e=this,f={},g=[],h={},i={};c=c||{},c.validate="validate"in c?c.validate:!0,c.root_name=c.root_name||"body",e.schema=d=d||new a.html.Schema,e.filterNode=function(a){var b,c,d;c in f&&(d=h[c],d?d.push(a):h[c]=[a]),b=g.length;while(b--)c=g[b].name,c in a.attributes.map&&(d=i[c],d?d.push(a):i[c]=[a]);return a},e.addNodeFilter=function(b,c){a.each(a.explode(b),function(a){var b=f[a];b||(f[a]=b=[]),b.push(c)})},e.addAttributeFilter=function(b,c){a.each(a.explode(b),function(a){var b;for(b=0;b<g.length;b++)if(g[b].name===a){g[b].callbacks.push(c);return}g.push({name:a,callbacks:[c]})})},e.parse=function(e,k){function F(){var a=m.firstChild,b,c;while(a)b=a.next,a.type==3||a.type==1&&a.name!=="p"&&!w[a.name]&&!a.attr("data-mce-type")?c?c.append(a):(c=G(E,1),m.insert(c,a),c.append(a)):c=null,a=b}function G(a,c){var d=new b(a,c),e;return a in f&&(e=h[a],e?e.push(d):h[a]=[d]),d}function H(a){var b,c,d;for(b=a.prev;b&&b.type===3;)c=b.value.replace(z,""),c.length>0?(b.value=c,b=b.prev):(d=b.prev,b.remove(),b=d)}var l,m,n,o,p,q,r,s,t,u,v,w,x,y=[],z,A,B,C,D,E;k=k||{},h={},i={},w=a.extend(a.makeMap("script,style,head,html,body,title,meta,param"),d.getBlockElements()),D=d.getNonEmptyElements(),C=d.children,v=c.validate,E="forced_root_block"in k?k.forced_root_block:c.forced_root_block,B=d.getWhiteSpaceElements(),x=/^[ \t\r\n]+/,z=/[ \t\r\n]+$/,A=/[ \t\r\n]+/g,l=new a.html.SaxParser({validate:v,fix_self_closing:!v,cdata:function(a){n.append(G("#cdata",4)).value=a},text:function(a,b){var c;B[n.name]||(a=a.replace(A," "),n.lastChild&&w[n.lastChild.name]&&(a=a.replace(x,""))),a.length!==0&&(c=G("#text",3),c.raw=!!b,n.append(c).value=a)},comment:function(a){n.append(G("#comment",8)).value=a},pi:function(a,b){n.append(G(a,7)).value=b,H(n)},doctype:function(a){var b;b=n.append(G("#doctype",10)),b.value=a,H(n)},start:function(a,b,c){var e,f,h,j,k,l,m,o;h=v?d.getElementRule(a):{};if(h){e=G(h.outputName||a,1),e.attributes=b,e.shortEnded=c,n.append(e),o=C[n.name],o&&C[e.name]&&!o[e.name]&&y.push(e),f=g.length;while(f--)k=g[f].name,k in b.map&&(t=i[k],t?t.push(e):i[k]=[e]);w[a]&&H(e),c||(n=e)}},end:function(a){var c,e,f,g,h;e=v?d.getElementRule(a):{};if(e){if(w[a]){if(!B[n.name]){for(c=n.firstChild;c&&c.type===3;)f=c.value.replace(x,""),f.length>0?(c.value=f,c=c.next):(g=c.next,c.remove(),c=g);for(c=n.lastChild;c&&c.type===3;)f=c.value.replace(z,""),f.length>0?(c.value=f,c=c.prev):(g=c.prev,c.remove(),c=g)}c=n.prev,c&&c.type===3&&(f=c.value.replace(x,""),f.length>0?c.value=f:c.remove())}if(e.removeEmpty||e.paddEmpty)if(n.isEmpty(D))if(e.paddEmpty)n.empty().append(new b("#text","3")).value=" ";else if(!n.attributes.map.name){h=n.parent,n.empty().remove(),n=h;return}n=n.parent}}},d),m=n=new b(k.context||c.root_name,11),l.parse(e),v&&y.length&&(k.context?k.invalid=!0:j(y)),E&&m.name=="body"&&F();if(!k.invalid){for(u in h){t=f[u],o=h[u],r=o.length;while(r--)o[r].parent||o.splice(r,1);for(p=0,q=t.length;p<q;p++)t[p](o,u,k)}for(p=0,q=g.length;p<q;p++){t=g[p];if(t.name in i){o=i[t.name],r=o.length;while(r--)o[r].parent||o.splice(r,1);for(r=0,s=t.callbacks.length;r<s;r++)t.callbacks[r](o,t.name,k)}}}return m},c.remove_trailing_brs&&e.addNodeFilter("br",function(b,c){var e,f=b.length,g,h=d.getBlockElements(),i=d.getNonEmptyElements(),j,k,l;h.body=1;for(e=0;e<f;e++){g=b[e],j=g.parent;if(h[g.parent.name]&&g===j.lastChild){k=g.prev;while(k){l=k.name;if(l!=="span"||k.attr("data-mce-type")!=="bookmark"){if(l!=="br")break;if(l==="br"){g=null;break}}k=k.prev}g&&(g.remove(),j.isEmpty(i)&&(elementRule=d.getElementRule(j.name),elementRule&&(elementRule.removeEmpty?j.remove():elementRule.paddEmpty&&(j.empty().append(new a.html.Node("#text",3)).value=" "))))}}})}}(tinymce),tinymce.html.Writer=function(a){var b=[],c,d,e,f,g;return a=a||{},c=a.indent,d=tinymce.makeMap(a.indent_before||""),e=tinymce.makeMap(a.indent_after||""),f=tinymce.html.Entities.getEncodeFunc(a.entity_encoding||"raw",a.entities),g=a.element_format=="html",{start:function(a,h,i){var j,k,l,m;c&&d[a]&&b.length>0&&(m=b[b.length-1],m.length>0&&m!=="\n"&&b.push("\n")),b.push("<",a);if(h)for(j=0,k=h.length;j<k;j++)l=h[j],b.push(" ",l.name,'="',f(l.value,!0),'"');!i||g?b[b.length]=">":b[b.length]=" />",i&&c&&e[a]&&b.length>0&&(m=b[b.length-1],m.length>0&&m!=="\n"&&b.push("\n"))},end:function(a){var d;b.push("</",a,">"),c&&e[a]&&b.length>0&&(d=b[b.length-1],d.length>0&&d!=="\n"&&b.push("\n"))},text:function(a,c){a.length>0&&(b[b.length]=c?a:f(a))},cdata:function(a){b.push("<![CDATA[",a,"]]>")},comment:function(a){b.push("<!--",a,"-->")},pi:function(a,d){d?b.push("<?",a," ",d,"?>"):b.push("<?",a,"?>"),c&&b.push("\n")},doctype:function(a){b.push("<!DOCTYPE",a,">",c?"\n":"")},reset:function(){b.length=0},getContent:function(){return b.join("").replace(/\n$/,"")}}},function(a){a.html.Serializer=function(b,c){var d=this,e=new a.html.Writer(b);b=b||{},b.validate="validate"in b?b.validate:!0,d.schema=c=c||new a.html.Schema,d.writer=e,d.serialize=function(a){function g(a){var b=d[a.type],h,i,j,k,l,m,n,o,p;if(!b){h=a.name,i=a.shortEnded,j=a.attributes;if(f&&j&&j.length>1){m=[],m.map={},p=c.getElementRule(a.name);for(n=0,o=p.attributesOrder.length;n<o;n++)k=p.attributesOrder[n],k in j.map&&(l=j.map[k],m.map[k]=l,m.push({name:k,value:l}));for(n=0,o=j.length;n<o;n++)k=j[n].name,k in m.map||(l=j.map[k],m.map[k]=l,m.push({name:k,value:l}));j=m}e.start(a.name,j,i);if(!i){if(a=a.firstChild)do g(a);while(a=a.next);e.end(h)}}else b(a)}var d,f;return f=b.validate,d={3:function(a,b){e.text(a.value,a.raw)},8:function(a){e.comment(a.value)},7:function(a){e.pi(a.name,a.value)},10:function(a){e.doctype(a.value)},4:function(a){e.cdata(a.value)},11:function(a){if(a=a.firstChild)do g(a);while(a=a.next)}},e.reset(),a.type==1&&!b.inner?g(a):d[11](a),e.getContent()}}}(tinymce),function(a){var b=a.each,c=a.is,d=a.isWebKit,e=a.isIE,f=a.html.Entities,g=/^([a-z0-9],?)+$/i,h=a.html.Schema.blockElementsMap,i=/^[ \t\r\n]*$/;a.create("tinymce.dom.DOMUtils",{doc:null,root:null,files:null,pixelStyles:/^(top|left|bottom|right|width|height|borderWidth)$/,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},DOMUtils:function(b,c){var d=this,f,g;d.doc=b,d.win=window,d.files={},d.cssFlicker=!1,d.counter=0,d.stdMode=!a.isIE||b.documentMode>=8,d.boxModel=!a.isIE||b.compatMode=="CSS1Compat"||d.stdMode,d.hasOuterHTML="outerHTML"in b.createElement("a"),d.settings=c=a.extend({keep_values:!1,hex_colors:1},c),d.schema=c.schema,d.styles=new a.html.Styles({url_converter:c.url_converter,url_converter_scope:c.url_converter_scope},c.schema);if(a.isIE6)try{b.execCommand("BackgroundImageCache",!1,!0)}catch(h){d.cssFlicker=!0}if(e&&c.schema){"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(a){b.createElement(a)});for(g in c.schema.getCustomElements())b.createElement(g)}a.addUnload(d.destroy,d)},getRoot:function(){var a=this,b=a.settings;return b&&a.get(b.root_element)||a.doc.body},getViewPort:function(a){var b,c;return a=a?a:this.win,b=a.document,c=this.boxModel?b.documentElement:b.body,{x:a.pageXOffset||c.scrollLeft,y:a.pageYOffset||c.scrollTop,w:a.innerWidth||c.clientWidth,h:a.innerHeight||c.clientHeight}},getRect:function(a){var b,c=this,d;return a=c.get(a),b=c.getPos(a),d=c.getSize(a),{x:b.x,y:b.y,w:d.w,h:d.h}},getSize:function(a){var b=this,c,d;return a=b.get(a),c=b.getStyle(a,"width"),d=b.getStyle(a,"height"),c.indexOf("px")===-1&&(c=0),d.indexOf("px")===-1&&(d=0),{w:parseInt(c)||a.offsetWidth||a.clientWidth,h:parseInt(d)||a.offsetHeight||a.clientHeight}},getParent:function(a,b,c){return this.getParents(a,b,c,!1)},getParents:function(a,b,d,e){var f=this,g,h=f.settings,i=[];a=f.get(a),e=e===undefined,h.strict_root&&(d=d||f.getRoot()),c(b,"string")&&(g=b,b==="*"?b=function(a){return a.nodeType==1}:b=function(a){return f.is(a,g)});while(a){if(a==d||!a.nodeType||a.nodeType===9)break;if(!b||b(a)){if(!e)return a;i.push(a)}a=a.parentNode}return e?i:null},get:function(a){var b;if(a&&this.doc&&typeof a=="string"){b=a,a=this.doc.getElementById(a);if(a&&a.id!==b)return this.doc.getElementsByName(b)[1]}return a},getNext:function(a,b){return this._findSib(a,b,"nextSibling")},getPrev:function(a,b){return this._findSib(a,b,"previousSibling")},add:function(a,b,d,e,f){var g=this;return this.run(a,function(a){var h,i;return h=c(b,"string")?g.doc.createElement(b):b,g.setAttribs(h,d),e&&(e.nodeType?h.appendChild(e):g.setHTML(h,e)),f?h:a.appendChild(h)})},create:function(a,b,c){return this.add(this.doc.createElement(a),a,b,c,1)},createHTML:function(a,b,c){var d="",e=this,f;d+="<"+a;for(f in b)b.hasOwnProperty(f)&&(d+=" "+f+'="'+e.encode(b[f])+'"');return typeof c!="undefined"?d+">"+c+"</"+a+">":d+" />"},remove:function(b,c){return this.run(b,function(b){var d,e=b.parentNode;if(!e)return null;if(c)while(d=b.firstChild)!a.isIE||d.nodeType!==3||d.nodeValue?e.insertBefore(d,b):b.removeChild(d);return e.removeChild(b)})},setStyle:function(b,c,d){var f=this;return f.run(b,function(g){var h,i;h=g.style,c=c.replace(/-(\D)/g,function(a,b){return b.toUpperCase()}),f.pixelStyles.test(c)&&(a.is(d,"number")||/^[\-0-9\.]+$/.test(d))&&(d+="px");switch(c){case"opacity":if(e){h.filter=d===""?"":"alpha(opacity="+d*100+")";if(!b.currentStyle||!b.currentStyle.hasLayout)h.display="inline-block"}h[c]=h["-moz-opacity"]=h["-khtml-opacity"]=d||"";break;case"float":e?h.styleFloat=d:h.cssFloat=d;break;default:h[c]=d||""}f.settings.update_styles&&f.setAttrib(g,"data-mce-style")})},getStyle:function(a,b,c){a=this.get(a);if(!a)return;if(this.doc.defaultView&&c){b=b.replace(/[A-Z]/g,function(a){return"-"+a});try{return this.doc.defaultView.getComputedStyle(a,null).getPropertyValue(b)}catch(d){return null}}return b=b.replace(/-(\D)/g,function(a,b){return b.toUpperCase()}),b=="float"&&(b=e?"styleFloat":"cssFloat"),a.currentStyle&&c?a.currentStyle[b]:a.style?a.style[b]:undefined},setStyles:function(a,c){var d=this,e=d.settings,f;f=e.update_styles,e.update_styles=0,b(c,function(b,c){d.setStyle(a,c,b)}),e.update_styles=f,e.update_styles&&d.setAttrib(a,e.cssText)},removeAllAttribs:function(a){return this.run(a,function(a){var b,c=a.attributes;for(b=c.length-1;b>=0;b--)a.removeAttributeNode(c.item(b))})},setAttrib:function(a,d,e){var f=this;if(!a||!d)return;return f.settings.strict&&(d=d.toLowerCase()),this.run(a,function(a){var g=f.settings,h=a.getAttribute(d);if(e!==null)switch(d){case"style":if(!c(e,"string")){b(e,function(b,c){f.setStyle(a,c,b)});return}g.keep_values&&(e&&!f._isRes(e)?a.setAttribute("data-mce-style",e,2):a.removeAttribute("data-mce-style",2)),a.style.cssText=e;break;case"class":a.className=e||"";break;case"src":case"href":g.keep_values&&(g.url_converter&&(e=g.url_converter.call(g.url_converter_scope||f,e,d,a)),f.setAttrib(a,"data-mce-"+d,e,2));break;case"shape":a.setAttribute("data-mce-style",e)}c(e)&&e!==null&&e.length!==0?a.setAttribute(d,""+e,2):a.removeAttribute(d,2);if(tinyMCE.activeEditor&&h!=e){var i=tinyMCE.activeEditor;i.onSetAttrib.dispatch(i,a,d,e)}})},setAttribs:function(a,c){var d=this;return this.run(a,function(a){b(c,function(b,c){d.setAttrib(a,c,b)})})},getAttrib:function(b,f,g){var h,i=this,j;b=i.get(b);if(!b||b.nodeType!==1)return g===j?!1:g;c(g)||(g="");if(/^(src|href|style|coords|shape)$/.test(f)){h=b.getAttribute("data-mce-"+f);if(h)return h}e&&i.props[f]&&(h=b[i.props[f]],h=h&&h.nodeValue?h.nodeValue:h),h||(h=b.getAttribute(f,2));if(/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(f))return b[i.props[f]]===!0&&h===""?f:h?f:"";if(b.nodeName==="FORM"&&b.getAttributeNode(f))return b.getAttributeNode(f).nodeValue;f==="style"&&(h=h||b.style.cssText,h&&(h=i.serializeStyle(i.parseStyle(h),b.nodeName),i.settings.keep_values&&!i._isRes(h)&&b.setAttribute("data-mce-style",h))),d&&f==="class"&&h&&(h=h.replace(/(apple|webkit)\-[a-z\-]+/gi,""));if(e)switch(f){case"rowspan":case"colspan":h===1&&(h="");break;case"size":if(h==="+0"||h===20||h===0)h="";break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":h===0&&(h="");break;case"hspace":h===-1&&(h="");break;case"maxlength":case"tabindex":if(h===32768||h===2147483647||h==="32768")h="";break;case"multiple":case"compact":case"noshade":case"nowrap":if(h===65535)return f;return g;case"shape":h=h.toLowerCase();break;default:f.indexOf("on")===0&&h&&(h=a._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+h))}return h!==j&&h!==null&&h!==""?""+h:g},getPos:function(a,b){var c=this,d=0,e=0,f,g=c.doc,h;a=c.get(a),b=b||g.body;if(a){if(a.getBoundingClientRect)return a=a.getBoundingClientRect(),f=c.boxModel?g.documentElement:g.body,d=a.left+(g.documentElement.scrollLeft||g.body.scrollLeft)-f.clientTop,e=a.top+(g.documentElement.scrollTop||g.body.scrollTop)-f.clientLeft,{x:d,y:e};h=a;while(h&&h!=b&&h.nodeType)d+=h.offsetLeft||0,e+=h.offsetTop||0,h=h.offsetParent;h=a.parentNode;while(h&&h!=b&&h.nodeType)d-=h.scrollLeft||0,e-=h.scrollTop||0,h=h.parentNode}return{x:d,y:e}},parseStyle:function(a){return this.styles.parse(a)},serializeStyle:function(a,b){return this.styles.serialize(a,b)},loadCSS:function(c){var d=this,f=d.doc,g;c||(c=""),g=d.select("head")[0],b(c.split(","),function(b){var c;if(d.files[b])return;d.files[b]=!0,c=d.create("link",{rel:"stylesheet",href:a._addVer(b)}),e&&f.documentMode&&f.recalc&&(c.onload=function(){f.recalc&&f.recalc(),c.onload=null}),g.appendChild(c)})},addClass:function(a,b){return this.run(a,function(a){var c;return b?this.hasClass(a,b)?a.className:(c=this.removeClass(a,b),a.className=(c!=""?c+" ":"")+b):0})},removeClass:function(b,c){var d=this,e;return d.run(b,function(b){var f;return d.hasClass(b,c)?(e||(e=new RegExp("(^|\\s+)"+c+"(\\s+|$)","g")),f=b.className.replace(e," "),f=a.trim(f!=" "?f:""),b.className=f,f||(b.removeAttribute("class"),b.removeAttribute("className")),f):b.className})},hasClass:function(a,b){return a=this.get(a),!a||!b?!1:(" "+a.className+" ").indexOf(" "+b+" ")!==-1},show:function(a){return this.setStyle(a,"display","block")},hide:function(a){return this.setStyle(a,"display","none")},isHidden:function(a){return a=this.get(a),!a||a.style.display=="none"||this.getStyle(a,"display")=="none"},uniqueId:function(a){return(a?a:"mce_")+this.counter++},setHTML:function(a,c){var d=this;return d.run(a,function(a){if(e){while(a.firstChild)a.removeChild(a.firstChild);try{a.innerHTML="<br />"+c,a.removeChild(a.firstChild)}catch(f){a=d.create("div"),a.innerHTML="<br />"+c,b(a.childNodes,function(b,c){c&&a.appendChild(b)})}}else a.innerHTML=c;return c})},getOuterHTML:function(a){var b,c=this;return a=c.get(a),a?a.nodeType===1&&c.hasOuterHTML?a.outerHTML:(b=(a.ownerDocument||c.doc).createElement("body"),b.appendChild(a.cloneNode(!0)),b.innerHTML):null},setOuterHTML:function(a,b,c){function f(a,b,c){var e,f;f=c.createElement("body"),f.innerHTML=b,e=f.lastChild;while(e)d.insertAfter(e.cloneNode(!0),a),e=e.previousSibling;d.remove(a)}var d=this;return this.run(a,function(a){a=d.get(a);if(a.nodeType==1){c=c||a.ownerDocument||d.doc;if(e)try{e&&a.nodeType==1?a.outerHTML=b:f(a,b,c)}catch(g){f(a,b,c)}else f(a,b,c)}})},decode:f.decode,encode:f.encodeAllRaw,insertAfter:function(a,b){return b=this.get(b),this.run(a,function(a){var c,d;return c=b.parentNode,d=b.nextSibling,d?c.insertBefore(a,d):c.appendChild(a),a})},isBlock:function(a){var b=a.nodeType;return b?b===1&&!!h[a.nodeName]:!!h[a]},replace:function(d,e,f){var g=this;return c(e,"array")&&(d=d.cloneNode(!0)),g.run(e,function(c){return f&&b(a.grep(c.childNodes),function(a){d.appendChild(a)}),c.parentNode.replaceChild(d,c)})},rename:function(a,c){var d=this,e;return a.nodeName!=c.toUpperCase()&&(e=d.create(c),b(d.getAttribs(a),function(b){d.setAttrib(e,b.nodeName,d.getAttrib(a,b.nodeName))}),d.replace(e,a,1)),e||a},findCommonAncestor:function(a,b){var c=a,d;while(c){d=b;while(d&&c!=d)d=d.parentNode;if(c==d)break;c=c.parentNode}return!c&&a.ownerDocument?a.ownerDocument.documentElement:c},toHex:function(a){function c(a){return a=parseInt(a).toString(16),a.length>1?a:"0"+a}var b=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(a);return b?(a="#"+c(b[1])+c(b[2])+c(b[3]),a):a},getClasses:function(){function i(c){b(c.imports,function(a){i(a)}),b(c.cssRules||c.rules,function(c){switch(c.type||1){case 1:c.selectorText&&b(c.selectorText.split(","),function(b){b=b.replace(/^\s*|\s*$|^\s\./g,"");if(/\.mce/.test(b)||!/\.[\w\-]+$/.test(b))return;h=b,b=a._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",b);if(g&&!(b=g(b,h)))return;f[b]||(d.push({"class":b}),f[b]=1)});break;case 3:i(c.styleSheet)}})}var c=this,d=[],e,f={},g=c.settings.class_filter,h;if(c.classes)return c.classes;try{b(c.doc.styleSheets,i)}catch(j){}return d.length>0&&(c.classes=d),d},run:function(a,c,d){var e=this,f;return e.doc&&typeof a=="string"&&(a=e.get(a)),a?(d=d||this,!a.nodeType&&(a.length||a.length===0)?(f=[],b(a,function(a,b){a&&(typeof a=="string"&&(a=e.doc.getElementById(a)),f.push(c.call(d,a,b)))}),f):c.call(d,a)):!1},getAttribs:function(a){var b;return a=this.get(a),a?e?(b=[],a.nodeName=="OBJECT"?a.attributes:(a.nodeName==="OPTION"&&this.getAttrib(a,"selected")&&b.push({specified:1,nodeName:"selected"}),a.cloneNode(!1).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(a){b.push({specified:1,nodeName:a})}),b)):a.attributes:[]},isEmpty:function(b,c){var d=this,e,f,g,h,j,k;b=b.firstChild;if(b){h=new a.dom.TreeWalker(b),c=c||d.schema?d.schema.getNonEmptyElements():null;do{g=b.nodeType;if(g===1){if(b.getAttribute("data-mce-bogus"))continue;j=b.nodeName.toLowerCase();if(c&&c[j]){k=b.parentNode;if(j==="br"&&d.isBlock(k)&&k.firstChild===b&&k.lastChild===b)continue;return!1}f=d.getAttribs(b),e=b.attributes.length;while(e--){j=b.attributes[e].nodeName;if(j==="name"||j==="data-mce-bookmark")return!1}}if(g===3&&!i.test(b.nodeValue))return!1}while(b=h.next())}return!0},destroy:function(b){var c=this;c.events&&c.events.destroy(),c.win=c.doc=c.root=c.events=null,b||a.removeUnload(c.destroy)},createRng:function(){var b=this.doc;return b.createRange?b.createRange():new a.dom.Range(this)},nodeIndex:function(a,b){var c=0,d,e,f;if(a)for(d=a.nodeType,a=a.previousSibling,e=a;a;a=a.previousSibling){f=a.nodeType;if(b&&f==3)if(f==d||!a.nodeValue.length)continue;c++,d=f}return c},split:function(b,c,d){function j(b){function g(a){var b=a.previousSibling&&a.previousSibling.nodeName=="SPAN",c=a.nextSibling&&a.nextSibling.nodeName=="SPAN";return b&&c}var c,d=b.childNodes,f=b.nodeType;if(f==1&&b.getAttribute("data-mce-type")=="bookmark")return;for(c=d.length-1;c>=0;c--)j(d[c]);if(f!=9){if(f==3&&b.nodeValue.length>0){var h=a.trim(b.nodeValue).length;if(!e.isBlock(b.parentNode)||h>0||h==0&&g(b))return}else if(f==1){d=b.childNodes,d.length==1&&d[0]&&d[0].nodeType==1&&d[0].getAttribute("data-mce-type")=="bookmark"&&b.parentNode.insertBefore(d[0],b);if(d.length||/^(br|hr|input|img)$/i.test(b.nodeName))return}e.remove(b)}return b}var e=this,f=e.createRng(),g,h,i;if(b&&c)return f.setStart(b.parentNode,e.nodeIndex(b)),f.setEnd(c.parentNode,e.nodeIndex(c)),g=f.extractContents(),f=e.createRng(),f.setStart(c.parentNode,e.nodeIndex(c)+1),f.setEnd(b.parentNode,e.nodeIndex(b)+1),h=f.extractContents(),i=b.parentNode,i.insertBefore(j(g),b),d?i.replaceChild(d,c):i.insertBefore(c,b),i.insertBefore(j(h),b),e.remove(b),d||c},bind:function(b,c,d,e){var f=this;return f.events||(f.events=new a.dom.EventUtils),f.events.add(b,c,d,e||this)},unbind:function(b,c,d){var e=this;return e.events||(e.events=new a.dom.EventUtils),e.events.remove(b,c,d)},_findSib:function(a,b,d){var e=this,f=b;if(a){c(f,"string")&&(f=function(a){return e.is(a,b)});for(a=a[d];a;a=a[d])if(f(a))return a}return null},_isRes:function(a){return/^(top|left|bottom|right|width|height)/i.test(a)||/;\s*(top|left|bottom|right|width|height)/i.test(a)}}),a.DOM=new a.dom.DOMUtils(document,{process_html:0})}(tinymce),function(a){function b(a){function p(a,b){I(h,a,b)}function q(a,b){I(i,a,b)}function r(a){p(a.parentNode,o(a))}function s(a){p(a.parentNode,o(a)+1)}function t(a){q(a.parentNode,o(a))}function u(a){q(a.parentNode,o(a)+1)}function v(a){a?(c[l]=c[k],c[m]=c[j]):(c[k]=c[l],c[j]=c[m]),c.collapsed=h}function w(a){r(a),u(a)}function x(a){p(a,0),q(a,a.nodeType===1?a.childNodes.length:a.nodeValue.length)}function y(a,b){var d=c[k],e=c[j],f=c[l],g=c[m],h=b.startContainer,i=b.startOffset,n=b.endContainer,o=b.endOffset;if(a===0)return H(d,e,h,i);if(a===1)return H(f,g,h,i);if(a===2)return H(f,g,n,o);if(a===3)return H(d,e,n,o)}function z(){J(g)}function A(){return J(e)}function B(){return J(f)}function C(b){var c=this[k],d=this[j],e,f;c.nodeType!==3&&c.nodeType!==4||!c.nodeValue?(c.childNodes.length>0&&(f=c.childNodes[d]),f?c.insertBefore(b,f):c.appendChild(b)):d?d>=c.nodeValue.length?a.insertAfter(b,c):(e=c.splitText(d),c.parentNode.insertBefore(b,e)):c.parentNode.insertBefore(b,c)}function D(a){var b=c.extractContents();c.insertNode(a),a.appendChild(b),c.selectNode(a)}function E(){return n(new b(a),{startContainer:c[k],startOffset:c[j],endContainer:c[l],endOffset:c[m],collapsed:c.collapsed,commonAncestorContainer:c.commonAncestorContainer})}function F(a,b){var c;if(a.nodeType==3)return a;if(b<0)return a;c=a.firstChild;while(c&&b>0)--b,c=c.nextSibling;return c?c:a}function G(){return c[k]==c[l]&&c[j]==c[m]}function H(b,c,d,e){var f,g,h,i,j,k;if(b==d)return c==e?0:c<e?-1:1;f=d;while(f&&f.parentNode!=b)f=f.parentNode;if(f){g=0,h=b.firstChild;while(h!=f&&g<c)g++,h=h.nextSibling;return c<=g?-1:1}f=b;while(f&&f.parentNode!=d)f=f.parentNode;if(f){g=0,h=d.firstChild;while(h!=f&&g<e)g++,h=h.nextSibling;return g<e?-1:1}i=a.findCommonAncestor(b,d),j=b;while(j&&j.parentNode!=i)j=j.parentNode;j||(j=i),k=d;while(k&&k.parentNode!=i)k=k.parentNode;k||(k=i);if(j==k)return 0;h=i.firstChild;while(h){if(h==j)return-1;if(h==k)return 1;h=h.nextSibling}}function I(b,d,e){var f,g;b?(c[k]=d,c[j]=e):(c[l]=d,c[m]=e),f=c[l];while(f.parentNode)f=f.parentNode;g=c[k];while(g.parentNode)g=g.parentNode;g==f?H(c[k],c[j],c[l],c[m])>0&&c.collapse(b):c.collapse(b),c.collapsed=G(),c.commonAncestorContainer=a.findCommonAncestor(c[k],c[l])}function J(a){var b,d=0,e=0,f,g,h,i,j,m;if(c[k]==c[l])return K(a);for(b=c[l],f=b.parentNode;f;b=f,f=f.parentNode){if(f==c[k])return L(b,a);++d}for(b=c[k],f=b.parentNode;f;b=f,f=f.parentNode){if(f==c[l])return M(b,a);++e}g=e-d,h=c[k];while(g>0)h=h.parentNode,g--;i=c[l];while(g<0)i=i.parentNode,g++;for(j=h.parentNode,m=i.parentNode;j!=m;j=j.parentNode,m=m.parentNode)h=j,i=m;return N(h,i,a)}function K(a){var b,e,i,l,n,o,p;a!=g&&(b=d.createDocumentFragment());if(c[j]==c[m])return b;if(c[k].nodeType==3){e=c[k].nodeValue,i=e.substring(c[j],c[m]),a!=f&&(c[k].deleteData(c[j],c[m]-c[j]),c.collapse(h));if(a==g)return;return b.appendChild(d.createTextNode(i)),b}l=F(c[k],c[j]),n=c[m]-c[j];while(n>0)o=l.nextSibling,p=R(l,a),b&&b.appendChild(p),--n,l=o;return a!=f&&c.collapse(h),b}function L(a,b){var e,h,k,l,m,n;b!=g&&(e=d.createDocumentFragment()),h=O(a,b),e&&e.appendChild(h),k=o(a),l=k-c[j];if(l<=0)return b!=f&&(c.setEndBefore(a),c.collapse(i)),e;h=a.previousSibling;while(l>0)m=h.previousSibling,n=R(h,b),e&&e.insertBefore(n,e.firstChild),--l,h=m;return b!=f&&(c.setEndBefore(a),c.collapse(i)),e}function M(a,b){var e,i,j,k,l,n;b!=g&&(e=d.createDocumentFragment()),j=P(a,b),e&&e.appendChild(j),i=o(a),++i,k=c[m]-i,j=a.nextSibling;while(k>0)l=j.nextSibling,n=R(j,b),e&&e.appendChild(n),--k,j=l;return b!=f&&(c.setStartAfter(a),c.collapse(h)),e}function N(a,b,e){var i,j,k,l,m,n,p,q;e!=g&&(j=d.createDocumentFragment()),i=P(a,e),j&&j.appendChild(i),k=a.parentNode,l=o(a),m=o(b),++l,n=m-l,p=a.nextSibling;while(n>0)q=p.nextSibling,i=R(p,e),j&&j.appendChild(i),p=q,--n;return i=O(b,e),j&&j.appendChild(i),e!=f&&(c.setStartAfter(a),c.collapse(h)),j}function O(a,b){var d=F(c[l],c[m]-1),e,f,j,k,n,o=d!=c[l];if(d==a)return Q(d,o,i,b);e=d.parentNode,f=Q(e,i,i,b);while(e){while(d)j=d.previousSibling,k=Q(d,o,i,b),b!=g&&f.insertBefore(k,f.firstChild),o=h,d=j;if(e==a)return f;d=e.previousSibling,e=e.parentNode,n=Q(e,i,i,b),b!=g&&n.appendChild(f),f=n}}function P(a,b){var d=F(c[k],c[j]),e=d!=c[k],f,l,m,n,o;if(d==a)return Q(d,e,h,b);f=d.parentNode,l=Q(f,i,h,b);while(f){while(d)m=d.nextSibling,n=Q(d,e,h,b),b!=g&&l.appendChild(n),e=h,d=m;if(f==a)return l;d=f.nextSibling,f=f.parentNode,o=Q(f,i,h,b),b!=g&&o.appendChild(l),l=o}}function Q(a,b,d,e){var h,k,l,n,o;if(b)return R(a,e);if(a.nodeType==3){h=a.nodeValue,d?(n=c[j],k=h.substring(n),l=h.substring(0,n)):(n=c[m],k=h.substring(0,n),l=h.substring(n)),e!=f&&(a.nodeValue=l);if(e==g)return;return o=a.cloneNode(i),o.nodeValue=k,o}if(e==g)return;return a.cloneNode(i)}function R(a,b){if(b!=g)return b==f?a.cloneNode(h):a;a.parentNode.removeChild(a)}var c=this,d=a.doc,e=0,f=1,g=2,h=!0,i=!1,j="startOffset",k="startContainer",l="endContainer",m="endOffset",n=tinymce.extend,o=a.nodeIndex;n(c,{startContainer:d,startOffset:0,endContainer:d,endOffset:0,collapsed:h,commonAncestorContainer:d,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:p,setEnd:q,setStartBefore:r,setStartAfter:s,setEndBefore:t,setEndAfter:u,collapse:v,selectNode:w,selectNodeContents:x,compareBoundaryPoints:y,deleteContents:z,extractContents:A,cloneContents:B,insertNode:C,surroundContents:D,cloneRange:E})}a.Range=b}(tinymce.dom),function(){function a(a){function f(b,c){var d,e=0,f,g,h,i,j,k,l=-1,m;d=b.duplicate(),d.collapse(c),m=d.parentElement();if(m.ownerDocument!==a.dom.doc)return;while(m.contentEditable==="false")m=m.parentNode;if(!m.hasChildNodes())return{node:m,inside:1};h=m.children,f=h.length-1;while(e<=f){k=Math.floor((e+f)/2),i=h[k],d.moveToElementText(i),l=d.compareEndPoints(c?"StartToStart":"EndToEnd",b);if(l>0)f=k-1;else{if(!(l<0))return{node:i};e=k+1}}if(l<0){i?d.collapse(!1):(d.moveToElementText(m),d.collapse(!0),i=m,g=!0),d.setEndPoint(c?"EndToStart":"EndToEnd",b);if(d.compareEndPoints(c?"StartToStart":"StartToEnd",b)>0){d=b.duplicate(),d.collapse(c),j=-1;while(m==d.parentElement()){if(d.move("character",-1)==0)break;j++}}j=j||d.text.replace("\r\n"," ").length}else d.collapse(!0),d.setEndPoint(c?"StartToStart":"StartToEnd",b),j=d.text.replace("\r\n"," ").length;return{node:i,position:l,offset:j,inside:g}}function g(){function m(a){var b=f(d,a),c,g,h=0,i,j,k;c=b.node,g=b.offset;if(b.inside&&!c.hasChildNodes()){e[a?"setStart":"setEnd"](c,0);return}if(g===j){e[a?"setStartBefore":"setEndAfter"](c);return}if(b.position<0){i=b.inside?c.firstChild:c.nextSibling;if(!i){e[a?"setStartAfter":"setEndAfter"](c);return}if(!g){i.nodeType==3?e[a?"setStart":"setEnd"](i,0):e[a?"setStartBefore":"setEndBefore"](i);return}while(i){k=i.nodeValue,h+=k.length;if(h>=g){c=i,h-=g,h=k.length-h;break}i=i.nextSibling}}else{i=c.previousSibling;if(!i)return e[a?"setStartBefore":"setEndBefore"](c);if(!g){c.nodeType==3?e[a?"setStart":"setEnd"](i,c.nodeValue.length):e[a?"setStartAfter":"setEndAfter"](i);return}while(i){h+=i.nodeValue.length;if(h>=g){c=i,h-=g;break}i=i.previousSibling}}e[a?"setStart":"setEnd"](c,h)}var d=a.getRng(),e=c.createRng(),g,h,i,j,k,l;g=d.item?d.item(0):d.parentElement();if(g.ownerDocument!=c.doc)return e;h=a.isCollapsed();if(d.item)return e.setStart(g.parentNode,c.nodeIndex(g)),e.setEnd(e.startContainer,e.startOffset+1),e;try{m(!0),h||m()}catch(n){if(n.number!=-2147024809)throw n;k=b.getBookmark(2),i=d.duplicate(),i.collapse(!0),g=i.parentElement(),h||(i=d.duplicate(),i.collapse(!1),j=i.parentElement(),j.innerHTML=j.innerHTML),g.innerHTML=g.innerHTML,b.moveToBookmark(k),d=a.getRng(),m(!0),h||m()}return e}var b=this,c=a.dom,d=!0,e=!1;this.getBookmark=function(b){function i(a){var a,b,d,e,f,g=[];b=a.parentNode,d=c.getRoot().parentNode;while(b!=d&&b.nodeType!==9){e=b.children,f=e.length;while(f--)if(a===e[f]){g.push(f);break}a=b,b=b.parentNode}return g}function j(a){var b;b=f(d,a);if(b)return{position:b.position,offset:b.offset,indexes:i(b.node),inside:b.inside}}var d=a.getRng(),e,g,h={};return b===2&&(d.item?h.start={ctrl:!0,indexes:i(d.item(0))}:(h.start=j(!0),a.isCollapsed()||(h.end=j()))),h},this.moveToBookmark=function(a){function e(a){var b,d,e,f;b=c.getRoot();for(d=a.length-1;d>=0;d--)f=b.children,e=a[d],e<=f.length-1&&(b=f[e]);return b}function f(c){var f=a[c?"start":"end"],g,h,i;f&&(g=f.position>0,h=d.createTextRange(),h.moveToElementText(e(f.indexes)),offset=f.offset,offset!==i?(h.collapse(f.inside||g),h.moveStart("character",g?-offset:offset)):h.collapse(c),b.setEndPoint(c?"StartToStart":"EndToStart",h),c&&b.collapse(!0))}var b,d=c.doc.body;a.start&&(a.start.ctrl?(b=d.createControlRange(),b.addElement(e(a.start.indexes)),b.select()):(b=d.createTextRange(),f(!0),f(),b.select()))},this.addRange=function(b){function m(a){var b,f,m,n,o;m=c.create("a"),b=a?g:i,f=a?h:j,n=e.duplicate();if(b==k||b==k.documentElement)b=l,f=0;b.nodeType==3?(b.parentNode.insertBefore(m,b),n.moveToElementText(m),n.moveStart("character",f),c.remove(m),e.setEndPoint(a?"StartToStart":"EndToEnd",n)):(o=b.childNodes,o.length?(f>=o.length?c.insertAfter(m,o[o.length-1]):b.insertBefore(m,o[f]),n.moveToElementText(m)):(m=k.createTextNode(""),b.appendChild(m),n.moveToElementText(m.parentNode),n.collapse(d)),e.setEndPoint(a?"StartToStart":"EndToEnd",n),c.remove(m))}var e,f,g,h,i,j,k=a.dom.doc,l=k.body;g=b.startContainer,h=b.startOffset,i=b.endContainer,j=b.endOffset,e=l.createTextRange();if(g==i&&g.nodeType==1&&h==j-1&&h==j-1)try{f=l.createControlRange(),f.addElement(g.childNodes[h]),f.select();return}catch(n){}m(!0),m(),e.select()},this.getRangeAt=g}tinymce.dom.TridentSelection=a}(),function(a){var b=a.each,c=a.DOM,d=a.isIE,e=a.isWebKit,f;a.create("tinymce.dom.EventUtils",{EventUtils:function(){this.inits=[],this.events=[]},add:function(e,f,g,h){var i,j=this,k=j.events,l;if(f instanceof Array)return l=[],b(f,function(
a){l.push(j.add(e,a,g,h))}),l;if(e&&e.hasOwnProperty&&e instanceof Array)return l=[],b(e,function(a){a=c.get(a),l.push(j.add(a,f,g,h))}),l;e=c.get(e);if(!e)return;return i=function(b){if(j.disabled)return;return b=b||window.event,b&&d&&(b.target||(b.target=b.srcElement),a.extend(b,j._stoppers)),h?g.call(h,b):g(b)},f=="unload"?(a.unloads.unshift({func:i}),i):f=="init"?(j.domLoaded?i():j.inits.push(i),i):(k.push({obj:e,name:f,func:g,cfunc:i,scope:h}),j._add(e,f,i),g)},remove:function(a,d,e){var f=this,g=f.events,h=!1,i;return a&&a.hasOwnProperty&&a instanceof Array?(i=[],b(a,function(a){a=c.get(a),i.push(f.remove(a,d,e))}),i):(a=c.get(a),b(g,function(b,c){if(b.obj==a&&b.name==d&&(!e||b.func==e||b.cfunc==e))return g.splice(c,1),f._remove(a,d,b.cfunc),h=!0,!1}),h)},clear:function(a){var b=this,d=b.events,e,f;if(a){a=c.get(a);for(e=d.length-1;e>=0;e--)f=d[e],f.obj===a&&(b._remove(f.obj,f.name,f.cfunc),f.obj=f.cfunc=null,d.splice(e,1))}},cancel:function(a){return a?(this.stop(a),this.prevent(a)):!1},stop:function(a){return a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,!1},prevent:function(a){return a.preventDefault?a.preventDefault():a.returnValue=!1,!1},destroy:function(){var a=this;b(a.events,function(b,c){a._remove(b.obj,b.name,b.cfunc),b.obj=b.cfunc=null}),a.events=[],a=null},_add:function(a,b,c){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener?a.addEventListener(b,c,!1):a["on"+b]=c},_remove:function(a,b,c){if(a)try{a.detachEvent?a.detachEvent("on"+b,c):a.removeEventListener?a.removeEventListener(b,c,!1):a["on"+b]=null}catch(d){}},_pageInit:function(a){var c=this;if(c.domLoaded)return;c.domLoaded=!0,b(c.inits,function(a){a()}),c.inits=[]},_wait:function(a){var b=this,c=a.document;if(a.tinyMCE_GZ&&tinyMCE_GZ.loaded){b.domLoaded=1;return}c.attachEvent?(c.attachEvent("onreadystatechange",function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",arguments.callee),b._pageInit(a))}),c.documentElement.doScroll&&a==a.top&&function(){if(b.domLoaded)return;try{c.documentElement.doScroll("left")}catch(d){setTimeout(arguments.callee,0);return}b._pageInit(a)}()):c.addEventListener&&b._add(a,"DOMContentLoaded",function(){b._pageInit(a)}),b._add(a,"load",function(){b._pageInit(a)})},_stoppers:{preventDefault:function(){this.returnValue=!1},stopPropagation:function(){this.cancelBubble=!0}}}),f=a.dom.Event=new a.dom.EventUtils,f._wait(window),a.addUnload(function(){f.destroy()})}(tinymce),function(a){a.dom.Element=function(b,c){var d=this,e,f;d.settings=c=c||{},d.id=b,d.dom=e=c.dom||a.DOM,a.isIE||(f=e.get(d.id)),a.each("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get".split(/,/),function(a){d[a]=function(){var c=[b],f;for(f=0;f<arguments.length;f++)c.push(arguments[f]);return c=e[a].apply(e,c),d.update(a),c}}),a.extend(d,{on:function(b,c,e){return a.dom.Event.add(d.id,b,c,e)},getXY:function(){return{x:parseInt(d.getStyle("left")),y:parseInt(d.getStyle("top"))}},getSize:function(){var a=e.get(d.id);return{w:parseInt(d.getStyle("width")||a.clientWidth),h:parseInt(d.getStyle("height")||a.clientHeight)}},moveTo:function(a,b){d.setStyles({left:a,top:b})},moveBy:function(a,b){var c=d.getXY();d.moveTo(c.x+a,c.y+b)},resizeTo:function(a,b){d.setStyles({width:a,height:b})},resizeBy:function(a,b){var c=d.getSize();d.resizeTo(c.w+a,c.h+b)},update:function(b){var f;if(a.isIE6&&c.blocker){b=b||"";if(b.indexOf("get")===0||b.indexOf("has")===0||b.indexOf("is")===0)return;if(b=="remove"){e.remove(d.blocker);return}d.blocker?f=e.get(d.blocker):(d.blocker=e.uniqueId(),f=e.add(c.container||e.getRoot(),"iframe",{id:d.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'}),e.setStyle(f,"opacity",0)),e.setStyles(f,{left:d.getStyle("left",1),top:d.getStyle("top",1),width:d.getStyle("width",1),height:d.getStyle("height",1),display:d.getStyle("display",1),zIndex:parseInt(d.getStyle("zIndex",1)||0)-1})}}})}}(tinymce),function(a){function b(a){return a.replace(/[\n\r]+/g,"")}var c=a.is,d=a.isIE,e=a.each;a.create("tinymce.dom.Selection",{Selection:function(b,c,d){var f=this;f.dom=b,f.win=c,f.serializer=d,e(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(b){f[b]=new a.util.Dispatcher(f)}),f.win.getSelection||(f.tridentSel=new a.dom.TridentSelection(f)),a.isIE&&b.boxModel&&this._fixIESelection(),a.addUnload(f.destroy,f)},setCursorLocation:function(a,b){var c=this,d=c.dom.createRng();d.setStart(a,b),d.setEnd(a,b),c.setRng(d),c.collapse(!1)},getContent:function(a){var b=this,d=b.getRng(),e=b.dom.create("body"),f=b.getSel(),g,h,i;return a=a||{},g=h="",a.get=!0,a.format=a.format||"html",a.forced_root_block="",b.onBeforeGetContent.dispatch(b,a),a.format=="text"?b.isCollapsed()?"":d.text||(f.toString?f.toString():""):(d.cloneContents?(i=d.cloneContents(),i&&e.appendChild(i)):c(d.item)||c(d.htmlText)?(e.innerHTML="<br>"+(d.item?d.item(0).outerHTML:d.htmlText),e.removeChild(e.firstChild)):e.innerHTML=d.toString(),/^\s/.test(e.innerHTML)&&(g=" "),/\s+$/.test(e.innerHTML)&&(h=" "),a.getInner=!0,a.content=b.isCollapsed()?"":g+b.serializer.serialize(e,a)+h,b.onGetContent.dispatch(b,a),a.content)},setContent:function(a,b){var c=this,d=c.getRng(),e,f=c.win.document,g,h;b=b||{format:"html"},b.set=!0,a=b.content=a,b.no_events||c.onBeforeSetContent.dispatch(c,b),a=b.content;if(d.insertNode){a+='<span id="__caret">_</span>',d.startContainer==f&&d.endContainer==f?f.body.innerHTML=a:(d.deleteContents(),f.body.childNodes.length==0?f.body.innerHTML=a:d.createContextualFragment?d.insertNode(d.createContextualFragment(a)):(g=f.createDocumentFragment(),h=f.createElement("div"),g.appendChild(h),h.outerHTML=a,d.insertNode(g))),e=c.dom.get("__caret"),d=f.createRange(),d.setStartBefore(e),d.setEndBefore(e),c.setRng(d),c.dom.remove("__caret");try{c.setRng(d)}catch(i){}}else d.item&&(f.execCommand("Delete",!1,null),d=c.getRng()),/^\s+/.test(a)?(d.pasteHTML('<span id="__mce_tmp">_</span>'+a),c.dom.remove("__mce_tmp")):d.pasteHTML(a);b.no_events||c.onSetContent.dispatch(c,b)},getStart:function(){var a=this.getRng(),b,c,d,e;if(a.duplicate||a.item){if(a.item)return a.item(0);d=a.duplicate(),d.collapse(1),b=d.parentElement(),c=e=a.parentElement();while(e=e.parentNode)if(e==b){b=c;break}return b}return b=a.startContainer,b.nodeType==1&&b.hasChildNodes()&&(b=b.childNodes[Math.min(b.childNodes.length-1,a.startOffset)]),b&&b.nodeType==3?b.parentNode:b},getEnd:function(){var a=this,b=a.getRng(),c,d;return b.duplicate||b.item?b.item?b.item(0):(b=b.duplicate(),b.collapse(0),c=b.parentElement(),c&&c.nodeName=="BODY"?c.lastChild||c:c):(c=b.endContainer,d=b.endOffset,c.nodeType==1&&c.hasChildNodes()&&(c=c.childNodes[d>0?d-1:d]),c&&c.nodeType==3?c.parentNode:c)},getBookmark:function(a,b){function o(a,b){var c=0;return e(d.select(a),function(a,d){a==b&&(c=d)}),c}var c=this,d=c.dom,f,g,h,i,j,k,l,m="",n;if(a==2){function p(){function g(a,d){var f=a[d?"startContainer":"endContainer"],g=a[d?"startOffset":"endOffset"],h=[],i,j,k=0;if(f.nodeType==3){if(b)for(i=f.previousSibling;i&&i.nodeType==3;i=i.previousSibling)g+=i.nodeValue.length;h.push(g)}else j=f.childNodes,g>=j.length&&j.length&&(k=1,g=Math.max(0,j.length-1)),h.push(c.dom.nodeIndex(j[g],b)+k);for(;f&&f!=e;f=f.parentNode)h.push(c.dom.nodeIndex(f,b));return h}var a=c.getRng(!0),e=d.getRoot(),f={};return f.start=g(a,!0),c.isCollapsed()||(f.end=g(a)),f}return c.tridentSel?c.tridentSel.getBookmark(a):p()}if(a)return{rng:c.getRng()};f=c.getRng(),h=d.uniqueId(),i=tinyMCE.activeEditor.selection.isCollapsed(),n="overflow:hidden;line-height:0px";if(f.duplicate||f.item){if(!!f.item)return k=f.item(0),j=k.nodeName,{name:j,index:o(j,k)};g=f.duplicate();try{f.collapse(),f.pasteHTML('<span data-mce-type="bookmark" id="'+h+'_start" style="'+n+'">'+m+"</span>"),i||(g.collapse(!1),f.moveToElementText(g.parentElement()),f.compareEndPoints("StartToEnd",g)==0&&g.move("character",-1),g.pasteHTML('<span data-mce-type="bookmark" id="'+h+'_end" style="'+n+'">'+m+"</span>"))}catch(q){return null}}else{k=c.getNode(),j=k.nodeName;if(j=="IMG")return{name:j,index:o(j,k)};g=f.cloneRange(),i||(g.collapse(!1),g.insertNode(d.create("span",{"data-mce-type":"bookmark",id:h+"_end",style:n},m))),f.collapse(!0),f.insertNode(d.create("span",{"data-mce-type":"bookmark",id:h+"_start",style:n},m))}return c.moveToBookmark({id:h,keep:1}),{id:h}},moveToBookmark:function(b){var c=this,f=c.dom,g,h,i,j,k,l,m,n;if(b)if(b.start){i=f.createRng(),j=f.getRoot();function o(a){var c=b[a?"start":"end"],d,e,f,g;if(c){f=c[0];for(e=j,d=c.length-1;d>=1;d--){g=e.childNodes;if(c[d]>g.length-1)return;e=g[c[d]]}e.nodeType===3&&(f=Math.min(c[0],e.nodeValue.length)),e.nodeType===1&&(f=Math.min(c[0],e.childNodes.length)),a?i.setStart(e,f):i.setEnd(e,f)}return!0}if(c.tridentSel)return c.tridentSel.moveToBookmark(b);o(!0)&&o()&&c.setRng(i)}else if(b.id){function p(c){var d=f.get(b.id+"_"+c),g,h,i,j,o=b.keep;if(d){g=d.parentNode,c=="start"?(o?(g=d.firstChild,h=1):h=f.nodeIndex(d),k=l=g,m=n=h):(o?(g=d.firstChild,h=1):h=f.nodeIndex(d),l=g,n=h);if(!o){j=d.previousSibling,i=d.nextSibling,e(a.grep(d.childNodes),function(a){a.nodeType==3&&(a.nodeValue=a.nodeValue.replace(/\uFEFF/g,""))});while(d=f.get(b.id+"_"+c))f.remove(d,1);j&&i&&j.nodeType==i.nodeType&&j.nodeType==3&&!a.isOpera&&(h=j.nodeValue.length,j.appendData(i.nodeValue),f.remove(i),c=="start"?(k=l=j,m=n=h):(l=j,n=h))}}}function q(a){return f.isBlock(a)&&!a.innerHTML&&(a.innerHTML=d?" ":'<br data-mce-bogus="1" />'),a}p("start"),p("end"),k&&(i=f.createRng(),i.setStart(q(k),m),i.setEnd(q(l),n),c.setRng(i))}else b.name?c.select(f.select(b.name)[b.index]):b.rng&&c.setRng(b.rng)},select:function(b,c){var d=this,e=d.dom,f=e.createRng(),g;if(b){g=e.nodeIndex(b),f.setStart(b.parentNode,g),f.setEnd(b.parentNode,g+1);if(c){function h(b,c){var d=new a.dom.TreeWalker(b,b);do{if(b.nodeType==3&&a.trim(b.nodeValue).length!=0){c?f.setStart(b,0):f.setEnd(b,b.nodeValue.length);return}if(b.nodeName=="BR"){c?f.setStartBefore(b):f.setEndBefore(b);return}}while(b=c?d.next():d.prev())}h(b,1),h(b)}d.setRng(f)}return b},isCollapsed:function(){var a=this,b=a.getRng(),c=a.getSel();return!b||b.item?!1:b.compareEndPoints?b.compareEndPoints("StartToEnd",b)===0:!c||b.collapsed},collapse:function(a){var b=this,c=b.getRng(),d;c.item&&(d=c.item(0),c=b.win.document.body.createTextRange(),c.moveToElementText(d)),c.collapse(!!a),b.setRng(c)},getSel:function(){var a=this,b=this.win;return b.getSelection?b.getSelection():b.document.selection},getRng:function(b){var c=this,d,e,f,g=c.win.document;if(b&&c.tridentSel)return c.tridentSel.getRangeAt(0);try{if(d=c.getSel())e=d.rangeCount>0?d.getRangeAt(0):d.createRange?d.createRange():g.createRange()}catch(h){}return a.isIE&&e&&e.setStart&&g.selection.createRange().item&&(f=g.selection.createRange().item(0),e=g.createRange(),e.setStartBefore(f),e.setEndAfter(f)),e||(e=g.createRange?g.createRange():g.body.createTextRange()),c.selectedRange&&c.explicitRange&&(e.compareBoundaryPoints(e.START_TO_START,c.selectedRange)===0&&e.compareBoundaryPoints(e.END_TO_END,c.selectedRange)===0?e=c.explicitRange:(c.selectedRange=null,c.explicitRange=null)),e},setRng:function(a){var b,c=this;if(!c.tridentSel){b=c.getSel();if(b){c.explicitRange=a;try{b.removeAllRanges()}catch(d){}b.addRange(a),c.selectedRange=b.rangeCount>0?b.getRangeAt(0):null}}else{if(a.cloneRange){c.tridentSel.addRange(a);return}try{a.select()}catch(d){}}},setNode:function(a){var b=this;return b.setContent(b.dom.getOuterHTML(a)),a},getNode:function(){var a=this,b=a.getRng(),c=a.getSel(),d,e=b.startContainer,f=b.endContainer;if(!b)return a.dom.getRoot();if(b.setStart){d=b.commonAncestorContainer;if(!b.collapsed){b.startContainer==b.endContainer&&b.endOffset-b.startOffset<2&&b.startContainer.hasChildNodes()&&(d=b.startContainer.childNodes[b.startOffset]);if(e.nodeType===3&&f.nodeType===3){function g(a,b){var c=a;while(a&&a.nodeType===3&&a.length===0)a=b?a.nextSibling:a.previousSibling;return a||c}e.length===b.startOffset?e=g(e.nextSibling,!0):e=e.parentNode,b.endOffset===0?f=g(f.previousSibling,!1):f=f.parentNode;if(e&&e===f)return e}}return d&&d.nodeType==3?d.parentNode:d}return b.item?b.item(0):b.parentElement()},getSelectedBlocks:function(b,c){var d=this,e=d.dom,f,g,h,i=[];f=e.getParent(b||d.getStart(),e.isBlock),g=e.getParent(c||d.getEnd(),e.isBlock),f&&i.push(f);if(f&&g&&f!=g){h=f;var j=new a.dom.TreeWalker(f,e.getRoot());while((h=j.next())&&h!=g)e.isBlock(h)&&i.push(h)}return g&&f!=g&&i.push(g),i},normalize:function(){function e(e){var f,g,h,i=b.dom,j=i.getRoot(),k;f=c[(e?"start":"end")+"Container"],g=c[(e?"start":"end")+"Offset"],f.nodeType===9&&(f=f.body,g=0);if(f===j&&f.hasChildNodes()){f=f.childNodes[Math.min(!e&&g>0?g-1:g,f.childNodes.length-1)],g=0;if(f.hasChildNodes()){k=f,h=new a.dom.TreeWalker(f,j);do{if(k.nodeType===3){g=e?0:k.nodeValue.length-1,f=k,d=!0;break}if(/^(BR|IMG)$/.test(k.nodeName)){g=i.nodeIndex(k),f=k.parentNode,k.nodeName=="IMG"&&!e&&g++,d=!0;break}}while(k=e?h.next():h.prev())}}d&&c["set"+(e?"Start":"End")](f,g)}var b=this,c,d;if(a.isIE)return;c=b.getRng(),e(!0),c.collapsed||e(),d&&b.setRng(c)},destroy:function(b){var c=this;c.win=null,b||a.removeUnload(c.destroy)},_fixIESelection:function(){function g(a,b){var d=c.createTextRange();try{d.moveToPoint(a,b)}catch(e){d=null}return d}function h(a){var b;a.button?(b=g(a.x,a.y),b&&(b.compareEndPoints("StartToStart",e)>0?b.setEndPoint("StartToStart",e):b.setEndPoint("EndToEnd",e),b.select())):i()}function i(){var c=b.selection.createRange();e&&!c.item&&c.compareEndPoints("StartToEnd",c)===0&&e.select(),a.unbind(b,"mouseup",i),a.unbind(b,"mousemove",h),e=d=0}var a=this.dom,b=a.doc,c=b.body,d,e,f;b.documentElement.unselectable=!0,a.bind(b,["mousedown","contextmenu"],function(c){if(c.target.nodeName==="HTML"){d&&i(),f=b.documentElement;if(f.scrollHeight>f.clientHeight)return;d=1,e=g(c.x,c.y),e&&(a.bind(b,"mouseup",i),a.bind(b,"mousemove",h),a.win.focus(),e.select())}})}})}(tinymce),function(a){a.dom.Serializer=function(b,c,d){var e,f,g=a.isIE,h=a.each,i;return b.apply_source_formatting||(b.indent=!1),c=c||a.DOM,d=d||new a.html.Schema(b),b.entity_encoding=b.entity_encoding||"named",b.remove_trailing_brs="remove_trailing_brs"in b?b.remove_trailing_brs:!0,e=new a.util.Dispatcher(self),f=new a.util.Dispatcher(self),i=new a.html.DomParser(b,d),i.addAttributeFilter("src,href,style",function(a,d){var e=a.length,f,g,h="data-mce-"+d,i=b.url_converter,j=b.url_converter_scope,k;while(e--)f=a[e],g=f.attributes.map[h],g!==k?(f.attr(d,g.length>0?g:null),f.attr(h,null)):(g=f.attributes.map[d],d==="style"?g=c.serializeStyle(c.parseStyle(g),f.name):i&&(g=i.call(j,g,d,f.name)),f.attr(d,g.length>0?g:null))}),i.addAttributeFilter("class",function(a,b){var c=a.length,d,e;while(c--)d=a[c],e=d.attr("class").replace(/\s*mce(Item\w+|Selected)\s*/g,""),d.attr("class",e.length>0?e:null)}),i.addAttributeFilter("data-mce-type",function(a,b,c){var d=a.length,e;while(d--)e=a[d],e.attributes.map["data-mce-type"]==="bookmark"&&!c.cleanup&&e.remove()}),i.addNodeFilter("script,style",function(a,b){function f(a){return a.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}var c=a.length,d,e;while(c--)d=a[c],e=d.firstChild?d.firstChild.value:"",b==="script"?(d.attr("type",(d.attr("type")||"text/javascript").replace(/^mce\-/,"")),e.length>0&&(d.firstChild.value="// <![CDATA[\n"+f(e)+"\n// ]]>")):e.length>0&&(d.firstChild.value="<!--\n"+f(e)+"\n-->")}),i.addNodeFilter("#comment",function(a,b){var c=a.length,d;while(c--)d=a[c],d.value.indexOf("[CDATA[")===0?(d.name="#cdata",d.type=4,d.value=d.value.replace(/^\[CDATA\[|\]\]$/g,"")):d.value.indexOf("mce:protected ")===0&&(d.name="#text",d.type=3,d.raw=!0,d.value=unescape(d.value).substr(14))}),i.addNodeFilter("xml:namespace,input",function(a,b){var c=a.length,d;while(c--)d=a[c],d.type===7?d.remove():d.type===1&&b==="input"&&!("type"in d.attributes.map)&&d.attr("type","text")}),b.fix_list_elements&&i.addNodeFilter("ul,ol",function(a,b){var c=a.length,d,e;while(c--)d=a[c],e=d.parent,(e.name==="ul"||e.name==="ol")&&d.prev&&d.prev.name==="li"&&d.prev.append(d)}),i.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(a,b){var c=a.length;while(c--)a[c].attr(b,null)}),{schema:d,addNodeFilter:i.addNodeFilter,addAttributeFilter:i.addAttributeFilter,onPreProcess:e,onPostProcess:f,serialize:function(j,k){var l,m,n,o,p;return g&&c.select("script,style,select,map").length>0?(p=j.innerHTML,j=j.cloneNode(!1),c.setHTML(j,p)):j=j.cloneNode(!0),l=j.ownerDocument.implementation,l.createHTMLDocument&&(m=l.createHTMLDocument(""),h(j.nodeName=="BODY"?j.childNodes:[j],function(a){m.body.appendChild(m.importNode(a,!0))}),j.nodeName!="BODY"?j=m.body.firstChild:j=m.body,n=c.doc,c.doc=m),k=k||{},k.format=k.format||"html",k.no_events||(k.node=j,e.dispatch(self,k)),o=new a.html.Serializer(b,d),k.content=o.serialize(i.parse(k.getInner?j.innerHTML:a.trim(c.getOuterHTML(j),k),k)),k.cleanup||(k.content=k.content.replace(/\uFEFF|\u200B/g,"")),k.no_events||f.dispatch(self,k),n&&(c.doc=n),k.node=null,k.content},addRules:function(a){d.addValidElements(a)},setRules:function(a){d.setValidElements(a)}}}}(tinymce),function(a){a.dom.ScriptLoader=function(b){function l(b,c){function j(){e.remove(i),f&&(f.onreadystatechange=f.onload=f=null),c()}function k(){typeof console!="undefined"&&console.log&&console.log("Failed to load: "+b)}var d=this,e=a.DOM,f,g,h,i;i=e.uniqueId();if(a.isIE6){g=new a.util.URI(b),h=location;if(g.host==h.hostname&&g.port==h.port&&g.protocol+":"==h.protocol&&g.protocol.toLowerCase()!="file"){a.util.XHR.send({url:a._addVer(g.getURI()),success:function(a){var b=e.create("script",{type:"text/javascript"});b.text=a,document.getElementsByTagName("head")[0].appendChild(b),e.remove(b),j()},error:k});return}}f=e.create("script",{id:i,type:"text/javascript",src:a._addVer(b)}),a.isIE||(f.onload=j),f.onerror=k,a.isOpera||(f.onreadystatechange=function(){var a=f.readyState;(a=="complete"||a=="loaded")&&j()}),(document.getElementsByTagName("head")[0]||document.body).appendChild(f)}var c=0,d=1,e=2,f={},g=[],h={},i=[],j=0,k;this.isDone=function(a){return f[a]==e},this.markDone=function(a){f[a]=e},this.add=this.load=function(a,b,d){var e,i=f[a];i==k&&(g.push(a),f[a]=c),b&&(h[a]||(h[a]=[]),h[a].push({func:b,scope:d||this}))},this.loadQueue=function(a,b){this.loadScripts(g,a,b)},this.loadScripts=function(b,c,g){function n(b){a.each(h[b],function(a){a.func.call(a.scope)}),h[b]=k}var m;i.push({func:c,scope:g||this}),m=function(){var c=a.grep(b);b.length=0,a.each(c,function(a){if(f[a]==e){n(a);return}f[a]!=d&&(f[a]=d,j++,l(a,function(){f[a]=e,j--,n(a),m()}))}),j||(a.each(i,function(a){a.func.call(a.scope)}),i.length=0)},m()}},a.ScriptLoader=new a.dom.ScriptLoader}(tinymce),tinymce.dom.TreeWalker=function(a,b){function d(a,c,d,e){var f,g;if(a){if(!e&&a[c])return a[c];if(a!=b){f=a[d];if(f)return f;for(g=a.parentNode;g&&g!=b;g=g.parentNode){f=g[d];if(f)return f}}}}var c=a;this.current=function(){return c},this.next=function(a){return c=d(c,"firstChild","nextSibling",a)},this.prev=function(a){return c=d(c,"lastChild","previousSibling",a)}},function(a){a.dom.RangeUtils=function(b){var c="";this.walk=function(c,d){function p(a){var b;return b=a[0],b.nodeType===3&&b===e&&f>=b.nodeValue.length&&a.splice(0,1),b=a[a.length-1],h===0&&a.length>0&&b===g&&b.nodeType===3&&a.splice(a.length-1,1),a}function q(a,b,c){var d=[];for(;a&&a!=c;a=a[b])d.push(a);return d}function r(a,b){do{if(a.parentNode==b)return a;a=a.parentNode}while(a)}function s(a,b,c){var e=c?"nextSibling":"previousSibling";for(l=a,m=l.parentNode;l&&l!=b;l=m)m=l.parentNode,n=q(l==a?l:l[e],e),n.length&&(c||n.reverse(),d(p(n)))}var e=c.startContainer,f=c.startOffset,g=c.endContainer,h=c.endOffset,i,j,k,l,m,n,o;o=b.select("td.mceSelected,th.mceSelected");if(o.length>0){a.each(o,function(a){d([a])});return}e.nodeType==1&&e.hasChildNodes()&&(e=e.childNodes[f]),g.nodeType==1&&g.hasChildNodes()&&(g=g.childNodes[Math.min(h-1,g.childNodes.length-1)]);if(e==g)return d(p([e]));i=b.findCommonAncestor(e,g);for(l=e;l;l=l.parentNode){if(l===g)return s(e,i,!0);if(l===i)break}for(l=g;l;l=l.parentNode){if(l===e)return s(g,i);if(l===i)break}j=r(e,i)||e,k=r(g,i)||g,s(e,j,!0),n=q(j==e?j:j.nextSibling,"nextSibling",k==g?k.nextSibling:k),n.length&&d(p(n)),s(g,k)},this.split=function(a){function f(a,b){return a.splitText(b)}var b=a.startContainer,c=a.startOffset,d=a.endContainer,e=a.endOffset;return b==d&&b.nodeType==3?c>0&&c<b.nodeValue.length&&(d=f(b,c),b=d.previousSibling,e>c?(e-=c,b=d=f(d,e).previousSibling,e=d.nodeValue.length,c=0):e=0):(b.nodeType==3&&c>0&&c<b.nodeValue.length&&(b=f(b,c),c=0),d.nodeType==3&&e>0&&e<d.nodeValue.length&&(d=f(d,e).previousSibling,e=d.nodeValue.length)),{startContainer:b,startOffset:c,endContainer:d,endOffset:e}}},a.dom.RangeUtils.compareRanges=function(a,b){if(a&&b){if(!a.item&&!a.duplicate)return a.startContainer==b.startContainer&&a.startOffset==b.startOffset;if(a.item&&b.item&&a.item(0)===b.item(0))return!0;if(a.isEqual&&b.isEqual&&b.isEqual(a))return!0}return!1}}(tinymce),function(a){var b=a.dom.Event,c=a.each;a.create("tinymce.ui.KeyboardNavigation",{KeyboardNavigation:function(d,e){var f=this,g=d.root,h=d.items,i=d.enableUpDown,j=d.enableLeftRight||!d.enableUpDown,k=d.excludeFromTabOrder,l,m,n,o,p;e=e||a.DOM,l=function(a){p=a.target.id},m=function(a){e.setAttrib(a.target.id,"tabindex","-1")},o=function(a){var b=e.get(p);e.setAttrib(b,"tabindex","0"),b.focus()},f.focus=function(){e.get(p).focus()},f.destroy=function(){c(h,function(a){e.unbind(e.get(a.id),"focus",l),e.unbind(e.get(a.id),"blur",m)}),e.unbind(e.get(g),"focus",o),e.unbind(e.get(g),"keydown",n),h=e=g=f.focus=l=m=n=o=null,f.destroy=function(){}},f.moveFocus=function(a,g){var i=-1,j=f.controls,k;if(!p)return;c(h,function(a,b){if(a.id===p)return i=b,!1}),i+=a,i<0?i=h.length-1:i>=h.length&&(i=0),k=h[i],e.setAttrib(p,"tabindex","-1"),e.setAttrib(k.id,"tabindex","0"),e.get(k.id).focus(),d.actOnFocus&&d.onAction(k.id),g&&b.cancel(g)},n=function(a){var c=37,e=39,g=38,h=40,k=27,l=14,m=13,n=32;switch(a.keyCode){case c:j&&f.moveFocus(-1);break;case e:j&&f.moveFocus(1);break;case g:i&&f.moveFocus(-1);break;case h:i&&f.moveFocus(1);break;case k:d.onCancel&&(d.onCancel(),b.cancel(a));break;case l:case m:case n:d.onAction&&(d.onAction(p),b.cancel(a))}},c(h,function(a,b){var c;a.id||(a.id=e.uniqueId("_mce_item_")),k?(e.bind(a.id,"blur",m),c="-1"):c=b===0?"0":"-1",e.setAttrib(a.id,"tabindex",c),e.bind(e.get(a.id),"focus",l)}),h[0]&&(p=h[0].id),e.setAttrib(g,"tabindex","-1"),e.bind(e.get(g),"focus",o),e.bind(e.get(g),"keydown",n)}})}(tinymce),function(a){var b=a.DOM,c=a.is;a.create("tinymce.ui.Control",{Control:function(b,c,d){this.id=b,this.settings=c=c||{},this.rendered=!1,this.onRender=new a.util.Dispatcher(this),this.classPrefix="",this.scope=c.scope||this,this.disabled=0,this.active=0,this.editor=d},setAriaProperty:function(a,c){var d=b.get(this.id+"_aria")||b.get(this.id);d&&b.setAttrib(d,"aria-"+a,!!c)},focus:function(){b.get(this.id).focus()},setDisabled:function(a){a!=this.disabled&&(this.setAriaProperty("disabled",a),this.setState("Disabled",a),this.setState("Enabled",!a),this.disabled=a)},isDisabled:function(){return this.disabled},setActive:function(a){a!=this.active&&(this.setState("Active",a),this.active=a,this.setAriaProperty("pressed",a))},isActive:function(){return this.active},setState:function(a,c){var d=b.get(this.id);a=this.classPrefix+a,c?b.addClass(d,a):b.removeClass(d,a)},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(a){b.setHTML(a,this.renderHTML())},postRender:function(){var a=this,b;c(a.disabled)&&(b=a.disabled,a.disabled=-1,a.setDisabled(b)),c(a.active)&&(b=a.active,a.active=-1,a.setActive(b))},remove:function(){b.remove(this.id),this.destroy()},destroy:function(){a.dom.Event.clear(this.id)}})}(tinymce),tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(a,b,c){this.parent(a,b,c),this.controls=[],this.lookup={}},add:function(a){return this.lookup[a.id]=a,this.controls.push(a),a},get:function(a){return this.lookup[a]}}),tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(a,b){this.parent(a,b),this.classPrefix="mceSeparator",this.setDisabled(!0)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}}),function(a){var b=a.is,c=a.DOM,d=a.each,e=a.walk;a.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(a,b){this.parent(a,b),this.classPrefix="mceMenuItem"},setSelected:function(a){this.setState("Selected",a),this.setAriaProperty("checked",!!a),this.selected=a},isSelected:function(){return this.selected},postRender:function(){var a=this;a.parent(),b(a.selected)&&a.setSelected(a.selected)}})}(tinymce),function(a){var b=a.is,c=a.DOM,d=a.each,e=a.walk;a.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(b,c){var d=this;d.parent(b,c),d.items={},d.collapsed=!1,d.menuCount=0,d.onAddItem=new a.util.Dispatcher(this)},expand:function(a){var b=this;a&&e(b,function(a){a.expand&&a.expand()},"items",b),b.collapsed=!1},collapse:function(a){var b=this;a&&e(b,function(a){a.collapse&&a.collapse()},"items",b),b.collapsed=!0},isCollapsed:function(){return this.collapsed},add:function(b){return b.settings||(b=new a.ui.MenuItem(b.id||c.uniqueId(),b)),this.onAddItem.dispatch(this,b),this.items[b.id]=b},addSeparator:function(){return this.add({separator:!0})},addMenu:function(a){return a.collapse||(a=this.createMenu(a)),this.menuCount++,this.add(a)},hasMenus:function(){return this.menuCount!==0},remove:function(a){delete this.items[a.id]},removeAll:function(){var a=this;e(a,function(a){a.removeAll?a.removeAll():a.remove(),a.destroy()},"items",a),a.items={}},createMenu:function(b){var d=new a.ui.Menu(b.id||c.uniqueId(),b);return d.onAddItem.add(this.onAddItem.dispatch,this.onAddItem),d}})}(tinymce),function(a){var b=a.is,c=a.DOM,d=a.each,e=a.dom.Event,f=a.dom.Element;a.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(d,e){e=e||{},e.container=e.container||c.doc.body,e.offset_x=e.offset_x||0,e.offset_y=e.offset_y||0,e.vp_offset_x=e.vp_offset_x||0,e.vp_offset_y=e.vp_offset_y||0,b(e.icons)&&!e.icons&&(e["class"]+=" mceNoIcons"),this.parent(d,e),this.onShowMenu=new a.util.Dispatcher(this),this.onHideMenu=new a.util.Dispatcher(this),this.classPrefix="mceMenu"},createMenu:function(b){var d=this,e=d.settings,f;return b.container=b.container||e.container,b.parent=d,b.constrain=b.constrain||e.constrain,b["class"]=b["class"]||e["class"],b.vp_offset_x=b.vp_offset_x||e.vp_offset_x,b.vp_offset_y=b.vp_offset_y||e.vp_offset_y,b.keyboard_focus=e.keyboard_focus,f=new a.ui.DropMenu(b.id||c.uniqueId(),b),f.onAddItem.add(d.onAddItem.dispatch,d.onAddItem),f},focus:function(){var a=this;a.keyboardNav&&a.keyboardNav.focus()},update:function(){var a=this,b=a.settings,d=c.get("menu_"+a.id+"_tbl"),e=c.get("menu_"+a.id+"_co"),f,g;f=b.max_width?Math.min(d.clientWidth,b.max_width):d.clientWidth,g=b.max_height?Math.min(d.clientHeight,b.max_height):d.clientHeight,c.boxModel?a.element.setStyles({width:f,height:g}):a.element.setStyles({width:f+2,height:g+2}),b.max_width&&c.setStyle(e,"width",f),b.max_height&&(c.setStyle(e,"height",g),d.clientHeight<b.max_height&&c.setStyle(e,"overflow","hidden"))},showMenu:function(b,g,h){var i=this,j=i.settings,k,l=c.getViewPort(),m,n,o,p,q=2,r,s,t=i.classPrefix;i.collapse(1);if(i.isMenuVisible)return;i.rendered?k=c.get("menu_"+i.id):(k=c.add(i.settings.container,i.renderNode()),d(i.items,function(a){a.postRender()}),i.element=new f("menu_"+i.id,{blocker:1,container:j.container})),a.isOpera||c.setStyles(k,{left:-65535,top:-65535}),c.show(k),i.update(),b+=j.offset_x||0,g+=j.offset_y||0,l.w-=4,l.h-=4,j.constrain&&(m=k.clientWidth-q,n=k.clientHeight-q,o=l.x+l.w,p=l.y+l.h,b+j.vp_offset_x+m>o&&(b=h?h-m:Math.max(0,o-j.vp_offset_x-m)),g+j.vp_offset_y+n>p&&(g=Math.max(0,p-j.vp_offset_y-n))),c.setStyles(k,{left:b,top:g}),i.element.update(),i.isMenuVisible=1,i.mouseClickFunc=e.add(k,"click",function(a){var b;a=a.target;if(a&&(a=c.getParent(a,"tr"))&&!c.hasClass(a,t+"ItemSub")){b=i.items[a.id];if(b.isDisabled())return;r=i;while(r)r.hideMenu&&r.hideMenu(),r=r.settings.parent;return b.settings.onclick&&b.settings.onclick(a),e.cancel(a)}}),i.hasMenus()&&(i.mouseOverFunc=e.add(k,"mouseover",function(a){var b,d,e;a=a.target;if(a&&(a=c.getParent(a,"tr"))){b=i.items[a.id],i.lastMenu&&i.lastMenu.collapse(1);if(b.isDisabled())return;a&&c.hasClass(a,t+"ItemSub")&&(d=c.getRect(a),b.showMenu(d.x+d.w-q,d.y-q,d.x),i.lastMenu=b,c.addClass(c.get(b.id).firstChild,t+"ItemActive"))}})),e.add(k,"keydown",i._keyHandler,i),i.onShowMenu.dispatch(i),j.keyboard_focus&&i._setupKeyboardNav()},hideMenu:function(a){var b=this,d=c.get("menu_"+b.id),f;if(!b.isMenuVisible)return;b.keyboardNav&&b.keyboardNav.destroy(),e.remove(d,"mouseover",b.mouseOverFunc),e.remove(d,"click",b.mouseClickFunc),e.remove(d,"keydown",b._keyHandler),c.hide(d),b.isMenuVisible=0,a||b.collapse(1),b.element&&b.element.hide(),(f=c.get(b.id))&&c.removeClass(f.firstChild,b.classPrefix+"ItemActive"),b.onHideMenu.dispatch(b)},add:function(a){var b=this,d;return a=b.parent(a),b.isRendered&&(d=c.get("menu_"+b.id))&&b._add(c.select("tbody",d)[0],a),a},collapse:function(a){this.parent(a),this.hideMenu(1)},remove:function(a){return c.remove(a.id),this.destroy(),this.parent(a)},destroy:function(){var a=this,b=c.get("menu_"+a.id);a.keyboardNav&&a.keyboardNav.destroy(),e.remove(b,"mouseover",a.mouseOverFunc),e.remove(c.select("a",b),"focus",a.mouseOverFunc),e.remove(b,"click",a.mouseClickFunc),e.remove(b,"keydown",a._keyHandler),a.element&&a.element.remove(),c.remove(b)},renderNode:function(){var a=this,b=a.settings,e,g,h,i;return i=c.create("div",{role:"listbox",id:"menu_"+a.id,"class":b["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"}),a.settings.parent&&c.setAttrib(i,"aria-parent","menu_"+a.settings.parent.id),h=c.add(i,"div",{role:"presentation",id:"menu_"+a.id+"_co","class":a.classPrefix+(b["class"]?" "+b["class"]:"")}),a.element=new f("menu_"+a.id,{blocker:1,container:b.container}),b.menu_line&&c.add(h,"span",{"class":a.classPrefix+"Line"}),e=c.add(h,"table",{role:"presentation",id:"menu_"+a.id+"_tbl",border:0,cellPadding:0,cellSpacing:0}),g=c.add(e,"tbody"),d(a.items,function(b){a._add(g,b)}),a.rendered=!0,i},_setupKeyboardNav:function(){var b,d,e=this;b=c.get("menu_"+e.id),d=c.select("a[role=option]","menu_"+e.id),d.splice(0,0,b),e.keyboardNav=new a.ui.KeyboardNavigation({root:"menu_"+e.id,items:d,onCancel:function(){e.hideMenu()},enableUpDown:!0}),b.focus()},_keyHandler:function(a){var b=this,c;switch(a.keyCode){case 37:b.settings.parent&&(b.hideMenu(),b.settings.parent.focus(),e.cancel(a));break;case 39:b.mouseOverFunc&&b.mouseOverFunc(a)}},_add:function(a,b){var d,e=b.settings,f,g,h,i=this.classPrefix,j;if(e.separator){g=c.add(a,"tr",{id:b.id,"class":i+"ItemSeparator"}),c.add(g,"td",{"class":i+"ItemSeparator"}),(d=g.previousSibling)&&c.addClass(d,"mceLast");return}d=g=c.add(a,"tr",{id:b.id,"class":i+"Item "+i+"ItemEnabled"}),d=h=c.add(d,e.titleItem?"th":"td"),d=f=c.add(d,"a",{id:b.id+"_aria",role:e.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"}),e.parent&&(c.setAttrib(f,"aria-haspopup","true"),c.setAttrib(f,"aria-owns","menu_"+b.id)),c.addClass(h,e["class"]),j=c.add(d,"span",{"class":"mceIcon"+(e.icon?" mce_"+e.icon:"")}),e.icon_src&&c.add(j,"img",{src:e.icon_src}),d=c.add(d,e.element||"span",{"class":"mceText",title:b.settings.title},b.settings.title),b.settings.style&&c.setAttrib(d,"style",b.settings.style),a.childNodes.length==1&&c.addClass(g,"mceFirst"),(d=g.previousSibling)&&c.hasClass(d,i+"ItemSeparator")&&c.addClass(g,"mceFirst"),b.collapse&&c.addClass(g,i+"ItemSub"),(d=g.previousSibling)&&c.removeClass(d,"mceLast"),c.addClass(g,"mceLast")}})}(tinymce),function(a){var b=a.DOM;a.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(a,b,c){this.parent(a,b,c),this.classPrefix="mceButton"},renderHTML:function(){var a=this.classPrefix,c=this.settings,d,e;return e=b.encode(c.label||""),d='<a role="button" id="'+this.id+'" href="javascript:;" class="'+a+" "+a+"Enabled "+c["class"]+(e?" "+a+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" aria-labelledby="'+this.id+'_voice" title="'+b.encode(c.title)+'">',c.image&&(!this.editor||!
this.editor.forcedHighContrastMode)?d+='<img class="mceIcon" src="'+c.image+'" alt="'+b.encode(c.title)+'" />'+e:d+='<span class="mceIcon '+c["class"]+'"></span>'+(e?'<span class="'+a+'Label">'+e+"</span>":""),d+='<span class="mceVoiceLabel mceIconOnly" style="display: none;" id="'+this.id+'_voice">'+c.title+"</span>",d+="</a>",d},postRender:function(){var b=this,c=b.settings,d;a.isIE&&b.editor&&a.dom.Event.add(b.id,"mousedown",function(a){d=b.editor.selection.getBookmark()}),a.dom.Event.add(b.id,"click",function(e){if(!b.isDisabled())return a.isIE&&b.editor&&d&&a.activeEditor.selection.moveToBookmark(d),c.onclick.call(c.scope,e)}),a.dom.Event.add(b.id,"keyup",function(d){if(!b.isDisabled()&&d.keyCode==a.VK.SPACEBAR)return c.onclick.call(c.scope,d)})}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.each,e=a.util.Dispatcher;a.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(b,c,d){var f=this;f.parent(b,c,d),f.items=[],f.onChange=new e(f),f.onPostRender=new e(f),f.onAdd=new e(f),f.onRenderMenu=new a.util.Dispatcher(this),f.classPrefix="mceListBox"},select:function(a){var b=this,c,e;if(a==undefined)return b.selectByIndex(-1);a&&a.call?e=a:e=function(b){return b==a},a!=b.selectedValue&&(d(b.items,function(a,d){if(e(a.value))return c=1,b.selectByIndex(d),!1}),c||b.selectByIndex(-1))},selectByIndex:function(a){var c=this,d,e,f;a!=c.selectedIndex&&(d=b.get(c.id+"_text"),f=b.get(c.id+"_voiceDesc"),e=c.items[a],e?(c.selectedValue=e.value,c.selectedIndex=a,b.setHTML(d,b.encode(e.title)),b.setHTML(f,c.settings.title+" - "+e.title),b.removeClass(d,"mceTitle"),b.setAttrib(c.id,"aria-valuenow",e.title)):(b.setHTML(d,b.encode(c.settings.title)),b.setHTML(f,b.encode(c.settings.title)),b.addClass(d,"mceTitle"),c.selectedValue=c.selectedIndex=null,b.setAttrib(c.id,"aria-valuenow",c.settings.title)),d=0)},add:function(b,c,d){var e=this;d=d||{},d=a.extend(d,{title:b,value:c}),e.items.push(d),e.onAdd.dispatch(e,d)},getLength:function(){return this.items.length},renderHTML:function(){var a="",c=this,d=c.settings,e=c.classPrefix;return a='<span role="listbox" aria-haspopup="true" aria-labelledby="'+c.id+'_voiceDesc" aria-describedby="'+c.id+'_voiceDesc"><table role="presentation" tabindex="0" id="'+c.id+'" cellpadding="0" cellspacing="0" class="'+e+" "+e+"Enabled"+(d["class"]?" "+d["class"]:"")+'"><tbody><tr>',a+="<td>"+b.createHTML("span",{id:c.id+"_voiceDesc","class":"voiceLabel",style:"display:none;"},c.settings.title),a+=b.createHTML("a",{id:c.id+"_text",tabindex:-1,href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},b.encode(c.settings.title))+"</td>",a+="<td>"+b.createHTML("a",{id:c.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},'<span><span style="display:none;" class="mceIconOnly" aria-hidden="true">▼</span></span>')+"</td>",a+="</tr></tbody></table></span>",a},showMenu:function(){var e=this,f,g=b.get(this.id),h;if(e.isDisabled()||e.items.length==0)return;if(e.menu&&e.menu.isMenuVisible)return e.hideMenu();e.isMenuRendered||(e.renderMenu(),e.isMenuRendered=!0),f=b.getPos(g),h=e.menu,h.settings.offset_x=f.x,h.settings.offset_y=f.y,h.settings.keyboard_focus=!a.isOpera,e.oldID&&h.items[e.oldID].setSelected(0),d(e.items,function(a){a.value===e.selectedValue&&(h.items[a.id].setSelected(1),e.oldID=a.id)}),h.showMenu(0,g.clientHeight),c.add(b.doc,"mousedown",e.hideMenu,e),b.addClass(e.id,e.classPrefix+"Selected")},hideMenu:function(a){var d=this;if(d.menu&&d.menu.isMenuVisible){b.removeClass(d.id,d.classPrefix+"Selected");if(!(!a||a.type!="mousedown"||a.target.id!=d.id+"_text"&&a.target.id!=d.id+"_open"))return;if(!a||!b.getParent(a.target,".mceMenu"))b.removeClass(d.id,d.classPrefix+"Selected"),c.remove(b.doc,"mousedown",d.hideMenu,d),d.menu.hideMenu()}},renderMenu:function(){var a=this,c;c=a.settings.control_manager.createDropMenu(a.id+"_menu",{menu_line:1,"class":a.classPrefix+"Menu mceNoIcons",max_width:150,max_height:150}),c.onHideMenu.add(function(){a.hideMenu(),a.focus()}),c.add({title:a.settings.title,"class":"mceMenuItemTitle",onclick:function(){a.settings.onselect("")!==!1&&a.select("")}}),d(a.items,function(d){d.value===undefined?c.add({title:d.title,role:"option","class":"mceMenuItemTitle",onclick:function(){a.settings.onselect("")!==!1&&a.select("")}}):(d.id=b.uniqueId(),d.role="option",d.onclick=function(){a.settings.onselect(d.value)!==!1&&a.select(d.value)},c.add(d))}),a.onRenderMenu.dispatch(a,c),a.menu=c},postRender:function(){var d=this,e=d.classPrefix;c.add(d.id,"click",d.showMenu,d),c.add(d.id,"keydown",function(a){a.keyCode==32&&(d.showMenu(a),c.cancel(a))}),c.add(d.id,"focus",function(){d._focused||(d.keyDownHandler=c.add(d.id,"keydown",function(a){a.keyCode==40&&(d.showMenu(),c.cancel(a))}),d.keyPressHandler=c.add(d.id,"keypress",function(a){var b;a.keyCode==13&&(b=d.selectedValue,d.selectedValue=null,c.cancel(a),d.settings.onselect(b))})),d._focused=1}),c.add(d.id,"blur",function(){c.remove(d.id,"keydown",d.keyDownHandler),c.remove(d.id,"keypress",d.keyPressHandler),d._focused=0});if(a.isIE6||!b.boxModel)c.add(d.id,"mouseover",function(){b.hasClass(d.id,e+"Disabled")||b.addClass(d.id,e+"Hover")}),c.add(d.id,"mouseout",function(){b.hasClass(d.id,e+"Disabled")||b.removeClass(d.id,e+"Hover")});d.onPostRender.dispatch(d,b.get(d.id))},destroy:function(){this.parent(),c.clear(this.id+"_text"),c.clear(this.id+"_open")}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.each,e=a.util.Dispatcher;a.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(a,b){this.parent(a,b),this.classPrefix="mceNativeListBox"},setDisabled:function(a){b.get(this.id).disabled=a,this.setAriaProperty("disabled",a)},isDisabled:function(){return b.get(this.id).disabled},select:function(a){var b=this,c,e;if(a==undefined)return b.selectByIndex(-1);a&&a.call?e=a:e=function(b){return b==a},a!=b.selectedValue&&(d(b.items,function(a,d){if(e(a.value))return c=1,b.selectByIndex(d),!1}),c||b.selectByIndex(-1))},selectByIndex:function(a){b.get(this.id).selectedIndex=a+1,this.selectedValue=this.items[a]?this.items[a].value:null},add:function(a,c,d){var e,f=this;d=d||{},d.value=c,f.isRendered()&&b.add(b.get(this.id),"option",d,a),e={title:a,value:c,attribs:d},f.items.push(e),f.onAdd.dispatch(f,e)},getLength:function(){return this.items.length},renderHTML:function(){var a,c=this;return a=b.createHTML("option",{value:""},"-- "+c.settings.title+" --"),d(c.items,function(c){a+=b.createHTML("option",{value:c.value},c.title)}),a=b.createHTML("select",{id:c.id,"class":"mceNativeListBox","aria-labelledby":c.id+"_aria"},a),a+=b.createHTML("span",{id:c.id+"_aria",style:"display: none"},c.settings.title),a},postRender:function(){function g(a){var b=d.items[a.target.selectedIndex-1];b&&(b=b.value)&&(d.onChange.dispatch(d,b),d.settings.onselect&&d.settings.onselect(b))}var d=this,e,f=!0;d.rendered=!0,c.add(d.id,"change",g),c.add(d.id,"keydown",function(b){var h;c.remove(d.id,"change",e),f=!1,h=c.add(d.id,"blur",function(){if(f)return;f=!0,c.add(d.id,"change",g),c.remove(d.id,"blur",h)});if(!(!a.isWebKit||b.keyCode!=37&&b.keyCode!=39))return c.prevent(b);if(b.keyCode==13||b.keyCode==32)return g(b),c.cancel(b)}),d.onPostRender.dispatch(d,b.get(d.id))}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.each;a.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(c,d,e){this.parent(c,d,e),this.onRenderMenu=new a.util.Dispatcher(this),d.menu_container=d.menu_container||b.doc.body},showMenu:function(){var a=this,d,e,f=b.get(a.id),g;if(a.isDisabled())return;a.isMenuRendered||(a.renderMenu(),a.isMenuRendered=!0);if(a.isMenuVisible)return a.hideMenu();d=b.getPos(a.settings.menu_container),e=b.getPos(f),g=a.menu,g.settings.offset_x=e.x,g.settings.offset_y=e.y,g.settings.vp_offset_x=e.x,g.settings.vp_offset_y=e.y,g.settings.keyboard_focus=a._focused,g.showMenu(0,f.clientHeight),c.add(b.doc,"mousedown",a.hideMenu,a),a.setState("Selected",1),a.isMenuVisible=1},renderMenu:function(){var a=this,b;b=a.settings.control_manager.createDropMenu(a.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:a.settings.icons}),b.onHideMenu.add(function(){a.hideMenu(),a.focus()}),a.onRenderMenu.dispatch(a,b),a.menu=b},hideMenu:function(a){var d=this;if(a&&a.type=="mousedown"&&b.getParent(a.target,function(a){return a.id===d.id||a.id===d.id+"_open"}))return;if(!a||!b.getParent(a.target,".mceMenu"))d.setState("Selected",0),c.remove(b.doc,"mousedown",d.hideMenu,d),d.menu&&d.menu.hideMenu();d.isMenuVisible=0},postRender:function(){var a=this,b=a.settings;c.add(a.id,"click",function(){a.isDisabled()||(b.onclick&&b.onclick(a.value),a.showMenu())})}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.each;a.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(a,b,c){this.parent(a,b,c),this.classPrefix="mceSplitButton"},renderHTML:function(){var a,c=this,d=c.settings,e;return a="<tbody><tr>",d.image?e=b.createHTML("img ",{src:d.image,role:"presentation","class":"mceAction "+d["class"]}):e=b.createHTML("span",{"class":"mceAction "+d["class"]},""),e+=b.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:c.id+"_voice",style:"display:none;"},d.title),a+="<td >"+b.createHTML("a",{role:"button",id:c.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+d["class"],onclick:"return false;",onmousedown:"return false;",title:d.title},e)+"</td>",e=b.createHTML("span",{"class":"mceOpen "+d["class"]},'<span style="display:none;" class="mceIconOnly" aria-hidden="true">▼</span>'),a+="<td >"+b.createHTML("a",{role:"button",id:c.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+d["class"],onclick:"return false;",onmousedown:"return false;",title:d.title},e)+"</td>",a+="</tr></tbody>",a=b.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+d["class"],cellpadding:"0",cellspacing:"0",title:d.title},a),b.createHTML("div",{id:c.id,role:"button",tabindex:"0","aria-labelledby":c.id+"_voice","aria-haspopup":"true"},a)},postRender:function(){var d=this,e=d.settings,f;e.onclick&&(f=function(a){d.isDisabled()||(e.onclick(d.value),c.cancel(a))},c.add(d.id+"_action","click",f),c.add(d.id,["click","keydown"],function(a){var b=32,e=14,g=13,h=38,i=40;if((a.keyCode===32||a.keyCode===13||a.keyCode===14)&&!a.altKey&&!a.ctrlKey&&!a.metaKey)f(),c.cancel(a);else if(a.type==="click"||a.keyCode===i)d.showMenu(),c.cancel(a)})),c.add(d.id+"_open","click",function(a){d.showMenu(),c.cancel(a)}),c.add([d.id,d.id+"_open"],"focus",function(){d._focused=1}),c.add([d.id,d.id+"_open"],"blur",function(){d._focused=0});if(a.isIE6||!b.boxModel)c.add(d.id,"mouseover",function(){b.hasClass(d.id,"mceSplitButtonDisabled")||b.addClass(d.id,"mceSplitButtonHover")}),c.add(d.id,"mouseout",function(){b.hasClass(d.id,"mceSplitButtonDisabled")||b.removeClass(d.id,"mceSplitButtonHover")})},destroy:function(){this.parent(),c.clear(this.id+"_action"),c.clear(this.id+"_open"),c.clear(this.id)}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.is,e=a.each;a.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(b,c,d){var e=this;e.parent(b,c,d),e.settings=c=a.extend({colors:"000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,008000,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF",grid_width:8,default_color:"#888888"},e.settings),e.onShowMenu=new a.util.Dispatcher(e),e.onHideMenu=new a.util.Dispatcher(e),e.value=c.default_color},showMenu:function(){var a=this,d,e,f,g;if(a.isDisabled())return;a.isMenuRendered||(a.renderMenu(),a.isMenuRendered=!0);if(a.isMenuVisible)return a.hideMenu();f=b.get(a.id),b.show(a.id+"_menu"),b.addClass(f,"mceSplitButtonSelected"),g=b.getPos(f),b.setStyles(a.id+"_menu",{left:g.x,top:g.y+f.clientHeight,zIndex:2e5}),f=0,c.add(b.doc,"mousedown",a.hideMenu,a),a.onShowMenu.dispatch(a),a._focused&&(a._keyHandler=c.add(a.id+"_menu","keydown",function(b){b.keyCode==27&&a.hideMenu()}),b.select("a",a.id+"_menu")[0].focus()),a.isMenuVisible=1},hideMenu:function(a){var d=this;if(d.isMenuVisible){if(a&&a.type=="mousedown"&&b.getParent(a.target,function(a){return a.id===d.id+"_open"}))return;if(!a||!b.getParent(a.target,".mceSplitButtonMenu"))b.removeClass(d.id,"mceSplitButtonSelected"),c.remove(b.doc,"mousedown",d.hideMenu,d),c.remove(d.id+"_menu","keydown",d._keyHandler),b.hide(d.id+"_menu");d.isMenuVisible=0,d.onHideMenu.dispatch()}},renderMenu:function(){var f=this,g,h=0,i=f.settings,j,k,l,m,n;return m=b.add(i.menu_container,"div",{role:"listbox",id:f.id+"_menu","class":i.menu_class+" "+i["class"],style:"position:absolute;left:0;top:-1000px;"}),g=b.add(m,"div",{"class":i["class"]+" mceSplitButtonMenu"}),b.add(g,"span",{"class":"mceMenuLine"}),j=b.add(g,"table",{role:"presentation","class":"mceColorSplitMenu"}),k=b.add(j,"tbody"),h=0,e(d(i.colors,"array")?i.colors:i.colors.split(","),function(c){c=c.replace(/^#/,""),h--||(l=b.add(k,"tr"),h=i.grid_width-1),j=b.add(l,"td");var d={href:"javascript:;",style:{backgroundColor:"#"+c},title:f.editor.getLang("colors."+c,c),"data-mce-color":"#"+c};a.isIE||(d.role="option"),j=b.add(j,"a",d),f.editor.forcedHighContrastMode&&(j=b.add(j,"canvas",{width:16,height:16,"aria-hidden":"true"}),j.getContext&&(n=j.getContext("2d"))?(n.fillStyle="#"+c,n.fillRect(0,0,16,16)):b.remove(j))}),i.more_colors_func&&(j=b.add(k,"tr"),j=b.add(j,"td",{colspan:i.grid_width,"class":"mceMoreColors"}),j=b.add(j,"a",{role:"option",id:f.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},i.more_colors_title),c.add(j,"click",function(a){return i.more_colors_func.call(i.more_colors_scope||this),c.cancel(a)})),b.addClass(g,"mceColorSplitMenu"),new a.ui.KeyboardNavigation({root:f.id+"_menu",items:b.select("a",f.id+"_menu"),onCancel:function(){f.hideMenu(),f.focus()}}),c.add(f.id+"_menu","mousedown",function(a){return c.cancel(a)}),c.add(f.id+"_menu","click",function(a){var d;return a=b.getParent(a.target,"a",k),a&&a.nodeName.toLowerCase()=="a"&&(d=a.getAttribute("data-mce-color"))&&f.setColor(d),c.cancel(a)}),m},setColor:function(a){this.displayColor(a),this.hideMenu(),this.settings.onselect(a)},displayColor:function(a){var c=this;b.setStyle(c.id+"_preview","backgroundColor",a),c.value=a},postRender:function(){var a=this,c=a.id;a.parent(),b.add(c+"_action","div",{id:c+"_preview","class":"mceColorPreview"}),b.setStyle(a.id+"_preview","backgroundColor",a.value)},destroy:function(){this.parent(),c.clear(this.id+"_menu"),c.clear(this.id+"_more"),b.remove(this.id+"_menu")}})}(tinymce),function(a){var b=a.DOM,c=a.each,d=a.dom.Event;a.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var c=this,d=[],e=c.controls,f=a.each,g=c.settings;return d.push('<div id="'+c.id+'" role="group" aria-labelledby="'+c.id+'_voice">'),d.push("<span role='application'>"),d.push('<span id="'+c.id+'_voice" class="mceVoiceLabel" style="display:none;">'+b.encode(g.name)+"</span>"),f(e,function(a){d.push(a.renderHTML())}),d.push("</span>"),d.push("</div>"),d.join("")},focus:function(){var a=this;b.get(a.id).focus()},postRender:function(){var d=this,e=[];c(d.controls,function(a){c(a.controls,function(a){a.id&&e.push(a)})}),d.keyNav=new a.ui.KeyboardNavigation({root:d.id,items:e,onCancel:function(){a.isWebKit&&b.get(d.editor.id+"_ifr").focus(),d.editor.focus()},excludeFromTabOrder:!d.settings.tab_focus_toolbar})},destroy:function(){var a=this;a.parent(),a.keyNav.destroy(),d.clear(a.id)}})}(tinymce),function(a){var b=a.DOM,c=a.each;a.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var a=this,c="",d,e,f=a.settings,g,h,i,j;j=a.controls;for(g=0;g<j.length;g++)e=j[g],h=j[g-1],i=j[g+1],g===0&&(d="mceToolbarStart",e.Button?d+=" mceToolbarStartButton":e.SplitButton?d+=" mceToolbarStartSplitButton":e.ListBox&&(d+=" mceToolbarStartListBox"),c+=b.createHTML("td",{"class":d},b.createHTML("span",null,"<!-- IE -->"))),h&&e.ListBox&&(h.Button||h.SplitButton)&&(c+=b.createHTML("td",{"class":"mceToolbarEnd"},b.createHTML("span",null,"<!-- IE -->"))),b.stdMode?c+='<td style="position: relative">'+e.renderHTML()+"</td>":c+="<td>"+e.renderHTML()+"</td>",i&&e.ListBox&&(i.Button||i.SplitButton)&&(c+=b.createHTML("td",{"class":"mceToolbarStart"},b.createHTML("span",null,"<!-- IE -->")));return d="mceToolbarEnd",e.Button?d+=" mceToolbarEndButton":e.SplitButton?d+=" mceToolbarEndSplitButton":e.ListBox&&(d+=" mceToolbarEndListBox"),c+=b.createHTML("td",{"class":d},b.createHTML("span",null,"<!-- IE -->")),b.createHTML("table",{id:a.id,"class":"mceToolbar"+(f["class"]?" "+f["class"]:""),cellpadding:"0",cellspacing:"0",align:a.settings.align||"",role:"presentation",tabindex:"-1"},"<tbody><tr>"+c+"</tr></tbody>")}})}(tinymce),function(a){var b=a.util.Dispatcher,c=a.each;a.create("tinymce.AddOnManager",{AddOnManager:function(){var a=this;a.items=[],a.urls={},a.lookup={},a.onAdd=new b(a)},get:function(a){return this.lookup[a]?this.lookup[a].instance:undefined},dependencies:function(a){var b;return this.lookup[a]&&(b=this.lookup[a].dependencies),b||[]},requireLangPack:function(b){var c=a.settings;c&&c.language&&c.language_load!==!1&&a.ScriptLoader.add(this.urls[b]+"/langs/"+c.language+".js")},add:function(a,b,c){return this.items.push(b),this.lookup[a]={instance:b,dependencies:c},this.onAdd.dispatch(this,a,b),b},createUrl:function(a,b){return typeof b=="object"?b:{prefix:a.prefix,resource:b,suffix:a.suffix}},addComponents:function(b,c){var d=this.urls[b];a.each(c,function(b){a.ScriptLoader.add(d+"/"+b)})},load:function(b,c,d,e){function h(){var g=f.dependencies(b);a.each(g,function(a){var b=f.createUrl(c,a);f.load(b.resource,b,undefined,undefined)}),d&&(e?d.call(e):d.call(a.ScriptLoader))}var f=this,g=c;if(f.urls[b])return;typeof c=="object"&&(g=c.prefix+c.resource+c.suffix),g.indexOf("/")!=0&&g.indexOf("://")==-1&&(g=a.baseURL+"/"+g),f.urls[b]=g.substring(0,g.lastIndexOf("/")),f.lookup[b]?h():a.ScriptLoader.add(g,h,e)}}),a.PluginManager=new a.AddOnManager,a.ThemeManager=new a.AddOnManager}(tinymce),function(a){var b=a.each,c=a.extend,d=a.DOM,e=a.dom.Event,f=a.ThemeManager,g=a.PluginManager,h=a.explode,i=a.util.Dispatcher,j,k=0;a.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(a.documentBaseURL)||(a.documentBaseURL+="/"),a.baseURL=(new a.util.URI(a.documentBaseURL)).toAbsolute(a.baseURL),a.baseURI=new a.util.URI(a.baseURL),a.onBeforeUnload=new i(a),e.add(window,"beforeunload",function(b){a.onBeforeUnload.dispatch(a,b)}),a.onAddEditor=new i(a),a.onRemoveEditor=new i(a),a.EditorManager=c(a,{editors:[],i18n:{},activeEditor:null,init:function(f){function o(b,c,d){var e=b[c];if(!e)return;return a.is(e,"string")&&(d=e.replace(/\.\w+$/,""),d=d?a.resolve(d):0,e=a.resolve(e)),e.apply(d||this,Array.prototype.slice.call(arguments,2))}var g=this,i,j=a.ScriptLoader,l,m=[],n;f=c({theme:"simple",language:"en"},f),g.settings=f,e.add(document,"init",function(){var c,e;o(f,"onpageload");switch(f.mode){case"exact":c=f.elements||"",c.length>0&&b(h(c),function(c){d.get(c)?(n=new a.Editor(c,f),m.push(n),n.render(1)):b(document.forms,function(e){b(e.elements,function(b){b.name===c&&(c="mce_editor_"+k++,d.setAttrib(b,"id",c),n=new a.Editor(c,f),m.push(n),n.render(1))})})});break;case"textareas":case"specific_textareas":function i(a,b){return b.constructor===RegExp?b.test(a.className):d.hasClass(a,b)}b(d.select("textarea"),function(b){if(f.editor_deselector&&i(b,f.editor_deselector))return;if(!f.editor_selector||i(b,f.editor_selector)){l=d.get(b.name),!b.id&&!l&&(b.id=b.name);if(!b.id||g.get(b.id))b.id=d.uniqueId();n=new a.Editor(b.id,f),m.push(n),n.render(1)}})}f.oninit&&(c=e=0,b(m,function(a){e++,a.initialized?c++:a.onInit.add(function(){c++,c==e&&o(f,"oninit")}),c==e&&o(f,"oninit")}))})},get:function(a){return a===j?this.editors:this.editors[a]},getInstanceById:function(a){return this.get(a)},add:function(b){var c=this,d=c.editors;return d[b.id]=b,d.push(b),c._setActive(b),c.onAddEditor.dispatch(c,b),a.adapter&&a.adapter.patchEditor(b),b},remove:function(a){var b=this,c,d=b.editors;if(!d[a.id])return null;delete d[a.id];for(c=0;c<d.length;c++)if(d[c]==a){d.splice(c,1);break}return b.activeEditor==a&&b._setActive(d[0]),a.destroy(),b.onRemoveEditor.dispatch(b,a),a},execCommand:function(b,c,d){var e=this,f=e.get(d),g;switch(b){case"mceFocus":return f.focus(),!0;case"mceAddEditor":case"mceAddControl":return e.get(d)||(new a.Editor(d,e.settings)).render(),!0;case"mceAddFrameControl":g=d.window,g.tinyMCE=tinyMCE,g.tinymce=a,a.DOM.doc=g.document,a.DOM.win=g,f=new a.Editor(d.element_id,d),f.render();if(a.isIE){function h(){f.destroy(),g.detachEvent("onunload",h),g=g.tinyMCE=g.tinymce=null}g.attachEvent("onunload",h)}return d.page_window=null,!0;case"mceRemoveEditor":case"mceRemoveControl":return f&&f.remove(),!0;case"mceToggleEditor":if(!f)return e.execCommand("mceAddControl",0,d),!0;return f.isHidden()?f.show():f.hide(),!0}return e.activeEditor?e.activeEditor.execCommand(b,c,d):!1},execInstanceCommand:function(a,b,c,d){var e=this.get(a);return e?e.execCommand(b,c,d):!1},triggerSave:function(){b(this.editors,function(a){a.save()})},addI18n:function(c,d){var e,f=this.i18n;a.is(c,"string")?b(d,function(a,b){f[c+"."+b]=a}):b(c,function(a,c){b(a,function(a,d){b(a,function(a,b){d==="common"?f[c+"."+b]=a:f[c+"."+d+"."+b]=a})})})},_setActive:function(a){this.selectedInstance=this.activeEditor=a}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.extend,e=a.util.Dispatcher,f=a.each,g=a.isGecko,h=a.isIE,i=a.isWebKit,j=a.is,k=a.ThemeManager,l=a.PluginManager,m=a.inArray,n=a.grep,o=a.explode,p=a.VK;a.create("tinymce.Editor",{Editor:function(b,c){var g=this;g.id=g.editorId=b,g.execCommands={},g.queryStateCommands={},g.queryValueCommands={},g.isNotDirty=!1,g.plugins={},f(["onPreInit","onBeforeRenderUI","onPostRender","onLoad","onInit","onRemove","onActivate","onDeactivate","onClick","onEvent","onMouseUp","onMouseDown","onDblClick","onKeyDown","onKeyUp","onKeyPress","onContextMenu","onSubmit","onReset","onPaste","onPreProcess","onPostProcess","onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent","onLoadContent","onSaveContent","onNodeChange","onChange","onBeforeExecCommand","onExecCommand","onUndo","onRedo","onVisualAid","onSetProgressState","onSetAttrib"],function(a){g[a]=new e(g)}),g.settings=c=d({id:b,language:"en",docs_language:"en",theme:"simple",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:a.documentBaseURL,add_form_submit_trigger:1,submit_patch:1,add_unload_trigger:1,convert_urls:1,relative_urls:1,remove_script_host:1,table_inline_editing:0,object_resizing:1,cleanup:1,accessibility_focus:1,custom_shortcuts:1,custom_undo_redo_keyboard_shortcuts:1,custom_undo_redo_restore_selection:1,custom_undo_redo:1,doctype:a.isIE6?'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">':"<!DOCTYPE>",visual_table_class:"mceItemTable",visual:1,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",apply_source_formatting:1,directionality:"ltr",forced_root_block:"p",hidden_input:1,padd_empty_editor:1,render_ui:1,init_theme:1,force_p_newlines:1,indentation:"30px",keep_styles:1,fix_table_elements:1,inline_styles:1,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr",validate:!0,entity_encoding:"named",url_converter:g.convertURL,url_converter_scope:g,ie7_compat:!0},c),g.documentBaseURI=new a.util.URI(c.document_base_url||a.documentBaseURL,{base_uri:tinyMCE.baseURI}),g.baseURI=a.baseURI,g.contentCSS=[],g.execCallback("setup",g)},render:function(d){function j(){g.language&&g.language_load!==!1&&i.add(a.baseURL+"/langs/"+g.language+".js"),g.theme&&g.theme.charAt(0)!="-"&&!k.urls[g.theme]&&k.load(g.theme,"themes/"+g.theme+"/editor_template"+a.suffix+".js"),f(o(g.plugins),function(b){if(b&&!l.urls[b])if(b.charAt(0)=="-"){b=b.substr(1,b.length);var c=l.dependencies(b);f(c,function(b){var c={prefix:"plugins/",resource:b,suffix:"/editor_plugin"+a.suffix+".js"},b=l.createUrl(c,b);l.load(b.resource,b)})}else{if(b=="safari")return;l.load(b,{prefix:"plugins/",resource:b,suffix:"/editor_plugin"+a.suffix+".js"})}}),i.loadQueue(function(){e.removed||e.init()})}var e=this,g=e.settings,h=e.id,i=a.ScriptLoader;if(!c.domLoaded){c.add(document,"init",function(){e.render()});return}tinyMCE.settings=g;if(!e.getElement())return;if(a.isIDevice&&!a.isIOS5)return;!/TEXTAREA|INPUT/i.test(e.getElement().nodeName)&&g.hidden_input&&b.getParent(h,"form")&&b.insertAfter(b.create("input",{type:"hidden",name:h}),h),a.WindowManager&&(e.windowManager=new a.WindowManager(e)),g.encoding=="xml"&&e.onGetContent.add(function(a,c){c.save&&(c.content=b.encode(c.content))}),g.add_form_submit_trigger&&e.onSubmit.addToTop(function(){e.initialized&&(e.save(),e.isNotDirty=1)}),g.add_unload_trigger&&(e._beforeUnload=tinyMCE.onBeforeUnload.add(function(){e.initialized&&!e.destroyed&&!e.isHidden()&&e.save({format:"raw",no_events:!0})})),a.addUnload(e.destroy,e),g.submit_patch&&e.onBeforeRenderUI.add(function(){var b=e.getElement().form;if(!b)return;if(b._mceOldSubmit)return;!b.submit.nodeType&&!b.submit.length&&(e.formElement=b,b._mceOldSubmit=b.submit,b.submit=function(){return a.triggerSave(),e.isNotDirty=1,e.formElement._mceOldSubmit(e.formElement)}),b=null}),j()},init:function(){function w(b){var c=l.get(b),e=l.urls[b]||a.documentBaseURL.replace(/\/$/,""),g;c&&a.inArray(v,b)===-1&&(f(l.dependencies(b),function(a){w(a)}),g=new c(d,e),d.plugins[b]=g,g.init&&(g.init(d,e),v.push(b)))}var c,d=this,e=d.settings,i,j,m=d.getElement(),n,p,q,r,s,t,u,v=[];a.add(d),e.aria_label=e.aria_label||b.getAttrib(m,"aria-label",d.getLang("aria.rich_text_area")),e.theme&&(e.theme=e.theme.replace(/-/,""),n=k.get(e.theme),d.theme=new n,d.theme.init&&e.init_theme&&d.theme.init(d,k.urls[e.theme]||a.documentBaseURL.replace(/\/$/,""))),f(o(e.plugins.replace(/\-/g,"")),w),e.popup_css!==!1&&(e.popup_css?e.popup_css=d.documentBaseURI.toAbsolute(e.popup_css):e.popup_css=d.baseURI.toAbsolute("themes/"+e.theme+"/skins/"+e.skin+"/dialog.css")),e.popup_css_add&&(e.popup_css+=","+d.documentBaseURI.toAbsolute(e.popup_css_add)),d.controlManager=new a.ControlManager(d),e.custom_undo_redo&&(d.onBeforeExecCommand.add(function(a,b,c,e,f){b!="Undo"&&b!="Redo"&&b!="mceRepaint"&&(!f||!f.skip_undo)&&d.undoManager.beforeChange()}),d.onExecCommand.add(function(a,b,c,e,f){b!="Undo"&&b!="Redo"&&b!="mceRepaint"&&(!f||!f.skip_undo)&&d.undoManager.add()})),d.onExecCommand.add(function(a,b){/^(FontName|FontSize)$/.test(b)||d.nodeChanged()});if(g){function x(a,b){(!b||!b.initial)&&d.execCommand("mceRepaint")}d.onUndo.add(x),d.onRedo.add(x),d.onSetContent.add(x)}d.onBeforeRenderUI.dispatch(d,d.controlManager),e.render_ui&&(i=e.width||m.style.width||m.offsetWidth,j=e.height||m.style.height||m.offsetHeight,d.orgDisplay=m.style.display,t=/^[0-9\.]+(|px)$/i,t.test(""+i)&&(i=Math.max(parseInt(i)+(n.deltaWidth||0),100)),t.test(""+j)&&(j=Math.max(parseInt(j)+(n.deltaHeight||0),100)),n=d.theme.renderUI({targetNode:m,width:i,height:j,deltaWidth:e.delta_width,deltaHeight:e.delta_height}),d.editorContainer=n.editorContainer),document.domain&&location.hostname!=document.domain&&(a.relaxedDomain=document.domain),b.setStyles(n.sizeContainer||n.editorContainer,{width:i,height:j}),e.content_css&&a.each(o(e.content_css),function(a){d.contentCSS.push(d.documentBaseURI.toAbsolute(a))}),j=(n.iframeHeight||j)+(typeof j=="number"?n.deltaHeight||0:""),j<100&&(j=100),d.iframeHTML=e.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">',e.document_base_url!=a.documentBaseURL&&(d.iframeHTML+='<base href="'+d.documentBaseURI.getURI()+'" />'),e.ie7_compat?d.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />':d.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=edge" />',d.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';for(u=0;u<d.contentCSS.length;u++)d.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+d.contentCSS[u]+'" />';r=e.body_id||"tinymce",r.indexOf("=")!=-1&&(r=d.getParam("body_id","","hash"),r=r[d.id]||r),s=e.body_class||"",s.indexOf("=")!=-1&&(s=d.getParam("body_class","","hash"),s=s[d.id]||""),d.iframeHTML+='</head><body id="'+r+'" class="mceContentBody '+s+'" onload="window.parent.tinyMCE.get(\''+d.id+"').onLoad.dispatch();\"><br></body></html>",a.relaxedDomain&&(h||a.isOpera&&parseFloat(opera.version())<11)&&(q='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+d.id+'");document.write(ed.iframeHTML);document.close();ed.setupIframe();})()'),c=b.add(n.iframeContainer,"iframe",{id:d.id+"_ifr",src:q||'javascript:""',frameBorder:"0",allowTransparency:"true",title:e.aria_label,style:{width:"100%",height:j,display:"block"}}),d.contentAreaContainer=n.iframeContainer,b.get(n.editorContainer).style.display=d.orgDisplay,b.get(d.id).style.display="none",b.setAttrib(d.id,"aria-hidden",!0),(!a.relaxedDomain||!q)&&d.setupIframe(),m=c=n=null},setupIframe:function(){var d=this,e=d.settings,i=b.get(d.id),j=d.getDoc(),k,l;if(!h||!a.relaxedDomain)j.open(),j.write(d.iframeHTML),j.close(),a.relaxedDomain&&(j.domain=a.relaxedDomain);l=d.getBody(),l.disabled=!0,e.readonly||(l.contentEditable=!0),l.disabled=!1,d.schema=new a.html.Schema(e),d.dom=new a.dom.DOMUtils(d.getDoc(),{keep_values:!0,url_converter:d.convertURL,url_converter_scope:d,hex_colors:e.force_hex_style_colors,class_filter:e.class_filter,update_styles:1,fix_ie_paragraphs:1,schema:d.schema}),d.parser=new a.html.DomParser(e,d.schema),d.settings.allow_html_in_named_anchor||d.parser.addAttributeFilter("name",function(a,b){var c=a.length,d,e,f,g;while(c--){g=a[c];if(g.name==="a"&&g.firstChild){f=g.parent,d=g.lastChild;do e=d.prev,f.insert(d,g),d=e;while(d)}}}),d.parser.addAttributeFilter("src,href,style",function(a,b){var c=a.length,e,f=d.dom,g,h;while(c--)e=a[c],g=e.attr(b),h="data-mce-"+b,e.attributes.map[h]||(b==="style"?e.attr(h,f.serializeStyle(f.parseStyle(g),e.name)):e.attr(h,d.convertURL(g,b,e.name)))}),d.parser.addNodeFilter("script",function(a,b){var c=a.length,d;while(c--)d=a[c],d.attr("type","mce-"+(d.attr("type")||"text/javascript"))}),d.parser.addNodeFilter("#cdata",function(a,b){var c=a.length,d;while(c--)d=a[c],d.type=8,d.name="#comment",d.value="[CDATA["+d.value+"]]"}),d.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(b,c){var e=b.length,f,g=d.schema.getNonEmptyElements();while(e--)f=b[e],f.isEmpty(g)&&(f.empty().append(new a.html.Node("br",1)).shortEnded=!0)}),d.serializer=new a.dom.Serializer(e,d.dom,d.schema),d.selection=new a.dom.Selection(d.dom,d.getWin(),d.serializer),d.formatter=new a.Formatter(this),d.formatter.register({alignleft:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"}},{selector:"img,table",collapsed:!1,styles:{"float":"left"}}],aligncenter:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"}},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"}},{selector:"img,table",collapsed:!1,styles:{"float":"right"}}],alignfull:[{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"}}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:!1},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:!1},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(a){return!0},onformat:function(a,b,c){f(c,function(b,c){
d.dom.setAttrib(a,c,b)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]}),f("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(a){d.formatter.register(a,{block:a,remove:"all"})}),d.formatter.register(d.settings.formats),d.undoManager=new a.UndoManager(d),d.undoManager.onAdd.add(function(a,b){if(a.hasUndo())return d.onChange.dispatch(d,b,a)}),d.undoManager.onUndo.add(function(a,b){return d.onUndo.dispatch(d,b,a)}),d.undoManager.onRedo.add(function(a,b){return d.onRedo.dispatch(d,b,a)}),d.forceBlocks=new a.ForceBlocks(d,{forced_root_block:e.forced_root_block}),d.editorCommands=new a.EditorCommands(d),d.serializer.onPreProcess.add(function(a,b){return d.onPreProcess.dispatch(d,b,a)}),d.serializer.onPostProcess.add(function(a,b){return d.onPostProcess.dispatch(d,b,a)}),d.onPreInit.dispatch(d),e.gecko_spellcheck||(d.getBody().spellcheck=0),e.readonly||d._addEvents(),d.controlManager.onPostRender.dispatch(d,d.controlManager),d.onPostRender.dispatch(d),d.quirks=new a.util.Quirks(this),e.directionality&&(d.getBody().dir=e.directionality),e.nowrap&&(d.getBody().style.whiteSpace="nowrap"),e.handle_node_change_callback&&d.onNodeChange.add(function(a,b,c){d.execCallback("handle_node_change_callback",d.id,c,-1,-1,!0,d.selection.isCollapsed())}),e.save_callback&&d.onSaveContent.add(function(a,b){var c=d.execCallback("save_callback",d.id,b.content,d.getBody());c&&(b.content=c)}),e.onchange_callback&&d.onChange.add(function(a,b){d.execCallback("onchange_callback",d,b)}),e.protect&&d.onBeforeSetContent.add(function(a,b){e.protect&&f(e.protect,function(a){b.content=b.content.replace(a,function(a){return"<!--mce:protected "+escape(a)+"-->"})})}),e.convert_newlines_to_brs&&d.onBeforeSetContent.add(function(a,b){b.initial&&(b.content=b.content.replace(/\r?\n/g,"<br />"))}),e.preformatted&&d.onPostProcess.add(function(a,b){b.content=b.content.replace(/^\s*<pre.*?>/,""),b.content=b.content.replace(/<\/pre>\s*$/,""),b.set&&(b.content='<pre class="mceItemHidden">'+b.content+"</pre>")}),e.verify_css_classes&&(d.serializer.attribValueFilter=function(a,b){var c,e;return a=="class"?(d.classesRE||(e=d.dom.getClasses(),e.length>0&&(c="",f(e,function(a){c+=(c?"|":"")+a["class"]}),d.classesRE=new RegExp("("+c+")","gi"))),!d.classesRE||/(\bmceItem\w+\b|\bmceTemp\w+\b)/g.test(b)||d.classesRE.test(b)?b:""):b}),e.cleanup_callback&&(d.onBeforeSetContent.add(function(a,b){b.content=d.execCallback("cleanup_callback","insert_to_editor",b.content,b)}),d.onPreProcess.add(function(a,b){b.set&&d.execCallback("cleanup_callback","insert_to_editor_dom",b.node,b),b.get&&d.execCallback("cleanup_callback","get_from_editor_dom",b.node,b)}),d.onPostProcess.add(function(a,b){b.set&&(b.content=d.execCallback("cleanup_callback","insert_to_editor",b.content,b)),b.get&&(b.content=d.execCallback("cleanup_callback","get_from_editor",b.content,b))})),e.save_callback&&d.onGetContent.add(function(a,b){b.save&&(b.content=d.execCallback("save_callback",d.id,b.content,d.getBody()))}),e.handle_event_callback&&d.onEvent.add(function(a,b,e){d.execCallback("handle_event_callback",b,a,e)===!1&&c.cancel(b)}),d.onSetContent.add(function(){d.addVisual(d.getBody())}),e.padd_empty_editor&&d.onPostProcess.add(function(a,b){b.content=b.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")});if(g){function m(a,b){f(a.dom.select("a"),function(b){var c=b.parentNode;a.dom.isBlock(c)&&c.lastChild===b&&a.dom.add(c,"br",{"data-mce-bogus":1})})}d.onExecCommand.add(function(a,b){b==="CreateLink"&&m(a)}),d.onSetContent.add(d.selection.onSetContent.add(m))}d.load({initial:!0,format:"html"}),d.startContent=d.getContent({format:"raw"}),d.undoManager.add(),d.initialized=!0,d.onInit.dispatch(d),d.execCallback("setupcontent_callback",d.id,d.getBody(),d.getDoc()),d.execCallback("init_instance_callback",d),d.focus(!0),d.nodeChanged({initial:1}),f(d.contentCSS,function(a){d.dom.loadCSS(a)}),e.auto_focus&&setTimeout(function(){var b=a.get(e.auto_focus);b.selection.select(b.getBody(),1),b.selection.collapse(1),b.getBody().focus(),b.getWin().focus()},100),i=null},focus:function(b){var c,d=this,e=d.selection,f=d.settings.content_editable,g,h,i=d.getDoc();b||(g=e.getRng(),g.item&&(h=g.item(0)),d._refreshContentEditable(),f||d.getWin().focus(),a.isGecko&&d.getBody().focus(),h&&h.ownerDocument==i&&(g=i.body.createControlRange(),g.addElement(h),g.select())),a.activeEditor!=d&&((c=a.activeEditor)!=null&&c.onDeactivate.dispatch(c,d),d.onActivate.dispatch(d,c)),a._setActive(d)},execCallback:function(b){var c=this,d=c.settings[b],e;if(!d)return;return c.callbackLookup&&(e=c.callbackLookup[b])&&(d=e.func,e=e.scope),j(d,"string")&&(e=d.replace(/\.\w+$/,""),e=e?a.resolve(e):0,d=a.resolve(d),c.callbackLookup=c.callbackLookup||{},c.callbackLookup[b]={func:d,scope:e}),d.apply(e||c,Array.prototype.slice.call(arguments,1))},translate:function(b){var c=this.settings.language||"en",d=a.i18n;return b?d[c+"."+b]||b.replace(/{\#([^}]+)\}/g,function(a,b){return d[c+"."+b]||"{#"+b+"}"}):""},getLang:function(b,c){return a.i18n[(this.settings.language||"en")+"."+b]||(j(c)?c:"{#"+b+"}")},getParam:function(b,c,d){var e=a.trim,g=j(this.settings[b])?this.settings[b]:c,h;return d==="hash"?(h={},j(g,"string")?f(g.indexOf("=")>0?g.split(/[;,](?![^=;,]*(?:[;,]|$))/):g.split(","),function(a){a=a.split("="),a.length>1?h[e(a[0])]=e(a[1]):h[e(a[0])]=e(a)}):h=g,h):g},nodeChanged:function(a){var b=this,c=b.selection,d=c.getStart()||b.getBody();b.initialized&&(a=a||{},d=h&&d.ownerDocument!=b.getDoc()?b.getBody():d,a.parents=[],b.dom.getParent(d,function(b){if(b.nodeName=="BODY")return!0;a.parents.push(b)}),b.onNodeChange.dispatch(b,a?a.controlManager||b.controlManager:b.controlManager,d,c.isCollapsed(),a))},addButton:function(a,b){var c=this;c.buttons=c.buttons||{},c.buttons[a]=b},addCommand:function(a,b,c){this.execCommands[a]={func:b,scope:c||this}},addQueryStateHandler:function(a,b,c){this.queryStateCommands[a]={func:b,scope:c||this}},addQueryValueHandler:function(a,b,c){this.queryValueCommands[a]={func:b,scope:c||this}},addShortcut:function(a,b,c,d){var e=this,g;return e.settings.custom_shortcuts?(e.shortcuts=e.shortcuts||{},j(c,"string")&&(g=c,c=function(){e.execCommand(g,!1,null)}),j(c,"object")&&(g=c,c=function(){e.execCommand(g[0],g[1],g[2])}),f(o(a),function(a){var g={func:c,scope:d||this,desc:b,alt:!1,ctrl:!1,shift:!1};f(o(a,"+"),function(a){switch(a){case"alt":case"ctrl":case"shift":g[a]=!0;break;default:g.charCode=a.charCodeAt(0),g.keyCode=a.toUpperCase().charCodeAt(0)}}),e.shortcuts[(g.ctrl?"ctrl":"")+","+(g.alt?"alt":"")+","+(g.shift?"shift":"")+","+g.keyCode]=g}),!0):!1},execCommand:function(a,b,c,d){var e=this,g=0,h,i;!/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(a)&&(!d||!d.skip_focus)&&e.focus(),h={},e.onBeforeExecCommand.dispatch(e,a,b,c,h);if(h.terminate)return!1;if(e.execCallback("execcommand_callback",e.id,e.selection.getNode(),a,b,c))return e.onExecCommand.dispatch(e,a,b,c,d),!0;if(h=e.execCommands[a]){i=h.func.call(h.scope,b,c);if(i!==!0)return e.onExecCommand.dispatch(e,a,b,c,d),i}f(e.plugins,function(f){if(f.execCommand&&f.execCommand(a,b,c))return e.onExecCommand.dispatch(e,a,b,c,d),g=1,!1});if(g)return!0;if(e.theme&&e.theme.execCommand&&e.theme.execCommand(a,b,c))return e.onExecCommand.dispatch(e,a,b,c,d),!0;if(e.editorCommands.execCommand(a,b,c))return e.onExecCommand.dispatch(e,a,b,c,d),!0;e.getDoc().execCommand(a,b,c),e.onExecCommand.dispatch(e,a,b,c,d)},queryCommandState:function(a){var b=this,c,d;if(b._isHidden())return;if(c=b.queryStateCommands[a]){d=c.func.call(c.scope);if(d!==!0)return d}c=b.editorCommands.queryCommandState(a);if(c!==-1)return c;try{return this.getDoc().queryCommandState(a)}catch(e){}},queryCommandValue:function(a){var b=this,c,d;if(b._isHidden())return;if(c=b.queryValueCommands[a]){d=c.func.call(c.scope);if(d!==!0)return d}c=b.editorCommands.queryCommandValue(a);if(j(c))return c;try{return this.getDoc().queryCommandValue(a)}catch(e){}},show:function(){var a=this;b.show(a.getContainer()),b.hide(a.id),a.load()},hide:function(){var a=this,c=a.getDoc();h&&c&&c.execCommand("SelectAll"),a.save(),b.hide(a.getContainer()),b.setStyle(a.id,"display",a.orgDisplay)},isHidden:function(){return!b.isHidden(this.id)},setProgressState:function(a,b,c){return this.onSetProgressState.dispatch(this,a,b,c),a},load:function(a){var b=this,c=b.getElement(),d;if(c)return a=a||{},a.load=!0,d=b.setContent(j(c.value)?c.value:c.innerHTML,a),a.element=c,a.no_events||b.onLoadContent.dispatch(b,a),a.element=c=null,d},save:function(a){var c=this,d=c.getElement(),e,g;if(!d||!c.initialized)return;return a=a||{},a.save=!0,a.no_events||(c.undoManager.typing=!1,c.undoManager.add()),a.element=d,e=a.content=c.getContent(a),a.no_events||c.onSaveContent.dispatch(c,a),e=a.content,/TEXTAREA|INPUT/i.test(d.nodeName)?d.value=e:(d.innerHTML=e,(g=b.getParent(c.id,"form"))&&f(g.elements,function(a){if(a.name==c.id)return a.value=e,!1})),a.element=d=null,e},setContent:function(b,c){var d=this,e,f=d.getBody(),g;c=c||{},c.format=c.format||"html",c.set=!0,c.content=b,c.no_events||d.onBeforeSetContent.dispatch(d,c),b=c.content;if(!a.isIE&&(b.length===0||/^\s+$/.test(b))){g=d.settings.forced_root_block,g?b="<"+g+'><br data-mce-bogus="1"></'+g+">":b='<br data-mce-bogus="1">',f.innerHTML=b,d.selection.select(f,!0),d.selection.collapse(!0);return}return c.format!=="raw"&&(b=(new a.html.Serializer({},d.schema)).serialize(d.parser.parse(b))),c.content=a.trim(b),d.dom.setHTML(f,c.content),c.no_events||d.onSetContent.dispatch(d,c),d.selection.normalize(),c.content},getContent:function(b){var c=this,d;return b=b||{},b.format=b.format||"html",b.get=!0,b.no_events||c.onBeforeGetContent.dispatch(c,b),b.format=="raw"?d=c.getBody().innerHTML:d=c.serializer.serialize(c.getBody(),b),b.content=a.trim(d),b.no_events||c.onGetContent.dispatch(c,b),b.content},isDirty:function(){var b=this;return a.trim(b.startContent)!=a.trim(b.getContent({format:"raw",no_events:1}))&&!b.isNotDirty},getContainer:function(){var a=this;return a.container||(a.container=b.get(a.editorContainer||a.id+"_parent")),a.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return b.get(this.settings.content_element||this.id)},getWin:function(){var a=this,c;return a.contentWindow||(c=b.get(a.id+"_ifr"),c&&(a.contentWindow=c.contentWindow)),a.contentWindow},getDoc:function(){var a=this,b;return a.contentDocument||(b=a.getWin(),b&&(a.contentDocument=b.document)),a.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(a,b,c){var d=this,e=d.settings;return e.urlconverter_callback?d.execCallback("urlconverter_callback",a,c,!0,b):!e.convert_urls||c&&c.nodeName=="LINK"||a.indexOf("file:")===0?a:e.relative_urls?d.documentBaseURI.toRelative(a):(a=d.documentBaseURI.toAbsolute(a,e.remove_script_host),a)},addVisual:function(a){var b=this,c=b.settings;a=a||b.getBody(),j(b.hasVisual)||(b.hasVisual=c.visual),f(b.dom.select("table,a",a),function(a){var d;switch(a.nodeName){case"TABLE":d=b.dom.getAttrib(a,"border");if(!d||d=="0")b.hasVisual?b.dom.addClass(a,c.visual_table_class):b.dom.removeClass(a,c.visual_table_class);return;case"A":d=b.dom.getAttrib(a,"name"),d&&(b.hasVisual?b.dom.addClass(a,"mceItemAnchor"):b.dom.removeClass(a,"mceItemAnchor"));return}}),b.onVisualAid.dispatch(b,a,b.hasVisual)},remove:function(){var c=this,d=c.getContainer();c.removed=1,c.hide(),c.execCallback("remove_instance_callback",c),c.onRemove.dispatch(c),c.onExecCommand.listeners=[],a.remove(c),b.remove(d)},destroy:function(b){var d=this;if(d.destroyed)return;b||(a.removeUnload(d.destroy),tinyMCE.onBeforeUnload.remove(d._beforeUnload),d.theme&&d.theme.destroy&&d.theme.destroy(),d.controlManager.destroy(),d.selection.destroy(),d.dom.destroy(),d.settings.content_editable||(c.clear(d.getWin()),c.clear(d.getDoc())),c.clear(d.getBody()),c.clear(d.formElement)),d.formElement&&(d.formElement.submit=d.formElement._mceOldSubmit,d.formElement._mceOldSubmit=null),d.contentAreaContainer=d.formElement=d.container=d.settings.content_element=d.bodyElement=d.contentDocument=d.contentWindow=null,d.selection&&(d.selection=d.selection.win=d.selection.dom=d.selection.dom.doc=null),d.destroyed=1},_addEvents:function(){function k(a,b){var c=a.type;if(d.removed)return;d.onEvent.dispatch(d,a,b)!==!1&&d[j[a.fakeType||a.type]].dispatch(d,a,b)}var d=this,e,h=d.settings,i=d.dom,j={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"};f(j,function(a,c){switch(c){case"contextmenu":i.bind(d.getDoc(),c,k);break;case"paste":i.bind(d.getBody(),c,function(a){k(a)});break;case"submit":case"reset":i.bind(d.getElement().form||b.getParent(d.id,"form"),c,k);break;default:i.bind(h.content_editable?d.getBody():d.getDoc(),c,k)}}),i.bind(h.content_editable?d.getBody():g?d.getDoc():d.getWin(),"focus",function(a){d.focus(!0)}),a.isGecko&&i.bind(d.getDoc(),"DOMNodeInserted",function(a){var b;a=a.target,a.nodeType===1&&a.nodeName==="IMG"&&(b=a.getAttribute("data-mce-src"))&&(a.src=d.documentBaseURI.toAbsolute(b))});if(g){function l(){var a=this,b=a.getDoc(),c=a.settings;if(g&&!c.readonly){a._refreshContentEditable();try{b.execCommand("styleWithCSS",0,!1)}catch(d){if(!a._isHidden())try{b.execCommand("useCSS",0,!0)}catch(d){}}if(!c.table_inline_editing)try{b.execCommand("enableInlineTableEditing",!1,!1)}catch(d){}if(!c.object_resizing)try{b.execCommand("enableObjectResizing",!1,!1)}catch(d){}}}d.onBeforeExecCommand.add(l),d.onMouseDown.add(l)}d.onMouseUp.add(d.nodeChanged),d.onKeyUp.add(function(b,c){var e=c.keyCode;(e>=33&&e<=36||e>=37&&e<=40||e==13||e==45||e==46||e==8||a.isMac&&(e==91||e==93)||c.ctrlKey)&&d.nodeChanged()}),d.onKeyDown.add(function(a,b){if(b.keyCode!=p.BACKSPACE)return;var c=a.selection.getRng();if(!c.collapsed)return;var d=c.startContainer,e=c.startOffset;while(d&&d.nodeType&&d.nodeType!=1&&d.parentNode)d=d.parentNode;d&&d.parentNode&&d.parentNode.tagName==="BLOCKQUOTE"&&d.parentNode.firstChild==d&&e==0&&(a.formatter.toggle("blockquote",null,d.parentNode),c.setStart(d,0),c.setEnd(d,0),a.selection.setRng(c),a.selection.collapse(!1))}),d.onReset.add(function(){d.setContent(d.startContent,{format:"raw"})});if(h.custom_shortcuts){h.custom_undo_redo_keyboard_shortcuts&&(d.addShortcut("ctrl+z",d.getLang("undo_desc"),"Undo"),d.addShortcut("ctrl+y",d.getLang("redo_desc"),"Redo")),d.addShortcut("ctrl+b",d.getLang("bold_desc"),"Bold"),d.addShortcut("ctrl+i",d.getLang("italic_desc"),"Italic"),d.addShortcut("ctrl+u",d.getLang("underline_desc"),"Underline");for(e=1;e<=6;e++)d.addShortcut("ctrl+"+e,"",["FormatBlock",!1,"h"+e]);d.addShortcut("ctrl+7","",["FormatBlock",!1,"p"]),d.addShortcut("ctrl+8","",["FormatBlock",!1,"div"]),d.addShortcut("ctrl+9","",["FormatBlock",!1,"address"]);function m(b){var c=null;return!b.altKey&&!b.ctrlKey&&!b.metaKey?c:(f(d.shortcuts,function(d){if(a.isMac&&d.ctrl!=b.metaKey)return;if(!a.isMac&&d.ctrl!=b.ctrlKey)return;if(d.alt!=b.altKey)return;if(d.shift!=b.shiftKey)return;if(b.keyCode==d.keyCode||b.charCode&&b.charCode==d.charCode)return c=d,!1}),c)}d.onKeyUp.add(function(a,b){var d=m(b);if(d)return c.cancel(b)}),d.onKeyPress.add(function(a,b){var d=m(b);if(d)return c.cancel(b)}),d.onKeyDown.add(function(a,b){var d=m(b);if(d)return d.func.call(d.scope),c.cancel(b)})}a.isIE&&i.bind(d.getDoc(),"controlselect",function(a){var b=d.resizeInfo,e;a=a.target;if(a.nodeName!=="IMG")return;b&&i.unbind(b.node,b.ev,b.cb),i.hasClass(a,"mceItemNoResize")?(ev="resizestart",e=i.bind(a,"resizestart",c.cancel,c)):(ev="resizeend",e=i.bind(a,ev,function(a){var b;a=a.target;if(b=i.getStyle(a,"width"))i.setAttrib(a,"width",b.replace(/[^0-9%]+/g,"")),i.setStyle(a,"width","");if(b=i.getStyle(a,"height"))i.setAttrib(a,"height",b.replace(/[^0-9%]+/g,"")),i.setStyle(a,"height","")})),b=d.resizeInfo={node:a,ev:ev,cb:e}}),a.isOpera&&d.onClick.add(function(a,b){c.prevent(b)});if(h.custom_undo_redo){function n(){d.undoManager.typing=!1,d.undoManager.add()}i.bind(d.getDoc(),"focusout",function(a){!d.removed&&d.undoManager.typing&&n()}),d.dom.bind(d.dom.getRoot(),"dragend",function(a){n()}),d.onKeyUp.add(function(a,b){var c=b.keyCode;(c>=33&&c<=36||c>=37&&c<=40||c==13||c==45||b.ctrlKey)&&n()}),d.onKeyDown.add(function(b,e){var f=e.keyCode,g;if(f==8){g=d.getDoc().selection;if(g&&g.createRange&&g.createRange().item)return d.undoManager.beforeChange(),b.dom.remove(g.createRange().item(0)),n(),c.cancel(e)}if(f>=33&&f<=36||f>=37&&f<=40||f==13||f==45){a.isIE&&f==13&&d.undoManager.beforeChange(),d.undoManager.typing&&n();return}(f<16||f>20)&&f!=224&&f!=91&&!d.undoManager.typing&&(d.undoManager.beforeChange(),d.undoManager.typing=!0,d.undoManager.add())}),d.onMouseDown.add(function(){d.undoManager.typing&&n()})}if(a.isGecko){function o(){var a=d.dom.getAttribs(d.selection.getStart().cloneNode(!1));return function(){var b=d.selection.getStart();b!==d.getBody()&&(d.dom.setAttrib(b,"style",null),f(a,function(a){b.setAttributeNode(a.cloneNode(!0))}))}}function q(){var a=d.selection;return!a.isCollapsed()&&a.getStart()!=a.getEnd()}d.onKeyPress.add(function(a,b){var e;if((b.keyCode==8||b.keyCode==46)&&q())return e=o(),d.getDoc().execCommand("delete",!1,null),e(),c.cancel(b)}),d.dom.bind(d.getDoc(),"cut",function(a){var b;q()&&(b=o(),d.onKeyUp.addToTop(c.cancel,c),setTimeout(function(){b(),d.onKeyUp.remove(c.cancel,c)},0))})}},_refreshContentEditable:function(){var a=this,b,c;a._isHidden()&&(b=a.getBody(),c=b.parentNode,c.removeChild(b),c.appendChild(b),b.focus())},_isHidden:function(){var a;return g?(a=this.selection.getSel(),!a||!a.rangeCount||a.rangeCount==0):0}})}(tinymce),function(a){var b=a.each,c,d=!0,e=!1;a.EditorCommands=function(f){function m(a,b,c){var f;return a=a.toLowerCase(),(f=i.exec[a])?(f(a,b,c),d):e}function n(a){var b;return a=a.toLowerCase(),(b=i.state[a])?b(a):-1}function o(a){var b;return a=a.toLowerCase(),(b=i.value[a])?b(a):e}function p(a,c){c=c||"exec",b(a,function(a,d){b(d.toLowerCase().split(","),function(b){i[c][b]=a})})}function q(a,b,d){return b===c&&(b=e),d===c&&(d=null),f.getDoc().execCommand(a,b,d)}function r(a){return k.match(a)}function s(a,b){k.toggle(a,b?{value:b}:c)}function t(a){l=h.getBookmark(a)}function u(){h.moveToBookmark(l)}var g=f.dom,h=f.selection,i={state:{},exec:{},value:{}},j=f.settings,k=f.formatter,l;a.extend(this,{execCommand:m,queryCommandState:n,queryCommandValue:o,addCommands:p}),p({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){f.undoManager.add()},"Cut,Copy,Paste":function(b){var c=f.getDoc(),e;try{q(b)}catch(g){e=d}if(e||!c.queryCommandSupported(b))a.isGecko?f.windowManager.confirm(f.getLang("clipboard_msg"),function(a){a&&open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}):f.windowManager.alert(f.getLang("clipboard_no_support"))},unlink:function(a){h.isCollapsed()&&h.select(h.getNode()),q(a),h.collapse(e)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(a){var c=a.substring(7);b("left,center,right,full".split(","),function(a){c!=a&&k.remove("align"+a)}),s("align"+c),m("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(a){var b,c;q(a),b=g.getParent(h.getNode(),"ol,ul"),b&&(c=b.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(c.nodeName)&&(t(),g.split(c,b),u()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(a){s(a)},"ForeColor,HiliteColor,FontName":function(a,b,c){s(a,c)},FontSize:function(b,c,d){var e,f;d>=1&&d<=7&&(f=a.explode(j.font_size_style_values),e=a.explode(j.font_size_classes),e?d=e[d-1]||d:d=f[d-1]||d),s(b,d)},RemoveFormat:function(a){k.remove(a)},mceBlockQuote:function(a){s("blockquote")},FormatBlock:function(a,b,c){return s(c||"p")},mceCleanup:function(){var a=h.getBookmark();f.setContent(f.getContent({cleanup:d}),{cleanup:d}),h.moveToBookmark(a)},mceRemoveNode:function(a,b,c){var e=c||h.getNode();e!=f.getBody()&&(t(),f.dom.remove(e,d),u())},mceSelectNodeDepth:function(a,b,c){var d=0;g.getParent(h.getNode(),function(a){if(a.nodeType==1&&d++==c)return h.select(a),e},f.getBody())},mceSelectNode:function(a,b,c){h.select(c)},mceInsertContent:function(b,c,d){var e,i,j,k,l,m,n,o,p,q,r,s,t,u;e=f.parser,i=new a.html.Serializer({},f.schema),t='<span id="mce_marker" data-mce-type="bookmark"></span>',m={content:d,format:"html"},h.onBeforeSetContent.dispatch(h,m),d=m.content,d.indexOf("{$caret}")==-1&&(d+="{$caret}"),d=d.replace(/\{\$caret\}/,t),h.isCollapsed()||f.getDoc().execCommand("Delete",!1,null),j=h.getNode(),m={context:j.nodeName.toLowerCase()},l=e.parse(d,m),r=l.lastChild;if(r.attr("id")=="mce_marker"){n=r;for(r=r.prev;r;r=r.walk(!0))if(r.type==3||!g.isBlock(r.name)){r.parent.insert(n,r,r.name==="br");break}}if(!m.invalid)d=i.serialize(l),r=j.firstChild,s=j.lastChild,!r||r===s&&r.nodeName==="BR"?g.setHTML(j,d):h.setContent(d);else{h.setContent(t),j=f.selection.getNode(),k=f.getBody(),j.nodeType==9?j=r=k:r=j;while(r!==k)j=r,r=r.parentNode;d=j==k?k.innerHTML:g.getOuterHTML(j),d=i.serialize(e.parse(d.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return i.serialize(l)}))),j==k?g.setHTML(k,d):g.setOuterHTML(j,d)}n=g.get("mce_marker"),o=g.getRect(n),p=g.getViewPort(f.getWin());if(o.y+o.h>p.y+p.h||o.y<p.y||o.x>p.x+p.w||o.x<p.x)u=a.isIE?f.getDoc().documentElement:f.getBody(),u.scrollLeft=o.x,u.scrollTop=o.y-p.h+25;q=g.createRng(),r=n.previousSibling,r&&r.nodeType==3?q.setStart(r,r.nodeValue.length):(q.setStartBefore(n),q.setEndBefore(n)),g.remove(n),h.setRng(q),h.onSetContent.dispatch(h,m),f.addVisual()},mceInsertRawHTML:function(a,b,c){h.setContent("tiny_mce_marker"),f.setContent(f.getContent().replace(/tiny_mce_marker/g,function(){return c}))},mceSetContent:function(a,b,c){f.setContent(c)},"Indent,Outdent":function(a){var c,d,e;c=j.indentation,d=/[a-z%]+$/i.exec(c),c=parseInt(c),!n("InsertUnorderedList")&&!n("InsertOrderedList")?b(h.getSelectedBlocks(),function(b){a=="outdent"?(e=Math.max(0,parseInt(b.style.paddingLeft||0)-c),g.setStyle(b,"paddingLeft",e?e+d:"")):g.setStyle(b,"paddingLeft",parseInt(b.style.paddingLeft||0)+c+d)}):q(a)},mceRepaint:function(){var b;if(a.isGecko)try{t(d),h.getSel()&&h.getSel().selectAllChildren(f.getBody()),h.collapse(d),u()}catch(c){}},mceToggleFormat:function(a,b,c){k.toggle(c)},InsertHorizontalRule:function(){f.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){f.hasVisual=!f.hasVisual,f.addVisual()},mceReplaceContent:function(a,b,c){f.execCommand("mceInsertContent",!1,c.replace(/\{\$selection\}/g,h.getContent({format:"text"})))},mceInsertLink:function(a,b,c){var d;typeof c=="string"&&(c={href:c}),d=g.getParent(h.getNode(),"a"),c.href=c.href.replace(" ","%20"),(!d||!c.href)&&k.remove("link"),c.href&&k.apply("link",c,d)},selectAll:function(){var a=g.getRoot(),b=g.createRng();b.setStart(a,0),b.setEnd(a,a.childNodes.length),f.selection.setRng(b)}}),p({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(b){var c="align"+b.substring(7),e=h.isCollapsed()?[h.getNode()]:h.getSelectedBlocks(),f=a.map(e,function(a){return!!k.matchNode(a,c)});return a.inArray(f,d)!==-1},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(a){return r(a)},mceBlockQuote:function(){return r("blockquote")},Outdent:function(){var a;if(j.inline_styles){if((a=g.getParent(h.getStart(),g.isBlock))&&parseInt(a.style.paddingLeft)>0)return d;if((a=g.getParent(h.getEnd(),g.isBlock))&&parseInt(a.style.paddingLeft)>0)return d}return n("InsertUnorderedList")||n("InsertOrderedList")||!j.inline_styles&&!!g.getParent(h.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(a){return g.getParent(h.getNode(),a=="insertunorderedlist"?"UL":"OL")}},"state"),p({"FontSize,FontName":function(a){var b=0,c;if(c=g.getParent(h.getNode(),"span"))a=="fontsize"?b=c.style.fontSize:b=c.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase();return b}},"value"),j.custom_undo_redo&&p({Undo:function(){f.undoManager.undo()},Redo:function(){f.undoManager.redo()}})}}(tinymce),function(a){var b=a.util.Dispatcher;a.UndoManager=function(c){function h(){return a.trim(c.getContent({format:"raw",no_events:1}))}var d,e=0,f=[],g;return d={typing:!1,onAdd:new b(d),onUndo:new b(d),onRedo:new b(d),beforeChange:function(){g=c.selection.getBookmark(2,!0)},add:function(a){var b,i=c.settings,j;a=a||{},a.content=h(),j=f[e];if(j&&j.content==a.content)return null;f[e]&&(f[e].beforeBookmark=g);if(i.custom_undo_redo_levels&&f.length>i.custom_undo_redo_levels){for(b=0;b<f.length-1;b++)f[b]=f[b+1];f.length--,e=f.length}return a.bookmark=c.selection.getBookmark(2,!0),e<f.length-1&&(f.length=e+1),f.push(a),e=f.length-1,d.onAdd.dispatch(d,a),c.isNotDirty=0,a},undo:function(){var a,b;return d.typing&&(d.add(),d.typing=!1),e>0&&(a=f[--e],c.setContent(a.content,{format:"raw"}),c.selection.moveToBookmark(a.beforeBookmark),d.onUndo.dispatch(d,a)),a},redo:function(){var a;return e<f.length-1&&(a=f[++e],c.setContent(a.content,{format:"raw"}),c.selection.moveToBookmark(a.bookmark),d.onRedo.dispatch(d,a)),a},clear:function(){f=[],e=0,d.typing=!1},hasUndo:function(){return e>0||this.typing},hasRedo:function(){return e<f.length-1&&!this.typing}}}}(tinymce),function(a){function j(a){var b,c,d;do/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(a.nodeName)&&(b?(c=a.cloneNode(!1),c.appendChild(b),b=c):b=d=a.cloneNode(!1),b.removeAttribute("id"));while(a=a.parentNode);if(b)return{wrapper:b,inner:d}}function k(a,b){var c=b.ownerDocument.createRange();return c.setStart(a.endContainer,a.endOffset),c.setEndAfter(b),c.cloneContents().textContent.length==0}function l(a,b,c){var d,e;return b.isEmpty(c)?(d=b.getParent(c,"ul,ol"),b.getParent(d.parentNode,"ul,ol")||(b.split(d,c),e=b.create("p",0,'<br data-mce-bogus="1" />'),b.replace(e,c),a.select(e,1)),i):h}var b=a.dom.Event,c=a.isIE,d=a.isGecko,e=a.isOpera,f=a.each,g=a.extend,h=!0,i=!1;a.create("tinymce.ForceBlocks",{ForceBlocks:function(a){var b=this,c=a.settings,d;b.editor=a,b.dom=a.dom,d=(c.forced_root_block||"p").toLowerCase(),c.element=d.toUpperCase(),a.onPreInit.add(b.setup,b)},setup:function(){var e=this,f=e.editor,g=f.settings,i=f.dom,k=f.selection,l=f.schema.getBlockElements();if(g.forced_root_block){function m(){var a=k.getStart(),b=f.getBody(),c,d,e,h,j,m,n,o=-16777215;if(!a||a.nodeType!==1)return;while(a!=b){if(l[a.nodeName])return;a=a.parentNode}c=k.getRng(),c.setStart?(d=c.startContainer,e=c.startOffset,h=c.endContainer,j=c.endOffset):(c.item&&(c=f.getDoc().body.createTextRange(),c.moveToElementText(c.item(0))),tmpRng=c.duplicate(),tmpRng.collapse(!0),e=tmpRng.move("character",o)*-1,tmpRng.collapsed||(tmpRng=c.duplicate(),tmpRng.collapse(!1),j=tmpRng.move("character",o)*-1-e));for(a=b.firstChild;a;a)a.nodeType===3||a.nodeType==1&&!l[a.nodeName]?(m||(m=i.create(g.forced_root_block),a.parentNode.insertBefore(m,a)),n=a,a=a.nextSibling,m.appendChild(n)):(m=null,a=a.nextSibling);if(c.setStart)c.setStart(d,e),c.setEnd(h,j),k.setRng(c);else try{c=f.getDoc().body.createTextRange(),c.moveToElementText(b),c.collapse(!0),c.moveStart("character",e),j>0&&c.moveEnd("character",j),c.select()}catch(p){}f.nodeChanged()}f.onKeyUp.add(m),f.onClick.add(m)}g.force_br_newlines&&c&&f.onKeyPress.add(function(a,c){var d;if(c.keyCode==13&&k.getNode().nodeName!="LI")return k.setContent('<br id="__" /> ',{format:"raw"}),d=i.get("__"),d.removeAttribute("id"),k.select(d),k.collapse(),b.cancel(c)}),g.force_p_newlines&&(c?(a.addUnload(function(){e._previousFormats=0}),f.onKeyPress.add(function(a,b){e._previousFormats=0,b.keyCode==13&&!b.shiftKey&&a.selection.isCollapsed()&&g.keep_styles&&(e._previousFormats=j(a.selection.getStart()))}),f.onKeyUp.add(function(a,b){if(b.keyCode==13&&!b.shiftKey){var c=a.selection.getStart(),d=e._previousFormats;!c.hasChildNodes()&&d&&(c=i.getParent(c,i.isBlock),c&&c.nodeName!="LI"&&(c.innerHTML="",e._previousFormats?(c.appendChild(d.wrapper),d.inner.innerHTML=""):c.innerHTML="",k.select(c,1),k.collapse(!0),a.getDoc().execCommand("Delete",!1,null),e._previousFormats=0))}})):f.onKeyPress.add(function(a,c){c.keyCode==13&&!c.shiftKey&&!e.insertPara(c)&&b.cancel(c)}),d&&f.onKeyDown.add(function(a,b){(b.keyCode==8||b.keyCode==46)&&!b.shiftKey&&e.backspaceDelete(b,b.keyCode==8)}));if(a.isWebKit){function n(a){var b=k.getRng(),c,d=i.create("div",null," "),e,f=i.getViewPort(a.getWin()).h;b.insertNode(c=i.create("br")),b.setStartAfter(c),b.setEndAfter(c),k.setRng(b),k.getSel().focusNode==c.previousSibling&&(k.select(i.insertAfter(i.doc.createTextNode(" "),c)),k.collapse(h)),i.insertAfter(d,c),e=i.getPos(d).y,i.remove(d),e>f&&a.getWin().scrollTo(0,e)}f.onKeyPress.add(function(a,c){c.keyCode==13&&(c.shiftKey||g.force_br_newlines&&!i.getParent(k.getNode(),"h1,h2,h3,h4,h5,h6,ol,ul"))&&(n(a),b.cancel(c))})}c&&g.element!="P"&&(f.onKeyPress.add(function(a,b){e.lastElm=k.getNode().nodeName}),f.onKeyUp.add(function(a,b){var c,d=k.getNode(),f=a.getBody();f.childNodes.length===1&&d.nodeName=="P"?(d=i.rename(d,g.element),k.select(d),k.collapse(),a.nodeChanged()):b.keyCode==13&&!b.shiftKey&&e.lastElm!="P"&&(c=i.getParent(d,"p"),c&&(i.rename(c,g.element),a.nodeChanged()))}))},getParentBlock:function(a){var b=this.dom;return b.getParent(a,b.isBlock)},insertPara:function(a){function I(a,b){var c=[],f,h,j;a.innerHTML="";if(g.keep_styles){h=b;do/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(h.nodeName)&&(f=h.cloneNode(i),d.setAttrib(f,"id",""),c.push(f));while(h=h.parentNode)}if(c.length>0){for(j=c.length-1,f=a;j>=0;j--)f=f.appendChild(c[j]);return c[0].innerHTML=e?" ":"<br />",c[0]}a.innerHTML=e?" ":"<br />"}var b=this,c=b.editor,d=c.dom,f=c.getDoc(),g=c.settings,j=c.selection.getSel(),m=j.getRangeAt(0),n=f.body,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D=d.getViewPort(c.getWin()),E,F,G;c.undoManager.beforeChange(),o=f.createRange(),o.setStart(j.anchorNode,j.anchorOffset),o.collapse(h),p=f.createRange(),p.setStart(j.focusNode,j.focusOffset),p.collapse(h),q=o.compareBoundaryPoints(o.START_TO_END,p)<0,r=q?j.anchorNode:j.focusNode,s=q?j.anchorOffset:j.focusOffset,t=q?j.focusNode:j.anchorNode,u=q?j.focusOffset:j.anchorOffset;if(r===t&&/^(TD|TH)$/.test(r.nodeName))return r.firstChild.nodeName=="BR"&&d.remove(r.firstChild),r.childNodes.length==0?(c.dom.add(r,g.element,null,"<br />"),z=c.dom.add(r,g.element,null,"<br />")):(C=r.innerHTML,r.innerHTML="",c.dom.add(r,g.element,null,C),z=c.dom.add(r,g.element,null,"<br />")),m=f.createRange(),m.selectNodeContents(z),m.collapse(1),c.selection.setRng(m),i;r==n&&t==n&&n.firstChild&&c.dom.isBlock(n.firstChild)&&(r=t=r.firstChild,s=u=0,o=f.createRange(),o.setStart(r,0),p=f.createRange(),p.setStart(t,0)),f.body.hasChildNodes()||f.body.appendChild(d.create("br")),r=r.nodeName=="HTML"?f.body:r,r=r.nodeName=="BODY"?r.firstChild:r,t=t.nodeName=="HTML"?f.body:t,t=t.nodeName=="BODY"?t.firstChild:t,v=b.getParentBlock(r),w=b.getParentBlock(t),x=v?v.nodeName:g.element;if(C=b.dom.getParent(v,"li,pre"))return C.nodeName=="LI"?l(c.selection,b.dom,C):h;v&&(v.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(d.getStyle(v,"position",1)))&&(x=g.element,v=null),w&&(w.nodeName=="CAPTION"||/absolute|relative|fixed/gi.test(d.getStyle(v,"position",1)))&&(x=g.element,w=null);if(/(TD|TABLE|TH|CAPTION)/.test(x)||v&&x=="DIV"&&/left|right/gi.test(d.getStyle(v,"float",1)))x=g.element,v=w=null;y=v&&v.nodeName==x?v.cloneNode(0):c.dom.create(x),z=w&&w.nodeName==x?w.cloneNode(0):c.dom.create(x),z.removeAttribute("id"),/^(H[1-6])$/.test(x)&&k(m,v)&&(z=c.dom.create(g.element)),C=A=r;do{if(C==n||C.nodeType==9||b.dom.isBlock(C)||/(TD|TABLE|TH|CAPTION)/.test(C.nodeName))break;A=C}while(C=C.previousSibling?C.previousSibling:C.parentNode);C=B=t;do{if(C==n||C.nodeType==9||b.dom.isBlock(C)||/(TD|TABLE|TH|CAPTION)/.test(C.nodeName))break;B=C}while(C=C.nextSibling?C.nextSibling:C.parentNode);A.nodeName==x?o.setStart(A,0):o.setStartBefore(A),o.setEnd(r,s),y.appendChild(o.cloneContents()||f.createTextNode(""));try{p.setEndAfter(B)}catch(H){}return p.setStart(t,u),z.appendChild(p.cloneContents()||f.createTextNode("")),m=f.createRange(),!A.previousSibling&&A.parentNode.nodeName==x?m.setStartBefore(A.parentNode):o.startContainer.nodeName==x&&o.startOffset==0?m.setStartBefore(o.startContainer):m.setStart(o.startContainer,o.startOffset),!B.nextSibling&&B.parentNode.nodeName==x?m.setEndAfter(B.parentNode):m.setEnd(p.endContainer,p.endOffset),m.deleteContents(),e&&c.getWin().scrollTo(0,D.y),y.firstChild&&y.firstChild.nodeName==x&&(y.
innerHTML=y.firstChild.innerHTML),z.firstChild&&z.firstChild.nodeName==x&&(z.innerHTML=z.firstChild.innerHTML),d.isEmpty(y)&&I(y,r),d.isEmpty(z)&&(G=I(z,t)),e&&parseFloat(opera.version())<9.5?(m.insertNode(y),m.insertNode(z)):(m.insertNode(z),m.insertNode(y)),z.normalize(),y.normalize(),c.selection.select(z,!0),c.selection.collapse(!0),E=c.dom.getPos(z).y,(E<D.y||E+25>D.y+D.h)&&c.getWin().scrollTo(0,E<D.y?E:E-D.h+25),c.undoManager.add(),i},backspaceDelete:function(c,d){var e=this,f=e.editor,g=f.getBody(),h=f.dom,j,k=f.selection,l=k.getRng(),m=l.startContainer,j,n,o,p;if(!d&&l.collapsed&&m.nodeType==1&&l.startOffset==m.childNodes.length){p=new a.dom.TreeWalker(m.lastChild,m);for(j=m.lastChild;j;j=p.prev())if(j.nodeType==3){l.setStart(j,j.nodeValue.length),l.collapse(!0),k.setRng(l);return}}if(m&&f.dom.isBlock(m)&&!/^(TD|TH)$/.test(m.nodeName)&&d)if(m.childNodes.length==0||m.childNodes.length==1&&m.firstChild.nodeName=="BR"){j=m;while((j=j.previousSibling)&&!f.dom.isBlock(j));if(j){if(m!=g.firstChild){n=f.dom.doc.createTreeWalker(j,NodeFilter.SHOW_TEXT,null,i);while(o=n.nextNode())j=o;l=f.getDoc().createRange(),l.setStart(j,j.nodeValue?j.nodeValue.length:0),l.setEnd(j,j.nodeValue?j.nodeValue.length:0),k.setRng(l),f.dom.remove(m)}return b.cancel(c)}}}})}(tinymce),function(a){var b=a.DOM,c=a.dom.Event,d=a.each,e=a.extend;a.create("tinymce.ControlManager",{ControlManager:function(b,c){var e=this,f;c=c||{},e.editor=b,e.controls={},e.onAdd=new a.util.Dispatcher(e),e.onPostRender=new a.util.Dispatcher(e),e.prefix=c.prefix||b.id+"_",e._cls={},e.onPostRender.add(function(){d(e.controls,function(a){a.postRender()})})},get:function(a){return this.controls[this.prefix+a]||this.controls[a]},setActive:function(a,b){var c=null;return(c=this.get(a))&&c.setActive(b),c},setDisabled:function(a,b){var c=null;return(c=this.get(a))&&c.setDisabled(b),c},add:function(a){var b=this;return a&&(b.controls[a.id]=a,b.onAdd.dispatch(a,b)),a},createControl:function(a){var b,c=this,e=c.editor;d(e.plugins,function(d){if(d.createControl){b=d.createControl(a,c);if(b)return!1}});switch(a){case"|":case"separator":return c.createSeparator()}return!b&&e.buttons&&(b=e.buttons[a])?c.createButton(a,b):c.add(b)},createDropMenu:function(b,c,d){var f=this,g=f.editor,h,i,j,k;c=e({"class":"mceDropDown",constrain:g.settings.constrain_menus},c),c["class"]=c["class"]+" "+g.getParam("skin")+"Skin";if(j=g.getParam("skin_variant"))c["class"]+=" "+g.getParam("skin")+"Skin"+j.substring(0,1).toUpperCase()+j.substring(1);return b=f.prefix+b,k=d||f._cls.dropmenu||a.ui.DropMenu,h=f.controls[b]=new k(b,c),h.onAddItem.add(function(a,b){var c=b.settings;c.title=g.getLang(c.title,c.title),c.onclick||(c.onclick=function(a){c.cmd&&g.execCommand(c.cmd,c.ui||!1,c.value)})}),g.onRemove.add(function(){h.destroy()}),a.isIE&&(h.onShowMenu.add(function(){g.focus(),i=g.selection.getBookmark(1)}),h.onHideMenu.add(function(){i&&(g.selection.moveToBookmark(i),i=0)})),f.add(h)},createListBox:function(b,d,f){function l(b){return b.settings.use_accessible_selects&&!a.isGecko}var g=this,h=g.editor,i,j,k;return g.get(b)?null:(d.title=h.translate(d.title),d.scope=d.scope||h,d.onselect||(d.onselect=function(a){h.execCommand(d.cmd,d.ui||!1,a||d.value)}),d=e({title:d.title,"class":"mce_"+b,scope:d.scope,control_manager:g},d),b=g.prefix+b,h.settings.use_native_selects||l(h)?j=new a.ui.NativeListBox(b,d):(k=f||g._cls.listbox||a.ui.ListBox,j=new k(b,d,h)),g.controls[b]=j,a.isWebKit&&j.onPostRender.add(function(a,b){c.add(b,"mousedown",function(){h.bookmark=h.selection.getBookmark(1)}),c.add(b,"focus",function(){h.selection.moveToBookmark(h.bookmark),h.bookmark=null})}),j.hideMenu&&h.onMouseDown.add(j.hideMenu,j),g.add(j))},createButton:function(b,c,d){var f=this,g=f.editor,h,i,j;return f.get(b)?null:(c.title=g.translate(c.title),c.label=g.translate(c.label),c.scope=c.scope||g,!c.onclick&&!c.menu_button&&(c.onclick=function(){g.execCommand(c.cmd,c.ui||!1,c.value)}),c=e({title:c.title,"class":"mce_"+b,unavailable_prefix:g.getLang("unavailable",""),scope:c.scope,control_manager:f},c),b=f.prefix+b,c.menu_button?(j=d||f._cls.menubutton||a.ui.MenuButton,i=new j(b,c,g),g.onMouseDown.add(i.hideMenu,i)):(j=f._cls.button||a.ui.Button,i=new j(b,c,g)),f.add(i))},createMenuButton:function(a,b,c){return b=b||{},b.menu_button=1,this.createButton(a,b,c)},createSplitButton:function(b,c,d){var f=this,g=f.editor,h,i,j;return f.get(b)?null:(c.title=g.translate(c.title),c.scope=c.scope||g,c.onclick||(c.onclick=function(a){g.execCommand(c.cmd,c.ui||!1,a||c.value)}),c.onselect||(c.onselect=function(a){g.execCommand(c.cmd,c.ui||!1,a||c.value)}),c=e({title:c.title,"class":"mce_"+b,scope:c.scope,control_manager:f},c),b=f.prefix+b,j=d||f._cls.splitbutton||a.ui.SplitButton,i=f.add(new j(b,c,g)),g.onMouseDown.add(i.hideMenu,i),i)},createColorSplitButton:function(b,c,d){var f=this,g=f.editor,h,i,j,k;return f.get(b)?null:(c.title=g.translate(c.title),c.scope=c.scope||g,c.onclick||(c.onclick=function(b){a.isIE&&(k=g.selection.getBookmark(1)),g.execCommand(c.cmd,c.ui||!1,b||c.value)}),c.onselect||(c.onselect=function(a){g.execCommand(c.cmd,c.ui||!1,a||c.value)}),c=e({title:c.title,"class":"mce_"+b,menu_class:g.getParam("skin")+"Skin",scope:c.scope,more_colors_title:g.getLang("more_colors")},c),b=f.prefix+b,j=d||f._cls.colorsplitbutton||a.ui.ColorSplitButton,i=new j(b,c,g),g.onMouseDown.add(i.hideMenu,i),g.onRemove.add(function(){i.destroy()}),a.isIE&&(i.onShowMenu.add(function(){g.focus(),k=g.selection.getBookmark(1)}),i.onHideMenu.add(function(){k&&(g.selection.moveToBookmark(k),k=0)})),f.add(i))},createToolbar:function(b,c,d){var e,f=this,g;return b=f.prefix+b,g=d||f._cls.toolbar||a.ui.Toolbar,e=new g(b,c,f.editor),f.get(b)?null:f.add(e)},createToolbarGroup:function(b,c,d){var e,f=this,g;return b=f.prefix+b,g=d||this._cls.toolbarGroup||a.ui.ToolbarGroup,e=new g(b,c,f.editor),f.get(b)?null:f.add(e)},createSeparator:function(b){var c=b||this._cls.separator||a.ui.Separator;return new c},setControlType:function(a,b){return this._cls[a.toLowerCase()]=b},destroy:function(){d(this.controls,function(a){a.destroy()}),this.controls=null}})}(tinymce),function(a){var b=a.util.Dispatcher,c=a.each,d=a.isIE,e=a.isOpera;a.create("tinymce.WindowManager",{WindowManager:function(a){var c=this;c.editor=a,c.onOpen=new b(c),c.onClose=new b(c),c.params={},c.features={}},open:function(b,f){var g=this,h="",i,j,k=g.editor.settings.dialog_type=="modal",l,m,n,o=a.DOM.getViewPort(),p;b=b||{},f=f||{},m=e?o.w:screen.width,n=e?o.h:screen.height,b.name=b.name||"mc_"+(new Date).getTime(),b.width=parseInt(b.width||320),b.height=parseInt(b.height||240),b.resizable=!0,b.left=b.left||parseInt(m/2)-b.width/2,b.top=b.top||parseInt(n/2)-b.height/2,f.inline=!1,f.mce_width=b.width,f.mce_height=b.height,f.mce_auto_focus=b.auto_focus,k&&d&&(b.center=!0,b.help=!1,b.dialogWidth=b.width+"px",b.dialogHeight=b.height+"px",b.scroll=b.scrollbars||!1),c(b,function(b,c){a.is(b,"boolean")&&(b=b?"yes":"no"),/^(name|url)$/.test(c)||(d&&k?h+=(h?";":"")+c+":"+b:h+=(h?",":"")+c+"="+b)}),g.features=b,g.params=f,g.onOpen.dispatch(g,b,f),p=b.url||b.file,p=a._addVer(p);try{d&&k?(l=1,window.showModalDialog(p,window,h)):l=window.open(p,b.name,h)}catch(q){}l||alert(g.editor.getLang("popup_blocked"))},close:function(a){a.close(),this.onClose.dispatch(this)},createInstance:function(b,c,d,e,f,g){var h=a.resolve(b);return new h(c,d,e,f,g)},confirm:function(a,b,c,d){d=d||window,b.call(c||this,d.confirm(this._decode(this.editor.getLang(a,a))))},alert:function(a,b,c,d){var e=this;d=d||window,d.alert(e._decode(e.editor.getLang(a,a))),b&&b.call(c||e)},resizeBy:function(a,b,c){c.resizeBy(a,b)},_decode:function(b){return a.DOM.decode(b).replace(/\\n/g,"\n")}})}(tinymce),function(a){a.Formatter=function(b){function r(a){return a instanceof Array}function s(a,b){return e.getParents(a,b,e.getRoot())}function t(a){return a.nodeType===1&&(a.face==="mceinline"||a.style.fontFamily==="mceinline")}function u(a){return a?c[a]:c}function v(a,b){a&&(typeof a!="string"?d(a,function(a,b){v(b,a)}):(b=b.length?b:[b],d(b,function(a){a.deep===q&&(a.deep=!a.selector),a.split===q&&(a.split=!a.selector||a.inline),a.remove===q&&a.selector&&!a.inline&&(a.remove="none"),a.selector&&a.inline&&(a.mixed=!0,a.block_expand=!0),typeof a.classes=="string"&&(a.classes=a.classes.split(/\s+/))}),c[a]=b))}function y(c,k,l){function w(a,b){b=b||n,a&&(b.onformat&&b.onformat(a,b,k,l),d(b.styles,function(b,c){e.setStyle(a,c,I(b,k))}),d(b.attributes,function(b,c){e.setAttrib(a,c,I(b,k))}),d(b.classes,function(b){b=I(b,k),e.hasClass(a,b)||e.addClass(a,b)}))}function y(){function a(a,b){var c=new g(b);for(l=c.current();l;l=c.prev())if(l.childNodes.length>1||l==a)return l}var c=b.selection.getRng(),d=c.startContainer,e=c.endContainer;if(d!=e&&c.endOffset==0){var f=a(d,e),h=f.nodeType==3?f.length:f.childNodes.length;c.setEnd(f,h)}return c}function z(b,c,f,g,h){var i=[],j=-1,k,l=-1,m=-1,n;return d(b.childNodes,function(a,b){if(a.nodeName==="UL"||a.nodeName==="OL")return j=b,k=a,!1}),d(b.childNodes,function(a,b){a.nodeName==="SPAN"&&e.getAttrib(a,"data-mce-type")=="bookmark"&&(a.id==c.id+"_start"?l=b:a.id==c.id+"_end"&&(m=b))}),j<=0||l<j&&m>j?(d(a.grep(b.childNodes),h),0):(n=f.cloneNode(o),d(a.grep(b.childNodes),function(a,b){if(l<j&&b<j||l>j&&b>j)i.push(a),a.parentNode.removeChild(a)}),l<j?b.insertBefore(n,k):l>j&&b.insertBefore(n,k.nextSibling),g.push(n),d(i,function(a){n.appendChild(a)}),n)}function A(b,f,g){var l=[],q,r;q=n.inline||n.block,r=e.create(q),w(r),h.walk(b,function(b){function j(b){var p=b.nodeName.toLowerCase(),s=b.parentNode.nodeName.toLowerCase(),u;if(G(p,"br")){h=0,n.block&&e.remove(b);return}if(n.wrapper&&B(b,c,k)){h=0;return}if(n.block&&!n.wrapper&&R(p)){b=e.rename(b,q),w(b),l.push(b),h=0;return}if(n.selector){d(m,function(a){if("collapsed"in a&&a.collapsed!==v)return;e.is(b,a.selector)&&!t(b)&&(w(b,a),u=!0)});if(!n.inline||u){h=0;return}}!i(q,p)||!i(s,q)||!g&&b.nodeType===3&&b.nodeValue.length===1&&b.nodeValue.charCodeAt(0)===65279||b.id==="_mce_caret"?p=="li"&&f?h=z(b,f,r,l,j):(h=0,d(a.grep(b.childNodes),j),h=0):(h||(h=r.cloneNode(o),b.parentNode.insertBefore(h,b),l.push(h)),h.appendChild(b))}var h;d(b,j)}),n.wrap_links===!1&&d(l,function(b){function c(b){var e,f,g;if(b.nodeName==="A"){f=r.cloneNode(o),l.push(f),g=a.grep(b.childNodes);for(e=0;e<g.length;e++)f.appendChild(g[e]);b.appendChild(f)}d(a.grep(b.childNodes),c)}c(b)}),d(l,function(a){function f(a){var b=0;return d(a.childNodes,function(a){!J(a)&&!P(a)&&b++}),b}function g(a){var b,c;return d(a.childNodes,function(a){if(a.nodeType==1&&!P(a)&&!t(a))return b=a,o}),b&&F(b,n)&&(c=b.cloneNode(o),w(c),e.replace(c,a,p),e.remove(b,1)),c||a}var b;b=f(a);if((l.length>1||!j(a))&&b===0){e.remove(a,1);return}if(n.inline||n.wrapper){!n.exact&&b===1&&(a=g(a)),d(m,function(b){d(e.select(b.inline,a),function(a){var c;if(b.wrap_links===!1){c=a.parentNode;do if(c.nodeName==="A")return;while(c=c.parentNode)}M(b,k,a,b.exact?a:null)})});if(B(a.parentNode,c,k))return e.remove(a,1),a=0,p;n.merge_with_parents&&e.getParent(a.parentNode,function(b){if(B(b,c,k))return e.remove(a,1),a=0,p}),a&&n.merge_siblings!==!1&&(a=Q(O(a),a),a=Q(a,O(a,p)))}})}var m=u(c),n=m[0],q,r,s,v=f.isCollapsed();if(n)if(l)l.nodeType?(r=e.createRng(),r.setStartBefore(l),r.setEndAfter(l),A(L(r,m),null,!0)):A(l,null,!0);else if(!v||!n.inline||e.select("td.mceSelected,th.mceSelected").length){var C=b.selection.getNode();b.selection.setRng(y()),q=f.getBookmark(),A(L(f.getRng(p),m),q),n.styles&&(n.styles.color||n.styles.textDecoration)&&(a.walk(C,x,"childNodes"),x(C)),f.moveToBookmark(q),U(f.getRng(p)),b.nodeChanged()}else T("apply",c,k)}function z(c,g,i){function t(b){var c,d,e;c=a.grep(b.childNodes);for(d=0,e=k.length;d<e;d++)if(M(k[d],g,b,b))break;if(m.deep)for(d=0,e=c.length;d<e;d++)t(c[d])}function v(a){var b;return d(s(a.parentNode).reverse(),function(a){var d;!b&&a.id!="_start"&&a.id!="_end"&&(d=B(a,c,g),d&&d.split!==!1&&(b=a))}),b}function x(a,b,c,d){var f,h,i,l,n,p;if(a){p=a.parentNode;for(f=b.parentNode;f&&f!=p;f=f.parentNode){h=f.cloneNode(o);for(n=0;n<k.length;n++)if(M(k[n],g,h,h)){h=0;break}h&&(i&&h.appendChild(i),l||(l=h),i=h)}d&&(!m.mixed||!j(a))&&(b=e.split(a,b)),i&&(c.parentNode.insertBefore(i,c),l.appendChild(c))}return b}function y(a){return x(v(a),a,a,!0)}function z(a){var b=e.get(a?"_start":"_end"),c=b[a?"firstChild":"lastChild"];return P(c)&&(c=c[a?"firstChild":"lastChild"]),e.remove(b,!0),c}function A(a){var c,e;a=L(a,k,p),m.split&&(c=S(a,p),e=S(a),c!=e?(c=K(c,"span",{id:"_start","data-mce-type":"bookmark"}),e=K(e,"span",{id:"_end","data-mce-type":"bookmark"}),y(c),y(e),c=z(p),e=z()):c=e=y(c),a.startContainer=c.parentNode,a.startOffset=l(c),a.endContainer=e.parentNode,a.endOffset=l(e)+1),h.walk(a,function(a){d(a,function(a){t(a),a.nodeType===1&&b.dom.getStyle(a,"text-decoration")==="underline"&&a.parentNode&&w(a.parentNode)==="underline"&&M({deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,a)})})}var k=u(c),m=k[0],n,q,r;if(i){i.nodeType?(r=e.createRng(),r.setStartBefore(i),r.setEndAfter(i),A(r)):A(i);return}!f.isCollapsed()||!m.inline||e.select("td.mceSelected,th.mceSelected").length?(n=f.getBookmark(),A(f.getRng(p)),f.moveToBookmark(n),m.inline&&C(c,g,f.getStart())&&U(f.getRng(!0)),b.nodeChanged()):T("remove",c,g),a.isWebKit&&b.execCommand("mceCleanup")}function A(a,b,c){var d=u(a);!C(a,b,c)||"toggle"in d[0]&&!d[0].toggle?y(a,b,c):z(a,b,c)}function B(a,b,c,d){function j(a,b,f){var g,h,i=b[f],j;if(b.onmatch)return b.onmatch(a,b,f);if(i)if(i.length===q){for(g in i)if(i.hasOwnProperty(g)){f==="attributes"?h=e.getAttrib(a,g):h=H(a,g);if(d&&!h&&!b.exact)return;if((!d||b.exact)&&!G(h,I(i[g],c)))return}}else for(j=0;j<i.length;j++)if(f==="attributes"?e.getAttrib(a,i[j]):H(a,i[j]))return b;return b}var f=u(b),g,h,i;if(f&&a)for(h=0;h<f.length;h++){g=f[h];if(F(a,g)&&j(a,g,"attributes")&&j(a,g,"styles")){if(i=g.classes)for(h=0;h<i.length;h++)if(!e.hasClass(a,i[h]))return;return g}}}function C(a,b,c){function g(c){return c=e.getParent(c,function(c){return!!B(c,a,b,!0)}),B(c,a,b)}var d;return c?g(c):(c=f.getNode(),g(c)?p:(d=f.getStart(),d!=c&&g(d)?p:o))}function D(a,b){var c,d=[],g={},h,i,j;return c=f.getStart(),e.getParent(c,function(c){var e,f;for(e=0;e<a.length;e++)f=a[e],!g[f]&&B(c,f,b)&&(g[f]=!0,d.push(f))}),d}function E(a){var b=u(a),c,d,g,h,i;if(b){c=f.getStart(),d=s(c);for(h=b.length-1;h>=0;h--){i=b[h].selector;if(!i)return p;for(g=d.length-1;g>=0;g--)if(e.is(d[g],i))return p}}return o}function F(a,b){if(G(a,b.inline))return p;if(G(a,b.block))return p;if(b.selector)return e.is(a,b.selector)}function G(a,b){return a=a||"",b=b||"",a=""+(a.nodeName||a),b=""+(b.nodeName||b),a.toLowerCase()==b.toLowerCase()}function H(a,b){var c=e.getStyle(a,b);if(b=="color"||b=="backgroundColor")c=e.toHex(c);return b=="fontWeight"&&c==700&&(c="bold"),""+c}function I(a,b){return typeof a!="string"?a=a(b):b&&(a=a.replace(/%(\w+)/g,function(a,c){return b[c]||a})),a}function J(a){return a&&a.nodeType===3&&/^([\t \r\n]+|)$/.test(a.nodeValue)}function K(a,b,c){var d=e.create(b,c);return a.parentNode.insertBefore(d,a),d.appendChild(a),d}function L(a,c,d){function t(a){var b,d,g,l,m;b=d=a?f:i,m=a?"previousSibling":"nextSibling",root=e.getRoot();if(b.nodeType==3&&!J(b))if(a?h>0:k<b.nodeValue.length)return b;for(;;){if(d==root||!c[0].block_expand&&j(d))return d;for(l=d[m];l;l=l[m])if(!P(l)&&!J(l))return d;d=d.parentNode}return b}function u(a,b){b===q&&(b=a.nodeType===3?a.length:a.childNodes.length);while(a&&a.hasChildNodes())a=a.childNodes[b],a&&(b=a.nodeType===3?a.length:a.childNodes.length);return{node:a,offset:b}}var f=a.startContainer,h=a.startOffset,i=a.endContainer,k=a.endOffset,m,n,p,r;f.nodeType==1&&f.hasChildNodes()&&(n=f.childNodes.length-1,f=f.childNodes[h>n?n:h],f.nodeType==3&&(h=0)),i.nodeType==1&&i.hasChildNodes()&&(n=i.childNodes.length-1,i=i.childNodes[k>n?n:k-1],i.nodeType==3&&(k=i.nodeValue.length));if(P(f.parentNode)||P(f))f=P(f)?f:f.parentNode,f=f.nextSibling||f,f.nodeType==3&&(h=0);if(P(i.parentNode)||P(i))i=P(i)?i:i.parentNode,i=i.previousSibling||i,i.nodeType==3&&(k=i.length);if(c[0].inline){if(a.collapsed){function v(a,c,f){function m(a,b){var c,e,g=a.nodeValue;return typeof b=="undefined"&&(b=f?g.length:0),f?(c=g.lastIndexOf(" ",b),e=g.lastIndexOf(" ",b),c=c>e?c:e,c!==-1&&!d&&c++):(c=g.indexOf(" ",b),e=g.indexOf(" ",b),c=c!==-1&&(e===-1||c<e)?c:e),c}var h,i,k,l;if(a.nodeType===3){k=m(a,c);if(k!==-1)return{container:a,offset:k};l=a}h=new g(a,e.getParent(a,j)||b.getBody());while(i=h[f?"prev":"next"]())if(i.nodeType===3){l=i,k=m(i);if(k!==-1)return{container:i,offset:k}}else if(j(i))break;if(l)return f?c=0:c=l.length,{container:l,offset:c}}r=v(f,h,!0),r&&(f=r.container,h=r.offset),r=v(i,k),r&&(i=r.container,k=r.offset)}p=u(i,k);if(p.node){while(p.node&&p.offset===0&&p.node.previousSibling)p=u(p.node.previousSibling);p.node&&p.offset>0&&p.node.nodeType===3&&p.node.nodeValue.charAt(p.offset-1)===" "&&(p.offset>1?(i=p.node,i.splitText(p.offset-1)):!p.node.previousSibling)}}if(c[0].inline||c[0].block_expand){if(!c[0].inline||f.nodeType!=3||h===0)f=t(!0);if(!c[0].inline||i.nodeType!=3||k===i.nodeValue.length)i=t()}if(c[0].selector&&c[0].expand!==o&&!c[0].inline){function w(b,d){var f,g,h,i;b.nodeType==3&&b.nodeValue.length==0&&b[d]&&(b=b[d]),f=s(b);for(g=0;g<f.length;g++)for(h=0;h<c.length;h++){i=c[h];if("collapsed"in i&&i.collapsed!==a.collapsed)continue;if(e.is(f[g],i.selector))return f[g]}return b}f=w(f,"previousSibling"),i=w(i,"nextSibling")}if(c[0].block||c[0].selector){function x(a,b,d){var f;c[0].wrapper||(f=e.getParent(a,c[0].block)),f||(f=e.getParent(a.nodeType==3?a.parentNode:a,j)),f&&c[0].wrapper&&(f=s(f,"ul,ol").reverse()[0]||f);if(!f){f=a;while(f[b]&&!j(f[b])){f=f[b];if(G(f,"br"))break}}return f||a}f=x(f,"previousSibling"),i=x(i,"nextSibling"),c[0].block&&(j(f)||(f=t(!0)),j(i)||(i=t()))}return f.nodeType==1&&(h=l(f),f=f.parentNode),i.nodeType==1&&(k=l(i)+1,i=i.parentNode),{startContainer:f,startOffset:h,endContainer:i,endOffset:k}}function M(a,b,c,f){var g,h,i;if(!F(c,a))return o;if(a.remove!="all"){d(a.styles,function(a,d){a=I(a,b),typeof d=="number"&&(d=a,f=0),(!f||G(H(f,d),a))&&e.setStyle(c,d,""),i=1}),i&&e.getAttrib(c,"style")==""&&(c.removeAttribute("style"),c.removeAttribute("data-mce-style")),d(a.attributes,function(a,g){var h;a=I(a,b),typeof g=="number"&&(g=a,f=0);if(!f||G(e.getAttrib(f,g),a)){if(g=="class"){a=e.getAttrib(c,g);if(a){h="",d(a.split(/\s+/),function(a){/mce\w+/.test(a)&&(h+=(h?" ":"")+a)});if(h){e.setAttrib(c,g,h);return}}}g=="class"&&c.removeAttribute("className"),n.test(g)&&c.removeAttribute("data-mce-"+g),c.removeAttribute(g)}}),d(a.classes,function(a){a=I(a,b),(!f||e.hasClass(f,a))&&e.removeClass(c,a)}),h=e.getAttribs(c);for(g=0;g<h.length;g++)if(h[g].nodeName.indexOf("_")!==0)return o}if(a.remove!="none")return N(c,a),p}function N(b,c){var f=b.parentNode,g;if(c.block)if(!k){function h(a,b,c){return a=O(a,b,c),!a||a.nodeName=="BR"||j(a)}j(b)&&!j(f)&&(!h(b,o)&&!h(b.firstChild,p,1)&&b.insertBefore(e.create("br"),b.firstChild),!h(b,p)&&!h(b.lastChild,o,1)&&b.appendChild(e.create("br")))}else f==e.getRoot()&&(!c.list_block||!G(b,c.list_block))&&d(a.grep(b.childNodes),function(a){i(k,a.nodeName.toLowerCase())?g?g.appendChild(a):g=K(a,k):g=0});if(c.selector&&c.inline&&!G(c.inline,b))return;e.remove(b,1)}function O(a,b,c){if(a){b=b?"nextSibling":"previousSibling";for(a=c?a:a[b];a;a=a[b])if(a.nodeType==1||!J(a))return a}}function P(a){return a&&a.nodeType==1&&a.getAttribute("data-mce-type")=="bookmark"}function Q(b,c){function i(a,b){function c(a){var b={};return d(e.getAttribs(a),function(c){var d=c.nodeName.toLowerCase();d.indexOf("_")!==0&&d!=="style"&&(b[d]=e.getAttrib(a,d))}),b}function f(a,b){var c,d;for(d in a)if(a.hasOwnProperty(d)){c=b[d];if(c===q)return o;if(a[d]!=c)return o;delete b[d]}for(d in b)if(b.hasOwnProperty(d))return o;return p}return a.nodeName!=b.nodeName?o:f(c(a),c(b))?f(e.parseStyle(e.getAttrib(a,"style")),e.parseStyle(e.getAttrib(b,"style")))?p:o:o}var f,g,h;if(b&&c){function j(a,b){for(g=a;g;g=g[b]){if(g.nodeType==3&&g.nodeValue.length!==0)return a;if(g.nodeType==1&&!P(g))return g}return a}b=j(b,"previousSibling"),c=j(c,"nextSibling");if(i(b,c)){for(g=b.nextSibling;g&&g!=c;)h=g,g=g.nextSibling,b.appendChild(h);return e.remove(c),d(a.grep(c.childNodes),function(a){b.appendChild(a)}),b}}return c}function R(a){return/^(h[1-6]|p|div|pre|address|dl|dt|dd)$/.test(a)}function S(a,c){var d,e,f,h;return d=a[c?"startContainer":"endContainer"],e=a[c?"startOffset":"endOffset"],d.nodeType==1&&(f=d.childNodes.length-1,!c&&e&&e--,d=d.childNodes[e>f?f:e]),d.nodeType===3&&c&&e>=d.nodeValue.length&&(d=(new g(d,b.getBody())).next()||d),d.nodeType===3&&!c&&e==0&&(d=(new g(d,b.getBody())).prev()||d),d}function T(c,d,i){function n(a){var c=e.create("span",{id:k,"data-mce-bogus":!0,style:l?"color:red":""});return a&&c.appendChild(b.getDoc().createTextNode(j)),c}function o(a,b){while(a){if(a.nodeType===3&&a.nodeValue!==j||a.childNodes.length>1)return!1;b&&a.nodeType===1&&b.push(a),a=a.firstChild}return!0}function p(a){while(a){if(a.id===k)return a;a=a.parentNode}}function q(a){var b;if(a){b=new g(a,a);for(a=b.current();a;a=b.next())if(a.nodeType===3)return a}}function r(a,b){var c,d;if(!a){a=p(f.getStart());if(!a)while(a=e.get(k))r(a,!1)}else d=f.getRng(!0),o(a)?(b!==!1&&(d.setStartBefore(a),d.setEndBefore(a)),e.remove(a)):(c=q(a),c.nodeValue.charAt(0)===m&&(c=c.deleteData(0,1)),e.remove(a,1)),f.setRng(d)}function s(){var a,b,c,e,g,k,l;a=f.getRng(!0),e=a.startOffset,k=a.startContainer,l=k.nodeValue,b=p(f.getStart()),b&&(c=q(b)),l&&e>0&&e<l.length&&/\w/.test(l.charAt(e))&&/\w/.test(l.charAt(e-1))?(g=f.getBookmark(),a.collapse(!0),a=L(a,u(d)),a=h.split(a),y(d,i,a),f.moveToBookmark(g)):(!b||c.nodeValue!==j?(b=n(!0),c=b.firstChild,a.insertNode(b),e=1,y(d,i,b)):y(d,i,b),f.setCursorLocation(c,e))}function t(){var a=f.getRng(!0),b,c,g,k,l,m,o=[],p,q;b=a.startContainer,c=a.startOffset,l=b;if(b.nodeType==3){if(c!=b.nodeValue.length||b.nodeValue===j)k=!0;l=l.parentNode}while(l){if(B(l,d,i)){m=l;break}l.nextSibling&&(k=!0),o.push(l),l=l.parentNode}if(!m)return;if(k)g=f.getBookmark(),a.collapse(!0),a=L(a,u(d),!0),a=h.split(a),z(d,i,a),f.moveToBookmark(g);else{q=n(),l=q;for(p=o.length-1;p>=0;p--)l.appendChild(o[p].cloneNode(!1)),l=l.firstChild;l.appendChild(e.doc.createTextNode(j)),l=l.firstChild,e.insertAfter(q,m),f.setCursorLocation(l,1)}}var j,k="_mce_caret",l=b.settings.caret_debug;j=a.isGecko?"":m,self._hasCaretEvents||(b.onBeforeGetContent.addToTop(function(){var a=[],b;if(o(p(f.getStart()),a)){b=a.length;while(b--)e.setAttrib(a[b],"data-mce-bogus","1")}}),a.each("onMouseUp onKeyUp".split(" "),function(a){b[a].addToTop(function(){r()})}),b.onKeyDown.addToTop(function(a,b){var c=b.keyCode;(c==8||c==37||c==39)&&r(p(f.getStart()))}),self._hasCaretEvents=!0),c=="apply"?s():t()}function U(a){var b=a.startContainer,c=a.startOffset,d,h,i,j;b.nodeType==3&&c>=b.nodeValue.length-1&&(b=b.parentNode,c=l(b)+1);if(b.nodeType==1){i=b.childNodes,b=i[Math.min(c,i.length-1)],d=new g(b),c>i.length-1&&d.next();for(h=d.current();h;h=d.next())if(h.nodeType==3&&!J(h)){j=e.create("a",null,m),h.parentNode.insertBefore(j,h),a.setStart(h,0),f.setRng(a),e.remove(j);return}}}var c={},d=a.each,e=b.dom,f=b.selection,g=a.dom.TreeWalker,h=new a.dom.RangeUtils(e),i=b.schema.isValidChild,j=e.isBlock,k=b.settings.forced_root_block,l=e.nodeIndex,m="",n=/^(src|href|style)$/,o=!1,p=!0,q,w=function(a){var c;return b.dom.getParent(a,function(a){return c=b.dom.getStyle(a,"text-decoration"),c&&c!=="none"}),c},x=function(a){var c;a.nodeType===1&&a.parentNode&&a.parentNode.nodeType===1&&(c=w(a.parentNode),b.dom.getStyle(a,"color")&&c?b.dom.setStyle(a,"text-decoration",c):b.dom.getStyle(a,"textdecoration")===c&&b.dom.setStyle(a,"text-decoration",null))};a.extend(this,{get:u,register:v,apply:y,remove:z,toggle:A,match:C,matchAll:D,matchNode:B,canApply:E})}}(tinymce),tinymce.onAddEditor.add(function(a,b){var c,d,e,f=b.settings;if(f.inline_styles){d=a.explode(f.font_size_legacy_values);function g(b,c){a.each(c,function(a,c){a&&e.setStyle(b,c,a)}),e.rename(b,"span")}c={font:function(a,b){g(b,{backgroundColor:b.style.backgroundColor,color:b.color,fontFamily:b.face,fontSize:d[parseInt(b.size)-1]})},u:function(a,b){g(b,{textDecoration:"underline"})},strike:function(a,b){g(b,{textDecoration:"line-through"})}};function h(d,g){e=d.dom,f.convert_fonts_to_spans&&a.each(e.select("font,u,strike",g.node),function(a){c[a.nodeName.toLowerCase()](b.dom,a)})}b.onPreProcess.add(h),b.onSetContent.add(h),b.onInit.add(function(){b.selection.onSetContent.add(h)})}});