/* * Kendo UI v2015.3.1111 (http://www.telerik.com/kendo-ui) * Copyright 2015 Telerik AD. All rights reserved. * * Kendo UI commercial licenses may be obtained at * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete * If you do not own a commercial license, this file shall be governed by the trial license terms. */ !function(e,define){define(["./kendo.combobox.min","./kendo.dropdownlist.min","./kendo.resizable.min","./kendo.window.min","./kendo.colorpicker.min","./kendo.imagebrowser.min","./kendo.core.min","./kendo.filebrowser.min"],e)}(function(){return function(){!function(e){var t=e.Observable.extend({init:function(t){e.Observable.fn.init.call(this,t),this.clear()},events:["undo","redo"],push:function(e){this.stack=this.stack.slice(0,this.currentCommandIndex+1),this.currentCommandIndex=this.stack.push(e)-1},undo:function(){if(this.canUndo()){var e=this.stack[this.currentCommandIndex--];e.undo(),this.trigger("undo",{command:e})}},redo:function(){if(this.canRedo()){var e=this.stack[++this.currentCommandIndex];e.redo(),this.trigger("redo",{command:e})}},clear:function(){this.stack=[],this.currentCommandIndex=-1},canUndo:function(){return this.currentCommandIndex>=0},canRedo:function(){return this.currentCommandIndex!=this.stack.length-1}});e.deepExtend(e,{util:{UndoRedoStack:t}})}(kendo)}(),function(){!function(e,t){var n,i,o,r,s=window.kendo,a=s.Class,l=s.ui.Widget,c=s.support.mobileOS,h=s.support.browser,u=e.extend,d=e.proxy,f=s.deepExtend,p=".kendoEditor",g=s.keys,m=a.extend({init:function(e){this.options=e},getHtml:function(){var e=this.options;return s.template(e.template,{useWithBlock:!1})(e)}}),v={editorWrapperTemplate:'',buttonTemplate:'#= data.title #',colorPickerTemplate:'
',comboBoxTemplate:'',separatorTemplate:'',overflowAnchorTemplate:'',formatByName:function(t,n){for(var i=0;n.length>i;i++)if(e.inArray(t,n[i].tags)>=0)return n[i]},registerTool:function(e,t){var n=t.options;n&&n.template&&(n.template.options.cssClass="k-"+e),t.name||(t.options.name=e,t.name=e.toLowerCase()),b.defaultTools[e]=t},registerFormat:function(e,t){b.fn.options.formats[e]=t}},_={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",superscript:"Superscript",subscript:"Subscript",justifyCenter:"Center text",justifyLeft:"Align text left",justifyRight:"Align text right",justifyFull:"Justify",insertUnorderedList:"Insert unordered list",insertOrderedList:"Insert ordered list",indent:"Indent",outdent:"Outdent",createLink:"Insert hyperlink",unlink:"Remove hyperlink",insertImage:"Insert image",insertFile:"Insert file",insertHtml:"Insert HTML",viewHtml:"View HTML",fontName:"Select font family",fontNameInherit:"(inherited font)",fontSize:"Select font size",fontSizeInherit:"(inherited size)",formatBlock:"Format",formatting:"Format",foreColor:"Color",backColor:"Background color",style:"Styles",emptyFolder:"Empty Folder",editAreaTitle:"Editable area. Press F10 for toolbar.",uploadFile:"Upload",orderBy:"Arrange by:",orderBySize:"Size",orderByName:"Name",invalidFileType:'The selected file "{0}" is not valid. Supported file types are {1}.',deleteFile:'Are you sure you want to delete "{0}"?',overwriteFile:'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',directoryNotFound:"A directory with this name was not found.",imageWebAddress:"Web address",imageAltText:"Alternate text",imageWidth:"Width (px)",imageHeight:"Height (px)",fileWebAddress:"Web address",fileTitle:"Title",linkWebAddress:"Web address",linkText:"Text",linkToolTip:"ToolTip",linkOpenInNewWindow:"Open link in new window",dialogUpdate:"Update",dialogInsert:"Insert",dialogCancel:"Cancel",createTable:"Create table",createTableHint:"Create a {0} x {1} table",addColumnLeft:"Add column on the left",addColumnRight:"Add column on the right",addRowAbove:"Add row above",addRowBelow:"Add row below",deleteRow:"Delete row",deleteColumn:"Delete column"},w=!c||c.ios&&c.flatVersion>=500||!c.ios&&t!==document.documentElement.contentEditable,y={basic:["bold","italic","underline"],alignment:["justifyLeft","justifyCenter","justifyRight"],lists:["insertUnorderedList","insertOrderedList"],indenting:["indent","outdent"],links:["createLink","unlink"],tables:["createTable","addColumnLeft","addColumnRight","addRowAbove","addRowBelow","deleteRow","deleteColumn"]},b=l.extend({init:function(t,n){var i,o,r,a,c,h=this,g=s.ui.editor,m=g.Dom;w&&(l.fn.init.call(h,t,n),h.options=f({},h.options,n),h.options.tools=h.options.tools.slice(),t=h.element,c=t[0],a=m.name(c),t.closest("form").on("submit"+p,function(){h.update()}),r=u({},h.options),r.editor=h,"textarea"==a?(h._wrapTextarea(),o=h.wrapper.find(".k-editor-toolbar"),c.id&&o.attr("aria-controls",c.id)):(h.element.attr("contenteditable",!0).addClass("k-widget k-editor k-editor-inline"),r.popup=!0,o=e('"),s=this.isBlock(t),w.focus(),l=w.getRange(),l.deleteContents(),l.startContainer==w.document&&l.selectNodeContents(w.body),c=new u,h=c.addCaret(l),f=this.splittableParent(s,h),p=!1,g=f!=w.body&&!a.is(f,"td"),n.split&&g&&(s||a.isInline(f))&&(l.selectNode(h),o.RangeUtils.split(l,f,!0),p=!0),m=this.htmlToFragment(t),m.firstChild&&"k-paste-container"===m.firstChild.className){for(v=[],i=0,r=m.childNodes.length;r>i;i++)v.push(m.childNodes[i].innerHTML);m=this.htmlToFragment(v.join("
"))}if(e(m.childNodes).filter("table").addClass("k-table").end().find("table").addClass("k-table"),l.insertNode(m),f=this.splittableParent(s,h),p){for(;h.parentNode!=f;)a.unwrap(h.parentNode);a.unwrap(h.parentNode)}a.normalize(l.commonAncestorContainer),h.style.display="inline",a.restoreScrollTop(w.document),a.scrollTo(h),c.removeCaret(l),_=l.commonAncestorContainer.parentNode,l.collapsed&&"tbody"==a.name(_)&&(l.setStartAfter(e(_).closest("table")[0]),l.collapse(!0)),w.selectRange(l)}}),x=i.extend({clean:function(e){var t,n,i=this,o=i.replacements;for(t=0,n=o.length;n>t;t+=2)e=e.replace(o[t],o[t+1]);return e}}),k=x.extend({init:function(){this.replacements=[/<(\/?)script([^>]*)>/i,"<$1telerik:script$2>"]},applicable:function(e){return/]*>/i.test(e)}}),C=x.extend({init:function(){var e=" ";this.replacements=[/]*>\s*<\/span>/gi,e,/\t/gi,e,/    /gi,e]},applicable:function(e){return/    |class="?Apple-tab-span/i.test(e)}}),S=x.extend({init:function(){this.replacements=[/<\?xml[^>]*>/gi,"",//g,"",/"/g,"'",/(?:
 [\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,"$1",/

/g,"

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

/g,"
",/^\s*( )+/gi,"",/( |]*>)+\s*$/gi,"",/mso-[^;"]*;?/gi,"",/<(\/?)b(\s[^>]*)?>/gi,"<$1strong$2>",/<(\/?)font(\s[^>]*)?>/gi,this.convertFontMatch,/<(\/?)i(\s[^>]*)?>/gi,"<$1em$2>",/ <\/o:p>/gi," ",/<\/?(meta|link|style|o:|v:|x:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:|x:)[^>]*>)?/gi,"",/<\/o>/g,"",/style=(["|'])\s*\1/g,"",/(]*>)?\n/g,function(e,t){return t?e:" "}]},convertFontMatch:function(e,t,n){var i=/face=['"]([^'"]+)['"]/i,o=i.exec(n),r=n&&o&&o[1];return t?"
":r?'':""},applicable:function(e){return/class="?Mso/i.test(e)||/style="[^"]*mso-/i.test(e)||/urn:schemas-microsoft-com:office/.test(e)},stripEmptyAnchors:function(e){return e.replace(/]*)>\s*<\/a>/gi,function(e,t){return!t||t.indexOf("href")<0?"":e})},listType:function(e){var t;return/^(]*texhtml[^>]*>)?]*(Symbol|Wingdings)[^>]*>/i.test(e)&&(t=!0),e=e.replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," "),!t&&/^[\u2022\u00b7\u00a7\u00d8o]\u00a0+/.test(e)||t&&/^.\u00a0+/.test(e)?"ul":/^\s*\w+[\.\)]\u00a0{2,}/.test(e)?"ol":void 0},_convertToLi:function(e){var t;return 1==e.childNodes.length?t=e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(a.remove(e.firstChild),3==e.firstChild.nodeType&&/^[ivx]+\.$/i.test(e.firstChild.nodeValue)&&a.remove(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&a.remove(e.firstChild),t=e.innerHTML),a.remove(e),a.create(document,"li",{innerHTML:t})},lists:function(t){var n,i,o,r,s,l,c,h,u,d=e(a.blockElements.join(","),t),f=-1,p={ul:{},ol:{}},g=t;for(o=0;d.length>o;o++)if(r=d[o],s=this.listType(r.innerHTML),i=a.name(r),"td"!=i)if(s&&"p"==i){if(l=parseFloat(r.style.marginLeft||0),c=p[s][l],(l>f||!c)&&(c=a.create(document,s),g==t?a.insertBefore(c,r):g.appendChild(c),p[s][l]=c),n!=s)for(h in p)for(u in p[h])e.contains(c,p[h][u])&&delete p[h][u];g=this._convertToLi(r),c.appendChild(g),f=l,n=s}else r.innerHTML?(p={ul:{},ol:{}},g=t,f=-1):a.remove(r)},removeAttributes:function(e){for(var t=e.attributes,n=t.length;n--;)"colspan"!=a.name(t[n])&&e.removeAttributeNode(t[n])},createColGroup:function(t){var i=t.cells,o=e(t).closest("table"),r=o.children("colgroup");2>i.length||(r.length&&(i=r.children(),r[0].parentNode.removeChild(r[0])),r=e(e.map(i,function(e){var t=e.width;return t&&0!==parseInt(t,10)?n.format('',t):""}).join("")),r.is("colgroup")||(r=e("").append(r)),r.prependTo(o))},convertHeaders:function(t){var n,i=t.cells,o=e.map(i,function(t){var n=e(t).children("p").children("strong")[0];return n&&"strong"==a.name(n)?n:void 0});if(o.length==i.length){for(n=0;o.length>n;n++)a.unwrap(o[n]);for(e(t).closest("table").find("colgroup").after("").end().find("thead").append(t),n=0;i.length>n;n++)a.changeTag(i[n],"th")}},removeParagraphs:function(t){var n,i,o,r,s;for(n=0;t.length>n;n++)for(this.removeAttributes(t[n]),r=e(t[n]),s=r.children("p"),i=0,o=s.length;o>i;i++)o-1>i&&a.insertAfter(a.create(document,"br"),s[i]),a.unwrap(s[i])},removeDefaultColors:function(e){for(var t=0;e.length>t;t++)/^\s*color:\s*[^;]*;?$/i.test(e[t].style.cssText)&&a.unwrap(e[t])},tables:function(t){var n,i,o,r,s,a=e(t).find("table"),l=this;for(r=0;a.length>r;r++){for(n=a[r].rows,o=i=n[0],s=1;n.length>s;s++)n[s].cells.length>o.cells.length&&(o=n[s]);l.createColGroup(o),l.convertHeaders(i),l.removeAttributes(a[r]),l.removeParagraphs(a.eq(r).find("td,th")),l.removeDefaultColors(a.eq(r).find("span"))}},headers:function(t){var n,i=e(t).find("p.MsoTitle");for(n=0;i.length>n;n++)a.changeTag(i[n],"h1")},clean:function(e){var t,n=this;return e=x.fn.clean.call(n,e),e=n.stripEmptyAnchors(e),t=a.create(document,"div",{innerHTML:e}),n.headers(t),n.lists(t),n.tables(t),e=t.innerHTML.replace(/(<[^>]*)\s+class="?[^"\s>]*"?/gi,"$1")}}),T=x.extend({init:function(){this.replacements=[/\s+class="Apple-style-span[^"]*"/gi,"",/<(div|p|h[1-6])\s+style="[^"]*"/gi,"<$1",/^
(.*)<\/div>$/,"$1"]},applicable:function(e){return/class="?Apple-style-span|style="[^"]*-webkit-nbsp-mode/i.test(e)}}),A=f.extend({init:function(e){f.fn.init.call(this,e),this.managesUndoRedo=!0},exec:function(){var e=this.editor;n.support.browser.msie?e.document.execCommand("print",!1,null):e.window.print&&e.window.print()}}),D=f.extend({init:function(e){this.async=!0,f.fn.init.call(this,e)},exec:function(){var e=this,t=this.lockRange(!0);this.editor.saveAsPDF().then(function(){e.releaseRange(t)})}});d(o,{_finishUpdate:t,Command:f,GenericCommand:p,InsertHtmlCommand:g,InsertHtmlTool:m,TypingHandler:v,SystemHandler:w,BackspaceHandler:_,Keyboard:y,Clipboard:b,Cleaner:x,TabCleaner:C,MSWordFormatCleaner:S,WebkitFormatCleaner:T,PrintCommand:A,ExportPdfCommand:D}),s("insertHtml",new m({template:new c({template:r.dropDownListTemplate,title:"Insert HTML",initialValue:"Insert HTML"})})),s("print",new l({command:A,template:new c({template:r.buttonTemplate,title:"Print"})})),s("pdf",new l({command:D,template:new c({template:r.buttonTemplate,title:"Export PDF"})}))}(window.kendo.jQuery)}(),function(){!function(e){var t=window.kendo,n=t.Class,i=t.ui.editor,o=t.ui.Editor.fn.options.formats,r=i.EditorUtils,s=i.Tool,a=i.ToolTemplate,l=i.FormatTool,c=i.Dom,h=i.RangeUtils,u=e.extend,d=i.EditorUtils.registerTool,f=i.EditorUtils.registerFormat,p="k-marker",g=n.extend({init:function(e){this.format=e},numberOfSiblings:function(e){var t,n=0,i=0,o=0,r=e.parentNode;for(t=r.firstChild;t;t=t.nextSibling)t!=e&&(t.className==p?o++:3==t.nodeType?n++:i++);return o>1&&r.firstChild.className==p&&r.lastChild.className==p?0:i+n},findSuitable:function(e,t){var n,i;if(!t&&this.numberOfSiblings(e)>0)return null;for(n=e.parentNode,i=this.format[0].tags;!c.ofType(n,i);){if(this.numberOfSiblings(n)>0)return null;n=n.parentNode}return n},findFormat:function(e){var t,n,i,o,r,s=this.format,a=c.attrEquals;for(t=0,n=s.length;n>t;t++){if(i=e,o=s[t].tags,r=s[t].attr,i&&c.ofType(i,o)&&a(i,r))return i;for(;i;)if(i=c.parentOfType(i,o),i&&a(i,r))return i}return null},isFormatted:function(e){var t,n;for(t=0,n=e.length;n>t;t++)if(this.findFormat(e[t]))return!0;return!1}}),m=n.extend({init:function(e,t){this.finder=new g(e),this.attributes=u({},e[0].attr,t),this.tag=e[0].tags[0]},wrap:function(e){return c.wrap(e,c.create(e.ownerDocument,this.tag,this.attributes))},activate:function(e,t){this.finder.isFormatted(t)?(this.split(e),this.remove(t)):this.apply(t)},toggle:function(e){var t=h.textNodes(e);t.length>0&&this.activate(e,t)},apply:function(e){var t,n,i,o,r=[];for(t=0,n=e.length;n>t;t++){if(i=e[t],o=this.finder.findSuitable(i))c.attr(o,this.attributes);else{for(;!c.isBlock(i.parentNode)&&1==i.parentNode.childNodes.length;)i=i.parentNode;o=this.wrap(i)}r.push(o)}this.consolidate(r)},remove:function(e){var t,n,i;for(t=0,n=e.length;n>t;t++)i=this.finder.findFormat(e[t]),i&&(this.attributes&&this.attributes.style?(c.unstyle(i,this.attributes.style),i.style.cssText||i.attributes["class"]||c.unwrap(i)):c.unwrap(i))},split:function(e){var t,n,i=h.textNodes(e),o=i.length;if(o>0)for(t=0;o>t;t++)n=this.finder.findFormat(i[t]),n&&h.split(e,n,!0)},consolidate:function(e){for(var t,n;e.length>1;)if(t=e.pop(),n=e[e.length-1],t.previousSibling&&t.previousSibling.className==p&&n.appendChild(t.previousSibling),t.tagName==n.tagName&&t.previousSibling==n&&t.style.cssText==n.style.cssText){for(;t.firstChild;)n.appendChild(t.firstChild);c.remove(t)}}}),v=g.extend({init:function(e,t){this.format=e,this.greedyProperty=t,g.fn.init.call(this,e)},getInlineCssValue:function(t){var n,i,o,r,s,a,l,h,u,d,f,p,g=t.attributes,m=e.trim;if(g)for(n=0,i=g.length;i>n;n++)if(o=g[n],r=o.nodeName,s=o.nodeValue,o.specified&&"style"==r)for(a=m(s||t.style.cssText).split(";"),h=0,u=a.length;u>h;h++)if(l=a[h],l.length){if(d=l.split(":"),f=m(d[0].toLowerCase()),p=m(d[1]),f!=this.greedyProperty)continue;return f.indexOf("color")>=0?c.toHex(p):p}},getFormatInner:function(t){var n,i,o,r=e(c.isDataNode(t)?t.parentNode:t),s=r.parentsUntil("[contentEditable]").addBack().toArray().reverse();for(n=0,i=s.length;i>n;n++)if(o="className"==this.greedyProperty?s[n].className:this.getInlineCssValue(s[n]))return o;return"inherit"},getFormat:function(e){var t,n,i=this.getFormatInner(e[0]);for(t=1,n=e.length;n>t;t++)if(i!=this.getFormatInner(e[t]))return"";return i},isFormatted:function(e){return""!==this.getFormat(e)}}),_=m.extend({init:function(e,n,i){m.fn.init.call(this,e,n),this.values=n,this.finder=new v(e,i),i&&(this.greedyProperty=t.toCamelCase(i))},activate:function(e,t){var n=this.greedyProperty,i="apply";this.split(e),n&&"inherit"==this.values.style[n]&&(i="remove"),this[i](t)}}),w=l.extend({init:function(e){l.fn.init.call(this,u(e,{finder:new g(e.format),formatter:function(){return new m(e.format)}}))}}),y=s.extend({update:function(e,t){var n=e.data(this.type);n.close(),n.value(this.finder.getFormat(t))}}),b=y.extend({init:function(e){s.fn.init.call(this,e),this.type=t.support.browser.msie||t.support.touch?"kendoDropDownList":"kendoComboBox",this.format=[{tags:["span"]}],this.finder=new v(this.format,e.cssAttr)},command:function(e){var t=this.options,n=this.format,o={};return new i.FormatCommand(u(e,{formatter:function(){return o[t.domAttr]=e.value,new _(n,{style:o},t.cssAttr)}}))},initialize:function(e,t){var n,i=t.editor,o=this.options,r=o.name,a=[];o.defaultValue&&(a=[{text:i.options.messages[o.defaultValue[0].text],value:o.defaultValue[0].value}]),n=a.concat(o.items?o.items:i.options[r]||[]),e[this.type]({dataTextField:"text",dataValueField:"value",dataSource:n,change:function(){s.exec(i,r,this.value())},highlightFirst:!1}),e.closest(".k-widget").removeClass("k-"+r).find("*").addBack().attr("unselectable","on"),e.data(this.type).value("inherit")}}),x=s.extend({init:function(e){s.fn.init.call(this,e),this.format=[{tags:["span"]}],this.finder=new v(this.format,e.cssAttr)},options:{palette:"websafe"},update:function(){this._widget.close()},command:function(e){var t=this.options,n=this.format,o={};return new i.FormatCommand(u(e,{formatter:function(){return o[t.domAttr]=e.value,new _(n,{style:o},t.cssAttr)}}))},initialize:function(e,n){var i=n.editor,o=this.name,r=u({},x.fn.options,this.options),a=r.palette;e=this._widget=new t.ui.ColorPicker(e,{toolIcon:"k-"+r.name,palette:a,change:function(){var t=e.value();t&&s.exec(i,o,t),i.focus()},activate:function(t){t.preventDefault(),e.trigger("change")}}),e.wrapper.attr({title:n.title,unselectable:"on"}).find("*").attr("unselectable","on")}});u(i,{InlineFormatFinder:g,InlineFormatter:m,DelayedExecutionTool:y,GreedyInlineFormatFinder:v,GreedyInlineFormatter:_,InlineFormatTool:w,FontTool:b,ColorTool:x}),f("bold",[{tags:["strong","b"]},{tags:["span"],attr:{style:{fontWeight:"bold"}}}]),d("bold",new w({key:"B",ctrl:!0,format:o.bold,template:new a({template:r.buttonTemplate,title:"Bold"})})),f("italic",[{tags:["em","i"]},{tags:["span"],attr:{style:{fontStyle:"italic"}}}]),d("italic",new w({key:"I",ctrl:!0,format:o.italic,template:new a({template:r.buttonTemplate,title:"Italic"})})),f("underline",[{tags:["span"],attr:{style:{textDecoration:"underline"}}},{tags:["u"]}]),d("underline",new w({key:"U",ctrl:!0,format:o.underline,template:new a({template:r.buttonTemplate,title:"Underline"})})),f("strikethrough",[{tags:["del","strike"]},{tags:["span"],attr:{style:{textDecoration:"line-through"}}}]),d("strikethrough",new w({format:o.strikethrough,template:new a({template:r.buttonTemplate,title:"Strikethrough"})})),f("superscript",[{tags:["sup"]}]),d("superscript",new w({format:o.superscript,template:new a({template:r.buttonTemplate,title:"Superscript"})})),f("subscript",[{tags:["sub"]}]),d("subscript",new w({format:o.subscript,template:new a({template:r.buttonTemplate,title:"Subscript"})})),d("foreColor",new x({cssAttr:"color",domAttr:"color",name:"foreColor",template:new a({template:r.colorPickerTemplate,title:"Color"})})),d("backColor",new x({cssAttr:"background-color",domAttr:"backgroundColor",name:"backColor",template:new a({template:r.colorPickerTemplate,title:"Background Color"})})),d("fontName",new b({cssAttr:"font-family",domAttr:"fontFamily",name:"fontName",defaultValue:[{text:"fontNameInherit",value:"inherit"}],template:new a({template:r.comboBoxTemplate,title:"Font Name"})})),d("fontSize",new b({cssAttr:"font-size",domAttr:"fontSize",name:"fontSize",defaultValue:[{text:"fontSizeInherit",value:"inherit"}],template:new a({template:r.comboBoxTemplate,title:"Font Size"})}))}(window.kendo.jQuery)}(),function(){!function(e){var t,n=window.kendo,i=n.Class,o=e.extend,r=n.ui.editor,s=n.ui.Editor.fn.options.formats,a=r.Dom,l=r.Command,c=r.ToolTemplate,h=r.FormatTool,u=r.EditorUtils,d=u.registerTool,f=u.registerFormat,p=r.RangeUtils,g=i.extend({init:function(e){this.format=e},contains:function(e,t){var n,i,o;for(n=0,i=t.length;i>n;n++)if(o=t[n],!o||!a.isAncestorOrSelf(e,o))return!1;return!0},findSuitable:function(t){var n,i,o,r,s=this.format,l=[];for(n=0,i=t.length;i>n;n++){for(r=s.length-1;r>=0&&!(o=a.ofType(t[n],s[r].tags)?t[n]:a.parentOfType(t[n],s[r].tags));r--);if(!o||"true"===o.contentEditable)return[];e.inArray(o,l)<0&&l.push(o)}for(n=0,i=l.length;i>n;n++)if(this.contains(l[n],l))return[l[n]];return l},findFormat:function(e){var t,n,i,o,r,s=this.format,l=a.editableParent(e);for(t=0,n=s.length;n>t;t++)for(i=e,o=s[t].tags,r=s[t].attr;i&&a.isAncestorOf(l,i);){if(a.ofType(i,o)&&a.attrEquals(i,r))return i;i=i.parentNode}return null},getFormat:function(e){var t,n,i=this,o=function(e){return i.findFormat(a.isDataNode(e)?e.parentNode:e)},r=o(e[0]);if(!r)return"";for(t=1,n=e.length;n>t;t++)if(r!=o(e[t]))return"";return r.nodeName.toLowerCase()},isFormatted:function(e){for(var t=0,n=e.length;n>t;t++)if(!this.findFormat(e[t]))return!1;return!0}}),m=i.extend({init:function(e,t){this.format=e,this.values=t,this.finder=new g(e)},wrap:function(e,t,n){var i,o,r,s,l,c=1==n.length?a.blockParentOrBody(n[0]):a.commonAncestor.apply(null,n);for(a.isInline(c)&&(c=a.blockParentOrBody(c)),i=a.significantChildNodes(c),o=a.findNodeIndex(i[0]),r=a.create(c.ownerDocument,e,t),s=0;i.length>s;s++)l=i[s],a.isBlock(l)?(a.attr(l,t),r.childNodes.length&&(a.insertBefore(r,l),r=r.cloneNode(!1)),o=a.findNodeIndex(l)+1):r.appendChild(l);r.firstChild&&a.insertAt(c,r,o)},apply:function(t){function n(e){return o({},e&&e.attr,h)}var i,r,s,l,c,h=this.values,d=a.filter("img",t),f=u.formatByName("img",this.format),p=n(f);if(e.each(d,function(){a.attr(this,p)}),d.length!=t.length)if(r=a.filter("img",t,!0),s=this.finder.findSuitable(r),s.length)for(l=0,c=s.length;c>l;l++)i=u.formatByName(a.name(s[l]),this.format),a.attr(s[l],n(i));else i=this.format[0],this.wrap(i.tags[0],n(i),r)},remove:function(e){var t,n,i,o,r;for(t=0,n=e.length;n>t;t++)i=this.finder.findFormat(e[t]),i&&(r=a.name(i),"div"!=r||i.getAttribute("class")?(o=u.formatByName(r,this.format),o.attr.style&&a.unstyle(i,o.attr.style),o.attr.className&&a.removeClass(i,o.attr.className)):a.unwrap(i))},toggle:function(e){var t=this,n=p.nodes(e);t.finder.isFormatted(n)?t.remove(n):t.apply(n)}}),v=i.extend({init:function(e,t){var n=this;n.format=e,n.values=t,n.finder=new g(e)},apply:function(e){var t,n,i,o,s,l,c,h=this.format,u=a.blockParents(e),d=h[0].tags[0];if(u.length)for(t=0,n=u.length;n>t;t++)c=a.name(u[t]),"li"==c?(i=u[t].parentNode,o=new r.ListFormatter(i.nodeName.toLowerCase(),d),s=this.editor.createRange(),s.selectNode(u[t]),o.toggle(s)):d&&("td"==c||u[t].attributes.contentEditable)?new m(h,this.values).apply(u[t].childNodes):(l=a.changeTag(u[t],d),a.attr(l,h[0].attr));else new m(h,this.values).apply(e)},toggle:function(e){var t=p.textNodes(e);t.length||(e.selectNodeContents(e.commonAncestorContainer),t=p.textNodes(e),t.length||(t=a.significantChildNodes(e.commonAncestorContainer))),this.apply(t)}}),_=l.extend({init:function(e){e.formatter=e.formatter(),l.fn.init.call(this,e)}}),w=h.extend({init:function(e){h.fn.init.call(this,o(e,{finder:new g(e.format),formatter:function(){return new m(e.format)}}))}});o(r,{BlockFormatFinder:g,BlockFormatter:m,GreedyBlockFormatter:v,FormatCommand:_,BlockFormatTool:w}),t=["ul","ol","li"],f("justifyLeft",[{tags:a.nonListBlockElements,attr:{style:{textAlign:"left"}}},{tags:["img"],attr:{style:{"float":"left",display:"",marginLeft:"",marginRight:""}}},{tags:t,attr:{style:{textAlign:"left",listStylePosition:""}}}]),d("justifyLeft",new w({format:s.justifyLeft,template:new c({template:u.buttonTemplate,title:"Justify Left"})})),f("justifyCenter",[{tags:a.nonListBlockElements,attr:{style:{textAlign:"center"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto","float":""}}},{tags:t,attr:{style:{textAlign:"center",listStylePosition:"inside"}}}]),d("justifyCenter",new w({format:s.justifyCenter,template:new c({template:u.buttonTemplate,title:"Justify Center"})})),f("justifyRight",[{tags:a.nonListBlockElements,attr:{style:{textAlign:"right"}}},{tags:["img"],attr:{style:{"float":"right",display:"",marginLeft:"",marginRight:""}}},{tags:t,attr:{style:{textAlign:"right",listStylePosition:"inside"}}}]),d("justifyRight",new w({format:s.justifyRight,template:new c({template:u.buttonTemplate,title:"Justify Right"})})),f("justifyFull",[{tags:a.nonListBlockElements,attr:{style:{textAlign:"justify"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto","float":""}}},{tags:t,attr:{style:{textAlign:"justify",listStylePosition:""}}}]),d("justifyFull",new w({format:s.justifyFull,template:new c({template:u.buttonTemplate,title:"Justify Full"})}))}(window.kendo.jQuery)}(),function(){!function(e){var t=window.kendo,n=e.extend,i=t.ui.editor,o=i.Dom,r=i.Command,s=i.Tool,a=i.BlockFormatter,l=o.normalize,c=i.RangeUtils,h=i.EditorUtils.registerTool,u=r.extend({init:function(e){this.options=e,r.fn.init.call(this,e)},_insertMarker:function(e,t){var n,i=o.create(e,"a");return i.className="k-marker",t.insertNode(i),i.parentNode||(n=t.commonAncestorContainer,n.innerHTML="",n.appendChild(i)),l(i.parentNode),i},_moveFocus:function(e,t){if(o.isEmpty(t))e.setStartBefore(t);else{e.selectNodeContents(t);var n=c.textNodes(e)[0];if(!n){for(;t.childNodes.length&&!o.is(t.firstChild,"br");)t=t.firstChild;n=t}o.isEmpty(n)?e.setStartBefore(n):(o.emptyNode(n)&&(n.innerHTML="\ufeff"),e.setStartBefore(n.firstChild||n))}},shouldTrim:function(e){var t="p,h1,h2,h3,h4,h5,h6".split(","),n=o.parentOfType(e.startContainer,t),i=o.parentOfType(e.endContainer,t);return n&&!i||!n&&i},_blankAfter:function(e){for(;e&&(o.isMarker(e)||""===o.stripBom(e.nodeValue));)e=e.nextSibling;return!e},exec:function(){var e,t,n,r,s,h,u,d,f=this.getRange(),p=c.documentFromRange(f),g=i.emptyElementContent,m=this.shouldTrim(f);f.deleteContents(),s=this._insertMarker(p,f),h=o.closestEditableOfType(s,["li"]),u=o.closestEditableOfType(s,"h1,h2,h3,h4,h5,h6".split(",")),h?o.emptyNode(h)&&(r=o.create(p,"p"),h.nextSibling&&(d=f.cloneRange(),d.selectNode(h),c.split(d,h.parentNode)),o.insertAfter(r,h.parentNode),o.remove(1==h.parentNode.childNodes.length?h.parentNode:h),r.innerHTML=g,n=r):u&&this._blankAfter(s)&&(r=o.create(p,"p"),o.insertAfter(r,u),r.innerHTML=g,o.remove(s),n=r),n||(h||u||new a([{tags:["p"]}]).apply([s]),f.selectNode(s),e=o.parentOfType(s,[h?"li":u?o.name(u):"p"]),c.split(f,e,m),t=e.previousSibling,o.is(t,"li")&&t.firstChild&&!o.is(t.firstChild,"br")&&(t=t.firstChild),n=e.nextSibling,this.clean(t),this.clean(n,{links:!0}),o.is(n,"li")&&n.firstChild&&!o.is(n.firstChild,"br")&&(n=n.firstChild),o.remove(e),l(t)),l(n),this._moveFocus(f,n),f.collapse(!0),o.scrollTo(n),c.selectRange(f)},clean:function(t,n){var r,s=t;if(t.firstChild&&o.is(t.firstChild,"br")&&o.remove(t.firstChild),o.isDataNode(t)&&!t.nodeValue&&(t=t.parentNode),t){for(r=!1;t.firstChild&&1==t.firstChild.nodeType;)r=r||o.significantNodes(t.childNodes).length>1,t=t.firstChild;if(o.isEmpty(t)||!/^\s*$/.test(t.innerHTML)||r||(e(s).find(".k-br").remove(),t.innerHTML=i.emptyElementContent),n&&n.links)for(;t!=s;){if(o.is(t,"a")&&o.emptyNode(t)){o.unwrap(t);break}t=t.parentNode}}}}),d=r.extend({init:function(e){this.options=e,r.fn.init.call(this,e)},exec:function(){var e,n=this.getRange(),i=o.create(c.documentFromRange(n),"br"),r=t.support.browser,s=r.msie&&11>r.version;n.deleteContents(),n.insertNode(i),l(i.parentNode),s||i.nextSibling&&!o.isWhitespace(i.nextSibling)||(e=i.cloneNode(!0),e.className="k-br",o.insertAfter(e,i)),n.setStartAfter(i),n.collapse(!0),o.scrollTo(i.nextSibling||i),c.selectRange(n)}});n(i,{ParagraphCommand:u,NewLineCommand:d}),h("insertLineBreak",new s({key:13,shift:!0,command:d})),h("insertParagraph",new s({key:13,command:u}))}(window.kendo.jQuery)}(),function(){!function(e){var t=window.kendo,n=t.Class,i=e.extend,o=t.ui.editor,r=o.Dom,s=o.RangeUtils,a=o.EditorUtils,l=o.Command,c=o.ToolTemplate,h=o.FormatTool,u=o.BlockFormatFinder,d=s.textNodes,f=o.EditorUtils.registerTool,p=u.extend({init:function(e){this.tag=e;var t=this.tags=["ul"==e?"ol":"ul",e];u.fn.init.call(this,[{tags:t}])},isFormatted:function(e){var t,n,i=[];for(n=0;e.length>n;n++)t=this.findFormat(e[n]),t&&r.name(t)==this.tag&&i.push(t);if(1>i.length)return!1;if(i.length!=e.length)return!1;for(n=0;i.length>n&&i[n].parentNode==t.parentNode;n++)if(i[n]!=t)return!1;return!0},findSuitable:function(e){var t=this.findFormat(e[0]);return t&&r.name(t)==this.tag?t:null}}),g=n.extend({init:function(e,t){var n=this;n.finder=new p(e),n.tag=e,n.unwrapTag=t},isList:function(e){var t=r.name(e);return"ul"==t||"ol"==t||"dl"==t},wrap:function(e,t){var n,i,o=r.create(e.ownerDocument,"li");for(n=0;t.length>n;n++)if(i=t[n],r.is(i,"li"))e.appendChild(i);else if(this.isList(i))for(;i.firstChild;)e.appendChild(i.firstChild);else if(r.is(i,"td")){for(;i.firstChild;)o.appendChild(i.firstChild);e.appendChild(o),i.appendChild(e),e=e.cloneNode(!1),o=o.cloneNode(!1)}else o.appendChild(i),r.isBlock(i)&&(e.appendChild(o),r.unwrap(i),o=o.cloneNode(!1));o.firstChild&&e.appendChild(o)},containsAny:function(e,t){for(var n=0;t.length>n;n++)if(r.isAncestorOrSelf(e,t[n]))return!0;return!1},suitable:function(e,t){if("k-marker"==e.className){var n=e.nextSibling;if(n&&r.isBlock(n))return!1;if(n=e.previousSibling,n&&r.isBlock(n))return!1}return this.containsAny(e,t)||r.isInline(e)||3==e.nodeType},_parentLists:function(t){var n=r.closestEditable(t);return e(t).parentsUntil(n,"ul,ol")},split:function(e){var t,n,i,o,a,l,c=d(e);if(c.length)for(t=r.parentOfType(c[0],["li"]),n=r.parentOfType(c[c.length-1],["li"]),e.setStartBefore(t),e.setEndAfter(n),o=0,a=c.length;a>o;o++)l=this.finder.findFormat(c[o]),l&&(i=this._parentLists(l),i.length?s.split(e,i.last()[0],!0):s.split(e,l,!0))},merge:function(e,t){for(var n,i=t.previousSibling;i&&("k-marker"==i.className||3==i.nodeType&&r.isWhitespace(i));)i=i.previousSibling;if(i&&r.name(i)==e){for(;t.firstChild;)i.appendChild(t.firstChild);r.remove(t),t=i}for(n=t.nextSibling;n&&("k-marker"==n.className||3==n.nodeType&&r.isWhitespace(n));)n=n.nextSibling;if(n&&r.name(n)==e){for(;t.lastChild;)n.insertBefore(t.lastChild,n.firstChild);r.remove(t)}},breakable:function(e){return e!=e.ownerDocument.body&&!/table|tbody|tr|td/.test(r.name(e))&&!e.attributes.contentEditable},applyOnSection:function(t,n){function i(){u.push(this)}var o,s,a,l,c=this.tag,h=r.closestSplittableParent(n),u=[],d=this.finder.findSuitable(n);for(d||(d=new p("ul"==c?"ol":"ul").findSuitable(n)),/table|tbody/.test(r.name(h))?o=e.map(n,function(e){return r.parentOfType(e,["td"])}):(o=r.significantChildNodes(h),e.grep(o,r.isBlock).length&&(o=e.grep(o,e.proxy(function(e){return this.containsAny(e,n)},this))),o.length||(o=n)),s=0;o.length>s;s++)a=o[s],l=(!d||!r.isAncestorOrSelf(d,a))&&this.suitable(a,n),l&&(d&&this.isList(a)?(e.each(a.childNodes,i),r.remove(a)):u.push(a));u.length==o.length&&this.breakable(h)&&(u=[h]),d||(d=r.create(h.ownerDocument,c),r.insertBefore(d,u[0])),this.wrap(d,u),r.is(d,c)||r.changeTag(d,c),this.merge(c,d)},apply:function(e){var t,n,i,o=0,s=[];do i=r.closestEditable(e[o],["td","body"]),t&&i==t?n.push(e[o]):(t&&s.push({section:t,nodes:n}),n=[e[o]],t=i),o++;while(e.length>o);for(s.push({section:t,nodes:n}),o=0;s.length>o;o++)this.applyOnSection(s[o].section,s[o].nodes)},unwrap:function(e){var t,n,i,o,s=e.ownerDocument.createDocumentFragment(),a=this.unwrapTag;for(n=e.firstChild;n;n=n.nextSibling){for(i=r.create(e.ownerDocument,a||"p");n.firstChild;)o=n.firstChild,r.isBlock(o)?(i.firstChild&&(s.appendChild(i),i=r.create(e.ownerDocument,a||"p")),s.appendChild(o)):i.appendChild(o);i.firstChild&&s.appendChild(i)}t=this._parentLists(e),t[0]?(r.insertAfter(s,t.last()[0]),t.last().remove()):r.insertAfter(s,e),r.remove(e)},remove:function(e){var t,n,i;for(n=0,i=e.length;i>n;n++)t=this.finder.findFormat(e[n]),t&&this.unwrap(t)},toggle:function(e){var t,n=this,i=d(e),o=e.commonAncestorContainer;i.length||(e.selectNodeContents(o),i=d(e),i.length||(t=o.ownerDocument.createTextNode(""),e.startContainer.appendChild(t),i=[t],e.selectNode(t.parentNode))),n.finder.isFormatted(i)?(n.split(e),n.remove(i)):n.apply(i)}}),m=l.extend({init:function(e){e.formatter=new g(e.tag),l.fn.init.call(this,e)}}),v=h.extend({init:function(e){this.options=e,h.fn.init.call(this,i(e,{finder:new p(e.tag)}))},command:function(e){return new m(i(e,{tag:this.options.tag}))}});i(o,{ListFormatFinder:p,ListFormatter:g,ListCommand:m,ListTool:v}),f("insertUnorderedList",new v({tag:"ul",template:new c({template:a.buttonTemplate,title:"Insert unordered list"})})),f("insertOrderedList",new v({tag:"ol",template:new c({template:a.buttonTemplate,title:"Insert ordered list"})}))}(window.kendo.jQuery)}(),function(){!function(e){var t=window.kendo,n=t.Class,i=e.extend,o=e.proxy,r=t.ui.editor,s=r.Dom,a=r.RangeUtils,l=r.EditorUtils,c=r.Command,h=r.Tool,u=r.ToolTemplate,d=r.InlineFormatter,f=r.InlineFormatFinder,p=a.textNodes,g=r.EditorUtils.registerTool,m=n.extend({findSuitable:function(e){return s.parentOfType(e,["a"])}}),v=n.extend({init:function(){this.finder=new m},apply:function(e,t){var n,i,o,r,l,c,h,u=p(e);if(t.innerHTML){for(i=a.documentFromRange(e),n=a.getMarkers(e),e.deleteContents(),r=s.create(i,"a",t),e.insertNode(r),l=r.parentNode,"a"==s.name(l)&&s.insertAfter(r,l),s.emptyNode(l)&&s.remove(l),c=r,h=0;n.length>h;h++)s.insertAfter(n[h],c),c=n[h];n.length&&(s.insertBefore(i.createTextNode("\ufeff"),n[1]),s.insertAfter(i.createTextNode("\ufeff"),n[1]),e.setStartBefore(n[0]),e.setEndAfter(n[n.length-1]))}else o=new d([{tags:["a"]}],t),o.finder=this.finder,o.apply(u)}}),_=c.extend({init:function(e){e.formatter={toggle:function(e){new d([{tags:["a"]}]).remove(p(e))}},this.options=e,c.fn.init.call(this,e)}}),w=c.extend({init:function(e){this.options=e,c.fn.init.call(this,e),this.formatter=new v,e.url?this.exec=function(){this.formatter.apply(e.range,{href:e.url,innerHTML:e.text||e.url,target:e.target})}:(this.attributes=null,this.async=!0)},_dialogTemplate:function(){return t.template("
")({messages:this.editor.options.messages})},exec:function(){var t,n,i,r,a=this.editor.options.messages;this._initialText="",this._range=this.lockRange(!0),t=p(this._range),n=t.length?this.formatter.finder.findSuitable(t[0]):null,i=t.length&&"img"==s.name(t[0]),r=this.createDialog(this._dialogTemplate(),{title:a.createLink,close:o(this._close,this),visible:!1}),n&&(this._range.selectNodeContents(n),t=p(this._range)),this._initialText=this.linkText(t),r.find(".k-dialog-insert").click(o(this._apply,this)).end().find(".k-dialog-close").click(o(this._close,this)).end().find(".k-edit-field input").keydown(o(this._keydown,this)).end().find("#k-editor-link-url").val(this.linkUrl(n)).end().find("#k-editor-link-text").val(this._initialText).end().find("#k-editor-link-title").val(n?n.title:"").end().find("#k-editor-link-target").attr("checked",n?"_blank"==n.target:!1).end().find(".k-editor-link-text-row").toggle(!i),this._dialog=r.data("kendoWindow").center().open(),e("#k-editor-link-url",r).focus().select()},_keydown:function(e){var n=t.keys;e.keyCode==n.ENTER?this._apply(e):e.keyCode==n.ESC&&this._close(e)},_apply:function(t){var n,i,o,r=this._dialog.element,a=e("#k-editor-link-url",r).val(),l=e("#k-editor-link-text",r);a&&"http://"!=a&&(a.indexOf("@")>0&&!/^(\w+:)|(\/\/)/i.test(a)&&(a="mailto:"+a),this.attributes={href:a},n=e("#k-editor-link-title",r).val(),n&&(this.attributes.title=n),l.is(":visible")&&(i=l.val(),i||this._initialText?i&&i!==this._initialText&&(this.attributes.innerHTML=s.stripBom(i)):this.attributes.innerHTML=a), o=e("#k-editor-link-target",r).is(":checked"),this.attributes.target=o?"_blank":null,this.formatter.apply(this._range,this.attributes)),this._close(t),this.change&&this.change()},_close:function(e){e.preventDefault(),this._dialog.destroy(),s.windowFromDocument(a.documentFromRange(this._range)).focus(),this.releaseRange(this._range)},linkUrl:function(e){return e?e.getAttribute("href",2):"http://"},linkText:function(e){var t,n="";for(t=0;e.length>t;t++)n+=e[t].nodeValue;return s.stripBom(n||"")},redo:function(){var e=this.lockRange(!0);this.formatter.apply(e,this.attributes),this.releaseRange(e)}}),y=h.extend({init:function(t){this.options=t,this.finder=new f([{tags:["a"]}]),h.fn.init.call(this,e.extend(t,{command:_}))},initialize:function(e,t){h.fn.initialize.call(this,e,t),e.addClass("k-state-disabled")},update:function(e,t){e.toggleClass("k-state-disabled",!this.finder.isFormatted(t)).removeClass("k-state-hover")}});i(t.ui.editor,{LinkFormatFinder:m,LinkFormatter:v,UnlinkCommand:_,LinkCommand:w,UnlinkTool:y}),g("createLink",new h({key:"K",ctrl:!0,command:w,template:new u({template:l.buttonTemplate,title:"Create Link"})})),g("unlink",new y({key:"K",ctrl:!0,shift:!0,template:new u({template:l.buttonTemplate,title:"Remove Link"})}))}(window.kendo.jQuery)}(),function(){!function(e,t){var n=window.kendo,i=e.extend,o=n.ui.editor,r=o.EditorUtils,s=o.Dom,a=r.registerTool,l=o.ToolTemplate,c=o.RangeUtils,h=o.Command,u=o.LinkFormatter,d=c.textNodes,f=n.keys,p="#k-editor-file-url",g="#k-editor-file-title",m=h.extend({init:function(e){var t=this;h.fn.init.call(t,e),t.formatter=new u,t.async=!0,t.attributes={}},insertFile:function(e,t){var n=this.attributes,i=c.documentFromRange(t);if(n.href&&"http://"!=n.href){if(!e)return e=s.create(i,"a",{href:n.href}),e.innerHTML=n.innerHTML,t.deleteContents(),t.insertNode(e),e.nextSibling||s.insertAfter(i.createTextNode("\ufeff"),e),t.setStartAfter(e),t.setEndAfter(e),c.selectRange(t),!0;s.attr(e,n)}return!1},_dialogTemplate:function(e){return n.template('
# if (showBrowser) { #
# } #
')({messages:this.editor.options.messages,showBrowser:e})},redo:function(){var e=this,t=e.lockRange();this.formatter.apply(t,this.attributes),e.releaseRange(t)},exec:function(){function e(e){var t=a.element,n=t.find(p).val().replace(/ /g,"%20"),i=t.find(g).val();l.attributes={href:n,innerHTML:""!==i?i:n},m=l.insertFile(v,h),o(e),l.change&&l.change()}function o(e){e.preventDefault(),a.destroy(),s.windowFromDocument(c.documentFromRange(h)).focus(),m||l.releaseRange(h)}function r(t){t.keyCode==f.ENTER?e(t):t.keyCode==f.ESC&&o(t)}var a,l=this,h=l.lockRange(),u=d(h),m=!1,v=u.length?this.formatter.finder.findSuitable(u[0]):null,_=l.editor.options,w=_.messages,y=_.fileBrowser,b=!!(n.ui.FileBrowser&&y&&y.transport&&y.transport.read!==t),x={title:w.insertFile,visible:!1,resizable:b};x.close=o,b&&(x.width=750),a=this.createDialog(l._dialogTemplate(b),x).toggleClass("k-filebrowser-dialog",b).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(o).end().find(".k-edit-field input").keydown(r).end().find(p).val(v?v.getAttribute("href",2):"http://").end().find(g).val(v?v.title:"").end().data("kendoWindow"),b&&(l._fileBrowser=new n.ui.FileBrowser(a.element.find(".k-filebrowser"),i({},y,{change:function(){a.element.find(p).val(this.value())},apply:e}))),a.center().open(),a.element.find(p).focus().select()}});n.ui.editor.FileCommand=m,a("insertFile",new o.Tool({command:m,template:new l({template:r.buttonTemplate,title:"Insert File"})}))}(window.kendo.jQuery)}(),function(){!function(e,t){var n=window.kendo,i=e.extend,o=n.ui.editor,r=o.EditorUtils,s=o.Dom,a=r.registerTool,l=o.ToolTemplate,c=o.RangeUtils,h=o.Command,u=n.keys,d="#k-editor-image-url",f="#k-editor-image-title",p="#k-editor-image-width",g="#k-editor-image-height",m=h.extend({init:function(e){var t=this;h.fn.init.call(t,e),t.async=!0,t.attributes={}},insertImage:function(e,t){var n,i=this.attributes,o=c.documentFromRange(t);if(i.src&&"http://"!=i.src){if(n=function(){setTimeout(function(){i.width||e.removeAttribute("width"),i.height||e.removeAttribute("height"),e.removeAttribute("complete")})},!e)return e=s.create(o,"img",i),e.onload=e.onerror=n,t.deleteContents(),t.insertNode(e),e.nextSibling||s.insertAfter(o.createTextNode("\ufeff"),e),n(),t.setStartAfter(e),t.setEndAfter(e),c.selectRange(t),!0;e.onload=e.onerror=n,s.attr(e,i),n()}return!1},_dialogTemplate:function(e){return n.template('
# if (showBrowser) { #
# } #
')({messages:this.editor.options.messages,showBrowser:e})},redo:function(){var e=this,t=e.lockRange();e.insertImage(c.image(t),t)||e.releaseRange(t)},exec:function(){function e(e){var t=a.element,n=parseInt(t.find(p).val(),10),i=parseInt(t.find(g).val(),10);l.attributes={src:t.find(d).val().replace(/ /g,"%20"),alt:t.find(f).val()},l.attributes.width=null,l.attributes.height=null,!isNaN(n)&&n>0&&(l.attributes.width=n),!isNaN(i)&&i>0&&(l.attributes.height=i),m=l.insertImage(v,h),o(e),l.change&&l.change()}function o(e){e.preventDefault(),a.destroy(),s.windowFromDocument(c.documentFromRange(h)).focus(),m||l.releaseRange(h)}function r(t){t.keyCode==u.ENTER?e(t):t.keyCode==u.ESC&&o(t)}var a,l=this,h=l.lockRange(),m=!1,v=c.image(h),_=v&&v.getAttribute("width")||"",w=v&&v.getAttribute("height")||"",y=l.editor.options,b=y.messages,x=y.imageBrowser,k=!!(n.ui.ImageBrowser&&x&&x.transport&&x.transport.read!==t),C={title:b.insertImage,visible:!1,resizable:k};C.close=o,k&&(C.width=750),a=this.createDialog(l._dialogTemplate(k),C).toggleClass("k-filebrowser-dialog",k).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(o).end().find(".k-edit-field input").keydown(r).end().find(d).val(v?v.getAttribute("src",2):"http://").end().find(f).val(v?v.alt:"").end().find(p).val(_).end().find(g).val(w).end().data("kendoWindow"),k&&(this._imageBrowser=new n.ui.ImageBrowser(a.element.find(".k-imagebrowser"),i({},x,{change:function(){a.element.find(d).val(this.value())},apply:e}))),a.center().open(),a.element.find(d).focus().select()}});n.ui.editor.ImageCommand=m,a("insertImage",new o.Tool({command:m,template:new l({template:r.buttonTemplate,title:"Insert Image"})}))}(window.kendo.jQuery)}(),function(){!function(e,t){var n=window.kendo,i=n.ui.DropDownList,o=n.ui.editor.Dom,r=i.extend({init:function(t,o){var r=this;i.fn.init.call(r,t,o),n.support.mobileOS.ios&&(this._initSelectOverlay(),this.bind("dataBound",e.proxy(this._initSelectOverlay,this))),r.text(r.options.title),r.bind("open",function(){if(r.options.autoSize){var e,t=r.list;t.css({whiteSpace:"nowrap",width:"auto"}),e=t.width(),e?e+=20:e=r._listWidth,t.css("width",e+n.support.scrollbar()),r._listWidth=e}})},options:{name:"SelectBox",index:-1},_initSelectOverlay:function(){var t,i,o,r,s=this,a=s.value(),l=this.dataSource.view(),c="",h=n.htmlEncode;for(i=0;l.length>i;i++)t=l[i],c+="