{"version":3,"sources":["kendo.editor.js"],"names":["f","define","kendo","UndoRedoStack","Observable","extend","init","options","fn","call","this","clear","events","push","command","stack","slice","currentCommandIndex","undo","canUndo","trigger","redo","canRedo","length","deepExtend","util","amd","a1","a2","a3","$","undefined","Tool","FormatTool","bomFill","emptyElementContent","emptyTableCellContent","window","Class","Widget","ui","os","support","mobileOS","browser","proxy","keys","SELECT","SELECT_OVERLAY_SELECTOR","ToolTemplate","getHtml","template","useWithBlock","EditorUtils","editorWrapperTemplate","buttonTemplate","colorPickerTemplate","comboBoxTemplate","dropDownListTemplate","separatorTemplate","overflowAnchorTemplate","formatByName","name","format","i","inArray","tags","getToolCssClass","toolCssClassNames","superscript","subscript","justifyLeft","justifyCenter","justifyRight","justifyFull","insertUnorderedList","insertOrderedList","import","indent","outdent","createLink","unlink","insertImage","insertFile","viewHtml","foreColor","backColor","createTable","addColumnLeft","addColumnRight","addRowAbove","addRowBelow","deleteRow","deleteColumn","tableWizard","tableWizardInsert","cleanFormatting","cssClass","registerTool","toolName","tool","toolOptions","toLowerCase","Editor","defaultTools","registerFormat","formatName","formats","messages","bold","italic","underline","strikethrough","insertHtml","fontName","fontNameInherit","fontSize","fontSizeInherit","formatBlock","formatting","style","emptyFolder","editAreaTitle","uploadFile","overflowAnchor","orderBy","orderBySize","orderByName","invalidFileType","deleteFile","overwriteFile","directoryNotFound","imageWebAddress","imageAltText","imageWidth","imageHeight","fileWebAddress","fileTitle","fileText","linkWebAddress","linkText","linkToolTip","linkOpenInNewWindow","dialogUpdate","dialogInsert","dialogOk","dialogCancel","createTableHint","tableTab","cellTab","accessibilityTab","caption","summary","width","height","units","cellSpacing","cellPadding","cellMargin","alignment","background","id","border","borderStyle","collapseBorders","wrapText","associateCellsWithHeaders","alignLeft","alignCenter","alignRight","alignLeftTop","alignCenterTop","alignRightTop","alignLeftMiddle","alignCenterMiddle","alignRightMiddle","alignLeftBottom","alignCenterBottom","alignRightBottom","alignRemove","columns","rows","selectAllCells","exportAs","supportedBrowser","ios","flatVersion","document","documentElement","contentEditable","toolGroups","basic","lists","indenting","links","tables","element","value","toolbarContainer","toolbarOptions","type","domElement","that","editorNS","editor","dom","Dom","tools","_registerHandler","closest","update","_wrapTextarea","wrapper","find","attr","addClass","popup","insertBefore","toolbar","Toolbar","bindTo","setTimeout","heightStyle","expectedHeight","parseInt","actualHeight","indexOf","isNaN","_resizable","_initializeContentElement","keyboard","Keyboard","BackspaceHandler","TypingHandler","SystemHandler","SelectAllHandler","clipboard","Clipboard","undoRedoStack","textarea","encoded","trim","defaultValue","replace","innerHTML","mousedown","_endTyping","mouseup","e","_mouseup","_initializeImmutables","resize","notify","setOptions","isTypingInProgress","endTyping","saveSelection","_selectionChange","_selectionStarted","resizableWidget","resizable","isResizable","isPlainObject","content","insertAfter","kendoResizable","start","currentTarget","initialSize","append","delta","y","initialDelta","newSize","min","max","Infinity","Math","resizeend","remove","getKendoResizable","draggable","ignore","_initializeTableResizing","TableResizing","create","_showTableResizeHandlesProxy","_showTableResizeHandles","bind","_destroyTableResizing","tableResizing","destroy","unbind","showResizeHandles","_initializeColumnResizing","ColumnResizing","_destroyColumnResizing","columnResizing","_initializeRowResizing","RowResizing","_destroyRowResizing","rowResizing","w","h","editorWrap","editArea","appendTo","css","_createContentElement","stylesheets","iframe","wnd","doc","specifiedDomain","domain","domainScript","src","location","hostname","hide","title","frameBorder","tabIndex","contentWindow","contentDocument","one","decorateFrom","body","open","write","isRtl","msie","edge","map","href","join","close","_blur","old","val","_oldValue","encodedValue","_spellCorrect","beforeCorrection","falseTrigger","contextmenu","_spellCorrectTimeout","RestorePoint","getRange","input","mozilla","_finishUpdate","handler","eventNames","t","NS","_handlers","hasOwnProperty","applyEventMap","split","on","_deregisterHandlers","handlers","off","blurTrigger","mousedownTrigger","_mousedown","execCommand","touch","keydown","_activeElement","focus","range","left","container","offset","direction","next","nextChar","keyCode","BACKSPACE","DELETE","getAttribute","F10","preventDefault","LEFT","RIGHT","nodeType","nodeValue","setStart","collapse","selectRange","toolFromShortcut","keyPressCommand","test","exec","_runPostContentKeyCommands","clearTimeout","keypress","keyup","selectionCodes","TAB","PAGEUP","PAGEDOWN","END","HOME","UP","DOWN","INSERT","ctrlKey","altKey","shiftKey","click","target","createRange","selectNode","cut copy paste","focusin","hasAttribute","show","focusout","toolbarContainerElement","active","get","contains","preventPopupHide","is","focused","removeClass","immutables","Immutables","gecko","which","o","cmd","toolsFromShortcut","changesContent","refresh","_destroyResizings","deserialization","custom","serialization","entities","semantic","scripts","pasteCleanup","all","keepNewLines","msAllFormatting","msConvertLists","msTags","none","span","dialogOptions","modal","animation","imageBrowser","fileBrowser","text","concat","_focusOutside","_destroyUploadWidget","dispose","tempInput","blur","_uploadWidget","state","textNodes","finder","RangeUtils","collapsed","startContainer","getFormat","isFormatted","html","currentHtml","Serializer","domToXhtml","htmlToDom","selectionRestorePoint","refreshTools","commonAncestorContainer","_focusBody","scrollTop","activeElement","restoreSelection","toRange","encode","getSelection","SelectionUtils","selectionFromDocument","selection","removeAllRanges","addRange","rangeCount","getRangeAt","endContainer","startOffset","endOffset","_containsRange","isAncestorOrSelf","selectedHtml","cloneContents","paste","InsertHtmlCommand","params","prevented","Error","_range","toolById","async","change","managesUndoRedo","key","ctrl","plugin","initialize","unselectable","children","commandArguments","noop","FormatCommand","formatter","nodes","toggleClass","version","_bomFill","PDFMixin","prototype","_drawPDF","drawing","drawDOM","pdf","saveAsPDF","progress","Deferred","promise","args","then","root","exportPDF","done","dataURI","saveAs","fileName","proxyURL","forceProxy","resolve","fail","err","reject","jQuery","makeMap","items","len","obj","whitespace","emptyspace","rgb","bom","whitespaceOrBom","persistedScrollTop","cssAttributes","htmlRe","entityRe","entityTable","STYLE","FLOAT","CSSFLOAT","STYLEFLOAT","CLASS","KMARKER","empty","nonListBlockElements","blockElements","block","inlineElements","inline","fillAttrs","normalize","node","parent","firstChild","prev","nextSibling","34","38","39","60","62","160","161","162","163","164","165","166","167","168","169","170","171","172","173","174","175","176","177","178","179","180","181","182","183","184","185","186","187","188","189","190","191","192","193","194","195","196","197","198","199","200","201","202","203","204","205","206","207","208","209","210","211","212","213","214","215","216","217","218","219","220","221","222","223","224","225","226","227","228","229","230","231","232","233","234","235","236","237","238","239","240","241","242","243","244","245","246","247","248","249","250","251","252","253","254","255","402","913","914","915","916","917","918","919","920","921","922","923","924","925","926","927","928","929","931","932","933","934","935","936","937","945","946","947","948","949","950","951","952","953","954","955","956","957","958","959","960","961","962","963","964","965","966","967","968","969","977","978","982","8226","8230","8242","8243","8254","8260","8472","8465","8476","8482","8501","8592","8593","8594","8595","8596","8629","8656","8657","8658","8659","8660","8704","8706","8707","8709","8711","8712","8713","8715","8719","8721","8722","8727","8730","8733","8734","8736","8743","8744","8745","8746","8747","8756","8764","8773","8776","8800","8801","8804","8805","8834","8835","8836","8838","8839","8853","8855","8869","8901","8968","8969","8970","8971","9001","9002","9674","9824","9827","9829","9830","338","339","352","353","376","710","732","8194","8195","8201","8204","8205","8206","8207","8211","8212","8216","8217","8218","8220","8221","8222","8224","8225","8240","8249","8250","8364","findNodeIndex","skipText","previousSibling","isDataNode","data","isAncestorOf","parentNode","findClosestAncestor","getNodeLength","childNodes","splitDataNode","temp","newNode","cloneNode","denormalizedText","iterator","deleteData","attrEquals","attributes","cssFloat","blockParentOrBody","parentOfType","ownerDocument","blockParents","blocks","windowFromDocument","defaultView","parentWindow","nodeTypes","ELEMENT_NODE","ATTRIBUTE_NODE","TEXT_NODE","CDATA_SECTION_NODE","ENTITY_REFERENCE_NODE","ENTITY_NODE","PROCESSING_INSTRUCTION_NODE","COMMENT_NODE","DOCUMENT_NODE","DOCUMENT_TYPE_NODE","DOCUMENT_FRAGMENT_NODE","NOTATION_NODE","toHex","color","matches","x","toString","encodableChars","c","charCode","charCodeAt","entity","isBom","stripBom","stripBomNode","removeChild","insignificant","className","_moz_dirty","_moz_editor_bogus_node","tableCell","significantNodes","grep","child","emptyTextNode","emptyNode","nodeName","significantChildNodes","isWhitespace","lastTextNode","result","lastChild","isMarker","allWhitespaceContent","isEmptyspace","htmlIndentSpace","sibling","isPrevBlock","isNextBlock","el","isBlock","isEmpty","isInline","list","scrollContainer","webkit","compatMode","scrollTo","elementTop","elementHeight","windowHeight","innerHeight","top","offsetHeight","ceil","persistScrollTop","offsetParent","offsetTop","offsetLeft","restoreScrollTop","insertAt","newElement","position","referenceElement","removeChildren","removeTextSiblings","tag","closestBy","condition","rootCondition","ofType","changeTag","tagName","skipAttributes","attribute","specified","cssText","setAttribute","appendChild","editableParent","wrap","unwrap","createElement","removeAttribute","unstyle","inlineStyle","getEffectiveBackground","backgroundStyle","innerText","classNames","classes","commonAncestor","ancestors","first","j","count","arguments","paths","minPathLength","output","reverse","closestSplittableParent","editableParents","editableAncestor","apply","closestEditable","types","editable","closestEditableOfType","filter","invert","filterFn","filterBy","match","ensureTrailingBreaks","elements","ensureTrailingBreak","removeTrailingBreak","br","supportsLeadingWhitespace","isFunction","TD","fontSizeMappings","quoteRe","brRe","pixelRe","emptyPRe","cssDeclaration","sizzleAttr","scriptAttr","onerrorRe","div","toEditableHtml","_toEditableImmutables","immutable","last","prependTo","_fillEmptyElements","each","p","_removeSystemElements","_resetOrderedLists","ol","originalStart","ols","getElementsByTagName","_preventScriptExecution","l","legacyIE","originalSrc","originalHref","deserialize","semanticFilter","cssProperties","property","properties","lastIndex","styleAttr","specifiedAttributes","$node","sort","a","b","htmlEncode","skip","skipEncoding","childNode","isEmptyBomNode","mapper","previous","jqNode","serialize","hasClass","tagMap","end","textOnly","childrenCount","textChild","runCustom","k:script","font","size","semanticAttributes","textDecoration","fontFamily","strong","em","u","face","script","compareBoundaries","startAncestor","endAncestor","fixIvalidRange","toStart","isInvalidRange","ex","updateRangeProperties","textRangeContainer","textRange","duplicate","right","parentElement","adoptContainer","cursorNode","textOffset","isData","anchorNode","anchorParent","cursor","createTextRange","moveToElementText","setEndPoint","adoptEndPoint","index","comparison","appended","compareEndPoints","RangeIterator","W3CSelection","RangeEnumerator","ImmutablesRangeIterator","ImmutablesRangeEnumerator","Marker","boundary","selectionFromWindow","selectionFromRange","rangeDocument","documentFromRange","W3CRange","setEnd","setStartBefore","setStartAfter","setEndBefore","setEndAfter","selectNodeContents","deleteContents","cloneRange","deleteSubtree","hasPartialSubtree","getSubtreeIterator","cloneSubtree","frag","createDocumentFragment","extractContents","extractSubtree","originalRange","insertNode","startNodeName","endNodeName","fromNode","_current","_next","_end","hasNext","current","traverse","callback","nodeIndex","inStartContainer","inEndContainer","getSubRange","subRange","select","movedStart","movedEnd","item","enumerate","visit","rootNode","getEditable","nodeToPath","serializedImmutables","removeImmutables","restoreImmutables","lastType","restoreHtml","path","toRangePoint","denormalizedOffset","caret","addCaret","removeCaret","containerIndex","textNode","add","expand","rangeBoundary","isExpandable","_removeDeadMarkers","createTextNode","_normalizedIndex","pointer","shouldNormalizeStart","shouldNormalizeEnd","shouldNormalize","collapsedToStart","startParent","endParent","startIndex","endIndex","editableTextNodes","immutableParent","image","stringify","partition","contents","partitionRange","mapAll","mapped","getAll","predicate","selector","getMarkers","isStartOf","isEndOf","wrapSelectedElements","isEnd","startEditable","endEditable","beforeCaret","afterCaret","search","substring","finishUpdate","startRestorePoint","endRestorePoint","GenericCommand","selected","getSibling","PREVIOUS_SIBLING","Command","restorePoint","marker","lockRange","releaseRange","point","createDialog","kendoWindow","toggle","expandImmutablesIn","genericCommand","postProcess","InsertHtmlTool","initOptions","dataSource","_selectBox","SelectBox","dataTextField","dataValueField","highlightFirst","selectbox","tableCells","tableCellsWrappers","tableElements","inTable","RemoveTableContent","cellsTypes","startCell","endCell","_removeContent","cell","forwards","getNext","removeTableContent","backspaceHandler","isTypingKey","evt","Event","isDefaultPrevented","immutablesContext","deleteSelection","startTyping","_addCaret","_restoreCaret","_handleDelete","_merge","_cleanBomBefore","_handleBackspace","linkRange","previousNode","isEndOfLink","li","ListFormatter","UnlinkCommand","_handleSelection","ancestor","table","emptyParagraphContent","_handleImmutables","_surroundFullySelectedAnchor","_join","startImmutable","endImmutable","_root","dest","_mergeWithTextNode","appendedNode","_isCaret","method","backspace","del","systemCommandIsInProgress","createUndoCommand","changed","isModifierKey","isSystem","_toSelectableImmutables","_selectEditorBody","typingInProgress","isCharacter","String","fromCharCode","modifier","_getShortcutModifier","navigator","platform","alt","shift","mac","toUpperCase","metaKey","matchesKey","found","matchKey","toolKey","isArray","onEndTyping","stopTyping","force","timeout","what","cleaners","ScriptCleaner","TabCleaner","MSWordFormatCleaner","WebkitFormatCleaner","HtmlTagsCleaner","HtmlAttrCleaner","HtmlContentCleaner","CustomCleaner","htmlToFragment","fragment","_startModification","_inProgress","_endModification","modificationInfo","_contentModification","before","after","_removeBomNodes","_onBeforeCopy","oncopy","oncut","_fileToDataURL","blob","deferred","reader","FileReader","File","getAsFile","onload","readAsDataURL","_triggerPaste","_handleImagePaste","clipboardData","images","originalEvent","files","when","results","Array","onpaste","r","clipboardRange","clipboardNode","_decoreateClipboardNode","_moveToCaretPosition","containers","clean","borderWidth","overflow","margin","padding","fontVariant","fontWeight","lineSpacing","lineHeight","nodeOffset","caretOffset","_caretOffset","translateX","translateY","translate","-webkit-transform","transform","rangeChanged","isStartTextNode","prevLength","bomNode","splittableParent","splittable","fragmentsHtml","rangeEnd","skipCleaners","applicable","display","Cleaner","replacements","customReplacements","replacement","junkReplacements","convertFontMatch","$0","$1","closing","faceRe","family","stripEmptyAnchors","listType","listData","startingSymbol","matchSymbol","symbol","isNumber","trimStartText","_guessUnorderedListStyle","_guessOrderedListStyle","_convertToLi","extractListLevels","msoListRegExp","level","placeholder","rootMargin","listContainer","listIndex","levelType","blockChildren","lastMargin","levels","parseFloat","marginLeft","listStyleType","removeAttributes","removeAttributeNode","createColGroup","row","cells","colgroup","convertHeaders","boldedCells","removeParagraphs","paragraphs","removeDefaultColors","spans","firstRow","longestRow","eq","headers","titles","removeFormatting","filters","DomCleaner","cleanDom","collectTags","collectAttr","removeAttr","TextContainer","HtmlTextLines","separators","line","lines","inlineBlockText","resetLine","appendText","textContainer","appendInlineBlockText","flashInlineBlockText","endLine","il","il1","jl","jl1","DomEnumerator","preventDown","hasText","enumerator","buildText","getDefaultSeparators","htmlLines","action","actions","ul","thead","tbody","td","cleaner","tdCleaner","cellText","PrintCommand","print","ExportPdfCommand","initialValue","ev","MOUSEDOWN_NS","KEYDOWN_NS","InlineFormatFinder","numberOfSiblings","referenceNode","textNodesCount","elementNodesCount","markerCount","findSuitable","sourceNode","findFormat","InlineFormatter","values","activate","formatNode","formatNodes","consolidate","pop","GreedyInlineFormatFinder","greedyProperty","getInlineCssValue","attributeValue","pair","cssIndex","propertyAndValue","getFormatInner","parents","parentsUntil","addBack","toArray","GreedyInlineFormatter","toCamelCase","InlineFormatTool","DelayedExecutionTool","FontTool","cssAttr","domAttr","widget","newRange","ENTER","ColorTool","palette","_widget","ColorPicker","toolIcon","picker","sender","_popup","fontStyle","listElements","BlockFormatFinder","candidate","suitable","_resolveListsItems","ImmutablesNS","BlockFormatter","imageFormat","imageAttributes","nonImages","applyFormatting","immutableFormat","splice","namedFormat","GreedyBlockFormatter","immutalbeParent","blockFormatter","formatTag","_initOptions","BlockFormatTool","textAlign","float","marginRight","listStylePosition","ParagraphCommand","_insertMarker","_moveFocus","focusNode","shouldTrim","startInBlock","endInBlock","_blankAfter","paragraph","heading","rng","parentChildrenLength","siblings","NewLineCommand","filler","oldIE","ListFormatFinder","unwrapTag","isList","isImmutable","containsAny","_parentLists","merge","breakable","applyOnSection","section","pushAncestor","addLastSection","lastSection","sections","lastNodes","ListCommand","ListTool","lastIndexOfRegExp","str","indexOfRegExp","HTTP_PROTOCOL","protocolRegExp","endLinkCharsRegExp","LinkFormatFinder","LinkFormatter","markers","ref","LinkCommand","url","_dialogTemplate","img","dialog","_initialText","_close","visible","_apply","_keydown","linkUrl","_dialog","center","ESC","textInput","anchor","AutoLinkCommand","linkMarker","detectedLink","detectLink","_ensureWebProtocol","traverser","LeftDomTextTraverser","cancelAtNode","detection","DomTextLinkDetection","hasProtocol","_hasProtocolPrefix","_prefixWithWebProtocol","UnlinkTool","DomPos","puntuationOptions","puntuationTraverser","_detectEnd","blank","clone","_detectStart","_isLinkDetected","extendOptions","RightDomTextTraverser","_skipStartPuntuation","ii","DomTextTraverser","cancel","_traverse","edgeNode","subText","splitIndex","SPACEBAR","KEDITORFILEURL","KEDITORFILETEXT","KEDITORFILETITLE","FileCommand","file","showBrowser","applied","keyDown","FileBrowser","transport","read","_fileBrowser","KEDITORIMAGEURL","KEDITORIMAGETITLE","KEDITORIMAGEWIDTH","KEDITORIMAGEHEIGHT","ImageCommand","removeIEAttributes","onerror","ImageBrowser","_imageBrowser","DropDownList","_initSelectOverlay","autoSize","listWidth","whiteSpace","_listWidth","scrollbar","selectBox","view","decorate","indentDirection","IndentFormatter","targets","parentList","siblingList","nestedList","targetIndex","mapImmutables","targetNode","listParent","nextAll","IndentCommand","indentFormatter","OutdentCommand","OutdentTool","isOutdentable","listParentsCount","suitableNodes","ViewHtmlCommand","unwrapListItem","listFormatter","FormattingTool","toFormattingItem","dot","context","kendoSelectBox","dataItem","toJSON","dataBound","getFormattingValue","n","_ancestor","field","operator","CleanFormatCommand","tagsToClean","outerWidth","_outerWidth","outerHeight","_outerHeight","OVERFLOWANCHOR","focusable","toolNamesByCssClass","k-i-sup-script","k-i-sub-script","k-i-align-left","k-i-align-center","k-i-align-right","k-i-align-justify","k-i-list-unordered","k-i-list-ordered","k-i-login","k-i-indent-increase","k-i-indent-decrease","k-i-link-horizontal","k-i-unlink-horizontal","k-i-image","k-i-file-add","k-i-html","k-i-foreground-color","k-i-paint","k-i-table-insert","k-i-table-column-insert-left","k-i-table-column-insert-right","k-i-table-row-insert-above","k-i-table-row-insert-below","k-i-table-row-delete","k-i-table-column-delete","k-i-table-properties","k-i-table-wizard","k-i-clear-css","OverflowAnchorTool","overflowPopup","_initPopup","_resizeHandler","onResize","groups","advanced","fonts","colors","overflowFlaseTools","prepend","dragHandle","effects","minHeight","autoFocus","dragend","_moved","_toggleOverflowStyles","_initOverflowPopup","popupTemplate","kendoPopup","origin","copyAnchorStyles","focusOverflowPopup","toolGroupFor","isCustomTool","_editor","expandTools","render","combobox","dropDown","isOpened","stopImmediatePropagation","_attachEvents","inheritText","_toolName","description","tooltip","_appendShortcutSequence","editorElement","editorOffset","editorOptions","_overlaps","box","toolbarWrapper","toolbarWrapperOffset","toolbarWrapperLeft","toolbarWrapperTop","boxOffset","boxOffsetLeft","boxOffsetTop","TABINDEX","localizedText","res","_nativeTools","currentTool","nativeTools","endGroup","group","groupPosition","startGroup","toolElement","groupName","newGroupName","toolConfig","updateGroups","angular","unbindResize","popupElement","attachToolsEvents","buttons","enabledButtons","disabledButtons","dropdown","colorpicker","editorTools","move","constrain","focusElement","currentContainer","_executeToolCommand","button","stopPropagation","toolname","lastIndexOf","_immutablesContext","_updateImmutablesState","uiData","groupUi","uiElement","trackImmutables","toolsToBeUpdated","_resize","containerWidth","_refreshWidths","_shrink","_stretch","idx","visibleGroups","_groupsWidth","_visibleGroups","_hideGroup","hiddenGroups","_hiddenGroups","_showGroup","detach","ACTIVESTATE","SELECTEDSTATE","getTouches","columnTemplate","tableFormatFinder","TableCommand","_tableHtml","columnHtml","rowHeight","insertedTable","PopupTool","twTool","_open","_activate","_toggle","TableWizardTool","TableWizardCommand","insertNewTable","InsertTableTool","cols","tableFromLocation","floor","clientY","cellHeight","col","clientX","scrollLeft","cellWidth","firstCell","lastCell","getOffset","offsetWidth","autoApplyNS","_setTableSize","_exec","_valid","status","selectedRows","selectedColumns","tableSize","InsertRowCommand","cellCount","newRow","InsertColumnCommand","columnIndex","newCell","DeleteRowCommand","DeleteColumnCommand","columnCount","TableModificationTool","defaultExportAsItems","ExportAsCommand","exportType","postToProxy","generateForm","submit","exportAsOptions","form","valueInput","exportTypeInput","fileNameInput","ExportAsTool","changeHandler","unshift","loadingOverlay","ImportCommand","_initializeUploadWidget","importOptions","upload","kendoUpload","success","_onUploadSuccess","_onUploadProgress","_onUploadSelect","error","_onUploadError","complete","_onUploadComplete","showFileList","multiple","saveUrl","proxyUrl","autoUpload","saveField","validation","allowedExtensions","maxFileSize","getKendoUpload","_trigger","clearAllFiles","_removeLoadingOverlay","response","validationErrors","_initLoadingOverlay","eventType","uploadEvent","_iframeWrapper","_container","lowerBound","upperBound","getScrollBarWidth","scrollHeight","clientHeight","calculatePercentageRatio","total","inPercentages","STRING","REGEX_NUMBER_IN_PERCENTAGES","inPixels","REGEX_NUMBER_IN_PIXELS","toPercentages","PERCENTAGE","toPixels","PIXEL","global","math","ResizingUtils","KEY_DOWN","MOUSE_DOWN","MOUSE_ENTER","MOUSE_LEAVE","MOUSE_MOVE","MOUSE_UP","COMMA","DOT","LAST_CHILD","TABLE","TableElementResizing","_attachEventHandlers","eventNamespace","rootElement","_destroyResizeHandle","rtl","handle","dataAttribute","detectElementBorderHovering","resizingInProgress","resizing","handleOptions","tableElement","resizeHandle","elementBorderHovered","showResizeHandle","_initResizeHandle","setResizeHandlePosition","setResizeHandleDimensions","setResizeHandleDataAttributes","_attachResizeHandleEventHandlers","_initResizable","_hideResizeMarker","markerClass","_destroyResizable","Resizable","draggableElement","onResizeStart","onResizeEnd","_disableKeyboard","setResizeHandleDragPosition","_enableKeyboard","_forceResizing","userEvents","ResizingFactory","resizingName","_destroyResizing","_initResizing","parentTable","resizingType","abs","RESIZE_HANDLE_CLASS","RESIZE_MARKER_CLASS","BODY","TBODY","TH","TR","WIDTH","column","handleWidth","borderOffset","mousePosition","tableBody","scrollTopOffset","scrollLeftOffset","columnWidthOffset","scrollBarWidth","columnWidth","columnLeftOffset","adjacentColumnWidth","handleOffset","newWidth","initialAdjacentColumnWidth","initialColumnWidth","rtlModifier","initialDeltaX","_setTableComputedWidth","_setColumnsComputedWidth","_resizeColumn","_resizeTopAndBottomColumns","_resizeAdjacentColumns","tableBodyWidth","currentColumnsWidths","topAndBottomColumns","deltaWidth","adjacentColumns","_resizeAdjacentColumn","adjacentColumn","RESIZE_HANDLE_MARKER_WRAPPER_CLASS","HEIGHT","handleHeight","rowPosition","tableBodyTopOffset","currentRowHeight","initialTableHeight","tableBodyHeight","initialStyleHeight","newRowHeight","_setRowsHeightInPixels","_setTableHeight","_setRowsHeightInPercentages","currentRowsHeights","newHeight","HandlePositioningStrategy","EastPositioningStrategy","NorthPositioningStrategy","NortheastPositioningStrategy","NorthwestPositioningStrategy","SouthPositioningStrategy","SoutheastPositioningStrategy","SouthwestPositioningStrategy","WestPositioningStrategy","DraggingStrategyFactory","HandleDraggingStrategy","HorizontalDraggingStrategy","EastDraggingStrategy","WestDraggingStrategy","VerticalDraggingStrategy","NorthDraggingStrategy","SouthDraggingStrategy","HorizontalAndVerticalDraggingStrategy","NorthEastDraggingStrategy","NorthWestDraggingStrategy","SouthEastDraggingStrategy","SouthWestDraggingStrategy","Draggable","DRAG_START","DRAG","DRAG_END","HALF_INSIDE","MOUSE_OVER","MOUSE_OUT","EAST","NORTH","NORTHEAST","NORTHWEST","SOUTH","SOUTHEAST","SOUTHWEST","WEST","TableResizeHandle","_addStyles","_initDraggable","_initPositioningStrategy","_initDraggingStrategy","resizableElement","_destroyDraggable","_setPosition","_positioningStrategy","getPosition","_onMouseOver","_onMouseOut","_draggable","dragstart","_onDragStart","drag","_onDrag","_onDragEnd","_draggingStrategy","adjustDragDelta","deltaX","deltaY","initialDeltaY","StrategyFactory","_items","register","itemsLength","PositioningStrategyFactory","calculatePosition","handleOffsetPosition","applyHandleOffset","scrollOffsetPosition","applyScrollOffset","adjustment","deltas","xAxisAdjustment","yAxisAdjustment","isUndefined","RESIZE_HANDLE_WRAPPER_CLASS","TABLE_CLASS","TABLE_RESIZING_CLASS","COLUMN","ROW","handles","_destroyResizeHandles","appendHandlesTo","minWidth","_resizeWidth","_resizeHeight","ratioValue","ratioTotalValue","constrainedWidth","styleWidth","currentWidth","parentWidth","maxWidth","_getMaxDimensionValue","_initialElementWidth","_setColumnsWidth","constrainedHeight","styleHeight","currentHeight","parentHeight","maxHeight","hasRowsInPixels","_hasRowsInPixels","_initialElementHeight","dimension","dimensionLowercase","parentDimension","parentScrollOffset","isWidthInPercentages","parentColumn","columnsLength","_initResizeHandles","_showResizeHandles","_bindToResizeHandlesEvents","_onResizeHandleDragStart","_onResizeHandleDrag","_onResizeHandleDragEnd","_onResizeHandleMouseOver","_onResizeHandleMouseOut","TableResizingFactory","factory","eventTarget","eventCurrentTarget","isResizeHandleOrChild","complexBlocks","IMMUTABALE","IMMUTABALE_MARKER_SELECTOR","IMMUTABLE_SELECTOR","startImmutableParent","endImmutableParent","editableNodes","randomId","chars","charAt","round","random","serialized","replaceWith","deletingKey","updateToolOptions","_toHtml","serializationType","isDeleting","shouldCancelEvent","_cancelDeleting","_cancelTyping","cancelDeleting","closestSelectionLi","closestImmutableLi","nextImmutable","_removeImmutable","commonContainer","_nextNode","cellsFormatFinder","reUnit","selectedTable","_sourceTable","_selectedTable","selectedCells","_selectedTableCells","_selectedCells","closeCallback","onDialogClose","parseTable","TableWizardDialog","insertTable","createNewTable","updateTable","lastSelectedRow","rowIndex","cellsLength","newRowsCount","cellIndex","cellProp","tableRows","tableProp","tableProperties","collection","_deleteTableRows","insertRow","_insertCells","deleteCell","_updateTableProperties","cellProperties","_updateCellProperties","_updateCaption","cellsWithHeaders","cellsWithHeadersAssociated","associateCellsWithHeader","_isHeadingRow","associate","nextRow","isDataRow","timestamp","Date","getTime","ids","generateIds","modifySellsIds","modifyCellsHeadings","isHeadingRow","associatedCells","headingIds","headersAttr","insertCell","rowParent","cellPropToAll","createTBody","_getStylesData","captionContent","deleteCaption","createCaption","_getAlignmentData","captionAlignment","verticalAlign","widthUnit","heightUnit","backgroundColor","bgColor","borderColor","borderCollapse","align","tStyle","captionClone","tableAlignment","tableJson","_getAlignment","_getUnit","parseTableRows","rowData","cellData","parseCell","cStyle","horizontalOnly","vAlign","hAlign","unit","TableWizardEditTool","numericTextBoxSettings","borderStyles","tableAlignmentDropDownSettings","valueTemplate","cellAlignmentDropDownSettings","accessibilityAlignmentDropDownSettings","dialogTemplate","okHandler","collectDialogValues","tableData","closeHandler","_initTabStripComponent","_initTableViewComponents","_initCellViewComponents","_initAccessibilityViewComponents","components","tabStrip","kendoTabStrip","_collectTableViewValues","_collectCellViewValues","_collectAccessibilityViewValues","tableView","checked","cellView","accessibilityView","_addUnit","_initNumericTextbox","_initDropDownList","_initTableAlignmentDropDown","_initColorPicker","_initInput","_initCheckbox","_initCellAlignmentDropDown","_initAccessibilityAlignmentDropDown","storage","settings","component","kendoNumericTextBox","kendoDropDownList","_setComponentValue","_initAlignmentDropDown","kendoColorPicker","clearButton","_destroyComponents"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,sBAAuB,cAAeD,IAC/C,YACG,SAAUE,GACP,GAAIC,GAAgBD,EAAME,WAAWC,QACjCC,KAAM,SAAUC,GACZL,EAAME,WAAWI,GAAGF,KAAKG,KAAKC,KAAMH,GACpCG,KAAKC,SAETC,QACI,OACA,QAEJC,KAAM,SAAUC,GACZJ,KAAKK,MAAQL,KAAKK,MAAMC,MAAM,EAAGN,KAAKO,oBAAsB,GAC5DP,KAAKO,oBAAsBP,KAAKK,MAAMF,KAAKC,GAAW,GAE1DI,KAAM,WACF,GAAIR,KAAKS,UAAW,CAChB,GAAIL,GAAUJ,KAAKK,MAAML,KAAKO,sBAC9BH,GAAQI,OACRR,KAAKU,QAAQ,QAAUN,QAASA,MAGxCO,KAAM,WACF,GAAIX,KAAKY,UAAW,CAChB,GAAIR,GAAUJ,KAAKK,QAAQL,KAAKO,oBAChCH,GAAQO,OACRX,KAAKU,QAAQ,QAAUN,QAASA,MAGxCH,MAAO,WACHD,KAAKK,SACLL,KAAKO,wBAETE,QAAS,WACL,MAAOT,MAAKO,qBAAuB,GAEvCK,QAAS,WACL,MAAOZ,MAAKO,qBAAuBP,KAAKK,MAAMQ,OAAS,IAG/DrB,GAAMsB,WAAWtB,GAASuB,MAAQtB,cAAeA,MACnDD,QACc,kBAAVD,SAAwBA,OAAOyB,IAAMzB,OAAS,SAAU0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AAMsC,GAAGoK,OAAOk/D,kBAAoBA,GACtCzpE,OAAOnC,MAAMqiB,SACC,kBAAVtiB,SAAwBA,OAAOyB,IAAMzB,OAAS,SAAU0B,EAAIC,EAAIC,IACrEA,GAAMD,OAEV,SAAU5B,EAAGC,QACVA,OAAO,gBACH,iBACA,qBACA,kBACA,eACA,oBACA,qBACA,iBACA,uBACA,qBACA,cACA,aACA,oBACA,eACA,gBACA,sBACA,qBACA,mBACA,eACA,cACA,cACA,eACA,oBACA,gBACA,kBACA,oBACA,iBACA,gBACA,gBACA,gBACA,kCACA,+BACA,iCACA,sCACA,oBACA,2CACA,2CACDD,IACL,WA8CE,MAAOqC,QAAOnC,OACE,kBAAVD,SAAwBA,OAAOyB,IAAMzB,OAAS,SAAU0B,EAAIC,EAAIC,IACrEA,GAAMD","file":"kendo.editor.min.js","sourcesContent":["/*!\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n*/\n(function (f, define) {\n define('util/undoredostack', ['kendo.core'], f);\n}(function () {\n (function (kendo) {\n var UndoRedoStack = kendo.Observable.extend({\n init: function (options) {\n kendo.Observable.fn.init.call(this, options);\n this.clear();\n },\n events: [\n 'undo',\n 'redo'\n ],\n push: function (command) {\n this.stack = this.stack.slice(0, this.currentCommandIndex + 1);\n this.currentCommandIndex = this.stack.push(command) - 1;\n },\n undo: function () {\n if (this.canUndo()) {\n var command = this.stack[this.currentCommandIndex--];\n command.undo();\n this.trigger('undo', { command: command });\n }\n },\n redo: function () {\n if (this.canRedo()) {\n var command = this.stack[++this.currentCommandIndex];\n command.redo();\n this.trigger('redo', { command: command });\n }\n },\n clear: function () {\n this.stack = [];\n this.currentCommandIndex = -1;\n },\n canUndo: function () {\n return this.currentCommandIndex >= 0;\n },\n canRedo: function () {\n return this.currentCommandIndex != this.stack.length - 1;\n }\n });\n kendo.deepExtend(kendo, { util: { UndoRedoStack: UndoRedoStack } });\n }(kendo));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/main', [\n 'util/undoredostack',\n 'kendo.combobox',\n 'kendo.dropdownlist',\n 'kendo.window',\n 'kendo.colorpicker'\n ], f);\n}(function () {\n (function ($, undefined) {\n var kendo = window.kendo, Class = kendo.Class, Widget = kendo.ui.Widget, os = kendo.support.mobileOS, browser = kendo.support.browser, extend = $.extend, proxy = $.proxy, deepExtend = kendo.deepExtend, keys = kendo.keys;\n var SELECT = 'select';\n var SELECT_OVERLAY_SELECTOR = 'select.k-select-overlay';\n var ToolTemplate = Class.extend({\n init: function (options) {\n this.options = options;\n },\n getHtml: function () {\n var options = this.options;\n return kendo.template(options.template, { useWithBlock: false })(options);\n }\n });\n var EditorUtils = {\n editorWrapperTemplate: '' + '' + '' + '
    ',\n buttonTemplate: '# var iconCssClass= \"k-icon k-i-\" + kendo.toHyphens(data.cssClass.replace(\"k-\", \"\"));#' + '#= data.title #',\n colorPickerTemplate: '
    ',\n comboBoxTemplate: '',\n separatorTemplate: '',\n overflowAnchorTemplate: '' + '#= data.title #',\n formatByName: function (name, format) {\n for (var i = 0; i < format.length; i++) {\n if ($.inArray(name, format[i].tags) >= 0) {\n return format[i];\n }\n }\n },\n getToolCssClass: function (name) {\n var toolCssClassNames = {\n superscript: 'sup-script',\n subscript: 'sub-script',\n justifyLeft: 'align-left',\n justifyCenter: 'align-center',\n justifyRight: 'align-right',\n justifyFull: 'align-justify',\n insertUnorderedList: 'list-unordered',\n insertOrderedList: 'list-ordered',\n 'import': 'login',\n indent: 'indent-increase',\n outdent: 'indent-decrease',\n createLink: 'link-horizontal',\n unlink: 'unlink-horizontal',\n insertImage: 'image',\n insertFile: 'file-add',\n viewHtml: 'html',\n foreColor: 'foreground-color',\n backColor: 'paint',\n createTable: 'table-insert',\n addColumnLeft: 'table-column-insert-left',\n addColumnRight: 'table-column-insert-right',\n addRowAbove: 'table-row-insert-above',\n addRowBelow: 'table-row-insert-below',\n deleteRow: 'table-row-delete',\n deleteColumn: 'table-column-delete',\n tableWizard: 'table-properties',\n tableWizardInsert: 'table-wizard',\n cleanFormatting: 'clear-css'\n };\n var cssClass = toolCssClassNames[name];\n if (cssClass) {\n return cssClass;\n }\n return name;\n },\n registerTool: function (toolName, tool) {\n var toolOptions = tool.options;\n if (toolOptions && toolOptions.template) {\n toolOptions.template.options.cssClass = 'k-' + EditorUtils.getToolCssClass(toolName);\n }\n if (!tool.name) {\n tool.options.name = toolName;\n tool.name = toolName.toLowerCase();\n }\n Editor.defaultTools[toolName] = tool;\n },\n registerFormat: function (formatName, format) {\n Editor.fn.options.formats[formatName] = format;\n }\n };\n var messages = {\n bold: 'Bold',\n italic: 'Italic',\n underline: 'Underline',\n strikethrough: 'Strikethrough',\n superscript: 'Superscript',\n subscript: 'Subscript',\n justifyCenter: 'Center text',\n justifyLeft: 'Align text left',\n justifyRight: 'Align text right',\n justifyFull: 'Justify',\n insertUnorderedList: 'Insert unordered list',\n insertOrderedList: 'Insert ordered list',\n indent: 'Indent',\n outdent: 'Outdent',\n createLink: 'Insert hyperlink',\n unlink: 'Remove hyperlink',\n insertImage: 'Insert image',\n insertFile: 'Insert file',\n insertHtml: 'Insert HTML',\n viewHtml: 'View HTML',\n fontName: 'Select font family',\n fontNameInherit: '(inherited font)',\n fontSize: 'Select font size',\n fontSizeInherit: '(inherited size)',\n formatBlock: 'Format',\n formatting: 'Format',\n foreColor: 'Color',\n backColor: 'Background color',\n style: 'Styles',\n emptyFolder: 'Empty Folder',\n editAreaTitle: 'Editable area. Press F10 for toolbar.',\n uploadFile: 'Upload',\n overflowAnchor: 'More tools',\n orderBy: 'Arrange by:',\n orderBySize: 'Size',\n orderByName: 'Name',\n invalidFileType: 'The selected file \"{0}\" is not valid. Supported file types are {1}.',\n deleteFile: 'Are you sure you want to delete \"{0}\"?',\n overwriteFile: 'A file with name \"{0}\" already exists in the current directory. Do you want to overwrite it?',\n directoryNotFound: 'A directory with this name was not found.',\n imageWebAddress: 'Web address',\n imageAltText: 'Alternate text',\n imageWidth: 'Width (px)',\n imageHeight: 'Height (px)',\n fileWebAddress: 'Web address',\n fileTitle: 'Title',\n fileText: 'Text',\n linkWebAddress: 'Web address',\n linkText: 'Text',\n linkToolTip: 'ToolTip',\n linkOpenInNewWindow: 'Open link in new window',\n dialogUpdate: 'Update',\n dialogInsert: 'Insert',\n dialogOk: 'Ok',\n dialogCancel: 'Cancel',\n cleanFormatting: 'Clean formatting',\n createTable: 'Create a table',\n createTableHint: 'Create a {0} x {1} table',\n addColumnLeft: 'Add column on the left',\n addColumnRight: 'Add column on the right',\n addRowAbove: 'Add row above',\n addRowBelow: 'Add row below',\n deleteRow: 'Delete row',\n deleteColumn: 'Delete column',\n tableWizard: 'Table Wizard',\n tableTab: 'Table',\n cellTab: 'Cell',\n accessibilityTab: 'Accessibility',\n caption: 'Caption',\n summary: 'Summary',\n width: 'Width',\n height: 'Height',\n units: 'Units',\n cellSpacing: 'Cell Spacing',\n cellPadding: 'Cell Padding',\n cellMargin: 'Cell Margin',\n alignment: 'Alignment',\n background: 'Background',\n cssClass: 'CSS Class',\n id: 'ID',\n border: 'Border',\n borderStyle: 'Border Style',\n collapseBorders: 'Collapse borders',\n wrapText: 'Wrap text',\n associateCellsWithHeaders: 'Associate cells with headers',\n alignLeft: 'Align Left',\n alignCenter: 'Align Center',\n alignRight: 'Align Right',\n alignLeftTop: 'Align Left Top',\n alignCenterTop: 'Align Center Top',\n alignRightTop: 'Align Right Top',\n alignLeftMiddle: 'Align Left Middle',\n alignCenterMiddle: 'Align Center Middle',\n alignRightMiddle: 'Align Right Middle',\n alignLeftBottom: 'Align Left Bottom',\n alignCenterBottom: 'Align Center Bottom',\n alignRightBottom: 'Align Right Bottom',\n alignRemove: 'Remove Alignment',\n columns: 'Columns',\n rows: 'Rows',\n selectAllCells: 'Select All Cells',\n exportAs: 'Export As',\n 'import': 'Import'\n };\n var supportedBrowser = !os || os.ios && os.flatVersion >= 500 || !os.ios && typeof document.documentElement.contentEditable != 'undefined';\n var toolGroups = {\n basic: [\n 'bold',\n 'italic',\n 'underline'\n ],\n alignment: [\n 'justifyLeft',\n 'justifyCenter',\n 'justifyRight'\n ],\n lists: [\n 'insertUnorderedList',\n 'insertOrderedList'\n ],\n indenting: [\n 'indent',\n 'outdent'\n ],\n links: [\n 'createLink',\n 'unlink'\n ],\n tables: [\n 'tableWizard',\n 'createTable',\n 'addColumnLeft',\n 'addColumnRight',\n 'addRowAbove',\n 'addRowBelow',\n 'deleteRow',\n 'deleteColumn'\n ]\n };\n var Editor = Widget.extend({\n init: function (element, options) {\n var that = this, value, editorNS = kendo.ui.editor, toolbarContainer, toolbarOptions, type;\n var domElement;\n var dom = editorNS.Dom;\n if (!supportedBrowser) {\n return;\n }\n Widget.fn.init.call(that, element, options);\n that.options = deepExtend({}, that.options, options);\n that.options.tools = that.options.tools.slice();\n element = that.element;\n domElement = element[0];\n type = dom.name(domElement);\n this._registerHandler(element.closest('form'), 'submit', proxy(that.update, that, undefined));\n toolbarOptions = extend({}, that.options);\n toolbarOptions.editor = that;\n if (type == 'textarea') {\n that._wrapTextarea();\n toolbarContainer = that.wrapper.find('.k-editor-toolbar');\n if (domElement.id) {\n toolbarContainer.attr('aria-controls', domElement.id);\n }\n } else {\n that.element.attr('contenteditable', true).addClass('k-widget k-editor k-editor-inline');\n toolbarOptions.popup = true;\n toolbarContainer = $('');\n var block = this.isBlock(html);\n editor.focus();\n var range = editor.getRange();\n range.deleteContents();\n if (range.startContainer == editor.document) {\n range.selectNodeContents(editor.body);\n }\n var marker = new Marker();\n var caret = marker.addCaret(range);\n var parent = this.splittableParent(block, caret);\n var unwrap = false;\n var splittable = parent != editor.body && !dom.is(parent, 'td');\n if (options.split && splittable && (block || dom.isInline(parent))) {\n range.selectNode(caret);\n editorNS.RangeUtils.split(range, parent, true);\n unwrap = true;\n }\n var fragment = this.htmlToFragment(html);\n if (fragment.firstChild && fragment.firstChild.className === 'k-paste-container') {\n var fragmentsHtml = [];\n for (i = 0, l = fragment.childNodes.length; i < l; i++) {\n fragmentsHtml.push(fragment.childNodes[i].innerHTML);\n }\n fragment = this.htmlToFragment(fragmentsHtml.join('
    '));\n }\n $(fragment.childNodes).filter('table').addClass('k-table').end().find('table').addClass('k-table');\n range.insertNode(fragment);\n parent = this.splittableParent(block, caret);\n if (unwrap) {\n while (caret.parentNode != parent) {\n dom.unwrap(caret.parentNode);\n }\n dom.unwrap(caret.parentNode);\n }\n dom.normalize(range.commonAncestorContainer);\n caret.style.display = 'inline';\n dom.restoreScrollTop(editor.document);\n dom.scrollTo(caret);\n marker.removeCaret(range);\n var rangeEnd = range.commonAncestorContainer.parentNode;\n if (range.collapsed && dom.name(rangeEnd) == 'tbody') {\n range.setStartAfter($(rangeEnd).closest('table')[0]);\n range.collapse(true);\n }\n editor.selectRange(range);\n }\n });\n var Cleaner = Class.extend({\n init: function (options) {\n this.options = options || {};\n this.replacements = [];\n },\n clean: function (html, customReplacements) {\n var that = this, replacements = customReplacements || that.replacements, i, l;\n for (i = 0, l = replacements.length; i < l; i += 2) {\n html = html.replace(replacements[i], replacements[i + 1]);\n }\n return html;\n }\n });\n var ScriptCleaner = Cleaner.extend({\n init: function (options) {\n Cleaner.fn.init.call(this, options);\n this.replacements = [\n /<(\\/?)script([^>]*)>/i,\n '<$1telerik:script$2>'\n ];\n },\n applicable: function (html) {\n return !this.options.none && /]*>/i.test(html);\n }\n });\n var TabCleaner = Cleaner.extend({\n init: function (options) {\n Cleaner.fn.init.call(this, options);\n var replacement = ' ';\n this.replacements = [\n /]*>\\s*<\\/span>/gi,\n replacement,\n /\\t/gi,\n replacement,\n /    /gi,\n replacement\n ];\n },\n applicable: function (html) {\n return /    |class=\"?Apple-tab-span/i.test(html);\n }\n });\n var MSWordFormatCleaner = Cleaner.extend({\n init: function (options) {\n Cleaner.fn.init.call(this, options);\n this.junkReplacements = [\n /<\\?xml[^>]*>/gi,\n '',\n //g,\n '',\n /"/g,\n '\\'',\n / <\\/o:p>/gi,\n ' ',\n /<\\/?(meta|link|style|o:|v:|x:)[^>]*>((?:.|\\n)*?<\\/(meta|link|style|o:|v:|x:)[^>]*>)?/gi,\n '',\n /<\\/o>/g,\n ''\n ];\n this.replacements = this.junkReplacements.concat([\n /(?:
     [\\s\\r\\n]+|
    )*(<\\/?(h[1-6]|hr|p|div|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|address|pre|form|blockquote|dl|dt|dd|dir|fieldset)[^>]*>)(?:
     [\\s\\r\\n]+|
    )*/g,\n '$1',\n /

    /g,\n '

    ',\n /
    (?!\\n)/g,\n ' ',\n /]*)>(\\s| )+]*>(\\s| )*<\\/tr>/gi,\n '',\n /]*>(\\s| )*<\\/tbody>/gi,\n '',\n /]*>(\\s| )*<\\/table>/gi,\n '',\n /

    /g,\n '
    ',\n /^\\s*( )+/gi,\n '',\n /( |]*>)+\\s*$/gi,\n '',\n /mso-[^;\"]*;?/gi,\n '',\n /<(\\/?)b(\\s[^>]*)?>/gi,\n '<$1strong$2>',\n /<(\\/?)font(\\s[^>]*)?>/gi,\n this.convertFontMatch,\n /<(\\/?)i(\\s[^>]*)?>/gi,\n '<$1em$2>',\n /style=([\"|'])\\s*\\1/g,\n '',\n /(]*>)?\\n/g,\n function ($0, $1) {\n return $1 ? $0 : ' ';\n }\n ]);\n },\n convertFontMatch: function (match, closing, args) {\n var faceRe = /face=['\"]([^'\"]+)['\"]/i;\n var face = faceRe.exec(args);\n var family = args && face && face[1];\n if (closing) {\n return '
    ';\n } else if (family) {\n return '';\n } else {\n return '';\n }\n },\n applicable: function (html) {\n return /class=\"?Mso/i.test(html) || /style=\"[^\"]*mso-/i.test(html) || /urn:schemas-microsoft-com:office/.test(html);\n },\n stripEmptyAnchors: function (html) {\n return html.replace(/]*)>\\s*<\\/a>/gi, function (a, attributes) {\n if (!attributes || attributes.indexOf('href') < 0) {\n return '';\n }\n return a;\n });\n },\n listType: function (p, listData) {\n var html = p.innerHTML;\n var text = dom.innerText(p);\n var startingSymbol;\n var matchSymbol = html.match(/^(?:]*texhtml[^>]*>)?]*(?:Symbol|Wingdings)[^>]*>([^<]+)/i);\n var symbol = matchSymbol && matchSymbol[1];\n var isNumber = /^[a-z\\d]/i.test(symbol);\n var trimStartText = function (text) {\n return text.replace(/^(?: |[\\u00a0\\n\\r\\s])+/, '');\n };\n if (matchSymbol) {\n startingSymbol = true;\n }\n html = html.replace(/<\\/?\\w+[^>]*>/g, '').replace(/ /g, '\\xA0');\n if (!startingSymbol && /^[\\u2022\\u00b7\\u00a7\\u00d8o]\\u00a0+/.test(html) || startingSymbol && /^.\\u00a0+/.test(html) || symbol && !isNumber && listData) {\n return {\n tag: 'ul',\n style: this._guessUnorderedListStyle(trimStartText(text))\n };\n }\n if (/^\\s*\\w+[\\.\\)][\\u00a0 ]{2,}/.test(html)) {\n return {\n tag: 'ol',\n style: this._guessOrderedListStyle(trimStartText(text))\n };\n }\n },\n _convertToLi: function (p) {\n var content;\n if (p.childNodes.length == 1) {\n content = p.firstChild.innerHTML.replace(/^\\w+[\\.\\)]( )+ /, '');\n } else {\n dom.remove(p.firstChild);\n if (p.firstChild.nodeType == 3) {\n if (/^[ivxlcdm]+\\.$/i.test(p.firstChild.nodeValue)) {\n dom.remove(p.firstChild);\n }\n }\n if (/^( |\\s)+$/i.test(p.firstChild.innerHTML)) {\n dom.remove(p.firstChild);\n }\n content = p.innerHTML;\n }\n dom.remove(p);\n return dom.create(document, 'li', { innerHTML: content });\n },\n _guessUnorderedListStyle: function (symbol) {\n if (/^[\\u2022\\u00b7\\u00FC\\u00D8\\u002dv-]/.test(symbol)) {\n return null;\n } else if (/^o/.test(symbol)) {\n return 'circle';\n } else {\n return 'square';\n }\n },\n _guessOrderedListStyle: function (symbol) {\n var listType = null;\n if (!/^\\d/.test(symbol)) {\n listType = (/^[a-z]/.test(symbol) ? 'lower-' : 'upper-') + (/^[ivxlcdm]/i.test(symbol) ? 'roman' : 'alpha');\n }\n return listType;\n },\n extractListLevels: function (html) {\n var msoListRegExp = /style=['\"]?[^'\"]*?mso-list:\\s?[a-zA-Z]+(\\d+)\\s[a-zA-Z]+(\\d+)\\s(\\w+)/gi;\n html = html.replace(msoListRegExp, function (match, list, level) {\n return kendo.format('data-list=\"{0}\" data-level=\"{1}\" {2}', list, level, match);\n });\n return html;\n },\n lists: function (placeholder) {\n var blockChildren = $(placeholder).find(dom.blockElements.join(',')), lastMargin = -1, name, levels = {}, li = placeholder, rootMargin, listContainer, i, p, type, margin, list, listData;\n for (i = 0; i < blockChildren.length; i++) {\n p = blockChildren[i];\n listData = $(p).data();\n var listIndex = listData.list;\n name = dom.name(p);\n if (name == 'td') {\n continue;\n }\n var listType = this.listType(p, listData);\n type = listType && listType.tag;\n if (!type || name != 'p') {\n if (!p.innerHTML) {\n dom.remove(p);\n } else {\n lastMargin = -1;\n li = placeholder;\n }\n continue;\n }\n margin = parseFloat(p.style.marginLeft || 0);\n if (rootMargin === undefined) {\n rootMargin = margin;\n }\n var levelType = type + listIndex;\n if (!levels[margin]) {\n levels[margin] = {};\n }\n list = levels[margin][levelType];\n if (margin > lastMargin || !list) {\n list = dom.create(document, type, { style: { listStyleType: listType.style } });\n if (li == placeholder || margin <= lastMargin) {\n if (listContainer && rootMargin !== margin) {\n listContainer.appendChild(list);\n } else {\n dom.insertBefore(list, p);\n }\n levels[margin] = {};\n } else {\n listContainer = li;\n li.appendChild(list);\n }\n levels[margin][levelType] = list;\n }\n li = this._convertToLi(p);\n list.appendChild(li);\n lastMargin = margin;\n }\n },\n removeAttributes: function (element) {\n var attributes = element.attributes, i = attributes.length;\n while (i--) {\n if (dom.name(attributes[i]) != 'colspan') {\n element.removeAttributeNode(attributes[i]);\n }\n }\n },\n createColGroup: function (row) {\n var cells = row.cells;\n var table = $(row).closest('table');\n var colgroup = table.children('colgroup');\n if (cells.length < 2) {\n return;\n } else if (colgroup.length) {\n cells = colgroup.children();\n colgroup[0].parentNode.removeChild(colgroup[0]);\n }\n colgroup = $($.map(cells, function (cell) {\n var width = cell.width;\n if (width && parseInt(width, 10) !== 0) {\n return kendo.format('', width);\n }\n return '';\n }).join(''));\n if (!colgroup.is('colgroup')) {\n colgroup = $('').append(colgroup);\n }\n colgroup.prependTo(table);\n },\n convertHeaders: function (row) {\n var cells = row.cells, i, boldedCells = $.map(cells, function (cell) {\n var child = $(cell).children('p').children('strong')[0];\n if (child && dom.name(child) == 'strong') {\n return child;\n }\n });\n if (boldedCells.length == cells.length) {\n for (i = 0; i < boldedCells.length; i++) {\n dom.unwrap(boldedCells[i]);\n }\n $(row).closest('table').find('colgroup').after('').end().find('thead').append(row);\n for (i = 0; i < cells.length; i++) {\n dom.changeTag(cells[i], 'th');\n }\n }\n },\n removeParagraphs: function (cells) {\n var i, j, len, cell, paragraphs;\n for (i = 0; i < cells.length; i++) {\n this.removeAttributes(cells[i]);\n cell = $(cells[i]);\n paragraphs = cell.children('p');\n for (j = 0, len = paragraphs.length; j < len; j++) {\n if (j < len - 1) {\n dom.insertAfter(dom.create(document, 'br'), paragraphs[j]);\n }\n dom.unwrap(paragraphs[j]);\n }\n }\n },\n removeDefaultColors: function (spans) {\n for (var i = 0; i < spans.length; i++) {\n if (/^\\s*color:\\s*[^;]*;?$/i.test(spans[i].style.cssText)) {\n dom.unwrap(spans[i]);\n }\n }\n },\n tables: function (placeholder) {\n var tables = $(placeholder).find('table'), that = this, rows, firstRow, longestRow, i, j;\n for (i = 0; i < tables.length; i++) {\n rows = tables[i].rows;\n longestRow = firstRow = rows[0];\n for (j = 1; j < rows.length; j++) {\n if (rows[j].cells.length > longestRow.cells.length) {\n longestRow = rows[j];\n }\n }\n that.createColGroup(longestRow);\n that.convertHeaders(firstRow);\n that.removeAttributes(tables[i]);\n that.removeParagraphs(tables.eq(i).find('td,th'));\n that.removeDefaultColors(tables.eq(i).find('span'));\n }\n },\n headers: function (placeholder) {\n var titles = $(placeholder).find('p.MsoTitle');\n for (var i = 0; i < titles.length; i++) {\n dom.changeTag(titles[i], 'h1');\n }\n },\n removeFormatting: function (placeholder) {\n $(placeholder).find('*').each(function () {\n $(this).css({\n fontSize: '',\n fontFamily: ''\n });\n if (!this.getAttribute('style') && !this.style.cssText) {\n this.removeAttribute('style');\n }\n });\n },\n clean: function (html) {\n var that = this, placeholder;\n var filters = this.options;\n if (filters.none) {\n html = Cleaner.fn.clean.call(that, html, this.junkReplacements);\n html = that.stripEmptyAnchors(html);\n } else {\n html = this.extractListLevels(html);\n html = Cleaner.fn.clean.call(that, html);\n html = that.stripEmptyAnchors(html);\n placeholder = dom.create(document, 'div', { innerHTML: html });\n that.headers(placeholder);\n if (filters.msConvertLists) {\n that.lists(placeholder);\n }\n that.tables(placeholder);\n if (filters.msAllFormatting) {\n that.removeFormatting(placeholder);\n }\n html = placeholder.innerHTML.replace(/(<[^>]*)\\s+class=\"?[^\"\\s>]*\"?/gi, '$1');\n }\n return html;\n }\n });\n var WebkitFormatCleaner = Cleaner.extend({\n init: function (options) {\n Cleaner.fn.init.call(this, options);\n this.replacements = [\n /\\s+class=\"Apple-style-span[^\"]*\"/gi,\n '',\n /<(div|p|h[1-6])\\s+style=\"[^\"]*\"/gi,\n '<$1',\n /^
    (.*)<\\/div>$/,\n '$1'\n ];\n },\n applicable: function (html) {\n return /class=\"?Apple-style-span|style=\"[^\"]*-webkit-nbsp-mode/i.test(html);\n }\n });\n var DomCleaner = Cleaner.extend({\n clean: function (html) {\n var container = dom.create(document, 'div', { innerHTML: html });\n container = this.cleanDom(container);\n return container.innerHTML;\n },\n cleanDom: function (container) {\n return container;\n }\n });\n var HtmlTagsCleaner = DomCleaner.extend({\n cleanDom: function (container) {\n var tags = this.collectTags();\n $(container).find(tags).each(function () {\n dom.unwrap(this);\n });\n return container;\n },\n collectTags: function () {\n if (this.options.span) {\n return 'span';\n }\n },\n applicable: function () {\n return this.options.span;\n }\n });\n var HtmlAttrCleaner = DomCleaner.extend({\n cleanDom: function (container) {\n var attributes = this.collectAttr();\n var nodes = $(container).find('[' + attributes.join('],[') + ']');\n nodes.removeAttr(attributes.join(' '));\n return container;\n },\n collectAttr: function () {\n if (this.options.css) {\n return [\n 'class',\n 'style'\n ];\n }\n return [];\n },\n applicable: function () {\n return this.options.css;\n }\n });\n var TextContainer = function () {\n this.text = '';\n this.add = function (text) {\n this.text += text;\n };\n };\n var HtmlTextLines = Class.extend({\n init: function (separators) {\n this.separators = separators || {\n text: ' ',\n line: '
    '\n };\n this.lines = [];\n this.inlineBlockText = [];\n this.resetLine();\n },\n appendText: function (text) {\n if (text.nodeType === 3) {\n text = text.nodeValue;\n }\n this.textContainer.add(text);\n },\n appendInlineBlockText: function (text) {\n this.inlineBlockText.push(text);\n },\n flashInlineBlockText: function () {\n if (this.inlineBlockText.length) {\n this.appendText(this.inlineBlockText.join(' '));\n this.inlineBlockText = [];\n }\n },\n endLine: function () {\n this.flashInlineBlockText();\n this.resetLine();\n },\n html: function () {\n var separators = this.separators;\n var result = '';\n var lines = this.lines;\n this.flashInlineBlockText();\n for (var i = 0, il = lines.length, il1 = il - 1; i < il; i++) {\n var line = lines[i];\n for (var j = 0, jl = line.length, jl1 = jl - 1; j < jl; j++) {\n var text = line[j].text;\n result += text;\n if (j !== jl1) {\n result += separators.text;\n }\n }\n if (i !== il1) {\n result += separators.line;\n }\n }\n return result;\n },\n resetLine: function () {\n this.textContainer = new TextContainer();\n this.line = [];\n this.line.push(this.textContainer);\n this.lines.push(this.line);\n }\n });\n var DomEnumerator = Class.extend({\n init: function (callback) {\n this.callback = callback;\n },\n enumerate: function (node) {\n if (!node) {\n return;\n }\n var preventDown = this.callback(node);\n var child = node.firstChild;\n if (!preventDown && child) {\n this.enumerate(child);\n }\n this.enumerate(node.nextSibling);\n }\n });\n var HtmlContentCleaner = Cleaner.extend({\n init: function (options) {\n Cleaner.fn.init.call(this, options);\n this.hasText = false;\n this.enumerator = new DomEnumerator($.proxy(this.buildText, this));\n },\n clean: function (html) {\n var container = dom.create(document, 'div', { innerHTML: html });\n return this.cleanDom(container);\n },\n cleanDom: function (container) {\n this.separators = this.getDefaultSeparators();\n this.htmlLines = new HtmlTextLines(this.separators);\n this.enumerator.enumerate(container.firstChild);\n this.hasText = false;\n return this.htmlLines.html();\n },\n buildText: function (node) {\n if (dom.isDataNode(node)) {\n if (dom.isEmptyspace(node)) {\n return;\n }\n this.htmlLines.appendText(node.nodeValue.replace('\\n', this.separators.line));\n this.hasText = true;\n } else if (dom.isBlock(node) && this.hasText) {\n var action = this.actions[dom.name(node)] || this.actions.block;\n return action(this, node);\n }\n },\n applicable: function () {\n var o = this.options;\n return o.all || o.keepNewLines;\n },\n getDefaultSeparators: function () {\n if (this.options.all) {\n return {\n text: ' ',\n line: ' '\n };\n } else {\n return {\n text: ' ',\n line: '
    '\n };\n }\n },\n actions: {\n ul: $.noop,\n ol: $.noop,\n table: $.noop,\n thead: $.noop,\n tbody: $.noop,\n td: function (cleaner, node) {\n var tdCleaner = new HtmlContentCleaner({ all: true });\n var cellText = tdCleaner.cleanDom(node);\n cleaner.htmlLines.appendInlineBlockText(cellText);\n return true;\n },\n block: function (cleaner) {\n cleaner.htmlLines.endLine();\n }\n }\n });\n var CustomCleaner = Cleaner.extend({\n clean: function (html) {\n return this.options.custom(html);\n },\n applicable: function () {\n return typeof this.options.custom === 'function';\n }\n });\n var PrintCommand = Command.extend({\n init: function (options) {\n Command.fn.init.call(this, options);\n this.managesUndoRedo = true;\n },\n exec: function () {\n var editor = this.editor;\n if (kendo.support.browser.msie) {\n editor.document.execCommand('print', false, null);\n } else if (editor.window.print) {\n editor.window.print();\n }\n }\n });\n var ExportPdfCommand = Command.extend({\n init: function (options) {\n this.async = true;\n Command.fn.init.call(this, options);\n },\n exec: function () {\n var that = this;\n var range = that.lockRange(true);\n var editor = that.editor;\n editor._destroyResizings();\n editor.saveAsPDF().then(function () {\n that.releaseRange(range);\n editor._initializeColumnResizing();\n editor._initializeRowResizing();\n editor._initializeTableResizing();\n });\n }\n });\n extend(editorNS, {\n _finishUpdate: finishUpdate,\n Command: Command,\n GenericCommand: GenericCommand,\n InsertHtmlCommand: InsertHtmlCommand,\n InsertHtmlTool: InsertHtmlTool,\n TypingHandler: TypingHandler,\n SystemHandler: SystemHandler,\n BackspaceHandler: BackspaceHandler,\n SelectAllHandler: SelectAllHandler,\n Keyboard: Keyboard,\n Clipboard: Clipboard,\n Cleaner: Cleaner,\n ScriptCleaner: ScriptCleaner,\n TabCleaner: TabCleaner,\n MSWordFormatCleaner: MSWordFormatCleaner,\n WebkitFormatCleaner: WebkitFormatCleaner,\n HtmlTagsCleaner: HtmlTagsCleaner,\n HtmlAttrCleaner: HtmlAttrCleaner,\n HtmlContentCleaner: HtmlContentCleaner,\n HtmlTextLines: HtmlTextLines,\n CustomCleaner: CustomCleaner,\n PrintCommand: PrintCommand,\n ExportPdfCommand: ExportPdfCommand\n });\n registerTool('insertHtml', new InsertHtmlTool({\n template: new ToolTemplate({\n template: EditorUtils.dropDownListTemplate,\n title: 'Insert HTML',\n initialValue: 'Insert HTML'\n })\n }));\n registerTool('print', new Tool({\n command: PrintCommand,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Print'\n })\n }));\n registerTool('pdf', new Tool({\n command: ExportPdfCommand,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Export PDF'\n })\n }));\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/inlineformat', ['editor/system'], f);\n}(function () {\n (function ($) {\n var kendo = window.kendo, Class = kendo.Class, Editor = kendo.ui.editor, formats = kendo.ui.Editor.fn.options.formats, EditorUtils = Editor.EditorUtils, Tool = Editor.Tool, ToolTemplate = Editor.ToolTemplate, FormatTool = Editor.FormatTool, dom = Editor.Dom, RangeUtils = Editor.RangeUtils, extend = $.extend, registerTool = Editor.EditorUtils.registerTool, registerFormat = Editor.EditorUtils.registerFormat, preventDefault = function (ev) {\n ev.preventDefault();\n }, MOUSEDOWN_NS = 'mousedown.kendoEditor', KEYDOWN_NS = 'keydown.kendoEditor', KMARKER = 'k-marker';\n var InlineFormatFinder = Class.extend({\n init: function (format) {\n this.format = format;\n },\n numberOfSiblings: function (referenceNode) {\n var textNodesCount = 0, elementNodesCount = 0, markerCount = 0, parentNode = referenceNode.parentNode, node;\n for (node = parentNode.firstChild; node; node = node.nextSibling) {\n if (node != referenceNode) {\n if (node.className == KMARKER) {\n markerCount++;\n } else if (node.nodeType == 3) {\n textNodesCount++;\n } else {\n elementNodesCount++;\n }\n }\n }\n if (markerCount > 1 && parentNode.firstChild.className == KMARKER && parentNode.lastChild.className == KMARKER) {\n return 0;\n } else {\n return elementNodesCount + textNodesCount;\n }\n },\n findSuitable: function (sourceNode, skip) {\n if (!skip && this.numberOfSiblings(sourceNode) > 0) {\n return null;\n }\n var node = sourceNode.parentNode;\n var tags = this.format[0].tags;\n while (!dom.ofType(node, tags)) {\n if (this.numberOfSiblings(node) > 0) {\n return null;\n }\n node = node.parentNode;\n }\n return node;\n },\n findFormat: function (sourceNode) {\n var format = this.format, attrEquals = dom.attrEquals, i, len, node, tags, attributes;\n for (i = 0, len = format.length; i < len; i++) {\n node = sourceNode;\n tags = format[i].tags;\n attributes = format[i].attr;\n if (node && dom.ofType(node, tags) && attrEquals(node, attributes)) {\n return node;\n }\n while (node) {\n node = dom.parentOfType(node, tags);\n if (node && attrEquals(node, attributes)) {\n return node;\n }\n }\n }\n return null;\n },\n isFormatted: function (nodes) {\n var i, len;\n for (i = 0, len = nodes.length; i < len; i++) {\n if (this.findFormat(nodes[i])) {\n return true;\n }\n }\n return false;\n }\n });\n var InlineFormatter = Class.extend({\n init: function (format, values) {\n this.finder = new InlineFormatFinder(format);\n this.attributes = extend({}, format[0].attr, values);\n this.tag = format[0].tags[0];\n },\n wrap: function (node) {\n return dom.wrap(node, dom.create(node.ownerDocument, this.tag, this.attributes));\n },\n activate: function (range, nodes) {\n if (this.finder.isFormatted(nodes)) {\n this.split(range);\n this.remove(nodes);\n } else {\n this.apply(nodes);\n }\n },\n toggle: function (range) {\n var textNodes = this.immutables() ? RangeUtils.editableTextNodes : RangeUtils.textNodes;\n var nodes = textNodes(range);\n if (nodes.length > 0) {\n this.activate(range, nodes);\n }\n },\n immutables: function () {\n return this.editor && this.editor.options.immutables;\n },\n apply: function (nodes) {\n var formatNodes = [];\n var i, l, node, formatNode;\n var attributes = this.attributes;\n var styleAttr = attributes ? attributes.style || {} : {};\n for (i = 0, l = nodes.length; i < l; i++) {\n node = nodes[i];\n formatNode = this.finder.findSuitable(node);\n if (formatNode) {\n if (dom.is(formatNode, 'font')) {\n if (styleAttr.color) {\n formatNode.removeAttribute('color');\n }\n if (styleAttr.fontName) {\n formatNode.removeAttribute('face');\n }\n if (styleAttr.fontSize) {\n formatNode.removeAttribute('size');\n }\n }\n dom.attr(formatNode, attributes);\n } else {\n while (!dom.isBlock(node.parentNode) && node.parentNode.childNodes.length == 1 && node.parentNode.contentEditable !== 'true') {\n node = node.parentNode;\n }\n formatNode = this.wrap(node);\n }\n formatNodes.push(formatNode);\n }\n this.consolidate(formatNodes);\n },\n remove: function (nodes) {\n var i, l, formatNode;\n for (i = 0, l = nodes.length; i < l; i++) {\n formatNode = this.finder.findFormat(nodes[i]);\n if (formatNode) {\n if (this.attributes && this.attributes.style) {\n dom.unstyle(formatNode, this.attributes.style);\n if (!formatNode.style.cssText && !formatNode.attributes['class']) {\n dom.unwrap(formatNode);\n }\n } else {\n dom.unwrap(formatNode);\n }\n }\n }\n },\n split: function (range) {\n var nodes = RangeUtils.textNodes(range);\n var l = nodes.length;\n var i, formatNode;\n if (l > 0) {\n for (i = 0; i < l; i++) {\n formatNode = this.finder.findFormat(nodes[i]);\n if (formatNode) {\n RangeUtils.split(range, formatNode, true);\n }\n }\n }\n },\n consolidate: function (nodes) {\n var node, last;\n while (nodes.length > 1) {\n node = nodes.pop();\n last = nodes[nodes.length - 1];\n if (node.previousSibling && node.previousSibling.className == KMARKER) {\n last.appendChild(node.previousSibling);\n }\n if (node.tagName == last.tagName && node.previousSibling == last && node.style.cssText == last.style.cssText) {\n while (node.firstChild) {\n last.appendChild(node.firstChild);\n }\n dom.remove(node);\n }\n }\n }\n });\n var GreedyInlineFormatFinder = InlineFormatFinder.extend({\n init: function (format, greedyProperty) {\n this.format = format;\n this.greedyProperty = greedyProperty;\n InlineFormatFinder.fn.init.call(this, format);\n },\n getInlineCssValue: function (node) {\n var attributes = node.attributes;\n var trim = $.trim;\n var i, l, attribute, name, attributeValue, css, pair, cssIndex, len;\n var propertyAndValue, property, value;\n if (!attributes) {\n return;\n }\n for (i = 0, l = attributes.length; i < l; i++) {\n attribute = attributes[i];\n name = attribute.nodeName;\n attributeValue = attribute.nodeValue;\n if (attribute.specified && name == 'style') {\n css = trim(attributeValue || node.style.cssText).split(';');\n for (cssIndex = 0, len = css.length; cssIndex < len; cssIndex++) {\n pair = css[cssIndex];\n if (pair.length) {\n propertyAndValue = pair.split(':');\n property = trim(propertyAndValue[0].toLowerCase());\n value = trim(propertyAndValue[1]);\n if (property != this.greedyProperty) {\n continue;\n }\n return property.indexOf('color') >= 0 ? dom.toHex(value) : value;\n }\n }\n }\n }\n },\n getFormatInner: function (node) {\n var $node = $(dom.isDataNode(node) ? node.parentNode : node);\n var parents = $node.parentsUntil('[contentEditable]').addBack().toArray().reverse();\n var i, len, value;\n for (i = 0, len = parents.length; i < len; i++) {\n value = this.greedyProperty == 'className' ? parents[i].className : this.getInlineCssValue(parents[i]);\n if (value) {\n return value;\n }\n }\n return 'inherit';\n },\n getFormat: function (nodes) {\n var result = this.getFormatInner(nodes[0]), i, len;\n for (i = 1, len = nodes.length; i < len; i++) {\n if (result != this.getFormatInner(nodes[i])) {\n return '';\n }\n }\n return result;\n },\n isFormatted: function (nodes) {\n return this.getFormat(nodes) !== '';\n }\n });\n var GreedyInlineFormatter = InlineFormatter.extend({\n init: function (format, values, greedyProperty) {\n InlineFormatter.fn.init.call(this, format, values);\n this.values = values;\n this.finder = new GreedyInlineFormatFinder(format, greedyProperty);\n if (greedyProperty) {\n this.greedyProperty = kendo.toCamelCase(greedyProperty);\n }\n },\n activate: function (range, nodes) {\n var greedyProperty = this.greedyProperty;\n var action = 'apply';\n this.split(range);\n if (greedyProperty && this.values.style[greedyProperty] == 'inherit') {\n action = 'remove';\n }\n this[action](nodes);\n }\n });\n var InlineFormatTool = FormatTool.extend({\n init: function (options) {\n FormatTool.fn.init.call(this, extend(options, {\n finder: new InlineFormatFinder(options.format),\n formatter: function () {\n return new InlineFormatter(options.format);\n }\n }));\n }\n });\n var DelayedExecutionTool = Tool.extend({\n update: function (ui, nodes) {\n var list = ui.data(this.type);\n list.close();\n list.value(this.finder.getFormat(nodes));\n }\n });\n var FontTool = DelayedExecutionTool.extend({\n init: function (options) {\n Tool.fn.init.call(this, options);\n this.type = kendo.support.browser.msie || kendo.support.touch ? 'kendoDropDownList' : 'kendoComboBox';\n this.format = [{\n tags: [\n 'span',\n 'font'\n ]\n }];\n this.finder = new GreedyInlineFormatFinder(this.format, options.cssAttr);\n },\n command: function (commandArguments) {\n var options = this.options, format = this.format, style = {};\n return new Editor.FormatCommand(extend(commandArguments, {\n formatter: function () {\n style[options.domAttr] = commandArguments.value;\n return new GreedyInlineFormatter(format, { style: style }, options.cssAttr);\n }\n }));\n },\n initialize: function (ui, initOptions) {\n var editor = initOptions.editor, options = this.options, toolName = options.name, dataSource, range, defaultValue = [];\n if (options.defaultValue) {\n defaultValue = [{\n text: editor.options.messages[options.defaultValue[0].text],\n value: options.defaultValue[0].value\n }];\n }\n dataSource = defaultValue.concat(options.items ? options.items : editor.options[toolName] || []);\n ui.attr({ title: initOptions.title });\n ui[this.type]({\n dataTextField: 'text',\n dataValueField: 'value',\n dataSource: dataSource,\n change: function () {\n editor._range = range;\n Tool.exec(editor, toolName, this.value());\n },\n close: function () {\n setTimeout(function () {\n if ('_range' in editor) {\n delete editor._range;\n }\n }, 0);\n },\n highlightFirst: false\n });\n ui.closest('.k-widget').removeClass('k-' + toolName).find('*').addBack().attr('unselectable', 'on');\n var widget = ui.data(this.type);\n widget.value('inherit');\n widget.wrapper.on(MOUSEDOWN_NS, '.k-select,.k-input', function () {\n var newRange = editor.getRange();\n range = editor._containsRange(newRange) ? newRange : range;\n }).on(KEYDOWN_NS, function (e) {\n if (e.keyCode === kendo.keys.ENTER) {\n e.preventDefault();\n }\n });\n }\n });\n var ColorTool = Tool.extend({\n init: function (options) {\n Tool.fn.init.call(this, options);\n this.format = [{\n tags: [\n 'span',\n 'font'\n ]\n }];\n this.finder = new GreedyInlineFormatFinder(this.format, options.cssAttr);\n },\n options: { palette: 'websafe' },\n update: function () {\n this._widget.close();\n },\n command: function (commandArguments) {\n var options = this.options, format = this.format, style = {};\n return new Editor.FormatCommand(extend(commandArguments, {\n formatter: function () {\n style[options.domAttr] = commandArguments.value;\n return new GreedyInlineFormatter(format, { style: style }, options.cssAttr);\n }\n }));\n },\n initialize: function (ui, initOptions) {\n var editor = initOptions.editor, toolName = this.name, options = extend({}, ColorTool.fn.options, this.options), palette = options.palette, columns = options.columns;\n ui = this._widget = new kendo.ui.ColorPicker(ui, {\n toolIcon: 'k-icon k-i-' + EditorUtils.getToolCssClass(options.name),\n palette: palette,\n columns: columns,\n change: function () {\n var color = ui.value();\n if (color) {\n Tool.exec(editor, toolName, color);\n }\n editor.focus();\n },\n open: function (e) {\n var picker = e.sender;\n picker.value(null);\n picker._popup.element.on(MOUSEDOWN_NS, preventDefault);\n },\n close: function (e) {\n e.sender._popup.element.off(MOUSEDOWN_NS);\n },\n activate: function (e) {\n e.preventDefault();\n ui.trigger('change');\n }\n });\n ui.wrapper.attr({\n title: initOptions.title,\n unselectable: 'on'\n }).find('*').attr('unselectable', 'on');\n }\n });\n extend(Editor, {\n InlineFormatFinder: InlineFormatFinder,\n InlineFormatter: InlineFormatter,\n DelayedExecutionTool: DelayedExecutionTool,\n GreedyInlineFormatFinder: GreedyInlineFormatFinder,\n GreedyInlineFormatter: GreedyInlineFormatter,\n InlineFormatTool: InlineFormatTool,\n FontTool: FontTool,\n ColorTool: ColorTool\n });\n registerFormat('bold', [\n {\n tags: [\n 'strong',\n 'b'\n ]\n },\n {\n tags: ['span'],\n attr: { style: { fontWeight: 'bold' } }\n }\n ]);\n registerTool('bold', new InlineFormatTool({\n key: 'B',\n ctrl: true,\n format: formats.bold,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Bold'\n })\n }));\n registerFormat('italic', [\n {\n tags: [\n 'em',\n 'i'\n ]\n },\n {\n tags: ['span'],\n attr: { style: { fontStyle: 'italic' } }\n }\n ]);\n registerTool('italic', new InlineFormatTool({\n key: 'I',\n ctrl: true,\n format: formats.italic,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Italic'\n })\n }));\n registerFormat('underline', [\n {\n tags: ['span'],\n attr: { style: { textDecoration: 'underline' } }\n },\n { tags: ['u'] }\n ]);\n registerTool('underline', new InlineFormatTool({\n key: 'U',\n ctrl: true,\n format: formats.underline,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Underline'\n })\n }));\n registerFormat('strikethrough', [\n {\n tags: [\n 'del',\n 'strike'\n ]\n },\n {\n tags: ['span'],\n attr: { style: { textDecoration: 'line-through' } }\n }\n ]);\n registerTool('strikethrough', new InlineFormatTool({\n format: formats.strikethrough,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Strikethrough'\n })\n }));\n registerFormat('superscript', [{ tags: ['sup'] }]);\n registerTool('superscript', new InlineFormatTool({\n format: formats.superscript,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Superscript'\n })\n }));\n registerFormat('subscript', [{ tags: ['sub'] }]);\n registerTool('subscript', new InlineFormatTool({\n format: formats.subscript,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Subscript'\n })\n }));\n registerTool('foreColor', new ColorTool({\n cssAttr: 'color',\n domAttr: 'color',\n name: 'foreColor',\n template: new ToolTemplate({\n template: EditorUtils.colorPickerTemplate,\n title: 'Color'\n })\n }));\n registerTool('backColor', new ColorTool({\n cssAttr: 'background-color',\n domAttr: 'backgroundColor',\n name: 'backColor',\n template: new ToolTemplate({\n template: EditorUtils.colorPickerTemplate,\n title: 'Background Color'\n })\n }));\n registerTool('fontName', new FontTool({\n cssAttr: 'font-family',\n domAttr: 'fontFamily',\n name: 'fontName',\n defaultValue: [{\n text: 'fontNameInherit',\n value: 'inherit'\n }],\n template: new ToolTemplate({\n template: EditorUtils.comboBoxTemplate,\n title: 'Font Name'\n })\n }));\n registerTool('fontSize', new FontTool({\n cssAttr: 'font-size',\n domAttr: 'fontSize',\n name: 'fontSize',\n defaultValue: [{\n text: 'fontSizeInherit',\n value: 'inherit'\n }],\n template: new ToolTemplate({\n template: EditorUtils.comboBoxTemplate,\n title: 'Font Size'\n })\n }));\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/formatblock', ['editor/inlineformat'], f);\n}(function () {\n (function ($) {\n var kendo = window.kendo, Class = kendo.Class, extend = $.extend, Editor = kendo.ui.editor, formats = kendo.ui.Editor.fn.options.formats, dom = Editor.Dom, Command = Editor.Command, ToolTemplate = Editor.ToolTemplate, FormatTool = Editor.FormatTool, EditorUtils = Editor.EditorUtils, registerTool = EditorUtils.registerTool, registerFormat = EditorUtils.registerFormat, RangeUtils = Editor.RangeUtils;\n var BlockFormatFinder = Class.extend({\n init: function (format) {\n this.format = format;\n },\n contains: function (node, children) {\n var i, len, child;\n for (i = 0, len = children.length; i < len; i++) {\n child = children[i];\n if (!child || !dom.isAncestorOrSelf(node, child)) {\n return false;\n }\n }\n return true;\n },\n findSuitable: function (nodes) {\n var format = this.format, suitable = [], i, len, candidate;\n for (i = 0, len = nodes.length; i < len; i++) {\n for (var f = format.length - 1; f >= 0; f--) {\n candidate = dom.ofType(nodes[i], format[f].tags) ? nodes[i] : dom.closestEditableOfType(nodes[i], format[f].tags);\n if (candidate) {\n break;\n }\n }\n if (!candidate || candidate.contentEditable === 'true') {\n return [];\n }\n if ($.inArray(candidate, suitable) < 0) {\n suitable.push(candidate);\n }\n }\n this._resolveListsItems(suitable);\n for (i = 0, len = suitable.length; i < len; i++) {\n if (this.contains(suitable[i], suitable)) {\n return [suitable[i]];\n }\n }\n return suitable;\n },\n _resolveListsItems: function (nodes) {\n var i, node, wrapper;\n for (i = 0; i < nodes.length; i++) {\n node = nodes[i];\n wrapper = dom.is(node, 'li') ? node : dom.wrapper(node);\n wrapper = wrapper && dom.list(wrapper) ? wrapper.children[0] : wrapper;\n if (dom.is(wrapper, 'li')) {\n node = nodes[i] = wrapper;\n }\n }\n },\n findFormat: function (sourceNode) {\n var format = this.format, i, len, node, tags, attributes;\n var editableParent = dom.editableParent(sourceNode);\n var immutables = this.options && this.options.immutables;\n var ImmutablesNS = Editor.Immutables;\n for (i = 0, len = format.length; i < len; i++) {\n node = sourceNode;\n tags = format[i].tags;\n attributes = format[i].attr;\n if (immutables && tags && tags[0] == 'immutable') {\n var immutable = ImmutablesNS.immutableParent(node);\n if (immutable && dom.attrEquals(immutable, attributes)) {\n return node;\n }\n }\n while (node && dom.isAncestorOf(editableParent, node)) {\n if (dom.ofType(node, tags) && dom.attrEquals(node, attributes)) {\n return node;\n }\n node = node.parentNode;\n }\n }\n return null;\n },\n getFormat: function (nodes) {\n var that = this, findFormat = function (node) {\n return that.findFormat(dom.isDataNode(node) ? node.parentNode : node);\n }, result = findFormat(nodes[0]), i, len;\n if (!result) {\n return '';\n }\n for (i = 1, len = nodes.length; i < len; i++) {\n if (result != findFormat(nodes[i])) {\n return '';\n }\n }\n return result.nodeName.toLowerCase();\n },\n isFormatted: function (nodes) {\n for (var i = 0, len = nodes.length; i < len; i++) {\n if (!this.findFormat(nodes[i])) {\n return false;\n }\n }\n return true;\n }\n });\n var BlockFormatter = Class.extend({\n init: function (format, values) {\n this.format = format;\n this.values = values;\n this.finder = new BlockFormatFinder(format);\n },\n wrap: function (tag, attributes, nodes) {\n var commonAncestor = nodes.length == 1 ? dom.blockParentOrBody(nodes[0]) : dom.commonAncestor.apply(null, nodes);\n if (dom.isInline(commonAncestor)) {\n commonAncestor = dom.blockParentOrBody(commonAncestor);\n }\n var ancestors = dom.significantChildNodes(commonAncestor), position = dom.findNodeIndex(ancestors[0]), wrapper = dom.create(commonAncestor.ownerDocument, tag, attributes), i, ancestor;\n for (i = 0; i < ancestors.length; i++) {\n ancestor = ancestors[i];\n if (dom.isBlock(ancestor)) {\n dom.attr(ancestor, attributes);\n if (wrapper.childNodes.length) {\n dom.insertBefore(wrapper, ancestor);\n wrapper = wrapper.cloneNode(false);\n }\n position = dom.findNodeIndex(ancestor) + 1;\n continue;\n }\n wrapper.appendChild(ancestor);\n }\n if (wrapper.firstChild) {\n dom.insertAt(commonAncestor, wrapper, position);\n }\n },\n apply: function (nodes) {\n var format, values = this.values;\n function attributes(format) {\n return extend({}, format && format.attr, values);\n }\n this._handleImmutables(nodes, true);\n var images = dom.filter('img', nodes);\n var imageFormat = EditorUtils.formatByName('img', this.format);\n var imageAttributes = attributes(imageFormat);\n $.each(images, function () {\n dom.attr(this, imageAttributes);\n });\n if (images.length == nodes.length) {\n return;\n }\n var nonImages = dom.filter('img', nodes, true);\n var formatNodes = this.finder.findSuitable(nonImages);\n if (formatNodes.length) {\n for (var i = 0, len = formatNodes.length; i < len; i++) {\n format = EditorUtils.formatByName(dom.name(formatNodes[i]), this.format);\n dom.attr(formatNodes[i], attributes(format));\n }\n } else {\n format = this.format[0];\n this.wrap(format.tags[0], attributes(format), nonImages);\n }\n },\n _handleImmutables: function (nodes, applyFormatting) {\n if (!this.immutables()) {\n return;\n }\n var immutableFormat = EditorUtils.formatByName('immutable', this.format);\n if (!immutableFormat) {\n return;\n }\n var ImmutablesNS = Editor.Immutables;\n var l = nodes.length - 1;\n for (var i = l; i >= 0; i--) {\n var immutableParent = ImmutablesNS.immutableParent(nodes[i]);\n if (!immutableParent) {\n continue;\n }\n if (immutableParent !== nodes[i + 1]) {\n if (applyFormatting) {\n dom.attr(immutableParent, immutableFormat.attr);\n } else {\n dom.unstyle(immutableParent, immutableFormat.attr.style);\n }\n }\n nodes.splice(i, 1);\n }\n },\n immutables: function () {\n return this.editor && this.editor.options.immutables;\n },\n remove: function (nodes) {\n var i, l, formatNode, namedFormat, name;\n this._handleImmutables(nodes, false);\n for (i = 0, l = nodes.length; i < l; i++) {\n formatNode = this.finder.findFormat(nodes[i]);\n if (formatNode) {\n name = dom.name(formatNode);\n if (name == 'div' && !formatNode.getAttribute('class')) {\n dom.unwrap(formatNode);\n } else {\n namedFormat = EditorUtils.formatByName(name, this.format);\n if (namedFormat.attr.style) {\n dom.unstyle(formatNode, namedFormat.attr.style);\n }\n if (namedFormat.attr.className) {\n dom.removeClass(formatNode, namedFormat.attr.className);\n }\n }\n }\n }\n },\n toggle: function (range) {\n var that = this, nodes = dom.filterBy(RangeUtils.nodes(range), dom.htmlIndentSpace, true);\n if (that.finder.isFormatted(nodes)) {\n that.remove(nodes);\n } else {\n that.apply(nodes);\n }\n }\n });\n var GreedyBlockFormatter = Class.extend({\n init: function (format, values) {\n var that = this;\n that.format = format;\n that.values = values;\n that.finder = new BlockFormatFinder(format);\n },\n apply: function (nodes) {\n var format = this.format;\n var blocks = dom.blockParents(nodes);\n var formatTag = format[0].tags[0];\n var i, len, list, formatter, range;\n var element;\n var tagName;\n var block;\n var immutalbeParent;\n if (blocks.length) {\n for (i = 0, len = blocks.length; i < len; i++) {\n block = blocks[i];\n immutalbeParent = this.immutables() && Editor.Immutables.immutableParent(block);\n if (!immutalbeParent) {\n tagName = dom.name(block);\n if (tagName == 'li') {\n list = block.parentNode;\n formatter = new Editor.ListFormatter(list.nodeName.toLowerCase(), formatTag);\n range = this.editor.createRange();\n range.selectNode(blocks[i]);\n formatter.toggle(range);\n } else if (formatTag && (tagName == 'td' || block.attributes.contentEditable)) {\n new BlockFormatter(format, this.values).apply(block.childNodes);\n } else {\n element = dom.changeTag(block, formatTag);\n dom.attr(element, format[0].attr);\n }\n }\n }\n } else {\n var blockFormatter = new BlockFormatter(format, this.values);\n blockFormatter.editor = this.editor;\n blockFormatter.apply(nodes);\n }\n },\n toggle: function (range) {\n var nodes = RangeUtils.textNodes(range);\n if (!nodes.length) {\n range.selectNodeContents(range.commonAncestorContainer);\n nodes = RangeUtils.textNodes(range);\n if (!nodes.length) {\n nodes = dom.significantChildNodes(range.commonAncestorContainer);\n }\n }\n this.apply(nodes);\n },\n immutables: function () {\n return this.editor && this.editor.options.immutables;\n }\n });\n var FormatCommand = Command.extend({\n init: function (options) {\n options.formatter = options.formatter();\n var finder = options.formatter.finder;\n if (finder && EditorUtils.formatByName('immutable', finder.format)) {\n finder._initOptions({ immutables: options.immutables });\n }\n Command.fn.init.call(this, options);\n }\n });\n var BlockFormatTool = FormatTool.extend({\n init: function (options) {\n FormatTool.fn.init.call(this, extend(options, {\n finder: new BlockFormatFinder(options.format),\n formatter: function () {\n return new BlockFormatter(options.format);\n }\n }));\n }\n });\n extend(Editor, {\n BlockFormatFinder: BlockFormatFinder,\n BlockFormatter: BlockFormatter,\n GreedyBlockFormatter: GreedyBlockFormatter,\n FormatCommand: FormatCommand,\n BlockFormatTool: BlockFormatTool\n });\n var listElements = [\n 'ul',\n 'ol',\n 'li'\n ];\n registerFormat('justifyLeft', [\n {\n tags: dom.nonListBlockElements,\n attr: { style: { textAlign: 'left' } }\n },\n {\n tags: ['img'],\n attr: {\n style: {\n 'float': 'left',\n display: '',\n marginLeft: '',\n marginRight: ''\n }\n }\n },\n {\n tags: ['immutable'],\n attr: {\n style: {\n 'float': 'left',\n display: '',\n marginLeft: '',\n marginRight: ''\n }\n }\n },\n {\n tags: listElements,\n attr: {\n style: {\n textAlign: 'left',\n listStylePosition: ''\n }\n }\n }\n ]);\n registerTool('justifyLeft', new BlockFormatTool({\n format: formats.justifyLeft,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Justify Left'\n })\n }));\n registerFormat('justifyCenter', [\n {\n tags: dom.nonListBlockElements,\n attr: { style: { textAlign: 'center' } }\n },\n {\n tags: ['img'],\n attr: {\n style: {\n display: 'block',\n marginLeft: 'auto',\n marginRight: 'auto',\n 'float': ''\n }\n }\n },\n {\n tags: ['immutable'],\n attr: {\n style: {\n display: 'block',\n marginLeft: 'auto',\n marginRight: 'auto',\n 'float': ''\n }\n }\n },\n {\n tags: listElements,\n attr: {\n style: {\n textAlign: 'center',\n listStylePosition: 'inside'\n }\n }\n }\n ]);\n registerTool('justifyCenter', new BlockFormatTool({\n format: formats.justifyCenter,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Justify Center'\n })\n }));\n registerFormat('justifyRight', [\n {\n tags: dom.nonListBlockElements,\n attr: { style: { textAlign: 'right' } }\n },\n {\n tags: ['img'],\n attr: {\n style: {\n 'float': 'right',\n display: '',\n marginLeft: '',\n marginRight: ''\n }\n }\n },\n {\n tags: ['immutable'],\n attr: {\n style: {\n 'float': 'right',\n display: '',\n marginLeft: '',\n marginRight: ''\n }\n }\n },\n {\n tags: listElements,\n attr: {\n style: {\n textAlign: 'right',\n listStylePosition: 'inside'\n }\n }\n }\n ]);\n registerTool('justifyRight', new BlockFormatTool({\n format: formats.justifyRight,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Justify Right'\n })\n }));\n registerFormat('justifyFull', [\n {\n tags: dom.nonListBlockElements,\n attr: { style: { textAlign: 'justify' } }\n },\n {\n tags: ['img'],\n attr: {\n style: {\n display: 'block',\n marginLeft: 'auto',\n marginRight: 'auto',\n 'float': ''\n }\n }\n },\n {\n tags: ['immutable'],\n attr: {\n style: {\n display: 'block',\n marginLeft: 'auto',\n marginRight: 'auto',\n 'float': ''\n }\n }\n },\n {\n tags: listElements,\n attr: {\n style: {\n textAlign: 'justify',\n listStylePosition: ''\n }\n }\n }\n ]);\n registerTool('justifyFull', new BlockFormatTool({\n format: formats.justifyFull,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Justify Full'\n })\n }));\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/linebreak', ['editor/formatblock'], f);\n}(function () {\n (function ($) {\n var kendo = window.kendo, extend = $.extend, editorNS = kendo.ui.editor, dom = editorNS.Dom, Command = editorNS.Command, Tool = editorNS.Tool, BlockFormatter = editorNS.BlockFormatter, normalize = dom.normalize, RangeUtils = editorNS.RangeUtils, registerTool = editorNS.EditorUtils.registerTool;\n var ParagraphCommand = Command.extend({\n init: function (options) {\n this.options = options;\n Command.fn.init.call(this, options);\n },\n _insertMarker: function (doc, range) {\n var marker = dom.create(doc, 'a'), container;\n marker.className = 'k-marker';\n range.insertNode(marker);\n if (!marker.parentNode) {\n container = range.commonAncestorContainer;\n container.innerHTML = '';\n container.appendChild(marker);\n }\n normalize(marker.parentNode);\n return marker;\n },\n _moveFocus: function (range, candidate) {\n if (dom.isEmpty(candidate)) {\n range.setStartBefore(candidate);\n } else {\n range.selectNodeContents(candidate);\n var focusNode = RangeUtils.textNodes(range)[0];\n if (!focusNode) {\n while (candidate.childNodes.length && !dom.is(candidate.firstChild, 'br')) {\n candidate = candidate.firstChild;\n }\n focusNode = candidate;\n }\n if (dom.isEmpty(focusNode)) {\n range.setStartBefore(focusNode);\n } else {\n if (dom.emptyNode(focusNode)) {\n focusNode.innerHTML = '\\uFEFF';\n }\n range.setStartBefore(focusNode.firstChild || focusNode);\n }\n }\n },\n shouldTrim: function (range) {\n var blocks = 'p,h1,h2,h3,h4,h5,h6'.split(','), startInBlock = dom.parentOfType(range.startContainer, blocks), endInBlock = dom.parentOfType(range.endContainer, blocks);\n return startInBlock && !endInBlock || !startInBlock && endInBlock;\n },\n _blankAfter: function (node) {\n while (node && (dom.isMarker(node) || dom.stripBom(node.nodeValue) === '')) {\n node = node.nextSibling;\n }\n return !node;\n },\n exec: function () {\n var range = this.getRange(), doc = RangeUtils.documentFromRange(range), parent, previous, next, emptyParagraphContent = editorNS.emptyElementContent, paragraph, marker, li, heading, rng, shouldTrim;\n this.expandImmutablesIn(range);\n shouldTrim = this.shouldTrim(range);\n range.deleteContents();\n marker = this._insertMarker(doc, range);\n dom.stripBomNode(marker.previousSibling);\n dom.stripBomNode(marker.nextSibling);\n li = dom.closestEditableOfType(marker, ['li']);\n heading = dom.closestEditableOfType(marker, 'h1,h2,h3,h4,h5,h6'.split(','));\n if (li) {\n if (dom.emptyNode(li)) {\n paragraph = dom.create(doc, 'p');\n if (dom.next(li)) {\n rng = range.cloneRange();\n rng.selectNode(li);\n RangeUtils.split(rng, li.parentNode);\n }\n var br = $('br', li);\n if (br.length == 1) {\n br.remove();\n }\n var parentNode = li.parentNode;\n var parentChildrenLength = li.parentNode.children.length;\n var firstChild = parentChildrenLength > 1 && li.childNodes.length == 1 && li.children[0];\n dom.insertAfter(paragraph, parentNode);\n dom.remove(parentChildrenLength == 1 ? li.parentNode : li);\n if (firstChild && firstChild !== marker) {\n paragraph.appendChild(firstChild);\n paragraph.appendChild(marker);\n } else {\n paragraph.innerHTML = emptyParagraphContent;\n }\n next = paragraph;\n }\n } else if (heading && this._blankAfter(marker)) {\n paragraph = dom.create(doc, 'p');\n dom.insertAfter(paragraph, heading);\n paragraph.innerHTML = emptyParagraphContent;\n dom.remove(marker);\n next = paragraph;\n }\n if (!next) {\n if (!(li || heading)) {\n new BlockFormatter([{ tags: ['p'] }]).apply([marker]);\n }\n range.selectNode(marker);\n parent = dom.parentOfType(marker, [li ? 'li' : heading ? dom.name(heading) : 'p']);\n RangeUtils.split(range, parent, shouldTrim);\n previous = parent.previousSibling;\n if (dom.is(previous, 'li') && previous.firstChild && !dom.is(previous.firstChild, 'br')) {\n previous = previous.firstChild;\n }\n next = parent.nextSibling;\n this.clean(previous);\n this.clean(next, { links: true });\n if (dom.is(next, 'li') && next.firstChild && !dom.is(next.firstChild, 'br')) {\n next = next.firstChild;\n }\n dom.remove(parent);\n normalize(previous);\n }\n normalize(next);\n this._moveFocus(range, next);\n range.collapse(true);\n dom.scrollTo(next);\n RangeUtils.selectRange(range);\n },\n clean: function (node, options) {\n var root = node;\n if (node.firstChild && dom.is(node.firstChild, 'br')) {\n dom.remove(node.firstChild);\n }\n if (dom.isDataNode(node) && !node.nodeValue) {\n node = node.parentNode;\n }\n if (node) {\n var siblings = false;\n while (node.firstChild && node.firstChild.nodeType == 1) {\n siblings = siblings || dom.significantNodes(node.childNodes).length > 1;\n node = node.firstChild;\n }\n if (!dom.isEmpty(node) && /^\\s*$/.test(node.innerHTML) && !siblings) {\n $(root).find('.k-br').remove();\n node.innerHTML = editorNS.emptyElementContent;\n }\n if (options && options.links) {\n while (node != root) {\n if (dom.is(node, 'a') && dom.emptyNode(node)) {\n dom.unwrap(node);\n break;\n }\n node = node.parentNode;\n }\n }\n }\n }\n });\n var NewLineCommand = Command.extend({\n init: function (options) {\n this.options = options;\n Command.fn.init.call(this, options);\n },\n exec: function () {\n var range = this.getRange();\n this.expandImmutablesIn(range);\n var br = dom.create(RangeUtils.documentFromRange(range), 'br');\n var filler;\n var browser = kendo.support.browser;\n var oldIE = browser.msie && browser.version < 11;\n range.deleteContents();\n range.insertNode(br);\n normalize(br.parentNode);\n if (!oldIE && (!br.nextSibling || dom.isWhitespace(br.nextSibling))) {\n filler = br.cloneNode(true);\n filler.className = 'k-br';\n dom.insertAfter(filler, br);\n }\n range.setStartAfter(br);\n range.collapse(true);\n dom.scrollTo(br.nextSibling || br);\n RangeUtils.selectRange(range);\n }\n });\n extend(editorNS, {\n ParagraphCommand: ParagraphCommand,\n NewLineCommand: NewLineCommand\n });\n registerTool('insertLineBreak', new Tool({\n key: 13,\n shift: true,\n command: NewLineCommand\n }));\n registerTool('insertParagraph', new Tool({\n key: 13,\n command: ParagraphCommand\n }));\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/lists', ['editor/linebreak'], f);\n}(function () {\n (function ($) {\n var kendo = window.kendo, Class = kendo.Class, extend = $.extend, Editor = kendo.ui.editor, dom = Editor.Dom, RangeUtils = Editor.RangeUtils, EditorUtils = Editor.EditorUtils, Command = Editor.Command, ToolTemplate = Editor.ToolTemplate, FormatTool = Editor.FormatTool, BlockFormatFinder = Editor.BlockFormatFinder, textNodes = RangeUtils.textNodes, registerTool = Editor.EditorUtils.registerTool;\n var ListFormatFinder = BlockFormatFinder.extend({\n init: function (tag) {\n this.tag = tag;\n var tags = this.tags = [\n tag == 'ul' ? 'ol' : 'ul',\n tag\n ];\n BlockFormatFinder.fn.init.call(this, [{ tags: tags }]);\n },\n isFormatted: function (nodes) {\n var formatNodes = [];\n var formatNode, i;\n for (i = 0; i < nodes.length; i++) {\n formatNode = this.findFormat(nodes[i]);\n if (formatNode && dom.name(formatNode) == this.tag) {\n formatNodes.push(formatNode);\n }\n }\n if (formatNodes.length < 1) {\n return false;\n }\n if (formatNodes.length != nodes.length) {\n return false;\n }\n for (i = 0; i < formatNodes.length; i++) {\n if (formatNodes[i].parentNode != formatNode.parentNode) {\n break;\n }\n if (formatNodes[i] != formatNode) {\n return false;\n }\n }\n return true;\n },\n findSuitable: function (nodes) {\n var candidate = this.findFormat(nodes[0]);\n if (candidate && dom.name(candidate) == this.tag) {\n return candidate;\n }\n return null;\n }\n });\n var ListFormatter = Class.extend({\n init: function (tag, unwrapTag) {\n var that = this;\n that.finder = new ListFormatFinder(tag);\n that.tag = tag;\n that.unwrapTag = unwrapTag;\n },\n isList: function (node) {\n return dom.list(node);\n },\n immutables: function () {\n return this.editor && !!this.editor.options.immutables;\n },\n wrap: function (list, nodes) {\n var li = dom.create(list.ownerDocument, 'li'), i, node, isImmutable = this.immutables() ? Editor.Immutables.immutable : $.noop;\n for (i = 0; i < nodes.length; i++) {\n node = nodes[i];\n if (dom.is(node, 'li')) {\n list.appendChild(node);\n continue;\n }\n if (this.isList(node)) {\n while (node.firstChild) {\n list.appendChild(node.firstChild);\n }\n continue;\n }\n if (dom.is(node, 'td')) {\n while (node.firstChild) {\n li.appendChild(node.firstChild);\n }\n list.appendChild(li);\n node.appendChild(list);\n list = list.cloneNode(false);\n li = li.cloneNode(false);\n continue;\n }\n li.appendChild(node);\n if (dom.isBlock(node)) {\n list.appendChild(li);\n if (!isImmutable(node)) {\n dom.unwrap(node);\n }\n li = li.cloneNode(false);\n }\n }\n if (li.firstChild) {\n list.appendChild(li);\n }\n },\n containsAny: function (parent, nodes) {\n for (var i = 0; i < nodes.length; i++) {\n if (dom.isAncestorOrSelf(parent, nodes[i])) {\n return true;\n }\n }\n return false;\n },\n suitable: function (candidate, nodes) {\n if (candidate.className == 'k-marker') {\n var sibling = candidate.nextSibling;\n if (sibling && dom.isBlock(sibling)) {\n return false;\n }\n sibling = candidate.previousSibling;\n if (sibling && dom.isBlock(sibling)) {\n return false;\n }\n }\n return this.containsAny(candidate, nodes) || dom.isInline(candidate) || candidate.nodeType == 3;\n },\n _parentLists: function (node) {\n var editable = dom.closestEditable(node);\n return $(node).parentsUntil(editable, 'ul,ol');\n },\n split: function (range) {\n var nodes = textNodes(range);\n var start, end, parents;\n if (nodes.length) {\n start = dom.parentOfType(nodes[0], ['li']);\n end = dom.parentOfType(nodes[nodes.length - 1], ['li']);\n range.setStartBefore(start);\n range.setEndAfter(end);\n for (var i = 0, l = nodes.length; i < l; i++) {\n var formatNode = this.finder.findFormat(nodes[i]);\n if (formatNode) {\n parents = this._parentLists(formatNode);\n if (parents.length) {\n RangeUtils.split(range, parents.last()[0], true);\n } else {\n RangeUtils.split(range, formatNode, true);\n }\n }\n }\n }\n },\n merge: function (tag, formatNode) {\n var prev = formatNode.previousSibling, next;\n while (prev && (prev.className == 'k-marker' || prev.nodeType == 3 && dom.isWhitespace(prev))) {\n prev = prev.previousSibling;\n }\n if (prev && dom.name(prev) == tag) {\n while (formatNode.firstChild) {\n prev.appendChild(formatNode.firstChild);\n }\n dom.remove(formatNode);\n formatNode = prev;\n }\n next = formatNode.nextSibling;\n while (next && (next.className == 'k-marker' || next.nodeType == 3 && dom.isWhitespace(next))) {\n next = next.nextSibling;\n }\n if (next && dom.name(next) == tag) {\n while (formatNode.lastChild) {\n next.insertBefore(formatNode.lastChild, next.firstChild);\n }\n dom.remove(formatNode);\n }\n },\n breakable: function (node) {\n return node != node.ownerDocument.body && !/table|tbody|tr|td/.test(dom.name(node)) && !node.attributes.contentEditable;\n },\n applyOnSection: function (section, nodes) {\n var tag = this.tag;\n var commonAncestor = dom.closestSplittableParent(nodes);\n var ancestors = [];\n var formatNode = this.finder.findSuitable(nodes);\n if (!formatNode) {\n formatNode = new ListFormatFinder(tag == 'ul' ? 'ol' : 'ul').findSuitable(nodes);\n }\n var childNodes;\n if (/table|tbody/.test(dom.name(commonAncestor))) {\n childNodes = $.map(nodes, function (node) {\n return dom.parentOfType(node, ['td']);\n });\n } else {\n childNodes = dom.significantChildNodes(commonAncestor);\n if ($.grep(childNodes, dom.isBlock).length) {\n childNodes = $.grep(childNodes, $.proxy(function (node) {\n return this.containsAny(node, nodes);\n }, this));\n }\n if (!childNodes.length) {\n childNodes = nodes;\n }\n }\n function pushAncestor() {\n ancestors.push(this);\n }\n for (var i = 0; i < childNodes.length; i++) {\n var child = childNodes[i];\n var suitable = (!formatNode || !dom.isAncestorOrSelf(formatNode, child)) && this.suitable(child, nodes);\n if (!suitable) {\n continue;\n }\n if (formatNode && this.isList(child)) {\n $.each(child.children, pushAncestor);\n dom.remove(child);\n } else {\n ancestors.push(child);\n }\n }\n if (ancestors.length == childNodes.length && this.breakable(commonAncestor)) {\n ancestors = [commonAncestor];\n }\n if (!formatNode) {\n formatNode = dom.create(commonAncestor.ownerDocument, tag);\n dom.insertBefore(formatNode, ancestors[0]);\n }\n this.wrap(formatNode, ancestors);\n while (dom.isBom(formatNode.nextSibling)) {\n dom.remove(formatNode.nextSibling);\n }\n if (!dom.is(formatNode, tag)) {\n dom.changeTag(formatNode, tag);\n }\n this.merge(tag, formatNode);\n },\n apply: function (nodes) {\n var i = 0, sections = [], lastSection, lastNodes, section, node, l = nodes.length, immutableParent = this.immutables() ? Editor.Immutables.immutableParent : $.noop;\n function addLastSection() {\n if (lastSection) {\n sections.push({\n section: lastSection,\n nodes: lastNodes\n });\n }\n }\n for (i = 0; i < l; i++) {\n node = immutableParent(nodes[i]) || nodes[i];\n section = dom.closestEditable(node, [\n 'td',\n 'body'\n ]);\n if (!lastSection || section != lastSection) {\n addLastSection();\n lastNodes = [node];\n lastSection = section;\n } else {\n lastNodes.push(node);\n }\n }\n addLastSection();\n for (i = 0; i < sections.length; i++) {\n this.applyOnSection(sections[i].section, sections[i].nodes);\n }\n },\n unwrap: function (ul) {\n var fragment = ul.ownerDocument.createDocumentFragment(), unwrapTag = this.unwrapTag, parents, li, p, child;\n for (li = ul.firstChild; li; li = li.nextSibling) {\n p = dom.create(ul.ownerDocument, unwrapTag || 'p');\n while (li.firstChild) {\n child = li.firstChild;\n if (dom.isBlock(child)) {\n if (p.firstChild) {\n fragment.appendChild(p);\n p = dom.create(ul.ownerDocument, unwrapTag || 'p');\n }\n fragment.appendChild(child);\n } else {\n p.appendChild(child);\n }\n }\n if (p.firstChild) {\n fragment.appendChild(p);\n }\n }\n parents = this._parentLists(ul);\n if (parents[0]) {\n dom.insertAfter(fragment, parents.last()[0]);\n parents.last().remove();\n } else {\n dom.insertAfter(fragment, ul);\n }\n dom.remove(ul);\n },\n remove: function (nodes) {\n var formatNode;\n for (var i = 0, l = nodes.length; i < l; i++) {\n formatNode = this.finder.findFormat(nodes[i]);\n if (formatNode) {\n this.unwrap(formatNode);\n }\n }\n },\n toggle: function (range) {\n var that = this, nodes = textNodes(range), ancestor = range.commonAncestorContainer;\n if (!nodes.length) {\n range.selectNodeContents(ancestor);\n nodes = textNodes(range);\n if (!nodes.length) {\n var text = ancestor.ownerDocument.createTextNode('');\n range.startContainer.appendChild(text);\n nodes = [text];\n range.selectNode(text.parentNode);\n }\n }\n nodes = dom.filterBy(nodes, dom.htmlIndentSpace, true);\n if (that.finder.isFormatted(nodes)) {\n that.split(range);\n that.remove(nodes);\n } else {\n that.apply(nodes);\n }\n }\n });\n var ListCommand = Command.extend({\n init: function (options) {\n options.formatter = new ListFormatter(options.tag);\n Command.fn.init.call(this, options);\n }\n });\n var ListTool = FormatTool.extend({\n init: function (options) {\n this.options = options;\n FormatTool.fn.init.call(this, extend(options, { finder: new ListFormatFinder(options.tag) }));\n },\n command: function (commandArguments) {\n return new ListCommand(extend(commandArguments, { tag: this.options.tag }));\n }\n });\n extend(Editor, {\n ListFormatFinder: ListFormatFinder,\n ListFormatter: ListFormatter,\n ListCommand: ListCommand,\n ListTool: ListTool\n });\n registerTool('insertUnorderedList', new ListTool({\n tag: 'ul',\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Insert unordered list'\n })\n }));\n registerTool('insertOrderedList', new ListTool({\n tag: 'ol',\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Insert ordered list'\n })\n }));\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/link', ['editor/lists'], f);\n}(function () {\n (function ($, undefined) {\n var kendo = window.kendo, Class = kendo.Class, extend = $.extend, proxy = $.proxy, Editor = kendo.ui.editor, dom = Editor.Dom, RangeUtils = Editor.RangeUtils, EditorUtils = Editor.EditorUtils, Command = Editor.Command, Tool = Editor.Tool, ToolTemplate = Editor.ToolTemplate, InlineFormatter = Editor.InlineFormatter, InlineFormatFinder = Editor.InlineFormatFinder, textNodes = RangeUtils.textNodes, editableTextNodes = RangeUtils.editableTextNodes, registerTool = Editor.EditorUtils.registerTool, keys = kendo.keys;\n var HTTP_PROTOCOL = 'http://';\n var protocolRegExp = /^\\w*:\\/\\//;\n var endLinkCharsRegExp = /[\\w\\/\\$\\-_\\*\\?]/i;\n var LinkFormatFinder = Class.extend({\n findSuitable: function (sourceNode) {\n return dom.parentOfType(sourceNode, ['a']);\n }\n });\n var LinkFormatter = Class.extend({\n init: function () {\n this.finder = new LinkFormatFinder();\n },\n apply: function (range, attributes) {\n var nodes = this.immutables ? editableTextNodes(range) : textNodes(range);\n var markers, doc, formatter, a, parent;\n if (attributes.innerHTML) {\n doc = RangeUtils.documentFromRange(range);\n markers = RangeUtils.getMarkers(range);\n range.deleteContents();\n a = dom.create(doc, 'a', attributes);\n range.insertNode(a);\n parent = a.parentNode;\n if (dom.name(parent) == 'a') {\n dom.insertAfter(a, parent);\n }\n if (dom.emptyNode(parent)) {\n dom.remove(parent);\n }\n var ref = a;\n for (var i = 0; i < markers.length; i++) {\n dom.insertAfter(markers[i], ref);\n ref = markers[i];\n }\n if (markers.length) {\n dom.insertBefore(doc.createTextNode('\\uFEFF'), markers[1]);\n dom.insertAfter(doc.createTextNode('\\uFEFF'), markers[1]);\n range.setStartBefore(markers[0]);\n range.setEndAfter(markers[markers.length - 1]);\n }\n } else {\n formatter = new InlineFormatter([{ tags: ['a'] }], attributes);\n formatter.finder = this.finder;\n formatter.apply(nodes);\n }\n }\n });\n var UnlinkCommand = Command.extend({\n init: function (options) {\n var that = this;\n options.formatter = {\n toggle: function (range) {\n var nodes = that.immutables() ? editableTextNodes(range) : textNodes(range);\n new InlineFormatter([{ tags: ['a'] }]).remove(nodes);\n }\n };\n this.options = options;\n Command.fn.init.call(this, options);\n }\n });\n var LinkCommand = Command.extend({\n init: function (options) {\n var that;\n this.options = options;\n Command.fn.init.call(this, options);\n this.formatter = new LinkFormatter();\n if (!options.url) {\n this.attributes = null;\n this.async = true;\n } else {\n this.exec = function () {\n this.formatter.immutables = that && that.immutables();\n this.formatter.apply(options.range, {\n href: options.url,\n innerHTML: options.text || options.url,\n target: options.target\n });\n };\n }\n },\n _dialogTemplate: function () {\n return kendo.template('
    ' + '
    ' + '
    ' + '' + '
    ' + '
    ' + '' + '
    ' + '
    ' + '' + '
    ' + '
    ' + '' + '
    ' + '
    ' + '' + '
    ' + '
    ' + '' + '
    ' + '
    ' + '
    ' + '' + '' + '
    ' + '
    ' + '' + '' + '
    ' + '
    ' + '
    ')({ messages: this.editor.options.messages });\n },\n exec: function () {\n var messages = this.editor.options.messages;\n this._initialText = '';\n this._range = this.lockRange(true);\n this.formatter.immutables = this.immutables();\n var nodes = textNodes(this._range);\n var a = nodes.length ? this.formatter.finder.findSuitable(nodes[0]) : null;\n var img = nodes.length && dom.name(nodes[0]) == 'img';\n var dialog = this.createDialog(this._dialogTemplate(), {\n title: messages.createLink,\n close: proxy(this._close, this),\n visible: false\n });\n if (a) {\n this._range.selectNodeContents(a);\n nodes = textNodes(this._range);\n }\n this._initialText = this.linkText(nodes);\n dialog.find('.k-dialog-insert').click(proxy(this._apply, this)).end().find('.k-dialog-close').click(proxy(this._close, this)).end().find('.k-edit-field input').keydown(proxy(this._keydown, this)).end().find('#k-editor-link-url').val(this.linkUrl(a)).end().find('#k-editor-link-text').val(this._initialText).end().find('#k-editor-link-title').val(a ? a.title : '').end().find('#k-editor-link-target').attr('checked', a ? a.target == '_blank' : false).end().find('.k-editor-link-text-row').toggle(!img);\n this._dialog = dialog.data('kendoWindow').center().open();\n $('#k-editor-link-url', dialog).focus().select();\n },\n _keydown: function (e) {\n var keys = kendo.keys;\n if (e.keyCode == keys.ENTER) {\n this._apply(e);\n } else if (e.keyCode == keys.ESC) {\n this._close(e);\n }\n },\n _apply: function (e) {\n var element = this._dialog.element;\n var href = $('#k-editor-link-url', element).val();\n var title, text, target;\n var textInput = $('#k-editor-link-text', element);\n if (href && href != HTTP_PROTOCOL) {\n if (href.indexOf('@') > 0 && !/^(\\w+:)|(\\/\\/)/i.test(href)) {\n href = 'mailto:' + href;\n }\n this.attributes = { href: href };\n title = $('#k-editor-link-title', element).val();\n if (title) {\n this.attributes.title = title;\n }\n if (textInput.is(':visible')) {\n text = textInput.val();\n if (!text && !this._initialText) {\n this.attributes.innerHTML = href;\n } else if (text && text !== this._initialText) {\n this.attributes.innerHTML = dom.stripBom(text);\n }\n }\n target = $('#k-editor-link-target', element).is(':checked');\n this.attributes.target = target ? '_blank' : null;\n this.formatter.apply(this._range, this.attributes);\n }\n this._close(e);\n if (this.change) {\n this.change();\n }\n },\n _close: function (e) {\n e.preventDefault();\n this._dialog.destroy();\n dom.windowFromDocument(RangeUtils.documentFromRange(this._range)).focus();\n this.releaseRange(this._range);\n },\n linkUrl: function (anchor) {\n if (anchor) {\n return anchor.getAttribute('href', 2);\n }\n return HTTP_PROTOCOL;\n },\n linkText: function (nodes) {\n var text = '';\n var i;\n for (i = 0; i < nodes.length; i++) {\n text += nodes[i].nodeValue;\n }\n return dom.stripBom(text || '');\n },\n redo: function () {\n var range = this.lockRange(true);\n this.formatter.apply(range, this.attributes);\n this.releaseRange(range);\n }\n });\n var AutoLinkCommand = Command.extend({\n init: function (options) {\n Command.fn.init.call(this, options);\n this.formatter = new LinkFormatter();\n },\n exec: function () {\n var detectedLink = this.detectLink();\n if (!detectedLink) {\n return;\n }\n var range = this.getRange();\n var linkMarker = new kendo.ui.editor.Marker();\n var linkRange = range.cloneRange();\n linkRange.setStart(detectedLink.start.node, detectedLink.start.offset);\n linkRange.setEnd(detectedLink.end.node, detectedLink.end.offset);\n range = this.lockRange();\n linkMarker.add(linkRange);\n this.formatter.apply(linkRange, { href: this._ensureWebProtocol(detectedLink.text) });\n linkMarker.remove(linkRange);\n this.releaseRange(range);\n },\n detectLink: function () {\n var range = this.getRange();\n var traverser = new LeftDomTextTraverser({\n node: range.startContainer,\n offset: range.startOffset,\n cancelAtNode: function (node) {\n return node && dom.name(node) === 'a';\n }\n });\n var detection = new DomTextLinkDetection(traverser);\n return detection.detectLink();\n },\n changesContent: function () {\n return !!this.detectLink();\n },\n _ensureWebProtocol: function (linkText) {\n var hasProtocol = this._hasProtocolPrefix(linkText);\n return hasProtocol ? linkText : this._prefixWithWebProtocol(linkText);\n },\n _hasProtocolPrefix: function (linkText) {\n return protocolRegExp.test(linkText);\n },\n _prefixWithWebProtocol: function (linkText) {\n return HTTP_PROTOCOL + linkText;\n }\n });\n var UnlinkTool = Tool.extend({\n init: function (options) {\n this.options = options;\n this.finder = new InlineFormatFinder([{ tags: ['a'] }]);\n Tool.fn.init.call(this, $.extend(options, { command: UnlinkCommand }));\n },\n initialize: function (ui, options) {\n Tool.fn.initialize.call(this, ui, options);\n ui.addClass('k-state-disabled');\n },\n update: function (ui, nodes) {\n ui.toggleClass('k-state-disabled', !this.finder.isFormatted(nodes)).removeClass('k-state-hover');\n }\n });\n var DomTextLinkDetection = Class.extend({\n init: function (traverser) {\n this.traverser = traverser;\n this.start = DomPos();\n this.end = DomPos();\n this.text = '';\n },\n detectLink: function () {\n var node = this.traverser.node;\n var offset = this.traverser.offset;\n if (dom.isDataNode(node)) {\n var text = node.data.substring(0, offset);\n if (/\\s{2}$/.test(dom.stripBom(text))) {\n return;\n }\n } else if (offset === 0) {\n var p = dom.closestEditableOfType(node, dom.blockElements);\n if (p && p.previousSibling) {\n this.traverser.init({ node: p.previousSibling });\n }\n }\n this.traverser.traverse($.proxy(this._detectEnd, this));\n if (!this.end.blank()) {\n this.traverser = this.traverser.clone(this.end);\n this.traverser.traverse($.proxy(this._detectStart, this));\n if (!this._isLinkDetected()) {\n var puntuationOptions = this.traverser.extendOptions(this.start);\n var puntuationTraverser = new RightDomTextTraverser(puntuationOptions);\n puntuationTraverser.traverse($.proxy(this._skipStartPuntuation, this));\n if (!this._isLinkDetected()) {\n this.start = DomPos();\n }\n }\n }\n if (this.start.blank()) {\n return null;\n } else {\n return {\n start: this.start,\n end: this.end,\n text: this.text\n };\n }\n },\n _isLinkDetected: function () {\n return protocolRegExp.test(this.text) || /^w{3}\\./i.test(this.text);\n },\n _detectEnd: function (text, node) {\n var i = lastIndexOfRegExp(text, endLinkCharsRegExp);\n if (i > -1) {\n this.end.node = node;\n this.end.offset = i + 1;\n return false;\n }\n },\n _detectStart: function (text, node) {\n var i = lastIndexOfRegExp(text, /\\s/);\n var ii = i + 1;\n this.text = text.substring(ii) + this.text;\n this.start.node = node;\n this.start.offset = ii;\n if (i > -1) {\n return false;\n }\n },\n _skipStartPuntuation: function (text, node, offset) {\n var i = indexOfRegExp(text, /\\w/);\n var ii = i;\n if (i === -1) {\n ii = text.length;\n }\n this.text = this.text.substring(ii);\n this.start.node = node;\n this.start.offset = ii + (offset | 0);\n if (i > -1) {\n return false;\n }\n }\n });\n function lastIndexOfRegExp(str, search) {\n var i = str.length;\n while (i-- && !search.test(str[i])) {\n }\n return i;\n }\n function indexOfRegExp(str, search) {\n var r = search.exec(str);\n return r ? r.index : -1;\n }\n var DomPos = function () {\n return {\n node: null,\n offset: null,\n blank: function () {\n return this.node === null && this.offset === null;\n }\n };\n };\n var DomTextTraverser = Class.extend({\n init: function (options) {\n this.node = options.node;\n this.offset = options.offset === undefined ? dom.isDataNode(this.node) && this.node.length || 0 : options.offset;\n this.cancelAtNode = options.cancelAtNode || this.cancelAtNode || $.noop;\n },\n traverse: function (callback) {\n if (!callback) {\n return;\n }\n this.cancel = false;\n this._traverse(callback, this.node, this.offset);\n },\n _traverse: function (callback, node, offset) {\n if (!node || this.cancel) {\n return;\n }\n if (node.nodeType === 3) {\n var text = node.data;\n if (offset !== undefined) {\n text = this.subText(text, offset);\n }\n this.cancel = callback(text, node, offset) === false;\n } else {\n var edgeNode = this.edgeNode(node);\n this.cancel = this.cancel || this.cancelAtNode(edgeNode);\n return this._traverse(callback, edgeNode);\n }\n var next = this.next(node);\n if (!next) {\n var parent = node.parentNode;\n while (!next && dom.isInline(parent)) {\n next = this.next(parent);\n parent = parent.parentNode;\n }\n }\n this.cancel = this.cancel || this.cancelAtNode(next);\n this._traverse(callback, next);\n },\n extendOptions: function (o) {\n return $.extend({\n node: this.node,\n offset: this.offset,\n cancelAtNode: this.cancelAtNode\n }, o || {});\n },\n edgeNode: function (node) {\n },\n next: function (node) {\n },\n subText: function (text, offset) {\n }\n });\n var LeftDomTextTraverser = DomTextTraverser.extend({\n subText: function (text, splitIndex) {\n return text.substring(0, splitIndex);\n },\n next: function (node) {\n return node.previousSibling;\n },\n edgeNode: function (node) {\n return node.lastChild;\n },\n clone: function (options) {\n var o = this.extendOptions(options);\n return new LeftDomTextTraverser(o);\n }\n });\n var RightDomTextTraverser = DomTextTraverser.extend({\n subText: function (text, splitIndex) {\n return text.substring(splitIndex);\n },\n next: function (node) {\n return node.nextSibling;\n },\n edgeNode: function (node) {\n return node.firstChild;\n },\n clone: function (options) {\n var o = this.extendOptions(options);\n return new RightDomTextTraverser(o);\n }\n });\n extend(kendo.ui.editor, {\n LinkFormatFinder: LinkFormatFinder,\n LinkFormatter: LinkFormatter,\n UnlinkCommand: UnlinkCommand,\n LinkCommand: LinkCommand,\n AutoLinkCommand: AutoLinkCommand,\n UnlinkTool: UnlinkTool,\n DomTextLinkDetection: DomTextLinkDetection,\n LeftDomTextTraverser: LeftDomTextTraverser,\n RightDomTextTraverser: RightDomTextTraverser\n });\n registerTool('createLink', new Tool({\n key: 'K',\n ctrl: true,\n command: LinkCommand,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Create Link'\n })\n }));\n registerTool('unlink', new UnlinkTool({\n key: 'K',\n ctrl: true,\n shift: true,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Remove Link'\n })\n }));\n registerTool('autoLink', new Tool({\n key: [\n keys.ENTER,\n keys.SPACEBAR\n ],\n keyPressCommand: true,\n command: AutoLinkCommand\n }));\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/file', [\n 'kendo.filebrowser',\n 'editor/link'\n ], f);\n}(function () {\n (function ($, undefined) {\n var kendo = window.kendo, extend = $.extend, Editor = kendo.ui.editor, EditorUtils = Editor.EditorUtils, dom = Editor.Dom, registerTool = EditorUtils.registerTool, ToolTemplate = Editor.ToolTemplate, RangeUtils = Editor.RangeUtils, Command = Editor.Command, LinkFormatter = Editor.LinkFormatter, textNodes = RangeUtils.textNodes, keys = kendo.keys, KEDITORFILEURL = '#k-editor-file-url', KEDITORFILETEXT = '#k-editor-file-text', KEDITORFILETITLE = '#k-editor-file-title';\n var FileCommand = Command.extend({\n init: function (options) {\n var that = this;\n Command.fn.init.call(that, options);\n that.formatter = new LinkFormatter();\n that.async = true;\n that.attributes = {};\n },\n insertFile: function (file, range) {\n var attributes = this.attributes;\n var doc = RangeUtils.documentFromRange(range);\n if (attributes.href && attributes.href != 'http://') {\n if (!file) {\n file = dom.create(doc, 'a', { href: attributes.href });\n file.innerHTML = attributes.innerHTML;\n file.title = attributes.title;\n range.deleteContents();\n range.insertNode(file);\n if (!file.nextSibling) {\n dom.insertAfter(doc.createTextNode('\\uFEFF'), file);\n }\n range.setStartAfter(file);\n range.setEndAfter(file);\n RangeUtils.selectRange(range);\n return true;\n } else {\n dom.attr(file, attributes);\n }\n }\n return false;\n },\n _dialogTemplate: function (showBrowser) {\n return kendo.template('
    ' + '
    ' + '# if (showBrowser) { #' + '
    ' + '# } #' + '
    ' + '' + '
    ' + '
    ' + '' + '
    ' + '
    ' + '' + '
    ' + '
    ' + '' + '
    ' + '
    ' + '' + '
    ' + '
    ' + '' + '
    ' + '
    ' + '' + '' + '
    ' + '
    ' + '
    ')({\n messages: this.editor.options.messages,\n showBrowser: showBrowser\n });\n },\n redo: function () {\n var that = this, range = that.lockRange();\n this.formatter.apply(range, this.attributes);\n that.releaseRange(range);\n },\n exec: function () {\n var that = this, range = that.lockRange(), nodes = textNodes(range), applied = false, file = nodes.length ? this.formatter.finder.findSuitable(nodes[0]) : null, dialog, options = that.editor.options, messages = options.messages, fileBrowser = options.fileBrowser, showBrowser = !!(kendo.ui.FileBrowser && fileBrowser && fileBrowser.transport && fileBrowser.transport.read !== undefined), dialogOptions = {\n title: messages.insertFile,\n visible: false,\n resizable: showBrowser\n };\n this.expandImmutablesIn(range);\n function apply(e) {\n var element = dialog.element, href = element.find(KEDITORFILEURL).val().replace(/ /g, '%20'), innerHTML = element.find(KEDITORFILETEXT).val(), title = element.find(KEDITORFILETITLE).val();\n that.attributes = {\n href: href,\n innerHTML: innerHTML !== '' ? innerHTML : href,\n title: title\n };\n applied = that.insertFile(file, range);\n close(e);\n if (that.change) {\n that.change();\n }\n }\n function close(e) {\n e.preventDefault();\n dialog.destroy();\n dom.windowFromDocument(RangeUtils.documentFromRange(range)).focus();\n if (!applied) {\n that.releaseRange(range);\n }\n }\n function keyDown(e) {\n if (e.keyCode == keys.ENTER) {\n apply(e);\n } else if (e.keyCode == keys.ESC) {\n close(e);\n }\n }\n dialogOptions.close = close;\n if (showBrowser) {\n dialogOptions.width = 750;\n }\n dialog = this.createDialog(that._dialogTemplate(showBrowser), dialogOptions).toggleClass('k-filebrowser-dialog', showBrowser).find('.k-dialog-insert').click(apply).end().find('.k-dialog-close').click(close).end().find('.k-edit-field input').keydown(keyDown).end().find(KEDITORFILEURL).val(file ? file.getAttribute('href', 2) : 'http://').end().find(KEDITORFILETEXT).val(file ? file.innerText : '').end().find(KEDITORFILETITLE).val(file ? file.title : '').end().data('kendoWindow');\n if (showBrowser) {\n that._fileBrowser = new kendo.ui.FileBrowser(dialog.element.find('.k-filebrowser'), extend({}, fileBrowser));\n that._fileBrowser.bind('change', function (ev) {\n if (ev.selected.get('type') === 'f') {\n dialog.element.find(KEDITORFILEURL).val(this.value());\n }\n });\n that._fileBrowser.bind('apply', apply);\n }\n dialog.center().open();\n dialog.element.find(KEDITORFILEURL).focus().select();\n }\n });\n kendo.ui.editor.FileCommand = FileCommand;\n registerTool('insertFile', new Editor.Tool({\n command: FileCommand,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Insert File'\n })\n }));\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/image', [\n 'kendo.imagebrowser',\n 'editor/link'\n ], f);\n}(function () {\n (function ($, undefined) {\n var kendo = window.kendo, extend = $.extend, Editor = kendo.ui.editor, EditorUtils = Editor.EditorUtils, dom = Editor.Dom, registerTool = EditorUtils.registerTool, ToolTemplate = Editor.ToolTemplate, RangeUtils = Editor.RangeUtils, Command = Editor.Command, keys = kendo.keys, KEDITORIMAGEURL = '#k-editor-image-url', KEDITORIMAGETITLE = '#k-editor-image-title', KEDITORIMAGEWIDTH = '#k-editor-image-width', KEDITORIMAGEHEIGHT = '#k-editor-image-height';\n var ImageCommand = Command.extend({\n init: function (options) {\n var that = this;\n Command.fn.init.call(that, options);\n that.async = true;\n that.attributes = {};\n },\n insertImage: function (img, range) {\n var attributes = this.attributes;\n var doc = RangeUtils.documentFromRange(range);\n if (attributes.src && attributes.src != 'http://') {\n var removeIEAttributes = function () {\n setTimeout(function () {\n if (!attributes.width) {\n img.removeAttribute('width');\n }\n if (!attributes.height) {\n img.removeAttribute('height');\n }\n img.removeAttribute('complete');\n });\n };\n if (!img) {\n img = dom.create(doc, 'img', attributes);\n img.onload = img.onerror = removeIEAttributes;\n range.deleteContents();\n range.insertNode(img);\n if (!img.nextSibling) {\n dom.insertAfter(doc.createTextNode('\\uFEFF'), img);\n }\n removeIEAttributes();\n range.setStartAfter(img);\n range.setEndAfter(img);\n RangeUtils.selectRange(range);\n return true;\n } else {\n img.onload = img.onerror = removeIEAttributes;\n dom.attr(img, attributes);\n removeIEAttributes();\n }\n }\n return false;\n },\n _dialogTemplate: function (showBrowser) {\n return kendo.template('
    ' + '
    ' + '# if (showBrowser) { #' + '
    ' + '# } #' + '
    ' + '' + '
    ' + '
    ' + '' + '
    ' + '
    ' + '' + '
    ' + '
    ' + '' + '
    ' + '
    ' + '' + '
    ' + '
    ' + '' + '
    ' + '
    ' + '' + '
    ' + '
    ' + '' + '
    ' + '
    ' + '' + '' + '
    ' + '
    ' + '
    ')({\n messages: this.editor.options.messages,\n showBrowser: showBrowser\n });\n },\n redo: function () {\n var that = this, range = that.lockRange();\n if (!that.insertImage(RangeUtils.image(range), range)) {\n that.releaseRange(range);\n }\n },\n exec: function () {\n var that = this, range = that.lockRange(), applied = false, img = RangeUtils.image(range), imageWidth = img && img.getAttribute('width') || '', imageHeight = img && img.getAttribute('height') || '', dialog, options = that.editor.options, messages = options.messages, imageBrowser = options.imageBrowser, showBrowser = !!(kendo.ui.ImageBrowser && imageBrowser && imageBrowser.transport && imageBrowser.transport.read !== undefined), dialogOptions = {\n title: messages.insertImage,\n visible: false,\n resizable: showBrowser\n };\n this.expandImmutablesIn(range);\n function apply(e) {\n var element = dialog.element, w = parseInt(element.find(KEDITORIMAGEWIDTH).val(), 10), h = parseInt(element.find(KEDITORIMAGEHEIGHT).val(), 10);\n that.attributes = {\n src: element.find(KEDITORIMAGEURL).val().replace(/ /g, '%20'),\n alt: element.find(KEDITORIMAGETITLE).val()\n };\n that.attributes.width = null;\n that.attributes.height = null;\n if (!isNaN(w) && w > 0) {\n that.attributes.width = w;\n }\n if (!isNaN(h) && h > 0) {\n that.attributes.height = h;\n }\n applied = that.insertImage(img, range);\n close(e);\n if (that.change) {\n that.change();\n }\n }\n function close(e) {\n e.preventDefault();\n dialog.destroy();\n dom.windowFromDocument(RangeUtils.documentFromRange(range)).focus();\n if (!applied) {\n that.releaseRange(range);\n }\n }\n function keyDown(e) {\n if (e.keyCode == keys.ENTER) {\n apply(e);\n } else if (e.keyCode == keys.ESC) {\n close(e);\n }\n }\n dialogOptions.close = close;\n if (showBrowser) {\n dialogOptions.width = 750;\n }\n dialog = this.createDialog(that._dialogTemplate(showBrowser), dialogOptions).toggleClass('k-filebrowser-dialog', showBrowser).find('.k-dialog-insert').click(apply).end().find('.k-dialog-close').click(close).end().find('.k-edit-field input').keydown(keyDown).end().find(KEDITORIMAGEURL).val(img ? img.getAttribute('src', 2) : 'http://').end().find(KEDITORIMAGETITLE).val(img ? img.alt : '').end().find(KEDITORIMAGEWIDTH).val(imageWidth).end().find(KEDITORIMAGEHEIGHT).val(imageHeight).end().data('kendoWindow');\n if (showBrowser) {\n this._imageBrowser = new kendo.ui.ImageBrowser(dialog.element.find('.k-imagebrowser'), extend({}, imageBrowser));\n this._imageBrowser.bind('change', function (ev) {\n if (ev.selected.get('type') === 'f') {\n dialog.element.find(KEDITORIMAGEURL).val(this.value());\n }\n });\n this._imageBrowser.bind('apply', apply);\n }\n dialog.center().open();\n dialog.element.find(KEDITORIMAGEURL).focus().select();\n }\n });\n kendo.ui.editor.ImageCommand = ImageCommand;\n registerTool('insertImage', new Editor.Tool({\n command: ImageCommand,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Insert Image'\n })\n }));\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/components', ['editor/image'], f);\n}(function () {\n (function ($, undefined) {\n var kendo = window.kendo, DropDownList = kendo.ui.DropDownList, dom = kendo.ui.editor.Dom;\n var SelectBox = DropDownList.extend({\n init: function (element, options) {\n var that = this;\n DropDownList.fn.init.call(that, element, options);\n if (kendo.support.mobileOS.ios) {\n this._initSelectOverlay();\n this.bind('dataBound', $.proxy(this._initSelectOverlay, this));\n }\n that.text(that.options.title);\n that.bind('open', function () {\n if (that.options.autoSize) {\n var list = that.list, listWidth;\n list.css({\n whiteSpace: 'nowrap',\n width: 'auto'\n });\n listWidth = list.width();\n if (listWidth) {\n listWidth += 20;\n } else {\n listWidth = that._listWidth;\n }\n list.css('width', listWidth + kendo.support.scrollbar());\n that._listWidth = listWidth;\n }\n });\n },\n options: {\n name: 'SelectBox',\n index: -1\n },\n _initSelectOverlay: function () {\n var selectBox = this;\n var value = selectBox.value();\n var view = this.dataSource.view();\n var item;\n var html = '';\n var encode = kendo.htmlEncode;\n for (var i = 0; i < view.length; i++) {\n item = view[i];\n html += '
    ',\n indent: function (content) {\n return content.replace(/<\\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi, '\\n').replace(/<(ul|ol)([^>]*)>
  • \\n/gi, '
    \\n').replace(/\\n$/, '');\n }\n });\n kendo.ui.editor.ViewHtmlCommand = ViewHtmlCommand;\n Editor.EditorUtils.registerTool('viewHtml', new Tool({\n command: ViewHtmlCommand,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'View HTML'\n })\n }));\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/formatting', ['editor/viewhtml'], f);\n}(function () {\n (function ($) {\n var kendo = window.kendo, Editor = kendo.ui.editor, Tool = Editor.Tool, ToolTemplate = Editor.ToolTemplate, DelayedExecutionTool = Editor.DelayedExecutionTool, Command = Editor.Command, dom = Editor.Dom, EditorUtils = Editor.EditorUtils, RangeUtils = Editor.RangeUtils, registerTool = EditorUtils.registerTool;\n var FormattingTool = DelayedExecutionTool.extend({\n init: function (options) {\n var that = this;\n Tool.fn.init.call(that, kendo.deepExtend({}, that.options, options));\n that.type = 'kendoSelectBox';\n that.finder = {\n getFormat: function () {\n return '';\n }\n };\n },\n options: {\n items: [\n {\n text: 'Paragraph',\n value: 'p'\n },\n {\n text: 'Quotation',\n value: 'blockquote'\n },\n {\n text: 'Heading 1',\n value: 'h1'\n },\n {\n text: 'Heading 2',\n value: 'h2'\n },\n {\n text: 'Heading 3',\n value: 'h3'\n },\n {\n text: 'Heading 4',\n value: 'h4'\n },\n {\n text: 'Heading 5',\n value: 'h5'\n },\n {\n text: 'Heading 6',\n value: 'h6'\n }\n ],\n width: 110\n },\n toFormattingItem: function (item) {\n var value = item.value;\n if (!value) {\n return item;\n }\n if (item.tag || item.className) {\n return item;\n }\n var dot = value.indexOf('.');\n if (dot === 0) {\n item.className = value.substring(1);\n } else if (dot == -1) {\n item.tag = value;\n } else {\n item.tag = value.substring(0, dot);\n item.className = value.substring(dot + 1);\n }\n return item;\n },\n command: function (args) {\n var that = this;\n var item = args.value;\n item = this.toFormattingItem(item);\n return new Editor.FormatCommand({\n range: args.range,\n formatter: function () {\n var formatter, tags = (item.tag || item.context || 'span').split(','), format = [{\n tags: tags,\n attr: { className: item.className || '' }\n }];\n if ($.inArray(tags[0], dom.inlineElements) >= 0) {\n formatter = new Editor.GreedyInlineFormatter(format);\n } else {\n formatter = new Editor.GreedyBlockFormatter(format);\n }\n formatter.editor = that.editor;\n return formatter;\n }\n });\n },\n initialize: function (ui, initOptions) {\n var editor = initOptions.editor;\n var options = this.options;\n var toolName = options.name;\n var that = this;\n that.editor = editor;\n ui.width(options.width);\n ui.kendoSelectBox({\n dataTextField: 'text',\n dataValueField: 'value',\n dataSource: options.items || editor.options[toolName],\n title: editor.options.messages[toolName],\n autoSize: true,\n change: function () {\n var dataItem = this.dataItem();\n if (dataItem) {\n Tool.exec(editor, toolName, dataItem.toJSON());\n }\n },\n dataBound: function () {\n var i, items = this.dataSource.data();\n for (i = 0; i < items.length; i++) {\n items[i] = that.toFormattingItem(items[i]);\n }\n },\n highlightFirst: false,\n template: kendo.template('#:data.text#')\n });\n ui.addClass('k-decorated').closest('.k-widget').removeClass('k-' + toolName).find('*').addBack().attr('unselectable', 'on');\n },\n getFormattingValue: function (items, nodes) {\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n var tag = item.tag || item.context || '';\n var className = item.className ? '.' + item.className : '';\n var selector = tag + className;\n var element = $(nodes[0]).closest(selector)[0];\n if (!element) {\n continue;\n }\n if (nodes.length == 1) {\n return item.value;\n }\n for (var n = 1; n < nodes.length; n++) {\n if (!$(nodes[n]).closest(selector)[0]) {\n break;\n } else if (n == nodes.length - 1) {\n return item.value;\n }\n }\n }\n return '';\n },\n update: function (ui, nodes) {\n var selectBox = $(ui).data(this.type);\n if (!selectBox) {\n return;\n }\n var dataSource = selectBox.dataSource, items = dataSource.data(), i, context, ancestor = dom.commonAncestor.apply(null, nodes);\n if (ancestor != dom.closestEditable(ancestor) && this._ancestor == ancestor) {\n return;\n } else {\n this._ancestor = ancestor;\n }\n for (i = 0; i < items.length; i++) {\n context = items[i].context;\n items[i].visible = !context || !!$(ancestor).closest(context).length;\n }\n dataSource.filter([{\n field: 'visible',\n operator: 'eq',\n value: true\n }]);\n DelayedExecutionTool.fn.update.call(this, ui, nodes);\n selectBox.value(this.getFormattingValue(dataSource.view(), nodes));\n selectBox.wrapper.toggleClass('k-state-disabled', !dataSource.view().length);\n },\n destroy: function () {\n this._ancestor = null;\n }\n });\n var CleanFormatCommand = Command.extend({\n exec: function () {\n var range = this.lockRange(true);\n this.tagsToClean = this.options.remove || 'strong,em,span,sup,sub,del,b,i,u,font'.split(',');\n RangeUtils.wrapSelectedElements(range);\n var nodes = RangeUtils.mapAll(range, function (node) {\n return node;\n });\n for (var c = nodes.length - 1; c >= 0; c--) {\n var node = nodes[c];\n if (!this.immutableParent(node)) {\n this.clean(node);\n }\n }\n this.releaseRange(range);\n },\n clean: function (node) {\n if (!node || dom.isMarker(node)) {\n return;\n }\n var name = dom.name(node);\n if (name == 'ul' || name == 'ol') {\n var listFormatter = new Editor.ListFormatter(name);\n var prev = node.previousSibling;\n var next = node.nextSibling;\n listFormatter.unwrap(node);\n for (; prev && prev != next; prev = prev.nextSibling) {\n this.clean(prev);\n }\n } else if (name == 'blockquote') {\n dom.changeTag(node, 'p');\n } else if (node.nodeType == 1 && !dom.insignificant(node)) {\n for (var i = node.childNodes.length - 1; i >= 0; i--) {\n this.clean(node.childNodes[i]);\n }\n node.removeAttribute('style');\n node.removeAttribute('class');\n } else {\n unwrapListItem(node);\n }\n if ($.inArray(name, this.tagsToClean) > -1) {\n dom.unwrap(node);\n }\n },\n immutableParent: function (node) {\n return this.immutables() && Editor.Immutables.immutableParent(node);\n }\n });\n function unwrapListItem(node) {\n var li = dom.closestEditableOfType(node, ['li']);\n if (li) {\n var listFormatter = new Editor.ListFormatter(dom.name(li.parentNode));\n var range = kendo.ui.editor.W3CRange.fromNode(node);\n range.selectNode(li);\n listFormatter.toggle(range);\n }\n }\n $.extend(Editor, {\n FormattingTool: FormattingTool,\n CleanFormatCommand: CleanFormatCommand\n });\n registerTool('formatting', new FormattingTool({\n template: new ToolTemplate({\n template: EditorUtils.dropDownListTemplate,\n title: 'Format'\n })\n }));\n registerTool('cleanFormatting', new Tool({\n command: CleanFormatCommand,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Clean formatting'\n })\n }));\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/toolbar', ['editor/formatting'], f);\n}(function () {\n (function ($, undefined) {\n var kendo = window.kendo;\n var ui = kendo.ui;\n var editorNS = ui.editor;\n var Widget = ui.Widget;\n var extend = $.extend;\n var proxy = $.proxy;\n var keys = kendo.keys;\n var NS = '.kendoEditor';\n var EditorUtils = kendo.ui.editor.EditorUtils;\n var ToolTemplate = kendo.ui.editor.ToolTemplate;\n var Tool = kendo.ui.editor.Tool;\n var outerWidth = kendo._outerWidth;\n var outerHeight = kendo._outerHeight;\n var OVERFLOWANCHOR = 'overflowAnchor';\n var focusable = '.k-tool-group:visible a.k-tool:not(.k-state-disabled),' + '.k-tool.k-overflow-anchor,' + '.k-tool-group:visible .k-widget.k-colorpicker,' + '.k-tool-group:visible .k-selectbox,' + '.k-tool-group:visible .k-dropdown,' + '.k-tool-group:visible .k-combobox .k-input';\n var toolNamesByCssClass = {\n 'k-i-sup-script': 'superscript',\n 'k-i-sub-script': 'subscript',\n 'k-i-align-left': 'justifyLeft',\n 'k-i-align-center': 'justifyCenter',\n 'k-i-align-right': 'justifyRight',\n 'k-i-align-justify': 'justifyFull',\n 'k-i-list-unordered': 'insertUnorderedList',\n 'k-i-list-ordered': 'insertOrderedList',\n 'k-i-login': 'import',\n 'k-i-indent-increase': 'indent',\n 'k-i-indent-decrease': 'outdent',\n 'k-i-link-horizontal': 'createLink',\n 'k-i-unlink-horizontal': 'unlink',\n 'k-i-image': 'insertImage',\n 'k-i-file-add': 'insertFile',\n 'k-i-html': 'viewHtml',\n 'k-i-foreground-color': 'foreColor',\n 'k-i-paint': 'backColor',\n 'k-i-table-insert': 'createTable',\n 'k-i-table-column-insert-left': 'addColumnLeft',\n 'k-i-table-column-insert-right': 'addColumnRight',\n 'k-i-table-row-insert-above': 'addRowAbove',\n 'k-i-table-row-insert-below': 'addRowBelow',\n 'k-i-table-row-delete': 'deleteRow',\n 'k-i-table-column-delete': 'deleteColumn',\n 'k-i-table-properties': 'tableWizard',\n 'k-i-table-wizard': 'tableWizardInsert',\n 'k-i-clear-css': 'cleanFormatting'\n };\n var OverflowAnchorTool = Tool.extend({\n initialize: function (ui, options) {\n ui.attr({ unselectable: 'on' });\n var toolbar = options.editor.toolbar;\n ui.attr('aria-controls', options.editor.element.attr('id')).on('click', $.proxy(function () {\n this.overflowPopup.toggle();\n }, toolbar));\n },\n options: { name: OVERFLOWANCHOR },\n command: $.noop,\n update: $.noop,\n destroy: $.noop\n });\n EditorUtils.registerTool(OVERFLOWANCHOR, new OverflowAnchorTool({\n key: '',\n ctrl: true,\n template: new ToolTemplate({ template: EditorUtils.overflowAnchorTemplate })\n }));\n var Toolbar = Widget.extend({\n init: function (element, options) {\n var that = this;\n options = extend({}, options, { name: 'EditorToolbar' });\n Widget.fn.init.call(that, element, options);\n if (options.popup) {\n that._initPopup();\n }\n if (options.resizable && options.resizable.toolbar) {\n that._resizeHandler = kendo.onResize(function () {\n that.resize();\n });\n that.element.addClass('k-toolbar-resizable');\n }\n },\n events: ['execute'],\n groups: {\n basic: [\n 'bold',\n 'italic',\n 'underline',\n 'strikethrough'\n ],\n scripts: [\n 'subscript',\n 'superscript'\n ],\n alignment: [\n 'justifyLeft',\n 'justifyCenter',\n 'justifyRight',\n 'justifyFull'\n ],\n links: [\n 'insertImage',\n 'insertFile',\n 'createLink',\n 'unlink'\n ],\n lists: [\n 'insertUnorderedList',\n 'insertOrderedList',\n 'indent',\n 'outdent'\n ],\n tables: [\n 'createTable',\n 'addColumnLeft',\n 'addColumnRight',\n 'addRowAbove',\n 'addRowBelow',\n 'deleteRow',\n 'deleteColumn'\n ],\n advanced: [\n 'viewHtml',\n 'cleanFormatting',\n 'print',\n 'pdf',\n 'exportAs',\n 'import'\n ],\n fonts: [\n 'fontName',\n 'fontSize'\n ],\n colors: [\n 'foreColor',\n 'backColor'\n ]\n },\n overflowFlaseTools: [\n 'formatting',\n 'fontName',\n 'fontSize',\n 'foreColor',\n 'backColor',\n 'insertHtml'\n ],\n _initPopup: function () {\n var that = this;\n this.window = $(this.element).wrap('
    ').parent().prepend('').kendoWindow({\n title: false,\n resizable: false,\n draggable: { dragHandle: '.k-editortoolbar-dragHandle' },\n animation: {\n open: { effects: 'fade:in' },\n close: { effects: 'fade:out' }\n },\n minHeight: 42,\n visible: false,\n autoFocus: false,\n actions: [],\n dragend: function () {\n this._moved = true;\n }\n }).on('mousedown', function (e) {\n if (!$(e.target).is('.k-icon')) {\n that.preventPopupHide = true;\n }\n }).on('focusout', function () {\n that.options.editor.element.focusout();\n }).data('kendoWindow');\n },\n _toggleOverflowStyles: function (element, show) {\n element.find('li').toggleClass('k-item k-state-default', show).find('.k-tool:not(.k-state-disabled),.k-overflow-button').toggleClass('k-overflow-button k-button', show);\n },\n _initOverflowPopup: function (ui) {\n var that = this;\n var popupTemplate = '
      ';\n that.overflowPopup = $(popupTemplate).appendTo('body').kendoPopup({\n anchor: ui,\n origin: 'bottom right',\n position: 'top right',\n copyAnchorStyles: false,\n open: function (e) {\n if (this.element.is(':empty')) {\n e.preventDefault();\n }\n that._toggleOverflowStyles(this.element, true);\n ui.attr('aria-expanded', true);\n },\n close: function () {\n ui.attr('aria-expanded', false);\n },\n activate: proxy(that.focusOverflowPopup, that)\n }).data('kendoPopup');\n },\n items: function () {\n var isResizable = this.options.resizable && this.options.resizable.toolbar, popup, result;\n result = this.element.children().find('> *, select');\n if (isResizable) {\n popup = this.overflowPopup;\n result = result.add(popup.element.children().find('> *'));\n }\n return result;\n },\n focused: function () {\n return this.element.find('.k-state-focused').length > 0 || this.preventPopupHide || this.overflowPopup && this.overflowPopup.visible();\n },\n toolById: function (name) {\n var id, tools = this.tools;\n for (id in tools) {\n if (id.toLowerCase() == name) {\n return tools[id];\n }\n }\n },\n toolGroupFor: function (toolName) {\n var i, groups = this.groups;\n if (this.isCustomTool(toolName)) {\n return 'custom';\n }\n for (i in groups) {\n if ($.inArray(toolName, groups[i]) >= 0) {\n return i;\n }\n }\n },\n bindTo: function (editor) {\n var that = this, window = that.window;\n if (that._editor) {\n that._editor.unbind('select', proxy(that.resize, that));\n }\n that._editor = editor;\n if (that.options.resizable && that.options.resizable.toolbar) {\n editor.options.tools.push(OVERFLOWANCHOR);\n }\n that.tools = that.expandTools(editor.options.tools);\n that.render();\n that.element.find('.k-combobox .k-input').keydown(function (e) {\n var combobox = $(this).closest('.k-combobox').data('kendoComboBox'), key = e.keyCode;\n if (key == keys.RIGHT || key == keys.LEFT) {\n combobox.close();\n } else if (key == keys.DOWN) {\n if (!combobox.dropDown.isOpened()) {\n e.stopImmediatePropagation();\n combobox.open();\n }\n }\n });\n that._attachEvents();\n that.items().each(function initializeTool() {\n var toolName = that._toolName(this), tool = toolName !== 'moreVertical' ? that.tools[toolName] : that.tools.overflowAnchor, options = tool && tool.options, messages = editor.options.messages, description = options && options.tooltip || messages[toolName], ui = $(this);\n if (!tool || !tool.initialize) {\n return;\n }\n if (toolName == 'fontSize' || toolName == 'fontName') {\n var inheritText = messages[toolName + 'Inherit'];\n ui.find('input').val(inheritText).end().find('span.k-input').text(inheritText).end();\n }\n tool.initialize(ui, {\n title: that._appendShortcutSequence(description, tool),\n editor: that._editor\n });\n ui.closest('.k-widget', that.element).addClass('k-editor-widget');\n ui.closest('.k-colorpicker', that.element).next('.k-colorpicker').addClass('k-editor-widget');\n });\n editor.bind('select', proxy(that.resize, that));\n that.update();\n if (window) {\n window.wrapper.css({\n top: '',\n left: '',\n width: ''\n });\n }\n },\n show: function () {\n var that = this, window = that.window, editorOptions = that.options.editor, wrapper, editorElement, editorOffset, browser = kendo.support.browser;\n if (window) {\n wrapper = window.wrapper;\n editorElement = editorOptions.element;\n if (!wrapper.is(':visible') || !that.window.options.visible) {\n if (!wrapper[0].style.width) {\n wrapper.width(outerWidth(editorElement) - parseInt(wrapper.css('border-left-width'), 10) - parseInt(wrapper.css('border-right-width'), 10));\n }\n if (!window._moved) {\n editorOffset = editorElement.offset();\n wrapper.css({\n top: Math.max(0, parseInt(editorOffset.top, 10) - outerHeight(wrapper) - parseInt(that.window.element.css('padding-bottom'), 10)),\n left: Math.max(0, parseInt(editorOffset.left, 10))\n });\n }\n if ((browser.msie || browser.edge) && that._overlaps(editorElement)) {\n setTimeout(function () {\n window.open();\n }, 0);\n } else {\n window.open();\n }\n }\n }\n },\n _overlaps: function (box) {\n var toolbarWrapper = this.window.wrapper, toolbarWrapperOffset = toolbarWrapper.offset(), toolbarWrapperLeft = toolbarWrapperOffset.left, toolbarWrapperTop = toolbarWrapperOffset.top, boxOffset = box.offset(), boxOffsetLeft = boxOffset.left, boxOffsetTop = boxOffset.top;\n return !(boxOffsetLeft + box.width() < toolbarWrapperLeft || boxOffsetLeft > toolbarWrapperLeft + toolbarWrapper.width() || boxOffsetTop + box.height() < toolbarWrapperTop || boxOffsetTop > toolbarWrapperTop + toolbarWrapper.height());\n },\n hide: function () {\n if (this.window) {\n this.window.close();\n }\n },\n focus: function () {\n var TABINDEX = 'tabIndex';\n var element = this.element;\n var tabIndex = this._editor.element.attr(TABINDEX);\n element.attr(TABINDEX, tabIndex || 0).focus().find(focusable).first().focus();\n if (!tabIndex && tabIndex !== 0) {\n element.removeAttr(TABINDEX);\n }\n },\n focusOverflowPopup: function () {\n var TABINDEX = 'tabIndex';\n var element = this.overflowPopup.element;\n var tabIndex = this._editor.element.attr(TABINDEX);\n element.closest('.k-animation-container').addClass('k-overflow-wrapper');\n element.attr(TABINDEX, tabIndex || 0).find(focusable).first().focus();\n if (!tabIndex && tabIndex !== 0) {\n element.removeAttr(TABINDEX);\n }\n },\n _appendShortcutSequence: function (localizedText, tool) {\n if (!tool.key) {\n return localizedText;\n }\n var res = localizedText + ' (';\n if (tool.ctrl) {\n res += 'Ctrl + ';\n }\n if (tool.shift) {\n res += 'Shift + ';\n }\n if (tool.alt) {\n res += 'Alt + ';\n }\n res += tool.key + ')';\n return res;\n },\n _nativeTools: [\n 'insertLineBreak',\n 'insertParagraph',\n 'redo',\n 'undo',\n 'autoLink'\n ],\n tools: {},\n isCustomTool: function (toolName) {\n return !(toolName in kendo.ui.Editor.defaultTools);\n },\n expandTools: function (tools) {\n var currentTool, i, nativeTools = this._nativeTools, options, defaultTools = kendo.deepExtend({}, kendo.ui.Editor.defaultTools), result = {}, name;\n for (i = 0; i < tools.length; i++) {\n currentTool = tools[i];\n name = currentTool.name;\n if ($.isPlainObject(currentTool)) {\n if (name && defaultTools[name]) {\n result[name] = extend({}, defaultTools[name]);\n extend(result[name].options, currentTool);\n } else {\n options = extend({\n cssClass: 'k-i-gear',\n type: 'button',\n title: ''\n }, currentTool);\n if (!options.name) {\n options.name = 'custom';\n }\n options.cssClass = 'k-' + options.name;\n if (!options.template && options.type == 'button') {\n options.template = editorNS.EditorUtils.buttonTemplate;\n options.title = options.title || options.tooltip;\n }\n result[name] = { options: options };\n }\n } else if (defaultTools[currentTool]) {\n result[currentTool] = defaultTools[currentTool];\n }\n }\n for (i = 0; i < nativeTools.length; i++) {\n if (!result[nativeTools[i]]) {\n result[nativeTools[i]] = defaultTools[nativeTools[i]];\n }\n }\n return result;\n },\n render: function () {\n var that = this, tools = that.tools, options, template, toolElement, toolName, editorElement = that._editor.element, element = that.element.empty(), groupName, newGroupName, toolConfig = that._editor.options.tools, browser = kendo.support.browser, group, i, groupPosition = 0, resizable = that.options.resizable && that.options.resizable.toolbar, overflowFlaseTools = this.overflowFlaseTools;\n function stringify(template) {\n var result;\n if (template.getHtml) {\n result = template.getHtml();\n } else {\n if (!$.isFunction(template)) {\n template = kendo.template(template);\n }\n result = template(options);\n }\n return $.trim(result);\n }\n function endGroup() {\n if (group.children().length) {\n if (resizable) {\n group.data('position', groupPosition);\n groupPosition++;\n }\n group.appendTo(element);\n }\n }\n function startGroup(toolName) {\n if (toolName !== OVERFLOWANCHOR) {\n group = $('
    • ');\n group.data('overflow', $.inArray(toolName, overflowFlaseTools) === -1 ? true : false);\n } else {\n group = $('
    • ');\n }\n }\n element.empty();\n if (toolConfig.length) {\n toolName = toolConfig[0].name || toolConfig[0];\n }\n startGroup(toolName, overflowFlaseTools);\n for (i = 0; i < toolConfig.length; i++) {\n toolName = toolConfig[i].name || toolConfig[i];\n options = tools[toolName] && tools[toolName].options;\n if (!options && $.isPlainObject(toolName)) {\n options = toolName;\n }\n template = options && options.template;\n if (toolName == 'break') {\n endGroup();\n $('
    • ').appendTo(that.element);\n startGroup(toolName, overflowFlaseTools);\n }\n if (!template) {\n continue;\n }\n newGroupName = that.toolGroupFor(toolName);\n if (groupName != newGroupName || toolName == OVERFLOWANCHOR) {\n endGroup();\n startGroup(toolName, overflowFlaseTools);\n groupName = newGroupName;\n }\n if (toolName == OVERFLOWANCHOR) {\n template.options.title = that.options.messages.overflowAnchor;\n }\n template = stringify(template);\n toolElement = $(template).appendTo(group);\n if (newGroupName == 'custom') {\n endGroup();\n startGroup(toolName, overflowFlaseTools);\n }\n if (options.exec && toolElement.hasClass('k-tool')) {\n toolElement.click(proxy(options.exec, editorElement[0]));\n }\n }\n endGroup();\n $(that.element).children(':has(> .k-tool)').addClass('k-button-group');\n if (that.options.popup && browser.msie && browser.version < 9) {\n that.window.wrapper.find('*').attr('unselectable', 'on');\n }\n that.updateGroups();\n if (resizable) {\n that._initOverflowPopup(that.element.find('.k-overflow-anchor'));\n }\n that.angular('compile', function () {\n return { elements: that.element };\n });\n },\n updateGroups: function () {\n $(this.element).children().each(function () {\n $(this).children().filter(function () {\n return !$(this).hasClass('k-state-disabled');\n }).removeClass('k-group-end').first().addClass('k-group-start').end().last().addClass('k-group-end').end();\n });\n },\n decorateFrom: function (body) {\n this.items().filter('.k-decorated').each(function () {\n var selectBox = $(this).data('kendoSelectBox');\n if (selectBox) {\n selectBox.decorate(body);\n }\n });\n },\n destroy: function () {\n Widget.fn.destroy.call(this);\n var id, tools = this.tools;\n for (id in tools) {\n if (tools[id].destroy) {\n tools[id].destroy();\n }\n }\n if (this.window) {\n this.window.destroy();\n }\n if (this._resizeHandler) {\n kendo.unbindResize(this._resizeHandler);\n }\n if (this.overflowPopup) {\n this.overflowPopup.destroy();\n }\n },\n _attachEvents: function () {\n var that = this, popupElement = that.overflowPopup ? that.overflowPopup.element : $([]);\n that.attachToolsEvents(that.element.add(popupElement));\n },\n attachToolsEvents: function (element) {\n var that = this, buttons = '[role=button].k-tool', enabledButtons = buttons + ':not(.k-state-disabled)', disabledButtons = buttons + '.k-state-disabled', dropdown = '.k-dropdown', colorpicker = '.k-colorpicker', editorTools = [\n buttons,\n dropdown,\n colorpicker\n ].join(',');\n element.off(NS).on('mouseenter' + NS, enabledButtons, function () {\n $(this).addClass('k-state-hover');\n }).on('mouseleave' + NS, enabledButtons, function () {\n $(this).removeClass('k-state-hover');\n }).on('mousedown' + NS, editorTools, function (e) {\n e.preventDefault();\n }).on('keydown' + NS, focusable, function (e) {\n var current = this;\n var resizable = that.options.resizable && that.options.resizable.toolbar;\n var focusElement, currentContainer, keyCode = e.keyCode;\n function move(direction, container, constrain) {\n var tools = container.find(focusable);\n var index = tools.index(current) + direction;\n if (constrain) {\n index = Math.max(0, Math.min(tools.length - 1, index));\n }\n return tools[index];\n }\n if (keyCode == keys.RIGHT || keyCode == keys.LEFT) {\n if (!$(current).hasClass('.k-dropdown')) {\n focusElement = move(keyCode == keys.RIGHT ? 1 : -1, that.element, true);\n }\n } else if (resizable && (keyCode == keys.UP || keyCode == keys.DOWN)) {\n focusElement = move(keyCode == keys.DOWN ? 1 : -1, that.overflowPopup.element, true);\n } else if (keyCode == keys.ESC) {\n if (that.overflowPopup && that.overflowPopup.visible()) {\n that.overflowPopup.close();\n }\n focusElement = that._editor;\n } else if (keyCode == keys.TAB && !(e.ctrlKey || e.altKey)) {\n if (resizable) {\n currentContainer = $(current.parentElement).hasClass('k-overflow-tool-group') ? that.overflowPopup.element : that.element;\n } else {\n currentContainer = that.element;\n }\n if (e.shiftKey) {\n focusElement = move(-1, currentContainer);\n } else {\n focusElement = move(1, currentContainer);\n if (!focusElement) {\n focusElement = that._editor;\n }\n }\n }\n if (focusElement) {\n e.preventDefault();\n focusElement.focus();\n }\n if (keyCode === keys.ENTER && $(current).is('a') && !$(current).attr('href')) {\n that._executeToolCommand(current, e);\n }\n }).on('click' + NS, enabledButtons, function (e) {\n that._executeToolCommand(this, e);\n }).on('click' + NS, disabledButtons, function (e) {\n e.preventDefault();\n });\n },\n _executeToolCommand: function (toolElement, e) {\n var that = this;\n var button = $(toolElement);\n e.preventDefault();\n e.stopPropagation();\n button.removeClass('k-state-hover');\n if (!button.is('[data-popup]')) {\n that._editor.exec(that._toolName(toolElement));\n }\n },\n _toolName: function (element) {\n if (!element) {\n return;\n }\n var className = element.className;\n if (/k-tool\\b/i.test(className)) {\n className = element.firstChild.className;\n }\n var tool = $.grep(className.split(' '), function (x) {\n return !/^k-(widget|tool|tool-icon|icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(x);\n });\n if (tool[0]) {\n var toolname = tool[0];\n if (toolNamesByCssClass[toolname]) {\n toolname = toolNamesByCssClass[toolname];\n }\n if (toolname.indexOf('k-i-') >= 0) {\n return kendo.toCamelCase(toolname.substring(toolname.indexOf('k-i-') + 4));\n } else {\n return toolname.substring(toolname.lastIndexOf('-') + 1);\n }\n }\n return 'custom';\n },\n refreshTools: function () {\n var that = this, editorNS = kendo.ui.editor, editor = that._editor, range = editor.getRange(), nodes = editorNS.RangeUtils.textNodes(range), immutables = editor.options.immutables, immutablesContext = that._immutablesContext(range);\n nodes = editorNS.Dom.filterBy(nodes, editorNS.Dom.htmlIndentSpace, true);\n if (!nodes.length) {\n nodes = [range.startContainer];\n }\n that.items().each(function () {\n var tool = that.tools[that._toolName(this)];\n if (tool) {\n var ui = $(this);\n if (tool.update) {\n tool.update(ui, nodes);\n }\n if (immutables) {\n that._updateImmutablesState(tool, ui, immutablesContext);\n }\n }\n });\n this.update();\n },\n _immutablesContext: function (range) {\n if (this._editor.options.immutables) {\n var editorNS = kendo.ui.editor;\n if (range.collapsed) {\n return editorNS.Immutables.immutablesContext(range);\n } else {\n return editorNS.RangeUtils.editableTextNodes(range).length === 0;\n }\n }\n },\n _updateImmutablesState: function (tool, ui, immutablesContext) {\n var name = tool.name;\n var uiElement = ui;\n var trackImmutables = tool.options.trackImmutables;\n if (trackImmutables === undefined) {\n trackImmutables = $.inArray(name, editorNS.Immutables.toolsToBeUpdated) > -1;\n }\n if (trackImmutables) {\n var display = immutablesContext ? 'none' : '';\n if (!ui.is('.k-tool')) {\n var uiData = ui.data();\n for (var key in uiData) {\n if (key.match(/^kendo[A-Z][a-zA-Z]*/)) {\n var widget = uiData[key];\n uiElement = widget.wrapper;\n break;\n }\n }\n }\n uiElement.css('display', display);\n var groupUi = uiElement.closest('li');\n if (groupUi.children(':visible').length === 0) {\n groupUi.css('display', display);\n }\n }\n },\n update: function () {\n this.updateGroups();\n },\n _resize: function (e) {\n var containerWidth = e.width;\n var resizable = this.options.resizable && this.options.resizable.toolbar;\n var popup = this.overflowPopup;\n this.refreshTools();\n if (!resizable) {\n return;\n }\n if (popup.visible()) {\n popup.close(true);\n }\n this._refreshWidths();\n this._shrink(containerWidth);\n this._stretch(containerWidth);\n this._toggleOverflowStyles(this.element, false);\n this._toggleOverflowStyles(this.overflowPopup.element, true);\n this.element.children('li.k-overflow-tools').css('visibility', popup.element.is(':empty') ? 'hidden' : 'visible');\n },\n _refreshWidths: function () {\n this.element.children('li').each(function (idx, element) {\n var group = $(element);\n group.data('outerWidth', outerWidth(group, true));\n });\n },\n _shrink: function (width) {\n var group, visibleGroups;\n if (width < this._groupsWidth()) {\n visibleGroups = this._visibleGroups().filter(':not(.k-overflow-tools)');\n for (var i = visibleGroups.length - 1; i >= 0; i--) {\n group = visibleGroups.eq(i);\n if (width > this._groupsWidth()) {\n break;\n } else {\n this._hideGroup(group);\n }\n }\n }\n },\n _stretch: function (width) {\n var group, hiddenGroups;\n if (width > this._groupsWidth()) {\n hiddenGroups = this._hiddenGroups();\n for (var i = 0; i < hiddenGroups.length; i++) {\n group = hiddenGroups.eq(i);\n if (width < this._groupsWidth() || !this._showGroup(group, width)) {\n break;\n }\n }\n }\n },\n _hiddenGroups: function () {\n var popup = this.overflowPopup;\n var hiddenGroups = this.element.children('li.k-tool-group').filter(':hidden');\n hiddenGroups = hiddenGroups.add(popup.element.children('li'));\n hiddenGroups.sort(function (a, b) {\n return $(a).data('position') > $(b).data('position') ? 1 : -1;\n });\n return hiddenGroups;\n },\n _visibleGroups: function () {\n return this.element.children('li.k-tool-group, li.k-overflow-tools').filter(':visible');\n },\n _groupsWidth: function () {\n var width = 0;\n this._visibleGroups().each(function () {\n width += $(this).data('outerWidth');\n });\n return Math.ceil(width);\n },\n _hideGroup: function (group) {\n if (group.data('overflow')) {\n var popup = this.overflowPopup;\n group.detach().prependTo(popup.element).addClass('k-overflow-tool-group');\n } else {\n group.hide();\n }\n },\n _showGroup: function (group, width) {\n var position, previous;\n if (group.length && width > this._groupsWidth() + group.data('outerWidth')) {\n if (group.hasClass('k-overflow-tool-group')) {\n position = group.data('position');\n if (position === 0) {\n group.detach().prependTo(this.element);\n } else {\n previous = this.element.children().filter(function (idx, element) {\n return $(element).data('position') === position - 1;\n });\n group.detach().insertAfter(previous);\n }\n group.removeClass('k-overflow-tool-group');\n } else {\n group.show();\n }\n return true;\n }\n return false;\n }\n });\n $.extend(editorNS, { Toolbar: Toolbar });\n }(window.jQuery || window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/tables', ['editor/toolbar'], f);\n}(function () {\n (function ($, undefined) {\n var kendo = window.kendo, extend = $.extend, proxy = $.proxy, Editor = kendo.ui.editor, dom = Editor.Dom, EditorUtils = Editor.EditorUtils, RangeUtils = Editor.RangeUtils, Command = Editor.Command, NS = 'kendoEditor', ACTIVESTATE = 'k-state-active', SELECTEDSTATE = 'k-state-selected', Tool = Editor.Tool, ToolTemplate = Editor.ToolTemplate, InsertHtmlCommand = Editor.InsertHtmlCommand, BlockFormatFinder = Editor.BlockFormatFinder, registerTool = Editor.EditorUtils.registerTool, getTouches = kendo.getTouches;\n var template = kendo.template;\n var columnTemplate = '#=content#';\n var tableFormatFinder = new BlockFormatFinder([{ tags: ['table'] }]);\n var TableCommand = InsertHtmlCommand.extend({\n init: function (options) {\n var o = $.extend({\n postProcess: this.postProcess,\n skipCleaners: true\n }, options || {});\n InsertHtmlCommand.fn.init.call(this, o);\n },\n _tableHtml: function (rows, columns) {\n rows = rows || 1;\n columns = columns || 1;\n var columnHtml = template(columnTemplate)({\n width: 100 / columns,\n content: Editor.emptyTableCellContent\n });\n var rowHeight = 100 / rows;\n return '' + new Array(rows + 1).join('' + new Array(columns + 1).join(columnHtml) + '') + '
      ';\n },\n postProcess: function (editor, range) {\n var insertedTable = $('table[data-last]', editor.document).removeAttr('data-last');\n range.setStart(insertedTable.find('td')[0], 0);\n range.collapse(true);\n editor.selectRange(range);\n },\n exec: function () {\n var options = this.options;\n options.html = this._tableHtml(options.rows, options.columns);\n InsertHtmlCommand.fn.exec.call(this);\n }\n });\n var PopupTool = Tool.extend({\n initialize: function (ui, options) {\n Tool.fn.initialize.call(this, ui, options);\n var popup = $(this.options.popupTemplate).appendTo('body').kendoPopup({\n anchor: ui,\n copyAnchorStyles: false,\n open: proxy(this._open, this),\n activate: proxy(this._activate, this),\n close: proxy(this._close, this)\n }).data('kendoPopup');\n ui.click(proxy(this._toggle, this)).keydown(proxy(this._keydown, this));\n var editor = this._editor = options.editor;\n this._popup = popup;\n var tableWizard = new Editor.TableWizardTool({\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: editor.options.messages.tableWizard\n }),\n command: Editor.TableWizardCommand,\n insertNewTable: true\n });\n registerTool('tableWizardInsert', tableWizard);\n var twTool = $('
      ' + tableWizard.options.template.getHtml() + '
      ');\n twTool.appendTo(popup.element);\n if (editor.toolbar) {\n editor.toolbar.attachToolsEvents(twTool);\n }\n },\n popup: function () {\n return this._popup;\n },\n _activate: $.noop,\n _open: function () {\n this._popup.options.anchor.addClass(ACTIVESTATE);\n },\n _close: function () {\n this._popup.options.anchor.removeClass(ACTIVESTATE);\n },\n _keydown: function (e) {\n var keys = kendo.keys;\n var key = e.keyCode;\n if (key == keys.DOWN && e.altKey) {\n this._popup.open();\n } else if (key == keys.ESC) {\n this._popup.close();\n }\n },\n _toggle: function (e) {\n var button = $(e.target).closest('.k-tool');\n if (!button.hasClass('k-state-disabled')) {\n this.popup().toggle();\n }\n },\n update: function (ui) {\n var popup = this.popup();\n if (popup.wrapper && popup.wrapper.css('display') == 'block') {\n popup.close();\n }\n ui.removeClass('k-state-hover');\n },\n destroy: function () {\n this._popup.destroy();\n }\n });\n var InsertTableTool = PopupTool.extend({\n init: function (options) {\n this.cols = 8;\n this.rows = 6;\n PopupTool.fn.init.call(this, $.extend(options, {\n command: TableCommand,\n popupTemplate: '
      ' + new Array(this.cols * this.rows + 1).join('') + '
      ' + '
      '\n }));\n },\n _activate: function () {\n var that = this, element = that._popup.element, cells = element.find('.k-ct-cell'), firstCell = cells.eq(0), lastCell = cells.eq(cells.length - 1), start = kendo.getOffset(firstCell), end = kendo.getOffset(lastCell), cols = that.cols, rows = that.rows, cellWidth, cellHeight;\n element.find('*').addBack().attr('unselectable', 'on');\n end.left += lastCell[0].offsetWidth;\n end.top += lastCell[0].offsetHeight;\n cellWidth = (end.left - start.left) / cols;\n cellHeight = (end.top - start.top) / rows;\n function tableFromLocation(e) {\n var w = $(window);\n return {\n row: Math.floor((e.clientY + w.scrollTop() - start.top) / cellHeight) + 1,\n col: Math.floor((e.clientX + w.scrollLeft() - start.left) / cellWidth) + 1\n };\n }\n element.autoApplyNS(NS).on('mousemove', function (e) {\n that._setTableSize(tableFromLocation(e));\n }).on('mouseleave', function () {\n that._setTableSize();\n }).on('down', function (e) {\n e.preventDefault();\n var touch = getTouches(e)[0];\n that._exec(tableFromLocation(touch.location));\n });\n },\n _valid: function (size) {\n return size && size.row > 0 && size.col > 0 && size.row <= this.rows && size.col <= this.cols;\n },\n _exec: function (size) {\n if (this._valid(size)) {\n this._editor.exec('createTable', {\n rows: size.row,\n columns: size.col\n });\n this._popup.close();\n }\n },\n _setTableSize: function (size) {\n var element = this._popup.element;\n var status = element.find('.k-status');\n var cells = element.find('.k-ct-cell');\n var cols = this.cols;\n var messages = this._editor.options.messages;\n if (this._valid(size)) {\n status.text(kendo.format(messages.createTableHint, size.row, size.col));\n cells.each(function (i) {\n $(this).toggleClass(SELECTEDSTATE, i % cols < size.col && i / cols < size.row);\n });\n } else {\n status.text(messages.createTable);\n cells.removeClass(SELECTEDSTATE);\n }\n },\n _keydown: function (e) {\n PopupTool.fn._keydown.call(this, e);\n if (!this._popup.visible()) {\n return;\n }\n var keys = kendo.keys;\n var key = e.keyCode;\n var cells = this._popup.element.find('.k-ct-cell');\n var focus = Math.max(cells.filter('.k-state-selected').last().index(), 0);\n var selectedRows = Math.floor(focus / this.cols);\n var selectedColumns = focus % this.cols;\n var changed = false;\n if (key == keys.DOWN && !e.altKey) {\n changed = true;\n selectedRows++;\n } else if (key == keys.UP) {\n changed = true;\n selectedRows--;\n } else if (key == keys.RIGHT) {\n changed = true;\n selectedColumns++;\n } else if (key == keys.LEFT) {\n changed = true;\n selectedColumns--;\n }\n var tableSize = {\n row: Math.max(1, Math.min(this.rows, selectedRows + 1)),\n col: Math.max(1, Math.min(this.cols, selectedColumns + 1))\n };\n if (key == keys.ENTER) {\n this._exec(tableSize);\n } else {\n this._setTableSize(tableSize);\n }\n if (changed) {\n e.preventDefault();\n e.stopImmediatePropagation();\n }\n },\n _open: function () {\n var messages = this._editor.options.messages;\n PopupTool.fn._open.call(this);\n this.popup().element.find('.k-status').text(messages.createTable).end().find('.k-ct-cell').removeClass(SELECTEDSTATE);\n },\n _close: function () {\n PopupTool.fn._close.call(this);\n this.popup().element.off('.' + NS);\n }\n });\n var InsertRowCommand = Command.extend({\n exec: function () {\n var range = this.lockRange(true), td = range.endContainer, cellCount, row, newRow;\n while (dom.name(td) != 'td') {\n td = td.parentNode;\n }\n if (this.immutables() && Editor.Immutables.immutableParent(td)) {\n return;\n }\n row = td.parentNode;\n cellCount = row.children.length;\n newRow = row.cloneNode(true);\n for (var i = 0; i < row.cells.length; i++) {\n newRow.cells[i].innerHTML = Editor.emptyTableCellContent;\n }\n if (this.options.position == 'before') {\n dom.insertBefore(newRow, row);\n } else {\n dom.insertAfter(newRow, row);\n }\n this.releaseRange(range);\n }\n });\n var InsertColumnCommand = Command.extend({\n exec: function () {\n var range = this.lockRange(true), td = dom.closest(range.endContainer, 'td'), table = dom.closest(td, 'table'), columnIndex, i, rows = table.rows, cell, newCell, position = this.options.position;\n if (this.immutables() && Editor.Immutables.immutableParent(td)) {\n return;\n }\n columnIndex = dom.findNodeIndex(td, true);\n for (i = 0; i < rows.length; i++) {\n cell = rows[i].cells[columnIndex];\n newCell = cell.cloneNode();\n newCell.innerHTML = Editor.emptyTableCellContent;\n if (position == 'before') {\n dom.insertBefore(newCell, cell);\n } else {\n dom.insertAfter(newCell, cell);\n }\n }\n this.releaseRange(range);\n }\n });\n var DeleteRowCommand = Command.extend({\n exec: function () {\n var range = this.lockRange();\n var rows = RangeUtils.mapAll(range, function (node) {\n return $(node).closest('tr')[0];\n });\n var row = rows[0];\n if (this.immutables() && Editor.Immutables.immutableParent(row)) {\n return;\n }\n var table = dom.closest(row, 'table');\n var focusElement;\n if (table.rows.length <= rows.length) {\n focusElement = dom.next(table);\n if (!focusElement || dom.insignificant(focusElement)) {\n focusElement = dom.prev(table);\n }\n dom.remove(table);\n } else {\n for (var i = 0; i < rows.length; i++) {\n row = rows[i];\n dom.removeTextSiblings(row);\n focusElement = dom.next(row) || dom.prev(row);\n focusElement = focusElement.cells[0];\n dom.remove(row);\n }\n }\n if (focusElement) {\n range.setStart(focusElement, 0);\n range.collapse(true);\n this.editor.selectRange(range);\n }\n }\n });\n var DeleteColumnCommand = Command.extend({\n exec: function () {\n var range = this.lockRange(), td = dom.closest(range.endContainer, 'td'), table = dom.closest(td, 'table'), rows = table.rows, columnIndex = dom.findNodeIndex(td, true), columnCount = rows[0].cells.length, focusElement, i;\n if (this.immutables() && Editor.Immutables.immutableParent(td)) {\n return;\n }\n if (columnCount == 1) {\n focusElement = dom.next(table);\n if (!focusElement || dom.insignificant(focusElement)) {\n focusElement = dom.prev(table);\n }\n dom.remove(table);\n } else {\n dom.removeTextSiblings(td);\n focusElement = dom.next(td) || dom.prev(td);\n for (i = 0; i < rows.length; i++) {\n dom.remove(rows[i].cells[columnIndex]);\n }\n }\n if (focusElement) {\n range.setStart(focusElement, 0);\n range.collapse(true);\n this.editor.selectRange(range);\n }\n }\n });\n var TableModificationTool = Tool.extend({\n command: function (options) {\n options = extend(options, this.options);\n if (options.action == 'delete') {\n if (options.type == 'row') {\n return new DeleteRowCommand(options);\n } else {\n return new DeleteColumnCommand(options);\n }\n } else {\n if (options.type == 'row') {\n return new InsertRowCommand(options);\n } else {\n return new InsertColumnCommand(options);\n }\n }\n },\n initialize: function (ui, options) {\n Tool.fn.initialize.call(this, ui, options);\n ui.addClass('k-state-disabled');\n },\n update: function (ui, nodes) {\n var isFormatted = !tableFormatFinder.isFormatted(nodes);\n ui.toggleClass('k-state-disabled', isFormatted);\n }\n });\n extend(kendo.ui.editor, {\n PopupTool: PopupTool,\n TableCommand: TableCommand,\n InsertTableTool: InsertTableTool,\n TableModificationTool: TableModificationTool,\n InsertRowCommand: InsertRowCommand,\n InsertColumnCommand: InsertColumnCommand,\n DeleteRowCommand: DeleteRowCommand,\n DeleteColumnCommand: DeleteColumnCommand\n });\n registerTool('createTable', new InsertTableTool({\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n popup: true,\n title: 'Create table'\n })\n }));\n registerTool('addColumnLeft', new TableModificationTool({\n type: 'column',\n position: 'before',\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Add column on the left'\n })\n }));\n registerTool('addColumnRight', new TableModificationTool({\n type: 'column',\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Add column on the right'\n })\n }));\n registerTool('addRowAbove', new TableModificationTool({\n type: 'row',\n position: 'before',\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Add row above'\n })\n }));\n registerTool('addRowBelow', new TableModificationTool({\n type: 'row',\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Add row below'\n })\n }));\n registerTool('deleteRow', new TableModificationTool({\n type: 'row',\n action: 'delete',\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Delete row'\n })\n }));\n registerTool('deleteColumn', new TableModificationTool({\n type: 'column',\n action: 'delete',\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Delete column'\n })\n }));\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/export', ['editor/main'], f);\n}(function () {\n (function ($, undefined) {\n var kendo = window.kendo, extend = $.extend, proxy = $.proxy, Editor = kendo.ui.editor, EditorUtils = Editor.EditorUtils, Command = Editor.Command, Tool = Editor.Tool, registerTool = EditorUtils.registerTool, ToolTemplate = Editor.ToolTemplate, defaultExportAsItems = [\n {\n text: 'Docx',\n value: 'docx'\n },\n {\n text: 'Rtf',\n value: 'rtf'\n },\n {\n text: 'Pdf',\n value: 'pdf'\n },\n {\n text: 'Html',\n value: 'html'\n },\n {\n text: 'Plain Text',\n value: 'txt'\n }\n ];\n var ExportAsCommand = Command.extend({\n init: function (options) {\n var cmd = this;\n cmd.options = options;\n Command.fn.init.call(cmd, options);\n cmd.attributes = null;\n cmd.exportType = options.exportType;\n },\n exec: function () {\n var cmd = this;\n var range = this.lockRange(true);\n cmd.postToProxy();\n cmd.releaseRange(range);\n },\n postToProxy: function () {\n this.generateForm().appendTo('body').submit().remove();\n },\n generateForm: function () {\n var cmd = this;\n var exportAsOptions = cmd.editor.options.exportAs;\n var form = $('
      ').attr({\n action: exportAsOptions && exportAsOptions.proxyURL || '',\n method: 'POST'\n });\n form.append([\n cmd.valueInput(),\n cmd.exportTypeInput(),\n cmd.fileNameInput()\n ]);\n return form;\n },\n valueInput: function () {\n var editor = this.editor;\n return $('').attr({\n value: editor.encodedValue(),\n name: 'value',\n type: 'hidden'\n });\n },\n exportTypeInput: function () {\n var cmd = this;\n return $('').attr({\n value: cmd.exportType,\n name: 'exportType',\n type: 'hidden'\n });\n },\n fileNameInput: function () {\n var editor = this.editor;\n var exportAsOptions = editor.options.exportAs;\n var fileName = exportAsOptions && exportAsOptions.fileName || editor.element.attr('id') || 'editor';\n return $('').attr({\n value: fileName,\n name: 'fileName',\n type: 'hidden'\n });\n }\n });\n var ExportAsTool = Tool.extend({\n init: function (options) {\n var tool = this;\n Tool.fn.init.call(tool, kendo.deepExtend({}, tool.options, options));\n tool.type = 'kendoSelectBox';\n },\n options: {\n items: defaultExportAsItems,\n width: 115\n },\n command: function (args) {\n var value = args.value;\n return new Editor.ExportAsCommand({\n range: args.range,\n exportType: value.exportType\n });\n },\n initialize: function (ui, initOptions) {\n var tool = this;\n var editor = initOptions.editor;\n var options = tool.options;\n var toolName = options.name;\n var changeHandler = proxy(tool.changeHandler, tool);\n var dataSource = options.items || editor.options[toolName];\n dataSource.unshift({\n text: editor.options.messages[toolName],\n value: ''\n });\n tool.editor = editor;\n ui.width(options.width);\n ui.kendoSelectBox({\n dataTextField: 'text',\n dataValueField: 'value',\n dataSource: dataSource,\n autoSize: true,\n change: changeHandler,\n open: function (e) {\n var sender = e.sender;\n sender.items()[0].style.display = 'none';\n sender.unbind('open');\n },\n highlightFirst: false,\n template: kendo.template('#:data.text#')\n });\n ui.addClass('k-decorated').closest('.k-widget').removeClass('k-' + toolName).find('*').addBack().attr('unselectable', 'on');\n },\n changeHandler: function (e) {\n var sender = e.sender;\n var dataItem = sender.dataItem();\n var value = dataItem && dataItem.value;\n this._exec(value);\n sender.value('');\n },\n _exec: function (value) {\n if (value) {\n Tool.exec(this.editor, this.options.name, { exportType: value });\n }\n },\n destroy: function () {\n this._ancestor = null;\n }\n });\n extend(Editor, {\n ExportAsTool: ExportAsTool,\n ExportAsCommand: ExportAsCommand\n });\n registerTool('exportAs', new ExportAsTool({\n template: new ToolTemplate({\n template: EditorUtils.dropDownListTemplate,\n title: 'Export As'\n })\n }));\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/import', ['editor/main'], f);\n}(function () {\n (function ($, undefined) {\n var kendo = window.kendo, extend = $.extend, proxy = $.proxy, Editor = kendo.ui.editor, EditorUtils = Editor.EditorUtils, Command = Editor.Command, Tool = Editor.Tool, registerTool = EditorUtils.registerTool, ToolTemplate = Editor.ToolTemplate, loadingOverlay = '
      ';\n var ImportCommand = Command.extend({\n exec: function () {\n (this.editor._uploadWidget || this._initializeUploadWidget()).element.click();\n },\n _initializeUploadWidget: function () {\n var cmd = this;\n var editor = cmd.editor;\n var importOptions = editor.options['import'];\n var upload = $('').kendoUpload({\n success: proxy(cmd._onUploadSuccess, cmd),\n progress: proxy(cmd._onUploadProgress, cmd),\n select: proxy(cmd._onUploadSelect, cmd),\n error: proxy(cmd._onUploadError, cmd),\n complete: proxy(cmd._onUploadComplete, cmd),\n showFileList: false,\n multiple: false,\n async: {\n saveUrl: importOptions.proxyUrl,\n autoUpload: true,\n saveField: 'file'\n },\n validation: {\n allowedExtensions: importOptions.allowedExtensions,\n maxFileSize: importOptions.maxFileSize\n }\n }).getKendoUpload();\n editor._uploadWidget = upload;\n return upload;\n },\n _onUploadComplete: function (ev) {\n this._trigger('complete', ev);\n ev.sender.clearAllFiles();\n this._removeLoadingOverlay();\n },\n _onUploadSuccess: function (ev) {\n this.editor.value(ev.response.html.replace(/<\\/?body>/gi, ''));\n this._trigger('success', ev);\n },\n _onUploadProgress: function (ev) {\n this._trigger('progress', ev);\n },\n _onUploadSelect: function (ev) {\n this._trigger('select', ev);\n if (!ev.files[0].validationErrors) {\n this._initLoadingOverlay();\n }\n },\n _onUploadError: function (ev) {\n this._trigger('error', ev);\n },\n _trigger: function (eventType, uploadEvent) {\n var editor = this.editor;\n var importOptions = editor.options['import'];\n if (typeof importOptions[eventType] === 'function') {\n importOptions[eventType].call(editor, uploadEvent);\n }\n },\n _initLoadingOverlay: function () {\n var editable = this.editor.body;\n if (Editor.Dom.is(editable, 'body')) {\n this._iframeWrapper = this._container = this.editor.wrapper.find('iframe').parent().css({ position: 'relative' }).append(loadingOverlay);\n } else {\n this._container = $(editable).append(loadingOverlay);\n }\n kendo.ui.progress(this._container, true);\n },\n _removeLoadingOverlay: function () {\n kendo.ui.progress(this._container, false);\n $(this._iframeWrapper).css({ position: '' });\n delete this._container;\n delete this._iframeWrapper;\n }\n });\n extend(Editor, { ImportCommand: ImportCommand });\n registerTool('import', new Tool({\n command: ImportCommand,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Import'\n })\n }));\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/resizing/resizing-utils', ['editor/main'], f);\n}(function () {\n (function (kendo, undefined) {\n var global = window;\n var math = global.Math;\n var min = math.min;\n var max = math.max;\n var parseFloat = global.parseFloat;\n var $ = kendo.jQuery;\n var extend = $.extend;\n var Editor = kendo.ui.editor;\n var PERCENTAGE = '%';\n var PIXEL = 'px';\n var REGEX_NUMBER_IN_PERCENTAGES = /(\\d+)(\\.?)(\\d*)%/;\n var REGEX_NUMBER_IN_PIXELS = /(\\d+)(\\.?)(\\d*)px/;\n var STRING = 'string';\n function constrain(options) {\n var value = options.value;\n var lowerBound = options.min;\n var upperBound = options.max;\n return max(min(parseFloat(value), parseFloat(upperBound)), parseFloat(lowerBound));\n }\n function getScrollBarWidth(element) {\n if (element && !$(element).is('body') && element.scrollHeight > element.clientHeight) {\n return kendo.support.scrollbar();\n }\n return 0;\n }\n function calculatePercentageRatio(value, total) {\n if (inPercentages(value)) {\n return parseFloat(value);\n } else {\n return parseFloat(value) / total * 100;\n }\n }\n function inPercentages(value) {\n return typeof value === STRING && REGEX_NUMBER_IN_PERCENTAGES.test(value);\n }\n function inPixels(value) {\n return typeof value === STRING && REGEX_NUMBER_IN_PIXELS.test(value);\n }\n function toPercentages(value) {\n return parseFloat(value) + PERCENTAGE;\n }\n function toPixels(value) {\n return parseFloat(value) + PIXEL;\n }\n var ResizingUtils = {\n constrain: constrain,\n getScrollBarWidth: getScrollBarWidth,\n calculatePercentageRatio: calculatePercentageRatio,\n inPercentages: inPercentages,\n inPixels: inPixels,\n toPercentages: toPercentages,\n toPixels: toPixels\n };\n extend(Editor, { ResizingUtils: ResizingUtils });\n }(window.kendo));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/resizing/table-element-resizing', [\n 'editor/main',\n 'kendo.resizable',\n 'editor/resizing/resizing-utils'\n ], f);\n}(function () {\n (function (kendo, undefined) {\n var $ = kendo.jQuery;\n var extend = $.extend;\n var noop = $.noop;\n var proxy = $.proxy;\n var Editor = kendo.ui.editor;\n var Class = kendo.Class;\n var KEY_DOWN = 'keydown';\n var MOUSE_DOWN = 'mousedown';\n var MOUSE_ENTER = 'mouseenter';\n var MOUSE_LEAVE = 'mouseleave';\n var MOUSE_MOVE = 'mousemove';\n var MOUSE_UP = 'mouseup';\n var COMMA = ',';\n var DOT = '.';\n var LAST_CHILD = ':last-child';\n var TABLE = 'table';\n var TableElementResizing = Class.extend({\n init: function (element, options) {\n var that = this;\n that.options = extend({}, that.options, options);\n that.options.tags = $.isArray(that.options.tags) ? that.options.tags : [that.options.tags];\n if ($(element).is(TABLE)) {\n that.element = element;\n that._attachEventHandlers();\n }\n },\n destroy: function () {\n var that = this;\n var eventNamespace = that.options.eventNamespace;\n if (that.element) {\n $(that.element).off(eventNamespace);\n that.element = null;\n }\n $(that.options.rootElement).off(KEY_DOWN + eventNamespace);\n that._destroyResizeHandle();\n },\n options: {\n tags: [],\n min: 0,\n rootElement: null,\n eventNamespace: '',\n rtl: false,\n handle: {\n dataAttribute: '',\n height: 0,\n width: 0,\n classNames: {},\n template: ''\n }\n },\n _attachEventHandlers: function () {\n var that = this;\n var options = that.options;\n $(that.element).on(MOUSE_MOVE + options.eventNamespace, options.tags.join(COMMA), proxy(that.detectElementBorderHovering, that));\n },\n resizingInProgress: function () {\n var that = this;\n var resizable = that._resizable;\n if (resizable) {\n return !!resizable.resizing;\n }\n return false;\n },\n resize: noop,\n detectElementBorderHovering: function (e) {\n var that = this;\n var options = that.options;\n var handleOptions = options.handle;\n var tableElement = $(e.currentTarget);\n var resizeHandle = that.resizeHandle;\n var dataAttribute = handleOptions.dataAttribute;\n if (!that.resizingInProgress()) {\n if (!tableElement.is(LAST_CHILD) && that.elementBorderHovered(tableElement, e)) {\n if (resizeHandle) {\n if (resizeHandle.data(dataAttribute) && resizeHandle.data(dataAttribute) !== tableElement[0]) {\n that.showResizeHandle(tableElement, e);\n }\n } else {\n that.showResizeHandle(tableElement, e);\n }\n } else {\n if (resizeHandle) {\n that._destroyResizeHandle();\n }\n }\n }\n },\n elementBorderHovered: noop,\n showResizeHandle: function (tableElement, e) {\n var that = this;\n if (e.buttons !== 0) {\n return;\n }\n that._initResizeHandle();\n that.setResizeHandlePosition(tableElement);\n that.setResizeHandleDimensions();\n that.setResizeHandleDataAttributes(tableElement[0]);\n that._attachResizeHandleEventHandlers();\n that._initResizable(tableElement);\n that._hideResizeMarker();\n that.resizeHandle.show();\n },\n _initResizeHandle: function () {\n var that = this;\n var options = that.options;\n that._destroyResizeHandle();\n that.resizeHandle = $(options.handle.template).appendTo(options.rootElement);\n },\n setResizeHandlePosition: noop,\n setResizeHandleDimensions: noop,\n setResizeHandleDataAttributes: function (tableElement) {\n var that = this;\n that.resizeHandle.data(that.options.handle.dataAttribute, tableElement);\n },\n _attachResizeHandleEventHandlers: function () {\n var that = this;\n var options = that.options;\n var eventNamespace = options.eventNamespace;\n var markerClass = options.handle.classNames.marker;\n var resizeHandle = that.resizeHandle;\n that.resizeHandle.on(MOUSE_DOWN + eventNamespace, function () {\n resizeHandle.find(DOT + markerClass).show();\n }).on(MOUSE_UP + eventNamespace, function () {\n resizeHandle.find(DOT + markerClass).hide();\n });\n },\n _hideResizeMarker: function () {\n var that = this;\n that.resizeHandle.find(DOT + that.options.handle.classNames.marker).hide();\n },\n _destroyResizeHandle: function () {\n var that = this;\n if (that.resizeHandle) {\n that._destroyResizable();\n that.resizeHandle.off(that.options.eventNamespace).remove();\n that.resizeHandle = null;\n }\n },\n _initResizable: function (tableElement) {\n var that = this;\n if (!that.resizeHandle) {\n return;\n }\n that._destroyResizable();\n that._resizable = new kendo.ui.Resizable(tableElement, {\n draggableElement: that.resizeHandle[0],\n start: proxy(that.onResizeStart, that),\n resize: proxy(that.onResize, that),\n resizeend: proxy(that.onResizeEnd, that)\n });\n },\n _destroyResizable: function () {\n var that = this;\n if (that._resizable) {\n that._resizable.destroy();\n that._resizable = null;\n }\n },\n onResizeStart: function () {\n this._disableKeyboard();\n },\n onResize: function (e) {\n this.setResizeHandleDragPosition(e);\n },\n setResizeHandleDragPosition: noop,\n onResizeEnd: function (e) {\n var that = this;\n that.resize(e);\n that._destroyResizeHandle();\n that._enableKeyboard();\n },\n _enableKeyboard: function () {\n var options = this.options;\n $(options.rootElement).off(KEY_DOWN + options.eventNamespace);\n },\n _disableKeyboard: function () {\n var options = this.options;\n $(options.rootElement).on(KEY_DOWN + options.eventNamespace, function (e) {\n e.preventDefault();\n });\n },\n _forceResizing: function (e) {\n var resizable = this._resizable;\n if (resizable && resizable.userEvents) {\n resizable.userEvents._end(e);\n }\n }\n });\n var ResizingFactory = Class.extend({\n create: function (editor, options) {\n var that = this;\n var resizingName = options.name;\n var NS = options.eventNamespace;\n $(editor.body).on(MOUSE_ENTER + NS, TABLE, function (e) {\n var table = e.currentTarget;\n var resizing = editor[resizingName];\n e.stopPropagation();\n if (resizing) {\n if (resizing.element !== table && !resizing.resizingInProgress()) {\n that._destroyResizing(editor, options);\n that._initResizing(editor, table, options);\n }\n } else {\n that._initResizing(editor, table, options);\n }\n }).on(MOUSE_LEAVE + NS, TABLE, function (e) {\n var parentTable;\n var resizing = editor[resizingName];\n e.stopPropagation();\n if (resizing && !resizing.resizingInProgress() && !resizing.resizeHandle) {\n parentTable = $(resizing.element).parents(TABLE)[0];\n if (parentTable) {\n that._destroyResizing(editor, options);\n that._initResizing(editor, parentTable, options);\n }\n }\n }).on(MOUSE_LEAVE + NS, function () {\n var resizing = editor[resizingName];\n if (resizing && !resizing.resizingInProgress()) {\n that._destroyResizing(editor, options);\n }\n }).on(MOUSE_UP + NS, function (e) {\n var resizing = editor[resizingName];\n var parentTable;\n if (resizing && resizing.resizingInProgress()) {\n parentTable = $(e.target).parents(TABLE)[0];\n if (parentTable) {\n resizing._forceResizing(e);\n that._destroyResizing(editor, options);\n that._initResizing(editor, parentTable, options);\n }\n }\n });\n },\n dispose: function (editor, options) {\n $(editor.body).off(options.eventNamespace);\n },\n _initResizing: function (editor, tableElement, options) {\n var resizingName = options.name;\n var resizingType = options.type;\n editor[resizingName] = new resizingType(tableElement, {\n rtl: kendo.support.isRtl(editor.element),\n rootElement: editor.body\n });\n },\n _destroyResizing: function (editor, options) {\n var resizingName = options.name;\n if (editor[resizingName]) {\n editor[resizingName].destroy();\n editor[resizingName] = null;\n }\n }\n });\n ResizingFactory.current = new ResizingFactory();\n TableElementResizing.create = function (editor, options) {\n ResizingFactory.current.create(editor, options);\n };\n TableElementResizing.dispose = function (editor, options) {\n ResizingFactory.current.dispose(editor, options);\n };\n extend(Editor, { TableElementResizing: TableElementResizing });\n }(window.kendo));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/resizing/column-resizing', [\n 'editor/main',\n 'editor/resizing/resizing-utils',\n 'editor/resizing/table-element-resizing'\n ], f);\n}(function () {\n (function (kendo, undefined) {\n var global = window;\n var math = global.Math;\n var abs = math.abs;\n var $ = kendo.jQuery;\n var extend = $.extend;\n var Editor = kendo.ui.editor;\n var TableElementResizing = Editor.TableElementResizing;\n var ResizingUtils = Editor.ResizingUtils;\n var constrain = ResizingUtils.constrain;\n var calculatePercentageRatio = ResizingUtils.calculatePercentageRatio;\n var getScrollBarWidth = ResizingUtils.getScrollBarWidth;\n var inPercentages = ResizingUtils.inPercentages;\n var toPercentages = ResizingUtils.toPercentages;\n var toPixels = ResizingUtils.toPixels;\n var outerWidth = kendo._outerWidth;\n var NS = '.kendoEditorColumnResizing';\n var RESIZE_HANDLE_CLASS = 'k-column-resize-handle';\n var RESIZE_MARKER_CLASS = 'k-column-resize-marker';\n var BODY = 'body';\n var TBODY = 'tbody';\n var TD = 'td';\n var TH = 'th';\n var TR = 'tr';\n var COMMA = ',';\n var WIDTH = 'width';\n var ColumnResizing = TableElementResizing.extend({\n options: {\n tags: [\n TD,\n TH\n ],\n min: 20,\n rootElement: null,\n eventNamespace: NS,\n rtl: false,\n handle: {\n dataAttribute: 'column',\n width: 10,\n height: 0,\n classNames: {\n handle: RESIZE_HANDLE_CLASS,\n marker: RESIZE_MARKER_CLASS\n },\n template: '
      ' + '
      ' + '
      ' + '
      ' + '
      '\n }\n },\n elementBorderHovered: function (column, e) {\n var that = this;\n var options = that.options;\n var handleWidth = options.handle.width;\n var borderOffset = column.offset().left + (options.rtl ? 0 : outerWidth(column));\n var mousePosition = e.clientX + $(column[0].ownerDocument).scrollLeft();\n if (mousePosition > borderOffset - handleWidth && mousePosition < borderOffset + handleWidth) {\n return true;\n } else {\n return false;\n }\n },\n setResizeHandlePosition: function (column) {\n var that = this;\n var tableBody = $(that.element).children(TBODY);\n var options = that.options;\n var rtl = options.rtl;\n var handleWidth = options.handle.width;\n var rootElement = $(options.rootElement);\n var scrollTopOffset = rootElement.is(BODY) ? 0 : rootElement.scrollTop();\n var scrollLeftOffset = rootElement.is(BODY) ? 0 : rootElement.scrollLeft();\n var columnWidthOffset = rtl ? 0 : outerWidth(column);\n var scrollBarWidth = rtl ? getScrollBarWidth(rootElement[0]) : 0;\n that.resizeHandle.css({\n top: tableBody.position().top + scrollTopOffset,\n left: column.position().left + columnWidthOffset + (scrollLeftOffset - scrollBarWidth) - handleWidth / 2,\n position: 'absolute'\n });\n },\n setResizeHandleDimensions: function () {\n var that = this;\n var tableBody = $(that.element).children(TBODY);\n that.resizeHandle.css({\n width: that.options.handle.width,\n height: tableBody.height()\n });\n },\n setResizeHandleDragPosition: function (e) {\n var that = this;\n var column = $($(e.currentTarget).data(that.options.handle.dataAttribute));\n var options = that.options;\n var handleWidth = options.handle ? options.handle.width : 0;\n var min = options.min;\n var rtl = options.rtl;\n var columnWidth = outerWidth(column);\n var columnLeftOffset = column.position().left;\n var adjacentColumnWidth = outerWidth(column.next());\n var resizeHandle = $(that.resizeHandle);\n var rootElement = $(options.rootElement);\n var scrollLeftOffset = rootElement.is(BODY) ? 0 : rootElement.scrollLeft();\n var scrollBarWidth = rtl ? getScrollBarWidth(rootElement[0]) : 0;\n var handleOffset = constrain({\n value: resizeHandle.position().left + (scrollLeftOffset - scrollBarWidth) + e.x.delta,\n min: columnLeftOffset + (scrollLeftOffset - scrollBarWidth) - (rtl ? adjacentColumnWidth : 0) + min,\n max: columnLeftOffset + columnWidth + (scrollLeftOffset - scrollBarWidth) + (rtl ? 0 : adjacentColumnWidth) - handleWidth - min\n });\n resizeHandle.css({ left: handleOffset });\n },\n resize: function (e) {\n var that = this;\n var column = $($(e.currentTarget).data(that.options.handle.dataAttribute));\n var options = that.options;\n var rtlModifier = options.rtl ? -1 : 1;\n var min = options.min;\n var initialDeltaX = rtlModifier * e.x.initialDelta;\n var newWidth;\n var initialAdjacentColumnWidth;\n var initialColumnWidth;\n that._setTableComputedWidth();\n that._setColumnsComputedWidth();\n initialColumnWidth = outerWidth(column);\n initialAdjacentColumnWidth = outerWidth(column.next());\n newWidth = constrain({\n value: initialColumnWidth + initialDeltaX,\n min: min,\n max: initialColumnWidth + initialAdjacentColumnWidth - min\n });\n that._resizeColumn(column[0], newWidth);\n that._resizeTopAndBottomColumns(column[0], newWidth);\n that._resizeAdjacentColumns(column.index(), initialAdjacentColumnWidth, initialColumnWidth, initialColumnWidth - newWidth);\n },\n _setTableComputedWidth: function () {\n var element = this.element;\n if (element.style[WIDTH] === '') {\n element.style[WIDTH] = toPixels(outerWidth($(element)));\n }\n },\n _setColumnsComputedWidth: function () {\n var that = this;\n var tableBody = $(that.element).children(TBODY);\n var tableBodyWidth = outerWidth(tableBody);\n var columns = tableBody.children(TR).children(TD);\n var length = columns.length;\n var currentColumnsWidths = columns.map(function () {\n return outerWidth($(this));\n });\n var i;\n for (i = 0; i < length; i++) {\n if (inPercentages(columns[i].style[WIDTH])) {\n columns[i].style[WIDTH] = toPercentages(calculatePercentageRatio(currentColumnsWidths[i], tableBodyWidth));\n } else {\n columns[i].style[WIDTH] = toPixels(currentColumnsWidths[i]);\n }\n }\n },\n _resizeTopAndBottomColumns: function (column, newWidth) {\n var that = this;\n var columnIndex = $(column).index();\n var topAndBottomColumns = $(that.element).children(TBODY).children(TR).children(that.options.tags.join(COMMA)).filter(function () {\n var cell = this;\n return $(cell).index() === columnIndex && cell !== column;\n });\n var length = topAndBottomColumns.length;\n var i;\n for (i = 0; i < length; i++) {\n that._resizeColumn(topAndBottomColumns[i], newWidth);\n }\n },\n _resizeColumn: function (column, newWidth) {\n if (inPercentages(column.style[WIDTH])) {\n column.style[WIDTH] = toPercentages(calculatePercentageRatio(newWidth, outerWidth($(this.element).children(TBODY))));\n } else {\n column.style[WIDTH] = toPixels(newWidth);\n }\n },\n _resizeAdjacentColumns: function (columnIndex, initialAdjacentColumnWidth, initialColumnWidth, deltaWidth) {\n var that = this;\n var adjacentColumns = $(that.element).children(TBODY).children(TR).children(that.options.tags.join(COMMA)).filter(function () {\n return $(this).index() === columnIndex + 1;\n });\n var length = adjacentColumns.length;\n var i;\n for (i = 0; i < length; i++) {\n that._resizeAdjacentColumn(adjacentColumns[i], initialAdjacentColumnWidth, initialColumnWidth, deltaWidth);\n }\n },\n _resizeAdjacentColumn: function (adjacentColumn, initialAdjacentColumnWidth, initialColumnWidth, deltaWidth) {\n var that = this;\n var min = that.options.min;\n var newWidth;\n newWidth = constrain({\n value: initialAdjacentColumnWidth + deltaWidth,\n min: min,\n max: abs(initialColumnWidth + initialAdjacentColumnWidth - min)\n });\n that._resizeColumn(adjacentColumn, newWidth);\n }\n });\n ColumnResizing.create = function (editor) {\n TableElementResizing.create(editor, {\n name: 'columnResizing',\n type: ColumnResizing,\n eventNamespace: NS\n });\n };\n ColumnResizing.dispose = function (editor) {\n TableElementResizing.dispose(editor, { eventNamespace: NS });\n };\n extend(Editor, { ColumnResizing: ColumnResizing });\n }(window.kendo));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/resizing/row-resizing', [\n 'editor/main',\n 'editor/resizing/resizing-utils',\n 'editor/resizing/table-element-resizing'\n ], f);\n}(function () {\n (function (kendo, undefined) {\n var math = window.Math;\n var abs = math.abs;\n var $ = kendo.jQuery;\n var extend = $.extend;\n var Editor = kendo.ui.editor;\n var TableElementResizing = Editor.TableElementResizing;\n var ResizingUtils = Editor.ResizingUtils;\n var getScrollBarWidth = ResizingUtils.getScrollBarWidth;\n var constrain = ResizingUtils.constrain;\n var calculatePercentageRatio = ResizingUtils.calculatePercentageRatio;\n var inPercentages = ResizingUtils.inPercentages;\n var toPercentages = ResizingUtils.toPercentages;\n var toPixels = ResizingUtils.toPixels;\n var outerHeight = kendo._outerHeight;\n var NS = '.kendoEditorRowResizing';\n var RESIZE_HANDLE_CLASS = 'k-row-resize-handle';\n var RESIZE_HANDLE_MARKER_WRAPPER_CLASS = 'k-row-resize-marker-wrapper';\n var RESIZE_MARKER_CLASS = 'k-row-resize-marker';\n var BODY = 'body';\n var TR = 'tr';\n var TBODY = 'tbody';\n var HEIGHT = 'height';\n var RowResizing = TableElementResizing.extend({\n options: {\n tags: [TR],\n min: 20,\n rootElement: null,\n eventNamespace: NS,\n rtl: false,\n handle: {\n dataAttribute: 'row',\n width: 0,\n height: 10,\n classNames: {\n handle: RESIZE_HANDLE_CLASS,\n marker: RESIZE_MARKER_CLASS\n },\n template: '
      ' + '
      ' + '
      ' + '
      ' + '
      ' + '
      ' + '
      '\n }\n },\n elementBorderHovered: function (tableElement, e) {\n var that = this;\n var handleHeight = that.options.handle[HEIGHT];\n var borderOffset = tableElement.offset().top + outerHeight(tableElement);\n var mousePosition = e.clientY + $(tableElement[0].ownerDocument).scrollTop();\n if (mousePosition > borderOffset - handleHeight && mousePosition < borderOffset + handleHeight) {\n return true;\n } else {\n return false;\n }\n },\n setResizeHandlePosition: function (row) {\n var that = this;\n var options = that.options;\n var handleHeight = options.handle[HEIGHT];\n var rowPosition = row.position();\n var rootElement = $(options.rootElement);\n var scrollTopOffset = rootElement.is(BODY) ? 0 : rootElement.scrollTop();\n var scrollLeftOffset = rootElement.is(BODY) ? 0 : rootElement.scrollLeft();\n var scrollBarWidth = options.rtl ? getScrollBarWidth(rootElement[0]) : 0;\n that.resizeHandle.css({\n top: rowPosition.top + outerHeight(row) + scrollTopOffset - handleHeight / 2,\n left: rowPosition.left + (scrollLeftOffset - scrollBarWidth),\n position: 'absolute'\n });\n },\n setResizeHandleDimensions: function () {\n var that = this;\n that.resizeHandle.css({\n width: $(that.element).children(TBODY).width(),\n height: that.options.handle[HEIGHT]\n });\n },\n setResizeHandleDragPosition: function (e) {\n var that = this;\n var options = that.options;\n var min = options.min;\n var tableBody = $(that.element).children(TBODY);\n var tableBodyTopOffset = tableBody.position().top;\n var resizeHandle = $(that.resizeHandle);\n var row = $(e.currentTarget).data(options.handle.dataAttribute);\n var rootElement = $(options.rootElement);\n var scrollTopOffset = rootElement.is(BODY) ? 0 : rootElement.scrollTop();\n var handleOffset = constrain({\n value: resizeHandle.position().top + scrollTopOffset + e.y.delta,\n min: $(row).position().top + scrollTopOffset + min,\n max: tableBodyTopOffset + outerHeight(tableBody) + scrollTopOffset - options.handle[HEIGHT] - min\n });\n resizeHandle.css({ top: handleOffset });\n },\n resize: function (e) {\n var that = this;\n var options = that.options;\n var row = $(e.currentTarget).data(options.handle.dataAttribute);\n var currentRowHeight = outerHeight($(row));\n var element = $(that.element);\n var initialTableHeight = outerHeight(element);\n var tableBody = element.children(TBODY);\n var tableBodyHeight = tableBody.height();\n var initialStyleHeight = row.style[HEIGHT];\n var newRowHeight = constrain({\n value: currentRowHeight + e.y.initialDelta,\n min: options.min,\n max: abs(tableBodyHeight - options.min)\n });\n that._setRowsHeightInPixels();\n row.style[HEIGHT] = toPixels(newRowHeight);\n that._setTableHeight(initialTableHeight + (newRowHeight - currentRowHeight));\n if (inPercentages(initialStyleHeight)) {\n that._setRowsHeightInPercentages();\n }\n },\n _setRowsHeightInPixels: function () {\n var that = this;\n var rows = $(that.element).children(TBODY).children(TR);\n var length = rows.length;\n var currentRowsHeights = rows.map(function () {\n return outerHeight($(this));\n });\n var i;\n for (i = 0; i < length; i++) {\n rows[i].style[HEIGHT] = toPixels(currentRowsHeights[i]);\n }\n },\n _setRowsHeightInPercentages: function () {\n var that = this;\n var tableBody = $(that.element).children(TBODY);\n var tableBodyHeight = tableBody.height();\n var rows = tableBody.children(TR);\n var length = rows.length;\n var currentRowsHeights = rows.map(function () {\n return outerHeight($(this));\n });\n var i;\n for (i = 0; i < length; i++) {\n rows[i].style[HEIGHT] = toPercentages(calculatePercentageRatio(currentRowsHeights[i], tableBodyHeight));\n }\n },\n _setTableHeight: function (newHeight) {\n var element = this.element;\n if (inPercentages(element.style[HEIGHT])) {\n element.style[HEIGHT] = toPercentages(calculatePercentageRatio(newHeight, $(element).parent().height()));\n } else {\n element.style[HEIGHT] = toPixels(newHeight);\n }\n }\n });\n RowResizing.create = function (editor) {\n TableElementResizing.create(editor, {\n name: 'rowResizing',\n type: RowResizing,\n eventNamespace: NS\n });\n };\n RowResizing.dispose = function (editor) {\n TableElementResizing.dispose(editor, { eventNamespace: NS });\n };\n extend(Editor, { RowResizing: RowResizing });\n }(window.kendo));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/resizing/table-resize-handle', [\n 'editor/main',\n 'kendo.draganddrop',\n 'editor/resizing/resizing-utils'\n ], f);\n}(function () {\n (function (kendo, undefined) {\n var $ = kendo.jQuery;\n var extend = $.extend;\n var noop = $.noop;\n var proxy = $.proxy;\n var Editor = kendo.ui.editor;\n var Class = kendo.Class;\n var Draggable = kendo.ui.Draggable;\n var Observable = kendo.Observable;\n var getScrollBarWidth = Editor.ResizingUtils.getScrollBarWidth;\n var outerWidth = kendo._outerWidth;\n var outerHeight = kendo._outerHeight;\n var NS = '.kendoEditorTableResizeHandle';\n var RESIZE_HANDLE_CLASS = 'k-table-resize-handle';\n var DRAG_START = 'dragStart';\n var DRAG = 'drag';\n var DRAG_END = 'dragEnd';\n var HALF_INSIDE = 'halfInside';\n var MOUSE_OVER = 'mouseover';\n var MOUSE_OUT = 'mouseout';\n var BODY = 'body';\n var TABLE = 'table';\n var EAST = 'east';\n var NORTH = 'north';\n var NORTHEAST = 'northeast';\n var NORTHWEST = 'northwest';\n var SOUTH = 'south';\n var SOUTHEAST = 'southeast';\n var SOUTHWEST = 'southwest';\n var WEST = 'west';\n var DOT = '.';\n var TableResizeHandle = Observable.extend({\n init: function (options) {\n var that = this;\n Observable.fn.init.call(that);\n that.options = extend({}, that.options, options);\n that.element = $(that.options.template).appendTo(that.options.appendTo)[0];\n that._attachEventHandlers();\n that._addStyles();\n that._initDraggable();\n that._initPositioningStrategy();\n that._initDraggingStrategy();\n $(that.element).data(TABLE, that.options.resizableElement);\n },\n destroy: function () {\n var that = this;\n $(that.element).off(NS).remove();\n that.element = null;\n that._destroyDraggable();\n that.unbind();\n },\n options: {\n appendTo: null,\n direction: SOUTHEAST,\n resizableElement: null,\n rtl: false,\n template: '
      ' + '
      ' + '
      '\n },\n events: [\n DRAG_START,\n DRAG,\n DRAG_END,\n MOUSE_OVER,\n MOUSE_OUT\n ],\n show: function () {\n this._setPosition();\n },\n _setPosition: function () {\n var that = this;\n var position = that._positioningStrategy.getPosition();\n $(that.element).css({\n top: position.top,\n left: position.left,\n position: 'absolute'\n });\n },\n _attachEventHandlers: function () {\n var that = this;\n $(that.element).on(MOUSE_OVER + NS, proxy(that._onMouseOver, that)).on(MOUSE_OUT + NS, proxy(that._onMouseOut, that));\n },\n _onMouseOver: function () {\n this.trigger(MOUSE_OVER);\n },\n _onMouseOut: function () {\n this.trigger(MOUSE_OUT);\n },\n _addStyles: function () {\n var that = this;\n $(that.element).children(DOT + RESIZE_HANDLE_CLASS).addClass('k-resize-' + that.options.direction);\n },\n _initPositioningStrategy: function () {\n var that = this;\n var options = that.options;\n that._positioningStrategy = HandlePositioningStrategy.create({\n name: options.direction,\n handle: that.element,\n resizableElement: options.resizableElement,\n rootElement: options.rootElement,\n rtl: options.rtl\n });\n },\n _initDraggable: function () {\n var that = this;\n var element = that.element;\n if (that._draggable || !element) {\n return;\n }\n that._draggable = new Draggable(element, {\n dragstart: proxy(that._onDragStart, that),\n drag: proxy(that._onDrag, that),\n dragend: proxy(that._onDragEnd, that)\n });\n },\n _onDragStart: function () {\n this.trigger(DRAG_START);\n },\n _onDrag: function (e) {\n var that = this;\n that.trigger(DRAG, that._draggingStrategy.adjustDragDelta({\n deltaX: e.x.delta,\n deltaY: e.y.delta,\n initialDeltaX: e.x.initialDelta,\n initialDeltaY: e.y.initialDelta\n }));\n },\n _onDragEnd: function () {\n this.trigger(DRAG_END);\n },\n _destroyDraggable: function () {\n var that = this;\n if (that._draggable) {\n that._draggable.destroy();\n that._draggable = null;\n }\n },\n _initDraggingStrategy: function () {\n var that = this;\n that._draggingStrategy = HandleDraggingStrategy.create({ name: that.options.direction });\n }\n });\n var StrategyFactory = Class.extend({\n init: function () {\n this._items = [];\n },\n register: function (name, type) {\n this._items.push({\n name: name,\n type: type\n });\n },\n create: function (options) {\n var items = this._items;\n var itemsLength = items.length;\n var name = options.name ? options.name.toLowerCase() : '';\n var match;\n var item;\n var i;\n for (i = 0; i < itemsLength; i++) {\n item = items[i];\n if (item.name.toLowerCase() === name) {\n match = item;\n break;\n }\n }\n if (match) {\n return new match.type(options);\n }\n }\n });\n var PositioningStrategyFactory = StrategyFactory.extend({});\n PositioningStrategyFactory.current = new PositioningStrategyFactory();\n var HandlePositioningStrategy = Class.extend({\n init: function (options) {\n var that = this;\n that.options = extend({}, that.options, options);\n },\n options: {\n handle: null,\n offset: HALF_INSIDE,\n resizableElement: null,\n rootElement: null,\n rtl: false\n },\n getPosition: function () {\n var that = this;\n var position = that.calculatePosition();\n var handleOffsetPosition = that.applyHandleOffset(position);\n var scrollOffsetPosition = that.applyScrollOffset(handleOffsetPosition);\n return scrollOffsetPosition;\n },\n calculatePosition: noop,\n applyHandleOffset: function (position) {\n var options = this.options;\n var handle = $(options.handle);\n if (options.offset === HALF_INSIDE) {\n return {\n top: position.top - outerHeight(handle) / 2,\n left: position.left - outerWidth(handle) / 2\n };\n }\n return position;\n },\n applyScrollOffset: function (position) {\n var options = this.options;\n var rootElement = $(options.rootElement);\n var scrollBarWidth = options.rtl ? getScrollBarWidth(rootElement[0]) : 0;\n if (!rootElement.is(BODY)) {\n return {\n top: position.top + (rootElement.scrollTop() || 0),\n left: position.left + (rootElement.scrollLeft() || 0) - scrollBarWidth\n };\n }\n return position;\n }\n });\n HandlePositioningStrategy.create = function (options) {\n return PositioningStrategyFactory.current.create(options);\n };\n var EastPositioningStrategy = HandlePositioningStrategy.extend({\n calculatePosition: function () {\n var resizableElement = $(this.options.resizableElement);\n var offset = resizableElement.position();\n return {\n top: offset.top + outerHeight(resizableElement) / 2,\n left: offset.left + outerWidth(resizableElement)\n };\n }\n });\n PositioningStrategyFactory.current.register(EAST, EastPositioningStrategy);\n var NorthPositioningStrategy = HandlePositioningStrategy.extend({\n calculatePosition: function () {\n var resizableElement = $(this.options.resizableElement);\n var offset = resizableElement.position();\n return {\n top: offset.top,\n left: offset.left + outerWidth(resizableElement) / 2\n };\n }\n });\n PositioningStrategyFactory.current.register(NORTH, NorthPositioningStrategy);\n var NortheastPositioningStrategy = HandlePositioningStrategy.extend({\n calculatePosition: function () {\n var resizableElement = $(this.options.resizableElement);\n var offset = resizableElement.position();\n return {\n top: offset.top,\n left: offset.left + outerWidth(resizableElement)\n };\n }\n });\n PositioningStrategyFactory.current.register(NORTHEAST, NortheastPositioningStrategy);\n var NorthwestPositioningStrategy = HandlePositioningStrategy.extend({\n calculatePosition: function () {\n var resizableElement = $(this.options.resizableElement);\n var offset = resizableElement.position();\n return {\n top: offset.top,\n left: offset.left\n };\n }\n });\n PositioningStrategyFactory.current.register(NORTHWEST, NorthwestPositioningStrategy);\n var SouthPositioningStrategy = HandlePositioningStrategy.extend({\n calculatePosition: function () {\n var resizableElement = $(this.options.resizableElement);\n var offset = resizableElement.position();\n return {\n top: offset.top + outerHeight(resizableElement),\n left: offset.left + outerWidth(resizableElement) / 2\n };\n }\n });\n PositioningStrategyFactory.current.register(SOUTH, SouthPositioningStrategy);\n var SoutheastPositioningStrategy = HandlePositioningStrategy.extend({\n calculatePosition: function () {\n var resizableElement = $(this.options.resizableElement);\n var offset = resizableElement.position();\n return {\n top: offset.top + outerHeight(resizableElement),\n left: offset.left + outerWidth(resizableElement)\n };\n }\n });\n PositioningStrategyFactory.current.register(SOUTHEAST, SoutheastPositioningStrategy);\n var SouthwestPositioningStrategy = HandlePositioningStrategy.extend({\n calculatePosition: function () {\n var resizableElement = $(this.options.resizableElement);\n var offset = resizableElement.position();\n return {\n top: offset.top + outerHeight(resizableElement),\n left: offset.left\n };\n }\n });\n PositioningStrategyFactory.current.register(SOUTHWEST, SouthwestPositioningStrategy);\n var WestPositioningStrategy = HandlePositioningStrategy.extend({\n calculatePosition: function () {\n var resizableElement = $(this.options.resizableElement);\n var offset = resizableElement.position();\n return {\n top: offset.top + outerHeight(resizableElement) / 2,\n left: offset.left\n };\n }\n });\n PositioningStrategyFactory.current.register(WEST, WestPositioningStrategy);\n var DraggingStrategyFactory = StrategyFactory.extend({});\n DraggingStrategyFactory.current = new DraggingStrategyFactory();\n var HandleDraggingStrategy = Class.extend({\n init: function (options) {\n var that = this;\n that.options = extend({}, that.options, options);\n },\n options: {\n deltaX: {\n adjustment: null,\n modifier: null\n },\n deltaY: {\n adjustment: null,\n modifier: null\n }\n },\n adjustDragDelta: function (deltas) {\n var options = this.options;\n var xAxisAdjustment = options.deltaX.adjustment * options.deltaX.modifier;\n var yAxisAdjustment = options.deltaY.adjustment * options.deltaY.modifier;\n return {\n deltaX: deltas.deltaX * xAxisAdjustment,\n deltaY: deltas.deltaY * yAxisAdjustment,\n initialDeltaX: deltas.initialDeltaX * xAxisAdjustment,\n initialDeltaY: deltas.initialDeltaY * yAxisAdjustment\n };\n }\n });\n HandleDraggingStrategy.create = function (options) {\n return DraggingStrategyFactory.current.create(options);\n };\n var HorizontalDraggingStrategy = HandleDraggingStrategy.extend({\n options: {\n deltaX: {\n adjustment: 1,\n modifier: 1\n },\n deltaY: {\n adjustment: 0,\n modifier: 0\n }\n }\n });\n var EastDraggingStrategy = HorizontalDraggingStrategy.extend({ options: { deltaX: { modifier: 1 } } });\n DraggingStrategyFactory.current.register(EAST, EastDraggingStrategy);\n var WestDraggingStrategy = HorizontalDraggingStrategy.extend({ options: { deltaX: { modifier: -1 } } });\n DraggingStrategyFactory.current.register(WEST, WestDraggingStrategy);\n var VerticalDraggingStrategy = HandleDraggingStrategy.extend({\n options: {\n deltaX: {\n adjustment: 0,\n modifier: 0\n },\n deltaY: {\n adjustment: 1,\n modifier: 1\n }\n }\n });\n var NorthDraggingStrategy = VerticalDraggingStrategy.extend({ options: { deltaY: { modifier: -1 } } });\n DraggingStrategyFactory.current.register(NORTH, NorthDraggingStrategy);\n var SouthDraggingStrategy = VerticalDraggingStrategy.extend({ options: { deltaY: { modifier: 1 } } });\n DraggingStrategyFactory.current.register(SOUTH, SouthDraggingStrategy);\n var HorizontalAndVerticalDraggingStrategy = HandleDraggingStrategy.extend({\n options: {\n deltaX: {\n adjustment: 1,\n modifier: 1\n },\n deltaY: {\n adjustment: 1,\n modifier: 1\n }\n }\n });\n var NorthEastDraggingStrategy = HorizontalAndVerticalDraggingStrategy.extend({\n options: {\n deltaX: { modifier: 1 },\n deltaY: { modifier: -1 }\n }\n });\n DraggingStrategyFactory.current.register(NORTHEAST, NorthEastDraggingStrategy);\n var NorthWestDraggingStrategy = HorizontalAndVerticalDraggingStrategy.extend({\n options: {\n deltaX: { modifier: -1 },\n deltaY: { modifier: -1 }\n }\n });\n DraggingStrategyFactory.current.register(NORTHWEST, NorthWestDraggingStrategy);\n var SouthEastDraggingStrategy = HorizontalAndVerticalDraggingStrategy.extend({\n options: {\n deltaX: { modifier: 1 },\n deltaY: { modifier: 1 }\n }\n });\n DraggingStrategyFactory.current.register(SOUTHEAST, SouthEastDraggingStrategy);\n var SouthWestDraggingStrategy = HorizontalAndVerticalDraggingStrategy.extend({\n options: {\n deltaX: { modifier: -1 },\n deltaY: { modifier: 1 }\n }\n });\n DraggingStrategyFactory.current.register(SOUTHWEST, SouthWestDraggingStrategy);\n extend(Editor, { TableResizeHandle: TableResizeHandle });\n }(window.kendo));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/resizing/table-resizing', [\n 'editor/main',\n 'editor/resizing/table-resize-handle',\n 'editor/resizing/resizing-utils'\n ], f);\n}(function () {\n (function (kendo, undefined) {\n var global = window;\n var math = global.Math;\n var min = math.min;\n var max = math.max;\n var $ = kendo.jQuery;\n var contains = $.contains;\n var extend = $.extend;\n var proxy = $.proxy;\n var browser = kendo.support.browser;\n var Editor = kendo.ui.editor;\n var Class = kendo.Class;\n var TableResizeHandle = Editor.TableResizeHandle;\n var ResizingUtils = Editor.ResizingUtils;\n var calculatePercentageRatio = ResizingUtils.calculatePercentageRatio;\n var constrain = ResizingUtils.constrain;\n var inPercentages = ResizingUtils.inPercentages;\n var inPixels = ResizingUtils.inPixels;\n var toPercentages = ResizingUtils.toPercentages;\n var toPixels = ResizingUtils.toPixels;\n var outerWidth = kendo._outerWidth;\n var outerHeight = kendo._outerHeight;\n var NS = '.kendoEditorTableResizing';\n var RESIZE_HANDLE_WRAPPER_CLASS = 'k-table-resize-handle-wrapper';\n var TABLE_CLASS = 'k-table';\n var TABLE_RESIZING_CLASS = 'k-table-resizing';\n var DRAG_START = 'dragStart';\n var DRAG = 'drag';\n var DRAG_END = 'dragEnd';\n var KEY_DOWN = 'keydown';\n var MOUSE_DOWN = 'mousedown';\n var MOUSE_OVER = 'mouseover';\n var MOUSE_OUT = 'mouseout';\n var COLUMN = 'td';\n var ROW = 'tr';\n var TBODY = 'tbody';\n var TABLE = 'table';\n var WIDTH = 'width';\n var HEIGHT = 'height';\n var EAST = 'east';\n var NORTH = 'north';\n var NORTHEAST = 'northeast';\n var NORTHWEST = 'northwest';\n var SOUTH = 'south';\n var SOUTHEAST = 'southeast';\n var SOUTHWEST = 'southwest';\n var WEST = 'west';\n var DOT = '.';\n function isUndefined(value) {\n return typeof value === 'undefined';\n }\n var TableResizing = Class.extend({\n init: function (element, options) {\n var that = this;\n that.options = extend({}, that.options, options);\n that.handles = [];\n if ($(element).is(TABLE)) {\n that.element = element;\n }\n },\n destroy: function () {\n var that = this;\n $(that.element).off(NS);\n that.element = null;\n $(that.options.rootElement).off(KEY_DOWN + NS);\n that._destroyResizeHandles();\n },\n options: {\n appendHandlesTo: null,\n rtl: false,\n rootElement: null,\n minWidth: 10,\n minHeight: 10,\n handles: [\n { direction: NORTHWEST },\n { direction: NORTH },\n { direction: NORTHEAST },\n { direction: EAST },\n { direction: SOUTHEAST },\n { direction: SOUTH },\n { direction: SOUTHWEST },\n { direction: WEST }\n ]\n },\n resize: function (args) {\n var that = this;\n var deltas = extend({}, {\n deltaX: 0,\n deltaY: 0,\n initialDeltaX: 0,\n initialDeltaY: 0\n }, args);\n that._resizeWidth(deltas.deltaX, deltas.initialDeltaX);\n that._resizeHeight(deltas.deltaY, deltas.initialDeltaY);\n that.showResizeHandles();\n },\n _resizeWidth: function (delta, initialDelta) {\n var that = this;\n var element = $(that.element);\n var styleWidth = element[0].style[WIDTH];\n var currentWidth = outerWidth(element);\n var parentWidth = element.parent().width();\n var maxWidth = that._getMaxDimensionValue(WIDTH);\n var newWidth;\n var ratioValue;\n var ratioTotalValue;\n var constrainedWidth;\n if (delta === 0) {\n return;\n }\n if (isUndefined(that._initialElementWidth)) {\n that._initialElementWidth = currentWidth;\n }\n constrainedWidth = constrain({\n value: that._initialElementWidth + initialDelta,\n min: that.options.minWidth,\n max: maxWidth\n });\n if (inPercentages(styleWidth)) {\n if (currentWidth + delta > parentWidth) {\n ratioValue = max(constrainedWidth, parentWidth);\n ratioTotalValue = min(constrainedWidth, parentWidth);\n } else {\n ratioValue = min(constrainedWidth, parentWidth);\n ratioTotalValue = max(constrainedWidth, parentWidth);\n }\n newWidth = toPercentages(calculatePercentageRatio(ratioValue, ratioTotalValue));\n } else {\n newWidth = toPixels(constrainedWidth);\n }\n that._setColumnsWidth();\n element[0].style[WIDTH] = newWidth;\n },\n _resizeHeight: function (delta, initialDelta) {\n var that = this;\n var element = $(that.element);\n var styleHeight = element[0].style[HEIGHT];\n var currentHeight = outerHeight(element);\n var parent = element.parent();\n var parentHeight = parent.height();\n var maxHeight = that._getMaxDimensionValue(HEIGHT);\n var newHeight;\n var ratioValue;\n var ratioTotalValue;\n var constrainedHeight;\n var minHeight = that.options.minHeight;\n var hasRowsInPixels = that._hasRowsInPixels();\n if (delta === 0) {\n return;\n }\n if (isUndefined(that._initialElementHeight)) {\n that._initialElementHeight = currentHeight;\n }\n constrainedHeight = constrain({\n value: that._initialElementHeight + initialDelta,\n min: minHeight,\n max: maxHeight\n });\n if (hasRowsInPixels && delta < 0) {\n that._setRowsHeightInPercentages();\n }\n if (inPercentages(styleHeight)) {\n if (currentHeight + delta > parentHeight) {\n ratioValue = max(constrainedHeight, parentHeight);\n ratioTotalValue = min(constrainedHeight, parentHeight);\n } else {\n ratioValue = min(constrainedHeight, parentHeight);\n ratioTotalValue = max(constrainedHeight, parentHeight);\n }\n newHeight = toPercentages(calculatePercentageRatio(ratioValue, ratioTotalValue));\n } else {\n newHeight = toPixels(constrainedHeight);\n }\n element[0].style[HEIGHT] = newHeight;\n if (hasRowsInPixels && delta < 0) {\n that._setRowsHeightInPixels();\n }\n },\n _getMaxDimensionValue: function (dimension) {\n var that = this;\n var element = $(that.element);\n var dimensionLowercase = dimension.toLowerCase();\n var rtlModifier = that.options.rtl ? -1 : 1;\n var parent = $(that.element).parent();\n var parentElement = parent[0];\n var parentDimension = parent[dimensionLowercase]();\n var parentScrollOffset = rtlModifier * (dimension === WIDTH ? parent.scrollLeft() : parent.scrollTop());\n if (parentElement === element.closest(COLUMN)[0]) {\n if (parentElement.style[dimensionLowercase] === '' && !inPercentages(that.element.style[dimensionLowercase])) {\n return Infinity;\n } else {\n return parentDimension + parentScrollOffset;\n }\n } else {\n return parentDimension + parentScrollOffset;\n }\n },\n _setColumnsWidth: function () {\n var that = this;\n var element = $(that.element);\n var parentElement = element.parent()[0];\n var parentColumn = element.closest(COLUMN);\n var columns = parentColumn.closest(ROW).children();\n var columnsLength = columns.length;\n var i;\n function isWidthInPercentages(element) {\n var styleWidth = element.style.width;\n if (styleWidth !== '') {\n return inPercentages(styleWidth) ? true : false;\n } else {\n return $(element).hasClass(TABLE_CLASS) ? true : false;\n }\n }\n if (isWidthInPercentages(element[0]) && parentElement === parentColumn[0] && parentElement.style[WIDTH] === '') {\n for (i = 0; i < columnsLength; i++) {\n columns[i].style[WIDTH] = toPixels($(columns[i]).width());\n }\n }\n },\n _hasRowsInPixels: function () {\n var that = this;\n var rows = $(that.element).children(TBODY).children(ROW);\n for (var i = 0; i < rows.length; i++) {\n if (rows[i].style.height === '' || inPixels(rows[i].style.height)) {\n return true;\n }\n }\n return false;\n },\n _setRowsHeightInPercentages: function () {\n var that = this;\n var tableBody = $(that.element).children(TBODY);\n var tableBodyHeight = tableBody.height();\n var rows = tableBody.children(ROW);\n var length = rows.length;\n var currentRowsHeights = rows.map(function () {\n return outerHeight($(this));\n });\n var i;\n for (i = 0; i < length; i++) {\n rows[i].style[HEIGHT] = toPercentages(calculatePercentageRatio(currentRowsHeights[i], tableBodyHeight));\n }\n },\n _setRowsHeightInPixels: function () {\n var that = this;\n var rows = $(that.element).children(TBODY).children(ROW);\n var length = rows.length;\n var currentRowsHeights = rows.map(function () {\n return outerHeight($(this));\n });\n var i;\n for (i = 0; i < length; i++) {\n rows[i].style[HEIGHT] = toPixels(currentRowsHeights[i]);\n }\n },\n showResizeHandles: function () {\n var that = this;\n that._initResizeHandles();\n that._showResizeHandles();\n },\n _initResizeHandles: function () {\n var that = this;\n var handles = that.handles;\n var options = that.options;\n var handleOptions = that.options.handles;\n var length = handleOptions.length;\n var i;\n if (handles && handles.length > 0) {\n return;\n }\n for (i = 0; i < length; i++) {\n that.handles.push(new TableResizeHandle(extend({\n appendTo: options.appendHandlesTo,\n resizableElement: that.element,\n rootElement: options.rootElement,\n rtl: options.rtl\n }, handleOptions[i])));\n }\n that._bindToResizeHandlesEvents();\n },\n _destroyResizeHandles: function () {\n var that = this;\n var length = that.handles ? that.handles.length : 0;\n for (var i = 0; i < length; i++) {\n that.handles[i].destroy();\n }\n },\n _showResizeHandles: function () {\n var that = this;\n var handles = that.handles || [];\n var length = handles.length;\n var i;\n for (i = 0; i < length; i++) {\n that.handles[i].show();\n }\n },\n _bindToResizeHandlesEvents: function () {\n var that = this;\n var handles = that.handles || [];\n var length = handles.length;\n var i;\n var handle;\n for (i = 0; i < length; i++) {\n handle = handles[i];\n handle.bind(DRAG_START, proxy(that._onResizeHandleDragStart, that));\n handle.bind(DRAG, proxy(that._onResizeHandleDrag, that));\n handle.bind(DRAG_END, proxy(that._onResizeHandleDragEnd, that));\n handle.bind(MOUSE_OVER, proxy(that._onResizeHandleMouseOver, that));\n handle.bind(MOUSE_OUT, proxy(that._onResizeHandleMouseOut, that));\n }\n },\n _onResizeHandleDragStart: function () {\n var that = this;\n var element = $(that.element);\n element.addClass(TABLE_RESIZING_CLASS);\n that._initialElementHeight = outerHeight(element);\n that._initialElementWidth = outerWidth(element);\n that._disableKeyboard();\n },\n _onResizeHandleDrag: function (e) {\n this.resize(e);\n },\n _onResizeHandleDragEnd: function () {\n var that = this;\n $(that.element).removeClass(TABLE_RESIZING_CLASS);\n that._enableKeyboard();\n },\n _enableKeyboard: function () {\n $(this.options.rootElement).off(KEY_DOWN + NS);\n },\n _disableKeyboard: function () {\n $(this.options.rootElement).on(KEY_DOWN + NS, function (e) {\n e.preventDefault();\n });\n }\n });\n var TableResizingFactory = Class.extend({\n create: function (editor) {\n var factory = this;\n $(editor.body).on(MOUSE_DOWN + NS, TABLE, function (e) {\n var eventTarget = e.target;\n var eventCurrentTarget = e.currentTarget;\n var tableResizing = editor.tableResizing;\n var element = tableResizing ? tableResizing.element : null;\n if (tableResizing) {\n if (element && eventCurrentTarget !== element) {\n if (contains(eventCurrentTarget, element) && element !== eventTarget && contains(element, eventTarget)) {\n return;\n } else {\n if (element !== eventTarget) {\n editor._destroyTableResizing();\n factory._initResizing(editor, eventCurrentTarget);\n }\n }\n }\n } else {\n factory._initResizing(editor, eventCurrentTarget);\n }\n editor._showTableResizeHandles();\n }).on(MOUSE_DOWN + NS, function (e) {\n var tableResizing = editor.tableResizing;\n var element = tableResizing ? tableResizing.element : null;\n var target = e.target;\n var isResizeHandleOrChild = $(target).hasClass(RESIZE_HANDLE_WRAPPER_CLASS) || $(target).parents(DOT + RESIZE_HANDLE_WRAPPER_CLASS).length > 0;\n if (tableResizing && element !== target && !contains(element, target) && !isResizeHandleOrChild) {\n editor._destroyTableResizing();\n }\n });\n },\n dispose: function (editor) {\n $(editor.body).off(NS);\n },\n _initResizing: function (editor, table) {\n if (!browser.msie && !browser.mozilla) {\n editor.tableResizing = new TableResizing(table, {\n appendHandlesTo: editor.body,\n rtl: kendo.support.isRtl(editor.element),\n rootElement: editor.body\n });\n }\n }\n });\n TableResizingFactory.current = new TableResizingFactory();\n TableResizing.create = function (editor) {\n TableResizingFactory.current.create(editor);\n };\n TableResizing.dispose = function (editor) {\n TableResizingFactory.current.dispose(editor);\n };\n extend(Editor, { TableResizing: TableResizing });\n }(window.kendo));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/immutables', ['editor/tables'], f);\n}(function () {\n (function ($, undefined) {\n var kendo = window.kendo, Class = kendo.Class, Editor = kendo.ui.editor, dom = Editor.Dom, template = kendo.template, RangeUtils = Editor.RangeUtils, complexBlocks = [\n 'ul',\n 'ol',\n 'tbody',\n 'thead',\n 'table'\n ], toolsToBeUpdated = [\n 'bold',\n 'italic',\n 'underline',\n 'strikethrough',\n 'superscript',\n 'subscript',\n 'forecolor',\n 'backcolor',\n 'fontname',\n 'fontsize',\n 'createlink',\n 'unlink',\n 'autolink',\n 'addcolumnleft',\n 'addcolumnright',\n 'addrowabove',\n 'addrowbelow',\n 'deleterow',\n 'deletecolumn',\n 'mergecells',\n 'formatting',\n 'cleanformatting'\n ], IMMUTABALE = 'k-immutable', IMMUTABALE_MARKER_SELECTOR = '[' + IMMUTABALE + ']', IMMUTABLE_SELECTOR = '[contenteditable=\\'false\\']';\n var rootCondition = function (node) {\n return $(node).is('body,.k-editor');\n };\n var immutable = function (node) {\n return node.getAttribute && node.getAttribute('contenteditable') == 'false';\n };\n var immutableParent = function (node) {\n return dom.closestBy(node, immutable, rootCondition);\n };\n var expandImmutablesIn = function (range) {\n var startImmutableParent = immutableParent(range.startContainer);\n var endImmutableParent = immutableParent(range.endContainer);\n if (startImmutableParent || endImmutableParent) {\n if (startImmutableParent) {\n range.setStartBefore(startImmutableParent);\n }\n if (endImmutableParent) {\n range.setEndAfter(endImmutableParent);\n }\n }\n };\n var immutablesContext = function (range) {\n if (immutableParent(range.commonAncestorContainer)) {\n return true;\n } else if (immutableParent(range.startContainer) || immutableParent(range.endContainer)) {\n var editableNodes = RangeUtils.editableTextNodes(range);\n if (editableNodes.length === 0) {\n return true;\n }\n }\n return false;\n };\n var randomId = function (length) {\n var result = '';\n var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n for (var i = length || 10; i > 0; --i) {\n result += chars.charAt(Math.round(Math.random() * (chars.length - 1)));\n }\n return result;\n };\n var removeImmutables = function (root) {\n var serializedImmutables = { empty: true }, nodeName, id, serialized;\n $(root).find(IMMUTABLE_SELECTOR).each(function (i, node) {\n nodeName = dom.name(node);\n id = randomId();\n serialized = '<' + nodeName + ' ' + IMMUTABALE + '=\\'' + id + '\\'>';\n serializedImmutables[id] = {\n node: node,\n style: $(node).attr('style')\n };\n serializedImmutables.empty = false;\n $(node).replaceWith(serialized);\n });\n return serializedImmutables;\n };\n var restoreImmutables = function (root, serializedImmutables) {\n var id, immutable;\n $(root).find(IMMUTABALE_MARKER_SELECTOR).each(function (i, node) {\n id = node.getAttribute(IMMUTABALE);\n immutable = serializedImmutables[id];\n $(node).replaceWith(immutable.node);\n if (immutable.style != $(immutable.node).attr('style')) {\n $(immutable.node).removeAttr('style').attr('style', immutable.style);\n }\n });\n };\n var deletingKey = function (keyCode) {\n var keys = kendo.keys;\n return keyCode === keys.BACKSPACE || keyCode == keys.DELETE;\n };\n var updateToolOptions = function (tool) {\n var options = tool ? tool.options : undefined;\n if (options && options.finder) {\n options.finder._initOptions({ immutables: true });\n }\n };\n var Immutables = Class.extend({\n init: function (editor) {\n this.editor = editor;\n this.serializedImmutables = {};\n this.options = $.extend({}, editor && editor.options && editor.options.immutables);\n var tools = editor.toolbar.tools;\n updateToolOptions(tools.justifyLeft);\n updateToolOptions(tools.justifyCenter);\n updateToolOptions(tools.justifyRight);\n updateToolOptions(tools.justifyFull);\n },\n serialize: function (node) {\n var result = this._toHtml(node), id;\n if (result.indexOf(IMMUTABALE) === -1) {\n id = this.randomId();\n result = result.replace(/>/, ' ' + IMMUTABALE + '=\"' + id + '\">');\n } else {\n id = result.match(/k-immutable\\s*=\\s*['\"](.*)['\"]/)[1];\n }\n this.serializedImmutables[id] = node;\n return result;\n },\n _toHtml: function (node) {\n var serialization = this.options.serialization;\n var serializationType = typeof serialization;\n var nodeName;\n switch (serializationType) {\n case 'string':\n return template(serialization)(node);\n case 'function':\n return serialization(node);\n default:\n nodeName = dom.name(node);\n return '<' + nodeName + '>';\n }\n },\n deserialize: function (node) {\n var that = this;\n var deserialization = this.options.deserialization;\n $(IMMUTABALE_MARKER_SELECTOR, node).each(function () {\n var id = this.getAttribute(IMMUTABALE);\n var immutable = that.serializedImmutables[id];\n if (kendo.isFunction(deserialization)) {\n deserialization(this, immutable);\n }\n $(this).replaceWith(immutable);\n });\n that.serializedImmutables = {};\n },\n randomId: function (length) {\n return randomId(length);\n },\n keydown: function (e, range) {\n var isDeleting = deletingKey(e.keyCode);\n var shouldCancelEvent = isDeleting && this._cancelDeleting(e, range) || !isDeleting && this._cancelTyping(e, range);\n if (shouldCancelEvent) {\n e.preventDefault();\n return true;\n }\n },\n _cancelTyping: function (e, range) {\n var editor = this.editor;\n var keyboard = editor.keyboard;\n return range.collapsed && !keyboard.typingInProgress && keyboard.isTypingKey(e) && immutablesContext(range);\n },\n _cancelDeleting: function (e, range) {\n var keys = kendo.keys;\n var backspace = e.keyCode === keys.BACKSPACE;\n var del = e.keyCode == keys.DELETE;\n if (!backspace && !del) {\n return false;\n }\n var cancelDeleting = false;\n if (range.collapsed) {\n if (immutablesContext(range)) {\n return true;\n }\n var immutable = this.nextImmutable(range, del);\n if (immutable && backspace) {\n var closestSelectionLi = dom.closest(range.commonAncestorContainer, 'li');\n if (closestSelectionLi) {\n var closestImmutableLi = dom.closest(immutable, 'li');\n if (closestImmutableLi && closestImmutableLi !== closestSelectionLi) {\n return cancelDeleting;\n }\n }\n }\n if (immutable && !dom.tableCell(immutable)) {\n if (dom.parentOfType(immutable, complexBlocks) === dom.parentOfType(range.commonAncestorContainer, complexBlocks)) {\n while (immutable && immutable.parentNode.childNodes.length == 1) {\n immutable = immutable.parentNode;\n }\n if (dom.tableCell(immutable)) {\n return cancelDeleting;\n }\n this._removeImmutable(immutable, range);\n }\n cancelDeleting = true;\n }\n }\n return cancelDeleting;\n },\n nextImmutable: function (range, forwards) {\n var commonContainer = range.commonAncestorContainer;\n if (dom.isBom(commonContainer) || (forwards && RangeUtils.isEndOf(range, commonContainer) || !forwards && RangeUtils.isStartOf(range, commonContainer))) {\n var next = this._nextNode(commonContainer, forwards);\n if (next && dom.isBlock(next) && !immutableParent(next)) {\n while (next && next.children && next.children[forwards ? 0 : next.children.length - 1]) {\n next = next.children[forwards ? 0 : next.children.length - 1];\n }\n }\n return immutableParent(next);\n }\n },\n _removeImmutable: function (immutable, range) {\n var editor = this.editor;\n var startRestorePoint = new Editor.RestorePoint(range, editor.body);\n dom.remove(immutable);\n Editor._finishUpdate(editor, startRestorePoint);\n },\n _nextNode: function (node, forwards) {\n var sibling = forwards ? 'nextSibling' : 'previousSibling';\n var current = node, next;\n while (current && !next) {\n next = current[sibling];\n if (next && dom.isDataNode(next) && /^\\s|[\\ufeff]$/.test(next.nodeValue)) {\n current = next;\n next = current[sibling];\n }\n if (!next) {\n current = current.parentNode;\n }\n }\n return next;\n }\n });\n Immutables.immutable = immutable;\n Immutables.immutableParent = immutableParent;\n Immutables.expandImmutablesIn = expandImmutablesIn;\n Immutables.immutablesContext = immutablesContext;\n Immutables.toolsToBeUpdated = toolsToBeUpdated;\n Immutables.removeImmutables = removeImmutables;\n Immutables.restoreImmutables = restoreImmutables;\n Editor.Immutables = Immutables;\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/table-wizard/table-wizard-command', ['editor/tables'], f);\n}(function () {\n (function ($, undefined) {\n var kendo = window.kendo, Editor = kendo.ui.editor, EditorUtils = Editor.EditorUtils, RangeUtils = Editor.RangeUtils, dom = Editor.Dom, registerTool = EditorUtils.registerTool, ToolTemplate = Editor.ToolTemplate, Command = Editor.Command;\n var tableFormatFinder = new Editor.BlockFormatFinder([{ tags: ['table'] }]);\n var cellsFormatFinder = new Editor.BlockFormatFinder([{\n tags: [\n 'td',\n 'th'\n ]\n }]);\n var reUnit = /([a-z]+|%)$/i;\n var TableWizardCommand = Command.extend({\n exec: function () {\n var cmd = this;\n var editor = cmd.editor;\n var range = cmd.range = cmd.lockRange();\n var selectedTable = cmd._sourceTable = !cmd.options.insertNewTable ? cmd._selectedTable(range) : undefined;\n var selectedCells = cmd._selectedTableCells = selectedTable ? cmd._selectedCells(range) : undefined;\n var options = {\n visible: false,\n messages: editor.options.messages,\n closeCallback: $.proxy(cmd.onDialogClose, cmd),\n table: cmd.parseTable(selectedTable, selectedCells),\n dialogOptions: editor.options.dialogOptions,\n isRtl: kendo.support.isRtl(editor.wrapper)\n };\n var dialog = new Editor.TableWizardDialog(options);\n dialog.open();\n },\n onDialogClose: function (data) {\n var cmd = this;\n cmd.releaseRange(cmd.range);\n if (data) {\n if (cmd.options.insertNewTable) {\n cmd.insertTable(cmd.createNewTable(data));\n } else {\n cmd.updateTable(data, cmd._sourceTable, cmd._selectedTableCells);\n }\n }\n },\n releaseRange: function (range) {\n var cmd = this;\n var doc = cmd.editor.document;\n dom.windowFromDocument(doc).focus();\n Command.fn.releaseRange.call(cmd, range);\n },\n insertTable: function (table) {\n var range = this.range;\n range.insertNode(table);\n range.collapse(true);\n this.editor.selectRange(range);\n },\n updateTable: function (data, table, selectedCells) {\n var cmd = this;\n var tableRows = $(table.rows).toArray();\n var tableProp = data.tableProperties;\n var rows = tableProp.rows;\n var columns = tableProp.columns;\n var last = function (collection) {\n return collection[collection.length - 1];\n };\n while (selectedCells.length > 1) {\n selectedCells.pop();\n }\n var lastSelectedRow = selectedCells.length ? last(selectedCells).parentNode : last(tableRows);\n var row, parent;\n cmd._deleteTableRows(tableRows, tableRows.length - rows);\n if (tableRows.length < rows) {\n var rowIndex = $(lastSelectedRow).index();\n var cellsLength = lastSelectedRow.cells.length;\n var newRowsCount = rows - tableRows.length;\n parent = lastSelectedRow.parentNode;\n while (newRowsCount) {\n row = parent.insertRow(rowIndex + 1);\n cmd._insertCells(cellsLength - row.cells.length, row);\n newRowsCount--;\n }\n }\n if (tableRows[0].cells.length > columns) {\n $(tableRows).each(function (i, row) {\n while (row.cells.length > columns) {\n row.deleteCell(-1);\n }\n });\n }\n if (tableRows[0].cells.length < columns) {\n var cellIndex = $(last(selectedCells) || last(lastSelectedRow.cells)).index();\n $(tableRows).each(function (i, row) {\n cmd._insertCells(columns - row.cells.length, row, cellIndex + 1);\n });\n }\n cmd._updateTableProperties(table, tableProp);\n var cellProp = data.cellProperties;\n if (selectedCells[0]) {\n dom.attr(selectedCells[0], { id: cellProp.id || null });\n }\n (cellProp.selectAllCells ? $(tableRows).children() : $(selectedCells)).each(function (i, cell) {\n cmd._updateCellProperties(cell, cellProp);\n });\n cmd._updateCaption(table, tableProp);\n tableProp.cellsWithHeaders = tableProp.cellsWithHeaders || false;\n if (cmd.cellsWithHeadersAssociated(table) != tableProp.cellsWithHeaders) {\n cmd.associateCellsWithHeader(table, tableProp.cellsWithHeaders);\n }\n },\n _isHeadingRow: function (row) {\n return dom.is(row.parentNode, 'thead') || dom.is(row.cells[0], 'th');\n },\n associateCellsWithHeader: function (table, associate) {\n var timestamp = new Date().getTime();\n var ids = [];\n var columns = table.rows[0].cells.length;\n var index, nextRow, isDataRow;\n var generateIds = function () {\n for (var i = 0; i < columns; i++) {\n ids[i] = 'table' + ++timestamp;\n }\n };\n var modifySellsIds = function (c, cell) {\n $(cell)[associate ? 'attr' : 'removeAttr']('id', ids[c]);\n };\n var modifyCellsHeadings = function (c, cell) {\n $(cell)[associate ? 'attr' : 'removeAttr']('headers', ids[c]);\n };\n var isHeadingRow = this._isHeadingRow;\n $(table.rows).each(function (r, row) {\n if (isHeadingRow(row)) {\n index = r;\n nextRow = table.rows[++index];\n isDataRow = nextRow && !isHeadingRow(nextRow);\n if (isDataRow) {\n generateIds();\n $(row.cells).each(modifySellsIds);\n }\n while (isDataRow) {\n $(nextRow.cells).each(modifyCellsHeadings);\n nextRow = table.rows[++index];\n isDataRow = nextRow && !isHeadingRow(nextRow);\n }\n }\n });\n },\n cellsWithHeadersAssociated: function (table) {\n var cells = $(table.rows).children();\n var isHeadingRow = this._isHeadingRow;\n var headingIds = [];\n cells.each(function (c, cell) {\n if (cell.id && isHeadingRow(cell.parentNode)) {\n headingIds.push(cell.id);\n }\n });\n var associatedCells = cells.filter(function (c, cell) {\n var headersAttr = cell.getAttribute('headers');\n return headersAttr && !isHeadingRow(cell.parentNode) && $.inArray(headersAttr, headingIds) > -1;\n });\n return !!associatedCells.length;\n },\n _insertCells: function (count, row, index) {\n index = isNaN(index) ? -1 : index;\n for (var i = 0, cell; i < count; i++) {\n cell = row.insertCell(index);\n cell.innerHTML = ' ';\n }\n },\n _deleteTableRows: function (rows, count) {\n for (var i = 0, row, rowParent; i < count; i++) {\n row = rows.pop();\n rowParent = row.parentNode;\n rowParent.removeChild(row);\n if (!rowParent.rows.length) {\n dom.remove(rowParent);\n }\n }\n },\n createNewTable: function (data) {\n var cmd = this;\n var doc = cmd.editor.document;\n var tableProp = data.tableProperties;\n var cellProp = data.cellProperties;\n var cellPropToAll = cellProp.selectAllCells;\n var table = dom.create(doc, 'table');\n cmd._updateTableProperties(table, tableProp);\n cmd._updateCaption(table, tableProp);\n var tbody = table.createTBody();\n for (var r = 0, row; r < tableProp.rows; r++) {\n row = tbody.insertRow();\n for (var c = 0, cell; c < tableProp.columns; c++) {\n cell = row.insertCell();\n cell.innerHTML = ' ';\n if (r === 0 && c === 0 && cellProp.id) {\n cell.id = cellProp.id;\n }\n cmd._updateCellProperties(cell, cellPropToAll || r === 0 && c === 0 ? cellProp : {});\n }\n }\n if (tableProp.cellsWithHeaders) {\n cmd.associateCellsWithHeader(table, tableProp.cellsWithHeaders);\n }\n return table;\n },\n _updateTableProperties: function (table, data) {\n var style = this._getStylesData(data);\n dom.attr(table, {\n cellSpacing: data.cellSpacing || null,\n cellPadding: data.cellPadding || null,\n className: data.className || null,\n id: data.id || null,\n summary: data.summary || null,\n style: style || null\n });\n $(table).addClass('k-table');\n },\n _updateCellProperties: function (cell, data) {\n var style = this._getStylesData(data);\n style.padding = data.cellPadding || null;\n style.margin = data.cellMargin || null;\n dom.attr(cell, {\n style: style || null,\n className: data.className || null\n });\n },\n _updateCaption: function (table, data) {\n if (table.caption && !data.captionContent) {\n table.deleteCaption();\n } else if (data.captionContent) {\n var caption = table.createCaption();\n caption.innerHTML = data.captionContent;\n var alignment = this._getAlignmentData(data.captionAlignment);\n dom.attr(caption, {\n style: {\n textAlign: alignment.textAlign,\n verticalAlign: alignment.verticalAlign\n }\n });\n }\n },\n _getStylesData: function (data) {\n var alignment = this._getAlignmentData(data.alignment);\n var whiteSpace = 'wrapText' in data ? data.wrapText ? '' : 'nowrap' : null;\n return {\n width: data.width ? data.width + data.widthUnit : null,\n height: data.height ? data.height + data.heightUnit : null,\n textAlign: alignment.textAlign,\n verticalAlign: alignment.verticalAlign,\n backgroundColor: data.bgColor || null,\n borderWidth: data.borderWidth,\n borderStyle: data.borderStyle,\n borderColor: data.borderColor,\n borderCollapse: data.collapseBorders ? 'collapse' : null,\n whiteSpace: whiteSpace\n };\n },\n _getAlignmentData: function (alignment) {\n var textAlign = '';\n var verticalAlign = textAlign;\n if (alignment) {\n if (alignment.indexOf(' ') != -1) {\n var align = alignment.split(' ');\n textAlign = align[0];\n verticalAlign = align[1];\n } else {\n textAlign = alignment;\n }\n }\n return {\n textAlign: textAlign,\n verticalAlign: verticalAlign\n };\n },\n parseTable: function (table, selectedCells) {\n if (!table) {\n return {\n tableProperties: {},\n selectedCells: []\n };\n }\n var cmd = this;\n var tStyle = table.style;\n var rows = table.rows;\n var caption = table.caption;\n var captionClone = $(caption ? caption.cloneNode(true) : undefined);\n captionClone.find('.k-marker').remove();\n var cssClass = table.className;\n cssClass = cssClass.replace(/^k-table\\s|\\sk-table$/, '');\n cssClass = cssClass.replace(/\\sk-table\\s/, ' ');\n cssClass = cssClass.replace(/^k-table$/, '');\n var tableAlignment = cmd._getAlignment(table, true);\n var captionAlignment = caption ? cmd._getAlignment(caption) : undefined;\n var cellsWithHeaders = cmd.cellsWithHeadersAssociated(table);\n var tableJson = {\n tableProperties: {\n width: tStyle.width || table.width ? parseFloat(tStyle.width || table.width) : null,\n height: tStyle.height || table.height ? parseFloat(tStyle.height || table.height) : null,\n columns: rows[0] ? rows[0].children.length : 0,\n rows: rows.length,\n widthUnit: cmd._getUnit(tStyle.width),\n heightUnit: cmd._getUnit(tStyle.height),\n cellSpacing: table.cellSpacing,\n cellPadding: table.cellPadding,\n alignment: tableAlignment.textAlign,\n bgColor: tStyle.backgroundColor || table.bgColor,\n className: cssClass,\n id: table.id,\n borderWidth: tStyle.borderWidth || table.border,\n borderColor: tStyle.borderColor,\n borderStyle: tStyle.borderStyle || '',\n collapseBorders: !!tStyle.borderCollapse,\n summary: table.summary,\n captionContent: caption ? captionClone.html() : '',\n captionAlignment: caption && captionAlignment.textAlign ? captionAlignment.textAlign + ' ' + captionAlignment.verticalAlign : '',\n cellsWithHeaders: cellsWithHeaders\n },\n selectedCells: []\n };\n tableJson.rows = cmd.parseTableRows(rows, selectedCells, tableJson);\n return tableJson;\n },\n parseTableRows: function (rows, selectedCells, tableJson) {\n var cmd = this;\n var data = [], row, rowData, cells, cell, cellData;\n for (var i = 0; i < rows.length; i++) {\n row = rows[i];\n rowData = { cells: [] };\n cells = row.cells;\n data.push(rowData);\n for (var j = 0; j < cells.length; j++) {\n cell = cells[j];\n cellData = cmd.parseCell(cell);\n if ($.inArray(cell, selectedCells) != -1) {\n tableJson.selectedCells.push(cellData);\n }\n rowData.cells.push(cellData);\n }\n }\n return data;\n },\n parseCell: function (cell) {\n var cmd = this;\n var cStyle = cell.style;\n var alignment = cmd._getAlignment(cell);\n alignment = alignment.textAlign ? alignment.textAlign + ' ' + alignment.verticalAlign : '';\n var data = {\n width: cStyle.width || cell.width ? parseFloat(cStyle.width || cell.width) : null,\n height: cStyle.height || cell.height ? parseFloat(cStyle.height || cell.height) : null,\n widthUnit: cmd._getUnit(cStyle.width),\n heightUnit: cmd._getUnit(cStyle.height),\n cellMargin: cStyle.margin,\n cellPadding: cStyle.padding,\n alignment: alignment,\n bgColor: cStyle.backgroundColor || cell.bgColor,\n className: cell.className,\n id: cell.id,\n borderWidth: cStyle.borderWidth || cell.border,\n borderColor: cStyle.borderColor,\n borderStyle: cStyle.borderStyle,\n wrapText: cStyle.whiteSpace != 'nowrap'\n };\n return data;\n },\n _getAlignment: function (element, horizontalOnly) {\n var style = element.style;\n var hAlign = style.textAlign || element.align || '';\n if (horizontalOnly) {\n return { textAlign: hAlign };\n }\n var vAlign = style.verticalAlign || element.vAlign || '';\n if (hAlign && vAlign) {\n return {\n textAlign: hAlign,\n verticalAlign: vAlign\n };\n }\n if (!hAlign && vAlign) {\n return {\n textAlign: 'left',\n verticalAlign: vAlign\n };\n }\n if (hAlign && !vAlign) {\n return {\n textAlign: hAlign,\n verticalAlign: 'top'\n };\n }\n return {\n textAlign: '',\n verticalAlign: ''\n };\n },\n _getUnit: function (value) {\n var unit = (value || '').match(reUnit);\n return unit ? unit[0] : 'px';\n },\n _selectedTable: function (range) {\n var nodes = dom.filterBy(RangeUtils.nodes(range), dom.htmlIndentSpace, true);\n return tableFormatFinder.findSuitable(nodes)[0];\n },\n _selectedCells: function (range) {\n var nodes = dom.filterBy(RangeUtils.nodes(range), dom.htmlIndentSpace, true);\n return cellsFormatFinder.findSuitable(nodes);\n }\n });\n var TableWizardTool = Editor.Tool.extend({\n command: function (options) {\n options.insertNewTable = this.options.insertNewTable;\n return new TableWizardCommand(options);\n }\n });\n var TableWizardEditTool = TableWizardTool.extend({\n update: function (ui, nodes) {\n var isFormatted = !tableFormatFinder.isFormatted(nodes);\n ui.toggleClass('k-state-disabled', isFormatted);\n }\n });\n kendo.ui.editor.TableWizardTool = TableWizardTool;\n kendo.ui.editor.TableWizardCommand = TableWizardCommand;\n registerTool('tableWizard', new TableWizardEditTool({\n command: TableWizardCommand,\n insertNewTable: false,\n template: new ToolTemplate({\n template: EditorUtils.buttonTemplate,\n title: 'Table Wizard'\n })\n }));\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('editor/table-wizard/table-wizard-dialog', ['editor/table-wizard/table-wizard-command'], f);\n}(function () {\n (function ($, undefined) {\n var kendo = window.kendo, numericTextBoxSettings = {\n format: '0',\n min: 0\n }, units = [\n 'px',\n 'em'\n ], borderStyles = [\n 'solid',\n 'dotted',\n 'dashed',\n 'double',\n 'groove',\n 'ridge',\n 'inset',\n 'outset',\n 'initial',\n 'inherit',\n 'none',\n 'hidden'\n ];\n var tableAlignmentDropDownSettings = {\n dataSource: [\n {\n className: 'k-icon k-i-table-align-middle-left',\n value: 'left'\n },\n {\n className: 'k-icon k-i-table-align-middle-center',\n value: 'center'\n },\n {\n className: 'k-icon k-i-table-align-middle-right',\n value: 'right'\n },\n {\n className: 'k-icon k-i-align-remove',\n value: ''\n }\n ],\n dataTextField: 'className',\n dataValueField: 'value',\n template: '',\n valueTemplate: ''\n };\n var cellAlignmentDropDownSettings = {\n dataSource: [\n {\n className: 'k-icon k-i-table-align-top-left',\n value: 'left top'\n },\n {\n className: 'k-icon k-i-table-align-top-center',\n value: 'center top'\n },\n {\n className: 'k-icon k-i-table-align-top-right',\n value: 'right top'\n },\n {\n className: 'k-icon k-i-table-align-middle-left',\n value: 'left middle'\n },\n {\n className: 'k-icon k-i-table-align-middle-center',\n value: 'center middle'\n },\n {\n className: 'k-icon k-i-table-align-middle-right',\n value: 'right middle'\n },\n {\n className: 'k-icon k-i-table-align-bottom-left',\n value: 'left bottom'\n },\n {\n className: 'k-icon k-i-table-align-bottom-center',\n value: 'center bottom'\n },\n {\n className: 'k-icon k-i-table-align-bottom-right',\n value: 'right bottom'\n },\n {\n className: 'k-icon k-i-align-remove',\n value: ''\n }\n ],\n dataTextField: 'className',\n dataValueField: 'value',\n template: '',\n valueTemplate: ''\n };\n var accessibilityAlignmentDropDownSettings = {\n dataSource: [\n {\n className: 'k-icon k-i-table-align-top-left',\n value: 'left top'\n },\n {\n className: 'k-icon k-i-table-align-top-center',\n value: 'center top'\n },\n {\n className: 'k-icon k-i-table-align-top-right',\n value: 'right top'\n },\n {\n className: 'k-icon k-i-table-align-bottom-left',\n value: 'left bottom'\n },\n {\n className: 'k-icon k-i-table-align-bottom-center',\n value: 'center bottom'\n },\n {\n className: 'k-icon k-i-table-align-bottom-right',\n value: 'right bottom'\n },\n {\n className: 'k-icon k-i-align-remove',\n value: ''\n }\n ],\n dataTextField: 'className',\n dataValueField: 'value',\n template: '',\n valueTemplate: ''\n };\n var dialogTemplate = '
      ' + '
      ' + '
      ' + '
        ' + '
      • #= messages.tableTab #
      • ' + '
      • #= messages.cellTab #
      • ' + '
      • #= messages.accessibilityTab #
      • ' + '
      ' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
       
      ' + '
      ' + '' + '' + '
      ' + '
      ' + '
      ' + '
      ' + '' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
       
      ' + '
      ' + '' + '' + '
      ' + '
      ' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
      ' + '' + '
      ' + '
       
      ' + '
      ' + '' + '' + '
      ' + '
      ' + '
      ' + '
      ' + '' + '' + '
      ' + '
      ' + '
      ';\n var TableWizardDialog = kendo.Class.extend({\n init: function (options) {\n this.options = options;\n },\n open: function () {\n var that = this, options = that.options, dialogOptions = options.dialogOptions, tableData = options.table, dialog, messages = options.messages;\n function close(e) {\n e.preventDefault();\n that.destroy();\n dialog.destroy();\n }\n function okHandler(e) {\n that.collectDialogValues(tableData);\n close(e);\n if (that.change) {\n that.change();\n }\n options.closeCallback(tableData);\n }\n function closeHandler(e) {\n close(e);\n options.closeCallback();\n }\n dialogOptions.close = closeHandler;\n dialogOptions.title = messages.tableWizard;\n dialogOptions.visible = options.visible;\n dialog = $(that._dialogTemplate(messages)).appendTo(document.body).kendoWindow(dialogOptions).closest('.k-window').toggleClass('k-rtl', options.isRtl).end().find('.k-dialog-ok').click(okHandler).end().find('.k-dialog-close').click(closeHandler).end().data('kendoWindow');\n var element = dialog.element;\n that._initTabStripComponent(element);\n that._initTableViewComponents(element, tableData);\n that._initCellViewComponents(element, tableData);\n that._initAccessibilityViewComponents(element, tableData);\n dialog.center();\n dialog.open();\n },\n _initTabStripComponent: function (element) {\n var components = this.components = {};\n components.tabStrip = element.find('#k-table-wizard-tabs').kendoTabStrip({ animation: false }).data('kendoTabStrip');\n },\n collectDialogValues: function () {\n var that = this;\n var data = that.options.table;\n that._collectTableViewValues(data);\n that._collectCellViewValues(data);\n that._collectAccessibilityViewValues(data);\n },\n _collectTableViewValues: function (tableData) {\n var tableView = this.components.tableView;\n var tableProperties = tableData.tableProperties;\n tableProperties.width = tableView.width.value();\n tableProperties.widthUnit = tableView.widthUnit.value();\n tableProperties.height = tableView.height.value();\n tableProperties.columns = tableView.columns.value();\n tableProperties.rows = tableView.rows.value();\n tableProperties.heightUnit = tableView.heightUnit.value();\n tableProperties.cellSpacing = tableView.cellSpacing.value();\n tableProperties.cellPadding = tableView.cellPadding.value();\n tableProperties.alignment = tableView.alignment.value();\n tableProperties.bgColor = tableView.bgColor.value();\n tableProperties.className = tableView.className.value;\n tableProperties.id = tableView.id.value;\n tableProperties.borderWidth = tableView.borderWidth.value();\n tableProperties.borderColor = tableView.borderColor.value();\n tableProperties.borderStyle = tableView.borderStyle.value();\n tableProperties.collapseBorders = tableView.collapseBorders.checked;\n },\n _collectCellViewValues: function (table) {\n var cellData = table.cellProperties = {};\n var cellView = this.components.cellView;\n cellData.selectAllCells = cellView.selectAllCells.checked;\n cellData.width = cellView.width.value();\n cellData.widthUnit = cellView.widthUnit.value();\n cellData.height = cellView.height.value();\n cellData.heightUnit = cellView.heightUnit.value();\n cellData.cellMargin = cellView.cellMargin.value();\n cellData.cellPadding = cellView.cellPadding.value();\n cellData.alignment = cellView.alignment.value();\n cellData.bgColor = cellView.bgColor.value();\n cellData.className = cellView.className.value;\n cellData.id = cellView.id.value;\n cellData.borderWidth = cellView.borderWidth.value();\n cellData.borderColor = cellView.borderColor.value();\n cellData.borderStyle = cellView.borderStyle.value();\n cellData.wrapText = cellView.wrapText.checked;\n },\n _collectAccessibilityViewValues: function (table) {\n var tableProperties = table.tableProperties;\n var accessibilityView = this.components.accessibilityView;\n tableProperties.captionContent = accessibilityView.captionContent.value;\n tableProperties.captionAlignment = accessibilityView.captionAlignment.value();\n tableProperties.summary = accessibilityView.summary.value;\n tableProperties.cellsWithHeaders = accessibilityView.cellsWithHeaders.checked;\n },\n _addUnit: function (units, value) {\n if (value && $.inArray(value, units) == -1) {\n units.push(value);\n }\n },\n _initTableViewComponents: function (element, table) {\n var components = this.components;\n var tableView = components.tableView = {};\n var tableProperties = table.tableProperties = table.tableProperties || {};\n tableProperties.borderStyle = tableProperties.borderStyle || '';\n this._addUnit(units, tableProperties.widthUnit);\n this._addUnit(units, tableProperties.heightUnit);\n this._initNumericTextbox(element.find('#k-editor-table-width'), 'width', tableProperties, tableView);\n this._initNumericTextbox(element.find('#k-editor-table-height'), 'height', tableProperties, tableView);\n this._initNumericTextbox(element.find('#k-editor-table-columns'), 'columns', tableProperties, tableView, {\n min: 1,\n value: 4\n });\n this._initNumericTextbox(element.find('#k-editor-table-rows'), 'rows', tableProperties, tableView, {\n min: 1,\n value: 4\n });\n this._initDropDownList(element.find('#k-editor-table-width-type'), 'widthUnit', tableProperties, tableView, units);\n this._initDropDownList(element.find('#k-editor-table-height-type'), 'heightUnit', tableProperties, tableView, units);\n this._initNumericTextbox(element.find('#k-editor-table-cell-spacing'), 'cellSpacing', tableProperties, tableView);\n this._initNumericTextbox(element.find('#k-editor-table-cell-padding'), 'cellPadding', tableProperties, tableView);\n this._initTableAlignmentDropDown(element.find('#k-editor-table-alignment'), tableProperties);\n this._initColorPicker(element.find('#k-editor-table-bg'), 'bgColor', tableProperties, tableView);\n this._initInput(element.find('#k-editor-css-class'), 'className', tableProperties, tableView);\n this._initInput(element.find('#k-editor-id'), 'id', tableProperties, tableView);\n this._initNumericTextbox(element.find('#k-editor-border-width'), 'borderWidth', tableProperties, tableView);\n this._initColorPicker(element.find('#k-editor-border-color'), 'borderColor', tableProperties, tableView);\n this._initDropDownList(element.find('#k-editor-border-style'), 'borderStyle', tableProperties, tableView, borderStyles);\n this._initCheckbox(element.find('#k-editor-collapse-borders'), 'collapseBorders', tableProperties, tableView);\n },\n _initCellViewComponents: function (element, table) {\n var components = this.components;\n var cellView = components.cellView = {};\n table.selectedCells = table.selectedCells = table.selectedCells || [];\n var cellProperties = table.selectedCells[0] || {\n borderStyle: '',\n wrapText: true\n };\n this._addUnit(units, cellProperties.widthUnit);\n this._addUnit(units, cellProperties.heightUnit);\n this._initCheckbox(element.find('#k-editor-selectAllCells'), 'selectAllCells', table.tableProperties, cellView);\n this._initNumericTextbox(element.find('#k-editor-cell-width'), 'width', cellProperties, cellView);\n this._initNumericTextbox(element.find('#k-editor-cell-height'), 'height', cellProperties, cellView);\n this._initDropDownList(element.find('#k-editor-cell-width-type'), 'widthUnit', cellProperties, cellView, units);\n this._initDropDownList(element.find('#k-editor-cell-height-type'), 'heightUnit', cellProperties, cellView, units);\n this._initNumericTextbox(element.find('#k-editor-table-cell-margin'), 'cellMargin', cellProperties, cellView);\n this._initNumericTextbox(element.find('#k-editor-table-cells-padding'), 'cellPadding', cellProperties, cellView);\n this._initCellAlignmentDropDown(element.find('#k-editor-cell-alignment'), cellProperties);\n this._initColorPicker(element.find('#k-editor-cell-bg'), 'bgColor', cellProperties, cellView);\n this._initInput(element.find('#k-editor-cell-css-class'), 'className', cellProperties, cellView);\n this._initInput(element.find('#k-editor-cell-id'), 'id', cellProperties, cellView);\n this._initNumericTextbox(element.find('#k-editor-cell-border-width'), 'borderWidth', cellProperties, cellView);\n this._initColorPicker(element.find('#k-editor-cell-border-color'), 'borderColor', cellProperties, cellView);\n this._initDropDownList(element.find('#k-editor-cell-border-style'), 'borderStyle', cellProperties, cellView, borderStyles);\n this._initCheckbox(element.find('#k-editor-wrap-text'), 'wrapText', cellProperties, cellView);\n },\n _initAccessibilityViewComponents: function (element, table) {\n var components = this.components;\n var accessibilityView = components.accessibilityView = {};\n var tableProperties = table.tableProperties;\n this._initInput(element.find('#k-editor-table-caption'), 'captionContent', tableProperties, accessibilityView);\n this._initAccessibilityAlignmentDropDown(element.find('#k-editor-accessibility-alignment'), tableProperties);\n this._initInput(element.find('#k-editor-accessibility-summary'), 'summary', tableProperties, accessibilityView);\n this._initCheckbox(element.find('#k-editor-cells-headers'), 'cellsWithHeaders', tableProperties, accessibilityView);\n },\n _initNumericTextbox: function (element, property, data, storage, settings) {\n var component = storage[property] = element.kendoNumericTextBox(settings ? $.extend({}, numericTextBoxSettings, settings) : numericTextBoxSettings).data('kendoNumericTextBox');\n if (property in data) {\n component.value(parseInt(data[property], 10));\n }\n },\n _initDropDownList: function (element, property, data, storage, dataSource) {\n var component = storage[property] = element.kendoDropDownList({ dataSource: dataSource }).data('kendoDropDownList');\n this._setComponentValue(component, data, property);\n },\n _initTableAlignmentDropDown: function (element, data) {\n var messages = this.options.messages;\n var tableView = this.components.tableView;\n var dataSource = tableAlignmentDropDownSettings.dataSource;\n dataSource[0].tooltip = messages.alignLeft;\n dataSource[1].tooltip = messages.alignCenter;\n dataSource[2].tooltip = messages.alignRight;\n dataSource[3].tooltip = messages.alignRemove;\n this._initAlignmentDropDown(element, tableAlignmentDropDownSettings, 'alignment', data, tableView);\n },\n _initCellAlignmentDropDown: function (element, data) {\n var messages = this.options.messages;\n var cellView = this.components.cellView;\n var dataSource = cellAlignmentDropDownSettings.dataSource;\n dataSource[0].tooltip = messages.alignLeftTop;\n dataSource[1].tooltip = messages.alignCenterTop;\n dataSource[2].tooltip = messages.alignRightTop;\n dataSource[3].tooltip = messages.alignLeftMiddle;\n dataSource[4].tooltip = messages.alignCenterMiddle;\n dataSource[5].tooltip = messages.alignRightMiddle;\n dataSource[6].tooltip = messages.alignLeftBottom;\n dataSource[7].tooltip = messages.alignCenterBottom;\n dataSource[8].tooltip = messages.alignRightBottom;\n dataSource[9].tooltip = messages.alignRemove;\n this._initAlignmentDropDown(element, cellAlignmentDropDownSettings, 'alignment', data, cellView);\n },\n _initAccessibilityAlignmentDropDown: function (element, data) {\n var messages = this.options.messages;\n var accessibilityView = this.components.accessibilityView;\n var dataSource = accessibilityAlignmentDropDownSettings.dataSource;\n dataSource[0].tooltip = messages.alignLeftTop;\n dataSource[1].tooltip = messages.alignCenterTop;\n dataSource[2].tooltip = messages.alignRightTop;\n dataSource[3].tooltip = messages.alignLeftBottom;\n dataSource[4].tooltip = messages.alignCenterBottom;\n dataSource[5].tooltip = messages.alignRightBottom;\n dataSource[6].tooltip = messages.alignRemove;\n this._initAlignmentDropDown(element, accessibilityAlignmentDropDownSettings, 'captionAlignment', data, accessibilityView);\n },\n _initAlignmentDropDown: function (element, settings, name, data, storage) {\n var component = storage[name] = element.kendoDropDownList(settings).data('kendoDropDownList');\n component.list.addClass('k-align').css('width', '110px');\n this._setComponentValue(component, data, name);\n },\n _setComponentValue: function (component, data, property) {\n if (property in data) {\n component.value(data[property]);\n }\n },\n _initColorPicker: function (element, property, data, storage) {\n var component = storage[property] = element.kendoColorPicker({\n buttons: false,\n clearButton: true\n }).data('kendoColorPicker');\n if (data[property]) {\n component.value(data[property]);\n }\n },\n _initInput: function (element, property, data, storage) {\n var component = storage[property] = element.get(0);\n if (property in data) {\n component.value = data[property];\n }\n },\n _initCheckbox: function (element, property, data, storage) {\n var component = storage[property] = element.get(0);\n if (property in data) {\n component.checked = data[property];\n }\n },\n destroy: function () {\n this._destroyComponents(this.components.tableView);\n this._destroyComponents(this.components.cellView);\n this._destroyComponents(this.components.accessibilityView);\n this._destroyComponents(this.components);\n delete this.components;\n },\n _destroyComponents: function (components) {\n for (var widget in components) {\n if (components[widget].destroy) {\n components[widget].destroy();\n }\n delete components[widget];\n }\n },\n _dialogTemplate: function (messages) {\n return kendo.template(dialogTemplate)({ messages: messages });\n }\n });\n kendo.ui.editor.TableWizardDialog = TableWizardDialog;\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('kendo.editor', [\n 'kendo.combobox',\n 'kendo.dropdownlist',\n 'kendo.resizable',\n 'kendo.window',\n 'kendo.colorpicker',\n 'kendo.imagebrowser',\n 'kendo.tabstrip',\n 'kendo.numerictextbox',\n 'util/undoredostack',\n 'editor/main',\n 'editor/dom',\n 'editor/serializer',\n 'editor/range',\n 'editor/system',\n 'editor/inlineformat',\n 'editor/formatblock',\n 'editor/linebreak',\n 'editor/lists',\n 'editor/link',\n 'editor/file',\n 'editor/image',\n 'editor/components',\n 'editor/indent',\n 'editor/viewhtml',\n 'editor/formatting',\n 'editor/toolbar',\n 'editor/tables',\n 'editor/export',\n 'editor/import',\n 'editor/resizing/column-resizing',\n 'editor/resizing/row-resizing',\n 'editor/resizing/table-resizing',\n 'editor/resizing/table-resize-handle',\n 'editor/immutables',\n 'editor/table-wizard/table-wizard-command',\n 'editor/table-wizard/table-wizard-dialog'\n ], f);\n}(function () {\n var __meta__ = {\n id: 'editor',\n name: 'Editor',\n category: 'web',\n description: 'Rich text editor component',\n depends: [\n 'combobox',\n 'dropdownlist',\n 'window',\n 'colorpicker'\n ],\n features: [\n {\n id: 'editor-imagebrowser',\n name: 'Image Browser',\n description: 'Support for uploading and inserting images',\n depends: ['imagebrowser']\n },\n {\n id: 'editor-resizable',\n name: 'Resize handle',\n description: 'Support for resizing the content area via a resize handle',\n depends: ['resizable']\n },\n {\n id: 'editor-tablewizard',\n name: 'Table wizard dialog',\n description: 'Support for table properties configuration',\n depends: [\n 'tabstrip',\n 'button',\n 'numerictextbox'\n ]\n },\n {\n id: 'editor-pdf-export',\n name: 'PDF export',\n description: 'Export Editor content as PDF',\n depends: [\n 'pdf',\n 'drawing'\n ]\n }\n ]\n };\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));"]}