(function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.Popper=t()})(this,function(){"use strict";function ut(n){return n&&"[object Function]"==={}.toString.call(n)}function u(n,t){if(1!==n.nodeType)return[];var i=getComputedStyle(n,null);return t?i[t]:i}function p(n){return"HTML"===n.nodeName?n:n.parentNode||n.host}function c(n){if(!n)return document.body;switch(n.nodeName){case"HTML":case"BODY":return n.ownerDocument.body;case"#document":return n.body}var t=u(n),i=t.overflow,r=t.overflowX,f=t.overflowY;return/(auto|scroll|overlay)/.test(i+f+r)?n:c(p(n))}function f(n){var r,t,i;if(!n)return document.documentElement;for(r=s(10)?document.body:null,t=n.offsetParent;t===r&&n.nextElementSibling;)t=(n=n.nextElementSibling).offsetParent;return i=t&&t.nodeName,i&&"BODY"!==i&&"HTML"!==i?-1!==["TD","TABLE"].indexOf(t.nodeName)&&"static"===u(t,"position")?f(t):t:n?n.ownerDocument.documentElement:document.documentElement}function fi(n){var t=n.nodeName;return"BODY"!==t&&("HTML"===t||f(n.firstElementChild)===n)}function w(n){return null===n.parentNode?n:w(n.parentNode)}function a(n,t){var i,u;if(!n||!n.nodeType||!t||!t.nodeType)return document.documentElement;var e=n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,o=e?n:t,s=e?t:n,r=document.createRange();return(r.setStart(o,0),r.setEnd(s,0),i=r.commonAncestorContainer,n!==i&&t!==i||o.contains(s))?fi(i)?i:f(i):(u=w(n),u.host?a(u.host,t):a(n,w(t).host))}function e(n){var f=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"top",t="top"===f?"scrollTop":"scrollLeft",i=n.nodeName,r,u;return"BODY"===i||"HTML"===i?(r=n.ownerDocument.documentElement,u=n.ownerDocument.scrollingElement||r,u[t]):n[t]}function ei(n,t){var f=2<arguments.length&&void 0!==arguments[2]&&arguments[2],r=e(t,"top"),u=e(t,"left"),i=f?-1:1;return n.top+=r*i,n.bottom+=r*i,n.left+=u*i,n.right+=u*i,n}function ft(n,t){var i="x"===t?"Left":"Top",r="Left"==i?"Right":"Bottom";return parseFloat(n["border"+i+"Width"],10)+parseFloat(n["border"+r+"Width"],10)}function et(n,t,r,u){return i(t["offset"+n],t["scroll"+n],r["client"+n],r["offset"+n],r["scroll"+n],s(10)?r["offset"+n]+u["margin"+("Height"===n?"Top":"Left")]+u["margin"+("Height"===n?"Bottom":"Right")]:0)}function ot(){var t=document.body,n=document.documentElement,i=s(10)&&getComputedStyle(n);return{height:et("Height",t,n,i),width:et("Width",t,n,i)}}function r(t){return n({},t,{right:t.left+t.width,bottom:t.top+t.height})}function b(n){var t={},f,o,l;try{s(10)?(t=n.getBoundingClientRect(),f=e(n,"top"),o=e(n,"left"),t.top+=f,t.left+=o,t.bottom+=f,t.right+=o):t=n.getBoundingClientRect()}catch(u){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},a="HTML"===n.nodeName?ot():{},v=a.width||n.clientWidth||i.right-i.left,y=a.height||n.clientHeight||i.bottom-i.top,h=n.offsetWidth-v,c=n.offsetHeight-y;return(h||c)&&(l=u(n),h-=ft(l,"x"),c-=ft(l,"y"),i.width-=h,i.height-=c),r(i)}function k(n,t){var w=2<arguments.length&&void 0!==arguments[2]&&arguments[2],k=s(10),d="HTML"===t.nodeName,o=b(n),e=b(t),v=c(n),h=u(t),y=parseFloat(h.borderTopWidth,10),p=parseFloat(h.borderLeftWidth,10),f,l,a;return w&&"HTML"===t.nodeName&&(e.top=i(e.top,0),e.left=i(e.left,0)),f=r({top:o.top-e.top-y,left:o.left-e.left-p,width:o.width,height:o.height}),(f.marginTop=0,f.marginLeft=0,!k&&d)&&(l=parseFloat(h.marginTop,10),a=parseFloat(h.marginLeft,10),f.top-=y-l,f.bottom-=y-l,f.left-=p-a,f.right-=p-a,f.marginTop=l,f.marginLeft=a),(k&&!w?t.contains(v):t===v&&"BODY"!==v.nodeName)&&(f=ei(f,t)),f}function oi(n){var f=1<arguments.length&&void 0!==arguments[1]&&arguments[1],t=n.ownerDocument.documentElement,u=k(n,t),o=i(t.clientWidth,window.innerWidth||0),s=i(t.clientHeight,window.innerHeight||0),h=f?0:e(t),c=f?0:e(t,"left"),l={top:h-u.top+u.marginTop,left:c-u.left+u.marginLeft,width:o,height:s};return r(l)}function st(n){var t=n.nodeName;return"BODY"===t||"HTML"===t?!1:"fixed"===u(n,"position")||st(p(n))}function ht(n){if(!n||!n.parentElement||s())return document.documentElement;for(var t=n.parentElement;t&&"none"===u(t,"transform");)t=t.parentElement;return t||document.documentElement}function d(n,t,i,r){var o=4<arguments.length&&void 0!==arguments[4]&&arguments[4],u={top:0,left:0},s=o?ht(n):a(n,t),e,f;if("viewport"===r)u=oi(s,o);else if("scrollParent"===r?(e=c(p(t)),"BODY"===e.nodeName&&(e=n.ownerDocument.documentElement)):e="window"===r?n.ownerDocument.documentElement:r,f=k(e,s,o),"HTML"!==e.nodeName||st(s))u=f;else{var h=ot(),l=h.height,v=h.width;u.top+=f.top-f.marginTop;u.bottom=l+f.top;u.left+=f.left-f.marginLeft;u.right=v+f.left}return u.left+=i,u.top+=i,u.right-=i,u.bottom-=i,u}function si(n){var t=n.width,i=n.height;return t*i}function ct(t,i,r,u,f){var l=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var e=d(r,u,l,f),o={top:{width:e.width,height:i.top-e.top},right:{width:e.right-i.right,height:e.height},bottom:{width:e.width,height:e.bottom-i.bottom},left:{width:i.left-e.left,height:e.height}},s=Object.keys(o).map(function(t){return n({key:t},o[t],{area:si(o[t])})}).sort(function(n,t){return t.area-n.area}),h=s.filter(function(n){var t=n.width,i=n.height;return t>=r.clientWidth&&i>=r.clientHeight}),a=0<h.length?h[0].key:s[0].key,c=t.split("-")[1];return a+(c?"-"+c:"")}function lt(n,t,i){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,u=r?ht(t):a(t,i);return k(i,u,r)}function at(n){var t=getComputedStyle(n),i=parseFloat(t.marginTop)+parseFloat(t.marginBottom),r=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return{width:n.offsetWidth+r,height:n.offsetHeight+i}}function v(n){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return n.replace(/left|right|bottom|top/g,function(n){return t[n]})}function vt(n,t,i){i=i.split("-")[0];var r=at(n),e={width:r.width,height:r.height},u=-1!==["right","left"].indexOf(i),o=u?"top":"left",f=u?"left":"top",s=u?"height":"width",h=u?"width":"height";return e[o]=t[o]+t[s]/2-r[s]/2,e[f]=i===f?t[f]-r[h]:t[v(f)],e}function l(n,t){return Array.prototype.find?n.find(t):n.filter(t)[0]}function hi(n,t,i){if(Array.prototype.findIndex)return n.findIndex(function(n){return n[t]===i});var r=l(n,function(n){return n[t]===i});return n.indexOf(r)}function yt(n,t,i){var u=void 0===i?n:n.slice(0,hi(n,"name",i));return u.forEach(function(n){n["function"]&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var i=n["function"]||n.fn;n.enabled&&ut(i)&&(t.offsets.popper=r(t.offsets.popper),t.offsets.reference=r(t.offsets.reference),t=i(t,n))}),t}function ci(){if(!this.state.isDestroyed){var n={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};n.offsets.reference=lt(this.state,this.popper,this.reference,this.options.positionFixed);n.placement=ct(this.options.placement,n.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding);n.originalPlacement=n.placement;n.positionFixed=this.options.positionFixed;n.offsets.popper=vt(this.popper,n.offsets.reference,n.placement);n.offsets.popper.position=this.options.positionFixed?"fixed":"absolute";n=yt(this.modifiers,n);this.state.isCreated?this.options.onUpdate(n):(this.state.isCreated=!0,this.options.onCreate(n))}}function pt(n,t){return n.some(function(n){var i=n.name,r=n.enabled;return r&&i===t})}function wt(n){for(var i,r,u=[!1,"ms","Webkit","Moz","O"],f=n.charAt(0).toUpperCase()+n.slice(1),t=0;t<u.length;t++)if(i=u[t],r=i?""+i+f:n,"undefined"!=typeof document.body.style[r])return r;return null}function li(){return this.state.isDestroyed=!0,pt(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[wt("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function bt(n){var t=n.ownerDocument;return t?t.defaultView:window}function kt(n,t,i,r){var f="BODY"===n.nodeName,u=f?n.ownerDocument.defaultView:n;u.addEventListener(t,i,{passive:!0});f||kt(c(u.parentNode),t,i,r);r.push(u)}function ai(n,t,i,r){i.updateBound=r;bt(n).addEventListener("resize",i.updateBound,{passive:!0});var u=c(n);return kt(u,"scroll",i.updateBound,i.scrollParents),i.scrollElement=u,i.eventsEnabled=!0,i}function vi(){this.state.eventsEnabled||(this.state=ai(this.reference,this.options,this.state,this.scheduleUpdate))}function yi(n,t){return bt(n).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(n){n.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function pi(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=yi(this.reference,this.state))}function g(n){return""!==n&&!isNaN(parseFloat(n))&&isFinite(n)}function nt(n,t){Object.keys(t).forEach(function(i){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&g(t[i])&&(r="px");n.style[i]=t[i]+r})}function wi(n,t){Object.keys(t).forEach(function(i){var r=t[i];!1===r?n.removeAttribute(i):n.setAttribute(i,t[i])})}function dt(n,t,i){var u=l(n,function(n){var i=n.name;return i===t}),f=!!u&&n.some(function(n){return n.name===i&&n.enabled&&n.order<u.order}),r;return f||(r="`"+t+"`",console.warn("`"+i+"` modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")),f}function bi(n){return"end"===n?"start":"start"===n?"end":n}function gt(n){var r=1<arguments.length&&void 0!==arguments[1]&&arguments[1],t=it.indexOf(n),i=it.slice(t+1).concat(it.slice(0,t));return r?i.reverse():i}function ki(n,t,u,f){var h=n.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+h[1],e=h[2],s,c,l;if(!o)return n;if(0===e.indexOf("%")){switch(e){case"%p":s=u;break;case"%":case"%r":default:s=f}return c=r(s),c[t]/100*o}return"vh"===e||"vw"===e?(l="vh"===e?i(document.documentElement.clientHeight,window.innerHeight||0):i(document.documentElement.clientWidth,window.innerWidth||0),l/100*o):o}function di(n,t,i,r){var s=[0,0],h=-1!==["right","left"].indexOf(r),u=n.split(/(\+|\-)/).map(function(n){return n.trim()}),f=u.indexOf(l(u,function(n){return-1!==n.search(/,|\s/)})),o,e;return u[f]&&-1===u[f].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead."),o=/\s*,\s*|\s+/,e=-1===f?[u]:[u.slice(0,f).concat([u[f].split(o)[0]]),[u[f].split(o)[1]].concat(u.slice(f+1))],e=e.map(function(n,r){var f=(1===r?!h:h)?"height":"width",u=!1;return n.reduce(function(n,t){return""===n[n.length-1]&&-1!==["+","-"].indexOf(t)?(n[n.length-1]=t,u=!0,n):u?(n[n.length-1]+=t,u=!1,n):n.concat(t)},[]).map(function(n){return ki(n,f,t,i)})}),e.forEach(function(n,t){n.forEach(function(i,r){g(i)&&(s[t]+=i*("-"===n[r-1]?-1:1))})}),s}function gi(n,t){var r,f=t.offset,o=n.placement,e=n.offsets,i=e.popper,s=e.reference,u=o.split("-")[0];return r=g(+f)?[+f,0]:di(f,i,s,u),"left"===u?(i.top+=r[0],i.left-=r[1]):"right"===u?(i.top+=r[0],i.left+=r[1]):"top"===u?(i.left+=r[0],i.top-=r[1]):"bottom"===u&&(i.left+=r[0],i.top+=r[1]),n.popper=i,n}for(var ni=Math.min,o=Math.floor,i=Math.max,ti="undefined"!=typeof window&&"undefined"!=typeof document,ii=["Edge","Trident","Firefox"],ri=0,tt=0;tt<ii.length;tt+=1)if(ti&&0<=navigator.userAgent.indexOf(ii[tt])){ri=1;break}var nr=ti&&window.Promise,tr=nr?function(n){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1;n()}))}}:function(n){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1;n()},ri))}},t={},s=function(){var n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"all";return(n=n.toString(),t.hasOwnProperty(n))?t[n]:("11"===n?t[n]=-1!==navigator.userAgent.indexOf("Trident"):"10"===n?t[n]=-1!==navigator.appVersion.indexOf("MSIE 10"):"all"===n?t[n]=-1!==navigator.userAgent.indexOf("Trident")||-1!==navigator.userAgent.indexOf("MSIE"):void 0,t.all=t.all||Object.keys(t).some(function(n){return t[n]}),t[n])},ir=function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function");},rr=function(){function n(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}return function(t,i,r){return i&&n(t.prototype,i),r&&n(t,r),t}}(),h=function(n,t,i){return t in n?Object.defineProperty(n,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[t]=i,n},n=Object.assign||function(n){for(var t,r,i=1;i<arguments.length;i++)for(r in t=arguments[i],t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},ui=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],it=ui.slice(3),rt={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},y=function(){function t(i,r){var u=this,f=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},e;ir(this,t);this.scheduleUpdate=function(){return requestAnimationFrame(u.update)};this.update=tr(this.update.bind(this));this.options=n({},t.Defaults,f);this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]};this.reference=i&&i.jquery?i[0]:i;this.popper=r&&r.jquery?r[0]:r;this.options.modifiers={};Object.keys(n({},t.Defaults.modifiers,f.modifiers)).forEach(function(i){u.options.modifiers[i]=n({},t.Defaults.modifiers[i]||{},f.modifiers?f.modifiers[i]:{})});this.modifiers=Object.keys(this.options.modifiers).map(function(t){return n({name:t},u.options.modifiers[t])}).sort(function(n,t){return n.order-t.order});this.modifiers.forEach(function(n){n.enabled&&ut(n.onLoad)&&n.onLoad(u.reference,u.popper,u.options,n,u.state)});this.update();e=this.options.eventsEnabled;e&&this.enableEventListeners();this.state.eventsEnabled=e}return rr(t,[{key:"update",value:function(){return ci.call(this)}},{key:"destroy",value:function(){return li.call(this)}},{key:"enableEventListeners",value:function(){return vi.call(this)}},{key:"disableEventListeners",value:function(){return pi.call(this)}}]),t}();return y.Utils=("undefined"==typeof window?global:window).PopperUtils,y.placements=ui,y.Defaults={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var u=t.placement,l=u.split("-")[0],f=u.split("-")[1];if(f){var e=t.offsets,r=e.reference,o=e.popper,s=-1!==["bottom","top"].indexOf(l),i=s?"left":"top",c=s?"width":"height",a={start:h({},i,r[i]),end:h({},i,r[i]+r[c]-o[c])};t.offsets.popper=n({},o,a[f])}return t}},offset:{order:200,enabled:!0,fn:gi,offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,r){var o=r.boundariesElement||f(t.instance.popper),e;t.instance.reference===o&&(o=f(o));e=d(t.instance.popper,t.instance.reference,r.padding,o,t.positionFixed);r.boundaries=e;var s=r.priority,u=t.offsets.popper,c={primary:function(n){var t=u[n];return u[n]<e[n]&&!r.escapeWithReference&&(t=i(u[n],e[n])),h({},n,t)},secondary:function(n){var t="right"===n?"left":"top",i=u[t];return u[n]>e[n]&&!r.escapeWithReference&&(i=ni(u[t],e[n]-("right"===n?u.width:u.height))),h({},t,i)}};return s.forEach(function(t){var i=-1===["left","top"].indexOf(t)?"secondary":"primary";u=n({},u,c[i](t))}),t.offsets.popper=u,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(n){var s=n.offsets,u=s.popper,i=s.reference,h=n.placement.split("-")[0],r=o,f=-1!==["top","bottom"].indexOf(h),e=f?"right":"bottom",t=f?"left":"top",c=f?"width":"height";return u[e]<r(i[t])&&(n.offsets.popper[t]=r(i[t])-u[c]),u[t]>r(i[e])&&(n.offsets.popper[t]=r(i[e])),n}},arrow:{order:500,enabled:!0,fn:function(n,t){var l,e;if(!dt(n.instance.modifiers,"arrow","keepTogether"))return n;if(e=t.element,"string"==typeof e){if(e=n.instance.popper.querySelector(e),!e)return n}else if(!n.instance.popper.contains(e))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),n;var d=n.placement.split("-")[0],b=n.offsets,c=b.popper,o=b.reference,a=-1!==["left","right"].indexOf(d),y=a?"height":"width",p=a?"Top":"Left",f=p.toLowerCase(),g=a?"left":"top",v=a?"bottom":"right",s=at(e)[y];o[v]-s<c[f]&&(n.offsets.popper[f]-=c[f]-(o[v]-s));o[f]+s>c[v]&&(n.offsets.popper[f]+=o[f]+s-c[v]);n.offsets.popper=r(n.offsets.popper);var nt=o[f]+o[y]/2-s/2,k=u(n.instance.popper),tt=parseFloat(k["margin"+p],10),it=parseFloat(k["border"+p+"Width"],10),w=nt-n.offsets.popper[f]-tt-it;return w=i(ni(c[y]-s,w),0),n.arrowElement=e,n.offsets.arrow=(l={},h(l,f,Math.round(w)),h(l,g,""),l),n},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,i){if(pt(t.instance.modifiers,"inner")||t.flipped&&t.placement===t.originalPlacement)return t;var e=d(t.instance.popper,t.instance.reference,i.padding,i.boundariesElement,t.positionFixed),r=t.placement.split("-")[0],s=v(r),u=t.placement.split("-")[1]||"",f=[];switch(i.behavior){case rt.FLIP:f=[r,s];break;case rt.CLOCKWISE:f=gt(r);break;case rt.COUNTERCLOCKWISE:f=gt(r,!0);break;default:f=i.behavior}return f.forEach(function(h,c){if(r!==h||f.length===c+1)return t;r=t.placement.split("-")[0];s=v(r);var a=t.offsets.popper,y=t.offsets.reference,l=o,w="left"===r&&l(a.right)>l(y.left)||"right"===r&&l(a.left)<l(y.right)||"top"===r&&l(a.bottom)>l(y.top)||"bottom"===r&&l(a.top)<l(y.bottom),b=l(a.left)<l(e.left),k=l(a.right)>l(e.right),d=l(a.top)<l(e.top),g=l(a.bottom)>l(e.bottom),nt="left"===r&&b||"right"===r&&k||"top"===r&&d||"bottom"===r&&g,p=-1!==["top","bottom"].indexOf(r),tt=!!i.flipVariations&&(p&&"start"===u&&b||p&&"end"===u&&k||!p&&"start"===u&&d||!p&&"end"===u&&g);(w||nt||tt)&&(t.flipped=!0,(w||nt)&&(r=f[c+1]),tt&&(u=bi(u)),t.placement=r+(u?"-"+u:""),t.offsets.popper=n({},t.offsets.popper,vt(t.instance.popper,t.offsets.reference,t.placement)),t=yt(t.instance.modifiers,t,"flip"))}),t},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(n){var u=n.placement,t=u.split("-")[0],f=n.offsets,i=f.popper,o=f.reference,e=-1!==["left","right"].indexOf(t),s=-1===["top","left"].indexOf(t);return i[e?"left":"top"]=o[t]-(s?i[e?"width":"height"]:0),n.placement=v(u),n.offsets.popper=r(i),n}},hide:{order:800,enabled:!0,fn:function(n){if(!dt(n.instance.modifiers,"hide","preventOverflow"))return n;var t=n.offsets.reference,i=l(n.instance.modifiers,function(n){return"preventOverflow"===n.name}).boundaries;if(t.bottom<i.top||t.left>i.right||t.top>i.bottom||t.right<i.left){if(!0===n.hide)return n;n.hide=!0;n.attributes["x-out-of-boundaries"]=""}else{if(!1===n.hide)return n;n.hide=!1;n.attributes["x-out-of-boundaries"]=!1}return n}},computeStyle:{order:850,enabled:!0,fn:function(t,i){var g=i.x,nt=i.y,u=t.offsets.popper,c=l(t.instance.modifiers,function(n){return"applyStyle"===n.name}).gpuAcceleration,w,k,d;void 0!==c&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a,v,tt=void 0===c?i.gpuAcceleration:c,it=f(t.instance.popper),y=b(it),r={position:u.position},h={left:o(u.left),top:o(u.top),bottom:o(u.bottom),right:o(u.right)},e="bottom"===g?"top":"bottom",s="right"===nt?"left":"right",p=wt("transform");return(v="bottom"==e?-y.height+h.bottom:h.top,a="right"==s?-y.width+h.right:h.left,tt&&p)?(r[p]="translate3d("+a+"px, "+v+"px, 0)",r[e]=0,r[s]=0,r.willChange="transform"):(w="bottom"==e?-1:1,k="right"==s?-1:1,r[e]=v*w,r[s]=a*k,r.willChange=e+", "+s),d={"x-placement":t.placement},t.attributes=n({},d,t.attributes),t.styles=n({},r,t.styles),t.arrowStyles=n({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(n){return nt(n.instance.popper,n.styles),wi(n.instance.popper,n.attributes),n.arrowElement&&Object.keys(n.arrowStyles).length&&nt(n.arrowElement,n.arrowStyles),n},onLoad:function(n,t,i,r,u){var f=lt(u,t,n,i.positionFixed),e=ct(i.placement,f,t,n,i.modifiers.flip.boundariesElement,i.modifiers.flip.padding);return t.setAttribute("x-placement",e),nt(t,{position:i.positionFixed?"fixed":"absolute"}),i},gpuAcceleration:void 0}}},y});!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],t):t((n=n||self).bootstrap={},n.jQuery,n.Popper)}(this,function(n,t,i){"use strict";function uu(n,t){for(var i,r=0;r<t.length;r++)i=t[r],i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}function l(n,t,i){return t&&uu(n.prototype,t),i&&uu(n,i),n}function f(n){for(var i,r,t=1;t<arguments.length;t++)i=null!=arguments[t]?arguments[t]:{},r=Object.keys(i),"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(i).filter(function(n){return Object.getOwnPropertyDescriptor(i,n).enumerable}))),r.forEach(function(t){var r,u,f;r=n;f=i[u=t];u in r?Object.defineProperty(r,u,{value:f,enumerable:!0,configurable:!0,writable:!0}):r[u]=f});return n}function cf(n){var u=this,i=!1;return t(this).one(r.TRANSITION_END,function(){i=!0}),setTimeout(function(){i||r.triggerTransitionEnd(u)},n),this}function wu(n,t,i){if(0===n.length)return n;if(i&&"function"==typeof i)return i(n);for(var u=(new window.DOMParser).parseFromString(n,"text/html"),e=Object.keys(t),f=[].slice.call(u.body.querySelectorAll("*")),o=function(n){var i=f[n],o=i.nodeName.toLowerCase(),r,u;if(-1===e.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";r=[].slice.call(i.attributes);u=[].concat(t["*"]||[],t[o]||[]);r.forEach(function(n){(function(n,t){var i=n.nodeName.toLowerCase();if(-1!==t.indexOf(i))return-1===us.indexOf(i)||Boolean(n.nodeValue.match(fs)||n.nodeValue.match(es));for(var u=t.filter(function(n){return n instanceof RegExp}),r=0,f=u.length;r<f;r++)if(i.match(u[r]))return!0;return!1})(n,u)||i.removeAttribute(n.nodeName)})},r=0,s=f.length;r<s;r++)o(r);return u.body.innerHTML}var at,r;t=t&&t.hasOwnProperty("default")?t.default:t;i=i&&i.hasOwnProperty("default")?i.default:i;at="transitionend";r={TRANSITION_END:"bsTransitionEnd",getUID:function(n){for(;n+=~~(1e6*Math.random()),document.getElementById(n););return n},getSelectorFromElement:function(n){var t=n.getAttribute("data-target"),i;t&&"#"!==t||(i=n.getAttribute("href"),t=i&&"#"!==i?i.trim():"");try{return document.querySelector(t)?t:null}catch(n){return null}},getTransitionDurationFromElement:function(n){if(!n)return 0;var i=t(n).css("transition-duration"),r=t(n).css("transition-delay"),u=parseFloat(i),f=parseFloat(r);return u||f?(i=i.split(",")[0],r=r.split(",")[0],1e3*(parseFloat(i)+parseFloat(r))):0},reflow:function(n){return n.offsetHeight},triggerTransitionEnd:function(n){t(n).trigger(at)},supportsTransitionEnd:function(){return Boolean(at)},isElement:function(n){return(n[0]||n).nodeType},typeCheckConfig:function(n,t,i){var u,s;for(u in i)if(Object.prototype.hasOwnProperty.call(i,u)){var e=i[u],f=t[u],o=f&&r.isElement(f)?"element":(s=f,{}.toString.call(s).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(e).test(o))throw new Error(n.toUpperCase()+': Option "'+u+'" provided type "'+o+'" but expected type "'+e+'".');}},findShadowRoot:function(n){if(!document.documentElement.attachShadow)return null;if("function"!=typeof n.getRootNode)return n instanceof ShadowRoot?n:n.parentNode?r.findShadowRoot(n.parentNode):null;var t=n.getRootNode();return t instanceof ShadowRoot?t:null}};t.fn.emulateTransitionEnd=cf;t.event.special[r.TRANSITION_END]={bindType:at,delegateType:at,handle:function(n){if(t(n.target).is(this))return n.handleObj.handler.apply(this,arguments)}};var vt="alert",pi="bs.alert",cr="."+pi,lf=t.fn[vt],lr={CLOSE:"close"+cr,CLOSED:"closed"+cr,CLICK_DATA_API:"click"+cr+".data-api"},af="alert",vf="fade",yf="show",it=function(){function n(n){this._element=n}var i=n.prototype;return i.close=function(n){var t=this._element;n&&(t=this._getRootElement(n));this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},i.dispose=function(){t.removeData(this._element,pi);this._element=null},i._getRootElement=function(n){var u=r.getSelectorFromElement(n),i=!1;return u&&(i=document.querySelector(u)),i||(i=t(n).closest("."+af)[0]),i},i._triggerCloseEvent=function(n){var i=t.Event(lr.CLOSE);return t(n).trigger(i),i},i._removeElement=function(n){var u=this,i;(t(n).removeClass(yf),t(n).hasClass(vf))?(i=r.getTransitionDurationFromElement(n),t(n).one(r.TRANSITION_END,function(t){return u._destroyElement(n,t)}).emulateTransitionEnd(i)):this._destroyElement(n)},i._destroyElement=function(n){t(n).detach().trigger(lr.CLOSED).remove()},n._jQueryInterface=function(i){return this.each(function(){var u=t(this),r=u.data(pi);r||(r=new n(this),u.data(pi,r));"close"===i&&r[i](this)})},n._handleDismiss=function(n){return function(t){t&&t.preventDefault();n.close(this)}},l(n,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),n}();t(document).on(lr.CLICK_DATA_API,'[data-dismiss="alert"]',it._handleDismiss(new it));t.fn[vt]=it._jQueryInterface;t.fn[vt].Constructor=it;t.fn[vt].noConflict=function(){return t.fn[vt]=lf,it._jQueryInterface};var yt="button",wi="bs.button",ar="."+wi,vr=".data-api",pf=t.fn[yt],pt="active",wf="btn",bf="focus",fu='[data-toggle^="button"]',kf='[data-toggle="buttons"]',df='input:not([type="hidden"])',gf=".active",eu=".btn",ou={CLICK_DATA_API:"click"+ar+vr,FOCUS_BLUR_DATA_API:"focus"+ar+vr+" blur"+ar+vr},wt=function(){function n(n){this._element=n}var i=n.prototype;return i.toggle=function(){var r=!0,f=!0,i=t(this._element).closest(kf)[0],n,u;if(i&&(n=this._element.querySelector(df),n)){if("radio"===n.type&&(n.checked&&this._element.classList.contains(pt)?r=!1:(u=i.querySelector(gf),u&&t(u).removeClass(pt))),r){if(n.hasAttribute("disabled")||i.hasAttribute("disabled")||n.classList.contains("disabled")||i.classList.contains("disabled"))return;n.checked=!this._element.classList.contains(pt);t(n).trigger("change")}n.focus();f=!1}f&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(pt));r&&t(this._element).toggleClass(pt)},i.dispose=function(){t.removeData(this._element,wi);this._element=null},n._jQueryInterface=function(i){return this.each(function(){var r=t(this).data(wi);r||(r=new n(this),t(this).data(wi,r));"toggle"===i&&r[i]()})},l(n,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),n}();t(document).on(ou.CLICK_DATA_API,fu,function(n){n.preventDefault();var i=n.target;t(i).hasClass(wf)||(i=t(i).closest(eu));wt._jQueryInterface.call(t(i),"toggle")}).on(ou.FOCUS_BLUR_DATA_API,fu,function(n){var i=t(n.target).closest(eu)[0];t(i).toggleClass(bf,/^focus(in)?$/.test(n.type))});t.fn[yt]=wt._jQueryInterface;t.fn[yt].Constructor=wt;t.fn[yt].noConflict=function(){return t.fn[yt]=pf,wt._jQueryInterface};var rt="carousel",bt="bs.carousel",o="."+bt,su=".data-api",ne=t.fn[rt],yr={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},te={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},bi="next",ki="prev",ie="left",re="right",s={SLIDE:"slide"+o,SLID:"slid"+o,KEYDOWN:"keydown"+o,MOUSEENTER:"mouseenter"+o,MOUSELEAVE:"mouseleave"+o,TOUCHSTART:"touchstart"+o,TOUCHMOVE:"touchmove"+o,TOUCHEND:"touchend"+o,POINTERDOWN:"pointerdown"+o,POINTERUP:"pointerup"+o,DRAG_START:"dragstart"+o,LOAD_DATA_API:"load"+o+su,CLICK_DATA_API:"click"+o+su},ue="carousel",w="active",fe="slide",ee="carousel-item-right",oe="carousel-item-left",se="carousel-item-next",he="carousel-item-prev",ce="pointer-event",le=".active",pr=".active.carousel-item",ae=".carousel-item",ve=".carousel-item img",ye=".carousel-item-next, .carousel-item-prev",pe=".carousel-indicators",we='[data-ride="carousel"]',hu={TOUCH:"touch",PEN:"pen"},ut=function(){function i(n,t){this._items=null;this._interval=null;this._activeElement=null;this._isPaused=!1;this._isSliding=!1;this.touchTimeout=null;this.touchStartX=0;this.touchDeltaX=0;this._config=this._getConfig(t);this._element=n;this._indicatorsElement=this._element.querySelector(pe);this._touchSupported="ontouchstart"in document.documentElement||0<navigator.maxTouchPoints;this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent);this._addEventListeners()}var n=i.prototype;return n.next=function(){this._isSliding||this._slide(bi)},n.nextWhenVisible=function(){!document.hidden&&t(this._element).is(":visible")&&"hidden"!==t(this._element).css("visibility")&&this.next()},n.prev=function(){this._isSliding||this._slide(ki)},n.pause=function(n){n||(this._isPaused=!0);this._element.querySelector(ye)&&(r.triggerTransitionEnd(this._element),this.cycle(!0));clearInterval(this._interval);this._interval=null},n.cycle=function(n){n||(this._isPaused=!1);this._interval&&(clearInterval(this._interval),this._interval=null);this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},n.to=function(n){var u=this,i,r;if(this._activeElement=this._element.querySelector(pr),i=this._getItemIndex(this._activeElement),!(n>this._items.length-1||n<0))if(this._isSliding)t(this._element).one(s.SLID,function(){return u.to(n)});else{if(i===n)return this.pause(),void this.cycle();r=i<n?bi:ki;this._slide(r,this._items[n])}},n.dispose=function(){t(this._element).off(o);t.removeData(this._element,bt);this._items=null;this._config=null;this._element=null;this._interval=null;this._isPaused=null;this._isSliding=null;this._activeElement=null;this._indicatorsElement=null},n._getConfig=function(n){return n=f({},yr,n),r.typeCheckConfig(rt,n,te),n},n._handleSwipe=function(){var t=Math.abs(this.touchDeltaX),n;t<=40||(n=t/this.touchDeltaX,0<n&&this.prev(),n<0&&this.next())},n._addEventListeners=function(){var n=this;this._config.keyboard&&t(this._element).on(s.KEYDOWN,function(t){return n._keydown(t)});"hover"===this._config.pause&&t(this._element).on(s.MOUSEENTER,function(t){return n.pause(t)}).on(s.MOUSELEAVE,function(t){return n.cycle(t)});this._config.touch&&this._addTouchEventListeners()},n._addTouchEventListeners=function(){var n=this,i,r;this._touchSupported&&(i=function(t){n._pointerEvent&&hu[t.originalEvent.pointerType.toUpperCase()]?n.touchStartX=t.originalEvent.clientX:n._pointerEvent||(n.touchStartX=t.originalEvent.touches[0].clientX)},r=function(t){n._pointerEvent&&hu[t.originalEvent.pointerType.toUpperCase()]&&(n.touchDeltaX=t.originalEvent.clientX-n.touchStartX);n._handleSwipe();"hover"===n._config.pause&&(n.pause(),n.touchTimeout&&clearTimeout(n.touchTimeout),n.touchTimeout=setTimeout(function(t){return n.cycle(t)},500+n._config.interval))},t(this._element.querySelectorAll(ve)).on(s.DRAG_START,function(n){return n.preventDefault()}),this._pointerEvent?(t(this._element).on(s.POINTERDOWN,function(n){return i(n)}),t(this._element).on(s.POINTERUP,function(n){return r(n)}),this._element.classList.add(ce)):(t(this._element).on(s.TOUCHSTART,function(n){return i(n)}),t(this._element).on(s.TOUCHMOVE,function(t){var i;n.touchDeltaX=(i=t).originalEvent.touches&&1<i.originalEvent.touches.length?0:i.originalEvent.touches[0].clientX-n.touchStartX}),t(this._element).on(s.TOUCHEND,function(n){return r(n)})))},n._keydown=function(n){if(!/input|textarea/i.test(n.target.tagName))switch(n.which){case 37:n.preventDefault();this.prev();break;case 39:n.preventDefault();this.next()}},n._getItemIndex=function(n){return this._items=n&&n.parentNode?[].slice.call(n.parentNode.querySelectorAll(ae)):[],this._items.indexOf(n)},n._getItemByDirection=function(n,t){var u=n===bi,f=n===ki,i=this._getItemIndex(t),e=this._items.length-1,r;return(f&&0===i||u&&i===e)&&!this._config.wrap?t:(r=(i+(n===ki?-1:1))%this._items.length,-1===r?this._items[this._items.length-1]:this._items[r])},n._triggerSlideEvent=function(n,i){var u=this._getItemIndex(n),f=this._getItemIndex(this._element.querySelector(pr)),r=t.Event(s.SLIDE,{relatedTarget:n,direction:i,from:f,to:u});return t(this._element).trigger(r),r},n._setActiveIndicatorElement=function(n){var r,i;this._indicatorsElement&&(r=[].slice.call(this._indicatorsElement.querySelectorAll(le)),t(r).removeClass(w),i=this._indicatorsElement.children[this._getItemIndex(n)],i&&t(i).addClass(w))},n._slide=function(n,i){var e,o,h,a=this,f=this._element.querySelector(pr),p=this._getItemIndex(f),u=i||f&&this._getItemByDirection(n,f),b=this._getItemIndex(u),v=Boolean(this._interval),c,l,y;(h=n===bi?(e=oe,o=se,ie):(e=ee,o=he,re),u&&t(u).hasClass(w))?this._isSliding=!1:!this._triggerSlideEvent(u,h).isDefaultPrevented()&&f&&u&&(this._isSliding=!0,v&&this.pause(),this._setActiveIndicatorElement(u),c=t.Event(s.SLID,{relatedTarget:u,direction:h,from:p,to:b}),t(this._element).hasClass(fe)?(t(u).addClass(o),r.reflow(u),t(f).addClass(e),t(u).addClass(e),l=parseInt(u.getAttribute("data-interval"),10),this._config.interval=l?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,l):this._config.defaultInterval||this._config.interval,y=r.getTransitionDurationFromElement(f),t(f).one(r.TRANSITION_END,function(){t(u).removeClass(e+" "+o).addClass(w);t(f).removeClass(w+" "+o+" "+e);a._isSliding=!1;setTimeout(function(){return t(a._element).trigger(c)},0)}).emulateTransitionEnd(y)):(t(f).removeClass(w),t(u).addClass(w),this._isSliding=!1,t(this._element).trigger(c)),v&&this.cycle())},i._jQueryInterface=function(n){return this.each(function(){var r=t(this).data(bt),u=f({},yr,t(this).data()),e;if("object"==typeof n&&(u=f({},u,n)),e="string"==typeof n?n:u.slide,r||(r=new i(this,u),t(this).data(bt,r)),"number"==typeof n)r.to(n);else if("string"==typeof e){if("undefined"==typeof r[e])throw new TypeError('No method named "'+e+'"');r[e]()}else u.interval&&u.ride&&(r.pause(),r.cycle())})},i._dataApiClickHandler=function(n){var s=r.getSelectorFromElement(this),u,o,e;s&&(u=t(s)[0],u&&t(u).hasClass(ue)&&(o=f({},t(u).data(),t(this).data()),e=this.getAttribute("data-slide-to"),e&&(o.interval=!1),i._jQueryInterface.call(t(u),o),e&&t(u).data(bt).to(e),n.preventDefault()))},l(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return yr}}]),i}();t(document).on(s.CLICK_DATA_API,"[data-slide], [data-slide-to]",ut._dataApiClickHandler);t(window).on(s.LOAD_DATA_API,function(){for(var i,r=[].slice.call(document.querySelectorAll(we)),n=0,u=r.length;n<u;n++)i=t(r[n]),ut._jQueryInterface.call(i,i.data())});t.fn[rt]=ut._jQueryInterface;t.fn[rt].Constructor=ut;t.fn[rt].noConflict=function(){return t.fn[rt]=ne,ut._jQueryInterface};var ft="collapse",b="bs.collapse",kt="."+b,be=t.fn[ft],wr={toggle:!0,parent:""},ke={toggle:"boolean",parent:"(string|element)"},dt={SHOW:"show"+kt,SHOWN:"shown"+kt,HIDE:"hide"+kt,HIDDEN:"hidden"+kt,CLICK_DATA_API:"click"+kt+".data-api"},k="show",gt="collapse",di="collapsing",br="collapsed",cu="width",de="height",ge=".show, .collapsing",lu='[data-toggle="collapse"]',ni=function(){function i(n,t){this._isTransitioning=!1;this._element=n;this._config=this._getConfig(t);this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+n.id+'"],[data-toggle="collapse"][data-target="#'+n.id+'"]'));for(var f=[].slice.call(document.querySelectorAll(lu)),i=0,o=f.length;i<o;i++){var e=f[i],u=r.getSelectorFromElement(e),s=[].slice.call(document.querySelectorAll(u)).filter(function(t){return t===n});null!==u&&0<s.length&&(this._selector=u,this._triggerArray.push(e))}this._parent=this._config.parent?this._getParent():null;this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray);this._config.toggle&&this.toggle()}var n=i.prototype;return n.toggle=function(){t(this._element).hasClass(k)?this.hide():this.show()},n.show=function(){var n,e,u=this,o,f,s,h;this._isTransitioning||t(this._element).hasClass(k)||(this._parent&&0===(n=[].slice.call(this._parent.querySelectorAll(ge)).filter(function(n){return"string"==typeof u._config.parent?n.getAttribute("data-parent")===u._config.parent:n.classList.contains(gt)})).length&&(n=null),n&&(e=t(n).not(this._selector).data(b))&&e._isTransitioning)||(o=t.Event(dt.SHOW),(t(this._element).trigger(o),o.isDefaultPrevented())||(n&&(i._jQueryInterface.call(t(n).not(this._selector),"hide"),e||t(n).data(b,null)),f=this._getDimension(),t(this._element).removeClass(gt).addClass(di),this._element.style[f]=0,this._triggerArray.length&&t(this._triggerArray).removeClass(br).attr("aria-expanded",!0),this.setTransitioning(!0),s="scroll"+(f[0].toUpperCase()+f.slice(1)),h=r.getTransitionDurationFromElement(this._element),t(this._element).one(r.TRANSITION_END,function(){t(u._element).removeClass(di).addClass(gt).addClass(k);u._element.style[f]="";u.setTransitioning(!1);t(u._element).trigger(dt.SHOWN)}).emulateTransitionEnd(h),this._element.style[f]=this._element[s]+"px"))},n.hide=function(){var s=this,u,n,f,i,e,o,h;if(!this._isTransitioning&&t(this._element).hasClass(k)&&(u=t.Event(dt.HIDE),t(this._element).trigger(u),!u.isDefaultPrevented())){if(n=this._getDimension(),this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",r.reflow(this._element),t(this._element).addClass(di).removeClass(gt).removeClass(k),f=this._triggerArray.length,0<f)for(i=0;i<f;i++)e=this._triggerArray[i],o=r.getSelectorFromElement(e),null!==o&&(t([].slice.call(document.querySelectorAll(o))).hasClass(k)||t(e).addClass(br).attr("aria-expanded",!1));this.setTransitioning(!0);this._element.style[n]="";h=r.getTransitionDurationFromElement(this._element);t(this._element).one(r.TRANSITION_END,function(){s.setTransitioning(!1);t(s._element).removeClass(di).addClass(gt).trigger(dt.HIDDEN)}).emulateTransitionEnd(h)}},n.setTransitioning=function(n){this._isTransitioning=n},n.dispose=function(){t.removeData(this._element,b);this._config=null;this._parent=null;this._element=null;this._triggerArray=null;this._isTransitioning=null},n._getConfig=function(n){return(n=f({},wr,n)).toggle=Boolean(n.toggle),r.typeCheckConfig(ft,n,ke),n},n._getDimension=function(){return t(this._element).hasClass(cu)?cu:de},n._getParent=function(){var n,e=this,u,f;return r.isElement(this._config.parent)?(n=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(n=this._config.parent[0])):n=document.querySelector(this._config.parent),u='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',f=[].slice.call(n.querySelectorAll(u)),t(f).each(function(n,t){e._addAriaAndCollapsedClass(i._getTargetFromElement(t),[t])}),n},n._addAriaAndCollapsedClass=function(n,i){var r=t(n).hasClass(k);i.length&&t(i).toggleClass(br,!r).attr("aria-expanded",r)},i._getTargetFromElement=function(n){var t=r.getSelectorFromElement(n);return t?document.querySelector(t):null},i._jQueryInterface=function(n){return this.each(function(){var u=t(this),r=u.data(b),e=f({},wr,u.data(),"object"==typeof n&&n?n:{});if(!r&&e.toggle&&/show|hide/.test(n)&&(e.toggle=!1),r||(r=new i(this,e),u.data(b,r)),"string"==typeof n){if("undefined"==typeof r[n])throw new TypeError('No method named "'+n+'"');r[n]()}})},l(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return wr}}]),i}();t(document).on(dt.CLICK_DATA_API,lu,function(n){"A"===n.currentTarget.tagName&&n.preventDefault();var i=t(this),u=r.getSelectorFromElement(this),f=[].slice.call(document.querySelectorAll(u));t(f).each(function(){var n=t(this),r=n.data(b)?"toggle":i.data();ni._jQueryInterface.call(n,r)})});t.fn[ft]=ni._jQueryInterface;t.fn[ft].Constructor=ni;t.fn[ft].noConflict=function(){return t.fn[ft]=be,ni._jQueryInterface};var et="dropdown",ti="bs.dropdown",y="."+ti,kr=".data-api",no=t.fn[et],to=new RegExp("38|40|27"),e={HIDE:"hide"+y,HIDDEN:"hidden"+y,SHOW:"show"+y,SHOWN:"shown"+y,CLICK:"click"+y,CLICK_DATA_API:"click"+y+kr,KEYDOWN_DATA_API:"keydown"+y+kr,KEYUP_DATA_API:"keyup"+y+kr},gi="disabled",h="show",io="dropup",ro="dropright",uo="dropleft",au="dropdown-menu-right",fo="position-static",nr='[data-toggle="dropdown"]',dr=".dropdown-menu",eo=".navbar-nav",oo=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",so="top-start",ho="top-end",co="bottom-start",lo="bottom-end",ao="right-start",vo="left-start",yo={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic"},po={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string"},p=function(){function n(n,t){this._element=n;this._popper=null;this._config=this._getConfig(t);this._menu=this._getMenuElement();this._inNavbar=this._detectNavbar();this._addEventListeners()}var u=n.prototype;return u.toggle=function(){var u,c,o,s,f;if(!this._element.disabled&&!t(this._element).hasClass(gi)&&(u=n._getParentFromElement(this._element),c=t(this._menu).hasClass(h),(n._clearMenus(),!c)&&(o={relatedTarget:this._element},s=t.Event(e.SHOW,o),t(u).trigger(s),!s.isDefaultPrevented()))){if(!this._inNavbar){if("undefined"==typeof i)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)");f=this._element;"parent"===this._config.reference?f=u:r.isElement(this._config.reference)&&(f=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(f=this._config.reference[0]));"scrollParent"!==this._config.boundary&&t(u).addClass(fo);this._popper=new i(f,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===t(u).closest(eo).length&&t(document.body).children().on("mouseover",null,t.noop);this._element.focus();this._element.setAttribute("aria-expanded",!0);t(this._menu).toggleClass(h);t(u).toggleClass(h).trigger(t.Event(e.SHOWN,o))}},u.show=function(){if(!(this._element.disabled||t(this._element).hasClass(gi)||t(this._menu).hasClass(h))){var i={relatedTarget:this._element},r=t.Event(e.SHOW,i),u=n._getParentFromElement(this._element);t(u).trigger(r);r.isDefaultPrevented()||(t(this._menu).toggleClass(h),t(u).toggleClass(h).trigger(t.Event(e.SHOWN,i)))}},u.hide=function(){if(!this._element.disabled&&!t(this._element).hasClass(gi)&&t(this._menu).hasClass(h)){var i={relatedTarget:this._element},r=t.Event(e.HIDE,i),u=n._getParentFromElement(this._element);t(u).trigger(r);r.isDefaultPrevented()||(t(this._menu).toggleClass(h),t(u).toggleClass(h).trigger(t.Event(e.HIDDEN,i)))}},u.dispose=function(){t.removeData(this._element,ti);t(this._element).off(y);this._element=null;(this._menu=null)!==this._popper&&(this._popper.destroy(),this._popper=null)},u.update=function(){this._inNavbar=this._detectNavbar();null!==this._popper&&this._popper.scheduleUpdate()},u._addEventListeners=function(){var n=this;t(this._element).on(e.CLICK,function(t){t.preventDefault();t.stopPropagation();n.toggle()})},u._getConfig=function(n){return n=f({},this.constructor.Default,t(this._element).data(),n),r.typeCheckConfig(et,n,this.constructor.DefaultType),n},u._getMenuElement=function(){if(!this._menu){var t=n._getParentFromElement(this._element);t&&(this._menu=t.querySelector(dr))}return this._menu},u._getPlacement=function(){var i=t(this._element.parentNode),n=co;return i.hasClass(io)?(n=so,t(this._menu).hasClass(au)&&(n=ho)):i.hasClass(ro)?n=ao:i.hasClass(uo)?n=vo:t(this._menu).hasClass(au)&&(n=lo),n},u._detectNavbar=function(){return 0<t(this._element).closest(".navbar").length},u._getOffset=function(){var t=this,n={};return"function"==typeof this._config.offset?n.fn=function(n){return n.offsets=f({},n.offsets,t._config.offset(n.offsets,t._element)||{}),n}:n.offset=this._config.offset,n},u._getPopperConfig=function(){var n={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(n.modifiers.applyStyle={enabled:!1}),n},n._jQueryInterface=function(i){return this.each(function(){var r=t(this).data(ti);if(r||(r=new n(this,"object"==typeof i?i:null),t(this).data(ti,r)),"string"==typeof i){if("undefined"==typeof r[i])throw new TypeError('No method named "'+i+'"');r[i]()}})},n._clearMenus=function(i){var l,s;if(!i||3!==i.which&&("keyup"!==i.type||9===i.which))for(var u=[].slice.call(document.querySelectorAll(nr)),r=0,a=u.length;r<a;r++){var f=n._getParentFromElement(u[r]),c=t(u[r]).data(ti),o={relatedTarget:u[r]};(i&&"click"===i.type&&(o.clickEvent=i),c)&&(l=c._menu,!t(f).hasClass(h)||i&&("click"===i.type&&/input|textarea/i.test(i.target.tagName)||"keyup"===i.type&&9===i.which)&&t.contains(f,i.target)||(s=t.Event(e.HIDE,o),t(f).trigger(s),s.isDefaultPrevented()||("ontouchstart"in document.documentElement&&t(document.body).children().off("mouseover",null,t.noop),u[r].setAttribute("aria-expanded","false"),t(l).removeClass(h),t(f).removeClass(h).trigger(t.Event(e.HIDDEN,o)))))}},n._getParentFromElement=function(n){var t,i=r.getSelectorFromElement(n);return i&&(t=document.querySelector(i)),t||n.parentNode},n._dataApiKeydownHandler=function(i){var f,e,u,r,o;(/input|textarea/i.test(i.target.tagName)?32===i.which||27!==i.which&&(40!==i.which&&38!==i.which||t(i.target).closest(dr).length):!to.test(i.which))||(i.preventDefault(),i.stopPropagation(),this.disabled||t(this).hasClass(gi))||(f=n._getParentFromElement(this),e=t(f).hasClass(h),e&&(!e||27!==i.which&&32!==i.which)?(u=[].slice.call(f.querySelectorAll(oo)),0!==u.length&&(r=u.indexOf(i.target),38===i.which&&0<r&&r--,40===i.which&&r<u.length-1&&r++,r<0&&(r=0),u[r].focus())):(27===i.which&&(o=f.querySelector(nr),t(o).trigger("focus")),t(this).trigger("click")))},l(n,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return yo}},{key:"DefaultType",get:function(){return po}}]),n}();t(document).on(e.KEYDOWN_DATA_API,nr,p._dataApiKeydownHandler).on(e.KEYDOWN_DATA_API,dr,p._dataApiKeydownHandler).on(e.CLICK_DATA_API+" "+e.KEYUP_DATA_API,p._clearMenus).on(e.CLICK_DATA_API,nr,function(n){n.preventDefault();n.stopPropagation();p._jQueryInterface.call(t(this),"toggle")}).on(e.CLICK_DATA_API,".dropdown form",function(n){n.stopPropagation()});t.fn[et]=p._jQueryInterface;t.fn[et].Constructor=p;t.fn[et].noConflict=function(){return t.fn[et]=no,p._jQueryInterface};var ot="modal",ii="bs.modal",c="."+ii,wo=t.fn[ot],gr={backdrop:!0,keyboard:!0,focus:!0,show:!0},bo={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},u={HIDE:"hide"+c,HIDDEN:"hidden"+c,SHOW:"show"+c,SHOWN:"shown"+c,FOCUSIN:"focusin"+c,RESIZE:"resize"+c,CLICK_DISMISS:"click.dismiss"+c,KEYDOWN_DISMISS:"keydown.dismiss"+c,MOUSEUP_DISMISS:"mouseup.dismiss"+c,MOUSEDOWN_DISMISS:"mousedown.dismiss"+c,CLICK_DATA_API:"click"+c+".data-api"},ko="modal-dialog-scrollable",go="modal-scrollbar-measure",ns="modal-backdrop",vu="modal-open",st="fade",tr="show",ts=".modal-dialog",is=".modal-body",rs='[data-dismiss="modal"]',yu=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",pu=".sticky-top",ri=function(){function i(n,t){this._config=this._getConfig(t);this._element=n;this._dialog=n.querySelector(ts);this._backdrop=null;this._isShown=!1;this._isBodyOverflowing=!1;this._ignoreBackdropClick=!1;this._isTransitioning=!1;this._scrollbarWidth=0}var n=i.prototype;return n.toggle=function(n){return this._isShown?this.hide():this.show(n)},n.show=function(n){var i=this,r;this._isShown||this._isTransitioning||(t(this._element).hasClass(st)&&(this._isTransitioning=!0),r=t.Event(u.SHOW,{relatedTarget:n}),t(this._element).trigger(r),this._isShown||r.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on(u.CLICK_DISMISS,rs,function(n){return i.hide(n)}),t(this._dialog).on(u.MOUSEDOWN_DISMISS,function(){t(i._element).one(u.MOUSEUP_DISMISS,function(n){t(n.target).is(i._element)&&(i._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return i._showElement(n)})))},n.hide=function(n){var o=this,i,f,e;(n&&n.preventDefault(),this._isShown&&!this._isTransitioning)&&(i=t.Event(u.HIDE),(t(this._element).trigger(i),this._isShown&&!i.isDefaultPrevented())&&(this._isShown=!1,f=t(this._element).hasClass(st),(f&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),t(document).off(u.FOCUSIN),t(this._element).removeClass(tr),t(this._element).off(u.CLICK_DISMISS),t(this._dialog).off(u.MOUSEDOWN_DISMISS),f)?(e=r.getTransitionDurationFromElement(this._element),t(this._element).one(r.TRANSITION_END,function(n){return o._hideModal(n)}).emulateTransitionEnd(e)):this._hideModal()))},n.dispose=function(){[window,this._element,this._dialog].forEach(function(n){return t(n).off(c)});t(document).off(u.FOCUSIN);t.removeData(this._element,ii);this._config=null;this._element=null;this._dialog=null;this._backdrop=null;this._isShown=null;this._isBodyOverflowing=null;this._ignoreBackdropClick=null;this._isTransitioning=null;this._scrollbarWidth=null},n.handleUpdate=function(){this._adjustDialog()},n._getConfig=function(n){return n=f({},gr,n),r.typeCheckConfig(ot,n,bo),n},n._showElement=function(n){var i=this,e=t(this._element).hasClass(st),o,f,s;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element);this._element.style.display="block";this._element.removeAttribute("aria-hidden");this._element.setAttribute("aria-modal",!0);t(this._dialog).hasClass(ko)?this._dialog.querySelector(is).scrollTop=0:this._element.scrollTop=0;e&&r.reflow(this._element);t(this._element).addClass(tr);this._config.focus&&this._enforceFocus();o=t.Event(u.SHOWN,{relatedTarget:n});f=function(){i._config.focus&&i._element.focus();i._isTransitioning=!1;t(i._element).trigger(o)};e?(s=r.getTransitionDurationFromElement(this._dialog),t(this._dialog).one(r.TRANSITION_END,f).emulateTransitionEnd(s)):f()},n._enforceFocus=function(){var n=this;t(document).off(u.FOCUSIN).on(u.FOCUSIN,function(i){document!==i.target&&n._element!==i.target&&0===t(n._element).has(i.target).length&&n._element.focus()})},n._setEscapeEvent=function(){var n=this;this._isShown&&this._config.keyboard?t(this._element).on(u.KEYDOWN_DISMISS,function(t){27===t.which&&(t.preventDefault(),n.hide())}):this._isShown||t(this._element).off(u.KEYDOWN_DISMISS)},n._setResizeEvent=function(){var n=this;this._isShown?t(window).on(u.RESIZE,function(t){return n.handleUpdate(t)}):t(window).off(u.RESIZE)},n._hideModal=function(){var n=this;this._element.style.display="none";this._element.setAttribute("aria-hidden",!0);this._element.removeAttribute("aria-modal");this._isTransitioning=!1;this._showBackdrop(function(){t(document.body).removeClass(vu);n._resetAdjustments();n._resetScrollbar();t(n._element).trigger(u.HIDDEN)})},n._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},n._showBackdrop=function(n){var i=this,f=t(this._element).hasClass(st)?st:"",o,e,s;if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=ns,f&&this._backdrop.classList.add(f),t(this._backdrop).appendTo(document.body),t(this._element).on(u.CLICK_DISMISS,function(n){i._ignoreBackdropClick?i._ignoreBackdropClick=!1:n.target===n.currentTarget&&("static"===i._config.backdrop?i._element.focus():i.hide())}),f&&r.reflow(this._backdrop),t(this._backdrop).addClass(tr),!n)return;if(!f)return void n();o=r.getTransitionDurationFromElement(this._backdrop);t(this._backdrop).one(r.TRANSITION_END,n).emulateTransitionEnd(o)}else!this._isShown&&this._backdrop?(t(this._backdrop).removeClass(tr),e=function(){i._removeBackdrop();n&&n()},t(this._element).hasClass(st)?(s=r.getTransitionDurationFromElement(this._backdrop),t(this._backdrop).one(r.TRANSITION_END,e).emulateTransitionEnd(s)):e()):n&&n()},n._adjustDialog=function(){var n=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&n&&(this._element.style.paddingLeft=this._scrollbarWidth+"px");this._isBodyOverflowing&&!n&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="";this._element.style.paddingRight=""},n._checkScrollbar=function(){var n=document.body.getBoundingClientRect();this._isBodyOverflowing=n.left+n.right<window.innerWidth;this._scrollbarWidth=this._getScrollbarWidth()},n._setScrollbar=function(){var n=this,i,r,u,f;this._isBodyOverflowing&&(i=[].slice.call(document.querySelectorAll(yu)),r=[].slice.call(document.querySelectorAll(pu)),t(i).each(function(i,r){var u=r.style.paddingRight,f=t(r).css("padding-right");t(r).data("padding-right",u).css("padding-right",parseFloat(f)+n._scrollbarWidth+"px")}),t(r).each(function(i,r){var u=r.style.marginRight,f=t(r).css("margin-right");t(r).data("margin-right",u).css("margin-right",parseFloat(f)-n._scrollbarWidth+"px")}),u=document.body.style.paddingRight,f=t(document.body).css("padding-right"),t(document.body).data("padding-right",u).css("padding-right",parseFloat(f)+this._scrollbarWidth+"px"));t(document.body).addClass(vu)},n._resetScrollbar=function(){var r=[].slice.call(document.querySelectorAll(yu)),n,i;t(r).each(function(n,i){var r=t(i).data("padding-right");t(i).removeData("padding-right");i.style.paddingRight=r||""});n=[].slice.call(document.querySelectorAll(""+pu));t(n).each(function(n,i){var r=t(i).data("margin-right");"undefined"!=typeof r&&t(i).css("margin-right",r).removeData("margin-right")});i=t(document.body).data("padding-right");t(document.body).removeData("padding-right");document.body.style.paddingRight=i||""},n._getScrollbarWidth=function(){var n=document.createElement("div"),t;return n.className=go,document.body.appendChild(n),t=n.getBoundingClientRect().width-n.clientWidth,document.body.removeChild(n),t},i._jQueryInterface=function(n,r){return this.each(function(){var u=t(this).data(ii),e=f({},gr,t(this).data(),"object"==typeof n&&n?n:{});if(u||(u=new i(this,e),t(this).data(ii,u)),"string"==typeof n){if("undefined"==typeof u[n])throw new TypeError('No method named "'+n+'"');u[n](r)}else e.show&&u.show(r)})},l(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return gr}}]),i}();t(document).on(u.CLICK_DATA_API,'[data-toggle="modal"]',function(n){var i,e=this,o=r.getSelectorFromElement(this),s,h;o&&(i=document.querySelector(o));s=t(i).data(ii)?"toggle":f({},t(i).data(),t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||n.preventDefault();h=t(i).one(u.SHOW,function(n){n.isDefaultPrevented()||h.one(u.HIDDEN,function(){t(e).is(":visible")&&e.focus()})});ri._jQueryInterface.call(t(i),s,this)});t.fn[ot]=ri._jQueryInterface;t.fn[ot].Constructor=ri;t.fn[ot].noConflict=function(){return t.fn[ot]=wo,ri._jQueryInterface};var us=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],fs=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,es=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;var d="tooltip",ir="bs.tooltip",a="."+ir,os=t.fn[d],bu="bs-tooltip",ss=new RegExp("(^|\\s)"+bu+"\\S+","g"),hs=["sanitize","whiteList","sanitizeFn"],cs={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object"},ls={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},as={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}},ui="show",nu="out",vs={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,INSERTED:"inserted"+a,CLICK:"click"+a,FOCUSIN:"focusin"+a,FOCUSOUT:"focusout"+a,MOUSEENTER:"mouseenter"+a,MOUSELEAVE:"mouseleave"+a},fi="fade",ei="show",ys=".tooltip-inner",ps=".arrow",oi="hover",tu="focus",ws="click",bs="manual",g=function(){function u(n,t){if("undefined"==typeof i)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0;this._timeout=0;this._hoverState="";this._activeTrigger={};this._popper=null;this.element=n;this.config=this._getConfig(t);this.tip=null;this._setListeners()}var n=u.prototype;return n.enable=function(){this._isEnabled=!0},n.disable=function(){this._isEnabled=!1},n.toggleEnabled=function(){this._isEnabled=!this._isEnabled},n.toggle=function(n){if(this._isEnabled)if(n){var r=this.constructor.DATA_KEY,i=t(n.currentTarget).data(r);i||(i=new this.constructor(n.currentTarget,this._getDelegateConfig()),t(n.currentTarget).data(r,i));i._activeTrigger.click=!i._activeTrigger.click;i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(ei))return void this._leave(null,this);this._enter(null,this)}},n.dispose=function(){clearTimeout(this._timeout);t.removeData(this.element,this.constructor.DATA_KEY);t(this.element).off(this.constructor.EVENT_KEY);t(this.element).closest(".modal").off("hide.bs.modal");this.tip&&t(this.tip).remove();this._isEnabled=null;this._timeout=null;this._hoverState=null;(this._activeTrigger=null)!==this._popper&&this._popper.destroy();this._popper=null;this.element=null;this.config=null;this.tip=null},n.show=function(){var n=this,f,e,c,u,o,l,s,a,h,v;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");if(f=t.Event(this.constructor.Event.SHOW),this.isWithContent()&&this._isEnabled){if(t(this.element).trigger(f),e=r.findShadowRoot(this.element),c=t.contains(null!==e?e:this.element.ownerDocument.documentElement,this.element),f.isDefaultPrevented()||!c)return;u=this.getTipElement();o=r.getUID(this.constructor.NAME);u.setAttribute("id",o);this.element.setAttribute("aria-describedby",o);this.setContent();this.config.animation&&t(u).addClass(fi);l="function"==typeof this.config.placement?this.config.placement.call(this,u,this.element):this.config.placement;s=this._getAttachment(l);this.addAttachmentClass(s);a=this._getContainer();t(u).data(this.constructor.DATA_KEY,this);t.contains(this.element.ownerDocument.documentElement,this.tip)||t(u).appendTo(a);t(this.element).trigger(this.constructor.Event.INSERTED);this._popper=new i(this.element,u,{placement:s,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:ps},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&n._handlePopperPlacementChange(t)},onUpdate:function(t){return n._handlePopperPlacementChange(t)}});t(u).addClass(ei);"ontouchstart"in document.documentElement&&t(document.body).children().on("mouseover",null,t.noop);h=function(){n.config.animation&&n._fixTransition();var i=n._hoverState;n._hoverState=null;t(n.element).trigger(n.constructor.Event.SHOWN);i===nu&&n._leave(null,n)};t(this.tip).hasClass(fi)?(v=r.getTransitionDurationFromElement(this.tip),t(this.tip).one(r.TRANSITION_END,h).emulateTransitionEnd(v)):h()}},n.hide=function(n){var i=this,u=this.getTipElement(),f=t.Event(this.constructor.Event.HIDE),e=function(){i._hoverState!==ui&&u.parentNode&&u.parentNode.removeChild(u);i._cleanTipClass();i.element.removeAttribute("aria-describedby");t(i.element).trigger(i.constructor.Event.HIDDEN);null!==i._popper&&i._popper.destroy();n&&n()},o;(t(this.element).trigger(f),f.isDefaultPrevented())||((t(u).removeClass(ei),"ontouchstart"in document.documentElement&&t(document.body).children().off("mouseover",null,t.noop),this._activeTrigger[ws]=!1,this._activeTrigger[tu]=!1,this._activeTrigger[oi]=!1,t(this.tip).hasClass(fi))?(o=r.getTransitionDurationFromElement(u),t(u).one(r.TRANSITION_END,e).emulateTransitionEnd(o)):e(),this._hoverState="")},n.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},n.isWithContent=function(){return Boolean(this.getTitle())},n.addAttachmentClass=function(n){t(this.getTipElement()).addClass(bu+"-"+n)},n.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},n.setContent=function(){var n=this.getTipElement();this.setElementContent(t(n.querySelectorAll(ys)),this.getTitle());t(n).removeClass(fi+" "+ei)},n.setElementContent=function(n,i){"object"!=typeof i||!i.nodeType&&!i.jquery?this.config.html?(this.config.sanitize&&(i=wu(i,this.config.whiteList,this.config.sanitizeFn)),n.html(i)):n.text(i):this.config.html?t(i).parent().is(n)||n.empty().append(i):n.text(t(i).text())},n.getTitle=function(){var n=this.element.getAttribute("data-original-title");return n||(n="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),n},n._getOffset=function(){var t=this,n={};return"function"==typeof this.config.offset?n.fn=function(n){return n.offsets=f({},n.offsets,t.config.offset(n.offsets,t.element)||{}),n}:n.offset=this.config.offset,n},n._getContainer=function(){return!1===this.config.container?document.body:r.isElement(this.config.container)?t(this.config.container):t(document).find(this.config.container)},n._getAttachment=function(n){return ls[n.toUpperCase()]},n._setListeners=function(){var n=this;this.config.trigger.split(" ").forEach(function(i){if("click"===i)t(n.element).on(n.constructor.Event.CLICK,n.config.selector,function(t){return n.toggle(t)});else if(i!==bs){var r=i===oi?n.constructor.Event.MOUSEENTER:n.constructor.Event.FOCUSIN,u=i===oi?n.constructor.Event.MOUSELEAVE:n.constructor.Event.FOCUSOUT;t(n.element).on(r,n.config.selector,function(t){return n._enter(t)}).on(u,n.config.selector,function(t){return n._leave(t)})}});t(this.element).closest(".modal").on("hide.bs.modal",function(){n.element&&n.hide()});this.config.selector?this.config=f({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},n._fixTitle=function(){var n=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==n)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},n._enter=function(n,i){var r=this.constructor.DATA_KEY;(i=i||t(n.currentTarget).data(r))||(i=new this.constructor(n.currentTarget,this._getDelegateConfig()),t(n.currentTarget).data(r,i));n&&(i._activeTrigger["focusin"===n.type?tu:oi]=!0);t(i.getTipElement()).hasClass(ei)||i._hoverState===ui?i._hoverState=ui:(clearTimeout(i._timeout),i._hoverState=ui,i.config.delay&&i.config.delay.show?i._timeout=setTimeout(function(){i._hoverState===ui&&i.show()},i.config.delay.show):i.show())},n._leave=function(n,i){var r=this.constructor.DATA_KEY;(i=i||t(n.currentTarget).data(r))||(i=new this.constructor(n.currentTarget,this._getDelegateConfig()),t(n.currentTarget).data(r,i));n&&(i._activeTrigger["focusout"===n.type?tu:oi]=!1);i._isWithActiveTrigger()||(clearTimeout(i._timeout),i._hoverState=nu,i.config.delay&&i.config.delay.hide?i._timeout=setTimeout(function(){i._hoverState===nu&&i.hide()},i.config.delay.hide):i.hide())},n._isWithActiveTrigger=function(){for(var n in this._activeTrigger)if(this._activeTrigger[n])return!0;return!1},n._getConfig=function(n){var i=t(this.element).data();return Object.keys(i).forEach(function(n){-1!==hs.indexOf(n)&&delete i[n]}),"number"==typeof(n=f({},this.constructor.Default,i,"object"==typeof n&&n?n:{})).delay&&(n.delay={show:n.delay,hide:n.delay}),"number"==typeof n.title&&(n.title=n.title.toString()),"number"==typeof n.content&&(n.content=n.content.toString()),r.typeCheckConfig(d,n,this.constructor.DefaultType),n.sanitize&&(n.template=wu(n.template,n.whiteList,n.sanitizeFn)),n},n._getDelegateConfig=function(){var t={},n;if(this.config)for(n in this.config)this.constructor.Default[n]!==this.config[n]&&(t[n]=this.config[n]);return t},n._cleanTipClass=function(){var i=t(this.getTipElement()),n=i.attr("class").match(ss);null!==n&&n.length&&i.removeClass(n.join(""))},n._handlePopperPlacementChange=function(n){var t=n.instance;this.tip=t.popper;this._cleanTipClass();this.addAttachmentClass(this._getAttachment(n.placement))},n._fixTransition=function(){var n=this.getTipElement(),i=this.config.animation;null===n.getAttribute("x-placement")&&(t(n).removeClass(fi),this.config.animation=!1,this.hide(),this.show(),this.config.animation=i)},u._jQueryInterface=function(n){return this.each(function(){var i=t(this).data(ir),r="object"==typeof n&&n;if((i||!/dispose|hide/.test(n))&&(i||(i=new u(this,r),t(this).data(ir,i)),"string"==typeof n)){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}})},l(u,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return as}},{key:"NAME",get:function(){return d}},{key:"DATA_KEY",get:function(){return ir}},{key:"Event",get:function(){return vs}},{key:"EVENT_KEY",get:function(){return a}},{key:"DefaultType",get:function(){return cs}}]),u}();t.fn[d]=g._jQueryInterface;t.fn[d].Constructor=g;t.fn[d].noConflict=function(){return t.fn[d]=os,g._jQueryInterface};var ht="popover",rr="bs.popover",v="."+rr,ks=t.fn[ht],ku="bs-popover",ds=new RegExp("(^|\\s)"+ku+"\\S+","g"),gs=f({},g.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-header"><\/h3><div class="popover-body"><\/div><\/div>'}),nh=f({},g.DefaultType,{content:"(string|element|function)"}),th="fade",ih="show",rh=".popover-header",uh=".popover-body",fh={HIDE:"hide"+v,HIDDEN:"hidden"+v,SHOW:"show"+v,SHOWN:"shown"+v,INSERTED:"inserted"+v,CLICK:"click"+v,FOCUSIN:"focusin"+v,FOCUSOUT:"focusout"+v,MOUSEENTER:"mouseenter"+v,MOUSELEAVE:"mouseleave"+v},ur=function(n){function r(){return n.apply(this,arguments)||this}var u,f,i;return f=n,(u=r).prototype=Object.create(f.prototype),(u.prototype.constructor=u).__proto__=f,i=r.prototype,i.isWithContent=function(){return this.getTitle()||this._getContent()},i.addAttachmentClass=function(n){t(this.getTipElement()).addClass(ku+"-"+n)},i.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},i.setContent=function(){var i=t(this.getTipElement()),n;this.setElementContent(i.find(rh),this.getTitle());n=this._getContent();"function"==typeof n&&(n=n.call(this.element));this.setElementContent(i.find(uh),n);i.removeClass(th+" "+ih)},i._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},i._cleanTipClass=function(){var i=t(this.getTipElement()),n=i.attr("class").match(ds);null!==n&&0<n.length&&i.removeClass(n.join(""))},r._jQueryInterface=function(n){return this.each(function(){var i=t(this).data(rr),u="object"==typeof n?n:null;if((i||!/dispose|hide/.test(n))&&(i||(i=new r(this,u),t(this).data(rr,i)),"string"==typeof n)){if("undefined"==typeof i[n])throw new TypeError('No method named "'+n+'"');i[n]()}})},l(r,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return gs}},{key:"NAME",get:function(){return ht}},{key:"DATA_KEY",get:function(){return rr}},{key:"Event",get:function(){return fh}},{key:"EVENT_KEY",get:function(){return v}},{key:"DefaultType",get:function(){return nh}}]),r}(g);t.fn[ht]=ur._jQueryInterface;t.fn[ht].Constructor=ur;t.fn[ht].noConflict=function(){return t.fn[ht]=ks,ur._jQueryInterface};var nt="scrollspy",fr="bs.scrollspy",er="."+fr,eh=t.fn[nt],du={offset:10,method:"auto",target:""},oh={offset:"number",method:"string",target:"(string|element)"},iu={ACTIVATE:"activate"+er,SCROLL:"scroll"+er,LOAD_DATA_API:"load"+er+".data-api"},sh="dropdown-item",tt="active",hh='[data-spy="scroll"]',gu=".nav, .list-group",ru=".nav-link",ch=".nav-item",nf=".list-group-item",lh=".dropdown",ah=".dropdown-item",vh=".dropdown-toggle",yh="offset",tf="position",si=function(){function i(n,i){var r=this;this._element=n;this._scrollElement="BODY"===n.tagName?window:n;this._config=this._getConfig(i);this._selector=this._config.target+" "+ru+","+this._config.target+" "+nf+","+this._config.target+" "+ah;this._offsets=[];this._targets=[];this._activeTarget=null;this._scrollHeight=0;t(this._scrollElement).on(iu.SCROLL,function(n){return r._process(n)});this.refresh();this._process()}var n=i.prototype;return n.refresh=function(){var n=this,u=this._scrollElement===this._scrollElement.window?yh:tf,i="auto"===this._config.method?u:this._config.method,f=i===tf?this._getScrollTop():0;this._offsets=[];this._targets=[];this._scrollHeight=this._getScrollHeight();[].slice.call(document.querySelectorAll(this._selector)).map(function(n){var u,e=r.getSelectorFromElement(n),o;return(e&&(u=document.querySelector(e)),u)&&(o=u.getBoundingClientRect(),o.width||o.height)?[t(u)[i]().top+f,e]:null}).filter(function(n){return n}).sort(function(n,t){return n[0]-t[0]}).forEach(function(t){n._offsets.push(t[0]);n._targets.push(t[1])})},n.dispose=function(){t.removeData(this._element,fr);t(this._scrollElement).off(er);this._element=null;this._scrollElement=null;this._config=null;this._selector=null;this._offsets=null;this._targets=null;this._activeTarget=null;this._scrollHeight=null},n._getConfig=function(n){if("string"!=typeof(n=f({},du,"object"==typeof n&&n?n:{})).target){var i=t(n.target).attr("id");i||(i=r.getUID(nt),t(n.target).attr("id",i));n.target="#"+i}return r.typeCheckConfig(nt,n,oh),n},n._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},n._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},n._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},n._process=function(){var t=this._getScrollTop()+this._config.offset,r=this._getScrollHeight(),u=this._config.offset+r-this._getOffsetHeight(),i,n;if(this._scrollHeight!==r&&this.refresh(),u<=t)i=this._targets[this._targets.length-1],this._activeTarget!==i&&this._activate(i);else{if(this._activeTarget&&t<this._offsets[0]&&0<this._offsets[0])return this._activeTarget=null,void this._clear();for(n=this._offsets.length;n--;)this._activeTarget!==this._targets[n]&&t>=this._offsets[n]&&("undefined"==typeof this._offsets[n+1]||t<this._offsets[n+1])&&this._activate(this._targets[n])}},n._activate=function(n){this._activeTarget=n;this._clear();var r=this._selector.split(",").map(function(t){return t+'[data-target="'+n+'"],'+t+'[href="'+n+'"]'}),i=t([].slice.call(document.querySelectorAll(r.join(","))));i.hasClass(sh)?(i.closest(lh).find(vh).addClass(tt),i.addClass(tt)):(i.addClass(tt),i.parents(gu).prev(ru+", "+nf).addClass(tt),i.parents(gu).prev(ch).children(ru).addClass(tt));t(this._scrollElement).trigger(iu.ACTIVATE,{relatedTarget:n})},n._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter(function(n){return n.classList.contains(tt)}).forEach(function(n){return n.classList.remove(tt)})},i._jQueryInterface=function(n){return this.each(function(){var r=t(this).data(fr);if(r||(r=new i(this,"object"==typeof n&&n),t(this).data(fr,r)),"string"==typeof n){if("undefined"==typeof r[n])throw new TypeError('No method named "'+n+'"');r[n]()}})},l(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return du}}]),i}();t(window).on(iu.LOAD_DATA_API,function(){for(var r,n=[].slice.call(document.querySelectorAll(hh)),i=n.length;i--;)r=t(n[i]),si._jQueryInterface.call(r,r.data())});t.fn[nt]=si._jQueryInterface;t.fn[nt].Constructor=si;t.fn[nt].noConflict=function(){return t.fn[nt]=eh,si._jQueryInterface};var or="bs.tab",hi="."+or,ph=t.fn.tab,ci={HIDE:"hide"+hi,HIDDEN:"hidden"+hi,SHOW:"show"+hi,SHOWN:"shown"+hi,CLICK_DATA_API:"click"+hi+".data-api"},wh="dropdown-menu",li="active",bh="disabled",rf="fade",uf="show",kh=".dropdown",dh=".nav, .list-group",ff=".active",ef="> li > .active",gh=".dropdown-toggle",nc="> .dropdown-menu .active",ai=function(){function n(n){this._element=n}var i=n.prototype;return i.show=function(){var h=this,u,n,i,f,c,e,o,s;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(li)||t(this._element).hasClass(bh)||(i=t(this._element).closest(dh)[0],f=r.getSelectorFromElement(this._element),i&&(c="UL"===i.nodeName||"OL"===i.nodeName?ef:ff,n=(n=t.makeArray(t(i).find(c)))[n.length-1]),e=t.Event(ci.HIDE,{relatedTarget:this._element}),o=t.Event(ci.SHOW,{relatedTarget:n}),(n&&t(n).trigger(e),t(this._element).trigger(o),o.isDefaultPrevented()||e.isDefaultPrevented())||(f&&(u=document.querySelector(f)),this._activate(this._element,i),s=function(){var i=t.Event(ci.HIDDEN,{relatedTarget:h._element}),r=t.Event(ci.SHOWN,{relatedTarget:n});t(n).trigger(i);t(h._element).trigger(r)},u?this._activate(u,u.parentNode,s):s()))},i.dispose=function(){t.removeData(this._element,or);this._element=null},i._activate=function(n,i,u){var s=this,f=(!i||"UL"!==i.nodeName&&"OL"!==i.nodeName?t(i).children(ff):t(i).find(ef))[0],h=u&&f&&t(f).hasClass(rf),e=function(){return s._transitionComplete(n,f,u)},o;f&&h?(o=r.getTransitionDurationFromElement(f),t(f).removeClass(uf).one(r.TRANSITION_END,e).emulateTransitionEnd(o)):e()},i._transitionComplete=function(n,i,u){var f,e,o;i&&(t(i).removeClass(li),f=t(i.parentNode).find(nc)[0],f&&t(f).removeClass(li),"tab"===i.getAttribute("role")&&i.setAttribute("aria-selected",!1));(t(n).addClass(li),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!0),r.reflow(n),n.classList.contains(rf)&&n.classList.add(uf),n.parentNode&&t(n.parentNode).hasClass(wh))&&(e=t(n).closest(kh)[0],e&&(o=[].slice.call(e.querySelectorAll(gh)),t(o).addClass(li)),n.setAttribute("aria-expanded",!0));u&&u()},n._jQueryInterface=function(i){return this.each(function(){var u=t(this),r=u.data(or);if(r||(r=new n(this),u.data(or,r)),"string"==typeof i){if("undefined"==typeof r[i])throw new TypeError('No method named "'+i+'"');r[i]()}})},l(n,null,[{key:"VERSION",get:function(){return"4.3.1"}}]),n}();t(document).on(ci.CLICK_DATA_API,'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',function(n){n.preventDefault();ai._jQueryInterface.call(t(this),"show")});t.fn.tab=ai._jQueryInterface;t.fn.tab.Constructor=ai;t.fn.tab.noConflict=function(){return t.fn.tab=ph,ai._jQueryInterface};var ct="toast",sr="bs.toast",vi="."+sr,tc=t.fn[ct],lt={CLICK_DISMISS:"click.dismiss"+vi,HIDE:"hide"+vi,HIDDEN:"hidden"+vi,SHOW:"show"+vi,SHOWN:"shown"+vi},ic="fade",of="hide",yi="show",sf="showing",rc={animation:"boolean",autohide:"boolean",delay:"number"},hf={animation:!0,autohide:!0,delay:500},uc='[data-dismiss="toast"]',hr=function(){function i(n,t){this._element=n;this._config=this._getConfig(t);this._timeout=null;this._setListeners()}var n=i.prototype;return n.show=function(){var n=this,i,u;t(this._element).trigger(lt.SHOW);this._config.animation&&this._element.classList.add(ic);i=function(){n._element.classList.remove(sf);n._element.classList.add(yi);t(n._element).trigger(lt.SHOWN);n._config.autohide&&n.hide()};(this._element.classList.remove(of),this._element.classList.add(sf),this._config.animation)?(u=r.getTransitionDurationFromElement(this._element),t(this._element).one(r.TRANSITION_END,i).emulateTransitionEnd(u)):i()},n.hide=function(n){var i=this;this._element.classList.contains(yi)&&(t(this._element).trigger(lt.HIDE),n?this._close():this._timeout=setTimeout(function(){i._close()},this._config.delay))},n.dispose=function(){clearTimeout(this._timeout);this._timeout=null;this._element.classList.contains(yi)&&this._element.classList.remove(yi);t(this._element).off(lt.CLICK_DISMISS);t.removeData(this._element,sr);this._element=null;this._config=null},n._getConfig=function(n){return n=f({},hf,t(this._element).data(),"object"==typeof n&&n?n:{}),r.typeCheckConfig(ct,n,this.constructor.DefaultType),n},n._setListeners=function(){var n=this;t(this._element).on(lt.CLICK_DISMISS,uc,function(){return n.hide(!0)})},n._close=function(){var n=this,i=function(){n._element.classList.add(of);t(n._element).trigger(lt.HIDDEN)},u;(this._element.classList.remove(yi),this._config.animation)?(u=r.getTransitionDurationFromElement(this._element),t(this._element).one(r.TRANSITION_END,i).emulateTransitionEnd(u)):i()},i._jQueryInterface=function(n){return this.each(function(){var u=t(this),r=u.data(sr);if(r||(r=new i(this,"object"==typeof n&&n),u.data(sr,r)),"string"==typeof n){if("undefined"==typeof r[n])throw new TypeError('No method named "'+n+'"');r[n](this)}})},l(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"DefaultType",get:function(){return rc}},{key:"Default",get:function(){return hf}}]),i}();t.fn[ct]=hr._jQueryInterface;t.fn[ct].Constructor=hr;t.fn[ct].noConflict=function(){return t.fn[ct]=tc,hr._jQueryInterface},function(){if("undefined"==typeof t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var n=t.fn.jquery.split(" ")[0].split(".");if(n[0]<2&&n[1]<9||1===n[0]&&9===n[1]&&n[2]<1||4<=n[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0");}();n.Util=r;n.Alert=it;n.Button=wt;n.Carousel=ut;n.Collapse=ni;n.Dropdown=p;n.Modal=ri;n.Popover=ur;n.Scrollspy=si;n.Tab=ai;n.Toast=hr;n.Tooltip=g;Object.defineProperty(n,"__esModule",{value:!0})});!function(n){"use strict";n.matchMedia=n.matchMedia||function(n){var u,i=n.documentElement,f=i.firstElementChild||i.firstChild,r=n.createElement("body"),t=n.createElement("div");return t.id="mq-test-1",t.style.cssText="position:absolute;top:-100em",r.style.background="none",r.appendChild(t),function(n){return t.innerHTML='&shy;<style media="'+n+'"> #mq-test-1 { width: 42px; }<\/style>',i.insertBefore(r,f),u=42===t.offsetWidth,i.removeChild(r),{matches:u,media:n}}}(n.document)}(this),function(n){"use strict";function p(){y(!0)}var t={};n.respond=t;t.update=function(){};var f=[],tt=function(){var t=!1;try{t=new n.XMLHttpRequest}catch(i){t=new n.ActiveXObject("Microsoft.XMLHTTP")}return function(){return t}}(),w=function(n,t){var i=tt();i&&(i.open("GET",n,!0),i.onreadystatechange=function(){4!==i.readyState||200!==i.status&&304!==i.status||t(i.responseText)},4!==i.readyState&&i.send(null))};if(t.ajax=w,t.queue=f,t.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},t.mediaQueriesSupported=n.matchMedia&&null!==n.matchMedia("only all")&&n.matchMedia("only all").matches,!t.mediaQueriesSupported){var c,b,l,i=n.document,r=i.documentElement,e=[],o=[],u=[],a={},k=30,s=i.getElementsByTagName("head")[0]||r,it=i.getElementsByTagName("base")[0],h=s.getElementsByTagName("link"),v=function(){var u,t=i.createElement("div"),n=i.body,o=r.style.fontSize,e=n&&n.style.fontSize,f=!1;return t.style.cssText="position:absolute;font-size:1em;width:1em",n||(n=f=i.createElement("body"),n.style.background="none"),r.style.fontSize="100%",n.style.fontSize="100%",n.appendChild(t),f&&r.insertBefore(n,r.firstChild),u=t.offsetWidth,f?r.removeChild(n):n.removeChild(t),r.style.fontSize=o,e&&(n.style.fontSize=e),u=l=parseFloat(u)},y=function(t){var rt="clientWidth",ut=r[rt],ft="CSS1Compat"===i.compatMode&&ut||i.body[rt]||ut,p={},ct=h[h.length-1],et=(new Date).getTime(),tt,g,nt,f,it;if(t&&c&&k>et-c)return n.clearTimeout(b),b=n.setTimeout(y,k),void 0;c=et;for(tt in e)if(e.hasOwnProperty(tt)){var a=e[tt],w=a.minw,d=a.maxw,ot=null===w,st=null===d,ht="em";w&&(w=parseFloat(w)*(w.indexOf(ht)>-1?l||v():1));d&&(d=parseFloat(d)*(d.indexOf(ht)>-1?l||v():1));a.hasquery&&(ot&&st||!(ot||ft>=w)||!(st||d>=ft))||(p[a.media]||(p[a.media]=[]),p[a.media].push(o[a.rules]))}for(g in u)u.hasOwnProperty(g)&&u[g]&&u[g].parentNode===s&&s.removeChild(u[g]);u.length=0;for(nt in p)p.hasOwnProperty(nt)&&(f=i.createElement("style"),it=p[nt].join("\n"),f.type="text/css",f.media=nt,s.insertBefore(f,ct.nextSibling),f.styleSheet?f.styleSheet.cssText=it:f.appendChild(i.createTextNode(it)),u.push(f))},d=function(n,i,r){var h=n.replace(t.regex.keyframes,"").match(t.regex.media),c=h&&h.length||0,l,a,f,v,u,p,w,s;for(i=i.substring(0,i.lastIndexOf("/")),l=function(n){return n.replace(t.regex.urls,"$1"+i+"$2$3")},a=!c&&r,i.length&&(i+="/"),a&&(c=1),f=0;c>f;f++)for(a?(v=r,o.push(l(n))):(v=h[f].match(t.regex.findStyles)&&RegExp.$1,o.push(RegExp.$2&&l(RegExp.$2))),p=v.split(","),w=p.length,s=0;w>s;s++)u=p[s],e.push({media:u.split("(")[0].match(t.regex.only)&&RegExp.$2||"all",rules:o.length-1,hasquery:u.indexOf("(")>-1,minw:u.match(t.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:u.match(t.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")});y()},g=function(){if(f.length){var t=f.shift();w(t.href,function(i){d(i,t.href,t.media);a[t.href]=!0;n.setTimeout(function(){g()},0)})}},nt=function(){for(var r=0;r<h.length;r++){var i=h[r],t=i.href,u=i.media,e=i.rel&&"stylesheet"===i.rel.toLowerCase();t&&e&&!a[t]&&(i.styleSheet&&i.styleSheet.rawCssText?(d(i.styleSheet.rawCssText,t,u),a[t]=!0):(!/^([a-zA-Z:]*\/\/)/.test(t)&&!it||t.replace(RegExp.$1,"").split("/")[0]===n.location.host)&&("//"===t.substring(0,2)&&(t=n.location.protocol+t),f.push({href:t,media:u})))}g()};nt();t.update=nt;t.getEmValue=v;n.addEventListener?n.addEventListener("resize",p,!1):n.attachEvent&&n.attachEvent("onresize",p)}}(this);!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):t(n.jQuery)}(this,function(n){"use strict";function ri(n){return n[0]}function lt(n){return n[n.length-1]}function ui(n){return n.slice(1)}function at(t,i){return n.inArray(i,t)}function fi(n,t){return-1!==at(n,t)}function y(t){return t&&n(t).hasClass("note-editable")}function s(n){return n=n.toUpperCase(),function(t){return t&&t.nodeName.toUpperCase()===n}}function p(n){return n&&3===n.nodeType}function it(n){return n&&/^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT/.test(n.nodeName.toUpperCase())}function d(n){return!y(n)&&n&&/^DIV|^P|^LI|^H[1-7]/.test(n.nodeName.toUpperCase())}function rt(n){return!(pt(n)||li(n)||ai(n)||d(n)||hi(n)||ut(n)||ci(n))}function li(n){return n&&/^UL|^OL/.test(n.nodeName.toUpperCase())}function vi(n){return n&&/^TD|^TH/.test(n.nodeName.toUpperCase())}function pt(n){return vi(n)||ut(n)||y(n)}function a(n){return p(n)?n.nodeValue.length:n?n.childNodes.length:0}function wt(n){var t=a(n);return 0===t||!p(n)&&1===t&&n.innerHTML===ft||!(!i.all(n.childNodes,p)||""!==n.innerHTML)}function pi(n){it(n)||a(n)||(n.innerHTML=ft)}function et(n,t){for(;n;){if(t(n))return n;if(y(n))break;n=n.parentNode}return null}function g(n,t){t=t||u.fail;var i=[];return et(n,function(n){return y(n)||i.push(n),t(n)}),i}function wi(n,t){t=t||u.fail;for(var i=[];n&&!t(n);)i.push(n),n=n.nextSibling;return i}function bt(n,t){var i=t.nextSibling,r=t.parentNode;return i?r.insertBefore(n,i):r.appendChild(n),n}function kt(t,i){return n.each(i,function(n,i){t.appendChild(i)}),t}function ot(n){return 0===n.offset}function st(n){return n.offset===a(n.node)}function bi(n){return ot(n)||st(n)}function ki(n,t){for(;n&&n!==t;){if(0!==b(n))return!1;n=n.parentNode}return!0}function di(n,t){if(!t)return!1;for(;n&&n!==t;){if(b(n)!==a(n.parentNode)-1)return!1;n=n.parentNode}return!0}function b(n){for(var t=0;n=n.previousSibling;)t+=1;return t}function ht(n){return!!(n&&n.childNodes&&n.childNodes.length)}function gi(n,t){var i,r;if(0===n.offset){if(y(n.node))return null;i=n.node.parentNode;r=b(n.node)}else ht(n.node)?r=a(i=n.node.childNodes[n.offset-1]):(i=n.node,r=t?0:n.offset-1);return{node:i,offset:r}}function dt(n,t){var i,r;if(a(n.node)===n.offset){if(y(n.node))return null;i=n.node.parentNode;r=b(n.node)+1}else ht(n.node)?(i=n.node.childNodes[n.offset],r=0):(i=n.node,r=t?a(n.node):n.offset+1);return{node:i,offset:r}}function nr(n,t){return n.node===t.node&&n.offset===t.offset}function gt(n,t){var u=t&&t.isSkipPaddingBlankHTML,f=t&&t.isNotSplitEdgePoint,r,i;if(bi(n)&&(p(n.node)||f)){if(ot(n))return n.node;if(st(n))return n.node.nextSibling}return p(n.node)?n.node.splitText(n.offset):(r=n.node.childNodes[n.offset],i=bt(n.node.cloneNode(!1),n.node),kt(i,wi(r)),u||(pi(n.node),pi(i)),i)}function tr(n,t,i){var r=g(t.node,u.eq(n));return r.length?1===r.length?gt(t,i):r.reduce(function(n,r){return n===t.node&&(n=gt(t,i)),gt({node:r,offset:n?b(n):a(r)},i)}):null}function ir(n){return document.createElement(n)}function ni(n,t){var r;if(n&&n.parentNode){if(n.removeNode)return n.removeNode(t);if(r=n.parentNode,!t){for(var u=[],i=0,f=n.childNodes.length;i<f;i++)u.push(n.childNodes[i]);for(i=0,f=u.length;i<f;i++)r.insertBefore(u[i],n)}r.removeChild(n)}}function rr(n,t){var i=ti(n[0])?n.val():n.html();return t?i.replace(/[\n\r]/g,""):i}function ur(n,r){for(var o,s=n.parentElement(),a=document.body.createTextRange(),h=i.from(s.childNodes),c,u,l,e,f=0;f<h.length;f++)if(!t.isText(h[f])){if(a.moveToElementText(h[f]),a.compareEndPoints("StartToStart",n)>=0)break;o=h[f]}if(0!==f&&t.isText(h[f-1])){for(c=document.body.createTextRange(),u=null,c.moveToElementText(o||s),c.collapse(!o),u=o?o.nextSibling:s.firstChild,l=n.duplicate(),l.setEndPoint("StartToStart",c),e=l.text.replace(/[\r\n]/g,"").length;e>u.nodeValue.length&&u.nextSibling;)e-=u.nodeValue.length,u=u.nextSibling;u.nodeValue;r&&u.nextSibling&&t.isText(u.nextSibling)&&e===u.nodeValue.length&&(e-=u.nodeValue.length,u=u.nextSibling);s=u;f=e}return{cont:s,offset:f}}function fr(n){var e=function(n,r){var f,o,s,h;if(t.isText(n))s=t.listPrev(n,u.not(t.isText)),h=i.last(s).previousSibling,f=h||n.parentNode,r+=i.sum(i.tail(s),t.nodeLength),o=!h;else{if(f=n.childNodes[r]||n,t.isText(f))return e(f,0);r=0;o=!1}return{node:f,collapseToStart:o,offset:r}},r=document.body.createTextRange(),f=e(n.node,n.offset);return r.moveToElementText(f.node),r.collapse(f.collapseToStart),r.moveStart("character",f.offset),r}var nt,w,k,ai,ut,ti,t,c,o;n=n&&n.hasOwnProperty("default")?n.default:n;var or=function(){function t(n,t,i,r){this.markup=n;this.children=t;this.options=i;this.callback=r}return t.prototype.render=function(t){var i=n(this.markup),r;return(this.options&&this.options.contents&&i.html(this.options.contents),this.options&&this.options.className&&i.addClass(this.options.className),this.options&&this.options.data&&n.each(this.options.data,function(n,t){i.attr("data-"+n,t)}),this.options&&this.options.click&&i.on("click",this.options.click),this.children)&&(r=i.find(".note-children-container"),this.children.forEach(function(n){n.render(r.length?r:i)})),this.callback&&this.callback(i,this.options),this.options&&this.options.callback&&this.options.callback(i),t&&t.append(i),i},t}(),h=function(t,i){return function(){var r="object"==typeof arguments[1]?arguments[1]:arguments[0],u=n.isArray(arguments[0])?arguments[0]:[];return r&&r.children&&(u=r.children),new or(t,u,r,i)}},sr=h('<div class="note-editor note-frame card"/>'),hr=h('<div class="note-toolbar-wrapper"><div class="note-toolbar card-header"><\/div><\/div>'),cr=h('<div class="note-editing-area"/>'),lr=h('<textarea class="note-codable"/>'),ar=h('<div class="note-editable card-block" contentEditable="true"/>'),vr=h('<div class="note-statusbar">  <div class="note-resizebar">    <div class="note-icon-bar"/>    <div class="note-icon-bar"/>    <div class="note-icon-bar"/>  <\/div><\/div>'),yr=h('<div class="note-editor"/>'),pr=h('<div class="note-editable" contentEditable="true"/>'),wr=h('<div class="note-btn-group btn-group">'),br=h('<div class="dropdown-menu">',function(t,i){var r=n.isArray(i.items)?i.items.map(function(n){var r="string"==typeof n?n:n.value||"",u=i.template?i.template(n):n,t="object"==typeof n?n.option:void 0;return'<a class="dropdown-item" href="#" '+('data-value="'+r+'"'+(void 0!==t?' data-option="'+t+'"':""))+">"+u+"<\/a>"}).join(""):i.items;t.html(r)}),kr=h('<div class="dropdown-menu note-check">',function(t,i){var r=n.isArray(i.items)?i.items.map(function(n){var t="string"==typeof n?n:n.value||"",r=i.template?i.template(n):n;return'<a class="dropdown-item" href="#" data-value="'+t+'">'+ii(i.checkClassName)+" "+r+"<\/a>"}).join(""):i.items;t.html(r)}),dr=h('<div class="note-color-palette"/>',function(n,t){for(var i,f=[],r=0,s=t.colors.length;r<s;r++){for(var h=t.eventName,e=t.colors[r],o=[],u=0,c=e.length;u<c;u++)i=e[u],o.push(['<button type="button" class="note-color-btn"','style="background-color:',i,'" ','data-event="',h,'" ','data-value="',i,'" ','title="',i,'" ','data-toggle="button" tabindex="-1"><\/button>'].join(""));f.push('<div class="note-color-row">'+o.join("")+"<\/div>")}n.html(f.join(""));t.tooltip&&n.find(".note-color-btn").tooltip({container:t.container,trigger:"hover",placement:"bottom"})}),gr=h('<div class="modal" aria-hidden="false" tabindex="-1"/>',function(n,t){t.fade&&n.addClass("fade");n.html(['<div class="modal-dialog">','  <div class="modal-content">',t.title?'    <div class="modal-header">      <h4 class="modal-title">'+t.title+'<\/h4>      <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;<\/span><\/button>    <\/div>':"",'    <div class="modal-body">'+t.body+"<\/div>",t.footer?'    <div class="modal-footer">'+t.footer+"<\/div>":"","  <\/div>","<\/div>"].join(""))}),nu=h('<div class="note-popover popover in">  <div class="arrow"/>  <div class="popover-content note-children-container"/><\/div>',function(n,t){var i=void 0!==t.direction?t.direction:"bottom";n.addClass(i);t.hideArrow&&n.find(".arrow").hide()}),tu=h('<label class="custom-control custom-checkbox"><\/label>',function(n,t){t.id&&n.attr("for",t.id);n.html([' <input type="checkbox" class="custom-control-input"'+(t.id?' id="'+t.id+'"':""),(t.checked?" checked":"")+"/>",' <span class="custom-control-indicator"><\/span>',' <span class="custom-control-description">'+(t.text?t.text:"")+"<\/span>","<\/label>"].join(""))}),ii=function(n,t){return"<"+(t=t||"i")+' class="'+n+'"/>'},l={editor:sr,toolbar:hr,editingArea:cr,codable:lr,editable:ar,statusbar:vr,airEditor:yr,airEditable:pr,buttonGroup:wr,dropdown:br,dropdownButtonContents:function(n){return n},dropdownCheck:kr,palette:dr,dialog:gr,popover:nu,icon:ii,checkbox:tu,options:{},button:function(n,t){return h('<button type="button" class="note-btn btn btn-light btn-sm" tabindex="-1">',function(n,t){t&&t.tooltip&&n.attr({title:t.tooltip}).tooltip({container:t.container,trigger:"hover",placement:"bottom"})})(n,t)},toggleBtn:function(n,t){n.toggleClass("disabled",!t);n.attr("disabled",!t)},toggleBtnActive:function(n,t){n.toggleClass("active",t)},onDialogShown:function(n,t){n.one("shown.bs.modal",t)},onDialogHidden:function(n,t){n.one("hidden.bs.modal",t)},showDialog:function(n){n.modal("show")},hideDialog:function(n){n.modal("hide")},createLayout:function(n,t){var i=(t.airMode?l.airEditor([l.editingArea([l.airEditable()])]):l.editor([l.toolbar(),l.editingArea([l.codable(),l.editable()]),l.statusbar()])).render();return i.insertAfter(n),{note:n,editor:i,toolbar:i.find(".note-toolbar"),editingArea:i.find(".note-editing-area"),editable:i.find(".note-editable"),codable:i.find(".note-codable"),statusbar:i.find(".note-statusbar")}},removeLayout:function(n,t){n.html(t.editable.html());t.editor.remove();n.show()}},iu=0,u={eq:function(n){return function(t){return n===t}},eq2:function(n,t){return n===t},peq2:function(n){return function(t,i){return t[n]===i[n]}},ok:function(){return!0},fail:function(){return!1},self:function(n){return n},not:function(n){return function(){return!n.apply(n,arguments)}},and:function(n,t){return function(i){return n(i)&&t(i)}},invoke:function(n,t){return function(){return n[t].apply(n,arguments)}},uniqueId:function(n){var t=++iu+"";return n?n+t:t},rect2bnd:function(n){var t=$(document);return{top:n.top+t.scrollTop(),left:n.left+t.scrollLeft(),width:n.right-n.left,height:n.bottom-n.top}},invertObject:function(n){var i={};for(var t in n)n.hasOwnProperty(t)&&(i[n[t]]=t);return i},namespaceToCamel:function(n,t){return(t=t||"")+n.split(".").map(function(n){return n.substring(0,1).toUpperCase()+n.substring(1)}).join("")},debounce:function(n,t,i){var r,u=this;return function(){var f=u,e=arguments,o=i&&!r;clearTimeout(r);r=setTimeout(function(){r=null;i||n.apply(f,e)},t);o&&n.apply(f,e)}}};var i={head:ri,last:lt,initial:function(n){return n.slice(0,n.length-1)},tail:ui,prev:function(n,t){var i=at(n,t);return-1===i?null:n[i-1]},next:function(n,t){var i=at(n,t);return-1===i?null:n[i+1]},find:function(n,t){for(var r,i=0,u=n.length;i<u;i++)if(r=n[i],t(r))return r},contains:fi,all:function(n,t){for(var i=0,r=n.length;i<r;i++)if(!t(n[i]))return!1;return!0},sum:function(n,t){return t=t||u.self,n.reduce(function(n,i){return n+t(i)},0)},from:function(n){for(var i=[],r=n.length,t=-1;++t<r;)i[t]=n[t];return i},isEmpty:function(n){return!n||!n.length},clusterBy:function(n,t){return n.length?ui(n).reduce(function(n,i){var r=lt(n);return t(lt(r),i)?r[r.length]=i:n[n.length]=[i],n},[[ri(n)]]):[]},compact:function(n){for(var i=[],t=0,r=n.length;t<r;t++)n[t]&&i.push(n[t]);return i},unique:function(n){for(var i=[],t=0,r=n.length;t<r;t++)fi(i,n[t])||i.push(n[t]);return i}},ei="function"==typeof define&&define.amd,vt,v=navigator.userAgent,yt=/MSIE|Trident/i.test(v);if(yt&&(nt=/MSIE (\d+[.]\d+)/.exec(v),nt&&(vt=parseFloat(nt[1])),(nt=/Trident\/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(v))&&(vt=parseFloat(nt[1]))),w=/Edge\/\d+/.test(v),k=!!window.CodeMirror,!k&&ei)if("function"==typeof __webpack_require__)try{require.resolve("codemirror");k=!0}catch(n){}else if("undefined"!=typeof require)if(void 0!==require.resolve)try{require.resolve("codemirror");k=!0}catch(n){}else void 0!==require.specified&&(k=require.specified("codemirror"));var ru="ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,uu=yt||w?"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted":"input",f={isMac:navigator.appVersion.indexOf("Mac")>-1,isMSIE:yt,isEdge:w,isFF:!w&&/firefox/i.test(v),isPhantom:/PhantomJS/i.test(v),isWebkit:!w&&/webkit/i.test(v),isChrome:!w&&/chrome/i.test(v),isSafari:!w&&/safari/i.test(v),browserVersion:vt,jqueryVersion:parseFloat(n.fn.jquery),isSupportAmd:ei,isSupportTouch:ru,hasCodeMirror:k,isFontInstalled:function(t){var r="Comic Sans MS"===t?"Courier New":"Comic Sans MS",i=n("<div>").css({position:"absolute",left:"-9999px",top:"-9999px",fontSize:"200px"}).text("mmmmmmmmmwwwwwww").appendTo(document.body),u=i.css("fontFamily",r).width(),f=i.css("fontFamily",t+","+r).width();return i.remove(),u!==f},isW3CRangeSupport:!!document.createRange,inputEventName:uu},oi=String.fromCharCode(160);var fu=s("PRE"),si=s("LI"),hi=s("TABLE"),ci=s("DATA");ai=s("HR");ut=s("BLOCKQUOTE");var yi=s("A"),eu=s("BODY"),ft=f.isMSIE&&f.browserVersion<11?"&nbsp;":"<br>";ti=s("TEXTAREA");t={NBSP_CHAR:oi,ZERO_WIDTH_NBSP_CHAR:"﻿",blank:ft,emptyPara:"<p>"+ft+"<\/p>",makePredByNodeName:s,isEditable:y,isControlSizing:function(t){return t&&n(t).hasClass("note-control-sizing")},isText:p,isElement:function(n){return n&&1===n.nodeType},isVoid:it,isPara:d,isPurePara:function(n){return d(n)&&!si(n)},isHeading:function(n){return n&&/^H[1-7]/.test(n.nodeName.toUpperCase())},isInline:rt,isBlock:u.not(rt),isBodyInline:function(n){return rt(n)&&!et(n,d)},isBody:eu,isParaInline:function(n){return rt(n)&&!!et(n,d)},isPre:fu,isList:li,isTable:hi,isData:ci,isCell:vi,isBlockquote:ut,isBodyContainer:pt,isAnchor:yi,isDiv:s("DIV"),isLi:si,isBR:s("BR"),isSpan:s("SPAN"),isB:s("B"),isU:s("U"),isS:s("S"),isI:s("I"),isImg:s("IMG"),isTextarea:ti,isEmpty:wt,isEmptyAnchor:u.and(yi,wt),isClosestSibling:function(n,t){return n.nextSibling===t||n.previousSibling===t},withClosestSiblings:function(n,t){t=t||u.ok;var i=[];return n.previousSibling&&t(n.previousSibling)&&i.push(n.previousSibling),i.push(n),n.nextSibling&&t(n.nextSibling)&&i.push(n.nextSibling),i},nodeLength:a,isLeftEdgePoint:ot,isRightEdgePoint:st,isEdgePoint:bi,isLeftEdgeOf:ki,isRightEdgeOf:di,isLeftEdgePointOf:function(n,t){return ot(n)&&ki(n.node,t)},isRightEdgePointOf:function(n,t){return st(n)&&di(n.node,t)},prevPoint:gi,nextPoint:dt,isSamePoint:nr,isVisiblePoint:function(n){if(p(n.node)||!ht(n.node)||wt(n.node))return!0;var t=n.node.childNodes[n.offset-1],i=n.node.childNodes[n.offset];return!(t&&!it(t)||i&&!it(i))},prevPointUntil:function(n,t){for(;n;){if(t(n))return n;n=gi(n)}return null},nextPointUntil:function(n,t){for(;n;){if(t(n))return n;n=dt(n)}return null},isCharPoint:function(n){if(!p(n.node))return!1;var t=n.node.nodeValue.charAt(n.offset-1);return t&&" "!==t&&t!==oi},walkPoint:function(n,t,i,r){for(var u=n;u&&(i(u),!nr(u,t));)u=dt(u,r&&n.node!==u.node&&t.node!==u.node)},ancestor:et,singleChildAncestor:function(n,t){for(n=n.parentNode;n&&1===a(n);){if(t(n))return n;if(y(n))break;n=n.parentNode}return null},listAncestor:g,lastAncestor:function(n,t){var r=g(n);return i.last(r.filter(t))},listNext:wi,listPrev:function(n,t){t=t||u.fail;for(var i=[];n&&!t(n);)i.push(n),n=n.previousSibling;return i},listDescendant:function(n,t){var i=[];return t=t||u.ok,function r(u){n!==u&&t(u)&&i.push(u);for(var f=0,e=u.childNodes.length;f<e;f++)r(u.childNodes[f])}(n),i},commonAncestor:function(t,i){for(var u=g(t),r=i;r;r=r.parentNode)if(n.inArray(r,u)>-1)return r;return null},wrap:function(t,i){var u=t.parentNode,r=n("<"+i+">")[0];return u.insertBefore(r,t),r.appendChild(t),r},insertAfter:bt,appendChildNodes:kt,position:b,hasChildren:ht,makeOffsetPath:function(n,t){return g(t,u.eq(n)).map(b).reverse()},fromOffsetPath:function(n,t){for(var i=n,r=0,u=t.length;r<u;r++)i=i.childNodes.length<=t[r]?i.childNodes[i.childNodes.length-1]:i.childNodes[t[r]];return i},splitTree:tr,splitPoint:function(n,t){var r,u,s=t?d:pt,e=g(n.node,s),o=i.last(e)||n.node,f;return s(o)?(r=e[e.length-2],u=o):u=(r=o).parentNode,f=r&&tr(r,n,{isSkipPaddingBlankHTML:t,isNotSplitEdgePoint:t}),f||u!==n.node||(f=n.node.childNodes[n.offset]),{rightNode:f,container:u}},create:ir,createText:function(n){return document.createTextNode(n)},remove:ni,removeWhile:function(n,t){for(;n&&!y(n)&&t(n);){var i=n.parentNode;ni(n);n=i}},replace:function(n,t){if(n.nodeName.toUpperCase()===t.toUpperCase())return n;var r=ir(t);return n.style.cssText&&(r.style.cssText=n.style.cssText),kt(r,i.from(n.childNodes)),bt(r,n),ni(n),r},html:function(t,i){var r=rr(t);return i&&(r=r.replace(/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g,function(n,t,i){i=i.toUpperCase();var r=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(i)&&!!t,u=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(i);return n+(r||u?"\n":"")}),r=n.trim(r)),r},value:rr,posFromPlaceholder:function(t){var i=n(t),r=i.offset(),u=i.outerHeight(!0);return{left:r.left,top:r.top+u}},attachEvents:function(n,t){Object.keys(t).forEach(function(i){n.on(i,t[i])})},detachEvents:function(n,t){Object.keys(t).forEach(function(i){n.off(i,t[i])})},isCustomStyleTag:function(n){return n&&!p(n)&&i.contains(n.classList,"note-styletag")}};n.summernote=n.summernote||{lang:{}};n.extend(n.summernote.lang,{"en-US":{font:{bold:"Bold",italic:"Italic",underline:"Underline",clear:"Remove Font Style",height:"Line Height",name:"Font Family",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript",size:"Font Size"},image:{image:"Picture",insert:"Insert Image",resizeFull:"Resize Full",resizeHalf:"Resize Half",resizeQuarter:"Resize Quarter",floatLeft:"Float Left",floatRight:"Float Right",floatNone:"Float None",shapeRounded:"Shape: Rounded",shapeCircle:"Shape: Circle",shapeThumbnail:"Shape: Thumbnail",shapeNone:"Shape: None",dragImageHere:"Drag image or text here",dropImage:"Drop image or Text",selectFromFiles:"Select from files",maximumFileSize:"Maximum file size",maximumFileSizeError:"Maximum file size exceeded.",url:"Image URL",remove:"Remove Image",original:"Original"},video:{video:"Video",videoLink:"Video Link",insert:"Insert Video",url:"Video URL",providers:"(YouTube, Vimeo, Vine, Instagram, DailyMotion or Youku)"},link:{link:"Link",insert:"Insert Link",unlink:"Unlink",edit:"Edit",textToDisplay:"Text to display",url:"To what URL should this link go?",openInNewWindow:"Open in new window"},table:{table:"Table",addRowAbove:"Add row above",addRowBelow:"Add row below",addColLeft:"Add column left",addColRight:"Add column right",delRow:"Delete row",delCol:"Delete column",delTable:"Delete table"},hr:{insert:"Insert Horizontal Rule"},style:{style:"Style",p:"Normal",blockquote:"Quote",pre:"Code",h1:"Header 1",h2:"Header 2",h3:"Header 3",h4:"Header 4",h5:"Header 5",h6:"Header 6"},lists:{unordered:"Unordered list",ordered:"Ordered list"},options:{help:"Help",fullscreen:"Full Screen",codeview:"Code View"},paragraph:{paragraph:"Paragraph",outdent:"Outdent",indent:"Indent",left:"Align left",center:"Align center",right:"Align right",justify:"Justify full"},color:{recent:"Recent Color",more:"More Color",background:"Background Color",foreground:"Foreground Color",transparent:"Transparent",setTransparent:"Set transparent",reset:"Reset",resetToDefault:"Reset to default"},shortcut:{shortcuts:"Keyboard shortcuts",close:"Close",textFormatting:"Text formatting",action:"Action",paragraphFormatting:"Paragraph formatting",documentStyle:"Document Style",extraKeys:"Extra keys"},help:{insertParagraph:"Insert Paragraph",undo:"Undoes the last command",redo:"Redoes the last command",tab:"Tab",untab:"Untab",bold:"Set a bold style",italic:"Set a italic style",underline:"Set a underline style",strikethrough:"Set a strikethrough style",removeFormat:"Clean a style",justifyLeft:"Set left align",justifyCenter:"Set center align",justifyRight:"Set right align",justifyFull:"Set full align",insertUnorderedList:"Toggle unordered list",insertOrderedList:"Toggle ordered list",outdent:"Outdent on current paragraph",indent:"Indent on current paragraph",formatPara:"Change current block's format as a paragraph(P tag)",formatH1:"Change current block's format as H1",formatH2:"Change current block's format as H2",formatH3:"Change current block's format as H3",formatH4:"Change current block's format as H4",formatH5:"Change current block's format as H5",formatH6:"Change current block's format as H6",insertHorizontalRule:"Insert horizontal rule","linkDialog.show":"Show Link Dialog"},history:{undo:"Undo",redo:"Redo"},specialChar:{specialChar:"SPECIAL CHARACTERS",select:"Select Special characters"}}});c={BACKSPACE:8,TAB:9,ENTER:13,SPACE:32,DELETE:46,LEFT:37,UP:38,RIGHT:39,DOWN:40,NUM0:48,NUM1:49,NUM2:50,NUM3:51,NUM4:52,NUM5:53,NUM6:54,NUM7:55,NUM8:56,B:66,E:69,I:73,J:74,K:75,L:76,R:82,S:83,U:85,V:86,Y:89,Z:90,SLASH:191,LEFTBRACKET:219,BACKSLASH:220,RIGHTBRACKET:221};o={isEdit:function(n){return i.contains([c.BACKSPACE,c.TAB,c.ENTER,c.SPACE,c.DELETE],n)},isMove:function(n){return i.contains([c.LEFT,c.UP,c.RIGHT,c.DOWN],n)},nameFromCode:u.invertObject(c),code:c};var tt=function(){function r(n,i,r,u){this.sc=n;this.so=i;this.ec=r;this.eo=u;this.isOnEditable=this.makeIsOn(t.isEditable);this.isOnList=this.makeIsOn(t.isList);this.isOnAnchor=this.makeIsOn(t.isAnchor);this.isOnCell=this.makeIsOn(t.isCell);this.isOnData=this.makeIsOn(t.isData)}return r.prototype.nativeRange=function(){var n,t;return f.isW3CRangeSupport?(n=document.createRange(),n.setStart(this.sc,this.so),n.setEnd(this.ec,this.eo),n):(t=fr({node:this.sc,offset:this.so}),t.setEndPoint("EndToEnd",fr({node:this.ec,offset:this.eo})),t)},r.prototype.getPoints=function(){return{sc:this.sc,so:this.so,ec:this.ec,eo:this.eo}},r.prototype.getStartPoint=function(){return{node:this.sc,offset:this.so}},r.prototype.getEndPoint=function(){return{node:this.ec,offset:this.eo}},r.prototype.select=function(){var t=this.nativeRange(),n;return f.isW3CRangeSupport?(n=document.getSelection(),n.rangeCount>0&&n.removeAllRanges(),n.addRange(t)):t.select(),this},r.prototype.scrollIntoView=function(t){var i=n(t).height();return t.scrollTop+i<this.sc.offsetTop&&(t.scrollTop+=Math.abs(t.scrollTop+i-this.sc.offsetTop)),this},r.prototype.normalize=function(){var i=function(n,i){if(t.isVisiblePoint(n)&&!t.isEdgePoint(n)||t.isVisiblePoint(n)&&t.isRightEdgePoint(n)&&!i||t.isVisiblePoint(n)&&t.isLeftEdgePoint(n)&&i||t.isVisiblePoint(n)&&t.isBlock(n.node)&&t.isEmpty(n.node))return n;var r=t.ancestor(n.node,t.isBlock);if((t.isLeftEdgePointOf(n,r)||t.isVoid(t.prevPoint(n).node))&&!i||(t.isRightEdgePointOf(n,r)||t.isVoid(t.nextPoint(n).node))&&i){if(t.isVisiblePoint(n))return n;i=!i}return(i?t.nextPointUntil(t.nextPoint(n),t.isVisiblePoint):t.prevPointUntil(t.prevPoint(n),t.isVisiblePoint))||n},n=i(this.getEndPoint(),!1),u=this.isCollapsed()?n:i(this.getStartPoint(),!0);return new r(u.node,u.offset,n.node,n.offset)},r.prototype.nodes=function(n,r){n=n||u.ok;var o=r&&r.includeAncestor,s=r&&r.fullyContains,h=this.getStartPoint(),c=this.getEndPoint(),f=[],e=[];return t.walkPoint(h,c,function(r){if(!t.isEditable(r.node)){var u;s?(t.isLeftEdgePoint(r)&&e.push(r.node),t.isRightEdgePoint(r)&&i.contains(e,r.node)&&(u=r.node)):u=o?t.ancestor(r.node,n):r.node;u&&n(u)&&f.push(u)}},!0),i.unique(f)},r.prototype.commonAncestor=function(){return t.commonAncestor(this.sc,this.ec)},r.prototype.expand=function(n){var f=t.ancestor(this.sc,n),u=t.ancestor(this.ec,n),i;return!f&&!u?new r(this.sc,this.so,this.ec,this.eo):(i=this.getPoints(),f&&(i.sc=f,i.so=0),u&&(i.ec=u,i.eo=t.nodeLength(u)),new r(i.sc,i.so,i.ec,i.eo))},r.prototype.collapse=function(n){return n?new r(this.sc,this.so,this.sc,this.so):new r(this.ec,this.eo,this.ec,this.eo)},r.prototype.splitText=function(){var i=this.sc===this.ec,n=this.getPoints();return t.isText(this.ec)&&!t.isEdgePoint(this.getEndPoint())&&this.ec.splitText(this.eo),t.isText(this.sc)&&!t.isEdgePoint(this.getStartPoint())&&(n.sc=this.sc.splitText(this.so),n.so=0,i&&(n.ec=n.sc,n.eo=this.eo-this.so)),new r(n.sc,n.so,n.ec,n.eo)},r.prototype.deleteContents=function(){if(this.isCollapsed())return this;var f=this.splitText(),e=f.nodes(null,{fullyContains:!0}),u=t.prevPointUntil(f.getStartPoint(),function(n){return!i.contains(e,n.node)}),o=[];return n.each(e,function(n,i){var r=i.parentNode;u.node!==r&&1===t.nodeLength(r)&&o.push(r);t.remove(i,!1)}),n.each(o,function(n,i){t.remove(i,!1)}),new r(u.node,u.offset,u.node,u.offset).normalize()},r.prototype.makeIsOn=function(n){return function(){var i=t.ancestor(this.sc,n);return!!i&&i===t.ancestor(this.ec,n)}},r.prototype.isLeftEdgeOf=function(n){if(!t.isLeftEdgePoint(this.getStartPoint()))return!1;var i=t.ancestor(this.sc,n);return i&&t.isLeftEdgeOf(this.sc,i)},r.prototype.isCollapsed=function(){return this.sc===this.ec&&this.so===this.eo},r.prototype.wrapBodyInlineWithPara=function(){var n,f,o,e,s;return t.isBodyContainer(this.sc)&&t.isEmpty(this.sc)?(this.sc.innerHTML=t.emptyPara,new r(this.sc.firstChild,0,this.sc.firstChild,0)):(n=this.normalize(),t.isParaInline(this.sc)||t.isPara(this.sc))?n:(t.isInline(n.sc)?(o=t.listAncestor(n.sc,u.not(t.isInline)),f=i.last(o),t.isInline(f)||(f=o[o.length-2]||n.sc.childNodes[n.so])):f=n.sc.childNodes[n.so>0?n.so-1:0],e=t.listPrev(f,t.isParaInline).reverse(),(e=e.concat(t.listNext(f.nextSibling,t.isParaInline))).length&&(s=t.wrap(i.head(e),"p"),t.appendChildNodes(s,i.tail(e))),this.normalize())},r.prototype.insertNode=function(n){var r=this.wrapBodyInlineWithPara().deleteContents(),i=t.splitPoint(r.getStartPoint(),t.isInline(n));return i.rightNode?i.rightNode.parentNode.insertBefore(n,i.rightNode):i.container.appendChild(n),n},r.prototype.pasteHTML=function(t){var r=n("<div><\/div>").html(t)[0],u=i.from(r.childNodes),f=this.wrapBodyInlineWithPara().deleteContents();return u.reverse().map(function(n){return f.insertNode(n)}).reverse()},r.prototype.toString=function(){var n=this.nativeRange();return f.isW3CRangeSupport?n.toString():n.text},r.prototype.getWordRange=function(n){var i=this.getEndPoint(),u;return t.isCharPoint(i)?(u=t.prevPointUntil(i,function(n){return!t.isCharPoint(n)}),n&&(i=t.nextPointUntil(i,function(n){return!t.isCharPoint(n)})),new r(u.node,u.offset,i.node,i.offset)):this},r.prototype.bookmark=function(n){return{s:{path:t.makeOffsetPath(n,this.sc),offset:this.so},e:{path:t.makeOffsetPath(n,this.ec),offset:this.eo}}},r.prototype.paraBookmark=function(n){return{s:{path:i.tail(t.makeOffsetPath(i.head(n),this.sc)),offset:this.so},e:{path:i.tail(t.makeOffsetPath(i.last(n),this.ec)),offset:this.eo}}},r.prototype.getClientRects=function(){return this.nativeRange().getClientRects()},r}(),e={create:function(n,i,r,u){if(4===arguments.length)return new tt(n,i,r,u);if(2===arguments.length)return new tt(n,i,r=n,u=i);var f=this.createFromSelection();return f||1!==arguments.length?f:(f=this.createFromNode(arguments[0])).collapse(t.emptyPara===arguments[0].innerHTML)},createFromSelection:function(){var e,o,s,h,r,u,c,l,a,n,i;if(f.isW3CRangeSupport){if((r=document.getSelection(),!r||0===r.rangeCount)||t.isBody(r.anchorNode))return null;u=r.getRangeAt(0);e=u.startContainer;o=u.startOffset;s=u.endContainer;h=u.endOffset}else c=document.selection.createRange(),l=c.duplicate(),l.collapse(!1),a=c,a.collapse(!0),n=ur(a,!0),i=ur(l,!1),t.isText(n.node)&&t.isLeftEdgePoint(n)&&t.isTextNode(i.node)&&t.isRightEdgePoint(i)&&i.node.nextSibling===n.node&&(n=i),e=n.cont,o=n.offset,s=i.cont,h=i.offset;return new tt(e,o,s,h)},createFromNode:function(n){var r=n,f=0,i=n,u=t.nodeLength(i);return t.isVoid(r)&&(f=t.listPrev(r).length-1,r=r.parentNode),t.isBR(i)?(u=t.listPrev(i).length-1,i=i.parentNode):t.isVoid(i)&&(u=t.listPrev(i).length,i=i.parentNode),this.create(r,f,i,u)},createFromNodeBefore:function(n){return this.createFromNode(n).collapse(!0)},createFromNodeAfter:function(n){return this.createFromNode(n).collapse()},createFromBookmark:function(n,i){var r=t.fromOffsetPath(n,i.s.path),u=i.s.offset,f=t.fromOffsetPath(n,i.e.path),e=i.e.offset;return new tt(r,u,f,e)},createFromParaBookmark:function(n,r){var u=n.s.offset,f=n.e.offset,e=t.fromOffsetPath(i.head(r),n.s.path),o=t.fromOffsetPath(i.last(r),n.e.path);return new tt(e,u,o,f)}},ou=function(){function n(n){this.stack=[];this.stackOffset=-1;this.$editable=n;this.editable=n[0]}return n.prototype.makeSnapshot=function(){var n=e.create(this.editable);return{contents:this.$editable.html(),bookmark:n?n.bookmark(this.editable):{s:{path:[],offset:0},e:{path:[],offset:0}}}},n.prototype.applySnapshot=function(n){null!==n.contents&&this.$editable.html(n.contents);null!==n.bookmark&&e.createFromBookmark(this.editable,n.bookmark).select()},n.prototype.rewind=function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo();this.stackOffset=0;this.applySnapshot(this.stack[this.stackOffset])},n.prototype.reset=function(){this.stack=[];this.stackOffset=-1;this.$editable.html("");this.recordUndo()},n.prototype.undo=function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo();this.stackOffset>0&&(this.stackOffset--,this.applySnapshot(this.stack[this.stackOffset]))},n.prototype.redo=function(){this.stack.length-1>this.stackOffset&&(this.stackOffset++,this.applySnapshot(this.stack[this.stackOffset]))},n.prototype.recordUndo=function(){this.stackOffset++;this.stack.length>this.stackOffset&&(this.stack=this.stack.slice(0,this.stackOffset));this.stack.push(this.makeSnapshot())},n}(),su=function(){function r(){}return r.prototype.jQueryCSS=function(t,i){if(f.jqueryVersion<1.9){var r={};return n.each(i,function(n,i){r[i]=t.css(i)}),r}return t.css(i)},r.prototype.fromNode=function(n){var t=this.jQueryCSS(n,["font-family","font-size","text-align","list-style-type","line-height"])||{};return t["font-size"]=parseInt(t["font-size"],10),t},r.prototype.stylePara=function(i,r){n.each(i.nodes(t.isPara,{includeAncestor:!0}),function(t,i){n(i).css(r)})},r.prototype.styleNodes=function(r,f){var e,s,h;r=r.splitText();var o=f&&f.nodeName||"SPAN",c=!(!f||!f.expandClosestSibling),l=!(!f||!f.onlyPartialContains);return r.isCollapsed()?[r.insertNode(t.create(o))]:(e=t.makePredByNodeName(o),s=r.nodes(t.isText,{fullyContains:!0}).map(function(n){return t.singleChildAncestor(n,e)||t.wrap(n,o)}),c)?(l&&(h=r.nodes(),e=u.and(e,function(n){return i.contains(h,n)})),s.map(function(r){var u=t.withClosestSiblings(r,e),f=i.head(u),o=i.tail(u);return n.each(o,function(n,i){t.appendChildNodes(f,i.childNodes);t.remove(i)}),i.head(u)})):s},r.prototype.current=function(i){var o=n(t.isElement(i.sc)?i.sc:i.sc.parentNode),r=this.fromNode(o),f,u,e;try{r=n.extend(r,{"font-bold":document.queryCommandState("bold")?"bold":"normal","font-italic":document.queryCommandState("italic")?"italic":"normal","font-underline":document.queryCommandState("underline")?"underline":"normal","font-subscript":document.queryCommandState("subscript")?"subscript":"normal","font-superscript":document.queryCommandState("superscript")?"superscript":"normal","font-strikethrough":document.queryCommandState("strikethrough")?"strikethrough":"normal","font-family":document.queryCommandValue("fontname")||r["font-family"]})}catch(n){}return i.isOnList()?(f=n.inArray(r["list-style-type"],["circle","disc","disc-leading-zero","square"])>-1,r["list-style"]=f?"unordered":"ordered"):r["list-style"]="none",u=t.ancestor(i.sc,t.isPara),u&&u.style["line-height"]?r["line-height"]=u.style.lineHeight:(e=parseInt(r["line-height"],10)/parseInt(r["font-size"],10),r["line-height"]=e.toFixed(1)),r.anchor=i.isOnAnchor()&&t.ancestor(i.sc,t.isAnchor),r.ancestors=t.listAncestor(i.sc,t.isEditable),r.range=i,r},r}(),er=function(){function r(){}return r.prototype.insertOrderedList=function(n){this.toggleList("OL",n)},r.prototype.insertUnorderedList=function(n){this.toggleList("UL",n)},r.prototype.indent=function(r){var o=this,f=e.create(r).wrapBodyInlineWithPara(),s=f.nodes(t.isPara,{includeAncestor:!0}),h=i.clusterBy(s,u.peq2("parentNode"));n.each(h,function(r,u){var f=i.head(u);t.isLi(f)?o.wrapList(u,f.parentNode.nodeName):n.each(u,function(t,i){n(i).css("marginLeft",function(n,t){return(parseInt(t,10)||0)+25})})});f.select()},r.prototype.outdent=function(r){var o=this,f=e.create(r).wrapBodyInlineWithPara(),s=f.nodes(t.isPara,{includeAncestor:!0}),h=i.clusterBy(s,u.peq2("parentNode"));n.each(h,function(r,u){var f=i.head(u);t.isLi(f)?o.releaseList([u]):n.each(u,function(t,i){n(i).css("marginLeft",function(n,t){return(t=parseInt(t,10)||0)>25?t-25:""})})});f.select()},r.prototype.toggleList=function(r,f){var a=this,h=e.create(f).wrapBodyInlineWithPara(),o=h.nodes(t.isPara,{includeAncestor:!0}),v=h.paraBookmark(o),l=i.clusterBy(o,u.peq2("parentNode")),s,c;i.find(o,t.isPurePara)?(s=[],n.each(l,function(n,t){s=s.concat(a.wrapList(t,r))}),o=s):(c=h.nodes(t.isList,{includeAncestor:!0}).filter(function(t){return!n.nodeName(t,r)}),c.length?n.each(c,function(n,i){t.replace(i,r)}):o=this.releaseList(l,!0));e.createFromParaBookmark(v,o).select()},r.prototype.wrapList=function(n,r){var e=i.head(n),u=i.last(n),s=t.isList(e.previousSibling)&&e.previousSibling,f=t.isList(u.nextSibling)&&u.nextSibling,o=s||t.insertAfter(t.create(r||"UL"),u);return n=n.map(function(n){return t.isPurePara(n)?t.replace(n,"LI"):n}),t.appendChildNodes(o,n),f&&(t.appendChildNodes(o,i.from(f.childNodes)),t.remove(f)),n},r.prototype.releaseList=function(r,u){var f=[];return n.each(r,function(r,e){var s=i.head(e),c=i.last(e),o=u?t.lastAncestor(s,t.isList):s.parentNode,a=o.childNodes.length>1?t.splitTree(o,{node:c.parentNode,offset:t.position(c)+1},{isSkipPaddingBlankHTML:!0}):null,h=t.splitTree(o,{node:s.parentNode,offset:t.position(s)},{isSkipPaddingBlankHTML:!0}),l;e=u?t.listDescendant(h,t.isLi):i.from(h.childNodes).filter(t.isLi);!u&&t.isList(o.parentNode)||(e=e.map(function(n){return t.replace(n,"P")}));n.each(i.from(e).reverse(),function(n,i){t.insertAfter(i,o)});l=i.compact([o,h,a]);n.each(l,function(i,r){var u=[r].concat(t.listDescendant(r,t.isList));n.each(u.reverse(),function(n,i){t.nodeLength(i)||t.remove(i,!0)})});f=f.concat(e)}),f},r}(),hu=function(){function i(){this.bullet=new er}return i.prototype.insertTab=function(n,i){var r=t.createText(new Array(i+1).join(t.NBSP_CHAR));(n=n.deleteContents()).insertNode(r,!0);(n=e.create(r,i)).select()},i.prototype.insertParagraph=function(i){var f=e.create(i),r,u,o,s;if(f=(f=f.deleteContents()).wrapBodyInlineWithPara(),u=t.ancestor(f.sc,t.isPara),u){if(t.isEmpty(u)&&t.isLi(u))return void this.bullet.toggleList(u.parentNode.nodeName);t.isEmpty(u)&&t.isPara(u)&&t.isBlockquote(u.parentNode)?(t.insertAfter(u,u.parentNode),r=u):(r=t.splitTree(u,f.getStartPoint()),o=t.listDescendant(u,t.isEmptyAnchor),o=o.concat(t.listDescendant(r,t.isEmptyAnchor)),n.each(o,function(n,i){t.remove(i)}),(t.isHeading(r)||t.isPre(r)||t.isCustomStyleTag(r))&&t.isEmpty(r)&&(r=t.replace(r,"p")))}else s=f.sc.childNodes[f.so],r=n(t.emptyPara)[0],s?f.sc.insertBefore(r,s):f.sc.appendChild(r);e.create(r,0).normalize().select().scrollIntoView(i)},i}(),r=function(n,t,i,u){function s(n,t,i,r,u,f,o){var s={baseRow:i,baseCell:r,isRowSpan:u,isColSpan:f,isVirtual:o};e[n]||(e[n]=[]);e[n][t]=s}function h(n,t){if(!e[n]||!e[n][t])return t;for(var i=t;e[n][i];)if(i++,!e[n][i])return i}function l(n,t){var i=h(n.rowIndex,t.cellIndex),v=t.colSpan>1,y=t.rowSpan>1,p=n.rowIndex===f.rowPos&&t.cellIndex===f.colPos,e,r,o,l,u,a;if(s(n.rowIndex,i,n,t,y,v,!1),e=t.attributes.rowSpan?parseInt(t.attributes.rowSpan.value,10):0,e>1)for(r=1;r<e;r++)o=n.rowIndex+r,c(o,i,t,p),s(o,i,n,t,!0,v,!0);if(l=t.attributes.colSpan?parseInt(t.attributes.colSpan.value,10):0,l>1)for(u=1;u<l;u++)a=h(n.rowIndex,i+u),c(n.rowIndex,a,t,p),s(n.rowIndex,a,n,t,y,!0,!0)}function c(n,t,i,r){n===f.rowPos&&f.colPos>=i.cellIndex&&i.cellIndex<=t&&!r&&f.colPos++}function a(n){switch(t){case r.where.Column:if(n.isColSpan)return r.resultAction.SubtractSpanCount;break;case r.where.Row:if(!n.isVirtual&&n.isRowSpan)return r.resultAction.AddCell;if(n.isRowSpan)return r.resultAction.SubtractSpanCount}return r.resultAction.RemoveCell}function v(n){switch(t){case r.where.Column:if(n.isColSpan)return r.resultAction.SumSpanCount;if(n.isRowSpan&&n.isVirtual)return r.resultAction.Ignore;break;case r.where.Row:if(n.isRowSpan)return r.resultAction.SumSpanCount;if(n.isColSpan&&n.isVirtual)return r.resultAction.Ignore}return r.resultAction.AddCell}var f={colPos:0,rowPos:0},e=[],o=[];this.getActionList=function(){for(var n,u,b,k,d,h=t===r.where.Row?f.rowPos:-1,c=t===r.where.Column?f.colPos:-1,s=0,l=!0;l;){var y=h>=0?h:s,p=c>=0?c:s,w=e[y];if(!w||(n=w[p],!n))return l=!1,o;u=r.resultAction.Ignore;switch(i){case r.requestAction.Add:u=v(n);break;case r.requestAction.Delete:u=a(n)}o.push((b=u,k=y,d=p,{baseCell:n.baseCell,action:b,virtualTable:{rowIndex:k,cellIndex:d}}));s++}return o};n&&n.tagName&&("td"===n.tagName.toLowerCase()||"th"===n.tagName.toLowerCase())?(f.colPos=n.cellIndex,n.parentElement&&n.parentElement.tagName&&"tr"===n.parentElement.tagName.toLowerCase()?f.rowPos=n.parentElement.rowIndex:console.error("Impossible to identify start Row point.",n)):console.error("Impossible to identify start Cell point.",n),function(){for(var r,i,t=u.rows,n=0;n<t.length;n++)for(r=t[n].cells,i=0;i<r.length;i++)l(t[n],r[i])}()};r.where={Row:0,Column:1};r.requestAction={Add:0,Delete:1};r.resultAction={Ignore:0,SubtractSpanCount:1,RemoveCell:2,AddCell:3,SumSpanCount:4};var ct,cu=function(){function u(){}return u.prototype.tab=function(n,r){var u=t.ancestor(n.commonAncestor(),t.isCell),o=t.ancestor(u,t.isTable),s=t.listDescendant(o,t.isCell),f=i[r?"prev":"next"](s,u);f&&e.create(f,0).select()},u.prototype.addRow=function(i,u){for(var e,c,v,l,y,s=t.ancestor(i.commonAncestor(),t.isCell),f=n(s).closest("tr"),p=this.recoverAttributes(f),o=n("<tr"+p+"><\/tr>"),a=new r(s,r.where.Row,r.requestAction.Add,n(f).closest("table")[0]).getActionList(),h=0;h<a.length;h++){e=a[h];c=this.recoverAttributes(e.baseCell);switch(e.action){case r.resultAction.AddCell:o.append("<td"+c+">"+t.blank+"<\/td>");break;case r.resultAction.SumSpanCount:if("top"===u&&(e.baseCell.parent?e.baseCell.closest("tr").rowIndex:0)<=f[0].rowIndex){v=n("<div><\/div>").append(n("<td"+c+">"+t.blank+"<\/td>").removeAttr("rowspan")).html();o.append(v);break}l=parseInt(e.baseCell.rowSpan,10);l++;e.baseCell.setAttribute("rowSpan",l)}}if("top"===u)f.before(o);else{if(s.rowSpan>1)return y=f[0].rowIndex+(s.rowSpan-2),void n(n(f).parent().find("tr")[y]).after(n(o));f.after(o)}},u.prototype.addCol=function(i,u){var l=t.ancestor(i.commonAncestor(),t.isCell),s=n(l).closest("tr"),h,e,f,o,c;for(n(s).siblings().push(s),h=new r(l,r.where.Column,r.requestAction.Add,n(s).closest("table")[0]).getActionList(),e=0;e<h.length;e++){f=h[e];o=this.recoverAttributes(f.baseCell);switch(f.action){case r.resultAction.AddCell:"right"===u?n(f.baseCell).after("<td"+o+">"+t.blank+"<\/td>"):n(f.baseCell).before("<td"+o+">"+t.blank+"<\/td>");break;case r.resultAction.SumSpanCount:"right"===u?(c=parseInt(f.baseCell.colSpan,10),c++,f.baseCell.setAttribute("colSpan",c)):n(f.baseCell).before("<td"+o+">"+t.blank+"<\/td>")}}},u.prototype.recoverAttributes=function(n){var r="",i,t;if(!n)return r;for(i=n.attributes||[],t=0;t<i.length;t++)"id"!==i[t].name.toLowerCase()&&i[t].specified&&(r+=" "+i[t].name+"='"+i[t].value+"'");return r},u.prototype.deleteRow=function(i){for(var u,v,l=t.ancestor(i.commonAncestor(),t.isCell),s=n(l).closest("tr"),f=s.children("td, th").index(n(l)),y=s[0].rowIndex,c=new r(l,r.where.Row,r.requestAction.Delete,n(s).closest("table")[0]).getActionList(),h=0;h<c.length;h++)if(c[h]){var e=c[h].baseCell,p=c[h].virtualTable,a=e.rowSpan&&e.rowSpan>1,o=a?parseInt(e.rowSpan,10):0;switch(c[h].action){case r.resultAction.Ignore:continue;case r.resultAction.AddCell:if(u=s.next("tr")[0],!u)continue;v=s[0].cells[f];a&&(o>2?(o--,u.insertBefore(v,u.cells[f]),u.cells[f].setAttribute("rowSpan",o),u.cells[f].innerHTML=""):2===o&&(u.insertBefore(v,u.cells[f]),u.cells[f].removeAttribute("rowSpan"),u.cells[f].innerHTML=""));continue;case r.resultAction.SubtractSpanCount:a&&(o>2?(o--,e.setAttribute("rowSpan",o),p.rowIndex!==y&&e.cellIndex===f&&(e.innerHTML="")):2===o&&(e.removeAttribute("rowSpan"),p.rowIndex!==y&&e.cellIndex===f&&(e.innerHTML="")));continue;case r.resultAction.RemoveCell:continue}}s.remove()},u.prototype.deleteCol=function(i){for(var u,o,s=t.ancestor(i.commonAncestor(),t.isCell),h=n(s).closest("tr"),c=h.children("td, th").index(n(s)),e=new r(s,r.where.Column,r.requestAction.Delete,n(h).closest("table")[0]).getActionList(),f=0;f<e.length;f++)if(e[f])switch(e[f].action){case r.resultAction.Ignore:continue;case r.resultAction.SubtractSpanCount:u=e[f].baseCell;u.colSpan&&u.colSpan>1&&(o=u.colSpan?parseInt(u.colSpan,10):0,o>2?(o--,u.setAttribute("colSpan",o),u.cellIndex===c&&(u.innerHTML="")):2===o&&(u.removeAttribute("colSpan"),u.cellIndex===c&&(u.innerHTML="")));continue;case r.resultAction.RemoveCell:t.remove(e[f].baseCell,!0);continue}},u.prototype.createTable=function(i,r,u){for(var c,l,o,s,h,f=[],e=0;e<i;e++)f.push("<td>"+t.blank+"<\/td>");for(c=f.join(""),o=[],s=0;s<r;s++)o.push("<tr>"+c+"<\/tr>");return l=o.join(""),h=n("<table>"+l+"<\/table>"),u&&u.tableClassName&&h.addClass(u.tableClassName),h[0]},u.prototype.deleteTable=function(i){var r=t.ancestor(i.commonAncestor(),t.isCell);n(r).closest("table").remove()},u}(),lu=function(){function r(r){var u=this,s,h;this.context=r;this.$note=r.layoutInfo.note;this.$editor=r.layoutInfo.editor;this.$editable=r.layoutInfo.editable;this.options=r.options;this.lang=this.options.langInfo;this.editable=this.$editable[0];this.lastRange=null;this.style=new su;this.table=new cu;this.typing=new hu;this.bullet=new er;this.history=new ou(this.$editable);this.context.memo("help.undo",this.lang.help.undo);this.context.memo("help.redo",this.lang.help.redo);this.context.memo("help.tab",this.lang.help.tab);this.context.memo("help.untab",this.lang.help.untab);this.context.memo("help.insertParagraph",this.lang.help.insertParagraph);this.context.memo("help.insertOrderedList",this.lang.help.insertOrderedList);this.context.memo("help.insertUnorderedList",this.lang.help.insertUnorderedList);this.context.memo("help.indent",this.lang.help.indent);this.context.memo("help.outdent",this.lang.help.outdent);this.context.memo("help.formatPara",this.lang.help.formatPara);this.context.memo("help.insertHorizontalRule",this.lang.help.insertHorizontalRule);this.context.memo("help.fontName",this.lang.help.fontName);for(var o=["bold","italic","underline","strikethrough","superscript","subscript","justifyLeft","justifyCenter","justifyRight","justifyFull","formatBlock","removeFormat","backColor"],f=0,c=o.length;f<c;f++)this[o[f]]=(s=o[f],function(n){u.beforeCommand();document.execCommand(s,!1,n);u.afterCommand(!0)}),this.context.memo("help."+o[f],this.lang.help[o[f]]);for(this.fontName=this.wrapCommand(function(n){return u.fontStyling("font-family","'"+n+"'")}),this.fontSize=this.wrapCommand(function(n){return u.fontStyling("font-size",n+"px")}),f=1;f<=6;f++)this["formatH"+f]=(h=f,function(){u.formatBlock("H"+h)}),this.context.memo("help.formatH"+f,this.lang.help["formatH"+f]);this.insertParagraph=this.wrapCommand(function(){u.typing.insertParagraph(u.editable)});this.insertOrderedList=this.wrapCommand(function(){u.bullet.insertOrderedList(u.editable)});this.insertUnorderedList=this.wrapCommand(function(){u.bullet.insertUnorderedList(u.editable)});this.indent=this.wrapCommand(function(){u.bullet.indent(u.editable)});this.outdent=this.wrapCommand(function(){u.bullet.outdent(u.editable)});this.insertNode=this.wrapCommand(function(t){u.isLimited(n(t).text().length)||(u.createRange().insertNode(t),e.createFromNodeAfter(t).select())});this.insertText=this.wrapCommand(function(n){if(!u.isLimited(n.length)){var i=u.createRange().insertNode(t.createText(n));e.create(i,t.nodeLength(i)).select()}});this.pasteHTML=this.wrapCommand(function(n){if(!u.isLimited(n.length)){var t=u.createRange().pasteHTML(n);e.createFromNodeAfter(i.last(t)).select()}});this.formatBlock=this.wrapCommand(function(n,t){var i=u.options.callbacks.onApplyCustomStyle;i?i.call(u,t,u.context,u.onFormatBlock):u.onFormatBlock(n,t)});this.insertHorizontalRule=this.wrapCommand(function(){var n=u.createRange().insertNode(t.create("HR"));n.nextSibling&&e.create(n.nextSibling,0).normalize().select()});this.lineHeight=this.wrapCommand(function(n){u.style.stylePara(u.createRange(),{lineHeight:n})});this.createLink=this.wrapCommand(function(t){var r=t.url,c=t.text,a=t.isNewWindow,o=t.range||u.createRange(),v=o.toString()!==c,f,l,s,h;"string"==typeof r&&(r=r.trim());r=u.options.onCreateLink?u.options.onCreateLink(r):/^[A-Za-z][A-Za-z0-9+-.]*\:[\/\/]?/.test(r)?r:"http://"+r;f=[];v?(l=(o=o.deleteContents()).insertNode(n("<A>"+c+"<\/A>")[0]),f.push(l)):f=u.style.styleNodes(o,{nodeName:"A",expandClosestSibling:!0,onlyPartialContains:!0});n.each(f,function(t,i){n(i).attr("href",r);a?n(i).attr("target","_blank"):n(i).removeAttr("target")});s=e.createFromNodeBefore(i.head(f)).getStartPoint();h=e.createFromNodeAfter(i.last(f)).getEndPoint();e.create(s.node,s.offset,h.node,h.offset).select()});this.color=this.wrapCommand(function(n){var t=n.foreColor,i=n.backColor;t&&document.execCommand("foreColor",!1,t);i&&document.execCommand("backColor",!1,i)});this.foreColor=this.wrapCommand(function(n){document.execCommand("styleWithCSS",!1,!0);document.execCommand("foreColor",!1,n)});this.insertTable=this.wrapCommand(function(n){var t=n.split("x");u.createRange().deleteContents().insertNode(u.table.createTable(t[0],t[1],u.options))});this.removeMedia=this.wrapCommand(function(){var t=n(u.restoreTarget()).parent();t.parent("figure").length?t.parent("figure").remove():t=n(u.restoreTarget()).detach();u.context.triggerEvent("media.delete",t,u.$editable)});this.floatMe=this.wrapCommand(function(t){var i=n(u.restoreTarget());i.toggleClass("note-float-left","left"===t);i.toggleClass("note-float-right","right"===t);i.css("float",t)});this.resize=this.wrapCommand(function(t){n(u.restoreTarget()).css({width:100*t+"%",height:""})})}return r.prototype.initialize=function(){var n=this;this.$editable.on("keydown",function(t){if(t.keyCode===o.code.ENTER&&n.context.triggerEvent("enter",t),n.context.triggerEvent("keydown",t),t.isDefaultPrevented()||(n.options.shortcuts?n.handleKeyMap(t):n.preventDefaultEditableShortCuts(t)),n.isLimited(1,t))return!1}).on("keyup",function(t){n.context.triggerEvent("keyup",t)}).on("focus",function(t){n.context.triggerEvent("focus",t)}).on("blur",function(t){n.context.triggerEvent("blur",t)}).on("mousedown",function(t){n.context.triggerEvent("mousedown",t)}).on("mouseup",function(t){n.context.triggerEvent("mouseup",t)}).on("scroll",function(t){n.context.triggerEvent("scroll",t)}).on("paste",function(t){n.context.triggerEvent("paste",t)});this.$editable.html(t.html(this.$note)||t.emptyPara);this.$editable.on(f.inputEventName,u.debounce(function(){n.context.triggerEvent("change",n.$editable.html())},100));this.$editor.on("focusin",function(t){n.context.triggerEvent("focusin",t)}).on("focusout",function(t){n.context.triggerEvent("focusout",t)});this.options.airMode||(this.options.width&&this.$editor.outerWidth(this.options.width),this.options.height&&this.$editable.outerHeight(this.options.height),this.options.maxHeight&&this.$editable.css("max-height",this.options.maxHeight),this.options.minHeight&&this.$editable.css("min-height",this.options.minHeight));this.history.recordUndo()},r.prototype.destroy=function(){this.$editable.off()},r.prototype.handleKeyMap=function(n){var u=this.options.keyMap[f.isMac?"mac":"pc"],t=[],i,r;n.metaKey&&t.push("CMD");n.ctrlKey&&!n.altKey&&t.push("CTRL");n.shiftKey&&t.push("SHIFT");i=o.nameFromCode[n.keyCode];i&&t.push(i);r=u[t.join("+")];r?!1!==this.context.invoke(r)&&n.preventDefault():o.isEdit(n.keyCode)&&this.afterCommand()},r.prototype.preventDefaultEditableShortCuts=function(n){(n.ctrlKey||n.metaKey)&&i.contains([66,73,85],n.keyCode)&&n.preventDefault()},r.prototype.isLimited=function(n,t){return n=n||0,(void 0===t||!(o.isMove(t.keyCode)||t.ctrlKey||t.metaKey||i.contains([o.code.BACKSPACE,o.code.DELETE],t.keyCode)))&&this.options.maxTextLength>0&&this.$editable.text().length+n>=this.options.maxTextLength},r.prototype.createRange=function(){return this.focus(),e.create(this.editable)},r.prototype.saveRange=function(n){this.lastRange=this.createRange();n&&this.lastRange.collapse().select()},r.prototype.restoreRange=function(){this.lastRange&&(this.lastRange.select(),this.focus())},r.prototype.saveTarget=function(n){this.$editable.data("target",n)},r.prototype.clearTarget=function(){this.$editable.removeData("target")},r.prototype.restoreTarget=function(){return this.$editable.data("target")},r.prototype.currentStyle=function(){var n=e.create();return n&&(n=n.normalize()),n?this.style.current(n):this.style.fromNode(this.$editable)},r.prototype.styleFromNode=function(n){return this.style.fromNode(n)},r.prototype.undo=function(){this.context.triggerEvent("before.command",this.$editable.html());this.history.undo();this.context.triggerEvent("change",this.$editable.html())},r.prototype.redo=function(){this.context.triggerEvent("before.command",this.$editable.html());this.history.redo();this.context.triggerEvent("change",this.$editable.html())},r.prototype.beforeCommand=function(){this.context.triggerEvent("before.command",this.$editable.html());this.focus()},r.prototype.afterCommand=function(n){this.history.recordUndo();n||this.context.triggerEvent("change",this.$editable.html())},r.prototype.tab=function(){var n=this.createRange();if(n.isCollapsed()&&n.isOnCell())this.table.tab(n);else{if(0===this.options.tabSize)return!1;this.isLimited(this.options.tabSize)||(this.beforeCommand(),this.typing.insertTab(n,this.options.tabSize),this.afterCommand())}},r.prototype.untab=function(){var n=this.createRange();if(n.isCollapsed()&&n.isOnCell())this.table.tab(n,!0);else if(0===this.options.tabSize)return!1},r.prototype.wrapCommand=function(n){var t=this;return function(){t.beforeCommand();n.apply(t,arguments);t.afterCommand()}},r.prototype.insertImage=function(t,i){var r=this,u;return(u=t,n.Deferred(function(t){var i=n("<img>");i.one("load",function(){i.off("error abort");t.resolve(i)}).one("error abort",function(){i.off("load").detach();t.reject(i)}).css({display:"none"}).appendTo(document.body).attr("src",u)}).promise()).then(function(n){r.beforeCommand();"function"==typeof i?i(n):("string"==typeof i&&n.attr("data-filename",i),n.css("width",Math.min(r.$editable.width(),n.width())));n.show();e.create(r.editable).insertNode(n[0]);e.createFromNodeAfter(n[0]).select();r.afterCommand()}).fail(function(n){r.context.triggerEvent("image.upload.error",n)})},r.prototype.insertImages=function(t){var i=this;n.each(t,function(t,r){var f=r.name,u;i.options.maximumImageFileSize&&i.options.maximumImageFileSize<r.size?i.context.triggerEvent("image.upload.error",i.lang.image.maximumFileSizeError):(u=r,n.Deferred(function(t){n.extend(new FileReader,{onload:function(n){var i=n.target.result;t.resolve(i)},onerror:function(n){t.reject(n)}}).readAsDataURL(u)}).promise()).then(function(n){return i.insertImage(n,f)}).fail(function(){i.context.triggerEvent("image.upload.error")})})},r.prototype.insertImagesOrCallback=function(n){this.options.callbacks.onImageUpload?this.context.triggerEvent("image.upload",n):this.insertImages(n)},r.prototype.getSelectedText=function(){var n=this.createRange();return n.isOnAnchor()&&(n=e.createFromNode(t.ancestor(n.sc,t.isAnchor))),n.toString()},r.prototype.onFormatBlock=function(t,i){var r,u;(t=f.isMSIE?"<"+t+">":t,document.execCommand("FormatBlock",!1,t),i&&i.length)&&(r=i[0].className||"",r&&(u=this.createRange(),n([u.sc,u.ec]).closest(t).addClass(r)))},r.prototype.formatPara=function(){this.formatBlock("P")},r.prototype.fontStyling=function(r,u){var o=this.createRange(),s,f;o&&(s=this.style.styleNodes(o),(n(s).css(r,u),o.isCollapsed())&&(f=i.head(s),f&&!t.nodeLength(f)&&(f.innerHTML=t.ZERO_WIDTH_NBSP_CHAR,e.createFromNodeAfter(f.firstChild).select(),this.$editable.data("bogus",f))))},r.prototype.unlink=function(){var n=this.createRange(),i;n.isOnAnchor()&&(i=t.ancestor(n.sc,t.isAnchor),(n=e.createFromNode(i)).select(),this.beforeCommand(),document.execCommand("unlink"),this.afterCommand())},r.prototype.getLinkInfo=function(){var u=this.createRange().expand(t.isAnchor),r=n(i.head(u.nodes(t.isAnchor))),f={range:u,text:u.toString(),url:r.length?r.attr("href"):""};return r.length&&(f.isNewWindow="_blank"===r.attr("target")),f},r.prototype.addRow=function(n){var t=this.createRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.addRow(t,n),this.afterCommand())},r.prototype.addCol=function(n){var t=this.createRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.addCol(t,n),this.afterCommand())},r.prototype.deleteRow=function(){var n=this.createRange(this.$editable);n.isCollapsed()&&n.isOnCell()&&(this.beforeCommand(),this.table.deleteRow(n),this.afterCommand())},r.prototype.deleteCol=function(){var n=this.createRange(this.$editable);n.isCollapsed()&&n.isOnCell()&&(this.beforeCommand(),this.table.deleteCol(n),this.afterCommand())},r.prototype.deleteTable=function(){var n=this.createRange(this.$editable);n.isCollapsed()&&n.isOnCell()&&(this.beforeCommand(),this.table.deleteTable(n),this.afterCommand())},r.prototype.resizeTo=function(n,t,i){var u,f,r;i?(f=n.y/n.x,r=t.data("ratio"),u={width:r>f?n.x:n.y/r,height:r>f?n.x*r:n.y}):u={width:n.x,height:n.y};t.css(u)},r.prototype.hasFocus=function(){return this.$editable.is(":focus")},r.prototype.focus=function(){this.hasFocus()||this.$editable.focus()},r.prototype.isEmpty=function(){return t.isEmpty(this.$editable[0])||t.emptyPara===this.$editable.html()},r.prototype.empty=function(){this.context.invoke("code",t.emptyPara)},r}(),au=function(){function n(n){this.context=n;this.$editable=n.layoutInfo.editable}return n.prototype.initialize=function(){this.$editable.on("paste",this.pasteByEvent.bind(this))},n.prototype.pasteByEvent=function(n){var t=n.originalEvent.clipboardData,r;t&&t.items&&t.items.length&&(r=i.head(t.items),"file"===r.kind&&-1!==r.type.indexOf("image/")&&this.context.invoke("editor.insertImagesOrCallback",[r.getAsFile()]),this.context.invoke("editor.afterCommand"))},n}(),vu=function(){function t(t){this.context=t;this.$eventListener=n(document);this.$editor=t.layoutInfo.editor;this.$editable=t.layoutInfo.editable;this.options=t.options;this.lang=this.options.langInfo;this.documentEventHandlers={};this.$dropzone=n('<div class="note-dropzone">  <div class="note-dropzone-message"/><\/div>').prependTo(this.$editor)}return t.prototype.initialize=function(){this.options.disableDragAndDrop?(this.documentEventHandlers.onDrop=function(n){n.preventDefault()},this.$eventListener=this.$dropzone,this.$eventListener.on("drop",this.documentEventHandlers.onDrop)):this.attachDragAndDropEvent()},t.prototype.attachDragAndDropEvent=function(){var t=this,i=n(),r=this.$dropzone.find(".note-dropzone-message");this.documentEventHandlers.onDragenter=function(n){var u=t.context.invoke("codeview.isActivated"),f=t.$editor.width()>0&&t.$editor.height()>0;u||i.length||!f||(t.$editor.addClass("dragover"),t.$dropzone.width(t.$editor.width()),t.$dropzone.height(t.$editor.height()),r.text(t.lang.image.dragImageHere));i=i.add(n.target)};this.documentEventHandlers.onDragleave=function(n){(i=i.not(n.target)).length||t.$editor.removeClass("dragover")};this.documentEventHandlers.onDrop=function(){i=n();t.$editor.removeClass("dragover")};this.$eventListener.on("dragenter",this.documentEventHandlers.onDragenter).on("dragleave",this.documentEventHandlers.onDragleave).on("drop",this.documentEventHandlers.onDrop);this.$dropzone.on("dragenter",function(){t.$dropzone.addClass("hover");r.text(t.lang.image.dropImage)}).on("dragleave",function(){t.$dropzone.removeClass("hover");r.text(t.lang.image.dragImageHere)});this.$dropzone.on("drop",function(i){var r=i.originalEvent.dataTransfer;i.preventDefault();r&&r.files&&r.files.length?(t.$editable.focus(),t.context.invoke("editor.insertImagesOrCallback",r.files)):n.each(r.types,function(i,u){var f=r.getData(u);u.toLowerCase().indexOf("text")>-1?t.context.invoke("editor.pasteHTML",f):n(f).each(function(n,i){t.context.invoke("editor.insertNode",i)})})}).on("dragover",!1)},t.prototype.destroy=function(){var n=this;Object.keys(this.documentEventHandlers).forEach(function(t){n.$eventListener.off(t.substr(2).toLowerCase(),n.documentEventHandlers[t])});this.documentEventHandlers={}},t}();f.hasCodeMirror&&(f.isSupportAmd?require(["codemirror"],function(n){ct=n}):ct=window.CodeMirror);var yu=function(){function n(n){this.context=n;this.$editor=n.layoutInfo.editor;this.$editable=n.layoutInfo.editable;this.$codable=n.layoutInfo.codable;this.options=n.options}return n.prototype.sync=function(){this.isActivated()&&f.hasCodeMirror&&this.$codable.data("cmEditor").save()},n.prototype.isActivated=function(){return this.$editor.hasClass("codeview")},n.prototype.toggle=function(){this.isActivated()?this.deactivate():this.activate();this.context.triggerEvent("codeview.toggled")},n.prototype.activate=function(){var i=this,n,r;if(this.$codable.val(t.html(this.$editable,this.options.prettifyHtml)),this.$codable.height(this.$editable.height()),this.context.invoke("toolbar.updateCodeview",!0),this.$editor.addClass("codeview"),this.$codable.focus(),f.hasCodeMirror)n=ct.fromTextArea(this.$codable[0],this.options.codemirror),this.options.codemirror.tern&&(r=new ct.TernServer(this.options.codemirror.tern),n.ternServer=r,n.on("cursorActivity",function(n){r.updateArgHints(n)})),n.on("blur",function(t){i.context.triggerEvent("blur.codeview",n.getValue(),t)}),n.setSize(null,this.$editable.outerHeight()),this.$codable.data("cmEditor",n);else this.$codable.on("blur",function(n){i.context.triggerEvent("blur.codeview",i.$codable.val(),n)})},n.prototype.deactivate=function(){var n,i,r;f.hasCodeMirror&&(n=this.$codable.data("cmEditor"),this.$codable.val(n.getValue()),n.toTextArea());i=t.value(this.$codable,this.options.prettifyHtml)||t.emptyPara;r=this.$editable.html()!==i;this.$editable.html(i);this.$editable.height(this.options.height?this.$codable.height():"auto");this.$editor.removeClass("codeview");r&&this.context.triggerEvent("change",this.$editable.html(),this.$editable);this.$editable.focus();this.context.invoke("toolbar.updateCodeview",!1)},n.prototype.destroy=function(){this.isActivated()&&this.deactivate()},n}(),pu=function(){function t(t){this.$document=n(document);this.$statusbar=t.layoutInfo.statusbar;this.$editable=t.layoutInfo.editable;this.options=t.options}return t.prototype.initialize=function(){var n=this;this.options.airMode||this.options.disableResizeEditor?this.destroy():this.$statusbar.on("mousedown",function(t){t.preventDefault();t.stopPropagation();var r=n.$editable.offset().top-n.$document.scrollTop(),i=function(t){var i=t.clientY-(r+24);i=n.options.minheight>0?Math.max(i,n.options.minheight):i;i=n.options.maxHeight>0?Math.min(i,n.options.maxHeight):i;n.$editable.height(i)};n.$document.on("mousemove",i).one("mouseup",function(){n.$document.off("mousemove",i)})})},t.prototype.destroy=function(){this.$statusbar.off()},t}(),wu=function(){function t(t){var i=this;this.context=t;this.$editor=t.layoutInfo.editor;this.$toolbar=t.layoutInfo.toolbar;this.$editable=t.layoutInfo.editable;this.$codable=t.layoutInfo.codable;this.$window=n(window);this.$scrollbar=n("html, body");this.onResize=function(){i.resizeTo({h:i.$window.height()-i.$toolbar.outerHeight()})}}return t.prototype.resizeTo=function(n){this.$editable.css("height",n.h);this.$codable.css("height",n.h);this.$codable.data("cmeditor")&&this.$codable.data("cmeditor").setsize(null,n.h)},t.prototype.toggle=function(){this.$editor.toggleClass("fullscreen");this.isFullscreen()?(this.$editable.data("orgHeight",this.$editable.css("height")),this.$window.on("resize",this.onResize).trigger("resize"),this.$scrollbar.css("overflow","hidden")):(this.$window.off("resize",this.onResize),this.resizeTo({h:this.$editable.data("orgHeight")}),this.$scrollbar.css("overflow","visible"));this.context.invoke("toolbar.updateFullscreen",this.isFullscreen())},t.prototype.isFullscreen=function(){return this.$editor.hasClass("fullscreen")},t}(),bu=function(){function i(t){var i=this;this.context=t;this.$document=n(document);this.$editingArea=t.layoutInfo.editingArea;this.options=t.options;this.lang=this.options.langInfo;this.events={"summernote.mousedown":function(n,t){i.update(t.target)&&t.preventDefault()},"summernote.keyup summernote.scroll summernote.change summernote.dialog.shown":function(){i.update()},"summernote.disable":function(){i.hide()},"summernote.codeview.toggled":function(){i.update()}}}return i.prototype.initialize=function(){var i=this;this.$handle=n(['<div class="note-handle">','<div class="note-control-selection">','<div class="note-control-selection-bg"><\/div>','<div class="note-control-holder note-control-nw"><\/div>','<div class="note-control-holder note-control-ne"><\/div>','<div class="note-control-holder note-control-sw"><\/div>','<div class="',this.options.disableResizeImage?"note-control-holder":"note-control-sizing",' note-control-se"><\/div>',this.options.disableResizeImage?"":'<div class="note-control-selection-info"><\/div>',"<\/div>","<\/div>"].join("")).prependTo(this.$editingArea);this.$handle.on("mousedown",function(n){if(t.isControlSizing(n.target)){n.preventDefault();n.stopPropagation();var r=i.$handle.find(".note-control-selection").data("target"),u=r.offset(),e=i.$document.scrollTop(),f=function(n){i.context.invoke("editor.resizeTo",{x:n.clientX-u.left,y:n.clientY-(u.top-e)},r,!n.shiftKey);i.update(r[0])};i.$document.on("mousemove",f).one("mouseup",function(n){n.preventDefault();i.$document.off("mousemove",f);i.context.invoke("editor.afterCommand")});r.data("ratio")||r.data("ratio",r.height()/r.width())}});this.$handle.on("wheel",function(n){n.preventDefault();i.update()})},i.prototype.destroy=function(){this.$handle.remove()},i.prototype.update=function(i){var e,o,f,c;if(this.context.isDisabled())return!1;if(e=t.isImg(i),o=this.$handle.find(".note-control-selection"),this.context.invoke("imagePopover.update",i),e){var r=n(i),s=r.position(),h={left:s.left+parseInt(r.css("marginLeft"),10),top:s.top+parseInt(r.css("marginTop"),10)},u={w:r.outerWidth(!1),h:r.outerHeight(!1)};o.css({display:"block",left:h.left,top:h.top,width:u.w,height:u.h}).data("target",r);f=new Image;f.src=r.attr("src");c=u.w+"x"+u.h+" ("+this.lang.image.original+": "+f.width+"x"+f.height+")";o.find(".note-control-selection-info").text(c);this.context.invoke("editor.saveTarget",i)}else this.hide();return e},i.prototype.hide=function(){this.context.invoke("editor.clearTarget");this.$handle.children().hide()},i}(),ku=/^([A-Za-z][A-Za-z0-9+-.]*\:[\/\/]?|mailto:[A-Z0-9._%+-]+@)?(www\.)?(.+)$/i,du=function(){function t(n){var t=this;this.context=n;this.events={"summernote.keyup":function(n,i){i.isDefaultPrevented()||t.handleKeyup(i)},"summernote.keydown":function(n,i){t.handleKeydown(i)}}}return t.prototype.initialize=function(){this.lastWordRange=null},t.prototype.destroy=function(){this.lastWordRange=null},t.prototype.replace=function(){var t,i,r,u;this.lastWordRange&&(t=this.lastWordRange.toString(),i=t.match(ku),i&&(i[1]||i[2])&&(r=i[1]?t:"http://"+t,u=n("<a />").html(t).attr("href",r)[0],this.lastWordRange.insertNode(u),this.lastWordRange=null,this.context.invoke("editor.focus")))},t.prototype.handleKeydown=function(n){if(i.contains([o.code.ENTER,o.code.SPACE],n.keyCode)){var t=this.context.invoke("editor.createRange").getWordRange();this.lastWordRange=t}},t.prototype.handleKeyup=function(n){i.contains([o.code.ENTER,o.code.SPACE],n.keyCode)&&this.replace()},t}(),gu=function(){function n(n){var t=this;this.$note=n.layoutInfo.note;this.events={"summernote.change":function(){t.$note.val(n.invoke("code"))}}}return n.prototype.shouldInitialize=function(){return t.isTextarea(this.$note[0])},n}(),nf=function(){function t(n){var t=this;this.context=n;this.$editingArea=n.layoutInfo.editingArea;this.options=n.options;this.events={"summernote.init summernote.change":function(){t.update()},"summernote.codeview.toggled":function(){t.update()}}}return t.prototype.shouldInitialize=function(){return!!this.options.placeholder},t.prototype.initialize=function(){var t=this;this.$placeholder=n('<div class="note-placeholder">');this.$placeholder.on("click",function(){t.context.invoke("focus")}).text(this.options.placeholder).prependTo(this.$editingArea);this.update()},t.prototype.destroy=function(){this.$placeholder.remove()},t.prototype.update=function(){var n=!this.context.invoke("codeview.isActivated")&&this.context.invoke("editor.isEmpty");this.$placeholder.toggle(n)},t}(),tf=function(){function t(t){this.ui=n.summernote.ui;this.context=t;this.$toolbar=t.layoutInfo.toolbar;this.options=t.options;this.lang=this.options.langInfo;this.invertedKeyMap=u.invertObject(this.options.keyMap[f.isMac?"mac":"pc"])}return t.prototype.representShortcut=function(n){var t=this.invertedKeyMap[n];return this.options.shortcuts&&t?(f.isMac&&(t=t.replace("CMD","⌘").replace("SHIFT","⇧"))," ("+(t=t.replace("BACKSLASH","\\").replace("SLASH","/").replace("LEFTBRACKET","[").replace("RIGHTBRACKET","]"))+")"):""},t.prototype.button=function(n){return!this.options.tooltip&&n.tooltip&&delete n.tooltip,n.container=this.options.container,this.ui.button(n)},t.prototype.initialize=function(){this.addToolbarButtons();this.addImagePopoverButtons();this.addLinkPopoverButtons();this.addTablePopoverButtons();this.fontInstalledMap={}},t.prototype.destroy=function(){delete this.fontInstalledMap},t.prototype.isFontInstalled=function(n){return this.fontInstalledMap.hasOwnProperty(n)||(this.fontInstalledMap[n]=f.isFontInstalled(n)||i.contains(this.options.fontNamesIgnoreCheck,n)),this.fontInstalledMap[n]},t.prototype.isFontDeservedToAdd=function(t){return""!==(t=t.toLowerCase())&&this.isFontInstalled(t)&&-1===n.inArray(t,["sans-serif","serif","monospace","cursive","fantasy"])},t.prototype.addToolbarButtons=function(){var t=this;this.context.memo("button.style",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.magic),t.options),tooltip:t.lang.style.style,data:{toggle:"dropdown"}}),t.ui.dropdown({className:"dropdown-style",items:t.options.styleTags,template:function(n){"string"==typeof n&&(n={tag:n,title:t.lang.style.hasOwnProperty(n)?t.lang.style[n]:n});var i=n.tag,r=n.title;return"<"+i+(n.style?' style="'+n.style+'" ':"")+(n.className?' class="'+n.className+'"':"")+">"+r+"<\/"+i+">"},click:t.context.createInvokeHandler("editor.formatBlock")})]).render()});for(var l=function(n){var i=r.options.styleTags[n];r.context.memo("button.style."+i,function(){return t.button({className:"note-btn-style-"+i,contents:'<div data-value="'+i+'">'+i.toUpperCase()+"<\/div>",tooltip:i.toUpperCase(),click:t.context.createInvokeHandler("editor.formatBlock")}).render()})},r=this,i=0,a=this.options.styleTags.length;i<a;i++)l(i);this.context.memo("button.bold",function(){return t.button({className:"note-btn-bold",contents:t.ui.icon(t.options.icons.bold),tooltip:t.lang.font.bold+t.representShortcut("bold"),click:t.context.createInvokeHandlerAndUpdateState("editor.bold")}).render()});this.context.memo("button.italic",function(){return t.button({className:"note-btn-italic",contents:t.ui.icon(t.options.icons.italic),tooltip:t.lang.font.italic+t.representShortcut("italic"),click:t.context.createInvokeHandlerAndUpdateState("editor.italic")}).render()});this.context.memo("button.underline",function(){return t.button({className:"note-btn-underline",contents:t.ui.icon(t.options.icons.underline),tooltip:t.lang.font.underline+t.representShortcut("underline"),click:t.context.createInvokeHandlerAndUpdateState("editor.underline")}).render()});this.context.memo("button.clear",function(){return t.button({contents:t.ui.icon(t.options.icons.eraser),tooltip:t.lang.font.clear+t.representShortcut("removeFormat"),click:t.context.createInvokeHandler("editor.removeFormat")}).render()});this.context.memo("button.strikethrough",function(){return t.button({className:"note-btn-strikethrough",contents:t.ui.icon(t.options.icons.strikethrough),tooltip:t.lang.font.strikethrough+t.representShortcut("strikethrough"),click:t.context.createInvokeHandlerAndUpdateState("editor.strikethrough")}).render()});this.context.memo("button.superscript",function(){return t.button({className:"note-btn-superscript",contents:t.ui.icon(t.options.icons.superscript),tooltip:t.lang.font.superscript,click:t.context.createInvokeHandlerAndUpdateState("editor.superscript")}).render()});this.context.memo("button.subscript",function(){return t.button({className:"note-btn-subscript",contents:t.ui.icon(t.options.icons.subscript),tooltip:t.lang.font.subscript,click:t.context.createInvokeHandlerAndUpdateState("editor.subscript")}).render()});this.context.memo("button.fontname",function(){var i=t.context.invoke("editor.currentStyle");return n.each(i["font-family"].split(","),function(i,r){r=r.trim().replace(/['"]+/g,"");t.isFontDeservedToAdd(r)&&-1===n.inArray(r,t.options.fontNames)&&t.options.fontNames.push(r)}),t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents('<span class="note-current-fontname"/>',t.options),tooltip:t.lang.font.name,data:{toggle:"dropdown"}}),t.ui.dropdownCheck({className:"dropdown-fontname",checkClassName:t.options.icons.menuCheck,items:t.options.fontNames.filter(t.isFontInstalled.bind(t)),template:function(n){return"<span style=\"font-family: '"+n+"'\">"+n+"<\/span>"},click:t.context.createInvokeHandlerAndUpdateState("editor.fontName")})]).render()});this.context.memo("button.fontsize",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents('<span class="note-current-fontsize"/>',t.options),tooltip:t.lang.font.size,data:{toggle:"dropdown"}}),t.ui.dropdownCheck({className:"dropdown-fontsize",checkClassName:t.options.icons.menuCheck,items:t.options.fontSizes,click:t.context.createInvokeHandlerAndUpdateState("editor.fontSize")})]).render()});this.context.memo("button.color",function(){return t.ui.buttonGroup({className:"note-color",children:[t.button({className:"note-current-color-button",contents:t.ui.icon(t.options.icons.font+" note-recent-color"),tooltip:t.lang.color.recent,click:function(i){var r=n(i.currentTarget);t.context.invoke("editor.color",{backColor:r.attr("data-backColor"),foreColor:r.attr("data-foreColor")})},callback:function(n){n.find(".note-recent-color").css("background-color","#FFFF00");n.attr("data-backColor","#FFFF00")}}),t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents("",t.options),tooltip:t.lang.color.more,data:{toggle:"dropdown"}}),t.ui.dropdown({items:['<div class="note-palette">','  <div class="note-palette-title">'+t.lang.color.background+"<\/div>","  <div>",'    <button type="button" class="note-color-reset btn btn-light" data-event="backColor" data-value="inherit">',t.lang.color.transparent,"    <\/button>","  <\/div>",'  <div class="note-holder" data-event="backColor"/>',"<\/div>",'<div class="note-palette">','  <div class="note-palette-title">'+t.lang.color.foreground+"<\/div>","  <div>",'    <button type="button" class="note-color-reset btn btn-light" data-event="removeFormat" data-value="foreColor">',t.lang.color.resetToDefault,"    <\/button>","  <\/div>",'  <div class="note-holder" data-event="foreColor"/>',"<\/div>"].join(""),callback:function(i){i.find(".note-holder").each(function(i,r){var u=n(r);u.append(t.ui.palette({colors:t.options.colors,eventName:u.data("event"),container:t.options.container,tooltip:t.options.tooltip}).render())})},click:function(i){var r=n(i.target),u=r.data("event"),f=r.data("value");if(u&&f){var e="backColor"===u?"background-color":"color",o=r.closest(".note-color").find(".note-recent-color"),s=r.closest(".note-color").find(".note-current-color-button");o.css(e,f);s.attr("data-"+u,f);t.context.invoke("editor."+u,f)}}})]}).render()});this.context.memo("button.ul",function(){return t.button({contents:t.ui.icon(t.options.icons.unorderedlist),tooltip:t.lang.lists.unordered+t.representShortcut("insertUnorderedList"),click:t.context.createInvokeHandler("editor.insertUnorderedList")}).render()});this.context.memo("button.ol",function(){return t.button({contents:t.ui.icon(t.options.icons.orderedlist),tooltip:t.lang.lists.ordered+t.representShortcut("insertOrderedList"),click:t.context.createInvokeHandler("editor.insertOrderedList")}).render()});var f=this.button({contents:this.ui.icon(this.options.icons.alignLeft),tooltip:this.lang.paragraph.left+this.representShortcut("justifyLeft"),click:this.context.createInvokeHandler("editor.justifyLeft")}),e=this.button({contents:this.ui.icon(this.options.icons.alignCenter),tooltip:this.lang.paragraph.center+this.representShortcut("justifyCenter"),click:this.context.createInvokeHandler("editor.justifyCenter")}),o=this.button({contents:this.ui.icon(this.options.icons.alignRight),tooltip:this.lang.paragraph.right+this.representShortcut("justifyRight"),click:this.context.createInvokeHandler("editor.justifyRight")}),s=this.button({contents:this.ui.icon(this.options.icons.alignJustify),tooltip:this.lang.paragraph.justify+this.representShortcut("justifyFull"),click:this.context.createInvokeHandler("editor.justifyFull")}),h=this.button({contents:this.ui.icon(this.options.icons.outdent),tooltip:this.lang.paragraph.outdent+this.representShortcut("outdent"),click:this.context.createInvokeHandler("editor.outdent")}),c=this.button({contents:this.ui.icon(this.options.icons.indent),tooltip:this.lang.paragraph.indent+this.representShortcut("indent"),click:this.context.createInvokeHandler("editor.indent")});this.context.memo("button.justifyLeft",u.invoke(f,"render"));this.context.memo("button.justifyCenter",u.invoke(e,"render"));this.context.memo("button.justifyRight",u.invoke(o,"render"));this.context.memo("button.justifyFull",u.invoke(s,"render"));this.context.memo("button.outdent",u.invoke(h,"render"));this.context.memo("button.indent",u.invoke(c,"render"));this.context.memo("button.paragraph",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.alignLeft),t.options),tooltip:t.lang.paragraph.paragraph,data:{toggle:"dropdown"}}),t.ui.dropdown([t.ui.buttonGroup({className:"note-align",children:[f,e,o,s]}),t.ui.buttonGroup({className:"note-list",children:[h,c]})])]).render()});this.context.memo("button.height",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.textHeight),t.options),tooltip:t.lang.font.height,data:{toggle:"dropdown"}}),t.ui.dropdownCheck({items:t.options.lineHeights,checkClassName:t.options.icons.menuCheck,className:"dropdown-line-height",click:t.context.createInvokeHandler("editor.lineHeight")})]).render()});this.context.memo("button.table",function(){return t.ui.buttonGroup([t.button({className:"dropdown-toggle",contents:t.ui.dropdownButtonContents(t.ui.icon(t.options.icons.table),t.options),tooltip:t.lang.table.table,data:{toggle:"dropdown"}}),t.ui.dropdown({className:"note-table",items:'<div class="note-dimension-picker">  <div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"/>  <div class="note-dimension-picker-highlighted"/>  <div class="note-dimension-picker-unhighlighted"/><\/div><div class="note-dimension-display">1 x 1<\/div>'})],{callback:function(n){n.find(".note-dimension-picker-mousecatcher").css({width:t.options.insertTableMaxSize.col+"em",height:t.options.insertTableMaxSize.row+"em"}).mousedown(t.context.createInvokeHandler("editor.insertTable")).on("mousemove",t.tableMoveHandler.bind(t))}}).render()});this.context.memo("button.link",function(){return t.button({contents:t.ui.icon(t.options.icons.link),tooltip:t.lang.link.link+t.representShortcut("linkDialog.show"),click:t.context.createInvokeHandler("linkDialog.show")}).render()});this.context.memo("button.picture",function(){return t.button({contents:t.ui.icon(t.options.icons.picture),tooltip:t.lang.image.image,click:t.context.createInvokeHandler("imageDialog.show")}).render()});this.context.memo("button.video",function(){return t.button({contents:t.ui.icon(t.options.icons.video),tooltip:t.lang.video.video,click:t.context.createInvokeHandler("videoDialog.show")}).render()});this.context.memo("button.hr",function(){return t.button({contents:t.ui.icon(t.options.icons.minus),tooltip:t.lang.hr.insert+t.representShortcut("insertHorizontalRule"),click:t.context.createInvokeHandler("editor.insertHorizontalRule")}).render()});this.context.memo("button.fullscreen",function(){return t.button({className:"btn-fullscreen",contents:t.ui.icon(t.options.icons.arrowsAlt),tooltip:t.options.fullscreen,click:t.context.createInvokeHandler("fullscreen.toggle")}).render()});this.context.memo("button.codeview",function(){return t.button({className:"btn-codeview",contents:t.ui.icon(t.options.icons.code),tooltip:t.options.codeview,click:t.context.createInvokeHandler("codeview.toggle")}).render()});this.context.memo("button.redo",function(){return t.button({contents:t.ui.icon(t.options.icons.redo),tooltip:t.lang.history.redo+t.representShortcut("redo"),click:t.context.createInvokeHandler("editor.redo")}).render()});this.context.memo("button.undo",function(){return t.button({contents:t.ui.icon(t.options.icons.undo),tooltip:t.lang.history.undo+t.representShortcut("undo"),click:t.context.createInvokeHandler("editor.undo")}).render()});this.context.memo("button.help",function(){return t.button({contents:t.ui.icon(t.options.icons.question),tooltip:t.options.help,click:t.context.createInvokeHandler("helpDialog.show")}).render()})},t.prototype.addImagePopoverButtons=function(){var n=this;this.context.memo("button.imageSize100",function(){return n.button({contents:'<span class="note-fontsize-10">100%<\/span>',tooltip:n.lang.image.resizeFull,click:n.context.createInvokeHandler("editor.resize","1")}).render()});this.context.memo("button.imageSize50",function(){return n.button({contents:'<span class="note-fontsize-10">50%<\/span>',tooltip:n.lang.image.resizeHalf,click:n.context.createInvokeHandler("editor.resize","0.5")}).render()});this.context.memo("button.imageSize25",function(){return n.button({contents:'<span class="note-fontsize-10">25%<\/span>',tooltip:n.lang.image.resizeQuarter,click:n.context.createInvokeHandler("editor.resize","0.25")}).render()});this.context.memo("button.floatLeft",function(){return n.button({contents:n.ui.icon(n.options.icons.alignLeft),tooltip:n.lang.image.floatLeft,click:n.context.createInvokeHandler("editor.floatMe","left")}).render()});this.context.memo("button.floatRight",function(){return n.button({contents:n.ui.icon(n.options.icons.alignRight),tooltip:n.lang.image.floatRight,click:n.context.createInvokeHandler("editor.floatMe","right")}).render()});this.context.memo("button.floatNone",function(){return n.button({contents:n.ui.icon(n.options.icons.alignJustify),tooltip:n.lang.image.floatNone,click:n.context.createInvokeHandler("editor.floatMe","none")}).render()});this.context.memo("button.removeMedia",function(){return n.button({contents:n.ui.icon(n.options.icons.trash),tooltip:n.lang.image.remove,click:n.context.createInvokeHandler("editor.removeMedia")}).render()})},t.prototype.addLinkPopoverButtons=function(){var n=this;this.context.memo("button.linkDialogShow",function(){return n.button({contents:n.ui.icon(n.options.icons.link),tooltip:n.lang.link.edit,click:n.context.createInvokeHandler("linkDialog.show")}).render()});this.context.memo("button.unlink",function(){return n.button({contents:n.ui.icon(n.options.icons.unlink),tooltip:n.lang.link.unlink,click:n.context.createInvokeHandler("editor.unlink")}).render()})},t.prototype.addTablePopoverButtons=function(){var n=this;this.context.memo("button.addRowUp",function(){return n.button({className:"btn-md",contents:n.ui.icon(n.options.icons.rowAbove),tooltip:n.lang.table.addRowAbove,click:n.context.createInvokeHandler("editor.addRow","top")}).render()});this.context.memo("button.addRowDown",function(){return n.button({className:"btn-md",contents:n.ui.icon(n.options.icons.rowBelow),tooltip:n.lang.table.addRowBelow,click:n.context.createInvokeHandler("editor.addRow","bottom")}).render()});this.context.memo("button.addColLeft",function(){return n.button({className:"btn-md",contents:n.ui.icon(n.options.icons.colBefore),tooltip:n.lang.table.addColLeft,click:n.context.createInvokeHandler("editor.addCol","left")}).render()});this.context.memo("button.addColRight",function(){return n.button({className:"btn-md",contents:n.ui.icon(n.options.icons.colAfter),tooltip:n.lang.table.addColRight,click:n.context.createInvokeHandler("editor.addCol","right")}).render()});this.context.memo("button.deleteRow",function(){return n.button({className:"btn-md",contents:n.ui.icon(n.options.icons.rowRemove),tooltip:n.lang.table.delRow,click:n.context.createInvokeHandler("editor.deleteRow")}).render()});this.context.memo("button.deleteCol",function(){return n.button({className:"btn-md",contents:n.ui.icon(n.options.icons.colRemove),tooltip:n.lang.table.delCol,click:n.context.createInvokeHandler("editor.deleteCol")}).render()});this.context.memo("button.deleteTable",function(){return n.button({className:"btn-md",contents:n.ui.icon(n.options.icons.trash),tooltip:n.lang.table.delTable,click:n.context.createInvokeHandler("editor.deleteTable")}).render()})},t.prototype.build=function(t,i){for(var u,f=0,o=i.length;f<o;f++){for(var r=i[f],c=n.isArray(r)?r[0]:r,s=n.isArray(r)?1===r.length?[r[0]]:r[1]:[r],h=this.ui.buttonGroup({className:"note-"+c}).render(),e=0,l=s.length;e<l;e++)u=this.context.memo("button."+s[e]),u&&h.append("function"==typeof u?u(this.context):u);h.appendTo(t)}},t.prototype.updateCurrentStyle=function(t){var h=this,u=t||this.$toolbar,r=this.context.invoke("editor.currentStyle"),o,f,e,s;(this.updateBtnStates(u,{".note-btn-bold":function(){return"bold"===r["font-bold"]},".note-btn-italic":function(){return"italic"===r["font-italic"]},".note-btn-underline":function(){return"underline"===r["font-underline"]},".note-btn-subscript":function(){return"subscript"===r["font-subscript"]},".note-btn-superscript":function(){return"superscript"===r["font-superscript"]},".note-btn-strikethrough":function(){return"strikethrough"===r["font-strikethrough"]}}),r["font-family"])&&(o=r["font-family"].split(",").map(function(n){return n.replace(/[\'\"]/g,"").replace(/\s+$/,"").replace(/^\s+/,"")}),f=i.find(o,this.isFontInstalled.bind(this)),u.find(".dropdown-fontname a").each(function(t,i){var r=n(i),u=r.data("value")+""==f+"";r.toggleClass("checked",u)}),u.find(".note-current-fontname").text(f).css("font-family",f));r["font-size"]&&(e=r["font-size"],u.find(".dropdown-fontsize a").each(function(t,i){var r=n(i),u=r.data("value")+""==e+"";r.toggleClass("checked",u)}),u.find(".note-current-fontsize").text(e));r["line-height"]&&(s=r["line-height"],u.find(".dropdown-line-height li a").each(function(t,i){var r=n(i).data("value")+""==s+"";h.className=r?"checked":""}))},t.prototype.updateBtnStates=function(t,i){var r=this;n.each(i,function(n,i){r.ui.toggleBtnActive(t.find(n),i())})},t.prototype.tableMoveHandler=function(t){var u,f=n(t.target.parentNode),s=f.next(),h=f.find(".note-dimension-picker-mousecatcher"),c=f.find(".note-dimension-picker-highlighted"),o=f.find(".note-dimension-picker-unhighlighted"),e,i,r;void 0===t.offsetX?(e=n(t.target).offset(),u={x:t.pageX-e.left,y:t.pageY-e.top}):u={x:t.offsetX,y:t.offsetY};i=Math.ceil(u.x/18)||1;r=Math.ceil(u.y/18)||1;c.css({width:i+"em",height:r+"em"});h.data("value",i+"x"+r);i>3&&i<this.options.insertTableMaxSize.col&&o.css({width:i+1+"em"});r>3&&r<this.options.insertTableMaxSize.row&&o.css({height:r+1+"em"});s.html(i+" x "+r)},t}(),rf=function(){function t(t){this.context=t;this.$window=n(window);this.$document=n(document);this.ui=n.summernote.ui;this.$note=t.layoutInfo.note;this.$editor=t.layoutInfo.editor;this.$toolbar=t.layoutInfo.toolbar;this.options=t.options;this.followScroll=this.followScroll.bind(this)}return t.prototype.shouldInitialize=function(){return!this.options.airMode},t.prototype.initialize=function(){var n=this;this.options.toolbar=this.options.toolbar||[];this.options.toolbar.length?this.context.invoke("buttons.build",this.$toolbar,this.options.toolbar):this.$toolbar.hide();this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer);this.changeContainer(!1);this.$note.on("summernote.keyup summernote.mouseup summernote.change",function(){n.context.invoke("buttons.updateCurrentStyle")});this.context.invoke("buttons.updateCurrentStyle");this.options.followingToolbar&&this.$window.on("scroll resize",this.followScroll)},t.prototype.destroy=function(){this.$toolbar.children().remove();this.options.followingToolbar&&this.$window.off("scroll resize",this.followScroll)},t.prototype.followScroll=function(){var t,i,r;if(this.$editor.hasClass("fullscreen"))return!1;var f=this.$toolbar.parent(".note-toolbar-wrapper"),e=this.$editor.outerHeight(),o=this.$editor.width(),u=this.$toolbar.height();f.css({height:u});t=0;this.options.otherStaticBar&&(t=n(this.options.otherStaticBar).outerHeight());i=this.$document.scrollTop();r=this.$editor.offset().top;i>r-t&&i<r+e-t-u?this.$toolbar.css({position:"fixed",top:t,width:o}):this.$toolbar.css({position:"relative",top:0,width:"100%"})},t.prototype.changeContainer=function(n){n?this.$toolbar.prependTo(this.$editor):this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer)},t.prototype.updateFullscreen=function(n){this.ui.toggleBtnActive(this.$toolbar.find(".btn-fullscreen"),n);this.changeContainer(n)},t.prototype.updateCodeview=function(n){this.ui.toggleBtnActive(this.$toolbar.find(".btn-codeview"),n);n?this.deactivate():this.activate()},t.prototype.activate=function(n){var t=this.$toolbar.find("button");n||(t=t.not(".btn-codeview"));this.ui.toggleBtn(t,!0)},t.prototype.deactivate=function(n){var t=this.$toolbar.find("button");n||(t=t.not(".btn-codeview"));this.ui.toggleBtn(t,!1)},t}(),uf=function(){function t(t){this.context=t;this.ui=n.summernote.ui;this.$body=n(document.body);this.$editor=t.layoutInfo.editor;this.options=t.options;this.lang=this.options.langInfo;t.memo("help.linkDialog.show",this.options.langInfo.help["linkDialog.show"])}return t.prototype.initialize=function(){var t=this.options.dialogsInBody?this.$body:this.$editor,i=['<div class="form-group note-form-group">','<label class="note-form-label">'+this.lang.link.textToDisplay+"<\/label>",'<input class="note-link-text form-control note-form-control  note-input" type="text" />',"<\/div>",'<div class="form-group note-form-group">','<label class="note-form-label">'+this.lang.link.url+"<\/label>",'<input class="note-link-url form-control note-form-control note-input" type="text" value="http://" />',"<\/div>",this.options.disableLinkTarget?"":n("<div/>").append(this.ui.checkbox({id:"sn-checkbox-open-in-new-window",text:this.lang.link.openInNewWindow,checked:!0}).render()).html()].join(""),r='<button type="submit" href="#" class="btn btn-primary note-btn note-btn-primary note-link-btn" disabled>'+this.lang.link.insert+"<\/button>";this.$dialog=this.ui.dialog({className:"link-dialog",title:this.lang.link.insert,fade:this.options.dialogsFade,body:i,footer:r}).render().appendTo(t)},t.prototype.destroy=function(){this.ui.hideDialog(this.$dialog);this.$dialog.remove()},t.prototype.bindEnterKey=function(n,t){n.on("keypress",function(n){n.keyCode===o.code.ENTER&&(n.preventDefault(),t.trigger("click"))})},t.prototype.toggleLinkBtn=function(n,t,i){this.ui.toggleBtn(n,t.val()&&i.val())},t.prototype.showLinkDialog=function(t){var i=this;return n.Deferred(function(n){var r=i.$dialog.find(".note-link-text"),u=i.$dialog.find(".note-link-url"),e=i.$dialog.find(".note-link-btn"),o=i.$dialog.find("input[type=checkbox]");i.ui.onDialogShown(i.$dialog,function(){var s,h,c;i.context.triggerEvent("dialog.shown");t.url||(t.url=t.text);r.val(t.text);s=function(){i.toggleLinkBtn(e,r,u);t.text=r.val()};r.on("input",s).on("paste",function(){setTimeout(s,0)});h=function(){i.toggleLinkBtn(e,r,u);t.text||r.val(u.val())};u.on("input",h).on("paste",function(){setTimeout(h,0)}).val(t.url);f.isSupportTouch||u.trigger("focus");i.toggleLinkBtn(e,r,u);i.bindEnterKey(u,e);i.bindEnterKey(r,e);c=void 0!==t.isNewWindow?t.isNewWindow:i.context.options.linkTargetBlank;o.prop("checked",c);e.one("click",function(f){f.preventDefault();n.resolve({range:t.range,url:u.val(),text:r.val(),isNewWindow:o.is(":checked")});i.ui.hideDialog(i.$dialog)})});i.ui.onDialogHidden(i.$dialog,function(){r.off("input paste keypress");u.off("input paste keypress");e.off("click");"pending"===n.state()&&n.reject()});i.ui.showDialog(i.$dialog)}).promise()},t.prototype.show=function(){var n=this,t=this.context.invoke("editor.getLinkInfo");this.context.invoke("editor.saveRange");this.showLinkDialog(t).then(function(t){n.context.invoke("editor.restoreRange");n.context.invoke("editor.createLink",t)}).fail(function(){n.context.invoke("editor.restoreRange")})},t}(),ff=function(){function r(t){var i=this;this.context=t;this.ui=n.summernote.ui;this.options=t.options;this.events={"summernote.keyup summernote.mouseup summernote.change summernote.scroll":function(){i.update()},"summernote.disable summernote.dialog.shown":function(){i.hide()}}}return r.prototype.shouldInitialize=function(){return!i.isEmpty(this.options.popover.link)},r.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-link-popover",callback:function(n){n.find(".popover-content,.note-popover-content").prepend('<span><a target="_blank"><\/a>&nbsp;<\/span>')}}).render().appendTo(this.options.container);var n=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",n,this.options.popover.link)},r.prototype.destroy=function(){this.$popover.remove()},r.prototype.update=function(){var i,r,u,f;this.context.invoke("editor.hasFocus")?(i=this.context.invoke("editor.createRange"),i.isCollapsed()&&i.isOnAnchor()?(r=t.ancestor(i.sc,t.isAnchor),u=n(r).attr("href"),this.$popover.find("a").attr("href",u).html(u),f=t.posFromPlaceholder(r),this.$popover.css({display:"block",left:f.left,top:f.top})):this.hide()):this.hide()},r.prototype.hide=function(){this.$popover.hide()},r}(),ef=function(){function t(t){this.context=t;this.ui=n.summernote.ui;this.$body=n(document.body);this.$editor=t.layoutInfo.editor;this.options=t.options;this.lang=this.options.langInfo}return t.prototype.initialize=function(){var f=this.options.dialogsInBody?this.$body:this.$editor,t="",n,i,r,u;this.options.maximumImageFileSize&&(n=Math.floor(Math.log(this.options.maximumImageFileSize)/Math.log(1024)),i=1*(this.options.maximumImageFileSize/Math.pow(1024,n)).toFixed(2)+" "+" KMGTP"[n]+"B",t="<small>"+this.lang.image.maximumFileSize+" : "+i+"<\/small>");r=['<div class="form-group note-form-group note-group-select-from-files">','<label class="note-form-label">'+this.lang.image.selectFromFiles+"<\/label>",'<input class="note-image-input note-form-control note-input" ',' type="file" name="files" accept="image/*" multiple="multiple" />',t,"<\/div>",'<div class="form-group note-group-image-url" style="overflow:auto;">','<label class="note-form-label">'+this.lang.image.url+"<\/label>",'<input class="note-image-url form-control note-form-control note-input ',' col-md-12" type="text" />',"<\/div>"].join("");u='<button type="submit" href="#" class="btn btn-primary note-btn note-btn-primary note-image-btn" disabled>'+this.lang.image.insert+"<\/button>";this.$dialog=this.ui.dialog({title:this.lang.image.insert,fade:this.options.dialogsFade,body:r,footer:u}).render().appendTo(f)},t.prototype.destroy=function(){this.ui.hideDialog(this.$dialog);this.$dialog.remove()},t.prototype.bindEnterKey=function(n,t){n.on("keypress",function(n){n.keyCode===o.code.ENTER&&(n.preventDefault(),t.trigger("click"))})},t.prototype.show=function(){var n=this;this.context.invoke("editor.saveRange");this.showImageDialog().then(function(t){n.ui.hideDialog(n.$dialog);n.context.invoke("editor.restoreRange");"string"==typeof t?n.context.invoke("editor.insertImage",t):n.context.invoke("editor.insertImagesOrCallback",t)}).fail(function(){n.context.invoke("editor.restoreRange")})},t.prototype.showImageDialog=function(){var t=this;return n.Deferred(function(n){var u=t.$dialog.find(".note-image-input"),i=t.$dialog.find(".note-image-url"),r=t.$dialog.find(".note-image-btn");t.ui.onDialogShown(t.$dialog,function(){t.context.triggerEvent("dialog.shown");u.replaceWith(u.clone().on("change",function(t){n.resolve(t.target.files||t.target.value)}).val(""));r.click(function(t){t.preventDefault();n.resolve(i.val())});i.on("keyup paste",function(){var n=i.val();t.ui.toggleBtn(r,n)}).val("");f.isSupportTouch||i.trigger("focus");t.bindEnterKey(i,r)});t.ui.onDialogHidden(t.$dialog,function(){u.off("change");i.off("keyup paste keypress");r.off("click");"pending"===n.state()&&n.reject()});t.ui.showDialog(t.$dialog)})},t}(),of=function(){function r(t){var i=this;this.context=t;this.ui=n.summernote.ui;this.editable=t.layoutInfo.editable[0];this.options=t.options;this.events={"summernote.disable":function(){i.hide()}}}return r.prototype.shouldInitialize=function(){return!i.isEmpty(this.options.popover.image)},r.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-image-popover"}).render().appendTo(this.options.container);var n=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",n,this.options.popover.image)},r.prototype.destroy=function(){this.$popover.remove()},r.prototype.update=function(n){if(t.isImg(n)){var i=t.posFromPlaceholder(n),r=t.posFromPlaceholder(this.editable);this.$popover.css({display:"block",left:this.options.popatmouse?event.pageX-20:i.left,top:this.options.popatmouse?event.pageY:Math.min(i.top,r.top)})}else this.hide()},r.prototype.hide=function(){this.$popover.hide()},r}(),sf=function(){function r(t){var i=this;this.context=t;this.ui=n.summernote.ui;this.options=t.options;this.events={"summernote.mousedown":function(n,t){i.update(t.target)},"summernote.keyup summernote.scroll summernote.change":function(){i.update()},"summernote.disable":function(){i.hide()}}}return r.prototype.shouldInitialize=function(){return!i.isEmpty(this.options.popover.table)},r.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-table-popover"}).render().appendTo(this.options.container);var n=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",n,this.options.popover.table);f.isFF&&document.execCommand("enableInlineTableEditing",!1,!1)},r.prototype.destroy=function(){this.$popover.remove()},r.prototype.update=function(n){var i,r;return this.context.isDisabled()?!1:(i=t.isCell(n),i?(r=t.posFromPlaceholder(n),this.$popover.css({display:"block",left:r.left,top:r.top})):this.hide(),i)},r.prototype.hide=function(){this.$popover.hide()},r}(),hf=function(){function t(t){this.context=t;this.ui=n.summernote.ui;this.$body=n(document.body);this.$editor=t.layoutInfo.editor;this.options=t.options;this.lang=this.options.langInfo}return t.prototype.initialize=function(){var n=this.options.dialogsInBody?this.$body:this.$editor,t=['<div class="form-group note-form-group row-fluid">','<label class="note-form-label">'+this.lang.video.url+' <small class="text-muted">'+this.lang.video.providers+"<\/small><\/label>",'<input class="note-video-url form-control note-form-control note-input" type="text" />',"<\/div>"].join(""),i='<button type="submit" href="#" class="btn btn-primary note-btn note-btn-primary note-video-btn" disabled>'+this.lang.video.insert+"<\/button>";this.$dialog=this.ui.dialog({title:this.lang.video.insert,fade:this.options.dialogsFade,body:t,footer:i}).render().appendTo(n)},t.prototype.destroy=function(){this.ui.hideDialog(this.$dialog);this.$dialog.remove()},t.prototype.bindEnterKey=function(n,t){n.on("keypress",function(n){n.keyCode===o.code.ENTER&&(n.preventDefault(),t.trigger("click"))})},t.prototype.createVideoNode=function(t){var i,u=t.match(/^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/),f=t.match(/(?:www\.|\/\/)instagram\.com\/p\/(.[a-zA-Z0-9_-]*)/),e=t.match(/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/),o=t.match(/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/),s=t.match(/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/),h=t.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),r=t.match(/\/\/v\.qq\.com.*?vid=(.+)/),c=t.match(/\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/),v=t.match(/^.+.(mp4|m4v)$/),y=t.match(/^.+.(ogg|ogv)$/),p=t.match(/^.+.(webm)$/),l,a;if(u&&11===u[1].length)l=u[1],i=n("<iframe>").attr("frameborder",0).attr("src","//www.youtube.com/embed/"+l).attr("width","640").attr("height","360");else if(f&&f[0].length)i=n("<iframe>").attr("frameborder",0).attr("src","https://instagram.com/p/"+f[1]+"/embed/").attr("width","612").attr("height","710").attr("scrolling","no").attr("allowtransparency","true");else if(e&&e[0].length)i=n("<iframe>").attr("frameborder",0).attr("src",e[0]+"/embed/simple").attr("width","600").attr("height","600").attr("class","vine-embed");else if(o&&o[3].length)i=n("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("src","//player.vimeo.com/video/"+o[3]).attr("width","640").attr("height","360");else if(s&&s[2].length)i=n("<iframe>").attr("frameborder",0).attr("src","//www.dailymotion.com/embed/video/"+s[2]).attr("width","640").attr("height","360");else if(h&&h[1].length)i=n("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","498").attr("width","510").attr("src","//player.youku.com/embed/"+h[1]);else if(r&&r[1].length||c&&c[2].length)a=r&&r[1].length?r[1]:c[2],i=n("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","310").attr("width","500").attr("src","http://v.qq.com/iframe/player.html?vid="+a+"&amp;auto=0");else{if(!(v||y||p))return!1;i=n("<video controls>").attr("src",t).attr("width","640").attr("height","360")}return i.addClass("note-video-clip"),i[0]},t.prototype.show=function(){var n=this,t=this.context.invoke("editor.getSelectedText");this.context.invoke("editor.saveRange");this.showVideoDialog(t).then(function(t){n.ui.hideDialog(n.$dialog);n.context.invoke("editor.restoreRange");var i=n.createVideoNode(t);i&&n.context.invoke("editor.insertNode",i)}).fail(function(){n.context.invoke("editor.restoreRange")})},t.prototype.showVideoDialog=function(t){var i=this;return n.Deferred(function(n){var r=i.$dialog.find(".note-video-url"),u=i.$dialog.find(".note-video-btn");i.ui.onDialogShown(i.$dialog,function(){i.context.triggerEvent("dialog.shown");r.val(t).on("input",function(){i.ui.toggleBtn(u,r.val())});f.isSupportTouch||r.trigger("focus");u.click(function(t){t.preventDefault();n.resolve(r.val())});i.bindEnterKey(r,u)});i.ui.onDialogHidden(i.$dialog,function(){r.off("input");u.off("click");"pending"===n.state()&&n.reject()});i.ui.showDialog(i.$dialog)})},t}(),cf=function(){function t(t){this.context=t;this.ui=n.summernote.ui;this.$body=n(document.body);this.$editor=t.layoutInfo.editor;this.options=t.options;this.lang=this.options.langInfo}return t.prototype.initialize=function(){var n=this.options.dialogsInBody?this.$body:this.$editor,t='<p class="text-center"><a href="http://summernote.org/" target="_blank">Summernote 0.8.9<\/a> · <a href="https://github.com/summernote/summernote" target="_blank">Project<\/a> · <a href="https://github.com/summernote/summernote/issues" target="_blank">Issues<\/a><\/p>';this.$dialog=this.ui.dialog({title:this.lang.options.help,fade:this.options.dialogsFade,body:this.createShortcutList(),footer:t,callback:function(n){n.find(".modal-body,.note-modal-body").css({"max-height":300,overflow:"scroll"})}}).render().appendTo(n)},t.prototype.destroy=function(){this.ui.hideDialog(this.$dialog);this.$dialog.remove()},t.prototype.createShortcutList=function(){var i=this,t=this.options.keyMap[f.isMac?"mac":"pc"];return Object.keys(t).map(function(r){var u=t[r],f=n('<div><div class="help-list-item"/><\/div>');return f.append(n("<label><kbd>"+r+"<\/kdb><\/label>").css({width:180,"margin-right":10})).append(n("<span/>").html(i.context.memo("help."+u)||u)),f.html()}).join("")},t.prototype.showHelpDialog=function(){var t=this;return n.Deferred(function(n){t.ui.onDialogShown(t.$dialog,function(){t.context.triggerEvent("dialog.shown");n.resolve()});t.ui.showDialog(t.$dialog)}).promise()},t.prototype.show=function(){var n=this;this.context.invoke("editor.saveRange");this.showHelpDialog().then(function(){n.context.invoke("editor.restoreRange")})},t}(),lf=function(){function r(i){var r=this;this.context=i;this.ui=n.summernote.ui;this.options=i.options;this.events={"summernote.keyup summernote.mouseup summernote.scroll":function(){r.update()},"summernote.disable summernote.change summernote.dialog.shown":function(){r.hide()},"summernote.focusout":function(n,i){f.isFF||i.relatedTarget&&t.ancestor(i.relatedTarget,u.eq(r.$popover[0]))||r.hide()}}}return r.prototype.shouldInitialize=function(){return this.options.airMode&&!i.isEmpty(this.options.popover.air)},r.prototype.initialize=function(){this.$popover=this.ui.popover({className:"note-air-popover"}).render().appendTo(this.options.container);var n=this.$popover.find(".popover-content");this.context.invoke("buttons.build",n,this.options.popover.air)},r.prototype.destroy=function(){this.$popover.remove()},r.prototype.update=function(){var t=this.context.invoke("editor.currentStyle"),r,n;t.range&&!t.range.isCollapsed()?(r=i.last(t.range.getClientRects()),r&&(n=u.rect2bnd(r),this.$popover.css({display:"block",left:Math.max(n.left+n.width/2,0)-20,top:n.top+n.height}),this.context.invoke("buttons.updateCurrentStyle",this.$popover))):this.hide()},r.prototype.hide=function(){this.$popover.hide()},r}(),af=function(){function r(t){var i=this;this.context=t;this.ui=n.summernote.ui;this.$editable=t.layoutInfo.editable;this.options=t.options;this.hint=this.options.hint||[];this.direction=this.options.hintDirection||"bottom";this.hints=n.isArray(this.hint)?this.hint:[this.hint];this.events={"summernote.keyup":function(n,t){t.isDefaultPrevented()||i.handleKeyup(t)},"summernote.keydown":function(n,t){i.handleKeydown(t)},"summernote.disable summernote.dialog.shown":function(){i.hide()}}}return r.prototype.shouldInitialize=function(){return this.hints.length>0},r.prototype.initialize=function(){var t=this;this.lastWordRange=null;this.$popover=this.ui.popover({className:"note-hint-popover",hideArrow:!0,direction:""}).render().appendTo(this.options.container);this.$popover.hide();this.$content=this.$popover.find(".popover-content,.note-popover-content");this.$content.on("click",".note-hint-item",function(){t.$content.find(".active").removeClass("active");n(t).addClass("active");t.replace()})},r.prototype.destroy=function(){this.$popover.remove()},r.prototype.selectItem=function(n){this.$content.find(".active").removeClass("active");n.addClass("active");this.$content[0].scrollTop=n[0].offsetTop-this.$content.innerHeight()/2},r.prototype.moveDown=function(){var t=this.$content.find(".note-hint-item.active"),i=t.next(),n;i.length?this.selectItem(i):(n=t.parent().next(),n.length||(n=this.$content.find(".note-hint-group").first()),this.selectItem(n.find(".note-hint-item").first()))},r.prototype.moveUp=function(){var t=this.$content.find(".note-hint-item.active"),i=t.prev(),n;i.length?this.selectItem(i):(n=t.parent().prev(),n.length||(n=this.$content.find(".note-hint-group").last()),this.selectItem(n.find(".note-hint-item").last()))},r.prototype.replace=function(){var t=this.$content.find(".note-hint-item.active"),n;t.length&&(n=this.nodeFromItem(t),this.lastWordRange.insertNode(n),e.createFromNode(n).collapse().select(),this.lastWordRange=null,this.hide(),this.context.triggerEvent("change",this.$editable.html(),this.$editable[0]),this.context.invoke("editor.focus"))},r.prototype.nodeFromItem=function(n){var r=this.hints[n.data("index")],u=n.data("item"),i=r.content?r.content(u):u;return"string"==typeof i&&(i=t.createText(i)),i},r.prototype.createItemTemplates=function(t,i){var r=this.hints[t];return i.map(function(i){var u=n('<div class="note-hint-item"/>');return u.append(r.template?r.template(i):i+""),u.data({index:t,item:i}),u})},r.prototype.handleKeydown=function(n){this.$popover.is(":visible")&&(n.keyCode===o.code.ENTER?(n.preventDefault(),this.replace()):n.keyCode===o.code.UP?(n.preventDefault(),this.moveUp()):n.keyCode===o.code.DOWN&&(n.preventDefault(),this.moveDown()))},r.prototype.searchKeyword=function(n,t,i){var r=this.hints[n],u;r&&r.match.test(t)&&r.search?(u=r.match.exec(t),r.search(u[1],i)):i()},r.prototype.createGroup=function(t,i){var r=this,u=n('<div class="note-hint-group note-hint-group-'+t+'"/>');return this.searchKeyword(t,i,function(n){(n=n||[]).length&&(u.html(r.createItemTemplates(t,n)),r.show())}),u},r.prototype.handleKeyup=function(n){var e=this,r,f,t;i.contains([o.code.ENTER,o.code.UP,o.code.DOWN],n.keyCode)||(r=this.context.invoke("editor.createRange").getWordRange(),f=r.toString(),this.hints.length&&f?(this.$content.empty(),t=u.rect2bnd(i.last(r.getClientRects())),t&&(this.$popover.hide(),this.lastWordRange=r,this.hints.forEach(function(n,t){n.match.test(f)&&e.createGroup(t,f).appendTo(e.$content)}),this.$content.find(".note-hint-item:first").addClass("active"),"top"===this.direction?this.$popover.css({left:t.left,top:t.top-this.$popover.outerHeight()-5}):this.$popover.css({left:t.left,top:t.top+t.height+5}))):this.hide())},r.prototype.show=function(){this.$popover.show()},r.prototype.hide=function(){this.$popover.hide()},r}(),vf=function(){function r(t,i){this.ui=n.summernote.ui;this.$note=t;this.memos={};this.modules={};this.layoutInfo={};this.options=i;this.initialize()}return r.prototype.initialize=function(){return this.layoutInfo=this.ui.createLayout(this.$note,this.options),this._initialize(),this.$note.hide(),this},r.prototype.destroy=function(){this._destroy();this.$note.removeData("summernote");this.ui.removeLayout(this.$note,this.layoutInfo)},r.prototype.reset=function(){var n=this.isDisabled();this.code(t.emptyPara);this._destroy();this._initialize();n&&this.disable()},r.prototype._initialize=function(){var t=this,r=n.extend({},this.options.buttons),i;Object.keys(r).forEach(function(n){t.memo("button."+n,r[n])});i=n.extend({},this.options.modules,n.summernote.plugins||{});Object.keys(i).forEach(function(n){t.module(n,i[n],!0)});Object.keys(this.modules).forEach(function(n){t.initializeModule(n)})},r.prototype._destroy=function(){var n=this;Object.keys(this.modules).reverse().forEach(function(t){n.removeModule(t)});Object.keys(this.memos).forEach(function(t){n.removeMemo(t)});this.triggerEvent("destroy",this)},r.prototype.code=function(n){var t=this.invoke("codeview.isActivated");if(void 0===n)return this.invoke("codeview.sync"),t?this.layoutInfo.codable.val():this.layoutInfo.editable.html();t?this.layoutInfo.codable.val(n):this.layoutInfo.editable.html(n);this.$note.val(n);this.triggerEvent("change",n)},r.prototype.isDisabled=function(){return"false"===this.layoutInfo.editable.attr("contenteditable")},r.prototype.enable=function(){this.layoutInfo.editable.attr("contenteditable",!0);this.invoke("toolbar.activate",!0);this.triggerEvent("disable",!1)},r.prototype.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)},r.prototype.triggerEvent=function(){var n=i.head(arguments),t=i.tail(i.from(arguments)),r=this.options.callbacks[u.namespaceToCamel(n,"on")];r&&r.apply(this.$note[0],t);this.$note.trigger("summernote."+n,t)},r.prototype.initializeModule=function(n){var i=this.modules[n];i.shouldInitialize=i.shouldInitialize||u.ok;i.shouldInitialize()&&(i.initialize&&i.initialize(),i.events&&t.attachEvents(this.$note,i.events))},r.prototype.module=function(n,t,i){if(1===arguments.length)return this.modules[n];this.modules[n]=new t(this);i||this.initializeModule(n)},r.prototype.removeModule=function(n){var i=this.modules[n];i.shouldInitialize()&&(i.events&&t.detachEvents(this.$note,i.events),i.destroy&&i.destroy());delete this.modules[n]},r.prototype.memo=function(n,t){if(1===arguments.length)return this.memos[n];this.memos[n]=t},r.prototype.removeMemo=function(n){this.memos[n]&&this.memos[n].destroy&&this.memos[n].destroy();delete this.memos[n]},r.prototype.createInvokeHandlerAndUpdateState=function(n,t){var i=this;return function(r){i.createInvokeHandler(n,t)(r);i.invoke("buttons.updateCurrentStyle")}},r.prototype.createInvokeHandler=function(t,i){var r=this;return function(u){u.preventDefault();var f=n(u.target);r.invoke(t,i||f.closest("[data-value]").data("value"),f)}},r.prototype.invoke=function(){var o=i.head(arguments),u=i.tail(i.from(arguments)),t=o.split("."),f=t.length>1,e=f&&i.head(t),r=f?i.last(t):i.head(t),n=this.modules[e||"editor"];return!e&&this[r]?this[r].apply(this,u):n&&n[r]&&n.shouldInitialize()?n[r].apply(n,u):void 0},r}();n.fn.extend({summernote:function(){var e=n.type(i.head(arguments)),o="string"===e,s="object"===e,t=n.extend({},n.summernote.options,s?i.head(arguments):{}),u,r;if(t.langInfo=n.extend(!0,{},n.summernote.lang["en-US"],n.summernote.lang[t.lang]),t.icons=n.extend(!0,{},n.summernote.options.icons,t.icons),t.tooltip="auto"===t.tooltip?!f.isSupportTouch:t.tooltip,this.each(function(i,r){var u=n(r),f;u.data("summernote")||(f=new vf(u,t),u.data("summernote",f),u.data("summernote").triggerEvent("init",f.layoutInfo))}),u=this.first(),u.length){if(r=u.data("summernote"),o)return r.invoke.apply(r,i.from(arguments));t.focus&&r.invoke("editor.focus")}return this}});n.summernote=n.extend(n.summernote,{version:"0.8.9",ui:l,dom:t,plugins:{},options:{modules:{editor:lu,clipboard:au,dropzone:vu,codeview:yu,statusbar:pu,fullscreen:wu,handle:bu,hintPopover:af,autoLink:du,autoSync:gu,placeholder:nf,buttons:tf,toolbar:rf,linkDialog:uf,linkPopover:ff,imageDialog:ef,imagePopover:of,tablePopover:sf,videoDialog:hf,helpDialog:cf,airPopover:lf},buttons:{},lang:"en-US",followingToolbar:!0,otherStaticBar:"",toolbar:[["style",["style"]],["font",["bold","underline","clear"]],["fontname",["fontname"]],["color",["color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["link","picture","video"]],["view",["fullscreen","codeview","help"]]],popatmouse:!0,popover:{image:[["imagesize",["imageSize100","imageSize50","imageSize25"]],["float",["floatLeft","floatRight","floatNone"]],["remove",["removeMedia"]]],link:[["link",["linkDialogShow","unlink"]]],table:[["add",["addRowDown","addRowUp","addColLeft","addColRight"]],["delete",["deleteRow","deleteCol","deleteTable"]]],air:[["color",["color"]],["font",["bold","underline","clear"]],["para",["ul","paragraph"]],["table",["table"]],["insert",["link","picture"]]]},airMode:!1,width:null,height:null,linkTargetBlank:!0,focus:!1,tabSize:4,styleWithSpan:!0,shortcuts:!0,textareaAutoSync:!0,hintDirection:"bottom",tooltip:"auto",container:"body",maxTextLength:0,styleTags:["p",{title:"Blockquote",tag:"blockquote",className:"blockquote",value:"blockquote"},"pre","h1","h2","h3","h4","h5","h6"],fontNames:["Arial","Arial Black","Comic Sans MS","Courier New","Helvetica Neue","Helvetica","Impact","Lucida Grande","Tahoma","Times New Roman","Verdana"],fontSizes:["8","9","10","11","12","14","18","24","36"],colors:[["#000000","#424242","#636363","#9C9C94","#CEC6CE","#EFEFEF","#F7F7F7","#FFFFFF"],["#FF0000","#FF9C00","#FFFF00","#00FF00","#00FFFF","#0000FF","#9C00FF","#FF00FF"],["#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE"],["#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD"],["#E76363","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5"],["#CE0000","#E79439","#EFC631","#6BA54A","#4A7B8C","#3984C6","#634AA5","#A54A7B"],["#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842"],["#630000","#7B3900","#846300","#295218","#083139","#003163","#21104A","#4A1031"]],lineHeights:["1.0","1.2","1.4","1.5","1.6","1.8","2.0","3.0"],tableClassName:"table table-bordered",insertTableMaxSize:{col:10,row:10},dialogsInBody:!1,dialogsFade:!1,maximumImageFileSize:null,callbacks:{onInit:null,onFocus:null,onBlur:null,onBlurCodeview:null,onEnter:null,onKeyup:null,onKeydown:null,onImageUpload:null,onImageUploadError:null},codemirror:{mode:"text/html",htmlMode:!0,lineNumbers:!0},keyMap:{pc:{ENTER:"insertParagraph","CTRL+Z":"undo","CTRL+Y":"redo",TAB:"tab","SHIFT+TAB":"untab","CTRL+B":"bold","CTRL+I":"italic","CTRL+U":"underline","CTRL+SHIFT+S":"strikethrough","CTRL+BACKSLASH":"removeFormat","CTRL+SHIFT+L":"justifyLeft","CTRL+SHIFT+E":"justifyCenter","CTRL+SHIFT+R":"justifyRight","CTRL+SHIFT+J":"justifyFull","CTRL+SHIFT+NUM7":"insertUnorderedList","CTRL+SHIFT+NUM8":"insertOrderedList","CTRL+LEFTBRACKET":"outdent","CTRL+RIGHTBRACKET":"indent","CTRL+NUM0":"formatPara","CTRL+NUM1":"formatH1","CTRL+NUM2":"formatH2","CTRL+NUM3":"formatH3","CTRL+NUM4":"formatH4","CTRL+NUM5":"formatH5","CTRL+NUM6":"formatH6","CTRL+ENTER":"insertHorizontalRule","CTRL+K":"linkDialog.show"},mac:{ENTER:"insertParagraph","CMD+Z":"undo","CMD+SHIFT+Z":"redo",TAB:"tab","SHIFT+TAB":"untab","CMD+B":"bold","CMD+I":"italic","CMD+U":"underline","CMD+SHIFT+S":"strikethrough","CMD+BACKSLASH":"removeFormat","CMD+SHIFT+L":"justifyLeft","CMD+SHIFT+E":"justifyCenter","CMD+SHIFT+R":"justifyRight","CMD+SHIFT+J":"justifyFull","CMD+SHIFT+NUM7":"insertUnorderedList","CMD+SHIFT+NUM8":"insertOrderedList","CMD+LEFTBRACKET":"outdent","CMD+RIGHTBRACKET":"indent","CMD+NUM0":"formatPara","CMD+NUM1":"formatH1","CMD+NUM2":"formatH2","CMD+NUM3":"formatH3","CMD+NUM4":"formatH4","CMD+NUM5":"formatH5","CMD+NUM6":"formatH6","CMD+ENTER":"insertHorizontalRule","CMD+K":"linkDialog.show"}},icons:{align:"note-icon-align",alignCenter:"note-icon-align-center",alignJustify:"note-icon-align-justify",alignLeft:"note-icon-align-left",alignRight:"note-icon-align-right",rowBelow:"note-icon-row-below",colBefore:"note-icon-col-before",colAfter:"note-icon-col-after",rowAbove:"note-icon-row-above",rowRemove:"note-icon-row-remove",colRemove:"note-icon-col-remove",indent:"note-icon-align-indent",outdent:"note-icon-align-outdent",arrowsAlt:"note-icon-arrows-alt",bold:"note-icon-bold",caret:"note-icon-caret",circle:"note-icon-circle",close:"note-icon-close",code:"note-icon-code",eraser:"note-icon-eraser",font:"note-icon-font",frame:"note-icon-frame",italic:"note-icon-italic",link:"note-icon-link",unlink:"note-icon-chain-broken",magic:"note-icon-magic",menuCheck:"note-icon-menu-check",minus:"note-icon-minus",orderedlist:"note-icon-orderedlist",pencil:"note-icon-pencil",picture:"note-icon-picture",question:"note-icon-question",redo:"note-icon-redo",square:"note-icon-square",strikethrough:"note-icon-strikethrough",subscript:"note-icon-subscript",superscript:"note-icon-superscript",table:"note-icon-table",textHeight:"note-icon-text-height",trash:"note-icon-trash",underline:"note-icon-underline",undo:"note-icon-undo",unorderedlist:"note-icon-unorderedlist",video:"note-icon-video"}}})});$(document).ready(function(){function n(n){if(n.files&&n.files[0]){var t=new FileReader;t.onload=function(n){$("#imgPhoto").attr("src",n.target.result);$("#imgData").val(n.target.result);$("#Photo").val()===""&&$("#Photo").val(n.target.result)};t.readAsDataURL(n.files[0])}else $("#imgPhoto").attr("src",null)}$(".navbar-toggle").on("click",function(){$(this).toggleClass("active")});$("#btnEditImage").on("click",function(n){n.preventDefault();$("#imgInput").trigger("click")});$("#btnClearImage").on("click",function(n){n.preventDefault();$("#imgPhoto").attr("src",null);$("#imgData").val(null)});$("#btnSaveTeamMember").on("click",function(){$("#Description").val($("#doctorNotes").summernote("code"))});$("#imgInput").change(function(){n(this)});$("#doctorNotes").summernote({placeholder:"Hello bootstrap 4",height:"calc(100vh - 650px)",disableResizeEditor:!0,minHeight:null,maxHeight:null});$(".btnDeleteTeamMember").click(function(n){n.preventDefault();var t=$(this),i=$(this).data("id"),r=$("[name='__RequestVerificationToken']");confirm("Are you sure you want to delete this team member?")&&$.ajax({data:{id:i,__RequestVerificationToken:r.val()},method:"POST",url:"/TeamMembers/Delete",success:function(n){n.success===!0?t.closest("tr").remove():alert(n.message)},failure:function(n){alert(n.responseText)},error:function(n){alert(n.responseText)}})});$(".btnMoveTeamMember").click(function(n){n.preventDefault();var t=$(this).data("move"),i=$(this).data("id"),r=$("[name='__RequestVerificationToken']");$.ajax({data:{id:i,direction:t,__RequestVerificationToken:r.val()},method:"POST",url:"/TeamMembers/Move",success:function(n){n.success==!0?location.reload():alert(n.message)},failure:function(n){alert(n.responseText)},error:function(n){alert(n.responseText)}})});$("#btnCancel").click(function(){history.back()});localStorage.getItem("alertShown")===null&&($("#virusAlertModal").modal("show"),localStorage.setItem("alertShown",1))})