!function(e,t){if("function"==typeof define&&define.amd)define(["jquery"],t);else if("undefined"!=typeof exports)t(require("jquery"));else{var n={exports:{}};t(e.jquery),e.metisMenu=n.exports}}(this,function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n=(function(e){e&&e.__esModule}(e),"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}),o=function(e){function t(){return{bindType:i.end,delegateType:i.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}}}function n(){if(window.QUnit)return!1;var e=document.createElement("mm");for(var t in r)if(void 0!==e.style[t])return{end:r[t]};return!1}function o(t){var n=this,o=!1;return e(this).one(a.TRANSITION_END,function(){o=!0}),setTimeout(function(){o||a.triggerTransitionEnd(n)},t),this}var i=!1,r={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},a={TRANSITION_END:"mmTransitionEnd",triggerTransitionEnd:function(t){e(t).trigger(i.end)},supportsTransitionEnd:function(){return Boolean(i)}};return function(){i=n(),e.fn.emulateTransitionEnd=o,a.supportsTransitionEnd()&&(e.event.special[a.TRANSITION_END]=t())}(),a}(jQuery);!function(e){var i="metisMenu",r=e.fn[i],a={toggle:!0,preventDefault:!0,activeClass:"active",collapseClass:"collapse",collapseInClass:"in",collapsingClass:"collapsing",triggerElement:"a",parentTrigger:"li",subMenu:"ul"},s={SHOW:"show.metisMenu",SHOWN:"shown.metisMenu",HIDE:"hide.metisMenu",HIDDEN:"hidden.metisMenu",CLICK_DATA_API:"click.metisMenu.data-api"},l=function(){function i(e,n){t(this,i),this._element=e,this._config=this._getConfig(n),this._transitioning=null,this.init()}return i.prototype.init=function(){var t=this;e(this._element).find(this._config.parentTrigger+"."+this._config.activeClass).has(this._config.subMenu).children(this._config.subMenu).attr("aria-expanded",!0).addClass(this._config.collapseClass+" "+this._config.collapseInClass),e(this._element).find(this._config.parentTrigger).not("."+this._config.activeClass).has(this._config.subMenu).children(this._config.subMenu).attr("aria-expanded",!1).addClass(this._config.collapseClass),e(this._element).find(this._config.parentTrigger).has(this._config.subMenu).children(this._config.triggerElement).on(s.CLICK_DATA_API,function(n){var o=e(this),i=o.parent(t._config.parentTrigger),r=i.siblings(t._config.parentTrigger).children(t._config.triggerElement),a=i.children(t._config.subMenu);t._config.preventDefault&&n.preventDefault(),"true"!==o.attr("aria-disabled")&&(i.hasClass(t._config.activeClass)?(o.attr("aria-expanded",!1),t._hide(a)):(t._show(a),o.attr("aria-expanded",!0),t._config.toggle&&r.attr("aria-expanded",!1)),t._config.onTransitionStart&&t._config.onTransitionStart(n))})},i.prototype._show=function(t){if(!this._transitioning&&!e(t).hasClass(this._config.collapsingClass)){var n=this,i=e(t),r=e.Event(s.SHOW);if(i.trigger(r),!r.isDefaultPrevented()){i.parent(this._config.parentTrigger).addClass(this._config.activeClass),this._config.toggle&&this._hide(i.parent(this._config.parentTrigger).siblings().children(this._config.subMenu+"."+this._config.collapseInClass).attr("aria-expanded",!1)),i.removeClass(this._config.collapseClass).addClass(this._config.collapsingClass).height(0),this.setTransitioning(!0);var a=function(){i.removeClass(n._config.collapsingClass).addClass(n._config.collapseClass+" "+n._config.collapseInClass).height("").attr("aria-expanded",!0),n.setTransitioning(!1),i.trigger(s.SHOWN)};if(!o.supportsTransitionEnd())return void a();i.height(i[0].scrollHeight).one(o.TRANSITION_END,a).emulateTransitionEnd(350)}}},i.prototype._hide=function(t){if(!this._transitioning&&e(t).hasClass(this._config.collapseInClass)){var n=this,i=e(t),r=e.Event(s.HIDE);if(i.trigger(r),!r.isDefaultPrevented()){i.parent(this._config.parentTrigger).removeClass(this._config.activeClass),i.height(i.height())[0].offsetHeight,i.addClass(this._config.collapsingClass).removeClass(this._config.collapseClass).removeClass(this._config.collapseInClass),this.setTransitioning(!0);var a=function(){n._transitioning&&n._config.onTransitionEnd&&n._config.onTransitionEnd(),n.setTransitioning(!1),i.trigger(s.HIDDEN),i.removeClass(n._config.collapsingClass).addClass(n._config.collapseClass).attr("aria-expanded",!1)};if(!o.supportsTransitionEnd())return void a();0==i.height()||"none"==i.css("display")?a():i.height(0).one(o.TRANSITION_END,a).emulateTransitionEnd(350)}}},i.prototype.setTransitioning=function(e){this._transitioning=e},i.prototype.dispose=function(){e.removeData(this._element,"metisMenu"),e(this._element).find(this._config.parentTrigger).has(this._config.subMenu).children(this._config.triggerElement).off("click"),this._transitioning=null,this._config=null,this._element=null},i.prototype._getConfig=function(t){return t=e.extend({},a,t)},i._jQueryInterface=function(t){return this.each(function(){var o=e(this),r=o.data("metisMenu"),s=e.extend({},a,o.data(),"object"===(void 0===t?"undefined":n(t))&&t);if(!r&&/dispose/.test(t)&&this.dispose(),r||(r=new i(this,s),o.data("metisMenu",r)),"string"==typeof t){if(void 0===r[t])throw new Error('No method named "'+t+'"');r[t]()}})},i}();e.fn[i]=l._jQueryInterface,e.fn[i].Constructor=l,e.fn[i].noConflict=function(){return e.fn[i]=r,l._jQueryInterface}}(jQuery)}),function(e){e.fn.extend({slimScroll:function(n){var o={width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},i=e.extend(o,n);return this.each(function(){function o(t){if(c){var t=t||window.event,n=0;t.wheelDelta&&(n=-t.wheelDelta/120),t.detail&&(n=t.detail/3);var o=t.target||t.srcTarget||t.srcElement;e(o).closest("."+i.wrapperClass).is(w.parent())&&r(n,!0),t.preventDefault&&!y&&t.preventDefault(),y||(t.returnValue=!1)}}function r(e,t,n){y=!1;var o=e,r=w.outerHeight()-I.outerHeight();if(t&&(o=parseInt(I.css("top"))+e*parseInt(i.wheelStep)/100*I.outerHeight(),o=Math.min(Math.max(o,0),r),o=e>0?Math.ceil(o):Math.floor(o),I.css({top:o+"px"})),m=parseInt(I.css("top"))/(w.outerHeight()-I.outerHeight()),o=m*(w[0].scrollHeight-w.outerHeight()),n){o=e;var a=o/w[0].scrollHeight*w.outerHeight();a=Math.min(Math.max(a,0),r),I.css({top:a+"px"})}w.scrollTop(o),w.trigger("slimscrolling",~~o),s(),l()}function a(){p=Math.max(w.outerHeight()/w[0].scrollHeight*w.outerHeight(),b),I.css({height:p+"px"});var e=p==w.outerHeight()?"none":"block";I.css({display:e})}function s(){if(a(),clearTimeout(f),m==~~m){if(y=i.allowPageScroll,g!=m){var e=0==~~m?"top":"bottom";w.trigger("slimscroll",e)}}else y=!1;return g=m,p>=w.outerHeight()?void(y=!0):(I.stop(!0,!0).fadeIn("fast"),void(i.railVisible&&E.stop(!0,!0).fadeIn("fast")))}function l(){i.alwaysVisible||(f=setTimeout(function(){i.disableFadeOut&&c||d||u||(I.fadeOut("slow"),E.fadeOut("slow"))},1e3))}var c,d,u,f,h,p,m,g,v="
",b=30,y=!1,w=e(this);if(w.parent().hasClass(i.wrapperClass)){var C=w.scrollTop();if(I=w.closest("."+i.barClass),E=w.closest("."+i.railClass),a(),e.isPlainObject(n)){if("height"in n&&"auto"==n.height){w.parent().css("height","auto"),w.css("height","auto");var k=w.parent().parent().height();w.parent().css("height",k),w.css("height",k)}if("scrollTo"in n)C=parseInt(i.scrollTo);else if("scrollBy"in n)C+=parseInt(i.scrollBy);else if("destroy"in n)return I.remove(),E.remove(),void w.unwrap();r(C,!1,!0)}}else if(!(e.isPlainObject(n)&&"destroy"in n)){i.height="auto"==i.height?w.parent().height():i.height;var T=e(v).addClass(i.wrapperClass).css({position:"relative",overflow:"hidden",width:i.width,height:i.height});w.css({overflow:"hidden",width:i.width,height:i.height});var E=e(v).addClass(i.railClass).css({width:i.size,height:"100%",position:"absolute",top:0,display:i.alwaysVisible&&i.railVisible?"block":"none","border-radius":i.railBorderRadius,background:i.railColor,opacity:i.railOpacity,zIndex:90}),I=e(v).addClass(i.barClass).css({background:i.color,width:i.size,position:"absolute",top:0,opacity:i.opacity,display:i.alwaysVisible?"block":"none","border-radius":i.borderRadius,BorderRadius:i.borderRadius,MozBorderRadius:i.borderRadius,WebkitBorderRadius:i.borderRadius,zIndex:99}),S="right"==i.position?{right:i.distance}:{left:i.distance};E.css(S),I.css(S),w.wrap(T),w.parent().append(I),w.parent().append(E),i.railDraggable&&I.bind("mousedown",function(n){var o=e(document);return u=!0,t=parseFloat(I.css("top")),pageY=n.pageY,o.bind("mousemove.slimscroll",function(e){currTop=t+e.pageY-pageY,I.css("top",currTop),r(0,I.position().top,!1)}),o.bind("mouseup.slimscroll",function(e){u=!1,l(),o.unbind(".slimscroll")}),!1}).bind("selectstart.slimscroll",function(e){return e.stopPropagation(),e.preventDefault(),!1}),E.hover(function(){s()},function(){l()}),I.hover(function(){d=!0},function(){d=!1}),w.hover(function(){c=!0,s(),l()},function(){c=!1,l()}),w.bind("touchstart",function(e,t){e.originalEvent.touches.length&&(h=e.originalEvent.touches[0].pageY)}),w.bind("touchmove",function(e){if(y||e.originalEvent.preventDefault(),e.originalEvent.touches.length){r((h-e.originalEvent.touches[0].pageY)/i.touchScrollStep,!0),h=e.originalEvent.touches[0].pageY}}),a(),"bottom"===i.start?(I.css({top:w.outerHeight()-I.outerHeight()}),r(0,!0)):"top"!==i.start&&(r(e(i.start).position().top,null,!0),i.alwaysVisible||I.hide()),function(e){window.addEventListener?(e.addEventListener("DOMMouseScroll",o,!1),e.addEventListener("mousewheel",o,!1)):document.attachEvent("onmousewheel",o)}(this)}}),this}}),e.fn.extend({slimscroll:e.fn.slimScroll})}(jQuery),function(e){"use strict";function t(e){return null!==e&&e===e.window}function n(e){return t(e)?e:9===e.nodeType&&e.defaultView}function o(e){var t,o,i={top:0,left:0},r=e&&e.ownerDocument;return t=r.documentElement,void 0!==e.getBoundingClientRect&&(i=e.getBoundingClientRect()),o=n(r),{top:i.top+o.pageYOffset-t.clientTop,left:i.left+o.pageXOffset-t.clientLeft}}function i(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t+=n+":"+e[n]+";");return t}function r(e){if(!1===d.allowEvent(e))return null;for(var t=null,n=e.target||e.srcElement;null!==n.parentElement;){if(!(n instanceof SVGElement||-1===n.className.indexOf("waves-effect"))){t=n;break}if(n.classList.contains("waves-effect")){t=n;break}n=n.parentElement}return t}function a(t){var n=r(t);null!==n&&(c.show(t,n),"ontouchstart"in e&&(n.addEventListener("touchend",c.hide,!1),n.addEventListener("touchcancel",c.hide,!1)),n.addEventListener("mouseup",c.hide,!1),n.addEventListener("mouseleave",c.hide,!1))}var s=s||{},l=document.querySelectorAll.bind(document),c={duration:750,show:function(e,t){if(2===e.button)return!1;var n=t||this,r=document.createElement("div");r.className="waves-ripple",n.appendChild(r);var a=o(n),s=e.pageY-a.top,l=e.pageX-a.left,d="scale("+n.clientWidth/100*10+")";"touches"in e&&(s=e.touches[0].pageY-a.top,l=e.touches[0].pageX-a.left),r.setAttribute("data-hold",Date.now()),r.setAttribute("data-scale",d),r.setAttribute("data-x",l),r.setAttribute("data-y",s);var u={top:s+"px",left:l+"px"};r.className=r.className+" waves-notransition",r.setAttribute("style",i(u)),r.className=r.className.replace("waves-notransition",""),u["-webkit-transform"]=d,u["-moz-transform"]=d,u["-ms-transform"]=d,u["-o-transform"]=d,u.transform=d,u.opacity="1",u["-webkit-transition-duration"]=c.duration+"ms",u["-moz-transition-duration"]=c.duration+"ms",u["-o-transition-duration"]=c.duration+"ms",u["transition-duration"]=c.duration+"ms",u["-webkit-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",u["-moz-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",u["-o-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",u["transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",r.setAttribute("style",i(u))},hide:function(e){d.touchup(e);var t=this,n=(t.clientWidth,null),o=t.getElementsByClassName("waves-ripple");if(!(o.length>0))return!1;n=o[o.length-1];var r=n.getAttribute("data-x"),a=n.getAttribute("data-y"),s=n.getAttribute("data-scale"),l=Date.now()-Number(n.getAttribute("data-hold")),u=350-l;0>u&&(u=0),setTimeout(function(){var e={top:a+"px",left:r+"px",opacity:"0","-webkit-transition-duration":c.duration+"ms","-moz-transition-duration":c.duration+"ms","-o-transition-duration":c.duration+"ms","transition-duration":c.duration+"ms","-webkit-transform":s,"-moz-transform":s,"-ms-transform":s,"-o-transform":s,transform:s};n.setAttribute("style",i(e)),setTimeout(function(){try{t.removeChild(n)}catch(e){return!1}},c.duration)},u)},wrapInput:function(e){for(var t=0;t0&&(d.touches-=1)},500):"mousedown"===e.type&&d.touches>0&&(t=!1),t},touchup:function(e){d.allowEvent(e)}};s.displayEffect=function(t){t=t||{},"duration"in t&&(c.duration=t.duration),c.wrapInput(l(".waves-effect")),"ontouchstart"in e&&document.body.addEventListener("touchstart",a,!1),document.body.addEventListener("mousedown",a,!1)},s.attach=function(t){"input"===t.tagName.toLowerCase()&&(c.wrapInput([t]),t=t.parentElement),"ontouchstart"in e&&t.addEventListener("touchstart",a,!1),t.addEventListener("mousedown",a,!1)},e.Waves=s,document.addEventListener("DOMContentLoaded",function(){s.displayEffect()},!1)}(window),function(){var e,t;e=window.jQuery,t=e(window),e.fn.stick_in_parent=function(n){var o,i,r,a,s,l,c,d,u,f,h,p;for(null==n&&(n={}),p=n.sticky_class,s=n.inner_scrolling,h=n.recalc_every,f=n.parent,d=n.offset_top,c=n.spacer,i=n.bottoming,null==d&&(d=0),null==f&&(f=void 0),null==s&&(s=!0),null==p&&(p="is_stuck"),o=e(document),null==i&&(i=!0),u=function(e){var t;return window.getComputedStyle?(e=window.getComputedStyle(e[0]),t=parseFloat(e.getPropertyValue("width"))+parseFloat(e.getPropertyValue("margin-left"))+parseFloat(e.getPropertyValue("margin-right")),"border-box"!==e.getPropertyValue("box-sizing")&&(t+=parseFloat(e.getPropertyValue("border-left-width"))+parseFloat(e.getPropertyValue("border-right-width"))+parseFloat(e.getPropertyValue("padding-left"))+parseFloat(e.getPropertyValue("padding-right"))),t):e.outerWidth(!0)},r=function(n,r,a,l,m,g,v,b){var y,w,C,k,T,E,I,S,N,A,x,R;if(!n.data("sticky_kit")){if(n.data("sticky_kit",!0),T=o.height(),I=n.parent(),null!=f&&(I=I.closest(f)),!I.length)throw"failed to find stick parent";if(y=C=!1,(x=null!=c?c&&n.closest(c):e("
"))&&x.css("position",n.css("position")),S=function(){var e,t,i;if(!b&&(T=o.height(),e=parseInt(I.css("border-top-width"),10),t=parseInt(I.css("padding-top"),10),r=parseInt(I.css("padding-bottom"),10),a=I.offset().top+e+t,l=I.height(),C&&(y=C=!1,null==c&&(n.insertAfter(x),x.detach()),n.css({position:"",top:"",width:"",bottom:""}).removeClass(p),i=!0),m=n.offset().top-(parseInt(n.css("margin-top"),10)||0)-d,g=n.outerHeight(!0),v=n.css("float"),x&&x.css({width:u(n),height:g,display:n.css("display"),"vertical-align":n.css("vertical-align"),float:v}),i))return R()},S(),g!==l)return k=void 0,E=d,A=h,R=function(){var e,u,f,w;if(!b&&(f=!1,null!=A&&0>=--A&&(A=h,S(),f=!0),f||o.height()===T||S(),f=t.scrollTop(),null!=k&&(u=f-k),k=f,C?(i&&(w=f+g+E>l+a,y&&!w&&(y=!1,n.css({position:"fixed",bottom:"",top:E}).trigger("sticky_kit:unbottom"))),fe&&!y&&(E-=u,E=Math.max(e-g,E),E=Math.min(d,E),C&&n.css({top:E+"px"})))):f>m&&(C=!0,e={position:"fixed",top:E},e.width="border-box"===n.css("box-sizing")?n.outerWidth()+"px":n.width()+"px",n.css(e).addClass(p),null==c&&(n.after(x),"left"!==v&&"right"!==v||x.append(n)),n.trigger("sticky_kit:stick")),C&&i&&(null==w&&(w=f+g+E>l+a),!y&&w)))return y=!0,"static"===I.css("position")&&I.css({position:"relative"}),n.css({position:"absolute",bottom:r,top:"auto"}).trigger("sticky_kit:bottom")},N=function(){return S(),R()},w=function(){if(b=!0,t.off("touchmove",R),t.off("scroll",R),t.off("resize",N),e(document.body).off("sticky_kit:recalc",N),n.off("sticky_kit:detach",w),n.removeData("sticky_kit"),n.css({position:"",bottom:"",top:"",width:""}),I.position("position",""),C)return null==c&&("left"!==v&&"right"!==v||n.insertAfter(x),x.remove()),n.removeClass(p)},t.on("touchmove",R),t.on("scroll",R),t.on("resize",N),e(document.body).on("sticky_kit:recalc",N),n.on("sticky_kit:detach",w),setTimeout(R,0)}},a=0,l=this.length;a-1)},add:function(t){e.push(t)},delete:function(t){e.splice(e.indexOf(t),1)}}}(),a=function(e){return new Event(e)};try{new Event("test")}catch(e){a=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}var s=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?(s=function(e){return e},s.destroy=function(e){return e},s.update=function(e){return e}):(s=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return n(e,t)}),e},s.destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e},s.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e}),t.exports=s}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=e(require("jquery")):e(window.jQuery)}(function(e){"use strict";var t,n="function"==typeof define&&define.amd,o=function(t){var n="Comic Sans MS"===t?"Courier New":"Comic Sans MS",o=e("
").css({position:"absolute",left:"-9999px",top:"-9999px",fontSize:"200px"}).text("mmmmmmmmmwwwwwww").appendTo(document.body),i=o.css("fontFamily",n).width(),r=o.css("fontFamily",t+","+n).width();return o.remove(),i!==r},i=navigator.userAgent,r=/MSIE|Trident/i.test(i);if(r){var a=/MSIE (\d+[.]\d+)/.exec(i);a&&(t=parseFloat(a[1])),a=/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(i),a&&(t=parseFloat(a[1]))}var s=/Edge\/\d+/.test(i),l=!!window.CodeMirror;if(!l&&n)if("function"==typeof __webpack_require__)try{require.resolve("codemirror"),l=!0}catch(e){}else if("undefined"!=typeof require)if(void 0!==require.resolve)try{require.resolve("codemirror"),l=!0}catch(e){}else void 0!==require.specified&&(l=require.specified("codemirror"));var c="ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,d={isMac:navigator.appVersion.indexOf("Mac")>-1,isMSIE:r,isEdge:s,isFF:!s&&/firefox/i.test(i),isPhantom:/PhantomJS/i.test(i),isWebkit:!s&&/webkit/i.test(i),isChrome:!s&&/chrome/i.test(i),isSafari:!s&&/safari/i.test(i),browserVersion:t,jqueryVersion:parseFloat(e.fn.jquery),isSupportAmd:n,isSupportTouch:c,hasCodeMirror:l,isFontInstalled:o,isW3CRangeSupport:!!document.createRange},u=function(){var t=function(e){return function(t){return e===t}},n=function(e,t){return e===t},o=function(e){return function(t,n){return t[e]===n[e]}},i=function(){return!0},r=function(){return!1},a=function(e){return function(){return!e.apply(e,arguments)}},s=function(e,t){return function(n){return e(n)&&t(n)}},l=0;return{eq:t,eq2:n,peq2:o,ok:i,fail:r,self:function(e){return e},not:a,and:s,invoke:function(e,t){return function(){return e[t].apply(e,arguments)}},uniqueId:function(e){var t=++l+"";return e?e+t:t},rect2bnd:function(t){var n=e(document);return{top:t.top+n.scrollTop(),left:t.left+n.scrollLeft(),width:t.right-t.left,height:t.bottom-t.top}},invertObject:function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t},namespaceToCamel:function(e,t){return(t=t||"")+e.split(".").map(function(e){return e.substring(0,1).toUpperCase()+e.substring(1)}).join("")},debounce:function(e,t,n){var o;return function(){var i=this,r=arguments,a=function(){o=null,n||e.apply(i,r)},s=n&&!o;clearTimeout(o),o=setTimeout(a,t),s&&e.apply(i,r)}}}}(),f=function(){var t=function(e){return e[0]},n=function(e){return e[e.length-1]},o=function(e){return e.slice(0,e.length-1)},i=function(e){return e.slice(1)},r=function(e,t){for(var n=0,o=e.length;n",H=function(e){return i(e)?e.nodeValue.length:e?e.childNodes.length:0},P=function(e){var t=H(e);return 0===t||(!i(e)&&1===t&&e.innerHTML===L||!(!f.all(e.childNodes,i)||""!==e.innerHTML))},D=function(e){a(e)||H(e)||(e.innerHTML=L)},F=function(e,n){for(;e;){if(n(e))return e;if(t(e))break;e=e.parentNode}return null},M=function(e,n){for(e=e.parentNode;e&&1===H(e);){if(n(e))return e;if(t(e))break;e=e.parentNode}return null},z=function(e,n){n=n||u.fail;var o=[];return F(e,function(e){return t(e)||o.push(e),n(e)}),o},B=function(e,t){var n=z(e);return f.last(n.filter(t))},_=function(t,n){for(var o=z(t),i=n;i;i=i.parentNode)if(e.inArray(i,o)>-1)return i;return null},O=function(e,t){t=t||u.fail;for(var n=[];e&&!t(e);)n.push(e),e=e.previousSibling;return n},$=function(e,t){t=t||u.fail;for(var n=[];e&&!t(e);)n.push(e),e=e.nextSibling;return n},U=function(e,t){var n=[];return t=t||u.ok,function o(i){e!==i&&t(i)&&n.push(i);for(var r=0,a=i.childNodes.length;r")[0];return o.insertBefore(i,t),i.appendChild(t),i},V=function(e,t){var n=t.nextSibling,o=t.parentNode;return n?o.insertBefore(e,n):o.appendChild(e),e},W=function(t,n){return e.each(n,function(e,n){t.appendChild(n)}),t},q=function(e){return 0===e.offset},K=function(e){return e.offset===H(e.node)},Y=function(e){return q(e)||K(e)},G=function(e,t){for(;e&&e!==t;){if(0!==J(e))return!1;e=e.parentNode}return!0},Q=function(e,t){if(!t)return!1;for(;e&&e!==t;){if(J(e)!==H(e.parentNode)-1)return!1;e=e.parentNode}return!0},X=function(e,t){return q(e)&&G(e.node,t)},Z=function(e,t){return K(e)&&Q(e.node,t)},J=function(e){for(var t=0;e=e.previousSibling;)t+=1;return t},ee=function(e){return!!(e&&e.childNodes&&e.childNodes.length)},te=function(e,n){var o,i;if(0===e.offset){if(t(e.node))return null;o=e.node.parentNode,i=J(e.node)}else ee(e.node)?(o=e.node.childNodes[e.offset-1],i=H(o)):(o=e.node,i=n?0:e.offset-1);return{node:o,offset:i}},ne=function(e,n){var o,i;if(H(e.node)===e.offset){if(t(e.node))return null;o=e.node.parentNode,i=J(e.node)+1}else ee(e.node)?(o=e.node.childNodes[e.offset],i=0):(o=e.node,i=n?H(e.node):e.offset+1);return{node:o,offset:i}},oe=function(e,t){return e.node===t.node&&e.offset===t.offset},ie=function(e){if(i(e.node)||!ee(e.node)||P(e.node))return!0;var t=e.node.childNodes[e.offset-1],n=e.node.childNodes[e.offset];return!(t&&!a(t)||n&&!a(n))},re=function(e,t){for(;e;){if(t(e))return e;e=te(e)}return null},ae=function(e,t){for(;e;){if(t(e))return e;e=ne(e)}return null},se=function(e){if(!i(e.node))return!1;var t=e.node.nodeValue.charAt(e.offset-1);return t&&" "!==t&&t!==h},le=function(e,t,n,o){for(var i=e;i&&(n(i),!oe(i,t));){var r=o&&e.node!==i.node&&t.node!==i.node;i=ne(i,r)}},ce=function(e,t){return z(t,u.eq(e)).map(J).reverse()},de=function(e,t){for(var n=e,o=0,i=t.length;o\s]*)(.*?)(\s*\/?>)/g;o=o.replace(i,function(e,t,n){n=n.toUpperCase();var o=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(n)&&!!t,i=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(n);return e+(o||i?"\n":"")}),o=e.trim(o)}return o},ke=function(t){var n=e(t),o=n.offset(),i=n.outerHeight(!0);return{left:o.left,top:o.top+i}},Te=function(e,t){Object.keys(t).forEach(function(n){e.on(n,t[n])})},Ee=function(e,t){Object.keys(t).forEach(function(n){e.off(n,t[n])})},Ie=function(e){return e&&!p.isText(e)&&f.contains(e.classList,"note-styletag")};return{NBSP_CHAR:h,ZERO_WIDTH_NBSP_CHAR:"\ufeff",blank:L,emptyPara:"

"+L+"

",makePredByNodeName:o,isEditable:t,isControlSizing:n,isText:i,isElement:r,isVoid:a,isPara:s,isPurePara:g,isHeading:l,isInline:y,isBlock:u.not(y),isBodyInline:N,isBody:A,isParaInline:S,isPre:c,isList:w,isTable:v,isData:b,isCell:k,isBlockquote:T,isBodyContainer:E,isAnchor:I,isDiv:o("DIV"),isLi:m,isBR:o("BR"),isSpan:o("SPAN"),isB:o("B"),isU:o("U"),isS:o("S"),isI:o("I"),isImg:o("IMG"),isTextarea:ye,isEmpty:P,isEmptyAnchor:u.and(I,P),isClosestSibling:x,withClosestSiblings:R,nodeLength:H,isLeftEdgePoint:q,isRightEdgePoint:K,isEdgePoint:Y,isLeftEdgeOf:G,isRightEdgeOf:Q,isLeftEdgePointOf:X,isRightEdgePointOf:Z,prevPoint:te,nextPoint:ne,isSamePoint:oe,isVisiblePoint:ie,prevPointUntil:re,nextPointUntil:ae,isCharPoint:se,walkPoint:le,ancestor:F,singleChildAncestor:M,listAncestor:z,lastAncestor:B,listNext:$,listPrev:O,listDescendant:U,commonAncestor:_,wrap:j,insertAfter:V,appendChildNodes:W,position:J,hasChildren:ee,makeOffsetPath:ce,fromOffsetPath:de,splitTree:fe,splitPoint:he,create:pe,createText:me,remove:ge,removeWhile:ve,replace:be,html:Ce,value:we,posFromPlaceholder:ke, attachEvents:Te,detachEvents:Ee,isCustomStyleTag:Ie}}(),m=function(t,n){var o=this,i=e.summernote.ui;return this.memos={},this.modules={},this.layoutInfo={},this.options=n,this.initialize=function(){return this.layoutInfo=i.createLayout(t,n),this._initialize(),t.hide(),this},this.destroy=function(){this._destroy(),t.removeData("summernote"),i.removeLayout(t,this.layoutInfo)},this.reset=function(){var e=o.isDisabled();this.code(p.emptyPara),this._destroy(),this._initialize(),e&&o.disable()},this._initialize=function(){var t=e.extend({},this.options.buttons);Object.keys(t).forEach(function(e){o.memo("button."+e,t[e])});var n=e.extend({},this.options.modules,e.summernote.plugins||{});Object.keys(n).forEach(function(e){o.module(e,n[e],!0)}),Object.keys(this.modules).forEach(function(e){o.initializeModule(e)})},this._destroy=function(){Object.keys(this.modules).reverse().forEach(function(e){o.removeModule(e)}),Object.keys(this.memos).forEach(function(e){o.removeMemo(e)}),this.triggerEvent("destroy",this)},this.code=function(e){var n=this.invoke("codeview.isActivated");if(void 0===e)return this.invoke("codeview.sync"),n?this.layoutInfo.codable.val():this.layoutInfo.editable.html();n?this.layoutInfo.codable.val(e):this.layoutInfo.editable.html(e),t.val(e),this.triggerEvent("change",e)},this.isDisabled=function(){return"false"===this.layoutInfo.editable.attr("contenteditable")},this.enable=function(){this.layoutInfo.editable.attr("contenteditable",!0),this.invoke("toolbar.activate",!0),this.triggerEvent("disable",!1)},this.disable=function(){this.invoke("codeview.isActivated")&&this.invoke("codeview.deactivate"),this.layoutInfo.editable.attr("contenteditable",!1),this.invoke("toolbar.deactivate",!0),this.triggerEvent("disable",!0)},this.triggerEvent=function(){var e=f.head(arguments),n=f.tail(f.from(arguments)),o=this.options.callbacks[u.namespaceToCamel(e,"on")];o&&o.apply(t[0],n),t.trigger("summernote."+e,n)},this.initializeModule=function(e){var n=this.modules[e];n.shouldInitialize=n.shouldInitialize||u.ok,n.shouldInitialize()&&(n.initialize&&n.initialize(),n.events&&p.attachEvents(t,n.events))},this.module=function(e,t,n){if(1===arguments.length)return this.modules[e];this.modules[e]=new t(this),n||this.initializeModule(e)},this.removeModule=function(e){var n=this.modules[e];n.shouldInitialize()&&(n.events&&p.detachEvents(t,n.events),n.destroy&&n.destroy()),delete this.modules[e]},this.memo=function(e,t){if(1===arguments.length)return this.memos[e];this.memos[e]=t},this.removeMemo=function(e){this.memos[e]&&this.memos[e].destroy&&this.memos[e].destroy(),delete this.memos[e]},this.createInvokeHandlerAndUpdateState=function(e,t){return function(n){o.createInvokeHandler(e,t)(n),o.invoke("buttons.updateCurrentStyle")}},this.createInvokeHandler=function(t,n){return function(i){i.preventDefault();var r=e(i.target);o.invoke(t,n||r.closest("[data-value]").data("value"),r)}},this.invoke=function(){var e=f.head(arguments),t=f.tail(f.from(arguments)),n=e.split("."),o=n.length>1,i=o&&f.head(n),r=o?f.last(n):f.head(n),a=this.modules[i||"editor"];return!i&&this[r]?this[r].apply(this,t):a&&a[r]&&a.shouldInitialize()?a[r].apply(a,t):void 0},this.initialize()};e.fn.extend({summernote:function(){var t=e.type(f.head(arguments)),n="string"===t,o="object"===t,i=o?f.head(arguments):{};i=e.extend({},e.summernote.options,i),i.langInfo=e.extend(!0,{},e.summernote.lang["en-US"],e.summernote.lang[i.lang]),i.icons=e.extend(!0,{},e.summernote.options.icons,i.icons),i.tooltip="auto"===i.tooltip?!d.isSupportTouch:i.tooltip,this.each(function(t,n){var o=e(n);if(!o.data("summernote")){var r=new m(o,i);o.data("summernote",r),o.data("summernote").triggerEvent("init",r.layoutInfo)}});var r=this.first();if(r.length){var a=r.data("summernote");if(n)return a.invoke.apply(a,f.from(arguments));i.focus&&a.invoke("editor.focus")}return this}});var g=function(t,n,o,i){this.render=function(r){var a=e(t);if(o&&o.contents&&a.html(o.contents),o&&o.className&&a.addClass(o.className),o&&o.data&&e.each(o.data,function(e,t){a.attr("data-"+e,t)}),o&&o.click&&a.on("click",o.click),n){var s=a.find(".note-children-container");n.forEach(function(e){e.render(s.length?s:a)})}return i&&i(a,o),o&&o.callback&&o.callback(a),r&&r.append(a),a}},v={create:function(t,n){return function(){var o=e.isArray(arguments[0])?arguments[0]:[],i="object"==typeof arguments[1]?arguments[1]:arguments[0];return i&&i.children&&(o=i.children),new g(t,o,i,n)}}},b=v.create('
'),y=v.create('
'),w=v.create('
'),C=v.create('