var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(a,b,c,d){if(b){c=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var g=a[d];g in c||(c[g]={});c=c[g]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&$jscomp.defineProperty(c,a,{configurable:!0,writable:!0,value:b})}};$jscomp.polyfill("Reflect.apply",function(a){if(a)return a;var b=Function.prototype.apply;return function(a,d,g){return b.call(a,d,g)}},"es6","es3");
$jscomp.polyfill("Reflect.construct",function(a){return a?a:function(a,c,d){void 0===d&&(d=a);d=Object.create(d.prototype||Object.prototype);return Reflect.apply(a,d,c)||d}},"es6","es5");$jscomp.polyfill("Object.setPrototypeOf",function(a){return a?a:"object"!=typeof"".__proto__?null:function(a,c){a.__proto__=c;if(a.__proto__!==c)throw new TypeError(a+" is not extensible");return a}},"es6","es5");$jscomp.SYMBOL_PREFIX="jscomp_symbol_";
$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(a){return $jscomp.SYMBOL_PREFIX+(a||"")+$jscomp.symbolCounter_++};
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var a=$jscomp.global.Symbol.iterator;a||(a=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&$jscomp.defineProperty(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(a){var b=0;return $jscomp.iteratorPrototype(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})};
$jscomp.iteratorPrototype=function(a){$jscomp.initSymbolIterator();a={next:a};a[$jscomp.global.Symbol.iterator]=function(){return this};return a};$jscomp.iteratorFromArray=function(a,b){$jscomp.initSymbolIterator();a instanceof String&&(a+="");var c=0,d={next:function(){if(c<a.length){var g=c++;return{value:b(g,a[g]),done:!1}}d.next=function(){return{done:!0,value:void 0}};return d.next()}};d[Symbol.iterator]=function(){return d};return d};
$jscomp.polyfill("Array.prototype.keys",function(a){return a?a:function(){return $jscomp.iteratorFromArray(this,function(a){return a})}},"es6-impl","es3");$jscomp.findInternal=function(a,b,c){a instanceof String&&(a=String(a));for(var d=a.length,g=0;g<d;g++){var l=a[g];if(b.call(c,l,g,a))return{i:g,v:l}}return{i:-1,v:void 0}};$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,c){return $jscomp.findInternal(this,a,c).v}},"es6-impl","es3");
(function(a){"object"===typeof exports&&"undefined"!==typeof module?module.exports=a():"function"===typeof define&&define.amd?define([],a):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).Tokenizr=a()})(function(){return function(){function a(b,c,d){function g(k,p){if(!c[k]){if(!b[k]){var m="function"==typeof require&&require;if(!p&&m)return m(k,!0);if(l)return l(k,!0);m=Error("Cannot find module '"+k+"'");throw m.code="MODULE_NOT_FOUND",
m;}m=c[k]={exports:{}};b[k][0].call(m.exports,function(a){return g(b[k][1][a]||a)},m,m.exports,a,b,c,d)}return c[k].exports}for(var l="function"==typeof require&&require,q=0;q<d.length;q++)g(d[q]);return g}return a}()({1:[function(a,b,c){function d(a){d="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"===typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a};return d(a)}function g(a,e){if("function"!==
typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(e&&e.prototype,{constructor:{value:a,writable:!0,configurable:!0}});e&&p(a,e)}function l(a){var e="function"===typeof Map?new Map:void 0;l=function(a){function f(){return k(a,arguments,m(this).constructor)}if(null===a||-1===Function.toString.call(a).indexOf("[native code]"))return a;if("function"!==typeof a)throw new TypeError("Super expression must either be null or a function");
if("undefined"!==typeof e){if(e.has(a))return e.get(a);e.set(a,f)}f.prototype=Object.create(a.prototype,{constructor:{value:f,enumerable:!1,writable:!0,configurable:!0}});return p(f,a)};return l(a)}function q(){if("undefined"===typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(z){return!1}}function k(a,e,f){k=q()?Reflect.construct:function(a,e,f){var b=
[null];b.push.apply(b,e);a=new (Function.bind.apply(a,b));f&&p(a,f.prototype);return a};return k.apply(null,arguments)}function p(a,e){p=Object.setPrototypeOf||function(a,e){a.__proto__=e;return a};return p(a,e)}function m(a){m=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)};return m(a)}function r(a,e){if(!(a instanceof e))throw new TypeError("Cannot call a class as a function");}function w(a,e){for(var f=0;f<e.length;f++){var b=e[f];b.enumerable=
b.enumerable||!1;b.configurable=!0;"value"in b&&(b.writable=!0);Object.defineProperty(a,b.key,b)}}function t(a,e,b){e&&w(a.prototype,e);b&&w(a,b);return a}var x=function(a,e){var b=a.length,c=e-20;0>c&&(c=0);var d=e+20;d>b&&(d=b);var h=function(a){return a.charCodeAt(0).toString(16).toUpperCase()},n=function(a,e,b){return a.substr(e,b).replace(/\\/g,"\\\\").replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,
function(a){return"\\x0"+h(a)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(a){return"\\x"+h(a)}).replace(/[\u0100-\u0FFF]/g,function(a){return"\\u0"+h(a)}).replace(/[\u1000-\uFFFF]/g,function(a){return"\\u"+h(a)})};return{prologTrunc:0<c,prologText:n(a,c,e-c),tokenText:n(a,e,1),epilogText:n(a,e+1,d-(e+1)),epilogTrunc:d<b}},u=function(){function a(e,b,c){var f=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,d=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,n=5<arguments.length&&void 0!==
arguments[5]?arguments[5]:0;r(this,a);this.type=e;this.value=b;this.text=c;this.pos=f;this.line=d;this.column=n}t(a,[{key:"toString",value:function(){return"<type: ".concat(this.type,", ")+"value: ".concat(JSON.stringify(this.value),", ")+"text: ".concat(JSON.stringify(this.text),", ")+"pos: ".concat(this.pos,", ")+"line: ".concat(this.line,", ")+"column: ".concat(this.column,">")}},{key:"isA",value:function(a,b){return a!==this.type||2===arguments.length&&b!==this.value?!1:!0}}]);return a}(),v=function(a){function e(a,
b,c,h,n){var f;r(this,e);f=m(e).call(this,a);if(!f||"object"!==d(f)&&"function"!==typeof f){if(void 0===this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");f=this}f.name="ParsingError";f.message=a;f.pos=b;f.line=c;f.column=h;f.input=n;return f}g(e,a);t(e,[{key:"toString",value:function(){for(var a=x(this.input,this.pos),e="line ".concat(this.line," (column ").concat(this.column,"): "),b="",c=0;c<e.length+a.prologText.length;c++)b+=" ";return"Parsing Error: "+
this.message+"\n"+e+a.prologText+a.tokenText+a.epilogText+"\n"+b+"^"}}]);return e}(l(Error)),y=function(){function a(e){r(this,a);this._tokenizr=e;this._data={};this._ignore=this._reject=this._repeat=!1;this._match=null}t(a,[{key:"data",value:function(a,b){var e=this._data[a];2===arguments.length&&(this._data[a]=b);return e}},{key:"info",value:function(){return{line:this._tokenizr._line,column:this._tokenizr._column,pos:this._tokenizr._pos,len:this._match[0].length}}},{key:"push",value:function(){var a;
(a=this._tokenizr).push.apply(a,arguments);return this}},{key:"pop",value:function(){var a;return(a=this._tokenizr).pop.apply(a,arguments)}},{key:"state",value:function(){var a;if(0<arguments.length){var b;(b=this._tokenizr).state.apply(b,arguments);return this}return(a=this._tokenizr).state.apply(a,arguments)}},{key:"tag",value:function(){var a;(a=this._tokenizr).tag.apply(a,arguments);return this}},{key:"tagged",value:function(){var a;return(a=this._tokenizr).tagged.apply(a,arguments)}},{key:"untag",
value:function(){var a;(a=this._tokenizr).untag.apply(a,arguments);return this}},{key:"repeat",value:function(){this._tokenizr._log("    REPEAT");this._repeat=!0;return this}},{key:"reject",value:function(){this._tokenizr._log("    REJECT");this._reject=!0;return this}},{key:"ignore",value:function(){this._tokenizr._log("    IGNORE");this._ignore=!0;return this}},{key:"accept",value:function(a,b){2>arguments.length&&(b=this._match[0]);this._tokenizr._log("    ACCEPT: type: ".concat(a,", value: ")+
"".concat(JSON.stringify(b)," (").concat(d(b),'), text: "').concat(this._match[0],'"'));this._tokenizr._pending.push(new u(a,b,this._match[0],this._tokenizr._pos,this._tokenizr._line,this._tokenizr._column));return this}},{key:"stop",value:function(){this._tokenizr._stopped=!0;return this}}]);return a}();a=function(){function a(){r(this,a);this._finish=this._after=this._before=null;this._rules=[];this._debug=!1;this.reset()}t(a,[{key:"reset",value:function(){this._input="";this._len=0;this._eof=!1;
this._pos=0;this._column=this._line=1;this._state=["default"];this._tag={};this._transaction=[];this._pending=[];this._stopped=!1;this._ctx=new y(this);return this}},{key:"error",value:function(a){return new v(a,this._pos,this._line,this._column,this._input)}},{key:"debug",value:function(a){this._debug=a;return this}},{key:"_log",value:function(a){this._debug&&console.log("tokenizr: ".concat(a))}},{key:"input",value:function(a){if("string"!==typeof a)throw Error('parameter "input" not a String');
this.reset();this._input=a;this._len=a.length;return this}},{key:"push",value:function(a){if(1!==arguments.length)throw Error("invalid number of arguments");if("string"!==typeof a)throw Error('parameter "state" not a String');this._log("    STATE (PUSH): "+"old: <".concat(this._state[this._state.length-1],">, ")+"new: <".concat(a,">"));this._state.push(a);return this}},{key:"pop",value:function(){if(0!==arguments.length)throw Error("invalid number of arguments");if(2>this._state.length)throw Error("no more custom states to pop");
this._log("    STATE (POP): "+"old: <".concat(this._state[this._state.length-1],">, ")+"new: <".concat(this._state[this._state.length-2],">"));return this._state.pop()}},{key:"state",value:function(a){if(1===arguments.length){if("string"!==typeof a)throw Error('parameter "state" not a String');this._log("    STATE (SET): "+"old: <".concat(this._state[this._state.length-1],">, ")+"new: <".concat(a,">"));this._state[this._state.length-1]=a;return this}if(0===arguments.length)return this._state[this._state.length-
1];throw Error("invalid number of arguments");}},{key:"tag",value:function(a){if(1!==arguments.length)throw Error("invalid number of arguments");if("string"!==typeof a)throw Error('parameter "tag" not a String');this._log("    TAG (ADD): ".concat(a));this._tag[a]=!0;return this}},{key:"tagged",value:function(a){if(1!==arguments.length)throw Error("invalid number of arguments");if("string"!==typeof a)throw Error('parameter "tag" not a String');return!0===this._tag[a]}},{key:"untag",value:function(a){if(1!==
arguments.length)throw Error("invalid number of arguments");if("string"!==typeof a)throw Error('parameter "tag" not a String');this._log("    TAG (DEL): ".concat(a));delete this._tag[a];return this}},{key:"before",value:function(a){this._before=a;return this}},{key:"after",value:function(a){this._after=a;return this}},{key:"finish",value:function(a){this._finish=a;return this}},{key:"rule",value:function(a,b,c){var e=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"unknown";if(2===arguments.length&&
"function"===typeof b){var f=[a,b];b=f[0];c=f[1];a="*"}else 3===arguments.length&&"function"===typeof b&&(e=[a,b,c],b=e[0],c=e[1],e=e[2],a="*");if("string"!==typeof a)throw Error('parameter "state" not a String');if(!("object"===d(b)&&b instanceof RegExp))throw Error('parameter "pattern" not a RegExp');if("function"!==typeof c)throw Error('parameter "action" not a Function');if("string"!==typeof e)throw Error('parameter "name" not a String');a=a.split(/\s*,\s*/g).map(function(a){var b=a.split(/\s+/g);
a=b.filter(function(a){return null===a.match(/^#/)});b=b.filter(function(a){return null!==a.match(/^#/)}).map(function(a){return a.replace(/^#/,"")});if(1!==a.length)throw Error("exactly one state required");return{state:a[0],tags:b}});f="g";try{"boolean"===typeof RegExp("","y").sticky&&(f="y")}catch(n){}"boolean"===typeof b.multiline&&b.multiline&&(f+="m");"boolean"===typeof b.dotAll&&b.dotAll&&(f+="s");"boolean"===typeof b.ignoreCase&&b.ignoreCase&&(f+="i");"boolean"===typeof b.unicode&&b.unicode&&
(f+="u");b=new RegExp(b.source,f);this._log("rule: configure rule (state: ".concat(a,", pattern: ").concat(b.source,")"));this._rules.push({state:a,pattern:b,action:c,name:e});return this}},{key:"_progress",value:function(a,b){for(var e=this._line,c=this._column,d=this._input,f=a;f<b;f++){var g=d.charAt(f);"\r"===g?this._column=1:"\n"===g?(this._line++,this._column=1):"\t"===g?this._column+=8-this._column%8:this._column++}this._log("    PROGRESS: characters: ".concat(b-a,", ")+"from: <line ".concat(e,
", column ").concat(c,">, ")+"to: <line ".concat(this._line,", column ").concat(this._column,">"))}},{key:"_tokenize",value:function(){var a=this,b=function(){a._eof||(null!==a._finish&&a._finish.call(a._ctx,a._ctx),a._eof=!0,a._pending.push(new u("EOF","","",a._pos,a._line,a._column)))};if(this._stopped||this._pos>=this._len)b();else{for(var c=!0;c;){c=!1;if(this._debug){var d=x(this._input,this._pos),h=Object.keys(this._tag).map(function(a){return"#".concat(a)}).join(" ");this._log("INPUT: state: <".concat(this._state[this._state.length-
1],">, tags: <").concat(h,">, text: ")+(d.prologTrunc?"...":'"')+"".concat(d.prologText,"<").concat(d.tokenText,">").concat(d.epilogText)+(d.epilogTrunc?"...":'"')+", at: <line ".concat(this._line,", column ").concat(this._column,">"))}for(d=0;d<this._rules.length;d++){this._debug&&(h=this._rules[d].state.map(function(a){var b=a.state;0<a.tags.length&&(b+=" "+a.tags.map(function(a){return"#".concat(a)}).join(" "));return b}).join(", "),this._log("  RULE: state(s): <".concat(h,">, ")+"pattern: ".concat(this._rules[d].pattern.source)));
var h=!1,g=this._rules[d].state.map(function(a){return a.state}),k=g.indexOf("*");0>k&&(k=g.indexOf(this._state[this._state.length-1]));0<=k&&(h=!0,g=this._rules[d].state[k].tags,g=g.filter(function(b){return!a._tag[b]}),0<g.length&&(h=!1));if(h&&(this._rules[d].pattern.lastIndex=this._pos,h=this._rules[d].pattern.exec(this._input),this._rules[d].pattern.lastIndex=this._pos,null!==(h=this._rules[d].pattern.exec(this._input))&&h.index===this._pos&&(this._debug&&this._log("    MATCHED: "+JSON.stringify(h)),
this._ctx._match=h,this._ctx._repeat=!1,this._ctx._reject=!1,this._ctx._ignore=!1,null!==this._before&&this._before.call(this._ctx,this._ctx,h,this._rules[d]),this._rules[d].action.call(this._ctx,this._ctx,h),null!==this._after&&this._after.call(this._ctx,this._ctx,h,this._rules[d]),!this._ctx._reject)))if(this._ctx._repeat){c=!0;break}else if(this._ctx._ignore){this._progress(this._pos,this._rules[d].pattern.lastIndex);this._pos=this._rules[d].pattern.lastIndex;if(this._pos>=this._len){b();return}c=
!0;break}else{if(0<this._pending.length){this._progress(this._pos,this._rules[d].pattern.lastIndex);this._pos=this._rules[d].pattern.lastIndex;this._pos>=this._len&&b();return}throw Error('action of pattern "'+this._rules[d].pattern.source+'" neither rejected nor accepted any token(s)');}}}throw this.error("token not recognized");}}},{key:"token",value:function(){0===this._pending.length&&this._tokenize();if(0<this._pending.length){var a=this._pending.shift();0<this._transaction.length&&this._transaction[0].push(a);
this._log("TOKEN: ".concat(a.toString()));return a}return null}},{key:"tokens",value:function(){for(var a=[],b;null!==(b=this.token());)a.push(b);return a}},{key:"peek",value:function(a){"undefined"===typeof a&&(a=0);for(var b=0;b<this._pending.length+a;b++)this._tokenize();if(a>=this._pending.length)throw Error("not enough tokens available for peek operation");this._log("PEEK: ".concat(this._pending[a].toString()));return this._pending[a]}},{key:"skip",value:function(a){"undefined"===typeof a&&(a=
1);for(var b=0;b<this._pending.length+a;b++)this._tokenize();if(a>this._pending.length)throw Error("not enough tokens available for skip operation");for(;0<a--;)this.token();return this}},{key:"consume",value:function(a,b){for(var c=this,e=0;e<this._pending.length+1;e++)this._tokenize();if(0===this._pending.length)throw Error("not enough tokens available for consume operation");var f=this.token();this._log("CONSUME: ".concat(f.toString()));e=function(){throw new v("expected: <type: ".concat(a,", value: ").concat(JSON.stringify(b),
" (").concat(d(b),")>, ")+"found: <type: ".concat(f.type,", value: ").concat(JSON.stringify(f.value)," (").concat(d(f.value),")>"),f.pos,f.line,f.column,c._input);};2!==arguments.length||f.isA(a,b)?f.isA(a)||e("*","any"):e(JSON.stringify(b),d(b));return f}},{key:"begin",value:function(){this._log("BEGIN: level ".concat(this._transaction.length));this._transaction.unshift([]);return this}},{key:"depth",value:function(){if(0===this._transaction.length)throw Error("cannot determine depth -- no active transaction");
return this._transaction[0].length}},{key:"commit",value:function(){if(0===this._transaction.length)throw Error("cannot commit transaction -- no active transaction");this._transaction.shift();this._log("COMMIT: level ".concat(this._transaction.length));return this}},{key:"rollback",value:function(){if(0===this._transaction.length)throw Error("cannot rollback transaction -- no active transaction");this._pending=this._transaction[0].concat(this._pending);this._transaction.shift();this._log("ROLLBACK: level ".concat(this._transaction.length));
return this}},{key:"alternatives",value:function(){for(var a=null,b=[],c=arguments.length,d=Array(c),g=0;g<c;g++)d[g]=arguments[g];for(c=0;c<d.length;c++)try{this.begin();a=d[c].call(this);this.commit();break}catch(n){this._log("EXCEPTION: ".concat(n.toString())),b.push({ex:n,depth:this.depth()}),this.rollback()}if(null===a&&0<b.length)throw b=b.sort(function(a,b){return a.depth-b.depth}),b[0].ex;return a}}]);return a}();a.Token=u;a.ParsingError=v;a.ActionContext=y;b.exports=a},{}]},{},[1])(1)});
Ext.ux.form.TinyMCETextArea=Ext.extend(Ext.form.TextArea,{wysiwygIntialized:!1,intializationInProgress:!1,lastHeight:null,lastFrameHeight:null,noWysiwyg:!1,tinyMCEConfig:{},editor:void 0,disableEditor:!1,editorOwnerWindow:void 0,constructor:function(a){a=a||{};Ext.applyIf(a,{hideMode:"offsets"});Ext.applyIf(a.tinyMCEConfig,{hideMode:"offsets",mode:"exact",resize:!1});Ext.ux.form.TinyMCETextArea.superclass.constructor.call(this,a)},getEditorOwnerWindow:function(){if(Ext.isDefined(this.editorOwnerWindow))return this.editorOwnerWindow;
var a=Ext.getDom(this.getInputId());return this.editorOwnerWindow=a?a.ownerDocument.defaultView:void 0},afterRender:function(){var a=this;Ext.ux.form.TinyMCETextArea.superclass.afterRender.call(this,arguments);this.initEditor();a.on("blur",function(b,c,d){b=document.getElementById(a.getInputId());a.wysiwygIntialized?(c=a.getEditor())&&c.isHidden()&&(b&&(a.positionBeforeBlur={start:b.selectionStart,end:b.selectionEnd}),c.load()):b&&(a.positionBeforeBlur={start:b.selectionStart,end:b.selectionEnd})},
a);a.on("resize",function(b,c,d,g,l,q){a.syncEditorHeight(d)},a)},syncEditorHeight:function(a){this.lastHeight=a;if(this.wysiwygIntialized&&this.rendered){var b=this.getEditorOwnerWindow().tinymce.get(this.getInputId());if(b&&b.iframeElement&&!b.isHidden()){var b=Ext.get(b.iframeElement),c=b.up(".mce-edit-area"),c=c.up(".mce-container-body"),d=c.down(".mce-toolbar-grp");d&&(a-=d.getHeight());(d=c.down(".mce-menubar"))&&(a-=d.getHeight());(c=c.down(".mce-statusbar"))&&(a-=c.getHeight());this.lastFrameHeight=
a-3;b.setHeight(a-3)}}},withEd:function(a){var b=this,c=this.getEditor();if(c)if(c.initialized)c.initialized&&(b.editor=c,a.call(b));else this.on("initialized",function(){b.withEd(a)},b)},getInputId:function(){return this.inputId||(this.inputId=this.id)},isDisabled:function(){return this.disabled},insertAtCursor:function(a){var b=this.getEditor();b.execCommand("mceInsertContent",!1,a);b.undoManager.clear()},initEditor:function(){var a=this;if(!(a.noWysiwyg||a.intializationInProgress||a.wysiwygIntialized)){a.intializationInProgress=
!0;a.tinyMCEConfig.selector="textarea#"+a.getInputId();a.tinyMCEConfig.height=a.lastFrameHeight?a.lastFrameHeight:30;var b=null;a.tinyMCEConfig.setup&&(b=a.tinyMCEConfig.setup);a.tinyMCEConfig.setup=function(c){Ext.isDefined(a.editor)||(a.editor=c);var d=a.getEditorOwnerWindow(),g=d.tinymce.DOM.loadCSS,l=[];d.tinymce.DOM.loadCSS=function(b){b||(b="");Ext.each(b.split(","),function(b){if(!Ext.isEmpty(b)){l.push(b);var c=d.document.createElement("link");d.document.head.appendChild(c);c.addEventListener("load",
function(){l.splice(l.indexOf(b),1);d.document.head.removeChild(c);a.fireEvent("stylesheetloaded",b)});c.addEventListener("error",function(){l.splice(l.indexOf(b),1);a.fireEvent("stylesheetloaded",b)});c.setAttribute("rel","stylesheet");c.setAttribute("type","text/css");c.setAttribute("href",b)}});return g.apply(this,arguments)};c.on("init",function(b){function k(){if(0<l.length)a.on("stylesheetloaded",function(){k()},this);else a.syncEditorHeight(a.lastHeight||a.height)}d.tinymce.DOM.loadCSS=g;a.wysiwygIntialized=
!0;a.intializationInProgress=!1;(a.disableEditor||a.isDisabled())&&a.disable();a.fireEvent("initialized",a,c,{});(a.lastHeight||a.height)&&k()});b&&b(c)};a.getEditorOwnerWindow().tinymce.init(a.tinyMCEConfig);a.intializationInProgress=!1;a.wysiwygIntialized=!0}},getEditor:function(){var a=this.getEditorOwnerWindow();return a?a.tinymce.get(this.getInputId()):void 0},removeEditor:function(){if(this.intializationInProgress||!this.wysiwygIntialized)return this;var a=this.getEditor();a&&(a.save(),a.destroy(!1));
this.wysiwygIntialized=!1;return this},setValue:function(a){var b=this;if(b.wysiwygIntialized&&this.value!==a&&(this.value=a,this.rendered)){var c=b.getEditor();if(c)b.setContent(c,a);else b.getEditorOwnerWindow().tinymce.EditorManager.on("AddEditor",function(){b.withEd(function(){var c=b.getEditor();c.isDirty()||b.setContent(c,a)})},this)}return this.value},setContent:function(a,b){a.setContent(null===b||void 0===b?"":b,{format:"raw"});a.startContent=a.getContent({format:"raw"})},getValue:function(a){if(a=
this.getEditor()){if(!this.rendered||!a.initialized)return Ext.value(this.value,"");a=a.getContent();if(a===this.emptyText||void 0===a)a="";return a}},getRawValue:function(){var a=this.getEditor();if(a){if(!this.rendered||!a.initialized)return Ext.value(this.value,"");a=a.getContent({format:"raw"});a===this.emptyText&&(a="");return a}},initValue:function(){if(this.rendered)if(void 0!==this.value)this.setValue(this.value);else{var a=this.getEl().value;a&&this.setValue(a)}else Ext.ux.TinyMCE.superclass.initValue.call(this)},
focus:function(a,b){var c=this;if(c.isDisabled())return c;if(b)return isNaN(b)&&(b=10),setTimeout(function(){c.focus.call(c,a,!1)},b),c;if(!c.wysiwygIntialized)return Ext.ux.form.TinyMCETextArea.superclass.focus.call(this,arguments);var d=c.getEditor();if(d&&!d.isHidden()&&d.initialized)Ext.ux.form.TinyMCETextArea.superclass.focus.call(this,arguments),d.focus();else return this.withEd(function(){d.focus()}),Ext.ux.form.TinyMCETextArea.superclass.focus.call(this,arguments);return c},enable:function(){var a=
Ext.ux.form.TinyMCETextArea.superclass.enable.call(this,arguments);if(!a)return a;if(a=this.getEditor())a.theme.panel.find("*").disabled(!1),this.getEditorBody().setAttribute("contenteditable",!0);return this},disable:function(a){var b=this,c=Ext.ux.form.TinyMCETextArea.superclass.disable.call(this,arguments);if(!c)return c;b.withEd(function(){b.getEditor().theme.panel.find("*").disabled(!0);this.getEditorBody().setAttribute("contenteditable",!1)});return b},hide:function(){var a=this;Ext.ux.form.TinyMCETextArea.superclass.hide.call(this,
arguments);var b=a.getEditor();b&&b.iframeElement?b.hide():a.withEd(function(){a.getEditor().hide()});return a},show:function(){Ext.ux.form.TinyMCETextArea.superclass.show.call(this,arguments);var a=this.getEditor();a&&a.show();return this}});Ext.reg("zarafa.tinymcetextarea",Ext.ux.form.TinyMCETextArea);//# sourceMappingURL=ux-thirdparty.js.map
