/*! Summernote v0.7.3 | (c) 2013-2015 Alan Hong and other contributors | MIT license */
!function(a){"function"==typeofdefine&&define.amd?define(["jquery"],a):"object"==typeofmodule&&module.exports?module.exports=a(require("jquery")):a(window.jQuery)}(function(a){"use strict";varb,c=function(){varb=function(a){returnfunction(b){returna===b}},c=function(a,b){returna===b},d=function(a){returnfunction(b,c){returnb[a]===c[a]}},e=function(){return!0},f=function(){return!1},g=function(a){returnfunction(){return!a.apply(a,arguments)}},h=function(a,b){returnfunction(c){returna(c)&&b(c)}},i=function(a){returna},j=function(a,b){returnfunction(){returna[b].apply(a,arguments)}},k=0,l=function(a){varb=++k+"";returna?a+b:b},m=function(b){varc=a(document);return{top:b.top+c.scrollTop(),left:b.left+c.scrollLeft(),width:b.right-b.left,height:b.bottom-b.top}},n=function(a){varb={};for(varcina)a.hasOwnProperty(c)&&(b[a[c]]=c);returnb},o=function(a,b){returnb=b||"",b+a.split(".").map(function(a){returna.substring(0,1).toUpperCase()+a.substring(1)}).join("")};return{eq:b,eq2:c,peq2:d,ok:e,fail:f,self:i,not:g,and:h,invoke:j,uniqueId:l,rect2bnd:m,invertObject:n,namespaceToCamel:o}}(),d=function(){varb=function(a){returna[0]},d=function(a){returna[a.length-1]},e=function(a){returna.slice(0,a.length-1)},f=function(a){returna.slice(1)},g=function(a,b){for(varc=0,d=a.length;d>c;c++){vare=a[c];if(b(e))returne}},h=function(a,b){for(varc=0,d=a.length;d>c;c++)if(!b(a[c]))return!1;return!0},i=function(b,c){returna.inArray(c,b)},j=function(a,b){return-1!==i(a,b)},k=function(a,b){returnb=b||c.self,a.reduce(function(a,c){returna+b(c)},0)},l=function(a){for(varb=[],c=-1,d=a.length;++c<d;)b[c]=a[c];returnb},m=function(a){return!a||!a.length},n=function(a,c){if(!a.length)return[];vare=f(a);returne.reduce(function(a,b){vare=d(a);returnc(d(e),b)?e[e.length]=b:a[a.length]=[b],a},[[b(a)]])},o=function(a){for(varb=[],c=0,d=a.length;d>c;c++)a[c]&&b.push(a[c]);returnb},p=function(a){for(varb=[],c=0,d=a.length;d>c;c++)j(b,a[c])||b.push(a[c]);returnb},q=function(a,b){varc=i(a,b);return-1===c?null:a[c+1]},r=function(a,b){varc=i(a,b);return-1===c?null:a[c-1]};return{head:b,last:d,initial:e,tail:f,prev:r,next:q,find:g,contains:j,all:h,sum:k,from:l,isEmpty:m,clusterBy:n,compact:o,unique:p}}(),e="function"==typeofdefine&&define.amd,f=function(b){varc="Comic Sans MS"===b?"Courier New":"Comic Sans MS",d=a("<div>").css({position:"absolute",left:"-9999px",top:"-9999px",fontSize:"200px"}).text("mmmmmmmmmwwwwwww").appendTo(document.body),e=d.css("fontFamily",c).width(),f=d.css("fontFamily",b+","+c).width();returnd.remove(),e!==f},g=navigator.userAgent,h=/MSIE|Trident/i.test(g);if(h){vari=/MSIE (\d+[.]\d+)/.exec(g);i&&(b=parseFloat(i[1])),i=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(g),i&&(b=parseFloat(i[1]))}varj={isMac:navigator.appVersion.indexOf("Mac")>-1,isMSIE:h,isFF:/firefox/i.test(g),isWebkit:/webkit/i.test(g),isSafari:/safari/i.test(g),browserVersion:b,jqueryVersion:parseFloat(a.fn.jquery),isSupportAmd:e,hasCodeMirror:e?require.specified("codemirror"):!!window.CodeMirror,isFontInstalled:f,isW3CRangeSupport:!!document.createRange},k=String.fromCharCode(160),l="\ufeff",m=function(){varb=function(b){returnb&&a(b).hasClass("note-editable")},e=function(b){returnb&&a(b).hasClass("note-control-sizing")},f=function(a){returna=a.toUpperCase(),function(b){returnb&&b.nodeName.toUpperCase()===a}},g=function(a){returna&&3===a.nodeType},h=function(a){returna&&1===a.nodeType},i=function(a){returna&&/^BR|^IMG|^HR|^IFRAME|^BUTTON/.test(a.nodeName.toUpperCase())},n=function(a){returnb(a)?!1:a&&/^DIV|^P|^LI|^H[1-7]/.test(a.nodeName.toUpperCase())},o=function(a){returna&&/^H[1-7]/.test(a.nodeName.toUpperCase())},p=f("PRE"),q=f("LI"),r=function(a){returnn(a)&&!q(a)},s=f("TABLE"),t=function(a){return!(y(a)||u(a)||v(a)||n(a)||s(a)||x(a))},u=function(a){returna&&/^UL|^OL/.test(a.nodeName.toUpperCase())},v=f("HR"),w=function(a){returna&&/^TD|^TH/.test(a.nodeName.toUpperCase())},x=f("BLOCKQUOTE"),y=function(a){returnw(a)||x(a)||b(a)},z=f("A"),A=function(a){returnt(a)&&!!J(a,n)},B=function(a){returnt(a)&&!J(a,n)
tooltip:i.image.floatRight,click:b.createInvokeHandler("editor.floatMe","right")}).render()}),b.memo("button.floatNone",function(){returnf.button({contents:f.icon(h.icons.alignJustify),tooltip:i.image.floatNone,click:b.createInvokeHandler("editor.floatMe","none")}).render()}),b.memo("button.removeMedia",function(){returnf.button({contents:f.icon(h.icons.trash),tooltip:i.image.remove,click:b.createInvokeHandler("editor.removeMedia")}).render()})},this.addLinkPopoverButtons=function(){b.memo("button.linkDialogShow",function(){returnf.button({contents:f.icon(h.icons.link),tooltip:i.link.edit,click:b.createInvokeHandler("linkDialog.show")}).render()}),b.memo("button.unlink",function(){returnf.button({contents:f.icon(h.icons.unlink),tooltip:i.link.unlink,click:b.createInvokeHandler("editor.unlink")}).render()})},this.build=function(a,c){for(vard=0,e=c.length;e>d;d++){for(varg=c[d],h=g[0],i=g[1],j=f.buttonGroup({className:"note-"+h}).render(),k=0,l=i.length;l>k;k++){varm=b.memo("button."+i[k]);m&&j.append("function"==typeofm?m():m)}j.appendTo(a)}},this.updateCurrentStyle=function(){varc=b.invoke("editor.currentStyle");if(this.updateBtnStates({".note-btn-bold":function(){return"bold"===c["font-bold"]},".note-btn-italic":function(){return"italic"===c["font-italic"]},".note-btn-underline":function(){return"underline"===c["font-underline"]},".note-btn-subscript":function(){return"subscript"===c["font-subscript"]},".note-btn-superscript":function(){return"superscript"===c["font-superscript"]},".note-btn-strikethrough":function(){return"strikethrough"===c["font-strikethrough"]}}),c["font-family"]){vare=c["font-family"].split(",").map(function(a){returna.replace(/[\'\"]/g,"").replace(/\s+$/,"").replace(/^\s+/,"")}),f=d.find(e,function(a){returnj.isFontInstalled(a)||d.contains(h.fontNamesIgnoreCheck,a)});g.find(".dropdown-fontname li a").each(function(){varb=a(this).data("value")+""==f+"";this.className=b?"checked":""}),g.find(".note-current-fontname").text(f)}if(c["font-size"]){vari=c["font-size"];g.find(".dropdown-fontsize li a").each(function(){varb=a(this).data("value")+""==i+"";this.className=b?"checked":""}),g.find(".note-current-fontsize").text(i)}if(c["line-height"]){vark=c["line-height"];g.find(".dropdown-line-height li a").each(function(){varb=a(this).data("value")+""==k+"";this.className=b?"checked":""})}},this.updateBtnStates=function(b){a.each(b,function(a,b){f.toggleBtnActive(g.find(a),b())})},this.tableMoveHandler=function(b){varc,d=18,e=a(b.target.parentNode),f=e.next(),g=e.find(".note-dimension-picker-mousecatcher"),i=e.find(".note-dimension-picker-highlighted"),j=e.find(".note-dimension-picker-unhighlighted");if(void0===b.offsetX){vark=a(b.target).offset();c={x:b.pageX-k.left,y:b.pageY-k.top}}elsec={x:b.offsetX,y:b.offsetY};varl={c:Math.ceil(c.x/d)||1,r:Math.ceil(c.y/d)||1};i.css({width:l.c+"em",height:l.r+"em"}),g.data("value",l.c+"x"+l.r),3<l.c&&l.c<h.insertTableMaxSize.col&&j.css({width:l.c+1+"em"}),3<l.r&&l.r<h.insertTableMaxSize.row&&j.css({height:l.r+1+"em"}),f.html(l.c+" x "+l.r)}},ba=function(b){varc=a.summernote.ui,d=b.layoutInfo.note,e=b.layoutInfo.toolbar,f=b.options;this.shouldInitialize=function(){return!f.airMode},this.initialize=function(){f.toolbar=f.toolbar||[],f.toolbar.length?b.invoke("buttons.build",e,f.toolbar):e.hide(),f.toolbarContainer&&e.appendTo(f.toolbarContainer),d.on("summernote.keyup summernote.mouseup summernote.change",function(){b.invoke("buttons.updateCurrentStyle")}),b.invoke("buttons.updateCurrentStyle")},this.destroy=function(){e.children().remove()},this.updateFullscreen=function(a){c.toggleBtnActive(e.find(".btn-fullscreen"),a)},this.updateCodeview=function(a){c.toggleBtnActive(e.find(".btn-codeview"),a),a?this.deactivate():this.activate()},this.activate=function(a){varb=e.find("button");a||(b=b.not(".btn-codeview")),c.toggleBtn(b,!0)},this.deactivate=function(a){varb=e.find("button");a||(b=b.not(".btn-codeview")),c.toggleBtn(b,!1)}},ca=function(b){varc=this,d=a.summernote.ui,e=b.layoutInfo.editor,f=b.options,g=f.langInfo;this.initialize=function(){var