diff -r 318533413200 -r a1707c607eec src/pyams_skin/resources/js/ext/tinymce/dev/tinymce.min.js --- a/src/pyams_skin/resources/js/ext/tinymce/dev/tinymce.min.js Sun Jul 19 02:02:20 2020 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -!function(e,t){"use strict";function n(e,t){for(var n,i=[],a=0;aC.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[O]=!0,e}function r(e){var t=A.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),i=e.length;i--;)C.attrHandle[n[i]]=t}function a(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return i(function(t){return t=+t,i(function(n,i){for(var r,o=e([],n.length,t),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function l(e){return e&&typeof e.getElementsByTagName!==q&&e}function c(){}function u(e){for(var t=0,n=e.length,i="";t1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function m(t,n,i){for(var r=0,o=n.length;r-1&&(i[c]=!(a[c]=d))}}else b=p(b===a?b.splice(g,b.length):b),o?o(null,a,b,l):J.apply(a,b)})}function g(e){for(var t,n,i,r=e.length,o=C.relative[e[0].type],a=o||C.relative[" "],s=o?1:0,l=d(function(e){return e===t},a,!0),c=d(function(e){return Z.call(t,e)>-1},a,!0),m=[function(e,n,i){return!o&&(i||n!==S)||((t=n).nodeType?l(e,n,i):c(e,n,i))}];s1&&f(m),s>1&&u(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(oe,"$1"),n,s0,o=t.length>0,a=function(i,a,s,l,c){var u,d,f,m=0,h="0",g=i&&[],v=[],y=S,b=i||o&&C.find.TAG("*",c),x=F+=null==y?1:Math.random()||.1,w=b.length;for(c&&(S=a!==A&&a);h!==w&&null!=(u=b[h]);h++){if(o&&u){for(d=0;f=t[d++];)if(f(u,a,s)){l.push(u);break}c&&(F=x)}r&&((u=!f&&u)&&m--,i&&g.push(u))}if(m+=h,r&&h!==m){for(d=0;f=n[d++];)f(g,v,a,s);if(i){if(m>0)for(;h--;)g[h]||v[h]||(v[h]=G.call(l));v=p(v)}J.apply(l,v),c&&!i&&v.length>0&&m+n.length>1&&e.uniqueSort(l)}return c&&(F=x,S=y),g};return r?i(a):a}var y,b,C,x,w,_,E,N,S,k,T,R,A,B,D,M,L,P,H,O="sizzle"+-new Date,I=window.document,F=0,z=0,W=n(),U=n(),V=n(),$=function(e,t){return e===t&&(T=!0),0},q=typeof t,j=1<<31,K={}.hasOwnProperty,Y=[],G=Y.pop,X=Y.push,J=Y.push,Q=Y.slice,Z=Y.indexOf||function(e){for(var t=0,n=this.length;t+~]|"+te+")"+te+"*"),le=new RegExp("="+te+"*([^\\]'\"]*?)"+te+"*\\]","g"),ce=new RegExp(re),ue=new RegExp("^"+ne+"$"),de={ID:new RegExp("^#("+ne+")"),CLASS:new RegExp("^\\.("+ne+")"),TAG:new RegExp("^("+ne+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+te+"*(even|odd|(([+-]|)(\\d*)n|)"+te+"*(?:([+-]|)"+te+"*(\\d+)|))"+te+"*\\)|)","i"),bool:new RegExp("^(?:"+ee+")$","i"),needsContext:new RegExp("^"+te+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+te+"*((?:-\\d)?\\d*)"+te+"*\\)|)(?=[^-]|$)","i")},fe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,pe=/^[^{]+\{\s*\[native \w/,he=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ge=/[+~]/,ve=/'|\\/g,ye=new RegExp("\\\\([\\da-f]{1,6}"+te+"?|("+te+")|.)","ig"),be=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)};try{J.apply(Y=Q.call(I.childNodes),I.childNodes),Y[I.childNodes.length].nodeType}catch(e){J={apply:Y.length?function(e,t){X.apply(e,Q.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}b=e.support={},w=e.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},R=e.setDocument=function(e){var t,n=e?e.ownerDocument||e:I,i=n.defaultView;return n!==A&&9===n.nodeType&&n.documentElement?(A=n,B=n.documentElement,D=!w(n),i&&i!==i.top&&(i.addEventListener?i.addEventListener("unload",function(){R()},!1):i.attachEvent&&i.attachEvent("onunload",function(){R()})),b.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),b.getElementsByTagName=r(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),b.getElementsByClassName=pe.test(n.getElementsByClassName),b.getById=r(function(e){return B.appendChild(e).id=O,!n.getElementsByName||!n.getElementsByName(O).length}),b.getById?(C.find.ID=function(e,t){if(typeof t.getElementById!==q&&D){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},C.filter.ID=function(e){var t=e.replace(ye,be);return function(e){return e.getAttribute("id")===t}}):(delete C.find.ID,C.filter.ID=function(e){var t=e.replace(ye,be);return function(e){var n=typeof e.getAttributeNode!==q&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=b.getElementsByTagName?function(e,t){if(typeof t.getElementsByTagName!==q)return t.getElementsByTagName(e)}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},C.find.CLASS=b.getElementsByClassName&&function(e,t){if(D)return t.getElementsByClassName(e)},L=[],M=[],(b.qsa=pe.test(n.querySelectorAll))&&(r(function(e){e.innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&M.push("[*^$]="+te+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||M.push("\\["+te+"*(?:value|"+ee+")"),e.querySelectorAll(":checked").length||M.push(":checked")}),r(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&M.push("name"+te+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||M.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),M.push(",.*:")})),(b.matchesSelector=pe.test(P=B.matches||B.webkitMatchesSelector||B.mozMatchesSelector||B.oMatchesSelector||B.msMatchesSelector))&&r(function(e){b.disconnectedMatch=P.call(e,"div"),P.call(e,"[s!='']:x"),L.push("!=",re)}),M=M.length&&new RegExp(M.join("|")),L=L.length&&new RegExp(L.join("|")),t=pe.test(B.compareDocumentPosition),H=t||pe.test(B.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},$=t?function(e,t){if(e===t)return T=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(1&(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!b.sortDetached&&t.compareDocumentPosition(e)===i?e===n||e.ownerDocument===I&&H(I,e)?-1:t===n||t.ownerDocument===I&&H(I,t)?1:k?Z.call(k,e)-Z.call(k,t):0:4&i?-1:1)}:function(e,t){if(e===t)return T=!0,0;var i,r=0,o=e.parentNode,s=t.parentNode,l=[e],c=[t];if(!o||!s)return e===n?-1:t===n?1:o?-1:s?1:k?Z.call(k,e)-Z.call(k,t):0;if(o===s)return a(e,t);for(i=e;i=i.parentNode;)l.unshift(i);for(i=t;i=i.parentNode;)c.unshift(i);for(;l[r]===c[r];)r++;return r?a(l[r],c[r]):l[r]===I?-1:c[r]===I?1:0},n):A},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==A&&R(t),n=n.replace(le,"='$1']"),b.matchesSelector&&D&&(!L||!L.test(n))&&(!M||!M.test(n)))try{var i=P.call(t,n);if(i||b.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(e){}return e(n,A,null,[t]).length>0},e.contains=function(e,t){return(e.ownerDocument||e)!==A&&R(e),H(e,t)},e.attr=function(e,n){(e.ownerDocument||e)!==A&&R(e);var i=C.attrHandle[n.toLowerCase()],r=i&&K.call(C.attrHandle,n.toLowerCase())?i(e,n,!D):t;return r!==t?r:b.attributes||!D?e.getAttribute(n):(r=e.getAttributeNode(n))&&r.specified?r.value:null},e.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},e.uniqueSort=function(e){var t,n=[],i=0,r=0;if(T=!b.detectDuplicates,k=!b.sortStable&&e.slice(0),e.sort($),T){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return k=null,e},x=e.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=x(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=x(t);return n},(C=e.selectors={cacheLength:50,createPseudo:i,match:de,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ye,be),e[3]=(e[3]||e[4]||e[5]||"").replace(ye,be),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(e){var t,n=!e[6]&&e[2];return de.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ce.test(n)&&(t=_(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ye,be).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=W[e+" "];return t||(t=new RegExp("(^|"+te+")"+e+"("+te+"|$)"))&&W(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==q&&e.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(r){var o=e.attr(r,t);return null==o?"!="===n:!n||(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o+" ").indexOf(i)>-1:"|="===n&&(o===i||o.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,f,m,p,h=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(g){if(o){for(;h;){for(d=t;d=d[h];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=h="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&y){for(m=(c=(u=g[O]||(g[O]={}))[e]||[])[0]===F&&c[1],f=c[0]===F&&c[2],d=m&&g.childNodes[m];d=++m&&d&&d[h]||(f=m=0)||p.pop();)if(1===d.nodeType&&++f&&d===t){u[e]=[F,m,f];break}}else if(y&&(c=(t[O]||(t[O]={}))[e])&&c[0]===F)f=c[1];else for(;(d=++m&&d&&d[h]||(f=m=0)||p.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++f||(y&&((d[O]||(d[O]={}))[e]=[F,f]),d!==t)););return(f-=r)===i||f%i==0&&f/i>=0}}},PSEUDO:function(t,n){var r,o=C.pseudos[t]||C.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[O]?o(n):o.length>1?(r=[t,t,"",n],C.setFilters.hasOwnProperty(t.toLowerCase())?i(function(e,t){for(var i,r=o(e,n),a=r.length;a--;)e[i=Z.call(e,r[a])]=!(t[i]=r[a])}):function(e){return o(e,0,r)}):o}},pseudos:{not:i(function(e){var t=[],n=[],r=E(e.replace(oe,"$1"));return r[O]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:i(function(t){return function(n){return e(t,n).length>0}}),contains:i(function(e){return e=e.replace(ye,be),function(t){return(t.textContent||t.innerText||x(t)).indexOf(e)>-1}}),lang:i(function(t){return ue.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(ye,be).toLowerCase(),function(e){var n;do{if(n=D?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===B},focus:function(e){return e===A.activeElement&&(!A.hasFocus||A.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return fe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:s(function(){return[0]}),last:s(function(e,t){return[t-1]}),eq:s(function(e,t,n){return[n<0?n+t:n]}),even:s(function(e,t){for(var n=0;n=0;)e.push(i);return e}),gt:s(function(e,t,n){for(var i=n<0?n+t:n;++i2&&"ID"===(a=o[0]).type&&b.getById&&9===t.nodeType&&D&&C.relative[o[1].type]){if(!(t=(C.find.ID(a.matches[0].replace(ye,be),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=de.needsContext.test(e)?0:o.length;r--&&(a=o[r],!C.relative[s=a.type]);)if((c=C.find[s])&&(i=c(a.matches[0].replace(ye,be),ge.test(o[0].type)&&l(t.parentNode)||t))){if(o.splice(r,1),!(e=i.length&&u(o)))return J.apply(n,i),n;break}}return(d||E(e,f))(i,t,!D,n,ge.test(e)&&l(t.parentNode)||t),n},b.sortStable=O.split("").sort($).join("")===O,b.detectDuplicates=!!T,R(),b.sortDetached=r(function(e){return 1&e.compareDocumentPosition(A.createElement("div"))}),r(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),b.attributes&&r(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||o(ee,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),e}),i("tinymce/Env",[],function(){var e,t,n,i,r,o,a,s,l,c=navigator,u=c.userAgent;return e=window.opera&&window.opera.buildNumber,l=/Android/.test(u),n=(n=!(t=/WebKit/.test(u))&&!e&&/MSIE/gi.test(u)&&/Explorer/gi.test(c.appName))&&/MSIE (\w+)\./.exec(u)[1],i=-1!=u.indexOf("Trident/")&&(-1!=u.indexOf("rv:")||-1!=c.appName.indexOf("Netscape"))&&11,r=!(!document.msElementsFromPoint||n||i)&&12,n=n||i||r,o=!t&&!i&&/Gecko/.test(u),a=-1!=u.indexOf("Mac"),s=/(iPad|iPhone)/.test(u),r&&(t=!1),{opera:e,webkit:t,ie:n,gecko:o,mac:a,iOS:s,android:l,contentEditable:!s||u.match(/AppleWebKit\/(\d*)/)[1]>=534,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!=n,range:window.getSelection&&"Range"in window,documentMode:n&&!r?document.documentMode||7:10}}),i("tinymce/util/Tools",["tinymce/Env"],function(e){function n(e){return null===e||e===t?"":(""+e).replace(s,"")}function i(e,n){return n?!("array"!=n||!l(e))||typeof e==n:e!==t}function r(e,n,i){var r,o;if(!e)return 0;if(i=i||e,e.length!==t){for(r=0,o=e.length;r=0;r--)c(e,t[r],n,i);else for(r=0;r)[^>]*$|#([\w\-]*)$)/,S=e.Event,k=i.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),T=i.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),R={for:"htmlFor",class:"className",readonly:"readOnly"},A={float:"cssFloat"},B={},D={},M=/^\s*|\s*$/g;return f.fn=f.prototype={constructor:f,selector:"",context:null,length:0,init:function(e,t){var n,i,r=this;if(!e)return r;if(e.nodeType)return r.context=r[0]=e,r.length=1,r;if(t&&t.nodeType)r.context=t;else{if(t)return f(e).attr(t);r.context=t=document}if(a(e)){if(r.selector=e,!(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e)))return f(t).find(e);if(n[1])for(i=l(e,g(t)).firstChild;i;)_.call(r,i),i=i.nextSibling;else{if(!(i=g(t).getElementById(n[2])))return r;if(i.id!==n[2])return r.find(e);r.length=1,r[0]=i}}else this.add(e,!1);return r},toArray:function(){return i.toArray(this)},add:function(e,t){var n,i,r=this;if(a(e))return r.add(f(e));if(!1!==t)for(n=f.unique(r.toArray().concat(f.makeArray(e))),r.length=n.length,i=0;i1&&(i=f.unique(i),0===e.indexOf("parents")&&(i=i.reverse())),i=f(i),n?i.filter(n):i}}),p({parentsUntil:function(e,t){return v(e,"parentNode",t)},nextUntil:function(e,t){return y(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return y(e,"previousSibling",1,t).slice(1)}},function(e,t){f.fn[e]=function(n,i){var r=[];return this.each(function(){var e=t.call(r,this,n,r);e&&(f.isArray(e)?r.push.apply(r,e):r.push(e))}),this.length>1&&(r=f.unique(r),0!==e.indexOf("parents")&&"prevUntil"!==e||(r=r.reverse())),r=f(r),i?r.filter(i):r}}),f.fn.is=function(e){return!!e&&this.filter(e).length>0},f.fn.init.prototype=f.fn,f.overrideDefaults=function(e){function t(i,r){return n=n||e(),0===arguments.length&&(i=n.element),r||(r=n.context),new t.fn.init(i,r)}var n;return f.extend(t,this),t},r.ie&&r.ie<8&&(C(B,"get",{maxlength:function(e){var t=e.maxLength;return 2147483647===t?x:t},size:function(e){var t=e.size;return 20===t?x:t},class:function(e){return e.className},style:function(e){var t=e.style.cssText;return 0===t.length?x:t}}),C(B,"set",{class:function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),r.ie&&r.ie<9&&(A.float="styleFloat",C(D,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),f.attrHooks=B,f.cssHooks=D,f}),i("tinymce/html/Styles",[],function(){return function(e,t){function n(e,t,n,i){function r(e){return(e=parseInt(e,10).toString(16)).length>1?e:"0"+e}return"#"+r(t)+r(n)+r(i)}var i,r,o,a,s,l=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,c=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,u=/\s*([^:]+):\s*([^;]+);?/g,d=/\s+$/,f={};for(e=e||{},t&&(a=t.getValidStyles(),s=t.getInvalidStyles()),o="\\\" \\' \\; \\: ; : \ufeff".split(" "),r=0;r-1&&n||(v[e+t]=-1==r?l[0]:l.join(" "),delete v[e+"-top"+t],delete v[e+"-right"+t],delete v[e+"-bottom"+t],delete v[e+"-left"+t])}}function o(e){var t,n=v[e];if(n){for(t=(n=n.split(" ")).length;t--;)if(n[t]!==n[0])return!1;return v[e]=n[0],!0}}function a(e){return g=!0,f[e]}function s(e,t){return g&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return f[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}var m,p,h,g,v={},y=e.url_converter,b=e.url_converter_scope||this;if(t){for(t=(t=t.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,a).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,a)});m=u.exec(t);){if(p=m[1].replace(d,"").toLowerCase(),h=m[2].replace(d,""),h=h.replace(/\\[0-9a-f]+/g,function(e){return String.fromCharCode(parseInt(e.substr(1),16))}),p&&h.length>0){if(!e.allow_script_urls&&("behavior"==p||/expression\s*\(|\/\*|\*\//.test(h)))continue;"font-weight"===p&&"700"===h?h="bold":"color"!==p&&"background-color"!==p||(h=h.toLowerCase()),h=(h=h.replace(l,n)).replace(c,function(t,n,i,r,o,a){if(o=o||a)return"'"+(o=s(o)).replace(/\'/g,"\\'")+"'";if(n=s(n||i||r),!e.allow_script_urls){var l=n.replace(/[\s\r\n]+/,"");if(/(java|vb)script:/i.test(l))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(l))return""}return y&&(n=y.call(b,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"}),v[p]=g?s(h,!0):h}u.lastIndex=m.index+m[0].length}i("border","",!0),i("border","-width"),i("border","-color"),i("border","-style"),i("padding",""),i("margin",""),function(e,t,n,i){o(t)&&o(n)&&o(i)&&(v[e]=v[t]+" "+v[n]+" "+v[i],delete v[t],delete v[n],delete v[i])}("border","border-width","border-style","border-color"),"medium none"===v.border&&delete v.border,"none"===v["border-image"]&&delete v["border-image"]}return v},serialize:function(e,t){function n(t){var n,r,o,s;if(n=a[t])for(r=0,o=n.length;r0&&(l+=(l.length>0?" ":"")+t+": "+s+";")}var r,o,l="";if(t&&a)n("*"),n(t);else for(r in e)(o=e[r])!==i&&o.length>0&&(s&&!function(e,t){var n;return!((n=s["*"])&&n[e]||(n=s[t])&&n[e])}(r,t)||(l+=(l.length>0?" ":"")+r+": "+o+";"));return l}}}}),i("tinymce/dom/TreeWalker",[],function(){return function(e,t){function n(e,n,i,r){var o,a;if(e){if(!r&&e[n])return e[n];if(e!=t){if(o=e[i])return o;for(a=e.parentNode;a&&a!=t;a=a.parentNode)if(o=a[i])return o}}}var i=e;this.current=function(){return i},this.next=function(e){return i=n(i,"firstChild","nextSibling",e)},this.prev=function(e){return i=n(i,"lastChild","previousSibling",e)}}}),i("tinymce/dom/Range",["tinymce/util/Tools"],function(e){function t(n){function i(){return _.createDocumentFragment()}function r(e,t){f(k,e,t)}function o(e,t){f(T,e,t)}function a(e){r(e.parentNode,L(e))}function s(e){o(e.parentNode,L(e)+1)}function l(){return m(N)}function c(e,t){var n;if(3==e.nodeType)return e;if(t<0)return e;for(n=e.firstChild;n&&t>0;)--t,n=n.nextSibling;return n||e}function u(){return w[A]==w[B]&&w[R]==w[D]}function d(e,t,i,r){var o,a,s,l,c,u;if(e==i)return t==r?0:t0&&w.collapse(e):w.collapse(e),w.collapsed=u(),w.commonAncestorContainer=n.findCommonAncestor(w[A],w[B])}function m(e){var t,n,i,r,o,a,s,l=0,c=0;if(w[A]==w[B])return p(e);for(n=(t=w[B]).parentNode;n;t=n,n=n.parentNode){if(n==w[A])return h(t,e);++l}for(n=(t=w[A]).parentNode;n;t=n,n=n.parentNode){if(n==w[B])return g(t,e);++c}for(i=c-l,r=w[A];i>0;)r=r.parentNode,i--;for(o=w[B];i<0;)o=o.parentNode,i++;for(a=r.parentNode,s=o.parentNode;a!=s;a=a.parentNode,s=s.parentNode)r=a,o=s;return v(r,o,e)}function p(e){var t,n,r,o,a,s,l,u,d;if(e!=S&&(t=i()),w[R]==w[D])return t;if(3==w[A].nodeType){if(n=w[A].nodeValue,r=n.substring(w[R],w[D]),e!=N&&(o=w[A],u=w[R],d=w[D]-w[R],0===u&&d>=o.nodeValue.length-1?o.parentNode.removeChild(o):o.deleteData(u,d),w.collapse(k)),e==S)return;return r.length>0&&t.appendChild(_.createTextNode(r)),t}for(o=c(w[A],w[R]),a=w[D]-w[R];o&&a>0;)s=o.nextSibling,l=x(o,e),t&&t.appendChild(l),--a,o=s;return e!=N&&w.collapse(k),t}function h(e,t){var n,r,o,a,s,l;if(t!=S&&(n=i()),r=y(e,t),n&&n.appendChild(r),o=L(e),(a=o-w[R])<=0)return t!=N&&(w.setEndBefore(e),w.collapse(T)),n;for(r=e.previousSibling;a>0;)s=r.previousSibling,l=x(r,t),n&&n.insertBefore(l,n.firstChild),--a,r=s;return t!=N&&(w.setEndBefore(e),w.collapse(T)),n}function g(e,t){var n,r,o,a,s,l;for(t!=S&&(n=i()),o=b(e,t),n&&n.appendChild(o),r=L(e),++r,a=w[D]-r,o=e.nextSibling;o&&a>0;)s=o.nextSibling,l=x(o,t),n&&n.appendChild(l),--a,o=s;return t!=N&&(w.setStartAfter(e),w.collapse(k)),n}function v(e,t,n){var r,o,a,s,l,c;for(n!=S&&(o=i()),r=b(e,n),o&&o.appendChild(r),a=L(e),s=L(t)-++a,l=e.nextSibling;s>0;)c=l.nextSibling,r=x(l,n),o&&o.appendChild(r),l=c,--s;return r=y(t,n),o&&o.appendChild(r),n!=N&&(w.setStartAfter(e),w.collapse(k)),o}function y(e,t){var n,i,r,o,a,s=c(w[B],w[D]-1),l=s!=w[B];if(s==e)return C(s,l,T,t);for(i=C(n=s.parentNode,T,T,t);n;){for(;s;)r=s.previousSibling,o=C(s,l,T,t),t!=S&&i.insertBefore(o,i.firstChild),l=k,s=r;if(n==e)return i;s=n.previousSibling,a=C(n=n.parentNode,T,T,t),t!=S&&a.appendChild(i),i=a}}function b(e,t){var n,i,r,o,a,s=c(w[A],w[R]),l=s!=w[A];if(s==e)return C(s,l,k,t);for(i=C(n=s.parentNode,T,k,t);n;){for(;s;)r=s.nextSibling,o=C(s,l,k,t),t!=S&&i.appendChild(o),l=k,s=r;if(n==e)return i;s=n.nextSibling,a=C(n=n.parentNode,T,k,t),t!=S&&a.appendChild(i),i=a}}function C(e,t,i,r){var o,a,s,l,c;if(t)return x(e,r);if(3==e.nodeType){if(o=e.nodeValue,i?(l=w[R],a=o.substring(l),s=o.substring(0,l)):(l=w[D],a=o.substring(0,l),s=o.substring(l)),r!=N&&(e.nodeValue=s),r==S)return;return c=n.clone(e,T),c.nodeValue=a,c}if(r!=S)return n.clone(e,T)}function x(e,t){if(t!=S)return t==N?n.clone(e,k):e;e.parentNode.removeChild(e)}var w=this,_=n.doc,E=0,N=1,S=2,k=!0,T=!1,R="startOffset",A="startContainer",B="endContainer",D="endOffset",M=e.extend,L=n.nodeIndex;return M(w,{startContainer:_,startOffset:0,endContainer:_,endOffset:0,collapsed:k,commonAncestorContainer:_,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:r,setEnd:o,setStartBefore:a,setStartAfter:function(e){r(e.parentNode,L(e)+1)},setEndBefore:function(e){o(e.parentNode,L(e))},setEndAfter:s,collapse:function(e){e?(w[B]=w[A],w[D]=w[R]):(w[A]=w[B],w[R]=w[D]),w.collapsed=k},selectNode:function(e){a(e),s(e)},selectNodeContents:function(e){r(e,0),o(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)},compareBoundaryPoints:function(e,t){var n=w[A],i=w[R],r=w[B],o=w[D],a=t.startContainer,s=t.startOffset,l=t.endContainer,c=t.endOffset;return 0===e?d(n,i,a,s):1===e?d(r,o,a,s):2===e?d(r,o,l,c):3===e?d(n,i,l,c):void 0},deleteContents:function(){m(S)},extractContents:function(){return m(E)},cloneContents:l,insertNode:function(e){var t,i,r=this[A],o=this[R];3!==r.nodeType&&4!==r.nodeType||!r.nodeValue?(r.childNodes.length>0&&(i=r.childNodes[o]),i?r.insertBefore(e,i):3==r.nodeType?n.insertAfter(e,r):r.appendChild(e)):o?o>=r.nodeValue.length?n.insertAfter(e,r):(t=r.splitText(o),r.parentNode.insertBefore(e,t)):r.parentNode.insertBefore(e,r)},surroundContents:function(e){var t=w.extractContents();w.insertNode(e),e.appendChild(t),w.selectNode(e)},cloneRange:function(){return M(new t(n),{startContainer:w[A],startOffset:w[R],endContainer:w[B],endOffset:w[D],collapsed:w.collapsed,commonAncestorContainer:w.commonAncestorContainer})},toStringIE:function(){return n.create("body",null,l()).outerText}}),w}return t.prototype.toString=function(){return this.toStringIE()},t}),i("tinymce/html/Entities",["tinymce/util/Tools"],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,i,o,a={};if(e){for(e=e.split(","),t=t||10,n=0;n\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=/[<>&\"\']/g,u=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,d={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};r={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},o={"<":"<",">":">","&":"&",""":'"',"'":"'"},i=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);var f={encodeRaw:function(e,t){return e.replace(t?s:l,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?s:l,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||i,e.replace(t?s:l,function(e){return r[e]||n[e]||e})},getEncodeFunc:function(e,t){return t=n(t)||i,(e=a(e.replace(/\+/g,","))).named&&e.numeric?function(e,n){return e.replace(n?s:l,function(e){return r[e]||t[e]||"&#"+e.charCodeAt(0)+";"||e})}:e.named?t?function(e,n){return f.encodeNamed(e,n,t)}:f.encodeNamed:e.numeric?f.encodeNumeric:f.encodeRaw},decode:function(e){return e.replace(u,function(e,n){return n?(n="x"===n.charAt(0).toLowerCase()?parseInt(n.substr(1),16):parseInt(n,10))>65535?(n-=65536,String.fromCharCode(55296+(n>>10),56320+(1023&n))):d[n]||String.fromCharCode(n):o[e]||i[e]||t(e)})}};return f}),i("tinymce/dom/StyleSheetLoader",["tinymce/util/Tools"],function(e){return function(t,n){function i(e){t.getElementsByTagName("head")[0].appendChild(e)}var r,o=0,a={};r=(n=n||{}).maxLoadTime||5e3,this.load=function(n,s,l){function c(){for(var e=v.passed,t=e.length;t--;)e[t]();v.status=2,v.passed=[],v.failed=[]}function u(){for(var e=v.failed,t=e.length;t--;)e[t]();v.status=3,v.passed=[],v.failed=[]}function d(e,t){e()||((new Date).getTime()-g0)return h=t.createElement("style"),h.textContent='@import "'+n+'"',m(),void i(h);f()}i(p),p.href=n}else u();else c()}}}),i("tinymce/dom/DOMUtils",["tinymce/dom/Sizzle","tinymce/dom/DomQuery","tinymce/html/Styles","tinymce/dom/EventUtils","tinymce/dom/TreeWalker","tinymce/dom/Range","tinymce/html/Entities","tinymce/Env","tinymce/util/Tools","tinymce/dom/StyleSheetLoader"],function(e,n,i,r,o,a,s,l,c,u){function d(e,t){var n,i={},r=t.keep_values;return n={set:function(n,i,r){t.url_converter&&(i=t.url_converter.call(t.url_converter_scope||e,i,r,n[0])),n.attr("data-mce-"+r,i).attr(r,i)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},i={style:{set:function(e,t){null===t||"object"!=typeof t?(r&&e.attr("data-mce-style",t),e.attr("style",t)):e.css(t)},get:function(t){var n=t.attr("data-mce-style")||t.attr("style");return n=e.serializeStyle(e.parseStyle(n),t[0].nodeName)}}},r&&(i.href=i.src=n),i}function f(e,t){var o,a=this;a.doc=e,a.win=window,a.files={},a.counter=0,a.stdMode=!v||e.documentMode>=8,a.boxModel=!v||"CSS1Compat"==e.compatMode||a.stdMode,a.styleSheetLoader=new u(e),a.boundEvents=[],a.settings=t=t||{},a.schema=t.schema,a.styles=new i({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),a.fixDoc(e),a.events=t.ownEvents?new r(t.proxy):r.Event,a.attrHooks=d(a,t),o=t.schema?t.schema.getBlockElements():{},a.$=n.overrideDefaults(function(){return{context:e,element:a.getRoot()}}),a.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!o[e.nodeName]):!!o[e]}}var m=c.each,p=c.is,h=c.grep,g=c.trim,v=l.ie,y=/^([a-z0-9],?)+$/i,b=/^[ \t\r\n]*$/;return f.prototype={$$:function(e){return"string"==typeof e&&(e=this.get(e)),this.$(e)},root:null,fixDoc:function(e){var t,n=this.settings;if(v&&n.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(t){e.createElement(t)});for(t in n.schema.getCustomElements())e.createElement(t)}},clone:function(e,t){var n,i,r=this;return!v||1!==e.nodeType||t?e.cloneNode(t):(i=r.doc,t?n.firstChild:(n=i.createElement(e.nodeName),m(r.getAttribs(e),function(t){r.setAttrib(n,t.nodeName,r.getAttrib(e,t.nodeName))}),n))},getRoot:function(){var e=this;return e.settings.root_element||e.doc.body},getViewPort:function(e){var t,n;return 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,i=this;return e=i.get(e),t=i.getPos(e),n=i.getSize(e),{x:t.x,y:t.y,w:n.w,h:n.h}},getSize:function(e){var t,n,i=this;return e=i.get(e),t=i.getStyle(e,"width"),n=i.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,n,i,r){var o,a=this,s=[];for(e=a.get(e),r=r===t,i=i||("BODY"!=a.getRoot().nodeName?a.getRoot().parentNode:null),p(n,"string")&&(o=n,n="*"===n?function(e){return 1==e.nodeType}:function(e){return a.is(e,o)});e&&e!=i&&e.nodeType&&9!==e.nodeType;){if(!n||n(e)){if(!r)return e;s.push(e)}e=e.parentNode}return r?s:null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,(e=this.doc.getElementById(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 i=this;return e(t,i.get(n)||i.settings.root_element||i.doc,[])},is:function(n,i){var r;if(n.length===t){if("*"===i)return 1==n.nodeType;if(y.test(i)){for(i=i.toLowerCase().split(/,/),n=n.nodeName.toLowerCase(),r=i.length-1;r>=0;r--)if(i[r]==n)return!0;return!1}}if(n.nodeType&&1!=n.nodeType)return!1;var o=n.nodeType?[n]:n;return e(i,o[0].ownerDocument||o[0],null,o).length>0},add:function(e,t,n,i,r){var o=this;return this.run(e,function(e){var a;return a=p(t,"string")?o.doc.createElement(t):t,o.setAttribs(a,n),i&&(i.nodeType?a.appendChild(i):o.setHTML(a,i)),r?a:e.appendChild(a)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,t,n){var i,r="";r+="<"+e;for(i in t)t.hasOwnProperty(i)&&null!==t[i]&&void 0!==t[i]&&(r+=" "+i+'="'+this.encode(t[i])+'"');return void 0!==n?r+">"+n+"":r+" />"},createFragment:function(e){var t,n,i,r=this.doc;for(i=r.createElement("div"),t=r.createDocumentFragment(),e&&(i.innerHTML=e);n=i.firstChild;)t.appendChild(n);return t},remove:function(e,t){return e=this.$$(e),t?e.each(function(){for(var e;e=this.firstChild;)3==e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():e.remove(),e.length>1?e.toArray():e[0]},setStyle:function(e,t,n){e=this.$$(e).css(t,n),this.settings.update_styles&&e.attr("data-mce-style",null)},getStyle:function(e,n,i){return e=this.$$(e),i?e.css(n):("float"==(n=n.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}))&&(n=v?"styleFloat":"cssFloat"),e[0]&&e[0].style?e[0].style[n]:t)},setStyles:function(e,t){e=this.$$(e).css(t),this.settings.update_styles&&e.attr("data-mce-style",null)},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,t,n){var i,r,o=this,a=o.settings;""===n&&(n=null),i=(e=o.$$(e)).attr(t),e.length&&((r=o.attrHooks[t])&&r.set?r.set(e,n,t):e.attr(t,n),i!=n&&a.onSetAttrib&&a.onSetAttrib({attrElm:e,attrName:t,attrValue:n}))},setAttribs:function(e,t){var n=this;n.$$(e).each(function(e,i){m(t,function(e,t){n.setAttrib(i,t,e)})})},getAttrib:function(e,t,n){var i,r,o=this;return(e=o.$$(e)).length&&(r=(i=o.attrHooks[t])&&i.get?i.get(e,t):e.attr(t)),void 0===r&&(r=n||""),r},getPos:function(e,t){var i,r,o=this,a=0,s=0,l=o.doc,c=l.body;if(e=o.get(e),t=t||c,e){if(t===c&&e.getBoundingClientRect&&"static"===n(c).css("position"))return r=e.getBoundingClientRect(),t=o.boxModel?l.documentElement:c,a=r.left+(l.documentElement.scrollLeft||c.scrollLeft)-t.clientLeft,s=r.top+(l.documentElement.scrollTop||c.scrollTop)-t.clientTop,{x:a,y:s};for(i=e;i&&i!=t&&i.nodeType;)a+=i.offsetLeft||0,s+=i.offsetTop||0,i=i.offsetParent;for(i=e.parentNode;i&&i!=t&&i.nodeType;)a-=i.scrollLeft||0,s-=i.scrollTop||0,i=i.parentNode}return{x:a,y:s}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t,n,i=this,r=i.doc;if(i!==f.DOM&&r===document){var o=f.DOM.addedStyles;if((o=o||[])[e])return;o[e]=!0,f.DOM.addedStyles=o}(n=r.getElementById("mceDefaultStyles"))||((n=r.createElement("style")).id="mceDefaultStyles",n.type="text/css",(t=r.getElementsByTagName("head")[0]).firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(r.createTextNode(e))},loadCSS:function(e){var t,n=this,i=n.doc;n===f.DOM||i!==document?(e||(e=""),t=i.getElementsByTagName("head")[0],m(e.split(","),function(e){var r;e=c._addCacheSuffix(e),n.files[e]||(n.files[e]=!0,r=n.create("link",{rel:"stylesheet",href:e}),v&&i.documentMode&&i.recalc&&(r.onload=function(){i.recalc&&i.recalc(),r.onload=null}),t.appendChild(r))})):f.DOM.loadCSS(e)},addClass:function(e,t){this.$$(e).addClass(t)},removeClass:function(e,t){this.toggleClass(e,t,!1)},hasClass:function(e,t){return this.$$(e).hasClass(t)},toggleClass:function(e,t,i){this.$$(e).toggleClass(t,i).each(function(){""===this.className&&n(this).attr("class",null)})},show:function(e){this.$$(e).show()},hide:function(e){this.$$(e).hide()},isHidden:function(e){return"none"==this.$$(e).css("display")},uniqueId:function(e){return(e||"mce_")+this.counter++},setHTML:function(e,t){e=this.$$(e),v?e.each(function(e,i){if(!1!==i.canHaveHTML){for(;i.firstChild;)i.removeChild(i.firstChild);try{i.innerHTML="
"+t,i.removeChild(i.firstChild)}catch(e){n("
").html("
"+t).contents().slice(1).appendTo(i)}return t}}):e.html(t)},getOuterHTML:function(e){return 1==(e=this.get(e)).nodeType&&"outerHTML"in e?e.outerHTML:n("
").append(n(e).clone()).html()},setOuterHTML:function(e,t){var i=this;i.$$(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}i.remove(n(this).html(t),!0)})},decode:s.decode,encode:s.encodeAllRaw,insertAfter:function(e,t){return t=this.get(t),this.run(e,function(e){var n,i;return n=t.parentNode,(i=t.nextSibling)?n.insertBefore(e,i):n.appendChild(e),e})},replace:function(e,t,n){return this.run(t,function(t){return p(t,"array")&&(e=e.cloneNode(!0)),n&&m(h(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},rename:function(e,t){var n,i=this;return e.nodeName!=t.toUpperCase()&&(n=i.create(t),m(i.getAttribs(e),function(t){i.setAttrib(n,t.nodeName,i.getAttrib(e,t.nodeName))}),i.replace(n,e,1)),n||e},findCommonAncestor:function(e,t){for(var n,i=e;i;){for(n=t;n&&i!=n;)n=n.parentNode;if(i==n)break;i=i.parentNode}return!i&&e.ownerDocument?e.ownerDocument.documentElement:i},toHex:function(e){return this.styles.toHex(c.trim(e))},run:function(e,t,n){var i,r=this;return"string"==typeof e&&(e=r.get(e)),!!e&&(n=n||this,e.nodeType||!e.length&&0!==e.length?t.call(n,e):(i=[],m(e,function(e,o){e&&("string"==typeof e&&(e=r.get(e)),i.push(t.call(n,e,o)))}),i))},getAttribs:function(e){var t;if(!(e=this.get(e)))return[];if(v){if(t=[],"OBJECT"==e.nodeName)return e.attributes;"OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"});return e.cloneNode(!1).outerHTML.replace(/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t}return e.attributes},isEmpty:function(e,t){var n,i,r,a,s,l=this,c=0;if(e=e.firstChild){a=new o(e,e.parentNode),t=t||(l.schema?l.schema.getNonEmptyElements():null);do{if(1===(r=e.nodeType)){if(e.getAttribute("data-mce-bogus"))continue;if(s=e.nodeName.toLowerCase(),t&&t[s]){if("br"===s){c++;continue}return!1}for(n=(i=l.getAttribs(e)).length;n--;)if("name"===(s=i[n].nodeName)||"data-mce-bookmark"===s)return!1}if(8==r)return!1;if(3===r&&!b.test(e.nodeValue))return!1}while(e=a.next())}return c<=1},createRng:function(){var e=this.doc;return e.createRange?e.createRange():new a(this)},nodeIndex:function(e,t){var n,i,r=0;if(e)for(n=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)i=e.nodeType,(!t||3!=i||i!=n&&e.nodeValue.length)&&(r++,n=i);return r},split:function(e,t,n){function i(e){var t,n=e.childNodes,r=e.nodeType;if(1!=r||"bookmark"!=e.getAttribute("data-mce-type")){for(t=n.length-1;t>=0;t--)i(n[t]);if(9!=r){if(3==r&&e.nodeValue.length>0){var o=g(e.nodeValue).length;if(!s.isBlock(e.parentNode)||o>0||0===o&&function(e){var t=e.previousSibling&&"SPAN"==e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"==e.nextSibling.nodeName;return t&&n}(e))return}else if(1==r&&(1==(n=e.childNodes).length&&n[0]&&1==n[0].nodeType&&"bookmark"==n[0].getAttribute("data-mce-type")&&e.parentNode.insertBefore(n[0],e),n.length||/^(br|hr|input|img)$/i.test(e.nodeName)))return;s.remove(e)}return e}}var r,o,a,s=this,l=s.createRng();if(e&&t)return l.setStart(e.parentNode,s.nodeIndex(e)),l.setEnd(t.parentNode,s.nodeIndex(t)),r=l.extractContents(),(l=s.createRng()).setStart(t.parentNode,s.nodeIndex(t)+1),l.setEnd(e.parentNode,s.nodeIndex(e)+1),o=l.extractContents(),(a=e.parentNode).insertBefore(i(r),e),n?a.replaceChild(n,t):a.insertBefore(t,e),a.insertBefore(i(o),e),s.remove(e),n||t},bind:function(e,t,n,i){var r=this;if(c.isArray(e)){for(var o=e.length;o--;)e[o]=r.bind(e[o],t,n,i);return e}return!r.settings.collect||e!==r.doc&&e!==r.win||r.boundEvents.push([e,t,n,i]),r.events.bind(e,t,n,i||r)},unbind:function(e,t,n){var i,r=this;if(c.isArray(e)){for(i=e.length;i--;)e[i]=r.unbind(e[i],t,n);return e}if(r.boundEvents&&(e===r.doc||e===r.win))for(i=r.boundEvents.length;i--;){var o=r.boundEvents[i];e!=o[0]||t&&t!=o[1]||n&&n!=o[2]||this.events.unbind(o[0],o[1],o[2])}return this.events.unbind(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return e&&1==e.nodeType?(t=e.getAttribute("data-mce-contenteditable"))&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null:null},getContentEditableParent:function(e){for(var t=this.getRoot(),n=null;e&&e!==t&&null===(n=this.getContentEditable(e));e=e.parentNode);return n},destroy:function(){var t=this;if(t.boundEvents){for(var n=t.boundEvents.length;n--;){var i=t.boundEvents[n];this.events.unbind(i[0],i[1],i[2])}t.boundEvents=null}e.setDocument&&e.setDocument(),t.win=t.doc=t.root=t.events=t.frag=null},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},_findSib:function(e,t,n){var i=this,r=t;if(e)for("string"==typeof r&&(r=function(e){return i.is(e,t)}),e=e[n];e;e=e[n])if(r(e))return e;return null}},f.DOM=new f(document),f}),i("tinymce/dom/ScriptLoader",["tinymce/dom/DOMUtils","tinymce/util/Tools"],function(e,t){function n(){function e(e,n){function r(){s.remove(a),o&&(o.onreadystatechange=o.onload=o=null),n()}var o,a,s=i;a=s.uniqueId(),(o=document.createElement("script")).id=a,o.type="text/javascript",o.src=t._addCacheSuffix(e),"onreadystatechange"in o?o.onreadystatechange=function(){/loaded|complete/.test(o.readyState)&&r()}:o.onload=r,o.onerror=function(){"undefined"!=typeof console&&console.log&&console.log("Failed to load: "+e)},(document.getElementsByTagName("head")[0]||document.body).appendChild(o)}var n,a={},s=[],l={},c=[],u=0;this.isDone=function(e){return 2==a[e]},this.markDone=function(e){a[e]=2},this.add=this.load=function(e,t,i){a[e]==n&&(s.push(e),a[e]=0),t&&(l[e]||(l[e]=[]),l[e].push({func:t,scope:i||this}))},this.loadQueue=function(e,t){this.loadScripts(s,e,t)},this.loadScripts=function(t,i,s){function d(e){r(l[e],function(e){e.func.call(e.scope)}),l[e]=n}var f;c.push({func:i,scope:s||this}),(f=function(){var n=o(t);t.length=0,r(n,function(t){2!=a[t]?1!=a[t]&&(a[t]=1,u++,e(t,function(){a[t]=2,u--,d(t),f()})):d(t)}),u||(r(c,function(e){e.func.call(e.scope)}),c.length=0)})()}}var i=e.DOM,r=t.each,o=t.grep;return n.ScriptLoader=new n,n}),i("tinymce/AddOnManager",["tinymce/dom/ScriptLoader","tinymce/util/Tools"],function(e,n){function i(){var e=this;e.items=[],e.urls={},e.lookup={}}var r=n.each;return i.prototype={get:function(e){return this.lookup[e]?this.lookup[e].instance:t},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(t,n){var r=i.language;if(r&&!1!==i.languageLoad){if(n)if(-1!=(n=","+n+",").indexOf(","+r.substr(0,2)+","))r=r.substr(0,2);else if(-1==n.indexOf(","+r+","))return;e.ScriptLoader.add(this.urls[t]+"/langs/"+r+".js")}},add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},t},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(t,n){var i=this.urls[t];r(n,function(t){e.ScriptLoader.add(i+"/"+t)})},load:function(n,o,a,s){function l(){var i=c.dependencies(n);r(i,function(e){var n=c.createUrl(o,e);c.load(n.resource,n,t,t)}),a&&(s?a.call(s):a.call(e))}var c=this,u=o;c.urls[n]||("object"==typeof o&&(u=o.prefix+o.resource+o.suffix),0!==u.indexOf("/")&&-1==u.indexOf("://")&&(u=i.baseURL+"/"+u),c.urls[n]=u.substring(0,u.lastIndexOf("/")),c.lookup[n]?l():e.ScriptLoader.add(u,l,s))}},i.PluginManager=new i,i.ThemeManager=new i,i}),i("tinymce/dom/RangeUtils",["tinymce/util/Tools","tinymce/dom/TreeWalker"],function(e,t){function n(e,t){var n=e.childNodes;return--t>n.length-1?t=n.length-1:t<0&&(t=0),n[t]||e}function i(e){this.walk=function(t,i){function o(e){var t;return 3===(t=e[0]).nodeType&&t===g&&v>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===b&&e.length>0&&t===y&&3===t.nodeType&&e.splice(e.length-1,1),e}function a(e,t,n){for(var i=[];e&&e!=n;e=e[t])i.push(e);return i}function s(e,t){do{if(e.parentNode==t)return e;e=e.parentNode}while(e)}function l(e,t,n){var r=n?"nextSibling":"previousSibling";for(m=(f=e).parentNode;f&&f!=t;f=m)m=f.parentNode,(p=a(f==e?f:f[r],r)).length&&(n||p.reverse(),i(o(p)))}var c,u,d,f,m,p,h,g=t.startContainer,v=t.startOffset,y=t.endContainer,b=t.endOffset;if((h=e.select("td.mce-item-selected,th.mce-item-selected")).length>0)r(h,function(e){i([e])});else{if(1==g.nodeType&&g.hasChildNodes()&&(g=g.childNodes[v]),1==y.nodeType&&y.hasChildNodes()&&(y=n(y,b)),g==y)return i(o([g]));for(c=e.findCommonAncestor(g,y),f=g;f;f=f.parentNode){if(f===y)return l(g,c,!0);if(f===c)break}for(f=y;f;f=f.parentNode){if(f===g)return l(y,c);if(f===c)break}u=s(g,c)||g,d=s(y,c)||y,l(g,u,!0),(p=a(u==g?u:u.nextSibling,"nextSibling",d==y?d.nextSibling:d)).length&&i(o(p)),l(y,d)}},this.split=function(e){function t(e,t){return e.splitText(t)}var n=e.startContainer,i=e.startOffset,r=e.endContainer,o=e.endOffset;return n==r&&3==n.nodeType?i>0&&ii?(n=r=t(r,o-=i).previousSibling,o=r.nodeValue.length,i=0):o=0):(3==n.nodeType&&i>0&&i0&&o0)return l=d,c=n?d.nodeValue.length:0,void(r=!0);if(e.isBlock(d)||f[d.nodeName.toLowerCase()])return;s=d}o&&s&&(l=s,r=!0,c=0)}var l,c,u,d,f,m,p,h=e.getRoot();if(l=n[(i?"start":"end")+"Container"],c=n[(i?"start":"end")+"Offset"],p=1==l.nodeType&&c===l.childNodes.length,f=e.schema.getNonEmptyElements(),m=i,1==l.nodeType&&c>l.childNodes.length-1&&(m=!1),9===l.nodeType&&(l=e.getRoot(),c=0),l===h){if(m&&(d=l.childNodes[c>0?c-1:0])&&(f[d.nodeName]||"TABLE"==d.nodeName))return;if(l.hasChildNodes()&&(c=Math.min(!m&&c>0?c-1:c,l.childNodes.length-1),l=l.childNodes[c],c=0,l.hasChildNodes()&&!/TABLE/.test(l.nodeName))){d=l,u=new t(l,h);do{if(3===d.nodeType&&d.nodeValue.length>0){c=m?0:d.nodeValue.length,l=d,r=!0;break}if(f[d.nodeName.toLowerCase()]){c=e.nodeIndex(d),l=d.parentNode,"IMG"!=d.nodeName||m||c++,r=!0;break}}while(d=m?u.next():u.prev())}}o&&(3===l.nodeType&&0===c&&s(!0),1===l.nodeType&&((d=l.childNodes[c])||(d=l.childNodes[c-1]),!d||"BR"!==d.nodeName||function(e,t){return e.previousSibling&&e.previousSibling.nodeName==t}(d,"A")||a(d)||a(d,!0)||s(!0,d))),m&&!o&&3===l.nodeType&&c===l.nodeValue.length&&s(!1),r&&n["set"+(i?"Start":"End")](l,c)}var r,o;return o=n.collapsed,i(!0),o||i(),r&&o&&n.collapse(!0),r}}var r=e.each;return i.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},i.getCaretRangeFromPoint=function(e,t,n){var i,r;if(n.caretPositionFromPoint)r=n.caretPositionFromPoint(e,t),(i=n.createRange()).setStart(r.offsetNode,r.offset),i.collapse(!0);else if(n.caretRangeFromPoint)i=n.caretRangeFromPoint(e,t);else if(n.body.createTextRange){i=n.body.createTextRange();try{i.moveToPoint(e,t),i.collapse(!0)}catch(e){i.collapse(t=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},i}),i("tinymce/NodeChange",["tinymce/dom/RangeUtils","tinymce/Env"],function(e,t){return function(n){function i(e){var t,i;if((i=n.$(e).parentsUntil(n.getBody()).add(e)).length===o.length){for(t=i.length;t>=0&&i[t]===o[t];t--);if(-1===t)return o=i,!0}return o=i,!1}var r,o=[];"onselectionchange"in n.getDoc()||n.on("NodeChange Click MouseUp KeyUp Focus",function(t){var i,o;o={startContainer:(i=n.selection.getRng()).startContainer,startOffset:i.startOffset,endContainer:i.endContainer,endOffset:i.endOffset},"nodechange"!=t.type&&e.compareRanges(o,r)||n.fire("SelectionChange"),r=o}),n.on("contextmenu",function(){n.fire("SelectionChange")}),n.on("SelectionChange",function(){var e=n.selection.getStart(!0);!t.range&&n.selection.isCollapsed()||!i(e)&&n.dom.isChildOf(e,n.getBody())&&n.nodeChanged({selectionChange:!0})}),n.on("MouseUp",function(e){e.isDefaultPrevented()||("IMG"==n.selection.getNode().nodeName?setTimeout(function(){n.nodeChanged()},0):n.nodeChanged())}),this.nodeChanged=function(e){var t,i,r,o=n.selection;n.initialized&&o&&!n.settings.disable_nodechange&&!n.settings.readonly&&(r=n.getBody(),"IMG"==(t=(t=o.getStart()||r).ownerDocument!=n.getDoc()?n.getBody():t).nodeName&&o.isCollapsed()&&(t=t.parentNode),i=[],n.dom.getParent(t,function(e){if(e===r)return!0;i.push(e)}),(e=e||{}).element=t,e.parents=i,n.fire("NodeChange",e))}}}),i("tinymce/html/Node",[],function(){function e(e,t,n){var i,r,o=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[o])return e[o];if(e!==t){if(i=e[a])return i;for(r=e.parent;r&&r!==t;r=r.parent)if(i=r[a])return i}}function t(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var n=/^[ \t\r\n]*$/,i={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};return t.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,i,r=this;if("string"!=typeof e){for(i in e)r.attr(i,e[i]);return r}if(n=r.attributes){if(void 0!==t){if(null===t){if(e in n.map)for(delete n.map[e],i=n.length;i--;)if(n[i].name===e)return n=n.splice(i,1),r;return r}if(e in n.map){for(i=n.length;i--;)if(n[i].name===e){n[i].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,r}return n.map[e]}},clone:function(){var e,n,i,r,o,a=this,s=new t(a.name,a.type);if(i=a.attributes){for((o=[]).map={},e=0,n=i.length;e
"},postRender:function(){var e,t=this;return t.items().exec("postRender"),t._super(),t._layout.postRender(t),t._rendered=!0,t.settings.style&&a.css(t.getEl(),t.settings.style),t.settings.border&&(e=t.borderBox(),a.css(t.getEl(),{"border-top-width":e.top,"border-right-width":e.right,"border-bottom-width":e.bottom,"border-left-width":e.left})),t.parent()||(t.keyboardNav=new r({root:t})),t},initLayoutRect:function(){var e=this,t=e._super();return e._layout.recalc(e),t},recalc:function(){var e=this,t=e._layoutRect,n=e._lastRect;if(!n||n.w!=t.w||n.h!=t.h)return e._layout.recalc(e),t=e.layoutRect(),e._lastRect={x:t.x,y:t.y,w:t.w,h:t.h},!0},reflow:function(){var t;if(this.visible()){for(e.repaintControls=[],e.repaintControls.map={},this.recalc(),t=e.repaintControls.length;t--;)e.repaintControls[t].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),e.repaintControls=[]}return this}})}),i("tinymce/ui/DragHelper",["tinymce/ui/DomUtils"],function(e){function t(){var e,t,n,i,r,o,a,s,l=document,c=Math.max;return e=l.documentElement,t=l.body,n=c(e.scrollWidth,t.scrollWidth),i=c(e.clientWidth,t.clientWidth),r=c(e.offsetWidth,t.offsetWidth),o=c(e.scrollHeight,t.scrollHeight),a=c(e.clientHeight,t.clientHeight),s=c(e.offsetHeight,t.offsetHeight),{width:na.clientWidth,o=a.scrollHeight>a.clientHeight,t("h","Left","Width","contentW",n,"Height"),t("v","Top","Height","contentH",o,"Width")}var i=this,r=2;i.settings.autoScroll&&(i._hasScroll||(i._hasScroll=!0,function(){function n(n,o,a,s,l){var c,u=i._id+"-scroll"+n,d=i.classPrefix;i.getEl().appendChild(e.createFragment('
')),i.draghelper=new t(u+"t",{start:function(){c=i.getEl("body")["scroll"+o],e.addClass(e.get(u),d+"active")},drag:function(e){var t,u,d,f,m=i.layoutRect();u=m.contentW>m.innerW,d=m.contentH>m.innerH,f=i.getEl("body")["client"+a]-2*r,t=(f-=u&&d?i.getEl("scroll"+n)["client"+l]:0)/i.getEl("body")["scroll"+a],i.getEl("body")["scroll"+o]=c+e["delta"+s]/t},stop:function(){e.removeClass(e.get(u),d+"active")}})}i.addClass("scroll"),n("v","Top","Height","Y","Width"),n("h","Left","Width","X","Height")}(),i.on("wheel",function(e){var t=i.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),e.on(i.getEl("body"),"scroll",n)),n())}}}),i("tinymce/ui/Panel",["tinymce/ui/Container","tinymce/ui/Scrollable"],function(e,t){return e.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[t],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),void 0===n?n='
'+t.renderHtml(e)+"
":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),'
'+(e._preBodyHtml||"")+n+"
"}})}),i("tinymce/ui/Movable",["tinymce/ui/DomUtils"],function(e){function t(t,n,i){var r,o,a,s,l,c,u,d,f,m;return f=e.getViewPort(),o=e.getPos(n),a=o.x,s=o.y,t._fixed&&"static"==e.getRuntimeStyle(document.body,"position")&&(a-=f.x,s-=f.y),r=t.getEl(),m=e.getSize(r),l=m.width,c=m.height,m=e.getSize(n),u=m.width,d=m.height,"b"===(i=(i||"").split(""))[0]&&(s+=d),"r"===i[1]&&(a+=u),"c"===i[0]&&(s+=Math.round(d/2)),"c"===i[1]&&(a+=Math.round(u/2)),"b"===i[3]&&(s-=c),"r"===i[4]&&(a-=l),"c"===i[3]&&(s-=Math.round(c/2)),"c"===i[4]&&(a-=Math.round(l/2)),{x:a,y:s,w:l,h:c}}return{testMoveRel:function(n,i){for(var r=e.getViewPort(),o=0;o0&&a.x+a.w0&&a.y+a.hr.x&&a.x+a.wr.y&&a.y+a.ht&&(e=t-n)<0?0:e}var r=this;if(r.settings.constrainToViewport){var o=e.getViewPort(window),a=r.layoutRect();t=i(t,o.w+o.x,a.w),n=i(n,o.h+o.y,a.h)}return r._rendered?r.layoutRect({x:t,y:n}).repaint():(r.settings.x=t,r.settings.y=n),r.fire("move",{x:t,y:n}),r}}}),i("tinymce/ui/Resizable",["tinymce/ui/DomUtils"],function(e){return{resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(t,n){if(t<=1||n<=1){var i=e.getWindowSize();t=t<=1?t*i.w:t,n=n<=1?n*i.h:n}return this._layoutRect.autoResize=!1,this.layoutRect({minW:t,minH:n,w:t,h:n}).reflow()},resizeBy:function(e,t){var n=this,i=n.layoutRect();return n.resizeTo(i.w+e,i.h+t)}}}),i("tinymce/ui/FloatPanel",["tinymce/ui/Panel","tinymce/ui/Movable","tinymce/ui/Resizable","tinymce/ui/DomUtils"],function(e,t,n,i){function r(){function e(e,t){for(;e;){if(e==t)return!0;e=e.parent()}}u||(u=function(t){if(2!=t.button)for(var n=p.length;n--;){var i=p[n],r=i.getParentCtrl(t.target);if(i.settings.autohide){if(r&&(e(r,i)||i.parent()===r))continue;(t=i.fire("autohide",{target:t.target})).isDefaultPrevented()||i.hide()}}},i.on(document,"click",u))}function o(){d||(d=function(){var e;for(e=p.length;e--;)s(p[e])},i.on(window,"scroll",d))}function a(){if(!f){var e=document.documentElement,t=e.clientWidth,n=e.clientHeight;f=function(){document.all&&t==e.clientWidth&&n==e.clientHeight||(t=e.clientWidth,n=e.clientHeight,g.hideAll())},i.on(window,"resize",f)}}function s(e){function t(t,n){for(var i,r=0;rn&&(e.fixed(!1).layoutRect({y:e._autoFixY}).repaint(),t(!1,e._autoFixY-n)):(e._autoFixY=e.layoutRect().y,e._autoFixY
'),n=n.firstChild,t.getContainerElm().appendChild(n),setTimeout(function(){i.addClass(n,r+"in"),i.addClass(t.getEl(),r+"in")},0),m=!0),l(!0,t)}}),t.on("show",function(){t.parents().each(function(e){if(e._fixed)return t.fixed(!0),!1})}),e.popover&&(t._preBodyHtml='
',t.addClass("popover").addClass("bottom").addClass(t.isRtl()?"end":"start"))},fixed:function(e){var t=this;if(t._fixed!=e){if(t._rendered){var n=i.getViewPort();e?t.layoutRect().y-=n.y:t.layoutRect().y+=n.y}t.toggleClass("fixed",e),t._fixed=e}return t},show:function(){var e,t=this,n=t._super();for(e=p.length;e--&&p[e]!==t;);return-1===e&&p.push(t),n},hide:function(){return c(this),l(!1,this),this._super()},hideAll:function(){g.hideAll()},close:function(){var e=this;return e.fire("close").isDefaultPrevented()||(e.remove(),l(!1,e)),e},remove:function(){c(this),this._super()},postRender:function(){var e=this;return e.settings.bodyRole&&this.getEl("body").setAttribute("role",e.settings.bodyRole),e._super()}});return g.hideAll=function(){for(var e=p.length;e--;){var t=p[e];t&&t.settings.autohide&&(t.hide(),p.splice(e,1))}},g}),i("tinymce/ui/Window",["tinymce/ui/FloatPanel","tinymce/ui/Panel","tinymce/ui/DomUtils","tinymce/ui/DragHelper"],function(e,t,n,i){return e.extend({modal:!0,Defaults:{border:1,layout:"flex",containerCls:"panel",role:"dialog",callbacks:{submit:function(){this.fire("submit",{data:this.toJSON()})},close:function(){this.close()}}},init:function(e){var n=this;n._super(e),n.isRtl()&&n.addClass("rtl"),n.addClass("window"),n._fixed=!0,e.buttons&&(n.statusbar=new t({layout:"flex",border:"1 0 0 0",spacing:3,padding:10,align:"center",pack:n.isRtl()?"start":"end",defaults:{type:"button"},items:e.buttons}),n.statusbar.addClass("foot"),n.statusbar.parent(n)),n.on("click",function(e){-1!=e.target.className.indexOf(n.classPrefix+"close")&&n.close()}),n.on("cancel",function(){n.close()}),n.aria("describedby",n.describedBy||n._id+"-none"),n.aria("label",e.title),n._fullscreen=!1},recalc:function(){var e,t,i,r,o=this,a=o.statusbar;o._fullscreen&&(o.layoutRect(n.getWindowSize()),o.layoutRect().contentH=o.layoutRect().innerH),o._super(),e=o.layoutRect(),o.settings.title&&!o._fullscreen&&(t=e.headerW)>e.w&&(i=e.x-Math.max(0,t/2),o.layoutRect({w:t,x:i}),r=!0),a&&(a.layoutRect({w:o.layoutRect().innerW}).recalc(),(t=a.layoutRect().minW+e.deltaW)>e.w&&(i=e.x-Math.max(0,t-e.w),o.layoutRect({w:t,x:i}),r=!0)),r&&o.recalc()},initLayoutRect:function(){var e,t=this,i=t._super(),r=0;if(t.settings.title&&!t._fullscreen){e=t.getEl("head");var o=n.getSize(e);i.headerW=o.width,i.headerH=o.height,r+=i.headerH}t.statusbar&&(r+=t.statusbar.layoutRect().h),i.deltaH+=r,i.minH+=r,i.h+=r;var a=n.getWindowSize();return i.x=Math.max(0,a.w/2-i.w/2),i.y=Math.max(0,a.h/2-i.h/2),i},renderHtml:function(){var e=this,t=e._layout,n=e._id,i=e.classPrefix,r=e.settings,o="",a="",s=r.html;return e.preRender(),t.preRender(e),r.title&&(o='
'+e.encode(r.title)+'
'),r.url&&(s=''),void 0===s&&(s=t.renderHtml(e)),e.statusbar&&(a=e.statusbar.renderHtml()),'
'+o+'
'+s+"
"+a+"
"},fullscreen:function(e){var t,i,r=this,o=document.documentElement,a=r.classPrefix;if(e!=r._fullscreen)if(n.on(window,"resize",function(){var e;if(r._fullscreen)if(t)r._timer||(r._timer=setTimeout(function(){var e=n.getWindowSize();r.moveTo(0,0).resizeTo(e.w,e.h),r._timer=0},50));else{e=(new Date).getTime();var i=n.getWindowSize();r.moveTo(0,0).resizeTo(i.w,i.h),(new Date).getTime()-e>50&&(t=!0)}}),i=r.layoutRect(),r._fullscreen=e,e){r._initial={x:i.x,y:i.y,w:i.w,h:i.h},r._borderBox=r.parseBox("0"),r.getEl("head").style.display="none",i.deltaH-=i.headerH+2,n.addClass(o,a+"fullscreen"),n.addClass(document.body,a+"fullscreen"),r.addClass("fullscreen");var s=n.getWindowSize();r.moveTo(0,0).resizeTo(s.w,s.h)}else r._borderBox=r.parseBox(r.settings.border),r.getEl("head").style.display="",i.deltaH+=i.headerH,n.removeClass(o,a+"fullscreen"),n.removeClass(document.body,a+"fullscreen"),r.removeClass("fullscreen"),r.moveTo(r._initial.x,r._initial.y).resizeTo(r._initial.w,r._initial.h);return r.reflow()},postRender:function(){var e,t=this;setTimeout(function(){t.addClass("in")},0),t._super(),t.statusbar&&t.statusbar.postRender(),t.focus(),this.dragHelper=new i(t._id+"-dragh",{start:function(){e={x:t.layoutRect().x,y:t.layoutRect().y}},drag:function(n){t.moveTo(e.x+n.deltaX,e.y+n.deltaY)}}),t.on("submit",function(e){e.isDefaultPrevented()||t.close()})},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e=this,t=e.classPrefix;e.dragHelper.destroy(),e._super(),e.statusbar&&this.statusbar.remove(),e._fullscreen&&(n.removeClass(document.documentElement,t+"fullscreen"),n.removeClass(document.body,t+"fullscreen"))},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}})}),i("tinymce/ui/MessageBox",["tinymce/ui/Window"],function(e){var t=e.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(n){function i(e,t,n){return{type:"button",text:e,subtype:n?"primary":"",onClick:function(e){e.control.parents()[1].close(),o(t)}}}var r,o=n.callback||function(){};switch(n.buttons){case t.OK_CANCEL:r=[i("Ok",!0,!0),i("Cancel",!1)];break;case t.YES_NO:case t.YES_NO_CANCEL:r=[i("Yes",1,!0),i("No",0)],n.buttons==t.YES_NO_CANCEL&&r.push(i("Cancel",-1));break;default:r=[i("Ok",!0,!0)]}return new e({padding:20,x:n.x,y:n.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:r,title:n.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:n.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:n.onClose,onCancel:function(){o(!1)}}).renderTo(document.body).reflow()},alert:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,t.msgBox(e)},confirm:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,e.buttons=t.OK_CANCEL,t.msgBox(e)}}});return t}),i("tinymce/WindowManager",["tinymce/ui/Window","tinymce/ui/MessageBox"],function(e,t){return function(n){function i(){if(o.length)return o[o.length-1]}var r=this,o=[];r.windows=o,n.on("remove",function(){for(var e=o.length;e--;)o[e].close()}),r.open=function(t,i){var r;return n.editorManager.setActive(n),t.title=t.title||" ",t.url=t.url||t.file,t.url&&(t.width=parseInt(t.width||320,10),t.height=parseInt(t.height||240,10)),t.body&&(t.items={defaults:t.defaults,type:t.bodyType||"form",items:t.body}),t.url||t.buttons||(t.buttons=[{text:"Ok",subtype:"primary",onclick:function(){r.find("form")[0].submit()}},{text:"Cancel",onclick:function(){r.close()}}]),r=new e(t),o.push(r),r.on("close",function(){for(var e=o.length;e--;)o[e]===r&&o.splice(e,1);o.length||n.focus()}),t.data&&r.on("postRender",function(){this.find("*").each(function(e){var n=e.name();n in t.data&&e.value(t.data[n])})}),r.features=t||{},r.params=i||{},1===o.length&&n.nodeChanged(),r.renderTo().reflow()},r.alert=function(e,i,r){t.alert(e,function(){i?i.call(r||this):n.focus()})},r.confirm=function(e,n,i){t.confirm(e,function(e){n.call(i||this,e)})},r.close=function(){i()&&i().close()},r.getParams=function(){return i()?i().params:null},r.setParams=function(e){i()&&(i().params=e)},r.getWindows=function(){return o}}}),i("tinymce/util/Quirks",["tinymce/util/VK","tinymce/dom/RangeUtils","tinymce/dom/TreeWalker","tinymce/html/Node","tinymce/html/Entities","tinymce/Env","tinymce/util/Tools"],function(e,t,n,i,r,o,a){return function(s){function l(e,t){try{s.getDoc().execCommand(e,!1,t)}catch(e){}}function c(){var e=s.getDoc().documentMode;return e||6}function u(e){return e.isDefaultPrevented()}function d(e){var t;e.dataTransfer&&(s.selection.isCollapsed()&&"IMG"==e.target.tagName&&_.select(e.target),(t=s.selection.getContent()).length>0&&e.dataTransfer.setData(B,A+escape(t)))}function f(e){var t,n;return e.dataTransfer&&(t=e.dataTransfer.getData(B))&&t.indexOf(A)>=0&&(n=unescape(t.substr(A.length))),n}function m(e){s.queryCommandSupported("mceInsertClipboardContent")?s.execCommand("mceInsertClipboardContent",!1,{content:e}):s.execCommand("mceInsertContent",!1,e)}function p(){s.shortcuts.add("meta+a",null,"SelectAll")}function h(){s.on("keydown",function(e){if(!u(e)&&e.keyCode===C){if(!s.getBody().getElementsByTagName("hr").length)return;if(_.isCollapsed()&&0===_.getRng(!0).startOffset){var t=_.getNode(),n=t.previousSibling;if("HR"==t.nodeName)return w.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(w.remove(n),e.preventDefault())}}})}function g(){s.on("keydown",function(e){if(!u(e)&&e.keyCode===C&&_.isCollapsed()&&0===_.getRng(!0).startOffset){var t=_.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function v(){s.inline||(s.contentStyles.push("body {min-height: 150px}"),s.on("click",function(e){if("HTML"==e.target.nodeName){var t;t=s.selection.getRng(),s.getBody().focus(),s.selection.setRng(t),s.selection.normalize(),s.nodeChanged()}}))}var y=a.each,b=s.$,C=e.BACKSPACE,x=e.DELETE,w=s.dom,_=s.selection,E=s.settings,N=s.parser,S=s.serializer,k=o.gecko,T=o.ie,R=o.webkit,A="data:text/mce-internal,",B=T?"Text":"URL";s.on("keydown",function(t){var n,i,r,o,a;if(!u(t)&&t.keyCode==e.BACKSPACE&&(n=_.getRng(),i=n.startContainer,r=n.startOffset,o=w.getRoot(),a=i,n.collapsed&&0===r)){for(;a&&a.parentNode&&a.parentNode.firstChild==a&&a.parentNode!=o;)a=a.parentNode;"BLOCKQUOTE"===a.tagName&&(s.formatter.toggle("blockquote",null,a),(n=w.createRng()).setStart(i,0),n.setEnd(i,0),_.setRng(n))}}),function(){function e(e){var t=w.create("body"),n=e.cloneContents();return t.appendChild(n),_.serializer.serialize(t,{format:"html"})}function n(n){if(!n.setStart){if(n.item)return!1;var i=n.duplicate();return i.moveToElementText(s.getBody()),t.compareRanges(n,i)}var r=e(n),o=w.createRng();return o.selectNode(s.getBody()),r===e(o)}s.on("keydown",function(e){var t,i,r=e.keyCode;if(!u(e)&&(r==x||r==C)){if(t=s.selection.isCollapsed(),i=s.getBody(),t&&!w.isEmpty(i))return;if(!t&&!n(s.selection.getRng()))return;e.preventDefault(),s.setContent(""),i.firstChild&&w.isBlock(i.firstChild)?s.selection.setCursorLocation(i.firstChild,0):s.selection.setCursorLocation(i,0),s.nodeChanged()}})}(),s.on("keyup focusin mouseup",function(t){65==t.keyCode&&e.metaKeyPressed(t)||_.normalize()},!0),R&&(!function(){function i(e){var t=w.schema.getBlockElements(),n=s.getBody();if("BR"!=e.nodeName)return!1;for(e=e;e!=n&&!t[e.nodeName];e=e.parentNode)if(e.nextSibling)return!1;return!0}function r(e,t){var n;for(n=e.nextSibling;n&&n!=t;n=n.nextSibling)if((3!=n.nodeType||0!==b.trim(n.data).length)&&n!==t)return!1;return n===t}function o(e,t,r){var o,a,s;for(s=w.schema.getNonEmptyElements(),o=new n(r||e,e);a=o[t?"next":"prev"]();){if(s[a.nodeName]&&!i(a))return a;if(3==a.nodeType&&a.data.length>0)return a}}function l(e){var n,i,r,a,l;if(!e.collapsed&&(n=w.getParent(t.getNode(e.startContainer,e.startOffset),w.isBlock),i=w.getParent(t.getNode(e.endContainer,e.endOffset),w.isBlock),l=s.schema.getTextBlockElements(),n!=i&&l[n.nodeName]&&l[i.nodeName]&&"false"!==w.getContentEditable(n)&&"false"!==w.getContentEditable(i)))return e.deleteContents(),r=o(n,!1),a=o(i,!0),w.isEmpty(i)||b(n).append(i.childNodes),b(i).remove(),r?1==r.nodeType?"BR"==r.nodeName?(e.setStartBefore(r),e.setEndBefore(r)):(e.setStartAfter(r),e.setEndAfter(r)):(e.setStart(r,r.data.length),e.setEnd(r,r.data.length)):a&&(1==a.nodeType?(e.setStartBefore(a),e.setEndBefore(a)):(e.setStart(a,0),e.setEnd(a,0))),_.setRng(e),!0}function c(e,n){var i,a,l,c,u,d;if(!e.collapsed)return e;if(u=e.startContainer,d=e.startOffset,3==u.nodeType)if(n){if(d0)return e;if(i=t.getNode(e.startContainer,e.startOffset),l=w.getParent(i,w.isBlock),a=o(s.getBody(),n,i),c=w.getParent(a,w.isBlock),!i||!a)return e;if(c&&l!=c)if(n){if(!r(l,c))return e;1==i.nodeType?"BR"==i.nodeName?e.setStartBefore(i):e.setStartAfter(i):e.setStart(i,i.data.length),1==a.nodeType?e.setEnd(a,0):e.setEndBefore(a)}else{if(!r(c,l))return e;1==a.nodeType?"BR"==a.nodeName?e.setStartBefore(a):e.setStartAfter(a):e.setStart(a,a.data.length),1==i.nodeType?e.setEnd(i,0):e.setEndBefore(i)}return e}function p(e){var t=_.getRng();if(t=c(t,e),l(t))return!0}function h(e){var t,n,i;p(e)||(a.each(s.getBody().getElementsByTagName("*"),function(e){"SPAN"==e.tagName&&e.setAttribute("mce-data-marked",1),!e.hasAttribute("data-mce-style")&&e.hasAttribute("style")&&s.dom.setAttrib(e,"style",s.dom.getAttrib(e,"style"))}),(t=new E(function(){})).observe(s.getDoc(),{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style"]}),s.getDoc().execCommand(e?"ForwardDelete":"Delete",!1,null),n=s.selection.getRng(),i=n.startContainer.parentNode,a.each(t.takeRecords(),function(e){if(w.isChildOf(e.target,s.getBody())){if("style"==e.attributeName){var t=e.target.getAttribute("data-mce-style");t?e.target.setAttribute("style",t):e.target.removeAttribute("style")}a.each(e.addedNodes,function(e){if("SPAN"==e.nodeName&&!e.getAttribute("mce-data-marked")){var t,r;e==i&&(t=n.startOffset,r=e.firstChild),w.remove(e,!0),r&&(n.setStart(r,t),n.setEnd(r,t),s.selection.setRng(n))}})}}),t.disconnect(),a.each(s.dom.select("span[mce-data-marked]"),function(e){e.removeAttribute("mce-data-marked")}))}var g,v,y=s.getDoc(),w=s.dom,_=s.selection,E=window.MutationObserver;E||(g=!0,E=function(){function e(e){var t=e.relatedNode||e.target;i.push({target:t,addedNodes:[t]})}function t(e){var t=e.relatedNode||e.target;i.push({target:t,attributeName:e.attrName})}var n,i=[];this.observe=function(i){(n=i).addEventListener("DOMSubtreeModified",e,!1),n.addEventListener("DOMNodeInsertedIntoDocument",e,!1),n.addEventListener("DOMNodeInserted",e,!1),n.addEventListener("DOMAttrModified",t,!1)},this.disconnect=function(){n.removeEventListener("DOMSubtreeModified",e,!1),n.removeEventListener("DOMNodeInsertedIntoDocument",e,!1),n.removeEventListener("DOMNodeInserted",e,!1),n.removeEventListener("DOMAttrModified",t,!1)},this.takeRecords=function(){return i}}),s.on("keydown",function(e){var t=e.keyCode==x,n=e.ctrlKey||e.metaKey;if(!u(e)&&(t||e.keyCode==C)){var i=s.selection.getRng(),r=i.startContainer,o=i.startOffset;if(!n&&i.collapsed&&3==r.nodeType&&(t?o0))return;e.preventDefault(),n&&s.selection.getSel().modify("extend",t?"forward":"backward",e.metaKey?"lineboundary":"word"),h(t)}}),s.on("keypress",function(t){if(!u(t)&&!_.isCollapsed()&&t.charCode&&!e.metaKeyPressed(t)){var n,i,r,o,a,l;n=s.selection.getRng(),l=String.fromCharCode(t.charCode),t.preventDefault(),i=b(n.startContainer).parents().filter(function(e,t){return!!s.schema.getTextInlineElements()[t.nodeName]}),h(!0),(i=i.filter(function(e,t){return!b.contains(s.getBody(),t)})).length?(r=w.createFragment(),i.each(function(e,t){t=t.cloneNode(!1),r.hasChildNodes()?(t.appendChild(r.firstChild),r.appendChild(t)):(a=t,r.appendChild(t)),r.appendChild(t)}),a.appendChild(s.getDoc().createTextNode(l)),o=w.getParent(n.startContainer,w.isBlock),w.isEmpty(o)?b(o).empty().append(r):n.insertNode(r),n.setStart(a.firstChild,1),n.setEnd(a.firstChild,1),s.selection.setRng(n)):s.selection.setContent(l)}}),s.addCommand("Delete",function(){h()}),s.addCommand("ForwardDelete",function(){h(!0)}),g||(s.on("dragstart",function(e){v=_.getRng(),d(e)}),s.on("drop",function(e){if(!u(e)){var n=f(e);n&&(e.preventDefault(),window.setTimeout(function(){var i=t.getCaretRangeFromPoint(e.x,e.y,y);v&&(_.setRng(v),v=null),h(),_.setRng(i),m(n)},0))}}),s.on("cut",function(e){!u(e)&&e.clipboardData&&(e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/html",s.selection.getContent()),e.clipboardData.setData("text/plain",s.selection.getContent({format:"text"})),h(!0))}))}(),s.settings.content_editable||(w.bind(s.getDoc(),"focusin",function(){_.setRng(_.getRng())}),w.bind(s.getDoc(),"mousedown mouseup",function(e){e.target==s.getDoc().documentElement&&(s.getBody().focus(),"mousedown"==e.type?_.placeCaretAt(e.clientX,e.clientY):_.setRng(_.getRng()))})),s.on("click",function(e){var t=e.target;/^(IMG|HR)$/.test(t.nodeName)&&(e.preventDefault(),_.getSel().setBaseAndExtent(t,0,t,1),s.nodeChanged()),"A"==t.nodeName&&w.hasClass(t,"mce-item-anchor")&&(e.preventDefault(),_.select(t))}),E.forced_root_block&&s.on("init",function(){l("DefaultParagraphSeparator",E.forced_root_block)}),s.on("init",function(){s.dom.bind(s.getBody(),"submit",function(e){e.preventDefault()})}),g(),N.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"==e[t].attr("class")&&e[t].remove()}),s.on("touchstart",function(e){var t,n,i,r;t=e.target,n=(new Date).getTime(),!(r=e.changedTouches)||r.length>1||(i=r[0],s.once("touchend",function(e){var r,o=e.changedTouches[0];(new Date).getTime()-n>500||Math.abs(i.clientX-o.clientX)>5||Math.abs(i.clientY-o.clientY)>5||(r={target:t},y("pageX pageY clientX clientY screenX screenY".split(" "),function(e){r[e]=o[e]}),(r=s.fire("click",r)).isDefaultPrevented()||(s.selection.placeCaretAt(o.clientX,o.clientY),s.nodeChanged()))}))}),o.iOS?(s.inline||s.on("keydown",function(){document.activeElement==document.body&&s.getWin().focus()}),v(),s.on("click",function(e){var t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)}),s.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")):p()),T&&o.ie<11&&(h(),document.body.setAttribute("role","application"),c()>7||(l("RespectVisibilityInDesign",!0),s.contentStyles.push(".mceHideBrInPre pre br {display: none}"),w.addClass(s.getBody(),"mceHideBrInPre"),N.addNodeFilter("pre",function(e){for(var t,n,r,o,a=e.length;a--;)for(n=(t=e[a].getAll("br")).length;n--;)(o=(r=t[n]).prev)&&3===o.type&&"\n"!=o.value.charAt(o.value-1)?o.value+="\n":r.parent.insert(new i("#text",3),r,!0).value="\n"}),S.addNodeFilter("pre",function(e){for(var t,n,i,r=e.length;r--;)for(n=(t=e[r].getAll("br")).length;n--;)(i=t[n].prev)&&3==i.type&&(i.value=i.value.replace(/\r?\n$/,""))})),w.bind(s.getBody(),"mouseup",function(){var e,t=_.getNode();"IMG"==t.nodeName&&((e=w.getStyle(t,"width"))&&(w.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),w.setStyle(t,"width","")),(e=w.getStyle(t,"height"))&&(w.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),w.setStyle(t,"height","")))}),s.on("keydown",function(e){var t;u(e)||e.keyCode!=C||(t=s.getDoc().selection.createRange())&&t.item&&(e.preventDefault(),s.undoManager.beforeChange(),w.remove(t.item(0)),s.undoManager.add())}),function(){var e;c()>=10&&(e="",y("p div h1 h2 h3 h4 h5 h6".split(" "),function(t,n){e+=(n>0?",":"")+t+":empty"}),s.contentStyles.push(e+"{padding-right: 1px !important}"))}(),c()<9&&(N.addNodeFilter("noscript",function(e){for(var t,n,i=e.length;i--;)(n=(t=e[i]).firstChild)&&t.attr("data-mce-innertext",n.value)}),S.addNodeFilter("noscript",function(e){for(var t,n,o,a=e.length;a--;)t=e[a],(n=e[a].firstChild)?n.value=r.decode(n.value):(o=t.attributes.map["data-mce-innertext"])&&(t.attr("data-mce-innertext",null),(n=new i("#text",3)).value=o,n.raw=!0,t.append(n))})),function(){function e(e,t){var n=s.createTextRange();try{n.moveToPoint(e,t)}catch(e){n=null}return n}function t(t){var i;t.button?(i=e(t.x,t.y))&&(i.compareEndPoints("StartToStart",r)>0?i.setEndPoint("StartToStart",r):i.setEndPoint("EndToEnd",r),i.select()):n()}function n(){var e=a.selection.createRange();r&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&r.select(),w.unbind(a,"mouseup",n),w.unbind(a,"mousemove",t),r=i=0}var i,r,o,a=w.doc,s=a.body;a.documentElement.unselectable=!0,w.bind(a,"mousedown contextmenu",function(s){if("HTML"===s.target.nodeName){if(i&&n(),(o=a.documentElement).scrollHeight>o.clientHeight)return;i=1,(r=e(s.x,s.y))&&(w.bind(a,"mouseup",n),w.bind(a,"mousemove",t),w.getRoot().focus(),r.select())}})}()),o.ie>=11&&(v(),s.inline||s.on("focus blur beforegetcontent",function(){var e=s.dom.create("br");s.getBody().appendChild(e),e.parentNode.removeChild(e)},!0),g()),o.ie&&(p(),l("AutoUrlDetect",!1),s.on("dragstart",function(e){d(e)}),s.on("drop",function(e){if(!u(e)){var n=f(e);if(n){e.preventDefault();var i=t.getCaretRangeFromPoint(e.x,e.y,s.getDoc());_.setRng(i),m(n)}}})),k&&(h(),window.Range.prototype.getClientRects||s.on("mousedown",function(e){if(!u(e)&&"HTML"===e.target.nodeName){var t=s.getBody();t.blur(),setTimeout(function(){t.focus()},0)}}),function(){function e(){var e=w.getAttribs(_.getStart().cloneNode(!1));return function(){var t=_.getStart();t!==s.getBody()&&(w.setAttrib(t,"style",null),y(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}}function t(){return!_.isCollapsed()&&w.getParent(_.getStart(),w.isBlock)!=w.getParent(_.getEnd(),w.isBlock)}s.on("keypress",function(n){var i;if(!u(n)&&(8==n.keyCode||46==n.keyCode)&&t())return i=e(),s.getDoc().execCommand("delete",!1,null),i(),n.preventDefault(),!1}),w.bind(s.getDoc(),"cut",function(n){var i;!u(n)&&t()&&(i=e(),setTimeout(function(){i()},0))})}(),E.readonly||s.on("BeforeExecCommand MouseDown",function(){s._refreshContentEditable(),l("StyleWithCSS",!1),l("enableInlineTableEditing",!1),E.object_resizing||l("enableObjectResizing",!1)}),function(){function e(){y(w.select("a"),function(e){var t=e.parentNode,n=w.getRoot();if(t.lastChild===e){for(;t&&!w.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}w.add(t,"br",{"data-mce-bogus":1})}})}s.on("SetContent ExecCommand",function(t){"setcontent"!=t.type&&"mceInsertLink"!==t.command||e()})}(),s.on("Undo Redo SetContent",function(e){e.initial||s.execCommand("mceRepaint")}),s.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}"),o.mac&&s.on("keydown",function(t){!e.metaKeyPressed(t)||37!=t.keyCode&&39!=t.keyCode||(t.preventDefault(),s.selection.getSel().modify("move",37==t.keyCode?"backward":"forward","lineboundary"))}),g())}}),i("tinymce/util/Observable",["tinymce/util/EventDispatcher"],function(e){function t(t){return t._eventDispatcher||(t._eventDispatcher=new e({scope:t,toggleEvent:function(n,i){e.isNative(n)&&t.toggleNativeEvent&&t.toggleNativeEvent(n,i)}})),t._eventDispatcher}return{fire:function(e,n,i){var r=this;if(r.removed&&"remove"!==e)return n;if(n=t(r).fire(e,n,i),!1!==i&&r.parent)for(var o=r.parent();o&&!n.isPropagationStopped();)o.fire(e,n,!1),o=o.parent();return n},on:function(e,n,i){return t(this).on(e,n,i)},off:function(e,n){return t(this).off(e,n)},once:function(e,n){return t(this).once(e,n)},hasEventListeners:function(e){return t(this).has(e)}}}),i("tinymce/EditorObservable",["tinymce/util/Observable","tinymce/dom/DOMUtils","tinymce/util/Tools"],function(e,t,n){function i(e,t){return"selectionchange"==t?e.getDoc():!e.inline&&/^mouse|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc().documentElement:e.settings.event_root?(e.eventRoot||(e.eventRoot=a.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()}function r(e,t){var n,r=i(e,t);if(e.delegates||(e.delegates={}),!e.delegates[t])if(e.settings.event_root){if(o||(o={},e.editorManager.on("removeEditor",function(){var t;if(!e.editorManager.activeEditor&&o){for(t in o)e.dom.unbind(i(e,t));o=null}})),o[t])return;n=function(n){for(var i=n.target,r=e.editorManager.editors,o=r.length;o--;){var s=r[o].getBody();(s===i||a.isChildOf(i,s))&&(r[o].hidden||r[o].fire(t,n))}},o[t]=n,a.bind(r,t,n)}else n=function(n){e.hidden||e.fire(t,n)},a.bind(r,t,n),e.delegates[t]=n}var o,a=t.DOM,s={bindPendingEventDelegates:function(){var e=this;n.each(e._pendingNativeEvents,function(t){r(e,t)})},toggleNativeEvent:function(e,t){var n=this;n.settings.readonly||"focus"!=e&&"blur"!=e&&(t?n.initialized?r(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(i(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e,t=this;if(t.delegates){for(e in t.delegates)t.dom.unbind(i(t,e),e,t.delegates[e]);delete t.delegates}t.inline||(t.getBody().onload=null,t.dom.unbind(t.getWin()),t.dom.unbind(t.getDoc())),t.dom.unbind(t.getBody()),t.dom.unbind(t.getContainer())}};return s=n.extend({},e,s)}),i("tinymce/Shortcuts",["tinymce/util/Tools","tinymce/Env"],function(e,t){var n=e.each,i=e.explode,r={f9:120,f10:121,f11:122},o=e.makeMap("alt,ctrl,shift,meta,access");return function(a){function s(e,s,l,c){var u,d,f;f={func:l,scope:c||a,desc:a.translate(s)},n(i(e,"+"),function(e){e in o?f[e]=!0:/^[0-9]{2,}$/.test(e)?f.keyCode=parseInt(e,10):(f.charCode=e.charCodeAt(0),f.keyCode=r[e]||e.toUpperCase().charCodeAt(0))}),u=[f.keyCode];for(d in o)f[d]?u.push(d):f[d]=!1;return f.id=u.join(","),f.access&&(f.alt=!0,t.mac?f.ctrl=!0:f.shift=!0),f.meta&&(t.mac?f.meta=!0:(f.ctrl=!0,f.meta=!1)),f}var l=this,c={};a.on("keyup keypress keydown",function(e){(e.altKey||e.ctrlKey||e.metaKey)&&!e.isDefaultPrevented()&&n(c,function(t){if(t.ctrl==e.ctrlKey&&t.meta==e.metaKey&&t.alt==e.altKey&&t.shift==e.shiftKey)return e.keyCode==t.keyCode||e.charCode&&e.charCode==t.charCode?(e.preventDefault(),"keydown"==e.type&&t.func.call(t.scope),!0):void 0})}),l.add=function(t,r,o,l){var u;return u=o,"string"==typeof o?o=function(){a.execCommand(u,!1,null)}:e.isArray(u)&&(o=function(){a.execCommand(u[0],u[1],u[2])}),n(i(t.toLowerCase()),function(e){var t=s(e,r,o,l);c[t.id]=t}),!0},l.remove=function(e){var t=s(e);return!!c[t.id]&&(delete c[t.id],!0)}}}),i("tinymce/Editor",["tinymce/dom/DOMUtils","tinymce/dom/DomQuery","tinymce/AddOnManager","tinymce/NodeChange","tinymce/html/Node","tinymce/dom/Serializer","tinymce/html/Serializer","tinymce/dom/Selection","tinymce/Formatter","tinymce/UndoManager","tinymce/EnterKey","tinymce/ForceBlocks","tinymce/EditorCommands","tinymce/util/URI","tinymce/dom/ScriptLoader","tinymce/dom/EventUtils","tinymce/WindowManager","tinymce/html/Schema","tinymce/html/DomParser","tinymce/util/Quirks","tinymce/Env","tinymce/util/Tools","tinymce/EditorObservable","tinymce/Shortcuts"],function(e,n,i,r,o,a,s,l,c,u,d,f,m,p,h,g,v,y,b,C,x,w,_,E){function N(e,t,r){var o,a,s=this;o=s.documentBaseUrl=r.documentBaseURL,a=r.baseURI,s.settings=t=R({id:e,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:o,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"",visual:!0,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%",forced_root_block:"p",hidden_input:!0,padd_empty_editor:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,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,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:!0,entity_encoding:"named",url_converter:s.convertURL,url_converter_scope:s,ie7_compat:!0},t),i.language=t.language||"en",i.languageLoad=t.language_load,i.baseURL=r.baseURL,s.id=t.id=e,s.isNotDirty=!0,s.plugins={},s.documentBaseURI=new p(t.document_base_url||o,{base_uri:a}),s.baseURI=a,s.contentCSS=[],s.contentStyles=[],s.shortcuts=new E(s),s.loadedCSS={},s.editorCommands=new m(s),t.target&&(s.targetElm=t.target),s.suffix=r.suffix,s.editorManager=r,s.inline=t.inline,t.cache_suffix&&(x.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),r.fire("SetupEditor",s),s.execCallback("setup",s),s.$=n.overrideDefaults(function(){return{context:s.inline?s.getBody():s.getDoc(),element:s.getBody()}})}var S=e.DOM,k=i.ThemeManager,T=i.PluginManager,R=w.extend,A=w.each,B=w.explode,D=w.inArray,M=w.trim,L=w.resolve,P=g.Event,H=x.gecko,O=x.ie;return N.prototype={render:function(){function e(){S.unbind(window,"ready",e),t.render()}var t=this,n=t.settings,i=t.id,r=t.suffix;if(P.domLoaded){if(t.getElement()&&x.contentEditable){n.inline?t.inline=!0:(t.orgVisibility=t.getElement().style.visibility,t.getElement().style.visibility="hidden");var o=t.getElement().form||S.getParent(i,"form");o&&(t.formElement=o,n.hidden_input&&!/TEXTAREA|INPUT/i.test(t.getElement().nodeName)&&(S.insertAfter(S.create("input",{type:"hidden",name:i}),i),t.hasHiddenInput=!0),t.formEventDelegate=function(e){t.fire(e.type,e)},S.bind(o,"submit reset",t.formEventDelegate),t.on("reset",function(){t.setContent(t.startContent,{format:"raw"})}),!n.submit_patch||o.submit.nodeType||o.submit.length||o._mceOldSubmit||(o._mceOldSubmit=o.submit,o.submit=function(){return t.editorManager.triggerSave(),t.isNotDirty=!0,o._mceOldSubmit(o)})),t.windowManager=new v(t),"xml"==n.encoding&&t.on("GetContent",function(e){e.save&&(e.content=S.encode(e.content))}),n.add_form_submit_trigger&&t.on("submit",function(){t.initialized&&t.save()}),n.add_unload_trigger&&(t._beforeUnload=function(){!t.initialized||t.destroyed||t.isHidden()||t.save({format:"raw",no_events:!0,set_dirty:!1})},t.editorManager.on("BeforeUnload",t._beforeUnload)),function(){var e=h.ScriptLoader;if(n.language&&"en"!=n.language&&!n.language_url&&(n.language_url=t.editorManager.baseURL+"/langs/"+n.language+".js"),n.language_url&&e.add(n.language_url),n.theme&&"function"!=typeof n.theme&&"-"!=n.theme.charAt(0)&&!k.urls[n.theme]){var i=n.theme_url;i=i?t.documentBaseURI.toAbsolute(i):"themes/"+n.theme+"/theme"+r+".js",k.load(n.theme,i)}w.isArray(n.plugins)&&(n.plugins=n.plugins.join(" ")),A(n.external_plugins,function(e,t){T.load(t,e),n.plugins+=" "+t}),A(n.plugins.split(/[ ,]/),function(e){if((e=M(e))&&!T.urls[e])if("-"==e.charAt(0)){e=e.substr(1,e.length);var t=T.dependencies(e);A(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+r+".js"};e=T.createUrl(t,e),T.load(e.resource,e)})}else T.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+r+".js"})}),e.loadQueue(function(){t.removed||t.init()})}()}}else S.bind(window,"ready",e)},init:function(){function e(t){var n,i,r=T.get(t);n=T.urls[t]||f.documentBaseUrl.replace(/\/$/,""),t=M(t),r&&-1===D(h,t)&&(A(T.dependencies(t),function(t){e(t)}),i=new r(f,n,f.$),f.plugins[t]=i,i.init&&(i.init(f,n),h.push(t)))}var t,n,i,r,o,a,s,l,c,u,d,f=this,m=f.settings,p=f.getElement(),h=[];if(this.editorManager.i18n.setCode(m.language),f.rtl=this.editorManager.i18n.rtl,f.editorManager.add(f),m.aria_label=m.aria_label||S.getAttrib(p,"aria-label",f.getLang("aria.rich_text_area")),m.theme&&("function"!=typeof m.theme?(m.theme=m.theme.replace(/-/,""),a=k.get(m.theme),f.theme=new a(f,k.urls[m.theme]),f.theme.init&&f.theme.init(f,k.urls[m.theme]||f.documentBaseUrl.replace(/\/$/,""),f.$)):f.theme=m.theme),A(m.plugins.replace(/\-/g,"").split(/[ ,]/),e),m.render_ui&&f.theme&&(f.orgDisplay=p.style.display,"function"!=typeof m.theme?(t=m.width||p.style.width||p.offsetWidth,n=m.height||p.style.height||p.offsetHeight,i=m.min_height||100,(u=/^[0-9\.]+(|px)$/i).test(""+t)&&(t=Math.max(parseInt(t,10),100)),u.test(""+n)&&(n=Math.max(parseInt(n,10),i)),o=f.theme.renderUI({targetNode:p,width:t,height:n,deltaWidth:m.delta_width,deltaHeight:m.delta_height}),m.content_editable||(n=(o.iframeHeight||n)+("number"==typeof n?o.deltaHeight||0:""))",m.document_base_url!=f.documentBaseUrl&&(f.iframeHTML+=''),!x.caretAfter&&m.ie7_compat&&(f.iframeHTML+=''),f.iframeHTML+='',d=0;d',f.loadedCSS[g]=!0}-1!=(l=m.body_id||"tinymce").indexOf("=")&&(l=(l=f.getParam("body_id","","hash"))[f.id]||l),-1!=(c=m.body_class||"").indexOf("=")&&(c=(c=f.getParam("body_class","","hash"))[f.id]||""),m.content_security_policy&&(f.iframeHTML+=''),f.iframeHTML+='
';var v='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+f.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()';document.domain!=location.hostname&&(s=v);var y=S.create("iframe",{id:f.id+"_ifr",frameBorder:"0",allowTransparency:"true",title:f.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:n,display:"block"}});if(y.onload=function(){y.onload=null,f.fire("load")},S.setAttrib(y,"src",s||'javascript:""'),f.contentAreaContainer=o.iframeContainer,f.iframeElement=y,r=S.add(o.iframeContainer,y),O)try{f.getDoc()}catch(e){r.src=s=v}o.editorContainer&&(S.get(o.editorContainer).style.display=f.orgDisplay,f.hidden=S.isHidden(o.editorContainer)),f.getElement().style.display="none",S.setAttrib(f.id,"aria-hidden",!0),s||f.initContentBody(),p=r=o=null},initContentBody:function(t){var n,i,s=this,m=s.settings,p=s.getElement(),h=s.getDoc();m.inline||(s.getElement().style.visibility=s.orgVisibility),t||m.content_editable||(h.open(),h.write(s.iframeHTML),h.close()),m.content_editable&&(s.on("remove",function(){var e=this.getBody();S.removeClass(e,"mce-content-body"),S.removeClass(e,"mce-edit-focus"),S.setAttrib(e,"contentEditable",null)}),S.addClass(p,"mce-content-body"),s.contentDocument=h=m.content_document||document,s.contentWindow=m.content_window||window,s.bodyElement=p,m.content_document=m.content_window=null,m.root_name=p.nodeName.toLowerCase()),(n=s.getBody()).disabled=!0,m.readonly||(s.inline&&"static"==S.getStyle(n,"position",!0)&&(n.style.position="relative"),n.contentEditable=s.getParam("content_editable_state",!0)),n.disabled=!1,s.schema=new y(m),s.dom=new e(h,{keep_values:!0,url_converter:s.convertURL,url_converter_scope:s,hex_colors:m.force_hex_style_colors,class_filter:m.class_filter,update_styles:!0,root_element:s.inline?s.getBody():null,collect:m.content_editable,schema:s.schema,onSetAttrib:function(e){s.fire("SetAttrib",e)}}),s.parser=new b(m,s.schema),s.parser.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var n,i,r,o=e.length,a=s.dom;o--;)i=(n=e[o]).attr(t),r="data-mce-"+t,n.attributes.map[r]||("style"===t?((i=a.serializeStyle(a.parseStyle(i),n.name)).length||(i=null),n.attr(r,i),n.attr(t,i)):"tabindex"===t?(n.attr(r,i),n.attr(t,null)):n.attr(r,s.convertURL(i,t,n.name)))}),s.parser.addNodeFilter("script",function(e){for(var t,n=e.length;n--;)(t=e[n]).attr("type","mce-"+(t.attr("type")||"no/type"))}),s.parser.addNodeFilter("#cdata",function(e){for(var t,n=e.length;n--;)(t=e[n]).type=8,t.name="#comment",t.value="[CDATA["+t.value+"]]"}),s.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t,n=e.length,i=s.schema.getNonEmptyElements();n--;)(t=e[n]).isEmpty(i)&&(t.append(new o("br",1)).shortEnded=!0)}),s.serializer=new a(m,s),s.selection=new l(s.dom,s.getWin(),s.serializer,s),s.formatter=new c(s),s.undoManager=new u(s),s.forceBlocks=new f(s),s.enterKey=new d(s),s._nodeChangeDispatcher=new r(s),s.fire("PreInit"),m.browser_spellcheck||m.gecko_spellcheck||(h.body.spellcheck=!1,S.setAttrib(n,"spellcheck","false")),s.fire("PostRender"),s.quirks=new C(s),m.directionality&&(n.dir=m.directionality),m.nowrap&&(n.style.whiteSpace="nowrap"),m.protect&&s.on("BeforeSetContent",function(e){A(m.protect,function(t){e.content=e.content.replace(t,function(e){return"\x3c!--mce:protected "+escape(e)+"--\x3e"})})}),s.on("SetContent",function(){s.addVisual(s.getBody())}),m.padd_empty_editor&&s.on("PostProcess",function(e){e.content=e.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
[\r\n]*)$/,"")}),s.load({initial:!0,format:"html"}),s.startContent=s.getContent({format:"raw"}),s.initialized=!0,s.bindPendingEventDelegates(),s.fire("init"),s.focus(!0),s.nodeChanged({initial:!0}),s.execCallback("init_instance_callback",s),s.contentStyles.length>0&&(i="",A(s.contentStyles,function(e){i+=e+"\r\n"}),s.dom.addStyle(i)),A(s.contentCSS,function(e){s.loadedCSS[e]||(s.dom.loadCSS(e),s.loadedCSS[e]=!0)}),m.auto_focus&&setTimeout(function(){var e;(e=!0===m.auto_focus?s:s.editorManager.get(m.auto_focus)).destroyed||e.focus()},100),p=h=n=null},focus:function(e){var t,n,i,r=this,o=r.selection,a=r.settings.content_editable,s=r.getDoc();if(!e){if((t=o.getRng()).item&&(n=t.item(0)),r._refreshContentEditable(),a||(x.opera||r.getBody().focus(),r.getWin().focus()),H||a){if((i=r.getBody()).setActive)try{i.setActive()}catch(e){i.focus()}else i.focus();a&&o.normalize()}n&&n.ownerDocument==s&&((t=s.body.createControlRange()).addElement(n),t.select())}r.editorManager.setActive(r)},execCallback:function(e){var t,n=this,i=n.settings[e];if(i)return n.callbackLookup&&(t=n.callbackLookup[e])&&(i=t.func,t=t.scope),"string"==typeof i&&(t=(t=i.replace(/\.\w+$/,""))?L(t):0,i=L(i),n.callbackLookup=n.callbackLookup||{},n.callbackLookup[e]={func:i,scope:t}),i.apply(t||n,Array.prototype.slice.call(arguments,1))},translate:function(e){var t=this.settings.language||"en",n=this.editorManager.i18n;return e?n.data[t+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,i){return n.data[t+"."+i]||"{#"+i+"}"}):""},getLang:function(e,n){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(n!==t?n:"{#"+e+"}")},getParam:function(e,t,n){var i,r=e in this.settings?this.settings[e]:t;return"hash"===n?(i={},"string"==typeof r?A(r.indexOf("=")>0?r.split(/[;,](?![^=;,]*(?:[;,]|$))/):r.split(","),function(e){(e=e.split("=")).length>1?i[M(e[0])]=M(e[1]):i[M(e[0])]=M(e)}):i=r,i):r},nodeChanged:function(e){this._nodeChangeDispatcher.nodeChanged(e)},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.text||t.icon||(t.icon=e),n.buttons=n.buttons||{},t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems||{},n.menuItems[e]=t},addCommand:function(e,t,n){this.editorCommands.addCommand(e,t,n)},addQueryStateHandler:function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},addQueryValueHandler:function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},addShortcut:function(e,t,n,i){this.shortcuts.add(e,t,n,i)},execCommand:function(e,t,n,i){return this.editorCommands.execCommand(e,t,n,i)},queryCommandState:function(e){return this.editorCommands.queryCommandState(e)},queryCommandValue:function(e){return this.editorCommands.queryCommandValue(e)},queryCommandSupported:function(e){return this.editorCommands.queryCommandSupported(e)},show:function(){var e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable=!0:(S.show(e.getContainer()),S.hide(e.id)),e.load(),e.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(O&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e==e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(S.hide(e.getContainer()),S.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var n,i=this,r=i.getElement();if(r)return e=e||{},e.load=!0,n=i.setContent(r.value!==t?r.value:r.innerHTML,e),e.element=r,e.no_events||i.fire("LoadContent",e),e.element=r=null,n},save:function(e){var t,n,i=this,r=i.getElement();if(r&&i.initialized)return e=e||{},e.save=!0,e.element=r,t=e.content=i.getContent(e),e.no_events||i.fire("SaveContent",e),t=e.content,/TEXTAREA|INPUT/i.test(r.nodeName)?r.value=t:(i.inline||(r.innerHTML=t),(n=S.getParent(i.id,"form"))&&A(n.elements,function(e){if(e.name==i.id)return e.value=t,!1})),e.element=r=null,!1!==e.set_dirty&&(i.isNotDirty=!0),t},setContent:function(e,t){var n,i=this,r=i.getBody();return t=t||{},t.format=t.format||"html",t.set=!0,t.content=e,t.no_events||i.fire("BeforeSetContent",t),0===(e=t.content).length||/^\s+$/.test(e)?((n=i.settings.forced_root_block)&&i.schema.isValidChild(r.nodeName.toLowerCase(),n.toLowerCase())?(e=O&&O<11?"":'
',e=i.dom.createHTML(n,i.settings.forced_root_block_attrs,e)):O||(e='
'),i.dom.setHTML(r,e),i.fire("SetContent",t)):("raw"!==t.format&&(e=new s({},i.schema).serialize(i.parser.parse(e,{isRootContent:!0}))),t.content=M(e),i.dom.setHTML(r,t.content),t.no_events||i.fire("SetContent",t)),t.content},getContent:function(e){var t,n=this,i=n.getBody();return e=e||{},e.format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||n.fire("BeforeGetContent",e),t="raw"==e.format?i.innerHTML:"text"==e.format?i.innerText||i.textContent:n.serializer.serialize(i,e),"text"!=e.format?e.content=M(t):e.content=t,e.no_events||n.fire("GetContent",e),e.content},insertContent:function(e,t){t&&(e=R({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},getContainer:function(){var e=this;return e.container||(e.container=S.get(e.editorContainer||e.id+"_parent")),e.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=S.get(this.id)),this.targetElm},getWin:function(){var e,t=this;return t.contentWindow||(e=t.iframeElement)&&(t.contentWindow=e.contentWindow),t.contentWindow},getDoc:function(){var e,t=this;return t.contentDocument||(e=t.getWin())&&(t.contentDocument=e.document),t.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(e,t,n){var i=this,r=i.settings;return r.urlconverter_callback?i.execCallback("urlconverter_callback",e,n,!0,t):!r.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")||0===e.length?e:r.relative_urls?i.documentBaseURI.toRelative(e):e=i.documentBaseURI.toAbsolute(e,r.remove_script_host)},addVisual:function(e){var n,i=this,r=i.settings,o=i.dom;e=e||i.getBody(),i.hasVisual===t&&(i.hasVisual=r.visual),A(o.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return n=r.visual_table_class||"mce-item-table",void((t=o.getAttrib(e,"border"))&&"0"!=t||!i.hasVisual?o.removeClass(e,n):o.addClass(e,n));case"A":return void(o.getAttrib(e,"href",!1)||(t=o.getAttrib(e,"name")||e.id,n=r.visual_anchor_class||"mce-item-anchor",t&&i.hasVisual?o.addClass(e,n):o.removeClass(e,n)))}}),i.fire("VisualAid",{element:e,hasVisual:i.hasVisual})},remove:function(){var e=this;e.removed||(e.save(),e.removed=1,e.unbindAllNativeEvents(),e.hasHiddenInput&&S.remove(e.getElement().nextSibling),e.inline||(O&&O<10&&e.getDoc().execCommand("SelectAll",!1,null),S.setStyle(e.id,"display",e.orgDisplay),e.getBody().onload=null),e.fire("remove"),e.editorManager.remove(e),S.remove(e.getContainer()),e.destroy())},destroy:function(e){var t,n=this;n.destroyed||(e||n.removed?(e||(n.editorManager.off("beforeunload",n._beforeUnload),n.theme&&n.theme.destroy&&n.theme.destroy(),n.selection.destroy(),n.dom.destroy()),(t=n.formElement)&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,t._mceOldSubmit=null),S.unbind(t,"submit reset",n.formEventDelegate)),n.contentAreaContainer=n.formElement=n.container=n.editorContainer=null,n.bodyElement=n.contentDocument=n.contentWindow=null,n.iframeElement=n.targetElm=null,n.selection&&(n.selection=n.selection.win=n.selection.dom=n.selection.dom.doc=null),n.destroyed=1):n.remove())},_refreshContentEditable:function(){var e,t,n=this;n._isHidden()&&((t=(e=n.getBody()).parentNode).removeChild(e),t.appendChild(e),e.focus())},_isHidden:function(){var e;return H?!(e=this.selection.getSel())||!e.rangeCount||0===e.rangeCount:0}},R(N.prototype,_),N}),i("tinymce/util/I18n",[],function(){var e={},t="en";return{setCode:function(e){e&&(t=e,this.rtl=!!this.data[e]&&"rtl"===this.data[e]._dir)},getCode:function(){return t},rtl:!1,add:function(t,n){var i=e[t];i||(e[t]=i={});for(var r in n)i[r]=n[r];this.setCode(t)},translate:function(n){var i;if((i=e[t])||(i={}),void 0===n)return n;if("string"!=typeof n&&n.raw)return n.raw;if(n.push){var r=n.slice(1);n=(i[n[0]]||n[0]).replace(/\{([0-9]+)\}/g,function(e,t){return r[t]})}return(i[n]||n).replace(/{context:\w+}$/,"")},data:e}}),i("tinymce/FocusManager",["tinymce/dom/DOMUtils","tinymce/Env"],function(e,t){function n(e){function s(){try{return document.activeElement}catch(e){return document.body}}function l(e,t){if(t&&t.startContainer){if(!e.isChildOf(t.startContainer,e.getRoot())||!e.isChildOf(t.endContainer,e.getRoot()))return;return{startContainer:t.startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset}}return t}function c(e,t){var n;return t.startContainer?((n=e.getDoc().createRange()).setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset)):n=t,n}function u(e){return!!a.getParent(e,n.isEditorUIElement)}e.on("AddEditor",function(n){var d=n.editor;d.on("init",function(){(d.inline||t.ie)&&("onbeforedeactivate"in document&&t.ie<9?d.dom.bind(d.getBody(),"beforedeactivate",function(e){if(e.target==d.getBody())try{d.lastRng=d.selection.getRng()}catch(e){}}):d.on("nodechange mouseup keyup",function(e){var t=s();"nodechange"==e.type&&e.selectionChange||(t&&t.id==d.id+"_ifr"&&(t=d.getBody()),d.dom.isChildOf(t,d.getBody())&&(d.lastRng=d.selection.getRng()))}),t.webkit&&!i&&(i=function(){var t=e.activeEditor;if(t&&t.selection){var n=t.selection.getRng();n&&!n.collapsed&&(d.lastRng=n)}},a.bind(document,"selectionchange",i)))}),d.on("setcontent",function(){d.lastRng=null}),d.on("mousedown",function(){d.selection.lastFocusBookmark=null}),d.on("focusin",function(){var t=e.focusedEditor;d.selection.lastFocusBookmark&&(d.selection.setRng(c(d,d.selection.lastFocusBookmark)),d.selection.lastFocusBookmark=null),t!=d&&(t&&t.fire("blur",{focusedEditor:d}),e.setActive(d),e.focusedEditor=d,d.fire("focus",{blurredEditor:t}),d.focus(!0)),d.lastRng=null}),d.on("focusout",function(){window.setTimeout(function(){var t=e.focusedEditor;u(s())||t!=d||(d.fire("blur",{focusedEditor:null}),e.focusedEditor=null,d.selection&&(d.selection.lastFocusBookmark=null))},0)}),r||(r=function(t){var n=e.activeEditor;n&&t.target.ownerDocument==document&&(n.selection&&t.target!=n.getBody()&&(n.selection.lastFocusBookmark=l(n.dom,n.lastRng)),t.target==document.body||u(t.target)||e.focusedEditor!=n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null))},a.bind(document,"focusin",r)),d.inline&&!o&&(o=function(t){var n=e.activeEditor;if(n.inline&&!n.dom.isChildOf(t.target,n.getBody())){var i=n.selection.getRng();i.collapsed||(n.lastRng=i)}},a.bind(document,"mouseup",o))}),e.on("RemoveEditor",function(t){e.focusedEditor==t.editor&&(e.focusedEditor=null),e.activeEditor||(a.unbind(document,"selectionchange",i),a.unbind(document,"focusin",r),a.unbind(document,"mouseup",o),i=r=o=null)})}var i,r,o,a=e.DOM;return n.isEditorUIElement=function(e){return-1!==e.className.toString().indexOf("mce-")},n}),i("tinymce/EditorManager",["tinymce/Editor","tinymce/dom/DomQuery","tinymce/dom/DOMUtils","tinymce/util/URI","tinymce/Env","tinymce/util/Tools","tinymce/util/Observable","tinymce/util/I18n","tinymce/FocusManager"],function(e,t,n,i,r,o,a,s,l){function c(e){var t,n=f.editors;delete n[e.id];for(var i=0;i0&&h(p(e),function(e){var n;(n=m.get(e))?i(e,t,n):h(document.forms,function(n){h(n.elements,function(n){n.name===e&&(e="mce_editor_"+v++,m.setAttrib(n,"id",e),i(e,t,n))})})});break;case"textareas":case"specific_textareas":h(m.select("textarea"),function(e){t.editor_deselector&&o(e,t.editor_deselector)||t.editor_selector&&!o(e,t.editor_selector)||i(n(e),t,e)})}t.oninit&&(e=s=0,h(l,function(t){s++,t.initialized?e++:t.on("init",function(){++e==s&&r("oninit")}),e==s&&r("oninit")}))}}var s=this,l=[];s.settings=t,m.bind(window,"ready",a)},get:function(e){return arguments.length?e in this.editors?this.editors[e]:null:this.editors},add:function(e){var t=this,n=t.editors;return n[e.id]=e,n.push(e),t.activeEditor=e,t.fire("AddEditor",{editor:e}),d||(d=function(){t.fire("BeforeUnload")},m.bind(window,"beforeunload",d)),e},createEditor:function(t,n){return this.add(new e(t,n,this))},remove:function(e){var t,n,i=this,r=i.editors;{if(e)return"string"==typeof e?(e=e.selector||e,void h(m.select(e),function(e){(n=r[e.id])&&i.remove(n)})):(n=e,r[n.id]?(c(n)&&i.fire("RemoveEditor",{editor:n}),r.length||m.unbind(window,"beforeunload",d),n.remove(),n):null);for(t=r.length-1;t>=0;t--)i.remove(r[t])}},execCommand:function(t,n,i){var r=this,o=r.get(i);switch(t){case"mceAddEditor":return r.get(i)||new e(i,r.settings,r).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(r.execCommand("mceAddEditor",0,i),!0)}return!!r.activeEditor&&r.activeEditor.execCommand(t,n,i)},triggerSave:function(){h(this.editors,function(e){e.save()})},addI18n:function(e,t){s.add(e,t)},translate:function(e){return s.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!=e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e}},g(f,a),f.setup(),window.tinymce=window.tinyMCE=f,f}),i("tinymce/LegacyInput",["tinymce/EditorManager","tinymce/util/Tools"],function(e,t){var n=t.each,i=t.explode;e.on("AddEditor",function(e){var t=e.editor;t.on("preInit",function(){function e(e,t){n(t,function(t,n){t&&a.setStyle(e,n,t)}),a.rename(e,"span")}var r,o,a,s=t.settings;s.inline_styles&&(o=i(s.font_size_legacy_values),r={font:function(t,n){e(n,{backgroundColor:n.style.backgroundColor,color:n.color,fontFamily:n.face,fontSize:o[parseInt(n.size,10)-1]})},u:function(n,i){"html4"===t.settings.schema&&e(i,{textDecoration:"underline"})},strike:function(t,n){e(n,{textDecoration:"line-through"})}},t.on("PreProcess SetContent",function(e){a=t.dom,s.convert_fonts_to_spans&&n(a.select("font,u,strike",e.node),function(e){r[e.nodeName.toLowerCase()](a,e)})}))})})}),i("tinymce/util/XHR",["tinymce/util/Observable","tinymce/util/Tools"],function(e,t){var n={send:function(e){function t(){!e.async||4==i.readyState||r++>1e4?(e.success&&r<1e4&&200==i.status?e.success.call(e.success_scope,""+i.responseText,i,e):e.error&&e.error.call(e.error_scope,r>1e4?"TIMED_OUT":"GENERAL",i,e),i=null):setTimeout(t,10)}var i,r=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=!1!==e.async,e.data=e.data||"",i=new XMLHttpRequest){if(i.overrideMimeType&&i.overrideMimeType(e.content_type),i.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(i.withCredentials=!0),e.content_type&&i.setRequestHeader("Content-Type",e.content_type),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),(i=n.fire("beforeSend",{xhr:i,settings:e}).xhr).send(e.data),!e.async)return t();setTimeout(t,10)}}};return t.extend(n,e),n}),i("tinymce/util/JSON",[],function(){function e(t,n){var i,r,o,a;if(n=n||'"',null===t)return"null";if("string"==(o=typeof t))return r="\bb\tt\nn\ff\rr\"\"''\\\\",n+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(i=r.indexOf(t))+1?"\\"+r.charAt(i+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e)})+n;if("object"==o){if(t.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(t)){for(i=0,r="[";i0?",":"")+e(t[i],n);return r+"]"}r="{";for(a in t)t.hasOwnProperty(a)&&(r+="function"!=typeof t[a]?(r.length>1?","+n:n)+a+n+":"+e(t[a],n):"");return r+"}"}return""+t}return{serialize:e,parse:function(e){try{return window[String.fromCharCode(101)+"val"]("("+e+")")}catch(e){}}}}),i("tinymce/util/JSONRequest",["tinymce/util/JSON","tinymce/util/XHR","tinymce/util/Tools"],function(e,t,n){function i(e){this.settings=r({},e),this.count=0}var r=n.extend;return i.sendRPC=function(e){return(new i).send(e)},i.prototype={send:function(n){var i=n.error,o=n.success;(n=r(this.settings,n)).success=function(t,r){void 0===(t=e.parse(t))&&(t={error:"JSON Parse error."}),t.error?i.call(n.error_scope||n.scope,t.error,r):o.call(n.success_scope||n.scope,t.result)},n.error=function(e,t){i&&i.call(n.error_scope||n.scope,e,t)},n.data=e.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",t.send(n)}},i}),i("tinymce/util/JSONP",["tinymce/dom/DOMUtils"],function(e){return{callbacks:{},count:0,send:function(n){var i=this,r=e.DOM,o=n.count!==t?n.count:i.count,a="tinymce_jsonp_"+o;i.callbacks[o]=function(e){r.remove(a),delete i.callbacks[o],n.callback(e)},r.add(r.doc.body,"script",{id:a,src:n.url,type:"text/javascript"}),i.count++}}}),i("tinymce/util/LocalStorage",[],function(){function e(){a=[];for(var e in o)a.push(e);i.length=a.length}function n(){var t,n="";if(l){for(var i in o)t=o[i],n+=(n?",":"")+i.length.toString(32)+","+i+","+t.length.toString(32)+","+t;r.setAttribute(s,n);try{r.save(s)}catch(e){}e()}}var i,r,o,a,s,l;try{if(window.localStorage)return localStorage}catch(e){}return s="tinymce",r=document.documentElement,(l=!!r.addBehavior)&&r.addBehavior("#default#userData"),i={key:function(e){return a[e]},getItem:function(e){return e in o?o[e]:null},setItem:function(e,t){o[e]=""+t,n()},removeItem:function(e){delete o[e],n()},clear:function(){o={},n()}},function(){function n(e){var n,i;return-1===(i=e!==t?u+e:a.indexOf(",",u))||i>a.length?null:(n=a.substring(u,i),u=i+1,n)}var i,a,c,u=0;if(o={},l){r.load(s),a=r.getAttribute(s)||"";do{var d=n();if(null===d)break;if(null!==(i=n(parseInt(d,32)||0))){if(null===(d=n()))break;c=n(parseInt(d,32)||0),i&&(o[i]=c)}}while(null!==i);e()}}(),i}),i("tinymce/Compat",["tinymce/dom/DOMUtils","tinymce/dom/EventUtils","tinymce/dom/ScriptLoader","tinymce/AddOnManager","tinymce/util/Tools","tinymce/Env"],function(e,t,n,i,r,o){var a=window.tinymce;return a.DOM=e.DOM,a.ScriptLoader=n.ScriptLoader,a.PluginManager=i.PluginManager,a.ThemeManager=i.ThemeManager,a.dom=a.dom||{},a.dom.Event=t.Event,r.each(r,function(e,t){a[t]=e}),r.each("isOpera isWebKit isIE isGecko isMac".split(" "),function(e){a[e]=o[e.substr(2).toLowerCase()]}),{}}),i("tinymce/ui/Layout",["tinymce/util/Class","tinymce/util/Tools"],function(e,t){return e.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=t.extend({},this.Defaults,e)},preRender:function(e){e.addClass(this.settings.containerClass,"body")},applyClasses:function(e){var t,n,i,r=this.settings;t=e.items().filter(":visible"),n=r.firstControlClass,i=r.lastControlClass,t.each(function(e){e.removeClass(n).removeClass(i),r.controlClass&&e.addClass(r.controlClass)}),t.eq(0).addClass(n),t.eq(-1).addClass(i)},renderHtml:function(e){var t,n=this.settings,i="";return(t=e.items()).eq(0).addClass(n.firstControlClass),t.eq(-1).addClass(n.lastControlClass),t.each(function(e){n.controlClass&&e.addClass(n.controlClass),i+=e.renderHtml()}),i},recalc:function(){},postRender:function(){}})}),i("tinymce/ui/AbsoluteLayout",["tinymce/ui/Layout"],function(e){return e.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'
'+this._super(e)}})}),i("tinymce/ui/Tooltip",["tinymce/ui/Control","tinymce/ui/Movable"],function(e,t){return e.extend({Mixins:[t],Defaults:{classes:"widget tooltip tooltip-n"},text:function(e){var t=this;return void 0!==e?(t._value=e,t._rendered&&(t.getEl().lastChild.innerHTML=t.encode(e)),t):t._value},renderHtml:function(){var e=this,t=e.classPrefix;return'"},repaint:function(){var e,t,n=this;e=n.getEl().style,t=n._layoutRect,e.left=t.x+"px",e.top=t.y+"px",e.zIndex=131070}})}),i("tinymce/ui/Widget",["tinymce/ui/Control","tinymce/ui/Tooltip"],function(e,t){var n,i=e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.canFocus=!0,e.tooltip&&!1!==i.tooltips&&(t.on("mouseenter",function(n){var i=t.tooltip().moveTo(-65535);if(n.control==t){var r=i.text(e.tooltip).show().testMoveRel(t.getEl(),["bc-tc","bc-tl","bc-tr"]);i.toggleClass("tooltip-n","bc-tc"==r),i.toggleClass("tooltip-nw","bc-tl"==r),i.toggleClass("tooltip-ne","bc-tr"==r),i.moveRel(t.getEl(),r)}else i.hide()}),t.on("mouseleave mousedown click",function(){t.tooltip().hide()})),t.aria("label",e.ariaLabel||e.tooltip)},tooltip:function(){return n||(n=new t({type:"tooltip"})).renderTo(),n},active:function(e){var t=this;return void 0!==e&&(t.aria("pressed",e),t.toggleClass("active",e)),t._super(e)},disabled:function(e){var t=this;return void 0!==e&&(t.aria("disabled",e),t.toggleClass("disabled",e)),t._super(e)},postRender:function(){var e=this,t=e.settings;e._rendered=!0,e._super(),e.parent()||!t.width&&!t.height||(e.initLayoutRect(),e.repaint()),t.autofocus&&e.focus()},remove:function(){this._super(),n&&(n.remove(),n=null)}});return i}),i("tinymce/ui/Button",["tinymce/ui/Widget"],function(e){return e.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t,n=this;n.on("click mousedown",function(e){e.preventDefault()}),n._super(e),t=e.size,e.subtype&&n.addClass(e.subtype),t&&n.addClass("btn-"+t)},icon:function(e){var t=this,n=t.classPrefix;if(void 0===e)return t.settings.icon;if(t.settings.icon=e,e=e?n+"ico "+n+"i-"+t.settings.icon:"",t._rendered){var i=t.getEl().firstChild,r=i.getElementsByTagName("i")[0];e?(r&&r==i.firstChild||(r=document.createElement("i"),i.insertBefore(r,i.firstChild)),r.className=e):r&&i.removeChild(r),t.text(t._text)}return t},repaint:function(){var e=this.getEl().firstChild.style;e.width=e.height="100%",this._super()},text:function(e){var t=this;if(t._rendered){var n=t.getEl().lastChild.lastChild;n&&(n.data=t.translate(e))}return t._super(e)},renderHtml:function(){var e,t=this,n=t._id,i=t.classPrefix,r=t.settings.icon;return(e=t.settings.image)?(r="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",r=t.settings.icon?i+"ico "+i+"i-"+r:"",'
"}})}),i("tinymce/ui/ButtonGroup",["tinymce/ui/Container"],function(e){return e.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this,t=e._layout;return e.addClass("btn-group"),e.preRender(),t.preRender(e),'
'+(e.settings.html||"")+t.renderHtml(e)+"
"}})}),i("tinymce/ui/Checkbox",["tinymce/ui/Widget"],function(e){return e.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){var t=this;return void 0!==e?(e?t.addClass("checked"):t.removeClass("checked"),t._checked=e,t.aria("checked",e),t):t._checked},value:function(e){return this.checked(e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'
'+e.encode(e._text)+"
"}})}),i("tinymce/ui/ComboBox",["tinymce/ui/Widget","tinymce/ui/Factory","tinymce/ui/DomUtils"],function(e,t,n){return e.extend({init:function(e){var t=this;t._super(e),t.addClass("combobox"),t.subinput=!0,t.ariaTarget="inp",(e=t.settings).menu=e.menu||e.values,e.menu&&(e.icon="caret"),t.on("click",function(n){for(var i=n.target,r=t.getEl();i&&i!=r;)i.id&&-1!=i.id.indexOf("-open")&&(t.fire("action"),e.menu&&(t.showMenu(),n.aria&&t.menu.items()[0].focus())),i=i.parentNode}),t.on("keydown",function(e){"INPUT"==e.target.nodeName&&13==e.keyCode&&t.parents().reverse().each(function(n){if(e.preventDefault(),t.fire("change"),n.hasEventListeners("submit")&&n.toJSON)return n.fire("submit",{data:n.toJSON()}),!1})}),e.placeholder&&(t.addClass("placeholder"),t.on("focusin",function(){t._hasOnChange||(n.on(t.getEl("inp"),"change",function(){t.fire("change")}),t._hasOnChange=!0),t.hasClass("placeholder")&&(t.getEl("inp").value="",t.removeClass("placeholder"))}),t.on("focusout",function(){0===t.value().length&&(t.getEl("inp").value=e.placeholder,t.addClass("placeholder"))}))},showMenu:function(){var e,n=this,i=n.settings;n.menu||((e=i.menu||[]).length?e={type:"menu",items:e}:e.type=e.type||"menu",n.menu=t.create(e).parent(n).renderTo(n.getContainerElm()),n.fire("createmenu"),n.menu.reflow(),n.menu.on("cancel",function(e){e.control===n.menu&&n.focus()}),n.menu.on("show hide",function(e){e.control.items().each(function(e){e.active(e.value()==n.value())})}).fire("show"),n.menu.on("select",function(e){n.value(e.control.value())}),n.on("focusin",function(e){"INPUT"==e.target.tagName.toUpperCase()&&n.menu.hide()}),n.aria("expanded",!0)),n.menu.show(),n.menu.layoutRect({w:n.layoutRect().w}),n.menu.moveRel(n.getEl(),n.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},value:function(e){var t=this;return void 0!==e?(t._value=e,t.removeClass("placeholder"),t._rendered&&(t.getEl("inp").value=e),t):t._rendered?(e=t.getEl("inp").value)!=t.settings.placeholder?e:"":t._value},disabled:function(e){var t=this;return t._rendered&&void 0!==e&&(t.getEl("inp").disabled=e),t._super(e)},focus:function(){this.getEl("inp").focus()},repaint:function(){var e,t,i=this,r=i.getEl(),o=i.getEl("open"),a=i.layoutRect();e=o?a.w-n.getSize(o).width-10:a.w-10;var s=document;return s.all&&(!s.documentMode||s.documentMode<=8)&&(t=i.layoutRect().h-2+"px"),n.css(r.firstChild,{width:e,lineHeight:t}),i._super(),i},postRender:function(){var e=this;return n.on(this.getEl("inp"),"change",function(){e.fire("change")}),e._super()},remove:function(){n.off(this.getEl("inp")),this._super()},renderHtml:function(){var e,t,n=this,i=n._id,r=n.settings,o=n.classPrefix,a=r.value||r.placeholder||"",s="",l="";return"spellcheck"in r&&(l+=' spellcheck="'+r.spellcheck+'"'),r.maxLength&&(l+=' maxlength="'+r.maxLength+'"'),r.size&&(l+=' size="'+r.size+'"'),r.subtype&&(l+=' type="'+r.subtype+'"'),n.disabled()&&(l+=' disabled="disabled"'),(e=r.icon)&&"caret"!=e&&(e=o+"ico "+o+"i-"+r.icon),t=n._text,(e||t)&&(s='
",n.addClass("has-open")),'
"+s+"
"}})}),i("tinymce/ui/ColorBox",["tinymce/ui/ComboBox"],function(e){return e.extend({init:function(e){var t=this;e.spellcheck=!1,e.onaction&&(e.icon="none"),t._super(e),t.addClass("colorbox"),t.on("change keyup postrender",function(){t.repaintColor(t.value())})},repaintColor:function(e){var t=this.getEl().getElementsByTagName("i")[0];if(t)try{t.style.background=e}catch(e){}},value:function(e){var t=this;return void 0!==e&&t._rendered&&t.repaintColor(e),t._super(e)}})}),i("tinymce/ui/PanelButton",["tinymce/ui/Button","tinymce/ui/FloatPanel"],function(e,t){return e.extend({showPanel:function(){var e=this,n=e.settings;if(e.active(!0),e.panel)e.panel.show();else{var i=n.panel;i.type&&(i={layout:"grid",items:i}),i.role=i.role||"dialog",i.popover=!0,i.autohide=!0,i.ariaRoot=!0,e.panel=new t(i).on("hide",function(){e.active(!1)}).on("cancel",function(t){t.stopPropagation(),e.focus(),e.hidePanel()}).parent(e).renderTo(e.getContainerElm()),e.panel.fire("show"),e.panel.reflow()}e.panel.moveRel(e.getEl(),n.popoverAlign||(e.isRtl()?["bc-tr","bc-tc"]:["bc-tl","bc-tc"]))},hidePanel:function(){var e=this;e.panel&&e.panel.hide()},postRender:function(){var e=this;return e.aria("haspopup",!0),e.on("click",function(t){t.control===e&&(e.panel&&e.panel.visible()?e.hidePanel():(e.showPanel(),e.panel.focus(!!t.aria)))}),e._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}})}),i("tinymce/ui/ColorButton",["tinymce/ui/PanelButton","tinymce/dom/DOMUtils"],function(e,t){var n=t.DOM;return e.extend({init:function(e){this._super(e),this.addClass("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,i=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",r=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"";return'
'},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(i){i.aria&&"down"==i.aria.key||i.control!=e||n.getParent(i.target,"."+e.classPrefix+"open")||(i.stopImmediatePropagation(),t.call(e,i))}),delete e.settings.onclick,e._super()}})}),i("tinymce/util/Color",[],function(){var e=Math.min,t=Math.max,n=Math.round;return function(i){function r(i,r,o){var a,s,l,c,u,d;return a=0,s=0,l=0,i/=255,r/=255,o/=255,u=e(i,e(r,o)),d=t(i,t(r,o)),u==d?(l=u,{h:0,s:0,v:100*l}):(c=i==u?r-o:o==u?i-r:o-i,a=i==u?3:o==u?1:5,a=60*(a-c/(d-u)),s=(d-u)/d,l=d,{h:n(a),s:n(100*s),v:n(100*l)})}function o(i,r,o){var a,s,d,f;if(i=(parseInt(i,10)||0)%360,r=parseInt(r,10)/100,o=parseInt(o,10)/100,r=t(0,e(r,1)),o=t(0,e(o,1)),0!==r){switch(a=i/60,s=o*r,d=s*(1-Math.abs(a%2-1)),f=o-s,Math.floor(a)){case 0:l=s,c=d,u=0;break;case 1:l=d,c=s,u=0;break;case 2:l=0,c=s,u=d;break;case 3:l=0,c=d,u=s;break;case 4:l=d,c=0,u=s;break;case 5:l=s,c=0,u=d;break;default:l=c=u=0}l=n(255*(l+f)),c=n(255*(c+f)),u=n(255*(u+f))}else l=c=u=n(255*o)}function a(e){var t;return"object"==typeof e?"r"in e?(l=e.r,c=e.g,u=e.b):"v"in e&&o(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(l=parseInt(t[1],10),c=parseInt(t[2],10),u=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(l=parseInt(t[1],16),c=parseInt(t[2],16),u=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(l=parseInt(t[1]+t[1],16),c=parseInt(t[2]+t[2],16),u=parseInt(t[3]+t[3],16)),l=l<0?0:l>255?255:l,c=c<0?0:c>255?255:c,u=u<0?0:u>255?255:u,s}var s=this,l=0,c=0,u=0;i&&a(i),s.toRgb=function(){return{r:l,g:c,b:u}},s.toHsv=function(){return r(l,c,u)},s.toHex=function(){function e(e){return(e=parseInt(e,10).toString(16)).length>1?e:"0"+e}return"#"+e(l)+e(c)+e(u)},s.parse=a}}),i("tinymce/ui/ColorPicker",["tinymce/ui/Widget","tinymce/ui/DragHelper","tinymce/ui/DomUtils","tinymce/util/Color"],function(e,t,n,i){return e.extend({Defaults:{classes:"widget colorpicker"},init:function(e){this._super(e)},postRender:function(){function e(e,t){var i,r,o=n.getPos(e);return i=t.pageX-o.x,r=t.pageY-o.y,i=Math.max(0,Math.min(i/e.clientWidth,1)),r=Math.max(0,Math.min(r/e.clientHeight,1)),{x:i,y:r}}function r(e,t){var r=(360-e.h)/360;n.css(c,{top:100*r+"%"}),t||n.css(d,{left:e.s+"%",top:100-e.v+"%"}),u.style.background=new i({s:100,v:100,h:e.h}).toHex(),f.color().parse({s:e.s,v:e.v,h:e.h})}function o(t){var n;n=e(u,t),s.s=100*n.x,s.v=100*(1-n.y),r(s),f.fire("change")}function a(t){var n;n=e(l,t),(s=m.toHsv()).h=360*(1-n.y),r(s,!0),f.fire("change")}var s,l,c,u,d,f=this,m=f.color();l=f.getEl("h"),c=f.getEl("hp"),u=f.getEl("sv"),d=f.getEl("svp"),f._repaint=function(){r(s=m.toHsv())},f._super(),f._svdraghelper=new t(f._id+"-sv",{start:o,drag:o}),f._hdraghelper=new t(f._id+"-h",{start:a,drag:a}),f._repaint()},rgb:function(){return this.color().toRgb()},value:function(e){var t=this;if(!arguments.length)return t.color().toHex();t.color().parse(e),t._rendered&&t._repaint()},color:function(){return this._color||(this._color=new i),this._color},renderHtml:function(){var e,t=this,n=t._id,i=t.classPrefix,r="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000";return e='
'+function(){var e,t,n,o,a="";for(n="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",e=0,t=(o=r.split(",")).length-1;e
';return a}()+'
','
'+e+"
"}})}),i("tinymce/ui/Path",["tinymce/ui/Widget"],function(e){return e.extend({init:function(e){var t=this;e.delimiter||(e.delimiter="»"),t._super(e),t.addClass("path"),t.canFocus=!0,t.on("click",function(e){var n;(n=e.target.getAttribute("data-index"))&&t.fire("select",{value:t.data()[n],index:n})})},focus:function(){var e=this;return e.getEl().firstChild.focus(),e},data:function(e){var t=this;return void 0!==e?(t._data=e,t.update(),t):t._data},update:function(){this.innerHtml(this._getPathHtml())},postRender:function(){var e=this;e._super(),e.data(e.settings.data)},renderHtml:function(){var e=this;return'
'+e._getPathHtml()+"
"},_getPathHtml:function(){var e,t,n=this,i=n._data||[],r="",o=n.classPrefix;for(e=0,t=i.length;e0?'":"")+'
'+i[e].name+"
";return r||(r='
 
'),r}})}),i("tinymce/ui/ElementPath",["tinymce/ui/Path","tinymce/EditorManager"],function(e,t){return e.extend({postRender:function(){function e(e){if(1===e.nodeType){if("BR"==e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}var n=this,i=t.activeEditor;return!1!==i.settings.elementpath&&(n.on("select",function(e){i.focus(),i.selection.select(this.data()[e.index].element),i.nodeChanged()}),i.on("nodeChange",function(t){for(var r=[],o=t.parents,a=o.length;a--;)if(1==o[a].nodeType&&!e(o[a])){var s=i.fire("ResolveName",{name:o[a].nodeName.toLowerCase(),target:o[a]});if(s.isDefaultPrevented()||r.push({name:s.name,element:o[a]}),s.isPropagationStopped())break}n.data(r)})),n._super()}})}),i("tinymce/ui/FormItem",["tinymce/ui/Container"],function(e){return e.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.addClass("formitem"),t.preRender(e),'
'+(e.settings.title?'
'+e.settings.title+"
":"")+'
'+(e.settings.html||"")+t.renderHtml(e)+"
"}})}),i("tinymce/ui/Form",["tinymce/ui/Container","tinymce/ui/FormItem","tinymce/util/Tools"],function(e,t,n){return e.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:20,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var e=this,i=e.items();e.settings.formItemDefaults||(e.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),i.each(function(i){var r,o=i.settings.label;o&&((r=new t(n.extend({items:{type:"label",id:i._id+"-l",text:o,flex:0,forId:i._id,disabled:i.disabled()}},e.settings.formItemDefaults))).type="formitem",i.aria("labelledby",i._id+"-l"),void 0===i.settings.flex&&(i.settings.flex=1),e.replace(i,r),r.add(i))})},recalcLabels:function(){var e,t,n=this,i=0,r=[];if(!1!==n.settings.labelGapCalc)for(("children"==n.settings.labelGapCalc?n.find("formitem"):n.items()).filter("formitem").each(function(e){var t=e.items()[0],n=t.getEl().clientWidth;i=n>i?n:i,r.push(t)}),t=n.settings.labelGap||0,e=r.length;e--;)r[e].settings.minWidth=i+t},visible:function(e){var t=this._super(e);return!0===e&&this._rendered&&this.recalcLabels(),t},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){var e=this;e._super(),e.recalcLabels(),e.fromJSON(e.settings.data)}})}),i("tinymce/ui/FieldSet",["tinymce/ui/Form"],function(e){return e.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'
'+(e.settings.title?''+e.settings.title+"":"")+'
'+(e.settings.html||"")+t.renderHtml(e)+"
"}})}),i("tinymce/ui/FilePicker",["tinymce/ui/ComboBox","tinymce/util/Tools"],function(e,t){return e.extend({init:function(e){var n,i,r,o=this,a=tinymce.activeEditor,s=a.settings;e.spellcheck=!1,(r=s.file_picker_types||s.file_browser_callback_types)&&(r=t.makeMap(r,/[, ]/)),r&&!r[e.filetype]||(!(i=s.file_picker_callback)||r&&!r[e.filetype]?!(i=s.file_browser_callback)||r&&!r[e.filetype]||(n=function(){i(o.getEl("inp").id,o.value(),e.filetype,window)}):n=function(){var n=o.fire("beforecall").meta;n=t.extend({filetype:e.filetype},n),i.call(a,function(e,t){o.value(e).fire("change",{meta:t})},o.value(),n)}),n&&(e.icon="browse",e.onaction=n),o._super(e)}})}),i("tinymce/ui/FitLayout",["tinymce/ui/AbsoluteLayout"],function(e){return e.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox();e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}})}),i("tinymce/ui/FlexLayout",["tinymce/ui/AbsoluteLayout"],function(e){return e.extend({recalc:function(e){var t,n,i,r,o,a,s,l,c,u,d,f,m,p,h,g,v,y,b,C,x,w,_,E,N,S,k,T,R,A,B,D,M,L,P,H,O,I=[],F=Math.max,z=Math.min;for(i=e.items().filter(":visible"),r=e.layoutRect(),o=e._paddingBox,a=e.settings,f=e.isRtl()?a.direction||"row-reversed":a.direction,s=a.align,l=e.isRtl()?a.pack||"end":a.pack,c=a.spacing||0,"row-reversed"!=f&&"column-reverse"!=f||(i=i.set(i.toArray().reverse()),f=f.split("-")[0]),"column"==f?(E="y",w="h",_="minH",N="maxH",k="innerH",S="top",T="deltaH",R="contentH",L="left",D="w",A="x",B="innerW",M="minW",P="right",H="deltaW",O="contentW"):(E="x",w="w",_="minW",N="maxW",k="innerW",S="left",T="deltaW",R="contentW",L="top",D="h",A="y",B="innerH",M="minH",P="bottom",H="deltaH",O="contentH"),d=r[k]-o[S]-o[S],x=u=0,t=0,n=i.length;t0&&(u+=h,p[N]&&I.push(m),p.flex=h),d-=p[_],(g=o[L]+p[M]+o[P])>x&&(x=g);if(b={},b[_]=d<0?r[_]-d+r[T]:r[k]-d+r[T],b[M]=x+r[H],b[R]=r[k]-d,b[O]=x,b.minW=z(b.minW,r.maxW),b.minH=z(b.minH,r.maxH),b.minW=F(b.minW,r.startMinWidth),b.minH=F(b.minH,r.startMinHeight),!r.autoResize||b.minW==r.minW&&b.minH==r.minH){for(y=d/u,t=0,n=I.length;tv?(d-=p[N]-p[_],u-=p.flex,p.flex=0,p.maxFlexSize=v):p.maxFlexSize=0;for(y=d/u,C=o[S],b={},0===u&&("end"==l?C=d+o[S]:"center"==l?(C=Math.round(r[k]/2-(r[k]-d)/2)+o[S])<0&&(C=o[S]):"justify"==l&&(C=o[S],c=Math.floor(d/(i.length-1)))),b[A]=o[L],t=0,n=i.length;t0&&(g+=p.flex*y),b[w]=g,b[E]=C,m.layoutRect(b),m.recalc&&m.recalc(),C+=g+c}else if(b.w=b.minW,b.h=b.minH,e.layoutRect(b),this.recalc(e),null===e._lastRect){var W=e.parent();W&&(W._lastRect=null,W.recalc())}}})}),i("tinymce/ui/FlowLayout",["tinymce/ui/Layout"],function(e){return e.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})}})}),i("tinymce/ui/FormatControls",["tinymce/ui/Control","tinymce/ui/Widget","tinymce/ui/FloatPanel","tinymce/util/Tools","tinymce/EditorManager","tinymce/Env"],function(e,t,n,i,r,o){function a(e){function t(t,n){return function(){var i=this;e.on("nodeChange",function(r){var o=e.formatter,a=null;s(r.parents,function(e){if(s(t,function(t){if(n?o.matchNode(e,n,{value:t.value})&&(a=t.value):o.matchNode(e,t.value)&&(a=t.value),a)return!1}),a)return!1}),i.value(a)})}}function i(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}function r(t){return function(){function n(){return!!e.undoManager&&e.undoManager[t]()}var i=this;t="redo"==t?"hasRedo":"hasUndo",i.disabled(!n()),e.on("Undo Redo AddUndo TypingUndo ClearUndos",function(){i.disabled(!n())})}}function o(t){t.control&&(t=t.control.value()),t&&e.execCommand("mceToggleFormat",!1,t)}var a;a=function(){function t(e){var r=[];if(e)return s(e,function(e){var o={text:e.title,icon:e.icon};if(e.items)o.menu=t(e.items);else{var a=e.format||"custom"+n++;e.format||(e.name=a,i.push(e)),o.format=a,o.cmd=e.cmd}r.push(o)}),r}var n=0,i=[],r=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}];return e.on("init",function(){s(i,function(t){e.formatter.register(t.name,t)})}),{type:"menu",items:t(e.settings.style_formats_merge?e.settings.style_formats?r.concat(e.settings.style_formats):r:e.settings.style_formats||r),onPostRender:function(t){e.fire("renderFormatsMenu",{control:t.control})},itemDefaults:{preview:!0,textStyle:function(){if(this.settings.format)return e.formatter.getCssText(this.settings.format)},onPostRender:function(){var t=this;t.parent().on("show",function(){var n,i;(n=t.settings.format)&&(t.disabled(!e.formatter.canApply(n)),t.active(e.formatter.match(n))),(i=t.settings.cmd)&&t.active(e.queryCommandState(i))})},onclick:function(){this.settings.format&&o(this.settings.format),this.settings.cmd&&e.execCommand(this.settings.cmd)}}}}(),s({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(t,n){e.addButton(n,{tooltip:t,onPostRender:function(){var t=this;e.formatter?e.formatter.formatChanged(n,function(e){t.active(e)}):e.on("init",function(){e.formatter.formatChanged(n,function(e){t.active(e)})})},onclick:function(){o(n)}})}),s({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],removeformat:["Clear formatting","RemoveFormat"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1]})}),s({blockquote:["Blockquote","mceBlockQuote"],numlist:["Numbered list","InsertOrderedList"],bullist:["Bullet list","InsertUnorderedList"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1],onPostRender:function(){var t=this;e.formatter?e.formatter.formatChanged(n,function(e){t.active(e)}):e.on("init",function(){e.formatter.formatChanged(n,function(e){t.active(e)})})}})}),e.addButton("undo",{tooltip:"Undo",onPostRender:r("undo"),cmd:"undo"}),e.addButton("redo",{tooltip:"Redo",onPostRender:r("redo"),cmd:"redo"}),e.addMenuItem("newdocument",{text:"New document",icon:"newdocument",cmd:"mceNewDocument"}),e.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onPostRender:r("undo"),cmd:"undo"}),e.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onPostRender:r("redo"),cmd:"redo"}),e.addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:function(){var t=this;e.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(e.hasVisual)},cmd:"mceToggleVisualAid"}),s({cut:["Cut","Cut","Meta+X"],copy:["Copy","Copy","Meta+C"],paste:["Paste","Paste","Meta+V"],selectall:["Select all","SelectAll","Meta+A"],bold:["Bold","Bold","Meta+B"],italic:["Italic","Italic","Meta+I"],underline:["Underline","Underline"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"]},function(t,n){e.addMenuItem(n,{text:t[0],icon:n,shortcut:t[2],cmd:t[1]})}),e.on("mousedown",function(){n.hideAll()}),e.addButton("styleselect",{type:"menubutton",text:"Formats",menu:a}),e.addButton("formatselect",function(){var n=[],r=i(e.settings.block_formats||"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre");return s(r,function(t){n.push({text:t[0],value:t[1],textStyle:function(){return e.formatter.getCssText(t[1])}})}),{type:"listbox",text:r[0][0],values:n,fixedWidth:!0,onselect:o,onPostRender:t(n)}}),e.addButton("fontselect",function(){var n=[],r=i(e.settings.font_formats||"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats");return s(r,function(e){n.push({text:{raw:e[0]},value:e[1],textStyle:-1==e[1].indexOf("dings")?"font-family:"+e[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:n,fixedWidth:!0,onPostRender:t(n,"fontname"),onselect:function(t){t.control.settings.value&&e.execCommand("FontName",!1,t.control.settings.value)}}}),e.addButton("fontsizeselect",function(){var n=[],i=e.settings.fontsize_formats||"8pt 10pt 12pt 14pt 18pt 24pt 36pt";return s(i.split(" "),function(e){var t=e,i=e,r=e.split("=");r.length>1&&(t=r[0],i=r[1]),n.push({text:t,value:i})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:n,fixedWidth:!0,onPostRender:t(n,"fontsize"),onclick:function(t){t.control.settings.value&&e.execCommand("FontSize",!1,t.control.settings.value)}}}),e.addMenuItem("formats",{text:"Formats",menu:a})}var s=i.each;r.on("AddEditor",function(t){t.editor.rtl&&(e.rtl=!0),a(t.editor)}),e.translate=function(e){return r.translate(e)},t.tooltips=!o.iOS}),i("tinymce/ui/GridLayout",["tinymce/ui/AbsoluteLayout"],function(e){return e.extend({recalc:function(e){var t,n,i,r,o,a,s,l,c,u,d,f,m,p,h,g,v,y,b,C,x,w,_,E,N,S,k,T,R=e.settings,A=[],B=[];R=e.settings,i=e.items().filter(":visible"),r=e.layoutRect(),n=R.columns||Math.ceil(Math.sqrt(i.length)),t=Math.ceil(i.length/n),v=R.spacingH||R.spacing||0,y=R.spacingV||R.spacing||0,b=R.alignH||R.align,C=R.alignV||R.align,h=e._paddingBox,k="reverseRows"in R?R.reverseRows:e.isRtl(),b&&"string"==typeof b&&(b=[b]),C&&"string"==typeof C&&(C=[C]);for(u=0;uA[u]?_:A[u],B[d]=E>B[d]?E:B[d];for(N=r.innerW-h.left-h.right,x=0,u=0;u0?v:0),N-=(u>0?v:0)+A[u];for(S=r.innerH-h.top-h.bottom,w=0,d=0;d0?y:0),S-=(d>0?y:0)+B[d];if(x+=h.left+h.right,w+=h.top+h.bottom,s={},s.minW=x+(r.w-r.innerW),s.minH=w+(r.h-r.innerH),s.contentW=s.minW-r.deltaW,s.contentH=s.minH-r.deltaH,s.minW=Math.min(s.minW,r.maxW),s.minH=Math.min(s.minH,r.maxH),s.minW=Math.max(s.minW,r.startMinWidth),s.minH=Math.max(s.minH,r.startMinHeight),!r.autoResize||s.minW==r.minW&&s.minH==r.minH){r.autoResize&&((s=e.layoutRect(s)).contentW=s.minW-r.deltaW,s.contentH=s.minH-r.deltaH);var D;D="start"==R.packV?0:S>0?Math.floor(S/t):0;var M=0,L=R.flexWidths;if(L)for(u=0;u'},src:function(e){this.getEl().src=e},html:function(e,t){var n=this,i=this.getEl().contentWindow.document.body;return i?(i.innerHTML=e,t&&t()):setTimeout(function(){n.html(e)},0),this}})}),i("tinymce/ui/Label",["tinymce/ui/Widget","tinymce/ui/DomUtils"],function(e,t){return e.extend({init:function(e){var t=this;t._super(e),t.addClass("widget"),t.addClass("label"),t.canFocus=!1,e.multiline&&t.addClass("autoscroll"),e.strong&&t.addClass("strong")},initLayoutRect:function(){var e=this,n=e._super();return e.settings.multiline&&(t.getSize(e.getEl()).width>n.maxW&&(n.minW=n.maxW,e.addClass("multiline")),e.getEl().style.width=n.minW+"px",n.startMinH=n.h=n.minH=Math.min(n.maxH,t.getSize(e.getEl()).height)),n},repaint:function(){var e=this;return e.settings.multiline||(e.getEl().style.lineHeight=e.layoutRect().h+"px"),e._super()},text:function(e){var t=this;return t._rendered&&e&&this.innerHtml(t.encode(e)),t._super(e)},renderHtml:function(){var e=this,t=e.settings.forId;return'"}})}),i("tinymce/ui/Toolbar",["tinymce/ui/Container"],function(e){return e.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){var t=this;t._super(e),t.addClass("toolbar")},postRender:function(){var e=this;return e.items().addClass("toolbar-item"),e._super()}})}),i("tinymce/ui/MenuBar",["tinymce/ui/Toolbar"],function(e){return e.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),i("tinymce/ui/MenuButton",["tinymce/ui/Button","tinymce/ui/Factory","tinymce/ui/MenuBar"],function(e,t,n){function i(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}var r=e.extend({init:function(e){var t=this;t._renderOpen=!0,t._super(e),t.addClass("menubtn"),e.fixedWidth&&t.addClass("fixed-width"),t.aria("haspopup",!0),t.hasPopup=!0},showMenu:function(){var e,n=this,i=n.settings;if(n.menu&&n.menu.visible())return n.hideMenu();n.menu||((e=i.menu||[]).length?e={type:"menu",items:e}:e.type=e.type||"menu",n.menu=t.create(e).parent(n).renderTo(),n.fire("createmenu"),n.menu.reflow(),n.menu.on("cancel",function(e){e.control.parent()===n.menu&&(e.stopPropagation(),n.focus(),n.hideMenu())}),n.menu.on("select",function(){n.focus()}),n.menu.on("show hide",function(e){e.control==n.menu&&n.activeMenu("show"==e.type),n.aria("expanded","show"==e.type)}).fire("show")),n.menu.show(),n.menu.layoutRect({w:n.layoutRect().w}),n.menu.moveRel(n.getEl(),n.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},hideMenu:function(){var e=this;e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide())},activeMenu:function(e){this.toggleClass("active",e)},renderHtml:function(){var e,t=this,i=t._id,r=t.classPrefix,o=t.settings.icon;return(e=t.settings.image)?(o="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",o=t.settings.icon?r+"ico "+r+"i-"+o:"",t.aria("role",t.parent()instanceof n?"menuitem":"button"),'
'},postRender:function(){var e=this;return e.on("click",function(t){t.control===e&&i(t.target,e.getEl())&&(e.showMenu(),t.aria&&e.menu.items()[0].focus())}),e.on("mouseenter",function(t){var n,i=t.control,o=e.parent();i&&o&&i instanceof r&&i.parent()==o&&(o.items().filter("MenuButton").each(function(e){e.hideMenu&&e!=i&&(e.menu&&e.menu.visible()&&(n=!0),e.hideMenu())}),n&&(i.focus(),i.showMenu()))}),e._super()},text:function(e){var t,n,i=this;if(i._rendered)for(n=i.getEl("open").getElementsByTagName("span"),t=0;t0&&(r=n[0].text,a._value=n[0].value),e.menu=n),e.text=e.text||r||n[0].text,a._super(e),a.addClass("listbox"),a.on("select",function(t){var n=t.control;o&&(t.lastControl=o),e.multiple?n.active(!n.active()):a.value(t.control.settings.value),o=n})},value:function(e){function t(e,n){e.items().each(function(e){(i=e.value()===n)&&(r=r||e.text()),e.active(i),e.menu&&t(e.menu,n)})}function n(t){for(var o=0;o'+("-"!==o?' ":"")+("-"!==o?''+o+"":"")+(l?'
'+l+"
":"")+(i.menu?'
':"")+""},postRender:function(){var e=this,t=e.settings,n=t.textStyle;if("function"==typeof n&&(n=n.call(this)),n){var i=e.getEl("text");i&&i.setAttribute("style",n)}return e.on("mouseenter click",function(n){n.control===e&&(t.menu||"click"!==n.type?(e.showMenu(),n.aria&&e.menu.focus(!0)):(e.fire("select"),e.parent().hideAll()))}),e._super(),e},active:function(e){return void 0!==e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),i("tinymce/ui/Menu",["tinymce/ui/FloatPanel","tinymce/ui/MenuItem","tinymce/util/Tools"],function(e,t,n){return e.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){var t=this;if(e.autohide=!0,e.constrainToViewport=!0,e.itemDefaults)for(var i=e.items,r=i.length;r--;)i[r]=n.extend({},e.itemDefaults,i[r]);t._super(e),t.addClass("menu")},repaint:function(){return this.toggleClass("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){var e=this;e.hideAll(),e.fire("select")},hideAll:function(){var e=this;return this.find("menuitem").exec("hideMenu"),e._super()},preRender:function(){var e=this;return e.items().each(function(t){var n=t.settings;if(n.icon||n.selectable)return e._hasIcons=!0,!1}),e._super()}})}),i("tinymce/ui/Radio",["tinymce/ui/Checkbox"],function(e){return e.extend({Defaults:{classes:"radio",role:"radio"}})}),i("tinymce/ui/ResizeHandle",["tinymce/ui/Widget","tinymce/ui/DragHelper"],function(e,t){return e.extend({renderHtml:function(){var e=this,t=e.classPrefix;return e.addClass("resizehandle"),"both"==e.settings.direction&&e.addClass("resizehandle-both"),e.canFocus=!1,'
'},postRender:function(){var e=this;e._super(),e.resizeDragHelper=new t(this._id,{start:function(){e.fire("ResizeStart")},drag:function(t){"both"!=e.settings.direction&&(t.deltaX=0),e.fire("Resize",t)},stop:function(){e.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}})}),i("tinymce/ui/Spacer",["tinymce/ui/Widget"],function(e){return e.extend({renderHtml:function(){var e=this;return e.addClass("spacer"),e.canFocus=!1,'
'}})}),i("tinymce/ui/SplitButton",["tinymce/ui/MenuButton","tinymce/ui/DomUtils"],function(e,t){return e.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e,n,i=this,r=i.getEl(),o=i.layoutRect();return i._super(),e=r.firstChild,n=r.lastChild,t.css(e,{width:o.w-t.getSize(n).width,height:o.h-2}),t.css(n,{height:o.h-2}),i},activeMenu:function(e){var n=this;t.toggleClass(n.getEl().lastChild,n.classPrefix+"active",e)},renderHtml:function(){var e,t=this,n=t._id,i=t.classPrefix,r=t.settings.icon;return(e=t.settings.image)?(r="none","string"!=typeof e&&(e=window.getSelection?e[0]:e[1]),e=" style=\"background-image: url('"+e+"')\""):e="",r=t.settings.icon?i+"ico "+i+"i-"+r:"",'
'},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(e){var n=e.target;if(e.control==this)for(;n;){if(e.aria&&"down"!=e.aria.key||"BUTTON"==n.nodeName&&-1==n.className.indexOf("open"))return e.stopImmediatePropagation(),void t.call(this,e);n=n.parentNode}}),delete e.settings.onclick,e._super()}})}),i("tinymce/ui/StackLayout",["tinymce/ui/FlowLayout"],function(e){return e.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"}})}),i("tinymce/ui/TabPanel",["tinymce/ui/Panel","tinymce/ui/DomUtils"],function(e,t){return e.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(e){var n;this.activeTabId&&(n=this.getEl(this.activeTabId),t.removeClass(n,this.classPrefix+"active"),n.setAttribute("aria-selected","false")),this.activeTabId="t"+e,(n=this.getEl("t"+e)).setAttribute("aria-selected","true"),t.addClass(n,this.classPrefix+"active"),this.items()[e].show().fire("showtab"),this.reflow(),this.items().each(function(t,n){e!=n&&t.hide()})},renderHtml:function(){var e=this,t=e._layout,n="",i=e.classPrefix;return e.preRender(),t.preRender(e),e.items().each(function(t,r){var o=e._id+"-t"+r;t.aria("role","tabpanel"),t.aria("labelledby",o),n+='"}),'
'+n+'
'+t.renderHtml(e)+"
"},postRender:function(){var e=this;e._super(),e.settings.activeTab=e.settings.activeTab||0,e.activateTab(e.settings.activeTab),this.on("click",function(t){var n=t.target.parentNode;if(t.target.parentNode.id==e._id+"-head")for(var i=n.childNodes.length;i--;)n.childNodes[i]==t.target&&e.activateTab(i)})},initLayoutRect:function(){var e,n,i,r=this;n=t.getSize(r.getEl("head")).width,n=n<0?0:n,i=0,r.items().each(function(e){n=Math.max(n,e.layoutRect().minW),i=Math.max(i,e.layoutRect().minH)}),r.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=n,e.settings.h=i,e.layoutRect({x:0,y:0,w:n,h:i})});var o=t.getSize(r.getEl("head")).height;return r.settings.minWidth=n,r.settings.minHeight=i+o,e=r._super(),e.deltaH+=o,e.innerH=e.h-e.deltaH,e}})}),i("tinymce/ui/TextBox",["tinymce/ui/Widget","tinymce/ui/DomUtils"],function(e,t){return e.extend({init:function(e){var t=this;t._super(e),t._value=e.value||"",t.addClass("textbox"),e.multiline?t.addClass("multiline"):t.on("keydown",function(e){13==e.keyCode&&t.parents().reverse().each(function(t){if(e.preventDefault(),t.hasEventListeners("submit")&&t.toJSON)return t.fire("submit",{data:t.toJSON()}),!1})})},disabled:function(e){var t=this;return t._rendered&&void 0!==e&&(t.getEl().disabled=e),t._super(e)},value:function(e){var t=this;return void 0!==e?(t._value=e,t._rendered&&(t.getEl().value=e),t):t._rendered?t.getEl().value:t._value},repaint:function(){var e,t,n,i,r=this,o=0,a=0;e=r.getEl().style,t=r._layoutRect,i=r._lastRepaintRect||{};var s=document;return!r.settings.multiline&&s.all&&(!s.documentMode||s.documentMode<=8)&&(e.lineHeight=t.h-a+"px"),n=r._borderBox,o=n.left+n.right+8,a=n.top+n.bottom+(r.settings.multiline?8:0),t.x!==i.x&&(e.left=t.x+"px",i.x=t.x),t.y!==i.y&&(e.top=t.y+"px",i.y=t.y),t.w!==i.w&&(e.width=t.w-o+"px",i.w=t.w),t.h!==i.h&&(e.height=t.h-a+"px",i.h=t.h),r._lastRepaintRect=i,r.fire("repaint",{},!1),r},renderHtml:function(){var e=this,t=e._id,n=e.settings,i=e.encode(e._value,!1),r="";return"spellcheck"in n&&(r+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(r+=' maxlength="'+n.maxLength+'"'),n.size&&(r+=' size="'+n.size+'"'),n.subtype&&(r+=' type="'+n.subtype+'"'),e.disabled()&&(r+=' disabled="disabled"'),n.multiline?'":'"},postRender:function(){var e=this;return t.on(e.getEl(),"change",function(t){e.fire("change",t)}),e._super()},remove:function(){t.off(this.getEl()),this._super()}})}),i("tinymce/ui/Throbber",["tinymce/ui/DomUtils","tinymce/ui/Control"],function(e,t){return function(n,i){var r,o=this,a=t.classPrefix;o.show=function(t){return o.hide(),r=!0,window.setTimeout(function(){r&&n.appendChild(e.createFragment('
'))},t||0),o},o.hide=function(){var e=n.lastChild;return e&&-1!=e.className.indexOf("throbber")&&e.parentNode.removeChild(e),r=!1,o}}}),function(n){for(var i=0;i