From 7d7ec40c49b59013860e2d644da6d1fb46608402 Mon Sep 17 00:00:00 2001
From: Oliver Pulges
Date: Fri, 18 Dec 2015 12:07:42 +0200
Subject: [PATCH] Update version
---
CHANGELOG.textile | 5 +
dist/wysihtml-toolbar.js | 573 ++++++++++++++++++++--------------
dist/wysihtml-toolbar.min.js | 16 +-
dist/wysihtml-toolbar.min.map | 2 +-
dist/wysihtml.js | 573 ++++++++++++++++++++--------------
dist/wysihtml.min.js | 16 +-
dist/wysihtml.min.map | 2 +-
package.json | 2 +-
8 files changed, 696 insertions(+), 493 deletions(-)
diff --git a/CHANGELOG.textile b/CHANGELOG.textile
index dcbb1b4..9ccbe54 100644
--- a/CHANGELOG.textile
+++ b/CHANGELOG.textile
@@ -1,3 +1,8 @@
+*wysihtml5x 0.5.4* (December 18, 2015)
+* Fixes some errors of inserting block nodes on blank last line (mostly chrome and safari)
+* Fixes some errors of merging contents of block nodes on delete
+* Fixes IE list toggle issue
+
*wysihtml5x 0.5.3* (December 9, 2015)
* Removed automatic forced title attributes on links and images
* Improved line breaks addition/removal when applying/removing format with formatBlock command
diff --git a/dist/wysihtml-toolbar.js b/dist/wysihtml-toolbar.js
index e38eb74..0a349ad 100644
--- a/dist/wysihtml-toolbar.js
+++ b/dist/wysihtml-toolbar.js
@@ -1,5 +1,5 @@
/**
- * @license wysihtml v0.5.3
+ * @license wysihtml v0.5.4
* https://github.com/Voog/wysihtml
*
* Author: Christopher Blum (https://github.com/tiff)
@@ -10,7 +10,7 @@
*
*/
var wysihtml5 = {
- version: "0.5.3",
+ version: "0.5.4",
// namespaces
commands: {},
@@ -7938,11 +7938,6 @@ wysihtml5.dom.copyAttributes = function(attributesToCopy) {
return nodes;
}
- // Returns if node is the rangy selection bookmark element (that must not be taken into account in most situatons and is removed on selection restoring)
- function isBookmark(n) {
- return n && n.nodeType === 1 && n.classList.contains('rangySelectionBoundary');
- }
-
wysihtml5.dom.domNode = function(node) {
var defaultNodeTypes = [wysihtml5.ELEMENT_NODE, wysihtml5.TEXT_NODE];
@@ -7951,7 +7946,12 @@ wysihtml5.dom.copyAttributes = function(attributesToCopy) {
is: {
emptyTextNode: function(ignoreWhitespace) {
var regx = ignoreWhitespace ? (/^\s*$/g) : (/^[\r\n]*$/g);
- return node.nodeType === wysihtml5.TEXT_NODE && (regx).test(node.data);
+ return node && node.nodeType === wysihtml5.TEXT_NODE && (regx).test(node.data);
+ },
+
+ // Returns if node is the rangy selection bookmark element (that must not be taken into account in most situatons and is removed on selection restoring)
+ rangyBookmark: function() {
+ return node && node.nodeType === 1 && node.classList.contains('rangySelectionBoundary');
},
visible: function() {
@@ -7990,7 +7990,7 @@ wysihtml5.dom.copyAttributes = function(attributesToCopy) {
}
if (
- isBookmark(prevNode) || // is Rangy temporary boomark element (bypass)
+ wysihtml5.dom.domNode(prevNode).is.rangyBookmark() || // is Rangy temporary boomark element (bypass)
(!wysihtml5.lang.array(types).contains(prevNode.nodeType)) || // nodeTypes check.
(options && options.ignoreBlankTexts && wysihtml5.dom.domNode(prevNode).is.emptyTextNode(true)) // Blank text nodes bypassed if set
) {
@@ -8010,7 +8010,7 @@ wysihtml5.dom.copyAttributes = function(attributesToCopy) {
}
if (
- isBookmark(nextNode) || // is Rangy temporary boomark element (bypass)
+ wysihtml5.dom.domNode(nextNode).is.rangyBookmark() || // is Rangy temporary boomark element (bypass)
(!wysihtml5.lang.array(types).contains(nextNode.nodeType)) || // nodeTypes check.
(options && options.ignoreBlankTexts && wysihtml5.dom.domNode(nextNode).is.emptyTextNode(true)) // blank text nodes bypassed if set
) {
@@ -11762,7 +11762,7 @@ wysihtml5.quirks.ensureProperClearing = (function() {
}
};
- blankNode.appendChild(document.createTextNode(wysihtml5.INVISIBLE_SPACE));
+ blankNode.appendChild(container.ownerDocument.createTextNode(wysihtml5.INVISIBLE_SPACE));
blankNode.className = '_wysihtml5-temp-caret-fix';
blankNode.style.display = 'block';
blankNode.style.minWidth = '1px';
@@ -12198,10 +12198,17 @@ wysihtml5.quirks.ensureProperClearing = (function() {
nextNode = caretNode.nextSibling;
}
} else {
- caretNode = r[0].startContainer;
+ if (r[0].startOffset === 0 && r[0].startContainer.previousSibling) {
+ caretNode = r[0].startContainer.previousSibling;
+ if (caretNode.nodeType === 3) {
+ offset = caretNode.data.length;
+ }
+ } else {
+ caretNode = r[0].startContainer;
+ offset = r[0].startOffset;
+ }
prevNode = caretNode.previousSibling;
nextNode = caretNode.nextSibling;
- offset = r[0].startOffset;
}
return {
@@ -12647,8 +12654,8 @@ wysihtml5.quirks.ensureProperClearing = (function() {
if (wysihtml5.browser.supportsSelectionModify()) {
this._selectLine_W3C();
} else if (r.nativeRange && r.nativeRange.getBoundingClientRect) {
- // For IE Edge as it ditched the old api and did not fully implement the new one (as expected)*/
- this._selectLineUniversal();
+ // For IE Edge as it ditched the old api and did not fully implement the new one (as expected)
+ this._selectLineUniversal();
}
},
@@ -12664,7 +12671,6 @@ wysihtml5.quirks.ensureProperClearing = (function() {
} else {
return node.data && node.data.length || 0;
}
- // body...
},
anode = s.anchorNode.nodeType === 1 ? s.anchorNode.childNodes[s.anchorOffset] : s.anchorNode,
fnode = s.focusNode.nodeType === 1 ? s.focusNode.childNodes[s.focusOffset] : s.focusNode;
@@ -12773,7 +12779,16 @@ wysihtml5.quirks.ensureProperClearing = (function() {
r.moveEnd('character', 1);
} else if (r.startContainer.nodeType === 1 && r.startContainer.childNodes[r.startOffset] && r.startContainer.childNodes[r.startOffset].nodeType === 3 && r.startContainer.childNodes[r.startOffset].data.length > 0) {
r.moveEnd('character', 1);
- } else if (r.startOffset > 0 && ( r.startContainer.nodeType === 3 || (r.startContainer.nodeType === 1 && !isLineBreakingElement(prevNode(r.startContainer.childNodes[r.startOffset - 1]))))) {
+ } else if (
+ r.startOffset > 0 &&
+ (
+ r.startContainer.nodeType === 3 ||
+ (
+ r.startContainer.nodeType === 1 &&
+ !isLineBreakingElement(prevNode(r.startContainer.childNodes[r.startOffset - 1]))
+ )
+ )
+ ) {
r.moveStart('character', -1);
}
}
@@ -12783,6 +12798,7 @@ wysihtml5.quirks.ensureProperClearing = (function() {
// Is probably just empty line as can not be expanded
rect = r.nativeRange.getBoundingClientRect();
+ // If startnode is not line break allready move the start position of range by -1 character until clientRect top changes;
do {
amount = r.moveStart('character', -1);
testRect = r.nativeRange.getBoundingClientRect();
@@ -12793,31 +12809,31 @@ wysihtml5.quirks.ensureProperClearing = (function() {
}
count++;
} while (amount !== 0 && !found && count < 2000);
-
count = 0;
found = false;
rect = r.nativeRange.getBoundingClientRect();
- do {
- amount = r.moveEnd('character', 1);
- testRect = r.nativeRange.getBoundingClientRect();
- if (!testRect || Math.floor(testRect.bottom) !== Math.floor(rect.bottom)) {
- r.moveEnd('character', -1);
-
- // Fix a IE line end marked by linebreak element although caret is before it
- // If causes problems should be changed to be applied only to IE
- if (r.endContainer && r.endContainer.nodeType === 1 && r.endContainer.childNodes[r.endOffset] && r.endContainer.childNodes[r.endOffset].nodeType === 1 && r.endContainer.childNodes[r.endOffset].nodeName === "BR" && r.endContainer.childNodes[r.endOffset].previousSibling) {
- if (r.endContainer.childNodes[r.endOffset].previousSibling.nodeType === 1) {
- r.setEnd(r.endContainer.childNodes[r.endOffset].previousSibling, r.endContainer.childNodes[r.endOffset].previousSibling.childNodes.length);
- } else if (r.endContainer.childNodes[r.endOffset].previousSibling.nodeType === 3) {
- r.setEnd(r.endContainer.childNodes[r.endOffset].previousSibling, r.endContainer.childNodes[r.endOffset].previousSibling.data.length);
+
+ if (r.endContainer !== this.contain || (this.contain.lastChild && this.contain.childNodes[r.endOffset] !== this.contain.lastChild)) {
+ do {
+ amount = r.moveEnd('character', 1);
+ testRect = r.nativeRange.getBoundingClientRect();
+ if (!testRect || Math.floor(testRect.bottom) !== Math.floor(rect.bottom)) {
+ r.moveEnd('character', -1);
+
+ // Fix a IE line end marked by linebreak element although caret is before it
+ // If causes problems should be changed to be applied only to IE
+ if (r.endContainer && r.endContainer.nodeType === 1 && r.endContainer.childNodes[r.endOffset] && r.endContainer.childNodes[r.endOffset].nodeType === 1 && r.endContainer.childNodes[r.endOffset].nodeName === "BR" && r.endContainer.childNodes[r.endOffset].previousSibling) {
+ if (r.endContainer.childNodes[r.endOffset].previousSibling.nodeType === 1) {
+ r.setEnd(r.endContainer.childNodes[r.endOffset].previousSibling, r.endContainer.childNodes[r.endOffset].previousSibling.childNodes.length);
+ } else if (r.endContainer.childNodes[r.endOffset].previousSibling.nodeType === 3) {
+ r.setEnd(r.endContainer.childNodes[r.endOffset].previousSibling, r.endContainer.childNodes[r.endOffset].previousSibling.data.length);
+ }
}
+ found = true;
}
-
- found = true;
- }
- count++;
- } while (amount !== 0 && !found && count < 2000);
-
+ count++;
+ } while (amount !== 0 && !found && count < 2000);
+ }
r.select();
this.includeRangyRangeHelpers();
},
@@ -14159,7 +14175,7 @@ wysihtml5.Commands = Base.extend(
nbIdx;
for (var i = elements.length; i--;) {
- if (elements[i].innerHTML.replace(/[\uFEFF]/g, '') === "") {
+ if (elements[i].innerHTML.replace(/[\uFEFF]/g, '') === "" && (newBlockElements.length === 0 || elements[i] !== newBlockElements[newBlockElements.length - 1])) {
// If cleanup removes some new block elements. remove them from newblocks array too
nbIdx = wysihtml5.lang.array(newBlockElements).indexOf(elements[i]);
if (nbIdx > -1) {
@@ -14496,8 +14512,13 @@ wysihtml5.Commands = Base.extend(
}
composer.selection.splitElementAtCaret(outerInlines.parent, fragment);
} else {
- // Otherwise just insert
+ var fc = fragment.firstChild,
+ lc = fragment.lastChild;
+
range.insertNode(fragment);
+ // restore range position as it might get lost in webkit sometimes
+ range.setStartBefore(fc);
+ range.setEndAfter(lc);
}
}
}
@@ -14626,7 +14647,21 @@ wysihtml5.Commands = Base.extend(
startNode = getRangeNode(r.startContainer, r.startOffset),
endNode = getRangeNode(r.endContainer, r.endOffset),
prevNode = (r.startContainer === startNode && startNode.nodeType === 3 && !isWhitespaceBefore(startNode, r.startOffset)) ? startNode : wysihtml5.dom.domNode(startNode).prev({nodeTypes: [1,3], ignoreBlankTexts: true}),
- nextNode = ((r.endContainer.nodeType === 1 && r.endContainer.childNodes[r.endOffset] === endNode) || (r.endContainer === endNode && endNode.nodeType === 3 && !isWhitespaceAfter(endNode, r.endOffset))) ? endNode : wysihtml5.dom.domNode(getRangeNode(r.endContainer, r.endOffset)).next({nodeTypes: [1,3], ignoreBlankTexts: true}),
+ nextNode = (
+ (
+ r.endContainer.nodeType === 1 &&
+ r.endContainer.childNodes[r.endOffset] === endNode &&
+ (
+ endNode.nodeType === 1 ||
+ !isWhitespaceAfter(endNode, r.endOffset) &&
+ !wysihtml5.dom.domNode(endNode).is.rangyBookmark()
+ )
+ ) || (
+ r.endContainer === endNode &&
+ endNode.nodeType === 3 &&
+ !isWhitespaceAfter(endNode, r.endOffset)
+ )
+ ) ? endNode : wysihtml5.dom.domNode(endNode).next({nodeTypes: [1,3], ignoreBlankTexts: true}),
content = r.extractContents(),
fragment = composer.doc.createDocumentFragment(),
similarOuterBlock = similarOptions ? wysihtml5.dom.getParentElement(rangeStartContainer, similarOptions, null, composer.element) : null,
@@ -14635,6 +14670,11 @@ wysihtml5.Commands = Base.extend(
wrapper, blocks, children,
firstc, lastC;
+ if (wysihtml5.dom.domNode(nextNode).is.rangyBookmark()) {
+ endNode = nextNode;
+ nextNode = endNode.nextSibling;
+ }
+
trimBlankTextsAndBreaks(content);
if (options && options.nodeName === "BLOCKQUOTE") {
@@ -14684,6 +14724,16 @@ wysihtml5.Commands = Base.extend(
}
injectFragmentToRange(fragment, r, composer, firstOuterBlock);
removeSurroundingLineBreaks(prevNode, nextNode, composer);
+
+ // Fix webkit madness by inserting linebreak rangy after cursor marker to blank last block
+ // (if it contains rangy bookmark, so selection can be restored later correctly)
+ if (blocks.length > 0 &&
+ (
+ typeof blocks[blocks.length - 1].lastChild === "undefined" || wysihtml5.dom.domNode(blocks[blocks.length - 1].lastChild).is.rangyBookmark()
+ )
+ ) {
+ blocks[blocks.length - 1].appendChild(composer.doc.createElement('br'));
+ }
return blocks;
}
@@ -15832,7 +15882,9 @@ wysihtml5.Commands = Base.extend(
for (var i = innerLists.length; i--;) {
wysihtml5.dom.resolveList(innerLists[i], composer.config.useLineBreaks);
}
- wysihtml5.dom.resolveList(el, composer.config.useLineBreaks);
+ if (innerLists.length === 0) {
+ wysihtml5.dom.resolveList(el, composer.config.useLineBreaks);
+ }
}
});
};
@@ -15900,8 +15952,34 @@ wysihtml5.Commands = Base.extend(
exec: function(composer, command, nodeName) {
var doc = composer.doc,
cmd = (nodeName === "OL") ? "insertOrderedList" : "insertUnorderedList",
- selectedNode = composer.selection.getSelectedNode(),
- list = findListEl(selectedNode, nodeName, composer);
+ s = composer.selection.getSelection(),
+ anode = s.anchorNode.nodeType === 1 && s.anchorNode.firstChild ? s.anchorNode.childNodes[s.anchorOffset] : s.anchorNode,
+ fnode = s.focusNode.nodeType === 1 && s.focusNode.firstChild ? s.focusNode.childNodes[s.focusOffset] || s.focusNode.lastChild : s.focusNode,
+ selectedNode, list;
+
+ if (s.isBackwards()) {
+ // swap variables
+ anode = [fnode, fnode = anode][0];
+ }
+
+ if (wysihtml5.dom.domNode(fnode).is.emptyTextNode(true) && fnode) {
+ fnode = wysihtml5.dom.domNode(fnode).prev({nodeTypes: [1,3], ignoreBlankTexts: true});
+ }
+ if (wysihtml5.dom.domNode(anode).is.emptyTextNode(true) && anode) {
+ anode = wysihtml5.dom.domNode(anode).next({nodeTypes: [1,3], ignoreBlankTexts: true});
+ }
+
+ if (anode && fnode) {
+ if (anode === fnode) {
+ selectedNode = anode;
+ } else {
+ selectedNode = wysihtml5.dom.domNode(anode).commonAncestor(fnode, composer.element);
+ }
+ } else {
+ selectedNode = composer.selection.getSelectedNode();
+ }
+
+ list = findListEl(selectedNode, nodeName, composer);
if (!list.el) {
if (composer.commands.support(cmd)) {
@@ -17390,155 +17468,248 @@ wysihtml5.views.View = Base.extend(
"73": "italic", // I
"85": "underline" // U
};
+
+ var actions = {
- // Adds multiple eventlisteners to target, bound to one callback
- // TODO: If needed elsewhere make it part of wysihtml5.dom or sth
- var addListeners = function (target, events, callback) {
- for(var i = 0, max = events.length; i < max; i++) {
- target.addEventListener(events[i], callback, false);
- }
- };
+ // Adds multiple eventlisteners to target, bound to one callback
+ // TODO: If needed elsewhere make it part of wysihtml5.dom or sth
+ addListeners: function (target, events, callback) {
+ for(var i = 0, max = events.length; i < max; i++) {
+ target.addEventListener(events[i], callback, false);
+ }
+ },
- // Removes multiple eventlisteners from target, bound to one callback
- // TODO: If needed elsewhere make it part of wysihtml5.dom or sth
- var removeListeners = function (target, events, callback) {
- for(var i = 0, max = events.length; i < max; i++) {
- target.removeEventListener(events[i], callback, false);
- }
- };
+ // Removes multiple eventlisteners from target, bound to one callback
+ // TODO: If needed elsewhere make it part of wysihtml5.dom or sth
+ removeListeners: function (target, events, callback) {
+ for(var i = 0, max = events.length; i < max; i++) {
+ target.removeEventListener(events[i], callback, false);
+ }
+ },
- // Override for giving user ability to delete last line break in table cell
- var fixLastBrDeletionInTable = function(composer, force) {
- if (composer.selection.caretIsLastInSelection()) {
- var sel = composer.selection.getSelection(),
- aNode = sel.anchorNode;
- if (aNode && aNode.nodeType === 1 && (wysihtml5.dom.getParentElement(aNode, {query: 'td, th'}, false, composer.element) || force)) {
- var nextNode = aNode.childNodes[sel.anchorOffset];
- if (nextNode && nextNode.nodeType === 1 & nextNode.nodeName === "BR") {
- nextNode.parentNode.removeChild(nextNode);
- return true;
+ // Override for giving user ability to delete last line break in table cell
+ fixLastBrDeletionInTable: function(composer, force) {
+ if (composer.selection.caretIsLastInSelection()) {
+ var sel = composer.selection.getSelection(),
+ aNode = sel.anchorNode;
+ if (aNode && aNode.nodeType === 1 && (wysihtml5.dom.getParentElement(aNode, {query: 'td, th'}, false, composer.element) || force)) {
+ var nextNode = aNode.childNodes[sel.anchorOffset];
+ if (nextNode && nextNode.nodeType === 1 & nextNode.nodeName === "BR") {
+ nextNode.parentNode.removeChild(nextNode);
+ return true;
+ }
}
}
- }
- return false;
- };
+ return false;
+ },
- // If found an uneditable before caret then notify it before deletion
- var handleUneditableDeletion = function(composer) {
- var before = composer.selection.getBeforeSelection(true);
- if (before && (before.type === "element" || before.type === "leafnode") && before.node.nodeType === 1 && before.node.classList.contains(composer.config.classNames.uneditableContainer)) {
- if (fixLastBrDeletionInTable(composer, true)) {
+ // If found an uneditable before caret then notify it before deletion
+ handleUneditableDeletion: function(composer) {
+ var before = composer.selection.getBeforeSelection(true);
+ if (before && (before.type === "element" || before.type === "leafnode") && before.node.nodeType === 1 && before.node.classList.contains(composer.config.classNames.uneditableContainer)) {
+ if (actions.fixLastBrDeletionInTable(composer, true)) {
+ return true;
+ }
+ try {
+ var ev = new CustomEvent("wysihtml5:uneditable:delete", {bubbles: true, cancelable: false});
+ before.node.dispatchEvent(ev);
+ } catch (err) {}
+ before.node.parentNode.removeChild(before.node);
return true;
}
- try {
- var ev = new CustomEvent("wysihtml5:uneditable:delete", {bubbles: true, cancelable: false});
- before.node.dispatchEvent(ev);
- } catch (err) {}
- before.node.parentNode.removeChild(before.node);
- return true;
- }
- return false;
- };
+ return false;
+ },
- // Deletion with caret in the beginning of headings and other block elvel elements needs special attention
- // Not allways does it concate text to previous block node correctly (browsers do unexpected miracles here especially webkit)
- var fixDeleteInTheBeginningOfBlock = function(composer) {
- var selection = composer.selection,
- prevNode = selection.getPreviousNode();
-
- if (selection.caretIsFirstInSelection() &&
- prevNode &&
- prevNode.nodeType === 1 &&
- (/block/).test(composer.win.getComputedStyle(prevNode).display) &&
- !domNode(prevNode).test({
- query: "ol, ul, table, tr, dl"
- })
- ) {
- if ((/^\s*$/).test(prevNode.textContent || prevNode.innerText)) {
- // If heading is empty remove the heading node
- prevNode.parentNode.removeChild(prevNode);
- return true;
- } else {
- if (prevNode.lastChild) {
- var selNode = prevNode.lastChild,
- selectedNode = selection.getSelectedNode(),
- commonAncestorNode = domNode(prevNode).commonAncestor(selectedNode, composer.element);
- curNode = selectedNode.nodeType === 3 ? selectedNode : wysihtml5.dom.getParentElement(selectedNode, {
- query: "h1, h2, h3, h4, h5, h6, p, pre, div, blockquote"
- }, false, commonAncestorNode || composer.element);
-
- if (curNode) {
- domNode(curNode).transferContentTo(prevNode, true);
- selection.setAfter(selNode);
+ // Deletion with caret in the beginning of headings and other block elvel elements needs special attention
+ // Not allways does it concate text to previous block node correctly (browsers do unexpected miracles here especially webkit)
+ fixDeleteInTheBeginningOfBlock: function(composer) {
+ var selection = composer.selection,
+ prevNode = selection.getPreviousNode();
+
+ if (selection.caretIsFirstInSelection() &&
+ prevNode &&
+ prevNode.nodeType === 1 &&
+ (/block/).test(composer.win.getComputedStyle(prevNode).display) &&
+ !domNode(prevNode).test({
+ query: "ol, ul, table, tr, dl"
+ })
+ ) {
+ if ((/^\s*$/).test(prevNode.textContent || prevNode.innerText)) {
+ // If heading is empty remove the heading node
+ prevNode.parentNode.removeChild(prevNode);
+ return true;
+ } else {
+ if (prevNode.lastChild) {
+ var selNode = prevNode.lastChild,
+ selectedNode = selection.getSelectedNode(),
+ commonAncestorNode = domNode(prevNode).commonAncestor(selectedNode, composer.element),
+ curNode = wysihtml5.dom.getParentElement(selectedNode, {
+ query: "h1, h2, h3, h4, h5, h6, p, pre, div, blockquote"
+ }, false, commonAncestorNode || composer.element);
+
+ if (curNode) {
+ domNode(curNode).transferContentTo(prevNode, true);
+ selection.setAfter(selNode);
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ },
+
+ /* In IE when deleting with caret at the begining of LI, list gets broken into half instead of merging the LI with previous */
+ /* This does not match other browsers an is less intuitive from UI standpoint, thus has to be fixed */
+ fixDeleteInTheBeginningOfLi: function(composer) {
+ if (wysihtml5.browser.hasLiDeletingProblem()) {
+ var selection = composer.selection.getSelection(),
+ aNode = selection.anchorNode,
+ listNode, prevNode, firstNode,
+ isInBeginnig = composer.selection.caretIsFirstInSelection();
+
+ // Fix caret at the beginnig of first textNode in LI
+ if (aNode.nodeType === 3 && selection.anchorOffset === 0 && aNode === aNode.parentNode.firstChild) {
+ aNode = aNode.parentNode;
+ isInBeginnig = true;
+ }
+
+ if (isInBeginnig && aNode && aNode.nodeType === 1 && aNode.nodeName === "LI") {
+ prevNode = domNode(aNode).prev({nodeTypes: [1,3], ignoreBlankTexts: true});
+ if (!prevNode && aNode.parentNode && (aNode.parentNode.nodeName === "UL" || aNode.parentNode.nodeName === "OL")) {
+ prevNode = domNode(aNode.parentNode).prev({nodeTypes: [1,3], ignoreBlankTexts: true});
+ }
+ if (prevNode) {
+ firstNode = aNode.firstChild;
+ domNode(aNode).transferContentTo(prevNode, true);
+ if (firstNode) {
+ composer.selection.setBefore(firstNode);
+ } else if (prevNode) {
+ if (prevNode.nodeType === 1) {
+ if (prevNode.lastChild) {
+ composer.selection.setAfter(prevNode.lastChild);
+ } else {
+ composer.selection.selectNode(prevNode);
+ }
+ } else {
+ composer.selection.setAfter(prevNode);
+ }
+ }
return true;
}
}
}
- }
- return false;
- };
+ return false;
+ },
+
+ // Table management
+ // If present enableObjectResizing and enableInlineTableEditing command should be called with false to prevent native table handlers
+ initTableHandling: function() {
+ var hideHandlers = function() {
+ window.removeEventListener('load', hideHandlers);
+ this.doc.execCommand("enableObjectResizing", false, "false");
+ this.doc.execCommand("enableInlineTableEditing", false, "false");
+ }.bind(this),
+ iframeInitiator = (function() {
+ hideHandlers.call(this);
+ actions.removeListeners(this.sandbox.getIframe(), ["focus", "mouseup", "mouseover"], iframeInitiator);
+ }).bind(this);
+
+ if( this.doc.execCommand &&
+ wysihtml5.browser.supportsCommand(this.doc, "enableObjectResizing") &&
+ wysihtml5.browser.supportsCommand(this.doc, "enableInlineTableEditing"))
+ {
+ if (this.sandbox.getIframe) {
+ actions.addListeners(this.sandbox.getIframe(), ["focus", "mouseup", "mouseover"], iframeInitiator);
+ } else {
+ window.addEventListener('load', hideHandlers);
+ }
+ }
+ this.tableSelection = wysihtml5.quirks.tableCellsSelection(this.element, this.parent);
+ },
+
+ // Fixes some misbehaviours of enters in linebreaks mode (natively a bit unsupported feature)
+ // Returns true if some corrections is applied so events know when to prevent default
+ doLineBreaksModeEnterWithCaret: function(composer) {
+ var breakNodes = "p, pre, div, blockquote",
+ caretInfo, parent, txtNode,
+ ret = false;
+
+ caretInfo = composer.selection.getNodesNearCaret();
+ if (caretInfo) {
+
+ if (caretInfo.caretNode || caretInfo.nextNode) {
+ parent = dom.getParentElement(caretInfo.caretNode || caretInfo.nextNode, { query: breakNodes }, 2);
+ if (parent === composer.element) {
+ parent = undefined;
+ }
+ }
+
+ if (parent && caretInfo.caretNode) {
+ if (domNode(caretInfo.caretNode).is.lineBreak()) {
+
+ if (composer.config.doubleLineBreakEscapesBlock) {
+ // Double enter (enter on blank line) exits block element in useLineBreaks mode.
+ ret = true;
+ caretInfo.caretNode.parentNode.removeChild(caretInfo.caretNode);
+
+ // Ensure surplous line breaks are not added to preceding element
+ if (domNode(caretInfo.nextNode).is.lineBreak()) {
+ caretInfo.nextNode.parentNode.removeChild(caretInfo.nextNode);
+ }
- /* In IE when deleting with caret at the begining of LI, list gets broken into half instead of merging the LI with previous */
- /* This does not match other browsers an is less intuitive from UI standpoint, thus has to be fixed */
- var fixDeleteInTheBeginningOfLi = function(composer) {
- if (wysihtml5.browser.hasLiDeletingProblem()) {
- var selection = composer.selection.getSelection(),
- aNode = selection.anchorNode,
- listNode, prevNode, firstNode,
- isInBeginnig = composer.selection.caretIsFirstInSelection();
-
- // Fix caret at the beginnig of first textNode in LI
- if (aNode.nodeType === 3 && selection.anchorOffset === 0 && aNode === aNode.parentNode.firstChild) {
- aNode = aNode.parentNode;
- isInBeginnig = true;
- }
-
- if (isInBeginnig && aNode && aNode.nodeType === 1 && aNode.nodeName === "LI") {
- prevNode = domNode(aNode).prev({nodeTypes: [1,3], ignoreBlankTexts: true});
- if (!prevNode && aNode.parentNode && (aNode.parentNode.nodeName === "UL" || aNode.parentNode.nodeName === "OL")) {
- prevNode = domNode(aNode.parentNode).prev({nodeTypes: [1,3], ignoreBlankTexts: true});
- }
- if (prevNode) {
- firstNode = aNode.firstChild;
- domNode(aNode).transferContentTo(prevNode, true);
- if (firstNode) {
- composer.selection.setBefore(firstNode);
- } else if (prevNode) {
- if (prevNode.nodeType === 1) {
- if (prevNode.lastChild) {
- composer.selection.setAfter(prevNode.lastChild);
+ var brNode = composer.doc.createElement('br');
+ if (domNode(caretInfo.nextNode).is.lineBreak() && caretInfo.nextNode === parent.lastChild) {
+ parent.parentNode.insertBefore(brNode, parent.nextSibling);
} else {
- composer.selection.selectNode(prevNode);
+ composer.selection.splitElementAtCaret(parent, brNode);
}
- } else {
- composer.selection.setAfter(prevNode);
+
+ // Ensure surplous blank lines are not added to preceding element
+ if (caretInfo.nextNode && caretInfo.nextNode.nodeType === 3) {
+ // Replaces blank lines at the beginning of textnode
+ caretInfo.nextNode.data = caretInfo.nextNode.data.replace(/^ *[\r\n]+/, '');
+ }
+ composer.selection.setBefore(brNode);
}
+
+ } else if (caretInfo.caretNode.nodeType === 3 && wysihtml5.browser.hasCaretBlockElementIssue() && caretInfo.textOffset === caretInfo.caretNode.data.length && !caretInfo.nextNode) {
+
+ // This fixes annoying webkit issue when you press enter at the end of a block then seemingly nothing happens.
+ // in reality one line break is generated and cursor is reported after it, but when entering something cursor jumps before the br
+ ret = true;
+ var br1 = composer.doc.createElement('br'),
+ br2 = composer.doc.createElement('br'),
+ f = composer.doc.createDocumentFragment();
+ f.appendChild(br1);
+ f.appendChild(br2);
+ composer.selection.insertNode(f);
+ composer.selection.setBefore(br2);
+
}
- return true;
}
}
+ return ret;
}
- return false;
- }
+ };
var handleDeleteKeyPress = function(event, composer) {
var selection = composer.selection,
element = composer.element;
if (selection.isCollapsed()) {
- if (handleUneditableDeletion(composer)) {
+ if (actions.handleUneditableDeletion(composer)) {
event.preventDefault();
return;
}
- if (fixDeleteInTheBeginningOfLi(composer)) {
+ if (actions.fixDeleteInTheBeginningOfLi(composer)) {
event.preventDefault();
return;
}
- if (fixDeleteInTheBeginningOfBlock(composer)) {
+ if (actions.fixDeleteInTheBeginningOfBlock(composer)) {
event.preventDefault();
return;
}
- if (fixLastBrDeletionInTable(composer)) {
+ if (actions.fixLastBrDeletionInTable(composer)) {
event.preventDefault();
return;
}
@@ -17558,59 +17729,8 @@ wysihtml5.views.View = Base.extend(
caretInfo, parent, txtNode;
if (composer.selection.isCollapsed()) {
- caretInfo = composer.selection.getNodesNearCaret();
- if (caretInfo) {
-
- if (caretInfo.caretNode || caretInfo.nextNode) {
- parent = dom.getParentElement(caretInfo.caretNode || caretInfo.nextNode, { query: breakNodes }, 2);
- if (parent === composer.element) {
- parent = undefined;
- }
- }
-
- if (parent && caretInfo.caretNode) {
- if (domNode(caretInfo.caretNode).is.lineBreak()) {
-
- if (composer.config.doubleLineBreakEscapesBlock) {
- // Double enter (enter on blank line) exits block element in useLineBreaks mode.
- event.preventDefault();
- caretInfo.caretNode.parentNode.removeChild(caretInfo.caretNode);
-
- // Ensure surplous line breaks are not added to preceding element
- if (domNode(caretInfo.nextNode).is.lineBreak()) {
- caretInfo.nextNode.parentNode.removeChild(caretInfo.nextNode);
- }
-
- var brNode = composer.doc.createElement('br');
- if (domNode(caretInfo.nextNode).is.lineBreak() && caretInfo.nextNode === parent.lastChild) {
- parent.parentNode.insertBefore(brNode, parent.nextSibling);
- } else {
- composer.selection.splitElementAtCaret(parent, brNode);
- }
-
- // Ensure surplous blank lines are not added to preceding element
- if (caretInfo.nextNode && caretInfo.nextNode.nodeType === 3) {
- // Replaces blank lines at the beginning of textnode
- caretInfo.nextNode.data = caretInfo.nextNode.data.replace(/^ *[\r\n]+/, '');
- }
- composer.selection.setBefore(brNode);
- }
-
- } else if (caretInfo.caretNode.nodeType === 3 && wysihtml5.browser.hasCaretBlockElementIssue() && caretInfo.textOffset === caretInfo.caretNode.data.length && !caretInfo.nextNode) {
-
- // This fixes annoying webkit issue when you press enter at the end of a block then seemingly nothing happens.
- // in reality one line break is generated and cursor is reported after it, but when entering something cursor jumps before the br
- event.preventDefault();
- var br1 = composer.doc.createElement('br'),
- br2 = composer.doc.createElement('br'),
- f = composer.doc.createDocumentFragment();
- f.appendChild(br1);
- f.appendChild(br2);
- composer.selection.insertNode(f);
- composer.selection.setBefore(br2);
-
- }
- }
+ if (actions.doLineBreaksModeEnterWithCaret(composer)) {
+ event.preventDefault();
}
}
}
@@ -17797,31 +17917,10 @@ wysihtml5.views.View = Base.extend(
}).bind(this), 0);
};
- // Table management
- // If present enableObjectResizing and enableInlineTableEditing command should be called with false to prevent native table handlers
- var initTableHandling = function () {
- var hideHandlers = function () {
- window.removeEventListener('load', hideHandlers);
- this.doc.execCommand("enableObjectResizing", false, "false");
- this.doc.execCommand("enableInlineTableEditing", false, "false");
- }.bind(this),
- iframeInitiator = (function() {
- hideHandlers.call(this);
- removeListeners(this.sandbox.getIframe(), ["focus", "mouseup", "mouseover"], iframeInitiator);
- }).bind(this);
-
- if( this.doc.execCommand &&
- wysihtml5.browser.supportsCommand(this.doc, "enableObjectResizing") &&
- wysihtml5.browser.supportsCommand(this.doc, "enableInlineTableEditing"))
- {
- if (this.sandbox.getIframe) {
- addListeners(this.sandbox.getIframe(), ["focus", "mouseup", "mouseover"], iframeInitiator);
- } else {
- window.addEventListener('load', hideHandlers);
- }
- }
- this.tableSelection = wysihtml5.quirks.tableCellsSelection(this.element, this.parent);
- };
+
+
+ // Testing requires actions to be accessible from out of scope
+ wysihtml5.views.Composer.prototype.observeActions = actions;
wysihtml5.views.Composer.prototype.observe = function() {
var that = this,
@@ -17847,14 +17946,14 @@ wysihtml5.views.View = Base.extend(
// --------- User interactions --
if (this.config.handleTables) {
// If handleTables option is true, table handling functions are bound
- initTableHandling.call(this);
+ actions.initTableHandling.call(this);
}
- addListeners(focusBlurElement, ["drop", "paste", "mouseup", "focus", "keyup"], handleUserInteraction.bind(this));
+ actions.addListeners(focusBlurElement, ["drop", "paste", "mouseup", "focus", "keyup"], handleUserInteraction.bind(this));
focusBlurElement.addEventListener("focus", handleFocus.bind(this), false);
focusBlurElement.addEventListener("blur", handleBlur.bind(this), false);
- addListeners(this.element, ["drop", "paste", "beforepaste"], handlePaste.bind(this), false);
+ actions.addListeners(this.element, ["drop", "paste", "beforepaste"], handlePaste.bind(this), false);
this.element.addEventListener("copy", handleCopy.bind(this), false);
this.element.addEventListener("mousedown", handleMouseDown.bind(this), false);
this.element.addEventListener("click", handleClick.bind(this), false);
diff --git a/dist/wysihtml-toolbar.min.js b/dist/wysihtml-toolbar.min.js
index 29cf527..c344330 100644
--- a/dist/wysihtml-toolbar.min.js
+++ b/dist/wysihtml-toolbar.min.js
@@ -1,11 +1,11 @@
-/*! wysihtml - v0.5.3 (2015-12-09) */
+/*! wysihtml - v0.5.4 (2015-12-18) */
-var wysihtml5={version:"0.5.3",commands:{},dom:{},quirks:{},toolbar:{},lang:{},selection:{},views:{},INVISIBLE_SPACE:"\ufeff",INVISIBLE_SPACE_REG_EXP:/\uFEFF/g,VOID_ELEMENTS:"area, base, br, col, embed, hr, img, input, keygen, link, meta, param, source, track, wbr",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){function c(){try{var a=new CustomEvent("cat",{detail:{foo:"bar"}});return"cat"===a.type&&"bar"===a.detail.foo}catch(b){}return!1}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}),function(a){a.matches=a.matches||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector||function(a){for(var b=this,c=(b.document||b.ownerDocument).querySelectorAll(a),d=0;c[d]&&c[d]!==b;)++d;return c[d]?!0:!1},a.closest=a.closest||function(a){for(var b=this;b&&!b.matches(a);)b=b.parentElement;return b}}(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[d]:void 0,h=b.focusNode,i=b.focusOffset,j=h&&1===h.nodeType&&i>0?h.childNodes[i-1]:void 0,k=this.ownerDocument.createRange(),l=a.shift(),m=l?a.shift():null;for(j&&3===j.nodeType&&(h=j,i=j.nodeValue.length,j=void 0),g&&3===g.nodeType&&(c=g,d=0,g=void 0),(c===h&&d>i||c!==h&&c.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_PRECEDING&&!(c.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINS))&&(h=[c,c=h][0],i=[d,d=i][0]);l&&m;)m.previousSibling&&m.previousSibling===l?(c===m&&(c=l,d=l.nodeValue.length+d),h===m&&(h=l,i=l.nodeValue.length+i),l.nodeValue=l.nodeValue+m.nodeValue,m.parentNode.removeChild(m),m=a.shift()):(l=m,m=a.shift());j&&(i=Array.prototype.indexOf.call(j.parentNode.childNodes,j)+1),g&&(d=Array.prototype.indexOf.call(g.parentNode.childNodes,g)),f(this)&&c&&c.parentNode&&h&&h.parentNode&&(k.setStart(c,d),k.setEnd(h,i),b.removeAllRanges(),b.addRange(k))});Node.prototype.normalize=a},h=function(){window.removeEventListener("load",h),"Node"in window&&"normalize"in Node.prototype&&d()&&g()};"complete"!==b.readyState?window.addEventListener("load",h):h();var i=c();!function(){function c(a,c){c=c||{bubbles:!1,cancelable:!1,detail:void 0};var d=b.createEvent("CustomEvent");return d.initCustomEvent(a,c.bubbles,c.cancelable,c.detail),d}!i&&"CustomEvent"in window&&(c.prototype=a.Event.prototype,a.CustomEvent=c,i=!0)}()},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),
+var wysihtml5={version:"0.5.4",commands:{},dom:{},quirks:{},toolbar:{},lang:{},selection:{},views:{},INVISIBLE_SPACE:"\ufeff",INVISIBLE_SPACE_REG_EXP:/\uFEFF/g,VOID_ELEMENTS:"area, base, br, col, embed, hr, img, input, keygen, link, meta, param, source, track, wbr",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){function c(){try{var a=new CustomEvent("cat",{detail:{foo:"bar"}});return"cat"===a.type&&"bar"===a.detail.foo}catch(b){}return!1}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}),function(a){a.matches=a.matches||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector||function(a){for(var b=this,c=(b.document||b.ownerDocument).querySelectorAll(a),d=0;c[d]&&c[d]!==b;)++d;return c[d]?!0:!1},a.closest=a.closest||function(a){for(var b=this;b&&!b.matches(a);)b=b.parentElement;return b}}(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[d]:void 0,h=b.focusNode,i=b.focusOffset,j=h&&1===h.nodeType&&i>0?h.childNodes[i-1]:void 0,k=this.ownerDocument.createRange(),l=a.shift(),m=l?a.shift():null;for(j&&3===j.nodeType&&(h=j,i=j.nodeValue.length,j=void 0),g&&3===g.nodeType&&(c=g,d=0,g=void 0),(c===h&&d>i||c!==h&&c.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_PRECEDING&&!(c.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINS))&&(h=[c,c=h][0],i=[d,d=i][0]);l&&m;)m.previousSibling&&m.previousSibling===l?(c===m&&(c=l,d=l.nodeValue.length+d),h===m&&(h=l,i=l.nodeValue.length+i),l.nodeValue=l.nodeValue+m.nodeValue,m.parentNode.removeChild(m),m=a.shift()):(l=m,m=a.shift());j&&(i=Array.prototype.indexOf.call(j.parentNode.childNodes,j)+1),g&&(d=Array.prototype.indexOf.call(g.parentNode.childNodes,g)),f(this)&&c&&c.parentNode&&h&&h.parentNode&&(k.setStart(c,d),k.setEnd(h,i),b.removeAllRanges(),b.addRange(k))});Node.prototype.normalize=a},h=function(){window.removeEventListener("load",h),"Node"in window&&"normalize"in Node.prototype&&d()&&g()};"complete"!==b.readyState?window.addEventListener("load",h):h();var i=c();!function(){function c(a,c){c=c||{bubbles:!1,cancelable:!1,detail:void 0};var d=b.createEvent("CustomEvent");return d.initCustomEvent(a,c.bubbles,c.cancelable,c.detail),d}!i&&"CustomEvent"in window&&(c.prototype=a.Event.prototype,a.CustomEvent=c,i=!0)}()},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("TextRange",["WrappedSelection"],function(a,b){function c(a,b){function c(a,b,c){h.push({start:a,end:b,isWord:c})}for(var d,e,f,g=a.join(""),h=[],i=0;d=b.wordRegex.exec(g);){if(e=d.index,f=e+d[0].length,e>i&&c(i,e,!1),b.includeTrailingSpace)for(;$.test(a[f]);)++f;c(e,f,!0),i=f}return ie;++e)c[e].token=d;return d}function e(a,b,c){for(var e,f=c(a,b),g=[],h=0;e=f[h++];)g.push(d(a,e));return g}function f(a){var b=a||"",c="string"==typeof b?b.split(""):b;return c.sort(function(a,b){return a.charCodeAt(0)-b.charCodeAt(0)}),c.join("").replace(/(.)\1+/g,"$1")}function g(a){var b,c;return a?(b=a.language||_,c={},U(c,ia[b]||ia[_]),U(c,a),c):ia[_]}function h(a,b){var c=V(a,b);return b.hasOwnProperty("wordOptions")&&(c.wordOptions=g(c.wordOptions)),b.hasOwnProperty("characterOptions")&&(c.characterOptions=V(c.characterOptions,ga)),c}function i(a,b){var c=na(a,"display",b),d=a.tagName.toLowerCase();return"block"==c&&fa&&oa.hasOwnProperty(d)?oa[d]:c}function j(a){for(var b=o(a),c=0,d=b.length;d>c;++c)if(1==b[c].nodeType&&"none"==i(b[c]))return!0;return!1}function k(a){var b;return 3==a.nodeType&&(b=a.parentNode)&&"hidden"==na(b,"visibility")}function l(a){return a&&(1==a.nodeType&&!/^(inline(-block|-table)?|none)$/.test(i(a))||9==a.nodeType||11==a.nodeType)}function m(a){return S.isCharacterDataNode(a)||!/^(area|base|basefont|br|col|frame|hr|img|input|isindex|link|meta|param)$/i.test(a.nodeName)}function n(a){for(var b=[];a.parentNode;)b.unshift(a.parentNode),a=a.parentNode;return b}function o(a){return n(a).concat([a])}function p(a){for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null}function q(a,b){return!b&&a.hasChildNodes()?a.firstChild:p(a)}function r(a){var b=a.previousSibling;if(b){for(a=b;a.hasChildNodes();)a=a.lastChild;return a}var c=a.parentNode;return c&&1==c.nodeType?c:null}function s(a){if(!a||3!=a.nodeType)return!1;var b=a.data;if(""===b)return!0;var c=a.parentNode;if(!c||1!=c.nodeType)return!1;var d=na(a.parentNode,"whiteSpace");return/^[\t\n\r ]+$/.test(b)&&/^(normal|nowrap)$/.test(d)||/^[\t\r ]+$/.test(b)&&"pre-line"==d}function t(a){if(""===a.data)return!0;if(!s(a))return!1;var b=a.parentNode;return b?j(a)?!0:!1:!0}function u(a){var b=a.nodeType;return 7==b||8==b||j(a)||/^(script|style)$/i.test(a.nodeName)||k(a)||t(a)}function v(a,b){var c=a.nodeType;return 7==c||8==c||1==c&&"none"==i(a,b)}function w(){this.store={}}function x(a,b,c){return function(d){var e=this.cache;if(e.hasOwnProperty(a))return pa++,e[a];qa++;var f=b.call(this,c?this[c]:this,d);return e[a]=f,f}}function y(a,b){this.node=a,this.session=b,this.cache=new w,this.positions=new w}function z(a,b){this.offset=b,this.nodeWrapper=a,this.node=a.node,this.session=a.session,this.cache=new w}function A(){return"[Position("+S.inspectNode(this.node)+":"+this.offset+")]"}function B(){return D(),Da=new Ea}function C(){return Da||B()}function D(){Da&&Da.detach(),Da=null}function E(a,c,d,e){function f(){var a=null;return c?(a=h,i||(h=h.previousVisible(),i=!h||d&&h.equals(d))):i||(a=h=h.nextVisible(),i=!h||d&&h.equals(d)),i&&(h=null),a}d&&(c?u(d.node)&&(d=a.previousVisible()):u(d.node)&&(d=d.nextVisible()));var g,h=a,i=!1,j=!1;return{next:function(){if(j)return j=!1,g;for(var a,b;a=f();)if(b=a.getCharacter(e))return g=a,a;return null},rewind:function(){if(!g)throw b.createError("createCharacterIterator: cannot rewind. Only one position can be rewound.");j=!0},dispose:function(){a=d=null}}}function F(a,b,c){function d(a){for(var b,c,d=[],e=a?f:g,h=!1,i=!1;b=e.next();){if(c=b.character,Z.test(c))i&&(i=!1,h=!0);else{if(h){e.rewind();break}i=!0}d.push(b)}return d}var f=E(a,!1,null,b),g=E(a,!0,null,b),h=c.tokenizer,i=d(!0),j=d(!1).reverse(),k=e(j.concat(i),c,h),l=i.length?k.slice(Fa(k,i[0].token)):[],m=j.length?k.slice(0,Fa(k,j.pop().token)+1):[];return{nextEndToken:function(){for(var a,b;1==l.length&&!(a=l[0]).isWord&&(b=d(!0)).length>0;)l=e(a.chars.concat(b),c,h);return l.shift()},previousStartToken:function(){for(var a,b;1==m.length&&!(a=m[0]).isWord&&(b=d(!1)).length>0;)m=e(b.reverse().concat(a.chars),c,h);return m.pop()},dispose:function(){f.dispose(),g.dispose(),l=m=null}}}function G(a,b,c,d,e){var f,g,h,i,j=0,k=a,l=Math.abs(c);if(0!==c){var m=0>c;switch(b){case Q:for(g=E(a,m,null,d);(f=g.next())&&l>j;)++j,k=f;h=f,g.dispose();break;case R:for(var n=F(a,d,e),o=m?n.previousStartToken:n.nextEndToken;(i=o())&&l>j;)i.isWord&&(++j,k=m?i.chars[0]:i.chars[i.chars.length-1]);break;default:throw new Error("movePositionBy: unit '"+b+"' not implemented")}m?(k=k.previousVisible(),j=-j):k&&k.isLeadingSpace&&!k.isTrailingSpace&&(b==R&&(g=E(a,!1,null,d),h=g.next(),g.dispose()),h&&(k=h.previousVisible()))}return{position:k,unitsMoved:j}}function H(a,b,c,d){var e=a.getRangeBoundaryPosition(b,!0),f=a.getRangeBoundaryPosition(b,!1),g=d?f:e,h=d?e:f;return E(g,!!d,h,c)}function I(a,b,c){for(var d,e=[],f=H(a,b,c);d=f.next();)e.push(d);return f.dispose(),e}function J(b,c,d){var e=a.createRange(b.node);return e.setStartAndEnd(b.node,b.offset,c.node,c.offset),!e.expand("word",{wordOptions:d})}function K(a,b,c,d,e){function f(a,b){var c=p[a].previousVisible(),d=p[b-1],f=!e.wholeWordsOnly||J(c,d,e.wordOptions);return{startPos:c,endPos:d,valid:f}}for(var g,h,i,j,k,l,m=aa(e.direction),n=E(a,m,a.session.getRangeBoundaryPosition(d,m),e.characterOptions),o="",p=[],q=null;g=n.next();)if(h=g.character,c||e.caseSensitive||(h=h.toLowerCase()),m?(p.unshift(g),o=h+o):(p.push(g),o+=h),c){if(k=b.exec(o))if(i=k.index,j=i+k[0].length,l){if(!m&&j0){q=f(i,j);break}}else l=!0}else if(-1!=(i=o.indexOf(b))){q=f(i,i+b.length);break}return l&&(q=f(i,j)),n.dispose(),q}function L(a){return function(){var b=!!Da,c=C(),d=[c].concat(T.toArray(arguments)),e=a.apply(this,d);return b||D(),e}}function M(a,b){return L(function(c,d,e,f){typeof e==P&&(e=d,d=Q),f=h(f,ka);var g=a;b&&(g=e>=0,this.collapse(!g));var i=G(c.getRangeBoundaryPosition(this,g),d,e,f.characterOptions,f.wordOptions),j=i.position;return this[g?"setStart":"setEnd"](j.node,j.offset),i.unitsMoved})}function N(a){return L(function(b,c){c=V(c,ga);for(var d,e=H(b,this,c,!a),f=0;(d=e.next())&&Z.test(d.character);)++f;e.dispose();var g=f>0;return g&&this[a?"moveStart":"moveEnd"]("character",a?f:-f,{characterOptions:c}),g})}function O(a){return L(function(b,c){var d=!1;return this.changeEachRange(function(b){d=b[a](c)||d}),d})}var P="undefined",Q="character",R="word",S=a.dom,T=a.util,U=T.extend,V=T.createOptions,W=S.getBody,X=/^[ \t\f\r\n]+$/,Y=/^[ \t\f\r]+$/,Z=/^[\t-\r \u0085\u00A0\u1680\u180E\u2000-\u200B\u2028\u2029\u202F\u205F\u3000]+$/,$=/^[\t \u00A0\u1680\u180E\u2000-\u200B\u202F\u205F\u3000]+$/,_="en",aa=a.Selection.isDirectionBackward,ba=!1,ca=!1,da=!1,ea=!0;!function(){var b=S.createTestElement(document,"1
",!0),c=b.firstChild,d=a.getSelection();d.collapse(c.lastChild,2),d.setStart(c.firstChild,0),ba=1==(""+d).length,b.innerHTML="1
",d.collapse(b,2),d.setStart(b.firstChild,0),ca=1==(""+d).length,b.innerHTML="1 1
",d.collapse(b,2),d.setStart(b.firstChild,0),da=1==(""+d).length,S.removeNode(b),d.removeAllRanges()}();var fa,ga={includeBlockContentTrailingSpace:!0,includeSpaceBeforeBr:!0,includeSpaceBeforeBlock:!0,includePreLineTrailingSpace:!0,ignoreCharacters:""},ha={includeBlockContentTrailingSpace:!ea,includeSpaceBeforeBr:!ca,includeSpaceBeforeBlock:!da,includePreLineTrailingSpace:!0},ia={en:{wordRegex:/[a-z0-9]+('[a-z0-9]+)*/gi,includeTrailingSpace:!1,tokenizer:c}},ja={caseSensitive:!1,withinRange:null,wholeWordsOnly:!1,wrap:!1,direction:"forward",wordOptions:null,characterOptions:null},ka={wordOptions:null,characterOptions:null},la={wordOptions:null,characterOptions:null,trim:!1,trimStart:!0,trimEnd:!0},ma={wordOptions:null,characterOptions:null,direction:"forward"},na=S.getComputedStyleProperty;!function(){var a=document.createElement("table"),b=W(document);b.appendChild(a),fa="block"==na(a,"display"),b.removeChild(a)}();var oa={table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell"};w.prototype={get:function(a){return this.store.hasOwnProperty(a)?this.store[a]:null},set:function(a,b){return this.store[a]=b}};var pa=0,qa=0,ra={getPosition:function(a){var b=this.positions;return b.get(a)||b.set(a,new z(this,a))},toString:function(){return"[NodeWrapper("+S.inspectNode(this.node)+")]"}};y.prototype=ra;var sa="EMPTY",ta="NON_SPACE",ua="UNCOLLAPSIBLE_SPACE",va="COLLAPSIBLE_SPACE",wa="TRAILING_SPACE_BEFORE_BLOCK",xa="TRAILING_SPACE_IN_BLOCK",ya="TRAILING_SPACE_BEFORE_BR",za="PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK",Aa="TRAILING_LINE_BREAK_AFTER_BR",Ba="INCLUDED_TRAILING_LINE_BREAK_AFTER_BR";U(ra,{isCharacterDataNode:x("isCharacterDataNode",S.isCharacterDataNode,"node"),getNodeIndex:x("nodeIndex",S.getNodeIndex,"node"),getLength:x("nodeLength",S.getNodeLength,"node"),containsPositions:x("containsPositions",m,"node"),isWhitespace:x("isWhitespace",s,"node"),
-isCollapsedWhitespace:x("isCollapsedWhitespace",t,"node"),getComputedDisplay:x("computedDisplay",i,"node"),isCollapsed:x("collapsed",u,"node"),isIgnored:x("ignored",v,"node"),next:x("nextPos",q,"node"),previous:x("previous",r,"node"),getTextNodeInfo:x("textNodeInfo",function(a){var b=null,c=!1,d=na(a.parentNode,"whiteSpace"),e="pre-line"==d;return e?(b=Y,c=!0):("normal"==d||"nowrap"==d)&&(b=X,c=!0),{node:a,text:a.data,spaceRegex:b,collapseSpaces:c,preLine:e}},"node"),hasInnerText:x("hasInnerText",function(a,b){for(var c=this.session,d=c.getPosition(a.parentNode,this.getNodeIndex()+1),e=c.getPosition(a,0),f=b?d:e,g=b?e:d;f!==g;){if(f.prepopulateChar(),f.isDefinitelyNonEmpty())return!0;f=b?f.previousVisible():f.nextVisible()}return!1},"node"),isRenderedBlock:x("isRenderedBlock",function(a){for(var b=a.getElementsByTagName("br"),c=0,d=b.length;d>c;++c)if(!u(b[c]))return!0;return this.hasInnerText()},"node"),getTrailingSpace:x("trailingSpace",function(a){if("br"==a.tagName.toLowerCase())return"";switch(this.getComputedDisplay()){case"inline":for(var b=a.lastChild;b;){if(!v(b))return 1==b.nodeType?this.session.getNodeWrapper(b).getTrailingSpace():"";b=b.previousSibling}break;case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":break;case"table-cell":return" ";default:return this.isRenderedBlock(!0)?"\n":""}return""},"node"),getLeadingSpace:x("leadingSpace",function(a){switch(this.getComputedDisplay()){case"inline":case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":case"table-cell":break;default:return this.isRenderedBlock(!1)?"\n":""}return""},"node")});var Ca={character:"",characterType:sa,isBr:!1,prepopulateChar:function(){var a=this;if(!a.prepopulatedChar){var b=a.node,c=a.offset,d="",e=sa,f=!1;if(c>0)if(3==b.nodeType){var g=b.data,h=g.charAt(c-1),i=a.nodeWrapper.getTextNodeInfo(),j=i.spaceRegex;i.collapseSpaces?j.test(h)?c>1&&j.test(g.charAt(c-2))||(i.preLine&&"\n"===g.charAt(c)?(d=" ",e=za):(d=" ",e=va)):(d=h,e=ta,f=!0):(d=h,e=ua,f=!0)}else{var k=b.childNodes[c-1];if(k&&1==k.nodeType&&!u(k)&&("br"==k.tagName.toLowerCase()?(d="\n",a.isBr=!0,e=va,f=!1):a.checkForTrailingSpace=!0),!d){var l=b.childNodes[c];l&&1==l.nodeType&&!u(l)&&(a.checkForLeadingSpace=!0)}}a.prepopulatedChar=!0,a.character=d,a.characterType=e,a.isCharInvariant=f}},isDefinitelyNonEmpty:function(){var a=this.characterType;return a==ta||a==ua},resolveLeadingAndTrailingSpaces:function(){if(this.prepopulatedChar||this.prepopulateChar(),this.checkForTrailingSpace){var a=this.session.getNodeWrapper(this.node.childNodes[this.offset-1]).getTrailingSpace();a&&(this.isTrailingSpace=!0,this.character=a,this.characterType=va),this.checkForTrailingSpace=!1}if(this.checkForLeadingSpace){var b=this.session.getNodeWrapper(this.node.childNodes[this.offset]).getLeadingSpace();b&&(this.isLeadingSpace=!0,this.character=b,this.characterType=va),this.checkForLeadingSpace=!1}},getPrecedingUncollapsedPosition:function(a){for(var b,c=this;c=c.previousVisible();)if(b=c.getCharacter(a),""!==b)return c;return null},getCharacter:function(a){function b(){return n||(k=o.getPrecedingUncollapsedPosition(a),n=!0),k}this.resolveLeadingAndTrailingSpaces();var c,d=this.character,e=f(a.ignoreCharacters),g=""!==d&&e.indexOf(d)>-1;if(this.isCharInvariant)return c=g?"":d;var h=["character",a.includeSpaceBeforeBr,a.includeBlockContentTrailingSpace,a.includePreLineTrailingSpace,e].join("_"),i=this.cache.get(h);if(null!==i)return i;var j,k,l="",m=this.characterType==va,n=!1,o=this;return m&&(this.type==Ba?l="\n":" "==d&&(!b()||k.isTrailingSpace||"\n"==k.character||" "==k.character&&k.characterType==va)||("\n"==d&&this.isLeadingSpace?b()&&"\n"!=k.character&&(l="\n"):(j=this.nextUncollapsed(),j&&(j.isBr?this.type=ya:j.isTrailingSpace&&"\n"==j.character?this.type=xa:j.isLeadingSpace&&"\n"==j.character&&(this.type=wa),"\n"==j.character?(this.type!=ya||a.includeSpaceBeforeBr)&&(this.type!=wa||a.includeSpaceBeforeBlock)&&(this.type==xa&&j.isTrailingSpace&&!a.includeBlockContentTrailingSpace||(this.type!=za||j.type!=ta||a.includePreLineTrailingSpace)&&("\n"==d?j.isTrailingSpace?this.isTrailingSpace||this.isBr&&(j.type=Aa,b()&&k.isLeadingSpace&&!k.isTrailingSpace&&"\n"==k.character?j.character="":j.type=Ba):l="\n":" "==d&&(l=" "))):l=d)))),e.indexOf(l)>-1&&(l=""),this.cache.set(h,l),l},equals:function(a){return!!a&&this.node===a.node&&this.offset===a.offset},inspect:A,toString:function(){return this.character}};z.prototype=Ca,U(Ca,{next:x("nextPos",function(a){var b=a.nodeWrapper,c=a.node,d=a.offset,e=b.session;if(!c)return null;var f,g,h;return d==b.getLength()?(f=c.parentNode,g=f?b.getNodeIndex()+1:0):b.isCharacterDataNode()?(f=c,g=d+1):(h=c.childNodes[d],e.getNodeWrapper(h).containsPositions()?(f=h,g=0):(f=c,g=d+1)),f?e.getPosition(f,g):null}),previous:x("previous",function(a){var b,c,d,e=a.nodeWrapper,f=a.node,g=a.offset,h=e.session;return 0==g?(b=f.parentNode,c=b?e.getNodeIndex():0):e.isCharacterDataNode()?(b=f,c=g-1):(d=f.childNodes[g-1],h.getNodeWrapper(d).containsPositions()?(b=d,c=S.getNodeLength(d)):(b=f,c=g-1)),b?h.getPosition(b,c):null}),nextVisible:x("nextVisible",function(a){var b=a.next();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex()+1)),e}),nextUncollapsed:x("nextUncollapsed",function(a){for(var b=a;b=b.nextVisible();)if(b.resolveLeadingAndTrailingSpaces(),""!==b.character)return b;return null}),previousVisible:x("previousVisible",function(a){var b=a.previous();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex())),e})});var Da=null,Ea=function(){function a(a){var b=new w;return{get:function(c){var d=b.get(c[a]);if(d)for(var e,f=0;e=d[f++];)if(e.node===c)return e;return null},set:function(c){var d=c.node[a],e=b.get(d)||b.set(d,[]);e.push(c)}}}function b(){this.initCaches()}var c=T.isHostProperty(document.documentElement,"uniqueID");return b.prototype={initCaches:function(){this.elementCache=c?function(){var a=new w;return{get:function(b){return a.get(b.uniqueID)},set:function(b){a.set(b.node.uniqueID,b)}}}():a("tagName"),this.textNodeCache=a("data"),this.otherNodeCache=a("nodeName")},getNodeWrapper:function(a){var b;switch(a.nodeType){case 1:b=this.elementCache;break;case 3:b=this.textNodeCache;break;default:b=this.otherNodeCache}var c=b.get(a);return c||(c=new y(a,this),b.set(c)),c},getPosition:function(a,b){return this.getNodeWrapper(a).getPosition(b)},getRangeBoundaryPosition:function(a,b){var c=b?"start":"end";return this.getPosition(a[c+"Container"],a[c+"Offset"])},detach:function(){this.elementCache=this.textNodeCache=this.otherNodeCache=null}},b}();U(S,{nextNode:q,previousNode:r});var Fa=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)if(a[c]===b)return c;return-1};U(a.rangePrototype,{moveStart:M(!0,!1),moveEnd:M(!1,!1),move:M(!0,!0),trimStart:N(!0),trimEnd:N(!1),trim:L(function(a,b){var c=this.trimStart(b),d=this.trimEnd(b);return c||d}),expand:L(function(a,b,c){var d=!1;c=h(c,la);var e=c.characterOptions;if(b||(b=Q),b==R){var f,g,i=c.wordOptions,j=a.getRangeBoundaryPosition(this,!0),k=a.getRangeBoundaryPosition(this,!1),l=F(j,e,i),m=l.nextEndToken(),n=m.chars[0].previousVisible();if(this.collapsed)f=m;else{var o=F(k,e,i);f=o.previousStartToken()}return g=f.chars[f.chars.length-1],n.equals(j)||(this.setStart(n.node,n.offset),d=!0),g&&!g.equals(k)&&(this.setEnd(g.node,g.offset),d=!0),c.trim&&(c.trimStart&&(d=this.trimStart(e)||d),c.trimEnd&&(d=this.trimEnd(e)||d)),d}return this.moveEnd(Q,1,c)}),text:L(function(a,b){return this.collapsed?"":I(a,this,V(b,ga)).join("")}),selectCharacters:L(function(a,b,c,d,e){var f={characterOptions:e};b||(b=W(this.getDocument())),this.selectNodeContents(b),this.collapse(!0),this.moveStart("character",c,f),this.collapse(!0),this.moveEnd("character",d-c,f)}),toCharacterRange:L(function(a,b,c){b||(b=W(this.getDocument()));var d,e,f=b.parentNode,g=S.getNodeIndex(b),h=-1==S.comparePoints(this.startContainer,this.endContainer,f,g),i=this.cloneRange();return h?(i.setStartAndEnd(this.startContainer,this.startOffset,f,g),d=-i.text(c).length):(i.setStartAndEnd(f,g,this.startContainer,this.startOffset),d=i.text(c).length),e=d+this.text(c).length,{start:d,end:e}}),findText:L(function(b,c,d){d=h(d,ja),d.wholeWordsOnly&&(d.wordOptions.includeTrailingSpace=!1);var e=aa(d.direction),f=d.withinRange;f||(f=a.createRange(),f.selectNodeContents(this.getDocument()));var g=c,i=!1;"string"==typeof g?d.caseSensitive||(g=g.toLowerCase()):i=!0;var j=b.getRangeBoundaryPosition(this,!e),k=f.comparePoint(j.node,j.offset);-1===k?j=b.getRangeBoundaryPosition(f,!0):1===k&&(j=b.getRangeBoundaryPosition(f,!1));for(var l,m=j,n=!1;;)if(l=K(m,g,i,f,d)){if(l.valid)return this.setStartAndEnd(l.startPos.node,l.startPos.offset,l.endPos.node,l.endPos.offset),!0;m=e?l.startPos:l.endPos}else{if(!d.wrap||n)return!1;f=f.cloneRange(),m=b.getRangeBoundaryPosition(f,!e),f.setBoundary(j.node,j.offset,e),n=!0}}),pasteHtml:function(a){if(this.deleteContents(),a){var b=this.createContextualFragment(a),c=b.lastChild;this.insertNode(b),this.collapseAfter(c)}}}),U(a.selectionPrototype,{expand:L(function(a,b,c){this.changeEachRange(function(a){a.expand(b,c)})}),move:L(function(a,b,c,d){var e=0;if(this.focusNode){this.collapse(this.focusNode,this.focusOffset);var f=this.getRangeAt(0);d||(d={}),d.characterOptions=V(d.characterOptions,ha),e=f.move(b,c,d),this.setSingleRange(f)}return e}),trimStart:O("trimStart"),trimEnd:O("trimEnd"),trim:O("trim"),selectCharacters:L(function(b,c,d,e,f,g){var h=a.createRange(c);h.selectCharacters(c,d,e,g),this.setSingleRange(h,f)}),saveCharacterRanges:L(function(a,b,c){for(var d=this.getAllRanges(),e=d.length,f=[],g=1==e&&this.isBackward(),h=0,i=d.length;i>h;++h)f[h]={characterRange:d[h].toCharacterRange(b,c),backward:g,characterOptions:c};return f}),restoreCharacterRanges:L(function(b,c,d){this.removeAllRanges();for(var e,f,g,h=0,i=d.length;i>h;++h)f=d[h],g=f.characterRange,e=a.createRange(c),e.selectCharacters(c,g.start,g.end,f.characterOptions),this.addRange(e,f.backward)}),text:L(function(a,b){for(var c=[],d=0,e=this.rangeCount;e>d;++d)c[d]=this.getRangeAt(d).text(b);return c.join("")})}),a.innerText=function(b,c){var d=a.createRange(b);d.selectNodeContents(b);var e=d.text(c);return e},a.createWordIterator=function(a,b,c){var d=C();c=h(c,ma);var e=d.getPosition(a,b),f=F(e,c.characterOptions,c.wordOptions),g=aa(c.direction);return{next:function(){return g?f.previousStartToken():f.nextEndToken()},dispose:function(){f.dispose(),this.next=function(){}}}},a.noMutation=function(a){var b=C();a(b),D()},a.noMutation.createEntryPointFunction=L,a.textRange={isBlockNode:l,isCollapsedWhitespaceNode:t,createPosition:L(function(a,b,c){return a.getPosition(b,c)})}}),a},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;a-1?c=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"):/Edge\/(\d+)./i.test(navigator.userAgent)&&(c=/Edge\/(\d+)./i)),c&&null!=c.exec(navigator.userAgent)&&(d=parseFloat(RegExp.$1)),-1===d?!1:a?b?"<"===b?d>a:">"===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")&&!c(),g=-1!==d.indexOf("AppleWebKit/")&&!c(),h=-1!==d.indexOf("Chrome/")&&!c(),i=-1!==d.indexOf("Opera/")&&!c();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(12,">")},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(),insertOrderedList:c()},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(12,">")},hasProblemsSettingCaretAfterImg:function(){return c()},hasLiDeletingProblem:function(){return c()},hasUndoInContextMenu:function(){return f||h||i},hasInsertNodeIssue:function(){return i},hasIframeFocusIssue:function(){return c()},createsNestedInvalidMarkupAfterPaste:function(){return g},hasCaretBlockElementIssue:function(){return g},supportsMutationEvents:function(){return"MutationEvent"in window},supportsModernPaste:function(){return!c()},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}function c(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")}a.dom.domNode=function(d){var e=[a.ELEMENT_NODE,a.TEXT_NODE];return{is:{emptyTextNode:function(b){var c=b?/^\s*$/g:/^[\r\n]*$/g;return d.nodeType===a.TEXT_NODE&&c.test(d.data)},visible:function(){var b=!/^\s*$/g.test(a.dom.getTextContent(d));return b||1===d.nodeType&&d.querySelector("img, br, hr, object, embed, canvas, input, textarea")&&(b=!0),b},lineBreak:function(){return d&&1===d.nodeType&&"BR"===d.nodeName},block:function(){return d&&1===d.nodeType&&"block"===d.ownerDocument.defaultView.getComputedStyle(d).display},voidElement:function(){return a.dom.domNode(d).test({query:a.VOID_ELEMENTS})}},prev:function(b){var f=d.previousSibling,g=b&&b.nodeTypes?b.nodeTypes:e;return f?c(f)||!a.lang.array(g).contains(f.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(f).is.emptyTextNode(!0)?a.dom.domNode(f).prev(b):f:null},next:function(b){var f=d.nextSibling,g=b&&b.nodeTypes?b.nodeTypes:e;return f?c(f)||!a.lang.array(g).contains(f.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(f).is.emptyTextNode(!0)?a.dom.domNode(f).next(b):f:null},commonAncestor:function(a,c){var e=b(d,c),f=b(a,c);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(c=a.browser.fixStyleKey(g[h]),d.style[c]){if(!b.styleValue){f=!0;break}if(b.styleValue instanceof RegExp){if(d.style[c].trim().match(b.styleValue).length>0){f=!0;break}}else if(Array.isArray(b.styleValue)){if(b.styleValue.indexOf(d.style[c].trim())){f=!0;break}}else if(b.styleValue===d.style[c].trim().replace(/, /g,",")){f=!0;break}}if(!f)return!1}if(b.attribute){var j=a.dom.getAttributes(d),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)if(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 s&&s.length>0&&(j["class"]=wysihtml5.lang.array(s).unique().join(" "));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){for(;a.firstChild;)a.parentNode.insertBefore(a.firstChild,a);a.parentNode.removeChild(a)}},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()},destroy:function(){},_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,!1),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 wysihtml5.browser.supportsModernPaste()&&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 a=this.getRange();this.deleteRangeContents(a),this.setSelection(a)},deleteRangeContents:function(b){var c,d,e,f;if(this.unselectableClass){(c=a.dom.getParentElement(b.startContainer,{query:"."+this.unselectableClass},!1,this.contain))&&b.setStartBefore(c),(d=a.dom.getParentElement(b.endContainer,{query:"."+this.unselectableClass},!1,this.contain))&&b.setEndAfter(d),e=b.getNodes([1],function(b){return a.dom.hasClass(b,this.unselectableClass)}.bind(this));for(var g=e.length;g--;)try{f=new CustomEvent("wysihtml5:uneditable:delete"),e[g].dispatchEvent(f)}catch(h){}}b.deleteContents()},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)},getNodesNearCaret:function(){if(!this.isCollapsed())throw"Selection must be caret when using selection.getNodesNearCaret()";var a,b,c,d,e=this.getOwnRanges();return e&&e.length>0?(1===e[0].startContainer.nodeType?(a=e[0].startContainer.childNodes[e[0].startOffset-1],a||0!==e[0].startOffset?a&&(b=a.previousSibling,c=a.nextSibling):c=e[0].startContainer.childNodes[0]):(a=e[0].startContainer,b=a.previousSibling,c=a.nextSibling,d=e[0].startOffset),{caretNode:a,prevNode:b,nextNode:c,textOffset:d}):null},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(f&&3===f.nodeType&&/^\s*$/.test(f.data.slice(0,g))&&(g=0),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,d=this.getRange(),e=this.doc.createElement("DIV"),f=this.doc.createDocumentFragment();if(d){for(d.deleteContents(),e.innerHTML=a,b=e.lastChild;e.firstChild;)f.appendChild(e.firstChild);for(d.insertNode(f),c=this.contain.lastChild;c&&3===c.nodeType&&c.previousSibling&&/^\s*$/.test(c.data);)c=c.previousSibling;b&&(c&&b===c&&1===b.nodeType&&this.contain.appendChild(this.doc.createElement("br")),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},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(){var b=rangy.createRange();a.browser.supportsSelectionModify()?this._selectLine_W3C():b.nativeRange&&b.nativeRange.getBoundingClientRect&&this._selectLineUniversal()},includeRangyRangeHelpers:function(){var a=this.getSelection(),b=a.getRangeAt(0),c=function(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")},d=function(a){return 1===a.nodeType?a.childNodes&&a.childNodes.length||0:a.data&&a.data.length||0},e=1===a.anchorNode.nodeType?a.anchorNode.childNodes[a.anchorOffset]:a.anchorNode,f=1===a.focusNode.nodeType?a.focusNode.childNodes[a.focusOffset]:a.focusNode;f&&a.focusOffset===d(f)&&f.nextSibling&&c(f.nextSibling)&&b.setEndAfter(f.nextSibling),e&&0===a.anchorOffset&&e.previousSibling&&c(e.previousSibling)&&b.setStartBefore(e.previousSibling),b.select()},_selectLine_W3C:function(){var a=this.win.getSelection(),b=[a.anchorNode,a.anchorOffset,a.focusNode,a.focusOffset];a.modify("move","left","lineboundary"),a.modify("extend","right","lineboundary"),a.anchorNode===b[0]&&a.anchorOffset===b[1]&&a.focusNode===b[2]&&a.focusOffset===b[3]?this._selectLineUniversal():this.includeRangyRangeHelpers()},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())}},getRangeRect:function(a){var b,c=(this.doc.createTextNode("i"),this.doc.createTextNode("i"));return a.collapsed?(a.insertNode(c),a.selectNode(c),b=a.nativeRange.getBoundingClientRect(),a.deleteContents()):b=a.nativeRange.getBoundingClientRect(),b},_selectLineUniversal:function(){var b,c,d,e,f,g,h=this.getSelection(),i=h.getRangeAt(0),j=0,k=this,l=function(b){return b&&1===b.nodeType&&("block"===k.win.getComputedStyle(b).display||a.lang.array(["BR","HR"]).contains(b.nodeName))},m=function(a){var b=a;if(b)for(;b&&(1===b.nodeType&&b.classList.contains("rangySelectionBoundary")||3===b.nodeType&&/^\s*$/.test(b.data));)b=b.previousSibling;return b};c=i.cloneRange(),d=i.cloneRange(),i.collapsed&&(3===i.startContainer.nodeType&&i.startOffset0?i.moveEnd("character",1):i.startOffset>0&&(3===i.startContainer.nodeType||1===i.startContainer.nodeType&&!l(m(i.startContainer.childNodes[i.startOffset-1])))&&i.moveStart("character",-1)),i.collapsed||i.insertNode(this.doc.createTextNode(a.INVISIBLE_SPACE)),b=i.nativeRange.getBoundingClientRect();do e=i.moveStart("character",-1),f=i.nativeRange.getBoundingClientRect(),f&&Math.floor(f.top)===Math.floor(b.top)||(i.moveStart("character",1),g=!0),j++;while(0!==e&&!g&&2e3>j);j=0,g=!1,b=i.nativeRange.getBoundingClientRect();do e=i.moveEnd("character",1),f=i.nativeRange.getBoundingClientRect(),f&&Math.floor(f.bottom)===Math.floor(b.bottom)||(i.moveEnd("character",-1),i.endContainer&&1===i.endContainer.nodeType&&i.endContainer.childNodes[i.endOffset]&&1===i.endContainer.childNodes[i.endOffset].nodeType&&"BR"===i.endContainer.childNodes[i.endOffset].nodeName&&i.endContainer.childNodes[i.endOffset].previousSibling&&(1===i.endContainer.childNodes[i.endOffset].previousSibling.nodeType?i.setEnd(i.endContainer.childNodes[i.endOffset].previousSibling,i.endContainer.childNodes[i.endOffset].previousSibling.childNodes.length):3===i.endContainer.childNodes[i.endOffset].previousSibling.nodeType&&i.setEnd(i.endContainer.childNodes[i.endOffset].previousSibling,i.endContainer.childNodes[i.endOffset].previousSibling.data.length)),g=!0),j++;while(0!==e&&!g&&2e3>j);i.select(),this.includeRangyRangeHelpers()},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(a,b){return 3===a.nodeType?a:a.childNodes[b]||a}function d(a){return a&&1===a.nodeType&&"BR"===a.nodeName}function e(a,b){return a&&1===a.nodeType&&"block"===b.win.getComputedStyle(a).display}function f(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")}function g(a,b){return d(a)||e(a,b)}function h(b,c){a.dom.removeInvisibleSpaces(b.element);for(var d,e=b.element,f=e.querySelectorAll(E),g=b.config.classNames.uneditableContainer+[""].concat(E.split(",")).join(", "+b.config.classNames.uneditableContainer+" "),h=e.querySelectorAll(g),i=a.lang.array(f).without(h),j=i.length;j--;)""===i[j].innerHTML.replace(/[\uFEFF]/g,"")&&(d=a.lang.array(c).indexOf(i[j]),d>-1&&c.splice(d,1),i[j].parentNode.removeChild(i[j]));return c}function i(a){return a.config.useLineBreaks?"DIV":"P"}function j(a,b,c){for(var d=a,e=null;d&&b&&d!==b;)1===d.nodeType&&d.matches(c?E:D)&&(e=d),d=d.parentNode;return e}function k(a,b){for(var c,d,e,f=a,g=null;f&&b&&f!==b;)1===f.nodeType&&f.matches(F)&&(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 l(b,c,d){return b||(b=d.doc.createElement(c.nodeName||i(d)),b.appendChild(d.doc.createTextNode(a.INVISIBLE_SPACE))),c.nodeName&&b.nodeName!==c.nodeName&&(b=C.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 m(b,c,d){var e,f=b.previousSibling,g=b.nextSibling,h=!1;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.toLowerCase()===c.nodeName.toLowerCase()&&(e=b.getAttribute("style"),e&&""!==e.trim()?b=C.renameElement(b,i(d)):(C.unwrap(b),h=!0)),null!==b.getAttribute("style")&&""===b.getAttribute("style").trim()&&b.removeAttribute("style"),h&&u(f,g,d)}function n(b){for(var c,d,e=b.querySelectorAll(E)||[],f=e.length;f--;)c=a.dom.domNode(e[f]).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),d=a.dom.domNode(e[f]).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),c&&1!==c.nodeType&&"BR"!==c.nodeName&&""!==(e[f].innerHTML||e[f].nodeValue||"").trim()&&e[f].parentNode.insertBefore(e[f].ownerDocument.createElement("BR"),c),c&&1!==c.nodeType&&"BR"!==c.nodeName&&""!==(e[f].innerHTML||e[f].nodeValue||"").trim()&&e[f].parentNode.insertBefore(e[f].ownerDocument.createElement("BR"),c),a.dom.unwrap(e[f])}function o(a,b){var c,d=a.startContainer,e=a.endContainer;return d&&1===d.nodeType&&d===e?void(d.firstChild===d.lastChild&&1===a.endOffset&&d!==b.element&&"LI"!==d.nodeName&&"TD"!==d.nodeName&&(a.setStartBefore(d),a.setEndAfter(e))):d&&1===d.nodeType&&3===e.nodeType?void(d.firstChild===e&&a.endOffset===e.data.length&&d!==b.element&&"LI"!==d.nodeName&&"TD"!==d.nodeName&&a.setEndAfter(d)):e&&1===e.nodeType&&3===d.nodeType?void(e.firstChild===d&&0===a.startOffset&&e!==b.element&&"LI"!==e.nodeName&&"TD"!==e.nodeName&&a.setStartBefore(e)):d&&3===d.nodeType&&d===e&&1===d.parentNode.childNodes.length?void(a.endOffset==e.data.length&&0===a.startOffset&&(c=d.parentNode,c!==b.element&&"LI"!==c.nodeName&&"TD"!==c.nodeName&&(a.setStartBefore(c),a.setEndAfter(c)))):void 0}function p(b){for(var c,d,e,f,g,h,i=[],j=0,k=b.length;k>j;j++)if(1===b[j].startContainer.nodeType&&b[j].startContainer.matches("ul, ol")&&b[j].setStart(b[j].startContainer.childNodes[b[j].startOffset],0),1===b[j].endContainer.nodeType&&b[j].endContainer.matches("ul, ol")&&(h=b[j].endContainer.childNodes[Math.max(b[j].endOffset-1,0)],h.childNodes&&b[j].setEnd(h,h.childNodes.length)),c=b[j].getNodes([1],function(a){return"LI"===a.nodeName}),c.length>0){for(d=0,e=c.length;e>d;d++)g=b[j].compareNode(c[d]),(g===b[j].NODE_AFTER||g===b[j].NODE_INSIDE)&&(f=b[j].cloneRange(),h=a.dom.domNode(c[d]).prev({nodeTypes:[1]}),h?f.setEnd(h,h.childNodes.length):c[d].closest("ul, ol")?f.setEndBefore(c[d].closest("ul, ol")):f.setEndBefore(c[d]),i.push(f),b[j].setStart(c[d],0)),(g===b[j].NODE_BEFORE||g===b[j].NODE_INSIDE)&&(f=b[j].cloneRange(),f.setEnd(c[d],c[d].childNodes.length),i.push(f),h=a.dom.domNode(c[d]).next({nodeTypes:[1]}),h?b[j].setStart(h,0):c[d].closest("ul, ol")?b[j].setStartAfter(c[d].closest("ul, ol")):b[j].setStartAfter(c[d]));i.push(b[j])}else i.push(b[j]);return i}function q(b,c,d){var e=b?a.lang.object(b).clone(!0):null;return e&&(e.nodeName=e.nodeName||c||i(d)),e}function r(b,c,d,e){var f,h,i,l,m,n=c.startContainer,e=e||j(n,d.element,!0);if(e)h=b.firstChild,i=b.lastChild,d.selection.splitElementAtCaret(e,b),m=a.dom.domNode(i).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),l=a.dom.domNode(h).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),h&&!g(h,d)&&l&&!g(l,d)&&h.parentNode.insertBefore(d.doc.createElement("br"),h),i&&!g(i,d)&&m&&!g(m,d)&&m.parentNode.insertBefore(d.doc.createElement("br"),m);else if(f=k(n,d.element),f.outerNode&&f.innerNode&&f.parent){if(1===b.childNodes.length){for(;b.firstChild.firstChild;)f.innerNode.appendChild(b.firstChild.firstChild);b.firstChild.appendChild(f.outerNode)}d.selection.splitElementAtCaret(f.parent,b)}else c.insertNode(b)}function s(b,d,e){for(var f,h,i=b.cloneRange(),j=c(i.startContainer,i.startOffset).previousSibling,k=c(i.endContainer,i.endOffset).nextSibling,l=i.extractContents(),m=e.doc.createDocumentFragment(),o=!0;l.firstChild;){if(1===l.firstChild.nodeType&&l.firstChild.matches(E)){n(l.firstChild),f=a.dom.unwrap(l.firstChild),f.length>0&&(m.lastChild&&(1!==m.lastChild.nodeType||!g(m.lastChild,e))||!m.lastChild&&j&&(1!==j.nodeType||g(j,e)))&&m.appendChild(e.doc.createElement("BR"));for(var p=0,q=f.length;q>p;p++)m.appendChild(f[p]);f.length>0&&(1===m.lastChild.nodeType&&g(m.lastChild,e)||(k||m.lastChild!==l.lastChild)&&m.appendChild(e.doc.createElement("BR")))}else m.appendChild(l.firstChild);o=!1}return h=a.lang.array(m.childNodes).get(),r(m,i,e),h}function t(b,c,e){var f=b&&a.dom.domNode(b).prev({nodeTypes:[1,3],ignoreBlankTexts:!0});d(c)&&c.parentNode.removeChild(c),!d(b)||f&&1===f.nodeType&&"block"===e.win.getComputedStyle(f).display||b.parentNode.removeChild(b)}function u(a,b,c){var e;a&&f(a)&&(a=a.previousSibling),b&&f(b)&&(b=b.nextSibling),e=a&&a.previousSibling,a&&(1!==a.nodeType||"block"!==c.win.getComputedStyle(a).display&&!d(a))&&a.parentNode&&a.parentNode.insertBefore(c.doc.createElement("br"),a.nextSibling),b&&(1!==b.nodeType||"block"!==c.win.getComputedStyle(b).display)&&b.parentNode&&b.parentNode.insertBefore(c.doc.createElement("br"),b)}function v(d,e,f,g){var h,i,k=e?b(e):null,m=d.cloneRange(),o=m.startContainer,p=c(m.startContainer,m.startOffset),s=c(m.endContainer,m.endOffset),u=m.startContainer!==p||3!==p.nodeType||G(p,m.startOffset)?a.dom.domNode(p).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}):p,v=1===m.endContainer.nodeType&&m.endContainer.childNodes[m.endOffset]===s||m.endContainer===s&&3===s.nodeType&&!H(s,m.endOffset)?s:a.dom.domNode(c(m.endContainer,m.endOffset)).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),w=m.extractContents(),x=g.doc.createDocumentFragment(),y=k?a.dom.getParentElement(o,k,null,g.element):null,z=!f||!e||"BLOCKQUOTE"===e.nodeName&&"BLOCKQUOTE"===f,A=y||j(o,g.element,z);if(I(w),e&&"BLOCKQUOTE"===e.nodeName){var B=l(null,e,g);B.appendChild(w),x.appendChild(B),i=[B]}else{if(w.firstChild)for(;w.firstChild;)if(1==w.firstChild.nodeType&&w.firstChild.matches(E))l(w.firstChild,e,g),w.firstChild.matches(D)&&n(w.firstChild),x.appendChild(w.firstChild);else{for(h=l(null,q(e,f,g),g);w.firstChild&&(1!==w.firstChild.nodeType||!w.firstChild.matches(E));)1==w.firstChild.nodeType&&h.matches(D)&&n(w.firstChild),h.appendChild(w.firstChild);x.appendChild(h)}else x.appendChild(l(null,e,g));i=a.lang.array(x.childNodes).get()}return r(x,m,g,A),t(u,v,g),i}function w(b,c){var d=a.dom.getParentElement(b,{query:E},null,c.element);return d?d.nodeName:null}function x(b,c){var d,e=a.dom.getParentElement(b.selection.getOwnRanges()[0].startContainer,{query:D+", "+(c?c.toLowerCase():"div")},null,b.element);e?(d=b.selection.createRange(),d.selectNode(e),b.selection.setSelection(d)):b.isEmpty()||b.selection.selectLine()}function y(a,b){var c=b.selection.createRange(),d=a[a.length-1],e=1===d.nodeType&&d.childNodes?0|d.childNodes.length:d.length||0;c.setStart(a[0],0),c.setEnd(d,e),c.select()}function z(a,b,c){var d,e=b.selection.getOwnRanges(),f=[];e=p(e);for(var g=e.length;g--;)o(e[g],b),d=w(e[g].startContainer,b),f="remove"===a?f.concat(s(e[g],d,b)):f.concat(v(e[g],c,d,b));return f}function A(a){return"string"==typeof a&&(a={nodeName:a.toUpperCase()}),a}function B(b){var c;return b.selection.isCollapsed()&&(c=b.selection.getNodesNearCaret(),c&&c.caretNode&&(a.dom.domNode(c.caretNode).is.lineBreak()||3===c.caretNode.nodeType&&0===c.textOffset&&(!c.prevNode||a.dom.domNode(c.prevNode).is.lineBreak())||1===c.caretNode.nodeType&&c.caretNode.classList.contains("rangySelectionBoundary")&&(!c.prevNode||a.dom.domNode(c.prevNode).is.lineBreak()||a.dom.domNode(c.prevNode).is.block())&&(!c.nextNode||a.dom.domNode(c.nextNode).is.lineBreak()||a.dom.domNode(c.nextNode).is.block())))?!0:!1}var C=a.dom,D="h1, h2, h3, h4, h5, h6, p, pre",E="h1, h2, h3, h4, h5, h6, p, pre, div, blockquote",F="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",G=function(a,b){var c=a.data?a.data.slice(0,b):"";return/^\s*$/.test(c)},H=function(a,b){var c=a.data?a.data.slice(b):"";return/^\s*$/.test(c)},I=function(a){if(a){for(;a.firstChild&&3===a.firstChild.nodeType&&/^\s*$/.test(a.firstChild.data)&&a.lastChild!==a.firstChild;)a.removeChild(a.firstChild);for(;a.lastChild&&3===a.lastChild.nodeType&&/^\s*$/.test(a.lastChild.data)&&a.lastChild!==a.firstChild;)a.removeChild(a.lastChild);a.firstChild&&1===a.firstChild.nodeType&&"BR"===a.firstChild.nodeName&&a.lastChild!==a.firstChild&&a.removeChild(a.firstChild),a.lastChild&&1===a.lastChild.nodeType&&"BR"===a.lastChild.nodeName&&a.lastChild!==a.firstChild&&a.removeChild(a.lastChild)}};a.commands.formatBlock={exec:function(a,b,c){c=A(c);var d,e,f=[];if(c&&c.toggle&&(e=this.state(a,b,c)),e){d=rangy.saveSelection(a.win);for(var g=0,i=e.length;i>g;g++)m(e[g],c,a)}else a.selection.isCollapsed()&&(d=rangy.saveSelection(a.win),B(a)?a.selection.selectLine():x(a,c&&c.nodeName?c.nodeName.toUpperCase():void 0)),f=c?z("apply",a,c):z("remove",a);f=h(a,f),d?rangy.restoreSelection(d):y(f,a)},remove:function(a,b,c){c=A(c);var d,e;a.selection.isCollapsed()&&(e=rangy.saveSelection(a.win),x(a,c&&c.nodeName?c.nodeName.toUpperCase():void 0)),d=z("remove",a),d=h(a,d),e?rangy.restoreSelection(e):y(d,a)},state:function(b,c,d){d=A(d);for(var e,f=b.selection.filterElements(function(b){return a.dom.domNode(b).test(d||{query:E})}.bind(this)),g=b.selection.getSelectedOwnNodes(),h=0,i=g.length;i>h;h++)e=C.getParentElement(g[h],d||{query:E},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):(f.classRegExp&&(e.className=e.className.replace(f.classRegExp,"")),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.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(a,c){a.selection.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){var d,e,f=rangy.saveSelection(c.win),g="_wysihtml5-temp-"+(new Date).getTime();c.commands.exec("formatBlock",{nodeName:"div",className:g});var h=c.element.querySelector("."+g);h.innerHTML=h.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),h&&(d=/^(\s|(
))+$/i.test(h.innerHTML),e=a.dom.convertToList(h,b.toLowerCase(),c.parent.config.classNames.uneditableContainer),f&&rangy.restoreSelection(f),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){var b={styleProperty:"textAlign",styleValue:"justify",toggle:!0};a.commands.alignJustifyStyle={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",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()?"":"
"},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!==!1&&(a=this.parent.parse(a));try{this.element.innerHTML=a}catch(c){this.element.innerText=a}},cleanUp:function(a){var b;this.selection&&this.selection.isInThisEditable()&&(b=rangy.saveSelection(this.win)),this.parent.parse(this.element,void 0,a),b&&rangy.restoreSelection(b)},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),this._initAutoLinking(),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._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,!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.executeAndRestoreRangy(function(){e.config.useLineBreaks?((!c.firstChild||c.firstChild===c.lastChild&&1===c.firstChild.nodeType&&c.firstChild.classList.contains("rangySelectionBoundary"))&&c.appendChild(e.doc.createElement("br")),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"],function(){e.isEmpty()&&setTimeout(function(){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))},0)}),b.observe(this.element,"keydown",function(c){var h=c.keyCode;if(!(c.shiftKey||c.ctrlKey||c.defaultPrevented||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=b.domNode,d=a.browser,e={66:"bold",73:"italic",85:"underline"},f=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.addEventListener(b[d],c,!1)},g=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.removeEventListener(b[d],c,!1)},h=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},i=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(h(a,!0))return!0;try{var c=new CustomEvent("wysihtml5:uneditable:delete",{bubbles:!0,cancelable:!1});b.node.dispatchEvent(c)}catch(d){}return b.node.parentNode.removeChild(b.node),!0}return!1},j=function(b){var d=b.selection,e=d.getPreviousNode();if(d.caretIsFirstInSelection()&&e&&1===e.nodeType&&/block/.test(b.win.getComputedStyle(e).display)&&!c(e).test({query:"ol, ul, table, tr, dl"})){if(/^\s*$/.test(e.textContent||e.innerText))return e.parentNode.removeChild(e),!0;if(e.lastChild){var f=e.lastChild,g=d.getSelectedNode(),h=c(e).commonAncestor(g,b.element);if(curNode=3===g.nodeType?g:a.dom.getParentElement(g,{query:"h1, h2, h3, h4, h5, h6, p, pre, div, blockquote"},!1,h||b.element),curNode)return c(curNode).transferContentTo(e,!0),d.setAfter(f),!0}}return!1},k=function(b){if(a.browser.hasLiDeletingProblem()){var d,e,f=b.selection.getSelection(),g=f.anchorNode,h=b.selection.caretIsFirstInSelection();if(3===g.nodeType&&0===f.anchorOffset&&g===g.parentNode.firstChild&&(g=g.parentNode,h=!0),h&&g&&1===g.nodeType&&"LI"===g.nodeName&&(d=c(g).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),d||!g.parentNode||"UL"!==g.parentNode.nodeName&&"OL"!==g.parentNode.nodeName||(d=c(g.parentNode).prev({nodeTypes:[1,3],ignoreBlankTexts:!0})),d))return e=g.firstChild,c(g).transferContentTo(d,!0),e?b.selection.setBefore(e):d&&(1===d.nodeType?d.lastChild?b.selection.setAfter(d.lastChild):b.selection.selectNode(d):b.selection.setAfter(d)),!0}return!1},l=function(a,b){var c=b.selection;b.element;if(c.isCollapsed()){if(i(b))return void a.preventDefault();if(k(b))return void a.preventDefault();if(j(b))return void a.preventDefault();if(h(b))return void a.preventDefault()}else c.containsUneditable()&&(a.preventDefault(),c.deleteContents())},m=function(d,e){if(e.config.useLineBreaks&&!d.shiftKey&&!d.ctrlKey){var f,g,h="p, pre, div, blockquote";if(e.selection.isCollapsed()&&(f=e.selection.getNodesNearCaret(),f&&((f.caretNode||f.nextNode)&&(g=b.getParentElement(f.caretNode||f.nextNode,{query:h},2),g===e.element&&(g=void 0)),g&&f.caretNode)))if(c(f.caretNode).is.lineBreak()){if(e.config.doubleLineBreakEscapesBlock){d.preventDefault(),f.caretNode.parentNode.removeChild(f.caretNode),c(f.nextNode).is.lineBreak()&&f.nextNode.parentNode.removeChild(f.nextNode);var i=e.doc.createElement("br");c(f.nextNode).is.lineBreak()&&f.nextNode===g.lastChild?g.parentNode.insertBefore(i,g.nextSibling):e.selection.splitElementAtCaret(g,i),f.nextNode&&3===f.nextNode.nodeType&&(f.nextNode.data=f.nextNode.data.replace(/^ *[\r\n]+/,"")),e.selection.setBefore(i)}}else if(3===f.caretNode.nodeType&&a.browser.hasCaretBlockElementIssue()&&f.textOffset===f.caretNode.data.length&&!f.nextNode){d.preventDefault();var j=e.doc.createElement("br"),k=e.doc.createElement("br"),l=e.doc.createDocumentFragment();l.appendChild(j),l.appendChild(k),e.selection.insertNode(l),e.selection.setBefore(k)}}},n=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"," ")},o=function(a){this.domNodeRemovedInterval&&clearInterval(domNodeRemovedInterval),this.parent.fire("destroy:composer")},p=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)},q=function(a){this.parent.fire("focus",a).fire("focus:composer",a),setTimeout(function(){this.focusState=this.getValue(!1,!1)}.bind(this),0)},r=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)},s=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)},t=function(b){this.config.copyedFromMarking&&(a.browser.supportsModernPaste()&&(b.clipboardData.setData("text/html",this.config.copyedFromMarking+this.selection.getHtml()),b.clipboardData.setData("text/plain",this.selection.getPlainText()),b.preventDefault()),this.parent.fire(b.type,b).fire(b.type+":composer",b))},u=function(b){var c=b.keyCode;(c===a.SPACE_KEY||c===a.ENTER_KEY)&&this.parent.fire("newword:composer")},v=function(b){if(!d.canSelectImagesInContentEditable()){var c=b.target,e=this.element.querySelectorAll("img"),f=this.element.querySelectorAll("."+this.config.classNames.uneditableContainer+" img"),g=a.lang.array(e).without(f);"IMG"===c.nodeName&&a.lang.array(g).contains(c)&&this.selection.selectNode(c)}},w=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)}},x=function(a){d.canSelectImagesInContentEditable()||setTimeout(function(){this.selection.getSelection().removeAllRanges()}.bind(this),0)},y=function(b){var c,d,f=b.keyCode,g=e[f];return!b.ctrlKey&&!b.metaKey||b.altKey||65!==f?((b.ctrlKey||b.metaKey)&&!b.altKey&&g&&(this.commands.exec(g),
-b.preventDefault()),f===a.BACKSPACE_KEY&&l(b,this),(f===a.BACKSPACE_KEY||f===a.DELETE_KEY)&&(c=this.selection.getSelectedNode(!0),c&&"IMG"===c.nodeName&&(b.preventDefault(),d=c.parentNode,d.removeChild(c),"A"!==d.nodeName||d.firstChild||d.parentNode.removeChild(d),setTimeout(function(){a.quirks.redraw(this.element)}.bind(this),0))),this.config.handleTabKey&&f===a.TAB_KEY&&(b.preventDefault(),n(this,this.element,b.shiftKey)),void(f===a.ENTER_KEY&&m(b,this))):(this.selection.selectAll(),void b.preventDefault())},z=function(){var b=function(){window.removeEventListener("load",b),this.doc.execCommand("enableObjectResizing",!1,"false"),this.doc.execCommand("enableInlineTableEditing",!1,"false")}.bind(this),c=function(){b.call(this),g(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?f(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c):window.addEventListener("load",b)),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(),c=(this.element,d.supportsEventsInIframeCorrectly()||this.sandbox.getContentEditable?this.element:this.sandbox.getWindow());this.focusState=this.getValue(!1,!1),a.addEventListener(["DOMNodeRemoved"],o.bind(this),!1),d.supportsMutationEvents()||(this.domNodeRemovedInterval=setInterval(function(){b.contains(document.documentElement,a)||o.call(this)},250)),this.config.handleTables&&z.call(this),f(c,["drop","paste","mouseup","focus","keyup"],p.bind(this)),c.addEventListener("focus",q.bind(this),!1),c.addEventListener("blur",r.bind(this),!1),f(this.element,["drop","paste","beforepaste"],s.bind(this),!1),this.element.addEventListener("copy",t.bind(this),!1),this.element.addEventListener("mousedown",v.bind(this),!1),this.element.addEventListener("click",w.bind(this),!1),this.element.addEventListener("drop",x.bind(this),!1),this.element.addEventListener("keyup",u.bind(this),!1),this.element.addEventListener("keydown",y.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!==!1&&(a=this.parent.parse(a)),this.element.value=a},cleanUp:function(a){var b=this.parent.parse(this.element.value,void 0,a);this.element.value=b},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:{},b:{},i:{},u:{}},classes:{}},pasteParserRulesets:null,parser:a.dom.parse,useLineBreaks:!0,doubleLineBreakEscapesBlock:!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(a){this.currentView.cleanUp(a)},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()},destroy:function(){this.composer&&this.composer.sandbox&&this.composer.sandbox.destroy(),this.toolbar&&this.toolbar.destroy(),this.off()},parse:function(b,c,d){var e=this.config.contentEditableMode?document:this.composer?this.composer.sandbox.getDocument():null,f=this.config.parser(b,{rules:d||this.config.parserRules,cleanUp:this.config.cleanUp,context:e,uneditableClass:this.config.classNames.uneditableContainer,clearInternals:c});return"object"==typeof b&&a.quirks.redraw(b),f},_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._ownerDocumentClick=function(b){a.dom.contains(c.container,b.target)||a.dom.contains(c.composer.element,b.target)||(c._updateLinkStates(),c._preventInstantFocus())},this.container.ownerDocument.addEventListener("click",this._ownerDocumentClick,!1),this.editor.on("destroy:composer",this.destroy.bind(this)),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)})},destroy:function(){this.container.ownerDocument.removeEventListener("click",this._ownerDocumentClick,!1)},_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);
+isCollapsedWhitespace:x("isCollapsedWhitespace",t,"node"),getComputedDisplay:x("computedDisplay",i,"node"),isCollapsed:x("collapsed",u,"node"),isIgnored:x("ignored",v,"node"),next:x("nextPos",q,"node"),previous:x("previous",r,"node"),getTextNodeInfo:x("textNodeInfo",function(a){var b=null,c=!1,d=na(a.parentNode,"whiteSpace"),e="pre-line"==d;return e?(b=Y,c=!0):("normal"==d||"nowrap"==d)&&(b=X,c=!0),{node:a,text:a.data,spaceRegex:b,collapseSpaces:c,preLine:e}},"node"),hasInnerText:x("hasInnerText",function(a,b){for(var c=this.session,d=c.getPosition(a.parentNode,this.getNodeIndex()+1),e=c.getPosition(a,0),f=b?d:e,g=b?e:d;f!==g;){if(f.prepopulateChar(),f.isDefinitelyNonEmpty())return!0;f=b?f.previousVisible():f.nextVisible()}return!1},"node"),isRenderedBlock:x("isRenderedBlock",function(a){for(var b=a.getElementsByTagName("br"),c=0,d=b.length;d>c;++c)if(!u(b[c]))return!0;return this.hasInnerText()},"node"),getTrailingSpace:x("trailingSpace",function(a){if("br"==a.tagName.toLowerCase())return"";switch(this.getComputedDisplay()){case"inline":for(var b=a.lastChild;b;){if(!v(b))return 1==b.nodeType?this.session.getNodeWrapper(b).getTrailingSpace():"";b=b.previousSibling}break;case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":break;case"table-cell":return" ";default:return this.isRenderedBlock(!0)?"\n":""}return""},"node"),getLeadingSpace:x("leadingSpace",function(a){switch(this.getComputedDisplay()){case"inline":case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":case"table-cell":break;default:return this.isRenderedBlock(!1)?"\n":""}return""},"node")});var Ca={character:"",characterType:sa,isBr:!1,prepopulateChar:function(){var a=this;if(!a.prepopulatedChar){var b=a.node,c=a.offset,d="",e=sa,f=!1;if(c>0)if(3==b.nodeType){var g=b.data,h=g.charAt(c-1),i=a.nodeWrapper.getTextNodeInfo(),j=i.spaceRegex;i.collapseSpaces?j.test(h)?c>1&&j.test(g.charAt(c-2))||(i.preLine&&"\n"===g.charAt(c)?(d=" ",e=za):(d=" ",e=va)):(d=h,e=ta,f=!0):(d=h,e=ua,f=!0)}else{var k=b.childNodes[c-1];if(k&&1==k.nodeType&&!u(k)&&("br"==k.tagName.toLowerCase()?(d="\n",a.isBr=!0,e=va,f=!1):a.checkForTrailingSpace=!0),!d){var l=b.childNodes[c];l&&1==l.nodeType&&!u(l)&&(a.checkForLeadingSpace=!0)}}a.prepopulatedChar=!0,a.character=d,a.characterType=e,a.isCharInvariant=f}},isDefinitelyNonEmpty:function(){var a=this.characterType;return a==ta||a==ua},resolveLeadingAndTrailingSpaces:function(){if(this.prepopulatedChar||this.prepopulateChar(),this.checkForTrailingSpace){var a=this.session.getNodeWrapper(this.node.childNodes[this.offset-1]).getTrailingSpace();a&&(this.isTrailingSpace=!0,this.character=a,this.characterType=va),this.checkForTrailingSpace=!1}if(this.checkForLeadingSpace){var b=this.session.getNodeWrapper(this.node.childNodes[this.offset]).getLeadingSpace();b&&(this.isLeadingSpace=!0,this.character=b,this.characterType=va),this.checkForLeadingSpace=!1}},getPrecedingUncollapsedPosition:function(a){for(var b,c=this;c=c.previousVisible();)if(b=c.getCharacter(a),""!==b)return c;return null},getCharacter:function(a){function b(){return n||(k=o.getPrecedingUncollapsedPosition(a),n=!0),k}this.resolveLeadingAndTrailingSpaces();var c,d=this.character,e=f(a.ignoreCharacters),g=""!==d&&e.indexOf(d)>-1;if(this.isCharInvariant)return c=g?"":d;var h=["character",a.includeSpaceBeforeBr,a.includeBlockContentTrailingSpace,a.includePreLineTrailingSpace,e].join("_"),i=this.cache.get(h);if(null!==i)return i;var j,k,l="",m=this.characterType==va,n=!1,o=this;return m&&(this.type==Ba?l="\n":" "==d&&(!b()||k.isTrailingSpace||"\n"==k.character||" "==k.character&&k.characterType==va)||("\n"==d&&this.isLeadingSpace?b()&&"\n"!=k.character&&(l="\n"):(j=this.nextUncollapsed(),j&&(j.isBr?this.type=ya:j.isTrailingSpace&&"\n"==j.character?this.type=xa:j.isLeadingSpace&&"\n"==j.character&&(this.type=wa),"\n"==j.character?(this.type!=ya||a.includeSpaceBeforeBr)&&(this.type!=wa||a.includeSpaceBeforeBlock)&&(this.type==xa&&j.isTrailingSpace&&!a.includeBlockContentTrailingSpace||(this.type!=za||j.type!=ta||a.includePreLineTrailingSpace)&&("\n"==d?j.isTrailingSpace?this.isTrailingSpace||this.isBr&&(j.type=Aa,b()&&k.isLeadingSpace&&!k.isTrailingSpace&&"\n"==k.character?j.character="":j.type=Ba):l="\n":" "==d&&(l=" "))):l=d)))),e.indexOf(l)>-1&&(l=""),this.cache.set(h,l),l},equals:function(a){return!!a&&this.node===a.node&&this.offset===a.offset},inspect:A,toString:function(){return this.character}};z.prototype=Ca,U(Ca,{next:x("nextPos",function(a){var b=a.nodeWrapper,c=a.node,d=a.offset,e=b.session;if(!c)return null;var f,g,h;return d==b.getLength()?(f=c.parentNode,g=f?b.getNodeIndex()+1:0):b.isCharacterDataNode()?(f=c,g=d+1):(h=c.childNodes[d],e.getNodeWrapper(h).containsPositions()?(f=h,g=0):(f=c,g=d+1)),f?e.getPosition(f,g):null}),previous:x("previous",function(a){var b,c,d,e=a.nodeWrapper,f=a.node,g=a.offset,h=e.session;return 0==g?(b=f.parentNode,c=b?e.getNodeIndex():0):e.isCharacterDataNode()?(b=f,c=g-1):(d=f.childNodes[g-1],h.getNodeWrapper(d).containsPositions()?(b=d,c=S.getNodeLength(d)):(b=f,c=g-1)),b?h.getPosition(b,c):null}),nextVisible:x("nextVisible",function(a){var b=a.next();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex()+1)),e}),nextUncollapsed:x("nextUncollapsed",function(a){for(var b=a;b=b.nextVisible();)if(b.resolveLeadingAndTrailingSpaces(),""!==b.character)return b;return null}),previousVisible:x("previousVisible",function(a){var b=a.previous();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex())),e})});var Da=null,Ea=function(){function a(a){var b=new w;return{get:function(c){var d=b.get(c[a]);if(d)for(var e,f=0;e=d[f++];)if(e.node===c)return e;return null},set:function(c){var d=c.node[a],e=b.get(d)||b.set(d,[]);e.push(c)}}}function b(){this.initCaches()}var c=T.isHostProperty(document.documentElement,"uniqueID");return b.prototype={initCaches:function(){this.elementCache=c?function(){var a=new w;return{get:function(b){return a.get(b.uniqueID)},set:function(b){a.set(b.node.uniqueID,b)}}}():a("tagName"),this.textNodeCache=a("data"),this.otherNodeCache=a("nodeName")},getNodeWrapper:function(a){var b;switch(a.nodeType){case 1:b=this.elementCache;break;case 3:b=this.textNodeCache;break;default:b=this.otherNodeCache}var c=b.get(a);return c||(c=new y(a,this),b.set(c)),c},getPosition:function(a,b){return this.getNodeWrapper(a).getPosition(b)},getRangeBoundaryPosition:function(a,b){var c=b?"start":"end";return this.getPosition(a[c+"Container"],a[c+"Offset"])},detach:function(){this.elementCache=this.textNodeCache=this.otherNodeCache=null}},b}();U(S,{nextNode:q,previousNode:r});var Fa=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)if(a[c]===b)return c;return-1};U(a.rangePrototype,{moveStart:M(!0,!1),moveEnd:M(!1,!1),move:M(!0,!0),trimStart:N(!0),trimEnd:N(!1),trim:L(function(a,b){var c=this.trimStart(b),d=this.trimEnd(b);return c||d}),expand:L(function(a,b,c){var d=!1;c=h(c,la);var e=c.characterOptions;if(b||(b=Q),b==R){var f,g,i=c.wordOptions,j=a.getRangeBoundaryPosition(this,!0),k=a.getRangeBoundaryPosition(this,!1),l=F(j,e,i),m=l.nextEndToken(),n=m.chars[0].previousVisible();if(this.collapsed)f=m;else{var o=F(k,e,i);f=o.previousStartToken()}return g=f.chars[f.chars.length-1],n.equals(j)||(this.setStart(n.node,n.offset),d=!0),g&&!g.equals(k)&&(this.setEnd(g.node,g.offset),d=!0),c.trim&&(c.trimStart&&(d=this.trimStart(e)||d),c.trimEnd&&(d=this.trimEnd(e)||d)),d}return this.moveEnd(Q,1,c)}),text:L(function(a,b){return this.collapsed?"":I(a,this,V(b,ga)).join("")}),selectCharacters:L(function(a,b,c,d,e){var f={characterOptions:e};b||(b=W(this.getDocument())),this.selectNodeContents(b),this.collapse(!0),this.moveStart("character",c,f),this.collapse(!0),this.moveEnd("character",d-c,f)}),toCharacterRange:L(function(a,b,c){b||(b=W(this.getDocument()));var d,e,f=b.parentNode,g=S.getNodeIndex(b),h=-1==S.comparePoints(this.startContainer,this.endContainer,f,g),i=this.cloneRange();return h?(i.setStartAndEnd(this.startContainer,this.startOffset,f,g),d=-i.text(c).length):(i.setStartAndEnd(f,g,this.startContainer,this.startOffset),d=i.text(c).length),e=d+this.text(c).length,{start:d,end:e}}),findText:L(function(b,c,d){d=h(d,ja),d.wholeWordsOnly&&(d.wordOptions.includeTrailingSpace=!1);var e=aa(d.direction),f=d.withinRange;f||(f=a.createRange(),f.selectNodeContents(this.getDocument()));var g=c,i=!1;"string"==typeof g?d.caseSensitive||(g=g.toLowerCase()):i=!0;var j=b.getRangeBoundaryPosition(this,!e),k=f.comparePoint(j.node,j.offset);-1===k?j=b.getRangeBoundaryPosition(f,!0):1===k&&(j=b.getRangeBoundaryPosition(f,!1));for(var l,m=j,n=!1;;)if(l=K(m,g,i,f,d)){if(l.valid)return this.setStartAndEnd(l.startPos.node,l.startPos.offset,l.endPos.node,l.endPos.offset),!0;m=e?l.startPos:l.endPos}else{if(!d.wrap||n)return!1;f=f.cloneRange(),m=b.getRangeBoundaryPosition(f,!e),f.setBoundary(j.node,j.offset,e),n=!0}}),pasteHtml:function(a){if(this.deleteContents(),a){var b=this.createContextualFragment(a),c=b.lastChild;this.insertNode(b),this.collapseAfter(c)}}}),U(a.selectionPrototype,{expand:L(function(a,b,c){this.changeEachRange(function(a){a.expand(b,c)})}),move:L(function(a,b,c,d){var e=0;if(this.focusNode){this.collapse(this.focusNode,this.focusOffset);var f=this.getRangeAt(0);d||(d={}),d.characterOptions=V(d.characterOptions,ha),e=f.move(b,c,d),this.setSingleRange(f)}return e}),trimStart:O("trimStart"),trimEnd:O("trimEnd"),trim:O("trim"),selectCharacters:L(function(b,c,d,e,f,g){var h=a.createRange(c);h.selectCharacters(c,d,e,g),this.setSingleRange(h,f)}),saveCharacterRanges:L(function(a,b,c){for(var d=this.getAllRanges(),e=d.length,f=[],g=1==e&&this.isBackward(),h=0,i=d.length;i>h;++h)f[h]={characterRange:d[h].toCharacterRange(b,c),backward:g,characterOptions:c};return f}),restoreCharacterRanges:L(function(b,c,d){this.removeAllRanges();for(var e,f,g,h=0,i=d.length;i>h;++h)f=d[h],g=f.characterRange,e=a.createRange(c),e.selectCharacters(c,g.start,g.end,f.characterOptions),this.addRange(e,f.backward)}),text:L(function(a,b){for(var c=[],d=0,e=this.rangeCount;e>d;++d)c[d]=this.getRangeAt(d).text(b);return c.join("")})}),a.innerText=function(b,c){var d=a.createRange(b);d.selectNodeContents(b);var e=d.text(c);return e},a.createWordIterator=function(a,b,c){var d=C();c=h(c,ma);var e=d.getPosition(a,b),f=F(e,c.characterOptions,c.wordOptions),g=aa(c.direction);return{next:function(){return g?f.previousStartToken():f.nextEndToken()},dispose:function(){f.dispose(),this.next=function(){}}}},a.noMutation=function(a){var b=C();a(b),D()},a.noMutation.createEntryPointFunction=L,a.textRange={isBlockNode:l,isCollapsedWhitespaceNode:t,createPosition:L(function(a,b,c){return a.getPosition(b,c)})}}),a},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;a-1?c=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"):/Edge\/(\d+)./i.test(navigator.userAgent)&&(c=/Edge\/(\d+)./i)),c&&null!=c.exec(navigator.userAgent)&&(d=parseFloat(RegExp.$1)),-1===d?!1:a?b?"<"===b?d>a:">"===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")&&!c(),g=-1!==d.indexOf("AppleWebKit/")&&!c(),h=-1!==d.indexOf("Chrome/")&&!c(),i=-1!==d.indexOf("Opera/")&&!c();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(12,">")},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(),insertOrderedList:c()},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(12,">")},hasProblemsSettingCaretAfterImg:function(){return c()},hasLiDeletingProblem:function(){return c()},hasUndoInContextMenu:function(){return f||h||i},hasInsertNodeIssue:function(){return i},hasIframeFocusIssue:function(){return c()},createsNestedInvalidMarkupAfterPaste:function(){return g},hasCaretBlockElementIssue:function(){return g},supportsMutationEvents:function(){return"MutationEvent"in window},supportsModernPaste:function(){return!c()},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&&c.nodeType===a.TEXT_NODE&&d.test(c.data)},rangyBookmark:function(){return c&&1===c.nodeType&&c.classList.contains("rangySelectionBoundary")},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},lineBreak:function(){return c&&1===c.nodeType&&"BR"===c.nodeName},block:function(){return c&&1===c.nodeType&&"block"===c.ownerDocument.defaultView.getComputedStyle(c).display},voidElement:function(){return a.dom.domNode(c).test({query:a.VOID_ELEMENTS})}},prev:function(b){var e=c.previousSibling,f=b&&b.nodeTypes?b.nodeTypes:d;return e?a.dom.domNode(e).is.rangyBookmark()||!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.dom.domNode(e).is.rangyBookmark()||!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)if(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 s&&s.length>0&&(j["class"]=wysihtml5.lang.array(s).unique().join(" "));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){for(;a.firstChild;)a.parentNode.insertBefore(a.firstChild,a);a.parentNode.removeChild(a)}},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()},destroy:function(){},_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,!1),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 wysihtml5.browser.supportsModernPaste()&&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(b.ownerDocument.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 a=this.getRange();this.deleteRangeContents(a),this.setSelection(a)},deleteRangeContents:function(b){var c,d,e,f;if(this.unselectableClass){(c=a.dom.getParentElement(b.startContainer,{query:"."+this.unselectableClass},!1,this.contain))&&b.setStartBefore(c),(d=a.dom.getParentElement(b.endContainer,{query:"."+this.unselectableClass},!1,this.contain))&&b.setEndAfter(d),e=b.getNodes([1],function(b){return a.dom.hasClass(b,this.unselectableClass)}.bind(this));for(var g=e.length;g--;)try{f=new CustomEvent("wysihtml5:uneditable:delete"),e[g].dispatchEvent(f)}catch(h){}}b.deleteContents()},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)},getNodesNearCaret:function(){if(!this.isCollapsed())throw"Selection must be caret when using selection.getNodesNearCaret()";var a,b,c,d,e=this.getOwnRanges();return e&&e.length>0?(1===e[0].startContainer.nodeType?(a=e[0].startContainer.childNodes[e[0].startOffset-1],a||0!==e[0].startOffset?a&&(b=a.previousSibling,c=a.nextSibling):c=e[0].startContainer.childNodes[0]):(0===e[0].startOffset&&e[0].startContainer.previousSibling?(a=e[0].startContainer.previousSibling,3===a.nodeType&&(d=a.data.length)):(a=e[0].startContainer,d=e[0].startOffset),b=a.previousSibling,c=a.nextSibling),{caretNode:a,prevNode:b,nextNode:c,textOffset:d}):null},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(f&&3===f.nodeType&&/^\s*$/.test(f.data.slice(0,g))&&(g=0),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,d=this.getRange(),e=this.doc.createElement("DIV"),f=this.doc.createDocumentFragment();if(d){for(d.deleteContents(),e.innerHTML=a,b=e.lastChild;e.firstChild;)f.appendChild(e.firstChild);for(d.insertNode(f),c=this.contain.lastChild;c&&3===c.nodeType&&c.previousSibling&&/^\s*$/.test(c.data);)c=c.previousSibling;b&&(c&&b===c&&1===b.nodeType&&this.contain.appendChild(this.doc.createElement("br")),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},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(){var b=rangy.createRange();a.browser.supportsSelectionModify()?this._selectLine_W3C():b.nativeRange&&b.nativeRange.getBoundingClientRect&&this._selectLineUniversal()},includeRangyRangeHelpers:function(){var a=this.getSelection(),b=a.getRangeAt(0),c=function(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")},d=function(a){return 1===a.nodeType?a.childNodes&&a.childNodes.length||0:a.data&&a.data.length||0},e=1===a.anchorNode.nodeType?a.anchorNode.childNodes[a.anchorOffset]:a.anchorNode,f=1===a.focusNode.nodeType?a.focusNode.childNodes[a.focusOffset]:a.focusNode;f&&a.focusOffset===d(f)&&f.nextSibling&&c(f.nextSibling)&&b.setEndAfter(f.nextSibling),e&&0===a.anchorOffset&&e.previousSibling&&c(e.previousSibling)&&b.setStartBefore(e.previousSibling),b.select()},_selectLine_W3C:function(){var a=this.win.getSelection(),b=[a.anchorNode,a.anchorOffset,a.focusNode,a.focusOffset];a.modify("move","left","lineboundary"),a.modify("extend","right","lineboundary"),a.anchorNode===b[0]&&a.anchorOffset===b[1]&&a.focusNode===b[2]&&a.focusOffset===b[3]?this._selectLineUniversal():this.includeRangyRangeHelpers()},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())}},getRangeRect:function(a){var b,c=(this.doc.createTextNode("i"),this.doc.createTextNode("i"));return a.collapsed?(a.insertNode(c),a.selectNode(c),b=a.nativeRange.getBoundingClientRect(),a.deleteContents()):b=a.nativeRange.getBoundingClientRect(),b},_selectLineUniversal:function(){var b,c,d,e,f,g,h=this.getSelection(),i=h.getRangeAt(0),j=0,k=this,l=function(b){return b&&1===b.nodeType&&("block"===k.win.getComputedStyle(b).display||a.lang.array(["BR","HR"]).contains(b.nodeName))},m=function(a){var b=a;if(b)for(;b&&(1===b.nodeType&&b.classList.contains("rangySelectionBoundary")||3===b.nodeType&&/^\s*$/.test(b.data));)b=b.previousSibling;return b};c=i.cloneRange(),d=i.cloneRange(),i.collapsed&&(3===i.startContainer.nodeType&&i.startOffset0?i.moveEnd("character",1):i.startOffset>0&&(3===i.startContainer.nodeType||1===i.startContainer.nodeType&&!l(m(i.startContainer.childNodes[i.startOffset-1])))&&i.moveStart("character",-1)),i.collapsed||i.insertNode(this.doc.createTextNode(a.INVISIBLE_SPACE)),b=i.nativeRange.getBoundingClientRect();do e=i.moveStart("character",-1),f=i.nativeRange.getBoundingClientRect(),f&&Math.floor(f.top)===Math.floor(b.top)||(i.moveStart("character",1),g=!0),j++;while(0!==e&&!g&&2e3>j);if(j=0,g=!1,b=i.nativeRange.getBoundingClientRect(),i.endContainer!==this.contain||this.contain.lastChild&&this.contain.childNodes[i.endOffset]!==this.contain.lastChild)do e=i.moveEnd("character",1),f=i.nativeRange.getBoundingClientRect(),f&&Math.floor(f.bottom)===Math.floor(b.bottom)||(i.moveEnd("character",-1),i.endContainer&&1===i.endContainer.nodeType&&i.endContainer.childNodes[i.endOffset]&&1===i.endContainer.childNodes[i.endOffset].nodeType&&"BR"===i.endContainer.childNodes[i.endOffset].nodeName&&i.endContainer.childNodes[i.endOffset].previousSibling&&(1===i.endContainer.childNodes[i.endOffset].previousSibling.nodeType?i.setEnd(i.endContainer.childNodes[i.endOffset].previousSibling,i.endContainer.childNodes[i.endOffset].previousSibling.childNodes.length):3===i.endContainer.childNodes[i.endOffset].previousSibling.nodeType&&i.setEnd(i.endContainer.childNodes[i.endOffset].previousSibling,i.endContainer.childNodes[i.endOffset].previousSibling.data.length)),g=!0),j++;while(0!==e&&!g&&2e3>j);i.select(),this.includeRangyRangeHelpers()},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(a,b){return 3===a.nodeType?a:a.childNodes[b]||a}function d(a){return a&&1===a.nodeType&&"BR"===a.nodeName}function e(a,b){return a&&1===a.nodeType&&"block"===b.win.getComputedStyle(a).display}function f(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")}function g(a,b){return d(a)||e(a,b)}function h(b,c){a.dom.removeInvisibleSpaces(b.element);for(var d,e=b.element,f=e.querySelectorAll(E),g=b.config.classNames.uneditableContainer+[""].concat(E.split(",")).join(", "+b.config.classNames.uneditableContainer+" "),h=e.querySelectorAll(g),i=a.lang.array(f).without(h),j=i.length;j--;)""!==i[j].innerHTML.replace(/[\uFEFF]/g,"")||0!==c.length&&i[j]===c[c.length-1]||(d=a.lang.array(c).indexOf(i[j]),d>-1&&c.splice(d,1),i[j].parentNode.removeChild(i[j]));return c}function i(a){return a.config.useLineBreaks?"DIV":"P"}function j(a,b,c){for(var d=a,e=null;d&&b&&d!==b;)1===d.nodeType&&d.matches(c?E:D)&&(e=d),d=d.parentNode;return e}function k(a,b){for(var c,d,e,f=a,g=null;f&&b&&f!==b;)1===f.nodeType&&f.matches(F)&&(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 l(b,c,d){return b||(b=d.doc.createElement(c.nodeName||i(d)),b.appendChild(d.doc.createTextNode(a.INVISIBLE_SPACE))),c.nodeName&&b.nodeName!==c.nodeName&&(b=C.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 m(b,c,d){var e,f=b.previousSibling,g=b.nextSibling,h=!1;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.toLowerCase()===c.nodeName.toLowerCase()&&(e=b.getAttribute("style"),e&&""!==e.trim()?b=C.renameElement(b,i(d)):(C.unwrap(b),h=!0)),null!==b.getAttribute("style")&&""===b.getAttribute("style").trim()&&b.removeAttribute("style"),h&&u(f,g,d)}function n(b){for(var c,d,e=b.querySelectorAll(E)||[],f=e.length;f--;)c=a.dom.domNode(e[f]).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),d=a.dom.domNode(e[f]).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),c&&1!==c.nodeType&&"BR"!==c.nodeName&&""!==(e[f].innerHTML||e[f].nodeValue||"").trim()&&e[f].parentNode.insertBefore(e[f].ownerDocument.createElement("BR"),c),c&&1!==c.nodeType&&"BR"!==c.nodeName&&""!==(e[f].innerHTML||e[f].nodeValue||"").trim()&&e[f].parentNode.insertBefore(e[f].ownerDocument.createElement("BR"),c),a.dom.unwrap(e[f])}function o(a,b){var c,d=a.startContainer,e=a.endContainer;return d&&1===d.nodeType&&d===e?void(d.firstChild===d.lastChild&&1===a.endOffset&&d!==b.element&&"LI"!==d.nodeName&&"TD"!==d.nodeName&&(a.setStartBefore(d),a.setEndAfter(e))):d&&1===d.nodeType&&3===e.nodeType?void(d.firstChild===e&&a.endOffset===e.data.length&&d!==b.element&&"LI"!==d.nodeName&&"TD"!==d.nodeName&&a.setEndAfter(d)):e&&1===e.nodeType&&3===d.nodeType?void(e.firstChild===d&&0===a.startOffset&&e!==b.element&&"LI"!==e.nodeName&&"TD"!==e.nodeName&&a.setStartBefore(e)):d&&3===d.nodeType&&d===e&&1===d.parentNode.childNodes.length?void(a.endOffset==e.data.length&&0===a.startOffset&&(c=d.parentNode,c!==b.element&&"LI"!==c.nodeName&&"TD"!==c.nodeName&&(a.setStartBefore(c),a.setEndAfter(c)))):void 0}function p(b){for(var c,d,e,f,g,h,i=[],j=0,k=b.length;k>j;j++)if(1===b[j].startContainer.nodeType&&b[j].startContainer.matches("ul, ol")&&b[j].setStart(b[j].startContainer.childNodes[b[j].startOffset],0),1===b[j].endContainer.nodeType&&b[j].endContainer.matches("ul, ol")&&(h=b[j].endContainer.childNodes[Math.max(b[j].endOffset-1,0)],h.childNodes&&b[j].setEnd(h,h.childNodes.length)),c=b[j].getNodes([1],function(a){return"LI"===a.nodeName}),c.length>0){for(d=0,e=c.length;e>d;d++)g=b[j].compareNode(c[d]),(g===b[j].NODE_AFTER||g===b[j].NODE_INSIDE)&&(f=b[j].cloneRange(),h=a.dom.domNode(c[d]).prev({nodeTypes:[1]}),h?f.setEnd(h,h.childNodes.length):c[d].closest("ul, ol")?f.setEndBefore(c[d].closest("ul, ol")):f.setEndBefore(c[d]),i.push(f),b[j].setStart(c[d],0)),(g===b[j].NODE_BEFORE||g===b[j].NODE_INSIDE)&&(f=b[j].cloneRange(),f.setEnd(c[d],c[d].childNodes.length),i.push(f),h=a.dom.domNode(c[d]).next({nodeTypes:[1]}),h?b[j].setStart(h,0):c[d].closest("ul, ol")?b[j].setStartAfter(c[d].closest("ul, ol")):b[j].setStartAfter(c[d]));i.push(b[j])}else i.push(b[j]);return i}function q(b,c,d){var e=b?a.lang.object(b).clone(!0):null;return e&&(e.nodeName=e.nodeName||c||i(d)),e}function r(b,c,d,e){var f,h,i,l,m,n=c.startContainer,e=e||j(n,d.element,!0);if(e)h=b.firstChild,i=b.lastChild,d.selection.splitElementAtCaret(e,b),m=a.dom.domNode(i).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),l=a.dom.domNode(h).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),h&&!g(h,d)&&l&&!g(l,d)&&h.parentNode.insertBefore(d.doc.createElement("br"),h),i&&!g(i,d)&&m&&!g(m,d)&&m.parentNode.insertBefore(d.doc.createElement("br"),m);else if(f=k(n,d.element),f.outerNode&&f.innerNode&&f.parent){if(1===b.childNodes.length){for(;b.firstChild.firstChild;)f.innerNode.appendChild(b.firstChild.firstChild);b.firstChild.appendChild(f.outerNode)}d.selection.splitElementAtCaret(f.parent,b)}else{var o=b.firstChild,p=b.lastChild;c.insertNode(b),c.setStartBefore(o),c.setEndAfter(p)}}function s(b,d,e){for(var f,h,i=b.cloneRange(),j=c(i.startContainer,i.startOffset).previousSibling,k=c(i.endContainer,i.endOffset).nextSibling,l=i.extractContents(),m=e.doc.createDocumentFragment(),o=!0;l.firstChild;){if(1===l.firstChild.nodeType&&l.firstChild.matches(E)){n(l.firstChild),f=a.dom.unwrap(l.firstChild),f.length>0&&(m.lastChild&&(1!==m.lastChild.nodeType||!g(m.lastChild,e))||!m.lastChild&&j&&(1!==j.nodeType||g(j,e)))&&m.appendChild(e.doc.createElement("BR"));for(var p=0,q=f.length;q>p;p++)m.appendChild(f[p]);f.length>0&&(1===m.lastChild.nodeType&&g(m.lastChild,e)||(k||m.lastChild!==l.lastChild)&&m.appendChild(e.doc.createElement("BR")))}else m.appendChild(l.firstChild);o=!1}return h=a.lang.array(m.childNodes).get(),r(m,i,e),h}function t(b,c,e){var f=b&&a.dom.domNode(b).prev({nodeTypes:[1,3],ignoreBlankTexts:!0});d(c)&&c.parentNode.removeChild(c),!d(b)||f&&1===f.nodeType&&"block"===e.win.getComputedStyle(f).display||b.parentNode.removeChild(b)}function u(a,b,c){var e;a&&f(a)&&(a=a.previousSibling),b&&f(b)&&(b=b.nextSibling),e=a&&a.previousSibling,a&&(1!==a.nodeType||"block"!==c.win.getComputedStyle(a).display&&!d(a))&&a.parentNode&&a.parentNode.insertBefore(c.doc.createElement("br"),a.nextSibling),b&&(1!==b.nodeType||"block"!==c.win.getComputedStyle(b).display)&&b.parentNode&&b.parentNode.insertBefore(c.doc.createElement("br"),b)}function v(d,e,f,g){var h,i,k=e?b(e):null,m=d.cloneRange(),o=m.startContainer,p=c(m.startContainer,m.startOffset),s=c(m.endContainer,m.endOffset),u=m.startContainer!==p||3!==p.nodeType||G(p,m.startOffset)?a.dom.domNode(p).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}):p,v=1===m.endContainer.nodeType&&m.endContainer.childNodes[m.endOffset]===s&&(1===s.nodeType||!H(s,m.endOffset)&&!a.dom.domNode(s).is.rangyBookmark())||m.endContainer===s&&3===s.nodeType&&!H(s,m.endOffset)?s:a.dom.domNode(s).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),w=m.extractContents(),x=g.doc.createDocumentFragment(),y=k?a.dom.getParentElement(o,k,null,g.element):null,z=!f||!e||"BLOCKQUOTE"===e.nodeName&&"BLOCKQUOTE"===f,A=y||j(o,g.element,z);if(a.dom.domNode(v).is.rangyBookmark()&&(s=v,v=s.nextSibling),I(w),e&&"BLOCKQUOTE"===e.nodeName){var B=l(null,e,g);B.appendChild(w),x.appendChild(B),i=[B]}else{if(w.firstChild)for(;w.firstChild;)if(1==w.firstChild.nodeType&&w.firstChild.matches(E))l(w.firstChild,e,g),w.firstChild.matches(D)&&n(w.firstChild),x.appendChild(w.firstChild);else{for(h=l(null,q(e,f,g),g);w.firstChild&&(1!==w.firstChild.nodeType||!w.firstChild.matches(E));)1==w.firstChild.nodeType&&h.matches(D)&&n(w.firstChild),h.appendChild(w.firstChild);x.appendChild(h)}else x.appendChild(l(null,e,g));i=a.lang.array(x.childNodes).get()}return r(x,m,g,A),t(u,v,g),i.length>0&&("undefined"==typeof i[i.length-1].lastChild||a.dom.domNode(i[i.length-1].lastChild).is.rangyBookmark())&&i[i.length-1].appendChild(g.doc.createElement("br")),i}function w(b,c){var d=a.dom.getParentElement(b,{query:E},null,c.element);return d?d.nodeName:null}function x(b,c){var d,e=a.dom.getParentElement(b.selection.getOwnRanges()[0].startContainer,{query:D+", "+(c?c.toLowerCase():"div")},null,b.element);e?(d=b.selection.createRange(),d.selectNode(e),b.selection.setSelection(d)):b.isEmpty()||b.selection.selectLine()}function y(a,b){var c=b.selection.createRange(),d=a[a.length-1],e=1===d.nodeType&&d.childNodes?0|d.childNodes.length:d.length||0;c.setStart(a[0],0),c.setEnd(d,e),c.select()}function z(a,b,c){var d,e=b.selection.getOwnRanges(),f=[];e=p(e);for(var g=e.length;g--;)o(e[g],b),d=w(e[g].startContainer,b),f="remove"===a?f.concat(s(e[g],d,b)):f.concat(v(e[g],c,d,b));return f}function A(a){return"string"==typeof a&&(a={nodeName:a.toUpperCase()}),a}function B(b){var c;return b.selection.isCollapsed()&&(c=b.selection.getNodesNearCaret(),c&&c.caretNode&&(a.dom.domNode(c.caretNode).is.lineBreak()||3===c.caretNode.nodeType&&0===c.textOffset&&(!c.prevNode||a.dom.domNode(c.prevNode).is.lineBreak())||1===c.caretNode.nodeType&&c.caretNode.classList.contains("rangySelectionBoundary")&&(!c.prevNode||a.dom.domNode(c.prevNode).is.lineBreak()||a.dom.domNode(c.prevNode).is.block())&&(!c.nextNode||a.dom.domNode(c.nextNode).is.lineBreak()||a.dom.domNode(c.nextNode).is.block())))?!0:!1}var C=a.dom,D="h1, h2, h3, h4, h5, h6, p, pre",E="h1, h2, h3, h4, h5, h6, p, pre, div, blockquote",F="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",G=function(a,b){var c=a.data?a.data.slice(0,b):"";return/^\s*$/.test(c)},H=function(a,b){var c=a.data?a.data.slice(b):"";return/^\s*$/.test(c)},I=function(a){if(a){for(;a.firstChild&&3===a.firstChild.nodeType&&/^\s*$/.test(a.firstChild.data)&&a.lastChild!==a.firstChild;)a.removeChild(a.firstChild);for(;a.lastChild&&3===a.lastChild.nodeType&&/^\s*$/.test(a.lastChild.data)&&a.lastChild!==a.firstChild;)a.removeChild(a.lastChild);a.firstChild&&1===a.firstChild.nodeType&&"BR"===a.firstChild.nodeName&&a.lastChild!==a.firstChild&&a.removeChild(a.firstChild),a.lastChild&&1===a.lastChild.nodeType&&"BR"===a.lastChild.nodeName&&a.lastChild!==a.firstChild&&a.removeChild(a.lastChild)}};a.commands.formatBlock={exec:function(a,b,c){c=A(c);var d,e,f=[];if(c&&c.toggle&&(e=this.state(a,b,c)),e){d=rangy.saveSelection(a.win);for(var g=0,i=e.length;i>g;g++)m(e[g],c,a)}else a.selection.isCollapsed()&&(d=rangy.saveSelection(a.win),B(a)?a.selection.selectLine():x(a,c&&c.nodeName?c.nodeName.toUpperCase():void 0)),f=c?z("apply",a,c):z("remove",a);f=h(a,f),d?rangy.restoreSelection(d):y(f,a)},remove:function(a,b,c){c=A(c);var d,e;a.selection.isCollapsed()&&(e=rangy.saveSelection(a.win),x(a,c&&c.nodeName?c.nodeName.toUpperCase():void 0)),d=z("remove",a),d=h(a,d),e?rangy.restoreSelection(e):y(d,a)},state:function(b,c,d){d=A(d);for(var e,f=b.selection.filterElements(function(b){return a.dom.domNode(b).test(d||{query:E})}.bind(this)),g=b.selection.getSelectedOwnNodes(),h=0,i=g.length;i>h;h++)e=C.getParentElement(g[h],d||{query:E},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):(f.classRegExp&&(e.className=e.className.replace(f.classRegExp,"")),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.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(a,c){a.selection.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);0===g.length&&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){var d,e,f=rangy.saveSelection(c.win),g="_wysihtml5-temp-"+(new Date).getTime();c.commands.exec("formatBlock",{nodeName:"div",className:g});var h=c.element.querySelector("."+g);h.innerHTML=h.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),h&&(d=/^(\s|(
))+$/i.test(h.innerHTML),e=a.dom.convertToList(h,b.toLowerCase(),c.parent.config.classNames.uneditableContainer),f&&rangy.restoreSelection(f),d&&c.selection.selectNode(e.querySelector("li"),!0))};return{exec:function(b,f,h){var i,j,k=b.doc,l="OL"===h?"insertOrderedList":"insertUnorderedList",m=b.selection.getSelection(),n=1===m.anchorNode.nodeType&&m.anchorNode.firstChild?m.anchorNode.childNodes[m.anchorOffset]:m.anchorNode,o=1===m.focusNode.nodeType&&m.focusNode.firstChild?m.focusNode.childNodes[m.focusOffset]||m.focusNode.lastChild:m.focusNode;m.isBackwards()&&(n=[o,o=n][0]),a.dom.domNode(o).is.emptyTextNode(!0)&&o&&(o=a.dom.domNode(o).prev({nodeTypes:[1,3],ignoreBlankTexts:!0})),a.dom.domNode(n).is.emptyTextNode(!0)&&n&&(n=a.dom.domNode(n).next({nodeTypes:[1,3],ignoreBlankTexts:!0})),i=n&&o?n===o?n:a.dom.domNode(n).commonAncestor(o,b.element):b.selection.getSelectedNode(),j=c(i,h,b),j.el?j.other?e(j.el,h,b):d(j.el,h,b):b.commands.support(l)?k.execCommand(l,!1,null):g(h,b)},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){var b={styleProperty:"textAlign",styleValue:"justify",toggle:!0};a.commands.alignJustifyStyle={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",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()?"":"
"},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!==!1&&(a=this.parent.parse(a));try{this.element.innerHTML=a}catch(c){this.element.innerText=a}},cleanUp:function(a){var b;this.selection&&this.selection.isInThisEditable()&&(b=rangy.saveSelection(this.win)),this.parent.parse(this.element,void 0,a),b&&rangy.restoreSelection(b)},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),this._initAutoLinking(),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._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,!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.executeAndRestoreRangy(function(){e.config.useLineBreaks?((!c.firstChild||c.firstChild===c.lastChild&&1===c.firstChild.nodeType&&c.firstChild.classList.contains("rangySelectionBoundary"))&&c.appendChild(e.doc.createElement("br")),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"],function(){e.isEmpty()&&setTimeout(function(){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))},0)}),b.observe(this.element,"keydown",function(c){var h=c.keyCode;if(!(c.shiftKey||c.ctrlKey||c.defaultPrevented||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=b.domNode,d=a.browser,e={66:"bold",73:"italic",85:"underline"},f={addListeners:function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.addEventListener(b[d],c,!1)},removeListeners:function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.removeEventListener(b[d],c,!1)},fixLastBrDeletionInTable: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},handleUneditableDeletion: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(f.fixLastBrDeletionInTable(a,!0))return!0;try{var c=new CustomEvent("wysihtml5:uneditable:delete",{bubbles:!0,cancelable:!1});b.node.dispatchEvent(c)}catch(d){}return b.node.parentNode.removeChild(b.node),!0}return!1},fixDeleteInTheBeginningOfBlock:function(b){var d=b.selection,e=d.getPreviousNode();if(d.caretIsFirstInSelection()&&e&&1===e.nodeType&&/block/.test(b.win.getComputedStyle(e).display)&&!c(e).test({query:"ol, ul, table, tr, dl"})){if(/^\s*$/.test(e.textContent||e.innerText))return e.parentNode.removeChild(e),!0;if(e.lastChild){var f=e.lastChild,g=d.getSelectedNode(),h=c(e).commonAncestor(g,b.element),i=a.dom.getParentElement(g,{query:"h1, h2, h3, h4, h5, h6, p, pre, div, blockquote"},!1,h||b.element);if(i)return c(i).transferContentTo(e,!0),d.setAfter(f),!0}}return!1},fixDeleteInTheBeginningOfLi:function(b){if(a.browser.hasLiDeletingProblem()){var d,e,f=b.selection.getSelection(),g=f.anchorNode,h=b.selection.caretIsFirstInSelection();if(3===g.nodeType&&0===f.anchorOffset&&g===g.parentNode.firstChild&&(g=g.parentNode,h=!0),h&&g&&1===g.nodeType&&"LI"===g.nodeName&&(d=c(g).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),d||!g.parentNode||"UL"!==g.parentNode.nodeName&&"OL"!==g.parentNode.nodeName||(d=c(g.parentNode).prev({nodeTypes:[1,3],ignoreBlankTexts:!0})),d))return e=g.firstChild,c(g).transferContentTo(d,!0),e?b.selection.setBefore(e):d&&(1===d.nodeType?d.lastChild?b.selection.setAfter(d.lastChild):b.selection.selectNode(d):b.selection.setAfter(d)),!0}return!1},initTableHandling:function(){var b=function(){window.removeEventListener("load",b),this.doc.execCommand("enableObjectResizing",!1,"false"),this.doc.execCommand("enableInlineTableEditing",!1,"false")}.bind(this),c=function(){b.call(this),f.removeListeners(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?f.addListeners(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c):window.addEventListener("load",b)),this.tableSelection=a.quirks.tableCellsSelection(this.element,this.parent)},doLineBreaksModeEnterWithCaret:function(d){var e,f,g="p, pre, div, blockquote",h=!1;if(e=d.selection.getNodesNearCaret(),e&&((e.caretNode||e.nextNode)&&(f=b.getParentElement(e.caretNode||e.nextNode,{query:g},2),f===d.element&&(f=void 0)),f&&e.caretNode))if(c(e.caretNode).is.lineBreak()){if(d.config.doubleLineBreakEscapesBlock){h=!0,e.caretNode.parentNode.removeChild(e.caretNode),c(e.nextNode).is.lineBreak()&&e.nextNode.parentNode.removeChild(e.nextNode);var i=d.doc.createElement("br");c(e.nextNode).is.lineBreak()&&e.nextNode===f.lastChild?f.parentNode.insertBefore(i,f.nextSibling):d.selection.splitElementAtCaret(f,i),e.nextNode&&3===e.nextNode.nodeType&&(e.nextNode.data=e.nextNode.data.replace(/^ *[\r\n]+/,"")),d.selection.setBefore(i)}}else if(3===e.caretNode.nodeType&&a.browser.hasCaretBlockElementIssue()&&e.textOffset===e.caretNode.data.length&&!e.nextNode){h=!0;var j=d.doc.createElement("br"),k=d.doc.createElement("br"),l=d.doc.createDocumentFragment();l.appendChild(j),l.appendChild(k),d.selection.insertNode(l),d.selection.setBefore(k)}return h}},g=function(a,b){var c=b.selection;b.element;if(c.isCollapsed()){if(f.handleUneditableDeletion(b))return void a.preventDefault();if(f.fixDeleteInTheBeginningOfLi(b))return void a.preventDefault();if(f.fixDeleteInTheBeginningOfBlock(b))return void a.preventDefault();if(f.fixLastBrDeletionInTable(b))return void a.preventDefault()}else c.containsUneditable()&&(a.preventDefault(),c.deleteContents())},h=function(a,b){if(b.config.useLineBreaks&&!a.shiftKey&&!a.ctrlKey){b.selection.isCollapsed()&&f.doLineBreaksModeEnterWithCaret(b)&&a.preventDefault()}},i=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"," ")},j=function(a){this.domNodeRemovedInterval&&clearInterval(domNodeRemovedInterval),this.parent.fire("destroy:composer")},k=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)},l=function(a){this.parent.fire("focus",a).fire("focus:composer",a),setTimeout(function(){this.focusState=this.getValue(!1,!1)}.bind(this),0)},m=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)},n=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)},o=function(b){this.config.copyedFromMarking&&(a.browser.supportsModernPaste()&&(b.clipboardData.setData("text/html",this.config.copyedFromMarking+this.selection.getHtml()),b.clipboardData.setData("text/plain",this.selection.getPlainText()),b.preventDefault()),this.parent.fire(b.type,b).fire(b.type+":composer",b))},p=function(b){var c=b.keyCode;(c===a.SPACE_KEY||c===a.ENTER_KEY)&&this.parent.fire("newword:composer")},q=function(b){if(!d.canSelectImagesInContentEditable()){var c=b.target,e=this.element.querySelectorAll("img"),f=this.element.querySelectorAll("."+this.config.classNames.uneditableContainer+" img"),g=a.lang.array(e).without(f);"IMG"===c.nodeName&&a.lang.array(g).contains(c)&&this.selection.selectNode(c)}},r=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)}},s=function(a){d.canSelectImagesInContentEditable()||setTimeout(function(){this.selection.getSelection().removeAllRanges()}.bind(this),0)},t=function(b){var c,d,f=b.keyCode,j=e[f];return!b.ctrlKey&&!b.metaKey||b.altKey||65!==f?((b.ctrlKey||b.metaKey)&&!b.altKey&&j&&(this.commands.exec(j),b.preventDefault()),f===a.BACKSPACE_KEY&&g(b,this),(f===a.BACKSPACE_KEY||f===a.DELETE_KEY)&&(c=this.selection.getSelectedNode(!0),c&&"IMG"===c.nodeName&&(b.preventDefault(),d=c.parentNode,d.removeChild(c),"A"!==d.nodeName||d.firstChild||d.parentNode.removeChild(d),setTimeout(function(){a.quirks.redraw(this.element)}.bind(this),0))),this.config.handleTabKey&&f===a.TAB_KEY&&(b.preventDefault(),i(this,this.element,b.shiftKey)),void(f===a.ENTER_KEY&&h(b,this))):(this.selection.selectAll(),void b.preventDefault())};a.views.Composer.prototype.observeActions=f,a.views.Composer.prototype.observe=function(){var a=this.sandbox.getIframe?this.sandbox.getIframe():this.sandbox.getContentEditable(),c=(this.element,d.supportsEventsInIframeCorrectly()||this.sandbox.getContentEditable?this.element:this.sandbox.getWindow());this.focusState=this.getValue(!1,!1),a.addEventListener(["DOMNodeRemoved"],j.bind(this),!1),d.supportsMutationEvents()||(this.domNodeRemovedInterval=setInterval(function(){b.contains(document.documentElement,a)||j.call(this)},250)),this.config.handleTables&&f.initTableHandling.call(this),f.addListeners(c,["drop","paste","mouseup","focus","keyup"],k.bind(this)),c.addEventListener("focus",l.bind(this),!1),c.addEventListener("blur",m.bind(this),!1),f.addListeners(this.element,["drop","paste","beforepaste"],n.bind(this),!1),this.element.addEventListener("copy",o.bind(this),!1),this.element.addEventListener("mousedown",q.bind(this),!1),this.element.addEventListener("click",r.bind(this),!1),this.element.addEventListener("drop",s.bind(this),!1),this.element.addEventListener("keyup",p.bind(this),!1),this.element.addEventListener("keydown",t.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!==!1&&(a=this.parent.parse(a)),this.element.value=a},cleanUp:function(a){var b=this.parent.parse(this.element.value,void 0,a);this.element.value=b},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:{},b:{},i:{},u:{}},classes:{}},pasteParserRulesets:null,parser:a.dom.parse,useLineBreaks:!0,doubleLineBreakEscapesBlock:!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(a){this.currentView.cleanUp(a)},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()},destroy:function(){this.composer&&this.composer.sandbox&&this.composer.sandbox.destroy(),this.toolbar&&this.toolbar.destroy(),this.off()},parse:function(b,c,d){var e=this.config.contentEditableMode?document:this.composer?this.composer.sandbox.getDocument():null,f=this.config.parser(b,{rules:d||this.config.parserRules,cleanUp:this.config.cleanUp,context:e,uneditableClass:this.config.classNames.uneditableContainer,clearInternals:c});return"object"==typeof b&&a.quirks.redraw(b),f},_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._ownerDocumentClick=function(b){a.dom.contains(c.container,b.target)||a.dom.contains(c.composer.element,b.target)||(c._updateLinkStates(),c._preventInstantFocus())},this.container.ownerDocument.addEventListener("click",this._ownerDocumentClick,!1),this.editor.on("destroy:composer",this.destroy.bind(this)),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)})},destroy:function(){this.container.ownerDocument.removeEventListener("click",this._ownerDocumentClick,!1)},_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 1d2f708..2ef1a00 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","VOID_ELEMENTS","EMPTY_FUNCTION","ELEMENT_NODE","TEXT_NODE","BACKSPACE_KEY","ENTER_KEY","ESCAPE_KEY","SPACE_KEY","TAB_KEY","DELETE_KEY","polyfills","win","doc","nativeCustomEventSupported","p","CustomEvent","detail","foo","type","e","String","prototype","trim","rtrim","this","replace","s_add","s_rem","Element","on","fn","self","attachEvent","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","ELEMENT","matches","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","selector","element","elements","document","ownerDocument","querySelectorAll","index","closest","parentElement","createElement","testElement","classList","add","contains","createMethod","method","original","DOMTokenList","token","i","len","toggle","_toggle","force","view","classListProp","protoProp","elemCtrProto","objCtr","strTrim","arrIndexOf","item","DOMEx","message","name","code","DOMException","checkTokenAndGetIndex","test","ClassList","elem","trimmedClasses","getAttribute","classes","split","push","_updateClassName","setAttribute","classListProto","classListGetter","Error","tokens","l","updated","remove","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","parentNode","removeChild","getTextNodes","node","all","nextSibling","nodeType","isInDom","n","normalizeFix","nf","Node","texts","defaultView","anode","aoffset","aelement","undefined","fnode","focusNode","foffset","focusOffset","felement","prevTxt","shift","curText","nodeValue","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","DOCUMENT_POSITION_CONTAINS","previousSibling","F","removeEventListener","readyState","addEventListener","customEventSupported","params","bubbles","cancelable","evt","createEvent","initCustomEvent","Event","factory","root","define","amd","module","exports","rangy","isHostMethod","o","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","addInitListener","addShimListener","createMissingNativeApi","requiredModule","requiredModuleNames","createError","createCoreModule","rangePrototype","selectionPrototype","isHtmlNamespace","ns","namespaceURI","UNDEF","parent","getNodeIndex","getNodeLength","getCommonAncestor","node1","node2","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","nodes","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","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","eachRange","callMethodOnEachRange","results","changeEachRange","rangeBookmarks","rangeBookmark","selRanges","saveRanges","restoreRanges","rangeHtmls","getNativeTextRange","detachAll","Selection","docReady","loadHandler","require","defaultTokenizer","chars","wordOptions","createTokenRange","isWord","tokenRanges","wordStart","wordEnd","word","lastWordEnd","wordRegex","exec","includeTrailingSpace","nonLineBreakWhiteSpaceRegex","convertCharRangeToToken","tokenRange","tokenChars","tokenize","tokenizer","normalizeIgnoredCharacters","ignoredCharacters","ignoredChars","ignoredCharsArray","sort","char1","char2","charCodeAt","createWordOptions","language","defaultLanguage","defaultWordOptions","createNestedOptions","characterOptions","defaultCharacterOptions","getComputedDisplay","display","tableCssDisplayBlock","defaultDisplayValueForTag","isHidden","getAncestorsAndSelf","isVisibilityHiddenTextNode","isBlockNode","containsPositions","getAncestors","unshift","nextNodeDescendants","excludeChildren","previous","isWhitespaceNode","computedWhiteSpace","isCollapsedWhitespaceNode","isCollapsedNode","isIgnoredNode","Cache","store","createCachingGetter","objProperty","cache","cachedCount","uncachedCount","value","NodeWrapper","session","positions","Position","nodeWrapper","inspectPosition","startSession","endSession","currentSession","Session","getSession","createCharacterIterator","startPos","endPos","charPos","finished","previousVisible","nextVisible","previousTextPos","returnPreviousTextPos","character","getCharacter","rewind","dispose","createTokenizedTextProvider","consumeWord","forward","textChar","newChars","forwardIterator","backwardIterator","passedWordBoundary","insideWord","allWhiteSpaceRegex","forwardChars","backwardChars","reverse","forwardTokensBuffer","arrayIndexOf","backwardTokensBuffer","nextEndToken","lastToken","previousStartToken","movePositionBy","unit","count","currentPos","charIterator","nextPos","unitsMoved","newPos","absCount","abs","CHARACTER","WORD","tokenizedTextProvider","isLeadingSpace","isTrailingSpace","createRangeCharacterIterator","rangeStart","getRangeBoundaryPosition","rangeEnd","itStart","itEnd","getRangeCharacters","isWholeWord","expand","findTextFromPosition","initialPos","searchTerm","isRegex","searchScopeRange","findOptions","handleMatch","startIndex","endIndex","valid","wholeWordsOnly","currentChar","matchStartIndex","matchEndIndex","insideRegexMatch","caseSensitive","createEntryPointFunction","sessionRunning","createRangeBoundaryMover","moveOptions","defaultMoveOptions","boundaryIsStart","moveResult","createRangeTrimmer","trimCharCount","trimmed","createSelectionTrimmer","spacesRegex","spacesMinusLineBreaksRegex","trailingSpaceInBlockCollapses","trailingSpaceBeforeBrCollapses","trailingSpaceBeforeBlockCollapses","trailingSpaceBeforeLineBreakInPreLineCollapses","includeBlockContentTrailingSpace","includeSpaceBeforeBr","includeSpaceBeforeBlock","includePreLineTrailingSpace","ignoreCharacters","defaultCaretCharacterOptions","en","defaultFindOptions","withinRange","wrap","defaultExpandOptions","trimStart","trimEnd","defaultWordIteratorOptions","table","caption","colgroup","col","thead","tbody","tfoot","tr","td","th","key","nodeProto","getPosition","EMPTY","NON_SPACE","UNCOLLAPSIBLE_SPACE","COLLAPSIBLE_SPACE","TRAILING_SPACE_BEFORE_BLOCK","TRAILING_SPACE_IN_BLOCK","TRAILING_SPACE_BEFORE_BR","PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK","TRAILING_LINE_BREAK_AFTER_BR","INCLUDED_TRAILING_LINE_BREAK_AFTER_BR","getLength","isWhitespace","isCollapsedWhitespace","isIgnored","getTextNodeInfo","spaceRegex","collapseSpaces","cssWhitespace","preLine","hasInnerText","posAfterEl","firstPosInEl","prepopulateChar","isDefinitelyNonEmpty","isRenderedBlock","brs","getTrailingSpace","getNodeWrapper","getLeadingSpace","positionProto","characterType","isBr","prepopulatedChar","visibleChar","charType","finalizedChar","charAt","nodePassed","checkForTrailingSpace","checkForLeadingSpace","isCharInvariant","resolveLeadingAndTrailingSpaces","trailingSpace","leadingSpace","getPrecedingUncollapsedPosition","getPreviousPos","gotPreviousPos","previousPos","returnChar","thisChar","isIgnoredCharacter","cacheKey","cachedChar","collapsible","nextUncollapsed","nextOffset","previousOffset","createWrapperCache","nodeProperty","wrappersByProperty","wrapper","property","initCaches","uniqueIDSupported","elementCache","elementsCache","uniqueID","elWrapper","textNodeCache","otherNodeCache","wrapperCache","prefix","moveEnd","move","startTrimmed","endTrimmed","expandOptions","moved","endToken","newEndPos","startTokenizedTextProvider","startToken","newStartPos","endTokenizedTextProvider","selectCharacters","toCharacterRange","rangeStartsBeforeNode","rangeBetween","findText","searchTermParam","findResult","wrappedAround","pasteHtml","saveCharacterRanges","rangeInfos","characterRange","restoreCharacterRanges","saved","rangeInfo","createWordIterator","iteratorOptions","noMutation","createPosition","gEBI","getElementById","insertRangeBoundaryMarker","atStart","markerEl","markerId","Date","random","boundaryRange","style","lineHeight","className","markerTextChar","setRangeBoundary","compareRanges","saveRange","startMarkerId","endMarkerId","restoreRange","saveSelection","restored","restoreSelection","savedSelection","preserveDirection","removeMarkerElement","removeMarkers","Base","_instance","_static","_prototyping","proto","base","klass","_constructing","implement","valueOf","source","toSource","hidden","object","block","context","browser","iosVersion","userAgent","androidVersion","isIE","equation","re","rv","appName","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","canSelectImagesInContentEditable","autoScrollsToCaret","autoClosesUnclosedTags","clonedTestElement","supportsNativeGetElementsByClassName","getElementsByClassName","supportsSelectionModify","needsSpaceAfterLineBreak","supportsSpeechApiOn","input","chromeVersion","crashesWhenDefineProperty","doesAsyncFocus","hasProblemsSettingCaretAfterImg","hasLiDeletingProblem","hasUndoInContextMenu","hasInsertNodeIssue","hasIframeFocusIssue","createsNestedInvalidMarkupAfterPaste","hasCaretBlockElementIssue","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","parents","isBookmark","domNode","defaultNodeTypes","is","emptyTextNode","ignoreWhitespace","regx","visible","isVisible","getTextContent","voidElement","query","prev","prevNode","types","ignoreBlankTexts","commonAncestor","parents1","parents2","lastLeafNode","leafClasses","escapeParent","newWrapper","split2","nodeWrap","curNode","transferContentTo","targetNode","removeOldWrapper","properties","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","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","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","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","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","deleteRangeContents","startParent","endParent","ev","dispatchEvent","err","getPreviousNode","ignoreEmpty","getNodesNearCaret","caretNode","textOffset","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","lastEditorElement","canAppendChild","anchorNodeTagNameLower","voidElements","splitElementAtCaret","contentAfterRangeStart","surround","nodeOptions","cssStyle","scrollIntoView","tolerance","hasScrollBars","scrollHeight","_wysihtml5ScrollIntoViewElement","selectLine","_selectLine_W3C","getBoundingClientRect","_selectLineUniversal","includeRangyRangeHelpers","isHelperNode","initialBoundry","modify","toLineBoundary","location","getRangeRect","rect","testNode","amount","testRect","found","isLineBreakingElement","pnode","bottom","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","getAncestorWithClass","cssClassMatch","getAncestorWithStyle","cssStyleMatch","getMatchingAncestor","matchType","postApply","currentMerge","precedingTextNode","lastNode","merges","rangeStartNode","rangeEndNode","rangeStartOffset","rangeEndOffset","getAdjacentMergeableTextNode","nextTextNode","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","getRangeNode","isBlock","isLineBreaking","cleanup","newBlockElements","nbIdx","allElements","BLOCK_ELEMENTS","noEditQuery","classNames","uneditableContainer","defaultNodeName","findOuterBlock","allBlocks","UNNESTABLE_BLOCK_ELEMENTS","cloneOuterInlines","innerNode","INLINE_ELEMENTS","outerNode","applyOptionsToElement","removeOptionsFromElement","unwrapped","applySurroundingLineBreaks","unwrapBlocksFromContent","nextEl","prevEl","blocks","fixRangeCoverage","fixNotPermittedInsertionPoints","lis","maxj","rangePos","closestLI","newRanges","getOptionsWithNodename","defaultName","correctedOptions","injectFragmentToRange","firstOuterBlock","outerInlines","first","last","rangeStartContainer","clearRangeBlockFromating","closestBlockName","removeSurroundingLineBreaks","prevPrev","wrapRangeWithElement","similarOptions","isWhitespaceBefore","isWhitespaceAfter","similarOuterBlock","splitAllBlocks","trimBlankTextsAndBreaks","tmpEl","getParentBlockNodeName","expandCaretToBlock","insertingNodeName","selectElements","lastEl","lastOffset","formatSelection","parseOptions","caretIsOnEmptyLine","caretInfo","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","searchNodes","partial","caretIsInsideWord","beforeChar","afterChar","getRangeForWord","offsetStart","offsetEnd","txtNodes","wordOffset","mergeContents","mergeConsequentSimilarElements","cleanupAndSetSelection","cleanupAndSetCaret","formatTextNode","wrapNode","unformatTextNode","newWrapNode","removeFormatFromTextNode","formatTextRange","updateFormat","wordObj","exactState","removeFormat","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","alignJustifyStyle","redo","undoManager","underline","undo","createTable","cols","rows","tableStyle","mergeTableCells","tableSelection","addTableCells","tableSelect","deleteTableCells","selCell","indentList","listEls","tryToPushLiLevel","liNodes","listTag","prevLi","liNode","prevLiList","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","editableElement","textarea","contentEditableMode","_initContentEditableArea","_initSandbox","_displayStyle","disabled","setToEnd","pageYOffset","pageXOffset","scrollTo","_create","_createWysiwygFormField","form","hiddenField","_initAutoLinking","placeholder","_initObjectResizing","_initUndoManager","_initLineBreaking","initSync","sync","supportsDisablingOfAutoLinking","supportsAutoLinking","nodeWithSelection","isInUneditable","links","urlRegExp","newTextContent","propertiesLength","adjust","USE_NATIVE_LINE_BREAK_INSIDE_TAGS","LIST_TAGS","defaultPrevented","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","fixDeleteInTheBeginningOfBlock","selNode","commonAncestorNode","fixDeleteInTheBeginningOfLi","isInBeginnig","handleDeleteKeyPress","handleEnterKeyPress","breakNodes","doubleLineBreakEscapesBlock","brNode","br1","br2","handleTabKeyDown","handleDomNodeRemoved","domNodeRemovedInterval","clearInterval","handleUserInteraction","handleFocus","focusState","handleBlur","changeevent","create","handlePaste","handleCopy","copyedFromMarking","setData","handleKeyUp","allImages","notMyImages","myImages","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","u","pasteParserRulesets","parser","supportTouchDevices","Editor","_isCompatible","_initParser","handleBeforeLoad","sourceView","synchronizer","Toolbar","isCompatible","htmlOrElement","customRules","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","_ownerDocumentClick","displayDialogAttributeValue","actionMapping","dataset","showdialogonselection","Dialog_createTable","Dialog_foreColorStyle","colourMode","firstElement","colourStr","colour","colormode","Dialog_fontSizeStyle"],"mappings":";;AAWA,GAAIA,YACFC,QAAS,QAGTC,YACAC,OACAC,UACAC,WACAC,QACAC,aACAC,SAEAC,gBAAiB,SACjBC,wBAAyB,UAEzBC,cAAe,4FAEfC,eAAgB,aAEhBC,aAAc,EACdC,UAAc,EAEdC,cAAgB,EAChBC,UAAgB,GAChBC,WAAgB,GAChBC,UAAgB,GAChBC,QAAgB,EAChBC,WAAgB,GAEjBpB,WAAUqB,UAAY,SAASC,EAAKC,GAkenC,QAASC,KACP,IACE,GAAIC,GAAI,GAAIC,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rBuE,GAAc9D,EAAM0D,QAAQQ,WAAa,OAAO/rE,cAChD2rE,EAA4B,QAAfA,EAAuB,OAASA,EAEzCG,EACFjE,EAAMvjD,MAAQw7B,EAAYO,aAAayrB,EAAQH,GAE/C9D,EAAMvjD,MAAQw7B,EAAYO,cAAc,EAAG,EAAG,GAAIsrB,SAO3D18E,WACF,SAAUA,GACqBA,EAAUG,GAIxCH,GAAUK,QAAQ08E,qBAAuB/8E,EAAUK,QAAQ+3E,OAAOrlE,QAChEqnE,aAAa,EAEb7B,WAAY,WACV,OAAQxY,KAAS59D,KAAKwc,UAAUipB,cAAc,wCAAwCvS,QAGxFqjD,aAAc,SAASC,GACrB,GAAIG,GAAiB/yE,SAAS6hC,cAAc,UACxCgxC,EAAiBz2E,KAAKwc,UAAUipB,cAAc,wCAC9C+0C,EAAkBx6E,KAAoB,gBAAMnC,EAAUM,KAAK6lC,OAAOhkC,KAAK42E,iBAAiB/0E,UAAa7B,KAAK42E,gBAAgB,GAAK52E,KAAK42E,gBAAmB,KACvJhrB,EAAiB,EAAiB4uB,EAAar0E,aAAa,SAAW,KACvEy3D,EAAiB,EAAa//D,EAAUI,OAAOywD,YAAYU,cAAcxD,GAAY,IAErF6qB,IAASA,IAAUE,GAAkB/Y,IAAS,QAAU73D,KAAK63D,KAC/D6Y,EAAMvjD,MAAQ0qC,OAInB//D"}
\ 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","VOID_ELEMENTS","EMPTY_FUNCTION","ELEMENT_NODE","TEXT_NODE","BACKSPACE_KEY","ENTER_KEY","ESCAPE_KEY","SPACE_KEY","TAB_KEY","DELETE_KEY","polyfills","win","doc","nativeCustomEventSupported","p","CustomEvent","detail","foo","type","e","String","prototype","trim","rtrim","this","replace","s_add","s_rem","Element","on","fn","self","attachEvent","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","ELEMENT","matches","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","selector","element","elements","document","ownerDocument","querySelectorAll","index","closest","parentElement","createElement","testElement","classList","add","contains","createMethod","method","original","DOMTokenList","token","i","len","toggle","_toggle","force","view","classListProp","protoProp","elemCtrProto","objCtr","strTrim","arrIndexOf","item","DOMEx","message","name","code","DOMException","checkTokenAndGetIndex","test","ClassList","elem","trimmedClasses","getAttribute","classes","split","push","_updateClassName","setAttribute","classListProto","classListGetter","Error","tokens","l","updated","remove","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","parentNode","removeChild","getTextNodes","node","all","nextSibling","nodeType","isInDom","n","normalizeFix","nf","Node","texts","defaultView","anode","aoffset","aelement","undefined","fnode","focusNode","foffset","focusOffset","felement","prevTxt","shift","curText","nodeValue","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","DOCUMENT_POSITION_CONTAINS","previousSibling","F","removeEventListener","readyState","addEventListener","customEventSupported","params","bubbles","cancelable","evt","createEvent","initCustomEvent","Event","factory","root","define","amd","module","exports","rangy","isHostMethod","o","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","addInitListener","addShimListener","createMissingNativeApi","requiredModule","requiredModuleNames","createError","createCoreModule","rangePrototype","selectionPrototype","isHtmlNamespace","ns","namespaceURI","UNDEF","parent","getNodeIndex","getNodeLength","getCommonAncestor","node1","node2","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","nodes","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","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","eachRange","callMethodOnEachRange","results","changeEachRange","rangeBookmarks","rangeBookmark","selRanges","saveRanges","restoreRanges","rangeHtmls","getNativeTextRange","detachAll","Selection","docReady","loadHandler","require","defaultTokenizer","chars","wordOptions","createTokenRange","isWord","tokenRanges","wordStart","wordEnd","word","lastWordEnd","wordRegex","exec","includeTrailingSpace","nonLineBreakWhiteSpaceRegex","convertCharRangeToToken","tokenRange","tokenChars","tokenize","tokenizer","normalizeIgnoredCharacters","ignoredCharacters","ignoredChars","ignoredCharsArray","sort","char1","char2","charCodeAt","createWordOptions","language","defaultLanguage","defaultWordOptions","createNestedOptions","characterOptions","defaultCharacterOptions","getComputedDisplay","display","tableCssDisplayBlock","defaultDisplayValueForTag","isHidden","getAncestorsAndSelf","isVisibilityHiddenTextNode","isBlockNode","containsPositions","getAncestors","unshift","nextNodeDescendants","excludeChildren","previous","isWhitespaceNode","computedWhiteSpace","isCollapsedWhitespaceNode","isCollapsedNode","isIgnoredNode","Cache","store","createCachingGetter","objProperty","cache","cachedCount","uncachedCount","value","NodeWrapper","session","positions","Position","nodeWrapper","inspectPosition","startSession","endSession","currentSession","Session","getSession","createCharacterIterator","startPos","endPos","charPos","finished","previousVisible","nextVisible","previousTextPos","returnPreviousTextPos","character","getCharacter","rewind","dispose","createTokenizedTextProvider","consumeWord","forward","textChar","newChars","forwardIterator","backwardIterator","passedWordBoundary","insideWord","allWhiteSpaceRegex","forwardChars","backwardChars","reverse","forwardTokensBuffer","arrayIndexOf","backwardTokensBuffer","nextEndToken","lastToken","previousStartToken","movePositionBy","unit","count","currentPos","charIterator","nextPos","unitsMoved","newPos","absCount","abs","CHARACTER","WORD","tokenizedTextProvider","isLeadingSpace","isTrailingSpace","createRangeCharacterIterator","rangeStart","getRangeBoundaryPosition","rangeEnd","itStart","itEnd","getRangeCharacters","isWholeWord","expand","findTextFromPosition","initialPos","searchTerm","isRegex","searchScopeRange","findOptions","handleMatch","startIndex","endIndex","valid","wholeWordsOnly","currentChar","matchStartIndex","matchEndIndex","insideRegexMatch","caseSensitive","createEntryPointFunction","sessionRunning","createRangeBoundaryMover","moveOptions","defaultMoveOptions","boundaryIsStart","moveResult","createRangeTrimmer","trimCharCount","trimmed","createSelectionTrimmer","spacesRegex","spacesMinusLineBreaksRegex","trailingSpaceInBlockCollapses","trailingSpaceBeforeBrCollapses","trailingSpaceBeforeBlockCollapses","trailingSpaceBeforeLineBreakInPreLineCollapses","includeBlockContentTrailingSpace","includeSpaceBeforeBr","includeSpaceBeforeBlock","includePreLineTrailingSpace","ignoreCharacters","defaultCaretCharacterOptions","en","defaultFindOptions","withinRange","wrap","defaultExpandOptions","trimStart","trimEnd","defaultWordIteratorOptions","table","caption","colgroup","col","thead","tbody","tfoot","tr","td","th","key","nodeProto","getPosition","EMPTY","NON_SPACE","UNCOLLAPSIBLE_SPACE","COLLAPSIBLE_SPACE","TRAILING_SPACE_BEFORE_BLOCK","TRAILING_SPACE_IN_BLOCK","TRAILING_SPACE_BEFORE_BR","PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK","TRAILING_LINE_BREAK_AFTER_BR","INCLUDED_TRAILING_LINE_BREAK_AFTER_BR","getLength","isWhitespace","isCollapsedWhitespace","isIgnored","getTextNodeInfo","spaceRegex","collapseSpaces","cssWhitespace","preLine","hasInnerText","posAfterEl","firstPosInEl","prepopulateChar","isDefinitelyNonEmpty","isRenderedBlock","brs","getTrailingSpace","getNodeWrapper","getLeadingSpace","positionProto","characterType","isBr","prepopulatedChar","visibleChar","charType","finalizedChar","charAt","nodePassed","checkForTrailingSpace","checkForLeadingSpace","isCharInvariant","resolveLeadingAndTrailingSpaces","trailingSpace","leadingSpace","getPrecedingUncollapsedPosition","getPreviousPos","gotPreviousPos","previousPos","returnChar","thisChar","isIgnoredCharacter","cacheKey","cachedChar","collapsible","nextUncollapsed","nextOffset","previousOffset","createWrapperCache","nodeProperty","wrappersByProperty","wrapper","property","initCaches","uniqueIDSupported","elementCache","elementsCache","uniqueID","elWrapper","textNodeCache","otherNodeCache","wrapperCache","prefix","moveEnd","move","startTrimmed","endTrimmed","expandOptions","moved","endToken","newEndPos","startTokenizedTextProvider","startToken","newStartPos","endTokenizedTextProvider","selectCharacters","toCharacterRange","rangeStartsBeforeNode","rangeBetween","findText","searchTermParam","findResult","wrappedAround","pasteHtml","saveCharacterRanges","rangeInfos","characterRange","restoreCharacterRanges","saved","rangeInfo","createWordIterator","iteratorOptions","noMutation","createPosition","gEBI","getElementById","insertRangeBoundaryMarker","atStart","markerEl","markerId","Date","random","boundaryRange","style","lineHeight","className","markerTextChar","setRangeBoundary","compareRanges","saveRange","startMarkerId","endMarkerId","restoreRange","saveSelection","restored","restoreSelection","savedSelection","preserveDirection","removeMarkerElement","removeMarkers","Base","_instance","_static","_prototyping","proto","base","klass","_constructing","implement","valueOf","source","toSource","hidden","object","block","context","browser","iosVersion","userAgent","androidVersion","isIE","equation","re","rv","appName","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","canSelectImagesInContentEditable","autoScrollsToCaret","autoClosesUnclosedTags","clonedTestElement","supportsNativeGetElementsByClassName","getElementsByClassName","supportsSelectionModify","needsSpaceAfterLineBreak","supportsSpeechApiOn","input","chromeVersion","crashesWhenDefineProperty","doesAsyncFocus","hasProblemsSettingCaretAfterImg","hasLiDeletingProblem","hasUndoInContextMenu","hasInsertNodeIssue","hasIframeFocusIssue","createsNestedInvalidMarkupAfterPaste","hasCaretBlockElementIssue","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","parents","domNode","defaultNodeTypes","is","emptyTextNode","ignoreWhitespace","regx","rangyBookmark","visible","isVisible","getTextContent","voidElement","query","prev","prevNode","types","ignoreBlankTexts","commonAncestor","parents1","parents2","lastLeafNode","leafClasses","escapeParent","newWrapper","split2","nodeWrap","curNode","transferContentTo","targetNode","removeOldWrapper","properties","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","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","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","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","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","deleteRangeContents","startParent","endParent","ev","dispatchEvent","err","getPreviousNode","ignoreEmpty","getNodesNearCaret","caretNode","textOffset","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","lastEditorElement","canAppendChild","anchorNodeTagNameLower","voidElements","splitElementAtCaret","contentAfterRangeStart","surround","nodeOptions","cssStyle","scrollIntoView","tolerance","hasScrollBars","scrollHeight","_wysihtml5ScrollIntoViewElement","selectLine","_selectLine_W3C","getBoundingClientRect","_selectLineUniversal","includeRangyRangeHelpers","isHelperNode","initialBoundry","modify","toLineBoundary","location","getRangeRect","rect","testNode","amount","testRect","found","isLineBreakingElement","pnode","bottom","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","getAncestorWithClass","cssClassMatch","getAncestorWithStyle","cssStyleMatch","getMatchingAncestor","matchType","postApply","currentMerge","precedingTextNode","lastNode","merges","rangeStartNode","rangeEndNode","rangeStartOffset","rangeEndOffset","getAdjacentMergeableTextNode","nextTextNode","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","getRangeNode","isBlock","isBookmark","isLineBreaking","cleanup","newBlockElements","nbIdx","allElements","BLOCK_ELEMENTS","noEditQuery","classNames","uneditableContainer","defaultNodeName","findOuterBlock","allBlocks","UNNESTABLE_BLOCK_ELEMENTS","cloneOuterInlines","innerNode","INLINE_ELEMENTS","outerNode","applyOptionsToElement","removeOptionsFromElement","unwrapped","applySurroundingLineBreaks","unwrapBlocksFromContent","nextEl","prevEl","blocks","fixRangeCoverage","fixNotPermittedInsertionPoints","lis","maxj","rangePos","closestLI","newRanges","getOptionsWithNodename","defaultName","correctedOptions","injectFragmentToRange","firstOuterBlock","outerInlines","first","last","rangeStartContainer","fc","lc","clearRangeBlockFromating","closestBlockName","removeSurroundingLineBreaks","prevPrev","wrapRangeWithElement","similarOptions","isWhitespaceBefore","isWhitespaceAfter","similarOuterBlock","splitAllBlocks","trimBlankTextsAndBreaks","tmpEl","getParentBlockNodeName","expandCaretToBlock","insertingNodeName","selectElements","lastEl","lastOffset","formatSelection","parseOptions","caretIsOnEmptyLine","caretInfo","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","searchNodes","partial","caretIsInsideWord","beforeChar","afterChar","getRangeForWord","offsetStart","offsetEnd","txtNodes","wordOffset","mergeContents","mergeConsequentSimilarElements","cleanupAndSetSelection","cleanupAndSetCaret","formatTextNode","wrapNode","unformatTextNode","newWrapNode","removeFormatFromTextNode","formatTextRange","updateFormat","wordObj","exactState","removeFormat","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","alignJustifyStyle","redo","undoManager","underline","undo","createTable","cols","rows","tableStyle","mergeTableCells","tableSelection","addTableCells","tableSelect","deleteTableCells","selCell","indentList","listEls","tryToPushLiLevel","liNodes","listTag","prevLi","liNode","prevLiList","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","editableElement","textarea","contentEditableMode","_initContentEditableArea","_initSandbox","_displayStyle","disabled","setToEnd","pageYOffset","pageXOffset","scrollTo","_create","_createWysiwygFormField","form","hiddenField","_initAutoLinking","placeholder","_initObjectResizing","_initUndoManager","_initLineBreaking","initSync","sync","supportsDisablingOfAutoLinking","supportsAutoLinking","nodeWithSelection","isInUneditable","links","urlRegExp","newTextContent","propertiesLength","adjust","USE_NATIVE_LINE_BREAK_INSIDE_TAGS","LIST_TAGS","defaultPrevented","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","actions","addListeners","removeListeners","fixLastBrDeletionInTable","aNode","handleUneditableDeletion","fixDeleteInTheBeginningOfBlock","selNode","commonAncestorNode","fixDeleteInTheBeginningOfLi","isInBeginnig","initTableHandling","hideHandlers","iframeInitiator","doLineBreaksModeEnterWithCaret","breakNodes","doubleLineBreakEscapesBlock","brNode","br1","br2","handleDeleteKeyPress","handleEnterKeyPress","handleTabKeyDown","handleDomNodeRemoved","domNodeRemovedInterval","clearInterval","handleUserInteraction","handleFocus","focusState","handleBlur","changeevent","create","handlePaste","handleCopy","copyedFromMarking","setData","handleKeyUp","allImages","notMyImages","myImages","handleClick","uneditable","handleDrop","handleKeyDown","handleTabKey","observeActions","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","u","pasteParserRulesets","parser","supportTouchDevices","Editor","_isCompatible","_initParser","handleBeforeLoad","sourceView","synchronizer","Toolbar","isCompatible","htmlOrElement","customRules","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","_ownerDocumentClick","displayDialogAttributeValue","actionMapping","dataset","showdialogonselection","Dialog_createTable","Dialog_foreColorStyle","colourMode","firstElement","colourStr","colour","colormode","Dialog_fontSizeStyle"],"mappings":";;AAWA,GAAIA,YACFC,QAAS,QAGTC,YACAC,OACAC,UACAC,WACAC,QACAC,aACAC,SAEAC,gBAAiB,SACjBC,wBAAyB,UAEzBC,cAAe,4FAEfC,eAAgB,aAEhBC,aAAc,EACdC,UAAc,EAEdC,cAAgB,EAChBC,UAAgB,GAChBC,WAAgB,GAChBC,UAAgB,GAChBC,QAAgB,EAChBC,WAAgB,GAEjBpB,WAAUqB,UAAY,SAASC,EAAKC,GAkenC,QAASC,KAC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B,cAAc,wCAC9Cq1C,EAAkB96E,KAAoB,gBAAMnC,EAAUM,KAAK6lC,OAAOhkC,KAAKk3E,iBAAiBr1E,UAAa7B,KAAKk3E,gBAAgB,GAAKl3E,KAAKk3E,gBAAmB,KACvJtrB,EAAiB,EAAiBkvB,EAAa30E,aAAa,SAAW,KACvEy3D,EAAiB,EAAa//D,EAAUI,OAAOywD,YAAYU,cAAcxD,GAAY,IAErFmrB,IAASA,IAAUE,GAAkBrZ,IAAS,QAAU73D,KAAK63D,KAC/DmZ,EAAM7jD,MAAQ0qC,OAInB//D"}
\ No newline at end of file
diff --git a/dist/wysihtml.js b/dist/wysihtml.js
index 0349ffe..9c8bfe5 100644
--- a/dist/wysihtml.js
+++ b/dist/wysihtml.js
@@ -1,5 +1,5 @@
/**
- * @license wysihtml v0.5.3
+ * @license wysihtml v0.5.4
* https://github.com/Voog/wysihtml
*
* Author: Christopher Blum (https://github.com/tiff)
@@ -10,7 +10,7 @@
*
*/
var wysihtml5 = {
- version: "0.5.3",
+ version: "0.5.4",
// namespaces
commands: {},
@@ -7938,11 +7938,6 @@ wysihtml5.dom.copyAttributes = function(attributesToCopy) {
return nodes;
}
- // Returns if node is the rangy selection bookmark element (that must not be taken into account in most situatons and is removed on selection restoring)
- function isBookmark(n) {
- return n && n.nodeType === 1 && n.classList.contains('rangySelectionBoundary');
- }
-
wysihtml5.dom.domNode = function(node) {
var defaultNodeTypes = [wysihtml5.ELEMENT_NODE, wysihtml5.TEXT_NODE];
@@ -7951,7 +7946,12 @@ wysihtml5.dom.copyAttributes = function(attributesToCopy) {
is: {
emptyTextNode: function(ignoreWhitespace) {
var regx = ignoreWhitespace ? (/^\s*$/g) : (/^[\r\n]*$/g);
- return node.nodeType === wysihtml5.TEXT_NODE && (regx).test(node.data);
+ return node && node.nodeType === wysihtml5.TEXT_NODE && (regx).test(node.data);
+ },
+
+ // Returns if node is the rangy selection bookmark element (that must not be taken into account in most situatons and is removed on selection restoring)
+ rangyBookmark: function() {
+ return node && node.nodeType === 1 && node.classList.contains('rangySelectionBoundary');
},
visible: function() {
@@ -7990,7 +7990,7 @@ wysihtml5.dom.copyAttributes = function(attributesToCopy) {
}
if (
- isBookmark(prevNode) || // is Rangy temporary boomark element (bypass)
+ wysihtml5.dom.domNode(prevNode).is.rangyBookmark() || // is Rangy temporary boomark element (bypass)
(!wysihtml5.lang.array(types).contains(prevNode.nodeType)) || // nodeTypes check.
(options && options.ignoreBlankTexts && wysihtml5.dom.domNode(prevNode).is.emptyTextNode(true)) // Blank text nodes bypassed if set
) {
@@ -8010,7 +8010,7 @@ wysihtml5.dom.copyAttributes = function(attributesToCopy) {
}
if (
- isBookmark(nextNode) || // is Rangy temporary boomark element (bypass)
+ wysihtml5.dom.domNode(nextNode).is.rangyBookmark() || // is Rangy temporary boomark element (bypass)
(!wysihtml5.lang.array(types).contains(nextNode.nodeType)) || // nodeTypes check.
(options && options.ignoreBlankTexts && wysihtml5.dom.domNode(nextNode).is.emptyTextNode(true)) // blank text nodes bypassed if set
) {
@@ -11762,7 +11762,7 @@ wysihtml5.quirks.ensureProperClearing = (function() {
}
};
- blankNode.appendChild(document.createTextNode(wysihtml5.INVISIBLE_SPACE));
+ blankNode.appendChild(container.ownerDocument.createTextNode(wysihtml5.INVISIBLE_SPACE));
blankNode.className = '_wysihtml5-temp-caret-fix';
blankNode.style.display = 'block';
blankNode.style.minWidth = '1px';
@@ -12198,10 +12198,17 @@ wysihtml5.quirks.ensureProperClearing = (function() {
nextNode = caretNode.nextSibling;
}
} else {
- caretNode = r[0].startContainer;
+ if (r[0].startOffset === 0 && r[0].startContainer.previousSibling) {
+ caretNode = r[0].startContainer.previousSibling;
+ if (caretNode.nodeType === 3) {
+ offset = caretNode.data.length;
+ }
+ } else {
+ caretNode = r[0].startContainer;
+ offset = r[0].startOffset;
+ }
prevNode = caretNode.previousSibling;
nextNode = caretNode.nextSibling;
- offset = r[0].startOffset;
}
return {
@@ -12647,8 +12654,8 @@ wysihtml5.quirks.ensureProperClearing = (function() {
if (wysihtml5.browser.supportsSelectionModify()) {
this._selectLine_W3C();
} else if (r.nativeRange && r.nativeRange.getBoundingClientRect) {
- // For IE Edge as it ditched the old api and did not fully implement the new one (as expected)*/
- this._selectLineUniversal();
+ // For IE Edge as it ditched the old api and did not fully implement the new one (as expected)
+ this._selectLineUniversal();
}
},
@@ -12664,7 +12671,6 @@ wysihtml5.quirks.ensureProperClearing = (function() {
} else {
return node.data && node.data.length || 0;
}
- // body...
},
anode = s.anchorNode.nodeType === 1 ? s.anchorNode.childNodes[s.anchorOffset] : s.anchorNode,
fnode = s.focusNode.nodeType === 1 ? s.focusNode.childNodes[s.focusOffset] : s.focusNode;
@@ -12773,7 +12779,16 @@ wysihtml5.quirks.ensureProperClearing = (function() {
r.moveEnd('character', 1);
} else if (r.startContainer.nodeType === 1 && r.startContainer.childNodes[r.startOffset] && r.startContainer.childNodes[r.startOffset].nodeType === 3 && r.startContainer.childNodes[r.startOffset].data.length > 0) {
r.moveEnd('character', 1);
- } else if (r.startOffset > 0 && ( r.startContainer.nodeType === 3 || (r.startContainer.nodeType === 1 && !isLineBreakingElement(prevNode(r.startContainer.childNodes[r.startOffset - 1]))))) {
+ } else if (
+ r.startOffset > 0 &&
+ (
+ r.startContainer.nodeType === 3 ||
+ (
+ r.startContainer.nodeType === 1 &&
+ !isLineBreakingElement(prevNode(r.startContainer.childNodes[r.startOffset - 1]))
+ )
+ )
+ ) {
r.moveStart('character', -1);
}
}
@@ -12783,6 +12798,7 @@ wysihtml5.quirks.ensureProperClearing = (function() {
// Is probably just empty line as can not be expanded
rect = r.nativeRange.getBoundingClientRect();
+ // If startnode is not line break allready move the start position of range by -1 character until clientRect top changes;
do {
amount = r.moveStart('character', -1);
testRect = r.nativeRange.getBoundingClientRect();
@@ -12793,31 +12809,31 @@ wysihtml5.quirks.ensureProperClearing = (function() {
}
count++;
} while (amount !== 0 && !found && count < 2000);
-
count = 0;
found = false;
rect = r.nativeRange.getBoundingClientRect();
- do {
- amount = r.moveEnd('character', 1);
- testRect = r.nativeRange.getBoundingClientRect();
- if (!testRect || Math.floor(testRect.bottom) !== Math.floor(rect.bottom)) {
- r.moveEnd('character', -1);
-
- // Fix a IE line end marked by linebreak element although caret is before it
- // If causes problems should be changed to be applied only to IE
- if (r.endContainer && r.endContainer.nodeType === 1 && r.endContainer.childNodes[r.endOffset] && r.endContainer.childNodes[r.endOffset].nodeType === 1 && r.endContainer.childNodes[r.endOffset].nodeName === "BR" && r.endContainer.childNodes[r.endOffset].previousSibling) {
- if (r.endContainer.childNodes[r.endOffset].previousSibling.nodeType === 1) {
- r.setEnd(r.endContainer.childNodes[r.endOffset].previousSibling, r.endContainer.childNodes[r.endOffset].previousSibling.childNodes.length);
- } else if (r.endContainer.childNodes[r.endOffset].previousSibling.nodeType === 3) {
- r.setEnd(r.endContainer.childNodes[r.endOffset].previousSibling, r.endContainer.childNodes[r.endOffset].previousSibling.data.length);
+
+ if (r.endContainer !== this.contain || (this.contain.lastChild && this.contain.childNodes[r.endOffset] !== this.contain.lastChild)) {
+ do {
+ amount = r.moveEnd('character', 1);
+ testRect = r.nativeRange.getBoundingClientRect();
+ if (!testRect || Math.floor(testRect.bottom) !== Math.floor(rect.bottom)) {
+ r.moveEnd('character', -1);
+
+ // Fix a IE line end marked by linebreak element although caret is before it
+ // If causes problems should be changed to be applied only to IE
+ if (r.endContainer && r.endContainer.nodeType === 1 && r.endContainer.childNodes[r.endOffset] && r.endContainer.childNodes[r.endOffset].nodeType === 1 && r.endContainer.childNodes[r.endOffset].nodeName === "BR" && r.endContainer.childNodes[r.endOffset].previousSibling) {
+ if (r.endContainer.childNodes[r.endOffset].previousSibling.nodeType === 1) {
+ r.setEnd(r.endContainer.childNodes[r.endOffset].previousSibling, r.endContainer.childNodes[r.endOffset].previousSibling.childNodes.length);
+ } else if (r.endContainer.childNodes[r.endOffset].previousSibling.nodeType === 3) {
+ r.setEnd(r.endContainer.childNodes[r.endOffset].previousSibling, r.endContainer.childNodes[r.endOffset].previousSibling.data.length);
+ }
}
+ found = true;
}
-
- found = true;
- }
- count++;
- } while (amount !== 0 && !found && count < 2000);
-
+ count++;
+ } while (amount !== 0 && !found && count < 2000);
+ }
r.select();
this.includeRangyRangeHelpers();
},
@@ -14159,7 +14175,7 @@ wysihtml5.Commands = Base.extend(
nbIdx;
for (var i = elements.length; i--;) {
- if (elements[i].innerHTML.replace(/[\uFEFF]/g, '') === "") {
+ if (elements[i].innerHTML.replace(/[\uFEFF]/g, '') === "" && (newBlockElements.length === 0 || elements[i] !== newBlockElements[newBlockElements.length - 1])) {
// If cleanup removes some new block elements. remove them from newblocks array too
nbIdx = wysihtml5.lang.array(newBlockElements).indexOf(elements[i]);
if (nbIdx > -1) {
@@ -14496,8 +14512,13 @@ wysihtml5.Commands = Base.extend(
}
composer.selection.splitElementAtCaret(outerInlines.parent, fragment);
} else {
- // Otherwise just insert
+ var fc = fragment.firstChild,
+ lc = fragment.lastChild;
+
range.insertNode(fragment);
+ // restore range position as it might get lost in webkit sometimes
+ range.setStartBefore(fc);
+ range.setEndAfter(lc);
}
}
}
@@ -14626,7 +14647,21 @@ wysihtml5.Commands = Base.extend(
startNode = getRangeNode(r.startContainer, r.startOffset),
endNode = getRangeNode(r.endContainer, r.endOffset),
prevNode = (r.startContainer === startNode && startNode.nodeType === 3 && !isWhitespaceBefore(startNode, r.startOffset)) ? startNode : wysihtml5.dom.domNode(startNode).prev({nodeTypes: [1,3], ignoreBlankTexts: true}),
- nextNode = ((r.endContainer.nodeType === 1 && r.endContainer.childNodes[r.endOffset] === endNode) || (r.endContainer === endNode && endNode.nodeType === 3 && !isWhitespaceAfter(endNode, r.endOffset))) ? endNode : wysihtml5.dom.domNode(getRangeNode(r.endContainer, r.endOffset)).next({nodeTypes: [1,3], ignoreBlankTexts: true}),
+ nextNode = (
+ (
+ r.endContainer.nodeType === 1 &&
+ r.endContainer.childNodes[r.endOffset] === endNode &&
+ (
+ endNode.nodeType === 1 ||
+ !isWhitespaceAfter(endNode, r.endOffset) &&
+ !wysihtml5.dom.domNode(endNode).is.rangyBookmark()
+ )
+ ) || (
+ r.endContainer === endNode &&
+ endNode.nodeType === 3 &&
+ !isWhitespaceAfter(endNode, r.endOffset)
+ )
+ ) ? endNode : wysihtml5.dom.domNode(endNode).next({nodeTypes: [1,3], ignoreBlankTexts: true}),
content = r.extractContents(),
fragment = composer.doc.createDocumentFragment(),
similarOuterBlock = similarOptions ? wysihtml5.dom.getParentElement(rangeStartContainer, similarOptions, null, composer.element) : null,
@@ -14635,6 +14670,11 @@ wysihtml5.Commands = Base.extend(
wrapper, blocks, children,
firstc, lastC;
+ if (wysihtml5.dom.domNode(nextNode).is.rangyBookmark()) {
+ endNode = nextNode;
+ nextNode = endNode.nextSibling;
+ }
+
trimBlankTextsAndBreaks(content);
if (options && options.nodeName === "BLOCKQUOTE") {
@@ -14684,6 +14724,16 @@ wysihtml5.Commands = Base.extend(
}
injectFragmentToRange(fragment, r, composer, firstOuterBlock);
removeSurroundingLineBreaks(prevNode, nextNode, composer);
+
+ // Fix webkit madness by inserting linebreak rangy after cursor marker to blank last block
+ // (if it contains rangy bookmark, so selection can be restored later correctly)
+ if (blocks.length > 0 &&
+ (
+ typeof blocks[blocks.length - 1].lastChild === "undefined" || wysihtml5.dom.domNode(blocks[blocks.length - 1].lastChild).is.rangyBookmark()
+ )
+ ) {
+ blocks[blocks.length - 1].appendChild(composer.doc.createElement('br'));
+ }
return blocks;
}
@@ -15832,7 +15882,9 @@ wysihtml5.Commands = Base.extend(
for (var i = innerLists.length; i--;) {
wysihtml5.dom.resolveList(innerLists[i], composer.config.useLineBreaks);
}
- wysihtml5.dom.resolveList(el, composer.config.useLineBreaks);
+ if (innerLists.length === 0) {
+ wysihtml5.dom.resolveList(el, composer.config.useLineBreaks);
+ }
}
});
};
@@ -15900,8 +15952,34 @@ wysihtml5.Commands = Base.extend(
exec: function(composer, command, nodeName) {
var doc = composer.doc,
cmd = (nodeName === "OL") ? "insertOrderedList" : "insertUnorderedList",
- selectedNode = composer.selection.getSelectedNode(),
- list = findListEl(selectedNode, nodeName, composer);
+ s = composer.selection.getSelection(),
+ anode = s.anchorNode.nodeType === 1 && s.anchorNode.firstChild ? s.anchorNode.childNodes[s.anchorOffset] : s.anchorNode,
+ fnode = s.focusNode.nodeType === 1 && s.focusNode.firstChild ? s.focusNode.childNodes[s.focusOffset] || s.focusNode.lastChild : s.focusNode,
+ selectedNode, list;
+
+ if (s.isBackwards()) {
+ // swap variables
+ anode = [fnode, fnode = anode][0];
+ }
+
+ if (wysihtml5.dom.domNode(fnode).is.emptyTextNode(true) && fnode) {
+ fnode = wysihtml5.dom.domNode(fnode).prev({nodeTypes: [1,3], ignoreBlankTexts: true});
+ }
+ if (wysihtml5.dom.domNode(anode).is.emptyTextNode(true) && anode) {
+ anode = wysihtml5.dom.domNode(anode).next({nodeTypes: [1,3], ignoreBlankTexts: true});
+ }
+
+ if (anode && fnode) {
+ if (anode === fnode) {
+ selectedNode = anode;
+ } else {
+ selectedNode = wysihtml5.dom.domNode(anode).commonAncestor(fnode, composer.element);
+ }
+ } else {
+ selectedNode = composer.selection.getSelectedNode();
+ }
+
+ list = findListEl(selectedNode, nodeName, composer);
if (!list.el) {
if (composer.commands.support(cmd)) {
@@ -17390,155 +17468,248 @@ wysihtml5.views.View = Base.extend(
"73": "italic", // I
"85": "underline" // U
};
+
+ var actions = {
- // Adds multiple eventlisteners to target, bound to one callback
- // TODO: If needed elsewhere make it part of wysihtml5.dom or sth
- var addListeners = function (target, events, callback) {
- for(var i = 0, max = events.length; i < max; i++) {
- target.addEventListener(events[i], callback, false);
- }
- };
+ // Adds multiple eventlisteners to target, bound to one callback
+ // TODO: If needed elsewhere make it part of wysihtml5.dom or sth
+ addListeners: function (target, events, callback) {
+ for(var i = 0, max = events.length; i < max; i++) {
+ target.addEventListener(events[i], callback, false);
+ }
+ },
- // Removes multiple eventlisteners from target, bound to one callback
- // TODO: If needed elsewhere make it part of wysihtml5.dom or sth
- var removeListeners = function (target, events, callback) {
- for(var i = 0, max = events.length; i < max; i++) {
- target.removeEventListener(events[i], callback, false);
- }
- };
+ // Removes multiple eventlisteners from target, bound to one callback
+ // TODO: If needed elsewhere make it part of wysihtml5.dom or sth
+ removeListeners: function (target, events, callback) {
+ for(var i = 0, max = events.length; i < max; i++) {
+ target.removeEventListener(events[i], callback, false);
+ }
+ },
- // Override for giving user ability to delete last line break in table cell
- var fixLastBrDeletionInTable = function(composer, force) {
- if (composer.selection.caretIsLastInSelection()) {
- var sel = composer.selection.getSelection(),
- aNode = sel.anchorNode;
- if (aNode && aNode.nodeType === 1 && (wysihtml5.dom.getParentElement(aNode, {query: 'td, th'}, false, composer.element) || force)) {
- var nextNode = aNode.childNodes[sel.anchorOffset];
- if (nextNode && nextNode.nodeType === 1 & nextNode.nodeName === "BR") {
- nextNode.parentNode.removeChild(nextNode);
- return true;
+ // Override for giving user ability to delete last line break in table cell
+ fixLastBrDeletionInTable: function(composer, force) {
+ if (composer.selection.caretIsLastInSelection()) {
+ var sel = composer.selection.getSelection(),
+ aNode = sel.anchorNode;
+ if (aNode && aNode.nodeType === 1 && (wysihtml5.dom.getParentElement(aNode, {query: 'td, th'}, false, composer.element) || force)) {
+ var nextNode = aNode.childNodes[sel.anchorOffset];
+ if (nextNode && nextNode.nodeType === 1 & nextNode.nodeName === "BR") {
+ nextNode.parentNode.removeChild(nextNode);
+ return true;
+ }
}
}
- }
- return false;
- };
+ return false;
+ },
- // If found an uneditable before caret then notify it before deletion
- var handleUneditableDeletion = function(composer) {
- var before = composer.selection.getBeforeSelection(true);
- if (before && (before.type === "element" || before.type === "leafnode") && before.node.nodeType === 1 && before.node.classList.contains(composer.config.classNames.uneditableContainer)) {
- if (fixLastBrDeletionInTable(composer, true)) {
+ // If found an uneditable before caret then notify it before deletion
+ handleUneditableDeletion: function(composer) {
+ var before = composer.selection.getBeforeSelection(true);
+ if (before && (before.type === "element" || before.type === "leafnode") && before.node.nodeType === 1 && before.node.classList.contains(composer.config.classNames.uneditableContainer)) {
+ if (actions.fixLastBrDeletionInTable(composer, true)) {
+ return true;
+ }
+ try {
+ var ev = new CustomEvent("wysihtml5:uneditable:delete", {bubbles: true, cancelable: false});
+ before.node.dispatchEvent(ev);
+ } catch (err) {}
+ before.node.parentNode.removeChild(before.node);
return true;
}
- try {
- var ev = new CustomEvent("wysihtml5:uneditable:delete", {bubbles: true, cancelable: false});
- before.node.dispatchEvent(ev);
- } catch (err) {}
- before.node.parentNode.removeChild(before.node);
- return true;
- }
- return false;
- };
+ return false;
+ },
- // Deletion with caret in the beginning of headings and other block elvel elements needs special attention
- // Not allways does it concate text to previous block node correctly (browsers do unexpected miracles here especially webkit)
- var fixDeleteInTheBeginningOfBlock = function(composer) {
- var selection = composer.selection,
- prevNode = selection.getPreviousNode();
-
- if (selection.caretIsFirstInSelection() &&
- prevNode &&
- prevNode.nodeType === 1 &&
- (/block/).test(composer.win.getComputedStyle(prevNode).display) &&
- !domNode(prevNode).test({
- query: "ol, ul, table, tr, dl"
- })
- ) {
- if ((/^\s*$/).test(prevNode.textContent || prevNode.innerText)) {
- // If heading is empty remove the heading node
- prevNode.parentNode.removeChild(prevNode);
- return true;
- } else {
- if (prevNode.lastChild) {
- var selNode = prevNode.lastChild,
- selectedNode = selection.getSelectedNode(),
- commonAncestorNode = domNode(prevNode).commonAncestor(selectedNode, composer.element);
- curNode = selectedNode.nodeType === 3 ? selectedNode : wysihtml5.dom.getParentElement(selectedNode, {
- query: "h1, h2, h3, h4, h5, h6, p, pre, div, blockquote"
- }, false, commonAncestorNode || composer.element);
-
- if (curNode) {
- domNode(curNode).transferContentTo(prevNode, true);
- selection.setAfter(selNode);
+ // Deletion with caret in the beginning of headings and other block elvel elements needs special attention
+ // Not allways does it concate text to previous block node correctly (browsers do unexpected miracles here especially webkit)
+ fixDeleteInTheBeginningOfBlock: function(composer) {
+ var selection = composer.selection,
+ prevNode = selection.getPreviousNode();
+
+ if (selection.caretIsFirstInSelection() &&
+ prevNode &&
+ prevNode.nodeType === 1 &&
+ (/block/).test(composer.win.getComputedStyle(prevNode).display) &&
+ !domNode(prevNode).test({
+ query: "ol, ul, table, tr, dl"
+ })
+ ) {
+ if ((/^\s*$/).test(prevNode.textContent || prevNode.innerText)) {
+ // If heading is empty remove the heading node
+ prevNode.parentNode.removeChild(prevNode);
+ return true;
+ } else {
+ if (prevNode.lastChild) {
+ var selNode = prevNode.lastChild,
+ selectedNode = selection.getSelectedNode(),
+ commonAncestorNode = domNode(prevNode).commonAncestor(selectedNode, composer.element),
+ curNode = wysihtml5.dom.getParentElement(selectedNode, {
+ query: "h1, h2, h3, h4, h5, h6, p, pre, div, blockquote"
+ }, false, commonAncestorNode || composer.element);
+
+ if (curNode) {
+ domNode(curNode).transferContentTo(prevNode, true);
+ selection.setAfter(selNode);
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ },
+
+ /* In IE when deleting with caret at the begining of LI, list gets broken into half instead of merging the LI with previous */
+ /* This does not match other browsers an is less intuitive from UI standpoint, thus has to be fixed */
+ fixDeleteInTheBeginningOfLi: function(composer) {
+ if (wysihtml5.browser.hasLiDeletingProblem()) {
+ var selection = composer.selection.getSelection(),
+ aNode = selection.anchorNode,
+ listNode, prevNode, firstNode,
+ isInBeginnig = composer.selection.caretIsFirstInSelection();
+
+ // Fix caret at the beginnig of first textNode in LI
+ if (aNode.nodeType === 3 && selection.anchorOffset === 0 && aNode === aNode.parentNode.firstChild) {
+ aNode = aNode.parentNode;
+ isInBeginnig = true;
+ }
+
+ if (isInBeginnig && aNode && aNode.nodeType === 1 && aNode.nodeName === "LI") {
+ prevNode = domNode(aNode).prev({nodeTypes: [1,3], ignoreBlankTexts: true});
+ if (!prevNode && aNode.parentNode && (aNode.parentNode.nodeName === "UL" || aNode.parentNode.nodeName === "OL")) {
+ prevNode = domNode(aNode.parentNode).prev({nodeTypes: [1,3], ignoreBlankTexts: true});
+ }
+ if (prevNode) {
+ firstNode = aNode.firstChild;
+ domNode(aNode).transferContentTo(prevNode, true);
+ if (firstNode) {
+ composer.selection.setBefore(firstNode);
+ } else if (prevNode) {
+ if (prevNode.nodeType === 1) {
+ if (prevNode.lastChild) {
+ composer.selection.setAfter(prevNode.lastChild);
+ } else {
+ composer.selection.selectNode(prevNode);
+ }
+ } else {
+ composer.selection.setAfter(prevNode);
+ }
+ }
return true;
}
}
}
- }
- return false;
- };
+ return false;
+ },
+
+ // Table management
+ // If present enableObjectResizing and enableInlineTableEditing command should be called with false to prevent native table handlers
+ initTableHandling: function() {
+ var hideHandlers = function() {
+ window.removeEventListener('load', hideHandlers);
+ this.doc.execCommand("enableObjectResizing", false, "false");
+ this.doc.execCommand("enableInlineTableEditing", false, "false");
+ }.bind(this),
+ iframeInitiator = (function() {
+ hideHandlers.call(this);
+ actions.removeListeners(this.sandbox.getIframe(), ["focus", "mouseup", "mouseover"], iframeInitiator);
+ }).bind(this);
+
+ if( this.doc.execCommand &&
+ wysihtml5.browser.supportsCommand(this.doc, "enableObjectResizing") &&
+ wysihtml5.browser.supportsCommand(this.doc, "enableInlineTableEditing"))
+ {
+ if (this.sandbox.getIframe) {
+ actions.addListeners(this.sandbox.getIframe(), ["focus", "mouseup", "mouseover"], iframeInitiator);
+ } else {
+ window.addEventListener('load', hideHandlers);
+ }
+ }
+ this.tableSelection = wysihtml5.quirks.tableCellsSelection(this.element, this.parent);
+ },
+
+ // Fixes some misbehaviours of enters in linebreaks mode (natively a bit unsupported feature)
+ // Returns true if some corrections is applied so events know when to prevent default
+ doLineBreaksModeEnterWithCaret: function(composer) {
+ var breakNodes = "p, pre, div, blockquote",
+ caretInfo, parent, txtNode,
+ ret = false;
+
+ caretInfo = composer.selection.getNodesNearCaret();
+ if (caretInfo) {
+
+ if (caretInfo.caretNode || caretInfo.nextNode) {
+ parent = dom.getParentElement(caretInfo.caretNode || caretInfo.nextNode, { query: breakNodes }, 2);
+ if (parent === composer.element) {
+ parent = undefined;
+ }
+ }
+
+ if (parent && caretInfo.caretNode) {
+ if (domNode(caretInfo.caretNode).is.lineBreak()) {
+
+ if (composer.config.doubleLineBreakEscapesBlock) {
+ // Double enter (enter on blank line) exits block element in useLineBreaks mode.
+ ret = true;
+ caretInfo.caretNode.parentNode.removeChild(caretInfo.caretNode);
+
+ // Ensure surplous line breaks are not added to preceding element
+ if (domNode(caretInfo.nextNode).is.lineBreak()) {
+ caretInfo.nextNode.parentNode.removeChild(caretInfo.nextNode);
+ }
- /* In IE when deleting with caret at the begining of LI, list gets broken into half instead of merging the LI with previous */
- /* This does not match other browsers an is less intuitive from UI standpoint, thus has to be fixed */
- var fixDeleteInTheBeginningOfLi = function(composer) {
- if (wysihtml5.browser.hasLiDeletingProblem()) {
- var selection = composer.selection.getSelection(),
- aNode = selection.anchorNode,
- listNode, prevNode, firstNode,
- isInBeginnig = composer.selection.caretIsFirstInSelection();
-
- // Fix caret at the beginnig of first textNode in LI
- if (aNode.nodeType === 3 && selection.anchorOffset === 0 && aNode === aNode.parentNode.firstChild) {
- aNode = aNode.parentNode;
- isInBeginnig = true;
- }
-
- if (isInBeginnig && aNode && aNode.nodeType === 1 && aNode.nodeName === "LI") {
- prevNode = domNode(aNode).prev({nodeTypes: [1,3], ignoreBlankTexts: true});
- if (!prevNode && aNode.parentNode && (aNode.parentNode.nodeName === "UL" || aNode.parentNode.nodeName === "OL")) {
- prevNode = domNode(aNode.parentNode).prev({nodeTypes: [1,3], ignoreBlankTexts: true});
- }
- if (prevNode) {
- firstNode = aNode.firstChild;
- domNode(aNode).transferContentTo(prevNode, true);
- if (firstNode) {
- composer.selection.setBefore(firstNode);
- } else if (prevNode) {
- if (prevNode.nodeType === 1) {
- if (prevNode.lastChild) {
- composer.selection.setAfter(prevNode.lastChild);
+ var brNode = composer.doc.createElement('br');
+ if (domNode(caretInfo.nextNode).is.lineBreak() && caretInfo.nextNode === parent.lastChild) {
+ parent.parentNode.insertBefore(brNode, parent.nextSibling);
} else {
- composer.selection.selectNode(prevNode);
+ composer.selection.splitElementAtCaret(parent, brNode);
}
- } else {
- composer.selection.setAfter(prevNode);
+
+ // Ensure surplous blank lines are not added to preceding element
+ if (caretInfo.nextNode && caretInfo.nextNode.nodeType === 3) {
+ // Replaces blank lines at the beginning of textnode
+ caretInfo.nextNode.data = caretInfo.nextNode.data.replace(/^ *[\r\n]+/, '');
+ }
+ composer.selection.setBefore(brNode);
}
+
+ } else if (caretInfo.caretNode.nodeType === 3 && wysihtml5.browser.hasCaretBlockElementIssue() && caretInfo.textOffset === caretInfo.caretNode.data.length && !caretInfo.nextNode) {
+
+ // This fixes annoying webkit issue when you press enter at the end of a block then seemingly nothing happens.
+ // in reality one line break is generated and cursor is reported after it, but when entering something cursor jumps before the br
+ ret = true;
+ var br1 = composer.doc.createElement('br'),
+ br2 = composer.doc.createElement('br'),
+ f = composer.doc.createDocumentFragment();
+ f.appendChild(br1);
+ f.appendChild(br2);
+ composer.selection.insertNode(f);
+ composer.selection.setBefore(br2);
+
}
- return true;
}
}
+ return ret;
}
- return false;
- }
+ };
var handleDeleteKeyPress = function(event, composer) {
var selection = composer.selection,
element = composer.element;
if (selection.isCollapsed()) {
- if (handleUneditableDeletion(composer)) {
+ if (actions.handleUneditableDeletion(composer)) {
event.preventDefault();
return;
}
- if (fixDeleteInTheBeginningOfLi(composer)) {
+ if (actions.fixDeleteInTheBeginningOfLi(composer)) {
event.preventDefault();
return;
}
- if (fixDeleteInTheBeginningOfBlock(composer)) {
+ if (actions.fixDeleteInTheBeginningOfBlock(composer)) {
event.preventDefault();
return;
}
- if (fixLastBrDeletionInTable(composer)) {
+ if (actions.fixLastBrDeletionInTable(composer)) {
event.preventDefault();
return;
}
@@ -17558,59 +17729,8 @@ wysihtml5.views.View = Base.extend(
caretInfo, parent, txtNode;
if (composer.selection.isCollapsed()) {
- caretInfo = composer.selection.getNodesNearCaret();
- if (caretInfo) {
-
- if (caretInfo.caretNode || caretInfo.nextNode) {
- parent = dom.getParentElement(caretInfo.caretNode || caretInfo.nextNode, { query: breakNodes }, 2);
- if (parent === composer.element) {
- parent = undefined;
- }
- }
-
- if (parent && caretInfo.caretNode) {
- if (domNode(caretInfo.caretNode).is.lineBreak()) {
-
- if (composer.config.doubleLineBreakEscapesBlock) {
- // Double enter (enter on blank line) exits block element in useLineBreaks mode.
- event.preventDefault();
- caretInfo.caretNode.parentNode.removeChild(caretInfo.caretNode);
-
- // Ensure surplous line breaks are not added to preceding element
- if (domNode(caretInfo.nextNode).is.lineBreak()) {
- caretInfo.nextNode.parentNode.removeChild(caretInfo.nextNode);
- }
-
- var brNode = composer.doc.createElement('br');
- if (domNode(caretInfo.nextNode).is.lineBreak() && caretInfo.nextNode === parent.lastChild) {
- parent.parentNode.insertBefore(brNode, parent.nextSibling);
- } else {
- composer.selection.splitElementAtCaret(parent, brNode);
- }
-
- // Ensure surplous blank lines are not added to preceding element
- if (caretInfo.nextNode && caretInfo.nextNode.nodeType === 3) {
- // Replaces blank lines at the beginning of textnode
- caretInfo.nextNode.data = caretInfo.nextNode.data.replace(/^ *[\r\n]+/, '');
- }
- composer.selection.setBefore(brNode);
- }
-
- } else if (caretInfo.caretNode.nodeType === 3 && wysihtml5.browser.hasCaretBlockElementIssue() && caretInfo.textOffset === caretInfo.caretNode.data.length && !caretInfo.nextNode) {
-
- // This fixes annoying webkit issue when you press enter at the end of a block then seemingly nothing happens.
- // in reality one line break is generated and cursor is reported after it, but when entering something cursor jumps before the br
- event.preventDefault();
- var br1 = composer.doc.createElement('br'),
- br2 = composer.doc.createElement('br'),
- f = composer.doc.createDocumentFragment();
- f.appendChild(br1);
- f.appendChild(br2);
- composer.selection.insertNode(f);
- composer.selection.setBefore(br2);
-
- }
- }
+ if (actions.doLineBreaksModeEnterWithCaret(composer)) {
+ event.preventDefault();
}
}
}
@@ -17797,31 +17917,10 @@ wysihtml5.views.View = Base.extend(
}).bind(this), 0);
};
- // Table management
- // If present enableObjectResizing and enableInlineTableEditing command should be called with false to prevent native table handlers
- var initTableHandling = function () {
- var hideHandlers = function () {
- window.removeEventListener('load', hideHandlers);
- this.doc.execCommand("enableObjectResizing", false, "false");
- this.doc.execCommand("enableInlineTableEditing", false, "false");
- }.bind(this),
- iframeInitiator = (function() {
- hideHandlers.call(this);
- removeListeners(this.sandbox.getIframe(), ["focus", "mouseup", "mouseover"], iframeInitiator);
- }).bind(this);
-
- if( this.doc.execCommand &&
- wysihtml5.browser.supportsCommand(this.doc, "enableObjectResizing") &&
- wysihtml5.browser.supportsCommand(this.doc, "enableInlineTableEditing"))
- {
- if (this.sandbox.getIframe) {
- addListeners(this.sandbox.getIframe(), ["focus", "mouseup", "mouseover"], iframeInitiator);
- } else {
- window.addEventListener('load', hideHandlers);
- }
- }
- this.tableSelection = wysihtml5.quirks.tableCellsSelection(this.element, this.parent);
- };
+
+
+ // Testing requires actions to be accessible from out of scope
+ wysihtml5.views.Composer.prototype.observeActions = actions;
wysihtml5.views.Composer.prototype.observe = function() {
var that = this,
@@ -17847,14 +17946,14 @@ wysihtml5.views.View = Base.extend(
// --------- User interactions --
if (this.config.handleTables) {
// If handleTables option is true, table handling functions are bound
- initTableHandling.call(this);
+ actions.initTableHandling.call(this);
}
- addListeners(focusBlurElement, ["drop", "paste", "mouseup", "focus", "keyup"], handleUserInteraction.bind(this));
+ actions.addListeners(focusBlurElement, ["drop", "paste", "mouseup", "focus", "keyup"], handleUserInteraction.bind(this));
focusBlurElement.addEventListener("focus", handleFocus.bind(this), false);
focusBlurElement.addEventListener("blur", handleBlur.bind(this), false);
- addListeners(this.element, ["drop", "paste", "beforepaste"], handlePaste.bind(this), false);
+ actions.addListeners(this.element, ["drop", "paste", "beforepaste"], handlePaste.bind(this), false);
this.element.addEventListener("copy", handleCopy.bind(this), false);
this.element.addEventListener("mousedown", handleMouseDown.bind(this), false);
this.element.addEventListener("click", handleClick.bind(this), false);
diff --git a/dist/wysihtml.min.js b/dist/wysihtml.min.js
index b00a756..4c3eea6 100644
--- a/dist/wysihtml.min.js
+++ b/dist/wysihtml.min.js
@@ -1,11 +1,11 @@
-/*! wysihtml - v0.5.3 (2015-12-09) */
+/*! wysihtml - v0.5.4 (2015-12-18) */
-var wysihtml5={version:"0.5.3",commands:{},dom:{},quirks:{},toolbar:{},lang:{},selection:{},views:{},INVISIBLE_SPACE:"\ufeff",INVISIBLE_SPACE_REG_EXP:/\uFEFF/g,VOID_ELEMENTS:"area, base, br, col, embed, hr, img, input, keygen, link, meta, param, source, track, wbr",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){function c(){try{var a=new CustomEvent("cat",{detail:{foo:"bar"}});return"cat"===a.type&&"bar"===a.detail.foo}catch(b){}return!1}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}),function(a){a.matches=a.matches||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector||function(a){for(var b=this,c=(b.document||b.ownerDocument).querySelectorAll(a),d=0;c[d]&&c[d]!==b;)++d;return c[d]?!0:!1},a.closest=a.closest||function(a){for(var b=this;b&&!b.matches(a);)b=b.parentElement;return b}}(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[d]:void 0,h=b.focusNode,i=b.focusOffset,j=h&&1===h.nodeType&&i>0?h.childNodes[i-1]:void 0,k=this.ownerDocument.createRange(),l=a.shift(),m=l?a.shift():null;for(j&&3===j.nodeType&&(h=j,i=j.nodeValue.length,j=void 0),g&&3===g.nodeType&&(c=g,d=0,g=void 0),(c===h&&d>i||c!==h&&c.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_PRECEDING&&!(c.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINS))&&(h=[c,c=h][0],i=[d,d=i][0]);l&&m;)m.previousSibling&&m.previousSibling===l?(c===m&&(c=l,d=l.nodeValue.length+d),h===m&&(h=l,i=l.nodeValue.length+i),l.nodeValue=l.nodeValue+m.nodeValue,m.parentNode.removeChild(m),m=a.shift()):(l=m,m=a.shift());j&&(i=Array.prototype.indexOf.call(j.parentNode.childNodes,j)+1),g&&(d=Array.prototype.indexOf.call(g.parentNode.childNodes,g)),f(this)&&c&&c.parentNode&&h&&h.parentNode&&(k.setStart(c,d),k.setEnd(h,i),b.removeAllRanges(),b.addRange(k))});Node.prototype.normalize=a},h=function(){window.removeEventListener("load",h),"Node"in window&&"normalize"in Node.prototype&&d()&&g()};"complete"!==b.readyState?window.addEventListener("load",h):h();var i=c();!function(){function c(a,c){c=c||{bubbles:!1,cancelable:!1,detail:void 0};var d=b.createEvent("CustomEvent");return d.initCustomEvent(a,c.bubbles,c.cancelable,c.detail),d}!i&&"CustomEvent"in window&&(c.prototype=a.Event.prototype,a.CustomEvent=c,i=!0)}()},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),
+var wysihtml5={version:"0.5.4",commands:{},dom:{},quirks:{},toolbar:{},lang:{},selection:{},views:{},INVISIBLE_SPACE:"\ufeff",INVISIBLE_SPACE_REG_EXP:/\uFEFF/g,VOID_ELEMENTS:"area, base, br, col, embed, hr, img, input, keygen, link, meta, param, source, track, wbr",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){function c(){try{var a=new CustomEvent("cat",{detail:{foo:"bar"}});return"cat"===a.type&&"bar"===a.detail.foo}catch(b){}return!1}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}),function(a){a.matches=a.matches||a.mozMatchesSelector||a.msMatchesSelector||a.oMatchesSelector||a.webkitMatchesSelector||function(a){for(var b=this,c=(b.document||b.ownerDocument).querySelectorAll(a),d=0;c[d]&&c[d]!==b;)++d;return c[d]?!0:!1},a.closest=a.closest||function(a){for(var b=this;b&&!b.matches(a);)b=b.parentElement;return b}}(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[d]:void 0,h=b.focusNode,i=b.focusOffset,j=h&&1===h.nodeType&&i>0?h.childNodes[i-1]:void 0,k=this.ownerDocument.createRange(),l=a.shift(),m=l?a.shift():null;for(j&&3===j.nodeType&&(h=j,i=j.nodeValue.length,j=void 0),g&&3===g.nodeType&&(c=g,d=0,g=void 0),(c===h&&d>i||c!==h&&c.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_PRECEDING&&!(c.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINS))&&(h=[c,c=h][0],i=[d,d=i][0]);l&&m;)m.previousSibling&&m.previousSibling===l?(c===m&&(c=l,d=l.nodeValue.length+d),h===m&&(h=l,i=l.nodeValue.length+i),l.nodeValue=l.nodeValue+m.nodeValue,m.parentNode.removeChild(m),m=a.shift()):(l=m,m=a.shift());j&&(i=Array.prototype.indexOf.call(j.parentNode.childNodes,j)+1),g&&(d=Array.prototype.indexOf.call(g.parentNode.childNodes,g)),f(this)&&c&&c.parentNode&&h&&h.parentNode&&(k.setStart(c,d),k.setEnd(h,i),b.removeAllRanges(),b.addRange(k))});Node.prototype.normalize=a},h=function(){window.removeEventListener("load",h),"Node"in window&&"normalize"in Node.prototype&&d()&&g()};"complete"!==b.readyState?window.addEventListener("load",h):h();var i=c();!function(){function c(a,c){c=c||{bubbles:!1,cancelable:!1,detail:void 0};var d=b.createEvent("CustomEvent");return d.initCustomEvent(a,c.bubbles,c.cancelable,c.detail),d}!i&&"CustomEvent"in window&&(c.prototype=a.Event.prototype,a.CustomEvent=c,i=!0)}()},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("TextRange",["WrappedSelection"],function(a,b){function c(a,b){function c(a,b,c){h.push({start:a,end:b,isWord:c})}for(var d,e,f,g=a.join(""),h=[],i=0;d=b.wordRegex.exec(g);){if(e=d.index,f=e+d[0].length,e>i&&c(i,e,!1),b.includeTrailingSpace)for(;$.test(a[f]);)++f;c(e,f,!0),i=f}return ie;++e)c[e].token=d;return d}function e(a,b,c){for(var e,f=c(a,b),g=[],h=0;e=f[h++];)g.push(d(a,e));return g}function f(a){var b=a||"",c="string"==typeof b?b.split(""):b;return c.sort(function(a,b){return a.charCodeAt(0)-b.charCodeAt(0)}),c.join("").replace(/(.)\1+/g,"$1")}function g(a){var b,c;return a?(b=a.language||_,c={},U(c,ia[b]||ia[_]),U(c,a),c):ia[_]}function h(a,b){var c=V(a,b);return b.hasOwnProperty("wordOptions")&&(c.wordOptions=g(c.wordOptions)),b.hasOwnProperty("characterOptions")&&(c.characterOptions=V(c.characterOptions,ga)),c}function i(a,b){var c=na(a,"display",b),d=a.tagName.toLowerCase();return"block"==c&&fa&&oa.hasOwnProperty(d)?oa[d]:c}function j(a){for(var b=o(a),c=0,d=b.length;d>c;++c)if(1==b[c].nodeType&&"none"==i(b[c]))return!0;return!1}function k(a){var b;return 3==a.nodeType&&(b=a.parentNode)&&"hidden"==na(b,"visibility")}function l(a){return a&&(1==a.nodeType&&!/^(inline(-block|-table)?|none)$/.test(i(a))||9==a.nodeType||11==a.nodeType)}function m(a){return S.isCharacterDataNode(a)||!/^(area|base|basefont|br|col|frame|hr|img|input|isindex|link|meta|param)$/i.test(a.nodeName)}function n(a){for(var b=[];a.parentNode;)b.unshift(a.parentNode),a=a.parentNode;return b}function o(a){return n(a).concat([a])}function p(a){for(;a&&!a.nextSibling;)a=a.parentNode;return a?a.nextSibling:null}function q(a,b){return!b&&a.hasChildNodes()?a.firstChild:p(a)}function r(a){var b=a.previousSibling;if(b){for(a=b;a.hasChildNodes();)a=a.lastChild;return a}var c=a.parentNode;return c&&1==c.nodeType?c:null}function s(a){if(!a||3!=a.nodeType)return!1;var b=a.data;if(""===b)return!0;var c=a.parentNode;if(!c||1!=c.nodeType)return!1;var d=na(a.parentNode,"whiteSpace");return/^[\t\n\r ]+$/.test(b)&&/^(normal|nowrap)$/.test(d)||/^[\t\r ]+$/.test(b)&&"pre-line"==d}function t(a){if(""===a.data)return!0;if(!s(a))return!1;var b=a.parentNode;return b?j(a)?!0:!1:!0}function u(a){var b=a.nodeType;return 7==b||8==b||j(a)||/^(script|style)$/i.test(a.nodeName)||k(a)||t(a)}function v(a,b){var c=a.nodeType;return 7==c||8==c||1==c&&"none"==i(a,b)}function w(){this.store={}}function x(a,b,c){return function(d){var e=this.cache;if(e.hasOwnProperty(a))return pa++,e[a];qa++;var f=b.call(this,c?this[c]:this,d);return e[a]=f,f}}function y(a,b){this.node=a,this.session=b,this.cache=new w,this.positions=new w}function z(a,b){this.offset=b,this.nodeWrapper=a,this.node=a.node,this.session=a.session,this.cache=new w}function A(){return"[Position("+S.inspectNode(this.node)+":"+this.offset+")]"}function B(){return D(),Da=new Ea}function C(){return Da||B()}function D(){Da&&Da.detach(),Da=null}function E(a,c,d,e){function f(){var a=null;return c?(a=h,i||(h=h.previousVisible(),i=!h||d&&h.equals(d))):i||(a=h=h.nextVisible(),i=!h||d&&h.equals(d)),i&&(h=null),a}d&&(c?u(d.node)&&(d=a.previousVisible()):u(d.node)&&(d=d.nextVisible()));var g,h=a,i=!1,j=!1;return{next:function(){if(j)return j=!1,g;for(var a,b;a=f();)if(b=a.getCharacter(e))return g=a,a;return null},rewind:function(){if(!g)throw b.createError("createCharacterIterator: cannot rewind. Only one position can be rewound.");j=!0},dispose:function(){a=d=null}}}function F(a,b,c){function d(a){for(var b,c,d=[],e=a?f:g,h=!1,i=!1;b=e.next();){if(c=b.character,Z.test(c))i&&(i=!1,h=!0);else{if(h){e.rewind();break}i=!0}d.push(b)}return d}var f=E(a,!1,null,b),g=E(a,!0,null,b),h=c.tokenizer,i=d(!0),j=d(!1).reverse(),k=e(j.concat(i),c,h),l=i.length?k.slice(Fa(k,i[0].token)):[],m=j.length?k.slice(0,Fa(k,j.pop().token)+1):[];return{nextEndToken:function(){for(var a,b;1==l.length&&!(a=l[0]).isWord&&(b=d(!0)).length>0;)l=e(a.chars.concat(b),c,h);return l.shift()},previousStartToken:function(){for(var a,b;1==m.length&&!(a=m[0]).isWord&&(b=d(!1)).length>0;)m=e(b.reverse().concat(a.chars),c,h);return m.pop()},dispose:function(){f.dispose(),g.dispose(),l=m=null}}}function G(a,b,c,d,e){var f,g,h,i,j=0,k=a,l=Math.abs(c);if(0!==c){var m=0>c;switch(b){case Q:for(g=E(a,m,null,d);(f=g.next())&&l>j;)++j,k=f;h=f,g.dispose();break;case R:for(var n=F(a,d,e),o=m?n.previousStartToken:n.nextEndToken;(i=o())&&l>j;)i.isWord&&(++j,k=m?i.chars[0]:i.chars[i.chars.length-1]);break;default:throw new Error("movePositionBy: unit '"+b+"' not implemented")}m?(k=k.previousVisible(),j=-j):k&&k.isLeadingSpace&&!k.isTrailingSpace&&(b==R&&(g=E(a,!1,null,d),h=g.next(),g.dispose()),h&&(k=h.previousVisible()))}return{position:k,unitsMoved:j}}function H(a,b,c,d){var e=a.getRangeBoundaryPosition(b,!0),f=a.getRangeBoundaryPosition(b,!1),g=d?f:e,h=d?e:f;return E(g,!!d,h,c)}function I(a,b,c){for(var d,e=[],f=H(a,b,c);d=f.next();)e.push(d);return f.dispose(),e}function J(b,c,d){var e=a.createRange(b.node);return e.setStartAndEnd(b.node,b.offset,c.node,c.offset),!e.expand("word",{wordOptions:d})}function K(a,b,c,d,e){function f(a,b){var c=p[a].previousVisible(),d=p[b-1],f=!e.wholeWordsOnly||J(c,d,e.wordOptions);return{startPos:c,endPos:d,valid:f}}for(var g,h,i,j,k,l,m=aa(e.direction),n=E(a,m,a.session.getRangeBoundaryPosition(d,m),e.characterOptions),o="",p=[],q=null;g=n.next();)if(h=g.character,c||e.caseSensitive||(h=h.toLowerCase()),m?(p.unshift(g),o=h+o):(p.push(g),o+=h),c){if(k=b.exec(o))if(i=k.index,j=i+k[0].length,l){if(!m&&j0){q=f(i,j);break}}else l=!0}else if(-1!=(i=o.indexOf(b))){q=f(i,i+b.length);break}return l&&(q=f(i,j)),n.dispose(),q}function L(a){return function(){var b=!!Da,c=C(),d=[c].concat(T.toArray(arguments)),e=a.apply(this,d);return b||D(),e}}function M(a,b){return L(function(c,d,e,f){typeof e==P&&(e=d,d=Q),f=h(f,ka);var g=a;b&&(g=e>=0,this.collapse(!g));var i=G(c.getRangeBoundaryPosition(this,g),d,e,f.characterOptions,f.wordOptions),j=i.position;return this[g?"setStart":"setEnd"](j.node,j.offset),i.unitsMoved})}function N(a){return L(function(b,c){c=V(c,ga);for(var d,e=H(b,this,c,!a),f=0;(d=e.next())&&Z.test(d.character);)++f;e.dispose();var g=f>0;return g&&this[a?"moveStart":"moveEnd"]("character",a?f:-f,{characterOptions:c}),g})}function O(a){return L(function(b,c){var d=!1;return this.changeEachRange(function(b){d=b[a](c)||d}),d})}var P="undefined",Q="character",R="word",S=a.dom,T=a.util,U=T.extend,V=T.createOptions,W=S.getBody,X=/^[ \t\f\r\n]+$/,Y=/^[ \t\f\r]+$/,Z=/^[\t-\r \u0085\u00A0\u1680\u180E\u2000-\u200B\u2028\u2029\u202F\u205F\u3000]+$/,$=/^[\t \u00A0\u1680\u180E\u2000-\u200B\u202F\u205F\u3000]+$/,_="en",aa=a.Selection.isDirectionBackward,ba=!1,ca=!1,da=!1,ea=!0;!function(){var b=S.createTestElement(document,"1
",!0),c=b.firstChild,d=a.getSelection();d.collapse(c.lastChild,2),d.setStart(c.firstChild,0),ba=1==(""+d).length,b.innerHTML="1
",d.collapse(b,2),d.setStart(b.firstChild,0),ca=1==(""+d).length,b.innerHTML="1 1
",d.collapse(b,2),d.setStart(b.firstChild,0),da=1==(""+d).length,S.removeNode(b),d.removeAllRanges()}();var fa,ga={includeBlockContentTrailingSpace:!0,includeSpaceBeforeBr:!0,includeSpaceBeforeBlock:!0,includePreLineTrailingSpace:!0,ignoreCharacters:""},ha={includeBlockContentTrailingSpace:!ea,includeSpaceBeforeBr:!ca,includeSpaceBeforeBlock:!da,includePreLineTrailingSpace:!0},ia={en:{wordRegex:/[a-z0-9]+('[a-z0-9]+)*/gi,includeTrailingSpace:!1,tokenizer:c}},ja={caseSensitive:!1,withinRange:null,wholeWordsOnly:!1,wrap:!1,direction:"forward",wordOptions:null,characterOptions:null},ka={wordOptions:null,characterOptions:null},la={wordOptions:null,characterOptions:null,trim:!1,trimStart:!0,trimEnd:!0},ma={wordOptions:null,characterOptions:null,direction:"forward"},na=S.getComputedStyleProperty;!function(){var a=document.createElement("table"),b=W(document);b.appendChild(a),fa="block"==na(a,"display"),b.removeChild(a)}();var oa={table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell"};w.prototype={get:function(a){return this.store.hasOwnProperty(a)?this.store[a]:null},set:function(a,b){return this.store[a]=b}};var pa=0,qa=0,ra={getPosition:function(a){var b=this.positions;return b.get(a)||b.set(a,new z(this,a))},toString:function(){return"[NodeWrapper("+S.inspectNode(this.node)+")]"}};y.prototype=ra;var sa="EMPTY",ta="NON_SPACE",ua="UNCOLLAPSIBLE_SPACE",va="COLLAPSIBLE_SPACE",wa="TRAILING_SPACE_BEFORE_BLOCK",xa="TRAILING_SPACE_IN_BLOCK",ya="TRAILING_SPACE_BEFORE_BR",za="PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK",Aa="TRAILING_LINE_BREAK_AFTER_BR",Ba="INCLUDED_TRAILING_LINE_BREAK_AFTER_BR";U(ra,{isCharacterDataNode:x("isCharacterDataNode",S.isCharacterDataNode,"node"),getNodeIndex:x("nodeIndex",S.getNodeIndex,"node"),getLength:x("nodeLength",S.getNodeLength,"node"),containsPositions:x("containsPositions",m,"node"),isWhitespace:x("isWhitespace",s,"node"),
-isCollapsedWhitespace:x("isCollapsedWhitespace",t,"node"),getComputedDisplay:x("computedDisplay",i,"node"),isCollapsed:x("collapsed",u,"node"),isIgnored:x("ignored",v,"node"),next:x("nextPos",q,"node"),previous:x("previous",r,"node"),getTextNodeInfo:x("textNodeInfo",function(a){var b=null,c=!1,d=na(a.parentNode,"whiteSpace"),e="pre-line"==d;return e?(b=Y,c=!0):("normal"==d||"nowrap"==d)&&(b=X,c=!0),{node:a,text:a.data,spaceRegex:b,collapseSpaces:c,preLine:e}},"node"),hasInnerText:x("hasInnerText",function(a,b){for(var c=this.session,d=c.getPosition(a.parentNode,this.getNodeIndex()+1),e=c.getPosition(a,0),f=b?d:e,g=b?e:d;f!==g;){if(f.prepopulateChar(),f.isDefinitelyNonEmpty())return!0;f=b?f.previousVisible():f.nextVisible()}return!1},"node"),isRenderedBlock:x("isRenderedBlock",function(a){for(var b=a.getElementsByTagName("br"),c=0,d=b.length;d>c;++c)if(!u(b[c]))return!0;return this.hasInnerText()},"node"),getTrailingSpace:x("trailingSpace",function(a){if("br"==a.tagName.toLowerCase())return"";switch(this.getComputedDisplay()){case"inline":for(var b=a.lastChild;b;){if(!v(b))return 1==b.nodeType?this.session.getNodeWrapper(b).getTrailingSpace():"";b=b.previousSibling}break;case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":break;case"table-cell":return" ";default:return this.isRenderedBlock(!0)?"\n":""}return""},"node"),getLeadingSpace:x("leadingSpace",function(a){switch(this.getComputedDisplay()){case"inline":case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":case"table-cell":break;default:return this.isRenderedBlock(!1)?"\n":""}return""},"node")});var Ca={character:"",characterType:sa,isBr:!1,prepopulateChar:function(){var a=this;if(!a.prepopulatedChar){var b=a.node,c=a.offset,d="",e=sa,f=!1;if(c>0)if(3==b.nodeType){var g=b.data,h=g.charAt(c-1),i=a.nodeWrapper.getTextNodeInfo(),j=i.spaceRegex;i.collapseSpaces?j.test(h)?c>1&&j.test(g.charAt(c-2))||(i.preLine&&"\n"===g.charAt(c)?(d=" ",e=za):(d=" ",e=va)):(d=h,e=ta,f=!0):(d=h,e=ua,f=!0)}else{var k=b.childNodes[c-1];if(k&&1==k.nodeType&&!u(k)&&("br"==k.tagName.toLowerCase()?(d="\n",a.isBr=!0,e=va,f=!1):a.checkForTrailingSpace=!0),!d){var l=b.childNodes[c];l&&1==l.nodeType&&!u(l)&&(a.checkForLeadingSpace=!0)}}a.prepopulatedChar=!0,a.character=d,a.characterType=e,a.isCharInvariant=f}},isDefinitelyNonEmpty:function(){var a=this.characterType;return a==ta||a==ua},resolveLeadingAndTrailingSpaces:function(){if(this.prepopulatedChar||this.prepopulateChar(),this.checkForTrailingSpace){var a=this.session.getNodeWrapper(this.node.childNodes[this.offset-1]).getTrailingSpace();a&&(this.isTrailingSpace=!0,this.character=a,this.characterType=va),this.checkForTrailingSpace=!1}if(this.checkForLeadingSpace){var b=this.session.getNodeWrapper(this.node.childNodes[this.offset]).getLeadingSpace();b&&(this.isLeadingSpace=!0,this.character=b,this.characterType=va),this.checkForLeadingSpace=!1}},getPrecedingUncollapsedPosition:function(a){for(var b,c=this;c=c.previousVisible();)if(b=c.getCharacter(a),""!==b)return c;return null},getCharacter:function(a){function b(){return n||(k=o.getPrecedingUncollapsedPosition(a),n=!0),k}this.resolveLeadingAndTrailingSpaces();var c,d=this.character,e=f(a.ignoreCharacters),g=""!==d&&e.indexOf(d)>-1;if(this.isCharInvariant)return c=g?"":d;var h=["character",a.includeSpaceBeforeBr,a.includeBlockContentTrailingSpace,a.includePreLineTrailingSpace,e].join("_"),i=this.cache.get(h);if(null!==i)return i;var j,k,l="",m=this.characterType==va,n=!1,o=this;return m&&(this.type==Ba?l="\n":" "==d&&(!b()||k.isTrailingSpace||"\n"==k.character||" "==k.character&&k.characterType==va)||("\n"==d&&this.isLeadingSpace?b()&&"\n"!=k.character&&(l="\n"):(j=this.nextUncollapsed(),j&&(j.isBr?this.type=ya:j.isTrailingSpace&&"\n"==j.character?this.type=xa:j.isLeadingSpace&&"\n"==j.character&&(this.type=wa),"\n"==j.character?(this.type!=ya||a.includeSpaceBeforeBr)&&(this.type!=wa||a.includeSpaceBeforeBlock)&&(this.type==xa&&j.isTrailingSpace&&!a.includeBlockContentTrailingSpace||(this.type!=za||j.type!=ta||a.includePreLineTrailingSpace)&&("\n"==d?j.isTrailingSpace?this.isTrailingSpace||this.isBr&&(j.type=Aa,b()&&k.isLeadingSpace&&!k.isTrailingSpace&&"\n"==k.character?j.character="":j.type=Ba):l="\n":" "==d&&(l=" "))):l=d)))),e.indexOf(l)>-1&&(l=""),this.cache.set(h,l),l},equals:function(a){return!!a&&this.node===a.node&&this.offset===a.offset},inspect:A,toString:function(){return this.character}};z.prototype=Ca,U(Ca,{next:x("nextPos",function(a){var b=a.nodeWrapper,c=a.node,d=a.offset,e=b.session;if(!c)return null;var f,g,h;return d==b.getLength()?(f=c.parentNode,g=f?b.getNodeIndex()+1:0):b.isCharacterDataNode()?(f=c,g=d+1):(h=c.childNodes[d],e.getNodeWrapper(h).containsPositions()?(f=h,g=0):(f=c,g=d+1)),f?e.getPosition(f,g):null}),previous:x("previous",function(a){var b,c,d,e=a.nodeWrapper,f=a.node,g=a.offset,h=e.session;return 0==g?(b=f.parentNode,c=b?e.getNodeIndex():0):e.isCharacterDataNode()?(b=f,c=g-1):(d=f.childNodes[g-1],h.getNodeWrapper(d).containsPositions()?(b=d,c=S.getNodeLength(d)):(b=f,c=g-1)),b?h.getPosition(b,c):null}),nextVisible:x("nextVisible",function(a){var b=a.next();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex()+1)),e}),nextUncollapsed:x("nextUncollapsed",function(a){for(var b=a;b=b.nextVisible();)if(b.resolveLeadingAndTrailingSpaces(),""!==b.character)return b;return null}),previousVisible:x("previousVisible",function(a){var b=a.previous();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex())),e})});var Da=null,Ea=function(){function a(a){var b=new w;return{get:function(c){var d=b.get(c[a]);if(d)for(var e,f=0;e=d[f++];)if(e.node===c)return e;return null},set:function(c){var d=c.node[a],e=b.get(d)||b.set(d,[]);e.push(c)}}}function b(){this.initCaches()}var c=T.isHostProperty(document.documentElement,"uniqueID");return b.prototype={initCaches:function(){this.elementCache=c?function(){var a=new w;return{get:function(b){return a.get(b.uniqueID)},set:function(b){a.set(b.node.uniqueID,b)}}}():a("tagName"),this.textNodeCache=a("data"),this.otherNodeCache=a("nodeName")},getNodeWrapper:function(a){var b;switch(a.nodeType){case 1:b=this.elementCache;break;case 3:b=this.textNodeCache;break;default:b=this.otherNodeCache}var c=b.get(a);return c||(c=new y(a,this),b.set(c)),c},getPosition:function(a,b){return this.getNodeWrapper(a).getPosition(b)},getRangeBoundaryPosition:function(a,b){var c=b?"start":"end";return this.getPosition(a[c+"Container"],a[c+"Offset"])},detach:function(){this.elementCache=this.textNodeCache=this.otherNodeCache=null}},b}();U(S,{nextNode:q,previousNode:r});var Fa=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)if(a[c]===b)return c;return-1};U(a.rangePrototype,{moveStart:M(!0,!1),moveEnd:M(!1,!1),move:M(!0,!0),trimStart:N(!0),trimEnd:N(!1),trim:L(function(a,b){var c=this.trimStart(b),d=this.trimEnd(b);return c||d}),expand:L(function(a,b,c){var d=!1;c=h(c,la);var e=c.characterOptions;if(b||(b=Q),b==R){var f,g,i=c.wordOptions,j=a.getRangeBoundaryPosition(this,!0),k=a.getRangeBoundaryPosition(this,!1),l=F(j,e,i),m=l.nextEndToken(),n=m.chars[0].previousVisible();if(this.collapsed)f=m;else{var o=F(k,e,i);f=o.previousStartToken()}return g=f.chars[f.chars.length-1],n.equals(j)||(this.setStart(n.node,n.offset),d=!0),g&&!g.equals(k)&&(this.setEnd(g.node,g.offset),d=!0),c.trim&&(c.trimStart&&(d=this.trimStart(e)||d),c.trimEnd&&(d=this.trimEnd(e)||d)),d}return this.moveEnd(Q,1,c)}),text:L(function(a,b){return this.collapsed?"":I(a,this,V(b,ga)).join("")}),selectCharacters:L(function(a,b,c,d,e){var f={characterOptions:e};b||(b=W(this.getDocument())),this.selectNodeContents(b),this.collapse(!0),this.moveStart("character",c,f),this.collapse(!0),this.moveEnd("character",d-c,f)}),toCharacterRange:L(function(a,b,c){b||(b=W(this.getDocument()));var d,e,f=b.parentNode,g=S.getNodeIndex(b),h=-1==S.comparePoints(this.startContainer,this.endContainer,f,g),i=this.cloneRange();return h?(i.setStartAndEnd(this.startContainer,this.startOffset,f,g),d=-i.text(c).length):(i.setStartAndEnd(f,g,this.startContainer,this.startOffset),d=i.text(c).length),e=d+this.text(c).length,{start:d,end:e}}),findText:L(function(b,c,d){d=h(d,ja),d.wholeWordsOnly&&(d.wordOptions.includeTrailingSpace=!1);var e=aa(d.direction),f=d.withinRange;f||(f=a.createRange(),f.selectNodeContents(this.getDocument()));var g=c,i=!1;"string"==typeof g?d.caseSensitive||(g=g.toLowerCase()):i=!0;var j=b.getRangeBoundaryPosition(this,!e),k=f.comparePoint(j.node,j.offset);-1===k?j=b.getRangeBoundaryPosition(f,!0):1===k&&(j=b.getRangeBoundaryPosition(f,!1));for(var l,m=j,n=!1;;)if(l=K(m,g,i,f,d)){if(l.valid)return this.setStartAndEnd(l.startPos.node,l.startPos.offset,l.endPos.node,l.endPos.offset),!0;m=e?l.startPos:l.endPos}else{if(!d.wrap||n)return!1;f=f.cloneRange(),m=b.getRangeBoundaryPosition(f,!e),f.setBoundary(j.node,j.offset,e),n=!0}}),pasteHtml:function(a){if(this.deleteContents(),a){var b=this.createContextualFragment(a),c=b.lastChild;this.insertNode(b),this.collapseAfter(c)}}}),U(a.selectionPrototype,{expand:L(function(a,b,c){this.changeEachRange(function(a){a.expand(b,c)})}),move:L(function(a,b,c,d){var e=0;if(this.focusNode){this.collapse(this.focusNode,this.focusOffset);var f=this.getRangeAt(0);d||(d={}),d.characterOptions=V(d.characterOptions,ha),e=f.move(b,c,d),this.setSingleRange(f)}return e}),trimStart:O("trimStart"),trimEnd:O("trimEnd"),trim:O("trim"),selectCharacters:L(function(b,c,d,e,f,g){var h=a.createRange(c);h.selectCharacters(c,d,e,g),this.setSingleRange(h,f)}),saveCharacterRanges:L(function(a,b,c){for(var d=this.getAllRanges(),e=d.length,f=[],g=1==e&&this.isBackward(),h=0,i=d.length;i>h;++h)f[h]={characterRange:d[h].toCharacterRange(b,c),backward:g,characterOptions:c};return f}),restoreCharacterRanges:L(function(b,c,d){this.removeAllRanges();for(var e,f,g,h=0,i=d.length;i>h;++h)f=d[h],g=f.characterRange,e=a.createRange(c),e.selectCharacters(c,g.start,g.end,f.characterOptions),this.addRange(e,f.backward)}),text:L(function(a,b){for(var c=[],d=0,e=this.rangeCount;e>d;++d)c[d]=this.getRangeAt(d).text(b);return c.join("")})}),a.innerText=function(b,c){var d=a.createRange(b);d.selectNodeContents(b);var e=d.text(c);return e},a.createWordIterator=function(a,b,c){var d=C();c=h(c,ma);var e=d.getPosition(a,b),f=F(e,c.characterOptions,c.wordOptions),g=aa(c.direction);return{next:function(){return g?f.previousStartToken():f.nextEndToken()},dispose:function(){f.dispose(),this.next=function(){}}}},a.noMutation=function(a){var b=C();a(b),D()},a.noMutation.createEntryPointFunction=L,a.textRange={isBlockNode:l,isCollapsedWhitespaceNode:t,createPosition:L(function(a,b,c){return a.getPosition(b,c)})}}),a},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;a-1?c=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"):/Edge\/(\d+)./i.test(navigator.userAgent)&&(c=/Edge\/(\d+)./i)),c&&null!=c.exec(navigator.userAgent)&&(d=parseFloat(RegExp.$1)),-1===d?!1:a?b?"<"===b?d>a:">"===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")&&!c(),g=-1!==d.indexOf("AppleWebKit/")&&!c(),h=-1!==d.indexOf("Chrome/")&&!c(),i=-1!==d.indexOf("Opera/")&&!c();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(12,">")},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(),insertOrderedList:c()},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(12,">")},hasProblemsSettingCaretAfterImg:function(){return c()},hasLiDeletingProblem:function(){return c()},hasUndoInContextMenu:function(){return f||h||i},hasInsertNodeIssue:function(){return i},hasIframeFocusIssue:function(){return c()},createsNestedInvalidMarkupAfterPaste:function(){return g},hasCaretBlockElementIssue:function(){return g},supportsMutationEvents:function(){return"MutationEvent"in window},supportsModernPaste:function(){return!c()},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}function c(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")}a.dom.domNode=function(d){var e=[a.ELEMENT_NODE,a.TEXT_NODE];return{is:{emptyTextNode:function(b){var c=b?/^\s*$/g:/^[\r\n]*$/g;return d.nodeType===a.TEXT_NODE&&c.test(d.data)},visible:function(){var b=!/^\s*$/g.test(a.dom.getTextContent(d));return b||1===d.nodeType&&d.querySelector("img, br, hr, object, embed, canvas, input, textarea")&&(b=!0),b},lineBreak:function(){return d&&1===d.nodeType&&"BR"===d.nodeName},block:function(){return d&&1===d.nodeType&&"block"===d.ownerDocument.defaultView.getComputedStyle(d).display},voidElement:function(){return a.dom.domNode(d).test({query:a.VOID_ELEMENTS})}},prev:function(b){var f=d.previousSibling,g=b&&b.nodeTypes?b.nodeTypes:e;return f?c(f)||!a.lang.array(g).contains(f.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(f).is.emptyTextNode(!0)?a.dom.domNode(f).prev(b):f:null},next:function(b){var f=d.nextSibling,g=b&&b.nodeTypes?b.nodeTypes:e;return f?c(f)||!a.lang.array(g).contains(f.nodeType)||b&&b.ignoreBlankTexts&&a.dom.domNode(f).is.emptyTextNode(!0)?a.dom.domNode(f).next(b):f:null},commonAncestor:function(a,c){var e=b(d,c),f=b(a,c);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(c=a.browser.fixStyleKey(g[h]),d.style[c]){if(!b.styleValue){f=!0;break}if(b.styleValue instanceof RegExp){if(d.style[c].trim().match(b.styleValue).length>0){f=!0;break}}else if(Array.isArray(b.styleValue)){if(b.styleValue.indexOf(d.style[c].trim())){f=!0;break}}else if(b.styleValue===d.style[c].trim().replace(/, /g,",")){f=!0;break}}if(!f)return!1}if(b.attribute){var j=a.dom.getAttributes(d),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)if(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 s&&s.length>0&&(j["class"]=wysihtml5.lang.array(s).unique().join(" "));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){for(;a.firstChild;)a.parentNode.insertBefore(a.firstChild,a);a.parentNode.removeChild(a)}},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()},destroy:function(){},_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,!1),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 wysihtml5.browser.supportsModernPaste()&&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 a=this.getRange();this.deleteRangeContents(a),this.setSelection(a)},deleteRangeContents:function(b){var c,d,e,f;if(this.unselectableClass){(c=a.dom.getParentElement(b.startContainer,{query:"."+this.unselectableClass},!1,this.contain))&&b.setStartBefore(c),(d=a.dom.getParentElement(b.endContainer,{query:"."+this.unselectableClass},!1,this.contain))&&b.setEndAfter(d),e=b.getNodes([1],function(b){return a.dom.hasClass(b,this.unselectableClass)}.bind(this));for(var g=e.length;g--;)try{f=new CustomEvent("wysihtml5:uneditable:delete"),e[g].dispatchEvent(f)}catch(h){}}b.deleteContents()},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)},getNodesNearCaret:function(){if(!this.isCollapsed())throw"Selection must be caret when using selection.getNodesNearCaret()";var a,b,c,d,e=this.getOwnRanges();return e&&e.length>0?(1===e[0].startContainer.nodeType?(a=e[0].startContainer.childNodes[e[0].startOffset-1],a||0!==e[0].startOffset?a&&(b=a.previousSibling,c=a.nextSibling):c=e[0].startContainer.childNodes[0]):(a=e[0].startContainer,b=a.previousSibling,c=a.nextSibling,d=e[0].startOffset),{caretNode:a,prevNode:b,nextNode:c,textOffset:d}):null},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(f&&3===f.nodeType&&/^\s*$/.test(f.data.slice(0,g))&&(g=0),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,d=this.getRange(),e=this.doc.createElement("DIV"),f=this.doc.createDocumentFragment();if(d){for(d.deleteContents(),e.innerHTML=a,b=e.lastChild;e.firstChild;)f.appendChild(e.firstChild);for(d.insertNode(f),c=this.contain.lastChild;c&&3===c.nodeType&&c.previousSibling&&/^\s*$/.test(c.data);)c=c.previousSibling;b&&(c&&b===c&&1===b.nodeType&&this.contain.appendChild(this.doc.createElement("br")),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},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(){var b=rangy.createRange();a.browser.supportsSelectionModify()?this._selectLine_W3C():b.nativeRange&&b.nativeRange.getBoundingClientRect&&this._selectLineUniversal()},includeRangyRangeHelpers:function(){var a=this.getSelection(),b=a.getRangeAt(0),c=function(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")},d=function(a){return 1===a.nodeType?a.childNodes&&a.childNodes.length||0:a.data&&a.data.length||0},e=1===a.anchorNode.nodeType?a.anchorNode.childNodes[a.anchorOffset]:a.anchorNode,f=1===a.focusNode.nodeType?a.focusNode.childNodes[a.focusOffset]:a.focusNode;f&&a.focusOffset===d(f)&&f.nextSibling&&c(f.nextSibling)&&b.setEndAfter(f.nextSibling),e&&0===a.anchorOffset&&e.previousSibling&&c(e.previousSibling)&&b.setStartBefore(e.previousSibling),b.select()},_selectLine_W3C:function(){var a=this.win.getSelection(),b=[a.anchorNode,a.anchorOffset,a.focusNode,a.focusOffset];a.modify("move","left","lineboundary"),a.modify("extend","right","lineboundary"),a.anchorNode===b[0]&&a.anchorOffset===b[1]&&a.focusNode===b[2]&&a.focusOffset===b[3]?this._selectLineUniversal():this.includeRangyRangeHelpers()},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())}},getRangeRect:function(a){var b,c=(this.doc.createTextNode("i"),this.doc.createTextNode("i"));return a.collapsed?(a.insertNode(c),a.selectNode(c),b=a.nativeRange.getBoundingClientRect(),a.deleteContents()):b=a.nativeRange.getBoundingClientRect(),b},_selectLineUniversal:function(){var b,c,d,e,f,g,h=this.getSelection(),i=h.getRangeAt(0),j=0,k=this,l=function(b){return b&&1===b.nodeType&&("block"===k.win.getComputedStyle(b).display||a.lang.array(["BR","HR"]).contains(b.nodeName))},m=function(a){var b=a;if(b)for(;b&&(1===b.nodeType&&b.classList.contains("rangySelectionBoundary")||3===b.nodeType&&/^\s*$/.test(b.data));)b=b.previousSibling;return b};c=i.cloneRange(),d=i.cloneRange(),i.collapsed&&(3===i.startContainer.nodeType&&i.startOffset0?i.moveEnd("character",1):i.startOffset>0&&(3===i.startContainer.nodeType||1===i.startContainer.nodeType&&!l(m(i.startContainer.childNodes[i.startOffset-1])))&&i.moveStart("character",-1)),i.collapsed||i.insertNode(this.doc.createTextNode(a.INVISIBLE_SPACE)),b=i.nativeRange.getBoundingClientRect();do e=i.moveStart("character",-1),f=i.nativeRange.getBoundingClientRect(),f&&Math.floor(f.top)===Math.floor(b.top)||(i.moveStart("character",1),g=!0),j++;while(0!==e&&!g&&2e3>j);j=0,g=!1,b=i.nativeRange.getBoundingClientRect();do e=i.moveEnd("character",1),f=i.nativeRange.getBoundingClientRect(),f&&Math.floor(f.bottom)===Math.floor(b.bottom)||(i.moveEnd("character",-1),i.endContainer&&1===i.endContainer.nodeType&&i.endContainer.childNodes[i.endOffset]&&1===i.endContainer.childNodes[i.endOffset].nodeType&&"BR"===i.endContainer.childNodes[i.endOffset].nodeName&&i.endContainer.childNodes[i.endOffset].previousSibling&&(1===i.endContainer.childNodes[i.endOffset].previousSibling.nodeType?i.setEnd(i.endContainer.childNodes[i.endOffset].previousSibling,i.endContainer.childNodes[i.endOffset].previousSibling.childNodes.length):3===i.endContainer.childNodes[i.endOffset].previousSibling.nodeType&&i.setEnd(i.endContainer.childNodes[i.endOffset].previousSibling,i.endContainer.childNodes[i.endOffset].previousSibling.data.length)),g=!0),j++;while(0!==e&&!g&&2e3>j);i.select(),this.includeRangyRangeHelpers()},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(a,b){return 3===a.nodeType?a:a.childNodes[b]||a}function d(a){return a&&1===a.nodeType&&"BR"===a.nodeName}function e(a,b){return a&&1===a.nodeType&&"block"===b.win.getComputedStyle(a).display}function f(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")}function g(a,b){return d(a)||e(a,b)}function h(b,c){a.dom.removeInvisibleSpaces(b.element);for(var d,e=b.element,f=e.querySelectorAll(E),g=b.config.classNames.uneditableContainer+[""].concat(E.split(",")).join(", "+b.config.classNames.uneditableContainer+" "),h=e.querySelectorAll(g),i=a.lang.array(f).without(h),j=i.length;j--;)""===i[j].innerHTML.replace(/[\uFEFF]/g,"")&&(d=a.lang.array(c).indexOf(i[j]),d>-1&&c.splice(d,1),i[j].parentNode.removeChild(i[j]));return c}function i(a){return a.config.useLineBreaks?"DIV":"P"}function j(a,b,c){for(var d=a,e=null;d&&b&&d!==b;)1===d.nodeType&&d.matches(c?E:D)&&(e=d),d=d.parentNode;return e}function k(a,b){for(var c,d,e,f=a,g=null;f&&b&&f!==b;)1===f.nodeType&&f.matches(F)&&(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 l(b,c,d){return b||(b=d.doc.createElement(c.nodeName||i(d)),b.appendChild(d.doc.createTextNode(a.INVISIBLE_SPACE))),c.nodeName&&b.nodeName!==c.nodeName&&(b=C.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 m(b,c,d){var e,f=b.previousSibling,g=b.nextSibling,h=!1;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.toLowerCase()===c.nodeName.toLowerCase()&&(e=b.getAttribute("style"),e&&""!==e.trim()?b=C.renameElement(b,i(d)):(C.unwrap(b),h=!0)),null!==b.getAttribute("style")&&""===b.getAttribute("style").trim()&&b.removeAttribute("style"),h&&u(f,g,d)}function n(b){for(var c,d,e=b.querySelectorAll(E)||[],f=e.length;f--;)c=a.dom.domNode(e[f]).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),d=a.dom.domNode(e[f]).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),c&&1!==c.nodeType&&"BR"!==c.nodeName&&""!==(e[f].innerHTML||e[f].nodeValue||"").trim()&&e[f].parentNode.insertBefore(e[f].ownerDocument.createElement("BR"),c),c&&1!==c.nodeType&&"BR"!==c.nodeName&&""!==(e[f].innerHTML||e[f].nodeValue||"").trim()&&e[f].parentNode.insertBefore(e[f].ownerDocument.createElement("BR"),c),a.dom.unwrap(e[f])}function o(a,b){var c,d=a.startContainer,e=a.endContainer;return d&&1===d.nodeType&&d===e?void(d.firstChild===d.lastChild&&1===a.endOffset&&d!==b.element&&"LI"!==d.nodeName&&"TD"!==d.nodeName&&(a.setStartBefore(d),a.setEndAfter(e))):d&&1===d.nodeType&&3===e.nodeType?void(d.firstChild===e&&a.endOffset===e.data.length&&d!==b.element&&"LI"!==d.nodeName&&"TD"!==d.nodeName&&a.setEndAfter(d)):e&&1===e.nodeType&&3===d.nodeType?void(e.firstChild===d&&0===a.startOffset&&e!==b.element&&"LI"!==e.nodeName&&"TD"!==e.nodeName&&a.setStartBefore(e)):d&&3===d.nodeType&&d===e&&1===d.parentNode.childNodes.length?void(a.endOffset==e.data.length&&0===a.startOffset&&(c=d.parentNode,c!==b.element&&"LI"!==c.nodeName&&"TD"!==c.nodeName&&(a.setStartBefore(c),a.setEndAfter(c)))):void 0}function p(b){for(var c,d,e,f,g,h,i=[],j=0,k=b.length;k>j;j++)if(1===b[j].startContainer.nodeType&&b[j].startContainer.matches("ul, ol")&&b[j].setStart(b[j].startContainer.childNodes[b[j].startOffset],0),1===b[j].endContainer.nodeType&&b[j].endContainer.matches("ul, ol")&&(h=b[j].endContainer.childNodes[Math.max(b[j].endOffset-1,0)],h.childNodes&&b[j].setEnd(h,h.childNodes.length)),c=b[j].getNodes([1],function(a){return"LI"===a.nodeName}),c.length>0){for(d=0,e=c.length;e>d;d++)g=b[j].compareNode(c[d]),(g===b[j].NODE_AFTER||g===b[j].NODE_INSIDE)&&(f=b[j].cloneRange(),h=a.dom.domNode(c[d]).prev({nodeTypes:[1]}),h?f.setEnd(h,h.childNodes.length):c[d].closest("ul, ol")?f.setEndBefore(c[d].closest("ul, ol")):f.setEndBefore(c[d]),i.push(f),b[j].setStart(c[d],0)),(g===b[j].NODE_BEFORE||g===b[j].NODE_INSIDE)&&(f=b[j].cloneRange(),f.setEnd(c[d],c[d].childNodes.length),i.push(f),h=a.dom.domNode(c[d]).next({nodeTypes:[1]}),h?b[j].setStart(h,0):c[d].closest("ul, ol")?b[j].setStartAfter(c[d].closest("ul, ol")):b[j].setStartAfter(c[d]));i.push(b[j])}else i.push(b[j]);return i}function q(b,c,d){var e=b?a.lang.object(b).clone(!0):null;return e&&(e.nodeName=e.nodeName||c||i(d)),e}function r(b,c,d,e){var f,h,i,l,m,n=c.startContainer,e=e||j(n,d.element,!0);if(e)h=b.firstChild,i=b.lastChild,d.selection.splitElementAtCaret(e,b),m=a.dom.domNode(i).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),l=a.dom.domNode(h).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),h&&!g(h,d)&&l&&!g(l,d)&&h.parentNode.insertBefore(d.doc.createElement("br"),h),i&&!g(i,d)&&m&&!g(m,d)&&m.parentNode.insertBefore(d.doc.createElement("br"),m);else if(f=k(n,d.element),f.outerNode&&f.innerNode&&f.parent){if(1===b.childNodes.length){for(;b.firstChild.firstChild;)f.innerNode.appendChild(b.firstChild.firstChild);b.firstChild.appendChild(f.outerNode)}d.selection.splitElementAtCaret(f.parent,b)}else c.insertNode(b)}function s(b,d,e){for(var f,h,i=b.cloneRange(),j=c(i.startContainer,i.startOffset).previousSibling,k=c(i.endContainer,i.endOffset).nextSibling,l=i.extractContents(),m=e.doc.createDocumentFragment(),o=!0;l.firstChild;){if(1===l.firstChild.nodeType&&l.firstChild.matches(E)){n(l.firstChild),f=a.dom.unwrap(l.firstChild),f.length>0&&(m.lastChild&&(1!==m.lastChild.nodeType||!g(m.lastChild,e))||!m.lastChild&&j&&(1!==j.nodeType||g(j,e)))&&m.appendChild(e.doc.createElement("BR"));for(var p=0,q=f.length;q>p;p++)m.appendChild(f[p]);f.length>0&&(1===m.lastChild.nodeType&&g(m.lastChild,e)||(k||m.lastChild!==l.lastChild)&&m.appendChild(e.doc.createElement("BR")))}else m.appendChild(l.firstChild);o=!1}return h=a.lang.array(m.childNodes).get(),r(m,i,e),h}function t(b,c,e){var f=b&&a.dom.domNode(b).prev({nodeTypes:[1,3],ignoreBlankTexts:!0});d(c)&&c.parentNode.removeChild(c),!d(b)||f&&1===f.nodeType&&"block"===e.win.getComputedStyle(f).display||b.parentNode.removeChild(b)}function u(a,b,c){var e;a&&f(a)&&(a=a.previousSibling),b&&f(b)&&(b=b.nextSibling),e=a&&a.previousSibling,a&&(1!==a.nodeType||"block"!==c.win.getComputedStyle(a).display&&!d(a))&&a.parentNode&&a.parentNode.insertBefore(c.doc.createElement("br"),a.nextSibling),b&&(1!==b.nodeType||"block"!==c.win.getComputedStyle(b).display)&&b.parentNode&&b.parentNode.insertBefore(c.doc.createElement("br"),b)}function v(d,e,f,g){var h,i,k=e?b(e):null,m=d.cloneRange(),o=m.startContainer,p=c(m.startContainer,m.startOffset),s=c(m.endContainer,m.endOffset),u=m.startContainer!==p||3!==p.nodeType||G(p,m.startOffset)?a.dom.domNode(p).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}):p,v=1===m.endContainer.nodeType&&m.endContainer.childNodes[m.endOffset]===s||m.endContainer===s&&3===s.nodeType&&!H(s,m.endOffset)?s:a.dom.domNode(c(m.endContainer,m.endOffset)).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),w=m.extractContents(),x=g.doc.createDocumentFragment(),y=k?a.dom.getParentElement(o,k,null,g.element):null,z=!f||!e||"BLOCKQUOTE"===e.nodeName&&"BLOCKQUOTE"===f,A=y||j(o,g.element,z);if(I(w),e&&"BLOCKQUOTE"===e.nodeName){var B=l(null,e,g);B.appendChild(w),x.appendChild(B),i=[B]}else{if(w.firstChild)for(;w.firstChild;)if(1==w.firstChild.nodeType&&w.firstChild.matches(E))l(w.firstChild,e,g),w.firstChild.matches(D)&&n(w.firstChild),x.appendChild(w.firstChild);else{for(h=l(null,q(e,f,g),g);w.firstChild&&(1!==w.firstChild.nodeType||!w.firstChild.matches(E));)1==w.firstChild.nodeType&&h.matches(D)&&n(w.firstChild),h.appendChild(w.firstChild);x.appendChild(h)}else x.appendChild(l(null,e,g));i=a.lang.array(x.childNodes).get()}return r(x,m,g,A),t(u,v,g),i}function w(b,c){var d=a.dom.getParentElement(b,{query:E},null,c.element);return d?d.nodeName:null}function x(b,c){var d,e=a.dom.getParentElement(b.selection.getOwnRanges()[0].startContainer,{query:D+", "+(c?c.toLowerCase():"div")},null,b.element);e?(d=b.selection.createRange(),d.selectNode(e),b.selection.setSelection(d)):b.isEmpty()||b.selection.selectLine()}function y(a,b){var c=b.selection.createRange(),d=a[a.length-1],e=1===d.nodeType&&d.childNodes?0|d.childNodes.length:d.length||0;c.setStart(a[0],0),c.setEnd(d,e),c.select()}function z(a,b,c){var d,e=b.selection.getOwnRanges(),f=[];e=p(e);for(var g=e.length;g--;)o(e[g],b),d=w(e[g].startContainer,b),f="remove"===a?f.concat(s(e[g],d,b)):f.concat(v(e[g],c,d,b));return f}function A(a){return"string"==typeof a&&(a={nodeName:a.toUpperCase()}),a}function B(b){var c;return b.selection.isCollapsed()&&(c=b.selection.getNodesNearCaret(),c&&c.caretNode&&(a.dom.domNode(c.caretNode).is.lineBreak()||3===c.caretNode.nodeType&&0===c.textOffset&&(!c.prevNode||a.dom.domNode(c.prevNode).is.lineBreak())||1===c.caretNode.nodeType&&c.caretNode.classList.contains("rangySelectionBoundary")&&(!c.prevNode||a.dom.domNode(c.prevNode).is.lineBreak()||a.dom.domNode(c.prevNode).is.block())&&(!c.nextNode||a.dom.domNode(c.nextNode).is.lineBreak()||a.dom.domNode(c.nextNode).is.block())))?!0:!1}var C=a.dom,D="h1, h2, h3, h4, h5, h6, p, pre",E="h1, h2, h3, h4, h5, h6, p, pre, div, blockquote",F="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",G=function(a,b){var c=a.data?a.data.slice(0,b):"";return/^\s*$/.test(c)},H=function(a,b){var c=a.data?a.data.slice(b):"";return/^\s*$/.test(c)},I=function(a){if(a){for(;a.firstChild&&3===a.firstChild.nodeType&&/^\s*$/.test(a.firstChild.data)&&a.lastChild!==a.firstChild;)a.removeChild(a.firstChild);for(;a.lastChild&&3===a.lastChild.nodeType&&/^\s*$/.test(a.lastChild.data)&&a.lastChild!==a.firstChild;)a.removeChild(a.lastChild);a.firstChild&&1===a.firstChild.nodeType&&"BR"===a.firstChild.nodeName&&a.lastChild!==a.firstChild&&a.removeChild(a.firstChild),a.lastChild&&1===a.lastChild.nodeType&&"BR"===a.lastChild.nodeName&&a.lastChild!==a.firstChild&&a.removeChild(a.lastChild)}};a.commands.formatBlock={exec:function(a,b,c){c=A(c);var d,e,f=[];if(c&&c.toggle&&(e=this.state(a,b,c)),e){d=rangy.saveSelection(a.win);for(var g=0,i=e.length;i>g;g++)m(e[g],c,a)}else a.selection.isCollapsed()&&(d=rangy.saveSelection(a.win),B(a)?a.selection.selectLine():x(a,c&&c.nodeName?c.nodeName.toUpperCase():void 0)),f=c?z("apply",a,c):z("remove",a);f=h(a,f),d?rangy.restoreSelection(d):y(f,a)},remove:function(a,b,c){c=A(c);var d,e;a.selection.isCollapsed()&&(e=rangy.saveSelection(a.win),x(a,c&&c.nodeName?c.nodeName.toUpperCase():void 0)),d=z("remove",a),d=h(a,d),e?rangy.restoreSelection(e):y(d,a)},state:function(b,c,d){d=A(d);for(var e,f=b.selection.filterElements(function(b){return a.dom.domNode(b).test(d||{query:E})}.bind(this)),g=b.selection.getSelectedOwnNodes(),h=0,i=g.length;i>h;h++)e=C.getParentElement(g[h],d||{query:E},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):(f.classRegExp&&(e.className=e.className.replace(f.classRegExp,"")),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.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(a,c){a.selection.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){var d,e,f=rangy.saveSelection(c.win),g="_wysihtml5-temp-"+(new Date).getTime();c.commands.exec("formatBlock",{nodeName:"div",className:g});var h=c.element.querySelector("."+g);h.innerHTML=h.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),h&&(d=/^(\s|(
))+$/i.test(h.innerHTML),e=a.dom.convertToList(h,b.toLowerCase(),c.parent.config.classNames.uneditableContainer),f&&rangy.restoreSelection(f),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){var b={styleProperty:"textAlign",styleValue:"justify",toggle:!0};a.commands.alignJustifyStyle={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",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()?"":"
"},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!==!1&&(a=this.parent.parse(a));try{this.element.innerHTML=a}catch(c){this.element.innerText=a}},cleanUp:function(a){var b;this.selection&&this.selection.isInThisEditable()&&(b=rangy.saveSelection(this.win)),this.parent.parse(this.element,void 0,a),b&&rangy.restoreSelection(b)},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),this._initAutoLinking(),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._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,!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.executeAndRestoreRangy(function(){e.config.useLineBreaks?((!c.firstChild||c.firstChild===c.lastChild&&1===c.firstChild.nodeType&&c.firstChild.classList.contains("rangySelectionBoundary"))&&c.appendChild(e.doc.createElement("br")),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"],function(){e.isEmpty()&&setTimeout(function(){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))},0)}),b.observe(this.element,"keydown",function(c){var h=c.keyCode;if(!(c.shiftKey||c.ctrlKey||c.defaultPrevented||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=b.domNode,d=a.browser,e={66:"bold",73:"italic",85:"underline"},f=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.addEventListener(b[d],c,!1)},g=function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.removeEventListener(b[d],c,!1)},h=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},i=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(h(a,!0))return!0;try{var c=new CustomEvent("wysihtml5:uneditable:delete",{bubbles:!0,cancelable:!1});b.node.dispatchEvent(c)}catch(d){}return b.node.parentNode.removeChild(b.node),!0}return!1},j=function(b){var d=b.selection,e=d.getPreviousNode();if(d.caretIsFirstInSelection()&&e&&1===e.nodeType&&/block/.test(b.win.getComputedStyle(e).display)&&!c(e).test({query:"ol, ul, table, tr, dl"})){if(/^\s*$/.test(e.textContent||e.innerText))return e.parentNode.removeChild(e),!0;if(e.lastChild){var f=e.lastChild,g=d.getSelectedNode(),h=c(e).commonAncestor(g,b.element);if(curNode=3===g.nodeType?g:a.dom.getParentElement(g,{query:"h1, h2, h3, h4, h5, h6, p, pre, div, blockquote"},!1,h||b.element),curNode)return c(curNode).transferContentTo(e,!0),d.setAfter(f),!0}}return!1},k=function(b){if(a.browser.hasLiDeletingProblem()){var d,e,f=b.selection.getSelection(),g=f.anchorNode,h=b.selection.caretIsFirstInSelection();if(3===g.nodeType&&0===f.anchorOffset&&g===g.parentNode.firstChild&&(g=g.parentNode,h=!0),h&&g&&1===g.nodeType&&"LI"===g.nodeName&&(d=c(g).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),d||!g.parentNode||"UL"!==g.parentNode.nodeName&&"OL"!==g.parentNode.nodeName||(d=c(g.parentNode).prev({nodeTypes:[1,3],ignoreBlankTexts:!0})),d))return e=g.firstChild,c(g).transferContentTo(d,!0),e?b.selection.setBefore(e):d&&(1===d.nodeType?d.lastChild?b.selection.setAfter(d.lastChild):b.selection.selectNode(d):b.selection.setAfter(d)),!0}return!1},l=function(a,b){var c=b.selection;b.element;if(c.isCollapsed()){if(i(b))return void a.preventDefault();if(k(b))return void a.preventDefault();if(j(b))return void a.preventDefault();if(h(b))return void a.preventDefault()}else c.containsUneditable()&&(a.preventDefault(),c.deleteContents())},m=function(d,e){if(e.config.useLineBreaks&&!d.shiftKey&&!d.ctrlKey){var f,g,h="p, pre, div, blockquote";if(e.selection.isCollapsed()&&(f=e.selection.getNodesNearCaret(),f&&((f.caretNode||f.nextNode)&&(g=b.getParentElement(f.caretNode||f.nextNode,{query:h},2),g===e.element&&(g=void 0)),g&&f.caretNode)))if(c(f.caretNode).is.lineBreak()){if(e.config.doubleLineBreakEscapesBlock){d.preventDefault(),f.caretNode.parentNode.removeChild(f.caretNode),c(f.nextNode).is.lineBreak()&&f.nextNode.parentNode.removeChild(f.nextNode);var i=e.doc.createElement("br");c(f.nextNode).is.lineBreak()&&f.nextNode===g.lastChild?g.parentNode.insertBefore(i,g.nextSibling):e.selection.splitElementAtCaret(g,i),f.nextNode&&3===f.nextNode.nodeType&&(f.nextNode.data=f.nextNode.data.replace(/^ *[\r\n]+/,"")),e.selection.setBefore(i)}}else if(3===f.caretNode.nodeType&&a.browser.hasCaretBlockElementIssue()&&f.textOffset===f.caretNode.data.length&&!f.nextNode){d.preventDefault();var j=e.doc.createElement("br"),k=e.doc.createElement("br"),l=e.doc.createDocumentFragment();l.appendChild(j),l.appendChild(k),e.selection.insertNode(l),e.selection.setBefore(k)}}},n=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"," ")},o=function(a){this.domNodeRemovedInterval&&clearInterval(domNodeRemovedInterval),this.parent.fire("destroy:composer")},p=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)},q=function(a){this.parent.fire("focus",a).fire("focus:composer",a),setTimeout(function(){this.focusState=this.getValue(!1,!1)}.bind(this),0)},r=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)},s=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)},t=function(b){this.config.copyedFromMarking&&(a.browser.supportsModernPaste()&&(b.clipboardData.setData("text/html",this.config.copyedFromMarking+this.selection.getHtml()),b.clipboardData.setData("text/plain",this.selection.getPlainText()),b.preventDefault()),this.parent.fire(b.type,b).fire(b.type+":composer",b))},u=function(b){var c=b.keyCode;(c===a.SPACE_KEY||c===a.ENTER_KEY)&&this.parent.fire("newword:composer")},v=function(b){if(!d.canSelectImagesInContentEditable()){var c=b.target,e=this.element.querySelectorAll("img"),f=this.element.querySelectorAll("."+this.config.classNames.uneditableContainer+" img"),g=a.lang.array(e).without(f);"IMG"===c.nodeName&&a.lang.array(g).contains(c)&&this.selection.selectNode(c)}},w=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)}},x=function(a){d.canSelectImagesInContentEditable()||setTimeout(function(){this.selection.getSelection().removeAllRanges()}.bind(this),0)},y=function(b){var c,d,f=b.keyCode,g=e[f];return!b.ctrlKey&&!b.metaKey||b.altKey||65!==f?((b.ctrlKey||b.metaKey)&&!b.altKey&&g&&(this.commands.exec(g),
-b.preventDefault()),f===a.BACKSPACE_KEY&&l(b,this),(f===a.BACKSPACE_KEY||f===a.DELETE_KEY)&&(c=this.selection.getSelectedNode(!0),c&&"IMG"===c.nodeName&&(b.preventDefault(),d=c.parentNode,d.removeChild(c),"A"!==d.nodeName||d.firstChild||d.parentNode.removeChild(d),setTimeout(function(){a.quirks.redraw(this.element)}.bind(this),0))),this.config.handleTabKey&&f===a.TAB_KEY&&(b.preventDefault(),n(this,this.element,b.shiftKey)),void(f===a.ENTER_KEY&&m(b,this))):(this.selection.selectAll(),void b.preventDefault())},z=function(){var b=function(){window.removeEventListener("load",b),this.doc.execCommand("enableObjectResizing",!1,"false"),this.doc.execCommand("enableInlineTableEditing",!1,"false")}.bind(this),c=function(){b.call(this),g(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?f(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c):window.addEventListener("load",b)),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(),c=(this.element,d.supportsEventsInIframeCorrectly()||this.sandbox.getContentEditable?this.element:this.sandbox.getWindow());this.focusState=this.getValue(!1,!1),a.addEventListener(["DOMNodeRemoved"],o.bind(this),!1),d.supportsMutationEvents()||(this.domNodeRemovedInterval=setInterval(function(){b.contains(document.documentElement,a)||o.call(this)},250)),this.config.handleTables&&z.call(this),f(c,["drop","paste","mouseup","focus","keyup"],p.bind(this)),c.addEventListener("focus",q.bind(this),!1),c.addEventListener("blur",r.bind(this),!1),f(this.element,["drop","paste","beforepaste"],s.bind(this),!1),this.element.addEventListener("copy",t.bind(this),!1),this.element.addEventListener("mousedown",v.bind(this),!1),this.element.addEventListener("click",w.bind(this),!1),this.element.addEventListener("drop",x.bind(this),!1),this.element.addEventListener("keyup",u.bind(this),!1),this.element.addEventListener("keydown",y.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!==!1&&(a=this.parent.parse(a)),this.element.value=a},cleanUp:function(a){var b=this.parent.parse(this.element.value,void 0,a);this.element.value=b},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:{},b:{},i:{},u:{}},classes:{}},pasteParserRulesets:null,parser:a.dom.parse,useLineBreaks:!0,doubleLineBreakEscapesBlock:!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(a){this.currentView.cleanUp(a)},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()},destroy:function(){this.composer&&this.composer.sandbox&&this.composer.sandbox.destroy(),this.toolbar&&this.toolbar.destroy(),this.off()},parse:function(b,c,d){var e=this.config.contentEditableMode?document:this.composer?this.composer.sandbox.getDocument():null,f=this.config.parser(b,{rules:d||this.config.parserRules,cleanUp:this.config.cleanUp,context:e,uneditableClass:this.config.classNames.uneditableContainer,clearInternals:c});return"object"==typeof b&&a.quirks.redraw(b),f},_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);
+isCollapsedWhitespace:x("isCollapsedWhitespace",t,"node"),getComputedDisplay:x("computedDisplay",i,"node"),isCollapsed:x("collapsed",u,"node"),isIgnored:x("ignored",v,"node"),next:x("nextPos",q,"node"),previous:x("previous",r,"node"),getTextNodeInfo:x("textNodeInfo",function(a){var b=null,c=!1,d=na(a.parentNode,"whiteSpace"),e="pre-line"==d;return e?(b=Y,c=!0):("normal"==d||"nowrap"==d)&&(b=X,c=!0),{node:a,text:a.data,spaceRegex:b,collapseSpaces:c,preLine:e}},"node"),hasInnerText:x("hasInnerText",function(a,b){for(var c=this.session,d=c.getPosition(a.parentNode,this.getNodeIndex()+1),e=c.getPosition(a,0),f=b?d:e,g=b?e:d;f!==g;){if(f.prepopulateChar(),f.isDefinitelyNonEmpty())return!0;f=b?f.previousVisible():f.nextVisible()}return!1},"node"),isRenderedBlock:x("isRenderedBlock",function(a){for(var b=a.getElementsByTagName("br"),c=0,d=b.length;d>c;++c)if(!u(b[c]))return!0;return this.hasInnerText()},"node"),getTrailingSpace:x("trailingSpace",function(a){if("br"==a.tagName.toLowerCase())return"";switch(this.getComputedDisplay()){case"inline":for(var b=a.lastChild;b;){if(!v(b))return 1==b.nodeType?this.session.getNodeWrapper(b).getTrailingSpace():"";b=b.previousSibling}break;case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":break;case"table-cell":return" ";default:return this.isRenderedBlock(!0)?"\n":""}return""},"node"),getLeadingSpace:x("leadingSpace",function(a){switch(this.getComputedDisplay()){case"inline":case"inline-block":case"inline-table":case"none":case"table-column":case"table-column-group":case"table-cell":break;default:return this.isRenderedBlock(!1)?"\n":""}return""},"node")});var Ca={character:"",characterType:sa,isBr:!1,prepopulateChar:function(){var a=this;if(!a.prepopulatedChar){var b=a.node,c=a.offset,d="",e=sa,f=!1;if(c>0)if(3==b.nodeType){var g=b.data,h=g.charAt(c-1),i=a.nodeWrapper.getTextNodeInfo(),j=i.spaceRegex;i.collapseSpaces?j.test(h)?c>1&&j.test(g.charAt(c-2))||(i.preLine&&"\n"===g.charAt(c)?(d=" ",e=za):(d=" ",e=va)):(d=h,e=ta,f=!0):(d=h,e=ua,f=!0)}else{var k=b.childNodes[c-1];if(k&&1==k.nodeType&&!u(k)&&("br"==k.tagName.toLowerCase()?(d="\n",a.isBr=!0,e=va,f=!1):a.checkForTrailingSpace=!0),!d){var l=b.childNodes[c];l&&1==l.nodeType&&!u(l)&&(a.checkForLeadingSpace=!0)}}a.prepopulatedChar=!0,a.character=d,a.characterType=e,a.isCharInvariant=f}},isDefinitelyNonEmpty:function(){var a=this.characterType;return a==ta||a==ua},resolveLeadingAndTrailingSpaces:function(){if(this.prepopulatedChar||this.prepopulateChar(),this.checkForTrailingSpace){var a=this.session.getNodeWrapper(this.node.childNodes[this.offset-1]).getTrailingSpace();a&&(this.isTrailingSpace=!0,this.character=a,this.characterType=va),this.checkForTrailingSpace=!1}if(this.checkForLeadingSpace){var b=this.session.getNodeWrapper(this.node.childNodes[this.offset]).getLeadingSpace();b&&(this.isLeadingSpace=!0,this.character=b,this.characterType=va),this.checkForLeadingSpace=!1}},getPrecedingUncollapsedPosition:function(a){for(var b,c=this;c=c.previousVisible();)if(b=c.getCharacter(a),""!==b)return c;return null},getCharacter:function(a){function b(){return n||(k=o.getPrecedingUncollapsedPosition(a),n=!0),k}this.resolveLeadingAndTrailingSpaces();var c,d=this.character,e=f(a.ignoreCharacters),g=""!==d&&e.indexOf(d)>-1;if(this.isCharInvariant)return c=g?"":d;var h=["character",a.includeSpaceBeforeBr,a.includeBlockContentTrailingSpace,a.includePreLineTrailingSpace,e].join("_"),i=this.cache.get(h);if(null!==i)return i;var j,k,l="",m=this.characterType==va,n=!1,o=this;return m&&(this.type==Ba?l="\n":" "==d&&(!b()||k.isTrailingSpace||"\n"==k.character||" "==k.character&&k.characterType==va)||("\n"==d&&this.isLeadingSpace?b()&&"\n"!=k.character&&(l="\n"):(j=this.nextUncollapsed(),j&&(j.isBr?this.type=ya:j.isTrailingSpace&&"\n"==j.character?this.type=xa:j.isLeadingSpace&&"\n"==j.character&&(this.type=wa),"\n"==j.character?(this.type!=ya||a.includeSpaceBeforeBr)&&(this.type!=wa||a.includeSpaceBeforeBlock)&&(this.type==xa&&j.isTrailingSpace&&!a.includeBlockContentTrailingSpace||(this.type!=za||j.type!=ta||a.includePreLineTrailingSpace)&&("\n"==d?j.isTrailingSpace?this.isTrailingSpace||this.isBr&&(j.type=Aa,b()&&k.isLeadingSpace&&!k.isTrailingSpace&&"\n"==k.character?j.character="":j.type=Ba):l="\n":" "==d&&(l=" "))):l=d)))),e.indexOf(l)>-1&&(l=""),this.cache.set(h,l),l},equals:function(a){return!!a&&this.node===a.node&&this.offset===a.offset},inspect:A,toString:function(){return this.character}};z.prototype=Ca,U(Ca,{next:x("nextPos",function(a){var b=a.nodeWrapper,c=a.node,d=a.offset,e=b.session;if(!c)return null;var f,g,h;return d==b.getLength()?(f=c.parentNode,g=f?b.getNodeIndex()+1:0):b.isCharacterDataNode()?(f=c,g=d+1):(h=c.childNodes[d],e.getNodeWrapper(h).containsPositions()?(f=h,g=0):(f=c,g=d+1)),f?e.getPosition(f,g):null}),previous:x("previous",function(a){var b,c,d,e=a.nodeWrapper,f=a.node,g=a.offset,h=e.session;return 0==g?(b=f.parentNode,c=b?e.getNodeIndex():0):e.isCharacterDataNode()?(b=f,c=g-1):(d=f.childNodes[g-1],h.getNodeWrapper(d).containsPositions()?(b=d,c=S.getNodeLength(d)):(b=f,c=g-1)),b?h.getPosition(b,c):null}),nextVisible:x("nextVisible",function(a){var b=a.next();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex()+1)),e}),nextUncollapsed:x("nextUncollapsed",function(a){for(var b=a;b=b.nextVisible();)if(b.resolveLeadingAndTrailingSpaces(),""!==b.character)return b;return null}),previousVisible:x("previousVisible",function(a){var b=a.previous();if(!b)return null;var c=b.nodeWrapper,d=b.node,e=b;return c.isCollapsed()&&(e=c.session.getPosition(d.parentNode,c.getNodeIndex())),e})});var Da=null,Ea=function(){function a(a){var b=new w;return{get:function(c){var d=b.get(c[a]);if(d)for(var e,f=0;e=d[f++];)if(e.node===c)return e;return null},set:function(c){var d=c.node[a],e=b.get(d)||b.set(d,[]);e.push(c)}}}function b(){this.initCaches()}var c=T.isHostProperty(document.documentElement,"uniqueID");return b.prototype={initCaches:function(){this.elementCache=c?function(){var a=new w;return{get:function(b){return a.get(b.uniqueID)},set:function(b){a.set(b.node.uniqueID,b)}}}():a("tagName"),this.textNodeCache=a("data"),this.otherNodeCache=a("nodeName")},getNodeWrapper:function(a){var b;switch(a.nodeType){case 1:b=this.elementCache;break;case 3:b=this.textNodeCache;break;default:b=this.otherNodeCache}var c=b.get(a);return c||(c=new y(a,this),b.set(c)),c},getPosition:function(a,b){return this.getNodeWrapper(a).getPosition(b)},getRangeBoundaryPosition:function(a,b){var c=b?"start":"end";return this.getPosition(a[c+"Container"],a[c+"Offset"])},detach:function(){this.elementCache=this.textNodeCache=this.otherNodeCache=null}},b}();U(S,{nextNode:q,previousNode:r});var Fa=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;++c)if(a[c]===b)return c;return-1};U(a.rangePrototype,{moveStart:M(!0,!1),moveEnd:M(!1,!1),move:M(!0,!0),trimStart:N(!0),trimEnd:N(!1),trim:L(function(a,b){var c=this.trimStart(b),d=this.trimEnd(b);return c||d}),expand:L(function(a,b,c){var d=!1;c=h(c,la);var e=c.characterOptions;if(b||(b=Q),b==R){var f,g,i=c.wordOptions,j=a.getRangeBoundaryPosition(this,!0),k=a.getRangeBoundaryPosition(this,!1),l=F(j,e,i),m=l.nextEndToken(),n=m.chars[0].previousVisible();if(this.collapsed)f=m;else{var o=F(k,e,i);f=o.previousStartToken()}return g=f.chars[f.chars.length-1],n.equals(j)||(this.setStart(n.node,n.offset),d=!0),g&&!g.equals(k)&&(this.setEnd(g.node,g.offset),d=!0),c.trim&&(c.trimStart&&(d=this.trimStart(e)||d),c.trimEnd&&(d=this.trimEnd(e)||d)),d}return this.moveEnd(Q,1,c)}),text:L(function(a,b){return this.collapsed?"":I(a,this,V(b,ga)).join("")}),selectCharacters:L(function(a,b,c,d,e){var f={characterOptions:e};b||(b=W(this.getDocument())),this.selectNodeContents(b),this.collapse(!0),this.moveStart("character",c,f),this.collapse(!0),this.moveEnd("character",d-c,f)}),toCharacterRange:L(function(a,b,c){b||(b=W(this.getDocument()));var d,e,f=b.parentNode,g=S.getNodeIndex(b),h=-1==S.comparePoints(this.startContainer,this.endContainer,f,g),i=this.cloneRange();return h?(i.setStartAndEnd(this.startContainer,this.startOffset,f,g),d=-i.text(c).length):(i.setStartAndEnd(f,g,this.startContainer,this.startOffset),d=i.text(c).length),e=d+this.text(c).length,{start:d,end:e}}),findText:L(function(b,c,d){d=h(d,ja),d.wholeWordsOnly&&(d.wordOptions.includeTrailingSpace=!1);var e=aa(d.direction),f=d.withinRange;f||(f=a.createRange(),f.selectNodeContents(this.getDocument()));var g=c,i=!1;"string"==typeof g?d.caseSensitive||(g=g.toLowerCase()):i=!0;var j=b.getRangeBoundaryPosition(this,!e),k=f.comparePoint(j.node,j.offset);-1===k?j=b.getRangeBoundaryPosition(f,!0):1===k&&(j=b.getRangeBoundaryPosition(f,!1));for(var l,m=j,n=!1;;)if(l=K(m,g,i,f,d)){if(l.valid)return this.setStartAndEnd(l.startPos.node,l.startPos.offset,l.endPos.node,l.endPos.offset),!0;m=e?l.startPos:l.endPos}else{if(!d.wrap||n)return!1;f=f.cloneRange(),m=b.getRangeBoundaryPosition(f,!e),f.setBoundary(j.node,j.offset,e),n=!0}}),pasteHtml:function(a){if(this.deleteContents(),a){var b=this.createContextualFragment(a),c=b.lastChild;this.insertNode(b),this.collapseAfter(c)}}}),U(a.selectionPrototype,{expand:L(function(a,b,c){this.changeEachRange(function(a){a.expand(b,c)})}),move:L(function(a,b,c,d){var e=0;if(this.focusNode){this.collapse(this.focusNode,this.focusOffset);var f=this.getRangeAt(0);d||(d={}),d.characterOptions=V(d.characterOptions,ha),e=f.move(b,c,d),this.setSingleRange(f)}return e}),trimStart:O("trimStart"),trimEnd:O("trimEnd"),trim:O("trim"),selectCharacters:L(function(b,c,d,e,f,g){var h=a.createRange(c);h.selectCharacters(c,d,e,g),this.setSingleRange(h,f)}),saveCharacterRanges:L(function(a,b,c){for(var d=this.getAllRanges(),e=d.length,f=[],g=1==e&&this.isBackward(),h=0,i=d.length;i>h;++h)f[h]={characterRange:d[h].toCharacterRange(b,c),backward:g,characterOptions:c};return f}),restoreCharacterRanges:L(function(b,c,d){this.removeAllRanges();for(var e,f,g,h=0,i=d.length;i>h;++h)f=d[h],g=f.characterRange,e=a.createRange(c),e.selectCharacters(c,g.start,g.end,f.characterOptions),this.addRange(e,f.backward)}),text:L(function(a,b){for(var c=[],d=0,e=this.rangeCount;e>d;++d)c[d]=this.getRangeAt(d).text(b);return c.join("")})}),a.innerText=function(b,c){var d=a.createRange(b);d.selectNodeContents(b);var e=d.text(c);return e},a.createWordIterator=function(a,b,c){var d=C();c=h(c,ma);var e=d.getPosition(a,b),f=F(e,c.characterOptions,c.wordOptions),g=aa(c.direction);return{next:function(){return g?f.previousStartToken():f.nextEndToken()},dispose:function(){f.dispose(),this.next=function(){}}}},a.noMutation=function(a){var b=C();a(b),D()},a.noMutation.createEntryPointFunction=L,a.textRange={isBlockNode:l,isCollapsedWhitespaceNode:t,createPosition:L(function(a,b,c){return a.getPosition(b,c)})}}),a},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;a-1?c=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})"):/Edge\/(\d+)./i.test(navigator.userAgent)&&(c=/Edge\/(\d+)./i)),c&&null!=c.exec(navigator.userAgent)&&(d=parseFloat(RegExp.$1)),-1===d?!1:a?b?"<"===b?d>a:">"===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")&&!c(),g=-1!==d.indexOf("AppleWebKit/")&&!c(),h=-1!==d.indexOf("Chrome/")&&!c(),i=-1!==d.indexOf("Opera/")&&!c();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(12,">")},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(),insertOrderedList:c()},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(12,">")},hasProblemsSettingCaretAfterImg:function(){return c()},hasLiDeletingProblem:function(){return c()},hasUndoInContextMenu:function(){return f||h||i},hasInsertNodeIssue:function(){return i},hasIframeFocusIssue:function(){return c()},createsNestedInvalidMarkupAfterPaste:function(){return g},hasCaretBlockElementIssue:function(){return g},supportsMutationEvents:function(){return"MutationEvent"in window},supportsModernPaste:function(){return!c()},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&&c.nodeType===a.TEXT_NODE&&d.test(c.data)},rangyBookmark:function(){return c&&1===c.nodeType&&c.classList.contains("rangySelectionBoundary")},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},lineBreak:function(){return c&&1===c.nodeType&&"BR"===c.nodeName},block:function(){return c&&1===c.nodeType&&"block"===c.ownerDocument.defaultView.getComputedStyle(c).display},voidElement:function(){return a.dom.domNode(c).test({query:a.VOID_ELEMENTS})}},prev:function(b){var e=c.previousSibling,f=b&&b.nodeTypes?b.nodeTypes:d;return e?a.dom.domNode(e).is.rangyBookmark()||!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.dom.domNode(e).is.rangyBookmark()||!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)if(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 s&&s.length>0&&(j["class"]=wysihtml5.lang.array(s).unique().join(" "));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){for(;a.firstChild;)a.parentNode.insertBefore(a.firstChild,a);a.parentNode.removeChild(a)}},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()},destroy:function(){},_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,!1),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 wysihtml5.browser.supportsModernPaste()&&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(b.ownerDocument.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 a=this.getRange();this.deleteRangeContents(a),this.setSelection(a)},deleteRangeContents:function(b){var c,d,e,f;if(this.unselectableClass){(c=a.dom.getParentElement(b.startContainer,{query:"."+this.unselectableClass},!1,this.contain))&&b.setStartBefore(c),(d=a.dom.getParentElement(b.endContainer,{query:"."+this.unselectableClass},!1,this.contain))&&b.setEndAfter(d),e=b.getNodes([1],function(b){return a.dom.hasClass(b,this.unselectableClass)}.bind(this));for(var g=e.length;g--;)try{f=new CustomEvent("wysihtml5:uneditable:delete"),e[g].dispatchEvent(f)}catch(h){}}b.deleteContents()},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)},getNodesNearCaret:function(){if(!this.isCollapsed())throw"Selection must be caret when using selection.getNodesNearCaret()";var a,b,c,d,e=this.getOwnRanges();return e&&e.length>0?(1===e[0].startContainer.nodeType?(a=e[0].startContainer.childNodes[e[0].startOffset-1],a||0!==e[0].startOffset?a&&(b=a.previousSibling,c=a.nextSibling):c=e[0].startContainer.childNodes[0]):(0===e[0].startOffset&&e[0].startContainer.previousSibling?(a=e[0].startContainer.previousSibling,3===a.nodeType&&(d=a.data.length)):(a=e[0].startContainer,d=e[0].startOffset),b=a.previousSibling,c=a.nextSibling),{caretNode:a,prevNode:b,nextNode:c,textOffset:d}):null},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(f&&3===f.nodeType&&/^\s*$/.test(f.data.slice(0,g))&&(g=0),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,d=this.getRange(),e=this.doc.createElement("DIV"),f=this.doc.createDocumentFragment();if(d){for(d.deleteContents(),e.innerHTML=a,b=e.lastChild;e.firstChild;)f.appendChild(e.firstChild);for(d.insertNode(f),c=this.contain.lastChild;c&&3===c.nodeType&&c.previousSibling&&/^\s*$/.test(c.data);)c=c.previousSibling;b&&(c&&b===c&&1===b.nodeType&&this.contain.appendChild(this.doc.createElement("br")),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},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(){var b=rangy.createRange();a.browser.supportsSelectionModify()?this._selectLine_W3C():b.nativeRange&&b.nativeRange.getBoundingClientRect&&this._selectLineUniversal()},includeRangyRangeHelpers:function(){var a=this.getSelection(),b=a.getRangeAt(0),c=function(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")},d=function(a){return 1===a.nodeType?a.childNodes&&a.childNodes.length||0:a.data&&a.data.length||0},e=1===a.anchorNode.nodeType?a.anchorNode.childNodes[a.anchorOffset]:a.anchorNode,f=1===a.focusNode.nodeType?a.focusNode.childNodes[a.focusOffset]:a.focusNode;f&&a.focusOffset===d(f)&&f.nextSibling&&c(f.nextSibling)&&b.setEndAfter(f.nextSibling),e&&0===a.anchorOffset&&e.previousSibling&&c(e.previousSibling)&&b.setStartBefore(e.previousSibling),b.select()},_selectLine_W3C:function(){var a=this.win.getSelection(),b=[a.anchorNode,a.anchorOffset,a.focusNode,a.focusOffset];a.modify("move","left","lineboundary"),a.modify("extend","right","lineboundary"),a.anchorNode===b[0]&&a.anchorOffset===b[1]&&a.focusNode===b[2]&&a.focusOffset===b[3]?this._selectLineUniversal():this.includeRangyRangeHelpers()},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())}},getRangeRect:function(a){var b,c=(this.doc.createTextNode("i"),this.doc.createTextNode("i"));return a.collapsed?(a.insertNode(c),a.selectNode(c),b=a.nativeRange.getBoundingClientRect(),a.deleteContents()):b=a.nativeRange.getBoundingClientRect(),b},_selectLineUniversal:function(){var b,c,d,e,f,g,h=this.getSelection(),i=h.getRangeAt(0),j=0,k=this,l=function(b){return b&&1===b.nodeType&&("block"===k.win.getComputedStyle(b).display||a.lang.array(["BR","HR"]).contains(b.nodeName))},m=function(a){var b=a;if(b)for(;b&&(1===b.nodeType&&b.classList.contains("rangySelectionBoundary")||3===b.nodeType&&/^\s*$/.test(b.data));)b=b.previousSibling;return b};c=i.cloneRange(),d=i.cloneRange(),i.collapsed&&(3===i.startContainer.nodeType&&i.startOffset0?i.moveEnd("character",1):i.startOffset>0&&(3===i.startContainer.nodeType||1===i.startContainer.nodeType&&!l(m(i.startContainer.childNodes[i.startOffset-1])))&&i.moveStart("character",-1)),i.collapsed||i.insertNode(this.doc.createTextNode(a.INVISIBLE_SPACE)),b=i.nativeRange.getBoundingClientRect();do e=i.moveStart("character",-1),f=i.nativeRange.getBoundingClientRect(),f&&Math.floor(f.top)===Math.floor(b.top)||(i.moveStart("character",1),g=!0),j++;while(0!==e&&!g&&2e3>j);if(j=0,g=!1,b=i.nativeRange.getBoundingClientRect(),i.endContainer!==this.contain||this.contain.lastChild&&this.contain.childNodes[i.endOffset]!==this.contain.lastChild)do e=i.moveEnd("character",1),f=i.nativeRange.getBoundingClientRect(),f&&Math.floor(f.bottom)===Math.floor(b.bottom)||(i.moveEnd("character",-1),i.endContainer&&1===i.endContainer.nodeType&&i.endContainer.childNodes[i.endOffset]&&1===i.endContainer.childNodes[i.endOffset].nodeType&&"BR"===i.endContainer.childNodes[i.endOffset].nodeName&&i.endContainer.childNodes[i.endOffset].previousSibling&&(1===i.endContainer.childNodes[i.endOffset].previousSibling.nodeType?i.setEnd(i.endContainer.childNodes[i.endOffset].previousSibling,i.endContainer.childNodes[i.endOffset].previousSibling.childNodes.length):3===i.endContainer.childNodes[i.endOffset].previousSibling.nodeType&&i.setEnd(i.endContainer.childNodes[i.endOffset].previousSibling,i.endContainer.childNodes[i.endOffset].previousSibling.data.length)),g=!0),j++;while(0!==e&&!g&&2e3>j);i.select(),this.includeRangyRangeHelpers()},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(a,b){return 3===a.nodeType?a:a.childNodes[b]||a}function d(a){return a&&1===a.nodeType&&"BR"===a.nodeName}function e(a,b){return a&&1===a.nodeType&&"block"===b.win.getComputedStyle(a).display}function f(a){return a&&1===a.nodeType&&a.classList.contains("rangySelectionBoundary")}function g(a,b){return d(a)||e(a,b)}function h(b,c){a.dom.removeInvisibleSpaces(b.element);for(var d,e=b.element,f=e.querySelectorAll(E),g=b.config.classNames.uneditableContainer+[""].concat(E.split(",")).join(", "+b.config.classNames.uneditableContainer+" "),h=e.querySelectorAll(g),i=a.lang.array(f).without(h),j=i.length;j--;)""!==i[j].innerHTML.replace(/[\uFEFF]/g,"")||0!==c.length&&i[j]===c[c.length-1]||(d=a.lang.array(c).indexOf(i[j]),d>-1&&c.splice(d,1),i[j].parentNode.removeChild(i[j]));return c}function i(a){return a.config.useLineBreaks?"DIV":"P"}function j(a,b,c){for(var d=a,e=null;d&&b&&d!==b;)1===d.nodeType&&d.matches(c?E:D)&&(e=d),d=d.parentNode;return e}function k(a,b){for(var c,d,e,f=a,g=null;f&&b&&f!==b;)1===f.nodeType&&f.matches(F)&&(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 l(b,c,d){return b||(b=d.doc.createElement(c.nodeName||i(d)),b.appendChild(d.doc.createTextNode(a.INVISIBLE_SPACE))),c.nodeName&&b.nodeName!==c.nodeName&&(b=C.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 m(b,c,d){var e,f=b.previousSibling,g=b.nextSibling,h=!1;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.toLowerCase()===c.nodeName.toLowerCase()&&(e=b.getAttribute("style"),e&&""!==e.trim()?b=C.renameElement(b,i(d)):(C.unwrap(b),h=!0)),null!==b.getAttribute("style")&&""===b.getAttribute("style").trim()&&b.removeAttribute("style"),h&&u(f,g,d)}function n(b){for(var c,d,e=b.querySelectorAll(E)||[],f=e.length;f--;)c=a.dom.domNode(e[f]).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),d=a.dom.domNode(e[f]).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),c&&1!==c.nodeType&&"BR"!==c.nodeName&&""!==(e[f].innerHTML||e[f].nodeValue||"").trim()&&e[f].parentNode.insertBefore(e[f].ownerDocument.createElement("BR"),c),c&&1!==c.nodeType&&"BR"!==c.nodeName&&""!==(e[f].innerHTML||e[f].nodeValue||"").trim()&&e[f].parentNode.insertBefore(e[f].ownerDocument.createElement("BR"),c),a.dom.unwrap(e[f])}function o(a,b){var c,d=a.startContainer,e=a.endContainer;return d&&1===d.nodeType&&d===e?void(d.firstChild===d.lastChild&&1===a.endOffset&&d!==b.element&&"LI"!==d.nodeName&&"TD"!==d.nodeName&&(a.setStartBefore(d),a.setEndAfter(e))):d&&1===d.nodeType&&3===e.nodeType?void(d.firstChild===e&&a.endOffset===e.data.length&&d!==b.element&&"LI"!==d.nodeName&&"TD"!==d.nodeName&&a.setEndAfter(d)):e&&1===e.nodeType&&3===d.nodeType?void(e.firstChild===d&&0===a.startOffset&&e!==b.element&&"LI"!==e.nodeName&&"TD"!==e.nodeName&&a.setStartBefore(e)):d&&3===d.nodeType&&d===e&&1===d.parentNode.childNodes.length?void(a.endOffset==e.data.length&&0===a.startOffset&&(c=d.parentNode,c!==b.element&&"LI"!==c.nodeName&&"TD"!==c.nodeName&&(a.setStartBefore(c),a.setEndAfter(c)))):void 0}function p(b){for(var c,d,e,f,g,h,i=[],j=0,k=b.length;k>j;j++)if(1===b[j].startContainer.nodeType&&b[j].startContainer.matches("ul, ol")&&b[j].setStart(b[j].startContainer.childNodes[b[j].startOffset],0),1===b[j].endContainer.nodeType&&b[j].endContainer.matches("ul, ol")&&(h=b[j].endContainer.childNodes[Math.max(b[j].endOffset-1,0)],h.childNodes&&b[j].setEnd(h,h.childNodes.length)),c=b[j].getNodes([1],function(a){return"LI"===a.nodeName}),c.length>0){for(d=0,e=c.length;e>d;d++)g=b[j].compareNode(c[d]),(g===b[j].NODE_AFTER||g===b[j].NODE_INSIDE)&&(f=b[j].cloneRange(),h=a.dom.domNode(c[d]).prev({nodeTypes:[1]}),h?f.setEnd(h,h.childNodes.length):c[d].closest("ul, ol")?f.setEndBefore(c[d].closest("ul, ol")):f.setEndBefore(c[d]),i.push(f),b[j].setStart(c[d],0)),(g===b[j].NODE_BEFORE||g===b[j].NODE_INSIDE)&&(f=b[j].cloneRange(),f.setEnd(c[d],c[d].childNodes.length),i.push(f),h=a.dom.domNode(c[d]).next({nodeTypes:[1]}),h?b[j].setStart(h,0):c[d].closest("ul, ol")?b[j].setStartAfter(c[d].closest("ul, ol")):b[j].setStartAfter(c[d]));i.push(b[j])}else i.push(b[j]);return i}function q(b,c,d){var e=b?a.lang.object(b).clone(!0):null;return e&&(e.nodeName=e.nodeName||c||i(d)),e}function r(b,c,d,e){var f,h,i,l,m,n=c.startContainer,e=e||j(n,d.element,!0);if(e)h=b.firstChild,i=b.lastChild,d.selection.splitElementAtCaret(e,b),m=a.dom.domNode(i).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),l=a.dom.domNode(h).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),h&&!g(h,d)&&l&&!g(l,d)&&h.parentNode.insertBefore(d.doc.createElement("br"),h),i&&!g(i,d)&&m&&!g(m,d)&&m.parentNode.insertBefore(d.doc.createElement("br"),m);else if(f=k(n,d.element),f.outerNode&&f.innerNode&&f.parent){if(1===b.childNodes.length){for(;b.firstChild.firstChild;)f.innerNode.appendChild(b.firstChild.firstChild);b.firstChild.appendChild(f.outerNode)}d.selection.splitElementAtCaret(f.parent,b)}else{var o=b.firstChild,p=b.lastChild;c.insertNode(b),c.setStartBefore(o),c.setEndAfter(p)}}function s(b,d,e){for(var f,h,i=b.cloneRange(),j=c(i.startContainer,i.startOffset).previousSibling,k=c(i.endContainer,i.endOffset).nextSibling,l=i.extractContents(),m=e.doc.createDocumentFragment(),o=!0;l.firstChild;){if(1===l.firstChild.nodeType&&l.firstChild.matches(E)){n(l.firstChild),f=a.dom.unwrap(l.firstChild),f.length>0&&(m.lastChild&&(1!==m.lastChild.nodeType||!g(m.lastChild,e))||!m.lastChild&&j&&(1!==j.nodeType||g(j,e)))&&m.appendChild(e.doc.createElement("BR"));for(var p=0,q=f.length;q>p;p++)m.appendChild(f[p]);f.length>0&&(1===m.lastChild.nodeType&&g(m.lastChild,e)||(k||m.lastChild!==l.lastChild)&&m.appendChild(e.doc.createElement("BR")))}else m.appendChild(l.firstChild);o=!1}return h=a.lang.array(m.childNodes).get(),r(m,i,e),h}function t(b,c,e){var f=b&&a.dom.domNode(b).prev({nodeTypes:[1,3],ignoreBlankTexts:!0});d(c)&&c.parentNode.removeChild(c),!d(b)||f&&1===f.nodeType&&"block"===e.win.getComputedStyle(f).display||b.parentNode.removeChild(b)}function u(a,b,c){var e;a&&f(a)&&(a=a.previousSibling),b&&f(b)&&(b=b.nextSibling),e=a&&a.previousSibling,a&&(1!==a.nodeType||"block"!==c.win.getComputedStyle(a).display&&!d(a))&&a.parentNode&&a.parentNode.insertBefore(c.doc.createElement("br"),a.nextSibling),b&&(1!==b.nodeType||"block"!==c.win.getComputedStyle(b).display)&&b.parentNode&&b.parentNode.insertBefore(c.doc.createElement("br"),b)}function v(d,e,f,g){var h,i,k=e?b(e):null,m=d.cloneRange(),o=m.startContainer,p=c(m.startContainer,m.startOffset),s=c(m.endContainer,m.endOffset),u=m.startContainer!==p||3!==p.nodeType||G(p,m.startOffset)?a.dom.domNode(p).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}):p,v=1===m.endContainer.nodeType&&m.endContainer.childNodes[m.endOffset]===s&&(1===s.nodeType||!H(s,m.endOffset)&&!a.dom.domNode(s).is.rangyBookmark())||m.endContainer===s&&3===s.nodeType&&!H(s,m.endOffset)?s:a.dom.domNode(s).next({nodeTypes:[1,3],ignoreBlankTexts:!0}),w=m.extractContents(),x=g.doc.createDocumentFragment(),y=k?a.dom.getParentElement(o,k,null,g.element):null,z=!f||!e||"BLOCKQUOTE"===e.nodeName&&"BLOCKQUOTE"===f,A=y||j(o,g.element,z);if(a.dom.domNode(v).is.rangyBookmark()&&(s=v,v=s.nextSibling),I(w),e&&"BLOCKQUOTE"===e.nodeName){var B=l(null,e,g);B.appendChild(w),x.appendChild(B),i=[B]}else{if(w.firstChild)for(;w.firstChild;)if(1==w.firstChild.nodeType&&w.firstChild.matches(E))l(w.firstChild,e,g),w.firstChild.matches(D)&&n(w.firstChild),x.appendChild(w.firstChild);else{for(h=l(null,q(e,f,g),g);w.firstChild&&(1!==w.firstChild.nodeType||!w.firstChild.matches(E));)1==w.firstChild.nodeType&&h.matches(D)&&n(w.firstChild),h.appendChild(w.firstChild);x.appendChild(h)}else x.appendChild(l(null,e,g));i=a.lang.array(x.childNodes).get()}return r(x,m,g,A),t(u,v,g),i.length>0&&("undefined"==typeof i[i.length-1].lastChild||a.dom.domNode(i[i.length-1].lastChild).is.rangyBookmark())&&i[i.length-1].appendChild(g.doc.createElement("br")),i}function w(b,c){var d=a.dom.getParentElement(b,{query:E},null,c.element);return d?d.nodeName:null}function x(b,c){var d,e=a.dom.getParentElement(b.selection.getOwnRanges()[0].startContainer,{query:D+", "+(c?c.toLowerCase():"div")},null,b.element);e?(d=b.selection.createRange(),d.selectNode(e),b.selection.setSelection(d)):b.isEmpty()||b.selection.selectLine()}function y(a,b){var c=b.selection.createRange(),d=a[a.length-1],e=1===d.nodeType&&d.childNodes?0|d.childNodes.length:d.length||0;c.setStart(a[0],0),c.setEnd(d,e),c.select()}function z(a,b,c){var d,e=b.selection.getOwnRanges(),f=[];e=p(e);for(var g=e.length;g--;)o(e[g],b),d=w(e[g].startContainer,b),f="remove"===a?f.concat(s(e[g],d,b)):f.concat(v(e[g],c,d,b));return f}function A(a){return"string"==typeof a&&(a={nodeName:a.toUpperCase()}),a}function B(b){var c;return b.selection.isCollapsed()&&(c=b.selection.getNodesNearCaret(),c&&c.caretNode&&(a.dom.domNode(c.caretNode).is.lineBreak()||3===c.caretNode.nodeType&&0===c.textOffset&&(!c.prevNode||a.dom.domNode(c.prevNode).is.lineBreak())||1===c.caretNode.nodeType&&c.caretNode.classList.contains("rangySelectionBoundary")&&(!c.prevNode||a.dom.domNode(c.prevNode).is.lineBreak()||a.dom.domNode(c.prevNode).is.block())&&(!c.nextNode||a.dom.domNode(c.nextNode).is.lineBreak()||a.dom.domNode(c.nextNode).is.block())))?!0:!1}var C=a.dom,D="h1, h2, h3, h4, h5, h6, p, pre",E="h1, h2, h3, h4, h5, h6, p, pre, div, blockquote",F="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",G=function(a,b){var c=a.data?a.data.slice(0,b):"";return/^\s*$/.test(c)},H=function(a,b){var c=a.data?a.data.slice(b):"";return/^\s*$/.test(c)},I=function(a){if(a){for(;a.firstChild&&3===a.firstChild.nodeType&&/^\s*$/.test(a.firstChild.data)&&a.lastChild!==a.firstChild;)a.removeChild(a.firstChild);for(;a.lastChild&&3===a.lastChild.nodeType&&/^\s*$/.test(a.lastChild.data)&&a.lastChild!==a.firstChild;)a.removeChild(a.lastChild);a.firstChild&&1===a.firstChild.nodeType&&"BR"===a.firstChild.nodeName&&a.lastChild!==a.firstChild&&a.removeChild(a.firstChild),a.lastChild&&1===a.lastChild.nodeType&&"BR"===a.lastChild.nodeName&&a.lastChild!==a.firstChild&&a.removeChild(a.lastChild)}};a.commands.formatBlock={exec:function(a,b,c){c=A(c);var d,e,f=[];if(c&&c.toggle&&(e=this.state(a,b,c)),e){d=rangy.saveSelection(a.win);for(var g=0,i=e.length;i>g;g++)m(e[g],c,a)}else a.selection.isCollapsed()&&(d=rangy.saveSelection(a.win),B(a)?a.selection.selectLine():x(a,c&&c.nodeName?c.nodeName.toUpperCase():void 0)),f=c?z("apply",a,c):z("remove",a);f=h(a,f),d?rangy.restoreSelection(d):y(f,a)},remove:function(a,b,c){c=A(c);var d,e;a.selection.isCollapsed()&&(e=rangy.saveSelection(a.win),x(a,c&&c.nodeName?c.nodeName.toUpperCase():void 0)),d=z("remove",a),d=h(a,d),e?rangy.restoreSelection(e):y(d,a)},state:function(b,c,d){d=A(d);for(var e,f=b.selection.filterElements(function(b){return a.dom.domNode(b).test(d||{query:E})}.bind(this)),g=b.selection.getSelectedOwnNodes(),h=0,i=g.length;i>h;h++)e=C.getParentElement(g[h],d||{query:E},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):(f.classRegExp&&(e.className=e.className.replace(f.classRegExp,"")),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.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(a,c){a.selection.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);0===g.length&&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){var d,e,f=rangy.saveSelection(c.win),g="_wysihtml5-temp-"+(new Date).getTime();c.commands.exec("formatBlock",{nodeName:"div",className:g});var h=c.element.querySelector("."+g);h.innerHTML=h.innerHTML.replace(a.INVISIBLE_SPACE_REG_EXP,""),h&&(d=/^(\s|(
))+$/i.test(h.innerHTML),e=a.dom.convertToList(h,b.toLowerCase(),c.parent.config.classNames.uneditableContainer),f&&rangy.restoreSelection(f),d&&c.selection.selectNode(e.querySelector("li"),!0))};return{exec:function(b,f,h){var i,j,k=b.doc,l="OL"===h?"insertOrderedList":"insertUnorderedList",m=b.selection.getSelection(),n=1===m.anchorNode.nodeType&&m.anchorNode.firstChild?m.anchorNode.childNodes[m.anchorOffset]:m.anchorNode,o=1===m.focusNode.nodeType&&m.focusNode.firstChild?m.focusNode.childNodes[m.focusOffset]||m.focusNode.lastChild:m.focusNode;m.isBackwards()&&(n=[o,o=n][0]),a.dom.domNode(o).is.emptyTextNode(!0)&&o&&(o=a.dom.domNode(o).prev({nodeTypes:[1,3],ignoreBlankTexts:!0})),a.dom.domNode(n).is.emptyTextNode(!0)&&n&&(n=a.dom.domNode(n).next({nodeTypes:[1,3],ignoreBlankTexts:!0})),i=n&&o?n===o?n:a.dom.domNode(n).commonAncestor(o,b.element):b.selection.getSelectedNode(),j=c(i,h,b),j.el?j.other?e(j.el,h,b):d(j.el,h,b):b.commands.support(l)?k.execCommand(l,!1,null):g(h,b)},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){var b={styleProperty:"textAlign",styleValue:"justify",toggle:!0};a.commands.alignJustifyStyle={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",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()?"":"
"},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!==!1&&(a=this.parent.parse(a));try{this.element.innerHTML=a}catch(c){this.element.innerText=a}},cleanUp:function(a){var b;this.selection&&this.selection.isInThisEditable()&&(b=rangy.saveSelection(this.win)),this.parent.parse(this.element,void 0,a),b&&rangy.restoreSelection(b)},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),this._initAutoLinking(),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._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,!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.executeAndRestoreRangy(function(){e.config.useLineBreaks?((!c.firstChild||c.firstChild===c.lastChild&&1===c.firstChild.nodeType&&c.firstChild.classList.contains("rangySelectionBoundary"))&&c.appendChild(e.doc.createElement("br")),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"],function(){e.isEmpty()&&setTimeout(function(){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))},0)}),b.observe(this.element,"keydown",function(c){var h=c.keyCode;if(!(c.shiftKey||c.ctrlKey||c.defaultPrevented||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=b.domNode,d=a.browser,e={66:"bold",73:"italic",85:"underline"},f={addListeners:function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.addEventListener(b[d],c,!1)},removeListeners:function(a,b,c){for(var d=0,e=b.length;e>d;d++)a.removeEventListener(b[d],c,!1)},fixLastBrDeletionInTable: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},handleUneditableDeletion: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(f.fixLastBrDeletionInTable(a,!0))return!0;try{var c=new CustomEvent("wysihtml5:uneditable:delete",{bubbles:!0,cancelable:!1});b.node.dispatchEvent(c)}catch(d){}return b.node.parentNode.removeChild(b.node),!0}return!1},fixDeleteInTheBeginningOfBlock:function(b){var d=b.selection,e=d.getPreviousNode();if(d.caretIsFirstInSelection()&&e&&1===e.nodeType&&/block/.test(b.win.getComputedStyle(e).display)&&!c(e).test({query:"ol, ul, table, tr, dl"})){if(/^\s*$/.test(e.textContent||e.innerText))return e.parentNode.removeChild(e),!0;if(e.lastChild){var f=e.lastChild,g=d.getSelectedNode(),h=c(e).commonAncestor(g,b.element),i=a.dom.getParentElement(g,{query:"h1, h2, h3, h4, h5, h6, p, pre, div, blockquote"},!1,h||b.element);if(i)return c(i).transferContentTo(e,!0),d.setAfter(f),!0}}return!1},fixDeleteInTheBeginningOfLi:function(b){if(a.browser.hasLiDeletingProblem()){var d,e,f=b.selection.getSelection(),g=f.anchorNode,h=b.selection.caretIsFirstInSelection();if(3===g.nodeType&&0===f.anchorOffset&&g===g.parentNode.firstChild&&(g=g.parentNode,h=!0),h&&g&&1===g.nodeType&&"LI"===g.nodeName&&(d=c(g).prev({nodeTypes:[1,3],ignoreBlankTexts:!0}),d||!g.parentNode||"UL"!==g.parentNode.nodeName&&"OL"!==g.parentNode.nodeName||(d=c(g.parentNode).prev({nodeTypes:[1,3],ignoreBlankTexts:!0})),d))return e=g.firstChild,c(g).transferContentTo(d,!0),e?b.selection.setBefore(e):d&&(1===d.nodeType?d.lastChild?b.selection.setAfter(d.lastChild):b.selection.selectNode(d):b.selection.setAfter(d)),!0}return!1},initTableHandling:function(){var b=function(){window.removeEventListener("load",b),this.doc.execCommand("enableObjectResizing",!1,"false"),this.doc.execCommand("enableInlineTableEditing",!1,"false")}.bind(this),c=function(){b.call(this),f.removeListeners(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?f.addListeners(this.sandbox.getIframe(),["focus","mouseup","mouseover"],c):window.addEventListener("load",b)),this.tableSelection=a.quirks.tableCellsSelection(this.element,this.parent)},doLineBreaksModeEnterWithCaret:function(d){var e,f,g="p, pre, div, blockquote",h=!1;if(e=d.selection.getNodesNearCaret(),e&&((e.caretNode||e.nextNode)&&(f=b.getParentElement(e.caretNode||e.nextNode,{query:g},2),f===d.element&&(f=void 0)),f&&e.caretNode))if(c(e.caretNode).is.lineBreak()){if(d.config.doubleLineBreakEscapesBlock){h=!0,e.caretNode.parentNode.removeChild(e.caretNode),c(e.nextNode).is.lineBreak()&&e.nextNode.parentNode.removeChild(e.nextNode);var i=d.doc.createElement("br");c(e.nextNode).is.lineBreak()&&e.nextNode===f.lastChild?f.parentNode.insertBefore(i,f.nextSibling):d.selection.splitElementAtCaret(f,i),e.nextNode&&3===e.nextNode.nodeType&&(e.nextNode.data=e.nextNode.data.replace(/^ *[\r\n]+/,"")),d.selection.setBefore(i)}}else if(3===e.caretNode.nodeType&&a.browser.hasCaretBlockElementIssue()&&e.textOffset===e.caretNode.data.length&&!e.nextNode){h=!0;var j=d.doc.createElement("br"),k=d.doc.createElement("br"),l=d.doc.createDocumentFragment();l.appendChild(j),l.appendChild(k),d.selection.insertNode(l),d.selection.setBefore(k)}return h}},g=function(a,b){var c=b.selection;b.element;if(c.isCollapsed()){if(f.handleUneditableDeletion(b))return void a.preventDefault();if(f.fixDeleteInTheBeginningOfLi(b))return void a.preventDefault();if(f.fixDeleteInTheBeginningOfBlock(b))return void a.preventDefault();if(f.fixLastBrDeletionInTable(b))return void a.preventDefault()}else c.containsUneditable()&&(a.preventDefault(),c.deleteContents())},h=function(a,b){if(b.config.useLineBreaks&&!a.shiftKey&&!a.ctrlKey){b.selection.isCollapsed()&&f.doLineBreaksModeEnterWithCaret(b)&&a.preventDefault()}},i=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"," ")},j=function(a){this.domNodeRemovedInterval&&clearInterval(domNodeRemovedInterval),this.parent.fire("destroy:composer")},k=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)},l=function(a){this.parent.fire("focus",a).fire("focus:composer",a),setTimeout(function(){this.focusState=this.getValue(!1,!1)}.bind(this),0)},m=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)},n=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)},o=function(b){this.config.copyedFromMarking&&(a.browser.supportsModernPaste()&&(b.clipboardData.setData("text/html",this.config.copyedFromMarking+this.selection.getHtml()),b.clipboardData.setData("text/plain",this.selection.getPlainText()),b.preventDefault()),this.parent.fire(b.type,b).fire(b.type+":composer",b))},p=function(b){var c=b.keyCode;(c===a.SPACE_KEY||c===a.ENTER_KEY)&&this.parent.fire("newword:composer")},q=function(b){if(!d.canSelectImagesInContentEditable()){var c=b.target,e=this.element.querySelectorAll("img"),f=this.element.querySelectorAll("."+this.config.classNames.uneditableContainer+" img"),g=a.lang.array(e).without(f);"IMG"===c.nodeName&&a.lang.array(g).contains(c)&&this.selection.selectNode(c)}},r=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)}},s=function(a){d.canSelectImagesInContentEditable()||setTimeout(function(){this.selection.getSelection().removeAllRanges()}.bind(this),0)},t=function(b){var c,d,f=b.keyCode,j=e[f];return!b.ctrlKey&&!b.metaKey||b.altKey||65!==f?((b.ctrlKey||b.metaKey)&&!b.altKey&&j&&(this.commands.exec(j),b.preventDefault()),f===a.BACKSPACE_KEY&&g(b,this),(f===a.BACKSPACE_KEY||f===a.DELETE_KEY)&&(c=this.selection.getSelectedNode(!0),c&&"IMG"===c.nodeName&&(b.preventDefault(),d=c.parentNode,d.removeChild(c),"A"!==d.nodeName||d.firstChild||d.parentNode.removeChild(d),setTimeout(function(){a.quirks.redraw(this.element)}.bind(this),0))),this.config.handleTabKey&&f===a.TAB_KEY&&(b.preventDefault(),i(this,this.element,b.shiftKey)),void(f===a.ENTER_KEY&&h(b,this))):(this.selection.selectAll(),void b.preventDefault())};a.views.Composer.prototype.observeActions=f,a.views.Composer.prototype.observe=function(){var a=this.sandbox.getIframe?this.sandbox.getIframe():this.sandbox.getContentEditable(),c=(this.element,d.supportsEventsInIframeCorrectly()||this.sandbox.getContentEditable?this.element:this.sandbox.getWindow());this.focusState=this.getValue(!1,!1),a.addEventListener(["DOMNodeRemoved"],j.bind(this),!1),d.supportsMutationEvents()||(this.domNodeRemovedInterval=setInterval(function(){b.contains(document.documentElement,a)||j.call(this)},250)),this.config.handleTables&&f.initTableHandling.call(this),f.addListeners(c,["drop","paste","mouseup","focus","keyup"],k.bind(this)),c.addEventListener("focus",l.bind(this),!1),c.addEventListener("blur",m.bind(this),!1),f.addListeners(this.element,["drop","paste","beforepaste"],n.bind(this),!1),this.element.addEventListener("copy",o.bind(this),!1),this.element.addEventListener("mousedown",q.bind(this),!1),this.element.addEventListener("click",r.bind(this),!1),this.element.addEventListener("drop",s.bind(this),!1),this.element.addEventListener("keyup",p.bind(this),!1),this.element.addEventListener("keydown",t.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!==!1&&(a=this.parent.parse(a)),this.element.value=a},cleanUp:function(a){var b=this.parent.parse(this.element.value,void 0,a);this.element.value=b},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:{},b:{},i:{},u:{}},classes:{}},pasteParserRulesets:null,parser:a.dom.parse,useLineBreaks:!0,doubleLineBreakEscapesBlock:!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(a){this.currentView.cleanUp(a)},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()},destroy:function(){this.composer&&this.composer.sandbox&&this.composer.sandbox.destroy(),this.toolbar&&this.toolbar.destroy(),this.off()},parse:function(b,c,d){var e=this.config.contentEditableMode?document:this.composer?this.composer.sandbox.getDocument():null,f=this.config.parser(b,{rules:d||this.config.parserRules,cleanUp:this.config.cleanUp,context:e,uneditableClass:this.config.classNames.uneditableContainer,clearInternals:c});return"object"==typeof b&&a.quirks.redraw(b),f},_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 7b9b1a2..7000963 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","VOID_ELEMENTS","EMPTY_FUNCTION","ELEMENT_NODE","TEXT_NODE","BACKSPACE_KEY","ENTER_KEY","ESCAPE_KEY","SPACE_KEY","TAB_KEY","DELETE_KEY","polyfills","win","doc","nativeCustomEventSupported","p","CustomEvent","detail","foo","type","e","String","prototype","trim","rtrim","this","replace","s_add","s_rem","Element","on","fn","self","attachEvent","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","ELEMENT","matches","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","selector","element","elements","document","ownerDocument","querySelectorAll","index","closest","parentElement","createElement","testElement","classList","add","contains","createMethod","method","original","DOMTokenList","token","i","len","toggle","_toggle","force","view","classListProp","protoProp","elemCtrProto","objCtr","strTrim","arrIndexOf","item","DOMEx","message","name","code","DOMException","checkTokenAndGetIndex","test","ClassList","elem","trimmedClasses","getAttribute","classes","split","push","_updateClassName","setAttribute","classListProto","classListGetter","Error","tokens","l","updated","remove","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","parentNode","removeChild","getTextNodes","node","all","nextSibling","nodeType","isInDom","n","normalizeFix","nf","Node","texts","defaultView","anode","aoffset","aelement","undefined","fnode","focusNode","foffset","focusOffset","felement","prevTxt","shift","curText","nodeValue","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","DOCUMENT_POSITION_CONTAINS","previousSibling","F","removeEventListener","readyState","addEventListener","customEventSupported","params","bubbles","cancelable","evt","createEvent","initCustomEvent","Event","factory","root","define","amd","module","exports","rangy","isHostMethod","o","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","addInitListener","addShimListener","createMissingNativeApi","requiredModule","requiredModuleNames","createError","createCoreModule","rangePrototype","selectionPrototype","isHtmlNamespace","ns","namespaceURI","UNDEF","parent","getNodeIndex","getNodeLength","getCommonAncestor","node1","node2","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","nodes","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","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","eachRange","callMethodOnEachRange","results","changeEachRange","rangeBookmarks","rangeBookmark","selRanges","saveRanges","restoreRanges","rangeHtmls","getNativeTextRange","detachAll","Selection","docReady","loadHandler","require","defaultTokenizer","chars","wordOptions","createTokenRange","isWord","tokenRanges","wordStart","wordEnd","word","lastWordEnd","wordRegex","exec","includeTrailingSpace","nonLineBreakWhiteSpaceRegex","convertCharRangeToToken","tokenRange","tokenChars","tokenize","tokenizer","normalizeIgnoredCharacters","ignoredCharacters","ignoredChars","ignoredCharsArray","sort","char1","char2","charCodeAt","createWordOptions","language","defaultLanguage","defaultWordOptions","createNestedOptions","characterOptions","defaultCharacterOptions","getComputedDisplay","display","tableCssDisplayBlock","defaultDisplayValueForTag","isHidden","getAncestorsAndSelf","isVisibilityHiddenTextNode","isBlockNode","containsPositions","getAncestors","unshift","nextNodeDescendants","excludeChildren","previous","isWhitespaceNode","computedWhiteSpace","isCollapsedWhitespaceNode","isCollapsedNode","isIgnoredNode","Cache","store","createCachingGetter","objProperty","cache","cachedCount","uncachedCount","value","NodeWrapper","session","positions","Position","nodeWrapper","inspectPosition","startSession","endSession","currentSession","Session","getSession","createCharacterIterator","startPos","endPos","charPos","finished","previousVisible","nextVisible","previousTextPos","returnPreviousTextPos","character","getCharacter","rewind","dispose","createTokenizedTextProvider","consumeWord","forward","textChar","newChars","forwardIterator","backwardIterator","passedWordBoundary","insideWord","allWhiteSpaceRegex","forwardChars","backwardChars","reverse","forwardTokensBuffer","arrayIndexOf","backwardTokensBuffer","nextEndToken","lastToken","previousStartToken","movePositionBy","unit","count","currentPos","charIterator","nextPos","unitsMoved","newPos","absCount","abs","CHARACTER","WORD","tokenizedTextProvider","isLeadingSpace","isTrailingSpace","createRangeCharacterIterator","rangeStart","getRangeBoundaryPosition","rangeEnd","itStart","itEnd","getRangeCharacters","isWholeWord","expand","findTextFromPosition","initialPos","searchTerm","isRegex","searchScopeRange","findOptions","handleMatch","startIndex","endIndex","valid","wholeWordsOnly","currentChar","matchStartIndex","matchEndIndex","insideRegexMatch","caseSensitive","createEntryPointFunction","sessionRunning","createRangeBoundaryMover","moveOptions","defaultMoveOptions","boundaryIsStart","moveResult","createRangeTrimmer","trimCharCount","trimmed","createSelectionTrimmer","spacesRegex","spacesMinusLineBreaksRegex","trailingSpaceInBlockCollapses","trailingSpaceBeforeBrCollapses","trailingSpaceBeforeBlockCollapses","trailingSpaceBeforeLineBreakInPreLineCollapses","includeBlockContentTrailingSpace","includeSpaceBeforeBr","includeSpaceBeforeBlock","includePreLineTrailingSpace","ignoreCharacters","defaultCaretCharacterOptions","en","defaultFindOptions","withinRange","wrap","defaultExpandOptions","trimStart","trimEnd","defaultWordIteratorOptions","table","caption","colgroup","col","thead","tbody","tfoot","tr","td","th","key","nodeProto","getPosition","EMPTY","NON_SPACE","UNCOLLAPSIBLE_SPACE","COLLAPSIBLE_SPACE","TRAILING_SPACE_BEFORE_BLOCK","TRAILING_SPACE_IN_BLOCK","TRAILING_SPACE_BEFORE_BR","PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK","TRAILING_LINE_BREAK_AFTER_BR","INCLUDED_TRAILING_LINE_BREAK_AFTER_BR","getLength","isWhitespace","isCollapsedWhitespace","isIgnored","getTextNodeInfo","spaceRegex","collapseSpaces","cssWhitespace","preLine","hasInnerText","posAfterEl","firstPosInEl","prepopulateChar","isDefinitelyNonEmpty","isRenderedBlock","brs","getTrailingSpace","getNodeWrapper","getLeadingSpace","positionProto","characterType","isBr","prepopulatedChar","visibleChar","charType","finalizedChar","charAt","nodePassed","checkForTrailingSpace","checkForLeadingSpace","isCharInvariant","resolveLeadingAndTrailingSpaces","trailingSpace","leadingSpace","getPrecedingUncollapsedPosition","getPreviousPos","gotPreviousPos","previousPos","returnChar","thisChar","isIgnoredCharacter","cacheKey","cachedChar","collapsible","nextUncollapsed","nextOffset","previousOffset","createWrapperCache","nodeProperty","wrappersByProperty","wrapper","property","initCaches","uniqueIDSupported","elementCache","elementsCache","uniqueID","elWrapper","textNodeCache","otherNodeCache","wrapperCache","prefix","moveEnd","move","startTrimmed","endTrimmed","expandOptions","moved","endToken","newEndPos","startTokenizedTextProvider","startToken","newStartPos","endTokenizedTextProvider","selectCharacters","toCharacterRange","rangeStartsBeforeNode","rangeBetween","findText","searchTermParam","findResult","wrappedAround","pasteHtml","saveCharacterRanges","rangeInfos","characterRange","restoreCharacterRanges","saved","rangeInfo","createWordIterator","iteratorOptions","noMutation","createPosition","gEBI","getElementById","insertRangeBoundaryMarker","atStart","markerEl","markerId","Date","random","boundaryRange","style","lineHeight","className","markerTextChar","setRangeBoundary","compareRanges","saveRange","startMarkerId","endMarkerId","restoreRange","saveSelection","restored","restoreSelection","savedSelection","preserveDirection","removeMarkerElement","removeMarkers","Base","_instance","_static","_prototyping","proto","base","klass","_constructing","implement","valueOf","source","toSource","hidden","object","block","context","browser","iosVersion","userAgent","androidVersion","isIE","equation","re","rv","appName","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","canSelectImagesInContentEditable","autoScrollsToCaret","autoClosesUnclosedTags","clonedTestElement","supportsNativeGetElementsByClassName","getElementsByClassName","supportsSelectionModify","needsSpaceAfterLineBreak","supportsSpeechApiOn","input","chromeVersion","crashesWhenDefineProperty","doesAsyncFocus","hasProblemsSettingCaretAfterImg","hasLiDeletingProblem","hasUndoInContextMenu","hasInsertNodeIssue","hasIframeFocusIssue","createsNestedInvalidMarkupAfterPaste","hasCaretBlockElementIssue","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","parents","isBookmark","domNode","defaultNodeTypes","is","emptyTextNode","ignoreWhitespace","regx","visible","isVisible","getTextContent","voidElement","query","prev","prevNode","types","ignoreBlankTexts","commonAncestor","parents1","parents2","lastLeafNode","leafClasses","escapeParent","newWrapper","split2","nodeWrap","curNode","transferContentTo","targetNode","removeOldWrapper","properties","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","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","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","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","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","deleteRangeContents","startParent","endParent","ev","dispatchEvent","err","getPreviousNode","ignoreEmpty","getNodesNearCaret","caretNode","textOffset","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","lastEditorElement","canAppendChild","anchorNodeTagNameLower","voidElements","splitElementAtCaret","contentAfterRangeStart","surround","nodeOptions","cssStyle","scrollIntoView","tolerance","hasScrollBars","scrollHeight","_wysihtml5ScrollIntoViewElement","selectLine","_selectLine_W3C","getBoundingClientRect","_selectLineUniversal","includeRangyRangeHelpers","isHelperNode","initialBoundry","modify","toLineBoundary","location","getRangeRect","rect","testNode","amount","testRect","found","isLineBreakingElement","pnode","bottom","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","getAncestorWithClass","cssClassMatch","getAncestorWithStyle","cssStyleMatch","getMatchingAncestor","matchType","postApply","currentMerge","precedingTextNode","lastNode","merges","rangeStartNode","rangeEndNode","rangeStartOffset","rangeEndOffset","getAdjacentMergeableTextNode","nextTextNode","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","getRangeNode","isBlock","isLineBreaking","cleanup","newBlockElements","nbIdx","allElements","BLOCK_ELEMENTS","noEditQuery","classNames","uneditableContainer","defaultNodeName","findOuterBlock","allBlocks","UNNESTABLE_BLOCK_ELEMENTS","cloneOuterInlines","innerNode","INLINE_ELEMENTS","outerNode","applyOptionsToElement","removeOptionsFromElement","unwrapped","applySurroundingLineBreaks","unwrapBlocksFromContent","nextEl","prevEl","blocks","fixRangeCoverage","fixNotPermittedInsertionPoints","lis","maxj","rangePos","closestLI","newRanges","getOptionsWithNodename","defaultName","correctedOptions","injectFragmentToRange","firstOuterBlock","outerInlines","first","last","rangeStartContainer","clearRangeBlockFromating","closestBlockName","removeSurroundingLineBreaks","prevPrev","wrapRangeWithElement","similarOptions","isWhitespaceBefore","isWhitespaceAfter","similarOuterBlock","splitAllBlocks","trimBlankTextsAndBreaks","tmpEl","getParentBlockNodeName","expandCaretToBlock","insertingNodeName","selectElements","lastEl","lastOffset","formatSelection","parseOptions","caretIsOnEmptyLine","caretInfo","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","searchNodes","partial","caretIsInsideWord","beforeChar","afterChar","getRangeForWord","offsetStart","offsetEnd","txtNodes","wordOffset","mergeContents","mergeConsequentSimilarElements","cleanupAndSetSelection","cleanupAndSetCaret","formatTextNode","wrapNode","unformatTextNode","newWrapNode","removeFormatFromTextNode","formatTextRange","updateFormat","wordObj","exactState","removeFormat","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","alignJustifyStyle","redo","undoManager","underline","undo","createTable","cols","rows","tableStyle","mergeTableCells","tableSelection","addTableCells","tableSelect","deleteTableCells","selCell","indentList","listEls","tryToPushLiLevel","liNodes","listTag","prevLi","liNode","prevLiList","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","editableElement","textarea","contentEditableMode","_initContentEditableArea","_initSandbox","_displayStyle","disabled","setToEnd","pageYOffset","pageXOffset","scrollTo","_create","_createWysiwygFormField","form","hiddenField","_initAutoLinking","placeholder","_initObjectResizing","_initUndoManager","_initLineBreaking","initSync","sync","supportsDisablingOfAutoLinking","supportsAutoLinking","nodeWithSelection","isInUneditable","links","urlRegExp","newTextContent","propertiesLength","adjust","USE_NATIVE_LINE_BREAK_INSIDE_TAGS","LIST_TAGS","defaultPrevented","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","fixDeleteInTheBeginningOfBlock","selNode","commonAncestorNode","fixDeleteInTheBeginningOfLi","isInBeginnig","handleDeleteKeyPress","handleEnterKeyPress","breakNodes","doubleLineBreakEscapesBlock","brNode","br1","br2","handleTabKeyDown","handleDomNodeRemoved","domNodeRemovedInterval","clearInterval","handleUserInteraction","handleFocus","focusState","handleBlur","changeevent","create","handlePaste","handleCopy","copyedFromMarking","setData","handleKeyUp","allImages","notMyImages","myImages","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","u","pasteParserRulesets","parser","supportTouchDevices","Editor","_isCompatible","_initParser","handleBeforeLoad","sourceView","synchronizer","Toolbar","isCompatible","htmlOrElement","customRules","parseContext","oldHtml","_cleanAndPaste","pastedHTML","cleanHtml"],"mappings":";;AAWA,GAAIA,YACFC,QAAS,QAGTC,YACAC,OACAC,UACAC,WACAC,QACAC,aACAC,SAEAC,gBAAiB,SACjBC,wBAAyB,UAEzBC,cAAe,4FAEfC,eAAgB,aAEhBC,aAAc,EACdC,UAAc,EAEdC,cAAgB,EAChBC,UAAgB,GAChBC,WAAgB,GAChBC,UAAgB,GAChBC,QAAgB,EAChBC,WA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tf,KAAKgrD,SAAS5sD,UAAU0oC,WAAW8uC,OAGtC/3E"}
\ 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","VOID_ELEMENTS","EMPTY_FUNCTION","ELEMENT_NODE","TEXT_NODE","BACKSPACE_KEY","ENTER_KEY","ESCAPE_KEY","SPACE_KEY","TAB_KEY","DELETE_KEY","polyfills","win","doc","nativeCustomEventSupported","p","CustomEvent","detail","foo","type","e","String","prototype","trim","rtrim","this","replace","s_add","s_rem","Element","on","fn","self","attachEvent","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","ELEMENT","matches","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","selector","element","elements","document","ownerDocument","querySelectorAll","index","closest","parentElement","createElement","testElement","classList","add","contains","createMethod","method","original","DOMTokenList","token","i","len","toggle","_toggle","force","view","classListProp","protoProp","elemCtrProto","objCtr","strTrim","arrIndexOf","item","DOMEx","message","name","code","DOMException","checkTokenAndGetIndex","test","ClassList","elem","trimmedClasses","getAttribute","classes","split","push","_updateClassName","setAttribute","classListProto","classListGetter","Error","tokens","l","updated","remove","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","parentNode","removeChild","getTextNodes","node","all","nextSibling","nodeType","isInDom","n","normalizeFix","nf","Node","texts","defaultView","anode","aoffset","aelement","undefined","fnode","focusNode","foffset","focusOffset","felement","prevTxt","shift","curText","nodeValue","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","DOCUMENT_POSITION_CONTAINS","previousSibling","F","removeEventListener","readyState","addEventListener","customEventSupported","params","bubbles","cancelable","evt","createEvent","initCustomEvent","Event","factory","root","define","amd","module","exports","rangy","isHostMethod","o","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","addInitListener","addShimListener","createMissingNativeApi","requiredModule","requiredModuleNames","createError","createCoreModule","rangePrototype","selectionPrototype","isHtmlNamespace","ns","namespaceURI","UNDEF","parent","getNodeIndex","getNodeLength","getCommonAncestor","node1","node2","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","nodes","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","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","eachRange","callMethodOnEachRange","results","changeEachRange","rangeBookmarks","rangeBookmark","selRanges","saveRanges","restoreRanges","rangeHtmls","getNativeTextRange","detachAll","Selection","docReady","loadHandler","require","defaultTokenizer","chars","wordOptions","createTokenRange","isWord","tokenRanges","wordStart","wordEnd","word","lastWordEnd","wordRegex","exec","includeTrailingSpace","nonLineBreakWhiteSpaceRegex","convertCharRangeToToken","tokenRange","tokenChars","tokenize","tokenizer","normalizeIgnoredCharacters","ignoredCharacters","ignoredChars","ignoredCharsArray","sort","char1","char2","charCodeAt","createWordOptions","language","defaultLanguage","defaultWordOptions","createNestedOptions","characterOptions","defaultCharacterOptions","getComputedDisplay","display","tableCssDisplayBlock","defaultDisplayValueForTag","isHidden","getAncestorsAndSelf","isVisibilityHiddenTextNode","isBlockNode","containsPositions","getAncestors","unshift","nextNodeDescendants","excludeChildren","previous","isWhitespaceNode","computedWhiteSpace","isCollapsedWhitespaceNode","isCollapsedNode","isIgnoredNode","Cache","store","createCachingGetter","objProperty","cache","cachedCount","uncachedCount","value","NodeWrapper","session","positions","Position","nodeWrapper","inspectPosition","startSession","endSession","currentSession","Session","getSession","createCharacterIterator","startPos","endPos","charPos","finished","previousVisible","nextVisible","previousTextPos","returnPreviousTextPos","character","getCharacter","rewind","dispose","createTokenizedTextProvider","consumeWord","forward","textChar","newChars","forwardIterator","backwardIterator","passedWordBoundary","insideWord","allWhiteSpaceRegex","forwardChars","backwardChars","reverse","forwardTokensBuffer","arrayIndexOf","backwardTokensBuffer","nextEndToken","lastToken","previousStartToken","movePositionBy","unit","count","currentPos","charIterator","nextPos","unitsMoved","newPos","absCount","abs","CHARACTER","WORD","tokenizedTextProvider","isLeadingSpace","isTrailingSpace","createRangeCharacterIterator","rangeStart","getRangeBoundaryPosition","rangeEnd","itStart","itEnd","getRangeCharacters","isWholeWord","expand","findTextFromPosition","initialPos","searchTerm","isRegex","searchScopeRange","findOptions","handleMatch","startIndex","endIndex","valid","wholeWordsOnly","currentChar","matchStartIndex","matchEndIndex","insideRegexMatch","caseSensitive","createEntryPointFunction","sessionRunning","createRangeBoundaryMover","moveOptions","defaultMoveOptions","boundaryIsStart","moveResult","createRangeTrimmer","trimCharCount","trimmed","createSelectionTrimmer","spacesRegex","spacesMinusLineBreaksRegex","trailingSpaceInBlockCollapses","trailingSpaceBeforeBrCollapses","trailingSpaceBeforeBlockCollapses","trailingSpaceBeforeLineBreakInPreLineCollapses","includeBlockContentTrailingSpace","includeSpaceBeforeBr","includeSpaceBeforeBlock","includePreLineTrailingSpace","ignoreCharacters","defaultCaretCharacterOptions","en","defaultFindOptions","withinRange","wrap","defaultExpandOptions","trimStart","trimEnd","defaultWordIteratorOptions","table","caption","colgroup","col","thead","tbody","tfoot","tr","td","th","key","nodeProto","getPosition","EMPTY","NON_SPACE","UNCOLLAPSIBLE_SPACE","COLLAPSIBLE_SPACE","TRAILING_SPACE_BEFORE_BLOCK","TRAILING_SPACE_IN_BLOCK","TRAILING_SPACE_BEFORE_BR","PRE_LINE_TRAILING_SPACE_BEFORE_LINE_BREAK","TRAILING_LINE_BREAK_AFTER_BR","INCLUDED_TRAILING_LINE_BREAK_AFTER_BR","getLength","isWhitespace","isCollapsedWhitespace","isIgnored","getTextNodeInfo","spaceRegex","collapseSpaces","cssWhitespace","preLine","hasInnerText","posAfterEl","firstPosInEl","prepopulateChar","isDefinitelyNonEmpty","isRenderedBlock","brs","getTrailingSpace","getNodeWrapper","getLeadingSpace","positionProto","characterType","isBr","prepopulatedChar","visibleChar","charType","finalizedChar","charAt","nodePassed","checkForTrailingSpace","checkForLeadingSpace","isCharInvariant","resolveLeadingAndTrailingSpaces","trailingSpace","leadingSpace","getPrecedingUncollapsedPosition","getPreviousPos","gotPreviousPos","previousPos","returnChar","thisChar","isIgnoredCharacter","cacheKey","cachedChar","collapsible","nextUncollapsed","nextOffset","previousOffset","createWrapperCache","nodeProperty","wrappersByProperty","wrapper","property","initCaches","uniqueIDSupported","elementCache","elementsCache","uniqueID","elWrapper","textNodeCache","otherNodeCache","wrapperCache","prefix","moveEnd","move","startTrimmed","endTrimmed","expandOptions","moved","endToken","newEndPos","startTokenizedTextProvider","startToken","newStartPos","endTokenizedTextProvider","selectCharacters","toCharacterRange","rangeStartsBeforeNode","rangeBetween","findText","searchTermParam","findResult","wrappedAround","pasteHtml","saveCharacterRanges","rangeInfos","characterRange","restoreCharacterRanges","saved","rangeInfo","createWordIterator","iteratorOptions","noMutation","createPosition","gEBI","getElementById","insertRangeBoundaryMarker","atStart","markerEl","markerId","Date","random","boundaryRange","style","lineHeight","className","markerTextChar","setRangeBoundary","compareRanges","saveRange","startMarkerId","endMarkerId","restoreRange","saveSelection","restored","restoreSelection","savedSelection","preserveDirection","removeMarkerElement","removeMarkers","Base","_instance","_static","_prototyping","proto","base","klass","_constructing","implement","valueOf","source","toSource","hidden","object","block","context","browser","iosVersion","userAgent","androidVersion","isIE","equation","re","rv","appName","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","canSelectImagesInContentEditable","autoScrollsToCaret","autoClosesUnclosedTags","clonedTestElement","supportsNativeGetElementsByClassName","getElementsByClassName","supportsSelectionModify","needsSpaceAfterLineBreak","supportsSpeechApiOn","input","chromeVersion","crashesWhenDefineProperty","doesAsyncFocus","hasProblemsSettingCaretAfterImg","hasLiDeletingProblem","hasUndoInContextMenu","hasInsertNodeIssue","hasIframeFocusIssue","createsNestedInvalidMarkupAfterPaste","hasCaretBlockElementIssue","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","parents","domNode","defaultNodeTypes","is","emptyTextNode","ignoreWhitespace","regx","rangyBookmark","visible","isVisible","getTextContent","voidElement","query","prev","prevNode","types","ignoreBlankTexts","commonAncestor","parents1","parents2","lastLeafNode","leafClasses","escapeParent","newWrapper","split2","nodeWrap","curNode","transferContentTo","targetNode","removeOldWrapper","properties","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","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","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","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","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","deleteRangeContents","startParent","endParent","ev","dispatchEvent","err","getPreviousNode","ignoreEmpty","getNodesNearCaret","caretNode","textOffset","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","lastEditorElement","canAppendChild","anchorNodeTagNameLower","voidElements","splitElementAtCaret","contentAfterRangeStart","surround","nodeOptions","cssStyle","scrollIntoView","tolerance","hasScrollBars","scrollHeight","_wysihtml5ScrollIntoViewElement","selectLine","_selectLine_W3C","getBoundingClientRect","_selectLineUniversal","includeRangyRangeHelpers","isHelperNode","initialBoundry","modify","toLineBoundary","location","getRangeRect","rect","testNode","amount","testRect","found","isLineBreakingElement","pnode","bottom","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","getAncestorWithClass","cssClassMatch","getAncestorWithStyle","cssStyleMatch","getMatchingAncestor","matchType","postApply","currentMerge","precedingTextNode","lastNode","merges","rangeStartNode","rangeEndNode","rangeStartOffset","rangeEndOffset","getAdjacentMergeableTextNode","nextTextNode","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","getRangeNode","isBlock","isBookmark","isLineBreaking","cleanup","newBlockElements","nbIdx","allElements","BLOCK_ELEMENTS","noEditQuery","classNames","uneditableContainer","defaultNodeName","findOuterBlock","allBlocks","UNNESTABLE_BLOCK_ELEMENTS","cloneOuterInlines","innerNode","INLINE_ELEMENTS","outerNode","applyOptionsToElement","removeOptionsFromElement","unwrapped","applySurroundingLineBreaks","unwrapBlocksFromContent","nextEl","prevEl","blocks","fixRangeCoverage","fixNotPermittedInsertionPoints","lis","maxj","rangePos","closestLI","newRanges","getOptionsWithNodename","defaultName","correctedOptions","injectFragmentToRange","firstOuterBlock","outerInlines","first","last","rangeStartContainer","fc","lc","clearRangeBlockFromating","closestBlockName","removeSurroundingLineBreaks","prevPrev","wrapRangeWithElement","similarOptions","isWhitespaceBefore","isWhitespaceAfter","similarOuterBlock","splitAllBlocks","trimBlankTextsAndBreaks","tmpEl","getParentBlockNodeName","expandCaretToBlock","insertingNodeName","selectElements","lastEl","lastOffset","formatSelection","parseOptions","caretIsOnEmptyLine","caretInfo","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","searchNodes","partial","caretIsInsideWord","beforeChar","afterChar","getRangeForWord","offsetStart","offsetEnd","txtNodes","wordOffset","mergeContents","mergeConsequentSimilarElements","cleanupAndSetSelection","cleanupAndSetCaret","formatTextNode","wrapNode","unformatTextNode","newWrapNode","removeFormatFromTextNode","formatTextRange","updateFormat","wordObj","exactState","removeFormat","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","alignJustifyStyle","redo","undoManager","underline","undo","createTable","cols","rows","tableStyle","mergeTableCells","tableSelection","addTableCells","tableSelect","deleteTableCells","selCell","indentList","listEls","tryToPushLiLevel","liNodes","listTag","prevLi","liNode","prevLiList","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","editableElement","textarea","contentEditableMode","_initContentEditableArea","_initSandbox","_displayStyle","disabled","setToEnd","pageYOffset","pageXOffset","scrollTo","_create","_createWysiwygFormField","form","hiddenField","_initAutoLinking","placeholder","_initObjectResizing","_initUndoManager","_initLineBreaking","initSync","sync","supportsDisablingOfAutoLinking","supportsAutoLinking","nodeWithSelection","isInUneditable","links","urlRegExp","newTextContent","propertiesLength","adjust","USE_NATIVE_LINE_BREAK_INSIDE_TAGS","LIST_TAGS","defaultPrevented","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","actions","addListeners","removeListeners","fixLastBrDeletionInTable","aNode","handleUneditableDeletion","fixDeleteInTheBeginningOfBlock","selNode","commonAncestorNode","fixDeleteInTheBeginningOfLi","isInBeginnig","initTableHandling","hideHandlers","iframeInitiator","doLineBreaksModeEnterWithCaret","breakNodes","doubleLineBreakEscapesBlock","brNode","br1","br2","handleDeleteKeyPress","handleEnterKeyPress","handleTabKeyDown","handleDomNodeRemoved","domNodeRemovedInterval","clearInterval","handleUserInteraction","handleFocus","focusState","handleBlur","changeevent","create","handlePaste","handleCopy","copyedFromMarking","setData","handleKeyUp","allImages","notMyImages","myImages","handleClick","uneditable","handleDrop","handleKeyDown","handleTabKey","observeActions","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","u","pasteParserRulesets","parser","supportTouchDevices","Editor","_isCompatible","_initParser","handleBeforeLoad","sourceView","synchronizer","Toolbar","isCompatible","htmlOrElement","customRules","parseContext","oldHtml","_cleanAndPaste","pastedHTML","cleanHtml"],"mappings":";;AAWA,GAAIA,YACFC,QAAS,QAGTC,YACAC,OACAC,UACAC,WACAC,QACAC,aACAC,SAEAC,gBAAiB,SACjBC,wBAAyB,UAEzBC,cAAe,4FAEfC,eAAgB,aAEhBC,aAAc,EACdC,UAAc,EAEdC,cAAgB,EAChBC,UAAgB,GAChBC,WAAgB,GAChBC,UAAgB,GAChBC,QAAgB,EAChBC,WAAgB,GAEjBpB,WAAUqB,UAAY,SAASC,EAAKC,GAkenC,QAASC,KACP,IACE,GAAIC,GAAI,GAAIC,aAAY,OAAQC,QAASC,IAAK,QAC9C,OAAQ,QAAUH,EAAEI,MAAQ,QAAUJ,EAAEE,OAAOC,IAC/C,MAAOE,IACT,OAAO,EA/dJC,OAAOC,UAAUC,OACpB,WAEE,GAAIC,GAAQ,oCACZH,QAAOC,UAAUC,KAAO,WACtB,MAAOE,MAAKC,QAAQF,EAAO,QAMjC,WACE,GAAIG,GAAQ,mBACRC,EAA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C,GAEtBj2E,KAAKgrD,SAASmG,aAAahG,IAC3B3oD,KAAKxC,QAEPwC,KAAKxC,QAIXg2E,eAAgB,SAAUD,GACxB,GAAIG,GAAYr4E,EAAUI,OAAOytD,gBAAgBqqB,GAC/CtzB,cAAiBziD,KAAKgrD,SAAStnD,QAC/BixC,MAAS30C,KAAK+N,OAAOknE,uBAAyBvzE,IAAO1B,KAAK+N,OAAO8mE,cACjEzmC,gBAAmBpuC,KAAK+N,OAAOgxD,WAAWC,qBAE5Ch/D,MAAKgrD,SAAS5sD,UAAUkhB,iBACxBtf,KAAKgrD,SAAS5sD,UAAU0oC,WAAWovC,OAGtCr4E"}
\ No newline at end of file
diff --git a/package.json b/package.json
index 8a40487..6a4a122 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "wysihtml",
- "version": "0.5.3",
+ "version": "0.5.4",
"devDependencies": {
"grunt": "~0.4.4",
"grunt-cli": "^0.1.13",