script: tinymce
window.tinyMCEPreInit=window.tinyMCEPreInit||{base:"/assets/tinymce",query:"3.5.9",suffix:""},function(e){var t,n=/^\s*|\s*$/g,o="$1"==="B".replace(/A(.)|B/,"$1"),r={majorVersion:"3",minorVersion:"5.9",releaseDate:"2013-10-10",_init:function(){function t(e){return e.src&&/tiny_mce(|_gzip|_jquery|_prototype|_full)(_dev|_src)?.js/.test(e.src)?(/_(src|dev)\.js/g.test(e.src)&&(c.suffix="_src"),-1!=(a=e.src.indexOf("?"))&&(c.query=e.src.substring(a+1)),c.baseURL=e.src.substring(0,e.src.lastIndexOf("/")),i&&-1==c.baseURL.indexOf("://")&&0!==c.baseURL.indexOf("/")&&(c.baseURL=i+c.baseURL),c.baseURL):null}var n,o,r,i,a,s,c=this,d=document,l=navigator,u=l.userAgent;if(c.isIE11=-1!=u.indexOf("Trident/")&&-1!=u.indexOf("rv:"),c.isOpera=e.opera&&opera.buildNumber,c.isWebKit=/WebKit/.test(u),c.isIE=!c.isWebKit&&!c.isOpera&&/MSIE/gi.test(u)&&/Explorer/gi.test(l.appName)||c.isIE11,c.isIE6=c.isIE&&/MSIE [56]/.test(u),c.isIE7=c.isIE&&/MSIE [7]/.test(u),c.isIE8=c.isIE&&/MSIE [8]/.test(u),c.isIE9=c.isIE&&/MSIE [9]/.test(u),c.isGecko=!c.isWebKit&&!c.isIE11&&/Gecko/.test(u),c.isMac=-1!=u.indexOf("Mac"),c.isAir=/adobeair/i.test(u),c.isIDevice=/(iPad|iPhone)/.test(u),c.isIOS5=c.isIDevice&&u.match(/AppleWebKit\/(\d*)/)[1]>=534,e.tinyMCEPreInit)return c.suffix=tinyMCEPreInit.suffix,c.baseURL=tinyMCEPreInit.base,void(c.query=tinyMCEPreInit.query);for(c.suffix="",o=d.getElementsByTagName("base"),n=0;n<o.length;n++)s=o[n].href,s&&(/^https?:\/\/[^\/]+$/.test(s)&&(s+="/"),i=s?s.match(/.*\//)[0]:"");for(o=d.getElementsByTagName("script"),n=0;n<o.length;n++)if(t(o[n]))return;if(r=d.getElementsByTagName("head")[0])for(o=r.getElementsByTagName("script"),n=0;n<o.length;n++)if(t(o[n]))return},is:function(e,n){return n?"array"==n&&r.isArray(e)?!0:typeof e==n:e!==t},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},makeMap:function(e,t,n){var o;for(e=e||[],t=t||",","string"==typeof e&&(e=e.split(t)),n=n||{},o=e.length;o--;)n[e[o]]={};return n},each:function(e,n,o){var r,i;if(!e)return 0;if(o=o||e,e.length!==t){for(r=0,i=e.length;i>r;r++)if(n.call(o,e[r],r,e)===!1)return 0}else for(r in e)if(e.hasOwnProperty(r)&&n.call(o,e[r],r,e)===!1)return 0;return 1},map:function(e,t){var n=[];return r.each(e,function(e){n.push(t(e))}),n},grep:function(e,t){var n=[];return r.each(e,function(e){(!t||t(e))&&n.push(e)}),n},inArray:function(e,t){var n,o;if(e)for(n=0,o=e.length;o>n;n++)if(e[n]===t)return n;return-1},extend:function(e,n){var o,r,i,a,s=arguments;for(o=1,r=s.length;r>o;o++){n=s[o];for(i in n)n.hasOwnProperty(i)&&(a=n[i],a!==t&&(e[i]=a))}return e},trim:function(e){return(e?""+e:"").replace(n,"")},create:function(e,t,n){var o,r,i,a,s,c=this,d=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),i=e[3].match(/(^|\.)(\w+)$/i)[2],r=c.createNS(e[3].replace(/\.\w+$/,""),n),!r[i]){if("static"==e[2])return r[i]=t,void(this.onCreate&&this.onCreate(e[2],e[3],r[i]));t[i]||(t[i]=function(){},d=1),r[i]=t[i],c.extend(r[i].prototype,t),e[5]&&(o=c.resolve(e[5]).prototype,a=e[5].match(/\.(\w+)$/i)[1],s=r[i],r[i]=d?function(){return o[a].apply(this,arguments)}:function(){return this.parent=o[a],s.apply(this,arguments)},r[i].prototype[i]=r[i],c.each(o,function(e,t){r[i].prototype[t]=o[t]}),c.each(t,function(e,t){o[t]?r[i].prototype[t]=function(){return this.parent=o[t],e.apply(this,arguments)}:t!=i&&(r[i].prototype[t]=e)})),c.each(t["static"],function(e,t){r[i][t]=e}),this.onCreate&&this.onCreate(e[2],e[3],r[i].prototype)}},walk:function(e,t,n,o){o=o||this,e&&(n&&(e=e[n]),r.each(e,function(e,i){return t.call(o,e,i,n)===!1?!1:void r.walk(e,t,n,o)}))},createNS:function(t,n){var o,r;for(n=n||e,t=t.split("."),o=0;o<t.length;o++)r=t[o],n[r]||(n[r]={}),n=n[r];return n},resolve:function(t,n){var o,r;for(n=n||e,t=t.split("."),o=0,r=t.length;r>o&&(n=n[t[o]],n);o++);return n},addUnload:function(t,n){function o(){function t(){n.detachEvent("onstop",t),r&&r(),n=0}var n=document;"interactive"==n.readyState&&(n&&n.attachEvent("onstop",t),e.setTimeout(function(){n&&n.detachEvent("onstop",t)},0))}var r,i=this;return r=function(){var t,n,a=i.unloads;if(a){for(n in a)t=a[n],t&&t.func&&t.func.call(t.scope,1);e.detachEvent?(e.detachEvent("onbeforeunload",o),e.detachEvent("onunload",r)):e.removeEventListener&&e.removeEventListener("unload",r,!1),i.unloads=t=a=w=r=0,e.CollectGarbage&&CollectGarbage()}},t={func:t,scope:n||this},i.unloads?i.unloads.push(t):(e.attachEvent?(e.attachEvent("onunload",r),e.attachEvent("onbeforeunload",o)):e.addEventListener&&e.addEventListener("unload",r,!1),i.unloads=[t]),t},removeUnload:function(e){var t=this.unloads,n=null;return r.each(t,function(o,r){return o&&o.func==e?(t.splice(r,1),n=e,!1):void 0}),n},explode:function(e,t){return!e||r.is(e,"array")?e:r.map(e.split(t||","),r.trim)},_addVer:function(e){var t;return this.query?(t=(-1==e.indexOf("?")?"?":"&")+this.query,-1==e.indexOf("#")?e+t:e.replace("#",t+"#")):e},_replace:function(e,n,r){return o?r.replace(e,function(){var e,o=n,r=arguments;for(e=0;e<r.length-2;e++)o=r[e]===t?o.replace(new RegExp("\\$"+e,"g"),""):o.replace(new RegExp("\\$"+e,"g"),r[e]);return o}):r.replace(e,n)}};r._init(),e.tinymce=e.tinyMCE=r}(window),tinymce.create("tinymce.util.Dispatcher",{scope:null,listeners:null,inDispatch:!1,Dispatcher:function(e){this.scope=e||this,this.listeners=[]},add:function(e,t){return this.listeners.push({cb:e,scope:t||this.scope}),e},addToTop:function(e,t){var n=this,o={cb:e,scope:t||n.scope};return n.inDispatch?n.listeners=[o].concat(n.listeners):n.listeners.unshift(o),e},remove:function(e){var t=this.listeners,n=null;return tinymce.each(t,function(o,r){return e==o.cb?(n=o,t.splice(r,1),!1):void 0}),n},dispatch:function(){var e,t,n,o=this,r=arguments,i=o.listeners;for(o.inDispatch=!0,t=0;t<i.length&&(n=i[t],e=n.cb.apply(n.scope,r.length>0?r:[n.scope]),e!==!1);t++);return o.inDispatch=!1,e}}),function(){var e=tinymce.each;tinymce.create("tinymce.util.URI",{URI:function(t,n){var o,r,i=this;return t=tinymce.trim(t),n=i.settings=n||{},/^([\w\-]+):([^\/]{2})/i.test(t)||/^\s*#/.test(t)?void(i.source=t):(0===t.indexOf("/")&&0!==t.indexOf("//")&&(t=(n.base_uri?n.base_uri.protocol||"http":"http")+"://mce_host"+t),/^[\w\-]*:?\/\//.test(t)||(r=n.base_uri?n.base_uri.path:new tinymce.util.URI(location.href).directory,t=(n.base_uri&&n.base_uri.protocol||"http")+"://mce_host"+i.toAbsPath(r,t)),t=t.replace(/@@/g,"(mce_at)"),t=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))[email protected])?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(t),e(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(e,n){var o=t[n];o&&(o=o.replace(/\(mce_at\)/g,"@@")),i[e]=o}),o=n.base_uri,void(o&&(i.protocol||(i.protocol=o.protocol),i.userInfo||(i.userInfo=o.userInfo),i.port||"mce_host"!==i.host||(i.port=o.port),i.host&&"mce_host"!==i.host||(i.host=o.host),i.source="")))},setPath:function(e){var t=this;e=/^(.*?)\/?(\w+)?$/.exec(e),t.path=e[0],t.directory=e[1],t.file=e[2],t.source="",t.getURI()},toRelative:function(e){var t,n=this;if("./"===e)return e;if(e=new tinymce.util.URI(e,{base_uri:n}),"mce_host"!=e.host&&n.host!=e.host&&e.host||n.port!=e.port||n.protocol!=e.protocol)return e.getURI();var o=n.getURI(),r=e.getURI();return o==r||"/"==o.charAt(o.length-1)&&o.substr(0,o.length-1)==r?o:(t=n.toRelPath(n.path,e.path),e.query&&(t+="?"+e.query),e.anchor&&(t+="#"+e.anchor),t)},toAbsolute:function(e,t){return e=new tinymce.util.URI(e,{base_uri:this}),e.getURI(this.host==e.host&&this.protocol==e.protocol?t:0)},toRelPath:function(e,t){var n,o,r,i=0,a="";if(e=e.substring(0,e.lastIndexOf("/")),e=e.split("/"),n=t.split("/"),e.length>=n.length)for(o=0,r=e.length;r>o;o++)if(o>=n.length||e[o]!=n[o]){i=o+1;break}if(e.length<n.length)for(o=0,r=n.length;r>o;o++)if(o>=e.length||e[o]!=n[o]){i=o+1;break}if(1===i)return t;for(o=0,r=e.length-(i-1);r>o;o++)a+="../";for(o=i-1,r=n.length;r>o;o++)a+=o!=i-1?"/"+n[o]:n[o];return a},toAbsPath:function(t,n){var o,r,i,a=0,s=[];for(r=/\/$/.test(n)?"/":"",t=t.split("/"),n=n.split("/"),e(t,function(e){e&&s.push(e)}),t=s,o=n.length-1,s=[];o>=0;o--)0!==n[o].length&&"."!==n[o]&&(".."!==n[o]?a>0?a--:s.push(n[o]):a++);return o=t.length-a,i=0>=o?s.reverse().join("/"):t.slice(0,o).join("/")+"/"+s.reverse().join("/"),0!==i.indexOf("/")&&(i="/"+i),r&&i.lastIndexOf("/")!==i.length-1&&(i+=r),i},getURI:function(e){var t,n=this;return(!n.source||e)&&(t="",e||(n.protocol&&(t+=n.protocol+"://"),n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}})}(),function(){var e=tinymce.each;tinymce.create("static tinymce.util.Cookie",{getHash:function(t){var n,o=this.get(t);return o&&e(o.split("&"),function(e){e=e.split("="),n=n||{},n[unescape(e[0])]=unescape(e[1])}),n},setHash:function(t,n,o,r,i,a){var s="";e(n,function(e,t){s+=(s?"&":"")+escape(t)+"="+escape(e)}),this.set(t,s,o,r,i,a)},get:function(e){var t,n,o=document.cookie,r=e+"=";if(o){if(n=o.indexOf("; "+r),-1==n){if(n=o.indexOf(r),0!==n)return null}else n+=2;return t=o.indexOf(";",n),-1==t&&(t=o.length),unescape(o.substring(n+r.length,t))}},set:function(e,t,n,o,r,i){document.cookie=e+"="+escape(t)+(n?"; expires="+n.toGMTString():"")+(o?"; path="+escape(o):"")+(r?"; domain="+r:"")+(i?"; secure":"")},remove:function(e,t,n){var o=new Date;o.setTime(o.getTime()-1e3),this.set(e,"",o,t,n)}})}(),function(){function serialize(e,t){var n,o,r,i;if(t=t||'"',null==e)return"null";if(r=typeof e,"string"==r)return o="\bb        t\nn\ff\rr\"\"''\\\\",t+e.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,r){return'"'===t&&"'"===e?e:(n=o.indexOf(r),n+1?"\\"+o.charAt(n+1):(e=r.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e))})+t;if("object"==r){if(e.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(e)){for(n=0,o="[";n<e.length;n++)o+=(n>0?",":"")+serialize(e[n],t);return o+"]"}o="{";for(i in e)e.hasOwnProperty(i)&&(o+="function"!=typeof e[i]?(o.length>1?","+t:t)+i+t+":"+serialize(e[i],t):"");return o+"}"}return""+e}tinymce.util.JSON={serialize:serialize,parse:function(s){try{return eval("("+s+")")}catch(ex){}}}}(),tinymce.create("static tinymce.util.XHR",{send:function(e){function t(){!e.async||4==o.readyState||a++>1e4?(e.success&&1e4>a&&200==o.status?e.success.call(e.success_scope,""+o.responseText,o,e):e.error&&e.error.call(e.error_scope,a>1e4?"TIMED_OUT":"GENERAL",o,e),o=null):i.setTimeout(t,10)}function n(e){o=0;try{o=new ActiveXObject(e)}catch(t){}return o}var o,r,i=window,a=0;if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=e.async===!1?!1:!0,e.data=e.data||"",o=i.XMLHttpRequest?new XMLHttpRequest:n("Microsoft.XMLHTTP")||n("Msxml2.XMLHTTP")){if(o.overrideMimeType&&o.overrideMimeType(e.content_type),o.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.content_type&&o.setRequestHeader("Content-Type",e.content_type),o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.send(e.data),!e.async)return t();r=i.setTimeout(t,10)}}}),function(){var e=tinymce.extend,t=tinymce.util.JSON,n=tinymce.util.XHR;tinymce.create("tinymce.util.JSONRequest",{JSONRequest:function(t){this.settings=e({},t),this.count=0},send:function(o){var r=o.error,i=o.success;o=e(this.settings,o),o.success=function(e,n){e=t.parse(e),"undefined"==typeof e&&(e={error:"JSON Parse error."}),e.error?r.call(o.error_scope||o.scope,e.error,n):i.call(o.success_scope||o.scope,e.result)},o.error=function(e,t){r&&r.call(o.error_scope||o.scope,e,t)},o.data=t.serialize({id:o.id||"c"+this.count++,method:o.method,params:o.params}),o.content_type="application/json",n.send(o)},"static":{sendRPC:function(e){return(new tinymce.util.JSONRequest).send(e)}}})}(),function(e){e.VK={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey},metaKeyPressed:function(t){return e.isMac?t.metaKey:t.ctrlKey&&!t.altKey}}}(tinymce),tinymce.util.Quirks=function(e){function t(t,n){try{e.getDoc().execCommand(t,!1,n)}catch(o){}}function n(){var t=e.getDoc().documentMode;return t?t:6}function o(e){return e.isDefaultPrevented()}function r(){function t(t){function n(){if(3==s.nodeType){if(t&&c==s.length)return!0;if(!t&&0===c)return!0}}var o,r,i,a,s,c,d;o=R.getRng();var l=[o.startContainer,o.startOffset,o.endContainer,o.endOffset];if(o.collapsed||(t=!0),s=o[(t?"start":"end")+"Container"],c=o[(t?"start":"end")+"Offset"],3==s.nodeType&&(r=M.getParent(o.startContainer,M.isBlock),t&&(r=M.getNext(r,M.isBlock)),!r||!n()&&o.collapsed||(i=M.create("em",{id:"__mceDel"}),P(tinymce.grep(r.childNodes),function(e){i.appendChild(e)}),r.appendChild(i))),o=M.createRng(),o.setStart(l[0],l[1]),o.setEnd(l[2],l[3]),R.setRng(o),e.getDoc().execCommand(t?"ForwardDelete":"Delete",!1,null),i){for(a=R.getBookmark();d=M.get("__mceDel");)M.remove(d,!0);R.moveToBookmark(a)}}e.onKeyDown.add(function(e,n){var r;r=n.keyCode==B,o(n)||!r&&n.keyCode!=A||T.modifierPressed(n)||(n.preventDefault(),t(r))}),e.addCommand("Delete",function(){t()})}function i(){function t(e){var t=M.create("body"),n=e.cloneContents();return t.appendChild(n),R.serializer.serialize(t,{format:"html"})}function n(n){var o=t(n),r=M.createRng();r.selectNode(e.getBody());var i=t(r);return o===i}e.onKeyDown.add(function(e,t){var r,i=t.keyCode;if(!o(t)&&(i==B||i==A)){if(r=e.selection.isCollapsed(),r&&!M.isEmpty(e.getBody()))return;if(tinymce.isIE&&!r)return;if(!r&&!n(e.selection.getRng()))return;e.setContent(""),e.selection.setCursorLocation(e.getBody(),0),e.nodeChanged()}})}function a(){e.onKeyDown.add(function(e,t){!o(t)&&65==t.keyCode&&T.metaKeyPressed(t)&&(t.preventDefault(),e.execCommand("SelectAll"))})}function s(){e.settings.content_editable||(M.bind(e.getDoc(),"focusin",function(){R.setRng(R.getRng())}),M.bind(e.getDoc(),"mousedown",function(t){t.target==e.getDoc().documentElement&&(e.getWin().focus(),R.setRng(R.getRng()))}))}function c(){e.onKeyDown.add(function(e,t){if(!o(t)&&t.keyCode===A&&R.isCollapsed()&&0===R.getRng(!0).startOffset){var n=R.getNode(),r=n.previousSibling;r&&r.nodeName&&"hr"===r.nodeName.toLowerCase()&&(M.remove(r),tinymce.dom.Event.cancel(t))}})}function d(){Range.prototype.getClientRects||e.onMouseDown.add(function(e,t){if(!o(t)&&"HTML"===t.target.nodeName){var n=e.getBody();n.blur(),setTimeout(function(){n.focus()},0)}})}function l(){e.onClick.add(function(e,t){t=t.target,/^(IMG|HR)$/.test(t.nodeName)&&R.getSel().setBaseAndExtent(t,0,t,1),"A"==t.nodeName&&M.hasClass(t,"mceItemAnchor")&&R.select(t),e.nodeChanged()})}function u(){function t(){var t=M.getAttribs(R.getStart().cloneNode(!1));return function(){var n=R.getStart();n!==e.getBody()&&(M.setAttrib(n,"style",null),P(t,function(e){n.setAttributeNode(e.cloneNode(!0))}))}}function n(){return!R.isCollapsed()&&M.getParent(R.getStart(),M.isBlock)!=M.getParent(R.getEnd(),M.isBlock)}function r(e,t){return t.preventDefault(),!1}e.onKeyPress.add(function(e,r){var i;return o(r)||8!=r.keyCode&&46!=r.keyCode||!n()?void 0:(i=t(),e.getDoc().execCommand("delete",!1,null),i(),r.preventDefault(),!1)}),M.bind(e.getDoc(),"cut",function(i){var a;!o(i)&&n()&&(a=t(),e.onKeyUp.addToTop(r),setTimeout(function(){a(),e.onKeyUp.remove(r)},0))})}function f(){var t,n;M.bind(e.getDoc(),"selectionchange",function(){n&&(clearTimeout(n),n=0),n=window.setTimeout(function(){var n=R.getRng();t&&tinymce.dom.RangeUtils.compareRanges(n,t)||(e.nodeChanged(),t=n)},50)})}function p(){document.body.setAttribute("role","application")}function m(){e.onKeyDown.add(function(e,t){if(!o(t)&&t.keyCode===A&&R.isCollapsed()&&0===R.getRng(!0).startOffset){var n=R.getNode().previousSibling;if(n&&n.nodeName&&"table"===n.nodeName.toLowerCase())return tinymce.dom.Event.cancel(t)}})}function h(){n()>7||(t("RespectVisibilityInDesign",!0),e.contentStyles.push(".mceHideBrInPre pre br {display: none}"),M.addClass(e.getBody(),"mceHideBrInPre"),I.addNodeFilter("pre",function(e){for(var t,n,o,r,i=e.length;i--;)for(t=e[i].getAll("br"),n=t.length;n--;)o=t[n],r=o.prev,r&&3===r.type&&"\n"!=r.value.charAt(r.value-1)?r.value+="\n":o.parent.insert(new tinymce.html.Node("#text",3),o,!0).value="\n"}),D.addNodeFilter("pre",function(e){for(var t,n,o,r,i=e.length;i--;)for(t=e[i].getAll("br"),n=t.length;n--;)o=t[n],r=o.prev,r&&3==r.type&&(r.value=r.value.replace(/\r?\n$/,""))}))}function g(){M.bind(e.getBody(),"mouseup",function(){var e,t=R.getNode();"IMG"==t.nodeName&&((e=M.getStyle(t,"width"))&&(M.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),M.setStyle(t,"width","")),(e=M.getStyle(t,"height"))&&(M.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),M.setStyle(t,"height","")))})}function v(){e.onKeyDown.add(function(e,t){var n,r,i,a,s,c,d;if(n=t.keyCode==B,!o(t)&&(n||t.keyCode==A)&&!T.modifierPressed(t)&&(r=R.getRng(),i=r.startContainer,a=r.startOffset,d=r.collapsed,3==i.nodeType&&i.nodeValue.length>0&&(0===a&&!d||d&&a===(n?0:1)))){if(c=i.previousSibling,c&&"IMG"==c.nodeName)return;nonEmptyElements=e.schema.getNonEmptyElements(),t.preventDefault(),s=M.create("br",{id:"__tmp"}),i.parentNode.insertBefore(s,i),e.getDoc().execCommand(n?"ForwardDelete":"Delete",!1,null),i=R.getRng().startContainer,c=i.previousSibling,c&&1==c.nodeType&&!M.isBlock(c)&&M.isEmpty(c)&&!nonEmptyElements[c.nodeName.toLowerCase()]&&M.remove(c),M.remove("__tmp")}})}function y(){e.onKeyDown.add(function(e,t){var n,r,i,a,s;if(!o(t)&&t.keyCode==T.BACKSPACE&&(n=R.getRng(),r=n.startContainer,i=n.startOffset,a=M.getRoot(),s=r,n.collapsed&&0===i)){for(;s&&s.parentNode&&s.parentNode.firstChild==s&&s.parentNode!=a;)s=s.parentNode;"BLOCKQUOTE"===s.tagName&&(e.formatter.toggle("blockquote",null,s),n=M.createRng(),n.setStart(r,0),n.setEnd(r,0),R.setRng(n))}})}function b(){function n(){e._refreshContentEditable(),t("StyleWithCSS",!1),t("enableInlineTableEditing",!1),L.object_resizing||t("enableObjectResizing",!1)}L.readonly||(e.onBeforeExecCommand.add(n),e.onMouseDown.add(n))}function C(){function t(){P(M.select("a"),function(e){var t=e.parentNode,n=M.getRoot();if(t.lastChild===e){for(;t&&!M.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}M.add(t,"br",{"data-mce-bogus":1})}})}e.onExecCommand.add(function(e,n){"CreateLink"===n&&t(e)}),e.onSetContent.add(R.onSetContent.add(t))}function x(){L.forced_root_block&&e.onInit.add(function(){t("DefaultParagraphSeparator",L.forced_root_block)})}function _(){function t(t,n){t&&n.initial||e.execCommand("mceRepaint")}e.onUndo.add(t),e.onRedo.add(t),e.onSetContent.add(t)}function E(){e.onKeyDown.add(function(e,t){var n;o(t)||t.keyCode!=A||(n=e.getDoc().selection.createRange(),n&&n.item&&(t.preventDefault(),e.undoManager.beforeChange(),M.remove(n.item(0)),e.undoManager.add()))})}function S(){var t;n()>=10&&(t="",P("p div h1 h2 h3 h4 h5 h6".split(" "),function(e,n){t+=(n>0?",":"")+e+":empty"}),e.contentStyles.push(t+"{padding-right: 1px !important}"))}function k(){function n(e){var t,n;t=e.screenX-f,n=e.screenY-p,y=t*u[2]+m,b=n*u[3]+h,y=5>y?5:y,b=5>b?5:b,(T.modifierPressed(e)||"IMG"==d.nodeName&&u[2]*u[3]!==0)&&(y=Math.round(b/g),b=Math.round(y*g)),M.setStyles(l,{width:y,height:b}),u[2]<0&&l.clientWidth<=y&&M.setStyle(l,"left",s+(m-y)),u[3]<0&&l.clientHeight<=b&&M.setStyle(l,"top",c+(h-b))}function o(){function t(t,n){n&&(d.style[t]||!e.schema.isValid(d.nodeName.toLowerCase(),t)?M.setStyle(d,t,n):M.setAttrib(d,t,n))}t("width",y),t("height",b),M.unbind(x,"mousemove",n),M.unbind(x,"mouseup",o),C!=x&&(M.unbind(C,"mousemove",n),M.unbind(C,"mouseup",o)),M.remove(l),r(d)}function r(e){var t,r,a;i(),t=M.getPos(e),s=t.x,c=t.y,r=e.offsetWidth,a=e.offsetHeight,d!=e&&(d=e,y=b=0),P(v,function(e,t){var i;i=M.get("mceResizeHandle"+t),i?M.show(i):(i=M.add(x.documentElement,"div",{id:"mceResizeHandle"+t,"class":"mceResizeHandle",style:"cursor:"+t+"-resize; margin:0; padding:0"}),M.bind(i,"mousedown",function(t){t.preventDefault(),o(),f=t.screenX,p=t.screenY,m=d.clientWidth,h=d.clientHeight,g=h/m,u=e,l=d.cloneNode(!0),M.addClass(l,"mceClonedResizable"),M.setStyles(l,{left:s,top:c,margin:0}),x.documentElement.appendChild(l),M.bind(x,"mousemove",n),M.bind(x,"mouseup",o),C!=x&&(M.bind(C,"mousemove",n),M.bind(C,"mouseup",o))})),M.setStyles(i,{left:r*e[0]+s-i.offsetWidth/2,top:a*e[1]+c-i.offsetHeight/2})}),tinymce.isOpera||"IMG"!=d.nodeName||d.setAttribute("data-mce-selected","1")}function i(){d&&d.removeAttribute("data-mce-selected");for(var e in v)M.hide("mceResizeHandle"+e)}function a(){var e=M.getParent(R.getNode(),"table,img");P(M.select("img[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),e?r(e):i()}var s,c,d,l,u,f,p,m,h,g,v,y,b,C=document,x=e.getDoc();L.object_resizing&&L.webkit_fake_resize!==!1&&(t("enableObjectResizing",!1),v={n:[.5,0,0,-1],e:[1,.5,1,0],s:[.5,1,0,1],w:[0,.5,-1,0],nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},e.contentStyles.push(".mceResizeHandle {position: absolute;border: 1px solid black;background: #FFF;width: 5px;height: 5px;z-index: 10000}.mceResizeHandle:hover {background: #000}img[data-mce-selected] {outline: 1px solid black}img.mceClonedResizable, table.mceClonedResizable {position: absolute;outline: 1px dashed black;opacity: .5;z-index: 10000}"),e.onNodeChange.add(a),M.bind(x,"selectionchange",a),e.serializer.addAttributeFilter("data-mce-selected",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}))}function w(){n()<9&&(I.addNodeFilter("noscript",function(e){for(var t,n,o=e.length;o--;)t=e[o],n=t.firstChild,n&&t.attr("data-mce-innertext",n.value)}),D.addNodeFilter("noscript",function(e){for(var t,n,o,r=e.length;r--;)t=e[r],n=e[r].firstChild,n?n.value=tinymce.html.Entities.decode(n.value):(o=t.attributes.map["data-mce-innertext"],o&&(t.attr("data-mce-innertext",null),n=new tinymce.html.Node("#text",3),n.value=o,n.raw=!0,t.append(n)))}))}function N(){e.contentStyles.push("body {min-height: 100px}"),e.onClick.add(function(t,n){"HTML"==n.target.nodeName&&(e.execCommand("SelectAll"),e.selection.collapse(!0),e.nodeChanged())})}var T=tinymce.VK,A=T.BACKSPACE,B=T.DELETE,M=e.dom,R=e.selection,L=e.settings,I=e.parser,D=e.serializer,P=tinymce.each;m(),y(),i(),tinymce.isWebKit&&(v(),r(),s(),l(),x(),tinymce.isIDevice?f():(k(),a())),tinymce.isIE&&!tinymce.isIE11&&(c(),p(),h(),g(),E(),S(),w()),tinymce.isIE11&&N(),tinymce.isGecko&&!tinymce.isIE11&&(c(),d(),u(),b(),C(),_()),tinymce.isOpera&&k()},function(e){function t(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.textContent||t.innerText||e}function n(e,t){var n,o,i,a={};if(e){for(e=e.split(","),t=t||10,n=0;n<e.length;n+=2)o=String.fromCharCode(parseInt(e[n],t)),r[o]||(i="&"+e[n+1]+";",a[o]=i,a[i]=o);return a}}var o,r,i,a=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=/[<>&\"\']/g,d=/&(#x|#)?([\w]+);/g,l={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};r={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;"},i={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},o=n("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),e.html=e.html||{},e.html.Entities={encodeRaw:function(e,t){return e.replace(t?a:s,function(e){return r[e]||e})},encodeAllRaw:function(e){return(""+e).replace(c,function(e){return r[e]||e})},encodeNumeric:function(e,t){return e.replace(t?a:s,function(e){return e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":r[e]||"&#"+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,n){return n=n||o,e.replace(t?a:s,function(e){return r[e]||n[e]||e})},getEncodeFunc:function(t,i){function c(e,t){return e.replace(t?a:s,function(e){return r[e]||i[e]||"&#"+e.charCodeAt(0)+";"||e})}function d(e,t){return l.encodeNamed(e,t,i)}var l=e.html.Entities;return i=n(i)||o,t=e.makeMap(t.replace(/\+/g,",")),t.named&&t.numeric?c:t.named?i?d:l.encodeNamed:t.numeric?l.encodeNumeric:l.encodeRaw},decode:function(e){return e.replace(d,function(e,n,r){return n?(r=parseInt(r,2===n.length?16:10),r>65535?(r-=65536,String.fromCharCode(55296+(r>>10),56320+(1023&r))):l[r]||String.fromCharCode(r)):i[e]||o[e]||t(e)})}}}(tinymce),tinymce.html.Styles=function(e,t){function n(e,t,n,o){function r(e){return e=parseInt(e).toString(16),e.length>1?e:"0"+e}return"#"+r(t)+r(n)+r(o)}var o,r,i,a=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,s=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,c=/\s*([^:]+):\s*([^;]+);?/g,d=/\s+$/,l={};for(e=e||{},i="\\\" \\' \\; \\: ; : \ufeff".split(" "),r=0;r<i.length;r++)l[i[r]]="\ufeff"+r,l["\ufeff"+r]=i[r];return{toHex:function(e){return e.replace(a,n)},parse:function(t){function o(e,t){var n,o,r,i;"none"===y["border-image"]&&delete y["border-image"],n=y[e+"-top"+t],n&&(o=y[e+"-right"+t],n==o&&(r=y[e+"-bottom"+t],o==r&&(i=y[e+"-left"+t],r==i&&(y[e+t]=i,delete y[e+"-top"+t],delete y[e+"-right"+t],delete y[e+"-bottom"+t],delete y[e+"-left"+t]))))}function r(e){var t,n=y[e];if(n&&!(n.indexOf(" ")<0)){for(n=n.split(" "),t=n.length;t--;)if(n[t]!==n[0])return!1;return y[e]=n[0],!0}}function i(e,t,n,o){r(t)&&r(n)&&r(o)&&(y[e]=y[t]+" "+y[n]+" "+y[o],delete y[t],delete y[n],delete y[o])}function u(e){return v=!0,l[e]}function f(e,t){return v&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return l[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function p(e,t,n,o,r,i){return(r=r||i)?(r=f(r),"'"+r.replace(/\'/g,"\\'")+"'"):(t=f(t||n||o),b&&(t=b.call(C,t,"style")),"url('"+t.replace(/\'/g,"\\'")+"')")}var m,h,g,v,y={},b=e.url_converter,C=e.url_converter_scope||this;if(t){for(t=t.replace(/\\[\"\';:\uFEFF]/g,u).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,u)});m=c.exec(t);)h=m[1].replace(d,"").toLowerCase(),g=m[2].replace(d,""),h&&g.length>0&&("font-weight"===h&&"700"===g?g="bold":("color"===h||"background-color"===h)&&(g=g.toLowerCase()),g=g.replace(a,n),g=g.replace(s,p),y[h]=v?f(g,!0):g),c.lastIndex=m.index+m[0].length;o("border",""),o("border","-width"),o("border","-color"),o("border","-style"),o("padding",""),o("margin",""),i("border","border-width","border-style","border-color"),"medium none"===y.border&&delete y.border}return y},serialize:function(e,n){function r(n){var r,i,a,c;if(r=t.styles[n])for(i=0,a=r.length;a>i;i++)n=r[i],c=e[n],c!==o&&c.length>0&&(s+=(s.length>0?" ":"")+n+": "+c+";")}var i,a,s="";if(n&&t&&t.styles)r("*"),r(n);else for(i in e)a=e[i],a!==o&&a.length>0&&(s+=(s.length>0?" ":"")+i+": "+a+";");return s}}},function(e){function t(e,t){return e.split(t||",")}function n(e,n){function o(t){return t.replace(/[A-Z]+/g,function(t){return o(e[t])})}var r,i={};for(r in e)e.hasOwnProperty(r)&&(e[r]=o(e[r]));return o(n).replace(/#/g,"#text").replace(/(\w+)\[([^\]]+)\]\[([^\]]*)\]/g,function(e,n,o,r){o=t(o,"|"),i[n]={attributes:a(o),attributesOrder:o,children:a(r,"|",{"#comment":{}})}}),i}function o(){var e=i.html5;return e||(e=i.html5=n({A:"id|accesskey|class|dir|draggable|item|hidden|itemprop|role|spellcheck|style|subject|title|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup",B:"#|a|abbr|area|audio|b|bdo|br|button|canvas|cite|code|command|datalist|del|dfn|em|embed|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|meta|meter|noscript|object|output|progress|q|ruby|samp|script|select|small|span|strong|sub|sup|svg|textarea|time|var|video|wbr",C:"#|a|abbr|area|address|article|aside|audio|b|bdo|blockquote|br|button|canvas|cite|code|command|datalist|del|details|dfn|dialog|div|dl|em|embed|fieldset|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hgroup|hr|i|iframe|img|input|ins|kbd|keygen|label|link|map|mark|menu|meta|meter|nav|noscript|ol|object|output|p|pre|progress|q|ruby|samp|script|section|select|small|span|strong|style|sub|sup|svg|table|textarea|time|ul|var|video"},"html[A|manifest][body|head]head[A][base|command|link|meta|noscript|script|style|title]title[A][#]base[A|href|target][]link[A|href|rel|media|type|sizes][]meta[A|http-equiv|name|content|charset][]style[A|type|media|scoped][#]script[A|charset|type|src|defer|async][#]noscript[A][C]body[A][C]section[A][C]nav[A][C]article[A][C]aside[A][C]h1[A][B]h2[A][B]h3[A][B]h4[A][B]h5[A][B]h6[A][B]hgroup[A][h1|h2|h3|h4|h5|h6]header[A][C]footer[A][C]address[A][C]p[A][B]br[A][]pre[A][B]dialog[A][dd|dt]blockquote[A|cite][C]ol[A|start|reversed][li]ul[A][li]li[A|value][C]dl[A][dd|dt]dt[A][B]dd[A][C]a[A|href|target|ping|rel|media|type][B]em[A][B]strong[A][B]small[A][B]cite[A][B]q[A|cite][B]dfn[A][B]abbr[A][B]code[A][B]var[A][B]samp[A][B]kbd[A][B]sub[A][B]sup[A][B]i[A][B]b[A][B]mark[A][B]progress[A|value|max][B]meter[A|value|min|max|low|high|optimum][B]time[A|datetime][B]ruby[A][B|rt|rp]rt[A][B]rp[A][B]bdo[A][B]span[A][B]ins[A|cite|datetime][B]del[A|cite|datetime][B]figure[A][C|legend|figcaption]figcaption[A][C]img[A|alt|src|height|width|usemap|ismap][]iframe[A|name|src|height|width|sandbox|seamless][]embed[A|src|height|width|type][]object[A|data|type|height|width|usemap|name|form|classid][param]param[A|name|value][]details[A|open][C|legend]command[A|type|label|icon|disabled|checked|radiogroup][]menu[A|type|label][C|li]legend[A][C|B]div[A][C]source[A|src|type|media][]audio[A|src|autobuffer|autoplay|loop|controls][source]video[A|src|autobuffer|autoplay|loop|controls|width|height|poster][source]hr[A][]form[A|accept-charset|action|autocomplete|enctype|method|name|novalidate|target][C]fieldset[A|disabled|form|name][C|legend]label[A|form|for][B]input[A|type|accept|alt|autocomplete|autofocus|checked|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|height|list|max|maxlength|min|multiple|pattern|placeholder|readonly|required|size|src|step|width|files|value|name][]button[A|autofocus|disabled|form|formaction|formenctype|formmethod|formnovalidate|formtarget|name|value|type][B]select[A|autofocus|disabled|form|multiple|name|size][option|optgroup]datalist[A][B|option]optgroup[A|disabled|label][option]option[A|disabled|selected|label|value][]textarea[A|autofocus|disabled|form|maxlength|name|placeholder|readonly|required|rows|cols|wrap][]keygen[A|autofocus|challenge|disabled|form|keytype|name][]output[A|for|form|name][B]canvas[A|width|height][]map[A|name][B|C]area[A|shape|coords|href|alt|target|media|rel|ping|type][]mathml[A][]svg[A][]table[A|border][caption|colgroup|thead|tfoot|tbody|tr]caption[A][C]colgroup[A|span][col]col[A|span][]thead[A][tr]tfoot[A][tr]tbody[A][tr]tr[A][th|td]th[A|headers|rowspan|colspan|scope][B]td[A|headers|rowspan|colspan][C]wbr[A][]")),e
}function r(){var e=i.html4;return e||(e=i.html4=n({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]")),e}var i={},a=e.makeMap,s=e.each;e.html.Schema=function(n){function c(t,o,r){var s=n[t];return s?s=a(s,",",a(s.toUpperCase()," ")):(s=i[t],s||(s=a(o," ",a(o.toUpperCase()," ")),s=e.extend(s,r),i[t]=s)),s}function d(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function l(n){var o,r,i,s,c,l,u,f,p,m,h,g,v,y,b,C,x,_,E,k=/^([#+\-])?([^\[\/]+)(?:\/([^\[]+))?(?:\[([^\]]+)\])?$/,N=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,T=/[*?+]/;if(n)for(n=t(n),S["@"]&&(C=S["@"].attributes,x=S["@"].attributesOrder),o=0,r=n.length;r>o;o++)if(c=k.exec(n[o])){if(y=c[1],p=c[2],b=c[3],f=c[4],g={},v=[],l={attributes:g,attributesOrder:v},"#"===y&&(l.paddEmpty=!0),"-"===y&&(l.removeEmpty=!0),C){for(_ in C)g[_]=C[_];v.push.apply(v,x)}if(f)for(f=t(f,"|"),i=0,s=f.length;s>i;i++)if(c=N.exec(f[i])){if(u={},h=c[1],m=c[2].replace(/::/g,":"),y=c[3],E=c[4],"!"===h&&(l.attributesRequired=l.attributesRequired||[],l.attributesRequired.push(m),u.required=!0),"-"===h){delete g[m],v.splice(e.inArray(v,m),1);continue}y&&("="===y&&(l.attributesDefault=l.attributesDefault||[],l.attributesDefault.push({name:m,value:E}),u.defaultValue=E),":"===y&&(l.attributesForced=l.attributesForced||[],l.attributesForced.push({name:m,value:E}),u.forcedValue=E),"<"===y&&(u.validValues=a(E,"?"))),T.test(m)?(l.attributePatterns=l.attributePatterns||[],u.pattern=d(m),l.attributePatterns.push(u)):(g[m]||v.push(m),g[m]=u)}C||"@"!=p||(C=g,x=v),b&&(l.outputName=p,S[b]=l),T.test(p)?(l.pattern=d(p),w.push(l)):S[p]=l}}function u(e){S={},w=[],l(e),s(g,function(e,t){k[t]=e.children})}function f(e){var n=/^(~)?(.+)$/;e&&s(t(e),function(e){var t=n.exec(e),o="~"===t[1],r=o?"span":"div",i=t[2];k[i]=k[r],N[i]=r,o||(x[i.toUpperCase()]={},x[i]={}),S[i]||(S[i]=S[r]),s(k,function(e){e[r]&&(e[i]=e[r])})})}function p(e){var n=/^([+\-]?)(\w+)\[([^\]]+)\]$/;e&&s(t(e),function(e){var o,r,i=n.exec(e);i&&(r=i[1],o=r?k[i[2]]:k[i[2]]={"#comment":{}},o=k[i[2]],s(t(i[3],"|"),function(e){"-"===r?delete o[e]:o[e]={}}))})}function m(e){var t,n=S[e];if(n)return n;for(t=w.length;t--;)if(n=w[t],n.pattern.test(e))return n}var h,g,v,y,b,C,x,_,E=this,S={},k={},w=[],N={};n=n||{},g="html5"==n.schema?o():r(),n.verify_html===!1&&(n.valid_elements="*[*]"),n.valid_styles&&(h={},s(n.valid_styles,function(t,n){h[n]=e.explode(t)})),v=c("whitespace_elements","pre script noscript style textarea"),y=c("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),b=c("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr"),C=c("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),_=c("non_empty_elements","td th iframe video audio object script",b),textBlockElementsMap=c("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure"),x=c("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex samp option datalist select optgroup",textBlockElementsMap),n.valid_elements?u(n.valid_elements):(s(g,function(e,t){S[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},k[t]=e.children}),"html5"!=n.schema&&s(t("strong/b,em/i"),function(e){e=t(e,"/"),S[e[1]].outputName=e[0]}),S.img.attributesDefault=[{name:"alt",value:""}],s(t("ol,ul,sub,sup,blockquote,span,font,a,table,tbody,tr,strong,em,b,i"),function(e){S[e]&&(S[e].removeEmpty=!0)}),s(t("p,h1,h2,h3,h4,h5,h6,th,td,pre,div,address,caption"),function(e){S[e].paddEmpty=!0})),f(n.custom_elements),p(n.valid_children),l(n.extended_valid_elements),p("+ol[ul|ol],+ul[ul|ol]"),n.invalid_elements&&e.each(e.explode(n.invalid_elements),function(e){S[e]&&delete S[e]}),m("span")||l("span[!data-mce-type|*]"),E.children=k,E.styles=h,E.getBoolAttrs=function(){return C},E.getBlockElements=function(){return x},E.getTextBlockElements=function(){return textBlockElementsMap},E.getShortEndedElements=function(){return b},E.getSelfClosingElements=function(){return y},E.getNonEmptyElements=function(){return _},E.getWhiteSpaceElements=function(){return v},E.isValidChild=function(e,t){var n=k[e];return!(!n||!n[t])},E.isValid=function(e,t){var n,o,r=m(e);if(r){if(!t)return!0;if(r.attributes[t])return!0;if(n=r.attributePatterns)for(o=n.length;o--;)if(n[o].pattern.test(e))return!0}return!1},E.getElementRule=m,E.getCustomElements=function(){return N},E.addValidElements=l,E.setValidElements=u,E.addCustomElements=f,E.addValidChildren=p,E.elements=S}}(tinymce),function(e){e.html.SaxParser=function(t,n){var o=this,r=function(){};t=t||{},o.schema=n=n||new e.html.Schema,t.fix_self_closing!==!1&&(t.fix_self_closing=!0),e.each("comment cdata text start end pi doctype".split(" "),function(e){e&&(o[e]=t[e]||r)}),o.parse=function(o){function r(e){var t,n;for(t=H.length;t--&&H[t].name!==e;);if(t>=0){for(n=H.length-1;n>=t;n--)e=H[n],e.valid&&P.end(e.name);H.length=t}}function i(e,t,n,o,r){var i,a;if(t=t.toLowerCase(),n=t in g?t:U(n||o||r||""),y&&!p&&0!==t.indexOf("data-")){if(i=S[t],!i&&k){for(a=k.length;a--&&(i=k[a],!i.pattern.test(t)););-1===a&&(i=null)}if(!i)return;if(i.validValues&&!(n in i.validValues))return}d.map[t]=n,d.push({name:t,value:n})}var a,s,c,d,l,u,f,p,m,h,g,v,y,b,C,x,_,E,S,k,w,N,T,A,B,M,R,L,I,D,P=this,O=0,H=[],F=0,U=e.html.Entities.decode;for(B=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),M=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,R={script:/<\/script[^>]*>/gi,style:/<\/style[^>]*>/gi,noscript:/<\/noscript[^>]*>/gi},h=n.getShortEndedElements(),A=t.self_closing_elements||n.getSelfClosingElements(),g=n.getBoolAttrs(),y=t.validate,m=t.remove_internals,I=t.fix_self_closing,D=e.isIE,E=/^:/;a=B.exec(o);){if(O<a.index&&P.text(U(o.substr(O,a.index-O))),s=a[6])s=s.toLowerCase(),D&&E.test(s)&&(s=s.substr(1)),r(s);else if(s=a[7]){if(s=s.toLowerCase(),D&&E.test(s)&&(s=s.substr(1)),v=s in h,I&&A[s]&&H.length>0&&H[H.length-1].name===s&&r(s),!y||(b=n.getElementRule(s))){if(C=!0,y&&(S=b.attributes,k=b.attributePatterns),(_=a[8])?(p=-1!==_.indexOf("data-mce-type"),p&&m&&(C=!1),d=[],d.map={},_.replace(M,i)):(d=[],d.map={}),y&&!p){if(w=b.attributesRequired,N=b.attributesDefault,T=b.attributesForced)for(l=T.length;l--;)x=T[l],f=x.name,L=x.value,"{$uid}"===L&&(L="mce_"+F++),d.map[f]=L,d.push({name:f,value:L});if(N)for(l=N.length;l--;)x=N[l],f=x.name,f in d.map||(L=x.value,"{$uid}"===L&&(L="mce_"+F++),d.map[f]=L,d.push({name:f,value:L}));if(w){for(l=w.length;l--&&!(w[l]in d.map););-1===l&&(C=!1)}d.map["data-mce-bogus"]&&(C=!1)}C&&P.start(s,d,v)}else C=!1;if(c=R[s]){c.lastIndex=O=a.index+a[0].length,(a=c.exec(o))?(C&&(u=o.substr(O,a.index-O)),O=a.index+a[0].length):(u=o.substr(O),O=o.length),C&&u.length>0&&P.text(u,!0),C&&P.end(s),B.lastIndex=O;continue}v||(_&&_.indexOf("/")==_.length-1?C&&P.end(s):H.push({name:s,valid:C}))}else(s=a[1])?P.comment(s):(s=a[2])?P.cdata(s):(s=a[3])?P.doctype(s):(s=a[4])&&P.pi(s,a[5]);O=a.index+a[0].length}for(O<o.length&&P.text(U(o.substr(O))),l=H.length-1;l>=0;l--)s=H[l],s.valid&&P.end(s.name)}}}(tinymce),function(e){function t(e,t,n){var o,r,i=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[i])return e[i];if(e!==t){if(o=e[a])return o;for(r=e.parent;r&&r!==t;r=r.parent)if(o=r[a])return o}}function n(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var o=/^[ \t\r\n]*$/,r={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};e.extend(n.prototype,{replace:function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},attr:function(e,t){var n,o,r,i=this;if("string"!=typeof e){for(o in e)i.attr(o,e[o]);return i}if(n=i.attributes){if(t!==r){if(null===t){if(e in n.map)for(delete n.map[e],o=n.length;o--;)if(n[o].name===e)return n=n.splice(o,1),i;return i}if(e in n.map){for(o=n.length;o--;)if(n[o].name===e){n[o].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,i}return n.map[e]}},clone:function(){var e,t,o,r,i,a=this,s=new n(a.name,a.type);if(o=a.attributes){for(i=[],i.map={},e=0,t=o.length;t>e;e++)r=o[e],"id"!==r.name&&(i[i.length]={name:r.name,value:r.value},i.map[r.name]=r.value);s.attributes=i}return s.value=a.value,s.shortEnded=a.shortEnded,s},wrap:function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},unwrap:function(){var e,t,n=this;for(e=n.firstChild;e;)t=e.next,n.insert(e,n,!0),e=t;n.remove()},remove:function(){var e=this,t=e.parent,n=e.next,o=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):o.next=n,t.lastChild===e?(t.lastChild=o,o&&(o.next=null)):n.prev=o,e.parent=e.next=e.prev=null),e},append:function(e){var t,n=this;return e.parent&&e.remove(),t=n.lastChild,t?(t.next=e,e.prev=t,n.lastChild=e):n.lastChild=n.firstChild=e,e.parent=n,e},insert:function(e,t,n){var o;return e.parent&&e.remove(),o=t.parent||this,n?(t===o.firstChild?o.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===o.lastChild?o.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=o,e},getAll:function(e){var n,o=this,r=[];for(n=o.firstChild;n;n=t(n,o))n.name===e&&r.push(n);return r},empty:function(){var e,n,o,r=this;if(r.firstChild){for(e=[],o=r.firstChild;o;o=t(o,r))e.push(o);for(n=e.length;n--;)o=e[n],o.parent=o.firstChild=o.lastChild=o.next=o.prev=null}return r.firstChild=r.lastChild=null,r},isEmpty:function(e){var n,r,i=this,a=i.firstChild;if(a)do{if(1===a.type){if(a.attributes.map["data-mce-bogus"])continue;if(e[a.name])return!1;for(n=a.attributes.length;n--;)if(r=a.attributes[n].name,"name"===r||0===r.indexOf("data-mce-"))return!1}if(8===a.type)return!1;if(3===a.type&&!o.test(a.value))return!1}while(a=t(a,i));return!0},walk:function(e){return t(this,null,e)}}),e.extend(n,{create:function(e,t){var o,i;if(o=new n(e,r[e]||1),t)for(i in t)o.attr(i,t[i]);return o}}),e.html.Node=n}(tinymce),function(e){var t=e.html.Node;e.html.DomParser=function(n,o){function r(n){var r,a,s,c,d,l,u,f,p,m,h,g,v,y;for(h=e.makeMap("tr,td,th,tbody,thead,tfoot,table"),m=o.getNonEmptyElements(),g=o.getTextBlockElements(),r=0;r<n.length;r++)if(a=n[r],a.parent&&!a.fixed)if(g[a.name]&&"li"==a.parent.name){for(v=a.next;v&&g[v.name];)v.name="li",v.fixed=!0,a.parent.insert(v,a.parent),v=v.next;a.unwrap(a)}else{for(c=[a],s=a.parent;s&&!o.isValidChild(s.name,a.name)&&!h[s.name];s=s.parent)c.push(s);if(s&&c.length>1){for(c.reverse(),d=l=i.filterNode(c[0].clone()),p=0;p<c.length-1;p++){for(o.isValidChild(l.name,c[p].name)?(u=i.filterNode(c[p].clone()),l.append(u)):u=l,f=c[p].firstChild;f&&f!=c[p+1];)y=f.next,u.append(f),f=y;l=u}d.isEmpty(m)?s.insert(a,c[0],!0):(s.insert(d,c[0],!0),s.insert(a,d)),s=c[0],(s.isEmpty(m)||s.firstChild===s.lastChild&&"br"===s.firstChild.name)&&s.empty().remove()}else if(a.parent){if("li"===a.name){if(v=a.prev,v&&("ul"===v.name||"ul"===v.name)){v.append(a);continue}if(v=a.next,v&&("ul"===v.name||"ul"===v.name)){v.insert(a,v.firstChild,!0);continue}a.wrap(i.filterNode(new t("ul",1)));continue}o.isValidChild(a.parent.name,"div")&&o.isValidChild("div",a.name)?a.wrap(i.filterNode(new t("div",1))):"style"===a.name||"script"===a.name?a.empty().remove():a.unwrap()}}}var i=this,a={},s=[],c={},d={};n=n||{},n.validate="validate"in n?n.validate:!0,n.root_name=n.root_name||"body",i.schema=o=o||new e.html.Schema,i.filterNode=function(e){var t,n,o;n in a&&(o=c[n],o?o.push(e):c[n]=[e]),t=s.length;for(;t--;)n=s[t].name,n in e.attributes.map&&(o=d[n],o?o.push(e):d[n]=[e]);return e},i.addNodeFilter=function(t,n){e.each(e.explode(t),function(e){var t=a[e];t||(a[e]=t=[]),t.push(n)})},i.addAttributeFilter=function(t,n){e.each(e.explode(t),function(e){var t;for(t=0;t<s.length;t++)if(s[t].name===e)return void s[t].callbacks.push(n);s.push({name:e,callbacks:[n]})})},i.parse=function(i,l){function u(){for(var e,t,n=g.firstChild;n;)e=n.next,3==n.type||1==n.type&&"p"!==n.name&&!w[n.name]&&!n.attr("data-mce-type")?t?t.append(n):(t=f(D,1),g.insert(t,n),t.append(n)):t=null,n=e}function f(e,n){var o,r=new t(e,n);return e in a&&(o=c[e],o?o.push(r):c[e]=[r]),r}function p(e){var t,n,o;for(t=e.prev;t&&3===t.type;)n=t.value.replace(A,""),n.length>0?(t.value=n,t=t.prev):(o=t.prev,t.remove(),t=o)}function m(e){var t,n={};for(t in e)"li"!==t&&"p"!=t&&(n[t]=e[t]);return n}var h,g,v,y,b,C,x,_,E,S,k,w,N,T,A,B,M,R,L,I,D,P=[];if(l=l||{},c={},d={},w=e.extend(e.makeMap("script,style,head,html,body,title,meta,param"),o.getBlockElements()),I=o.getNonEmptyElements(),L=o.children,k=n.validate,D="forced_root_block"in l?l.forced_root_block:n.forced_root_block,R=o.getWhiteSpaceElements(),N=/^[ \t\r\n]+/,A=/[ \t\r\n]+$/,B=/[ \t\r\n]+/g,M=/^[ \t\r\n]+$/,h=new e.html.SaxParser({validate:k,self_closing_elements:m(o.getSelfClosingElements()),cdata:function(e){v.append(f("#cdata",4)).value=e},text:function(e,t){var n;T||(e=e.replace(B," "),v.lastChild&&w[v.lastChild.name]&&(e=e.replace(N,""))),0!==e.length&&(n=f("#text",3),n.raw=!!t,v.append(n).value=e)},comment:function(e){v.append(f("#comment",8)).value=e},pi:function(e,t){v.append(f(e,7)).value=t,p(v)},doctype:function(e){var t;t=v.append(f("#doctype",10)),t.value=e,p(v)},start:function(e,t,n){var r,i,a,c,l;if(a=k?o.getElementRule(e):{}){for(r=f(a.outputName||e,1),r.attributes=t,r.shortEnded=n,v.append(r),l=L[v.name],l&&L[r.name]&&!l[r.name]&&P.push(r),i=s.length;i--;)c=s[i].name,c in t.map&&(E=d[c],E?E.push(r):d[c]=[r]);w[e]&&p(r),n||(v=r),!T&&R[e]&&(T=!0)}},end:function(e){var n,r,i,a,s;if(r=k?o.getElementRule(e):{}){if(w[e]&&!T){if(n=v.firstChild,n&&3===n.type)for(i=n.value.replace(N,""),i.length>0?(n.value=i,n=n.next):(a=n.next,n.remove(),n=a);n&&3===n.type;)i=n.value,a=n.next,(0===i.length||M.test(i))&&(n.remove(),n=a),n=a;if(n=v.lastChild,n&&3===n.type)for(i=n.value.replace(A,""),i.length>0?(n.value=i,n=n.prev):(a=n.prev,n.remove(),n=a);n&&3===n.type;)i=n.value,a=n.prev,(0===i.length||M.test(i))&&(n.remove(),n=a),n=a}if(T&&R[e]&&(T=!1),(r.removeEmpty||r.paddEmpty)&&v.isEmpty(I))if(r.paddEmpty)v.empty().append(new t("#text","3")).value="\xa0";else if(!v.attributes.map.name&&!v.attributes.map.id)return s=v.parent,v.empty().remove(),void(v=s);v=v.parent}}},o),g=v=new t(l.context||n.root_name,11),h.parse(i),k&&P.length&&(l.context?l.invalid=!0:r(P)),D&&"body"==g.name&&u(),!l.invalid){for(S in c){for(E=a[S],y=c[S],x=y.length;x--;)y[x].parent||y.splice(x,1);for(b=0,C=E.length;C>b;b++)E[b](y,S,l)}for(b=0,C=s.length;C>b;b++)if(E=s[b],E.name in d){for(y=d[E.name],x=y.length;x--;)y[x].parent||y.splice(x,1);for(x=0,_=E.callbacks.length;_>x;x++)E.callbacks[x](y,E.name,l)}}return g},n.remove_trailing_brs&&i.addNodeFilter("br",function(t){var n,r,i,a,s,c,d=t.length,l=e.extend({},o.getBlockElements()),u=o.getNonEmptyElements();for(l.body=1,n=0;d>n;n++)if(r=t[n],i=r.parent,l[r.parent.name]&&r===i.lastChild){for(s=r.prev;s;){if(c=s.name,"span"!==c||"bookmark"!==s.attr("data-mce-type")){if("br"!==c)break;if("br"===c){r=null;break}}s=s.prev}r&&(r.remove(),i.isEmpty(u)&&(elementRule=o.getElementRule(i.name),elementRule&&(elementRule.removeEmpty?i.remove():elementRule.paddEmpty&&(i.empty().append(new e.html.Node("#text",3)).value="\xa0"))))}else{for(a=r;i.firstChild===a&&i.lastChild===a&&(a=i,!l[i.name]);)i=i.parent;a===i&&(textNode=new e.html.Node("#text",3),textNode.value="\xa0",r.replace(textNode))}}),n.allow_html_in_named_anchor||i.addAttributeFilter("id,name",function(e){for(var t,n,o,r,i=e.length;i--;)if(r=e[i],"a"===r.name&&r.firstChild&&!r.attr("href")){o=r.parent,t=r.lastChild;do n=t.prev,o.insert(t,r),t=n;while(t)}})}}(tinymce),tinymce.html.Writer=function(e){var t,n,o,r,i,a=[];return e=e||{},t=e.indent,n=tinymce.makeMap(e.indent_before||""),o=tinymce.makeMap(e.indent_after||""),r=tinymce.html.Entities.getEncodeFunc(e.entity_encoding||"raw",e.entities),i="html"==e.element_format,{start:function(e,s,c){var d,l,u,f;if(t&&n[e]&&a.length>0&&(f=a[a.length-1],f.length>0&&"\n"!==f&&a.push("\n")),a.push("<",e),s)for(d=0,l=s.length;l>d;d++)u=s[d],a.push(" ",u.name,'="',r(u.value,!0),'"');a[a.length]=!c||i?">":" />",c&&t&&o[e]&&a.length>0&&(f=a[a.length-1],f.length>0&&"\n"!==f&&a.push("\n"))},end:function(e){var n;a.push("</",e,">"),t&&o[e]&&a.length>0&&(n=a[a.length-1],n.length>0&&"\n"!==n&&a.push("\n"))},text:function(e,t){e.length>0&&(a[a.length]=t?e:r(e))},cdata:function(e){a.push("<![CDATA[",e,"]]>")},comment:function(e){a.push("<!--",e,"-->")},pi:function(e,n){n?a.push("<?",e," ",n,"?>"):a.push("<?",e,"?>"),t&&a.push("\n")},doctype:function(e){a.push("<!DOCTYPE",e,">",t?"\n":"")},reset:function(){a.length=0},getContent:function(){return a.join("").replace(/\n$/,"")}}},function(e){e.html.Serializer=function(t,n){var o=this,r=new e.html.Writer(t);t=t||{},t.validate="validate"in t?t.validate:!0,o.schema=n=n||new e.html.Schema,o.writer=r,o.serialize=function(e){function o(e){var t,s,c,d,l,u,f,p,m,h=i[e.type];if(h)h(e);else{if(t=e.name,s=e.shortEnded,c=e.attributes,a&&c&&c.length>1){for(u=[],u.map={},m=n.getElementRule(e.name),f=0,p=m.attributesOrder.length;p>f;f++)d=m.attributesOrder[f],d in c.map&&(l=c.map[d],u.map[d]=l,u.push({name:d,value:l}));for(f=0,p=c.length;p>f;f++)d=c[f].name,d in u.map||(l=c.map[d],u.map[d]=l,u.push({name:d,value:l}));c=u}if(r.start(e.name,c,s),!s){if(e=e.firstChild)do o(e);while(e=e.next);r.end(t)}}}var i,a;return a=t.validate,i={3:function(e){r.text(e.value,e.raw)},8:function(e){r.comment(e.value)},7:function(e){r.pi(e.name,e.value)},10:function(e){r.doctype(e.value)},4:function(e){r.cdata(e.value)},11:function(e){if(e=e.firstChild)do o(e);while(e=e.next)}},r.reset(),1!=e.type||t.inner?i[11](e):o(e),r.getContent()}}}(tinymce),tinymce.dom={},function(e,t){function n(e,t,n,o){e.addEventListener?e.addEventListener(t,n,o||!1):e.attachEvent&&e.attachEvent("on"+t,n)}function o(e,t,n,o){e.removeEventListener?e.removeEventListener(t,n,o||!1):e.detachEvent&&e.detachEvent("on"+t,n)}function r(e,t){function n(){return!1}function o(){return!0}var r,i=t||{};for(r in e)"layerX"!==r&&"layerY"!==r&&(i[r]=e[r]);return i.target||(i.target=i.srcElement||document),i.preventDefault=function(){i.isDefaultPrevented=o,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},i.stopPropagation=function(){i.isPropagationStopped=o,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=o,i.stopPropagation()},i.isDefaultPrevented||(i.isDefaultPrevented=n,i.isPropagationStopped=n,i.isImmediatePropagationStopped=n),i}function i(e,t,r){function i(){r.domLoaded||(r.domLoaded=!0,t(c))}var a=e.document,c={type:"ready"};return"complete"==a.readyState?void i():(s?n(e,"DOMContentLoaded",i):(n(a,"readystatechange",function(){"complete"===a.readyState&&(o(a,"readystatechange",arguments.callee),i())}),a.documentElement.doScroll&&e===e.top&&!function(){try{a.documentElement.doScroll("left")}catch(e){return void setTimeout(arguments.callee,0)}i()}()),void n(e,"load",i))}function a(e){function a(e,t){var n,o,r,i;if(n=p[t][e.type])for(o=0,r=n.length;r>o;o++)if(i=n[o],i&&i.func.call(i.scope,e)===!1&&e.preventDefault(),e.isImmediatePropagationStopped())return}var c,d,l,u,f=this,p={};l="onmouseenter"in document.documentElement,d="onfocusin"in document.documentElement,u={mouseenter:"mouseover",mouseleave:"mouseout"},c=1,f.domLoaded=!1,f.events=p,f.bind=function(o,m,h,g){function v(e){a(r(e||k.event),y)}var y,b,C,x,_,E,S,k=window;if(o&&3!==o.nodeType&&8!==o.nodeType){for(o[t]?(y=o[t],p[y]||(p[y]={})):(y=c++,o[t]=y,p[y]={}),g=g||o,m=m.split(" "),C=m.length;C--;)x=m[C],E=v,_=S=!1,"DOMContentLoaded"===x&&(x="ready"),!f.domLoaded&&"complete"!=o.readyState||"ready"!==x?(l||(_=u[x],_&&(E=function(e){var t,n;if(t=e.currentTarget,n=e.relatedTarget,n&&t.contains)n=t.contains(n);else for(;n&&n!==t;)n=n.parentNode;n||(e=r(e||k.event),e.type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,a(e,y))})),d||"focusin"!==x&&"focusout"!==x||(S=!0,_="focusin"===x?"focus":"blur",E=function(e){e=r(e||k.event),e.type="focus"===e.type?"focusin":"focusout",a(e,y)}),b=p[y][x],b?b.push({func:h,scope:g}):(p[y][x]=b=[{func:h,scope:g}],b.fakeName=_,b.capture=S,b.nativeHandler=E,s||(b.proxyHandler=e(y)),"ready"===x?i(o,E,f):n(o,_||x,s?E:b.proxyHandler,S))):(f.domLoaded=!0,h.call(g,r({type:x})));return o=b=0,h}},f.unbind=function(e,n,r){var i,a,c,d,l,u;if(!e||3===e.nodeType||8===e.nodeType)return f;if(i=e[t]){if(u=p[i],n){for(n=n.split(" "),c=n.length;c--;)if(l=n[c],a=u[l]){if(r)for(d=a.length;d--;)a[d].func===r&&a.splice(d,1);r&&0!==a.length||(delete u[l],o(e,a.fakeName||l,s?a.nativeHandler:a.proxyHandler,a.capture))}}else{for(l in u)a=u[l],o(e,a.fakeName||l,s?a.nativeHandler:a.proxyHandler,a.capture);u={}}for(l in u)return f;delete p[i];try{delete e[t]}catch(m){e[t]=null}}return f},f.fire=function(e,n,o){var i,s;if(!e||3===e.nodeType||8===e.nodeType)return f;s=r(null,o),s.type=n;do i=e[t],i&&a(s,i),e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow;while(e&&!s.isPropagationStopped());return f},f.clean=function(e){var n,o,r=f.unbind;if(!e||3===e.nodeType||8===e.nodeType)return f;if(e[t]&&r(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(r(e),o=e.getElementsByTagName("*"),n=o.length;n--;)e=o[n],e[t]&&r(e);return f},f.callNativeHandler=function(e,t){p&&p[e][t.type].nativeHandler(t)},f.destory=function(){p={}},f.add=function(e,t,n,o){"string"==typeof e&&(e=document.getElementById(e));{if(!(e&&e instanceof Array))return"init"===t&&(t="ready"),f.bind(e,t instanceof Array?t.join(" "):t,n,o);for(var r=e.length;r--;)f.add(e[r],t,n,o)}},f.remove=function(e,t,n,o){if(!e)return f;if("string"==typeof e&&(e=document.getElementById(e)),e instanceof Array){for(var r=e.length;r--;)f.remove(e[r],t,n,o);return f}return f.unbind(e,t instanceof Array?t.join(" "):t,n)},f.clear=function(e){return"string"==typeof e&&(e=document.getElementById(e)),f.clean(e)},f.cancel=function(e){return e&&(f.prevent(e),f.stop(e)),!1},f.prevent=function(e){return e.preventDefault||(e=r(e)),e.preventDefault(),!1},f.stop=function(e){return e.stopPropagation||(e=r(e)),e.stopPropagation(),!1}}var s=!!document.addEventListener;e.EventUtils=a,e.Event=new a(function(e){return function(t){tinymce.dom.Event.callNativeHandler(e,t)}}),e.Event.bind(window,"ready",function(){}),e=0}(tinymce.dom,"data-mce-expando"),tinymce.dom.TreeWalker=function(e,t){function n(e,n,o,r){var i,a;if(e){if(!r&&e[n])return e[n];if(e!=t){if(i=e[o])return i;for(a=e.parentNode;a&&a!=t;a=a.parentNode)if(i=a[o])return i}}}var o=e;this.current=function(){return o},this.next=function(e){return o=n(o,"firstChild","nextSibling",e)},this.prev=function(e){return o=n(o,"lastChild","previousSibling",e)}},function(e){var t=e.each,n=e.is,o=e.isWebKit,r=e.isIE,i=e.html.Entities,a=/^([a-z0-9],?)+$/i,s=/^[ \t\r\n]*$/;e.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(t,n){var o,r=this;if(r.doc=t,r.win=window,r.files={},r.cssFlicker=!1,r.counter=0,r.stdMode=!e.isIE||t.documentMode>=8,r.boxModel=!e.isIE||"CSS1Compat"==t.compatMode||r.stdMode,r.hasOuterHTML="outerHTML"in t.createElement("a"),r.settings=n=e.extend({keep_values:!1,hex_colors:1},n),r.schema=n.schema,r.styles=new e.html.Styles({url_converter:n.url_converter,url_converter_scope:n.url_converter_scope},n.schema),e.isIE6)try{t.execCommand("BackgroundImageCache",!1,!0)}catch(i){r.cssFlicker=!0}r.fixDoc(t),r.events=n.ownEvents?new e.dom.EventUtils(n.proxy):e.dom.Event,e.addUnload(r.destroy,r),o=n.schema?n.schema.getBlockElements():{},r.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!o[e.nodeName]):!!o[e]}},fixDoc:function(t){var n,o=this.settings;if(r&&!e.isIE11&&o.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(e){t.createElement(e)});for(n in o.schema.getCustomElements())t.createElement(n)}},clone:function(n,o){var i,a,s=this;return!r||e.isIE11||1!==n.nodeType||o?n.cloneNode(o):(a=s.doc,o?i.firstChild:(i=a.createElement(n.nodeName),t(s.getAttribs(n),function(e){s.setAttrib(i,e.nodeName,s.getAttrib(n,e.nodeName))}),i))},getRoot:function(){var e=this,t=e.settings;return t&&e.get(t.root_element)||e.doc.body},getViewPort:function(e){var t,n;return e=e?e:this.win,t=e.document,n=this.boxModel?t.documentElement:t.body,{x:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop,w:e.innerWidth||n.clientWidth,h:e.innerHeight||n.clientHeight}},getRect:function(e){var t,n,o=this;return e=o.get(e),t=o.getPos(e),n=o.getSize(e),{x:t.x,y:t.y,w:n.w,h:n.h}},getSize:function(e){var t,n,o=this;return e=o.get(e),t=o.getStyle(e,"width"),n=o.getStyle(e,"height"),-1===t.indexOf("px")&&(t=0),-1===n.indexOf("px")&&(n=0),{w:parseInt(t,10)||e.offsetWidth||e.clientWidth,h:parseInt(n,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,n){return this.getParents(e,t,n,!1)},getParents:function(e,t,o,r){var i,a=this,s=a.settings,c=[];for(e=a.get(e),r=void 0===r,s.strict_root&&(o=o||a.getRoot()),n(t,"string")&&(i=t,t="*"===t?function(e){return 1==e.nodeType}:function(e){return a.is(e,i)});e&&e!=o&&e.nodeType&&9!==e.nodeType;){if(!t||t(e)){if(!r)return e;c.push(e)}e=e.parentNode}return r?c:null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,e=this.doc.getElementById(e),e&&e.id!==t)?this.doc.getElementsByName(t)[1]:e},getNext:function(e,t){return this._findSib(e,t,"nextSibling")},getPrev:function(e,t){return this._findSib(e,t,"previousSibling")},select:function(t,n){var o=this;return e.dom.Sizzle(t,o.get(n)||o.get(o.settings.root_element)||o.doc,[])},is:function(t,n){var o;if(void 0===t.length){if("*"===n)return 1==t.nodeType;if(a.test(n)){for(n=n.toLowerCase().split(/,/),t=t.nodeName.toLowerCase(),o=n.length-1;o>=0;o--)if(n[o]==t)return!0;return!1}}return e.dom.Sizzle.matches(n,t.nodeType?[t]:t).length>0},add:function(e,t,o,r,i){var a=this;return this.run(e,function(e){var s;return s=n(t,"string")?a.doc.createElement(t):t,a.setAttribs(s,o),r&&(r.nodeType?s.appendChild(r):a.setHTML(s,r)),i?s:e.appendChild(s)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,t,n){var o,r="",i=this;r+="<"+e;for(o in t)t.hasOwnProperty(o)&&(r+=" "+o+'="'+i.encode(t[o])+'"');return"undefined"!=typeof n?r+">"+n+"</"+e+">":r+" />"},remove:function(t,n){return this.run(t,function(t){var o,r=t.parentNode;if(!r)return null;if(n)for(;o=t.firstChild;)!e.isIE||3!==o.nodeType||o.nodeValue?r.insertBefore(o,t):t.removeChild(o);return r.removeChild(t)})},setStyle:function(t,n,o){var i=this;return i.run(t,function(a){var s;switch(s=a.style,n=n.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),i.pixelStyles.test(n)&&(e.is(o,"number")||/^[\-0-9\.]+$/.test(o))&&(o+="px"),n){case"opacity":r&&!e.isIE11&&(s.filter=""===o?"":"alpha(opacity="+100*o+")",t.currentStyle&&t.currentStyle.hasLayout||(s.display="inline-block")),s[n]=s["-moz-opacity"]=s["-khtml-opacity"]=o||"";break;case"float":r&&!e.isIE11?s.styleFloat=o:s.cssFloat=o;break;default:s[n]=o||""}i.settings.update_styles&&i.setAttrib(a,"data-mce-style")})},getStyle:function(e,t,n){if(e=this.get(e)){if(this.doc.defaultView&&n){t=t.replace(/[A-Z]/g,function(e){return"-"+e});try{return this.doc.defaultView.getComputedStyle(e,null).getPropertyValue(t)}catch(o){return null}}return t=t.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"float"==t&&(t=r?"styleFloat":"cssFloat"),e.currentStyle&&n?e.currentStyle[t]:e.style?e.style[t]:void 0}},setStyles:function(e,n){var o,r=this,i=r.settings;o=i.update_styles,i.update_styles=0,t(n,function(t,n){r.setStyle(e,n,t)}),i.update_styles=o,i.update_styles&&r.setAttrib(e,i.cssText)},removeAllAttribs:function(e){return this.run(e,function(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},setAttrib:function(e,o,r){var i=this;if(e&&o)return i.settings.strict&&(o=o.toLowerCase()),this.run(e,function(e){var a=i.settings,s=e.getAttribute(o);if(null!==r)switch(o){case"style":if(!n(r,"string"))return void t(r,function(t,n){i.setStyle(e,n,t)});a.keep_values&&(r&&!i._isRes(r)?e.setAttribute("data-mce-style",r,2):e.removeAttribute("data-mce-style",2)),e.style.cssText=r;break;case"class":e.className=r||"";break;case"src":case"href":a.keep_values&&(a.url_converter&&(r=a.url_converter.call(a.url_converter_scope||i,r,o,e)),i.setAttrib(e,"data-mce-"+o,r,2));break;case"shape":e.setAttribute("data-mce-style",r)}if(n(r)&&null!==r&&0!==r.length?e.setAttribute(o,""+r,2):e.removeAttribute(o,2),tinyMCE.activeEditor&&s!=r){var c=tinyMCE.activeEditor;c.onSetAttrib.dispatch(c,e,o,r)}})},setAttribs:function(e,n){var o=this;return this.run(e,function(e){t(n,function(t,n){o.setAttrib(e,n,t)})})},getAttrib:function(t,i,a){var s,c,d=this;if(t=d.get(t),!t||1!==t.nodeType)return a===c?!1:a;if(n(a)||(a=""),/^(src|href|style|coords|shape)$/.test(i)&&(s=t.getAttribute("data-mce-"+i)))return s;
if(r&&d.props[i]&&(s=t[d.props[i]],s=s&&s.nodeValue?s.nodeValue:s),s||(s=t.getAttribute(i,2)),/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(i))return t[d.props[i]]===!0&&""===s?i:s?i:"";if("FORM"===t.nodeName&&t.getAttributeNode(i))return t.getAttributeNode(i).nodeValue;if("style"===i&&(s=s||t.style.cssText,s&&(s=d.serializeStyle(d.parseStyle(s),t.nodeName),d.settings.keep_values&&!d._isRes(s)&&t.setAttribute("data-mce-style",s))),o&&"class"===i&&s&&(s=s.replace(/(apple|webkit)\-[a-z\-]+/gi,"")),r)switch(i){case"rowspan":case"colspan":1===s&&(s="");break;case"size":("+0"===s||20===s||0===s)&&(s="");break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":0===s&&(s="");break;case"hspace":-1===s&&(s="");break;case"maxlength":case"tabindex":(32768===s||2147483647===s||"32768"===s)&&(s="");break;case"multiple":case"compact":case"noshade":case"nowrap":return 65535===s?i:a;case"shape":s=s.toLowerCase();break;default:0===i.indexOf("on")&&s&&(s=e._replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1",""+s))}return s!==c&&null!==s&&""!==s?""+s:a},getPos:function(e,t){var n,o,r=this,i=0,a=0,s=r.doc;if(e=r.get(e),t=t||s.body,e){if(e.getBoundingClientRect)return e=e.getBoundingClientRect(),n=r.boxModel?s.documentElement:s.body,i=e.left+(s.documentElement.scrollLeft||s.body.scrollLeft)-n.clientTop,a=e.top+(s.documentElement.scrollTop||s.body.scrollTop)-n.clientLeft,{x:i,y:a};for(o=e;o&&o!=t&&o.nodeType;)i+=o.offsetLeft||0,a+=o.offsetTop||0,o=o.offsetParent;for(o=e.parentNode;o&&o!=t&&o.nodeType;)i-=o.scrollLeft||0,a-=o.scrollTop||0,o=o.parentNode}return{x:i,y:a}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t,n=this.doc;styleElm=n.getElementById("mceDefaultStyles"),styleElm||(styleElm=n.createElement("style"),styleElm.id="mceDefaultStyles",styleElm.type="text/css",t=n.getElementsByTagName("head")[0],t.firstChild?t.insertBefore(styleElm,t.firstChild):t.appendChild(styleElm)),styleElm.styleSheet?styleElm.styleSheet.cssText+=e:styleElm.appendChild(n.createTextNode(e))},loadCSS:function(n){var o,i=this,a=i.doc;n||(n=""),o=a.getElementsByTagName("head")[0],t(n.split(","),function(t){var n;i.files[t]||(i.files[t]=!0,n=i.create("link",{rel:"stylesheet",href:e._addVer(t)}),r&&!e.isIE11&&a.documentMode&&a.recalc&&(n.onload=function(){a.recalc&&a.recalc(),n.onload=null}),o.appendChild(n))})},addClass:function(e,t){return this.run(e,function(e){var n;return t?this.hasClass(e,t)?e.className:(n=this.removeClass(e,t),e.className=(""!=n?n+" ":"")+t):0})},removeClass:function(t,n){var o,r=this;return r.run(t,function(t){var i;return r.hasClass(t,n)?(o||(o=new RegExp("(^|\\s+)"+n+"(\\s+|$)","g")),i=t.className.replace(o," "),i=e.trim(" "!=i?i:""),t.className=i,i||(t.removeAttribute("class"),t.removeAttribute("className")),i):t.className})},hasClass:function(e,t){return e=this.get(e),e&&t?-1!==(" "+e.className+" ").indexOf(" "+t+" "):!1},show:function(e){return this.setStyle(e,"display","block")},hide:function(e){return this.setStyle(e,"display","none")},isHidden:function(e){return e=this.get(e),!e||"none"==e.style.display||"none"==this.getStyle(e,"display")},uniqueId:function(e){return(e?e:"mce_")+this.counter++},setHTML:function(n,o){var i=this;return i.run(n,function(n){if(r){for(;n.firstChild;)n.removeChild(n.firstChild);try{n.innerHTML="<br />"+o,n.removeChild(n.firstChild)}catch(a){var s=i.create("div");s.innerHTML="<br />"+o,t(e.grep(s.childNodes),function(e,t){t&&n.canHaveHTML&&n.appendChild(e)})}}else n.innerHTML=o;return o})},getOuterHTML:function(e){var t,n=this;return(e=n.get(e))?1===e.nodeType&&n.hasOuterHTML?e.outerHTML:(t=(e.ownerDocument||n.doc).createElement("body"),t.appendChild(e.cloneNode(!0)),t.innerHTML):null},setOuterHTML:function(e,t,n){function o(e,t,n){var o,r;for(r=n.createElement("body"),r.innerHTML=t,o=r.lastChild;o;)i.insertAfter(o.cloneNode(!0),e),o=o.previousSibling;i.remove(e)}var i=this;return this.run(e,function(e){if(e=i.get(e),1==e.nodeType)if(n=n||e.ownerDocument||i.doc,r)try{r&&1==e.nodeType?e.outerHTML=t:o(e,t,n)}catch(a){o(e,t,n)}else o(e,t,n)})},decode:i.decode,encode:i.encodeAllRaw,insertAfter:function(e,t){return t=this.get(t),this.run(e,function(e){var n,o;return n=t.parentNode,o=t.nextSibling,o?n.insertBefore(e,o):n.appendChild(e),e})},replace:function(o,r,i){var a=this;return n(r,"array")&&(o=o.cloneNode(!0)),a.run(r,function(n){return i&&t(e.grep(n.childNodes),function(e){o.appendChild(e)}),n.parentNode.replaceChild(o,n)})},rename:function(e,n){var o,r=this;return e.nodeName!=n.toUpperCase()&&(o=r.create(n),t(r.getAttribs(e),function(t){r.setAttrib(o,t.nodeName,r.getAttrib(e,t.nodeName))}),r.replace(o,e,1)),o||e},findCommonAncestor:function(e,t){for(var n,o=e;o;){for(n=t;n&&o!=n;)n=n.parentNode;if(o==n)break;o=o.parentNode}return!o&&e.ownerDocument?e.ownerDocument.documentElement:o},toHex:function(e){function t(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}var n=/^\s*rgb\s*?\(\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?,\s*?([0-9]+)\s*?\)\s*$/i.exec(e);return n?e="#"+t(n[1])+t(n[2])+t(n[3]):e},getClasses:function(){function n(r){t(r.imports,function(e){n(e)}),t(r.cssRules||r.rules,function(r){switch(r.type||1){case 1:r.selectorText&&t(r.selectorText.split(","),function(t){t=t.replace(/^\s*|\s*$|^\s\./g,""),!/\.mce/.test(t)&&/\.[\w\-]+$/.test(t)&&(o=t,t=e._replace(/.*\.([a-z0-9_\-]+).*/i,"$1",t),(!s||(t=s(t,o)))&&(a[t]||(i.push({"class":t}),a[t]=1)))});break;case 3:try{n(r.styleSheet)}catch(c){}}})}var o,r=this,i=[],a={},s=r.settings.class_filter;if(r.classes)return r.classes;try{t(r.doc.styleSheets,n)}catch(c){}return i.length>0&&(r.classes=i),i},run:function(e,n,o){var r,i=this;return i.doc&&"string"==typeof e&&(e=i.get(e)),e?(o=o||this,e.nodeType||!e.length&&0!==e.length?n.call(o,e):(r=[],t(e,function(e,t){e&&("string"==typeof e&&(e=i.doc.getElementById(e)),r.push(n.call(o,e,t)))}),r)):!1},getAttribs:function(e){var t;return e=this.get(e),e?r?(t=[],"OBJECT"==e.nodeName?e.attributes:("OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"}),e.cloneNode(!1).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t)):e.attributes:[]},isEmpty:function(t,n){var o,r,i,a,c,d=this,l=0;if(t=t.firstChild){a=new e.dom.TreeWalker(t,t.parentNode),n=n||d.schema?d.schema.getNonEmptyElements():null;do{if(i=t.nodeType,1===i){if(t.getAttribute("data-mce-bogus"))continue;if(c=t.nodeName.toLowerCase(),n&&n[c]){if("br"===c){l++;continue}return!1}for(r=d.getAttribs(t),o=t.attributes.length;o--;)if(c=t.attributes[o].nodeName,"name"===c||"data-mce-bookmark"===c)return!1}if(8==i)return!1;if(3===i&&!s.test(t.nodeValue))return!1}while(t=a.next())}return 1>=l},destroy:function(t){var n=this;n.win=n.doc=n.root=n.events=n.frag=null,t||e.removeUnload(n.destroy)},createRng:function(){var t=this.doc;return t.createRange?t.createRange():new e.dom.Range(this)},nodeIndex:function(e,t){var n,o,r,i=0;if(e)for(n=e.nodeType,e=e.previousSibling,o=e;e;e=e.previousSibling)r=e.nodeType,(!t||3!=r||r!=n&&e.nodeValue.length)&&(i++,n=r);return i},split:function(t,n,o){function r(t){function n(e){var t=e.previousSibling&&"SPAN"==e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"==e.nextSibling.nodeName;return t&&n}var o,i=t.childNodes,a=t.nodeType;if(1!=a||"bookmark"!=t.getAttribute("data-mce-type")){for(o=i.length-1;o>=0;o--)r(i[o]);if(9!=a){if(3==a&&t.nodeValue.length>0){var s=e.trim(t.nodeValue).length;if(!c.isBlock(t.parentNode)||s>0||0===s&&n(t))return}else if(1==a&&(i=t.childNodes,1==i.length&&i[0]&&1==i[0].nodeType&&"bookmark"==i[0].getAttribute("data-mce-type")&&t.parentNode.insertBefore(i[0],t),i.length||/^(br|hr|input|img)$/i.test(t.nodeName)))return;c.remove(t)}return t}}var i,a,s,c=this,d=c.createRng();return t&&n?(d.setStart(t.parentNode,c.nodeIndex(t)),d.setEnd(n.parentNode,c.nodeIndex(n)),i=d.extractContents(),d=c.createRng(),d.setStart(n.parentNode,c.nodeIndex(n)+1),d.setEnd(t.parentNode,c.nodeIndex(t)+1),a=d.extractContents(),s=t.parentNode,s.insertBefore(r(i),t),o?s.replaceChild(o,n):s.insertBefore(n,t),s.insertBefore(r(a),t),c.remove(t),o||n):void 0},bind:function(e,t,n,o){return this.events.add(e,t,n,o||this)},unbind:function(e,t,n){return this.events.remove(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return 1!=e.nodeType?null:(t=e.getAttribute("data-mce-contenteditable"),t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null)},_findSib:function(e,t,o){var r=this,i=t;if(e)for(n(i,"string")&&(i=function(e){return r.is(e,t)}),e=e[o];e;e=e[o])if(i(e))return e;return null},_isRes:function(e){return/^(top|left|bottom|right|width|height)/i.test(e)||/;\s*(top|left|bottom|right|width|height)/i.test(e)}}),e.DOM=new e.dom.DOMUtils(document,{process_html:0})}(tinymce),function(e){function t(e){function n(){return I.createDocumentFragment()}function o(e,t){_(H,e,t)}function r(e,t){_(F,e,t)}function i(e){o(e.parentNode,$(e))}function a(e){o(e.parentNode,$(e)+1)}function s(e){r(e.parentNode,$(e))}function c(e){r(e.parentNode,$(e)+1)}function d(e){e?(L[z]=L[V],L[q]=L[U]):(L[V]=L[z],L[U]=L[q]),L.collapsed=H}function l(e){i(e),c(e)}function u(e){o(e,0),r(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)}function f(e,t){var n=L[V],o=L[U],r=L[z],i=L[q],a=t.startContainer,s=t.startOffset,c=t.endContainer,d=t.endOffset;return 0===e?x(n,o,a,s):1===e?x(r,i,a,s):2===e?x(r,i,c,d):3===e?x(n,o,c,d):void 0}function p(){E(O)}function m(){return E(D)}function h(){return E(P)}function g(t){var n,o,r=this[V],i=this[U];3!==r.nodeType&&4!==r.nodeType||!r.nodeValue?(r.childNodes.length>0&&(o=r.childNodes[i]),o?r.insertBefore(t,o):r.appendChild(t)):i?i>=r.nodeValue.length?e.insertAfter(t,r):(n=r.splitText(i),r.parentNode.insertBefore(t,n)):r.parentNode.insertBefore(t,r)}function v(e){var t=L.extractContents();L.insertNode(e),e.appendChild(t),L.selectNode(e)}function y(){return K(new t(e),{startContainer:L[V],startOffset:L[U],endContainer:L[z],endOffset:L[q],collapsed:L.collapsed,commonAncestorContainer:L.commonAncestorContainer})}function b(e,t){var n;if(3==e.nodeType)return e;if(0>t)return e;for(n=e.firstChild;n&&t>0;)--t,n=n.nextSibling;return n?n:e}function C(){return L[V]==L[z]&&L[U]==L[q]}function x(t,n,o,r){var i,a,s,c,d,l;if(t==o)return n==r?0:r>n?-1:1;for(i=o;i&&i.parentNode!=t;)i=i.parentNode;if(i){for(a=0,s=t.firstChild;s!=i&&n>a;)a++,s=s.nextSibling;return a>=n?-1:1}for(i=t;i&&i.parentNode!=o;)i=i.parentNode;if(i){for(a=0,s=o.firstChild;s!=i&&r>a;)a++,s=s.nextSibling;return r>a?-1:1}for(c=e.findCommonAncestor(t,o),d=t;d&&d.parentNode!=c;)d=d.parentNode;for(d||(d=c),l=o;l&&l.parentNode!=c;)l=l.parentNode;if(l||(l=c),d==l)return 0;for(s=c.firstChild;s;){if(s==d)return-1;if(s==l)return 1;s=s.nextSibling}}function _(t,n,o){var r,i;for(t?(L[V]=n,L[U]=o):(L[z]=n,L[q]=o),r=L[z];r.parentNode;)r=r.parentNode;for(i=L[V];i.parentNode;)i=i.parentNode;i==r?x(L[V],L[U],L[z],L[q])>0&&L.collapse(t):L.collapse(t),L.collapsed=C(),L.commonAncestorContainer=e.findCommonAncestor(L[V],L[z])}function E(e){var t,n,o,r,i,a,s,c=0,d=0;if(L[V]==L[z])return S(e);for(t=L[z],n=t.parentNode;n;t=n,n=n.parentNode){if(n==L[V])return k(t,e);++c}for(t=L[V],n=t.parentNode;n;t=n,n=n.parentNode){if(n==L[z])return w(t,e);++d}for(o=d-c,r=L[V];o>0;)r=r.parentNode,o--;for(i=L[z];0>o;)i=i.parentNode,o++;for(a=r.parentNode,s=i.parentNode;a!=s;a=a.parentNode,s=s.parentNode)r=a,i=s;return N(r,i,e)}function S(e){var t,o,r,i,a,s,c,d,l;if(e!=O&&(t=n()),L[U]==L[q])return t;if(3==L[V].nodeType){if(o=L[V].nodeValue,r=o.substring(L[U],L[q]),e!=P&&(i=L[V],d=L[U],l=L[q]-L[U],0===d&&l>=i.nodeValue.length-1?i.parentNode.removeChild(i):i.deleteData(d,l),L.collapse(H)),e==O)return;return r.length>0&&t.appendChild(I.createTextNode(r)),t}for(i=b(L[V],L[U]),a=L[q]-L[U];i&&a>0;)s=i.nextSibling,c=M(i,e),t&&t.appendChild(c),--a,i=s;return e!=P&&L.collapse(H),t}function k(e,t){var o,r,i,a,s,c;if(t!=O&&(o=n()),r=T(e,t),o&&o.appendChild(r),i=$(e),a=i-L[U],0>=a)return t!=P&&(L.setEndBefore(e),L.collapse(F)),o;for(r=e.previousSibling;a>0;)s=r.previousSibling,c=M(r,t),o&&o.insertBefore(c,o.firstChild),--a,r=s;return t!=P&&(L.setEndBefore(e),L.collapse(F)),o}function w(e,t){var o,r,i,a,s,c;for(t!=O&&(o=n()),i=A(e,t),o&&o.appendChild(i),r=$(e),++r,a=L[q]-r,i=e.nextSibling;i&&a>0;)s=i.nextSibling,c=M(i,t),o&&o.appendChild(c),--a,i=s;return t!=P&&(L.setStartAfter(e),L.collapse(H)),o}function N(e,t,o){var r,i,a,s,c,d,l,u;for(o!=O&&(i=n()),r=A(e,o),i&&i.appendChild(r),a=e.parentNode,s=$(e),c=$(t),++s,d=c-s,l=e.nextSibling;d>0;)u=l.nextSibling,r=M(l,o),i&&i.appendChild(r),l=u,--d;return r=T(t,o),i&&i.appendChild(r),o!=P&&(L.setStartAfter(e),L.collapse(H)),i}function T(e,t){var n,o,r,i,a,s=b(L[z],L[q]-1),c=s!=L[z];if(s==e)return B(s,c,F,t);for(n=s.parentNode,o=B(n,F,F,t);n;){for(;s;)r=s.previousSibling,i=B(s,c,F,t),t!=O&&o.insertBefore(i,o.firstChild),c=H,s=r;if(n==e)return o;s=n.previousSibling,n=n.parentNode,a=B(n,F,F,t),t!=O&&a.appendChild(o),o=a}}function A(e,t){var n,o,r,i,a,s=b(L[V],L[U]),c=s!=L[V];if(s==e)return B(s,c,H,t);for(n=s.parentNode,o=B(n,F,H,t);n;){for(;s;)r=s.nextSibling,i=B(s,c,H,t),t!=O&&o.appendChild(i),c=H,s=r;if(n==e)return o;s=n.nextSibling,n=n.parentNode,a=B(n,F,H,t),t!=O&&a.appendChild(o),o=a}}function B(t,n,o,r){var i,a,s,c,d;if(n)return M(t,r);if(3==t.nodeType){if(i=t.nodeValue,o?(c=L[U],a=i.substring(c),s=i.substring(0,c)):(c=L[q],a=i.substring(0,c),s=i.substring(c)),r!=P&&(t.nodeValue=s),r==O)return;return d=e.clone(t,F),d.nodeValue=a,d}if(r!=O)return e.clone(t,F)}function M(t,n){return n!=O?n==P?e.clone(t,H):t:void t.parentNode.removeChild(t)}function R(){return e.create("body",null,h()).outerText}var L=this,I=e.doc,D=0,P=1,O=2,H=!0,F=!1,U="startOffset",V="startContainer",z="endContainer",q="endOffset",K=tinymce.extend,$=e.nodeIndex;return K(L,{startContainer:I,startOffset:0,endContainer:I,endOffset:0,collapsed:H,commonAncestorContainer:I,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:o,setEnd:r,setStartBefore:i,setStartAfter:a,setEndBefore:s,setEndAfter:c,collapse:d,selectNode:l,selectNodeContents:u,compareBoundaryPoints:f,deleteContents:p,extractContents:m,cloneContents:h,insertNode:g,surroundContents:v,cloneRange:y,toStringIE:R}),L}e.Range=t,t.prototype.toString=function(){return this.toStringIE()}}(tinymce.dom),function(){function e(e){function t(t,n){var o,r,i,a,s,c,d,l,u=0,f=-1;if(o=t.duplicate(),o.collapse(n),l=o.parentElement(),l.ownerDocument===e.dom.doc){for(;"false"===l.contentEditable;)l=l.parentNode;if(!l.hasChildNodes())return{node:l,inside:1};for(a=l.children,r=a.length-1;r>=u;)if(d=Math.floor((u+r)/2),s=a[d],o.moveToElementText(s),f=o.compareEndPoints(n?"StartToStart":"EndToEnd",t),f>0)r=d-1;else{if(!(0>f))return{node:s};u=d+1}if(0>f)for(s?o.collapse(!1):(o.moveToElementText(l),o.collapse(!0),s=l,i=!0),c=0;0!==o.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==o.move("character",1)&&l==o.parentElement();)c++;else for(o.collapse(!0),c=0;0!==o.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==o.move("character",-1)&&l==o.parentElement();)c++;return{node:s,position:f,offset:c,inside:i}}}function n(){function n(e){var n,o,r,i,a,s=t(l,e),c=0;if(n=s.node,o=s.offset,s.inside&&!n.hasChildNodes())return void u[e?"setStart":"setEnd"](n,0);if(o===i)return void u[e?"setStartBefore":"setEndAfter"](n);if(s.position<0){if(r=s.inside?n.firstChild:n.nextSibling,!r)return void u[e?"setStartAfter":"setEndAfter"](n);if(!o)return void(3==r.nodeType?u[e?"setStart":"setEnd"](r,0):u[e?"setStartBefore":"setEndBefore"](r));for(;r;){if(a=r.nodeValue,c+=a.length,c>=o){n=r,c-=o,c=a.length-c;break}r=r.nextSibling}}else{if(r=n.previousSibling,!r)return u[e?"setStartBefore":"setEndBefore"](n);if(!o)return void(3==n.nodeType?u[e?"setStart":"setEnd"](r,n.nodeValue.length):u[e?"setStartAfter":"setEndAfter"](r));for(;r;){if(c+=r.nodeValue.length,c>=o){n=r,c-=o;break}r=r.previousSibling}}u[e?"setStart":"setEnd"](n,c)}var i,a,s,c,d,l=e.getRng(),u=r.createRng();if(i=l.item?l.item(0):l.parentElement(),i.ownerDocument!=r.doc)return u;if(a=e.isCollapsed(),l.item)return u.setStart(i.parentNode,r.nodeIndex(i)),u.setEnd(u.startContainer,u.startOffset+1),u;try{n(!0),a||n()}catch(f){if(-2147024809!=f.number)throw f;d=o.getBookmark(2),s=l.duplicate(),s.collapse(!0),i=s.parentElement(),a||(s=l.duplicate(),s.collapse(!1),c=s.parentElement(),c.innerHTML=c.innerHTML),i.innerHTML=i.innerHTML,o.moveToBookmark(d),l=e.getRng(),n(!0),a||n()}return u}var o=this,r=e.dom,i=!1;this.getBookmark=function(n){function o(e){var t,n,o,i,a=[];for(t=e.parentNode,n=r.getRoot().parentNode;t!=n&&9!==t.nodeType;){for(o=t.children,i=o.length;i--;)if(e===o[i]){a.push(i);break}e=t,t=t.parentNode}return a}function i(e){var n;return n=t(a,e),n?{position:n.position,offset:n.offset,indexes:o(n.node),inside:n.inside}:void 0}var a=e.getRng(),s={};return 2===n&&(a.item?s.start={ctrl:!0,indexes:o(a.item(0))}:(s.start=i(!0),e.isCollapsed()||(s.end=i()))),s},this.moveToBookmark=function(e){function t(e){var t,n,o,i;for(t=r.getRoot(),n=e.length-1;n>=0;n--)i=t.children,o=e[n],o<=i.length-1&&(t=i[o]);return t}function n(n){var r,a,s,c=e[n?"start":"end"];c&&(r=c.position>0,a=i.createTextRange(),a.moveToElementText(t(c.indexes)),offset=c.offset,offset!==s?(a.collapse(c.inside||r),a.moveStart("character",r?-offset:offset)):a.collapse(n),o.setEndPoint(n?"StartToStart":"EndToStart",a),n&&o.collapse(!0))}var o,i=r.doc.body;e.start&&(e.start.ctrl?(o=i.createControlRange(),o.addElement(t(e.start.indexes)),o.select()):(o=i.createTextRange(),n(!0),n(),o.select()))},this.addRange=function(t){function n(e){var t,n,a,u,f;a=r.create("a"),t=e?s:d,n=e?c:l,u=o.duplicate(),(t==m||t==m.documentElement)&&(t=h,n=0),3==t.nodeType?(t.parentNode.insertBefore(a,t),u.moveToElementText(a),u.moveStart("character",n),r.remove(a),o.setEndPoint(e?"StartToStart":"EndToEnd",u)):(f=t.childNodes,f.length?(n>=f.length?r.insertAfter(a,f[f.length-1]):t.insertBefore(a,f[n]),u.moveToElementText(a)):t.canHaveHTML&&(t.innerHTML="<span>\ufeff</span>",a=t.firstChild,u.moveToElementText(a),u.collapse(i)),o.setEndPoint(e?"StartToStart":"EndToEnd",u),r.remove(a))}var o,a,s,c,d,l,u,f,p,m=e.dom.doc,h=m.body;if(s=t.startContainer,c=t.startOffset,d=t.endContainer,l=t.endOffset,o=h.createTextRange(),s==d&&1==s.nodeType){if(c==l&&!s.hasChildNodes()){if(s.canHaveHTML)return u=s.previousSibling,u&&!u.hasChildNodes()&&r.isBlock(u)?u.innerHTML="\ufeff":u=null,s.innerHTML="<span>\ufeff</span><span>\ufeff</span>",o.moveToElementText(s.lastChild),o.select(),r.doc.selection.clear(),s.innerHTML="",void(u&&(u.innerHTML=""));c=r.nodeIndex(s),s=s.parentNode}if(c==l-1)try{if(p=s.childNodes[c],a=h.createControlRange(),a.addElement(p),a.select(),f=e.getRng(),f.item&&p===f.item(0))return}catch(g){}}n(!0),n(),o.select()},this.getRangeAt=n}tinymce.dom.TridentSelection=e}(),/*
 * Sizzle CSS Selector Engine
 *  Copyright, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 */
function(){function e(e,t,n,r,i,a){for(var s=0,c=r.length;c>s;s++){var d=r[s];if(d){var l=!1;for(d=d[e];d;){if(d[o]===n){l=r[d.sizset];break}if(1!==d.nodeType||a||(d[o]=n,d.sizset=s),d.nodeName.toLowerCase()===t){l=d;break}d=d[e]}r[s]=l}}}function t(e,t,n,r,i,a){for(var s=0,c=r.length;c>s;s++){var d=r[s];if(d){var l=!1;for(d=d[e];d;){if(d[o]===n){l=r[d.sizset];break}if(1===d.nodeType)if(a||(d[o]=n,d.sizset=s),"string"!=typeof t){if(d===t){l=!0;break}}else if(u.filter(t,[d]).length>0){l=d;break}d=d[e]}r[s]=l}}}var n=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,o="sizcache",r=0,i=Object.prototype.toString,a=!1,s=!0,c=/\\/g,d=/\r\n/g,l=/\W/;[0,0].sort(function(){return s=!1,0});var u=function(e,t,o,r){o=o||[],t=t||document;var a=t;if(1!==t.nodeType&&9!==t.nodeType)return[];if(!e||"string"!=typeof e)return o;var s,c,d,l,f,h,g,y,b=!0,C=u.isXML(t),_=[],E=e;do if(n.exec(""),s=n.exec(E),s&&(E=s[3],_.push(s[1]),s[2])){l=s[3];break}while(s);if(_.length>1&&m.exec(e))if(2===_.length&&p.relative[_[0]])c=x(_[0]+_[1],t,r);else for(c=p.relative[_[0]]?[t]:u(_.shift(),t);_.length;)e=_.shift(),p.relative[e]&&(e+=_.shift()),c=x(e,c,r);else if(!r&&_.length>1&&9===t.nodeType&&!C&&p.match.ID.test(_[0])&&!p.match.ID.test(_[_.length-1])&&(f=u.find(_.shift(),t,C),t=f.expr?u.filter(f.expr,f.set)[0]:f.set[0]),t)for(f=r?{expr:_.pop(),set:v(r)}:u.find(_.pop(),1!==_.length||"~"!==_[0]&&"+"!==_[0]||!t.parentNode?t:t.parentNode,C),c=f.expr?u.filter(f.expr,f.set):f.set,_.length>0?d=v(c):b=!1;_.length;)h=_.pop(),g=h,p.relative[h]?g=_.pop():h="",null==g&&(g=t),p.relative[h](d,g,C);else d=_=[];if(d||(d=c),d||u.error(h||e),"[object Array]"===i.call(d))if(b)if(t&&1===t.nodeType)for(y=0;null!=d[y];y++)d[y]&&(d[y]===!0||1===d[y].nodeType&&u.contains(t,d[y]))&&o.push(c[y]);else for(y=0;null!=d[y];y++)d[y]&&1===d[y].nodeType&&o.push(c[y]);else o.push.apply(o,d);else v(d,o);return l&&(u(l,a,o,r),u.uniqueSort(o)),o};u.uniqueSort=function(e){if(b&&(a=s,e.sort(b),a))for(var t=1;t<e.length;t++)e[t]===e[t-1]&&e.splice(t--,1);return e},u.matches=function(e,t){return u(e,null,null,t)},u.matchesSelector=function(e,t){return u(t,null,null,[e]).length>0},u.find=function(e,t,n){var o,r,i,a,s,d;if(!e)return[];for(r=0,i=p.order.length;i>r;r++)if(s=p.order[r],(a=p.leftMatch[s].exec(e))&&(d=a[1],a.splice(1,1),"\\"!==d.substr(d.length-1)&&(a[1]=(a[1]||"").replace(c,""),o=p.find[s](a,t,n),null!=o))){e=e.replace(p.match[s],"");break}return o||(o="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName("*"):[]),{set:o,expr:e}},u.filter=function(e,t,n,o){for(var r,i,a,s,c,d,l,f,m,h=e,g=[],v=t,y=t&&t[0]&&u.isXML(t[0]);e&&t.length;){for(a in p.filter)if(null!=(r=p.leftMatch[a].exec(e))&&r[2]){if(d=p.filter[a],l=r[1],i=!1,r.splice(1,1),"\\"===l.substr(l.length-1))continue;if(v===g&&(g=[]),p.preFilter[a])if(r=p.preFilter[a](r,v,n,g,o,y)){if(r===!0)continue}else i=s=!0;if(r)for(f=0;null!=(c=v[f]);f++)c&&(s=d(c,r,f,v),m=o^s,n&&null!=s?m?i=!0:v[f]=!1:m&&(g.push(c),i=!0));if(void 0!==s){if(n||(v=g),e=e.replace(p.match[a],""),!i)return[];break}}if(e===h){if(null!=i)break;u.error(e)}h=e}return v},u.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var f=u.getText=function(e){var t,n,o=e.nodeType,r="";if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;if("string"==typeof e.innerText)return e.innerText.replace(d,"");for(e=e.firstChild;e;e=e.nextSibling)r+=f(e)}else if(3===o||4===o)return e.nodeValue}else for(t=0;n=e[t];t++)8!==n.nodeType&&(r+=f(n));return r},p=u.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(e,t){var n="string"==typeof t,o=n&&!l.test(t),r=n&&!o;o&&(t=t.toLowerCase());for(var i,a=0,s=e.length;s>a;a++)if(i=e[a]){for(;(i=i.previousSibling)&&1!==i.nodeType;);e[a]=r||i&&i.nodeName.toLowerCase()===t?i||!1:i===t}r&&u.filter(t,e,!0)},">":function(e,t){var n,o="string"==typeof t,r=0,i=e.length;if(o&&!l.test(t)){for(t=t.toLowerCase();i>r;r++)if(n=e[r]){var a=n.parentNode;e[r]=a.nodeName.toLowerCase()===t?a:!1}}else{for(;i>r;r++)n=e[r],n&&(e[r]=o?n.parentNode:n.parentNode===t);o&&u.filter(t,e,!0)}},"":function(n,o,i){var a,s=r++,c=t;"string"!=typeof o||l.test(o)||(o=o.toLowerCase(),a=o,c=e),c("parentNode",o,s,n,a,i)},"~":function(n,o,i){var a,s=r++,c=t;"string"!=typeof o||l.test(o)||(o=o.toLowerCase(),a=o,c=e),c("previousSibling",o,s,n,a,i)}},find:{ID:function(e,t,n){if("undefined"!=typeof t.getElementById&&!n){var o=t.getElementById(e[1]);return o&&o.parentNode?[o]:[]}},NAME:function(e,t){if("undefined"!=typeof t.getElementsByName){for(var n=[],o=t.getElementsByName(e[1]),r=0,i=o.length;i>r;r++)o[r].getAttribute("name")===e[1]&&n.push(o[r]);return 0===n.length?null:n}},TAG:function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e[1]):void 0}},preFilter:{CLASS:function(e,t,n,o,r,i){if(e=" "+e[1].replace(c,"")+" ",i)return e;for(var a,s=0;null!=(a=t[s]);s++)a&&(r^(a.className&&(" "+a.className+" ").replace(/[\t\n\r]/g," ").indexOf(e)>=0)?n||o.push(a):n&&(t[s]=!1));return!1},ID:function(e){return e[1].replace(c,"")},TAG:function(e){return e[1].replace(c,"").toLowerCase()},CHILD:function(e){if("nth"===e[1]){e[2]||u.error(e[0]),e[2]=e[2].replace(/^\+|\s*/g,"");var t=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec("even"===e[2]&&"2n"||"odd"===e[2]&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=t[1]+(t[2]||1)-0,e[3]=t[3]-0}else e[2]&&u.error(e[0]);return e[0]=r++,e},ATTR:function(e,t,n,o,r,i){var a=e[1]=e[1].replace(c,"");return!i&&p.attrMap[a]&&(e[1]=p.attrMap[a]),e[4]=(e[4]||e[5]||"").replace(c,""),"~="===e[2]&&(e[4]=" "+e[4]+" "),e},PSEUDO:function(e,t,o,r,i){if("not"===e[1]){if(!((n.exec(e[3])||"").length>1||/^\w/.test(e[3]))){var a=u.filter(e[3],t,o,!0^i);return o||r.push.apply(r,a),!1}e[3]=u(e[3],null,null,t)}else if(p.match.POS.test(e[0])||p.match.CHILD.test(e[0]))return!0;return e},POS:function(e){return e.unshift(!0),e}},filters:{enabled:function(e){return e.disabled===!1&&"hidden"!==e.type},disabled:function(e){return e.disabled===!0},checked:function(e){return e.checked===!0},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!!e.firstChild},empty:function(e){return!e.firstChild},has:function(e,t,n){return!!u(n[3],e).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){var t=e.getAttribute("type"),n=e.type;return"input"===e.nodeName.toLowerCase()&&"text"===n&&(t===n||null===t)},radio:function(e){return"input"===e.nodeName.toLowerCase()&&"radio"===e.type},checkbox:function(e){return"input"===e.nodeName.toLowerCase()&&"checkbox"===e.type},file:function(e){return"input"===e.nodeName.toLowerCase()&&"file"===e.type},password:function(e){return"input"===e.nodeName.toLowerCase()&&"password"===e.type},submit:function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&"submit"===e.type},image:function(e){return"input"===e.nodeName.toLowerCase()&&"image"===e.type},reset:function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&"reset"===e.type},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(e,t){return 0===t},last:function(e,t,n,o){return t===o.length-1},even:function(e,t){return t%2===0},odd:function(e,t){return t%2===1},lt:function(e,t,n){return t<n[3]-0},gt:function(e,t,n){return t>n[3]-0},nth:function(e,t,n){return n[3]-0===t},eq:function(e,t,n){return n[3]-0===t}},filter:{PSEUDO:function(e,t,n,o){var r=t[1],i=p.filters[r];if(i)return i(e,n,t,o);if("contains"===r)return(e.textContent||e.innerText||f([e])||"").indexOf(t[3])>=0;if("not"===r){for(var a=t[3],s=0,c=a.length;c>s;s++)if(a[s]===e)return!1;return!0}u.error(r)},CHILD:function(e,t){var n,r,i,a,s,c,d=t[1],l=e;switch(d){case"only":case"first":for(;l=l.previousSibling;)if(1===l.nodeType)return!1;if("first"===d)return!0;l=e;case"last":for(;l=l.nextSibling;)if(1===l.nodeType)return!1;return!0;case"nth":if(n=t[2],r=t[3],1===n&&0===r)return!0;if(i=t[0],a=e.parentNode,a&&(a[o]!==i||!e.nodeIndex)){for(s=0,l=a.firstChild;l;l=l.nextSibling)1===l.nodeType&&(l.nodeIndex=++s);a[o]=i}return c=e.nodeIndex-r,0===n?0===c:c%n===0&&c/n>=0}},ID:function(e,t){return 1===e.nodeType&&e.getAttribute("id")===t},TAG:function(e,t){return"*"===t&&1===e.nodeType||!!e.nodeName&&e.nodeName.toLowerCase()===t},CLASS:function(e,t){return(" "+(e.className||e.getAttribute("class"))+" ").indexOf(t)>-1},ATTR:function(e,t){var n=t[1],o=u.attr?u.attr(e,n):p.attrHandle[n]?p.attrHandle[n](e):null!=e[n]?e[n]:e.getAttribute(n),r=o+"",i=t[2],a=t[4];return null==o?"!="===i:!i&&u.attr?null!=o:"="===i?r===a:"*="===i?r.indexOf(a)>=0:"~="===i?(" "+r+" ").indexOf(a)>=0:a?"!="===i?r!==a:"^="===i?0===r.indexOf(a):"$="===i?r.substr(r.length-a.length)===a:"|="===i?r===a||r.substr(0,a.length+1)===a+"-":!1:r&&o!==!1},POS:function(e,t,n,o){var r=t[2],i=p.setFilters[r];return i?i(e,n,t,o):void 0}}},m=p.match.POS,h=function(e,t){return"\\"+(t-0+1)};for(var g in p.match)p.match[g]=new RegExp(p.match[g].source+/(?![^\[]*\])(?![^\(]*\))/.source),p.leftMatch[g]=new RegExp(/(^(?:.|\r|\n)*?)/.source+p.match[g].source.replace(/\\(\d+)/g,h));p.match.globalPOS=m;var v=function(e,t){return e=Array.prototype.slice.call(e,0),t?(t.push.apply(t,e),t):e};try{Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType}catch(y){v=function(e,t){var n=0,o=t||[];if("[object Array]"===i.call(e))Array.prototype.push.apply(o,e);else if("number"==typeof e.length)for(var r=e.length;r>n;n++)o.push(e[n]);else for(;e[n];n++)o.push(e[n]);return o}}var b,C;document.documentElement.compareDocumentPosition?b=function(e,t){return e===t?(a=!0,0):e.compareDocumentPosition&&t.compareDocumentPosition?4&e.compareDocumentPosition(t)?-1:1:e.compareDocumentPosition?-1:1}:(b=function(e,t){if(e===t)return a=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,o,r=[],i=[],s=e.parentNode,c=t.parentNode,d=s;if(s===c)return C(e,t);if(!s)return-1;if(!c)return 1;for(;d;)r.unshift(d),d=d.parentNode;for(d=c;d;)i.unshift(d),d=d.parentNode;n=r.length,o=i.length;for(var l=0;n>l&&o>l;l++)if(r[l]!==i[l])return C(r[l],i[l]);return l===n?C(e,i[l],-1):C(r[l],t,1)},C=function(e,t,n){if(e===t)return n;for(var o=e.nextSibling;o;){if(o===t)return-1;o=o.nextSibling}return 1}),function(){var e=document.createElement("div"),t="script"+(new Date).getTime(),n=document.documentElement;e.innerHTML="<a name='"+t+"'/>",n.insertBefore(e,n.firstChild),document.getElementById(t)&&(p.find.ID=function(e,t,n){if("undefined"!=typeof t.getElementById&&!n){var o=t.getElementById(e[1]);return o?o.id===e[1]||"undefined"!=typeof o.getAttributeNode&&o.getAttributeNode("id").nodeValue===e[1]?[o]:void 0:[]}},p.filter.ID=function(e,t){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return 1===e.nodeType&&n&&n.nodeValue===t}),n.removeChild(e),n=e=null}(),function(){var e=document.createElement("div");e.appendChild(document.createComment("")),e.getElementsByTagName("*").length>0&&(p.find.TAG=function(e,t){var n=t.getElementsByTagName(e[1]);if("*"===e[1]){for(var o=[],r=0;n[r];r++)1===n[r].nodeType&&o.push(n[r]);n=o}return n}),e.innerHTML="<a href='#'></a>",e.firstChild&&"undefined"!=typeof e.firstChild.getAttribute&&"#"!==e.firstChild.getAttribute("href")&&(p.attrHandle.href=function(e){return e.getAttribute("href",2)}),e=null}(),document.querySelectorAll&&!function(){var e=u,t=document.createElement("div"),n="__sizzle__";if(t.innerHTML="<p class='TEST'></p>",!t.querySelectorAll||0!==t.querySelectorAll(".TEST").length){u=function(t,o,r,i){if(o=o||document,!i&&!u.isXML(o)){var a=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(t);if(a&&(1===o.nodeType||9===o.nodeType)){if(a[1])return v(o.getElementsByTagName(t),r);if(a[2]&&p.find.CLASS&&o.getElementsByClassName)return v(o.getElementsByClassName(a[2]),r)}if(9===o.nodeType){if("body"===t&&o.body)return v([o.body],r);if(a&&a[3]){var s=o.getElementById(a[3]);if(!s||!s.parentNode)return v([],r);if(s.id===a[3])return v([s],r)}try{return v(o.querySelectorAll(t),r)}catch(c){}}else if(1===o.nodeType&&"object"!==o.nodeName.toLowerCase()){var d=o,l=o.getAttribute("id"),f=l||n,m=o.parentNode,h=/^\s*[+~]/.test(t);l?f=f.replace(/'/g,"\\$&"):o.setAttribute("id",f),h&&m&&(o=o.parentNode);try{if(!h||m)return v(o.querySelectorAll("[id='"+f+"'] "+t),r)}catch(g){}finally{l||d.removeAttribute("id")}}}return e(t,o,r,i)};for(var o in e)u[o]=e[o];t=null}}(),function(){var e=document.documentElement,t=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(t){var n=!t.call(document.createElement("div"),"div"),o=!1;try{t.call(document.documentElement,"[test!='']:sizzle")}catch(r){o=!0}u.matchesSelector=function(e,r){if(r=r.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"),!u.isXML(e))try{if(o||!p.match.PSEUDO.test(r)&&!/!=/.test(r)){var i=t.call(e,r);if(i||!n||e.document&&11!==e.document.nodeType)return i}}catch(a){}return u(r,null,null,[e]).length>0}}}(),function(){var e=document.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>",e.getElementsByClassName&&0!==e.getElementsByClassName("e").length&&(e.lastChild.className="e",1!==e.getElementsByClassName("e").length&&(p.order.splice(1,0,"CLASS"),p.find.CLASS=function(e,t,n){return"undefined"==typeof t.getElementsByClassName||n?void 0:t.getElementsByClassName(e[1])},e=null))}(),u.contains=document.documentElement.contains?function(e,t){return e!==t&&(e.contains?e.contains(t):!0)}:document.documentElement.compareDocumentPosition?function(e,t){return!!(16&e.compareDocumentPosition(t))}:function(){return!1},u.isXML=function(e){var t=(e?e.ownerDocument||e:0).documentElement;return t?"HTML"!==t.nodeName:!1};var x=function(e,t,n){for(var o,r=[],i="",a=t.nodeType?[t]:t;o=p.match.PSEUDO.exec(e);)i+=o[0],e=e.replace(p.match.PSEUDO,"");e=p.relative[e]?e+"*":e;for(var s=0,c=a.length;c>s;s++)u(e,a[s],r,n);return u.filter(i,r)};window.tinymce.dom.Sizzle=u}(),function(e){e.dom.Element=function(t,n){var o,r,i=this;i.settings=n=n||{},i.id=t,i.dom=o=n.dom||e.DOM,e.isIE||(r=o.get(i.id)),e.each("getPos,getRect,getParent,add,setStyle,getStyle,setStyles,setAttrib,setAttribs,getAttrib,addClass,removeClass,hasClass,getOuterHTML,setOuterHTML,remove,show,hide,isHidden,setHTML,get".split(/,/),function(e){i[e]=function(){var n,r=[t];for(n=0;n<arguments.length;n++)r.push(arguments[n]);return r=o[e].apply(o,r),i.update(e),r}}),e.extend(i,{on:function(t,n,o){return e.dom.Event.add(i.id,t,n,o)},getXY:function(){return{x:parseInt(i.getStyle("left")),y:parseInt(i.getStyle("top"))}},getSize:function(){var e=o.get(i.id);return{w:parseInt(i.getStyle("width")||e.clientWidth),h:parseInt(i.getStyle("height")||e.clientHeight)}},moveTo:function(e,t){i.setStyles({left:e,top:t})},moveBy:function(e,t){var n=i.getXY();i.moveTo(n.x+e,n.y+t)},resizeTo:function(e,t){i.setStyles({width:e,height:t})},resizeBy:function(e,t){var n=i.getSize();i.resizeTo(n.w+e,n.h+t)},update:function(t){var r;if(e.isIE6&&n.blocker){if(t=t||"",0===t.indexOf("get")||0===t.indexOf("has")||0===t.indexOf("is"))return;if("remove"==t)return void o.remove(i.blocker);i.blocker?r=o.get(i.blocker):(i.blocker=o.uniqueId(),r=o.add(n.container||o.getRoot(),"iframe",{id:i.blocker,style:"position:absolute;",frameBorder:0,src:'javascript:""'}),o.setStyle(r,"opacity",0)),o.setStyles(r,{left:i.getStyle("left",1),top:i.getStyle("top",1),width:i.getStyle("width",1),height:i.getStyle("height",1),display:i.getStyle("display",1),zIndex:parseInt(i.getStyle("zIndex",1)||0)-1})}}})}}(tinymce),function(e){var t=e.is,n=e.isIE,o=e.each,r=e.dom.TreeWalker;e.create("tinymce.dom.Selection",{Selection:function(t,n,r,i){var a=this;a.dom=t,a.win=n,a.serializer=r,a.editor=i,o(["onBeforeSetContent","onBeforeGetContent","onSetContent","onGetContent"],function(t){a[t]=new e.util.Dispatcher(a)}),a.win.getSelection||(a.tridentSel=new e.dom.TridentSelection(a)),e.isIE&&!e.isIE11&&t.boxModel&&this._fixIESelection(),e.addUnload(a.destroy,a)},setCursorLocation:function(e,t){var n=this,o=n.dom.createRng();o.setStart(e,t),o.setEnd(e,t),n.setRng(o),n.collapse(!1)},getContent:function(e){var n,o,r,i=this,a=i.getRng(),s=i.dom.create("body"),c=i.getSel();return e=e||{},n=o="",e.get=!0,e.format=e.format||"html",e.forced_root_block="",i.onBeforeGetContent.dispatch(i,e),"text"==e.format?i.isCollapsed()?"":a.text||(c.toString?c.toString():""):(a.cloneContents?(r=a.cloneContents(),r&&s.appendChild(r)):t(a.item)||t(a.htmlText)?(s.innerHTML="<br>"+(a.item?a.item(0).outerHTML:a.htmlText),s.removeChild(s.firstChild)):s.innerHTML=a.toString(),/^\s/.test(s.innerHTML)&&(n=" "),/\s+$/.test(s.innerHTML)&&(o=" "),e.getInner=!0,e.content=i.isCollapsed()?"":n+i.serializer.serialize(s,e)+o,i.onGetContent.dispatch(i,e),e.content)},setContent:function(e,t){var n,o,r,i=this,a=i.getRng(),s=i.win.document;if(t=t||{format:"html"},t.set=!0,e=t.content=e,t.no_events||i.onBeforeSetContent.dispatch(i,t),e=t.content,a.insertNode){e+='<span id="__caret">_</span>',a.startContainer==s&&a.endContainer==s?s.body.innerHTML=e:(a.deleteContents(),0===s.body.childNodes.length?s.body.innerHTML=e:a.createContextualFragment?a.insertNode(a.createContextualFragment(e)):(o=s.createDocumentFragment(),r=s.createElement("div"),o.appendChild(r),r.outerHTML=e,a.insertNode(o))),n=i.dom.get("__caret"),a=s.createRange(),a.setStartBefore(n),a.setEndBefore(n),i.setRng(a),i.dom.remove("__caret");try{i.setRng(a)}catch(c){}}else a.item&&(s.execCommand("Delete",!1,null),a=i.getRng()),/^\s+/.test(e)?(a.pasteHTML('<span id="__mce_tmp">_</span>'+e),i.dom.remove("__mce_tmp")):a.pasteHTML(e);t.no_events||i.onSetContent.dispatch(i,t)},getStart:function(){var e,t,n,o,r=this,i=r.getRng();if(i.duplicate||i.item){if(i.item)return i.item(0);for(n=i.duplicate(),n.collapse(1),e=n.parentElement(),e.ownerDocument!==r.dom.doc&&(e=r.dom.getRoot()),t=o=i.parentElement();o=o.parentNode;)if(o==e){e=t;break}return e}return e=i.startContainer,1==e.nodeType&&e.hasChildNodes()&&(e=e.childNodes[Math.min(e.childNodes.length-1,i.startOffset)]),e&&3==e.nodeType?e.parentNode:e},getEnd:function(){var e,t,n=this,o=n.getRng();return o.duplicate||o.item?o.item?o.item(0):(o=o.duplicate(),o.collapse(0),e=o.parentElement(),e.ownerDocument!==n.dom.doc&&(e=n.dom.getRoot()),e&&"BODY"==e.nodeName?e.lastChild||e:e):(e=o.endContainer,t=o.endOffset,1==e.nodeType&&e.hasChildNodes()&&(e=e.childNodes[t>0?t-1:t]),e&&3==e.nodeType?e.parentNode:e)},getBookmark:function(e,t){function n(e,t){var n=0;return o(m.select(e),function(e,o){e==t&&(n=o)}),n}function r(e){function t(t){var n,o,r,i=t?"start":"end";n=e[i+"Container"],o=e[i+"Offset"],1==n.nodeType&&"TR"==n.nodeName&&(r=n.childNodes,n=r[Math.min(t?o:o-1,r.length-1)],n&&(o=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,o)))}return t(!0),t(),e}function i(){function e(e,n){var r,i,a=e[n?"startContainer":"endContainer"],s=e[n?"startOffset":"endOffset"],c=[],d=0;if(3==a.nodeType){if(t)for(r=a.previousSibling;r&&3==r.nodeType;r=r.previousSibling)s+=r.nodeValue.length;c.push(s)}else i=a.childNodes,s>=i.length&&i.length&&(d=1,s=Math.max(0,i.length-1)),c.push(p.dom.nodeIndex(i[s],t)+d);for(;a&&a!=o;a=a.parentNode)c.push(p.dom.nodeIndex(a,t));return c}var n=p.getRng(!0),o=m.getRoot(),r={};return r.start=e(n,!0),p.isCollapsed()||(r.end=e(n)),r}var a,s,c,d,l,u,f,p=this,m=p.dom,h="\ufeff";if(2==e)return p.tridentSel?p.tridentSel.getBookmark(e):i();if(e)return a=p.getRng(),a.setStart&&(a={startContainer:a.startContainer,startOffset:a.startOffset,endContainer:a.endContainer,endOffset:a.endOffset}),{rng:a};if(a=p.getRng(),c=m.uniqueId(),d=tinyMCE.activeEditor.selection.isCollapsed(),f="overflow:hidden;line-height:0px",a.duplicate||a.item){if(a.item)return u=a.item(0),l=u.nodeName,{name:l,index:n(l,u)};s=a.duplicate();try{a.collapse(),a.pasteHTML('<span data-mce-type="bookmark" id="'+c+'_start" style="'+f+'">'+h+"</span>"),d||(s.collapse(!1),a.moveToElementText(s.parentElement()),0===a.compareEndPoints("StartToEnd",s)&&s.move("character",-1),s.pasteHTML('<span data-mce-type="bookmark" id="'+c+'_end" style="'+f+'">'+h+"</span>"))}catch(g){return null}}else{if(u=p.getNode(),l=u.nodeName,"IMG"==l)return{name:l,index:n(l,u)};s=r(a.cloneRange()),d||(s.collapse(!1),s.insertNode(m.create("span",{"data-mce-type":"bookmark",id:c+"_end",style:f},h))),a=r(a),a.collapse(!0),a.insertNode(m.create("span",{"data-mce-type":"bookmark",id:c+"_start",style:f},h))}return p.moveToBookmark({id:c,keep:1}),{id:c}},moveToBookmark:function(t){function r(e){var n,o,r,i,a=t[e?"start":"end"];if(a){for(r=a[0],o=d,n=a.length-1;n>=1;n--){if(i=o.childNodes,a[n]>i.length-1)return;o=i[a[n]]}3===o.nodeType&&(r=Math.min(a[0],o.nodeValue.length)),1===o.nodeType&&(r=Math.min(a[0],o.childNodes.length)),e?s.setStart(o,r):s.setEnd(o,r)}return!0}function i(n){var r,i,a,s,c=h.get(t.id+"_"+n),d=t.keep;if(c&&(r=c.parentNode,"start"==n?(d?(r=c.firstChild,i=1):i=h.nodeIndex(c),l=u=r,f=p=i):(d?(r=c.firstChild,i=1):i=h.nodeIndex(c),u=r,p=i),!d)){for(s=c.previousSibling,a=c.nextSibling,o(e.grep(c.childNodes),function(e){3==e.nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});c=h.get(t.id+"_"+n);)h.remove(c,1);s&&a&&s.nodeType==a.nodeType&&3==s.nodeType&&!e.isOpera&&(i=s.nodeValue.length,s.appendData(a.nodeValue),h.remove(a),"start"==n?(l=u=s,f=p=i):(u=s,p=i))}}function a(e){return!h.isBlock(e)||e.innerHTML||n||(e.innerHTML='<br data-mce-bogus="1" />'),e}var s,c,d,l,u,f,p,m=this,h=m.dom;if(t)if(t.start){if(s=h.createRng(),d=h.getRoot(),m.tridentSel)return m.tridentSel.moveToBookmark(t);r(!0)&&r()&&m.setRng(s)}else if(t.id)i("start"),i("end"),l&&(s=h.createRng(),s.setStart(a(l),f),s.setEnd(a(u),p),m.setRng(s));else if(t.name)m.select(h.select(t.name)[t.index]);else if(t.rng){if(s=t.rng,s.startContainer){c=m.dom.createRng();try{c.setStart(s.startContainer,s.startOffset),c.setEnd(s.endContainer,s.endOffset)}catch(g){}s=c}m.setRng(s)}},select:function(t,n){function o(t,n){var o=new r(t,t);do{if(3==t.nodeType&&0!==e.trim(t.nodeValue).length)return void(n?c.setStart(t,0):c.setEnd(t,t.nodeValue.length));if("BR"==t.nodeName)return void(n?c.setStartBefore(t):c.setEndBefore(t))}while(t=n?o.next():o.prev())}var i,a=this,s=a.dom,c=s.createRng();return t&&(i=s.nodeIndex(t),c.setStart(t.parentNode,i),c.setEnd(t.parentNode,i+1),n&&(o(t,1),o(t)),a.setRng(c)),t},isCollapsed:function(){var e=this,t=e.getRng(),n=e.getSel();return!t||t.item?!1:t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!n||t.collapsed},collapse:function(e){var t,n=this,o=n.getRng();o.item&&(t=o.item(0),o=n.win.document.body.createTextRange(),o.moveToElementText(t)),o.collapse(!!e),n.setRng(o)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selection},getRng:function(t){var n,o,r,i=this,a=i.win.document;if(t&&i.tridentSel)return i.tridentSel.getRangeAt(0);try{(n=i.getSel())&&(o=n.rangeCount>0?n.getRangeAt(0):n.createRange?n.createRange():a.createRange())}catch(s){}return e.isIE&&!e.isIE11&&o&&o.setStart&&a.selection.createRange().item&&(r=a.selection.createRange().item(0),o=a.createRange(),o.setStartBefore(r),o.setEndAfter(r)),o||(o=a.createRange?a.createRange():a.body.createTextRange()),o.setStart&&9===o.startContainer.nodeType&&o.collapsed&&(r=i.dom.getRoot(),o.setStart(r,0),o.setEnd(r,0)),i.selectedRange&&i.explicitRange&&(0===o.compareBoundaryPoints(o.START_TO_START,i.selectedRange)&&0===o.compareBoundaryPoints(o.END_TO_END,i.selectedRange)?o=i.explicitRange:(i.selectedRange=null,i.explicitRange=null)),o},setRng:function(e,t){var n,o=this;if(o.tridentSel){if(e.cloneRange)try{return void o.tridentSel.addRange(e)}catch(r){}try{e.select()}catch(r){}}else if(n=o.getSel()){o.explicitRange=e;try{n.removeAllRanges()}catch(r){}n.addRange(e),t===!1&&n.extend&&(n.collapse(e.endContainer,e.endOffset),n.extend(e.startContainer,e.startOffset)),o.selectedRange=n.rangeCount>0?n.getRangeAt(0):null}},setNode:function(e){var t=this;return t.setContent(t.dom.getOuterHTML(e)),e},getNode:function(){function e(e,t){for(var n=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}var t,n=this,o=n.getRng(),r=(n.getSel(),o.startContainer),i=o.endContainer;return o?o.setStart?(t=o.commonAncestorContainer,!o.collapsed&&(o.startContainer==o.endContainer&&o.endOffset-o.startOffset<2&&o.startContainer.hasChildNodes()&&(t=o.startContainer.childNodes[o.startOffset]),3===r.nodeType&&3===i.nodeType&&(r=r.length===o.startOffset?e(r.nextSibling,!0):r.parentNode,i=0===o.endOffset?e(i.previousSibling,!1):i.parentNode,r&&r===i))?r:t&&3==t.nodeType?t.parentNode:t):o.item?o.item(0):o.parentElement():n.dom.getRoot()},getSelectedBlocks:function(e,t){var n,o,i,a=this,s=a.dom,c=[];if(n=s.getParent(e||a.getStart(),s.isBlock),o=s.getParent(t||a.getEnd(),s.isBlock),n&&c.push(n),n&&o&&n!=o){i=n;for(var d=new r(n,s.getRoot());(i=d.next())&&i!=o;)s.isBlock(i)&&c.push(i)}return o&&n!=o&&c.push(o),c},isForward:function(){var e,t,n=this.dom,o=this.getSel();return o&&null!=o.anchorNode&&null!=o.focusNode?(e=n.createRng(),e.setStart(o.anchorNode,o.anchorOffset),e.collapse(!0),t=n.createRng(),t.setStart(o.focusNode,o.focusOffset),t.collapse(!0),e.compareBoundaryPoints(e.START_TO_START,t)<=0):!0},normalize:function(){function t(e){function t(e,t){for(var n=new r(e,m.getParent(e.parentNode,m.isBlock)||h);e=n[t?"prev":"next"]();)if("BR"===e.nodeName)return!0}function s(e,t){var n,a;for(t=t||c,n=new r(t,m.getParent(t.parentNode,m.isBlock)||h);u=n[e?"prev":"next"]();){if(3===u.nodeType&&u.nodeValue.length>0)return c=u,d=e?u.nodeValue.length:0,void(o=!0);if(m.isBlock(u)||f[u.nodeName.toLowerCase()])return;a=u}i&&a&&(c=a,o=!0,d=0)}var c,d,l,u,f,p,m=a.dom,h=m.getRoot();if(c=n[(e?"start":"end")+"Container"],d=n[(e?"start":"end")+"Offset"],f=m.schema.getNonEmptyElements(),9===c.nodeType&&(c=m.getRoot(),d=0),c===h){if(e&&(u=c.childNodes[d>0?d-1:0],u&&(p=u.nodeName.toLowerCase(),f[u.nodeName]||"TABLE"==u.nodeName)))return;if(c.hasChildNodes()&&(c=c.childNodes[Math.min(!e&&d>0?d-1:d,c.childNodes.length-1)],d=0,c.hasChildNodes()&&!/TABLE/.test(c.nodeName))){u=c,l=new r(c,h);do{if(3===u.nodeType&&u.nodeValue.length>0){d=e?0:u.nodeValue.length,c=u,o=!0;break}if(f[u.nodeName.toLowerCase()]){d=m.nodeIndex(u),c=u.parentNode,"IMG"!=u.nodeName||e||d++,o=!0;break}}while(u=e?l.next():l.prev())}}i&&(3===c.nodeType&&0===d&&s(!0),1===c.nodeType&&(u=c.childNodes[d],!u||"BR"!==u.nodeName||t(u)||t(u,!0)||s(!0,c.childNodes[d]))),e&&!i&&3===c.nodeType&&d===c.nodeValue.length&&s(!1),o&&n["set"+(e?"Start":"End")](c,d)}var n,o,i,a=this;e.isIE||(n=a.getRng(),i=n.collapsed,t(!0),i||t(),o&&(i&&n.collapse(!0),a.setRng(n,a.isForward())))},selectorChanged:function(e,t){var n,r=this;return r.selectorChangedData||(r.selectorChangedData={},n={},r.editor.onNodeChange.addToTop(function(e,t,i){var a=r.dom,s=a.getParents(i,null,a.getRoot()),c={};o(r.selectorChangedData,function(e,t){o(s,function(r){return a.is(r,t)?(n[t]||(o(e,function(e){e(!0,{node:r,selector:t,parents:s})}),n[t]=e),c[t]=e,!1):void 0})}),o(n,function(e,t){c[t]||(delete n[t],o(e,function(e){e(!1,{node:i,selector:t,parents:s})}))})})),r.selectorChangedData[e]||(r.selectorChangedData[e]=[]),r.selectorChangedData[e].push(t),r},scrollIntoView:function(e){var t,n,o=this,r=o.dom;n=r.getViewPort(o.editor.getWin()),t=r.getPos(e).y,(t<n.y||t+25>n.y+n.h)&&o.editor.getWin().scrollTo(0,t<n.y?t:t-n.h+25)},destroy:function(t){var n=this;n.win=null,t||e.removeUnload(n.destroy)},_fixIESelection:function(){function e(e,t){var n=c.createTextRange();try{n.moveToPoint(e,t)}catch(o){n=null}return n}function t(t){var o;t.button?(o=e(t.x,t.y),o&&(o.compareEndPoints("StartToStart",r)>0?o.setEndPoint("StartToStart",r):o.setEndPoint("EndToEnd",r),o.select())):n()}function n(){var e=s.selection.createRange();r&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&r.select(),a.unbind(s,"mouseup",n),a.unbind(s,"mousemove",t),r=o=0}var o,r,i,a=this.dom,s=a.doc,c=s.body;s.documentElement.unselectable=!0,a.bind(s,["mousedown","contextmenu"],function(c){if("HTML"===c.target.nodeName){if(o&&n(),i=s.documentElement,i.scrollHeight>i.clientHeight)return;o=1,r=e(c.x,c.y),r&&(a.bind(s,"mouseup",n),a.bind(s,"mousemove",t),a.win.focus(),r.select())}})}})}(tinymce),function(e){e.dom.Serializer=function(t,n,o){var r,i,a,s=e.isIE,c=e.each;return t.apply_source_formatting||(t.indent=!1),n=n||e.DOM,o=o||new e.html.Schema(t),t.entity_encoding=t.entity_encoding||"named",t.remove_trailing_brs="remove_trailing_brs"in t?t.remove_trailing_brs:!0,r=new e.util.Dispatcher(self),i=new e.util.Dispatcher(self),a=new e.html.DomParser(t,o),a.addAttributeFilter("src,href,style",function(e,o){for(var r,i,a,s=e.length,c="data-mce-"+o,d=t.url_converter,l=t.url_converter_scope;s--;)r=e[s],i=r.attributes.map[c],i!==a?(r.attr(o,i.length>0?i:null),r.attr(c,null)):(i=r.attributes.map[o],"style"===o?i=n.serializeStyle(n.parseStyle(i),r.name):d&&(i=d.call(l,i,o,r.name)),r.attr(o,i.length>0?i:null))}),a.addAttributeFilter("class",function(e){for(var t,n,o=e.length;o--;)t=e[o],n=t.attr("class").replace(/(?:^|\s)mce(Item\w+|Selected)(?!\S)/g,""),t.attr("class",n.length>0?n:null)}),a.addAttributeFilter("data-mce-type",function(e,t,n){for(var o,r=e.length;r--;)o=e[r],"bookmark"!==o.attributes.map["data-mce-type"]||n.cleanup||o.remove()}),a.addAttributeFilter("data-mce-expando",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),a.addNodeFilter("noscript",function(t){for(var n,o=t.length;o--;)n=t[o].firstChild,n&&(n.value=e.html.Entities.decode(n.value))}),a.addNodeFilter("script,style",function(e,t){function n(e){return e.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,"")}for(var o,r,i=e.length;i--;)o=e[i],r=o.firstChild?o.firstChild.value:"","script"===t?(o.attr("type",(o.attr("type")||"text/javascript").replace(/^mce\-/,"")),r.length>0&&(o.firstChild.value="// <![CDATA[\n"+n(r)+"\n// ]]>")):r.length>0&&(o.firstChild.value="<!--\n"+n(r)+"\n-->")}),a.addNodeFilter("#comment",function(e){for(var t,n=e.length;n--;)t=e[n],0===t.value.indexOf("[CDATA[")?(t.name="#cdata",t.type=4,t.value=t.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===t.value.indexOf("mce:protected ")&&(t.name="#text",t.type=3,t.raw=!0,t.value=unescape(t.value).substr(14))}),a.addNodeFilter("xml:namespace,input",function(e,t){for(var n,o=e.length;o--;)n=e[o],7===n.type?n.remove():1===n.type&&("input"!==t||"type"in n.attributes.map||n.attr("type","text"))}),t.fix_list_elements&&a.addNodeFilter("ul,ol",function(e){for(var t,n,o=e.length;o--;)t=e[o],n=t.parent,("ul"===n.name||"ol"===n.name)&&t.prev&&"li"===t.prev.name&&t.prev.append(t)}),a.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),{schema:o,addNodeFilter:a.addNodeFilter,addAttributeFilter:a.addAttributeFilter,onPreProcess:r,onPostProcess:i,serialize:function(d,l){var u,f,p,m,h;return s&&n.select("script,style,select,map").length>0?(h=d.innerHTML,d=d.cloneNode(!1),n.setHTML(d,h)):d=d.cloneNode(!0),u=d.ownerDocument.implementation,u.createHTMLDocument&&(f=u.createHTMLDocument(""),c("BODY"==d.nodeName?d.childNodes:[d],function(e){f.body.appendChild(f.importNode(e,!0))}),d="BODY"!=d.nodeName?f.body.firstChild:f.body,p=n.doc,n.doc=f),l=l||{},l.format=l.format||"html",l.no_events||(l.node=d,r.dispatch(self,l)),m=new e.html.Serializer(t,o),l.content=m.serialize(a.parse(e.trim(l.getInner?d.innerHTML:n.getOuterHTML(d)),l)),l.cleanup||(l.content=l.content.replace(/\uFEFF/g,"")),l.no_events||i.dispatch(self,l),p&&(n.doc=p),l.node=null,l.content},addRules:function(e){o.addValidElements(e)},setRules:function(e){o.setValidElements(e)
}}}}(tinymce),function(e){e.dom.ScriptLoader=function(){function t(t,n){function o(){d.remove(c),i&&(i.onreadystatechange=i.onload=i=null),n()}function r(){"undefined"!=typeof console&&console.log&&console.log("Failed to load: "+t)}var i,a,s,c,d=e.DOM;return c=d.uniqueId(),e.isIE6&&(a=new e.util.URI(t),s=location,a.host==s.hostname&&a.port==s.port&&a.protocol+":"==s.protocol&&"file"!=a.protocol.toLowerCase())?void e.util.XHR.send({url:e._addVer(a.getURI()),success:function(e){var t=d.create("script",{type:"text/javascript"});t.text=e,document.getElementsByTagName("head")[0].appendChild(t),d.remove(t),o()},error:r}):(i=document.createElement("script"),i.id=c,i.type="text/javascript",i.src=e._addVer(t),(!e.isIE||e.isIE11)&&(i.onload=o),i.onerror=r,e.isOpera||(i.onreadystatechange=function(){var e=i.readyState;("complete"==e||"loaded"==e)&&o()}),void(document.getElementsByTagName("head")[0]||document.body).appendChild(i))}var n,o=0,r=1,i=2,a={},s=[],c={},d=[],l=0;this.isDone=function(e){return a[e]==i},this.markDone=function(e){a[e]=i},this.add=this.load=function(e,t,r){var i=a[e];i==n&&(s.push(e),a[e]=o),t&&(c[e]||(c[e]=[]),c[e].push({func:t,scope:r||this}))},this.loadQueue=function(e,t){this.loadScripts(s,e,t)},this.loadScripts=function(o,s,u){function f(t){e.each(c[t],function(e){e.func.call(e.scope)}),c[t]=n}var p;d.push({func:s,scope:u||this}),(p=function(){var n=e.grep(o);o.length=0,e.each(n,function(e){return a[e]==i?void f(e):void(a[e]!=r&&(a[e]=r,l++,t(e,function(){a[e]=i,l--,f(e),p()})))}),l||(e.each(d,function(e){e.func.call(e.scope)}),d.length=0)})()}},e.ScriptLoader=new e.dom.ScriptLoader}(tinymce),function(e){e.dom.RangeUtils=function(t){this.walk=function(n,o){function r(e){var t;return t=e[0],3===t.nodeType&&t===h&&g>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===y&&e.length>0&&t===v&&3===t.nodeType&&e.splice(e.length-1,1),e}function i(e,t,n){for(var o=[];e&&e!=n;e=e[t])o.push(e);return o}function a(e,t){do{if(e.parentNode==t)return e;e=e.parentNode}while(e)}function s(e,t,n){var a=n?"nextSibling":"previousSibling";for(u=e,f=u.parentNode;u&&u!=t;u=f)f=u.parentNode,p=i(u==e?u:u[a],a),p.length&&(n||p.reverse(),o(r(p)))}var c,d,l,u,f,p,m,h=n.startContainer,g=n.startOffset,v=n.endContainer,y=n.endOffset;if(m=t.select("td.mceSelected,th.mceSelected"),m.length>0)return void e.each(m,function(e){o([e])});if(1==h.nodeType&&h.hasChildNodes()&&(h=h.childNodes[g]),1==v.nodeType&&v.hasChildNodes()&&(v=v.childNodes[Math.min(y-1,v.childNodes.length-1)]),h==v)return o(r([h]));for(c=t.findCommonAncestor(h,v),u=h;u;u=u.parentNode){if(u===v)return s(h,c,!0);if(u===c)break}for(u=v;u;u=u.parentNode){if(u===h)return s(v,c);if(u===c)break}d=a(h,c)||h,l=a(v,c)||v,s(h,d,!0),p=i(d==h?d:d.nextSibling,"nextSibling",l==v?l.nextSibling:l),p.length&&o(r(p)),s(v,l)},this.split=function(e){function t(e,t){return e.splitText(t)}var n=e.startContainer,o=e.startOffset,r=e.endContainer,i=e.endOffset;return n==r&&3==n.nodeType?o>0&&o<n.nodeValue.length&&(r=t(n,o),n=r.previousSibling,i>o?(i-=o,n=r=t(r,i).previousSibling,i=r.nodeValue.length,o=0):i=0):(3==n.nodeType&&o>0&&o<n.nodeValue.length&&(n=t(n,o),o=0),3==r.nodeType&&i>0&&i<r.nodeValue.length&&(r=t(r,i).previousSibling,i=r.nodeValue.length)),{startContainer:n,startOffset:o,endContainer:r,endOffset:i}}},e.dom.RangeUtils.compareRanges=function(e,t){if(e&&t){if(!e.item&&!e.duplicate)return e.startContainer==t.startContainer&&e.startOffset==t.startOffset;if(e.item&&t.item&&e.item(0)===t.item(0))return!0;if(e.isEqual&&t.isEqual&&t.isEqual(e))return!0}return!1}}(tinymce),function(e){var t=e.dom.Event,n=e.each;e.create("tinymce.ui.KeyboardNavigation",{KeyboardNavigation:function(o,r){var i,a,s,c,d,l=this,u=o.root,f=o.items,p=o.enableUpDown,m=o.enableLeftRight||!o.enableUpDown,h=o.excludeFromTabOrder;r=r||e.DOM,i=function(e){d=e.target.id},a=function(e){r.setAttrib(e.target.id,"tabindex","-1")},c=function(){var e=r.get(d);r.setAttrib(e,"tabindex","0"),e.focus()},l.focus=function(){r.get(d).focus()},l.destroy=function(){n(f,function(e){var t=r.get(e.id);r.unbind(t,"focus",i),r.unbind(t,"blur",a)});var e=r.get(u);r.unbind(e,"focus",c),r.unbind(e,"keydown",s),f=r=u=l.focus=i=a=s=c=null,l.destroy=function(){}},l.moveFocus=function(e,i){{var a,s=-1;l.controls}d&&(n(f,function(e,t){return e.id===d?(s=t,!1):void 0}),s+=e,0>s?s=f.length-1:s>=f.length&&(s=0),a=f[s],r.setAttrib(d,"tabindex","-1"),r.setAttrib(a.id,"tabindex","0"),r.get(a.id).focus(),o.actOnFocus&&o.onAction(a.id),i&&t.cancel(i))},s=function(e){var n=37,r=39,i=38,a=40,s=27,c=14,u=13,f=32;switch(e.keyCode){case n:m&&l.moveFocus(-1),t.cancel(e);break;case r:m&&l.moveFocus(1),t.cancel(e);break;case i:p&&l.moveFocus(-1),t.cancel(e);break;case a:p&&l.moveFocus(1),t.cancel(e);break;case s:o.onCancel&&(o.onCancel(),t.cancel(e));break;case c:case u:case f:o.onAction&&(o.onAction(d),t.cancel(e))}},n(f,function(e,t){var n,o;e.id||(e.id=r.uniqueId("_mce_item_")),o=r.get(e.id),h?(r.bind(o,"blur",a),n="-1"):n=0===t?"0":"-1",o.setAttribute("tabindex",n),r.bind(o,"focus",i)}),f[0]&&(d=f[0].id),r.setAttrib(u,"tabindex","-1");var g=r.get(u);r.bind(g,"focus",c),r.bind(g,"keydown",s)}})}(tinymce),function(e){var t=e.DOM,n=e.is;e.create("tinymce.ui.Control",{Control:function(t,n,o){this.id=t,this.settings=n=n||{},this.rendered=!1,this.onRender=new e.util.Dispatcher(this),this.classPrefix="",this.scope=n.scope||this,this.disabled=0,this.active=0,this.editor=o},setAriaProperty:function(e,n){var o=t.get(this.id+"_aria")||t.get(this.id);o&&t.setAttrib(o,"aria-"+e,!!n)},focus:function(){t.get(this.id).focus()},setDisabled:function(e){e!=this.disabled&&(this.setAriaProperty("disabled",e),this.setState("Disabled",e),this.setState("Enabled",!e),this.disabled=e)},isDisabled:function(){return this.disabled},setActive:function(e){e!=this.active&&(this.setState("Active",e),this.active=e,this.setAriaProperty("pressed",e))},isActive:function(){return this.active},setState:function(e,n){var o=t.get(this.id);e=this.classPrefix+e,n?t.addClass(o,e):t.removeClass(o,e)},isRendered:function(){return this.rendered},renderHTML:function(){},renderTo:function(e){t.setHTML(e,this.renderHTML())},postRender:function(){var e,t=this;n(t.disabled)&&(e=t.disabled,t.disabled=-1,t.setDisabled(e)),n(t.active)&&(e=t.active,t.active=-1,t.setActive(e))},remove:function(){t.remove(this.id),this.destroy()},destroy:function(){e.dom.Event.clear(this.id)}})}(tinymce),tinymce.create("tinymce.ui.Container:tinymce.ui.Control",{Container:function(e,t,n){this.parent(e,t,n),this.controls=[],this.lookup={}},add:function(e){return this.lookup[e.id]=e,this.controls.push(e),e},get:function(e){return this.lookup[e]}}),tinymce.create("tinymce.ui.Separator:tinymce.ui.Control",{Separator:function(e,t){this.parent(e,t),this.classPrefix="mceSeparator",this.setDisabled(!0)},renderHTML:function(){return tinymce.DOM.createHTML("span",{"class":this.classPrefix,role:"separator","aria-orientation":"vertical",tabindex:"-1"})}}),function(e){{var t=e.is;e.DOM,e.each,e.walk}e.create("tinymce.ui.MenuItem:tinymce.ui.Control",{MenuItem:function(e,t){this.parent(e,t),this.classPrefix="mceMenuItem"},setSelected:function(e){this.setState("Selected",e),this.setAriaProperty("checked",!!e),this.selected=e},isSelected:function(){return this.selected},postRender:function(){var e=this;e.parent(),t(e.selected)&&e.setSelected(e.selected)}})}(tinymce),function(e){var t=(e.is,e.DOM),n=(e.each,e.walk);e.create("tinymce.ui.Menu:tinymce.ui.MenuItem",{Menu:function(t,n){var o=this;o.parent(t,n),o.items={},o.collapsed=!1,o.menuCount=0,o.onAddItem=new e.util.Dispatcher(this)},expand:function(e){var t=this;e&&n(t,function(e){e.expand&&e.expand()},"items",t),t.collapsed=!1},collapse:function(e){var t=this;e&&n(t,function(e){e.collapse&&e.collapse()},"items",t),t.collapsed=!0},isCollapsed:function(){return this.collapsed},add:function(n){return n.settings||(n=new e.ui.MenuItem(n.id||t.uniqueId(),n)),this.onAddItem.dispatch(this,n),this.items[n.id]=n},addSeparator:function(){return this.add({separator:!0})},addMenu:function(e){return e.collapse||(e=this.createMenu(e)),this.menuCount++,this.add(e)},hasMenus:function(){return 0!==this.menuCount},remove:function(e){delete this.items[e.id]},removeAll:function(){var e=this;n(e,function(e){e.removeAll?e.removeAll():e.remove(),e.destroy()},"items",e),e.items={}},createMenu:function(n){var o=new e.ui.Menu(n.id||t.uniqueId(),n);return o.onAddItem.add(this.onAddItem.dispatch,this.onAddItem),o}})}(tinymce),function(e){var t=e.is,n=e.DOM,o=e.each,r=e.dom.Event,i=e.dom.Element;e.create("tinymce.ui.DropMenu:tinymce.ui.Menu",{DropMenu:function(o,r){r=r||{},r.container=r.container||n.doc.body,r.offset_x=r.offset_x||0,r.offset_y=r.offset_y||0,r.vp_offset_x=r.vp_offset_x||0,r.vp_offset_y=r.vp_offset_y||0,t(r.icons)&&!r.icons&&(r["class"]+=" mceNoIcons"),this.parent(o,r),this.onShowMenu=new e.util.Dispatcher(this),this.onHideMenu=new e.util.Dispatcher(this),this.classPrefix="mceMenu"},createMenu:function(t){var o,r=this,i=r.settings;return t.container=t.container||i.container,t.parent=r,t.constrain=t.constrain||i.constrain,t["class"]=t["class"]||i["class"],t.vp_offset_x=t.vp_offset_x||i.vp_offset_x,t.vp_offset_y=t.vp_offset_y||i.vp_offset_y,t.keyboard_focus=i.keyboard_focus,o=new e.ui.DropMenu(t.id||n.uniqueId(),t),o.onAddItem.add(r.onAddItem.dispatch,r.onAddItem),o},focus:function(){var e=this;e.keyboardNav&&e.keyboardNav.focus()},update:function(){var e,t,o=this,r=o.settings,i=n.get("menu_"+o.id+"_tbl"),a=n.get("menu_"+o.id+"_co");e=r.max_width?Math.min(i.offsetWidth,r.max_width):i.offsetWidth,t=r.max_height?Math.min(i.offsetHeight,r.max_height):i.offsetHeight,o.element.setStyles(n.boxModel?{width:e,height:t}:{width:e+2,height:t+2}),r.max_width&&n.setStyle(a,"width",e),r.max_height&&(n.setStyle(a,"height",t),i.clientHeight<r.max_height&&n.setStyle(a,"overflow","hidden"))},showMenu:function(t,a,s){var c,d,l,u,f,p,m=this,h=m.settings,g=n.getViewPort(),v=2,y=m.classPrefix;m.collapse(1),m.isMenuVisible||(m.rendered?c=n.get("menu_"+m.id):(c=n.add(m.settings.container,m.renderNode()),o(m.items,function(e){e.postRender()}),m.element=new i("menu_"+m.id,{blocker:1,container:h.container})),e.isOpera||n.setStyles(c,{left:-65535,top:-65535}),n.show(c),m.update(),t+=h.offset_x||0,a+=h.offset_y||0,g.w-=4,g.h-=4,h.constrain&&(d=c.clientWidth-v,l=c.clientHeight-v,u=g.x+g.w,f=g.y+g.h,t+h.vp_offset_x+d>u&&(t=s?s-d:Math.max(0,u-h.vp_offset_x-d)),a+h.vp_offset_y+l>f&&(a=Math.max(0,f-h.vp_offset_y-l))),n.setStyles(c,{left:t,top:a}),m.element.update(),m.isMenuVisible=1,m.mouseClickFunc=r.add(c,"click",function(e){var t;if(e=e.target,e&&(e=n.getParent(e,"tr"))&&!n.hasClass(e,y+"ItemSub")){if(t=m.items[e.id],t.isDisabled())return;for(p=m;p;)p.hideMenu&&p.hideMenu(),p=p.settings.parent;return t.settings.onclick&&t.settings.onclick(e),!1}}),m.hasMenus()&&(m.mouseOverFunc=r.add(c,"mouseover",function(e){var t,o;if(e=e.target,e&&(e=n.getParent(e,"tr"))){if(t=m.items[e.id],m.lastMenu&&m.lastMenu.collapse(1),t.isDisabled())return;e&&n.hasClass(e,y+"ItemSub")&&(o=n.getRect(e),t.showMenu(o.x+o.w-v,o.y-v,o.x),m.lastMenu=t,n.addClass(n.get(t.id).firstChild,y+"ItemActive"))}})),r.add(c,"keydown",m._keyHandler,m),m.onShowMenu.dispatch(m),h.keyboard_focus&&m._setupKeyboardNav())},hideMenu:function(e){var t,o=this,i=n.get("menu_"+o.id);o.isMenuVisible&&(o.keyboardNav&&o.keyboardNav.destroy(),r.remove(i,"mouseover",o.mouseOverFunc),r.remove(i,"click",o.mouseClickFunc),r.remove(i,"keydown",o._keyHandler),n.hide(i),o.isMenuVisible=0,e||o.collapse(1),o.element&&o.element.hide(),(t=n.get(o.id))&&n.removeClass(t.firstChild,o.classPrefix+"ItemActive"),o.onHideMenu.dispatch(o))},add:function(e){var t,o=this;return e=o.parent(e),o.isRendered&&(t=n.get("menu_"+o.id))&&o._add(n.select("tbody",t)[0],e),e},collapse:function(e){this.parent(e),this.hideMenu(1)},remove:function(e){return n.remove(e.id),this.destroy(),this.parent(e)},destroy:function(){var e=this,t=n.get("menu_"+e.id);e.keyboardNav&&e.keyboardNav.destroy(),r.remove(t,"mouseover",e.mouseOverFunc),r.remove(n.select("a",t),"focus",e.mouseOverFunc),r.remove(t,"click",e.mouseClickFunc),r.remove(t,"keydown",e._keyHandler),e.element&&e.element.remove(),n.remove(t)},renderNode:function(){var e,t,r,a,s=this,c=s.settings;return a=n.create("div",{role:"listbox",id:"menu_"+s.id,"class":c["class"],style:"position:absolute;left:0;top:0;z-index:200000;outline:0"}),s.settings.parent&&n.setAttrib(a,"aria-parent","menu_"+s.settings.parent.id),r=n.add(a,"div",{role:"presentation",id:"menu_"+s.id+"_co","class":s.classPrefix+(c["class"]?" "+c["class"]:"")}),s.element=new i("menu_"+s.id,{blocker:1,container:c.container}),c.menu_line&&n.add(r,"span",{"class":s.classPrefix+"Line"}),e=n.add(r,"table",{role:"presentation",id:"menu_"+s.id+"_tbl",border:0,cellPadding:0,cellSpacing:0}),t=n.add(e,"tbody"),o(s.items,function(e){s._add(t,e)}),s.rendered=!0,a},_setupKeyboardNav:function(){var t,o,r=this;t=n.get("menu_"+r.id),o=n.select("a[role=option]","menu_"+r.id),o.splice(0,0,t),r.keyboardNav=new e.ui.KeyboardNavigation({root:"menu_"+r.id,items:o,onCancel:function(){r.hideMenu()},enableUpDown:!0}),t.focus()},_keyHandler:function(e){var t=this;switch(e.keyCode){case 37:t.settings.parent&&(t.hideMenu(),t.settings.parent.focus(),r.cancel(e));break;case 39:t.mouseOverFunc&&t.mouseOverFunc(e)}},_add:function(e,t){var o,r,i,a,s,c=t.settings,d=this.classPrefix;return c.separator?(i=n.add(e,"tr",{id:t.id,"class":d+"ItemSeparator"}),n.add(i,"td",{"class":d+"ItemSeparator"}),void((o=i.previousSibling)&&n.addClass(o,"mceLast"))):(o=i=n.add(e,"tr",{id:t.id,"class":d+"Item "+d+"ItemEnabled"}),o=a=n.add(o,c.titleItem?"th":"td"),o=r=n.add(o,"a",{id:t.id+"_aria",role:c.titleItem?"presentation":"option",href:"javascript:;",onclick:"return false;",onmousedown:"return false;"}),c.parent&&(n.setAttrib(r,"aria-haspopup","true"),n.setAttrib(r,"aria-owns","menu_"+t.id)),n.addClass(a,c["class"]),s=n.add(o,"span",{"class":"mceIcon"+(c.icon?" mce_"+c.icon:"")}),c.icon_src&&n.add(s,"img",{src:c.icon_src}),o=n.add(o,c.element||"span",{"class":"mceText",title:t.settings.title},t.settings.title),t.settings.style&&("function"==typeof t.settings.style&&(t.settings.style=t.settings.style()),n.setAttrib(o,"style",t.settings.style)),1==e.childNodes.length&&n.addClass(i,"mceFirst"),(o=i.previousSibling)&&n.hasClass(o,d+"ItemSeparator")&&n.addClass(i,"mceFirst"),t.collapse&&n.addClass(i,d+"ItemSub"),(o=i.previousSibling)&&n.removeClass(o,"mceLast"),void n.addClass(i,"mceLast"))}})}(tinymce),function(e){var t=e.DOM;e.create("tinymce.ui.Button:tinymce.ui.Control",{Button:function(e,t,n){this.parent(e,t,n),this.classPrefix="mceButton"},renderHTML:function(){var e,n,o=this.classPrefix,r=this.settings;return n=t.encode(r.label||""),e='<a role="button" id="'+this.id+'" href="javascript:;" class="'+o+" "+o+"Enabled "+r["class"]+(n?" "+o+"Labeled":"")+'" onmousedown="return false;" onclick="return false;" aria-labelledby="'+this.id+'_voice" title="'+t.encode(r.title)+'">',e+=!r.image||this.editor&&this.editor.forcedHighContrastMode?'<span class="mceIcon '+r["class"]+'"></span>'+(n?'<span class="'+o+'Label">'+n+"</span>":""):'<span class="mceIcon '+r["class"]+'"><img class="mceIcon" src="'+r.image+'" alt="'+t.encode(r.title)+'" /></span>'+(n?'<span class="'+o+'Label">'+n+"</span>":""),e+='<span class="mceVoiceLabel mceIconOnly" style="display: none;" id="'+this.id+'_voice">'+r.title+"</span>",e+="</a>"},postRender:function(){var t,n=this,o=n.settings;e.isIE&&n.editor&&e.dom.Event.add(n.id,"mousedown",function(){var e=n.editor.selection.getNode().nodeName;t="IMG"===e?n.editor.selection.getBookmark():null}),e.dom.Event.add(n.id,"click",function(r){return n.isDisabled()?void 0:(e.isIE&&n.editor&&null!==t&&n.editor.selection.moveToBookmark(t),o.onclick.call(o.scope,r))}),e.dom.Event.add(n.id,"keydown",function(t){return n.isDisabled()||t.keyCode!=e.VK.SPACEBAR?void 0:(e.dom.Event.cancel(t),o.onclick.call(o.scope,t))})}})}(tinymce),function(e){var t,n=e.DOM,o=e.dom.Event,r=e.each,i=e.util.Dispatcher;e.create("tinymce.ui.ListBox:tinymce.ui.Control",{ListBox:function(t,n,o){var r=this;r.parent(t,n,o),r.items=[],r.onChange=new i(r),r.onPostRender=new i(r),r.onAdd=new i(r),r.onRenderMenu=new e.util.Dispatcher(this),r.classPrefix="mceListBox",r.marked={}},select:function(e){var n,o,i=this;return i.marked={},e==t?i.selectByIndex(-1):(o=e&&"function"==typeof e?e:function(t){return t==e},void(e!=i.selectedValue&&(r(i.items,function(e,t){return o(e.value)?(n=1,i.selectByIndex(t),!1):void 0}),n||i.selectByIndex(-1))))},selectByIndex:function(e){var t,o,r,i=this;i.marked={},e!=i.selectedIndex&&(t=n.get(i.id+"_text"),r=n.get(i.id+"_voiceDesc"),o=i.items[e],o?(i.selectedValue=o.value,i.selectedIndex=e,n.setHTML(t,n.encode(o.title)),n.setHTML(r,i.settings.title+" - "+o.title),n.removeClass(t,"mceTitle"),n.setAttrib(i.id,"aria-valuenow",o.title)):(n.setHTML(t,n.encode(i.settings.title)),n.setHTML(r,n.encode(i.settings.title)),n.addClass(t,"mceTitle"),i.selectedValue=i.selectedIndex=null,n.setAttrib(i.id,"aria-valuenow",i.settings.title)),t=0)},mark:function(e){this.marked[e]=!0},add:function(t,n,o){var r=this;o=o||{},o=e.extend(o,{title:t,value:n}),r.items.push(o),r.onAdd.dispatch(r,o)},getLength:function(){return this.items.length},renderHTML:function(){var e="",t=this,o=t.settings,r=t.classPrefix;return e='<span role="listbox" aria-haspopup="true" aria-labelledby="'+t.id+'_voiceDesc" aria-describedby="'+t.id+'_voiceDesc"><table role="presentation" tabindex="0" id="'+t.id+'" cellpadding="0" cellspacing="0" class="'+r+" "+r+"Enabled"+(o["class"]?" "+o["class"]:"")+'"><tbody><tr>',e+="<td>"+n.createHTML("span",{id:t.id+"_voiceDesc","class":"voiceLabel",style:"display:none;"},t.settings.title),e+=n.createHTML("a",{id:t.id+"_text",tabindex:-1,href:"javascript:;","class":"mceText",onclick:"return false;",onmousedown:"return false;"},n.encode(t.settings.title))+"</td>",e+="<td>"+n.createHTML("a",{id:t.id+"_open",tabindex:-1,href:"javascript:;","class":"mceOpen",onclick:"return false;",onmousedown:"return false;"},'<span><span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25bc</span></span>')+"</td>",e+="</tr></tbody></table></span>"},showMenu:function(){var t,i,a=this,s=n.get(this.id);if(!a.isDisabled()&&0!==a.items.length){if(a.menu&&a.menu.isMenuVisible)return a.hideMenu();a.isMenuRendered||(a.renderMenu(),a.isMenuRendered=!0),t=n.getPos(s),i=a.menu,i.settings.offset_x=t.x,i.settings.offset_y=t.y,i.settings.keyboard_focus=!e.isOpera,r(a.items,function(e){i.items[e.id]&&i.items[e.id].setSelected(0)}),r(a.items,function(e){i.items[e.id]&&a.marked[e.value]&&i.items[e.id].setSelected(1),e.value===a.selectedValue&&i.items[e.id].setSelected(1)}),i.showMenu(0,s.clientHeight),o.add(n.doc,"mousedown",a.hideMenu,a),n.addClass(a.id,a.classPrefix+"Selected")}},hideMenu:function(e){var t=this;if(t.menu&&t.menu.isMenuVisible){if(n.removeClass(t.id,t.classPrefix+"Selected"),e&&"mousedown"==e.type&&(e.target.id==t.id+"_text"||e.target.id==t.id+"_open"))return;e&&n.getParent(e.target,".mceMenu")||(n.removeClass(t.id,t.classPrefix+"Selected"),o.remove(n.doc,"mousedown",t.hideMenu,t),t.menu.hideMenu())}},renderMenu:function(){var e,o=this;e=o.settings.control_manager.createDropMenu(o.id+"_menu",{menu_line:1,"class":o.classPrefix+"Menu mceNoIcons",max_width:250,max_height:150}),e.onHideMenu.add(function(){o.hideMenu(),o.focus()}),e.add({title:o.settings.title,"class":"mceMenuItemTitle",onclick:function(){o.settings.onselect("")!==!1&&o.select("")}}),r(o.items,function(r){r.value===t?e.add({title:r.title,role:"option","class":"mceMenuItemTitle",onclick:function(){o.settings.onselect("")!==!1&&o.select("")}}):(r.id=n.uniqueId(),r.role="option",r.onclick=function(){o.settings.onselect(r.value)!==!1&&o.select(r.value)},e.add(r))}),o.onRenderMenu.dispatch(o,e),o.menu=e},postRender:function(){var t=this,r=t.classPrefix;o.add(t.id,"click",t.showMenu,t),o.add(t.id,"keydown",function(e){32==e.keyCode&&(t.showMenu(e),o.cancel(e))}),o.add(t.id,"focus",function(){t._focused||(t.keyDownHandler=o.add(t.id,"keydown",function(e){40==e.keyCode&&(t.showMenu(),o.cancel(e))}),t.keyPressHandler=o.add(t.id,"keypress",function(e){var n;13==e.keyCode&&(n=t.selectedValue,t.selectedValue=null,o.cancel(e),t.settings.onselect(n))})),t._focused=1}),o.add(t.id,"blur",function(){o.remove(t.id,"keydown",t.keyDownHandler),o.remove(t.id,"keypress",t.keyPressHandler),t._focused=0}),(e.isIE6||!n.boxModel)&&(o.add(t.id,"mouseover",function(){n.hasClass(t.id,r+"Disabled")||n.addClass(t.id,r+"Hover")}),o.add(t.id,"mouseout",function(){n.hasClass(t.id,r+"Disabled")||n.removeClass(t.id,r+"Hover")})),t.onPostRender.dispatch(t,n.get(t.id))},destroy:function(){this.parent(),o.clear(this.id+"_text"),o.clear(this.id+"_open")}})}(tinymce),function(e){{var t,n=e.DOM,o=e.dom.Event,r=e.each;e.util.Dispatcher}e.create("tinymce.ui.NativeListBox:tinymce.ui.ListBox",{NativeListBox:function(e,t){this.parent(e,t),this.classPrefix="mceNativeListBox"},setDisabled:function(e){n.get(this.id).disabled=e,this.setAriaProperty("disabled",e)},isDisabled:function(){return n.get(this.id).disabled},select:function(e){var n,o,i=this;return e==t?i.selectByIndex(-1):(o=e&&"function"==typeof e?e:function(t){return t==e},void(e!=i.selectedValue&&(r(i.items,function(e,t){return o(e.value)?(n=1,i.selectByIndex(t),!1):void 0}),n||i.selectByIndex(-1))))},selectByIndex:function(e){n.get(this.id).selectedIndex=e+1,this.selectedValue=this.items[e]?this.items[e].value:null},add:function(e,t,o){var r,i=this;o=o||{},o.value=t,i.isRendered()&&n.add(n.get(this.id),"option",o,e),r={title:e,value:t,attribs:o},i.items.push(r),i.onAdd.dispatch(i,r)},getLength:function(){return this.items.length},renderHTML:function(){var e,t=this;return e=n.createHTML("option",{value:""},"-- "+t.settings.title+" --"),r(t.items,function(t){e+=n.createHTML("option",{value:t.value},t.title)}),e=n.createHTML("select",{id:t.id,"class":"mceNativeListBox","aria-labelledby":t.id+"_aria"},e),e+=n.createHTML("span",{id:t.id+"_aria",style:"display: none"},t.settings.title)},postRender:function(){function e(e){var t=r.items[e.target.selectedIndex-1];t&&(t=t.value)&&(r.onChange.dispatch(r,t),r.settings.onselect&&r.settings.onselect(t))}var t,r=this,i=!0;r.rendered=!0,o.add(r.id,"change",e),o.add(r.id,"keydown",function(n){var a,s=38,c=40,d=13,l=32;return o.remove(r.id,"change",t),i=!1,a=o.add(r.id,"blur",function(){i||(i=!0,o.add(r.id,"change",e),o.remove(r.id,"blur",a))}),n.keyCode==d||n.keyCode==l?(e(n),o.cancel(n)):void((n.keyCode==c||n.keyCode==s)&&n.stopImmediatePropagation())}),r.onPostRender.dispatch(r,n.get(r.id))}})}(tinymce),function(e){{var t=e.DOM,n=e.dom.Event;e.each}e.create("tinymce.ui.MenuButton:tinymce.ui.Button",{MenuButton:function(n,o,r){this.parent(n,o,r),this.onRenderMenu=new e.util.Dispatcher(this),o.menu_container=o.menu_container||t.doc.body},showMenu:function(){var e,o,r,i=this,a=t.get(i.id);if(!i.isDisabled()){if(i.isMenuRendered||(i.renderMenu(),i.isMenuRendered=!0),i.isMenuVisible)return i.hideMenu();e=t.getPos(i.settings.menu_container),o=t.getPos(a),r=i.menu,r.settings.offset_x=o.x,r.settings.offset_y=o.y,r.settings.vp_offset_x=o.x,r.settings.vp_offset_y=o.y,r.settings.keyboard_focus=i._focused,r.showMenu(0,a.firstChild.clientHeight),n.add(t.doc,"mousedown",i.hideMenu,i),i.setState("Selected",1),i.isMenuVisible=1}},renderMenu:function(){var e,t=this;e=t.settings.control_manager.createDropMenu(t.id+"_menu",{menu_line:1,"class":this.classPrefix+"Menu",icons:t.settings.icons}),e.onHideMenu.add(function(){t.hideMenu(),t.focus()}),t.onRenderMenu.dispatch(t,e),t.menu=e},hideMenu:function(e){var o=this;e&&"mousedown"==e.type&&t.getParent(e.target,function(e){return e.id===o.id||e.id===o.id+"_open"})||(e&&t.getParent(e.target,".mceMenu")||(o.setState("Selected",0),n.remove(t.doc,"mousedown",o.hideMenu,o),o.menu&&o.menu.hideMenu()),o.isMenuVisible=0)},postRender:function(){var e=this,t=e.settings;n.add(e.id,"click",function(){e.isDisabled()||(t.onclick&&t.onclick(e.value),e.showMenu())})}})}(tinymce),function(e){{var t=e.DOM,n=e.dom.Event;e.each}e.create("tinymce.ui.SplitButton:tinymce.ui.MenuButton",{SplitButton:function(e,t,n){this.parent(e,t,n),this.classPrefix="mceSplitButton"},renderHTML:function(){var e,n,o=this,r=o.settings;return e="<tbody><tr>",n=r.image?t.createHTML("img ",{src:r.image,role:"presentation","class":"mceAction "+r["class"]}):t.createHTML("span",{"class":"mceAction "+r["class"]},""),n+=t.createHTML("span",{"class":"mceVoiceLabel mceIconOnly",id:o.id+"_voice",style:"display:none;"},r.title),e+="<td >"+t.createHTML("a",{role:"button",id:o.id+"_action",tabindex:"-1",href:"javascript:;","class":"mceAction "+r["class"],onclick:"return false;",onmousedown:"return false;",title:r.title},n)+"</td>",n=t.createHTML("span",{"class":"mceOpen "+r["class"]},'<span style="display:none;" class="mceIconOnly" aria-hidden="true">\u25bc</span>'),e+="<td >"+t.createHTML("a",{role:"button",id:o.id+"_open",tabindex:"-1",href:"javascript:;","class":"mceOpen "+r["class"],onclick:"return false;",onmousedown:"return false;",title:r.title},n)+"</td>",e+="</tr></tbody>",e=t.createHTML("table",{role:"presentation","class":"mceSplitButton mceSplitButtonEnabled "+r["class"],cellpadding:"0",cellspacing:"0",title:r.title},e),t.createHTML("div",{id:o.id,role:"button",tabindex:"0","aria-labelledby":o.id+"_voice","aria-haspopup":"true"},e)},postRender:function(){var o,r=this,i=r.settings;i.onclick&&(o=function(e){r.isDisabled()||(i.onclick(r.value),n.cancel(e))},n.add(r.id+"_action","click",o),n.add(r.id,["click","keydown"],function(e){var t=40;32!==e.keyCode&&13!==e.keyCode&&14!==e.keyCode||e.altKey||e.ctrlKey||e.metaKey?("click"===e.type||e.keyCode===t)&&(r.showMenu(),n.cancel(e)):(o(),n.cancel(e))})),n.add(r.id+"_open","click",function(e){r.showMenu(),n.cancel(e)}),n.add([r.id,r.id+"_open"],"focus",function(){r._focused=1}),n.add([r.id,r.id+"_open"],"blur",function(){r._focused=0}),(e.isIE6||!t.boxModel)&&(n.add(r.id,"mouseover",function(){t.hasClass(r.id,"mceSplitButtonDisabled")||t.addClass(r.id,"mceSplitButtonHover")}),n.add(r.id,"mouseout",function(){t.hasClass(r.id,"mceSplitButtonDisabled")||t.removeClass(r.id,"mceSplitButtonHover")}))},destroy:function(){this.parent(),n.clear(this.id+"_action"),n.clear(this.id+"_open"),n.clear(this.id)}})}(tinymce),function(e){var t=e.DOM,n=e.dom.Event,o=e.is,r=e.each;e.create("tinymce.ui.ColorSplitButton:tinymce.ui.SplitButton",{ColorSplitButton:function(t,n,o){var r=this;r.parent(t,n,o),r.settings=n=e.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"},r.settings),r.onShowMenu=new e.util.Dispatcher(r),r.onHideMenu=new e.util.Dispatcher(r),r.value=n.default_color},showMenu:function(){var o,r,i=this;if(!i.isDisabled()){if(i.isMenuRendered||(i.renderMenu(),i.isMenuRendered=!0),i.isMenuVisible)return i.hideMenu();o=t.get(i.id),t.show(i.id+"_menu"),t.addClass(o,"mceSplitButtonSelected"),r=t.getPos(o),t.setStyles(i.id+"_menu",{left:r.x,top:r.y+o.firstChild.clientHeight,zIndex:2e5}),o=0,n.add(t.doc,"mousedown",i.hideMenu,i),i.onShowMenu.dispatch(i),i._focused&&(i._keyHandler=n.add(i.id+"_menu","keydown",function(e){27==e.keyCode&&i.hideMenu()}),t.select("a",i.id+"_menu")[0].focus()),i.keyboardNav=new e.ui.KeyboardNavigation({root:i.id+"_menu",items:t.select("a",i.id+"_menu"),onCancel:function(){i.hideMenu(),i.focus()}}),i.keyboardNav.focus(),i.isMenuVisible=1}},hideMenu:function(e){var o=this;if(o.isMenuVisible){if(e&&"mousedown"==e.type&&t.getParent(e.target,function(e){return e.id===o.id+"_open"}))return;e&&t.getParent(e.target,".mceSplitButtonMenu")||(t.removeClass(o.id,"mceSplitButtonSelected"),n.remove(t.doc,"mousedown",o.hideMenu,o),n.remove(o.id+"_menu","keydown",o._keyHandler),t.hide(o.id+"_menu")),o.isMenuVisible=0,o.onHideMenu.dispatch(),o.keyboardNav.destroy()}},renderMenu:function(){var i,a,s,c,d,l,u=this,f=0,p=u.settings;return d=t.add(p.menu_container,"div",{role:"listbox",id:u.id+"_menu","class":p.menu_class+" "+p["class"],style:"position:absolute;left:0;top:-1000px;"}),i=t.add(d,"div",{"class":p["class"]+" mceSplitButtonMenu"}),t.add(i,"span",{"class":"mceMenuLine"}),a=t.add(i,"table",{role:"presentation","class":"mceColorSplitMenu"}),s=t.add(a,"tbody"),f=0,r(o(p.colors,"array")?p.colors:p.colors.split(","),function(n){n=n.replace(/^#/,""),f--||(c=t.add(s,"tr"),f=p.grid_width-1),a=t.add(c,"td");var o={href:"javascript:;",style:{backgroundColor:"#"+n},title:u.editor.getLang("colors."+n,n),"data-mce-color":"#"+n};e.isIE||(o.role="option"),a=t.add(a,"a",o),u.editor.forcedHighContrastMode&&(a=t.add(a,"canvas",{width:16,height:16,"aria-hidden":"true"}),a.getContext&&(l=a.getContext("2d"))?(l.fillStyle="#"+n,l.fillRect(0,0,16,16)):t.remove(a))}),p.more_colors_func&&(a=t.add(s,"tr"),a=t.add(a,"td",{colspan:p.grid_width,"class":"mceMoreColors"}),a=t.add(a,"a",{role:"option",id:u.id+"_more",href:"javascript:;",onclick:"return false;","class":"mceMoreColors"},p.more_colors_title),n.add(a,"click",function(e){return p.more_colors_func.call(p.more_colors_scope||this),n.cancel(e)})),t.addClass(i,"mceColorSplitMenu"),n.add(u.id+"_menu","mousedown",function(e){return n.cancel(e)}),n.add(u.id+"_menu","click",function(e){var n;return e=t.getParent(e.target,"a",s),e&&"a"==e.nodeName.toLowerCase()&&(n=e.getAttribute("data-mce-color"))&&u.setColor(n),!1}),d},setColor:function(e){this.displayColor(e),this.hideMenu(),this.settings.onselect(e)},displayColor:function(e){var n=this;t.setStyle(n.id+"_preview","backgroundColor",e),n.value=e},postRender:function(){var e=this,n=e.id;e.parent(),t.add(n+"_action","div",{id:n+"_preview","class":"mceColorPreview"}),t.setStyle(e.id+"_preview","backgroundColor",e.value)},destroy:function(){var e=this;e.parent(),n.clear(e.id+"_menu"),n.clear(e.id+"_more"),t.remove(e.id+"_menu"),e.keyboardNav&&e.keyboardNav.destroy()}})}(tinymce),function(e){var t=e.DOM,n=e.each,o=e.dom.Event;e.create("tinymce.ui.ToolbarGroup:tinymce.ui.Container",{renderHTML:function(){var n=this,o=[],r=n.controls,i=e.each,a=n.settings;return o.push('<div id="'+n.id+'" role="group" aria-labelledby="'+n.id+'_voice">'),o.push("<span role='application'>"),o.push('<span id="'+n.id+'_voice" class="mceVoiceLabel" style="display:none;">'+t.encode(a.name)+"</span>"),i(r,function(e){o.push(e.renderHTML())}),o.push("</span>"),o.push("</div>"),o.join("")},focus:function(){var e=this;t.get(e.id).focus()},postRender:function(){var o=this,r=[];n(o.controls,function(e){n(e.controls,function(e){e.id&&r.push(e)})}),o.keyNav=new e.ui.KeyboardNavigation({root:o.id,items:r,onCancel:function(){e.isWebKit&&t.get(o.editor.id+"_ifr").focus(),o.editor.focus()},excludeFromTabOrder:!o.settings.tab_focus_toolbar})},destroy:function(){var e=this;e.parent(),e.keyNav.destroy(),o.clear(e.id)}})}(tinymce),function(e){{var t=e.DOM;e.each}e.create("tinymce.ui.Toolbar:tinymce.ui.Container",{renderHTML:function(){var e,n,o,r,i,a,s=this,c="",d=s.settings;for(a=s.controls,o=0;o<a.length;o++)n=a[o],r=a[o-1],i=a[o+1],0===o&&(e="mceToolbarStart",n.Button?e+=" mceToolbarStartButton":n.SplitButton?e+=" mceToolbarStartSplitButton":n.ListBox&&(e+=" mceToolbarStartListBox"),c+=t.createHTML("td",{"class":e},t.createHTML("span",null,"<!-- IE -->"))),r&&n.ListBox&&(r.Button||r.SplitButton)&&(c+=t.createHTML("td",{"class":"mceToolbarEnd"},t.createHTML("span",null,"<!-- IE -->"))),c+=t.stdMode?'<td style="position: relative">'+n.renderHTML()+"</td>":"<td>"+n.renderHTML()+"</td>",i&&n.ListBox&&(i.Button||i.SplitButton)&&(c+=t.createHTML("td",{"class":"mceToolbarStart"},t.createHTML("span",null,"<!-- IE -->")));return e="mceToolbarEnd",n.Button?e+=" mceToolbarEndButton":n.SplitButton?e+=" mceToolbarEndSplitButton":n.ListBox&&(e+=" mceToolbarEndListBox"),c+=t.createHTML("td",{"class":e},t.createHTML("span",null,"<!-- IE -->")),t.createHTML("table",{id:s.id,"class":"mceToolbar"+(d["class"]?" "+d["class"]:""),cellpadding:"0",cellspacing:"0",align:s.settings.align||"",role:"presentation",tabindex:"-1"},"<tbody><tr>"+c+"</tr></tbody>")}})}(tinymce),function(e){{var t=e.util.Dispatcher;e.each}e.create("tinymce.AddOnManager",{AddOnManager:function(){var e=this;e.items=[],e.urls={},e.lookup={},e.onAdd=new t(e)},get:function(e){return this.lookup[e]?this.lookup[e].instance:void 0},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(t){var n=e.settings;n&&n.language&&n.language_load!==!1&&e.ScriptLoader.add(this.urls[t]+"/langs/"+n.language+".js")
},add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},this.onAdd.dispatch(this,e,t),t},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(t,n){var o=this.urls[t];e.each(n,function(t){e.ScriptLoader.add(o+"/"+t)})},load:function(t,n,o,r){function i(){var i=a.dependencies(t);e.each(i,function(e){var t=a.createUrl(n,e);a.load(t.resource,t,void 0,void 0)}),o&&o.call(r?r:e.ScriptLoader)}var a=this,s=n;a.urls[t]||("object"==typeof n&&(s=n.prefix+n.resource+n.suffix),0!==s.indexOf("/")&&-1==s.indexOf("://")&&(s=e.baseURL+"/"+s),a.urls[t]=s.substring(0,s.lastIndexOf("/")),a.lookup[t]?i():e.ScriptLoader.add(s,i,r))}}),e.PluginManager=new e.AddOnManager,e.ThemeManager=new e.AddOnManager}(tinymce),function(e){var t,n=e.each,o=e.extend,r=e.DOM,i=e.dom.Event,a=(e.ThemeManager,e.PluginManager,e.explode),s=e.util.Dispatcher,c=0;e.documentBaseURL=window.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(e.documentBaseURL)||(e.documentBaseURL+="/"),e.baseURL=new e.util.URI(e.documentBaseURL).toAbsolute(e.baseURL),e.baseURI=new e.util.URI(e.baseURL),e.onBeforeUnload=new s(e),i.add(window,"beforeunload",function(t){e.onBeforeUnload.dispatch(e,t)}),e.onAddEditor=new s(e),e.onRemoveEditor=new s(e),e.EditorManager=o(e,{editors:[],i18n:{},activeEditor:null,init:function(t){function o(e){var t=e.id;return t||(t=e.name,t=t&&!r.get(t)?e.name:r.uniqueId(),e.setAttribute("id",t)),t}function s(t,n,o){var r=t[n];if(r)return e.is(r,"string")&&(o=r.replace(/\.\w+$/,""),o=o?e.resolve(o):0,r=e.resolve(r)),r.apply(o||this,Array.prototype.slice.call(arguments,2))}function d(e,t){return t.constructor===RegExp?t.test(e.className):r.hasClass(e,t)}var l,u=this,f=(e.ScriptLoader,[]);u.settings=t,i.bind(window,"ready",function(){var i,u;switch(s(t,"onpageload"),t.mode){case"exact":i=t.elements||"",i.length>0&&n(a(i),function(o){r.get(o)?(l=new e.Editor(o,t),f.push(l),l.render(1)):n(document.forms,function(i){n(i.elements,function(n){n.name===o&&(o="mce_editor_"+c++,r.setAttrib(n,"id",o),l=new e.Editor(o,t),f.push(l),l.render(1))})})});break;case"textareas":case"specific_textareas":n(r.select("textarea"),function(n){t.editor_deselector&&d(n,t.editor_deselector)||(!t.editor_selector||d(n,t.editor_selector))&&(l=new e.Editor(o(n),t),f.push(l),l.render(1))});break;default:t.types?n(t.types,function(i){n(r.select(i.selector),function(n){var r=new e.Editor(o(n),e.extend({},t,i));f.push(r),r.render(1)})}):t.selector&&n(r.select(t.selector),function(n){var r=new e.Editor(o(n),t);f.push(r),r.render(1)})}t.oninit&&(i=u=0,n(f,function(e){u++,e.initialized?i++:e.onInit.add(function(){i++,i==u&&s(t,"oninit")}),i==u&&s(t,"oninit")}))})},get:function(e){return e===t?this.editors:this.editors.hasOwnProperty(e)?this.editors[e]:t},getInstanceById:function(e){return this.get(e)},add:function(e){var t=this,n=t.editors;return n[e.id]=e,n.push(e),t._setActive(e),t.onAddEditor.dispatch(t,e),e},remove:function(e){var t,n=this,o=n.editors;if(!o[e.id])return null;for(delete o[e.id],t=0;t<o.length;t++)if(o[t]==e){o.splice(t,1);break}return n.activeEditor==e&&n._setActive(o[0]),e.destroy(),n.onRemoveEditor.dispatch(n,e),e},execCommand:function(t,n,o){function r(){s.destroy(),i.detachEvent("onunload",r),i=i.tinyMCE=i.tinymce=null}var i,a=this,s=a.get(o);switch(t){case"mceFocus":return s.focus(),!0;case"mceAddEditor":case"mceAddControl":return a.get(o)||new e.Editor(o,a.settings).render(),!0;case"mceAddFrameControl":return i=o.window,i.tinyMCE=tinyMCE,i.tinymce=e,e.DOM.doc=i.document,e.DOM.win=i,s=new e.Editor(o.element_id,o),s.render(),e.isIE&&!e.isIE11&&i.attachEvent("onunload",r),o.page_window=null,!0;case"mceRemoveEditor":case"mceRemoveControl":return s&&s.remove(),!0;case"mceToggleEditor":return s?(s.isHidden()?s.show():s.hide(),!0):(a.execCommand("mceAddControl",0,o),!0)}return a.activeEditor?a.activeEditor.execCommand(t,n,o):!1},execInstanceCommand:function(e,t,n,o){var r=this.get(e);return r?r.execCommand(t,n,o):!1},triggerSave:function(){n(this.editors,function(e){e.save()})},addI18n:function(t,o){var r=this.i18n;e.is(t,"string")?n(o,function(e,n){r[t+"."+n]=e}):n(t,function(e,t){n(e,function(e,o){n(e,function(e,n){"common"===o?r[t+"."+n]=e:r[t+"."+o+"."+n]=e})})})},_setActive:function(e){this.selectedInstance=this.activeEditor=e}})}(tinymce),function(e){var t=e.DOM,n=e.dom.Event,o=e.extend,r=e.each,i=e.isGecko,a=e.isIE,s=(e.isWebKit,e.is),c=e.ThemeManager,d=e.PluginManager,l=e.explode;e.create("tinymce.Editor",{Editor:function(t,n){var r=this,i=!0;r.settings=n=o({id:t,language:"en",theme:"advanced",skin:"default",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:e.documentBaseURL,add_form_submit_trigger:i,submit_patch:i,add_unload_trigger:i,convert_urls:i,relative_urls:i,remove_script_host:i,table_inline_editing:!1,object_resizing:i,accessibility_focus:i,doctype:e.isIE6?'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">':"<!DOCTYPE>",visual:i,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:i,directionality:"ltr",forced_root_block:"p",hidden_input:i,padd_empty_editor:i,render_ui:i,indentation:"30px",fix_table_elements:i,inline_styles:i,convert_fonts_to_spans:i,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,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:i,entity_encoding:"named",url_converter:r.convertURL,url_converter_scope:r,ie7_compat:i},n),r.id=r.editorId=t,r.isNotDirty=!1,r.plugins={},r.documentBaseURI=new e.util.URI(n.document_base_url||e.documentBaseURL,{base_uri:tinyMCE.baseURI}),r.baseURI=e.baseURI,r.contentCSS=[],r.contentStyles=[],r.setupEvents(),r.execCommands={},r.queryStateCommands={},r.queryValueCommands={},r.execCallback("setup",r)},render:function(){function o(){a.language&&a.language_load!==!1&&u.add(e.baseURL+"/langs/"+a.language+".js"),a.theme&&"function"!=typeof a.theme&&"-"!=a.theme.charAt(0)&&!c.urls[a.theme]&&c.load(a.theme,"themes/"+a.theme+"/editor_template"+e.suffix+".js"),r(l(a.plugins),function(t){if(t&&!d.urls[t])if("-"==t.charAt(0)){t=t.substr(1,t.length);var n=d.dependencies(t);r(n,function(t){var n={prefix:"plugins/",resource:t,suffix:"/editor_plugin"+e.suffix+".js"};t=d.createUrl(n,t),d.load(t.resource,t)})}else{if("safari"==t)return;d.load(t,{prefix:"plugins/",resource:t,suffix:"/editor_plugin"+e.suffix+".js"})}}),u.loadQueue(function(){i.removed||i.init()})}var i=this,a=i.settings,s=i.id,u=e.ScriptLoader;return n.domLoaded?(tinyMCE.settings=a,void(i.getElement()&&(!e.isIDevice||e.isIOS5)&&(!/TEXTAREA|INPUT/i.test(i.getElement().nodeName)&&a.hidden_input&&t.getParent(s,"form")&&t.insertAfter(t.create("input",{type:"hidden",name:s}),s),a.content_editable||(i.orgVisibility=i.getElement().style.visibility,i.getElement().style.visibility="hidden"),e.WindowManager&&(i.windowManager=new e.WindowManager(i)),"xml"==a.encoding&&i.onGetContent.add(function(e,n){n.save&&(n.content=t.encode(n.content))}),a.add_form_submit_trigger&&i.onSubmit.addToTop(function(){i.initialized&&(i.save(),i.isNotDirty=1)}),a.add_unload_trigger&&(i._beforeUnload=tinyMCE.onBeforeUnload.add(function(){!i.initialized||i.destroyed||i.isHidden()||i.save({format:"raw",no_events:!0})})),e.addUnload(i.destroy,i),a.submit_patch&&i.onBeforeRenderUI.add(function(){var t=i.getElement().form;t&&(t._mceOldSubmit||(t.submit.nodeType||t.submit.length||(i.formElement=t,t._mceOldSubmit=t.submit,t.submit=function(){return e.triggerSave(),i.isNotDirty=1,i.formElement._mceOldSubmit(i.formElement)}),t=null))}),o()))):void n.add(window,"ready",function(){i.render()})},init:function(){function n(t){var o,i=d.get(t),a=d.urls[t]||e.documentBaseURL.replace(/\/$/,"");i&&-1===e.inArray(x,t)&&(r(d.dependencies(t),function(e){n(e)}),o=new i(y,a),y.plugins[t]=o,o.init&&(o.init(y,a),x.push(t)))}var o,i,s,u,f,p,m,h,g,v,y=this,b=y.settings,C=y.getElement(),x=[];if(e.add(y),b.aria_label=b.aria_label||t.getAttrib(C,"aria-label",y.getLang("aria.rich_text_area")),b.theme&&("function"!=typeof b.theme?(b.theme=b.theme.replace(/-/,""),f=c.get(b.theme),y.theme=new f,y.theme.init&&y.theme.init(y,c.urls[b.theme]||e.documentBaseURL.replace(/\/$/,""))):y.theme=b.theme),r(l(b.plugins.replace(/\-/g,"")),n),b.popup_css!==!1&&(b.popup_css=b.popup_css?y.documentBaseURI.toAbsolute(b.popup_css):y.baseURI.toAbsolute("themes/"+b.theme+"/skins/"+b.skin+"/dialog.css")),b.popup_css_add&&(b.popup_css+=","+y.documentBaseURI.toAbsolute(b.popup_css_add)),y.controlManager=new e.ControlManager(y),y.onBeforeRenderUI.dispatch(y,y.controlManager),b.render_ui&&y.theme&&(y.orgDisplay=C.style.display,"function"!=typeof b.theme?(i=b.width||C.style.width||C.offsetWidth,s=b.height||C.style.height||C.offsetHeight,u=b.min_height||100,g=/^[0-9\.]+(|px)$/i,g.test(""+i)&&(i=Math.max(parseInt(i,10)+(f.deltaWidth||0),100)),g.test(""+s)&&(s=Math.max(parseInt(s,10)+(f.deltaHeight||0),u)),f=y.theme.renderUI({targetNode:C,width:i,height:s,deltaWidth:b.delta_width,deltaHeight:b.delta_height}),t.setStyles(f.sizeContainer||f.editorContainer,{width:i,height:s}),s=(f.iframeHeight||s)+("number"==typeof s?f.deltaHeight||0:""),u>s&&(s=u)):(f=b.theme(y,C),f.editorContainer.nodeType&&(f.editorContainer=f.editorContainer.id=f.editorContainer.id||y.id+"_parent"),f.iframeContainer.nodeType&&(f.iframeContainer=f.iframeContainer.id=f.iframeContainer.id||y.id+"_iframecontainer"),s=f.iframeHeight||C.offsetHeight,a&&(y.onInit.add(function(e){e.dom.bind(e.getBody(),"beforedeactivate keydown keyup",function(){e.bookmark=e.selection.getBookmark(1)})}),y.onNodeChange.add(function(e){document.activeElement.id==e.id+"_ifr"&&(e.bookmark=e.selection.getBookmark(1))}))),y.editorContainer=f.editorContainer),b.content_css&&r(l(b.content_css),function(e){y.contentCSS.push(y.documentBaseURI.toAbsolute(e))}),b.content_style&&y.contentStyles.push(b.content_style),b.content_editable)return C=o=f=null,y.initContentBody();for(document.domain&&location.hostname!=document.domain&&(e.relaxedDomain=document.domain),y.iframeHTML=b.doctype+'<html><head xmlns="http://www.w3.org/1999/xhtml">',b.document_base_url!=e.documentBaseURL&&(y.iframeHTML+='<base href="'+y.documentBaseURI.getURI()+'" />'),e.isIE8&&(y.iframeHTML+=b.ie7_compat?'<meta http-equiv="X-UA-Compatible" content="IE=7" />':'<meta http-equiv="X-UA-Compatible" content="IE=edge" />'),y.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',v=0;v<y.contentCSS.length;v++)y.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+y.contentCSS[v]+'" />';y.contentCSS=[],m=b.body_id||"tinymce",-1!=m.indexOf("=")&&(m=y.getParam("body_id","","hash"),m=m[y.id]||m),h=b.body_class||"",-1!=h.indexOf("=")&&(h=y.getParam("body_class","","hash"),h=h[y.id]||""),y.iframeHTML+='</head><body id="'+m+'" class="mceContentBody '+h+'" onload="window.parent.tinyMCE.get(\''+y.id+"').onLoad.dispatch();\"><br></body></html>",e.relaxedDomain&&(a||e.isOpera&&parseFloat(opera.version())<11)&&(p='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinyMCE.get("'+y.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody();})()'),o=t.add(f.iframeContainer,"iframe",{id:y.id+"_ifr",src:p||'javascript:""',frameBorder:"0",allowTransparency:"true",title:b.aria_label,style:{width:"100%",height:s,display:"block"}}),y.contentAreaContainer=f.iframeContainer,f.editorContainer&&(t.get(f.editorContainer).style.display=y.orgDisplay),C.style.visibility=y.orgVisibility,t.get(y.id).style.display="none",t.setAttrib(y.id,"aria-hidden",!0),e.relaxedDomain&&p||y.initContentBody(),C=o=f=null},initContentBody:function(){var n,o,i=this,s=i.settings,c=t.get(i.id),d=i.getDoc();a&&e.relaxedDomain||s.content_editable||(d.open(),d.write(i.iframeHTML),d.close(),e.relaxedDomain&&(d.domain=e.relaxedDomain)),s.content_editable&&(t.addClass(c,"mceContentBody"),i.contentDocument=d=s.content_document||document,i.contentWindow=s.content_window||window,i.bodyElement=c,s.content_document=s.content_window=null),n=i.getBody(),n.disabled=!0,s.readonly||(n.contentEditable=i.getParam("content_editable_state",!0)),n.disabled=!1,i.schema=new e.html.Schema(s),i.dom=new e.dom.DOMUtils(d,{keep_values:!0,url_converter:i.convertURL,url_converter_scope:i,hex_colors:s.force_hex_style_colors,class_filter:s.class_filter,update_styles:!0,root_element:s.content_editable?i.id:null,schema:i.schema}),i.parser=new e.html.DomParser(s,i.schema),i.parser.addAttributeFilter("src,href,style",function(e,t){for(var n,o,r,a=e.length,s=i.dom;a--;)n=e[a],o=n.attr(t),r="data-mce-"+t,n.attributes.map[r]||("style"===t?n.attr(r,s.serializeStyle(s.parseStyle(o),n.name)):n.attr(r,i.convertURL(o,t,n.name)))}),i.parser.addNodeFilter("script",function(e){for(var t,n=e.length;n--;)t=e[n],t.attr("type","mce-"+(t.attr("type")||"text/javascript"))}),i.parser.addNodeFilter("#cdata",function(e){for(var t,n=e.length;n--;)t=e[n],t.type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"}),i.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(t){for(var n,o=t.length,r=i.schema.getNonEmptyElements();o--;)n=t[o],n.isEmpty(r)&&(n.empty().append(new e.html.Node("br",1)).shortEnded=!0)}),i.serializer=new e.dom.Serializer(s,i.dom,i.schema),i.selection=new e.dom.Selection(i.dom,i.getWin(),i.serializer,i),i.formatter=new e.Formatter(i),i.undoManager=new e.UndoManager(i),i.forceBlocks=new e.ForceBlocks(i),i.enterKey=new e.EnterKey(i),i.editorCommands=new e.EditorCommands(i),i.onExecCommand.add(function(e,t){/^(FontName|FontSize)$/.test(t)||i.nodeChanged()}),i.serializer.onPreProcess.add(function(e,t){return i.onPreProcess.dispatch(i,t,e)}),i.serializer.onPostProcess.add(function(e,t){return i.onPostProcess.dispatch(i,t,e)}),i.onPreInit.dispatch(i),s.browser_spellcheck||s.gecko_spellcheck||(d.body.spellcheck=!1),s.readonly||i.bindNativeEvents(),i.controlManager.onPostRender.dispatch(i,i.controlManager),i.onPostRender.dispatch(i),i.quirks=e.util.Quirks(i),s.directionality&&(n.dir=s.directionality),s.nowrap&&(n.style.whiteSpace="nowrap"),s.protect&&i.onBeforeSetContent.add(function(e,t){r(s.protect,function(e){t.content=t.content.replace(e,function(e){return"<!--mce:protected "+escape(e)+"-->"})})}),i.onSetContent.add(function(){i.addVisual(i.getBody())}),s.padd_empty_editor&&i.onPostProcess.add(function(e,t){t.content=t.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")}),i.load({initial:!0,format:"html"}),i.startContent=i.getContent({format:"raw"}),i.initialized=!0,i.onInit.dispatch(i),i.execCallback("setupcontent_callback",i.id,n,d),i.execCallback("init_instance_callback",i),i.focus(!0),i.nodeChanged({initial:!0}),i.contentStyles.length>0&&(o="",r(i.contentStyles,function(e){o+=e+"\r\n"}),i.dom.addStyle(o)),r(i.contentCSS,function(e){i.dom.loadCSS(e)}),s.auto_focus&&setTimeout(function(){var t=e.get(s.auto_focus);t.selection.select(t.getBody(),1),t.selection.collapse(1),t.getBody().focus(),t.getWin().focus()},100),c=d=n=null},focus:function(t){var n,o,r,i,a=this,s=a.selection,c=a.settings.content_editable,d=a.getDoc();t||(a.bookmark&&(s.moveToBookmark(a.bookmark),a.bookmark=null),o=s.getRng(),o.item&&(r=o.item(0)),a._refreshContentEditable(),c||a.getWin().focus(),(e.isGecko||c)&&(i=a.getBody(),i.setActive&&!e.isIE11?i.setActive():i.focus(),c&&s.normalize()),r&&r.ownerDocument==d&&(o=d.body.createControlRange(),o.addElement(r),o.select())),e.activeEditor!=a&&(null!=(n=e.activeEditor)&&n.onDeactivate.dispatch(n,a),a.onActivate.dispatch(a,n)),e._setActive(a)},execCallback:function(t){var n,o=this,r=o.settings[t];if(r)return o.callbackLookup&&(n=o.callbackLookup[t])&&(r=n.func,n=n.scope),s(r,"string")&&(n=r.replace(/\.\w+$/,""),n=n?e.resolve(n):0,r=e.resolve(r),o.callbackLookup=o.callbackLookup||{},o.callbackLookup[t]={func:r,scope:n}),r.apply(n||o,Array.prototype.slice.call(arguments,1))},translate:function(t){var n=this.settings.language||"en",o=e.i18n;return t?o[n+"."+t]||t.replace(/\{\#([^\}]+)\}/g,function(e,t){return o[n+"."+t]||"{#"+t+"}"}):""},getLang:function(t,n){return e.i18n[(this.settings.language||"en")+"."+t]||(s(n)?n:"{#"+t+"}")},getParam:function(t,n,o){var i,a=e.trim,c=s(this.settings[t])?this.settings[t]:n;return"hash"===o?(i={},s(c,"string")?r(c.split(c.indexOf("=")>0?/[;,](?![^=;,]*(?:[;,]|$))/:","),function(e){e=e.split("="),i[a(e[0])]=a(e.length>1?e[1]:e)}):i=c,i):c},nodeChanged:function(e){var t,n=this,o=n.selection;n.initialized&&(e=e||{},t=o.getStart()||n.getBody(),t=a&&t.ownerDocument!=n.getDoc()?n.getBody():t,e.parents=[],n.dom.getParent(t,function(t){return"BODY"==t.nodeName?!0:void e.parents.push(t)}),n.onNodeChange.dispatch(n,e?e.controlManager||n.controlManager:n.controlManager,t,o.isCollapsed(),e))},addButton:function(e,t){var n=this;n.buttons=n.buttons||{},n.buttons[e]=t},addCommand:function(e,t,n){this.execCommands[e]={func:t,scope:n||this}},addQueryStateHandler:function(e,t,n){this.queryStateCommands[e]={func:t,scope:n||this}},addQueryValueHandler:function(e,t,n){this.queryValueCommands[e]={func:t,scope:n||this}},addShortcut:function(e,t,n,o){var i,a=this;return a.settings.custom_shortcuts===!1?!1:(a.shortcuts=a.shortcuts||{},s(n,"string")&&(i=n,n=function(){a.execCommand(i,!1,null)}),s(n,"object")&&(i=n,n=function(){a.execCommand(i[0],i[1],i[2])}),r(l(e),function(e){var i={func:n,scope:o||this,desc:a.translate(t),alt:!1,ctrl:!1,shift:!1};r(l(e,"+"),function(e){switch(e){case"alt":case"ctrl":case"shift":i[e]=!0;break;default:i.charCode=e.charCodeAt(0),i.keyCode=e.toUpperCase().charCodeAt(0)}}),a.shortcuts[(i.ctrl?"ctrl":"")+","+(i.alt?"alt":"")+","+(i.shift?"shift":"")+","+i.keyCode]=i}),!0)},execCommand:function(e,t,n,i){var a,s,c=this,d=0;return/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint|SelectAll)$/.test(e)||i&&i.skip_focus||c.focus(),i=o({},i),c.onBeforeExecCommand.dispatch(c,e,t,n,i),i.terminate?!1:c.execCallback("execcommand_callback",c.id,c.selection.getNode(),e,t,n)?(c.onExecCommand.dispatch(c,e,t,n,i),!0):(a=c.execCommands[e])&&(s=a.func.call(a.scope,t,n),s!==!0)?(c.onExecCommand.dispatch(c,e,t,n,i),s):(r(c.plugins,function(o){return o.execCommand&&o.execCommand(e,t,n)?(c.onExecCommand.dispatch(c,e,t,n,i),d=1,!1):void 0}),d?!0:c.theme&&c.theme.execCommand&&c.theme.execCommand(e,t,n)?(c.onExecCommand.dispatch(c,e,t,n,i),!0):c.editorCommands.execCommand(e,t,n)?(c.onExecCommand.dispatch(c,e,t,n,i),!0):(c.getDoc().execCommand(e,t,n),void c.onExecCommand.dispatch(c,e,t,n,i)))},queryCommandState:function(e){var t,n,o=this;if(!o._isHidden()){if((t=o.queryStateCommands[e])&&(n=t.func.call(t.scope),n!==!0))return n;if(t=o.editorCommands.queryCommandState(e),-1!==t)return t;try{return this.getDoc().queryCommandState(e)}catch(r){}}},queryCommandValue:function(e){var t,n,o=this;if(!o._isHidden()){if((t=o.queryValueCommands[e])&&(n=t.func.call(t.scope),n!==!0))return n;if(t=o.editorCommands.queryCommandValue(e),s(t))return t;try{return this.getDoc().queryCommandValue(e)}catch(r){}}},show:function(){var e=this;t.show(e.getContainer()),t.hide(e.id),e.load()},hide:function(){var e=this,n=e.getDoc();a&&n&&n.execCommand("SelectAll"),e.save(),t.hide(e.getContainer()),t.setStyle(e.id,"display",e.orgDisplay)},isHidden:function(){return!t.isHidden(this.id)},setProgressState:function(e,t,n){return this.onSetProgressState.dispatch(this,e,t,n),e},load:function(e){var t,n=this,o=n.getElement();return o?(e=e||{},e.load=!0,t=n.setContent(s(o.value)?o.value:o.innerHTML,e),e.element=o,e.no_events||n.onLoadContent.dispatch(n,e),e.element=o=null,t):void 0},save:function(e){var n,o,i=this,a=i.getElement();if(a&&i.initialized)return e=e||{},e.save=!0,e.element=a,n=e.content=i.getContent(e),e.no_events||i.onSaveContent.dispatch(i,e),n=e.content,/TEXTAREA|INPUT/i.test(a.nodeName)?a.value=n:(a.innerHTML=n,(o=t.getParent(i.id,"form"))&&r(o.elements,function(e){return e.name==i.id?(e.value=n,!1):void 0})),e.element=a=null,n},setContent:function(t,n){var o,r=this,i=r.getBody();return n=n||{},n.format=n.format||"html",n.set=!0,n.content=t,n.no_events||r.onBeforeSetContent.dispatch(r,n),t=n.content,e.isIE||0!==t.length&&!/^\s+$/.test(t)?("raw"!==n.format&&(t=new e.html.Serializer({},r.schema).serialize(r.parser.parse(t))),n.content=e.trim(t),r.dom.setHTML(i,n.content),n.no_events||r.onSetContent.dispatch(r,n),r.settings.content_editable&&document.activeElement!==r.getBody()||r.selection.normalize(),n.content):(o=r.settings.forced_root_block,t=o?"<"+o+'><br data-mce-bogus="1"></'+o+">":'<br data-mce-bogus="1">',i.innerHTML=t,r.selection.select(i,!0),void r.selection.collapse(!0))},getContent:function(t){var n,o=this,r=o.getBody();return t=t||{},t.format=t.format||"html",t.get=!0,t.getInner=!0,t.no_events||o.onBeforeGetContent.dispatch(o,t),n="raw"==t.format?r.innerHTML:"text"==t.format?r.innerText||r.textContent:o.serializer.serialize(r,t),t.content="text"!=t.format?e.trim(n):n,t.no_events||o.onGetContent.dispatch(o,t),t.content},isDirty:function(){var t=this;return e.trim(t.startContent)!=e.trim(t.getContent({format:"raw",no_events:1}))&&!t.isNotDirty},getContainer:function(){var e=this;return e.container||(e.container=t.get(e.editorContainer||e.id+"_parent")),e.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return t.get(this.settings.content_element||this.id)},getWin:function(){var e,n=this;return n.contentWindow||(e=t.get(n.id+"_ifr"),e&&(n.contentWindow=e.contentWindow)),n.contentWindow},getDoc:function(){var e,t=this;return t.contentDocument||(e=t.getWin(),e&&(t.contentDocument=e.document)),t.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(e,t,n){var o=this,r=o.settings;return r.urlconverter_callback?o.execCallback("urlconverter_callback",e,n,!0,t):!r.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")?e:r.relative_urls?o.documentBaseURI.toRelative(e):e=o.documentBaseURI.toAbsolute(e,r.remove_script_host)},addVisual:function(e){var t,n=this,o=n.settings,i=n.dom;e=e||n.getBody(),s(n.hasVisual)||(n.hasVisual=o.visual),r(i.select("table,a",e),function(e){var r;switch(e.nodeName){case"TABLE":return t=o.visual_table_class||"mceItemTable",r=i.getAttrib(e,"border"),void(r&&"0"!=r||(n.hasVisual?i.addClass(e,t):i.removeClass(e,t)));case"A":return void(i.getAttrib(e,"href",!1)||(r=i.getAttrib(e,"name")||e.id,t="mceItemAnchor",r&&(n.hasVisual?i.addClass(e,t):i.removeClass(e,t))))}}),n.onVisualAid.dispatch(n,e,n.hasVisual)},remove:function(){var o=this,r=o.getContainer(),i=o.getDoc();o.removed||(o.removed=1,a&&i&&i.execCommand("SelectAll"),o.save(),t.setStyle(o.id,"display",o.orgDisplay),o.settings.content_editable||(n.unbind(o.getWin()),n.unbind(o.getDoc())),n.unbind(o.getBody()),n.clear(r),o.execCallback("remove_instance_callback",o),o.onRemove.dispatch(o),o.onExecCommand.listeners=[],e.remove(o),t.remove(r))},destroy:function(t){var o=this;o.destroyed||(i&&(n.unbind(o.getDoc()),n.unbind(o.getWin()),n.unbind(o.getBody())),t||(e.removeUnload(o.destroy),tinyMCE.onBeforeUnload.remove(o._beforeUnload),o.theme&&o.theme.destroy&&o.theme.destroy(),o.controlManager.destroy(),o.selection.destroy(),o.dom.destroy()),o.formElement&&(o.formElement.submit=o.formElement._mceOldSubmit,o.formElement._mceOldSubmit=null),o.contentAreaContainer=o.formElement=o.container=o.settings.content_element=o.bodyElement=o.contentDocument=o.contentWindow=null,o.selection&&(o.selection=o.selection.win=o.selection.dom=o.selection.dom.doc=null),o.destroyed=1)},_refreshContentEditable:function(){var e,t,n=this;n._isHidden()&&(e=n.getBody(),t=e.parentNode,t.removeChild(e),t.appendChild(e),e.focus())},_isHidden:function(){var e;return i?(e=this.selection.getSel(),!e||!e.rangeCount||0===e.rangeCount):0}})}(tinymce),function(e){var t=e.each;e.Editor.prototype.setupEvents=function(){var n=this,o=n.settings;t(["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(t){n[t]=new e.util.Dispatcher(n)}),o.cleanup_callback&&(n.onBeforeSetContent.add(function(e,t){t.content=e.execCallback("cleanup_callback","insert_to_editor",t.content,t)}),n.onPreProcess.add(function(e,t){t.set&&e.execCallback("cleanup_callback","insert_to_editor_dom",t.node,t),t.get&&e.execCallback("cleanup_callback","get_from_editor_dom",t.node,t)}),n.onPostProcess.add(function(e,t){t.set&&(t.content=e.execCallback("cleanup_callback","insert_to_editor",t.content,t)),t.get&&(t.content=e.execCallback("cleanup_callback","get_from_editor",t.content,t))})),o.save_callback&&n.onGetContent.add(function(e,t){t.save&&(t.content=e.execCallback("save_callback",e.id,t.content,e.getBody()))}),o.handle_event_callback&&n.onEvent.add(function(e,t,o){n.execCallback("handle_event_callback",t,e,o)===!1&&(t.preventDefault(),t.stopPropagation())}),o.handle_node_change_callback&&n.onNodeChange.add(function(e,t,n){e.execCallback("handle_node_change_callback",e.id,n,-1,-1,!0,e.selection.isCollapsed())}),o.save_callback&&n.onSaveContent.add(function(e,t){var n=e.execCallback("save_callback",e.id,t.content,e.getBody());n&&(t.content=n)}),o.onchange_callback&&n.onChange.add(function(e,t){e.execCallback("onchange_callback",e,t)})},e.Editor.prototype.bindNativeEvents=function(){function n(e,t){e.type;s.removed||s.onEvent.dispatch(s,e,t)!==!1&&s[a[e.fakeType||e.type]].dispatch(s,e,t)}function o(){s.focus(!0)}function r(t,n){65==n.keyCode&&e.VK.metaKeyPressed(n)||s.selection.normalize(),s.nodeChanged()}function i(n,o){(n.altKey||n.ctrlKey||n.metaKey)&&t(s.shortcuts,function(t){var r=e.isMac?n.metaKey:n.ctrlKey;if(t.ctrl==r&&t.alt==n.altKey&&t.shift==n.shiftKey)return n.keyCode==t.keyCode||n.charCode&&n.charCode==t.charCode?(n.preventDefault(),o&&t.func.call(t.scope),!0):void 0})}var a,s=this,c=s.settings,d=s.dom;a={mouseup:"onMouseUp",mousedown:"onMouseDown",click:"onClick",keyup:"onKeyUp",keydown:"onKeyDown",keypress:"onKeyPress",submit:"onSubmit",reset:"onReset",contextmenu:"onContextMenu",dblclick:"onDblClick",paste:"onPaste"},t(a,function(t,o){var r=c.content_editable?s.getBody():s.getDoc();switch(o){case"contextmenu":d.bind(r,o,n);break;case"paste":d.bind(s.getBody(),o,n);break;case"submit":case"reset":d.bind(s.getElement().form||e.DOM.getParent(s.id,"form"),o,n);break;default:d.bind(r,o,n)}}),d.bind(c.content_editable?s.getBody():e.isGecko?s.getDoc():s.getWin(),"focus",function(){s.focus(!0)}),c.content_editable&&e.isOpera&&(d.bind(s.getBody(),"click",o),d.bind(s.getBody(),"keydown",o)),s.onMouseUp.add(r),s.onKeyUp.add(function(t,n){var o=n.keyCode;(o>=33&&36>=o||o>=37&&40>=o||13==o||45==o||46==o||8==o||e.isMac&&(91==o||93==o)||n.ctrlKey)&&r(t,n)}),s.onReset.add(function(){s.setContent(s.startContent,{format:"raw"})}),s.onKeyUp.add(function(e,t){i(t)}),s.onKeyPress.add(function(e,t){i(t)}),s.onKeyDown.add(function(e,t){i(t,!0)}),e.isOpera&&s.onClick.add(function(e,t){t.preventDefault()})}}(tinymce),function(e){var t,n=e.each,o=!0,r=!1;e.EditorCommands=function(i){function a(e,t,n){var i;return e=e.toLowerCase(),(i=y.exec[e])?(i(e,t,n),o):r}function s(e){var t;return e=e.toLowerCase(),(t=y.state[e])?t(e):-1}function c(e){var t;return e=e.toLowerCase(),(t=y.value[e])?t(e):r}function d(e,t){t=t||"exec",n(e,function(e,o){n(o.toLowerCase().split(","),function(n){y[t][n]=e})})}function l(e,n,o){return n===t&&(n=r),o===t&&(o=null),i.getDoc().execCommand(e,n,o)}function u(e){return C.match(e)}function f(e,n){C.toggle(e,n?{value:n}:t)}function p(e){h=v.getBookmark(e)}function m(){v.moveToBookmark(h)}var h,g=i.dom,v=i.selection,y={state:{},exec:{},value:{}},b=i.settings,C=i.formatter;e.extend(this,{execCommand:a,queryCommandState:s,queryCommandValue:c,addCommands:d}),d({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){i.undoManager.add()},"Cut,Copy,Paste":function(t){var n,r=i.getDoc();try{l(t)}catch(a){n=o}(n||!r.queryCommandSupported(t))&&(e.isGecko?i.windowManager.confirm(i.getLang("clipboard_msg"),function(e){e&&open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}):i.windowManager.alert(i.getLang("clipboard_no_support")))},unlink:function(e){v.isCollapsed()&&v.select(v.getNode()),l(e),v.collapse(r)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t=e.substring(7);n("left,center,right,full".split(","),function(e){t!=e&&C.remove("align"+e)}),f("align"+t),a("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;l(e),t=g.getParent(v.getNode(),"ol,ul"),t&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(p(),g.split(n,t),m()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){f(e)},"ForeColor,HiliteColor,FontName":function(e,t,n){f(e,n)},FontSize:function(t,n,o){var r,i;o>=1&&7>=o&&(i=e.explode(b.font_size_style_values),r=e.explode(b.font_size_classes),o=r?r[o-1]||o:i[o-1]||o),f(t,o)},RemoveFormat:function(e){C.remove(e)},mceBlockQuote:function(){f("blockquote")},FormatBlock:function(e,t,n){return f(n||"p")},mceCleanup:function(){var e=v.getBookmark();i.setContent(i.getContent({cleanup:o}),{cleanup:o}),v.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var r=n||v.getNode();r!=i.getBody()&&(p(),i.dom.remove(r,o),m())},mceSelectNodeDepth:function(e,t,n){var o=0;g.getParent(v.getNode(),function(e){return 1==e.nodeType&&o++==n?(v.select(e),r):void 0},i.getBody())},mceSelectNode:function(e,t,n){v.select(n)},mceInsertContent:function(t,n,o){var r,a,s,c,d,l,u,f,p,m,h,y,b,C;if(r=i.parser,a=new e.html.Serializer({},i.schema),b='<span id="mce_marker" data-mce-type="bookmark">\ufeff</span>',l={content:o,format:"html"},v.onBeforeSetContent.dispatch(v,l),o=l.content,-1==o.indexOf("{$caret}")&&(o+="{$caret}"),o=o.replace(/\{\$caret\}/,b),v.isCollapsed()||i.getDoc().execCommand("Delete",!1,null),s=v.getNode(),l={context:s.nodeName.toLowerCase()},d=r.parse(o,l),h=d.lastChild,"mce_marker"==h.attr("id"))for(u=h,h=h.prev;h;h=h.walk(!0))if(3==h.type||!g.isBlock(h.name)){h.parent.insert(u,h,"br"===h.name);break}if(l.invalid){for(v.setContent(b),s=v.getNode(),c=i.getBody(),9==s.nodeType?s=h=c:h=s;h!==c;)s=h,h=h.parentNode;o=s==c?c.innerHTML:g.getOuterHTML(s),o=a.serialize(r.parse(o.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return a.serialize(d)}))),s==c?g.setHTML(c,o):g.setOuterHTML(s,o)}else o=a.serialize(d),h=s.firstChild,y=s.lastChild,!h||h===y&&"BR"===h.nodeName?g.setHTML(s,o):v.setContent(o);u=g.get("mce_marker"),f=g.getRect(u),p=g.getViewPort(i.getWin()),(f.y+f.h>p.y+p.h||f.y<p.y||f.x>p.x+p.w||f.x<p.x)&&(C=e.isIE?i.getDoc().documentElement:i.getBody(),C.scrollLeft=f.x,C.scrollTop=f.y-p.h+25),m=g.createRng(),h=u.previousSibling,h&&3==h.nodeType?m.setStart(h,h.nodeValue.length):(m.setStartBefore(u),m.setEndBefore(u)),g.remove(u),v.setRng(m),v.onSetContent.dispatch(v,l),i.addVisual()},mceInsertRawHTML:function(e,t,n){v.setContent("tiny_mce_marker"),i.setContent(i.getContent().replace(/tiny_mce_marker/g,function(){return n}))},mceToggleFormat:function(e,t,n){f(n)},mceSetContent:function(e,t,n){i.setContent(n)},"Indent,Outdent":function(e){var t,o,r;t=b.indentation,o=/[a-z%]+$/i.exec(t),t=parseInt(t),s("InsertUnorderedList")||s("InsertOrderedList")?l(e):(b.forced_root_block||g.getParent(v.getNode(),g.isBlock)||C.apply("div"),n(v.getSelectedBlocks(),function(n){"outdent"==e?(r=Math.max(0,parseInt(n.style.paddingLeft||0)-t),g.setStyle(n,"paddingLeft",r?r+o:"")):g.setStyle(n,"paddingLeft",parseInt(n.style.paddingLeft||0)+t+o)}))},mceRepaint:function(){if(e.isGecko)try{p(o),v.getSel()&&v.getSel().selectAllChildren(i.getBody()),v.collapse(o),m()}catch(t){}},mceToggleFormat:function(e,t,n){C.toggle(n)},InsertHorizontalRule:function(){i.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){i.hasVisual=!i.hasVisual,i.addVisual()},mceReplaceContent:function(e,t,n){i.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,v.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var o;"string"==typeof n&&(n={href:n}),o=g.getParent(v.getNode(),"a"),n.href=n.href.replace(" ","%20"),o&&n.href||C.remove("link"),n.href&&C.apply("link",n,o)
},selectAll:function(){var e=g.getRoot(),t=g.createRng();v.getRng().setStart?(t.setStart(e,0),t.setEnd(e,e.childNodes.length),v.setRng(t)):l("SelectAll")}}),d({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(t){var n="align"+t.substring(7),r=v.isCollapsed()?[g.getParent(v.getNode(),g.isBlock)]:v.getSelectedBlocks(),i=e.map(r,function(e){return!!C.matchNode(e,n)});return-1!==e.inArray(i,o)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return u(e)},mceBlockQuote:function(){return u("blockquote")},Outdent:function(){var e;if(b.inline_styles){if((e=g.getParent(v.getStart(),g.isBlock))&&parseInt(e.style.paddingLeft)>0)return o;if((e=g.getParent(v.getEnd(),g.isBlock))&&parseInt(e.style.paddingLeft)>0)return o}return s("InsertUnorderedList")||s("InsertOrderedList")||!b.inline_styles&&!!g.getParent(v.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=g.getParent(v.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),d({"FontSize,FontName":function(e){var t,n=0;return(t=g.getParent(v.getNode(),"span"))&&(n="fontsize"==e?t.style.fontSize:t.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),n}},"value"),d({Undo:function(){i.undoManager.undo()},Redo:function(){i.undoManager.redo()}})}}(tinymce),function(e){var t=e.util.Dispatcher;e.UndoManager=function(n){function o(){return e.trim(n.getContent({format:"raw",no_events:1}).replace(/<span[^>]+data-mce-bogus[^>]+>[\u200B\uFEFF]+<\/span>/g,""))}function r(){i.typing=!1,i.add()}var i,a,s,c,d,l=0,u=[];return onBeforeAdd=new t(i),s=new t(i),c=new t(i),d=new t(i),s.add(function(e,t){return e.hasUndo()?n.onChange.dispatch(n,t,e):void 0}),c.add(function(e,t){return n.onUndo.dispatch(n,t,e)}),d.add(function(e,t){return n.onRedo.dispatch(n,t,e)}),n.onInit.add(function(){i.add()}),n.onBeforeExecCommand.add(function(e,t,n,o,r){"Undo"==t||"Redo"==t||"mceRepaint"==t||r&&r.skip_undo||i.beforeChange()}),n.onExecCommand.add(function(e,t,n,o,r){"Undo"==t||"Redo"==t||"mceRepaint"==t||r&&r.skip_undo||i.add()}),n.onSaveContent.add(r),n.dom.bind(n.dom.getRoot(),"dragend",r),n.dom.bind(n.getBody(),"focusout",function(){!n.removed&&i.typing&&r()}),n.onKeyUp.add(function(e,t){var n=t.keyCode;(n>=33&&36>=n||n>=37&&40>=n||45==n||13==n||t.ctrlKey)&&r()}),n.onKeyDown.add(function(e,t){var n=t.keyCode;return n>=33&&36>=n||n>=37&&40>=n||45==n?void(i.typing&&r()):void((16>n||n>20)&&224!=n&&91!=n&&!i.typing&&(i.beforeChange(),i.typing=!0,i.add()))}),n.onMouseDown.add(function(){i.typing&&r()}),n.addShortcut("ctrl+z","undo_desc","Undo"),n.addShortcut("ctrl+y","redo_desc","Redo"),i={data:u,typing:!1,onBeforeAdd:onBeforeAdd,onAdd:s,onUndo:c,onRedo:d,beforeChange:function(){a=n.selection.getBookmark(2,!0)},add:function(e){var t,r,s=n.settings;if(e=e||{},e.content=o(),i.onBeforeAdd.dispatch(i,e),r=u[l],r&&r.content==e.content)return null;if(u[l]&&(u[l].beforeBookmark=a),s.custom_undo_redo_levels&&u.length>s.custom_undo_redo_levels){for(t=0;t<u.length-1;t++)u[t]=u[t+1];u.length--,l=u.length}return e.bookmark=n.selection.getBookmark(2,!0),l<u.length-1&&(u.length=l+1),u.push(e),l=u.length-1,i.onAdd.dispatch(i,e),n.isNotDirty=0,e},undo:function(){var e;return i.typing&&(i.add(),i.typing=!1),l>0&&(e=u[--l],n.setContent(e.content,{format:"raw"}),n.selection.moveToBookmark(e.beforeBookmark),i.onUndo.dispatch(i,e)),e},redo:function(){var e;return l<u.length-1&&(e=u[++l],n.setContent(e.content,{format:"raw"}),n.selection.moveToBookmark(e.bookmark),i.onRedo.dispatch(i,e)),e},clear:function(){u=[],l=0,i.typing=!1},hasUndo:function(){return l>0||this.typing},hasRedo:function(){return l<u.length-1&&!this.typing}}}}(tinymce),tinymce.ForceBlocks=function(e){function t(){var t,a,s,c,d,l,u,f,p,m=r.getStart(),h=e.getBody(),g=-16777215;if(m&&1===m.nodeType&&n.forced_root_block){for(;m&&m!=h;){if(i[m.nodeName])return;m=m.parentNode}for(t=r.getRng(),t.setStart?(a=t.startContainer,s=t.startOffset,c=t.endContainer,d=t.endOffset):(t.item&&(m=t.item(0),t=e.getDoc().body.createTextRange(),t.moveToElementText(m)),p=t.parentElement().ownerDocument===e.getDoc(),tmpRng=t.duplicate(),tmpRng.collapse(!0),s=-1*tmpRng.move("character",g),tmpRng.collapsed||(tmpRng=t.duplicate(),tmpRng.collapse(!1),d=-1*tmpRng.move("character",g)-s)),m=h.firstChild;m;)if(3===m.nodeType||1==m.nodeType&&!i[m.nodeName]){if(3===m.nodeType&&0==m.nodeValue.length){u=m,m=m.nextSibling,o.remove(u);continue}l||(l=o.create(n.forced_root_block),m.parentNode.insertBefore(l,m),f=!0),u=m,m=m.nextSibling,l.appendChild(u)}else l=null,m=m.nextSibling;if(f){if(t.setStart)t.setStart(a,s),t.setEnd(c,d),r.setRng(t);else if(p)try{t=e.getDoc().body.createTextRange(),t.moveToElementText(h),t.collapse(!0),t.moveStart("character",s),d>0&&t.moveEnd("character",d),t.select()}catch(v){}e.nodeChanged()}}}var n=e.settings,o=e.dom,r=e.selection,i=e.schema.getBlockElements();n.forced_root_block&&(e.onKeyUp.add(t),e.onNodeChange.add(t))},function(e){var t=(e.DOM,e.dom.Event),n=e.each,o=e.extend;e.create("tinymce.ControlManager",{ControlManager:function(t,o){var r=this;o=o||{},r.editor=t,r.controls={},r.onAdd=new e.util.Dispatcher(r),r.onPostRender=new e.util.Dispatcher(r),r.prefix=o.prefix||t.id+"_",r._cls={},r.onPostRender.add(function(){n(r.controls,function(e){e.postRender()})})},get:function(e){return this.controls[this.prefix+e]||this.controls[e]},setActive:function(e,t){var n=null;return(n=this.get(e))&&n.setActive(t),n},setDisabled:function(e,t){var n=null;return(n=this.get(e))&&n.setDisabled(t),n},add:function(e){var t=this;return e&&(t.controls[e.id]=e,t.onAdd.dispatch(e,t)),e},createControl:function(e){var t,o,r,i,a=this,s=a.editor;for(a.controlFactories||(a.controlFactories=[],n(s.plugins,function(e){e.createControl&&a.controlFactories.push(e)})),i=a.controlFactories,o=0,r=i.length;r>o;o++)if(t=i[o].createControl(e,a))return a.add(t);return"|"===e||"separator"===e?a.createSeparator():s.buttons&&(t=s.buttons[e])?a.createButton(e,t):a.add(t)},createDropMenu:function(t,n,r){var i,a,s,c,d=this,l=d.editor;return n=o({"class":"mceDropDown",constrain:l.settings.constrain_menus},n),n["class"]=n["class"]+" "+l.getParam("skin")+"Skin",(s=l.getParam("skin_variant"))&&(n["class"]+=" "+l.getParam("skin")+"Skin"+s.substring(0,1).toUpperCase()+s.substring(1)),n["class"]+="rtl"==l.settings.directionality?" mceRtl":"",t=d.prefix+t,c=r||d._cls.dropmenu||e.ui.DropMenu,i=d.controls[t]=new c(t,n),i.onAddItem.add(function(e,t){var n=t.settings;n.title=l.getLang(n.title,n.title),n.onclick||(n.onclick=function(){n.cmd&&l.execCommand(n.cmd,n.ui||!1,n.value)})}),l.onRemove.add(function(){i.destroy()}),e.isIE&&(i.onShowMenu.add(function(){l.focus(),a=l.selection.getBookmark(1)}),i.onHideMenu.add(function(){a&&(l.selection.moveToBookmark(a),a=0)})),d.add(i)},createListBox:function(n,r,i){function a(t){return t.settings.use_accessible_selects&&!e.isGecko}var s,c,d=this,l=d.editor;return d.get(n)?null:(r.title=l.translate(r.title),r.scope=r.scope||l,r.onselect||(r.onselect=function(e){l.execCommand(r.cmd,r.ui||!1,e||r.value)}),r=o({title:r.title,"class":"mce_"+n,scope:r.scope,control_manager:d},r),n=d.prefix+n,l.settings.use_native_selects||a(l)?s=new e.ui.NativeListBox(n,r):(c=i||d._cls.listbox||e.ui.ListBox,s=new c(n,r,l)),d.controls[n]=s,e.isWebKit&&s.onPostRender.add(function(e,n){t.add(n,"mousedown",function(){l.bookmark=l.selection.getBookmark(1)}),t.add(n,"focus",function(){l.selection.moveToBookmark(l.bookmark),l.bookmark=null})}),s.hideMenu&&l.onMouseDown.add(s.hideMenu,s),d.add(s))},createButton:function(t,n,r){var i,a,s=this,c=s.editor;return s.get(t)?null:(n.title=c.translate(n.title),n.label=c.translate(n.label),n.scope=n.scope||c,n.onclick||n.menu_button||(n.onclick=function(){c.execCommand(n.cmd,n.ui||!1,n.value)}),n=o({title:n.title,"class":"mce_"+t,unavailable_prefix:c.getLang("unavailable",""),scope:n.scope,control_manager:s},n),t=s.prefix+t,n.menu_button?(a=r||s._cls.menubutton||e.ui.MenuButton,i=new a(t,n,c),c.onMouseDown.add(i.hideMenu,i)):(a=s._cls.button||e.ui.Button,i=new a(t,n,c)),s.add(i))},createMenuButton:function(e,t,n){return t=t||{},t.menu_button=1,this.createButton(e,t,n)},createSplitButton:function(t,n,r){var i,a,s=this,c=s.editor;return s.get(t)?null:(n.title=c.translate(n.title),n.scope=n.scope||c,n.onclick||(n.onclick=function(e){c.execCommand(n.cmd,n.ui||!1,e||n.value)}),n.onselect||(n.onselect=function(e){c.execCommand(n.cmd,n.ui||!1,e||n.value)}),n=o({title:n.title,"class":"mce_"+t,scope:n.scope,control_manager:s},n),t=s.prefix+t,a=r||s._cls.splitbutton||e.ui.SplitButton,i=s.add(new a(t,n,c)),c.onMouseDown.add(i.hideMenu,i),i)},createColorSplitButton:function(t,n,r){var i,a,s,c=this,d=c.editor;return c.get(t)?null:(n.title=d.translate(n.title),n.scope=n.scope||d,n.onclick||(n.onclick=function(t){e.isIE&&(s=d.selection.getBookmark(1)),d.execCommand(n.cmd,n.ui||!1,t||n.value)}),n.onselect||(n.onselect=function(e){d.execCommand(n.cmd,n.ui||!1,e||n.value)}),n=o({title:n.title,"class":"mce_"+t,menu_class:d.getParam("skin")+"Skin",scope:n.scope,more_colors_title:d.getLang("more_colors")},n),t=c.prefix+t,a=r||c._cls.colorsplitbutton||e.ui.ColorSplitButton,i=new a(t,n,d),d.onMouseDown.add(i.hideMenu,i),d.onRemove.add(function(){i.destroy()}),e.isIE&&(i.onShowMenu.add(function(){d.focus(),s=d.selection.getBookmark(1)}),i.onHideMenu.add(function(){s&&(d.selection.moveToBookmark(s),s=0)})),c.add(i))},createToolbar:function(t,n,o){var r,i,a=this;return t=a.prefix+t,i=o||a._cls.toolbar||e.ui.Toolbar,r=new i(t,n,a.editor),a.get(t)?null:a.add(r)},createToolbarGroup:function(t,n,o){var r,i,a=this;return t=a.prefix+t,i=o||this._cls.toolbarGroup||e.ui.ToolbarGroup,r=new i(t,n,a.editor),a.get(t)?null:a.add(r)},createSeparator:function(t){var n=t||this._cls.separator||e.ui.Separator;return new n},setControlType:function(e,t){return this._cls[e.toLowerCase()]=t},destroy:function(){n(this.controls,function(e){e.destroy()}),this.controls=null}})}(tinymce),function(e){var t=e.util.Dispatcher,n=e.each,o=e.isIE,r=e.isOpera;e.create("tinymce.WindowManager",{WindowManager:function(e){var n=this;n.editor=e,n.onOpen=new t(n),n.onClose=new t(n),n.params={},n.features={}},open:function(t,i){var a,s,c,d,l=this,u="",f="modal"==l.editor.settings.dialog_type,p=e.DOM.getViewPort();t=t||{},i=i||{},s=r?p.w:screen.width,c=r?p.h:screen.height,t.name=t.name||"mc_"+(new Date).getTime(),t.width=parseInt(t.width||320),t.height=parseInt(t.height||240),t.resizable=!0,t.left=t.left||parseInt(s/2)-t.width/2,t.top=t.top||parseInt(c/2)-t.height/2,i.inline=!1,i.mce_width=t.width,i.mce_height=t.height,i.mce_auto_focus=t.auto_focus,f&&o&&(t.center=!0,t.help=!1,t.dialogWidth=t.width+"px",t.dialogHeight=t.height+"px",t.scroll=t.scrollbars||!1),n(t,function(t,n){e.is(t,"boolean")&&(t=t?"yes":"no"),/^(name|url)$/.test(n)||(u+=o&&f?(u?";":"")+n+":"+t:(u?",":"")+n+"="+t)}),l.features=t,l.params=i,l.onOpen.dispatch(l,t,i),d=t.url||t.file,d=e._addVer(d);try{o&&f?(a=1,window.showModalDialog(d,window,u)):a=window.open(d,t.name,u)}catch(m){}a||alert(l.editor.getLang("popup_blocked"))},close:function(e){e.close(),this.onClose.dispatch(this)},createInstance:function(t,n,o,r,i,a){var s=e.resolve(t);return new s(n,o,r,i,a)},confirm:function(e,t,n,o){o=o||window,t.call(n||this,o.confirm(this._decode(this.editor.getLang(e,e))))},alert:function(e,t,n,o){var r=this;o=o||window,o.alert(r._decode(r.editor.getLang(e,e))),t&&t.call(n||r)},resizeBy:function(e,t,n){n.resizeBy(e,t)},_decode:function(t){return e.DOM.decode(t).replace(/\\n/g,"\n")}})}(tinymce),function(e){e.Formatter=function(t){function n(e){return e.nodeType&&(e=e.nodeName),!!t.schema.getTextBlockElements()[e.toLowerCase()]}function o(e,t){return P.getParents(e,t,P.getRoot())}function r(e){return 1===e.nodeType&&"_mce_caret"===e.id}function i(){c({alignleft:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"left"},defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"center"},defaultBlock:"div"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"right"},defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"right"}}],alignfull:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li",styles:{textAlign:"justify"},defaultBlock:"div"}],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(){return!0},onformat:function(e,t,n){D(n,function(t,n){P.setAttrib(e,n,t)})}},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}]}),D("p h1 h2 h3 h4 h5 h6 div address pre div code dt dd samp".split(/\s/),function(e){c(e,{block:e,remove:"all"})}),c(t.settings.formats)}function a(){t.addShortcut("ctrl+b","bold_desc","Bold"),t.addShortcut("ctrl+i","italic_desc","Italic"),t.addShortcut("ctrl+u","underline_desc","Underline");for(var e=1;6>=e;e++)t.addShortcut("ctrl+"+e,"",["FormatBlock",!1,"h"+e]);t.addShortcut("ctrl+7","",["FormatBlock",!1,"p"]),t.addShortcut("ctrl+8","",["FormatBlock",!1,"div"]),t.addShortcut("ctrl+9","",["FormatBlock",!1,"address"])}function s(e){return e?I[e]:I}function c(e,t){e&&("string"!=typeof e?D(e,function(e,t){c(t,e)}):(t=t.length?t:[t],D(t,function(e){e.deep===L&&(e.deep=!e.selector),e.split===L&&(e.split=!e.selector||e.inline),e.remove===L&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),I[e]=t))}function d(o,i,a){function c(e,t){t=t||b,e&&(t.onformat&&t.onformat(e,t,i,a),D(t.styles,function(t,n){P.setStyle(e,n,C(t,i))}),D(t.attributes,function(t,n){P.setAttrib(e,n,C(t,i))}),D(t.classes,function(t){t=C(t,i),P.hasClass(e,t)||P.addClass(e,t)}))}function l(){function e(e,t){var n=new H(t);for(a=n.current();a;a=n.prev())if(a.childNodes.length>1||a==e||"BR"==a.tagName)return a}var n=t.selection.getRng(),o=n.startContainer,r=n.endContainer;if(o!=r&&0===n.endOffset){var i=e(o,r),s=3==i.nodeType?i.length:i.childNodes.length;n.setEnd(i,s)}return n}function u(t,n,o,r,i){var a,s,c=[],d=-1,l=-1,u=-1;return D(t.childNodes,function(e,t){return"UL"===e.nodeName||"OL"===e.nodeName?(d=t,a=e,!1):void 0}),D(t.childNodes,function(e,t){"SPAN"===e.nodeName&&"bookmark"==P.getAttrib(e,"data-mce-type")&&(e.id==n.id+"_start"?l=t:e.id==n.id+"_end"&&(u=t))}),0>=d||d>l&&u>d?(D(e.grep(t.childNodes),i),0):(s=P.clone(o,j),D(e.grep(t.childNodes),function(e,t){(d>l&&d>t||l>d&&t>d)&&(c.push(e),e.parentNode.removeChild(e))}),d>l?t.insertBefore(s,a):l>d&&t.insertBefore(s,a.nextSibling),r.push(s),D(c,function(e){s.appendChild(e)}),s)}function p(t,a,s){var d,l,p=[],m=!0;d=b.inline||b.block,l=P.create(d),c(l),F.walk(t,function(t){function h(t){var C,x,E,S,k;return k=m,C=t.nodeName.toLowerCase(),x=t.parentNode.nodeName.toLowerCase(),1===t.nodeType&&G(t)&&(k=m,m="true"===G(t),S=!0),y(C,"br")?(v=0,void(b.block&&P.remove(t))):b.wrapper&&f(t,o,i)?void(v=0):m&&!S&&b.block&&!b.wrapper&&n(C)?(t=P.rename(t,d),c(t),p.push(t),void(v=0)):b.selector&&(D(g,function(e){"collapsed"in e&&e.collapsed!==_||P.is(t,e.selector)&&!r(t)&&(c(t,e),E=!0)}),!b.inline||E)?void(v=0):void(!m||S||!U(d,C)||!U(x,d)||!s&&3===t.nodeType&&1===t.nodeValue.length&&65279===t.nodeValue.charCodeAt(0)||r(t)||b.inline&&V(t)?"li"==C&&a?v=u(t,a,l,p,h):(v=0,D(e.grep(t.childNodes),h),S&&(m=k),v=0):(v||(v=P.clone(l,j),t.parentNode.insertBefore(v,t),p.push(v)),v.appendChild(t)))}var v;D(t,h)}),b.wrap_links===!1&&D(p,function(t){function n(t){var o,r,i;if("A"===t.nodeName){for(r=P.clone(l,j),p.push(r),i=e.grep(t.childNodes),o=0;o<i.length;o++)r.appendChild(i[o]);t.appendChild(r)}D(e.grep(t.childNodes),n)}n(t)}),D(p,function(e){function t(e){var t=0;return D(e.childNodes,function(e){x(e)||N(e)||t++}),t}function n(e){var t,n;return D(e.childNodes,function(e){return 1!=e.nodeType||N(e)||r(e)?void 0:(t=e,j)}),t&&v(t,b)&&(n=P.clone(t,j),c(n),P.replace(n,e,W),P.remove(t,1)),n||e}var a;if(a=t(e),(p.length>1||!V(e))&&0===a)return void P.remove(e,1);if(b.inline||b.wrapper){if(b.exact||1!==a||(e=n(e)),D(g,function(t){D(P.select(t.inline,e),function(e){var n;if(t.wrap_links===!1){n=e.parentNode;do if("A"===n.nodeName)return;while(n=n.parentNode)}S(t,i,e,t.exact?e:null)})}),f(e.parentNode,o,i))return P.remove(e,1),e=0,W;b.merge_with_parents&&P.getParent(e.parentNode,function(t){return f(t,o,i)?(P.remove(e,1),e=0,W):void 0}),e&&b.merge_siblings!==!1&&(e=T(w(e),e),e=T(e,w(e,W)))}})}var m,h,g=s(o),b=g[0],_=O.isCollapsed();if(b)if(a)a.nodeType?(h=P.createRng(),h.setStartBefore(a),h.setEndAfter(a),p(E(h,g),null,!0)):p(a,null,!0);else if(_&&b.inline&&!P.select("td.mceSelected,th.mceSelected").length)B("apply",o,i);else{var k=t.selection.getNode();z||!g[0].defaultBlock||P.getParent(k,P.isBlock)||d(g[0].defaultBlock),t.selection.setRng(l()),m=O.getBookmark(),p(E(O.getRng(W),g),m),b.styles&&(b.styles.color||b.styles.textDecoration)&&(e.walk(k,X,"childNodes"),X(k)),O.moveToBookmark(m),M(O.getRng(W)),t.nodeChanged()}}function l(n,r,i){function a(t){var n,o,i,s,c;if(3!==t.nodeType){if(1===t.nodeType&&G(t)&&(s=b,b="true"===G(t),c=!0),n=e.grep(t.childNodes),b&&!c)for(o=0,i=v.length;i>o&&!S(v[o],r,t,t);o++);if(y.deep&&n.length){for(o=0,i=n.length;i>o;o++)a(n[o]);c&&(b=s)}}}function c(e){var t;return D(o(e.parentNode).reverse(),function(e){var o;t||"_start"==e.id||"_end"==e.id||(o=f(e,n,r),o&&o.split!==!1&&(t=e))}),t}function d(e,t,n,o){var i,a,s,c,d,l;if(e){for(l=e.parentNode,i=t.parentNode;i&&i!=l;i=i.parentNode){for(a=P.clone(i,j),d=0;d<v.length;d++)if(S(v[d],r,a,a)){a=0;break}a&&(s&&a.appendChild(s),c||(c=a),s=a)}!o||y.mixed&&V(e)||(t=P.split(e,t)),s&&(n.parentNode.insertBefore(s,n),c.appendChild(n))}return t}function l(e){return d(c(e),e,e,!0)}function u(e){var t=P.get(e?"_start":"_end"),n=t[e?"firstChild":"lastChild"];return N(n)&&(n=n[e?"firstChild":"lastChild"]),P.remove(t,!0),n}function m(e){var n,o;e=E(e,v,W),y.split&&(n=A(e,W),o=A(e),n!=o?(/^(TR|TD)$/.test(n.nodeName)&&n.firstChild&&(n=("TD"==n.nodeName?n.firstChild:n.firstChild.firstChild)||n),n=_(n,"span",{id:"_start","data-mce-type":"bookmark"}),o=_(o,"span",{id:"_end","data-mce-type":"bookmark"}),l(n),l(o),n=u(W),o=u()):n=o=l(n),e.startContainer=n.parentNode,e.startOffset=q(n),e.endContainer=o.parentNode,e.endOffset=q(o)+1),F.walk(e,function(e){D(e,function(e){a(e),1===e.nodeType&&"underline"===t.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===Y(e.parentNode)&&S({deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)})})}var h,g,v=s(n),y=v[0],b=!0;return i?void(i.nodeType?(g=P.createRng(),g.setStartBefore(i),g.setEndAfter(i),m(g)):m(i)):void(O.isCollapsed()&&y.inline&&!P.select("td.mceSelected,th.mceSelected").length?B("remove",n,r):(h=O.getBookmark(),m(O.getRng(W)),O.moveToBookmark(h),y.inline&&p(n,r,O.getStart())&&M(O.getRng(!0)),t.nodeChanged()))}function u(e,t,n){var o=s(e);!p(e,t,n)||"toggle"in o[0]&&!o[0].toggle?d(e,t,n):l(e,t,n)}function f(e,t,n,o){function r(e,t,r){var i,a,s,c=t[r];if(t.onmatch)return t.onmatch(e,t,r);if(c)if(c.length===L){for(i in c)if(c.hasOwnProperty(i)){if(a="attributes"===r?P.getAttrib(e,i):b(e,i),o&&!a&&!t.exact)return;if((!o||t.exact)&&!y(a,C(c[i],n)))return}}else for(s=0;s<c.length;s++)if("attributes"===r?P.getAttrib(e,c[s]):b(e,c[s]))return t;return t}var i,a,c,d=s(t);if(d&&e)for(a=0;a<d.length;a++)if(i=d[a],v(e,i)&&r(e,i,"attributes")&&r(e,i,"styles")){if(c=i.classes)for(a=0;a<c.length;a++)if(!P.hasClass(e,c[a]))return;return i}}function p(e,t,n){function o(n){return n=P.getParent(n,function(n){return!!f(n,e,t,!0)}),f(n,e,t)}var r;return n?o(n):(n=O.getNode(),o(n)?W:(r=O.getStart(),r!=n&&o(r)?W:j))}function m(e,t){var n,o=[],r={};return n=O.getStart(),P.getParent(n,function(n){var i,a;for(i=0;i<e.length;i++)a=e[i],!r[a]&&f(n,a,t)&&(r[a]=!0,o.push(a))},P.getRoot()),o}function h(e){var t,n,r,i,a,c=s(e);if(c)for(t=O.getStart(),n=o(t),i=c.length-1;i>=0;i--){if(a=c[i].selector,!a)return W;for(r=n.length-1;r>=0;r--)if(P.is(n[r],a))return W}return j}function g(e,n,r){var i;return R||(R={},i={},t.onNodeChange.addToTop(function(e,t,n){var r=o(n),a={};D(R,function(e,t){D(r,function(n){return f(n,t,{},e.similar)?(i[t]||(D(e,function(e){e(!0,{node:n,format:t,parents:r})}),i[t]=e),a[t]=e,!1):void 0})}),D(i,function(e,t){a[t]||(delete i[t],D(e,function(e){e(!1,{node:n,format:t,parents:r})}))})})),D(e.split(","),function(e){R[e]||(R[e]=[],R[e].similar=r),R[e].push(n)}),this}function v(e,t){return y(e,t.inline)?W:y(e,t.block)?W:t.selector?P.is(e,t.selector):void 0}function y(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()==t.toLowerCase()}function b(e,t){var n=P.getStyle(e,t);return("color"==t||"backgroundColor"==t)&&(n=P.toHex(n)),"fontWeight"==t&&700==n&&(n="bold"),""+n}function C(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e}function x(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function _(e,t,n){var o=P.create(t,n);return e.parentNode.insertBefore(o,e),o.appendChild(e),o}function E(e,r,i){function a(e){function t(e){return"BR"==e.nodeName&&e.getAttribute("data-mce-bogus")&&!e.nextSibling}var n,o,i,a,s;if(n=o=e?h:v,a=e?"previousSibling":"nextSibling",s=P.getRoot(),3==n.nodeType&&!x(n)&&(e?g>0:b<n.nodeValue.length))return n;for(;;){if(!r[0].block_expand&&V(o))return o;for(i=o[a];i;i=i[a])if(!N(i)&&!x(i)&&!t(i))return o;if(o.parentNode==s){n=o;break}o=o.parentNode}return n}function s(e,t){for(t===L&&(t=3===e.nodeType?e.length:e.childNodes.length);e&&e.hasChildNodes();)e=e.childNodes[t],e&&(t=3===e.nodeType?e.length:e.childNodes.length);return{node:e,offset:t}}function c(e){for(var t=e;t;){if(1===t.nodeType&&G(t))return"false"===G(t)?t:e;t=t.parentNode}return e}function d(e,n,o){function r(e,t){var n,r,a=e.nodeValue;return"undefined"==typeof t&&(t=o?a.length:0),o?(n=a.lastIndexOf(" ",t),r=a.lastIndexOf("\xa0",t),n=n>r?n:r,-1===n||i||n++):(n=a.indexOf(" ",t),r=a.indexOf("\xa0",t),n=-1!==n&&(-1===r||r>n)?n:r),n}var a,s,c,d;if(3===e.nodeType){if(c=r(e,n),-1!==c)return{container:e,offset:c};d=e}for(a=new H(e,P.getParent(e,V)||t.getBody());s=a[o?"prev":"next"]();)if(3===s.nodeType){if(d=s,c=r(s),-1!==c)return{container:s,offset:c}}else if(V(s))break;return d?(n=o?0:d.length,{container:d,offset:n}):void 0}function l(t,n){var i,a,s,c;for(3==t.nodeType&&0===t.nodeValue.length&&t[n]&&(t=t[n]),i=o(t),a=0;a<i.length;a++)for(s=0;s<r.length;s++)if(c=r[s],!("collapsed"in c&&c.collapsed!==e.collapsed)&&P.is(i[a],c.selector))return i[a];return t}function u(e,t){var i;if(r[0].wrapper||(i=P.getParent(e,r[0].block)),i||(i=P.getParent(3==e.nodeType?e.parentNode:e,n)),i&&r[0].wrapper&&(i=o(i,"ul,ol").reverse()[0]||i),!i)for(i=e;i[t]&&!V(i[t])&&(i=i[t],!y(i,"br")););return i||e}var f,p,m,h=e.startContainer,g=e.startOffset,v=e.endContainer,b=e.endOffset;if(1==h.nodeType&&h.hasChildNodes()&&(f=h.childNodes.length-1,h=h.childNodes[g>f?f:g],3==h.nodeType&&(g=0)),1==v.nodeType&&v.hasChildNodes()&&(f=v.childNodes.length-1,v=v.childNodes[b>f?f:b-1],3==v.nodeType&&(b=v.nodeValue.length)),h=c(h),v=c(v),(N(h.parentNode)||N(h))&&(h=N(h)?h:h.parentNode,h=h.nextSibling||h,3==h.nodeType&&(g=0)),(N(v.parentNode)||N(v))&&(v=N(v)?v:v.parentNode,v=v.previousSibling||v,3==v.nodeType&&(b=v.length)),r[0].inline&&(e.collapsed&&(m=d(h,g,!0),m&&(h=m.container,g=m.offset),m=d(v,b),m&&(v=m.container,b=m.offset)),p=s(v,b),p.node)){for(;p.node&&0===p.offset&&p.node.previousSibling;)p=s(p.node.previousSibling);p.node&&p.offset>0&&3===p.node.nodeType&&" "===p.node.nodeValue.charAt(p.offset-1)&&p.offset>1&&(v=p.node,v.splitText(p.offset-1))}return(r[0].inline||r[0].block_expand)&&(r[0].inline&&3==h.nodeType&&0!==g||(h=a(!0)),r[0].inline&&3==v.nodeType&&b!==v.nodeValue.length||(v=a())),r[0].selector&&r[0].expand!==j&&!r[0].inline&&(h=l(h,"previousSibling"),v=l(v,"nextSibling")),(r[0].block||r[0].selector)&&(h=u(h,"previousSibling"),v=u(v,"nextSibling"),r[0].block&&(V(h)||(h=a(!0)),V(v)||(v=a()))),1==h.nodeType&&(g=q(h),h=h.parentNode),1==v.nodeType&&(b=q(v)+1,v=v.parentNode),{startContainer:h,startOffset:g,endContainer:v,endOffset:b}}function S(e,t,n,o){var r,i,a;if(!v(n,e))return j;if("all"!=e.remove)for(D(e.styles,function(e,r){e=C(e,t),"number"==typeof r&&(r=e,o=0),(!o||y(b(o,r),e))&&P.setStyle(n,r,""),a=1}),a&&""==P.getAttrib(n,"style")&&(n.removeAttribute("style"),n.removeAttribute("data-mce-style")),D(e.attributes,function(e,r){var i;if(e=C(e,t),"number"==typeof r&&(r=e,o=0),!o||y(P.getAttrib(o,r),e)){if("class"==r&&(e=P.getAttrib(n,r),e&&(i="",D(e.split(/\s+/),function(e){/mce\w+/.test(e)&&(i+=(i?" ":"")+e)}),i)))return void P.setAttrib(n,r,i);"class"==r&&n.removeAttribute("className"),$.test(r)&&n.removeAttribute("data-mce-"+r),n.removeAttribute(r)}}),D(e.classes,function(e){e=C(e,t),(!o||P.hasClass(o,e))&&P.removeClass(n,e)}),i=P.getAttribs(n),r=0;r<i.length;r++)if(0!==i[r].nodeName.indexOf("_"))return j;return"none"!=e.remove?(k(n,e),W):void 0}function k(t,n){function o(e,t,n){return e=w(e,t,n),!e||"BR"==e.nodeName||V(e)}var r,i=t.parentNode;n.block&&(z?i==P.getRoot()&&(n.list_block&&y(t,n.list_block)||D(e.grep(t.childNodes),function(e){U(z,e.nodeName.toLowerCase())?r?r.appendChild(e):r=_(e,z):r=0})):V(t)&&!V(i)&&(o(t,j)||o(t.firstChild,W,1)||t.insertBefore(P.create("br"),t.firstChild),o(t,W)||o(t.lastChild,j,1)||t.appendChild(P.create("br")))),n.selector&&n.inline&&!y(n.inline,t)||P.remove(t,1)}function w(e,t,n){if(e)for(t=t?"nextSibling":"previousSibling",e=n?e:e[t];e;e=e[t])if(1==e.nodeType||!x(e))return e}function N(e){return e&&1==e.nodeType&&"bookmark"==e.getAttribute("data-mce-type")}function T(t,n){function o(e,t){function n(e){var t={};return D(P.getAttribs(e),function(n){var o=n.nodeName.toLowerCase();0!==o.indexOf("_")&&"style"!==o&&(t[o]=P.getAttrib(e,o))}),t}function o(e,t){var n,o;for(o in e)if(e.hasOwnProperty(o)){if(n=t[o],n===L)return j;if(e[o]!=n)return j;delete t[o]}for(o in t)if(t.hasOwnProperty(o))return j;return W}return e.nodeName!=t.nodeName?j:o(n(e),n(t))&&o(P.parseStyle(P.getAttrib(e,"style")),P.parseStyle(P.getAttrib(t,"style")))?W:j}function r(e,t){for(i=e;i;i=i[t]){if(3==i.nodeType&&0!==i.nodeValue.length)return e;if(1==i.nodeType&&!N(i))return i}return e}var i,a;if(t&&n&&(t=r(t,"previousSibling"),n=r(n,"nextSibling"),o(t,n))){for(i=t.nextSibling;i&&i!=n;)a=i,i=i.nextSibling,t.appendChild(a);return P.remove(n),D(e.grep(n.childNodes),function(e){t.appendChild(e)}),t}return n}function A(e,n){var o,r,i;return o=e[n?"startContainer":"endContainer"],r=e[n?"startOffset":"endOffset"],1==o.nodeType&&(i=o.childNodes.length-1,!n&&r&&r--,o=o.childNodes[r>i?i:r]),3===o.nodeType&&n&&r>=o.nodeValue.length&&(o=new H(o,t.getBody()).next()||o),3!==o.nodeType||n||0!==r||(o=new H(o,t.getBody()).prev()||o),o}function B(o,r,i){function a(e){var n=P.create("span",{id:y,"data-mce-bogus":!0,style:b?"color:red":""});return e&&n.appendChild(t.getDoc().createTextNode(K)),n}function c(e,t){for(;e;){if(3===e.nodeType&&e.nodeValue!==K||e.childNodes.length>1)return!1;t&&1===e.nodeType&&t.push(e),e=e.firstChild}return!0}function u(e){for(;e;){if(e.id===y)return e;e=e.parentNode}}function p(e){var t;if(e)for(t=new H(e,e),e=t.current();e;e=t.next())if(3===e.nodeType)return e}function m(e,t){var n,o;if(e)o=O.getRng(!0),c(e)?(t!==!1&&(o.setStartBefore(e),o.setEndBefore(e)),P.remove(e)):(n=p(e),n.nodeValue.charAt(0)===K&&(n=n.deleteData(0,1)),P.remove(e,1)),O.setRng(o);else if(e=u(O.getStart()),!e)for(;e=P.get(y);)m(e,!1)}function h(){var e,t,n,o,c,l,f;e=O.getRng(!0),o=e.startOffset,l=e.startContainer,f=l.nodeValue,t=u(O.getStart()),t&&(n=p(t)),f&&o>0&&o<f.length&&/\w/.test(f.charAt(o))&&/\w/.test(f.charAt(o-1))?(c=O.getBookmark(),e.collapse(!0),e=E(e,s(r)),e=F.split(e),d(r,i,e),O.moveToBookmark(c)):(t&&n.nodeValue===K?d(r,i,t):(t=a(!0),n=t.firstChild,e.insertNode(t),o=1,d(r,i,t)),O.setCursorLocation(n,o))}function g(){var e,t,o,c,d,u,p,m,h=O.getRng(!0),g=[];for(e=h.startContainer,t=h.startOffset,d=e,3==e.nodeType&&((t!=e.nodeValue.length||e.nodeValue===K)&&(c=!0),d=d.parentNode);d;){if(f(d,r,i)){u=d;break}d.nextSibling&&(c=!0),g.push(d),d=d.parentNode}if(u)if(c)o=O.getBookmark(),h.collapse(!0),h=E(h,s(r),!0),h=F.split(h),l(r,i,h),O.moveToBookmark(o);else{for(m=a(),d=m,p=g.length-1;p>=0;p--)d.appendChild(P.clone(g[p],!1)),d=d.firstChild;d.appendChild(P.doc.createTextNode(K)),d=d.firstChild;var v=P.getParent(u,n);v&&P.isEmpty(v)?u.parentNode.replaceChild(m,u):P.insertAfter(m,u),O.setCursorLocation(d,1),P.isEmpty(u)&&P.remove(u)}}function v(){var t;t=u(O.getStart()),t&&!P.isEmpty(t)&&e.walk(t,function(e){1!=e.nodeType||e.id===y||P.isEmpty(e)||P.setAttrib(e,"data-mce-bogus",null)},"childNodes")}var y="_mce_caret",b=t.settings.caret_debug;self._hasCaretEvents||(t.onBeforeGetContent.addToTop(function(){var e,t=[];if(c(u(O.getStart()),t))for(e=t.length;e--;)P.setAttrib(t[e],"data-mce-bogus","1")}),e.each("onMouseUp onKeyUp".split(" "),function(e){t[e].addToTop(function(){m(),v()})}),t.onKeyDown.addToTop(function(e,t){var n=t.keyCode;(8==n||37==n||39==n)&&m(u(O.getStart())),v()}),O.onSetContent.add(v),self._hasCaretEvents=!0),"apply"==o?h():g()}function M(e){var t,n,o,r,i,a=e.startContainer,s=e.startOffset;if(3==a.nodeType&&s>=a.nodeValue.length&&(s=q(a),a=a.parentNode,t=!0),1==a.nodeType)for(r=a.childNodes,a=r[Math.min(s,r.length-1)],n=new H(a,P.getParent(a,P.isBlock)),(s>r.length-1||t)&&n.next(),o=n.current();o;o=n.next())if(3==o.nodeType&&!x(o))return i=P.create("a",null,K),o.parentNode.insertBefore(i,o),e.setStart(o,0),O.setRng(e),void P.remove(i)}var R,L,I={},D=e.each,P=t.dom,O=t.selection,H=e.dom.TreeWalker,F=new e.dom.RangeUtils(P),U=t.schema.isValidChild,V=(e.isArray,P.isBlock),z=t.settings.forced_root_block,q=P.nodeIndex,K="\ufeff",$=/^(src|href|style)$/,j=!1,W=!0,G=P.getContentEditable,Y=function(e){var n;return t.dom.getParent(e,function(e){return n=t.dom.getStyle(e,"text-decoration"),n&&"none"!==n}),n},X=function(e){var n;1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType&&(n=Y(e.parentNode),t.dom.getStyle(e,"color")&&n?t.dom.setStyle(e,"text-decoration",n):t.dom.getStyle(e,"textdecoration")===n&&t.dom.setStyle(e,"text-decoration",null))};e.extend(this,{get:s,register:c,apply:d,remove:l,toggle:u,match:p,matchAll:m,matchNode:f,canApply:h,formatChanged:g}),i(),a()}}(tinymce),tinymce.onAddEditor.add(function(e,t){function n(t,n){e.each(n,function(e,n){e&&a.setStyle(t,n,e)}),a.rename(t,"span")}function o(n,o){a=n.dom,s.convert_fonts_to_spans&&e.each(a.select("font,u,strike",o.node),function(e){r[e.nodeName.toLowerCase()](t.dom,e)})}var r,i,a,s=t.settings;s.inline_styles&&(i=e.explode(s.font_size_legacy_values),r={font:function(e,t){n(t,{backgroundColor:t.style.backgroundColor,color:t.color,fontFamily:t.face,fontSize:i[parseInt(t.size,10)-1]})},u:function(e,t){n(t,{textDecoration:"underline"})},strike:function(e,t){n(t,{textDecoration:"line-through"})}},t.onPreProcess.add(o),t.onSetContent.add(o),t.onInit.add(function(){t.selection.onSetContent.add(o)}))}),function(e){var t=e.dom.TreeWalker;e.EnterKey=function(n){function o(o){function d(e){return e&&r.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&!/^(fixed|absolute)/i.test(e.style.position)&&"true"!==r.getContentEditable(e)}function l(t){var n;e.isIE&&!e.isIE11&&r.isBlock(t)&&(n=i.getRng(),t.appendChild(r.create("span",null,"\xa0")),i.select(t),t.lastChild.outerHTML="",i.setRng(n))}function u(e){for(var t,n=e,o=[];n=n.firstChild;){if(r.isBlock(n))return;1!=n.nodeType||c[n.nodeName.toLowerCase()]||o.push(n)
}for(t=o.length;t--;)n=o[t],!n.hasChildNodes()||n.firstChild==n.lastChild&&""===n.firstChild.nodeValue?r.remove(n):"A"==n.nodeName&&" "===(n.innerText||n.textContent)&&r.remove(n)}function f(e){var o,a,s,d,l,u,f=e;if(s=r.createRng(),e.hasChildNodes()){for(o=new t(e,e);a=o.current();){if(3==a.nodeType){s.setStart(a,0),s.setEnd(a,0);break}if(c[a.nodeName.toLowerCase()]){s.setStartBefore(a),s.setEndBefore(a);break}f=a,a=o.next()}a||(s.setStart(f,0),s.setEnd(f,0))}else"BR"==e.nodeName?e.nextSibling&&r.isBlock(e.nextSibling)?((!N||9>N)&&(u=r.create("br"),e.parentNode.insertBefore(u,e)),s.setStartBefore(e),s.setEndBefore(e)):(s.setStartAfter(e),s.setEndAfter(e)):(s.setStart(e,0),s.setEnd(e,0));i.setRng(s),r.remove(u),l=r.getViewPort(n.getWin()),d=r.getPos(e).y,(d<l.y||d+25>l.y+l.h)&&n.getWin().scrollTo(0,d<l.y?d:d-l.h+25)}function p(t){var n,o,i,s=S;if(n=t||"TABLE"==R?r.create(t||I):w.cloneNode(!1),i=n,a.keep_styles!==!1)do if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(s.nodeName)){if("_mce_caret"==s.id)continue;o=s.cloneNode(!1),r.setAttrib(o,"id",""),n.hasChildNodes()?(o.appendChild(n.firstChild),n.appendChild(o)):(i=o,n.appendChild(o))}while(s=s.parentNode);return(!e.isIE||e.isIE11)&&(i.innerHTML='<br data-mce-bogus="1">'),n}function m(e){var n,o,r;if(3==S.nodeType&&(e?k>0:k<S.nodeValue.length))return!1;if(S.parentNode==w&&D&&!e)return!0;if(e&&1==S.nodeType&&S==w.firstChild)return!0;if("TABLE"===S.nodeName||S.previousSibling&&"TABLE"==S.previousSibling.nodeName)return D&&!e||!D&&e;for(n=new t(S,w),3==S.nodeType&&(e&&0==k?n.prev():e||k!=S.nodeValue.length||n.next());o=n.current();){if(1===o.nodeType){if(!o.getAttribute("data-mce-bogus")&&(r=o.nodeName.toLowerCase(),c[r]&&"br"!==r))return!1}else if(3===o.nodeType&&!/^[ \t\r\n]*$/.test(o.nodeValue))return!1;e?n.prev():n.next()}return!0}function h(e,t){var n,o,i,a,s,c=I||"P";if(o=r.getParent(e,r.isBlock),!o||!d(o)){if(o=o||E,!o.hasChildNodes())return n=r.create(c),o.appendChild(n),P.setStart(n,0),P.setEnd(n,0),n;for(a=e;a.parentNode!=o;)a=a.parentNode;for(;a&&!r.isBlock(a);)i=a,a=a.previousSibling;if(i){for(n=r.create(c),i.parentNode.insertBefore(n,i),a=i;a&&!r.isBlock(a);)s=a.nextSibling,n.appendChild(a),a=s;P.setStart(e,t),P.setEnd(e,t)}}return e}function g(){function e(e){for(var t=M[e?"firstChild":"lastChild"];t&&1!=t.nodeType;)t=t[e?"nextSibling":