diff --git a/CHANGELOG.textile b/CHANGELOG.textile
index cb4eaa8..8c4720c 100644
--- a/CHANGELOG.textile
+++ b/CHANGELOG.textile
@@ -1,3 +1,6 @@
+* wysihtml5x 0.5.0-beta13* (August 18, 2015)
+* Fixes node.normalize polyfill failing to restore cursor in some cases
+
* wysihtml5x 0.5.0-beta12* (July 31, 2015)
* Fixes a many toolbar handling errors
* Fixes formatBlock misbehaviours: in Safari selected content can be lost in some cases, acting on outer div if heading and paragraph elements are contained in div.
diff --git a/dist/wysihtml-toolbar.js b/dist/wysihtml-toolbar.js
index a456bea..ef0551b 100644
--- a/dist/wysihtml-toolbar.js
+++ b/dist/wysihtml-toolbar.js
@@ -1,5 +1,5 @@
/**
- * @license wysihtml v0.5.0-beta12
+ * @license wysihtml v0.5.0-beta13
* https://github.com/Voog/wysihtml
*
* Author: Christopher Blum (https://github.com/tiff)
@@ -10,7 +10,7 @@
*
*/
var wysihtml5 = {
- version: "0.5.0-beta12",
+ version: "0.5.0-beta13",
// namespaces
commands: {},
@@ -405,6 +405,8 @@ var wysihtml5 = {
return all;
};
+
+
var normalizeFix = function() {
var f = Node.prototype.normalize;
var nf = function() {
@@ -412,13 +414,15 @@ var wysihtml5 = {
s = this.ownerDocument.defaultView.getSelection(),
anode = s.anchorNode,
aoffset = s.anchorOffset,
+ aelement = anode && anode.nodeType === 1 && anode.childNodes.length > 0 ? anode.childNodes[aoffset] : undefined,
fnode = s.focusNode,
foffset = s.focusOffset,
+ felement = fnode && fnode.nodeType === 1 && foffset > 0 ? fnode.childNodes[foffset -1] : undefined,
r = this.ownerDocument.createRange(),
prevTxt = texts.shift(),
curText = prevTxt ? texts.shift() : null;
- if ((anode === fnode && foffset < aoffset) || (anode !== fnode && (anode.compareDocumentPosition(fnode) & Node.DOCUMENT_POSITION_PRECEDING))) {
+ if ((anode === fnode && foffset < aoffset) || (anode !== fnode && (anode.compareDocumentPosition(fnode) & Node.DOCUMENT_POSITION_PRECEDING) && !(anode.compareDocumentPosition(fnode) & Node.DOCUMENT_POSITION_CONTAINS))) {
fnode = [anode, anode = fnode][0];
foffset = [aoffset, aoffset = foffset][0];
}
@@ -442,13 +446,20 @@ var wysihtml5 = {
}
}
+ if (felement) {
+ foffset = Array.prototype.indexOf.call(felement.parentNode.childNodes, felement) + 1;
+ }
+
+ if (aelement) {
+ aoffset = Array.prototype.indexOf.call(aelement.parentNode.childNodes, aelement);
+ }
+
if (anode && anode.parentNode && fnode && fnode.parentNode) {
r.setStart(anode, aoffset);
r.setEnd(fnode, foffset);
s.removeAllRanges();
s.addRange(r);
}
-
};
Node.prototype.normalize = nf;
};
diff --git a/dist/wysihtml-toolbar.min.js b/dist/wysihtml-toolbar.min.js
index 691ff17..9c841de 100644
--- a/dist/wysihtml-toolbar.min.js
+++ b/dist/wysihtml-toolbar.min.js
@@ -1,10 +1,10 @@
-/*! wysihtml - v0.5.0-beta12 (2015-07-31) */
+/*! wysihtml - v0.5.0-beta13 (2015-08-18) */
-var wysihtml5={version:"0.5.0-beta12",commands:{},dom:{},quirks:{},toolbar:{},lang:{},selection:{},views:{},INVISIBLE_SPACE:"\ufeff",INVISIBLE_SPACE_REG_EXP:/\uFEFF/g,EMPTY_FUNCTION:function(){},ELEMENT_NODE:1,TEXT_NODE:3,BACKSPACE_KEY:8,ENTER_KEY:13,ESCAPE_KEY:27,SPACE_KEY:32,TAB_KEY:9,DELETE_KEY:46};wysihtml5.polyfills=function(a,b){String.prototype.trim||!function(){var a=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(a,"")}}(),function(){var c="addEventListener",d="removeEventListener";b[c]||(a.Element.prototype[c]=a[c]=b[c]=function(b,c,d){return(d=this).attachEvent("on"+b,function(b){var b=b||a.event;b.target=b.target||b.srcElement,b.preventDefault=b.preventDefault||function(){b.returnValue=!1},b.stopPropagation=b.stopPropagation||function(){b.cancelBubble=!0},b.which=b.button?2===b.button?3:4===b.button?2:b.button:b.keyCode,c.call(d,b)})},a.Element.prototype[d]=a[d]=b[d]=function(a,b){return this.detachEvent("on"+a,b)})}(),Object.defineProperty&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(a.Element.prototype,"textContent")&&!Object.getOwnPropertyDescriptor(a.Element.prototype,"textContent").get&&!function(){var b=Object.getOwnPropertyDescriptor(a.Element.prototype,"innerText");Object.defineProperty(a.Element.prototype,"textContent",{get:function(){return b.get.call(this)},set:function(a){return b.set.call(this,a)}})}(),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){for(var c=this.length,d=-1,e=b>>>0;~(c-e);d=this[--c]===a?c:d);return d}),Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d&&a?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}),a.Element&&function(a){a.matches=a.matches||a.matchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector||function(a){for(var b=this,c=(b.parentNode||b.document).querySelectorAll(a),d=-1;c[++d]&&c[d]!=b;);return!!c[d]}}(a.Element.prototype),"document"in a&&("classList"in b.createElement("_")?"DOMTokenList"in a&&!function(){"use strict";var c=b.createElement("_");if(c.classList.add("c1","c2"),!c.classList.contains("c2")){var d=function(b){var c=a.DOMTokenList.prototype[b];a.DOMTokenList.prototype[b]=function(a){var b,d=arguments.length;for(b=0;d>b;b++)a=arguments[b],c.call(this,a)}};d("add"),d("remove")}if(c.classList.toggle("c3",!1),c.classList.contains("c3")){var e=a.DOMTokenList.prototype.toggle;a.DOMTokenList.prototype.toggle=function(a,b){return 1 in arguments&&!this.contains(a)==!b?b:e.call(this,a)}}c=null}():!function(a){"use strict";if("Element"in a){var b="classList",c="prototype",d=a.Element[c],e=Object,f=String[c].trim||function(){return this.replace(/^\s+|\s+$/g,"")},g=Array[c].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1},h=function(a,b){this.name=a,this.code=DOMException[a],this.message=b},i=function(a,b){if(""===b)throw new h("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(b))throw new h("INVALID_CHARACTER_ERR","String contains an invalid character");return g.call(a,b)},j=function(a){for(var b=f.call(a.getAttribute("class")||""),c=b?b.split(/\s+/):[],d=0,e=c.length;e>d;d++)this.push(c[d]);this._updateClassName=function(){a.setAttribute("class",this.toString())}},k=j[c]=[],l=function(){return new j(this)};if(h[c]=Error[c],k.item=function(a){return this[a]||null},k.contains=function(a){return a+="",-1!==i(this,a)},k.add=function(){var a,b=arguments,c=0,d=b.length,e=!1;do a=b[c]+"",-1===i(this,a)&&(this.push(a),e=!0);while(++cg||c!==f&&c.compareDocumentPosition(f)&Node.DOCUMENT_POSITION_PRECEDING)&&(f=[c,c=f][0],g=[e,e=g][0]);i&&j;)j.previousSibling&&j.previousSibling===i?(c===j&&(c=i,e=i.nodeValue.length+e),f===j&&(f=i,g=i.nodeValue.length+g),i.nodeValue=i.nodeValue+j.nodeValue,j.parentNode.removeChild(j),j=a.shift()):(i=j,j=a.shift());c&&c.parentNode&&f&&f.parentNode&&(h.setStart(c,e),h.setEnd(f,g),b.removeAllRanges(),b.addRange(h))});Node.prototype.normalize=a};"Node"in window&&"normalize"in Node.prototype&&c()&&e()},wysihtml5.polyfills(window,document),function(a,b){"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a():b.rangy=a()}(function(){function a(a,b){var c=typeof a[b];return c==u||!(c!=t||!a[b])||"unknown"==c}function b(a,b){return!(typeof a[b]!=t||!a[b])}function c(a,b){return typeof a[b]!=v}function d(a){return function(b,c){for(var d=c.length;d--;)if(!a(b,c[d]))return!1;return!0}}function e(a){return a&&A(a,z)&&C(a,y)}function f(a){return b(a,"body")?a.body:a.getElementsByTagName("body")[0]}function g(b){typeof console!=v&&a(console,"log")&&console.log(b)}function h(a,b){F&&b?alert(a):g(a)}function i(a){H.initialized=!0,H.supported=!1,h("Rangy is not supported in this environment. Reason: "+a,H.config.alertOnFail)}function j(a){h("Rangy warning: "+a,H.config.alertOnWarn)}function k(a){return a.message||a.description||String(a)}function l(){if(F&&!H.initialized){var b,c=!1,d=!1;a(document,"createRange")&&(b=document.createRange(),A(b,x)&&C(b,w)&&(c=!0));var h=f(document);if(!h||"body"!=h.nodeName.toLowerCase())return void i("No body element found");if(h&&a(h,"createTextRange")&&(b=h.createTextRange(),e(b)&&(d=!0)),!c&&!d)return void i("Neither Range nor TextRange are available");H.initialized=!0,H.features={implementsDomRange:c,implementsTextRange:d};var j,l;for(var m in E)(j=E[m])instanceof p&&j.init(j,H);for(var n=0,o=K.length;o>n;++n)try{K[n](H)}catch(q){l="Rangy init listener threw an exception. Continuing. Detail: "+k(q),g(l)}}}function m(a,b,c){c&&(a+=" in module "+c.name),H.warn("DEPRECATED: "+a+" is deprecated. Please use "+b+" instead.")}function n(a,b,c,d){a[b]=function(){return m(b,c,d),a[c].apply(a,G.toArray(arguments))}}function o(a){a=a||window,l();for(var b=0,c=L.length;c>b;++b)L[b](a)}function p(a,b,c){this.name=a,this.dependencies=b,this.initialized=!1,this.supported=!1,this.initializer=c}function q(a,b,c){var d=new p(a,b,function(b){if(!b.initialized){b.initialized=!0;try{c(H,b),b.supported=!0}catch(d){var e="Module '"+a+"' failed to load: "+k(d);g(e),d.stack&&g(d.stack)}}});return E[a]=d,d}function r(){}function s(){}var t="object",u="function",v="undefined",w=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],x=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],y=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],z=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"],A=d(a),B=d(b),C=d(c),D=[].forEach?function(a,b){a.forEach(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)b(a[c],c)},E={},F=typeof window!=v&&typeof document!=v,G={isHostMethod:a,isHostObject:b,isHostProperty:c,areHostMethods:A,areHostObjects:B,areHostProperties:C,isTextRange:e,getBody:f,forEach:D},H={version:"1.3.0",initialized:!1,isBrowser:F,supported:!0,util:G,features:{},modules:E,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==v?!0:rangyAutoInitialize}};H.fail=i,H.warn=j;var I;({}).hasOwnProperty?(G.extend=I=function(a,b,c){var d,e;for(var f in b)b.hasOwnProperty(f)&&(d=a[f],e=b[f],c&&null!==d&&"object"==typeof d&&null!==e&&"object"==typeof e&&I(d,e,!0),a[f]=e);return b.hasOwnProperty("toString")&&(a.toString=b.toString),a},G.createOptions=function(a,b){var c={};return I(c,b),a&&I(c,a),c}):i("hasOwnProperty not supported"),F||i("Rangy can only run in a browser"),function(){var a;if(F){var b=document.createElement("div");b.appendChild(document.createElement("span"));var c=[].slice;try{1==c.call(b.childNodes,0)[0].nodeType&&(a=function(a){return c.call(a,0)})}catch(d){}}a||(a=function(a){for(var b=[],c=0,d=a.length;d>c;++c)b[c]=a[c];return b}),G.toArray=a}();var J;F&&(a(document,"addEventListener")?J=function(a,b,c){a.addEventListener(b,c,!1)}:a(document,"attachEvent")?J=function(a,b,c){a.attachEvent("on"+b,c)}:i("Document does not have required addEventListener or attachEvent method"),G.addListener=J);var K=[];G.deprecationNotice=m,G.createAliasForDeprecatedMethod=n,H.init=l,H.addInitListener=function(a){H.initialized?a(H):K.push(a)};var L=[];H.addShimListener=function(a){L.push(a)},F&&(H.shim=H.createMissingNativeApi=o,n(H,"createMissingNativeApi","shim")),p.prototype={init:function(){for(var a,b,c=this.dependencies||[],d=0,e=c.length;e>d;++d){if(b=c[d],a=E[b],!(a&&a instanceof p))throw new Error("required module '"+b+"' not found");if(a.init(),!a.supported)throw new Error("required module '"+b+"' not supported")}this.initializer(this)},fail:function(a){throw this.initialized=!0,this.supported=!1,new Error(a)},warn:function(a){H.warn("Module "+this.name+": "+a)},deprecationNotice:function(a,b){H.warn("DEPRECATED: "+a+" in module "+this.name+" is deprecated. Please use "+b+" instead")},createError:function(a){return new Error("Error in Rangy "+this.name+" module: "+a)}},H.createModule=function(a){var b,c;2==arguments.length?(b=arguments[1],c=[]):(b=arguments[2],c=arguments[1]);var d=q(a,c,b);H.initialized&&H.supported&&d.init()},H.createCoreModule=function(a,b,c){q(a,b,c)},H.RangePrototype=r,H.rangePrototype=new r,H.selectionPrototype=new s,H.createCoreModule("DomUtil",[],function(a,b){function c(a){var b;return typeof a.namespaceURI==F||null===(b=a.namespaceURI)||"http://www.w3.org/1999/xhtml"==b}function d(a){var b=a.parentNode;return 1==b.nodeType?b:null}function e(a){for(var b=0;a=a.previousSibling;)++b;return b}function f(a){switch(a.nodeType){case 7:case 10:return 0;case 3:case 8:return a.length;default:return a.childNodes.length}}function g(a,b){var c,d=[];for(c=a;c;c=c.parentNode)d.push(c);for(c=b;c;c=c.parentNode)if(K(d,c))return c;return null}function h(a,b,c){for(var d=c?b:b.parentNode;d;){if(d===a)return!0;d=d.parentNode}return!1}function i(a,b){return h(a,b,!0)}function j(a,b,c){for(var d,e=c?a:a.parentNode;e;){if(d=e.parentNode,d===b)return e;e=d}return null}function k(a){var b=a.nodeType;return 3==b||4==b||8==b}function l(a){if(!a)return!1;var b=a.nodeType;return 3==b||8==b}function m(a,b){var c=b.nextSibling,d=b.parentNode;return c?d.insertBefore(a,c):d.appendChild(a),a}function n(a,b,c){var d=a.cloneNode(!1);if(d.deleteData(0,b),a.deleteData(b,a.length-b),m(d,a),c)for(var f,g=0;f=c[g++];)f.node==a&&f.offset>b?(f.node=d,f.offset-=b):f.node==a.parentNode&&f.offset>e(a)&&++f.offset;return d}function o(a){if(9==a.nodeType)return a;if(typeof a.ownerDocument!=F)return a.ownerDocument;if(typeof a.document!=F)return a.document;if(a.parentNode)return o(a.parentNode);throw b.createError("getDocument: no document found for node")}function p(a){var c=o(a);if(typeof c.defaultView!=F)return c.defaultView;if(typeof c.parentWindow!=F)return c.parentWindow;throw b.createError("Cannot get a window object for node")}function q(a){if(typeof a.contentDocument!=F)return a.contentDocument;if(typeof a.contentWindow!=F)return a.contentWindow.document;throw b.createError("getIframeDocument: No Document object found for iframe element")}function r(a){if(typeof a.contentWindow!=F)return a.contentWindow;if(typeof a.contentDocument!=F)return a.contentDocument.defaultView;throw b.createError("getIframeWindow: No Window object found for iframe element")}function s(a){return a&&G.isHostMethod(a,"setTimeout")&&G.isHostObject(a,"document")}function t(a,b,c){var d;if(a?G.isHostProperty(a,"nodeType")?d=1==a.nodeType&&"iframe"==a.tagName.toLowerCase()?q(a):o(a):s(a)&&(d=a.document):d=document,!d)throw b.createError(c+"(): Parameter must be a Window object or DOM node");return d}function u(a){for(var b;b=a.parentNode;)a=b;return a}function v(a,c,d,f){var h,i,k,l,m;if(a==d)return c===f?0:f>c?-1:1;if(h=j(d,a,!0))return c<=e(h)?-1:1;if(h=j(a,d,!0))return e(h)[index:"+e(a)+",length:"+a.childNodes.length+"]["+(a.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return a.nodeName}function y(a){for(var b,c=o(a).createDocumentFragment();b=a.firstChild;)c.appendChild(b);return c}function z(a,b,c){var d=H(a),e=a.createElement("div");e.contentEditable=""+!!c,b&&(e.innerHTML=b);var f=d.firstChild;return f?d.insertBefore(e,f):d.appendChild(e),e}function A(a){return a.parentNode.removeChild(a)}function B(a){this.root=a,this._next=a}function C(a){return new B(a)}function D(a,b){this.node=a,this.offset=b}function E(a){this.code=this[a],this.codeName=a,this.message="DOMException: "+this.codeName}var F="undefined",G=a.util,H=G.getBody;G.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||b.fail("document missing a Node creation method"),G.isHostMethod(document,"getElementsByTagName")||b.fail("document missing getElementsByTagName method");var I=document.createElement("div");G.areHostMethods(I,["insertBefore","appendChild","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"]))||b.fail("Incomplete Element implementation"),G.isHostProperty(I,"innerHTML")||b.fail("Element is missing innerHTML property");var J=document.createTextNode("test");G.areHostMethods(J,["splitText","deleteData","insertData","appendData","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"])||!G.areHostProperties(J,["data"]))||b.fail("Incomplete Text Node implementation");var K=function(a,b){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1},L=!1;!function(){var b=document.createElement("b");b.innerHTML="1";var c=b.firstChild;b.innerHTML="
",L=w(c),a.features.crashyTextNodes=L}();var M;typeof window.getComputedStyle!=F?M=function(a,b){return p(a).getComputedStyle(a,null)[b]}:typeof document.documentElement.currentStyle!=F?M=function(a,b){return a.currentStyle?a.currentStyle[b]:""}:b.fail("No means of obtaining computed style properties found"),B.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var a,b,c=this._current=this._next;if(this._current)if(a=c.firstChild)this._next=a;else{for(b=null;c!==this.root&&!(b=c.nextSibling);)c=c.parentNode;this._next=b}return this._current},detach:function(){this._current=this._next=this.root=null}},D.prototype={equals:function(a){return!!a&&this.node===a.node&&this.offset==a.offset},inspect:function(){return"[DomPosition("+x(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}},E.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},E.prototype.toString=function(){return this.message},a.dom={arrayContains:K,isHtmlNamespace:c,parentElement:d,getNodeIndex:e,getNodeLength:f,getCommonAncestor:g,isAncestorOf:h,isOrIsAncestorOf:i,getClosestAncestorIn:j,isCharacterDataNode:k,isTextOrCommentNode:l,insertAfter:m,splitDataNode:n,getDocument:o,getWindow:p,getIframeWindow:r,getIframeDocument:q,getBody:H,isWindow:s,getContentDocument:t,getRootContainer:u,comparePoints:v,isBrokenNode:w,inspectNode:x,getComputedStyleProperty:M,createTestElement:z,removeNode:A,fragmentFromNodeChildren:y,createIterator:C,DomPosition:D},a.DOMException=E}),H.createCoreModule("DomRange",["DomUtil"],function(a,b){function c(a,b){return 3!=a.nodeType&&(P(a,b.startContainer)||P(a,b.endContainer))}function d(a){return a.document||Q(a.startContainer)}function e(a){return W(a.startContainer)}function f(a){return new L(a.parentNode,O(a))}function g(a){return new L(a.parentNode,O(a)+1)}function h(a,b,c){var d=11==a.nodeType?a.firstChild:a;return N(b)?c==b.length?J.insertAfter(a,b):b.parentNode.insertBefore(a,0==c?b:S(b,c)):c>=b.childNodes.length?b.appendChild(a):b.insertBefore(a,b.childNodes[c]),d}function i(a,b,c){if(z(a),z(b),d(b)!=d(a))throw new M("WRONG_DOCUMENT_ERR");var e=R(a.startContainer,a.startOffset,b.endContainer,b.endOffset),f=R(a.endContainer,a.endOffset,b.startContainer,b.startOffset);return c?0>=e&&f>=0:0>e&&f>0}function j(a){for(var b,c,e,f=d(a.range).createDocumentFragment();c=a.next();){if(b=a.isPartiallySelectedSubtree(),c=c.cloneNode(!b),b&&(e=a.getSubtreeIterator(),c.appendChild(j(e)),e.detach()),10==c.nodeType)throw new M("HIERARCHY_REQUEST_ERR");f.appendChild(c)}return f}function k(a,b,c){var d,e;c=c||{stop:!1};for(var f,g;f=a.next();)if(a.isPartiallySelectedSubtree()){if(b(f)===!1)return void(c.stop=!0);if(g=a.getSubtreeIterator(),k(g,b,c),g.detach(),c.stop)return}else for(d=J.createIterator(f);e=d.next();)if(b(e)===!1)return void(c.stop=!0)}function l(a){for(var b;a.next();)a.isPartiallySelectedSubtree()?(b=a.getSubtreeIterator(),l(b),b.detach()):a.remove()}function m(a){for(var b,c,e=d(a.range).createDocumentFragment();b=a.next();){if(a.isPartiallySelectedSubtree()?(b=b.cloneNode(!1),c=a.getSubtreeIterator(),b.appendChild(m(c)),c.detach()):a.remove(),10==b.nodeType)throw new M("HIERARCHY_REQUEST_ERR");e.appendChild(b)}return e}function n(a,b,c){var d,e=!(!b||!b.length),f=!!c;e&&(d=new RegExp("^("+b.join("|")+")$"));var g=[];return k(new p(a,!1),function(b){if(!(e&&!d.test(b.nodeType)||f&&!c(b))){var h=a.startContainer;if(b!=h||!N(h)||a.startOffset!=h.length){var i=a.endContainer;b==i&&N(i)&&0==a.endOffset||g.push(b)}}}),g}function o(a){var b="undefined"==typeof a.getName?"Range":a.getName();return"["+b+"("+J.inspectNode(a.startContainer)+":"+a.startOffset+", "+J.inspectNode(a.endContainer)+":"+a.endOffset+")]"}function p(a,b){if(this.range=a,this.clonePartiallySelectedTextNodes=b,!a.collapsed){this.sc=a.startContainer,this.so=a.startOffset,this.ec=a.endContainer,this.eo=a.endOffset;var c=a.commonAncestorContainer;this.sc===this.ec&&N(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==c||N(this.sc)?T(this.sc,c,!0):this.sc.childNodes[this.so],this._last=this.ec!==c||N(this.ec)?T(this.ec,c,!0):this.ec.childNodes[this.eo-1])}}function q(a){return function(b,c){for(var d,e=c?b:b.parentNode;e;){if(d=e.nodeType,V(a,d))return e;e=e.parentNode}return null}}function r(a,b){if(ea(a,b))throw new M("INVALID_NODE_TYPE_ERR")}function s(a,b){if(!V(b,a.nodeType))throw new M("INVALID_NODE_TYPE_ERR")}function t(a,b){if(0>b||b>(N(a)?a.length:a.childNodes.length))throw new M("INDEX_SIZE_ERR")}function u(a,b){if(ca(a,!0)!==ca(b,!0))throw new M("WRONG_DOCUMENT_ERR")}function v(a){if(da(a,!0))throw new M("NO_MODIFICATION_ALLOWED_ERR")}function w(a,b){if(!a)throw new M(b)}function x(a,b){return b<=(N(a)?a.length:a.childNodes.length)}function y(a){return!!a.startContainer&&!!a.endContainer&&!(X&&(J.isBrokenNode(a.startContainer)||J.isBrokenNode(a.endContainer)))&&W(a.startContainer)==W(a.endContainer)&&x(a.startContainer,a.startOffset)&&x(a.endContainer,a.endOffset)}function z(a){if(!y(a))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+a.inspect()+")")}function A(a,b){z(a);var c=a.startContainer,d=a.startOffset,e=a.endContainer,f=a.endOffset,g=c===e;N(e)&&f>0&&f0&&d=O(c)&&f++,d=0),a.setStartAndEnd(c,d,e,f)}function B(a){z(a);var b=a.commonAncestorContainer.parentNode.cloneNode(!1);return b.appendChild(a.cloneContents()),b.innerHTML}function C(a){a.START_TO_START=ka,a.START_TO_END=la,a.END_TO_END=ma,a.END_TO_START=na,a.NODE_BEFORE=oa,a.NODE_AFTER=pa,a.NODE_BEFORE_AND_AFTER=qa,a.NODE_INSIDE=ra}function D(a){C(a),C(a.prototype)}function E(a,b){return function(){z(this);var c,d,e=this.startContainer,f=this.startOffset,h=this.commonAncestorContainer,i=new p(this,!0);e!==h&&(c=T(e,h,!0),d=g(c),e=d.node,f=d.offset),k(i,v),i.reset();var j=a(i);return i.detach(),b(this,e,f,e,f),j}}function F(b,d){function e(a,b){return function(c){s(c,Z),s(W(c),$);var d=(a?f:g)(c);(b?h:i)(this,d.node,d.offset)}}function h(a,b,c){var e=a.endContainer,f=a.endOffset;(b!==a.startContainer||c!==a.startOffset)&&((W(b)!=W(e)||1==R(b,c,e,f))&&(e=b,f=c),d(a,b,c,e,f))}function i(a,b,c){var e=a.startContainer,f=a.startOffset;(b!==a.endContainer||c!==a.endOffset)&&((W(b)!=W(e)||-1==R(b,c,e,f))&&(e=b,f=c),d(a,e,f,b,c))}var j=function(){};j.prototype=a.rangePrototype,b.prototype=new j,K.extend(b.prototype,{setStart:function(a,b){r(a,!0),t(a,b),h(this,a,b)},setEnd:function(a,b){r(a,!0),t(a,b),i(this,a,b)},setStartAndEnd:function(){var a=arguments,b=a[0],c=a[1],e=b,f=c;switch(a.length){case 3:f=a[2];break;case 4:e=a[2],f=a[3]}d(this,b,c,e,f)},setBoundary:function(a,b,c){this["set"+(c?"Start":"End")](a,b)},setStartBefore:e(!0,!0),setStartAfter:e(!1,!0),setEndBefore:e(!0,!1),setEndAfter:e(!1,!1),collapse:function(a){z(this),a?d(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):d(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(a){r(a,!0),d(this,a,0,a,U(a))},selectNode:function(a){r(a,!1),s(a,Z);var b=f(a),c=g(a);d(this,b.node,b.offset,c.node,c.offset)},extractContents:E(m,d),deleteContents:E(l,d),canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},splitBoundaries:function(){A(this)},splitBoundariesPreservingPositions:function(a){A(this,a)},normalizeBoundaries:function(){z(this);var a,b=this.startContainer,c=this.startOffset,e=this.endContainer,f=this.endOffset,g=function(a){var b=a.nextSibling;b&&b.nodeType==a.nodeType&&(e=a,f=a.length,a.appendData(b.data),Y(b))},h=function(a){var d=a.previousSibling;if(d&&d.nodeType==a.nodeType){b=a;var g=a.length;if(c=d.length,a.insertData(0,d.data),Y(d),b==e)f+=c,e=b;else if(e==a.parentNode){var h=O(a);f==h?(e=a,f=g):f>h&&f--}}},i=!0;if(N(e))f==e.length?g(e):0==f&&(a=e.previousSibling,a&&a.nodeType==e.nodeType&&(f=a.length,b==e&&(i=!1),a.appendData(e.data),Y(e),e=a));else{if(f>0){var j=e.childNodes[f-1];j&&N(j)&&g(j)}i=!this.collapsed}if(i){if(N(b))0==c?h(b):c==b.length&&(a=b.nextSibling,a&&a.nodeType==b.nodeType&&(e==a&&(e=b,f+=b.length),b.appendData(a.data),Y(a)));else if(cx",ga=3==fa.firstChild.nodeType}catch(ha){}a.features.htmlParsingConforms=ga;var ia=ga?function(a){var b=this.startContainer,c=Q(b);if(!b)throw new M("INVALID_STATE_ERR");var d=null;return 1==b.nodeType?d=b:N(b)&&(d=J.parentElement(b)),d=null===d||"HTML"==d.nodeName&&J.isHtmlNamespace(Q(d).documentElement)&&J.isHtmlNamespace(d)?c.createElement("body"):d.cloneNode(!1),d.innerHTML=a,J.fragmentFromNodeChildren(d)}:function(a){var b=d(this),c=b.createElement("body");return c.innerHTML=a,J.fragmentFromNodeChildren(c)},ja=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],ka=0,la=1,ma=2,na=3,oa=0,pa=1,qa=2,ra=3;K.extend(a.rangePrototype,{compareBoundaryPoints:function(a,b){z(this),u(this.startContainer,b.startContainer);var c,d,e,f,g=a==na||a==ka?"start":"end",h=a==la||a==ka?"start":"end";return c=this[g+"Container"],d=this[g+"Offset"],e=b[h+"Container"],f=b[h+"Offset"],R(c,d,e,f)},insertNode:function(a){if(z(this),s(a,aa),v(this.startContainer),P(a,this.startContainer))throw new M("HIERARCHY_REQUEST_ERR");var b=h(a,this.startContainer,this.startOffset);this.setStartBefore(b)},cloneContents:function(){z(this);var a,b;if(this.collapsed)return d(this).createDocumentFragment();if(this.startContainer===this.endContainer&&N(this.startContainer))return a=this.startContainer.cloneNode(!0),a.data=a.data.slice(this.startOffset,this.endOffset),b=d(this).createDocumentFragment(),b.appendChild(a),b;var c=new p(this,!0);return a=j(c),c.detach(),a},canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},surroundContents:function(a){if(s(a,ba),!this.canSurroundContents())throw new M("INVALID_STATE_ERR");var b=this.extractContents();if(a.hasChildNodes())for(;a.lastChild;)a.removeChild(a.lastChild);h(a,this.startContainer,this.startOffset),a.appendChild(b),this.selectNode(a)},cloneRange:function(){z(this);for(var a,b=new I(d(this)),c=ja.length;c--;)a=ja[c],b[a]=this[a];return b},toString:function(){z(this);var a=this.startContainer;if(a===this.endContainer&&N(a))return 3==a.nodeType||4==a.nodeType?a.data.slice(this.startOffset,this.endOffset):"";var b=[],c=new p(this,!0);return k(c,function(a){(3==a.nodeType||4==a.nodeType)&&b.push(a.data)}),c.detach(),b.join("")},compareNode:function(a){z(this);var b=a.parentNode,c=O(a);if(!b)throw new M("NOT_FOUND_ERR");var d=this.comparePoint(b,c),e=this.comparePoint(b,c+1);return 0>d?e>0?qa:oa:e>0?pa:ra},comparePoint:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)<0?-1:R(a,b,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:ia,toHtml:function(){return B(this)},intersectsNode:function(a,b){if(z(this),W(a)!=e(this))return!1;var c=a.parentNode,d=O(a);if(!c)return!0;var f=R(c,d,this.endContainer,this.endOffset),g=R(c,d+1,this.startContainer,this.startOffset);return b?0>=f&&g>=0:0>f&&g>0},isPointInRange:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)>=0&&R(a,b,this.endContainer,this.endOffset)<=0},intersectsRange:function(a){return i(this,a,!1)},intersectsOrTouchesRange:function(a){return i(this,a,!0)},intersection:function(a){if(this.intersectsRange(a)){var b=R(this.startContainer,this.startOffset,a.startContainer,a.startOffset),c=R(this.endContainer,this.endOffset,a.endContainer,a.endOffset),d=this.cloneRange();return-1==b&&d.setStart(a.startContainer,a.startOffset),1==c&&d.setEnd(a.endContainer,a.endOffset),d}return null},union:function(a){if(this.intersectsOrTouchesRange(a)){var b=this.cloneRange();return-1==R(a.startContainer,a.startOffset,this.startContainer,this.startOffset)&&b.setStart(a.startContainer,a.startOffset),1==R(a.endContainer,a.endOffset,this.endContainer,this.endOffset)&&b.setEnd(a.endContainer,a.endOffset),b}throw new M("Ranges do not intersect")},containsNode:function(a,b){return b?this.intersectsNode(a,!1):this.compareNode(a)==ra},containsNodeContents:function(a){return this.comparePoint(a,0)>=0&&this.comparePoint(a,U(a))<=0},containsRange:function(a){var b=this.intersection(a);return null!==b&&a.equals(b)},containsNodeText:function(a){var b=this.cloneRange();b.selectNode(a);var c=b.getNodes([3]);if(c.length>0){b.setStart(c[0],0);var d=c.pop();return b.setEnd(d,d.length),this.containsRange(b)}return this.containsNodeContents(a)},getNodes:function(a,b){return z(this),n(this,a,b)},getDocument:function(){return d(this)},collapseBefore:function(a){this.setEndBefore(a),this.collapse(!1)},collapseAfter:function(a){this.setStartAfter(a),this.collapse(!0)},getBookmark:function(b){var c=d(this),e=a.createRange(c);b=b||J.getBody(c),e.selectNodeContents(b);var f=this.intersection(e),g=0,h=0;return f&&(e.setEnd(f.startContainer,f.startOffset),g=e.toString().length,h=g+f.toString().length),{start:g,end:h,containerNode:b}},moveToBookmark:function(a){var b=a.containerNode,c=0;this.setStart(b,0),
-this.collapse(!0);for(var d,e,f,g,h=[b],i=!1,j=!1;!j&&(d=h.pop());)if(3==d.nodeType)e=c+d.length,!i&&a.start>=c&&a.start<=e&&(this.setStart(d,a.start-c),i=!0),i&&a.end>=c&&a.end<=e&&(this.setEnd(d,a.end-c),j=!0),c=e;else for(g=d.childNodes,f=g.length;f--;)h.push(g[f])},getName:function(){return"DomRange"},equals:function(a){return I.rangesEqual(this,a)},isValid:function(){return y(this)},inspect:function(){return o(this)},detach:function(){}}),F(I,H),K.extend(I,{rangeProperties:ja,RangeIterator:p,copyComparisonConstants:D,createPrototypeRange:F,inspect:o,toHtml:B,getRangeDocument:d,rangesEqual:function(a,b){return a.startContainer===b.startContainer&&a.startOffset===b.startOffset&&a.endContainer===b.endContainer&&a.endOffset===b.endOffset}}),a.DomRange=I}),H.createCoreModule("WrappedRange",["DomRange"],function(a,b){var c,d,e=a.dom,f=a.util,g=e.DomPosition,h=a.DomRange,i=e.getBody,j=e.getContentDocument,k=e.isCharacterDataNode;if(a.features.implementsDomRange&&!function(){function d(a){for(var b,c=m.length;c--;)b=m[c],a[b]=a.nativeRange[b];a.collapsed=a.startContainer===a.endContainer&&a.startOffset===a.endOffset}function g(a,b,c,d,e){var f=a.startContainer!==b||a.startOffset!=c,g=a.endContainer!==d||a.endOffset!=e,h=!a.equals(a.nativeRange);(f||g||h)&&(a.setEnd(d,e),a.setStart(b,c))}var k,l,m=h.rangeProperties;c=function(a){if(!a)throw b.createError("WrappedRange: Range must be specified");this.nativeRange=a,d(this)},h.createPrototypeRange(c,g),k=c.prototype,k.selectNode=function(a){this.nativeRange.selectNode(a),d(this)},k.cloneContents=function(){return this.nativeRange.cloneContents()},k.surroundContents=function(a){this.nativeRange.surroundContents(a),d(this)},k.collapse=function(a){this.nativeRange.collapse(a),d(this)},k.cloneRange=function(){return new c(this.nativeRange.cloneRange())},k.refresh=function(){d(this)},k.toString=function(){return this.nativeRange.toString()};var n=document.createTextNode("test");i(document).appendChild(n);var o=document.createRange();o.setStart(n,0),o.setEnd(n,0);try{o.setStart(n,1),k.setStart=function(a,b){this.nativeRange.setStart(a,b),d(this)},k.setEnd=function(a,b){this.nativeRange.setEnd(a,b),d(this)},l=function(a){return function(b){this.nativeRange[a](b),d(this)}}}catch(p){k.setStart=function(a,b){try{this.nativeRange.setStart(a,b)}catch(c){this.nativeRange.setEnd(a,b),this.nativeRange.setStart(a,b)}d(this)},k.setEnd=function(a,b){try{this.nativeRange.setEnd(a,b)}catch(c){this.nativeRange.setStart(a,b),this.nativeRange.setEnd(a,b)}d(this)},l=function(a,b){return function(c){try{this.nativeRange[a](c)}catch(e){this.nativeRange[b](c),this.nativeRange[a](c)}d(this)}}}k.setStartBefore=l("setStartBefore","setEndBefore"),k.setStartAfter=l("setStartAfter","setEndAfter"),k.setEndBefore=l("setEndBefore","setStartBefore"),k.setEndAfter=l("setEndAfter","setStartAfter"),k.selectNodeContents=function(a){this.setStartAndEnd(a,0,e.getNodeLength(a))},o.selectNodeContents(n),o.setEnd(n,3);var q=document.createRange();q.selectNodeContents(n),q.setEnd(n,4),q.setStart(n,2),-1==o.compareBoundaryPoints(o.START_TO_END,q)&&1==o.compareBoundaryPoints(o.END_TO_START,q)?k.compareBoundaryPoints=function(a,b){return b=b.nativeRange||b,a==b.START_TO_END?a=b.END_TO_START:a==b.END_TO_START&&(a=b.START_TO_END),this.nativeRange.compareBoundaryPoints(a,b)}:k.compareBoundaryPoints=function(a,b){return this.nativeRange.compareBoundaryPoints(a,b.nativeRange||b)};var r=document.createElement("div");r.innerHTML="123";var s=r.firstChild,t=i(document);t.appendChild(r),o.setStart(s,1),o.setEnd(s,2),o.deleteContents(),"13"==s.data&&(k.deleteContents=function(){this.nativeRange.deleteContents(),d(this)},k.extractContents=function(){var a=this.nativeRange.extractContents();return d(this),a}),t.removeChild(r),t=null,f.isHostMethod(o,"createContextualFragment")&&(k.createContextualFragment=function(a){return this.nativeRange.createContextualFragment(a)}),i(document).removeChild(n),k.getName=function(){return"WrappedRange"},a.WrappedRange=c,a.createNativeRange=function(a){return a=j(a,b,"createNativeRange"),a.createRange()}}(),a.features.implementsTextRange){var l=function(a){var b=a.parentElement(),c=a.duplicate();c.collapse(!0);var d=c.parentElement();c=a.duplicate(),c.collapse(!1);var f=c.parentElement(),g=d==f?d:e.getCommonAncestor(d,f);return g==b?g:e.getCommonAncestor(b,g)},m=function(a){return 0==a.compareEndPoints("StartToEnd",a)},n=function(a,b,c,d,f){var h=a.duplicate();h.collapse(c);var i=h.parentElement();if(e.isOrIsAncestorOf(b,i)||(i=b),!i.canHaveHTML){var j=new g(i.parentNode,e.getNodeIndex(i));return{boundaryPosition:j,nodeInfo:{nodeIndex:j.offset,containerElement:j.node}}}var l=e.getDocument(i).createElement("span");l.parentNode&&e.removeNode(l);for(var m,n,o,p,q,r=c?"StartToStart":"StartToEnd",s=f&&f.containerElement==i?f.nodeIndex:0,t=i.childNodes.length,u=t,v=u;;){if(v==t?i.appendChild(l):i.insertBefore(l,i.childNodes[v]),h.moveToElementText(l),m=h.compareEndPoints(r,a),0==m||s==u)break;if(-1==m){if(u==s+1)break;s=v}else u=u==s+1?s:v;v=Math.floor((s+u)/2),i.removeChild(l)}if(q=l.nextSibling,-1==m&&q&&k(q)){h.setEndPoint(c?"EndToStart":"EndToEnd",a);var w;if(/[\r\n]/.test(q.data)){var x=h.duplicate(),y=x.text.replace(/\r\n/g,"\r").length;for(w=x.moveStart("character",y);-1==(m=x.compareEndPoints("StartToEnd",x));)w++,x.moveStart("character",1)}else w=h.text.length;p=new g(q,w)}else n=(d||!c)&&l.previousSibling,o=(d||c)&&l.nextSibling,p=o&&k(o)?new g(o,0):n&&k(n)?new g(n,n.data.length):new g(i,e.getNodeIndex(l));return e.removeNode(l),{boundaryPosition:p,nodeInfo:{nodeIndex:v,containerElement:i}}},o=function(a,b){var c,d,f,g,h=a.offset,j=e.getDocument(a.node),l=i(j).createTextRange(),m=k(a.node);return m?(c=a.node,d=c.parentNode):(g=a.node.childNodes,c=hb;++b)if(!C.isAncestorOf(a[0],a[b]))return!1;return!0}function m(a){var c=a.getNodes();if(!l(c))throw b.createError("getSingleElementFromRange: range "+a.inspect()+" did not consist of a single element");return c[0]}function n(a){return!!a&&"undefined"!=typeof a.text}function o(a,b){var c=new G(b);a._ranges=[c],h(a,c,!1),a.rangeCount=1,a.isCollapsed=c.collapsed}function p(b){if(b._ranges.length=0,"None"==b.docSelection.type)j(b);else{var c=b.docSelection.createRange();if(n(c))o(b,c);else{b.rangeCount=c.length;for(var d,e=L(c.item(0)),f=0;fh;++h)g.add(d.item(h));try{g.add(e)}catch(j){throw b.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}g.select(),p(a)}function r(a,b,c){this.nativeSelection=a,this.docSelection=b,this._ranges=[],this.win=c,this.refresh()}function s(a){a.win=a.anchorNode=a.focusNode=a._ranges=null,a.rangeCount=a.anchorOffset=a.focusOffset=0,a.detached=!0}function t(a,b){for(var c,d,e=ba.length;e--;)if(c=ba[e],d=c.selection,"deleteAll"==b)s(d);else if(c.win==a)return"delete"==b?(ba.splice(e,1),!0):d;return"deleteAll"==b&&(ba.length=0),null}function u(a,c){for(var d,e=L(c[0].startContainer),f=M(e).createControlRange(),g=0,h=c.length;h>g;++g){d=m(c[g]);try{f.add(d)}catch(i){throw b.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}f.select(),p(a)}function v(a,b){if(a.win.document!=L(b))throw new H("WRONG_DOCUMENT_ERR")}function w(b){return function(c,d){var e;this.rangeCount?(e=this.getRangeAt(0),e["set"+(b?"Start":"End")](c,d)):(e=a.createRange(this.win.document),e.setStartAndEnd(c,d)),this.setSingleRange(e,this.isBackward())}}function x(a){var b=[],c=new I(a.anchorNode,a.anchorOffset),d=new I(a.focusNode,a.focusOffset),e="function"==typeof a.getName?a.getName():"Selection";if("undefined"!=typeof a.rangeCount)for(var f=0,g=a.rangeCount;g>f;++f)b[f]=F.inspect(a.getRangeAt(f));return"["+e+"(Ranges: "+b.join(", ")+")(anchor: "+c.inspect()+", focus: "+d.inspect()+"]"}a.config.checkSelectionRanges=!0;var y,z,A="boolean",B="number",C=a.dom,D=a.util,E=D.isHostMethod,F=a.DomRange,G=a.WrappedRange,H=a.DOMException,I=C.DomPosition,J=a.features,K="Control",L=C.getDocument,M=C.getBody,N=F.rangesEqual,O=E(window,"getSelection"),P=D.isHostObject(document,"selection");J.implementsWinGetSelection=O,J.implementsDocSelection=P;var Q=P&&(!O||a.config.preferTextRange);if(Q)y=f,a.isSelectionValid=function(a){var b=d(a,"isSelectionValid").document,c=b.selection;return"None"!=c.type||L(c.createRange().parentElement())==b};else{if(!O)return b.fail("Neither document.selection or window.getSelection() detected."),!1;y=e,a.isSelectionValid=function(){return!0}}a.getNativeSelection=y;var R=y();if(!R)return b.fail("Native selection was null (possibly issue 138?)"),!1;var S=a.createNativeRange(document),T=M(document),U=D.areHostProperties(R,["anchorNode","focusNode","anchorOffset","focusOffset"]);J.selectionHasAnchorAndFocus=U;var V=E(R,"extend");J.selectionHasExtend=V;var W=typeof R.rangeCount==B;J.selectionHasRangeCount=W;var X=!1,Y=!0,Z=V?function(b,c){var d=F.getRangeDocument(c),e=a.createRange(d);e.collapseToPoint(c.endContainer,c.endOffset),b.addRange(k(e)),b.extend(c.startContainer,c.startOffset)}:null;D.areHostMethods(R,["addRange","getRangeAt","removeAllRanges"])&&typeof R.rangeCount==B&&J.implementsDomRange&&!function(){var b=window.getSelection();if(b){for(var c=b.rangeCount,d=c>1,e=[],f=g(b),h=0;c>h;++h)e[h]=b.getRangeAt(h);var i=C.createTestElement(document,"",!1),j=i.appendChild(document.createTextNode(" ")),k=document.createRange();if(k.setStart(j,1),k.collapse(!0),b.removeAllRanges(),b.addRange(k),Y=1==b.rangeCount,b.removeAllRanges(),!d){var l=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(l&&parseInt(l[1])>=36)X=!1;else{var m=k.cloneRange();k.setStart(j,0),m.setEnd(j,3),m.setStart(j,2),b.addRange(k),b.addRange(m),X=2==b.rangeCount}}for(C.removeNode(i),b.removeAllRanges(),h=0;c>h;++h)0==h&&f?Z?Z(b,e[h]):(a.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),b.addRange(e[h])):b.addRange(e[h])}}(),J.selectionSupportsMultipleRanges=X,J.collapsedNonEditableSelectionsSupported=Y;var $,_=!1;T&&E(T,"createControlRange")&&($=T.createControlRange(),D.areHostProperties($,["item","add"])&&(_=!0)),J.implementsControlRange=_,z=U?function(a){return a.anchorNode===a.focusNode&&a.anchorOffset===a.focusOffset}:function(a){return a.rangeCount?a.getRangeAt(a.rangeCount-1).collapsed:!1};var aa;E(R,"getRangeAt")?aa=function(a,b){try{return a.getRangeAt(b)}catch(c){return null}}:U&&(aa=function(b){var c=L(b.anchorNode),d=a.createRange(c);return d.setStartAndEnd(b.anchorNode,b.anchorOffset,b.focusNode,b.focusOffset),d.collapsed!==this.isCollapsed&&d.setStartAndEnd(b.focusNode,b.focusOffset,b.anchorNode,b.anchorOffset),d}),r.prototype=a.selectionPrototype;var ba=[],ca=function(a){if(a&&a instanceof r)return a.refresh(),a;a=d(a,"getNativeSelection");var b=t(a),c=y(a),e=P?f(a):null;return b?(b.nativeSelection=c,b.docSelection=e,b.refresh()):(b=new r(c,e,a),ba.push({win:a,selection:b})),b};a.getSelection=ca,D.createAliasForDeprecatedMethod(a,"getIframeSelection","getSelection");var da=r.prototype;if(!Q&&U&&D.areHostMethods(R,["removeAllRanges","addRange"])){da.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),j(this)};var ea=function(a,b){Z(a.nativeSelection,b),a.refresh()};W?da.addRange=function(b,d){if(_&&P&&this.docSelection.type==K)q(this,b);else if(c(d)&&V)ea(this,b);else{var e;X?e=this.rangeCount:(this.removeAllRanges(),e=0);var f=k(b).cloneRange();try{this.nativeSelection.addRange(f)}catch(g){}if(this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==e+1){if(a.config.checkSelectionRanges){var i=aa(this.nativeSelection,this.rangeCount-1);i&&!N(i,b)&&(b=new G(i))}this._ranges[this.rangeCount-1]=b,h(this,b,ha(this.nativeSelection)),this.isCollapsed=z(this)}else this.refresh()}}:da.addRange=function(a,b){c(b)&&V?ea(this,a):(this.nativeSelection.addRange(k(a)),this.refresh())},da.setRanges=function(a){if(_&&P&&a.length>1)u(this,a);else{this.removeAllRanges();for(var b=0,c=a.length;c>b;++b)this.addRange(a[b])}}}else{if(!(E(R,"empty")&&E(S,"select")&&_&&Q))return b.fail("No means of selecting a Range or TextRange was found"),!1;da.removeAllRanges=function(){try{if(this.docSelection.empty(),"None"!=this.docSelection.type){var a;if(this.anchorNode)a=L(this.anchorNode);else if(this.docSelection.type==K){var b=this.docSelection.createRange();b.length&&(a=L(b.item(0)))}if(a){var c=M(a).createTextRange();c.select(),this.docSelection.empty()}}}catch(d){}j(this)},da.addRange=function(b){this.docSelection.type==K?q(this,b):(a.WrappedTextRange.rangeToTextRange(b).select(),this._ranges[0]=b,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,h(this,b,!1))},da.setRanges=function(a){this.removeAllRanges();var b=a.length;b>1?u(this,a):b&&this.addRange(a[0])}}da.getRangeAt=function(a){if(0>a||a>=this.rangeCount)throw new H("INDEX_SIZE_ERR");return this._ranges[a].cloneRange()};var fa;if(Q)fa=function(b){var c;a.isSelectionValid(b.win)?c=b.docSelection.createRange():(c=M(b.win.document).createTextRange(),c.collapse(!0)),b.docSelection.type==K?p(b):n(c)?o(b,c):j(b)};else if(E(R,"getRangeAt")&&typeof R.rangeCount==B)fa=function(b){if(_&&P&&b.docSelection.type==K)p(b);else if(b._ranges.length=b.rangeCount=b.nativeSelection.rangeCount,b.rangeCount){for(var c=0,d=b.rangeCount;d>c;++c)b._ranges[c]=new a.WrappedRange(b.nativeSelection.getRangeAt(c));h(b,b._ranges[b.rangeCount-1],ha(b.nativeSelection)),b.isCollapsed=z(b)}else j(b)};else{if(!U||typeof R.isCollapsed!=A||typeof S.collapsed!=A||!J.implementsDomRange)return b.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;fa=function(a){var b,c=a.nativeSelection;c.anchorNode?(b=aa(c,0),a._ranges=[b],a.rangeCount=1,i(a),a.isCollapsed=z(a)):j(a)}}da.refresh=function(a){var b=a?this._ranges.slice(0):null,c=this.anchorNode,d=this.anchorOffset;if(fa(this),a){var e=b.length;if(e!=this._ranges.length)return!0;if(this.anchorNode!=c||this.anchorOffset!=d)return!0;for(;e--;)if(!N(b[e],this._ranges[e]))return!0;return!1}};var ga=function(a,b){var c=a.getAllRanges();a.removeAllRanges();for(var d=0,e=c.length;e>d;++d)N(b,c[d])||a.addRange(c[d]);a.rangeCount||j(a)};_&&P?da.removeRange=function(a){if(this.docSelection.type==K){for(var b,c=this.docSelection.createRange(),d=m(a),e=L(c.item(0)),f=M(e).createControlRange(),g=!1,h=0,i=c.length;i>h;++h)b=c.item(h),b!==d||g?f.add(c.item(h)):g=!0;f.select(),p(this)}else ga(this,a)}:da.removeRange=function(a){ga(this,a)};var ha;!Q&&U&&J.implementsDomRange?(ha=g,da.isBackward=function(){return ha(this)}):ha=da.isBackward=function(){return!1},da.isBackwards=da.isBackward,da.toString=function(){for(var a=[],b=0,c=this.rangeCount;c>b;++b)a[b]=""+this._ranges[b];return a.join("")},da.collapse=function(b,c){v(this,b);var d=a.createRange(b);d.collapseToPoint(b,c),this.setSingleRange(d),this.isCollapsed=!0},da.collapseToStart=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[0];this.collapse(a.startContainer,a.startOffset)},da.collapseToEnd=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[this.rangeCount-1];this.collapse(a.endContainer,a.endOffset)},da.selectAllChildren=function(b){v(this,b);var c=a.createRange(b);c.selectNodeContents(b),this.setSingleRange(c)},da.deleteFromDocument=function(){if(_&&P&&this.docSelection.type==K){for(var a,b=this.docSelection.createRange();b.length;)a=b.item(0),b.remove(a),C.removeNode(a);this.refresh()}else if(this.rangeCount){var c=this.getAllRanges();if(c.length){this.removeAllRanges();for(var d=0,e=c.length;e>d;++d)c[d].deleteContents();this.addRange(c[e-1])}}},da.eachRange=function(a,b){for(var c=0,d=this._ranges.length;d>c;++c)if(a(this.getRangeAt(c)))return b},da.getAllRanges=function(){var a=[];return this.eachRange(function(b){a.push(b)}),a},da.setSingleRange=function(a,b){this.removeAllRanges(),this.addRange(a,b)},da.callMethodOnEachRange=function(a,b){var c=[];return this.eachRange(function(d){c.push(d[a].apply(d,b||[]))}),c},da.setStart=w(!0),da.setEnd=w(!1),a.rangePrototype.select=function(a){ca(this.getDocument()).setSingleRange(this,a)},da.changeEachRange=function(a){var b=[],c=this.isBackward();this.eachRange(function(c){a(c),b.push(c)}),this.removeAllRanges(),c&&1==b.length?this.addRange(b[0],"backward"):this.setRanges(b)},da.containsNode=function(a,b){return this.eachRange(function(c){return c.containsNode(a,b)},!0)||!1},da.getBookmark=function(a){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[a])}},da.moveToBookmark=function(b){for(var c,d,e=[],f=0;c=b.rangeBookmarks[f++];)d=a.createRange(this.win),d.moveToBookmark(c),e.push(d);b.backward?this.setSingleRange(e[0],"backward"):this.setRanges(e)},da.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},da.restoreRanges=function(a){this.removeAllRanges();for(var b,c=0;b=a.ranges[c];++c)this.addRange(b,a.backward&&0==c)},da.toHtml=function(){var a=[];return this.eachRange(function(b){a.push(F.toHtml(b))}),a.join("")},J.implementsTextRange&&(da.getNativeTextRange=function(){var c;if(c=this.docSelection){var d=c.createRange();if(n(d))return d;throw b.createError("getNativeTextRange: selection is a control selection")}if(this.rangeCount>0)return a.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw b.createError("getNativeTextRange: selection contains no range")}),da.getName=function(){return"WrappedSelection"},da.inspect=function(){return x(this)},da.detach=function(){t(this.win,"delete"),s(this)},r.detachAll=function(){t(null,"deleteAll")},r.inspect=x,r.isDirectionBackward=c,a.Selection=r,a.selectionPrototype=da,a.addShimListener(function(a){"undefined"==typeof a.getSelection&&(a.getSelection=function(){return ca(a)}),a=null})});var M=!1,N=function(a){M||(M=!0,!H.initialized&&H.config.autoInitialize&&l())};return F&&("complete"==document.readyState?N():(a(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",N,!1),J(window,"load",N))),H},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("SaveRestore",["WrappedRange"],function(a,b){function c(a,b){return(b||document).getElementById(a)}function d(a,b){var c,d="selectionBoundary_"+ +new Date+"_"+(""+Math.random()).slice(2),e=o.getDocument(a.startContainer),f=a.cloneRange();return f.collapse(b),c=e.createElement("span"),c.id=d,c.style.lineHeight="0",c.style.display="none",c.className="rangySelectionBoundary",c.appendChild(e.createTextNode(r)),f.insertNode(c),c}function e(a,d,e,f){var g=c(e,a);g?(d[f?"setStartBefore":"setEndBefore"](g),p(g)):b.warn("Marker element has been removed. Cannot restore selection.")}function f(a,b){return b.compareBoundaryPoints(a.START_TO_START,a)}function g(b,c){var e,f,g=a.DomRange.getRangeDocument(b),h=b.toString(),i=q(c);return b.collapsed?(f=d(b,!1),{document:g,markerId:f.id,collapsed:!0}):(f=d(b,!1),e=d(b,!0),{document:g,startMarkerId:e.id,endMarkerId:f.id,collapsed:!1,backward:i,toString:function(){return"original text: '"+h+"', new text: '"+b.toString()+"'"}})}function h(d,f){var g=d.document;"undefined"==typeof f&&(f=!0);var h=a.createRange(g);if(d.collapsed){var i=c(d.markerId,g);if(i){i.style.display="inline";var j=i.previousSibling;j&&3==j.nodeType?(p(i),h.collapseToPoint(j,j.length)):(h.collapseBefore(i),p(i))}else b.warn("Marker element has been removed. Cannot restore selection.")}else e(g,h,d.startMarkerId,!0),e(g,h,d.endMarkerId,!1);return f&&h.normalizeBoundaries(),h}function i(b,d){var e,h,i=[],j=q(d);b=b.slice(0),b.sort(f);for(var k=0,l=b.length;l>k;++k)i[k]=g(b[k],j);for(k=l-1;k>=0;--k)e=b[k],h=a.DomRange.getRangeDocument(e),e.collapsed?e.collapseAfter(c(i[k].markerId,h)):(e.setEndBefore(c(i[k].endMarkerId,h)),e.setStartAfter(c(i[k].startMarkerId,h)));return i}function j(c){if(!a.isSelectionValid(c))return b.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus."),null;var d=a.getSelection(c),e=d.getAllRanges(),f=1==e.length&&d.isBackward(),g=i(e,f);return f?d.setSingleRange(e[0],f):d.setRanges(e),{win:c,rangeInfos:g,restored:!1}}function k(a){for(var b=[],c=a.length,d=c-1;d>=0;d--)b[d]=h(a[d],!0);return b}function l(b,c){if(!b.restored){var d=b.rangeInfos,e=a.getSelection(b.win),f=k(d),g=d.length;1==g&&c&&a.features.selectionHasExtend&&d[0].backward?(e.removeAllRanges(),e.addRange(f[0],!0)):e.setRanges(f),b.restored=!0}}function m(a,b){var d=c(b,a);d&&p(d)}function n(a){for(var b,c=a.rangeInfos,d=0,e=c.length;e>d;++d)b=c[d],b.collapsed?m(a.doc,b.markerId):(m(a.doc,b.startMarkerId),m(a.doc,b.endMarkerId))}var o=a.dom,p=o.removeNode,q=a.Selection.isDirectionBackward,r="\ufeff";a.util.extend(a,{saveRange:g,restoreRange:h,saveRanges:i,restoreRanges:k,saveSelection:j,restoreSelection:l,removeMarkerElement:m,removeMarkers:n})}),a},this);var Base=function(){};Base.extend=function(a,b){var c=Base.prototype.extend;Base._prototyping=!0;var d=new this;c.call(d,a),d.base=function(){},delete Base._prototyping;var e=d.constructor,f=d.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==f)this._constructing=!0,e.apply(this,arguments),delete this._constructing;else if(null!=arguments[0])return(arguments[0].extend||c).call(arguments[0],d)};return f.ancestor=this,f.extend=this.extend,f.forEach=this.forEach,f.implement=this.implement,f.prototype=d,f.toString=this.toString,f.valueOf=function(a){return"object"==a?f:e.valueOf()},c.call(f,b),"function"==typeof f.init&&f.init(),f},Base.prototype={extend:function(a,b){if(arguments.length>1){var c=this[a];if(c&&"function"==typeof b&&(!c.valueOf||c.valueOf()!=b.valueOf())&&/\bbase\b/.test(b)){var d=b.valueOf();b=function(){var a=this.base||Base.prototype.base;this.base=c;var b=d.apply(this,arguments);return this.base=a,b},b.valueOf=function(a){return"object"==a?b:d},b.toString=Base.toString}this[a]=b}else if(a){var e=Base.prototype.extend;Base._prototyping||"function"==typeof this||(e=this.extend||e);for(var f={toSource:null},g=["constructor","toString","valueOf"],h=Base._prototyping?0:1;i=g[h++];)a[i]!=f[i]&&e.call(this,i,a[i]);for(var i in a)f[i]||e.call(this,i,a[i])}return this}},Base=Base.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(a,b,c){for(var d in a)void 0===this.prototype[d]&&b.call(c,a[d],d,a)},implement:function(){for(var a=0;aa:">"===b?a>d:"<="===b?d>=a:">="===b?a>=d:void 0:a===d:!0}var d=navigator.userAgent,e=document.createElement("div"),f=-1!==d.indexOf("Gecko")&&-1===d.indexOf("KHTML"),g=-1!==d.indexOf("AppleWebKit/"),h=-1!==d.indexOf("Chrome/"),i=-1!==d.indexOf("Opera/");return{USER_AGENT:d,supported:function(){var c=this.USER_AGENT.toLowerCase(),d="contentEditable"in e,f=document.execCommand&&document.queryCommandSupported&&document.queryCommandState,g=document.querySelector&&document.querySelectorAll,h=this.isIos()&&a(c)<5||this.isAndroid()&&b(c)<4||-1!==c.indexOf("opera mobi")||-1!==c.indexOf("hpwos/");return d&&f&&g&&!h},isTouchDevice:function(){return this.supportsEvent("touchmove")},isIos:function(){return/ipad|iphone|ipod/i.test(this.USER_AGENT)},isAndroid:function(){return-1!==this.USER_AGENT.indexOf("Android")},supportsSandboxedIframes:function(){return c()},throwsMixedContentWarningWhenIframeSrcIsEmpty:function(){return!("querySelector"in document)},displaysCaretInEmptyContentEditableCorrectly:function(){return c()},hasCurrentStyleProperty:function(){return"currentStyle"in e},insertsLineBreaksOnReturn:function(){return f},supportsPlaceholderAttributeOn:function(a){return"placeholder"in a},supportsEvent:function(a){return"on"+a in e||function(){return e.setAttribute("on"+a,"return;"),"function"==typeof e["on"+a]}()},supportsEventsInIframeCorrectly:function(){return!i},supportsHTML5Tags:function(a){var b=a.createElement("div"),c="foo";return b.innerHTML=c,b.innerHTML.toLowerCase()===c},supportsCommand:function(){var a={formatBlock:c(10,"<="),insertUnorderedList:c(9,">="),insertOrderedList:c(9,">=")},b={insertHTML:f};return function(c,d){var e=a[d];if(!e){try{return c.queryCommandSupported(d)}catch(f){}try{return c.queryCommandEnabled(d)}catch(g){return!!b[d]}}return!1}}(),doesAutoLinkingInContentEditable:function(){return c()},canDisableAutoLinking:function(){return this.supportsCommand(document,"AutoUrlDetect")},clearsContentEditableCorrectly:function(){return f||i||g},supportsGetAttributeCorrectly:function(){var a=document.createElement("td");return"1"!=a.getAttribute("rowspan")},canSelectImagesInContentEditable:function(){return f||c()||i},autoScrollsToCaret:function(){return!g},autoClosesUnclosedTags:function(){var a,b,c=e.cloneNode(!1);return c.innerHTML="",b=c.innerHTML.toLowerCase(),a=""===b||"
"===b,this.autoClosesUnclosedTags=function(){return a},a},supportsNativeGetElementsByClassName:function(){return-1!==String(document.getElementsByClassName).indexOf("[native code]")},supportsSelectionModify:function(){return"getSelection"in window&&"modify"in window.getSelection()},needsSpaceAfterLineBreak:function(){return i},supportsSpeechApiOn:function(a){var b=d.match(/Chrome\/(\d+)/)||[void 0,0];return b[1]>=11&&("onwebkitspeechchange"in a||"speech"in a)},crashesWhenDefineProperty:function(a){return c(9)&&("XMLHttpRequest"===a||"XDomainRequest"===a)},doesAsyncFocus:function(){return c()},hasProblemsSettingCaretAfterImg:function(){return c()},hasUndoInContextMenu:function(){return f||h||i},hasInsertNodeIssue:function(){return i},hasIframeFocusIssue:function(){return c()},createsNestedInvalidMarkupAfterPaste:function(){return g},supportsMutationEvents:function(){return"MutationEvent"in window},supportsModernPaste:function(){return!("clipboardData"in window)},fixStyleKey:function(a){return"cssFloat"===a?"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat":a}}}(),wysihtml5.lang.array=function(a){return{contains:function(b){if(Array.isArray(b)){for(var c=b.length;c--;)if(-1!==wysihtml5.lang.array(a).indexOf(b[c]))return!0;return!1}return-1!==wysihtml5.lang.array(a).indexOf(b)},indexOf:function(b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},without:function(b){b=wysihtml5.lang.array(b);for(var c=[],d=0,e=a.length;e>d;d++)b.contains(a[d])||c.push(a[d]);return c},get:function(){for(var b=0,c=a.length,d=[];c>b;b++)d.push(a[b]);return d},map:function(b,c){if(Array.prototype.map)return a.map(b,c);for(var d=a.length>>>0,e=new Array(d),f=0;d>f;f++)e[f]=b.call(c,a[f],f,a);return e},unique:function(){for(var b=[],c=a.length,d=0;c>d;)wysihtml5.lang.array(b).contains(a[d])||b.push(a[d]),d++;return b}}},wysihtml5.lang.Dispatcher=Base.extend({on:function(a,b){return this.events=this.events||{},this.events[a]=this.events[a]||[],this.events[a].push(b),this},off:function(a,b){this.events=this.events||{};var c,d,e=0;if(a){for(c=this.events[a]||[],d=[];e\t"]/g,d={"&":"&","<":"<",">":">",'"':"""," ":" "};wysihtml5.lang.string=function(e){return e=String(e),{trim:function(){return e.replace(a,"").replace(b,"")},interpolate:function(a){for(var b in a)e=this.replace("#{"+b+"}").by(a[b]);return e},replace:function(a){return{by:function(b){return e.split(a).join(b)}}},escapeHTML:function(a,b){var f=e.replace(c,function(a){return d[a]});return a&&(f=f.replace(/(?:\r\n|\r|\n)/g,"
")),b&&(f=f.replace(/ /gi," ")),f}}}}(),function(a){function b(a,b){return f(a,b)?a:(a===a.ownerDocument.documentElement&&(a=a.ownerDocument.body),g(a,b))}function c(a){return a.replace(i,function(a,b){var c=(b.match(j)||[])[1]||"",d=l[c];b=b.replace(j,""),b.split(d).length>b.split(c).length&&(b+=c,c="");var e=b,f=b;return b.length>k&&(f=f.substr(0,k)+"..."),"www."===e.substr(0,4)&&(e="http://"+e),''+f+""+c})}function d(a){var b=a._wysihtml5_tempElement;return b||(b=a._wysihtml5_tempElement=a.createElement("div")),b}function e(b){var e=b.parentNode,f=a.lang.string(b.data).escapeHTML(),g=d(e.ownerDocument);for(g.innerHTML=""+c(f),g.removeChild(g.firstChild);g.firstChild;)e.insertBefore(g.firstChild,b);e.removeChild(b)}function f(b,c){for(var d;b.parentNode;){if(b=b.parentNode,d=b.nodeName,b.className&&a.lang.array(b.className.split(" ")).contains(c))return!0;if(h.contains(d))return!0;if("body"===d)return!1}return!1}function g(b,c){if(!(h.contains(b.nodeName)||b.className&&a.lang.array(b.className.split(" ")).contains(c))){if(b.nodeType===a.TEXT_NODE&&b.data.match(i))return void e(b);for(var d=a.lang.array(b.childNodes).get(),f=d.length,j=0;f>j;j++)g(d[j],c);return b}}var h=a.lang.array(["CODE","PRE","A","SCRIPT","HEAD","TITLE","STYLE"]),i=/((https?:\/\/|www\.)[^\s<]{3,})/gi,j=/([^\w\/\-](,?))$/i,k=100,l={")":"(","]":"[","}":"{"};a.dom.autoLink=b,a.dom.autoLink.URL_REG_EXP=i}(wysihtml5),function(a){var b=a.dom;b.addClass=function(a,c){var d=a.classList;return d?d.add(c):void(b.hasClass(a,c)||(a.className+=" "+c))},b.removeClass=function(a,b){var c=a.classList;return c?c.remove(b):void(a.className=a.className.replace(new RegExp("(^|\\s+)"+b+"(\\s+|$)")," "))},b.hasClass=function(a,b){var c=a.classList;if(c)return c.contains(b);var d=a.className;return d.length>0&&(d==b||new RegExp("(^|\\s)"+b+"(\\s|$)").test(d))}}(wysihtml5),wysihtml5.dom.contains=function(){var a=document.documentElement;return a.contains?function(a,b){if(b.nodeType!==wysihtml5.ELEMENT_NODE){if(b.parentNode===a)return!0;b=b.parentNode}return a!==b&&a.contains(b)}:a.compareDocumentPosition?function(a,b){return!!(16&a.compareDocumentPosition(b))}:void 0}(),wysihtml5.dom.convertToList=function(){function a(a,b){var c=a.createElement("li");return b.appendChild(c),c}function b(a,b){return a.createElement(b)}function c(c,d,e){if("UL"===c.nodeName||"OL"===c.nodeName||"MENU"===c.nodeName)return c;var f,g,h,i,j,k,l,m,n,o=c.ownerDocument,p=b(o,d),q=c.querySelectorAll("br"),r=q.length;for(n=0;r>n;n++)for(i=q[n];(j=i.parentNode)&&j!==c&&j.lastChild===i;){if("block"===wysihtml5.dom.getStyle("display").from(j)){j.removeChild(i);break}wysihtml5.dom.insert(i).after(i.parentNode)}for(f=wysihtml5.lang.array(c.childNodes).get(),g=f.length,n=0;g>n;n++)m=m||a(o,p),h=f[n],k="block"===wysihtml5.dom.getStyle("display").from(h),l="BR"===h.nodeName,!k||e&&wysihtml5.dom.hasClass(h,e)?l?m=m.firstChild?null:m:m.appendChild(h):(m=m.firstChild?a(o,p):m,m.appendChild(h),m=null);return 0===f.length&&a(o,p),c.parentNode.replaceChild(p,c),p}return c}(),wysihtml5.dom.copyAttributes=function(a){return{from:function(b){return{to:function(c){for(var d,e=0,f=a.length;f>e;e++)d=a[e],"undefined"!=typeof b[d]&&""!==b[d]&&(c[d]=b[d]);return{andTo:arguments.callee}}}}}},function(a){var b=["-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing"],c=function(b){return d(b)?parseInt(a.getStyle("width").from(b),10)d;d++)if("border-box"===a.getStyle(b[d]).from(c))return b[d]};a.copyStyles=function(d){return{from:function(e){c(e)&&(d=wysihtml5.lang.array(d).without(b));for(var f,g="",h=d.length,i=0;h>i;i++)f=d[i],g+=f+":"+a.getStyle(f).from(e)+";";return{to:function(b){return a.setStyles(g).on(b),{andTo:arguments.callee}}}}}}}(wysihtml5.dom),function(a){a.dom.delegate=function(a,b,c,d){var e=function(c){for(var e=c.target,f=3===e.nodeType?e.parentNode:e,g=a.querySelectorAll(b),h=0,i=g.length;i>h;h++)g[h].contains(f)&&d.call(g[h],c)};return a.addEventListener(c,e,!1),{stop:function(){a.removeEventListener(c,e,!1)}}}}(wysihtml5),function(a){function b(a,b){for(var c=[a],d=a;b&&d&&d!==b||!b&&d;)c.unshift(d),d=d.parentNode;return c}a.dom.domNode=function(c){var d=[a.ELEMENT_NODE,a.TEXT_NODE];return{is:{emptyTextNode:function(b){var d=b?/^\s*$/g:/^[\r\n]*$/g;return c.nodeType===a.TEXT_NODE&&d.test(c.data)},visible:function(){var b=!/^\s*$/g.test(a.dom.getTextContent(c));return b||1===c.nodeType&&c.querySelector("img, br, hr, object, embed, canvas, input, textarea")&&(b=!0),b}},prev:function(b){var e=c.previousSibling,f=b&&b.nodeTypes?b.nodeTypes:d;return e?!a.lang.array(f).contains(e.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(e).is.emptyTextNode(!0)?a.dom.domNode(e).prev(b):e:null},next:function(b){var e=c.nextSibling,f=b&&b.nodeTypes?b.nodeTypes:d;return e?!a.lang.array(f).contains(e.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(e).is.emptyTextNode(!0)?a.dom.domNode(e).next(b):e:null},commonAncestor:function(a,d){var e=b(c,d),f=b(a,d);if(e[0]!=f[0])return null;for(var g=0;g0)for(var f=!1,g=Array.isArray(b.styleProperty)?b.styleProperty:[b.styleProperty],h=0,i=g.length;i>h;h++){if(d=a.browser.fixStyleKey(g[h]),c.style[d]){if(!b.styleValue){f=!0;break}if(b.styleValue instanceof RegExp){if(c.style[d].trim().match(b.styleValue).length>0){f=!0;break}}else if(Array.isArray(b.styleValue)){if(b.styleValue.indexOf(c.style[d].trim())){f=!0;break}}else if(b.styleValue===c.style[d].trim().replace(/, /g,",")){f=!0;break}}if(!f)return!1}if(b.attribute){var j=a.dom.getAttributes(c),k=[],l=!1;Array.isArray(b.attribute)?k=b.attribute:k[b.attribute]=b.attributeValue;for(var m in k)if(k.hasOwnProperty(m))if("undefined"==typeof k[m]){if("undefined"!=typeof j[m]){l=!0;break}}else if(j[m]===k[m]){l=!0;break}if(!l)return!1}return!0}}}}(wysihtml5),wysihtml5.dom.getAsDom=function(){var a=function(a,b){var c=b.createElement("div");c.style.display="none",b.body.appendChild(c);try{c.innerHTML=a}catch(d){}return b.body.removeChild(c),c},b=function(a){if(!a._wysihtml5_supportsHTML5Tags){for(var b=0,d=c.length;d>b;b++)a.createElement(c[b]);a._wysihtml5_supportsHTML5Tags=!0}},c=["abbr","article","aside","audio","bdi","canvas","command","datalist","details","figcaption","figure","footer","header","hgroup","keygen","mark","meter","nav","output","progress","rp","rt","ruby","svg","section","source","summary","time","track","video","wbr"];return function(c,d){d=d||document;var e;return"object"==typeof c&&c.nodeType?(e=d.createElement("div"),e.appendChild(c)):wysihtml5.browser.supportsHTML5Tags(d)?(e=d.createElement("div"),e.innerHTML=c):(b(d),e=a(c,d)),e}}(),wysihtml5.dom.getParentElement=function(){return function(a,b,c,d){for(c=c||50;c--&&a&&"BODY"!==a.nodeName&&(!d||a!==d);){if(wysihtml5.dom.domNode(a).test(b))return a;a=a.parentNode}return null}}(),wysihtml5.dom.getStyle=function(){function a(a){return a.replace(c,function(a){return a.charAt(1).toUpperCase()})}var b={"float":"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat"},c=/\-[a-z]/g;return function(c){return{from:function(d){if(d.nodeType===wysihtml5.ELEMENT_NODE){var e=d.ownerDocument,f=b[c]||a(c),g=d.style,h=d.currentStyle,i=g[f];if(i)return i;if(h)try{return h[f]}catch(j){}var k,l,m=e.defaultView||e.parentWindow,n=("height"===c||"width"===c)&&"TEXTAREA"===d.nodeName;return m.getComputedStyle?(n&&(k=g.overflow,g.overflow="hidden"),l=m.getComputedStyle(d,null).getPropertyValue(c),n&&(g.overflow=k||""),l):void 0}}}}}(),wysihtml5.dom.getTextNodes=function(a,b){var c=[];for(a=a.firstChild;a;a=a.nextSibling)3==a.nodeType?b&&/^\s*$/.test(a.innerText||a.textContent)||c.push(a):c=c.concat(wysihtml5.dom.getTextNodes(a,b));return c},wysihtml5.dom.hasElementWithTagName=function(){function a(a){return a._wysihtml5_identifier||(a._wysihtml5_identifier=c++)}var b={},c=1;return function(c,d){var e=a(c)+":"+d,f=b[e];return f||(f=b[e]=c.getElementsByTagName(d)),f.length>0}}(),function(a){function b(a){return a._wysihtml5_identifier||(a._wysihtml5_identifier=d++)}var c={},d=1;a.dom.hasElementWithClassName=function(d,e){if(!a.browser.supportsNativeGetElementsByClassName())return!!d.querySelector("."+e);var f=b(d)+":"+e,g=c[f];return g||(g=c[f]=d.getElementsByClassName(e)),g.length>0}}(wysihtml5),wysihtml5.dom.insert=function(a){return{after:function(b){b.parentNode.insertBefore(a,b.nextSibling)},before:function(b){b.parentNode.insertBefore(a,b)},into:function(b){b.appendChild(a)}}},wysihtml5.dom.insertCSS=function(a){return a=a.join("\n"),{into:function(b){var c=b.createElement("style");c.type="text/css",c.styleSheet?c.styleSheet.cssText=a:c.appendChild(b.createTextNode(a));var d=b.querySelector("head link");if(d)return void d.parentNode.insertBefore(c,d);var e=b.querySelector("head");e&&e.appendChild(c)}}},function(a){a.dom.lineBreaks=function(b){function c(a){return"BR"===a.nodeName}function d(b){return c(b)?!0:"block"===a.dom.getStyle("display").from(b)?!0:!1}return{add:function(c){var e=b.ownerDocument,f=a.dom.domNode(b).next({ignoreBlankTexts:!0}),g=a.dom.domNode(b).prev({ignoreBlankTexts:!0});f&&!d(f)&&a.dom.insert(e.createElement("br")).after(b),g&&!d(g)&&a.dom.insert(e.createElement("br")).before(b)},remove:function(d){var e=a.dom.domNode(b).next({ignoreBlankTexts:!0}),f=a.dom.domNode(b).prev({ignoreBlankTexts:!0});e&&c(e)&&e.parentNode.removeChild(e),f&&c(f)&&f.parentNode.removeChild(f)}}}}(wysihtml5),wysihtml5.dom.observe=function(a,b,c){b="string"==typeof b?[b]:b;for(var d,e,f=0,g=b.length;g>f;f++)e=b[f],a.addEventListener?a.addEventListener(e,c,!1):(d=function(b){"target"in b||(b.target=b.srcElement),b.preventDefault=b.preventDefault||function(){this.returnValue=!1},b.stopPropagation=b.stopPropagation||function(){this.cancelBubble=!0},c.call(a,b)},a.attachEvent("on"+e,d));return{stop:function(){for(var e,f=0,g=b.length;g>f;f++)e=b[f],a.removeEventListener?a.removeEventListener(e,c,!1):a.detachEvent("on"+e,d)}}},wysihtml5.dom.parse=function(a,b){function c(a,b){wysihtml5.lang.object(t).merge(s).merge(b.rules).get();var c,f,g,h=b.context||a.ownerDocument||document,i=h.createDocumentFragment(),j="string"==typeof a,k=!1;for(b.clearInternals===!0&&(k=!0),c=j?wysihtml5.dom.getAsDom(a,h):a,t.selectors&&e(c,t.selectors);c.firstChild;)g=c.firstChild,f=d(g,b.cleanUp,k,b.uneditableClass),f&&i.appendChild(f),g!==f&&c.removeChild(g);if(b.unjoinNbsps)for(var l=wysihtml5.dom.getTextNodes(i),m=l.length;m--;)l[m].nodeValue=l[m].nodeValue.replace(/([\S\u00A0])\u00A0/gi,"$1 ");return c.innerHTML="",c.appendChild(i),j?wysihtml5.quirks.getCorrectInnerHTML(c):c}function d(a,b,c,e){var f,g,h,i,j=a.nodeType,k=a.childNodes,l=k.length,m=p[j],n=0;if(e&&1===j&&wysihtml5.dom.hasClass(a,e))return a;if(g=m&&m(a,c),!g){if(g===!1){for(f=a.ownerDocument.createDocumentFragment(),n=l;n--;)k[n]&&(h=d(k[n],b,c,e),h&&(k[n]===h&&n--,f.insertBefore(h,f.firstChild)));return i=wysihtml5.dom.getStyle("display").from(a),""===i&&(i=wysihtml5.lang.array(u).contains(a.tagName)?"block":""),wysihtml5.lang.array(["block","flex","table"]).contains(i)&&f.appendChild(a.ownerDocument.createElement("br")),wysihtml5.lang.array(["div","pre","p","table","td","th","ul","ol","li","dd","dl","footer","header","section","h1","h2","h3","h4","h5","h6"]).contains(a.nodeName.toLowerCase())&&a.parentNode.lastChild!==a&&(a.nextSibling&&3===a.nextSibling.nodeType&&/^\s/.test(a.nextSibling.nodeValue)||f.appendChild(a.ownerDocument.createTextNode(" "))),f.normalize&&f.normalize(),f}return null}for(n=0;l>n;n++)k[n]&&(h=d(k[n],b,c,e),h&&(k[n]===h&&n--,g.appendChild(h)));if(b&&g.nodeName.toLowerCase()===q&&(!g.childNodes.length||/^\s*$/gi.test(g.innerHTML)&&(c||"_wysihtml5-temp-placeholder"!==a.className&&"rangySelectionBoundary"!==a.className)||!g.attributes.length)){for(f=g.ownerDocument.createDocumentFragment();g.firstChild;)f.appendChild(g.firstChild);return f.normalize&&f.normalize(),f}return g.normalize&&g.normalize(),g}function e(a,b){var c,d,e;for(c in b)if(b.hasOwnProperty(c)){wysihtml5.lang.object(b[c]).isFunction()?d=b[c]:"string"==typeof b[c]&&z[b[c]]&&(d=z[b[c]]),e=a.querySelectorAll(c);for(var f=e.length;f--;)d(e[f])}}function f(a,b){var c,d,e,f=t.tags,h=a.nodeName.toLowerCase(),j=a.scopeName;if(a._wysihtml5)return null;if(a._wysihtml5=1,"wysihtml5-temp"===a.className)return null;if(j&&"HTML"!=j&&(h=j+":"+h),"outerHTML"in a&&(wysihtml5.browser.autoClosesUnclosedTags()||"P"!==a.nodeName||""===a.outerHTML.slice(-4).toLowerCase()||(h="div")),h in f){if(c=f[h],!c||c.remove)return null;if(c.unwrap)return!1;c="string"==typeof c?{rename_tag:c}:c}else{if(!a.firstChild)return null;c={rename_tag:q}}if(c.one_of_type&&!g(a,t,c.one_of_type,b)){if(!c.remove_action)return null;if("unwrap"===c.remove_action)return!1;if("rename"!==c.remove_action)return null;e=c.remove_action_rename_to||q}return d=a.ownerDocument.createElement(e||c.rename_tag||h),m(a,d,c,b),i(a,d,c),a=null,d.normalize&&d.normalize(),d}function g(a,b,c,d){var e,f;if("SPAN"===a.nodeName&&!d&&("_wysihtml5-temp-placeholder"===a.className||"rangySelectionBoundary"===a.className))return!0;for(f in c)if(c.hasOwnProperty(f)&&b.type_definitions&&b.type_definitions[f]&&(e=b.type_definitions[f],h(a,e)))return!0;return!1}function h(a,b){var c,d,e,f,g,h=a.getAttribute("class"),i=a.getAttribute("style");if(b.methods)for(var j in b.methods)if(b.methods.hasOwnProperty(j)&&y[j]&&y[j](a))return!0;if(h&&b.classes){h=h.replace(/^\s+/g,"").replace(/\s+$/g,"").split(r),c=h.length;for(var k=0;c>k;k++)if(b.classes[h[k]])return!0}if(i&&b.styles){i=i.split(";");for(d in b.styles)if(b.styles.hasOwnProperty(d))for(var l=i.length;l--;)if(g=i[l].split(":"),g[0].replace(/\s/g,"").toLowerCase()===d&&(b.styles[d]===!0||1===b.styles[d]||wysihtml5.lang.array(b.styles[d]).contains(g[1].replace(/\s/g,"").toLowerCase())))return!0}if(b.attrs)for(e in b.attrs)if(b.attrs.hasOwnProperty(e)&&(f=wysihtml5.dom.getAttribute(a,e),"string"==typeof f&&f.search(b.attrs[e])>-1))return!0;return!1}function i(a,b,c){var d,e;if(c&&c.keep_styles)for(d in c.keep_styles)if(c.keep_styles.hasOwnProperty(d)){if(e="float"===d?a.style.styleFloat||a.style.cssFloat:a.style[d],c.keep_styles[d]instanceof RegExp&&!c.keep_styles[d].test(e))continue;"float"===d?b.style[a.style.styleFloat?"styleFloat":"cssFloat"]=e:a.style[d]&&(b.style[d]=e)}}function j(a,b){var c=[];for(var d in b)b.hasOwnProperty(d)&&0===d.indexOf(a)&&c.push(d);return c}function k(a,b,c,d){var e,f=wysihtml5.lang.object(c).isFunction()?c:v[c];return f&&(e=f(b,d),"string"==typeof e)?e:!1}function l(a,b){var c,d,e,f=wysihtml5.lang.object(t.attributes||{}).clone(),g=wysihtml5.lang.object(f).merge(wysihtml5.lang.object(b||{}).clone()).get(),h={},i=wysihtml5.dom.getAttributes(a);for(c in g)if(/\*$/.test(c)){e=j(c.slice(0,-1),i);for(var l=0,m=e.length;m>l;l++)d=k(e[l],i[e[l]],g[c],a.nodeName),d!==!1&&(h[e[l]]=d)}else d=k(c,i[c],g[c],a.nodeName),d!==!1&&(h[c]=d);return h}function m(a,b,c,d){var e,f,g,h,i,j={},k=c.set_class,m=c.add_class,n=c.add_style,o=c.set_attributes,p=t.classes,q=0,s=[],u=[],v=[],y=[];if(o&&(j=wysihtml5.lang.object(o).clone()),j=wysihtml5.lang.object(j).merge(l(a,c.check_attributes)).get(),k&&s.push(k),m)for(h in m)i=x[m[h]],i&&(g=i(wysihtml5.dom.getAttribute(a,h)),"string"==typeof g&&s.push(g));if(n)for(h in n)i=w[n[h]],i&&(newStyle=i(wysihtml5.dom.getAttribute(a,h)),"string"==typeof newStyle&&u.push(newStyle));if("string"==typeof p&&"any"===p&&a.getAttribute("class"))if(t.classes_blacklist){for(y=a.getAttribute("class"),y&&(s=s.concat(y.split(r))),e=s.length;e>q;q++)f=s[q],t.classes_blacklist[f]||v.push(f);v.length&&(j["class"]=wysihtml5.lang.array(v).unique().join(" "))}else j["class"]=a.getAttribute("class");else{for(d||(p["_wysihtml5-temp-placeholder"]=1,p._rangySelectionBoundary=1,p["wysiwyg-tmp-selected-cell"]=1),y=a.getAttribute("class"),y&&(s=s.concat(y.split(r))),e=s.length;e>q;q++)f=s[q],p[f]&&v.push(f);v.length&&(j["class"]=wysihtml5.lang.array(v).unique().join(" "))}j["class"]&&d&&(j["class"]=j["class"].replace("wysiwyg-tmp-selected-cell",""),/^\s*$/g.test(j["class"])&&delete j["class"]),u.length&&(j.style=wysihtml5.lang.array(u).unique().join(" "));for(h in j)try{b.setAttribute(h,j[h])}catch(z){}j.src&&("undefined"!=typeof j.width&&b.setAttribute("width",j.width),"undefined"!=typeof j.height&&b.setAttribute("height",j.height))}function n(a){var b=a.nextSibling;if(!b||b.nodeType!==wysihtml5.TEXT_NODE){var c=a.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"");return a.ownerDocument.createTextNode(c)}b.data=a.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")+b.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")}function o(a){return t.comments?a.ownerDocument.createComment(a.nodeValue):void 0}var p={1:f,3:n,8:o},q="span",r=/\s+/,s={tags:{},classes:{}},t={},u=["ADDRESS","BLOCKQUOTE","CENTER","DIR","DIV","DL","FIELDSET","FORM","H1","H2","H3","H4","H5","H6","ISINDEX","MENU","NOFRAMES","NOSCRIPT","OL","P","PRE","TABLE","UL"],v={url:function(){var a=/^https?:\/\//i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),src:function(){var a=/^(\/|https?:\/\/)/i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),href:function(){var a=/^(#|\/|https?:\/\/|mailto:|tel:)/i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),alt:function(){var a=/[^ a-z0-9_\-]/gi;return function(b,c){return b?b.replace(a,""):"IMG"===c?"":null}}(),numbers:function(){var a=/\D/g;return function(b){return b=(b||"").replace(a,""),b||null}}(),dimension:function(){var a=/\D*(\d+)(\.\d+)?\s?(%)?\D*/;return function(b){return b=(b||"").replace(a,"$1$2$3"),b||null}}(),any:function(){return function(a){return a?a:null}}()},w={align_text:function(){var a={left:"text-align: left;",right:"text-align: right;",center:"text-align: center;"};return function(b){return a[String(b).toLowerCase()]}}()},x={align_img:function(){var a={left:"wysiwyg-float-left",right:"wysiwyg-float-right"};return function(b){return a[String(b).toLowerCase()]}}(),align_text:function(){var a={left:"wysiwyg-text-align-left",right:"wysiwyg-text-align-right",center:"wysiwyg-text-align-center",justify:"wysiwyg-text-align-justify"};return function(b){return a[String(b).toLowerCase()]}}(),clear_br:function(){var a={left:"wysiwyg-clear-left",right:"wysiwyg-clear-right",both:"wysiwyg-clear-both",all:"wysiwyg-clear-both"};return function(b){return a[String(b).toLowerCase()]}}(),size_font:function(){var a={1:"wysiwyg-font-size-xx-small",2:"wysiwyg-font-size-small",3:"wysiwyg-font-size-medium",4:"wysiwyg-font-size-large",5:"wysiwyg-font-size-x-large",6:"wysiwyg-font-size-xx-large",7:"wysiwyg-font-size-xx-large","-":"wysiwyg-font-size-smaller","+":"wysiwyg-font-size-larger"};return function(b){return a[String(b).charAt(0)]}}()},y={has_visible_contet:function(){var a,b=["img","video","picture","br","script","noscript","style","table","iframe","object","embed","audio","svg","input","button","select","textarea","canvas"];return function(c){if(a=(c.innerText||c.textContent).replace(/\s/g,""),a&&a.length>0)return!0;for(var d=b.length;d--;)if(c.querySelector(b[d]))return!0;return c.offsetWidth&&c.offsetWidth>0&&c.offsetHeight&&c.offsetHeight>0?!0:!1}}()},z={unwrap:function(a){wysihtml5.dom.unwrap(a)},remove:function(a){a.parentNode.removeChild(a)}};return c(a,b)},wysihtml5.dom.removeEmptyTextNodes=function(a){for(var b,c=wysihtml5.lang.array(a.childNodes).get(),d=c.length,e=0;d>e;e++)b=c[e],b.nodeType===wysihtml5.TEXT_NODE&&/^[\n\r]*$/.test(b.data)&&b.parentNode.removeChild(b)},wysihtml5.dom.renameElement=function(a,b){for(var c,d=a.ownerDocument.createElement(b);c=a.firstChild;)d.appendChild(c);return wysihtml5.dom.copyAttributes(["align","className"]).from(a).to(d),a.parentNode&&a.parentNode.replaceChild(d,a),d},wysihtml5.dom.replaceWithChildNodes=function(a){if(a.parentNode){if(!a.firstChild)return void a.parentNode.removeChild(a);for(var b=a.ownerDocument.createDocumentFragment();a.firstChild;)b.appendChild(a.firstChild);a.parentNode.replaceChild(b,a),a=b=null}},function(a){function b(b){return"block"===a.getStyle("display").from(b)}function c(a){return"BR"===a.nodeName}function d(a){var b=a.ownerDocument.createElement("br");a.appendChild(b)}function e(a,e){if(a.nodeName.match(/^(MENU|UL|OL)$/)){var f,g,h,i,j,k,l,m=a.ownerDocument,n=m.createDocumentFragment(),o=wysihtml5.dom.domNode(a).prev({ignoreBlankTexts:!0}),p=wysihtml5.dom.domNode(a).next({ignoreBlankTexts:!0}),q=a.lastElementChild||a.lastChild;if(e)for(!o||b(o)||c(o)||d(n);k=a.firstElementChild||a.firstChild;){for(g=k.lastChild,l=k===q;f=k.firstChild;)h=f===g,i=(!l||p&&!b(p))&&h&&!b(f)&&!c(f),n.appendChild(f),i&&d(n);k.parentNode.removeChild(k)}else for(;k=a.firstElementChild||a.firstChild;){if(k.querySelector&&k.querySelector("div, p, ul, ol, menu, blockquote, h1, h2, h3, h4, h5, h6"))for(;f=k.firstChild;)n.appendChild(f);else{for(j=m.createElement("p");f=k.firstChild;)j.appendChild(f);n.appendChild(j)}k.parentNode.removeChild(k)}a.parentNode.replaceChild(n,a)}}a.resolveList=e}(wysihtml5.dom),function(a){var b=document,c=["parent","top","opener","frameElement","frames","localStorage","globalStorage","sessionStorage","indexedDB"],d=["open","close","openDialog","showModalDialog","alert","confirm","prompt","openDatabase","postMessage","XMLHttpRequest","XDomainRequest"],e=["referrer","write","open","close"];a.dom.Sandbox=Base.extend({constructor:function(b,c){this.callback=b||a.EMPTY_FUNCTION,this.config=a.lang.object({}).merge(c).get(),this.config.className||(this.config.className="wysihtml5-sandbox"),this.editableArea=this._createIframe()},insertInto:function(a){"string"==typeof a&&(a=b.getElementById(a)),a.appendChild(this.editableArea)},getIframe:function(){return this.editableArea},getWindow:function(){this._readyError()},getDocument:function(){this._readyError()},destroy:function(){var a=this.getIframe();a.parentNode.removeChild(a)},_readyError:function(){throw new Error("wysihtml5.Sandbox: Sandbox iframe isn't loaded yet")},_createIframe:function(){var c=this,d=b.createElement("iframe");return d.className=this.config.className,a.dom.setAttributes({security:"restricted",allowtransparency:"true",frameborder:0,width:0,height:0,marginwidth:0,marginheight:0}).on(d),a.browser.throwsMixedContentWarningWhenIframeSrcIsEmpty()&&(d.src="javascript:''"),d.onload=function(){d.onreadystatechange=d.onload=null,c._onLoadIframe(d)},d.onreadystatechange=function(){/loaded|complete/.test(d.readyState)&&(d.onreadystatechange=d.onload=null,c._onLoadIframe(d))},d},_onLoadIframe:function(f){if(a.dom.contains(b.documentElement,f)){var g=this,h=f.contentWindow,i=f.contentWindow.document,j=b.characterSet||b.charset||"utf-8",k=this._getHtml({charset:j,stylesheets:this.config.stylesheets});if(i.open("text/html","replace"),i.write(k),i.close(),this.getWindow=function(){return f.contentWindow},this.getDocument=function(){return f.contentWindow.document},h.onerror=function(a,b,c){throw new Error("wysihtml5.Sandbox: "+a,b,c)},!a.browser.supportsSandboxedIframes()){var l,m;for(l=0,m=c.length;m>l;l++)this._unset(h,c[l]);for(l=0,m=d.length;m>l;l++)this._unset(h,d[l],a.EMPTY_FUNCTION);for(l=0,m=e.length;m>l;l++)this._unset(i,e[l]);this._unset(i,"cookie","",!0)}a.polyfills&&a.polyfills(h,i),this.loaded=!0,setTimeout(function(){g.callback(g)},0)}},_getHtml:function(b){var c,d=b.stylesheets,e="",f=0;if(d="string"==typeof d?[d]:d)for(c=d.length;c>f;f++)e+='';return b.stylesheets=e,a.lang.string('#{stylesheets}').interpolate(b)},_unset:function(b,c,d,e){try{b[c]=d}catch(f){}try{b.__defineGetter__(c,function(){return d})}catch(f){}if(e)try{b.__defineSetter__(c,function(){})}catch(f){}if(!a.browser.crashesWhenDefineProperty(c))try{var g={get:function(){return d}};e&&(g.set=function(){}),Object.defineProperty(b,c,g)}catch(f){}}})}(wysihtml5),function(a){var b=document;a.dom.ContentEditableArea=Base.extend({getContentEditable:function(){return this.element},getWindow:function(){return this.element.ownerDocument.defaultView||this.element.ownerDocument.parentWindow},getDocument:function(){return this.element.ownerDocument},constructor:function(b,c,d){this.callback=b||a.EMPTY_FUNCTION,this.config=a.lang.object({}).merge(c).get(),this.config.className||(this.config.className="wysihtml5-sandbox"),d?this.element=this._bindElement(d):this.element=this._createElement()},_createElement:function(){var a=b.createElement("div");return a.className=this.config.className,this._loadElement(a),a},_bindElement:function(a){return a.className=a.className?a.className+" wysihtml5-sandbox":"wysihtml5-sandbox",this._loadElement(a,!0),a},_loadElement:function(a,b){var c=this;if(!b){var d=this._getHtml();a.innerHTML=d}this.loaded=!0,setTimeout(function(){c.callback(c)},0)},_getHtml:function(a){return""}})}(wysihtml5),function(){var a={className:"class"};wysihtml5.dom.setAttributes=function(b){return{on:function(c){for(var d in b)c.setAttribute(a[d]||d,b[d])}}}}(),wysihtml5.dom.setStyles=function(a){return{on:function(b){var c=b.style;if("string"==typeof a)return void(c.cssText+=";"+a);for(var d in a)"float"===d?(c.cssFloat=a[d],c.styleFloat=a[d]):c[d]=a[d]}}},function(a){a.simulatePlaceholder=function(b,c,d,e){var f=e||"wysihtml5-placeholder",g=function(){var b=c.element.offsetWidth>0&&c.element.offsetHeight>0;c.hasPlaceholderSet()&&(c.clear(),c.element.focus(),b&&setTimeout(function(){var a=c.selection.getSelection();a.focusNode&&a.anchorNode||c.selection.selectNode(c.element.firstChild||c.element)},0)),c.placeholderSet=!1,a.removeClass(c.element,f)},h=function(){c.isEmpty()&&!c.placeholderSet&&(c.placeholderSet=!0,c.setValue(d),a.addClass(c.element,f))};b.on("set_placeholder",h).on("unset_placeholder",g).on("focus:composer",g).on("paste:composer",g).on("blur:composer",h),h()}}(wysihtml5.dom),function(a){var b=document.documentElement;"textContent"in b?(a.setTextContent=function(a,b){a.textContent=b},a.getTextContent=function(a){return a.textContent}):"innerText"in b?(a.setTextContent=function(a,b){a.innerText=b},a.getTextContent=function(a){return a.innerText}):(a.setTextContent=function(a,b){a.nodeValue=b},a.getTextContent=function(a){return a.nodeValue})}(wysihtml5.dom),wysihtml5.dom.getAttribute=function(a,b){var c=!wysihtml5.browser.supportsGetAttributeCorrectly();b=b.toLowerCase();var d=a.nodeName;if("IMG"==d&&"src"==b&&wysihtml5.dom.isLoadedImage(a)===!0)return a.src;if(c&&"outerHTML"in a){var e=a.outerHTML.toLowerCase(),f=-1!=e.indexOf(" "+b+"=");return f?a.getAttribute(b):null}return a.getAttribute(b)},wysihtml5.dom.getAttributes=function(a){var b,c=!wysihtml5.browser.supportsGetAttributeCorrectly(),d=a.nodeName,e=[];for(b in a.attributes)(a.attributes.hasOwnProperty&&a.attributes.hasOwnProperty(b)||!a.attributes.hasOwnProperty&&Object.prototype.hasOwnProperty.call(a.attributes,b))&&a.attributes[b].specified&&("IMG"==d&&"src"==a.attributes[b].name.toLowerCase()&&wysihtml5.dom.isLoadedImage(a)===!0?e.src=a.src:wysihtml5.lang.array(["rowspan","colspan"]).contains(a.attributes[b].name.toLowerCase())&&c?1!==a.attributes[b].value&&(e[a.attributes[b].name]=a.attributes[b].value):e[a.attributes[b].name]=a.attributes[b].value);return e},wysihtml5.dom.isLoadedImage=function(a){try{return a.complete&&!a.mozMatchesSelector(":-moz-broken")}catch(b){if(a.complete&&"complete"===a.readyState)return!0}},function(a){function b(a,b){for(var c,d=[],e=0,f=a.length;f>e;e++)if(c=a[e].querySelectorAll(b))for(var g=c.length;g--;d.unshift(c[g]));return d}function d(a){a.parentNode.removeChild(a)}function e(a,b){a.parentNode.insertBefore(b,a.nextSibling)}function f(a,b){for(var c=a.nextSibling;1!=c.nodeType;)if(c=c.nextSibling,!b||b==c.tagName.toLowerCase())return c;return null}var g=a.dom,h=function(a){this.el=a,this.isColspan=!1,this.isRowspan=!1,this.firstCol=!0,this.lastCol=!0,this.firstRow=!0,this.lastRow=!0,this.isReal=!0,this.spanCollection=[],this.modified=!1},i=function(a,b){a?(this.cell=a,this.table=g.getParentElement(a,{query:"table"})):b&&(this.table=b,this.cell=this.table.querySelectorAll("th, td")[0])};i.prototype={addSpannedCellToMap:function(a,b,c,d,e,f){for(var g=[],i=c+(f?parseInt(f,10)-1:0),j=d+(e?parseInt(e,10)-1:0),k=c;i>=k;k++){"undefined"==typeof b[k]&&(b[k]=[]);for(var l=d;j>=l;l++)b[k][l]=new h(a),b[k][l].isColspan=e&&parseInt(e,10)>1,b[k][l].isRowspan=f&&parseInt(f,10)>1,b[k][l].firstCol=l==d,b[k][l].lastCol=l==j,b[k][l].firstRow=k==c,b[k][l].lastRow=k==i,b[k][l].isReal=l==d&&k==c,b[k][l].spanCollection=g,g.push(b[k][l])}},setCellAsModified:function(a){if(a.modified=!0,a.spanCollection.length>0)for(var b=0,c=a.spanCollection.length;c>b;b++)a.spanCollection[b].modified=!0},setTableMap:function(){var a,b,c,d,e,f,i,j,k=[],l=this.getTableRows();for(a=0;a0?a.lang.array(f).without(e):f;
-return g},getTableRows:function(){var c=this.table.querySelectorAll("table"),d=c?b(c,"tr"):[],e=this.table.querySelectorAll("tr"),f=d.length>0?a.lang.array(e).without(d):e;return f},getMapIndex:function(a){for(var b=this.map.length,c=this.map&&this.map[0]?this.map[0].length:0,d=0;b>d;d++)for(var e=0;c>e;e++)if(this.map[d][e].el===a)return{row:d,col:e};return!1},getElementAtIndex:function(a){return this.setTableMap(),this.map[a.row]&&this.map[a.row][a.col]&&this.map[a.row][a.col].el?this.map[a.row][a.col].el:null},getMapElsTo:function(a){var b=[];if(this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(a),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var c=this.idx_start;this.idx_start=this.idx_end,this.idx_end=c}if(this.idx_start.col>this.idx_end.col){var d=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=d}if(null!=this.idx_start&&null!=this.idx_end)for(var e=this.idx_start.row,f=this.idx_end.row;f>=e;e++)for(var g=this.idx_start.col,h=this.idx_end.col;h>=g;g++)b.push(this.map[e][g].el);return b},orderSelectionEnds:function(a){if(this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(a),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var b=this.idx_start;this.idx_start=this.idx_end,this.idx_end=b}if(this.idx_start.col>this.idx_end.col){var c=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=c}return{start:this.map[this.idx_start.row][this.idx_start.col].el,end:this.map[this.idx_end.row][this.idx_end.col].el}},createCells:function(a,b,c){for(var d,e=this.table.ownerDocument,f=e.createDocumentFragment(),g=0;b>g;g++){if(d=e.createElement(a),c)for(var h in c)c.hasOwnProperty(h)&&d.setAttribute(h,c[h]);d.appendChild(document.createTextNode(" ")),f.appendChild(d)}return f},correctColIndexForUnreals:function(a,b){for(var c=this.map[b],d=-1,e=0;a>e;e++)c[e].isReal&&d++;return d},getLastNewCellOnRow:function(a,b){for(var c,d,e=this.getRowCells(a),f=0,g=e.length;g>f;f++)if(c=e[f],d=this.getMapIndex(c),d===!1||"undefined"!=typeof b&&d.row!=b)return c;return null},removeEmptyTable:function(){var a=this.table.querySelectorAll("td, th");return a&&0!=a.length?!1:(d(this.table),!0)},splitRowToCells:function(a){if(a.isColspan){var b=parseInt(g.getAttribute(a.el,"colspan")||1,10),c=a.el.tagName.toLowerCase();if(b>1){var d=this.createCells(c,b-1);e(a.el,d)}a.el.removeAttribute("colspan")}},getRealRowEl:function(a,b){var c=null,d=null;b=b||this.idx;for(var e=0,f=this.map[b.row].length;f>e;e++)if(d=this.map[b.row][e],d.isReal&&(c=g.getParentElement(d.el,{query:"tr"})))return c;return null===c&&a&&(c=g.getParentElement(this.map[b.row][b.col].el,{query:"tr"})||null),c},injectRowAt:function(a,b,c,d,f){var h=this.getRealRowEl(!1,{row:a,col:b}),i=this.createCells(d,c);if(h){var j=this.correctColIndexForUnreals(b,a);j>=0?e(this.getRowCells(h)[j],i):h.insertBefore(i,h.firstChild)}else{var k=this.table.ownerDocument.createElement("tr");k.appendChild(i),e(g.getParentElement(f.el,{query:"tr"}),k)}},canMerge:function(a){if(this.to=a,this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(this.to),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var b=this.idx_start;this.idx_start=this.idx_end,this.idx_end=b}if(this.idx_start.col>this.idx_end.col){var c=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=c}for(var d=this.idx_start.row,e=this.idx_end.row;e>=d;d++)for(var f=this.idx_start.col,g=this.idx_end.col;g>=f;f++)if(this.map[d][f].isColspan||this.map[d][f].isRowspan)return!1;return!0},decreaseCellSpan:function(a,b){var c=parseInt(g.getAttribute(a.el,b),10)-1;c>=1?a.el.setAttribute(b,c):(a.el.removeAttribute(b),"colspan"==b&&(a.isColspan=!1),"rowspan"==b&&(a.isRowspan=!1),a.firstCol=!0,a.lastCol=!0,a.firstRow=!0,a.lastRow=!0,a.isReal=!0)},removeSurplusLines:function(){var a,b,c,e,f,h,i;if(this.setTableMap(),this.map){for(c=0,e=this.map.length;e>c;c++){for(a=this.map[c],i=!0,f=0,h=a.length;h>f;f++)if(b=a[f],!(g.getAttribute(b.el,"rowspan")&&parseInt(g.getAttribute(b.el,"rowspan"),10)>1&&b.firstRow!==!0)){i=!1;break}if(i)for(f=0;h>f;f++)this.decreaseCellSpan(a[f],"rowspan")}var j=this.getTableRows();for(c=0,e=j.length;e>c;c++)a=j[c],0==a.childNodes.length&&/^\s*$/.test(a.textContent||a.innerText)&&d(a)}},fillMissingCells:function(){var a=0,b=0,c=null;if(this.setTableMap(),this.map){a=this.map.length;for(var d=0;a>d;d++)this.map[d].length>b&&(b=this.map[d].length);for(var f=0;a>f;f++)for(var g=0;b>g;g++)this.map[f]&&!this.map[f][g]&&g>0&&(this.map[f][g]=new h(this.createCells("td",1)),c=this.map[f][g-1],c&&c.el&&c.el.parent&&e(this.map[f][g-1].el,this.map[f][g].el))}},rectify:function(){return this.removeEmptyTable()?!1:(this.removeSurplusLines(),this.fillMissingCells(),!0)},unmerge:function(){if(this.rectify()&&(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx)){var a=this.map[this.idx.row][this.idx.col],b=g.getAttribute(a.el,"colspan")?parseInt(g.getAttribute(a.el,"colspan"),10):1,c=a.el.tagName.toLowerCase();if(a.isRowspan){var d=parseInt(g.getAttribute(a.el,"rowspan"),10);if(d>1)for(var e=1,f=d-1;f>=e;e++)this.injectRowAt(this.idx.row+e,this.idx.col,b,c,a);a.el.removeAttribute("rowspan")}this.splitRowToCells(a)}},merge:function(a){if(this.rectify())if(this.canMerge(a)){for(var b=this.idx_end.row-this.idx_start.row+1,c=this.idx_end.col-this.idx_start.col+1,e=this.idx_start.row,f=this.idx_end.row;f>=e;e++)for(var g=this.idx_start.col,h=this.idx_end.col;h>=g;g++)e==this.idx_start.row&&g==this.idx_start.col?(b>1&&this.map[e][g].el.setAttribute("rowspan",b),c>1&&this.map[e][g].el.setAttribute("colspan",c)):(/^\s*
\s*$/.test(this.map[e][g].el.innerHTML.toLowerCase())||(this.map[this.idx_start.row][this.idx_start.col].el.innerHTML+=" "+this.map[e][g].el.innerHTML),d(this.map[e][g].el));this.rectify()}else window.console&&console.log("Do not know how to merge allready merged cells.")},collapseCellToNextRow:function(a){var b=this.getMapIndex(a.el),c=b.row+1,d={row:c,col:b.col};if(c=0)e(this.getRowCells(f)[h],a.el);else{var i=this.getLastNewCellOnRow(f,c);null!==i?e(i,a.el):f.insertBefore(a.el,f.firstChild)}parseInt(g.getAttribute(a.el,"rowspan"),10)>2?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)-1):a.el.removeAttribute("rowspan")}}},removeRowCell:function(a){a.isReal?a.isRowspan?this.collapseCellToNextRow(a):d(a.el):parseInt(g.getAttribute(a.el,"rowspan"),10)>2?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)-1):a.el.removeAttribute("rowspan")},getRowElementsByCell:function(){var a=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=this.map[this.idx.row],c=0,d=b.length;d>c;c++)b[c].isReal&&a.push(b[c].el);return a},getColumnElementsByCell:function(){var a=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=0,c=this.map.length;c>b;b++)this.map[b][this.idx.col]&&this.map[b][this.idx.col].isReal&&a.push(this.map[b][this.idx.col].el);return a},removeRow:function(){var a=g.getParentElement(this.cell,{query:"tr"});if(a){if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=this.map[this.idx.row],c=0,e=b.length;e>c;c++)b[c].modified||(this.setCellAsModified(b[c]),this.removeRowCell(b[c]));d(a)}},removeColCell:function(a){a.isColspan?parseInt(g.getAttribute(a.el,"colspan"),10)>2?a.el.setAttribute("colspan",parseInt(g.getAttribute(a.el,"colspan"),10)-1):a.el.removeAttribute("colspan"):a.isReal&&d(a.el)},removeColumn:function(){if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var a=0,b=this.map.length;b>a;a++)this.map[a][this.idx.col].modified||(this.setCellAsModified(this.map[a][this.idx.col]),this.removeColCell(this.map[a][this.idx.col]))},remove:function(a){if(this.rectify()){switch(a){case"row":this.removeRow();break;case"column":this.removeColumn()}this.rectify()}},addRow:function(a){var b=this.table.ownerDocument;if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),"below"==a&&g.getAttribute(this.cell,"rowspan")&&(this.idx.row=this.idx.row+parseInt(g.getAttribute(this.cell,"rowspan"),10)-1),this.idx!==!1){for(var c=this.map[this.idx.row],d=b.createElement("tr"),f=0,h=c.length;h>f;f++)c[f].modified||(this.setCellAsModified(c[f]),this.addRowCell(c[f],d,a));switch(a){case"below":e(this.getRealRowEl(!0),d);break;case"above":var i=g.getParentElement(this.map[this.idx.row][this.idx.col].el,{query:"tr"});i&&i.parentNode.insertBefore(d,i)}}},addRowCell:function(a,b,d){var e=a.isColspan?{colspan:g.getAttribute(a.el,"colspan")}:null;a.isReal?"above"!=d&&a.isRowspan?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)+1):b.appendChild(this.createCells("td",1,e)):"above"!=d&&a.isRowspan&&a.lastRow?b.appendChild(this.createCells("td",1,e)):c.isRowspan&&a.el.attr("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)+1)},add:function(a){this.rectify()&&(("below"==a||"above"==a)&&this.addRow(a),("before"==a||"after"==a)&&this.addColumn(a))},addColCell:function(a,b,d){var f,h=a.el.tagName.toLowerCase();switch(d){case"before":f=!a.isColspan||a.firstCol;break;case"after":f=!a.isColspan||a.lastCol||a.isColspan&&c.el==this.cell}if(f){switch(d){case"before":a.el.parentNode.insertBefore(this.createCells(h,1),a.el);break;case"after":e(a.el,this.createCells(h,1))}a.isRowspan&&this.handleCellAddWithRowspan(a,b+1,d)}else a.el.setAttribute("colspan",parseInt(g.getAttribute(a.el,"colspan"),10)+1)},addColumn:function(a){var b,c;if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),"after"==a&&g.getAttribute(this.cell,"colspan")&&(this.idx.col=this.idx.col+parseInt(g.getAttribute(this.cell,"colspan"),10)-1),this.idx!==!1)for(var d=0,e=this.map.length;e>d;d++)b=this.map[d],b[this.idx.col]&&(c=b[this.idx.col],c.modified||(this.setCellAsModified(c),this.addColCell(c,d,a)))},handleCellAddWithRowspan:function(a,b,c){for(var d,h,i,j=parseInt(g.getAttribute(this.cell,"rowspan"),10)-1,k=g.getParentElement(a.el,{query:"tr"}),l=a.el.tagName.toLowerCase(),m=this.table.ownerDocument,n=0;j>n;n++)if(d=this.correctColIndexForUnreals(this.idx.col,b+n),k=f(k,"tr"))if(d>0)switch(c){case"before":h=this.getRowCells(k),d>0&&this.map[b+n][this.idx.col].el!=h[d]&&d==h.length-1?e(h[d],this.createCells(l,1)):h[d].parentNode.insertBefore(this.createCells(l,1),h[d]);break;case"after":e(this.getRowCells(k)[d],this.createCells(l,1))}else k.insertBefore(this.createCells(l,1),k.firstChild);else i=m.createElement("tr"),i.appendChild(this.createCells(l,1)),this.table.appendChild(i)}},g.table={getCellsBetween:function(a,b){var c=new i(a);return c.getMapElsTo(b)},addCells:function(a,b){var c=new i(a);c.add(b)},removeCells:function(a,b){var c=new i(a);c.remove(b)},mergeCellsBetween:function(a,b){var c=new i(a);c.merge(b)},unmergeCell:function(a){var b=new i(a);b.unmerge()},orderSelectionEnds:function(a,b){var c=new i(a);return c.orderSelectionEnds(b)},indexOf:function(a){var b=new i(a);return b.setTableMap(),b.getMapIndex(a)},findCell:function(a,b){var c=new i(null,a);return c.getElementAtIndex(b)},findRowByCell:function(a){var b=new i(a);return b.getRowElementsByCell()},findColumnByCell:function(a){var b=new i(a);return b.getColumnElementsByCell()},canMerge:function(a,b){var c=new i(a);return c.canMerge(b)}}}(wysihtml5),wysihtml5.dom.query=function(a,b){var c,d=[];a.nodeType&&(a=[a]);for(var e=0,f=a.length;f>e;e++)if(c=a[e].querySelectorAll(b))for(var g=c.length;g--;d.unshift(c[g]));return d},wysihtml5.dom.compareDocumentPosition=function(){var a=document.documentElement;return a.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)}:function(a,b){var c,d;if(c=9===a.nodeType?a:a.ownerDocument,d=9===b.nodeType?b:b.ownerDocument,a===b)return 0;if(a===b.ownerDocument)return 20;if(a.ownerDocument===b)return 10;if(c!==d)return 1;if(2===a.nodeType&&a.childNodes&&-1!==wysihtml5.lang.array(a.childNodes).indexOf(b))return 20;if(2===b.nodeType&&b.childNodes&&-1!==wysihtml5.lang.array(b.childNodes).indexOf(a))return 10;for(var e=a,f=[],g=null;e;){if(e==b)return 10;f.push(e),e=e.parentNode}for(e=b,g=null;e;){if(e==a)return 20;var h=wysihtml5.lang.array(f).indexOf(e);if(-1!==h){var i=f[h],j=wysihtml5.lang.array(i.childNodes).indexOf(f[h-1]),k=wysihtml5.lang.array(i.childNodes).indexOf(g);return j>k?2:4}g=e,e=e.parentNode}return 1}}(),wysihtml5.dom.unwrap=function(a){var b=[];if(a.parentNode){for(;a.lastChild;)b.unshift(a.lastChild),wysihtml5.dom.insert(a.lastChild).after(a);a.parentNode.removeChild(a)}return b},wysihtml5.dom.getPastedHtml=function(a){var b;return a.clipboardData&&(wysihtml5.lang.array(a.clipboardData.types).contains("text/html")?b=a.clipboardData.getData("text/html"):wysihtml5.lang.array(a.clipboardData.types).contains("text/plain")&&(b=wysihtml5.lang.string(a.clipboardData.getData("text/plain")).escapeHTML(!0,!0))),b},wysihtml5.dom.getPastedHtmlWithDiv=function(a,b){var c=a.selection.getBookmark(),d=a.element.ownerDocument,e=d.createElement("DIV"),f=a.getScrollPos();d.body.appendChild(e),e.style.width="1px",e.style.height="1px",e.style.overflow="hidden",e.style.position="absolute",e.style.top=f.y+"px",e.style.left=f.x+"px",e.setAttribute("contenteditable","true"),e.focus(),setTimeout(function(){var d;a.selection.setBookmark(c),d=e.innerHTML,d&&/^
$/i.test(d.trim())&&(d=!1),b(d),e.parentNode.removeChild(e)},0)},wysihtml5.dom.removeInvisibleSpaces=function(a){for(var b=wysihtml5.dom.getTextNodes(a),c=b.length;c--;)b[c].nodeValue=b[c].nodeValue.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")},wysihtml5.quirks.cleanPastedHTML=function(){var a=function(a){var b=wysihtml5.lang.string(a).trim(),c=b.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");return new RegExp("^((?!^"+c+"$).)*$","i")},b=function(b,c){var d,e,f=wysihtml5.lang.object(b).clone(!0);for(d in f.tags)if(f.tags.hasOwnProperty(d)&&f.tags[d].keep_styles)for(e in f.tags[d].keep_styles)f.tags[d].keep_styles.hasOwnProperty(e)&&c[e]&&(f.tags[d].keep_styles[e]=a(c[e]));return f},c=function(a,b){var c;if(!a)return null;for(var d=0,e=a.length;e>d;d++)if(a[d].condition||(c=a[d].set),a[d].condition&&a[d].condition.test(b))return a[d].set;return c};return function(a,d){var e,f={color:wysihtml5.dom.getStyle("color").from(d.referenceNode),fontSize:wysihtml5.dom.getStyle("font-size").from(d.referenceNode)},g=b(c(d.rules,a)||{},f);return e=wysihtml5.dom.parse(a,{rules:g,cleanUp:!0,context:d.referenceNode.ownerDocument,uneditableClass:d.uneditableClass,clearInternals:!0,unjoinNbsps:!0})}}(),wysihtml5.quirks.ensureProperClearing=function(){var a=function(){var a=this;setTimeout(function(){var b=a.innerHTML.toLowerCase();("
"==b||"
"==b)&&(a.innerHTML="")},0)};return function(b){wysihtml5.dom.observe(b.element,["cut","keydown"],a)}}(),function(a){var b="%7E";a.quirks.getCorrectInnerHTML=function(c){var d=c.innerHTML;if(-1===d.indexOf(b))return d;var e,f,g,h,i=c.querySelectorAll("[href*='~'], [src*='~']");for(h=0,g=i.length;g>h;h++)e=i[h].href||i[h].src,f=a.lang.string(e).replace("~").by(b),d=a.lang.string(d).replace(f).by(e);return d}}(wysihtml5),function(a){var b="wysihtml5-quirks-redraw";a.quirks.redraw=function(c){a.dom.addClass(c,b),a.dom.removeClass(c,b);try{var d=c.ownerDocument;d.execCommand("italic",!1,null),d.execCommand("italic",!1,null)}catch(e){}}}(wysihtml5),wysihtml5.quirks.tableCellsSelection=function(a,b){function c(){return a.addEventListener("mousedown",n),l}function d(c){l.start=c,l.end=c,l.cells=[c],l.table=k.getParentElement(l.start,{query:"table"},!1,a),l.table&&(e(),k.addClass(c,m),a.addEventListener("mousemove",g),a.addEventListener("mouseup",h),b.fire("tableselectstart").fire("tableselectstart:composer"))}function e(){if(a){var b=a.querySelectorAll("."+m);if(b.length>0)for(var c=0;c1&&b.composer.selection.deselect(),f(l.cells),l.end!==d&&b.fire("tableselectchange").fire("tableselectchange:composer")))}function h(c){a.removeEventListener("mousemove",g),a.removeEventListener("mouseup",h),b.fire("tableselect").fire("tableselect:composer"),setTimeout(function(){i()},0)}function i(){a.ownerDocument.addEventListener("click",o)}function j(c,d){l.start=c,l.end=d,l.table=k.getParentElement(l.start,{query:"table"},!1,a),selectedCells=k.table.getCellsBetween(l.start,l.end),f(selectedCells),i(),b.fire("tableselect").fire("tableselect:composer")}var k=wysihtml5.dom,l={table:null,start:null,end:null,cells:null,select:j},m="wysiwyg-tmp-selected-cell",n=function(b){var c=wysihtml5.dom.getParentElement(b.target,{query:"td, th"},!1,a);c&&d(c)},o=function(c){a.ownerDocument.removeEventListener("click",o),k.getParentElement(c.target,{query:"table"},!1,a)!=l.table&&(e(),l.table=null,l.start=null,l.end=null,b.fire("tableunselect").fire("tableunselect:composer"))};return c()},function(a){function b(a){var b,c;for(b in d)if(d.hasOwnProperty(b)&&(c=d[b],c.regex.test(a)))return c}function c(a){var c=b(a);return c?c.name:void 0}var d={rgba:{regex:/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([\d\.]+)\s*\)/i,name:"rgba"},rgb:{regex:/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/i,name:"rgb"},hex6:{regex:/^#([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])/i,name:"hex",radix:16},hex3:{regex:/^#([0-9a-f])([0-9a-f])([0-9a-f])/i,name:"hex",radix:16}},e=function(a){return new RegExp("(^|\\s|;)"+a+"\\s*:\\s*[^;$]+","gi")};a.quirks.styleParser={getColorParseMethod:b,getColorFormat:c,parseColor:function(c,f){var g,h,i,j,k,l=c;if(f){if(g=e(f),!(h=c.match(g)))return!1;h=h.pop().split(":")[1],l=a.lang.string(h).trim()}return(i=b(l))&&(j=l.match(i.regex))?(k=i.radix||10,i===d.hex3?(j.shift(),j.push(1),a.lang.array(j).map(function(a,b){return 3>b?parseInt(a,k)*k+parseInt(a,k):parseFloat(a)})):(j.shift(),j[3]||j.push(1),a.lang.array(j).map(function(a,b){return 3>b?parseInt(a,k):parseFloat(a)}))):!1},unparseColor:function(a,b){var c=16;return"hex"===b?(a[0].toString(c)+a[1].toString(c)+a[2].toString(c)).toUpperCase():"hash"===b?"#"+(a[0].toString(c)+a[1].toString(c)+a[2].toString(c)).toUpperCase():"rgb"===b?"rgb("+a[0]+","+a[1]+","+a[2]+")":"rgba"===b?"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")":"csv"===b?a[0]+","+a[1]+","+a[2]+","+a[3]:a[3]&&1!==a[3]?"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")":"rgb("+a[0]+","+a[1]+","+a[2]+")"},parseFontSize:function(b){var c=b.match(e("font-size"));return c?a.lang.string(c[c.length-1].split(":")[1]).trim():!1}}}(wysihtml5),function(a){function b(a){var b=0;if(a.parentNode)do b+=a.offsetTop||0,a=a.offsetParent;while(a);return b}function c(a,b){for(var c=0;b!==a;)if(c++,b=b.parentNode,!b)throw new Error("not a descendant of ancestor!");return c}function d(b){var c=document.createElement("span"),d=function(a){b.removeEventListener("mouseup",d),b.removeEventListener("keydown",d),b.removeEventListener("touchstart",d),b.removeEventListener("focus",d),b.removeEventListener("blur",d),b.removeEventListener("paste",e),b.removeEventListener("drop",e),b.removeEventListener("beforepaste",e),c&&c.parentNode&&c.parentNode.removeChild(c)},e=function(a){c&&c.parentNode&&setTimeout(d,0)};return c.appendChild(document.createTextNode(a.INVISIBLE_SPACE)),c.className="_wysihtml5-temp-caret-fix",c.style.display="block",c.style.minWidth="1px",c.style.height="0px",b.addEventListener("mouseup",d),b.addEventListener("keydown",d),b.addEventListener("touchstart",d),b.addEventListener("focus",d),b.addEventListener("blur",d),b.addEventListener("paste",e),b.addEventListener("drop",e),b.addEventListener("beforepaste",e),c}function e(a){if(!a.canSurroundContents())for(var b=a.commonAncestorContainer,d=c(b,a.startContainer),e=c(b,a.endContainer);!a.canSurroundContents();)d>e?(a.setStartBefore(a.startContainer),d=c(b,a.startContainer)):(a.setEndAfter(a.endContainer),e=c(b,a.endContainer))}var f=a.dom;a.Selection=Base.extend({constructor:function(a,b,c){window.rangy.init(),this.editor=a,this.composer=a.composer,this.doc=this.composer.doc,this.win=this.composer.win,this.contain=b,this.unselectableClass=c||!1},getBookmark:function(){var a=this.getRange();return a&&a.cloneRange()},setBookmark:function(a){a&&this.setSelection(a)},setBefore:function(a){var b=rangy.createRange(this.doc);return b.setStartBefore(a),b.setEndBefore(a),this.setSelection(b)},createTemporaryCaretSpaceAfter:function(b){var c=this.doc.createElement("span"),d=this.doc.createTextNode(a.INVISIBLE_SPACE),e=function(b){var d;this.contain.removeEventListener("mouseup",e),this.contain.removeEventListener("keydown",g),this.contain.removeEventListener("touchstart",e),this.contain.removeEventListener("focus",e),this.contain.removeEventListener("blur",e),this.contain.removeEventListener("paste",f),this.contain.removeEventListener("drop",f),this.contain.removeEventListener("beforepaste",f),c&&c.parentNode&&(c.innerHTML=c.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),/[^\s]+/.test(c.innerHTML)?(d=c.lastChild,a.dom.unwrap(c),this.setAfter(d)):c.parentNode.removeChild(c))}.bind(this),f=function(a){c&&c.parentNode&&setTimeout(e,0)},g=function(a){8===a.which||91===a.which||17===a.which||86===a.which&&(a.ctrlKey||a.metaKey)||e()};return c.className="_wysihtml5-temp-caret-fix",c.style.position="absolute",c.style.display="block",c.style.minWidth="1px",c.style.zIndex="99999",c.appendChild(d),b.parentNode.insertBefore(c,b.nextSibling),this.setBefore(d),this.contain.addEventListener("mouseup",e),this.contain.addEventListener("keydown",g),this.contain.addEventListener("touchstart",e),this.contain.addEventListener("focus",e),this.contain.addEventListener("blur",e),this.contain.addEventListener("paste",f),this.contain.addEventListener("drop",f),this.contain.addEventListener("beforepaste",f),c},setAfter:function(b,c,d){var e,f=this.win,g=rangy.createRange(this.doc),h=function(){var d=b.parentNode,g=d?d.childNodes[d.childNodes.length-1]:null;if(!e||g===b&&1===b.nodeType&&"block"===f.getComputedStyle(b).display)if(c){var h=this.doc.createTextNode(a.INVISIBLE_SPACE);b.parentNode.insertBefore(h,b.nextSibling),this.selectNode(h),setTimeout(function(){h&&h.parentNode&&h.parentNode.removeChild(h)},0)}else this.createTemporaryCaretSpaceAfter(b)}.bind(this);if(g.setStartAfter(b),g.setEndAfter(b),document.activeElement&&document.activeElement===this.composer.element)e=this.setSelection(g),h(),d&&d(e);else{var i=this.composer.getScrollPos();this.composer.element.focus(),this.composer.setScrollPos(i),setTimeout(function(){e=this.setSelection(g),h(),d&&d(e)}.bind(this),0)}},selectNode:function(b,c){var d=rangy.createRange(this.doc),e=b.nodeType===a.ELEMENT_NODE,g="canHaveHTML"in b?b.canHaveHTML:"IMG"!==b.nodeName,h=e?b.innerHTML:b.data,i=""===h||h===a.INVISIBLE_SPACE,j=f.getStyle("display").from(b),k="block"===j||"list-item"===j;if(i&&e&&g&&!c)try{b.innerHTML=a.INVISIBLE_SPACE}catch(l){}g?d.selectNodeContents(b):d.selectNode(b),g&&i&&e?d.collapse(k):g&&i&&(d.setStartAfter(b),d.setEndAfter(b)),this.setSelection(d)},getSelectedNode:function(a){var b,c;return a&&this.doc.selection&&"Control"===this.doc.selection.type&&(c=this.doc.selection.createRange(),c&&c.length)?c.item(0):(b=this.getSelection(this.doc),b.focusNode===b.anchorNode?b.focusNode:(c=this.getRange(this.doc),c?c.commonAncestorContainer:this.doc.body))},fixSelBorders:function(){var a=this.getRange();e(a),this.setSelection(a)},getSelectedOwnNodes:function(a){for(var b=this.getOwnRanges(),c=[],d=0,e=b.length;e>d;d++)c.push(b[d].commonAncestorContainer||this.doc.body);return c},findNodesInSelection:function(b){for(var c,d=this.getOwnRanges(),e=[],f=0,g=d.length;g>f;f++)c=d[f].getNodes([1],function(c){return a.lang.array(b).contains(c.nodeName)}),e=e.concat(c);return e},filterElements:function(a){for(var b,c=this.getOwnRanges(),d=[],e=0,f=c.length;f>e;e++)b=c[e].getNodes([1],function(b){return a(b,c[e])}),d=d.concat(b);return d},containsUneditable:function(){for(var a=this.getOwnUneditables(),b=this.getSelection(),c=0,d=a.length;d>c;c++)if(b.containsNode(a[c]))return!0;return!1},deleteContents:function(){var b,c,d,e,f=this.getRange();if(this.unselectableClass){(b=a.dom.getParentElement(f.startContainer,{query:"."+this.unselectableClass},!1,this.contain))&&f.setStartBefore(b),(c=a.dom.getParentElement(f.endContainer,{query:"."+this.unselectableClass},!1,this.contain))&&f.setEndAfter(c),d=f.getNodes([1],function(b){return a.dom.hasClass(b,this.unselectableClass)}.bind(this));for(var g=d.length;g--;)try{e=new CustomEvent("wysihtml5:uneditable:delete"),d[g].dispatchEvent(e)}catch(h){}}f.deleteContents(),this.setSelection(f)},getPreviousNode:function(b,c){var d;if(!b){var e=this.getSelection();b=e.anchorNode}if(b===this.contain)return!1;var f,g=b.previousSibling;return g===this.contain?!1:(g&&3!==g.nodeType&&1!==g.nodeType?g=this.getPreviousNode(g,c):g&&3===g.nodeType&&/^\s*$/.test(g.textContent)?g=this.getPreviousNode(g,c):c&&g&&1===g.nodeType?(d=a.dom.getStyle("display").from(g),a.lang.array(["BR","HR","IMG"]).contains(g.nodeName)||a.lang.array(["block","inline-block","flex","list-item","table"]).contains(d)||!/^[\s]*$/.test(g.innerHTML)||(g=this.getPreviousNode(g,c))):g||b===this.contain||(f=b.parentNode,f!==this.contain&&(g=this.getPreviousNode(f,c))),g!==this.contain?g:!1)},getSelectionParentsByTag:function(b){for(var c,d=this.getSelectedOwnNodes(),e=[],f=0,g=d.length;g>f;f++)c=d[f].nodeName&&"LI"===d[f].nodeName?d[f]:a.dom.getParentElement(d[f],{query:"li"},!1,this.contain),c&&e.push(c);return e.length?e:null},getRangeToNodeEnd:function(){if(this.isCollapsed()){var a=this.getRange(),b=a.startContainer,c=a.startOffset,d=rangy.createRange(this.doc);return d.selectNodeContents(b),d.setStart(b,c),d}},caretIsLastInSelection:function(){var a=(rangy.createRange(this.doc),this.getSelection(),this.getRangeToNodeEnd().cloneContents()),b=a.textContent;return/^\s*$/.test(b)},caretIsFirstInSelection:function(){var b=rangy.createRange(this.doc),c=this.getSelection(),d=this.getRange(),e=d.startContainer;return e?e.nodeType===a.TEXT_NODE?this.isCollapsed()&&e.nodeType===a.TEXT_NODE&&/^\s*$/.test(e.data.substr(0,d.startOffset)):(b.selectNodeContents(this.getRange().commonAncestorContainer),b.collapse(!0),this.isCollapsed()&&(b.startContainer===c.anchorNode||b.endContainer===c.anchorNode)&&b.startOffset===c.anchorOffset):void 0},caretIsInTheBeginnig:function(b){var c=this.getSelection(),d=c.anchorNode,e=c.anchorOffset;return b&&d?0===e&&(d.nodeName&&d.nodeName===b.toUpperCase()||a.dom.getParentElement(d.parentNode,{query:b},1)):d?0===e&&!this.getPreviousNode(d,!0):void 0},getBeforeSelection:function(b){var c,d,e=this.getSelection(),f=e.isBackwards()?e.focusNode:e.anchorNode,g=e.isBackwards()?e.focusOffset:e.anchorOffset,h=this.createRange();if(d=a.dom.getParentElement(f,{query:"._wysihtml5-temp-caret-fix"},1),d&&(f=d.parentNode,g=Array.prototype.indexOf.call(f.childNodes,d)),f){if(g>0)return 3===f.nodeType?(h.setStart(f,0),h.setEnd(f,g),{type:"text",range:h,offset:g,node:f}):(h.setStartBefore(f.childNodes[0]),c=f.childNodes[g-1],h.setEndAfter(c),{type:"element",range:h,offset:g,node:c});if(h.setStartAndEnd(f,0),b){var i=this.getPreviousNode(f,!0),j=null;if(i&&(j=1===i.nodeType&&a.dom.hasClass(i,this.unselectableClass)?i:a.dom.domNode(i).lastLeafNode()),j)return{type:"leafnode",range:h,offset:g,node:j}}return{type:"none",range:h,offset:g,node:f}}return null},executeAndRestoreRangy:function(a,b){var c=rangy.saveSelection(this.win);if(c)try{a()}catch(d){setTimeout(function(){throw d},0)}else a();rangy.restoreSelection(c)},executeAndRestore:function(b,c){var d,e,g,h,i,j,k,l,m=this.doc.body,n=c&&m.scrollTop,o=c&&m.scrollLeft,p="_wysihtml5-temp-placeholder",q=''+a.INVISIBLE_SPACE+"",r=this.getRange(!0);if(!r)return void b(m,m);r.collapsed||(k=r.cloneRange(),j=k.createContextualFragment(q),k.collapse(!1),k.insertNode(j),k.detach()),i=r.createContextualFragment(q),r.insertNode(i),j&&(d=this.contain.querySelectorAll("."+p),r.setStartBefore(d[0]),r.setEndAfter(d[d.length-1])),this.setSelection(r);try{b(r.startContainer,r.endContainer)}catch(s){setTimeout(function(){throw s},0)}if(d=this.contain.querySelectorAll("."+p),d&&d.length){l=rangy.createRange(this.doc),g=d[0].nextSibling,d.length>1&&(h=d[d.length-1].previousSibling),h&&g?(l.setStartBefore(g),l.setEndAfter(h)):(e=this.doc.createTextNode(a.INVISIBLE_SPACE),f.insert(e).after(d[0]),l.setStartBefore(e),l.setEndAfter(e)),this.setSelection(l);for(var t=d.length;t--;)d[t].parentNode.removeChild(d[t])}else this.contain.focus();c&&(m.scrollTop=n,m.scrollLeft=o);try{d.parentNode.removeChild(d)}catch(u){}},set:function(a,b){var c=rangy.createRange(this.doc);c.setStart(a,b||0),this.setSelection(c)},insertHTML:function(a){var b,c=(rangy.createRange(this.doc),this.doc.createElement("DIV")),d=this.doc.createDocumentFragment();for(c.innerHTML=a,b=c.lastChild;c.firstChild;)d.appendChild(c.firstChild);this.insertNode(d),b&&this.setAfter(b)},insertNode:function(a){var b=this.getRange();b&&b.insertNode(a)},canAppendChild:function(a){var b,c,d=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],e=this.getRange();return b=a||e.startContainer,b&&(c=(b.tagName||b.nodeName).toLowerCase()),-1===d.indexOf(c)},splitElementAtCaret:function(b,c){var d,e,f,g,h,i=this.getSelection();if(i.rangeCount>0){d=i.getRangeAt(0).cloneRange(),d.setEndAfter(b),e=d.extractContents(),h=e.childNodes;for(var j=h.length;j--;)a.dom.domNode(h[j]).is.visible()||e.removeChild(h[j]);b.parentNode.insertBefore(e,b.nextSibling),c?(f=c.firstChild||c,g=c.lastChild||c,b.parentNode.insertBefore(c,b.nextSibling),f&&g&&(d.setStartBefore(f),d.setEndAfter(g),this.setSelection(d))):(d.setStartAfter(b),d.setEndAfter(b)),a.dom.domNode(b).is.visible()||(""===a.dom.getTextContent(b)?b.parentNode.removeChild(b):b.parentNode.replaceChild(this.doc.createTextNode(" "),b))}},surround:function(a){var b,c=this.getOwnRanges(),d=[];if(0==c.length)return d;for(var e=c.length;e--;){b=this.doc.createElement(a.nodeName),d.push(b),a.className&&(b.className=a.className),a.cssStyle&&b.setAttribute("style",a.cssStyle);try{c[e].surroundContents(b),this.selectNode(b)}catch(f){b.appendChild(c[e].extractContents()),c[e].insertNode(b)}}return d},deblockAndSurround:function(b){var c,d,e,f=this.doc.createElement("div"),g=rangy.createRange(this.doc);if(f.className=b.className,this.composer.commands.exec("formatBlock",b),c=this.contain.querySelectorAll("."+b.className),c[0])for(c[0].parentNode.insertBefore(f,c[0]),g.setStartBefore(c[0]),g.setEndAfter(c[c.length-1]),d=g.extractContents();d.firstChild;)if(e=d.firstChild,1==e.nodeType&&a.dom.hasClass(e,b.className)){for(;e.firstChild;)f.appendChild(e.firstChild);"BR"!==e.nodeName&&f.appendChild(this.doc.createElement("br")),d.removeChild(e)}else f.appendChild(e);else f=null;return f},scrollIntoView:function(){var c,d=this.doc,e=5,f=d.documentElement.scrollHeight>d.documentElement.offsetHeight,g=d._wysihtml5ScrollIntoViewElement=d._wysihtml5ScrollIntoViewElement||function(){var b=d.createElement("span");return b.innerHTML=a.INVISIBLE_SPACE,b}();f&&(this.insertNode(g),c=b(g),g.parentNode.removeChild(g),c>=d.body.scrollTop+d.documentElement.offsetHeight-e&&(d.body.scrollTop=c))},selectLine:function(){a.browser.supportsSelectionModify()?this._selectLine_W3C():this.doc.selection&&this._selectLine_MSIE()},_selectLine_W3C:function(){var a=this.win.getSelection();a.modify("move","left","lineboundary"),
-a.modify("extend","right","lineboundary")},toLineBoundary:function(b,c){if(c="undefined"==typeof c?!1:c,a.browser.supportsSelectionModify()){var d=this.win.getSelection();d.modify("extend",b,"lineboundary"),c&&("left"===b?d.collapseToStart():"right"===b&&d.collapseToEnd())}},_selectLine_MSIE:function(){var a,b,c,d,e,f=this.doc.selection.createRange(),g=f.boundingTop,h=this.doc.body.scrollWidth;if(f.moveToPoint){for(0===g&&(c=this.doc.createElement("span"),this.insertNode(c),g=c.offsetTop,c.parentNode.removeChild(c)),g+=1,d=-10;h>d;d+=2)try{f.moveToPoint(d,g);break}catch(i){}for(a=g,b=this.doc.selection.createRange(),e=h;e>=0;e--)try{b.moveToPoint(e,a);break}catch(j){}f.setEndPoint("EndToEnd",b),f.select()}},getText:function(){var a=this.getSelection();return a?a.toString():""},getNodes:function(a,b){var c=this.getRange();return c?c.getNodes(Array.isArray(a)?a:[a],b):[]},getOwnNodes:function(a,b,c){for(var d=this.getOwnRanges(),e=[],f=0,g=d.length;g>f;f++)d[f]&&(c&&d[f].splitBoundaries(),e=e.concat(d[f].getNodes(Array.isArray(a)?a:[a],b)));return e},fixRangeOverflow:function(a){if(this.contain&&this.contain.firstChild&&a){var b=a.compareNode(this.contain);if(2!==b)1===b&&a.setStartBefore(this.contain.firstChild),0===b&&a.setEndAfter(this.contain.lastChild),3===b&&(a.setStartBefore(this.contain.firstChild),a.setEndAfter(this.contain.lastChild));else if(this._detectInlineRangeProblems(a)){var c=a.endContainer.previousElementSibling;c&&a.setEnd(c,this._endOffsetForNode(c))}}},_endOffsetForNode:function(a){var b=document.createRange();return b.selectNodeContents(a),b.endOffset},_detectInlineRangeProblems:function(a){var b=f.compareDocumentPosition(a.startContainer,a.endContainer);return 0==a.endOffset&&4&b},getRange:function(a){var b=this.getSelection(),c=b&&b.rangeCount&&b.getRangeAt(0);return a!==!0&&this.fixRangeOverflow(c),c},getOwnUneditables:function(){var b=f.query(this.contain,"."+this.unselectableClass),c=f.query(b,"."+this.unselectableClass);return a.lang.array(b).without(c)},getOwnRanges:function(){var a,b=[],c=this.getRange();if(c&&b.push(c),this.unselectableClass&&this.contain&&c){var d,e=this.getOwnUneditables();if(e.length>0)for(var f=0,g=e.length;g>f;f++){a=[];for(var h=0,i=b.length;i>h;h++){if(b[h])switch(b[h].compareNode(e[f])){case 2:break;case 3:d=b[h].cloneRange(),d.setEndBefore(e[f]),a.push(d),d=b[h].cloneRange(),d.setStartAfter(e[f]),a.push(d);break;default:a.push(b[h])}b=a}}}return b},getSelection:function(){return rangy.getSelection(this.win)},setSelection:function(a){var b=rangy.getSelection(this.win);return b.setSingleRange(a),b&&b.anchorNode&&b.focusNode?b:null},selectAll:function(){var b,c=this.createRange(),e=this.composer,f=this,g=d(this.composer.element),h=d(this.composer.element),i=function(){c.setStart(e.element,0),c.setEnd(e.element,e.element.childNodes.length),b=f.setSelection(c)},j=function(){return!b||b.nativeSelection&&b.nativeSelection.type&&("Caret"===b.nativeSelection.type||"None"===b.nativeSelection.type)};a.dom.removeInvisibleSpaces(this.composer.element),i(),this.composer.element.firstChild&&j()&&(this.composer.element.appendChild(g),i(),j()&&(g.parentNode.removeChild(g),this.composer.element.insertBefore(h,this.composer.element.firstChild),i(),j()&&(this.composer.element.appendChild(g),i())))},createRange:function(){return rangy.createRange(this.doc)},isCollapsed:function(){return this.getSelection().isCollapsed},getHtml:function(){return this.getSelection().toHtml()},getPlainText:function(){return this.getSelection().toString()},isEndToEndInNode:function(b){var c=this.getRange(),d=c.commonAncestorContainer,e=c.startContainer,f=c.endContainer;if(d.nodeType===a.TEXT_NODE&&(d=d.parentNode),e.nodeType===a.TEXT_NODE&&!/^\s*$/.test(e.data.substr(c.startOffset)))return!1;if(f.nodeType===a.TEXT_NODE&&!/^\s*$/.test(f.data.substr(c.endOffset)))return!1;for(;e&&e!==d;){if(e.nodeType!==a.TEXT_NODE&&!a.dom.contains(d,e))return!1;if(a.dom.domNode(e).prev({ignoreBlankTexts:!0}))return!1;e=e.parentNode}for(;f&&f!==d;){if(f.nodeType!==a.TEXT_NODE&&!a.dom.contains(d,f))return!1;if(a.dom.domNode(f).next({ignoreBlankTexts:!0}))return!1;f=f.parentNode}return a.lang.array(b).contains(d.nodeName)?d:!1},isInThisEditable:function(){var b=this.getSelection(),c=b.focusNode,d=b.anchorNode;return c&&1!==c.nodeType&&(c=c.parentNode),d&&1!==d.nodeType&&(d=d.parentNode),d&&c&&(a.dom.contains(this.composer.element,c)||this.composer.element===c)&&(a.dom.contains(this.composer.element,d)||this.composer.element===d)},deselect:function(){var a=this.getSelection();a&&a.removeAllRanges()}})}(wysihtml5),function(a,b){function c(a,b,c){if(!a.className)return!1;var d=a.className.match(c)||[];return d[d.length-1]===b}function d(a,b){if(!a.getAttribute||!a.getAttribute("style"))return!1;a.getAttribute("style").match(b);return a.getAttribute("style").match(b)?!0:!1}function e(a,b,c){a.getAttribute("style")?(h(a,c),a.getAttribute("style")&&!/^\s*$/.test(a.getAttribute("style"))?a.setAttribute("style",b+";"+a.getAttribute("style")):a.setAttribute("style",b)):a.setAttribute("style",b)}function f(a,b,c){a.className?(g(a,c),a.className+=" "+b):a.className=b}function g(a,b){a.className&&(a.className=a.className.replace(b,""))}function h(a,b){var c,d=[];if(a.getAttribute("style")){c=a.getAttribute("style").split(";");for(var e=c.length;e--;)c[e].match(b)||/^\s*$/.test(c[e])||d.push(c[e]);d.length?a.setAttribute("style",d.join(";")):a.removeAttribute("style")}}function i(a,b){var c=[],d=b.split(";"),e=a.getAttribute("style");if(e){e=e.replace(/\s/gi,"").toLowerCase(),c.push(new RegExp("(^|\\s|;)"+b.replace(/\s/gi,"").replace(/([\(\)])/gi,"\\$1").toLowerCase().replace(";",";?").replace(/rgb\\\((\d+),(\d+),(\d+)\\\)/gi,"\\s?rgb\\($1,\\s?$2,\\s?$3\\)"),"gi"));for(var f=d.length;f-->0;)/^\s*$/.test(d[f])||c.push(new RegExp("(^|\\s|;)"+d[f].replace(/\s/gi,"").replace(/([\(\)])/gi,"\\$1").toLowerCase().replace(";",";?").replace(/rgb\\\((\d+),(\d+),(\d+)\\\)/gi,"\\s?rgb\\($1,\\s?$2,\\s?$3\\)"),"gi"));for(var g=0,h=c.length;h>g;g++)if(e.match(c[g]))return c[g]}return!1}function j(c,d,e,f){return e?i(c,e):f?a.dom.hasClass(c,f):b.dom.arrayContains(d,c.tagName.toLowerCase())}function k(a,b,c,d){for(var e=a.length;e--;)if(!j(a[e],b,c,d))return!1;return a.length?!0:!1}function l(a,b,c){var d=i(a,b);return d?(h(a,d),"remove"):(e(a,b,c),"change")}function m(a,b){return a.className.replace(u," ")==b.className.replace(u," ")}function n(a){for(var b=a.parentNode;a.firstChild;)b.insertBefore(a.firstChild,a);b.removeChild(a)}function o(a,b){if(a.attributes.length!=b.attributes.length)return!1;for(var c,d,e,f=0,g=a.attributes.length;g>f;++f)if(c=a.attributes[f],e=c.name,"class"!=e){if(d=b.attributes.getNamedItem(e),c.specified!=d.specified)return!1;if(c.specified&&c.nodeValue!==d.nodeValue)return!1}return!0}function p(a,c){return b.dom.isCharacterDataNode(a)?0==c?!!a.previousSibling:c==a.length?!!a.nextSibling:!0:c>0&&ce;++e)a=this.textNodes[e],b=a.parentNode,d[e]=a.data,e&&(b.removeChild(a),b.hasChildNodes()||b.parentNode.removeChild(b));return this.firstTextNode.data=c=d.join(""),c},getLength:function(){for(var a=this.textNodes.length,b=0;a--;)b+=this.textNodes[a].length;return b},toString:function(){for(var a=[],b=0,c=this.textNodes.length;c>b;++b)a[b]="'"+this.textNodes[b].data+"'";return"[Merge("+a.join(",")+")]"}},s.prototype={getAncestorWithClass:function(d){for(var e;d;){if(e=this.cssClass?c(d,this.cssClass,this.similarClassRegExp):""!==this.cssStyle?!1:!0,d.nodeType==a.ELEMENT_NODE&&"false"!=d.getAttribute("contenteditable")&&b.dom.arrayContains(this.tagNames,d.tagName.toLowerCase())&&e)return d;d=d.parentNode}return!1},getAncestorWithStyle:function(c){for(var e;c;){if(e=this.cssStyle?d(c,this.similarStyleRegExp):!1,c.nodeType==a.ELEMENT_NODE&&"false"!=c.getAttribute("contenteditable")&&b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase())&&e)return c;c=c.parentNode}return!1},getMatchingAncestor:function(a){var b=this.getAncestorWithClass(a),c=!1;return b?this.cssStyle&&(c="class"):(b=this.getAncestorWithStyle(a),b&&(c="style")),{element:b,type:c}},postApply:function(a,b){for(var c,d,e,f=a[0],g=a[a.length-1],h=[],i=f,j=g,k=0,l=g.length,m=0,n=a.length;n>m;++m)d=a[m],e=null,d&&d.parentNode&&(e=this.getAdjacentMergeableTextNode(d.parentNode,!1)),e?(c||(c=new r(e),h.push(c)),c.textNodes.push(d),d===f&&(i=c.firstTextNode,k=i.length),d===g&&(j=c.firstTextNode,l=c.getLength())):c=null;if(g&&g.parentNode){var o=this.getAdjacentMergeableTextNode(g.parentNode,!0);o&&(c||(c=new r(g),h.push(c)),c.textNodes.push(o))}if(h.length){for(m=0,n=h.length;n>m;++m)h[m].doMerge();b.setStart(i,k),b.setEnd(j,l)}},getAdjacentMergeableTextNode:function(b,c){var d,e=b.nodeType==a.TEXT_NODE,f=e?b.parentNode:b,g=c?"nextSibling":"previousSibling";if(e){if(d=b[g],d&&d.nodeType==a.TEXT_NODE)return d}else if(d=f[g],d&&this.areElementsMergeable(b,d))return d[c?"firstChild":"lastChild"];return null},areElementsMergeable:function(a,c){return b.dom.arrayContains(this.tagNames,(a.tagName||"").toLowerCase())&&b.dom.arrayContains(this.tagNames,(c.tagName||"").toLowerCase())&&m(a,c)&&o(a,c)},createContainer:function(a){var b=a.createElement(this.tagNames[0]);return this.cssClass&&(b.className=this.cssClass),this.cssStyle&&b.setAttribute("style",this.cssStyle),b},applyToTextNode:function(a){var c=a.parentNode;if(1==c.childNodes.length&&b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase()))this.cssClass&&f(c,this.cssClass,this.similarClassRegExp),this.cssStyle&&e(c,this.cssStyle,this.similarStyleRegExp);else{var d=this.createContainer(b.dom.getDocument(a));a.parentNode.insertBefore(d,a),d.appendChild(a)}},isRemovable:function(c){return b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase())&&""===a.lang.string(c.className).trim()&&(!c.getAttribute("style")||""===a.lang.string(c.getAttribute("style")).trim())},undoToTextNode:function(a,b,c,d){var e=c?!1:!0,f=c||d,h=!1;if(!b.containsNode(f)){var i=b.cloneRange();i.selectNode(f),i.isPointInRange(b.endContainer,b.endOffset)&&p(b.endContainer,b.endOffset)&&(q(f,b.endContainer,b.endOffset,this.container),b.setEndAfter(f)),i.isPointInRange(b.startContainer,b.startOffset)&&p(b.startContainer,b.startOffset)&&(f=q(f,b.startContainer,b.startOffset,this.container))}!e&&this.similarClassRegExp&&g(f,this.similarClassRegExp),e&&this.similarStyleRegExp&&(h="change"===l(f,this.cssStyle,this.similarStyleRegExp)),this.isRemovable(f)&&!h&&n(f)},applyToRange:function(b){for(var c,d=b.length;d--;){if(c=b[d].getNodes([a.TEXT_NODE]),!c.length)try{var e=this.createContainer(b[d].endContainer.ownerDocument);return b[d].surroundContents(e),void this.selectNode(b[d],e)}catch(f){}if(b[d].splitBoundaries(),c=b[d].getNodes([a.TEXT_NODE]),c.length){for(var g,h=0,i=c.length;i>h;++h)g=c[h],this.getMatchingAncestor(g).element||this.applyToTextNode(g);b[d].setStart(c[0],0),g=c[c.length-1],b[d].setEnd(g,g.length),this.normalize&&this.postApply(c,b[d])}}},undoToRange:function(b){for(var c,d,e,f=b.length;f--;){if(c=b[f].getNodes([a.TEXT_NODE]),c.length)b[f].splitBoundaries(),c=b[f].getNodes([a.TEXT_NODE]);else{var g=b[f].endContainer.ownerDocument,h=g.createTextNode(a.INVISIBLE_SPACE);b[f].insertNode(h),b[f].selectNode(h),c=[h]}for(var i=0,j=c.length;j>i;++i)b[f].isValid()&&(d=c[i],e=this.getMatchingAncestor(d),"style"===e.type?this.undoToTextNode(d,b[f],!1,e.element):e.element&&this.undoToTextNode(d,b[f],e.element));1==j?this.selectNode(b[f],c[0]):(b[f].setStart(c[0],0),d=c[c.length-1],b[f].setEnd(d,d.length),this.normalize&&this.postApply(c,b[f]))}},selectNode:function(b,c){var d=c.nodeType===a.ELEMENT_NODE,e="canHaveHTML"in c?c.canHaveHTML:!0,f=d?c.innerHTML:c.data,g=""===f||f===a.INVISIBLE_SPACE;if(g&&d&&e)try{c.innerHTML=a.INVISIBLE_SPACE}catch(h){}b.selectNodeContents(c),g&&d?b.collapse(!1):g&&(b.setStartAfter(c),b.setEndAfter(c))},getTextSelectedByRange:function(a,b){var c=b.cloneRange();c.selectNodeContents(a);var d=c.intersection(b),e=d?d.toString():"";return c.detach(),e},isAppliedToRange:function(b){for(var c,d,e=[],f="full",g=b.length;g--;){if(d=b[g].getNodes([a.TEXT_NODE]),!d.length)return c=this.getMatchingAncestor(b[g].startContainer).element,c?{elements:[c],coverage:f}:!1;for(var h,i=0,j=d.length;j>i;++i)h=this.getTextSelectedByRange(d[i],b[g]),c=this.getMatchingAncestor(d[i]).element,c&&""!=h?(e.push(c),1===a.dom.getTextNodes(c,!0).length?f="full":"full"===f&&(f="inline")):c||(f="partial")}return e.length?{elements:e,coverage:f}:!1},toggleRange:function(a){var b,c=this.isAppliedToRange(a);c?"full"===c.coverage?this.undoToRange(a):"inline"===c.coverage?(b=k(c.elements,this.tagNames,this.cssStyle,this.cssClass),this.undoToRange(a),b||this.applyToRange(a)):(k(c.elements,this.tagNames,this.cssStyle,this.cssClass)||this.undoToRange(a),this.applyToRange(a)):this.applyToRange(a)}},a.selection.HTMLApplier=s}(wysihtml5,rangy),wysihtml5.Commands=Base.extend({constructor:function(a){this.editor=a,this.composer=a.composer,this.doc=this.composer.doc},support:function(a){return wysihtml5.browser.supportsCommand(this.doc,a)},exec:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.exec,f=null;if(this.composer.hasPlaceholderSet()&&!wysihtml5.lang.array(["styleWithCSS","enableObjectResizing","enableInlineTableEditing"]).contains(a)&&(this.composer.element.innerHTML="",this.composer.selection.selectNode(this.composer.element)),this.editor.fire("beforecommand:composer"),e)d.unshift(this.composer),f=e.apply(c,d);else try{f=this.doc.execCommand(a,!1,b)}catch(g){}return this.editor.fire("aftercommand:composer"),f},remove:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.remove;return e?(d.unshift(this.composer),e.apply(c,d)):void 0},state:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.state;if(e)return d.unshift(this.composer),e.apply(c,d);try{return this.doc.queryCommandState(a)}catch(f){return!1}},stateValue:function(a){var b=wysihtml5.commands[a],c=wysihtml5.lang.array(arguments).get(),d=b&&b.stateValue;return d?(c.unshift(this.composer),d.apply(b,c)):!1}}),function(a){var b={nodeName:"B",toggle:!0};a.commands.bold={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){function b(b){return a.lang.object({}).merge(c).merge({attribute:b}).get()}var c={nodeName:"A",toggle:!1};a.commands.createLink={exec:function(c,d,e){var f=b(e);if(c.selection.isCollapsed()&&!this.state(c,d)){var g=c.doc.createTextNode(f.attribute.href);c.selection.insertNode(g),c.selection.selectNode(g)}a.commands.formatInline.exec(c,d,f)},state:function(b,d){return a.commands.formatInline.state(b,d,c)}}}(wysihtml5),function(a){var b={nodeName:"A"};a.commands.removeLink={exec:function(c,d){a.commands.formatInline.remove(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b=/wysiwyg-font-size-[0-9a-z\-]+/g;a.commands.fontSize={exec:function(c,d,e){a.commands.formatInline.exec(c,d,{className:"wysiwyg-font-size-"+e,classRegExp:b,toggle:!0})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{className:"wysiwyg-font-size-"+d})}}}(wysihtml5),function(a){a.commands.fontSizeStyle={exec:function(b,c,d){d=d.size||d,/^\s*$/.test(d)||a.commands.formatInline.exec(b,c,{styleProperty:"fontSize",styleValue:d,toggle:!1})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{styleProperty:"fontSize",styleValue:d||void 0})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"fontSize"})},stateValue:function(b,c){var d,e=this.state(b,c);return e&&a.lang.object(e).isArray()&&(e=e[0]),e&&(d=e.getAttribute("style"))?a.quirks.styleParser.parseFontSize(d):!1}}}(wysihtml5),function(a){var b=/wysiwyg-color-[0-9a-z]+/g;a.commands.foreColor={exec:function(c,d,e){a.commands.formatInline.exec(c,d,{className:"wysiwyg-color-"+e,classRegExp:b,toggle:!0})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{className:"wysiwyg-color-"+d})}}}(wysihtml5),function(a){a.commands.foreColorStyle={exec:function(b,c,d){var e,f;d&&(e=a.quirks.styleParser.parseColor("color:"+(d.color||d),"color"),e&&(f=(1===e[3]?"rgb("+[e[0],e[1],e[2]].join(", "):"rgba("+e.join(", "))+")",a.commands.formatInline.exec(b,c,{styleProperty:"color",styleValue:f})))},state:function(b,c,d){var e,f=d?a.quirks.styleParser.parseColor("color:"+(d.color||d),"color"):null;return f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")"),a.commands.formatInline.state(b,c,{styleProperty:"color",styleValue:e})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"color"})},stateValue:function(b,c,d){var e,f=this.state(b,c),g=!1;return f&&a.lang.object(f).isArray()&&(f=f[0]),f&&(e=f.getAttribute("style"))?(g=a.quirks.styleParser.parseColor(e,"color"),a.quirks.styleParser.unparseColor(g,d)):!1}}}(wysihtml5),function(a){a.commands.bgColorStyle={exec:function(b,c,d){var e,f=a.quirks.styleParser.parseColor("background-color:"+(d.color||d),"background-color");f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")",a.commands.formatInline.exec(b,c,{styleProperty:"backgroundColor",styleValue:e}))},state:function(b,c,d){var e,f=d?a.quirks.styleParser.parseColor("background-color:"+(d.color||d),"background-color"):null;return f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")"),a.commands.formatInline.state(b,c,{styleProperty:"backgroundColor",styleValue:e})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"backgroundColor"})},stateValue:function(b,c,d){var e,f=this.state(b,c),g=!1;return f&&a.lang.object(f).isArray()&&(f=f[0]),f&&(e=f.getAttribute("style"))?(g=a.quirks.styleParser.parseColor(e,"background-color"),a.quirks.styleParser.unparseColor(g,d)):!1}}}(wysihtml5),function(a){function b(a){return{nodeName:a.nodeName||null,className:a.classRegExp?null:a.className||null,classRegExp:a.classRegExp||null,styleProperty:a.styleProperty||null}}function c(b){for(var c=b.element,d=c.querySelectorAll(o),e=c.querySelectorAll(b.config.classNames.uneditableContainer),f=a.lang.array(d).without(e),g=f.length;g--;)""===f[g].innerHTML.replace(/[\uFEFF]/g,"")&&f[g].parentNode.removeChild(f[g])}function d(a){return a.config.useLineBreaks?"DIV":"P"}function e(a,b,c){for(var d=a,e=null;d&&b&&d!==b;)1===d.nodeType&&d.matches(c?o:n)&&(e=d),d=d.parentNode;return e}function f(a,b){for(var c,d,e,f=a,g=null;f&&b&&f!==b;)1===f.nodeType&&f.matches(p)&&(d=f,null===g?(g=f.cloneNode(!1),c=g):(e=f.cloneNode(!1),e.appendChild(g),g=e)),f=f.parentNode;return{parent:d,outerNode:g,innerNode:c}}function g(b,c,e){return b||(b=e.doc.createElement(c.nodeName||d(e)),b.appendChild(e.doc.createTextNode(a.INVISIBLE_SPACE))),c.nodeName&&b.nodeName!==c.nodeName&&(b=m.renameElement(b,c.nodeName)),c.classRegExp&&(b.className=b.className.replace(c.classRegExp,"")),c.className&&b.classList.add(c.className),c.styleProperty&&"undefined"!=typeof c.styleValue&&(b.style[a.browser.fixStyleKey(c.styleProperty)]=c.styleValue),b}function h(b,c,e){var f;c.styleProperty&&(b.style[a.browser.fixStyleKey(c.styleProperty)]=""),c.className&&b.classList.remove(c.className),c.classRegExp&&(b.className=b.className.replace(c.classRegExp,"")),null!==b.getAttribute("class")&&""===b.getAttribute("class").trim()&&b.removeAttribute("class"),c.nodeName&&b.nodeName===c.nodeName&&(f=b.getAttribute("style"),f&&""!==f.trim()?b=m.renameElement(b,d(e)):m.unwrap(b)),null!==b.getAttribute("style")&&""===b.getAttribute("style").trim()&&b.removeAttribute("style")}function i(b){for(var c=b.querySelectorAll(o)||[],d=c.length;d--;)c[d].nextSibling&&1===c[d].nextSibling.nodeType&&"BR"===c[d].nextSibling.nodeName||""!==(c[d].innerHTML||c[d].nodeValue||"").trim()&&c[d].parentNode.insertBefore(c[d].ownerDocument.createElement("BR"),c[d].nextSibling),a.dom.unwrap(c[d])}function j(a,b){var c;return a.startContainer&&1===a.startContainer.nodeType&&a.startContainer===a.endContainer?void(a.startContainer.firstChild===a.startContainer.lastChild&&1===a.endOffset&&a.startContainer!==b.element&&(a.setStartBefore(a.startContainer),a.setEndAfter(a.endContainer))):a.startContainer&&1===a.startContainer.nodeType&&3===a.endContainer.nodeType?void(a.startContainer.firstChild===a.endContainer&&1===a.endOffset&&a.startContainer!==b.element&&a.setEndAfter(a.startContainer)):a.endContainer&&1===a.endContainer.nodeType&&3===a.startContainer.nodeType?void(a.endContainer.firstChild===a.startContainer&&1===a.endOffset&&a.endContainer!==b.element&&a.setStartBefore(a.endContainer)):a.startContainer&&3===a.startContainer.nodeType&&a.startContainer===a.endContainer&&a.startContainer.parentNode?void(a.startContainer.parentNode.firstChild===a.startContainer&&a.endOffset==a.endContainer.length&&0===a.startOffset&&(c=a.startContainer.parentNode,c!==b.element&&(a.setStartBefore(c),a.setEndAfter(c)))):void 0}function k(c,h,k,l){var m=h?a.lang.object(h).clone(!0):null;m&&(m.nodeName=m.nodeName||k||d(l)),j(c,l);var p,q,r,s=c.cloneRange(),t=s.startContainer,u=s.extractContents(),v=l.doc.createDocumentFragment(),w=m?b(m):null,x=w?a.dom.getParentElement(t,w,null,l.element):null,y=!m||"BLOCKQUOTE"===k&&m.nodeName&&"BLOCKQUOTE"===m.nodeName,z=x||e(t,l.element,y);if(h&&h.nodeName&&"BLOCKQUOTE"===h.nodeName){var A=g(null,h,l);A.appendChild(u),v.appendChild(A),q=[A]}else{if(u.firstChild)for(;u.firstChild;)if(1==u.firstChild.nodeType&&u.firstChild.matches(o))if(h)g(u.firstChild,h,l),u.firstChild.matches(n)&&i(u.firstChild),v.appendChild(u.firstChild);else{i(u.firstChild),r=a.dom.unwrap(u.firstChild);for(var B=0,C=r.length;C>B;B++)v.appendChild(r[B]);v.childNodes.length>0&&v.appendChild(l.doc.createElement("BR"))}else if(h){for(p=g(null,m,l);u.firstChild&&(1!==u.firstChild.nodeType||!u.firstChild.matches(o));)1==u.firstChild.nodeType&&p.matches(n)&&i(u.firstChild),p.appendChild(u.firstChild);v.appendChild(p)}else 1==u.firstChild.nodeType&&i(u.firstChild),v.appendChild(u.firstChild);else v.appendChild(g(null,h,l));q=a.lang.array(v.childNodes).get()}if(z)l.selection.splitElementAtCaret(z,v);else{var D=f(t,l.element);if(D.outerNode&&D.innerNode&&D.parent){if(1===v.childNodes.length){for(;v.firstChild.firstChild;)D.innerNode.appendChild(v.firstChild.firstChild);v.firstChild.appendChild(D.outerNode)}l.selection.splitElementAtCaret(D.parent,v)}else s.insertNode(v)}return q}function l(b,c){var d=a.dom.getParentElement(b,{query:o},null,c.element);return d?d.nodeName:null}var m=a.dom,n="h1, h2, h3, h4, h5, h6, p, pre",o="h1, h2, h3, h4, h5, h6, p, pre, div, blockquote",p="b, big, i, small, tt, abbr, acronym, cite, code, dfn, em, kbd, strong, samp, var, a, bdo, br, q, span, sub, sup, button, label, textarea, input, select, u";a.commands.formatBlock={exec:function(b,d,e){var f,g,i,j,m,o=[];if("string"==typeof e&&(e={nodeName:e.toUpperCase()}),e&&e.toggle&&(m=this.state(b,d,e))){j=rangy.saveSelection(b.win);for(var p=0,q=m.length;q>p;p++)h(m[p],e,b)}if(!m){b.selection.isCollapsed()&&(i=a.dom.getParentElement(b.selection.getOwnRanges()[0].startContainer,{query:n+", "+(e&&e.nodeName?e.nodeName.toLowerCase():"div")},null,b.element),i?(j=rangy.saveSelection(b.win),g=b.selection.createRange(),g.selectNode(i),b.selection.setSelection(g)):b.isEmpty()||(j=rangy.saveSelection(b.win),b.selection.selectLine())),f=b.selection.getOwnRanges();for(var r=f.length;r--;)o=o.concat(k(f[r],e,l(f[r].startContainer,b),b))}c(b);for(var s=o.length;s--;)o[s].parentNode||o.splice(s,1);j?rangy.restoreSelection(j):(g=b.selection.createRange(),g.setStartBefore(o[0]),g.setEndAfter(o[o.length-1]),b.selection.setSelection(g)),a.dom.removeInvisibleSpaces(b.element)},state:function(b,c,d){"string"==typeof d&&(d={query:d});for(var e,f=b.selection.filterElements(function(b){return a.dom.domNode(b).test(d||{query:o})}.bind(this)),g=b.selection.getSelectedOwnNodes(),h=0,i=g.length;i>h;h++)e=m.getParentElement(g[h],d||{query:o},null,b.element),e&&-1===f.indexOf(e)&&f.push(e);return 0===f.length?!1:f}}}(wysihtml5),function(a){a.commands.formatCode={exec:function(b,c,d){var e,f,g,h=this.state(b)[0];h?b.selection.executeAndRestore(function(){e=h.querySelector("code"),a.dom.replaceWithChildNodes(h),e&&a.dom.replaceWithChildNodes(e)}):(f=b.selection.getRange(),g=f.extractContents(),h=b.doc.createElement("pre"),e=b.doc.createElement("code"),d&&(e.className=d),h.appendChild(e),e.appendChild(g),f.insertNode(h),b.selection.selectNode(h))},state:function(b){var c,d=b.selection.getSelectedNode();return d&&d.nodeName&&"PRE"==d.nodeName&&d.firstChild&&d.firstChild.nodeName&&"CODE"==d.firstChild.nodeName?[d]:(c=a.dom.getParentElement(d,{query:"pre code"}),c?[c.parentNode]:!1)}}}(wysihtml5),function(a){function b(a){return/^\s*$/.test(a.className)}function c(a){return!a.getAttribute("style")||/^\s*$/.test(a.getAttribute("style"))}function d(b){var c=a.dom.getAttributes(b);return a.lang.object(c).isEmpty()}function e(b,c){var d,e,f,g;return 1!==b.nodeType||1!==c.nodeType?!1:b.nodeName!==c.nodeName?!1:(d=b.className.trim().replace(/\s+/g," ").split(" "),e=c.className.trim().replace(/\s+/g," ").split(" "),a.lang.array(d).without(e).length>0?!1:(f=a.dom.getAttributes(b),g=a.dom.getAttributes(c),f.length===g.length&&a.lang.object(a.lang.object(f).difference(g)).isEmpty()?!0:!1))}function f(b,c){var d=c&&c.nodeName||F,e=b.ownerDocument.createElement(d);if(c.classRegExp&&(e.className=e.className.replace(c.classRegExp,"")),c.className&&e.classList.add(c.className),c.styleProperty&&"undefined"!=typeof c.styleValue&&(e.style[a.browser.fixStyleKey(c.styleProperty)]=c.styleValue),c.attribute)if("object"==typeof c.attribute)for(var f in c.attribute)c.attribute.hasOwnProperty(f)&&e.setAttribute(f,c.attribute[f]);else"undefined"!=typeof c.attributeValue&&e.setAttribute(c.attribute,c.attributeValue);return e}function g(a,b){for(var c in a)if(a.hasOwnProperty(c)&&(void 0===typeof b[c]||b[c]!==a[c]))return!1;return!0}function h(b,c,d){var e,f=a.dom.getAttributes(b),h=g(c,f);a.lang.object(f).difference(c);if(h&&d!==!1)for(e in c)c.hasOwnProperty(e)&&b.removeAttribute(e);else for(e in c)c.hasOwnProperty(e)&&b.setAttribute(e,c[e])}function i(e,f){var g,i,j;f.className&&(f.toggle!==!1&&e.classList.contains(f.className)?e.classList.remove(f.className):e.classList.add(f.className),b(e)&&e.removeAttribute("class")),f.styleProperty&&(f.toggle!==!1&&e.style[a.browser.fixStyleKey(f.styleProperty)].trim().replace(/, /g,",")===f.styleValue?e.style[a.browser.fixStyleKey(f.styleProperty)]="":e.style[a.browser.fixStyleKey(f.styleProperty)]=f.styleValue),c(e)&&e.removeAttribute("style"),f.attribute&&("object"==typeof f.attribute?g=f.attribute:(g={},g[f.attribute]=f.attributeValue||""),h(e,g,f.toggle)),i=f.nodeName?H[f.nodeName.toLowerCase()]||f.nodeName.toLowerCase():null,j=i?a.dom.domNode(e).test({query:i}):!1,(!f.nodeName||f.nodeName===F||j)&&(f.toggle!==!1&&j||!f.nodeName&&e.nodeName===F)&&b(e)&&c(e)&&d(e)&&a.dom.unwrap(e)}function j(b,c){var d=[];return b.isCollapsed()||(d=d.concat(b.getOwnNodes([3],function(b){return!a.dom.domNode(b).is.emptyTextNode()},c))),d}function k(a,b,c,d){var e=a,f=d?b:l(b);do{if(1===e.nodeType&&m(e,f))return e;e=e.parentNode}while(e&&e!==c);return null}function l(a){return{nodeName:a.nodeName||null,className:a.classRegExp?null:a.className||null,classRegExp:a.classRegExp||null,styleProperty:a.styleProperty||null}}function m(b,c){var d;if(c.nodeName){var e=H[c.nodeName.toLowerCase()]||c.nodeName.toLowerCase();return a.dom.domNode(b).test({query:e})}return d=a.lang.object(c).clone(),d.query=G,a.dom.domNode(b).test(d)}function n(b,c){var d=document.documentElement||document.body,e=d.scrollTop,f=d.scrollLeft;rangy.getSelection(b.win);rangy.getSelection(b.win).removeAllRanges();try{rangy.getSelection(b.win).addRange(c)}catch(g){}b.doc.activeElement&&a.dom.contains(b.element,b.doc.activeElement)||(b.element.focus(),d.scrollTop=e,d.scrollLeft=f,rangy.getSelection(b.win).addRange(c))}function o(a,b){var c=rangy.createRange(b.doc),d=a[a.length-1];a[0]&&d&&(c.setStart(a[0],0),c.setEnd(d,d.length),n(b,c))}function p(a,b,c,d){var e=rangy.createRange(a.doc);b&&(e.setStart(b,c),e.setEnd(b,"undefined"!=typeof d?d:c),n(a,e))}function q(a,b,c){var d,e,f,g=j(a.selection),h=[],i=!1;if(a.selection.isInThisEditable()){if(0===g.length&&a.selection.isCollapsed()){if(f=a.selection.getSelection().anchorNode,!f)return{nodes:[],partial:!1};3===f.nodeType&&(g=[f])}g.length||(e=a.selection.getOwnRanges()[0],e&&(g=[e.endContainer]));for(var l=0,m=g.length;m>l;l++)d=k(g[l],b,a.element,c),d?h.push(d):i=!0}return{nodes:h,partial:i}}function r(a){var b,c,d,e;return a&&(b=a.anchorNode,c=a.anchorOffset,b&&3===b.nodeType&&c>0&&c0&&/\w/.test(c.data[g-1]);)g--;for(;h0&&o(b,a),u(q(a,c).nodes),b.length>0&&o(b,a)}function w(a,b,c,d){p(a,b,c),u(q(a,d).nodes),p(a,b,c)}function x(a,b){var c=f(a,b);a.parentNode.insertBefore(c,a),c.appendChild(a)}function y(b,c,d){var e,f=c.element,g=k(b,d,f);g&&(e=g.cloneNode(!1),a.dom.domNode(b).escapeParent(g,e),i(e,d))}function z(b,c,d){var e=c.element,f=k(b,d,e);f&&a.dom.domNode(b).escapeParent(f)}function A(a,b,c){var d=f(a.endContainer,c);a.surroundContents(d),b.selection.selectNode(d)}function B(b,c,d,e){var f,g,h,j,l=q(b,e,!0),m=b.selection.getSelection();if(c.length){if(l.partial||e.toggle===!1)for(j=c.length;j--;)k(c[j],e,b.element)&&y(c[j],b,e),k(c[j],e,b.element)||x(c[j],e);else for(j=c.length;j--;)y(c[j],b,e);v(b,c,e)}else if(e.toggle!==!1)if(r(m))f=s(m),g=f.textNode,y(f.textNode,b,e),w(b,f.textNode,f.wordOffset,e);else{g=b.doc.createTextNode(a.INVISIBLE_SPACE),h=d.nodes[0].cloneNode(!1),h.appendChild(g),b.selection.splitElementAtCaret(d.nodes[0],h),i(h,e),v(b,[g],e);var n=b.selection.getSelection();if(n.anchorNode&&n.focusNode)try{n.collapseToEnd()}catch(o){}}else for(j=d.nodes.length;j--;)i(d.nodes[j],e)}function C(b,c,d,e){var f,g,h,i=b.selection.getSelection();if(c.length){for(h=c.length;h--;)z(c[h],b,e);v(b,c,e)}else{for(f=i.anchorNode,g=i.anchorOffset,h=d.nodes.length;h--;)a.dom.unwrap(d.nodes[h]);w(b,f,g,e)}}function D(a,b,c){var d,e,f=a.selection.getSelection();if(b.length){for(e=b.length;e--;)x(b[e],c);v(a,b,c)}else if(r(f))d=s(f),x(d.textNode,c),w(a,d.textNode,d.wordOffset,c);else{var g=a.selection.getOwnRanges()[0];g&&A(g,a,c)}}function E(a){return a="string"==typeof a?{nodeName:a}:a,a.nodeName&&(a.nodeName=a.nodeName.toUpperCase()),
-a}var F="SPAN",G="b, big, i, small, tt, abbr, acronym, cite, code, dfn, em, kbd, strong, samp, var, a, bdo, br, q, span, sub, sup, button, label, textarea, input, select, u",H={b:"b, strong",strong:"b, strong",em:"em, i",i:"em, i"};a.commands.formatInline={exec:function(a,b,c){c=E(c),a.element.normalize();var d=j(a.selection,!0),e=q(a,c);e.nodes.length>0?B(a,d,e,c):D(a,d,c),a.element.normalize()},remove:function(a,b,c){c=E(c),a.element.normalize();var d=j(a.selection,!0),e=q(a,c);e.nodes.length>0&&C(a,d,e,c),a.element.normalize()},state:function(a,b,c){c=E(c);var d=q(a,c,!0).nodes;return 0===d.length?!1:d}}}(wysihtml5),function(a){var b={nodeName:"BLOCKQUOTE",toggle:!0};a.commands.insertBlockQuote={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){a.commands.insertHTML={exec:function(a,b,c){a.commands.support(b)?a.doc.execCommand(b,!1,c):a.selection.insertHTML(c)},state:function(){return!1}}}(wysihtml5),function(a){var b="IMG";a.commands.insertImage={exec:function(c,d,e){e="object"==typeof e?e:{src:e};var f,g,h=c.doc,i=this.state(c);if(i&&!e.src)return c.selection.setBefore(i),g=i.parentNode,g.removeChild(i),a.dom.removeEmptyTextNodes(g),"A"!==g.nodeName||g.firstChild||(c.selection.setAfter(g),g.parentNode.removeChild(g)),void a.quirks.redraw(c.element);if(i)for(var j in e)e.hasOwnProperty(j)&&i.setAttribute("className"===j?"class":j,e[j]);else{i=h.createElement(b);for(var k in e)i.setAttribute("className"===k?"class":k,e[k]);c.selection.insertNode(i),a.browser.hasProblemsSettingCaretAfterImg()?(f=h.createTextNode(a.INVISIBLE_SPACE),c.selection.insertNode(f),c.selection.setAfter(f)):c.selection.setAfter(i)}},state:function(c){var d,e,f,g=c.doc;return a.dom.hasElementWithTagName(g,b)&&(d=c.selection.getSelectedNode())?d.nodeName===b?d:d.nodeType!==a.ELEMENT_NODE?!1:(e=c.selection.getText(),(e=a.lang.string(e).trim())?!1:(f=c.selection.getNodes(a.ELEMENT_NODE,function(a){return"IMG"===a.nodeName}),1!==f.length?!1:f[0])):!1}}}(wysihtml5),function(a){var b="
"+(a.browser.needsSpaceAfterLineBreak()?" ":"");a.commands.insertLineBreak={exec:function(c,d){c.commands.support(d)?(c.doc.execCommand(d,!1,null),a.browser.autoScrollsToCaret()||c.selection.scrollIntoView()):c.commands.exec("insertHTML",b)},state:function(){return!1}}}(wysihtml5),function(a){a.commands.insertOrderedList={exec:function(b,c){a.commands.insertList.exec(b,c,"OL")},state:function(b,c){return a.commands.insertList.state(b,c,"OL")}}}(wysihtml5),function(a){a.commands.insertUnorderedList={exec:function(b,c){a.commands.insertList.exec(b,c,"UL")},state:function(b,c){return a.commands.insertList.state(b,c,"UL")}}}(wysihtml5),wysihtml5.commands.insertList=function(a){var b=function(a,b){if(a&&a.nodeName){"string"==typeof b&&(b=[b]);for(var c=b.length;c--;)if(a.nodeName===b[c])return!0}return!1},c=function(c,d,e){var f={el:null,other:!1};if(c){var g=a.dom.getParentElement(c,{query:"li"},!1,e.element),h="UL"===d?"OL":"UL";b(c,d)?f.el=c:b(c,h)?f={el:c,other:!0}:g&&(b(g.parentNode,d)?f.el=g.parentNode:b(g.parentNode,h)&&(f={el:g.parentNode,other:!0}))}return f.el&&!e.element.contains(f.el)&&(f.el=null),f},d=function(b,c,d){var e,g,h="UL"===c?"OL":"UL";d.selection.executeAndRestoreRangy(function(){if(e=f(h,d),e.length)for(var i=e.length;i--;)a.dom.renameElement(e[i],c.toLowerCase());else{g=f(["OL","UL"],d);for(var j=g.length;j--;)a.dom.resolveList(g[j],d.config.useLineBreaks);a.dom.resolveList(b,d.config.useLineBreaks)}})},e=function(b,c,d){var e="UL"===c?"OL":"UL";d.selection.executeAndRestoreRangy(function(){for(var g=[b].concat(f(e,d)),h=g.length;h--;)a.dom.renameElement(g[h],c.toLowerCase())})},f=function(a,c){for(var d=c.selection.getOwnRanges(),e=[],f=d.length;f--;)e=e.concat(d[f].getNodes([1],function(c){return b(c,a)}));return e},g=function(b,c){c.selection.executeAndRestoreRangy(function(){var d,e,f="_wysihtml5-temp-"+(new Date).getTime(),g=c.selection.deblockAndSurround({nodeName:"div",className:f});g.innerHTML=g.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),g&&(d=a.lang.array(["","
",a.INVISIBLE_SPACE]).contains(g.innerHTML),e=a.dom.convertToList(g,b.toLowerCase(),c.parent.config.classNames.uneditableContainer),d&&c.selection.selectNode(e.querySelector("li"),!0))})};return{exec:function(a,b,f){var h=a.doc,i="OL"===f?"insertOrderedList":"insertUnorderedList",j=a.selection.getSelectedNode(),k=c(j,f,a);k.el?k.other?e(k.el,f,a):d(k.el,f,a):a.commands.support(i)?h.execCommand(i,!1,null):g(f,a)},state:function(a,b,d){var e=a.selection.getSelectedNode(),f=c(e,d,a);return f.el&&!f.other?f.el:!1}}}(wysihtml5),function(a){var b={nodeName:"I",toggle:!0};a.commands.italic={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-center",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyCenter={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-left",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyLeft={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-right",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyRight={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-justify",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyFull={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"right",toggle:!0};a.commands.alignRightStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"left",toggle:!0};a.commands.alignLeftStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"center",toggle:!0};a.commands.alignCenterStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){a.commands.redo={exec:function(a){return a.undoManager.redo()},state:function(a){return!1}}}(wysihtml5),function(a){var b={nodeName:"U",toggle:!0};a.commands.underline={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){a.commands.undo={exec:function(a){return a.undoManager.undo()},state:function(a){return!1}}}(wysihtml5),function(a){a.commands.createTable={exec:function(a,b,c){var d,e,f;if(c&&c.cols&&c.rows&&parseInt(c.cols,10)>0&&parseInt(c.rows,10)>0){for(f=c.tableStyle?'':"",f+="",e=0;e",d=0;d
";f+=""}f+="
",a.commands.exec("insertHTML",f)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.mergeTableCells={exec:function(b,c){b.tableSelection&&b.tableSelection.start&&b.tableSelection.end&&(this.state(b,c)?a.dom.table.unmergeCell(b.tableSelection.start):a.dom.table.mergeCellsBetween(b.tableSelection.start,b.tableSelection.end))},state:function(b,c){if(b.tableSelection){var d=b.tableSelection.start,e=b.tableSelection.end;if(d&&e&&d==e&&(a.dom.getAttribute(d,"colspan")&&parseInt(a.dom.getAttribute(d,"colspan"),10)>1||a.dom.getAttribute(d,"rowspan")&&parseInt(a.dom.getAttribute(d,"rowspan"),10)>1))return[d]}return!1}}}(wysihtml5),function(a){a.commands.addTableCells={exec:function(b,c,d){if(b.tableSelection&&b.tableSelection.start&&b.tableSelection.end){var e=a.dom.table.orderSelectionEnds(b.tableSelection.start,b.tableSelection.end);"before"==d||"above"==d?a.dom.table.addCells(e.start,d):("after"==d||"below"==d)&&a.dom.table.addCells(e.end,d),setTimeout(function(){b.tableSelection.select(e.start,e.end)},0)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.deleteTableCells={exec:function(b,c,d){if(b.tableSelection&&b.tableSelection.start&&b.tableSelection.end){var e,f=a.dom.table.orderSelectionEnds(b.tableSelection.start,b.tableSelection.end),g=a.dom.table.indexOf(f.start),h=b.tableSelection.table;a.dom.table.removeCells(f.start,d),setTimeout(function(){e=a.dom.table.findCell(h,g),e||("row"==d&&(e=a.dom.table.findCell(h,{row:g.row-1,col:g.col})),"column"==d&&(e=a.dom.table.findCell(h,{row:g.row,col:g.col-1}))),e&&b.tableSelection.select(e,e)},0)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.indentList={exec:function(a,b,c){var d=a.selection.getSelectionParentsByTag("LI");return d?this.tryToPushLiLevel(d,a.selection):!1},state:function(a,b){return!1},tryToPushLiLevel:function(b,c){var d,e,f,g,h,i=!1;return c.executeAndRestoreRangy(function(){for(var c=b.length;c--;)g=b[c],d="OL"===g.parentNode.nodeName?"OL":"UL",e=g.ownerDocument.createElement(d),f=a.dom.domNode(g).prev({nodeTypes:[a.ELEMENT_NODE]}),h=f?f.querySelector("ul, ol"):null,f&&(h?h.appendChild(g):(e.appendChild(g),f.appendChild(e)),i=!0)}),i}}}(wysihtml5),function(a){a.commands.outdentList={exec:function(a,b,c){var d=a.selection.getSelectionParentsByTag("LI");return d?this.tryToPullLiLevel(d,a):!1},state:function(a,b){return!1},tryToPullLiLevel:function(b,c){var d,e,f,g,h,i=!1,j=this;return c.selection.executeAndRestoreRangy(function(){for(var k=b.length;k--;)if(g=b[k],g.parentNode&&(d=g.parentNode,"OL"===d.tagName||"UL"===d.tagName)){if(i=!0,e=a.dom.getParentElement(d.parentNode,{query:"ol, ul"},!1,c.element),f=a.dom.getParentElement(d.parentNode,{query:"li"},!1,c.element),e&&f)g.nextSibling&&(h=j.getAfterList(d,g),g.appendChild(h)),e.insertBefore(g,f.nextSibling);else{g.nextSibling&&(h=j.getAfterList(d,g),g.appendChild(h));for(var l=g.childNodes.length;l--;)d.parentNode.insertBefore(g.childNodes[l],d.nextSibling);d.parentNode.insertBefore(document.createElement("br"),d.nextSibling),g.parentNode.removeChild(g)}0===d.childNodes.length&&d.parentNode.removeChild(d)}}),i},getAfterList:function(a,b){for(var c=a.nodeName,d=document.createElement(c);b.nextSibling;)d.appendChild(b.nextSibling);return d}}}(wysihtml5),function(a){var b={nodeName:"SUB",toggle:!0};a.commands.subscript={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b={nodeName:"SUP",toggle:!0};a.commands.superscript={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b=90,c=89,d=8,e=46,f=25,g="data-wysihtml5-selection-node",h="data-wysihtml5-selection-offset",i=(''+a.INVISIBLE_SPACE+"",''+a.INVISIBLE_SPACE+"",a.dom);a.UndoManager=a.lang.Dispatcher.extend({constructor:function(a){this.editor=a,this.composer=a.composer,this.element=this.composer.element,this.position=0,this.historyStr=[],this.historyDom=[],this.transact(),this._observe()},_observe:function(){var a,f=this;this.composer.sandbox.getDocument();i.observe(this.element,"keydown",function(a){if(!a.altKey&&(a.ctrlKey||a.metaKey)){var d=a.keyCode,e=d===b&&!a.shiftKey,g=d===b&&a.shiftKey||d===c;e?(f.undo(),a.preventDefault()):g&&(f.redo(),a.preventDefault())}}),i.observe(this.element,"keydown",function(b){var c=b.keyCode;c!==a&&(a=c,(c===d||c===e)&&f.transact())}),this.editor.on("newword:composer",function(){f.transact()}).on("beforecommand:composer",function(){f.transact()})},transact:function(){var b,c,d,e,i,j=this.historyStr[this.position-1],k=this.composer.getValue(!1,!1),l=this.element.offsetWidth>0&&this.element.offsetHeight>0;if(k!==j){var m=this.historyStr.length=this.historyDom.length=this.position;m>f&&(this.historyStr.shift(),this.historyDom.shift(),this.position--),this.position++,l&&(b=this.composer.selection.getRange(),c=b&&b.startContainer?b.startContainer:this.element,d=b&&b.startOffset?b.startOffset:0,c.nodeType===a.ELEMENT_NODE?e=c:(e=c.parentNode,i=this.getChildNodeIndex(e,c)),e.setAttribute(h,d),"undefined"!=typeof i&&e.setAttribute(g,i));var n=this.element.cloneNode(!!k);this.historyDom.push(n),this.historyStr.push(k),e&&(e.removeAttribute(h),e.removeAttribute(g))}},undo:function(){this.transact(),this.undoPossible()&&(this.set(this.historyDom[--this.position-1]),this.editor.fire("undo:composer"))},redo:function(){this.redoPossible()&&(this.set(this.historyDom[++this.position-1]),this.editor.fire("redo:composer"))},undoPossible:function(){return this.position>1},redoPossible:function(){return this.positionb;b++)this.element.appendChild(c[b].cloneNode(!0));var e,f,i;a.hasAttribute(h)?(e=a.getAttribute(h),i=a.getAttribute(g),f=this.element):(f=this.element.querySelector("["+h+"]")||this.element,e=f.getAttribute(h),i=f.getAttribute(g),f.removeAttribute(h),f.removeAttribute(g)),null!==i&&(f=this.getChildNodeByIndex(f,+i)),this.composer.selection.set(f,e)},getChildNodeIndex:function(a,b){for(var c=0,d=a.childNodes,e=d.length;e>c;c++)if(d[c]===b)return c},getChildNodeByIndex:function(a,b){return a.childNodes[b]}})}(wysihtml5),wysihtml5.views.View=Base.extend({constructor:function(a,b,c){this.parent=a,this.element=b,this.config=c,this.config.noTextarea||this._observeViewChange()},_observeViewChange:function(){var a=this;this.parent.on("beforeload",function(){a.parent.on("change_view",function(b){b===a.name?(a.parent.currentView=a,a.show(),setTimeout(function(){a.focus()},0)):a.hide()})})},focus:function(){if(!this.element||!this.element.ownerDocument||this.element.ownerDocument.querySelector(":focus")!==this.element)try{this.element&&this.element.focus()}catch(a){}},hide:function(){this.element.style.display="none"},show:function(){this.element.style.display=""},disable:function(){this.element.setAttribute("disabled","disabled")},enable:function(){this.element.removeAttribute("disabled")}}),function(a){var b=a.dom,c=a.browser;a.views.Composer=a.views.View.extend({name:"composer",CARET_HACK:"
",constructor:function(a,b,c){this.base(a,b,c),this.config.noTextarea?this.editableArea=b:this.textarea=this.parent.textarea,this.config.contentEditableMode?this._initContentEditableArea():this._initSandbox()},clear:function(){this.element.innerHTML=c.displaysCaretInEmptyContentEditableCorrectly()?"":this.CARET_HACK},getValue:function(b,c){var d=this.isEmpty()?"":a.quirks.getCorrectInnerHTML(this.element);return b!==!1&&(d=this.parent.parse(d,c===!1?!1:!0)),d},setValue:function(a,b){b&&(a=this.parent.parse(a));try{this.element.innerHTML=a}catch(c){this.element.innerText=a}},cleanUp:function(){var a;this.selection&&(a=rangy.saveSelection(this.win)),this.parent.parse(this.element),a&&rangy.restoreSelection(a)},show:function(){this.editableArea.style.display=this._displayStyle||"",this.config.noTextarea||this.textarea.element.disabled||(this.disable(),this.enable())},hide:function(){this._displayStyle=b.getStyle("display").from(this.editableArea),"none"===this._displayStyle&&(this._displayStyle=null),this.editableArea.style.display="none"},disable:function(){this.parent.fire("disable:composer"),this.element.removeAttribute("contentEditable")},enable:function(){this.parent.fire("enable:composer"),this.element.setAttribute("contentEditable","true")},focus:function(b){a.browser.doesAsyncFocus()&&this.hasPlaceholderSet()&&this.clear(),this.base();var c=this.element.lastChild;b&&c&&this.selection&&("BR"===c.nodeName?this.selection.setBefore(this.element.lastChild):this.selection.setAfter(this.element.lastChild))},getScrollPos:function(){if(this.doc&&this.win){var a={};return"undefined"!=typeof this.win.pageYOffset?a.y=this.win.pageYOffset:a.y=(this.doc.documentElement||this.doc.body.parentNode||this.doc.body).scrollTop,"undefined"!=typeof this.win.pageXOffset?a.x=this.win.pageXOffset:a.x=(this.doc.documentElement||this.doc.body.parentNode||this.doc.body).scrollLeft,a}},setScrollPos:function(a){a&&"undefined"!=typeof a.x&&"undefined"!=typeof a.y&&this.win.scrollTo(a.x,a.y)},getTextContent:function(){return b.getTextContent(this.element)},hasPlaceholderSet:function(){return this.getTextContent()==(this.config.noTextarea?this.editableArea.getAttribute("data-placeholder"):this.textarea.element.getAttribute("placeholder"))&&this.placeholderSet},isEmpty:function(){var a=this.element.innerHTML.toLowerCase();return/^(\s|
|<\/br>||<\/p>)*$/i.test(a)||""===a||"
"===a||"
"===a||"
"===a||this.hasPlaceholderSet()},_initContentEditableArea:function(){var a=this;this.config.noTextarea?this.sandbox=new b.ContentEditableArea(function(){a._create()},{className:this.config.classNames.sandbox},this.editableArea):(this.sandbox=new b.ContentEditableArea(function(){a._create()},{className:this.config.classNames.sandbox}),this.editableArea=this.sandbox.getContentEditable(),b.insert(this.editableArea).after(this.textarea.element),this._createWysiwygFormField())},_initSandbox:function(){var a=this;this.sandbox=new b.Sandbox(function(){a._create()},{stylesheets:this.config.stylesheets,className:this.config.classNames.sandbox}),this.editableArea=this.sandbox.getIframe();var c=this.textarea.element;b.insert(this.editableArea).after(c),this._createWysiwygFormField()},_createWysiwygFormField:function(){if(this.textarea.element.form){var a=document.createElement("input");a.type="hidden",a.name="_wysihtml5_mode",a.value=1,b.insert(a).after(this.textarea.element)}},_create:function(){var d=this;this.doc=this.sandbox.getDocument(),this.win=this.sandbox.getWindow(),this.element=this.config.contentEditableMode?this.sandbox.getContentEditable():this.doc.body,this.config.noTextarea?this.cleanUp():(this.textarea=this.parent.textarea,this.element.innerHTML=this.textarea.getValue(!0,!1)),this.selection=new a.Selection(this.parent,this.element,this.config.classNames.uneditableContainer),this.commands=new a.Commands(this.parent),this.config.noTextarea||b.copyAttributes(["className","spellcheck","title","lang","dir","accessKey"]).from(this.textarea.element).to(this.element),b.addClass(this.element,this.config.classNames.composer),this.config.style&&!this.config.contentEditableMode&&this.style(),this.observe();var e=this.config.name;e&&(b.addClass(this.element,e),this.config.contentEditableMode||b.addClass(this.editableArea,e)),this.enable(),!this.config.noTextarea&&this.textarea.element.disabled&&this.disable();var f="string"==typeof this.config.placeholder?this.config.placeholder:this.config.noTextarea?this.editableArea.getAttribute("data-placeholder"):this.textarea.element.getAttribute("placeholder");f&&b.simulatePlaceholder(this.parent,this,f,this.config.classNames.placeholder),this.commands.exec("styleWithCSS",!1),this._initAutoLinking(),this._initObjectResizing(),this._initUndoManager(),this._initLineBreaking(),this.config.noTextarea||!this.textarea.element.hasAttribute("autofocus")&&document.querySelector(":focus")!=this.textarea.element||c.isIos()||setTimeout(function(){d.focus(!0)},100),c.clearsContentEditableCorrectly()||a.quirks.ensureProperClearing(this),this.initSync&&this.config.sync&&this.initSync(),this.config.noTextarea||this.textarea.hide(),this.parent.fire("beforeload").fire("load")},_initAutoLinking:function(){var d=this,e=c.canDisableAutoLinking(),f=c.doesAutoLinkingInContentEditable();if(e&&this.commands.exec("autoUrlDetect",!1),this.config.autoLink){(!f||f&&e)&&(this.parent.on("newword:composer",function(){if(b.getTextContent(d.element).match(b.autoLink.URL_REG_EXP)){for(var c=d.selection.getSelectedNode(),e=d.element.querySelectorAll("."+d.config.classNames.uneditableContainer),f=!1,g=e.length;g--;)a.dom.contains(e[g],c)&&(f=!0);f||b.autoLink(c,[d.config.classNames.uneditableContainer])}}),b.observe(this.element,"blur",function(){b.autoLink(d.element,[d.config.classNames.uneditableContainer])}));var g=this.sandbox.getDocument().getElementsByTagName("a"),h=b.autoLink.URL_REG_EXP,i=function(c){var d=a.lang.string(b.getTextContent(c)).trim();return"www."===d.substr(0,4)&&(d="http://"+d),d};b.observe(this.element,"keydown",function(a){if(g.length){var c,e=d.selection.getSelectedNode(a.target.ownerDocument),f=b.getParentElement(e,{query:"a"},4);f&&(c=i(f),setTimeout(function(){var a=i(f);a!==c&&a.match(h)&&f.setAttribute("href",a)},0))}})}},_initObjectResizing:function(){if(this.commands.exec("enableObjectResizing",!0),c.supportsEvent("resizeend")){var d=["width","height"],e=d.length,f=this.element;b.observe(f,"resizeend",function(b){var c,g=b.target||b.srcElement,h=g.style,i=0;if("IMG"===g.nodeName){for(;e>i;i++)c=d[i],h[c]&&(g.setAttribute(c,parseInt(h[c],10)),h[c]="");a.quirks.redraw(f)}})}},_initUndoManager:function(){this.undoManager=new a.UndoManager(this.parent)},_initLineBreaking:function(){function d(a){var c=b.getParentElement(a,{query:"p, div"},2);c&&b.contains(e.element,c)&&e.selection.executeAndRestore(function(){e.config.useLineBreaks?b.replaceWithChildNodes(c):"P"!==c.nodeName&&b.renameElement(c,"p")})}var e=this,f="li, p, h1, h2, h3, h4, h5, h6",g="ul, ol, menu";this.config.useLineBreaks||b.observe(this.element,["focus","keydown"],function(){if(e.isEmpty()){var a=e.doc.createElement("P");e.element.innerHTML="",e.element.appendChild(a),c.displaysCaretInEmptyContentEditableCorrectly()?e.selection.selectNode(a,!0):(a.innerHTML="
",e.selection.setBefore(a.firstChild))}}),b.observe(this.element,"keydown",function(c){var h=c.keyCode;if(!c.shiftKey&&(h===a.ENTER_KEY||h===a.BACKSPACE_KEY)){var i=b.getParentElement(e.selection.getSelectedNode(),{query:f},4);return i?void setTimeout(function(){var c,f=e.selection.getSelectedNode();if("LI"===i.nodeName){if(!f)return;c=b.getParentElement(f,{query:g},2),c||d(f)}h===a.ENTER_KEY&&i.nodeName.match(/^H[1-6]$/)&&d(f)},0):void(e.config.useLineBreaks&&h===a.ENTER_KEY&&!a.browser.insertsLineBreaksOnReturn()&&(c.preventDefault(),e.commands.exec("insertLineBreak")))}})}})}(wysihtml5),function(a){var b=a.dom,c=document,d=window,e=c.createElement("div"),f=["background-color","color","cursor","font-family","font-size","font-style","font-variant","font-weight","line-height","letter-spacing","text-align","text-decoration","text-indent","text-rendering","word-break","word-wrap","word-spacing"],g=["background-color","border-collapse","border-bottom-color","border-bottom-style","border-bottom-width","border-left-color","border-left-style","border-left-width","border-right-color","border-right-style","border-right-width","border-top-color","border-top-style","border-top-width","clear","display","float","margin-bottom","margin-left","margin-right","margin-top","outline-color","outline-offset","outline-width","outline-style","padding-left","padding-right","padding-top","padding-bottom","position","top","left","right","bottom","z-index","vertical-align","text-align","-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing","-webkit-box-shadow","-moz-box-shadow","-ms-box-shadow","box-shadow","-webkit-border-top-right-radius","-moz-border-radius-topright","border-top-right-radius","-webkit-border-bottom-right-radius","-moz-border-radius-bottomright","border-bottom-right-radius","-webkit-border-bottom-left-radius","-moz-border-radius-bottomleft","border-bottom-left-radius","-webkit-border-top-left-radius","-moz-border-radius-topleft","border-top-left-radius","width","height"],h=["html { height: 100%; }","body { height: 100%; padding: 1px 0 0 0; margin: -1px 0 0 0; }","body > p:first-child { margin-top: 0; }","._wysihtml5-temp { display: none; }",a.browser.isGecko?"body.placeholder { color: graytext !important; }":"body.placeholder { color: #a9a9a9 !important; }","img:-moz-broken { -moz-force-broken-image-icon: 1; height: 24px; width: 24px; }"],i=function(a){if(a.setActive)try{a.setActive()}catch(e){}else{var f=a.style,g=c.documentElement.scrollTop||c.body.scrollTop,h=c.documentElement.scrollLeft||c.body.scrollLeft,i={position:f.position,top:f.top,left:f.left,WebkitUserSelect:f.WebkitUserSelect};b.setStyles({position:"absolute",top:"-99999px",left:"-99999px",WebkitUserSelect:"none"}).on(a),a.focus(),b.setStyles(i).on(a),d.scrollTo&&d.scrollTo(h,g)}};a.views.Composer.prototype.style=function(){var d,j=this,k=c.querySelector(":focus"),l=this.textarea.element,m=l.hasAttribute("placeholder"),n=m&&l.getAttribute("placeholder"),o=l.style.display,p=l.disabled;this.focusStylesHost=e.cloneNode(!1),this.blurStylesHost=e.cloneNode(!1),this.disabledStylesHost=e.cloneNode(!1),m&&l.removeAttribute("placeholder"),l===k&&l.blur(),l.disabled=!1,l.style.display=d="none",(l.getAttribute("rows")&&"auto"===b.getStyle("height").from(l)||l.getAttribute("cols")&&"auto"===b.getStyle("width").from(l))&&(l.style.display=d=o),b.copyStyles(g).from(l).to(this.editableArea).andTo(this.blurStylesHost),b.copyStyles(f).from(l).to(this.element).andTo(this.blurStylesHost),b.insertCSS(h).into(this.element.ownerDocument),l.disabled=!0,b.copyStyles(g).from(l).to(this.disabledStylesHost),b.copyStyles(f).from(l).to(this.disabledStylesHost),l.disabled=p,l.style.display=o,i(l),l.style.display=d,b.copyStyles(g).from(l).to(this.focusStylesHost),b.copyStyles(f).from(l).to(this.focusStylesHost),l.style.display=o,b.copyStyles(["display"]).from(l).to(this.editableArea);var q=a.lang.array(g).without(["display"]);return k?k.focus():l.blur(),m&&l.setAttribute("placeholder",n),this.parent.on("focus:composer",function(){b.copyStyles(q).from(j.focusStylesHost).to(j.editableArea),b.copyStyles(f).from(j.focusStylesHost).to(j.element)}),this.parent.on("blur:composer",function(){b.copyStyles(q).from(j.blurStylesHost).to(j.editableArea),b.copyStyles(f).from(j.blurStylesHost).to(j.element)}),this.parent.observe("disable:composer",function(){b.copyStyles(q).from(j.disabledStylesHost).to(j.editableArea),b.copyStyles(f).from(j.disabledStylesHost).to(j.element)}),this.parent.observe("enable:composer",function(){b.copyStyles(q).from(j.blurStylesHost).to(j.editableArea),b.copyStyles(f).from(j.blurStylesHost).to(j.element)}),this}}(wysihtml5),function(a){var b=a.dom,c=a.browser,d={66:"bold",73:"italic",85:"underline"},e=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.addEventListener(b[d],c,!1)},f=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.removeEventListener(b[d],c,!1)},g=function(b,c){if(b.selection.caretIsLastInSelection()){var d=b.selection.getSelection(),e=d.anchorNode;if(e&&1===e.nodeType&&(a.dom.getParentElement(e,{query:"td, th"},!1,b.element)||c)){var f=e.childNodes[d.anchorOffset];if(f&&1===f.nodeType&"BR"===f.nodeName)return f.parentNode.removeChild(f),!0}}return!1},h=function(a){var b=a.selection.getBeforeSelection(!0);if(b&&("element"===b.type||"leafnode"===b.type)&&1===b.node.nodeType&&b.node.classList.contains(a.config.classNames.uneditableContainer)){if(g(a,!0))return!0;try{var c=new CustomEvent("wysihtml5:uneditable:delete");b.node.dispatchEvent(c)}catch(d){}return b.node.parentNode.removeChild(b.node),!0}return!1},i=function(b){var c=b.selection,d=c.getPreviousNode();if(c.caretIsFirstInSelection()&&d&&1===d.nodeType&&/block/.test(b.win.getComputedStyle(d).display)){if(/^\s*$/.test(d.textContent||d.innerText))return d.parentNode.removeChild(d),!0;if(d.lastChild){var e=d.lastChild,f=c.getSelectedNode(),g=a.dom.domNode(d).commonAncestor(f,b.element);if(curNode=g?a.dom.getParentElement(f,{query:"h1, h2, h3, h4, h5, h6, p, pre, div, blockquote"},!1,g):null,curNode){for(;curNode.firstChild;)d.appendChild(curNode.firstChild);return c.setAfter(e),!0}if(3===f.nodeType)return d.appendChild(f),c.setAfter(e),!0}}return!1},j=function(a,b){var c=b.selection;b.element;if(c.isCollapsed()){if(i(b))return void a.preventDefault();if(g(b))return void a.preventDefault();if(h(b))return void a.preventDefault()}else c.containsUneditable()&&(a.preventDefault(),c.deleteContents())},k=function(a,b,c){if(a.selection.isCollapsed()){if(a.selection.caretIsInTheBeginnig("li"))if(c){if(a.commands.exec("outdentList"))return}else if(a.commands.exec("indentList"))return}else a.selection.deleteContents();a.commands.exec("insertHTML"," ")},l=function(a){this.domNodeRemovedInterval&&clearInterval(domNodeRemovedInterval),this.parent.fire("destroy:composer")},m=function(a){this.parent.fire("beforeinteraction",a).fire("beforeinteraction:composer",a),setTimeout(function(){this.parent.fire("interaction",a).fire("interaction:composer",a)}.bind(this),0)},n=function(a){this.parent.fire("focus",a).fire("focus:composer",a),setTimeout(function(){this.focusState=this.getValue(!1,!1)}.bind(this),0)},o=function(a){if(this.focusState!==this.getValue(!1,!1)){var b=a;"function"==typeof Object.create&&(b=Object.create(a,{type:{value:"change"}})),this.parent.fire("change",b).fire("change:composer",b)}this.parent.fire("blur",a).fire("blur:composer",a)},p=function(a){this.parent.fire(a.type,a).fire(a.type+":composer",a),"paste"===a.type&&setTimeout(function(){this.parent.fire("newword:composer")}.bind(this),0)},q=function(a){this.config.copyedFromMarking&&(a.clipboardData&&(a.clipboardData.setData("text/html",this.config.copyedFromMarking+this.selection.getHtml()),a.clipboardData.setData("text/plain",this.selection.getPlainText()),a.preventDefault()),this.parent.fire(a.type,a).fire(a.type+":composer",a))},r=function(b){var c=b.keyCode;(c===a.SPACE_KEY||c===a.ENTER_KEY)&&this.parent.fire("newword:composer")},s=function(b){if(!c.canSelectImagesInContentEditable()){var d=b.target,e=this.element.querySelectorAll("img"),f=this.element.querySelectorAll("."+this.config.classNames.uneditableContainer+" img"),g=a.lang.array(e).without(f);"IMG"===d.nodeName&&a.lang.array(g).contains(d)&&this.selection.selectNode(d)}},t=function(a){var b,c={IMG:"Image: ",A:"Link: "},d=a.target,e=d.nodeName;("A"===e||"IMG"===e)&&(d.hasAttribute("title")||(b=c[e]+(d.getAttribute("href")||d.getAttribute("src")),d.setAttribute("title",b)))},u=function(b){if(this.config.classNames.uneditableContainer){var c=a.dom.getParentElement(b.target,{query:"."+this.config.classNames.uneditableContainer},!1,this.element);c&&this.selection.setAfter(c)}},v=function(a){c.canSelectImagesInContentEditable()||setTimeout(function(){this.selection.getSelection().removeAllRanges()}.bind(this),0)},w=function(b){var c,e,f=b.keyCode,g=d[f];return(b.ctrlKey||b.metaKey)&&65===f?(this.selection.selectAll(),void b.preventDefault()):((b.ctrlKey||b.metaKey)&&!b.altKey&&g&&(this.commands.exec(g),b.preventDefault()),f===a.BACKSPACE_KEY&&j(b,this),(f===a.BACKSPACE_KEY||f===a.DELETE_KEY)&&(c=this.selection.getSelectedNode(!0),c&&"IMG"===c.nodeName&&(b.preventDefault(),e=c.parentNode,e.removeChild(c),"A"!==e.nodeName||e.firstChild||e.parentNode.removeChild(e),setTimeout(function(){a.quirks.redraw(this.element)}.bind(this),0))),void(this.config.handleTabKey&&f===a.TAB_KEY&&(b.preventDefault(),k(this,this.element,b.shiftKey))))},x=function(){var b=function(){this.doc.execCommand("enableObjectResizing",!1,"false"),this.doc.execCommand("enableInlineTableEditing",!1,"false")},c=function(){b.call(this),f(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c)}.bind(this);this.doc.execCommand&&a.browser.supportsCommand(this.doc,"enableObjectResizing")&&a.browser.supportsCommand(this.doc,"enableInlineTableEditing")&&(this.sandbox.getIframe?e(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c):setTimeout(function(){
-b.call(this)}.bind(this),0)),this.tableSelection=a.quirks.tableCellsSelection(this.element,this.parent)};a.views.Composer.prototype.observe=function(){var a=this.sandbox.getIframe?this.sandbox.getIframe():this.sandbox.getContentEditable(),d=(this.element,c.supportsEventsInIframeCorrectly()||this.sandbox.getContentEditable?this.element:this.sandbox.getWindow());this.focusState=this.getValue(!1,!1),a.addEventListener(["DOMNodeRemoved"],l.bind(this),!1),c.supportsMutationEvents()||(this.domNodeRemovedInterval=setInterval(function(){b.contains(document.documentElement,a)||l.call(this)},250)),this.config.handleTables&&x.call(this),e(d,["drop","paste","mouseup","focus","keyup"],m.bind(this)),d.addEventListener("focus",n.bind(this),!1),d.addEventListener("blur",o.bind(this),!1),e(this.element,["drop","paste","beforepaste"],p.bind(this),!1),this.element.addEventListener("copy",q.bind(this),!1),this.element.addEventListener("mousedown",s.bind(this),!1),this.element.addEventListener("mouseover",t.bind(this),!1),this.element.addEventListener("click",u.bind(this),!1),this.element.addEventListener("drop",v.bind(this),!1),this.element.addEventListener("keyup",r.bind(this),!1),this.element.addEventListener("keydown",w.bind(this),!1),this.element.addEventListener("dragenter",function(){this.parent.fire("unset_placeholder")}.bind(this),!1)}}(wysihtml5),function(a){var b=400;a.views.Synchronizer=Base.extend({constructor:function(a,b,c){this.editor=a,this.textarea=b,this.composer=c,this._observe()},fromComposerToTextarea:function(b){this.textarea.setValue(a.lang.string(this.composer.getValue(!1,!1)).trim(),b)},fromTextareaToComposer:function(a){var b=this.textarea.getValue(!1,!1);b?this.composer.setValue(b,a):(this.composer.clear(),this.editor.fire("set_placeholder"))},sync:function(a){"textarea"===this.editor.currentView.name?this.fromTextareaToComposer(a):this.fromComposerToTextarea(a)},_observe:function(){var c,d=this,e=this.textarea.element.form,f=function(){c=setInterval(function(){d.fromComposerToTextarea()},b)},g=function(){clearInterval(c),c=null};f(),e&&(a.dom.observe(e,"submit",function(){d.sync(!0)}),a.dom.observe(e,"reset",function(){setTimeout(function(){d.fromTextareaToComposer()},0)})),this.editor.on("change_view",function(a){"composer"!==a||c?"textarea"===a&&(d.fromComposerToTextarea(!0),g()):(d.fromTextareaToComposer(!0),f())}),this.editor.on("destroy:composer",g)}})}(wysihtml5),function(a){a.views.SourceView=Base.extend({constructor:function(a,b){this.editor=a,this.composer=b,this._observe()},switchToTextarea:function(a){var b=this.composer.win.getComputedStyle(this.composer.element),c=parseFloat(b.width),d=Math.max(parseFloat(b.height),100);this.textarea||(this.textarea=this.composer.doc.createElement("textarea"),this.textarea.className="wysihtml5-source-view"),this.textarea.style.width=c+"px",this.textarea.style.height=d+"px",this.textarea.value=this.editor.getValue(a,!0),this.composer.element.parentNode.insertBefore(this.textarea,this.composer.element),this.editor.currentView="source",this.composer.element.style.display="none"},switchToComposer:function(a){var b=this.textarea.value;b?this.composer.setValue(b,a):(this.composer.clear(),this.editor.fire("set_placeholder")),this.textarea.parentNode.removeChild(this.textarea),this.editor.currentView=this.composer,this.composer.element.style.display=""},_observe:function(){this.editor.on("change_view",function(a){"composer"===a?this.switchToComposer(!0):"textarea"===a&&this.switchToTextarea(!0)}.bind(this))}})}(wysihtml5),wysihtml5.views.Textarea=wysihtml5.views.View.extend({name:"textarea",constructor:function(a,b,c){this.base(a,b,c),this._observe()},clear:function(){this.element.value=""},getValue:function(a){var b=this.isEmpty()?"":this.element.value;return a!==!1&&(b=this.parent.parse(b)),b},setValue:function(a,b){b&&(a=this.parent.parse(a)),this.element.value=a},cleanUp:function(){var a=this.parent.parse(this.element.value);this.element.value=a},hasPlaceholderSet:function(){var a=wysihtml5.browser.supportsPlaceholderAttributeOn(this.element),b=this.element.getAttribute("placeholder")||null,c=this.element.value,d=!c;return a&&d||c===b},isEmpty:function(){return!wysihtml5.lang.string(this.element.value).trim()||this.hasPlaceholderSet()},_observe:function(){var a=this.element,b=this.parent,c={focusin:"focus",focusout:"blur"},d=wysihtml5.browser.supportsEvent("focusin")?["focusin","focusout","change"]:["focus","blur","change"];b.on("beforeload",function(){wysihtml5.dom.observe(a,d,function(a){var d=c[a.type]||a.type;b.fire(d).fire(d+":textarea")}),wysihtml5.dom.observe(a,["paste","drop"],function(){setTimeout(function(){b.fire("paste").fire("paste:textarea")},0)})})}}),function(a){var b,c={name:b,style:!0,toolbar:b,showToolbarAfterInit:!0,showToolbarDialogsOnSelection:!0,autoLink:!0,handleTables:!0,handleTabKey:!0,parserRules:{tags:{br:{},span:{},div:{},p:{}},classes:{}},pasteParserRulesets:null,parser:a.dom.parse,useLineBreaks:!0,stylesheets:[],placeholderText:b,supportTouchDevices:!0,cleanUp:!0,contentEditableMode:!1,classNames:{composer:"wysihtml5-editor",body:"wysihtml5-supported",sandbox:"wysihtml5-sandbox",placeholder:"wysihtml5-placeholder",uneditableContainer:"wysihtml5-uneditable-container"},copyedFromMarking:''};a.Editor=a.lang.Dispatcher.extend({constructor:function(b,d){if(this.editableElement="string"==typeof b?document.getElementById(b):b,this.config=a.lang.object({}).merge(c).merge(d).get(),this._isCompatible=a.browser.supported(),d&&d.classNames&&a.lang.object(this.config.classNames).merge(d.classNames),"textarea"!=this.editableElement.nodeName.toLowerCase()&&(this.config.contentEditableMode=!0,this.config.noTextarea=!0),this.config.noTextarea||(this.textarea=new a.views.Textarea(this,this.editableElement,this.config),this.currentView=this.textarea),!this._isCompatible||!this.config.supportTouchDevices&&a.browser.isTouchDevice()){var e=this;return void setTimeout(function(){e.fire("beforeload").fire("load")},0)}a.dom.addClass(document.body,this.config.classNames.body),this.composer=new a.views.Composer(this,this.editableElement,this.config),this.currentView=this.composer,"function"==typeof this.config.parser&&this._initParser(),this.on("beforeload",this.handleBeforeLoad)},handleBeforeLoad:function(){this.config.noTextarea?this.sourceView=new a.views.SourceView(this,this.composer):this.synchronizer=new a.views.Synchronizer(this,this.textarea,this.composer),this.config.toolbar&&(this.toolbar=new a.toolbar.Toolbar(this,this.config.toolbar,this.config.showToolbarAfterInit))},isCompatible:function(){return this._isCompatible},clear:function(){return this.currentView.clear(),this},getValue:function(a,b){return this.currentView.getValue(a,b)},setValue:function(a,b){return this.fire("unset_placeholder"),a?(this.currentView.setValue(a,b),this):this.clear()},cleanUp:function(){this.currentView.cleanUp()},focus:function(a){return this.currentView.focus(a),this},disable:function(){return this.currentView.disable(),this},enable:function(){return this.currentView.enable(),this},isEmpty:function(){return this.currentView.isEmpty()},hasPlaceholderSet:function(){return this.currentView.hasPlaceholderSet()},parse:function(b,c){var d=this.config.contentEditableMode?document:this.composer?this.composer.sandbox.getDocument():null,e=this.config.parser(b,{rules:this.config.parserRules,cleanUp:this.config.cleanUp,context:d,uneditableClass:this.config.classNames.uneditableContainer,clearInternals:c});return"object"==typeof b&&a.quirks.redraw(b),e},_initParser:function(){var b;a.browser.supportsModernPaste()?this.on("paste:composer",function(c){c.preventDefault(),b=a.dom.getPastedHtml(c),b&&this._cleanAndPaste(b)}.bind(this)):this.on("beforepaste:composer",function(b){b.preventDefault();var c=this.composer.getScrollPos();a.dom.getPastedHtmlWithDiv(this.composer,function(a){a&&this._cleanAndPaste(a),this.composer.setScrollPos(c)}.bind(this))}.bind(this))},_cleanAndPaste:function(b){var c=a.quirks.cleanPastedHTML(b,{referenceNode:this.composer.element,rules:this.config.pasteParserRulesets||[{set:this.config.parserRules}],uneditableClass:this.config.classNames.uneditableContainer});this.composer.selection.deleteContents(),this.composer.selection.insertHTML(c)}})}(wysihtml5),function(a){var b=a.dom,c="wysihtml5-command-dialog-opened",d="input, select, textarea",e="[data-wysihtml5-dialog-field]",f="data-wysihtml5-dialog-field";a.toolbar.Dialog=a.lang.Dispatcher.extend({constructor:function(a,b){this.link=a,this.container=b},_observe:function(){if(!this._observed){var d=this,e=function(a){var b=d._serialize();d.fire("save",b),d.hide(),a.preventDefault(),a.stopPropagation()};b.observe(d.link,"click",function(){b.hasClass(d.link,c)&&setTimeout(function(){d.hide()},0)}),b.observe(this.container,"keydown",function(b){var c=b.keyCode;c===a.ENTER_KEY&&e(b),c===a.ESCAPE_KEY&&d.cancel()}),b.delegate(this.container,"[data-wysihtml5-dialog-action=save]","click",e),b.delegate(this.container,"[data-wysihtml5-dialog-action=cancel]","click",function(a){d.cancel(),a.preventDefault(),a.stopPropagation()}),this._observed=!0}},_serialize:function(){for(var a={},b=this.container.querySelectorAll(e),c=b.length,d=0;c>d;d++)a[b[d].getAttribute(f)]=b[d].value;return a},_interpolate:function(a){for(var b,c,d,g=document.querySelector(":focus"),h=this.container.querySelectorAll(e),i=h.length,j=0;i>j;j++)b=h[j],b!==g&&(a&&"hidden"===b.type||(c=b.getAttribute(f),d=this.elementToChange&&"boolean"!=typeof this.elementToChange?this.elementToChange.getAttribute(c)||"":b.defaultValue,b.value=d))},update:function(a){this.elementToChange=a?a:this.elementToChange,this._interpolate()},show:function(a){var e=this.container.querySelector(d);if(this._observe(),this.update(a),b.addClass(this.link,c),this.container.style.display="",this.isOpen=!0,this.fire("show"),e&&!a)try{e.focus()}catch(f){}},_hide:function(a){this.elementToChange=null,b.removeClass(this.link,c),this.container.style.display="none",this.isOpen=!1},hide:function(){this._hide(),this.fire("hide")},cancel:function(){this._hide(),this.fire("cancel")}})}(wysihtml5),function(a){var b=a.dom,c={position:"relative"},d={left:0,margin:0,opacity:0,overflow:"hidden",padding:0,position:"absolute",top:0,zIndex:1},e={cursor:"inherit",fontSize:"50px",height:"50px",marginTop:"-25px",outline:0,padding:0,position:"absolute",right:"-4px",top:"50%"},f={"x-webkit-speech":"",speech:""};a.toolbar.Speech=function(g,h){var i=document.createElement("input");if(!a.browser.supportsSpeechApiOn(i))return void(h.style.display="none");var j=g.editor.textarea.element.getAttribute("lang");j&&(f.lang=j);var k=document.createElement("div");a.lang.object(d).merge({width:h.offsetWidth+"px",height:h.offsetHeight+"px"}),b.insert(i).into(k),b.insert(k).into(h),b.setStyles(e).on(i),b.setAttributes(f).on(i),b.setStyles(d).on(k),b.setStyles(c).on(h);var l="onwebkitspeechchange"in i?"webkitspeechchange":"speechchange";b.observe(i,l,function(){g.execCommand("insertText",i.value),i.value=""}),b.observe(i,"click",function(a){b.hasClass(h,"wysihtml5-command-disabled")&&a.preventDefault(),a.stopPropagation()})}}(wysihtml5),function(a){function b(b,c){var d=b.commands.state(c.name,c.value);return!c.dialog.multiselect&&a.lang.object(d).isArray()&&(d=1===d.length?d[0]:!0),d}var c="wysihtml5-command-disabled",d="wysihtml5-commands-disabled",e="wysihtml5-command-active",f="wysihtml5-action-active",g=a.dom;a.toolbar.Toolbar=Base.extend({constructor:function(b,g,h){this.editor=b,this.container="string"==typeof g?document.getElementById(g):g,this.composer=b.composer,this._getLinks("command"),this._getLinks("action"),this._observe(),h&&this.show(),null!=b.config.classNameCommandDisabled&&(c=b.config.classNameCommandDisabled),null!=b.config.classNameCommandsDisabled&&(d=b.config.classNameCommandsDisabled),null!=b.config.classNameCommandActive&&(e=b.config.classNameCommandActive),null!=b.config.classNameActionActive&&(f=b.config.classNameActionActive);for(var i=this.container.querySelectorAll("[data-wysihtml5-command=insertSpeech]"),j=i.length,k=0;j>k;k++)new a.toolbar.Speech(this,i[k])},_getLinks:function(b){for(var c,d,e,f,g,h,i=this[b+"Links"]=a.lang.array(this.container.querySelectorAll("[data-wysihtml5-"+b+"]")).get(),j=i.length,k=0,l=this[b+"Mapping"]={};j>k;k++)c=i[k],e=c.getAttribute("data-wysihtml5-"+b),f=c.getAttribute("data-wysihtml5-"+b+"-value"),h=c.getAttribute("data-wysihtml5-"+b+"-blank-value"),d=this.container.querySelector("[data-wysihtml5-"+b+"-group='"+e+"']"),g=this._getDialog(c,e),l[e+":"+f]={link:c,group:d,name:e,value:f,tracksBlankValue:h,dialog:g,state:!1}},_getDialog:function(b,c){var d,e,f=this,g=this.container.querySelector("[data-wysihtml5-dialog='"+c+"']");return g&&(d=a.toolbar["Dialog_"+c]?new a.toolbar["Dialog_"+c](b,g):new a.toolbar.Dialog(b,g),d.on("show",function(){e=f.composer.selection.getBookmark(),f.editor.fire("show:dialog",{command:c,dialogContainer:g,commandLink:b})}),d.on("save",function(a){e&&f.composer.selection.setBookmark(e),f._execCommand(c,a),f.editor.fire("save:dialog",{command:c,dialogContainer:g,commandLink:b}),f._hideAllDialogs(),f._preventInstantFocus(),e=void 0}),d.on("cancel",function(){e&&f.composer.selection.setBookmark(e),f.editor.fire("cancel:dialog",{command:c,dialogContainer:g,commandLink:b}),e=void 0,f._preventInstantFocus()}),d.on("hide",function(){f.editor.fire("hide:dialog",{command:c,dialogContainer:g,commandLink:b}),e=void 0})),d},execCommand:function(a,b){this.commandsDisabled||this._execCommand(a,b)},_execCommand:function(a,b){this.editor.focus(!1),this.composer.commands.exec(a,b),this._updateLinkStates()},execAction:function(a){var b=this.editor;"change_view"===a&&(b.currentView===b.textarea||"source"===b.currentView?b.fire("change_view","composer"):b.fire("change_view","textarea")),"showSource"==a&&b.fire("showSource")},_observe:function(){for(var c=this,e=this.editor,f=this.container,h=this.commandLinks.concat(this.actionLinks),i=h.length,j=0;i>j;j++)"A"===h[j].nodeName?g.setAttributes({href:"javascript:;",unselectable:"on"}).on(h[j]):g.setAttributes({unselectable:"on"}).on(h[j]);g.delegate(f,"[data-wysihtml5-command], [data-wysihtml5-action]","mousedown",function(a){a.preventDefault()}),g.delegate(f,"[data-wysihtml5-command]","click",function(a){var d,e=this,f=e.getAttribute("data-wysihtml5-command"),g=e.getAttribute("data-wysihtml5-command-value"),h=c.commandMapping[f+":"+g];g||!h.dialog?c.execCommand(f,g):(d=b(c.composer,h),h.dialog.show(d)),a.preventDefault()}),g.delegate(f,"[data-wysihtml5-action]","click",function(a){var b=this.getAttribute("data-wysihtml5-action");c.execAction(b),a.preventDefault()}),e.on("interaction:composer",function(a){c.preventFocus||c._updateLinkStates()}),this.container.ownerDocument.addEventListener("click",function(b){a.dom.contains(c.container,b.target)||a.dom.contains(c.composer.element,b.target)||(c._updateLinkStates(),c._preventInstantFocus())},!1),this.editor.config.handleTables&&(e.on("tableselect:composer",function(){c.container.querySelectorAll('[data-wysihtml5-hiddentools="table"]')[0].style.display=""}),e.on("tableunselect:composer",function(){c.container.querySelectorAll('[data-wysihtml5-hiddentools="table"]')[0].style.display="none"})),e.on("change_view",function(a){setTimeout(function(){c.commandsDisabled="composer"!==a,c._updateLinkStates(),c.commandsDisabled?g.addClass(f,d):g.removeClass(f,d)},0)})},_hideAllDialogs:function(){var a=this.commandMapping;for(var b in a)a[b].dialog&&a[b].dialog.hide()},_preventInstantFocus:function(){this.preventFocus=!0,setTimeout(function(){this.preventFocus=!1}.bind(this),0)},_updateLinkStates:function(){var a,d,h,i,j,k=this.commandMapping,l=this.composer,m=this.actionMapping;for(a in k)i=k[a],this.commandsDisabled?(d=!1,g.removeClass(i.link,e),i.group&&g.removeClass(i.group,e),i.dialog&&i.dialog.hide()):(d=this.composer.commands.state(i.name,i.value),g.removeClass(i.link,c),i.group&&g.removeClass(i.group,c)),(i.state!==d||i.tracksBlankValue)&&(i.state=d,d?i.tracksBlankValue?g.removeClass(i.link,e):(g.addClass(i.link,e),i.group&&g.addClass(i.group,e),!i.dialog||"undefined"!=typeof i.value&&null!==i.value||(d&&"object"==typeof d?(d=b(l,i),i.state=d,j=i.dialog.container.dataset?i.dialog.container.dataset.showdialogonselection:!1,l.config.showToolbarDialogsOnSelection||j?i.dialog.show(d):i.dialog.update(d)):i.dialog.hide())):i.tracksBlankValue?g.addClass(i.link,e):(g.removeClass(i.link,e),i.group&&g.removeClass(i.group,e),i.dialog&&!i.value&&i.dialog.hide()));for(a in m)h=m[a],"change_view"===h.name&&(h.state=this.editor.currentView===this.editor.textarea||"source"===this.editor.currentView,h.state?g.addClass(h.link,f):g.removeClass(h.link,f))},show:function(){this.container.style.display=""},hide:function(){this.container.style.display="none"}})}(wysihtml5),function(a){a.toolbar.Dialog_createTable=a.toolbar.Dialog.extend({show:function(a){this.base(a)}})}(wysihtml5),function(a){var b="[data-wysihtml5-dialog-field]",c="data-wysihtml5-dialog-field";a.toolbar.Dialog_foreColorStyle=a.toolbar.Dialog.extend({multiselect:!0,_serialize:function(){for(var a={},d=this.container.querySelectorAll(b),e=d.length,f=0;e>f;f++)a[d[f].getAttribute(c)]=d[f].value;return a},_interpolate:function(d){for(var e,f,g=a.quirks.styleParser,h=document.querySelector(":focus"),i=this.container.querySelectorAll(b),j=i.length,k=0,l=this.elementToChange?a.lang.object(this.elementToChange).isArray()?this.elementToChange[0]:this.elementToChange:null,m=l?l.getAttribute("style"):null,n=m?g.parseColor(m,"color"):null;j>k;k++)e=i[k],e!==h&&(d&&"hidden"===e.type||"color"===e.getAttribute(c)&&(f=(e.dataset.colormode||"rgb").toLowerCase(),f="hex"===f?"hash":f,n?e.value=g.unparseColor(n,f):e.value=g.unparseColor([0,0,0],f)))}})}(wysihtml5),function(a){a.dom;a.toolbar.Dialog_fontSizeStyle=a.toolbar.Dialog.extend({multiselect:!0,_serialize:function(){return{size:this.container.querySelector('[data-wysihtml5-dialog-field="size"]').value}},_interpolate:function(b){var c=document.querySelector(":focus"),d=this.container.querySelector("[data-wysihtml5-dialog-field='size']"),e=this.elementToChange?a.lang.object(this.elementToChange).isArray()?this.elementToChange[0]:this.elementToChange:null,f=e?e.getAttribute("style"):null,g=f?a.quirks.styleParser.parseFontSize(f):null;d&&d!==c&&g&&!/^\s*$/.test(g)&&(d.value=g)}})}(wysihtml5);
+var wysihtml5={version:"0.5.0-beta13",commands:{},dom:{},quirks:{},toolbar:{},lang:{},selection:{},views:{},INVISIBLE_SPACE:"\ufeff",INVISIBLE_SPACE_REG_EXP:/\uFEFF/g,EMPTY_FUNCTION:function(){},ELEMENT_NODE:1,TEXT_NODE:3,BACKSPACE_KEY:8,ENTER_KEY:13,ESCAPE_KEY:27,SPACE_KEY:32,TAB_KEY:9,DELETE_KEY:46};wysihtml5.polyfills=function(a,b){String.prototype.trim||!function(){var a=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(a,"")}}(),function(){var c="addEventListener",d="removeEventListener";b[c]||(a.Element.prototype[c]=a[c]=b[c]=function(b,c,d){return(d=this).attachEvent("on"+b,function(b){var b=b||a.event;b.target=b.target||b.srcElement,b.preventDefault=b.preventDefault||function(){b.returnValue=!1},b.stopPropagation=b.stopPropagation||function(){b.cancelBubble=!0},b.which=b.button?2===b.button?3:4===b.button?2:b.button:b.keyCode,c.call(d,b)})},a.Element.prototype[d]=a[d]=b[d]=function(a,b){return this.detachEvent("on"+a,b)})}(),Object.defineProperty&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(a.Element.prototype,"textContent")&&!Object.getOwnPropertyDescriptor(a.Element.prototype,"textContent").get&&!function(){var b=Object.getOwnPropertyDescriptor(a.Element.prototype,"innerText");Object.defineProperty(a.Element.prototype,"textContent",{get:function(){return b.get.call(this)},set:function(a){return b.set.call(this,a)}})}(),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){for(var c=this.length,d=-1,e=b>>>0;~(c-e);d=this[--c]===a?c:d);return d}),Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d&&a?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}),a.Element&&function(a){a.matches=a.matches||a.matchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector||function(a){for(var b=this,c=(b.parentNode||b.document).querySelectorAll(a),d=-1;c[++d]&&c[d]!=b;);return!!c[d]}}(a.Element.prototype),"document"in a&&("classList"in b.createElement("_")?"DOMTokenList"in a&&!function(){"use strict";var c=b.createElement("_");if(c.classList.add("c1","c2"),!c.classList.contains("c2")){var d=function(b){var c=a.DOMTokenList.prototype[b];a.DOMTokenList.prototype[b]=function(a){var b,d=arguments.length;for(b=0;d>b;b++)a=arguments[b],c.call(this,a)}};d("add"),d("remove")}if(c.classList.toggle("c3",!1),c.classList.contains("c3")){var e=a.DOMTokenList.prototype.toggle;a.DOMTokenList.prototype.toggle=function(a,b){return 1 in arguments&&!this.contains(a)==!b?b:e.call(this,a)}}c=null}():!function(a){"use strict";if("Element"in a){var b="classList",c="prototype",d=a.Element[c],e=Object,f=String[c].trim||function(){return this.replace(/^\s+|\s+$/g,"")},g=Array[c].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1},h=function(a,b){this.name=a,this.code=DOMException[a],this.message=b},i=function(a,b){if(""===b)throw new h("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(b))throw new h("INVALID_CHARACTER_ERR","String contains an invalid character");return g.call(a,b)},j=function(a){for(var b=f.call(a.getAttribute("class")||""),c=b?b.split(/\s+/):[],d=0,e=c.length;e>d;d++)this.push(c[d]);this._updateClassName=function(){a.setAttribute("class",this.toString())}},k=j[c]=[],l=function(){return new j(this)};if(h[c]=Error[c],k.item=function(a){return this[a]||null},k.contains=function(a){return a+="",-1!==i(this,a)},k.add=function(){var a,b=arguments,c=0,d=b.length,e=!1;do a=b[c]+"",-1===i(this,a)&&(this.push(a),e=!0);while(++c0?c.childNodes[e]:void 0,g=b.focusNode,h=b.focusOffset,i=g&&1===g.nodeType&&h>0?g.childNodes[h-1]:void 0,j=this.ownerDocument.createRange(),k=a.shift(),l=k?a.shift():null;for((c===g&&e>h||c!==g&&c.compareDocumentPosition(g)&Node.DOCUMENT_POSITION_PRECEDING&&!(c.compareDocumentPosition(g)&Node.DOCUMENT_POSITION_CONTAINS))&&(g=[c,c=g][0],h=[e,e=h][0]);k&&l;)l.previousSibling&&l.previousSibling===k?(c===l&&(c=k,e=k.nodeValue.length+e),g===l&&(g=k,h=k.nodeValue.length+h),k.nodeValue=k.nodeValue+l.nodeValue,l.parentNode.removeChild(l),l=a.shift()):(k=l,l=a.shift());i&&(h=Array.prototype.indexOf.call(i.parentNode.childNodes,i)+1),f&&(e=Array.prototype.indexOf.call(f.parentNode.childNodes,f)),c&&c.parentNode&&g&&g.parentNode&&(j.setStart(c,e),j.setEnd(g,h),b.removeAllRanges(),b.addRange(j))});Node.prototype.normalize=a};"Node"in window&&"normalize"in Node.prototype&&c()&&e()},wysihtml5.polyfills(window,document),function(a,b){"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a():b.rangy=a()}(function(){function a(a,b){var c=typeof a[b];return c==u||!(c!=t||!a[b])||"unknown"==c}function b(a,b){return!(typeof a[b]!=t||!a[b])}function c(a,b){return typeof a[b]!=v}function d(a){return function(b,c){for(var d=c.length;d--;)if(!a(b,c[d]))return!1;return!0}}function e(a){return a&&A(a,z)&&C(a,y)}function f(a){return b(a,"body")?a.body:a.getElementsByTagName("body")[0]}function g(b){typeof console!=v&&a(console,"log")&&console.log(b)}function h(a,b){F&&b?alert(a):g(a)}function i(a){H.initialized=!0,H.supported=!1,h("Rangy is not supported in this environment. Reason: "+a,H.config.alertOnFail)}function j(a){h("Rangy warning: "+a,H.config.alertOnWarn)}function k(a){return a.message||a.description||String(a)}function l(){if(F&&!H.initialized){var b,c=!1,d=!1;a(document,"createRange")&&(b=document.createRange(),A(b,x)&&C(b,w)&&(c=!0));var h=f(document);if(!h||"body"!=h.nodeName.toLowerCase())return void i("No body element found");if(h&&a(h,"createTextRange")&&(b=h.createTextRange(),e(b)&&(d=!0)),!c&&!d)return void i("Neither Range nor TextRange are available");H.initialized=!0,H.features={implementsDomRange:c,implementsTextRange:d};var j,l;for(var m in E)(j=E[m])instanceof p&&j.init(j,H);for(var n=0,o=K.length;o>n;++n)try{K[n](H)}catch(q){l="Rangy init listener threw an exception. Continuing. Detail: "+k(q),g(l)}}}function m(a,b,c){c&&(a+=" in module "+c.name),H.warn("DEPRECATED: "+a+" is deprecated. Please use "+b+" instead.")}function n(a,b,c,d){a[b]=function(){return m(b,c,d),a[c].apply(a,G.toArray(arguments))}}function o(a){a=a||window,l();for(var b=0,c=L.length;c>b;++b)L[b](a)}function p(a,b,c){this.name=a,this.dependencies=b,this.initialized=!1,this.supported=!1,this.initializer=c}function q(a,b,c){var d=new p(a,b,function(b){if(!b.initialized){b.initialized=!0;try{c(H,b),b.supported=!0}catch(d){var e="Module '"+a+"' failed to load: "+k(d);g(e),d.stack&&g(d.stack)}}});return E[a]=d,d}function r(){}function s(){}var t="object",u="function",v="undefined",w=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],x=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],y=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],z=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"],A=d(a),B=d(b),C=d(c),D=[].forEach?function(a,b){a.forEach(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)b(a[c],c)},E={},F=typeof window!=v&&typeof document!=v,G={isHostMethod:a,isHostObject:b,isHostProperty:c,areHostMethods:A,areHostObjects:B,areHostProperties:C,isTextRange:e,getBody:f,forEach:D},H={version:"1.3.0",initialized:!1,isBrowser:F,supported:!0,util:G,features:{},modules:E,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==v?!0:rangyAutoInitialize}};H.fail=i,H.warn=j;var I;({}).hasOwnProperty?(G.extend=I=function(a,b,c){var d,e;for(var f in b)b.hasOwnProperty(f)&&(d=a[f],e=b[f],c&&null!==d&&"object"==typeof d&&null!==e&&"object"==typeof e&&I(d,e,!0),a[f]=e);return b.hasOwnProperty("toString")&&(a.toString=b.toString),a},G.createOptions=function(a,b){var c={};return I(c,b),a&&I(c,a),c}):i("hasOwnProperty not supported"),F||i("Rangy can only run in a browser"),function(){var a;if(F){var b=document.createElement("div");b.appendChild(document.createElement("span"));var c=[].slice;try{1==c.call(b.childNodes,0)[0].nodeType&&(a=function(a){return c.call(a,0)})}catch(d){}}a||(a=function(a){for(var b=[],c=0,d=a.length;d>c;++c)b[c]=a[c];return b}),G.toArray=a}();var J;F&&(a(document,"addEventListener")?J=function(a,b,c){a.addEventListener(b,c,!1)}:a(document,"attachEvent")?J=function(a,b,c){a.attachEvent("on"+b,c)}:i("Document does not have required addEventListener or attachEvent method"),G.addListener=J);var K=[];G.deprecationNotice=m,G.createAliasForDeprecatedMethod=n,H.init=l,H.addInitListener=function(a){H.initialized?a(H):K.push(a)};var L=[];H.addShimListener=function(a){L.push(a)},F&&(H.shim=H.createMissingNativeApi=o,n(H,"createMissingNativeApi","shim")),p.prototype={init:function(){for(var a,b,c=this.dependencies||[],d=0,e=c.length;e>d;++d){if(b=c[d],a=E[b],!(a&&a instanceof p))throw new Error("required module '"+b+"' not found");if(a.init(),!a.supported)throw new Error("required module '"+b+"' not supported")}this.initializer(this)},fail:function(a){throw this.initialized=!0,this.supported=!1,new Error(a)},warn:function(a){H.warn("Module "+this.name+": "+a)},deprecationNotice:function(a,b){H.warn("DEPRECATED: "+a+" in module "+this.name+" is deprecated. Please use "+b+" instead")},createError:function(a){return new Error("Error in Rangy "+this.name+" module: "+a)}},H.createModule=function(a){var b,c;2==arguments.length?(b=arguments[1],c=[]):(b=arguments[2],c=arguments[1]);var d=q(a,c,b);H.initialized&&H.supported&&d.init()},H.createCoreModule=function(a,b,c){q(a,b,c)},H.RangePrototype=r,H.rangePrototype=new r,H.selectionPrototype=new s,H.createCoreModule("DomUtil",[],function(a,b){function c(a){var b;return typeof a.namespaceURI==F||null===(b=a.namespaceURI)||"http://www.w3.org/1999/xhtml"==b}function d(a){var b=a.parentNode;return 1==b.nodeType?b:null}function e(a){for(var b=0;a=a.previousSibling;)++b;return b}function f(a){switch(a.nodeType){case 7:case 10:return 0;case 3:case 8:return a.length;default:return a.childNodes.length}}function g(a,b){var c,d=[];for(c=a;c;c=c.parentNode)d.push(c);for(c=b;c;c=c.parentNode)if(K(d,c))return c;return null}function h(a,b,c){for(var d=c?b:b.parentNode;d;){if(d===a)return!0;d=d.parentNode}return!1}function i(a,b){return h(a,b,!0)}function j(a,b,c){for(var d,e=c?a:a.parentNode;e;){if(d=e.parentNode,d===b)return e;e=d}return null}function k(a){var b=a.nodeType;return 3==b||4==b||8==b}function l(a){if(!a)return!1;var b=a.nodeType;return 3==b||8==b}function m(a,b){var c=b.nextSibling,d=b.parentNode;return c?d.insertBefore(a,c):d.appendChild(a),a}function n(a,b,c){var d=a.cloneNode(!1);if(d.deleteData(0,b),a.deleteData(b,a.length-b),m(d,a),c)for(var f,g=0;f=c[g++];)f.node==a&&f.offset>b?(f.node=d,f.offset-=b):f.node==a.parentNode&&f.offset>e(a)&&++f.offset;return d}function o(a){if(9==a.nodeType)return a;if(typeof a.ownerDocument!=F)return a.ownerDocument;if(typeof a.document!=F)return a.document;if(a.parentNode)return o(a.parentNode);throw b.createError("getDocument: no document found for node")}function p(a){var c=o(a);if(typeof c.defaultView!=F)return c.defaultView;if(typeof c.parentWindow!=F)return c.parentWindow;throw b.createError("Cannot get a window object for node")}function q(a){if(typeof a.contentDocument!=F)return a.contentDocument;if(typeof a.contentWindow!=F)return a.contentWindow.document;throw b.createError("getIframeDocument: No Document object found for iframe element")}function r(a){if(typeof a.contentWindow!=F)return a.contentWindow;if(typeof a.contentDocument!=F)return a.contentDocument.defaultView;throw b.createError("getIframeWindow: No Window object found for iframe element")}function s(a){return a&&G.isHostMethod(a,"setTimeout")&&G.isHostObject(a,"document")}function t(a,b,c){var d;if(a?G.isHostProperty(a,"nodeType")?d=1==a.nodeType&&"iframe"==a.tagName.toLowerCase()?q(a):o(a):s(a)&&(d=a.document):d=document,!d)throw b.createError(c+"(): Parameter must be a Window object or DOM node");return d}function u(a){for(var b;b=a.parentNode;)a=b;return a}function v(a,c,d,f){var h,i,k,l,m;if(a==d)return c===f?0:f>c?-1:1;if(h=j(d,a,!0))return c<=e(h)?-1:1;if(h=j(a,d,!0))return e(h)[index:"+e(a)+",length:"+a.childNodes.length+"]["+(a.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return a.nodeName}function y(a){for(var b,c=o(a).createDocumentFragment();b=a.firstChild;)c.appendChild(b);return c}function z(a,b,c){var d=H(a),e=a.createElement("div");e.contentEditable=""+!!c,b&&(e.innerHTML=b);var f=d.firstChild;return f?d.insertBefore(e,f):d.appendChild(e),e}function A(a){return a.parentNode.removeChild(a)}function B(a){this.root=a,this._next=a}function C(a){return new B(a)}function D(a,b){this.node=a,this.offset=b}function E(a){this.code=this[a],this.codeName=a,this.message="DOMException: "+this.codeName}var F="undefined",G=a.util,H=G.getBody;G.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||b.fail("document missing a Node creation method"),G.isHostMethod(document,"getElementsByTagName")||b.fail("document missing getElementsByTagName method");var I=document.createElement("div");G.areHostMethods(I,["insertBefore","appendChild","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"]))||b.fail("Incomplete Element implementation"),G.isHostProperty(I,"innerHTML")||b.fail("Element is missing innerHTML property");var J=document.createTextNode("test");G.areHostMethods(J,["splitText","deleteData","insertData","appendData","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"])||!G.areHostProperties(J,["data"]))||b.fail("Incomplete Text Node implementation");var K=function(a,b){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1},L=!1;!function(){var b=document.createElement("b");b.innerHTML="1";var c=b.firstChild;b.innerHTML="
",L=w(c),a.features.crashyTextNodes=L}();var M;typeof window.getComputedStyle!=F?M=function(a,b){return p(a).getComputedStyle(a,null)[b]}:typeof document.documentElement.currentStyle!=F?M=function(a,b){return a.currentStyle?a.currentStyle[b]:""}:b.fail("No means of obtaining computed style properties found"),B.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var a,b,c=this._current=this._next;if(this._current)if(a=c.firstChild)this._next=a;else{for(b=null;c!==this.root&&!(b=c.nextSibling);)c=c.parentNode;this._next=b}return this._current},detach:function(){this._current=this._next=this.root=null}},D.prototype={equals:function(a){return!!a&&this.node===a.node&&this.offset==a.offset},inspect:function(){return"[DomPosition("+x(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}},E.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},E.prototype.toString=function(){return this.message},a.dom={arrayContains:K,isHtmlNamespace:c,parentElement:d,getNodeIndex:e,getNodeLength:f,getCommonAncestor:g,isAncestorOf:h,isOrIsAncestorOf:i,getClosestAncestorIn:j,isCharacterDataNode:k,isTextOrCommentNode:l,insertAfter:m,splitDataNode:n,getDocument:o,getWindow:p,getIframeWindow:r,getIframeDocument:q,getBody:H,isWindow:s,getContentDocument:t,getRootContainer:u,comparePoints:v,isBrokenNode:w,inspectNode:x,getComputedStyleProperty:M,createTestElement:z,removeNode:A,fragmentFromNodeChildren:y,createIterator:C,DomPosition:D},a.DOMException=E}),H.createCoreModule("DomRange",["DomUtil"],function(a,b){function c(a,b){return 3!=a.nodeType&&(P(a,b.startContainer)||P(a,b.endContainer))}function d(a){return a.document||Q(a.startContainer)}function e(a){return W(a.startContainer)}function f(a){return new L(a.parentNode,O(a))}function g(a){return new L(a.parentNode,O(a)+1)}function h(a,b,c){var d=11==a.nodeType?a.firstChild:a;return N(b)?c==b.length?J.insertAfter(a,b):b.parentNode.insertBefore(a,0==c?b:S(b,c)):c>=b.childNodes.length?b.appendChild(a):b.insertBefore(a,b.childNodes[c]),d}function i(a,b,c){if(z(a),z(b),d(b)!=d(a))throw new M("WRONG_DOCUMENT_ERR");var e=R(a.startContainer,a.startOffset,b.endContainer,b.endOffset),f=R(a.endContainer,a.endOffset,b.startContainer,b.startOffset);return c?0>=e&&f>=0:0>e&&f>0}function j(a){for(var b,c,e,f=d(a.range).createDocumentFragment();c=a.next();){if(b=a.isPartiallySelectedSubtree(),c=c.cloneNode(!b),b&&(e=a.getSubtreeIterator(),c.appendChild(j(e)),e.detach()),10==c.nodeType)throw new M("HIERARCHY_REQUEST_ERR");f.appendChild(c)}return f}function k(a,b,c){var d,e;c=c||{stop:!1};for(var f,g;f=a.next();)if(a.isPartiallySelectedSubtree()){if(b(f)===!1)return void(c.stop=!0);if(g=a.getSubtreeIterator(),k(g,b,c),g.detach(),c.stop)return}else for(d=J.createIterator(f);e=d.next();)if(b(e)===!1)return void(c.stop=!0)}function l(a){for(var b;a.next();)a.isPartiallySelectedSubtree()?(b=a.getSubtreeIterator(),l(b),b.detach()):a.remove()}function m(a){for(var b,c,e=d(a.range).createDocumentFragment();b=a.next();){if(a.isPartiallySelectedSubtree()?(b=b.cloneNode(!1),c=a.getSubtreeIterator(),b.appendChild(m(c)),c.detach()):a.remove(),10==b.nodeType)throw new M("HIERARCHY_REQUEST_ERR");e.appendChild(b)}return e}function n(a,b,c){var d,e=!(!b||!b.length),f=!!c;e&&(d=new RegExp("^("+b.join("|")+")$"));var g=[];return k(new p(a,!1),function(b){if(!(e&&!d.test(b.nodeType)||f&&!c(b))){var h=a.startContainer;if(b!=h||!N(h)||a.startOffset!=h.length){var i=a.endContainer;b==i&&N(i)&&0==a.endOffset||g.push(b)}}}),g}function o(a){var b="undefined"==typeof a.getName?"Range":a.getName();return"["+b+"("+J.inspectNode(a.startContainer)+":"+a.startOffset+", "+J.inspectNode(a.endContainer)+":"+a.endOffset+")]"}function p(a,b){if(this.range=a,this.clonePartiallySelectedTextNodes=b,!a.collapsed){this.sc=a.startContainer,this.so=a.startOffset,this.ec=a.endContainer,this.eo=a.endOffset;var c=a.commonAncestorContainer;this.sc===this.ec&&N(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==c||N(this.sc)?T(this.sc,c,!0):this.sc.childNodes[this.so],this._last=this.ec!==c||N(this.ec)?T(this.ec,c,!0):this.ec.childNodes[this.eo-1])}}function q(a){return function(b,c){for(var d,e=c?b:b.parentNode;e;){if(d=e.nodeType,V(a,d))return e;e=e.parentNode}return null}}function r(a,b){if(ea(a,b))throw new M("INVALID_NODE_TYPE_ERR")}function s(a,b){if(!V(b,a.nodeType))throw new M("INVALID_NODE_TYPE_ERR")}function t(a,b){if(0>b||b>(N(a)?a.length:a.childNodes.length))throw new M("INDEX_SIZE_ERR")}function u(a,b){if(ca(a,!0)!==ca(b,!0))throw new M("WRONG_DOCUMENT_ERR")}function v(a){if(da(a,!0))throw new M("NO_MODIFICATION_ALLOWED_ERR")}function w(a,b){if(!a)throw new M(b)}function x(a,b){return b<=(N(a)?a.length:a.childNodes.length)}function y(a){return!!a.startContainer&&!!a.endContainer&&!(X&&(J.isBrokenNode(a.startContainer)||J.isBrokenNode(a.endContainer)))&&W(a.startContainer)==W(a.endContainer)&&x(a.startContainer,a.startOffset)&&x(a.endContainer,a.endOffset)}function z(a){if(!y(a))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+a.inspect()+")")}function A(a,b){z(a);var c=a.startContainer,d=a.startOffset,e=a.endContainer,f=a.endOffset,g=c===e;N(e)&&f>0&&f0&&d=O(c)&&f++,d=0),a.setStartAndEnd(c,d,e,f)}function B(a){z(a);var b=a.commonAncestorContainer.parentNode.cloneNode(!1);return b.appendChild(a.cloneContents()),b.innerHTML}function C(a){a.START_TO_START=ka,a.START_TO_END=la,a.END_TO_END=ma,a.END_TO_START=na,a.NODE_BEFORE=oa,a.NODE_AFTER=pa,a.NODE_BEFORE_AND_AFTER=qa,a.NODE_INSIDE=ra}function D(a){C(a),C(a.prototype)}function E(a,b){return function(){z(this);var c,d,e=this.startContainer,f=this.startOffset,h=this.commonAncestorContainer,i=new p(this,!0);e!==h&&(c=T(e,h,!0),d=g(c),e=d.node,f=d.offset),k(i,v),i.reset();var j=a(i);return i.detach(),b(this,e,f,e,f),j}}function F(b,d){function e(a,b){return function(c){s(c,Z),s(W(c),$);var d=(a?f:g)(c);(b?h:i)(this,d.node,d.offset)}}function h(a,b,c){var e=a.endContainer,f=a.endOffset;(b!==a.startContainer||c!==a.startOffset)&&((W(b)!=W(e)||1==R(b,c,e,f))&&(e=b,f=c),d(a,b,c,e,f))}function i(a,b,c){var e=a.startContainer,f=a.startOffset;(b!==a.endContainer||c!==a.endOffset)&&((W(b)!=W(e)||-1==R(b,c,e,f))&&(e=b,f=c),d(a,e,f,b,c))}var j=function(){};j.prototype=a.rangePrototype,b.prototype=new j,K.extend(b.prototype,{setStart:function(a,b){r(a,!0),t(a,b),h(this,a,b)},setEnd:function(a,b){r(a,!0),t(a,b),i(this,a,b)},setStartAndEnd:function(){var a=arguments,b=a[0],c=a[1],e=b,f=c;switch(a.length){case 3:f=a[2];break;case 4:e=a[2],f=a[3]}d(this,b,c,e,f)},setBoundary:function(a,b,c){this["set"+(c?"Start":"End")](a,b)},setStartBefore:e(!0,!0),setStartAfter:e(!1,!0),setEndBefore:e(!0,!1),setEndAfter:e(!1,!1),collapse:function(a){z(this),a?d(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):d(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(a){r(a,!0),d(this,a,0,a,U(a))},selectNode:function(a){r(a,!1),s(a,Z);var b=f(a),c=g(a);d(this,b.node,b.offset,c.node,c.offset)},extractContents:E(m,d),deleteContents:E(l,d),canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},splitBoundaries:function(){A(this)},splitBoundariesPreservingPositions:function(a){A(this,a)},normalizeBoundaries:function(){z(this);var a,b=this.startContainer,c=this.startOffset,e=this.endContainer,f=this.endOffset,g=function(a){var b=a.nextSibling;b&&b.nodeType==a.nodeType&&(e=a,f=a.length,a.appendData(b.data),Y(b))},h=function(a){var d=a.previousSibling;if(d&&d.nodeType==a.nodeType){b=a;var g=a.length;if(c=d.length,a.insertData(0,d.data),Y(d),b==e)f+=c,e=b;else if(e==a.parentNode){var h=O(a);f==h?(e=a,f=g):f>h&&f--}}},i=!0;if(N(e))f==e.length?g(e):0==f&&(a=e.previousSibling,a&&a.nodeType==e.nodeType&&(f=a.length,b==e&&(i=!1),a.appendData(e.data),Y(e),e=a));else{if(f>0){var j=e.childNodes[f-1];j&&N(j)&&g(j)}i=!this.collapsed}if(i){if(N(b))0==c?h(b):c==b.length&&(a=b.nextSibling,a&&a.nodeType==b.nodeType&&(e==a&&(e=b,f+=b.length),b.appendData(a.data),Y(a)));else if(cx",ga=3==fa.firstChild.nodeType}catch(ha){}a.features.htmlParsingConforms=ga;var ia=ga?function(a){var b=this.startContainer,c=Q(b);if(!b)throw new M("INVALID_STATE_ERR");var d=null;return 1==b.nodeType?d=b:N(b)&&(d=J.parentElement(b)),d=null===d||"HTML"==d.nodeName&&J.isHtmlNamespace(Q(d).documentElement)&&J.isHtmlNamespace(d)?c.createElement("body"):d.cloneNode(!1),d.innerHTML=a,J.fragmentFromNodeChildren(d)}:function(a){var b=d(this),c=b.createElement("body");return c.innerHTML=a,J.fragmentFromNodeChildren(c)},ja=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],ka=0,la=1,ma=2,na=3,oa=0,pa=1,qa=2,ra=3;K.extend(a.rangePrototype,{compareBoundaryPoints:function(a,b){z(this),u(this.startContainer,b.startContainer);var c,d,e,f,g=a==na||a==ka?"start":"end",h=a==la||a==ka?"start":"end";return c=this[g+"Container"],d=this[g+"Offset"],e=b[h+"Container"],f=b[h+"Offset"],R(c,d,e,f)},insertNode:function(a){if(z(this),s(a,aa),v(this.startContainer),P(a,this.startContainer))throw new M("HIERARCHY_REQUEST_ERR");var b=h(a,this.startContainer,this.startOffset);this.setStartBefore(b)},cloneContents:function(){z(this);var a,b;if(this.collapsed)return d(this).createDocumentFragment();if(this.startContainer===this.endContainer&&N(this.startContainer))return a=this.startContainer.cloneNode(!0),a.data=a.data.slice(this.startOffset,this.endOffset),b=d(this).createDocumentFragment(),b.appendChild(a),b;var c=new p(this,!0);return a=j(c),c.detach(),a},canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},surroundContents:function(a){if(s(a,ba),!this.canSurroundContents())throw new M("INVALID_STATE_ERR");var b=this.extractContents();if(a.hasChildNodes())for(;a.lastChild;)a.removeChild(a.lastChild);h(a,this.startContainer,this.startOffset),a.appendChild(b),this.selectNode(a)},cloneRange:function(){z(this);for(var a,b=new I(d(this)),c=ja.length;c--;)a=ja[c],b[a]=this[a];return b},toString:function(){z(this);var a=this.startContainer;if(a===this.endContainer&&N(a))return 3==a.nodeType||4==a.nodeType?a.data.slice(this.startOffset,this.endOffset):"";var b=[],c=new p(this,!0);return k(c,function(a){(3==a.nodeType||4==a.nodeType)&&b.push(a.data)}),c.detach(),b.join("")},compareNode:function(a){z(this);var b=a.parentNode,c=O(a);if(!b)throw new M("NOT_FOUND_ERR");var d=this.comparePoint(b,c),e=this.comparePoint(b,c+1);return 0>d?e>0?qa:oa:e>0?pa:ra},comparePoint:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)<0?-1:R(a,b,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:ia,toHtml:function(){return B(this)},intersectsNode:function(a,b){if(z(this),W(a)!=e(this))return!1;var c=a.parentNode,d=O(a);if(!c)return!0;var f=R(c,d,this.endContainer,this.endOffset),g=R(c,d+1,this.startContainer,this.startOffset);return b?0>=f&&g>=0:0>f&&g>0},isPointInRange:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)>=0&&R(a,b,this.endContainer,this.endOffset)<=0},intersectsRange:function(a){return i(this,a,!1)},intersectsOrTouchesRange:function(a){return i(this,a,!0)},intersection:function(a){if(this.intersectsRange(a)){var b=R(this.startContainer,this.startOffset,a.startContainer,a.startOffset),c=R(this.endContainer,this.endOffset,a.endContainer,a.endOffset),d=this.cloneRange();return-1==b&&d.setStart(a.startContainer,a.startOffset),1==c&&d.setEnd(a.endContainer,a.endOffset),d}return null},union:function(a){if(this.intersectsOrTouchesRange(a)){var b=this.cloneRange();return-1==R(a.startContainer,a.startOffset,this.startContainer,this.startOffset)&&b.setStart(a.startContainer,a.startOffset),1==R(a.endContainer,a.endOffset,this.endContainer,this.endOffset)&&b.setEnd(a.endContainer,a.endOffset),b}throw new M("Ranges do not intersect")},containsNode:function(a,b){return b?this.intersectsNode(a,!1):this.compareNode(a)==ra},containsNodeContents:function(a){return this.comparePoint(a,0)>=0&&this.comparePoint(a,U(a))<=0},containsRange:function(a){var b=this.intersection(a);return null!==b&&a.equals(b)},containsNodeText:function(a){var b=this.cloneRange();b.selectNode(a);var c=b.getNodes([3]);if(c.length>0){b.setStart(c[0],0);var d=c.pop();return b.setEnd(d,d.length),this.containsRange(b)}return this.containsNodeContents(a)},getNodes:function(a,b){return z(this),n(this,a,b)},getDocument:function(){return d(this)},collapseBefore:function(a){this.setEndBefore(a),this.collapse(!1)},collapseAfter:function(a){this.setStartAfter(a),this.collapse(!0)},getBookmark:function(b){
+var c=d(this),e=a.createRange(c);b=b||J.getBody(c),e.selectNodeContents(b);var f=this.intersection(e),g=0,h=0;return f&&(e.setEnd(f.startContainer,f.startOffset),g=e.toString().length,h=g+f.toString().length),{start:g,end:h,containerNode:b}},moveToBookmark:function(a){var b=a.containerNode,c=0;this.setStart(b,0),this.collapse(!0);for(var d,e,f,g,h=[b],i=!1,j=!1;!j&&(d=h.pop());)if(3==d.nodeType)e=c+d.length,!i&&a.start>=c&&a.start<=e&&(this.setStart(d,a.start-c),i=!0),i&&a.end>=c&&a.end<=e&&(this.setEnd(d,a.end-c),j=!0),c=e;else for(g=d.childNodes,f=g.length;f--;)h.push(g[f])},getName:function(){return"DomRange"},equals:function(a){return I.rangesEqual(this,a)},isValid:function(){return y(this)},inspect:function(){return o(this)},detach:function(){}}),F(I,H),K.extend(I,{rangeProperties:ja,RangeIterator:p,copyComparisonConstants:D,createPrototypeRange:F,inspect:o,toHtml:B,getRangeDocument:d,rangesEqual:function(a,b){return a.startContainer===b.startContainer&&a.startOffset===b.startOffset&&a.endContainer===b.endContainer&&a.endOffset===b.endOffset}}),a.DomRange=I}),H.createCoreModule("WrappedRange",["DomRange"],function(a,b){var c,d,e=a.dom,f=a.util,g=e.DomPosition,h=a.DomRange,i=e.getBody,j=e.getContentDocument,k=e.isCharacterDataNode;if(a.features.implementsDomRange&&!function(){function d(a){for(var b,c=m.length;c--;)b=m[c],a[b]=a.nativeRange[b];a.collapsed=a.startContainer===a.endContainer&&a.startOffset===a.endOffset}function g(a,b,c,d,e){var f=a.startContainer!==b||a.startOffset!=c,g=a.endContainer!==d||a.endOffset!=e,h=!a.equals(a.nativeRange);(f||g||h)&&(a.setEnd(d,e),a.setStart(b,c))}var k,l,m=h.rangeProperties;c=function(a){if(!a)throw b.createError("WrappedRange: Range must be specified");this.nativeRange=a,d(this)},h.createPrototypeRange(c,g),k=c.prototype,k.selectNode=function(a){this.nativeRange.selectNode(a),d(this)},k.cloneContents=function(){return this.nativeRange.cloneContents()},k.surroundContents=function(a){this.nativeRange.surroundContents(a),d(this)},k.collapse=function(a){this.nativeRange.collapse(a),d(this)},k.cloneRange=function(){return new c(this.nativeRange.cloneRange())},k.refresh=function(){d(this)},k.toString=function(){return this.nativeRange.toString()};var n=document.createTextNode("test");i(document).appendChild(n);var o=document.createRange();o.setStart(n,0),o.setEnd(n,0);try{o.setStart(n,1),k.setStart=function(a,b){this.nativeRange.setStart(a,b),d(this)},k.setEnd=function(a,b){this.nativeRange.setEnd(a,b),d(this)},l=function(a){return function(b){this.nativeRange[a](b),d(this)}}}catch(p){k.setStart=function(a,b){try{this.nativeRange.setStart(a,b)}catch(c){this.nativeRange.setEnd(a,b),this.nativeRange.setStart(a,b)}d(this)},k.setEnd=function(a,b){try{this.nativeRange.setEnd(a,b)}catch(c){this.nativeRange.setStart(a,b),this.nativeRange.setEnd(a,b)}d(this)},l=function(a,b){return function(c){try{this.nativeRange[a](c)}catch(e){this.nativeRange[b](c),this.nativeRange[a](c)}d(this)}}}k.setStartBefore=l("setStartBefore","setEndBefore"),k.setStartAfter=l("setStartAfter","setEndAfter"),k.setEndBefore=l("setEndBefore","setStartBefore"),k.setEndAfter=l("setEndAfter","setStartAfter"),k.selectNodeContents=function(a){this.setStartAndEnd(a,0,e.getNodeLength(a))},o.selectNodeContents(n),o.setEnd(n,3);var q=document.createRange();q.selectNodeContents(n),q.setEnd(n,4),q.setStart(n,2),-1==o.compareBoundaryPoints(o.START_TO_END,q)&&1==o.compareBoundaryPoints(o.END_TO_START,q)?k.compareBoundaryPoints=function(a,b){return b=b.nativeRange||b,a==b.START_TO_END?a=b.END_TO_START:a==b.END_TO_START&&(a=b.START_TO_END),this.nativeRange.compareBoundaryPoints(a,b)}:k.compareBoundaryPoints=function(a,b){return this.nativeRange.compareBoundaryPoints(a,b.nativeRange||b)};var r=document.createElement("div");r.innerHTML="123";var s=r.firstChild,t=i(document);t.appendChild(r),o.setStart(s,1),o.setEnd(s,2),o.deleteContents(),"13"==s.data&&(k.deleteContents=function(){this.nativeRange.deleteContents(),d(this)},k.extractContents=function(){var a=this.nativeRange.extractContents();return d(this),a}),t.removeChild(r),t=null,f.isHostMethod(o,"createContextualFragment")&&(k.createContextualFragment=function(a){return this.nativeRange.createContextualFragment(a)}),i(document).removeChild(n),k.getName=function(){return"WrappedRange"},a.WrappedRange=c,a.createNativeRange=function(a){return a=j(a,b,"createNativeRange"),a.createRange()}}(),a.features.implementsTextRange){var l=function(a){var b=a.parentElement(),c=a.duplicate();c.collapse(!0);var d=c.parentElement();c=a.duplicate(),c.collapse(!1);var f=c.parentElement(),g=d==f?d:e.getCommonAncestor(d,f);return g==b?g:e.getCommonAncestor(b,g)},m=function(a){return 0==a.compareEndPoints("StartToEnd",a)},n=function(a,b,c,d,f){var h=a.duplicate();h.collapse(c);var i=h.parentElement();if(e.isOrIsAncestorOf(b,i)||(i=b),!i.canHaveHTML){var j=new g(i.parentNode,e.getNodeIndex(i));return{boundaryPosition:j,nodeInfo:{nodeIndex:j.offset,containerElement:j.node}}}var l=e.getDocument(i).createElement("span");l.parentNode&&e.removeNode(l);for(var m,n,o,p,q,r=c?"StartToStart":"StartToEnd",s=f&&f.containerElement==i?f.nodeIndex:0,t=i.childNodes.length,u=t,v=u;;){if(v==t?i.appendChild(l):i.insertBefore(l,i.childNodes[v]),h.moveToElementText(l),m=h.compareEndPoints(r,a),0==m||s==u)break;if(-1==m){if(u==s+1)break;s=v}else u=u==s+1?s:v;v=Math.floor((s+u)/2),i.removeChild(l)}if(q=l.nextSibling,-1==m&&q&&k(q)){h.setEndPoint(c?"EndToStart":"EndToEnd",a);var w;if(/[\r\n]/.test(q.data)){var x=h.duplicate(),y=x.text.replace(/\r\n/g,"\r").length;for(w=x.moveStart("character",y);-1==(m=x.compareEndPoints("StartToEnd",x));)w++,x.moveStart("character",1)}else w=h.text.length;p=new g(q,w)}else n=(d||!c)&&l.previousSibling,o=(d||c)&&l.nextSibling,p=o&&k(o)?new g(o,0):n&&k(n)?new g(n,n.data.length):new g(i,e.getNodeIndex(l));return e.removeNode(l),{boundaryPosition:p,nodeInfo:{nodeIndex:v,containerElement:i}}},o=function(a,b){var c,d,f,g,h=a.offset,j=e.getDocument(a.node),l=i(j).createTextRange(),m=k(a.node);return m?(c=a.node,d=c.parentNode):(g=a.node.childNodes,c=hb;++b)if(!C.isAncestorOf(a[0],a[b]))return!1;return!0}function m(a){var c=a.getNodes();if(!l(c))throw b.createError("getSingleElementFromRange: range "+a.inspect()+" did not consist of a single element");return c[0]}function n(a){return!!a&&"undefined"!=typeof a.text}function o(a,b){var c=new G(b);a._ranges=[c],h(a,c,!1),a.rangeCount=1,a.isCollapsed=c.collapsed}function p(b){if(b._ranges.length=0,"None"==b.docSelection.type)j(b);else{var c=b.docSelection.createRange();if(n(c))o(b,c);else{b.rangeCount=c.length;for(var d,e=L(c.item(0)),f=0;fh;++h)g.add(d.item(h));try{g.add(e)}catch(j){throw b.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}g.select(),p(a)}function r(a,b,c){this.nativeSelection=a,this.docSelection=b,this._ranges=[],this.win=c,this.refresh()}function s(a){a.win=a.anchorNode=a.focusNode=a._ranges=null,a.rangeCount=a.anchorOffset=a.focusOffset=0,a.detached=!0}function t(a,b){for(var c,d,e=ba.length;e--;)if(c=ba[e],d=c.selection,"deleteAll"==b)s(d);else if(c.win==a)return"delete"==b?(ba.splice(e,1),!0):d;return"deleteAll"==b&&(ba.length=0),null}function u(a,c){for(var d,e=L(c[0].startContainer),f=M(e).createControlRange(),g=0,h=c.length;h>g;++g){d=m(c[g]);try{f.add(d)}catch(i){throw b.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}f.select(),p(a)}function v(a,b){if(a.win.document!=L(b))throw new H("WRONG_DOCUMENT_ERR")}function w(b){return function(c,d){var e;this.rangeCount?(e=this.getRangeAt(0),e["set"+(b?"Start":"End")](c,d)):(e=a.createRange(this.win.document),e.setStartAndEnd(c,d)),this.setSingleRange(e,this.isBackward())}}function x(a){var b=[],c=new I(a.anchorNode,a.anchorOffset),d=new I(a.focusNode,a.focusOffset),e="function"==typeof a.getName?a.getName():"Selection";if("undefined"!=typeof a.rangeCount)for(var f=0,g=a.rangeCount;g>f;++f)b[f]=F.inspect(a.getRangeAt(f));return"["+e+"(Ranges: "+b.join(", ")+")(anchor: "+c.inspect()+", focus: "+d.inspect()+"]"}a.config.checkSelectionRanges=!0;var y,z,A="boolean",B="number",C=a.dom,D=a.util,E=D.isHostMethod,F=a.DomRange,G=a.WrappedRange,H=a.DOMException,I=C.DomPosition,J=a.features,K="Control",L=C.getDocument,M=C.getBody,N=F.rangesEqual,O=E(window,"getSelection"),P=D.isHostObject(document,"selection");J.implementsWinGetSelection=O,J.implementsDocSelection=P;var Q=P&&(!O||a.config.preferTextRange);if(Q)y=f,a.isSelectionValid=function(a){var b=d(a,"isSelectionValid").document,c=b.selection;return"None"!=c.type||L(c.createRange().parentElement())==b};else{if(!O)return b.fail("Neither document.selection or window.getSelection() detected."),!1;y=e,a.isSelectionValid=function(){return!0}}a.getNativeSelection=y;var R=y();if(!R)return b.fail("Native selection was null (possibly issue 138?)"),!1;var S=a.createNativeRange(document),T=M(document),U=D.areHostProperties(R,["anchorNode","focusNode","anchorOffset","focusOffset"]);J.selectionHasAnchorAndFocus=U;var V=E(R,"extend");J.selectionHasExtend=V;var W=typeof R.rangeCount==B;J.selectionHasRangeCount=W;var X=!1,Y=!0,Z=V?function(b,c){var d=F.getRangeDocument(c),e=a.createRange(d);e.collapseToPoint(c.endContainer,c.endOffset),b.addRange(k(e)),b.extend(c.startContainer,c.startOffset)}:null;D.areHostMethods(R,["addRange","getRangeAt","removeAllRanges"])&&typeof R.rangeCount==B&&J.implementsDomRange&&!function(){var b=window.getSelection();if(b){for(var c=b.rangeCount,d=c>1,e=[],f=g(b),h=0;c>h;++h)e[h]=b.getRangeAt(h);var i=C.createTestElement(document,"",!1),j=i.appendChild(document.createTextNode(" ")),k=document.createRange();if(k.setStart(j,1),k.collapse(!0),b.removeAllRanges(),b.addRange(k),Y=1==b.rangeCount,b.removeAllRanges(),!d){var l=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(l&&parseInt(l[1])>=36)X=!1;else{var m=k.cloneRange();k.setStart(j,0),m.setEnd(j,3),m.setStart(j,2),b.addRange(k),b.addRange(m),X=2==b.rangeCount}}for(C.removeNode(i),b.removeAllRanges(),h=0;c>h;++h)0==h&&f?Z?Z(b,e[h]):(a.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),b.addRange(e[h])):b.addRange(e[h])}}(),J.selectionSupportsMultipleRanges=X,J.collapsedNonEditableSelectionsSupported=Y;var $,_=!1;T&&E(T,"createControlRange")&&($=T.createControlRange(),D.areHostProperties($,["item","add"])&&(_=!0)),J.implementsControlRange=_,z=U?function(a){return a.anchorNode===a.focusNode&&a.anchorOffset===a.focusOffset}:function(a){return a.rangeCount?a.getRangeAt(a.rangeCount-1).collapsed:!1};var aa;E(R,"getRangeAt")?aa=function(a,b){try{return a.getRangeAt(b)}catch(c){return null}}:U&&(aa=function(b){var c=L(b.anchorNode),d=a.createRange(c);return d.setStartAndEnd(b.anchorNode,b.anchorOffset,b.focusNode,b.focusOffset),d.collapsed!==this.isCollapsed&&d.setStartAndEnd(b.focusNode,b.focusOffset,b.anchorNode,b.anchorOffset),d}),r.prototype=a.selectionPrototype;var ba=[],ca=function(a){if(a&&a instanceof r)return a.refresh(),a;a=d(a,"getNativeSelection");var b=t(a),c=y(a),e=P?f(a):null;return b?(b.nativeSelection=c,b.docSelection=e,b.refresh()):(b=new r(c,e,a),ba.push({win:a,selection:b})),b};a.getSelection=ca,D.createAliasForDeprecatedMethod(a,"getIframeSelection","getSelection");var da=r.prototype;if(!Q&&U&&D.areHostMethods(R,["removeAllRanges","addRange"])){da.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),j(this)};var ea=function(a,b){Z(a.nativeSelection,b),a.refresh()};W?da.addRange=function(b,d){if(_&&P&&this.docSelection.type==K)q(this,b);else if(c(d)&&V)ea(this,b);else{var e;X?e=this.rangeCount:(this.removeAllRanges(),e=0);var f=k(b).cloneRange();try{this.nativeSelection.addRange(f)}catch(g){}if(this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==e+1){if(a.config.checkSelectionRanges){var i=aa(this.nativeSelection,this.rangeCount-1);i&&!N(i,b)&&(b=new G(i))}this._ranges[this.rangeCount-1]=b,h(this,b,ha(this.nativeSelection)),this.isCollapsed=z(this)}else this.refresh()}}:da.addRange=function(a,b){c(b)&&V?ea(this,a):(this.nativeSelection.addRange(k(a)),this.refresh())},da.setRanges=function(a){if(_&&P&&a.length>1)u(this,a);else{this.removeAllRanges();for(var b=0,c=a.length;c>b;++b)this.addRange(a[b])}}}else{if(!(E(R,"empty")&&E(S,"select")&&_&&Q))return b.fail("No means of selecting a Range or TextRange was found"),!1;da.removeAllRanges=function(){try{if(this.docSelection.empty(),"None"!=this.docSelection.type){var a;if(this.anchorNode)a=L(this.anchorNode);else if(this.docSelection.type==K){var b=this.docSelection.createRange();b.length&&(a=L(b.item(0)))}if(a){var c=M(a).createTextRange();c.select(),this.docSelection.empty()}}}catch(d){}j(this)},da.addRange=function(b){this.docSelection.type==K?q(this,b):(a.WrappedTextRange.rangeToTextRange(b).select(),this._ranges[0]=b,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,h(this,b,!1))},da.setRanges=function(a){this.removeAllRanges();var b=a.length;b>1?u(this,a):b&&this.addRange(a[0])}}da.getRangeAt=function(a){if(0>a||a>=this.rangeCount)throw new H("INDEX_SIZE_ERR");return this._ranges[a].cloneRange()};var fa;if(Q)fa=function(b){var c;a.isSelectionValid(b.win)?c=b.docSelection.createRange():(c=M(b.win.document).createTextRange(),c.collapse(!0)),b.docSelection.type==K?p(b):n(c)?o(b,c):j(b)};else if(E(R,"getRangeAt")&&typeof R.rangeCount==B)fa=function(b){if(_&&P&&b.docSelection.type==K)p(b);else if(b._ranges.length=b.rangeCount=b.nativeSelection.rangeCount,b.rangeCount){for(var c=0,d=b.rangeCount;d>c;++c)b._ranges[c]=new a.WrappedRange(b.nativeSelection.getRangeAt(c));h(b,b._ranges[b.rangeCount-1],ha(b.nativeSelection)),b.isCollapsed=z(b)}else j(b)};else{if(!U||typeof R.isCollapsed!=A||typeof S.collapsed!=A||!J.implementsDomRange)return b.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;fa=function(a){var b,c=a.nativeSelection;c.anchorNode?(b=aa(c,0),a._ranges=[b],a.rangeCount=1,i(a),a.isCollapsed=z(a)):j(a)}}da.refresh=function(a){var b=a?this._ranges.slice(0):null,c=this.anchorNode,d=this.anchorOffset;if(fa(this),a){var e=b.length;if(e!=this._ranges.length)return!0;if(this.anchorNode!=c||this.anchorOffset!=d)return!0;for(;e--;)if(!N(b[e],this._ranges[e]))return!0;return!1}};var ga=function(a,b){var c=a.getAllRanges();a.removeAllRanges();for(var d=0,e=c.length;e>d;++d)N(b,c[d])||a.addRange(c[d]);a.rangeCount||j(a)};_&&P?da.removeRange=function(a){if(this.docSelection.type==K){for(var b,c=this.docSelection.createRange(),d=m(a),e=L(c.item(0)),f=M(e).createControlRange(),g=!1,h=0,i=c.length;i>h;++h)b=c.item(h),b!==d||g?f.add(c.item(h)):g=!0;f.select(),p(this)}else ga(this,a)}:da.removeRange=function(a){ga(this,a)};var ha;!Q&&U&&J.implementsDomRange?(ha=g,da.isBackward=function(){return ha(this)}):ha=da.isBackward=function(){return!1},da.isBackwards=da.isBackward,da.toString=function(){for(var a=[],b=0,c=this.rangeCount;c>b;++b)a[b]=""+this._ranges[b];return a.join("")},da.collapse=function(b,c){v(this,b);var d=a.createRange(b);d.collapseToPoint(b,c),this.setSingleRange(d),this.isCollapsed=!0},da.collapseToStart=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[0];this.collapse(a.startContainer,a.startOffset)},da.collapseToEnd=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[this.rangeCount-1];this.collapse(a.endContainer,a.endOffset)},da.selectAllChildren=function(b){v(this,b);var c=a.createRange(b);c.selectNodeContents(b),this.setSingleRange(c)},da.deleteFromDocument=function(){if(_&&P&&this.docSelection.type==K){for(var a,b=this.docSelection.createRange();b.length;)a=b.item(0),b.remove(a),C.removeNode(a);this.refresh()}else if(this.rangeCount){var c=this.getAllRanges();if(c.length){this.removeAllRanges();for(var d=0,e=c.length;e>d;++d)c[d].deleteContents();this.addRange(c[e-1])}}},da.eachRange=function(a,b){for(var c=0,d=this._ranges.length;d>c;++c)if(a(this.getRangeAt(c)))return b},da.getAllRanges=function(){var a=[];return this.eachRange(function(b){a.push(b)}),a},da.setSingleRange=function(a,b){this.removeAllRanges(),this.addRange(a,b)},da.callMethodOnEachRange=function(a,b){var c=[];return this.eachRange(function(d){c.push(d[a].apply(d,b||[]))}),c},da.setStart=w(!0),da.setEnd=w(!1),a.rangePrototype.select=function(a){ca(this.getDocument()).setSingleRange(this,a)},da.changeEachRange=function(a){var b=[],c=this.isBackward();this.eachRange(function(c){a(c),b.push(c)}),this.removeAllRanges(),c&&1==b.length?this.addRange(b[0],"backward"):this.setRanges(b)},da.containsNode=function(a,b){return this.eachRange(function(c){return c.containsNode(a,b)},!0)||!1},da.getBookmark=function(a){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[a])}},da.moveToBookmark=function(b){for(var c,d,e=[],f=0;c=b.rangeBookmarks[f++];)d=a.createRange(this.win),d.moveToBookmark(c),e.push(d);b.backward?this.setSingleRange(e[0],"backward"):this.setRanges(e)},da.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},da.restoreRanges=function(a){this.removeAllRanges();for(var b,c=0;b=a.ranges[c];++c)this.addRange(b,a.backward&&0==c)},da.toHtml=function(){var a=[];return this.eachRange(function(b){a.push(F.toHtml(b))}),a.join("")},J.implementsTextRange&&(da.getNativeTextRange=function(){var c;if(c=this.docSelection){var d=c.createRange();if(n(d))return d;throw b.createError("getNativeTextRange: selection is a control selection")}if(this.rangeCount>0)return a.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw b.createError("getNativeTextRange: selection contains no range")}),da.getName=function(){return"WrappedSelection"},da.inspect=function(){return x(this)},da.detach=function(){t(this.win,"delete"),s(this)},r.detachAll=function(){t(null,"deleteAll")},r.inspect=x,r.isDirectionBackward=c,a.Selection=r,a.selectionPrototype=da,a.addShimListener(function(a){"undefined"==typeof a.getSelection&&(a.getSelection=function(){return ca(a)}),a=null})});var M=!1,N=function(a){M||(M=!0,!H.initialized&&H.config.autoInitialize&&l())};return F&&("complete"==document.readyState?N():(a(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",N,!1),J(window,"load",N))),H},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("SaveRestore",["WrappedRange"],function(a,b){function c(a,b){return(b||document).getElementById(a)}function d(a,b){var c,d="selectionBoundary_"+ +new Date+"_"+(""+Math.random()).slice(2),e=o.getDocument(a.startContainer),f=a.cloneRange();return f.collapse(b),c=e.createElement("span"),c.id=d,c.style.lineHeight="0",c.style.display="none",c.className="rangySelectionBoundary",c.appendChild(e.createTextNode(r)),f.insertNode(c),c}function e(a,d,e,f){var g=c(e,a);g?(d[f?"setStartBefore":"setEndBefore"](g),p(g)):b.warn("Marker element has been removed. Cannot restore selection.")}function f(a,b){return b.compareBoundaryPoints(a.START_TO_START,a)}function g(b,c){var e,f,g=a.DomRange.getRangeDocument(b),h=b.toString(),i=q(c);return b.collapsed?(f=d(b,!1),{document:g,markerId:f.id,collapsed:!0}):(f=d(b,!1),e=d(b,!0),{document:g,startMarkerId:e.id,endMarkerId:f.id,collapsed:!1,backward:i,toString:function(){return"original text: '"+h+"', new text: '"+b.toString()+"'"}})}function h(d,f){var g=d.document;"undefined"==typeof f&&(f=!0);var h=a.createRange(g);if(d.collapsed){var i=c(d.markerId,g);if(i){i.style.display="inline";var j=i.previousSibling;j&&3==j.nodeType?(p(i),h.collapseToPoint(j,j.length)):(h.collapseBefore(i),p(i))}else b.warn("Marker element has been removed. Cannot restore selection.")}else e(g,h,d.startMarkerId,!0),e(g,h,d.endMarkerId,!1);return f&&h.normalizeBoundaries(),h}function i(b,d){var e,h,i=[],j=q(d);b=b.slice(0),b.sort(f);for(var k=0,l=b.length;l>k;++k)i[k]=g(b[k],j);for(k=l-1;k>=0;--k)e=b[k],h=a.DomRange.getRangeDocument(e),e.collapsed?e.collapseAfter(c(i[k].markerId,h)):(e.setEndBefore(c(i[k].endMarkerId,h)),e.setStartAfter(c(i[k].startMarkerId,h)));return i}function j(c){if(!a.isSelectionValid(c))return b.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus."),null;var d=a.getSelection(c),e=d.getAllRanges(),f=1==e.length&&d.isBackward(),g=i(e,f);return f?d.setSingleRange(e[0],f):d.setRanges(e),{win:c,rangeInfos:g,restored:!1}}function k(a){for(var b=[],c=a.length,d=c-1;d>=0;d--)b[d]=h(a[d],!0);return b}function l(b,c){if(!b.restored){var d=b.rangeInfos,e=a.getSelection(b.win),f=k(d),g=d.length;1==g&&c&&a.features.selectionHasExtend&&d[0].backward?(e.removeAllRanges(),e.addRange(f[0],!0)):e.setRanges(f),b.restored=!0}}function m(a,b){var d=c(b,a);d&&p(d)}function n(a){for(var b,c=a.rangeInfos,d=0,e=c.length;e>d;++d)b=c[d],b.collapsed?m(a.doc,b.markerId):(m(a.doc,b.startMarkerId),m(a.doc,b.endMarkerId))}var o=a.dom,p=o.removeNode,q=a.Selection.isDirectionBackward,r="\ufeff";a.util.extend(a,{saveRange:g,restoreRange:h,saveRanges:i,restoreRanges:k,saveSelection:j,restoreSelection:l,removeMarkerElement:m,removeMarkers:n})}),a},this);var Base=function(){};Base.extend=function(a,b){var c=Base.prototype.extend;Base._prototyping=!0;var d=new this;c.call(d,a),d.base=function(){},delete Base._prototyping;var e=d.constructor,f=d.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==f)this._constructing=!0,e.apply(this,arguments),delete this._constructing;else if(null!=arguments[0])return(arguments[0].extend||c).call(arguments[0],d)};return f.ancestor=this,f.extend=this.extend,f.forEach=this.forEach,f.implement=this.implement,f.prototype=d,f.toString=this.toString,f.valueOf=function(a){return"object"==a?f:e.valueOf()},c.call(f,b),"function"==typeof f.init&&f.init(),f},Base.prototype={extend:function(a,b){if(arguments.length>1){var c=this[a];if(c&&"function"==typeof b&&(!c.valueOf||c.valueOf()!=b.valueOf())&&/\bbase\b/.test(b)){var d=b.valueOf();b=function(){var a=this.base||Base.prototype.base;this.base=c;var b=d.apply(this,arguments);return this.base=a,b},b.valueOf=function(a){return"object"==a?b:d},b.toString=Base.toString}this[a]=b}else if(a){var e=Base.prototype.extend;Base._prototyping||"function"==typeof this||(e=this.extend||e);for(var f={toSource:null},g=["constructor","toString","valueOf"],h=Base._prototyping?0:1;i=g[h++];)a[i]!=f[i]&&e.call(this,i,a[i]);for(var i in a)f[i]||e.call(this,i,a[i])}return this}},Base=Base.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(a,b,c){for(var d in a)void 0===this.prototype[d]&&b.call(c,a[d],d,a)},implement:function(){for(var a=0;aa:">"===b?a>d:"<="===b?d>=a:">="===b?a>=d:void 0:a===d:!0}var d=navigator.userAgent,e=document.createElement("div"),f=-1!==d.indexOf("Gecko")&&-1===d.indexOf("KHTML"),g=-1!==d.indexOf("AppleWebKit/"),h=-1!==d.indexOf("Chrome/"),i=-1!==d.indexOf("Opera/");return{USER_AGENT:d,supported:function(){var c=this.USER_AGENT.toLowerCase(),d="contentEditable"in e,f=document.execCommand&&document.queryCommandSupported&&document.queryCommandState,g=document.querySelector&&document.querySelectorAll,h=this.isIos()&&a(c)<5||this.isAndroid()&&b(c)<4||-1!==c.indexOf("opera mobi")||-1!==c.indexOf("hpwos/");return d&&f&&g&&!h},isTouchDevice:function(){return this.supportsEvent("touchmove")},isIos:function(){return/ipad|iphone|ipod/i.test(this.USER_AGENT)},isAndroid:function(){return-1!==this.USER_AGENT.indexOf("Android")},supportsSandboxedIframes:function(){return c()},throwsMixedContentWarningWhenIframeSrcIsEmpty:function(){return!("querySelector"in document)},displaysCaretInEmptyContentEditableCorrectly:function(){return c()},hasCurrentStyleProperty:function(){return"currentStyle"in e},insertsLineBreaksOnReturn:function(){return f},supportsPlaceholderAttributeOn:function(a){return"placeholder"in a},supportsEvent:function(a){return"on"+a in e||function(){return e.setAttribute("on"+a,"return;"),"function"==typeof e["on"+a]}()},supportsEventsInIframeCorrectly:function(){return!i},supportsHTML5Tags:function(a){var b=a.createElement("div"),c="foo";return b.innerHTML=c,b.innerHTML.toLowerCase()===c},supportsCommand:function(){var a={formatBlock:c(10,"<="),insertUnorderedList:c(9,">="),insertOrderedList:c(9,">=")},b={insertHTML:f};return function(c,d){var e=a[d];if(!e){try{return c.queryCommandSupported(d)}catch(f){}try{return c.queryCommandEnabled(d)}catch(g){return!!b[d]}}return!1}}(),doesAutoLinkingInContentEditable:function(){return c()},canDisableAutoLinking:function(){return this.supportsCommand(document,"AutoUrlDetect")},clearsContentEditableCorrectly:function(){return f||i||g},supportsGetAttributeCorrectly:function(){var a=document.createElement("td");return"1"!=a.getAttribute("rowspan")},canSelectImagesInContentEditable:function(){return f||c()||i},autoScrollsToCaret:function(){return!g},autoClosesUnclosedTags:function(){var a,b,c=e.cloneNode(!1);return c.innerHTML="",b=c.innerHTML.toLowerCase(),a=""===b||""===b,this.autoClosesUnclosedTags=function(){return a},a},supportsNativeGetElementsByClassName:function(){return-1!==String(document.getElementsByClassName).indexOf("[native code]")},supportsSelectionModify:function(){return"getSelection"in window&&"modify"in window.getSelection()},needsSpaceAfterLineBreak:function(){return i},supportsSpeechApiOn:function(a){var b=d.match(/Chrome\/(\d+)/)||[void 0,0];return b[1]>=11&&("onwebkitspeechchange"in a||"speech"in a)},crashesWhenDefineProperty:function(a){return c(9)&&("XMLHttpRequest"===a||"XDomainRequest"===a)},doesAsyncFocus:function(){return c()},hasProblemsSettingCaretAfterImg:function(){return c()},hasUndoInContextMenu:function(){return f||h||i},hasInsertNodeIssue:function(){return i},hasIframeFocusIssue:function(){return c()},createsNestedInvalidMarkupAfterPaste:function(){return g},supportsMutationEvents:function(){return"MutationEvent"in window},supportsModernPaste:function(){return!("clipboardData"in window)},fixStyleKey:function(a){return"cssFloat"===a?"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat":a}}}(),wysihtml5.lang.array=function(a){return{contains:function(b){if(Array.isArray(b)){for(var c=b.length;c--;)if(-1!==wysihtml5.lang.array(a).indexOf(b[c]))return!0;return!1}return-1!==wysihtml5.lang.array(a).indexOf(b)},indexOf:function(b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},without:function(b){b=wysihtml5.lang.array(b);for(var c=[],d=0,e=a.length;e>d;d++)b.contains(a[d])||c.push(a[d]);return c},get:function(){for(var b=0,c=a.length,d=[];c>b;b++)d.push(a[b]);return d},map:function(b,c){if(Array.prototype.map)return a.map(b,c);for(var d=a.length>>>0,e=new Array(d),f=0;d>f;f++)e[f]=b.call(c,a[f],f,a);return e},unique:function(){for(var b=[],c=a.length,d=0;c>d;)wysihtml5.lang.array(b).contains(a[d])||b.push(a[d]),d++;return b}}},wysihtml5.lang.Dispatcher=Base.extend({on:function(a,b){return this.events=this.events||{},this.events[a]=this.events[a]||[],this.events[a].push(b),this},off:function(a,b){this.events=this.events||{};var c,d,e=0;if(a){for(c=this.events[a]||[],d=[];e\t"]/g,d={"&":"&","<":"<",">":">",'"':"""," ":" "};wysihtml5.lang.string=function(e){return e=String(e),{trim:function(){return e.replace(a,"").replace(b,"")},interpolate:function(a){for(var b in a)e=this.replace("#{"+b+"}").by(a[b]);return e},replace:function(a){return{by:function(b){return e.split(a).join(b)}}},escapeHTML:function(a,b){var f=e.replace(c,function(a){return d[a]});return a&&(f=f.replace(/(?:\r\n|\r|\n)/g,"
")),b&&(f=f.replace(/ /gi," ")),f}}}}(),function(a){function b(a,b){return f(a,b)?a:(a===a.ownerDocument.documentElement&&(a=a.ownerDocument.body),g(a,b))}function c(a){return a.replace(i,function(a,b){var c=(b.match(j)||[])[1]||"",d=l[c];b=b.replace(j,""),b.split(d).length>b.split(c).length&&(b+=c,c="");var e=b,f=b;return b.length>k&&(f=f.substr(0,k)+"..."),"www."===e.substr(0,4)&&(e="http://"+e),''+f+""+c})}function d(a){var b=a._wysihtml5_tempElement;return b||(b=a._wysihtml5_tempElement=a.createElement("div")),b}function e(b){var e=b.parentNode,f=a.lang.string(b.data).escapeHTML(),g=d(e.ownerDocument);for(g.innerHTML=""+c(f),g.removeChild(g.firstChild);g.firstChild;)e.insertBefore(g.firstChild,b);e.removeChild(b)}function f(b,c){for(var d;b.parentNode;){if(b=b.parentNode,d=b.nodeName,b.className&&a.lang.array(b.className.split(" ")).contains(c))return!0;if(h.contains(d))return!0;if("body"===d)return!1}return!1}function g(b,c){if(!(h.contains(b.nodeName)||b.className&&a.lang.array(b.className.split(" ")).contains(c))){if(b.nodeType===a.TEXT_NODE&&b.data.match(i))return void e(b);for(var d=a.lang.array(b.childNodes).get(),f=d.length,j=0;f>j;j++)g(d[j],c);return b}}var h=a.lang.array(["CODE","PRE","A","SCRIPT","HEAD","TITLE","STYLE"]),i=/((https?:\/\/|www\.)[^\s<]{3,})/gi,j=/([^\w\/\-](,?))$/i,k=100,l={")":"(","]":"[","}":"{"};a.dom.autoLink=b,a.dom.autoLink.URL_REG_EXP=i}(wysihtml5),function(a){var b=a.dom;b.addClass=function(a,c){var d=a.classList;return d?d.add(c):void(b.hasClass(a,c)||(a.className+=" "+c))},b.removeClass=function(a,b){var c=a.classList;return c?c.remove(b):void(a.className=a.className.replace(new RegExp("(^|\\s+)"+b+"(\\s+|$)")," "))},b.hasClass=function(a,b){var c=a.classList;if(c)return c.contains(b);var d=a.className;return d.length>0&&(d==b||new RegExp("(^|\\s)"+b+"(\\s|$)").test(d))}}(wysihtml5),wysihtml5.dom.contains=function(){var a=document.documentElement;return a.contains?function(a,b){if(b.nodeType!==wysihtml5.ELEMENT_NODE){if(b.parentNode===a)return!0;b=b.parentNode}return a!==b&&a.contains(b)}:a.compareDocumentPosition?function(a,b){return!!(16&a.compareDocumentPosition(b))}:void 0}(),wysihtml5.dom.convertToList=function(){function a(a,b){var c=a.createElement("li");return b.appendChild(c),c}function b(a,b){return a.createElement(b)}function c(c,d,e){if("UL"===c.nodeName||"OL"===c.nodeName||"MENU"===c.nodeName)return c;var f,g,h,i,j,k,l,m,n,o=c.ownerDocument,p=b(o,d),q=c.querySelectorAll("br"),r=q.length;for(n=0;r>n;n++)for(i=q[n];(j=i.parentNode)&&j!==c&&j.lastChild===i;){if("block"===wysihtml5.dom.getStyle("display").from(j)){j.removeChild(i);break}wysihtml5.dom.insert(i).after(i.parentNode)}for(f=wysihtml5.lang.array(c.childNodes).get(),g=f.length,n=0;g>n;n++)m=m||a(o,p),h=f[n],k="block"===wysihtml5.dom.getStyle("display").from(h),l="BR"===h.nodeName,!k||e&&wysihtml5.dom.hasClass(h,e)?l?m=m.firstChild?null:m:m.appendChild(h):(m=m.firstChild?a(o,p):m,m.appendChild(h),m=null);return 0===f.length&&a(o,p),c.parentNode.replaceChild(p,c),p}return c}(),wysihtml5.dom.copyAttributes=function(a){return{from:function(b){return{to:function(c){for(var d,e=0,f=a.length;f>e;e++)d=a[e],"undefined"!=typeof b[d]&&""!==b[d]&&(c[d]=b[d]);return{andTo:arguments.callee}}}}}},function(a){var b=["-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing"],c=function(b){return d(b)?parseInt(a.getStyle("width").from(b),10)d;d++)if("border-box"===a.getStyle(b[d]).from(c))return b[d]};a.copyStyles=function(d){return{from:function(e){c(e)&&(d=wysihtml5.lang.array(d).without(b));for(var f,g="",h=d.length,i=0;h>i;i++)f=d[i],g+=f+":"+a.getStyle(f).from(e)+";";return{to:function(b){return a.setStyles(g).on(b),{andTo:arguments.callee}}}}}}}(wysihtml5.dom),function(a){a.dom.delegate=function(a,b,c,d){var e=function(c){for(var e=c.target,f=3===e.nodeType?e.parentNode:e,g=a.querySelectorAll(b),h=0,i=g.length;i>h;h++)g[h].contains(f)&&d.call(g[h],c)};return a.addEventListener(c,e,!1),{stop:function(){a.removeEventListener(c,e,!1)}}}}(wysihtml5),function(a){function b(a,b){for(var c=[a],d=a;b&&d&&d!==b||!b&&d;)c.unshift(d),d=d.parentNode;return c}a.dom.domNode=function(c){var d=[a.ELEMENT_NODE,a.TEXT_NODE];return{is:{emptyTextNode:function(b){var d=b?/^\s*$/g:/^[\r\n]*$/g;return c.nodeType===a.TEXT_NODE&&d.test(c.data)},visible:function(){var b=!/^\s*$/g.test(a.dom.getTextContent(c));return b||1===c.nodeType&&c.querySelector("img, br, hr, object, embed, canvas, input, textarea")&&(b=!0),b}},prev:function(b){var e=c.previousSibling,f=b&&b.nodeTypes?b.nodeTypes:d;return e?!a.lang.array(f).contains(e.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(e).is.emptyTextNode(!0)?a.dom.domNode(e).prev(b):e:null},next:function(b){var e=c.nextSibling,f=b&&b.nodeTypes?b.nodeTypes:d;return e?!a.lang.array(f).contains(e.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(e).is.emptyTextNode(!0)?a.dom.domNode(e).next(b):e:null},commonAncestor:function(a,d){var e=b(c,d),f=b(a,d);if(e[0]!=f[0])return null;for(var g=0;g0)for(var f=!1,g=Array.isArray(b.styleProperty)?b.styleProperty:[b.styleProperty],h=0,i=g.length;i>h;h++){if(d=a.browser.fixStyleKey(g[h]),c.style[d]){if(!b.styleValue){f=!0;break}if(b.styleValue instanceof RegExp){if(c.style[d].trim().match(b.styleValue).length>0){f=!0;break}}else if(Array.isArray(b.styleValue)){if(b.styleValue.indexOf(c.style[d].trim())){f=!0;break}}else if(b.styleValue===c.style[d].trim().replace(/, /g,",")){f=!0;break}}if(!f)return!1}if(b.attribute){var j=a.dom.getAttributes(c),k=[],l=!1;Array.isArray(b.attribute)?k=b.attribute:k[b.attribute]=b.attributeValue;for(var m in k)if(k.hasOwnProperty(m))if("undefined"==typeof k[m]){if("undefined"!=typeof j[m]){l=!0;break}}else if(j[m]===k[m]){l=!0;break}if(!l)return!1}return!0}}}}(wysihtml5),wysihtml5.dom.getAsDom=function(){var a=function(a,b){var c=b.createElement("div");c.style.display="none",b.body.appendChild(c);try{c.innerHTML=a}catch(d){}return b.body.removeChild(c),c},b=function(a){if(!a._wysihtml5_supportsHTML5Tags){for(var b=0,d=c.length;d>b;b++)a.createElement(c[b]);a._wysihtml5_supportsHTML5Tags=!0}},c=["abbr","article","aside","audio","bdi","canvas","command","datalist","details","figcaption","figure","footer","header","hgroup","keygen","mark","meter","nav","output","progress","rp","rt","ruby","svg","section","source","summary","time","track","video","wbr"];return function(c,d){d=d||document;var e;return"object"==typeof c&&c.nodeType?(e=d.createElement("div"),e.appendChild(c)):wysihtml5.browser.supportsHTML5Tags(d)?(e=d.createElement("div"),e.innerHTML=c):(b(d),e=a(c,d)),e}}(),wysihtml5.dom.getParentElement=function(){return function(a,b,c,d){for(c=c||50;c--&&a&&"BODY"!==a.nodeName&&(!d||a!==d);){if(wysihtml5.dom.domNode(a).test(b))return a;a=a.parentNode}return null}}(),wysihtml5.dom.getStyle=function(){function a(a){return a.replace(c,function(a){return a.charAt(1).toUpperCase()})}var b={"float":"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat"},c=/\-[a-z]/g;return function(c){return{from:function(d){if(d.nodeType===wysihtml5.ELEMENT_NODE){var e=d.ownerDocument,f=b[c]||a(c),g=d.style,h=d.currentStyle,i=g[f];if(i)return i;if(h)try{return h[f]}catch(j){}var k,l,m=e.defaultView||e.parentWindow,n=("height"===c||"width"===c)&&"TEXTAREA"===d.nodeName;return m.getComputedStyle?(n&&(k=g.overflow,g.overflow="hidden"),l=m.getComputedStyle(d,null).getPropertyValue(c),n&&(g.overflow=k||""),l):void 0}}}}}(),wysihtml5.dom.getTextNodes=function(a,b){var c=[];for(a=a.firstChild;a;a=a.nextSibling)3==a.nodeType?b&&/^\s*$/.test(a.innerText||a.textContent)||c.push(a):c=c.concat(wysihtml5.dom.getTextNodes(a,b));return c},wysihtml5.dom.hasElementWithTagName=function(){function a(a){return a._wysihtml5_identifier||(a._wysihtml5_identifier=c++)}var b={},c=1;return function(c,d){var e=a(c)+":"+d,f=b[e];return f||(f=b[e]=c.getElementsByTagName(d)),f.length>0}}(),function(a){function b(a){return a._wysihtml5_identifier||(a._wysihtml5_identifier=d++)}var c={},d=1;a.dom.hasElementWithClassName=function(d,e){if(!a.browser.supportsNativeGetElementsByClassName())return!!d.querySelector("."+e);var f=b(d)+":"+e,g=c[f];return g||(g=c[f]=d.getElementsByClassName(e)),g.length>0}}(wysihtml5),wysihtml5.dom.insert=function(a){return{after:function(b){b.parentNode.insertBefore(a,b.nextSibling)},before:function(b){b.parentNode.insertBefore(a,b)},into:function(b){b.appendChild(a)}}},wysihtml5.dom.insertCSS=function(a){return a=a.join("\n"),{into:function(b){var c=b.createElement("style");c.type="text/css",c.styleSheet?c.styleSheet.cssText=a:c.appendChild(b.createTextNode(a));var d=b.querySelector("head link");if(d)return void d.parentNode.insertBefore(c,d);var e=b.querySelector("head");e&&e.appendChild(c)}}},function(a){a.dom.lineBreaks=function(b){function c(a){return"BR"===a.nodeName}function d(b){return c(b)?!0:"block"===a.dom.getStyle("display").from(b)?!0:!1}return{add:function(c){var e=b.ownerDocument,f=a.dom.domNode(b).next({ignoreBlankTexts:!0}),g=a.dom.domNode(b).prev({ignoreBlankTexts:!0});f&&!d(f)&&a.dom.insert(e.createElement("br")).after(b),g&&!d(g)&&a.dom.insert(e.createElement("br")).before(b)},remove:function(d){var e=a.dom.domNode(b).next({ignoreBlankTexts:!0}),f=a.dom.domNode(b).prev({ignoreBlankTexts:!0});e&&c(e)&&e.parentNode.removeChild(e),f&&c(f)&&f.parentNode.removeChild(f)}}}}(wysihtml5),wysihtml5.dom.observe=function(a,b,c){b="string"==typeof b?[b]:b;for(var d,e,f=0,g=b.length;g>f;f++)e=b[f],a.addEventListener?a.addEventListener(e,c,!1):(d=function(b){"target"in b||(b.target=b.srcElement),b.preventDefault=b.preventDefault||function(){this.returnValue=!1},b.stopPropagation=b.stopPropagation||function(){this.cancelBubble=!0},c.call(a,b)},a.attachEvent("on"+e,d));return{stop:function(){for(var e,f=0,g=b.length;g>f;f++)e=b[f],a.removeEventListener?a.removeEventListener(e,c,!1):a.detachEvent("on"+e,d)}}},wysihtml5.dom.parse=function(a,b){function c(a,b){wysihtml5.lang.object(t).merge(s).merge(b.rules).get();var c,f,g,h=b.context||a.ownerDocument||document,i=h.createDocumentFragment(),j="string"==typeof a,k=!1;for(b.clearInternals===!0&&(k=!0),c=j?wysihtml5.dom.getAsDom(a,h):a,t.selectors&&e(c,t.selectors);c.firstChild;)g=c.firstChild,f=d(g,b.cleanUp,k,b.uneditableClass),f&&i.appendChild(f),g!==f&&c.removeChild(g);if(b.unjoinNbsps)for(var l=wysihtml5.dom.getTextNodes(i),m=l.length;m--;)l[m].nodeValue=l[m].nodeValue.replace(/([\S\u00A0])\u00A0/gi,"$1 ");return c.innerHTML="",c.appendChild(i),j?wysihtml5.quirks.getCorrectInnerHTML(c):c}function d(a,b,c,e){var f,g,h,i,j=a.nodeType,k=a.childNodes,l=k.length,m=p[j],n=0;if(e&&1===j&&wysihtml5.dom.hasClass(a,e))return a;if(g=m&&m(a,c),!g){if(g===!1){for(f=a.ownerDocument.createDocumentFragment(),n=l;n--;)k[n]&&(h=d(k[n],b,c,e),h&&(k[n]===h&&n--,f.insertBefore(h,f.firstChild)));return i=wysihtml5.dom.getStyle("display").from(a),""===i&&(i=wysihtml5.lang.array(u).contains(a.tagName)?"block":""),wysihtml5.lang.array(["block","flex","table"]).contains(i)&&f.appendChild(a.ownerDocument.createElement("br")),wysihtml5.lang.array(["div","pre","p","table","td","th","ul","ol","li","dd","dl","footer","header","section","h1","h2","h3","h4","h5","h6"]).contains(a.nodeName.toLowerCase())&&a.parentNode.lastChild!==a&&(a.nextSibling&&3===a.nextSibling.nodeType&&/^\s/.test(a.nextSibling.nodeValue)||f.appendChild(a.ownerDocument.createTextNode(" "))),f.normalize&&f.normalize(),f}return null}for(n=0;l>n;n++)k[n]&&(h=d(k[n],b,c,e),h&&(k[n]===h&&n--,g.appendChild(h)));if(b&&g.nodeName.toLowerCase()===q&&(!g.childNodes.length||/^\s*$/gi.test(g.innerHTML)&&(c||"_wysihtml5-temp-placeholder"!==a.className&&"rangySelectionBoundary"!==a.className)||!g.attributes.length)){for(f=g.ownerDocument.createDocumentFragment();g.firstChild;)f.appendChild(g.firstChild);return f.normalize&&f.normalize(),f}return g.normalize&&g.normalize(),g}function e(a,b){var c,d,e;for(c in b)if(b.hasOwnProperty(c)){wysihtml5.lang.object(b[c]).isFunction()?d=b[c]:"string"==typeof b[c]&&z[b[c]]&&(d=z[b[c]]),e=a.querySelectorAll(c);for(var f=e.length;f--;)d(e[f])}}function f(a,b){var c,d,e,f=t.tags,h=a.nodeName.toLowerCase(),j=a.scopeName;if(a._wysihtml5)return null;if(a._wysihtml5=1,"wysihtml5-temp"===a.className)return null;if(j&&"HTML"!=j&&(h=j+":"+h),"outerHTML"in a&&(wysihtml5.browser.autoClosesUnclosedTags()||"P"!==a.nodeName||""===a.outerHTML.slice(-4).toLowerCase()||(h="div")),h in f){if(c=f[h],!c||c.remove)return null;if(c.unwrap)return!1;c="string"==typeof c?{rename_tag:c}:c}else{if(!a.firstChild)return null;c={rename_tag:q}}if(c.one_of_type&&!g(a,t,c.one_of_type,b)){if(!c.remove_action)return null;if("unwrap"===c.remove_action)return!1;if("rename"!==c.remove_action)return null;e=c.remove_action_rename_to||q}return d=a.ownerDocument.createElement(e||c.rename_tag||h),m(a,d,c,b),i(a,d,c),a=null,d.normalize&&d.normalize(),d}function g(a,b,c,d){var e,f;if("SPAN"===a.nodeName&&!d&&("_wysihtml5-temp-placeholder"===a.className||"rangySelectionBoundary"===a.className))return!0;for(f in c)if(c.hasOwnProperty(f)&&b.type_definitions&&b.type_definitions[f]&&(e=b.type_definitions[f],h(a,e)))return!0;return!1}function h(a,b){var c,d,e,f,g,h=a.getAttribute("class"),i=a.getAttribute("style");if(b.methods)for(var j in b.methods)if(b.methods.hasOwnProperty(j)&&y[j]&&y[j](a))return!0;if(h&&b.classes){h=h.replace(/^\s+/g,"").replace(/\s+$/g,"").split(r),c=h.length;for(var k=0;c>k;k++)if(b.classes[h[k]])return!0}if(i&&b.styles){i=i.split(";");for(d in b.styles)if(b.styles.hasOwnProperty(d))for(var l=i.length;l--;)if(g=i[l].split(":"),g[0].replace(/\s/g,"").toLowerCase()===d&&(b.styles[d]===!0||1===b.styles[d]||wysihtml5.lang.array(b.styles[d]).contains(g[1].replace(/\s/g,"").toLowerCase())))return!0}if(b.attrs)for(e in b.attrs)if(b.attrs.hasOwnProperty(e)&&(f=wysihtml5.dom.getAttribute(a,e),"string"==typeof f&&f.search(b.attrs[e])>-1))return!0;return!1}function i(a,b,c){var d,e;if(c&&c.keep_styles)for(d in c.keep_styles)if(c.keep_styles.hasOwnProperty(d)){if(e="float"===d?a.style.styleFloat||a.style.cssFloat:a.style[d],c.keep_styles[d]instanceof RegExp&&!c.keep_styles[d].test(e))continue;"float"===d?b.style[a.style.styleFloat?"styleFloat":"cssFloat"]=e:a.style[d]&&(b.style[d]=e)}}function j(a,b){var c=[];for(var d in b)b.hasOwnProperty(d)&&0===d.indexOf(a)&&c.push(d);return c}function k(a,b,c,d){var e,f=wysihtml5.lang.object(c).isFunction()?c:v[c];return f&&(e=f(b,d),"string"==typeof e)?e:!1}function l(a,b){var c,d,e,f=wysihtml5.lang.object(t.attributes||{}).clone(),g=wysihtml5.lang.object(f).merge(wysihtml5.lang.object(b||{}).clone()).get(),h={},i=wysihtml5.dom.getAttributes(a);for(c in g)if(/\*$/.test(c)){e=j(c.slice(0,-1),i);for(var l=0,m=e.length;m>l;l++)d=k(e[l],i[e[l]],g[c],a.nodeName),d!==!1&&(h[e[l]]=d)}else d=k(c,i[c],g[c],a.nodeName),d!==!1&&(h[c]=d);return h}function m(a,b,c,d){var e,f,g,h,i,j={},k=c.set_class,m=c.add_class,n=c.add_style,o=c.set_attributes,p=t.classes,q=0,s=[],u=[],v=[],y=[];if(o&&(j=wysihtml5.lang.object(o).clone()),j=wysihtml5.lang.object(j).merge(l(a,c.check_attributes)).get(),k&&s.push(k),m)for(h in m)i=x[m[h]],i&&(g=i(wysihtml5.dom.getAttribute(a,h)),"string"==typeof g&&s.push(g));if(n)for(h in n)i=w[n[h]],i&&(newStyle=i(wysihtml5.dom.getAttribute(a,h)),"string"==typeof newStyle&&u.push(newStyle));if("string"==typeof p&&"any"===p&&a.getAttribute("class"))if(t.classes_blacklist){for(y=a.getAttribute("class"),y&&(s=s.concat(y.split(r))),e=s.length;e>q;q++)f=s[q],t.classes_blacklist[f]||v.push(f);v.length&&(j["class"]=wysihtml5.lang.array(v).unique().join(" "))}else j["class"]=a.getAttribute("class");else{for(d||(p["_wysihtml5-temp-placeholder"]=1,p._rangySelectionBoundary=1,p["wysiwyg-tmp-selected-cell"]=1),y=a.getAttribute("class"),y&&(s=s.concat(y.split(r))),e=s.length;e>q;q++)f=s[q],p[f]&&v.push(f);v.length&&(j["class"]=wysihtml5.lang.array(v).unique().join(" "))}j["class"]&&d&&(j["class"]=j["class"].replace("wysiwyg-tmp-selected-cell",""),/^\s*$/g.test(j["class"])&&delete j["class"]),u.length&&(j.style=wysihtml5.lang.array(u).unique().join(" "));for(h in j)try{b.setAttribute(h,j[h])}catch(z){}j.src&&("undefined"!=typeof j.width&&b.setAttribute("width",j.width),"undefined"!=typeof j.height&&b.setAttribute("height",j.height))}function n(a){var b=a.nextSibling;if(!b||b.nodeType!==wysihtml5.TEXT_NODE){var c=a.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"");return a.ownerDocument.createTextNode(c)}b.data=a.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")+b.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")}function o(a){return t.comments?a.ownerDocument.createComment(a.nodeValue):void 0}var p={1:f,3:n,8:o},q="span",r=/\s+/,s={tags:{},classes:{}},t={},u=["ADDRESS","BLOCKQUOTE","CENTER","DIR","DIV","DL","FIELDSET","FORM","H1","H2","H3","H4","H5","H6","ISINDEX","MENU","NOFRAMES","NOSCRIPT","OL","P","PRE","TABLE","UL"],v={url:function(){var a=/^https?:\/\//i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),src:function(){var a=/^(\/|https?:\/\/)/i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),href:function(){var a=/^(#|\/|https?:\/\/|mailto:|tel:)/i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),alt:function(){var a=/[^ a-z0-9_\-]/gi;return function(b,c){return b?b.replace(a,""):"IMG"===c?"":null}}(),numbers:function(){var a=/\D/g;return function(b){return b=(b||"").replace(a,""),b||null}}(),dimension:function(){var a=/\D*(\d+)(\.\d+)?\s?(%)?\D*/;return function(b){return b=(b||"").replace(a,"$1$2$3"),b||null}}(),any:function(){return function(a){return a?a:null}}()},w={align_text:function(){var a={left:"text-align: left;",right:"text-align: right;",center:"text-align: center;"};return function(b){return a[String(b).toLowerCase()]}}()},x={align_img:function(){var a={left:"wysiwyg-float-left",right:"wysiwyg-float-right"};return function(b){return a[String(b).toLowerCase()]}}(),align_text:function(){var a={left:"wysiwyg-text-align-left",right:"wysiwyg-text-align-right",center:"wysiwyg-text-align-center",justify:"wysiwyg-text-align-justify"};return function(b){return a[String(b).toLowerCase()]}}(),clear_br:function(){var a={left:"wysiwyg-clear-left",right:"wysiwyg-clear-right",both:"wysiwyg-clear-both",all:"wysiwyg-clear-both"};return function(b){return a[String(b).toLowerCase()]}}(),size_font:function(){var a={1:"wysiwyg-font-size-xx-small",2:"wysiwyg-font-size-small",3:"wysiwyg-font-size-medium",4:"wysiwyg-font-size-large",5:"wysiwyg-font-size-x-large",6:"wysiwyg-font-size-xx-large",7:"wysiwyg-font-size-xx-large","-":"wysiwyg-font-size-smaller","+":"wysiwyg-font-size-larger"};return function(b){return a[String(b).charAt(0)]}}()},y={has_visible_contet:function(){var a,b=["img","video","picture","br","script","noscript","style","table","iframe","object","embed","audio","svg","input","button","select","textarea","canvas"];return function(c){if(a=(c.innerText||c.textContent).replace(/\s/g,""),a&&a.length>0)return!0;for(var d=b.length;d--;)if(c.querySelector(b[d]))return!0;return c.offsetWidth&&c.offsetWidth>0&&c.offsetHeight&&c.offsetHeight>0?!0:!1}}()},z={unwrap:function(a){wysihtml5.dom.unwrap(a)},remove:function(a){a.parentNode.removeChild(a)}};return c(a,b)},wysihtml5.dom.removeEmptyTextNodes=function(a){for(var b,c=wysihtml5.lang.array(a.childNodes).get(),d=c.length,e=0;d>e;e++)b=c[e],b.nodeType===wysihtml5.TEXT_NODE&&/^[\n\r]*$/.test(b.data)&&b.parentNode.removeChild(b)},wysihtml5.dom.renameElement=function(a,b){for(var c,d=a.ownerDocument.createElement(b);c=a.firstChild;)d.appendChild(c);return wysihtml5.dom.copyAttributes(["align","className"]).from(a).to(d),a.parentNode&&a.parentNode.replaceChild(d,a),d},wysihtml5.dom.replaceWithChildNodes=function(a){if(a.parentNode){if(!a.firstChild)return void a.parentNode.removeChild(a);for(var b=a.ownerDocument.createDocumentFragment();a.firstChild;)b.appendChild(a.firstChild);a.parentNode.replaceChild(b,a),a=b=null}},function(a){function b(b){return"block"===a.getStyle("display").from(b)}function c(a){return"BR"===a.nodeName}function d(a){var b=a.ownerDocument.createElement("br");a.appendChild(b)}function e(a,e){if(a.nodeName.match(/^(MENU|UL|OL)$/)){var f,g,h,i,j,k,l,m=a.ownerDocument,n=m.createDocumentFragment(),o=wysihtml5.dom.domNode(a).prev({ignoreBlankTexts:!0}),p=wysihtml5.dom.domNode(a).next({ignoreBlankTexts:!0}),q=a.lastElementChild||a.lastChild;if(e)for(!o||b(o)||c(o)||d(n);k=a.firstElementChild||a.firstChild;){for(g=k.lastChild,l=k===q;f=k.firstChild;)h=f===g,i=(!l||p&&!b(p))&&h&&!b(f)&&!c(f),n.appendChild(f),i&&d(n);k.parentNode.removeChild(k)}else for(;k=a.firstElementChild||a.firstChild;){if(k.querySelector&&k.querySelector("div, p, ul, ol, menu, blockquote, h1, h2, h3, h4, h5, h6"))for(;f=k.firstChild;)n.appendChild(f);else{for(j=m.createElement("p");f=k.firstChild;)j.appendChild(f);n.appendChild(j)}k.parentNode.removeChild(k)}a.parentNode.replaceChild(n,a)}}a.resolveList=e}(wysihtml5.dom),function(a){var b=document,c=["parent","top","opener","frameElement","frames","localStorage","globalStorage","sessionStorage","indexedDB"],d=["open","close","openDialog","showModalDialog","alert","confirm","prompt","openDatabase","postMessage","XMLHttpRequest","XDomainRequest"],e=["referrer","write","open","close"];a.dom.Sandbox=Base.extend({constructor:function(b,c){this.callback=b||a.EMPTY_FUNCTION,this.config=a.lang.object({}).merge(c).get(),this.config.className||(this.config.className="wysihtml5-sandbox"),this.editableArea=this._createIframe()},insertInto:function(a){"string"==typeof a&&(a=b.getElementById(a)),a.appendChild(this.editableArea)},getIframe:function(){return this.editableArea},getWindow:function(){this._readyError()},getDocument:function(){this._readyError()},destroy:function(){var a=this.getIframe();a.parentNode.removeChild(a)},_readyError:function(){throw new Error("wysihtml5.Sandbox: Sandbox iframe isn't loaded yet")},_createIframe:function(){var c=this,d=b.createElement("iframe");return d.className=this.config.className,a.dom.setAttributes({security:"restricted",allowtransparency:"true",frameborder:0,width:0,height:0,marginwidth:0,marginheight:0}).on(d),a.browser.throwsMixedContentWarningWhenIframeSrcIsEmpty()&&(d.src="javascript:''"),d.onload=function(){d.onreadystatechange=d.onload=null,c._onLoadIframe(d)},d.onreadystatechange=function(){/loaded|complete/.test(d.readyState)&&(d.onreadystatechange=d.onload=null,c._onLoadIframe(d))},d},_onLoadIframe:function(f){if(a.dom.contains(b.documentElement,f)){var g=this,h=f.contentWindow,i=f.contentWindow.document,j=b.characterSet||b.charset||"utf-8",k=this._getHtml({charset:j,stylesheets:this.config.stylesheets});if(i.open("text/html","replace"),i.write(k),i.close(),this.getWindow=function(){return f.contentWindow},this.getDocument=function(){return f.contentWindow.document},h.onerror=function(a,b,c){throw new Error("wysihtml5.Sandbox: "+a,b,c)},!a.browser.supportsSandboxedIframes()){var l,m;for(l=0,m=c.length;m>l;l++)this._unset(h,c[l]);for(l=0,m=d.length;m>l;l++)this._unset(h,d[l],a.EMPTY_FUNCTION);for(l=0,m=e.length;m>l;l++)this._unset(i,e[l]);this._unset(i,"cookie","",!0)}a.polyfills&&a.polyfills(h,i),this.loaded=!0,setTimeout(function(){g.callback(g)},0)}},_getHtml:function(b){var c,d=b.stylesheets,e="",f=0;if(d="string"==typeof d?[d]:d)for(c=d.length;c>f;f++)e+='';return b.stylesheets=e,a.lang.string('#{stylesheets}').interpolate(b)},_unset:function(b,c,d,e){try{b[c]=d}catch(f){}try{b.__defineGetter__(c,function(){return d})}catch(f){}if(e)try{b.__defineSetter__(c,function(){})}catch(f){}if(!a.browser.crashesWhenDefineProperty(c))try{var g={get:function(){return d}};e&&(g.set=function(){}),Object.defineProperty(b,c,g)}catch(f){}}})}(wysihtml5),function(a){var b=document;a.dom.ContentEditableArea=Base.extend({getContentEditable:function(){return this.element},getWindow:function(){return this.element.ownerDocument.defaultView||this.element.ownerDocument.parentWindow},getDocument:function(){return this.element.ownerDocument},constructor:function(b,c,d){this.callback=b||a.EMPTY_FUNCTION,this.config=a.lang.object({}).merge(c).get(),this.config.className||(this.config.className="wysihtml5-sandbox"),d?this.element=this._bindElement(d):this.element=this._createElement()},_createElement:function(){var a=b.createElement("div");return a.className=this.config.className,this._loadElement(a),a},_bindElement:function(a){return a.className=a.className?a.className+" wysihtml5-sandbox":"wysihtml5-sandbox",this._loadElement(a,!0),a},_loadElement:function(a,b){var c=this;if(!b){var d=this._getHtml();a.innerHTML=d}this.loaded=!0,setTimeout(function(){c.callback(c)},0)},_getHtml:function(a){return""}})}(wysihtml5),function(){var a={className:"class"};wysihtml5.dom.setAttributes=function(b){return{on:function(c){for(var d in b)c.setAttribute(a[d]||d,b[d])}}}}(),wysihtml5.dom.setStyles=function(a){return{on:function(b){var c=b.style;if("string"==typeof a)return void(c.cssText+=";"+a);for(var d in a)"float"===d?(c.cssFloat=a[d],c.styleFloat=a[d]):c[d]=a[d]}}},function(a){a.simulatePlaceholder=function(b,c,d,e){var f=e||"wysihtml5-placeholder",g=function(){var b=c.element.offsetWidth>0&&c.element.offsetHeight>0;c.hasPlaceholderSet()&&(c.clear(),c.element.focus(),b&&setTimeout(function(){var a=c.selection.getSelection();a.focusNode&&a.anchorNode||c.selection.selectNode(c.element.firstChild||c.element)},0)),c.placeholderSet=!1,a.removeClass(c.element,f)},h=function(){c.isEmpty()&&!c.placeholderSet&&(c.placeholderSet=!0,c.setValue(d),a.addClass(c.element,f))};b.on("set_placeholder",h).on("unset_placeholder",g).on("focus:composer",g).on("paste:composer",g).on("blur:composer",h),h()}}(wysihtml5.dom),function(a){var b=document.documentElement;"textContent"in b?(a.setTextContent=function(a,b){a.textContent=b},a.getTextContent=function(a){return a.textContent}):"innerText"in b?(a.setTextContent=function(a,b){a.innerText=b},a.getTextContent=function(a){return a.innerText}):(a.setTextContent=function(a,b){a.nodeValue=b},a.getTextContent=function(a){return a.nodeValue})}(wysihtml5.dom),wysihtml5.dom.getAttribute=function(a,b){var c=!wysihtml5.browser.supportsGetAttributeCorrectly();b=b.toLowerCase();var d=a.nodeName;if("IMG"==d&&"src"==b&&wysihtml5.dom.isLoadedImage(a)===!0)return a.src;if(c&&"outerHTML"in a){var e=a.outerHTML.toLowerCase(),f=-1!=e.indexOf(" "+b+"=");return f?a.getAttribute(b):null}return a.getAttribute(b)},wysihtml5.dom.getAttributes=function(a){var b,c=!wysihtml5.browser.supportsGetAttributeCorrectly(),d=a.nodeName,e=[];for(b in a.attributes)(a.attributes.hasOwnProperty&&a.attributes.hasOwnProperty(b)||!a.attributes.hasOwnProperty&&Object.prototype.hasOwnProperty.call(a.attributes,b))&&a.attributes[b].specified&&("IMG"==d&&"src"==a.attributes[b].name.toLowerCase()&&wysihtml5.dom.isLoadedImage(a)===!0?e.src=a.src:wysihtml5.lang.array(["rowspan","colspan"]).contains(a.attributes[b].name.toLowerCase())&&c?1!==a.attributes[b].value&&(e[a.attributes[b].name]=a.attributes[b].value):e[a.attributes[b].name]=a.attributes[b].value);return e},wysihtml5.dom.isLoadedImage=function(a){try{return a.complete&&!a.mozMatchesSelector(":-moz-broken")}catch(b){if(a.complete&&"complete"===a.readyState)return!0}},function(a){function b(a,b){for(var c,d=[],e=0,f=a.length;f>e;e++)if(c=a[e].querySelectorAll(b))for(var g=c.length;g--;d.unshift(c[g]));return d}function d(a){a.parentNode.removeChild(a)}function e(a,b){a.parentNode.insertBefore(b,a.nextSibling)}function f(a,b){for(var c=a.nextSibling;1!=c.nodeType;)if(c=c.nextSibling,!b||b==c.tagName.toLowerCase())return c;return null}var g=a.dom,h=function(a){this.el=a,this.isColspan=!1,this.isRowspan=!1,this.firstCol=!0,this.lastCol=!0,this.firstRow=!0,this.lastRow=!0,this.isReal=!0,this.spanCollection=[],this.modified=!1},i=function(a,b){a?(this.cell=a,this.table=g.getParentElement(a,{query:"table"})):b&&(this.table=b,this.cell=this.table.querySelectorAll("th, td")[0])};i.prototype={addSpannedCellToMap:function(a,b,c,d,e,f){for(var g=[],i=c+(f?parseInt(f,10)-1:0),j=d+(e?parseInt(e,10)-1:0),k=c;i>=k;k++){"undefined"==typeof b[k]&&(b[k]=[]);for(var l=d;j>=l;l++)b[k][l]=new h(a),b[k][l].isColspan=e&&parseInt(e,10)>1,b[k][l].isRowspan=f&&parseInt(f,10)>1,b[k][l].firstCol=l==d,b[k][l].lastCol=l==j,b[k][l].firstRow=k==c,b[k][l].lastRow=k==i,b[k][l].isReal=l==d&&k==c,b[k][l].spanCollection=g,g.push(b[k][l])}},setCellAsModified:function(a){if(a.modified=!0,a.spanCollection.length>0)for(var b=0,c=a.spanCollection.length;c>b;b++)a.spanCollection[b].modified=!0},setTableMap:function(){var a,b,c,d,e,f,i,j,k=[],l=this.getTableRows();for(a=0;a0?a.lang.array(f).without(e):f;return g},getTableRows:function(){var c=this.table.querySelectorAll("table"),d=c?b(c,"tr"):[],e=this.table.querySelectorAll("tr"),f=d.length>0?a.lang.array(e).without(d):e;return f},getMapIndex:function(a){for(var b=this.map.length,c=this.map&&this.map[0]?this.map[0].length:0,d=0;b>d;d++)for(var e=0;c>e;e++)if(this.map[d][e].el===a)return{row:d,col:e};return!1},getElementAtIndex:function(a){return this.setTableMap(),this.map[a.row]&&this.map[a.row][a.col]&&this.map[a.row][a.col].el?this.map[a.row][a.col].el:null},getMapElsTo:function(a){var b=[];if(this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(a),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var c=this.idx_start;this.idx_start=this.idx_end,this.idx_end=c}if(this.idx_start.col>this.idx_end.col){var d=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=d}if(null!=this.idx_start&&null!=this.idx_end)for(var e=this.idx_start.row,f=this.idx_end.row;f>=e;e++)for(var g=this.idx_start.col,h=this.idx_end.col;h>=g;g++)b.push(this.map[e][g].el);return b},orderSelectionEnds:function(a){if(this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(a),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var b=this.idx_start;this.idx_start=this.idx_end,this.idx_end=b}if(this.idx_start.col>this.idx_end.col){var c=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=c}return{start:this.map[this.idx_start.row][this.idx_start.col].el,end:this.map[this.idx_end.row][this.idx_end.col].el}},createCells:function(a,b,c){for(var d,e=this.table.ownerDocument,f=e.createDocumentFragment(),g=0;b>g;g++){if(d=e.createElement(a),c)for(var h in c)c.hasOwnProperty(h)&&d.setAttribute(h,c[h]);d.appendChild(document.createTextNode(" ")),f.appendChild(d)}return f},correctColIndexForUnreals:function(a,b){for(var c=this.map[b],d=-1,e=0;a>e;e++)c[e].isReal&&d++;return d},getLastNewCellOnRow:function(a,b){for(var c,d,e=this.getRowCells(a),f=0,g=e.length;g>f;f++)if(c=e[f],d=this.getMapIndex(c),d===!1||"undefined"!=typeof b&&d.row!=b)return c;return null},removeEmptyTable:function(){var a=this.table.querySelectorAll("td, th");return a&&0!=a.length?!1:(d(this.table),!0)},splitRowToCells:function(a){if(a.isColspan){var b=parseInt(g.getAttribute(a.el,"colspan")||1,10),c=a.el.tagName.toLowerCase();if(b>1){var d=this.createCells(c,b-1);e(a.el,d)}a.el.removeAttribute("colspan")}},getRealRowEl:function(a,b){var c=null,d=null;b=b||this.idx;for(var e=0,f=this.map[b.row].length;f>e;e++)if(d=this.map[b.row][e],d.isReal&&(c=g.getParentElement(d.el,{query:"tr"})))return c;return null===c&&a&&(c=g.getParentElement(this.map[b.row][b.col].el,{query:"tr"})||null),c},injectRowAt:function(a,b,c,d,f){var h=this.getRealRowEl(!1,{row:a,col:b}),i=this.createCells(d,c);if(h){var j=this.correctColIndexForUnreals(b,a);j>=0?e(this.getRowCells(h)[j],i):h.insertBefore(i,h.firstChild)}else{var k=this.table.ownerDocument.createElement("tr");k.appendChild(i),e(g.getParentElement(f.el,{query:"tr"}),k)}},canMerge:function(a){if(this.to=a,this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(this.to),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var b=this.idx_start;this.idx_start=this.idx_end,this.idx_end=b}if(this.idx_start.col>this.idx_end.col){var c=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=c}for(var d=this.idx_start.row,e=this.idx_end.row;e>=d;d++)for(var f=this.idx_start.col,g=this.idx_end.col;g>=f;f++)if(this.map[d][f].isColspan||this.map[d][f].isRowspan)return!1;return!0},decreaseCellSpan:function(a,b){var c=parseInt(g.getAttribute(a.el,b),10)-1;c>=1?a.el.setAttribute(b,c):(a.el.removeAttribute(b),"colspan"==b&&(a.isColspan=!1),"rowspan"==b&&(a.isRowspan=!1),a.firstCol=!0,a.lastCol=!0,a.firstRow=!0,a.lastRow=!0,a.isReal=!0)},removeSurplusLines:function(){var a,b,c,e,f,h,i;if(this.setTableMap(),this.map){for(c=0,e=this.map.length;e>c;c++){for(a=this.map[c],i=!0,f=0,h=a.length;h>f;f++)if(b=a[f],!(g.getAttribute(b.el,"rowspan")&&parseInt(g.getAttribute(b.el,"rowspan"),10)>1&&b.firstRow!==!0)){i=!1;break}if(i)for(f=0;h>f;f++)this.decreaseCellSpan(a[f],"rowspan")}var j=this.getTableRows();for(c=0,e=j.length;e>c;c++)a=j[c],0==a.childNodes.length&&/^\s*$/.test(a.textContent||a.innerText)&&d(a)}},fillMissingCells:function(){var a=0,b=0,c=null;if(this.setTableMap(),this.map){a=this.map.length;for(var d=0;a>d;d++)this.map[d].length>b&&(b=this.map[d].length);for(var f=0;a>f;f++)for(var g=0;b>g;g++)this.map[f]&&!this.map[f][g]&&g>0&&(this.map[f][g]=new h(this.createCells("td",1)),c=this.map[f][g-1],c&&c.el&&c.el.parent&&e(this.map[f][g-1].el,this.map[f][g].el))}},rectify:function(){return this.removeEmptyTable()?!1:(this.removeSurplusLines(),this.fillMissingCells(),!0)},unmerge:function(){if(this.rectify()&&(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx)){var a=this.map[this.idx.row][this.idx.col],b=g.getAttribute(a.el,"colspan")?parseInt(g.getAttribute(a.el,"colspan"),10):1,c=a.el.tagName.toLowerCase();if(a.isRowspan){var d=parseInt(g.getAttribute(a.el,"rowspan"),10);if(d>1)for(var e=1,f=d-1;f>=e;e++)this.injectRowAt(this.idx.row+e,this.idx.col,b,c,a);a.el.removeAttribute("rowspan")}this.splitRowToCells(a)}},merge:function(a){if(this.rectify())if(this.canMerge(a)){for(var b=this.idx_end.row-this.idx_start.row+1,c=this.idx_end.col-this.idx_start.col+1,e=this.idx_start.row,f=this.idx_end.row;f>=e;e++)for(var g=this.idx_start.col,h=this.idx_end.col;h>=g;g++)e==this.idx_start.row&&g==this.idx_start.col?(b>1&&this.map[e][g].el.setAttribute("rowspan",b),c>1&&this.map[e][g].el.setAttribute("colspan",c)):(/^\s*
\s*$/.test(this.map[e][g].el.innerHTML.toLowerCase())||(this.map[this.idx_start.row][this.idx_start.col].el.innerHTML+=" "+this.map[e][g].el.innerHTML),d(this.map[e][g].el));this.rectify()}else window.console&&console.log("Do not know how to merge allready merged cells.")},collapseCellToNextRow:function(a){var b=this.getMapIndex(a.el),c=b.row+1,d={row:c,col:b.col};if(c=0)e(this.getRowCells(f)[h],a.el);else{var i=this.getLastNewCellOnRow(f,c);null!==i?e(i,a.el):f.insertBefore(a.el,f.firstChild)}parseInt(g.getAttribute(a.el,"rowspan"),10)>2?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)-1):a.el.removeAttribute("rowspan")}}},removeRowCell:function(a){a.isReal?a.isRowspan?this.collapseCellToNextRow(a):d(a.el):parseInt(g.getAttribute(a.el,"rowspan"),10)>2?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)-1):a.el.removeAttribute("rowspan")},getRowElementsByCell:function(){var a=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=this.map[this.idx.row],c=0,d=b.length;d>c;c++)b[c].isReal&&a.push(b[c].el);return a},getColumnElementsByCell:function(){var a=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=0,c=this.map.length;c>b;b++)this.map[b][this.idx.col]&&this.map[b][this.idx.col].isReal&&a.push(this.map[b][this.idx.col].el);return a},removeRow:function(){var a=g.getParentElement(this.cell,{query:"tr"});if(a){if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=this.map[this.idx.row],c=0,e=b.length;e>c;c++)b[c].modified||(this.setCellAsModified(b[c]),this.removeRowCell(b[c]));d(a)}},removeColCell:function(a){a.isColspan?parseInt(g.getAttribute(a.el,"colspan"),10)>2?a.el.setAttribute("colspan",parseInt(g.getAttribute(a.el,"colspan"),10)-1):a.el.removeAttribute("colspan"):a.isReal&&d(a.el)},removeColumn:function(){if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var a=0,b=this.map.length;b>a;a++)this.map[a][this.idx.col].modified||(this.setCellAsModified(this.map[a][this.idx.col]),this.removeColCell(this.map[a][this.idx.col]))},remove:function(a){if(this.rectify()){switch(a){case"row":this.removeRow();break;case"column":this.removeColumn()}this.rectify()}},addRow:function(a){var b=this.table.ownerDocument;if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),"below"==a&&g.getAttribute(this.cell,"rowspan")&&(this.idx.row=this.idx.row+parseInt(g.getAttribute(this.cell,"rowspan"),10)-1),this.idx!==!1){for(var c=this.map[this.idx.row],d=b.createElement("tr"),f=0,h=c.length;h>f;f++)c[f].modified||(this.setCellAsModified(c[f]),this.addRowCell(c[f],d,a));switch(a){case"below":e(this.getRealRowEl(!0),d);break;case"above":var i=g.getParentElement(this.map[this.idx.row][this.idx.col].el,{query:"tr"});i&&i.parentNode.insertBefore(d,i)}}},addRowCell:function(a,b,d){var e=a.isColspan?{colspan:g.getAttribute(a.el,"colspan")}:null;a.isReal?"above"!=d&&a.isRowspan?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)+1):b.appendChild(this.createCells("td",1,e)):"above"!=d&&a.isRowspan&&a.lastRow?b.appendChild(this.createCells("td",1,e)):c.isRowspan&&a.el.attr("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)+1)},add:function(a){this.rectify()&&(("below"==a||"above"==a)&&this.addRow(a),("before"==a||"after"==a)&&this.addColumn(a))},addColCell:function(a,b,d){var f,h=a.el.tagName.toLowerCase();switch(d){case"before":f=!a.isColspan||a.firstCol;break;case"after":f=!a.isColspan||a.lastCol||a.isColspan&&c.el==this.cell}if(f){switch(d){case"before":a.el.parentNode.insertBefore(this.createCells(h,1),a.el);break;case"after":e(a.el,this.createCells(h,1))}a.isRowspan&&this.handleCellAddWithRowspan(a,b+1,d)}else a.el.setAttribute("colspan",parseInt(g.getAttribute(a.el,"colspan"),10)+1)},addColumn:function(a){var b,c;if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),"after"==a&&g.getAttribute(this.cell,"colspan")&&(this.idx.col=this.idx.col+parseInt(g.getAttribute(this.cell,"colspan"),10)-1),this.idx!==!1)for(var d=0,e=this.map.length;e>d;d++)b=this.map[d],b[this.idx.col]&&(c=b[this.idx.col],c.modified||(this.setCellAsModified(c),this.addColCell(c,d,a)))},handleCellAddWithRowspan:function(a,b,c){for(var d,h,i,j=parseInt(g.getAttribute(this.cell,"rowspan"),10)-1,k=g.getParentElement(a.el,{query:"tr"}),l=a.el.tagName.toLowerCase(),m=this.table.ownerDocument,n=0;j>n;n++)if(d=this.correctColIndexForUnreals(this.idx.col,b+n),k=f(k,"tr"))if(d>0)switch(c){case"before":h=this.getRowCells(k),d>0&&this.map[b+n][this.idx.col].el!=h[d]&&d==h.length-1?e(h[d],this.createCells(l,1)):h[d].parentNode.insertBefore(this.createCells(l,1),h[d]);break;case"after":e(this.getRowCells(k)[d],this.createCells(l,1))}else k.insertBefore(this.createCells(l,1),k.firstChild);else i=m.createElement("tr"),i.appendChild(this.createCells(l,1)),this.table.appendChild(i)}},g.table={getCellsBetween:function(a,b){var c=new i(a);return c.getMapElsTo(b)},addCells:function(a,b){var c=new i(a);c.add(b)},removeCells:function(a,b){var c=new i(a);c.remove(b)},mergeCellsBetween:function(a,b){var c=new i(a);c.merge(b)},unmergeCell:function(a){var b=new i(a);b.unmerge()},orderSelectionEnds:function(a,b){var c=new i(a);return c.orderSelectionEnds(b)},indexOf:function(a){var b=new i(a);return b.setTableMap(),b.getMapIndex(a)},findCell:function(a,b){var c=new i(null,a);return c.getElementAtIndex(b)},findRowByCell:function(a){var b=new i(a);return b.getRowElementsByCell()},findColumnByCell:function(a){var b=new i(a);return b.getColumnElementsByCell()},canMerge:function(a,b){var c=new i(a);return c.canMerge(b)}}}(wysihtml5),wysihtml5.dom.query=function(a,b){var c,d=[];a.nodeType&&(a=[a]);for(var e=0,f=a.length;f>e;e++)if(c=a[e].querySelectorAll(b))for(var g=c.length;g--;d.unshift(c[g]));return d},wysihtml5.dom.compareDocumentPosition=function(){var a=document.documentElement;return a.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)}:function(a,b){var c,d;if(c=9===a.nodeType?a:a.ownerDocument,d=9===b.nodeType?b:b.ownerDocument,a===b)return 0;if(a===b.ownerDocument)return 20;if(a.ownerDocument===b)return 10;if(c!==d)return 1;if(2===a.nodeType&&a.childNodes&&-1!==wysihtml5.lang.array(a.childNodes).indexOf(b))return 20;if(2===b.nodeType&&b.childNodes&&-1!==wysihtml5.lang.array(b.childNodes).indexOf(a))return 10;for(var e=a,f=[],g=null;e;){if(e==b)return 10;f.push(e),e=e.parentNode}for(e=b,g=null;e;){if(e==a)return 20;var h=wysihtml5.lang.array(f).indexOf(e);if(-1!==h){var i=f[h],j=wysihtml5.lang.array(i.childNodes).indexOf(f[h-1]),k=wysihtml5.lang.array(i.childNodes).indexOf(g);return j>k?2:4}g=e,e=e.parentNode}return 1}}(),wysihtml5.dom.unwrap=function(a){var b=[];if(a.parentNode){for(;a.lastChild;)b.unshift(a.lastChild),wysihtml5.dom.insert(a.lastChild).after(a);a.parentNode.removeChild(a)}return b},wysihtml5.dom.getPastedHtml=function(a){var b;return a.clipboardData&&(wysihtml5.lang.array(a.clipboardData.types).contains("text/html")?b=a.clipboardData.getData("text/html"):wysihtml5.lang.array(a.clipboardData.types).contains("text/plain")&&(b=wysihtml5.lang.string(a.clipboardData.getData("text/plain")).escapeHTML(!0,!0))),b},wysihtml5.dom.getPastedHtmlWithDiv=function(a,b){var c=a.selection.getBookmark(),d=a.element.ownerDocument,e=d.createElement("DIV"),f=a.getScrollPos();d.body.appendChild(e),e.style.width="1px",e.style.height="1px",e.style.overflow="hidden",e.style.position="absolute",e.style.top=f.y+"px",e.style.left=f.x+"px",e.setAttribute("contenteditable","true"),e.focus(),setTimeout(function(){var d;a.selection.setBookmark(c),d=e.innerHTML,d&&/^
$/i.test(d.trim())&&(d=!1),b(d),e.parentNode.removeChild(e)},0)},wysihtml5.dom.removeInvisibleSpaces=function(a){for(var b=wysihtml5.dom.getTextNodes(a),c=b.length;c--;)b[c].nodeValue=b[c].nodeValue.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")},wysihtml5.quirks.cleanPastedHTML=function(){var a=function(a){var b=wysihtml5.lang.string(a).trim(),c=b.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");return new RegExp("^((?!^"+c+"$).)*$","i")},b=function(b,c){var d,e,f=wysihtml5.lang.object(b).clone(!0);for(d in f.tags)if(f.tags.hasOwnProperty(d)&&f.tags[d].keep_styles)for(e in f.tags[d].keep_styles)f.tags[d].keep_styles.hasOwnProperty(e)&&c[e]&&(f.tags[d].keep_styles[e]=a(c[e]));return f},c=function(a,b){var c;if(!a)return null;for(var d=0,e=a.length;e>d;d++)if(a[d].condition||(c=a[d].set),a[d].condition&&a[d].condition.test(b))return a[d].set;return c};return function(a,d){var e,f={color:wysihtml5.dom.getStyle("color").from(d.referenceNode),fontSize:wysihtml5.dom.getStyle("font-size").from(d.referenceNode)},g=b(c(d.rules,a)||{},f);return e=wysihtml5.dom.parse(a,{rules:g,cleanUp:!0,context:d.referenceNode.ownerDocument,uneditableClass:d.uneditableClass,clearInternals:!0,unjoinNbsps:!0})}}(),wysihtml5.quirks.ensureProperClearing=function(){var a=function(){var a=this;setTimeout(function(){var b=a.innerHTML.toLowerCase();("
"==b||"
"==b)&&(a.innerHTML="")},0)};return function(b){wysihtml5.dom.observe(b.element,["cut","keydown"],a)}}(),function(a){var b="%7E";a.quirks.getCorrectInnerHTML=function(c){var d=c.innerHTML;if(-1===d.indexOf(b))return d;var e,f,g,h,i=c.querySelectorAll("[href*='~'], [src*='~']");for(h=0,g=i.length;g>h;h++)e=i[h].href||i[h].src,f=a.lang.string(e).replace("~").by(b),d=a.lang.string(d).replace(f).by(e);return d}}(wysihtml5),function(a){var b="wysihtml5-quirks-redraw";a.quirks.redraw=function(c){a.dom.addClass(c,b),a.dom.removeClass(c,b);try{var d=c.ownerDocument;d.execCommand("italic",!1,null),d.execCommand("italic",!1,null)}catch(e){}}}(wysihtml5),wysihtml5.quirks.tableCellsSelection=function(a,b){function c(){return a.addEventListener("mousedown",n),l}function d(c){l.start=c,l.end=c,l.cells=[c],l.table=k.getParentElement(l.start,{query:"table"},!1,a),l.table&&(e(),k.addClass(c,m),a.addEventListener("mousemove",g),a.addEventListener("mouseup",h),b.fire("tableselectstart").fire("tableselectstart:composer"))}function e(){if(a){var b=a.querySelectorAll("."+m);if(b.length>0)for(var c=0;c1&&b.composer.selection.deselect(),f(l.cells),l.end!==d&&b.fire("tableselectchange").fire("tableselectchange:composer")))}function h(c){a.removeEventListener("mousemove",g),a.removeEventListener("mouseup",h),b.fire("tableselect").fire("tableselect:composer"),setTimeout(function(){i()},0)}function i(){a.ownerDocument.addEventListener("click",o)}function j(c,d){l.start=c,l.end=d,l.table=k.getParentElement(l.start,{query:"table"},!1,a),selectedCells=k.table.getCellsBetween(l.start,l.end),f(selectedCells),i(),b.fire("tableselect").fire("tableselect:composer")}var k=wysihtml5.dom,l={table:null,start:null,end:null,cells:null,select:j},m="wysiwyg-tmp-selected-cell",n=function(b){var c=wysihtml5.dom.getParentElement(b.target,{query:"td, th"},!1,a);c&&d(c)},o=function(c){a.ownerDocument.removeEventListener("click",o),k.getParentElement(c.target,{query:"table"},!1,a)!=l.table&&(e(),l.table=null,l.start=null,l.end=null,b.fire("tableunselect").fire("tableunselect:composer"))};return c()},function(a){function b(a){var b,c;for(b in d)if(d.hasOwnProperty(b)&&(c=d[b],c.regex.test(a)))return c}function c(a){var c=b(a);return c?c.name:void 0}var d={rgba:{regex:/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([\d\.]+)\s*\)/i,name:"rgba"},rgb:{regex:/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/i,name:"rgb"},hex6:{regex:/^#([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])/i,name:"hex",radix:16},hex3:{regex:/^#([0-9a-f])([0-9a-f])([0-9a-f])/i,name:"hex",radix:16}},e=function(a){return new RegExp("(^|\\s|;)"+a+"\\s*:\\s*[^;$]+","gi")};a.quirks.styleParser={getColorParseMethod:b,getColorFormat:c,parseColor:function(c,f){var g,h,i,j,k,l=c;if(f){if(g=e(f),!(h=c.match(g)))return!1;h=h.pop().split(":")[1],l=a.lang.string(h).trim()}return(i=b(l))&&(j=l.match(i.regex))?(k=i.radix||10,i===d.hex3?(j.shift(),j.push(1),a.lang.array(j).map(function(a,b){return 3>b?parseInt(a,k)*k+parseInt(a,k):parseFloat(a)})):(j.shift(),j[3]||j.push(1),a.lang.array(j).map(function(a,b){return 3>b?parseInt(a,k):parseFloat(a)}))):!1},unparseColor:function(a,b){var c=16;return"hex"===b?(a[0].toString(c)+a[1].toString(c)+a[2].toString(c)).toUpperCase():"hash"===b?"#"+(a[0].toString(c)+a[1].toString(c)+a[2].toString(c)).toUpperCase():"rgb"===b?"rgb("+a[0]+","+a[1]+","+a[2]+")":"rgba"===b?"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")":"csv"===b?a[0]+","+a[1]+","+a[2]+","+a[3]:a[3]&&1!==a[3]?"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")":"rgb("+a[0]+","+a[1]+","+a[2]+")"},parseFontSize:function(b){var c=b.match(e("font-size"));return c?a.lang.string(c[c.length-1].split(":")[1]).trim():!1}}}(wysihtml5),function(a){function b(a){var b=0;if(a.parentNode)do b+=a.offsetTop||0,a=a.offsetParent;while(a);return b}function c(a,b){for(var c=0;b!==a;)if(c++,b=b.parentNode,!b)throw new Error("not a descendant of ancestor!");return c}function d(b){var c=document.createElement("span"),d=function(a){b.removeEventListener("mouseup",d),b.removeEventListener("keydown",d),b.removeEventListener("touchstart",d),b.removeEventListener("focus",d),b.removeEventListener("blur",d),b.removeEventListener("paste",e),b.removeEventListener("drop",e),b.removeEventListener("beforepaste",e),c&&c.parentNode&&c.parentNode.removeChild(c)},e=function(a){c&&c.parentNode&&setTimeout(d,0)};return c.appendChild(document.createTextNode(a.INVISIBLE_SPACE)),c.className="_wysihtml5-temp-caret-fix",c.style.display="block",c.style.minWidth="1px",c.style.height="0px",b.addEventListener("mouseup",d),b.addEventListener("keydown",d),b.addEventListener("touchstart",d),b.addEventListener("focus",d),b.addEventListener("blur",d),b.addEventListener("paste",e),b.addEventListener("drop",e),b.addEventListener("beforepaste",e),c}function e(a){if(!a.canSurroundContents())for(var b=a.commonAncestorContainer,d=c(b,a.startContainer),e=c(b,a.endContainer);!a.canSurroundContents();)d>e?(a.setStartBefore(a.startContainer),d=c(b,a.startContainer)):(a.setEndAfter(a.endContainer),e=c(b,a.endContainer))}var f=a.dom;a.Selection=Base.extend({constructor:function(a,b,c){window.rangy.init(),this.editor=a,this.composer=a.composer,this.doc=this.composer.doc,this.win=this.composer.win,this.contain=b,this.unselectableClass=c||!1},getBookmark:function(){var a=this.getRange();return a&&a.cloneRange()},setBookmark:function(a){a&&this.setSelection(a)},setBefore:function(a){var b=rangy.createRange(this.doc);return b.setStartBefore(a),b.setEndBefore(a),this.setSelection(b)},createTemporaryCaretSpaceAfter:function(b){var c=this.doc.createElement("span"),d=this.doc.createTextNode(a.INVISIBLE_SPACE),e=function(b){var d;this.contain.removeEventListener("mouseup",e),this.contain.removeEventListener("keydown",g),this.contain.removeEventListener("touchstart",e),this.contain.removeEventListener("focus",e),this.contain.removeEventListener("blur",e),this.contain.removeEventListener("paste",f),this.contain.removeEventListener("drop",f),this.contain.removeEventListener("beforepaste",f),c&&c.parentNode&&(c.innerHTML=c.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),/[^\s]+/.test(c.innerHTML)?(d=c.lastChild,a.dom.unwrap(c),this.setAfter(d)):c.parentNode.removeChild(c))}.bind(this),f=function(a){c&&c.parentNode&&setTimeout(e,0)},g=function(a){8===a.which||91===a.which||17===a.which||86===a.which&&(a.ctrlKey||a.metaKey)||e()};return c.className="_wysihtml5-temp-caret-fix",c.style.position="absolute",c.style.display="block",c.style.minWidth="1px",c.style.zIndex="99999",c.appendChild(d),b.parentNode.insertBefore(c,b.nextSibling),this.setBefore(d),this.contain.addEventListener("mouseup",e),this.contain.addEventListener("keydown",g),this.contain.addEventListener("touchstart",e),this.contain.addEventListener("focus",e),this.contain.addEventListener("blur",e),this.contain.addEventListener("paste",f),this.contain.addEventListener("drop",f),this.contain.addEventListener("beforepaste",f),c},setAfter:function(b,c,d){var e,f=this.win,g=rangy.createRange(this.doc),h=function(){var d=b.parentNode,g=d?d.childNodes[d.childNodes.length-1]:null;if(!e||g===b&&1===b.nodeType&&"block"===f.getComputedStyle(b).display)if(c){var h=this.doc.createTextNode(a.INVISIBLE_SPACE);b.parentNode.insertBefore(h,b.nextSibling),this.selectNode(h),setTimeout(function(){h&&h.parentNode&&h.parentNode.removeChild(h)},0)}else this.createTemporaryCaretSpaceAfter(b)}.bind(this);if(g.setStartAfter(b),g.setEndAfter(b),document.activeElement&&document.activeElement===this.composer.element)e=this.setSelection(g),h(),d&&d(e);else{var i=this.composer.getScrollPos();this.composer.element.focus(),this.composer.setScrollPos(i),setTimeout(function(){e=this.setSelection(g),h(),d&&d(e)}.bind(this),0)}},selectNode:function(b,c){var d=rangy.createRange(this.doc),e=b.nodeType===a.ELEMENT_NODE,g="canHaveHTML"in b?b.canHaveHTML:"IMG"!==b.nodeName,h=e?b.innerHTML:b.data,i=""===h||h===a.INVISIBLE_SPACE,j=f.getStyle("display").from(b),k="block"===j||"list-item"===j;if(i&&e&&g&&!c)try{b.innerHTML=a.INVISIBLE_SPACE}catch(l){}g?d.selectNodeContents(b):d.selectNode(b),g&&i&&e?d.collapse(k):g&&i&&(d.setStartAfter(b),d.setEndAfter(b)),this.setSelection(d)},getSelectedNode:function(a){var b,c;return a&&this.doc.selection&&"Control"===this.doc.selection.type&&(c=this.doc.selection.createRange(),c&&c.length)?c.item(0):(b=this.getSelection(this.doc),b.focusNode===b.anchorNode?b.focusNode:(c=this.getRange(this.doc),c?c.commonAncestorContainer:this.doc.body))},fixSelBorders:function(){var a=this.getRange();e(a),this.setSelection(a)},getSelectedOwnNodes:function(a){for(var b=this.getOwnRanges(),c=[],d=0,e=b.length;e>d;d++)c.push(b[d].commonAncestorContainer||this.doc.body);return c},findNodesInSelection:function(b){for(var c,d=this.getOwnRanges(),e=[],f=0,g=d.length;g>f;f++)c=d[f].getNodes([1],function(c){return a.lang.array(b).contains(c.nodeName)}),e=e.concat(c);return e},filterElements:function(a){for(var b,c=this.getOwnRanges(),d=[],e=0,f=c.length;f>e;e++)b=c[e].getNodes([1],function(b){return a(b,c[e])}),d=d.concat(b);return d},containsUneditable:function(){for(var a=this.getOwnUneditables(),b=this.getSelection(),c=0,d=a.length;d>c;c++)if(b.containsNode(a[c]))return!0;return!1},deleteContents:function(){var b,c,d,e,f=this.getRange();if(this.unselectableClass){(b=a.dom.getParentElement(f.startContainer,{query:"."+this.unselectableClass},!1,this.contain))&&f.setStartBefore(b),(c=a.dom.getParentElement(f.endContainer,{query:"."+this.unselectableClass},!1,this.contain))&&f.setEndAfter(c),d=f.getNodes([1],function(b){return a.dom.hasClass(b,this.unselectableClass)}.bind(this));for(var g=d.length;g--;)try{e=new CustomEvent("wysihtml5:uneditable:delete"),d[g].dispatchEvent(e)}catch(h){}}f.deleteContents(),this.setSelection(f)},getPreviousNode:function(b,c){var d;if(!b){var e=this.getSelection();b=e.anchorNode}if(b===this.contain)return!1;var f,g=b.previousSibling;return g===this.contain?!1:(g&&3!==g.nodeType&&1!==g.nodeType?g=this.getPreviousNode(g,c):g&&3===g.nodeType&&/^\s*$/.test(g.textContent)?g=this.getPreviousNode(g,c):c&&g&&1===g.nodeType?(d=a.dom.getStyle("display").from(g),a.lang.array(["BR","HR","IMG"]).contains(g.nodeName)||a.lang.array(["block","inline-block","flex","list-item","table"]).contains(d)||!/^[\s]*$/.test(g.innerHTML)||(g=this.getPreviousNode(g,c))):g||b===this.contain||(f=b.parentNode,f!==this.contain&&(g=this.getPreviousNode(f,c))),g!==this.contain?g:!1)},getSelectionParentsByTag:function(b){for(var c,d=this.getSelectedOwnNodes(),e=[],f=0,g=d.length;g>f;f++)c=d[f].nodeName&&"LI"===d[f].nodeName?d[f]:a.dom.getParentElement(d[f],{query:"li"},!1,this.contain),c&&e.push(c);return e.length?e:null},getRangeToNodeEnd:function(){if(this.isCollapsed()){var a=this.getRange(),b=a.startContainer,c=a.startOffset,d=rangy.createRange(this.doc);return d.selectNodeContents(b),d.setStart(b,c),d}},caretIsLastInSelection:function(){var a=(rangy.createRange(this.doc),this.getSelection(),this.getRangeToNodeEnd().cloneContents()),b=a.textContent;return/^\s*$/.test(b)},caretIsFirstInSelection:function(){var b=rangy.createRange(this.doc),c=this.getSelection(),d=this.getRange(),e=d.startContainer;return e?e.nodeType===a.TEXT_NODE?this.isCollapsed()&&e.nodeType===a.TEXT_NODE&&/^\s*$/.test(e.data.substr(0,d.startOffset)):(b.selectNodeContents(this.getRange().commonAncestorContainer),b.collapse(!0),this.isCollapsed()&&(b.startContainer===c.anchorNode||b.endContainer===c.anchorNode)&&b.startOffset===c.anchorOffset):void 0},caretIsInTheBeginnig:function(b){var c=this.getSelection(),d=c.anchorNode,e=c.anchorOffset;return b&&d?0===e&&(d.nodeName&&d.nodeName===b.toUpperCase()||a.dom.getParentElement(d.parentNode,{query:b},1)):d?0===e&&!this.getPreviousNode(d,!0):void 0},getBeforeSelection:function(b){var c,d,e=this.getSelection(),f=e.isBackwards()?e.focusNode:e.anchorNode,g=e.isBackwards()?e.focusOffset:e.anchorOffset,h=this.createRange();if(d=a.dom.getParentElement(f,{query:"._wysihtml5-temp-caret-fix"},1),d&&(f=d.parentNode,g=Array.prototype.indexOf.call(f.childNodes,d)),f){if(g>0)return 3===f.nodeType?(h.setStart(f,0),h.setEnd(f,g),{type:"text",range:h,offset:g,node:f}):(h.setStartBefore(f.childNodes[0]),c=f.childNodes[g-1],h.setEndAfter(c),{type:"element",range:h,offset:g,node:c});if(h.setStartAndEnd(f,0),b){var i=this.getPreviousNode(f,!0),j=null;if(i&&(j=1===i.nodeType&&a.dom.hasClass(i,this.unselectableClass)?i:a.dom.domNode(i).lastLeafNode()),j)return{type:"leafnode",range:h,offset:g,node:j}}return{type:"none",range:h,offset:g,node:f}}return null},executeAndRestoreRangy:function(a,b){var c=rangy.saveSelection(this.win);if(c)try{a()}catch(d){setTimeout(function(){throw d},0)}else a();rangy.restoreSelection(c)},executeAndRestore:function(b,c){var d,e,g,h,i,j,k,l,m=this.doc.body,n=c&&m.scrollTop,o=c&&m.scrollLeft,p="_wysihtml5-temp-placeholder",q=''+a.INVISIBLE_SPACE+"",r=this.getRange(!0);if(!r)return void b(m,m);r.collapsed||(k=r.cloneRange(),j=k.createContextualFragment(q),k.collapse(!1),k.insertNode(j),k.detach()),i=r.createContextualFragment(q),r.insertNode(i),j&&(d=this.contain.querySelectorAll("."+p),r.setStartBefore(d[0]),r.setEndAfter(d[d.length-1])),this.setSelection(r);try{b(r.startContainer,r.endContainer)}catch(s){setTimeout(function(){throw s},0)}if(d=this.contain.querySelectorAll("."+p),d&&d.length){l=rangy.createRange(this.doc),g=d[0].nextSibling,d.length>1&&(h=d[d.length-1].previousSibling),h&&g?(l.setStartBefore(g),l.setEndAfter(h)):(e=this.doc.createTextNode(a.INVISIBLE_SPACE),f.insert(e).after(d[0]),l.setStartBefore(e),l.setEndAfter(e)),this.setSelection(l);for(var t=d.length;t--;)d[t].parentNode.removeChild(d[t])}else this.contain.focus();c&&(m.scrollTop=n,m.scrollLeft=o);try{d.parentNode.removeChild(d)}catch(u){}},set:function(a,b){var c=rangy.createRange(this.doc);c.setStart(a,b||0),this.setSelection(c)},insertHTML:function(a){var b,c=(rangy.createRange(this.doc),this.doc.createElement("DIV")),d=this.doc.createDocumentFragment();for(c.innerHTML=a,b=c.lastChild;c.firstChild;)d.appendChild(c.firstChild);this.insertNode(d),b&&this.setAfter(b)},insertNode:function(a){var b=this.getRange();b&&b.insertNode(a)},canAppendChild:function(a){var b,c,d=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],e=this.getRange();return b=a||e.startContainer,b&&(c=(b.tagName||b.nodeName).toLowerCase()),-1===d.indexOf(c)},splitElementAtCaret:function(b,c){var d,e,f,g,h,i=this.getSelection();if(i.rangeCount>0){d=i.getRangeAt(0).cloneRange(),d.setEndAfter(b),e=d.extractContents(),h=e.childNodes;for(var j=h.length;j--;)a.dom.domNode(h[j]).is.visible()||e.removeChild(h[j]);b.parentNode.insertBefore(e,b.nextSibling),c?(f=c.firstChild||c,g=c.lastChild||c,b.parentNode.insertBefore(c,b.nextSibling),f&&g&&(d.setStartBefore(f),d.setEndAfter(g),this.setSelection(d))):(d.setStartAfter(b),d.setEndAfter(b)),a.dom.domNode(b).is.visible()||(""===a.dom.getTextContent(b)?b.parentNode.removeChild(b):b.parentNode.replaceChild(this.doc.createTextNode(" "),b))}},surround:function(a){var b,c=this.getOwnRanges(),d=[];if(0==c.length)return d;for(var e=c.length;e--;){b=this.doc.createElement(a.nodeName),d.push(b),a.className&&(b.className=a.className),a.cssStyle&&b.setAttribute("style",a.cssStyle);try{c[e].surroundContents(b),this.selectNode(b)}catch(f){b.appendChild(c[e].extractContents()),c[e].insertNode(b)}}return d},deblockAndSurround:function(b){var c,d,e,f=this.doc.createElement("div"),g=rangy.createRange(this.doc);if(f.className=b.className,this.composer.commands.exec("formatBlock",b),c=this.contain.querySelectorAll("."+b.className),c[0])for(c[0].parentNode.insertBefore(f,c[0]),g.setStartBefore(c[0]),g.setEndAfter(c[c.length-1]),d=g.extractContents();d.firstChild;)if(e=d.firstChild,1==e.nodeType&&a.dom.hasClass(e,b.className)){for(;e.firstChild;)f.appendChild(e.firstChild);"BR"!==e.nodeName&&f.appendChild(this.doc.createElement("br")),d.removeChild(e)}else f.appendChild(e);else f=null;return f},scrollIntoView:function(){var c,d=this.doc,e=5,f=d.documentElement.scrollHeight>d.documentElement.offsetHeight,g=d._wysihtml5ScrollIntoViewElement=d._wysihtml5ScrollIntoViewElement||function(){var b=d.createElement("span");
+return b.innerHTML=a.INVISIBLE_SPACE,b}();f&&(this.insertNode(g),c=b(g),g.parentNode.removeChild(g),c>=d.body.scrollTop+d.documentElement.offsetHeight-e&&(d.body.scrollTop=c))},selectLine:function(){a.browser.supportsSelectionModify()?this._selectLine_W3C():this.doc.selection&&this._selectLine_MSIE()},_selectLine_W3C:function(){var a=this.win.getSelection();a.modify("move","left","lineboundary"),a.modify("extend","right","lineboundary")},toLineBoundary:function(b,c){if(c="undefined"==typeof c?!1:c,a.browser.supportsSelectionModify()){var d=this.win.getSelection();d.modify("extend",b,"lineboundary"),c&&("left"===b?d.collapseToStart():"right"===b&&d.collapseToEnd())}},_selectLine_MSIE:function(){var a,b,c,d,e,f=this.doc.selection.createRange(),g=f.boundingTop,h=this.doc.body.scrollWidth;if(f.moveToPoint){for(0===g&&(c=this.doc.createElement("span"),this.insertNode(c),g=c.offsetTop,c.parentNode.removeChild(c)),g+=1,d=-10;h>d;d+=2)try{f.moveToPoint(d,g);break}catch(i){}for(a=g,b=this.doc.selection.createRange(),e=h;e>=0;e--)try{b.moveToPoint(e,a);break}catch(j){}f.setEndPoint("EndToEnd",b),f.select()}},getText:function(){var a=this.getSelection();return a?a.toString():""},getNodes:function(a,b){var c=this.getRange();return c?c.getNodes(Array.isArray(a)?a:[a],b):[]},getOwnNodes:function(a,b,c){for(var d=this.getOwnRanges(),e=[],f=0,g=d.length;g>f;f++)d[f]&&(c&&d[f].splitBoundaries(),e=e.concat(d[f].getNodes(Array.isArray(a)?a:[a],b)));return e},fixRangeOverflow:function(a){if(this.contain&&this.contain.firstChild&&a){var b=a.compareNode(this.contain);if(2!==b)1===b&&a.setStartBefore(this.contain.firstChild),0===b&&a.setEndAfter(this.contain.lastChild),3===b&&(a.setStartBefore(this.contain.firstChild),a.setEndAfter(this.contain.lastChild));else if(this._detectInlineRangeProblems(a)){var c=a.endContainer.previousElementSibling;c&&a.setEnd(c,this._endOffsetForNode(c))}}},_endOffsetForNode:function(a){var b=document.createRange();return b.selectNodeContents(a),b.endOffset},_detectInlineRangeProblems:function(a){var b=f.compareDocumentPosition(a.startContainer,a.endContainer);return 0==a.endOffset&&4&b},getRange:function(a){var b=this.getSelection(),c=b&&b.rangeCount&&b.getRangeAt(0);return a!==!0&&this.fixRangeOverflow(c),c},getOwnUneditables:function(){var b=f.query(this.contain,"."+this.unselectableClass),c=f.query(b,"."+this.unselectableClass);return a.lang.array(b).without(c)},getOwnRanges:function(){var a,b=[],c=this.getRange();if(c&&b.push(c),this.unselectableClass&&this.contain&&c){var d,e=this.getOwnUneditables();if(e.length>0)for(var f=0,g=e.length;g>f;f++){a=[];for(var h=0,i=b.length;i>h;h++){if(b[h])switch(b[h].compareNode(e[f])){case 2:break;case 3:d=b[h].cloneRange(),d.setEndBefore(e[f]),a.push(d),d=b[h].cloneRange(),d.setStartAfter(e[f]),a.push(d);break;default:a.push(b[h])}b=a}}}return b},getSelection:function(){return rangy.getSelection(this.win)},setSelection:function(a){var b=rangy.getSelection(this.win);return b.setSingleRange(a),b&&b.anchorNode&&b.focusNode?b:null},selectAll:function(){var b,c=this.createRange(),e=this.composer,f=this,g=d(this.composer.element),h=d(this.composer.element),i=function(){c.setStart(e.element,0),c.setEnd(e.element,e.element.childNodes.length),b=f.setSelection(c)},j=function(){return!b||b.nativeSelection&&b.nativeSelection.type&&("Caret"===b.nativeSelection.type||"None"===b.nativeSelection.type)};a.dom.removeInvisibleSpaces(this.composer.element),i(),this.composer.element.firstChild&&j()&&(this.composer.element.appendChild(g),i(),j()&&(g.parentNode.removeChild(g),this.composer.element.insertBefore(h,this.composer.element.firstChild),i(),j()&&(this.composer.element.appendChild(g),i())))},createRange:function(){return rangy.createRange(this.doc)},isCollapsed:function(){return this.getSelection().isCollapsed},getHtml:function(){return this.getSelection().toHtml()},getPlainText:function(){return this.getSelection().toString()},isEndToEndInNode:function(b){var c=this.getRange(),d=c.commonAncestorContainer,e=c.startContainer,f=c.endContainer;if(d.nodeType===a.TEXT_NODE&&(d=d.parentNode),e.nodeType===a.TEXT_NODE&&!/^\s*$/.test(e.data.substr(c.startOffset)))return!1;if(f.nodeType===a.TEXT_NODE&&!/^\s*$/.test(f.data.substr(c.endOffset)))return!1;for(;e&&e!==d;){if(e.nodeType!==a.TEXT_NODE&&!a.dom.contains(d,e))return!1;if(a.dom.domNode(e).prev({ignoreBlankTexts:!0}))return!1;e=e.parentNode}for(;f&&f!==d;){if(f.nodeType!==a.TEXT_NODE&&!a.dom.contains(d,f))return!1;if(a.dom.domNode(f).next({ignoreBlankTexts:!0}))return!1;f=f.parentNode}return a.lang.array(b).contains(d.nodeName)?d:!1},isInThisEditable:function(){var b=this.getSelection(),c=b.focusNode,d=b.anchorNode;return c&&1!==c.nodeType&&(c=c.parentNode),d&&1!==d.nodeType&&(d=d.parentNode),d&&c&&(a.dom.contains(this.composer.element,c)||this.composer.element===c)&&(a.dom.contains(this.composer.element,d)||this.composer.element===d)},deselect:function(){var a=this.getSelection();a&&a.removeAllRanges()}})}(wysihtml5),function(a,b){function c(a,b,c){if(!a.className)return!1;var d=a.className.match(c)||[];return d[d.length-1]===b}function d(a,b){if(!a.getAttribute||!a.getAttribute("style"))return!1;a.getAttribute("style").match(b);return a.getAttribute("style").match(b)?!0:!1}function e(a,b,c){a.getAttribute("style")?(h(a,c),a.getAttribute("style")&&!/^\s*$/.test(a.getAttribute("style"))?a.setAttribute("style",b+";"+a.getAttribute("style")):a.setAttribute("style",b)):a.setAttribute("style",b)}function f(a,b,c){a.className?(g(a,c),a.className+=" "+b):a.className=b}function g(a,b){a.className&&(a.className=a.className.replace(b,""))}function h(a,b){var c,d=[];if(a.getAttribute("style")){c=a.getAttribute("style").split(";");for(var e=c.length;e--;)c[e].match(b)||/^\s*$/.test(c[e])||d.push(c[e]);d.length?a.setAttribute("style",d.join(";")):a.removeAttribute("style")}}function i(a,b){var c=[],d=b.split(";"),e=a.getAttribute("style");if(e){e=e.replace(/\s/gi,"").toLowerCase(),c.push(new RegExp("(^|\\s|;)"+b.replace(/\s/gi,"").replace(/([\(\)])/gi,"\\$1").toLowerCase().replace(";",";?").replace(/rgb\\\((\d+),(\d+),(\d+)\\\)/gi,"\\s?rgb\\($1,\\s?$2,\\s?$3\\)"),"gi"));for(var f=d.length;f-->0;)/^\s*$/.test(d[f])||c.push(new RegExp("(^|\\s|;)"+d[f].replace(/\s/gi,"").replace(/([\(\)])/gi,"\\$1").toLowerCase().replace(";",";?").replace(/rgb\\\((\d+),(\d+),(\d+)\\\)/gi,"\\s?rgb\\($1,\\s?$2,\\s?$3\\)"),"gi"));for(var g=0,h=c.length;h>g;g++)if(e.match(c[g]))return c[g]}return!1}function j(c,d,e,f){return e?i(c,e):f?a.dom.hasClass(c,f):b.dom.arrayContains(d,c.tagName.toLowerCase())}function k(a,b,c,d){for(var e=a.length;e--;)if(!j(a[e],b,c,d))return!1;return a.length?!0:!1}function l(a,b,c){var d=i(a,b);return d?(h(a,d),"remove"):(e(a,b,c),"change")}function m(a,b){return a.className.replace(u," ")==b.className.replace(u," ")}function n(a){for(var b=a.parentNode;a.firstChild;)b.insertBefore(a.firstChild,a);b.removeChild(a)}function o(a,b){if(a.attributes.length!=b.attributes.length)return!1;for(var c,d,e,f=0,g=a.attributes.length;g>f;++f)if(c=a.attributes[f],e=c.name,"class"!=e){if(d=b.attributes.getNamedItem(e),c.specified!=d.specified)return!1;if(c.specified&&c.nodeValue!==d.nodeValue)return!1}return!0}function p(a,c){return b.dom.isCharacterDataNode(a)?0==c?!!a.previousSibling:c==a.length?!!a.nextSibling:!0:c>0&&ce;++e)a=this.textNodes[e],b=a.parentNode,d[e]=a.data,e&&(b.removeChild(a),b.hasChildNodes()||b.parentNode.removeChild(b));return this.firstTextNode.data=c=d.join(""),c},getLength:function(){for(var a=this.textNodes.length,b=0;a--;)b+=this.textNodes[a].length;return b},toString:function(){for(var a=[],b=0,c=this.textNodes.length;c>b;++b)a[b]="'"+this.textNodes[b].data+"'";return"[Merge("+a.join(",")+")]"}},s.prototype={getAncestorWithClass:function(d){for(var e;d;){if(e=this.cssClass?c(d,this.cssClass,this.similarClassRegExp):""!==this.cssStyle?!1:!0,d.nodeType==a.ELEMENT_NODE&&"false"!=d.getAttribute("contenteditable")&&b.dom.arrayContains(this.tagNames,d.tagName.toLowerCase())&&e)return d;d=d.parentNode}return!1},getAncestorWithStyle:function(c){for(var e;c;){if(e=this.cssStyle?d(c,this.similarStyleRegExp):!1,c.nodeType==a.ELEMENT_NODE&&"false"!=c.getAttribute("contenteditable")&&b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase())&&e)return c;c=c.parentNode}return!1},getMatchingAncestor:function(a){var b=this.getAncestorWithClass(a),c=!1;return b?this.cssStyle&&(c="class"):(b=this.getAncestorWithStyle(a),b&&(c="style")),{element:b,type:c}},postApply:function(a,b){for(var c,d,e,f=a[0],g=a[a.length-1],h=[],i=f,j=g,k=0,l=g.length,m=0,n=a.length;n>m;++m)d=a[m],e=null,d&&d.parentNode&&(e=this.getAdjacentMergeableTextNode(d.parentNode,!1)),e?(c||(c=new r(e),h.push(c)),c.textNodes.push(d),d===f&&(i=c.firstTextNode,k=i.length),d===g&&(j=c.firstTextNode,l=c.getLength())):c=null;if(g&&g.parentNode){var o=this.getAdjacentMergeableTextNode(g.parentNode,!0);o&&(c||(c=new r(g),h.push(c)),c.textNodes.push(o))}if(h.length){for(m=0,n=h.length;n>m;++m)h[m].doMerge();b.setStart(i,k),b.setEnd(j,l)}},getAdjacentMergeableTextNode:function(b,c){var d,e=b.nodeType==a.TEXT_NODE,f=e?b.parentNode:b,g=c?"nextSibling":"previousSibling";if(e){if(d=b[g],d&&d.nodeType==a.TEXT_NODE)return d}else if(d=f[g],d&&this.areElementsMergeable(b,d))return d[c?"firstChild":"lastChild"];return null},areElementsMergeable:function(a,c){return b.dom.arrayContains(this.tagNames,(a.tagName||"").toLowerCase())&&b.dom.arrayContains(this.tagNames,(c.tagName||"").toLowerCase())&&m(a,c)&&o(a,c)},createContainer:function(a){var b=a.createElement(this.tagNames[0]);return this.cssClass&&(b.className=this.cssClass),this.cssStyle&&b.setAttribute("style",this.cssStyle),b},applyToTextNode:function(a){var c=a.parentNode;if(1==c.childNodes.length&&b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase()))this.cssClass&&f(c,this.cssClass,this.similarClassRegExp),this.cssStyle&&e(c,this.cssStyle,this.similarStyleRegExp);else{var d=this.createContainer(b.dom.getDocument(a));a.parentNode.insertBefore(d,a),d.appendChild(a)}},isRemovable:function(c){return b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase())&&""===a.lang.string(c.className).trim()&&(!c.getAttribute("style")||""===a.lang.string(c.getAttribute("style")).trim())},undoToTextNode:function(a,b,c,d){var e=c?!1:!0,f=c||d,h=!1;if(!b.containsNode(f)){var i=b.cloneRange();i.selectNode(f),i.isPointInRange(b.endContainer,b.endOffset)&&p(b.endContainer,b.endOffset)&&(q(f,b.endContainer,b.endOffset,this.container),b.setEndAfter(f)),i.isPointInRange(b.startContainer,b.startOffset)&&p(b.startContainer,b.startOffset)&&(f=q(f,b.startContainer,b.startOffset,this.container))}!e&&this.similarClassRegExp&&g(f,this.similarClassRegExp),e&&this.similarStyleRegExp&&(h="change"===l(f,this.cssStyle,this.similarStyleRegExp)),this.isRemovable(f)&&!h&&n(f)},applyToRange:function(b){for(var c,d=b.length;d--;){if(c=b[d].getNodes([a.TEXT_NODE]),!c.length)try{var e=this.createContainer(b[d].endContainer.ownerDocument);return b[d].surroundContents(e),void this.selectNode(b[d],e)}catch(f){}if(b[d].splitBoundaries(),c=b[d].getNodes([a.TEXT_NODE]),c.length){for(var g,h=0,i=c.length;i>h;++h)g=c[h],this.getMatchingAncestor(g).element||this.applyToTextNode(g);b[d].setStart(c[0],0),g=c[c.length-1],b[d].setEnd(g,g.length),this.normalize&&this.postApply(c,b[d])}}},undoToRange:function(b){for(var c,d,e,f=b.length;f--;){if(c=b[f].getNodes([a.TEXT_NODE]),c.length)b[f].splitBoundaries(),c=b[f].getNodes([a.TEXT_NODE]);else{var g=b[f].endContainer.ownerDocument,h=g.createTextNode(a.INVISIBLE_SPACE);b[f].insertNode(h),b[f].selectNode(h),c=[h]}for(var i=0,j=c.length;j>i;++i)b[f].isValid()&&(d=c[i],e=this.getMatchingAncestor(d),"style"===e.type?this.undoToTextNode(d,b[f],!1,e.element):e.element&&this.undoToTextNode(d,b[f],e.element));1==j?this.selectNode(b[f],c[0]):(b[f].setStart(c[0],0),d=c[c.length-1],b[f].setEnd(d,d.length),this.normalize&&this.postApply(c,b[f]))}},selectNode:function(b,c){var d=c.nodeType===a.ELEMENT_NODE,e="canHaveHTML"in c?c.canHaveHTML:!0,f=d?c.innerHTML:c.data,g=""===f||f===a.INVISIBLE_SPACE;if(g&&d&&e)try{c.innerHTML=a.INVISIBLE_SPACE}catch(h){}b.selectNodeContents(c),g&&d?b.collapse(!1):g&&(b.setStartAfter(c),b.setEndAfter(c))},getTextSelectedByRange:function(a,b){var c=b.cloneRange();c.selectNodeContents(a);var d=c.intersection(b),e=d?d.toString():"";return c.detach(),e},isAppliedToRange:function(b){for(var c,d,e=[],f="full",g=b.length;g--;){if(d=b[g].getNodes([a.TEXT_NODE]),!d.length)return c=this.getMatchingAncestor(b[g].startContainer).element,c?{elements:[c],coverage:f}:!1;for(var h,i=0,j=d.length;j>i;++i)h=this.getTextSelectedByRange(d[i],b[g]),c=this.getMatchingAncestor(d[i]).element,c&&""!=h?(e.push(c),1===a.dom.getTextNodes(c,!0).length?f="full":"full"===f&&(f="inline")):c||(f="partial")}return e.length?{elements:e,coverage:f}:!1},toggleRange:function(a){var b,c=this.isAppliedToRange(a);c?"full"===c.coverage?this.undoToRange(a):"inline"===c.coverage?(b=k(c.elements,this.tagNames,this.cssStyle,this.cssClass),this.undoToRange(a),b||this.applyToRange(a)):(k(c.elements,this.tagNames,this.cssStyle,this.cssClass)||this.undoToRange(a),this.applyToRange(a)):this.applyToRange(a)}},a.selection.HTMLApplier=s}(wysihtml5,rangy),wysihtml5.Commands=Base.extend({constructor:function(a){this.editor=a,this.composer=a.composer,this.doc=this.composer.doc},support:function(a){return wysihtml5.browser.supportsCommand(this.doc,a)},exec:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.exec,f=null;if(this.composer.hasPlaceholderSet()&&!wysihtml5.lang.array(["styleWithCSS","enableObjectResizing","enableInlineTableEditing"]).contains(a)&&(this.composer.element.innerHTML="",this.composer.selection.selectNode(this.composer.element)),this.editor.fire("beforecommand:composer"),e)d.unshift(this.composer),f=e.apply(c,d);else try{f=this.doc.execCommand(a,!1,b)}catch(g){}return this.editor.fire("aftercommand:composer"),f},remove:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.remove;return e?(d.unshift(this.composer),e.apply(c,d)):void 0},state:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.state;if(e)return d.unshift(this.composer),e.apply(c,d);try{return this.doc.queryCommandState(a)}catch(f){return!1}},stateValue:function(a){var b=wysihtml5.commands[a],c=wysihtml5.lang.array(arguments).get(),d=b&&b.stateValue;return d?(c.unshift(this.composer),d.apply(b,c)):!1}}),function(a){var b={nodeName:"B",toggle:!0};a.commands.bold={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){function b(b){return a.lang.object({}).merge(c).merge({attribute:b}).get()}var c={nodeName:"A",toggle:!1};a.commands.createLink={exec:function(c,d,e){var f=b(e);if(c.selection.isCollapsed()&&!this.state(c,d)){var g=c.doc.createTextNode(f.attribute.href);c.selection.insertNode(g),c.selection.selectNode(g)}a.commands.formatInline.exec(c,d,f)},state:function(b,d){return a.commands.formatInline.state(b,d,c)}}}(wysihtml5),function(a){var b={nodeName:"A"};a.commands.removeLink={exec:function(c,d){a.commands.formatInline.remove(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b=/wysiwyg-font-size-[0-9a-z\-]+/g;a.commands.fontSize={exec:function(c,d,e){a.commands.formatInline.exec(c,d,{className:"wysiwyg-font-size-"+e,classRegExp:b,toggle:!0})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{className:"wysiwyg-font-size-"+d})}}}(wysihtml5),function(a){a.commands.fontSizeStyle={exec:function(b,c,d){d=d.size||d,/^\s*$/.test(d)||a.commands.formatInline.exec(b,c,{styleProperty:"fontSize",styleValue:d,toggle:!1})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{styleProperty:"fontSize",styleValue:d||void 0})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"fontSize"})},stateValue:function(b,c){var d,e=this.state(b,c);return e&&a.lang.object(e).isArray()&&(e=e[0]),e&&(d=e.getAttribute("style"))?a.quirks.styleParser.parseFontSize(d):!1}}}(wysihtml5),function(a){var b=/wysiwyg-color-[0-9a-z]+/g;a.commands.foreColor={exec:function(c,d,e){a.commands.formatInline.exec(c,d,{className:"wysiwyg-color-"+e,classRegExp:b,toggle:!0})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{className:"wysiwyg-color-"+d})}}}(wysihtml5),function(a){a.commands.foreColorStyle={exec:function(b,c,d){var e,f;d&&(e=a.quirks.styleParser.parseColor("color:"+(d.color||d),"color"),e&&(f=(1===e[3]?"rgb("+[e[0],e[1],e[2]].join(", "):"rgba("+e.join(", "))+")",a.commands.formatInline.exec(b,c,{styleProperty:"color",styleValue:f})))},state:function(b,c,d){var e,f=d?a.quirks.styleParser.parseColor("color:"+(d.color||d),"color"):null;return f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")"),a.commands.formatInline.state(b,c,{styleProperty:"color",styleValue:e})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"color"})},stateValue:function(b,c,d){var e,f=this.state(b,c),g=!1;return f&&a.lang.object(f).isArray()&&(f=f[0]),f&&(e=f.getAttribute("style"))?(g=a.quirks.styleParser.parseColor(e,"color"),a.quirks.styleParser.unparseColor(g,d)):!1}}}(wysihtml5),function(a){a.commands.bgColorStyle={exec:function(b,c,d){var e,f=a.quirks.styleParser.parseColor("background-color:"+(d.color||d),"background-color");f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")",a.commands.formatInline.exec(b,c,{styleProperty:"backgroundColor",styleValue:e}))},state:function(b,c,d){var e,f=d?a.quirks.styleParser.parseColor("background-color:"+(d.color||d),"background-color"):null;return f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")"),a.commands.formatInline.state(b,c,{styleProperty:"backgroundColor",styleValue:e})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"backgroundColor"})},stateValue:function(b,c,d){var e,f=this.state(b,c),g=!1;return f&&a.lang.object(f).isArray()&&(f=f[0]),f&&(e=f.getAttribute("style"))?(g=a.quirks.styleParser.parseColor(e,"background-color"),a.quirks.styleParser.unparseColor(g,d)):!1}}}(wysihtml5),function(a){function b(a){return{nodeName:a.nodeName||null,className:a.classRegExp?null:a.className||null,classRegExp:a.classRegExp||null,styleProperty:a.styleProperty||null}}function c(b){for(var c=b.element,d=c.querySelectorAll(o),e=c.querySelectorAll(b.config.classNames.uneditableContainer),f=a.lang.array(d).without(e),g=f.length;g--;)""===f[g].innerHTML.replace(/[\uFEFF]/g,"")&&f[g].parentNode.removeChild(f[g])}function d(a){return a.config.useLineBreaks?"DIV":"P"}function e(a,b,c){for(var d=a,e=null;d&&b&&d!==b;)1===d.nodeType&&d.matches(c?o:n)&&(e=d),d=d.parentNode;return e}function f(a,b){for(var c,d,e,f=a,g=null;f&&b&&f!==b;)1===f.nodeType&&f.matches(p)&&(d=f,null===g?(g=f.cloneNode(!1),c=g):(e=f.cloneNode(!1),e.appendChild(g),g=e)),f=f.parentNode;return{parent:d,outerNode:g,innerNode:c}}function g(b,c,e){return b||(b=e.doc.createElement(c.nodeName||d(e)),b.appendChild(e.doc.createTextNode(a.INVISIBLE_SPACE))),c.nodeName&&b.nodeName!==c.nodeName&&(b=m.renameElement(b,c.nodeName)),c.classRegExp&&(b.className=b.className.replace(c.classRegExp,"")),c.className&&b.classList.add(c.className),c.styleProperty&&"undefined"!=typeof c.styleValue&&(b.style[a.browser.fixStyleKey(c.styleProperty)]=c.styleValue),b}function h(b,c,e){var f;c.styleProperty&&(b.style[a.browser.fixStyleKey(c.styleProperty)]=""),c.className&&b.classList.remove(c.className),c.classRegExp&&(b.className=b.className.replace(c.classRegExp,"")),null!==b.getAttribute("class")&&""===b.getAttribute("class").trim()&&b.removeAttribute("class"),c.nodeName&&b.nodeName===c.nodeName&&(f=b.getAttribute("style"),f&&""!==f.trim()?b=m.renameElement(b,d(e)):m.unwrap(b)),null!==b.getAttribute("style")&&""===b.getAttribute("style").trim()&&b.removeAttribute("style")}function i(b){for(var c=b.querySelectorAll(o)||[],d=c.length;d--;)c[d].nextSibling&&1===c[d].nextSibling.nodeType&&"BR"===c[d].nextSibling.nodeName||""!==(c[d].innerHTML||c[d].nodeValue||"").trim()&&c[d].parentNode.insertBefore(c[d].ownerDocument.createElement("BR"),c[d].nextSibling),a.dom.unwrap(c[d])}function j(a,b){var c;return a.startContainer&&1===a.startContainer.nodeType&&a.startContainer===a.endContainer?void(a.startContainer.firstChild===a.startContainer.lastChild&&1===a.endOffset&&a.startContainer!==b.element&&(a.setStartBefore(a.startContainer),a.setEndAfter(a.endContainer))):a.startContainer&&1===a.startContainer.nodeType&&3===a.endContainer.nodeType?void(a.startContainer.firstChild===a.endContainer&&1===a.endOffset&&a.startContainer!==b.element&&a.setEndAfter(a.startContainer)):a.endContainer&&1===a.endContainer.nodeType&&3===a.startContainer.nodeType?void(a.endContainer.firstChild===a.startContainer&&1===a.endOffset&&a.endContainer!==b.element&&a.setStartBefore(a.endContainer)):a.startContainer&&3===a.startContainer.nodeType&&a.startContainer===a.endContainer&&a.startContainer.parentNode?void(a.startContainer.parentNode.firstChild===a.startContainer&&a.endOffset==a.endContainer.length&&0===a.startOffset&&(c=a.startContainer.parentNode,c!==b.element&&(a.setStartBefore(c),a.setEndAfter(c)))):void 0}function k(c,h,k,l){var m=h?a.lang.object(h).clone(!0):null;m&&(m.nodeName=m.nodeName||k||d(l)),j(c,l);var p,q,r,s=c.cloneRange(),t=s.startContainer,u=s.extractContents(),v=l.doc.createDocumentFragment(),w=m?b(m):null,x=w?a.dom.getParentElement(t,w,null,l.element):null,y=!m||"BLOCKQUOTE"===k&&m.nodeName&&"BLOCKQUOTE"===m.nodeName,z=x||e(t,l.element,y);if(h&&h.nodeName&&"BLOCKQUOTE"===h.nodeName){var A=g(null,h,l);A.appendChild(u),v.appendChild(A),q=[A]}else{if(u.firstChild)for(;u.firstChild;)if(1==u.firstChild.nodeType&&u.firstChild.matches(o))if(h)g(u.firstChild,h,l),u.firstChild.matches(n)&&i(u.firstChild),v.appendChild(u.firstChild);else{i(u.firstChild),r=a.dom.unwrap(u.firstChild);for(var B=0,C=r.length;C>B;B++)v.appendChild(r[B]);v.childNodes.length>0&&v.appendChild(l.doc.createElement("BR"))}else if(h){for(p=g(null,m,l);u.firstChild&&(1!==u.firstChild.nodeType||!u.firstChild.matches(o));)1==u.firstChild.nodeType&&p.matches(n)&&i(u.firstChild),p.appendChild(u.firstChild);v.appendChild(p)}else 1==u.firstChild.nodeType&&i(u.firstChild),v.appendChild(u.firstChild);else v.appendChild(g(null,h,l));q=a.lang.array(v.childNodes).get()}if(z)l.selection.splitElementAtCaret(z,v);else{var D=f(t,l.element);if(D.outerNode&&D.innerNode&&D.parent){if(1===v.childNodes.length){for(;v.firstChild.firstChild;)D.innerNode.appendChild(v.firstChild.firstChild);v.firstChild.appendChild(D.outerNode)}l.selection.splitElementAtCaret(D.parent,v)}else s.insertNode(v)}return q}function l(b,c){var d=a.dom.getParentElement(b,{query:o},null,c.element);return d?d.nodeName:null}var m=a.dom,n="h1, h2, h3, h4, h5, h6, p, pre",o="h1, h2, h3, h4, h5, h6, p, pre, div, blockquote",p="b, big, i, small, tt, abbr, acronym, cite, code, dfn, em, kbd, strong, samp, var, a, bdo, br, q, span, sub, sup, button, label, textarea, input, select, u";a.commands.formatBlock={exec:function(b,d,e){var f,g,i,j,m,o=[];if("string"==typeof e&&(e={nodeName:e.toUpperCase()}),e&&e.toggle&&(m=this.state(b,d,e))){j=rangy.saveSelection(b.win);for(var p=0,q=m.length;q>p;p++)h(m[p],e,b)}if(!m){b.selection.isCollapsed()&&(i=a.dom.getParentElement(b.selection.getOwnRanges()[0].startContainer,{query:n+", "+(e&&e.nodeName?e.nodeName.toLowerCase():"div")},null,b.element),i?(j=rangy.saveSelection(b.win),g=b.selection.createRange(),g.selectNode(i),b.selection.setSelection(g)):b.isEmpty()||(j=rangy.saveSelection(b.win),b.selection.selectLine())),f=b.selection.getOwnRanges();for(var r=f.length;r--;)o=o.concat(k(f[r],e,l(f[r].startContainer,b),b))}c(b);for(var s=o.length;s--;)o[s].parentNode||o.splice(s,1);j?rangy.restoreSelection(j):(g=b.selection.createRange(),g.setStartBefore(o[0]),g.setEndAfter(o[o.length-1]),b.selection.setSelection(g)),a.dom.removeInvisibleSpaces(b.element)},state:function(b,c,d){"string"==typeof d&&(d={query:d});for(var e,f=b.selection.filterElements(function(b){return a.dom.domNode(b).test(d||{query:o})}.bind(this)),g=b.selection.getSelectedOwnNodes(),h=0,i=g.length;i>h;h++)e=m.getParentElement(g[h],d||{query:o},null,b.element),e&&-1===f.indexOf(e)&&f.push(e);return 0===f.length?!1:f}}}(wysihtml5),function(a){a.commands.formatCode={exec:function(b,c,d){var e,f,g,h=this.state(b)[0];h?b.selection.executeAndRestore(function(){e=h.querySelector("code"),a.dom.replaceWithChildNodes(h),e&&a.dom.replaceWithChildNodes(e)}):(f=b.selection.getRange(),g=f.extractContents(),h=b.doc.createElement("pre"),e=b.doc.createElement("code"),d&&(e.className=d),h.appendChild(e),e.appendChild(g),f.insertNode(h),b.selection.selectNode(h))},state:function(b){var c,d=b.selection.getSelectedNode();return d&&d.nodeName&&"PRE"==d.nodeName&&d.firstChild&&d.firstChild.nodeName&&"CODE"==d.firstChild.nodeName?[d]:(c=a.dom.getParentElement(d,{query:"pre code"}),c?[c.parentNode]:!1)}}}(wysihtml5),function(a){function b(a){return/^\s*$/.test(a.className)}function c(a){return!a.getAttribute("style")||/^\s*$/.test(a.getAttribute("style"))}function d(b){var c=a.dom.getAttributes(b);return a.lang.object(c).isEmpty()}function e(b,c){var d,e,f,g;return 1!==b.nodeType||1!==c.nodeType?!1:b.nodeName!==c.nodeName?!1:(d=b.className.trim().replace(/\s+/g," ").split(" "),e=c.className.trim().replace(/\s+/g," ").split(" "),a.lang.array(d).without(e).length>0?!1:(f=a.dom.getAttributes(b),g=a.dom.getAttributes(c),f.length===g.length&&a.lang.object(a.lang.object(f).difference(g)).isEmpty()?!0:!1))}function f(b,c){var d=c&&c.nodeName||F,e=b.ownerDocument.createElement(d);if(c.classRegExp&&(e.className=e.className.replace(c.classRegExp,"")),c.className&&e.classList.add(c.className),c.styleProperty&&"undefined"!=typeof c.styleValue&&(e.style[a.browser.fixStyleKey(c.styleProperty)]=c.styleValue),c.attribute)if("object"==typeof c.attribute)for(var f in c.attribute)c.attribute.hasOwnProperty(f)&&e.setAttribute(f,c.attribute[f]);else"undefined"!=typeof c.attributeValue&&e.setAttribute(c.attribute,c.attributeValue);return e}function g(a,b){for(var c in a)if(a.hasOwnProperty(c)&&(void 0===typeof b[c]||b[c]!==a[c]))return!1;return!0}function h(b,c,d){var e,f=a.dom.getAttributes(b),h=g(c,f);a.lang.object(f).difference(c);if(h&&d!==!1)for(e in c)c.hasOwnProperty(e)&&b.removeAttribute(e);else for(e in c)c.hasOwnProperty(e)&&b.setAttribute(e,c[e])}function i(e,f){var g,i,j;f.className&&(f.toggle!==!1&&e.classList.contains(f.className)?e.classList.remove(f.className):e.classList.add(f.className),b(e)&&e.removeAttribute("class")),f.styleProperty&&(f.toggle!==!1&&e.style[a.browser.fixStyleKey(f.styleProperty)].trim().replace(/, /g,",")===f.styleValue?e.style[a.browser.fixStyleKey(f.styleProperty)]="":e.style[a.browser.fixStyleKey(f.styleProperty)]=f.styleValue),c(e)&&e.removeAttribute("style"),f.attribute&&("object"==typeof f.attribute?g=f.attribute:(g={},g[f.attribute]=f.attributeValue||""),h(e,g,f.toggle)),i=f.nodeName?H[f.nodeName.toLowerCase()]||f.nodeName.toLowerCase():null,j=i?a.dom.domNode(e).test({query:i}):!1,(!f.nodeName||f.nodeName===F||j)&&(f.toggle!==!1&&j||!f.nodeName&&e.nodeName===F)&&b(e)&&c(e)&&d(e)&&a.dom.unwrap(e)}function j(b,c){var d=[];return b.isCollapsed()||(d=d.concat(b.getOwnNodes([3],function(b){return!a.dom.domNode(b).is.emptyTextNode()},c))),d}function k(a,b,c,d){var e=a,f=d?b:l(b);do{if(1===e.nodeType&&m(e,f))return e;e=e.parentNode}while(e&&e!==c);return null}function l(a){return{nodeName:a.nodeName||null,className:a.classRegExp?null:a.className||null,classRegExp:a.classRegExp||null,styleProperty:a.styleProperty||null}}function m(b,c){var d;if(c.nodeName){var e=H[c.nodeName.toLowerCase()]||c.nodeName.toLowerCase();return a.dom.domNode(b).test({query:e})}return d=a.lang.object(c).clone(),d.query=G,a.dom.domNode(b).test(d)}function n(b,c){var d=document.documentElement||document.body,e=d.scrollTop,f=d.scrollLeft;rangy.getSelection(b.win);rangy.getSelection(b.win).removeAllRanges();try{rangy.getSelection(b.win).addRange(c)}catch(g){}b.doc.activeElement&&a.dom.contains(b.element,b.doc.activeElement)||(b.element.focus(),d.scrollTop=e,d.scrollLeft=f,rangy.getSelection(b.win).addRange(c))}function o(a,b){var c=rangy.createRange(b.doc),d=a[a.length-1];a[0]&&d&&(c.setStart(a[0],0),c.setEnd(d,d.length),n(b,c))}function p(a,b,c,d){var e=rangy.createRange(a.doc);b&&(e.setStart(b,c),e.setEnd(b,"undefined"!=typeof d?d:c),n(a,e))}function q(a,b,c){var d,e,f,g=j(a.selection),h=[],i=!1;if(a.selection.isInThisEditable()){if(0===g.length&&a.selection.isCollapsed()){if(f=a.selection.getSelection().anchorNode,!f)return{nodes:[],partial:!1};3===f.nodeType&&(g=[f])}g.length||(e=a.selection.getOwnRanges()[0],e&&(g=[e.endContainer]));for(var l=0,m=g.length;m>l;l++)d=k(g[l],b,a.element,c),d?h.push(d):i=!0}return{nodes:h,partial:i}}function r(a){var b,c,d,e;return a&&(b=a.anchorNode,c=a.anchorOffset,b&&3===b.nodeType&&c>0&&c0&&/\w/.test(c.data[g-1]);)g--;for(;h0&&o(b,a),u(q(a,c).nodes),b.length>0&&o(b,a)}function w(a,b,c,d){p(a,b,c),u(q(a,d).nodes),p(a,b,c)}function x(a,b){var c=f(a,b);a.parentNode.insertBefore(c,a),c.appendChild(a)}function y(b,c,d){var e,f=c.element,g=k(b,d,f);g&&(e=g.cloneNode(!1),a.dom.domNode(b).escapeParent(g,e),i(e,d))}function z(b,c,d){var e=c.element,f=k(b,d,e);f&&a.dom.domNode(b).escapeParent(f)}function A(a,b,c){var d=f(a.endContainer,c);a.surroundContents(d),b.selection.selectNode(d)}function B(b,c,d,e){var f,g,h,j,l=q(b,e,!0),m=b.selection.getSelection();if(c.length){if(l.partial||e.toggle===!1)for(j=c.length;j--;)k(c[j],e,b.element)&&y(c[j],b,e),k(c[j],e,b.element)||x(c[j],e);else for(j=c.length;j--;)y(c[j],b,e);v(b,c,e)}else if(e.toggle!==!1)if(r(m))f=s(m),g=f.textNode,y(f.textNode,b,e),w(b,f.textNode,f.wordOffset,e);else{g=b.doc.createTextNode(a.INVISIBLE_SPACE),h=d.nodes[0].cloneNode(!1),h.appendChild(g),b.selection.splitElementAtCaret(d.nodes[0],h),i(h,e),v(b,[g],e);var n=b.selection.getSelection();if(n.anchorNode&&n.focusNode)try{n.collapseToEnd()}catch(o){}}else for(j=d.nodes.length;j--;)i(d.nodes[j],e)}function C(b,c,d,e){var f,g,h,i=b.selection.getSelection();if(c.length){for(h=c.length;h--;)z(c[h],b,e);v(b,c,e)}else{
+for(f=i.anchorNode,g=i.anchorOffset,h=d.nodes.length;h--;)a.dom.unwrap(d.nodes[h]);w(b,f,g,e)}}function D(a,b,c){var d,e,f=a.selection.getSelection();if(b.length){for(e=b.length;e--;)x(b[e],c);v(a,b,c)}else if(r(f))d=s(f),x(d.textNode,c),w(a,d.textNode,d.wordOffset,c);else{var g=a.selection.getOwnRanges()[0];g&&A(g,a,c)}}function E(a){return a="string"==typeof a?{nodeName:a}:a,a.nodeName&&(a.nodeName=a.nodeName.toUpperCase()),a}var F="SPAN",G="b, big, i, small, tt, abbr, acronym, cite, code, dfn, em, kbd, strong, samp, var, a, bdo, br, q, span, sub, sup, button, label, textarea, input, select, u",H={b:"b, strong",strong:"b, strong",em:"em, i",i:"em, i"};a.commands.formatInline={exec:function(a,b,c){c=E(c),a.element.normalize();var d=j(a.selection,!0),e=q(a,c);e.nodes.length>0?B(a,d,e,c):D(a,d,c),a.element.normalize()},remove:function(a,b,c){c=E(c),a.element.normalize();var d=j(a.selection,!0),e=q(a,c);e.nodes.length>0&&C(a,d,e,c),a.element.normalize()},state:function(a,b,c){c=E(c);var d=q(a,c,!0).nodes;return 0===d.length?!1:d}}}(wysihtml5),function(a){var b={nodeName:"BLOCKQUOTE",toggle:!0};a.commands.insertBlockQuote={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){a.commands.insertHTML={exec:function(a,b,c){a.commands.support(b)?a.doc.execCommand(b,!1,c):a.selection.insertHTML(c)},state:function(){return!1}}}(wysihtml5),function(a){var b="IMG";a.commands.insertImage={exec:function(c,d,e){e="object"==typeof e?e:{src:e};var f,g,h=c.doc,i=this.state(c);if(i&&!e.src)return c.selection.setBefore(i),g=i.parentNode,g.removeChild(i),a.dom.removeEmptyTextNodes(g),"A"!==g.nodeName||g.firstChild||(c.selection.setAfter(g),g.parentNode.removeChild(g)),void a.quirks.redraw(c.element);if(i)for(var j in e)e.hasOwnProperty(j)&&i.setAttribute("className"===j?"class":j,e[j]);else{i=h.createElement(b);for(var k in e)i.setAttribute("className"===k?"class":k,e[k]);c.selection.insertNode(i),a.browser.hasProblemsSettingCaretAfterImg()?(f=h.createTextNode(a.INVISIBLE_SPACE),c.selection.insertNode(f),c.selection.setAfter(f)):c.selection.setAfter(i)}},state:function(c){var d,e,f,g=c.doc;return a.dom.hasElementWithTagName(g,b)&&(d=c.selection.getSelectedNode())?d.nodeName===b?d:d.nodeType!==a.ELEMENT_NODE?!1:(e=c.selection.getText(),(e=a.lang.string(e).trim())?!1:(f=c.selection.getNodes(a.ELEMENT_NODE,function(a){return"IMG"===a.nodeName}),1!==f.length?!1:f[0])):!1}}}(wysihtml5),function(a){var b="
"+(a.browser.needsSpaceAfterLineBreak()?" ":"");a.commands.insertLineBreak={exec:function(c,d){c.commands.support(d)?(c.doc.execCommand(d,!1,null),a.browser.autoScrollsToCaret()||c.selection.scrollIntoView()):c.commands.exec("insertHTML",b)},state:function(){return!1}}}(wysihtml5),function(a){a.commands.insertOrderedList={exec:function(b,c){a.commands.insertList.exec(b,c,"OL")},state:function(b,c){return a.commands.insertList.state(b,c,"OL")}}}(wysihtml5),function(a){a.commands.insertUnorderedList={exec:function(b,c){a.commands.insertList.exec(b,c,"UL")},state:function(b,c){return a.commands.insertList.state(b,c,"UL")}}}(wysihtml5),wysihtml5.commands.insertList=function(a){var b=function(a,b){if(a&&a.nodeName){"string"==typeof b&&(b=[b]);for(var c=b.length;c--;)if(a.nodeName===b[c])return!0}return!1},c=function(c,d,e){var f={el:null,other:!1};if(c){var g=a.dom.getParentElement(c,{query:"li"},!1,e.element),h="UL"===d?"OL":"UL";b(c,d)?f.el=c:b(c,h)?f={el:c,other:!0}:g&&(b(g.parentNode,d)?f.el=g.parentNode:b(g.parentNode,h)&&(f={el:g.parentNode,other:!0}))}return f.el&&!e.element.contains(f.el)&&(f.el=null),f},d=function(b,c,d){var e,g,h="UL"===c?"OL":"UL";d.selection.executeAndRestoreRangy(function(){if(e=f(h,d),e.length)for(var i=e.length;i--;)a.dom.renameElement(e[i],c.toLowerCase());else{g=f(["OL","UL"],d);for(var j=g.length;j--;)a.dom.resolveList(g[j],d.config.useLineBreaks);a.dom.resolveList(b,d.config.useLineBreaks)}})},e=function(b,c,d){var e="UL"===c?"OL":"UL";d.selection.executeAndRestoreRangy(function(){for(var g=[b].concat(f(e,d)),h=g.length;h--;)a.dom.renameElement(g[h],c.toLowerCase())})},f=function(a,c){for(var d=c.selection.getOwnRanges(),e=[],f=d.length;f--;)e=e.concat(d[f].getNodes([1],function(c){return b(c,a)}));return e},g=function(b,c){c.selection.executeAndRestoreRangy(function(){var d,e,f="_wysihtml5-temp-"+(new Date).getTime(),g=c.selection.deblockAndSurround({nodeName:"div",className:f});g.innerHTML=g.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),g&&(d=a.lang.array(["","
",a.INVISIBLE_SPACE]).contains(g.innerHTML),e=a.dom.convertToList(g,b.toLowerCase(),c.parent.config.classNames.uneditableContainer),d&&c.selection.selectNode(e.querySelector("li"),!0))})};return{exec:function(a,b,f){var h=a.doc,i="OL"===f?"insertOrderedList":"insertUnorderedList",j=a.selection.getSelectedNode(),k=c(j,f,a);k.el?k.other?e(k.el,f,a):d(k.el,f,a):a.commands.support(i)?h.execCommand(i,!1,null):g(f,a)},state:function(a,b,d){var e=a.selection.getSelectedNode(),f=c(e,d,a);return f.el&&!f.other?f.el:!1}}}(wysihtml5),function(a){var b={nodeName:"I",toggle:!0};a.commands.italic={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-center",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyCenter={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-left",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyLeft={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-right",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyRight={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-justify",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyFull={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"right",toggle:!0};a.commands.alignRightStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"left",toggle:!0};a.commands.alignLeftStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"center",toggle:!0};a.commands.alignCenterStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){a.commands.redo={exec:function(a){return a.undoManager.redo()},state:function(a){return!1}}}(wysihtml5),function(a){var b={nodeName:"U",toggle:!0};a.commands.underline={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){a.commands.undo={exec:function(a){return a.undoManager.undo()},state:function(a){return!1}}}(wysihtml5),function(a){a.commands.createTable={exec:function(a,b,c){var d,e,f;if(c&&c.cols&&c.rows&&parseInt(c.cols,10)>0&&parseInt(c.rows,10)>0){for(f=c.tableStyle?'':"",f+="",e=0;e",d=0;d
";f+=""}f+="
",a.commands.exec("insertHTML",f)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.mergeTableCells={exec:function(b,c){b.tableSelection&&b.tableSelection.start&&b.tableSelection.end&&(this.state(b,c)?a.dom.table.unmergeCell(b.tableSelection.start):a.dom.table.mergeCellsBetween(b.tableSelection.start,b.tableSelection.end))},state:function(b,c){if(b.tableSelection){var d=b.tableSelection.start,e=b.tableSelection.end;if(d&&e&&d==e&&(a.dom.getAttribute(d,"colspan")&&parseInt(a.dom.getAttribute(d,"colspan"),10)>1||a.dom.getAttribute(d,"rowspan")&&parseInt(a.dom.getAttribute(d,"rowspan"),10)>1))return[d]}return!1}}}(wysihtml5),function(a){a.commands.addTableCells={exec:function(b,c,d){if(b.tableSelection&&b.tableSelection.start&&b.tableSelection.end){var e=a.dom.table.orderSelectionEnds(b.tableSelection.start,b.tableSelection.end);"before"==d||"above"==d?a.dom.table.addCells(e.start,d):("after"==d||"below"==d)&&a.dom.table.addCells(e.end,d),setTimeout(function(){b.tableSelection.select(e.start,e.end)},0)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.deleteTableCells={exec:function(b,c,d){if(b.tableSelection&&b.tableSelection.start&&b.tableSelection.end){var e,f=a.dom.table.orderSelectionEnds(b.tableSelection.start,b.tableSelection.end),g=a.dom.table.indexOf(f.start),h=b.tableSelection.table;a.dom.table.removeCells(f.start,d),setTimeout(function(){e=a.dom.table.findCell(h,g),e||("row"==d&&(e=a.dom.table.findCell(h,{row:g.row-1,col:g.col})),"column"==d&&(e=a.dom.table.findCell(h,{row:g.row,col:g.col-1}))),e&&b.tableSelection.select(e,e)},0)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.indentList={exec:function(a,b,c){var d=a.selection.getSelectionParentsByTag("LI");return d?this.tryToPushLiLevel(d,a.selection):!1},state:function(a,b){return!1},tryToPushLiLevel:function(b,c){var d,e,f,g,h,i=!1;return c.executeAndRestoreRangy(function(){for(var c=b.length;c--;)g=b[c],d="OL"===g.parentNode.nodeName?"OL":"UL",e=g.ownerDocument.createElement(d),f=a.dom.domNode(g).prev({nodeTypes:[a.ELEMENT_NODE]}),h=f?f.querySelector("ul, ol"):null,f&&(h?h.appendChild(g):(e.appendChild(g),f.appendChild(e)),i=!0)}),i}}}(wysihtml5),function(a){a.commands.outdentList={exec:function(a,b,c){var d=a.selection.getSelectionParentsByTag("LI");return d?this.tryToPullLiLevel(d,a):!1},state:function(a,b){return!1},tryToPullLiLevel:function(b,c){var d,e,f,g,h,i=!1,j=this;return c.selection.executeAndRestoreRangy(function(){for(var k=b.length;k--;)if(g=b[k],g.parentNode&&(d=g.parentNode,"OL"===d.tagName||"UL"===d.tagName)){if(i=!0,e=a.dom.getParentElement(d.parentNode,{query:"ol, ul"},!1,c.element),f=a.dom.getParentElement(d.parentNode,{query:"li"},!1,c.element),e&&f)g.nextSibling&&(h=j.getAfterList(d,g),g.appendChild(h)),e.insertBefore(g,f.nextSibling);else{g.nextSibling&&(h=j.getAfterList(d,g),g.appendChild(h));for(var l=g.childNodes.length;l--;)d.parentNode.insertBefore(g.childNodes[l],d.nextSibling);d.parentNode.insertBefore(document.createElement("br"),d.nextSibling),g.parentNode.removeChild(g)}0===d.childNodes.length&&d.parentNode.removeChild(d)}}),i},getAfterList:function(a,b){for(var c=a.nodeName,d=document.createElement(c);b.nextSibling;)d.appendChild(b.nextSibling);return d}}}(wysihtml5),function(a){var b={nodeName:"SUB",toggle:!0};a.commands.subscript={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b={nodeName:"SUP",toggle:!0};a.commands.superscript={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b=90,c=89,d=8,e=46,f=25,g="data-wysihtml5-selection-node",h="data-wysihtml5-selection-offset",i=(''+a.INVISIBLE_SPACE+"",''+a.INVISIBLE_SPACE+"",a.dom);a.UndoManager=a.lang.Dispatcher.extend({constructor:function(a){this.editor=a,this.composer=a.composer,this.element=this.composer.element,this.position=0,this.historyStr=[],this.historyDom=[],this.transact(),this._observe()},_observe:function(){var a,f=this;this.composer.sandbox.getDocument();i.observe(this.element,"keydown",function(a){if(!a.altKey&&(a.ctrlKey||a.metaKey)){var d=a.keyCode,e=d===b&&!a.shiftKey,g=d===b&&a.shiftKey||d===c;e?(f.undo(),a.preventDefault()):g&&(f.redo(),a.preventDefault())}}),i.observe(this.element,"keydown",function(b){var c=b.keyCode;c!==a&&(a=c,(c===d||c===e)&&f.transact())}),this.editor.on("newword:composer",function(){f.transact()}).on("beforecommand:composer",function(){f.transact()})},transact:function(){var b,c,d,e,i,j=this.historyStr[this.position-1],k=this.composer.getValue(!1,!1),l=this.element.offsetWidth>0&&this.element.offsetHeight>0;if(k!==j){var m=this.historyStr.length=this.historyDom.length=this.position;m>f&&(this.historyStr.shift(),this.historyDom.shift(),this.position--),this.position++,l&&(b=this.composer.selection.getRange(),c=b&&b.startContainer?b.startContainer:this.element,d=b&&b.startOffset?b.startOffset:0,c.nodeType===a.ELEMENT_NODE?e=c:(e=c.parentNode,i=this.getChildNodeIndex(e,c)),e.setAttribute(h,d),"undefined"!=typeof i&&e.setAttribute(g,i));var n=this.element.cloneNode(!!k);this.historyDom.push(n),this.historyStr.push(k),e&&(e.removeAttribute(h),e.removeAttribute(g))}},undo:function(){this.transact(),this.undoPossible()&&(this.set(this.historyDom[--this.position-1]),this.editor.fire("undo:composer"))},redo:function(){this.redoPossible()&&(this.set(this.historyDom[++this.position-1]),this.editor.fire("redo:composer"))},undoPossible:function(){return this.position>1},redoPossible:function(){return this.positionb;b++)this.element.appendChild(c[b].cloneNode(!0));var e,f,i;a.hasAttribute(h)?(e=a.getAttribute(h),i=a.getAttribute(g),f=this.element):(f=this.element.querySelector("["+h+"]")||this.element,e=f.getAttribute(h),i=f.getAttribute(g),f.removeAttribute(h),f.removeAttribute(g)),null!==i&&(f=this.getChildNodeByIndex(f,+i)),this.composer.selection.set(f,e)},getChildNodeIndex:function(a,b){for(var c=0,d=a.childNodes,e=d.length;e>c;c++)if(d[c]===b)return c},getChildNodeByIndex:function(a,b){return a.childNodes[b]}})}(wysihtml5),wysihtml5.views.View=Base.extend({constructor:function(a,b,c){this.parent=a,this.element=b,this.config=c,this.config.noTextarea||this._observeViewChange()},_observeViewChange:function(){var a=this;this.parent.on("beforeload",function(){a.parent.on("change_view",function(b){b===a.name?(a.parent.currentView=a,a.show(),setTimeout(function(){a.focus()},0)):a.hide()})})},focus:function(){if(!this.element||!this.element.ownerDocument||this.element.ownerDocument.querySelector(":focus")!==this.element)try{this.element&&this.element.focus()}catch(a){}},hide:function(){this.element.style.display="none"},show:function(){this.element.style.display=""},disable:function(){this.element.setAttribute("disabled","disabled")},enable:function(){this.element.removeAttribute("disabled")}}),function(a){var b=a.dom,c=a.browser;a.views.Composer=a.views.View.extend({name:"composer",CARET_HACK:"
",constructor:function(a,b,c){this.base(a,b,c),this.config.noTextarea?this.editableArea=b:this.textarea=this.parent.textarea,this.config.contentEditableMode?this._initContentEditableArea():this._initSandbox()},clear:function(){this.element.innerHTML=c.displaysCaretInEmptyContentEditableCorrectly()?"":this.CARET_HACK},getValue:function(b,c){var d=this.isEmpty()?"":a.quirks.getCorrectInnerHTML(this.element);return b!==!1&&(d=this.parent.parse(d,c===!1?!1:!0)),d},setValue:function(a,b){b&&(a=this.parent.parse(a));try{this.element.innerHTML=a}catch(c){this.element.innerText=a}},cleanUp:function(){var a;this.selection&&(a=rangy.saveSelection(this.win)),this.parent.parse(this.element),a&&rangy.restoreSelection(a)},show:function(){this.editableArea.style.display=this._displayStyle||"",this.config.noTextarea||this.textarea.element.disabled||(this.disable(),this.enable())},hide:function(){this._displayStyle=b.getStyle("display").from(this.editableArea),"none"===this._displayStyle&&(this._displayStyle=null),this.editableArea.style.display="none"},disable:function(){this.parent.fire("disable:composer"),this.element.removeAttribute("contentEditable")},enable:function(){this.parent.fire("enable:composer"),this.element.setAttribute("contentEditable","true")},focus:function(b){a.browser.doesAsyncFocus()&&this.hasPlaceholderSet()&&this.clear(),this.base();var c=this.element.lastChild;b&&c&&this.selection&&("BR"===c.nodeName?this.selection.setBefore(this.element.lastChild):this.selection.setAfter(this.element.lastChild))},getScrollPos:function(){if(this.doc&&this.win){var a={};return"undefined"!=typeof this.win.pageYOffset?a.y=this.win.pageYOffset:a.y=(this.doc.documentElement||this.doc.body.parentNode||this.doc.body).scrollTop,"undefined"!=typeof this.win.pageXOffset?a.x=this.win.pageXOffset:a.x=(this.doc.documentElement||this.doc.body.parentNode||this.doc.body).scrollLeft,a}},setScrollPos:function(a){a&&"undefined"!=typeof a.x&&"undefined"!=typeof a.y&&this.win.scrollTo(a.x,a.y)},getTextContent:function(){return b.getTextContent(this.element)},hasPlaceholderSet:function(){return this.getTextContent()==(this.config.noTextarea?this.editableArea.getAttribute("data-placeholder"):this.textarea.element.getAttribute("placeholder"))&&this.placeholderSet},isEmpty:function(){var a=this.element.innerHTML.toLowerCase();return/^(\s|
|<\/br>||<\/p>)*$/i.test(a)||""===a||"
"===a||"
"===a||"
"===a||this.hasPlaceholderSet()},_initContentEditableArea:function(){var a=this;this.config.noTextarea?this.sandbox=new b.ContentEditableArea(function(){a._create()},{className:this.config.classNames.sandbox},this.editableArea):(this.sandbox=new b.ContentEditableArea(function(){a._create()},{className:this.config.classNames.sandbox}),this.editableArea=this.sandbox.getContentEditable(),b.insert(this.editableArea).after(this.textarea.element),this._createWysiwygFormField())},_initSandbox:function(){var a=this;this.sandbox=new b.Sandbox(function(){a._create()},{stylesheets:this.config.stylesheets,className:this.config.classNames.sandbox}),this.editableArea=this.sandbox.getIframe();var c=this.textarea.element;b.insert(this.editableArea).after(c),this._createWysiwygFormField()},_createWysiwygFormField:function(){if(this.textarea.element.form){var a=document.createElement("input");a.type="hidden",a.name="_wysihtml5_mode",a.value=1,b.insert(a).after(this.textarea.element)}},_create:function(){var d=this;this.doc=this.sandbox.getDocument(),this.win=this.sandbox.getWindow(),this.element=this.config.contentEditableMode?this.sandbox.getContentEditable():this.doc.body,this.config.noTextarea?this.cleanUp():(this.textarea=this.parent.textarea,this.element.innerHTML=this.textarea.getValue(!0,!1)),this.selection=new a.Selection(this.parent,this.element,this.config.classNames.uneditableContainer),this.commands=new a.Commands(this.parent),this.config.noTextarea||b.copyAttributes(["className","spellcheck","title","lang","dir","accessKey"]).from(this.textarea.element).to(this.element),b.addClass(this.element,this.config.classNames.composer),this.config.style&&!this.config.contentEditableMode&&this.style(),this.observe();var e=this.config.name;e&&(b.addClass(this.element,e),this.config.contentEditableMode||b.addClass(this.editableArea,e)),this.enable(),!this.config.noTextarea&&this.textarea.element.disabled&&this.disable();var f="string"==typeof this.config.placeholder?this.config.placeholder:this.config.noTextarea?this.editableArea.getAttribute("data-placeholder"):this.textarea.element.getAttribute("placeholder");f&&b.simulatePlaceholder(this.parent,this,f,this.config.classNames.placeholder),this.commands.exec("styleWithCSS",!1),this._initAutoLinking(),this._initObjectResizing(),this._initUndoManager(),this._initLineBreaking(),this.config.noTextarea||!this.textarea.element.hasAttribute("autofocus")&&document.querySelector(":focus")!=this.textarea.element||c.isIos()||setTimeout(function(){d.focus(!0)},100),c.clearsContentEditableCorrectly()||a.quirks.ensureProperClearing(this),this.initSync&&this.config.sync&&this.initSync(),this.config.noTextarea||this.textarea.hide(),this.parent.fire("beforeload").fire("load")},_initAutoLinking:function(){var d=this,e=c.canDisableAutoLinking(),f=c.doesAutoLinkingInContentEditable();if(e&&this.commands.exec("autoUrlDetect",!1),this.config.autoLink){(!f||f&&e)&&(this.parent.on("newword:composer",function(){if(b.getTextContent(d.element).match(b.autoLink.URL_REG_EXP)){for(var c=d.selection.getSelectedNode(),e=d.element.querySelectorAll("."+d.config.classNames.uneditableContainer),f=!1,g=e.length;g--;)a.dom.contains(e[g],c)&&(f=!0);f||b.autoLink(c,[d.config.classNames.uneditableContainer])}}),b.observe(this.element,"blur",function(){b.autoLink(d.element,[d.config.classNames.uneditableContainer])}));var g=this.sandbox.getDocument().getElementsByTagName("a"),h=b.autoLink.URL_REG_EXP,i=function(c){var d=a.lang.string(b.getTextContent(c)).trim();return"www."===d.substr(0,4)&&(d="http://"+d),d};b.observe(this.element,"keydown",function(a){if(g.length){var c,e=d.selection.getSelectedNode(a.target.ownerDocument),f=b.getParentElement(e,{query:"a"},4);f&&(c=i(f),setTimeout(function(){var a=i(f);a!==c&&a.match(h)&&f.setAttribute("href",a)},0))}})}},_initObjectResizing:function(){if(this.commands.exec("enableObjectResizing",!0),c.supportsEvent("resizeend")){var d=["width","height"],e=d.length,f=this.element;b.observe(f,"resizeend",function(b){var c,g=b.target||b.srcElement,h=g.style,i=0;if("IMG"===g.nodeName){for(;e>i;i++)c=d[i],h[c]&&(g.setAttribute(c,parseInt(h[c],10)),h[c]="");a.quirks.redraw(f)}})}},_initUndoManager:function(){this.undoManager=new a.UndoManager(this.parent)},_initLineBreaking:function(){function d(a){var c=b.getParentElement(a,{query:"p, div"},2);c&&b.contains(e.element,c)&&e.selection.executeAndRestore(function(){e.config.useLineBreaks?b.replaceWithChildNodes(c):"P"!==c.nodeName&&b.renameElement(c,"p")})}var e=this,f="li, p, h1, h2, h3, h4, h5, h6",g="ul, ol, menu";this.config.useLineBreaks||b.observe(this.element,["focus","keydown"],function(){if(e.isEmpty()){var a=e.doc.createElement("P");e.element.innerHTML="",e.element.appendChild(a),c.displaysCaretInEmptyContentEditableCorrectly()?e.selection.selectNode(a,!0):(a.innerHTML="
",e.selection.setBefore(a.firstChild))}}),b.observe(this.element,"keydown",function(c){var h=c.keyCode;if(!c.shiftKey&&(h===a.ENTER_KEY||h===a.BACKSPACE_KEY)){var i=b.getParentElement(e.selection.getSelectedNode(),{query:f},4);return i?void setTimeout(function(){var c,f=e.selection.getSelectedNode();if("LI"===i.nodeName){if(!f)return;c=b.getParentElement(f,{query:g},2),c||d(f)}h===a.ENTER_KEY&&i.nodeName.match(/^H[1-6]$/)&&d(f)},0):void(e.config.useLineBreaks&&h===a.ENTER_KEY&&!a.browser.insertsLineBreaksOnReturn()&&(c.preventDefault(),e.commands.exec("insertLineBreak")))}})}})}(wysihtml5),function(a){var b=a.dom,c=document,d=window,e=c.createElement("div"),f=["background-color","color","cursor","font-family","font-size","font-style","font-variant","font-weight","line-height","letter-spacing","text-align","text-decoration","text-indent","text-rendering","word-break","word-wrap","word-spacing"],g=["background-color","border-collapse","border-bottom-color","border-bottom-style","border-bottom-width","border-left-color","border-left-style","border-left-width","border-right-color","border-right-style","border-right-width","border-top-color","border-top-style","border-top-width","clear","display","float","margin-bottom","margin-left","margin-right","margin-top","outline-color","outline-offset","outline-width","outline-style","padding-left","padding-right","padding-top","padding-bottom","position","top","left","right","bottom","z-index","vertical-align","text-align","-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing","-webkit-box-shadow","-moz-box-shadow","-ms-box-shadow","box-shadow","-webkit-border-top-right-radius","-moz-border-radius-topright","border-top-right-radius","-webkit-border-bottom-right-radius","-moz-border-radius-bottomright","border-bottom-right-radius","-webkit-border-bottom-left-radius","-moz-border-radius-bottomleft","border-bottom-left-radius","-webkit-border-top-left-radius","-moz-border-radius-topleft","border-top-left-radius","width","height"],h=["html { height: 100%; }","body { height: 100%; padding: 1px 0 0 0; margin: -1px 0 0 0; }","body > p:first-child { margin-top: 0; }","._wysihtml5-temp { display: none; }",a.browser.isGecko?"body.placeholder { color: graytext !important; }":"body.placeholder { color: #a9a9a9 !important; }","img:-moz-broken { -moz-force-broken-image-icon: 1; height: 24px; width: 24px; }"],i=function(a){if(a.setActive)try{a.setActive()}catch(e){}else{var f=a.style,g=c.documentElement.scrollTop||c.body.scrollTop,h=c.documentElement.scrollLeft||c.body.scrollLeft,i={position:f.position,top:f.top,left:f.left,WebkitUserSelect:f.WebkitUserSelect};b.setStyles({position:"absolute",top:"-99999px",left:"-99999px",WebkitUserSelect:"none"}).on(a),a.focus(),b.setStyles(i).on(a),d.scrollTo&&d.scrollTo(h,g)}};a.views.Composer.prototype.style=function(){var d,j=this,k=c.querySelector(":focus"),l=this.textarea.element,m=l.hasAttribute("placeholder"),n=m&&l.getAttribute("placeholder"),o=l.style.display,p=l.disabled;this.focusStylesHost=e.cloneNode(!1),this.blurStylesHost=e.cloneNode(!1),this.disabledStylesHost=e.cloneNode(!1),m&&l.removeAttribute("placeholder"),l===k&&l.blur(),l.disabled=!1,l.style.display=d="none",(l.getAttribute("rows")&&"auto"===b.getStyle("height").from(l)||l.getAttribute("cols")&&"auto"===b.getStyle("width").from(l))&&(l.style.display=d=o),b.copyStyles(g).from(l).to(this.editableArea).andTo(this.blurStylesHost),b.copyStyles(f).from(l).to(this.element).andTo(this.blurStylesHost),b.insertCSS(h).into(this.element.ownerDocument),l.disabled=!0,b.copyStyles(g).from(l).to(this.disabledStylesHost),b.copyStyles(f).from(l).to(this.disabledStylesHost),l.disabled=p,l.style.display=o,i(l),l.style.display=d,b.copyStyles(g).from(l).to(this.focusStylesHost),b.copyStyles(f).from(l).to(this.focusStylesHost),l.style.display=o,b.copyStyles(["display"]).from(l).to(this.editableArea);var q=a.lang.array(g).without(["display"]);return k?k.focus():l.blur(),m&&l.setAttribute("placeholder",n),this.parent.on("focus:composer",function(){b.copyStyles(q).from(j.focusStylesHost).to(j.editableArea),b.copyStyles(f).from(j.focusStylesHost).to(j.element)}),this.parent.on("blur:composer",function(){b.copyStyles(q).from(j.blurStylesHost).to(j.editableArea),b.copyStyles(f).from(j.blurStylesHost).to(j.element)}),this.parent.observe("disable:composer",function(){b.copyStyles(q).from(j.disabledStylesHost).to(j.editableArea),b.copyStyles(f).from(j.disabledStylesHost).to(j.element)}),this.parent.observe("enable:composer",function(){b.copyStyles(q).from(j.blurStylesHost).to(j.editableArea),b.copyStyles(f).from(j.blurStylesHost).to(j.element)}),this}}(wysihtml5),function(a){var b=a.dom,c=a.browser,d={66:"bold",73:"italic",85:"underline"},e=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.addEventListener(b[d],c,!1)},f=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.removeEventListener(b[d],c,!1)},g=function(b,c){if(b.selection.caretIsLastInSelection()){var d=b.selection.getSelection(),e=d.anchorNode;if(e&&1===e.nodeType&&(a.dom.getParentElement(e,{query:"td, th"},!1,b.element)||c)){var f=e.childNodes[d.anchorOffset];if(f&&1===f.nodeType&"BR"===f.nodeName)return f.parentNode.removeChild(f),!0}}return!1},h=function(a){var b=a.selection.getBeforeSelection(!0);if(b&&("element"===b.type||"leafnode"===b.type)&&1===b.node.nodeType&&b.node.classList.contains(a.config.classNames.uneditableContainer)){if(g(a,!0))return!0;try{var c=new CustomEvent("wysihtml5:uneditable:delete");b.node.dispatchEvent(c)}catch(d){}return b.node.parentNode.removeChild(b.node),!0}return!1},i=function(b){var c=b.selection,d=c.getPreviousNode();if(c.caretIsFirstInSelection()&&d&&1===d.nodeType&&/block/.test(b.win.getComputedStyle(d).display)){if(/^\s*$/.test(d.textContent||d.innerText))return d.parentNode.removeChild(d),!0;if(d.lastChild){var e=d.lastChild,f=c.getSelectedNode(),g=a.dom.domNode(d).commonAncestor(f,b.element);if(curNode=g?a.dom.getParentElement(f,{query:"h1, h2, h3, h4, h5, h6, p, pre, div, blockquote"},!1,g):null,curNode){for(;curNode.firstChild;)d.appendChild(curNode.firstChild);return c.setAfter(e),!0}if(3===f.nodeType)return d.appendChild(f),c.setAfter(e),!0}}return!1},j=function(a,b){var c=b.selection;b.element;if(c.isCollapsed()){if(i(b))return void a.preventDefault();if(g(b))return void a.preventDefault();if(h(b))return void a.preventDefault()}else c.containsUneditable()&&(a.preventDefault(),c.deleteContents())},k=function(a,b,c){if(a.selection.isCollapsed()){if(a.selection.caretIsInTheBeginnig("li"))if(c){if(a.commands.exec("outdentList"))return}else if(a.commands.exec("indentList"))return}else a.selection.deleteContents();a.commands.exec("insertHTML"," ")},l=function(a){this.domNodeRemovedInterval&&clearInterval(domNodeRemovedInterval),this.parent.fire("destroy:composer")},m=function(a){this.parent.fire("beforeinteraction",a).fire("beforeinteraction:composer",a),setTimeout(function(){this.parent.fire("interaction",a).fire("interaction:composer",a)}.bind(this),0)},n=function(a){this.parent.fire("focus",a).fire("focus:composer",a),setTimeout(function(){this.focusState=this.getValue(!1,!1)}.bind(this),0)},o=function(a){if(this.focusState!==this.getValue(!1,!1)){var b=a;"function"==typeof Object.create&&(b=Object.create(a,{type:{value:"change"}})),this.parent.fire("change",b).fire("change:composer",b)}this.parent.fire("blur",a).fire("blur:composer",a)},p=function(a){this.parent.fire(a.type,a).fire(a.type+":composer",a),"paste"===a.type&&setTimeout(function(){this.parent.fire("newword:composer")}.bind(this),0)},q=function(a){this.config.copyedFromMarking&&(a.clipboardData&&(a.clipboardData.setData("text/html",this.config.copyedFromMarking+this.selection.getHtml()),a.clipboardData.setData("text/plain",this.selection.getPlainText()),a.preventDefault()),this.parent.fire(a.type,a).fire(a.type+":composer",a))},r=function(b){var c=b.keyCode;(c===a.SPACE_KEY||c===a.ENTER_KEY)&&this.parent.fire("newword:composer")},s=function(b){if(!c.canSelectImagesInContentEditable()){var d=b.target,e=this.element.querySelectorAll("img"),f=this.element.querySelectorAll("."+this.config.classNames.uneditableContainer+" img"),g=a.lang.array(e).without(f);"IMG"===d.nodeName&&a.lang.array(g).contains(d)&&this.selection.selectNode(d)}},t=function(a){var b,c={IMG:"Image: ",A:"Link: "},d=a.target,e=d.nodeName;("A"===e||"IMG"===e)&&(d.hasAttribute("title")||(b=c[e]+(d.getAttribute("href")||d.getAttribute("src")),d.setAttribute("title",b)))},u=function(b){if(this.config.classNames.uneditableContainer){var c=a.dom.getParentElement(b.target,{query:"."+this.config.classNames.uneditableContainer},!1,this.element);c&&this.selection.setAfter(c)}},v=function(a){c.canSelectImagesInContentEditable()||setTimeout(function(){this.selection.getSelection().removeAllRanges()}.bind(this),0)},w=function(b){var c,e,f=b.keyCode,g=d[f];return(b.ctrlKey||b.metaKey)&&65===f?(this.selection.selectAll(),void b.preventDefault()):((b.ctrlKey||b.metaKey)&&!b.altKey&&g&&(this.commands.exec(g),b.preventDefault()),f===a.BACKSPACE_KEY&&j(b,this),(f===a.BACKSPACE_KEY||f===a.DELETE_KEY)&&(c=this.selection.getSelectedNode(!0),c&&"IMG"===c.nodeName&&(b.preventDefault(),e=c.parentNode,e.removeChild(c),"A"!==e.nodeName||e.firstChild||e.parentNode.removeChild(e),setTimeout(function(){a.quirks.redraw(this.element)}.bind(this),0))),void(this.config.handleTabKey&&f===a.TAB_KEY&&(b.preventDefault(),
+k(this,this.element,b.shiftKey))))},x=function(){var b=function(){this.doc.execCommand("enableObjectResizing",!1,"false"),this.doc.execCommand("enableInlineTableEditing",!1,"false")},c=function(){b.call(this),f(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c)}.bind(this);this.doc.execCommand&&a.browser.supportsCommand(this.doc,"enableObjectResizing")&&a.browser.supportsCommand(this.doc,"enableInlineTableEditing")&&(this.sandbox.getIframe?e(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c):setTimeout(function(){b.call(this)}.bind(this),0)),this.tableSelection=a.quirks.tableCellsSelection(this.element,this.parent)};a.views.Composer.prototype.observe=function(){var a=this.sandbox.getIframe?this.sandbox.getIframe():this.sandbox.getContentEditable(),d=(this.element,c.supportsEventsInIframeCorrectly()||this.sandbox.getContentEditable?this.element:this.sandbox.getWindow());this.focusState=this.getValue(!1,!1),a.addEventListener(["DOMNodeRemoved"],l.bind(this),!1),c.supportsMutationEvents()||(this.domNodeRemovedInterval=setInterval(function(){b.contains(document.documentElement,a)||l.call(this)},250)),this.config.handleTables&&x.call(this),e(d,["drop","paste","mouseup","focus","keyup"],m.bind(this)),d.addEventListener("focus",n.bind(this),!1),d.addEventListener("blur",o.bind(this),!1),e(this.element,["drop","paste","beforepaste"],p.bind(this),!1),this.element.addEventListener("copy",q.bind(this),!1),this.element.addEventListener("mousedown",s.bind(this),!1),this.element.addEventListener("mouseover",t.bind(this),!1),this.element.addEventListener("click",u.bind(this),!1),this.element.addEventListener("drop",v.bind(this),!1),this.element.addEventListener("keyup",r.bind(this),!1),this.element.addEventListener("keydown",w.bind(this),!1),this.element.addEventListener("dragenter",function(){this.parent.fire("unset_placeholder")}.bind(this),!1)}}(wysihtml5),function(a){var b=400;a.views.Synchronizer=Base.extend({constructor:function(a,b,c){this.editor=a,this.textarea=b,this.composer=c,this._observe()},fromComposerToTextarea:function(b){this.textarea.setValue(a.lang.string(this.composer.getValue(!1,!1)).trim(),b)},fromTextareaToComposer:function(a){var b=this.textarea.getValue(!1,!1);b?this.composer.setValue(b,a):(this.composer.clear(),this.editor.fire("set_placeholder"))},sync:function(a){"textarea"===this.editor.currentView.name?this.fromTextareaToComposer(a):this.fromComposerToTextarea(a)},_observe:function(){var c,d=this,e=this.textarea.element.form,f=function(){c=setInterval(function(){d.fromComposerToTextarea()},b)},g=function(){clearInterval(c),c=null};f(),e&&(a.dom.observe(e,"submit",function(){d.sync(!0)}),a.dom.observe(e,"reset",function(){setTimeout(function(){d.fromTextareaToComposer()},0)})),this.editor.on("change_view",function(a){"composer"!==a||c?"textarea"===a&&(d.fromComposerToTextarea(!0),g()):(d.fromTextareaToComposer(!0),f())}),this.editor.on("destroy:composer",g)}})}(wysihtml5),function(a){a.views.SourceView=Base.extend({constructor:function(a,b){this.editor=a,this.composer=b,this._observe()},switchToTextarea:function(a){var b=this.composer.win.getComputedStyle(this.composer.element),c=parseFloat(b.width),d=Math.max(parseFloat(b.height),100);this.textarea||(this.textarea=this.composer.doc.createElement("textarea"),this.textarea.className="wysihtml5-source-view"),this.textarea.style.width=c+"px",this.textarea.style.height=d+"px",this.textarea.value=this.editor.getValue(a,!0),this.composer.element.parentNode.insertBefore(this.textarea,this.composer.element),this.editor.currentView="source",this.composer.element.style.display="none"},switchToComposer:function(a){var b=this.textarea.value;b?this.composer.setValue(b,a):(this.composer.clear(),this.editor.fire("set_placeholder")),this.textarea.parentNode.removeChild(this.textarea),this.editor.currentView=this.composer,this.composer.element.style.display=""},_observe:function(){this.editor.on("change_view",function(a){"composer"===a?this.switchToComposer(!0):"textarea"===a&&this.switchToTextarea(!0)}.bind(this))}})}(wysihtml5),wysihtml5.views.Textarea=wysihtml5.views.View.extend({name:"textarea",constructor:function(a,b,c){this.base(a,b,c),this._observe()},clear:function(){this.element.value=""},getValue:function(a){var b=this.isEmpty()?"":this.element.value;return a!==!1&&(b=this.parent.parse(b)),b},setValue:function(a,b){b&&(a=this.parent.parse(a)),this.element.value=a},cleanUp:function(){var a=this.parent.parse(this.element.value);this.element.value=a},hasPlaceholderSet:function(){var a=wysihtml5.browser.supportsPlaceholderAttributeOn(this.element),b=this.element.getAttribute("placeholder")||null,c=this.element.value,d=!c;return a&&d||c===b},isEmpty:function(){return!wysihtml5.lang.string(this.element.value).trim()||this.hasPlaceholderSet()},_observe:function(){var a=this.element,b=this.parent,c={focusin:"focus",focusout:"blur"},d=wysihtml5.browser.supportsEvent("focusin")?["focusin","focusout","change"]:["focus","blur","change"];b.on("beforeload",function(){wysihtml5.dom.observe(a,d,function(a){var d=c[a.type]||a.type;b.fire(d).fire(d+":textarea")}),wysihtml5.dom.observe(a,["paste","drop"],function(){setTimeout(function(){b.fire("paste").fire("paste:textarea")},0)})})}}),function(a){var b,c={name:b,style:!0,toolbar:b,showToolbarAfterInit:!0,showToolbarDialogsOnSelection:!0,autoLink:!0,handleTables:!0,handleTabKey:!0,parserRules:{tags:{br:{},span:{},div:{},p:{}},classes:{}},pasteParserRulesets:null,parser:a.dom.parse,useLineBreaks:!0,stylesheets:[],placeholderText:b,supportTouchDevices:!0,cleanUp:!0,contentEditableMode:!1,classNames:{composer:"wysihtml5-editor",body:"wysihtml5-supported",sandbox:"wysihtml5-sandbox",placeholder:"wysihtml5-placeholder",uneditableContainer:"wysihtml5-uneditable-container"},copyedFromMarking:''};a.Editor=a.lang.Dispatcher.extend({constructor:function(b,d){if(this.editableElement="string"==typeof b?document.getElementById(b):b,this.config=a.lang.object({}).merge(c).merge(d).get(),this._isCompatible=a.browser.supported(),d&&d.classNames&&a.lang.object(this.config.classNames).merge(d.classNames),"textarea"!=this.editableElement.nodeName.toLowerCase()&&(this.config.contentEditableMode=!0,this.config.noTextarea=!0),this.config.noTextarea||(this.textarea=new a.views.Textarea(this,this.editableElement,this.config),this.currentView=this.textarea),!this._isCompatible||!this.config.supportTouchDevices&&a.browser.isTouchDevice()){var e=this;return void setTimeout(function(){e.fire("beforeload").fire("load")},0)}a.dom.addClass(document.body,this.config.classNames.body),this.composer=new a.views.Composer(this,this.editableElement,this.config),this.currentView=this.composer,"function"==typeof this.config.parser&&this._initParser(),this.on("beforeload",this.handleBeforeLoad)},handleBeforeLoad:function(){this.config.noTextarea?this.sourceView=new a.views.SourceView(this,this.composer):this.synchronizer=new a.views.Synchronizer(this,this.textarea,this.composer),this.config.toolbar&&(this.toolbar=new a.toolbar.Toolbar(this,this.config.toolbar,this.config.showToolbarAfterInit))},isCompatible:function(){return this._isCompatible},clear:function(){return this.currentView.clear(),this},getValue:function(a,b){return this.currentView.getValue(a,b)},setValue:function(a,b){return this.fire("unset_placeholder"),a?(this.currentView.setValue(a,b),this):this.clear()},cleanUp:function(){this.currentView.cleanUp()},focus:function(a){return this.currentView.focus(a),this},disable:function(){return this.currentView.disable(),this},enable:function(){return this.currentView.enable(),this},isEmpty:function(){return this.currentView.isEmpty()},hasPlaceholderSet:function(){return this.currentView.hasPlaceholderSet()},parse:function(b,c){var d=this.config.contentEditableMode?document:this.composer?this.composer.sandbox.getDocument():null,e=this.config.parser(b,{rules:this.config.parserRules,cleanUp:this.config.cleanUp,context:d,uneditableClass:this.config.classNames.uneditableContainer,clearInternals:c});return"object"==typeof b&&a.quirks.redraw(b),e},_initParser:function(){var b;a.browser.supportsModernPaste()?this.on("paste:composer",function(c){c.preventDefault(),b=a.dom.getPastedHtml(c),b&&this._cleanAndPaste(b)}.bind(this)):this.on("beforepaste:composer",function(b){b.preventDefault();var c=this.composer.getScrollPos();a.dom.getPastedHtmlWithDiv(this.composer,function(a){a&&this._cleanAndPaste(a),this.composer.setScrollPos(c)}.bind(this))}.bind(this))},_cleanAndPaste:function(b){var c=a.quirks.cleanPastedHTML(b,{referenceNode:this.composer.element,rules:this.config.pasteParserRulesets||[{set:this.config.parserRules}],uneditableClass:this.config.classNames.uneditableContainer});this.composer.selection.deleteContents(),this.composer.selection.insertHTML(c)}})}(wysihtml5),function(a){var b=a.dom,c="wysihtml5-command-dialog-opened",d="input, select, textarea",e="[data-wysihtml5-dialog-field]",f="data-wysihtml5-dialog-field";a.toolbar.Dialog=a.lang.Dispatcher.extend({constructor:function(a,b){this.link=a,this.container=b},_observe:function(){if(!this._observed){var d=this,e=function(a){var b=d._serialize();d.fire("save",b),d.hide(),a.preventDefault(),a.stopPropagation()};b.observe(d.link,"click",function(){b.hasClass(d.link,c)&&setTimeout(function(){d.hide()},0)}),b.observe(this.container,"keydown",function(b){var c=b.keyCode;c===a.ENTER_KEY&&e(b),c===a.ESCAPE_KEY&&d.cancel()}),b.delegate(this.container,"[data-wysihtml5-dialog-action=save]","click",e),b.delegate(this.container,"[data-wysihtml5-dialog-action=cancel]","click",function(a){d.cancel(),a.preventDefault(),a.stopPropagation()}),this._observed=!0}},_serialize:function(){for(var a={},b=this.container.querySelectorAll(e),c=b.length,d=0;c>d;d++)a[b[d].getAttribute(f)]=b[d].value;return a},_interpolate:function(a){for(var b,c,d,g=document.querySelector(":focus"),h=this.container.querySelectorAll(e),i=h.length,j=0;i>j;j++)b=h[j],b!==g&&(a&&"hidden"===b.type||(c=b.getAttribute(f),d=this.elementToChange&&"boolean"!=typeof this.elementToChange?this.elementToChange.getAttribute(c)||"":b.defaultValue,b.value=d))},update:function(a){this.elementToChange=a?a:this.elementToChange,this._interpolate()},show:function(a){var e=this.container.querySelector(d);if(this._observe(),this.update(a),b.addClass(this.link,c),this.container.style.display="",this.isOpen=!0,this.fire("show"),e&&!a)try{e.focus()}catch(f){}},_hide:function(a){this.elementToChange=null,b.removeClass(this.link,c),this.container.style.display="none",this.isOpen=!1},hide:function(){this._hide(),this.fire("hide")},cancel:function(){this._hide(),this.fire("cancel")}})}(wysihtml5),function(a){var b=a.dom,c={position:"relative"},d={left:0,margin:0,opacity:0,overflow:"hidden",padding:0,position:"absolute",top:0,zIndex:1},e={cursor:"inherit",fontSize:"50px",height:"50px",marginTop:"-25px",outline:0,padding:0,position:"absolute",right:"-4px",top:"50%"},f={"x-webkit-speech":"",speech:""};a.toolbar.Speech=function(g,h){var i=document.createElement("input");if(!a.browser.supportsSpeechApiOn(i))return void(h.style.display="none");var j=g.editor.textarea.element.getAttribute("lang");j&&(f.lang=j);var k=document.createElement("div");a.lang.object(d).merge({width:h.offsetWidth+"px",height:h.offsetHeight+"px"}),b.insert(i).into(k),b.insert(k).into(h),b.setStyles(e).on(i),b.setAttributes(f).on(i),b.setStyles(d).on(k),b.setStyles(c).on(h);var l="onwebkitspeechchange"in i?"webkitspeechchange":"speechchange";b.observe(i,l,function(){g.execCommand("insertText",i.value),i.value=""}),b.observe(i,"click",function(a){b.hasClass(h,"wysihtml5-command-disabled")&&a.preventDefault(),a.stopPropagation()})}}(wysihtml5),function(a){function b(b,c){var d=b.commands.state(c.name,c.value);return!c.dialog.multiselect&&a.lang.object(d).isArray()&&(d=1===d.length?d[0]:!0),d}var c="wysihtml5-command-disabled",d="wysihtml5-commands-disabled",e="wysihtml5-command-active",f="wysihtml5-action-active",g=a.dom;a.toolbar.Toolbar=Base.extend({constructor:function(b,g,h){this.editor=b,this.container="string"==typeof g?document.getElementById(g):g,this.composer=b.composer,this._getLinks("command"),this._getLinks("action"),this._observe(),h&&this.show(),null!=b.config.classNameCommandDisabled&&(c=b.config.classNameCommandDisabled),null!=b.config.classNameCommandsDisabled&&(d=b.config.classNameCommandsDisabled),null!=b.config.classNameCommandActive&&(e=b.config.classNameCommandActive),null!=b.config.classNameActionActive&&(f=b.config.classNameActionActive);for(var i=this.container.querySelectorAll("[data-wysihtml5-command=insertSpeech]"),j=i.length,k=0;j>k;k++)new a.toolbar.Speech(this,i[k])},_getLinks:function(b){for(var c,d,e,f,g,h,i=this[b+"Links"]=a.lang.array(this.container.querySelectorAll("[data-wysihtml5-"+b+"]")).get(),j=i.length,k=0,l=this[b+"Mapping"]={};j>k;k++)c=i[k],e=c.getAttribute("data-wysihtml5-"+b),f=c.getAttribute("data-wysihtml5-"+b+"-value"),h=c.getAttribute("data-wysihtml5-"+b+"-blank-value"),d=this.container.querySelector("[data-wysihtml5-"+b+"-group='"+e+"']"),g=this._getDialog(c,e),l[e+":"+f]={link:c,group:d,name:e,value:f,tracksBlankValue:h,dialog:g,state:!1}},_getDialog:function(b,c){var d,e,f=this,g=this.container.querySelector("[data-wysihtml5-dialog='"+c+"']");return g&&(d=a.toolbar["Dialog_"+c]?new a.toolbar["Dialog_"+c](b,g):new a.toolbar.Dialog(b,g),d.on("show",function(){e=f.composer.selection.getBookmark(),f.editor.fire("show:dialog",{command:c,dialogContainer:g,commandLink:b})}),d.on("save",function(a){e&&f.composer.selection.setBookmark(e),f._execCommand(c,a),f.editor.fire("save:dialog",{command:c,dialogContainer:g,commandLink:b}),f._hideAllDialogs(),f._preventInstantFocus(),e=void 0}),d.on("cancel",function(){e&&f.composer.selection.setBookmark(e),f.editor.fire("cancel:dialog",{command:c,dialogContainer:g,commandLink:b}),e=void 0,f._preventInstantFocus()}),d.on("hide",function(){f.editor.fire("hide:dialog",{command:c,dialogContainer:g,commandLink:b}),e=void 0})),d},execCommand:function(a,b){this.commandsDisabled||this._execCommand(a,b)},_execCommand:function(a,b){this.editor.focus(!1),this.composer.commands.exec(a,b),this._updateLinkStates()},execAction:function(a){var b=this.editor;"change_view"===a&&(b.currentView===b.textarea||"source"===b.currentView?b.fire("change_view","composer"):b.fire("change_view","textarea")),"showSource"==a&&b.fire("showSource")},_observe:function(){for(var c=this,e=this.editor,f=this.container,h=this.commandLinks.concat(this.actionLinks),i=h.length,j=0;i>j;j++)"A"===h[j].nodeName?g.setAttributes({href:"javascript:;",unselectable:"on"}).on(h[j]):g.setAttributes({unselectable:"on"}).on(h[j]);g.delegate(f,"[data-wysihtml5-command], [data-wysihtml5-action]","mousedown",function(a){a.preventDefault()}),g.delegate(f,"[data-wysihtml5-command]","click",function(a){var d,e=this,f=e.getAttribute("data-wysihtml5-command"),g=e.getAttribute("data-wysihtml5-command-value"),h=c.commandMapping[f+":"+g];g||!h.dialog?c.execCommand(f,g):(d=b(c.composer,h),h.dialog.show(d)),a.preventDefault()}),g.delegate(f,"[data-wysihtml5-action]","click",function(a){var b=this.getAttribute("data-wysihtml5-action");c.execAction(b),a.preventDefault()}),e.on("interaction:composer",function(a){c.preventFocus||c._updateLinkStates()}),this.container.ownerDocument.addEventListener("click",function(b){a.dom.contains(c.container,b.target)||a.dom.contains(c.composer.element,b.target)||(c._updateLinkStates(),c._preventInstantFocus())},!1),this.editor.config.handleTables&&(e.on("tableselect:composer",function(){c.container.querySelectorAll('[data-wysihtml5-hiddentools="table"]')[0].style.display=""}),e.on("tableunselect:composer",function(){c.container.querySelectorAll('[data-wysihtml5-hiddentools="table"]')[0].style.display="none"})),e.on("change_view",function(a){setTimeout(function(){c.commandsDisabled="composer"!==a,c._updateLinkStates(),c.commandsDisabled?g.addClass(f,d):g.removeClass(f,d)},0)})},_hideAllDialogs:function(){var a=this.commandMapping;for(var b in a)a[b].dialog&&a[b].dialog.hide()},_preventInstantFocus:function(){this.preventFocus=!0,setTimeout(function(){this.preventFocus=!1}.bind(this),0)},_updateLinkStates:function(){var a,d,h,i,j,k=this.commandMapping,l=this.composer,m=this.actionMapping;for(a in k)i=k[a],this.commandsDisabled?(d=!1,g.removeClass(i.link,e),i.group&&g.removeClass(i.group,e),i.dialog&&i.dialog.hide()):(d=this.composer.commands.state(i.name,i.value),g.removeClass(i.link,c),i.group&&g.removeClass(i.group,c)),(i.state!==d||i.tracksBlankValue)&&(i.state=d,d?i.tracksBlankValue?g.removeClass(i.link,e):(g.addClass(i.link,e),i.group&&g.addClass(i.group,e),!i.dialog||"undefined"!=typeof i.value&&null!==i.value||(d&&"object"==typeof d?(d=b(l,i),i.state=d,j=i.dialog.container.dataset?i.dialog.container.dataset.showdialogonselection:!1,l.config.showToolbarDialogsOnSelection||j?i.dialog.show(d):i.dialog.update(d)):i.dialog.hide())):i.tracksBlankValue?g.addClass(i.link,e):(g.removeClass(i.link,e),i.group&&g.removeClass(i.group,e),i.dialog&&!i.value&&i.dialog.hide()));for(a in m)h=m[a],"change_view"===h.name&&(h.state=this.editor.currentView===this.editor.textarea||"source"===this.editor.currentView,h.state?g.addClass(h.link,f):g.removeClass(h.link,f))},show:function(){this.container.style.display=""},hide:function(){this.container.style.display="none"}})}(wysihtml5),function(a){a.toolbar.Dialog_createTable=a.toolbar.Dialog.extend({show:function(a){this.base(a)}})}(wysihtml5),function(a){var b="[data-wysihtml5-dialog-field]",c="data-wysihtml5-dialog-field";a.toolbar.Dialog_foreColorStyle=a.toolbar.Dialog.extend({multiselect:!0,_serialize:function(){for(var a={},d=this.container.querySelectorAll(b),e=d.length,f=0;e>f;f++)a[d[f].getAttribute(c)]=d[f].value;return a},_interpolate:function(d){for(var e,f,g=a.quirks.styleParser,h=document.querySelector(":focus"),i=this.container.querySelectorAll(b),j=i.length,k=0,l=this.elementToChange?a.lang.object(this.elementToChange).isArray()?this.elementToChange[0]:this.elementToChange:null,m=l?l.getAttribute("style"):null,n=m?g.parseColor(m,"color"):null;j>k;k++)e=i[k],e!==h&&(d&&"hidden"===e.type||"color"===e.getAttribute(c)&&(f=(e.dataset.colormode||"rgb").toLowerCase(),f="hex"===f?"hash":f,n?e.value=g.unparseColor(n,f):e.value=g.unparseColor([0,0,0],f)))}})}(wysihtml5),function(a){a.dom;a.toolbar.Dialog_fontSizeStyle=a.toolbar.Dialog.extend({multiselect:!0,_serialize:function(){return{size:this.container.querySelector('[data-wysihtml5-dialog-field="size"]').value}},_interpolate:function(b){var c=document.querySelector(":focus"),d=this.container.querySelector("[data-wysihtml5-dialog-field='size']"),e=this.elementToChange?a.lang.object(this.elementToChange).isArray()?this.elementToChange[0]:this.elementToChange:null,f=e?e.getAttribute("style"):null,g=f?a.quirks.styleParser.parseFontSize(f):null;d&&d!==c&&g&&!/^\s*$/.test(g)&&(d.value=g)}})}(wysihtml5);
//# sourceMappingURL=wysihtml-toolbar.min.map
\ No newline at end of file
diff --git a/dist/wysihtml-toolbar.min.map b/dist/wysihtml-toolbar.min.map
index 53265cb..375fb1e 100644
--- a/dist/wysihtml-toolbar.min.map
+++ b/dist/wysihtml-toolbar.min.map
@@ -1 +1 @@
-{"version":3,"file":"wysihtml-toolbar.min.js","sources":["wysihtml-toolbar.js"],"names":["wysihtml5","version","commands","dom","quirks","toolbar","lang","selection","views","INVISIBLE_SPACE","INVISIBLE_SPACE_REG_EXP","EMPTY_FUNCTION","ELEMENT_NODE","TEXT_NODE","BACKSPACE_KEY","ENTER_KEY","ESCAPE_KEY","SPACE_KEY","TAB_KEY","DELETE_KEY","polyfills","win","doc","String","prototype","trim","rtrim","this","replace","s_add","s_rem","Element","on","fn","self","attachEvent","e","event","target","srcElement","preventDefault","returnValue","stopPropagation","cancelBubble","which","button","keyCode","call","detachEvent","Object","defineProperty","getOwnPropertyDescriptor","get","innerText","set","s","Array","isArray","arg","toString","indexOf","a","f","c","length","r","d","Function","bind","oThis","TypeError","aArgs","slice","arguments","fToBind","fNOP","fBound","apply","concat","ElementPrototype","matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","selector","node","nodes","parentNode","document","querySelectorAll","i","createElement","testElement","classList","add","contains","createMethod","method","original","DOMTokenList","token","len","toggle","_toggle","force","view","classListProp","protoProp","elemCtrProto","objCtr","strTrim","arrIndexOf","item","DOMEx","type","message","name","code","DOMException","checkTokenAndGetIndex","test","ClassList","elem","trimmedClasses","getAttribute","classes","split","push","_updateClassName","setAttribute","classListProto","classListGetter","Error","tokens","l","updated","remove","index","splice","result","join","classListPropDesc","enumerable","configurable","ex","number","__defineGetter__","normalizeHasCaretError","window","ret","t1","createTextNode","t2","t3","createRange","appendChild","body","setStart","setEnd","getSelection","removeAllRanges","addRange","normalize","childNodes","anchorNode","firstChild","anchorOffset","removeChild","getTextNodes","all","nextSibling","nodeType","normalizeFix","nf","Node","texts","ownerDocument","defaultView","anode","aoffset","fnode","focusNode","foffset","focusOffset","prevTxt","shift","curText","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","previousSibling","nodeValue","factory","root","define","amd","module","exports","rangy","isHostMethod","o","p","t","FUNCTION","OBJECT","isHostObject","isHostProperty","UNDEFINED","createMultiplePropertyTest","testFunc","props","isTextRange","range","areHostMethods","textRangeMethods","areHostProperties","textRangeProperties","getBody","getElementsByTagName","consoleLog","msg","console","log","alertOrLog","shouldAlert","isBrowser","alert","fail","reason","api","initialized","supported","config","alertOnFail","warn","alertOnWarn","getErrorDesc","description","init","testRange","implementsDomRange","implementsTextRange","domRangeMethods","domRangeProperties","nodeName","toLowerCase","createTextRange","features","errorMessage","moduleName","modules","Module","initListeners","deprecationNotice","deprecated","replacement","createAliasForDeprecatedMethod","owner","util","toArray","shim","shimListeners","dependencies","initializer","createModule","initFunc","newModule","stack","RangePrototype","SelectionPrototype","areHostObjects","forEach","arr","func","preferTextRange","autoInitialize","rangyAutoInitialize","extend","hasOwnProperty","obj","deep","createOptions","optionsParam","defaults","options","el","arrayLike","addListener","eventType","listener","addEventListener","addInitListener","addShimListener","createMissingNativeApi","requiredModule","requiredModuleNames","createError","createCoreModule","rangePrototype","selectionPrototype","isHtmlNamespace","ns","namespaceURI","UNDEF","parentElement","parent","getNodeIndex","getNodeLength","getCommonAncestor","node1","node2","n","ancestors","arrayContains","isAncestorOf","ancestor","descendant","selfIsAncestor","isOrIsAncestorOf","getClosestAncestorIn","isCharacterDataNode","isTextOrCommentNode","insertAfter","precedingNode","nextNode","insertBefore","splitDataNode","positionsToPreserve","newNode","cloneNode","deleteData","position","offset","getDocument","getWindow","parentWindow","getIframeDocument","iframeEl","contentDocument","contentWindow","getIframeWindow","isWindow","getContentDocument","methodName","tagName","getRootContainer","comparePoints","nodeA","offsetA","nodeB","offsetB","nodeC","childA","childB","isBrokenNode","inspectNode","crashyTextNodes","data","idAttr","id","innerHTML","fragmentFromNodeChildren","child","fragment","createDocumentFragment","createTestElement","html","contentEditable","bodyFirstChild","removeNode","NodeIterator","_next","createIterator","DomPosition","codeName","textNode","val","getComputedStyleProperty","getComputedStyle","propName","documentElement","currentStyle","_current","hasNext","next","detach","equals","pos","inspect","INDEX_SIZE_ERR","HIERARCHY_REQUEST_ERR","WRONG_DOCUMENT_ERR","NO_MODIFICATION_ALLOWED_ERR","NOT_FOUND_ERR","NOT_SUPPORTED_ERR","INVALID_STATE_ERR","INVALID_NODE_TYPE_ERR","isNonTextPartiallySelected","startContainer","endContainer","getRangeDocument","getRangeRoot","getBoundaryBeforeNode","getBoundaryAfterNode","insertNodeAtPosition","firstNodeInserted","rangesIntersect","rangeA","rangeB","touchingIsIntersecting","assertRangeValid","startComparison","startOffset","endOffset","endComparison","cloneSubtree","iterator","partiallySelected","subIterator","frag","isPartiallySelectedSubtree","getSubtreeIterator","iterateSubtree","rangeIterator","iteratorState","it","stop","subRangeIterator","deleteSubtree","extractSubtree","getNodesInRange","nodeTypes","filter","regex","filterNodeTypes","filterExists","RegExp","RangeIterator","sc","ec","getName","clonePartiallySelectedTextNodes","collapsed","so","eo","commonAncestorContainer","isSingleCharacterDataNode","_first","_last","createAncestorFinder","assertNoDocTypeNotationEntityAncestor","allowSelf","getDocTypeNotationEntityAncestor","assertValidNodeType","invalidTypes","assertValidOffset","assertSameDocumentOrFragment","getDocumentOrFragmentContainer","assertNodeNotReadOnly","getReadonlyAncestor","assertNode","isValidOffset","isRangeValid","splitRangeBoundaries","startEndSame","setStartAndEnd","rangeToHtml","container","cloneContents","copyComparisonConstantsToObject","START_TO_START","s2s","START_TO_END","s2e","END_TO_END","e2e","END_TO_START","e2s","NODE_BEFORE","n_b","NODE_AFTER","n_a","NODE_BEFORE_AND_AFTER","n_b_a","NODE_INSIDE","n_i","copyComparisonConstants","constructor","createRangeContentRemover","remover","boundaryUpdater","boundary","reset","createPrototypeRange","createBeforeAfterNodeSetter","isBefore","isStart","beforeAfterNodeTypes","rootContainerNodeTypes","setRangeStart","setRangeEnd","F","args","setBoundary","setStartBefore","setStartAfter","setEndBefore","setEndAfter","collapse","selectNodeContents","selectNode","start","end","extractContents","deleteContents","canSurroundContents","boundariesInvalid","splitBoundaries","splitBoundariesPreservingPositions","normalizeBoundaries","sibling","mergeForward","appendData","mergeBackward","nodeLength","insertData","nodeIndex","normalizeStart","endNode","startNode","collapseToPoint","updateCollapsedAndCommonAncestor","updateBoundaries","Range","current","subRange","cloneRange","readonlyNodeTypes","insertableNodeTypes","surroundNodeTypes","styleEl","htmlParsingConforms","createContextualFragment","fragmentStr","rangeProperties","compareBoundaryPoints","how","prefixA","prefixB","insertNode","clone","surroundContents","content","hasChildNodes","lastChild","prop","textParts","compareNode","comparePoint","toHtml","intersectsNode","isPointInRange","intersectsRange","intersectsOrTouchesRange","intersection","intersectionRange","union","unionRange","containsNode","allowPartial","containsNodeContents","containsRange","containsNodeText","nodeRange","textNodes","getNodes","lastTextNode","pop","collapseBefore","collapseAfter","getBookmark","containerNode","preSelectionRange","moveToBookmark","bookmark","charIndex","nextCharIndex","nodeStack","foundStart","rangesEqual","isValid","r1","r2","DomRange","WrappedRange","WrappedTextRange","updateRangeProperties","nativeRange","updateNativeRange","startMoved","endMoved","nativeRangeDifferent","rangeProto","refresh","testTextNode","oppositeName","range2","createNativeRange","getTextRangeContainerElement","textRange","parentEl","duplicate","startEl","endEl","startEndContainer","textRangeIsCollapsed","compareEndPoints","getTextRangeBoundaryPosition","wholeRangeContainerElement","isCollapsed","startInfo","workingRange","containerElement","canHaveHTML","boundaryPosition","nodeInfo","workingNode","comparison","previousNode","boundaryNode","workingComparisonType","childNodeCount","moveToElementText","Math","floor","setEndPoint","tempRange","rangeLength","text","moveStart","createBoundaryTextRange","boundaryParent","boundaryOffset","nodeIsDataNode","startBoundary","rangeContainerElement","rangeToTextRange","startRange","endRange","toTextRange","globalObj","createRangyRange","isDirectionBackward","dir","WrappedSelection","getWinSelection","winParam","getDocSelection","winSelectionIsBackward","sel","backward","updateAnchorAndFocusFromRange","anchorPrefix","focusPrefix","updateAnchorAndFocusFromNativeSelection","nativeSel","nativeSelection","updateEmptySelection","rangeCount","_ranges","getNativeRange","rangeContainsSingleElement","rangeNodes","getSingleElementFromRange","updateFromTextRange","wrappedRange","updateControlSelection","docSelection","controlRange","addRangeToControlSelection","rangeElement","newControlRange","createControlRange","select","deleteProperties","detached","actOnCachedSelection","action","cached","cachedRangySelections","createControlSelection","ranges","assertNodeInSameDocument","createStartOrEndSetter","getRangeAt","setSingleRange","isBackward","rangeInspects","anchor","focus","checkSelectionRanges","getNativeSelection","selectionIsCollapsed","BOOLEAN","NUMBER","CONTROL","implementsWinGetSelection","implementsDocSelection","useDocumentSelection","isSelectionValid","testSelection","selectionHasAnchorAndFocus","selectionHasExtend","selectionHasRangeCount","selectionSupportsMultipleRanges","collapsedNonEditableSelectionsSupported","addRangeBackwardToNative","originalSelectionRangeCount","selectionHasMultipleRanges","originalSelectionRanges","originalSelectionBackward","testEl","chromeMatch","navigator","appVersion","match","parseInt","testControlRange","implementsControlRange","getSelectionRangeAt","docSel","selProto","addRangeBackward","direction","previousRangeCount","clonedNativeRange","selectionIsBackward","setRanges","empty","refreshSelection","checkForChanges","oldRanges","oldAnchorNode","oldAnchorOffset","removeRangeManually","getAllRanges","removeRange","removed","isBackwards","rangeTexts","collapseToStart","collapseToEnd","selectAllChildren","deleteFromDocument","element","eachRange","callMethodOnEachRange","params","results","changeEachRange","rangeBookmarks","rangeBookmark","selRanges","saveRanges","restoreRanges","rangeHtmls","getNativeTextRange","detachAll","Selection","docReady","loadHandler","readyState","require","gEBI","getElementById","insertRangeBoundaryMarker","atStart","markerEl","markerId","Date","random","boundaryRange","style","lineHeight","display","className","markerTextChar","setRangeBoundary","compareRanges","saveRange","startMarkerId","endMarkerId","restoreRange","rangeInfo","rangeInfos","sort","saveSelection","restored","restoreSelection","savedSelection","preserveDirection","removeMarkerElement","removeMarkers","Base","_instance","_static","_prototyping","proto","base","klass","_constructing","implement","valueOf","source","value","previous","toSource","hidden","key","object","block","context","undefined","browser","iosVersion","userAgent","androidVersion","isIE","equation","re","rv","appName","exec","parseFloat","$1","isGecko","isWebKit","isChrome","isOpera","USER_AGENT","hasContentEditableSupport","hasEditingApiSupport","execCommand","queryCommandSupported","queryCommandState","hasQuerySelectorSupport","querySelector","isIncompatibleMobileBrowser","isIos","isAndroid","isTouchDevice","supportsEvent","supportsSandboxedIframes","throwsMixedContentWarningWhenIframeSrcIsEmpty","displaysCaretInEmptyContentEditableCorrectly","hasCurrentStyleProperty","insertsLineBreaksOnReturn","supportsPlaceholderAttributeOn","eventName","supportsEventsInIframeCorrectly","supportsHTML5Tags","html5","supportsCommand","buggyCommands","formatBlock","insertUnorderedList","insertOrderedList","insertHTML","command","isBuggy","e1","queryCommandEnabled","e2","doesAutoLinkingInContentEditable","canDisableAutoLinking","clearsContentEditableCorrectly","supportsGetAttributeCorrectly","td","canSelectImagesInContentEditable","autoScrollsToCaret","autoClosesUnclosedTags","clonedTestElement","supportsNativeGetElementsByClassName","getElementsByClassName","supportsSelectionModify","needsSpaceAfterLineBreak","supportsSpeechApiOn","input","chromeVersion","crashesWhenDefineProperty","property","doesAsyncFocus","hasProblemsSettingCaretAfterImg","hasUndoInContextMenu","hasInsertNodeIssue","hasIframeFocusIssue","createsNestedInvalidMarkupAfterPaste","supportsMutationEvents","supportsModernPaste","fixStyleKey","array","needle","without","arrayToSubstract","newArr","newArray","map","callback","thisArg","A","unique","vals","max","idx","Dispatcher","handler","events","off","handlers","newHandlers","fire","payload","observe","stopObserving","merge","otherObj","isPlainObject","difference","diffObj","newObj","isFunction","Text","isEmpty","WHITE_SPACE_START","WHITE_SPACE_END","ENTITY_REG_EXP","ENTITY_MAP","&","<",">","\"","\t","string","str","interpolate","vars","by","search","escapeHTML","linebreaks","convertSpaces","autoLink","ignoreInClasses","_hasParentThatShouldBeIgnored","_parseNode","_convertUrlsToLinks","URL_REG_EXP","url","punctuation","TRAILING_CHAR_REG_EXP","opening","BRACKETS","realUrl","displayUrl","MAX_DISPLAY_LENGTH","substr","_getTempElement","tempElement","_wysihtml5_tempElement","_wrapMatchesInNode","IGNORE_URLS_IN","childNodesLength",")","]","}","addClass","hasClass","removeClass","elementClassName","convertToList","_createListItem","list","listItem","_createList","listType","uneditableClass","childNode","lineBreak","isBlockElement","isLineBreak","currentListItem","lineBreaks","lineBreaksLength","getStyle","from","insert","after","replaceChild","copyAttributes","attributesToCopy","elementToCopyFrom","to","elementToCopyTo","attribute","andTo","callee","BOX_SIZING_PROPERTIES","shouldIgnoreBoxSizingBorderBox","hasBoxSizingBorderBox","offsetWidth","copyStyles","stylesToCopy","cssText","setStyles","delegate","removeEventListener","parents","unshift","domNode","defaultNodeTypes","is","emptyTextNode","ignoreWhitespace","regx","visible","isVisible","getTextContent","prev","prevNode","types","ignoreBlankTexts","commonAncestor","parents1","parents2","lastLeafNode","leafClasses","escapeParent","newWrapper","split2","nodeWrap","curNode","properties","query","classRegExp","styleProperty","hasOneStyle","styles","j","maxStyleP","styleValue","attr","getAttributes","attrList","hasOneAttribute","attributeValue","getAsDom","_innerHTMLShiv","_ensureHTML5Compatibility","_wysihtml5_supportsHTML5Tags","HTML5_ELEMENTS","getParentElement","levels","camelize","REG_EXP_CAMELIZE","charAt","toUpperCase","stylePropertyMapping","float","camelizedProperty","originalOverflow","needsOverflowReset","overflow","getPropertyValue","ingoreEmpty","textContent","hasElementWithTagName","_getDocumentIdentifier","_wysihtml5_identifier","DOCUMENT_IDENTIFIER","LIVE_CACHE","cacheEntry","hasElementWithClassName","elementToInsert","before","into","insertCSS","rules","styleElement","styleSheet","link","head","_isLineBreak","_isLineBreakOrBlockElement","eventNames","handlerWrapper","parse","elementOrHtml_current","config_current","elementOrHtml","currentRules","defaultRules","isString","clearInternals","selectors","_applySelectorRules","_convert","cleanUp","unjoinNbsps","txtnodes","getCorrectInnerHTML","oldNode","newChild","nodeDisplay","oldNodeType","oldChilds","oldChildsLength","NODE_TYPE_MAPPING","blockElements","DEFAULT_NODE_NAME","attributes","selectorRules","els","elementHandlingMethods","_handleElement","rule","renameTag","tagRules","tags","scopeName","_wysihtml5","outerHTML","unwrap","rename_tag","one_of_type","_testTypes","remove_action","remove_action_rename_to","_handleAttributes","_handleStyles","definition","type_definitions","_testType","classesLength","styleProp","nodeClasses","nodeStyles","methods","m","typeCeckMethods","WHITE_SPACE_REG_EXP","sp","attrs","v","keep_styles","styleFloat","cssFloat","_getAttributesBeginningWith","beginning","returnAttributes","_checkAttribute","attributeName","newAttributeValue","attributeCheckMethods","_checkAttributes","local_attributes","newValue","matchingAttributes","globalAttributes","checkAttributes","oldAttributes","imax","currentClass","newClass","setClass","set_class","add_class","addStyle","add_style","setAttributes","set_attributes","allowedClasses","newClasses","oldClasses","check_attributes","addClassMethods","addStyleMethods","newStyle","classes_blacklist","src","width","height","_handleText","_handleComment","comments","createComment","1","3","8","REG_EXP","href","alt","numbers","dimension","any","align_text","mapping","left","right","center","align_img","justify","clear_br","both","size_font","2","4","5","6","7","-","+","has_visible_contet","txt","visibleElements","offsetHeight","removeEmptyTextNodes","renameElement","newNodeName","newElement","replaceWithChildNodes","_isBlockElement","_appendLineBreak","resolveList","useLineBreaks","isLastChild","shouldAppendLineBreak","paragraph","isLastItem","lastListItem","lastElementChild","firstElementChild","windowProperties","windowProperties2","documentProperties","Sandbox","readyCallback","editableArea","_createIframe","insertInto","getIframe","_readyError","destroy","iframe","that","security","allowtransparency","frameborder","marginwidth","marginheight","onload","onreadystatechange","_onLoadIframe","iframeWindow","iframeDocument","charset","characterSet","sandboxHtml","_getHtml","stylesheets","open","write","close","onerror","fileName","lineNumber","_unset","loaded","setTimeout","templateVars","setter","__defineSetter__","ContentEditableArea","getContentEditable","_bindElement","_createElement","_loadElement","contentExists","innerHtml","simulatePlaceholder","editor","placeholderText","placeholderClassName","CLASS_NAME","unset","composerIsVisible","hasPlaceholderSet","clear","placeholderSet","setValue","setTextContent","HAS_GET_ATTRIBUTE_BUG","isLoadedImage","hasAttribute","specified","complete","queryInList","q","removeElement","referenceNode","tag","MapCell","cell","isColspan","isRowspan","firstCol","lastCol","firstRow","lastRow","isReal","spanCollection","modified","TableModifyerByCell","table","addSpannedCellToMap","cspan","rspan","spanCollect","rmax","cmax","rr","cc","setCellAsModified","smax","setTableMap","ridx","row","cells","cidx","tableRows","getTableRows","getRowCells","inlineTables","inlineCells","allCells","tableCells","inlineRows","allRows","getMapIndex","r_length","c_length","r_idx","c_idx","col","getElementAtIndex","getMapElsTo","to_cell","idx_start","idx_end","temp_idx","temp_cidx","maxr","maxc","orderSelectionEnds","secondcell","createCells","nr","correctColIndexForUnreals","corrIdx","getLastNewCellOnRow","rowLimit","removeEmptyTable","splitRowToCells","colspan","cType","newCells","removeAttribute","getRealRowEl","injectRowAt","new_cells","n_cidx","canMerge","decreaseCellSpan","span","removeSurplusLines","allRowspan","fillMissingCells","r_max","c_max","prevcell","rectify","unmerge","thisCell","rowspan","collapseCellToNextRow","cellIdx","newRowIdx","newIdx","lastCell","removeRowCell","getRowElementsByCell","modRow","getColumnElementsByCell","removeRow","oldRow","removeColCell","removeColumn","what","addRow","where","newRow","addRowCell","cr","colSpanAttr","addColumn","addColCell","doAdd","handleCellAddWithRowspan","modCell","temp_r_cells","nrow","addRowsNr","crow","getCellsBetween","cell1","cell2","c1","addCells","removeCells","mergeCellsBetween","unmergeCell","findCell","findRowByCell","findColumnByCell","elements","thisOwner","otherOwner","point","location_index","smallest_common_ancestor","this_index","other_index","children","getPastedHtml","clipboardData","getData","getPastedHtmlWithDiv","composer","selBookmark","cleanerDiv","scrollPos","getScrollPos","top","y","x","setBookmark","removeInvisibleSpaces","cleanPastedHTML","styleToRegex","styleStr","trimmedStr","escapedStr","extendRulesWithStyleExceptions","exceptStyles","newRules","pickRuleset","ruleset","defaultSet","condition","newHtml","color","fontSize","ensureProperClearing","clearIfNecessary","TILDE_ESCAPED","urlToSearch","elementsWithTilde","redraw","tableCellsSelection","editable","handleMouseDown","handleSelectionMousedown","removeCellSelections","selection_class","handleMouseMove","handleMouseUp","selectedCells","addSelections","oldEnd","curTable","deselect","bindSideclick","sideClickHandler","selectCells","getColorParseMethod","colorStr","colorTypeConf","colorParseMethods","getColorFormat","rgba","rgb","hex6","radix","hex3","makeParamRegExp","styleParser","parseColor","stylesStr","paramName","paramsRegex","colorType","colorMatch","unparseColor","colorFormat","hexRadix","parseFontSize","_getCumulativeOffsetTop","offsetTop","offsetParent","getDepth","getWebkitSelectionFixNode","blankNode","placeholderRemover","delayedPlaceholderRemover","minWidth","expandRangeToSurround","common","start_depth","end_depth","contain","unselectableClass","getRange","setSelection","setBefore","createTemporaryCaretSpaceAfter","caretPlaceholder","caretPlaceholderText","keyDownHandler","setAfter","ctrlKey","metaKey","zIndex","notVisual","fixWebkitSelection","lastSibling","activeElement","setScrollPos","avoidInvisibleSpace","isElement","displayStyle","getSelectedNode","fixSelBorders","getSelectedOwnNodes","getOwnRanges","ownNodes","maxi","findNodesInSelection","curNodes","filterElements","containsUneditable","uneditables","getOwnUneditables","startParent","endParent","ev","CustomEvent","dispatchEvent","err","getPreviousNode","ignoreEmpty","getSelectionParentsByTag","curEl","getRangeToNodeEnd","sNode","lastR","caretIsLastInSelection","endc","endtxt","caretIsFirstInSelection","caretIsInTheBeginnig","ofNode","getBeforeSelection","includePrevLeaves","inTmpCaret","rng","prevLeaf","executeAndRestoreRangy","restoreScrollPosition","executeAndRestore","newCaretPlaceholder","prevSibling","newRange","oldScrollTop","scrollTop","oldScrollLeft","scrollLeft","placeholderHtml","canAppendChild","anchorNodeTagNameLower","voidElements","splitElementAtCaret","contentAfterRangeStart","surround","nodeOptions","cssStyle","deblockAndSurround","tempDivElements","tempElements","scrollIntoView","tolerance","hasScrollBars","scrollHeight","_wysihtml5ScrollIntoViewElement","selectLine","_selectLine_W3C","_selectLine_MSIE","modify","toLineBoundary","location","rangeBottom","rangeEnd","measureNode","rangeTop","boundingTop","scrollWidth","moveToPoint","getText","getOwnNodes","splitBounds","fixRangeOverflow","containment","_detectInlineRangeProblems","previousElementSibling","_endOffsetForNode","dontFix","allUneditables","deepUneditables","tmpRanges","tmpRange","jmax","selectAll","blankEndNode","blankStartNode","doSelect","notSelected","getHtml","getPlainText","isEndToEndInNode","nodeNames","isInThisEditable","cssClass","regExp","matchingClassNames","hasStyleAttr","removeStyle","s2","getMatchingStyleRegexp","regexes","sSplit","elStyle","isMatchingAllready","areMatchingAllready","removeOrChangeStyle","exactRegex","hasSameClasses","el1","el2","REG_EXP_WHITE_SPACE","replaceWithOwnChildren","elementsHaveSameNonClassAttributes","attr1","attr2","getNamedItem","isSplitPoint","splitNodeAt","descendantNode","descendantOffset","Merge","firstNode","isElementMerge","firstTextNode","HTMLApplier","tagNames","similarClassRegExp","similarStyleRegExp","defaultTagName","applyToAnyTagName","doMerge","textBits","getLength","getAncestorWithClass","cssClassMatch","getAncestorWithStyle","cssStyleMatch","getMatchingAncestor","matchType","postApply","currentMerge","precedingTextNode","lastNode","merges","rangeStartNode","rangeEndNode","rangeStartOffset","rangeEndOffset","getAdjacentMergeableTextNode","nextTextNode","forward","adjacentNode","isTextNode","areElementsMergeable","createContainer","applyToTextNode","isRemovable","undoToTextNode","ancestorWithClass","ancestorWithStyle","styleMode","styleChanged","ancestorRange","applyToRange","ri","undoToRange","getTextSelectedByRange","isAppliedToRange","appliedType","coverage","selectedText","toggleRange","parentsExactMatch","isApplied","Commands","support","commandValue","state","stateValue","bold","formatInline","getOptions","createLink","opts","removeLink","size","fontSizeStyle","st","foreColor","foreColorStyle","colorVals","colString","bgColorStyle","correctOptionsForSimilarityCheck","cleanup","allElements","BLOCK_ELEMENTS","classNames","uneditableContainer","defaultNodeName","findOuterBlock","allBlocks","UNNESTABLE_BLOCK_ELEMENTS","cloneOuterInlines","innerNode","INLINE_ELEMENTS","outerNode","applyOptionsToElement","removeOptionsFromElement","unwrapBlocksFromContent","contentBlocks","fixRangeCoverage","wrapRangeWithElement","defaultName","defaultOptions","wrapper","blocks","rangeStartContainer","similarOptions","similarOuterBlock","splitAllBlocks","firstOuterBlock","tmpEl","outerInlines","getParentBlockNodeName","newBlockElements","parentNodes","formatCode","classname","selectedNodes","pre","selectedNode","hasNoClass","hasNoStyle","hasNoAttributes","isSameNode","element1","element2","classes1","classes2","createWrapNode","defaultTag","containsSameAttributes","updateElementAttributes","newAttributes","fullContain","updateFormatOfElement","nodeNameQuery","nodeQueryMatch","queryAliasMap","getSelectedTextNodes","findSimilarTextNodeWrapper","exact","isSimilarNode","selectRange","selectTextNodes","lastText","selectTextNode","getState","caretNode","searchNodes","partial","caretIsInsideWord","beforeChar","afterChar","getRangeForWord","offsetStart","offsetEnd","txtNodes","wordOffset","mergeContents","mergeConsequentSimilarElements","cleanupAndSetSelection","cleanupAndSetCaret","formatTextNode","wrapNode","unformatTextNode","newWrapNode","removeFormatFromTextNode","formatTextRange","updateFormat","wordObj","exactState","removeFormat","textOffset","applyFormat","fixOptions","b","strong","em","insertBlockQuote","NODE_NAME","insertImage","image","imagesInSelection","LINE_BREAK","insertLineBreak","insertList","isNode","findListEl","other","parentLi","otherNodeName","handleSameTypeList","otherLists","innerLists","getListsInSelection","handleOtherTypeList","renameLists","createListFallback","tempClassName","getTime","cmd","italic","justifyCenter","justifyLeft","justifyRight","justifyFull","alignRightStyle","alignLeftStyle","alignCenterStyle","redo","undoManager","underline","undo","createTable","cols","rows","tableStyle","mergeTableCells","tableSelection","addTableCells","tableSelect","deleteTableCells","selCell","indentList","listEls","tryToPushLiLevel","liNodes","listTag","prevLi","liNode","prevLiList","found","outdentList","tryToPullLiLevel","listNode","outerListNode","outerLiNode","afterList","getAfterList","newList","subscript","superscript","Z_KEY","Y_KEY","MAX_HISTORY_ENTRIES","DATA_ATTR_NODE","DATA_ATTR_OFFSET","UndoManager","historyStr","historyDom","transact","_observe","lastKey","sandbox","altKey","isUndo","shiftKey","isRedo","previousHtml","currentHtml","getValue","getChildNodeIndex","undoPossible","redoPossible","historyEntry","getChildNodeByIndex","View","textareaElement","noTextarea","_observeViewChange","currentView","show","hide","disable","enable","Composer","CARET_HACK","editableElement","textarea","contentEditableMode","_initContentEditableArea","_initSandbox","_displayStyle","disabled","setToEnd","pageYOffset","pageXOffset","scrollTo","_create","_createWysiwygFormField","form","hiddenField","placeholder","_initAutoLinking","_initObjectResizing","_initUndoManager","_initLineBreaking","initSync","sync","supportsDisablingOfAutoLinking","supportsAutoLinking","nodeWithSelection","isInUneditable","links","urlRegExp","newTextContent","propertiesLength","adjust","USE_NATIVE_LINE_BREAK_INSIDE_TAGS","LIST_TAGS","blockElement","HOST_TEMPLATE","TEXT_FORMATTING","BOX_FORMATTING","ADDITIONAL_CSS_RULES","focusWithoutScrolling","setActive","elementStyle","originalScrollTop","originalScrollLeft","originalStyles","WebkitUserSelect","displayValueForCopying","originalActiveElement","hasPlaceholder","originalPlaceholder","originalDisplayValue","originalDisabled","focusStylesHost","blurStylesHost","disabledStylesHost","blur","boxFormattingStyles","shortcuts","66","73","85","addListeners","removeListeners","fixLastBrDeletionInTable","aNode","handleUneditableDeletion","fixDeleteInTheBeginnigOfHeading","selNode","commonAncestorNode","handleDeleteKeyPress","handleTabKeyDown","handleDomNodeRemoved","domNodeRemovedInterval","clearInterval","handleUserInteraction","handleFocus","focusState","handleBlur","changeevent","create","handlePaste","handleCopy","copyedFromMarking","setData","handleKeyUp","allImages","notMyImages","myImages","handleMouseOver","title","titlePrefixes","IMG","handleClick","uneditable","handleDrop","handleKeyDown","handleTabKey","initTableHandling","hideHandlers","iframeInitiator","focusBlurElement","setInterval","handleTables","INTERVAL","Synchronizer","fromComposerToTextarea","shouldParseHtml","fromTextareaToComposer","textareaValue","interval","startInterval","stopInterval","SourceView","switchToTextarea","composerStyles","switchToComposer","Textarea","supportsPlaceholder","eventMapping","focusin","focusout","undef","defaultConfig","showToolbarAfterInit","showToolbarDialogsOnSelection","parserRules","br","div","pasteParserRulesets","parser","supportTouchDevices","Editor","_isCompatible","_initParser","handleBeforeLoad","sourceView","synchronizer","Toolbar","isCompatible","htmlOrElement","parseContext","oldHtml","_cleanAndPaste","pastedHTML","cleanHtml","CLASS_NAME_OPENED","SELECTOR_FORM_ELEMENTS","SELECTOR_FIELDS","ATTRIBUTE_FIELDS","Dialog","_observed","callbackWrapper","_serialize","cancel","fields","_interpolate","avoidHiddenFields","field","fieldName","focusedElement","elementToChange","defaultValue","update","firstField","isOpen","_hide","linkStyles","wrapperStyles","margin","opacity","padding","inputStyles","cursor","marginTop","outline","inputAttributes","x-webkit-speech","speech","Speech","getCommandState","dialog","multiselect","CLASS_NAME_COMMAND_DISABLED","CLASS_NAME_COMMANDS_DISABLED","CLASS_NAME_COMMAND_ACTIVE","CLASS_NAME_ACTION_ACTIVE","showOnInit","_getLinks","classNameCommandDisabled","classNameCommandsDisabled","classNameCommandActive","classNameActionActive","speechInputLinks","group","tracksBlankValue","_getDialog","caretBookmark","dialogElement","dialogContainer","commandLink","_execCommand","_hideAllDialogs","_preventInstantFocus","commandsDisabled","_updateLinkStates","execAction","commandLinks","actionLinks","unselectable","commandObj","commandMapping","preventFocus","displayDialogAttributeValue","actionMapping","dataset","showdialogonselection","Dialog_createTable","Dialog_foreColorStyle","colourMode","firstElement","colourStr","colour","colormode","Dialog_fontSizeStyle"],"mappings":";;AAWA,GAAIA,YACFC,QAAS,eAGTC,YACAC,OACAC,UACAC,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,OAInB9sD"}
\ No newline at end of file
+{"version":3,"file":"wysihtml-toolbar.min.js","sources":["wysihtml-toolbar.js"],"names":["wysihtml5","version","commands","dom","quirks","toolbar","lang","selection","views","INVISIBLE_SPACE","INVISIBLE_SPACE_REG_EXP","EMPTY_FUNCTION","ELEMENT_NODE","TEXT_NODE","BACKSPACE_KEY","ENTER_KEY","ESCAPE_KEY","SPACE_KEY","TAB_KEY","DELETE_KEY","polyfills","win","doc","String","prototype","trim","rtrim","this","replace","s_add","s_rem","Element","on","fn","self","attachEvent","e","event","target","srcElement","preventDefault","returnValue","stopPropagation","cancelBubble","which","button","keyCode","call","detachEvent","Object","defineProperty","getOwnPropertyDescriptor","get","innerText","set","s","Array","isArray","arg","toString","indexOf","a","f","c","length","r","d","Function","bind","oThis","TypeError","aArgs","slice","arguments","fToBind","fNOP","fBound","apply","concat","ElementPrototype","matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","selector","node","nodes","parentNode","document","querySelectorAll","i","createElement","testElement","classList","add","contains","createMethod","method","original","DOMTokenList","token","len","toggle","_toggle","force","view","classListProp","protoProp","elemCtrProto","objCtr","strTrim","arrIndexOf","item","DOMEx","type","message","name","code","DOMException","checkTokenAndGetIndex","test","ClassList","elem","trimmedClasses","getAttribute","classes","split","push","_updateClassName","setAttribute","classListProto","classListGetter","Error","tokens","l","updated","remove","index","splice","result","join","classListPropDesc","enumerable","configurable","ex","number","__defineGetter__","normalizeHasCaretError","window","ret","t1","createTextNode","t2","t3","createRange","appendChild","body","setStart","setEnd","getSelection","removeAllRanges","addRange","normalize","childNodes","anchorNode","firstChild","anchorOffset","removeChild","getTextNodes","all","nextSibling","nodeType","normalizeFix","nf","Node","texts","ownerDocument","defaultView","anode","aoffset","aelement","undefined","fnode","focusNode","foffset","focusOffset","felement","prevTxt","shift","curText","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","DOCUMENT_POSITION_CONTAINS","previousSibling","nodeValue","factory","root","define","amd","module","exports","rangy","isHostMethod","o","p","t","FUNCTION","OBJECT","isHostObject","isHostProperty","UNDEFINED","createMultiplePropertyTest","testFunc","props","isTextRange","range","areHostMethods","textRangeMethods","areHostProperties","textRangeProperties","getBody","getElementsByTagName","consoleLog","msg","console","log","alertOrLog","shouldAlert","isBrowser","alert","fail","reason","api","initialized","supported","config","alertOnFail","warn","alertOnWarn","getErrorDesc","description","init","testRange","implementsDomRange","implementsTextRange","domRangeMethods","domRangeProperties","nodeName","toLowerCase","createTextRange","features","errorMessage","moduleName","modules","Module","initListeners","deprecationNotice","deprecated","replacement","createAliasForDeprecatedMethod","owner","util","toArray","shim","shimListeners","dependencies","initializer","createModule","initFunc","newModule","stack","RangePrototype","SelectionPrototype","areHostObjects","forEach","arr","func","preferTextRange","autoInitialize","rangyAutoInitialize","extend","hasOwnProperty","obj","deep","createOptions","optionsParam","defaults","options","el","arrayLike","addListener","eventType","listener","addEventListener","addInitListener","addShimListener","createMissingNativeApi","requiredModule","requiredModuleNames","createError","createCoreModule","rangePrototype","selectionPrototype","isHtmlNamespace","ns","namespaceURI","UNDEF","parentElement","parent","getNodeIndex","getNodeLength","getCommonAncestor","node1","node2","n","ancestors","arrayContains","isAncestorOf","ancestor","descendant","selfIsAncestor","isOrIsAncestorOf","getClosestAncestorIn","isCharacterDataNode","isTextOrCommentNode","insertAfter","precedingNode","nextNode","insertBefore","splitDataNode","positionsToPreserve","newNode","cloneNode","deleteData","position","offset","getDocument","getWindow","parentWindow","getIframeDocument","iframeEl","contentDocument","contentWindow","getIframeWindow","isWindow","getContentDocument","methodName","tagName","getRootContainer","comparePoints","nodeA","offsetA","nodeB","offsetB","nodeC","childA","childB","isBrokenNode","inspectNode","crashyTextNodes","data","idAttr","id","innerHTML","fragmentFromNodeChildren","child","fragment","createDocumentFragment","createTestElement","html","contentEditable","bodyFirstChild","removeNode","NodeIterator","_next","createIterator","DomPosition","codeName","textNode","val","getComputedStyleProperty","getComputedStyle","propName","documentElement","currentStyle","_current","hasNext","next","detach","equals","pos","inspect","INDEX_SIZE_ERR","HIERARCHY_REQUEST_ERR","WRONG_DOCUMENT_ERR","NO_MODIFICATION_ALLOWED_ERR","NOT_FOUND_ERR","NOT_SUPPORTED_ERR","INVALID_STATE_ERR","INVALID_NODE_TYPE_ERR","isNonTextPartiallySelected","startContainer","endContainer","getRangeDocument","getRangeRoot","getBoundaryBeforeNode","getBoundaryAfterNode","insertNodeAtPosition","firstNodeInserted","rangesIntersect","rangeA","rangeB","touchingIsIntersecting","assertRangeValid","startComparison","startOffset","endOffset","endComparison","cloneSubtree","iterator","partiallySelected","subIterator","frag","isPartiallySelectedSubtree","getSubtreeIterator","iterateSubtree","rangeIterator","iteratorState","it","stop","subRangeIterator","deleteSubtree","extractSubtree","getNodesInRange","nodeTypes","filter","regex","filterNodeTypes","filterExists","RegExp","RangeIterator","sc","ec","getName","clonePartiallySelectedTextNodes","collapsed","so","eo","commonAncestorContainer","isSingleCharacterDataNode","_first","_last","createAncestorFinder","assertNoDocTypeNotationEntityAncestor","allowSelf","getDocTypeNotationEntityAncestor","assertValidNodeType","invalidTypes","assertValidOffset","assertSameDocumentOrFragment","getDocumentOrFragmentContainer","assertNodeNotReadOnly","getReadonlyAncestor","assertNode","isValidOffset","isRangeValid","splitRangeBoundaries","startEndSame","setStartAndEnd","rangeToHtml","container","cloneContents","copyComparisonConstantsToObject","START_TO_START","s2s","START_TO_END","s2e","END_TO_END","e2e","END_TO_START","e2s","NODE_BEFORE","n_b","NODE_AFTER","n_a","NODE_BEFORE_AND_AFTER","n_b_a","NODE_INSIDE","n_i","copyComparisonConstants","constructor","createRangeContentRemover","remover","boundaryUpdater","boundary","reset","createPrototypeRange","createBeforeAfterNodeSetter","isBefore","isStart","beforeAfterNodeTypes","rootContainerNodeTypes","setRangeStart","setRangeEnd","F","args","setBoundary","setStartBefore","setStartAfter","setEndBefore","setEndAfter","collapse","selectNodeContents","selectNode","start","end","extractContents","deleteContents","canSurroundContents","boundariesInvalid","splitBoundaries","splitBoundariesPreservingPositions","normalizeBoundaries","sibling","mergeForward","appendData","mergeBackward","nodeLength","insertData","nodeIndex","normalizeStart","endNode","startNode","collapseToPoint","updateCollapsedAndCommonAncestor","updateBoundaries","Range","current","subRange","cloneRange","readonlyNodeTypes","insertableNodeTypes","surroundNodeTypes","styleEl","htmlParsingConforms","createContextualFragment","fragmentStr","rangeProperties","compareBoundaryPoints","how","prefixA","prefixB","insertNode","clone","surroundContents","content","hasChildNodes","lastChild","prop","textParts","compareNode","comparePoint","toHtml","intersectsNode","isPointInRange","intersectsRange","intersectsOrTouchesRange","intersection","intersectionRange","union","unionRange","containsNode","allowPartial","containsNodeContents","containsRange","containsNodeText","nodeRange","textNodes","getNodes","lastTextNode","pop","collapseBefore","collapseAfter","getBookmark","containerNode","preSelectionRange","moveToBookmark","bookmark","charIndex","nextCharIndex","nodeStack","foundStart","rangesEqual","isValid","r1","r2","DomRange","WrappedRange","WrappedTextRange","updateRangeProperties","nativeRange","updateNativeRange","startMoved","endMoved","nativeRangeDifferent","rangeProto","refresh","testTextNode","oppositeName","range2","createNativeRange","getTextRangeContainerElement","textRange","parentEl","duplicate","startEl","endEl","startEndContainer","textRangeIsCollapsed","compareEndPoints","getTextRangeBoundaryPosition","wholeRangeContainerElement","isCollapsed","startInfo","workingRange","containerElement","canHaveHTML","boundaryPosition","nodeInfo","workingNode","comparison","previousNode","boundaryNode","workingComparisonType","childNodeCount","moveToElementText","Math","floor","setEndPoint","tempRange","rangeLength","text","moveStart","createBoundaryTextRange","boundaryParent","boundaryOffset","nodeIsDataNode","startBoundary","rangeContainerElement","rangeToTextRange","startRange","endRange","toTextRange","globalObj","createRangyRange","isDirectionBackward","dir","WrappedSelection","getWinSelection","winParam","getDocSelection","winSelectionIsBackward","sel","backward","updateAnchorAndFocusFromRange","anchorPrefix","focusPrefix","updateAnchorAndFocusFromNativeSelection","nativeSel","nativeSelection","updateEmptySelection","rangeCount","_ranges","getNativeRange","rangeContainsSingleElement","rangeNodes","getSingleElementFromRange","updateFromTextRange","wrappedRange","updateControlSelection","docSelection","controlRange","addRangeToControlSelection","rangeElement","newControlRange","createControlRange","select","deleteProperties","detached","actOnCachedSelection","action","cached","cachedRangySelections","createControlSelection","ranges","assertNodeInSameDocument","createStartOrEndSetter","getRangeAt","setSingleRange","isBackward","rangeInspects","anchor","focus","checkSelectionRanges","getNativeSelection","selectionIsCollapsed","BOOLEAN","NUMBER","CONTROL","implementsWinGetSelection","implementsDocSelection","useDocumentSelection","isSelectionValid","testSelection","selectionHasAnchorAndFocus","selectionHasExtend","selectionHasRangeCount","selectionSupportsMultipleRanges","collapsedNonEditableSelectionsSupported","addRangeBackwardToNative","originalSelectionRangeCount","selectionHasMultipleRanges","originalSelectionRanges","originalSelectionBackward","testEl","chromeMatch","navigator","appVersion","match","parseInt","testControlRange","implementsControlRange","getSelectionRangeAt","docSel","selProto","addRangeBackward","direction","previousRangeCount","clonedNativeRange","selectionIsBackward","setRanges","empty","refreshSelection","checkForChanges","oldRanges","oldAnchorNode","oldAnchorOffset","removeRangeManually","getAllRanges","removeRange","removed","isBackwards","rangeTexts","collapseToStart","collapseToEnd","selectAllChildren","deleteFromDocument","element","eachRange","callMethodOnEachRange","params","results","changeEachRange","rangeBookmarks","rangeBookmark","selRanges","saveRanges","restoreRanges","rangeHtmls","getNativeTextRange","detachAll","Selection","docReady","loadHandler","readyState","require","gEBI","getElementById","insertRangeBoundaryMarker","atStart","markerEl","markerId","Date","random","boundaryRange","style","lineHeight","display","className","markerTextChar","setRangeBoundary","compareRanges","saveRange","startMarkerId","endMarkerId","restoreRange","rangeInfo","rangeInfos","sort","saveSelection","restored","restoreSelection","savedSelection","preserveDirection","removeMarkerElement","removeMarkers","Base","_instance","_static","_prototyping","proto","base","klass","_constructing","implement","valueOf","source","value","previous","toSource","hidden","key","object","block","context","browser","iosVersion","userAgent","androidVersion","isIE","equation","re","rv","appName","exec","parseFloat","$1","isGecko","isWebKit","isChrome","isOpera","USER_AGENT","hasContentEditableSupport","hasEditingApiSupport","execCommand","queryCommandSupported","queryCommandState","hasQuerySelectorSupport","querySelector","isIncompatibleMobileBrowser","isIos","isAndroid","isTouchDevice","supportsEvent","supportsSandboxedIframes","throwsMixedContentWarningWhenIframeSrcIsEmpty","displaysCaretInEmptyContentEditableCorrectly","hasCurrentStyleProperty","insertsLineBreaksOnReturn","supportsPlaceholderAttributeOn","eventName","supportsEventsInIframeCorrectly","supportsHTML5Tags","html5","supportsCommand","buggyCommands","formatBlock","insertUnorderedList","insertOrderedList","insertHTML","command","isBuggy","e1","queryCommandEnabled","e2","doesAutoLinkingInContentEditable","canDisableAutoLinking","clearsContentEditableCorrectly","supportsGetAttributeCorrectly","td","canSelectImagesInContentEditable","autoScrollsToCaret","autoClosesUnclosedTags","clonedTestElement","supportsNativeGetElementsByClassName","getElementsByClassName","supportsSelectionModify","needsSpaceAfterLineBreak","supportsSpeechApiOn","input","chromeVersion","crashesWhenDefineProperty","property","doesAsyncFocus","hasProblemsSettingCaretAfterImg","hasUndoInContextMenu","hasInsertNodeIssue","hasIframeFocusIssue","createsNestedInvalidMarkupAfterPaste","supportsMutationEvents","supportsModernPaste","fixStyleKey","array","needle","without","arrayToSubstract","newArr","newArray","map","callback","thisArg","A","unique","vals","max","idx","Dispatcher","handler","events","off","handlers","newHandlers","fire","payload","observe","stopObserving","merge","otherObj","isPlainObject","difference","diffObj","newObj","isFunction","Text","isEmpty","WHITE_SPACE_START","WHITE_SPACE_END","ENTITY_REG_EXP","ENTITY_MAP","&","<",">","\"","\t","string","str","interpolate","vars","by","search","escapeHTML","linebreaks","convertSpaces","autoLink","ignoreInClasses","_hasParentThatShouldBeIgnored","_parseNode","_convertUrlsToLinks","URL_REG_EXP","url","punctuation","TRAILING_CHAR_REG_EXP","opening","BRACKETS","realUrl","displayUrl","MAX_DISPLAY_LENGTH","substr","_getTempElement","tempElement","_wysihtml5_tempElement","_wrapMatchesInNode","IGNORE_URLS_IN","childNodesLength",")","]","}","addClass","hasClass","removeClass","elementClassName","convertToList","_createListItem","list","listItem","_createList","listType","uneditableClass","childNode","lineBreak","isBlockElement","isLineBreak","currentListItem","lineBreaks","lineBreaksLength","getStyle","from","insert","after","replaceChild","copyAttributes","attributesToCopy","elementToCopyFrom","to","elementToCopyTo","attribute","andTo","callee","BOX_SIZING_PROPERTIES","shouldIgnoreBoxSizingBorderBox","hasBoxSizingBorderBox","offsetWidth","copyStyles","stylesToCopy","cssText","setStyles","delegate","removeEventListener","parents","unshift","domNode","defaultNodeTypes","is","emptyTextNode","ignoreWhitespace","regx","visible","isVisible","getTextContent","prev","prevNode","types","ignoreBlankTexts","commonAncestor","parents1","parents2","lastLeafNode","leafClasses","escapeParent","newWrapper","split2","nodeWrap","curNode","properties","query","classRegExp","styleProperty","hasOneStyle","styles","j","maxStyleP","styleValue","attr","getAttributes","attrList","hasOneAttribute","attributeValue","getAsDom","_innerHTMLShiv","_ensureHTML5Compatibility","_wysihtml5_supportsHTML5Tags","HTML5_ELEMENTS","getParentElement","levels","camelize","REG_EXP_CAMELIZE","charAt","toUpperCase","stylePropertyMapping","float","camelizedProperty","originalOverflow","needsOverflowReset","overflow","getPropertyValue","ingoreEmpty","textContent","hasElementWithTagName","_getDocumentIdentifier","_wysihtml5_identifier","DOCUMENT_IDENTIFIER","LIVE_CACHE","cacheEntry","hasElementWithClassName","elementToInsert","before","into","insertCSS","rules","styleElement","styleSheet","link","head","_isLineBreak","_isLineBreakOrBlockElement","eventNames","handlerWrapper","parse","elementOrHtml_current","config_current","elementOrHtml","currentRules","defaultRules","isString","clearInternals","selectors","_applySelectorRules","_convert","cleanUp","unjoinNbsps","txtnodes","getCorrectInnerHTML","oldNode","newChild","nodeDisplay","oldNodeType","oldChilds","oldChildsLength","NODE_TYPE_MAPPING","blockElements","DEFAULT_NODE_NAME","attributes","selectorRules","els","elementHandlingMethods","_handleElement","rule","renameTag","tagRules","tags","scopeName","_wysihtml5","outerHTML","unwrap","rename_tag","one_of_type","_testTypes","remove_action","remove_action_rename_to","_handleAttributes","_handleStyles","definition","type_definitions","_testType","classesLength","styleProp","nodeClasses","nodeStyles","methods","m","typeCeckMethods","WHITE_SPACE_REG_EXP","sp","attrs","v","keep_styles","styleFloat","cssFloat","_getAttributesBeginningWith","beginning","returnAttributes","_checkAttribute","attributeName","newAttributeValue","attributeCheckMethods","_checkAttributes","local_attributes","newValue","matchingAttributes","globalAttributes","checkAttributes","oldAttributes","imax","currentClass","newClass","setClass","set_class","add_class","addStyle","add_style","setAttributes","set_attributes","allowedClasses","newClasses","oldClasses","check_attributes","addClassMethods","addStyleMethods","newStyle","classes_blacklist","src","width","height","_handleText","_handleComment","comments","createComment","1","3","8","REG_EXP","href","alt","numbers","dimension","any","align_text","mapping","left","right","center","align_img","justify","clear_br","both","size_font","2","4","5","6","7","-","+","has_visible_contet","txt","visibleElements","offsetHeight","removeEmptyTextNodes","renameElement","newNodeName","newElement","replaceWithChildNodes","_isBlockElement","_appendLineBreak","resolveList","useLineBreaks","isLastChild","shouldAppendLineBreak","paragraph","isLastItem","lastListItem","lastElementChild","firstElementChild","windowProperties","windowProperties2","documentProperties","Sandbox","readyCallback","editableArea","_createIframe","insertInto","getIframe","_readyError","destroy","iframe","that","security","allowtransparency","frameborder","marginwidth","marginheight","onload","onreadystatechange","_onLoadIframe","iframeWindow","iframeDocument","charset","characterSet","sandboxHtml","_getHtml","stylesheets","open","write","close","onerror","fileName","lineNumber","_unset","loaded","setTimeout","templateVars","setter","__defineSetter__","ContentEditableArea","getContentEditable","_bindElement","_createElement","_loadElement","contentExists","innerHtml","simulatePlaceholder","editor","placeholderText","placeholderClassName","CLASS_NAME","unset","composerIsVisible","hasPlaceholderSet","clear","placeholderSet","setValue","setTextContent","HAS_GET_ATTRIBUTE_BUG","isLoadedImage","hasAttribute","specified","complete","queryInList","q","removeElement","referenceNode","tag","MapCell","cell","isColspan","isRowspan","firstCol","lastCol","firstRow","lastRow","isReal","spanCollection","modified","TableModifyerByCell","table","addSpannedCellToMap","cspan","rspan","spanCollect","rmax","cmax","rr","cc","setCellAsModified","smax","setTableMap","ridx","row","cells","cidx","tableRows","getTableRows","getRowCells","inlineTables","inlineCells","allCells","tableCells","inlineRows","allRows","getMapIndex","r_length","c_length","r_idx","c_idx","col","getElementAtIndex","getMapElsTo","to_cell","idx_start","idx_end","temp_idx","temp_cidx","maxr","maxc","orderSelectionEnds","secondcell","createCells","nr","correctColIndexForUnreals","corrIdx","getLastNewCellOnRow","rowLimit","removeEmptyTable","splitRowToCells","colspan","cType","newCells","removeAttribute","getRealRowEl","injectRowAt","new_cells","n_cidx","canMerge","decreaseCellSpan","span","removeSurplusLines","allRowspan","fillMissingCells","r_max","c_max","prevcell","rectify","unmerge","thisCell","rowspan","collapseCellToNextRow","cellIdx","newRowIdx","newIdx","lastCell","removeRowCell","getRowElementsByCell","modRow","getColumnElementsByCell","removeRow","oldRow","removeColCell","removeColumn","what","addRow","where","newRow","addRowCell","cr","colSpanAttr","addColumn","addColCell","doAdd","handleCellAddWithRowspan","modCell","temp_r_cells","nrow","addRowsNr","crow","getCellsBetween","cell1","cell2","c1","addCells","removeCells","mergeCellsBetween","unmergeCell","findCell","findRowByCell","findColumnByCell","elements","thisOwner","otherOwner","point","location_index","smallest_common_ancestor","this_index","other_index","children","getPastedHtml","clipboardData","getData","getPastedHtmlWithDiv","composer","selBookmark","cleanerDiv","scrollPos","getScrollPos","top","y","x","setBookmark","removeInvisibleSpaces","cleanPastedHTML","styleToRegex","styleStr","trimmedStr","escapedStr","extendRulesWithStyleExceptions","exceptStyles","newRules","pickRuleset","ruleset","defaultSet","condition","newHtml","color","fontSize","ensureProperClearing","clearIfNecessary","TILDE_ESCAPED","urlToSearch","elementsWithTilde","redraw","tableCellsSelection","editable","handleMouseDown","handleSelectionMousedown","removeCellSelections","selection_class","handleMouseMove","handleMouseUp","selectedCells","addSelections","oldEnd","curTable","deselect","bindSideclick","sideClickHandler","selectCells","getColorParseMethod","colorStr","colorTypeConf","colorParseMethods","getColorFormat","rgba","rgb","hex6","radix","hex3","makeParamRegExp","styleParser","parseColor","stylesStr","paramName","paramsRegex","colorType","colorMatch","unparseColor","colorFormat","hexRadix","parseFontSize","_getCumulativeOffsetTop","offsetTop","offsetParent","getDepth","getWebkitSelectionFixNode","blankNode","placeholderRemover","delayedPlaceholderRemover","minWidth","expandRangeToSurround","common","start_depth","end_depth","contain","unselectableClass","getRange","setSelection","setBefore","createTemporaryCaretSpaceAfter","caretPlaceholder","caretPlaceholderText","keyDownHandler","setAfter","ctrlKey","metaKey","zIndex","notVisual","fixWebkitSelection","lastSibling","activeElement","setScrollPos","avoidInvisibleSpace","isElement","displayStyle","getSelectedNode","fixSelBorders","getSelectedOwnNodes","getOwnRanges","ownNodes","maxi","findNodesInSelection","curNodes","filterElements","containsUneditable","uneditables","getOwnUneditables","startParent","endParent","ev","CustomEvent","dispatchEvent","err","getPreviousNode","ignoreEmpty","getSelectionParentsByTag","curEl","getRangeToNodeEnd","sNode","lastR","caretIsLastInSelection","endc","endtxt","caretIsFirstInSelection","caretIsInTheBeginnig","ofNode","getBeforeSelection","includePrevLeaves","inTmpCaret","rng","prevLeaf","executeAndRestoreRangy","restoreScrollPosition","executeAndRestore","newCaretPlaceholder","prevSibling","newRange","oldScrollTop","scrollTop","oldScrollLeft","scrollLeft","placeholderHtml","canAppendChild","anchorNodeTagNameLower","voidElements","splitElementAtCaret","contentAfterRangeStart","surround","nodeOptions","cssStyle","deblockAndSurround","tempDivElements","tempElements","scrollIntoView","tolerance","hasScrollBars","scrollHeight","_wysihtml5ScrollIntoViewElement","selectLine","_selectLine_W3C","_selectLine_MSIE","modify","toLineBoundary","location","rangeBottom","rangeEnd","measureNode","rangeTop","boundingTop","scrollWidth","moveToPoint","getText","getOwnNodes","splitBounds","fixRangeOverflow","containment","_detectInlineRangeProblems","previousElementSibling","_endOffsetForNode","dontFix","allUneditables","deepUneditables","tmpRanges","tmpRange","jmax","selectAll","blankEndNode","blankStartNode","doSelect","notSelected","getHtml","getPlainText","isEndToEndInNode","nodeNames","isInThisEditable","cssClass","regExp","matchingClassNames","hasStyleAttr","removeStyle","s2","getMatchingStyleRegexp","regexes","sSplit","elStyle","isMatchingAllready","areMatchingAllready","removeOrChangeStyle","exactRegex","hasSameClasses","el1","el2","REG_EXP_WHITE_SPACE","replaceWithOwnChildren","elementsHaveSameNonClassAttributes","attr1","attr2","getNamedItem","isSplitPoint","splitNodeAt","descendantNode","descendantOffset","Merge","firstNode","isElementMerge","firstTextNode","HTMLApplier","tagNames","similarClassRegExp","similarStyleRegExp","defaultTagName","applyToAnyTagName","doMerge","textBits","getLength","getAncestorWithClass","cssClassMatch","getAncestorWithStyle","cssStyleMatch","getMatchingAncestor","matchType","postApply","currentMerge","precedingTextNode","lastNode","merges","rangeStartNode","rangeEndNode","rangeStartOffset","rangeEndOffset","getAdjacentMergeableTextNode","nextTextNode","forward","adjacentNode","isTextNode","areElementsMergeable","createContainer","applyToTextNode","isRemovable","undoToTextNode","ancestorWithClass","ancestorWithStyle","styleMode","styleChanged","ancestorRange","applyToRange","ri","undoToRange","getTextSelectedByRange","isAppliedToRange","appliedType","coverage","selectedText","toggleRange","parentsExactMatch","isApplied","Commands","support","commandValue","state","stateValue","bold","formatInline","getOptions","createLink","opts","removeLink","size","fontSizeStyle","st","foreColor","foreColorStyle","colorVals","colString","bgColorStyle","correctOptionsForSimilarityCheck","cleanup","allElements","BLOCK_ELEMENTS","classNames","uneditableContainer","defaultNodeName","findOuterBlock","allBlocks","UNNESTABLE_BLOCK_ELEMENTS","cloneOuterInlines","innerNode","INLINE_ELEMENTS","outerNode","applyOptionsToElement","removeOptionsFromElement","unwrapBlocksFromContent","contentBlocks","fixRangeCoverage","wrapRangeWithElement","defaultName","defaultOptions","wrapper","blocks","rangeStartContainer","similarOptions","similarOuterBlock","splitAllBlocks","firstOuterBlock","tmpEl","outerInlines","getParentBlockNodeName","newBlockElements","parentNodes","formatCode","classname","selectedNodes","pre","selectedNode","hasNoClass","hasNoStyle","hasNoAttributes","isSameNode","element1","element2","classes1","classes2","createWrapNode","defaultTag","containsSameAttributes","updateElementAttributes","newAttributes","fullContain","updateFormatOfElement","nodeNameQuery","nodeQueryMatch","queryAliasMap","getSelectedTextNodes","findSimilarTextNodeWrapper","exact","isSimilarNode","selectRange","selectTextNodes","lastText","selectTextNode","getState","caretNode","searchNodes","partial","caretIsInsideWord","beforeChar","afterChar","getRangeForWord","offsetStart","offsetEnd","txtNodes","wordOffset","mergeContents","mergeConsequentSimilarElements","cleanupAndSetSelection","cleanupAndSetCaret","formatTextNode","wrapNode","unformatTextNode","newWrapNode","removeFormatFromTextNode","formatTextRange","updateFormat","wordObj","exactState","removeFormat","textOffset","applyFormat","fixOptions","b","strong","em","insertBlockQuote","NODE_NAME","insertImage","image","imagesInSelection","LINE_BREAK","insertLineBreak","insertList","isNode","findListEl","other","parentLi","otherNodeName","handleSameTypeList","otherLists","innerLists","getListsInSelection","handleOtherTypeList","renameLists","createListFallback","tempClassName","getTime","cmd","italic","justifyCenter","justifyLeft","justifyRight","justifyFull","alignRightStyle","alignLeftStyle","alignCenterStyle","redo","undoManager","underline","undo","createTable","cols","rows","tableStyle","mergeTableCells","tableSelection","addTableCells","tableSelect","deleteTableCells","selCell","indentList","listEls","tryToPushLiLevel","liNodes","listTag","prevLi","liNode","prevLiList","found","outdentList","tryToPullLiLevel","listNode","outerListNode","outerLiNode","afterList","getAfterList","newList","subscript","superscript","Z_KEY","Y_KEY","MAX_HISTORY_ENTRIES","DATA_ATTR_NODE","DATA_ATTR_OFFSET","UndoManager","historyStr","historyDom","transact","_observe","lastKey","sandbox","altKey","isUndo","shiftKey","isRedo","previousHtml","currentHtml","getValue","getChildNodeIndex","undoPossible","redoPossible","historyEntry","getChildNodeByIndex","View","textareaElement","noTextarea","_observeViewChange","currentView","show","hide","disable","enable","Composer","CARET_HACK","editableElement","textarea","contentEditableMode","_initContentEditableArea","_initSandbox","_displayStyle","disabled","setToEnd","pageYOffset","pageXOffset","scrollTo","_create","_createWysiwygFormField","form","hiddenField","placeholder","_initAutoLinking","_initObjectResizing","_initUndoManager","_initLineBreaking","initSync","sync","supportsDisablingOfAutoLinking","supportsAutoLinking","nodeWithSelection","isInUneditable","links","urlRegExp","newTextContent","propertiesLength","adjust","USE_NATIVE_LINE_BREAK_INSIDE_TAGS","LIST_TAGS","blockElement","HOST_TEMPLATE","TEXT_FORMATTING","BOX_FORMATTING","ADDITIONAL_CSS_RULES","focusWithoutScrolling","setActive","elementStyle","originalScrollTop","originalScrollLeft","originalStyles","WebkitUserSelect","displayValueForCopying","originalActiveElement","hasPlaceholder","originalPlaceholder","originalDisplayValue","originalDisabled","focusStylesHost","blurStylesHost","disabledStylesHost","blur","boxFormattingStyles","shortcuts","66","73","85","addListeners","removeListeners","fixLastBrDeletionInTable","aNode","handleUneditableDeletion","fixDeleteInTheBeginnigOfHeading","selNode","commonAncestorNode","handleDeleteKeyPress","handleTabKeyDown","handleDomNodeRemoved","domNodeRemovedInterval","clearInterval","handleUserInteraction","handleFocus","focusState","handleBlur","changeevent","create","handlePaste","handleCopy","copyedFromMarking","setData","handleKeyUp","allImages","notMyImages","myImages","handleMouseOver","title","titlePrefixes","IMG","handleClick","uneditable","handleDrop","handleKeyDown","handleTabKey","initTableHandling","hideHandlers","iframeInitiator","focusBlurElement","setInterval","handleTables","INTERVAL","Synchronizer","fromComposerToTextarea","shouldParseHtml","fromTextareaToComposer","textareaValue","interval","startInterval","stopInterval","SourceView","switchToTextarea","composerStyles","switchToComposer","Textarea","supportsPlaceholder","eventMapping","focusin","focusout","undef","defaultConfig","showToolbarAfterInit","showToolbarDialogsOnSelection","parserRules","br","div","pasteParserRulesets","parser","supportTouchDevices","Editor","_isCompatible","_initParser","handleBeforeLoad","sourceView","synchronizer","Toolbar","isCompatible","htmlOrElement","parseContext","oldHtml","_cleanAndPaste","pastedHTML","cleanHtml","CLASS_NAME_OPENED","SELECTOR_FORM_ELEMENTS","SELECTOR_FIELDS","ATTRIBUTE_FIELDS","Dialog","_observed","callbackWrapper","_serialize","cancel","fields","_interpolate","avoidHiddenFields","field","fieldName","focusedElement","elementToChange","defaultValue","update","firstField","isOpen","_hide","linkStyles","wrapperStyles","margin","opacity","padding","inputStyles","cursor","marginTop","outline","inputAttributes","x-webkit-speech","speech","Speech","getCommandState","dialog","multiselect","CLASS_NAME_COMMAND_DISABLED","CLASS_NAME_COMMANDS_DISABLED","CLASS_NAME_COMMAND_ACTIVE","CLASS_NAME_ACTION_ACTIVE","showOnInit","_getLinks","classNameCommandDisabled","classNameCommandsDisabled","classNameCommandActive","classNameActionActive","speechInputLinks","group","tracksBlankValue","_getDialog","caretBookmark","dialogElement","dialogContainer","commandLink","_execCommand","_hideAllDialogs","_preventInstantFocus","commandsDisabled","_updateLinkStates","execAction","commandLinks","actionLinks","unselectable","commandObj","commandMapping","preventFocus","displayDialogAttributeValue","actionMapping","dataset","showdialogonselection","Dialog_createTable","Dialog_foreColorStyle","colourMode","firstElement","colourStr","colour","colormode","Dialog_fontSizeStyle"],"mappings":";;AAWA,GAAIA,YACFC,QAAS,eAGTC,YACAC,OACAC,UACAC,WACAC,QACAC,aACAC,SAEAC,gBAAiB,SACjBC,wBAAyB,UAEzBC,eAAgB,aAEhBC,aAAc,EACdC,UAAc,EAEdC,cAAgB,EAChBC,UAAgB,GAChBC,WAAgB,GAChBC,UAAgB,GAChBC,QAAgB,EAChBC,WAAgB,GAEjBnB,WAAUoB,UAAY,SAASC,EAAKC,GAQ9BC,OAAOC,UAAUC,OACpB,WAEE,GAAIC,GAAQ,oCACZH,QAAOC,UAAUC,KAAO,WACtB,MAAOE,MAAKC,QAAQF,EAAO,QAMjC,WACE,GAAIG,GAAQ,mBACRC,EAAQ,qBACRR,GAAIO,KACRR,EAAIU,QAAQP,UAAWK,GAAUR,EAAKQ,GAAUP,EAAKO,GAAU,SAAUG,EAAIC,EAAIC,GAC/E,OAAQA,EAAOP,MAAMQ,YAAa,KAAOH,EAAI,SAASI,GACpD,GAAIA,GAAIA,GAAKf,EAAIgB,KACjBD,GA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ist/wysihtml.js
+++ b/dist/wysihtml.js
@@ -1,5 +1,5 @@
/**
- * @license wysihtml v0.5.0-beta12
+ * @license wysihtml v0.5.0-beta13
* https://github.com/Voog/wysihtml
*
* Author: Christopher Blum (https://github.com/tiff)
@@ -10,7 +10,7 @@
*
*/
var wysihtml5 = {
- version: "0.5.0-beta12",
+ version: "0.5.0-beta13",
// namespaces
commands: {},
@@ -405,6 +405,8 @@ var wysihtml5 = {
return all;
};
+
+
var normalizeFix = function() {
var f = Node.prototype.normalize;
var nf = function() {
@@ -412,13 +414,15 @@ var wysihtml5 = {
s = this.ownerDocument.defaultView.getSelection(),
anode = s.anchorNode,
aoffset = s.anchorOffset,
+ aelement = anode && anode.nodeType === 1 && anode.childNodes.length > 0 ? anode.childNodes[aoffset] : undefined,
fnode = s.focusNode,
foffset = s.focusOffset,
+ felement = fnode && fnode.nodeType === 1 && foffset > 0 ? fnode.childNodes[foffset -1] : undefined,
r = this.ownerDocument.createRange(),
prevTxt = texts.shift(),
curText = prevTxt ? texts.shift() : null;
- if ((anode === fnode && foffset < aoffset) || (anode !== fnode && (anode.compareDocumentPosition(fnode) & Node.DOCUMENT_POSITION_PRECEDING))) {
+ if ((anode === fnode && foffset < aoffset) || (anode !== fnode && (anode.compareDocumentPosition(fnode) & Node.DOCUMENT_POSITION_PRECEDING) && !(anode.compareDocumentPosition(fnode) & Node.DOCUMENT_POSITION_CONTAINS))) {
fnode = [anode, anode = fnode][0];
foffset = [aoffset, aoffset = foffset][0];
}
@@ -442,13 +446,20 @@ var wysihtml5 = {
}
}
+ if (felement) {
+ foffset = Array.prototype.indexOf.call(felement.parentNode.childNodes, felement) + 1;
+ }
+
+ if (aelement) {
+ aoffset = Array.prototype.indexOf.call(aelement.parentNode.childNodes, aelement);
+ }
+
if (anode && anode.parentNode && fnode && fnode.parentNode) {
r.setStart(anode, aoffset);
r.setEnd(fnode, foffset);
s.removeAllRanges();
s.addRange(r);
}
-
};
Node.prototype.normalize = nf;
};
diff --git a/dist/wysihtml.min.js b/dist/wysihtml.min.js
index eb8648e..3d05b83 100644
--- a/dist/wysihtml.min.js
+++ b/dist/wysihtml.min.js
@@ -1,10 +1,10 @@
-/*! wysihtml - v0.5.0-beta12 (2015-07-31) */
+/*! wysihtml - v0.5.0-beta13 (2015-08-18) */
-var wysihtml5={version:"0.5.0-beta12",commands:{},dom:{},quirks:{},toolbar:{},lang:{},selection:{},views:{},INVISIBLE_SPACE:"\ufeff",INVISIBLE_SPACE_REG_EXP:/\uFEFF/g,EMPTY_FUNCTION:function(){},ELEMENT_NODE:1,TEXT_NODE:3,BACKSPACE_KEY:8,ENTER_KEY:13,ESCAPE_KEY:27,SPACE_KEY:32,TAB_KEY:9,DELETE_KEY:46};wysihtml5.polyfills=function(a,b){String.prototype.trim||!function(){var a=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(a,"")}}(),function(){var c="addEventListener",d="removeEventListener";b[c]||(a.Element.prototype[c]=a[c]=b[c]=function(b,c,d){return(d=this).attachEvent("on"+b,function(b){var b=b||a.event;b.target=b.target||b.srcElement,b.preventDefault=b.preventDefault||function(){b.returnValue=!1},b.stopPropagation=b.stopPropagation||function(){b.cancelBubble=!0},b.which=b.button?2===b.button?3:4===b.button?2:b.button:b.keyCode,c.call(d,b)})},a.Element.prototype[d]=a[d]=b[d]=function(a,b){return this.detachEvent("on"+a,b)})}(),Object.defineProperty&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(a.Element.prototype,"textContent")&&!Object.getOwnPropertyDescriptor(a.Element.prototype,"textContent").get&&!function(){var b=Object.getOwnPropertyDescriptor(a.Element.prototype,"innerText");Object.defineProperty(a.Element.prototype,"textContent",{get:function(){return b.get.call(this)},set:function(a){return b.set.call(this,a)}})}(),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){for(var c=this.length,d=-1,e=b>>>0;~(c-e);d=this[--c]===a?c:d);return d}),Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d&&a?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}),a.Element&&function(a){a.matches=a.matches||a.matchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector||function(a){for(var b=this,c=(b.parentNode||b.document).querySelectorAll(a),d=-1;c[++d]&&c[d]!=b;);return!!c[d]}}(a.Element.prototype),"document"in a&&("classList"in b.createElement("_")?"DOMTokenList"in a&&!function(){"use strict";var c=b.createElement("_");if(c.classList.add("c1","c2"),!c.classList.contains("c2")){var d=function(b){var c=a.DOMTokenList.prototype[b];a.DOMTokenList.prototype[b]=function(a){var b,d=arguments.length;for(b=0;d>b;b++)a=arguments[b],c.call(this,a)}};d("add"),d("remove")}if(c.classList.toggle("c3",!1),c.classList.contains("c3")){var e=a.DOMTokenList.prototype.toggle;a.DOMTokenList.prototype.toggle=function(a,b){return 1 in arguments&&!this.contains(a)==!b?b:e.call(this,a)}}c=null}():!function(a){"use strict";if("Element"in a){var b="classList",c="prototype",d=a.Element[c],e=Object,f=String[c].trim||function(){return this.replace(/^\s+|\s+$/g,"")},g=Array[c].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1},h=function(a,b){this.name=a,this.code=DOMException[a],this.message=b},i=function(a,b){if(""===b)throw new h("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(b))throw new h("INVALID_CHARACTER_ERR","String contains an invalid character");return g.call(a,b)},j=function(a){for(var b=f.call(a.getAttribute("class")||""),c=b?b.split(/\s+/):[],d=0,e=c.length;e>d;d++)this.push(c[d]);this._updateClassName=function(){a.setAttribute("class",this.toString())}},k=j[c]=[],l=function(){return new j(this)};if(h[c]=Error[c],k.item=function(a){return this[a]||null},k.contains=function(a){return a+="",-1!==i(this,a)},k.add=function(){var a,b=arguments,c=0,d=b.length,e=!1;do a=b[c]+"",-1===i(this,a)&&(this.push(a),e=!0);while(++cg||c!==f&&c.compareDocumentPosition(f)&Node.DOCUMENT_POSITION_PRECEDING)&&(f=[c,c=f][0],g=[e,e=g][0]);i&&j;)j.previousSibling&&j.previousSibling===i?(c===j&&(c=i,e=i.nodeValue.length+e),f===j&&(f=i,g=i.nodeValue.length+g),i.nodeValue=i.nodeValue+j.nodeValue,j.parentNode.removeChild(j),j=a.shift()):(i=j,j=a.shift());c&&c.parentNode&&f&&f.parentNode&&(h.setStart(c,e),h.setEnd(f,g),b.removeAllRanges(),b.addRange(h))});Node.prototype.normalize=a};"Node"in window&&"normalize"in Node.prototype&&c()&&e()},wysihtml5.polyfills(window,document),function(a,b){"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a():b.rangy=a()}(function(){function a(a,b){var c=typeof a[b];return c==u||!(c!=t||!a[b])||"unknown"==c}function b(a,b){return!(typeof a[b]!=t||!a[b])}function c(a,b){return typeof a[b]!=v}function d(a){return function(b,c){for(var d=c.length;d--;)if(!a(b,c[d]))return!1;return!0}}function e(a){return a&&A(a,z)&&C(a,y)}function f(a){return b(a,"body")?a.body:a.getElementsByTagName("body")[0]}function g(b){typeof console!=v&&a(console,"log")&&console.log(b)}function h(a,b){F&&b?alert(a):g(a)}function i(a){H.initialized=!0,H.supported=!1,h("Rangy is not supported in this environment. Reason: "+a,H.config.alertOnFail)}function j(a){h("Rangy warning: "+a,H.config.alertOnWarn)}function k(a){return a.message||a.description||String(a)}function l(){if(F&&!H.initialized){var b,c=!1,d=!1;a(document,"createRange")&&(b=document.createRange(),A(b,x)&&C(b,w)&&(c=!0));var h=f(document);if(!h||"body"!=h.nodeName.toLowerCase())return void i("No body element found");if(h&&a(h,"createTextRange")&&(b=h.createTextRange(),e(b)&&(d=!0)),!c&&!d)return void i("Neither Range nor TextRange are available");H.initialized=!0,H.features={implementsDomRange:c,implementsTextRange:d};var j,l;for(var m in E)(j=E[m])instanceof p&&j.init(j,H);for(var n=0,o=K.length;o>n;++n)try{K[n](H)}catch(q){l="Rangy init listener threw an exception. Continuing. Detail: "+k(q),g(l)}}}function m(a,b,c){c&&(a+=" in module "+c.name),H.warn("DEPRECATED: "+a+" is deprecated. Please use "+b+" instead.")}function n(a,b,c,d){a[b]=function(){return m(b,c,d),a[c].apply(a,G.toArray(arguments))}}function o(a){a=a||window,l();for(var b=0,c=L.length;c>b;++b)L[b](a)}function p(a,b,c){this.name=a,this.dependencies=b,this.initialized=!1,this.supported=!1,this.initializer=c}function q(a,b,c){var d=new p(a,b,function(b){if(!b.initialized){b.initialized=!0;try{c(H,b),b.supported=!0}catch(d){var e="Module '"+a+"' failed to load: "+k(d);g(e),d.stack&&g(d.stack)}}});return E[a]=d,d}function r(){}function s(){}var t="object",u="function",v="undefined",w=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],x=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],y=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],z=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"],A=d(a),B=d(b),C=d(c),D=[].forEach?function(a,b){a.forEach(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)b(a[c],c)},E={},F=typeof window!=v&&typeof document!=v,G={isHostMethod:a,isHostObject:b,isHostProperty:c,areHostMethods:A,areHostObjects:B,areHostProperties:C,isTextRange:e,getBody:f,forEach:D},H={version:"1.3.0",initialized:!1,isBrowser:F,supported:!0,util:G,features:{},modules:E,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==v?!0:rangyAutoInitialize}};H.fail=i,H.warn=j;var I;({}).hasOwnProperty?(G.extend=I=function(a,b,c){var d,e;for(var f in b)b.hasOwnProperty(f)&&(d=a[f],e=b[f],c&&null!==d&&"object"==typeof d&&null!==e&&"object"==typeof e&&I(d,e,!0),a[f]=e);return b.hasOwnProperty("toString")&&(a.toString=b.toString),a},G.createOptions=function(a,b){var c={};return I(c,b),a&&I(c,a),c}):i("hasOwnProperty not supported"),F||i("Rangy can only run in a browser"),function(){var a;if(F){var b=document.createElement("div");b.appendChild(document.createElement("span"));var c=[].slice;try{1==c.call(b.childNodes,0)[0].nodeType&&(a=function(a){return c.call(a,0)})}catch(d){}}a||(a=function(a){for(var b=[],c=0,d=a.length;d>c;++c)b[c]=a[c];return b}),G.toArray=a}();var J;F&&(a(document,"addEventListener")?J=function(a,b,c){a.addEventListener(b,c,!1)}:a(document,"attachEvent")?J=function(a,b,c){a.attachEvent("on"+b,c)}:i("Document does not have required addEventListener or attachEvent method"),G.addListener=J);var K=[];G.deprecationNotice=m,G.createAliasForDeprecatedMethod=n,H.init=l,H.addInitListener=function(a){H.initialized?a(H):K.push(a)};var L=[];H.addShimListener=function(a){L.push(a)},F&&(H.shim=H.createMissingNativeApi=o,n(H,"createMissingNativeApi","shim")),p.prototype={init:function(){for(var a,b,c=this.dependencies||[],d=0,e=c.length;e>d;++d){if(b=c[d],a=E[b],!(a&&a instanceof p))throw new Error("required module '"+b+"' not found");if(a.init(),!a.supported)throw new Error("required module '"+b+"' not supported")}this.initializer(this)},fail:function(a){throw this.initialized=!0,this.supported=!1,new Error(a)},warn:function(a){H.warn("Module "+this.name+": "+a)},deprecationNotice:function(a,b){H.warn("DEPRECATED: "+a+" in module "+this.name+" is deprecated. Please use "+b+" instead")},createError:function(a){return new Error("Error in Rangy "+this.name+" module: "+a)}},H.createModule=function(a){var b,c;2==arguments.length?(b=arguments[1],c=[]):(b=arguments[2],c=arguments[1]);var d=q(a,c,b);H.initialized&&H.supported&&d.init()},H.createCoreModule=function(a,b,c){q(a,b,c)},H.RangePrototype=r,H.rangePrototype=new r,H.selectionPrototype=new s,H.createCoreModule("DomUtil",[],function(a,b){function c(a){var b;return typeof a.namespaceURI==F||null===(b=a.namespaceURI)||"http://www.w3.org/1999/xhtml"==b}function d(a){var b=a.parentNode;return 1==b.nodeType?b:null}function e(a){for(var b=0;a=a.previousSibling;)++b;return b}function f(a){switch(a.nodeType){case 7:case 10:return 0;case 3:case 8:return a.length;default:return a.childNodes.length}}function g(a,b){var c,d=[];for(c=a;c;c=c.parentNode)d.push(c);for(c=b;c;c=c.parentNode)if(K(d,c))return c;return null}function h(a,b,c){for(var d=c?b:b.parentNode;d;){if(d===a)return!0;d=d.parentNode}return!1}function i(a,b){return h(a,b,!0)}function j(a,b,c){for(var d,e=c?a:a.parentNode;e;){if(d=e.parentNode,d===b)return e;e=d}return null}function k(a){var b=a.nodeType;return 3==b||4==b||8==b}function l(a){if(!a)return!1;var b=a.nodeType;return 3==b||8==b}function m(a,b){var c=b.nextSibling,d=b.parentNode;return c?d.insertBefore(a,c):d.appendChild(a),a}function n(a,b,c){var d=a.cloneNode(!1);if(d.deleteData(0,b),a.deleteData(b,a.length-b),m(d,a),c)for(var f,g=0;f=c[g++];)f.node==a&&f.offset>b?(f.node=d,f.offset-=b):f.node==a.parentNode&&f.offset>e(a)&&++f.offset;return d}function o(a){if(9==a.nodeType)return a;if(typeof a.ownerDocument!=F)return a.ownerDocument;if(typeof a.document!=F)return a.document;if(a.parentNode)return o(a.parentNode);throw b.createError("getDocument: no document found for node")}function p(a){var c=o(a);if(typeof c.defaultView!=F)return c.defaultView;if(typeof c.parentWindow!=F)return c.parentWindow;throw b.createError("Cannot get a window object for node")}function q(a){if(typeof a.contentDocument!=F)return a.contentDocument;if(typeof a.contentWindow!=F)return a.contentWindow.document;throw b.createError("getIframeDocument: No Document object found for iframe element")}function r(a){if(typeof a.contentWindow!=F)return a.contentWindow;if(typeof a.contentDocument!=F)return a.contentDocument.defaultView;throw b.createError("getIframeWindow: No Window object found for iframe element")}function s(a){return a&&G.isHostMethod(a,"setTimeout")&&G.isHostObject(a,"document")}function t(a,b,c){var d;if(a?G.isHostProperty(a,"nodeType")?d=1==a.nodeType&&"iframe"==a.tagName.toLowerCase()?q(a):o(a):s(a)&&(d=a.document):d=document,!d)throw b.createError(c+"(): Parameter must be a Window object or DOM node");return d}function u(a){for(var b;b=a.parentNode;)a=b;return a}function v(a,c,d,f){var h,i,k,l,m;if(a==d)return c===f?0:f>c?-1:1;if(h=j(d,a,!0))return c<=e(h)?-1:1;if(h=j(a,d,!0))return e(h)[index:"+e(a)+",length:"+a.childNodes.length+"]["+(a.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return a.nodeName}function y(a){for(var b,c=o(a).createDocumentFragment();b=a.firstChild;)c.appendChild(b);return c}function z(a,b,c){var d=H(a),e=a.createElement("div");e.contentEditable=""+!!c,b&&(e.innerHTML=b);var f=d.firstChild;return f?d.insertBefore(e,f):d.appendChild(e),e}function A(a){return a.parentNode.removeChild(a)}function B(a){this.root=a,this._next=a}function C(a){return new B(a)}function D(a,b){this.node=a,this.offset=b}function E(a){this.code=this[a],this.codeName=a,this.message="DOMException: "+this.codeName}var F="undefined",G=a.util,H=G.getBody;G.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||b.fail("document missing a Node creation method"),G.isHostMethod(document,"getElementsByTagName")||b.fail("document missing getElementsByTagName method");var I=document.createElement("div");G.areHostMethods(I,["insertBefore","appendChild","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"]))||b.fail("Incomplete Element implementation"),G.isHostProperty(I,"innerHTML")||b.fail("Element is missing innerHTML property");var J=document.createTextNode("test");G.areHostMethods(J,["splitText","deleteData","insertData","appendData","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"])||!G.areHostProperties(J,["data"]))||b.fail("Incomplete Text Node implementation");var K=function(a,b){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1},L=!1;!function(){var b=document.createElement("b");b.innerHTML="1";var c=b.firstChild;b.innerHTML="
",L=w(c),a.features.crashyTextNodes=L}();var M;typeof window.getComputedStyle!=F?M=function(a,b){return p(a).getComputedStyle(a,null)[b]}:typeof document.documentElement.currentStyle!=F?M=function(a,b){return a.currentStyle?a.currentStyle[b]:""}:b.fail("No means of obtaining computed style properties found"),B.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var a,b,c=this._current=this._next;if(this._current)if(a=c.firstChild)this._next=a;else{for(b=null;c!==this.root&&!(b=c.nextSibling);)c=c.parentNode;this._next=b}return this._current},detach:function(){this._current=this._next=this.root=null}},D.prototype={equals:function(a){return!!a&&this.node===a.node&&this.offset==a.offset},inspect:function(){return"[DomPosition("+x(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}},E.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},E.prototype.toString=function(){return this.message},a.dom={arrayContains:K,isHtmlNamespace:c,parentElement:d,getNodeIndex:e,getNodeLength:f,getCommonAncestor:g,isAncestorOf:h,isOrIsAncestorOf:i,getClosestAncestorIn:j,isCharacterDataNode:k,isTextOrCommentNode:l,insertAfter:m,splitDataNode:n,getDocument:o,getWindow:p,getIframeWindow:r,getIframeDocument:q,getBody:H,isWindow:s,getContentDocument:t,getRootContainer:u,comparePoints:v,isBrokenNode:w,inspectNode:x,getComputedStyleProperty:M,createTestElement:z,removeNode:A,fragmentFromNodeChildren:y,createIterator:C,DomPosition:D},a.DOMException=E}),H.createCoreModule("DomRange",["DomUtil"],function(a,b){function c(a,b){return 3!=a.nodeType&&(P(a,b.startContainer)||P(a,b.endContainer))}function d(a){return a.document||Q(a.startContainer)}function e(a){return W(a.startContainer)}function f(a){return new L(a.parentNode,O(a))}function g(a){return new L(a.parentNode,O(a)+1)}function h(a,b,c){var d=11==a.nodeType?a.firstChild:a;return N(b)?c==b.length?J.insertAfter(a,b):b.parentNode.insertBefore(a,0==c?b:S(b,c)):c>=b.childNodes.length?b.appendChild(a):b.insertBefore(a,b.childNodes[c]),d}function i(a,b,c){if(z(a),z(b),d(b)!=d(a))throw new M("WRONG_DOCUMENT_ERR");var e=R(a.startContainer,a.startOffset,b.endContainer,b.endOffset),f=R(a.endContainer,a.endOffset,b.startContainer,b.startOffset);return c?0>=e&&f>=0:0>e&&f>0}function j(a){for(var b,c,e,f=d(a.range).createDocumentFragment();c=a.next();){if(b=a.isPartiallySelectedSubtree(),c=c.cloneNode(!b),b&&(e=a.getSubtreeIterator(),c.appendChild(j(e)),e.detach()),10==c.nodeType)throw new M("HIERARCHY_REQUEST_ERR");f.appendChild(c)}return f}function k(a,b,c){var d,e;c=c||{stop:!1};for(var f,g;f=a.next();)if(a.isPartiallySelectedSubtree()){if(b(f)===!1)return void(c.stop=!0);if(g=a.getSubtreeIterator(),k(g,b,c),g.detach(),c.stop)return}else for(d=J.createIterator(f);e=d.next();)if(b(e)===!1)return void(c.stop=!0)}function l(a){for(var b;a.next();)a.isPartiallySelectedSubtree()?(b=a.getSubtreeIterator(),l(b),b.detach()):a.remove()}function m(a){for(var b,c,e=d(a.range).createDocumentFragment();b=a.next();){if(a.isPartiallySelectedSubtree()?(b=b.cloneNode(!1),c=a.getSubtreeIterator(),b.appendChild(m(c)),c.detach()):a.remove(),10==b.nodeType)throw new M("HIERARCHY_REQUEST_ERR");e.appendChild(b)}return e}function n(a,b,c){var d,e=!(!b||!b.length),f=!!c;e&&(d=new RegExp("^("+b.join("|")+")$"));var g=[];return k(new p(a,!1),function(b){if(!(e&&!d.test(b.nodeType)||f&&!c(b))){var h=a.startContainer;if(b!=h||!N(h)||a.startOffset!=h.length){var i=a.endContainer;b==i&&N(i)&&0==a.endOffset||g.push(b)}}}),g}function o(a){var b="undefined"==typeof a.getName?"Range":a.getName();return"["+b+"("+J.inspectNode(a.startContainer)+":"+a.startOffset+", "+J.inspectNode(a.endContainer)+":"+a.endOffset+")]"}function p(a,b){if(this.range=a,this.clonePartiallySelectedTextNodes=b,!a.collapsed){this.sc=a.startContainer,this.so=a.startOffset,this.ec=a.endContainer,this.eo=a.endOffset;var c=a.commonAncestorContainer;this.sc===this.ec&&N(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==c||N(this.sc)?T(this.sc,c,!0):this.sc.childNodes[this.so],this._last=this.ec!==c||N(this.ec)?T(this.ec,c,!0):this.ec.childNodes[this.eo-1])}}function q(a){return function(b,c){for(var d,e=c?b:b.parentNode;e;){if(d=e.nodeType,V(a,d))return e;e=e.parentNode}return null}}function r(a,b){if(ea(a,b))throw new M("INVALID_NODE_TYPE_ERR")}function s(a,b){if(!V(b,a.nodeType))throw new M("INVALID_NODE_TYPE_ERR")}function t(a,b){if(0>b||b>(N(a)?a.length:a.childNodes.length))throw new M("INDEX_SIZE_ERR")}function u(a,b){if(ca(a,!0)!==ca(b,!0))throw new M("WRONG_DOCUMENT_ERR")}function v(a){if(da(a,!0))throw new M("NO_MODIFICATION_ALLOWED_ERR")}function w(a,b){if(!a)throw new M(b)}function x(a,b){return b<=(N(a)?a.length:a.childNodes.length)}function y(a){return!!a.startContainer&&!!a.endContainer&&!(X&&(J.isBrokenNode(a.startContainer)||J.isBrokenNode(a.endContainer)))&&W(a.startContainer)==W(a.endContainer)&&x(a.startContainer,a.startOffset)&&x(a.endContainer,a.endOffset)}function z(a){if(!y(a))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+a.inspect()+")")}function A(a,b){z(a);var c=a.startContainer,d=a.startOffset,e=a.endContainer,f=a.endOffset,g=c===e;N(e)&&f>0&&f0&&d=O(c)&&f++,d=0),a.setStartAndEnd(c,d,e,f)}function B(a){z(a);var b=a.commonAncestorContainer.parentNode.cloneNode(!1);return b.appendChild(a.cloneContents()),b.innerHTML}function C(a){a.START_TO_START=ka,a.START_TO_END=la,a.END_TO_END=ma,a.END_TO_START=na,a.NODE_BEFORE=oa,a.NODE_AFTER=pa,a.NODE_BEFORE_AND_AFTER=qa,a.NODE_INSIDE=ra}function D(a){C(a),C(a.prototype)}function E(a,b){return function(){z(this);var c,d,e=this.startContainer,f=this.startOffset,h=this.commonAncestorContainer,i=new p(this,!0);e!==h&&(c=T(e,h,!0),d=g(c),e=d.node,f=d.offset),k(i,v),i.reset();var j=a(i);return i.detach(),b(this,e,f,e,f),j}}function F(b,d){function e(a,b){return function(c){s(c,Z),s(W(c),$);var d=(a?f:g)(c);(b?h:i)(this,d.node,d.offset)}}function h(a,b,c){var e=a.endContainer,f=a.endOffset;(b!==a.startContainer||c!==a.startOffset)&&((W(b)!=W(e)||1==R(b,c,e,f))&&(e=b,f=c),d(a,b,c,e,f))}function i(a,b,c){var e=a.startContainer,f=a.startOffset;(b!==a.endContainer||c!==a.endOffset)&&((W(b)!=W(e)||-1==R(b,c,e,f))&&(e=b,f=c),d(a,e,f,b,c))}var j=function(){};j.prototype=a.rangePrototype,b.prototype=new j,K.extend(b.prototype,{setStart:function(a,b){r(a,!0),t(a,b),h(this,a,b)},setEnd:function(a,b){r(a,!0),t(a,b),i(this,a,b)},setStartAndEnd:function(){var a=arguments,b=a[0],c=a[1],e=b,f=c;switch(a.length){case 3:f=a[2];break;case 4:e=a[2],f=a[3]}d(this,b,c,e,f)},setBoundary:function(a,b,c){this["set"+(c?"Start":"End")](a,b)},setStartBefore:e(!0,!0),setStartAfter:e(!1,!0),setEndBefore:e(!0,!1),setEndAfter:e(!1,!1),collapse:function(a){z(this),a?d(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):d(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(a){r(a,!0),d(this,a,0,a,U(a))},selectNode:function(a){r(a,!1),s(a,Z);var b=f(a),c=g(a);d(this,b.node,b.offset,c.node,c.offset)},extractContents:E(m,d),deleteContents:E(l,d),canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},splitBoundaries:function(){A(this)},splitBoundariesPreservingPositions:function(a){A(this,a)},normalizeBoundaries:function(){z(this);var a,b=this.startContainer,c=this.startOffset,e=this.endContainer,f=this.endOffset,g=function(a){var b=a.nextSibling;b&&b.nodeType==a.nodeType&&(e=a,f=a.length,a.appendData(b.data),Y(b))},h=function(a){var d=a.previousSibling;if(d&&d.nodeType==a.nodeType){b=a;var g=a.length;if(c=d.length,a.insertData(0,d.data),Y(d),b==e)f+=c,e=b;else if(e==a.parentNode){var h=O(a);f==h?(e=a,f=g):f>h&&f--}}},i=!0;if(N(e))f==e.length?g(e):0==f&&(a=e.previousSibling,a&&a.nodeType==e.nodeType&&(f=a.length,b==e&&(i=!1),a.appendData(e.data),Y(e),e=a));else{if(f>0){var j=e.childNodes[f-1];j&&N(j)&&g(j)}i=!this.collapsed}if(i){if(N(b))0==c?h(b):c==b.length&&(a=b.nextSibling,a&&a.nodeType==b.nodeType&&(e==a&&(e=b,f+=b.length),b.appendData(a.data),Y(a)));else if(cx",ga=3==fa.firstChild.nodeType}catch(ha){}a.features.htmlParsingConforms=ga;var ia=ga?function(a){var b=this.startContainer,c=Q(b);if(!b)throw new M("INVALID_STATE_ERR");var d=null;return 1==b.nodeType?d=b:N(b)&&(d=J.parentElement(b)),d=null===d||"HTML"==d.nodeName&&J.isHtmlNamespace(Q(d).documentElement)&&J.isHtmlNamespace(d)?c.createElement("body"):d.cloneNode(!1),d.innerHTML=a,J.fragmentFromNodeChildren(d)}:function(a){var b=d(this),c=b.createElement("body");return c.innerHTML=a,J.fragmentFromNodeChildren(c)},ja=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],ka=0,la=1,ma=2,na=3,oa=0,pa=1,qa=2,ra=3;K.extend(a.rangePrototype,{compareBoundaryPoints:function(a,b){z(this),u(this.startContainer,b.startContainer);var c,d,e,f,g=a==na||a==ka?"start":"end",h=a==la||a==ka?"start":"end";return c=this[g+"Container"],d=this[g+"Offset"],e=b[h+"Container"],f=b[h+"Offset"],R(c,d,e,f)},insertNode:function(a){if(z(this),s(a,aa),v(this.startContainer),P(a,this.startContainer))throw new M("HIERARCHY_REQUEST_ERR");var b=h(a,this.startContainer,this.startOffset);this.setStartBefore(b)},cloneContents:function(){z(this);var a,b;if(this.collapsed)return d(this).createDocumentFragment();if(this.startContainer===this.endContainer&&N(this.startContainer))return a=this.startContainer.cloneNode(!0),a.data=a.data.slice(this.startOffset,this.endOffset),b=d(this).createDocumentFragment(),b.appendChild(a),b;var c=new p(this,!0);return a=j(c),c.detach(),a},canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},surroundContents:function(a){if(s(a,ba),!this.canSurroundContents())throw new M("INVALID_STATE_ERR");var b=this.extractContents();if(a.hasChildNodes())for(;a.lastChild;)a.removeChild(a.lastChild);h(a,this.startContainer,this.startOffset),a.appendChild(b),this.selectNode(a)},cloneRange:function(){z(this);for(var a,b=new I(d(this)),c=ja.length;c--;)a=ja[c],b[a]=this[a];return b},toString:function(){z(this);var a=this.startContainer;if(a===this.endContainer&&N(a))return 3==a.nodeType||4==a.nodeType?a.data.slice(this.startOffset,this.endOffset):"";var b=[],c=new p(this,!0);return k(c,function(a){(3==a.nodeType||4==a.nodeType)&&b.push(a.data)}),c.detach(),b.join("")},compareNode:function(a){z(this);var b=a.parentNode,c=O(a);if(!b)throw new M("NOT_FOUND_ERR");var d=this.comparePoint(b,c),e=this.comparePoint(b,c+1);return 0>d?e>0?qa:oa:e>0?pa:ra},comparePoint:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)<0?-1:R(a,b,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:ia,toHtml:function(){return B(this)},intersectsNode:function(a,b){if(z(this),W(a)!=e(this))return!1;var c=a.parentNode,d=O(a);if(!c)return!0;var f=R(c,d,this.endContainer,this.endOffset),g=R(c,d+1,this.startContainer,this.startOffset);return b?0>=f&&g>=0:0>f&&g>0},isPointInRange:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)>=0&&R(a,b,this.endContainer,this.endOffset)<=0},intersectsRange:function(a){return i(this,a,!1)},intersectsOrTouchesRange:function(a){return i(this,a,!0)},intersection:function(a){if(this.intersectsRange(a)){var b=R(this.startContainer,this.startOffset,a.startContainer,a.startOffset),c=R(this.endContainer,this.endOffset,a.endContainer,a.endOffset),d=this.cloneRange();return-1==b&&d.setStart(a.startContainer,a.startOffset),1==c&&d.setEnd(a.endContainer,a.endOffset),d}return null},union:function(a){if(this.intersectsOrTouchesRange(a)){var b=this.cloneRange();return-1==R(a.startContainer,a.startOffset,this.startContainer,this.startOffset)&&b.setStart(a.startContainer,a.startOffset),1==R(a.endContainer,a.endOffset,this.endContainer,this.endOffset)&&b.setEnd(a.endContainer,a.endOffset),b}throw new M("Ranges do not intersect")},containsNode:function(a,b){return b?this.intersectsNode(a,!1):this.compareNode(a)==ra},containsNodeContents:function(a){return this.comparePoint(a,0)>=0&&this.comparePoint(a,U(a))<=0},containsRange:function(a){var b=this.intersection(a);return null!==b&&a.equals(b)},containsNodeText:function(a){var b=this.cloneRange();b.selectNode(a);var c=b.getNodes([3]);if(c.length>0){b.setStart(c[0],0);var d=c.pop();return b.setEnd(d,d.length),this.containsRange(b)}return this.containsNodeContents(a)},getNodes:function(a,b){return z(this),n(this,a,b)},getDocument:function(){return d(this)},collapseBefore:function(a){this.setEndBefore(a),this.collapse(!1)},collapseAfter:function(a){this.setStartAfter(a),this.collapse(!0)},getBookmark:function(b){var c=d(this),e=a.createRange(c);b=b||J.getBody(c),e.selectNodeContents(b);var f=this.intersection(e),g=0,h=0;return f&&(e.setEnd(f.startContainer,f.startOffset),g=e.toString().length,h=g+f.toString().length),{start:g,end:h,containerNode:b}},moveToBookmark:function(a){var b=a.containerNode,c=0;this.setStart(b,0),
-this.collapse(!0);for(var d,e,f,g,h=[b],i=!1,j=!1;!j&&(d=h.pop());)if(3==d.nodeType)e=c+d.length,!i&&a.start>=c&&a.start<=e&&(this.setStart(d,a.start-c),i=!0),i&&a.end>=c&&a.end<=e&&(this.setEnd(d,a.end-c),j=!0),c=e;else for(g=d.childNodes,f=g.length;f--;)h.push(g[f])},getName:function(){return"DomRange"},equals:function(a){return I.rangesEqual(this,a)},isValid:function(){return y(this)},inspect:function(){return o(this)},detach:function(){}}),F(I,H),K.extend(I,{rangeProperties:ja,RangeIterator:p,copyComparisonConstants:D,createPrototypeRange:F,inspect:o,toHtml:B,getRangeDocument:d,rangesEqual:function(a,b){return a.startContainer===b.startContainer&&a.startOffset===b.startOffset&&a.endContainer===b.endContainer&&a.endOffset===b.endOffset}}),a.DomRange=I}),H.createCoreModule("WrappedRange",["DomRange"],function(a,b){var c,d,e=a.dom,f=a.util,g=e.DomPosition,h=a.DomRange,i=e.getBody,j=e.getContentDocument,k=e.isCharacterDataNode;if(a.features.implementsDomRange&&!function(){function d(a){for(var b,c=m.length;c--;)b=m[c],a[b]=a.nativeRange[b];a.collapsed=a.startContainer===a.endContainer&&a.startOffset===a.endOffset}function g(a,b,c,d,e){var f=a.startContainer!==b||a.startOffset!=c,g=a.endContainer!==d||a.endOffset!=e,h=!a.equals(a.nativeRange);(f||g||h)&&(a.setEnd(d,e),a.setStart(b,c))}var k,l,m=h.rangeProperties;c=function(a){if(!a)throw b.createError("WrappedRange: Range must be specified");this.nativeRange=a,d(this)},h.createPrototypeRange(c,g),k=c.prototype,k.selectNode=function(a){this.nativeRange.selectNode(a),d(this)},k.cloneContents=function(){return this.nativeRange.cloneContents()},k.surroundContents=function(a){this.nativeRange.surroundContents(a),d(this)},k.collapse=function(a){this.nativeRange.collapse(a),d(this)},k.cloneRange=function(){return new c(this.nativeRange.cloneRange())},k.refresh=function(){d(this)},k.toString=function(){return this.nativeRange.toString()};var n=document.createTextNode("test");i(document).appendChild(n);var o=document.createRange();o.setStart(n,0),o.setEnd(n,0);try{o.setStart(n,1),k.setStart=function(a,b){this.nativeRange.setStart(a,b),d(this)},k.setEnd=function(a,b){this.nativeRange.setEnd(a,b),d(this)},l=function(a){return function(b){this.nativeRange[a](b),d(this)}}}catch(p){k.setStart=function(a,b){try{this.nativeRange.setStart(a,b)}catch(c){this.nativeRange.setEnd(a,b),this.nativeRange.setStart(a,b)}d(this)},k.setEnd=function(a,b){try{this.nativeRange.setEnd(a,b)}catch(c){this.nativeRange.setStart(a,b),this.nativeRange.setEnd(a,b)}d(this)},l=function(a,b){return function(c){try{this.nativeRange[a](c)}catch(e){this.nativeRange[b](c),this.nativeRange[a](c)}d(this)}}}k.setStartBefore=l("setStartBefore","setEndBefore"),k.setStartAfter=l("setStartAfter","setEndAfter"),k.setEndBefore=l("setEndBefore","setStartBefore"),k.setEndAfter=l("setEndAfter","setStartAfter"),k.selectNodeContents=function(a){this.setStartAndEnd(a,0,e.getNodeLength(a))},o.selectNodeContents(n),o.setEnd(n,3);var q=document.createRange();q.selectNodeContents(n),q.setEnd(n,4),q.setStart(n,2),-1==o.compareBoundaryPoints(o.START_TO_END,q)&&1==o.compareBoundaryPoints(o.END_TO_START,q)?k.compareBoundaryPoints=function(a,b){return b=b.nativeRange||b,a==b.START_TO_END?a=b.END_TO_START:a==b.END_TO_START&&(a=b.START_TO_END),this.nativeRange.compareBoundaryPoints(a,b)}:k.compareBoundaryPoints=function(a,b){return this.nativeRange.compareBoundaryPoints(a,b.nativeRange||b)};var r=document.createElement("div");r.innerHTML="123";var s=r.firstChild,t=i(document);t.appendChild(r),o.setStart(s,1),o.setEnd(s,2),o.deleteContents(),"13"==s.data&&(k.deleteContents=function(){this.nativeRange.deleteContents(),d(this)},k.extractContents=function(){var a=this.nativeRange.extractContents();return d(this),a}),t.removeChild(r),t=null,f.isHostMethod(o,"createContextualFragment")&&(k.createContextualFragment=function(a){return this.nativeRange.createContextualFragment(a)}),i(document).removeChild(n),k.getName=function(){return"WrappedRange"},a.WrappedRange=c,a.createNativeRange=function(a){return a=j(a,b,"createNativeRange"),a.createRange()}}(),a.features.implementsTextRange){var l=function(a){var b=a.parentElement(),c=a.duplicate();c.collapse(!0);var d=c.parentElement();c=a.duplicate(),c.collapse(!1);var f=c.parentElement(),g=d==f?d:e.getCommonAncestor(d,f);return g==b?g:e.getCommonAncestor(b,g)},m=function(a){return 0==a.compareEndPoints("StartToEnd",a)},n=function(a,b,c,d,f){var h=a.duplicate();h.collapse(c);var i=h.parentElement();if(e.isOrIsAncestorOf(b,i)||(i=b),!i.canHaveHTML){var j=new g(i.parentNode,e.getNodeIndex(i));return{boundaryPosition:j,nodeInfo:{nodeIndex:j.offset,containerElement:j.node}}}var l=e.getDocument(i).createElement("span");l.parentNode&&e.removeNode(l);for(var m,n,o,p,q,r=c?"StartToStart":"StartToEnd",s=f&&f.containerElement==i?f.nodeIndex:0,t=i.childNodes.length,u=t,v=u;;){if(v==t?i.appendChild(l):i.insertBefore(l,i.childNodes[v]),h.moveToElementText(l),m=h.compareEndPoints(r,a),0==m||s==u)break;if(-1==m){if(u==s+1)break;s=v}else u=u==s+1?s:v;v=Math.floor((s+u)/2),i.removeChild(l)}if(q=l.nextSibling,-1==m&&q&&k(q)){h.setEndPoint(c?"EndToStart":"EndToEnd",a);var w;if(/[\r\n]/.test(q.data)){var x=h.duplicate(),y=x.text.replace(/\r\n/g,"\r").length;for(w=x.moveStart("character",y);-1==(m=x.compareEndPoints("StartToEnd",x));)w++,x.moveStart("character",1)}else w=h.text.length;p=new g(q,w)}else n=(d||!c)&&l.previousSibling,o=(d||c)&&l.nextSibling,p=o&&k(o)?new g(o,0):n&&k(n)?new g(n,n.data.length):new g(i,e.getNodeIndex(l));return e.removeNode(l),{boundaryPosition:p,nodeInfo:{nodeIndex:v,containerElement:i}}},o=function(a,b){var c,d,f,g,h=a.offset,j=e.getDocument(a.node),l=i(j).createTextRange(),m=k(a.node);return m?(c=a.node,d=c.parentNode):(g=a.node.childNodes,c=hb;++b)if(!C.isAncestorOf(a[0],a[b]))return!1;return!0}function m(a){var c=a.getNodes();if(!l(c))throw b.createError("getSingleElementFromRange: range "+a.inspect()+" did not consist of a single element");return c[0]}function n(a){return!!a&&"undefined"!=typeof a.text}function o(a,b){var c=new G(b);a._ranges=[c],h(a,c,!1),a.rangeCount=1,a.isCollapsed=c.collapsed}function p(b){if(b._ranges.length=0,"None"==b.docSelection.type)j(b);else{var c=b.docSelection.createRange();if(n(c))o(b,c);else{b.rangeCount=c.length;for(var d,e=L(c.item(0)),f=0;fh;++h)g.add(d.item(h));try{g.add(e)}catch(j){throw b.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}g.select(),p(a)}function r(a,b,c){this.nativeSelection=a,this.docSelection=b,this._ranges=[],this.win=c,this.refresh()}function s(a){a.win=a.anchorNode=a.focusNode=a._ranges=null,a.rangeCount=a.anchorOffset=a.focusOffset=0,a.detached=!0}function t(a,b){for(var c,d,e=ba.length;e--;)if(c=ba[e],d=c.selection,"deleteAll"==b)s(d);else if(c.win==a)return"delete"==b?(ba.splice(e,1),!0):d;return"deleteAll"==b&&(ba.length=0),null}function u(a,c){for(var d,e=L(c[0].startContainer),f=M(e).createControlRange(),g=0,h=c.length;h>g;++g){d=m(c[g]);try{f.add(d)}catch(i){throw b.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}f.select(),p(a)}function v(a,b){if(a.win.document!=L(b))throw new H("WRONG_DOCUMENT_ERR")}function w(b){return function(c,d){var e;this.rangeCount?(e=this.getRangeAt(0),e["set"+(b?"Start":"End")](c,d)):(e=a.createRange(this.win.document),e.setStartAndEnd(c,d)),this.setSingleRange(e,this.isBackward())}}function x(a){var b=[],c=new I(a.anchorNode,a.anchorOffset),d=new I(a.focusNode,a.focusOffset),e="function"==typeof a.getName?a.getName():"Selection";if("undefined"!=typeof a.rangeCount)for(var f=0,g=a.rangeCount;g>f;++f)b[f]=F.inspect(a.getRangeAt(f));return"["+e+"(Ranges: "+b.join(", ")+")(anchor: "+c.inspect()+", focus: "+d.inspect()+"]"}a.config.checkSelectionRanges=!0;var y,z,A="boolean",B="number",C=a.dom,D=a.util,E=D.isHostMethod,F=a.DomRange,G=a.WrappedRange,H=a.DOMException,I=C.DomPosition,J=a.features,K="Control",L=C.getDocument,M=C.getBody,N=F.rangesEqual,O=E(window,"getSelection"),P=D.isHostObject(document,"selection");J.implementsWinGetSelection=O,J.implementsDocSelection=P;var Q=P&&(!O||a.config.preferTextRange);if(Q)y=f,a.isSelectionValid=function(a){var b=d(a,"isSelectionValid").document,c=b.selection;return"None"!=c.type||L(c.createRange().parentElement())==b};else{if(!O)return b.fail("Neither document.selection or window.getSelection() detected."),!1;y=e,a.isSelectionValid=function(){return!0}}a.getNativeSelection=y;var R=y();if(!R)return b.fail("Native selection was null (possibly issue 138?)"),!1;var S=a.createNativeRange(document),T=M(document),U=D.areHostProperties(R,["anchorNode","focusNode","anchorOffset","focusOffset"]);J.selectionHasAnchorAndFocus=U;var V=E(R,"extend");J.selectionHasExtend=V;var W=typeof R.rangeCount==B;J.selectionHasRangeCount=W;var X=!1,Y=!0,Z=V?function(b,c){var d=F.getRangeDocument(c),e=a.createRange(d);e.collapseToPoint(c.endContainer,c.endOffset),b.addRange(k(e)),b.extend(c.startContainer,c.startOffset)}:null;D.areHostMethods(R,["addRange","getRangeAt","removeAllRanges"])&&typeof R.rangeCount==B&&J.implementsDomRange&&!function(){var b=window.getSelection();if(b){for(var c=b.rangeCount,d=c>1,e=[],f=g(b),h=0;c>h;++h)e[h]=b.getRangeAt(h);var i=C.createTestElement(document,"",!1),j=i.appendChild(document.createTextNode(" ")),k=document.createRange();if(k.setStart(j,1),k.collapse(!0),b.removeAllRanges(),b.addRange(k),Y=1==b.rangeCount,b.removeAllRanges(),!d){var l=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(l&&parseInt(l[1])>=36)X=!1;else{var m=k.cloneRange();k.setStart(j,0),m.setEnd(j,3),m.setStart(j,2),b.addRange(k),b.addRange(m),X=2==b.rangeCount}}for(C.removeNode(i),b.removeAllRanges(),h=0;c>h;++h)0==h&&f?Z?Z(b,e[h]):(a.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),b.addRange(e[h])):b.addRange(e[h])}}(),J.selectionSupportsMultipleRanges=X,J.collapsedNonEditableSelectionsSupported=Y;var $,_=!1;T&&E(T,"createControlRange")&&($=T.createControlRange(),D.areHostProperties($,["item","add"])&&(_=!0)),J.implementsControlRange=_,z=U?function(a){return a.anchorNode===a.focusNode&&a.anchorOffset===a.focusOffset}:function(a){return a.rangeCount?a.getRangeAt(a.rangeCount-1).collapsed:!1};var aa;E(R,"getRangeAt")?aa=function(a,b){try{return a.getRangeAt(b)}catch(c){return null}}:U&&(aa=function(b){var c=L(b.anchorNode),d=a.createRange(c);return d.setStartAndEnd(b.anchorNode,b.anchorOffset,b.focusNode,b.focusOffset),d.collapsed!==this.isCollapsed&&d.setStartAndEnd(b.focusNode,b.focusOffset,b.anchorNode,b.anchorOffset),d}),r.prototype=a.selectionPrototype;var ba=[],ca=function(a){if(a&&a instanceof r)return a.refresh(),a;a=d(a,"getNativeSelection");var b=t(a),c=y(a),e=P?f(a):null;return b?(b.nativeSelection=c,b.docSelection=e,b.refresh()):(b=new r(c,e,a),ba.push({win:a,selection:b})),b};a.getSelection=ca,D.createAliasForDeprecatedMethod(a,"getIframeSelection","getSelection");var da=r.prototype;if(!Q&&U&&D.areHostMethods(R,["removeAllRanges","addRange"])){da.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),j(this)};var ea=function(a,b){Z(a.nativeSelection,b),a.refresh()};W?da.addRange=function(b,d){if(_&&P&&this.docSelection.type==K)q(this,b);else if(c(d)&&V)ea(this,b);else{var e;X?e=this.rangeCount:(this.removeAllRanges(),e=0);var f=k(b).cloneRange();try{this.nativeSelection.addRange(f)}catch(g){}if(this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==e+1){if(a.config.checkSelectionRanges){var i=aa(this.nativeSelection,this.rangeCount-1);i&&!N(i,b)&&(b=new G(i))}this._ranges[this.rangeCount-1]=b,h(this,b,ha(this.nativeSelection)),this.isCollapsed=z(this)}else this.refresh()}}:da.addRange=function(a,b){c(b)&&V?ea(this,a):(this.nativeSelection.addRange(k(a)),this.refresh())},da.setRanges=function(a){if(_&&P&&a.length>1)u(this,a);else{this.removeAllRanges();for(var b=0,c=a.length;c>b;++b)this.addRange(a[b])}}}else{if(!(E(R,"empty")&&E(S,"select")&&_&&Q))return b.fail("No means of selecting a Range or TextRange was found"),!1;da.removeAllRanges=function(){try{if(this.docSelection.empty(),"None"!=this.docSelection.type){var a;if(this.anchorNode)a=L(this.anchorNode);else if(this.docSelection.type==K){var b=this.docSelection.createRange();b.length&&(a=L(b.item(0)))}if(a){var c=M(a).createTextRange();c.select(),this.docSelection.empty()}}}catch(d){}j(this)},da.addRange=function(b){this.docSelection.type==K?q(this,b):(a.WrappedTextRange.rangeToTextRange(b).select(),this._ranges[0]=b,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,h(this,b,!1))},da.setRanges=function(a){this.removeAllRanges();var b=a.length;b>1?u(this,a):b&&this.addRange(a[0])}}da.getRangeAt=function(a){if(0>a||a>=this.rangeCount)throw new H("INDEX_SIZE_ERR");return this._ranges[a].cloneRange()};var fa;if(Q)fa=function(b){var c;a.isSelectionValid(b.win)?c=b.docSelection.createRange():(c=M(b.win.document).createTextRange(),c.collapse(!0)),b.docSelection.type==K?p(b):n(c)?o(b,c):j(b)};else if(E(R,"getRangeAt")&&typeof R.rangeCount==B)fa=function(b){if(_&&P&&b.docSelection.type==K)p(b);else if(b._ranges.length=b.rangeCount=b.nativeSelection.rangeCount,b.rangeCount){for(var c=0,d=b.rangeCount;d>c;++c)b._ranges[c]=new a.WrappedRange(b.nativeSelection.getRangeAt(c));h(b,b._ranges[b.rangeCount-1],ha(b.nativeSelection)),b.isCollapsed=z(b)}else j(b)};else{if(!U||typeof R.isCollapsed!=A||typeof S.collapsed!=A||!J.implementsDomRange)return b.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;fa=function(a){var b,c=a.nativeSelection;c.anchorNode?(b=aa(c,0),a._ranges=[b],a.rangeCount=1,i(a),a.isCollapsed=z(a)):j(a)}}da.refresh=function(a){var b=a?this._ranges.slice(0):null,c=this.anchorNode,d=this.anchorOffset;if(fa(this),a){var e=b.length;if(e!=this._ranges.length)return!0;if(this.anchorNode!=c||this.anchorOffset!=d)return!0;for(;e--;)if(!N(b[e],this._ranges[e]))return!0;return!1}};var ga=function(a,b){var c=a.getAllRanges();a.removeAllRanges();for(var d=0,e=c.length;e>d;++d)N(b,c[d])||a.addRange(c[d]);a.rangeCount||j(a)};_&&P?da.removeRange=function(a){if(this.docSelection.type==K){for(var b,c=this.docSelection.createRange(),d=m(a),e=L(c.item(0)),f=M(e).createControlRange(),g=!1,h=0,i=c.length;i>h;++h)b=c.item(h),b!==d||g?f.add(c.item(h)):g=!0;f.select(),p(this)}else ga(this,a)}:da.removeRange=function(a){ga(this,a)};var ha;!Q&&U&&J.implementsDomRange?(ha=g,da.isBackward=function(){return ha(this)}):ha=da.isBackward=function(){return!1},da.isBackwards=da.isBackward,da.toString=function(){for(var a=[],b=0,c=this.rangeCount;c>b;++b)a[b]=""+this._ranges[b];return a.join("")},da.collapse=function(b,c){v(this,b);var d=a.createRange(b);d.collapseToPoint(b,c),this.setSingleRange(d),this.isCollapsed=!0},da.collapseToStart=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[0];this.collapse(a.startContainer,a.startOffset)},da.collapseToEnd=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[this.rangeCount-1];this.collapse(a.endContainer,a.endOffset)},da.selectAllChildren=function(b){v(this,b);var c=a.createRange(b);c.selectNodeContents(b),this.setSingleRange(c)},da.deleteFromDocument=function(){if(_&&P&&this.docSelection.type==K){for(var a,b=this.docSelection.createRange();b.length;)a=b.item(0),b.remove(a),C.removeNode(a);this.refresh()}else if(this.rangeCount){var c=this.getAllRanges();if(c.length){this.removeAllRanges();for(var d=0,e=c.length;e>d;++d)c[d].deleteContents();this.addRange(c[e-1])}}},da.eachRange=function(a,b){for(var c=0,d=this._ranges.length;d>c;++c)if(a(this.getRangeAt(c)))return b},da.getAllRanges=function(){var a=[];return this.eachRange(function(b){a.push(b)}),a},da.setSingleRange=function(a,b){this.removeAllRanges(),this.addRange(a,b)},da.callMethodOnEachRange=function(a,b){var c=[];return this.eachRange(function(d){c.push(d[a].apply(d,b||[]))}),c},da.setStart=w(!0),da.setEnd=w(!1),a.rangePrototype.select=function(a){ca(this.getDocument()).setSingleRange(this,a)},da.changeEachRange=function(a){var b=[],c=this.isBackward();this.eachRange(function(c){a(c),b.push(c)}),this.removeAllRanges(),c&&1==b.length?this.addRange(b[0],"backward"):this.setRanges(b)},da.containsNode=function(a,b){return this.eachRange(function(c){return c.containsNode(a,b)},!0)||!1},da.getBookmark=function(a){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[a])}},da.moveToBookmark=function(b){for(var c,d,e=[],f=0;c=b.rangeBookmarks[f++];)d=a.createRange(this.win),d.moveToBookmark(c),e.push(d);b.backward?this.setSingleRange(e[0],"backward"):this.setRanges(e)},da.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},da.restoreRanges=function(a){this.removeAllRanges();for(var b,c=0;b=a.ranges[c];++c)this.addRange(b,a.backward&&0==c)},da.toHtml=function(){var a=[];return this.eachRange(function(b){a.push(F.toHtml(b))}),a.join("")},J.implementsTextRange&&(da.getNativeTextRange=function(){var c;if(c=this.docSelection){var d=c.createRange();if(n(d))return d;throw b.createError("getNativeTextRange: selection is a control selection")}if(this.rangeCount>0)return a.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw b.createError("getNativeTextRange: selection contains no range")}),da.getName=function(){return"WrappedSelection"},da.inspect=function(){return x(this)},da.detach=function(){t(this.win,"delete"),s(this)},r.detachAll=function(){t(null,"deleteAll")},r.inspect=x,r.isDirectionBackward=c,a.Selection=r,a.selectionPrototype=da,a.addShimListener(function(a){"undefined"==typeof a.getSelection&&(a.getSelection=function(){return ca(a)}),a=null})});var M=!1,N=function(a){M||(M=!0,!H.initialized&&H.config.autoInitialize&&l())};return F&&("complete"==document.readyState?N():(a(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",N,!1),J(window,"load",N))),H},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("SaveRestore",["WrappedRange"],function(a,b){function c(a,b){return(b||document).getElementById(a)}function d(a,b){var c,d="selectionBoundary_"+ +new Date+"_"+(""+Math.random()).slice(2),e=o.getDocument(a.startContainer),f=a.cloneRange();return f.collapse(b),c=e.createElement("span"),c.id=d,c.style.lineHeight="0",c.style.display="none",c.className="rangySelectionBoundary",c.appendChild(e.createTextNode(r)),f.insertNode(c),c}function e(a,d,e,f){var g=c(e,a);g?(d[f?"setStartBefore":"setEndBefore"](g),p(g)):b.warn("Marker element has been removed. Cannot restore selection.")}function f(a,b){return b.compareBoundaryPoints(a.START_TO_START,a)}function g(b,c){var e,f,g=a.DomRange.getRangeDocument(b),h=b.toString(),i=q(c);return b.collapsed?(f=d(b,!1),{document:g,markerId:f.id,collapsed:!0}):(f=d(b,!1),e=d(b,!0),{document:g,startMarkerId:e.id,endMarkerId:f.id,collapsed:!1,backward:i,toString:function(){return"original text: '"+h+"', new text: '"+b.toString()+"'"}})}function h(d,f){var g=d.document;"undefined"==typeof f&&(f=!0);var h=a.createRange(g);if(d.collapsed){var i=c(d.markerId,g);if(i){i.style.display="inline";var j=i.previousSibling;j&&3==j.nodeType?(p(i),h.collapseToPoint(j,j.length)):(h.collapseBefore(i),p(i))}else b.warn("Marker element has been removed. Cannot restore selection.")}else e(g,h,d.startMarkerId,!0),e(g,h,d.endMarkerId,!1);return f&&h.normalizeBoundaries(),h}function i(b,d){var e,h,i=[],j=q(d);b=b.slice(0),b.sort(f);for(var k=0,l=b.length;l>k;++k)i[k]=g(b[k],j);for(k=l-1;k>=0;--k)e=b[k],h=a.DomRange.getRangeDocument(e),e.collapsed?e.collapseAfter(c(i[k].markerId,h)):(e.setEndBefore(c(i[k].endMarkerId,h)),e.setStartAfter(c(i[k].startMarkerId,h)));return i}function j(c){if(!a.isSelectionValid(c))return b.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus."),null;var d=a.getSelection(c),e=d.getAllRanges(),f=1==e.length&&d.isBackward(),g=i(e,f);return f?d.setSingleRange(e[0],f):d.setRanges(e),{win:c,rangeInfos:g,restored:!1}}function k(a){for(var b=[],c=a.length,d=c-1;d>=0;d--)b[d]=h(a[d],!0);return b}function l(b,c){if(!b.restored){var d=b.rangeInfos,e=a.getSelection(b.win),f=k(d),g=d.length;1==g&&c&&a.features.selectionHasExtend&&d[0].backward?(e.removeAllRanges(),e.addRange(f[0],!0)):e.setRanges(f),b.restored=!0}}function m(a,b){var d=c(b,a);d&&p(d)}function n(a){for(var b,c=a.rangeInfos,d=0,e=c.length;e>d;++d)b=c[d],b.collapsed?m(a.doc,b.markerId):(m(a.doc,b.startMarkerId),m(a.doc,b.endMarkerId))}var o=a.dom,p=o.removeNode,q=a.Selection.isDirectionBackward,r="\ufeff";a.util.extend(a,{saveRange:g,restoreRange:h,saveRanges:i,restoreRanges:k,saveSelection:j,restoreSelection:l,removeMarkerElement:m,removeMarkers:n})}),a},this);var Base=function(){};Base.extend=function(a,b){var c=Base.prototype.extend;Base._prototyping=!0;var d=new this;c.call(d,a),d.base=function(){},delete Base._prototyping;var e=d.constructor,f=d.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==f)this._constructing=!0,e.apply(this,arguments),delete this._constructing;else if(null!=arguments[0])return(arguments[0].extend||c).call(arguments[0],d)};return f.ancestor=this,f.extend=this.extend,f.forEach=this.forEach,f.implement=this.implement,f.prototype=d,f.toString=this.toString,f.valueOf=function(a){return"object"==a?f:e.valueOf()},c.call(f,b),"function"==typeof f.init&&f.init(),f},Base.prototype={extend:function(a,b){if(arguments.length>1){var c=this[a];if(c&&"function"==typeof b&&(!c.valueOf||c.valueOf()!=b.valueOf())&&/\bbase\b/.test(b)){var d=b.valueOf();b=function(){var a=this.base||Base.prototype.base;this.base=c;var b=d.apply(this,arguments);return this.base=a,b},b.valueOf=function(a){return"object"==a?b:d},b.toString=Base.toString}this[a]=b}else if(a){var e=Base.prototype.extend;Base._prototyping||"function"==typeof this||(e=this.extend||e);for(var f={toSource:null},g=["constructor","toString","valueOf"],h=Base._prototyping?0:1;i=g[h++];)a[i]!=f[i]&&e.call(this,i,a[i]);for(var i in a)f[i]||e.call(this,i,a[i])}return this}},Base=Base.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(a,b,c){for(var d in a)void 0===this.prototype[d]&&b.call(c,a[d],d,a)},implement:function(){for(var a=0;aa:">"===b?a>d:"<="===b?d>=a:">="===b?a>=d:void 0:a===d:!0}var d=navigator.userAgent,e=document.createElement("div"),f=-1!==d.indexOf("Gecko")&&-1===d.indexOf("KHTML"),g=-1!==d.indexOf("AppleWebKit/"),h=-1!==d.indexOf("Chrome/"),i=-1!==d.indexOf("Opera/");return{USER_AGENT:d,supported:function(){var c=this.USER_AGENT.toLowerCase(),d="contentEditable"in e,f=document.execCommand&&document.queryCommandSupported&&document.queryCommandState,g=document.querySelector&&document.querySelectorAll,h=this.isIos()&&a(c)<5||this.isAndroid()&&b(c)<4||-1!==c.indexOf("opera mobi")||-1!==c.indexOf("hpwos/");return d&&f&&g&&!h},isTouchDevice:function(){return this.supportsEvent("touchmove")},isIos:function(){return/ipad|iphone|ipod/i.test(this.USER_AGENT)},isAndroid:function(){return-1!==this.USER_AGENT.indexOf("Android")},supportsSandboxedIframes:function(){return c()},throwsMixedContentWarningWhenIframeSrcIsEmpty:function(){return!("querySelector"in document)},displaysCaretInEmptyContentEditableCorrectly:function(){return c()},hasCurrentStyleProperty:function(){return"currentStyle"in e},insertsLineBreaksOnReturn:function(){return f},supportsPlaceholderAttributeOn:function(a){return"placeholder"in a},supportsEvent:function(a){return"on"+a in e||function(){return e.setAttribute("on"+a,"return;"),"function"==typeof e["on"+a]}()},supportsEventsInIframeCorrectly:function(){return!i},supportsHTML5Tags:function(a){var b=a.createElement("div"),c="foo";return b.innerHTML=c,b.innerHTML.toLowerCase()===c},supportsCommand:function(){var a={formatBlock:c(10,"<="),insertUnorderedList:c(9,">="),insertOrderedList:c(9,">=")},b={insertHTML:f};return function(c,d){var e=a[d];if(!e){try{return c.queryCommandSupported(d)}catch(f){}try{return c.queryCommandEnabled(d)}catch(g){return!!b[d]}}return!1}}(),doesAutoLinkingInContentEditable:function(){return c()},canDisableAutoLinking:function(){return this.supportsCommand(document,"AutoUrlDetect")},clearsContentEditableCorrectly:function(){return f||i||g},supportsGetAttributeCorrectly:function(){var a=document.createElement("td");return"1"!=a.getAttribute("rowspan")},canSelectImagesInContentEditable:function(){return f||c()||i},autoScrollsToCaret:function(){return!g},autoClosesUnclosedTags:function(){var a,b,c=e.cloneNode(!1);return c.innerHTML="",b=c.innerHTML.toLowerCase(),a=""===b||""===b,this.autoClosesUnclosedTags=function(){return a},a},supportsNativeGetElementsByClassName:function(){return-1!==String(document.getElementsByClassName).indexOf("[native code]")},supportsSelectionModify:function(){return"getSelection"in window&&"modify"in window.getSelection()},needsSpaceAfterLineBreak:function(){return i},supportsSpeechApiOn:function(a){var b=d.match(/Chrome\/(\d+)/)||[void 0,0];return b[1]>=11&&("onwebkitspeechchange"in a||"speech"in a)},crashesWhenDefineProperty:function(a){return c(9)&&("XMLHttpRequest"===a||"XDomainRequest"===a)},doesAsyncFocus:function(){return c()},hasProblemsSettingCaretAfterImg:function(){return c()},hasUndoInContextMenu:function(){return f||h||i},hasInsertNodeIssue:function(){return i},hasIframeFocusIssue:function(){return c()},createsNestedInvalidMarkupAfterPaste:function(){return g},supportsMutationEvents:function(){return"MutationEvent"in window},supportsModernPaste:function(){return!("clipboardData"in window)},fixStyleKey:function(a){return"cssFloat"===a?"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat":a}}}(),wysihtml5.lang.array=function(a){return{contains:function(b){if(Array.isArray(b)){for(var c=b.length;c--;)if(-1!==wysihtml5.lang.array(a).indexOf(b[c]))return!0;return!1}return-1!==wysihtml5.lang.array(a).indexOf(b)},indexOf:function(b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},without:function(b){b=wysihtml5.lang.array(b);for(var c=[],d=0,e=a.length;e>d;d++)b.contains(a[d])||c.push(a[d]);return c},get:function(){for(var b=0,c=a.length,d=[];c>b;b++)d.push(a[b]);return d},map:function(b,c){if(Array.prototype.map)return a.map(b,c);for(var d=a.length>>>0,e=new Array(d),f=0;d>f;f++)e[f]=b.call(c,a[f],f,a);return e},unique:function(){for(var b=[],c=a.length,d=0;c>d;)wysihtml5.lang.array(b).contains(a[d])||b.push(a[d]),d++;return b}}},wysihtml5.lang.Dispatcher=Base.extend({on:function(a,b){return this.events=this.events||{},this.events[a]=this.events[a]||[],this.events[a].push(b),this},off:function(a,b){this.events=this.events||{};var c,d,e=0;if(a){for(c=this.events[a]||[],d=[];e\t"]/g,d={"&":"&","<":"<",">":">",'"':"""," ":" "};wysihtml5.lang.string=function(e){return e=String(e),{trim:function(){return e.replace(a,"").replace(b,"")},interpolate:function(a){for(var b in a)e=this.replace("#{"+b+"}").by(a[b]);return e},replace:function(a){return{by:function(b){return e.split(a).join(b)}}},escapeHTML:function(a,b){var f=e.replace(c,function(a){return d[a]});return a&&(f=f.replace(/(?:\r\n|\r|\n)/g,"
")),b&&(f=f.replace(/ /gi," ")),f}}}}(),function(a){function b(a,b){return f(a,b)?a:(a===a.ownerDocument.documentElement&&(a=a.ownerDocument.body),g(a,b))}function c(a){return a.replace(i,function(a,b){var c=(b.match(j)||[])[1]||"",d=l[c];b=b.replace(j,""),b.split(d).length>b.split(c).length&&(b+=c,c="");var e=b,f=b;return b.length>k&&(f=f.substr(0,k)+"..."),"www."===e.substr(0,4)&&(e="http://"+e),''+f+""+c})}function d(a){var b=a._wysihtml5_tempElement;return b||(b=a._wysihtml5_tempElement=a.createElement("div")),b}function e(b){var e=b.parentNode,f=a.lang.string(b.data).escapeHTML(),g=d(e.ownerDocument);for(g.innerHTML=""+c(f),g.removeChild(g.firstChild);g.firstChild;)e.insertBefore(g.firstChild,b);e.removeChild(b)}function f(b,c){for(var d;b.parentNode;){if(b=b.parentNode,d=b.nodeName,b.className&&a.lang.array(b.className.split(" ")).contains(c))return!0;if(h.contains(d))return!0;if("body"===d)return!1}return!1}function g(b,c){if(!(h.contains(b.nodeName)||b.className&&a.lang.array(b.className.split(" ")).contains(c))){if(b.nodeType===a.TEXT_NODE&&b.data.match(i))return void e(b);for(var d=a.lang.array(b.childNodes).get(),f=d.length,j=0;f>j;j++)g(d[j],c);return b}}var h=a.lang.array(["CODE","PRE","A","SCRIPT","HEAD","TITLE","STYLE"]),i=/((https?:\/\/|www\.)[^\s<]{3,})/gi,j=/([^\w\/\-](,?))$/i,k=100,l={")":"(","]":"[","}":"{"};a.dom.autoLink=b,a.dom.autoLink.URL_REG_EXP=i}(wysihtml5),function(a){var b=a.dom;b.addClass=function(a,c){var d=a.classList;return d?d.add(c):void(b.hasClass(a,c)||(a.className+=" "+c))},b.removeClass=function(a,b){var c=a.classList;return c?c.remove(b):void(a.className=a.className.replace(new RegExp("(^|\\s+)"+b+"(\\s+|$)")," "))},b.hasClass=function(a,b){var c=a.classList;if(c)return c.contains(b);var d=a.className;return d.length>0&&(d==b||new RegExp("(^|\\s)"+b+"(\\s|$)").test(d))}}(wysihtml5),wysihtml5.dom.contains=function(){var a=document.documentElement;return a.contains?function(a,b){if(b.nodeType!==wysihtml5.ELEMENT_NODE){if(b.parentNode===a)return!0;b=b.parentNode}return a!==b&&a.contains(b)}:a.compareDocumentPosition?function(a,b){return!!(16&a.compareDocumentPosition(b))}:void 0}(),wysihtml5.dom.convertToList=function(){function a(a,b){var c=a.createElement("li");return b.appendChild(c),c}function b(a,b){return a.createElement(b)}function c(c,d,e){if("UL"===c.nodeName||"OL"===c.nodeName||"MENU"===c.nodeName)return c;var f,g,h,i,j,k,l,m,n,o=c.ownerDocument,p=b(o,d),q=c.querySelectorAll("br"),r=q.length;for(n=0;r>n;n++)for(i=q[n];(j=i.parentNode)&&j!==c&&j.lastChild===i;){if("block"===wysihtml5.dom.getStyle("display").from(j)){j.removeChild(i);break}wysihtml5.dom.insert(i).after(i.parentNode)}for(f=wysihtml5.lang.array(c.childNodes).get(),g=f.length,n=0;g>n;n++)m=m||a(o,p),h=f[n],k="block"===wysihtml5.dom.getStyle("display").from(h),l="BR"===h.nodeName,!k||e&&wysihtml5.dom.hasClass(h,e)?l?m=m.firstChild?null:m:m.appendChild(h):(m=m.firstChild?a(o,p):m,m.appendChild(h),m=null);return 0===f.length&&a(o,p),c.parentNode.replaceChild(p,c),p}return c}(),wysihtml5.dom.copyAttributes=function(a){return{from:function(b){return{to:function(c){for(var d,e=0,f=a.length;f>e;e++)d=a[e],"undefined"!=typeof b[d]&&""!==b[d]&&(c[d]=b[d]);return{andTo:arguments.callee}}}}}},function(a){var b=["-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing"],c=function(b){return d(b)?parseInt(a.getStyle("width").from(b),10)d;d++)if("border-box"===a.getStyle(b[d]).from(c))return b[d]};a.copyStyles=function(d){return{from:function(e){c(e)&&(d=wysihtml5.lang.array(d).without(b));for(var f,g="",h=d.length,i=0;h>i;i++)f=d[i],g+=f+":"+a.getStyle(f).from(e)+";";return{to:function(b){return a.setStyles(g).on(b),{andTo:arguments.callee}}}}}}}(wysihtml5.dom),function(a){a.dom.delegate=function(a,b,c,d){var e=function(c){for(var e=c.target,f=3===e.nodeType?e.parentNode:e,g=a.querySelectorAll(b),h=0,i=g.length;i>h;h++)g[h].contains(f)&&d.call(g[h],c)};return a.addEventListener(c,e,!1),{stop:function(){a.removeEventListener(c,e,!1)}}}}(wysihtml5),function(a){function b(a,b){for(var c=[a],d=a;b&&d&&d!==b||!b&&d;)c.unshift(d),d=d.parentNode;return c}a.dom.domNode=function(c){var d=[a.ELEMENT_NODE,a.TEXT_NODE];return{is:{emptyTextNode:function(b){var d=b?/^\s*$/g:/^[\r\n]*$/g;return c.nodeType===a.TEXT_NODE&&d.test(c.data)},visible:function(){var b=!/^\s*$/g.test(a.dom.getTextContent(c));return b||1===c.nodeType&&c.querySelector("img, br, hr, object, embed, canvas, input, textarea")&&(b=!0),b}},prev:function(b){var e=c.previousSibling,f=b&&b.nodeTypes?b.nodeTypes:d;return e?!a.lang.array(f).contains(e.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(e).is.emptyTextNode(!0)?a.dom.domNode(e).prev(b):e:null},next:function(b){var e=c.nextSibling,f=b&&b.nodeTypes?b.nodeTypes:d;return e?!a.lang.array(f).contains(e.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(e).is.emptyTextNode(!0)?a.dom.domNode(e).next(b):e:null},commonAncestor:function(a,d){var e=b(c,d),f=b(a,d);if(e[0]!=f[0])return null;for(var g=0;g0)for(var f=!1,g=Array.isArray(b.styleProperty)?b.styleProperty:[b.styleProperty],h=0,i=g.length;i>h;h++){if(d=a.browser.fixStyleKey(g[h]),c.style[d]){if(!b.styleValue){f=!0;break}if(b.styleValue instanceof RegExp){if(c.style[d].trim().match(b.styleValue).length>0){f=!0;break}}else if(Array.isArray(b.styleValue)){if(b.styleValue.indexOf(c.style[d].trim())){f=!0;break}}else if(b.styleValue===c.style[d].trim().replace(/, /g,",")){f=!0;break}}if(!f)return!1}if(b.attribute){var j=a.dom.getAttributes(c),k=[],l=!1;Array.isArray(b.attribute)?k=b.attribute:k[b.attribute]=b.attributeValue;for(var m in k)if(k.hasOwnProperty(m))if("undefined"==typeof k[m]){if("undefined"!=typeof j[m]){l=!0;break}}else if(j[m]===k[m]){l=!0;break}if(!l)return!1}return!0}}}}(wysihtml5),wysihtml5.dom.getAsDom=function(){var a=function(a,b){var c=b.createElement("div");c.style.display="none",b.body.appendChild(c);try{c.innerHTML=a}catch(d){}return b.body.removeChild(c),c},b=function(a){if(!a._wysihtml5_supportsHTML5Tags){for(var b=0,d=c.length;d>b;b++)a.createElement(c[b]);a._wysihtml5_supportsHTML5Tags=!0}},c=["abbr","article","aside","audio","bdi","canvas","command","datalist","details","figcaption","figure","footer","header","hgroup","keygen","mark","meter","nav","output","progress","rp","rt","ruby","svg","section","source","summary","time","track","video","wbr"];return function(c,d){d=d||document;var e;return"object"==typeof c&&c.nodeType?(e=d.createElement("div"),e.appendChild(c)):wysihtml5.browser.supportsHTML5Tags(d)?(e=d.createElement("div"),e.innerHTML=c):(b(d),e=a(c,d)),e}}(),wysihtml5.dom.getParentElement=function(){return function(a,b,c,d){for(c=c||50;c--&&a&&"BODY"!==a.nodeName&&(!d||a!==d);){if(wysihtml5.dom.domNode(a).test(b))return a;a=a.parentNode}return null}}(),wysihtml5.dom.getStyle=function(){function a(a){return a.replace(c,function(a){return a.charAt(1).toUpperCase()})}var b={"float":"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat"},c=/\-[a-z]/g;return function(c){return{from:function(d){if(d.nodeType===wysihtml5.ELEMENT_NODE){var e=d.ownerDocument,f=b[c]||a(c),g=d.style,h=d.currentStyle,i=g[f];if(i)return i;if(h)try{return h[f]}catch(j){}var k,l,m=e.defaultView||e.parentWindow,n=("height"===c||"width"===c)&&"TEXTAREA"===d.nodeName;return m.getComputedStyle?(n&&(k=g.overflow,g.overflow="hidden"),l=m.getComputedStyle(d,null).getPropertyValue(c),n&&(g.overflow=k||""),l):void 0}}}}}(),wysihtml5.dom.getTextNodes=function(a,b){var c=[];for(a=a.firstChild;a;a=a.nextSibling)3==a.nodeType?b&&/^\s*$/.test(a.innerText||a.textContent)||c.push(a):c=c.concat(wysihtml5.dom.getTextNodes(a,b));return c},wysihtml5.dom.hasElementWithTagName=function(){function a(a){return a._wysihtml5_identifier||(a._wysihtml5_identifier=c++)}var b={},c=1;return function(c,d){var e=a(c)+":"+d,f=b[e];return f||(f=b[e]=c.getElementsByTagName(d)),f.length>0}}(),function(a){function b(a){return a._wysihtml5_identifier||(a._wysihtml5_identifier=d++)}var c={},d=1;a.dom.hasElementWithClassName=function(d,e){if(!a.browser.supportsNativeGetElementsByClassName())return!!d.querySelector("."+e);var f=b(d)+":"+e,g=c[f];return g||(g=c[f]=d.getElementsByClassName(e)),g.length>0}}(wysihtml5),wysihtml5.dom.insert=function(a){return{after:function(b){b.parentNode.insertBefore(a,b.nextSibling)},before:function(b){b.parentNode.insertBefore(a,b)},into:function(b){b.appendChild(a)}}},wysihtml5.dom.insertCSS=function(a){return a=a.join("\n"),{into:function(b){var c=b.createElement("style");c.type="text/css",c.styleSheet?c.styleSheet.cssText=a:c.appendChild(b.createTextNode(a));var d=b.querySelector("head link");if(d)return void d.parentNode.insertBefore(c,d);var e=b.querySelector("head");e&&e.appendChild(c)}}},function(a){a.dom.lineBreaks=function(b){function c(a){return"BR"===a.nodeName}function d(b){return c(b)?!0:"block"===a.dom.getStyle("display").from(b)?!0:!1}return{add:function(c){var e=b.ownerDocument,f=a.dom.domNode(b).next({ignoreBlankTexts:!0}),g=a.dom.domNode(b).prev({ignoreBlankTexts:!0});f&&!d(f)&&a.dom.insert(e.createElement("br")).after(b),g&&!d(g)&&a.dom.insert(e.createElement("br")).before(b)},remove:function(d){var e=a.dom.domNode(b).next({ignoreBlankTexts:!0}),f=a.dom.domNode(b).prev({ignoreBlankTexts:!0});e&&c(e)&&e.parentNode.removeChild(e),f&&c(f)&&f.parentNode.removeChild(f)}}}}(wysihtml5),wysihtml5.dom.observe=function(a,b,c){b="string"==typeof b?[b]:b;for(var d,e,f=0,g=b.length;g>f;f++)e=b[f],a.addEventListener?a.addEventListener(e,c,!1):(d=function(b){"target"in b||(b.target=b.srcElement),b.preventDefault=b.preventDefault||function(){this.returnValue=!1},b.stopPropagation=b.stopPropagation||function(){this.cancelBubble=!0},c.call(a,b)},a.attachEvent("on"+e,d));return{stop:function(){for(var e,f=0,g=b.length;g>f;f++)e=b[f],a.removeEventListener?a.removeEventListener(e,c,!1):a.detachEvent("on"+e,d)}}},wysihtml5.dom.parse=function(a,b){function c(a,b){wysihtml5.lang.object(t).merge(s).merge(b.rules).get();var c,f,g,h=b.context||a.ownerDocument||document,i=h.createDocumentFragment(),j="string"==typeof a,k=!1;for(b.clearInternals===!0&&(k=!0),c=j?wysihtml5.dom.getAsDom(a,h):a,t.selectors&&e(c,t.selectors);c.firstChild;)g=c.firstChild,f=d(g,b.cleanUp,k,b.uneditableClass),f&&i.appendChild(f),g!==f&&c.removeChild(g);if(b.unjoinNbsps)for(var l=wysihtml5.dom.getTextNodes(i),m=l.length;m--;)l[m].nodeValue=l[m].nodeValue.replace(/([\S\u00A0])\u00A0/gi,"$1 ");return c.innerHTML="",c.appendChild(i),j?wysihtml5.quirks.getCorrectInnerHTML(c):c}function d(a,b,c,e){var f,g,h,i,j=a.nodeType,k=a.childNodes,l=k.length,m=p[j],n=0;if(e&&1===j&&wysihtml5.dom.hasClass(a,e))return a;if(g=m&&m(a,c),!g){if(g===!1){for(f=a.ownerDocument.createDocumentFragment(),n=l;n--;)k[n]&&(h=d(k[n],b,c,e),h&&(k[n]===h&&n--,f.insertBefore(h,f.firstChild)));return i=wysihtml5.dom.getStyle("display").from(a),""===i&&(i=wysihtml5.lang.array(u).contains(a.tagName)?"block":""),wysihtml5.lang.array(["block","flex","table"]).contains(i)&&f.appendChild(a.ownerDocument.createElement("br")),wysihtml5.lang.array(["div","pre","p","table","td","th","ul","ol","li","dd","dl","footer","header","section","h1","h2","h3","h4","h5","h6"]).contains(a.nodeName.toLowerCase())&&a.parentNode.lastChild!==a&&(a.nextSibling&&3===a.nextSibling.nodeType&&/^\s/.test(a.nextSibling.nodeValue)||f.appendChild(a.ownerDocument.createTextNode(" "))),f.normalize&&f.normalize(),f}return null}for(n=0;l>n;n++)k[n]&&(h=d(k[n],b,c,e),h&&(k[n]===h&&n--,g.appendChild(h)));if(b&&g.nodeName.toLowerCase()===q&&(!g.childNodes.length||/^\s*$/gi.test(g.innerHTML)&&(c||"_wysihtml5-temp-placeholder"!==a.className&&"rangySelectionBoundary"!==a.className)||!g.attributes.length)){for(f=g.ownerDocument.createDocumentFragment();g.firstChild;)f.appendChild(g.firstChild);return f.normalize&&f.normalize(),f}return g.normalize&&g.normalize(),g}function e(a,b){var c,d,e;for(c in b)if(b.hasOwnProperty(c)){wysihtml5.lang.object(b[c]).isFunction()?d=b[c]:"string"==typeof b[c]&&z[b[c]]&&(d=z[b[c]]),e=a.querySelectorAll(c);for(var f=e.length;f--;)d(e[f])}}function f(a,b){var c,d,e,f=t.tags,h=a.nodeName.toLowerCase(),j=a.scopeName;if(a._wysihtml5)return null;if(a._wysihtml5=1,"wysihtml5-temp"===a.className)return null;if(j&&"HTML"!=j&&(h=j+":"+h),"outerHTML"in a&&(wysihtml5.browser.autoClosesUnclosedTags()||"P"!==a.nodeName||""===a.outerHTML.slice(-4).toLowerCase()||(h="div")),h in f){if(c=f[h],!c||c.remove)return null;if(c.unwrap)return!1;c="string"==typeof c?{rename_tag:c}:c}else{if(!a.firstChild)return null;c={rename_tag:q}}if(c.one_of_type&&!g(a,t,c.one_of_type,b)){if(!c.remove_action)return null;if("unwrap"===c.remove_action)return!1;if("rename"!==c.remove_action)return null;e=c.remove_action_rename_to||q}return d=a.ownerDocument.createElement(e||c.rename_tag||h),m(a,d,c,b),i(a,d,c),a=null,d.normalize&&d.normalize(),d}function g(a,b,c,d){var e,f;if("SPAN"===a.nodeName&&!d&&("_wysihtml5-temp-placeholder"===a.className||"rangySelectionBoundary"===a.className))return!0;for(f in c)if(c.hasOwnProperty(f)&&b.type_definitions&&b.type_definitions[f]&&(e=b.type_definitions[f],h(a,e)))return!0;return!1}function h(a,b){var c,d,e,f,g,h=a.getAttribute("class"),i=a.getAttribute("style");if(b.methods)for(var j in b.methods)if(b.methods.hasOwnProperty(j)&&y[j]&&y[j](a))return!0;if(h&&b.classes){h=h.replace(/^\s+/g,"").replace(/\s+$/g,"").split(r),c=h.length;for(var k=0;c>k;k++)if(b.classes[h[k]])return!0}if(i&&b.styles){i=i.split(";");for(d in b.styles)if(b.styles.hasOwnProperty(d))for(var l=i.length;l--;)if(g=i[l].split(":"),g[0].replace(/\s/g,"").toLowerCase()===d&&(b.styles[d]===!0||1===b.styles[d]||wysihtml5.lang.array(b.styles[d]).contains(g[1].replace(/\s/g,"").toLowerCase())))return!0}if(b.attrs)for(e in b.attrs)if(b.attrs.hasOwnProperty(e)&&(f=wysihtml5.dom.getAttribute(a,e),"string"==typeof f&&f.search(b.attrs[e])>-1))return!0;return!1}function i(a,b,c){var d,e;if(c&&c.keep_styles)for(d in c.keep_styles)if(c.keep_styles.hasOwnProperty(d)){if(e="float"===d?a.style.styleFloat||a.style.cssFloat:a.style[d],c.keep_styles[d]instanceof RegExp&&!c.keep_styles[d].test(e))continue;"float"===d?b.style[a.style.styleFloat?"styleFloat":"cssFloat"]=e:a.style[d]&&(b.style[d]=e)}}function j(a,b){var c=[];for(var d in b)b.hasOwnProperty(d)&&0===d.indexOf(a)&&c.push(d);return c}function k(a,b,c,d){var e,f=wysihtml5.lang.object(c).isFunction()?c:v[c];return f&&(e=f(b,d),"string"==typeof e)?e:!1}function l(a,b){var c,d,e,f=wysihtml5.lang.object(t.attributes||{}).clone(),g=wysihtml5.lang.object(f).merge(wysihtml5.lang.object(b||{}).clone()).get(),h={},i=wysihtml5.dom.getAttributes(a);for(c in g)if(/\*$/.test(c)){e=j(c.slice(0,-1),i);for(var l=0,m=e.length;m>l;l++)d=k(e[l],i[e[l]],g[c],a.nodeName),d!==!1&&(h[e[l]]=d)}else d=k(c,i[c],g[c],a.nodeName),d!==!1&&(h[c]=d);return h}function m(a,b,c,d){var e,f,g,h,i,j={},k=c.set_class,m=c.add_class,n=c.add_style,o=c.set_attributes,p=t.classes,q=0,s=[],u=[],v=[],y=[];if(o&&(j=wysihtml5.lang.object(o).clone()),j=wysihtml5.lang.object(j).merge(l(a,c.check_attributes)).get(),k&&s.push(k),m)for(h in m)i=x[m[h]],i&&(g=i(wysihtml5.dom.getAttribute(a,h)),"string"==typeof g&&s.push(g));if(n)for(h in n)i=w[n[h]],i&&(newStyle=i(wysihtml5.dom.getAttribute(a,h)),"string"==typeof newStyle&&u.push(newStyle));if("string"==typeof p&&"any"===p&&a.getAttribute("class"))if(t.classes_blacklist){for(y=a.getAttribute("class"),y&&(s=s.concat(y.split(r))),e=s.length;e>q;q++)f=s[q],t.classes_blacklist[f]||v.push(f);v.length&&(j["class"]=wysihtml5.lang.array(v).unique().join(" "))}else j["class"]=a.getAttribute("class");else{for(d||(p["_wysihtml5-temp-placeholder"]=1,p._rangySelectionBoundary=1,p["wysiwyg-tmp-selected-cell"]=1),y=a.getAttribute("class"),y&&(s=s.concat(y.split(r))),e=s.length;e>q;q++)f=s[q],p[f]&&v.push(f);v.length&&(j["class"]=wysihtml5.lang.array(v).unique().join(" "))}j["class"]&&d&&(j["class"]=j["class"].replace("wysiwyg-tmp-selected-cell",""),/^\s*$/g.test(j["class"])&&delete j["class"]),u.length&&(j.style=wysihtml5.lang.array(u).unique().join(" "));for(h in j)try{b.setAttribute(h,j[h])}catch(z){}j.src&&("undefined"!=typeof j.width&&b.setAttribute("width",j.width),"undefined"!=typeof j.height&&b.setAttribute("height",j.height))}function n(a){var b=a.nextSibling;if(!b||b.nodeType!==wysihtml5.TEXT_NODE){var c=a.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"");return a.ownerDocument.createTextNode(c)}b.data=a.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")+b.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")}function o(a){return t.comments?a.ownerDocument.createComment(a.nodeValue):void 0}var p={1:f,3:n,8:o},q="span",r=/\s+/,s={tags:{},classes:{}},t={},u=["ADDRESS","BLOCKQUOTE","CENTER","DIR","DIV","DL","FIELDSET","FORM","H1","H2","H3","H4","H5","H6","ISINDEX","MENU","NOFRAMES","NOSCRIPT","OL","P","PRE","TABLE","UL"],v={url:function(){var a=/^https?:\/\//i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),src:function(){var a=/^(\/|https?:\/\/)/i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),href:function(){var a=/^(#|\/|https?:\/\/|mailto:|tel:)/i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),alt:function(){var a=/[^ a-z0-9_\-]/gi;return function(b,c){return b?b.replace(a,""):"IMG"===c?"":null}}(),numbers:function(){var a=/\D/g;return function(b){return b=(b||"").replace(a,""),b||null}}(),dimension:function(){var a=/\D*(\d+)(\.\d+)?\s?(%)?\D*/;return function(b){return b=(b||"").replace(a,"$1$2$3"),b||null}}(),any:function(){return function(a){return a?a:null}}()},w={align_text:function(){var a={left:"text-align: left;",right:"text-align: right;",center:"text-align: center;"};return function(b){return a[String(b).toLowerCase()]}}()},x={align_img:function(){var a={left:"wysiwyg-float-left",right:"wysiwyg-float-right"};return function(b){return a[String(b).toLowerCase()]}}(),align_text:function(){var a={left:"wysiwyg-text-align-left",right:"wysiwyg-text-align-right",center:"wysiwyg-text-align-center",justify:"wysiwyg-text-align-justify"};return function(b){return a[String(b).toLowerCase()]}}(),clear_br:function(){var a={left:"wysiwyg-clear-left",right:"wysiwyg-clear-right",both:"wysiwyg-clear-both",all:"wysiwyg-clear-both"};return function(b){return a[String(b).toLowerCase()]}}(),size_font:function(){var a={1:"wysiwyg-font-size-xx-small",2:"wysiwyg-font-size-small",3:"wysiwyg-font-size-medium",4:"wysiwyg-font-size-large",5:"wysiwyg-font-size-x-large",6:"wysiwyg-font-size-xx-large",7:"wysiwyg-font-size-xx-large","-":"wysiwyg-font-size-smaller","+":"wysiwyg-font-size-larger"};return function(b){return a[String(b).charAt(0)]}}()},y={has_visible_contet:function(){var a,b=["img","video","picture","br","script","noscript","style","table","iframe","object","embed","audio","svg","input","button","select","textarea","canvas"];return function(c){if(a=(c.innerText||c.textContent).replace(/\s/g,""),a&&a.length>0)return!0;for(var d=b.length;d--;)if(c.querySelector(b[d]))return!0;return c.offsetWidth&&c.offsetWidth>0&&c.offsetHeight&&c.offsetHeight>0?!0:!1}}()},z={unwrap:function(a){wysihtml5.dom.unwrap(a)},remove:function(a){a.parentNode.removeChild(a)}};return c(a,b)},wysihtml5.dom.removeEmptyTextNodes=function(a){for(var b,c=wysihtml5.lang.array(a.childNodes).get(),d=c.length,e=0;d>e;e++)b=c[e],b.nodeType===wysihtml5.TEXT_NODE&&/^[\n\r]*$/.test(b.data)&&b.parentNode.removeChild(b)},wysihtml5.dom.renameElement=function(a,b){for(var c,d=a.ownerDocument.createElement(b);c=a.firstChild;)d.appendChild(c);return wysihtml5.dom.copyAttributes(["align","className"]).from(a).to(d),a.parentNode&&a.parentNode.replaceChild(d,a),d},wysihtml5.dom.replaceWithChildNodes=function(a){if(a.parentNode){if(!a.firstChild)return void a.parentNode.removeChild(a);for(var b=a.ownerDocument.createDocumentFragment();a.firstChild;)b.appendChild(a.firstChild);a.parentNode.replaceChild(b,a),a=b=null}},function(a){function b(b){return"block"===a.getStyle("display").from(b)}function c(a){return"BR"===a.nodeName}function d(a){var b=a.ownerDocument.createElement("br");a.appendChild(b)}function e(a,e){if(a.nodeName.match(/^(MENU|UL|OL)$/)){var f,g,h,i,j,k,l,m=a.ownerDocument,n=m.createDocumentFragment(),o=wysihtml5.dom.domNode(a).prev({ignoreBlankTexts:!0}),p=wysihtml5.dom.domNode(a).next({ignoreBlankTexts:!0}),q=a.lastElementChild||a.lastChild;if(e)for(!o||b(o)||c(o)||d(n);k=a.firstElementChild||a.firstChild;){for(g=k.lastChild,l=k===q;f=k.firstChild;)h=f===g,i=(!l||p&&!b(p))&&h&&!b(f)&&!c(f),n.appendChild(f),i&&d(n);k.parentNode.removeChild(k)}else for(;k=a.firstElementChild||a.firstChild;){if(k.querySelector&&k.querySelector("div, p, ul, ol, menu, blockquote, h1, h2, h3, h4, h5, h6"))for(;f=k.firstChild;)n.appendChild(f);else{for(j=m.createElement("p");f=k.firstChild;)j.appendChild(f);n.appendChild(j)}k.parentNode.removeChild(k)}a.parentNode.replaceChild(n,a)}}a.resolveList=e}(wysihtml5.dom),function(a){var b=document,c=["parent","top","opener","frameElement","frames","localStorage","globalStorage","sessionStorage","indexedDB"],d=["open","close","openDialog","showModalDialog","alert","confirm","prompt","openDatabase","postMessage","XMLHttpRequest","XDomainRequest"],e=["referrer","write","open","close"];a.dom.Sandbox=Base.extend({constructor:function(b,c){this.callback=b||a.EMPTY_FUNCTION,this.config=a.lang.object({}).merge(c).get(),this.config.className||(this.config.className="wysihtml5-sandbox"),this.editableArea=this._createIframe()},insertInto:function(a){"string"==typeof a&&(a=b.getElementById(a)),a.appendChild(this.editableArea)},getIframe:function(){return this.editableArea},getWindow:function(){this._readyError()},getDocument:function(){this._readyError()},destroy:function(){var a=this.getIframe();a.parentNode.removeChild(a)},_readyError:function(){throw new Error("wysihtml5.Sandbox: Sandbox iframe isn't loaded yet")},_createIframe:function(){var c=this,d=b.createElement("iframe");return d.className=this.config.className,a.dom.setAttributes({security:"restricted",allowtransparency:"true",frameborder:0,width:0,height:0,marginwidth:0,marginheight:0}).on(d),a.browser.throwsMixedContentWarningWhenIframeSrcIsEmpty()&&(d.src="javascript:''"),d.onload=function(){d.onreadystatechange=d.onload=null,c._onLoadIframe(d)},d.onreadystatechange=function(){/loaded|complete/.test(d.readyState)&&(d.onreadystatechange=d.onload=null,c._onLoadIframe(d))},d},_onLoadIframe:function(f){if(a.dom.contains(b.documentElement,f)){var g=this,h=f.contentWindow,i=f.contentWindow.document,j=b.characterSet||b.charset||"utf-8",k=this._getHtml({charset:j,stylesheets:this.config.stylesheets});if(i.open("text/html","replace"),i.write(k),i.close(),this.getWindow=function(){return f.contentWindow},this.getDocument=function(){return f.contentWindow.document},h.onerror=function(a,b,c){throw new Error("wysihtml5.Sandbox: "+a,b,c)},!a.browser.supportsSandboxedIframes()){var l,m;for(l=0,m=c.length;m>l;l++)this._unset(h,c[l]);for(l=0,m=d.length;m>l;l++)this._unset(h,d[l],a.EMPTY_FUNCTION);for(l=0,m=e.length;m>l;l++)this._unset(i,e[l]);this._unset(i,"cookie","",!0)}a.polyfills&&a.polyfills(h,i),this.loaded=!0,setTimeout(function(){g.callback(g)},0)}},_getHtml:function(b){var c,d=b.stylesheets,e="",f=0;if(d="string"==typeof d?[d]:d)for(c=d.length;c>f;f++)e+='';return b.stylesheets=e,a.lang.string('#{stylesheets}').interpolate(b)},_unset:function(b,c,d,e){try{b[c]=d}catch(f){}try{b.__defineGetter__(c,function(){return d})}catch(f){}if(e)try{b.__defineSetter__(c,function(){})}catch(f){}if(!a.browser.crashesWhenDefineProperty(c))try{var g={get:function(){return d}};e&&(g.set=function(){}),Object.defineProperty(b,c,g)}catch(f){}}})}(wysihtml5),function(a){var b=document;a.dom.ContentEditableArea=Base.extend({getContentEditable:function(){return this.element},getWindow:function(){return this.element.ownerDocument.defaultView||this.element.ownerDocument.parentWindow},getDocument:function(){return this.element.ownerDocument},constructor:function(b,c,d){this.callback=b||a.EMPTY_FUNCTION,this.config=a.lang.object({}).merge(c).get(),this.config.className||(this.config.className="wysihtml5-sandbox"),d?this.element=this._bindElement(d):this.element=this._createElement()},_createElement:function(){var a=b.createElement("div");return a.className=this.config.className,this._loadElement(a),a},_bindElement:function(a){return a.className=a.className?a.className+" wysihtml5-sandbox":"wysihtml5-sandbox",this._loadElement(a,!0),a},_loadElement:function(a,b){var c=this;if(!b){var d=this._getHtml();a.innerHTML=d}this.loaded=!0,setTimeout(function(){c.callback(c)},0)},_getHtml:function(a){return""}})}(wysihtml5),function(){var a={className:"class"};wysihtml5.dom.setAttributes=function(b){return{on:function(c){for(var d in b)c.setAttribute(a[d]||d,b[d])}}}}(),wysihtml5.dom.setStyles=function(a){return{on:function(b){var c=b.style;if("string"==typeof a)return void(c.cssText+=";"+a);for(var d in a)"float"===d?(c.cssFloat=a[d],c.styleFloat=a[d]):c[d]=a[d]}}},function(a){a.simulatePlaceholder=function(b,c,d,e){var f=e||"wysihtml5-placeholder",g=function(){var b=c.element.offsetWidth>0&&c.element.offsetHeight>0;c.hasPlaceholderSet()&&(c.clear(),c.element.focus(),b&&setTimeout(function(){var a=c.selection.getSelection();a.focusNode&&a.anchorNode||c.selection.selectNode(c.element.firstChild||c.element)},0)),c.placeholderSet=!1,a.removeClass(c.element,f)},h=function(){c.isEmpty()&&!c.placeholderSet&&(c.placeholderSet=!0,c.setValue(d),a.addClass(c.element,f))};b.on("set_placeholder",h).on("unset_placeholder",g).on("focus:composer",g).on("paste:composer",g).on("blur:composer",h),h()}}(wysihtml5.dom),function(a){var b=document.documentElement;"textContent"in b?(a.setTextContent=function(a,b){a.textContent=b},a.getTextContent=function(a){return a.textContent}):"innerText"in b?(a.setTextContent=function(a,b){a.innerText=b},a.getTextContent=function(a){return a.innerText}):(a.setTextContent=function(a,b){a.nodeValue=b},a.getTextContent=function(a){return a.nodeValue})}(wysihtml5.dom),wysihtml5.dom.getAttribute=function(a,b){var c=!wysihtml5.browser.supportsGetAttributeCorrectly();b=b.toLowerCase();var d=a.nodeName;if("IMG"==d&&"src"==b&&wysihtml5.dom.isLoadedImage(a)===!0)return a.src;if(c&&"outerHTML"in a){var e=a.outerHTML.toLowerCase(),f=-1!=e.indexOf(" "+b+"=");return f?a.getAttribute(b):null}return a.getAttribute(b)},wysihtml5.dom.getAttributes=function(a){var b,c=!wysihtml5.browser.supportsGetAttributeCorrectly(),d=a.nodeName,e=[];for(b in a.attributes)(a.attributes.hasOwnProperty&&a.attributes.hasOwnProperty(b)||!a.attributes.hasOwnProperty&&Object.prototype.hasOwnProperty.call(a.attributes,b))&&a.attributes[b].specified&&("IMG"==d&&"src"==a.attributes[b].name.toLowerCase()&&wysihtml5.dom.isLoadedImage(a)===!0?e.src=a.src:wysihtml5.lang.array(["rowspan","colspan"]).contains(a.attributes[b].name.toLowerCase())&&c?1!==a.attributes[b].value&&(e[a.attributes[b].name]=a.attributes[b].value):e[a.attributes[b].name]=a.attributes[b].value);return e},wysihtml5.dom.isLoadedImage=function(a){try{return a.complete&&!a.mozMatchesSelector(":-moz-broken")}catch(b){if(a.complete&&"complete"===a.readyState)return!0}},function(a){function b(a,b){for(var c,d=[],e=0,f=a.length;f>e;e++)if(c=a[e].querySelectorAll(b))for(var g=c.length;g--;d.unshift(c[g]));return d}function d(a){a.parentNode.removeChild(a)}function e(a,b){a.parentNode.insertBefore(b,a.nextSibling)}function f(a,b){for(var c=a.nextSibling;1!=c.nodeType;)if(c=c.nextSibling,!b||b==c.tagName.toLowerCase())return c;return null}var g=a.dom,h=function(a){this.el=a,this.isColspan=!1,this.isRowspan=!1,this.firstCol=!0,this.lastCol=!0,this.firstRow=!0,this.lastRow=!0,this.isReal=!0,this.spanCollection=[],this.modified=!1},i=function(a,b){a?(this.cell=a,this.table=g.getParentElement(a,{query:"table"})):b&&(this.table=b,this.cell=this.table.querySelectorAll("th, td")[0])};i.prototype={addSpannedCellToMap:function(a,b,c,d,e,f){for(var g=[],i=c+(f?parseInt(f,10)-1:0),j=d+(e?parseInt(e,10)-1:0),k=c;i>=k;k++){"undefined"==typeof b[k]&&(b[k]=[]);for(var l=d;j>=l;l++)b[k][l]=new h(a),b[k][l].isColspan=e&&parseInt(e,10)>1,b[k][l].isRowspan=f&&parseInt(f,10)>1,b[k][l].firstCol=l==d,b[k][l].lastCol=l==j,b[k][l].firstRow=k==c,b[k][l].lastRow=k==i,b[k][l].isReal=l==d&&k==c,b[k][l].spanCollection=g,g.push(b[k][l])}},setCellAsModified:function(a){if(a.modified=!0,a.spanCollection.length>0)for(var b=0,c=a.spanCollection.length;c>b;b++)a.spanCollection[b].modified=!0},setTableMap:function(){var a,b,c,d,e,f,i,j,k=[],l=this.getTableRows();for(a=0;a0?a.lang.array(f).without(e):f;
-return g},getTableRows:function(){var c=this.table.querySelectorAll("table"),d=c?b(c,"tr"):[],e=this.table.querySelectorAll("tr"),f=d.length>0?a.lang.array(e).without(d):e;return f},getMapIndex:function(a){for(var b=this.map.length,c=this.map&&this.map[0]?this.map[0].length:0,d=0;b>d;d++)for(var e=0;c>e;e++)if(this.map[d][e].el===a)return{row:d,col:e};return!1},getElementAtIndex:function(a){return this.setTableMap(),this.map[a.row]&&this.map[a.row][a.col]&&this.map[a.row][a.col].el?this.map[a.row][a.col].el:null},getMapElsTo:function(a){var b=[];if(this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(a),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var c=this.idx_start;this.idx_start=this.idx_end,this.idx_end=c}if(this.idx_start.col>this.idx_end.col){var d=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=d}if(null!=this.idx_start&&null!=this.idx_end)for(var e=this.idx_start.row,f=this.idx_end.row;f>=e;e++)for(var g=this.idx_start.col,h=this.idx_end.col;h>=g;g++)b.push(this.map[e][g].el);return b},orderSelectionEnds:function(a){if(this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(a),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var b=this.idx_start;this.idx_start=this.idx_end,this.idx_end=b}if(this.idx_start.col>this.idx_end.col){var c=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=c}return{start:this.map[this.idx_start.row][this.idx_start.col].el,end:this.map[this.idx_end.row][this.idx_end.col].el}},createCells:function(a,b,c){for(var d,e=this.table.ownerDocument,f=e.createDocumentFragment(),g=0;b>g;g++){if(d=e.createElement(a),c)for(var h in c)c.hasOwnProperty(h)&&d.setAttribute(h,c[h]);d.appendChild(document.createTextNode(" ")),f.appendChild(d)}return f},correctColIndexForUnreals:function(a,b){for(var c=this.map[b],d=-1,e=0;a>e;e++)c[e].isReal&&d++;return d},getLastNewCellOnRow:function(a,b){for(var c,d,e=this.getRowCells(a),f=0,g=e.length;g>f;f++)if(c=e[f],d=this.getMapIndex(c),d===!1||"undefined"!=typeof b&&d.row!=b)return c;return null},removeEmptyTable:function(){var a=this.table.querySelectorAll("td, th");return a&&0!=a.length?!1:(d(this.table),!0)},splitRowToCells:function(a){if(a.isColspan){var b=parseInt(g.getAttribute(a.el,"colspan")||1,10),c=a.el.tagName.toLowerCase();if(b>1){var d=this.createCells(c,b-1);e(a.el,d)}a.el.removeAttribute("colspan")}},getRealRowEl:function(a,b){var c=null,d=null;b=b||this.idx;for(var e=0,f=this.map[b.row].length;f>e;e++)if(d=this.map[b.row][e],d.isReal&&(c=g.getParentElement(d.el,{query:"tr"})))return c;return null===c&&a&&(c=g.getParentElement(this.map[b.row][b.col].el,{query:"tr"})||null),c},injectRowAt:function(a,b,c,d,f){var h=this.getRealRowEl(!1,{row:a,col:b}),i=this.createCells(d,c);if(h){var j=this.correctColIndexForUnreals(b,a);j>=0?e(this.getRowCells(h)[j],i):h.insertBefore(i,h.firstChild)}else{var k=this.table.ownerDocument.createElement("tr");k.appendChild(i),e(g.getParentElement(f.el,{query:"tr"}),k)}},canMerge:function(a){if(this.to=a,this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(this.to),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var b=this.idx_start;this.idx_start=this.idx_end,this.idx_end=b}if(this.idx_start.col>this.idx_end.col){var c=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=c}for(var d=this.idx_start.row,e=this.idx_end.row;e>=d;d++)for(var f=this.idx_start.col,g=this.idx_end.col;g>=f;f++)if(this.map[d][f].isColspan||this.map[d][f].isRowspan)return!1;return!0},decreaseCellSpan:function(a,b){var c=parseInt(g.getAttribute(a.el,b),10)-1;c>=1?a.el.setAttribute(b,c):(a.el.removeAttribute(b),"colspan"==b&&(a.isColspan=!1),"rowspan"==b&&(a.isRowspan=!1),a.firstCol=!0,a.lastCol=!0,a.firstRow=!0,a.lastRow=!0,a.isReal=!0)},removeSurplusLines:function(){var a,b,c,e,f,h,i;if(this.setTableMap(),this.map){for(c=0,e=this.map.length;e>c;c++){for(a=this.map[c],i=!0,f=0,h=a.length;h>f;f++)if(b=a[f],!(g.getAttribute(b.el,"rowspan")&&parseInt(g.getAttribute(b.el,"rowspan"),10)>1&&b.firstRow!==!0)){i=!1;break}if(i)for(f=0;h>f;f++)this.decreaseCellSpan(a[f],"rowspan")}var j=this.getTableRows();for(c=0,e=j.length;e>c;c++)a=j[c],0==a.childNodes.length&&/^\s*$/.test(a.textContent||a.innerText)&&d(a)}},fillMissingCells:function(){var a=0,b=0,c=null;if(this.setTableMap(),this.map){a=this.map.length;for(var d=0;a>d;d++)this.map[d].length>b&&(b=this.map[d].length);for(var f=0;a>f;f++)for(var g=0;b>g;g++)this.map[f]&&!this.map[f][g]&&g>0&&(this.map[f][g]=new h(this.createCells("td",1)),c=this.map[f][g-1],c&&c.el&&c.el.parent&&e(this.map[f][g-1].el,this.map[f][g].el))}},rectify:function(){return this.removeEmptyTable()?!1:(this.removeSurplusLines(),this.fillMissingCells(),!0)},unmerge:function(){if(this.rectify()&&(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx)){var a=this.map[this.idx.row][this.idx.col],b=g.getAttribute(a.el,"colspan")?parseInt(g.getAttribute(a.el,"colspan"),10):1,c=a.el.tagName.toLowerCase();if(a.isRowspan){var d=parseInt(g.getAttribute(a.el,"rowspan"),10);if(d>1)for(var e=1,f=d-1;f>=e;e++)this.injectRowAt(this.idx.row+e,this.idx.col,b,c,a);a.el.removeAttribute("rowspan")}this.splitRowToCells(a)}},merge:function(a){if(this.rectify())if(this.canMerge(a)){for(var b=this.idx_end.row-this.idx_start.row+1,c=this.idx_end.col-this.idx_start.col+1,e=this.idx_start.row,f=this.idx_end.row;f>=e;e++)for(var g=this.idx_start.col,h=this.idx_end.col;h>=g;g++)e==this.idx_start.row&&g==this.idx_start.col?(b>1&&this.map[e][g].el.setAttribute("rowspan",b),c>1&&this.map[e][g].el.setAttribute("colspan",c)):(/^\s*
\s*$/.test(this.map[e][g].el.innerHTML.toLowerCase())||(this.map[this.idx_start.row][this.idx_start.col].el.innerHTML+=" "+this.map[e][g].el.innerHTML),d(this.map[e][g].el));this.rectify()}else window.console&&console.log("Do not know how to merge allready merged cells.")},collapseCellToNextRow:function(a){var b=this.getMapIndex(a.el),c=b.row+1,d={row:c,col:b.col};if(c=0)e(this.getRowCells(f)[h],a.el);else{var i=this.getLastNewCellOnRow(f,c);null!==i?e(i,a.el):f.insertBefore(a.el,f.firstChild)}parseInt(g.getAttribute(a.el,"rowspan"),10)>2?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)-1):a.el.removeAttribute("rowspan")}}},removeRowCell:function(a){a.isReal?a.isRowspan?this.collapseCellToNextRow(a):d(a.el):parseInt(g.getAttribute(a.el,"rowspan"),10)>2?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)-1):a.el.removeAttribute("rowspan")},getRowElementsByCell:function(){var a=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=this.map[this.idx.row],c=0,d=b.length;d>c;c++)b[c].isReal&&a.push(b[c].el);return a},getColumnElementsByCell:function(){var a=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=0,c=this.map.length;c>b;b++)this.map[b][this.idx.col]&&this.map[b][this.idx.col].isReal&&a.push(this.map[b][this.idx.col].el);return a},removeRow:function(){var a=g.getParentElement(this.cell,{query:"tr"});if(a){if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=this.map[this.idx.row],c=0,e=b.length;e>c;c++)b[c].modified||(this.setCellAsModified(b[c]),this.removeRowCell(b[c]));d(a)}},removeColCell:function(a){a.isColspan?parseInt(g.getAttribute(a.el,"colspan"),10)>2?a.el.setAttribute("colspan",parseInt(g.getAttribute(a.el,"colspan"),10)-1):a.el.removeAttribute("colspan"):a.isReal&&d(a.el)},removeColumn:function(){if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var a=0,b=this.map.length;b>a;a++)this.map[a][this.idx.col].modified||(this.setCellAsModified(this.map[a][this.idx.col]),this.removeColCell(this.map[a][this.idx.col]))},remove:function(a){if(this.rectify()){switch(a){case"row":this.removeRow();break;case"column":this.removeColumn()}this.rectify()}},addRow:function(a){var b=this.table.ownerDocument;if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),"below"==a&&g.getAttribute(this.cell,"rowspan")&&(this.idx.row=this.idx.row+parseInt(g.getAttribute(this.cell,"rowspan"),10)-1),this.idx!==!1){for(var c=this.map[this.idx.row],d=b.createElement("tr"),f=0,h=c.length;h>f;f++)c[f].modified||(this.setCellAsModified(c[f]),this.addRowCell(c[f],d,a));switch(a){case"below":e(this.getRealRowEl(!0),d);break;case"above":var i=g.getParentElement(this.map[this.idx.row][this.idx.col].el,{query:"tr"});i&&i.parentNode.insertBefore(d,i)}}},addRowCell:function(a,b,d){var e=a.isColspan?{colspan:g.getAttribute(a.el,"colspan")}:null;a.isReal?"above"!=d&&a.isRowspan?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)+1):b.appendChild(this.createCells("td",1,e)):"above"!=d&&a.isRowspan&&a.lastRow?b.appendChild(this.createCells("td",1,e)):c.isRowspan&&a.el.attr("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)+1)},add:function(a){this.rectify()&&(("below"==a||"above"==a)&&this.addRow(a),("before"==a||"after"==a)&&this.addColumn(a))},addColCell:function(a,b,d){var f,h=a.el.tagName.toLowerCase();switch(d){case"before":f=!a.isColspan||a.firstCol;break;case"after":f=!a.isColspan||a.lastCol||a.isColspan&&c.el==this.cell}if(f){switch(d){case"before":a.el.parentNode.insertBefore(this.createCells(h,1),a.el);break;case"after":e(a.el,this.createCells(h,1))}a.isRowspan&&this.handleCellAddWithRowspan(a,b+1,d)}else a.el.setAttribute("colspan",parseInt(g.getAttribute(a.el,"colspan"),10)+1)},addColumn:function(a){var b,c;if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),"after"==a&&g.getAttribute(this.cell,"colspan")&&(this.idx.col=this.idx.col+parseInt(g.getAttribute(this.cell,"colspan"),10)-1),this.idx!==!1)for(var d=0,e=this.map.length;e>d;d++)b=this.map[d],b[this.idx.col]&&(c=b[this.idx.col],c.modified||(this.setCellAsModified(c),this.addColCell(c,d,a)))},handleCellAddWithRowspan:function(a,b,c){for(var d,h,i,j=parseInt(g.getAttribute(this.cell,"rowspan"),10)-1,k=g.getParentElement(a.el,{query:"tr"}),l=a.el.tagName.toLowerCase(),m=this.table.ownerDocument,n=0;j>n;n++)if(d=this.correctColIndexForUnreals(this.idx.col,b+n),k=f(k,"tr"))if(d>0)switch(c){case"before":h=this.getRowCells(k),d>0&&this.map[b+n][this.idx.col].el!=h[d]&&d==h.length-1?e(h[d],this.createCells(l,1)):h[d].parentNode.insertBefore(this.createCells(l,1),h[d]);break;case"after":e(this.getRowCells(k)[d],this.createCells(l,1))}else k.insertBefore(this.createCells(l,1),k.firstChild);else i=m.createElement("tr"),i.appendChild(this.createCells(l,1)),this.table.appendChild(i)}},g.table={getCellsBetween:function(a,b){var c=new i(a);return c.getMapElsTo(b)},addCells:function(a,b){var c=new i(a);c.add(b)},removeCells:function(a,b){var c=new i(a);c.remove(b)},mergeCellsBetween:function(a,b){var c=new i(a);c.merge(b)},unmergeCell:function(a){var b=new i(a);b.unmerge()},orderSelectionEnds:function(a,b){var c=new i(a);return c.orderSelectionEnds(b)},indexOf:function(a){var b=new i(a);return b.setTableMap(),b.getMapIndex(a)},findCell:function(a,b){var c=new i(null,a);return c.getElementAtIndex(b)},findRowByCell:function(a){var b=new i(a);return b.getRowElementsByCell()},findColumnByCell:function(a){var b=new i(a);return b.getColumnElementsByCell()},canMerge:function(a,b){var c=new i(a);return c.canMerge(b)}}}(wysihtml5),wysihtml5.dom.query=function(a,b){var c,d=[];a.nodeType&&(a=[a]);for(var e=0,f=a.length;f>e;e++)if(c=a[e].querySelectorAll(b))for(var g=c.length;g--;d.unshift(c[g]));return d},wysihtml5.dom.compareDocumentPosition=function(){var a=document.documentElement;return a.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)}:function(a,b){var c,d;if(c=9===a.nodeType?a:a.ownerDocument,d=9===b.nodeType?b:b.ownerDocument,a===b)return 0;if(a===b.ownerDocument)return 20;if(a.ownerDocument===b)return 10;if(c!==d)return 1;if(2===a.nodeType&&a.childNodes&&-1!==wysihtml5.lang.array(a.childNodes).indexOf(b))return 20;if(2===b.nodeType&&b.childNodes&&-1!==wysihtml5.lang.array(b.childNodes).indexOf(a))return 10;for(var e=a,f=[],g=null;e;){if(e==b)return 10;f.push(e),e=e.parentNode}for(e=b,g=null;e;){if(e==a)return 20;var h=wysihtml5.lang.array(f).indexOf(e);if(-1!==h){var i=f[h],j=wysihtml5.lang.array(i.childNodes).indexOf(f[h-1]),k=wysihtml5.lang.array(i.childNodes).indexOf(g);return j>k?2:4}g=e,e=e.parentNode}return 1}}(),wysihtml5.dom.unwrap=function(a){var b=[];if(a.parentNode){for(;a.lastChild;)b.unshift(a.lastChild),wysihtml5.dom.insert(a.lastChild).after(a);a.parentNode.removeChild(a)}return b},wysihtml5.dom.getPastedHtml=function(a){var b;return a.clipboardData&&(wysihtml5.lang.array(a.clipboardData.types).contains("text/html")?b=a.clipboardData.getData("text/html"):wysihtml5.lang.array(a.clipboardData.types).contains("text/plain")&&(b=wysihtml5.lang.string(a.clipboardData.getData("text/plain")).escapeHTML(!0,!0))),b},wysihtml5.dom.getPastedHtmlWithDiv=function(a,b){var c=a.selection.getBookmark(),d=a.element.ownerDocument,e=d.createElement("DIV"),f=a.getScrollPos();d.body.appendChild(e),e.style.width="1px",e.style.height="1px",e.style.overflow="hidden",e.style.position="absolute",e.style.top=f.y+"px",e.style.left=f.x+"px",e.setAttribute("contenteditable","true"),e.focus(),setTimeout(function(){var d;a.selection.setBookmark(c),d=e.innerHTML,d&&/^
$/i.test(d.trim())&&(d=!1),b(d),e.parentNode.removeChild(e)},0)},wysihtml5.dom.removeInvisibleSpaces=function(a){for(var b=wysihtml5.dom.getTextNodes(a),c=b.length;c--;)b[c].nodeValue=b[c].nodeValue.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")},wysihtml5.quirks.cleanPastedHTML=function(){var a=function(a){var b=wysihtml5.lang.string(a).trim(),c=b.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");return new RegExp("^((?!^"+c+"$).)*$","i")},b=function(b,c){var d,e,f=wysihtml5.lang.object(b).clone(!0);for(d in f.tags)if(f.tags.hasOwnProperty(d)&&f.tags[d].keep_styles)for(e in f.tags[d].keep_styles)f.tags[d].keep_styles.hasOwnProperty(e)&&c[e]&&(f.tags[d].keep_styles[e]=a(c[e]));return f},c=function(a,b){var c;if(!a)return null;for(var d=0,e=a.length;e>d;d++)if(a[d].condition||(c=a[d].set),a[d].condition&&a[d].condition.test(b))return a[d].set;return c};return function(a,d){var e,f={color:wysihtml5.dom.getStyle("color").from(d.referenceNode),fontSize:wysihtml5.dom.getStyle("font-size").from(d.referenceNode)},g=b(c(d.rules,a)||{},f);return e=wysihtml5.dom.parse(a,{rules:g,cleanUp:!0,context:d.referenceNode.ownerDocument,uneditableClass:d.uneditableClass,clearInternals:!0,unjoinNbsps:!0})}}(),wysihtml5.quirks.ensureProperClearing=function(){var a=function(){var a=this;setTimeout(function(){var b=a.innerHTML.toLowerCase();("
"==b||"
"==b)&&(a.innerHTML="")},0)};return function(b){wysihtml5.dom.observe(b.element,["cut","keydown"],a)}}(),function(a){var b="%7E";a.quirks.getCorrectInnerHTML=function(c){var d=c.innerHTML;if(-1===d.indexOf(b))return d;var e,f,g,h,i=c.querySelectorAll("[href*='~'], [src*='~']");for(h=0,g=i.length;g>h;h++)e=i[h].href||i[h].src,f=a.lang.string(e).replace("~").by(b),d=a.lang.string(d).replace(f).by(e);return d}}(wysihtml5),function(a){var b="wysihtml5-quirks-redraw";a.quirks.redraw=function(c){a.dom.addClass(c,b),a.dom.removeClass(c,b);try{var d=c.ownerDocument;d.execCommand("italic",!1,null),d.execCommand("italic",!1,null)}catch(e){}}}(wysihtml5),wysihtml5.quirks.tableCellsSelection=function(a,b){function c(){return a.addEventListener("mousedown",n),l}function d(c){l.start=c,l.end=c,l.cells=[c],l.table=k.getParentElement(l.start,{query:"table"},!1,a),l.table&&(e(),k.addClass(c,m),a.addEventListener("mousemove",g),a.addEventListener("mouseup",h),b.fire("tableselectstart").fire("tableselectstart:composer"))}function e(){if(a){var b=a.querySelectorAll("."+m);if(b.length>0)for(var c=0;c1&&b.composer.selection.deselect(),f(l.cells),l.end!==d&&b.fire("tableselectchange").fire("tableselectchange:composer")))}function h(c){a.removeEventListener("mousemove",g),a.removeEventListener("mouseup",h),b.fire("tableselect").fire("tableselect:composer"),setTimeout(function(){i()},0)}function i(){a.ownerDocument.addEventListener("click",o)}function j(c,d){l.start=c,l.end=d,l.table=k.getParentElement(l.start,{query:"table"},!1,a),selectedCells=k.table.getCellsBetween(l.start,l.end),f(selectedCells),i(),b.fire("tableselect").fire("tableselect:composer")}var k=wysihtml5.dom,l={table:null,start:null,end:null,cells:null,select:j},m="wysiwyg-tmp-selected-cell",n=function(b){var c=wysihtml5.dom.getParentElement(b.target,{query:"td, th"},!1,a);c&&d(c)},o=function(c){a.ownerDocument.removeEventListener("click",o),k.getParentElement(c.target,{query:"table"},!1,a)!=l.table&&(e(),l.table=null,l.start=null,l.end=null,b.fire("tableunselect").fire("tableunselect:composer"))};return c()},function(a){function b(a){var b,c;for(b in d)if(d.hasOwnProperty(b)&&(c=d[b],c.regex.test(a)))return c}function c(a){var c=b(a);return c?c.name:void 0}var d={rgba:{regex:/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([\d\.]+)\s*\)/i,name:"rgba"},rgb:{regex:/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/i,name:"rgb"},hex6:{regex:/^#([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])/i,name:"hex",radix:16},hex3:{regex:/^#([0-9a-f])([0-9a-f])([0-9a-f])/i,name:"hex",radix:16}},e=function(a){return new RegExp("(^|\\s|;)"+a+"\\s*:\\s*[^;$]+","gi")};a.quirks.styleParser={getColorParseMethod:b,getColorFormat:c,parseColor:function(c,f){var g,h,i,j,k,l=c;if(f){if(g=e(f),!(h=c.match(g)))return!1;h=h.pop().split(":")[1],l=a.lang.string(h).trim()}return(i=b(l))&&(j=l.match(i.regex))?(k=i.radix||10,i===d.hex3?(j.shift(),j.push(1),a.lang.array(j).map(function(a,b){return 3>b?parseInt(a,k)*k+parseInt(a,k):parseFloat(a)})):(j.shift(),j[3]||j.push(1),a.lang.array(j).map(function(a,b){return 3>b?parseInt(a,k):parseFloat(a)}))):!1},unparseColor:function(a,b){var c=16;return"hex"===b?(a[0].toString(c)+a[1].toString(c)+a[2].toString(c)).toUpperCase():"hash"===b?"#"+(a[0].toString(c)+a[1].toString(c)+a[2].toString(c)).toUpperCase():"rgb"===b?"rgb("+a[0]+","+a[1]+","+a[2]+")":"rgba"===b?"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")":"csv"===b?a[0]+","+a[1]+","+a[2]+","+a[3]:a[3]&&1!==a[3]?"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")":"rgb("+a[0]+","+a[1]+","+a[2]+")"},parseFontSize:function(b){var c=b.match(e("font-size"));return c?a.lang.string(c[c.length-1].split(":")[1]).trim():!1}}}(wysihtml5),function(a){function b(a){var b=0;if(a.parentNode)do b+=a.offsetTop||0,a=a.offsetParent;while(a);return b}function c(a,b){for(var c=0;b!==a;)if(c++,b=b.parentNode,!b)throw new Error("not a descendant of ancestor!");return c}function d(b){var c=document.createElement("span"),d=function(a){b.removeEventListener("mouseup",d),b.removeEventListener("keydown",d),b.removeEventListener("touchstart",d),b.removeEventListener("focus",d),b.removeEventListener("blur",d),b.removeEventListener("paste",e),b.removeEventListener("drop",e),b.removeEventListener("beforepaste",e),c&&c.parentNode&&c.parentNode.removeChild(c)},e=function(a){c&&c.parentNode&&setTimeout(d,0)};return c.appendChild(document.createTextNode(a.INVISIBLE_SPACE)),c.className="_wysihtml5-temp-caret-fix",c.style.display="block",c.style.minWidth="1px",c.style.height="0px",b.addEventListener("mouseup",d),b.addEventListener("keydown",d),b.addEventListener("touchstart",d),b.addEventListener("focus",d),b.addEventListener("blur",d),b.addEventListener("paste",e),b.addEventListener("drop",e),b.addEventListener("beforepaste",e),c}function e(a){if(!a.canSurroundContents())for(var b=a.commonAncestorContainer,d=c(b,a.startContainer),e=c(b,a.endContainer);!a.canSurroundContents();)d>e?(a.setStartBefore(a.startContainer),d=c(b,a.startContainer)):(a.setEndAfter(a.endContainer),e=c(b,a.endContainer))}var f=a.dom;a.Selection=Base.extend({constructor:function(a,b,c){window.rangy.init(),this.editor=a,this.composer=a.composer,this.doc=this.composer.doc,this.win=this.composer.win,this.contain=b,this.unselectableClass=c||!1},getBookmark:function(){var a=this.getRange();return a&&a.cloneRange()},setBookmark:function(a){a&&this.setSelection(a)},setBefore:function(a){var b=rangy.createRange(this.doc);return b.setStartBefore(a),b.setEndBefore(a),this.setSelection(b)},createTemporaryCaretSpaceAfter:function(b){var c=this.doc.createElement("span"),d=this.doc.createTextNode(a.INVISIBLE_SPACE),e=function(b){var d;this.contain.removeEventListener("mouseup",e),this.contain.removeEventListener("keydown",g),this.contain.removeEventListener("touchstart",e),this.contain.removeEventListener("focus",e),this.contain.removeEventListener("blur",e),this.contain.removeEventListener("paste",f),this.contain.removeEventListener("drop",f),this.contain.removeEventListener("beforepaste",f),c&&c.parentNode&&(c.innerHTML=c.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),/[^\s]+/.test(c.innerHTML)?(d=c.lastChild,a.dom.unwrap(c),this.setAfter(d)):c.parentNode.removeChild(c))}.bind(this),f=function(a){c&&c.parentNode&&setTimeout(e,0)},g=function(a){8===a.which||91===a.which||17===a.which||86===a.which&&(a.ctrlKey||a.metaKey)||e()};return c.className="_wysihtml5-temp-caret-fix",c.style.position="absolute",c.style.display="block",c.style.minWidth="1px",c.style.zIndex="99999",c.appendChild(d),b.parentNode.insertBefore(c,b.nextSibling),this.setBefore(d),this.contain.addEventListener("mouseup",e),this.contain.addEventListener("keydown",g),this.contain.addEventListener("touchstart",e),this.contain.addEventListener("focus",e),this.contain.addEventListener("blur",e),this.contain.addEventListener("paste",f),this.contain.addEventListener("drop",f),this.contain.addEventListener("beforepaste",f),c},setAfter:function(b,c,d){var e,f=this.win,g=rangy.createRange(this.doc),h=function(){var d=b.parentNode,g=d?d.childNodes[d.childNodes.length-1]:null;if(!e||g===b&&1===b.nodeType&&"block"===f.getComputedStyle(b).display)if(c){var h=this.doc.createTextNode(a.INVISIBLE_SPACE);b.parentNode.insertBefore(h,b.nextSibling),this.selectNode(h),setTimeout(function(){h&&h.parentNode&&h.parentNode.removeChild(h)},0)}else this.createTemporaryCaretSpaceAfter(b)}.bind(this);if(g.setStartAfter(b),g.setEndAfter(b),document.activeElement&&document.activeElement===this.composer.element)e=this.setSelection(g),h(),d&&d(e);else{var i=this.composer.getScrollPos();this.composer.element.focus(),this.composer.setScrollPos(i),setTimeout(function(){e=this.setSelection(g),h(),d&&d(e)}.bind(this),0)}},selectNode:function(b,c){var d=rangy.createRange(this.doc),e=b.nodeType===a.ELEMENT_NODE,g="canHaveHTML"in b?b.canHaveHTML:"IMG"!==b.nodeName,h=e?b.innerHTML:b.data,i=""===h||h===a.INVISIBLE_SPACE,j=f.getStyle("display").from(b),k="block"===j||"list-item"===j;if(i&&e&&g&&!c)try{b.innerHTML=a.INVISIBLE_SPACE}catch(l){}g?d.selectNodeContents(b):d.selectNode(b),g&&i&&e?d.collapse(k):g&&i&&(d.setStartAfter(b),d.setEndAfter(b)),this.setSelection(d)},getSelectedNode:function(a){var b,c;return a&&this.doc.selection&&"Control"===this.doc.selection.type&&(c=this.doc.selection.createRange(),c&&c.length)?c.item(0):(b=this.getSelection(this.doc),b.focusNode===b.anchorNode?b.focusNode:(c=this.getRange(this.doc),c?c.commonAncestorContainer:this.doc.body))},fixSelBorders:function(){var a=this.getRange();e(a),this.setSelection(a)},getSelectedOwnNodes:function(a){for(var b=this.getOwnRanges(),c=[],d=0,e=b.length;e>d;d++)c.push(b[d].commonAncestorContainer||this.doc.body);return c},findNodesInSelection:function(b){for(var c,d=this.getOwnRanges(),e=[],f=0,g=d.length;g>f;f++)c=d[f].getNodes([1],function(c){return a.lang.array(b).contains(c.nodeName)}),e=e.concat(c);return e},filterElements:function(a){for(var b,c=this.getOwnRanges(),d=[],e=0,f=c.length;f>e;e++)b=c[e].getNodes([1],function(b){return a(b,c[e])}),d=d.concat(b);return d},containsUneditable:function(){for(var a=this.getOwnUneditables(),b=this.getSelection(),c=0,d=a.length;d>c;c++)if(b.containsNode(a[c]))return!0;return!1},deleteContents:function(){var b,c,d,e,f=this.getRange();if(this.unselectableClass){(b=a.dom.getParentElement(f.startContainer,{query:"."+this.unselectableClass},!1,this.contain))&&f.setStartBefore(b),(c=a.dom.getParentElement(f.endContainer,{query:"."+this.unselectableClass},!1,this.contain))&&f.setEndAfter(c),d=f.getNodes([1],function(b){return a.dom.hasClass(b,this.unselectableClass)}.bind(this));for(var g=d.length;g--;)try{e=new CustomEvent("wysihtml5:uneditable:delete"),d[g].dispatchEvent(e)}catch(h){}}f.deleteContents(),this.setSelection(f)},getPreviousNode:function(b,c){var d;if(!b){var e=this.getSelection();b=e.anchorNode}if(b===this.contain)return!1;var f,g=b.previousSibling;return g===this.contain?!1:(g&&3!==g.nodeType&&1!==g.nodeType?g=this.getPreviousNode(g,c):g&&3===g.nodeType&&/^\s*$/.test(g.textContent)?g=this.getPreviousNode(g,c):c&&g&&1===g.nodeType?(d=a.dom.getStyle("display").from(g),a.lang.array(["BR","HR","IMG"]).contains(g.nodeName)||a.lang.array(["block","inline-block","flex","list-item","table"]).contains(d)||!/^[\s]*$/.test(g.innerHTML)||(g=this.getPreviousNode(g,c))):g||b===this.contain||(f=b.parentNode,f!==this.contain&&(g=this.getPreviousNode(f,c))),g!==this.contain?g:!1)},getSelectionParentsByTag:function(b){for(var c,d=this.getSelectedOwnNodes(),e=[],f=0,g=d.length;g>f;f++)c=d[f].nodeName&&"LI"===d[f].nodeName?d[f]:a.dom.getParentElement(d[f],{query:"li"},!1,this.contain),c&&e.push(c);return e.length?e:null},getRangeToNodeEnd:function(){if(this.isCollapsed()){var a=this.getRange(),b=a.startContainer,c=a.startOffset,d=rangy.createRange(this.doc);return d.selectNodeContents(b),d.setStart(b,c),d}},caretIsLastInSelection:function(){var a=(rangy.createRange(this.doc),this.getSelection(),this.getRangeToNodeEnd().cloneContents()),b=a.textContent;return/^\s*$/.test(b)},caretIsFirstInSelection:function(){var b=rangy.createRange(this.doc),c=this.getSelection(),d=this.getRange(),e=d.startContainer;return e?e.nodeType===a.TEXT_NODE?this.isCollapsed()&&e.nodeType===a.TEXT_NODE&&/^\s*$/.test(e.data.substr(0,d.startOffset)):(b.selectNodeContents(this.getRange().commonAncestorContainer),b.collapse(!0),this.isCollapsed()&&(b.startContainer===c.anchorNode||b.endContainer===c.anchorNode)&&b.startOffset===c.anchorOffset):void 0},caretIsInTheBeginnig:function(b){var c=this.getSelection(),d=c.anchorNode,e=c.anchorOffset;return b&&d?0===e&&(d.nodeName&&d.nodeName===b.toUpperCase()||a.dom.getParentElement(d.parentNode,{query:b},1)):d?0===e&&!this.getPreviousNode(d,!0):void 0},getBeforeSelection:function(b){var c,d,e=this.getSelection(),f=e.isBackwards()?e.focusNode:e.anchorNode,g=e.isBackwards()?e.focusOffset:e.anchorOffset,h=this.createRange();if(d=a.dom.getParentElement(f,{query:"._wysihtml5-temp-caret-fix"},1),d&&(f=d.parentNode,g=Array.prototype.indexOf.call(f.childNodes,d)),f){if(g>0)return 3===f.nodeType?(h.setStart(f,0),h.setEnd(f,g),{type:"text",range:h,offset:g,node:f}):(h.setStartBefore(f.childNodes[0]),c=f.childNodes[g-1],h.setEndAfter(c),{type:"element",range:h,offset:g,node:c});if(h.setStartAndEnd(f,0),b){var i=this.getPreviousNode(f,!0),j=null;if(i&&(j=1===i.nodeType&&a.dom.hasClass(i,this.unselectableClass)?i:a.dom.domNode(i).lastLeafNode()),j)return{type:"leafnode",range:h,offset:g,node:j}}return{type:"none",range:h,offset:g,node:f}}return null},executeAndRestoreRangy:function(a,b){var c=rangy.saveSelection(this.win);if(c)try{a()}catch(d){setTimeout(function(){throw d},0)}else a();rangy.restoreSelection(c)},executeAndRestore:function(b,c){var d,e,g,h,i,j,k,l,m=this.doc.body,n=c&&m.scrollTop,o=c&&m.scrollLeft,p="_wysihtml5-temp-placeholder",q=''+a.INVISIBLE_SPACE+"",r=this.getRange(!0);if(!r)return void b(m,m);r.collapsed||(k=r.cloneRange(),j=k.createContextualFragment(q),k.collapse(!1),k.insertNode(j),k.detach()),i=r.createContextualFragment(q),r.insertNode(i),j&&(d=this.contain.querySelectorAll("."+p),r.setStartBefore(d[0]),r.setEndAfter(d[d.length-1])),this.setSelection(r);try{b(r.startContainer,r.endContainer)}catch(s){setTimeout(function(){throw s},0)}if(d=this.contain.querySelectorAll("."+p),d&&d.length){l=rangy.createRange(this.doc),g=d[0].nextSibling,d.length>1&&(h=d[d.length-1].previousSibling),h&&g?(l.setStartBefore(g),l.setEndAfter(h)):(e=this.doc.createTextNode(a.INVISIBLE_SPACE),f.insert(e).after(d[0]),l.setStartBefore(e),l.setEndAfter(e)),this.setSelection(l);for(var t=d.length;t--;)d[t].parentNode.removeChild(d[t])}else this.contain.focus();c&&(m.scrollTop=n,m.scrollLeft=o);try{d.parentNode.removeChild(d)}catch(u){}},set:function(a,b){var c=rangy.createRange(this.doc);c.setStart(a,b||0),this.setSelection(c)},insertHTML:function(a){var b,c=(rangy.createRange(this.doc),this.doc.createElement("DIV")),d=this.doc.createDocumentFragment();for(c.innerHTML=a,b=c.lastChild;c.firstChild;)d.appendChild(c.firstChild);this.insertNode(d),b&&this.setAfter(b)},insertNode:function(a){var b=this.getRange();b&&b.insertNode(a)},canAppendChild:function(a){var b,c,d=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],e=this.getRange();return b=a||e.startContainer,b&&(c=(b.tagName||b.nodeName).toLowerCase()),-1===d.indexOf(c)},splitElementAtCaret:function(b,c){var d,e,f,g,h,i=this.getSelection();if(i.rangeCount>0){d=i.getRangeAt(0).cloneRange(),d.setEndAfter(b),e=d.extractContents(),h=e.childNodes;for(var j=h.length;j--;)a.dom.domNode(h[j]).is.visible()||e.removeChild(h[j]);b.parentNode.insertBefore(e,b.nextSibling),c?(f=c.firstChild||c,g=c.lastChild||c,b.parentNode.insertBefore(c,b.nextSibling),f&&g&&(d.setStartBefore(f),d.setEndAfter(g),this.setSelection(d))):(d.setStartAfter(b),d.setEndAfter(b)),a.dom.domNode(b).is.visible()||(""===a.dom.getTextContent(b)?b.parentNode.removeChild(b):b.parentNode.replaceChild(this.doc.createTextNode(" "),b))}},surround:function(a){var b,c=this.getOwnRanges(),d=[];if(0==c.length)return d;for(var e=c.length;e--;){b=this.doc.createElement(a.nodeName),d.push(b),a.className&&(b.className=a.className),a.cssStyle&&b.setAttribute("style",a.cssStyle);try{c[e].surroundContents(b),this.selectNode(b)}catch(f){b.appendChild(c[e].extractContents()),c[e].insertNode(b)}}return d},deblockAndSurround:function(b){var c,d,e,f=this.doc.createElement("div"),g=rangy.createRange(this.doc);if(f.className=b.className,this.composer.commands.exec("formatBlock",b),c=this.contain.querySelectorAll("."+b.className),c[0])for(c[0].parentNode.insertBefore(f,c[0]),g.setStartBefore(c[0]),g.setEndAfter(c[c.length-1]),d=g.extractContents();d.firstChild;)if(e=d.firstChild,1==e.nodeType&&a.dom.hasClass(e,b.className)){for(;e.firstChild;)f.appendChild(e.firstChild);"BR"!==e.nodeName&&f.appendChild(this.doc.createElement("br")),d.removeChild(e)}else f.appendChild(e);else f=null;return f},scrollIntoView:function(){var c,d=this.doc,e=5,f=d.documentElement.scrollHeight>d.documentElement.offsetHeight,g=d._wysihtml5ScrollIntoViewElement=d._wysihtml5ScrollIntoViewElement||function(){var b=d.createElement("span");return b.innerHTML=a.INVISIBLE_SPACE,b}();f&&(this.insertNode(g),c=b(g),g.parentNode.removeChild(g),c>=d.body.scrollTop+d.documentElement.offsetHeight-e&&(d.body.scrollTop=c))},selectLine:function(){a.browser.supportsSelectionModify()?this._selectLine_W3C():this.doc.selection&&this._selectLine_MSIE()},_selectLine_W3C:function(){var a=this.win.getSelection();a.modify("move","left","lineboundary"),
-a.modify("extend","right","lineboundary")},toLineBoundary:function(b,c){if(c="undefined"==typeof c?!1:c,a.browser.supportsSelectionModify()){var d=this.win.getSelection();d.modify("extend",b,"lineboundary"),c&&("left"===b?d.collapseToStart():"right"===b&&d.collapseToEnd())}},_selectLine_MSIE:function(){var a,b,c,d,e,f=this.doc.selection.createRange(),g=f.boundingTop,h=this.doc.body.scrollWidth;if(f.moveToPoint){for(0===g&&(c=this.doc.createElement("span"),this.insertNode(c),g=c.offsetTop,c.parentNode.removeChild(c)),g+=1,d=-10;h>d;d+=2)try{f.moveToPoint(d,g);break}catch(i){}for(a=g,b=this.doc.selection.createRange(),e=h;e>=0;e--)try{b.moveToPoint(e,a);break}catch(j){}f.setEndPoint("EndToEnd",b),f.select()}},getText:function(){var a=this.getSelection();return a?a.toString():""},getNodes:function(a,b){var c=this.getRange();return c?c.getNodes(Array.isArray(a)?a:[a],b):[]},getOwnNodes:function(a,b,c){for(var d=this.getOwnRanges(),e=[],f=0,g=d.length;g>f;f++)d[f]&&(c&&d[f].splitBoundaries(),e=e.concat(d[f].getNodes(Array.isArray(a)?a:[a],b)));return e},fixRangeOverflow:function(a){if(this.contain&&this.contain.firstChild&&a){var b=a.compareNode(this.contain);if(2!==b)1===b&&a.setStartBefore(this.contain.firstChild),0===b&&a.setEndAfter(this.contain.lastChild),3===b&&(a.setStartBefore(this.contain.firstChild),a.setEndAfter(this.contain.lastChild));else if(this._detectInlineRangeProblems(a)){var c=a.endContainer.previousElementSibling;c&&a.setEnd(c,this._endOffsetForNode(c))}}},_endOffsetForNode:function(a){var b=document.createRange();return b.selectNodeContents(a),b.endOffset},_detectInlineRangeProblems:function(a){var b=f.compareDocumentPosition(a.startContainer,a.endContainer);return 0==a.endOffset&&4&b},getRange:function(a){var b=this.getSelection(),c=b&&b.rangeCount&&b.getRangeAt(0);return a!==!0&&this.fixRangeOverflow(c),c},getOwnUneditables:function(){var b=f.query(this.contain,"."+this.unselectableClass),c=f.query(b,"."+this.unselectableClass);return a.lang.array(b).without(c)},getOwnRanges:function(){var a,b=[],c=this.getRange();if(c&&b.push(c),this.unselectableClass&&this.contain&&c){var d,e=this.getOwnUneditables();if(e.length>0)for(var f=0,g=e.length;g>f;f++){a=[];for(var h=0,i=b.length;i>h;h++){if(b[h])switch(b[h].compareNode(e[f])){case 2:break;case 3:d=b[h].cloneRange(),d.setEndBefore(e[f]),a.push(d),d=b[h].cloneRange(),d.setStartAfter(e[f]),a.push(d);break;default:a.push(b[h])}b=a}}}return b},getSelection:function(){return rangy.getSelection(this.win)},setSelection:function(a){var b=rangy.getSelection(this.win);return b.setSingleRange(a),b&&b.anchorNode&&b.focusNode?b:null},selectAll:function(){var b,c=this.createRange(),e=this.composer,f=this,g=d(this.composer.element),h=d(this.composer.element),i=function(){c.setStart(e.element,0),c.setEnd(e.element,e.element.childNodes.length),b=f.setSelection(c)},j=function(){return!b||b.nativeSelection&&b.nativeSelection.type&&("Caret"===b.nativeSelection.type||"None"===b.nativeSelection.type)};a.dom.removeInvisibleSpaces(this.composer.element),i(),this.composer.element.firstChild&&j()&&(this.composer.element.appendChild(g),i(),j()&&(g.parentNode.removeChild(g),this.composer.element.insertBefore(h,this.composer.element.firstChild),i(),j()&&(this.composer.element.appendChild(g),i())))},createRange:function(){return rangy.createRange(this.doc)},isCollapsed:function(){return this.getSelection().isCollapsed},getHtml:function(){return this.getSelection().toHtml()},getPlainText:function(){return this.getSelection().toString()},isEndToEndInNode:function(b){var c=this.getRange(),d=c.commonAncestorContainer,e=c.startContainer,f=c.endContainer;if(d.nodeType===a.TEXT_NODE&&(d=d.parentNode),e.nodeType===a.TEXT_NODE&&!/^\s*$/.test(e.data.substr(c.startOffset)))return!1;if(f.nodeType===a.TEXT_NODE&&!/^\s*$/.test(f.data.substr(c.endOffset)))return!1;for(;e&&e!==d;){if(e.nodeType!==a.TEXT_NODE&&!a.dom.contains(d,e))return!1;if(a.dom.domNode(e).prev({ignoreBlankTexts:!0}))return!1;e=e.parentNode}for(;f&&f!==d;){if(f.nodeType!==a.TEXT_NODE&&!a.dom.contains(d,f))return!1;if(a.dom.domNode(f).next({ignoreBlankTexts:!0}))return!1;f=f.parentNode}return a.lang.array(b).contains(d.nodeName)?d:!1},isInThisEditable:function(){var b=this.getSelection(),c=b.focusNode,d=b.anchorNode;return c&&1!==c.nodeType&&(c=c.parentNode),d&&1!==d.nodeType&&(d=d.parentNode),d&&c&&(a.dom.contains(this.composer.element,c)||this.composer.element===c)&&(a.dom.contains(this.composer.element,d)||this.composer.element===d)},deselect:function(){var a=this.getSelection();a&&a.removeAllRanges()}})}(wysihtml5),function(a,b){function c(a,b,c){if(!a.className)return!1;var d=a.className.match(c)||[];return d[d.length-1]===b}function d(a,b){if(!a.getAttribute||!a.getAttribute("style"))return!1;a.getAttribute("style").match(b);return a.getAttribute("style").match(b)?!0:!1}function e(a,b,c){a.getAttribute("style")?(h(a,c),a.getAttribute("style")&&!/^\s*$/.test(a.getAttribute("style"))?a.setAttribute("style",b+";"+a.getAttribute("style")):a.setAttribute("style",b)):a.setAttribute("style",b)}function f(a,b,c){a.className?(g(a,c),a.className+=" "+b):a.className=b}function g(a,b){a.className&&(a.className=a.className.replace(b,""))}function h(a,b){var c,d=[];if(a.getAttribute("style")){c=a.getAttribute("style").split(";");for(var e=c.length;e--;)c[e].match(b)||/^\s*$/.test(c[e])||d.push(c[e]);d.length?a.setAttribute("style",d.join(";")):a.removeAttribute("style")}}function i(a,b){var c=[],d=b.split(";"),e=a.getAttribute("style");if(e){e=e.replace(/\s/gi,"").toLowerCase(),c.push(new RegExp("(^|\\s|;)"+b.replace(/\s/gi,"").replace(/([\(\)])/gi,"\\$1").toLowerCase().replace(";",";?").replace(/rgb\\\((\d+),(\d+),(\d+)\\\)/gi,"\\s?rgb\\($1,\\s?$2,\\s?$3\\)"),"gi"));for(var f=d.length;f-->0;)/^\s*$/.test(d[f])||c.push(new RegExp("(^|\\s|;)"+d[f].replace(/\s/gi,"").replace(/([\(\)])/gi,"\\$1").toLowerCase().replace(";",";?").replace(/rgb\\\((\d+),(\d+),(\d+)\\\)/gi,"\\s?rgb\\($1,\\s?$2,\\s?$3\\)"),"gi"));for(var g=0,h=c.length;h>g;g++)if(e.match(c[g]))return c[g]}return!1}function j(c,d,e,f){return e?i(c,e):f?a.dom.hasClass(c,f):b.dom.arrayContains(d,c.tagName.toLowerCase())}function k(a,b,c,d){for(var e=a.length;e--;)if(!j(a[e],b,c,d))return!1;return a.length?!0:!1}function l(a,b,c){var d=i(a,b);return d?(h(a,d),"remove"):(e(a,b,c),"change")}function m(a,b){return a.className.replace(u," ")==b.className.replace(u," ")}function n(a){for(var b=a.parentNode;a.firstChild;)b.insertBefore(a.firstChild,a);b.removeChild(a)}function o(a,b){if(a.attributes.length!=b.attributes.length)return!1;for(var c,d,e,f=0,g=a.attributes.length;g>f;++f)if(c=a.attributes[f],e=c.name,"class"!=e){if(d=b.attributes.getNamedItem(e),c.specified!=d.specified)return!1;if(c.specified&&c.nodeValue!==d.nodeValue)return!1}return!0}function p(a,c){return b.dom.isCharacterDataNode(a)?0==c?!!a.previousSibling:c==a.length?!!a.nextSibling:!0:c>0&&ce;++e)a=this.textNodes[e],b=a.parentNode,d[e]=a.data,e&&(b.removeChild(a),b.hasChildNodes()||b.parentNode.removeChild(b));return this.firstTextNode.data=c=d.join(""),c},getLength:function(){for(var a=this.textNodes.length,b=0;a--;)b+=this.textNodes[a].length;return b},toString:function(){for(var a=[],b=0,c=this.textNodes.length;c>b;++b)a[b]="'"+this.textNodes[b].data+"'";return"[Merge("+a.join(",")+")]"}},s.prototype={getAncestorWithClass:function(d){for(var e;d;){if(e=this.cssClass?c(d,this.cssClass,this.similarClassRegExp):""!==this.cssStyle?!1:!0,d.nodeType==a.ELEMENT_NODE&&"false"!=d.getAttribute("contenteditable")&&b.dom.arrayContains(this.tagNames,d.tagName.toLowerCase())&&e)return d;d=d.parentNode}return!1},getAncestorWithStyle:function(c){for(var e;c;){if(e=this.cssStyle?d(c,this.similarStyleRegExp):!1,c.nodeType==a.ELEMENT_NODE&&"false"!=c.getAttribute("contenteditable")&&b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase())&&e)return c;c=c.parentNode}return!1},getMatchingAncestor:function(a){var b=this.getAncestorWithClass(a),c=!1;return b?this.cssStyle&&(c="class"):(b=this.getAncestorWithStyle(a),b&&(c="style")),{element:b,type:c}},postApply:function(a,b){for(var c,d,e,f=a[0],g=a[a.length-1],h=[],i=f,j=g,k=0,l=g.length,m=0,n=a.length;n>m;++m)d=a[m],e=null,d&&d.parentNode&&(e=this.getAdjacentMergeableTextNode(d.parentNode,!1)),e?(c||(c=new r(e),h.push(c)),c.textNodes.push(d),d===f&&(i=c.firstTextNode,k=i.length),d===g&&(j=c.firstTextNode,l=c.getLength())):c=null;if(g&&g.parentNode){var o=this.getAdjacentMergeableTextNode(g.parentNode,!0);o&&(c||(c=new r(g),h.push(c)),c.textNodes.push(o))}if(h.length){for(m=0,n=h.length;n>m;++m)h[m].doMerge();b.setStart(i,k),b.setEnd(j,l)}},getAdjacentMergeableTextNode:function(b,c){var d,e=b.nodeType==a.TEXT_NODE,f=e?b.parentNode:b,g=c?"nextSibling":"previousSibling";if(e){if(d=b[g],d&&d.nodeType==a.TEXT_NODE)return d}else if(d=f[g],d&&this.areElementsMergeable(b,d))return d[c?"firstChild":"lastChild"];return null},areElementsMergeable:function(a,c){return b.dom.arrayContains(this.tagNames,(a.tagName||"").toLowerCase())&&b.dom.arrayContains(this.tagNames,(c.tagName||"").toLowerCase())&&m(a,c)&&o(a,c)},createContainer:function(a){var b=a.createElement(this.tagNames[0]);return this.cssClass&&(b.className=this.cssClass),this.cssStyle&&b.setAttribute("style",this.cssStyle),b},applyToTextNode:function(a){var c=a.parentNode;if(1==c.childNodes.length&&b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase()))this.cssClass&&f(c,this.cssClass,this.similarClassRegExp),this.cssStyle&&e(c,this.cssStyle,this.similarStyleRegExp);else{var d=this.createContainer(b.dom.getDocument(a));a.parentNode.insertBefore(d,a),d.appendChild(a)}},isRemovable:function(c){return b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase())&&""===a.lang.string(c.className).trim()&&(!c.getAttribute("style")||""===a.lang.string(c.getAttribute("style")).trim())},undoToTextNode:function(a,b,c,d){var e=c?!1:!0,f=c||d,h=!1;if(!b.containsNode(f)){var i=b.cloneRange();i.selectNode(f),i.isPointInRange(b.endContainer,b.endOffset)&&p(b.endContainer,b.endOffset)&&(q(f,b.endContainer,b.endOffset,this.container),b.setEndAfter(f)),i.isPointInRange(b.startContainer,b.startOffset)&&p(b.startContainer,b.startOffset)&&(f=q(f,b.startContainer,b.startOffset,this.container))}!e&&this.similarClassRegExp&&g(f,this.similarClassRegExp),e&&this.similarStyleRegExp&&(h="change"===l(f,this.cssStyle,this.similarStyleRegExp)),this.isRemovable(f)&&!h&&n(f)},applyToRange:function(b){for(var c,d=b.length;d--;){if(c=b[d].getNodes([a.TEXT_NODE]),!c.length)try{var e=this.createContainer(b[d].endContainer.ownerDocument);return b[d].surroundContents(e),void this.selectNode(b[d],e)}catch(f){}if(b[d].splitBoundaries(),c=b[d].getNodes([a.TEXT_NODE]),c.length){for(var g,h=0,i=c.length;i>h;++h)g=c[h],this.getMatchingAncestor(g).element||this.applyToTextNode(g);b[d].setStart(c[0],0),g=c[c.length-1],b[d].setEnd(g,g.length),this.normalize&&this.postApply(c,b[d])}}},undoToRange:function(b){for(var c,d,e,f=b.length;f--;){if(c=b[f].getNodes([a.TEXT_NODE]),c.length)b[f].splitBoundaries(),c=b[f].getNodes([a.TEXT_NODE]);else{var g=b[f].endContainer.ownerDocument,h=g.createTextNode(a.INVISIBLE_SPACE);b[f].insertNode(h),b[f].selectNode(h),c=[h]}for(var i=0,j=c.length;j>i;++i)b[f].isValid()&&(d=c[i],e=this.getMatchingAncestor(d),"style"===e.type?this.undoToTextNode(d,b[f],!1,e.element):e.element&&this.undoToTextNode(d,b[f],e.element));1==j?this.selectNode(b[f],c[0]):(b[f].setStart(c[0],0),d=c[c.length-1],b[f].setEnd(d,d.length),this.normalize&&this.postApply(c,b[f]))}},selectNode:function(b,c){var d=c.nodeType===a.ELEMENT_NODE,e="canHaveHTML"in c?c.canHaveHTML:!0,f=d?c.innerHTML:c.data,g=""===f||f===a.INVISIBLE_SPACE;if(g&&d&&e)try{c.innerHTML=a.INVISIBLE_SPACE}catch(h){}b.selectNodeContents(c),g&&d?b.collapse(!1):g&&(b.setStartAfter(c),b.setEndAfter(c))},getTextSelectedByRange:function(a,b){var c=b.cloneRange();c.selectNodeContents(a);var d=c.intersection(b),e=d?d.toString():"";return c.detach(),e},isAppliedToRange:function(b){for(var c,d,e=[],f="full",g=b.length;g--;){if(d=b[g].getNodes([a.TEXT_NODE]),!d.length)return c=this.getMatchingAncestor(b[g].startContainer).element,c?{elements:[c],coverage:f}:!1;for(var h,i=0,j=d.length;j>i;++i)h=this.getTextSelectedByRange(d[i],b[g]),c=this.getMatchingAncestor(d[i]).element,c&&""!=h?(e.push(c),1===a.dom.getTextNodes(c,!0).length?f="full":"full"===f&&(f="inline")):c||(f="partial")}return e.length?{elements:e,coverage:f}:!1},toggleRange:function(a){var b,c=this.isAppliedToRange(a);c?"full"===c.coverage?this.undoToRange(a):"inline"===c.coverage?(b=k(c.elements,this.tagNames,this.cssStyle,this.cssClass),this.undoToRange(a),b||this.applyToRange(a)):(k(c.elements,this.tagNames,this.cssStyle,this.cssClass)||this.undoToRange(a),this.applyToRange(a)):this.applyToRange(a)}},a.selection.HTMLApplier=s}(wysihtml5,rangy),wysihtml5.Commands=Base.extend({constructor:function(a){this.editor=a,this.composer=a.composer,this.doc=this.composer.doc},support:function(a){return wysihtml5.browser.supportsCommand(this.doc,a)},exec:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.exec,f=null;if(this.composer.hasPlaceholderSet()&&!wysihtml5.lang.array(["styleWithCSS","enableObjectResizing","enableInlineTableEditing"]).contains(a)&&(this.composer.element.innerHTML="",this.composer.selection.selectNode(this.composer.element)),this.editor.fire("beforecommand:composer"),e)d.unshift(this.composer),f=e.apply(c,d);else try{f=this.doc.execCommand(a,!1,b)}catch(g){}return this.editor.fire("aftercommand:composer"),f},remove:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.remove;return e?(d.unshift(this.composer),e.apply(c,d)):void 0},state:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.state;if(e)return d.unshift(this.composer),e.apply(c,d);try{return this.doc.queryCommandState(a)}catch(f){return!1}},stateValue:function(a){var b=wysihtml5.commands[a],c=wysihtml5.lang.array(arguments).get(),d=b&&b.stateValue;return d?(c.unshift(this.composer),d.apply(b,c)):!1}}),function(a){var b={nodeName:"B",toggle:!0};a.commands.bold={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){function b(b){return a.lang.object({}).merge(c).merge({attribute:b}).get()}var c={nodeName:"A",toggle:!1};a.commands.createLink={exec:function(c,d,e){var f=b(e);if(c.selection.isCollapsed()&&!this.state(c,d)){var g=c.doc.createTextNode(f.attribute.href);c.selection.insertNode(g),c.selection.selectNode(g)}a.commands.formatInline.exec(c,d,f)},state:function(b,d){return a.commands.formatInline.state(b,d,c)}}}(wysihtml5),function(a){var b={nodeName:"A"};a.commands.removeLink={exec:function(c,d){a.commands.formatInline.remove(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b=/wysiwyg-font-size-[0-9a-z\-]+/g;a.commands.fontSize={exec:function(c,d,e){a.commands.formatInline.exec(c,d,{className:"wysiwyg-font-size-"+e,classRegExp:b,toggle:!0})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{className:"wysiwyg-font-size-"+d})}}}(wysihtml5),function(a){a.commands.fontSizeStyle={exec:function(b,c,d){d=d.size||d,/^\s*$/.test(d)||a.commands.formatInline.exec(b,c,{styleProperty:"fontSize",styleValue:d,toggle:!1})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{styleProperty:"fontSize",styleValue:d||void 0})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"fontSize"})},stateValue:function(b,c){var d,e=this.state(b,c);return e&&a.lang.object(e).isArray()&&(e=e[0]),e&&(d=e.getAttribute("style"))?a.quirks.styleParser.parseFontSize(d):!1}}}(wysihtml5),function(a){var b=/wysiwyg-color-[0-9a-z]+/g;a.commands.foreColor={exec:function(c,d,e){a.commands.formatInline.exec(c,d,{className:"wysiwyg-color-"+e,classRegExp:b,toggle:!0})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{className:"wysiwyg-color-"+d})}}}(wysihtml5),function(a){a.commands.foreColorStyle={exec:function(b,c,d){var e,f;d&&(e=a.quirks.styleParser.parseColor("color:"+(d.color||d),"color"),e&&(f=(1===e[3]?"rgb("+[e[0],e[1],e[2]].join(", "):"rgba("+e.join(", "))+")",a.commands.formatInline.exec(b,c,{styleProperty:"color",styleValue:f})))},state:function(b,c,d){var e,f=d?a.quirks.styleParser.parseColor("color:"+(d.color||d),"color"):null;return f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")"),a.commands.formatInline.state(b,c,{styleProperty:"color",styleValue:e})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"color"})},stateValue:function(b,c,d){var e,f=this.state(b,c),g=!1;return f&&a.lang.object(f).isArray()&&(f=f[0]),f&&(e=f.getAttribute("style"))?(g=a.quirks.styleParser.parseColor(e,"color"),a.quirks.styleParser.unparseColor(g,d)):!1}}}(wysihtml5),function(a){a.commands.bgColorStyle={exec:function(b,c,d){var e,f=a.quirks.styleParser.parseColor("background-color:"+(d.color||d),"background-color");f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")",a.commands.formatInline.exec(b,c,{styleProperty:"backgroundColor",styleValue:e}))},state:function(b,c,d){var e,f=d?a.quirks.styleParser.parseColor("background-color:"+(d.color||d),"background-color"):null;return f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")"),a.commands.formatInline.state(b,c,{styleProperty:"backgroundColor",styleValue:e})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"backgroundColor"})},stateValue:function(b,c,d){var e,f=this.state(b,c),g=!1;return f&&a.lang.object(f).isArray()&&(f=f[0]),f&&(e=f.getAttribute("style"))?(g=a.quirks.styleParser.parseColor(e,"background-color"),a.quirks.styleParser.unparseColor(g,d)):!1}}}(wysihtml5),function(a){function b(a){return{nodeName:a.nodeName||null,className:a.classRegExp?null:a.className||null,classRegExp:a.classRegExp||null,styleProperty:a.styleProperty||null}}function c(b){for(var c=b.element,d=c.querySelectorAll(o),e=c.querySelectorAll(b.config.classNames.uneditableContainer),f=a.lang.array(d).without(e),g=f.length;g--;)""===f[g].innerHTML.replace(/[\uFEFF]/g,"")&&f[g].parentNode.removeChild(f[g])}function d(a){return a.config.useLineBreaks?"DIV":"P"}function e(a,b,c){for(var d=a,e=null;d&&b&&d!==b;)1===d.nodeType&&d.matches(c?o:n)&&(e=d),d=d.parentNode;return e}function f(a,b){for(var c,d,e,f=a,g=null;f&&b&&f!==b;)1===f.nodeType&&f.matches(p)&&(d=f,null===g?(g=f.cloneNode(!1),c=g):(e=f.cloneNode(!1),e.appendChild(g),g=e)),f=f.parentNode;return{parent:d,outerNode:g,innerNode:c}}function g(b,c,e){return b||(b=e.doc.createElement(c.nodeName||d(e)),b.appendChild(e.doc.createTextNode(a.INVISIBLE_SPACE))),c.nodeName&&b.nodeName!==c.nodeName&&(b=m.renameElement(b,c.nodeName)),c.classRegExp&&(b.className=b.className.replace(c.classRegExp,"")),c.className&&b.classList.add(c.className),c.styleProperty&&"undefined"!=typeof c.styleValue&&(b.style[a.browser.fixStyleKey(c.styleProperty)]=c.styleValue),b}function h(b,c,e){var f;c.styleProperty&&(b.style[a.browser.fixStyleKey(c.styleProperty)]=""),c.className&&b.classList.remove(c.className),c.classRegExp&&(b.className=b.className.replace(c.classRegExp,"")),null!==b.getAttribute("class")&&""===b.getAttribute("class").trim()&&b.removeAttribute("class"),c.nodeName&&b.nodeName===c.nodeName&&(f=b.getAttribute("style"),f&&""!==f.trim()?b=m.renameElement(b,d(e)):m.unwrap(b)),null!==b.getAttribute("style")&&""===b.getAttribute("style").trim()&&b.removeAttribute("style")}function i(b){for(var c=b.querySelectorAll(o)||[],d=c.length;d--;)c[d].nextSibling&&1===c[d].nextSibling.nodeType&&"BR"===c[d].nextSibling.nodeName||""!==(c[d].innerHTML||c[d].nodeValue||"").trim()&&c[d].parentNode.insertBefore(c[d].ownerDocument.createElement("BR"),c[d].nextSibling),a.dom.unwrap(c[d])}function j(a,b){var c;return a.startContainer&&1===a.startContainer.nodeType&&a.startContainer===a.endContainer?void(a.startContainer.firstChild===a.startContainer.lastChild&&1===a.endOffset&&a.startContainer!==b.element&&(a.setStartBefore(a.startContainer),a.setEndAfter(a.endContainer))):a.startContainer&&1===a.startContainer.nodeType&&3===a.endContainer.nodeType?void(a.startContainer.firstChild===a.endContainer&&1===a.endOffset&&a.startContainer!==b.element&&a.setEndAfter(a.startContainer)):a.endContainer&&1===a.endContainer.nodeType&&3===a.startContainer.nodeType?void(a.endContainer.firstChild===a.startContainer&&1===a.endOffset&&a.endContainer!==b.element&&a.setStartBefore(a.endContainer)):a.startContainer&&3===a.startContainer.nodeType&&a.startContainer===a.endContainer&&a.startContainer.parentNode?void(a.startContainer.parentNode.firstChild===a.startContainer&&a.endOffset==a.endContainer.length&&0===a.startOffset&&(c=a.startContainer.parentNode,c!==b.element&&(a.setStartBefore(c),a.setEndAfter(c)))):void 0}function k(c,h,k,l){var m=h?a.lang.object(h).clone(!0):null;m&&(m.nodeName=m.nodeName||k||d(l)),j(c,l);var p,q,r,s=c.cloneRange(),t=s.startContainer,u=s.extractContents(),v=l.doc.createDocumentFragment(),w=m?b(m):null,x=w?a.dom.getParentElement(t,w,null,l.element):null,y=!m||"BLOCKQUOTE"===k&&m.nodeName&&"BLOCKQUOTE"===m.nodeName,z=x||e(t,l.element,y);if(h&&h.nodeName&&"BLOCKQUOTE"===h.nodeName){var A=g(null,h,l);A.appendChild(u),v.appendChild(A),q=[A]}else{if(u.firstChild)for(;u.firstChild;)if(1==u.firstChild.nodeType&&u.firstChild.matches(o))if(h)g(u.firstChild,h,l),u.firstChild.matches(n)&&i(u.firstChild),v.appendChild(u.firstChild);else{i(u.firstChild),r=a.dom.unwrap(u.firstChild);for(var B=0,C=r.length;C>B;B++)v.appendChild(r[B]);v.childNodes.length>0&&v.appendChild(l.doc.createElement("BR"))}else if(h){for(p=g(null,m,l);u.firstChild&&(1!==u.firstChild.nodeType||!u.firstChild.matches(o));)1==u.firstChild.nodeType&&p.matches(n)&&i(u.firstChild),p.appendChild(u.firstChild);v.appendChild(p)}else 1==u.firstChild.nodeType&&i(u.firstChild),v.appendChild(u.firstChild);else v.appendChild(g(null,h,l));q=a.lang.array(v.childNodes).get()}if(z)l.selection.splitElementAtCaret(z,v);else{var D=f(t,l.element);if(D.outerNode&&D.innerNode&&D.parent){if(1===v.childNodes.length){for(;v.firstChild.firstChild;)D.innerNode.appendChild(v.firstChild.firstChild);v.firstChild.appendChild(D.outerNode)}l.selection.splitElementAtCaret(D.parent,v)}else s.insertNode(v)}return q}function l(b,c){var d=a.dom.getParentElement(b,{query:o},null,c.element);return d?d.nodeName:null}var m=a.dom,n="h1, h2, h3, h4, h5, h6, p, pre",o="h1, h2, h3, h4, h5, h6, p, pre, div, blockquote",p="b, big, i, small, tt, abbr, acronym, cite, code, dfn, em, kbd, strong, samp, var, a, bdo, br, q, span, sub, sup, button, label, textarea, input, select, u";a.commands.formatBlock={exec:function(b,d,e){var f,g,i,j,m,o=[];if("string"==typeof e&&(e={nodeName:e.toUpperCase()}),e&&e.toggle&&(m=this.state(b,d,e))){j=rangy.saveSelection(b.win);for(var p=0,q=m.length;q>p;p++)h(m[p],e,b)}if(!m){b.selection.isCollapsed()&&(i=a.dom.getParentElement(b.selection.getOwnRanges()[0].startContainer,{query:n+", "+(e&&e.nodeName?e.nodeName.toLowerCase():"div")},null,b.element),i?(j=rangy.saveSelection(b.win),g=b.selection.createRange(),g.selectNode(i),b.selection.setSelection(g)):b.isEmpty()||(j=rangy.saveSelection(b.win),b.selection.selectLine())),f=b.selection.getOwnRanges();for(var r=f.length;r--;)o=o.concat(k(f[r],e,l(f[r].startContainer,b),b))}c(b);for(var s=o.length;s--;)o[s].parentNode||o.splice(s,1);j?rangy.restoreSelection(j):(g=b.selection.createRange(),g.setStartBefore(o[0]),g.setEndAfter(o[o.length-1]),b.selection.setSelection(g)),a.dom.removeInvisibleSpaces(b.element)},state:function(b,c,d){"string"==typeof d&&(d={query:d});for(var e,f=b.selection.filterElements(function(b){return a.dom.domNode(b).test(d||{query:o})}.bind(this)),g=b.selection.getSelectedOwnNodes(),h=0,i=g.length;i>h;h++)e=m.getParentElement(g[h],d||{query:o},null,b.element),e&&-1===f.indexOf(e)&&f.push(e);return 0===f.length?!1:f}}}(wysihtml5),function(a){a.commands.formatCode={exec:function(b,c,d){var e,f,g,h=this.state(b)[0];h?b.selection.executeAndRestore(function(){e=h.querySelector("code"),a.dom.replaceWithChildNodes(h),e&&a.dom.replaceWithChildNodes(e)}):(f=b.selection.getRange(),g=f.extractContents(),h=b.doc.createElement("pre"),e=b.doc.createElement("code"),d&&(e.className=d),h.appendChild(e),e.appendChild(g),f.insertNode(h),b.selection.selectNode(h))},state:function(b){var c,d=b.selection.getSelectedNode();return d&&d.nodeName&&"PRE"==d.nodeName&&d.firstChild&&d.firstChild.nodeName&&"CODE"==d.firstChild.nodeName?[d]:(c=a.dom.getParentElement(d,{query:"pre code"}),c?[c.parentNode]:!1)}}}(wysihtml5),function(a){function b(a){return/^\s*$/.test(a.className)}function c(a){return!a.getAttribute("style")||/^\s*$/.test(a.getAttribute("style"))}function d(b){var c=a.dom.getAttributes(b);return a.lang.object(c).isEmpty()}function e(b,c){var d,e,f,g;return 1!==b.nodeType||1!==c.nodeType?!1:b.nodeName!==c.nodeName?!1:(d=b.className.trim().replace(/\s+/g," ").split(" "),e=c.className.trim().replace(/\s+/g," ").split(" "),a.lang.array(d).without(e).length>0?!1:(f=a.dom.getAttributes(b),g=a.dom.getAttributes(c),f.length===g.length&&a.lang.object(a.lang.object(f).difference(g)).isEmpty()?!0:!1))}function f(b,c){var d=c&&c.nodeName||F,e=b.ownerDocument.createElement(d);if(c.classRegExp&&(e.className=e.className.replace(c.classRegExp,"")),c.className&&e.classList.add(c.className),c.styleProperty&&"undefined"!=typeof c.styleValue&&(e.style[a.browser.fixStyleKey(c.styleProperty)]=c.styleValue),c.attribute)if("object"==typeof c.attribute)for(var f in c.attribute)c.attribute.hasOwnProperty(f)&&e.setAttribute(f,c.attribute[f]);else"undefined"!=typeof c.attributeValue&&e.setAttribute(c.attribute,c.attributeValue);return e}function g(a,b){for(var c in a)if(a.hasOwnProperty(c)&&(void 0===typeof b[c]||b[c]!==a[c]))return!1;return!0}function h(b,c,d){var e,f=a.dom.getAttributes(b),h=g(c,f);a.lang.object(f).difference(c);if(h&&d!==!1)for(e in c)c.hasOwnProperty(e)&&b.removeAttribute(e);else for(e in c)c.hasOwnProperty(e)&&b.setAttribute(e,c[e])}function i(e,f){var g,i,j;f.className&&(f.toggle!==!1&&e.classList.contains(f.className)?e.classList.remove(f.className):e.classList.add(f.className),b(e)&&e.removeAttribute("class")),f.styleProperty&&(f.toggle!==!1&&e.style[a.browser.fixStyleKey(f.styleProperty)].trim().replace(/, /g,",")===f.styleValue?e.style[a.browser.fixStyleKey(f.styleProperty)]="":e.style[a.browser.fixStyleKey(f.styleProperty)]=f.styleValue),c(e)&&e.removeAttribute("style"),f.attribute&&("object"==typeof f.attribute?g=f.attribute:(g={},g[f.attribute]=f.attributeValue||""),h(e,g,f.toggle)),i=f.nodeName?H[f.nodeName.toLowerCase()]||f.nodeName.toLowerCase():null,j=i?a.dom.domNode(e).test({query:i}):!1,(!f.nodeName||f.nodeName===F||j)&&(f.toggle!==!1&&j||!f.nodeName&&e.nodeName===F)&&b(e)&&c(e)&&d(e)&&a.dom.unwrap(e)}function j(b,c){var d=[];return b.isCollapsed()||(d=d.concat(b.getOwnNodes([3],function(b){return!a.dom.domNode(b).is.emptyTextNode()},c))),d}function k(a,b,c,d){var e=a,f=d?b:l(b);do{if(1===e.nodeType&&m(e,f))return e;e=e.parentNode}while(e&&e!==c);return null}function l(a){return{nodeName:a.nodeName||null,className:a.classRegExp?null:a.className||null,classRegExp:a.classRegExp||null,styleProperty:a.styleProperty||null}}function m(b,c){var d;if(c.nodeName){var e=H[c.nodeName.toLowerCase()]||c.nodeName.toLowerCase();return a.dom.domNode(b).test({query:e})}return d=a.lang.object(c).clone(),d.query=G,a.dom.domNode(b).test(d)}function n(b,c){var d=document.documentElement||document.body,e=d.scrollTop,f=d.scrollLeft;rangy.getSelection(b.win);rangy.getSelection(b.win).removeAllRanges();try{rangy.getSelection(b.win).addRange(c)}catch(g){}b.doc.activeElement&&a.dom.contains(b.element,b.doc.activeElement)||(b.element.focus(),d.scrollTop=e,d.scrollLeft=f,rangy.getSelection(b.win).addRange(c))}function o(a,b){var c=rangy.createRange(b.doc),d=a[a.length-1];a[0]&&d&&(c.setStart(a[0],0),c.setEnd(d,d.length),n(b,c))}function p(a,b,c,d){var e=rangy.createRange(a.doc);b&&(e.setStart(b,c),e.setEnd(b,"undefined"!=typeof d?d:c),n(a,e))}function q(a,b,c){var d,e,f,g=j(a.selection),h=[],i=!1;if(a.selection.isInThisEditable()){if(0===g.length&&a.selection.isCollapsed()){if(f=a.selection.getSelection().anchorNode,!f)return{nodes:[],partial:!1};3===f.nodeType&&(g=[f])}g.length||(e=a.selection.getOwnRanges()[0],e&&(g=[e.endContainer]));for(var l=0,m=g.length;m>l;l++)d=k(g[l],b,a.element,c),d?h.push(d):i=!0}return{nodes:h,partial:i}}function r(a){var b,c,d,e;return a&&(b=a.anchorNode,c=a.anchorOffset,b&&3===b.nodeType&&c>0&&c0&&/\w/.test(c.data[g-1]);)g--;for(;h0&&o(b,a),u(q(a,c).nodes),b.length>0&&o(b,a)}function w(a,b,c,d){p(a,b,c),u(q(a,d).nodes),p(a,b,c)}function x(a,b){var c=f(a,b);a.parentNode.insertBefore(c,a),c.appendChild(a)}function y(b,c,d){var e,f=c.element,g=k(b,d,f);g&&(e=g.cloneNode(!1),a.dom.domNode(b).escapeParent(g,e),i(e,d))}function z(b,c,d){var e=c.element,f=k(b,d,e);f&&a.dom.domNode(b).escapeParent(f)}function A(a,b,c){var d=f(a.endContainer,c);a.surroundContents(d),b.selection.selectNode(d)}function B(b,c,d,e){var f,g,h,j,l=q(b,e,!0),m=b.selection.getSelection();if(c.length){if(l.partial||e.toggle===!1)for(j=c.length;j--;)k(c[j],e,b.element)&&y(c[j],b,e),k(c[j],e,b.element)||x(c[j],e);else for(j=c.length;j--;)y(c[j],b,e);v(b,c,e)}else if(e.toggle!==!1)if(r(m))f=s(m),g=f.textNode,y(f.textNode,b,e),w(b,f.textNode,f.wordOffset,e);else{g=b.doc.createTextNode(a.INVISIBLE_SPACE),h=d.nodes[0].cloneNode(!1),h.appendChild(g),b.selection.splitElementAtCaret(d.nodes[0],h),i(h,e),v(b,[g],e);var n=b.selection.getSelection();if(n.anchorNode&&n.focusNode)try{n.collapseToEnd()}catch(o){}}else for(j=d.nodes.length;j--;)i(d.nodes[j],e)}function C(b,c,d,e){var f,g,h,i=b.selection.getSelection();if(c.length){for(h=c.length;h--;)z(c[h],b,e);v(b,c,e)}else{for(f=i.anchorNode,g=i.anchorOffset,h=d.nodes.length;h--;)a.dom.unwrap(d.nodes[h]);w(b,f,g,e)}}function D(a,b,c){var d,e,f=a.selection.getSelection();if(b.length){for(e=b.length;e--;)x(b[e],c);v(a,b,c)}else if(r(f))d=s(f),x(d.textNode,c),w(a,d.textNode,d.wordOffset,c);else{var g=a.selection.getOwnRanges()[0];g&&A(g,a,c)}}function E(a){return a="string"==typeof a?{nodeName:a}:a,a.nodeName&&(a.nodeName=a.nodeName.toUpperCase()),
-a}var F="SPAN",G="b, big, i, small, tt, abbr, acronym, cite, code, dfn, em, kbd, strong, samp, var, a, bdo, br, q, span, sub, sup, button, label, textarea, input, select, u",H={b:"b, strong",strong:"b, strong",em:"em, i",i:"em, i"};a.commands.formatInline={exec:function(a,b,c){c=E(c),a.element.normalize();var d=j(a.selection,!0),e=q(a,c);e.nodes.length>0?B(a,d,e,c):D(a,d,c),a.element.normalize()},remove:function(a,b,c){c=E(c),a.element.normalize();var d=j(a.selection,!0),e=q(a,c);e.nodes.length>0&&C(a,d,e,c),a.element.normalize()},state:function(a,b,c){c=E(c);var d=q(a,c,!0).nodes;return 0===d.length?!1:d}}}(wysihtml5),function(a){var b={nodeName:"BLOCKQUOTE",toggle:!0};a.commands.insertBlockQuote={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){a.commands.insertHTML={exec:function(a,b,c){a.commands.support(b)?a.doc.execCommand(b,!1,c):a.selection.insertHTML(c)},state:function(){return!1}}}(wysihtml5),function(a){var b="IMG";a.commands.insertImage={exec:function(c,d,e){e="object"==typeof e?e:{src:e};var f,g,h=c.doc,i=this.state(c);if(i&&!e.src)return c.selection.setBefore(i),g=i.parentNode,g.removeChild(i),a.dom.removeEmptyTextNodes(g),"A"!==g.nodeName||g.firstChild||(c.selection.setAfter(g),g.parentNode.removeChild(g)),void a.quirks.redraw(c.element);if(i)for(var j in e)e.hasOwnProperty(j)&&i.setAttribute("className"===j?"class":j,e[j]);else{i=h.createElement(b);for(var k in e)i.setAttribute("className"===k?"class":k,e[k]);c.selection.insertNode(i),a.browser.hasProblemsSettingCaretAfterImg()?(f=h.createTextNode(a.INVISIBLE_SPACE),c.selection.insertNode(f),c.selection.setAfter(f)):c.selection.setAfter(i)}},state:function(c){var d,e,f,g=c.doc;return a.dom.hasElementWithTagName(g,b)&&(d=c.selection.getSelectedNode())?d.nodeName===b?d:d.nodeType!==a.ELEMENT_NODE?!1:(e=c.selection.getText(),(e=a.lang.string(e).trim())?!1:(f=c.selection.getNodes(a.ELEMENT_NODE,function(a){return"IMG"===a.nodeName}),1!==f.length?!1:f[0])):!1}}}(wysihtml5),function(a){var b="
"+(a.browser.needsSpaceAfterLineBreak()?" ":"");a.commands.insertLineBreak={exec:function(c,d){c.commands.support(d)?(c.doc.execCommand(d,!1,null),a.browser.autoScrollsToCaret()||c.selection.scrollIntoView()):c.commands.exec("insertHTML",b)},state:function(){return!1}}}(wysihtml5),function(a){a.commands.insertOrderedList={exec:function(b,c){a.commands.insertList.exec(b,c,"OL")},state:function(b,c){return a.commands.insertList.state(b,c,"OL")}}}(wysihtml5),function(a){a.commands.insertUnorderedList={exec:function(b,c){a.commands.insertList.exec(b,c,"UL")},state:function(b,c){return a.commands.insertList.state(b,c,"UL")}}}(wysihtml5),wysihtml5.commands.insertList=function(a){var b=function(a,b){if(a&&a.nodeName){"string"==typeof b&&(b=[b]);for(var c=b.length;c--;)if(a.nodeName===b[c])return!0}return!1},c=function(c,d,e){var f={el:null,other:!1};if(c){var g=a.dom.getParentElement(c,{query:"li"},!1,e.element),h="UL"===d?"OL":"UL";b(c,d)?f.el=c:b(c,h)?f={el:c,other:!0}:g&&(b(g.parentNode,d)?f.el=g.parentNode:b(g.parentNode,h)&&(f={el:g.parentNode,other:!0}))}return f.el&&!e.element.contains(f.el)&&(f.el=null),f},d=function(b,c,d){var e,g,h="UL"===c?"OL":"UL";d.selection.executeAndRestoreRangy(function(){if(e=f(h,d),e.length)for(var i=e.length;i--;)a.dom.renameElement(e[i],c.toLowerCase());else{g=f(["OL","UL"],d);for(var j=g.length;j--;)a.dom.resolveList(g[j],d.config.useLineBreaks);a.dom.resolveList(b,d.config.useLineBreaks)}})},e=function(b,c,d){var e="UL"===c?"OL":"UL";d.selection.executeAndRestoreRangy(function(){for(var g=[b].concat(f(e,d)),h=g.length;h--;)a.dom.renameElement(g[h],c.toLowerCase())})},f=function(a,c){for(var d=c.selection.getOwnRanges(),e=[],f=d.length;f--;)e=e.concat(d[f].getNodes([1],function(c){return b(c,a)}));return e},g=function(b,c){c.selection.executeAndRestoreRangy(function(){var d,e,f="_wysihtml5-temp-"+(new Date).getTime(),g=c.selection.deblockAndSurround({nodeName:"div",className:f});g.innerHTML=g.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),g&&(d=a.lang.array(["","
",a.INVISIBLE_SPACE]).contains(g.innerHTML),e=a.dom.convertToList(g,b.toLowerCase(),c.parent.config.classNames.uneditableContainer),d&&c.selection.selectNode(e.querySelector("li"),!0))})};return{exec:function(a,b,f){var h=a.doc,i="OL"===f?"insertOrderedList":"insertUnorderedList",j=a.selection.getSelectedNode(),k=c(j,f,a);k.el?k.other?e(k.el,f,a):d(k.el,f,a):a.commands.support(i)?h.execCommand(i,!1,null):g(f,a)},state:function(a,b,d){var e=a.selection.getSelectedNode(),f=c(e,d,a);return f.el&&!f.other?f.el:!1}}}(wysihtml5),function(a){var b={nodeName:"I",toggle:!0};a.commands.italic={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-center",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyCenter={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-left",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyLeft={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-right",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyRight={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-justify",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyFull={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"right",toggle:!0};a.commands.alignRightStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"left",toggle:!0};a.commands.alignLeftStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"center",toggle:!0};a.commands.alignCenterStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){a.commands.redo={exec:function(a){return a.undoManager.redo()},state:function(a){return!1}}}(wysihtml5),function(a){var b={nodeName:"U",toggle:!0};a.commands.underline={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){a.commands.undo={exec:function(a){return a.undoManager.undo()},state:function(a){return!1}}}(wysihtml5),function(a){a.commands.createTable={exec:function(a,b,c){var d,e,f;if(c&&c.cols&&c.rows&&parseInt(c.cols,10)>0&&parseInt(c.rows,10)>0){for(f=c.tableStyle?'':"",f+="",e=0;e",d=0;d
";f+=""}f+="
",a.commands.exec("insertHTML",f)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.mergeTableCells={exec:function(b,c){b.tableSelection&&b.tableSelection.start&&b.tableSelection.end&&(this.state(b,c)?a.dom.table.unmergeCell(b.tableSelection.start):a.dom.table.mergeCellsBetween(b.tableSelection.start,b.tableSelection.end))},state:function(b,c){if(b.tableSelection){var d=b.tableSelection.start,e=b.tableSelection.end;if(d&&e&&d==e&&(a.dom.getAttribute(d,"colspan")&&parseInt(a.dom.getAttribute(d,"colspan"),10)>1||a.dom.getAttribute(d,"rowspan")&&parseInt(a.dom.getAttribute(d,"rowspan"),10)>1))return[d]}return!1}}}(wysihtml5),function(a){a.commands.addTableCells={exec:function(b,c,d){if(b.tableSelection&&b.tableSelection.start&&b.tableSelection.end){var e=a.dom.table.orderSelectionEnds(b.tableSelection.start,b.tableSelection.end);"before"==d||"above"==d?a.dom.table.addCells(e.start,d):("after"==d||"below"==d)&&a.dom.table.addCells(e.end,d),setTimeout(function(){b.tableSelection.select(e.start,e.end)},0)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.deleteTableCells={exec:function(b,c,d){if(b.tableSelection&&b.tableSelection.start&&b.tableSelection.end){var e,f=a.dom.table.orderSelectionEnds(b.tableSelection.start,b.tableSelection.end),g=a.dom.table.indexOf(f.start),h=b.tableSelection.table;a.dom.table.removeCells(f.start,d),setTimeout(function(){e=a.dom.table.findCell(h,g),e||("row"==d&&(e=a.dom.table.findCell(h,{row:g.row-1,col:g.col})),"column"==d&&(e=a.dom.table.findCell(h,{row:g.row,col:g.col-1}))),e&&b.tableSelection.select(e,e)},0)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.indentList={exec:function(a,b,c){var d=a.selection.getSelectionParentsByTag("LI");return d?this.tryToPushLiLevel(d,a.selection):!1},state:function(a,b){return!1},tryToPushLiLevel:function(b,c){var d,e,f,g,h,i=!1;return c.executeAndRestoreRangy(function(){for(var c=b.length;c--;)g=b[c],d="OL"===g.parentNode.nodeName?"OL":"UL",e=g.ownerDocument.createElement(d),f=a.dom.domNode(g).prev({nodeTypes:[a.ELEMENT_NODE]}),h=f?f.querySelector("ul, ol"):null,f&&(h?h.appendChild(g):(e.appendChild(g),f.appendChild(e)),i=!0)}),i}}}(wysihtml5),function(a){a.commands.outdentList={exec:function(a,b,c){var d=a.selection.getSelectionParentsByTag("LI");return d?this.tryToPullLiLevel(d,a):!1},state:function(a,b){return!1},tryToPullLiLevel:function(b,c){var d,e,f,g,h,i=!1,j=this;return c.selection.executeAndRestoreRangy(function(){for(var k=b.length;k--;)if(g=b[k],g.parentNode&&(d=g.parentNode,"OL"===d.tagName||"UL"===d.tagName)){if(i=!0,e=a.dom.getParentElement(d.parentNode,{query:"ol, ul"},!1,c.element),f=a.dom.getParentElement(d.parentNode,{query:"li"},!1,c.element),e&&f)g.nextSibling&&(h=j.getAfterList(d,g),g.appendChild(h)),e.insertBefore(g,f.nextSibling);else{g.nextSibling&&(h=j.getAfterList(d,g),g.appendChild(h));for(var l=g.childNodes.length;l--;)d.parentNode.insertBefore(g.childNodes[l],d.nextSibling);d.parentNode.insertBefore(document.createElement("br"),d.nextSibling),g.parentNode.removeChild(g)}0===d.childNodes.length&&d.parentNode.removeChild(d)}}),i},getAfterList:function(a,b){for(var c=a.nodeName,d=document.createElement(c);b.nextSibling;)d.appendChild(b.nextSibling);return d}}}(wysihtml5),function(a){var b={nodeName:"SUB",toggle:!0};a.commands.subscript={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b={nodeName:"SUP",toggle:!0};a.commands.superscript={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b=90,c=89,d=8,e=46,f=25,g="data-wysihtml5-selection-node",h="data-wysihtml5-selection-offset",i=(''+a.INVISIBLE_SPACE+"",''+a.INVISIBLE_SPACE+"",a.dom);a.UndoManager=a.lang.Dispatcher.extend({constructor:function(a){this.editor=a,this.composer=a.composer,this.element=this.composer.element,this.position=0,this.historyStr=[],this.historyDom=[],this.transact(),this._observe()},_observe:function(){var a,f=this;this.composer.sandbox.getDocument();i.observe(this.element,"keydown",function(a){if(!a.altKey&&(a.ctrlKey||a.metaKey)){var d=a.keyCode,e=d===b&&!a.shiftKey,g=d===b&&a.shiftKey||d===c;e?(f.undo(),a.preventDefault()):g&&(f.redo(),a.preventDefault())}}),i.observe(this.element,"keydown",function(b){var c=b.keyCode;c!==a&&(a=c,(c===d||c===e)&&f.transact())}),this.editor.on("newword:composer",function(){f.transact()}).on("beforecommand:composer",function(){f.transact()})},transact:function(){var b,c,d,e,i,j=this.historyStr[this.position-1],k=this.composer.getValue(!1,!1),l=this.element.offsetWidth>0&&this.element.offsetHeight>0;if(k!==j){var m=this.historyStr.length=this.historyDom.length=this.position;m>f&&(this.historyStr.shift(),this.historyDom.shift(),this.position--),this.position++,l&&(b=this.composer.selection.getRange(),c=b&&b.startContainer?b.startContainer:this.element,d=b&&b.startOffset?b.startOffset:0,c.nodeType===a.ELEMENT_NODE?e=c:(e=c.parentNode,i=this.getChildNodeIndex(e,c)),e.setAttribute(h,d),"undefined"!=typeof i&&e.setAttribute(g,i));var n=this.element.cloneNode(!!k);this.historyDom.push(n),this.historyStr.push(k),e&&(e.removeAttribute(h),e.removeAttribute(g))}},undo:function(){this.transact(),this.undoPossible()&&(this.set(this.historyDom[--this.position-1]),this.editor.fire("undo:composer"))},redo:function(){this.redoPossible()&&(this.set(this.historyDom[++this.position-1]),this.editor.fire("redo:composer"))},undoPossible:function(){return this.position>1},redoPossible:function(){return this.positionb;b++)this.element.appendChild(c[b].cloneNode(!0));var e,f,i;a.hasAttribute(h)?(e=a.getAttribute(h),i=a.getAttribute(g),f=this.element):(f=this.element.querySelector("["+h+"]")||this.element,e=f.getAttribute(h),i=f.getAttribute(g),f.removeAttribute(h),f.removeAttribute(g)),null!==i&&(f=this.getChildNodeByIndex(f,+i)),this.composer.selection.set(f,e)},getChildNodeIndex:function(a,b){for(var c=0,d=a.childNodes,e=d.length;e>c;c++)if(d[c]===b)return c},getChildNodeByIndex:function(a,b){return a.childNodes[b]}})}(wysihtml5),wysihtml5.views.View=Base.extend({constructor:function(a,b,c){this.parent=a,this.element=b,this.config=c,this.config.noTextarea||this._observeViewChange()},_observeViewChange:function(){var a=this;this.parent.on("beforeload",function(){a.parent.on("change_view",function(b){b===a.name?(a.parent.currentView=a,a.show(),setTimeout(function(){a.focus()},0)):a.hide()})})},focus:function(){if(!this.element||!this.element.ownerDocument||this.element.ownerDocument.querySelector(":focus")!==this.element)try{this.element&&this.element.focus()}catch(a){}},hide:function(){this.element.style.display="none"},show:function(){this.element.style.display=""},disable:function(){this.element.setAttribute("disabled","disabled")},enable:function(){this.element.removeAttribute("disabled")}}),function(a){var b=a.dom,c=a.browser;a.views.Composer=a.views.View.extend({name:"composer",CARET_HACK:"
",constructor:function(a,b,c){this.base(a,b,c),this.config.noTextarea?this.editableArea=b:this.textarea=this.parent.textarea,this.config.contentEditableMode?this._initContentEditableArea():this._initSandbox()},clear:function(){this.element.innerHTML=c.displaysCaretInEmptyContentEditableCorrectly()?"":this.CARET_HACK},getValue:function(b,c){var d=this.isEmpty()?"":a.quirks.getCorrectInnerHTML(this.element);return b!==!1&&(d=this.parent.parse(d,c===!1?!1:!0)),d},setValue:function(a,b){b&&(a=this.parent.parse(a));try{this.element.innerHTML=a}catch(c){this.element.innerText=a}},cleanUp:function(){var a;this.selection&&(a=rangy.saveSelection(this.win)),this.parent.parse(this.element),a&&rangy.restoreSelection(a)},show:function(){this.editableArea.style.display=this._displayStyle||"",this.config.noTextarea||this.textarea.element.disabled||(this.disable(),this.enable())},hide:function(){this._displayStyle=b.getStyle("display").from(this.editableArea),"none"===this._displayStyle&&(this._displayStyle=null),this.editableArea.style.display="none"},disable:function(){this.parent.fire("disable:composer"),this.element.removeAttribute("contentEditable")},enable:function(){this.parent.fire("enable:composer"),this.element.setAttribute("contentEditable","true")},focus:function(b){a.browser.doesAsyncFocus()&&this.hasPlaceholderSet()&&this.clear(),this.base();var c=this.element.lastChild;b&&c&&this.selection&&("BR"===c.nodeName?this.selection.setBefore(this.element.lastChild):this.selection.setAfter(this.element.lastChild))},getScrollPos:function(){if(this.doc&&this.win){var a={};return"undefined"!=typeof this.win.pageYOffset?a.y=this.win.pageYOffset:a.y=(this.doc.documentElement||this.doc.body.parentNode||this.doc.body).scrollTop,"undefined"!=typeof this.win.pageXOffset?a.x=this.win.pageXOffset:a.x=(this.doc.documentElement||this.doc.body.parentNode||this.doc.body).scrollLeft,a}},setScrollPos:function(a){a&&"undefined"!=typeof a.x&&"undefined"!=typeof a.y&&this.win.scrollTo(a.x,a.y)},getTextContent:function(){return b.getTextContent(this.element)},hasPlaceholderSet:function(){return this.getTextContent()==(this.config.noTextarea?this.editableArea.getAttribute("data-placeholder"):this.textarea.element.getAttribute("placeholder"))&&this.placeholderSet},isEmpty:function(){var a=this.element.innerHTML.toLowerCase();return/^(\s|
|<\/br>||<\/p>)*$/i.test(a)||""===a||"
"===a||"
"===a||"
"===a||this.hasPlaceholderSet()},_initContentEditableArea:function(){var a=this;this.config.noTextarea?this.sandbox=new b.ContentEditableArea(function(){a._create()},{className:this.config.classNames.sandbox},this.editableArea):(this.sandbox=new b.ContentEditableArea(function(){a._create()},{className:this.config.classNames.sandbox}),this.editableArea=this.sandbox.getContentEditable(),b.insert(this.editableArea).after(this.textarea.element),this._createWysiwygFormField())},_initSandbox:function(){var a=this;this.sandbox=new b.Sandbox(function(){a._create()},{stylesheets:this.config.stylesheets,className:this.config.classNames.sandbox}),this.editableArea=this.sandbox.getIframe();var c=this.textarea.element;b.insert(this.editableArea).after(c),this._createWysiwygFormField()},_createWysiwygFormField:function(){if(this.textarea.element.form){var a=document.createElement("input");a.type="hidden",a.name="_wysihtml5_mode",a.value=1,b.insert(a).after(this.textarea.element)}},_create:function(){var d=this;this.doc=this.sandbox.getDocument(),this.win=this.sandbox.getWindow(),this.element=this.config.contentEditableMode?this.sandbox.getContentEditable():this.doc.body,this.config.noTextarea?this.cleanUp():(this.textarea=this.parent.textarea,this.element.innerHTML=this.textarea.getValue(!0,!1)),this.selection=new a.Selection(this.parent,this.element,this.config.classNames.uneditableContainer),this.commands=new a.Commands(this.parent),this.config.noTextarea||b.copyAttributes(["className","spellcheck","title","lang","dir","accessKey"]).from(this.textarea.element).to(this.element),b.addClass(this.element,this.config.classNames.composer),this.config.style&&!this.config.contentEditableMode&&this.style(),this.observe();var e=this.config.name;e&&(b.addClass(this.element,e),this.config.contentEditableMode||b.addClass(this.editableArea,e)),this.enable(),!this.config.noTextarea&&this.textarea.element.disabled&&this.disable();var f="string"==typeof this.config.placeholder?this.config.placeholder:this.config.noTextarea?this.editableArea.getAttribute("data-placeholder"):this.textarea.element.getAttribute("placeholder");f&&b.simulatePlaceholder(this.parent,this,f,this.config.classNames.placeholder),this.commands.exec("styleWithCSS",!1),this._initAutoLinking(),this._initObjectResizing(),this._initUndoManager(),this._initLineBreaking(),this.config.noTextarea||!this.textarea.element.hasAttribute("autofocus")&&document.querySelector(":focus")!=this.textarea.element||c.isIos()||setTimeout(function(){d.focus(!0)},100),c.clearsContentEditableCorrectly()||a.quirks.ensureProperClearing(this),this.initSync&&this.config.sync&&this.initSync(),this.config.noTextarea||this.textarea.hide(),this.parent.fire("beforeload").fire("load")},_initAutoLinking:function(){var d=this,e=c.canDisableAutoLinking(),f=c.doesAutoLinkingInContentEditable();if(e&&this.commands.exec("autoUrlDetect",!1),this.config.autoLink){(!f||f&&e)&&(this.parent.on("newword:composer",function(){if(b.getTextContent(d.element).match(b.autoLink.URL_REG_EXP)){for(var c=d.selection.getSelectedNode(),e=d.element.querySelectorAll("."+d.config.classNames.uneditableContainer),f=!1,g=e.length;g--;)a.dom.contains(e[g],c)&&(f=!0);f||b.autoLink(c,[d.config.classNames.uneditableContainer])}}),b.observe(this.element,"blur",function(){b.autoLink(d.element,[d.config.classNames.uneditableContainer])}));var g=this.sandbox.getDocument().getElementsByTagName("a"),h=b.autoLink.URL_REG_EXP,i=function(c){var d=a.lang.string(b.getTextContent(c)).trim();return"www."===d.substr(0,4)&&(d="http://"+d),d};b.observe(this.element,"keydown",function(a){if(g.length){var c,e=d.selection.getSelectedNode(a.target.ownerDocument),f=b.getParentElement(e,{query:"a"},4);f&&(c=i(f),setTimeout(function(){var a=i(f);a!==c&&a.match(h)&&f.setAttribute("href",a)},0))}})}},_initObjectResizing:function(){if(this.commands.exec("enableObjectResizing",!0),c.supportsEvent("resizeend")){var d=["width","height"],e=d.length,f=this.element;b.observe(f,"resizeend",function(b){var c,g=b.target||b.srcElement,h=g.style,i=0;if("IMG"===g.nodeName){for(;e>i;i++)c=d[i],h[c]&&(g.setAttribute(c,parseInt(h[c],10)),h[c]="");a.quirks.redraw(f)}})}},_initUndoManager:function(){this.undoManager=new a.UndoManager(this.parent)},_initLineBreaking:function(){function d(a){var c=b.getParentElement(a,{query:"p, div"},2);c&&b.contains(e.element,c)&&e.selection.executeAndRestore(function(){e.config.useLineBreaks?b.replaceWithChildNodes(c):"P"!==c.nodeName&&b.renameElement(c,"p")})}var e=this,f="li, p, h1, h2, h3, h4, h5, h6",g="ul, ol, menu";this.config.useLineBreaks||b.observe(this.element,["focus","keydown"],function(){if(e.isEmpty()){var a=e.doc.createElement("P");e.element.innerHTML="",e.element.appendChild(a),c.displaysCaretInEmptyContentEditableCorrectly()?e.selection.selectNode(a,!0):(a.innerHTML="
",e.selection.setBefore(a.firstChild))}}),b.observe(this.element,"keydown",function(c){var h=c.keyCode;if(!c.shiftKey&&(h===a.ENTER_KEY||h===a.BACKSPACE_KEY)){var i=b.getParentElement(e.selection.getSelectedNode(),{query:f},4);return i?void setTimeout(function(){var c,f=e.selection.getSelectedNode();if("LI"===i.nodeName){if(!f)return;c=b.getParentElement(f,{query:g},2),c||d(f)}h===a.ENTER_KEY&&i.nodeName.match(/^H[1-6]$/)&&d(f)},0):void(e.config.useLineBreaks&&h===a.ENTER_KEY&&!a.browser.insertsLineBreaksOnReturn()&&(c.preventDefault(),e.commands.exec("insertLineBreak")))}})}})}(wysihtml5),function(a){var b=a.dom,c=document,d=window,e=c.createElement("div"),f=["background-color","color","cursor","font-family","font-size","font-style","font-variant","font-weight","line-height","letter-spacing","text-align","text-decoration","text-indent","text-rendering","word-break","word-wrap","word-spacing"],g=["background-color","border-collapse","border-bottom-color","border-bottom-style","border-bottom-width","border-left-color","border-left-style","border-left-width","border-right-color","border-right-style","border-right-width","border-top-color","border-top-style","border-top-width","clear","display","float","margin-bottom","margin-left","margin-right","margin-top","outline-color","outline-offset","outline-width","outline-style","padding-left","padding-right","padding-top","padding-bottom","position","top","left","right","bottom","z-index","vertical-align","text-align","-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing","-webkit-box-shadow","-moz-box-shadow","-ms-box-shadow","box-shadow","-webkit-border-top-right-radius","-moz-border-radius-topright","border-top-right-radius","-webkit-border-bottom-right-radius","-moz-border-radius-bottomright","border-bottom-right-radius","-webkit-border-bottom-left-radius","-moz-border-radius-bottomleft","border-bottom-left-radius","-webkit-border-top-left-radius","-moz-border-radius-topleft","border-top-left-radius","width","height"],h=["html { height: 100%; }","body { height: 100%; padding: 1px 0 0 0; margin: -1px 0 0 0; }","body > p:first-child { margin-top: 0; }","._wysihtml5-temp { display: none; }",a.browser.isGecko?"body.placeholder { color: graytext !important; }":"body.placeholder { color: #a9a9a9 !important; }","img:-moz-broken { -moz-force-broken-image-icon: 1; height: 24px; width: 24px; }"],i=function(a){if(a.setActive)try{a.setActive()}catch(e){}else{var f=a.style,g=c.documentElement.scrollTop||c.body.scrollTop,h=c.documentElement.scrollLeft||c.body.scrollLeft,i={position:f.position,top:f.top,left:f.left,WebkitUserSelect:f.WebkitUserSelect};b.setStyles({position:"absolute",top:"-99999px",left:"-99999px",WebkitUserSelect:"none"}).on(a),a.focus(),b.setStyles(i).on(a),d.scrollTo&&d.scrollTo(h,g)}};a.views.Composer.prototype.style=function(){var d,j=this,k=c.querySelector(":focus"),l=this.textarea.element,m=l.hasAttribute("placeholder"),n=m&&l.getAttribute("placeholder"),o=l.style.display,p=l.disabled;this.focusStylesHost=e.cloneNode(!1),this.blurStylesHost=e.cloneNode(!1),this.disabledStylesHost=e.cloneNode(!1),m&&l.removeAttribute("placeholder"),l===k&&l.blur(),l.disabled=!1,l.style.display=d="none",(l.getAttribute("rows")&&"auto"===b.getStyle("height").from(l)||l.getAttribute("cols")&&"auto"===b.getStyle("width").from(l))&&(l.style.display=d=o),b.copyStyles(g).from(l).to(this.editableArea).andTo(this.blurStylesHost),b.copyStyles(f).from(l).to(this.element).andTo(this.blurStylesHost),b.insertCSS(h).into(this.element.ownerDocument),l.disabled=!0,b.copyStyles(g).from(l).to(this.disabledStylesHost),b.copyStyles(f).from(l).to(this.disabledStylesHost),l.disabled=p,l.style.display=o,i(l),l.style.display=d,b.copyStyles(g).from(l).to(this.focusStylesHost),b.copyStyles(f).from(l).to(this.focusStylesHost),l.style.display=o,b.copyStyles(["display"]).from(l).to(this.editableArea);var q=a.lang.array(g).without(["display"]);return k?k.focus():l.blur(),m&&l.setAttribute("placeholder",n),this.parent.on("focus:composer",function(){b.copyStyles(q).from(j.focusStylesHost).to(j.editableArea),b.copyStyles(f).from(j.focusStylesHost).to(j.element)}),this.parent.on("blur:composer",function(){b.copyStyles(q).from(j.blurStylesHost).to(j.editableArea),b.copyStyles(f).from(j.blurStylesHost).to(j.element)}),this.parent.observe("disable:composer",function(){b.copyStyles(q).from(j.disabledStylesHost).to(j.editableArea),b.copyStyles(f).from(j.disabledStylesHost).to(j.element)}),this.parent.observe("enable:composer",function(){b.copyStyles(q).from(j.blurStylesHost).to(j.editableArea),b.copyStyles(f).from(j.blurStylesHost).to(j.element)}),this}}(wysihtml5),function(a){var b=a.dom,c=a.browser,d={66:"bold",73:"italic",85:"underline"},e=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.addEventListener(b[d],c,!1)},f=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.removeEventListener(b[d],c,!1)},g=function(b,c){if(b.selection.caretIsLastInSelection()){var d=b.selection.getSelection(),e=d.anchorNode;if(e&&1===e.nodeType&&(a.dom.getParentElement(e,{query:"td, th"},!1,b.element)||c)){var f=e.childNodes[d.anchorOffset];if(f&&1===f.nodeType&"BR"===f.nodeName)return f.parentNode.removeChild(f),!0}}return!1},h=function(a){var b=a.selection.getBeforeSelection(!0);if(b&&("element"===b.type||"leafnode"===b.type)&&1===b.node.nodeType&&b.node.classList.contains(a.config.classNames.uneditableContainer)){if(g(a,!0))return!0;try{var c=new CustomEvent("wysihtml5:uneditable:delete");b.node.dispatchEvent(c)}catch(d){}return b.node.parentNode.removeChild(b.node),!0}return!1},i=function(b){var c=b.selection,d=c.getPreviousNode();if(c.caretIsFirstInSelection()&&d&&1===d.nodeType&&/block/.test(b.win.getComputedStyle(d).display)){if(/^\s*$/.test(d.textContent||d.innerText))return d.parentNode.removeChild(d),!0;if(d.lastChild){var e=d.lastChild,f=c.getSelectedNode(),g=a.dom.domNode(d).commonAncestor(f,b.element);if(curNode=g?a.dom.getParentElement(f,{query:"h1, h2, h3, h4, h5, h6, p, pre, div, blockquote"},!1,g):null,curNode){for(;curNode.firstChild;)d.appendChild(curNode.firstChild);return c.setAfter(e),!0}if(3===f.nodeType)return d.appendChild(f),c.setAfter(e),!0}}return!1},j=function(a,b){var c=b.selection;b.element;if(c.isCollapsed()){if(i(b))return void a.preventDefault();if(g(b))return void a.preventDefault();if(h(b))return void a.preventDefault()}else c.containsUneditable()&&(a.preventDefault(),c.deleteContents())},k=function(a,b,c){if(a.selection.isCollapsed()){if(a.selection.caretIsInTheBeginnig("li"))if(c){if(a.commands.exec("outdentList"))return}else if(a.commands.exec("indentList"))return}else a.selection.deleteContents();a.commands.exec("insertHTML"," ")},l=function(a){this.domNodeRemovedInterval&&clearInterval(domNodeRemovedInterval),this.parent.fire("destroy:composer")},m=function(a){this.parent.fire("beforeinteraction",a).fire("beforeinteraction:composer",a),setTimeout(function(){this.parent.fire("interaction",a).fire("interaction:composer",a)}.bind(this),0)},n=function(a){this.parent.fire("focus",a).fire("focus:composer",a),setTimeout(function(){this.focusState=this.getValue(!1,!1)}.bind(this),0)},o=function(a){if(this.focusState!==this.getValue(!1,!1)){var b=a;"function"==typeof Object.create&&(b=Object.create(a,{type:{value:"change"}})),this.parent.fire("change",b).fire("change:composer",b)}this.parent.fire("blur",a).fire("blur:composer",a)},p=function(a){this.parent.fire(a.type,a).fire(a.type+":composer",a),"paste"===a.type&&setTimeout(function(){this.parent.fire("newword:composer")}.bind(this),0)},q=function(a){this.config.copyedFromMarking&&(a.clipboardData&&(a.clipboardData.setData("text/html",this.config.copyedFromMarking+this.selection.getHtml()),a.clipboardData.setData("text/plain",this.selection.getPlainText()),a.preventDefault()),this.parent.fire(a.type,a).fire(a.type+":composer",a))},r=function(b){var c=b.keyCode;(c===a.SPACE_KEY||c===a.ENTER_KEY)&&this.parent.fire("newword:composer")},s=function(b){if(!c.canSelectImagesInContentEditable()){var d=b.target,e=this.element.querySelectorAll("img"),f=this.element.querySelectorAll("."+this.config.classNames.uneditableContainer+" img"),g=a.lang.array(e).without(f);"IMG"===d.nodeName&&a.lang.array(g).contains(d)&&this.selection.selectNode(d)}},t=function(a){var b,c={IMG:"Image: ",A:"Link: "},d=a.target,e=d.nodeName;("A"===e||"IMG"===e)&&(d.hasAttribute("title")||(b=c[e]+(d.getAttribute("href")||d.getAttribute("src")),d.setAttribute("title",b)))},u=function(b){if(this.config.classNames.uneditableContainer){var c=a.dom.getParentElement(b.target,{query:"."+this.config.classNames.uneditableContainer},!1,this.element);c&&this.selection.setAfter(c)}},v=function(a){c.canSelectImagesInContentEditable()||setTimeout(function(){this.selection.getSelection().removeAllRanges()}.bind(this),0)},w=function(b){var c,e,f=b.keyCode,g=d[f];return(b.ctrlKey||b.metaKey)&&65===f?(this.selection.selectAll(),void b.preventDefault()):((b.ctrlKey||b.metaKey)&&!b.altKey&&g&&(this.commands.exec(g),b.preventDefault()),f===a.BACKSPACE_KEY&&j(b,this),(f===a.BACKSPACE_KEY||f===a.DELETE_KEY)&&(c=this.selection.getSelectedNode(!0),c&&"IMG"===c.nodeName&&(b.preventDefault(),e=c.parentNode,e.removeChild(c),"A"!==e.nodeName||e.firstChild||e.parentNode.removeChild(e),setTimeout(function(){a.quirks.redraw(this.element)}.bind(this),0))),void(this.config.handleTabKey&&f===a.TAB_KEY&&(b.preventDefault(),k(this,this.element,b.shiftKey))))},x=function(){var b=function(){this.doc.execCommand("enableObjectResizing",!1,"false"),this.doc.execCommand("enableInlineTableEditing",!1,"false")},c=function(){b.call(this),f(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c)}.bind(this);this.doc.execCommand&&a.browser.supportsCommand(this.doc,"enableObjectResizing")&&a.browser.supportsCommand(this.doc,"enableInlineTableEditing")&&(this.sandbox.getIframe?e(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c):setTimeout(function(){
-b.call(this)}.bind(this),0)),this.tableSelection=a.quirks.tableCellsSelection(this.element,this.parent)};a.views.Composer.prototype.observe=function(){var a=this.sandbox.getIframe?this.sandbox.getIframe():this.sandbox.getContentEditable(),d=(this.element,c.supportsEventsInIframeCorrectly()||this.sandbox.getContentEditable?this.element:this.sandbox.getWindow());this.focusState=this.getValue(!1,!1),a.addEventListener(["DOMNodeRemoved"],l.bind(this),!1),c.supportsMutationEvents()||(this.domNodeRemovedInterval=setInterval(function(){b.contains(document.documentElement,a)||l.call(this)},250)),this.config.handleTables&&x.call(this),e(d,["drop","paste","mouseup","focus","keyup"],m.bind(this)),d.addEventListener("focus",n.bind(this),!1),d.addEventListener("blur",o.bind(this),!1),e(this.element,["drop","paste","beforepaste"],p.bind(this),!1),this.element.addEventListener("copy",q.bind(this),!1),this.element.addEventListener("mousedown",s.bind(this),!1),this.element.addEventListener("mouseover",t.bind(this),!1),this.element.addEventListener("click",u.bind(this),!1),this.element.addEventListener("drop",v.bind(this),!1),this.element.addEventListener("keyup",r.bind(this),!1),this.element.addEventListener("keydown",w.bind(this),!1),this.element.addEventListener("dragenter",function(){this.parent.fire("unset_placeholder")}.bind(this),!1)}}(wysihtml5),function(a){var b=400;a.views.Synchronizer=Base.extend({constructor:function(a,b,c){this.editor=a,this.textarea=b,this.composer=c,this._observe()},fromComposerToTextarea:function(b){this.textarea.setValue(a.lang.string(this.composer.getValue(!1,!1)).trim(),b)},fromTextareaToComposer:function(a){var b=this.textarea.getValue(!1,!1);b?this.composer.setValue(b,a):(this.composer.clear(),this.editor.fire("set_placeholder"))},sync:function(a){"textarea"===this.editor.currentView.name?this.fromTextareaToComposer(a):this.fromComposerToTextarea(a)},_observe:function(){var c,d=this,e=this.textarea.element.form,f=function(){c=setInterval(function(){d.fromComposerToTextarea()},b)},g=function(){clearInterval(c),c=null};f(),e&&(a.dom.observe(e,"submit",function(){d.sync(!0)}),a.dom.observe(e,"reset",function(){setTimeout(function(){d.fromTextareaToComposer()},0)})),this.editor.on("change_view",function(a){"composer"!==a||c?"textarea"===a&&(d.fromComposerToTextarea(!0),g()):(d.fromTextareaToComposer(!0),f())}),this.editor.on("destroy:composer",g)}})}(wysihtml5),function(a){a.views.SourceView=Base.extend({constructor:function(a,b){this.editor=a,this.composer=b,this._observe()},switchToTextarea:function(a){var b=this.composer.win.getComputedStyle(this.composer.element),c=parseFloat(b.width),d=Math.max(parseFloat(b.height),100);this.textarea||(this.textarea=this.composer.doc.createElement("textarea"),this.textarea.className="wysihtml5-source-view"),this.textarea.style.width=c+"px",this.textarea.style.height=d+"px",this.textarea.value=this.editor.getValue(a,!0),this.composer.element.parentNode.insertBefore(this.textarea,this.composer.element),this.editor.currentView="source",this.composer.element.style.display="none"},switchToComposer:function(a){var b=this.textarea.value;b?this.composer.setValue(b,a):(this.composer.clear(),this.editor.fire("set_placeholder")),this.textarea.parentNode.removeChild(this.textarea),this.editor.currentView=this.composer,this.composer.element.style.display=""},_observe:function(){this.editor.on("change_view",function(a){"composer"===a?this.switchToComposer(!0):"textarea"===a&&this.switchToTextarea(!0)}.bind(this))}})}(wysihtml5),wysihtml5.views.Textarea=wysihtml5.views.View.extend({name:"textarea",constructor:function(a,b,c){this.base(a,b,c),this._observe()},clear:function(){this.element.value=""},getValue:function(a){var b=this.isEmpty()?"":this.element.value;return a!==!1&&(b=this.parent.parse(b)),b},setValue:function(a,b){b&&(a=this.parent.parse(a)),this.element.value=a},cleanUp:function(){var a=this.parent.parse(this.element.value);this.element.value=a},hasPlaceholderSet:function(){var a=wysihtml5.browser.supportsPlaceholderAttributeOn(this.element),b=this.element.getAttribute("placeholder")||null,c=this.element.value,d=!c;return a&&d||c===b},isEmpty:function(){return!wysihtml5.lang.string(this.element.value).trim()||this.hasPlaceholderSet()},_observe:function(){var a=this.element,b=this.parent,c={focusin:"focus",focusout:"blur"},d=wysihtml5.browser.supportsEvent("focusin")?["focusin","focusout","change"]:["focus","blur","change"];b.on("beforeload",function(){wysihtml5.dom.observe(a,d,function(a){var d=c[a.type]||a.type;b.fire(d).fire(d+":textarea")}),wysihtml5.dom.observe(a,["paste","drop"],function(){setTimeout(function(){b.fire("paste").fire("paste:textarea")},0)})})}}),function(a){var b,c={name:b,style:!0,toolbar:b,showToolbarAfterInit:!0,showToolbarDialogsOnSelection:!0,autoLink:!0,handleTables:!0,handleTabKey:!0,parserRules:{tags:{br:{},span:{},div:{},p:{}},classes:{}},pasteParserRulesets:null,parser:a.dom.parse,useLineBreaks:!0,stylesheets:[],placeholderText:b,supportTouchDevices:!0,cleanUp:!0,contentEditableMode:!1,classNames:{composer:"wysihtml5-editor",body:"wysihtml5-supported",sandbox:"wysihtml5-sandbox",placeholder:"wysihtml5-placeholder",uneditableContainer:"wysihtml5-uneditable-container"},copyedFromMarking:''};a.Editor=a.lang.Dispatcher.extend({constructor:function(b,d){if(this.editableElement="string"==typeof b?document.getElementById(b):b,this.config=a.lang.object({}).merge(c).merge(d).get(),this._isCompatible=a.browser.supported(),d&&d.classNames&&a.lang.object(this.config.classNames).merge(d.classNames),"textarea"!=this.editableElement.nodeName.toLowerCase()&&(this.config.contentEditableMode=!0,this.config.noTextarea=!0),this.config.noTextarea||(this.textarea=new a.views.Textarea(this,this.editableElement,this.config),this.currentView=this.textarea),!this._isCompatible||!this.config.supportTouchDevices&&a.browser.isTouchDevice()){var e=this;return void setTimeout(function(){e.fire("beforeload").fire("load")},0)}a.dom.addClass(document.body,this.config.classNames.body),this.composer=new a.views.Composer(this,this.editableElement,this.config),this.currentView=this.composer,"function"==typeof this.config.parser&&this._initParser(),this.on("beforeload",this.handleBeforeLoad)},handleBeforeLoad:function(){this.config.noTextarea?this.sourceView=new a.views.SourceView(this,this.composer):this.synchronizer=new a.views.Synchronizer(this,this.textarea,this.composer),this.config.toolbar&&(this.toolbar=new a.toolbar.Toolbar(this,this.config.toolbar,this.config.showToolbarAfterInit))},isCompatible:function(){return this._isCompatible},clear:function(){return this.currentView.clear(),this},getValue:function(a,b){return this.currentView.getValue(a,b)},setValue:function(a,b){return this.fire("unset_placeholder"),a?(this.currentView.setValue(a,b),this):this.clear()},cleanUp:function(){this.currentView.cleanUp()},focus:function(a){return this.currentView.focus(a),this},disable:function(){return this.currentView.disable(),this},enable:function(){return this.currentView.enable(),this},isEmpty:function(){return this.currentView.isEmpty()},hasPlaceholderSet:function(){return this.currentView.hasPlaceholderSet()},parse:function(b,c){var d=this.config.contentEditableMode?document:this.composer?this.composer.sandbox.getDocument():null,e=this.config.parser(b,{rules:this.config.parserRules,cleanUp:this.config.cleanUp,context:d,uneditableClass:this.config.classNames.uneditableContainer,clearInternals:c});return"object"==typeof b&&a.quirks.redraw(b),e},_initParser:function(){var b;a.browser.supportsModernPaste()?this.on("paste:composer",function(c){c.preventDefault(),b=a.dom.getPastedHtml(c),b&&this._cleanAndPaste(b)}.bind(this)):this.on("beforepaste:composer",function(b){b.preventDefault();var c=this.composer.getScrollPos();a.dom.getPastedHtmlWithDiv(this.composer,function(a){a&&this._cleanAndPaste(a),this.composer.setScrollPos(c)}.bind(this))}.bind(this))},_cleanAndPaste:function(b){var c=a.quirks.cleanPastedHTML(b,{referenceNode:this.composer.element,rules:this.config.pasteParserRulesets||[{set:this.config.parserRules}],uneditableClass:this.config.classNames.uneditableContainer});this.composer.selection.deleteContents(),this.composer.selection.insertHTML(c)}})}(wysihtml5);
+var wysihtml5={version:"0.5.0-beta13",commands:{},dom:{},quirks:{},toolbar:{},lang:{},selection:{},views:{},INVISIBLE_SPACE:"\ufeff",INVISIBLE_SPACE_REG_EXP:/\uFEFF/g,EMPTY_FUNCTION:function(){},ELEMENT_NODE:1,TEXT_NODE:3,BACKSPACE_KEY:8,ENTER_KEY:13,ESCAPE_KEY:27,SPACE_KEY:32,TAB_KEY:9,DELETE_KEY:46};wysihtml5.polyfills=function(a,b){String.prototype.trim||!function(){var a=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;String.prototype.trim=function(){return this.replace(a,"")}}(),function(){var c="addEventListener",d="removeEventListener";b[c]||(a.Element.prototype[c]=a[c]=b[c]=function(b,c,d){return(d=this).attachEvent("on"+b,function(b){var b=b||a.event;b.target=b.target||b.srcElement,b.preventDefault=b.preventDefault||function(){b.returnValue=!1},b.stopPropagation=b.stopPropagation||function(){b.cancelBubble=!0},b.which=b.button?2===b.button?3:4===b.button?2:b.button:b.keyCode,c.call(d,b)})},a.Element.prototype[d]=a[d]=b[d]=function(a,b){return this.detachEvent("on"+a,b)})}(),Object.defineProperty&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(a.Element.prototype,"textContent")&&!Object.getOwnPropertyDescriptor(a.Element.prototype,"textContent").get&&!function(){var b=Object.getOwnPropertyDescriptor(a.Element.prototype,"innerText");Object.defineProperty(a.Element.prototype,"textContent",{get:function(){return b.get.call(this)},set:function(a){return b.set.call(this,a)}})}(),Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){for(var c=this.length,d=-1,e=b>>>0;~(c-e);d=this[--c]===a?c:d);return d}),Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice.call(arguments,1),c=this,d=function(){},e=function(){return c.apply(this instanceof d&&a?this:a,b.concat(Array.prototype.slice.call(arguments)))};return d.prototype=this.prototype,e.prototype=new d,e}),a.Element&&function(a){a.matches=a.matches||a.matchesSelector||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector||function(a){for(var b=this,c=(b.parentNode||b.document).querySelectorAll(a),d=-1;c[++d]&&c[d]!=b;);return!!c[d]}}(a.Element.prototype),"document"in a&&("classList"in b.createElement("_")?"DOMTokenList"in a&&!function(){"use strict";var c=b.createElement("_");if(c.classList.add("c1","c2"),!c.classList.contains("c2")){var d=function(b){var c=a.DOMTokenList.prototype[b];a.DOMTokenList.prototype[b]=function(a){var b,d=arguments.length;for(b=0;d>b;b++)a=arguments[b],c.call(this,a)}};d("add"),d("remove")}if(c.classList.toggle("c3",!1),c.classList.contains("c3")){var e=a.DOMTokenList.prototype.toggle;a.DOMTokenList.prototype.toggle=function(a,b){return 1 in arguments&&!this.contains(a)==!b?b:e.call(this,a)}}c=null}():!function(a){"use strict";if("Element"in a){var b="classList",c="prototype",d=a.Element[c],e=Object,f=String[c].trim||function(){return this.replace(/^\s+|\s+$/g,"")},g=Array[c].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1},h=function(a,b){this.name=a,this.code=DOMException[a],this.message=b},i=function(a,b){if(""===b)throw new h("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(b))throw new h("INVALID_CHARACTER_ERR","String contains an invalid character");return g.call(a,b)},j=function(a){for(var b=f.call(a.getAttribute("class")||""),c=b?b.split(/\s+/):[],d=0,e=c.length;e>d;d++)this.push(c[d]);this._updateClassName=function(){a.setAttribute("class",this.toString())}},k=j[c]=[],l=function(){return new j(this)};if(h[c]=Error[c],k.item=function(a){return this[a]||null},k.contains=function(a){return a+="",-1!==i(this,a)},k.add=function(){var a,b=arguments,c=0,d=b.length,e=!1;do a=b[c]+"",-1===i(this,a)&&(this.push(a),e=!0);while(++c0?c.childNodes[e]:void 0,g=b.focusNode,h=b.focusOffset,i=g&&1===g.nodeType&&h>0?g.childNodes[h-1]:void 0,j=this.ownerDocument.createRange(),k=a.shift(),l=k?a.shift():null;for((c===g&&e>h||c!==g&&c.compareDocumentPosition(g)&Node.DOCUMENT_POSITION_PRECEDING&&!(c.compareDocumentPosition(g)&Node.DOCUMENT_POSITION_CONTAINS))&&(g=[c,c=g][0],h=[e,e=h][0]);k&&l;)l.previousSibling&&l.previousSibling===k?(c===l&&(c=k,e=k.nodeValue.length+e),g===l&&(g=k,h=k.nodeValue.length+h),k.nodeValue=k.nodeValue+l.nodeValue,l.parentNode.removeChild(l),l=a.shift()):(k=l,l=a.shift());i&&(h=Array.prototype.indexOf.call(i.parentNode.childNodes,i)+1),f&&(e=Array.prototype.indexOf.call(f.parentNode.childNodes,f)),c&&c.parentNode&&g&&g.parentNode&&(j.setStart(c,e),j.setEnd(g,h),b.removeAllRanges(),b.addRange(j))});Node.prototype.normalize=a};"Node"in window&&"normalize"in Node.prototype&&c()&&e()},wysihtml5.polyfills(window,document),function(a,b){"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a():b.rangy=a()}(function(){function a(a,b){var c=typeof a[b];return c==u||!(c!=t||!a[b])||"unknown"==c}function b(a,b){return!(typeof a[b]!=t||!a[b])}function c(a,b){return typeof a[b]!=v}function d(a){return function(b,c){for(var d=c.length;d--;)if(!a(b,c[d]))return!1;return!0}}function e(a){return a&&A(a,z)&&C(a,y)}function f(a){return b(a,"body")?a.body:a.getElementsByTagName("body")[0]}function g(b){typeof console!=v&&a(console,"log")&&console.log(b)}function h(a,b){F&&b?alert(a):g(a)}function i(a){H.initialized=!0,H.supported=!1,h("Rangy is not supported in this environment. Reason: "+a,H.config.alertOnFail)}function j(a){h("Rangy warning: "+a,H.config.alertOnWarn)}function k(a){return a.message||a.description||String(a)}function l(){if(F&&!H.initialized){var b,c=!1,d=!1;a(document,"createRange")&&(b=document.createRange(),A(b,x)&&C(b,w)&&(c=!0));var h=f(document);if(!h||"body"!=h.nodeName.toLowerCase())return void i("No body element found");if(h&&a(h,"createTextRange")&&(b=h.createTextRange(),e(b)&&(d=!0)),!c&&!d)return void i("Neither Range nor TextRange are available");H.initialized=!0,H.features={implementsDomRange:c,implementsTextRange:d};var j,l;for(var m in E)(j=E[m])instanceof p&&j.init(j,H);for(var n=0,o=K.length;o>n;++n)try{K[n](H)}catch(q){l="Rangy init listener threw an exception. Continuing. Detail: "+k(q),g(l)}}}function m(a,b,c){c&&(a+=" in module "+c.name),H.warn("DEPRECATED: "+a+" is deprecated. Please use "+b+" instead.")}function n(a,b,c,d){a[b]=function(){return m(b,c,d),a[c].apply(a,G.toArray(arguments))}}function o(a){a=a||window,l();for(var b=0,c=L.length;c>b;++b)L[b](a)}function p(a,b,c){this.name=a,this.dependencies=b,this.initialized=!1,this.supported=!1,this.initializer=c}function q(a,b,c){var d=new p(a,b,function(b){if(!b.initialized){b.initialized=!0;try{c(H,b),b.supported=!0}catch(d){var e="Module '"+a+"' failed to load: "+k(d);g(e),d.stack&&g(d.stack)}}});return E[a]=d,d}function r(){}function s(){}var t="object",u="function",v="undefined",w=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],x=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],y=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],z=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"],A=d(a),B=d(b),C=d(c),D=[].forEach?function(a,b){a.forEach(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)b(a[c],c)},E={},F=typeof window!=v&&typeof document!=v,G={isHostMethod:a,isHostObject:b,isHostProperty:c,areHostMethods:A,areHostObjects:B,areHostProperties:C,isTextRange:e,getBody:f,forEach:D},H={version:"1.3.0",initialized:!1,isBrowser:F,supported:!0,util:G,features:{},modules:E,config:{alertOnFail:!1,alertOnWarn:!1,preferTextRange:!1,autoInitialize:typeof rangyAutoInitialize==v?!0:rangyAutoInitialize}};H.fail=i,H.warn=j;var I;({}).hasOwnProperty?(G.extend=I=function(a,b,c){var d,e;for(var f in b)b.hasOwnProperty(f)&&(d=a[f],e=b[f],c&&null!==d&&"object"==typeof d&&null!==e&&"object"==typeof e&&I(d,e,!0),a[f]=e);return b.hasOwnProperty("toString")&&(a.toString=b.toString),a},G.createOptions=function(a,b){var c={};return I(c,b),a&&I(c,a),c}):i("hasOwnProperty not supported"),F||i("Rangy can only run in a browser"),function(){var a;if(F){var b=document.createElement("div");b.appendChild(document.createElement("span"));var c=[].slice;try{1==c.call(b.childNodes,0)[0].nodeType&&(a=function(a){return c.call(a,0)})}catch(d){}}a||(a=function(a){for(var b=[],c=0,d=a.length;d>c;++c)b[c]=a[c];return b}),G.toArray=a}();var J;F&&(a(document,"addEventListener")?J=function(a,b,c){a.addEventListener(b,c,!1)}:a(document,"attachEvent")?J=function(a,b,c){a.attachEvent("on"+b,c)}:i("Document does not have required addEventListener or attachEvent method"),G.addListener=J);var K=[];G.deprecationNotice=m,G.createAliasForDeprecatedMethod=n,H.init=l,H.addInitListener=function(a){H.initialized?a(H):K.push(a)};var L=[];H.addShimListener=function(a){L.push(a)},F&&(H.shim=H.createMissingNativeApi=o,n(H,"createMissingNativeApi","shim")),p.prototype={init:function(){for(var a,b,c=this.dependencies||[],d=0,e=c.length;e>d;++d){if(b=c[d],a=E[b],!(a&&a instanceof p))throw new Error("required module '"+b+"' not found");if(a.init(),!a.supported)throw new Error("required module '"+b+"' not supported")}this.initializer(this)},fail:function(a){throw this.initialized=!0,this.supported=!1,new Error(a)},warn:function(a){H.warn("Module "+this.name+": "+a)},deprecationNotice:function(a,b){H.warn("DEPRECATED: "+a+" in module "+this.name+" is deprecated. Please use "+b+" instead")},createError:function(a){return new Error("Error in Rangy "+this.name+" module: "+a)}},H.createModule=function(a){var b,c;2==arguments.length?(b=arguments[1],c=[]):(b=arguments[2],c=arguments[1]);var d=q(a,c,b);H.initialized&&H.supported&&d.init()},H.createCoreModule=function(a,b,c){q(a,b,c)},H.RangePrototype=r,H.rangePrototype=new r,H.selectionPrototype=new s,H.createCoreModule("DomUtil",[],function(a,b){function c(a){var b;return typeof a.namespaceURI==F||null===(b=a.namespaceURI)||"http://www.w3.org/1999/xhtml"==b}function d(a){var b=a.parentNode;return 1==b.nodeType?b:null}function e(a){for(var b=0;a=a.previousSibling;)++b;return b}function f(a){switch(a.nodeType){case 7:case 10:return 0;case 3:case 8:return a.length;default:return a.childNodes.length}}function g(a,b){var c,d=[];for(c=a;c;c=c.parentNode)d.push(c);for(c=b;c;c=c.parentNode)if(K(d,c))return c;return null}function h(a,b,c){for(var d=c?b:b.parentNode;d;){if(d===a)return!0;d=d.parentNode}return!1}function i(a,b){return h(a,b,!0)}function j(a,b,c){for(var d,e=c?a:a.parentNode;e;){if(d=e.parentNode,d===b)return e;e=d}return null}function k(a){var b=a.nodeType;return 3==b||4==b||8==b}function l(a){if(!a)return!1;var b=a.nodeType;return 3==b||8==b}function m(a,b){var c=b.nextSibling,d=b.parentNode;return c?d.insertBefore(a,c):d.appendChild(a),a}function n(a,b,c){var d=a.cloneNode(!1);if(d.deleteData(0,b),a.deleteData(b,a.length-b),m(d,a),c)for(var f,g=0;f=c[g++];)f.node==a&&f.offset>b?(f.node=d,f.offset-=b):f.node==a.parentNode&&f.offset>e(a)&&++f.offset;return d}function o(a){if(9==a.nodeType)return a;if(typeof a.ownerDocument!=F)return a.ownerDocument;if(typeof a.document!=F)return a.document;if(a.parentNode)return o(a.parentNode);throw b.createError("getDocument: no document found for node")}function p(a){var c=o(a);if(typeof c.defaultView!=F)return c.defaultView;if(typeof c.parentWindow!=F)return c.parentWindow;throw b.createError("Cannot get a window object for node")}function q(a){if(typeof a.contentDocument!=F)return a.contentDocument;if(typeof a.contentWindow!=F)return a.contentWindow.document;throw b.createError("getIframeDocument: No Document object found for iframe element")}function r(a){if(typeof a.contentWindow!=F)return a.contentWindow;if(typeof a.contentDocument!=F)return a.contentDocument.defaultView;throw b.createError("getIframeWindow: No Window object found for iframe element")}function s(a){return a&&G.isHostMethod(a,"setTimeout")&&G.isHostObject(a,"document")}function t(a,b,c){var d;if(a?G.isHostProperty(a,"nodeType")?d=1==a.nodeType&&"iframe"==a.tagName.toLowerCase()?q(a):o(a):s(a)&&(d=a.document):d=document,!d)throw b.createError(c+"(): Parameter must be a Window object or DOM node");return d}function u(a){for(var b;b=a.parentNode;)a=b;return a}function v(a,c,d,f){var h,i,k,l,m;if(a==d)return c===f?0:f>c?-1:1;if(h=j(d,a,!0))return c<=e(h)?-1:1;if(h=j(a,d,!0))return e(h)[index:"+e(a)+",length:"+a.childNodes.length+"]["+(a.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return a.nodeName}function y(a){for(var b,c=o(a).createDocumentFragment();b=a.firstChild;)c.appendChild(b);return c}function z(a,b,c){var d=H(a),e=a.createElement("div");e.contentEditable=""+!!c,b&&(e.innerHTML=b);var f=d.firstChild;return f?d.insertBefore(e,f):d.appendChild(e),e}function A(a){return a.parentNode.removeChild(a)}function B(a){this.root=a,this._next=a}function C(a){return new B(a)}function D(a,b){this.node=a,this.offset=b}function E(a){this.code=this[a],this.codeName=a,this.message="DOMException: "+this.codeName}var F="undefined",G=a.util,H=G.getBody;G.areHostMethods(document,["createDocumentFragment","createElement","createTextNode"])||b.fail("document missing a Node creation method"),G.isHostMethod(document,"getElementsByTagName")||b.fail("document missing getElementsByTagName method");var I=document.createElement("div");G.areHostMethods(I,["insertBefore","appendChild","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"]))||b.fail("Incomplete Element implementation"),G.isHostProperty(I,"innerHTML")||b.fail("Element is missing innerHTML property");var J=document.createTextNode("test");G.areHostMethods(J,["splitText","deleteData","insertData","appendData","cloneNode"]||!G.areHostObjects(I,["previousSibling","nextSibling","childNodes","parentNode"])||!G.areHostProperties(J,["data"]))||b.fail("Incomplete Text Node implementation");var K=function(a,b){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1},L=!1;!function(){var b=document.createElement("b");b.innerHTML="1";var c=b.firstChild;b.innerHTML="
",L=w(c),a.features.crashyTextNodes=L}();var M;typeof window.getComputedStyle!=F?M=function(a,b){return p(a).getComputedStyle(a,null)[b]}:typeof document.documentElement.currentStyle!=F?M=function(a,b){return a.currentStyle?a.currentStyle[b]:""}:b.fail("No means of obtaining computed style properties found"),B.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var a,b,c=this._current=this._next;if(this._current)if(a=c.firstChild)this._next=a;else{for(b=null;c!==this.root&&!(b=c.nextSibling);)c=c.parentNode;this._next=b}return this._current},detach:function(){this._current=this._next=this.root=null}},D.prototype={equals:function(a){return!!a&&this.node===a.node&&this.offset==a.offset},inspect:function(){return"[DomPosition("+x(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}},E.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},E.prototype.toString=function(){return this.message},a.dom={arrayContains:K,isHtmlNamespace:c,parentElement:d,getNodeIndex:e,getNodeLength:f,getCommonAncestor:g,isAncestorOf:h,isOrIsAncestorOf:i,getClosestAncestorIn:j,isCharacterDataNode:k,isTextOrCommentNode:l,insertAfter:m,splitDataNode:n,getDocument:o,getWindow:p,getIframeWindow:r,getIframeDocument:q,getBody:H,isWindow:s,getContentDocument:t,getRootContainer:u,comparePoints:v,isBrokenNode:w,inspectNode:x,getComputedStyleProperty:M,createTestElement:z,removeNode:A,fragmentFromNodeChildren:y,createIterator:C,DomPosition:D},a.DOMException=E}),H.createCoreModule("DomRange",["DomUtil"],function(a,b){function c(a,b){return 3!=a.nodeType&&(P(a,b.startContainer)||P(a,b.endContainer))}function d(a){return a.document||Q(a.startContainer)}function e(a){return W(a.startContainer)}function f(a){return new L(a.parentNode,O(a))}function g(a){return new L(a.parentNode,O(a)+1)}function h(a,b,c){var d=11==a.nodeType?a.firstChild:a;return N(b)?c==b.length?J.insertAfter(a,b):b.parentNode.insertBefore(a,0==c?b:S(b,c)):c>=b.childNodes.length?b.appendChild(a):b.insertBefore(a,b.childNodes[c]),d}function i(a,b,c){if(z(a),z(b),d(b)!=d(a))throw new M("WRONG_DOCUMENT_ERR");var e=R(a.startContainer,a.startOffset,b.endContainer,b.endOffset),f=R(a.endContainer,a.endOffset,b.startContainer,b.startOffset);return c?0>=e&&f>=0:0>e&&f>0}function j(a){for(var b,c,e,f=d(a.range).createDocumentFragment();c=a.next();){if(b=a.isPartiallySelectedSubtree(),c=c.cloneNode(!b),b&&(e=a.getSubtreeIterator(),c.appendChild(j(e)),e.detach()),10==c.nodeType)throw new M("HIERARCHY_REQUEST_ERR");f.appendChild(c)}return f}function k(a,b,c){var d,e;c=c||{stop:!1};for(var f,g;f=a.next();)if(a.isPartiallySelectedSubtree()){if(b(f)===!1)return void(c.stop=!0);if(g=a.getSubtreeIterator(),k(g,b,c),g.detach(),c.stop)return}else for(d=J.createIterator(f);e=d.next();)if(b(e)===!1)return void(c.stop=!0)}function l(a){for(var b;a.next();)a.isPartiallySelectedSubtree()?(b=a.getSubtreeIterator(),l(b),b.detach()):a.remove()}function m(a){for(var b,c,e=d(a.range).createDocumentFragment();b=a.next();){if(a.isPartiallySelectedSubtree()?(b=b.cloneNode(!1),c=a.getSubtreeIterator(),b.appendChild(m(c)),c.detach()):a.remove(),10==b.nodeType)throw new M("HIERARCHY_REQUEST_ERR");e.appendChild(b)}return e}function n(a,b,c){var d,e=!(!b||!b.length),f=!!c;e&&(d=new RegExp("^("+b.join("|")+")$"));var g=[];return k(new p(a,!1),function(b){if(!(e&&!d.test(b.nodeType)||f&&!c(b))){var h=a.startContainer;if(b!=h||!N(h)||a.startOffset!=h.length){var i=a.endContainer;b==i&&N(i)&&0==a.endOffset||g.push(b)}}}),g}function o(a){var b="undefined"==typeof a.getName?"Range":a.getName();return"["+b+"("+J.inspectNode(a.startContainer)+":"+a.startOffset+", "+J.inspectNode(a.endContainer)+":"+a.endOffset+")]"}function p(a,b){if(this.range=a,this.clonePartiallySelectedTextNodes=b,!a.collapsed){this.sc=a.startContainer,this.so=a.startOffset,this.ec=a.endContainer,this.eo=a.endOffset;var c=a.commonAncestorContainer;this.sc===this.ec&&N(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc!==c||N(this.sc)?T(this.sc,c,!0):this.sc.childNodes[this.so],this._last=this.ec!==c||N(this.ec)?T(this.ec,c,!0):this.ec.childNodes[this.eo-1])}}function q(a){return function(b,c){for(var d,e=c?b:b.parentNode;e;){if(d=e.nodeType,V(a,d))return e;e=e.parentNode}return null}}function r(a,b){if(ea(a,b))throw new M("INVALID_NODE_TYPE_ERR")}function s(a,b){if(!V(b,a.nodeType))throw new M("INVALID_NODE_TYPE_ERR")}function t(a,b){if(0>b||b>(N(a)?a.length:a.childNodes.length))throw new M("INDEX_SIZE_ERR")}function u(a,b){if(ca(a,!0)!==ca(b,!0))throw new M("WRONG_DOCUMENT_ERR")}function v(a){if(da(a,!0))throw new M("NO_MODIFICATION_ALLOWED_ERR")}function w(a,b){if(!a)throw new M(b)}function x(a,b){return b<=(N(a)?a.length:a.childNodes.length)}function y(a){return!!a.startContainer&&!!a.endContainer&&!(X&&(J.isBrokenNode(a.startContainer)||J.isBrokenNode(a.endContainer)))&&W(a.startContainer)==W(a.endContainer)&&x(a.startContainer,a.startOffset)&&x(a.endContainer,a.endOffset)}function z(a){if(!y(a))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+a.inspect()+")")}function A(a,b){z(a);var c=a.startContainer,d=a.startOffset,e=a.endContainer,f=a.endOffset,g=c===e;N(e)&&f>0&&f0&&d=O(c)&&f++,d=0),a.setStartAndEnd(c,d,e,f)}function B(a){z(a);var b=a.commonAncestorContainer.parentNode.cloneNode(!1);return b.appendChild(a.cloneContents()),b.innerHTML}function C(a){a.START_TO_START=ka,a.START_TO_END=la,a.END_TO_END=ma,a.END_TO_START=na,a.NODE_BEFORE=oa,a.NODE_AFTER=pa,a.NODE_BEFORE_AND_AFTER=qa,a.NODE_INSIDE=ra}function D(a){C(a),C(a.prototype)}function E(a,b){return function(){z(this);var c,d,e=this.startContainer,f=this.startOffset,h=this.commonAncestorContainer,i=new p(this,!0);e!==h&&(c=T(e,h,!0),d=g(c),e=d.node,f=d.offset),k(i,v),i.reset();var j=a(i);return i.detach(),b(this,e,f,e,f),j}}function F(b,d){function e(a,b){return function(c){s(c,Z),s(W(c),$);var d=(a?f:g)(c);(b?h:i)(this,d.node,d.offset)}}function h(a,b,c){var e=a.endContainer,f=a.endOffset;(b!==a.startContainer||c!==a.startOffset)&&((W(b)!=W(e)||1==R(b,c,e,f))&&(e=b,f=c),d(a,b,c,e,f))}function i(a,b,c){var e=a.startContainer,f=a.startOffset;(b!==a.endContainer||c!==a.endOffset)&&((W(b)!=W(e)||-1==R(b,c,e,f))&&(e=b,f=c),d(a,e,f,b,c))}var j=function(){};j.prototype=a.rangePrototype,b.prototype=new j,K.extend(b.prototype,{setStart:function(a,b){r(a,!0),t(a,b),h(this,a,b)},setEnd:function(a,b){r(a,!0),t(a,b),i(this,a,b)},setStartAndEnd:function(){var a=arguments,b=a[0],c=a[1],e=b,f=c;switch(a.length){case 3:f=a[2];break;case 4:e=a[2],f=a[3]}d(this,b,c,e,f)},setBoundary:function(a,b,c){this["set"+(c?"Start":"End")](a,b)},setStartBefore:e(!0,!0),setStartAfter:e(!1,!0),setEndBefore:e(!0,!1),setEndAfter:e(!1,!1),collapse:function(a){z(this),a?d(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):d(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(a){r(a,!0),d(this,a,0,a,U(a))},selectNode:function(a){r(a,!1),s(a,Z);var b=f(a),c=g(a);d(this,b.node,b.offset,c.node,c.offset)},extractContents:E(m,d),deleteContents:E(l,d),canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},splitBoundaries:function(){A(this)},splitBoundariesPreservingPositions:function(a){A(this,a)},normalizeBoundaries:function(){z(this);var a,b=this.startContainer,c=this.startOffset,e=this.endContainer,f=this.endOffset,g=function(a){var b=a.nextSibling;b&&b.nodeType==a.nodeType&&(e=a,f=a.length,a.appendData(b.data),Y(b))},h=function(a){var d=a.previousSibling;if(d&&d.nodeType==a.nodeType){b=a;var g=a.length;if(c=d.length,a.insertData(0,d.data),Y(d),b==e)f+=c,e=b;else if(e==a.parentNode){var h=O(a);f==h?(e=a,f=g):f>h&&f--}}},i=!0;if(N(e))f==e.length?g(e):0==f&&(a=e.previousSibling,a&&a.nodeType==e.nodeType&&(f=a.length,b==e&&(i=!1),a.appendData(e.data),Y(e),e=a));else{if(f>0){var j=e.childNodes[f-1];j&&N(j)&&g(j)}i=!this.collapsed}if(i){if(N(b))0==c?h(b):c==b.length&&(a=b.nextSibling,a&&a.nodeType==b.nodeType&&(e==a&&(e=b,f+=b.length),b.appendData(a.data),Y(a)));else if(cx",ga=3==fa.firstChild.nodeType}catch(ha){}a.features.htmlParsingConforms=ga;var ia=ga?function(a){var b=this.startContainer,c=Q(b);if(!b)throw new M("INVALID_STATE_ERR");var d=null;return 1==b.nodeType?d=b:N(b)&&(d=J.parentElement(b)),d=null===d||"HTML"==d.nodeName&&J.isHtmlNamespace(Q(d).documentElement)&&J.isHtmlNamespace(d)?c.createElement("body"):d.cloneNode(!1),d.innerHTML=a,J.fragmentFromNodeChildren(d)}:function(a){var b=d(this),c=b.createElement("body");return c.innerHTML=a,J.fragmentFromNodeChildren(c)},ja=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],ka=0,la=1,ma=2,na=3,oa=0,pa=1,qa=2,ra=3;K.extend(a.rangePrototype,{compareBoundaryPoints:function(a,b){z(this),u(this.startContainer,b.startContainer);var c,d,e,f,g=a==na||a==ka?"start":"end",h=a==la||a==ka?"start":"end";return c=this[g+"Container"],d=this[g+"Offset"],e=b[h+"Container"],f=b[h+"Offset"],R(c,d,e,f)},insertNode:function(a){if(z(this),s(a,aa),v(this.startContainer),P(a,this.startContainer))throw new M("HIERARCHY_REQUEST_ERR");var b=h(a,this.startContainer,this.startOffset);this.setStartBefore(b)},cloneContents:function(){z(this);var a,b;if(this.collapsed)return d(this).createDocumentFragment();if(this.startContainer===this.endContainer&&N(this.startContainer))return a=this.startContainer.cloneNode(!0),a.data=a.data.slice(this.startOffset,this.endOffset),b=d(this).createDocumentFragment(),b.appendChild(a),b;var c=new p(this,!0);return a=j(c),c.detach(),a},canSurroundContents:function(){z(this),v(this.startContainer),v(this.endContainer);var a=new p(this,!0),b=a._first&&c(a._first,this)||a._last&&c(a._last,this);return a.detach(),!b},surroundContents:function(a){if(s(a,ba),!this.canSurroundContents())throw new M("INVALID_STATE_ERR");var b=this.extractContents();if(a.hasChildNodes())for(;a.lastChild;)a.removeChild(a.lastChild);h(a,this.startContainer,this.startOffset),a.appendChild(b),this.selectNode(a)},cloneRange:function(){z(this);for(var a,b=new I(d(this)),c=ja.length;c--;)a=ja[c],b[a]=this[a];return b},toString:function(){z(this);var a=this.startContainer;if(a===this.endContainer&&N(a))return 3==a.nodeType||4==a.nodeType?a.data.slice(this.startOffset,this.endOffset):"";var b=[],c=new p(this,!0);return k(c,function(a){(3==a.nodeType||4==a.nodeType)&&b.push(a.data)}),c.detach(),b.join("")},compareNode:function(a){z(this);var b=a.parentNode,c=O(a);if(!b)throw new M("NOT_FOUND_ERR");var d=this.comparePoint(b,c),e=this.comparePoint(b,c+1);return 0>d?e>0?qa:oa:e>0?pa:ra},comparePoint:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)<0?-1:R(a,b,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:ia,toHtml:function(){return B(this)},intersectsNode:function(a,b){if(z(this),W(a)!=e(this))return!1;var c=a.parentNode,d=O(a);if(!c)return!0;var f=R(c,d,this.endContainer,this.endOffset),g=R(c,d+1,this.startContainer,this.startOffset);return b?0>=f&&g>=0:0>f&&g>0},isPointInRange:function(a,b){return z(this),w(a,"HIERARCHY_REQUEST_ERR"),u(a,this.startContainer),R(a,b,this.startContainer,this.startOffset)>=0&&R(a,b,this.endContainer,this.endOffset)<=0},intersectsRange:function(a){return i(this,a,!1)},intersectsOrTouchesRange:function(a){return i(this,a,!0)},intersection:function(a){if(this.intersectsRange(a)){var b=R(this.startContainer,this.startOffset,a.startContainer,a.startOffset),c=R(this.endContainer,this.endOffset,a.endContainer,a.endOffset),d=this.cloneRange();return-1==b&&d.setStart(a.startContainer,a.startOffset),1==c&&d.setEnd(a.endContainer,a.endOffset),d}return null},union:function(a){if(this.intersectsOrTouchesRange(a)){var b=this.cloneRange();return-1==R(a.startContainer,a.startOffset,this.startContainer,this.startOffset)&&b.setStart(a.startContainer,a.startOffset),1==R(a.endContainer,a.endOffset,this.endContainer,this.endOffset)&&b.setEnd(a.endContainer,a.endOffset),b}throw new M("Ranges do not intersect")},containsNode:function(a,b){return b?this.intersectsNode(a,!1):this.compareNode(a)==ra},containsNodeContents:function(a){return this.comparePoint(a,0)>=0&&this.comparePoint(a,U(a))<=0},containsRange:function(a){var b=this.intersection(a);return null!==b&&a.equals(b)},containsNodeText:function(a){var b=this.cloneRange();b.selectNode(a);var c=b.getNodes([3]);if(c.length>0){b.setStart(c[0],0);var d=c.pop();return b.setEnd(d,d.length),this.containsRange(b)}return this.containsNodeContents(a)},getNodes:function(a,b){return z(this),n(this,a,b)},getDocument:function(){return d(this)},collapseBefore:function(a){this.setEndBefore(a),this.collapse(!1)},collapseAfter:function(a){this.setStartAfter(a),this.collapse(!0)},getBookmark:function(b){
+var c=d(this),e=a.createRange(c);b=b||J.getBody(c),e.selectNodeContents(b);var f=this.intersection(e),g=0,h=0;return f&&(e.setEnd(f.startContainer,f.startOffset),g=e.toString().length,h=g+f.toString().length),{start:g,end:h,containerNode:b}},moveToBookmark:function(a){var b=a.containerNode,c=0;this.setStart(b,0),this.collapse(!0);for(var d,e,f,g,h=[b],i=!1,j=!1;!j&&(d=h.pop());)if(3==d.nodeType)e=c+d.length,!i&&a.start>=c&&a.start<=e&&(this.setStart(d,a.start-c),i=!0),i&&a.end>=c&&a.end<=e&&(this.setEnd(d,a.end-c),j=!0),c=e;else for(g=d.childNodes,f=g.length;f--;)h.push(g[f])},getName:function(){return"DomRange"},equals:function(a){return I.rangesEqual(this,a)},isValid:function(){return y(this)},inspect:function(){return o(this)},detach:function(){}}),F(I,H),K.extend(I,{rangeProperties:ja,RangeIterator:p,copyComparisonConstants:D,createPrototypeRange:F,inspect:o,toHtml:B,getRangeDocument:d,rangesEqual:function(a,b){return a.startContainer===b.startContainer&&a.startOffset===b.startOffset&&a.endContainer===b.endContainer&&a.endOffset===b.endOffset}}),a.DomRange=I}),H.createCoreModule("WrappedRange",["DomRange"],function(a,b){var c,d,e=a.dom,f=a.util,g=e.DomPosition,h=a.DomRange,i=e.getBody,j=e.getContentDocument,k=e.isCharacterDataNode;if(a.features.implementsDomRange&&!function(){function d(a){for(var b,c=m.length;c--;)b=m[c],a[b]=a.nativeRange[b];a.collapsed=a.startContainer===a.endContainer&&a.startOffset===a.endOffset}function g(a,b,c,d,e){var f=a.startContainer!==b||a.startOffset!=c,g=a.endContainer!==d||a.endOffset!=e,h=!a.equals(a.nativeRange);(f||g||h)&&(a.setEnd(d,e),a.setStart(b,c))}var k,l,m=h.rangeProperties;c=function(a){if(!a)throw b.createError("WrappedRange: Range must be specified");this.nativeRange=a,d(this)},h.createPrototypeRange(c,g),k=c.prototype,k.selectNode=function(a){this.nativeRange.selectNode(a),d(this)},k.cloneContents=function(){return this.nativeRange.cloneContents()},k.surroundContents=function(a){this.nativeRange.surroundContents(a),d(this)},k.collapse=function(a){this.nativeRange.collapse(a),d(this)},k.cloneRange=function(){return new c(this.nativeRange.cloneRange())},k.refresh=function(){d(this)},k.toString=function(){return this.nativeRange.toString()};var n=document.createTextNode("test");i(document).appendChild(n);var o=document.createRange();o.setStart(n,0),o.setEnd(n,0);try{o.setStart(n,1),k.setStart=function(a,b){this.nativeRange.setStart(a,b),d(this)},k.setEnd=function(a,b){this.nativeRange.setEnd(a,b),d(this)},l=function(a){return function(b){this.nativeRange[a](b),d(this)}}}catch(p){k.setStart=function(a,b){try{this.nativeRange.setStart(a,b)}catch(c){this.nativeRange.setEnd(a,b),this.nativeRange.setStart(a,b)}d(this)},k.setEnd=function(a,b){try{this.nativeRange.setEnd(a,b)}catch(c){this.nativeRange.setStart(a,b),this.nativeRange.setEnd(a,b)}d(this)},l=function(a,b){return function(c){try{this.nativeRange[a](c)}catch(e){this.nativeRange[b](c),this.nativeRange[a](c)}d(this)}}}k.setStartBefore=l("setStartBefore","setEndBefore"),k.setStartAfter=l("setStartAfter","setEndAfter"),k.setEndBefore=l("setEndBefore","setStartBefore"),k.setEndAfter=l("setEndAfter","setStartAfter"),k.selectNodeContents=function(a){this.setStartAndEnd(a,0,e.getNodeLength(a))},o.selectNodeContents(n),o.setEnd(n,3);var q=document.createRange();q.selectNodeContents(n),q.setEnd(n,4),q.setStart(n,2),-1==o.compareBoundaryPoints(o.START_TO_END,q)&&1==o.compareBoundaryPoints(o.END_TO_START,q)?k.compareBoundaryPoints=function(a,b){return b=b.nativeRange||b,a==b.START_TO_END?a=b.END_TO_START:a==b.END_TO_START&&(a=b.START_TO_END),this.nativeRange.compareBoundaryPoints(a,b)}:k.compareBoundaryPoints=function(a,b){return this.nativeRange.compareBoundaryPoints(a,b.nativeRange||b)};var r=document.createElement("div");r.innerHTML="123";var s=r.firstChild,t=i(document);t.appendChild(r),o.setStart(s,1),o.setEnd(s,2),o.deleteContents(),"13"==s.data&&(k.deleteContents=function(){this.nativeRange.deleteContents(),d(this)},k.extractContents=function(){var a=this.nativeRange.extractContents();return d(this),a}),t.removeChild(r),t=null,f.isHostMethod(o,"createContextualFragment")&&(k.createContextualFragment=function(a){return this.nativeRange.createContextualFragment(a)}),i(document).removeChild(n),k.getName=function(){return"WrappedRange"},a.WrappedRange=c,a.createNativeRange=function(a){return a=j(a,b,"createNativeRange"),a.createRange()}}(),a.features.implementsTextRange){var l=function(a){var b=a.parentElement(),c=a.duplicate();c.collapse(!0);var d=c.parentElement();c=a.duplicate(),c.collapse(!1);var f=c.parentElement(),g=d==f?d:e.getCommonAncestor(d,f);return g==b?g:e.getCommonAncestor(b,g)},m=function(a){return 0==a.compareEndPoints("StartToEnd",a)},n=function(a,b,c,d,f){var h=a.duplicate();h.collapse(c);var i=h.parentElement();if(e.isOrIsAncestorOf(b,i)||(i=b),!i.canHaveHTML){var j=new g(i.parentNode,e.getNodeIndex(i));return{boundaryPosition:j,nodeInfo:{nodeIndex:j.offset,containerElement:j.node}}}var l=e.getDocument(i).createElement("span");l.parentNode&&e.removeNode(l);for(var m,n,o,p,q,r=c?"StartToStart":"StartToEnd",s=f&&f.containerElement==i?f.nodeIndex:0,t=i.childNodes.length,u=t,v=u;;){if(v==t?i.appendChild(l):i.insertBefore(l,i.childNodes[v]),h.moveToElementText(l),m=h.compareEndPoints(r,a),0==m||s==u)break;if(-1==m){if(u==s+1)break;s=v}else u=u==s+1?s:v;v=Math.floor((s+u)/2),i.removeChild(l)}if(q=l.nextSibling,-1==m&&q&&k(q)){h.setEndPoint(c?"EndToStart":"EndToEnd",a);var w;if(/[\r\n]/.test(q.data)){var x=h.duplicate(),y=x.text.replace(/\r\n/g,"\r").length;for(w=x.moveStart("character",y);-1==(m=x.compareEndPoints("StartToEnd",x));)w++,x.moveStart("character",1)}else w=h.text.length;p=new g(q,w)}else n=(d||!c)&&l.previousSibling,o=(d||c)&&l.nextSibling,p=o&&k(o)?new g(o,0):n&&k(n)?new g(n,n.data.length):new g(i,e.getNodeIndex(l));return e.removeNode(l),{boundaryPosition:p,nodeInfo:{nodeIndex:v,containerElement:i}}},o=function(a,b){var c,d,f,g,h=a.offset,j=e.getDocument(a.node),l=i(j).createTextRange(),m=k(a.node);return m?(c=a.node,d=c.parentNode):(g=a.node.childNodes,c=hb;++b)if(!C.isAncestorOf(a[0],a[b]))return!1;return!0}function m(a){var c=a.getNodes();if(!l(c))throw b.createError("getSingleElementFromRange: range "+a.inspect()+" did not consist of a single element");return c[0]}function n(a){return!!a&&"undefined"!=typeof a.text}function o(a,b){var c=new G(b);a._ranges=[c],h(a,c,!1),a.rangeCount=1,a.isCollapsed=c.collapsed}function p(b){if(b._ranges.length=0,"None"==b.docSelection.type)j(b);else{var c=b.docSelection.createRange();if(n(c))o(b,c);else{b.rangeCount=c.length;for(var d,e=L(c.item(0)),f=0;fh;++h)g.add(d.item(h));try{g.add(e)}catch(j){throw b.createError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}g.select(),p(a)}function r(a,b,c){this.nativeSelection=a,this.docSelection=b,this._ranges=[],this.win=c,this.refresh()}function s(a){a.win=a.anchorNode=a.focusNode=a._ranges=null,a.rangeCount=a.anchorOffset=a.focusOffset=0,a.detached=!0}function t(a,b){for(var c,d,e=ba.length;e--;)if(c=ba[e],d=c.selection,"deleteAll"==b)s(d);else if(c.win==a)return"delete"==b?(ba.splice(e,1),!0):d;return"deleteAll"==b&&(ba.length=0),null}function u(a,c){for(var d,e=L(c[0].startContainer),f=M(e).createControlRange(),g=0,h=c.length;h>g;++g){d=m(c[g]);try{f.add(d)}catch(i){throw b.createError("setRanges(): Element within one of the specified Ranges could not be added to control selection (does it have layout?)")}}f.select(),p(a)}function v(a,b){if(a.win.document!=L(b))throw new H("WRONG_DOCUMENT_ERR")}function w(b){return function(c,d){var e;this.rangeCount?(e=this.getRangeAt(0),e["set"+(b?"Start":"End")](c,d)):(e=a.createRange(this.win.document),e.setStartAndEnd(c,d)),this.setSingleRange(e,this.isBackward())}}function x(a){var b=[],c=new I(a.anchorNode,a.anchorOffset),d=new I(a.focusNode,a.focusOffset),e="function"==typeof a.getName?a.getName():"Selection";if("undefined"!=typeof a.rangeCount)for(var f=0,g=a.rangeCount;g>f;++f)b[f]=F.inspect(a.getRangeAt(f));return"["+e+"(Ranges: "+b.join(", ")+")(anchor: "+c.inspect()+", focus: "+d.inspect()+"]"}a.config.checkSelectionRanges=!0;var y,z,A="boolean",B="number",C=a.dom,D=a.util,E=D.isHostMethod,F=a.DomRange,G=a.WrappedRange,H=a.DOMException,I=C.DomPosition,J=a.features,K="Control",L=C.getDocument,M=C.getBody,N=F.rangesEqual,O=E(window,"getSelection"),P=D.isHostObject(document,"selection");J.implementsWinGetSelection=O,J.implementsDocSelection=P;var Q=P&&(!O||a.config.preferTextRange);if(Q)y=f,a.isSelectionValid=function(a){var b=d(a,"isSelectionValid").document,c=b.selection;return"None"!=c.type||L(c.createRange().parentElement())==b};else{if(!O)return b.fail("Neither document.selection or window.getSelection() detected."),!1;y=e,a.isSelectionValid=function(){return!0}}a.getNativeSelection=y;var R=y();if(!R)return b.fail("Native selection was null (possibly issue 138?)"),!1;var S=a.createNativeRange(document),T=M(document),U=D.areHostProperties(R,["anchorNode","focusNode","anchorOffset","focusOffset"]);J.selectionHasAnchorAndFocus=U;var V=E(R,"extend");J.selectionHasExtend=V;var W=typeof R.rangeCount==B;J.selectionHasRangeCount=W;var X=!1,Y=!0,Z=V?function(b,c){var d=F.getRangeDocument(c),e=a.createRange(d);e.collapseToPoint(c.endContainer,c.endOffset),b.addRange(k(e)),b.extend(c.startContainer,c.startOffset)}:null;D.areHostMethods(R,["addRange","getRangeAt","removeAllRanges"])&&typeof R.rangeCount==B&&J.implementsDomRange&&!function(){var b=window.getSelection();if(b){for(var c=b.rangeCount,d=c>1,e=[],f=g(b),h=0;c>h;++h)e[h]=b.getRangeAt(h);var i=C.createTestElement(document,"",!1),j=i.appendChild(document.createTextNode(" ")),k=document.createRange();if(k.setStart(j,1),k.collapse(!0),b.removeAllRanges(),b.addRange(k),Y=1==b.rangeCount,b.removeAllRanges(),!d){var l=window.navigator.appVersion.match(/Chrome\/(.*?) /);if(l&&parseInt(l[1])>=36)X=!1;else{var m=k.cloneRange();k.setStart(j,0),m.setEnd(j,3),m.setStart(j,2),b.addRange(k),b.addRange(m),X=2==b.rangeCount}}for(C.removeNode(i),b.removeAllRanges(),h=0;c>h;++h)0==h&&f?Z?Z(b,e[h]):(a.warn("Rangy initialization: original selection was backwards but selection has been restored forwards because the browser does not support Selection.extend"),b.addRange(e[h])):b.addRange(e[h])}}(),J.selectionSupportsMultipleRanges=X,J.collapsedNonEditableSelectionsSupported=Y;var $,_=!1;T&&E(T,"createControlRange")&&($=T.createControlRange(),D.areHostProperties($,["item","add"])&&(_=!0)),J.implementsControlRange=_,z=U?function(a){return a.anchorNode===a.focusNode&&a.anchorOffset===a.focusOffset}:function(a){return a.rangeCount?a.getRangeAt(a.rangeCount-1).collapsed:!1};var aa;E(R,"getRangeAt")?aa=function(a,b){try{return a.getRangeAt(b)}catch(c){return null}}:U&&(aa=function(b){var c=L(b.anchorNode),d=a.createRange(c);return d.setStartAndEnd(b.anchorNode,b.anchorOffset,b.focusNode,b.focusOffset),d.collapsed!==this.isCollapsed&&d.setStartAndEnd(b.focusNode,b.focusOffset,b.anchorNode,b.anchorOffset),d}),r.prototype=a.selectionPrototype;var ba=[],ca=function(a){if(a&&a instanceof r)return a.refresh(),a;a=d(a,"getNativeSelection");var b=t(a),c=y(a),e=P?f(a):null;return b?(b.nativeSelection=c,b.docSelection=e,b.refresh()):(b=new r(c,e,a),ba.push({win:a,selection:b})),b};a.getSelection=ca,D.createAliasForDeprecatedMethod(a,"getIframeSelection","getSelection");var da=r.prototype;if(!Q&&U&&D.areHostMethods(R,["removeAllRanges","addRange"])){da.removeAllRanges=function(){this.nativeSelection.removeAllRanges(),j(this)};var ea=function(a,b){Z(a.nativeSelection,b),a.refresh()};W?da.addRange=function(b,d){if(_&&P&&this.docSelection.type==K)q(this,b);else if(c(d)&&V)ea(this,b);else{var e;X?e=this.rangeCount:(this.removeAllRanges(),e=0);var f=k(b).cloneRange();try{this.nativeSelection.addRange(f)}catch(g){}if(this.rangeCount=this.nativeSelection.rangeCount,this.rangeCount==e+1){if(a.config.checkSelectionRanges){var i=aa(this.nativeSelection,this.rangeCount-1);i&&!N(i,b)&&(b=new G(i))}this._ranges[this.rangeCount-1]=b,h(this,b,ha(this.nativeSelection)),this.isCollapsed=z(this)}else this.refresh()}}:da.addRange=function(a,b){c(b)&&V?ea(this,a):(this.nativeSelection.addRange(k(a)),this.refresh())},da.setRanges=function(a){if(_&&P&&a.length>1)u(this,a);else{this.removeAllRanges();for(var b=0,c=a.length;c>b;++b)this.addRange(a[b])}}}else{if(!(E(R,"empty")&&E(S,"select")&&_&&Q))return b.fail("No means of selecting a Range or TextRange was found"),!1;da.removeAllRanges=function(){try{if(this.docSelection.empty(),"None"!=this.docSelection.type){var a;if(this.anchorNode)a=L(this.anchorNode);else if(this.docSelection.type==K){var b=this.docSelection.createRange();b.length&&(a=L(b.item(0)))}if(a){var c=M(a).createTextRange();c.select(),this.docSelection.empty()}}}catch(d){}j(this)},da.addRange=function(b){this.docSelection.type==K?q(this,b):(a.WrappedTextRange.rangeToTextRange(b).select(),this._ranges[0]=b,this.rangeCount=1,this.isCollapsed=this._ranges[0].collapsed,h(this,b,!1))},da.setRanges=function(a){this.removeAllRanges();var b=a.length;b>1?u(this,a):b&&this.addRange(a[0])}}da.getRangeAt=function(a){if(0>a||a>=this.rangeCount)throw new H("INDEX_SIZE_ERR");return this._ranges[a].cloneRange()};var fa;if(Q)fa=function(b){var c;a.isSelectionValid(b.win)?c=b.docSelection.createRange():(c=M(b.win.document).createTextRange(),c.collapse(!0)),b.docSelection.type==K?p(b):n(c)?o(b,c):j(b)};else if(E(R,"getRangeAt")&&typeof R.rangeCount==B)fa=function(b){if(_&&P&&b.docSelection.type==K)p(b);else if(b._ranges.length=b.rangeCount=b.nativeSelection.rangeCount,b.rangeCount){for(var c=0,d=b.rangeCount;d>c;++c)b._ranges[c]=new a.WrappedRange(b.nativeSelection.getRangeAt(c));h(b,b._ranges[b.rangeCount-1],ha(b.nativeSelection)),b.isCollapsed=z(b)}else j(b)};else{if(!U||typeof R.isCollapsed!=A||typeof S.collapsed!=A||!J.implementsDomRange)return b.fail("No means of obtaining a Range or TextRange from the user's selection was found"),!1;fa=function(a){var b,c=a.nativeSelection;c.anchorNode?(b=aa(c,0),a._ranges=[b],a.rangeCount=1,i(a),a.isCollapsed=z(a)):j(a)}}da.refresh=function(a){var b=a?this._ranges.slice(0):null,c=this.anchorNode,d=this.anchorOffset;if(fa(this),a){var e=b.length;if(e!=this._ranges.length)return!0;if(this.anchorNode!=c||this.anchorOffset!=d)return!0;for(;e--;)if(!N(b[e],this._ranges[e]))return!0;return!1}};var ga=function(a,b){var c=a.getAllRanges();a.removeAllRanges();for(var d=0,e=c.length;e>d;++d)N(b,c[d])||a.addRange(c[d]);a.rangeCount||j(a)};_&&P?da.removeRange=function(a){if(this.docSelection.type==K){for(var b,c=this.docSelection.createRange(),d=m(a),e=L(c.item(0)),f=M(e).createControlRange(),g=!1,h=0,i=c.length;i>h;++h)b=c.item(h),b!==d||g?f.add(c.item(h)):g=!0;f.select(),p(this)}else ga(this,a)}:da.removeRange=function(a){ga(this,a)};var ha;!Q&&U&&J.implementsDomRange?(ha=g,da.isBackward=function(){return ha(this)}):ha=da.isBackward=function(){return!1},da.isBackwards=da.isBackward,da.toString=function(){for(var a=[],b=0,c=this.rangeCount;c>b;++b)a[b]=""+this._ranges[b];return a.join("")},da.collapse=function(b,c){v(this,b);var d=a.createRange(b);d.collapseToPoint(b,c),this.setSingleRange(d),this.isCollapsed=!0},da.collapseToStart=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[0];this.collapse(a.startContainer,a.startOffset)},da.collapseToEnd=function(){if(!this.rangeCount)throw new H("INVALID_STATE_ERR");var a=this._ranges[this.rangeCount-1];this.collapse(a.endContainer,a.endOffset)},da.selectAllChildren=function(b){v(this,b);var c=a.createRange(b);c.selectNodeContents(b),this.setSingleRange(c)},da.deleteFromDocument=function(){if(_&&P&&this.docSelection.type==K){for(var a,b=this.docSelection.createRange();b.length;)a=b.item(0),b.remove(a),C.removeNode(a);this.refresh()}else if(this.rangeCount){var c=this.getAllRanges();if(c.length){this.removeAllRanges();for(var d=0,e=c.length;e>d;++d)c[d].deleteContents();this.addRange(c[e-1])}}},da.eachRange=function(a,b){for(var c=0,d=this._ranges.length;d>c;++c)if(a(this.getRangeAt(c)))return b},da.getAllRanges=function(){var a=[];return this.eachRange(function(b){a.push(b)}),a},da.setSingleRange=function(a,b){this.removeAllRanges(),this.addRange(a,b)},da.callMethodOnEachRange=function(a,b){var c=[];return this.eachRange(function(d){c.push(d[a].apply(d,b||[]))}),c},da.setStart=w(!0),da.setEnd=w(!1),a.rangePrototype.select=function(a){ca(this.getDocument()).setSingleRange(this,a)},da.changeEachRange=function(a){var b=[],c=this.isBackward();this.eachRange(function(c){a(c),b.push(c)}),this.removeAllRanges(),c&&1==b.length?this.addRange(b[0],"backward"):this.setRanges(b)},da.containsNode=function(a,b){return this.eachRange(function(c){return c.containsNode(a,b)},!0)||!1},da.getBookmark=function(a){return{backward:this.isBackward(),rangeBookmarks:this.callMethodOnEachRange("getBookmark",[a])}},da.moveToBookmark=function(b){for(var c,d,e=[],f=0;c=b.rangeBookmarks[f++];)d=a.createRange(this.win),d.moveToBookmark(c),e.push(d);b.backward?this.setSingleRange(e[0],"backward"):this.setRanges(e)},da.saveRanges=function(){return{backward:this.isBackward(),ranges:this.callMethodOnEachRange("cloneRange")}},da.restoreRanges=function(a){this.removeAllRanges();for(var b,c=0;b=a.ranges[c];++c)this.addRange(b,a.backward&&0==c)},da.toHtml=function(){var a=[];return this.eachRange(function(b){a.push(F.toHtml(b))}),a.join("")},J.implementsTextRange&&(da.getNativeTextRange=function(){var c;if(c=this.docSelection){var d=c.createRange();if(n(d))return d;throw b.createError("getNativeTextRange: selection is a control selection")}if(this.rangeCount>0)return a.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw b.createError("getNativeTextRange: selection contains no range")}),da.getName=function(){return"WrappedSelection"},da.inspect=function(){return x(this)},da.detach=function(){t(this.win,"delete"),s(this)},r.detachAll=function(){t(null,"deleteAll")},r.inspect=x,r.isDirectionBackward=c,a.Selection=r,a.selectionPrototype=da,a.addShimListener(function(a){"undefined"==typeof a.getSelection&&(a.getSelection=function(){return ca(a)}),a=null})});var M=!1,N=function(a){M||(M=!0,!H.initialized&&H.config.autoInitialize&&l())};return F&&("complete"==document.readyState?N():(a(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",N,!1),J(window,"load",N))),H},this),function(a,b){"function"==typeof define&&define.amd?define(["./rangy-core"],a):"undefined"!=typeof module&&"object"==typeof exports?module.exports=a(require("rangy")):a(b.rangy)}(function(a){return a.createModule("SaveRestore",["WrappedRange"],function(a,b){function c(a,b){return(b||document).getElementById(a)}function d(a,b){var c,d="selectionBoundary_"+ +new Date+"_"+(""+Math.random()).slice(2),e=o.getDocument(a.startContainer),f=a.cloneRange();return f.collapse(b),c=e.createElement("span"),c.id=d,c.style.lineHeight="0",c.style.display="none",c.className="rangySelectionBoundary",c.appendChild(e.createTextNode(r)),f.insertNode(c),c}function e(a,d,e,f){var g=c(e,a);g?(d[f?"setStartBefore":"setEndBefore"](g),p(g)):b.warn("Marker element has been removed. Cannot restore selection.")}function f(a,b){return b.compareBoundaryPoints(a.START_TO_START,a)}function g(b,c){var e,f,g=a.DomRange.getRangeDocument(b),h=b.toString(),i=q(c);return b.collapsed?(f=d(b,!1),{document:g,markerId:f.id,collapsed:!0}):(f=d(b,!1),e=d(b,!0),{document:g,startMarkerId:e.id,endMarkerId:f.id,collapsed:!1,backward:i,toString:function(){return"original text: '"+h+"', new text: '"+b.toString()+"'"}})}function h(d,f){var g=d.document;"undefined"==typeof f&&(f=!0);var h=a.createRange(g);if(d.collapsed){var i=c(d.markerId,g);if(i){i.style.display="inline";var j=i.previousSibling;j&&3==j.nodeType?(p(i),h.collapseToPoint(j,j.length)):(h.collapseBefore(i),p(i))}else b.warn("Marker element has been removed. Cannot restore selection.")}else e(g,h,d.startMarkerId,!0),e(g,h,d.endMarkerId,!1);return f&&h.normalizeBoundaries(),h}function i(b,d){var e,h,i=[],j=q(d);b=b.slice(0),b.sort(f);for(var k=0,l=b.length;l>k;++k)i[k]=g(b[k],j);for(k=l-1;k>=0;--k)e=b[k],h=a.DomRange.getRangeDocument(e),e.collapsed?e.collapseAfter(c(i[k].markerId,h)):(e.setEndBefore(c(i[k].endMarkerId,h)),e.setStartAfter(c(i[k].startMarkerId,h)));return i}function j(c){if(!a.isSelectionValid(c))return b.warn("Cannot save selection. This usually happens when the selection is collapsed and the selection document has lost focus."),null;var d=a.getSelection(c),e=d.getAllRanges(),f=1==e.length&&d.isBackward(),g=i(e,f);return f?d.setSingleRange(e[0],f):d.setRanges(e),{win:c,rangeInfos:g,restored:!1}}function k(a){for(var b=[],c=a.length,d=c-1;d>=0;d--)b[d]=h(a[d],!0);return b}function l(b,c){if(!b.restored){var d=b.rangeInfos,e=a.getSelection(b.win),f=k(d),g=d.length;1==g&&c&&a.features.selectionHasExtend&&d[0].backward?(e.removeAllRanges(),e.addRange(f[0],!0)):e.setRanges(f),b.restored=!0}}function m(a,b){var d=c(b,a);d&&p(d)}function n(a){for(var b,c=a.rangeInfos,d=0,e=c.length;e>d;++d)b=c[d],b.collapsed?m(a.doc,b.markerId):(m(a.doc,b.startMarkerId),m(a.doc,b.endMarkerId))}var o=a.dom,p=o.removeNode,q=a.Selection.isDirectionBackward,r="\ufeff";a.util.extend(a,{saveRange:g,restoreRange:h,saveRanges:i,restoreRanges:k,saveSelection:j,restoreSelection:l,removeMarkerElement:m,removeMarkers:n})}),a},this);var Base=function(){};Base.extend=function(a,b){var c=Base.prototype.extend;Base._prototyping=!0;var d=new this;c.call(d,a),d.base=function(){},delete Base._prototyping;var e=d.constructor,f=d.constructor=function(){if(!Base._prototyping)if(this._constructing||this.constructor==f)this._constructing=!0,e.apply(this,arguments),delete this._constructing;else if(null!=arguments[0])return(arguments[0].extend||c).call(arguments[0],d)};return f.ancestor=this,f.extend=this.extend,f.forEach=this.forEach,f.implement=this.implement,f.prototype=d,f.toString=this.toString,f.valueOf=function(a){return"object"==a?f:e.valueOf()},c.call(f,b),"function"==typeof f.init&&f.init(),f},Base.prototype={extend:function(a,b){if(arguments.length>1){var c=this[a];if(c&&"function"==typeof b&&(!c.valueOf||c.valueOf()!=b.valueOf())&&/\bbase\b/.test(b)){var d=b.valueOf();b=function(){var a=this.base||Base.prototype.base;this.base=c;var b=d.apply(this,arguments);return this.base=a,b},b.valueOf=function(a){return"object"==a?b:d},b.toString=Base.toString}this[a]=b}else if(a){var e=Base.prototype.extend;Base._prototyping||"function"==typeof this||(e=this.extend||e);for(var f={toSource:null},g=["constructor","toString","valueOf"],h=Base._prototyping?0:1;i=g[h++];)a[i]!=f[i]&&e.call(this,i,a[i]);for(var i in a)f[i]||e.call(this,i,a[i])}return this}},Base=Base.extend({constructor:function(){this.extend(arguments[0])}},{ancestor:Object,version:"1.1",forEach:function(a,b,c){for(var d in a)void 0===this.prototype[d]&&b.call(c,a[d],d,a)},implement:function(){for(var a=0;aa:">"===b?a>d:"<="===b?d>=a:">="===b?a>=d:void 0:a===d:!0}var d=navigator.userAgent,e=document.createElement("div"),f=-1!==d.indexOf("Gecko")&&-1===d.indexOf("KHTML"),g=-1!==d.indexOf("AppleWebKit/"),h=-1!==d.indexOf("Chrome/"),i=-1!==d.indexOf("Opera/");return{USER_AGENT:d,supported:function(){var c=this.USER_AGENT.toLowerCase(),d="contentEditable"in e,f=document.execCommand&&document.queryCommandSupported&&document.queryCommandState,g=document.querySelector&&document.querySelectorAll,h=this.isIos()&&a(c)<5||this.isAndroid()&&b(c)<4||-1!==c.indexOf("opera mobi")||-1!==c.indexOf("hpwos/");return d&&f&&g&&!h},isTouchDevice:function(){return this.supportsEvent("touchmove")},isIos:function(){return/ipad|iphone|ipod/i.test(this.USER_AGENT)},isAndroid:function(){return-1!==this.USER_AGENT.indexOf("Android")},supportsSandboxedIframes:function(){return c()},throwsMixedContentWarningWhenIframeSrcIsEmpty:function(){return!("querySelector"in document)},displaysCaretInEmptyContentEditableCorrectly:function(){return c()},hasCurrentStyleProperty:function(){return"currentStyle"in e},insertsLineBreaksOnReturn:function(){return f},supportsPlaceholderAttributeOn:function(a){return"placeholder"in a},supportsEvent:function(a){return"on"+a in e||function(){return e.setAttribute("on"+a,"return;"),"function"==typeof e["on"+a]}()},supportsEventsInIframeCorrectly:function(){return!i},supportsHTML5Tags:function(a){var b=a.createElement("div"),c="foo";return b.innerHTML=c,b.innerHTML.toLowerCase()===c},supportsCommand:function(){var a={formatBlock:c(10,"<="),insertUnorderedList:c(9,">="),insertOrderedList:c(9,">=")},b={insertHTML:f};return function(c,d){var e=a[d];if(!e){try{return c.queryCommandSupported(d)}catch(f){}try{return c.queryCommandEnabled(d)}catch(g){return!!b[d]}}return!1}}(),doesAutoLinkingInContentEditable:function(){return c()},canDisableAutoLinking:function(){return this.supportsCommand(document,"AutoUrlDetect")},clearsContentEditableCorrectly:function(){return f||i||g},supportsGetAttributeCorrectly:function(){var a=document.createElement("td");return"1"!=a.getAttribute("rowspan")},canSelectImagesInContentEditable:function(){return f||c()||i},autoScrollsToCaret:function(){return!g},autoClosesUnclosedTags:function(){var a,b,c=e.cloneNode(!1);return c.innerHTML="",b=c.innerHTML.toLowerCase(),a=""===b||""===b,this.autoClosesUnclosedTags=function(){return a},a},supportsNativeGetElementsByClassName:function(){return-1!==String(document.getElementsByClassName).indexOf("[native code]")},supportsSelectionModify:function(){return"getSelection"in window&&"modify"in window.getSelection()},needsSpaceAfterLineBreak:function(){return i},supportsSpeechApiOn:function(a){var b=d.match(/Chrome\/(\d+)/)||[void 0,0];return b[1]>=11&&("onwebkitspeechchange"in a||"speech"in a)},crashesWhenDefineProperty:function(a){return c(9)&&("XMLHttpRequest"===a||"XDomainRequest"===a)},doesAsyncFocus:function(){return c()},hasProblemsSettingCaretAfterImg:function(){return c()},hasUndoInContextMenu:function(){return f||h||i},hasInsertNodeIssue:function(){return i},hasIframeFocusIssue:function(){return c()},createsNestedInvalidMarkupAfterPaste:function(){return g},supportsMutationEvents:function(){return"MutationEvent"in window},supportsModernPaste:function(){return!("clipboardData"in window)},fixStyleKey:function(a){return"cssFloat"===a?"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat":a}}}(),wysihtml5.lang.array=function(a){return{contains:function(b){if(Array.isArray(b)){for(var c=b.length;c--;)if(-1!==wysihtml5.lang.array(a).indexOf(b[c]))return!0;return!1}return-1!==wysihtml5.lang.array(a).indexOf(b)},indexOf:function(b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},without:function(b){b=wysihtml5.lang.array(b);for(var c=[],d=0,e=a.length;e>d;d++)b.contains(a[d])||c.push(a[d]);return c},get:function(){for(var b=0,c=a.length,d=[];c>b;b++)d.push(a[b]);return d},map:function(b,c){if(Array.prototype.map)return a.map(b,c);for(var d=a.length>>>0,e=new Array(d),f=0;d>f;f++)e[f]=b.call(c,a[f],f,a);return e},unique:function(){for(var b=[],c=a.length,d=0;c>d;)wysihtml5.lang.array(b).contains(a[d])||b.push(a[d]),d++;return b}}},wysihtml5.lang.Dispatcher=Base.extend({on:function(a,b){return this.events=this.events||{},this.events[a]=this.events[a]||[],this.events[a].push(b),this},off:function(a,b){this.events=this.events||{};var c,d,e=0;if(a){for(c=this.events[a]||[],d=[];e\t"]/g,d={"&":"&","<":"<",">":">",'"':"""," ":" "};wysihtml5.lang.string=function(e){return e=String(e),{trim:function(){return e.replace(a,"").replace(b,"")},interpolate:function(a){for(var b in a)e=this.replace("#{"+b+"}").by(a[b]);return e},replace:function(a){return{by:function(b){return e.split(a).join(b)}}},escapeHTML:function(a,b){var f=e.replace(c,function(a){return d[a]});return a&&(f=f.replace(/(?:\r\n|\r|\n)/g,"
")),b&&(f=f.replace(/ /gi," ")),f}}}}(),function(a){function b(a,b){return f(a,b)?a:(a===a.ownerDocument.documentElement&&(a=a.ownerDocument.body),g(a,b))}function c(a){return a.replace(i,function(a,b){var c=(b.match(j)||[])[1]||"",d=l[c];b=b.replace(j,""),b.split(d).length>b.split(c).length&&(b+=c,c="");var e=b,f=b;return b.length>k&&(f=f.substr(0,k)+"..."),"www."===e.substr(0,4)&&(e="http://"+e),''+f+""+c})}function d(a){var b=a._wysihtml5_tempElement;return b||(b=a._wysihtml5_tempElement=a.createElement("div")),b}function e(b){var e=b.parentNode,f=a.lang.string(b.data).escapeHTML(),g=d(e.ownerDocument);for(g.innerHTML=""+c(f),g.removeChild(g.firstChild);g.firstChild;)e.insertBefore(g.firstChild,b);e.removeChild(b)}function f(b,c){for(var d;b.parentNode;){if(b=b.parentNode,d=b.nodeName,b.className&&a.lang.array(b.className.split(" ")).contains(c))return!0;if(h.contains(d))return!0;if("body"===d)return!1}return!1}function g(b,c){if(!(h.contains(b.nodeName)||b.className&&a.lang.array(b.className.split(" ")).contains(c))){if(b.nodeType===a.TEXT_NODE&&b.data.match(i))return void e(b);for(var d=a.lang.array(b.childNodes).get(),f=d.length,j=0;f>j;j++)g(d[j],c);return b}}var h=a.lang.array(["CODE","PRE","A","SCRIPT","HEAD","TITLE","STYLE"]),i=/((https?:\/\/|www\.)[^\s<]{3,})/gi,j=/([^\w\/\-](,?))$/i,k=100,l={")":"(","]":"[","}":"{"};a.dom.autoLink=b,a.dom.autoLink.URL_REG_EXP=i}(wysihtml5),function(a){var b=a.dom;b.addClass=function(a,c){var d=a.classList;return d?d.add(c):void(b.hasClass(a,c)||(a.className+=" "+c))},b.removeClass=function(a,b){var c=a.classList;return c?c.remove(b):void(a.className=a.className.replace(new RegExp("(^|\\s+)"+b+"(\\s+|$)")," "))},b.hasClass=function(a,b){var c=a.classList;if(c)return c.contains(b);var d=a.className;return d.length>0&&(d==b||new RegExp("(^|\\s)"+b+"(\\s|$)").test(d))}}(wysihtml5),wysihtml5.dom.contains=function(){var a=document.documentElement;return a.contains?function(a,b){if(b.nodeType!==wysihtml5.ELEMENT_NODE){if(b.parentNode===a)return!0;b=b.parentNode}return a!==b&&a.contains(b)}:a.compareDocumentPosition?function(a,b){return!!(16&a.compareDocumentPosition(b))}:void 0}(),wysihtml5.dom.convertToList=function(){function a(a,b){var c=a.createElement("li");return b.appendChild(c),c}function b(a,b){return a.createElement(b)}function c(c,d,e){if("UL"===c.nodeName||"OL"===c.nodeName||"MENU"===c.nodeName)return c;var f,g,h,i,j,k,l,m,n,o=c.ownerDocument,p=b(o,d),q=c.querySelectorAll("br"),r=q.length;for(n=0;r>n;n++)for(i=q[n];(j=i.parentNode)&&j!==c&&j.lastChild===i;){if("block"===wysihtml5.dom.getStyle("display").from(j)){j.removeChild(i);break}wysihtml5.dom.insert(i).after(i.parentNode)}for(f=wysihtml5.lang.array(c.childNodes).get(),g=f.length,n=0;g>n;n++)m=m||a(o,p),h=f[n],k="block"===wysihtml5.dom.getStyle("display").from(h),l="BR"===h.nodeName,!k||e&&wysihtml5.dom.hasClass(h,e)?l?m=m.firstChild?null:m:m.appendChild(h):(m=m.firstChild?a(o,p):m,m.appendChild(h),m=null);return 0===f.length&&a(o,p),c.parentNode.replaceChild(p,c),p}return c}(),wysihtml5.dom.copyAttributes=function(a){return{from:function(b){return{to:function(c){for(var d,e=0,f=a.length;f>e;e++)d=a[e],"undefined"!=typeof b[d]&&""!==b[d]&&(c[d]=b[d]);return{andTo:arguments.callee}}}}}},function(a){var b=["-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing"],c=function(b){return d(b)?parseInt(a.getStyle("width").from(b),10)d;d++)if("border-box"===a.getStyle(b[d]).from(c))return b[d]};a.copyStyles=function(d){return{from:function(e){c(e)&&(d=wysihtml5.lang.array(d).without(b));for(var f,g="",h=d.length,i=0;h>i;i++)f=d[i],g+=f+":"+a.getStyle(f).from(e)+";";return{to:function(b){return a.setStyles(g).on(b),{andTo:arguments.callee}}}}}}}(wysihtml5.dom),function(a){a.dom.delegate=function(a,b,c,d){var e=function(c){for(var e=c.target,f=3===e.nodeType?e.parentNode:e,g=a.querySelectorAll(b),h=0,i=g.length;i>h;h++)g[h].contains(f)&&d.call(g[h],c)};return a.addEventListener(c,e,!1),{stop:function(){a.removeEventListener(c,e,!1)}}}}(wysihtml5),function(a){function b(a,b){for(var c=[a],d=a;b&&d&&d!==b||!b&&d;)c.unshift(d),d=d.parentNode;return c}a.dom.domNode=function(c){var d=[a.ELEMENT_NODE,a.TEXT_NODE];return{is:{emptyTextNode:function(b){var d=b?/^\s*$/g:/^[\r\n]*$/g;return c.nodeType===a.TEXT_NODE&&d.test(c.data)},visible:function(){var b=!/^\s*$/g.test(a.dom.getTextContent(c));return b||1===c.nodeType&&c.querySelector("img, br, hr, object, embed, canvas, input, textarea")&&(b=!0),b}},prev:function(b){var e=c.previousSibling,f=b&&b.nodeTypes?b.nodeTypes:d;return e?!a.lang.array(f).contains(e.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(e).is.emptyTextNode(!0)?a.dom.domNode(e).prev(b):e:null},next:function(b){var e=c.nextSibling,f=b&&b.nodeTypes?b.nodeTypes:d;return e?!a.lang.array(f).contains(e.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(e).is.emptyTextNode(!0)?a.dom.domNode(e).next(b):e:null},commonAncestor:function(a,d){var e=b(c,d),f=b(a,d);if(e[0]!=f[0])return null;for(var g=0;g0)for(var f=!1,g=Array.isArray(b.styleProperty)?b.styleProperty:[b.styleProperty],h=0,i=g.length;i>h;h++){if(d=a.browser.fixStyleKey(g[h]),c.style[d]){if(!b.styleValue){f=!0;break}if(b.styleValue instanceof RegExp){if(c.style[d].trim().match(b.styleValue).length>0){f=!0;break}}else if(Array.isArray(b.styleValue)){if(b.styleValue.indexOf(c.style[d].trim())){f=!0;break}}else if(b.styleValue===c.style[d].trim().replace(/, /g,",")){f=!0;break}}if(!f)return!1}if(b.attribute){var j=a.dom.getAttributes(c),k=[],l=!1;Array.isArray(b.attribute)?k=b.attribute:k[b.attribute]=b.attributeValue;for(var m in k)if(k.hasOwnProperty(m))if("undefined"==typeof k[m]){if("undefined"!=typeof j[m]){l=!0;break}}else if(j[m]===k[m]){l=!0;break}if(!l)return!1}return!0}}}}(wysihtml5),wysihtml5.dom.getAsDom=function(){var a=function(a,b){var c=b.createElement("div");c.style.display="none",b.body.appendChild(c);try{c.innerHTML=a}catch(d){}return b.body.removeChild(c),c},b=function(a){if(!a._wysihtml5_supportsHTML5Tags){for(var b=0,d=c.length;d>b;b++)a.createElement(c[b]);a._wysihtml5_supportsHTML5Tags=!0}},c=["abbr","article","aside","audio","bdi","canvas","command","datalist","details","figcaption","figure","footer","header","hgroup","keygen","mark","meter","nav","output","progress","rp","rt","ruby","svg","section","source","summary","time","track","video","wbr"];return function(c,d){d=d||document;var e;return"object"==typeof c&&c.nodeType?(e=d.createElement("div"),e.appendChild(c)):wysihtml5.browser.supportsHTML5Tags(d)?(e=d.createElement("div"),e.innerHTML=c):(b(d),e=a(c,d)),e}}(),wysihtml5.dom.getParentElement=function(){return function(a,b,c,d){for(c=c||50;c--&&a&&"BODY"!==a.nodeName&&(!d||a!==d);){if(wysihtml5.dom.domNode(a).test(b))return a;a=a.parentNode}return null}}(),wysihtml5.dom.getStyle=function(){function a(a){return a.replace(c,function(a){return a.charAt(1).toUpperCase()})}var b={"float":"styleFloat"in document.createElement("div").style?"styleFloat":"cssFloat"},c=/\-[a-z]/g;return function(c){return{from:function(d){if(d.nodeType===wysihtml5.ELEMENT_NODE){var e=d.ownerDocument,f=b[c]||a(c),g=d.style,h=d.currentStyle,i=g[f];if(i)return i;if(h)try{return h[f]}catch(j){}var k,l,m=e.defaultView||e.parentWindow,n=("height"===c||"width"===c)&&"TEXTAREA"===d.nodeName;return m.getComputedStyle?(n&&(k=g.overflow,g.overflow="hidden"),l=m.getComputedStyle(d,null).getPropertyValue(c),n&&(g.overflow=k||""),l):void 0}}}}}(),wysihtml5.dom.getTextNodes=function(a,b){var c=[];for(a=a.firstChild;a;a=a.nextSibling)3==a.nodeType?b&&/^\s*$/.test(a.innerText||a.textContent)||c.push(a):c=c.concat(wysihtml5.dom.getTextNodes(a,b));return c},wysihtml5.dom.hasElementWithTagName=function(){function a(a){return a._wysihtml5_identifier||(a._wysihtml5_identifier=c++)}var b={},c=1;return function(c,d){var e=a(c)+":"+d,f=b[e];return f||(f=b[e]=c.getElementsByTagName(d)),f.length>0}}(),function(a){function b(a){return a._wysihtml5_identifier||(a._wysihtml5_identifier=d++)}var c={},d=1;a.dom.hasElementWithClassName=function(d,e){if(!a.browser.supportsNativeGetElementsByClassName())return!!d.querySelector("."+e);var f=b(d)+":"+e,g=c[f];return g||(g=c[f]=d.getElementsByClassName(e)),g.length>0}}(wysihtml5),wysihtml5.dom.insert=function(a){return{after:function(b){b.parentNode.insertBefore(a,b.nextSibling)},before:function(b){b.parentNode.insertBefore(a,b)},into:function(b){b.appendChild(a)}}},wysihtml5.dom.insertCSS=function(a){return a=a.join("\n"),{into:function(b){var c=b.createElement("style");c.type="text/css",c.styleSheet?c.styleSheet.cssText=a:c.appendChild(b.createTextNode(a));var d=b.querySelector("head link");if(d)return void d.parentNode.insertBefore(c,d);var e=b.querySelector("head");e&&e.appendChild(c)}}},function(a){a.dom.lineBreaks=function(b){function c(a){return"BR"===a.nodeName}function d(b){return c(b)?!0:"block"===a.dom.getStyle("display").from(b)?!0:!1}return{add:function(c){var e=b.ownerDocument,f=a.dom.domNode(b).next({ignoreBlankTexts:!0}),g=a.dom.domNode(b).prev({ignoreBlankTexts:!0});f&&!d(f)&&a.dom.insert(e.createElement("br")).after(b),g&&!d(g)&&a.dom.insert(e.createElement("br")).before(b)},remove:function(d){var e=a.dom.domNode(b).next({ignoreBlankTexts:!0}),f=a.dom.domNode(b).prev({ignoreBlankTexts:!0});e&&c(e)&&e.parentNode.removeChild(e),f&&c(f)&&f.parentNode.removeChild(f)}}}}(wysihtml5),wysihtml5.dom.observe=function(a,b,c){b="string"==typeof b?[b]:b;for(var d,e,f=0,g=b.length;g>f;f++)e=b[f],a.addEventListener?a.addEventListener(e,c,!1):(d=function(b){"target"in b||(b.target=b.srcElement),b.preventDefault=b.preventDefault||function(){this.returnValue=!1},b.stopPropagation=b.stopPropagation||function(){this.cancelBubble=!0},c.call(a,b)},a.attachEvent("on"+e,d));return{stop:function(){for(var e,f=0,g=b.length;g>f;f++)e=b[f],a.removeEventListener?a.removeEventListener(e,c,!1):a.detachEvent("on"+e,d)}}},wysihtml5.dom.parse=function(a,b){function c(a,b){wysihtml5.lang.object(t).merge(s).merge(b.rules).get();var c,f,g,h=b.context||a.ownerDocument||document,i=h.createDocumentFragment(),j="string"==typeof a,k=!1;for(b.clearInternals===!0&&(k=!0),c=j?wysihtml5.dom.getAsDom(a,h):a,t.selectors&&e(c,t.selectors);c.firstChild;)g=c.firstChild,f=d(g,b.cleanUp,k,b.uneditableClass),f&&i.appendChild(f),g!==f&&c.removeChild(g);if(b.unjoinNbsps)for(var l=wysihtml5.dom.getTextNodes(i),m=l.length;m--;)l[m].nodeValue=l[m].nodeValue.replace(/([\S\u00A0])\u00A0/gi,"$1 ");return c.innerHTML="",c.appendChild(i),j?wysihtml5.quirks.getCorrectInnerHTML(c):c}function d(a,b,c,e){var f,g,h,i,j=a.nodeType,k=a.childNodes,l=k.length,m=p[j],n=0;if(e&&1===j&&wysihtml5.dom.hasClass(a,e))return a;if(g=m&&m(a,c),!g){if(g===!1){for(f=a.ownerDocument.createDocumentFragment(),n=l;n--;)k[n]&&(h=d(k[n],b,c,e),h&&(k[n]===h&&n--,f.insertBefore(h,f.firstChild)));return i=wysihtml5.dom.getStyle("display").from(a),""===i&&(i=wysihtml5.lang.array(u).contains(a.tagName)?"block":""),wysihtml5.lang.array(["block","flex","table"]).contains(i)&&f.appendChild(a.ownerDocument.createElement("br")),wysihtml5.lang.array(["div","pre","p","table","td","th","ul","ol","li","dd","dl","footer","header","section","h1","h2","h3","h4","h5","h6"]).contains(a.nodeName.toLowerCase())&&a.parentNode.lastChild!==a&&(a.nextSibling&&3===a.nextSibling.nodeType&&/^\s/.test(a.nextSibling.nodeValue)||f.appendChild(a.ownerDocument.createTextNode(" "))),f.normalize&&f.normalize(),f}return null}for(n=0;l>n;n++)k[n]&&(h=d(k[n],b,c,e),h&&(k[n]===h&&n--,g.appendChild(h)));if(b&&g.nodeName.toLowerCase()===q&&(!g.childNodes.length||/^\s*$/gi.test(g.innerHTML)&&(c||"_wysihtml5-temp-placeholder"!==a.className&&"rangySelectionBoundary"!==a.className)||!g.attributes.length)){for(f=g.ownerDocument.createDocumentFragment();g.firstChild;)f.appendChild(g.firstChild);return f.normalize&&f.normalize(),f}return g.normalize&&g.normalize(),g}function e(a,b){var c,d,e;for(c in b)if(b.hasOwnProperty(c)){wysihtml5.lang.object(b[c]).isFunction()?d=b[c]:"string"==typeof b[c]&&z[b[c]]&&(d=z[b[c]]),e=a.querySelectorAll(c);for(var f=e.length;f--;)d(e[f])}}function f(a,b){var c,d,e,f=t.tags,h=a.nodeName.toLowerCase(),j=a.scopeName;if(a._wysihtml5)return null;if(a._wysihtml5=1,"wysihtml5-temp"===a.className)return null;if(j&&"HTML"!=j&&(h=j+":"+h),"outerHTML"in a&&(wysihtml5.browser.autoClosesUnclosedTags()||"P"!==a.nodeName||""===a.outerHTML.slice(-4).toLowerCase()||(h="div")),h in f){if(c=f[h],!c||c.remove)return null;if(c.unwrap)return!1;c="string"==typeof c?{rename_tag:c}:c}else{if(!a.firstChild)return null;c={rename_tag:q}}if(c.one_of_type&&!g(a,t,c.one_of_type,b)){if(!c.remove_action)return null;if("unwrap"===c.remove_action)return!1;if("rename"!==c.remove_action)return null;e=c.remove_action_rename_to||q}return d=a.ownerDocument.createElement(e||c.rename_tag||h),m(a,d,c,b),i(a,d,c),a=null,d.normalize&&d.normalize(),d}function g(a,b,c,d){var e,f;if("SPAN"===a.nodeName&&!d&&("_wysihtml5-temp-placeholder"===a.className||"rangySelectionBoundary"===a.className))return!0;for(f in c)if(c.hasOwnProperty(f)&&b.type_definitions&&b.type_definitions[f]&&(e=b.type_definitions[f],h(a,e)))return!0;return!1}function h(a,b){var c,d,e,f,g,h=a.getAttribute("class"),i=a.getAttribute("style");if(b.methods)for(var j in b.methods)if(b.methods.hasOwnProperty(j)&&y[j]&&y[j](a))return!0;if(h&&b.classes){h=h.replace(/^\s+/g,"").replace(/\s+$/g,"").split(r),c=h.length;for(var k=0;c>k;k++)if(b.classes[h[k]])return!0}if(i&&b.styles){i=i.split(";");for(d in b.styles)if(b.styles.hasOwnProperty(d))for(var l=i.length;l--;)if(g=i[l].split(":"),g[0].replace(/\s/g,"").toLowerCase()===d&&(b.styles[d]===!0||1===b.styles[d]||wysihtml5.lang.array(b.styles[d]).contains(g[1].replace(/\s/g,"").toLowerCase())))return!0}if(b.attrs)for(e in b.attrs)if(b.attrs.hasOwnProperty(e)&&(f=wysihtml5.dom.getAttribute(a,e),"string"==typeof f&&f.search(b.attrs[e])>-1))return!0;return!1}function i(a,b,c){var d,e;if(c&&c.keep_styles)for(d in c.keep_styles)if(c.keep_styles.hasOwnProperty(d)){if(e="float"===d?a.style.styleFloat||a.style.cssFloat:a.style[d],c.keep_styles[d]instanceof RegExp&&!c.keep_styles[d].test(e))continue;"float"===d?b.style[a.style.styleFloat?"styleFloat":"cssFloat"]=e:a.style[d]&&(b.style[d]=e)}}function j(a,b){var c=[];for(var d in b)b.hasOwnProperty(d)&&0===d.indexOf(a)&&c.push(d);return c}function k(a,b,c,d){var e,f=wysihtml5.lang.object(c).isFunction()?c:v[c];return f&&(e=f(b,d),"string"==typeof e)?e:!1}function l(a,b){var c,d,e,f=wysihtml5.lang.object(t.attributes||{}).clone(),g=wysihtml5.lang.object(f).merge(wysihtml5.lang.object(b||{}).clone()).get(),h={},i=wysihtml5.dom.getAttributes(a);for(c in g)if(/\*$/.test(c)){e=j(c.slice(0,-1),i);for(var l=0,m=e.length;m>l;l++)d=k(e[l],i[e[l]],g[c],a.nodeName),d!==!1&&(h[e[l]]=d)}else d=k(c,i[c],g[c],a.nodeName),d!==!1&&(h[c]=d);return h}function m(a,b,c,d){var e,f,g,h,i,j={},k=c.set_class,m=c.add_class,n=c.add_style,o=c.set_attributes,p=t.classes,q=0,s=[],u=[],v=[],y=[];if(o&&(j=wysihtml5.lang.object(o).clone()),j=wysihtml5.lang.object(j).merge(l(a,c.check_attributes)).get(),k&&s.push(k),m)for(h in m)i=x[m[h]],i&&(g=i(wysihtml5.dom.getAttribute(a,h)),"string"==typeof g&&s.push(g));if(n)for(h in n)i=w[n[h]],i&&(newStyle=i(wysihtml5.dom.getAttribute(a,h)),"string"==typeof newStyle&&u.push(newStyle));if("string"==typeof p&&"any"===p&&a.getAttribute("class"))if(t.classes_blacklist){for(y=a.getAttribute("class"),y&&(s=s.concat(y.split(r))),e=s.length;e>q;q++)f=s[q],t.classes_blacklist[f]||v.push(f);v.length&&(j["class"]=wysihtml5.lang.array(v).unique().join(" "))}else j["class"]=a.getAttribute("class");else{for(d||(p["_wysihtml5-temp-placeholder"]=1,p._rangySelectionBoundary=1,p["wysiwyg-tmp-selected-cell"]=1),y=a.getAttribute("class"),y&&(s=s.concat(y.split(r))),e=s.length;e>q;q++)f=s[q],p[f]&&v.push(f);v.length&&(j["class"]=wysihtml5.lang.array(v).unique().join(" "))}j["class"]&&d&&(j["class"]=j["class"].replace("wysiwyg-tmp-selected-cell",""),/^\s*$/g.test(j["class"])&&delete j["class"]),u.length&&(j.style=wysihtml5.lang.array(u).unique().join(" "));for(h in j)try{b.setAttribute(h,j[h])}catch(z){}j.src&&("undefined"!=typeof j.width&&b.setAttribute("width",j.width),"undefined"!=typeof j.height&&b.setAttribute("height",j.height))}function n(a){var b=a.nextSibling;if(!b||b.nodeType!==wysihtml5.TEXT_NODE){var c=a.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"");return a.ownerDocument.createTextNode(c)}b.data=a.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")+b.data.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")}function o(a){return t.comments?a.ownerDocument.createComment(a.nodeValue):void 0}var p={1:f,3:n,8:o},q="span",r=/\s+/,s={tags:{},classes:{}},t={},u=["ADDRESS","BLOCKQUOTE","CENTER","DIR","DIV","DL","FIELDSET","FORM","H1","H2","H3","H4","H5","H6","ISINDEX","MENU","NOFRAMES","NOSCRIPT","OL","P","PRE","TABLE","UL"],v={url:function(){var a=/^https?:\/\//i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),src:function(){var a=/^(\/|https?:\/\/)/i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),href:function(){var a=/^(#|\/|https?:\/\/|mailto:|tel:)/i;return function(b){return b&&b.match(a)?b.replace(a,function(a){return a.toLowerCase()}):null}}(),alt:function(){var a=/[^ a-z0-9_\-]/gi;return function(b,c){return b?b.replace(a,""):"IMG"===c?"":null}}(),numbers:function(){var a=/\D/g;return function(b){return b=(b||"").replace(a,""),b||null}}(),dimension:function(){var a=/\D*(\d+)(\.\d+)?\s?(%)?\D*/;return function(b){return b=(b||"").replace(a,"$1$2$3"),b||null}}(),any:function(){return function(a){return a?a:null}}()},w={align_text:function(){var a={left:"text-align: left;",right:"text-align: right;",center:"text-align: center;"};return function(b){return a[String(b).toLowerCase()]}}()},x={align_img:function(){var a={left:"wysiwyg-float-left",right:"wysiwyg-float-right"};return function(b){return a[String(b).toLowerCase()]}}(),align_text:function(){var a={left:"wysiwyg-text-align-left",right:"wysiwyg-text-align-right",center:"wysiwyg-text-align-center",justify:"wysiwyg-text-align-justify"};return function(b){return a[String(b).toLowerCase()]}}(),clear_br:function(){var a={left:"wysiwyg-clear-left",right:"wysiwyg-clear-right",both:"wysiwyg-clear-both",all:"wysiwyg-clear-both"};return function(b){return a[String(b).toLowerCase()]}}(),size_font:function(){var a={1:"wysiwyg-font-size-xx-small",2:"wysiwyg-font-size-small",3:"wysiwyg-font-size-medium",4:"wysiwyg-font-size-large",5:"wysiwyg-font-size-x-large",6:"wysiwyg-font-size-xx-large",7:"wysiwyg-font-size-xx-large","-":"wysiwyg-font-size-smaller","+":"wysiwyg-font-size-larger"};return function(b){return a[String(b).charAt(0)]}}()},y={has_visible_contet:function(){var a,b=["img","video","picture","br","script","noscript","style","table","iframe","object","embed","audio","svg","input","button","select","textarea","canvas"];return function(c){if(a=(c.innerText||c.textContent).replace(/\s/g,""),a&&a.length>0)return!0;for(var d=b.length;d--;)if(c.querySelector(b[d]))return!0;return c.offsetWidth&&c.offsetWidth>0&&c.offsetHeight&&c.offsetHeight>0?!0:!1}}()},z={unwrap:function(a){wysihtml5.dom.unwrap(a)},remove:function(a){a.parentNode.removeChild(a)}};return c(a,b)},wysihtml5.dom.removeEmptyTextNodes=function(a){for(var b,c=wysihtml5.lang.array(a.childNodes).get(),d=c.length,e=0;d>e;e++)b=c[e],b.nodeType===wysihtml5.TEXT_NODE&&/^[\n\r]*$/.test(b.data)&&b.parentNode.removeChild(b)},wysihtml5.dom.renameElement=function(a,b){for(var c,d=a.ownerDocument.createElement(b);c=a.firstChild;)d.appendChild(c);return wysihtml5.dom.copyAttributes(["align","className"]).from(a).to(d),a.parentNode&&a.parentNode.replaceChild(d,a),d},wysihtml5.dom.replaceWithChildNodes=function(a){if(a.parentNode){if(!a.firstChild)return void a.parentNode.removeChild(a);for(var b=a.ownerDocument.createDocumentFragment();a.firstChild;)b.appendChild(a.firstChild);a.parentNode.replaceChild(b,a),a=b=null}},function(a){function b(b){return"block"===a.getStyle("display").from(b)}function c(a){return"BR"===a.nodeName}function d(a){var b=a.ownerDocument.createElement("br");a.appendChild(b)}function e(a,e){if(a.nodeName.match(/^(MENU|UL|OL)$/)){var f,g,h,i,j,k,l,m=a.ownerDocument,n=m.createDocumentFragment(),o=wysihtml5.dom.domNode(a).prev({ignoreBlankTexts:!0}),p=wysihtml5.dom.domNode(a).next({ignoreBlankTexts:!0}),q=a.lastElementChild||a.lastChild;if(e)for(!o||b(o)||c(o)||d(n);k=a.firstElementChild||a.firstChild;){for(g=k.lastChild,l=k===q;f=k.firstChild;)h=f===g,i=(!l||p&&!b(p))&&h&&!b(f)&&!c(f),n.appendChild(f),i&&d(n);k.parentNode.removeChild(k)}else for(;k=a.firstElementChild||a.firstChild;){if(k.querySelector&&k.querySelector("div, p, ul, ol, menu, blockquote, h1, h2, h3, h4, h5, h6"))for(;f=k.firstChild;)n.appendChild(f);else{for(j=m.createElement("p");f=k.firstChild;)j.appendChild(f);n.appendChild(j)}k.parentNode.removeChild(k)}a.parentNode.replaceChild(n,a)}}a.resolveList=e}(wysihtml5.dom),function(a){var b=document,c=["parent","top","opener","frameElement","frames","localStorage","globalStorage","sessionStorage","indexedDB"],d=["open","close","openDialog","showModalDialog","alert","confirm","prompt","openDatabase","postMessage","XMLHttpRequest","XDomainRequest"],e=["referrer","write","open","close"];a.dom.Sandbox=Base.extend({constructor:function(b,c){this.callback=b||a.EMPTY_FUNCTION,this.config=a.lang.object({}).merge(c).get(),this.config.className||(this.config.className="wysihtml5-sandbox"),this.editableArea=this._createIframe()},insertInto:function(a){"string"==typeof a&&(a=b.getElementById(a)),a.appendChild(this.editableArea)},getIframe:function(){return this.editableArea},getWindow:function(){this._readyError()},getDocument:function(){this._readyError()},destroy:function(){var a=this.getIframe();a.parentNode.removeChild(a)},_readyError:function(){throw new Error("wysihtml5.Sandbox: Sandbox iframe isn't loaded yet")},_createIframe:function(){var c=this,d=b.createElement("iframe");return d.className=this.config.className,a.dom.setAttributes({security:"restricted",allowtransparency:"true",frameborder:0,width:0,height:0,marginwidth:0,marginheight:0}).on(d),a.browser.throwsMixedContentWarningWhenIframeSrcIsEmpty()&&(d.src="javascript:''"),d.onload=function(){d.onreadystatechange=d.onload=null,c._onLoadIframe(d)},d.onreadystatechange=function(){/loaded|complete/.test(d.readyState)&&(d.onreadystatechange=d.onload=null,c._onLoadIframe(d))},d},_onLoadIframe:function(f){if(a.dom.contains(b.documentElement,f)){var g=this,h=f.contentWindow,i=f.contentWindow.document,j=b.characterSet||b.charset||"utf-8",k=this._getHtml({charset:j,stylesheets:this.config.stylesheets});if(i.open("text/html","replace"),i.write(k),i.close(),this.getWindow=function(){return f.contentWindow},this.getDocument=function(){return f.contentWindow.document},h.onerror=function(a,b,c){throw new Error("wysihtml5.Sandbox: "+a,b,c)},!a.browser.supportsSandboxedIframes()){var l,m;for(l=0,m=c.length;m>l;l++)this._unset(h,c[l]);for(l=0,m=d.length;m>l;l++)this._unset(h,d[l],a.EMPTY_FUNCTION);for(l=0,m=e.length;m>l;l++)this._unset(i,e[l]);this._unset(i,"cookie","",!0)}a.polyfills&&a.polyfills(h,i),this.loaded=!0,setTimeout(function(){g.callback(g)},0)}},_getHtml:function(b){var c,d=b.stylesheets,e="",f=0;if(d="string"==typeof d?[d]:d)for(c=d.length;c>f;f++)e+='';return b.stylesheets=e,a.lang.string('#{stylesheets}').interpolate(b)},_unset:function(b,c,d,e){try{b[c]=d}catch(f){}try{b.__defineGetter__(c,function(){return d})}catch(f){}if(e)try{b.__defineSetter__(c,function(){})}catch(f){}if(!a.browser.crashesWhenDefineProperty(c))try{var g={get:function(){return d}};e&&(g.set=function(){}),Object.defineProperty(b,c,g)}catch(f){}}})}(wysihtml5),function(a){var b=document;a.dom.ContentEditableArea=Base.extend({getContentEditable:function(){return this.element},getWindow:function(){return this.element.ownerDocument.defaultView||this.element.ownerDocument.parentWindow},getDocument:function(){return this.element.ownerDocument},constructor:function(b,c,d){this.callback=b||a.EMPTY_FUNCTION,this.config=a.lang.object({}).merge(c).get(),this.config.className||(this.config.className="wysihtml5-sandbox"),d?this.element=this._bindElement(d):this.element=this._createElement()},_createElement:function(){var a=b.createElement("div");return a.className=this.config.className,this._loadElement(a),a},_bindElement:function(a){return a.className=a.className?a.className+" wysihtml5-sandbox":"wysihtml5-sandbox",this._loadElement(a,!0),a},_loadElement:function(a,b){var c=this;if(!b){var d=this._getHtml();a.innerHTML=d}this.loaded=!0,setTimeout(function(){c.callback(c)},0)},_getHtml:function(a){return""}})}(wysihtml5),function(){var a={className:"class"};wysihtml5.dom.setAttributes=function(b){return{on:function(c){for(var d in b)c.setAttribute(a[d]||d,b[d])}}}}(),wysihtml5.dom.setStyles=function(a){return{on:function(b){var c=b.style;if("string"==typeof a)return void(c.cssText+=";"+a);for(var d in a)"float"===d?(c.cssFloat=a[d],c.styleFloat=a[d]):c[d]=a[d]}}},function(a){a.simulatePlaceholder=function(b,c,d,e){var f=e||"wysihtml5-placeholder",g=function(){var b=c.element.offsetWidth>0&&c.element.offsetHeight>0;c.hasPlaceholderSet()&&(c.clear(),c.element.focus(),b&&setTimeout(function(){var a=c.selection.getSelection();a.focusNode&&a.anchorNode||c.selection.selectNode(c.element.firstChild||c.element)},0)),c.placeholderSet=!1,a.removeClass(c.element,f)},h=function(){c.isEmpty()&&!c.placeholderSet&&(c.placeholderSet=!0,c.setValue(d),a.addClass(c.element,f))};b.on("set_placeholder",h).on("unset_placeholder",g).on("focus:composer",g).on("paste:composer",g).on("blur:composer",h),h()}}(wysihtml5.dom),function(a){var b=document.documentElement;"textContent"in b?(a.setTextContent=function(a,b){a.textContent=b},a.getTextContent=function(a){return a.textContent}):"innerText"in b?(a.setTextContent=function(a,b){a.innerText=b},a.getTextContent=function(a){return a.innerText}):(a.setTextContent=function(a,b){a.nodeValue=b},a.getTextContent=function(a){return a.nodeValue})}(wysihtml5.dom),wysihtml5.dom.getAttribute=function(a,b){var c=!wysihtml5.browser.supportsGetAttributeCorrectly();b=b.toLowerCase();var d=a.nodeName;if("IMG"==d&&"src"==b&&wysihtml5.dom.isLoadedImage(a)===!0)return a.src;if(c&&"outerHTML"in a){var e=a.outerHTML.toLowerCase(),f=-1!=e.indexOf(" "+b+"=");return f?a.getAttribute(b):null}return a.getAttribute(b)},wysihtml5.dom.getAttributes=function(a){var b,c=!wysihtml5.browser.supportsGetAttributeCorrectly(),d=a.nodeName,e=[];for(b in a.attributes)(a.attributes.hasOwnProperty&&a.attributes.hasOwnProperty(b)||!a.attributes.hasOwnProperty&&Object.prototype.hasOwnProperty.call(a.attributes,b))&&a.attributes[b].specified&&("IMG"==d&&"src"==a.attributes[b].name.toLowerCase()&&wysihtml5.dom.isLoadedImage(a)===!0?e.src=a.src:wysihtml5.lang.array(["rowspan","colspan"]).contains(a.attributes[b].name.toLowerCase())&&c?1!==a.attributes[b].value&&(e[a.attributes[b].name]=a.attributes[b].value):e[a.attributes[b].name]=a.attributes[b].value);return e},wysihtml5.dom.isLoadedImage=function(a){try{return a.complete&&!a.mozMatchesSelector(":-moz-broken")}catch(b){if(a.complete&&"complete"===a.readyState)return!0}},function(a){function b(a,b){for(var c,d=[],e=0,f=a.length;f>e;e++)if(c=a[e].querySelectorAll(b))for(var g=c.length;g--;d.unshift(c[g]));return d}function d(a){a.parentNode.removeChild(a)}function e(a,b){a.parentNode.insertBefore(b,a.nextSibling)}function f(a,b){for(var c=a.nextSibling;1!=c.nodeType;)if(c=c.nextSibling,!b||b==c.tagName.toLowerCase())return c;return null}var g=a.dom,h=function(a){this.el=a,this.isColspan=!1,this.isRowspan=!1,this.firstCol=!0,this.lastCol=!0,this.firstRow=!0,this.lastRow=!0,this.isReal=!0,this.spanCollection=[],this.modified=!1},i=function(a,b){a?(this.cell=a,this.table=g.getParentElement(a,{query:"table"})):b&&(this.table=b,this.cell=this.table.querySelectorAll("th, td")[0])};i.prototype={addSpannedCellToMap:function(a,b,c,d,e,f){for(var g=[],i=c+(f?parseInt(f,10)-1:0),j=d+(e?parseInt(e,10)-1:0),k=c;i>=k;k++){"undefined"==typeof b[k]&&(b[k]=[]);for(var l=d;j>=l;l++)b[k][l]=new h(a),b[k][l].isColspan=e&&parseInt(e,10)>1,b[k][l].isRowspan=f&&parseInt(f,10)>1,b[k][l].firstCol=l==d,b[k][l].lastCol=l==j,b[k][l].firstRow=k==c,b[k][l].lastRow=k==i,b[k][l].isReal=l==d&&k==c,b[k][l].spanCollection=g,g.push(b[k][l])}},setCellAsModified:function(a){if(a.modified=!0,a.spanCollection.length>0)for(var b=0,c=a.spanCollection.length;c>b;b++)a.spanCollection[b].modified=!0},setTableMap:function(){var a,b,c,d,e,f,i,j,k=[],l=this.getTableRows();for(a=0;a0?a.lang.array(f).without(e):f;return g},getTableRows:function(){var c=this.table.querySelectorAll("table"),d=c?b(c,"tr"):[],e=this.table.querySelectorAll("tr"),f=d.length>0?a.lang.array(e).without(d):e;return f},getMapIndex:function(a){for(var b=this.map.length,c=this.map&&this.map[0]?this.map[0].length:0,d=0;b>d;d++)for(var e=0;c>e;e++)if(this.map[d][e].el===a)return{row:d,col:e};return!1},getElementAtIndex:function(a){return this.setTableMap(),this.map[a.row]&&this.map[a.row][a.col]&&this.map[a.row][a.col].el?this.map[a.row][a.col].el:null},getMapElsTo:function(a){var b=[];if(this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(a),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var c=this.idx_start;this.idx_start=this.idx_end,this.idx_end=c}if(this.idx_start.col>this.idx_end.col){var d=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=d}if(null!=this.idx_start&&null!=this.idx_end)for(var e=this.idx_start.row,f=this.idx_end.row;f>=e;e++)for(var g=this.idx_start.col,h=this.idx_end.col;h>=g;g++)b.push(this.map[e][g].el);return b},orderSelectionEnds:function(a){if(this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(a),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var b=this.idx_start;this.idx_start=this.idx_end,this.idx_end=b}if(this.idx_start.col>this.idx_end.col){var c=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=c}return{start:this.map[this.idx_start.row][this.idx_start.col].el,end:this.map[this.idx_end.row][this.idx_end.col].el}},createCells:function(a,b,c){for(var d,e=this.table.ownerDocument,f=e.createDocumentFragment(),g=0;b>g;g++){if(d=e.createElement(a),c)for(var h in c)c.hasOwnProperty(h)&&d.setAttribute(h,c[h]);d.appendChild(document.createTextNode(" ")),f.appendChild(d)}return f},correctColIndexForUnreals:function(a,b){for(var c=this.map[b],d=-1,e=0;a>e;e++)c[e].isReal&&d++;return d},getLastNewCellOnRow:function(a,b){for(var c,d,e=this.getRowCells(a),f=0,g=e.length;g>f;f++)if(c=e[f],d=this.getMapIndex(c),d===!1||"undefined"!=typeof b&&d.row!=b)return c;return null},removeEmptyTable:function(){var a=this.table.querySelectorAll("td, th");return a&&0!=a.length?!1:(d(this.table),!0)},splitRowToCells:function(a){if(a.isColspan){var b=parseInt(g.getAttribute(a.el,"colspan")||1,10),c=a.el.tagName.toLowerCase();if(b>1){var d=this.createCells(c,b-1);e(a.el,d)}a.el.removeAttribute("colspan")}},getRealRowEl:function(a,b){var c=null,d=null;b=b||this.idx;for(var e=0,f=this.map[b.row].length;f>e;e++)if(d=this.map[b.row][e],d.isReal&&(c=g.getParentElement(d.el,{query:"tr"})))return c;return null===c&&a&&(c=g.getParentElement(this.map[b.row][b.col].el,{query:"tr"})||null),c},injectRowAt:function(a,b,c,d,f){var h=this.getRealRowEl(!1,{row:a,col:b}),i=this.createCells(d,c);if(h){var j=this.correctColIndexForUnreals(b,a);j>=0?e(this.getRowCells(h)[j],i):h.insertBefore(i,h.firstChild)}else{var k=this.table.ownerDocument.createElement("tr");k.appendChild(i),e(g.getParentElement(f.el,{query:"tr"}),k)}},canMerge:function(a){if(this.to=a,this.setTableMap(),this.idx_start=this.getMapIndex(this.cell),this.idx_end=this.getMapIndex(this.to),this.idx_start.row>this.idx_end.row||this.idx_start.row==this.idx_end.row&&this.idx_start.col>this.idx_end.col){var b=this.idx_start;this.idx_start=this.idx_end,this.idx_end=b}if(this.idx_start.col>this.idx_end.col){var c=this.idx_start.col;this.idx_start.col=this.idx_end.col,this.idx_end.col=c}for(var d=this.idx_start.row,e=this.idx_end.row;e>=d;d++)for(var f=this.idx_start.col,g=this.idx_end.col;g>=f;f++)if(this.map[d][f].isColspan||this.map[d][f].isRowspan)return!1;return!0},decreaseCellSpan:function(a,b){var c=parseInt(g.getAttribute(a.el,b),10)-1;c>=1?a.el.setAttribute(b,c):(a.el.removeAttribute(b),"colspan"==b&&(a.isColspan=!1),"rowspan"==b&&(a.isRowspan=!1),a.firstCol=!0,a.lastCol=!0,a.firstRow=!0,a.lastRow=!0,a.isReal=!0)},removeSurplusLines:function(){var a,b,c,e,f,h,i;if(this.setTableMap(),this.map){for(c=0,e=this.map.length;e>c;c++){for(a=this.map[c],i=!0,f=0,h=a.length;h>f;f++)if(b=a[f],!(g.getAttribute(b.el,"rowspan")&&parseInt(g.getAttribute(b.el,"rowspan"),10)>1&&b.firstRow!==!0)){i=!1;break}if(i)for(f=0;h>f;f++)this.decreaseCellSpan(a[f],"rowspan")}var j=this.getTableRows();for(c=0,e=j.length;e>c;c++)a=j[c],0==a.childNodes.length&&/^\s*$/.test(a.textContent||a.innerText)&&d(a)}},fillMissingCells:function(){var a=0,b=0,c=null;if(this.setTableMap(),this.map){a=this.map.length;for(var d=0;a>d;d++)this.map[d].length>b&&(b=this.map[d].length);for(var f=0;a>f;f++)for(var g=0;b>g;g++)this.map[f]&&!this.map[f][g]&&g>0&&(this.map[f][g]=new h(this.createCells("td",1)),c=this.map[f][g-1],c&&c.el&&c.el.parent&&e(this.map[f][g-1].el,this.map[f][g].el))}},rectify:function(){return this.removeEmptyTable()?!1:(this.removeSurplusLines(),this.fillMissingCells(),!0)},unmerge:function(){if(this.rectify()&&(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx)){var a=this.map[this.idx.row][this.idx.col],b=g.getAttribute(a.el,"colspan")?parseInt(g.getAttribute(a.el,"colspan"),10):1,c=a.el.tagName.toLowerCase();if(a.isRowspan){var d=parseInt(g.getAttribute(a.el,"rowspan"),10);if(d>1)for(var e=1,f=d-1;f>=e;e++)this.injectRowAt(this.idx.row+e,this.idx.col,b,c,a);a.el.removeAttribute("rowspan")}this.splitRowToCells(a)}},merge:function(a){if(this.rectify())if(this.canMerge(a)){for(var b=this.idx_end.row-this.idx_start.row+1,c=this.idx_end.col-this.idx_start.col+1,e=this.idx_start.row,f=this.idx_end.row;f>=e;e++)for(var g=this.idx_start.col,h=this.idx_end.col;h>=g;g++)e==this.idx_start.row&&g==this.idx_start.col?(b>1&&this.map[e][g].el.setAttribute("rowspan",b),c>1&&this.map[e][g].el.setAttribute("colspan",c)):(/^\s*
\s*$/.test(this.map[e][g].el.innerHTML.toLowerCase())||(this.map[this.idx_start.row][this.idx_start.col].el.innerHTML+=" "+this.map[e][g].el.innerHTML),d(this.map[e][g].el));this.rectify()}else window.console&&console.log("Do not know how to merge allready merged cells.")},collapseCellToNextRow:function(a){var b=this.getMapIndex(a.el),c=b.row+1,d={row:c,col:b.col};if(c=0)e(this.getRowCells(f)[h],a.el);else{var i=this.getLastNewCellOnRow(f,c);null!==i?e(i,a.el):f.insertBefore(a.el,f.firstChild)}parseInt(g.getAttribute(a.el,"rowspan"),10)>2?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)-1):a.el.removeAttribute("rowspan")}}},removeRowCell:function(a){a.isReal?a.isRowspan?this.collapseCellToNextRow(a):d(a.el):parseInt(g.getAttribute(a.el,"rowspan"),10)>2?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)-1):a.el.removeAttribute("rowspan")},getRowElementsByCell:function(){var a=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=this.map[this.idx.row],c=0,d=b.length;d>c;c++)b[c].isReal&&a.push(b[c].el);return a},getColumnElementsByCell:function(){var a=[];if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=0,c=this.map.length;c>b;b++)this.map[b][this.idx.col]&&this.map[b][this.idx.col].isReal&&a.push(this.map[b][this.idx.col].el);return a},removeRow:function(){var a=g.getParentElement(this.cell,{query:"tr"});if(a){if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var b=this.map[this.idx.row],c=0,e=b.length;e>c;c++)b[c].modified||(this.setCellAsModified(b[c]),this.removeRowCell(b[c]));d(a)}},removeColCell:function(a){a.isColspan?parseInt(g.getAttribute(a.el,"colspan"),10)>2?a.el.setAttribute("colspan",parseInt(g.getAttribute(a.el,"colspan"),10)-1):a.el.removeAttribute("colspan"):a.isReal&&d(a.el)},removeColumn:function(){if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),this.idx!==!1)for(var a=0,b=this.map.length;b>a;a++)this.map[a][this.idx.col].modified||(this.setCellAsModified(this.map[a][this.idx.col]),this.removeColCell(this.map[a][this.idx.col]))},remove:function(a){if(this.rectify()){switch(a){case"row":this.removeRow();break;case"column":this.removeColumn()}this.rectify()}},addRow:function(a){var b=this.table.ownerDocument;if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),"below"==a&&g.getAttribute(this.cell,"rowspan")&&(this.idx.row=this.idx.row+parseInt(g.getAttribute(this.cell,"rowspan"),10)-1),this.idx!==!1){for(var c=this.map[this.idx.row],d=b.createElement("tr"),f=0,h=c.length;h>f;f++)c[f].modified||(this.setCellAsModified(c[f]),this.addRowCell(c[f],d,a));switch(a){case"below":e(this.getRealRowEl(!0),d);break;case"above":var i=g.getParentElement(this.map[this.idx.row][this.idx.col].el,{query:"tr"});i&&i.parentNode.insertBefore(d,i)}}},addRowCell:function(a,b,d){var e=a.isColspan?{colspan:g.getAttribute(a.el,"colspan")}:null;a.isReal?"above"!=d&&a.isRowspan?a.el.setAttribute("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)+1):b.appendChild(this.createCells("td",1,e)):"above"!=d&&a.isRowspan&&a.lastRow?b.appendChild(this.createCells("td",1,e)):c.isRowspan&&a.el.attr("rowspan",parseInt(g.getAttribute(a.el,"rowspan"),10)+1)},add:function(a){this.rectify()&&(("below"==a||"above"==a)&&this.addRow(a),("before"==a||"after"==a)&&this.addColumn(a))},addColCell:function(a,b,d){var f,h=a.el.tagName.toLowerCase();switch(d){case"before":f=!a.isColspan||a.firstCol;break;case"after":f=!a.isColspan||a.lastCol||a.isColspan&&c.el==this.cell}if(f){switch(d){case"before":a.el.parentNode.insertBefore(this.createCells(h,1),a.el);break;case"after":e(a.el,this.createCells(h,1))}a.isRowspan&&this.handleCellAddWithRowspan(a,b+1,d)}else a.el.setAttribute("colspan",parseInt(g.getAttribute(a.el,"colspan"),10)+1)},addColumn:function(a){var b,c;if(this.setTableMap(),this.idx=this.getMapIndex(this.cell),"after"==a&&g.getAttribute(this.cell,"colspan")&&(this.idx.col=this.idx.col+parseInt(g.getAttribute(this.cell,"colspan"),10)-1),this.idx!==!1)for(var d=0,e=this.map.length;e>d;d++)b=this.map[d],b[this.idx.col]&&(c=b[this.idx.col],c.modified||(this.setCellAsModified(c),this.addColCell(c,d,a)))},handleCellAddWithRowspan:function(a,b,c){for(var d,h,i,j=parseInt(g.getAttribute(this.cell,"rowspan"),10)-1,k=g.getParentElement(a.el,{query:"tr"}),l=a.el.tagName.toLowerCase(),m=this.table.ownerDocument,n=0;j>n;n++)if(d=this.correctColIndexForUnreals(this.idx.col,b+n),k=f(k,"tr"))if(d>0)switch(c){case"before":h=this.getRowCells(k),d>0&&this.map[b+n][this.idx.col].el!=h[d]&&d==h.length-1?e(h[d],this.createCells(l,1)):h[d].parentNode.insertBefore(this.createCells(l,1),h[d]);break;case"after":e(this.getRowCells(k)[d],this.createCells(l,1))}else k.insertBefore(this.createCells(l,1),k.firstChild);else i=m.createElement("tr"),i.appendChild(this.createCells(l,1)),this.table.appendChild(i)}},g.table={getCellsBetween:function(a,b){var c=new i(a);return c.getMapElsTo(b)},addCells:function(a,b){var c=new i(a);c.add(b)},removeCells:function(a,b){var c=new i(a);c.remove(b)},mergeCellsBetween:function(a,b){var c=new i(a);c.merge(b)},unmergeCell:function(a){var b=new i(a);b.unmerge()},orderSelectionEnds:function(a,b){var c=new i(a);return c.orderSelectionEnds(b)},indexOf:function(a){var b=new i(a);return b.setTableMap(),b.getMapIndex(a)},findCell:function(a,b){var c=new i(null,a);return c.getElementAtIndex(b)},findRowByCell:function(a){var b=new i(a);return b.getRowElementsByCell()},findColumnByCell:function(a){var b=new i(a);return b.getColumnElementsByCell()},canMerge:function(a,b){var c=new i(a);return c.canMerge(b)}}}(wysihtml5),wysihtml5.dom.query=function(a,b){var c,d=[];a.nodeType&&(a=[a]);for(var e=0,f=a.length;f>e;e++)if(c=a[e].querySelectorAll(b))for(var g=c.length;g--;d.unshift(c[g]));return d},wysihtml5.dom.compareDocumentPosition=function(){var a=document.documentElement;return a.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)}:function(a,b){var c,d;if(c=9===a.nodeType?a:a.ownerDocument,d=9===b.nodeType?b:b.ownerDocument,a===b)return 0;if(a===b.ownerDocument)return 20;if(a.ownerDocument===b)return 10;if(c!==d)return 1;if(2===a.nodeType&&a.childNodes&&-1!==wysihtml5.lang.array(a.childNodes).indexOf(b))return 20;if(2===b.nodeType&&b.childNodes&&-1!==wysihtml5.lang.array(b.childNodes).indexOf(a))return 10;for(var e=a,f=[],g=null;e;){if(e==b)return 10;f.push(e),e=e.parentNode}for(e=b,g=null;e;){if(e==a)return 20;var h=wysihtml5.lang.array(f).indexOf(e);if(-1!==h){var i=f[h],j=wysihtml5.lang.array(i.childNodes).indexOf(f[h-1]),k=wysihtml5.lang.array(i.childNodes).indexOf(g);return j>k?2:4}g=e,e=e.parentNode}return 1}}(),wysihtml5.dom.unwrap=function(a){var b=[];if(a.parentNode){for(;a.lastChild;)b.unshift(a.lastChild),wysihtml5.dom.insert(a.lastChild).after(a);a.parentNode.removeChild(a)}return b},wysihtml5.dom.getPastedHtml=function(a){var b;return a.clipboardData&&(wysihtml5.lang.array(a.clipboardData.types).contains("text/html")?b=a.clipboardData.getData("text/html"):wysihtml5.lang.array(a.clipboardData.types).contains("text/plain")&&(b=wysihtml5.lang.string(a.clipboardData.getData("text/plain")).escapeHTML(!0,!0))),b},wysihtml5.dom.getPastedHtmlWithDiv=function(a,b){var c=a.selection.getBookmark(),d=a.element.ownerDocument,e=d.createElement("DIV"),f=a.getScrollPos();d.body.appendChild(e),e.style.width="1px",e.style.height="1px",e.style.overflow="hidden",e.style.position="absolute",e.style.top=f.y+"px",e.style.left=f.x+"px",e.setAttribute("contenteditable","true"),e.focus(),setTimeout(function(){var d;a.selection.setBookmark(c),d=e.innerHTML,d&&/^
$/i.test(d.trim())&&(d=!1),b(d),e.parentNode.removeChild(e)},0)},wysihtml5.dom.removeInvisibleSpaces=function(a){for(var b=wysihtml5.dom.getTextNodes(a),c=b.length;c--;)b[c].nodeValue=b[c].nodeValue.replace(wysihtml5.INVISIBLE_SPACE_REG_EXP,"")},wysihtml5.quirks.cleanPastedHTML=function(){var a=function(a){var b=wysihtml5.lang.string(a).trim(),c=b.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");return new RegExp("^((?!^"+c+"$).)*$","i")},b=function(b,c){var d,e,f=wysihtml5.lang.object(b).clone(!0);for(d in f.tags)if(f.tags.hasOwnProperty(d)&&f.tags[d].keep_styles)for(e in f.tags[d].keep_styles)f.tags[d].keep_styles.hasOwnProperty(e)&&c[e]&&(f.tags[d].keep_styles[e]=a(c[e]));return f},c=function(a,b){var c;if(!a)return null;for(var d=0,e=a.length;e>d;d++)if(a[d].condition||(c=a[d].set),a[d].condition&&a[d].condition.test(b))return a[d].set;return c};return function(a,d){var e,f={color:wysihtml5.dom.getStyle("color").from(d.referenceNode),fontSize:wysihtml5.dom.getStyle("font-size").from(d.referenceNode)},g=b(c(d.rules,a)||{},f);return e=wysihtml5.dom.parse(a,{rules:g,cleanUp:!0,context:d.referenceNode.ownerDocument,uneditableClass:d.uneditableClass,clearInternals:!0,unjoinNbsps:!0})}}(),wysihtml5.quirks.ensureProperClearing=function(){var a=function(){var a=this;setTimeout(function(){var b=a.innerHTML.toLowerCase();("
"==b||"
"==b)&&(a.innerHTML="")},0)};return function(b){wysihtml5.dom.observe(b.element,["cut","keydown"],a)}}(),function(a){var b="%7E";a.quirks.getCorrectInnerHTML=function(c){var d=c.innerHTML;if(-1===d.indexOf(b))return d;var e,f,g,h,i=c.querySelectorAll("[href*='~'], [src*='~']");for(h=0,g=i.length;g>h;h++)e=i[h].href||i[h].src,f=a.lang.string(e).replace("~").by(b),d=a.lang.string(d).replace(f).by(e);return d}}(wysihtml5),function(a){var b="wysihtml5-quirks-redraw";a.quirks.redraw=function(c){a.dom.addClass(c,b),a.dom.removeClass(c,b);try{var d=c.ownerDocument;d.execCommand("italic",!1,null),d.execCommand("italic",!1,null)}catch(e){}}}(wysihtml5),wysihtml5.quirks.tableCellsSelection=function(a,b){function c(){return a.addEventListener("mousedown",n),l}function d(c){l.start=c,l.end=c,l.cells=[c],l.table=k.getParentElement(l.start,{query:"table"},!1,a),l.table&&(e(),k.addClass(c,m),a.addEventListener("mousemove",g),a.addEventListener("mouseup",h),b.fire("tableselectstart").fire("tableselectstart:composer"))}function e(){if(a){var b=a.querySelectorAll("."+m);if(b.length>0)for(var c=0;c1&&b.composer.selection.deselect(),f(l.cells),l.end!==d&&b.fire("tableselectchange").fire("tableselectchange:composer")))}function h(c){a.removeEventListener("mousemove",g),a.removeEventListener("mouseup",h),b.fire("tableselect").fire("tableselect:composer"),setTimeout(function(){i()},0)}function i(){a.ownerDocument.addEventListener("click",o)}function j(c,d){l.start=c,l.end=d,l.table=k.getParentElement(l.start,{query:"table"},!1,a),selectedCells=k.table.getCellsBetween(l.start,l.end),f(selectedCells),i(),b.fire("tableselect").fire("tableselect:composer")}var k=wysihtml5.dom,l={table:null,start:null,end:null,cells:null,select:j},m="wysiwyg-tmp-selected-cell",n=function(b){var c=wysihtml5.dom.getParentElement(b.target,{query:"td, th"},!1,a);c&&d(c)},o=function(c){a.ownerDocument.removeEventListener("click",o),k.getParentElement(c.target,{query:"table"},!1,a)!=l.table&&(e(),l.table=null,l.start=null,l.end=null,b.fire("tableunselect").fire("tableunselect:composer"))};return c()},function(a){function b(a){var b,c;for(b in d)if(d.hasOwnProperty(b)&&(c=d[b],c.regex.test(a)))return c}function c(a){var c=b(a);return c?c.name:void 0}var d={rgba:{regex:/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([\d\.]+)\s*\)/i,name:"rgba"},rgb:{regex:/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/i,name:"rgb"},hex6:{regex:/^#([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])/i,name:"hex",radix:16},hex3:{regex:/^#([0-9a-f])([0-9a-f])([0-9a-f])/i,name:"hex",radix:16}},e=function(a){return new RegExp("(^|\\s|;)"+a+"\\s*:\\s*[^;$]+","gi")};a.quirks.styleParser={getColorParseMethod:b,getColorFormat:c,parseColor:function(c,f){var g,h,i,j,k,l=c;if(f){if(g=e(f),!(h=c.match(g)))return!1;h=h.pop().split(":")[1],l=a.lang.string(h).trim()}return(i=b(l))&&(j=l.match(i.regex))?(k=i.radix||10,i===d.hex3?(j.shift(),j.push(1),a.lang.array(j).map(function(a,b){return 3>b?parseInt(a,k)*k+parseInt(a,k):parseFloat(a)})):(j.shift(),j[3]||j.push(1),a.lang.array(j).map(function(a,b){return 3>b?parseInt(a,k):parseFloat(a)}))):!1},unparseColor:function(a,b){var c=16;return"hex"===b?(a[0].toString(c)+a[1].toString(c)+a[2].toString(c)).toUpperCase():"hash"===b?"#"+(a[0].toString(c)+a[1].toString(c)+a[2].toString(c)).toUpperCase():"rgb"===b?"rgb("+a[0]+","+a[1]+","+a[2]+")":"rgba"===b?"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")":"csv"===b?a[0]+","+a[1]+","+a[2]+","+a[3]:a[3]&&1!==a[3]?"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]+")":"rgb("+a[0]+","+a[1]+","+a[2]+")"},parseFontSize:function(b){var c=b.match(e("font-size"));return c?a.lang.string(c[c.length-1].split(":")[1]).trim():!1}}}(wysihtml5),function(a){function b(a){var b=0;if(a.parentNode)do b+=a.offsetTop||0,a=a.offsetParent;while(a);return b}function c(a,b){for(var c=0;b!==a;)if(c++,b=b.parentNode,!b)throw new Error("not a descendant of ancestor!");return c}function d(b){var c=document.createElement("span"),d=function(a){b.removeEventListener("mouseup",d),b.removeEventListener("keydown",d),b.removeEventListener("touchstart",d),b.removeEventListener("focus",d),b.removeEventListener("blur",d),b.removeEventListener("paste",e),b.removeEventListener("drop",e),b.removeEventListener("beforepaste",e),c&&c.parentNode&&c.parentNode.removeChild(c)},e=function(a){c&&c.parentNode&&setTimeout(d,0)};return c.appendChild(document.createTextNode(a.INVISIBLE_SPACE)),c.className="_wysihtml5-temp-caret-fix",c.style.display="block",c.style.minWidth="1px",c.style.height="0px",b.addEventListener("mouseup",d),b.addEventListener("keydown",d),b.addEventListener("touchstart",d),b.addEventListener("focus",d),b.addEventListener("blur",d),b.addEventListener("paste",e),b.addEventListener("drop",e),b.addEventListener("beforepaste",e),c}function e(a){if(!a.canSurroundContents())for(var b=a.commonAncestorContainer,d=c(b,a.startContainer),e=c(b,a.endContainer);!a.canSurroundContents();)d>e?(a.setStartBefore(a.startContainer),d=c(b,a.startContainer)):(a.setEndAfter(a.endContainer),e=c(b,a.endContainer))}var f=a.dom;a.Selection=Base.extend({constructor:function(a,b,c){window.rangy.init(),this.editor=a,this.composer=a.composer,this.doc=this.composer.doc,this.win=this.composer.win,this.contain=b,this.unselectableClass=c||!1},getBookmark:function(){var a=this.getRange();return a&&a.cloneRange()},setBookmark:function(a){a&&this.setSelection(a)},setBefore:function(a){var b=rangy.createRange(this.doc);return b.setStartBefore(a),b.setEndBefore(a),this.setSelection(b)},createTemporaryCaretSpaceAfter:function(b){var c=this.doc.createElement("span"),d=this.doc.createTextNode(a.INVISIBLE_SPACE),e=function(b){var d;this.contain.removeEventListener("mouseup",e),this.contain.removeEventListener("keydown",g),this.contain.removeEventListener("touchstart",e),this.contain.removeEventListener("focus",e),this.contain.removeEventListener("blur",e),this.contain.removeEventListener("paste",f),this.contain.removeEventListener("drop",f),this.contain.removeEventListener("beforepaste",f),c&&c.parentNode&&(c.innerHTML=c.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),/[^\s]+/.test(c.innerHTML)?(d=c.lastChild,a.dom.unwrap(c),this.setAfter(d)):c.parentNode.removeChild(c))}.bind(this),f=function(a){c&&c.parentNode&&setTimeout(e,0)},g=function(a){8===a.which||91===a.which||17===a.which||86===a.which&&(a.ctrlKey||a.metaKey)||e()};return c.className="_wysihtml5-temp-caret-fix",c.style.position="absolute",c.style.display="block",c.style.minWidth="1px",c.style.zIndex="99999",c.appendChild(d),b.parentNode.insertBefore(c,b.nextSibling),this.setBefore(d),this.contain.addEventListener("mouseup",e),this.contain.addEventListener("keydown",g),this.contain.addEventListener("touchstart",e),this.contain.addEventListener("focus",e),this.contain.addEventListener("blur",e),this.contain.addEventListener("paste",f),this.contain.addEventListener("drop",f),this.contain.addEventListener("beforepaste",f),c},setAfter:function(b,c,d){var e,f=this.win,g=rangy.createRange(this.doc),h=function(){var d=b.parentNode,g=d?d.childNodes[d.childNodes.length-1]:null;if(!e||g===b&&1===b.nodeType&&"block"===f.getComputedStyle(b).display)if(c){var h=this.doc.createTextNode(a.INVISIBLE_SPACE);b.parentNode.insertBefore(h,b.nextSibling),this.selectNode(h),setTimeout(function(){h&&h.parentNode&&h.parentNode.removeChild(h)},0)}else this.createTemporaryCaretSpaceAfter(b)}.bind(this);if(g.setStartAfter(b),g.setEndAfter(b),document.activeElement&&document.activeElement===this.composer.element)e=this.setSelection(g),h(),d&&d(e);else{var i=this.composer.getScrollPos();this.composer.element.focus(),this.composer.setScrollPos(i),setTimeout(function(){e=this.setSelection(g),h(),d&&d(e)}.bind(this),0)}},selectNode:function(b,c){var d=rangy.createRange(this.doc),e=b.nodeType===a.ELEMENT_NODE,g="canHaveHTML"in b?b.canHaveHTML:"IMG"!==b.nodeName,h=e?b.innerHTML:b.data,i=""===h||h===a.INVISIBLE_SPACE,j=f.getStyle("display").from(b),k="block"===j||"list-item"===j;if(i&&e&&g&&!c)try{b.innerHTML=a.INVISIBLE_SPACE}catch(l){}g?d.selectNodeContents(b):d.selectNode(b),g&&i&&e?d.collapse(k):g&&i&&(d.setStartAfter(b),d.setEndAfter(b)),this.setSelection(d)},getSelectedNode:function(a){var b,c;return a&&this.doc.selection&&"Control"===this.doc.selection.type&&(c=this.doc.selection.createRange(),c&&c.length)?c.item(0):(b=this.getSelection(this.doc),b.focusNode===b.anchorNode?b.focusNode:(c=this.getRange(this.doc),c?c.commonAncestorContainer:this.doc.body))},fixSelBorders:function(){var a=this.getRange();e(a),this.setSelection(a)},getSelectedOwnNodes:function(a){for(var b=this.getOwnRanges(),c=[],d=0,e=b.length;e>d;d++)c.push(b[d].commonAncestorContainer||this.doc.body);return c},findNodesInSelection:function(b){for(var c,d=this.getOwnRanges(),e=[],f=0,g=d.length;g>f;f++)c=d[f].getNodes([1],function(c){return a.lang.array(b).contains(c.nodeName)}),e=e.concat(c);return e},filterElements:function(a){for(var b,c=this.getOwnRanges(),d=[],e=0,f=c.length;f>e;e++)b=c[e].getNodes([1],function(b){return a(b,c[e])}),d=d.concat(b);return d},containsUneditable:function(){for(var a=this.getOwnUneditables(),b=this.getSelection(),c=0,d=a.length;d>c;c++)if(b.containsNode(a[c]))return!0;return!1},deleteContents:function(){var b,c,d,e,f=this.getRange();if(this.unselectableClass){(b=a.dom.getParentElement(f.startContainer,{query:"."+this.unselectableClass},!1,this.contain))&&f.setStartBefore(b),(c=a.dom.getParentElement(f.endContainer,{query:"."+this.unselectableClass},!1,this.contain))&&f.setEndAfter(c),d=f.getNodes([1],function(b){return a.dom.hasClass(b,this.unselectableClass)}.bind(this));for(var g=d.length;g--;)try{e=new CustomEvent("wysihtml5:uneditable:delete"),d[g].dispatchEvent(e)}catch(h){}}f.deleteContents(),this.setSelection(f)},getPreviousNode:function(b,c){var d;if(!b){var e=this.getSelection();b=e.anchorNode}if(b===this.contain)return!1;var f,g=b.previousSibling;return g===this.contain?!1:(g&&3!==g.nodeType&&1!==g.nodeType?g=this.getPreviousNode(g,c):g&&3===g.nodeType&&/^\s*$/.test(g.textContent)?g=this.getPreviousNode(g,c):c&&g&&1===g.nodeType?(d=a.dom.getStyle("display").from(g),a.lang.array(["BR","HR","IMG"]).contains(g.nodeName)||a.lang.array(["block","inline-block","flex","list-item","table"]).contains(d)||!/^[\s]*$/.test(g.innerHTML)||(g=this.getPreviousNode(g,c))):g||b===this.contain||(f=b.parentNode,f!==this.contain&&(g=this.getPreviousNode(f,c))),g!==this.contain?g:!1)},getSelectionParentsByTag:function(b){for(var c,d=this.getSelectedOwnNodes(),e=[],f=0,g=d.length;g>f;f++)c=d[f].nodeName&&"LI"===d[f].nodeName?d[f]:a.dom.getParentElement(d[f],{query:"li"},!1,this.contain),c&&e.push(c);return e.length?e:null},getRangeToNodeEnd:function(){if(this.isCollapsed()){var a=this.getRange(),b=a.startContainer,c=a.startOffset,d=rangy.createRange(this.doc);return d.selectNodeContents(b),d.setStart(b,c),d}},caretIsLastInSelection:function(){var a=(rangy.createRange(this.doc),this.getSelection(),this.getRangeToNodeEnd().cloneContents()),b=a.textContent;return/^\s*$/.test(b)},caretIsFirstInSelection:function(){var b=rangy.createRange(this.doc),c=this.getSelection(),d=this.getRange(),e=d.startContainer;return e?e.nodeType===a.TEXT_NODE?this.isCollapsed()&&e.nodeType===a.TEXT_NODE&&/^\s*$/.test(e.data.substr(0,d.startOffset)):(b.selectNodeContents(this.getRange().commonAncestorContainer),b.collapse(!0),this.isCollapsed()&&(b.startContainer===c.anchorNode||b.endContainer===c.anchorNode)&&b.startOffset===c.anchorOffset):void 0},caretIsInTheBeginnig:function(b){var c=this.getSelection(),d=c.anchorNode,e=c.anchorOffset;return b&&d?0===e&&(d.nodeName&&d.nodeName===b.toUpperCase()||a.dom.getParentElement(d.parentNode,{query:b},1)):d?0===e&&!this.getPreviousNode(d,!0):void 0},getBeforeSelection:function(b){var c,d,e=this.getSelection(),f=e.isBackwards()?e.focusNode:e.anchorNode,g=e.isBackwards()?e.focusOffset:e.anchorOffset,h=this.createRange();if(d=a.dom.getParentElement(f,{query:"._wysihtml5-temp-caret-fix"},1),d&&(f=d.parentNode,g=Array.prototype.indexOf.call(f.childNodes,d)),f){if(g>0)return 3===f.nodeType?(h.setStart(f,0),h.setEnd(f,g),{type:"text",range:h,offset:g,node:f}):(h.setStartBefore(f.childNodes[0]),c=f.childNodes[g-1],h.setEndAfter(c),{type:"element",range:h,offset:g,node:c});if(h.setStartAndEnd(f,0),b){var i=this.getPreviousNode(f,!0),j=null;if(i&&(j=1===i.nodeType&&a.dom.hasClass(i,this.unselectableClass)?i:a.dom.domNode(i).lastLeafNode()),j)return{type:"leafnode",range:h,offset:g,node:j}}return{type:"none",range:h,offset:g,node:f}}return null},executeAndRestoreRangy:function(a,b){var c=rangy.saveSelection(this.win);if(c)try{a()}catch(d){setTimeout(function(){throw d},0)}else a();rangy.restoreSelection(c)},executeAndRestore:function(b,c){var d,e,g,h,i,j,k,l,m=this.doc.body,n=c&&m.scrollTop,o=c&&m.scrollLeft,p="_wysihtml5-temp-placeholder",q=''+a.INVISIBLE_SPACE+"",r=this.getRange(!0);if(!r)return void b(m,m);r.collapsed||(k=r.cloneRange(),j=k.createContextualFragment(q),k.collapse(!1),k.insertNode(j),k.detach()),i=r.createContextualFragment(q),r.insertNode(i),j&&(d=this.contain.querySelectorAll("."+p),r.setStartBefore(d[0]),r.setEndAfter(d[d.length-1])),this.setSelection(r);try{b(r.startContainer,r.endContainer)}catch(s){setTimeout(function(){throw s},0)}if(d=this.contain.querySelectorAll("."+p),d&&d.length){l=rangy.createRange(this.doc),g=d[0].nextSibling,d.length>1&&(h=d[d.length-1].previousSibling),h&&g?(l.setStartBefore(g),l.setEndAfter(h)):(e=this.doc.createTextNode(a.INVISIBLE_SPACE),f.insert(e).after(d[0]),l.setStartBefore(e),l.setEndAfter(e)),this.setSelection(l);for(var t=d.length;t--;)d[t].parentNode.removeChild(d[t])}else this.contain.focus();c&&(m.scrollTop=n,m.scrollLeft=o);try{d.parentNode.removeChild(d)}catch(u){}},set:function(a,b){var c=rangy.createRange(this.doc);c.setStart(a,b||0),this.setSelection(c)},insertHTML:function(a){var b,c=(rangy.createRange(this.doc),this.doc.createElement("DIV")),d=this.doc.createDocumentFragment();for(c.innerHTML=a,b=c.lastChild;c.firstChild;)d.appendChild(c.firstChild);this.insertNode(d),b&&this.setAfter(b)},insertNode:function(a){var b=this.getRange();b&&b.insertNode(a)},canAppendChild:function(a){var b,c,d=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],e=this.getRange();return b=a||e.startContainer,b&&(c=(b.tagName||b.nodeName).toLowerCase()),-1===d.indexOf(c)},splitElementAtCaret:function(b,c){var d,e,f,g,h,i=this.getSelection();if(i.rangeCount>0){d=i.getRangeAt(0).cloneRange(),d.setEndAfter(b),e=d.extractContents(),h=e.childNodes;for(var j=h.length;j--;)a.dom.domNode(h[j]).is.visible()||e.removeChild(h[j]);b.parentNode.insertBefore(e,b.nextSibling),c?(f=c.firstChild||c,g=c.lastChild||c,b.parentNode.insertBefore(c,b.nextSibling),f&&g&&(d.setStartBefore(f),d.setEndAfter(g),this.setSelection(d))):(d.setStartAfter(b),d.setEndAfter(b)),a.dom.domNode(b).is.visible()||(""===a.dom.getTextContent(b)?b.parentNode.removeChild(b):b.parentNode.replaceChild(this.doc.createTextNode(" "),b))}},surround:function(a){var b,c=this.getOwnRanges(),d=[];if(0==c.length)return d;for(var e=c.length;e--;){b=this.doc.createElement(a.nodeName),d.push(b),a.className&&(b.className=a.className),a.cssStyle&&b.setAttribute("style",a.cssStyle);try{c[e].surroundContents(b),this.selectNode(b)}catch(f){b.appendChild(c[e].extractContents()),c[e].insertNode(b)}}return d},deblockAndSurround:function(b){var c,d,e,f=this.doc.createElement("div"),g=rangy.createRange(this.doc);if(f.className=b.className,this.composer.commands.exec("formatBlock",b),c=this.contain.querySelectorAll("."+b.className),c[0])for(c[0].parentNode.insertBefore(f,c[0]),g.setStartBefore(c[0]),g.setEndAfter(c[c.length-1]),d=g.extractContents();d.firstChild;)if(e=d.firstChild,1==e.nodeType&&a.dom.hasClass(e,b.className)){for(;e.firstChild;)f.appendChild(e.firstChild);"BR"!==e.nodeName&&f.appendChild(this.doc.createElement("br")),d.removeChild(e)}else f.appendChild(e);else f=null;return f},scrollIntoView:function(){var c,d=this.doc,e=5,f=d.documentElement.scrollHeight>d.documentElement.offsetHeight,g=d._wysihtml5ScrollIntoViewElement=d._wysihtml5ScrollIntoViewElement||function(){var b=d.createElement("span");
+return b.innerHTML=a.INVISIBLE_SPACE,b}();f&&(this.insertNode(g),c=b(g),g.parentNode.removeChild(g),c>=d.body.scrollTop+d.documentElement.offsetHeight-e&&(d.body.scrollTop=c))},selectLine:function(){a.browser.supportsSelectionModify()?this._selectLine_W3C():this.doc.selection&&this._selectLine_MSIE()},_selectLine_W3C:function(){var a=this.win.getSelection();a.modify("move","left","lineboundary"),a.modify("extend","right","lineboundary")},toLineBoundary:function(b,c){if(c="undefined"==typeof c?!1:c,a.browser.supportsSelectionModify()){var d=this.win.getSelection();d.modify("extend",b,"lineboundary"),c&&("left"===b?d.collapseToStart():"right"===b&&d.collapseToEnd())}},_selectLine_MSIE:function(){var a,b,c,d,e,f=this.doc.selection.createRange(),g=f.boundingTop,h=this.doc.body.scrollWidth;if(f.moveToPoint){for(0===g&&(c=this.doc.createElement("span"),this.insertNode(c),g=c.offsetTop,c.parentNode.removeChild(c)),g+=1,d=-10;h>d;d+=2)try{f.moveToPoint(d,g);break}catch(i){}for(a=g,b=this.doc.selection.createRange(),e=h;e>=0;e--)try{b.moveToPoint(e,a);break}catch(j){}f.setEndPoint("EndToEnd",b),f.select()}},getText:function(){var a=this.getSelection();return a?a.toString():""},getNodes:function(a,b){var c=this.getRange();return c?c.getNodes(Array.isArray(a)?a:[a],b):[]},getOwnNodes:function(a,b,c){for(var d=this.getOwnRanges(),e=[],f=0,g=d.length;g>f;f++)d[f]&&(c&&d[f].splitBoundaries(),e=e.concat(d[f].getNodes(Array.isArray(a)?a:[a],b)));return e},fixRangeOverflow:function(a){if(this.contain&&this.contain.firstChild&&a){var b=a.compareNode(this.contain);if(2!==b)1===b&&a.setStartBefore(this.contain.firstChild),0===b&&a.setEndAfter(this.contain.lastChild),3===b&&(a.setStartBefore(this.contain.firstChild),a.setEndAfter(this.contain.lastChild));else if(this._detectInlineRangeProblems(a)){var c=a.endContainer.previousElementSibling;c&&a.setEnd(c,this._endOffsetForNode(c))}}},_endOffsetForNode:function(a){var b=document.createRange();return b.selectNodeContents(a),b.endOffset},_detectInlineRangeProblems:function(a){var b=f.compareDocumentPosition(a.startContainer,a.endContainer);return 0==a.endOffset&&4&b},getRange:function(a){var b=this.getSelection(),c=b&&b.rangeCount&&b.getRangeAt(0);return a!==!0&&this.fixRangeOverflow(c),c},getOwnUneditables:function(){var b=f.query(this.contain,"."+this.unselectableClass),c=f.query(b,"."+this.unselectableClass);return a.lang.array(b).without(c)},getOwnRanges:function(){var a,b=[],c=this.getRange();if(c&&b.push(c),this.unselectableClass&&this.contain&&c){var d,e=this.getOwnUneditables();if(e.length>0)for(var f=0,g=e.length;g>f;f++){a=[];for(var h=0,i=b.length;i>h;h++){if(b[h])switch(b[h].compareNode(e[f])){case 2:break;case 3:d=b[h].cloneRange(),d.setEndBefore(e[f]),a.push(d),d=b[h].cloneRange(),d.setStartAfter(e[f]),a.push(d);break;default:a.push(b[h])}b=a}}}return b},getSelection:function(){return rangy.getSelection(this.win)},setSelection:function(a){var b=rangy.getSelection(this.win);return b.setSingleRange(a),b&&b.anchorNode&&b.focusNode?b:null},selectAll:function(){var b,c=this.createRange(),e=this.composer,f=this,g=d(this.composer.element),h=d(this.composer.element),i=function(){c.setStart(e.element,0),c.setEnd(e.element,e.element.childNodes.length),b=f.setSelection(c)},j=function(){return!b||b.nativeSelection&&b.nativeSelection.type&&("Caret"===b.nativeSelection.type||"None"===b.nativeSelection.type)};a.dom.removeInvisibleSpaces(this.composer.element),i(),this.composer.element.firstChild&&j()&&(this.composer.element.appendChild(g),i(),j()&&(g.parentNode.removeChild(g),this.composer.element.insertBefore(h,this.composer.element.firstChild),i(),j()&&(this.composer.element.appendChild(g),i())))},createRange:function(){return rangy.createRange(this.doc)},isCollapsed:function(){return this.getSelection().isCollapsed},getHtml:function(){return this.getSelection().toHtml()},getPlainText:function(){return this.getSelection().toString()},isEndToEndInNode:function(b){var c=this.getRange(),d=c.commonAncestorContainer,e=c.startContainer,f=c.endContainer;if(d.nodeType===a.TEXT_NODE&&(d=d.parentNode),e.nodeType===a.TEXT_NODE&&!/^\s*$/.test(e.data.substr(c.startOffset)))return!1;if(f.nodeType===a.TEXT_NODE&&!/^\s*$/.test(f.data.substr(c.endOffset)))return!1;for(;e&&e!==d;){if(e.nodeType!==a.TEXT_NODE&&!a.dom.contains(d,e))return!1;if(a.dom.domNode(e).prev({ignoreBlankTexts:!0}))return!1;e=e.parentNode}for(;f&&f!==d;){if(f.nodeType!==a.TEXT_NODE&&!a.dom.contains(d,f))return!1;if(a.dom.domNode(f).next({ignoreBlankTexts:!0}))return!1;f=f.parentNode}return a.lang.array(b).contains(d.nodeName)?d:!1},isInThisEditable:function(){var b=this.getSelection(),c=b.focusNode,d=b.anchorNode;return c&&1!==c.nodeType&&(c=c.parentNode),d&&1!==d.nodeType&&(d=d.parentNode),d&&c&&(a.dom.contains(this.composer.element,c)||this.composer.element===c)&&(a.dom.contains(this.composer.element,d)||this.composer.element===d)},deselect:function(){var a=this.getSelection();a&&a.removeAllRanges()}})}(wysihtml5),function(a,b){function c(a,b,c){if(!a.className)return!1;var d=a.className.match(c)||[];return d[d.length-1]===b}function d(a,b){if(!a.getAttribute||!a.getAttribute("style"))return!1;a.getAttribute("style").match(b);return a.getAttribute("style").match(b)?!0:!1}function e(a,b,c){a.getAttribute("style")?(h(a,c),a.getAttribute("style")&&!/^\s*$/.test(a.getAttribute("style"))?a.setAttribute("style",b+";"+a.getAttribute("style")):a.setAttribute("style",b)):a.setAttribute("style",b)}function f(a,b,c){a.className?(g(a,c),a.className+=" "+b):a.className=b}function g(a,b){a.className&&(a.className=a.className.replace(b,""))}function h(a,b){var c,d=[];if(a.getAttribute("style")){c=a.getAttribute("style").split(";");for(var e=c.length;e--;)c[e].match(b)||/^\s*$/.test(c[e])||d.push(c[e]);d.length?a.setAttribute("style",d.join(";")):a.removeAttribute("style")}}function i(a,b){var c=[],d=b.split(";"),e=a.getAttribute("style");if(e){e=e.replace(/\s/gi,"").toLowerCase(),c.push(new RegExp("(^|\\s|;)"+b.replace(/\s/gi,"").replace(/([\(\)])/gi,"\\$1").toLowerCase().replace(";",";?").replace(/rgb\\\((\d+),(\d+),(\d+)\\\)/gi,"\\s?rgb\\($1,\\s?$2,\\s?$3\\)"),"gi"));for(var f=d.length;f-->0;)/^\s*$/.test(d[f])||c.push(new RegExp("(^|\\s|;)"+d[f].replace(/\s/gi,"").replace(/([\(\)])/gi,"\\$1").toLowerCase().replace(";",";?").replace(/rgb\\\((\d+),(\d+),(\d+)\\\)/gi,"\\s?rgb\\($1,\\s?$2,\\s?$3\\)"),"gi"));for(var g=0,h=c.length;h>g;g++)if(e.match(c[g]))return c[g]}return!1}function j(c,d,e,f){return e?i(c,e):f?a.dom.hasClass(c,f):b.dom.arrayContains(d,c.tagName.toLowerCase())}function k(a,b,c,d){for(var e=a.length;e--;)if(!j(a[e],b,c,d))return!1;return a.length?!0:!1}function l(a,b,c){var d=i(a,b);return d?(h(a,d),"remove"):(e(a,b,c),"change")}function m(a,b){return a.className.replace(u," ")==b.className.replace(u," ")}function n(a){for(var b=a.parentNode;a.firstChild;)b.insertBefore(a.firstChild,a);b.removeChild(a)}function o(a,b){if(a.attributes.length!=b.attributes.length)return!1;for(var c,d,e,f=0,g=a.attributes.length;g>f;++f)if(c=a.attributes[f],e=c.name,"class"!=e){if(d=b.attributes.getNamedItem(e),c.specified!=d.specified)return!1;if(c.specified&&c.nodeValue!==d.nodeValue)return!1}return!0}function p(a,c){return b.dom.isCharacterDataNode(a)?0==c?!!a.previousSibling:c==a.length?!!a.nextSibling:!0:c>0&&ce;++e)a=this.textNodes[e],b=a.parentNode,d[e]=a.data,e&&(b.removeChild(a),b.hasChildNodes()||b.parentNode.removeChild(b));return this.firstTextNode.data=c=d.join(""),c},getLength:function(){for(var a=this.textNodes.length,b=0;a--;)b+=this.textNodes[a].length;return b},toString:function(){for(var a=[],b=0,c=this.textNodes.length;c>b;++b)a[b]="'"+this.textNodes[b].data+"'";return"[Merge("+a.join(",")+")]"}},s.prototype={getAncestorWithClass:function(d){for(var e;d;){if(e=this.cssClass?c(d,this.cssClass,this.similarClassRegExp):""!==this.cssStyle?!1:!0,d.nodeType==a.ELEMENT_NODE&&"false"!=d.getAttribute("contenteditable")&&b.dom.arrayContains(this.tagNames,d.tagName.toLowerCase())&&e)return d;d=d.parentNode}return!1},getAncestorWithStyle:function(c){for(var e;c;){if(e=this.cssStyle?d(c,this.similarStyleRegExp):!1,c.nodeType==a.ELEMENT_NODE&&"false"!=c.getAttribute("contenteditable")&&b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase())&&e)return c;c=c.parentNode}return!1},getMatchingAncestor:function(a){var b=this.getAncestorWithClass(a),c=!1;return b?this.cssStyle&&(c="class"):(b=this.getAncestorWithStyle(a),b&&(c="style")),{element:b,type:c}},postApply:function(a,b){for(var c,d,e,f=a[0],g=a[a.length-1],h=[],i=f,j=g,k=0,l=g.length,m=0,n=a.length;n>m;++m)d=a[m],e=null,d&&d.parentNode&&(e=this.getAdjacentMergeableTextNode(d.parentNode,!1)),e?(c||(c=new r(e),h.push(c)),c.textNodes.push(d),d===f&&(i=c.firstTextNode,k=i.length),d===g&&(j=c.firstTextNode,l=c.getLength())):c=null;if(g&&g.parentNode){var o=this.getAdjacentMergeableTextNode(g.parentNode,!0);o&&(c||(c=new r(g),h.push(c)),c.textNodes.push(o))}if(h.length){for(m=0,n=h.length;n>m;++m)h[m].doMerge();b.setStart(i,k),b.setEnd(j,l)}},getAdjacentMergeableTextNode:function(b,c){var d,e=b.nodeType==a.TEXT_NODE,f=e?b.parentNode:b,g=c?"nextSibling":"previousSibling";if(e){if(d=b[g],d&&d.nodeType==a.TEXT_NODE)return d}else if(d=f[g],d&&this.areElementsMergeable(b,d))return d[c?"firstChild":"lastChild"];return null},areElementsMergeable:function(a,c){return b.dom.arrayContains(this.tagNames,(a.tagName||"").toLowerCase())&&b.dom.arrayContains(this.tagNames,(c.tagName||"").toLowerCase())&&m(a,c)&&o(a,c)},createContainer:function(a){var b=a.createElement(this.tagNames[0]);return this.cssClass&&(b.className=this.cssClass),this.cssStyle&&b.setAttribute("style",this.cssStyle),b},applyToTextNode:function(a){var c=a.parentNode;if(1==c.childNodes.length&&b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase()))this.cssClass&&f(c,this.cssClass,this.similarClassRegExp),this.cssStyle&&e(c,this.cssStyle,this.similarStyleRegExp);else{var d=this.createContainer(b.dom.getDocument(a));a.parentNode.insertBefore(d,a),d.appendChild(a)}},isRemovable:function(c){return b.dom.arrayContains(this.tagNames,c.tagName.toLowerCase())&&""===a.lang.string(c.className).trim()&&(!c.getAttribute("style")||""===a.lang.string(c.getAttribute("style")).trim())},undoToTextNode:function(a,b,c,d){var e=c?!1:!0,f=c||d,h=!1;if(!b.containsNode(f)){var i=b.cloneRange();i.selectNode(f),i.isPointInRange(b.endContainer,b.endOffset)&&p(b.endContainer,b.endOffset)&&(q(f,b.endContainer,b.endOffset,this.container),b.setEndAfter(f)),i.isPointInRange(b.startContainer,b.startOffset)&&p(b.startContainer,b.startOffset)&&(f=q(f,b.startContainer,b.startOffset,this.container))}!e&&this.similarClassRegExp&&g(f,this.similarClassRegExp),e&&this.similarStyleRegExp&&(h="change"===l(f,this.cssStyle,this.similarStyleRegExp)),this.isRemovable(f)&&!h&&n(f)},applyToRange:function(b){for(var c,d=b.length;d--;){if(c=b[d].getNodes([a.TEXT_NODE]),!c.length)try{var e=this.createContainer(b[d].endContainer.ownerDocument);return b[d].surroundContents(e),void this.selectNode(b[d],e)}catch(f){}if(b[d].splitBoundaries(),c=b[d].getNodes([a.TEXT_NODE]),c.length){for(var g,h=0,i=c.length;i>h;++h)g=c[h],this.getMatchingAncestor(g).element||this.applyToTextNode(g);b[d].setStart(c[0],0),g=c[c.length-1],b[d].setEnd(g,g.length),this.normalize&&this.postApply(c,b[d])}}},undoToRange:function(b){for(var c,d,e,f=b.length;f--;){if(c=b[f].getNodes([a.TEXT_NODE]),c.length)b[f].splitBoundaries(),c=b[f].getNodes([a.TEXT_NODE]);else{var g=b[f].endContainer.ownerDocument,h=g.createTextNode(a.INVISIBLE_SPACE);b[f].insertNode(h),b[f].selectNode(h),c=[h]}for(var i=0,j=c.length;j>i;++i)b[f].isValid()&&(d=c[i],e=this.getMatchingAncestor(d),"style"===e.type?this.undoToTextNode(d,b[f],!1,e.element):e.element&&this.undoToTextNode(d,b[f],e.element));1==j?this.selectNode(b[f],c[0]):(b[f].setStart(c[0],0),d=c[c.length-1],b[f].setEnd(d,d.length),this.normalize&&this.postApply(c,b[f]))}},selectNode:function(b,c){var d=c.nodeType===a.ELEMENT_NODE,e="canHaveHTML"in c?c.canHaveHTML:!0,f=d?c.innerHTML:c.data,g=""===f||f===a.INVISIBLE_SPACE;if(g&&d&&e)try{c.innerHTML=a.INVISIBLE_SPACE}catch(h){}b.selectNodeContents(c),g&&d?b.collapse(!1):g&&(b.setStartAfter(c),b.setEndAfter(c))},getTextSelectedByRange:function(a,b){var c=b.cloneRange();c.selectNodeContents(a);var d=c.intersection(b),e=d?d.toString():"";return c.detach(),e},isAppliedToRange:function(b){for(var c,d,e=[],f="full",g=b.length;g--;){if(d=b[g].getNodes([a.TEXT_NODE]),!d.length)return c=this.getMatchingAncestor(b[g].startContainer).element,c?{elements:[c],coverage:f}:!1;for(var h,i=0,j=d.length;j>i;++i)h=this.getTextSelectedByRange(d[i],b[g]),c=this.getMatchingAncestor(d[i]).element,c&&""!=h?(e.push(c),1===a.dom.getTextNodes(c,!0).length?f="full":"full"===f&&(f="inline")):c||(f="partial")}return e.length?{elements:e,coverage:f}:!1},toggleRange:function(a){var b,c=this.isAppliedToRange(a);c?"full"===c.coverage?this.undoToRange(a):"inline"===c.coverage?(b=k(c.elements,this.tagNames,this.cssStyle,this.cssClass),this.undoToRange(a),b||this.applyToRange(a)):(k(c.elements,this.tagNames,this.cssStyle,this.cssClass)||this.undoToRange(a),this.applyToRange(a)):this.applyToRange(a)}},a.selection.HTMLApplier=s}(wysihtml5,rangy),wysihtml5.Commands=Base.extend({constructor:function(a){this.editor=a,this.composer=a.composer,this.doc=this.composer.doc},support:function(a){return wysihtml5.browser.supportsCommand(this.doc,a)},exec:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.exec,f=null;if(this.composer.hasPlaceholderSet()&&!wysihtml5.lang.array(["styleWithCSS","enableObjectResizing","enableInlineTableEditing"]).contains(a)&&(this.composer.element.innerHTML="",this.composer.selection.selectNode(this.composer.element)),this.editor.fire("beforecommand:composer"),e)d.unshift(this.composer),f=e.apply(c,d);else try{f=this.doc.execCommand(a,!1,b)}catch(g){}return this.editor.fire("aftercommand:composer"),f},remove:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.remove;return e?(d.unshift(this.composer),e.apply(c,d)):void 0},state:function(a,b){var c=wysihtml5.commands[a],d=wysihtml5.lang.array(arguments).get(),e=c&&c.state;if(e)return d.unshift(this.composer),e.apply(c,d);try{return this.doc.queryCommandState(a)}catch(f){return!1}},stateValue:function(a){var b=wysihtml5.commands[a],c=wysihtml5.lang.array(arguments).get(),d=b&&b.stateValue;return d?(c.unshift(this.composer),d.apply(b,c)):!1}}),function(a){var b={nodeName:"B",toggle:!0};a.commands.bold={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){function b(b){return a.lang.object({}).merge(c).merge({attribute:b}).get()}var c={nodeName:"A",toggle:!1};a.commands.createLink={exec:function(c,d,e){var f=b(e);if(c.selection.isCollapsed()&&!this.state(c,d)){var g=c.doc.createTextNode(f.attribute.href);c.selection.insertNode(g),c.selection.selectNode(g)}a.commands.formatInline.exec(c,d,f)},state:function(b,d){return a.commands.formatInline.state(b,d,c)}}}(wysihtml5),function(a){var b={nodeName:"A"};a.commands.removeLink={exec:function(c,d){a.commands.formatInline.remove(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b=/wysiwyg-font-size-[0-9a-z\-]+/g;a.commands.fontSize={exec:function(c,d,e){a.commands.formatInline.exec(c,d,{className:"wysiwyg-font-size-"+e,classRegExp:b,toggle:!0})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{className:"wysiwyg-font-size-"+d})}}}(wysihtml5),function(a){a.commands.fontSizeStyle={exec:function(b,c,d){d=d.size||d,/^\s*$/.test(d)||a.commands.formatInline.exec(b,c,{styleProperty:"fontSize",styleValue:d,toggle:!1})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{styleProperty:"fontSize",styleValue:d||void 0})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"fontSize"})},stateValue:function(b,c){var d,e=this.state(b,c);return e&&a.lang.object(e).isArray()&&(e=e[0]),e&&(d=e.getAttribute("style"))?a.quirks.styleParser.parseFontSize(d):!1}}}(wysihtml5),function(a){var b=/wysiwyg-color-[0-9a-z]+/g;a.commands.foreColor={exec:function(c,d,e){a.commands.formatInline.exec(c,d,{className:"wysiwyg-color-"+e,classRegExp:b,toggle:!0})},state:function(b,c,d){return a.commands.formatInline.state(b,c,{className:"wysiwyg-color-"+d})}}}(wysihtml5),function(a){a.commands.foreColorStyle={exec:function(b,c,d){var e,f;d&&(e=a.quirks.styleParser.parseColor("color:"+(d.color||d),"color"),e&&(f=(1===e[3]?"rgb("+[e[0],e[1],e[2]].join(", "):"rgba("+e.join(", "))+")",a.commands.formatInline.exec(b,c,{styleProperty:"color",styleValue:f})))},state:function(b,c,d){var e,f=d?a.quirks.styleParser.parseColor("color:"+(d.color||d),"color"):null;return f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")"),a.commands.formatInline.state(b,c,{styleProperty:"color",styleValue:e})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"color"})},stateValue:function(b,c,d){var e,f=this.state(b,c),g=!1;return f&&a.lang.object(f).isArray()&&(f=f[0]),f&&(e=f.getAttribute("style"))?(g=a.quirks.styleParser.parseColor(e,"color"),a.quirks.styleParser.unparseColor(g,d)):!1}}}(wysihtml5),function(a){a.commands.bgColorStyle={exec:function(b,c,d){var e,f=a.quirks.styleParser.parseColor("background-color:"+(d.color||d),"background-color");f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")",a.commands.formatInline.exec(b,c,{styleProperty:"backgroundColor",styleValue:e}))},state:function(b,c,d){var e,f=d?a.quirks.styleParser.parseColor("background-color:"+(d.color||d),"background-color"):null;return f&&(e=(1===f[3]?"rgb("+[f[0],f[1],f[2]].join(", "):"rgba("+f.join(", "))+")"),a.commands.formatInline.state(b,c,{styleProperty:"backgroundColor",styleValue:e})},remove:function(b,c){return a.commands.formatInline.remove(b,c,{styleProperty:"backgroundColor"})},stateValue:function(b,c,d){var e,f=this.state(b,c),g=!1;return f&&a.lang.object(f).isArray()&&(f=f[0]),f&&(e=f.getAttribute("style"))?(g=a.quirks.styleParser.parseColor(e,"background-color"),a.quirks.styleParser.unparseColor(g,d)):!1}}}(wysihtml5),function(a){function b(a){return{nodeName:a.nodeName||null,className:a.classRegExp?null:a.className||null,classRegExp:a.classRegExp||null,styleProperty:a.styleProperty||null}}function c(b){for(var c=b.element,d=c.querySelectorAll(o),e=c.querySelectorAll(b.config.classNames.uneditableContainer),f=a.lang.array(d).without(e),g=f.length;g--;)""===f[g].innerHTML.replace(/[\uFEFF]/g,"")&&f[g].parentNode.removeChild(f[g])}function d(a){return a.config.useLineBreaks?"DIV":"P"}function e(a,b,c){for(var d=a,e=null;d&&b&&d!==b;)1===d.nodeType&&d.matches(c?o:n)&&(e=d),d=d.parentNode;return e}function f(a,b){for(var c,d,e,f=a,g=null;f&&b&&f!==b;)1===f.nodeType&&f.matches(p)&&(d=f,null===g?(g=f.cloneNode(!1),c=g):(e=f.cloneNode(!1),e.appendChild(g),g=e)),f=f.parentNode;return{parent:d,outerNode:g,innerNode:c}}function g(b,c,e){return b||(b=e.doc.createElement(c.nodeName||d(e)),b.appendChild(e.doc.createTextNode(a.INVISIBLE_SPACE))),c.nodeName&&b.nodeName!==c.nodeName&&(b=m.renameElement(b,c.nodeName)),c.classRegExp&&(b.className=b.className.replace(c.classRegExp,"")),c.className&&b.classList.add(c.className),c.styleProperty&&"undefined"!=typeof c.styleValue&&(b.style[a.browser.fixStyleKey(c.styleProperty)]=c.styleValue),b}function h(b,c,e){var f;c.styleProperty&&(b.style[a.browser.fixStyleKey(c.styleProperty)]=""),c.className&&b.classList.remove(c.className),c.classRegExp&&(b.className=b.className.replace(c.classRegExp,"")),null!==b.getAttribute("class")&&""===b.getAttribute("class").trim()&&b.removeAttribute("class"),c.nodeName&&b.nodeName===c.nodeName&&(f=b.getAttribute("style"),f&&""!==f.trim()?b=m.renameElement(b,d(e)):m.unwrap(b)),null!==b.getAttribute("style")&&""===b.getAttribute("style").trim()&&b.removeAttribute("style")}function i(b){for(var c=b.querySelectorAll(o)||[],d=c.length;d--;)c[d].nextSibling&&1===c[d].nextSibling.nodeType&&"BR"===c[d].nextSibling.nodeName||""!==(c[d].innerHTML||c[d].nodeValue||"").trim()&&c[d].parentNode.insertBefore(c[d].ownerDocument.createElement("BR"),c[d].nextSibling),a.dom.unwrap(c[d])}function j(a,b){var c;return a.startContainer&&1===a.startContainer.nodeType&&a.startContainer===a.endContainer?void(a.startContainer.firstChild===a.startContainer.lastChild&&1===a.endOffset&&a.startContainer!==b.element&&(a.setStartBefore(a.startContainer),a.setEndAfter(a.endContainer))):a.startContainer&&1===a.startContainer.nodeType&&3===a.endContainer.nodeType?void(a.startContainer.firstChild===a.endContainer&&1===a.endOffset&&a.startContainer!==b.element&&a.setEndAfter(a.startContainer)):a.endContainer&&1===a.endContainer.nodeType&&3===a.startContainer.nodeType?void(a.endContainer.firstChild===a.startContainer&&1===a.endOffset&&a.endContainer!==b.element&&a.setStartBefore(a.endContainer)):a.startContainer&&3===a.startContainer.nodeType&&a.startContainer===a.endContainer&&a.startContainer.parentNode?void(a.startContainer.parentNode.firstChild===a.startContainer&&a.endOffset==a.endContainer.length&&0===a.startOffset&&(c=a.startContainer.parentNode,c!==b.element&&(a.setStartBefore(c),a.setEndAfter(c)))):void 0}function k(c,h,k,l){var m=h?a.lang.object(h).clone(!0):null;m&&(m.nodeName=m.nodeName||k||d(l)),j(c,l);var p,q,r,s=c.cloneRange(),t=s.startContainer,u=s.extractContents(),v=l.doc.createDocumentFragment(),w=m?b(m):null,x=w?a.dom.getParentElement(t,w,null,l.element):null,y=!m||"BLOCKQUOTE"===k&&m.nodeName&&"BLOCKQUOTE"===m.nodeName,z=x||e(t,l.element,y);if(h&&h.nodeName&&"BLOCKQUOTE"===h.nodeName){var A=g(null,h,l);A.appendChild(u),v.appendChild(A),q=[A]}else{if(u.firstChild)for(;u.firstChild;)if(1==u.firstChild.nodeType&&u.firstChild.matches(o))if(h)g(u.firstChild,h,l),u.firstChild.matches(n)&&i(u.firstChild),v.appendChild(u.firstChild);else{i(u.firstChild),r=a.dom.unwrap(u.firstChild);for(var B=0,C=r.length;C>B;B++)v.appendChild(r[B]);v.childNodes.length>0&&v.appendChild(l.doc.createElement("BR"))}else if(h){for(p=g(null,m,l);u.firstChild&&(1!==u.firstChild.nodeType||!u.firstChild.matches(o));)1==u.firstChild.nodeType&&p.matches(n)&&i(u.firstChild),p.appendChild(u.firstChild);v.appendChild(p)}else 1==u.firstChild.nodeType&&i(u.firstChild),v.appendChild(u.firstChild);else v.appendChild(g(null,h,l));q=a.lang.array(v.childNodes).get()}if(z)l.selection.splitElementAtCaret(z,v);else{var D=f(t,l.element);if(D.outerNode&&D.innerNode&&D.parent){if(1===v.childNodes.length){for(;v.firstChild.firstChild;)D.innerNode.appendChild(v.firstChild.firstChild);v.firstChild.appendChild(D.outerNode)}l.selection.splitElementAtCaret(D.parent,v)}else s.insertNode(v)}return q}function l(b,c){var d=a.dom.getParentElement(b,{query:o},null,c.element);return d?d.nodeName:null}var m=a.dom,n="h1, h2, h3, h4, h5, h6, p, pre",o="h1, h2, h3, h4, h5, h6, p, pre, div, blockquote",p="b, big, i, small, tt, abbr, acronym, cite, code, dfn, em, kbd, strong, samp, var, a, bdo, br, q, span, sub, sup, button, label, textarea, input, select, u";a.commands.formatBlock={exec:function(b,d,e){var f,g,i,j,m,o=[];if("string"==typeof e&&(e={nodeName:e.toUpperCase()}),e&&e.toggle&&(m=this.state(b,d,e))){j=rangy.saveSelection(b.win);for(var p=0,q=m.length;q>p;p++)h(m[p],e,b)}if(!m){b.selection.isCollapsed()&&(i=a.dom.getParentElement(b.selection.getOwnRanges()[0].startContainer,{query:n+", "+(e&&e.nodeName?e.nodeName.toLowerCase():"div")},null,b.element),i?(j=rangy.saveSelection(b.win),g=b.selection.createRange(),g.selectNode(i),b.selection.setSelection(g)):b.isEmpty()||(j=rangy.saveSelection(b.win),b.selection.selectLine())),f=b.selection.getOwnRanges();for(var r=f.length;r--;)o=o.concat(k(f[r],e,l(f[r].startContainer,b),b))}c(b);for(var s=o.length;s--;)o[s].parentNode||o.splice(s,1);j?rangy.restoreSelection(j):(g=b.selection.createRange(),g.setStartBefore(o[0]),g.setEndAfter(o[o.length-1]),b.selection.setSelection(g)),a.dom.removeInvisibleSpaces(b.element)},state:function(b,c,d){"string"==typeof d&&(d={query:d});for(var e,f=b.selection.filterElements(function(b){return a.dom.domNode(b).test(d||{query:o})}.bind(this)),g=b.selection.getSelectedOwnNodes(),h=0,i=g.length;i>h;h++)e=m.getParentElement(g[h],d||{query:o},null,b.element),e&&-1===f.indexOf(e)&&f.push(e);return 0===f.length?!1:f}}}(wysihtml5),function(a){a.commands.formatCode={exec:function(b,c,d){var e,f,g,h=this.state(b)[0];h?b.selection.executeAndRestore(function(){e=h.querySelector("code"),a.dom.replaceWithChildNodes(h),e&&a.dom.replaceWithChildNodes(e)}):(f=b.selection.getRange(),g=f.extractContents(),h=b.doc.createElement("pre"),e=b.doc.createElement("code"),d&&(e.className=d),h.appendChild(e),e.appendChild(g),f.insertNode(h),b.selection.selectNode(h))},state:function(b){var c,d=b.selection.getSelectedNode();return d&&d.nodeName&&"PRE"==d.nodeName&&d.firstChild&&d.firstChild.nodeName&&"CODE"==d.firstChild.nodeName?[d]:(c=a.dom.getParentElement(d,{query:"pre code"}),c?[c.parentNode]:!1)}}}(wysihtml5),function(a){function b(a){return/^\s*$/.test(a.className)}function c(a){return!a.getAttribute("style")||/^\s*$/.test(a.getAttribute("style"))}function d(b){var c=a.dom.getAttributes(b);return a.lang.object(c).isEmpty()}function e(b,c){var d,e,f,g;return 1!==b.nodeType||1!==c.nodeType?!1:b.nodeName!==c.nodeName?!1:(d=b.className.trim().replace(/\s+/g," ").split(" "),e=c.className.trim().replace(/\s+/g," ").split(" "),a.lang.array(d).without(e).length>0?!1:(f=a.dom.getAttributes(b),g=a.dom.getAttributes(c),f.length===g.length&&a.lang.object(a.lang.object(f).difference(g)).isEmpty()?!0:!1))}function f(b,c){var d=c&&c.nodeName||F,e=b.ownerDocument.createElement(d);if(c.classRegExp&&(e.className=e.className.replace(c.classRegExp,"")),c.className&&e.classList.add(c.className),c.styleProperty&&"undefined"!=typeof c.styleValue&&(e.style[a.browser.fixStyleKey(c.styleProperty)]=c.styleValue),c.attribute)if("object"==typeof c.attribute)for(var f in c.attribute)c.attribute.hasOwnProperty(f)&&e.setAttribute(f,c.attribute[f]);else"undefined"!=typeof c.attributeValue&&e.setAttribute(c.attribute,c.attributeValue);return e}function g(a,b){for(var c in a)if(a.hasOwnProperty(c)&&(void 0===typeof b[c]||b[c]!==a[c]))return!1;return!0}function h(b,c,d){var e,f=a.dom.getAttributes(b),h=g(c,f);a.lang.object(f).difference(c);if(h&&d!==!1)for(e in c)c.hasOwnProperty(e)&&b.removeAttribute(e);else for(e in c)c.hasOwnProperty(e)&&b.setAttribute(e,c[e])}function i(e,f){var g,i,j;f.className&&(f.toggle!==!1&&e.classList.contains(f.className)?e.classList.remove(f.className):e.classList.add(f.className),b(e)&&e.removeAttribute("class")),f.styleProperty&&(f.toggle!==!1&&e.style[a.browser.fixStyleKey(f.styleProperty)].trim().replace(/, /g,",")===f.styleValue?e.style[a.browser.fixStyleKey(f.styleProperty)]="":e.style[a.browser.fixStyleKey(f.styleProperty)]=f.styleValue),c(e)&&e.removeAttribute("style"),f.attribute&&("object"==typeof f.attribute?g=f.attribute:(g={},g[f.attribute]=f.attributeValue||""),h(e,g,f.toggle)),i=f.nodeName?H[f.nodeName.toLowerCase()]||f.nodeName.toLowerCase():null,j=i?a.dom.domNode(e).test({query:i}):!1,(!f.nodeName||f.nodeName===F||j)&&(f.toggle!==!1&&j||!f.nodeName&&e.nodeName===F)&&b(e)&&c(e)&&d(e)&&a.dom.unwrap(e)}function j(b,c){var d=[];return b.isCollapsed()||(d=d.concat(b.getOwnNodes([3],function(b){return!a.dom.domNode(b).is.emptyTextNode()},c))),d}function k(a,b,c,d){var e=a,f=d?b:l(b);do{if(1===e.nodeType&&m(e,f))return e;e=e.parentNode}while(e&&e!==c);return null}function l(a){return{nodeName:a.nodeName||null,className:a.classRegExp?null:a.className||null,classRegExp:a.classRegExp||null,styleProperty:a.styleProperty||null}}function m(b,c){var d;if(c.nodeName){var e=H[c.nodeName.toLowerCase()]||c.nodeName.toLowerCase();return a.dom.domNode(b).test({query:e})}return d=a.lang.object(c).clone(),d.query=G,a.dom.domNode(b).test(d)}function n(b,c){var d=document.documentElement||document.body,e=d.scrollTop,f=d.scrollLeft;rangy.getSelection(b.win);rangy.getSelection(b.win).removeAllRanges();try{rangy.getSelection(b.win).addRange(c)}catch(g){}b.doc.activeElement&&a.dom.contains(b.element,b.doc.activeElement)||(b.element.focus(),d.scrollTop=e,d.scrollLeft=f,rangy.getSelection(b.win).addRange(c))}function o(a,b){var c=rangy.createRange(b.doc),d=a[a.length-1];a[0]&&d&&(c.setStart(a[0],0),c.setEnd(d,d.length),n(b,c))}function p(a,b,c,d){var e=rangy.createRange(a.doc);b&&(e.setStart(b,c),e.setEnd(b,"undefined"!=typeof d?d:c),n(a,e))}function q(a,b,c){var d,e,f,g=j(a.selection),h=[],i=!1;if(a.selection.isInThisEditable()){if(0===g.length&&a.selection.isCollapsed()){if(f=a.selection.getSelection().anchorNode,!f)return{nodes:[],partial:!1};3===f.nodeType&&(g=[f])}g.length||(e=a.selection.getOwnRanges()[0],e&&(g=[e.endContainer]));for(var l=0,m=g.length;m>l;l++)d=k(g[l],b,a.element,c),d?h.push(d):i=!0}return{nodes:h,partial:i}}function r(a){var b,c,d,e;return a&&(b=a.anchorNode,c=a.anchorOffset,b&&3===b.nodeType&&c>0&&c0&&/\w/.test(c.data[g-1]);)g--;for(;h0&&o(b,a),u(q(a,c).nodes),b.length>0&&o(b,a)}function w(a,b,c,d){p(a,b,c),u(q(a,d).nodes),p(a,b,c)}function x(a,b){var c=f(a,b);a.parentNode.insertBefore(c,a),c.appendChild(a)}function y(b,c,d){var e,f=c.element,g=k(b,d,f);g&&(e=g.cloneNode(!1),a.dom.domNode(b).escapeParent(g,e),i(e,d))}function z(b,c,d){var e=c.element,f=k(b,d,e);f&&a.dom.domNode(b).escapeParent(f)}function A(a,b,c){var d=f(a.endContainer,c);a.surroundContents(d),b.selection.selectNode(d)}function B(b,c,d,e){var f,g,h,j,l=q(b,e,!0),m=b.selection.getSelection();if(c.length){if(l.partial||e.toggle===!1)for(j=c.length;j--;)k(c[j],e,b.element)&&y(c[j],b,e),k(c[j],e,b.element)||x(c[j],e);else for(j=c.length;j--;)y(c[j],b,e);v(b,c,e)}else if(e.toggle!==!1)if(r(m))f=s(m),g=f.textNode,y(f.textNode,b,e),w(b,f.textNode,f.wordOffset,e);else{g=b.doc.createTextNode(a.INVISIBLE_SPACE),h=d.nodes[0].cloneNode(!1),h.appendChild(g),b.selection.splitElementAtCaret(d.nodes[0],h),i(h,e),v(b,[g],e);var n=b.selection.getSelection();if(n.anchorNode&&n.focusNode)try{n.collapseToEnd()}catch(o){}}else for(j=d.nodes.length;j--;)i(d.nodes[j],e)}function C(b,c,d,e){var f,g,h,i=b.selection.getSelection();if(c.length){for(h=c.length;h--;)z(c[h],b,e);v(b,c,e)}else{
+for(f=i.anchorNode,g=i.anchorOffset,h=d.nodes.length;h--;)a.dom.unwrap(d.nodes[h]);w(b,f,g,e)}}function D(a,b,c){var d,e,f=a.selection.getSelection();if(b.length){for(e=b.length;e--;)x(b[e],c);v(a,b,c)}else if(r(f))d=s(f),x(d.textNode,c),w(a,d.textNode,d.wordOffset,c);else{var g=a.selection.getOwnRanges()[0];g&&A(g,a,c)}}function E(a){return a="string"==typeof a?{nodeName:a}:a,a.nodeName&&(a.nodeName=a.nodeName.toUpperCase()),a}var F="SPAN",G="b, big, i, small, tt, abbr, acronym, cite, code, dfn, em, kbd, strong, samp, var, a, bdo, br, q, span, sub, sup, button, label, textarea, input, select, u",H={b:"b, strong",strong:"b, strong",em:"em, i",i:"em, i"};a.commands.formatInline={exec:function(a,b,c){c=E(c),a.element.normalize();var d=j(a.selection,!0),e=q(a,c);e.nodes.length>0?B(a,d,e,c):D(a,d,c),a.element.normalize()},remove:function(a,b,c){c=E(c),a.element.normalize();var d=j(a.selection,!0),e=q(a,c);e.nodes.length>0&&C(a,d,e,c),a.element.normalize()},state:function(a,b,c){c=E(c);var d=q(a,c,!0).nodes;return 0===d.length?!1:d}}}(wysihtml5),function(a){var b={nodeName:"BLOCKQUOTE",toggle:!0};a.commands.insertBlockQuote={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){a.commands.insertHTML={exec:function(a,b,c){a.commands.support(b)?a.doc.execCommand(b,!1,c):a.selection.insertHTML(c)},state:function(){return!1}}}(wysihtml5),function(a){var b="IMG";a.commands.insertImage={exec:function(c,d,e){e="object"==typeof e?e:{src:e};var f,g,h=c.doc,i=this.state(c);if(i&&!e.src)return c.selection.setBefore(i),g=i.parentNode,g.removeChild(i),a.dom.removeEmptyTextNodes(g),"A"!==g.nodeName||g.firstChild||(c.selection.setAfter(g),g.parentNode.removeChild(g)),void a.quirks.redraw(c.element);if(i)for(var j in e)e.hasOwnProperty(j)&&i.setAttribute("className"===j?"class":j,e[j]);else{i=h.createElement(b);for(var k in e)i.setAttribute("className"===k?"class":k,e[k]);c.selection.insertNode(i),a.browser.hasProblemsSettingCaretAfterImg()?(f=h.createTextNode(a.INVISIBLE_SPACE),c.selection.insertNode(f),c.selection.setAfter(f)):c.selection.setAfter(i)}},state:function(c){var d,e,f,g=c.doc;return a.dom.hasElementWithTagName(g,b)&&(d=c.selection.getSelectedNode())?d.nodeName===b?d:d.nodeType!==a.ELEMENT_NODE?!1:(e=c.selection.getText(),(e=a.lang.string(e).trim())?!1:(f=c.selection.getNodes(a.ELEMENT_NODE,function(a){return"IMG"===a.nodeName}),1!==f.length?!1:f[0])):!1}}}(wysihtml5),function(a){var b="
"+(a.browser.needsSpaceAfterLineBreak()?" ":"");a.commands.insertLineBreak={exec:function(c,d){c.commands.support(d)?(c.doc.execCommand(d,!1,null),a.browser.autoScrollsToCaret()||c.selection.scrollIntoView()):c.commands.exec("insertHTML",b)},state:function(){return!1}}}(wysihtml5),function(a){a.commands.insertOrderedList={exec:function(b,c){a.commands.insertList.exec(b,c,"OL")},state:function(b,c){return a.commands.insertList.state(b,c,"OL")}}}(wysihtml5),function(a){a.commands.insertUnorderedList={exec:function(b,c){a.commands.insertList.exec(b,c,"UL")},state:function(b,c){return a.commands.insertList.state(b,c,"UL")}}}(wysihtml5),wysihtml5.commands.insertList=function(a){var b=function(a,b){if(a&&a.nodeName){"string"==typeof b&&(b=[b]);for(var c=b.length;c--;)if(a.nodeName===b[c])return!0}return!1},c=function(c,d,e){var f={el:null,other:!1};if(c){var g=a.dom.getParentElement(c,{query:"li"},!1,e.element),h="UL"===d?"OL":"UL";b(c,d)?f.el=c:b(c,h)?f={el:c,other:!0}:g&&(b(g.parentNode,d)?f.el=g.parentNode:b(g.parentNode,h)&&(f={el:g.parentNode,other:!0}))}return f.el&&!e.element.contains(f.el)&&(f.el=null),f},d=function(b,c,d){var e,g,h="UL"===c?"OL":"UL";d.selection.executeAndRestoreRangy(function(){if(e=f(h,d),e.length)for(var i=e.length;i--;)a.dom.renameElement(e[i],c.toLowerCase());else{g=f(["OL","UL"],d);for(var j=g.length;j--;)a.dom.resolveList(g[j],d.config.useLineBreaks);a.dom.resolveList(b,d.config.useLineBreaks)}})},e=function(b,c,d){var e="UL"===c?"OL":"UL";d.selection.executeAndRestoreRangy(function(){for(var g=[b].concat(f(e,d)),h=g.length;h--;)a.dom.renameElement(g[h],c.toLowerCase())})},f=function(a,c){for(var d=c.selection.getOwnRanges(),e=[],f=d.length;f--;)e=e.concat(d[f].getNodes([1],function(c){return b(c,a)}));return e},g=function(b,c){c.selection.executeAndRestoreRangy(function(){var d,e,f="_wysihtml5-temp-"+(new Date).getTime(),g=c.selection.deblockAndSurround({nodeName:"div",className:f});g.innerHTML=g.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),g&&(d=a.lang.array(["","
",a.INVISIBLE_SPACE]).contains(g.innerHTML),e=a.dom.convertToList(g,b.toLowerCase(),c.parent.config.classNames.uneditableContainer),d&&c.selection.selectNode(e.querySelector("li"),!0))})};return{exec:function(a,b,f){var h=a.doc,i="OL"===f?"insertOrderedList":"insertUnorderedList",j=a.selection.getSelectedNode(),k=c(j,f,a);k.el?k.other?e(k.el,f,a):d(k.el,f,a):a.commands.support(i)?h.execCommand(i,!1,null):g(f,a)},state:function(a,b,d){var e=a.selection.getSelectedNode(),f=c(e,d,a);return f.el&&!f.other?f.el:!1}}}(wysihtml5),function(a){var b={nodeName:"I",toggle:!0};a.commands.italic={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-center",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyCenter={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-left",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyLeft={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-right",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyRight={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={className:"wysiwyg-text-align-justify",classRegExp:/wysiwyg-text-align-[0-9a-z]+/g,toggle:!0};a.commands.justifyFull={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"right",toggle:!0};a.commands.alignRightStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"left",toggle:!0};a.commands.alignLeftStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){var b={styleProperty:"textAlign",styleValue:"center",toggle:!0};a.commands.alignCenterStyle={exec:function(c,d){return a.commands.formatBlock.exec(c,"formatBlock",b)},state:function(c,d){return a.commands.formatBlock.state(c,"formatBlock",b)}}}(wysihtml5),function(a){a.commands.redo={exec:function(a){return a.undoManager.redo()},state:function(a){return!1}}}(wysihtml5),function(a){var b={nodeName:"U",toggle:!0};a.commands.underline={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){a.commands.undo={exec:function(a){return a.undoManager.undo()},state:function(a){return!1}}}(wysihtml5),function(a){a.commands.createTable={exec:function(a,b,c){var d,e,f;if(c&&c.cols&&c.rows&&parseInt(c.cols,10)>0&&parseInt(c.rows,10)>0){for(f=c.tableStyle?'':"",f+="",e=0;e",d=0;d
";f+=""}f+="
",a.commands.exec("insertHTML",f)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.mergeTableCells={exec:function(b,c){b.tableSelection&&b.tableSelection.start&&b.tableSelection.end&&(this.state(b,c)?a.dom.table.unmergeCell(b.tableSelection.start):a.dom.table.mergeCellsBetween(b.tableSelection.start,b.tableSelection.end))},state:function(b,c){if(b.tableSelection){var d=b.tableSelection.start,e=b.tableSelection.end;if(d&&e&&d==e&&(a.dom.getAttribute(d,"colspan")&&parseInt(a.dom.getAttribute(d,"colspan"),10)>1||a.dom.getAttribute(d,"rowspan")&&parseInt(a.dom.getAttribute(d,"rowspan"),10)>1))return[d]}return!1}}}(wysihtml5),function(a){a.commands.addTableCells={exec:function(b,c,d){if(b.tableSelection&&b.tableSelection.start&&b.tableSelection.end){var e=a.dom.table.orderSelectionEnds(b.tableSelection.start,b.tableSelection.end);"before"==d||"above"==d?a.dom.table.addCells(e.start,d):("after"==d||"below"==d)&&a.dom.table.addCells(e.end,d),setTimeout(function(){b.tableSelection.select(e.start,e.end)},0)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.deleteTableCells={exec:function(b,c,d){if(b.tableSelection&&b.tableSelection.start&&b.tableSelection.end){var e,f=a.dom.table.orderSelectionEnds(b.tableSelection.start,b.tableSelection.end),g=a.dom.table.indexOf(f.start),h=b.tableSelection.table;a.dom.table.removeCells(f.start,d),setTimeout(function(){e=a.dom.table.findCell(h,g),e||("row"==d&&(e=a.dom.table.findCell(h,{row:g.row-1,col:g.col})),"column"==d&&(e=a.dom.table.findCell(h,{row:g.row,col:g.col-1}))),e&&b.tableSelection.select(e,e)},0)}},state:function(a,b){return!1}}}(wysihtml5),function(a){a.commands.indentList={exec:function(a,b,c){var d=a.selection.getSelectionParentsByTag("LI");return d?this.tryToPushLiLevel(d,a.selection):!1},state:function(a,b){return!1},tryToPushLiLevel:function(b,c){var d,e,f,g,h,i=!1;return c.executeAndRestoreRangy(function(){for(var c=b.length;c--;)g=b[c],d="OL"===g.parentNode.nodeName?"OL":"UL",e=g.ownerDocument.createElement(d),f=a.dom.domNode(g).prev({nodeTypes:[a.ELEMENT_NODE]}),h=f?f.querySelector("ul, ol"):null,f&&(h?h.appendChild(g):(e.appendChild(g),f.appendChild(e)),i=!0)}),i}}}(wysihtml5),function(a){a.commands.outdentList={exec:function(a,b,c){var d=a.selection.getSelectionParentsByTag("LI");return d?this.tryToPullLiLevel(d,a):!1},state:function(a,b){return!1},tryToPullLiLevel:function(b,c){var d,e,f,g,h,i=!1,j=this;return c.selection.executeAndRestoreRangy(function(){for(var k=b.length;k--;)if(g=b[k],g.parentNode&&(d=g.parentNode,"OL"===d.tagName||"UL"===d.tagName)){if(i=!0,e=a.dom.getParentElement(d.parentNode,{query:"ol, ul"},!1,c.element),f=a.dom.getParentElement(d.parentNode,{query:"li"},!1,c.element),e&&f)g.nextSibling&&(h=j.getAfterList(d,g),g.appendChild(h)),e.insertBefore(g,f.nextSibling);else{g.nextSibling&&(h=j.getAfterList(d,g),g.appendChild(h));for(var l=g.childNodes.length;l--;)d.parentNode.insertBefore(g.childNodes[l],d.nextSibling);d.parentNode.insertBefore(document.createElement("br"),d.nextSibling),g.parentNode.removeChild(g)}0===d.childNodes.length&&d.parentNode.removeChild(d)}}),i},getAfterList:function(a,b){for(var c=a.nodeName,d=document.createElement(c);b.nextSibling;)d.appendChild(b.nextSibling);return d}}}(wysihtml5),function(a){var b={nodeName:"SUB",toggle:!0};a.commands.subscript={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b={nodeName:"SUP",toggle:!0};a.commands.superscript={exec:function(c,d){a.commands.formatInline.exec(c,d,b)},state:function(c,d){return a.commands.formatInline.state(c,d,b)}}}(wysihtml5),function(a){var b=90,c=89,d=8,e=46,f=25,g="data-wysihtml5-selection-node",h="data-wysihtml5-selection-offset",i=(''+a.INVISIBLE_SPACE+"",''+a.INVISIBLE_SPACE+"",a.dom);a.UndoManager=a.lang.Dispatcher.extend({constructor:function(a){this.editor=a,this.composer=a.composer,this.element=this.composer.element,this.position=0,this.historyStr=[],this.historyDom=[],this.transact(),this._observe()},_observe:function(){var a,f=this;this.composer.sandbox.getDocument();i.observe(this.element,"keydown",function(a){if(!a.altKey&&(a.ctrlKey||a.metaKey)){var d=a.keyCode,e=d===b&&!a.shiftKey,g=d===b&&a.shiftKey||d===c;e?(f.undo(),a.preventDefault()):g&&(f.redo(),a.preventDefault())}}),i.observe(this.element,"keydown",function(b){var c=b.keyCode;c!==a&&(a=c,(c===d||c===e)&&f.transact())}),this.editor.on("newword:composer",function(){f.transact()}).on("beforecommand:composer",function(){f.transact()})},transact:function(){var b,c,d,e,i,j=this.historyStr[this.position-1],k=this.composer.getValue(!1,!1),l=this.element.offsetWidth>0&&this.element.offsetHeight>0;if(k!==j){var m=this.historyStr.length=this.historyDom.length=this.position;m>f&&(this.historyStr.shift(),this.historyDom.shift(),this.position--),this.position++,l&&(b=this.composer.selection.getRange(),c=b&&b.startContainer?b.startContainer:this.element,d=b&&b.startOffset?b.startOffset:0,c.nodeType===a.ELEMENT_NODE?e=c:(e=c.parentNode,i=this.getChildNodeIndex(e,c)),e.setAttribute(h,d),"undefined"!=typeof i&&e.setAttribute(g,i));var n=this.element.cloneNode(!!k);this.historyDom.push(n),this.historyStr.push(k),e&&(e.removeAttribute(h),e.removeAttribute(g))}},undo:function(){this.transact(),this.undoPossible()&&(this.set(this.historyDom[--this.position-1]),this.editor.fire("undo:composer"))},redo:function(){this.redoPossible()&&(this.set(this.historyDom[++this.position-1]),this.editor.fire("redo:composer"))},undoPossible:function(){return this.position>1},redoPossible:function(){return this.positionb;b++)this.element.appendChild(c[b].cloneNode(!0));var e,f,i;a.hasAttribute(h)?(e=a.getAttribute(h),i=a.getAttribute(g),f=this.element):(f=this.element.querySelector("["+h+"]")||this.element,e=f.getAttribute(h),i=f.getAttribute(g),f.removeAttribute(h),f.removeAttribute(g)),null!==i&&(f=this.getChildNodeByIndex(f,+i)),this.composer.selection.set(f,e)},getChildNodeIndex:function(a,b){for(var c=0,d=a.childNodes,e=d.length;e>c;c++)if(d[c]===b)return c},getChildNodeByIndex:function(a,b){return a.childNodes[b]}})}(wysihtml5),wysihtml5.views.View=Base.extend({constructor:function(a,b,c){this.parent=a,this.element=b,this.config=c,this.config.noTextarea||this._observeViewChange()},_observeViewChange:function(){var a=this;this.parent.on("beforeload",function(){a.parent.on("change_view",function(b){b===a.name?(a.parent.currentView=a,a.show(),setTimeout(function(){a.focus()},0)):a.hide()})})},focus:function(){if(!this.element||!this.element.ownerDocument||this.element.ownerDocument.querySelector(":focus")!==this.element)try{this.element&&this.element.focus()}catch(a){}},hide:function(){this.element.style.display="none"},show:function(){this.element.style.display=""},disable:function(){this.element.setAttribute("disabled","disabled")},enable:function(){this.element.removeAttribute("disabled")}}),function(a){var b=a.dom,c=a.browser;a.views.Composer=a.views.View.extend({name:"composer",CARET_HACK:"
",constructor:function(a,b,c){this.base(a,b,c),this.config.noTextarea?this.editableArea=b:this.textarea=this.parent.textarea,this.config.contentEditableMode?this._initContentEditableArea():this._initSandbox()},clear:function(){this.element.innerHTML=c.displaysCaretInEmptyContentEditableCorrectly()?"":this.CARET_HACK},getValue:function(b,c){var d=this.isEmpty()?"":a.quirks.getCorrectInnerHTML(this.element);return b!==!1&&(d=this.parent.parse(d,c===!1?!1:!0)),d},setValue:function(a,b){b&&(a=this.parent.parse(a));try{this.element.innerHTML=a}catch(c){this.element.innerText=a}},cleanUp:function(){var a;this.selection&&(a=rangy.saveSelection(this.win)),this.parent.parse(this.element),a&&rangy.restoreSelection(a)},show:function(){this.editableArea.style.display=this._displayStyle||"",this.config.noTextarea||this.textarea.element.disabled||(this.disable(),this.enable())},hide:function(){this._displayStyle=b.getStyle("display").from(this.editableArea),"none"===this._displayStyle&&(this._displayStyle=null),this.editableArea.style.display="none"},disable:function(){this.parent.fire("disable:composer"),this.element.removeAttribute("contentEditable")},enable:function(){this.parent.fire("enable:composer"),this.element.setAttribute("contentEditable","true")},focus:function(b){a.browser.doesAsyncFocus()&&this.hasPlaceholderSet()&&this.clear(),this.base();var c=this.element.lastChild;b&&c&&this.selection&&("BR"===c.nodeName?this.selection.setBefore(this.element.lastChild):this.selection.setAfter(this.element.lastChild))},getScrollPos:function(){if(this.doc&&this.win){var a={};return"undefined"!=typeof this.win.pageYOffset?a.y=this.win.pageYOffset:a.y=(this.doc.documentElement||this.doc.body.parentNode||this.doc.body).scrollTop,"undefined"!=typeof this.win.pageXOffset?a.x=this.win.pageXOffset:a.x=(this.doc.documentElement||this.doc.body.parentNode||this.doc.body).scrollLeft,a}},setScrollPos:function(a){a&&"undefined"!=typeof a.x&&"undefined"!=typeof a.y&&this.win.scrollTo(a.x,a.y)},getTextContent:function(){return b.getTextContent(this.element)},hasPlaceholderSet:function(){return this.getTextContent()==(this.config.noTextarea?this.editableArea.getAttribute("data-placeholder"):this.textarea.element.getAttribute("placeholder"))&&this.placeholderSet},isEmpty:function(){var a=this.element.innerHTML.toLowerCase();return/^(\s|
|<\/br>||<\/p>)*$/i.test(a)||""===a||"
"===a||"
"===a||"
"===a||this.hasPlaceholderSet()},_initContentEditableArea:function(){var a=this;this.config.noTextarea?this.sandbox=new b.ContentEditableArea(function(){a._create()},{className:this.config.classNames.sandbox},this.editableArea):(this.sandbox=new b.ContentEditableArea(function(){a._create()},{className:this.config.classNames.sandbox}),this.editableArea=this.sandbox.getContentEditable(),b.insert(this.editableArea).after(this.textarea.element),this._createWysiwygFormField())},_initSandbox:function(){var a=this;this.sandbox=new b.Sandbox(function(){a._create()},{stylesheets:this.config.stylesheets,className:this.config.classNames.sandbox}),this.editableArea=this.sandbox.getIframe();var c=this.textarea.element;b.insert(this.editableArea).after(c),this._createWysiwygFormField()},_createWysiwygFormField:function(){if(this.textarea.element.form){var a=document.createElement("input");a.type="hidden",a.name="_wysihtml5_mode",a.value=1,b.insert(a).after(this.textarea.element)}},_create:function(){var d=this;this.doc=this.sandbox.getDocument(),this.win=this.sandbox.getWindow(),this.element=this.config.contentEditableMode?this.sandbox.getContentEditable():this.doc.body,this.config.noTextarea?this.cleanUp():(this.textarea=this.parent.textarea,this.element.innerHTML=this.textarea.getValue(!0,!1)),this.selection=new a.Selection(this.parent,this.element,this.config.classNames.uneditableContainer),this.commands=new a.Commands(this.parent),this.config.noTextarea||b.copyAttributes(["className","spellcheck","title","lang","dir","accessKey"]).from(this.textarea.element).to(this.element),b.addClass(this.element,this.config.classNames.composer),this.config.style&&!this.config.contentEditableMode&&this.style(),this.observe();var e=this.config.name;e&&(b.addClass(this.element,e),this.config.contentEditableMode||b.addClass(this.editableArea,e)),this.enable(),!this.config.noTextarea&&this.textarea.element.disabled&&this.disable();var f="string"==typeof this.config.placeholder?this.config.placeholder:this.config.noTextarea?this.editableArea.getAttribute("data-placeholder"):this.textarea.element.getAttribute("placeholder");f&&b.simulatePlaceholder(this.parent,this,f,this.config.classNames.placeholder),this.commands.exec("styleWithCSS",!1),this._initAutoLinking(),this._initObjectResizing(),this._initUndoManager(),this._initLineBreaking(),this.config.noTextarea||!this.textarea.element.hasAttribute("autofocus")&&document.querySelector(":focus")!=this.textarea.element||c.isIos()||setTimeout(function(){d.focus(!0)},100),c.clearsContentEditableCorrectly()||a.quirks.ensureProperClearing(this),this.initSync&&this.config.sync&&this.initSync(),this.config.noTextarea||this.textarea.hide(),this.parent.fire("beforeload").fire("load")},_initAutoLinking:function(){var d=this,e=c.canDisableAutoLinking(),f=c.doesAutoLinkingInContentEditable();if(e&&this.commands.exec("autoUrlDetect",!1),this.config.autoLink){(!f||f&&e)&&(this.parent.on("newword:composer",function(){if(b.getTextContent(d.element).match(b.autoLink.URL_REG_EXP)){for(var c=d.selection.getSelectedNode(),e=d.element.querySelectorAll("."+d.config.classNames.uneditableContainer),f=!1,g=e.length;g--;)a.dom.contains(e[g],c)&&(f=!0);f||b.autoLink(c,[d.config.classNames.uneditableContainer])}}),b.observe(this.element,"blur",function(){b.autoLink(d.element,[d.config.classNames.uneditableContainer])}));var g=this.sandbox.getDocument().getElementsByTagName("a"),h=b.autoLink.URL_REG_EXP,i=function(c){var d=a.lang.string(b.getTextContent(c)).trim();return"www."===d.substr(0,4)&&(d="http://"+d),d};b.observe(this.element,"keydown",function(a){if(g.length){var c,e=d.selection.getSelectedNode(a.target.ownerDocument),f=b.getParentElement(e,{query:"a"},4);f&&(c=i(f),setTimeout(function(){var a=i(f);a!==c&&a.match(h)&&f.setAttribute("href",a)},0))}})}},_initObjectResizing:function(){if(this.commands.exec("enableObjectResizing",!0),c.supportsEvent("resizeend")){var d=["width","height"],e=d.length,f=this.element;b.observe(f,"resizeend",function(b){var c,g=b.target||b.srcElement,h=g.style,i=0;if("IMG"===g.nodeName){for(;e>i;i++)c=d[i],h[c]&&(g.setAttribute(c,parseInt(h[c],10)),h[c]="");a.quirks.redraw(f)}})}},_initUndoManager:function(){this.undoManager=new a.UndoManager(this.parent)},_initLineBreaking:function(){function d(a){var c=b.getParentElement(a,{query:"p, div"},2);c&&b.contains(e.element,c)&&e.selection.executeAndRestore(function(){e.config.useLineBreaks?b.replaceWithChildNodes(c):"P"!==c.nodeName&&b.renameElement(c,"p")})}var e=this,f="li, p, h1, h2, h3, h4, h5, h6",g="ul, ol, menu";this.config.useLineBreaks||b.observe(this.element,["focus","keydown"],function(){if(e.isEmpty()){var a=e.doc.createElement("P");e.element.innerHTML="",e.element.appendChild(a),c.displaysCaretInEmptyContentEditableCorrectly()?e.selection.selectNode(a,!0):(a.innerHTML="
",e.selection.setBefore(a.firstChild))}}),b.observe(this.element,"keydown",function(c){var h=c.keyCode;if(!c.shiftKey&&(h===a.ENTER_KEY||h===a.BACKSPACE_KEY)){var i=b.getParentElement(e.selection.getSelectedNode(),{query:f},4);return i?void setTimeout(function(){var c,f=e.selection.getSelectedNode();if("LI"===i.nodeName){if(!f)return;c=b.getParentElement(f,{query:g},2),c||d(f)}h===a.ENTER_KEY&&i.nodeName.match(/^H[1-6]$/)&&d(f)},0):void(e.config.useLineBreaks&&h===a.ENTER_KEY&&!a.browser.insertsLineBreaksOnReturn()&&(c.preventDefault(),e.commands.exec("insertLineBreak")))}})}})}(wysihtml5),function(a){var b=a.dom,c=document,d=window,e=c.createElement("div"),f=["background-color","color","cursor","font-family","font-size","font-style","font-variant","font-weight","line-height","letter-spacing","text-align","text-decoration","text-indent","text-rendering","word-break","word-wrap","word-spacing"],g=["background-color","border-collapse","border-bottom-color","border-bottom-style","border-bottom-width","border-left-color","border-left-style","border-left-width","border-right-color","border-right-style","border-right-width","border-top-color","border-top-style","border-top-width","clear","display","float","margin-bottom","margin-left","margin-right","margin-top","outline-color","outline-offset","outline-width","outline-style","padding-left","padding-right","padding-top","padding-bottom","position","top","left","right","bottom","z-index","vertical-align","text-align","-webkit-box-sizing","-moz-box-sizing","-ms-box-sizing","box-sizing","-webkit-box-shadow","-moz-box-shadow","-ms-box-shadow","box-shadow","-webkit-border-top-right-radius","-moz-border-radius-topright","border-top-right-radius","-webkit-border-bottom-right-radius","-moz-border-radius-bottomright","border-bottom-right-radius","-webkit-border-bottom-left-radius","-moz-border-radius-bottomleft","border-bottom-left-radius","-webkit-border-top-left-radius","-moz-border-radius-topleft","border-top-left-radius","width","height"],h=["html { height: 100%; }","body { height: 100%; padding: 1px 0 0 0; margin: -1px 0 0 0; }","body > p:first-child { margin-top: 0; }","._wysihtml5-temp { display: none; }",a.browser.isGecko?"body.placeholder { color: graytext !important; }":"body.placeholder { color: #a9a9a9 !important; }","img:-moz-broken { -moz-force-broken-image-icon: 1; height: 24px; width: 24px; }"],i=function(a){if(a.setActive)try{a.setActive()}catch(e){}else{var f=a.style,g=c.documentElement.scrollTop||c.body.scrollTop,h=c.documentElement.scrollLeft||c.body.scrollLeft,i={position:f.position,top:f.top,left:f.left,WebkitUserSelect:f.WebkitUserSelect};b.setStyles({position:"absolute",top:"-99999px",left:"-99999px",WebkitUserSelect:"none"}).on(a),a.focus(),b.setStyles(i).on(a),d.scrollTo&&d.scrollTo(h,g)}};a.views.Composer.prototype.style=function(){var d,j=this,k=c.querySelector(":focus"),l=this.textarea.element,m=l.hasAttribute("placeholder"),n=m&&l.getAttribute("placeholder"),o=l.style.display,p=l.disabled;this.focusStylesHost=e.cloneNode(!1),this.blurStylesHost=e.cloneNode(!1),this.disabledStylesHost=e.cloneNode(!1),m&&l.removeAttribute("placeholder"),l===k&&l.blur(),l.disabled=!1,l.style.display=d="none",(l.getAttribute("rows")&&"auto"===b.getStyle("height").from(l)||l.getAttribute("cols")&&"auto"===b.getStyle("width").from(l))&&(l.style.display=d=o),b.copyStyles(g).from(l).to(this.editableArea).andTo(this.blurStylesHost),b.copyStyles(f).from(l).to(this.element).andTo(this.blurStylesHost),b.insertCSS(h).into(this.element.ownerDocument),l.disabled=!0,b.copyStyles(g).from(l).to(this.disabledStylesHost),b.copyStyles(f).from(l).to(this.disabledStylesHost),l.disabled=p,l.style.display=o,i(l),l.style.display=d,b.copyStyles(g).from(l).to(this.focusStylesHost),b.copyStyles(f).from(l).to(this.focusStylesHost),l.style.display=o,b.copyStyles(["display"]).from(l).to(this.editableArea);var q=a.lang.array(g).without(["display"]);return k?k.focus():l.blur(),m&&l.setAttribute("placeholder",n),this.parent.on("focus:composer",function(){b.copyStyles(q).from(j.focusStylesHost).to(j.editableArea),b.copyStyles(f).from(j.focusStylesHost).to(j.element)}),this.parent.on("blur:composer",function(){b.copyStyles(q).from(j.blurStylesHost).to(j.editableArea),b.copyStyles(f).from(j.blurStylesHost).to(j.element)}),this.parent.observe("disable:composer",function(){b.copyStyles(q).from(j.disabledStylesHost).to(j.editableArea),b.copyStyles(f).from(j.disabledStylesHost).to(j.element)}),this.parent.observe("enable:composer",function(){b.copyStyles(q).from(j.blurStylesHost).to(j.editableArea),b.copyStyles(f).from(j.blurStylesHost).to(j.element)}),this}}(wysihtml5),function(a){var b=a.dom,c=a.browser,d={66:"bold",73:"italic",85:"underline"},e=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.addEventListener(b[d],c,!1)},f=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.removeEventListener(b[d],c,!1)},g=function(b,c){if(b.selection.caretIsLastInSelection()){var d=b.selection.getSelection(),e=d.anchorNode;if(e&&1===e.nodeType&&(a.dom.getParentElement(e,{query:"td, th"},!1,b.element)||c)){var f=e.childNodes[d.anchorOffset];if(f&&1===f.nodeType&"BR"===f.nodeName)return f.parentNode.removeChild(f),!0}}return!1},h=function(a){var b=a.selection.getBeforeSelection(!0);if(b&&("element"===b.type||"leafnode"===b.type)&&1===b.node.nodeType&&b.node.classList.contains(a.config.classNames.uneditableContainer)){if(g(a,!0))return!0;try{var c=new CustomEvent("wysihtml5:uneditable:delete");b.node.dispatchEvent(c)}catch(d){}return b.node.parentNode.removeChild(b.node),!0}return!1},i=function(b){var c=b.selection,d=c.getPreviousNode();if(c.caretIsFirstInSelection()&&d&&1===d.nodeType&&/block/.test(b.win.getComputedStyle(d).display)){if(/^\s*$/.test(d.textContent||d.innerText))return d.parentNode.removeChild(d),!0;if(d.lastChild){var e=d.lastChild,f=c.getSelectedNode(),g=a.dom.domNode(d).commonAncestor(f,b.element);if(curNode=g?a.dom.getParentElement(f,{query:"h1, h2, h3, h4, h5, h6, p, pre, div, blockquote"},!1,g):null,curNode){for(;curNode.firstChild;)d.appendChild(curNode.firstChild);return c.setAfter(e),!0}if(3===f.nodeType)return d.appendChild(f),c.setAfter(e),!0}}return!1},j=function(a,b){var c=b.selection;b.element;if(c.isCollapsed()){if(i(b))return void a.preventDefault();if(g(b))return void a.preventDefault();if(h(b))return void a.preventDefault()}else c.containsUneditable()&&(a.preventDefault(),c.deleteContents())},k=function(a,b,c){if(a.selection.isCollapsed()){if(a.selection.caretIsInTheBeginnig("li"))if(c){if(a.commands.exec("outdentList"))return}else if(a.commands.exec("indentList"))return}else a.selection.deleteContents();a.commands.exec("insertHTML"," ")},l=function(a){this.domNodeRemovedInterval&&clearInterval(domNodeRemovedInterval),this.parent.fire("destroy:composer")},m=function(a){this.parent.fire("beforeinteraction",a).fire("beforeinteraction:composer",a),setTimeout(function(){this.parent.fire("interaction",a).fire("interaction:composer",a)}.bind(this),0)},n=function(a){this.parent.fire("focus",a).fire("focus:composer",a),setTimeout(function(){this.focusState=this.getValue(!1,!1)}.bind(this),0)},o=function(a){if(this.focusState!==this.getValue(!1,!1)){var b=a;"function"==typeof Object.create&&(b=Object.create(a,{type:{value:"change"}})),this.parent.fire("change",b).fire("change:composer",b)}this.parent.fire("blur",a).fire("blur:composer",a)},p=function(a){this.parent.fire(a.type,a).fire(a.type+":composer",a),"paste"===a.type&&setTimeout(function(){this.parent.fire("newword:composer")}.bind(this),0)},q=function(a){this.config.copyedFromMarking&&(a.clipboardData&&(a.clipboardData.setData("text/html",this.config.copyedFromMarking+this.selection.getHtml()),a.clipboardData.setData("text/plain",this.selection.getPlainText()),a.preventDefault()),this.parent.fire(a.type,a).fire(a.type+":composer",a))},r=function(b){var c=b.keyCode;(c===a.SPACE_KEY||c===a.ENTER_KEY)&&this.parent.fire("newword:composer")},s=function(b){if(!c.canSelectImagesInContentEditable()){var d=b.target,e=this.element.querySelectorAll("img"),f=this.element.querySelectorAll("."+this.config.classNames.uneditableContainer+" img"),g=a.lang.array(e).without(f);"IMG"===d.nodeName&&a.lang.array(g).contains(d)&&this.selection.selectNode(d)}},t=function(a){var b,c={IMG:"Image: ",A:"Link: "},d=a.target,e=d.nodeName;("A"===e||"IMG"===e)&&(d.hasAttribute("title")||(b=c[e]+(d.getAttribute("href")||d.getAttribute("src")),d.setAttribute("title",b)))},u=function(b){if(this.config.classNames.uneditableContainer){var c=a.dom.getParentElement(b.target,{query:"."+this.config.classNames.uneditableContainer},!1,this.element);c&&this.selection.setAfter(c)}},v=function(a){c.canSelectImagesInContentEditable()||setTimeout(function(){this.selection.getSelection().removeAllRanges()}.bind(this),0)},w=function(b){var c,e,f=b.keyCode,g=d[f];return(b.ctrlKey||b.metaKey)&&65===f?(this.selection.selectAll(),void b.preventDefault()):((b.ctrlKey||b.metaKey)&&!b.altKey&&g&&(this.commands.exec(g),b.preventDefault()),f===a.BACKSPACE_KEY&&j(b,this),(f===a.BACKSPACE_KEY||f===a.DELETE_KEY)&&(c=this.selection.getSelectedNode(!0),c&&"IMG"===c.nodeName&&(b.preventDefault(),e=c.parentNode,e.removeChild(c),"A"!==e.nodeName||e.firstChild||e.parentNode.removeChild(e),setTimeout(function(){a.quirks.redraw(this.element)}.bind(this),0))),void(this.config.handleTabKey&&f===a.TAB_KEY&&(b.preventDefault(),
+k(this,this.element,b.shiftKey))))},x=function(){var b=function(){this.doc.execCommand("enableObjectResizing",!1,"false"),this.doc.execCommand("enableInlineTableEditing",!1,"false")},c=function(){b.call(this),f(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c)}.bind(this);this.doc.execCommand&&a.browser.supportsCommand(this.doc,"enableObjectResizing")&&a.browser.supportsCommand(this.doc,"enableInlineTableEditing")&&(this.sandbox.getIframe?e(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c):setTimeout(function(){b.call(this)}.bind(this),0)),this.tableSelection=a.quirks.tableCellsSelection(this.element,this.parent)};a.views.Composer.prototype.observe=function(){var a=this.sandbox.getIframe?this.sandbox.getIframe():this.sandbox.getContentEditable(),d=(this.element,c.supportsEventsInIframeCorrectly()||this.sandbox.getContentEditable?this.element:this.sandbox.getWindow());this.focusState=this.getValue(!1,!1),a.addEventListener(["DOMNodeRemoved"],l.bind(this),!1),c.supportsMutationEvents()||(this.domNodeRemovedInterval=setInterval(function(){b.contains(document.documentElement,a)||l.call(this)},250)),this.config.handleTables&&x.call(this),e(d,["drop","paste","mouseup","focus","keyup"],m.bind(this)),d.addEventListener("focus",n.bind(this),!1),d.addEventListener("blur",o.bind(this),!1),e(this.element,["drop","paste","beforepaste"],p.bind(this),!1),this.element.addEventListener("copy",q.bind(this),!1),this.element.addEventListener("mousedown",s.bind(this),!1),this.element.addEventListener("mouseover",t.bind(this),!1),this.element.addEventListener("click",u.bind(this),!1),this.element.addEventListener("drop",v.bind(this),!1),this.element.addEventListener("keyup",r.bind(this),!1),this.element.addEventListener("keydown",w.bind(this),!1),this.element.addEventListener("dragenter",function(){this.parent.fire("unset_placeholder")}.bind(this),!1)}}(wysihtml5),function(a){var b=400;a.views.Synchronizer=Base.extend({constructor:function(a,b,c){this.editor=a,this.textarea=b,this.composer=c,this._observe()},fromComposerToTextarea:function(b){this.textarea.setValue(a.lang.string(this.composer.getValue(!1,!1)).trim(),b)},fromTextareaToComposer:function(a){var b=this.textarea.getValue(!1,!1);b?this.composer.setValue(b,a):(this.composer.clear(),this.editor.fire("set_placeholder"))},sync:function(a){"textarea"===this.editor.currentView.name?this.fromTextareaToComposer(a):this.fromComposerToTextarea(a)},_observe:function(){var c,d=this,e=this.textarea.element.form,f=function(){c=setInterval(function(){d.fromComposerToTextarea()},b)},g=function(){clearInterval(c),c=null};f(),e&&(a.dom.observe(e,"submit",function(){d.sync(!0)}),a.dom.observe(e,"reset",function(){setTimeout(function(){d.fromTextareaToComposer()},0)})),this.editor.on("change_view",function(a){"composer"!==a||c?"textarea"===a&&(d.fromComposerToTextarea(!0),g()):(d.fromTextareaToComposer(!0),f())}),this.editor.on("destroy:composer",g)}})}(wysihtml5),function(a){a.views.SourceView=Base.extend({constructor:function(a,b){this.editor=a,this.composer=b,this._observe()},switchToTextarea:function(a){var b=this.composer.win.getComputedStyle(this.composer.element),c=parseFloat(b.width),d=Math.max(parseFloat(b.height),100);this.textarea||(this.textarea=this.composer.doc.createElement("textarea"),this.textarea.className="wysihtml5-source-view"),this.textarea.style.width=c+"px",this.textarea.style.height=d+"px",this.textarea.value=this.editor.getValue(a,!0),this.composer.element.parentNode.insertBefore(this.textarea,this.composer.element),this.editor.currentView="source",this.composer.element.style.display="none"},switchToComposer:function(a){var b=this.textarea.value;b?this.composer.setValue(b,a):(this.composer.clear(),this.editor.fire("set_placeholder")),this.textarea.parentNode.removeChild(this.textarea),this.editor.currentView=this.composer,this.composer.element.style.display=""},_observe:function(){this.editor.on("change_view",function(a){"composer"===a?this.switchToComposer(!0):"textarea"===a&&this.switchToTextarea(!0)}.bind(this))}})}(wysihtml5),wysihtml5.views.Textarea=wysihtml5.views.View.extend({name:"textarea",constructor:function(a,b,c){this.base(a,b,c),this._observe()},clear:function(){this.element.value=""},getValue:function(a){var b=this.isEmpty()?"":this.element.value;return a!==!1&&(b=this.parent.parse(b)),b},setValue:function(a,b){b&&(a=this.parent.parse(a)),this.element.value=a},cleanUp:function(){var a=this.parent.parse(this.element.value);this.element.value=a},hasPlaceholderSet:function(){var a=wysihtml5.browser.supportsPlaceholderAttributeOn(this.element),b=this.element.getAttribute("placeholder")||null,c=this.element.value,d=!c;return a&&d||c===b},isEmpty:function(){return!wysihtml5.lang.string(this.element.value).trim()||this.hasPlaceholderSet()},_observe:function(){var a=this.element,b=this.parent,c={focusin:"focus",focusout:"blur"},d=wysihtml5.browser.supportsEvent("focusin")?["focusin","focusout","change"]:["focus","blur","change"];b.on("beforeload",function(){wysihtml5.dom.observe(a,d,function(a){var d=c[a.type]||a.type;b.fire(d).fire(d+":textarea")}),wysihtml5.dom.observe(a,["paste","drop"],function(){setTimeout(function(){b.fire("paste").fire("paste:textarea")},0)})})}}),function(a){var b,c={name:b,style:!0,toolbar:b,showToolbarAfterInit:!0,showToolbarDialogsOnSelection:!0,autoLink:!0,handleTables:!0,handleTabKey:!0,parserRules:{tags:{br:{},span:{},div:{},p:{}},classes:{}},pasteParserRulesets:null,parser:a.dom.parse,useLineBreaks:!0,stylesheets:[],placeholderText:b,supportTouchDevices:!0,cleanUp:!0,contentEditableMode:!1,classNames:{composer:"wysihtml5-editor",body:"wysihtml5-supported",sandbox:"wysihtml5-sandbox",placeholder:"wysihtml5-placeholder",uneditableContainer:"wysihtml5-uneditable-container"},copyedFromMarking:''};a.Editor=a.lang.Dispatcher.extend({constructor:function(b,d){if(this.editableElement="string"==typeof b?document.getElementById(b):b,this.config=a.lang.object({}).merge(c).merge(d).get(),this._isCompatible=a.browser.supported(),d&&d.classNames&&a.lang.object(this.config.classNames).merge(d.classNames),"textarea"!=this.editableElement.nodeName.toLowerCase()&&(this.config.contentEditableMode=!0,this.config.noTextarea=!0),this.config.noTextarea||(this.textarea=new a.views.Textarea(this,this.editableElement,this.config),this.currentView=this.textarea),!this._isCompatible||!this.config.supportTouchDevices&&a.browser.isTouchDevice()){var e=this;return void setTimeout(function(){e.fire("beforeload").fire("load")},0)}a.dom.addClass(document.body,this.config.classNames.body),this.composer=new a.views.Composer(this,this.editableElement,this.config),this.currentView=this.composer,"function"==typeof this.config.parser&&this._initParser(),this.on("beforeload",this.handleBeforeLoad)},handleBeforeLoad:function(){this.config.noTextarea?this.sourceView=new a.views.SourceView(this,this.composer):this.synchronizer=new a.views.Synchronizer(this,this.textarea,this.composer),this.config.toolbar&&(this.toolbar=new a.toolbar.Toolbar(this,this.config.toolbar,this.config.showToolbarAfterInit))},isCompatible:function(){return this._isCompatible},clear:function(){return this.currentView.clear(),this},getValue:function(a,b){return this.currentView.getValue(a,b)},setValue:function(a,b){return this.fire("unset_placeholder"),a?(this.currentView.setValue(a,b),this):this.clear()},cleanUp:function(){this.currentView.cleanUp()},focus:function(a){return this.currentView.focus(a),this},disable:function(){return this.currentView.disable(),this},enable:function(){return this.currentView.enable(),this},isEmpty:function(){return this.currentView.isEmpty()},hasPlaceholderSet:function(){return this.currentView.hasPlaceholderSet()},parse:function(b,c){var d=this.config.contentEditableMode?document:this.composer?this.composer.sandbox.getDocument():null,e=this.config.parser(b,{rules:this.config.parserRules,cleanUp:this.config.cleanUp,context:d,uneditableClass:this.config.classNames.uneditableContainer,clearInternals:c});return"object"==typeof b&&a.quirks.redraw(b),e},_initParser:function(){var b;a.browser.supportsModernPaste()?this.on("paste:composer",function(c){c.preventDefault(),b=a.dom.getPastedHtml(c),b&&this._cleanAndPaste(b)}.bind(this)):this.on("beforepaste:composer",function(b){b.preventDefault();var c=this.composer.getScrollPos();a.dom.getPastedHtmlWithDiv(this.composer,function(a){a&&this._cleanAndPaste(a),this.composer.setScrollPos(c)}.bind(this))}.bind(this))},_cleanAndPaste:function(b){var c=a.quirks.cleanPastedHTML(b,{referenceNode:this.composer.element,rules:this.config.pasteParserRulesets||[{set:this.config.parserRules}],uneditableClass:this.config.classNames.uneditableContainer});this.composer.selection.deleteContents(),this.composer.selection.insertHTML(c)}})}(wysihtml5);
//# sourceMappingURL=wysihtml.min.map
\ No newline at end of file
diff --git a/dist/wysihtml.min.map b/dist/wysihtml.min.map
index be89c48..166520c 100644
--- a/dist/wysihtml.min.map
+++ b/dist/wysihtml.min.map
@@ -1 +1 @@
-{"version":3,"file":"wysihtml.min.js","sources":["wysihtml.js"],"names":["wysihtml5","version","commands","dom","quirks","toolbar","lang","selection","views","INVISIBLE_SPACE","INVISIBLE_SPACE_REG_EXP","EMPTY_FUNCTION","ELEMENT_NODE","TEXT_NODE","BACKSPACE_KEY","ENTER_KEY","ESCAPE_KEY","SPACE_KEY","TAB_KEY","DELETE_KEY","polyfills","win","doc","String","prototype","trim","rtrim","this","replace","s_add","s_rem","Element","on","fn","self","attachEvent","e","event","target","srcElement","preventDefault","returnValue","stopPropagation","cancelBubble","which","button","keyCode","call","detachEvent","Object","defineProperty","getOwnPropertyDescriptor","get","innerText","set","s","Array","isArray","arg","toString","indexOf","a","f","c","length","r","d","Function","bind","oThis","TypeError","aArgs","slice","arguments","fToBind","fNOP","fBound","apply","concat","ElementPrototype","matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","selector","node","nodes","parentNode","document","querySelectorAll","i","createElement","testElement","classList","add","contains","createMethod","method","original","DOMTokenList","token","len","toggle","_toggle","force","view","classListProp","protoProp","elemCtrProto","objCtr","strTrim","arrIndexOf","item","DOMEx","type","message","name","code","DOMException","checkTokenAndGetIndex","test","ClassList","elem","trimmedClasses","getAttribute","classes","split","push","_updateClassName","setAttribute","classListProto","classListGetter","Error","tokens","l","updated","remove","index","splice","result","join","classListPropDesc","enumerable","configurable","ex","number","__defineGetter__","normalizeHasCaretError","window","ret","t1","createTextNode","t2","t3","createRange","appendChild","body","setStart","setEnd","getSelection","removeAllRanges","addRange","normalize","childNodes","anchorNode","firstChild","anchorOffset","removeChild","getTextNodes","all","nextSibling","nodeType","normalizeFix","nf","Node","texts","ownerDocument","defaultView","anode","aoffset","fnode","focusNode","foffset","focusOffset","prevTxt","shift","curText","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","previousSibling","nodeValue","factory","root","define","amd","module","exports","rangy","isHostMethod","o","p","t","FUNCTION","OBJECT","isHostObject","isHostProperty","UNDEFINED","createMultiplePropertyTest","testFunc","props","isTextRange","range","areHostMethods","textRangeMethods","areHostProperties","textRangeProperties","getBody","getElementsByTagName","consoleLog","msg","console","log","alertOrLog","shouldAlert","isBrowser","alert","fail","reason","api","initialized","supported","config","alertOnFail","warn","alertOnWarn","getErrorDesc","description","init","testRange","implementsDomRange","implementsTextRange","domRangeMethods","domRangeProperties","nodeName","toLowerCase","createTextRange","features","errorMessage","moduleName","modules","Module","initListeners","deprecationNotice","deprecated","replacement","createAliasForDeprecatedMethod","owner","util","toArray","shim","shimListeners","dependencies","initializer","createModule","initFunc","newModule","stack","RangePrototype","SelectionPrototype","areHostObjects","forEach","arr","func","preferTextRange","autoInitialize","rangyAutoInitialize","extend","hasOwnProperty","obj","deep","createOptions","optionsParam","defaults","options","el","arrayLike","addListener","eventType","listener","addEventListener","addInitListener","addShimListener","createMissingNativeApi","requiredModule","requiredModuleNames","createError","createCoreModule","rangePrototype","selectionPrototype","isHtmlNamespace","ns","namespaceURI","UNDEF","parentElement","parent","getNodeIndex","getNodeLength","getCommonAncestor","node1","node2","n","ancestors","arrayContains","isAncestorOf","ancestor","descendant","selfIsAncestor","isOrIsAncestorOf","getClosestAncestorIn","isCharacterDataNode","isTextOrCommentNode","insertAfter","precedingNode","nextNode","insertBefore","splitDataNode","positionsToPreserve","newNode","cloneNode","deleteData","position","offset","getDocument","getWindow","parentWindow","getIframeDocument","iframeEl","contentDocument","contentWindow","getIframeWindow","isWindow","getContentDocument","methodName","tagName","getRootContainer","comparePoints","nodeA","offsetA","nodeB","offsetB","nodeC","childA","childB","isBrokenNode","inspectNode","crashyTextNodes","data","idAttr","id","innerHTML","fragmentFromNodeChildren","child","fragment","createDocumentFragment","createTestElement","html","contentEditable","bodyFirstChild","removeNode","NodeIterator","_next","createIterator","DomPosition","codeName","textNode","val","getComputedStyleProperty","getComputedStyle","propName","documentElement","currentStyle","_current","hasNext","next","detach","equals","pos","inspect","INDEX_SIZE_ERR","HIERARCHY_REQUEST_ERR","WRONG_DOCUMENT_ERR","NO_MODIFICATION_ALLOWED_ERR","NOT_FOUND_ERR","NOT_SUPPORTED_ERR","INVALID_STATE_ERR","INVALID_NODE_TYPE_ERR","isNonTextPartiallySelected","startContainer","endContainer","getRangeDocument","getRangeRoot","getBoundaryBeforeNode","getBoundaryAfterNode","insertNodeAtPosition","firstNodeInserted","rangesIntersect","rangeA","rangeB","touchingIsIntersecting","assertRangeValid","startComparison","startOffset","endOffset","endComparison","cloneSubtree","iterator","partiallySelected","subIterator","frag","isPartiallySelectedSubtree","getSubtreeIterator","iterateSubtree","rangeIterator","iteratorState","it","stop","subRangeIterator","deleteSubtree","extractSubtree","getNodesInRange","nodeTypes","filter","regex","filterNodeTypes","filterExists","RegExp","RangeIterator","sc","ec","getName","clonePartiallySelectedTextNodes","collapsed","so","eo","commonAncestorContainer","isSingleCharacterDataNode","_first","_last","createAncestorFinder","assertNoDocTypeNotationEntityAncestor","allowSelf","getDocTypeNotationEntityAncestor","assertValidNodeType","invalidTypes","assertValidOffset","assertSameDocumentOrFragment","getDocumentOrFragmentContainer","assertNodeNotReadOnly","getReadonlyAncestor","assertNode","isValidOffset","isRangeValid","splitRangeBoundaries","startEndSame","setStartAndEnd","rangeToHtml","container","cloneContents","copyComparisonConstantsToObject","START_TO_START","s2s","START_TO_END","s2e","END_TO_END","e2e","END_TO_START","e2s","NODE_BEFORE","n_b","NODE_AFTER","n_a","NODE_BEFORE_AND_AFTER","n_b_a","NODE_INSIDE","n_i","copyComparisonConstants","constructor","createRangeContentRemover","remover","boundaryUpdater","boundary","reset","createPrototypeRange","createBeforeAfterNodeSetter","isBefore","isStart","beforeAfterNodeTypes","rootContainerNodeTypes","setRangeStart","setRangeEnd","F","args","setBoundary","setStartBefore","setStartAfter","setEndBefore","setEndAfter","collapse","selectNodeContents","selectNode","start","end","extractContents","deleteContents","canSurroundContents","boundariesInvalid","splitBoundaries","splitBoundariesPreservingPositions","normalizeBoundaries","sibling","mergeForward","appendData","mergeBackward","nodeLength","insertData","nodeIndex","normalizeStart","endNode","startNode","collapseToPoint","updateCollapsedAndCommonAncestor","updateBoundaries","Range","current","subRange","cloneRange","readonlyNodeTypes","insertableNodeTypes","surroundNodeTypes","styleEl","htmlParsingConforms","createContextualFragment","fragmentStr","rangeProperties","compareBoundaryPoints","how","prefixA","prefixB","insertNode","clone","surroundContents","content","hasChildNodes","lastChild","prop","textParts","compareNode","comparePoint","toHtml","intersectsNode","isPointInRange","intersectsRange","intersectsOrTouchesRange","intersection","intersectionRange","union","unionRange","containsNode","allowPartial","containsNodeContents","containsRange","containsNodeText","nodeRange","textNodes","getNodes","lastTextNode","pop","collapseBefore","collapseAfter","getBookmark","containerNode","preSelectionRange","moveToBookmark","bookmark","charIndex","nextCharIndex","nodeStack","foundStart","rangesEqual","isValid","r1","r2","DomRange","WrappedRange","WrappedTextRange","updateRangeProperties","nativeRange","updateNativeRange","startMoved","endMoved","nativeRangeDifferent","rangeProto","refresh","testTextNode","oppositeName","range2","createNativeRange","getTextRangeContainerElement","textRange","parentEl","duplicate","startEl","endEl","startEndContainer","textRangeIsCollapsed","compareEndPoints","getTextRangeBoundaryPosition","wholeRangeContainerElement","isCollapsed","startInfo","workingRange","containerElement","canHaveHTML","boundaryPosition","nodeInfo","workingNode","comparison","previousNode","boundaryNode","workingComparisonType","childNodeCount","moveToElementText","Math","floor","setEndPoint","tempRange","rangeLength","text","moveStart","createBoundaryTextRange","boundaryParent","boundaryOffset","nodeIsDataNode","startBoundary","rangeContainerElement","rangeToTextRange","startRange","endRange","toTextRange","globalObj","createRangyRange","isDirectionBackward","dir","WrappedSelection","getWinSelection","winParam","getDocSelection","winSelectionIsBackward","sel","backward","updateAnchorAndFocusFromRange","anchorPrefix","focusPrefix","updateAnchorAndFocusFromNativeSelection","nativeSel","nativeSelection","updateEmptySelection","rangeCount","_ranges","getNativeRange","rangeContainsSingleElement","rangeNodes","getSingleElementFromRange","updateFromTextRange","wrappedRange","updateControlSelection","docSelection","controlRange","addRangeToControlSelection","rangeElement","newControlRange","createControlRange","select","deleteProperties","detached","actOnCachedSelection","action","cached","cachedRangySelections","createControlSelection","ranges","assertNodeInSameDocument","createStartOrEndSetter","getRangeAt","setSingleRange","isBackward","rangeInspects","anchor","focus","checkSelectionRanges","getNativeSelection","selectionIsCollapsed","BOOLEAN","NUMBER","CONTROL","implementsWinGetSelection","implementsDocSelection","useDocumentSelection","isSelectionValid","testSelection","selectionHasAnchorAndFocus","selectionHasExtend","selectionHasRangeCount","selectionSupportsMultipleRanges","collapsedNonEditableSelectionsSupported","addRangeBackwardToNative","originalSelectionRangeCount","selectionHasMultipleRanges","originalSelectionRanges","originalSelectionBackward","testEl","chromeMatch","navigator","appVersion","match","parseInt","testControlRange","implementsControlRange","getSelectionRangeAt","docSel","selProto","addRangeBackward","direction","previousRangeCount","clonedNativeRange","selectionIsBackward","setRanges","empty","refreshSelection","checkForChanges","oldRanges","oldAnchorNode","oldAnchorOffset","removeRangeManually","getAllRanges","removeRange","removed","isBackwards","rangeTexts","collapseToStart","collapseToEnd","selectAllChildren","deleteFromDocument","element","eachRange","callMethodOnEachRange","params","results","changeEachRange","rangeBookmarks","rangeBookmark","selRanges","saveRanges","restoreRanges","rangeHtmls","getNativeTextRange","detachAll","Selection","docReady","loadHandler","readyState","require","gEBI","getElementById","insertRangeBoundaryMarker","atStart","markerEl","markerId","Date","random","boundaryRange","style","lineHeight","display","className","markerTextChar","setRangeBoundary","compareRanges","saveRange","startMarkerId","endMarkerId","restoreRange","rangeInfo","rangeInfos","sort","saveSelection","restored","restoreSelection","savedSelection","preserveDirection","removeMarkerElement","removeMarkers","Base","_instance","_static","_prototyping","proto","base","klass","_constructing","implement","valueOf","source","value","previous","toSource","hidden","key","object","block","context","undefined","browser","iosVersion","userAgent","androidVersion","isIE","equation","re","rv","appName","exec","parseFloat","$1","isGecko","isWebKit","isChrome","isOpera","USER_AGENT","hasContentEditableSupport","hasEditingApiSupport","execCommand","queryCommandSupported","queryCommandState","hasQuerySelectorSupport","querySelector","isIncompatibleMobileBrowser","isIos","isAndroid","isTouchDevice","supportsEvent","supportsSandboxedIframes","throwsMixedContentWarningWhenIframeSrcIsEmpty","displaysCaretInEmptyContentEditableCorrectly","hasCurrentStyleProperty","insertsLineBreaksOnReturn","supportsPlaceholderAttributeOn","eventName","supportsEventsInIframeCorrectly","supportsHTML5Tags","html5","supportsCommand","buggyCommands","formatBlock","insertUnorderedList","insertOrderedList","insertHTML","command","isBuggy","e1","queryCommandEnabled","e2","doesAutoLinkingInContentEditable","canDisableAutoLinking","clearsContentEditableCorrectly","supportsGetAttributeCorrectly","td","canSelectImagesInContentEditable","autoScrollsToCaret","autoClosesUnclosedTags","clonedTestElement","supportsNativeGetElementsByClassName","getElementsByClassName","supportsSelectionModify","needsSpaceAfterLineBreak","supportsSpeechApiOn","input","chromeVersion","crashesWhenDefineProperty","property","doesAsyncFocus","hasProblemsSettingCaretAfterImg","hasUndoInContextMenu","hasInsertNodeIssue","hasIframeFocusIssue","createsNestedInvalidMarkupAfterPaste","supportsMutationEvents","supportsModernPaste","fixStyleKey","array","needle","without","arrayToSubstract","newArr","newArray","map","callback","thisArg","A","unique","vals","max","idx","Dispatcher","handler","events","off","handlers","newHandlers","fire","payload","observe","stopObserving","merge","otherObj","isPlainObject","difference","diffObj","newObj","isFunction","Text","isEmpty","WHITE_SPACE_START","WHITE_SPACE_END","ENTITY_REG_EXP","ENTITY_MAP","&","<",">","\"","\t","string","str","interpolate","vars","by","search","escapeHTML","linebreaks","convertSpaces","autoLink","ignoreInClasses","_hasParentThatShouldBeIgnored","_parseNode","_convertUrlsToLinks","URL_REG_EXP","url","punctuation","TRAILING_CHAR_REG_EXP","opening","BRACKETS","realUrl","displayUrl","MAX_DISPLAY_LENGTH","substr","_getTempElement","tempElement","_wysihtml5_tempElement","_wrapMatchesInNode","IGNORE_URLS_IN","childNodesLength",")","]","}","addClass","hasClass","removeClass","elementClassName","convertToList","_createListItem","list","listItem","_createList","listType","uneditableClass","childNode","lineBreak","isBlockElement","isLineBreak","currentListItem","lineBreaks","lineBreaksLength","getStyle","from","insert","after","replaceChild","copyAttributes","attributesToCopy","elementToCopyFrom","to","elementToCopyTo","attribute","andTo","callee","BOX_SIZING_PROPERTIES","shouldIgnoreBoxSizingBorderBox","hasBoxSizingBorderBox","offsetWidth","copyStyles","stylesToCopy","cssText","setStyles","delegate","removeEventListener","parents","unshift","domNode","defaultNodeTypes","is","emptyTextNode","ignoreWhitespace","regx","visible","isVisible","getTextContent","prev","prevNode","types","ignoreBlankTexts","commonAncestor","parents1","parents2","lastLeafNode","leafClasses","escapeParent","newWrapper","split2","nodeWrap","curNode","properties","query","classRegExp","styleProperty","hasOneStyle","styles","j","maxStyleP","styleValue","attr","getAttributes","attrList","hasOneAttribute","attributeValue","getAsDom","_innerHTMLShiv","_ensureHTML5Compatibility","_wysihtml5_supportsHTML5Tags","HTML5_ELEMENTS","getParentElement","levels","camelize","REG_EXP_CAMELIZE","charAt","toUpperCase","stylePropertyMapping","float","camelizedProperty","originalOverflow","needsOverflowReset","overflow","getPropertyValue","ingoreEmpty","textContent","hasElementWithTagName","_getDocumentIdentifier","_wysihtml5_identifier","DOCUMENT_IDENTIFIER","LIVE_CACHE","cacheEntry","hasElementWithClassName","elementToInsert","before","into","insertCSS","rules","styleElement","styleSheet","link","head","_isLineBreak","_isLineBreakOrBlockElement","eventNames","handlerWrapper","parse","elementOrHtml_current","config_current","elementOrHtml","currentRules","defaultRules","isString","clearInternals","selectors","_applySelectorRules","_convert","cleanUp","unjoinNbsps","txtnodes","getCorrectInnerHTML","oldNode","newChild","nodeDisplay","oldNodeType","oldChilds","oldChildsLength","NODE_TYPE_MAPPING","blockElements","DEFAULT_NODE_NAME","attributes","selectorRules","els","elementHandlingMethods","_handleElement","rule","renameTag","tagRules","tags","scopeName","_wysihtml5","outerHTML","unwrap","rename_tag","one_of_type","_testTypes","remove_action","remove_action_rename_to","_handleAttributes","_handleStyles","definition","type_definitions","_testType","classesLength","styleProp","nodeClasses","nodeStyles","methods","m","typeCeckMethods","WHITE_SPACE_REG_EXP","sp","attrs","v","keep_styles","styleFloat","cssFloat","_getAttributesBeginningWith","beginning","returnAttributes","_checkAttribute","attributeName","newAttributeValue","attributeCheckMethods","_checkAttributes","local_attributes","newValue","matchingAttributes","globalAttributes","checkAttributes","oldAttributes","imax","currentClass","newClass","setClass","set_class","add_class","addStyle","add_style","setAttributes","set_attributes","allowedClasses","newClasses","oldClasses","check_attributes","addClassMethods","addStyleMethods","newStyle","classes_blacklist","src","width","height","_handleText","_handleComment","comments","createComment","1","3","8","REG_EXP","href","alt","numbers","dimension","any","align_text","mapping","left","right","center","align_img","justify","clear_br","both","size_font","2","4","5","6","7","-","+","has_visible_contet","txt","visibleElements","offsetHeight","removeEmptyTextNodes","renameElement","newNodeName","newElement","replaceWithChildNodes","_isBlockElement","_appendLineBreak","resolveList","useLineBreaks","isLastChild","shouldAppendLineBreak","paragraph","isLastItem","lastListItem","lastElementChild","firstElementChild","windowProperties","windowProperties2","documentProperties","Sandbox","readyCallback","editableArea","_createIframe","insertInto","getIframe","_readyError","destroy","iframe","that","security","allowtransparency","frameborder","marginwidth","marginheight","onload","onreadystatechange","_onLoadIframe","iframeWindow","iframeDocument","charset","characterSet","sandboxHtml","_getHtml","stylesheets","open","write","close","onerror","fileName","lineNumber","_unset","loaded","setTimeout","templateVars","setter","__defineSetter__","ContentEditableArea","getContentEditable","_bindElement","_createElement","_loadElement","contentExists","innerHtml","simulatePlaceholder","editor","placeholderText","placeholderClassName","CLASS_NAME","unset","composerIsVisible","hasPlaceholderSet","clear","placeholderSet","setValue","setTextContent","HAS_GET_ATTRIBUTE_BUG","isLoadedImage","hasAttribute","specified","complete","queryInList","q","removeElement","referenceNode","tag","MapCell","cell","isColspan","isRowspan","firstCol","lastCol","firstRow","lastRow","isReal","spanCollection","modified","TableModifyerByCell","table","addSpannedCellToMap","cspan","rspan","spanCollect","rmax","cmax","rr","cc","setCellAsModified","smax","setTableMap","ridx","row","cells","cidx","tableRows","getTableRows","getRowCells","inlineTables","inlineCells","allCells","tableCells","inlineRows","allRows","getMapIndex","r_length","c_length","r_idx","c_idx","col","getElementAtIndex","getMapElsTo","to_cell","idx_start","idx_end","temp_idx","temp_cidx","maxr","maxc","orderSelectionEnds","secondcell","createCells","nr","correctColIndexForUnreals","corrIdx","getLastNewCellOnRow","rowLimit","removeEmptyTable","splitRowToCells","colspan","cType","newCells","removeAttribute","getRealRowEl","injectRowAt","new_cells","n_cidx","canMerge","decreaseCellSpan","span","removeSurplusLines","allRowspan","fillMissingCells","r_max","c_max","prevcell","rectify","unmerge","thisCell","rowspan","collapseCellToNextRow","cellIdx","newRowIdx","newIdx","lastCell","removeRowCell","getRowElementsByCell","modRow","getColumnElementsByCell","removeRow","oldRow","removeColCell","removeColumn","what","addRow","where","newRow","addRowCell","cr","colSpanAttr","addColumn","addColCell","doAdd","handleCellAddWithRowspan","modCell","temp_r_cells","nrow","addRowsNr","crow","getCellsBetween","cell1","cell2","c1","addCells","removeCells","mergeCellsBetween","unmergeCell","findCell","findRowByCell","findColumnByCell","elements","thisOwner","otherOwner","point","location_index","smallest_common_ancestor","this_index","other_index","children","getPastedHtml","clipboardData","getData","getPastedHtmlWithDiv","composer","selBookmark","cleanerDiv","scrollPos","getScrollPos","top","y","x","setBookmark","removeInvisibleSpaces","cleanPastedHTML","styleToRegex","styleStr","trimmedStr","escapedStr","extendRulesWithStyleExceptions","exceptStyles","newRules","pickRuleset","ruleset","defaultSet","condition","newHtml","color","fontSize","ensureProperClearing","clearIfNecessary","TILDE_ESCAPED","urlToSearch","elementsWithTilde","redraw","tableCellsSelection","editable","handleMouseDown","handleSelectionMousedown","removeCellSelections","selection_class","handleMouseMove","handleMouseUp","selectedCells","addSelections","oldEnd","curTable","deselect","bindSideclick","sideClickHandler","selectCells","getColorParseMethod","colorStr","colorTypeConf","colorParseMethods","getColorFormat","rgba","rgb","hex6","radix","hex3","makeParamRegExp","styleParser","parseColor","stylesStr","paramName","paramsRegex","colorType","colorMatch","unparseColor","colorFormat","hexRadix","parseFontSize","_getCumulativeOffsetTop","offsetTop","offsetParent","getDepth","getWebkitSelectionFixNode","blankNode","placeholderRemover","delayedPlaceholderRemover","minWidth","expandRangeToSurround","common","start_depth","end_depth","contain","unselectableClass","getRange","setSelection","setBefore","createTemporaryCaretSpaceAfter","caretPlaceholder","caretPlaceholderText","keyDownHandler","setAfter","ctrlKey","metaKey","zIndex","notVisual","fixWebkitSelection","lastSibling","activeElement","setScrollPos","avoidInvisibleSpace","isElement","displayStyle","getSelectedNode","fixSelBorders","getSelectedOwnNodes","getOwnRanges","ownNodes","maxi","findNodesInSelection","curNodes","filterElements","containsUneditable","uneditables","getOwnUneditables","startParent","endParent","ev","CustomEvent","dispatchEvent","err","getPreviousNode","ignoreEmpty","getSelectionParentsByTag","curEl","getRangeToNodeEnd","sNode","lastR","caretIsLastInSelection","endc","endtxt","caretIsFirstInSelection","caretIsInTheBeginnig","ofNode","getBeforeSelection","includePrevLeaves","inTmpCaret","rng","prevLeaf","executeAndRestoreRangy","restoreScrollPosition","executeAndRestore","newCaretPlaceholder","prevSibling","newRange","oldScrollTop","scrollTop","oldScrollLeft","scrollLeft","placeholderHtml","canAppendChild","anchorNodeTagNameLower","voidElements","splitElementAtCaret","contentAfterRangeStart","surround","nodeOptions","cssStyle","deblockAndSurround","tempDivElements","tempElements","scrollIntoView","tolerance","hasScrollBars","scrollHeight","_wysihtml5ScrollIntoViewElement","selectLine","_selectLine_W3C","_selectLine_MSIE","modify","toLineBoundary","location","rangeBottom","rangeEnd","measureNode","rangeTop","boundingTop","scrollWidth","moveToPoint","getText","getOwnNodes","splitBounds","fixRangeOverflow","containment","_detectInlineRangeProblems","previousElementSibling","_endOffsetForNode","dontFix","allUneditables","deepUneditables","tmpRanges","tmpRange","jmax","selectAll","blankEndNode","blankStartNode","doSelect","notSelected","getHtml","getPlainText","isEndToEndInNode","nodeNames","isInThisEditable","cssClass","regExp","matchingClassNames","hasStyleAttr","removeStyle","s2","getMatchingStyleRegexp","regexes","sSplit","elStyle","isMatchingAllready","areMatchingAllready","removeOrChangeStyle","exactRegex","hasSameClasses","el1","el2","REG_EXP_WHITE_SPACE","replaceWithOwnChildren","elementsHaveSameNonClassAttributes","attr1","attr2","getNamedItem","isSplitPoint","splitNodeAt","descendantNode","descendantOffset","Merge","firstNode","isElementMerge","firstTextNode","HTMLApplier","tagNames","similarClassRegExp","similarStyleRegExp","defaultTagName","applyToAnyTagName","doMerge","textBits","getLength","getAncestorWithClass","cssClassMatch","getAncestorWithStyle","cssStyleMatch","getMatchingAncestor","matchType","postApply","currentMerge","precedingTextNode","lastNode","merges","rangeStartNode","rangeEndNode","rangeStartOffset","rangeEndOffset","getAdjacentMergeableTextNode","nextTextNode","forward","adjacentNode","isTextNode","areElementsMergeable","createContainer","applyToTextNode","isRemovable","undoToTextNode","ancestorWithClass","ancestorWithStyle","styleMode","styleChanged","ancestorRange","applyToRange","ri","undoToRange","getTextSelectedByRange","isAppliedToRange","appliedType","coverage","selectedText","toggleRange","parentsExactMatch","isApplied","Commands","support","commandValue","state","stateValue","bold","formatInline","getOptions","createLink","opts","removeLink","size","fontSizeStyle","st","foreColor","foreColorStyle","colorVals","colString","bgColorStyle","correctOptionsForSimilarityCheck","cleanup","allElements","BLOCK_ELEMENTS","classNames","uneditableContainer","defaultNodeName","findOuterBlock","allBlocks","UNNESTABLE_BLOCK_ELEMENTS","cloneOuterInlines","innerNode","INLINE_ELEMENTS","outerNode","applyOptionsToElement","removeOptionsFromElement","unwrapBlocksFromContent","contentBlocks","fixRangeCoverage","wrapRangeWithElement","defaultName","defaultOptions","wrapper","blocks","rangeStartContainer","similarOptions","similarOuterBlock","splitAllBlocks","firstOuterBlock","tmpEl","outerInlines","getParentBlockNodeName","newBlockElements","parentNodes","formatCode","classname","selectedNodes","pre","selectedNode","hasNoClass","hasNoStyle","hasNoAttributes","isSameNode","element1","element2","classes1","classes2","createWrapNode","defaultTag","containsSameAttributes","updateElementAttributes","newAttributes","fullContain","updateFormatOfElement","nodeNameQuery","nodeQueryMatch","queryAliasMap","getSelectedTextNodes","findSimilarTextNodeWrapper","exact","isSimilarNode","selectRange","selectTextNodes","lastText","selectTextNode","getState","caretNode","searchNodes","partial","caretIsInsideWord","beforeChar","afterChar","getRangeForWord","offsetStart","offsetEnd","txtNodes","wordOffset","mergeContents","mergeConsequentSimilarElements","cleanupAndSetSelection","cleanupAndSetCaret","formatTextNode","wrapNode","unformatTextNode","newWrapNode","removeFormatFromTextNode","formatTextRange","updateFormat","wordObj","exactState","removeFormat","textOffset","applyFormat","fixOptions","b","strong","em","insertBlockQuote","NODE_NAME","insertImage","image","imagesInSelection","LINE_BREAK","insertLineBreak","insertList","isNode","findListEl","other","parentLi","otherNodeName","handleSameTypeList","otherLists","innerLists","getListsInSelection","handleOtherTypeList","renameLists","createListFallback","tempClassName","getTime","cmd","italic","justifyCenter","justifyLeft","justifyRight","justifyFull","alignRightStyle","alignLeftStyle","alignCenterStyle","redo","undoManager","underline","undo","createTable","cols","rows","tableStyle","mergeTableCells","tableSelection","addTableCells","tableSelect","deleteTableCells","selCell","indentList","listEls","tryToPushLiLevel","liNodes","listTag","prevLi","liNode","prevLiList","found","outdentList","tryToPullLiLevel","listNode","outerListNode","outerLiNode","afterList","getAfterList","newList","subscript","superscript","Z_KEY","Y_KEY","MAX_HISTORY_ENTRIES","DATA_ATTR_NODE","DATA_ATTR_OFFSET","UndoManager","historyStr","historyDom","transact","_observe","lastKey","sandbox","altKey","isUndo","shiftKey","isRedo","previousHtml","currentHtml","getValue","getChildNodeIndex","undoPossible","redoPossible","historyEntry","getChildNodeByIndex","View","textareaElement","noTextarea","_observeViewChange","currentView","show","hide","disable","enable","Composer","CARET_HACK","editableElement","textarea","contentEditableMode","_initContentEditableArea","_initSandbox","_displayStyle","disabled","setToEnd","pageYOffset","pageXOffset","scrollTo","_create","_createWysiwygFormField","form","hiddenField","placeholder","_initAutoLinking","_initObjectResizing","_initUndoManager","_initLineBreaking","initSync","sync","supportsDisablingOfAutoLinking","supportsAutoLinking","nodeWithSelection","isInUneditable","links","urlRegExp","newTextContent","propertiesLength","adjust","USE_NATIVE_LINE_BREAK_INSIDE_TAGS","LIST_TAGS","blockElement","HOST_TEMPLATE","TEXT_FORMATTING","BOX_FORMATTING","ADDITIONAL_CSS_RULES","focusWithoutScrolling","setActive","elementStyle","originalScrollTop","originalScrollLeft","originalStyles","WebkitUserSelect","displayValueForCopying","originalActiveElement","hasPlaceholder","originalPlaceholder","originalDisplayValue","originalDisabled","focusStylesHost","blurStylesHost","disabledStylesHost","blur","boxFormattingStyles","shortcuts","66","73","85","addListeners","removeListeners","fixLastBrDeletionInTable","aNode","handleUneditableDeletion","fixDeleteInTheBeginnigOfHeading","selNode","commonAncestorNode","handleDeleteKeyPress","handleTabKeyDown","handleDomNodeRemoved","domNodeRemovedInterval","clearInterval","handleUserInteraction","handleFocus","focusState","handleBlur","changeevent","create","handlePaste","handleCopy","copyedFromMarking","setData","handleKeyUp","allImages","notMyImages","myImages","handleMouseOver","title","titlePrefixes","IMG","handleClick","uneditable","handleDrop","handleKeyDown","handleTabKey","initTableHandling","hideHandlers","iframeInitiator","focusBlurElement","setInterval","handleTables","INTERVAL","Synchronizer","fromComposerToTextarea","shouldParseHtml","fromTextareaToComposer","textareaValue","interval","startInterval","stopInterval","SourceView","switchToTextarea","composerStyles","switchToComposer","Textarea","supportsPlaceholder","eventMapping","focusin","focusout","undef","defaultConfig","showToolbarAfterInit","showToolbarDialogsOnSelection","parserRules","br","div","pasteParserRulesets","parser","supportTouchDevices","Editor","_isCompatible","_initParser","handleBeforeLoad","sourceView","synchronizer","Toolbar","isCompatible","htmlOrElement","parseContext","oldHtml","_cleanAndPaste","pastedHTML","cleanHtml"],"mappings":";;AAWA,GAAIA,YACFC,QAAS,eAGTC,YACAC,OACAC,UACAC,WACAC,QACAC,aACAC,SAEAC,gBAAiB,SACjBC,wBAAyB,UAEzBC,eAAgB,aAEhBC,aAAc,EACdC,UAAc,EAEdC,cAAgB,EAChBC,UAAgB,GAChBC,WAAgB,GAChBC,UAAgB,GAChBC,QAAgB,EAChBC,WAAgB,GAEjBnB,WAAUoB,UAAY,SAASC,EAAKC,GAQ9BC,OAAOC,UAAUC,OACpB,WAEE,GAAIC,GAAQ,oCACZH,QAAOC,UAAUC,KAAO,WACtB,MAAOE,MAAKC,QAAQF,EAAO,QAMjC,WACE,GAAIG,GAAQ,mBACRC,EAAQ,qBACRR,GAAIO,KACRR,EAAIU,QAAQP,UAAWK,GAAUR,EAAKQ,GAAUP,EAAKO,GAAU,SAAUG,EAAIC,EAAIC,GAC/E,OAAQA,EAAOP,MAAMQ,YAAa,KAAOH,EAAI,SAASI,GACpD,GAAIA,GAAIA,GAAKf,EAAIgB,KACjBD,GAAEE,OAASF,EAAEE,QAAUF,EAAEG,WACzBH,EAAEI,eAAkBJ,EAAEI,gBAAmB,WAAWJ,EAAEK,aAAc,GACpEL,EAAEM,gBAAkBN,EAAEM,iBAAmB,WAAWN,EAAEO,cAAe,GACrEP,EAAEQ,MAAQR,EAAES,OAAwB,IAAbT,EAAES,OAAe,EAAiB,IAAbT,EAAES,OAAe,EAAIT,EAAES,OAAWT,EAAEU,QAChFb,EAAGc,KAAKb,EAAME,MAGlBf,EAAIU,QAAQP,UAAWM,GAAUT,EAAKS,GAAUR,EAAKQ,GAAU,SAAUE,EAAIC,GAC3E,MAAON,MAAKqB,YAAa,KAAO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,OAH8B,gBAApB,IACR/kC,EAAUI,OAAOi8C,OAAO+lB,GAEnB3/D,GAOTq/D,YAAa,WACX,GAAIQ,EAEAtiE,GAAUwzB,QAAQ2E,sBACpBx2B,KAAKK,GAAG,iBAAkB,SAASK,GACjCA,EAAMG,iBACN8/D,EAAUtiE,EAAUG,IAAIg6C,cAAc93C,GAClCigE,GACF3gE,KAAK4gE,eAAeD,IAEtBl+D,KAAKzC,OAGPA,KAAKK,GAAG,uBAAwB,SAASK,GACvCA,EAAMG,gBACN,IAAIk4C,GAAY/4C,KAAK44C,SAASI,cAE9B36C,GAAUG,IAAIm6C,qBAAqB34C,KAAK44C,SAAU,SAASioB,GACrDA,GACF7gE,KAAK4gE,eAAeC,GAEtB7gE,KAAK44C,SAASmG,aAAahG,IAC3Bt2C,KAAKzC,QAEPyC,KAAKzC,QAIX4gE,eAAgB,SAAUD,GACxB,GAAIG,GAAYziE,EAAUI,OAAO66C,gBAAgBqnB,GAC/CzwB,cAAiBlwC,KAAK44C,SAASprB,QAC/B4U,MAASpiC,KAAK8M,OAAOgzD,uBAAyBn+D,IAAO3B,KAAK8M,OAAO6yD,cACjE5jC,gBAAmB/7B,KAAK8M,OAAOi/C,WAAWC,qBAE5ChsD,MAAK44C,SAASh6C,UAAU4f,iBACxBxe,KAAK44C,SAASh6C,UAAU61B,WAAWqsC,OAGtCziE"}
\ No newline at end of file
+{"version":3,"file":"wysihtml.min.js","sources":["wysihtml.js"],"names":["wysihtml5","version","commands","dom","quirks","toolbar","lang","selection","views","INVISIBLE_SPACE","INVISIBLE_SPACE_REG_EXP","EMPTY_FUNCTION","ELEMENT_NODE","TEXT_NODE","BACKSPACE_KEY","ENTER_KEY","ESCAPE_KEY","SPACE_KEY","TAB_KEY","DELETE_KEY","polyfills","win","doc","String","prototype","trim","rtrim","this","replace","s_add","s_rem","Element","on","fn","self","attachEvent","e","event","target","srcElement","preventDefault","returnValue","stopPropagation","cancelBubble","which","button","keyCode","call","detachEvent","Object","defineProperty","getOwnPropertyDescriptor","get","innerText","set","s","Array","isArray","arg","toString","indexOf","a","f","c","length","r","d","Function","bind","oThis","TypeError","aArgs","slice","arguments","fToBind","fNOP","fBound","apply","concat","ElementPrototype","matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","selector","node","nodes","parentNode","document","querySelectorAll","i","createElement","testElement","classList","add","contains","createMethod","method","original","DOMTokenList","token","len","toggle","_toggle","force","view","classListProp","protoProp","elemCtrProto","objCtr","strTrim","arrIndexOf","item","DOMEx","type","message","name","code","DOMException","checkTokenAndGetIndex","test","ClassList","elem","trimmedClasses","getAttribute","classes","split","push","_updateClassName","setAttribute","classListProto","classListGetter","Error","tokens","l","updated","remove","index","splice","result","join","classListPropDesc","enumerable","configurable","ex","number","__defineGetter__","normalizeHasCaretError","window","ret","t1","createTextNode","t2","t3","createRange","appendChild","body","setStart","setEnd","getSelection","removeAllRanges","addRange","normalize","childNodes","anchorNode","firstChild","anchorOffset","removeChild","getTextNodes","all","nextSibling","nodeType","normalizeFix","nf","Node","texts","ownerDocument","defaultView","anode","aoffset","aelement","undefined","fnode","focusNode","foffset","focusOffset","felement","prevTxt","shift","curText","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","DOCUMENT_POSITION_CONTAINS","previousSibling","nodeValue","factory","root","define","amd","module","exports","rangy","isHostMethod","o","p","t","FUNCTION","OBJECT","isHostObject","isHostProperty","UNDEFINED","createMultiplePropertyTest","testFunc","props","isTextRange","range","areHostMethods","textRangeMethods","areHostProperties","textRangeProperties","getBody","getElementsByTagName","consoleLog","msg","console","log","alertOrLog","shouldAlert","isBrowser","alert","fail","reason","api","initialized","supported","config","alertOnFail","warn","alertOnWarn","getErrorDesc","description","init","testRange","implementsDomRange","implementsTextRange","domRangeMethods","domRangeProperties","nodeName","toLowerCase","createTextRange","features","errorMessage","moduleName","modules","Module","initListeners","deprecationNotice","deprecated","replacement","createAliasForDeprecatedMethod","owner","util","toArray","shim","shimListeners","dependencies","initializer","createModule","initFunc","newModule","stack","RangePrototype","SelectionPrototype","areHostObjects","forEach","arr","func","preferTextRange","autoInitialize","rangyAutoInitialize","extend","hasOwnProperty","obj","deep","createOptions","optionsParam","defaults","options","el","arrayLike","addListener","eventType","listener","addEventListener","addInitListener","addShimListener","createMissingNativeApi","requiredModule","requiredModuleNames","createError","createCoreModule","rangePrototype","selectionPrototype","isHtmlNamespace","ns","namespaceURI","UNDEF","parentElement","parent","getNodeIndex","getNodeLength","getCommonAncestor","node1","node2","n","ancestors","arrayContains","isAncestorOf","ancestor","descendant","selfIsAncestor","isOrIsAncestorOf","getClosestAncestorIn","isCharacterDataNode","isTextOrCommentNode","insertAfter","precedingNode","nextNode","insertBefore","splitDataNode","positionsToPreserve","newNode","cloneNode","deleteData","position","offset","getDocument","getWindow","parentWindow","getIframeDocument","iframeEl","contentDocument","contentWindow","getIframeWindow","isWindow","getContentDocument","methodName","tagName","getRootContainer","comparePoints","nodeA","offsetA","nodeB","offsetB","nodeC","childA","childB","isBrokenNode","inspectNode","crashyTextNodes","data","idAttr","id","innerHTML","fragmentFromNodeChildren","child","fragment","createDocumentFragment","createTestElement","html","contentEditable","bodyFirstChild","removeNode","NodeIterator","_next","createIterator","DomPosition","codeName","textNode","val","getComputedStyleProperty","getComputedStyle","propName","documentElement","currentStyle","_current","hasNext","next","detach","equals","pos","inspect","INDEX_SIZE_ERR","HIERARCHY_REQUEST_ERR","WRONG_DOCUMENT_ERR","NO_MODIFICATION_ALLOWED_ERR","NOT_FOUND_ERR","NOT_SUPPORTED_ERR","INVALID_STATE_ERR","INVALID_NODE_TYPE_ERR","isNonTextPartiallySelected","startContainer","endContainer","getRangeDocument","getRangeRoot","getBoundaryBeforeNode","getBoundaryAfterNode","insertNodeAtPosition","firstNodeInserted","rangesIntersect","rangeA","rangeB","touchingIsIntersecting","assertRangeValid","startComparison","startOffset","endOffset","endComparison","cloneSubtree","iterator","partiallySelected","subIterator","frag","isPartiallySelectedSubtree","getSubtreeIterator","iterateSubtree","rangeIterator","iteratorState","it","stop","subRangeIterator","deleteSubtree","extractSubtree","getNodesInRange","nodeTypes","filter","regex","filterNodeTypes","filterExists","RegExp","RangeIterator","sc","ec","getName","clonePartiallySelectedTextNodes","collapsed","so","eo","commonAncestorContainer","isSingleCharacterDataNode","_first","_last","createAncestorFinder","assertNoDocTypeNotationEntityAncestor","allowSelf","getDocTypeNotationEntityAncestor","assertValidNodeType","invalidTypes","assertValidOffset","assertSameDocumentOrFragment","getDocumentOrFragmentContainer","assertNodeNotReadOnly","getReadonlyAncestor","assertNode","isValidOffset","isRangeValid","splitRangeBoundaries","startEndSame","setStartAndEnd","rangeToHtml","container","cloneContents","copyComparisonConstantsToObject","START_TO_START","s2s","START_TO_END","s2e","END_TO_END","e2e","END_TO_START","e2s","NODE_BEFORE","n_b","NODE_AFTER","n_a","NODE_BEFORE_AND_AFTER","n_b_a","NODE_INSIDE","n_i","copyComparisonConstants","constructor","createRangeContentRemover","remover","boundaryUpdater","boundary","reset","createPrototypeRange","createBeforeAfterNodeSetter","isBefore","isStart","beforeAfterNodeTypes","rootContainerNodeTypes","setRangeStart","setRangeEnd","F","args","setBoundary","setStartBefore","setStartAfter","setEndBefore","setEndAfter","collapse","selectNodeContents","selectNode","start","end","extractContents","deleteContents","canSurroundContents","boundariesInvalid","splitBoundaries","splitBoundariesPreservingPositions","normalizeBoundaries","sibling","mergeForward","appendData","mergeBackward","nodeLength","insertData","nodeIndex","normalizeStart","endNode","startNode","collapseToPoint","updateCollapsedAndCommonAncestor","updateBoundaries","Range","current","subRange","cloneRange","readonlyNodeTypes","insertableNodeTypes","surroundNodeTypes","styleEl","htmlParsingConforms","createContextualFragment","fragmentStr","rangeProperties","compareBoundaryPoints","how","prefixA","prefixB","insertNode","clone","surroundContents","content","hasChildNodes","lastChild","prop","textParts","compareNode","comparePoint","toHtml","intersectsNode","isPointInRange","intersectsRange","intersectsOrTouchesRange","intersection","intersectionRange","union","unionRange","containsNode","allowPartial","containsNodeContents","containsRange","containsNodeText","nodeRange","textNodes","getNodes","lastTextNode","pop","collapseBefore","collapseAfter","getBookmark","containerNode","preSelectionRange","moveToBookmark","bookmark","charIndex","nextCharIndex","nodeStack","foundStart","rangesEqual","isValid","r1","r2","DomRange","WrappedRange","WrappedTextRange","updateRangeProperties","nativeRange","updateNativeRange","startMoved","endMoved","nativeRangeDifferent","rangeProto","refresh","testTextNode","oppositeName","range2","createNativeRange","getTextRangeContainerElement","textRange","parentEl","duplicate","startEl","endEl","startEndContainer","textRangeIsCollapsed","compareEndPoints","getTextRangeBoundaryPosition","wholeRangeContainerElement","isCollapsed","startInfo","workingRange","containerElement","canHaveHTML","boundaryPosition","nodeInfo","workingNode","comparison","previousNode","boundaryNode","workingComparisonType","childNodeCount","moveToElementText","Math","floor","setEndPoint","tempRange","rangeLength","text","moveStart","createBoundaryTextRange","boundaryParent","boundaryOffset","nodeIsDataNode","startBoundary","rangeContainerElement","rangeToTextRange","startRange","endRange","toTextRange","globalObj","createRangyRange","isDirectionBackward","dir","WrappedSelection","getWinSelection","winParam","getDocSelection","winSelectionIsBackward","sel","backward","updateAnchorAndFocusFromRange","anchorPrefix","focusPrefix","updateAnchorAndFocusFromNativeSelection","nativeSel","nativeSelection","updateEmptySelection","rangeCount","_ranges","getNativeRange","rangeContainsSingleElement","rangeNodes","getSingleElementFromRange","updateFromTextRange","wrappedRange","updateControlSelection","docSelection","controlRange","addRangeToControlSelection","rangeElement","newControlRange","createControlRange","select","deleteProperties","detached","actOnCachedSelection","action","cached","cachedRangySelections","createControlSelection","ranges","assertNodeInSameDocument","createStartOrEndSetter","getRangeAt","setSingleRange","isBackward","rangeInspects","anchor","focus","checkSelectionRanges","getNativeSelection","selectionIsCollapsed","BOOLEAN","NUMBER","CONTROL","implementsWinGetSelection","implementsDocSelection","useDocumentSelection","isSelectionValid","testSelection","selectionHasAnchorAndFocus","selectionHasExtend","selectionHasRangeCount","selectionSupportsMultipleRanges","collapsedNonEditableSelectionsSupported","addRangeBackwardToNative","originalSelectionRangeCount","selectionHasMultipleRanges","originalSelectionRanges","originalSelectionBackward","testEl","chromeMatch","navigator","appVersion","match","parseInt","testControlRange","implementsControlRange","getSelectionRangeAt","docSel","selProto","addRangeBackward","direction","previousRangeCount","clonedNativeRange","selectionIsBackward","setRanges","empty","refreshSelection","checkForChanges","oldRanges","oldAnchorNode","oldAnchorOffset","removeRangeManually","getAllRanges","removeRange","removed","isBackwards","rangeTexts","collapseToStart","collapseToEnd","selectAllChildren","deleteFromDocument","element","eachRange","callMethodOnEachRange","params","results","changeEachRange","rangeBookmarks","rangeBookmark","selRanges","saveRanges","restoreRanges","rangeHtmls","getNativeTextRange","detachAll","Selection","docReady","loadHandler","readyState","require","gEBI","getElementById","insertRangeBoundaryMarker","atStart","markerEl","markerId","Date","random","boundaryRange","style","lineHeight","display","className","markerTextChar","setRangeBoundary","compareRanges","saveRange","startMarkerId","endMarkerId","restoreRange","rangeInfo","rangeInfos","sort","saveSelection","restored","restoreSelection","savedSelection","preserveDirection","removeMarkerElement","removeMarkers","Base","_instance","_static","_prototyping","proto","base","klass","_constructing","implement","valueOf","source","value","previous","toSource","hidden","key","object","block","context","browser","iosVersion","userAgent","androidVersion","isIE","equation","re","rv","appName","exec","parseFloat","$1","isGecko","isWebKit","isChrome","isOpera","USER_AGENT","hasContentEditableSupport","hasEditingApiSupport","execCommand","queryCommandSupported","queryCommandState","hasQuerySelectorSupport","querySelector","isIncompatibleMobileBrowser","isIos","isAndroid","isTouchDevice","supportsEvent","supportsSandboxedIframes","throwsMixedContentWarningWhenIframeSrcIsEmpty","displaysCaretInEmptyContentEditableCorrectly","hasCurrentStyleProperty","insertsLineBreaksOnReturn","supportsPlaceholderAttributeOn","eventName","supportsEventsInIframeCorrectly","supportsHTML5Tags","html5","supportsCommand","buggyCommands","formatBlock","insertUnorderedList","insertOrderedList","insertHTML","command","isBuggy","e1","queryCommandEnabled","e2","doesAutoLinkingInContentEditable","canDisableAutoLinking","clearsContentEditableCorrectly","supportsGetAttributeCorrectly","td","canSelectImagesInContentEditable","autoScrollsToCaret","autoClosesUnclosedTags","clonedTestElement","supportsNativeGetElementsByClassName","getElementsByClassName","supportsSelectionModify","needsSpaceAfterLineBreak","supportsSpeechApiOn","input","chromeVersion","crashesWhenDefineProperty","property","doesAsyncFocus","hasProblemsSettingCaretAfterImg","hasUndoInContextMenu","hasInsertNodeIssue","hasIframeFocusIssue","createsNestedInvalidMarkupAfterPaste","supportsMutationEvents","supportsModernPaste","fixStyleKey","array","needle","without","arrayToSubstract","newArr","newArray","map","callback","thisArg","A","unique","vals","max","idx","Dispatcher","handler","events","off","handlers","newHandlers","fire","payload","observe","stopObserving","merge","otherObj","isPlainObject","difference","diffObj","newObj","isFunction","Text","isEmpty","WHITE_SPACE_START","WHITE_SPACE_END","ENTITY_REG_EXP","ENTITY_MAP","&","<",">","\"","\t","string","str","interpolate","vars","by","search","escapeHTML","linebreaks","convertSpaces","autoLink","ignoreInClasses","_hasParentThatShouldBeIgnored","_parseNode","_convertUrlsToLinks","URL_REG_EXP","url","punctuation","TRAILING_CHAR_REG_EXP","opening","BRACKETS","realUrl","displayUrl","MAX_DISPLAY_LENGTH","substr","_getTempElement","tempElement","_wysihtml5_tempElement","_wrapMatchesInNode","IGNORE_URLS_IN","childNodesLength",")","]","}","addClass","hasClass","removeClass","elementClassName","convertToList","_createListItem","list","listItem","_createList","listType","uneditableClass","childNode","lineBreak","isBlockElement","isLineBreak","currentListItem","lineBreaks","lineBreaksLength","getStyle","from","insert","after","replaceChild","copyAttributes","attributesToCopy","elementToCopyFrom","to","elementToCopyTo","attribute","andTo","callee","BOX_SIZING_PROPERTIES","shouldIgnoreBoxSizingBorderBox","hasBoxSizingBorderBox","offsetWidth","copyStyles","stylesToCopy","cssText","setStyles","delegate","removeEventListener","parents","unshift","domNode","defaultNodeTypes","is","emptyTextNode","ignoreWhitespace","regx","visible","isVisible","getTextContent","prev","prevNode","types","ignoreBlankTexts","commonAncestor","parents1","parents2","lastLeafNode","leafClasses","escapeParent","newWrapper","split2","nodeWrap","curNode","properties","query","classRegExp","styleProperty","hasOneStyle","styles","j","maxStyleP","styleValue","attr","getAttributes","attrList","hasOneAttribute","attributeValue","getAsDom","_innerHTMLShiv","_ensureHTML5Compatibility","_wysihtml5_supportsHTML5Tags","HTML5_ELEMENTS","getParentElement","levels","camelize","REG_EXP_CAMELIZE","charAt","toUpperCase","stylePropertyMapping","float","camelizedProperty","originalOverflow","needsOverflowReset","overflow","getPropertyValue","ingoreEmpty","textContent","hasElementWithTagName","_getDocumentIdentifier","_wysihtml5_identifier","DOCUMENT_IDENTIFIER","LIVE_CACHE","cacheEntry","hasElementWithClassName","elementToInsert","before","into","insertCSS","rules","styleElement","styleSheet","link","head","_isLineBreak","_isLineBreakOrBlockElement","eventNames","handlerWrapper","parse","elementOrHtml_current","config_current","elementOrHtml","currentRules","defaultRules","isString","clearInternals","selectors","_applySelectorRules","_convert","cleanUp","unjoinNbsps","txtnodes","getCorrectInnerHTML","oldNode","newChild","nodeDisplay","oldNodeType","oldChilds","oldChildsLength","NODE_TYPE_MAPPING","blockElements","DEFAULT_NODE_NAME","attributes","selectorRules","els","elementHandlingMethods","_handleElement","rule","renameTag","tagRules","tags","scopeName","_wysihtml5","outerHTML","unwrap","rename_tag","one_of_type","_testTypes","remove_action","remove_action_rename_to","_handleAttributes","_handleStyles","definition","type_definitions","_testType","classesLength","styleProp","nodeClasses","nodeStyles","methods","m","typeCeckMethods","WHITE_SPACE_REG_EXP","sp","attrs","v","keep_styles","styleFloat","cssFloat","_getAttributesBeginningWith","beginning","returnAttributes","_checkAttribute","attributeName","newAttributeValue","attributeCheckMethods","_checkAttributes","local_attributes","newValue","matchingAttributes","globalAttributes","checkAttributes","oldAttributes","imax","currentClass","newClass","setClass","set_class","add_class","addStyle","add_style","setAttributes","set_attributes","allowedClasses","newClasses","oldClasses","check_attributes","addClassMethods","addStyleMethods","newStyle","classes_blacklist","src","width","height","_handleText","_handleComment","comments","createComment","1","3","8","REG_EXP","href","alt","numbers","dimension","any","align_text","mapping","left","right","center","align_img","justify","clear_br","both","size_font","2","4","5","6","7","-","+","has_visible_contet","txt","visibleElements","offsetHeight","removeEmptyTextNodes","renameElement","newNodeName","newElement","replaceWithChildNodes","_isBlockElement","_appendLineBreak","resolveList","useLineBreaks","isLastChild","shouldAppendLineBreak","paragraph","isLastItem","lastListItem","lastElementChild","firstElementChild","windowProperties","windowProperties2","documentProperties","Sandbox","readyCallback","editableArea","_createIframe","insertInto","getIframe","_readyError","destroy","iframe","that","security","allowtransparency","frameborder","marginwidth","marginheight","onload","onreadystatechange","_onLoadIframe","iframeWindow","iframeDocument","charset","characterSet","sandboxHtml","_getHtml","stylesheets","open","write","close","onerror","fileName","lineNumber","_unset","loaded","setTimeout","templateVars","setter","__defineSetter__","ContentEditableArea","getContentEditable","_bindElement","_createElement","_loadElement","contentExists","innerHtml","simulatePlaceholder","editor","placeholderText","placeholderClassName","CLASS_NAME","unset","composerIsVisible","hasPlaceholderSet","clear","placeholderSet","setValue","setTextContent","HAS_GET_ATTRIBUTE_BUG","isLoadedImage","hasAttribute","specified","complete","queryInList","q","removeElement","referenceNode","tag","MapCell","cell","isColspan","isRowspan","firstCol","lastCol","firstRow","lastRow","isReal","spanCollection","modified","TableModifyerByCell","table","addSpannedCellToMap","cspan","rspan","spanCollect","rmax","cmax","rr","cc","setCellAsModified","smax","setTableMap","ridx","row","cells","cidx","tableRows","getTableRows","getRowCells","inlineTables","inlineCells","allCells","tableCells","inlineRows","allRows","getMapIndex","r_length","c_length","r_idx","c_idx","col","getElementAtIndex","getMapElsTo","to_cell","idx_start","idx_end","temp_idx","temp_cidx","maxr","maxc","orderSelectionEnds","secondcell","createCells","nr","correctColIndexForUnreals","corrIdx","getLastNewCellOnRow","rowLimit","removeEmptyTable","splitRowToCells","colspan","cType","newCells","removeAttribute","getRealRowEl","injectRowAt","new_cells","n_cidx","canMerge","decreaseCellSpan","span","removeSurplusLines","allRowspan","fillMissingCells","r_max","c_max","prevcell","rectify","unmerge","thisCell","rowspan","collapseCellToNextRow","cellIdx","newRowIdx","newIdx","lastCell","removeRowCell","getRowElementsByCell","modRow","getColumnElementsByCell","removeRow","oldRow","removeColCell","removeColumn","what","addRow","where","newRow","addRowCell","cr","colSpanAttr","addColumn","addColCell","doAdd","handleCellAddWithRowspan","modCell","temp_r_cells","nrow","addRowsNr","crow","getCellsBetween","cell1","cell2","c1","addCells","removeCells","mergeCellsBetween","unmergeCell","findCell","findRowByCell","findColumnByCell","elements","thisOwner","otherOwner","point","location_index","smallest_common_ancestor","this_index","other_index","children","getPastedHtml","clipboardData","getData","getPastedHtmlWithDiv","composer","selBookmark","cleanerDiv","scrollPos","getScrollPos","top","y","x","setBookmark","removeInvisibleSpaces","cleanPastedHTML","styleToRegex","styleStr","trimmedStr","escapedStr","extendRulesWithStyleExceptions","exceptStyles","newRules","pickRuleset","ruleset","defaultSet","condition","newHtml","color","fontSize","ensureProperClearing","clearIfNecessary","TILDE_ESCAPED","urlToSearch","elementsWithTilde","redraw","tableCellsSelection","editable","handleMouseDown","handleSelectionMousedown","removeCellSelections","selection_class","handleMouseMove","handleMouseUp","selectedCells","addSelections","oldEnd","curTable","deselect","bindSideclick","sideClickHandler","selectCells","getColorParseMethod","colorStr","colorTypeConf","colorParseMethods","getColorFormat","rgba","rgb","hex6","radix","hex3","makeParamRegExp","styleParser","parseColor","stylesStr","paramName","paramsRegex","colorType","colorMatch","unparseColor","colorFormat","hexRadix","parseFontSize","_getCumulativeOffsetTop","offsetTop","offsetParent","getDepth","getWebkitSelectionFixNode","blankNode","placeholderRemover","delayedPlaceholderRemover","minWidth","expandRangeToSurround","common","start_depth","end_depth","contain","unselectableClass","getRange","setSelection","setBefore","createTemporaryCaretSpaceAfter","caretPlaceholder","caretPlaceholderText","keyDownHandler","setAfter","ctrlKey","metaKey","zIndex","notVisual","fixWebkitSelection","lastSibling","activeElement","setScrollPos","avoidInvisibleSpace","isElement","displayStyle","getSelectedNode","fixSelBorders","getSelectedOwnNodes","getOwnRanges","ownNodes","maxi","findNodesInSelection","curNodes","filterElements","containsUneditable","uneditables","getOwnUneditables","startParent","endParent","ev","CustomEvent","dispatchEvent","err","getPreviousNode","ignoreEmpty","getSelectionParentsByTag","curEl","getRangeToNodeEnd","sNode","lastR","caretIsLastInSelection","endc","endtxt","caretIsFirstInSelection","caretIsInTheBeginnig","ofNode","getBeforeSelection","includePrevLeaves","inTmpCaret","rng","prevLeaf","executeAndRestoreRangy","restoreScrollPosition","executeAndRestore","newCaretPlaceholder","prevSibling","newRange","oldScrollTop","scrollTop","oldScrollLeft","scrollLeft","placeholderHtml","canAppendChild","anchorNodeTagNameLower","voidElements","splitElementAtCaret","contentAfterRangeStart","surround","nodeOptions","cssStyle","deblockAndSurround","tempDivElements","tempElements","scrollIntoView","tolerance","hasScrollBars","scrollHeight","_wysihtml5ScrollIntoViewElement","selectLine","_selectLine_W3C","_selectLine_MSIE","modify","toLineBoundary","location","rangeBottom","rangeEnd","measureNode","rangeTop","boundingTop","scrollWidth","moveToPoint","getText","getOwnNodes","splitBounds","fixRangeOverflow","containment","_detectInlineRangeProblems","previousElementSibling","_endOffsetForNode","dontFix","allUneditables","deepUneditables","tmpRanges","tmpRange","jmax","selectAll","blankEndNode","blankStartNode","doSelect","notSelected","getHtml","getPlainText","isEndToEndInNode","nodeNames","isInThisEditable","cssClass","regExp","matchingClassNames","hasStyleAttr","removeStyle","s2","getMatchingStyleRegexp","regexes","sSplit","elStyle","isMatchingAllready","areMatchingAllready","removeOrChangeStyle","exactRegex","hasSameClasses","el1","el2","REG_EXP_WHITE_SPACE","replaceWithOwnChildren","elementsHaveSameNonClassAttributes","attr1","attr2","getNamedItem","isSplitPoint","splitNodeAt","descendantNode","descendantOffset","Merge","firstNode","isElementMerge","firstTextNode","HTMLApplier","tagNames","similarClassRegExp","similarStyleRegExp","defaultTagName","applyToAnyTagName","doMerge","textBits","getLength","getAncestorWithClass","cssClassMatch","getAncestorWithStyle","cssStyleMatch","getMatchingAncestor","matchType","postApply","currentMerge","precedingTextNode","lastNode","merges","rangeStartNode","rangeEndNode","rangeStartOffset","rangeEndOffset","getAdjacentMergeableTextNode","nextTextNode","forward","adjacentNode","isTextNode","areElementsMergeable","createContainer","applyToTextNode","isRemovable","undoToTextNode","ancestorWithClass","ancestorWithStyle","styleMode","styleChanged","ancestorRange","applyToRange","ri","undoToRange","getTextSelectedByRange","isAppliedToRange","appliedType","coverage","selectedText","toggleRange","parentsExactMatch","isApplied","Commands","support","commandValue","state","stateValue","bold","formatInline","getOptions","createLink","opts","removeLink","size","fontSizeStyle","st","foreColor","foreColorStyle","colorVals","colString","bgColorStyle","correctOptionsForSimilarityCheck","cleanup","allElements","BLOCK_ELEMENTS","classNames","uneditableContainer","defaultNodeName","findOuterBlock","allBlocks","UNNESTABLE_BLOCK_ELEMENTS","cloneOuterInlines","innerNode","INLINE_ELEMENTS","outerNode","applyOptionsToElement","removeOptionsFromElement","unwrapBlocksFromContent","contentBlocks","fixRangeCoverage","wrapRangeWithElement","defaultName","defaultOptions","wrapper","blocks","rangeStartContainer","similarOptions","similarOuterBlock","splitAllBlocks","firstOuterBlock","tmpEl","outerInlines","getParentBlockNodeName","newBlockElements","parentNodes","formatCode","classname","selectedNodes","pre","selectedNode","hasNoClass","hasNoStyle","hasNoAttributes","isSameNode","element1","element2","classes1","classes2","createWrapNode","defaultTag","containsSameAttributes","updateElementAttributes","newAttributes","fullContain","updateFormatOfElement","nodeNameQuery","nodeQueryMatch","queryAliasMap","getSelectedTextNodes","findSimilarTextNodeWrapper","exact","isSimilarNode","selectRange","selectTextNodes","lastText","selectTextNode","getState","caretNode","searchNodes","partial","caretIsInsideWord","beforeChar","afterChar","getRangeForWord","offsetStart","offsetEnd","txtNodes","wordOffset","mergeContents","mergeConsequentSimilarElements","cleanupAndSetSelection","cleanupAndSetCaret","formatTextNode","wrapNode","unformatTextNode","newWrapNode","removeFormatFromTextNode","formatTextRange","updateFormat","wordObj","exactState","removeFormat","textOffset","applyFormat","fixOptions","b","strong","em","insertBlockQuote","NODE_NAME","insertImage","image","imagesInSelection","LINE_BREAK","insertLineBreak","insertList","isNode","findListEl","other","parentLi","otherNodeName","handleSameTypeList","otherLists","innerLists","getListsInSelection","handleOtherTypeList","renameLists","createListFallback","tempClassName","getTime","cmd","italic","justifyCenter","justifyLeft","justifyRight","justifyFull","alignRightStyle","alignLeftStyle","alignCenterStyle","redo","undoManager","underline","undo","createTable","cols","rows","tableStyle","mergeTableCells","tableSelection","addTableCells","tableSelect","deleteTableCells","selCell","indentList","listEls","tryToPushLiLevel","liNodes","listTag","prevLi","liNode","prevLiList","found","outdentList","tryToPullLiLevel","listNode","outerListNode","outerLiNode","afterList","getAfterList","newList","subscript","superscript","Z_KEY","Y_KEY","MAX_HISTORY_ENTRIES","DATA_ATTR_NODE","DATA_ATTR_OFFSET","UndoManager","historyStr","historyDom","transact","_observe","lastKey","sandbox","altKey","isUndo","shiftKey","isRedo","previousHtml","currentHtml","getValue","getChildNodeIndex","undoPossible","redoPossible","historyEntry","getChildNodeByIndex","View","textareaElement","noTextarea","_observeViewChange","currentView","show","hide","disable","enable","Composer","CARET_HACK","editableElement","textarea","contentEditableMode","_initContentEditableArea","_initSandbox","_displayStyle","disabled","setToEnd","pageYOffset","pageXOffset","scrollTo","_create","_createWysiwygFormField","form","hiddenField","placeholder","_initAutoLinking","_initObjectResizing","_initUndoManager","_initLineBreaking","initSync","sync","supportsDisablingOfAutoLinking","supportsAutoLinking","nodeWithSelection","isInUneditable","links","urlRegExp","newTextContent","propertiesLength","adjust","USE_NATIVE_LINE_BREAK_INSIDE_TAGS","LIST_TAGS","blockElement","HOST_TEMPLATE","TEXT_FORMATTING","BOX_FORMATTING","ADDITIONAL_CSS_RULES","focusWithoutScrolling","setActive","elementStyle","originalScrollTop","originalScrollLeft","originalStyles","WebkitUserSelect","displayValueForCopying","originalActiveElement","hasPlaceholder","originalPlaceholder","originalDisplayValue","originalDisabled","focusStylesHost","blurStylesHost","disabledStylesHost","blur","boxFormattingStyles","shortcuts","66","73","85","addListeners","removeListeners","fixLastBrDeletionInTable","aNode","handleUneditableDeletion","fixDeleteInTheBeginnigOfHeading","selNode","commonAncestorNode","handleDeleteKeyPress","handleTabKeyDown","handleDomNodeRemoved","domNodeRemovedInterval","clearInterval","handleUserInteraction","handleFocus","focusState","handleBlur","changeevent","create","handlePaste","handleCopy","copyedFromMarking","setData","handleKeyUp","allImages","notMyImages","myImages","handleMouseOver","title","titlePrefixes","IMG","handleClick","uneditable","handleDrop","handleKeyDown","handleTabKey","initTableHandling","hideHandlers","iframeInitiator","focusBlurElement","setInterval","handleTables","INTERVAL","Synchronizer","fromComposerToTextarea","shouldParseHtml","fromTextareaToComposer","textareaValue","interval","startInterval","stopInterval","SourceView","switchToTextarea","composerStyles","switchToComposer","Textarea","supportsPlaceholder","eventMapping","focusin","focusout","undef","defaultConfig","showToolbarAfterInit","showToolbarDialogsOnSelection","parserRules","br","div","pasteParserRulesets","parser","supportTouchDevices","Editor","_isCompatible","_initParser","handleBeforeLoad","sourceView","synchronizer","Toolbar","isCompatible","htmlOrElement","parseContext","oldHtml","_cleanAndPaste","pastedHTML","cleanHtml"],"mappings":";;AAWA,GAAIA,YACFC,QAAS,eAGTC,YACAC,OACAC,UACAC,WACAC,QACAC,aACAC,SAEAC,gBAAiB,SACjBC,wBAAyB,UAEzBC,eAAgB,aAEhBC,aAAc,EACdC,UAAc,EAEdC,cAAgB,EAChBC,UAAgB,GAChBC,WAAgB,GAChBC,UAAgB,GAChBC,QAAgB,EAChBC,WAAgB,GAEjBnB,WAAUoB,UAAY,SAASC,EAAKC,GAQ9BC,OAAOC,UAAUC,OACpB,WAEE,GAAIC,GAAQ,oCACZH,QAAOC,UAAUC,KAAO,WACtB,MAAOE,MAAKC,QAAQF,EAAO,QAMjC,WACE,GAAIG,GAAQ,mBACRC,EAAQ,qBACRR,GAAIO,KACRR,EAAIU,QAAQP,UAAWK,GAAUR,EAAKQ,GAAUP,EAAKO,GAAU,SAA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,GACF9gE,KAAK+gE,eAAeD,IAEtBr+D,KAAKzC,OAGPA,KAAKK,GAAG,uBAAwB,SAASK,GACvCA,EAAMG,gBACN,IAAIq4C,GAAYl5C,KAAK+4C,SAASI,cAE9B96C,GAAUG,IAAIs6C,qBAAqB94C,KAAK+4C,SAAU,SAASioB,GACrDA,GACFhhE,KAAK+gE,eAAeC,GAEtBhhE,KAAK+4C,SAASmG,aAAahG,IAC3Bz2C,KAAKzC,QAEPyC,KAAKzC,QAIX+gE,eAAgB,SAAUD,GACxB,GAAIG,GAAY5iE,EAAUI,OAAOg7C,gBAAgBqnB,GAC/CzwB,cAAiBrwC,KAAK+4C,SAASnrB,QAC/B2U,MAASviC,KAAKkN,OAAO+yD,uBAAyBt+D,IAAO3B,KAAKkN,OAAO4yD,cACjE5jC,gBAAmBl8B,KAAKkN,OAAOg/C,WAAWC,qBAE5CnsD,MAAK+4C,SAASn6C,UAAUggB,iBACxB5e,KAAK+4C,SAASn6C,UAAUg2B,WAAWqsC,OAGtC5iE"}
\ No newline at end of file
diff --git a/package.json b/package.json
index 13d511f..ddca69e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "wysihtml",
- "version": "0.5.0-beta12",
+ "version": "0.5.0-beta13",
"devDependencies": {
"grunt": "~0.4.4",
"grunt-contrib-concat": "~0.4.0",