@wavemaker/app-runtime-wm-build 11.10.0-next.47263 → 11.10.0-next.47267

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -564,17 +564,16 @@ Docs & License: https://fullcalendar.io/
564
564
  var FullCalendar=function(e){"use strict";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,n)};function n(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r=function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function o(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}var i,a,s,l,u,c,d,p={},f=[],h=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function v(e,t){for(var n in t)e[n]=t[n];return e}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function m(e,t,n){var r,o=arguments,i={};for(r in t)"key"!==r&&"ref"!==r&&(i[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(o[r]);if(null!=n&&(i.children=n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===i[r]&&(i[r]=e.defaultProps[r]);return y(e,i,t&&t.key,t&&t.ref,null)}function y(e,t,n,r,o){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o};return null==o&&(a.__v=a),i.vnode&&i.vnode(a),a}function E(e){return e.children}function S(e,t){this.props=e,this.context=t}function D(e,t){if(null==t)return e.__?D(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?D(e):null}function b(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return b(e)}}function C(e){(!e.__d&&(e.__d=!0)&&a.push(e)&&!s++||u!==i.debounceRendering)&&((u=i.debounceRendering)||l)(w)}function w(){for(var e;s=a.length;)e=a.sort((function(e,t){return e.__v.__b-t.__v.__b})),a=[],e.some((function(e){var t,n,r,o,i,a,s;e.__d&&(a=(i=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=v({},i)).__v=r,o=_(s,i,r,t.__n,void 0!==s.ownerSVGElement,null,n,null==a?D(i):a),I(n,i),o!=a&&b(i)))}))}function R(e,t,n,r,o,i,a,s,l){var u,c,d,h,v,m,y,E=n&&n.__k||f,S=E.length;if(s==p&&(s=null!=i?i[0]:S?D(n,0):null),u=0,t.__k=T(t.__k,(function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(d=E[u])||d&&n.key==d.key&&n.type===d.type)E[u]=void 0;else for(c=0;c<S;c++){if((d=E[c])&&n.key==d.key&&n.type===d.type){E[c]=void 0;break}d=null}if(h=_(e,n,d=d||p,r,o,i,a,s,l),(c=n.ref)&&d.ref!=c&&(y||(y=[]),d.ref&&y.push(d.ref,null,n),y.push(c,n.__c||h,n)),null!=h){var f;if(null==m&&(m=h),void 0!==n.__d)f=n.__d,n.__d=void 0;else if(i==d||h!=s||null==h.parentNode){e:if(null==s||s.parentNode!==e)e.appendChild(h),f=null;else{for(v=s,c=0;(v=v.nextSibling)&&c<S;c+=2)if(v==h)break e;e.insertBefore(h,s),f=s}"option"==t.type&&(e.value="")}s=void 0!==f?f:h.nextSibling,"function"==typeof t.type&&(t.__d=s)}else s&&d.__e==s&&s.parentNode!=e&&(s=D(d))}return u++,n})),t.__e=m,null!=i&&"function"!=typeof t.type)for(u=i.length;u--;)null!=i[u]&&g(i[u]);for(u=S;u--;)null!=E[u]&&H(E[u],E[u]);if(y)for(u=0;u<y.length;u++)N(y[u],y[++u],y[++u])}function T(e,t,n){if(null==n&&(n=[]),null==e||"boolean"==typeof e)t&&n.push(t(null));else if(Array.isArray(e))for(var r=0;r<e.length;r++)T(e[r],t,n);else n.push(t?t("string"==typeof e||"number"==typeof e?y(null,e,null,null,e):null!=e.__e||null!=e.__c?y(e.type,e.props,e.key,null,e.__v):e):e);return n}function k(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===h.test(t)?n+"px":null==n?"":n}function M(e,t,n,r,o){var i,a,s,l,u;if(o?"className"===t&&(t="class"):"class"===t&&(t="className"),"style"===t)if(i=e.style,"string"==typeof n)i.cssText=n;else{if("string"==typeof r&&(i.cssText="",r=null),r)for(l in r)n&&l in n||k(i,l,"");if(n)for(u in n)r&&n[u]===r[u]||k(i,u,n[u])}else"o"===t[0]&&"n"===t[1]?(a=t!==(t=t.replace(/Capture$/,"")),s=t.toLowerCase(),t=(s in e?s:t).slice(2),n?(r||e.addEventListener(t,x,a),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,x,a)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&!o&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==n||!1===n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):null==n||!1===n&&!/^ar/.test(t)?e.removeAttribute(t):e.setAttribute(t,n))}function x(e){this.l[e.type](i.event?i.event(e):e)}function _(e,t,n,r,o,a,s,l,u){var c,d,p,f,h,g,m,y,D,b,C=t.type;if(void 0!==t.constructor)return null;(c=i.__b)&&c(t);try{e:if("function"==typeof C){if(y=t.props,D=(c=C.contextType)&&r[c.__c],b=c?D?D.props.value:c.__:r,n.__c?m=(d=t.__c=n.__c).__=d.__E:("prototype"in C&&C.prototype.render?t.__c=d=new C(y,b):(t.__c=d=new S(y,b),d.constructor=C,d.render=O),D&&D.sub(d),d.props=y,d.state||(d.state={}),d.context=b,d.__n=r,p=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=C.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=v({},d.__s)),v(d.__s,C.getDerivedStateFromProps(y,d.__s))),f=d.props,h=d.state,p)null==C.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==C.getDerivedStateFromProps&&y!==f&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,b),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,b)||t.__v===n.__v&&!d.__){for(d.props=y,d.state=d.__s,t.__v!==n.__v&&(d.__d=!1),d.__v=t,t.__e=n.__e,t.__k=n.__k,d.__h.length&&s.push(d),c=0;c<t.__k.length;c++)t.__k[c]&&(t.__k[c].__=t);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,b),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(f,h,g)}))}d.context=b,d.props=y,d.state=d.__s,(c=i.__r)&&c(t),d.__d=!1,d.__v=t,d.__P=e,c=d.render(d.props,d.state,d.context),t.__k=null!=c&&c.type==E&&null==c.key?c.props.children:Array.isArray(c)?c:[c],null!=d.getChildContext&&(r=v(v({},r),d.getChildContext())),p||null==d.getSnapshotBeforeUpdate||(g=d.getSnapshotBeforeUpdate(f,h)),R(e,t,n,r,o,a,s,l,u),d.base=t.__e,d.__h.length&&s.push(d),m&&(d.__E=d.__=null),d.__e=!1}else null==a&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=P(n.__e,t,n,r,o,a,s,u);(c=i.diffed)&&c(t)}catch(e){t.__v=null,i.__e(e,t,n)}return t.__e}function I(e,t){i.__c&&i.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){i.__e(e,t.__v)}}))}function P(e,t,n,r,o,i,a,s){var l,u,c,d,h,v=n.props,g=t.props;if(o="svg"===t.type||o,null!=i)for(l=0;l<i.length;l++)if(null!=(u=i[l])&&((null===t.type?3===u.nodeType:u.localName===t.type)||e==u)){e=u,i[l]=null;break}if(null==e){if(null===t.type)return document.createTextNode(g);e=o?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,g.is&&{is:g.is}),i=null,s=!1}if(null===t.type)v!==g&&e.data!=g&&(e.data=g);else{if(null!=i&&(i=f.slice.call(e.childNodes)),c=(v=n.props||p).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!s){if(v===p)for(v={},h=0;h<e.attributes.length;h++)v[e.attributes[h].name]=e.attributes[h].value;(d||c)&&(d&&c&&d.__html==c.__html||(e.innerHTML=d&&d.__html||""))}(function(e,t,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in t||M(e,i,null,n[i],r);for(i in t)o&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||M(e,i,t[i],n[i],r)})(e,g,v,o,s),d?t.__k=[]:(t.__k=t.props.children,R(e,t,n,r,"foreignObject"!==t.type&&o,i,a,p,s)),s||("value"in g&&void 0!==(l=g.value)&&l!==e.value&&M(e,"value",l,v.value,!1),"checked"in g&&void 0!==(l=g.checked)&&l!==e.checked&&M(e,"checked",l,v.checked,!1))}return e}function N(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){i.__e(e,n)}}function H(e,t,n){var r,o,a;if(i.unmount&&i.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||N(r,null,t)),n||"function"==typeof e.type||(n=null!=(o=e.__e)),e.__e=e.__d=void 0,null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){i.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(a=0;a<r.length;a++)r[a]&&H(r[a],t,n);null!=o&&g(o)}function O(e,t,n){return this.constructor(e,n)}function A(e,t,n){var r,o,a;i.__&&i.__(e,t),o=(r=n===c)?null:n&&n.__k||t.__k,e=m(E,null,[e]),a=[],_(t,(r?t:n||t).__k=e,o||p,p,void 0!==t.ownerSVGElement,n&&!r?[n]:o?null:f.slice.call(t.childNodes),a,n||p,r),I(a,e)}i={__e:function(e,t){for(var n,r;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(e)),r)return C(n.__E=n)}catch(t){e=t}throw e}},S.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=v({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&v(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),C(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),C(this))},S.prototype.render=E,a=[],s=0,l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=p,d=0,("undefined"!=typeof globalThis?globalThis:window).FullCalendarVDom={Component:S,createElement:m,render:A,createRef:function(){return{}},Fragment:E,createContext:function(e){var t=function(e){var t={},n={__c:"__cC"+d++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,o=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=o,t},this.shouldComponentUpdate=function(e){o.props.value!==e.value&&r.some((function(t){t.context=e.value,C(t)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}(e),n=t.Provider;return t.Provider=function(){var e=this,t=!this.getChildContext,r=n.apply(this,arguments);if(t){var o=[];this.shouldComponentUpdate=function(t){e.props.value!==t.value&&o.some((function(e){e.context=t.value,e.forceUpdate()}))},this.sub=function(e){o.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){o.splice(o.indexOf(e),1),t&&t.call(e)}}}return r},t},flushToDom:function(){var e=i.debounceRendering,t=[];i.debounceRendering=function(e){t.push(e)},A(m(U,{}),document.createElement("div"));for(;t.length;)t.shift()();i.debounceRendering=e}};var U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return m("div",{})},t.prototype.componentDidMount=function(){this.setState({})},t}(S);var L=function(){function e(e,t){this.context=e,this.internalEventSource=t}return e.prototype.remove=function(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})},e.prototype.refetch=function(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId]})},Object.defineProperty(e.prototype,"id",{get:function(){return this.internalEventSource.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.internalEventSource.meta.url},enumerable:!1,configurable:!0}),e}();function W(e){e.parentNode&&e.parentNode.removeChild(e)}function V(e,t){if(e.closest)return e.closest(t);if(!document.documentElement.contains(e))return null;do{if(z(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function z(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function F(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],o=0;o<n.length;o++)for(var i=n[o].querySelectorAll(t),a=0;a<i.length;a++)r.push(i[a]);return r}var B=/(top|left|right|bottom|width|height)$/i;function j(e,t){for(var n in t)G(e,n,t[n])}function G(e,t,n){null==n?e.style[t]="":"number"==typeof n&&B.test(t)?e.style[t]=n+"px":e.style[t]=n}function q(e){e.preventDefault()}function Y(e,t){return function(n){var r=V(n.target,e);r&&t.call(r,n,r)}}function Z(e,t,n,r){var o=Y(n,r);return e.addEventListener(t,o),function(){e.removeEventListener(t,o)}}var X=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function K(e,t){var n=function(r){t(r),X.forEach((function(t){e.removeEventListener(t,n)}))};X.forEach((function(t){e.addEventListener(t,n)}))}var J=0;function $(){return String(J++)}function Q(){document.body.classList.add("fc-not-allowed")}function ee(){document.body.classList.remove("fc-not-allowed")}function te(e){e.classList.add("fc-unselectable"),e.addEventListener("selectstart",q)}function ne(e){e.classList.remove("fc-unselectable"),e.removeEventListener("selectstart",q)}function re(e){e.addEventListener("contextmenu",q)}function oe(e){e.removeEventListener("contextmenu",q)}function ie(e){var t,n,r=[],o=[];for("string"==typeof e?o=e.split(/\s*,\s*/):"function"==typeof e?o=[e]:Array.isArray(e)&&(o=e),t=0;t<o.length;t++)"string"==typeof(n=o[t])?r.push("-"===n.charAt(0)?{field:n.substring(1),order:-1}:{field:n,order:1}):"function"==typeof n&&r.push({func:n});return r}function ae(e,t,n){var r,o;for(r=0;r<n.length;r++)if(o=se(e,t,n[r]))return o;return 0}function se(e,t,n){return n.func?n.func(e,t):le(e[n.field],t[n.field])*(n.order||1)}function le(e,t){return e||t?null==t?-1:null==e?1:"string"==typeof e||"string"==typeof t?String(e).localeCompare(String(t)):e-t:0}function ue(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function ce(e,t){return e-t}function de(e){return e%1==0}function pe(e){var t=e.querySelector(".fc-scrollgrid-shrink-frame"),n=e.querySelector(".fc-scrollgrid-shrink-cushion");if(!t)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return e.getBoundingClientRect().width-t.getBoundingClientRect().width+n.getBoundingClientRect().width}var fe=["sun","mon","tue","wed","thu","fri","sat"];function he(e,t){var n=ke(e);return n[2]+=7*t,Me(n)}function ve(e,t){var n=ke(e);return n[2]+=t,Me(n)}function ge(e,t){var n=ke(e);return n[6]+=t,Me(n)}function me(e,t){return ye(e,t)/7}function ye(e,t){return(t.valueOf()-e.valueOf())/864e5}function Ee(e,t){var n=be(e),r=be(t);return{years:0,months:0,days:Math.round(ye(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function Se(e,t){var n=De(e,t);return null!==n&&n%7==0?n/7:null}function De(e,t){return _e(e)===_e(t)?Math.round(ye(e,t)):null}function be(e){return Me([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function Ce(e,t,n,r){var o=Me([t,0,1+we(t,n,r)]),i=be(e),a=Math.round(ye(o,i));return Math.floor(a/7)+1}function we(e,t,n){var r=7+t-n;return-((7+Me([e,0,r]).getUTCDay()-t)%7)+r-1}function Re(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function Te(e){return new Date(e[0],e[1]||0,null==e[2]?1:e[2],e[3]||0,e[4]||0,e[5]||0)}function ke(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function Me(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function xe(e){return!isNaN(e.valueOf())}function _e(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function Ie(e,t,n,r){return{instanceId:$(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var Pe=Object.prototype.hasOwnProperty;function Ne(e,t){var n={};if(t)for(var r in t){for(var o=[],i=e.length-1;i>=0;i--){var a=e[i][r];if("object"==typeof a&&a)o.unshift(a);else if(void 0!==a){n[r]=a;break}}o.length&&(n[r]=Ne(o))}for(i=e.length-1;i>=0;i--){var s=e[i];for(var l in s)l in n||(n[l]=s[l])}return n}function He(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Oe(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Ae(e){for(var t={},n=0,r=e;n<r.length;n++){t[r[n]]=!0}return t}function Ue(e){var t=[];for(var n in e)t.push(e[n]);return t}function Le(e,t){if(e===t)return!0;for(var n in e)if(Pe.call(e,n)&&!(n in t))return!1;for(var n in t)if(Pe.call(t,n)&&e[n]!==t[n])return!1;return!0}function We(e,t){var n=[];for(var r in e)Pe.call(e,r)&&(r in t||n.push(r));for(var r in t)Pe.call(t,r)&&e[r]!==t[r]&&n.push(r);return n}function Ve(e,t,n){if(void 0===n&&(n={}),e===t)return!0;for(var r in t)if(!(r in e)||!ze(e[r],t[r],n[r]))return!1;for(var r in e)if(!(r in t))return!1;return!0}function ze(e,t,n){return e===t||!0===n||!!n&&n(e,t)}function Fe(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=1);var o=[];null==n&&(n=Object.keys(e).length);for(var i=t;i<n;i+=r){var a=e[i];void 0!==a&&o.push(a)}return o}function Be(e,t,n){var r=n.dateEnv,o=n.pluginHooks,i=n.options,a=e.defs,s=e.instances;for(var l in s=He(s,(function(e){return!a[e.defId].recurringDef})),a){var u=a[l];if(u.recurringDef){var c=u.recurringDef.duration;c||(c=u.allDay?i.defaultAllDayEventDuration:i.defaultTimedEventDuration);for(var d=0,p=je(u,c,t,r,o.recurringTypes);d<p.length;d++){var f=p[d],h=Ie(l,{start:f,end:r.add(f,c)});s[h.instanceId]=h}}}return{defs:a,instances:s}}function je(e,t,n,r,o){var i=o[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(i=i.map(be)),i}var Ge=["years","months","days","milliseconds"],qe=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function Ye(e,t){var n;return"string"==typeof e?function(e){var t=qe.exec(e);if(t){var n=t[1]?-1:1;return{years:0,months:0,days:n*(t[2]?parseInt(t[2],10):0),milliseconds:n*(60*(t[3]?parseInt(t[3],10):0)*60*1e3+60*(t[4]?parseInt(t[4],10):0)*1e3+1e3*(t[5]?parseInt(t[5],10):0)+(t[6]?parseInt(t[6],10):0))}}return null}(e):"object"==typeof e&&e?Ze(e):"number"==typeof e?Ze(((n={})[t||"milliseconds"]=e,n)):null}function Ze(e){var t={years:e.years||e.year||0,months:e.months||e.month||0,days:e.days||e.day||0,milliseconds:60*(e.hours||e.hour||0)*60*1e3+60*(e.minutes||e.minute||0)*1e3+1e3*(e.seconds||e.second||0)+(e.milliseconds||e.millisecond||e.ms||0)},n=e.weeks||e.week;return n&&(t.days+=7*n,t.specifiedWeeks=!0),t}function Xe(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function Ke(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}function Je(e){return $e(e)/864e5}function $e(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function Qe(e,t){for(var n=null,r=0;r<Ge.length;r++){var o=Ge[r];if(t[o]){var i=e[o]/t[o];if(!de(i)||null!==n&&n!==i)return null;n=i}else if(e[o])return null}return n}function et(e){var t=e.milliseconds;if(t){if(t%1e3!=0)return{unit:"millisecond",value:t};if(t%6e4!=0)return{unit:"second",value:t/1e3};if(t%36e5!=0)return{unit:"minute",value:t/6e4};if(t)return{unit:"hour",value:t/36e5}}return e.days?e.specifiedWeeks&&e.days%7==0?{unit:"week",value:e.days/7}:{unit:"day",value:e.days}:e.months?{unit:"month",value:e.months}:e.years?{unit:"year",value:e.years}:{unit:"millisecond",value:0}}function tt(e){return e.toISOString().replace(/T.*$/,"")}function nt(e){return ue(e.getUTCHours(),2)+":"+ue(e.getUTCMinutes(),2)+":"+ue(e.getUTCSeconds(),2)}function rt(e,t){void 0===t&&(t=!1);var n=e<0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),i=Math.round(r%60);return t?n+ue(o,2)+":"+ue(i,2):"GMT"+n+o+(i?":"+ue(i,2):"")}function ot(e,t,n){if(e===t)return!0;var r,o=e.length;if(o!==t.length)return!1;for(r=0;r<o;r++)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}function it(e,t,n){var r,o;return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(r){if(!ot(r,i)){n&&n(o);var s=e.apply(this,i);t&&t(s,o)||(o=s)}}else o=e.apply(this,i);return r=i,o}}function at(e,t,n){var r,o;return function(i){if(r){if(!Le(r,i)){n&&n(o);var a=e.call(this,i);t&&t(a,o)||(o=a)}}else o=e.call(this,i);return r=i,o}}var st={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},lt={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},ut=/\s*([ap])\.?m\.?/i,ct=/,/g,dt=/\s+/g,pt=/\u200e/g,ft=/UTC|GMT/,ht=function(){function e(e){var t={},n={},r=0;for(var o in e)o in st?(n[o]=e[o],r=Math.max(st[o],r)):(t[o]=e[o],o in lt&&(r=Math.max(lt[o],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=it(vt)}return e.prototype.format=function(e,t){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,t)(e)},e.prototype.formatRange=function(e,t,n,r){var o=this.standardDateProps,i=this.extendedSettings,a=function(e,t,n){if(n.getMarkerYear(e)!==n.getMarkerYear(t))return 5;if(n.getMarkerMonth(e)!==n.getMarkerMonth(t))return 4;if(n.getMarkerDay(e)!==n.getMarkerDay(t))return 2;if(_e(e)!==_e(t))return 1;return 0}(e.marker,t.marker,n.calendarSystem);if(!a)return this.format(e,n);var s=a;!(s>1)||"numeric"!==o.year&&"2-digit"!==o.year||"numeric"!==o.month&&"2-digit"!==o.month||"numeric"!==o.day&&"2-digit"!==o.day||(s=1);var l=this.format(e,n),u=this.format(t,n);if(l===u)return l;var c=vt(function(e,t){var n={};for(var r in e)(!(r in lt)||lt[r]<=t)&&(n[r]=e[r]);return n}(o,s),i,n),d=c(e),p=c(t),f=function(e,t,n,r){var o=0;for(;o<e.length;){var i=e.indexOf(t,o);if(-1===i)break;var a=e.substr(0,i);o=i+t.length;for(var s=e.substr(o),l=0;l<n.length;){var u=n.indexOf(r,l);if(-1===u)break;var c=n.substr(0,u);l=u+r.length;var d=n.substr(l);if(a===c&&s===d)return{before:a,after:s}}}return null}(l,d,u,p),h=i.separator||r||n.defaultSeparator||"";return f?f.before+d+h+p+f.after:l+h+u},e.prototype.getLargestUnit=function(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}},e}();function vt(e,t,n){var o=Object.keys(e).length;return 1===o&&"short"===e.timeZoneName?function(e){return rt(e.timeZoneOffset)}:0===o&&t.week?function(e){return function(e,t,n,r){var o=[];"narrow"===r?o.push(t):"short"===r&&o.push(t," ");o.push(n.simpleNumberFormat.format(e)),"rtl"===n.options.direction&&o.reverse();return o.join("")}(n.computeWeekNumber(e.marker),n.weekText,n.locale,t.week)}:function(e,t,n){e=r({},e),t=r({},t),function(e,t){e.timeZoneName&&(e.hour||(e.hour="2-digit"),e.minute||(e.minute="2-digit"));"long"===e.timeZoneName&&(e.timeZoneName="short");t.omitZeroMinute&&(e.second||e.millisecond)&&delete t.omitZeroMinute}(e,t),e.timeZone="UTC";var o,i=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){var a=r({},e);delete a.minute,o=new Intl.DateTimeFormat(n.locale.codes,a)}return function(r){var a=r.marker;return function(e,t,n,r,o){e=e.replace(pt,""),"short"===n.timeZoneName&&(e=function(e,t){var n=!1;e=e.replace(ft,(function(){return n=!0,t})),n||(e+=" "+t);return e}(e,"UTC"===o.timeZone||null==t.timeZoneOffset?"UTC":rt(t.timeZoneOffset)));r.omitCommas&&(e=e.replace(ct,"").trim());r.omitZeroMinute&&(e=e.replace(":00",""));!1===r.meridiem?e=e.replace(ut,"").trim():"narrow"===r.meridiem?e=e.replace(ut,(function(e,t){return t.toLocaleLowerCase()})):"short"===r.meridiem?e=e.replace(ut,(function(e,t){return t.toLocaleLowerCase()+"m"})):"lowercase"===r.meridiem&&(e=e.replace(ut,(function(e){return e.toLocaleLowerCase()})));return e=(e=e.replace(dt," ")).trim()}((o&&!a.getUTCMinutes()?o:i).format(a),r,e,t,n)}}(e,t,n)}function gt(e,t){var n=t.markerToArray(e.marker);return{marker:e.marker,timeZoneOffset:e.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function mt(e,t,n,r){var o=gt(e,n.calendarSystem);return{date:o,start:o,end:t?gt(t,n.calendarSystem):null,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}var yt=function(){function e(e){this.cmdStr=e}return e.prototype.format=function(e,t,n){return t.cmdFormatter(this.cmdStr,mt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return n.cmdFormatter(this.cmdStr,mt(e,t,n,r))},e}(),Et=function(){function e(e){this.func=e}return e.prototype.format=function(e,t,n){return this.func(mt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return this.func(mt(e,t,n,r))},e}();function St(e){return"object"==typeof e&&e?new ht(e):"string"==typeof e?new yt(e):"function"==typeof e?new Et(e):void 0}var Dt={navLinkDayClick:_t,navLinkWeekClick:_t,duration:Ye,bootstrapFontAwesome:_t,buttonIcons:_t,customButtons:_t,defaultAllDayEventDuration:Ye,defaultTimedEventDuration:Ye,nextDayThreshold:Ye,scrollTime:Ye,slotMinTime:Ye,slotMaxTime:Ye,dayPopoverFormat:St,slotDuration:Ye,snapDuration:Ye,headerToolbar:_t,footerToolbar:_t,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:St,dayHeaderClassNames:_t,dayHeaderContent:_t,dayHeaderDidMount:_t,dayHeaderWillUnmount:_t,dayCellClassNames:_t,dayCellContent:_t,dayCellDidMount:_t,dayCellWillUnmount:_t,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:_t,weekNumbers:Boolean,weekNumberClassNames:_t,weekNumberContent:_t,weekNumberDidMount:_t,weekNumberWillUnmount:_t,editable:Boolean,viewClassNames:_t,viewDidMount:_t,viewWillUnmount:_t,nowIndicator:Boolean,nowIndicatorClassNames:_t,nowIndicatorContent:_t,nowIndicatorDidMount:_t,nowIndicatorWillUnmount:_t,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:_t,locale:_t,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:_t,eventOrder:ie,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:_t,contentHeight:_t,direction:String,weekNumberFormat:St,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,progressiveEventRendering:Boolean,businessHours:_t,initialDate:_t,now:_t,eventDataTransform:_t,stickyHeaderDates:_t,stickyFooterScrollbar:_t,viewHeight:_t,defaultAllDay:Boolean,eventSourceFailure:_t,eventSourceSuccess:_t,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:_t,eventConstraint:_t,eventAllow:_t,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:_t,eventContent:_t,eventDidMount:_t,eventWillUnmount:_t,selectConstraint:_t,selectOverlap:_t,selectAllow:_t,droppable:Boolean,unselectCancel:String,slotLabelFormat:_t,slotLaneClassNames:_t,slotLaneContent:_t,slotLaneDidMount:_t,slotLaneWillUnmount:_t,slotLabelClassNames:_t,slotLabelContent:_t,slotLabelDidMount:_t,slotLabelWillUnmount:_t,dayMaxEvents:_t,dayMaxEventRows:_t,dayMinWidth:Number,slotLabelInterval:Ye,allDayText:String,allDayClassNames:_t,allDayContent:_t,allDayDidMount:_t,allDayWillUnmount:_t,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:St,rerenderDelay:Number,moreLinkText:_t,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMinHeight:Number,slotEventOverlap:Boolean,plugins:_t,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:Ye,hiddenDays:_t,monthMode:Boolean,fixedWeekCount:Boolean,validRange:_t,visibleRange:_t,titleFormat:_t,noEventsText:String},bt={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" \u2013 ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1},Ct={datesSet:_t,eventsSet:_t,eventAdd:_t,eventChange:_t,eventRemove:_t,windowResize:_t,eventClick:_t,eventMouseEnter:_t,eventMouseLeave:_t,select:_t,unselect:_t,loading:_t,_unmount:_t,_beforeprint:_t,_afterprint:_t,_noEventDrop:_t,_noEventResize:_t,_resize:_t,_scrollRequest:_t},wt={buttonText:_t,views:_t,plugins:_t,initialEvents:_t,events:_t,eventSources:_t},Rt={headerToolbar:Tt,footerToolbar:Tt,buttonText:Tt,buttonIcons:Tt};function Tt(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?Le(e,t):e===t}var kt={type:String,component:_t,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:_t,usesMinMaxTime:Boolean,classNames:_t,content:_t,didMount:_t,willUnmount:_t};function Mt(e){return Ne(e,Rt)}function xt(e,t){var n={},r={};for(var o in t)o in e&&(n[o]=t[o](e[o]));for(var o in e)o in t||(r[o]=e[o]);return{refined:n,extra:r}}function _t(e){return e}function It(e,t,n,r){for(var o={defs:{},instances:{}},i=Zt(n),a=0,s=e;a<s.length;a++){var l=qt(s[a],t,n,r,i);l&&Pt(l,o)}return o}function Pt(e,t){return void 0===t&&(t={defs:{},instances:{}}),t.defs[e.def.defId]=e.def,e.instance&&(t.instances[e.instance.instanceId]=e.instance),t}function Nt(e,t){var n=e.instances[t];if(n){var r=e.defs[n.defId],o=At(e,(function(e){return t=r,n=e,Boolean(t.groupId&&t.groupId===n.groupId);var t,n}));return o.defs[r.defId]=r,o.instances[n.instanceId]=n,o}return{defs:{},instances:{}}}function Ht(){return{defs:{},instances:{}}}function Ot(e,t){return{defs:r(r({},e.defs),t.defs),instances:r(r({},e.instances),t.instances)}}function At(e,t){var n=He(e.defs,t),r=He(e.instances,(function(e){return n[e.defId]}));return{defs:n,instances:r}}function Ut(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}var Lt={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:_t,overlap:_t,allow:_t,className:Ut,classNames:Ut,color:String,backgroundColor:String,borderColor:String,textColor:String};function Wt(e,t){var n=function(e,t){return Array.isArray(e)?It(e,null,t,!0):"object"==typeof e&&e?It([e],null,t,!0):null!=e?String(e):null}(e.constraint,t);return{display:e.display||null,startEditable:null!=e.startEditable?e.startEditable:e.editable,durationEditable:null!=e.durationEditable?e.durationEditable:e.editable,constraints:null!=n?[n]:[],overlap:null!=e.overlap?e.overlap:null,allows:null!=e.allow?[e.allow]:[],backgroundColor:e.backgroundColor||e.color||"",borderColor:e.borderColor||e.color||"",textColor:e.textColor||"",classNames:(e.className||[]).concat(e.classNames||[])}}function Vt(e){return e.reduce(zt,Ft)}function zt(e,t){return{display:null!=t.display?t.display:e.display,startEditable:null!=t.startEditable?t.startEditable:e.startEditable,durationEditable:null!=t.durationEditable?t.durationEditable:e.durationEditable,constraints:e.constraints.concat(t.constraints),overlap:"boolean"==typeof t.overlap?t.overlap:e.overlap,allows:e.allows.concat(t.allows),backgroundColor:t.backgroundColor||e.backgroundColor,borderColor:t.borderColor||e.borderColor,textColor:t.textColor||e.textColor,classNames:e.classNames.concat(t.classNames)}}var Ft={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]},Bt={id:String,groupId:String,title:String,url:String},jt={start:_t,end:_t,date:_t,allDay:Boolean},Gt=r(r(r({},Bt),jt),{extendedProps:_t});function qt(e,t,n,r,o){void 0===o&&(o=Zt(n));var i=Yt(e,n,o),a=i.refined,s=i.extra,l=function(e,t){var n=null;e&&(n=e.defaultAllDay);null==n&&(n=t.options.defaultAllDay);return n}(t,n),u=function(e,t,n,r){for(var o=0;o<r.length;o++){var i=r[o].parse(e,n);if(i){var a=e.allDay;return null==a&&null==(a=t)&&null==(a=i.allDayGuess)&&(a=!1),{allDay:a,duration:i.duration,typeData:i.typeData,typeId:o}}}return null}(a,l,n.dateEnv,n.pluginHooks.recurringTypes);if(u)return(c=Xt(a,s,t?t.sourceId:"",u.allDay,Boolean(u.duration),n)).recurringDef={typeId:u.typeId,typeData:u.typeData,duration:u.duration},{def:c,instance:null};var c,d=function(e,t,n,r){var o,i,a=e.allDay,s=null,l=!1,u=null,c=null!=e.start?e.start:e.date;if(o=n.dateEnv.createMarkerMeta(c))s=o.marker;else if(!r)return null;null!=e.end&&(i=n.dateEnv.createMarkerMeta(e.end));null==a&&(a=null!=t?t:(!o||o.isTimeUnspecified)&&(!i||i.isTimeUnspecified));a&&s&&(s=be(s));i&&(u=i.marker,a&&(u=be(u)),s&&u<=s&&(u=null));u?l=!0:r||(l=n.options.forceEventDuration||!1,u=n.dateEnv.add(s,a?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration));return{allDay:a,hasEnd:l,range:{start:s,end:u},forcedStartTzo:o?o.forcedTzo:null,forcedEndTzo:i?i.forcedTzo:null}}(a,l,n,r);return d?{def:c=Xt(a,s,t?t.sourceId:"",d.allDay,d.hasEnd,n),instance:Ie(c.defId,d.range,d.forcedStartTzo,d.forcedEndTzo)}:null}function Yt(e,t,n){return void 0===n&&(n=Zt(t)),xt(e,n)}function Zt(e){return r(r(r({},Lt),Gt),e.pluginHooks.eventRefiners)}function Xt(e,t,n,o,i,a){for(var s={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:$(),sourceId:n,allDay:o,hasEnd:i,ui:Wt(e,a),extendedProps:r(r({},e.extendedProps||{}),t)},l=0,u=a.pluginHooks.eventDefMemberAdders;l<u.length;l++){var c=u[l];r(s,c(e))}return Object.freeze(s.ui.classNames),Object.freeze(s.extendedProps),s}function Kt(e){var t=Math.floor(ye(e.start,e.end))||1,n=be(e.start);return{start:n,end:ve(n,t)}}function Jt(e,t){void 0===t&&(t=Ye(0));var n=null,r=null;if(e.end){r=be(e.end);var o=e.end.valueOf()-r.valueOf();o&&o>=$e(t)&&(r=ve(r,1))}return e.start&&(n=be(e.start),r&&r<=n&&(r=ve(n,1))),{start:n,end:r}}function $t(e){var t=Jt(e);return ye(t.start,t.end)>1}function Qt(e,t,n,r){return"year"===r?Ye(n.diffWholeYears(e,t),"year"):"month"===r?Ye(n.diffWholeMonths(e,t),"month"):Ee(e,t)}function en(e,t){var n,r,o=[],i=t.start;for(e.sort(tn),n=0;n<e.length;n++)(r=e[n]).start>i&&o.push({start:i,end:r.start}),r.end>i&&(i=r.end);return i<t.end&&o.push({start:i,end:t.end}),o}function tn(e,t){return e.start.valueOf()-t.start.valueOf()}function nn(e,t){var n=e.start,r=e.end,o=null;return null!==t.start&&(n=null===n?t.start:new Date(Math.max(n.valueOf(),t.start.valueOf()))),null!=t.end&&(r=null===r?t.end:new Date(Math.min(r.valueOf(),t.end.valueOf()))),(null===n||null===r||n<r)&&(o={start:n,end:r}),o}function rn(e,t){return(null===e.start?null:e.start.valueOf())===(null===t.start?null:t.start.valueOf())&&(null===e.end?null:e.end.valueOf())===(null===t.end?null:t.end.valueOf())}function on(e,t){return(null===e.end||null===t.start||e.end>t.start)&&(null===e.start||null===t.end||e.start<t.end)}function an(e,t){return(null===e.start||null!==t.start&&t.start>=e.start)&&(null===e.end||null!==t.end&&t.end<=e.end)}function sn(e,t){return(null===e.start||t>=e.start)&&(null===e.end||t<e.end)}function ln(e,t,n,r){var o={},i={},a={},s=[],l=[],u=pn(e.defs,t);for(var c in e.defs){"inverse-background"===(f=u[(S=e.defs[c]).defId]).display&&(S.groupId?(o[S.groupId]=[],a[S.groupId]||(a[S.groupId]=S)):i[c]=[])}for(var d in e.instances){var p=e.instances[d],f=u[(S=e.defs[p.defId]).defId],h=p.range,v=!S.allDay&&r?Jt(h,r):h,g=nn(v,n);g&&("inverse-background"===f.display?S.groupId?o[S.groupId].push(g):i[p.defId].push(g):"none"!==f.display&&("background"===f.display?s:l).push({def:S,ui:f,instance:p,range:g,isStart:v.start&&v.start.valueOf()===g.start.valueOf(),isEnd:v.end&&v.end.valueOf()===g.end.valueOf()}))}for(var m in o)for(var y=0,E=en(o[m],n);y<E.length;y++){var S,D=E[y];f=u[(S=a[m]).defId];s.push({def:S,ui:f,instance:null,range:D,isStart:!1,isEnd:!1})}for(var c in i)for(var b=0,C=en(i[c],n);b<C.length;b++){D=C[b];s.push({def:e.defs[c],ui:u[c],instance:null,range:D,isStart:!1,isEnd:!1})}return{bg:s,fg:l}}function un(e){return"background"===e.ui.display||"inverse-background"===e.ui.display}function cn(e,t){e.fcSeg=t}function dn(e){return e.fcSeg||e.parentNode.fcSeg||null}function pn(e,t){return Oe(e,(function(e){return fn(e,t)}))}function fn(e,t){var n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),Vt(n)}function hn(e,t){var n=e.map(vn);return n.sort((function(e,n){return ae(e,n,t)})),n.map((function(e){return e._seg}))}function vn(e){var t=e.eventRange,n=t.def,o=t.instance?t.instance.range:t.range,i=o.start?o.start.valueOf():0,a=o.end?o.end.valueOf():0;return r(r(r({},n.extendedProps),n),{id:n.publicId,start:i,end:a,duration:a-i,allDay:Number(n.allDay),_seg:e})}function gn(e,t){for(var n=t.pluginHooks.isDraggableTransformers,r=e.eventRange,o=r.def,i=r.ui,a=i.startEditable,s=0,l=n;s<l.length;s++){a=(0,l[s])(a,o,i,t)}return a}function mn(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function yn(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function En(e,t,n,r,o,i,a){var s=n.dateEnv,l=n.options,u=l.displayEventTime,c=l.displayEventEnd,d=e.eventRange.def,p=e.eventRange.instance;if(null==u&&(u=!1!==r),null==c&&(c=!1!==o),u&&!d.allDay&&(e.isStart||e.isEnd)){var f=i||(e.isStart?p.range.start:e.start||e.eventRange.range.start),h=a||(e.isEnd?p.range.end:e.end||e.eventRange.range.end);return c&&d.hasEnd?s.formatRange(f,h,t,{forcedStartTzo:i?null:p.forcedStartTzo,forcedEndTzo:a?null:p.forcedEndTzo}):s.format(f,t,{forcedTzo:i?null:p.forcedStartTzo})}return""}function Sn(e,t,n){var r=e.eventRange.range;return{isPast:r.end<(n||t.start),isFuture:r.start>=(n||t.end),isToday:t&&sn(t,r.start)}}function Dn(e){var t=["fc-event"];return e.isMirror&&t.push("fc-event-mirror"),e.isDraggable&&t.push("fc-event-draggable"),(e.isStartResizable||e.isEndResizable)&&t.push("fc-event-resizable"),e.isDragging&&t.push("fc-event-dragging"),e.isResizing&&t.push("fc-event-resizing"),e.isSelected&&t.push("fc-event-selected"),e.isStart&&t.push("fc-event-start"),e.isEnd&&t.push("fc-event-end"),e.isPast&&t.push("fc-event-past"),e.isToday&&t.push("fc-event-today"),e.isFuture&&t.push("fc-event-future"),t}function bn(e){return e.instance?e.instance.instanceId:e.def.defId+":"+e.range.start.toISOString()}var Cn={start:_t,end:_t,allDay:Boolean};function wn(e,t,n){var o=function(e,t){var n=xt(e,Cn),o=n.refined,i=n.extra,a=o.start?t.createMarkerMeta(o.start):null,s=o.end?t.createMarkerMeta(o.end):null,l=o.allDay;null==l&&(l=a&&a.isTimeUnspecified&&(!s||s.isTimeUnspecified));return r({range:{start:a?a.marker:null,end:s?s.marker:null},allDay:l},i)}(e,t),i=o.range;if(!i.start)return null;if(!i.end){if(null==n)return null;i.end=t.add(i.start,n)}return o}function Rn(e,t){return rn(e.range,t.range)&&e.allDay===t.allDay&&function(e,t){for(var n in t)if("range"!==n&&"allDay"!==n&&e[n]!==t[n])return!1;for(var n in e)if(!(n in t))return!1;return!0}(e,t)}function Tn(e,t,n){return r(r({},kn(e,t,n)),{timeZone:t.timeZone})}function kn(e,t,n){return{start:t.toDate(e.start),end:t.toDate(e.end),startStr:t.formatIso(e.start,{omitTime:n}),endStr:t.formatIso(e.end,{omitTime:n})}}function Mn(e,t,n){var r=Yt({editable:!1},n),o=Xt(r.refined,r.extra,"",e.allDay,!0,n);return{def:o,ui:fn(o,t),instance:Ie(o.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}function xn(e,t,n){n.emitter.trigger("select",r(r({},_n(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function _n(e,t){for(var n,o,i={},a=0,s=t.pluginHooks.dateSpanTransforms;a<s.length;a++){var l=s[a];r(i,l(e,t))}return r(i,(n=e,o=t.dateEnv,r(r({},kn(n.range,o,n.allDay)),{allDay:n.allDay}))),i}function In(e,t,n){var r=n.dateEnv,o=n.options,i=t;return e?(i=be(i),i=r.add(i,o.defaultAllDayEventDuration)):i=r.add(i,o.defaultTimedEventDuration),i}function Pn(e,t,n,r){var o=pn(e.defs,t),i={defs:{},instances:{}};for(var a in e.defs){var s=e.defs[a];i.defs[a]=Nn(s,o[a],n,r)}for(var l in e.instances){var u=e.instances[l];s=i.defs[u.defId];i.instances[l]=Hn(u,s,o[u.defId],n,r)}return i}function Nn(e,t,n,o){var i=n.standardProps||{};null==i.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);var a=r(r(r({},e),i),{ui:r(r({},e.ui),i.ui)});n.extendedProps&&(a.extendedProps=r(r({},a.extendedProps),n.extendedProps));for(var s=0,l=o.pluginHooks.eventDefMutationAppliers;s<l.length;s++){(0,l[s])(a,n,o)}return!a.hasEnd&&o.options.forceEventDuration&&(a.hasEnd=!0),a}function Hn(e,t,n,o,i){var a=i.dateEnv,s=o.standardProps&&!0===o.standardProps.allDay,l=o.standardProps&&!1===o.standardProps.hasEnd,u=r({},e);return s&&(u.range=Kt(u.range)),o.datesDelta&&n.startEditable&&(u.range={start:a.add(u.range.start,o.datesDelta),end:a.add(u.range.end,o.datesDelta)}),o.startDelta&&n.durationEditable&&(u.range={start:a.add(u.range.start,o.startDelta),end:u.range.end}),o.endDelta&&n.durationEditable&&(u.range={start:u.range.start,end:a.add(u.range.end,o.endDelta)}),l&&(u.range={start:u.range.start,end:In(t.allDay,u.range.start,i)}),t.allDay&&(u.range={start:be(u.range.start),end:be(u.range.end)}),u.range.end<u.range.start&&(u.range.end=In(t.allDay,u.range.start,i)),u}var On=function(){function e(e,t,n){this.type=e,this.getCurrentData=t,this.dateEnv=n}return Object.defineProperty(e.prototype,"calendar",{get:function(){return this.getCurrentData().calendarApi},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this.getCurrentData().viewTitle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentStart",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentEnd",{get:function(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)},enumerable:!1,configurable:!0}),e.prototype.getOption=function(e){return this.getCurrentData().options[e]},e}(),An={id:String,defaultAllDay:Boolean,url:String,events:_t,eventDataTransform:_t,success:_t,failure:_t};function Un(e,t,n){var r;if(void 0===n&&(n=Ln(t)),"string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){var o=xt(r,n),i=o.refined,a=o.extra,s=function(e,t){for(var n=t.pluginHooks.eventSourceDefs,r=n.length-1;r>=0;r--){var o=n[r].parseMeta(e);if(o)return{sourceDefId:r,meta:o}}return null}(i,t);if(s)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:$(),sourceDefId:s.sourceDefId,meta:s.meta,ui:Wt(i,t),extendedProps:a}}return null}function Ln(e){return r(r(r({},Lt),An),e.pluginHooks.eventSourceRefiners)}function Wn(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var Vn=function(){function e(){}return e.prototype.getCurrentData=function(){return this.currentDataManager.getCurrentData()},e.prototype.dispatch=function(e){return this.currentDataManager.dispatch(e)},Object.defineProperty(e.prototype,"view",{get:function(){return this.getCurrentData().viewApi},enumerable:!1,configurable:!0}),e.prototype.batchRendering=function(e){e()},e.prototype.updateSize=function(){this.trigger("_resize",!0)},e.prototype.setOption=function(e,t){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:t})},e.prototype.getOption=function(e){return this.currentDataManager.currentCalendarOptionsInput[e]},e.prototype.getAvailableLocaleCodes=function(){return Object.keys(this.getCurrentData().availableRawLocales)},e.prototype.on=function(e,t){var n=this.currentDataManager;n.currentCalendarOptionsRefiners[e]?n.emitter.on(e,t):console.warn("Unknown listener name '"+e+"'")},e.prototype.off=function(e,t){this.currentDataManager.emitter.off(e,t)},e.prototype.trigger=function(e){for(var t,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];(t=this.currentDataManager.emitter).trigger.apply(t,o([e],n))},e.prototype.changeView=function(e,t){var n=this;this.batchRendering((function(){if(n.unselect(),t)if(t.start&&t.end)n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),n.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:t});else{var r=n.getCurrentData().dateEnv;n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(t)})}else n.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})}))},e.prototype.zoomTo=function(e,t){var n;t=t||"day",n=this.getCurrentData().viewSpecs[t]||this.getUnitViewSpec(t),this.unselect(),n?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:n.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})},e.prototype.getUnitViewSpec=function(e){var t,n,r=this.getCurrentData(),o=r.viewSpecs,i=r.toolbarConfig,a=[].concat(i.viewsWithButtons);for(var s in o)a.push(s);for(t=0;t<a.length;t++)if((n=o[a[t]])&&n.singleUnit===e)return n},e.prototype.prev=function(){this.unselect(),this.dispatch({type:"PREV"})},e.prototype.next=function(){this.unselect(),this.dispatch({type:"NEXT"})},e.prototype.prevYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})},e.prototype.nextYear=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})},e.prototype.today=function(){var e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:Wn(e.calendarOptions.now,e.dateEnv)})},e.prototype.gotoDate=function(e){var t=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.createMarker(e)})},e.prototype.incrementDate=function(e){var t=this.getCurrentData(),n=Ye(e);n&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:t.dateEnv.add(t.currentDate,n)}))},e.prototype.getDate=function(){var e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)},e.prototype.formatDate=function(e,t){var n=this.getCurrentData().dateEnv;return n.format(n.createMarker(e),St(t))},e.prototype.formatRange=function(e,t,n){var r=this.getCurrentData().dateEnv;return r.formatRange(r.createMarker(e),r.createMarker(t),St(n),n)},e.prototype.formatIso=function(e,t){var n=this.getCurrentData().dateEnv;return n.formatIso(n.createMarker(e),{omitTime:t})},e.prototype.select=function(e,t){var n;n=null==t?null!=e.start?e:{start:e,end:null}:{start:e,end:t};var r=this.getCurrentData(),o=wn(n,r.dateEnv,Ye({days:1}));o&&(this.dispatch({type:"SELECT_DATES",selection:o}),xn(o,null,r))},e.prototype.unselect=function(e){var t=this.getCurrentData();t.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),function(e,t){t.emitter.trigger("unselect",{jsEvent:e?e.origEvent:null,view:t.viewApi||t.calendarApi.view})}(e,t))},e.prototype.addEvent=function(e,t){if(e instanceof zn){var n=e._def,r=e._instance;return this.getCurrentData().eventStore.defs[n.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:Pt({def:n,instance:r})}),this.triggerEventAdd(e)),e}var o,i=this.getCurrentData();if(t instanceof L)o=t.internalEventSource;else if("boolean"==typeof t)t&&(o=Ue(i.eventSources)[0]);else if(null!=t){var a=this.getEventSourceById(t);if(!a)return console.warn('Could not find an event source with ID "'+t+'"'),null;o=a.internalEventSource}var s=qt(e,o,i,!1);if(s){var l=new zn(i,s.def,s.def.recurringDef?null:s.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:Pt(s)}),this.triggerEventAdd(l),l}return null},e.prototype.triggerEventAdd=function(e){var t=this;this.getCurrentData().emitter.trigger("eventAdd",{event:e,relatedEvents:[],revert:function(){t.dispatch({type:"REMOVE_EVENTS",eventStore:Fn(e)})}})},e.prototype.getEventById=function(e){var t=this.getCurrentData(),n=t.eventStore,r=n.defs,o=n.instances;for(var i in e=String(e),r){var a=r[i];if(a.publicId===e){if(a.recurringDef)return new zn(t,a,null);for(var s in o){var l=o[s];if(l.defId===a.defId)return new zn(t,a,l)}}}return null},e.prototype.getEvents=function(){var e=this.getCurrentData();return Bn(e.eventStore,e)},e.prototype.removeAllEvents=function(){this.dispatch({type:"REMOVE_ALL_EVENTS"})},e.prototype.getEventSources=function(){var e=this.getCurrentData(),t=e.eventSources,n=[];for(var r in t)n.push(new L(e,t[r]));return n},e.prototype.getEventSourceById=function(e){var t=this.getCurrentData(),n=t.eventSources;for(var r in e=String(e),n)if(n[r].publicId===e)return new L(t,n[r]);return null},e.prototype.addEventSource=function(e){var t=this.getCurrentData();if(e instanceof L)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;var n=Un(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new L(t,n)):null},e.prototype.removeAllEventSources=function(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})},e.prototype.refetchEvents=function(){this.dispatch({type:"FETCH_EVENT_SOURCES"})},e.prototype.scrollToTime=function(e){var t=Ye(e);t&&this.trigger("_scrollRequest",{time:t})},e}(),zn=function(){function e(e,t,n){this._context=e,this._def=t,this._instance=n||null}return e.prototype.setProp=function(e,t){var n,r;if(e in jt)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(e in Bt)t=Bt[e](t),this.mutate({standardProps:(n={},n[e]=t,n)});else if(e in Lt){var o=Lt[e](t);"color"===e?o={backgroundColor:t,borderColor:t}:"editable"===e?o={startEditable:t,durationEditable:t}:((r={})[e]=t,o=r),this.mutate({standardProps:{ui:o}})}else console.warn("Could not set prop '"+e+"'. Use setExtendedProp instead.")},e.prototype.setExtendedProp=function(e,t){var n;this.mutate({extendedProps:(n={},n[e]=t,n)})},e.prototype.setStart=function(e,t){void 0===t&&(t={});var n=this._context.dateEnv,r=n.createMarker(e);if(r&&this._instance){var o=Qt(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:o}):this.mutate({startDelta:o})}},e.prototype.setEnd=function(e,t){void 0===t&&(t={});var n,r=this._context.dateEnv;if((null==e||(n=r.createMarker(e)))&&this._instance)if(n){var o=Qt(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:o})}else this.mutate({standardProps:{hasEnd:!1}})},e.prototype.setDates=function(e,t,n){void 0===n&&(n={});var r,o,i,a=this._context.dateEnv,s={allDay:n.allDay},l=a.createMarker(e);if(l&&((null==t||(r=a.createMarker(t)))&&this._instance)){var u=this._instance.range;!0===n.allDay&&(u=Kt(u));var c=Qt(u.start,l,a,n.granularity);if(r){var d=Qt(u.end,r,a,n.granularity);i=d,(o=c).years===i.years&&o.months===i.months&&o.days===i.days&&o.milliseconds===i.milliseconds?this.mutate({datesDelta:c,standardProps:s}):this.mutate({startDelta:c,endDelta:d,standardProps:s})}else s.hasEnd=!1,this.mutate({datesDelta:c,standardProps:s})}},e.prototype.moveStart=function(e){var t=Ye(e);t&&this.mutate({startDelta:t})},e.prototype.moveEnd=function(e){var t=Ye(e);t&&this.mutate({endDelta:t})},e.prototype.moveDates=function(e){var t=Ye(e);t&&this.mutate({datesDelta:t})},e.prototype.setAllDay=function(e,t){void 0===t&&(t={});var n={allDay:e},r=t.maintainDuration;null==r&&(r=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(n.hasEnd=r),this.mutate({standardProps:n})},e.prototype.formatRange=function(e){var t=this._context.dateEnv,n=this._instance,r=St(e);return this._def.hasEnd?t.formatRange(n.range.start,n.range.end,r,{forcedStartTzo:n.forcedStartTzo,forcedEndTzo:n.forcedEndTzo}):t.format(n.range.start,r,{forcedTzo:n.forcedStartTzo})},e.prototype.mutate=function(t){var n=this._instance;if(n){var r=this._def,o=this._context,i=Nt(o.getCurrentData().eventStore,n.instanceId);i=Pn(i,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},t,o);var a=new e(o,r,n);this._def=i.defs[r.defId],this._instance=i.instances[n.instanceId],o.dispatch({type:"MERGE_EVENTS",eventStore:i}),o.emitter.trigger("eventChange",{oldEvent:a,event:this,relatedEvents:Bn(i,o,n),revert:function(){o.dispatch({type:"REMOVE_EVENTS",eventStore:i})}})}},e.prototype.remove=function(){var e=this._context,t=Fn(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:t}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert:function(){e.dispatch({type:"MERGE_EVENTS",eventStore:t})}})},Object.defineProperty(e.prototype,"source",{get:function(){var e=this._def.sourceId;return e?new L(this._context,this._context.getCurrentData().eventSources[e]):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"start",{get:function(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startStr",{get:function(){var e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"endStr",{get:function(){var e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._def.publicId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"groupId",{get:function(){return this._def.groupId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allDay",{get:function(){return this._def.allDay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"title",{get:function(){return this._def.title},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._def.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"display",{get:function(){return this._def.ui.display||"auto"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startEditable",{get:function(){return this._def.ui.startEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"durationEditable",{get:function(){return this._def.ui.durationEditable},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"constraint",{get:function(){return this._def.ui.constraints[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlap",{get:function(){return this._def.ui.overlap},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allow",{get:function(){return this._def.ui.allows[0]||null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._def.ui.backgroundColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"borderColor",{get:function(){return this._def.ui.borderColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textColor",{get:function(){return this._def.ui.textColor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNames",{get:function(){return this._def.ui.classNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"extendedProps",{get:function(){return this._def.extendedProps},enumerable:!1,configurable:!0}),e.prototype.toPlainObject=function(e){void 0===e&&(e={});var t=this._def,n=t.ui,o=this.startStr,i=this.endStr,a={};return t.title&&(a.title=t.title),o&&(a.start=o),i&&(a.end=i),t.publicId&&(a.id=t.publicId),t.groupId&&(a.groupId=t.groupId),t.url&&(a.url=t.url),n.display&&"auto"!==n.display&&(a.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?a.color=n.backgroundColor:(n.backgroundColor&&(a.backgroundColor=n.backgroundColor),n.borderColor&&(a.borderColor=n.borderColor)),n.textColor&&(a.textColor=n.textColor),n.classNames.length&&(a.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?r(a,t.extendedProps):a.extendedProps=t.extendedProps),a},e.prototype.toJSON=function(){return this.toPlainObject()},e}();function Fn(e){var t,n,r=e._def,o=e._instance;return{defs:(t={},t[r.defId]=r,t),instances:o?(n={},n[o.instanceId]=o,n):{}}}function Bn(e,t,n){var r=e.defs,o=e.instances,i=[],a=n?n.instanceId:"";for(var s in o){var l=o[s],u=r[l.defId];l.instanceId!==a&&i.push(new zn(t,u,l))}return i}var jn={};var Gn,qn=function(){function e(){}return e.prototype.getMarkerYear=function(e){return e.getUTCFullYear()},e.prototype.getMarkerMonth=function(e){return e.getUTCMonth()},e.prototype.getMarkerDay=function(e){return e.getUTCDate()},e.prototype.arrayToMarker=function(e){return Me(e)},e.prototype.markerToArray=function(e){return ke(e)},e}();Gn=qn,jn["gregory"]=Gn;var Yn=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function Zn(e){var t=Yn.exec(e);if(t){var n=new Date(Date.UTC(Number(t[1]),t[3]?Number(t[3])-1:0,Number(t[5]||1),Number(t[7]||0),Number(t[8]||0),Number(t[10]||0),t[12]?1e3*Number("0."+t[12]):0));if(xe(n)){var r=null;return t[13]&&(r=("-"===t[15]?-1:1)*(60*Number(t[16]||0)+Number(t[18]||0))),{marker:n,isTimeUnspecified:!t[6],timeZoneOffset:r}}}return null}var Xn=function(){function e(e){var t=this.timeZone=e.timeZone,n="local"!==t&&"UTC"!==t;e.namedTimeZoneImpl&&n&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(t)),this.canComputeOffset=Boolean(!n||this.namedTimeZoneImpl),this.calendarSystem=function(e){return new jn[e]}(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,"ISO"===e.weekNumberCalculation&&(this.weekDow=1,this.weekDoy=4),"number"==typeof e.firstDay&&(this.weekDow=e.firstDay),"function"==typeof e.weekNumberCalculation&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=null!=e.weekText?e.weekText:e.locale.options.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}return e.prototype.createMarker=function(e){var t=this.createMarkerMeta(e);return null===t?null:t.marker},e.prototype.createNowMarker=function(){return this.canComputeOffset?this.timestampToMarker((new Date).valueOf()):Me(Re(new Date))},e.prototype.createMarkerMeta=function(e){if("string"==typeof e)return this.parse(e);var t=null;return"number"==typeof e?t=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(t=this.timestampToMarker(e))):Array.isArray(e)&&(t=Me(e)),null!==t&&xe(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null},e.prototype.parse=function(e){var t=Zn(e);if(null===t)return null;var n=t.marker,r=null;return null!==t.timeZoneOffset&&(this.canComputeOffset?n=this.timestampToMarker(n.valueOf()-60*t.timeZoneOffset*1e3):r=t.timeZoneOffset),{marker:n,isTimeUnspecified:t.isTimeUnspecified,forcedTzo:r}},e.prototype.getYear=function(e){return this.calendarSystem.getMarkerYear(e)},e.prototype.getMonth=function(e){return this.calendarSystem.getMarkerMonth(e)},e.prototype.add=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t.years,n[1]+=t.months,n[2]+=t.days,n[6]+=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.subtract=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]-=t.years,n[1]-=t.months,n[2]-=t.days,n[6]-=t.milliseconds,this.calendarSystem.arrayToMarker(n)},e.prototype.addYears=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[0]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.addMonths=function(e,t){var n=this.calendarSystem.markerToArray(e);return n[1]+=t,this.calendarSystem.arrayToMarker(n)},e.prototype.diffWholeYears=function(e,t){var n=this.calendarSystem;return _e(e)===_e(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)&&n.getMarkerMonth(e)===n.getMarkerMonth(t)?n.getMarkerYear(t)-n.getMarkerYear(e):null},e.prototype.diffWholeMonths=function(e,t){var n=this.calendarSystem;return _e(e)===_e(t)&&n.getMarkerDay(e)===n.getMarkerDay(t)?n.getMarkerMonth(t)-n.getMarkerMonth(e)+12*(n.getMarkerYear(t)-n.getMarkerYear(e)):null},e.prototype.greatestWholeUnit=function(e,t){var n=this.diffWholeYears(e,t);return null!==n?{unit:"year",value:n}:null!==(n=this.diffWholeMonths(e,t))?{unit:"month",value:n}:null!==(n=Se(e,t))?{unit:"week",value:n}:null!==(n=De(e,t))?{unit:"day",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/36e5}(e,t))?{unit:"hour",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/6e4}(e,t))?{unit:"minute",value:n}:de(n=function(e,t){return(t.valueOf()-e.valueOf())/1e3}(e,t))?{unit:"second",value:n}:{unit:"millisecond",value:t.valueOf()-e.valueOf()}},e.prototype.countDurationsBetween=function(e,t,n){var r;return n.years&&null!==(r=this.diffWholeYears(e,t))?r/(Je(n)/365):n.months&&null!==(r=this.diffWholeMonths(e,t))?r/function(e){return Je(e)/30}(n):n.days&&null!==(r=De(e,t))?r/Je(n):(t.valueOf()-e.valueOf())/$e(n)},e.prototype.startOf=function(e,t){return"year"===t?this.startOfYear(e):"month"===t?this.startOfMonth(e):"week"===t?this.startOfWeek(e):"day"===t?be(e):"hour"===t?function(e){return Me([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return Me([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return Me([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds()])}(e):void 0},e.prototype.startOfYear=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])},e.prototype.startOfMonth=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])},e.prototype.startOfWeek=function(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])},e.prototype.computeWeekNumber=function(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):function(e,t,n){var r=e.getUTCFullYear(),o=Ce(e,r,t,n);if(o<1)return Ce(e,r-1,t,n);var i=Ce(e,r+1,t,n);return i>=1?Math.min(o,i):o}(e,this.weekDow,this.weekDoy)},e.prototype.format=function(e,t,n){return void 0===n&&(n={}),t.format({marker:e,timeZoneOffset:null!=n.forcedTzo?n.forcedTzo:this.offsetForMarker(e)},this)},e.prototype.formatRange=function(e,t,n,r){return void 0===r&&(r={}),r.isEndExclusive&&(t=ge(t,-1)),n.formatRange({marker:e,timeZoneOffset:null!=r.forcedStartTzo?r.forcedStartTzo:this.offsetForMarker(e)},{marker:t,timeZoneOffset:null!=r.forcedEndTzo?r.forcedEndTzo:this.offsetForMarker(t)},this,r.defaultSeparator)},e.prototype.formatIso=function(e,t){void 0===t&&(t={});var n=null;return t.omitTimeZoneOffset||(n=null!=t.forcedTzo?t.forcedTzo:this.offsetForMarker(e)),function(e,t,n){void 0===n&&(n=!1);var r=e.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(null==t?r=r.replace("Z",""):0!==t&&(r=r.replace("Z",rt(t,!0)))),r}(e,n,t.omitTime)},e.prototype.timestampToMarker=function(e){return"local"===this.timeZone?Me(Re(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?Me(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-Te(ke(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(ke(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?Te(ke(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(ke(e))*60):new Date(e.valueOf()-(t||0))},e}(),Kn=[],Jn={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"};function $n(e){for(var t=e.length>0?e[0].code:"en",n=Kn.concat(e),r={en:Jn},o=0,i=n;o<i.length;o++){var a=i[o];r[a.code]=a}return{map:r,defaultCode:t}}function Qn(e,t){return"object"!=typeof e||Array.isArray(e)?function(e,t){var n=[].concat(e||[]),r=function(e,t){for(var n=0;n<e.length;n++)for(var r=e[n].toLocaleLowerCase().split("-"),o=r.length;o>0;o--){var i=r.slice(0,o).join("-");if(t[i])return t[i]}return null}(n,t)||Jn;return er(e,n,r)}(e,t):er(e.code,[e.code],e)}function er(e,t,n){var r=Ne([Jn,n],["buttonText"]);delete r.code;var o=r.week;return delete r.week,{codeArg:e,codes:t,week:o,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function tr(e){var t=Qn(e.locale||"en",$n([]).map);return new Xn(r(r({timeZone:bt.timeZone,calendarSystem:"gregory"},e),{locale:t}))}var nr,rr={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function or(e,t){return It(function(e){var t;t=!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[];return t=t.map((function(e){return r(r({},rr),e)}))}(e),null,t)}function ir(e,t){return e.left>=t.left&&e.left<t.right&&e.top>=t.top&&e.top<t.bottom}function ar(e,t){var n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.left<n.right&&n.top<n.bottom&&n}function sr(e,t){return{left:Math.min(Math.max(e.left,t.left),t.right),top:Math.min(Math.max(e.top,t.top),t.bottom)}}function lr(e){return{left:(e.left+e.right)/2,top:(e.top+e.bottom)/2}}function ur(e,t){return{left:e.left-t.left,top:e.top-t.top}}function cr(){return null==nr&&(nr=function(){if("undefined"==typeof document)return!0;var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.innerHTML="<table><tr><td><div></div></td></tr></table>",e.querySelector("table").style.height="100px",e.querySelector("div").style.height="100%",document.body.appendChild(e);var t=e.querySelector("div").offsetHeight>0;return document.body.removeChild(e),t}()),nr}var dr={defs:{},instances:{}},pr=function(){function e(){this.getKeysForEventDefs=it(this._getKeysForEventDefs),this.splitDateSelection=it(this._splitDateSpan),this.splitEventStore=it(this._splitEventStore),this.splitIndividualUi=it(this._splitIndividualUi),this.splitEventDrag=it(this._splitInteraction),this.splitEventResize=it(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),o=this.splitDateSelection(e.dateSelection),i=this.splitIndividualUi(e.eventUiBases,r),a=this.splitEventStore(e.eventStore,r),s=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),u={};for(var c in this.eventUiBuilders=Oe(n,(function(e,n){return t.eventUiBuilders[n]||it(fr)})),n){var d=n[c],p=a[c]||dr,f=this.eventUiBuilders[c];u[c]={businessHours:d.businessHours||e.businessHours,dateSelection:o[c]||null,eventStore:p,eventUiBases:f(e.eventUiBases[""],d.ui,i[c]),eventSelection:p.instances[e.eventSelection]?e.eventSelection:"",eventDrag:s[c]||null,eventResize:l[c]||null}}return u},e.prototype._splitDateSpan=function(e){var t={};if(e)for(var n=0,r=this.getKeysForDateSpan(e);n<r.length;n++){t[r[n]]=e}return t},e.prototype._getKeysForEventDefs=function(e){var t=this;return Oe(e.defs,(function(e){return t.getKeysForEventDef(e)}))},e.prototype._splitEventStore=function(e,t){var n=e.defs,r=e.instances,o={};for(var i in n)for(var a=0,s=t[i];a<s.length;a++){o[p=s[a]]||(o[p]={defs:{},instances:{}}),o[p].defs[i]=n[i]}for(var l in r)for(var u=r[l],c=0,d=t[u.defId];c<d.length;c++){var p;o[p=d[c]]&&(o[p].instances[l]=u)}return o},e.prototype._splitIndividualUi=function(e,t){var n={};for(var r in e)if(r)for(var o=0,i=t[r];o<i.length;o++){var a=i[o];n[a]||(n[a]={}),n[a][r]=e[r]}return n},e.prototype._splitInteraction=function(e){var t={};if(e){var n=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),r=this._getKeysForEventDefs(e.mutatedEvents),o=this._splitEventStore(e.mutatedEvents,r),i=function(r){t[r]||(t[r]={affectedEvents:n[r]||dr,mutatedEvents:o[r]||dr,isEvent:e.isEvent})};for(var a in n)i(a);for(var a in o)i(a)}return t},e}();function fr(e,t,n){var o=[];e&&o.push(e),t&&o.push(t);var i={"":Vt(o)};return n&&r(i,n),i}function hr(e,t,n,r){return{dow:e.getUTCDay(),isDisabled:Boolean(r&&!sn(r.activeRange,e)),isOther:Boolean(r&&!sn(r.currentRange,e)),isToday:Boolean(t&&sn(t,e)),isPast:Boolean(n?e<n:!!t&&e<t.start),isFuture:Boolean(n?e>n:!!t&&e>=t.end)}}function vr(e,t){var n=["fc-day","fc-day-"+fe[e.dow]];return e.isDisabled?n.push("fc-day-disabled"):(e.isToday&&(n.push("fc-day-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-day-past"),e.isFuture&&n.push("fc-day-future"),e.isOther&&n.push("fc-day-other")),n}function gr(e,t){return void 0===t&&(t="day"),JSON.stringify({date:tt(e),type:t})}var mr,yr=null;function Er(){return null===yr&&(yr=function(){var e=document.createElement("div");j(e,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),e.innerHTML="<div></div>",document.body.appendChild(e);var t=e.firstChild.getBoundingClientRect().left>e.getBoundingClientRect().left;return W(e),t}()),yr}function Sr(){return mr||(mr=function(){var e=document.createElement("div");e.style.overflow="scroll",document.body.appendChild(e);var t=Dr(e);return document.body.removeChild(e),t}()),mr}function Dr(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function br(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,o=parseInt(n.borderRightWidth,10)||0,i=parseInt(n.borderTopWidth,10)||0,a=parseInt(n.borderBottomWidth,10)||0,s=Dr(e),l=s.y-r-o,u={borderLeft:r,borderRight:o,borderTop:i,borderBottom:a,scrollbarBottom:s.x-i-a,scrollbarLeft:0,scrollbarRight:0};return Er()&&"rtl"===n.direction?u.scrollbarLeft=l:u.scrollbarRight=l,t&&(u.paddingLeft=parseInt(n.paddingLeft,10)||0,u.paddingRight=parseInt(n.paddingRight,10)||0,u.paddingTop=parseInt(n.paddingTop,10)||0,u.paddingBottom=parseInt(n.paddingBottom,10)||0),u}function Cr(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():wr(e),o=br(e,t),i={left:r.left+o.borderLeft+o.scrollbarLeft,right:r.right-o.borderRight-o.scrollbarRight,top:r.top+o.borderTop,bottom:r.bottom-o.borderBottom-o.scrollbarBottom};return t&&(i.left+=o.paddingLeft,i.right-=o.paddingRight,i.top+=o.paddingTop,i.bottom-=o.paddingBottom),i}function wr(e){var t=e.getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,right:t.right+window.pageXOffset,bottom:t.bottom+window.pageYOffset}}function Rr(e){for(var t=[];e instanceof HTMLElement;){var n=window.getComputedStyle(e);if("fixed"===n.position)break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&t.push(e),e=e.parentNode}return t}function Tr(e,t,n){var r=!1,o=function(){r||(r=!0,t.apply(this,arguments))},i=function(){r||(r=!0,n&&n.apply(this,arguments))},a=e(o,i);a&&"function"==typeof a.then&&a.then(o,i)}var kr=function(){function e(){this.handlers={},this.thisContext=null}return e.prototype.setThisContext=function(e){this.thisContext=e},e.prototype.setOptions=function(e){this.options=e},e.prototype.on=function(e,t){!function(e,t,n){(e[t]||(e[t]=[])).push(n)}(this.handlers,e,t)},e.prototype.off=function(e,t){!function(e,t,n){n?e[t]&&(e[t]=e[t].filter((function(e){return e!==n}))):delete e[t]}(this.handlers,e,t)},e.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=this.handlers[e]||[],o=this.options&&this.options[e],i=[].concat(o||[],r),a=0,s=i;a<s.length;a++){var l=s[a];l.apply(this.thisContext,t)}},e.prototype.hasHandlers=function(e){return this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e]},e}();var Mr=function(){function e(e,t,n,r){this.els=t;var o=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(o.left),r&&this.buildElVerticals(o.top)}return e.prototype.buildElHorizontals=function(e){for(var t=[],n=[],r=0,o=this.els;r<o.length;r++){var i=o[r].getBoundingClientRect();t.push(i.left-e),n.push(i.right-e)}this.lefts=t,this.rights=n},e.prototype.buildElVerticals=function(e){for(var t=[],n=[],r=0,o=this.els;r<o.length;r++){var i=o[r].getBoundingClientRect();t.push(i.top-e),n.push(i.bottom-e)}this.tops=t,this.bottoms=n},e.prototype.leftToIndex=function(e){var t,n=this.lefts,r=this.rights,o=n.length;for(t=0;t<o;t++)if(e>=n[t]&&e<r[t])return t},e.prototype.topToIndex=function(e){var t,n=this.tops,r=this.bottoms,o=n.length;for(t=0;t<o;t++)if(e>=n[t]&&e<r[t])return t},e.prototype.getWidth=function(e){return this.rights[e]-this.lefts[e]},e.prototype.getHeight=function(e){return this.bottoms[e]-this.tops[e]},e}(),xr=function(){function e(){}return e.prototype.getMaxScrollTop=function(){return this.getScrollHeight()-this.getClientHeight()},e.prototype.getMaxScrollLeft=function(){return this.getScrollWidth()-this.getClientWidth()},e.prototype.canScrollVertically=function(){return this.getMaxScrollTop()>0},e.prototype.canScrollHorizontally=function(){return this.getMaxScrollLeft()>0},e.prototype.canScrollUp=function(){return this.getScrollTop()>0},e.prototype.canScrollDown=function(){return this.getScrollTop()<this.getMaxScrollTop()},e.prototype.canScrollLeft=function(){return this.getScrollLeft()>0},e.prototype.canScrollRight=function(){return this.getScrollLeft()<this.getMaxScrollLeft()},e}(),_r=function(e){function t(t){var n=e.call(this)||this;return n.el=t,n}return n(t,e),t.prototype.getScrollTop=function(){return this.el.scrollTop},t.prototype.getScrollLeft=function(){return this.el.scrollLeft},t.prototype.setScrollTop=function(e){this.el.scrollTop=e},t.prototype.setScrollLeft=function(e){this.el.scrollLeft=e},t.prototype.getScrollWidth=function(){return this.el.scrollWidth},t.prototype.getScrollHeight=function(){return this.el.scrollHeight},t.prototype.getClientHeight=function(){return this.el.clientHeight},t.prototype.getClientWidth=function(){return this.el.clientWidth},t}(xr),Ir=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getScrollTop=function(){return window.pageYOffset},t.prototype.getScrollLeft=function(){return window.pageXOffset},t.prototype.setScrollTop=function(e){window.scroll(window.pageXOffset,e)},t.prototype.setScrollLeft=function(e){window.scroll(e,window.pageYOffset)},t.prototype.getScrollWidth=function(){return document.documentElement.scrollWidth},t.prototype.getScrollHeight=function(){return document.documentElement.scrollHeight},t.prototype.getClientHeight=function(){return document.documentElement.clientHeight},t.prototype.getClientWidth=function(){return document.documentElement.clientWidth},t}(xr),Pr=function(){function e(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}return e.prototype.setIconOverride=function(e){var t,n;if("object"==typeof e&&e){for(n in t=r({},this.iconClasses),e)t[n]=this.applyIconOverridePrefix(e[n]);this.iconClasses=t}else!1===e&&(this.iconClasses={})},e.prototype.applyIconOverridePrefix=function(e){var t=this.iconOverridePrefix;return t&&0!==e.indexOf(t)&&(e=t+e),e},e.prototype.getClass=function(e){return this.classes[e]||""},e.prototype.getIconClass=function(e,t){var n;return(n=t&&this.rtlIconClasses&&this.rtlIconClasses[e]||this.iconClasses[e])?this.baseIconClass+" "+n:""},e.prototype.getCustomButtonIconClass=function(e){var t;return this.iconOverrideCustomButtonOption&&(t=e[this.iconOverrideCustomButtonOption])?this.baseIconClass+" "+this.applyIconOverridePrefix(t):""},e}();if(Pr.prototype.classes={},Pr.prototype.iconClasses={},Pr.prototype.baseIconClass="",Pr.prototype.iconOverridePrefix="","undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var Nr=FullCalendarVDom.Component,Hr=FullCalendarVDom.createElement,Or=FullCalendarVDom.render,Ar=FullCalendarVDom.createRef,Ur=FullCalendarVDom.Fragment,Lr=FullCalendarVDom.createContext,Wr=FullCalendarVDom.flushToDom,Vr=function(){function e(e,t,n){var o=this;this.execFunc=e,this.emitter=t,this.scrollTime=n,this.handleScrollRequest=function(e){o.queuedRequest=r({},o.queuedRequest||{},e),o.drain()},t.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}return e.prototype.detach=function(){this.emitter.off("_scrollRequest",this.handleScrollRequest)},e.prototype.update=function(e){e?this.fireInitialScroll():this.drain()},e.prototype.fireInitialScroll=function(){this.handleScrollRequest({time:this.scrollTime})},e.prototype.drain=function(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)},e}(),zr=Lr({});function Fr(e,t,n,r,o,i,a,s,l,u,c,d,p){return{dateEnv:o,options:n,pluginHooks:a,emitter:u,dispatch:s,getCurrentData:l,calendarApi:c,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:i,isRtl:"rtl"===n.direction,addResizeHandler:function(e){u.on("_resize",e)},removeResizeHandler:function(e){u.off("_resize",e)},createScrollResponder:function(e){return new Vr(e,u,Ye(n.scrollTime))},registerInteractiveComponent:d,unregisterInteractiveComponent:p}}var Br=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.shouldComponentUpdate=function(e,t){return this.debug&&console.log(We(e,this.props),We(t,this.state)),!Ve(this.props,e,this.propEquality)||!Ve(this.state,t,this.stateEquality)},t.addPropsEquality=Gr,t.addStateEquality=qr,t.contextType=zr,t}(Nr);Br.prototype.propEquality={},Br.prototype.stateEquality={};var jr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.contextType=zr,t}(Br);function Gr(e){var t=Object.create(this.prototype.propEquality);r(t,e),this.prototype.propEquality=t}function qr(e){var t=Object.create(this.prototype.stateEquality);r(t,e),this.prototype.stateEquality=t}function Yr(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Zr(e,t,n,r,o){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,o,i){if(t&&n===t.latestFetchId){var a=It(function(e,t,n){var r=n.options.eventDataTransform,o=t?t.eventDataTransform:null;o&&(e=Xr(e,o));r&&(e=Xr(e,r));return e}(o,t,i),t,i);return r&&(a=Be(a,r,i)),Ot(Kr(e,t.sourceId),a)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,o);case"ADD_EVENTS":return function(e,t,n,r){n&&(t=Be(t,n,r));return Ot(e,t)}(e,t.eventStore,r?r.activeRange:null,o);case"MERGE_EVENTS":return Ot(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Be(e,r.activeRange,o):e;case"REMOVE_EVENTS":return function(e,t){var n=e.defs,r=e.instances,o={},i={};for(var a in n)t.defs[a]||(o[a]=n[a]);for(var s in r)!t.instances[s]&&o[r[s].defId]&&(i[s]=r[s]);return{defs:o,instances:i}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return Kr(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return At(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}function Xr(e,t){var n;if(t){n=[];for(var r=0,o=e;r<o.length;r++){var i=o[r],a=t(i);a?n.push(a):null==a&&n.push(i)}}else n=e;return n}function Kr(e,t){return At(e,(function(e){return e.sourceId!==t}))}function Jr(e,t){return $r({eventDrag:e},t)}function $r(e,t){var n=t.getCurrentData(),o=r({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},e);return(t.pluginHooks.isPropsValid||Qr)(o,t)}function Qr(e,t,n,o){return void 0===n&&(n={}),!(e.eventDrag&&!function(e,t,n,o){var i=t.getCurrentData(),a=e.eventDrag,s=a.mutatedEvents,l=s.defs,u=s.instances,c=pn(l,a.isEvent?e.eventUiBases:{"":i.selectionConfig});o&&(c=Oe(c,o));var d=(v=e.eventStore,g=a.affectedEvents.instances,{defs:v.defs,instances:He(v.instances,(function(e){return!g[e.instanceId]}))}),p=d.defs,f=d.instances,h=pn(p,e.eventUiBases);var v,g;for(var m in u){var y=u[m],E=y.range,S=c[y.defId],D=l[y.defId];if(!eo(S.constraints,E,d,e.businessHours,t))return!1;var b=t.options.eventOverlap,C="function"==typeof b?b:null;for(var w in f){var R=f[w];if(on(E,R.range)){if(!1===h[R.defId].overlap&&a.isEvent)return!1;if(!1===S.overlap)return!1;if(C&&!C(new zn(t,p[R.defId],R),new zn(t,D,y)))return!1}}for(var T=i.eventStore,k=0,M=S.allows;k<M.length;k++){var x=M[k],_=r(r({},n),{range:y.range,allDay:D.allDay}),I=T.defs[D.defId],P=T.instances[m],N=void 0;if(N=I?new zn(t,I,P):new zn(t,D),!x(_n(_,t),N))return!1}}return!0}(e,t,n,o))&&!(e.dateSelection&&!function(e,t,n,o){var i=e.eventStore,a=i.defs,s=i.instances,l=e.dateSelection,u=l.range,c=t.getCurrentData().selectionConfig;o&&(c=o(c));if(!eo(c.constraints,u,i,e.businessHours,t))return!1;var d=t.options.selectOverlap,p="function"==typeof d?d:null;for(var f in s){var h=s[f];if(on(u,h.range)){if(!1===c.overlap)return!1;if(p&&!p(new zn(t,a[h.defId],h),null))return!1}}for(var v=0,g=c.allows;v<g.length;v++){var m=g[v],y=r(r({},n),l);if(!m(_n(y,t),null))return!1}return!0}(e,t,n,o))}function eo(e,t,n,r,o){for(var i=0,a=e;i<a.length;i++){if(!ro(to(a[i],t,n,r,o),t))return!1}return!0}function to(e,t,n,r,o){return"businessHours"===e?no(Be(r,t,o)):"string"==typeof e?no(At(n,(function(t){return t.groupId===e}))):"object"==typeof e&&e?no(Be(e,t,o)):[]}function no(e){var t=e.instances,n=[];for(var r in t)n.push(t[r].range);return n}function ro(e,t){for(var n=0,r=e;n<r.length;n++){if(an(r[n],t))return!0}return!1}var oo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.uid=$(),t}return n(t,e),t.prototype.prepareHits=function(){},t.prototype.queryHit=function(e,t,n,r){return null},t.prototype.isInteractionValid=function(e){var t=this.props.dateProfile,n=e.mutatedEvents.instances;if(t)for(var r in n)if(!an(t.validRange,n[r].range))return!1;return Jr(e,this.context)},t.prototype.isDateSelectionValid=function(e){var t,n,r=this.props.dateProfile;return!(r&&!an(r.validRange,e.range))&&(t=e,n=this.context,$r({dateSelection:t},n))},t.prototype.isValidSegDownEl=function(e){return!this.props.eventDrag&&!this.props.eventResize&&!V(e,".fc-event-mirror")&&(this.isPopover()||!this.isInPopover(e))},t.prototype.isValidDateDownEl=function(e){return!(V(e,".fc-event:not(.fc-bg-event)")||V(e,".fc-daygrid-more-link")||V(e,"a[data-navlink]")||this.isInPopover(e))},t.prototype.isPopover=function(){return!1},t.prototype.isInPopover=function(e){return Boolean(V(e,".fc-popover"))},t}(jr);function io(e){return{id:$(),deps:e.deps||[],reducers:e.reducers||[],contextInit:[].concat(e.contextInit||[]),eventRefiners:e.eventRefiners||{},eventDefMemberAdders:e.eventDefMemberAdders||[],eventSourceRefiners:e.eventSourceRefiners||{},isDraggableTransformers:e.isDraggableTransformers||[],eventDragMutationMassagers:e.eventDragMutationMassagers||[],eventDefMutationAppliers:e.eventDefMutationAppliers||[],dateSelectionTransformers:e.dateSelectionTransformers||[],datePointTransforms:e.datePointTransforms||[],dateSpanTransforms:e.dateSpanTransforms||[],views:e.views||{},viewPropsTransformers:e.viewPropsTransformers||[],isPropsValid:e.isPropsValid||null,externalDefTransforms:e.externalDefTransforms||[],eventResizeJoinTransforms:e.eventResizeJoinTransforms||[],viewContainerAppends:e.viewContainerAppends||[],eventDropTransformers:e.eventDropTransformers||[],componentInteractions:e.componentInteractions||[],calendarInteractions:e.calendarInteractions||[],themeClasses:e.themeClasses||{},eventSourceDefs:e.eventSourceDefs||[],cmdFormatter:e.cmdFormatter,recurringTypes:e.recurringTypes||[],namedTimeZonedImpl:e.namedTimeZonedImpl,initialView:e.initialView||"",elementDraggingImpl:e.elementDraggingImpl,optionChangeHandlers:e.optionChangeHandlers||{},scrollGridImpl:e.scrollGridImpl||null,contentTypeHandlers:e.contentTypeHandlers||{},listenerRefiners:e.listenerRefiners||{},optionRefiners:e.optionRefiners||{},propSetHandlers:e.propSetHandlers||{}}}function ao(){var e,t=[],n=[];return function(o,i){return e&&ot(o,t)&&ot(i,n)||(e=function(e,t){var n={},o={reducers:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],eventResizeJoinTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,contentTypeHandlers:{},listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(e){for(var t=0,a=e;t<a.length;t++){var s=a[t];n[s.id]||(n[s.id]=!0,i(s.deps),u=s,o={reducers:(l=o).reducers.concat(u.reducers),contextInit:l.contextInit.concat(u.contextInit),eventRefiners:r(r({},l.eventRefiners),u.eventRefiners),eventDefMemberAdders:l.eventDefMemberAdders.concat(u.eventDefMemberAdders),eventSourceRefiners:r(r({},l.eventSourceRefiners),u.eventSourceRefiners),isDraggableTransformers:l.isDraggableTransformers.concat(u.isDraggableTransformers),eventDragMutationMassagers:l.eventDragMutationMassagers.concat(u.eventDragMutationMassagers),eventDefMutationAppliers:l.eventDefMutationAppliers.concat(u.eventDefMutationAppliers),dateSelectionTransformers:l.dateSelectionTransformers.concat(u.dateSelectionTransformers),datePointTransforms:l.datePointTransforms.concat(u.datePointTransforms),dateSpanTransforms:l.dateSpanTransforms.concat(u.dateSpanTransforms),views:r(r({},l.views),u.views),viewPropsTransformers:l.viewPropsTransformers.concat(u.viewPropsTransformers),isPropsValid:u.isPropsValid||l.isPropsValid,externalDefTransforms:l.externalDefTransforms.concat(u.externalDefTransforms),eventResizeJoinTransforms:l.eventResizeJoinTransforms.concat(u.eventResizeJoinTransforms),viewContainerAppends:l.viewContainerAppends.concat(u.viewContainerAppends),eventDropTransformers:l.eventDropTransformers.concat(u.eventDropTransformers),calendarInteractions:l.calendarInteractions.concat(u.calendarInteractions),componentInteractions:l.componentInteractions.concat(u.componentInteractions),themeClasses:r(r({},l.themeClasses),u.themeClasses),eventSourceDefs:l.eventSourceDefs.concat(u.eventSourceDefs),cmdFormatter:u.cmdFormatter||l.cmdFormatter,recurringTypes:l.recurringTypes.concat(u.recurringTypes),namedTimeZonedImpl:u.namedTimeZonedImpl||l.namedTimeZonedImpl,initialView:l.initialView||u.initialView,elementDraggingImpl:l.elementDraggingImpl||u.elementDraggingImpl,optionChangeHandlers:r(r({},l.optionChangeHandlers),u.optionChangeHandlers),scrollGridImpl:u.scrollGridImpl||l.scrollGridImpl,contentTypeHandlers:r(r({},l.contentTypeHandlers),u.contentTypeHandlers),listenerRefiners:r(r({},l.listenerRefiners),u.listenerRefiners),optionRefiners:r(r({},l.optionRefiners),u.optionRefiners),propSetHandlers:r(r({},l.propSetHandlers),u.propSetHandlers)})}var l,u}return e&&i(e),i(t),o}(o,i)),t=o,n=i,e}}var so=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Pr);function lo(e,t,n,o){if(t[e])return t[e];var i=function(e,t,n,o){var i=n[e],a=o[e],s=function(e){return i&&null!==i[e]?i[e]:a&&null!==a[e]?a[e]:null},l=s("component"),u=s("superType"),c=null;if(u){if(u===e)throw new Error("Can't have a custom view type that references itself");c=lo(u,t,n,o)}!l&&c&&(l=c.component);if(!l)return null;return{type:e,component:l,defaults:r(r({},c?c.defaults:{}),i?i.rawOptions:{}),overrides:r(r({},c?c.overrides:{}),a?a.rawOptions:{})}}(e,t,n,o);return i&&(t[e]=i),i}so.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},so.prototype.baseIconClass="fc-icon",so.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},so.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},so.prototype.iconOverrideOption="buttonIcons",so.prototype.iconOverrideCustomButtonOption="icon",so.prototype.iconOverridePrefix="fc-icon-";var uo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Ar(),t.handleRootEl=function(e){Yr(t.rootElRef,e),t.props.elRef&&Yr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.hookProps;return Hr(ho,{hookProps:n,didMount:t.didMount,willUnmount:t.willUnmount,elRef:this.handleRootEl},(function(r){return Hr(po,{hookProps:n,content:t.content,defaultContent:t.defaultContent,backupElRef:e.rootElRef},(function(e,o){return t.children(r,go(t.classNames,n),e,o)}))}))},t}(jr),co=Lr(0);function po(e){return Hr(co.Consumer,null,(function(t){return Hr(fo,r({renderId:t},e))}))}var fo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerElRef=Ar(),t}return n(t,e),t.prototype.render=function(){return this.props.children(this.innerElRef,this.renderInnerContent())},t.prototype.componentDidMount=function(){this.updateCustomContent()},t.prototype.componentDidUpdate=function(){this.updateCustomContent()},t.prototype.renderInnerContent=function(){var e=this.context.pluginHooks.contentTypeHandlers,t=this.props,n=this.customContentInfo,r=mo(t.content,t.hookProps),o=null;if(void 0===r&&(r=mo(t.defaultContent,t.hookProps)),void 0!==r){if(n)n.contentVal=r[n.contentKey];else if("object"==typeof r)for(var i in e)if(void 0!==r[i]){n=this.customContentInfo={contentKey:i,contentVal:r[i],handler:e[i]()};break}o=n?[]:r}return o},t.prototype.updateCustomContent=function(){this.customContentInfo&&this.customContentInfo.handler(this.innerElRef.current||this.props.backupElRef.current,this.customContentInfo.contentVal)},t}(jr),ho=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&Yr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){return this.props.children(this.handleRootEl)},t.prototype.componentDidMount=function(){var e=this.props.didMount;e&&e(r(r({},this.props.hookProps),{el:this.rootEl}))},t.prototype.componentWillUnmount=function(){var e=this.props.willUnmount;e&&e(r(r({},this.props.hookProps),{el:this.rootEl}))},t}(jr);function vo(){var e,t,n=[];return function(r,o){return t&&Le(t,o)&&r===e||(e=r,t=o,n=go(r,o)),n}}function go(e,t){return"function"==typeof e&&(e=e(t)),Ut(e)}function mo(e,t){return"function"==typeof e?e(t,Hr):e}var yo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.normalizeClassNames=vo(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r={view:t.viewApi},o=this.normalizeClassNames(n.viewClassNames,r);return Hr(ho,{hookProps:r,didMount:n.viewDidMount,willUnmount:n.viewWillUnmount,elRef:e.elRef},(function(t){return e.children(t,["fc-"+e.viewSpec.type+"-view","fc-view"].concat(o))}))},t}(jr);function Eo(e){return Oe(e,So)}function So(e){var t,n="function"==typeof e?{component:e}:e,o=n.component;return n.content&&(t=n,o=function(e){return Hr(zr.Consumer,null,(function(n){return Hr(yo,{viewSpec:n.viewSpec},(function(o,i){var a=r(r({},e),{nextDayThreshold:n.options.nextDayThreshold});return Hr(uo,{hookProps:a,classNames:t.classNames,content:t.content,didMount:t.didMount,willUnmount:t.willUnmount,elRef:o},(function(e,t,n,r){return Hr("div",{className:i.concat(t).join(" "),ref:e},r)}))}))}))}),{superType:n.type,component:o,rawOptions:n}}function Do(e,t,n,o){var i=Eo(e),a=Eo(t.views);return Oe(function(e,t){var n,r={};for(n in e)lo(n,r,e,t);for(n in t)lo(n,r,e,t);return r}(i,a),(function(e){return function(e,t,n,o,i){var a=e.overrides.duration||e.defaults.duration||o.duration||n.duration,s=null,l="",u="",c={};if(a&&(s=function(e){var t=JSON.stringify(e),n=bo[t];void 0===n&&(n=Ye(e),bo[t]=n);return n}(a))){var d=et(s);l=d.unit,1===d.value&&(u=l,c=t[l]?t[l].rawOptions:{})}var p=function(t){var n=t.buttonText||{},r=e.defaults.buttonTextKey;return null!=r&&null!=n[r]?n[r]:null!=n[e.type]?n[e.type]:null!=n[u]?n[u]:void 0};return{type:e.type,component:e.component,duration:s,durationUnit:l,singleUnit:u,optionDefaults:e.defaults,optionOverrides:r(r({},c),e.overrides),buttonTextOverride:p(o)||p(n)||e.overrides.buttonText,buttonTextDefault:p(i)||e.defaults.buttonText||p(bt)||e.type}}(e,a,t,n,o)}))}var bo={};var Co=function(){function e(e){this.props=e,this.nowDate=Wn(e.nowInput,e.dateEnv),this.initHiddenDays()}return e.prototype.buildPrev=function(e,t,n){var r=this.props.dateEnv,o=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(o,-1,n)},e.prototype.buildNext=function(e,t,n){var r=this.props.dateEnv,o=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(o,1,n)},e.prototype.build=function(e,t,n){void 0===n&&(n=!0);var r,o,i,a,s,l,u,c,d=this.props;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(u=e,e=null!=(c=r).start&&u<c.start?c.start:null!=c.end&&u>=c.end?new Date(c.end.valueOf()-1):u),o=this.buildCurrentRangeInfo(e,t),i=/^(year|month|week|day)$/.test(o.unit),a=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,i),s=a=this.trimHiddenDays(a),d.showNonCurrentDates||(s=nn(s,o.range)),s=nn(s=this.adjustActiveRange(s),r),l=on(o.range,r),{validRange:r,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:i,activeRange:s,renderRange:a,slotMinTime:d.slotMinTime,slotMaxTime:d.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(o.duration)}},e.prototype.buildValidRange=function(){var e=this.props.validRangeInput,t="function"==typeof e?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(t)||{start:null,end:null}},e.prototype.buildCurrentRangeInfo=function(e,t){var n,r=this.props,o=null,i=null,a=null;return r.duration?(o=r.duration,i=r.durationUnit,a=this.buildRangeFromDuration(e,t,o,i)):(n=this.props.dayCount)?(i="day",a=this.buildRangeFromDayCount(e,t,n)):(a=this.buildCustomVisibleRange(e))?i=r.dateEnv.greatestWholeUnit(a.start,a.end).unit:(i=et(o=this.getFallbackDuration()).unit,a=this.buildRangeFromDuration(e,t,o,i)),{duration:o,unit:i,range:a}},e.prototype.getFallbackDuration=function(){return Ye({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,o=t.slotMinTime,i=t.slotMaxTime,a=e.start,s=e.end;return r&&(Je(o)<0&&(a=be(a),a=n.add(a,o)),Je(i)>1&&(s=ve(s=be(s),-1),s=n.add(s,i))),{start:a,end:s}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var o,i,a,s=this.props,l=s.dateEnv,u=s.dateAlignment;if(!u){var c=this.props.dateIncrement;u=c&&$e(c)<$e(n)?et(c).unit:r}function d(){o=l.startOf(e,u),i=l.add(o,n),a={start:o,end:i}}return Je(n)<=1&&this.isHiddenDay(o)&&(o=be(o=this.skipHiddenDays(o,t))),d(),this.trimHiddenDays(a)||(e=this.skipHiddenDays(e,t),d()),a},e.prototype.buildRangeFromDayCount=function(e,t,n){var r,o=this.props,i=o.dateEnv,a=o.dateAlignment,s=0,l=e;a&&(l=i.startOf(l,a)),l=be(l),r=l=this.skipHiddenDays(l,t);do{r=ve(r,1),this.isHiddenDay(r)||s++}while(s<n);return{start:l,end:r}},e.prototype.buildCustomVisibleRange=function(e){var t=this.props,n=t.visibleRangeInput,r="function"==typeof n?n.call(t.calendarApi,t.dateEnv.toDate(e)):n,o=this.refineRange(r);return!o||null!=o.start&&null!=o.end?o:null},e.prototype.buildRenderRange=function(e,t,n){return e},e.prototype.buildDateIncrement=function(e){var t,n=this.props.dateIncrement;return n||((t=this.props.dateAlignment)?Ye(1,t):e||Ye({days:1}))},e.prototype.refineRange=function(e){if(e){var t=(n=e,r=this.props.dateEnv,o=null,i=null,n.start&&(o=r.createMarker(n.start)),n.end&&(i=r.createMarker(n.end)),o||i?o&&i&&i<o?null:{start:o,end:i}:null);return t&&(t=Jt(t)),t}var n,r,o,i;return null},e.prototype.initHiddenDays=function(){var e,t=this.props.hiddenDays||[],n=[],r=0;for(!1===this.props.weekends&&t.push(0,6),e=0;e<7;e++)(n[e]=-1!==t.indexOf(e))||r++;if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n},e.prototype.trimHiddenDays=function(e){var t=e.start,n=e.end;return t&&(t=this.skipHiddenDays(t)),n&&(n=this.skipHiddenDays(n,-1,!0)),null==t||null==n||t<n?{start:t,end:n}:null},e.prototype.isHiddenDay=function(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]},e.prototype.skipHiddenDays=function(e,t,n){for(void 0===t&&(t=1),void 0===n&&(n=!1);this.isHiddenDayHash[(e.getUTCDay()+(n?t:0)+7)%7];)e=ve(e,t);return e},e}();function wo(e,t,n){var r=t?t.activeRange:null;return ko({},function(e,t){var n=Ln(t),r=[].concat(e.eventSources||[]),o=[];e.initialEvents&&r.unshift(e.initialEvents);e.events&&r.unshift(e.events);for(var i=0,a=r;i<a.length;i++){var s=Un(a[i],t,n);s&&o.push(s)}return o}(e,n),r,n)}function Ro(e,t,n,o){var i,a,s=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return ko(e,t.sources,s,o);case"REMOVE_EVENT_SOURCE":return i=e,a=t.sourceId,He(i,(function(e){return e.sourceId!==a}));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?Mo(e,s,o):e;case"FETCH_EVENT_SOURCES":return xo(e,t.sourceIds?Ae(t.sourceIds):Io(e,o),s,o);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,o){var i,a=e[t];if(a&&n===a.latestFetchId)return r(r({},e),((i={})[t]=r(r({},a),{isFetching:!1,fetchRange:o}),i));return e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}}function To(e){var t=0;for(var n in e)e[n].isFetching&&t++;return t}function ko(e,t,n,o){for(var i={},a=0,s=t;a<s.length;a++){var l=s[a];i[l.sourceId]=l}return n&&(i=Mo(i,n,o)),r(r({},e),i)}function Mo(e,t,n){return xo(e,He(e,(function(e){return function(e,t,n){return Po(e,n)?!n.options.lazyFetching||!e.fetchRange||e.isFetching||t.start<e.fetchRange.start||t.end>e.fetchRange.end:!e.latestFetchId}(e,t,n)})),t,n)}function xo(e,t,n,r){var o={};for(var i in e){var a=e[i];t[i]?o[i]=_o(a,n,r):o[i]=a}return o}function _o(e,t,n){var o=n.options,i=n.calendarApi,a=n.pluginHooks.eventSourceDefs[e.sourceDefId],s=$();return a.fetch({eventSource:e,range:t,context:n},(function(r){var a=r.rawEvents;o.eventSourceSuccess&&(a=o.eventSourceSuccess.call(i,a,r.xhr)||a),e.success&&(a=e.success.call(i,a,r.xhr)||a),n.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:s,fetchRange:t,rawEvents:a})}),(function(r){console.warn(r.message,r),o.eventSourceFailure&&o.eventSourceFailure.call(i,r),e.failure&&e.failure(r),n.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:s,fetchRange:t,error:r})})),r(r({},e),{isFetching:!0,latestFetchId:s})}function Io(e,t){return He(e,(function(e){return Po(e,t)}))}function Po(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function No(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function Ho(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function Oo(e,t){var n;switch(t.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Ao(e,t){var n;switch(t.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return{affectedEvents:(n=t.state).affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return e}}function Uo(e,t,n,r,o){var i=[];return{headerToolbar:e.headerToolbar?Lo(e.headerToolbar,e,t,n,r,o,i):null,footerToolbar:e.footerToolbar?Lo(e.footerToolbar,e,t,n,r,o,i):null,viewsWithButtons:i}}function Lo(e,t,n,r,o,i,a){return Oe(e,(function(e){return function(e,t,n,r,o,i,a){var s="rtl"===t.direction,l=t.customButtons||{},u=n.buttonText||{},c=t.buttonText||{};return(e?e.split(" "):[]).map((function(e){return e.split(",").map((function(e){if("title"===e)return{buttonName:e};var t,n=void 0,d=void 0,p=void 0,f=void 0;return(t=l[e])?(d=function(e){t.click&&t.click.call(e.target,e,e.target)},(p=r.getCustomButtonIconClass(t))||(p=r.getIconClass(e,s))||(f=t.text)):(n=o[e])?(a.push(e),d=function(){i.changeView(e)},(f=n.buttonTextOverride)||(p=r.getIconClass(e,s))||(f=n.buttonTextDefault)):i[e]&&(d=function(){i[e]()},(f=u[e])||(p=r.getIconClass(e,s))||(f=c[e])),{buttonName:e,buttonClick:d,buttonIcon:p,buttonText:f}}))}))}(e,t,n,r,o,i,a)}))}function Wo(e,t,n,r,o){var i=null;"GET"===(e=e.toUpperCase())?t=function(e,t){return e+(-1===e.indexOf("?")?"?":"&")+Vo(t)}(t,n):i=Vo(n);var a=new XMLHttpRequest;a.open(e,t,!0),"GET"!==e&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.onload=function(){if(a.status>=200&&a.status<400){var e=!1,t=void 0;try{t=JSON.parse(a.responseText),e=!0}catch(e){}e?r(t,a):o("Failure parsing JSON",a)}else o("Request failed",a)},a.onerror=function(){o("Request failed",a)},a.send(i)}function Vo(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function zo(e,t){for(var n=Ue(t.getCurrentData().eventSources),r=[],o=0,i=e;o<i.length;o++){for(var a=i[o],s=!1,l=0;l<n.length;l++)if(n[l]._raw===a){n.splice(l,1),s=!0;break}s||r.push(a)}for(var u=0,c=n;u<c.length;u++){var d=c[u];t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:d.sourceId})}for(var p=0,f=r;p<f.length;p++){var h=f[p];t.calendarApi.addEventSource(h)}}var Fo=[io({eventSourceDefs:[{ignoreRange:!0,parseMeta:function(e){return Array.isArray(e.events)?e.events:null},fetch:function(e,t){t({rawEvents:e.eventSource.meta})}}]}),io({eventSourceDefs:[{parseMeta:function(e){return"function"==typeof e.events?e.events:null},fetch:function(e,t,n){var r=e.context.dateEnv;Tr(e.eventSource.meta.bind(null,Tn(e.range,r)),(function(e){t({rawEvents:e})}),n)}}]}),io({eventSourceRefiners:{method:String,extraParams:_t,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta:function(e){return e.url?{url:e.url,method:(e.method||"GET").toUpperCase(),extraParams:e.extraParams,startParam:e.startParam,endParam:e.endParam,timeZoneParam:e.timeZoneParam}:null},fetch:function(e,t,n){var o=e.eventSource.meta,i=function(e,t,n){var o,i,a,s,l=n.dateEnv,u=n.options,c={};null==(o=e.startParam)&&(o=u.startParam);null==(i=e.endParam)&&(i=u.endParam);null==(a=e.timeZoneParam)&&(a=u.timeZoneParam);s="function"==typeof e.extraParams?e.extraParams():e.extraParams||{};r(c,s),c[o]=l.formatIso(t.start),c[i]=l.formatIso(t.end),"local"!==l.timeZone&&(c[a]=l.timeZone);return c}(o,e.range,e.context);Wo(o.method,o.url,i,(function(e,n){t({rawEvents:e,xhr:n})}),(function(e,t){n({message:e,xhr:t})}))}}]}),io({recurringTypes:[{parse:function(e,t){if(e.daysOfWeek||e.startTime||e.endTime||e.startRecur||e.endRecur){var n={daysOfWeek:e.daysOfWeek||null,startTime:e.startTime||null,endTime:e.endTime||null,startRecur:e.startRecur?t.createMarker(e.startRecur):null,endRecur:e.endRecur?t.createMarker(e.endRecur):null},r=void 0;return e.duration&&(r=e.duration),!r&&e.startTime&&e.endTime&&(o=e.endTime,i=e.startTime,r={years:o.years-i.years,months:o.months-i.months,days:o.days-i.days,milliseconds:o.milliseconds-i.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:r,typeData:n}}var o,i;return null},expand:function(e,t,n){var r=nn(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){var o=e?Ae(e):null,i=be(n.start),a=n.end,s=[];for(;i<a;){var l=void 0;o&&!o[i.getUTCDay()]||(l=t?r.add(i,t):i,s.push(l)),i=ve(i,1)}return s}(e.daysOfWeek,e.startTime,r,n):[]}}],eventRefiners:{daysOfWeek:_t,startTime:Ye,endTime:Ye,duration:Ye,startRecur:_t,endRecur:_t}}),io({optionChangeHandlers:{events:function(e,t){zo([e],t)},eventSources:zo}}),io({contentTypeHandlers:{html:function(){return Bo},domNodes:function(){return jo}},propSetHandlers:{dateProfile:function(e,t){t.emitter.trigger("datesSet",r(r({},Tn(e.activeRange,t.dateEnv)),{view:t.viewApi}))},eventStore:function(e,t){var n=t.emitter;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Bn(e,t))}}})];function Bo(e,t){e.innerHTML=t}function jo(e,t){var n=Array.prototype.slice.call(e.childNodes),r=Array.prototype.slice.call(t);if(!ot(n,r)){for(var o=0,i=r;o<i.length;o++){var a=i[o];e.appendChild(a)}n.forEach(W)}}var Go=function(){function e(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}return e.prototype.request=function(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),null==e?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))},e.prototype.pause=function(e){void 0===e&&(e="");var t=this.pauseDepths;t[e]=(t[e]||0)+1,this.clearTimeout()},e.prototype.resume=function(e,t){void 0===e&&(e="");var n=this.pauseDepths;if(e in n){if(t)delete n[e];else--n[e]<=0&&delete n[e];this.tryDrain()}},e.prototype.isPaused=function(){return Object.keys(this.pauseDepths).length},e.prototype.tryDrain=function(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}},e.prototype.clear=function(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}},e.prototype.clearTimeout=function(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)},e.prototype.drained=function(){this.drainedOption&&this.drainedOption()},e}(),qo=function(){function e(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new Go(this.drain.bind(this))}return e.prototype.request=function(e,t){this.queue.push(e),this.delayedRunner.request(t)},e.prototype.pause=function(e){this.delayedRunner.pause(e)},e.prototype.resume=function(e,t){this.delayedRunner.resume(e,t)},e.prototype.drain=function(){for(var e=this.queue;e.length;){for(var t=[],n=void 0;n=e.shift();)this.runTask(n),t.push(n);this.drained(t)}},e.prototype.runTask=function(e){this.runTaskOption&&this.runTaskOption(e)},e.prototype.drained=function(e){this.drainedOption&&this.drainedOption(e)},e}();function Yo(e,t,n){var r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,St(t.titleFormat||function(e){var t=e.currentRangeUnit;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};var n=De(e.currentRange.start,e.currentRange.end);return null!==n&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}(e)),{isEndExclusive:e.isRangeAllDay,defaultSeparator:t.titleRangeSeparator})}var Zo=function(){function e(e){var t=this;this.computeOptionsData=it(this._computeOptionsData),this.computeCurrentViewData=it(this._computeCurrentViewData),this.organizeRawLocales=it($n),this.buildLocale=it(Qn),this.buildPluginHooks=ao(),this.buildDateEnv=it(Xo),this.buildTheme=it(Ko),this.parseToolbars=it(Uo),this.buildViewSpecs=it(Do),this.buildDateProfileGenerator=at(Jo),this.buildViewApi=it($o),this.buildViewUiProps=at(ti),this.buildEventUiBySource=it(Qo,Le),this.buildEventUiBases=it(ei),this.parseContextBusinessHours=at(ni),this.buildTitle=it(Yo),this.emitter=new kr,this.actionRunner=new qo(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.getCurrentData=function(){return t.data},this.dispatch=function(e){t.actionRunner.request(e)},this.props=e,this.actionRunner.pause();var n={},o=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),i=o.calendarOptions.initialView||o.pluginHooks.initialView,a=this.computeCurrentViewData(i,o,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(a.options);var s,l,u,c=(s=o.calendarOptions,l=o.dateEnv,null!=(u=s.initialDate)?l.createMarker(u):Wn(s.now,l)),d=a.dateProfileGenerator.build(c);sn(d.activeRange,c)||(c=d.currentRange.start);for(var p={dateEnv:o.dateEnv,options:o.calendarOptions,pluginHooks:o.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},f=0,h=o.pluginHooks.contextInit;f<h.length;f++){(0,h[f])(p)}for(var v=wo(o.calendarOptions,d,p),g={dynamicOptionOverrides:n,currentViewType:i,currentDate:c,dateProfile:d,businessHours:this.parseContextBusinessHours(p),eventSources:v,eventUiBases:{},loadingLevel:To(v),eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(p).selectionConfig},m=r(r({},p),g),y=0,E=o.pluginHooks.reducers;y<E.length;y++){var S=E[y];r(g,S(null,null,m))}g.loadingLevel&&this.emitter.trigger("loading",!0),this.state=g,this.updateData(),this.actionRunner.resume()}return e.prototype.resetOptions=function(e,t){var n=this.props;n.optionOverrides=t?r(r({},n.optionOverrides),e):e,this.actionRunner.request({type:"NOTHING"})},e.prototype._handleAction=function(e){var t=this.props,n=this.state,o=this.emitter,i=function(e,t){var n;switch(t.type){case"SET_OPTION":return r(r({},e),((n={})[t.optionName]=t.rawOptionValue,n));default:return e}}(n.dynamicOptionOverrides,e),a=this.computeOptionsData(t.optionOverrides,i,t.calendarApi),s=function(e,t){switch(t.type){case"CHANGE_VIEW_TYPE":return t.viewType}return e}(n.currentViewType,e),l=this.computeCurrentViewData(s,a,t.optionOverrides,i);t.calendarApi.currentDataManager=this,o.setThisContext(t.calendarApi),o.setOptions(l.options);var u={dateEnv:a.dateEnv,options:a.calendarOptions,pluginHooks:a.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:o,getCurrentData:this.getCurrentData},c=n.currentDate,d=n.dateProfile;this.data&&this.data.dateProfileGenerator!==l.dateProfileGenerator&&(d=l.dateProfileGenerator.build(c)),d=function(e,t,n,r){var o;switch(t.type){case"CHANGE_VIEW_TYPE":return r.build(t.dateMarker||n);case"CHANGE_DATE":if(!e.activeRange||!sn(e.currentRange,t.dateMarker))return r.build(t.dateMarker);break;case"PREV":if((o=r.buildPrev(e,n)).isValid)return o;break;case"NEXT":if((o=r.buildNext(e,n)).isValid)return o}return e}(d,e,c=function(e,t){switch(t.type){case"CHANGE_DATE":return t.dateMarker;default:return e}}(c,e),l.dateProfileGenerator),sn(d.currentRange,c)||(c=d.currentRange.start);for(var p=Ro(n.eventSources,e,d,u),f=To(p),h=Zr(n.eventStore,e,p,d,u),v=f&&!l.options.progressiveEventRendering&&n.renderableEventStore||h,g=this.buildViewUiProps(u),m=g.eventUiSingleBase,y=g.selectionConfig,E=this.buildEventUiBySource(p),S=this.buildEventUiBases(v.defs,m,E),D=n.loadingLevel||0,b=f,C={dynamicOptionOverrides:i,currentViewType:s,currentDate:c,dateProfile:d,eventSources:p,eventStore:h,renderableEventStore:v,selectionConfig:y,eventUiBases:S,loadingLevel:b,businessHours:this.parseContextBusinessHours(u),dateSelection:No(n.dateSelection,e),eventSelection:Ho(n.eventSelection,e),eventDrag:Oo(n.eventDrag,e),eventResize:Ao(n.eventResize,e)},w=r(r({},u),C),R=0,T=a.pluginHooks.reducers;R<T.length;R++){var k=T[R];r(C,k(n,e,w))}!D&&b?o.trigger("loading",!0):D&&!b&&o.trigger("loading",!1),this.state=C,t.onAction&&t.onAction(e)},e.prototype.updateData=function(){var e,t,n,o,i,a,s,l,u,c=this.props,d=this.state,p=this.data,f=this.computeOptionsData(c.optionOverrides,d.dynamicOptionOverrides,c.calendarApi),h=this.computeCurrentViewData(d.currentViewType,f,c.optionOverrides,d.dynamicOptionOverrides),v=this.data=r(r(r({viewTitle:this.buildTitle(d.dateProfile,h.options,f.dateEnv),calendarApi:c.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},f),h),d),g=f.pluginHooks.optionChangeHandlers,m=p&&p.calendarOptions,y=f.calendarOptions;if(m&&m!==y)for(var E in m.timeZone!==y.timeZone&&(d.eventSources=v.eventSources=(a=v.eventSources,s=d.dateProfile,l=v,u=s?s.activeRange:null,xo(a,Io(a,l),u,l)),d.eventStore=v.eventStore=(e=v.eventStore,t=p.dateEnv,n=v.dateEnv,o=e.defs,i=Oe(e.instances,(function(e){var i=o[e.defId];return i.allDay||i.recurringDef?e:r(r({},e),{range:{start:n.createMarker(t.toDate(e.range.start,e.forcedStartTzo)),end:n.createMarker(t.toDate(e.range.end,e.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:e.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:e.forcedEndTzo})})),{defs:o,instances:i})),g)m[E]!==y[E]&&g[E](y[E],v);c.onData&&c.onData(v)},e.prototype._computeOptionsData=function(e,t,n){var r=this.processRawCalendarOptions(e,t),o=r.refinedOptions,i=r.pluginHooks,a=r.localeDefaults,s=r.availableLocaleData;ri(r.extra);var l=this.buildDateEnv(o.timeZone,o.locale,o.weekNumberCalculation,o.firstDay,o.weekText,i,s,o.defaultRangeSeparator),u=this.buildViewSpecs(i.views,e,t,a),c=this.buildTheme(o,i);return{calendarOptions:o,pluginHooks:i,dateEnv:l,viewSpecs:u,theme:c,toolbarConfig:this.parseToolbars(o,e,c,u,n),localeDefaults:a,availableRawLocales:s.map}},e.prototype.processRawCalendarOptions=function(e,t){var n=Mt([bt,e,t]),o=n.locales,i=n.locale,a=this.organizeRawLocales(o),s=a.map,l=this.buildLocale(i||a.defaultCode,s).options,u=this.buildPluginHooks(e.plugins||[],Fo),c=this.currentCalendarOptionsRefiners=r(r(r(r(r({},Dt),Ct),wt),u.listenerRefiners),u.optionRefiners),d={},p=Mt([bt,l,e,t]),f={},h=this.currentCalendarOptionsInput,v=this.currentCalendarOptionsRefined,g=!1;for(var m in p)"plugins"!==m&&(p[m]===h[m]||Rt[m]&&m in h&&Rt[m](h[m],p[m])?f[m]=v[m]:c[m]?(f[m]=c[m](p[m]),g=!0):d[m]=h[m]);return g&&(this.currentCalendarOptionsInput=p,this.currentCalendarOptionsRefined=f),{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:u,availableLocaleData:a,localeDefaults:l,extra:d}},e.prototype._computeCurrentViewData=function(e,t,n,r){var o=t.viewSpecs[e];if(!o)throw new Error('viewType "'+e+"\" is not available. Please make sure you've loaded all neccessary plugins");var i=this.processRawViewOptions(o,t.pluginHooks,t.localeDefaults,n,r),a=i.refinedOptions;return ri(i.extra),{viewSpec:o,options:a,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:o.optionDefaults.dateProfileGeneratorClass,duration:o.duration,durationUnit:o.durationUnit,usesMinMaxTime:o.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,nowInput:a.now,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,monthMode:a.monthMode,fixedWeekCount:a.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}},e.prototype.processRawViewOptions=function(e,t,n,o,i){var a=Mt([bt,e.optionDefaults,n,o,e.optionOverrides,i]),s=r(r(r(r(r(r({},Dt),Ct),wt),kt),t.listenerRefiners),t.optionRefiners),l={},u=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,d=!1,p={};for(var f in a)a[f]===u[f]?l[f]=c[f]:(a[f]===this.currentCalendarOptionsInput[f]?f in this.currentCalendarOptionsRefined&&(l[f]=this.currentCalendarOptionsRefined[f]):s[f]?l[f]=s[f](a[f]):p[f]=a[f],d=!0);return d&&(this.currentViewOptionsInput=a,this.currentViewOptionsRefined=l),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:p}},e}();function Xo(e,t,n,r,o,i,a,s){var l=Qn(t||a.defaultCode,a.map);return new Xn({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:i.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:o,cmdFormatter:i.cmdFormatter,defaultSeparator:s})}function Ko(e,t){return new(t.themeClasses[e.themeSystem]||so)(e)}function Jo(e){return new(e.dateProfileGeneratorClass||Co)(e)}function $o(e,t,n){return new On(e,t,n)}function Qo(e){return Oe(e,(function(e){return e.ui}))}function ei(e,t,n){var r={"":t};for(var o in e){var i=e[o];i.sourceId&&n[i.sourceId]&&(r[o]=n[i.sourceId])}return r}function ti(e){var t=e.options;return{eventUiSingleBase:Wt({display:t.eventDisplay,editable:t.editable,startEditable:t.eventStartEditable,durationEditable:t.eventDurationEditable,constraint:t.eventConstraint,overlap:"boolean"==typeof t.eventOverlap?t.eventOverlap:void 0,allow:t.eventAllow,backgroundColor:t.eventBackgroundColor,borderColor:t.eventBorderColor,textColor:t.eventTextColor,color:t.eventColor},e),selectionConfig:Wt({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function ni(e){return or(e.options.businessHours,e)}function ri(e,t){for(var n in e)console.warn("Unknown option '"+n+"'"+(t?" for view '"+t+"'":""))}var oi=function(e){function t(t){var n=e.call(this,t)||this;return n.handleData=function(e){n.dataManager?n.setState(e):n.state=e},n.dataManager=new Zo({optionOverrides:t.optionOverrides,calendarApi:t.calendarApi,onData:n.handleData}),n}return n(t,e),t.prototype.render=function(){return this.props.children(this.state)},t.prototype.componentDidUpdate=function(e){var t=this.props.optionOverrides;t!==e.optionOverrides&&this.dataManager.resetOptions(t)},t}(Nr);var ii=function(e){this.timeZoneName=e},ai=function(){function e(e){this.component=e.component}return e.prototype.destroy=function(){},e}();function si(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter}}function li(e){var t;return(t={})[e.component.uid]=e,t}var ui={},ci=function(){function e(e,t){this.emitter=new kr}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),di={},pi={startTime:Ye,duration:Ye,create:Boolean,sourceId:String};function fi(e){var t=xt(e,pi),n=t.refined,r=t.extra;return{startTime:n.startTime||null,duration:n.duration||null,create:null==n.create||n.create,sourceId:n.sourceId,leftoverProps:r}}var hi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e,t,n=this.props,r=n.model,o=n.extraClassName,i=!1,a=r.center;return r.left?(i=!0,e=r.left):e=r.start,r.right?(i=!0,t=r.right):t=r.end,Hr("div",{className:[o||"","fc-toolbar",i?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",a||[]),this.renderSection("end",t||[]))},t.prototype.renderSection=function(e,t){var n=this.props;return Hr(vi,{key:e,widgetGroups:t,title:n.title,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled})},t}(jr),vi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this,t=this.props.widgetGroups.map((function(t){return e.renderWidgetGroup(t)}));return Hr.apply(void 0,o(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,i=[],a=!0,s=0,l=e;s<l.length;s++){var u=l[s],c=u.buttonName,d=u.buttonClick,p=u.buttonText,f=u.buttonIcon;if("title"===c)a=!1,i.push(Hr("h2",{className:"fc-toolbar-title"},t.title));else{var h=f?{"aria-label":c}:{},v=["fc-"+c+"-button",n.getClass("button")];c===t.activeButton&&v.push(n.getClass("buttonActive"));var g=!t.isTodayEnabled&&"today"===c||!t.isPrevEnabled&&"prev"===c||!t.isNextEnabled&&"next"===c;i.push(Hr("button",r({disabled:g,className:v.join(" "),onClick:d,type:"button"},h),p||(f?Hr("span",{className:f}):"")))}}if(i.length>1){var m=a&&n.getClass("buttonGroup")||"";return Hr.apply(void 0,o(["div",{className:m}],i))}return i[0]},t}(jr),gi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={availableWidth:null},t.handleEl=function(e){t.el=e,Yr(t.props.elRef,e),t.updateAvailableWidth()},t.handleResize=function(){t.updateAvailableWidth()},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state,n=e.aspectRatio,r=["fc-view-harness",n||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],o="",i="";return n?null!==t.availableWidth?o=t.availableWidth/n:i=1/n*100+"%":o=e.height||"",Hr("div",{ref:this.handleEl,onClick:e.onClick,className:r.join(" "),style:{height:o,paddingBottom:i}},e.children)},t.prototype.componentDidMount=function(){this.context.addResizeHandler(this.handleResize)},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleResize)},t.prototype.updateAvailableWidth=function(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})},t}(jr),mi=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,o=r.context,i=dn(t);if(i&&r.isValidSegDownEl(e.target)){var a=V(e.target,".fc-event-forced-url"),s=a?a.querySelector("a[href]").href:"";o.emitter.trigger("eventClick",{el:t,event:new zn(r.context,i.eventRange.def,i.eventRange.instance),jsEvent:e,view:o.viewApi}),s&&!e.defaultPrevented&&(window.location.href=s)}},n.destroy=Z(t.el,"click",".fc-event",n.handleSegClick),n}return n(t,e),t}(ai),yi=function(e){function t(t){var n,r,o,i,a,s=e.call(this,t)||this;return s.handleEventElRemove=function(e){e===s.currentSegEl&&s.handleSegLeave(null,s.currentSegEl)},s.handleSegEnter=function(e,t){dn(t)&&(s.currentSegEl=t,s.triggerEvent("eventMouseEnter",e,t))},s.handleSegLeave=function(e,t){s.currentSegEl&&(s.currentSegEl=null,s.triggerEvent("eventMouseLeave",e,t))},s.removeHoverListeners=(n=t.el,r=".fc-event",o=s.handleSegEnter,i=s.handleSegLeave,Z(n,"mouseover",r,(function(e,t){if(t!==a){a=t,o(e,t);var n=function(e){a=null,i(e,t),t.removeEventListener("mouseleave",n)};t.addEventListener("mouseleave",n)}}))),s}return n(t,e),t.prototype.destroy=function(){this.removeHoverListeners()},t.prototype.triggerEvent=function(e,t,n){var r=this.component,o=r.context,i=dn(n);t&&!r.isValidSegDownEl(t.target)||o.emitter.trigger(e,{el:n,event:new zn(o,i.eventRange.def,i.eventRange.instance),jsEvent:t,view:o.viewApi})},t}(ai),Ei=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=it(Fr),t.buildViewPropTransformers=it(Di),t.buildToolbarProps=it(Si),t.handleNavLinkClick=Y("a[data-navlink]",t._handleNavLinkClick.bind(t)),t.headerRef=Ar(),t.footerRef=Ar(),t.interactionsStore={},t.registerInteractiveComponent=function(e,n){var r=si(e,n),o=[mi,yi].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=o,ui[e.uid]=r},t.unregisterInteractiveComponent=function(e){for(var n=0,r=t.interactionsStore[e.uid];n<r.length;n++){r[n].destroy()}delete t.interactionsStore[e.uid],delete ui[e.uid]},t.resizeRunner=new Go((function(){t.props.emitter.trigger("_resize",!0),t.props.emitter.trigger("windowResize",{view:t.props.viewApi})})),t.handleWindowResize=function(e){var n=t.props.options;n.handleWindowResize&&e.target===window&&t.resizeRunner.request(n.windowResizeDelay)},t}return n(t,e),t.prototype.render=function(){var e,t=this.props,n=t.toolbarConfig,o=t.options,i=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,Wn(t.options.now,t.dateEnv),t.viewTitle),a=!1,s="";t.isHeightAuto||t.forPrint?s="":null!=o.height?a=!0:null!=o.contentHeight?s=o.contentHeight:e=Math.max(o.aspectRatio,.5);var l=this.buildViewContext(t.viewSpec,t.viewApi,t.options,t.dateProfileGenerator,t.dateEnv,t.theme,t.pluginHooks,t.dispatch,t.getCurrentData,t.emitter,t.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent);return Hr(zr.Provider,{value:l},n.headerToolbar&&Hr(hi,r({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.headerToolbar},i)),Hr(gi,{liquid:a,height:s,aspectRatio:e,onClick:this.handleNavLinkClick},this.renderView(t),this.buildAppendContent()),n.footerToolbar&&Hr(hi,r({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footerToolbar},i)))},t.prototype.componentDidMount=function(){var e=this.props;this.calendarInteractions=e.pluginHooks.calendarInteractions.map((function(t){return new t(e)})),window.addEventListener("resize",this.handleWindowResize);var t=e.pluginHooks.propSetHandlers;for(var n in t)t[n](e[n],e)},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.pluginHooks.propSetHandlers;for(var r in n)t[r]!==e[r]&&n[r](t[r],t)},t.prototype.componentWillUnmount=function(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(var e=0,t=this.calendarInteractions;e<t.length;e++){t[e].destroy()}this.props.emitter.trigger("_unmount")},t.prototype._handleNavLinkClick=function(e,t){var n=this.props,r=n.dateEnv,o=n.options,i=n.calendarApi,a=t.getAttribute("data-navlink");a=a?JSON.parse(a):{};var s=r.createMarker(a.date),l=a.type,u="day"===l?o.navLinkDayClick:"week"===l?o.navLinkWeekClick:null;"function"==typeof u?u.call(i,r.toDate(s),e):("string"==typeof u&&(l=u),i.zoomTo(s,l))},t.prototype.buildAppendContent=function(){var e=this.props,t=e.pluginHooks.viewContainerAppends.map((function(t){return t(e)}));return Hr.apply(void 0,o([Ur,{}],t))},t.prototype.renderView=function(e){for(var t=e.pluginHooks,n=e.viewSpec,o={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},i=0,a=this.buildViewPropTransformers(t.viewPropsTransformers);i<a.length;i++){var s=a[i];r(o,s.transform(o,e))}var l=n.component;return Hr(l,r({},o))},t}(Br);function Si(e,t,n,r,o,i){var a=n.build(o,void 0,!1),s=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:i,activeButton:e.type,isTodayEnabled:a.isValid&&!sn(t.currentRange,o),isPrevEnabled:s.isValid,isNextEnabled:l.isValid}}function Di(e){return e.map((function(e){return new e}))}var bi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={forPrint:!1},t.handleBeforePrint=function(){t.setState({forPrint:!0})},t.handleAfterPrint=function(){t.setState({forPrint:!1})},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.options,n=this.state.forPrint,r=n||"auto"===t.height||"auto"===t.contentHeight,o=r||null==t.height?"":t.height,i=["fc",n?"fc-media-print":"fc-media-screen","fc-direction-"+t.direction,e.theme.getClass("root")];return cr()||i.push("fc-liquid-hack"),e.children(i,o,r,n)},t.prototype.componentDidMount=function(){var e=this.props.emitter;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)},t.prototype.componentWillUnmount=function(){var e=this.props.emitter;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)},t}(jr);function Ci(e,t){return St(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}var wi="fc-col-header-cell",Ri=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.context,t=e.dateEnv,n=e.options,o=e.theme,i=e.viewApi,a=this.props,s=a.date,l=a.dateProfile,u=hr(s,a.todayRange,null,l),c=[wi].concat(vr(u,o)),d=t.format(s,a.dayHeaderFormat),p=n.navLinks&&!u.isDisabled&&a.colCnt>1?{"data-navlink":gr(s),tabIndex:0}:{},f=r(r(r({date:t.toDate(s),view:i},a.extraHookProps),{text:d}),u);return Hr(uo,{hookProps:f,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:ki,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,o){return Hr("th",r({ref:e,className:c.concat(t).join(" "),"data-date":u.isDisabled?void 0:tt(s),colSpan:a.colSpan},a.extraDataAttrs),Hr("div",{className:"fc-scrollgrid-sync-inner"},!u.isDisabled&&Hr("a",r({ref:n,className:["fc-col-header-cell-cushion",a.isSticky?"fc-sticky":""].join(" ")},p),o)))}))},t}(jr),Ti=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.dateEnv,o=t.theme,i=t.viewApi,a=t.options,s=ve(new Date(2592e5),e.dow),l={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},u=[wi].concat(vr(l,o),e.extraClassNames||[]),c=n.format(s,e.dayHeaderFormat),d=r(r(r(r({date:s},l),{view:i}),e.extraHookProps),{text:c});return Hr(uo,{hookProps:d,classNames:a.dayHeaderClassNames,content:a.dayHeaderContent,defaultContent:ki,didMount:a.dayHeaderDidMount,willUnmount:a.dayHeaderWillUnmount},(function(t,n,o,i){return Hr("th",r({ref:t,className:u.concat(n).join(" "),colSpan:e.colSpan},e.extraDataAttrs),Hr("div",{className:"fc-scrollgrid-sync-inner"},Hr("a",{className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:o},i)))}))},t}(jr);function ki(e){return e.text}var Mi=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=Wn(n.options.now,n.dateEnv),r.initialNowQueriedMs=(new Date).valueOf(),r.state=r.computeTiming().currentState,r}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return e.children(t.nowDate,t.todayRange)},t.prototype.componentDidMount=function(){this.setTimeout()},t.prototype.componentDidUpdate=function(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())},t.prototype.componentWillUnmount=function(){this.clearTimeout()},t.prototype.computeTiming=function(){var e=this.props,t=this.context,n=ge(this.initialNowDate,(new Date).valueOf()-this.initialNowQueriedMs),r=t.dateEnv.startOf(n,e.unit),o=t.dateEnv.add(r,Ye(1,e.unit)),i=o.valueOf()-n.valueOf();return{currentState:{nowDate:r,todayRange:xi(r)},nextState:{nowDate:o,todayRange:xi(o)},waitMs:i}},t.prototype.setTimeout=function(){var e=this,t=this.computeTiming(),n=t.nextState,r=t.waitMs;this.timeoutId=setTimeout((function(){e.setState(n,(function(){e.setTimeout()}))}),r)},t.prototype.clearTimeout=function(){this.timeoutId&&clearTimeout(this.timeoutId)},t.contextType=zr,t}(Nr);function xi(e){var t=be(e);return{start:t,end:ve(t,1)}}var _i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=it(Ii),t}return n(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,o=t.datesRepDistinctDays,i=t.renderIntro,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,o,n.length);return Hr(Mi,{unit:"day"},(function(e,t){return Hr("tr",null,i&&i(),n.map((function(e){return o?Hr(Ri,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:a}):Hr(Ti,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:a})})))}))},t}(jr);function Ii(e,t,n){return e||Ci(t,n)}var Pi=function(){function e(e,t){for(var n=e.start,r=e.end,o=[],i=[],a=-1;n<r;)t.isHiddenDay(n)?o.push(a+.5):(a++,o.push(a),i.push(n)),n=ve(n,1);this.dates=i,this.indices=o,this.cnt=i.length}return e.prototype.sliceRange=function(e){var t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(ve(e.end,-1)),r=Math.max(0,t),o=Math.min(this.cnt-1,n);return(r=Math.ceil(r))<=(o=Math.floor(o))?{firstIndex:r,lastIndex:o,isStart:t===r,isEnd:n===o}:null},e.prototype.getDateDayIndex=function(e){var t=this.indices,n=Math.floor(ye(this.dates[0],e));return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]},e}(),Ni=function(){function e(e,t){var n,r,o,i=e.dates;if(t){for(r=i[0].getUTCDay(),n=1;n<i.length&&i[n].getUTCDay()!==r;n++);o=Math.ceil(i.length/n)}else o=1,n=i.length;this.rowCnt=o,this.colCnt=n,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}return e.prototype.buildCells=function(){for(var e=[],t=0;t<this.rowCnt;t++){for(var n=[],r=0;r<this.colCnt;r++)n.push(this.buildCell(t,r));e.push(n)}return e},e.prototype.buildCell=function(e,t){var n=this.daySeries.dates[e*this.colCnt+t];return{key:n.toISOString(),date:n}},e.prototype.buildHeaderDates=function(){for(var e=[],t=0;t<this.colCnt;t++)e.push(this.cells[0][t].date);return e},e.prototype.sliceRange=function(e){var t=this.colCnt,n=this.daySeries.sliceRange(e),r=[];if(n)for(var o=n.firstIndex,i=n.lastIndex,a=o;a<=i;){var s=Math.floor(a/t),l=Math.min((s+1)*t,i+1);r.push({row:s,firstCol:a%t,lastCol:(l-1)%t,isStart:n.isStart&&a===o,isEnd:n.isEnd&&l-1===i}),a=l}return r},e}(),Hi=function(){function e(){this.sliceBusinessHours=it(this._sliceBusinessHours),this.sliceDateSelection=it(this._sliceDateSpan),this.sliceEventStore=it(this._sliceEventStore),this.sliceEventDrag=it(this._sliceInteraction),this.sliceEventResize=it(this._sliceInteraction),this.forceDayIfListItem=!1}return e.prototype.sliceProps=function(e,t,n,r){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];var s=e.eventUiBases,l=this.sliceEventStore.apply(this,o([e.eventStore,s,t,n],i));return{dateSelectionSegs:this.sliceDateSelection.apply(this,o([e.dateSelection,s,r],i)),businessHourSegs:this.sliceBusinessHours.apply(this,o([e.businessHours,t,n,r],i)),fgEventSegs:l.fg,bgEventSegs:l.bg,eventDrag:this.sliceEventDrag.apply(this,o([e.eventDrag,s,t,n],i)),eventResize:this.sliceEventResize.apply(this,o([e.eventResize,s,t,n],i)),eventSelection:e.eventSelection}},e.prototype.sliceNowDate=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this._sliceDateSpan.apply(this,o([{range:{start:e,end:ge(e,1)},allDay:!1},{},t],n))},e.prototype._sliceBusinessHours=function(e,t,n,r){for(var i=[],a=4;a<arguments.length;a++)i[a-4]=arguments[a];return e?this._sliceEventStore.apply(this,o([Be(e,Oi(t,Boolean(n)),r),{},t,n],i)).bg:[]},e.prototype._sliceEventStore=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];if(e){var a=ln(e,t,Oi(n,Boolean(r)),r);return{bg:this.sliceEventRanges(a.bg,o),fg:this.sliceEventRanges(a.fg,o)}}return{bg:[],fg:[]}},e.prototype._sliceInteraction=function(e,t,n,r){for(var o=[],i=4;i<arguments.length;i++)o[i-4]=arguments[i];if(!e)return null;var a=ln(e.mutatedEvents,t,Oi(n,Boolean(r)),r);return{segs:this.sliceEventRanges(a.fg,o),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}},e.prototype._sliceDateSpan=function(e,t,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];if(!e)return[];for(var a=Mn(e,t,n),s=this.sliceRange.apply(this,o([e.range],r)),l=0,u=s;l<u.length;l++){var c=u[l];c.eventRange=a}return s},e.prototype.sliceEventRanges=function(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];n.push.apply(n,this.sliceEventRange(i,t))}return n},e.prototype.sliceEventRange=function(e,t){var n=e.range;this.forceDayIfListItem&&"list-item"===e.ui.display&&(n={start:n.start,end:ve(n.start,1)});for(var r=this.sliceRange.apply(this,o([n],t)),i=0,a=r;i<a.length;i++){var s=a[i];s.eventRange=e,s.isStart=e.isStart&&s.isStart,s.isEnd=e.isEnd&&s.isEnd}return r},e}();function Oi(e,t){var n=e.activeRange;return t?n:{start:ge(n.start,e.slotMinTime.milliseconds),end:ge(n.end,e.slotMaxTime.milliseconds-864e5)}}var Ai=/^(visible|hidden)$/,Ui=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleEl=function(e){t.el=e,Yr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.liquid,n=e.liquidIsAbsolute,r=t&&n,o=["fc-scroller"];return t&&(n?o.push("fc-scroller-liquid-absolute"):o.push("fc-scroller-liquid")),Hr("div",{ref:this.handleEl,className:o.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:r&&-(e.overcomeLeft||0)||"",right:r&&-(e.overcomeRight||0)||"",bottom:r&&-(e.overcomeBottom||0)||"",marginLeft:!r&&-(e.overcomeLeft||0)||"",marginRight:!r&&-(e.overcomeRight||0)||"",marginBottom:!r&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)},t.prototype.needsXScrolling=function(){if(Ai.test(this.props.overflowX))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),n=e.children,r=0;r<n.length;r++){if(n[r].getBoundingClientRect().width>t)return!0}return!1},t.prototype.needsYScrolling=function(){if(Ai.test(this.props.overflowY))return!1;for(var e=this.el,t=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),n=e.children,r=0;r<n.length;r++){if(n[r].getBoundingClientRect().height>t)return!0}return!1},t.prototype.getXScrollbarWidth=function(){return Ai.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return Ai.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(jr),Li=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,o=r.depths,i=r.currentMap,a=!1,s=!1;null!==e?(a=n in i,i[n]=e,o[n]=(o[n]||0)+1,s=!0):0==--o[n]&&(delete i[n],delete t.callbackMap[n],a=!0),t.masterCallback&&(a&&t.masterCallback(null,String(n)),s&&t.masterCallback(e,String(n)))}}return e.prototype.createRef=function(e){var t=this,n=this.callbackMap[e];return n||(n=this.callbackMap[e]=function(n){t.handleValue(n,String(e))}),n},e.prototype.collect=function(e,t,n){return Fe(this.currentMap,e,t,n)},e.prototype.getAll=function(){return Ue(this.currentMap)},e}();function Wi(e){for(var t=0,n=0,r=F(e,".fc-scrollgrid-shrink");n<r.length;n++){var o=r[n];t=Math.max(t,pe(o))}return Math.ceil(t)}function Vi(e,t){return e.liquid&&t.liquid}function zi(e,t){return null!=t.maxHeight||Vi(e,t)}function Fi(e,t,n){var r=n.expandRows;return"function"==typeof t.content?t.content(n):Hr("table",{className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:r?n.clientHeight:""}},n.tableColGroupNode,Hr("tbody",{},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}function Bi(e,t){return ot(e,t,Le)}function ji(e,t){for(var n=[],r=0,i=e;r<i.length;r++)for(var a=i[r],s=a.span||1,l=0;l<s;l++)n.push(Hr("col",{style:{width:"shrink"===a.width?Gi(t):a.width||"",minWidth:a.minWidth||""}}));return Hr.apply(void 0,o(["colgroup",{}],n))}function Gi(e){return null==e?4:e}function qi(e){for(var t=0,n=e;t<n.length;t++){if("shrink"===n[t].width)return!0}return!1}function Yi(e,t){var n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}function Zi(e,t){var n=["fc-scrollgrid-section","fc-scrollgrid-section-"+e.type,e.className];return t&&e.liquid&&null==e.maxHeight&&n.push("fc-scrollgrid-section-liquid"),e.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function Xi(e){return Hr("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function Ki(e){var t=e.stickyHeaderDates;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function Ji(e){var t=e.stickyFooterScrollbar;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}var $i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processCols=it((function(e){return e}),Bi),t.renderMicroColGroup=it(ji),t.scrollerRefs=new Li,t.scrollerElRefs=new Li(t._handleScrollerEl.bind(t)),t.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},t.handleSizing=function(){t.setState(r({shrinkWidth:t.computeShrinkWidth()},t.computeScrollerDims()))},t}return n(t,e),t.prototype.render=function(){for(var e,t=this.props,n=this.state,r=this.context,i=t.sections||[],a=this.processCols(t.cols),s=this.renderMicroColGroup(a,n.shrinkWidth),l=Yi(t.liquid,r),u=i.length,c=0,d=[],p=[],f=[];c<u&&"header"===(e=i[c]).type;)d.push(this.renderSection(e,c,s)),c++;for(;c<u&&"body"===(e=i[c]).type;)p.push(this.renderSection(e,c,s)),c++;for(;c<u&&"footer"===(e=i[c]).type;)f.push(this.renderSection(e,c,s)),c++;var h=!cr();return Hr("table",{className:l.join(" "),style:{height:t.height}},Boolean(!h&&d.length)&&Hr.apply(void 0,o(["thead",{}],d)),Boolean(!h&&p.length)&&Hr.apply(void 0,o(["tbody",{}],p)),Boolean(!h&&f.length)&&Hr.apply(void 0,o(["tfoot",{}],f)),h&&Hr.apply(void 0,o(["tbody",{}],d,p,f)))},t.prototype.renderSection=function(e,t,n){return"outerContent"in e?Hr(Ur,{key:e.key},e.outerContent):Hr("tr",{key:e.key,className:Zi(e,this.props.liquid).join(" ")},this.renderChunkTd(e,t,n,e.chunk))},t.prototype.renderChunkTd=function(e,t,n,r){if("outerContent"in r)return r.outerContent;var o=this.props,i=this.state,a=i.forceYScrollbars,s=i.scrollerClientWidths,l=i.scrollerClientHeights,u=zi(o,e),c=Vi(o,e),d=o.liquid?a?"scroll":u?"auto":"hidden":"visible",p=Fi(e,r,{tableColGroupNode:n,tableMinWidth:"",clientWidth:void 0!==s[t]?s[t]:null,clientHeight:void 0!==l[t]?l[t]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:function(){}});return Hr("td",{ref:r.elRef},Hr("div",{className:"fc-scroller-harness"+(c?" fc-scroller-harness-liquid":"")},Hr(Ui,{ref:this.scrollerRefs.createRef(t),elRef:this.scrollerElRefs.createRef(t),overflowY:d,overflowX:o.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},p)))},t.prototype._handleScrollerEl=function(e,t){var n=parseInt(t,10);Yr(this.props.sections[n].chunk.scrollerElRef,e)},t.prototype.componentDidMount=function(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)},t.prototype.componentDidUpdate=function(){this.handleSizing()},t.prototype.componentWillUnmount=function(){this.context.removeResizeHandler(this.handleSizing)},t.prototype.computeShrinkWidth=function(){return qi(this.props.cols)?Wi(this.scrollerElRefs.getAll()):0},t.prototype.computeScrollerDims=function(){for(var e=Sr(),t=this.props.sections.length,n=this.scrollerRefs,r=this.scrollerElRefs,o=!1,i={},a={},s=0;s<t;s++){var l=n.currentMap[s];if(l&&l.needsYScrolling()){o=!0;break}}for(s=0;s<t;s++){var u=r.currentMap[s];if(u){var c=u.parentNode;i[s]=Math.floor(c.getBoundingClientRect().width-(o?e.y:0)),a[s]=Math.floor(c.getBoundingClientRect().height)}}return{forceYScrollbars:o,scrollerClientWidths:i,scrollerClientHeights:a}},t}(jr);$i.addStateEquality({scrollerClientWidths:Le,scrollerClientHeights:Le});var Qi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elRef=Ar(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=e.seg,o=r.eventRange,i=o.ui,a={event:new zn(t,o.def,o.instance),view:t.viewApi,timeText:e.timeText,textColor:i.textColor,backgroundColor:i.backgroundColor,borderColor:i.borderColor,isDraggable:!e.disableDragging&&gn(r,t),isStartResizable:!e.disableResizing&&mn(r,t),isEndResizable:!e.disableResizing&&yn(r),isMirror:Boolean(e.isDragging||e.isResizing||e.isDateSelecting),isStart:Boolean(r.isStart),isEnd:Boolean(r.isEnd),isPast:Boolean(e.isPast),isFuture:Boolean(e.isFuture),isToday:Boolean(e.isToday),isSelected:Boolean(e.isSelected),isDragging:Boolean(e.isDragging),isResizing:Boolean(e.isResizing)},s=Dn(a).concat(i.classNames);return Hr(uo,{hookProps:a,classNames:n.eventClassNames,content:n.eventContent,defaultContent:e.defaultContent,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount,elRef:this.elRef},(function(t,n,r,o){return e.children(t,s.concat(n),r,o,a)}))},t.prototype.componentDidMount=function(){cn(this.elRef.current,this.props.seg)},t.prototype.componentDidUpdate=function(e){var t=this.props.seg;t!==e.seg&&cn(this.elRef.current,t)},t}(jr),ea=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,o=t.options.eventTimeFormat||e.defaultTimeFormat,i=En(n,o,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return Hr(Qi,{seg:n,timeText:i,disableDragging:e.disableDragging,disableResizing:e.disableResizing,defaultContent:e.defaultContent||ta,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,o,i,a,s){return Hr("a",r({className:e.extraClassNames.concat(o).join(" "),style:{borderColor:s.borderColor,backgroundColor:s.backgroundColor},ref:t},function(e){var t=e.eventRange.def.url;return t?{href:t}:{}}(n)),Hr("div",{className:"fc-event-main",ref:i,style:{color:s.textColor}},a),s.isStartResizable&&Hr("div",{className:"fc-event-resizer fc-event-resizer-start"}),s.isEndResizable&&Hr("div",{className:"fc-event-resizer fc-event-resizer-end"}))}))},t}(jr);function ta(e){return Hr("div",{className:"fc-event-main-frame"},e.timeText&&Hr("div",{className:"fc-event-time"},e.timeText),Hr("div",{className:"fc-event-title-container"},Hr("div",{className:"fc-event-title fc-sticky"},e.event.title||Hr(Ur,null,"\xa0"))))}var na=function(e){return Hr(zr.Consumer,null,(function(t){var n=t.options,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return Hr(uo,{hookProps:r,classNames:n.nowIndicatorClassNames,content:n.nowIndicatorContent,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},e.children)}))},ra=St({day:"numeric"}),oa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=at(aa),t.normalizeClassNames=vo(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=this.refineHookProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv}),o=vr(r,t.theme).concat(r.isDisabled?[]:this.normalizeClassNames(n.dayCellClassNames,r)),i=r.isDisabled?{}:{"data-date":tt(e.date)};return Hr(ho,{hookProps:r,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount,elRef:e.elRef},(function(t){return e.children(t,o,i,r.isDisabled)}))},t}(jr),ia=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=aa({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv});return Hr(po,{hookProps:r,content:n.dayCellContent,defaultContent:e.defaultContent},e.children)},t}(jr);function aa(e){var t=e.date,n=e.dateEnv,o=hr(t,e.todayRange,null,e.dateProfile);return r(r(r({date:n.toDate(t),view:e.viewApi},o),{dayNumberText:e.showDayNumber?n.format(t,ra):""}),e.extraProps)}function sa(e){return Hr("div",{className:"fc-"+e})}var la=function(e){return Hr(Qi,{defaultContent:ua,seg:e.seg,timeText:"",disableDragging:!0,disableResizing:!0,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(e,t,n,r,o){return Hr("div",{ref:e,className:["fc-bg-event"].concat(t).join(" "),style:{backgroundColor:o.backgroundColor}},r)}))};function ua(e){return e.event.title&&Hr("div",{className:"fc-event-title"},e.event.title)}var ca=function(e){return Hr(zr.Consumer,null,(function(t){var n=t.dateEnv,r=t.options,o=e.date,i=r.weekNumberFormat||e.defaultFormat,a=n.computeWeekNumber(o),s=n.format(o,i);return Hr(uo,{hookProps:{num:a,text:s,date:o},classNames:r.weekNumberClassNames,content:r.weekNumberContent,defaultContent:da,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)}))};function da(e){return e.text}var pa=function(e){function t(t,n){void 0===n&&(n={});var o=e.call(this)||this;return o.isRendering=!1,o.isRendered=!1,o.currentClassNames=[],o.customContentRenderId=0,o.handleAction=function(e){switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":o.renderRunner.tryDrain()}},o.handleData=function(e){o.currentData=e,o.renderRunner.request(e.calendarOptions.rerenderDelay)},o.handleRenderRequest=function(){if(o.isRendering){o.isRendered=!0;var e=o.currentData;Or(Hr(bi,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,i,a){return o.setClassNames(t),o.setHeight(n),Hr(co.Provider,{value:o.customContentRenderId},Hr(Ei,r({isHeightAuto:i,forPrint:a},e)))})),o.el)}else o.isRendered&&(o.isRendered=!1,Or(null,o.el),o.setClassNames([]),o.setHeight(""));Wr()},o.el=t,o.renderRunner=new Go(o.handleRenderRequest),new Zo({optionOverrides:n,calendarApi:o,onAction:o.handleAction,onData:o.handleData}),o}return n(t,e),Object.defineProperty(t.prototype,"view",{get:function(){return this.currentData.viewApi},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this.isRendering;e?this.customContentRenderId++:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()},t.prototype.destroy=function(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())},t.prototype.updateSize=function(){e.prototype.updateSize.call(this),Wr()},t.prototype.batchRendering=function(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")},t.prototype.pauseRendering=function(){this.renderRunner.pause("pauseRendering")},t.prototype.resumeRendering=function(){this.renderRunner.resume("pauseRendering",!0)},t.prototype.resetOptions=function(e,t){this.currentDataManager.resetOptions(e,t)},t.prototype.setClassNames=function(e){if(!ot(e,this.currentClassNames)){for(var t=this.el.classList,n=0,r=this.currentClassNames;n<r.length;n++){var o=r[n];t.remove(o)}for(var i=0,a=e;i<a.length;i++){o=a[i];t.add(o)}this.currentClassNames=e}},t.prototype.setHeight=function(e){G(this.el,"height",e)},t}(Vn);di.touchMouseIgnoreWait=500;var fa=0,ha=0,va=!1,ga=function(){function e(e){var t=this;this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=function(e){if(!t.shouldIgnoreMouse()&&function(e){return 0===e.button&&!e.ctrlKey}(e)&&t.tryStart(e)){var n=t.createEventFromMouse(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n),t.shouldIgnoreMove||document.addEventListener("mousemove",t.handleMouseMove),document.addEventListener("mouseup",t.handleMouseUp)}},this.handleMouseMove=function(e){var n=t.createEventFromMouse(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleMouseUp=function(e){document.removeEventListener("mousemove",t.handleMouseMove),document.removeEventListener("mouseup",t.handleMouseUp),t.emitter.trigger("pointerup",t.createEventFromMouse(e)),t.cleanup()},this.handleTouchStart=function(e){if(t.tryStart(e)){t.isTouchDragging=!0;var n=t.createEventFromTouch(e,!0);t.emitter.trigger("pointerdown",n),t.initScrollWatch(n);var r=e.target;t.shouldIgnoreMove||r.addEventListener("touchmove",t.handleTouchMove),r.addEventListener("touchend",t.handleTouchEnd),r.addEventListener("touchcancel",t.handleTouchEnd),window.addEventListener("scroll",t.handleTouchScroll,!0)}},this.handleTouchMove=function(e){var n=t.createEventFromTouch(e);t.recordCoords(n),t.emitter.trigger("pointermove",n)},this.handleTouchEnd=function(e){if(t.isDragging){var n=e.target;n.removeEventListener("touchmove",t.handleTouchMove),n.removeEventListener("touchend",t.handleTouchEnd),n.removeEventListener("touchcancel",t.handleTouchEnd),window.removeEventListener("scroll",t.handleTouchScroll,!0),t.emitter.trigger("pointerup",t.createEventFromTouch(e)),t.cleanup(),t.isTouchDragging=!1,fa++,setTimeout((function(){fa--}),di.touchMouseIgnoreWait)}},this.handleTouchScroll=function(){t.wasTouchScroll=!0},this.handleScroll=function(e){if(!t.shouldIgnoreMove){var n=window.pageXOffset-t.prevScrollX+t.prevPageX,r=window.pageYOffset-t.prevScrollY+t.prevPageY;t.emitter.trigger("pointermove",{origEvent:e,isTouch:t.isTouchDragging,subjectEl:t.subjectEl,pageX:n,pageY:r,deltaX:n-t.origPageX,deltaY:r-t.origPageY})}},this.containerEl=e,this.emitter=new kr,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),ha++||window.addEventListener("touchmove",ma,{passive:!1})}return e.prototype.destroy=function(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),--ha||window.removeEventListener("touchmove",ma,{passive:!1})},e.prototype.tryStart=function(e){var t=this.querySubjectEl(e),n=e.target;return!(!t||this.handleSelector&&!V(n,this.handleSelector))&&(this.subjectEl=t,this.isDragging=!0,this.wasTouchScroll=!1,!0)},e.prototype.cleanup=function(){va=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()},e.prototype.querySubjectEl=function(e){return this.selector?V(e.target,this.selector):this.containerEl},e.prototype.shouldIgnoreMouse=function(){return fa||this.isTouchDragging},e.prototype.cancelTouchScroll=function(){this.isDragging&&(va=!0)},e.prototype.initScrollWatch=function(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))},e.prototype.recordCoords=function(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.pageXOffset,this.prevScrollY=window.pageYOffset)},e.prototype.destroyScrollWatch=function(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)},e.prototype.createEventFromMouse=function(e,t){var n=0,r=0;return t?(this.origPageX=e.pageX,this.origPageY=e.pageY):(n=e.pageX-this.origPageX,r=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:n,deltaY:r}},e.prototype.createEventFromTouch=function(e,t){var n,r,o=e.touches,i=0,a=0;return o&&o.length?(n=o[0].pageX,r=o[0].pageY):(n=e.pageX,r=e.pageY),t?(this.origPageX=n,this.origPageY=r):(i=n-this.origPageX,a=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:n,pageY:r,deltaX:i,deltaY:a}},e}();function ma(e){va&&e.preventDefault()}var ya=function(){function e(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}return e.prototype.start=function(e,t,n){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=t-window.pageXOffset,this.origScreenY=n-window.pageYOffset,this.deltaX=0,this.deltaY=0,this.updateElPosition()},e.prototype.handleMove=function(e,t){this.deltaX=e-window.pageXOffset-this.origScreenX,this.deltaY=t-window.pageYOffset-this.origScreenY,this.updateElPosition()},e.prototype.setIsVisible=function(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)},e.prototype.stop=function(e,t){var n=this,r=function(){n.cleanup(),t()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)},e.prototype.doRevertAnimation=function(e,t){var n=this.mirrorEl,r=this.sourceEl.getBoundingClientRect();n.style.transition="top "+t+"ms,left "+t+"ms",j(n,{left:r.left,top:r.top}),K(n,(function(){n.style.transition="",e()}))},e.prototype.cleanup=function(){this.mirrorEl&&(W(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null},e.prototype.updateElPosition=function(){this.sourceEl&&this.isVisible&&j(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})},e.prototype.getMirrorEl=function(){var e=this.sourceElRect,t=this.mirrorEl;return t||((t=this.mirrorEl=this.sourceEl.cloneNode(!0)).classList.add("fc-unselectable"),t.classList.add("fc-event-dragging"),j(t,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(t)),t},e}(),Ea=function(e){function t(t,n){var r=e.call(this)||this;return r.handleScroll=function(){r.scrollTop=r.scrollController.getScrollTop(),r.scrollLeft=r.scrollController.getScrollLeft(),r.handleScrollChange()},r.scrollController=t,r.doesListening=n,r.scrollTop=r.origScrollTop=t.getScrollTop(),r.scrollLeft=r.origScrollLeft=t.getScrollLeft(),r.scrollWidth=t.getScrollWidth(),r.scrollHeight=t.getScrollHeight(),r.clientWidth=t.getClientWidth(),r.clientHeight=t.getClientHeight(),r.clientRect=r.computeClientRect(),r.doesListening&&r.getEventTarget().addEventListener("scroll",r.handleScroll),r}return n(t,e),t.prototype.destroy=function(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)},t.prototype.getScrollTop=function(){return this.scrollTop},t.prototype.getScrollLeft=function(){return this.scrollLeft},t.prototype.setScrollTop=function(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())},t.prototype.setScrollLeft=function(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())},t.prototype.getClientWidth=function(){return this.clientWidth},t.prototype.getClientHeight=function(){return this.clientHeight},t.prototype.getScrollWidth=function(){return this.scrollWidth},t.prototype.getScrollHeight=function(){return this.scrollHeight},t.prototype.handleScrollChange=function(){},t}(xr),Sa=function(e){function t(t,n){return e.call(this,new _r(t),n)||this}return n(t,e),t.prototype.getEventTarget=function(){return this.scrollController.el},t.prototype.computeClientRect=function(){return Cr(this.scrollController.el)},t}(Ea),Da=function(e){function t(t){return e.call(this,new Ir,t)||this}return n(t,e),t.prototype.getEventTarget=function(){return window},t.prototype.computeClientRect=function(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}},t.prototype.handleScrollChange=function(){this.clientRect=this.computeClientRect()},t}(Ea),ba="function"==typeof performance?performance.now:Date.now,Ca=function(){function e(){var e=this;this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=function(){if(e.isAnimating){var t=e.computeBestEdge(e.pointerScreenX+window.pageXOffset,e.pointerScreenY+window.pageYOffset);if(t){var n=ba();e.handleSide(t,(n-e.msSinceRequest)/1e3),e.requestAnimation(n)}else e.isAnimating=!1}}}return e.prototype.start=function(e,t){this.isEnabled&&(this.scrollCaches=this.buildCaches(),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,t))},e.prototype.handleMove=function(e,t){if(this.isEnabled){var n=e-window.pageXOffset,r=t-window.pageYOffset,o=null===this.pointerScreenY?0:r-this.pointerScreenY,i=null===this.pointerScreenX?0:n-this.pointerScreenX;o<0?this.everMovedUp=!0:o>0&&(this.everMovedDown=!0),i<0?this.everMovedLeft=!0:i>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(ba()))}},e.prototype.stop=function(){if(this.isEnabled){this.isAnimating=!1;for(var e=0,t=this.scrollCaches;e<t.length;e++){t[e].destroy()}this.scrollCaches=null}},e.prototype.requestAnimation=function(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)},e.prototype.handleSide=function(e,t){var n=e.scrollCache,r=this.edgeThreshold,o=r-e.distance,i=o*o/(r*r)*this.maxVelocity*t,a=1;switch(e.name){case"left":a=-1;case"right":n.setScrollLeft(n.getScrollLeft()+i*a);break;case"top":a=-1;case"bottom":n.setScrollTop(n.getScrollTop()+i*a)}},e.prototype.computeBestEdge=function(e,t){for(var n=this.edgeThreshold,r=null,o=0,i=this.scrollCaches;o<i.length;o++){var a=i[o],s=a.clientRect,l=e-s.left,u=s.right-e,c=t-s.top,d=s.bottom-t;l>=0&&u>=0&&c>=0&&d>=0&&(c<=n&&this.everMovedUp&&a.canScrollUp()&&(!r||r.distance>c)&&(r={scrollCache:a,name:"top",distance:c}),d<=n&&this.everMovedDown&&a.canScrollDown()&&(!r||r.distance>d)&&(r={scrollCache:a,name:"bottom",distance:d}),l<=n&&this.everMovedLeft&&a.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:a,name:"left",distance:l}),u<=n&&this.everMovedRight&&a.canScrollRight()&&(!r||r.distance>u)&&(r={scrollCache:a,name:"right",distance:u}))}return r},e.prototype.buildCaches=function(){return this.queryScrollEls().map((function(e){return e===window?new Da(!1):new Sa(e,!1)}))},e.prototype.queryScrollEls=function(){for(var e=[],t=0,n=this.scrollQuery;t<n.length;t++){var r=n[t];"object"==typeof r?e.push(r):e.push.apply(e,Array.prototype.slice.call(document.querySelectorAll(r)))}return e},e}(),wa=function(e){function t(t,n){var r=e.call(this,t)||this;r.delay=null,r.minDistance=0,r.touchScrollAllowed=!0,r.mirrorNeedsRevert=!1,r.isInteracting=!1,r.isDragging=!1,r.isDelayEnded=!1,r.isDistanceSurpassed=!1,r.delayTimeoutId=null,r.onPointerDown=function(e){r.isDragging||(r.isInteracting=!0,r.isDelayEnded=!1,r.isDistanceSurpassed=!1,te(document.body),re(document.body),e.isTouch||e.origEvent.preventDefault(),r.emitter.trigger("pointerdown",e),r.isInteracting&&!r.pointer.shouldIgnoreMove&&(r.mirror.setIsVisible(!1),r.mirror.start(e.subjectEl,e.pageX,e.pageY),r.startDelay(e),r.minDistance||r.handleDistanceSurpassed(e)))},r.onPointerMove=function(e){if(r.isInteracting){if(r.emitter.trigger("pointermove",e),!r.isDistanceSurpassed){var t=r.minDistance,n=e.deltaX,o=e.deltaY;n*n+o*o>=t*t&&r.handleDistanceSurpassed(e)}r.isDragging&&("scroll"!==e.origEvent.type&&(r.mirror.handleMove(e.pageX,e.pageY),r.autoScroller.handleMove(e.pageX,e.pageY)),r.emitter.trigger("dragmove",e))}},r.onPointerUp=function(e){r.isInteracting&&(r.isInteracting=!1,ne(document.body),oe(document.body),r.emitter.trigger("pointerup",e),r.isDragging&&(r.autoScroller.stop(),r.tryStopDrag(e)),r.delayTimeoutId&&(clearTimeout(r.delayTimeoutId),r.delayTimeoutId=null))};var o=r.pointer=new ga(t);return o.emitter.on("pointerdown",r.onPointerDown),o.emitter.on("pointermove",r.onPointerMove),o.emitter.on("pointerup",r.onPointerUp),n&&(o.selector=n),r.mirror=new ya,r.autoScroller=new Ca,r}return n(t,e),t.prototype.destroy=function(){this.pointer.destroy(),this.onPointerUp({})},t.prototype.startDelay=function(e){var t=this;"number"==typeof this.delay?this.delayTimeoutId=setTimeout((function(){t.delayTimeoutId=null,t.handleDelayEnd(e)}),this.delay):this.handleDelayEnd(e)},t.prototype.handleDelayEnd=function(e){this.isDelayEnded=!0,this.tryStartDrag(e)},t.prototype.handleDistanceSurpassed=function(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)},t.prototype.tryStartDrag=function(e){this.isDelayEnded&&this.isDistanceSurpassed&&(this.pointer.wasTouchScroll&&!this.touchScrollAllowed||(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY),this.emitter.trigger("dragstart",e),!1===this.touchScrollAllowed&&this.pointer.cancelTouchScroll()))},t.prototype.tryStopDrag=function(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))},t.prototype.stopDrag=function(e){this.isDragging=!1,this.emitter.trigger("dragend",e)},t.prototype.setIgnoreMove=function(e){this.pointer.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){this.mirror.setIsVisible(e)},t.prototype.setMirrorNeedsRevert=function(e){this.mirrorNeedsRevert=e},t.prototype.setAutoScrollEnabled=function(e){this.autoScroller.isEnabled=e},t}(ci),Ra=function(){function e(e){this.origRect=wr(e),this.scrollCaches=Rr(e).map((function(e){return new Sa(e,!0)}))}return e.prototype.destroy=function(){for(var e=0,t=this.scrollCaches;e<t.length;e++){t[e].destroy()}},e.prototype.computeLeft=function(){for(var e=this.origRect.left,t=0,n=this.scrollCaches;t<n.length;t++){var r=n[t];e+=r.origScrollLeft-r.getScrollLeft()}return e},e.prototype.computeTop=function(){for(var e=this.origRect.top,t=0,n=this.scrollCaches;t<n.length;t++){var r=n[t];e+=r.origScrollTop-r.getScrollTop()}return e},e.prototype.isWithinClipping=function(e,t){for(var n,r,o={left:e,top:t},i=0,a=this.scrollCaches;i<a.length;i++){var s=a[i];if(n=s.getEventTarget(),r=void 0,"HTML"!==(r=n.tagName)&&"BODY"!==r&&!ir(o,s.clientRect))return!1}return!0},e}();var Ta=function(){function e(e,t){var n=this;this.useSubjectCenter=!1,this.requireInitial=!0,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=function(e){var t=n.dragging;n.initialHit=null,n.movingHit=null,n.finalHit=null,n.prepareHits(),n.processFirstCoord(e),n.initialHit||!n.requireInitial?(t.setIgnoreMove(!1),n.emitter.trigger("pointerdown",e)):t.setIgnoreMove(!0)},this.handleDragStart=function(e){n.emitter.trigger("dragstart",e),n.handleMove(e,!0)},this.handleDragMove=function(e){n.emitter.trigger("dragmove",e),n.handleMove(e)},this.handlePointerUp=function(e){n.releaseHits(),n.emitter.trigger("pointerup",e)},this.handleDragEnd=function(e){n.movingHit&&n.emitter.trigger("hitupdate",null,!0,e),n.finalHit=n.movingHit,n.movingHit=null,n.emitter.trigger("dragend",e)},this.droppableStore=t,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new kr}return e.prototype.processFirstCoord=function(e){var t,n={left:e.pageX,top:e.pageY},r=n,o=e.subjectEl;o!==document&&(r=sr(r,t=wr(o)));var i=this.initialHit=this.queryHitForOffset(r.left,r.top);if(i){if(this.useSubjectCenter&&t){var a=ar(t,i.rect);a&&(r=lr(a))}this.coordAdjust=ur(r,n)}else this.coordAdjust={left:0,top:0}},e.prototype.handleMove=function(e,t){var n=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);!t&&ka(this.movingHit,n)||(this.movingHit=n,this.emitter.trigger("hitupdate",n,!1,e))},e.prototype.prepareHits=function(){this.offsetTrackers=Oe(this.droppableStore,(function(e){return e.component.prepareHits(),new Ra(e.el)}))},e.prototype.releaseHits=function(){var e=this.offsetTrackers;for(var t in e)e[t].destroy();this.offsetTrackers={}},e.prototype.queryHitForOffset=function(e,t){var n=this.droppableStore,r=this.offsetTrackers,o=null;for(var i in n){var a=n[i].component,s=r[i];if(s&&s.isWithinClipping(e,t)){var l=s.computeLeft(),u=s.computeTop(),c=e-l,d=t-u,p=s.origRect,f=p.right-p.left,h=p.bottom-p.top;if(c>=0&&c<f&&d>=0&&d<h){var v=a.queryHit(c,d,f,h),g=a.context.getCurrentData().dateProfile;v&&an(g.activeRange,v.dateSpan.range)&&(!o||v.layer>o.layer)&&(v.rect.left+=l,v.rect.right+=l,v.rect.top+=u,v.rect.bottom+=u,o=v)}}}return o},e}();function ka(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&Rn(e.dateSpan,t.dateSpan)}function Ma(e,t){for(var n,o,i={},a=0,s=t.pluginHooks.datePointTransforms;a<s.length;a++){var l=s[a];r(i,l(e,t))}return r(i,(n=e,{date:(o=t.dateEnv).toDate(n.range.start),dateStr:o.formatIso(n.range.start,{omitTime:n.allDay}),allDay:n.allDay})),i}var xa=function(e){function t(t){var n=e.call(this,t)||this;n.handlePointerDown=function(e){var t=n.dragging,r=e.origEvent.target;t.setIgnoreMove(!n.component.isValidDateDownEl(r))},n.handleDragEnd=function(e){var t=n.component;if(!n.dragging.pointer.wasTouchScroll){var o=n.hitDragging,i=o.initialHit,a=o.finalHit;if(i&&a&&ka(i,a)){var s=t.context,l=r(r({},Ma(i.dateSpan,s)),{dayEl:i.dayEl,jsEvent:e.origEvent,view:s.viewApi||s.calendarApi.view});s.emitter.trigger("dateClick",l)}}},n.dragging=new wa(t.el),n.dragging.autoScroller.isEnabled=!1;var o=n.hitDragging=new Ta(n.dragging,li(t));return o.emitter.on("pointerdown",n.handlePointerDown),o.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(ai),_a=function(e){function t(t){var n=e.call(this,t)||this;n.dragSelection=null,n.handlePointerDown=function(e){var t=n,r=t.component,o=t.dragging,i=r.context.options.selectable&&r.isValidDateDownEl(e.origEvent.target);o.setIgnoreMove(!i),o.delay=e.isTouch?function(e){var t=e.context.options,n=t.selectLongPressDelay;null==n&&(n=t.longPressDelay);return n}(r):null},n.handleDragStart=function(e){n.component.context.calendarApi.unselect(e)},n.handleHitUpdate=function(e,t){var o=n.component.context,i=null,a=!1;e&&((i=function(e,t,n){var o=e.dateSpan,i=t.dateSpan,a=[o.range.start,o.range.end,i.range.start,i.range.end];a.sort(ce);for(var s={},l=0,u=n;l<u.length;l++){var c=(0,u[l])(e,t);if(!1===c)return null;c&&r(s,c)}return s.range={start:a[0],end:a[3]},s.allDay=o.allDay,s}(n.hitDragging.initialHit,e,o.pluginHooks.dateSelectionTransformers))&&n.component.isDateSelectionValid(i)||(a=!0,i=null)),i?o.dispatch({type:"SELECT_DATES",selection:i}):t||o.dispatch({type:"UNSELECT_DATES"}),a?Q():ee(),t||(n.dragSelection=i)},n.handlePointerUp=function(e){n.dragSelection&&(xn(n.dragSelection,e,n.component.context),n.dragSelection=null)};var o=t.component.context.options,i=n.dragging=new wa(t.el);i.touchScrollAllowed=!1,i.minDistance=o.selectMinDistance||0,i.autoScroller.isEnabled=o.dragScroll;var a=n.hitDragging=new Ta(n.dragging,li(t));return a.emitter.on("pointerdown",n.handlePointerDown),a.emitter.on("dragstart",n.handleDragStart),a.emitter.on("hitupdate",n.handleHitUpdate),a.emitter.on("pointerup",n.handlePointerUp),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(ai);var Ia=function(e){function t(n){var o=e.call(this,n)||this;o.subjectEl=null,o.subjectSeg=null,o.isDragging=!1,o.eventRange=null,o.relevantEvents=null,o.receivingContext=null,o.validMutation=null,o.mutatedRelevantEvents=null,o.handlePointerDown=function(e){var t=e.origEvent.target,n=o,r=n.component,i=n.dragging,a=i.mirror,s=r.context.options,l=r.context;o.subjectEl=e.subjectEl;var u=o.subjectSeg=dn(e.subjectEl),c=(o.eventRange=u.eventRange).instance.instanceId;o.relevantEvents=Nt(l.getCurrentData().eventStore,c),i.minDistance=e.isTouch?0:s.eventDragMinDistance,i.delay=e.isTouch&&c!==r.props.eventSelection?function(e){var t=e.context.options,n=t.eventLongPressDelay;null==n&&(n=t.longPressDelay);return n}(r):null,a.parentNode=V(t,".fc"),a.revertDuration=s.dragRevertDuration;var d=r.isValidSegDownEl(t)&&!V(t,".fc-event-resizer");i.setIgnoreMove(!d),o.isDragging=d&&e.subjectEl.classList.contains("fc-event-draggable")},o.handleDragStart=function(e){var t=o.component.context,n=o.eventRange,r=n.instance.instanceId;e.isTouch?r!==o.component.props.eventSelection&&t.dispatch({type:"SELECT_EVENT",eventInstanceId:r}):t.dispatch({type:"UNSELECT_EVENT"}),o.isDragging&&(t.calendarApi.unselect(e),t.emitter.trigger("eventDragStart",{el:o.subjectEl,event:new zn(t,n.def,n.instance),jsEvent:e.origEvent,view:t.viewApi}))},o.handleHitUpdate=function(e,t){if(o.isDragging){var n=o.relevantEvents,r=o.hitDragging.initialHit,i=o.component.context,a=null,s=null,l=null,u=!1,c={affectedEvents:n,mutatedEvents:{defs:{},instances:{}},isEvent:!0};if(e){var d=e.component,p=(a=d.context).options;i===a||p.editable&&p.droppable?(s=function(e,t,n){var r=e.dateSpan,o=t.dateSpan,i=r.range.start,a=o.range.start,s={};r.allDay!==o.allDay&&(s.allDay=o.allDay,s.hasEnd=t.component.context.options.allDayMaintainDuration,o.allDay&&(i=be(i)));var l=Qt(i,a,e.component.context.dateEnv,e.component===t.component?e.component.largeUnit:null);l.milliseconds&&(s.allDay=!1);for(var u={datesDelta:l,standardProps:s},c=0,d=n;c<d.length;c++){(0,d[c])(u,e,t)}return u}(r,e,a.getCurrentData().pluginHooks.eventDragMutationMassagers))&&(l=Pn(n,a.getCurrentData().eventUiBases,s,a),c.mutatedEvents=l,d.isInteractionValid(c)||(u=!0,s=null,l=null,c.mutatedEvents={defs:{},instances:{}})):a=null}o.displayDrag(a,c),u?Q():ee(),t||(i===a&&ka(r,e)&&(s=null),o.dragging.setMirrorNeedsRevert(!s),o.dragging.setMirrorIsVisible(!e||!document.querySelector(".fc-event-mirror")),o.receivingContext=a,o.validMutation=s,o.mutatedRelevantEvents=l)}},o.handlePointerUp=function(){o.isDragging||o.cleanup()},o.handleDragEnd=function(e){if(o.isDragging){var t=o.component.context,n=t.viewApi,i=o,a=i.receivingContext,s=i.validMutation,l=o.eventRange.def,u=o.eventRange.instance,c=new zn(t,l,u),d=o.relevantEvents,p=o.mutatedRelevantEvents,f=o.hitDragging.finalHit;if(o.clearDrag(),t.emitter.trigger("eventDragStop",{el:o.subjectEl,event:c,jsEvent:e.origEvent,view:n}),s){if(a===t){var h=new zn(t,p.defs[l.defId],u?p.instances[u.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:p});for(var v={oldEvent:c,event:h,relatedEvents:Bn(p,t,u),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}},g={},m=0,y=t.getCurrentData().pluginHooks.eventDropTransformers;m<y.length;m++){var E=y[m];r(g,E(s,t))}t.emitter.trigger("eventDrop",r(r(r({},v),g),{el:e.subjectEl,delta:s.datesDelta,jsEvent:e.origEvent,view:n})),t.emitter.trigger("eventChange",v)}else if(a){var S={event:c,relatedEvents:Bn(d,t,u),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}};t.emitter.trigger("eventLeave",r(r({},S),{draggedEl:e.subjectEl,view:n})),t.dispatch({type:"REMOVE_EVENTS",eventStore:d}),t.emitter.trigger("eventRemove",S);var D=p.defs[l.defId],b=p.instances[u.instanceId],C=new zn(a,D,b);a.dispatch({type:"MERGE_EVENTS",eventStore:p});var w={event:C,relatedEvents:Bn(p,a,b),revert:function(){a.dispatch({type:"REMOVE_EVENTS",eventStore:p})}};a.emitter.trigger("eventAdd",w),e.isTouch&&a.dispatch({type:"SELECT_EVENT",eventInstanceId:u.instanceId}),a.emitter.trigger("drop",r(r({},Ma(f.dateSpan,a)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:f.component.context.viewApi})),a.emitter.trigger("eventReceive",r(r({},w),{draggedEl:e.subjectEl,view:f.component.context.viewApi}))}}else t.emitter.trigger("_noEventDrop")}o.cleanup()};var i=o.component.context.options,a=o.dragging=new wa(n.el);a.pointer.selector=t.SELECTOR,a.touchScrollAllowed=!1,a.autoScroller.isEnabled=i.dragScroll;var s=o.hitDragging=new Ta(o.dragging,ui);return s.useSubjectCenter=n.useEventCenter,s.emitter.on("pointerdown",o.handlePointerDown),s.emitter.on("dragstart",o.handleDragStart),s.emitter.on("hitupdate",o.handleHitUpdate),s.emitter.on("pointerup",o.handlePointerUp),s.emitter.on("dragend",o.handleDragEnd),o}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.displayDrag=function(e,t){var n=this.component.context,r=this.receivingContext;r&&r!==e&&(r===n?r.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:t.affectedEvents,mutatedEvents:{defs:{},instances:{}},isEvent:!0}}):r.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})},t.prototype.clearDrag=function(){var e=this.component.context,t=this.receivingContext;t&&t.dispatch({type:"UNSET_EVENT_DRAG"}),e!==t&&e.dispatch({type:"UNSET_EVENT_DRAG"})},t.prototype.cleanup=function(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null},t.SELECTOR=".fc-event-draggable, .fc-event-resizable",t}(ai);var Pa=function(e){function t(t){var n=e.call(this,t)||this;n.draggingSegEl=null,n.draggingSeg=null,n.eventRange=null,n.relevantEvents=null,n.validMutation=null,n.mutatedRelevantEvents=null,n.handlePointerDown=function(e){var t=n.component,r=dn(n.querySegEl(e)),o=n.eventRange=r.eventRange;n.dragging.minDistance=t.context.options.eventDragMinDistance,n.dragging.setIgnoreMove(!n.component.isValidSegDownEl(e.origEvent.target)||e.isTouch&&n.component.props.eventSelection!==o.instance.instanceId)},n.handleDragStart=function(e){var t=n.component.context,r=n.eventRange;n.relevantEvents=Nt(t.getCurrentData().eventStore,n.eventRange.instance.instanceId);var o=n.querySegEl(e);n.draggingSegEl=o,n.draggingSeg=dn(o),t.calendarApi.unselect(),t.emitter.trigger("eventResizeStart",{el:o,event:new zn(t,r.def,r.instance),jsEvent:e.origEvent,view:t.viewApi})},n.handleHitUpdate=function(e,t,o){var i=n.component.context,a=n.relevantEvents,s=n.hitDragging.initialHit,l=n.eventRange.instance,u=null,c=null,d=!1,p={affectedEvents:a,mutatedEvents:{defs:{},instances:{}},isEvent:!0};e&&(u=function(e,t,n,o,i){for(var a=e.component.context.dateEnv,s=e.dateSpan.range.start,l=t.dateSpan.range.start,u=Qt(s,l,a,e.component.largeUnit),c={},d=0,p=i;d<p.length;d++){var f=(0,p[d])(e,t);if(!1===f)return null;f&&r(c,f)}if(n){if(a.add(o.start,u)<o.end)return c.startDelta=u,c}else if(a.add(o.end,u)>o.start)return c.endDelta=u,c;return null}(s,e,o.subjectEl.classList.contains("fc-event-resizer-start"),l.range,i.pluginHooks.eventResizeJoinTransforms)),u&&(c=Pn(a,i.getCurrentData().eventUiBases,u,i),p.mutatedEvents=c,n.component.isInteractionValid(p)||(d=!0,u=null,c=null,p.mutatedEvents=null)),c?i.dispatch({type:"SET_EVENT_RESIZE",state:p}):i.dispatch({type:"UNSET_EVENT_RESIZE"}),d?Q():ee(),t||(u&&ka(s,e)&&(u=null),n.validMutation=u,n.mutatedRelevantEvents=c)},n.handleDragEnd=function(e){var t=n.component.context,o=n.eventRange.def,i=n.eventRange.instance,a=new zn(t,o,i),s=n.relevantEvents,l=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:a,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var u=new zn(t,l.defs[o.defId],i?l.instances[i.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:l});var c={oldEvent:a,event:u,relatedEvents:Bn(l,t,i),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:s})}};t.emitter.trigger("eventResize",r(r({},c),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||Ye(0),endDelta:n.validMutation.endDelta||Ye(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",c)}else t.emitter.trigger("_noEventResize");n.draggingSeg=null,n.relevantEvents=null,n.validMutation=null};var o=t.component,i=n.dragging=new wa(t.el);i.pointer.selector=".fc-event-resizer",i.touchScrollAllowed=!1,i.autoScroller.isEnabled=o.context.options.dragScroll;var a=n.hitDragging=new Ta(n.dragging,li(t));return a.emitter.on("pointerdown",n.handlePointerDown),a.emitter.on("dragstart",n.handleDragStart),a.emitter.on("hitupdate",n.handleHitUpdate),a.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t.prototype.querySegEl=function(e){return V(e.subjectEl,".fc-event")},t}(ai);var Na=function(){function e(e){var t=this;this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=function(e){e.jsEvent&&(t.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=function(e){var n=t.context.options.unselectCancel,r=e.origEvent.target;t.matchesCancel=!!V(r,n),t.matchesEvent=!!V(r,Ia.SELECTOR)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,o=n.getCurrentData();if(!r.wasTouchScroll){if(o.dateSelection&&!t.isRecentPointerDateSelect){var i=n.options.unselectAuto;!i||i&&t.matchesCancel||n.calendarApi.unselect(e)}o.eventSelection&&!t.matchesEvent&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new ga(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}return e.prototype.destroy=function(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()},e}(),Ha={dateClick:_t,eventDragStart:_t,eventDragStop:_t,eventDrop:_t,eventResizeStart:_t,eventResizeStop:_t,eventResize:_t,drop:_t,eventReceive:_t,eventLeave:_t},Oa=function(){function e(e,t){var n=this;this.receivingContext=null,this.droppableEvent=null,this.suppliedDragMeta=null,this.dragMeta=null,this.handleDragStart=function(e){n.dragMeta=n.buildDragMeta(e.subjectEl)},this.handleHitUpdate=function(e,t,o){var i=n.hitDragging.dragging,a=null,s=null,l=!1,u={affectedEvents:{defs:{},instances:{}},mutatedEvents:{defs:{},instances:{}},isEvent:n.dragMeta.create};e&&(a=e.component.context,n.canDropElOnCalendar(o.subjectEl,a)&&(s=function(e,t,n){for(var o=r({},t.leftoverProps),i=0,a=n.pluginHooks.externalDefTransforms;i<a.length;i++){var s=a[i];r(o,s(e,t))}var l=Yt(o,n),u=l.refined,c=l.extra,d=Xt(u,c,t.sourceId,e.allDay,n.options.forceEventDuration||Boolean(t.duration),n),p=e.range.start;e.allDay&&t.startTime&&(p=n.dateEnv.add(p,t.startTime));var f=t.duration?n.dateEnv.add(p,t.duration):In(e.allDay,p,n),h=Ie(d.defId,{start:p,end:f});return{def:d,instance:h}}(e.dateSpan,n.dragMeta,a),u.mutatedEvents=Pt(s),(l=!Jr(u,a))&&(u.mutatedEvents={defs:{},instances:{}},s=null))),n.displayDrag(a,u),i.setMirrorIsVisible(t||!s||!document.querySelector(".fc-event-mirror")),l?Q():ee(),t||(i.setMirrorNeedsRevert(!s),n.receivingContext=a,n.droppableEvent=s)},this.handleDragEnd=function(e){var t=n,o=t.receivingContext,i=t.droppableEvent;if(n.clearDrag(),o&&i){var a=n.hitDragging.finalHit,s=a.component.context.viewApi,l=n.dragMeta;if(o.emitter.trigger("drop",r(r({},Ma(a.dateSpan,o)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:s})),l.create){var u=Pt(i);o.dispatch({type:"MERGE_EVENTS",eventStore:u}),e.isTouch&&o.dispatch({type:"SELECT_EVENT",eventInstanceId:i.instance.instanceId}),o.emitter.trigger("eventReceive",{event:new zn(o,i.def,i.instance),relatedEvents:[],revert:function(){o.dispatch({type:"REMOVE_EVENTS",eventStore:u})},draggedEl:e.subjectEl,view:s})}}n.receivingContext=null,n.droppableEvent=null};var o=this.hitDragging=new Ta(e,ui);o.requireInitial=!1,o.emitter.on("dragstart",this.handleDragStart),o.emitter.on("hitupdate",this.handleHitUpdate),o.emitter.on("dragend",this.handleDragEnd),this.suppliedDragMeta=t}return e.prototype.buildDragMeta=function(e){return"object"==typeof this.suppliedDragMeta?fi(this.suppliedDragMeta):"function"==typeof this.suppliedDragMeta?fi(this.suppliedDragMeta(e)):fi((t=function(e,t){var n=di.dataAttrPrefix,r=(n?n+"-":"")+t;return e.getAttribute("data-"+r)||""}(e,"event"))?JSON.parse(t):{create:!1});var t},e.prototype.displayDrag=function(e,t){var n=this.receivingContext;n&&n!==e&&n.dispatch({type:"UNSET_EVENT_DRAG"}),e&&e.dispatch({type:"SET_EVENT_DRAG",state:t})},e.prototype.clearDrag=function(){this.receivingContext&&this.receivingContext.dispatch({type:"UNSET_EVENT_DRAG"})},e.prototype.canDropElOnCalendar=function(e,t){var n=t.options.dropAccept;return"function"==typeof n?n.call(t.calendarApi,e):"string"!=typeof n||!n||Boolean(z(e,n))},e}();di.dataAttrPrefix="";var Aa=function(){function e(e,t){var n=this;void 0===t&&(t={}),this.handlePointerDown=function(e){var t=n.dragging,r=n.settings,o=r.minDistance,i=r.longPressDelay;t.minDistance=null!=o?o:e.isTouch?0:bt.eventDragMinDistance,t.delay=e.isTouch?null!=i?i:bt.longPressDelay:0},this.handleDragStart=function(e){e.isTouch&&n.dragging.delay&&e.subjectEl.classList.contains("fc-event")&&n.dragging.mirror.getMirrorEl().classList.add("fc-event-selected")},this.settings=t;var r=this.dragging=new wa(e);r.touchScrollAllowed=!1,null!=t.itemSelector&&(r.pointer.selector=t.itemSelector),null!=t.appendTo&&(r.mirror.parentNode=t.appendTo),r.emitter.on("pointerdown",this.handlePointerDown),r.emitter.on("dragstart",this.handleDragStart),new Oa(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Ua=function(e){function t(t){var n=e.call(this,t)||this;n.shouldIgnoreMove=!1,n.mirrorSelector="",n.currentMirrorEl=null,n.handlePointerDown=function(e){n.emitter.trigger("pointerdown",e),n.shouldIgnoreMove||n.emitter.trigger("dragstart",e)},n.handlePointerMove=function(e){n.shouldIgnoreMove||n.emitter.trigger("dragmove",e)},n.handlePointerUp=function(e){n.emitter.trigger("pointerup",e),n.shouldIgnoreMove||n.emitter.trigger("dragend",e)};var r=n.pointer=new ga(t);return r.emitter.on("pointerdown",n.handlePointerDown),r.emitter.on("pointermove",n.handlePointerMove),r.emitter.on("pointerup",n.handlePointerUp),n}return n(t,e),t.prototype.destroy=function(){this.pointer.destroy()},t.prototype.setIgnoreMove=function(e){this.shouldIgnoreMove=e},t.prototype.setMirrorIsVisible=function(e){if(e)this.currentMirrorEl&&(this.currentMirrorEl.style.visibility="",this.currentMirrorEl=null);else{var t=this.mirrorSelector?document.querySelector(this.mirrorSelector):null;t&&(this.currentMirrorEl=t,t.style.visibility="hidden")}},t}(ci),La=function(){function e(e,t){var n=document;e===document||e instanceof Element?(n=e,t=t||{}):t=e||{};var r=this.dragging=new Ua(n);"string"==typeof t.itemSelector?r.pointer.selector=t.itemSelector:n===document&&(r.pointer.selector="[data-event]"),"string"==typeof t.mirrorSelector&&(r.mirrorSelector=t.mirrorSelector),new Oa(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Wa=io({componentInteractions:[xa,_a,Ia,Pa],calendarInteractions:[Na],elementDraggingImpl:wa,listenerRefiners:Ha}),Va=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.headerElRef=Ar(),t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t){var n=this.props,r=this.context,o=[],i=Ki(r.options);return e&&o.push({type:"header",key:"header",isSticky:i,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),o.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),Hr(yo,{viewSpec:r.viewSpec},(function(e,t){return Hr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Hr($i,{liquid:!n.isHeightAuto&&!n.forPrint,cols:[],sections:o}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r){var o=this.context.pluginHooks.scrollGridImpl;if(!o)throw new Error("No ScrollGrid implementation");var i=this.props,a=this.context,s=!i.forPrint&&Ki(a.options),l=!i.forPrint&&Ji(a.options),u=[];return e&&u.push({type:"header",key:"header",isSticky:s,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),u.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),l&&u.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:Xi}]}),Hr(yo,{viewSpec:a.viewSpec},(function(e,t){return Hr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Hr(o,{liquid:!i.isHeightAuto&&!i.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:u}))}))},t}(oo);function za(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var o=0,i=e;o<i.length;o++){var a=i[o];n[a.row].push(a)}return n}function Fa(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var o=0,i=e;o<i.length;o++){var a=i[o];n[a.firstCol].push(a)}return n}function Ba(e,t){var n=[];if(e){for(a=0;a<t;a++)n[a]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,o=e.segs;r<o.length;r++){var i=o[r];n[i.row].segs.push(i)}}else for(var a=0;a<t;a++)n[a]=null;return n}var ja=St({week:"narrow"}),Ga=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,Yr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.props;if(n.onMoreClick){var r=n.segsByEachCol,o=r.filter((function(e){return n.segIsHidden[e.eventRange.instance.instanceId]}));n.onMoreClick({date:n.date,allSegs:r,hiddenSegs:o,moreCnt:n.moreCnt,dayEl:t.rootEl,ev:e})}},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,o=t.viewApi,i=this.props,a=i.date,s=i.dateProfile,l={num:i.moreCnt,text:i.buildMoreLinkText(i.moreCnt),view:o},u=n.navLinks?{"data-navlink":gr(a,"week"),tabIndex:0}:{};return Hr(oa,{date:a,dateProfile:s,todayRange:i.todayRange,showDayNumber:i.showDayNumber,extraHookProps:i.extraHookProps,elRef:this.handleRootEl},(function(t,o,c,d){return Hr("td",r({ref:t,className:["fc-daygrid-day"].concat(o,i.extraClassNames||[]).join(" ")},c,i.extraDataAttrs),Hr("div",{className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",ref:i.innerElRef},i.showWeekNumber&&Hr(ca,{date:a,defaultFormat:ja},(function(e,t,n,o){return Hr("a",r({ref:e,className:["fc-daygrid-week-number"].concat(t).join(" ")},u),o)})),!d&&Hr(Za,{date:a,dateProfile:s,showDayNumber:i.showDayNumber,forceDayTop:i.forceDayTop,todayRange:i.todayRange,extraHookProps:i.extraHookProps}),Hr("div",{className:"fc-daygrid-day-events",ref:i.fgContentElRef,style:{paddingBottom:i.fgPaddingBottom}},i.fgContent,Boolean(i.moreCnt)&&Hr("div",{className:"fc-daygrid-day-bottom",style:{marginTop:i.moreMarginTop}},Hr(uo,{hookProps:l,classNames:n.moreLinkClassNames,content:n.moreLinkContent,defaultContent:Ya,didMount:n.moreLinkDidMount,willUnmount:n.moreLinkWillUnmount},(function(t,n,r,o){return Hr("a",{onClick:e.handleMoreLinkClick,ref:t,className:["fc-daygrid-more-link"].concat(n).join(" ")},o)})))),Hr("div",{className:"fc-daygrid-day-bg"},i.bgContent)))}))},t}(oo);function qa(e){return e.dayNumberText}function Ya(e){return e.text}var Za=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context.options.navLinks?{"data-navlink":gr(e.date),tabIndex:0}:{};return Hr(ia,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,defaultContent:qa},(function(n,o){return(o||e.forceDayTop)&&Hr("div",{className:"fc-daygrid-day-top",ref:n},Hr("a",r({className:"fc-daygrid-day-number"},t),o||Hr(Ur,null,"\xa0")))}))},t}(jr),Xa=St({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function Ka(e){var t=e.eventRange.ui.display;return"list-item"===t||"auto"===t&&!e.eventRange.def.allDay&&e.firstCol===e.lastCol&&e.isStart&&e.isEnd}var Ja=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options.eventTimeFormat||Xa,o=En(e.seg,n,t,!0,e.defaultDisplayEventEnd);return Hr(Qi,{seg:e.seg,timeText:o,defaultContent:$a,isDragging:e.isDragging,isResizing:!1,isDateSelecting:!1,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,n,o,i){return Hr("a",r({className:["fc-daygrid-event","fc-daygrid-dot-event"].concat(n).join(" "),ref:t},(a=e.seg,(s=a.eventRange.def.url)?{href:s}:{})),i);var a,s}))},t}(jr);function $a(e){return Hr(Ur,null,Hr("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&Hr("div",{className:"fc-event-time"},e.timeText),Hr("div",{className:"fc-event-title"},e.event.title||Hr(Ur,null,"\xa0")))}var Qa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props;return Hr(ea,r({},e,{extraClassNames:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:Xa,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))},t}(jr);function es(e,t,n,o,i,a,s,l){for(var u=[],c=[],d={},p={},f={},h={},v={},g=0;g<s;g++)u.push([]),c.push(0);for(var m=0,y=t=hn(t,l);m<y.length;m++){T(w=y[m],i[w.eventRange.instance.instanceId+":"+w.firstCol]||0)}!0===n||!0===o?function(e,t,n,r){ns(e,t,n,!0,(function(e){return e.bottom<=r}))}(c,d,u,a):"number"==typeof n?function(e,t,n,r){ns(e,t,n,!1,(function(e,t){return t<r}))}(c,d,u,n):"number"==typeof o&&function(e,t,n,r){ns(e,t,n,!0,(function(e,t){return t<r}))}(c,d,u,o);for(var E=0;E<s;E++){for(var S=0,D=0,b=0,C=u[E];b<C.length;b++){var w,R=C[b];d[(w=R.seg).eventRange.instance.instanceId]||(p[w.eventRange.instance.instanceId]=R.top,w.firstCol===w.lastCol&&w.isStart&&w.isEnd?(f[w.eventRange.instance.instanceId]=R.top-S,D=0,S=R.bottom):D+=R.bottom-R.top)}D&&(c[E]?h[E]=D:v[E]=D)}function T(e,t){if(!k(e,t,0))for(var n=e.firstCol;n<=e.lastCol;n++)for(var r=0,o=u[n];r<o.length;r++){if(k(e,t,o[r].bottom))return}}function k(e,t,n){if(function(e,t,n){for(var r=e.firstCol;r<=e.lastCol;r++)for(var o=0,i=u[r];o<i.length;o++){var a=i[o];if(n<a.bottom&&n+t>a.top)return!1}return!0}(e,t,n)){for(var r=e.firstCol;r<=e.lastCol;r++){for(var o=u[r],i=0;i<o.length&&n>=o[i].top;)i++;o.splice(i,0,{seg:e,top:n,bottom:n+t})}return!0}return!1}for(var M in i)i[M]||(d[M.split(":")[0]]=!0);return{segsByFirstCol:u.map(ts),segsByEachCol:u.map((function(t,n){var o=function(e){for(var t=[],n=0,r=e;n<r.length;n++){var o=r[n];t.push(o.seg)}return t}(t);return o=function(e,t,n){for(var o=t,i=ve(o,1),a={start:o,end:i},s=[],l=0,u=e;l<u.length;l++){var c=u[l],d=c.eventRange,p=d.range,f=nn(p,a);f&&s.push(r(r({},c),{firstCol:n,lastCol:n,eventRange:{def:d.def,ui:r(r({},d.ui),{durationEditable:!1}),instance:d.instance,range:f},isStart:c.isStart&&f.start.valueOf()===p.start.valueOf(),isEnd:c.isEnd&&f.end.valueOf()===p.end.valueOf()}))}return s}(o,e[n].date,n)})),segIsHidden:d,segTops:p,segMarginTops:f,moreCnts:c,moreTops:h,paddingBottoms:v}}function ts(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];i.seg.firstCol===t&&n.push(i.seg)}return n}function ns(e,t,n,r,o){for(var i=e.length,a={},s=[],l=0;l<i;l++)s.push([]);for(l=0;l<i;l++)for(var u=0,c=0,d=n[l];c<d.length;c++){var p=d[c];o(p,u)?f(p):h(p,u,r),p.top!==p.bottom&&u++}function f(e){var t=e.seg,n=t.eventRange.instance.instanceId;if(!a[n]){a[n]=!0;for(var r=t.firstCol;r<=t.lastCol;r++)s[r].push(e)}}function h(n,r,o){var i=n.seg,a=i.eventRange.instance.instanceId;if(!t[a]){t[a]=!0;for(var l=i.firstCol;l<=i.lastCol;l++){var u=++e[l];if(o&&1===u)for(var c=r-1;s[l].length>c;)h(s[l].pop(),s[l].length,!1)}}}}var rs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellElRefs=new Li,t.frameElRefs=new Li,t.fgElRefs=new Li,t.segHarnessRefs=new Li,t.rootElRef=Ar(),t.state={framePositions:null,maxContentHeight:null,segHeights:{}},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.state,r=this.context,o=t.cells.length,i=Fa(t.businessHourSegs,o),a=Fa(t.bgEventSegs,o),s=Fa(this.getHighlightSegs(),o),l=Fa(this.getMirrorSegs(),o),u=es(t.cells,t.fgEventSegs,t.dayMaxEvents,t.dayMaxEventRows,n.segHeights,n.maxContentHeight,o,r.options.eventOrder),c=u.paddingBottoms,d=u.segsByFirstCol,p=u.segsByEachCol,f=u.segIsHidden,h=u.segTops,v=u.segMarginTops,g=u.moreCnts,m=u.moreTops,y=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Hr("tr",{ref:this.rootElRef},t.renderIntro&&t.renderIntro(),t.cells.map((function(n,r){var o=e.renderFgSegs(d[r],f,h,v,y,t.todayRange),u=e.renderFgSegs(l[r],{},h,{},{},t.todayRange,Boolean(t.eventDrag),Boolean(t.eventResize),!1);return Hr(Ga,{key:n.key,elRef:e.cellElRefs.createRef(n.key),innerElRef:e.frameElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,showDayNumber:t.showDayNumbers,showWeekNumber:t.showWeekNumbers&&0===r,forceDayTop:t.showWeekNumbers,todayRange:t.todayRange,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,moreCnt:g[r],buildMoreLinkText:t.buildMoreLinkText,onMoreClick:t.onMoreClick,segIsHidden:f,moreMarginTop:m[r],segsByEachCol:p[r],fgPaddingBottom:c[r],fgContentElRef:e.fgElRefs.createRef(n.key),fgContent:Hr(Ur,null,Hr(Ur,null,o),Hr(Ur,null,u)),bgContent:Hr(Ur,null,e.renderFillSegs(s[r],"highlight"),e.renderFillSegs(i[r],"non-business"),e.renderFillSegs(a[r],"bg-event"))})})))},t.prototype.componentDidMount=function(){this.updateSizing(!0)},t.prototype.componentDidUpdate=function(e,t){var n=this.props;this.updateSizing(!Le(e,n))},t.prototype.getHighlightSegs=function(){var e=this.props;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs},t.prototype.getMirrorSegs=function(){var e=this.props;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]},t.prototype.renderFgSegs=function(e,t,n,o,i,a,s,l,u){var c=this.context,d=this.props.eventSelection,p=this.state.framePositions,f=1===this.props.cells.length,h=[];if(p)for(var v=0,g=e;v<g.length;v++){var m=g[v],y=m.eventRange.instance.instanceId,E=s||l||u,S=i[y],D=t[y]||S,b=t[y]||E||m.firstCol!==m.lastCol||!m.isStart||!m.isEnd,C=void 0,w=void 0,R=void 0,T=void 0;b?(w=n[y],c.isRtl?(T=0,R=p.lefts[m.lastCol]-p.lefts[m.firstCol]):(R=0,T=p.rights[m.firstCol]-p.rights[m.lastCol])):C=o[y],h.push(Hr("div",{className:"fc-daygrid-event-harness"+(b?" fc-daygrid-event-harness-abs":""),key:y,ref:E?null:this.segHarnessRefs.createRef(y+":"+m.firstCol),style:{visibility:D?"hidden":"",marginTop:C||"",top:w||"",left:R||"",right:T||""}},Ka(m)?Hr(Ja,r({seg:m,isDragging:s,isSelected:y===d,defaultDisplayEventEnd:f},Sn(m,a))):Hr(Qa,r({seg:m,isDragging:s,isResizing:l,isDateSelecting:u,isSelected:y===d,defaultDisplayEventEnd:f},Sn(m,a)))))}return h},t.prototype.renderFillSegs=function(e,t){var n=this.context.isRtl,i=this.props.todayRange,a=this.state.framePositions,s=[];if(a)for(var l=0,u=e;l<u.length;l++){var c=u[l],d=n?{right:0,left:a.lefts[c.lastCol]-a.lefts[c.firstCol]}:{left:0,right:a.rights[c.firstCol]-a.rights[c.lastCol]};s.push(Hr("div",{key:bn(c.eventRange),className:"fc-daygrid-bg-harness",style:d},"bg-event"===t?Hr(la,r({seg:c},Sn(c,i))):sa(t)))}return Hr.apply(void 0,o([Ur,{}],s))},t.prototype.updateSizing=function(e){var t=this.props,n=this.frameElRefs;if(null!==t.clientWidth){if(e){var r=t.cells.map((function(e){return n.currentMap[e.key]}));if(r.length){var o=this.rootElRef.current;this.setState({framePositions:new Mr(o,r,!0,!1)})}}var i=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.setState({segHeights:this.computeSegHeights(),maxContentHeight:i?this.computeMaxContentHeight():null})}},t.prototype.computeSegHeights=function(){return Oe(this.segHarnessRefs.currentMap,(function(e){return e.getBoundingClientRect().height}))},t.prototype.computeMaxContentHeight=function(){var e=this.props.cells[0].key,t=this.cellElRefs.currentMap[e],n=this.fgElRefs.currentMap[e];return t.getBoundingClientRect().bottom-n.getBoundingClientRect().top},t.prototype.getCellEls=function(){var e=this.cellElRefs.currentMap;return this.props.cells.map((function(t){return e[t.key]}))},t}(oo);rs.addStateEquality({segHeights:Le});var os=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.repositioner=new Go(t.updateSize.bind(t)),t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&Yr(t.props.elRef,e)},t.handleDocumentMousedown=function(e){var n=t.props.onClose;n&&!t.rootEl.contains(e.target)&&n()},t.handleDocumentScroll=function(){t.repositioner.request(10)},t.handleCloseClick=function(){var e=t.props.onClose;e&&e()},t}return n(t,e),t.prototype.render=function(){var e=this.context.theme,t=this.props,n=["fc-popover",e.getClass("popover")].concat(t.extraClassNames||[]);return Hr("div",r({className:n.join(" ")},t.extraAttrs,{ref:this.handleRootEl}),Hr("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},Hr("span",{className:"fc-popover-title"},t.title),Hr("span",{className:"fc-popover-close "+e.getIconClass("close"),onClick:this.handleCloseClick})),Hr("div",{className:"fc-popover-body "+e.getClass("popoverContent")},t.children))},t.prototype.componentDidMount=function(){document.addEventListener("mousedown",this.handleDocumentMousedown),document.addEventListener("scroll",this.handleDocumentScroll),this.updateSize()},t.prototype.componentWillUnmount=function(){document.removeEventListener("mousedown",this.handleDocumentMousedown),document.removeEventListener("scroll",this.handleDocumentScroll)},t.prototype.updateSize=function(){var e=this.props,t=e.alignmentEl,n=e.topAlignmentEl,r=this.rootEl;if(r){var o,i=r.getBoundingClientRect(),a=t.getBoundingClientRect(),s=n?n.getBoundingClientRect().top:a.top;s=Math.min(s,window.innerHeight-i.height-10),s=Math.max(s,10),o=this.context.isRtl?a.right-i.width:a.left,o=Math.min(o,window.innerWidth-i.width-10),j(r,{top:s,left:o=Math.max(o,10)})}},t}(jr),is=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handlePopoverEl=function(e){t.popoverEl=e,e?t.context.registerInteractiveComponent(t,{el:e,useEventCenter:!1}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this.context,t=e.options,n=e.dateEnv,o=this.props,i=o.date,a=o.hiddenInstances,s=o.todayRange,l=o.dateProfile,u=o.selectedInstanceId,c=n.format(i,t.dayPopoverFormat);return Hr(oa,{date:i,dateProfile:l,todayRange:s,elRef:this.handlePopoverEl},(function(e,t,n){return Hr(os,{elRef:e,title:c,extraClassNames:["fc-more-popover"].concat(t),extraAttrs:n,onClose:o.onCloseClick,alignmentEl:o.alignmentEl,topAlignmentEl:o.topAlignmentEl},Hr(ia,{date:i,dateProfile:l,todayRange:s},(function(e,t){return t&&Hr("div",{className:"fc-more-popover-misc",ref:e},t)})),o.segs.map((function(e){var t=e.eventRange.instance.instanceId;return Hr("div",{className:"fc-daygrid-event-harness",key:t,style:{visibility:a[t]?"hidden":""}},Ka(e)?Hr(Ja,r({seg:e,isDragging:!1,isSelected:t===u,defaultDisplayEventEnd:!1},Sn(e,s))):Hr(Qa,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:t===u,defaultDisplayEventEnd:!1},Sn(e,s))))})))}))},t.prototype.queryHit=function(e,t,n,r){var o=this.props.date;if(e<n&&t<r)return{component:this,dateSpan:{allDay:!0,range:{start:o,end:ve(o,1)}},dayEl:this.popoverEl,rect:{left:0,top:0,right:n,bottom:r},layer:1}},t.prototype.isPopover=function(){return!0},t}(oo),as=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitBusinessHourSegs=it(za),t.splitBgEventSegs=it(za),t.splitFgEventSegs=it(za),t.splitDateSelectionSegs=it(za),t.splitEventDrag=it(Ba),t.splitEventResize=it(Ba),t.buildBuildMoreLinkText=it(ss),t.rowRefs=new Li,t.state={morePopoverState:null},t.handleRootEl=function(e){t.rootEl=e,Yr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.context,o=n.dateEnv,i=n.options.moreLinkClick;function a(e){var t=e.eventRange,r=t.def,i=t.instance,a=t.range;return{event:new zn(n,r,i),start:o.toDate(a.start),end:o.toDate(a.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof i&&(i=i({date:o.toDate(e.date),allDay:!0,allSegs:e.allSegs.map(a),hiddenSegs:e.hiddenSegs.map(a),jsEvent:e.ev,view:n.viewApi})),i&&"popover"!==i?"string"==typeof i&&n.calendarApi.zoomTo(e.date,i):t.setState({morePopoverState:r(r({},e),{currentFgEventSegs:t.props.fgEventSegs})})},t.handleMorePopoverClose=function(){t.setState({morePopoverState:null})},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.dateProfile,r=t.dayMaxEventRows,o=t.dayMaxEvents,i=t.expandRows,a=this.state.morePopoverState,s=t.cells.length,l=this.splitBusinessHourSegs(t.businessHourSegs,s),u=this.splitBgEventSegs(t.bgEventSegs,s),c=this.splitFgEventSegs(t.fgEventSegs,s),d=this.splitDateSelectionSegs(t.dateSelectionSegs,s),p=this.splitEventDrag(t.eventDrag,s),f=this.splitEventResize(t.eventResize,s),h=this.buildBuildMoreLinkText(this.context.options.moreLinkText),v=!0===o||!0===r;return v&&!i&&(v=!1,r=null,o=null),Hr("div",{className:["fc-daygrid-body",v?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",i?"":"fc-daygrid-body-natural"].join(" "),ref:this.handleRootEl,style:{width:t.clientWidth,minWidth:t.tableMinWidth}},Hr(Mi,{unit:"day"},(function(v,g){return Hr(Ur,null,Hr("table",{className:"fc-scrollgrid-sync-table",style:{width:t.clientWidth,minWidth:t.tableMinWidth,height:i?t.clientHeight:""}},t.colGroupNode,Hr("tbody",null,t.cells.map((function(i,a){return Hr(rs,{ref:e.rowRefs.createRef(a),key:i.length?i[0].date.toISOString():a,showDayNumbers:s>1,showWeekNumbers:t.showWeekNumbers,todayRange:g,dateProfile:n,cells:i,renderIntro:t.renderRowIntro,businessHourSegs:l[a],eventSelection:t.eventSelection,bgEventSegs:u[a].filter(ls),fgEventSegs:c[a],dateSelectionSegs:d[a],eventDrag:p[a],eventResize:f[a],dayMaxEvents:o,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,buildMoreLinkText:h,onMoreClick:e.handleMoreLinkClick})})))),!t.forPrint&&a&&a.currentFgEventSegs===t.fgEventSegs&&Hr(is,{date:a.date,dateProfile:n,segs:a.allSegs,alignmentEl:a.dayEl,topAlignmentEl:1===s?t.headerAlignElRef.current:null,onCloseClick:e.handleMorePopoverClose,selectedInstanceId:t.eventSelection,hiddenInstances:(t.eventDrag?t.eventDrag.affectedInstances:null)||(t.eventResize?t.eventResize.affectedInstances:null)||{},todayRange:g}))})))},t.prototype.prepareHits=function(){this.rowPositions=new Mr(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new Mr(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.positionToHit=function(e,t){var n=this.colPositions,r=this.rowPositions,o=n.leftToIndex(e),i=r.topToIndex(t);if(null!=i&&null!=o)return{row:i,col:o,dateSpan:{range:this.getCellRange(i,o),allDay:!0},dayEl:this.getCellEl(i,o),relativeRect:{left:n.lefts[o],right:n.rights[o],top:r.tops[i],bottom:r.bottoms[i]}}},t.prototype.getCellEl=function(e,t){return this.rowRefs.currentMap[e].getCellEls()[t]},t.prototype.getCellRange=function(e,t){var n=this.props.cells[e][t].date;return{start:n,end:ve(n,1)}},t}(oo);function ss(e){return"function"==typeof e?e:function(t){return"+"+t+" "+e}}function ls(e){return e.eventRange.def.allDay}var us=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new cs,t.tableRef=Ar(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Hr(as,r({ref:this.tableRef,elRef:this.handleRootEl},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,t,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))},t.prototype.prepareHits=function(){this.tableRef.current.prepareHits()},t.prototype.queryHit=function(e,t){var n=this.tableRef.current.positionToHit(e,t);if(n)return{component:this,dateSpan:n.dateSpan,dayEl:n.dayEl,rect:{left:n.relativeRect.left,right:n.relativeRect.right,top:n.relativeRect.top,bottom:n.relativeRect.bottom},layer:0}},t}(oo),cs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.forceDayIfListItem=!0,t}return n(t,e),t.prototype.sliceRange=function(e,t){return t.sliceRange(e)},t}(Hi),ds=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=it(ps),t.headerRef=Ar(),t.tableRef=Ar(),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,o=this.props,i=this.buildDayTableModel(o.dateProfile,r),a=n.dayHeaders&&Hr(_i,{ref:this.headerRef,dateProfile:o.dateProfile,dates:i.headerDates,datesRepDistinctDays:1===i.rowCnt}),s=function(t){return Hr(us,{ref:e.tableRef,dateProfile:o.dateProfile,dayTableModel:i,businessHours:o.businessHours,dateSelection:o.dateSelection,eventStore:o.eventStore,eventUiBases:o.eventUiBases,eventSelection:o.eventSelection,eventDrag:o.eventDrag,eventResize:o.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!o.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:o.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(a,s,i.colCnt,n.dayMinWidth):this.renderSimpleLayout(a,s)},t}(Va);function ps(e,t){var n=new Pi(e.renderRange,t);return new Ni(n,/year|month|week/.test(e.currentRangeUnit))}var fs=io({initialView:"dayGridMonth",optionRefiners:{moreLinkClick:_t,moreLinkClassNames:_t,moreLinkContent:_t,moreLinkDidMount:_t,moreLinkWillUnmount:_t},views:{dayGrid:{component:ds,dateProfileGeneratorClass:function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.buildRenderRange=function(t,n,r){var o,i=this.props.dateEnv,a=e.prototype.buildRenderRange.call(this,t,n,r),s=a.start,l=a.end;(/^(year|month)$/.test(n)&&(s=i.startOfWeek(s),(o=i.startOfWeek(l)).valueOf()!==l.valueOf()&&(l=he(o,1))),this.props.monthMode&&this.props.fixedWeekCount)&&(l=he(l,6-Math.ceil(me(s,l))));return{start:s,end:l}},t}(Co)},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),hs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.getKeyInfo=function(){return{allDay:{},timed:{}}},t.prototype.getKeysForDateSpan=function(e){return e.allDay?["allDay"]:["timed"]},t.prototype.getKeysForEventDef=function(e){return e.allDay?un(e)?["timed","allDay"]:["allDay"]:["timed"]},t}(pr),vs=function(){function e(e,t,n){this.positions=e,this.dateProfile=t,this.slatMetas=n}return e.prototype.safeComputeTop=function(e){var t=this.dateProfile;if(sn(t.currentRange,e)){var n=be(e),r=e.valueOf()-n.valueOf();if(r>=$e(t.slotMinTime)&&r<$e(t.slotMaxTime))return this.computeTimeTop(Ye(r))}},e.prototype.computeDateTop=function(e,t){return t||(t=be(e)),this.computeTimeTop(Ye(e.valueOf()-t.valueOf()))},e.prototype.computeTimeTop=function(e){var t,n,r=this.positions,o=this.dateProfile,i=this.slatMetas,a=r.els.length,s=i[1].date.valueOf()-i[0].date.valueOf(),l=(e.milliseconds-$e(o.slotMinTime))/s;return l=Math.max(0,l),l=Math.min(a,l),t=Math.floor(l),n=l-(t=Math.min(t,a-1)),r.tops[t]+r.getHeight(t)*n},e}(),gs=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}],ms=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Ar(),t.slatElRefs=new Li,t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Hr("div",{className:"fc-timegrid-slots",ref:this.rootElRef},Hr("table",{className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,Hr(ys,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))},t.prototype.componentDidMount=function(){this.updateSizing()},t.prototype.componentDidUpdate=function(){this.updateSizing()},t.prototype.componentWillUnmount=function(){this.props.onCoords&&this.props.onCoords(null)},t.prototype.updateSizing=function(){var e,t=this.props;t.onCoords&&null!==t.clientWidth&&(this.rootElRef.current.offsetHeight&&t.onCoords(new vs(new Mr(this.rootElRef.current,(e=this.slatElRefs.currentMap,t.slatMetas.map((function(t){return e[t.key]}))),!1,!0),this.props.dateProfile,t.slatMetas)))},t}(jr);var ys=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,o=e.slatElRefs;return Hr("tbody",null,e.slatMetas.map((function(i,a){var s={time:i.time,date:t.dateEnv.toDate(i.date),view:t.viewApi},l=["fc-timegrid-slot","fc-timegrid-slot-lane",i.isLabeled?"":"fc-timegrid-slot-minor"];return Hr("tr",{key:i.key,ref:o.createRef(i.key)},e.axis&&Hr(Ss,r({},i)),Hr(uo,{hookProps:s,classNames:n.slotLaneClassNames,content:n.slotLaneContent,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount},(function(e,t,n,r){return Hr("td",{ref:e,className:l.concat(t).join(" "),"data-time":i.isoTimeStr},r)})))})))},t}(jr),Es=St({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function Ss(e){var t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return Hr(zr.Consumer,null,(function(n){if(e.isLabeled){var r=n.dateEnv,o=n.options,i=n.viewApi,a=null==o.slotLabelFormat?Es:Array.isArray(o.slotLabelFormat)?St(o.slotLabelFormat[0]):St(o.slotLabelFormat),s={level:0,time:e.time,date:r.toDate(e.date),view:i,text:r.format(e.date,a)};return Hr(uo,{hookProps:s,classNames:o.slotLabelClassNames,content:o.slotLabelContent,defaultContent:Ds,didMount:o.slotLabelDidMount,willUnmount:o.slotLabelWillUnmount},(function(n,r,o,i){return Hr("td",{ref:n,className:t.concat(r).join(" "),"data-time":e.isoTimeStr},Hr("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},Hr("div",{className:"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion",ref:o},i)))}))}return Hr("td",{className:t.join(" "),"data-time":e.isoTimeStr})}))}function Ds(e){return e.text}function bs(e,t,n,r,o){for(var i=new Date(0),a=e,s=Ye(0),l=n||function(e){var t,n,r;for(t=gs.length-1;t>=0;t--)if(n=Ye(gs[t]),null!==(r=Qe(n,e))&&r>1)return n;return e}(r),u=[];$e(a)<$e(t);){var c=o.add(i,a),d=null!==Qe(s,l);u.push({date:c,time:a,key:c.toISOString(),isoTimeStr:nt(c),isLabeled:d}),a=Xe(a,r),s=Xe(s,r)}return u}var Cs=St({week:"short"}),ws=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allDaySplitter=new hs,t.headerElRef=Ar(),t.rootElRef=Ar(),t.scrollerElRef=Ar(),t.state={slatCoords:null},t.handleScrollTopRequest=function(e){var n=t.scrollerElRef.current;n&&(n.scrollTop=e)},t.renderHeadAxis=function(e){void 0===e&&(e="");var n=t.context.options,o=t.props.dateProfile.renderRange,i=ye(o.start,o.end),a=n.navLinks&&1===i?{"data-navlink":gr(o.start,"week"),tabIndex:0}:{};return n.weekNumbers?Hr(ca,{date:o.start,defaultFormat:Cs},(function(t,n,o,i){return Hr("th",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Hr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid",style:{height:e}},Hr("a",r({ref:o,className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner"},a),i)))})):Hr("th",{className:"fc-timegrid-axis"},Hr("div",{className:"fc-timegrid-axis-frame",style:{height:e}}))},t.renderTableRowAxis=function(e){var n=t.context,r=n.options,o=n.viewApi,i={text:r.allDayText,view:o};return Hr(uo,{hookProps:i,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:Rs,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(t,n,r,o){return Hr("td",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Hr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame"+(null==e?" fc-timegrid-axis-frame-liquid":""),style:{height:e}},Hr("span",{className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner",ref:r},o)))}))},t.handleSlatCoords=function(e){t.setState({slatCoords:e})},t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t,n){var r=this.context,o=this.props,i=[],a=Ki(r.options);return e&&i.push({type:"header",key:"header",isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(i.push({type:"body",key:"all-day",chunk:{content:t}}),i.push({type:"body",key:"all-day-divider",outerContent:Hr("tr",{className:"fc-scrollgrid-section"},Hr("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),i.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),Hr(yo,{viewSpec:r.viewSpec,elRef:this.rootElRef},(function(e,t){return Hr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Hr($i,{liquid:!o.isHeightAuto&&!o.forPrint,cols:[{width:"shrink"}],sections:i}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r,o,i,a){var s=this,l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");var u=this.context,c=this.props,d=!c.forPrint&&Ki(u.options),p=!c.forPrint&&Ji(u.options),f=[];e&&f.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Hr("tr",null,s.renderHeadAxis(e.rowSyncHeights[0]))}},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(f.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Hr("tr",null,s.renderTableRowAxis(e.rowSyncHeights[0]))}},{key:"cols",content:t}]}),f.push({key:"all-day-divider",type:"body",outerContent:Hr("tr",{className:"fc-scrollgrid-section"},Hr("td",{colSpan:2,className:"fc-timegrid-divider "+u.theme.getClass("tableCellShaded")}))}));var h=u.options.nowIndicator;return f.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(u.options.expandRows),chunks:[{key:"axis",content:function(e){return Hr("div",{className:"fc-timegrid-axis-chunk"},Hr("table",{style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,Hr("tbody",null,Hr(Ts,{slatMetas:i}))),Hr("div",{className:"fc-timegrid-now-indicator-container"},Hr(Mi,{unit:h?"minute":"day"},(function(e){var t=h&&a&&a.safeComputeTop(e);return"number"==typeof t?Hr(na,{isAxis:!0,date:e},(function(e,n,r,o){return Hr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(n).join(" "),style:{top:t}},o)})):null}))))}},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),p&&f.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Xi},{key:"cols",content:Xi}]}),Hr(yo,{viewSpec:u.viewSpec,elRef:this.rootElRef},(function(e,t){return Hr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Hr(l,{liquid:!c.isHeightAuto&&!c.forPrint,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:o}]}],sections:f}))}))},t.prototype.getAllDayMaxEventProps=function(){var e=this.context.options,t=e.dayMaxEvents,n=e.dayMaxEventRows;return!0!==t&&!0!==n||(t=void 0,n=5),{dayMaxEvents:t,dayMaxEventRows:n}},t}(oo);function Rs(e){return e.text}var Ts=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return this.props.slatMetas.map((function(e){return Hr("tr",{key:e.key},Hr(Ss,r({},e)))}))},t}(jr);function ks(e,t){var n,r=[];for(n=0;n<t;n++)r.push([]);if(e)for(n=0;n<e.length;n++)r[e[n].col].push(e[n]);return r}function Ms(e,t){var n=[];if(e){for(a=0;a<t;a++)n[a]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,o=e.segs;r<o.length;r++){var i=o[r];n[i.col].segs.push(i)}}else for(var a=0;a<t;a++)n[a]=null;return n}function xs(e,t,n,r,o){return _s(e,t,n,r),function(e,t){for(var n=0,r=e;n<r.length;n++){(c=r[n]).level=null,c.forwardCoord=null,c.backwardCoord=null,c.forwardPressure=null}var o,i=function(e){var t,n,r,o=[];for(t=0;t<e.length;t++){for(n=e[t],r=0;r<o.length&&Is(n,o[r]).length;r++);n.level=r,(o[r]||(o[r]=[])).push(n)}return o}(e=hn(e,t));if(function(e){var t,n,r,o,i;for(t=0;t<e.length;t++)for(n=e[t],r=0;r<n.length;r++)for((o=n[r]).forwardSegs=[],i=t+1;i<e.length;i++)Is(o,e[i],o.forwardSegs)}(i),o=i[0]){for(var a=0,s=o;a<s.length;a++){Ps(c=s[a])}for(var l=0,u=o;l<u.length;l++){var c;Ns(c=u[l],0,0,t)}}return e}(e,o)}function _s(e,t,n,r){for(var o=0,i=e;o<i.length;o++){var a=i[o];a.top=n.computeDateTop(a.start,t),a.bottom=Math.max(a.top+(r||0),n.computeDateTop(a.end,t))}}function Is(e,t,n){void 0===n&&(n=[]);for(var r=0;r<t.length;r++)o=e,i=t[r],o.bottom>i.top&&o.top<i.bottom&&n.push(t[r]);var o,i;return n}function Ps(e){var t,n,r=e.forwardSegs,o=0;if(null==e.forwardPressure){for(t=0;t<r.length;t++)Ps(n=r[t]),o=Math.max(o,1+n.forwardPressure);e.forwardPressure=o}}function Ns(e,t,n,r){var o,i=e.forwardSegs;if(null==e.forwardCoord)for(i.length?(!function(e,t){var n=e.map(Hs),r=[{field:"forwardPressure",order:-1},{field:"backwardCoord",order:1}].concat(t);n.sort((function(e,t){return ae(e,t,r)})),n.map((function(e){return e._seg}))}(i,r),Ns(i[0],t+1,n,r),e.forwardCoord=i[0].backwardCoord):e.forwardCoord=1,e.backwardCoord=e.forwardCoord-(e.forwardCoord-n)/(t+1),o=0;o<i.length;o++)Ns(i[o],0,e.forwardCoord,r)}function Hs(e){var t=vn(e);return t.forwardPressure=e.forwardPressure,t.backwardCoord=e.backwardCoord,t}var Os=St({hour:"numeric",minute:"2-digit",meridiem:!1}),As=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=["fc-timegrid-event","fc-v-event"];return this.props.isCondensed&&e.push("fc-timegrid-event-condensed"),Hr(ea,r({},this.props,{defaultTimeFormat:Os,extraClassNames:e}))},t}(jr);di.timeGridEventCondensedHeight=30;var Us=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context.options.selectMirror,o=t.eventDrag&&t.eventDrag.segs||t.eventResize&&t.eventResize.segs||n&&t.dateSelectionSegs||[],i=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Hr(oa,{elRef:t.elRef,date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps},(function(a,s,l){return Hr("td",r({ref:a,className:["fc-timegrid-col"].concat(s,t.extraClassNames||[]).join(" ")},l,t.extraDataAttrs),Hr("div",{className:"fc-timegrid-col-frame"},Hr("div",{className:"fc-timegrid-col-bg"},e.renderFillSegs(t.businessHourSegs,"non-business"),e.renderFillSegs(t.bgEventSegs,"bg-event"),e.renderFillSegs(t.dateSelectionSegs,"highlight")),Hr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(t.fgEventSegs,i)),Hr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(o,{},Boolean(t.eventDrag),Boolean(t.eventResize),Boolean(n))),Hr("div",{className:"fc-timegrid-now-indicator-container"},e.renderNowIndicator(t.nowIndicatorSegs)),Hr(Ls,{date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps})))}))},t.prototype.renderFgSegs=function(e,t,n,r,o){var i=this.props;return i.forPrint?this.renderPrintFgSegs(e):i.slatCoords?this.renderPositionedFgSegs(e,t,n,r,o):void 0},t.prototype.renderPrintFgSegs=function(e){var t=this.props;return(e=hn(e,this.context.options.eventOrder)).map((function(e){return Hr("div",{className:"fc-timegrid-event-harness",key:e.eventRange.instance.instanceId},Hr(As,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isCondensed:!1},Sn(e,t.todayRange,t.nowDate))))}))},t.prototype.renderPositionedFgSegs=function(e,t,n,o,i){var a=this,s=this.context,l=this.props;return(e=xs(e,l.date,l.slatCoords,s.options.eventMinHeight,s.options.eventOrder)).map((function(e){var s=e.eventRange.instance.instanceId,u=n||o||i?r({left:0,right:0},a.computeSegTopBottomCss(e)):a.computeFgSegPositionCss(e);return Hr("div",{className:"fc-timegrid-event-harness"+(e.level>0?" fc-timegrid-event-harness-inset":""),key:s,style:r({visibility:t[s]?"hidden":""},u)},Hr(As,r({seg:e,isDragging:n,isResizing:o,isDateSelecting:i,isSelected:s===l.eventSelection,isCondensed:e.bottom-e.top<di.timeGridEventCondensedHeight},Sn(e,l.todayRange,l.nowDate))))}))},t.prototype.renderFillSegs=function(e,t){var n=this,o=this.context,i=this.props;if(i.slatCoords){_s(e,i.date,i.slatCoords,o.options.eventMinHeight);var a=e.map((function(e){return Hr("div",{key:bn(e.eventRange),className:"fc-timegrid-bg-harness",style:n.computeSegTopBottomCss(e)},"bg-event"===t?Hr(la,r({seg:e},Sn(e,i.todayRange,i.nowDate))):sa(t))}));return Hr(Ur,null,a)}},t.prototype.renderNowIndicator=function(e){var t=this.props,n=t.slatCoords,r=t.date;if(n)return e.map((function(e,t){return Hr(na,{isAxis:!1,date:r,key:t},(function(t,o,i,a){return Hr("div",{ref:t,className:["fc-timegrid-now-indicator-line"].concat(o).join(" "),style:{top:n.computeDateTop(e.start,r)}},a)}))}))},t.prototype.computeFgSegPositionCss=function(e){var t,n,o=this.context,i=o.isRtl,a=o.options.slotEventOverlap,s=e.backwardCoord,l=e.forwardCoord;a&&(l=Math.min(1,s+2*(l-s))),i?(t=1-l,n=s):(t=s,n=1-l);var u={zIndex:e.level+1,left:100*t+"%",right:100*n+"%"};return a&&e.forwardPressure&&(u[i?"marginLeft":"marginRight"]=20),r(r({},u),this.computeSegTopBottomCss(e))},t.prototype.computeSegTopBottomCss=function(e){return{top:e.top,bottom:-e.bottom}},t}(jr),Ls=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props;return Hr(ia,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraHookProps:e.extraHookProps},(function(e,t){return t&&Hr("div",{className:"fc-timegrid-col-misc",ref:e},t)}))},t}(jr),Ws=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitFgEventSegs=it(ks),t.splitBgEventSegs=it(ks),t.splitBusinessHourSegs=it(ks),t.splitNowIndicatorSegs=it(ks),t.splitDateSelectionSegs=it(ks),t.splitEventDrag=it(Ms),t.splitEventResize=it(Ms),t.rootElRef=Ar(),t.cellElRefs=new Li,t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context.options.nowIndicator&&t.slatCoords&&t.slatCoords.safeComputeTop(t.nowDate),r=t.cells.length,o=this.splitFgEventSegs(t.fgEventSegs,r),i=this.splitBgEventSegs(t.bgEventSegs,r),a=this.splitBusinessHourSegs(t.businessHourSegs,r),s=this.splitNowIndicatorSegs(t.nowIndicatorSegs,r),l=this.splitDateSelectionSegs(t.dateSelectionSegs,r),u=this.splitEventDrag(t.eventDrag,r),c=this.splitEventResize(t.eventResize,r);return Hr("div",{className:"fc-timegrid-cols",ref:this.rootElRef},Hr("table",{style:{minWidth:t.tableMinWidth,width:t.clientWidth}},t.tableColGroupNode,Hr("tbody",null,Hr("tr",null,t.axis&&Hr("td",{className:"fc-timegrid-col fc-timegrid-axis"},Hr("div",{className:"fc-timegrid-col-frame"},Hr("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&Hr(na,{isAxis:!0,date:t.nowDate},(function(e,t,r,o){return Hr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(t).join(" "),style:{top:n}},o)}))))),t.cells.map((function(n,r){return Hr(Us,{key:n.key,elRef:e.cellElRefs.createRef(n.key),dateProfile:t.dateProfile,date:n.date,nowDate:t.nowDate,todayRange:t.todayRange,extraHookProps:n.extraHookProps,extraDataAttrs:n.extraDataAttrs,extraClassNames:n.extraClassNames,fgEventSegs:o[r],bgEventSegs:i[r],businessHourSegs:a[r],nowIndicatorSegs:s[r],dateSelectionSegs:l[r],eventDrag:u[r],eventResize:c[r],slatCoords:t.slatCoords,eventSelection:t.eventSelection,forPrint:t.forPrint})}))))))},t.prototype.componentDidMount=function(){this.updateCoords()},t.prototype.componentDidUpdate=function(){this.updateCoords()},t.prototype.updateCoords=function(){var e,t=this.props;t.onColCoords&&null!==t.clientWidth&&t.onColCoords(new Mr(this.rootElRef.current,(e=this.cellElRefs.currentMap,t.cells.map((function(t){return e[t.key]}))),!0,!1))},t}(jr);var Vs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processSlotOptions=it(zs),t.state={slatCoords:null},t.handleScrollRequest=function(e){var n=t.props.onScrollTopRequest,r=t.state.slatCoords;if(n&&r){if(e.time){var o=r.computeTimeTop(e.time);(o=Math.ceil(o))&&o++,n(o)}return!0}},t.handleColCoords=function(e){t.colCoords=e},t.handleSlatCoords=function(e){t.setState({slatCoords:e}),t.props.onSlatCoords&&t.props.onSlatCoords(e)},t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.state;return Hr("div",{className:"fc-timegrid-body",ref:e.rootElRef,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},Hr(ms,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),Hr(Ws,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:t.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))},t.prototype.componentDidMount=function(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)},t.prototype.componentDidUpdate=function(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)},t.prototype.componentWillUnmount=function(){this.scrollResponder.detach()},t.prototype.positionToHit=function(e,t){var n=this.context,r=n.dateEnv,o=n.options,i=this.colCoords,a=this.props.dateProfile,s=this.state.slatCoords,l=this.processSlotOptions(this.props.slotDuration,o.snapDuration),u=l.snapDuration,c=l.snapsPerSlot,d=i.leftToIndex(e),p=s.positions.topToIndex(t);if(null!=d&&null!=p){var f=s.positions.tops[p],h=s.positions.getHeight(p),v=(t-f)/h,g=p*c+Math.floor(v*c),m=this.props.cells[d].date,y=Xe(a.slotMinTime,Ke(u,g)),E=r.add(m,y);return{col:d,dateSpan:{range:{start:E,end:r.add(E,u)},allDay:!1},dayEl:i.els[d],relativeRect:{left:i.lefts[d],right:i.rights[d],top:f,bottom:f+h}}}},t}(jr);function zs(e,t){var n=t||e,r=Qe(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}var Fs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayRanges=it(Bs),t.slicer=new js,t.timeColsRef=Ar(),t.handleRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,o=t.dateProfile,i=t.dayTableModel,a=n.options.nowIndicator,s=this.buildDayRanges(i,o,n.dateEnv);return Hr(Mi,{unit:a?"minute":"day"},(function(l,u){return Hr(Vs,r({ref:e.timeColsRef,rootElRef:e.handleRootEl},e.slicer.sliceProps(t,o,null,n,s),{forPrint:t.forPrint,axis:t.axis,dateProfile:o,slatMetas:t.slatMetas,slotDuration:t.slotDuration,cells:i.cells[0],tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,expandRows:t.expandRows,nowDate:l,nowIndicatorSegs:a&&e.slicer.sliceNowDate(l,n,s),todayRange:u,onScrollTopRequest:t.onScrollTopRequest,onSlatCoords:t.onSlatCoords}))}))},t.prototype.queryHit=function(e,t){var n=this.timeColsRef.current.positionToHit(e,t);if(n)return{component:this,dateSpan:n.dateSpan,dayEl:n.dayEl,rect:{left:n.relativeRect.left,right:n.relativeRect.right,top:n.relativeRect.top,bottom:n.relativeRect.bottom},layer:0}},t}(oo);function Bs(e,t,n){for(var r=[],o=0,i=e.headerDates;o<i.length;o++){var a=i[o];r.push({start:n.add(a,t.slotMinTime),end:n.add(a,t.slotMaxTime)})}return r}var js=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.sliceRange=function(e,t){for(var n=[],r=0;r<t.length;r++){var o=nn(e,t[r]);o&&n.push({start:o.start,end:o.end,isStart:o.start.valueOf()===e.start.valueOf(),isEnd:o.end.valueOf()===e.end.valueOf(),col:r})}return n},t}(Hi),Gs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildTimeColsModel=it(qs),t.buildSlatMetas=it(bs),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,o=t.dateEnv,i=t.dateProfileGenerator,a=this.props,s=a.dateProfile,l=this.buildTimeColsModel(s,i),u=this.allDaySplitter.splitProps(a),c=this.buildSlatMetas(s.slotMinTime,s.slotMaxTime,n.slotLabelInterval,n.slotDuration,o),d=n.dayMinWidth,p=!d,f=d,h=n.dayHeaders&&Hr(_i,{dates:l.headerDates,dateProfile:s,datesRepDistinctDays:!0,renderIntro:p?this.renderHeadAxis:null}),v=!1!==n.allDaySlot&&function(t){return Hr(us,r({},u.allDay,{dateProfile:s,dayTableModel:l,nextDayThreshold:n.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,renderRowIntro:p?e.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:a.forPrint},e.getAllDayMaxEventProps()))},g=function(t){return Hr(Fs,r({},u.timed,{dayTableModel:l,dateProfile:s,axis:p,slotDuration:n.slotDuration,slatMetas:c,forPrint:a.forPrint,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,onSlatCoords:e.handleSlatCoords,expandRows:t.expandRows,onScrollTopRequest:e.handleScrollTopRequest}))};return f?this.renderHScrollLayout(h,v,g,l.colCnt,d,c,this.state.slatCoords):this.renderSimpleLayout(h,v,g)},t}(ws);function qs(e,t){var n=new Pi(e.renderRange,t);return new Ni(n,!1)}var Ys=io({initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:Gs,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}}),Zs=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=e.dayDate,n=e.todayRange,o=this.context,i=o.theme,a=o.dateEnv,s=o.options,l=o.viewApi,u=hr(t,n),c=s.listDayFormat?a.format(t,s.listDayFormat):"",d=s.listDaySideFormat?a.format(t,s.listDaySideFormat):"",p=s.navLinks?gr(t):null,f=r({date:a.toDate(t),view:l,text:c,sideText:d,navLinkData:p},u),h=["fc-list-day"].concat(vr(u,i));return Hr(uo,{hookProps:f,classNames:s.dayHeaderClassNames,content:s.dayHeaderContent,defaultContent:Xs,didMount:s.dayHeaderDidMount,willUnmount:s.dayHeaderWillUnmount},(function(e,n,r,o){return Hr("tr",{ref:e,className:h.concat(n).join(" "),"data-date":tt(t)},Hr("th",{colSpan:3},Hr("div",{className:"fc-list-day-cushion "+i.getClass("tableCellShaded"),ref:r},o)))}))},t}(jr);function Xs(e){var t=e.navLinkData?{"data-navlink":e.navLinkData,tabIndex:0}:{};return Hr(Ur,null,e.text&&Hr("a",r({className:"fc-list-day-text"},t),e.text),e.sideText&&Hr("a",r({className:"fc-list-day-side-text"},t),e.sideText))}var Ks=St({hour:"numeric",minute:"2-digit",meridiem:"short"}),Js=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=e.seg,r=t.options.eventTimeFormat||Ks;return Hr(Qi,{seg:n,timeText:"",disableDragging:!0,disableResizing:!0,defaultContent:$s,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,isSelected:e.isSelected,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting},(function(e,o,i,a,s){return Hr("tr",{className:["fc-list-event",s.event.url?"fc-event-forced-url":""].concat(o).join(" "),ref:e},function(e,t,n){var r=n.options;if(!1!==r.displayEventTime){var o=e.eventRange.def,i=e.eventRange.instance,a=!1,s=void 0;if(o.allDay?a=!0:$t(e.eventRange.range)?e.isStart?s=En(e,t,n,null,null,i.range.start,e.end):e.isEnd?s=En(e,t,n,null,null,e.start,i.range.end):a=!0:s=En(e,t,n),a){var l={text:n.options.allDayText,view:n.viewApi};return Hr(uo,{hookProps:l,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:Qs,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(e,t,n,r){return Hr("td",{className:["fc-list-event-time"].concat(t).join(" "),ref:e},r)}))}return Hr("td",{className:"fc-list-event-time"},s)}return null}(n,r,t),Hr("td",{className:"fc-list-event-graphic"},Hr("span",{className:"fc-list-event-dot",style:{borderColor:s.borderColor||s.backgroundColor}})),Hr("td",{className:"fc-list-event-title",ref:i},a))}))},t}(jr);function $s(e){var t=e.event,n=t.url;return Hr("a",r({},n?{href:n}:{}),t.title)}function Qs(e){return e.text}var el=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.computeDateVars=it(nl),t.eventStoreToSegs=it(t._eventStoreToSegs),t.setRootEl=function(e){e?t.context.registerInteractiveComponent(t,{el:e}):t.context.unregisterInteractiveComponent(t)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=this.context,r=["fc-list",n.theme.getClass("table"),!1!==n.options.stickyHeaderDates?"fc-list-sticky":""],o=this.computeDateVars(t.dateProfile),i=o.dayDates,a=o.dayRanges,s=this.eventStoreToSegs(t.eventStore,t.eventUiBases,a);return Hr(yo,{viewSpec:n.viewSpec,elRef:this.setRootEl},(function(n,o){return Hr("div",{ref:n,className:r.concat(o).join(" ")},Hr(Ui,{liquid:!t.isHeightAuto,overflowX:t.isHeightAuto?"visible":"hidden",overflowY:t.isHeightAuto?"visible":"auto"},s.length>0?e.renderSegList(s,i):e.renderEmptyMessage()))}))},t.prototype.renderEmptyMessage=function(){var e=this.context,t=e.options,n=e.viewApi,r={text:t.noEventsText,view:n};return Hr(uo,{hookProps:r,classNames:t.noEventsClassNames,content:t.noEventsContent,defaultContent:tl,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},(function(e,t,n,r){return Hr("div",{className:["fc-list-empty"].concat(t).join(" "),ref:e},Hr("div",{className:"fc-list-empty-cushion",ref:n},r))}))},t.prototype.renderSegList=function(e,t){var n=this.context,o=n.theme,i=n.options,a=function(e){var t,n,r=[];for(t=0;t<e.length;t++)n=e[t],(r[n.dayIndex]||(r[n.dayIndex]=[])).push(n);return r}(e);return Hr(Mi,{unit:"day"},(function(e,n){for(var s=[],l=0;l<a.length;l++){var u=a[l];if(u){var c=t[l].toISOString();s.push(Hr(Zs,{key:c,dayDate:t[l],todayRange:n}));for(var d=0,p=u=hn(u,i.eventOrder);d<p.length;d++){var f=p[d];s.push(Hr(Js,r({key:c+":"+f.eventRange.instance.instanceId,seg:f,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1},Sn(f,n,e))))}}}return Hr("table",{className:"fc-list-table "+o.getClass("table")},Hr("tbody",null,s))}))},t.prototype._eventStoreToSegs=function(e,t,n){return this.eventRangesToSegs(ln(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)},t.prototype.eventRangesToSegs=function(e,t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];n.push.apply(n,this.eventRangeToSegs(i,t))}return n},t.prototype.eventRangeToSegs=function(e,t){var n,r,o,i=this.context.dateEnv,a=this.context.options.nextDayThreshold,s=e.range,l=e.def.allDay,u=[];for(n=0;n<t.length;n++)if((r=nn(s,t[n]))&&(o={component:this,eventRange:e,start:r.start,end:r.end,isStart:e.isStart&&r.start.valueOf()===s.start.valueOf(),isEnd:e.isEnd&&r.end.valueOf()===s.end.valueOf(),dayIndex:n},u.push(o),!o.isEnd&&!l&&n+1<t.length&&s.end<i.add(t[n+1].start,a))){o.end=s.end,o.isEnd=!0;break}return u},t}(oo);function tl(e){return e.text}function nl(e){for(var t=be(e.renderRange.start),n=e.renderRange.end,r=[],o=[];t<n;)r.push(t),o.push({start:t,end:ve(t,1)}),t=ve(t,1);return{dayDates:r,dayRanges:o}}function rl(e){return!1===e?null:St(e)}var ol=io({optionRefiners:{listDayFormat:rl,listDaySideFormat:rl,noEventsClassNames:_t,noEventsContent:_t,noEventsDidMount:_t,noEventsWillUnmount:_t},views:{list:{component:el,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}}),il=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Pr);il.prototype.classes={root:"fc-theme-bootstrap",table:"table-bordered",tableCellShaded:"table-active",buttonGroup:"btn-group",button:"btn btn-primary",buttonActive:"active",popover:"popover",popoverHeader:"popover-header",popoverContent:"popover-body"},il.prototype.baseIconClass="fa",il.prototype.iconClasses={close:"fa-times",prev:"fa-chevron-left",next:"fa-chevron-right",prevYear:"fa-angle-double-left",nextYear:"fa-angle-double-right"},il.prototype.rtlIconClasses={prev:"fa-chevron-right",next:"fa-chevron-left",prevYear:"fa-angle-double-right",nextYear:"fa-angle-double-left"},il.prototype.iconOverrideOption="bootstrapFontAwesome",il.prototype.iconOverrideCustomButtonOption="bootstrapFontAwesome",il.prototype.iconOverridePrefix="fa-";var al=io({themeClasses:{bootstrap:il}});var sl=io({eventSourceDefs:[{parseMeta:function(e){var t=e.googleCalendarId;return!t&&e.url&&(t=function(e){var t;if(/^[^/]+@([^/.]+\.)*(google|googlemail|gmail)\.com$/.test(e))return e;if((t=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^/]*)/.exec(e))||(t=/^https?:\/\/www.google.com\/calendar\/feeds\/([^/]*)/.exec(e)))return decodeURIComponent(t[1])}(e.url)),t?{googleCalendarId:t,googleCalendarApiKey:e.googleCalendarApiKey,googleCalendarApiBase:e.googleCalendarApiBase,extraParams:e.extraParams}:null},fetch:function(e,t,n){var o=e.context,i=o.dateEnv,a=o.options,s=e.eventSource.meta,l=s.googleCalendarApiKey||a.googleCalendarApiKey;if(l){var u=function(e){var t=e.googleCalendarApiBase;t||(t="https://www.googleapis.com/calendar/v3/calendars");return t+"/"+encodeURIComponent(e.googleCalendarId)+"/events"}(s),c=s.extraParams,d="function"==typeof c?c():c,p=function(e,t,n,o){var i,a,s;o.canComputeOffset?(a=o.formatIso(e.start),s=o.formatIso(e.end)):(a=ve(e.start,-1).toISOString(),s=ve(e.end,1).toISOString());i=r(r({},n||{}),{key:t,timeMin:a,timeMax:s,singleEvents:!0,maxResults:9999}),"local"!==o.timeZone&&(i.timeZone=o.timeZone);return i}(e.range,l,d,i);Wo("GET",u,p,(function(e,r){var o,i;e.error?n({message:"Google Calendar API: "+e.error.message,errors:e.error.errors,xhr:r}):t({rawEvents:(o=e.items,i=p.timeZone,o.map((function(e){return function(e,t){var n=e.htmlLink||null;n&&t&&(n=function(e,t){return e.replace(/(\?.*?)?(#|$)/,(function(e,n,r){return(n?n+"&":"?")+t+r}))}(n,"ctz="+t));return{id:e.id,title:e.summary,start:e.start.dateTime||e.start.date,end:e.end.dateTime||e.end.date,url:n,location:e.location,description:e.description}}(e,i)}))),xhr:r})}),(function(e,t){n({message:e,xhr:t})}))}else n({message:"Specify a googleCalendarApiKey. See http://fullcalendar.io/docs/google_calendar/"})}}],optionRefiners:{googleCalendarApiKey:String},eventSourceRefiners:{googleCalendarApiKey:String,googleCalendarId:String,googleCalendarApiBase:String,extraParams:_t}});return Fo.push(Wa,fs,Ys,ol,al,sl),e.BASE_OPTION_DEFAULTS=bt,e.BASE_OPTION_REFINERS=Dt,e.BaseComponent=jr,e.BgEvent=la,e.BootstrapTheme=il,e.Calendar=pa,e.CalendarApi=Vn,e.CalendarContent=Ei,e.CalendarDataManager=Zo,e.CalendarDataProvider=oi,e.CalendarRoot=bi,e.Component=Nr,e.ContentHook=po,e.CustomContentRenderContext=co,e.DateComponent=oo,e.DateEnv=Xn,e.DateProfileGenerator=Co,e.DayCellContent=ia,e.DayCellRoot=oa,e.DayGridView=ds,e.DayHeader=_i,e.DaySeriesModel=Pi,e.DayTable=us,e.DayTableModel=Ni,e.DayTableSlicer=cs,e.DayTimeCols=Fs,e.DayTimeColsSlicer=js,e.DayTimeColsView=Gs,e.DelayedRunner=Go,e.Draggable=Aa,e.ElementDragging=ci,e.ElementScrollController=_r,e.Emitter=kr,e.EventApi=zn,e.EventRoot=Qi,e.EventSourceApi=L,e.FeaturefulElementDragging=wa,e.Fragment=Ur,e.Interaction=ai,e.ListView=el,e.MountHook=ho,e.NamedTimeZoneImpl=ii,e.NowIndicatorRoot=na,e.NowTimer=Mi,e.PointerDragging=ga,e.PositionCache=Mr,e.RefMap=Li,e.RenderHook=uo,e.ScrollController=xr,e.ScrollResponder=Vr,e.Scroller=Ui,e.SimpleScrollGrid=$i,e.Slicer=Hi,e.Splitter=pr,e.StandardEvent=ea,e.Table=as,e.TableDateCell=Ri,e.TableDowCell=Ti,e.TableView=Va,e.Theme=Pr,e.ThirdPartyDraggable=La,e.TimeCols=Vs,e.TimeColsSlatsCoords=vs,e.TimeColsView=ws,e.ViewApi=On,e.ViewContextType=zr,e.ViewRoot=yo,e.WeekNumberRoot=ca,e.WindowScrollController=Ir,e.addDays=ve,e.addDurations=Xe,e.addMs=ge,e.addWeeks=he,e.allowContextMenu=oe,e.allowSelection=ne,e.applyMutationToEventStore=Pn,e.applyStyle=j,e.applyStyleProp=G,e.asCleanDays=function(e){return e.years||e.months||e.milliseconds?0:e.days},e.asRoughMinutes=function(e){return $e(e)/6e4},e.asRoughMs=$e,e.asRoughSeconds=function(e){return $e(e)/1e3},e.buildClassNameNormalizer=vo,e.buildDayRanges=Bs,e.buildDayTableModel=ps,e.buildEventApis=Bn,e.buildEventRangeKey=bn,e.buildHashFromArray=function(e,t){for(var n={},r=0;r<e.length;r++){var o=t(e[r],r);n[o[0]]=o[1]}return n},e.buildNavLinkData=gr,e.buildSegCompareObj=vn,e.buildSegTimeText=En,e.buildSlatMetas=bs,e.buildTimeColsModel=qs,e.collectFromHash=Fe,e.combineEventUis=Vt,e.compareByFieldSpec=se,e.compareByFieldSpecs=ae,e.compareNumbers=ce,e.compareObjs=Ve,e.computeEdges=br,e.computeFallbackHeaderFormat=Ci,e.computeHeightAndMargins=function(e){return e.getBoundingClientRect().height+function(e){var t=window.getComputedStyle(e);return parseInt(t.marginTop,10)+parseInt(t.marginBottom,10)}(e)},e.computeInnerRect=Cr,e.computeRect=wr,e.computeSegDraggable=gn,e.computeSegEndResizable=yn,e.computeSegStartResizable=mn,e.computeShrinkWidth=Wi,e.computeSmallestCellWidth=pe,e.computeVisibleDayRange=Jt,e.config=di,e.constrainPoint=sr,e.createContext=Lr,e.createDuration=Ye,e.createElement=Hr,e.createEmptyEventStore=Ht,e.createEventInstance=Ie,e.createEventUi=Wt,e.createFormatter=St,e.createPlugin=io,e.createRef=Ar,e.diffDates=Qt,e.diffDayAndTime=Ee,e.diffDays=ye,e.diffPoints=ur,e.diffWeeks=me,e.diffWholeDays=De,e.diffWholeWeeks=Se,e.disableCursor=Q,e.elementClosest=V,e.elementMatches=z,e.enableCursor=ee,e.eventTupleToStore=Pt,e.filterEventStoreDefs=At,e.filterHash=He,e.findDirectChildren=function(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],o=0;o<n.length;o++)for(var i=n[o].children,a=0;a<i.length;a++){var s=i[a];t&&!z(s,t)||r.push(s)}return r},e.findElements=F,e.flexibleCompare=le,e.flushToDom=Wr,e.formatDate=function(e,t){void 0===t&&(t={});var n=tr(t),r=St(t),o=n.createMarkerMeta(e);return o?n.format(o.marker,r,{forcedTzo:o.forcedTzo}):""},e.formatDayString=tt,e.formatIsoTimeString=nt,e.formatRange=function(e,t,n){var r=tr("object"==typeof n&&n?n:{}),o=St(n),i=r.createMarkerMeta(e),a=r.createMarkerMeta(t);return i&&a?r.formatRange(i.marker,a.marker,o,{forcedStartTzo:i.forcedTzo,forcedEndTzo:a.forcedTzo,isEndExclusive:n.isEndExclusive,defaultSeparator:bt.defaultRangeSeparator}):""},e.getAllowYScrolling=zi,e.getCanVGrowWithinCell=cr,e.getClippingParents=Rr,e.getDateMeta=hr,e.getDayClassNames=vr,e.getDefaultEventEnd=In,e.getElSeg=dn,e.getEventClassNames=Dn,e.getIsRtlScrollbarOnLeft=Er,e.getRectCenter=lr,e.getRelevantEvents=Nt,e.getScrollGridClassNames=Yi,e.getScrollbarWidths=Sr,e.getSectionClassNames=Zi,e.getSectionHasLiquidHeight=Vi,e.getSegMeta=Sn,e.getSlotClassNames=function(e,t){var n=["fc-slot","fc-slot-"+fe[e.dow]];return e.isDisabled?n.push("fc-slot-disabled"):(e.isToday&&(n.push("fc-slot-today"),n.push(t.getClass("today"))),e.isPast&&n.push("fc-slot-past"),e.isFuture&&n.push("fc-slot-future")),n},e.getStickyFooterScrollbar=Ji,e.getStickyHeaderDates=Ki,e.getUnequalProps=We,e.globalLocales=Kn,e.globalPlugins=Fo,e.greatestDurationDenominator=et,e.guid=$,e.hasBgRendering=un,e.hasShrinkWidth=qi,e.identity=_t,e.interactionSettingsStore=ui,e.interactionSettingsToStore=li,e.intersectRanges=nn,e.intersectRects=ar,e.isArraysEqual=ot,e.isColPropsEqual=Bi,e.isDateSpansEqual=Rn,e.isInt=de,e.isInteractionValid=Jr,e.isMultiDayRange=$t,e.isPropsEqual=Le,e.isPropsValid=Qr,e.isValidDate=xe,e.listenBySelector=Z,e.mapHash=Oe,e.memoize=it,e.memoizeArraylike=function(e,t,n){var r=[],o=[];return function(i){for(var a=r.length,s=i.length,l=0;l<a;l++)if(i[l]){if(!ot(r[l],i[l])){n&&n(o[l]);var u=e.apply(this,i[l]);t&&t(u,o[l])||(o[l]=u)}}else n&&n(o[l]);for(;l<s;l++)o[l]=e.apply(this,i[l]);return r=i,o.splice(s),o}},e.memoizeHashlike=function(e,t,n){var r={},o={};return function(i){var a={};for(var s in i)if(o[s])if(ot(r[s],i[s]))a[s]=o[s];else{n&&n(o[s]);var l=e.apply(this,i[s]);a[s]=t&&t(l,o[s])?o[s]:l}else a[s]=e.apply(this,i[s]);return r=i,o=a,a}},e.memoizeObjArg=at,e.mergeEventStores=Ot,e.multiplyDuration=Ke,e.padStart=ue,e.parseBusinessHours=or,e.parseClassNames=Ut,e.parseDragMeta=fi,e.parseEventDef=Xt,e.parseFieldSpecs=ie,e.parseMarker=Zn,e.pointInsideRect=ir,e.preventContextMenu=re,e.preventDefault=q,e.preventSelection=te,e.rangeContainsMarker=sn,e.rangeContainsRange=an,e.rangesEqual=rn,e.rangesIntersect=on,e.refineEventDef=Yt,e.refineProps=xt,e.removeElement=W,e.removeExact=function(e,t){for(var n=0,r=0;r<e.length;)e[r]===t?(e.splice(r,1),n++):r++;return n},e.render=Or,e.renderChunkContent=Fi,e.renderFill=sa,e.renderMicroColGroup=ji,e.renderScrollShim=Xi,e.requestJson=Wo,e.sanitizeShrinkWidth=Gi,e.setElSeg=cn,e.setRef=Yr,e.sliceEventStore=ln,e.sliceEvents=function(e,t){return ln(e.eventStore,e.eventUiBases,e.dateProfile.activeRange,t?e.nextDayThreshold:null).fg},e.sortEventSegs=hn,e.startOfDay=be,e.translateRect=function(e,t,n){return{left:e.left+t,right:e.right+t,top:e.top+n,bottom:e.bottom+n}},e.triggerDateSelect=xn,e.unpromisify=Tr,e.version="5.3.1",e.whenTransitionDone=K,e.wholeDivideDurations=Qe,e}({});!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):(t=t||self).jsSHA=r()}(this,(function(){"use strict";var t=function(r,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])})(r,n)};var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n(t,r,n,i){var e,o,u,s=r||[0],f=(n=n||0)>>>3,h=-1===i?3:0;for(e=0;e<t.length;e+=1)o=(u=e+f)>>>2,s.length<=o&&s.push(0),s[o]|=t[e]<<8*(h+i*(u%4));return{value:s,binLen:8*t.length+n}}function i(t,i,e){switch(i){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(t){case"HEX":return function(t,r,n){return function(t,r,n,i){var e,o,u,s;if(0!=t.length%2)throw new Error("String of HEX type must be in byte increments");var f=r||[0],h=(n=n||0)>>>3,a=-1===i?3:0;for(e=0;e<t.length;e+=2){if(o=parseInt(t.substr(e,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(u=(s=(e>>>1)+h)>>>2;f.length<=u;)f.push(0);f[u]|=o<<8*(a+i*(s%4))}return{value:f,binLen:4*t.length+n}}(t,r,n,e)};case"TEXT":return function(t,r,n){return function(t,r,n,i,e){var o,u,s,f,h,a,c,w,v=0,E=n||[0],A=(i=i||0)>>>3;if("UTF8"===r)for(c=-1===e?3:0,s=0;s<t.length;s+=1)for(u=[],128>(o=t.charCodeAt(s))?u.push(o):2048>o?(u.push(192|o>>>6),u.push(128|63&o)):55296>o||57344<=o?u.push(224|o>>>12,128|o>>>6&63,128|63&o):(s+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(s)),u.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),f=0;f<u.length;f+=1){for(h=(a=v+A)>>>2;E.length<=h;)E.push(0);E[h]|=u[f]<<8*(c+e*(a%4)),v+=1}else for(c=-1===e?2:0,w="UTF16LE"===r&&1!==e||"UTF16LE"!==r&&1===e,s=0;s<t.length;s+=1){for(o=t.charCodeAt(s),!0===w&&(o=(f=255&o)<<8|o>>>8),h=(a=v+A)>>>2;E.length<=h;)E.push(0);E[h]|=o<<8*(c+e*(a%4)),v+=2}return{value:E,binLen:8*v+i}}(t,i,r,n,e)};case"B64":return function(t,n,i){return function(t,n,i,e){var o,u,s,f,h,a,c=0,w=n||[0],v=(i=i||0)>>>3,E=-1===e?3:0,A=t.indexOf("=");if(-1===t.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(t=t.replace(/=/g,""),-1!==A&&A<t.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<t.length;o+=4){for(f=t.substr(o,4),s=0,u=0;u<f.length;u+=1)s|=r.indexOf(f.charAt(u))<<18-6*u;for(u=0;u<f.length-1;u+=1){for(h=(a=c+v)>>>2;w.length<=h;)w.push(0);w[h]|=(s>>>16-8*u&255)<<8*(E+e*(a%4)),c+=1}}return{value:w,binLen:8*c+i}}(t,n,i,e)};case"BYTES":return function(t,r,n){return function(t,r,n,i){var e,o,u,s,f=r||[0],h=(n=n||0)>>>3,a=-1===i?3:0;for(o=0;o<t.length;o+=1)e=t.charCodeAt(o),u=(s=o+h)>>>2,f.length<=u&&f.push(0),f[u]|=e<<8*(a+i*(s%4));return{value:f,binLen:8*t.length+n}}(t,r,n,e)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(t){throw new Error("ARRAYBUFFER not supported by this environment")}return function(t,r,i){return function(t,r,i,e){return n(new Uint8Array(t),r,i,e)}(t,r,i,e)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(t){throw new Error("UINT8ARRAY not supported by this environment")}return function(t,r,i){return n(t,r,i,e)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function e(t,n,i,e){switch(t){case"HEX":return function(t){return function(t,r,n,i){var e,o,u="",s=r/8,f=-1===n?3:0;for(e=0;e<s;e+=1)o=t[e>>>2]>>>8*(f+n*(e%4)),u+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return i.outputUpper?u.toUpperCase():u}(t,n,i,e)};case"B64":return function(t){return function(t,n,i,e){var o,u,s,f,h,a="",c=n/8,w=-1===i?3:0;for(o=0;o<c;o+=3)for(f=o+1<c?t[o+1>>>2]:0,h=o+2<c?t[o+2>>>2]:0,s=(t[o>>>2]>>>8*(w+i*(o%4))&255)<<16|(f>>>8*(w+i*((o+1)%4))&255)<<8|h>>>8*(w+i*((o+2)%4))&255,u=0;u<4;u+=1)a+=8*o+6*u<=n?r.charAt(s>>>6*(3-u)&63):e.b64Pad;return a}(t,n,i,e)};case"BYTES":return function(t){return function(t,r,n){var i,e,o="",u=r/8,s=-1===n?3:0;for(i=0;i<u;i+=1)e=t[i>>>2]>>>8*(s+n*(i%4))&255,o+=String.fromCharCode(e);return o}(t,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(t){throw new Error("ARRAYBUFFER not supported by this environment")}return function(t){return function(t,r,n){var i,e=r/8,o=new ArrayBuffer(e),u=new Uint8Array(o),s=-1===n?3:0;for(i=0;i<e;i+=1)u[i]=t[i>>>2]>>>8*(s+n*(i%4))&255;return o}(t,n,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(t){throw new Error("UINT8ARRAY not supported by this environment")}return function(t){return function(t,r,n){var i,e=r/8,o=-1===n?3:0,u=new Uint8Array(e);for(i=0;i<e;i+=1)u[i]=t[i>>>2]>>>8*(o+n*(i%4))&255;return u}(t,n,i)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}var o=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],u=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],s=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function f(t){var r={outputUpper:!1,b64Pad:"=",outputLen:-1},n=t||{},i="Output length must be a multiple of 8";if(r.outputUpper=n.outputUpper||!1,n.b64Pad&&(r.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(i);r.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(i);r.outputLen=n.shakeLen}if("boolean"!=typeof r.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof r.b64Pad)throw new Error("Invalid b64Pad formatting option");return r}function h(t,r){return t>>>r|t<<32-r}function a(t,r){return t>>>r}function c(t,r,n){return t&r^~t&n}function w(t,r,n){return t&r^t&n^r&n}function v(t){return h(t,2)^h(t,13)^h(t,22)}function E(t,r){var n=(65535&t)+(65535&r);return(65535&(t>>>16)+(r>>>16)+(n>>>16))<<16|65535&n}function A(t,r,n,i){var e=(65535&t)+(65535&r)+(65535&n)+(65535&i);return(65535&(t>>>16)+(r>>>16)+(n>>>16)+(i>>>16)+(e>>>16))<<16|65535&e}function p(t,r,n,i,e){var o=(65535&t)+(65535&r)+(65535&n)+(65535&i)+(65535&e);return(65535&(t>>>16)+(r>>>16)+(n>>>16)+(i>>>16)+(e>>>16)+(o>>>16))<<16|65535&o}function d(t){return h(t,7)^h(t,18)^a(t,3)}function l(t){return h(t,6)^h(t,11)^h(t,25)}function R(t){return"SHA-224"==t?u.slice():s.slice()}function U(t,r){var n,i,e,u,s,f,R,U,y,b,T,m,F=[];for(n=r[0],i=r[1],e=r[2],u=r[3],s=r[4],f=r[5],R=r[6],U=r[7],T=0;T<64;T+=1)F[T]=T<16?t[T]:A(h(m=F[T-2],17)^h(m,19)^a(m,10),F[T-7],d(F[T-15]),F[T-16]),y=p(U,l(s),c(s,f,R),o[T],F[T]),b=E(v(n),w(n,i,e)),U=R,R=f,f=s,s=E(u,y),u=e,e=i,i=n,n=E(y,b);return r[0]=E(n,r[0]),r[1]=E(i,r[1]),r[2]=E(e,r[2]),r[3]=E(u,r[3]),r[4]=E(s,r[4]),r[5]=E(f,r[5]),r[6]=E(R,r[6]),r[7]=E(U,r[7]),r}return function(r){function n(t,n,e){var o=this;if("SHA-224"!==t&&"SHA-256"!==t)throw new Error("Chosen SHA variant is not supported");var u=e||{};return(o=r.call(this,t,n,e)||this).t=o.i,o.o=!0,o.u=-1,o.s=i(o.h,o.v,o.u),o.A=U,o.p=function(t){return t.slice()},o.l=R,o.R=function(r,n,i,e){return function(t,r,n,i,e){for(var o,u=15+(r+65>>>9<<4),s=r+n;t.length<=u;)t.push(0);for(t[r>>>5]|=128<<24-r%32,t[u]=4294967295&s,t[u-1]=s/4294967296|0,o=0;o<t.length;o+=16)i=U(t.slice(o,o+16),i);return"SHA-224"===e?[i[0],i[1],i[2],i[3],i[4],i[5],i[6]]:i}(r,n,i,e,t)},o.U=R(t),o.T=512,o.m="SHA-224"===t?224:256,o.F=!1,u.hmacKey&&o.B(function(t,r,n,e){var o=t+" must include a value and format";if(!r){if(!e)throw new Error(o);return e}if(void 0===r.value||!r.format)throw new Error(o);return i(r.format,r.encoding||"UTF8",n)(r.value)}("hmacKey",u.hmacKey,o.u)),o}return function(r,n){function i(){this.constructor=r}t(r,n),r.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}(n,r),n}(function(){function t(t,r,n){var i=n||{};if(this.h=r,this.v=i.encoding||"UTF8",this.numRounds=i.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.g=t,this.Y=[],this.H=0,this.S=!1,this.I=0,this.C=!1,this.L=[],this.N=[]}return t.prototype.update=function(t){var r,n=0,i=this.T>>>5,e=this.s(t,this.Y,this.H),o=e.binLen,u=e.value,s=o>>>5;for(r=0;r<s;r+=i)n+this.T<=o&&(this.U=this.A(u.slice(r,r+i),this.U),n+=this.T);this.I+=n,this.Y=u.slice(n>>>5),this.H=o%this.T,this.S=!0},t.prototype.getHash=function(t,r){var n,i,o=this.m,u=f(r);if(this.F){if(-1===u.outputLen)throw new Error("Output length must be specified in options");o=u.outputLen}var s=e(t,o,this.u,u);if(this.C&&this.t)return s(this.t(u));for(i=this.R(this.Y.slice(),this.H,this.I,this.p(this.U),o),n=1;n<this.numRounds;n+=1)this.F&&o%32!=0&&(i[i.length-1]&=16777215>>>24-o%32),i=this.R(i,o,0,this.l(this.g),o);return s(i)},t.prototype.setHMACKey=function(t,r,n){if(!this.o)throw new Error("Variant does not support HMAC");if(this.S)throw new Error("Cannot set MAC key after calling update");var e=i(r,(n||{}).encoding||"UTF8",this.u);this.B(e(t))},t.prototype.B=function(t){var r,n=this.T>>>3,i=n/4-1;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(this.C)throw new Error("MAC key already set");for(n<t.binLen/8&&(t.value=this.R(t.value,t.binLen,0,this.l(this.g),this.m));t.value.length<=i;)t.value.push(0);for(r=0;r<=i;r+=1)this.L[r]=909522486^t.value[r],this.N[r]=1549556828^t.value[r];this.U=this.A(this.L,this.U),this.I=this.T,this.C=!0},t.prototype.getHMAC=function(t,r){var n=f(r);return e(t,this.m,this.u,n)(this.i())},t.prototype.i=function(){var t;if(!this.C)throw new Error("Cannot call getHMAC without first setting MAC key");var r=this.R(this.Y.slice(),this.H,this.I,this.p(this.U),this.m);return t=this.A(this.N,this.l(this.g)),t=this.R(r,this.m,this.T,t,this.m)},t}())}));
565
565
  /*!
566
566
  *
567
- * Super simple WYSIWYG editor v0.8.20
567
+ * Super simple WYSIWYG editor v0.9.1
568
568
  * https://summernote.org
569
569
  *
570
- *
571
- * Copyright 2013- Alan Hong and contributors
570
+ * Copyright 2013~ Hackerwins and contributors
572
571
  * Summernote may be freely distributed under the MIT license.
573
572
  *
574
- * Date: 2021-10-14T21:15Z
573
+ * Date: 2024-10-09T10:28Z
575
574
  *
576
575
  */
577
- (function webpackUniversalModuleDefinition(root,factory){if(typeof exports==="object"&&typeof module==="object")module.exports=factory(require("jQuery"));else if(typeof define==="function"&&define.amd)define(["jQuery"],factory);else{var a=typeof exports==="object"?factory(require("jQuery")):factory(root["jQuery"]);for(var i in a)(typeof exports==="object"?exports:root)[i]=a[i]}})(self,(function(__WEBPACK_EXTERNAL_MODULE__1145__){return(()=>{"use strict";var __webpack_modules__={9770:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{var jquery__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1145);var jquery__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);jquery__WEBPACK_IMPORTED_MODULE_0___default().summernote=jquery__WEBPACK_IMPORTED_MODULE_0___default().summernote||{lang:{}};jquery__WEBPACK_IMPORTED_MODULE_0___default().extend(jquery__WEBPACK_IMPORTED_MODULE_0___default().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",sizeunit:"Font Size Unit"},image:{image:"Picture",insert:"Insert Image",resizeFull:"Resize full",resizeHalf:"Resize half",resizeQuarter:"Resize quarter",resizeNone:"Original size",floatLeft:"Float Left",floatRight:"Float Right",floatNone:"Remove float",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, Google Drive, Vimeo, Vine, Instagram, DailyMotion, Youku, Peertube)"},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",useProtocol:"Use default protocol"},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:"Text Color",transparent:"Transparent",setTransparent:"Set transparent",reset:"Reset",resetToDefault:"Reset to default",cpSelect:"Select"},shortcut:{shortcuts:"Keyboard shortcuts",close:"Close",textFormatting:"Text formatting",action:"Action",paragraphFormatting:"Paragraph formatting",documentStyle:"Document Style",extraKeys:"Extra keys"},help:{escape:"Escape",insertParagraph:"Insert Paragraph",undo:"Undo the last command",redo:"Redo 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"},output:{noSelection:"No Selection Made!"}}})},1145:module=>{module.exports=__WEBPACK_EXTERNAL_MODULE__1145__}};var __webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==undefined){return cachedModule.exports}var module=__webpack_module_cache__[moduleId]={exports:{}};__webpack_modules__[moduleId](module,module.exports,__webpack_require__);return module.exports}(()=>{__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module["default"]:()=>module;__webpack_require__.d(getter,{a:getter});return getter}})();(()=>{__webpack_require__.d=(exports,definition)=>{for(var key in definition){if(__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)){Object.defineProperty(exports,key,{enumerable:true,get:definition[key]})}}}})();(()=>{__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop)})();(()=>{__webpack_require__.r=exports=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(exports,"__esModule",{value:true})}})();var __webpack_exports__={};(()=>{__webpack_require__.r(__webpack_exports__);var external_jQuery_=__webpack_require__(1145);var external_jQuery_default=__webpack_require__.n(external_jQuery_);var summernote_en_US=__webpack_require__(9770);var genericFontFamilies=["sans-serif","serif","monospace","cursive","fantasy"];function validFontName(fontName){return external_jQuery_default().inArray(fontName.toLowerCase(),genericFontFamilies)===-1?"'".concat(fontName,"'"):fontName}function isFontInstalled(fontName){var testFontName=fontName==="Comic Sans MS"?"Courier New":"Comic Sans MS";var testText="mmmmmmmmmmwwwww";var testSize="200px";var canvas=document.createElement("canvas");var context=canvas.getContext("2d");context.font=testSize+" '"+testFontName+"'";var originalWidth=context.measureText(testText).width;context.font=testSize+" "+validFontName(fontName)+', "'+testFontName+'"';var width=context.measureText(testText).width;return originalWidth!==width}var userAgent=navigator.userAgent;var isMSIE=/MSIE|Trident/i.test(userAgent);var browserVersion;if(isMSIE){var matches=/MSIE (\d+[.]\d+)/.exec(userAgent);if(matches){browserVersion=parseFloat(matches[1])}matches=/Trident\/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(userAgent);if(matches){browserVersion=parseFloat(matches[1])}}var isEdge=/Edge\/\d+/.test(userAgent);var isSupportTouch="ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0;var inputEventName=isMSIE?"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted":"input";const env={isMac:navigator.appVersion.indexOf("Mac")>-1,isMSIE:isMSIE,isEdge:isEdge,isFF:!isEdge&&/firefox/i.test(userAgent),isPhantom:/PhantomJS/i.test(userAgent),isWebkit:!isEdge&&/webkit/i.test(userAgent),isChrome:!isEdge&&/chrome/i.test(userAgent),isSafari:!isEdge&&/safari/i.test(userAgent)&&!/chrome/i.test(userAgent),browserVersion:browserVersion,isSupportTouch:isSupportTouch,isFontInstalled:isFontInstalled,isW3CRangeSupport:!!document.createRange,inputEventName:inputEventName,genericFontFamilies:genericFontFamilies,validFontName:validFontName};function eq(itemA){return function(itemB){return itemA===itemB}}function eq2(itemA,itemB){return itemA===itemB}function peq2(propName){return function(itemA,itemB){return itemA[propName]===itemB[propName]}}function ok(){return true}function fail(){return false}function not(f){return function(){return!f.apply(f,arguments)}}function and(fA,fB){return function(item){return fA(item)&&fB(item)}}function func_self(a){return a}function invoke(obj,method){return function(){return obj[method].apply(obj,arguments)}}var idCounter=0;function resetUniqueId(){idCounter=0}function uniqueId(prefix){var id=++idCounter+"";return prefix?prefix+id:id}function rect2bnd(rect){var $document=external_jQuery_default()(document);return{top:rect.top+$document.scrollTop(),left:rect.left+$document.scrollLeft(),width:rect.right-rect.left,height:rect.bottom-rect.top}}function invertObject(obj){var inverted={};for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){inverted[obj[key]]=key}}return inverted}function namespaceToCamel(namespace,prefix){prefix=prefix||"";return prefix+namespace.split(".").map((function(name){return name.substring(0,1).toUpperCase()+name.substring(1)})).join("")}function debounce(func,wait,immediate){var timeout;return function(){var context=this;var args=arguments;var later=function later(){timeout=null;if(!immediate){func.apply(context,args)}};var callNow=immediate&&!timeout;clearTimeout(timeout);timeout=setTimeout(later,wait);if(callNow){func.apply(context,args)}}}function isValidUrl(url){var expression=/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi;return expression.test(url)}const func={eq:eq,eq2:eq2,peq2:peq2,ok:ok,fail:fail,self:func_self,not:not,and:and,invoke:invoke,resetUniqueId:resetUniqueId,uniqueId:uniqueId,rect2bnd:rect2bnd,invertObject:invertObject,namespaceToCamel:namespaceToCamel,debounce:debounce,isValidUrl:isValidUrl};function head(array){return array[0]}function last(array){return array[array.length-1]}function initial(array){return array.slice(0,array.length-1)}function tail(array){return array.slice(1)}function find(array,pred){for(var idx=0,len=array.length;idx<len;idx++){var item=array[idx];if(pred(item)){return item}}}function lists_all(array,pred){for(var idx=0,len=array.length;idx<len;idx++){if(!pred(array[idx])){return false}}return true}function contains(array,item){if(array&&array.length&&item){if(array.indexOf){return array.indexOf(item)!==-1}else if(array.contains){return array.contains(item)}}return false}function sum(array,fn){fn=fn||func.self;return array.reduce((function(memo,v){return memo+fn(v)}),0)}function from(collection){var result=[];var length=collection.length;var idx=-1;while(++idx<length){result[idx]=collection[idx]}return result}function isEmpty(array){return!array||!array.length}function clusterBy(array,fn){if(!array.length){return[]}var aTail=tail(array);return aTail.reduce((function(memo,v){var aLast=last(memo);if(fn(last(aLast),v)){aLast[aLast.length]=v}else{memo[memo.length]=[v]}return memo}),[[head(array)]])}function compact(array){var aResult=[];for(var idx=0,len=array.length;idx<len;idx++){if(array[idx]){aResult.push(array[idx])}}return aResult}function unique(array){var results=[];for(var idx=0,len=array.length;idx<len;idx++){if(!contains(results,array[idx])){results.push(array[idx])}}return results}function next(array,item){if(array&&array.length&&item){var idx=array.indexOf(item);return idx===-1?null:array[idx+1]}return null}function prev(array,item){if(array&&array.length&&item){var idx=array.indexOf(item);return idx===-1?null:array[idx-1]}return null}const lists={head:head,last:last,initial:initial,tail:tail,prev:prev,next:next,find:find,contains:contains,all:lists_all,sum:sum,from:from,isEmpty:isEmpty,clusterBy:clusterBy,compact:compact,unique:unique};var NBSP_CHAR=String.fromCharCode(160);var ZERO_WIDTH_NBSP_CHAR="\ufeff";function isEditable(node){return node&&external_jQuery_default()(node).hasClass("note-editable")}function isControlSizing(node){return node&&external_jQuery_default()(node).hasClass("note-control-sizing")}function makePredByNodeName(nodeName){nodeName=nodeName.toUpperCase();return function(node){return node&&node.nodeName.toUpperCase()===nodeName}}function isText(node){return node&&node.nodeType===3}function isElement(node){return node&&node.nodeType===1}function isVoid(node){return node&&/^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT|^AUDIO|^VIDEO|^EMBED/.test(node.nodeName.toUpperCase())}function isPara(node){if(isEditable(node)){return false}return node&&/^DIV|^P|^LI|^H[1-7]/.test(node.nodeName.toUpperCase())}function isHeading(node){return node&&/^H[1-7]/.test(node.nodeName.toUpperCase())}var isPre=makePredByNodeName("PRE");var isLi=makePredByNodeName("LI");function isPurePara(node){return isPara(node)&&!isLi(node)}var isTable=makePredByNodeName("TABLE");var isData=makePredByNodeName("DATA");function isInline(node){return!isBodyContainer(node)&&!isList(node)&&!isHr(node)&&!isPara(node)&&!isTable(node)&&!isBlockquote(node)&&!isData(node)}function isList(node){return node&&/^UL|^OL/.test(node.nodeName.toUpperCase())}var isHr=makePredByNodeName("HR");function isCell(node){return node&&/^TD|^TH/.test(node.nodeName.toUpperCase())}var isBlockquote=makePredByNodeName("BLOCKQUOTE");function isBodyContainer(node){return isCell(node)||isBlockquote(node)||isEditable(node)}var isAnchor=makePredByNodeName("A");function isParaInline(node){return isInline(node)&&!!ancestor(node,isPara)}function isBodyInline(node){return isInline(node)&&!ancestor(node,isPara)}var isBody=makePredByNodeName("BODY");function isClosestSibling(nodeA,nodeB){return nodeA.nextSibling===nodeB||nodeA.previousSibling===nodeB}function withClosestSiblings(node,pred){pred=pred||func.ok;var siblings=[];if(node.previousSibling&&pred(node.previousSibling)){siblings.push(node.previousSibling)}siblings.push(node);if(node.nextSibling&&pred(node.nextSibling)){siblings.push(node.nextSibling)}return siblings}var blankHTML=env.isMSIE&&env.browserVersion<11?"&nbsp;":"<br>";function nodeLength(node){if(isText(node)){return node.nodeValue.length}if(node){return node.childNodes.length}return 0}function deepestChildIsEmpty(node){do{if(node.firstElementChild===null||node.firstElementChild.innerHTML==="")break}while(node=node.firstElementChild);return dom_isEmpty(node)}function dom_isEmpty(node){var len=nodeLength(node);if(len===0){return true}else if(!isText(node)&&len===1&&node.innerHTML===blankHTML){return true}else if(lists.all(node.childNodes,isText)&&node.innerHTML===""){return true}return false}function paddingBlankHTML(node){if(!isVoid(node)&&!nodeLength(node)){node.innerHTML=blankHTML}}function ancestor(node,pred){while(node){if(pred(node)){return node}if(isEditable(node)){break}node=node.parentNode}return null}function singleChildAncestor(node,pred){node=node.parentNode;while(node){if(nodeLength(node)!==1){break}if(pred(node)){return node}if(isEditable(node)){break}node=node.parentNode}return null}function listAncestor(node,pred){pred=pred||func.fail;var ancestors=[];ancestor(node,(function(el){if(!isEditable(el)){ancestors.push(el)}return pred(el)}));return ancestors}function lastAncestor(node,pred){var ancestors=listAncestor(node);return lists.last(ancestors.filter(pred))}function commonAncestor(nodeA,nodeB){var ancestors=listAncestor(nodeA);for(var n=nodeB;n;n=n.parentNode){if(ancestors.indexOf(n)>-1)return n}return null}function listPrev(node,pred){pred=pred||func.fail;var nodes=[];while(node){if(pred(node)){break}nodes.push(node);node=node.previousSibling}return nodes}function listNext(node,pred){pred=pred||func.fail;var nodes=[];while(node){if(pred(node)){break}nodes.push(node);node=node.nextSibling}return nodes}function listDescendant(node,pred){var descendants=[];pred=pred||func.ok;(function fnWalk(current){if(node!==current&&pred(current)){descendants.push(current)}for(var idx=0,len=current.childNodes.length;idx<len;idx++){fnWalk(current.childNodes[idx])}})(node);return descendants}function wrap(node,wrapperName){var parent=node.parentNode;var wrapper=external_jQuery_default()("<"+wrapperName+">")[0];parent.insertBefore(wrapper,node);wrapper.appendChild(node);return wrapper}function insertAfter(node,preceding){var next=preceding.nextSibling;var parent=preceding.parentNode;if(next){parent.insertBefore(node,next)}else{parent.appendChild(node)}return node}function appendChildNodes(node,aChild){external_jQuery_default().each(aChild,(function(idx,child){node.appendChild(child)}));return node}function isLeftEdgePoint(point){return point.offset===0}function isRightEdgePoint(point){return point.offset===nodeLength(point.node)}function isEdgePoint(point){return isLeftEdgePoint(point)||isRightEdgePoint(point)}function isLeftEdgeOf(node,ancestor){while(node&&node!==ancestor){if(position(node)!==0){return false}node=node.parentNode}return true}function isRightEdgeOf(node,ancestor){if(!ancestor){return false}while(node&&node!==ancestor){if(position(node)!==nodeLength(node.parentNode)-1){return false}node=node.parentNode}return true}function isLeftEdgePointOf(point,ancestor){return isLeftEdgePoint(point)&&isLeftEdgeOf(point.node,ancestor)}function isRightEdgePointOf(point,ancestor){return isRightEdgePoint(point)&&isRightEdgeOf(point.node,ancestor)}function position(node){var offset=0;while(node=node.previousSibling){offset+=1}return offset}function hasChildren(node){return!!(node&&node.childNodes&&node.childNodes.length)}function prevPoint(point,isSkipInnerOffset){var node;var offset;if(point.offset===0){if(isEditable(point.node)){return null}node=point.node.parentNode;offset=position(point.node)}else if(hasChildren(point.node)){node=point.node.childNodes[point.offset-1];offset=nodeLength(node)}else{node=point.node;offset=isSkipInnerOffset?0:point.offset-1}return{node:node,offset:offset}}function nextPoint(point,isSkipInnerOffset){var node,offset;if(nodeLength(point.node)===point.offset){if(isEditable(point.node)){return null}var nextTextNode=getNextTextNode(point.node);if(nextTextNode){node=nextTextNode;offset=0}else{node=point.node.parentNode;offset=position(point.node)+1}}else if(hasChildren(point.node)){node=point.node.childNodes[point.offset];offset=0}else{node=point.node;offset=isSkipInnerOffset?nodeLength(point.node):point.offset+1}return{node:node,offset:offset}}function nextPointWithEmptyNode(point,isSkipInnerOffset){var node,offset=0;if(dom_isEmpty(point.node)){if(point.node===null){return null}node=point.node.nextSibling;offset=0;return{node:node,offset:offset}}if(nodeLength(point.node)===point.offset){if(isEditable(point.node)){return null}node=point.node.parentNode;offset=position(point.node)+1;if(isEditable(node)){node=point.node.nextSibling;offset=0}}else if(hasChildren(point.node)){node=point.node.childNodes[point.offset];offset=0;if(dom_isEmpty(node)){if(!dom_isEmpty(point.node.nextSibling)){return{node:point.node.nextSibling,offset:offset}}return null}}else{node=point.node;offset=isSkipInnerOffset?nodeLength(point.node):point.offset+1;if(dom_isEmpty(node)){return null}}return{node:node,offset:offset}}function getNextTextNode(actual){if(!actual.nextSibling)return undefined;if(actual.parent!==actual.nextSibling.parent)return undefined;if(isText(actual.nextSibling))return actual.nextSibling;else return getNextTextNode(actual.nextSibling)}function isSamePoint(pointA,pointB){return pointA.node===pointB.node&&pointA.offset===pointB.offset}function isVisiblePoint(point){if(isText(point.node)||!hasChildren(point.node)||dom_isEmpty(point.node)){return true}var leftNode=point.node.childNodes[point.offset-1];var rightNode=point.node.childNodes[point.offset];if((!leftNode||isVoid(leftNode))&&(!rightNode||isVoid(rightNode))||isTable(rightNode)){return true}return false}function prevPointUntil(point,pred){while(point){if(pred(point)){return point}point=prevPoint(point)}return null}function nextPointUntil(point,pred){while(point){if(pred(point)){return point}point=nextPoint(point)}return null}function isCharPoint(point){if(!isText(point.node)){return false}var ch=point.node.nodeValue.charAt(point.offset-1);return ch&&ch!==" "&&ch!==NBSP_CHAR}function isSpacePoint(point){if(!isText(point.node)){return false}var ch=point.node.nodeValue.charAt(point.offset-1);return ch===" "||ch===NBSP_CHAR}function walkPoint(startPoint,endPoint,handler,isSkipInnerOffset){var point=startPoint;while(point){handler(point);if(isSamePoint(point,endPoint)){break}var isSkipOffset=isSkipInnerOffset&&startPoint.node!==point.node&&endPoint.node!==point.node;point=nextPointWithEmptyNode(point,isSkipOffset)}}function makeOffsetPath(ancestor,node){var ancestors=listAncestor(node,func.eq(ancestor));return ancestors.map(position).reverse()}function fromOffsetPath(ancestor,offsets){var current=ancestor;for(var i=0,len=offsets.length;i<len;i++){if(current.childNodes.length<=offsets[i]){current=current.childNodes[current.childNodes.length-1]}else{current=current.childNodes[offsets[i]]}}return current}function splitNode(point,options){var isSkipPaddingBlankHTML=options&&options.isSkipPaddingBlankHTML;var isNotSplitEdgePoint=options&&options.isNotSplitEdgePoint;var isDiscardEmptySplits=options&&options.isDiscardEmptySplits;if(isDiscardEmptySplits){isSkipPaddingBlankHTML=true}if(isEdgePoint(point)&&(isText(point.node)||isNotSplitEdgePoint)){if(isLeftEdgePoint(point)){return point.node}else if(isRightEdgePoint(point)){return point.node.nextSibling}}if(isText(point.node)){return point.node.splitText(point.offset)}else{var childNode=point.node.childNodes[point.offset];var clone=insertAfter(point.node.cloneNode(false),point.node);appendChildNodes(clone,listNext(childNode));if(!isSkipPaddingBlankHTML){paddingBlankHTML(point.node);paddingBlankHTML(clone)}if(isDiscardEmptySplits){if(dom_isEmpty(point.node)){remove(point.node)}if(dom_isEmpty(clone)){remove(clone);return point.node.nextSibling}}return clone}}function splitTree(root,point,options){var ancestors=listAncestor(point.node,func.eq(root));if(!ancestors.length){return null}else if(ancestors.length===1){return splitNode(point,options)}return ancestors.reduce((function(node,parent){if(node===point.node){node=splitNode(point,options)}return splitNode({node:parent,offset:node?position(node):nodeLength(parent)},options)}))}function splitPoint(point,isInline){var pred=isInline?isPara:isBodyContainer;var ancestors=listAncestor(point.node,pred);var topAncestor=lists.last(ancestors)||point.node;var splitRoot,container;if(pred(topAncestor)){splitRoot=ancestors[ancestors.length-2];container=topAncestor}else{splitRoot=topAncestor;container=splitRoot.parentNode}var pivot=splitRoot&&splitTree(splitRoot,point,{isSkipPaddingBlankHTML:isInline,isNotSplitEdgePoint:isInline});if(!pivot&&container===point.node){pivot=point.node.childNodes[point.offset]}return{rightNode:pivot,container:container}}function create(nodeName){return document.createElement(nodeName)}function createText(text){return document.createTextNode(text)}function remove(node,isRemoveChild){if(!node||!node.parentNode){return}if(node.removeNode){return node.removeNode(isRemoveChild)}var parent=node.parentNode;if(!isRemoveChild){var nodes=[];for(var i=0,len=node.childNodes.length;i<len;i++){nodes.push(node.childNodes[i])}for(var _i=0,_len=nodes.length;_i<_len;_i++){parent.insertBefore(nodes[_i],node)}}parent.removeChild(node)}function removeWhile(node,pred){while(node){if(isEditable(node)||!pred(node)){break}var parent=node.parentNode;remove(node);node=parent}}function replace(node,nodeName){if(node.nodeName.toUpperCase()===nodeName.toUpperCase()){return node}var newNode=create(nodeName);if(node.style.cssText){newNode.style.cssText=node.style.cssText}appendChildNodes(newNode,lists.from(node.childNodes));insertAfter(newNode,node);remove(node);return newNode}var isTextarea=makePredByNodeName("TEXTAREA");function value($node,stripLinebreaks){var val=isTextarea($node[0])?$node.val():$node.html();if(stripLinebreaks){return val.replace(/[\n\r]/g,"")}return val}function html($node,isNewlineOnBlock){var markup=value($node);if(isNewlineOnBlock){var regexTag=/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g;markup=markup.replace(regexTag,(function(match,endSlash,name){name=name.toUpperCase();var isEndOfInlineContainer=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(name)&&!!endSlash;var isBlockNode=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(name);return match+(isEndOfInlineContainer||isBlockNode?"\n":"")}));markup=markup.trim()}return markup}function posFromPlaceholder(placeholder){var $placeholder=external_jQuery_default()(placeholder);var pos=$placeholder.offset();var height=$placeholder.outerHeight(true);return{left:pos.left,top:pos.top+height}}function attachEvents($node,events){Object.keys(events).forEach((function(key){$node.on(key,events[key])}))}function detachEvents($node,events){Object.keys(events).forEach((function(key){$node.off(key,events[key])}))}function isCustomStyleTag(node){return node&&!isText(node)&&lists.contains(node.classList,"note-styletag")}const dom={NBSP_CHAR:NBSP_CHAR,ZERO_WIDTH_NBSP_CHAR:ZERO_WIDTH_NBSP_CHAR,blank:blankHTML,emptyPara:"<p>".concat(blankHTML,"</p>"),makePredByNodeName:makePredByNodeName,isEditable:isEditable,isControlSizing:isControlSizing,isText:isText,isElement:isElement,isVoid:isVoid,isPara:isPara,isPurePara:isPurePara,isHeading:isHeading,isInline:isInline,isBlock:func.not(isInline),isBodyInline:isBodyInline,isBody:isBody,isParaInline:isParaInline,isPre:isPre,isList:isList,isTable:isTable,isData:isData,isCell:isCell,isBlockquote:isBlockquote,isBodyContainer:isBodyContainer,isAnchor:isAnchor,isDiv:makePredByNodeName("DIV"),isLi:isLi,isBR:makePredByNodeName("BR"),isSpan:makePredByNodeName("SPAN"),isB:makePredByNodeName("B"),isU:makePredByNodeName("U"),isS:makePredByNodeName("S"),isI:makePredByNodeName("I"),isImg:makePredByNodeName("IMG"),isTextarea:isTextarea,deepestChildIsEmpty:deepestChildIsEmpty,isEmpty:dom_isEmpty,isEmptyAnchor:func.and(isAnchor,dom_isEmpty),isClosestSibling:isClosestSibling,withClosestSiblings:withClosestSiblings,nodeLength:nodeLength,isLeftEdgePoint:isLeftEdgePoint,isRightEdgePoint:isRightEdgePoint,isEdgePoint:isEdgePoint,isLeftEdgeOf:isLeftEdgeOf,isRightEdgeOf:isRightEdgeOf,isLeftEdgePointOf:isLeftEdgePointOf,isRightEdgePointOf:isRightEdgePointOf,prevPoint:prevPoint,nextPoint:nextPoint,nextPointWithEmptyNode:nextPointWithEmptyNode,isSamePoint:isSamePoint,isVisiblePoint:isVisiblePoint,prevPointUntil:prevPointUntil,nextPointUntil:nextPointUntil,isCharPoint:isCharPoint,isSpacePoint:isSpacePoint,walkPoint:walkPoint,ancestor:ancestor,singleChildAncestor:singleChildAncestor,listAncestor:listAncestor,lastAncestor:lastAncestor,listNext:listNext,listPrev:listPrev,listDescendant:listDescendant,commonAncestor:commonAncestor,wrap:wrap,insertAfter:insertAfter,appendChildNodes:appendChildNodes,position:position,hasChildren:hasChildren,makeOffsetPath:makeOffsetPath,fromOffsetPath:fromOffsetPath,splitTree:splitTree,splitPoint:splitPoint,create:create,createText:createText,remove:remove,removeWhile:removeWhile,replace:replace,html:html,value:value,posFromPlaceholder:posFromPlaceholder,attachEvents:attachEvents,detachEvents:detachEvents,isCustomStyleTag:isCustomStyleTag};function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}var Context=function(){function Context($note,options){_classCallCheck(this,Context);this.$note=$note;this.memos={};this.modules={};this.layoutInfo={};this.options=external_jQuery_default().extend(true,{},options);external_jQuery_default().summernote.ui=external_jQuery_default().summernote.ui_template(this.options);this.ui=external_jQuery_default().summernote.ui;this.initialize()}_createClass(Context,[{key:"initialize",value:function initialize(){this.layoutInfo=this.ui.createLayout(this.$note);this._initialize();this.$note.hide();return this}},{key:"destroy",value:function destroy(){this._destroy();this.$note.removeData("summernote");this.ui.removeLayout(this.$note,this.layoutInfo)}},{key:"reset",value:function reset(){var disabled=this.isDisabled();this.code(dom.emptyPara);this._destroy();this._initialize();if(disabled){this.disable()}}},{key:"_initialize",value:function _initialize(){var _this=this;this.options.id=func.uniqueId(external_jQuery_default().now());this.options.container=this.options.container||this.layoutInfo.editor;var buttons=external_jQuery_default().extend({},this.options.buttons);Object.keys(buttons).forEach((function(key){_this.memo("button."+key,buttons[key])}));var modules=external_jQuery_default().extend({},this.options.modules,external_jQuery_default().summernote.plugins||{});Object.keys(modules).forEach((function(key){_this.module(key,modules[key],true)}));Object.keys(this.modules).forEach((function(key){_this.initializeModule(key)}))}},{key:"_destroy",value:function _destroy(){var _this2=this;Object.keys(this.modules).reverse().forEach((function(key){_this2.removeModule(key)}));Object.keys(this.memos).forEach((function(key){_this2.removeMemo(key)}));this.triggerEvent("destroy",this)}},{key:"code",value:function code(html){var isActivated=this.invoke("codeview.isActivated");if(html===undefined){this.invoke("codeview.sync");return isActivated?this.layoutInfo.codable.val():this.layoutInfo.editable.html()}else{if(isActivated){this.invoke("codeview.sync",html)}else{this.layoutInfo.editable.html(html)}this.$note.val(html);this.triggerEvent("change",html,this.layoutInfo.editable)}}},{key:"isDisabled",value:function isDisabled(){return this.layoutInfo.editable.attr("contenteditable")==="false"}},{key:"enable",value:function enable(){this.layoutInfo.editable.attr("contenteditable",true);this.invoke("toolbar.activate",true);this.triggerEvent("disable",false);this.options.editing=true}},{key:"disable",value:function disable(){if(this.invoke("codeview.isActivated")){this.invoke("codeview.deactivate")}this.layoutInfo.editable.attr("contenteditable",false);this.options.editing=false;this.invoke("toolbar.deactivate",true);this.triggerEvent("disable",true)}},{key:"triggerEvent",value:function triggerEvent(){var namespace=lists.head(arguments);var args=lists.tail(lists.from(arguments));var callback=this.options.callbacks[func.namespaceToCamel(namespace,"on")];if(callback){callback.apply(this.$note[0],args)}this.$note.trigger("summernote."+namespace,args)}},{key:"initializeModule",value:function initializeModule(key){var module=this.modules[key];module.shouldInitialize=module.shouldInitialize||func.ok;if(!module.shouldInitialize()){return}if(module.initialize){module.initialize()}if(module.events){dom.attachEvents(this.$note,module.events)}}},{key:"module",value:function module(key,ModuleClass,withoutIntialize){if(arguments.length===1){return this.modules[key]}this.modules[key]=new ModuleClass(this);if(!withoutIntialize){this.initializeModule(key)}}},{key:"removeModule",value:function removeModule(key){var module=this.modules[key];if(module.shouldInitialize()){if(module.events){dom.detachEvents(this.$note,module.events)}if(module.destroy){module.destroy()}}delete this.modules[key]}},{key:"memo",value:function memo(key,obj){if(arguments.length===1){return this.memos[key]}this.memos[key]=obj}},{key:"removeMemo",value:function removeMemo(key){if(this.memos[key]&&this.memos[key].destroy){this.memos[key].destroy()}delete this.memos[key]}},{key:"createInvokeHandlerAndUpdateState",value:function createInvokeHandlerAndUpdateState(namespace,value){var _this3=this;return function(event){_this3.createInvokeHandler(namespace,value)(event);_this3.invoke("buttons.updateCurrentStyle")}}},{key:"createInvokeHandler",value:function createInvokeHandler(namespace,value){var _this4=this;return function(event){event.preventDefault();var $target=external_jQuery_default()(event.target);_this4.invoke(namespace,value||$target.closest("[data-value]").data("value"),$target)}}},{key:"invoke",value:function invoke(){var namespace=lists.head(arguments);var args=lists.tail(lists.from(arguments));var splits=namespace.split(".");var hasSeparator=splits.length>1;var moduleName=hasSeparator&&lists.head(splits);var methodName=hasSeparator?lists.last(splits):lists.head(splits);var module=this.modules[moduleName||"editor"];if(!moduleName&&this[methodName]){return this[methodName].apply(this,args)}else if(module&&module[methodName]&&module.shouldInitialize()){return module[methodName].apply(module,args)}}}]);return Context}();external_jQuery_default().fn.extend({summernote:function summernote(){var type=external_jQuery_default().type(lists.head(arguments));var isExternalAPICalled=type==="string";var hasInitOptions=type==="object";var options=external_jQuery_default().extend({},external_jQuery_default().summernote.options,hasInitOptions?lists.head(arguments):{});options.langInfo=external_jQuery_default().extend(true,{},external_jQuery_default().summernote.lang["en-US"],external_jQuery_default().summernote.lang[options.lang]);options.icons=external_jQuery_default().extend(true,{},external_jQuery_default().summernote.options.icons,options.icons);options.tooltip=options.tooltip==="auto"?!env.isSupportTouch:options.tooltip;this.each((function(idx,note){var $note=external_jQuery_default()(note);if(!$note.data("summernote")){var context=new Context($note,options);$note.data("summernote",context);$note.data("summernote").triggerEvent("init",context.layoutInfo)}}));var $note=this.first();if($note.length){var context=$note.data("summernote");if(isExternalAPICalled){return context.invoke.apply(context,lists.from(arguments))}else if(options.focus){context.invoke("editor.focus")}}return this}});function range_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function range_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function range_createClass(Constructor,protoProps,staticProps){if(protoProps)range_defineProperties(Constructor.prototype,protoProps);if(staticProps)range_defineProperties(Constructor,staticProps);return Constructor}function textRangeToPoint(textRange,isStart){var container=textRange.parentElement();var offset;var tester=document.body.createTextRange();var prevContainer;var childNodes=lists.from(container.childNodes);for(offset=0;offset<childNodes.length;offset++){if(dom.isText(childNodes[offset])){continue}tester.moveToElementText(childNodes[offset]);if(tester.compareEndPoints("StartToStart",textRange)>=0){break}prevContainer=childNodes[offset]}if(offset!==0&&dom.isText(childNodes[offset-1])){var textRangeStart=document.body.createTextRange();var curTextNode=null;textRangeStart.moveToElementText(prevContainer||container);textRangeStart.collapse(!prevContainer);curTextNode=prevContainer?prevContainer.nextSibling:container.firstChild;var pointTester=textRange.duplicate();pointTester.setEndPoint("StartToStart",textRangeStart);var textCount=pointTester.text.replace(/[\r\n]/g,"").length;while(textCount>curTextNode.nodeValue.length&&curTextNode.nextSibling){textCount-=curTextNode.nodeValue.length;curTextNode=curTextNode.nextSibling}var dummy=curTextNode.nodeValue;if(isStart&&curTextNode.nextSibling&&dom.isText(curTextNode.nextSibling)&&textCount===curTextNode.nodeValue.length){textCount-=curTextNode.nodeValue.length;curTextNode=curTextNode.nextSibling}container=curTextNode;offset=textCount}return{cont:container,offset:offset}}function pointToTextRange(point){var textRangeInfo=function textRangeInfo(container,offset){var node,isCollapseToStart;if(dom.isText(container)){var prevTextNodes=dom.listPrev(container,func.not(dom.isText));var prevContainer=lists.last(prevTextNodes).previousSibling;node=prevContainer||container.parentNode;offset+=lists.sum(lists.tail(prevTextNodes),dom.nodeLength);isCollapseToStart=!prevContainer}else{node=container.childNodes[offset]||container;if(dom.isText(node)){return textRangeInfo(node,0)}offset=0;isCollapseToStart=false}return{node:node,collapseToStart:isCollapseToStart,offset:offset}};var textRange=document.body.createTextRange();var info=textRangeInfo(point.node,point.offset);textRange.moveToElementText(info.node);textRange.collapse(info.collapseToStart);textRange.moveStart("character",info.offset);return textRange}var WrappedRange=function(){function WrappedRange(sc,so,ec,eo){range_classCallCheck(this,WrappedRange);this.sc=sc;this.so=so;this.ec=ec;this.eo=eo;this.isOnEditable=this.makeIsOn(dom.isEditable);this.isOnList=this.makeIsOn(dom.isList);this.isOnAnchor=this.makeIsOn(dom.isAnchor);this.isOnCell=this.makeIsOn(dom.isCell);this.isOnData=this.makeIsOn(dom.isData)}range_createClass(WrappedRange,[{key:"nativeRange",value:function nativeRange(){if(env.isW3CRangeSupport){var w3cRange=document.createRange();w3cRange.setStart(this.sc,this.so);w3cRange.setEnd(this.ec,this.eo);return w3cRange}else{var textRange=pointToTextRange({node:this.sc,offset:this.so});textRange.setEndPoint("EndToEnd",pointToTextRange({node:this.ec,offset:this.eo}));return textRange}}},{key:"getPoints",value:function getPoints(){return{sc:this.sc,so:this.so,ec:this.ec,eo:this.eo}}},{key:"getStartPoint",value:function getStartPoint(){return{node:this.sc,offset:this.so}}},{key:"getEndPoint",value:function getEndPoint(){return{node:this.ec,offset:this.eo}}},{key:"select",value:function select(){var nativeRng=this.nativeRange();if(env.isW3CRangeSupport){var selection=document.getSelection();if(selection.rangeCount>0){selection.removeAllRanges()}selection.addRange(nativeRng)}else{nativeRng.select()}return this}},{key:"scrollIntoView",value:function scrollIntoView(container){var height=external_jQuery_default()(container).height();if(container.scrollTop+height<this.sc.offsetTop){container.scrollTop+=Math.abs(container.scrollTop+height-this.sc.offsetTop)}return this}},{key:"normalize",value:function normalize(){var getVisiblePoint=function getVisiblePoint(point,isLeftToRight){if(!point){return point}if(dom.isVisiblePoint(point)){if(!dom.isEdgePoint(point)||dom.isRightEdgePoint(point)&&!isLeftToRight||dom.isLeftEdgePoint(point)&&isLeftToRight||dom.isRightEdgePoint(point)&&isLeftToRight&&dom.isVoid(point.node.nextSibling)||dom.isLeftEdgePoint(point)&&!isLeftToRight&&dom.isVoid(point.node.previousSibling)||dom.isBlock(point.node)&&dom.isEmpty(point.node)){return point}}var block=dom.ancestor(point.node,dom.isBlock);var hasRightNode=false;if(!hasRightNode){var prevPoint=dom.prevPoint(point)||{node:null};hasRightNode=(dom.isLeftEdgePointOf(point,block)||dom.isVoid(prevPoint.node))&&!isLeftToRight}var hasLeftNode=false;if(!hasLeftNode){var _nextPoint=dom.nextPoint(point)||{node:null};hasLeftNode=(dom.isRightEdgePointOf(point,block)||dom.isVoid(_nextPoint.node))&&isLeftToRight}if(hasRightNode||hasLeftNode){if(dom.isVisiblePoint(point)){return point}isLeftToRight=!isLeftToRight}var nextPoint=isLeftToRight?dom.nextPointUntil(dom.nextPoint(point),dom.isVisiblePoint):dom.prevPointUntil(dom.prevPoint(point),dom.isVisiblePoint);return nextPoint||point};var endPoint=getVisiblePoint(this.getEndPoint(),false);var startPoint=this.isCollapsed()?endPoint:getVisiblePoint(this.getStartPoint(),true);return new WrappedRange(startPoint.node,startPoint.offset,endPoint.node,endPoint.offset)}},{key:"nodes",value:function nodes(pred,options){pred=pred||func.ok;var includeAncestor=options&&options.includeAncestor;var fullyContains=options&&options.fullyContains;var startPoint=this.getStartPoint();var endPoint=this.getEndPoint();var nodes=[];var leftEdgeNodes=[];dom.walkPoint(startPoint,endPoint,(function(point){if(dom.isEditable(point.node)){return}var node;if(fullyContains){if(dom.isLeftEdgePoint(point)){leftEdgeNodes.push(point.node)}if(dom.isRightEdgePoint(point)&&lists.contains(leftEdgeNodes,point.node)){node=point.node}}else if(includeAncestor){node=dom.ancestor(point.node,pred)}else{node=point.node}if(node&&pred(node)){nodes.push(node)}}),true);return lists.unique(nodes)}},{key:"commonAncestor",value:function commonAncestor(){return dom.commonAncestor(this.sc,this.ec)}},{key:"expand",value:function expand(pred){var startAncestor=dom.ancestor(this.sc,pred);var endAncestor=dom.ancestor(this.ec,pred);if(!startAncestor&&!endAncestor){return new WrappedRange(this.sc,this.so,this.ec,this.eo)}var boundaryPoints=this.getPoints();if(startAncestor){boundaryPoints.sc=startAncestor;boundaryPoints.so=0}if(endAncestor){boundaryPoints.ec=endAncestor;boundaryPoints.eo=dom.nodeLength(endAncestor)}return new WrappedRange(boundaryPoints.sc,boundaryPoints.so,boundaryPoints.ec,boundaryPoints.eo)}},{key:"collapse",value:function collapse(isCollapseToStart){if(isCollapseToStart){return new WrappedRange(this.sc,this.so,this.sc,this.so)}else{return new WrappedRange(this.ec,this.eo,this.ec,this.eo)}}},{key:"splitText",value:function splitText(){var isSameContainer=this.sc===this.ec;var boundaryPoints=this.getPoints();if(dom.isText(this.ec)&&!dom.isEdgePoint(this.getEndPoint())){this.ec.splitText(this.eo)}if(dom.isText(this.sc)&&!dom.isEdgePoint(this.getStartPoint())){boundaryPoints.sc=this.sc.splitText(this.so);boundaryPoints.so=0;if(isSameContainer){boundaryPoints.ec=boundaryPoints.sc;boundaryPoints.eo=this.eo-this.so}}return new WrappedRange(boundaryPoints.sc,boundaryPoints.so,boundaryPoints.ec,boundaryPoints.eo)}},{key:"deleteContents",value:function deleteContents(){if(this.isCollapsed()){return this}var rng=this.splitText();var nodes=rng.nodes(null,{fullyContains:true});var point=dom.prevPointUntil(rng.getStartPoint(),(function(point){return!lists.contains(nodes,point.node)}));var emptyParents=[];external_jQuery_default().each(nodes,(function(idx,node){var parent=node.parentNode;if(point.node!==parent&&dom.nodeLength(parent)===1){emptyParents.push(parent)}dom.remove(node,false)}));external_jQuery_default().each(emptyParents,(function(idx,node){dom.remove(node,false)}));return new WrappedRange(point.node,point.offset,point.node,point.offset).normalize()}},{key:"makeIsOn",value:function makeIsOn(pred){return function(){var ancestor=dom.ancestor(this.sc,pred);return!!ancestor&&ancestor===dom.ancestor(this.ec,pred)}}},{key:"isLeftEdgeOf",value:function isLeftEdgeOf(pred){if(!dom.isLeftEdgePoint(this.getStartPoint())){return false}var node=dom.ancestor(this.sc,pred);return node&&dom.isLeftEdgeOf(this.sc,node)}},{key:"isCollapsed",value:function isCollapsed(){return this.sc===this.ec&&this.so===this.eo}},{key:"wrapBodyInlineWithPara",value:function wrapBodyInlineWithPara(){if(dom.isBodyContainer(this.sc)&&dom.isEmpty(this.sc)){this.sc.innerHTML=dom.emptyPara;return new WrappedRange(this.sc.firstChild,0,this.sc.firstChild,0)}var rng=this.normalize();if(dom.isParaInline(this.sc)||dom.isPara(this.sc)){return rng}var topAncestor;if(dom.isInline(rng.sc)){var ancestors=dom.listAncestor(rng.sc,func.not(dom.isInline));topAncestor=lists.last(ancestors);if(!dom.isInline(topAncestor)){topAncestor=ancestors[ancestors.length-2]||rng.sc.childNodes[rng.so]}}else{topAncestor=rng.sc.childNodes[rng.so>0?rng.so-1:0]}if(topAncestor){var inlineSiblings=dom.listPrev(topAncestor,dom.isParaInline).reverse();inlineSiblings=inlineSiblings.concat(dom.listNext(topAncestor.nextSibling,dom.isParaInline));if(inlineSiblings.length){var para=dom.wrap(lists.head(inlineSiblings),"p");dom.appendChildNodes(para,lists.tail(inlineSiblings))}}return this.normalize()}},{key:"insertNode",value:function insertNode(node){var rng=this;if(dom.isText(node)||dom.isInline(node)){rng=this.wrapBodyInlineWithPara().deleteContents()}var info=dom.splitPoint(rng.getStartPoint(),dom.isInline(node));if(info.rightNode){info.rightNode.parentNode.insertBefore(node,info.rightNode);if(dom.isEmpty(info.rightNode)&&dom.isPara(node)){info.rightNode.parentNode.removeChild(info.rightNode)}}else{info.container.appendChild(node)}return node}},{key:"pasteHTML",value:function pasteHTML(markup){markup=external_jQuery_default().trim(markup);var contentsContainer=external_jQuery_default()("<div></div>").html(markup)[0];var childNodes=lists.from(contentsContainer.childNodes);var rng=this;var reversed=false;if(rng.so>=0){childNodes=childNodes.reverse();reversed=true}childNodes=childNodes.map((function(childNode){return rng.insertNode(childNode)}));if(reversed){childNodes=childNodes.reverse()}return childNodes}},{key:"toString",value:function toString(){var nativeRng=this.nativeRange();return env.isW3CRangeSupport?nativeRng.toString():nativeRng.text}},{key:"getWordRange",value:function getWordRange(findAfter){var endPoint=this.getEndPoint();if(!dom.isCharPoint(endPoint)){return this}var startPoint=dom.prevPointUntil(endPoint,(function(point){return!dom.isCharPoint(point)}));if(findAfter){endPoint=dom.nextPointUntil(endPoint,(function(point){return!dom.isCharPoint(point)}))}return new WrappedRange(startPoint.node,startPoint.offset,endPoint.node,endPoint.offset)}},{key:"getWordsRange",value:function getWordsRange(findAfter){var endPoint=this.getEndPoint();var isNotTextPoint=function isNotTextPoint(point){return!dom.isCharPoint(point)&&!dom.isSpacePoint(point)};if(isNotTextPoint(endPoint)){return this}var startPoint=dom.prevPointUntil(endPoint,isNotTextPoint);if(findAfter){endPoint=dom.nextPointUntil(endPoint,isNotTextPoint)}return new WrappedRange(startPoint.node,startPoint.offset,endPoint.node,endPoint.offset)}},{key:"getWordsMatchRange",value:function getWordsMatchRange(regex){var endPoint=this.getEndPoint();var startPoint=dom.prevPointUntil(endPoint,(function(point){if(!dom.isCharPoint(point)&&!dom.isSpacePoint(point)){return true}var rng=new WrappedRange(point.node,point.offset,endPoint.node,endPoint.offset);var result=regex.exec(rng.toString());return result&&result.index===0}));var rng=new WrappedRange(startPoint.node,startPoint.offset,endPoint.node,endPoint.offset);var text=rng.toString();var result=regex.exec(text);if(result&&result[0].length===text.length){return rng}else{return null}}},{key:"bookmark",value:function bookmark(editable){return{s:{path:dom.makeOffsetPath(editable,this.sc),offset:this.so},e:{path:dom.makeOffsetPath(editable,this.ec),offset:this.eo}}}},{key:"paraBookmark",value:function paraBookmark(paras){return{s:{path:lists.tail(dom.makeOffsetPath(lists.head(paras),this.sc)),offset:this.so},e:{path:lists.tail(dom.makeOffsetPath(lists.last(paras),this.ec)),offset:this.eo}}}},{key:"getClientRects",value:function getClientRects(){var nativeRng=this.nativeRange();return nativeRng.getClientRects()}}]);return WrappedRange}();const range={create:function create(sc,so,ec,eo){if(arguments.length===4){return new WrappedRange(sc,so,ec,eo)}else if(arguments.length===2){ec=sc;eo=so;return new WrappedRange(sc,so,ec,eo)}else{var wrappedRange=this.createFromSelection();if(!wrappedRange&&arguments.length===1){var bodyElement=arguments[0];if(dom.isEditable(bodyElement)){bodyElement=bodyElement.lastChild}return this.createFromBodyElement(bodyElement,dom.emptyPara===arguments[0].innerHTML)}return wrappedRange}},createFromBodyElement:function createFromBodyElement(bodyElement){var isCollapseToStart=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var wrappedRange=this.createFromNode(bodyElement);return wrappedRange.collapse(isCollapseToStart)},createFromSelection:function createFromSelection(){var sc,so,ec,eo;if(env.isW3CRangeSupport){var selection=document.getSelection();if(!selection||selection.rangeCount===0){return null}else if(dom.isBody(selection.anchorNode)){return null}var nativeRng=selection.getRangeAt(0);sc=nativeRng.startContainer;so=nativeRng.startOffset;ec=nativeRng.endContainer;eo=nativeRng.endOffset}else{var textRange=document.selection.createRange();var textRangeEnd=textRange.duplicate();textRangeEnd.collapse(false);var textRangeStart=textRange;textRangeStart.collapse(true);var startPoint=textRangeToPoint(textRangeStart,true);var endPoint=textRangeToPoint(textRangeEnd,false);if(dom.isText(startPoint.node)&&dom.isLeftEdgePoint(startPoint)&&dom.isTextNode(endPoint.node)&&dom.isRightEdgePoint(endPoint)&&endPoint.node.nextSibling===startPoint.node){startPoint=endPoint}sc=startPoint.cont;so=startPoint.offset;ec=endPoint.cont;eo=endPoint.offset}return new WrappedRange(sc,so,ec,eo)},createFromNode:function createFromNode(node){var sc=node;var so=0;var ec=node;var eo=dom.nodeLength(ec);if(dom.isVoid(sc)){so=dom.listPrev(sc).length-1;sc=sc.parentNode}if(dom.isBR(ec)){eo=dom.listPrev(ec).length-1;ec=ec.parentNode}else if(dom.isVoid(ec)){eo=dom.listPrev(ec).length;ec=ec.parentNode}return this.create(sc,so,ec,eo)},createFromNodeBefore:function createFromNodeBefore(node){return this.createFromNode(node).collapse(true)},createFromNodeAfter:function createFromNodeAfter(node){return this.createFromNode(node).collapse()},createFromBookmark:function createFromBookmark(editable,bookmark){var sc=dom.fromOffsetPath(editable,bookmark.s.path);var so=bookmark.s.offset;var ec=dom.fromOffsetPath(editable,bookmark.e.path);var eo=bookmark.e.offset;return new WrappedRange(sc,so,ec,eo)},createFromParaBookmark:function createFromParaBookmark(bookmark,paras){var so=bookmark.s.offset;var eo=bookmark.e.offset;var sc=dom.fromOffsetPath(lists.head(paras),bookmark.s.path);var ec=dom.fromOffsetPath(lists.last(paras),bookmark.e.path);return new WrappedRange(sc,so,ec,eo)}};var KEY_MAP={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,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,HOME:36,END:35,PAGEUP:33,PAGEDOWN:34};const key={isEdit:function isEdit(keyCode){return lists.contains([KEY_MAP.BACKSPACE,KEY_MAP.TAB,KEY_MAP.ENTER,KEY_MAP.SPACE,KEY_MAP.DELETE],keyCode)},isMove:function isMove(keyCode){return lists.contains([KEY_MAP.LEFT,KEY_MAP.UP,KEY_MAP.RIGHT,KEY_MAP.DOWN],keyCode)},isNavigation:function isNavigation(keyCode){return lists.contains([KEY_MAP.HOME,KEY_MAP.END,KEY_MAP.PAGEUP,KEY_MAP.PAGEDOWN],keyCode)},nameFromCode:func.invertObject(KEY_MAP),code:KEY_MAP};function readFileAsDataURL(file){return external_jQuery_default().Deferred((function(deferred){external_jQuery_default().extend(new FileReader,{onload:function onload(e){var dataURL=e.target.result;deferred.resolve(dataURL)},onerror:function onerror(err){deferred.reject(err)}}).readAsDataURL(file)})).promise()}function createImage(url){return external_jQuery_default().Deferred((function(deferred){var $img=external_jQuery_default()("<img>");$img.one("load",(function(){$img.off("error abort");deferred.resolve($img)})).one("error abort",(function(){$img.off("load").detach();deferred.reject($img)})).css({display:"none"}).appendTo(document.body).attr("src",url)})).promise()}function History_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function History_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function History_createClass(Constructor,protoProps,staticProps){if(protoProps)History_defineProperties(Constructor.prototype,protoProps);if(staticProps)History_defineProperties(Constructor,staticProps);return Constructor}var History=function(){function History(context){History_classCallCheck(this,History);this.stack=[];this.stackOffset=-1;this.context=context;this.$editable=context.layoutInfo.editable;this.editable=this.$editable[0]}History_createClass(History,[{key:"makeSnapshot",value:function makeSnapshot(){var rng=range.create(this.editable);var emptyBookmark={s:{path:[],offset:0},e:{path:[],offset:0}};return{contents:this.$editable.html(),bookmark:rng&&rng.isOnEditable()?rng.bookmark(this.editable):emptyBookmark}}},{key:"applySnapshot",value:function applySnapshot(snapshot){if(snapshot.contents!==null){this.$editable.html(snapshot.contents)}if(snapshot.bookmark!==null){range.createFromBookmark(this.editable,snapshot.bookmark).select()}}},{key:"rewind",value:function rewind(){if(this.$editable.html()!==this.stack[this.stackOffset].contents){this.recordUndo()}this.stackOffset=0;this.applySnapshot(this.stack[this.stackOffset])}},{key:"commit",value:function commit(){this.stack=[];this.stackOffset=-1;this.recordUndo()}},{key:"reset",value:function reset(){this.stack=[];this.stackOffset=-1;this.$editable.html("");this.recordUndo()}},{key:"undo",value:function undo(){if(this.$editable.html()!==this.stack[this.stackOffset].contents){this.recordUndo()}if(this.stackOffset>0){this.stackOffset--;this.applySnapshot(this.stack[this.stackOffset])}}},{key:"redo",value:function redo(){if(this.stack.length-1>this.stackOffset){this.stackOffset++;this.applySnapshot(this.stack[this.stackOffset])}}},{key:"recordUndo",value:function recordUndo(){this.stackOffset++;if(this.stack.length>this.stackOffset){this.stack=this.stack.slice(0,this.stackOffset)}this.stack.push(this.makeSnapshot());if(this.stack.length>this.context.options.historyLimit){this.stack.shift();this.stackOffset-=1}}}]);return History}();function Style_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function Style_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function Style_createClass(Constructor,protoProps,staticProps){if(protoProps)Style_defineProperties(Constructor.prototype,protoProps);if(staticProps)Style_defineProperties(Constructor,staticProps);return Constructor}var Style=function(){function Style(){Style_classCallCheck(this,Style)}Style_createClass(Style,[{key:"jQueryCSS",value:function jQueryCSS($obj,propertyNames){var result={};external_jQuery_default().each(propertyNames,(function(idx,propertyName){result[propertyName]=$obj.css(propertyName)}));return result}},{key:"fromNode",value:function fromNode($node){var properties=["font-family","font-size","text-align","list-style-type","line-height"];var styleInfo=this.jQueryCSS($node,properties)||{};var fontSize=$node[0].style.fontSize||styleInfo["font-size"];styleInfo["font-size"]=parseInt(fontSize,10);styleInfo["font-size-unit"]=fontSize.match(/[a-z%]+$/);return styleInfo}},{key:"stylePara",value:function stylePara(rng,styleInfo){external_jQuery_default().each(rng.nodes(dom.isPara,{includeAncestor:true}),(function(idx,para){external_jQuery_default()(para).css(styleInfo)}))}},{key:"styleNodes",value:function styleNodes(rng,options){rng=rng.splitText();var nodeName=options&&options.nodeName||"SPAN";var expandClosestSibling=!!(options&&options.expandClosestSibling);var onlyPartialContains=!!(options&&options.onlyPartialContains);if(rng.isCollapsed()){return[rng.insertNode(dom.create(nodeName))]}var pred=dom.makePredByNodeName(nodeName);var nodes=rng.nodes(dom.isText,{fullyContains:true}).map((function(text){return dom.singleChildAncestor(text,pred)||dom.wrap(text,nodeName)}));if(expandClosestSibling){if(onlyPartialContains){var nodesInRange=rng.nodes();pred=func.and(pred,(function(node){return lists.contains(nodesInRange,node)}))}return nodes.map((function(node){var siblings=dom.withClosestSiblings(node,pred);var head=lists.head(siblings);var tails=lists.tail(siblings);external_jQuery_default().each(tails,(function(idx,elem){dom.appendChildNodes(head,elem.childNodes);dom.remove(elem)}));return lists.head(siblings)}))}else{return nodes}}},{key:"current",value:function current(rng){var $cont=external_jQuery_default()(!dom.isElement(rng.sc)?rng.sc.parentNode:rng.sc);var styleInfo=this.fromNode($cont);try{styleInfo=external_jQuery_default().extend(styleInfo,{"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")||styleInfo["font-family"]})}catch(e){}if(!rng.isOnList()){styleInfo["list-style"]="none"}else{var orderedTypes=["circle","disc","disc-leading-zero","square"];var isUnordered=orderedTypes.indexOf(styleInfo["list-style-type"])>-1;styleInfo["list-style"]=isUnordered?"unordered":"ordered"}var para=dom.ancestor(rng.sc,dom.isPara);if(para&&para.style["line-height"]){styleInfo["line-height"]=para.style.lineHeight}else{var lineHeight=parseInt(styleInfo["line-height"],10)/parseInt(styleInfo["font-size"],10);styleInfo["line-height"]=lineHeight.toFixed(1)}styleInfo.anchor=rng.isOnAnchor()&&dom.ancestor(rng.sc,dom.isAnchor);styleInfo.ancestors=dom.listAncestor(rng.sc,dom.isEditable);styleInfo.range=rng;return styleInfo}}]);return Style}();function Bullet_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function Bullet_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function Bullet_createClass(Constructor,protoProps,staticProps){if(protoProps)Bullet_defineProperties(Constructor.prototype,protoProps);if(staticProps)Bullet_defineProperties(Constructor,staticProps);return Constructor}var Bullet=function(){function Bullet(){Bullet_classCallCheck(this,Bullet)}Bullet_createClass(Bullet,[{key:"insertOrderedList",value:function insertOrderedList(editable){this.toggleList("OL",editable)}},{key:"insertUnorderedList",value:function insertUnorderedList(editable){this.toggleList("UL",editable)}},{key:"indent",value:function indent(editable){var _this=this;var rng=range.create(editable).wrapBodyInlineWithPara();var paras=rng.nodes(dom.isPara,{includeAncestor:true});var clustereds=lists.clusterBy(paras,func.peq2("parentNode"));external_jQuery_default().each(clustereds,(function(idx,paras){var head=lists.head(paras);if(dom.isLi(head)){var previousList=_this.findList(head.previousSibling);if(previousList){paras.map((function(para){return previousList.appendChild(para)}))}else{_this.wrapList(paras,head.parentNode.nodeName);paras.map((function(para){return para.parentNode})).map((function(para){return _this.appendToPrevious(para)}))}}else{external_jQuery_default().each(paras,(function(idx,para){external_jQuery_default()(para).css("marginLeft",(function(idx,val){return(parseInt(val,10)||0)+25}))}))}}));rng.select()}},{key:"outdent",value:function outdent(editable){var _this2=this;var rng=range.create(editable).wrapBodyInlineWithPara();var paras=rng.nodes(dom.isPara,{includeAncestor:true});var clustereds=lists.clusterBy(paras,func.peq2("parentNode"));external_jQuery_default().each(clustereds,(function(idx,paras){var head=lists.head(paras);if(dom.isLi(head)){_this2.releaseList([paras])}else{external_jQuery_default().each(paras,(function(idx,para){external_jQuery_default()(para).css("marginLeft",(function(idx,val){val=parseInt(val,10)||0;return val>25?val-25:""}))}))}}));rng.select()}},{key:"toggleList",value:function toggleList(listName,editable){var _this3=this;var rng=range.create(editable).wrapBodyInlineWithPara();var paras=rng.nodes(dom.isPara,{includeAncestor:true});var bookmark=rng.paraBookmark(paras);var clustereds=lists.clusterBy(paras,func.peq2("parentNode"));if(lists.find(paras,dom.isPurePara)){var wrappedParas=[];external_jQuery_default().each(clustereds,(function(idx,paras){wrappedParas=wrappedParas.concat(_this3.wrapList(paras,listName))}));paras=wrappedParas}else{var diffLists=rng.nodes(dom.isList,{includeAncestor:true}).filter((function(listNode){return!external_jQuery_default().nodeName(listNode,listName)}));if(diffLists.length){external_jQuery_default().each(diffLists,(function(idx,listNode){dom.replace(listNode,listName)}))}else{paras=this.releaseList(clustereds,true)}}range.createFromParaBookmark(bookmark,paras).select()}},{key:"wrapList",value:function wrapList(paras,listName){var head=lists.head(paras);var last=lists.last(paras);var prevList=dom.isList(head.previousSibling)&&head.previousSibling;var nextList=dom.isList(last.nextSibling)&&last.nextSibling;var listNode=prevList||dom.insertAfter(dom.create(listName||"UL"),last);paras=paras.map((function(para){return dom.isPurePara(para)?dom.replace(para,"LI"):para}));dom.appendChildNodes(listNode,paras);if(nextList){dom.appendChildNodes(listNode,lists.from(nextList.childNodes));dom.remove(nextList)}return paras}},{key:"releaseList",value:function releaseList(clustereds,isEscapseToBody){var _this4=this;var releasedParas=[];external_jQuery_default().each(clustereds,(function(idx,paras){var head=lists.head(paras);var last=lists.last(paras);var headList=isEscapseToBody?dom.lastAncestor(head,dom.isList):head.parentNode;var parentItem=headList.parentNode;if(headList.parentNode.nodeName==="LI"){paras.map((function(para){var newList=_this4.findNextSiblings(para);if(parentItem.nextSibling){parentItem.parentNode.insertBefore(para,parentItem.nextSibling)}else{parentItem.parentNode.appendChild(para)}if(newList.length){_this4.wrapList(newList,headList.nodeName);para.appendChild(newList[0].parentNode)}}));if(headList.children.length===0){parentItem.removeChild(headList)}if(parentItem.childNodes.length===0){parentItem.parentNode.removeChild(parentItem)}}else{var lastList=headList.childNodes.length>1?dom.splitTree(headList,{node:last.parentNode,offset:dom.position(last)+1},{isSkipPaddingBlankHTML:true}):null;var middleList=dom.splitTree(headList,{node:head.parentNode,offset:dom.position(head)},{isSkipPaddingBlankHTML:true});paras=isEscapseToBody?dom.listDescendant(middleList,dom.isLi):lists.from(middleList.childNodes).filter(dom.isLi);if(isEscapseToBody||!dom.isList(headList.parentNode)){paras=paras.map((function(para){return dom.replace(para,"P")}))}external_jQuery_default().each(lists.from(paras).reverse(),(function(idx,para){dom.insertAfter(para,headList)}));var rootLists=lists.compact([headList,middleList,lastList]);external_jQuery_default().each(rootLists,(function(idx,rootList){var listNodes=[rootList].concat(dom.listDescendant(rootList,dom.isList));external_jQuery_default().each(listNodes.reverse(),(function(idx,listNode){if(!dom.nodeLength(listNode)){dom.remove(listNode,true)}}))}))}releasedParas=releasedParas.concat(paras)}));return releasedParas}},{key:"appendToPrevious",value:function appendToPrevious(node){return node.previousSibling?dom.appendChildNodes(node.previousSibling,[node]):this.wrapList([node],"LI")}},{key:"findList",value:function findList(node){return node?lists.find(node.children,(function(child){return["OL","UL"].indexOf(child.nodeName)>-1})):null}},{key:"findNextSiblings",value:function findNextSiblings(node){var siblings=[];while(node.nextSibling){siblings.push(node.nextSibling);node=node.nextSibling}return siblings}}]);return Bullet}();function Typing_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function Typing_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function Typing_createClass(Constructor,protoProps,staticProps){if(protoProps)Typing_defineProperties(Constructor.prototype,protoProps);if(staticProps)Typing_defineProperties(Constructor,staticProps);return Constructor}var Typing=function(){function Typing(context){Typing_classCallCheck(this,Typing);this.bullet=new Bullet;this.options=context.options}Typing_createClass(Typing,[{key:"insertTab",value:function insertTab(rng,tabsize){var tab=dom.createText(new Array(tabsize+1).join(dom.NBSP_CHAR));rng=rng.deleteContents();rng.insertNode(tab,true);rng=range.create(tab,tabsize);rng.select()}},{key:"insertParagraph",value:function insertParagraph(editable,rng){rng=rng||range.create(editable);rng=rng.deleteContents();rng=rng.wrapBodyInlineWithPara();var splitRoot=dom.ancestor(rng.sc,dom.isPara);var nextPara;if(splitRoot){if(dom.isLi(splitRoot)&&(dom.isEmpty(splitRoot)||dom.deepestChildIsEmpty(splitRoot))){this.bullet.toggleList(splitRoot.parentNode.nodeName);return}else{var blockquote=null;if(this.options.blockquoteBreakingLevel===1){blockquote=dom.ancestor(splitRoot,dom.isBlockquote)}else if(this.options.blockquoteBreakingLevel===2){blockquote=dom.lastAncestor(splitRoot,dom.isBlockquote)}if(blockquote){nextPara=external_jQuery_default()(dom.emptyPara)[0];if(dom.isRightEdgePoint(rng.getStartPoint())&&dom.isBR(rng.sc.nextSibling)){external_jQuery_default()(rng.sc.nextSibling).remove()}var split=dom.splitTree(blockquote,rng.getStartPoint(),{isDiscardEmptySplits:true});if(split){split.parentNode.insertBefore(nextPara,split)}else{dom.insertAfter(nextPara,blockquote)}}else{nextPara=dom.splitTree(splitRoot,rng.getStartPoint());var emptyAnchors=dom.listDescendant(splitRoot,dom.isEmptyAnchor);emptyAnchors=emptyAnchors.concat(dom.listDescendant(nextPara,dom.isEmptyAnchor));external_jQuery_default().each(emptyAnchors,(function(idx,anchor){dom.remove(anchor)}));if((dom.isHeading(nextPara)||dom.isPre(nextPara)||dom.isCustomStyleTag(nextPara))&&dom.isEmpty(nextPara)){nextPara=dom.replace(nextPara,"p")}}}}else{var next=rng.sc.childNodes[rng.so];nextPara=external_jQuery_default()(dom.emptyPara)[0];if(next){rng.sc.insertBefore(nextPara,next)}else{rng.sc.appendChild(nextPara)}}range.create(nextPara,0).normalize().select().scrollIntoView(editable)}}]);return Typing}();function Table_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function Table_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function Table_createClass(Constructor,protoProps,staticProps){if(protoProps)Table_defineProperties(Constructor.prototype,protoProps);if(staticProps)Table_defineProperties(Constructor,staticProps);return Constructor}var TableResultAction=function TableResultAction(startPoint,where,action,domTable){var _startPoint={colPos:0,rowPos:0};var _virtualTable=[];var _actionCellList=[];function setStartPoint(){if(!startPoint||!startPoint.tagName||startPoint.tagName.toLowerCase()!=="td"&&startPoint.tagName.toLowerCase()!=="th"){return}_startPoint.colPos=startPoint.cellIndex;if(!startPoint.parentElement||!startPoint.parentElement.tagName||startPoint.parentElement.tagName.toLowerCase()!=="tr"){return}_startPoint.rowPos=startPoint.parentElement.rowIndex}function setVirtualTablePosition(rowIndex,cellIndex,baseRow,baseCell,isRowSpan,isColSpan,isVirtualCell){var objPosition={baseRow:baseRow,baseCell:baseCell,isRowSpan:isRowSpan,isColSpan:isColSpan,isVirtual:isVirtualCell};if(!_virtualTable[rowIndex]){_virtualTable[rowIndex]=[]}_virtualTable[rowIndex][cellIndex]=objPosition}function getActionCell(virtualTableCellObj,resultAction,virtualRowPosition,virtualColPosition){return{baseCell:virtualTableCellObj.baseCell,action:resultAction,virtualTable:{rowIndex:virtualRowPosition,cellIndex:virtualColPosition}}}function recoverCellIndex(rowIndex,cellIndex){if(!_virtualTable[rowIndex]){return cellIndex}if(!_virtualTable[rowIndex][cellIndex]){return cellIndex}var newCellIndex=cellIndex;while(_virtualTable[rowIndex][newCellIndex]){newCellIndex++;if(!_virtualTable[rowIndex][newCellIndex]){return newCellIndex}}}function addCellInfoToVirtual(row,cell){var cellIndex=recoverCellIndex(row.rowIndex,cell.cellIndex);var cellHasColspan=cell.colSpan>1;var cellHasRowspan=cell.rowSpan>1;var isThisSelectedCell=row.rowIndex===_startPoint.rowPos&&cell.cellIndex===_startPoint.colPos;setVirtualTablePosition(row.rowIndex,cellIndex,row,cell,cellHasRowspan,cellHasColspan,false);var rowspanNumber=cell.attributes.rowSpan?parseInt(cell.attributes.rowSpan.value,10):0;if(rowspanNumber>1){for(var rp=1;rp<rowspanNumber;rp++){var rowspanIndex=row.rowIndex+rp;adjustStartPoint(rowspanIndex,cellIndex,cell,isThisSelectedCell);setVirtualTablePosition(rowspanIndex,cellIndex,row,cell,true,cellHasColspan,true)}}var colspanNumber=cell.attributes.colSpan?parseInt(cell.attributes.colSpan.value,10):0;if(colspanNumber>1){for(var cp=1;cp<colspanNumber;cp++){var cellspanIndex=recoverCellIndex(row.rowIndex,cellIndex+cp);adjustStartPoint(row.rowIndex,cellspanIndex,cell,isThisSelectedCell);setVirtualTablePosition(row.rowIndex,cellspanIndex,row,cell,cellHasRowspan,true,true)}}}function adjustStartPoint(rowIndex,cellIndex,cell,isSelectedCell){if(rowIndex===_startPoint.rowPos&&_startPoint.colPos>=cell.cellIndex&&cell.cellIndex<=cellIndex&&!isSelectedCell){_startPoint.colPos++}}function createVirtualTable(){var rows=domTable.rows;for(var rowIndex=0;rowIndex<rows.length;rowIndex++){var cells=rows[rowIndex].cells;for(var cellIndex=0;cellIndex<cells.length;cellIndex++){addCellInfoToVirtual(rows[rowIndex],cells[cellIndex])}}}function getDeleteResultActionToCell(cell){switch(where){case TableResultAction.where.Column:if(cell.isColSpan){return TableResultAction.resultAction.SubtractSpanCount}break;case TableResultAction.where.Row:if(!cell.isVirtual&&cell.isRowSpan){return TableResultAction.resultAction.AddCell}else if(cell.isRowSpan){return TableResultAction.resultAction.SubtractSpanCount}break}return TableResultAction.resultAction.RemoveCell}function getAddResultActionToCell(cell){switch(where){case TableResultAction.where.Column:if(cell.isColSpan){return TableResultAction.resultAction.SumSpanCount}else if(cell.isRowSpan&&cell.isVirtual){return TableResultAction.resultAction.Ignore}break;case TableResultAction.where.Row:if(cell.isRowSpan){return TableResultAction.resultAction.SumSpanCount}else if(cell.isColSpan&&cell.isVirtual){return TableResultAction.resultAction.Ignore}break}return TableResultAction.resultAction.AddCell}function init(){setStartPoint();createVirtualTable()}this.getActionList=function(){var fixedRow=where===TableResultAction.where.Row?_startPoint.rowPos:-1;var fixedCol=where===TableResultAction.where.Column?_startPoint.colPos:-1;var actualPosition=0;var canContinue=true;while(canContinue){var rowPosition=fixedRow>=0?fixedRow:actualPosition;var colPosition=fixedCol>=0?fixedCol:actualPosition;var row=_virtualTable[rowPosition];if(!row){canContinue=false;return _actionCellList}var cell=row[colPosition];if(!cell){canContinue=false;return _actionCellList}var resultAction=TableResultAction.resultAction.Ignore;switch(action){case TableResultAction.requestAction.Add:resultAction=getAddResultActionToCell(cell);break;case TableResultAction.requestAction.Delete:resultAction=getDeleteResultActionToCell(cell);break}_actionCellList.push(getActionCell(cell,resultAction,rowPosition,colPosition));actualPosition++}return _actionCellList};init()};TableResultAction.where={Row:0,Column:1};TableResultAction.requestAction={Add:0,Delete:1};TableResultAction.resultAction={Ignore:0,SubtractSpanCount:1,RemoveCell:2,AddCell:3,SumSpanCount:4};var Table=function(){function Table(){Table_classCallCheck(this,Table)}Table_createClass(Table,[{key:"tab",value:function tab(rng,isShift){var cell=dom.ancestor(rng.commonAncestor(),dom.isCell);var table=dom.ancestor(cell,dom.isTable);var cells=dom.listDescendant(table,dom.isCell);var nextCell=lists[isShift?"prev":"next"](cells,cell);if(nextCell){range.create(nextCell,0).select()}}},{key:"addRow",value:function addRow(rng,position){var cell=dom.ancestor(rng.commonAncestor(),dom.isCell);var currentTr=external_jQuery_default()(cell).closest("tr");var trAttributes=this.recoverAttributes(currentTr);var html=external_jQuery_default()("<tr"+trAttributes+"></tr>");var vTable=new TableResultAction(cell,TableResultAction.where.Row,TableResultAction.requestAction.Add,external_jQuery_default()(currentTr).closest("table")[0]);var actions=vTable.getActionList();for(var idCell=0;idCell<actions.length;idCell++){var currentCell=actions[idCell];var tdAttributes=this.recoverAttributes(currentCell.baseCell);switch(currentCell.action){case TableResultAction.resultAction.AddCell:html.append("<td"+tdAttributes+">"+dom.blank+"</td>");break;case TableResultAction.resultAction.SumSpanCount:{if(position==="top"){var baseCellTr=currentCell.baseCell.parent;var isTopFromRowSpan=(!baseCellTr?0:currentCell.baseCell.closest("tr").rowIndex)<=currentTr[0].rowIndex;if(isTopFromRowSpan){var newTd=external_jQuery_default()("<div></div>").append(external_jQuery_default()("<td"+tdAttributes+">"+dom.blank+"</td>").removeAttr("rowspan")).html();html.append(newTd);break}}var rowspanNumber=parseInt(currentCell.baseCell.rowSpan,10);rowspanNumber++;currentCell.baseCell.setAttribute("rowSpan",rowspanNumber)}break}}if(position==="top"){currentTr.before(html)}else{var cellHasRowspan=cell.rowSpan>1;if(cellHasRowspan){var lastTrIndex=currentTr[0].rowIndex+(cell.rowSpan-2);external_jQuery_default()(external_jQuery_default()(currentTr).parent().find("tr")[lastTrIndex]).after(external_jQuery_default()(html));return}currentTr.after(html)}}},{key:"addCol",value:function addCol(rng,position){var cell=dom.ancestor(rng.commonAncestor(),dom.isCell);var row=external_jQuery_default()(cell).closest("tr");var rowsGroup=external_jQuery_default()(row).siblings();rowsGroup.push(row);var vTable=new TableResultAction(cell,TableResultAction.where.Column,TableResultAction.requestAction.Add,external_jQuery_default()(row).closest("table")[0]);var actions=vTable.getActionList();for(var actionIndex=0;actionIndex<actions.length;actionIndex++){var currentCell=actions[actionIndex];var tdAttributes=this.recoverAttributes(currentCell.baseCell);switch(currentCell.action){case TableResultAction.resultAction.AddCell:if(position==="right"){external_jQuery_default()(currentCell.baseCell).after("<td"+tdAttributes+">"+dom.blank+"</td>")}else{external_jQuery_default()(currentCell.baseCell).before("<td"+tdAttributes+">"+dom.blank+"</td>")}break;case TableResultAction.resultAction.SumSpanCount:if(position==="right"){var colspanNumber=parseInt(currentCell.baseCell.colSpan,10);colspanNumber++;currentCell.baseCell.setAttribute("colSpan",colspanNumber)}else{external_jQuery_default()(currentCell.baseCell).before("<td"+tdAttributes+">"+dom.blank+"</td>")}break}}}},{key:"recoverAttributes",value:function recoverAttributes(el){var resultStr="";if(!el){return resultStr}var attrList=el.attributes||[];for(var i=0;i<attrList.length;i++){if(attrList[i].name.toLowerCase()==="id"){continue}if(attrList[i].specified){resultStr+=" "+attrList[i].name+"='"+attrList[i].value+"'"}}return resultStr}},{key:"deleteRow",value:function deleteRow(rng){var cell=dom.ancestor(rng.commonAncestor(),dom.isCell);var row=external_jQuery_default()(cell).closest("tr");var cellPos=row.children("td, th").index(external_jQuery_default()(cell));var rowPos=row[0].rowIndex;var vTable=new TableResultAction(cell,TableResultAction.where.Row,TableResultAction.requestAction.Delete,external_jQuery_default()(row).closest("table")[0]);var actions=vTable.getActionList();for(var actionIndex=0;actionIndex<actions.length;actionIndex++){if(!actions[actionIndex]){continue}var baseCell=actions[actionIndex].baseCell;var virtualPosition=actions[actionIndex].virtualTable;var hasRowspan=baseCell.rowSpan&&baseCell.rowSpan>1;var rowspanNumber=hasRowspan?parseInt(baseCell.rowSpan,10):0;switch(actions[actionIndex].action){case TableResultAction.resultAction.Ignore:continue;case TableResultAction.resultAction.AddCell:{var nextRow=row.next("tr")[0];if(!nextRow){continue}var cloneRow=row[0].cells[cellPos];if(hasRowspan){if(rowspanNumber>2){rowspanNumber--;nextRow.insertBefore(cloneRow,nextRow.cells[cellPos]);nextRow.cells[cellPos].setAttribute("rowSpan",rowspanNumber);nextRow.cells[cellPos].innerHTML=""}else if(rowspanNumber===2){nextRow.insertBefore(cloneRow,nextRow.cells[cellPos]);nextRow.cells[cellPos].removeAttribute("rowSpan");nextRow.cells[cellPos].innerHTML=""}}}continue;case TableResultAction.resultAction.SubtractSpanCount:if(hasRowspan){if(rowspanNumber>2){rowspanNumber--;baseCell.setAttribute("rowSpan",rowspanNumber);if(virtualPosition.rowIndex!==rowPos&&baseCell.cellIndex===cellPos){baseCell.innerHTML=""}}else if(rowspanNumber===2){baseCell.removeAttribute("rowSpan");if(virtualPosition.rowIndex!==rowPos&&baseCell.cellIndex===cellPos){baseCell.innerHTML=""}}}continue;case TableResultAction.resultAction.RemoveCell:continue}}row.remove()}},{key:"deleteCol",value:function deleteCol(rng){var cell=dom.ancestor(rng.commonAncestor(),dom.isCell);var row=external_jQuery_default()(cell).closest("tr");var cellPos=row.children("td, th").index(external_jQuery_default()(cell));var vTable=new TableResultAction(cell,TableResultAction.where.Column,TableResultAction.requestAction.Delete,external_jQuery_default()(row).closest("table")[0]);var actions=vTable.getActionList();for(var actionIndex=0;actionIndex<actions.length;actionIndex++){if(!actions[actionIndex]){continue}switch(actions[actionIndex].action){case TableResultAction.resultAction.Ignore:continue;case TableResultAction.resultAction.SubtractSpanCount:{var baseCell=actions[actionIndex].baseCell;var hasColspan=baseCell.colSpan&&baseCell.colSpan>1;if(hasColspan){var colspanNumber=baseCell.colSpan?parseInt(baseCell.colSpan,10):0;if(colspanNumber>2){colspanNumber--;baseCell.setAttribute("colSpan",colspanNumber);if(baseCell.cellIndex===cellPos){baseCell.innerHTML=""}}else if(colspanNumber===2){baseCell.removeAttribute("colSpan");if(baseCell.cellIndex===cellPos){baseCell.innerHTML=""}}}}continue;case TableResultAction.resultAction.RemoveCell:dom.remove(actions[actionIndex].baseCell,true);continue}}}},{key:"createTable",value:function createTable(colCount,rowCount,options){var tds=[];var tdHTML;for(var idxCol=0;idxCol<colCount;idxCol++){tds.push("<td>"+dom.blank+"</td>")}tdHTML=tds.join("");var trs=[];var trHTML;for(var idxRow=0;idxRow<rowCount;idxRow++){trs.push("<tr>"+tdHTML+"</tr>")}trHTML=trs.join("");var $table=external_jQuery_default()("<table>"+trHTML+"</table>");if(options&&options.tableClassName){$table.addClass(options.tableClassName)}return $table[0]}},{key:"deleteTable",value:function deleteTable(rng){var cell=dom.ancestor(rng.commonAncestor(),dom.isCell);external_jQuery_default()(cell).closest("table").remove()}}]);return Table}();function Editor_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function Editor_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function Editor_createClass(Constructor,protoProps,staticProps){if(protoProps)Editor_defineProperties(Constructor.prototype,protoProps);if(staticProps)Editor_defineProperties(Constructor,staticProps);return Constructor}var KEY_BOGUS="bogus";var Editor=function(){function Editor(context){var _this=this;Editor_classCallCheck(this,Editor);this.context=context;this.$note=context.layoutInfo.note;this.$editor=context.layoutInfo.editor;this.$editable=context.layoutInfo.editable;this.options=context.options;this.lang=this.options.langInfo;this.editable=this.$editable[0];this.lastRange=null;this.snapshot=null;this.style=new Style;this.table=new Table;this.typing=new Typing(context);this.bullet=new Bullet;this.history=new History(context);this.context.memo("help.escape",this.lang.help.escape);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);var commands=["bold","italic","underline","strikethrough","superscript","subscript","justifyLeft","justifyCenter","justifyRight","justifyFull","formatBlock","removeFormat","backColor"];for(var idx=0,len=commands.length;idx<len;idx++){this[commands[idx]]=function(sCmd){return function(value){_this.beforeCommand();document.execCommand(sCmd,false,value);_this.afterCommand(true)}}(commands[idx]);this.context.memo("help."+commands[idx],this.lang.help[commands[idx]])}this.fontName=this.wrapCommand((function(value){return _this.fontStyling("font-family",env.validFontName(value))}));this.fontSize=this.wrapCommand((function(value){var unit=_this.currentStyle()["font-size-unit"];return _this.fontStyling("font-size",value+unit)}));this.fontSizeUnit=this.wrapCommand((function(value){var size=_this.currentStyle()["font-size"];return _this.fontStyling("font-size",size+value)}));for(var _idx=1;_idx<=6;_idx++){this["formatH"+_idx]=function(idx){return function(){_this.formatBlock("H"+idx)}}(_idx);this.context.memo("help.formatH"+_idx,this.lang.help["formatH"+_idx])}this.insertParagraph=this.wrapCommand((function(){_this.typing.insertParagraph(_this.editable)}));this.insertOrderedList=this.wrapCommand((function(){_this.bullet.insertOrderedList(_this.editable)}));this.insertUnorderedList=this.wrapCommand((function(){_this.bullet.insertUnorderedList(_this.editable)}));this.indent=this.wrapCommand((function(){_this.bullet.indent(_this.editable)}));this.outdent=this.wrapCommand((function(){_this.bullet.outdent(_this.editable)}));this.insertNode=this.wrapCommand((function(node){if(_this.isLimited(external_jQuery_default()(node).text().length)){return}var rng=_this.getLastRange();rng.insertNode(node);_this.setLastRange(range.createFromNodeAfter(node).select())}));this.insertText=this.wrapCommand((function(text){if(_this.isLimited(text.length)){return}var rng=_this.getLastRange();var textNode=rng.insertNode(dom.createText(text));_this.setLastRange(range.create(textNode,dom.nodeLength(textNode)).select())}));this.pasteHTML=this.wrapCommand((function(markup){if(_this.isLimited(markup.length)){return}markup=_this.context.invoke("codeview.purify",markup);var contents=_this.getLastRange().pasteHTML(markup);_this.setLastRange(range.createFromNodeAfter(lists.last(contents)).select())}));this.formatBlock=this.wrapCommand((function(tagName,$target){var onApplyCustomStyle=_this.options.callbacks.onApplyCustomStyle;if(onApplyCustomStyle){onApplyCustomStyle.call(_this,$target,_this.context,_this.onFormatBlock)}else{_this.onFormatBlock(tagName,$target)}}));this.insertHorizontalRule=this.wrapCommand((function(){var hrNode=_this.getLastRange().insertNode(dom.create("HR"));if(hrNode.nextSibling){_this.setLastRange(range.create(hrNode.nextSibling,0).normalize().select())}}));this.lineHeight=this.wrapCommand((function(value){_this.style.stylePara(_this.getLastRange(),{lineHeight:value})}));this.createLink=this.wrapCommand((function(linkInfo){var linkUrl=linkInfo.url;var linkText=linkInfo.text;var isNewWindow=linkInfo.isNewWindow;var checkProtocol=linkInfo.checkProtocol;var rng=linkInfo.range||_this.getLastRange();var additionalTextLength=linkText.length-rng.toString().length;if(additionalTextLength>0&&_this.isLimited(additionalTextLength)){return}var isTextChanged=rng.toString()!==linkText;if(typeof linkUrl==="string"){linkUrl=linkUrl.trim()}if(_this.options.onCreateLink){linkUrl=_this.options.onCreateLink(linkUrl)}else if(checkProtocol){linkUrl=/^([A-Za-z][A-Za-z0-9+-.]*\:|#|\/)/.test(linkUrl)?linkUrl:_this.options.defaultProtocol+linkUrl}var anchors=[];if(isTextChanged){rng=rng.deleteContents();var anchor=rng.insertNode(external_jQuery_default()("<A>"+linkText+"</A>")[0]);anchors.push(anchor)}else{anchors=_this.style.styleNodes(rng,{nodeName:"A",expandClosestSibling:true,onlyPartialContains:true})}external_jQuery_default().each(anchors,(function(idx,anchor){external_jQuery_default()(anchor).attr("href",linkUrl);if(isNewWindow){external_jQuery_default()(anchor).attr("target","_blank")}else{external_jQuery_default()(anchor).removeAttr("target")}}));_this.setLastRange(_this.createRangeFromList(anchors).select())}));this.color=this.wrapCommand((function(colorInfo){var foreColor=colorInfo.foreColor;var backColor=colorInfo.backColor;if(foreColor){document.execCommand("foreColor",false,foreColor)}if(backColor){document.execCommand("backColor",false,backColor)}}));this.foreColor=this.wrapCommand((function(colorInfo){document.execCommand("foreColor",false,colorInfo)}));this.insertTable=this.wrapCommand((function(dim){var dimension=dim.split("x");var rng=_this.getLastRange().deleteContents();rng.insertNode(_this.table.createTable(dimension[0],dimension[1],_this.options))}));this.removeMedia=this.wrapCommand((function(){var $target=external_jQuery_default()(_this.restoreTarget()).parent();if($target.closest("figure").length){$target.closest("figure").remove()}else{$target=external_jQuery_default()(_this.restoreTarget()).detach()}_this.context.triggerEvent("media.delete",$target,_this.$editable)}));this.floatMe=this.wrapCommand((function(value){var $target=external_jQuery_default()(_this.restoreTarget());$target.toggleClass("note-float-left",value==="left");$target.toggleClass("note-float-right",value==="right");$target.css("float",value==="none"?"":value)}));this.resize=this.wrapCommand((function(value){var $target=external_jQuery_default()(_this.restoreTarget());value=parseFloat(value);if(value===0){$target.css("width","")}else{$target.css({width:value*100+"%",height:""})}}))}Editor_createClass(Editor,[{key:"initialize",value:function initialize(){var _this2=this;this.$editable.on("keydown",(function(event){if(event.keyCode===key.code.ENTER){_this2.context.triggerEvent("enter",event)}_this2.context.triggerEvent("keydown",event);_this2.snapshot=_this2.history.makeSnapshot();_this2.hasKeyShortCut=false;if(!event.isDefaultPrevented()){if(_this2.options.shortcuts){_this2.hasKeyShortCut=_this2.handleKeyMap(event)}else{_this2.preventDefaultEditableShortCuts(event)}}if(_this2.isLimited(1,event)){var lastRange=_this2.getLastRange();if(lastRange.eo-lastRange.so===0){return false}}_this2.setLastRange();if(_this2.options.recordEveryKeystroke){if(_this2.hasKeyShortCut===false){_this2.history.recordUndo()}}})).on("keyup",(function(event){_this2.setLastRange();_this2.context.triggerEvent("keyup",event)})).on("focus",(function(event){_this2.setLastRange();_this2.context.triggerEvent("focus",event)})).on("blur",(function(event){_this2.context.triggerEvent("blur",event)})).on("mousedown",(function(event){_this2.context.triggerEvent("mousedown",event)})).on("mouseup",(function(event){_this2.setLastRange();_this2.history.recordUndo();_this2.context.triggerEvent("mouseup",event)})).on("scroll",(function(event){_this2.context.triggerEvent("scroll",event)})).on("paste",(function(event){_this2.setLastRange();_this2.context.triggerEvent("paste",event)})).on("input",(function(){if(_this2.isLimited(0)&&_this2.snapshot){_this2.history.applySnapshot(_this2.snapshot)}}));this.$editable.attr("spellcheck",this.options.spellCheck);this.$editable.attr("autocorrect",this.options.spellCheck);if(this.options.disableGrammar){this.$editable.attr("data-gramm",false)}this.$editable.html(dom.html(this.$note)||dom.emptyPara);this.$editable.on(env.inputEventName,func.debounce((function(){_this2.context.triggerEvent("change",_this2.$editable.html(),_this2.$editable)}),10));this.$editable.on("focusin",(function(event){_this2.context.triggerEvent("focusin",event)})).on("focusout",(function(event){_this2.context.triggerEvent("focusout",event)}));if(this.options.airMode){if(this.options.overrideContextMenu){this.$editor.on("contextmenu",(function(event){_this2.context.triggerEvent("contextmenu",event);return false}))}}else{if(this.options.width){this.$editor.outerWidth(this.options.width)}if(this.options.height){this.$editable.outerHeight(this.options.height)}if(this.options.maxHeight){this.$editable.css("max-height",this.options.maxHeight)}if(this.options.minHeight){this.$editable.css("min-height",this.options.minHeight)}}this.history.recordUndo();this.setLastRange()}},{key:"destroy",value:function destroy(){this.$editable.off()}},{key:"handleKeyMap",value:function handleKeyMap(event){var keyMap=this.options.keyMap[env.isMac?"mac":"pc"];var keys=[];if(event.metaKey){keys.push("CMD")}if(event.ctrlKey&&!event.altKey){keys.push("CTRL")}if(event.shiftKey){keys.push("SHIFT")}var keyName=key.nameFromCode[event.keyCode];if(keyName){keys.push(keyName)}var eventName=keyMap[keys.join("+")];if(keyName==="TAB"&&!this.options.tabDisable){this.afterCommand()}else if(eventName){if(this.context.invoke(eventName)!==false){event.preventDefault();return true}}else if(key.isEdit(event.keyCode)){this.afterCommand()}return false}},{key:"preventDefaultEditableShortCuts",value:function preventDefaultEditableShortCuts(event){if((event.ctrlKey||event.metaKey)&&lists.contains([66,73,85],event.keyCode)){event.preventDefault()}}},{key:"isLimited",value:function isLimited(pad,event){pad=pad||0;if(typeof event!=="undefined"){if(key.isMove(event.keyCode)||key.isNavigation(event.keyCode)||event.ctrlKey||event.metaKey||lists.contains([key.code.BACKSPACE,key.code.DELETE],event.keyCode)){return false}}if(this.options.maxTextLength>0){if(this.$editable.text().length+pad>this.options.maxTextLength){return true}}return false}},{key:"createRange",value:function createRange(){this.focus();this.setLastRange();return this.getLastRange()}},{key:"createRangeFromList",value:function createRangeFromList(lst){var startRange=range.createFromNodeBefore(lists.head(lst));var startPoint=startRange.getStartPoint();var endRange=range.createFromNodeAfter(lists.last(lst));var endPoint=endRange.getEndPoint();return range.create(startPoint.node,startPoint.offset,endPoint.node,endPoint.offset)}},{key:"setLastRange",value:function setLastRange(rng){if(rng){this.lastRange=rng}else{this.lastRange=range.create(this.editable);if(external_jQuery_default()(this.lastRange.sc).closest(".note-editable").length===0){this.lastRange=range.createFromBodyElement(this.editable)}}}},{key:"getLastRange",value:function getLastRange(){if(!this.lastRange){this.setLastRange()}return this.lastRange}},{key:"saveRange",value:function saveRange(thenCollapse){if(thenCollapse){this.getLastRange().collapse().select()}}},{key:"restoreRange",value:function restoreRange(){if(this.lastRange){this.lastRange.select();this.focus()}}},{key:"saveTarget",value:function saveTarget(node){this.$editable.data("target",node)}},{key:"clearTarget",value:function clearTarget(){this.$editable.removeData("target")}},{key:"restoreTarget",value:function restoreTarget(){return this.$editable.data("target")}},{key:"currentStyle",value:function currentStyle(){var rng=range.create();if(rng){rng=rng.normalize()}return rng?this.style.current(rng):this.style.fromNode(this.$editable)}},{key:"styleFromNode",value:function styleFromNode($node){return this.style.fromNode($node)}},{key:"undo",value:function undo(){this.context.triggerEvent("before.command",this.$editable.html());this.history.undo();this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"commit",value:function commit(){this.context.triggerEvent("before.command",this.$editable.html());this.history.commit();this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"redo",value:function redo(){this.context.triggerEvent("before.command",this.$editable.html());this.history.redo();this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"beforeCommand",value:function beforeCommand(){this.context.triggerEvent("before.command",this.$editable.html());document.execCommand("styleWithCSS",false,this.options.styleWithCSS);this.focus()}},{key:"afterCommand",value:function afterCommand(isPreventTrigger){this.normalizeContent();this.history.recordUndo();if(!isPreventTrigger){this.context.triggerEvent("change",this.$editable.html(),this.$editable)}}},{key:"tab",value:function tab(){var rng=this.getLastRange();if(rng.isCollapsed()&&rng.isOnCell()){this.table.tab(rng)}else{if(this.options.tabSize===0){return false}if(!this.isLimited(this.options.tabSize)){this.beforeCommand();this.typing.insertTab(rng,this.options.tabSize);this.afterCommand()}}}},{key:"untab",value:function untab(){var rng=this.getLastRange();if(rng.isCollapsed()&&rng.isOnCell()){this.table.tab(rng,true)}else{if(this.options.tabSize===0){return false}}}},{key:"wrapCommand",value:function wrapCommand(fn){return function(){this.beforeCommand();fn.apply(this,arguments);this.afterCommand()}}},{key:"insertImage",value:function insertImage(src,param){var _this3=this;return createImage(src,param).then((function($image){_this3.beforeCommand();if(typeof param==="function"){param($image)}else{if(typeof param==="string"){$image.attr("data-filename",param)}$image.css("width",Math.min(_this3.$editable.width(),$image.width()))}$image.show();_this3.getLastRange().insertNode($image[0]);_this3.setLastRange(range.createFromNodeAfter($image[0]).select());_this3.afterCommand()})).fail((function(e){_this3.context.triggerEvent("image.upload.error",e)}))}},{key:"insertImagesAsDataURL",value:function insertImagesAsDataURL(files){var _this4=this;external_jQuery_default().each(files,(function(idx,file){var filename=file.name;if(_this4.options.maximumImageFileSize&&_this4.options.maximumImageFileSize<file.size){_this4.context.triggerEvent("image.upload.error",_this4.lang.image.maximumFileSizeError)}else{readFileAsDataURL(file).then((function(dataURL){return _this4.insertImage(dataURL,filename)})).fail((function(){_this4.context.triggerEvent("image.upload.error")}))}}))}},{key:"insertImagesOrCallback",value:function insertImagesOrCallback(files){var callbacks=this.options.callbacks;if(callbacks.onImageUpload){this.context.triggerEvent("image.upload",files)}else{this.insertImagesAsDataURL(files)}}},{key:"getSelectedText",value:function getSelectedText(){var rng=this.getLastRange();if(rng.isOnAnchor()){rng=range.createFromNode(dom.ancestor(rng.sc,dom.isAnchor))}return rng.toString()}},{key:"onFormatBlock",value:function onFormatBlock(tagName,$target){document.execCommand("FormatBlock",false,env.isMSIE?"<"+tagName+">":tagName);if($target&&$target.length){if($target[0].tagName.toUpperCase()!==tagName.toUpperCase()){$target=$target.find(tagName)}if($target&&$target.length){var currentRange=this.createRange();var $parent=external_jQuery_default()([currentRange.sc,currentRange.ec]).closest(tagName);$parent.removeClass();var className=$target[0].className||"";if(className){$parent.addClass(className)}}}}},{key:"formatPara",value:function formatPara(){this.formatBlock("P")}},{key:"fontStyling",value:function fontStyling(target,value){var rng=this.getLastRange();if(rng!==""){var spans=this.style.styleNodes(rng);this.$editor.find(".note-status-output").html("");external_jQuery_default()(spans).css(target,value);if(rng.isCollapsed()){var firstSpan=lists.head(spans);if(firstSpan&&!dom.nodeLength(firstSpan)){firstSpan.innerHTML=dom.ZERO_WIDTH_NBSP_CHAR;range.createFromNode(firstSpan.firstChild).select();this.setLastRange();this.$editable.data(KEY_BOGUS,firstSpan)}}else{this.setLastRange(this.createRangeFromList(spans).select())}}else{var noteStatusOutput=external_jQuery_default().now();this.$editor.find(".note-status-output").html('<div id="note-status-output-'+noteStatusOutput+'" class="alert alert-info">'+this.lang.output.noSelection+"</div>");setTimeout((function(){external_jQuery_default()("#note-status-output-"+noteStatusOutput).remove()}),5e3)}}},{key:"unlink",value:function unlink(){var rng=this.getLastRange();if(rng.isOnAnchor()){var anchor=dom.ancestor(rng.sc,dom.isAnchor);rng=range.createFromNode(anchor);rng.select();this.setLastRange();this.beforeCommand();document.execCommand("unlink");this.afterCommand()}}},{key:"getLinkInfo",value:function getLinkInfo(){var rng=this.getLastRange().expand(dom.isAnchor);var $anchor=external_jQuery_default()(lists.head(rng.nodes(dom.isAnchor)));var linkInfo={range:rng,text:rng.toString(),url:$anchor.length?$anchor.attr("href"):""};if($anchor.length){linkInfo.isNewWindow=$anchor.attr("target")==="_blank"}return linkInfo}},{key:"addRow",value:function addRow(position){var rng=this.getLastRange(this.$editable);if(rng.isCollapsed()&&rng.isOnCell()){this.beforeCommand();this.table.addRow(rng,position);this.afterCommand()}}},{key:"addCol",value:function addCol(position){var rng=this.getLastRange(this.$editable);if(rng.isCollapsed()&&rng.isOnCell()){this.beforeCommand();this.table.addCol(rng,position);this.afterCommand()}}},{key:"deleteRow",value:function deleteRow(){var rng=this.getLastRange(this.$editable);if(rng.isCollapsed()&&rng.isOnCell()){this.beforeCommand();this.table.deleteRow(rng);this.afterCommand()}}},{key:"deleteCol",value:function deleteCol(){var rng=this.getLastRange(this.$editable);if(rng.isCollapsed()&&rng.isOnCell()){this.beforeCommand();this.table.deleteCol(rng);this.afterCommand()}}},{key:"deleteTable",value:function deleteTable(){var rng=this.getLastRange(this.$editable);if(rng.isCollapsed()&&rng.isOnCell()){this.beforeCommand();this.table.deleteTable(rng);this.afterCommand()}}},{key:"resizeTo",value:function resizeTo(pos,$target,bKeepRatio){var imageSize;if(bKeepRatio){var newRatio=pos.y/pos.x;var ratio=$target.data("ratio");imageSize={width:ratio>newRatio?pos.x:pos.y/ratio,height:ratio>newRatio?pos.x*ratio:pos.y}}else{imageSize={width:pos.x,height:pos.y}}$target.css(imageSize)}},{key:"hasFocus",value:function hasFocus(){return this.$editable.is(":focus")}},{key:"focus",value:function focus(){if(!this.hasFocus()){this.$editable.focus()}}},{key:"isEmpty",value:function isEmpty(){return dom.isEmpty(this.$editable[0])||dom.emptyPara===this.$editable.html()}},{key:"empty",value:function empty(){this.context.invoke("code",dom.emptyPara)}},{key:"normalizeContent",value:function normalizeContent(){this.$editable[0].normalize()}}]);return Editor}();function Clipboard_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function Clipboard_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function Clipboard_createClass(Constructor,protoProps,staticProps){if(protoProps)Clipboard_defineProperties(Constructor.prototype,protoProps);if(staticProps)Clipboard_defineProperties(Constructor,staticProps);return Constructor}var Clipboard=function(){function Clipboard(context){Clipboard_classCallCheck(this,Clipboard);this.context=context;this.$editable=context.layoutInfo.editable}Clipboard_createClass(Clipboard,[{key:"initialize",value:function initialize(){this.$editable.on("paste",this.pasteByEvent.bind(this))}},{key:"pasteByEvent",value:function pasteByEvent(event){var _this=this;var clipboardData=event.originalEvent.clipboardData;if(clipboardData&&clipboardData.items&&clipboardData.items.length){var item=clipboardData.items.length>1?clipboardData.items[1]:lists.head(clipboardData.items);if(item.kind==="file"&&item.type.indexOf("image/")!==-1){this.context.invoke("editor.insertImagesOrCallback",[item.getAsFile()]);event.preventDefault()}else if(item.kind==="string"){if(this.context.invoke("editor.isLimited",clipboardData.getData("Text").length)){event.preventDefault()}}}else if(window.clipboardData){var text=window.clipboardData.getData("text");if(this.context.invoke("editor.isLimited",text.length)){event.preventDefault()}}setTimeout((function(){_this.context.invoke("editor.afterCommand")}),10)}}]);return Clipboard}();function Dropzone_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function Dropzone_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function Dropzone_createClass(Constructor,protoProps,staticProps){if(protoProps)Dropzone_defineProperties(Constructor.prototype,protoProps);if(staticProps)Dropzone_defineProperties(Constructor,staticProps);return Constructor}var Dropzone=function(){function Dropzone(context){Dropzone_classCallCheck(this,Dropzone);this.context=context;this.$eventListener=external_jQuery_default()(document);this.$editor=context.layoutInfo.editor;this.$editable=context.layoutInfo.editable;this.options=context.options;this.lang=this.options.langInfo;this.documentEventHandlers={};this.$dropzone=external_jQuery_default()(['<div class="note-dropzone">','<div class="note-dropzone-message"></div>',"</div>"].join("")).prependTo(this.$editor)}Dropzone_createClass(Dropzone,[{key:"initialize",value:function initialize(){if(this.options.disableDragAndDrop){this.documentEventHandlers.onDrop=function(e){e.preventDefault()};this.$eventListener=this.$dropzone;this.$eventListener.on("drop",this.documentEventHandlers.onDrop)}else{this.attachDragAndDropEvent()}}},{key:"attachDragAndDropEvent",value:function attachDragAndDropEvent(){var _this=this;var collection=external_jQuery_default()();var $dropzoneMessage=this.$dropzone.find(".note-dropzone-message");this.documentEventHandlers.onDragenter=function(e){var isCodeview=_this.context.invoke("codeview.isActivated");var hasEditorSize=_this.$editor.width()>0&&_this.$editor.height()>0;if(!isCodeview&&!collection.length&&hasEditorSize){_this.$editor.addClass("dragover");_this.$dropzone.width(_this.$editor.width());_this.$dropzone.height(_this.$editor.height());$dropzoneMessage.text(_this.lang.image.dragImageHere)}collection=collection.add(e.target)};this.documentEventHandlers.onDragleave=function(e){collection=collection.not(e.target);if(!collection.length||e.target.nodeName==="BODY"){collection=external_jQuery_default()();_this.$editor.removeClass("dragover")}};this.documentEventHandlers.onDrop=function(){collection=external_jQuery_default()();_this.$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(){_this.$dropzone.addClass("hover");$dropzoneMessage.text(_this.lang.image.dropImage)})).on("dragleave",(function(){_this.$dropzone.removeClass("hover");$dropzoneMessage.text(_this.lang.image.dragImageHere)}));this.$dropzone.on("drop",(function(event){var dataTransfer=event.originalEvent.dataTransfer;event.preventDefault();if(dataTransfer&&dataTransfer.files&&dataTransfer.files.length){_this.$editable.focus();_this.context.invoke("editor.insertImagesOrCallback",dataTransfer.files)}else{external_jQuery_default().each(dataTransfer.types,(function(idx,type){if(type.toLowerCase().indexOf("_moz_")>-1){return}var content=dataTransfer.getData(type);if(type.toLowerCase().indexOf("text")>-1){_this.context.invoke("editor.pasteHTML",content)}else{external_jQuery_default()(content).each((function(idx,item){_this.context.invoke("editor.insertNode",item)}))}}))}})).on("dragover",false)}},{key:"destroy",value:function destroy(){var _this2=this;Object.keys(this.documentEventHandlers).forEach((function(key){_this2.$eventListener.off(key.substr(2).toLowerCase(),_this2.documentEventHandlers[key])}));this.documentEventHandlers={}}}]);return Dropzone}();function _createForOfIteratorHelper(o,allowArrayLike){var it=typeof Symbol!=="undefined"&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=_unsupportedIterableToArray(o))||allowArrayLike&&o&&typeof o.length==="number"){if(it)o=it;var i=0;var F=function F(){};return{s:F,n:function n(){if(i>=o.length)return{done:true};return{done:false,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var normalCompletion=true,didErr=false,err;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();normalCompletion=step.done;return step},e:function e(_e2){didErr=true;err=_e2},f:function f(){try{if(!normalCompletion&&it["return"]!=null)it["return"]()}finally{if(didErr)throw err}}}}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++){arr2[i]=arr[i]}return arr2}function Codeview_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function Codeview_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function Codeview_createClass(Constructor,protoProps,staticProps){if(protoProps)Codeview_defineProperties(Constructor.prototype,protoProps);if(staticProps)Codeview_defineProperties(Constructor,staticProps);return Constructor}var CodeView=function(){function CodeView(context){Codeview_classCallCheck(this,CodeView);this.context=context;this.$editor=context.layoutInfo.editor;this.$editable=context.layoutInfo.editable;this.$codable=context.layoutInfo.codable;this.options=context.options;this.CodeMirrorConstructor=window.CodeMirror;if(this.options.codemirror.CodeMirrorConstructor){this.CodeMirrorConstructor=this.options.codemirror.CodeMirrorConstructor}}Codeview_createClass(CodeView,[{key:"sync",value:function sync(html){var isCodeview=this.isActivated();var CodeMirror=this.CodeMirrorConstructor;if(isCodeview){if(html){if(CodeMirror){this.$codable.data("cmEditor").getDoc().setValue(html)}else{this.$codable.val(html)}}else{if(CodeMirror){this.$codable.data("cmEditor").save()}}}}},{key:"initialize",value:function initialize(){var _this=this;this.$codable.on("keyup",(function(event){if(event.keyCode===key.code.ESCAPE){_this.deactivate()}}))}},{key:"isActivated",value:function isActivated(){return this.$editor.hasClass("codeview")}},{key:"toggle",value:function toggle(){if(this.isActivated()){this.deactivate()}else{this.activate()}this.context.triggerEvent("codeview.toggled")}},{key:"purify",value:function purify(value){if(this.options.codeviewFilter){value=value.replace(this.options.codeviewFilterRegex,"");if(this.options.codeviewIframeFilter){var whitelist=this.options.codeviewIframeWhitelistSrc.concat(this.options.codeviewIframeWhitelistSrcBase);value=value.replace(/(<iframe.*?>.*?(?:<\/iframe>)?)/gi,(function(tag){if(/<.+src(?==?('|"|\s)?)[\s\S]+src(?=('|"|\s)?)[^>]*?>/i.test(tag)){return""}var _iterator=_createForOfIteratorHelper(whitelist),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var src=_step.value;if(new RegExp('src="(https?:)?//'+src.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+'/(.+)"').test(tag)){return tag}}}catch(err){_iterator.e(err)}finally{_iterator.f()}return""}))}}return value}},{key:"activate",value:function activate(){var _this2=this;var CodeMirror=this.CodeMirrorConstructor;this.$codable.val(dom.html(this.$editable,this.options.prettifyHtml));this.$codable.height(this.$editable.height());this.context.invoke("toolbar.updateCodeview",true);this.context.invoke("airPopover.updateCodeview",true);this.$editor.addClass("codeview");this.$codable.focus();if(CodeMirror){var cmEditor=CodeMirror.fromTextArea(this.$codable[0],this.options.codemirror);if(this.options.codemirror.tern){var server=new CodeMirror.TernServer(this.options.codemirror.tern);cmEditor.ternServer=server;cmEditor.on("cursorActivity",(function(cm){server.updateArgHints(cm)}))}cmEditor.on("blur",(function(event){_this2.context.triggerEvent("blur.codeview",cmEditor.getValue(),event)}));cmEditor.on("change",(function(){_this2.context.triggerEvent("change.codeview",cmEditor.getValue(),cmEditor)}));cmEditor.setSize(null,this.$editable.outerHeight());this.$codable.data("cmEditor",cmEditor)}else{this.$codable.on("blur",(function(event){_this2.context.triggerEvent("blur.codeview",_this2.$codable.val(),event)}));this.$codable.on("input",(function(){_this2.context.triggerEvent("change.codeview",_this2.$codable.val(),_this2.$codable)}))}}},{key:"deactivate",value:function deactivate(){var CodeMirror=this.CodeMirrorConstructor;if(CodeMirror){var cmEditor=this.$codable.data("cmEditor");this.$codable.val(cmEditor.getValue());cmEditor.toTextArea()}var value=this.purify(dom.value(this.$codable,this.options.prettifyHtml)||dom.emptyPara);var isChange=this.$editable.html()!==value;this.$editable.html(value);this.$editable.height(this.options.height?this.$codable.height():"auto");this.$editor.removeClass("codeview");if(isChange){this.context.triggerEvent("change",this.$editable.html(),this.$editable)}this.$editable.focus();this.context.invoke("toolbar.updateCodeview",false);this.context.invoke("airPopover.updateCodeview",false)}},{key:"destroy",value:function destroy(){if(this.isActivated()){this.deactivate()}}}]);return CodeView}();function Statusbar_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function Statusbar_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function Statusbar_createClass(Constructor,protoProps,staticProps){if(protoProps)Statusbar_defineProperties(Constructor.prototype,protoProps);if(staticProps)Statusbar_defineProperties(Constructor,staticProps);return Constructor}var EDITABLE_PADDING=24;var Statusbar=function(){function Statusbar(context){Statusbar_classCallCheck(this,Statusbar);this.$document=external_jQuery_default()(document);this.$statusbar=context.layoutInfo.statusbar;this.$editable=context.layoutInfo.editable;this.$codable=context.layoutInfo.codable;this.options=context.options}Statusbar_createClass(Statusbar,[{key:"initialize",value:function initialize(){var _this=this;if(this.options.airMode||this.options.disableResizeEditor){this.destroy();return}this.$statusbar.on("mousedown",(function(event){event.preventDefault();event.stopPropagation();var editableTop=_this.$editable.offset().top-_this.$document.scrollTop();var editableCodeTop=_this.$codable.offset().top-_this.$document.scrollTop();var onMouseMove=function onMouseMove(event){var height=event.clientY-(editableTop+EDITABLE_PADDING);var heightCode=event.clientY-(editableCodeTop+EDITABLE_PADDING);height=_this.options.minheight>0?Math.max(height,_this.options.minheight):height;height=_this.options.maxHeight>0?Math.min(height,_this.options.maxHeight):height;heightCode=_this.options.minheight>0?Math.max(heightCode,_this.options.minheight):heightCode;heightCode=_this.options.maxHeight>0?Math.min(heightCode,_this.options.maxHeight):heightCode;_this.$editable.height(height);_this.$codable.height(heightCode)};_this.$document.on("mousemove",onMouseMove).one("mouseup",(function(){_this.$document.off("mousemove",onMouseMove)}))}))}},{key:"destroy",value:function destroy(){this.$statusbar.off();this.$statusbar.addClass("locked")}}]);return Statusbar}();function Fullscreen_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function Fullscreen_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function Fullscreen_createClass(Constructor,protoProps,staticProps){if(protoProps)Fullscreen_defineProperties(Constructor.prototype,protoProps);if(staticProps)Fullscreen_defineProperties(Constructor,staticProps);return Constructor}var Fullscreen=function(){function Fullscreen(context){var _this=this;Fullscreen_classCallCheck(this,Fullscreen);this.context=context;this.$editor=context.layoutInfo.editor;this.$toolbar=context.layoutInfo.toolbar;this.$editable=context.layoutInfo.editable;this.$codable=context.layoutInfo.codable;this.$window=external_jQuery_default()(window);this.$scrollbar=external_jQuery_default()("html, body");this.scrollbarClassName="note-fullscreen-body";this.onResize=function(){_this.resizeTo({h:_this.$window.height()-_this.$toolbar.outerHeight()})}}Fullscreen_createClass(Fullscreen,[{key:"resizeTo",value:function resizeTo(size){this.$editable.css("height",size.h);this.$codable.css("height",size.h);if(this.$codable.data("cmeditor")){this.$codable.data("cmeditor").setsize(null,size.h)}}},{key:"toggle",value:function toggle(){this.$editor.toggleClass("fullscreen");var isFullscreen=this.isFullscreen();this.$scrollbar.toggleClass(this.scrollbarClassName,isFullscreen);if(isFullscreen){this.$editable.data("orgHeight",this.$editable.css("height"));this.$editable.data("orgMaxHeight",this.$editable.css("maxHeight"));this.$editable.css("maxHeight","");this.$window.on("resize",this.onResize).trigger("resize")}else{this.$window.off("resize",this.onResize);this.resizeTo({h:this.$editable.data("orgHeight")});this.$editable.css("maxHeight",this.$editable.css("orgMaxHeight"))}this.context.invoke("toolbar.updateFullscreen",isFullscreen)}},{key:"isFullscreen",value:function isFullscreen(){return this.$editor.hasClass("fullscreen")}},{key:"destroy",value:function destroy(){this.$scrollbar.removeClass(this.scrollbarClassName)}}]);return Fullscreen}();function Handle_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function Handle_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function Handle_createClass(Constructor,protoProps,staticProps){if(protoProps)Handle_defineProperties(Constructor.prototype,protoProps);if(staticProps)Handle_defineProperties(Constructor,staticProps);return Constructor}var Handle=function(){function Handle(context){var _this=this;Handle_classCallCheck(this,Handle);this.context=context;this.$document=external_jQuery_default()(document);this.$editingArea=context.layoutInfo.editingArea;this.options=context.options;this.lang=this.options.langInfo;this.events={"summernote.mousedown":function summernoteMousedown(we,e){if(_this.update(e.target,e)){e.preventDefault()}},"summernote.keyup summernote.scroll summernote.change summernote.dialog.shown":function summernoteKeyupSummernoteScrollSummernoteChangeSummernoteDialogShown(){_this.update()},"summernote.disable summernote.blur":function summernoteDisableSummernoteBlur(){_this.hide()},"summernote.codeview.toggled":function summernoteCodeviewToggled(){_this.update()}}}Handle_createClass(Handle,[{key:"initialize",value:function initialize(){var _this2=this;this.$handle=external_jQuery_default()(['<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(event){if(dom.isControlSizing(event.target)){event.preventDefault();event.stopPropagation();var $target=_this2.$handle.find(".note-control-selection").data("target");var posStart=$target.offset();var scrollTop=_this2.$document.scrollTop();var onMouseMove=function onMouseMove(event){_this2.context.invoke("editor.resizeTo",{x:event.clientX-posStart.left,y:event.clientY-(posStart.top-scrollTop)},$target,!event.shiftKey);_this2.update($target[0],event)};_this2.$document.on("mousemove",onMouseMove).one("mouseup",(function(e){e.preventDefault();_this2.$document.off("mousemove",onMouseMove);_this2.context.invoke("editor.afterCommand")}));if(!$target.data("ratio")){$target.data("ratio",$target.height()/$target.width())}}}));this.$handle.on("wheel",(function(e){e.preventDefault();_this2.update()}))}},{key:"destroy",value:function destroy(){this.$handle.remove()}},{key:"update",value:function update(target,event){if(this.context.isDisabled()){return false}var isImage=dom.isImg(target);var $selection=this.$handle.find(".note-control-selection");this.context.invoke("imagePopover.update",target,event);if(isImage){var $image=external_jQuery_default()(target);var position=$image.position();var pos={left:position.left+parseInt($image.css("marginLeft"),10),top:position.top+parseInt($image.css("marginTop"),10)};var imageSize={w:$image.outerWidth(false),h:$image.outerHeight(false)};$selection.css({display:"block",left:pos.left,top:pos.top,width:imageSize.w,height:imageSize.h}).data("target",$image);var origImageObj=new Image;origImageObj.src=$image.attr("src");var sizingText=imageSize.w+"x"+imageSize.h+" ("+this.lang.image.original+": "+origImageObj.width+"x"+origImageObj.height+")";$selection.find(".note-control-selection-info").text(sizingText);this.context.invoke("editor.saveTarget",target)}else{this.hide()}return isImage}},{key:"hide",value:function hide(){this.context.invoke("editor.clearTarget");this.$handle.children().hide()}}]);return Handle}();function AutoLink_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function AutoLink_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function AutoLink_createClass(Constructor,protoProps,staticProps){if(protoProps)AutoLink_defineProperties(Constructor.prototype,protoProps);if(staticProps)AutoLink_defineProperties(Constructor,staticProps);return Constructor}var defaultScheme="http://";var linkPattern=/^([A-Za-z][A-Za-z0-9+-.]*\:[\/]{2}|tel:|mailto:[A-Z0-9._%+-]+@|xmpp:[A-Z0-9._%+-]+@)?(www\.)?(.+)$/i;var AutoLink=function(){function AutoLink(context){var _this=this;AutoLink_classCallCheck(this,AutoLink);this.context=context;this.options=context.options;this.events={"summernote.keyup":function summernoteKeyup(we,e){if(!e.isDefaultPrevented()){_this.handleKeyup(e)}},"summernote.keydown":function summernoteKeydown(we,e){_this.handleKeydown(e)}}}AutoLink_createClass(AutoLink,[{key:"initialize",value:function initialize(){this.lastWordRange=null}},{key:"destroy",value:function destroy(){this.lastWordRange=null}},{key:"replace",value:function replace(){if(!this.lastWordRange){return}var keyword=this.lastWordRange.toString();var match=keyword.match(linkPattern);if(match&&(match[1]||match[2])){var link=match[1]?keyword:defaultScheme+keyword;var urlText=this.options.showDomainOnlyForAutolink?keyword.replace(/^(?:https?:\/\/)?(?:tel?:?)?(?:mailto?:?)?(?:xmpp?:?)?(?:www\.)?/i,"").split("/")[0]:keyword;var node=external_jQuery_default()("<a></a>").html(urlText).attr("href",link)[0];if(this.context.options.linkTargetBlank){external_jQuery_default()(node).attr("target","_blank")}this.lastWordRange.insertNode(node);this.lastWordRange=null;this.context.invoke("editor.focus")}}},{key:"handleKeydown",value:function handleKeydown(e){if(lists.contains([key.code.ENTER,key.code.SPACE],e.keyCode)){var wordRange=this.context.invoke("editor.createRange").getWordRange();this.lastWordRange=wordRange}}},{key:"handleKeyup",value:function handleKeyup(e){if(lists.contains([key.code.ENTER,key.code.SPACE],e.keyCode)){this.replace()}}}]);return AutoLink}();function AutoSync_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function AutoSync_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function AutoSync_createClass(Constructor,protoProps,staticProps){if(protoProps)AutoSync_defineProperties(Constructor.prototype,protoProps);if(staticProps)AutoSync_defineProperties(Constructor,staticProps);return Constructor}var AutoSync=function(){function AutoSync(context){var _this=this;AutoSync_classCallCheck(this,AutoSync);this.$note=context.layoutInfo.note;this.events={"summernote.change":function summernoteChange(){_this.$note.val(context.invoke("code"))}}}AutoSync_createClass(AutoSync,[{key:"shouldInitialize",value:function shouldInitialize(){return dom.isTextarea(this.$note[0])}}]);return AutoSync}();function AutoReplace_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function AutoReplace_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function AutoReplace_createClass(Constructor,protoProps,staticProps){if(protoProps)AutoReplace_defineProperties(Constructor.prototype,protoProps);if(staticProps)AutoReplace_defineProperties(Constructor,staticProps);return Constructor}var AutoReplace=function(){function AutoReplace(context){var _this=this;AutoReplace_classCallCheck(this,AutoReplace);this.context=context;this.options=context.options.replace||{};this.keys=[key.code.ENTER,key.code.SPACE,key.code.PERIOD,key.code.COMMA,key.code.SEMICOLON,key.code.SLASH];this.previousKeydownCode=null;this.events={"summernote.keyup":function summernoteKeyup(we,e){if(!e.isDefaultPrevented()){_this.handleKeyup(e)}},"summernote.keydown":function summernoteKeydown(we,e){_this.handleKeydown(e)}}}AutoReplace_createClass(AutoReplace,[{key:"shouldInitialize",value:function shouldInitialize(){return!!this.options.match}},{key:"initialize",value:function initialize(){this.lastWord=null}},{key:"destroy",value:function destroy(){this.lastWord=null}},{key:"replace",value:function replace(){if(!this.lastWord){return}var self=this;var keyword=this.lastWord.toString();this.options.match(keyword,(function(match){if(match){var node="";if(typeof match==="string"){node=dom.createText(match)}else if(match instanceof jQuery){node=match[0]}else if(match instanceof Node){node=match}if(!node)return;self.lastWord.insertNode(node);self.lastWord=null;self.context.invoke("editor.focus")}}))}},{key:"handleKeydown",value:function handleKeydown(e){if(this.previousKeydownCode&&lists.contains(this.keys,this.previousKeydownCode)){this.previousKeydownCode=e.keyCode;return}if(lists.contains(this.keys,e.keyCode)){var wordRange=this.context.invoke("editor.createRange").getWordRange();this.lastWord=wordRange}this.previousKeydownCode=e.keyCode}},{key:"handleKeyup",value:function handleKeyup(e){if(lists.contains(this.keys,e.keyCode)){this.replace()}}}]);return AutoReplace}();function Placeholder_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function Placeholder_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function Placeholder_createClass(Constructor,protoProps,staticProps){if(protoProps)Placeholder_defineProperties(Constructor.prototype,protoProps);if(staticProps)Placeholder_defineProperties(Constructor,staticProps);return Constructor}var Placeholder=function(){function Placeholder(context){var _this=this;Placeholder_classCallCheck(this,Placeholder);this.context=context;this.$editingArea=context.layoutInfo.editingArea;this.options=context.options;if(this.options.inheritPlaceholder===true){this.options.placeholder=this.context.$note.attr("placeholder")||this.options.placeholder}this.events={"summernote.init summernote.change":function summernoteInitSummernoteChange(){_this.update()},"summernote.codeview.toggled":function summernoteCodeviewToggled(){_this.update()}}}Placeholder_createClass(Placeholder,[{key:"shouldInitialize",value:function shouldInitialize(){return!!this.options.placeholder}},{key:"initialize",value:function initialize(){var _this2=this;this.$placeholder=external_jQuery_default()('<div class="note-placeholder"></div>');this.$placeholder.on("click",(function(){_this2.context.invoke("focus")})).html(this.options.placeholder).prependTo(this.$editingArea);this.update()}},{key:"destroy",value:function destroy(){this.$placeholder.remove()}},{key:"update",value:function update(){var isShow=!this.context.invoke("codeview.isActivated")&&this.context.invoke("editor.isEmpty");this.$placeholder.toggle(isShow)}}]);return Placeholder}();function Buttons_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function Buttons_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function Buttons_createClass(Constructor,protoProps,staticProps){if(protoProps)Buttons_defineProperties(Constructor.prototype,protoProps);if(staticProps)Buttons_defineProperties(Constructor,staticProps);return Constructor}var Buttons=function(){function Buttons(context){Buttons_classCallCheck(this,Buttons);this.ui=external_jQuery_default().summernote.ui;this.context=context;this.$toolbar=context.layoutInfo.toolbar;this.options=context.options;this.lang=this.options.langInfo;this.invertedKeyMap=func.invertObject(this.options.keyMap[env.isMac?"mac":"pc"])}Buttons_createClass(Buttons,[{key:"representShortcut",value:function representShortcut(editorMethod){var shortcut=this.invertedKeyMap[editorMethod];if(!this.options.shortcuts||!shortcut){return""}if(env.isMac){shortcut=shortcut.replace("CMD","\u2318").replace("SHIFT","\u21e7")}shortcut=shortcut.replace("BACKSLASH","\\").replace("SLASH","/").replace("LEFTBRACKET","[").replace("RIGHTBRACKET","]");return" ("+shortcut+")"}},{key:"button",value:function button(o){if(!this.options.tooltip&&o.tooltip){delete o.tooltip}o.container=this.options.container;return this.ui.button(o)}},{key:"initialize",value:function initialize(){this.addToolbarButtons();this.addImagePopoverButtons();this.addLinkPopoverButtons();this.addTablePopoverButtons();this.fontInstalledMap={}}},{key:"destroy",value:function destroy(){delete this.fontInstalledMap}},{key:"isFontInstalled",value:function isFontInstalled(name){if(!Object.prototype.hasOwnProperty.call(this.fontInstalledMap,name)){this.fontInstalledMap[name]=env.isFontInstalled(name)||lists.contains(this.options.fontNamesIgnoreCheck,name)}return this.fontInstalledMap[name]}},{key:"isFontDeservedToAdd",value:function isFontDeservedToAdd(name){name=name.toLowerCase();return name!==""&&this.isFontInstalled(name)&&env.genericFontFamilies.indexOf(name)===-1}},{key:"colorPalette",value:function colorPalette(className,tooltip,backColor,foreColor){var _this=this;return this.ui.buttonGroup({className:"note-color "+className,children:[this.button({className:"note-current-color-button",contents:this.ui.icon(this.options.icons.font+" note-recent-color"),tooltip:tooltip,click:function click(e){var $button=external_jQuery_default()(e.currentTarget);if(backColor&&foreColor){_this.context.invoke("editor.color",{backColor:$button.attr("data-backColor"),foreColor:$button.attr("data-foreColor")})}else if(backColor){_this.context.invoke("editor.color",{backColor:$button.attr("data-backColor")})}else if(foreColor){_this.context.invoke("editor.color",{foreColor:$button.attr("data-foreColor")})}},callback:function callback($button){var $recentColor=$button.find(".note-recent-color");if(backColor){$recentColor.css("background-color",_this.options.colorButton.backColor);$button.attr("data-backColor",_this.options.colorButton.backColor)}if(foreColor){$recentColor.css("color",_this.options.colorButton.foreColor);$button.attr("data-foreColor",_this.options.colorButton.foreColor)}else{$recentColor.css("color","transparent")}}}),this.button({className:"dropdown-toggle",contents:this.ui.dropdownButtonContents("",this.options),tooltip:this.lang.color.more,data:{toggle:"dropdown"}}),this.ui.dropdown({items:(backColor?['<div class="note-palette">','<div class="note-palette-title">'+this.lang.color.background+"</div>","<div>",'<button type="button" class="note-color-reset btn btn-light btn-default" data-event="backColor" data-value="transparent">',this.lang.color.transparent,"</button>","</div>",'<div class="note-holder" data-event="backColor">\x3c!-- back colors --\x3e</div>',"<div>",'<button type="button" class="note-color-select btn btn-light btn-default" data-event="openPalette" data-value="backColorPicker-'+this.options.id+'">',this.lang.color.cpSelect,"</button>",'<input type="color" id="backColorPicker-'+this.options.id+'" class="note-btn note-color-select-btn" value="'+this.options.colorButton.backColor+'" data-event="backColorPalette-'+this.options.id+'">',"</div>",'<div class="note-holder-custom" id="backColorPalette-'+this.options.id+'" data-event="backColor"></div>',"</div>"].join(""):"")+(foreColor?['<div class="note-palette">','<div class="note-palette-title">'+this.lang.color.foreground+"</div>","<div>",'<button type="button" class="note-color-reset btn btn-light btn-default" data-event="removeFormat" data-value="foreColor">',this.lang.color.resetToDefault,"</button>","</div>",'<div class="note-holder" data-event="foreColor">\x3c!-- fore colors --\x3e</div>',"<div>",'<button type="button" class="note-color-select btn btn-light btn-default" data-event="openPalette" data-value="foreColorPicker-'+this.options.id+'">',this.lang.color.cpSelect,"</button>",'<input type="color" id="foreColorPicker-'+this.options.id+'" class="note-btn note-color-select-btn" value="'+this.options.colorButton.foreColor+'" data-event="foreColorPalette-'+this.options.id+'">',"</div>",'<div class="note-holder-custom" id="foreColorPalette-'+this.options.id+'" data-event="foreColor"></div>',"</div>"].join(""):""),callback:function callback($dropdown){$dropdown.find(".note-holder").each((function(idx,item){var $holder=external_jQuery_default()(item);$holder.append(_this.ui.palette({colors:_this.options.colors,colorsName:_this.options.colorsName,eventName:$holder.data("event"),container:_this.options.container,tooltip:_this.options.tooltip}).render())}));var customColors=[["#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF"]];$dropdown.find(".note-holder-custom").each((function(idx,item){var $holder=external_jQuery_default()(item);$holder.append(_this.ui.palette({colors:customColors,colorsName:customColors,eventName:$holder.data("event"),container:_this.options.container,tooltip:_this.options.tooltip}).render())}));$dropdown.find("input[type=color]").each((function(idx,item){external_jQuery_default()(item).change((function(){var $chip=$dropdown.find("#"+external_jQuery_default()(this).data("event")).find(".note-color-btn").first();var color=this.value.toUpperCase();$chip.css("background-color",color).attr("aria-label",color).attr("data-value",color).attr("data-original-title",color);$chip.click()}))}))},click:function click(event){event.stopPropagation();var $parent=external_jQuery_default()("."+className).find(".note-dropdown-menu");var $button=external_jQuery_default()(event.target);var eventName=$button.data("event");var value=$button.attr("data-value");if(eventName==="openPalette"){var $picker=$parent.find("#"+value);var $palette=external_jQuery_default()($parent.find("#"+$picker.data("event")).find(".note-color-row")[0]);var $chip=$palette.find(".note-color-btn").last().detach();var color=$picker.val();$chip.css("background-color",color).attr("aria-label",color).attr("data-value",color).attr("data-original-title",color);$palette.prepend($chip);$picker.click()}else{if(lists.contains(["backColor","foreColor"],eventName)){var key=eventName==="backColor"?"background-color":"color";var $color=$button.closest(".note-color").find(".note-recent-color");var $currentButton=$button.closest(".note-color").find(".note-current-color-button");$color.css(key,value);$currentButton.attr("data-"+eventName,value)}_this.context.invoke("editor."+eventName,value)}}})]}).render()}},{key:"addToolbarButtons",value:function addToolbarButtons(){var _this2=this;this.context.memo("button.style",(function(){return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents(_this2.ui.icon(_this2.options.icons.magic),_this2.options),tooltip:_this2.lang.style.style,data:{toggle:"dropdown"}}),_this2.ui.dropdown({className:"dropdown-style",items:_this2.options.styleTags,title:_this2.lang.style.style,template:function template(item){if(typeof item==="string"){item={tag:item,title:Object.prototype.hasOwnProperty.call(_this2.lang.style,item)?_this2.lang.style[item]:item}}var tag=item.tag;var title=item.title;var style=item.style?' style="'+item.style+'" ':"";var className=item.className?' class="'+item.className+'"':"";return"<"+tag+style+className+">"+title+"</"+tag+">"},click:_this2.context.createInvokeHandler("editor.formatBlock")})]).render()}));var _loop=function _loop(styleIdx,styleLen){var item=_this2.options.styleTags[styleIdx];_this2.context.memo("button.style."+item,(function(){return _this2.button({className:"note-btn-style-"+item,contents:'<div data-value="'+item+'">'+item.toUpperCase()+"</div>",tooltip:_this2.lang.style[item],click:_this2.context.createInvokeHandler("editor.formatBlock")}).render()}))};for(var styleIdx=0,styleLen=this.options.styleTags.length;styleIdx<styleLen;styleIdx++){_loop(styleIdx,styleLen)}this.context.memo("button.bold",(function(){return _this2.button({className:"note-btn-bold",contents:_this2.ui.icon(_this2.options.icons.bold),tooltip:_this2.lang.font.bold+_this2.representShortcut("bold"),click:_this2.context.createInvokeHandlerAndUpdateState("editor.bold")}).render()}));this.context.memo("button.italic",(function(){return _this2.button({className:"note-btn-italic",contents:_this2.ui.icon(_this2.options.icons.italic),tooltip:_this2.lang.font.italic+_this2.representShortcut("italic"),click:_this2.context.createInvokeHandlerAndUpdateState("editor.italic")}).render()}));this.context.memo("button.underline",(function(){return _this2.button({className:"note-btn-underline",contents:_this2.ui.icon(_this2.options.icons.underline),tooltip:_this2.lang.font.underline+_this2.representShortcut("underline"),click:_this2.context.createInvokeHandlerAndUpdateState("editor.underline")}).render()}));this.context.memo("button.clear",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.eraser),tooltip:_this2.lang.font.clear+_this2.representShortcut("removeFormat"),click:_this2.context.createInvokeHandler("editor.removeFormat")}).render()}));this.context.memo("button.strikethrough",(function(){return _this2.button({className:"note-btn-strikethrough",contents:_this2.ui.icon(_this2.options.icons.strikethrough),tooltip:_this2.lang.font.strikethrough+_this2.representShortcut("strikethrough"),click:_this2.context.createInvokeHandlerAndUpdateState("editor.strikethrough")}).render()}));this.context.memo("button.superscript",(function(){return _this2.button({className:"note-btn-superscript",contents:_this2.ui.icon(_this2.options.icons.superscript),tooltip:_this2.lang.font.superscript,click:_this2.context.createInvokeHandlerAndUpdateState("editor.superscript")}).render()}));this.context.memo("button.subscript",(function(){return _this2.button({className:"note-btn-subscript",contents:_this2.ui.icon(_this2.options.icons.subscript),tooltip:_this2.lang.font.subscript,click:_this2.context.createInvokeHandlerAndUpdateState("editor.subscript")}).render()}));this.context.memo("button.fontname",(function(){var styleInfo=_this2.context.invoke("editor.currentStyle");if(_this2.options.addDefaultFonts){external_jQuery_default().each(styleInfo["font-family"].split(","),(function(idx,fontname){fontname=fontname.trim().replace(/['"]+/g,"");if(_this2.isFontDeservedToAdd(fontname)){if(_this2.options.fontNames.indexOf(fontname)===-1){_this2.options.fontNames.push(fontname)}}}))}return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents('<span class="note-current-fontname"></span>',_this2.options),tooltip:_this2.lang.font.name,data:{toggle:"dropdown"}}),_this2.ui.dropdownCheck({className:"dropdown-fontname",checkClassName:_this2.options.icons.menuCheck,items:_this2.options.fontNames.filter(_this2.isFontInstalled.bind(_this2)),title:_this2.lang.font.name,template:function template(item){return'<span style="font-family: '+env.validFontName(item)+'">'+item+"</span>"},click:_this2.context.createInvokeHandlerAndUpdateState("editor.fontName")})]).render()}));this.context.memo("button.fontsize",(function(){return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents('<span class="note-current-fontsize"></span>',_this2.options),tooltip:_this2.lang.font.size,data:{toggle:"dropdown"}}),_this2.ui.dropdownCheck({className:"dropdown-fontsize",checkClassName:_this2.options.icons.menuCheck,items:_this2.options.fontSizes,title:_this2.lang.font.size,click:_this2.context.createInvokeHandlerAndUpdateState("editor.fontSize")})]).render()}));this.context.memo("button.fontsizeunit",(function(){return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents('<span class="note-current-fontsizeunit"></span>',_this2.options),tooltip:_this2.lang.font.sizeunit,data:{toggle:"dropdown"}}),_this2.ui.dropdownCheck({className:"dropdown-fontsizeunit",checkClassName:_this2.options.icons.menuCheck,items:_this2.options.fontSizeUnits,title:_this2.lang.font.sizeunit,click:_this2.context.createInvokeHandlerAndUpdateState("editor.fontSizeUnit")})]).render()}));this.context.memo("button.color",(function(){return _this2.colorPalette("note-color-all",_this2.lang.color.recent,true,true)}));this.context.memo("button.forecolor",(function(){return _this2.colorPalette("note-color-fore",_this2.lang.color.foreground,false,true)}));this.context.memo("button.backcolor",(function(){return _this2.colorPalette("note-color-back",_this2.lang.color.background,true,false)}));this.context.memo("button.ul",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.unorderedlist),tooltip:_this2.lang.lists.unordered+_this2.representShortcut("insertUnorderedList"),click:_this2.context.createInvokeHandler("editor.insertUnorderedList")}).render()}));this.context.memo("button.ol",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.orderedlist),tooltip:_this2.lang.lists.ordered+_this2.representShortcut("insertOrderedList"),click:_this2.context.createInvokeHandler("editor.insertOrderedList")}).render()}));var justifyLeft=this.button({contents:this.ui.icon(this.options.icons.alignLeft),tooltip:this.lang.paragraph.left+this.representShortcut("justifyLeft"),click:this.context.createInvokeHandler("editor.justifyLeft")});var justifyCenter=this.button({contents:this.ui.icon(this.options.icons.alignCenter),tooltip:this.lang.paragraph.center+this.representShortcut("justifyCenter"),click:this.context.createInvokeHandler("editor.justifyCenter")});var justifyRight=this.button({contents:this.ui.icon(this.options.icons.alignRight),tooltip:this.lang.paragraph.right+this.representShortcut("justifyRight"),click:this.context.createInvokeHandler("editor.justifyRight")});var justifyFull=this.button({contents:this.ui.icon(this.options.icons.alignJustify),tooltip:this.lang.paragraph.justify+this.representShortcut("justifyFull"),click:this.context.createInvokeHandler("editor.justifyFull")});var outdent=this.button({contents:this.ui.icon(this.options.icons.outdent),tooltip:this.lang.paragraph.outdent+this.representShortcut("outdent"),click:this.context.createInvokeHandler("editor.outdent")});var indent=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",func.invoke(justifyLeft,"render"));this.context.memo("button.justifyCenter",func.invoke(justifyCenter,"render"));this.context.memo("button.justifyRight",func.invoke(justifyRight,"render"));this.context.memo("button.justifyFull",func.invoke(justifyFull,"render"));this.context.memo("button.outdent",func.invoke(outdent,"render"));this.context.memo("button.indent",func.invoke(indent,"render"));this.context.memo("button.paragraph",(function(){return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents(_this2.ui.icon(_this2.options.icons.alignLeft),_this2.options),tooltip:_this2.lang.paragraph.paragraph,data:{toggle:"dropdown"}}),_this2.ui.dropdown([_this2.ui.buttonGroup({className:"note-align",children:[justifyLeft,justifyCenter,justifyRight,justifyFull]}),_this2.ui.buttonGroup({className:"note-list",children:[outdent,indent]})])]).render()}));this.context.memo("button.height",(function(){return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents(_this2.ui.icon(_this2.options.icons.textHeight),_this2.options),tooltip:_this2.lang.font.height,data:{toggle:"dropdown"}}),_this2.ui.dropdownCheck({items:_this2.options.lineHeights,checkClassName:_this2.options.icons.menuCheck,className:"dropdown-line-height",title:_this2.lang.font.height,click:_this2.context.createInvokeHandler("editor.lineHeight")})]).render()}));this.context.memo("button.table",(function(){return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents(_this2.ui.icon(_this2.options.icons.table),_this2.options),tooltip:_this2.lang.table.table,data:{toggle:"dropdown"}}),_this2.ui.dropdown({title:_this2.lang.table.table,className:"note-table",items:['<div class="note-dimension-picker">','<div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"></div>','<div class="note-dimension-picker-highlighted"></div>','<div class="note-dimension-picker-unhighlighted"></div>',"</div>",'<div class="note-dimension-display">1 x 1</div>'].join("")})],{callback:function callback($node){var $catcher=$node.find(".note-dimension-picker-mousecatcher");$catcher.css({width:_this2.options.insertTableMaxSize.col+"em",height:_this2.options.insertTableMaxSize.row+"em"}).mouseup(_this2.context.createInvokeHandler("editor.insertTable")).on("mousemove",_this2.tableMoveHandler.bind(_this2))}}).render()}));this.context.memo("button.link",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.link),tooltip:_this2.lang.link.link+_this2.representShortcut("linkDialog.show"),click:_this2.context.createInvokeHandler("linkDialog.show")}).render()}));this.context.memo("button.picture",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.picture),tooltip:_this2.lang.image.image,click:_this2.context.createInvokeHandler("imageDialog.show")}).render()}));this.context.memo("button.video",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.video),tooltip:_this2.lang.video.video,click:_this2.context.createInvokeHandler("videoDialog.show")}).render()}));this.context.memo("button.hr",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.minus),tooltip:_this2.lang.hr.insert+_this2.representShortcut("insertHorizontalRule"),click:_this2.context.createInvokeHandler("editor.insertHorizontalRule")}).render()}));this.context.memo("button.fullscreen",(function(){return _this2.button({className:"btn-fullscreen note-codeview-keep",contents:_this2.ui.icon(_this2.options.icons.arrowsAlt),tooltip:_this2.lang.options.fullscreen,click:_this2.context.createInvokeHandler("fullscreen.toggle")}).render()}));this.context.memo("button.codeview",(function(){return _this2.button({className:"btn-codeview note-codeview-keep",contents:_this2.ui.icon(_this2.options.icons.code),tooltip:_this2.lang.options.codeview,click:_this2.context.createInvokeHandler("codeview.toggle")}).render()}));this.context.memo("button.redo",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.redo),tooltip:_this2.lang.history.redo+_this2.representShortcut("redo"),click:_this2.context.createInvokeHandler("editor.redo")}).render()}));this.context.memo("button.undo",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.undo),tooltip:_this2.lang.history.undo+_this2.representShortcut("undo"),click:_this2.context.createInvokeHandler("editor.undo")}).render()}));this.context.memo("button.help",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.question),tooltip:_this2.lang.options.help,click:_this2.context.createInvokeHandler("helpDialog.show")}).render()}))}},{key:"addImagePopoverButtons",value:function addImagePopoverButtons(){var _this3=this;this.context.memo("button.resizeFull",(function(){return _this3.button({contents:'<span class="note-fontsize-10">100%</span>',tooltip:_this3.lang.image.resizeFull,click:_this3.context.createInvokeHandler("editor.resize","1")}).render()}));this.context.memo("button.resizeHalf",(function(){return _this3.button({contents:'<span class="note-fontsize-10">50%</span>',tooltip:_this3.lang.image.resizeHalf,click:_this3.context.createInvokeHandler("editor.resize","0.5")}).render()}));this.context.memo("button.resizeQuarter",(function(){return _this3.button({contents:'<span class="note-fontsize-10">25%</span>',tooltip:_this3.lang.image.resizeQuarter,click:_this3.context.createInvokeHandler("editor.resize","0.25")}).render()}));this.context.memo("button.resizeNone",(function(){return _this3.button({contents:_this3.ui.icon(_this3.options.icons.rollback),tooltip:_this3.lang.image.resizeNone,click:_this3.context.createInvokeHandler("editor.resize","0")}).render()}));this.context.memo("button.floatLeft",(function(){return _this3.button({contents:_this3.ui.icon(_this3.options.icons.floatLeft),tooltip:_this3.lang.image.floatLeft,click:_this3.context.createInvokeHandler("editor.floatMe","left")}).render()}));this.context.memo("button.floatRight",(function(){return _this3.button({contents:_this3.ui.icon(_this3.options.icons.floatRight),tooltip:_this3.lang.image.floatRight,click:_this3.context.createInvokeHandler("editor.floatMe","right")}).render()}));this.context.memo("button.floatNone",(function(){return _this3.button({contents:_this3.ui.icon(_this3.options.icons.rollback),tooltip:_this3.lang.image.floatNone,click:_this3.context.createInvokeHandler("editor.floatMe","none")}).render()}));this.context.memo("button.removeMedia",(function(){return _this3.button({contents:_this3.ui.icon(_this3.options.icons.trash),tooltip:_this3.lang.image.remove,click:_this3.context.createInvokeHandler("editor.removeMedia")}).render()}))}},{key:"addLinkPopoverButtons",value:function addLinkPopoverButtons(){var _this4=this;this.context.memo("button.linkDialogShow",(function(){return _this4.button({contents:_this4.ui.icon(_this4.options.icons.link),tooltip:_this4.lang.link.edit,click:_this4.context.createInvokeHandler("linkDialog.show")}).render()}));this.context.memo("button.unlink",(function(){return _this4.button({contents:_this4.ui.icon(_this4.options.icons.unlink),tooltip:_this4.lang.link.unlink,click:_this4.context.createInvokeHandler("editor.unlink")}).render()}))}},{key:"addTablePopoverButtons",value:function addTablePopoverButtons(){var _this5=this;this.context.memo("button.addRowUp",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.rowAbove),tooltip:_this5.lang.table.addRowAbove,click:_this5.context.createInvokeHandler("editor.addRow","top")}).render()}));this.context.memo("button.addRowDown",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.rowBelow),tooltip:_this5.lang.table.addRowBelow,click:_this5.context.createInvokeHandler("editor.addRow","bottom")}).render()}));this.context.memo("button.addColLeft",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.colBefore),tooltip:_this5.lang.table.addColLeft,click:_this5.context.createInvokeHandler("editor.addCol","left")}).render()}));this.context.memo("button.addColRight",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.colAfter),tooltip:_this5.lang.table.addColRight,click:_this5.context.createInvokeHandler("editor.addCol","right")}).render()}));this.context.memo("button.deleteRow",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.rowRemove),tooltip:_this5.lang.table.delRow,click:_this5.context.createInvokeHandler("editor.deleteRow")}).render()}));this.context.memo("button.deleteCol",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.colRemove),tooltip:_this5.lang.table.delCol,click:_this5.context.createInvokeHandler("editor.deleteCol")}).render()}));this.context.memo("button.deleteTable",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.trash),tooltip:_this5.lang.table.delTable,click:_this5.context.createInvokeHandler("editor.deleteTable")}).render()}))}},{key:"build",value:function build($container,groups){for(var groupIdx=0,groupLen=groups.length;groupIdx<groupLen;groupIdx++){var group=groups[groupIdx];var groupName=Array.isArray(group)?group[0]:group;var buttons=Array.isArray(group)?group.length===1?[group[0]]:group[1]:[group];var $group=this.ui.buttonGroup({className:"note-"+groupName}).render();for(var idx=0,len=buttons.length;idx<len;idx++){var btn=this.context.memo("button."+buttons[idx]);if(btn){$group.append(typeof btn==="function"?btn(this.context):btn)}}$group.appendTo($container)}}},{key:"updateCurrentStyle",value:function updateCurrentStyle($container){var $cont=$container||this.$toolbar;var styleInfo=this.context.invoke("editor.currentStyle");this.updateBtnStates($cont,{".note-btn-bold":function noteBtnBold(){return styleInfo["font-bold"]==="bold"},".note-btn-italic":function noteBtnItalic(){return styleInfo["font-italic"]==="italic"},".note-btn-underline":function noteBtnUnderline(){return styleInfo["font-underline"]==="underline"},".note-btn-subscript":function noteBtnSubscript(){return styleInfo["font-subscript"]==="subscript"},".note-btn-superscript":function noteBtnSuperscript(){return styleInfo["font-superscript"]==="superscript"},".note-btn-strikethrough":function noteBtnStrikethrough(){return styleInfo["font-strikethrough"]==="strikethrough"}});if(styleInfo["font-family"]){var fontNames=styleInfo["font-family"].split(",").map((function(name){return name.replace(/[\'\"]/g,"").replace(/\s+$/,"").replace(/^\s+/,"")}));var fontName=lists.find(fontNames,this.isFontInstalled.bind(this));$cont.find(".dropdown-fontname a").each((function(idx,item){var $item=external_jQuery_default()(item);var isChecked=$item.data("value")+""===fontName+"";$item.toggleClass("checked",isChecked)}));$cont.find(".note-current-fontname").text(fontName).css("font-family",fontName)}if(styleInfo["font-size"]){var fontSize=styleInfo["font-size"];$cont.find(".dropdown-fontsize a").each((function(idx,item){var $item=external_jQuery_default()(item);var isChecked=$item.data("value")+""===fontSize+"";$item.toggleClass("checked",isChecked)}));$cont.find(".note-current-fontsize").text(fontSize);var fontSizeUnit=styleInfo["font-size-unit"];$cont.find(".dropdown-fontsizeunit a").each((function(idx,item){var $item=external_jQuery_default()(item);var isChecked=$item.data("value")+""===fontSizeUnit+"";$item.toggleClass("checked",isChecked)}));$cont.find(".note-current-fontsizeunit").text(fontSizeUnit)}if(styleInfo["line-height"]){var lineHeight=styleInfo["line-height"];$cont.find(".dropdown-line-height a").each((function(idx,item){var $item=external_jQuery_default()(item);var isChecked=external_jQuery_default()(item).data("value")+""===lineHeight+"";$item.toggleClass("checked",isChecked)}));$cont.find(".note-current-line-height").text(lineHeight)}}},{key:"updateBtnStates",value:function updateBtnStates($container,infos){var _this6=this;external_jQuery_default().each(infos,(function(selector,pred){_this6.ui.toggleBtnActive($container.find(selector),pred())}))}},{key:"tableMoveHandler",value:function tableMoveHandler(event){var PX_PER_EM=18;var $picker=external_jQuery_default()(event.target.parentNode);var $dimensionDisplay=$picker.next();var $catcher=$picker.find(".note-dimension-picker-mousecatcher");var $highlighted=$picker.find(".note-dimension-picker-highlighted");var $unhighlighted=$picker.find(".note-dimension-picker-unhighlighted");var posOffset;if(event.offsetX===undefined){var posCatcher=external_jQuery_default()(event.target).offset();posOffset={x:event.pageX-posCatcher.left,y:event.pageY-posCatcher.top}}else{posOffset={x:event.offsetX,y:event.offsetY}}var dim={c:Math.ceil(posOffset.x/PX_PER_EM)||1,r:Math.ceil(posOffset.y/PX_PER_EM)||1};$highlighted.css({width:dim.c+"em",height:dim.r+"em"});$catcher.data("value",dim.c+"x"+dim.r);if(dim.c>3&&dim.c<this.options.insertTableMaxSize.col){$unhighlighted.css({width:dim.c+1+"em"})}if(dim.r>3&&dim.r<this.options.insertTableMaxSize.row){$unhighlighted.css({height:dim.r+1+"em"})}$dimensionDisplay.html(dim.c+" x "+dim.r)}}]);return Buttons}();function Toolbar_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function Toolbar_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function Toolbar_createClass(Constructor,protoProps,staticProps){if(protoProps)Toolbar_defineProperties(Constructor.prototype,protoProps);if(staticProps)Toolbar_defineProperties(Constructor,staticProps);return Constructor}var Toolbar=function(){function Toolbar(context){Toolbar_classCallCheck(this,Toolbar);this.context=context;this.$window=external_jQuery_default()(window);this.$document=external_jQuery_default()(document);this.ui=external_jQuery_default().summernote.ui;this.$note=context.layoutInfo.note;this.$editor=context.layoutInfo.editor;this.$toolbar=context.layoutInfo.toolbar;this.$editable=context.layoutInfo.editable;this.$statusbar=context.layoutInfo.statusbar;this.options=context.options;this.isFollowing=false;this.followScroll=this.followScroll.bind(this)}Toolbar_createClass(Toolbar,[{key:"shouldInitialize",value:function shouldInitialize(){return!this.options.airMode}},{key:"initialize",value:function initialize(){var _this=this;this.options.toolbar=this.options.toolbar||[];if(!this.options.toolbar.length){this.$toolbar.hide()}else{this.context.invoke("buttons.build",this.$toolbar,this.options.toolbar)}if(this.options.toolbarContainer){this.$toolbar.appendTo(this.options.toolbarContainer)}this.changeContainer(false);this.$note.on("summernote.keyup summernote.mouseup summernote.change",(function(){_this.context.invoke("buttons.updateCurrentStyle")}));this.context.invoke("buttons.updateCurrentStyle");if(this.options.followingToolbar){this.$window.on("scroll resize",this.followScroll)}}},{key:"destroy",value:function destroy(){this.$toolbar.children().remove();if(this.options.followingToolbar){this.$window.off("scroll resize",this.followScroll)}}},{key:"followScroll",value:function followScroll(){if(this.$editor.hasClass("fullscreen")){return false}var editorHeight=this.$editor.outerHeight();var editorWidth=this.$editor.width();var toolbarHeight=this.$toolbar.height();var statusbarHeight=this.$statusbar.height();var otherBarHeight=0;if(this.options.otherStaticBar){otherBarHeight=external_jQuery_default()(this.options.otherStaticBar).outerHeight()}var currentOffset=this.$document.scrollTop();var editorOffsetTop=this.$editor.offset().top;var editorOffsetBottom=editorOffsetTop+editorHeight;var activateOffset=editorOffsetTop-otherBarHeight;var deactivateOffsetBottom=editorOffsetBottom-otherBarHeight-toolbarHeight-statusbarHeight;if(!this.isFollowing&&currentOffset>activateOffset&&currentOffset<deactivateOffsetBottom-toolbarHeight){this.isFollowing=true;this.$editable.css({marginTop:this.$toolbar.outerHeight()});this.$toolbar.css({position:"fixed",top:otherBarHeight,width:editorWidth,zIndex:1e3})}else if(this.isFollowing&&(currentOffset<activateOffset||currentOffset>deactivateOffsetBottom)){this.isFollowing=false;this.$toolbar.css({position:"relative",top:0,width:"100%",zIndex:"auto"});this.$editable.css({marginTop:""})}}},{key:"changeContainer",value:function changeContainer(isFullscreen){if(isFullscreen){this.$toolbar.prependTo(this.$editor)}else{if(this.options.toolbarContainer){this.$toolbar.appendTo(this.options.toolbarContainer)}}if(this.options.followingToolbar){this.followScroll()}}},{key:"updateFullscreen",value:function updateFullscreen(isFullscreen){this.ui.toggleBtnActive(this.$toolbar.find(".btn-fullscreen"),isFullscreen);this.changeContainer(isFullscreen)}},{key:"updateCodeview",value:function updateCodeview(isCodeview){this.ui.toggleBtnActive(this.$toolbar.find(".btn-codeview"),isCodeview);if(isCodeview){this.deactivate()}else{this.activate()}}},{key:"activate",value:function activate(isIncludeCodeview){var $btn=this.$toolbar.find("button");if(!isIncludeCodeview){$btn=$btn.not(".note-codeview-keep")}this.ui.toggleBtn($btn,true)}},{key:"deactivate",value:function deactivate(isIncludeCodeview){var $btn=this.$toolbar.find("button");if(!isIncludeCodeview){$btn=$btn.not(".note-codeview-keep")}this.ui.toggleBtn($btn,false)}}]);return Toolbar}();function LinkDialog_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function LinkDialog_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function LinkDialog_createClass(Constructor,protoProps,staticProps){if(protoProps)LinkDialog_defineProperties(Constructor.prototype,protoProps);if(staticProps)LinkDialog_defineProperties(Constructor,staticProps);return Constructor}var LinkDialog=function(){function LinkDialog(context){LinkDialog_classCallCheck(this,LinkDialog);this.context=context;this.ui=external_jQuery_default().summernote.ui;this.$body=external_jQuery_default()(document.body);this.$editor=context.layoutInfo.editor;this.options=context.options;this.lang=this.options.langInfo;context.memo("help.linkDialog.show",this.options.langInfo.help["linkDialog.show"])}LinkDialog_createClass(LinkDialog,[{key:"initialize",value:function initialize(){var $container=this.options.dialogsInBody?this.$body:this.options.container;var body=['<div class="form-group note-form-group">','<label for="note-dialog-link-txt-'.concat(this.options.id,'" class="note-form-label">').concat(this.lang.link.textToDisplay,"</label>"),'<input id="note-dialog-link-txt-'.concat(this.options.id,'" class="note-link-text form-control note-form-control note-input" type="text"/>'),"</div>",'<div class="form-group note-form-group">','<label for="note-dialog-link-url-'.concat(this.options.id,'" class="note-form-label">').concat(this.lang.link.url,"</label>"),'<input id="note-dialog-link-url-'.concat(this.options.id,'" class="note-link-url form-control note-form-control note-input" type="text" value="http://"/>'),"</div>",!this.options.disableLinkTarget?external_jQuery_default()("<div></div>").append(this.ui.checkbox({className:"sn-checkbox-open-in-new-window",text:this.lang.link.openInNewWindow,checked:true}).render()).html():"",external_jQuery_default()("<div></div>").append(this.ui.checkbox({className:"sn-checkbox-use-protocol",text:this.lang.link.useProtocol,checked:true}).render()).html()].join("");var buttonClass="btn btn-primary note-btn note-btn-primary note-link-btn";var footer='<input type="button" href="#" class="'.concat(buttonClass,'" value="').concat(this.lang.link.insert,'" disabled>');this.$dialog=this.ui.dialog({className:"link-dialog",title:this.lang.link.insert,fade:this.options.dialogsFade,body:body,footer:footer}).render().appendTo($container)}},{key:"destroy",value:function destroy(){this.ui.hideDialog(this.$dialog);this.$dialog.remove()}},{key:"bindEnterKey",value:function bindEnterKey($input,$btn){$input.on("keypress",(function(event){if(event.keyCode===key.code.ENTER){event.preventDefault();$btn.trigger("click")}}))}},{key:"toggleLinkBtn",value:function toggleLinkBtn($linkBtn,$linkText,$linkUrl){this.ui.toggleBtn($linkBtn,$linkText.val()&&$linkUrl.val())}},{key:"showLinkDialog",value:function showLinkDialog(linkInfo){var _this=this;return external_jQuery_default().Deferred((function(deferred){var $linkText=_this.$dialog.find(".note-link-text");var $linkUrl=_this.$dialog.find(".note-link-url");var $linkBtn=_this.$dialog.find(".note-link-btn");var $openInNewWindow=_this.$dialog.find(".sn-checkbox-open-in-new-window input[type=checkbox]");var $useProtocol=_this.$dialog.find(".sn-checkbox-use-protocol input[type=checkbox]");_this.ui.onDialogShown(_this.$dialog,(function(){_this.context.triggerEvent("dialog.shown");if(!linkInfo.url&&func.isValidUrl(linkInfo.text)){linkInfo.url=linkInfo.text}$linkText.on("input paste propertychange",(function(){linkInfo.text=$linkText.val();_this.toggleLinkBtn($linkBtn,$linkText,$linkUrl)})).val(linkInfo.text);$linkUrl.on("input paste propertychange",(function(){if(!linkInfo.text){$linkText.val($linkUrl.val())}_this.toggleLinkBtn($linkBtn,$linkText,$linkUrl)})).val(linkInfo.url);if(!env.isSupportTouch){$linkUrl.trigger("focus")}_this.toggleLinkBtn($linkBtn,$linkText,$linkUrl);_this.bindEnterKey($linkUrl,$linkBtn);_this.bindEnterKey($linkText,$linkBtn);var isNewWindowChecked=linkInfo.isNewWindow!==undefined?linkInfo.isNewWindow:_this.context.options.linkTargetBlank;$openInNewWindow.prop("checked",isNewWindowChecked);var useProtocolChecked=linkInfo.url?false:_this.context.options.useProtocol;$useProtocol.prop("checked",useProtocolChecked);$linkBtn.one("click",(function(event){event.preventDefault();deferred.resolve({range:linkInfo.range,url:$linkUrl.val(),text:$linkText.val(),isNewWindow:$openInNewWindow.is(":checked"),checkProtocol:$useProtocol.is(":checked")});_this.ui.hideDialog(_this.$dialog)}))}));_this.ui.onDialogHidden(_this.$dialog,(function(){$linkText.off();$linkUrl.off();$linkBtn.off();if(deferred.state()==="pending"){deferred.reject()}}));_this.ui.showDialog(_this.$dialog)})).promise()}},{key:"show",value:function show(){var _this2=this;var linkInfo=this.context.invoke("editor.getLinkInfo");this.context.invoke("editor.saveRange");this.showLinkDialog(linkInfo).then((function(linkInfo){_this2.context.invoke("editor.restoreRange");_this2.context.invoke("editor.createLink",linkInfo)})).fail((function(){_this2.context.invoke("editor.restoreRange")}))}}]);return LinkDialog}();function LinkPopover_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function LinkPopover_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function LinkPopover_createClass(Constructor,protoProps,staticProps){if(protoProps)LinkPopover_defineProperties(Constructor.prototype,protoProps);if(staticProps)LinkPopover_defineProperties(Constructor,staticProps);return Constructor}var LinkPopover=function(){function LinkPopover(context){var _this=this;LinkPopover_classCallCheck(this,LinkPopover);this.context=context;this.ui=external_jQuery_default().summernote.ui;this.options=context.options;this.events={"summernote.keyup summernote.mouseup summernote.change summernote.scroll":function summernoteKeyupSummernoteMouseupSummernoteChangeSummernoteScroll(){_this.update()},"summernote.disable summernote.dialog.shown":function summernoteDisableSummernoteDialogShown(){_this.hide()},"summernote.blur":function summernoteBlur(we,e){if(e.originalEvent&&e.originalEvent.relatedTarget){if(!_this.$popover[0].contains(e.originalEvent.relatedTarget)){_this.hide()}}else{_this.hide()}}}}LinkPopover_createClass(LinkPopover,[{key:"shouldInitialize",value:function shouldInitialize(){return!lists.isEmpty(this.options.popover.link)}},{key:"initialize",value:function initialize(){this.$popover=this.ui.popover({className:"note-link-popover",callback:function callback($node){var $content=$node.find(".popover-content,.note-popover-content");$content.prepend('<span><a target="_blank"></a>&nbsp;</span>')}}).render().appendTo(this.options.container);var $content=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",$content,this.options.popover.link);this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function destroy(){this.$popover.remove()}},{key:"update",value:function update(){if(!this.context.invoke("editor.hasFocus")){this.hide();return}var rng=this.context.invoke("editor.getLastRange");if(rng.isCollapsed()&&rng.isOnAnchor()){var anchor=dom.ancestor(rng.sc,dom.isAnchor);var href=external_jQuery_default()(anchor).attr("href");this.$popover.find("a").attr("href",href).text(href);var pos=dom.posFromPlaceholder(anchor);var containerOffset=external_jQuery_default()(this.options.container).offset();pos.top-=containerOffset.top;pos.left-=containerOffset.left;this.$popover.css({display:"block",left:pos.left,top:pos.top})}else{this.hide()}}},{key:"hide",value:function hide(){this.$popover.hide()}}]);return LinkPopover}();function ImageDialog_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function ImageDialog_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function ImageDialog_createClass(Constructor,protoProps,staticProps){if(protoProps)ImageDialog_defineProperties(Constructor.prototype,protoProps);if(staticProps)ImageDialog_defineProperties(Constructor,staticProps);return Constructor}var ImageDialog=function(){function ImageDialog(context){ImageDialog_classCallCheck(this,ImageDialog);this.context=context;this.ui=external_jQuery_default().summernote.ui;this.$body=external_jQuery_default()(document.body);this.$editor=context.layoutInfo.editor;this.options=context.options;this.lang=this.options.langInfo}ImageDialog_createClass(ImageDialog,[{key:"initialize",value:function initialize(){var imageLimitation="";if(this.options.maximumImageFileSize){var unit=Math.floor(Math.log(this.options.maximumImageFileSize)/Math.log(1024));var readableSize=(this.options.maximumImageFileSize/Math.pow(1024,unit)).toFixed(2)*1+" "+" KMGTP"[unit]+"B";imageLimitation="<small>".concat(this.lang.image.maximumFileSize+" : "+readableSize,"</small>")}var $container=this.options.dialogsInBody?this.$body:this.options.container;var body=['<div class="form-group note-form-group note-group-select-from-files">','<label for="note-dialog-image-file-'+this.options.id+'" class="note-form-label">'+this.lang.image.selectFromFiles+"</label>",'<input id="note-dialog-image-file-'+this.options.id+'" class="note-image-input form-control-file note-form-control note-input" ',' type="file" name="files" accept="'+this.options.acceptImageFileTypes+'" multiple="multiple"/>',imageLimitation,"</div>",'<div class="form-group note-group-image-url">','<label for="note-dialog-image-url-'+this.options.id+'" class="note-form-label">'+this.lang.image.url+"</label>",'<input id="note-dialog-image-url-'+this.options.id+'" class="note-image-url form-control note-form-control note-input" type="text"/>',"</div>"].join("");var buttonClass="btn btn-primary note-btn note-btn-primary note-image-btn";var footer='<input type="button" href="#" class="'.concat(buttonClass,'" value="').concat(this.lang.image.insert,'" disabled>');this.$dialog=this.ui.dialog({title:this.lang.image.insert,fade:this.options.dialogsFade,body:body,footer:footer}).render().appendTo($container)}},{key:"destroy",value:function destroy(){this.ui.hideDialog(this.$dialog);this.$dialog.remove()}},{key:"bindEnterKey",value:function bindEnterKey($input,$btn){$input.on("keypress",(function(event){if(event.keyCode===key.code.ENTER){event.preventDefault();$btn.trigger("click")}}))}},{key:"show",value:function show(){var _this=this;this.context.invoke("editor.saveRange");this.showImageDialog().then((function(data){_this.ui.hideDialog(_this.$dialog);_this.context.invoke("editor.restoreRange");if(typeof data==="string"){if(_this.options.callbacks.onImageLinkInsert){_this.context.triggerEvent("image.link.insert",data)}else{_this.context.invoke("editor.insertImage",data)}}else{_this.context.invoke("editor.insertImagesOrCallback",data)}})).fail((function(){_this.context.invoke("editor.restoreRange")}))}},{key:"showImageDialog",value:function showImageDialog(){var _this2=this;return external_jQuery_default().Deferred((function(deferred){var $imageInput=_this2.$dialog.find(".note-image-input");var $imageUrl=_this2.$dialog.find(".note-image-url");var $imageBtn=_this2.$dialog.find(".note-image-btn");_this2.ui.onDialogShown(_this2.$dialog,(function(){_this2.context.triggerEvent("dialog.shown");$imageInput.replaceWith($imageInput.clone().on("change",(function(event){deferred.resolve(event.target.files||event.target.value)})).val(""));$imageUrl.on("input paste propertychange",(function(){_this2.ui.toggleBtn($imageBtn,$imageUrl.val())})).val("");if(!env.isSupportTouch){$imageUrl.trigger("focus")}$imageBtn.click((function(event){event.preventDefault();deferred.resolve($imageUrl.val())}));_this2.bindEnterKey($imageUrl,$imageBtn)}));_this2.ui.onDialogHidden(_this2.$dialog,(function(){$imageInput.off();$imageUrl.off();$imageBtn.off();if(deferred.state()==="pending"){deferred.reject()}}));_this2.ui.showDialog(_this2.$dialog)}))}}]);return ImageDialog}();function ImagePopover_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function ImagePopover_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function ImagePopover_createClass(Constructor,protoProps,staticProps){if(protoProps)ImagePopover_defineProperties(Constructor.prototype,protoProps);if(staticProps)ImagePopover_defineProperties(Constructor,staticProps);return Constructor}var ImagePopover=function(){function ImagePopover(context){var _this=this;ImagePopover_classCallCheck(this,ImagePopover);this.context=context;this.ui=external_jQuery_default().summernote.ui;this.editable=context.layoutInfo.editable[0];this.options=context.options;this.events={"summernote.disable summernote.dialog.shown":function summernoteDisableSummernoteDialogShown(){_this.hide()},"summernote.blur":function summernoteBlur(we,e){if(e.originalEvent&&e.originalEvent.relatedTarget){if(!_this.$popover[0].contains(e.originalEvent.relatedTarget)){_this.hide()}}else{_this.hide()}}}}ImagePopover_createClass(ImagePopover,[{key:"shouldInitialize",value:function shouldInitialize(){return!lists.isEmpty(this.options.popover.image)}},{key:"initialize",value:function initialize(){this.$popover=this.ui.popover({className:"note-image-popover"}).render().appendTo(this.options.container);var $content=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",$content,this.options.popover.image);this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function destroy(){this.$popover.remove()}},{key:"update",value:function update(target,event){if(dom.isImg(target)){var position=external_jQuery_default()(target).offset();var containerOffset=external_jQuery_default()(this.options.container).offset();var pos={};if(this.options.popatmouse){pos.left=event.pageX-20;pos.top=event.pageY}else{pos=position}pos.top-=containerOffset.top;pos.left-=containerOffset.left;this.$popover.css({display:"block",left:pos.left,top:pos.top})}else{this.hide()}}},{key:"hide",value:function hide(){this.$popover.hide()}}]);return ImagePopover}();function TablePopover_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function TablePopover_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function TablePopover_createClass(Constructor,protoProps,staticProps){if(protoProps)TablePopover_defineProperties(Constructor.prototype,protoProps);if(staticProps)TablePopover_defineProperties(Constructor,staticProps);return Constructor}var TablePopover=function(){function TablePopover(context){var _this=this;TablePopover_classCallCheck(this,TablePopover);this.context=context;this.ui=external_jQuery_default().summernote.ui;this.options=context.options;this.events={"summernote.mousedown":function summernoteMousedown(we,e){_this.update(e.target)},"summernote.keyup summernote.scroll summernote.change":function summernoteKeyupSummernoteScrollSummernoteChange(){_this.update()},"summernote.disable summernote.dialog.shown":function summernoteDisableSummernoteDialogShown(){_this.hide()},"summernote.blur":function summernoteBlur(we,e){if(e.originalEvent&&e.originalEvent.relatedTarget){if(!_this.$popover[0].contains(e.originalEvent.relatedTarget)){_this.hide()}}else{_this.hide()}}}}TablePopover_createClass(TablePopover,[{key:"shouldInitialize",value:function shouldInitialize(){return!lists.isEmpty(this.options.popover.table)}},{key:"initialize",value:function initialize(){this.$popover=this.ui.popover({className:"note-table-popover"}).render().appendTo(this.options.container);var $content=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",$content,this.options.popover.table);if(env.isFF){document.execCommand("enableInlineTableEditing",false,false)}this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function destroy(){this.$popover.remove()}},{key:"update",value:function update(target){if(this.context.isDisabled()){return false}var isCell=dom.isCell(target)||dom.isCell(target===null||target===void 0?void 0:target.parentElement);if(isCell){var pos=dom.posFromPlaceholder(target);var containerOffset=external_jQuery_default()(this.options.container).offset();pos.top-=containerOffset.top;pos.left-=containerOffset.left;this.$popover.css({display:"block",left:pos.left,top:pos.top})}else{this.hide()}return isCell}},{key:"hide",value:function hide(){this.$popover.hide()}}]);return TablePopover}();function VideoDialog_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function VideoDialog_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function VideoDialog_createClass(Constructor,protoProps,staticProps){if(protoProps)VideoDialog_defineProperties(Constructor.prototype,protoProps);if(staticProps)VideoDialog_defineProperties(Constructor,staticProps);return Constructor}var VideoDialog=function(){function VideoDialog(context){VideoDialog_classCallCheck(this,VideoDialog);this.context=context;this.ui=external_jQuery_default().summernote.ui;this.$body=external_jQuery_default()(document.body);this.$editor=context.layoutInfo.editor;this.options=context.options;this.lang=this.options.langInfo}VideoDialog_createClass(VideoDialog,[{key:"initialize",value:function initialize(){var $container=this.options.dialogsInBody?this.$body:this.options.container;var body=['<div class="form-group note-form-group row-fluid">','<label for="note-dialog-video-url-'.concat(this.options.id,'" class="note-form-label">').concat(this.lang.video.url,' <small class="text-muted">').concat(this.lang.video.providers,"</small></label>"),'<input id="note-dialog-video-url-'.concat(this.options.id,'" class="note-video-url form-control note-form-control note-input" type="text"/>'),"</div>"].join("");var buttonClass="btn btn-primary note-btn note-btn-primary note-video-btn";var footer='<input type="button" href="#" class="'.concat(buttonClass,'" value="').concat(this.lang.video.insert,'" disabled>');this.$dialog=this.ui.dialog({title:this.lang.video.insert,fade:this.options.dialogsFade,body:body,footer:footer}).render().appendTo($container)}},{key:"destroy",value:function destroy(){this.ui.hideDialog(this.$dialog);this.$dialog.remove()}},{key:"bindEnterKey",value:function bindEnterKey($input,$btn){$input.on("keypress",(function(event){if(event.keyCode===key.code.ENTER){event.preventDefault();$btn.trigger("click")}}))}},{key:"createVideoNode",value:function createVideoNode(url){var ytRegExp=/\/\/(?:(?:www|m)\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w|-]{11})(?:(?:[\?&]t=)(\S+))?$/;var ytRegExpForStart=/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/;var ytMatch=url.match(ytRegExp);var gdRegExp=/(?:\.|\/\/)drive\.google\.com\/file\/d\/(.[a-zA-Z0-9_-]*)\/view/;var gdMatch=url.match(gdRegExp);var igRegExp=/(?:www\.|\/\/)instagram\.com\/p\/(.[a-zA-Z0-9_-]*)/;var igMatch=url.match(igRegExp);var vRegExp=/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/;var vMatch=url.match(vRegExp);var vimRegExp=/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/;var vimMatch=url.match(vimRegExp);var dmRegExp=/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/;var dmMatch=url.match(dmRegExp);var youkuRegExp=/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/;var youkuMatch=url.match(youkuRegExp);var peerTubeRegExp=/\/\/(.*)\/videos\/watch\/([^?]*)(?:\?(?:start=(\w*))?(?:&stop=(\w*))?(?:&loop=([10]))?(?:&autoplay=([10]))?(?:&muted=([10]))?)?/;var peerTubeMatch=url.match(peerTubeRegExp);var qqRegExp=/\/\/v\.qq\.com.*?vid=(.+)/;var qqMatch=url.match(qqRegExp);var qqRegExp2=/\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/;var qqMatch2=url.match(qqRegExp2);var mp4RegExp=/^.+.(mp4|m4v)$/;var mp4Match=url.match(mp4RegExp);var oggRegExp=/^.+.(ogg|ogv)$/;var oggMatch=url.match(oggRegExp);var webmRegExp=/^.+.(webm)$/;var webmMatch=url.match(webmRegExp);var fbRegExp=/(?:www\.|\/\/)facebook\.com\/([^\/]+)\/videos\/([0-9]+)/;var fbMatch=url.match(fbRegExp);var $video;if(ytMatch&&ytMatch[1].length===11){var youtubeId=ytMatch[1];var start=0;if(typeof ytMatch[2]!=="undefined"){var ytMatchForStart=ytMatch[2].match(ytRegExpForStart);if(ytMatchForStart){for(var n=[3600,60,1],i=0,r=n.length;i<r;i++){start+=typeof ytMatchForStart[i+1]!=="undefined"?n[i]*parseInt(ytMatchForStart[i+1],10):0}}}$video=external_jQuery_default()("<iframe>").attr("frameborder",0).attr("src","//www.youtube.com/embed/"+youtubeId+(start>0?"?start="+start:"")).attr("width","640").attr("height","360")}else if(gdMatch&&gdMatch[0].length){$video=external_jQuery_default()("<iframe>").attr("frameborder",0).attr("src","https://drive.google.com/file/d/"+gdMatch[1]+"/preview").attr("width","640").attr("height","480")}else if(igMatch&&igMatch[0].length){$video=external_jQuery_default()("<iframe>").attr("frameborder",0).attr("src","https://instagram.com/p/"+igMatch[1]+"/embed/").attr("width","612").attr("height","710").attr("scrolling","no").attr("allowtransparency","true")}else if(vMatch&&vMatch[0].length){$video=external_jQuery_default()("<iframe>").attr("frameborder",0).attr("src",vMatch[0]+"/embed/simple").attr("width","600").attr("height","600").attr("class","vine-embed")}else if(vimMatch&&vimMatch[3].length){$video=external_jQuery_default()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("src","//player.vimeo.com/video/"+vimMatch[3]).attr("width","640").attr("height","360")}else if(dmMatch&&dmMatch[2].length){$video=external_jQuery_default()("<iframe>").attr("frameborder",0).attr("src","//www.dailymotion.com/embed/video/"+dmMatch[2]).attr("width","640").attr("height","360")}else if(youkuMatch&&youkuMatch[1].length){$video=external_jQuery_default()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","498").attr("width","510").attr("src","//player.youku.com/embed/"+youkuMatch[1])}else if(peerTubeMatch&&peerTubeMatch[0].length){var begin=0;if(peerTubeMatch[2]!=="undefined")begin=peerTubeMatch[2];var end=0;if(peerTubeMatch[3]!=="undefined")end=peerTubeMatch[3];var loop=0;if(peerTubeMatch[4]!=="undefined")loop=peerTubeMatch[4];var autoplay=0;if(peerTubeMatch[5]!=="undefined")autoplay=peerTubeMatch[5];var muted=0;if(peerTubeMatch[6]!=="undefined")muted=peerTubeMatch[6];$video=external_jQuery_default()('<iframe allowfullscreen sandbox="allow-same-origin allow-scripts allow-popups">').attr("frameborder",0).attr("src","//"+peerTubeMatch[1]+"/videos/embed/"+peerTubeMatch[2]+"?loop="+loop+"&autoplay="+autoplay+"&muted="+muted+(begin>0?"&start="+begin:"")+(end>0?"&end="+start:"")).attr("width","560").attr("height","315")}else if(qqMatch&&qqMatch[1].length||qqMatch2&&qqMatch2[2].length){var vid=qqMatch&&qqMatch[1].length?qqMatch[1]:qqMatch2[2];$video=external_jQuery_default()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","310").attr("width","500").attr("src","https://v.qq.com/txp/iframe/player.html?vid="+vid+"&amp;auto=0")}else if(mp4Match||oggMatch||webmMatch){$video=external_jQuery_default()("<video controls>").attr("src",url).attr("width","640").attr("height","360")}else if(fbMatch&&fbMatch[0].length){$video=external_jQuery_default()("<iframe>").attr("frameborder",0).attr("src","https://www.facebook.com/plugins/video.php?href="+encodeURIComponent(fbMatch[0])+"&show_text=0&width=560").attr("width","560").attr("height","301").attr("scrolling","no").attr("allowtransparency","true")}else{return false}$video.addClass("note-video-clip");return $video[0]}},{key:"show",value:function show(){var _this=this;var text=this.context.invoke("editor.getSelectedText");this.context.invoke("editor.saveRange");this.showVideoDialog(text).then((function(url){_this.ui.hideDialog(_this.$dialog);_this.context.invoke("editor.restoreRange");var $node=_this.createVideoNode(url);if($node){_this.context.invoke("editor.insertNode",$node)}})).fail((function(){_this.context.invoke("editor.restoreRange")}))}},{key:"showVideoDialog",value:function showVideoDialog(){var _this2=this;return external_jQuery_default().Deferred((function(deferred){var $videoUrl=_this2.$dialog.find(".note-video-url");var $videoBtn=_this2.$dialog.find(".note-video-btn");_this2.ui.onDialogShown(_this2.$dialog,(function(){_this2.context.triggerEvent("dialog.shown");$videoUrl.on("input paste propertychange",(function(){_this2.ui.toggleBtn($videoBtn,$videoUrl.val())}));if(!env.isSupportTouch){$videoUrl.trigger("focus")}$videoBtn.click((function(event){event.preventDefault();deferred.resolve($videoUrl.val())}));_this2.bindEnterKey($videoUrl,$videoBtn)}));_this2.ui.onDialogHidden(_this2.$dialog,(function(){$videoUrl.off();$videoBtn.off();if(deferred.state()==="pending"){deferred.reject()}}));_this2.ui.showDialog(_this2.$dialog)}))}}]);return VideoDialog}();function HelpDialog_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function HelpDialog_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function HelpDialog_createClass(Constructor,protoProps,staticProps){if(protoProps)HelpDialog_defineProperties(Constructor.prototype,protoProps);if(staticProps)HelpDialog_defineProperties(Constructor,staticProps);return Constructor}var HelpDialog=function(){function HelpDialog(context){HelpDialog_classCallCheck(this,HelpDialog);this.context=context;this.ui=external_jQuery_default().summernote.ui;this.$body=external_jQuery_default()(document.body);this.$editor=context.layoutInfo.editor;this.options=context.options;this.lang=this.options.langInfo}HelpDialog_createClass(HelpDialog,[{key:"initialize",value:function initialize(){var $container=this.options.dialogsInBody?this.$body:this.options.container;var body=['<p class="text-center">','<a href="http://summernote.org/" target="_blank" rel="noopener noreferrer">Summernote 0.8.20</a> \xb7 ','<a href="https://github.com/summernote/summernote" target="_blank" rel="noopener noreferrer">Project</a> \xb7 ','<a href="https://github.com/summernote/summernote/issues" target="_blank" rel="noopener noreferrer">Issues</a>',"</p>"].join("");this.$dialog=this.ui.dialog({title:this.lang.options.help,fade:this.options.dialogsFade,body:this.createShortcutList(),footer:body,callback:function callback($node){$node.find(".modal-body,.note-modal-body").css({"max-height":300,overflow:"scroll"})}}).render().appendTo($container)}},{key:"destroy",value:function destroy(){this.ui.hideDialog(this.$dialog);this.$dialog.remove()}},{key:"createShortcutList",value:function createShortcutList(){var _this=this;var keyMap=this.options.keyMap[env.isMac?"mac":"pc"];return Object.keys(keyMap).map((function(key){var command=keyMap[key];var $row=external_jQuery_default()('<div><div class="help-list-item"></div></div>');$row.append(external_jQuery_default()("<label><kbd>"+key+"</kdb></label>").css({width:180,"margin-right":10})).append(external_jQuery_default()("<span></span>").html(_this.context.memo("help."+command)||command));return $row.html()})).join("")}},{key:"showHelpDialog",value:function showHelpDialog(){var _this2=this;return external_jQuery_default().Deferred((function(deferred){_this2.ui.onDialogShown(_this2.$dialog,(function(){_this2.context.triggerEvent("dialog.shown");deferred.resolve()}));_this2.ui.showDialog(_this2.$dialog)})).promise()}},{key:"show",value:function show(){var _this3=this;this.context.invoke("editor.saveRange");this.showHelpDialog().then((function(){_this3.context.invoke("editor.restoreRange")}))}}]);return HelpDialog}();function AirPopover_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function AirPopover_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function AirPopover_createClass(Constructor,protoProps,staticProps){if(protoProps)AirPopover_defineProperties(Constructor.prototype,protoProps);if(staticProps)AirPopover_defineProperties(Constructor,staticProps);return Constructor}var AIRMODE_POPOVER_X_OFFSET=-5;var AIRMODE_POPOVER_Y_OFFSET=5;var AirPopover=function(){function AirPopover(context){var _this=this;AirPopover_classCallCheck(this,AirPopover);this.context=context;this.ui=external_jQuery_default().summernote.ui;this.options=context.options;this.hidable=true;this.onContextmenu=false;this.pageX=null;this.pageY=null;this.events={"summernote.contextmenu":function summernoteContextmenu(e){if(_this.options.editing){e.preventDefault();e.stopPropagation();_this.onContextmenu=true;_this.update(true)}},"summernote.mousedown":function summernoteMousedown(we,e){_this.pageX=e.pageX;_this.pageY=e.pageY},"summernote.keyup summernote.mouseup summernote.scroll":function summernoteKeyupSummernoteMouseupSummernoteScroll(we,e){if(_this.options.editing&&!_this.onContextmenu){_this.pageX=e.pageX;_this.pageY=e.pageY;_this.update()}_this.onContextmenu=false},"summernote.disable summernote.change summernote.dialog.shown summernote.blur":function summernoteDisableSummernoteChangeSummernoteDialogShownSummernoteBlur(){_this.hide()},"summernote.focusout":function summernoteFocusout(){if(!_this.$popover.is(":active,:focus")){_this.hide()}}}}AirPopover_createClass(AirPopover,[{key:"shouldInitialize",value:function shouldInitialize(){return this.options.airMode&&!lists.isEmpty(this.options.popover.air)}},{key:"initialize",value:function initialize(){var _this2=this;this.$popover=this.ui.popover({className:"note-air-popover"}).render().appendTo(this.options.container);var $content=this.$popover.find(".popover-content");this.context.invoke("buttons.build",$content,this.options.popover.air);this.$popover.on("mousedown",(function(){_this2.hidable=false}));this.$popover.on("mouseup",(function(){_this2.hidable=true}))}},{key:"destroy",value:function destroy(){this.$popover.remove()}},{key:"update",value:function update(forcelyOpen){var styleInfo=this.context.invoke("editor.currentStyle");if(styleInfo.range&&(!styleInfo.range.isCollapsed()||forcelyOpen)){var rect={left:this.pageX,top:this.pageY};var containerOffset=external_jQuery_default()(this.options.container).offset();rect.top-=containerOffset.top;rect.left-=containerOffset.left;this.$popover.css({display:"block",left:Math.max(rect.left,0)+AIRMODE_POPOVER_X_OFFSET,top:rect.top+AIRMODE_POPOVER_Y_OFFSET});this.context.invoke("buttons.updateCurrentStyle",this.$popover)}else{this.hide()}}},{key:"updateCodeview",value:function updateCodeview(isCodeview){this.ui.toggleBtnActive(this.$popover.find(".btn-codeview"),isCodeview);if(isCodeview){this.hide()}}},{key:"hide",value:function hide(){if(this.hidable){this.$popover.hide()}}}]);return AirPopover}();function HintPopover_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function HintPopover_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function HintPopover_createClass(Constructor,protoProps,staticProps){if(protoProps)HintPopover_defineProperties(Constructor.prototype,protoProps);if(staticProps)HintPopover_defineProperties(Constructor,staticProps);return Constructor}var POPOVER_DIST=5;var HintPopover=function(){function HintPopover(context){var _this=this;HintPopover_classCallCheck(this,HintPopover);this.context=context;this.ui=external_jQuery_default().summernote.ui;this.$editable=context.layoutInfo.editable;this.options=context.options;this.hint=this.options.hint||[];this.direction=this.options.hintDirection||"bottom";this.hints=Array.isArray(this.hint)?this.hint:[this.hint];this.events={"summernote.keyup":function summernoteKeyup(we,e){if(!e.isDefaultPrevented()){_this.handleKeyup(e)}},"summernote.keydown":function summernoteKeydown(we,e){_this.handleKeydown(e)},"summernote.disable summernote.dialog.shown summernote.blur":function summernoteDisableSummernoteDialogShownSummernoteBlur(){_this.hide()}}}HintPopover_createClass(HintPopover,[{key:"shouldInitialize",value:function shouldInitialize(){return this.hints.length>0}},{key:"initialize",value:function initialize(){var _this2=this;this.lastWordRange=null;this.matchingWord=null;this.$popover=this.ui.popover({className:"note-hint-popover",hideArrow:true,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(e){_this2.$content.find(".active").removeClass("active");external_jQuery_default()(e.currentTarget).addClass("active");_this2.replace()}));this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function destroy(){this.$popover.remove()}},{key:"selectItem",value:function selectItem($item){this.$content.find(".active").removeClass("active");$item.addClass("active");this.$content[0].scrollTop=$item[0].offsetTop-this.$content.innerHeight()/2}},{key:"moveDown",value:function moveDown(){var $current=this.$content.find(".note-hint-item.active");var $next=$current.next();if($next.length){this.selectItem($next)}else{var $nextGroup=$current.parent().next();if(!$nextGroup.length){$nextGroup=this.$content.find(".note-hint-group").first()}this.selectItem($nextGroup.find(".note-hint-item").first())}}},{key:"moveUp",value:function moveUp(){var $current=this.$content.find(".note-hint-item.active");var $prev=$current.prev();if($prev.length){this.selectItem($prev)}else{var $prevGroup=$current.parent().prev();if(!$prevGroup.length){$prevGroup=this.$content.find(".note-hint-group").last()}this.selectItem($prevGroup.find(".note-hint-item").last())}}},{key:"replace",value:function replace(){var $item=this.$content.find(".note-hint-item.active");if($item.length){var node=this.nodeFromItem($item);if(this.matchingWord!==null&&this.matchingWord.length===0){this.lastWordRange.so=this.lastWordRange.eo}else if(this.matchingWord!==null&&this.matchingWord.length>0&&!this.lastWordRange.isCollapsed()){var rangeCompute=this.lastWordRange.eo-this.lastWordRange.so-this.matchingWord.length;if(rangeCompute>0){this.lastWordRange.so+=rangeCompute}}this.lastWordRange.insertNode(node);if(this.options.hintSelect==="next"){var blank=document.createTextNode("");external_jQuery_default()(node).after(blank);range.createFromNodeBefore(blank).select()}else{range.createFromNodeAfter(node).select()}this.lastWordRange=null;this.hide();this.context.invoke("editor.focus");this.context.triggerEvent("change",this.$editable.html(),this.$editable)}}},{key:"nodeFromItem",value:function nodeFromItem($item){var hint=this.hints[$item.data("index")];var item=$item.data("item");var node=hint.content?hint.content(item):item;if(typeof node==="string"){node=dom.createText(node)}return node}},{key:"createItemTemplates",value:function createItemTemplates(hintIdx,items){var hint=this.hints[hintIdx];return items.map((function(item){var $item=external_jQuery_default()('<div class="note-hint-item"></div>');$item.append(hint.template?hint.template(item):item+"");$item.data({index:hintIdx,item:item});return $item}))}},{key:"handleKeydown",value:function handleKeydown(e){if(!this.$popover.is(":visible")){return}if(e.keyCode===key.code.ENTER){e.preventDefault();this.replace()}else if(e.keyCode===key.code.UP){e.preventDefault();this.moveUp()}else if(e.keyCode===key.code.DOWN){e.preventDefault();this.moveDown()}}},{key:"searchKeyword",value:function searchKeyword(index,keyword,callback){var hint=this.hints[index];if(hint&&hint.match.test(keyword)&&hint.search){var matches=hint.match.exec(keyword);this.matchingWord=matches[0];hint.search(matches[1],callback)}else{callback()}}},{key:"createGroup",value:function createGroup(idx,keyword){var _this3=this;var $group=external_jQuery_default()('<div class="note-hint-group note-hint-group-'+idx+'"></div>');this.searchKeyword(idx,keyword,(function(items){items=items||[];if(items.length){$group.html(_this3.createItemTemplates(idx,items));_this3.show()}}));return $group}},{key:"handleKeyup",value:function handleKeyup(e){var _this4=this;if(!lists.contains([key.code.ENTER,key.code.UP,key.code.DOWN],e.keyCode)){var _range=this.context.invoke("editor.getLastRange");var wordRange,keyword;if(this.options.hintMode==="words"){wordRange=_range.getWordsRange(_range);keyword=wordRange.toString();this.hints.forEach((function(hint){if(hint.match.test(keyword)){wordRange=_range.getWordsMatchRange(hint.match);return false}}));if(!wordRange){this.hide();return}keyword=wordRange.toString()}else{wordRange=_range.getWordRange();keyword=wordRange.toString()}if(this.hints.length&&keyword){this.$content.empty();var bnd=func.rect2bnd(lists.last(wordRange.getClientRects()));var containerOffset=external_jQuery_default()(this.options.container).offset();if(bnd){bnd.top-=containerOffset.top;bnd.left-=containerOffset.left;this.$popover.hide();this.lastWordRange=wordRange;this.hints.forEach((function(hint,idx){if(hint.match.test(keyword)){_this4.createGroup(idx,keyword).appendTo(_this4.$content)}}));this.$content.find(".note-hint-item:first").addClass("active");if(this.direction==="top"){this.$popover.css({left:bnd.left,top:bnd.top-this.$popover.outerHeight()-POPOVER_DIST})}else{this.$popover.css({left:bnd.left,top:bnd.top+bnd.height+POPOVER_DIST})}}}else{this.hide()}}}},{key:"show",value:function show(){this.$popover.show()}},{key:"hide",value:function hide(){this.$popover.hide()}}]);return HintPopover}();external_jQuery_default().summernote=external_jQuery_default().extend(external_jQuery_default().summernote,{version:"0.8.20",plugins:{},dom:dom,range:range,lists:lists,options:{langInfo:external_jQuery_default().summernote.lang["en-US"],editing:true,modules:{editor:Editor,clipboard:Clipboard,dropzone:Dropzone,codeview:CodeView,statusbar:Statusbar,fullscreen:Fullscreen,handle:Handle,hintPopover:HintPopover,autoLink:AutoLink,autoSync:AutoSync,autoReplace:AutoReplace,placeholder:Placeholder,buttons:Buttons,toolbar:Toolbar,linkDialog:LinkDialog,linkPopover:LinkPopover,imageDialog:ImageDialog,imagePopover:ImagePopover,tablePopover:TablePopover,videoDialog:VideoDialog,helpDialog:HelpDialog,airPopover:AirPopover},buttons:{},lang:"en-US",followingToolbar:false,toolbarPosition:"top",otherStaticBar:"",codeviewKeepButton:false,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:true,popover:{image:[["resize",["resizeFull","resizeHalf","resizeQuarter","resizeNone"]],["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"]],["view",["fullscreen","codeview"]]]},airMode:false,overrideContextMenu:false,width:null,height:null,linkTargetBlank:true,useProtocol:true,defaultProtocol:"http://",focus:false,tabDisabled:false,tabSize:4,styleWithCSS:false,shortcuts:true,textareaAutoSync:true,tooltip:"auto",container:null,maxTextLength:0,blockquoteBreakingLevel:2,spellCheck:true,disableGrammar:false,placeholder:null,inheritPlaceholder:false,recordEveryKeystroke:false,historyLimit:200,showDomainOnlyForAutolink:false,hintMode:"word",hintSelect:"after",hintDirection:"bottom",styleTags:["p","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"],fontNamesIgnoreCheck:[],addDefaultFonts:true,fontSizes:["8","9","10","11","12","14","18","24","36"],fontSizeUnits:["px","pt"],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"]],colorsName:[["Black","Tundora","Dove Gray","Star Dust","Pale Slate","Gallery","Alabaster","White"],["Red","Orange Peel","Yellow","Green","Cyan","Blue","Electric Violet","Magenta"],["Azalea","Karry","Egg White","Zanah","Botticelli","Tropical Blue","Mischka","Twilight"],["Tonys Pink","Peach Orange","Cream Brulee","Sprout","Casper","Perano","Cold Purple","Careys Pink"],["Mandy","Rajah","Dandelion","Olivine","Gulf Stream","Viking","Blue Marguerite","Puce"],["Guardsman Red","Fire Bush","Golden Dream","Chelsea Cucumber","Smalt Blue","Boston Blue","Butterfly Bush","Cadillac"],["Sangria","Mai Tai","Buddha Gold","Forest Green","Eden","Venice Blue","Meteorite","Claret"],["Rosewood","Cinnamon","Olive","Parsley","Tiber","Midnight Blue","Valentino","Loulou"]],colorButton:{foreColor:"#000000",backColor:"#FFFF00"},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:false,dialogsFade:false,maximumImageFileSize:null,acceptImageFileTypes:"image/*",callbacks:{onBeforeCommand:null,onBlur:null,onBlurCodeview:null,onChange:null,onChangeCodeview:null,onDialogShown:null,onEnter:null,onFocus:null,onImageLinkInsert:null,onImageUpload:null,onImageUploadError:null,onInit:null,onKeydown:null,onKeyup:null,onMousedown:null,onMouseup:null,onPaste:null,onScroll:null},codemirror:{mode:"text/html",htmlMode:true,lineNumbers:true},codeviewFilter:true,codeviewFilterRegex:/<\/*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|ilayer|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|t(?:itle|extarea)|xml)[^>]*?>/gi,codeviewIframeFilter:true,codeviewIframeWhitelistSrc:[],codeviewIframeWhitelistSrcBase:["www.youtube.com","www.youtube-nocookie.com","www.facebook.com","vine.co","instagram.com","player.vimeo.com","www.dailymotion.com","player.youku.com","jumpingbean.tv","v.qq.com"],keyMap:{pc:{ESC:"escape",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:{ESC:"escape",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",floatLeft:"note-icon-float-left",floatRight:"note-icon-float-right",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",rollback:"note-icon-rollback",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"}}});function _typeof(obj){"@babel/helpers - typeof";if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof=function _typeof(obj){return typeof obj}}else{_typeof=function _typeof(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof(obj)}function renderer_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function renderer_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function renderer_createClass(Constructor,protoProps,staticProps){if(protoProps)renderer_defineProperties(Constructor.prototype,protoProps);if(staticProps)renderer_defineProperties(Constructor,staticProps);return Constructor}var Renderer=function(){function Renderer(markup,children,options,callback){renderer_classCallCheck(this,Renderer);this.markup=markup;this.children=children;this.options=options;this.callback=callback}renderer_createClass(Renderer,[{key:"render",value:function render($parent){var $node=external_jQuery_default()(this.markup);if(this.options&&this.options.contents){$node.html(this.options.contents)}if(this.options&&this.options.className){$node.addClass(this.options.className)}if(this.options&&this.options.data){external_jQuery_default().each(this.options.data,(function(k,v){$node.attr("data-"+k,v)}))}if(this.options&&this.options.click){$node.on("click",this.options.click)}if(this.children){var $container=$node.find(".note-children-container");this.children.forEach((function(child){child.render($container.length?$container:$node)}))}if(this.callback){this.callback($node,this.options)}if(this.options&&this.options.callback){this.options.callback($node)}if($parent){$parent.append($node)}return $node}}]);return Renderer}();const renderer={create:function create(markup,callback){return function(){var options=_typeof(arguments[1])==="object"?arguments[1]:arguments[0];var children=Array.isArray(arguments[0])?arguments[0]:[];if(options&&options.children){children=options.children}return new Renderer(markup,children,options,callback)}}};function TooltipUI_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function TooltipUI_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function TooltipUI_createClass(Constructor,protoProps,staticProps){if(protoProps)TooltipUI_defineProperties(Constructor.prototype,protoProps);if(staticProps)TooltipUI_defineProperties(Constructor,staticProps);return Constructor}var TooltipUI=function(){function TooltipUI($node,options){TooltipUI_classCallCheck(this,TooltipUI);this.$node=$node;this.options=external_jQuery_default().extend({},{title:"",target:options.container,trigger:"hover focus",placement:"bottom"},options);this.$tooltip=external_jQuery_default()(['<div class="note-tooltip">','<div class="note-tooltip-arrow"></div>','<div class="note-tooltip-content"></div>',"</div>"].join(""));if(this.options.trigger!=="manual"){var showCallback=this.show.bind(this);var hideCallback=this.hide.bind(this);var toggleCallback=this.toggle.bind(this);this.options.trigger.split(" ").forEach((function(eventName){if(eventName==="hover"){$node.off("mouseenter mouseleave");$node.on("mouseenter",showCallback).on("mouseleave",hideCallback)}else if(eventName==="click"){$node.on("click",toggleCallback)}else if(eventName==="focus"){$node.on("focus",showCallback).on("blur",hideCallback)}}))}}TooltipUI_createClass(TooltipUI,[{key:"show",value:function show(){var $node=this.$node;var offset=$node.offset();var targetOffset=external_jQuery_default()(this.options.target).offset();offset.top-=targetOffset.top;offset.left-=targetOffset.left;var $tooltip=this.$tooltip;var title=this.options.title||$node.attr("title")||$node.data("title");var placement=this.options.placement||$node.data("placement");$tooltip.addClass(placement);$tooltip.find(".note-tooltip-content").text(title);$tooltip.appendTo(this.options.target);var nodeWidth=$node.outerWidth();var nodeHeight=$node.outerHeight();var tooltipWidth=$tooltip.outerWidth();var tooltipHeight=$tooltip.outerHeight();if(placement==="bottom"){$tooltip.css({top:offset.top+nodeHeight,left:offset.left+(nodeWidth/2-tooltipWidth/2)})}else if(placement==="top"){$tooltip.css({top:offset.top-tooltipHeight,left:offset.left+(nodeWidth/2-tooltipWidth/2)})}else if(placement==="left"){$tooltip.css({top:offset.top+(nodeHeight/2-tooltipHeight/2),left:offset.left-tooltipWidth})}else if(placement==="right"){$tooltip.css({top:offset.top+(nodeHeight/2-tooltipHeight/2),left:offset.left+nodeWidth})}$tooltip.addClass("in")}},{key:"hide",value:function hide(){var _this=this;this.$tooltip.removeClass("in");setTimeout((function(){_this.$tooltip.remove()}),200)}},{key:"toggle",value:function toggle(){if(this.$tooltip.hasClass("in")){this.hide()}else{this.show()}}}]);return TooltipUI}();const js_TooltipUI=TooltipUI;function DropdownUI_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function DropdownUI_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function DropdownUI_createClass(Constructor,protoProps,staticProps){if(protoProps)DropdownUI_defineProperties(Constructor.prototype,protoProps);if(staticProps)DropdownUI_defineProperties(Constructor,staticProps);return Constructor}var DropdownUI=function(){function DropdownUI($node,options){DropdownUI_classCallCheck(this,DropdownUI);this.$button=$node;this.options=external_jQuery_default().extend({},{target:options.container},options);this.setEvent()}DropdownUI_createClass(DropdownUI,[{key:"setEvent",value:function setEvent(){var _this=this;this.$button.on("click",(function(e){_this.toggle();e.stopImmediatePropagation()}))}},{key:"clear",value:function clear(){var $parent=external_jQuery_default()(".note-btn-group.open");$parent.find(".note-btn.active").removeClass("active");$parent.removeClass("open")}},{key:"show",value:function show(){this.$button.addClass("active");this.$button.parent().addClass("open");var $dropdown=this.$button.next();var offset=$dropdown.offset();var width=$dropdown.outerWidth();var windowWidth=external_jQuery_default()(window).width();var targetMarginRight=parseFloat(external_jQuery_default()(this.options.target).css("margin-right"));if(offset.left+width>windowWidth-targetMarginRight){$dropdown.css("margin-left",windowWidth-targetMarginRight-(offset.left+width))}else{$dropdown.css("margin-left","")}}},{key:"hide",value:function hide(){this.$button.removeClass("active");this.$button.parent().removeClass("open")}},{key:"toggle",value:function toggle(){var isOpened=this.$button.parent().hasClass("open");this.clear();if(isOpened){this.hide()}else{this.show()}}}]);return DropdownUI}();external_jQuery_default()(document).on("click",(function(e){if(!external_jQuery_default()(e.target).closest(".note-btn-group").length){external_jQuery_default()(".note-btn-group.open").removeClass("open");external_jQuery_default()(".note-btn-group .note-btn.active").removeClass("active")}}));external_jQuery_default()(document).on("click.note-dropdown-menu",(function(e){external_jQuery_default()(e.target).closest(".note-dropdown-menu").parent().removeClass("open");external_jQuery_default()(e.target).closest(".note-dropdown-menu").parent().find(".note-btn.active").removeClass("active")}));const js_DropdownUI=DropdownUI;function ModalUI_classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function ModalUI_defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}function ModalUI_createClass(Constructor,protoProps,staticProps){if(protoProps)ModalUI_defineProperties(Constructor.prototype,protoProps);if(staticProps)ModalUI_defineProperties(Constructor,staticProps);return Constructor}var ModalUI=function(){function ModalUI($node){ModalUI_classCallCheck(this,ModalUI);this.$modal=$node;this.$backdrop=external_jQuery_default()('<div class="note-modal-backdrop"></div>')}ModalUI_createClass(ModalUI,[{key:"show",value:function show(){var _this=this;this.$backdrop.appendTo(document.body).show();this.$modal.addClass("open").show();this.$modal.trigger("note.modal.show");this.$modal.off("click",".close").on("click",".close",this.hide.bind(this));this.$modal.on("keydown",(function(event){if(event.which===27){event.preventDefault();_this.hide()}}))}},{key:"hide",value:function hide(){this.$modal.removeClass("open").hide();this.$backdrop.hide();this.$modal.trigger("note.modal.hide");this.$modal.off("keydown")}}]);return ModalUI}();const js_ModalUI=ModalUI;var editor=renderer.create('<div class="note-editor note-frame"></div>');var toolbar=renderer.create('<div class="note-toolbar" role="toolbar"></div>');var editingArea=renderer.create('<div class="note-editing-area"></div>');var codable=renderer.create('<textarea class="note-codable" aria-multiline="true"></textarea>');var editable=renderer.create('<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"></div>');var statusbar=renderer.create(['<output class="note-status-output" role="status" aria-live="polite"></output>','<div class="note-statusbar" role="status">','<div class="note-resizebar" aria-label="resize">','<div class="note-icon-bar"></div>','<div class="note-icon-bar"></div>','<div class="note-icon-bar"></div>',"</div>","</div>"].join(""));var airEditor=renderer.create('<div class="note-editor note-airframe"></div>');var airEditable=renderer.create(['<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"></div>','<output class="note-status-output" role="status" aria-live="polite"></output>'].join(""));var buttonGroup=renderer.create('<div class="note-btn-group"></div>');var summernote_lite_button=renderer.create('<button type="button" class="note-btn" tabindex="-1"></button>',(function($node,options){if(options&&options.tooltip){$node.attr({"aria-label":options.tooltip});$node.data("_lite_tooltip",new js_TooltipUI($node,{title:options.tooltip,container:options.container})).on("click",(function(e){external_jQuery_default()(e.currentTarget).data("_lite_tooltip").hide()}))}if(options.contents){$node.html(options.contents)}if(options&&options.data&&options.data.toggle==="dropdown"){$node.data("_lite_dropdown",new js_DropdownUI($node,{container:options.container}))}if(options&&options.codeviewKeepButton){$node.addClass("note-codeview-keep")}}));var dropdown=renderer.create('<div class="note-dropdown-menu" role="list"></div>',(function($node,options){var markup=Array.isArray(options.items)?options.items.map((function(item){var value=typeof item==="string"?item:item.value||"";var content=options.template?options.template(item):item;var $temp=external_jQuery_default()('<a class="note-dropdown-item" href="#" data-value="'+value+'" role="listitem" aria-label="'+value+'"></a>');$temp.html(content).data("item",item);return $temp})):options.items;$node.html(markup).attr({"aria-label":options.title});$node.on("click","> .note-dropdown-item",(function(e){var $a=external_jQuery_default()(this);var item=$a.data("item");var value=$a.data("value");if(item.click){item.click($a)}else if(options.itemClick){options.itemClick(e,item,value)}}));if(options&&options.codeviewKeepButton){$node.addClass("note-codeview-keep")}}));var dropdownCheck=renderer.create('<div class="note-dropdown-menu note-check" role="list"></div>',(function($node,options){var markup=Array.isArray(options.items)?options.items.map((function(item){var value=typeof item==="string"?item:item.value||"";var content=options.template?options.template(item):item;var $temp=external_jQuery_default()('<a class="note-dropdown-item" href="#" data-value="'+value+'" role="listitem" aria-label="'+item+'"></a>');$temp.html([icon(options.checkClassName)," ",content]).data("item",item);return $temp})):options.items;$node.html(markup).attr({"aria-label":options.title});$node.on("click","> .note-dropdown-item",(function(e){var $a=external_jQuery_default()(this);var item=$a.data("item");var value=$a.data("value");if(item.click){item.click($a)}else if(options.itemClick){options.itemClick(e,item,value)}}));if(options&&options.codeviewKeepButton){$node.addClass("note-codeview-keep")}}));var dropdownButtonContents=function dropdownButtonContents(contents,options){return contents+" "+icon(options.icons.caret,"span")};var dropdownButton=function dropdownButton(opt,callback){return buttonGroup([summernote_lite_button({className:"dropdown-toggle",contents:opt.title+" "+icon("note-icon-caret"),tooltip:opt.tooltip,data:{toggle:"dropdown"}}),dropdown({className:opt.className,items:opt.items,template:opt.template,itemClick:opt.itemClick})],{callback:callback}).render()};var dropdownCheckButton=function dropdownCheckButton(opt,callback){return buttonGroup([summernote_lite_button({className:"dropdown-toggle",contents:opt.title+" "+icon("note-icon-caret"),tooltip:opt.tooltip,data:{toggle:"dropdown"}}),dropdownCheck({className:opt.className,checkClassName:opt.checkClassName,items:opt.items,template:opt.template,itemClick:opt.itemClick})],{callback:callback}).render()};var paragraphDropdownButton=function paragraphDropdownButton(opt){return buttonGroup([summernote_lite_button({className:"dropdown-toggle",contents:opt.title+" "+icon("note-icon-caret"),tooltip:opt.tooltip,data:{toggle:"dropdown"}}),dropdown([buttonGroup({className:"note-align",children:opt.items[0]}),buttonGroup({className:"note-list",children:opt.items[1]})])]).render()};var tableMoveHandler=function tableMoveHandler(event,col,row){var PX_PER_EM=18;var $picker=external_jQuery_default()(event.target.parentNode);var $dimensionDisplay=$picker.next();var $catcher=$picker.find(".note-dimension-picker-mousecatcher");var $highlighted=$picker.find(".note-dimension-picker-highlighted");var $unhighlighted=$picker.find(".note-dimension-picker-unhighlighted");var posOffset;if(event.offsetX===undefined){var posCatcher=external_jQuery_default()(event.target).offset();posOffset={x:event.pageX-posCatcher.left,y:event.pageY-posCatcher.top}}else{posOffset={x:event.offsetX,y:event.offsetY}}var dim={c:Math.ceil(posOffset.x/PX_PER_EM)||1,r:Math.ceil(posOffset.y/PX_PER_EM)||1};$highlighted.css({width:dim.c+"em",height:dim.r+"em"});$catcher.data("value",dim.c+"x"+dim.r);if(dim.c>3&&dim.c<col){$unhighlighted.css({width:dim.c+1+"em"})}if(dim.r>3&&dim.r<row){$unhighlighted.css({height:dim.r+1+"em"})}$dimensionDisplay.html(dim.c+" x "+dim.r)};var tableDropdownButton=function tableDropdownButton(opt){return buttonGroup([summernote_lite_button({className:"dropdown-toggle",contents:opt.title+" "+icon("note-icon-caret"),tooltip:opt.tooltip,data:{toggle:"dropdown"}}),dropdown({className:"note-table",items:['<div class="note-dimension-picker">','<div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"></div>','<div class="note-dimension-picker-highlighted"></div>','<div class="note-dimension-picker-unhighlighted"></div>',"</div>",'<div class="note-dimension-display">1 x 1</div>'].join("")})],{callback:function callback($node){var $catcher=$node.find(".note-dimension-picker-mousecatcher");$catcher.css({width:opt.col+"em",height:opt.row+"em"}).mouseup(opt.itemClick).mousemove((function(e){tableMoveHandler(e,opt.col,opt.row)}))}}).render()};var palette=renderer.create('<div class="note-color-palette"></div>',(function($node,options){var contents=[];for(var row=0,rowSize=options.colors.length;row<rowSize;row++){var eventName=options.eventName;var colors=options.colors[row];var colorsName=options.colorsName[row];var buttons=[];for(var col=0,colSize=colors.length;col<colSize;col++){var color=colors[col];var colorName=colorsName[col];buttons.push(['<button type="button" class="note-btn note-color-btn"','style="background-color:',color,'" ','data-event="',eventName,'" ','data-value="',color,'" ','data-title="',colorName,'" ','aria-label="',colorName,'" ','data-toggle="button" tabindex="-1"></button>'].join(""))}contents.push('<div class="note-color-row">'+buttons.join("")+"</div>")}$node.html(contents.join(""));$node.find(".note-color-btn").each((function(){external_jQuery_default()(this).data("_lite_tooltip",new js_TooltipUI(external_jQuery_default()(this),{container:options.container}))}))}));var colorDropdownButton=function colorDropdownButton(opt,type){return buttonGroup({className:"note-color",children:[summernote_lite_button({className:"note-current-color-button",contents:opt.title,tooltip:opt.lang.color.recent,click:opt.currentClick,callback:function callback($button){var $recentColor=$button.find(".note-recent-color");if(type!=="foreColor"){$recentColor.css("background-color","#FFFF00");$button.attr("data-backColor","#FFFF00")}}}),summernote_lite_button({className:"dropdown-toggle",contents:icon("note-icon-caret"),tooltip:opt.lang.color.more,data:{toggle:"dropdown"}}),dropdown({items:["<div>",'<div class="note-btn-group btn-background-color">','<div class="note-palette-title">'+opt.lang.color.background+"</div>","<div>",'<button type="button" class="note-color-reset note-btn note-btn-block" data-event="backColor" data-value="transparent">',opt.lang.color.transparent,"</button>","</div>",'<div class="note-holder" data-event="backColor"></div>','<div class="btn-sm">','<input type="color" id="html5bcp" class="note-btn btn-default" value="#21104A" style="width:100%;" data-value="cp">','<button type="button" class="note-color-reset btn" data-event="backColor" data-value="cpbackColor">',opt.lang.color.cpSelect,"</button>","</div>","</div>",'<div class="note-btn-group btn-foreground-color">','<div class="note-palette-title">'+opt.lang.color.foreground+"</div>","<div>",'<button type="button" class="note-color-reset note-btn note-btn-block" data-event="removeFormat" data-value="foreColor">',opt.lang.color.resetToDefault,"</button>","</div>",'<div class="note-holder" data-event="foreColor"></div>','<div class="btn-sm">','<input type="color" id="html5fcp" class="note-btn btn-default" value="#21104A" style="width:100%;" data-value="cp">','<button type="button" class="note-color-reset btn" data-event="foreColor" data-value="cpforeColor">',opt.lang.color.cpSelect,"</button>","</div>","</div>","</div>"].join(""),callback:function callback($dropdown){$dropdown.find(".note-holder").each((function(){var $holder=external_jQuery_default()(this);$holder.append(palette({colors:opt.colors,eventName:$holder.data("event")}).render())}));if(type==="fore"){$dropdown.find(".btn-background-color").hide();$dropdown.css({"min-width":"210px"})}else if(type==="back"){$dropdown.find(".btn-foreground-color").hide();$dropdown.css({"min-width":"210px"})}},click:function click(event){var $button=external_jQuery_default()(event.target);var eventName=$button.data("event");var value=$button.data("value");var foreinput=document.getElementById("html5fcp").value;var backinput=document.getElementById("html5bcp").value;if(value==="cp"){event.stopPropagation()}else if(value==="cpbackColor"){value=backinput}else if(value==="cpforeColor"){value=foreinput}if(eventName&&value){var key=eventName==="backColor"?"background-color":"color";var $color=$button.closest(".note-color").find(".note-recent-color");var $currentButton=$button.closest(".note-color").find(".note-current-color-button");$color.css(key,value);$currentButton.attr("data-"+eventName,value);if(type==="fore"){opt.itemClick("foreColor",value)}else if(type==="back"){opt.itemClick("backColor",value)}else{opt.itemClick(eventName,value)}}}})]}).render()};var dialog=renderer.create('<div class="note-modal" aria-hidden="false" tabindex="-1" role="dialog"></div>',(function($node,options){if(options.fade){$node.addClass("fade")}$node.attr({"aria-label":options.title});$node.html(['<div class="note-modal-content">',options.title?'<div class="note-modal-header"><button type="button" class="close" aria-label="Close" aria-hidden="true"><i class="note-icon-close"></i></button><h4 class="note-modal-title">'+options.title+"</h4></div>":"",'<div class="note-modal-body">'+options.body+"</div>",options.footer?'<div class="note-modal-footer">'+options.footer+"</div>":"","</div>"].join(""));$node.data("modal",new js_ModalUI($node,options))}));var videoDialog=function videoDialog(opt){var body='<div class="note-form-group">'+'<label for="note-dialog-video-url-'+opt.id+'" class="note-form-label">'+opt.lang.video.url+' <small class="text-muted">'+opt.lang.video.providers+"</small></label>"+'<input id="note-dialog-video-url-'+opt.id+'" class="note-video-url note-input" type="text"/>'+"</div>";var footer=['<button type="button" href="#" class="note-btn note-btn-primary note-video-btn disabled" disabled>',opt.lang.video.insert,"</button>"].join("");return dialog({title:opt.lang.video.insert,fade:opt.fade,body:body,footer:footer}).render()};var imageDialog=function imageDialog(opt){var body='<div class="note-form-group note-group-select-from-files">'+'<label for="note-dialog-image-file-'+opt.id+'" class="note-form-label">'+opt.lang.image.selectFromFiles+"</label>"+'<input id="note-dialog-image-file-'+opt.id+'" class="note-note-image-input note-input" type="file" name="files" accept="image/*" multiple="multiple"/>'+opt.imageLimitation+"</div>"+'<div class="note-form-group">'+'<label for="note-dialog-image-url-'+opt.id+'" class="note-form-label">'+opt.lang.image.url+"</label>"+'<input id="note-dialog-image-url-'+opt.id+'" class="note-image-url note-input" type="text"/>'+"</div>";var footer=['<button href="#" type="button" class="note-btn note-btn-primary note-btn-large note-image-btn disabled" disabled>',opt.lang.image.insert,"</button>"].join("");return dialog({title:opt.lang.image.insert,fade:opt.fade,body:body,footer:footer}).render()};var linkDialog=function linkDialog(opt){var body='<div class="note-form-group">'+'<label for="note-dialog-link-txt-'+opt.id+'" class="note-form-label">'+opt.lang.link.textToDisplay+"</label>"+'<input id="note-dialog-link-txt-'+opt.id+'" class="note-link-text note-input" type="text"/>'+"</div>"+'<div class="note-form-group">'+'<label for="note-dialog-link-url-'+opt.id+'" class="note-form-label">'+opt.lang.link.url+"</label>"+'<input id="note-dialog-link-url-'+opt.id+'" class="note-link-url note-input" type="text" value="http://"/>'+"</div>"+(!opt.disableLinkTarget?'<div class="checkbox"><label for="note-dialog-link-nw-'+opt.id+'"><input id="note-dialog-link-nw-'+opt.id+'" type="checkbox" checked> '+opt.lang.link.openInNewWindow+"</label></div>":"")+'<div class="checkbox"><label for="note-dialog-link-up-'+opt.id+'"><input id="note-dialog-link-up-'+opt.id+'" type="checkbox" checked> '+opt.lang.link.useProtocol+"</label></div>";var footer=['<button href="#" type="button" class="note-btn note-btn-primary note-link-btn disabled" disabled>',opt.lang.link.insert,"</button>"].join("");return dialog({className:"link-dialog",title:opt.lang.link.insert,fade:opt.fade,body:body,footer:footer}).render()};var popover=renderer.create(['<div class="note-popover bottom">','<div class="note-popover-arrow"></div>','<div class="popover-content note-children-container"></div>',"</div>"].join(""),(function($node,options){var direction=typeof options.direction!=="undefined"?options.direction:"bottom";$node.addClass(direction).hide();if(options.hideArrow){$node.find(".note-popover-arrow").hide()}}));var summernote_lite_checkbox=renderer.create('<div class="checkbox"></div>',(function($node,options){$node.html(["<label"+(options.id?' for="note-'+options.id+'"':"")+">",'<input role="checkbox" type="checkbox"'+(options.id?' id="note-'+options.id+'"':""),options.checked?" checked":"",' aria-checked="'+(options.checked?"true":"false")+'"/>',options.text?options.text:"","</label>"].join(""))}));var icon=function icon(iconClassName,tagName){if(iconClassName.match(/^</)){return iconClassName}tagName=tagName||"i";return"<"+tagName+' class="'+iconClassName+'"></'+tagName+">"};var ui=function ui(editorOptions){return{editor:editor,toolbar:toolbar,editingArea:editingArea,codable:codable,editable:editable,statusbar:statusbar,airEditor:airEditor,airEditable:airEditable,buttonGroup:buttonGroup,button:summernote_lite_button,dropdown:dropdown,dropdownCheck:dropdownCheck,dropdownButton:dropdownButton,dropdownButtonContents:dropdownButtonContents,dropdownCheckButton:dropdownCheckButton,paragraphDropdownButton:paragraphDropdownButton,tableDropdownButton:tableDropdownButton,colorDropdownButton:colorDropdownButton,palette:palette,dialog:dialog,videoDialog:videoDialog,imageDialog:imageDialog,linkDialog:linkDialog,popover:popover,checkbox:summernote_lite_checkbox,icon:icon,options:editorOptions,toggleBtn:function toggleBtn($btn,isEnable){$btn.toggleClass("disabled",!isEnable);$btn.attr("disabled",!isEnable)},toggleBtnActive:function toggleBtnActive($btn,isActive){$btn.toggleClass("active",isActive)},check:function check($dom,value){$dom.find(".checked").removeClass("checked");$dom.find('[data-value="'+value+'"]').addClass("checked")},onDialogShown:function onDialogShown($dialog,handler){$dialog.one("note.modal.show",handler)},onDialogHidden:function onDialogHidden($dialog,handler){$dialog.one("note.modal.hide",handler)},showDialog:function showDialog($dialog){$dialog.data("modal").show()},hideDialog:function hideDialog($dialog){$dialog.data("modal").hide()},getPopoverContent:function getPopoverContent($popover){return $popover.find(".note-popover-content")},getDialogBody:function getDialogBody($dialog){return $dialog.find(".note-modal-body")},createLayout:function createLayout($note){var $editor=(editorOptions.airMode?airEditor([editingArea([codable(),airEditable()])]):editorOptions.toolbarPosition==="bottom"?editor([editingArea([codable(),editable()]),toolbar(),statusbar()]):editor([toolbar(),editingArea([codable(),editable()]),statusbar()])).render();$editor.insertAfter($note);return{note:$note,editor:$editor,toolbar:$editor.find(".note-toolbar"),editingArea:$editor.find(".note-editing-area"),editable:$editor.find(".note-editable"),codable:$editor.find(".note-codable"),statusbar:$editor.find(".note-statusbar")}},removeLayout:function removeLayout($note,layoutInfo){$note.html(layoutInfo.editable.html());layoutInfo.editor.remove();$note.off("summernote");$note.show()}}};external_jQuery_default().summernote=external_jQuery_default().extend(external_jQuery_default().summernote,{ui_template:ui,interface:"lite"})})();return __webpack_exports__})()}));
576
+ (function webpackUniversalModuleDefinition(root,factory){if(typeof exports==="object"&&typeof module==="object")module.exports=factory(require("jquery"));else if(typeof define==="function"&&define.amd)define(["jquery"],factory);else{var a=typeof exports==="object"?factory(require("jquery")):factory(root["jQuery"]);for(var i in a)(typeof exports==="object"?exports:root)[i]=a[i]}})(self,(__WEBPACK_EXTERNAL_MODULE__8938__=>(()=>{"use strict";var __webpack_modules__={7e3:(__unused_webpack_module,__unused_webpack___webpack_exports__,__webpack_require__)=>{var jquery__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(8938);var jquery__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);jquery__WEBPACK_IMPORTED_MODULE_0___default().summernote=jquery__WEBPACK_IMPORTED_MODULE_0___default().summernote||{lang:{}};jquery__WEBPACK_IMPORTED_MODULE_0___default().extend(true,jquery__WEBPACK_IMPORTED_MODULE_0___default().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",sizeunit:"Font Size Unit"},image:{image:"Picture",insert:"Insert Image",resizeFull:"Resize full",resizeHalf:"Resize half",resizeQuarter:"Resize quarter",resizeNone:"Original size",floatLeft:"Float Left",floatRight:"Float Right",floatNone:"Remove float",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, Google Drive, Vimeo, Vine, Instagram, DailyMotion, Youku, Peertube)"},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:"Text Color",transparent:"Transparent",setTransparent:"Set transparent",reset:"Reset",resetToDefault:"Reset to default",cpSelect:"Select"},shortcut:{shortcuts:"Keyboard shortcuts",close:"Close",textFormatting:"Text formatting",action:"Action",paragraphFormatting:"Paragraph formatting",documentStyle:"Document Style",extraKeys:"Extra keys"},help:{escape:"Escape",insertParagraph:"Insert Paragraph",undo:"Undo the last command",redo:"Redo 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"},output:{noSelection:"No Selection Made!"}}})},8938:module=>{module.exports=__WEBPACK_EXTERNAL_MODULE__8938__}};var __webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==undefined){return cachedModule.exports}var module=__webpack_module_cache__[moduleId]={exports:{}};__webpack_modules__[moduleId](module,module.exports,__webpack_require__);return module.exports}(()=>{__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module["default"]:()=>module;__webpack_require__.d(getter,{a:getter});return getter}})();(()=>{__webpack_require__.d=(exports,definition)=>{for(var key in definition){if(__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)){Object.defineProperty(exports,key,{enumerable:true,get:definition[key]})}}}})();(()=>{__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop)})();var __webpack_exports__={};var external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_=__webpack_require__(8938);var external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default=__webpack_require__.n(external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_);var summernote_en_US=__webpack_require__(7e3);var genericFontFamilies=["sans-serif","serif","monospace","cursive","fantasy"];function validFontName(fontName){return external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().inArray(fontName.toLowerCase(),genericFontFamilies)===-1?"'".concat(fontName,"'"):fontName}function createIsFontInstalledFunc(){var testText="mw";var fontSize="20px";var canvasWidth=40;var canvasHeight=20;var canvas=document.createElement("canvas");var context=canvas.getContext("2d",{willReadFrequently:true});canvas.width=canvasWidth;canvas.height=canvasHeight;context.textAlign="center";context.fillStyle="black";context.textBaseline="middle";function getPxInfo(font,testFontName){context.clearRect(0,0,canvasWidth,canvasHeight);context.font=fontSize+" "+validFontName(font)+', "'+testFontName+'"';context.fillText(testText,canvasWidth/2,canvasHeight/2);var pxInfo=context.getImageData(0,0,canvasWidth,canvasHeight).data;return pxInfo.join("")}return function(fontName){var testFontName=fontName==="Comic Sans MS"?"Courier New":"Comic Sans MS";var testInfo=getPxInfo(testFontName,testFontName);var fontInfo=getPxInfo(fontName,testFontName);return testInfo!==fontInfo}}var userAgent=navigator.userAgent;var isMSIE=/MSIE|Trident/i.test(userAgent);var browserVersion;if(isMSIE){var matches=/MSIE (\d+[.]\d+)/.exec(userAgent);if(matches){browserVersion=parseFloat(matches[1])}matches=/Trident\/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(userAgent);if(matches){browserVersion=parseFloat(matches[1])}}var isEdge=/Edge\/\d+/.test(userAgent);var isSupportTouch="ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0;var inputEventName=isMSIE?"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted":"input";const env={isMac:navigator.appVersion.indexOf("Mac")>-1,isMSIE:isMSIE,isEdge:isEdge,isFF:!isEdge&&/firefox/i.test(userAgent),isPhantom:/PhantomJS/i.test(userAgent),isWebkit:!isEdge&&/webkit/i.test(userAgent),isChrome:!isEdge&&/chrome/i.test(userAgent),isSafari:!isEdge&&/safari/i.test(userAgent)&&!/chrome/i.test(userAgent),browserVersion:browserVersion,isSupportTouch:isSupportTouch,isFontInstalled:createIsFontInstalledFunc(),isW3CRangeSupport:!!document.createRange,inputEventName:inputEventName,genericFontFamilies:genericFontFamilies,validFontName:validFontName};function eq(itemA){return function(itemB){return itemA===itemB}}function eq2(itemA,itemB){return itemA===itemB}function peq2(propName){return function(itemA,itemB){return itemA[propName]===itemB[propName]}}function ok(){return true}function fail(){return false}function not(f){return function(){return!f.apply(f,arguments)}}function and(fA,fB){return function(item){return fA(item)&&fB(item)}}function func_self(a){return a}function invoke(obj,method){return function(){return obj[method].apply(obj,arguments)}}var idCounter=0;function resetUniqueId(){idCounter=0}function uniqueId(prefix){var id=++idCounter+"";return prefix?prefix+id:id}function rect2bnd(rect){var $document=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(document);return{top:rect.top+$document.scrollTop(),left:rect.left+$document.scrollLeft(),width:rect.right-rect.left,height:rect.bottom-rect.top}}function invertObject(obj){var inverted={};for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key)){inverted[obj[key]]=key}}return inverted}function namespaceToCamel(namespace,prefix){prefix=prefix||"";return prefix+namespace.split(".").map((function(name){return name.substring(0,1).toUpperCase()+name.substring(1)})).join("")}function debounce(func,wait,immediate){var timeout;return function(){var context=this;var args=arguments;var later=function later(){timeout=null;if(!immediate){func.apply(context,args)}};var callNow=immediate&&!timeout;clearTimeout(timeout);timeout=setTimeout(later,wait);if(callNow){func.apply(context,args)}}}function isValidUrl(url){var expression=/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi;return expression.test(url)}const func={eq:eq,eq2:eq2,peq2:peq2,ok:ok,fail:fail,self:func_self,not:not,and:and,invoke:invoke,resetUniqueId:resetUniqueId,uniqueId:uniqueId,rect2bnd:rect2bnd,invertObject:invertObject,namespaceToCamel:namespaceToCamel,debounce:debounce,isValidUrl:isValidUrl};function head(array){return array[0]}function last(array){return array[array.length-1]}function initial(array){return array.slice(0,array.length-1)}function tail(array){return array.slice(1)}function find(array,pred){for(var idx=0,len=array.length;idx<len;idx++){var item=array[idx];if(pred(item)){return item}}}function lists_all(array,pred){for(var idx=0,len=array.length;idx<len;idx++){if(!pred(array[idx])){return false}}return true}function contains(array,item){if(array&&array.length&&item){if(array.indexOf){return array.indexOf(item)!==-1}else if(array.contains){return array.contains(item)}}return false}function sum(array,fn){fn=fn||func.self;return array.reduce((function(memo,v){return memo+fn(v)}),0)}function from(collection){var result=[];var length=collection.length;var idx=-1;while(++idx<length){result[idx]=collection[idx]}return result}function isEmpty(array){return!array||!array.length}function clusterBy(array,fn){if(!array.length){return[]}var aTail=tail(array);return aTail.reduce((function(memo,v){var aLast=last(memo);if(fn(last(aLast),v)){aLast[aLast.length]=v}else{memo[memo.length]=[v]}return memo}),[[head(array)]])}function compact(array){var aResult=[];for(var idx=0,len=array.length;idx<len;idx++){if(array[idx]){aResult.push(array[idx])}}return aResult}function unique(array){var results=[];for(var idx=0,len=array.length;idx<len;idx++){if(!contains(results,array[idx])){results.push(array[idx])}}return results}function next(array,item){if(array&&array.length&&item){var idx=array.indexOf(item);return idx===-1?null:array[idx+1]}return null}function prev(array,item){if(array&&array.length&&item){var idx=array.indexOf(item);return idx===-1?null:array[idx-1]}return null}const lists={head:head,last:last,initial:initial,tail:tail,prev:prev,next:next,find:find,contains:contains,all:lists_all,sum:sum,from:from,isEmpty:isEmpty,clusterBy:clusterBy,compact:compact,unique:unique};var NBSP_CHAR=String.fromCharCode(160);var ZERO_WIDTH_NBSP_CHAR="\ufeff";function isEditable(node){return node&&external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(node).hasClass("note-editable")}function isControlSizing(node){return node&&external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(node).hasClass("note-control-sizing")}function makePredByNodeName(nodeName){nodeName=nodeName.toUpperCase();return function(node){return node&&node.nodeName.toUpperCase()===nodeName}}function isText(node){return node&&node.nodeType===3}function isElement(node){return node&&node.nodeType===1}function isVoid(node){return node&&/^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT|^AUDIO|^VIDEO|^EMBED/.test(node.nodeName.toUpperCase())}function isPara(node){if(isEditable(node)){return false}return node&&/^DIV|^P|^LI|^H[1-7]/.test(node.nodeName.toUpperCase())}function isHeading(node){return node&&/^H[1-7]/.test(node.nodeName.toUpperCase())}var isPre=makePredByNodeName("PRE");var isLi=makePredByNodeName("LI");function isPurePara(node){return isPara(node)&&!isLi(node)}var isTable=makePredByNodeName("TABLE");var isData=makePredByNodeName("DATA");function isInline(node){return!isBodyContainer(node)&&!isList(node)&&!isHr(node)&&!isPara(node)&&!isTable(node)&&!isBlockquote(node)&&!isData(node)}function isList(node){return node&&/^UL|^OL/.test(node.nodeName.toUpperCase())}var isHr=makePredByNodeName("HR");function isCell(node){return node&&/^TD|^TH/.test(node.nodeName.toUpperCase())}var isBlockquote=makePredByNodeName("BLOCKQUOTE");function isBodyContainer(node){return isCell(node)||isBlockquote(node)||isEditable(node)}var isAnchor=makePredByNodeName("A");function isParaInline(node){return isInline(node)&&!!ancestor(node,isPara)}function isBodyInline(node){return isInline(node)&&!ancestor(node,isPara)}var isBody=makePredByNodeName("BODY");function isClosestSibling(nodeA,nodeB){return nodeA.nextSibling===nodeB||nodeA.previousSibling===nodeB}function withClosestSiblings(node,pred){pred=pred||func.ok;var siblings=[];if(node.previousSibling&&pred(node.previousSibling)){siblings.push(node.previousSibling)}siblings.push(node);if(node.nextSibling&&pred(node.nextSibling)){siblings.push(node.nextSibling)}return siblings}var blankHTML=env.isMSIE&&env.browserVersion<11?"&nbsp;":"<br>";function nodeLength(node){if(isText(node)){return node.nodeValue.length}if(node){return node.childNodes.length}return 0}function deepestChildIsEmpty(node){do{if(node.firstElementChild===null||node.firstElementChild.innerHTML==="")break}while(node=node.firstElementChild);return dom_isEmpty(node)}function dom_isEmpty(node){var len=nodeLength(node);if(len===0){return true}else if(!isText(node)&&len===1&&node.innerHTML===blankHTML){return true}else if(lists.all(node.childNodes,isText)&&node.innerHTML===""){return true}return false}function paddingBlankHTML(node){if(!isVoid(node)&&!nodeLength(node)){node.innerHTML=blankHTML}}function ancestor(node,pred){while(node){if(pred(node)){return node}if(isEditable(node)){break}node=node.parentNode}return null}function singleChildAncestor(node,pred){node=node.parentNode;while(node){if(nodeLength(node)!==1){break}if(pred(node)){return node}if(isEditable(node)){break}node=node.parentNode}return null}function listAncestor(node,pred){pred=pred||func.fail;var ancestors=[];ancestor(node,(function(el){if(!isEditable(el)){ancestors.push(el)}return pred(el)}));return ancestors}function lastAncestor(node,pred){var ancestors=listAncestor(node);return lists.last(ancestors.filter(pred))}function commonAncestor(nodeA,nodeB){var ancestors=listAncestor(nodeA);for(var n=nodeB;n;n=n.parentNode){if(ancestors.indexOf(n)>-1)return n}return null}function listPrev(node,pred){pred=pred||func.fail;var nodes=[];while(node){if(pred(node)){break}nodes.push(node);node=node.previousSibling}return nodes}function listNext(node,pred){pred=pred||func.fail;var nodes=[];while(node){if(pred(node)){break}nodes.push(node);node=node.nextSibling}return nodes}function listDescendant(node,pred){var descendants=[];pred=pred||func.ok;(function fnWalk(current){if(node!==current&&pred(current)){descendants.push(current)}for(var idx=0,len=current.childNodes.length;idx<len;idx++){fnWalk(current.childNodes[idx])}})(node);return descendants}function wrap(node,wrapperName){var parent=node.parentNode;var wrapper=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<"+wrapperName+">")[0];parent.insertBefore(wrapper,node);wrapper.appendChild(node);return wrapper}function insertAfter(node,preceding){var next=preceding.nextSibling;var parent=preceding.parentNode;if(next){parent.insertBefore(node,next)}else{parent.appendChild(node)}return node}function appendChildNodes(node,aChild,isSkipPaddingBlankHTML){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(aChild,(function(idx,child){if(!isSkipPaddingBlankHTML&&isLi(node)&&node.firstChild===null&&isList(child)){node.appendChild(create("br"))}node.appendChild(child)}));return node}function isLeftEdgePoint(point){return point.offset===0}function isRightEdgePoint(point){return point.offset===nodeLength(point.node)}function isEdgePoint(point){return isLeftEdgePoint(point)||isRightEdgePoint(point)}function isLeftEdgeOf(node,ancestor){while(node&&node!==ancestor){if(position(node)!==0){return false}node=node.parentNode}return true}function isRightEdgeOf(node,ancestor){if(!ancestor){return false}while(node&&node!==ancestor){if(position(node)!==nodeLength(node.parentNode)-1){return false}node=node.parentNode}return true}function isLeftEdgePointOf(point,ancestor){return isLeftEdgePoint(point)&&isLeftEdgeOf(point.node,ancestor)}function isRightEdgePointOf(point,ancestor){return isRightEdgePoint(point)&&isRightEdgeOf(point.node,ancestor)}function position(node){var offset=0;while(node=node.previousSibling){offset+=1}return offset}function hasChildren(node){return!!(node&&node.childNodes&&node.childNodes.length)}function prevPoint(point,isSkipInnerOffset){var node;var offset;if(point.offset===0){if(isEditable(point.node)){return null}node=point.node.parentNode;offset=position(point.node)}else if(hasChildren(point.node)){node=point.node.childNodes[point.offset-1];offset=nodeLength(node)}else{node=point.node;offset=isSkipInnerOffset?0:point.offset-1}return{node:node,offset:offset}}function nextPoint(point,isSkipInnerOffset){var node,offset;if(nodeLength(point.node)===point.offset){if(isEditable(point.node)){return null}var nextTextNode=getNextTextNode(point.node);if(nextTextNode){node=nextTextNode;offset=0}else{node=point.node.parentNode;offset=position(point.node)+1}}else if(hasChildren(point.node)){node=point.node.childNodes[point.offset];offset=0}else{node=point.node;offset=isSkipInnerOffset?nodeLength(point.node):point.offset+1}return{node:node,offset:offset}}function nextPointWithEmptyNode(point,isSkipInnerOffset){var node,offset=0;if(nodeLength(point.node)===point.offset){if(isEditable(point.node)){return null}node=point.node.parentNode;offset=position(point.node)+1;if(isEditable(node)){node=point.node.nextSibling;offset=0}}else if(hasChildren(point.node)){node=point.node.childNodes[point.offset];offset=0}else{node=point.node;offset=isSkipInnerOffset?nodeLength(point.node):point.offset+1}return{node:node,offset:offset}}function getNextTextNode(actual){if(!actual.nextSibling)return undefined;if(actual.parent!==actual.nextSibling.parent)return undefined;if(isText(actual.nextSibling))return actual.nextSibling;else return getNextTextNode(actual.nextSibling)}function isSamePoint(pointA,pointB){return pointA.node===pointB.node&&pointA.offset===pointB.offset}function isVisiblePoint(point){if(isText(point.node)||!hasChildren(point.node)||dom_isEmpty(point.node)){return true}var leftNode=point.node.childNodes[point.offset-1];var rightNode=point.node.childNodes[point.offset];if((!leftNode||isVoid(leftNode))&&(!rightNode||isVoid(rightNode))||isTable(rightNode)){return true}return false}function prevPointUntil(point,pred){while(point){if(pred(point)){return point}point=prevPoint(point)}return null}function nextPointUntil(point,pred){while(point){if(pred(point)){return point}point=nextPoint(point)}return null}function isCharPoint(point){if(!isText(point.node)){return false}var ch=point.node.nodeValue.charAt(point.offset-1);return ch&&ch!==" "&&ch!==NBSP_CHAR}function isSpacePoint(point){if(!isText(point.node)){return false}var ch=point.node.nodeValue.charAt(point.offset-1);return ch===" "||ch===NBSP_CHAR}function walkPoint(startPoint,endPoint,handler,isSkipInnerOffset){var point=startPoint;while(point&&point.node){handler(point);if(isSamePoint(point,endPoint)){break}var isSkipOffset=isSkipInnerOffset&&startPoint.node!==point.node&&endPoint.node!==point.node;point=nextPointWithEmptyNode(point,isSkipOffset)}}function makeOffsetPath(ancestor,node){var ancestors=listAncestor(node,func.eq(ancestor));return ancestors.map(position).reverse()}function fromOffsetPath(ancestor,offsets){var current=ancestor;for(var i=0,len=offsets.length;i<len;i++){if(current.childNodes.length<=offsets[i]){current=current.childNodes[current.childNodes.length-1]}else{current=current.childNodes[offsets[i]]}}return current}function splitNode(point,options){var isSkipPaddingBlankHTML=options&&options.isSkipPaddingBlankHTML;var isNotSplitEdgePoint=options&&options.isNotSplitEdgePoint;var isDiscardEmptySplits=options&&options.isDiscardEmptySplits;if(isDiscardEmptySplits){isSkipPaddingBlankHTML=true}if(isEdgePoint(point)&&(isText(point.node)||isNotSplitEdgePoint)){if(isLeftEdgePoint(point)){return point.node}else if(isRightEdgePoint(point)){return point.node.nextSibling}}if(isText(point.node)){return point.node.splitText(point.offset)}else{var childNode=point.node.childNodes[point.offset];var childNodes=listNext(childNode);var clone=insertAfter(point.node.cloneNode(false),point.node);appendChildNodes(clone,childNodes);if(!isSkipPaddingBlankHTML){paddingBlankHTML(point.node);paddingBlankHTML(clone)}if(isDiscardEmptySplits){if(dom_isEmpty(point.node)){remove(point.node)}if(dom_isEmpty(clone)){remove(clone);return point.node.nextSibling}}return clone}}function splitTree(root,point,options){var ancestors=listAncestor(point.node,func.eq(root));if(!ancestors.length){return null}else if(ancestors.length===1){return splitNode(point,options)}if(ancestors.length>2){var domList=ancestors.slice(0,ancestors.length-1);var ifHasNextSibling=domList.find((function(item){return item.nextSibling}));if(ifHasNextSibling&&point.offset!=0&&isRightEdgePoint(point)){var nestSibling=ifHasNextSibling.nextSibling;var textNode;if(nestSibling.nodeType==1){textNode=nestSibling.childNodes[0];ancestors=listAncestor(textNode,func.eq(root));point={node:textNode,offset:0}}else if(nestSibling.nodeType==3&&!nestSibling.data.match(/[\n\r]/g)){textNode=nestSibling;ancestors=listAncestor(textNode,func.eq(root));point={node:textNode,offset:0}}}}return ancestors.reduce((function(node,parent){if(node===point.node){node=splitNode(point,options)}return splitNode({node:parent,offset:node?position(node):nodeLength(parent)},options)}))}function splitPoint(point,isInline){var pred=isInline?isPara:isBodyContainer;var ancestors=listAncestor(point.node,pred);var topAncestor=lists.last(ancestors)||point.node;var splitRoot,container;if(pred(topAncestor)){splitRoot=ancestors[ancestors.length-2];container=topAncestor}else{splitRoot=topAncestor;container=splitRoot.parentNode}var pivot=splitRoot&&splitTree(splitRoot,point,{isSkipPaddingBlankHTML:isInline,isNotSplitEdgePoint:isInline});if(!pivot&&container===point.node){pivot=point.node.childNodes[point.offset]}return{rightNode:pivot,container:container}}function create(nodeName){return document.createElement(nodeName)}function createText(text){return document.createTextNode(text)}function remove(node,isRemoveChild){if(!node||!node.parentNode){return}if(node.removeNode){return node.removeNode(isRemoveChild)}var parent=node.parentNode;if(!isRemoveChild){var nodes=[];for(var i=0,len=node.childNodes.length;i<len;i++){nodes.push(node.childNodes[i])}for(var _i=0,_len=nodes.length;_i<_len;_i++){parent.insertBefore(nodes[_i],node)}}parent.removeChild(node)}function removeWhile(node,pred){while(node){if(isEditable(node)||!pred(node)){break}var parent=node.parentNode;remove(node);node=parent}}function replace(node,nodeName){if(node.nodeName.toUpperCase()===nodeName.toUpperCase()){return node}var newNode=create(nodeName);if(node.style.cssText){newNode.style.cssText=node.style.cssText}appendChildNodes(newNode,lists.from(node.childNodes));insertAfter(newNode,node);remove(node);return newNode}var isTextarea=makePredByNodeName("TEXTAREA");function value($node,stripLinebreaks){var val=isTextarea($node[0])?$node.val():$node.html();if(stripLinebreaks){return val.replace(/[\n\r]/g,"")}return val}function html($node,isNewlineOnBlock){var markup=value($node);if(isNewlineOnBlock){var regexTag=/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g;markup=markup.replace(regexTag,(function(match,endSlash,name){name=name.toUpperCase();var isEndOfInlineContainer=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(name)&&!!endSlash;var isBlockNode=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(name);return match+(isEndOfInlineContainer||isBlockNode?"\n":"")}));markup=markup.trim()}return markup}function posFromPlaceholder(placeholder){var $placeholder=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(placeholder);var pos=$placeholder.offset();var height=$placeholder.outerHeight(true);return{left:pos.left,top:pos.top+height}}function attachEvents($node,events){Object.keys(events).forEach((function(key){$node.on(key,events[key])}))}function detachEvents($node,events){Object.keys(events).forEach((function(key){$node.off(key,events[key])}))}function isCustomStyleTag(node){return node&&!isText(node)&&lists.contains(node.classList,"note-styletag")}const dom={NBSP_CHAR:NBSP_CHAR,ZERO_WIDTH_NBSP_CHAR:ZERO_WIDTH_NBSP_CHAR,blank:blankHTML,emptyPara:"<p>".concat(blankHTML,"</p>"),makePredByNodeName:makePredByNodeName,isEditable:isEditable,isControlSizing:isControlSizing,isText:isText,isElement:isElement,isVoid:isVoid,isPara:isPara,isPurePara:isPurePara,isHeading:isHeading,isInline:isInline,isBlock:func.not(isInline),isBodyInline:isBodyInline,isBody:isBody,isParaInline:isParaInline,isPre:isPre,isList:isList,isTable:isTable,isData:isData,isCell:isCell,isBlockquote:isBlockquote,isBodyContainer:isBodyContainer,isAnchor:isAnchor,isDiv:makePredByNodeName("DIV"),isLi:isLi,isBR:makePredByNodeName("BR"),isSpan:makePredByNodeName("SPAN"),isB:makePredByNodeName("B"),isU:makePredByNodeName("U"),isS:makePredByNodeName("S"),isI:makePredByNodeName("I"),isImg:makePredByNodeName("IMG"),isTextarea:isTextarea,deepestChildIsEmpty:deepestChildIsEmpty,isEmpty:dom_isEmpty,isEmptyAnchor:func.and(isAnchor,dom_isEmpty),isClosestSibling:isClosestSibling,withClosestSiblings:withClosestSiblings,nodeLength:nodeLength,isLeftEdgePoint:isLeftEdgePoint,isRightEdgePoint:isRightEdgePoint,isEdgePoint:isEdgePoint,isLeftEdgeOf:isLeftEdgeOf,isRightEdgeOf:isRightEdgeOf,isLeftEdgePointOf:isLeftEdgePointOf,isRightEdgePointOf:isRightEdgePointOf,prevPoint:prevPoint,nextPoint:nextPoint,nextPointWithEmptyNode:nextPointWithEmptyNode,isSamePoint:isSamePoint,isVisiblePoint:isVisiblePoint,prevPointUntil:prevPointUntil,nextPointUntil:nextPointUntil,isCharPoint:isCharPoint,isSpacePoint:isSpacePoint,walkPoint:walkPoint,ancestor:ancestor,singleChildAncestor:singleChildAncestor,listAncestor:listAncestor,lastAncestor:lastAncestor,listNext:listNext,listPrev:listPrev,listDescendant:listDescendant,commonAncestor:commonAncestor,wrap:wrap,insertAfter:insertAfter,appendChildNodes:appendChildNodes,position:position,hasChildren:hasChildren,makeOffsetPath:makeOffsetPath,fromOffsetPath:fromOffsetPath,splitTree:splitTree,splitPoint:splitPoint,create:create,createText:createText,remove:remove,removeWhile:removeWhile,replace:replace,html:html,value:value,posFromPlaceholder:posFromPlaceholder,attachEvents:attachEvents,detachEvents:detachEvents,isCustomStyleTag:isCustomStyleTag};function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var Context=function(){function Context($note,options){_classCallCheck(this,Context);this.$note=$note;this.memos={};this.modules={};this.layoutInfo={};this.options=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend(true,{},options);external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.ui=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.ui_template(this.options);this.ui=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.ui;this.initialize()}return _createClass(Context,[{key:"initialize",value:function initialize(){this.layoutInfo=this.ui.createLayout(this.$note);this._initialize();this.$note.hide();return this}},{key:"destroy",value:function destroy(){this._destroy();this.$note.removeData("summernote");this.ui.removeLayout(this.$note,this.layoutInfo)}},{key:"reset",value:function reset(){var disabled=this.isDisabled();this.code(dom.emptyPara);this._destroy();this._initialize();if(disabled){this.disable()}}},{key:"_initialize",value:function _initialize(){var _this=this;this.options.id=func.uniqueId(external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().now());this.options.container=this.options.container||this.layoutInfo.editor;var buttons=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend({},this.options.buttons);Object.keys(buttons).forEach((function(key){_this.memo("button."+key,buttons[key])}));var modules=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend({},this.options.modules,external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.plugins||{});Object.keys(modules).forEach((function(key){_this.module(key,modules[key],true)}));Object.keys(this.modules).forEach((function(key){_this.initializeModule(key)}))}},{key:"_destroy",value:function _destroy(){var _this2=this;Object.keys(this.modules).reverse().forEach((function(key){_this2.removeModule(key)}));Object.keys(this.memos).forEach((function(key){_this2.removeMemo(key)}));this.triggerEvent("destroy",this)}},{key:"code",value:function code(html){var isActivated=this.invoke("codeview.isActivated");if(html===undefined){this.invoke("codeview.sync");return isActivated?this.layoutInfo.codable.val():this.layoutInfo.editable.html()}else{if(isActivated){this.invoke("codeview.sync",html)}else{this.layoutInfo.editable.html(html)}this.$note.val(html);this.triggerEvent("change",html,this.layoutInfo.editable)}}},{key:"isDisabled",value:function isDisabled(){return this.layoutInfo.editable.attr("contenteditable")==="false"}},{key:"enable",value:function enable(){this.layoutInfo.editable.attr("contenteditable",true);this.invoke("toolbar.activate",true);this.triggerEvent("disable",false);this.options.editing=true}},{key:"disable",value:function disable(){if(this.invoke("codeview.isActivated")){this.invoke("codeview.deactivate")}this.layoutInfo.editable.attr("contenteditable",false);this.options.editing=false;this.invoke("toolbar.deactivate",true);this.triggerEvent("disable",true)}},{key:"triggerEvent",value:function triggerEvent(){var namespace=lists.head(arguments);var args=lists.tail(lists.from(arguments));var callback=this.options.callbacks[func.namespaceToCamel(namespace,"on")];if(callback){callback.apply(this.$note[0],args)}this.$note.trigger("summernote."+namespace,args)}},{key:"initializeModule",value:function initializeModule(key){var module=this.modules[key];module.shouldInitialize=module.shouldInitialize||func.ok;if(!module.shouldInitialize()){return}if(module.initialize){module.initialize()}if(module.events){dom.attachEvents(this.$note,module.events)}}},{key:"module",value:function module(key,ModuleClass,withoutIntialize){if(arguments.length===1){return this.modules[key]}this.modules[key]=new ModuleClass(this);if(!withoutIntialize){this.initializeModule(key)}}},{key:"removeModule",value:function removeModule(key){var module=this.modules[key];if(module.shouldInitialize()){if(module.events){dom.detachEvents(this.$note,module.events)}if(module.destroy){module.destroy()}}delete this.modules[key]}},{key:"memo",value:function memo(key,obj){if(arguments.length===1){return this.memos[key]}this.memos[key]=obj}},{key:"removeMemo",value:function removeMemo(key){if(this.memos[key]&&this.memos[key].destroy){this.memos[key].destroy()}delete this.memos[key]}},{key:"createInvokeHandlerAndUpdateState",value:function createInvokeHandlerAndUpdateState(namespace,value){var _this3=this;return function(event){_this3.createInvokeHandler(namespace,value)(event);_this3.invoke("buttons.updateCurrentStyle")}}},{key:"createInvokeHandler",value:function createInvokeHandler(namespace,value){var _this4=this;return function(event){event.preventDefault();var $target=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(event.target);_this4.invoke(namespace,value||$target.closest("[data-value]").data("value"),$target)}}},{key:"invoke",value:function invoke(){var namespace=lists.head(arguments);var args=lists.tail(lists.from(arguments));var splits=namespace.split(".");var hasSeparator=splits.length>1;var moduleName=hasSeparator&&lists.head(splits);var methodName=hasSeparator?lists.last(splits):lists.head(splits);var module=this.modules[moduleName||"editor"];if(!moduleName&&this[methodName]){return this[methodName].apply(this,args)}else if(module&&module[methodName]&&module.shouldInitialize()){return module[methodName].apply(module,args)}}}])}();function summernote_typeof(o){"@babel/helpers - typeof";return summernote_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},summernote_typeof(o)}external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().fn.extend({summernote:function summernote(){var type=summernote_typeof(lists.head(arguments));var isExternalAPICalled=type==="string";var hasInitOptions=type==="object";var options=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend({},external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.options,hasInitOptions?lists.head(arguments):{});options.langInfo=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend(true,{},external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.lang["en-US"],external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.lang[options.lang]);options.icons=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend(true,{},external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.options.icons,options.icons);options.tooltip=options.tooltip==="auto"?!env.isSupportTouch:options.tooltip;this.each((function(idx,note){var $note=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(note);if(!$note.data("summernote")){var context=new Context($note,options);$note.data("summernote",context);$note.data("summernote").triggerEvent("init",context.layoutInfo)}}));var $note=this.first();if($note.length){var context=$note.data("summernote");if(isExternalAPICalled){return context.invoke.apply(context,lists.from(arguments))}else if(options.focus){context.invoke("editor.focus")}}return this}});function range_typeof(o){"@babel/helpers - typeof";return range_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},range_typeof(o)}function range_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function range_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,range_toPropertyKey(o.key),o)}}function range_createClass(e,r,t){return r&&range_defineProperties(e.prototype,r),t&&range_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function range_toPropertyKey(t){var i=range_toPrimitive(t,"string");return"symbol"==range_typeof(i)?i:i+""}function range_toPrimitive(t,r){if("object"!=range_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=range_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}function textRangeToPoint(textRange,isStart){var container=textRange.parentElement();var offset;var tester=document.body.createTextRange();var prevContainer;var childNodes=lists.from(container.childNodes);for(offset=0;offset<childNodes.length;offset++){if(dom.isText(childNodes[offset])){continue}tester.moveToElementText(childNodes[offset]);if(tester.compareEndPoints("StartToStart",textRange)>=0){break}prevContainer=childNodes[offset]}if(offset!==0&&dom.isText(childNodes[offset-1])){var textRangeStart=document.body.createTextRange();var curTextNode=null;textRangeStart.moveToElementText(prevContainer||container);textRangeStart.collapse(!prevContainer);curTextNode=prevContainer?prevContainer.nextSibling:container.firstChild;var pointTester=textRange.duplicate();pointTester.setEndPoint("StartToStart",textRangeStart);var textCount=pointTester.text.replace(/[\r\n]/g,"").length;while(textCount>curTextNode.nodeValue.length&&curTextNode.nextSibling){textCount-=curTextNode.nodeValue.length;curTextNode=curTextNode.nextSibling}var dummy=curTextNode.nodeValue;if(isStart&&curTextNode.nextSibling&&dom.isText(curTextNode.nextSibling)&&textCount===curTextNode.nodeValue.length){textCount-=curTextNode.nodeValue.length;curTextNode=curTextNode.nextSibling}container=curTextNode;offset=textCount}return{cont:container,offset:offset}}function pointToTextRange(point){var textRangeInfo=function textRangeInfo(container,offset){var node,isCollapseToStart;if(dom.isText(container)){var prevTextNodes=dom.listPrev(container,func.not(dom.isText));var prevContainer=lists.last(prevTextNodes).previousSibling;node=prevContainer||container.parentNode;offset+=lists.sum(lists.tail(prevTextNodes),dom.nodeLength);isCollapseToStart=!prevContainer}else{node=container.childNodes[offset]||container;if(dom.isText(node)){return textRangeInfo(node,0)}offset=0;isCollapseToStart=false}return{node:node,collapseToStart:isCollapseToStart,offset:offset}};var textRange=document.body.createTextRange();var info=textRangeInfo(point.node,point.offset);textRange.moveToElementText(info.node);textRange.collapse(info.collapseToStart);textRange.moveStart("character",info.offset);return textRange}var WrappedRange=function(){function WrappedRange(sc,so,ec,eo){range_classCallCheck(this,WrappedRange);this.sc=sc;this.so=so;this.ec=ec;this.eo=eo;this.isOnEditable=this.makeIsOn(dom.isEditable);this.isOnList=this.makeIsOn(dom.isList);this.isOnAnchor=this.makeIsOn(dom.isAnchor);this.isOnCell=this.makeIsOn(dom.isCell);this.isOnData=this.makeIsOn(dom.isData)}return range_createClass(WrappedRange,[{key:"nativeRange",value:function nativeRange(){if(env.isW3CRangeSupport){var w3cRange=document.createRange();w3cRange.setStart(this.sc,this.so);w3cRange.setEnd(this.ec,this.eo);return w3cRange}else{var textRange=pointToTextRange({node:this.sc,offset:this.so});textRange.setEndPoint("EndToEnd",pointToTextRange({node:this.ec,offset:this.eo}));return textRange}}},{key:"getPoints",value:function getPoints(){return{sc:this.sc,so:this.so,ec:this.ec,eo:this.eo}}},{key:"getStartPoint",value:function getStartPoint(){return{node:this.sc,offset:this.so}}},{key:"getEndPoint",value:function getEndPoint(){return{node:this.ec,offset:this.eo}}},{key:"select",value:function select(){var nativeRng=this.nativeRange();if(env.isW3CRangeSupport){var selection=document.getSelection();if(selection.rangeCount>0){selection.removeAllRanges()}selection.addRange(nativeRng)}else{nativeRng.select()}return this}},{key:"scrollIntoView",value:function scrollIntoView(container){var height=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(container).height();if(container.scrollTop+height<this.sc.offsetTop){container.scrollTop+=Math.abs(container.scrollTop+height-this.sc.offsetTop)}return this}},{key:"normalize",value:function normalize(){var getVisiblePoint=function getVisiblePoint(point,isLeftToRight){if(!point){return point}if(dom.isVisiblePoint(point)){if(!dom.isEdgePoint(point)||dom.isRightEdgePoint(point)&&!isLeftToRight||dom.isLeftEdgePoint(point)&&isLeftToRight||dom.isRightEdgePoint(point)&&isLeftToRight&&dom.isVoid(point.node.nextSibling)||dom.isLeftEdgePoint(point)&&!isLeftToRight&&dom.isVoid(point.node.previousSibling)||dom.isBlock(point.node)&&dom.isEmpty(point.node)){return point}}var block=dom.ancestor(point.node,dom.isBlock);var hasRightNode=false;if(!hasRightNode){var prevPoint=dom.prevPoint(point)||{node:null};hasRightNode=(dom.isLeftEdgePointOf(point,block)||dom.isVoid(prevPoint.node))&&!isLeftToRight}var hasLeftNode=false;if(!hasLeftNode){var _nextPoint=dom.nextPoint(point)||{node:null};hasLeftNode=(dom.isRightEdgePointOf(point,block)||dom.isVoid(_nextPoint.node))&&isLeftToRight}if(hasRightNode||hasLeftNode){if(dom.isVisiblePoint(point)){return point}isLeftToRight=!isLeftToRight}var nextPoint=isLeftToRight?dom.nextPointUntil(dom.nextPoint(point),dom.isVisiblePoint):dom.prevPointUntil(dom.prevPoint(point),dom.isVisiblePoint);return nextPoint||point};var endPoint=getVisiblePoint(this.getEndPoint(),false);var startPoint=this.isCollapsed()?endPoint:getVisiblePoint(this.getStartPoint(),true);return new WrappedRange(startPoint.node,startPoint.offset,endPoint.node,endPoint.offset)}},{key:"nodes",value:function nodes(pred,options){pred=pred||func.ok;var includeAncestor=options&&options.includeAncestor;var fullyContains=options&&options.fullyContains;var startPoint=this.getStartPoint();var endPoint=this.getEndPoint();var nodes=[];var leftEdgeNodes=[];dom.walkPoint(startPoint,endPoint,(function(point){if(dom.isEditable(point.node)){return}var node;if(fullyContains){if(dom.isLeftEdgePoint(point)){leftEdgeNodes.push(point.node)}if(dom.isRightEdgePoint(point)&&lists.contains(leftEdgeNodes,point.node)){node=point.node}}else if(includeAncestor){node=dom.ancestor(point.node,pred)}else{node=point.node}if(node&&pred(node)){nodes.push(node)}}),true);return lists.unique(nodes)}},{key:"commonAncestor",value:function commonAncestor(){return dom.commonAncestor(this.sc,this.ec)}},{key:"expand",value:function expand(pred){var startAncestor=dom.ancestor(this.sc,pred);var endAncestor=dom.ancestor(this.ec,pred);if(!startAncestor&&!endAncestor){return new WrappedRange(this.sc,this.so,this.ec,this.eo)}var boundaryPoints=this.getPoints();if(startAncestor){boundaryPoints.sc=startAncestor;boundaryPoints.so=0}if(endAncestor){boundaryPoints.ec=endAncestor;boundaryPoints.eo=dom.nodeLength(endAncestor)}return new WrappedRange(boundaryPoints.sc,boundaryPoints.so,boundaryPoints.ec,boundaryPoints.eo)}},{key:"collapse",value:function collapse(isCollapseToStart){if(isCollapseToStart){return new WrappedRange(this.sc,this.so,this.sc,this.so)}else{return new WrappedRange(this.ec,this.eo,this.ec,this.eo)}}},{key:"splitText",value:function splitText(){var isSameContainer=this.sc===this.ec;var boundaryPoints=this.getPoints();if(dom.isText(this.ec)&&!dom.isEdgePoint(this.getEndPoint())){this.ec.splitText(this.eo)}if(dom.isText(this.sc)&&!dom.isEdgePoint(this.getStartPoint())){boundaryPoints.sc=this.sc.splitText(this.so);boundaryPoints.so=0;if(isSameContainer){boundaryPoints.ec=boundaryPoints.sc;boundaryPoints.eo=this.eo-this.so}}return new WrappedRange(boundaryPoints.sc,boundaryPoints.so,boundaryPoints.ec,boundaryPoints.eo)}},{key:"deleteContents",value:function deleteContents(){if(this.isCollapsed()){return this}var rng=this.splitText();var nodes=rng.nodes(null,{fullyContains:true});var point=dom.prevPointUntil(rng.getStartPoint(),(function(point){return!lists.contains(nodes,point.node)}));var emptyParents=[];external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(nodes,(function(idx,node){var parent=node.parentNode;if(point.node!==parent&&dom.nodeLength(parent)===1){emptyParents.push(parent)}dom.remove(node,false)}));external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(emptyParents,(function(idx,node){dom.remove(node,false)}));return new WrappedRange(point.node,point.offset,point.node,point.offset).normalize()}},{key:"makeIsOn",value:function makeIsOn(pred){return function(){var ancestor=dom.ancestor(this.sc,pred);return!!ancestor&&ancestor===dom.ancestor(this.ec,pred)}}},{key:"isLeftEdgeOf",value:function isLeftEdgeOf(pred){if(!dom.isLeftEdgePoint(this.getStartPoint())){return false}var node=dom.ancestor(this.sc,pred);return node&&dom.isLeftEdgeOf(this.sc,node)}},{key:"isCollapsed",value:function isCollapsed(){return this.sc===this.ec&&this.so===this.eo}},{key:"wrapBodyInlineWithPara",value:function wrapBodyInlineWithPara(){if(dom.isBodyContainer(this.sc)&&dom.isEmpty(this.sc)){this.sc.innerHTML=dom.emptyPara;return new WrappedRange(this.sc.firstChild,0,this.sc.firstChild,0)}var rng=this.normalize();if(dom.isParaInline(this.sc)||dom.isPara(this.sc)){return rng}var topAncestor;if(dom.isInline(rng.sc)){var ancestors=dom.listAncestor(rng.sc,func.not(dom.isInline));topAncestor=lists.last(ancestors);if(!dom.isInline(topAncestor)){topAncestor=ancestors[ancestors.length-2]||rng.sc.childNodes[rng.so]}}else{topAncestor=rng.sc.childNodes[rng.so>0?rng.so-1:0]}if(topAncestor){var inlineSiblings=dom.listPrev(topAncestor,dom.isParaInline).reverse();inlineSiblings=inlineSiblings.concat(dom.listNext(topAncestor.nextSibling,dom.isParaInline));if(inlineSiblings.length){var para=dom.wrap(lists.head(inlineSiblings),"p");dom.appendChildNodes(para,lists.tail(inlineSiblings))}}return this.normalize()}},{key:"insertNode",value:function insertNode(node){var doNotInsertPara=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var rng=this;if(dom.isText(node)||dom.isInline(node)){rng=this.wrapBodyInlineWithPara().deleteContents()}var info=dom.splitPoint(rng.getStartPoint(),dom.isInline(node));if(info.rightNode){info.rightNode.parentNode.insertBefore(node,info.rightNode);if(dom.isEmpty(info.rightNode)&&(doNotInsertPara||dom.isPara(node))){info.rightNode.parentNode.removeChild(info.rightNode)}}else{info.container.appendChild(node)}return node}},{key:"pasteHTML",value:function pasteHTML(markup){markup=((markup||"")+"").trim(markup);var contentsContainer=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<div></div>").html(markup)[0];var childNodes=lists.from(contentsContainer.childNodes);var rng=this;var reversed=false;if(rng.so>=0){childNodes=childNodes.reverse();reversed=true}childNodes=childNodes.map((function(childNode){return rng.insertNode(childNode,!dom.isInline(childNode))}));if(reversed){childNodes=childNodes.reverse()}return childNodes}},{key:"toString",value:function toString(){var nativeRng=this.nativeRange();return env.isW3CRangeSupport?nativeRng.toString():nativeRng.text}},{key:"getWordRange",value:function getWordRange(findAfter){var endPoint=this.getEndPoint();if(!dom.isCharPoint(endPoint)){return this}var startPoint=dom.prevPointUntil(endPoint,(function(point){return!dom.isCharPoint(point)}));if(findAfter){endPoint=dom.nextPointUntil(endPoint,(function(point){return!dom.isCharPoint(point)}))}return new WrappedRange(startPoint.node,startPoint.offset,endPoint.node,endPoint.offset)}},{key:"getWordsRange",value:function getWordsRange(findAfter){var endPoint=this.getEndPoint();var isNotTextPoint=function isNotTextPoint(point){return!dom.isCharPoint(point)&&!dom.isSpacePoint(point)};if(isNotTextPoint(endPoint)){return this}var startPoint=dom.prevPointUntil(endPoint,isNotTextPoint);if(findAfter){endPoint=dom.nextPointUntil(endPoint,isNotTextPoint)}return new WrappedRange(startPoint.node,startPoint.offset,endPoint.node,endPoint.offset)}},{key:"getWordsMatchRange",value:function getWordsMatchRange(regex){var endPoint=this.getEndPoint();var startPoint=dom.prevPointUntil(endPoint,(function(point){if(!dom.isCharPoint(point)&&!dom.isSpacePoint(point)){return true}var rng=new WrappedRange(point.node,point.offset,endPoint.node,endPoint.offset);var result=regex.exec(rng.toString());return result&&result.index===0}));var rng=new WrappedRange(startPoint.node,startPoint.offset,endPoint.node,endPoint.offset);var text=rng.toString();var result=regex.exec(text);if(result&&result[0].length===text.length){return rng}else{return null}}},{key:"bookmark",value:function bookmark(editable){return{s:{path:dom.makeOffsetPath(editable,this.sc),offset:this.so},e:{path:dom.makeOffsetPath(editable,this.ec),offset:this.eo}}}},{key:"paraBookmark",value:function paraBookmark(paras){return{s:{path:lists.tail(dom.makeOffsetPath(lists.head(paras),this.sc)),offset:this.so},e:{path:lists.tail(dom.makeOffsetPath(lists.last(paras),this.ec)),offset:this.eo}}}},{key:"getClientRects",value:function getClientRects(){var nativeRng=this.nativeRange();return nativeRng.getClientRects()}}])}();const range={create:function create(sc,so,ec,eo){if(arguments.length===4){return new WrappedRange(sc,so,ec,eo)}else if(arguments.length===2){ec=sc;eo=so;return new WrappedRange(sc,so,ec,eo)}else{var wrappedRange=this.createFromSelection();if(!wrappedRange&&arguments.length===1){var bodyElement=arguments[0];if(dom.isEditable(bodyElement)){bodyElement=bodyElement.lastChild}return this.createFromBodyElement(bodyElement,dom.emptyPara===arguments[0].innerHTML)}return wrappedRange}},createFromBodyElement:function createFromBodyElement(bodyElement){var isCollapseToStart=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var wrappedRange=this.createFromNode(bodyElement);return wrappedRange.collapse(isCollapseToStart)},createFromSelection:function createFromSelection(){var sc,so,ec,eo;if(env.isW3CRangeSupport){var selection=document.getSelection();if(!selection||selection.rangeCount===0){return null}else if(dom.isBody(selection.anchorNode)){return null}var nativeRng=selection.getRangeAt(0);sc=nativeRng.startContainer;so=nativeRng.startOffset;ec=nativeRng.endContainer;eo=nativeRng.endOffset}else{var textRange=document.selection.createRange();var textRangeEnd=textRange.duplicate();textRangeEnd.collapse(false);var textRangeStart=textRange;textRangeStart.collapse(true);var startPoint=textRangeToPoint(textRangeStart,true);var endPoint=textRangeToPoint(textRangeEnd,false);if(dom.isText(startPoint.node)&&dom.isLeftEdgePoint(startPoint)&&dom.isTextNode(endPoint.node)&&dom.isRightEdgePoint(endPoint)&&endPoint.node.nextSibling===startPoint.node){startPoint=endPoint}sc=startPoint.cont;so=startPoint.offset;ec=endPoint.cont;eo=endPoint.offset}return new WrappedRange(sc,so,ec,eo)},createFromNode:function createFromNode(node){var sc=node;var so=0;var ec=node;var eo=dom.nodeLength(ec);if(dom.isVoid(sc)){so=dom.listPrev(sc).length-1;sc=sc.parentNode}if(dom.isBR(ec)){eo=dom.listPrev(ec).length-1;ec=ec.parentNode}else if(dom.isVoid(ec)){eo=dom.listPrev(ec).length;ec=ec.parentNode}return this.create(sc,so,ec,eo)},createFromNodeBefore:function createFromNodeBefore(node){return this.createFromNode(node).collapse(true)},createFromNodeAfter:function createFromNodeAfter(node){return this.createFromNode(node).collapse()},createFromBookmark:function createFromBookmark(editable,bookmark){var sc=dom.fromOffsetPath(editable,bookmark.s.path);var so=bookmark.s.offset;var ec=dom.fromOffsetPath(editable,bookmark.e.path);var eo=bookmark.e.offset;return new WrappedRange(sc,so,ec,eo)},createFromParaBookmark:function createFromParaBookmark(bookmark,paras){var so=bookmark.s.offset;var eo=bookmark.e.offset;var sc=dom.fromOffsetPath(lists.head(paras),bookmark.s.path);var ec=dom.fromOffsetPath(lists.last(paras),bookmark.e.path);return new WrappedRange(sc,so,ec,eo)}};var KEY_MAP={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,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,HOME:36,END:35,PAGEUP:33,PAGEDOWN:34};const key={isEdit:function isEdit(keyCode){return lists.contains([KEY_MAP.BACKSPACE,KEY_MAP.TAB,KEY_MAP.ENTER,KEY_MAP.SPACE,KEY_MAP.DELETE],keyCode)},isRemove:function isRemove(keyCode){return lists.contains([KEY_MAP.BACKSPACE,KEY_MAP.DELETE],keyCode)},isMove:function isMove(keyCode){return lists.contains([KEY_MAP.LEFT,KEY_MAP.UP,KEY_MAP.RIGHT,KEY_MAP.DOWN],keyCode)},isNavigation:function isNavigation(keyCode){return lists.contains([KEY_MAP.HOME,KEY_MAP.END,KEY_MAP.PAGEUP,KEY_MAP.PAGEDOWN],keyCode)},nameFromCode:func.invertObject(KEY_MAP),code:KEY_MAP};function readFileAsDataURL(file){return external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().Deferred((function(deferred){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend(new FileReader,{onload:function onload(event){var dataURL=event.target.result;deferred.resolve(dataURL)},onerror:function onerror(err){deferred.reject(err)}}).readAsDataURL(file)})).promise()}function createImage(url){return external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().Deferred((function(deferred){var $img=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<img>");$img.one("load",(function(){$img.off("error abort");deferred.resolve($img)})).one("error abort",(function(){$img.off("load").detach();deferred.reject($img)})).css({display:"none"}).appendTo(document.body).attr("src",url)})).promise()}function History_typeof(o){"@babel/helpers - typeof";return History_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},History_typeof(o)}function History_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function History_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,History_toPropertyKey(o.key),o)}}function History_createClass(e,r,t){return r&&History_defineProperties(e.prototype,r),t&&History_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function History_toPropertyKey(t){var i=History_toPrimitive(t,"string");return"symbol"==History_typeof(i)?i:i+""}function History_toPrimitive(t,r){if("object"!=History_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=History_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var History=function(){function History(context){History_classCallCheck(this,History);this.stack=[];this.stackOffset=-1;this.context=context;this.$editable=context.layoutInfo.editable;this.editable=this.$editable[0]}return History_createClass(History,[{key:"makeSnapshot",value:function makeSnapshot(){var rng=range.create(this.editable);var emptyBookmark={s:{path:[],offset:0},e:{path:[],offset:0}};return{contents:this.$editable.html(),bookmark:rng&&rng.isOnEditable()?rng.bookmark(this.editable):emptyBookmark}}},{key:"applySnapshot",value:function applySnapshot(snapshot){if(snapshot.contents!==null){this.$editable.html(snapshot.contents)}if(snapshot.bookmark!==null){range.createFromBookmark(this.editable,snapshot.bookmark).select()}}},{key:"rewind",value:function rewind(){if(this.$editable.html()!==this.stack[this.stackOffset].contents){this.recordUndo()}this.stackOffset=0;this.applySnapshot(this.stack[this.stackOffset])}},{key:"commit",value:function commit(){this.stack=[];this.stackOffset=-1;this.recordUndo()}},{key:"reset",value:function reset(){this.stack=[];this.stackOffset=-1;this.$editable.html("");this.recordUndo()}},{key:"undo",value:function undo(){if(this.$editable.html()!==this.stack[this.stackOffset].contents){this.recordUndo()}if(this.stackOffset>0){this.stackOffset--;this.applySnapshot(this.stack[this.stackOffset])}}},{key:"redo",value:function redo(){if(this.stack.length-1>this.stackOffset){this.stackOffset++;this.applySnapshot(this.stack[this.stackOffset])}}},{key:"recordUndo",value:function recordUndo(){this.stackOffset++;if(this.stack.length>this.stackOffset){this.stack=this.stack.slice(0,this.stackOffset)}this.stack.push(this.makeSnapshot());if(this.stack.length>this.context.options.historyLimit){this.stack.shift();this.stackOffset-=1}}}])}();function Style_typeof(o){"@babel/helpers - typeof";return Style_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Style_typeof(o)}function Style_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function Style_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Style_toPropertyKey(o.key),o)}}function Style_createClass(e,r,t){return r&&Style_defineProperties(e.prototype,r),t&&Style_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Style_toPropertyKey(t){var i=Style_toPrimitive(t,"string");return"symbol"==Style_typeof(i)?i:i+""}function Style_toPrimitive(t,r){if("object"!=Style_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=Style_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var Style=function(){function Style(){Style_classCallCheck(this,Style)}return Style_createClass(Style,[{key:"jQueryCSS",value:function jQueryCSS($obj,propertyNames){var result={};external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(propertyNames,(function(idx,propertyName){result[propertyName]=$obj.css(propertyName)}));return result}},{key:"fromNode",value:function fromNode($node){var properties=["font-family","font-size","text-align","list-style-type","line-height"];var styleInfo=this.jQueryCSS($node,properties)||{};var fontSize=$node[0].style.fontSize||styleInfo["font-size"];styleInfo["font-size"]=parseInt(fontSize,10);styleInfo["font-size-unit"]=fontSize.match(/[a-z%]+$/);return styleInfo}},{key:"stylePara",value:function stylePara(rng,styleInfo){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(rng.nodes(dom.isPara,{includeAncestor:true}),(function(idx,para){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(para).css(styleInfo)}))}},{key:"styleNodes",value:function styleNodes(rng,options){rng=rng.splitText();var nodeName=options&&options.nodeName||"SPAN";var expandClosestSibling=!!(options&&options.expandClosestSibling);var onlyPartialContains=!!(options&&options.onlyPartialContains);if(rng.isCollapsed()){return[rng.insertNode(dom.create(nodeName))]}var pred=dom.makePredByNodeName(nodeName);var nodes=rng.nodes(dom.isText,{fullyContains:true}).map((function(text){return dom.singleChildAncestor(text,pred)||dom.wrap(text,nodeName)}));if(expandClosestSibling){if(onlyPartialContains){var nodesInRange=rng.nodes();pred=func.and(pred,(function(node){return lists.contains(nodesInRange,node)}))}return nodes.map((function(node){var siblings=dom.withClosestSiblings(node,pred);var head=lists.head(siblings);var tails=lists.tail(siblings);external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(tails,(function(idx,elem){dom.appendChildNodes(head,elem.childNodes);dom.remove(elem)}));return lists.head(siblings)}))}else{return nodes}}},{key:"current",value:function current(rng){var $cont=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(!dom.isElement(rng.sc)?rng.sc.parentNode:rng.sc);var styleInfo=this.fromNode($cont);try{styleInfo=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend(styleInfo,{"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")||styleInfo["font-family"]})}catch(e){}if(!rng.isOnList()){styleInfo["list-style"]="none"}else{var orderedTypes=["circle","disc","disc-leading-zero","square"];var isUnordered=orderedTypes.indexOf(styleInfo["list-style-type"])>-1;styleInfo["list-style"]=isUnordered?"unordered":"ordered"}var para=dom.ancestor(rng.sc,dom.isPara);if(para&&para.style["line-height"]){styleInfo["line-height"]=para.style.lineHeight}else{var lineHeight=parseInt(styleInfo["line-height"],10)/parseInt(styleInfo["font-size"],10);styleInfo["line-height"]=lineHeight.toFixed(1)}styleInfo.anchor=rng.isOnAnchor()&&dom.ancestor(rng.sc,dom.isAnchor);styleInfo.ancestors=dom.listAncestor(rng.sc,dom.isEditable);styleInfo.range=rng;return styleInfo}}])}();function Bullet_typeof(o){"@babel/helpers - typeof";return Bullet_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Bullet_typeof(o)}function Bullet_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function Bullet_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Bullet_toPropertyKey(o.key),o)}}function Bullet_createClass(e,r,t){return r&&Bullet_defineProperties(e.prototype,r),t&&Bullet_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bullet_toPropertyKey(t){var i=Bullet_toPrimitive(t,"string");return"symbol"==Bullet_typeof(i)?i:i+""}function Bullet_toPrimitive(t,r){if("object"!=Bullet_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=Bullet_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var Bullet=function(){function Bullet(){Bullet_classCallCheck(this,Bullet)}return Bullet_createClass(Bullet,[{key:"insertOrderedList",value:function insertOrderedList(editable){this.toggleList("OL",editable)}},{key:"insertUnorderedList",value:function insertUnorderedList(editable){this.toggleList("UL",editable)}},{key:"indent",value:function indent(editable){var _this=this;var rng=range.create(editable).wrapBodyInlineWithPara();var paras=rng.nodes(dom.isPara,{includeAncestor:true});var clustereds=lists.clusterBy(paras,func.peq2("parentNode"));external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(clustereds,(function(idx,paras){var head=lists.head(paras);if(dom.isLi(head)){var previousList=_this.findList(head.previousSibling);if(previousList){paras.map((function(para){return previousList.appendChild(para)}))}else{_this.wrapList(paras,head.parentNode.nodeName);paras.map((function(para){return para.parentNode})).map((function(para){return _this.appendToPrevious(para)}))}}else{external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(paras,(function(idx,para){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(para).css("marginLeft",(function(idx,val){return(parseInt(val,10)||0)+25}))}))}}));rng.select()}},{key:"outdent",value:function outdent(editable){var _this2=this;var rng=range.create(editable).wrapBodyInlineWithPara();var paras=rng.nodes(dom.isPara,{includeAncestor:true});var clustereds=lists.clusterBy(paras,func.peq2("parentNode"));external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(clustereds,(function(idx,paras){var head=lists.head(paras);if(dom.isLi(head)){_this2.releaseList([paras])}else{external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(paras,(function(idx,para){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(para).css("marginLeft",(function(idx,val){val=parseInt(val,10)||0;return val>25?val-25:""}))}))}}));rng.select()}},{key:"toggleList",value:function toggleList(listName,editable){var _this3=this;var rng=range.create(editable).wrapBodyInlineWithPara();var paras=rng.nodes(dom.isPara,{includeAncestor:true});var bookmark=rng.paraBookmark(paras);var clustereds=lists.clusterBy(paras,func.peq2("parentNode"));if(lists.find(paras,dom.isPurePara)){var wrappedParas=[];external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(clustereds,(function(idx,paras){wrappedParas=wrappedParas.concat(_this3.wrapList(paras,listName))}));paras=wrappedParas}else{var diffLists=rng.nodes(dom.isList,{includeAncestor:true}).filter((function(listNode){return!external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().nodeName(listNode,listName)}));if(diffLists.length){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(diffLists,(function(idx,listNode){dom.replace(listNode,listName)}))}else{paras=this.releaseList(clustereds,true)}}range.createFromParaBookmark(bookmark,paras).select()}},{key:"wrapList",value:function wrapList(paras,listName){var head=lists.head(paras);var last=lists.last(paras);var prevList=dom.isList(head.previousSibling)&&head.previousSibling;var nextList=dom.isList(last.nextSibling)&&last.nextSibling;var listNode=prevList||dom.insertAfter(dom.create(listName||"UL"),last);paras=paras.map((function(para){return dom.isPurePara(para)?dom.replace(para,"LI"):para}));dom.appendChildNodes(listNode,paras,true);if(nextList){dom.appendChildNodes(listNode,lists.from(nextList.childNodes),true);dom.remove(nextList)}return paras}},{key:"releaseList",value:function releaseList(clustereds,isEscapseToBody){var _this4=this;var releasedParas=[];external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(clustereds,(function(idx,paras){var head=lists.head(paras);var last=lists.last(paras);var headList=isEscapseToBody?dom.lastAncestor(head,dom.isList):head.parentNode;var parentItem=headList.parentNode;if(headList.parentNode.nodeName==="LI"){paras.map((function(para){var newList=_this4.findNextSiblings(para);if(parentItem.nextSibling){parentItem.parentNode.insertBefore(para,parentItem.nextSibling)}else{parentItem.parentNode.appendChild(para)}if(newList.length){_this4.wrapList(newList,headList.nodeName);para.appendChild(newList[0].parentNode)}}));if(headList.children.length===0){parentItem.removeChild(headList)}if(parentItem.childNodes.length===0){parentItem.parentNode.removeChild(parentItem)}}else{var lastList=headList.childNodes.length>1?dom.splitTree(headList,{node:last.parentNode,offset:dom.position(last)+1},{isSkipPaddingBlankHTML:true}):null;var middleList=dom.splitTree(headList,{node:head.parentNode,offset:dom.position(head)},{isSkipPaddingBlankHTML:true});paras=isEscapseToBody?dom.listDescendant(middleList,dom.isLi):lists.from(middleList.childNodes).filter(dom.isLi);if(isEscapseToBody||!dom.isList(headList.parentNode)){paras=paras.map((function(para){return dom.replace(para,"P")}))}external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(lists.from(paras).reverse(),(function(idx,para){dom.insertAfter(para,headList)}));var rootLists=lists.compact([headList,middleList,lastList]);external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(rootLists,(function(idx,rootList){var listNodes=[rootList].concat(dom.listDescendant(rootList,dom.isList));external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(listNodes.reverse(),(function(idx,listNode){if(!dom.nodeLength(listNode)){dom.remove(listNode,true)}}))}))}releasedParas=releasedParas.concat(paras)}));return releasedParas}},{key:"appendToPrevious",value:function appendToPrevious(node){return node.previousSibling?dom.appendChildNodes(node.previousSibling,[node]):this.wrapList([node],"LI")}},{key:"findList",value:function findList(node){return node?lists.find(node.children,(function(child){return["OL","UL"].indexOf(child.nodeName)>-1})):null}},{key:"findNextSiblings",value:function findNextSiblings(node){var siblings=[];while(node.nextSibling){siblings.push(node.nextSibling);node=node.nextSibling}return siblings}}])}();function Typing_typeof(o){"@babel/helpers - typeof";return Typing_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Typing_typeof(o)}function Typing_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function Typing_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Typing_toPropertyKey(o.key),o)}}function Typing_createClass(e,r,t){return r&&Typing_defineProperties(e.prototype,r),t&&Typing_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Typing_toPropertyKey(t){var i=Typing_toPrimitive(t,"string");return"symbol"==Typing_typeof(i)?i:i+""}function Typing_toPrimitive(t,r){if("object"!=Typing_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=Typing_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var Typing=function(){function Typing(context){Typing_classCallCheck(this,Typing);this.bullet=new Bullet;this.options=context.options}return Typing_createClass(Typing,[{key:"insertTab",value:function insertTab(rng,tabsize){var tab=dom.createText(new Array(tabsize+1).join(dom.NBSP_CHAR));rng=rng.deleteContents();rng.insertNode(tab,true);rng=range.create(tab,tabsize);rng.select()}},{key:"insertParagraph",value:function insertParagraph(editable,rng){rng=rng||range.create(editable);rng=rng.deleteContents();rng=rng.wrapBodyInlineWithPara();var splitRoot=dom.ancestor(rng.sc,dom.isPara);var nextPara;if(splitRoot){if(dom.isLi(splitRoot)&&(dom.isEmpty(splitRoot)||dom.deepestChildIsEmpty(splitRoot))){this.bullet.toggleList(splitRoot.parentNode.nodeName);return}else{var blockquote=null;if(this.options.blockquoteBreakingLevel===1){blockquote=dom.ancestor(splitRoot,dom.isBlockquote)}else if(this.options.blockquoteBreakingLevel===2){blockquote=dom.lastAncestor(splitRoot,dom.isBlockquote)}if(blockquote){nextPara=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(dom.emptyPara)[0];if(dom.isRightEdgePoint(rng.getStartPoint())&&dom.isBR(rng.sc.nextSibling)){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(rng.sc.nextSibling).remove()}var split=dom.splitTree(blockquote,rng.getStartPoint(),{isDiscardEmptySplits:true});if(split){split.parentNode.insertBefore(nextPara,split)}else{dom.insertAfter(nextPara,blockquote)}}else{nextPara=dom.splitTree(splitRoot,rng.getStartPoint());var emptyAnchors=dom.listDescendant(splitRoot,dom.isEmptyAnchor);emptyAnchors=emptyAnchors.concat(dom.listDescendant(nextPara,dom.isEmptyAnchor));external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(emptyAnchors,(function(idx,anchor){dom.remove(anchor)}));if((dom.isHeading(nextPara)||dom.isPre(nextPara)||dom.isCustomStyleTag(nextPara))&&dom.isEmpty(nextPara)){nextPara=dom.replace(nextPara,"p")}}}}else{var next=rng.sc.childNodes[rng.so];nextPara=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(dom.emptyPara)[0];if(next){rng.sc.insertBefore(nextPara,next)}else{rng.sc.appendChild(nextPara)}}range.create(nextPara,0).normalize().select().scrollIntoView(editable)}}])}();function Table_typeof(o){"@babel/helpers - typeof";return Table_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Table_typeof(o)}function Table_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function Table_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Table_toPropertyKey(o.key),o)}}function Table_createClass(e,r,t){return r&&Table_defineProperties(e.prototype,r),t&&Table_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Table_toPropertyKey(t){var i=Table_toPrimitive(t,"string");return"symbol"==Table_typeof(i)?i:i+""}function Table_toPrimitive(t,r){if("object"!=Table_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=Table_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var TableResultAction=function TableResultAction(startPoint,where,action,domTable){var _startPoint={colPos:0,rowPos:0};var _virtualTable=[];var _actionCellList=[];function setStartPoint(){if(!startPoint||!startPoint.tagName||startPoint.tagName.toLowerCase()!=="td"&&startPoint.tagName.toLowerCase()!=="th"){return}_startPoint.colPos=startPoint.cellIndex;if(!startPoint.parentElement||!startPoint.parentElement.tagName||startPoint.parentElement.tagName.toLowerCase()!=="tr"){return}_startPoint.rowPos=startPoint.parentElement.rowIndex}function setVirtualTablePosition(rowIndex,cellIndex,baseRow,baseCell,isRowSpan,isColSpan,isVirtualCell){var objPosition={baseRow:baseRow,baseCell:baseCell,isRowSpan:isRowSpan,isColSpan:isColSpan,isVirtual:isVirtualCell};if(!_virtualTable[rowIndex]){_virtualTable[rowIndex]=[]}_virtualTable[rowIndex][cellIndex]=objPosition}function getActionCell(virtualTableCellObj,resultAction,virtualRowPosition,virtualColPosition){return{baseCell:virtualTableCellObj.baseCell,action:resultAction,virtualTable:{rowIndex:virtualRowPosition,cellIndex:virtualColPosition}}}function recoverCellIndex(rowIndex,cellIndex){if(!_virtualTable[rowIndex]){return cellIndex}if(!_virtualTable[rowIndex][cellIndex]){return cellIndex}var newCellIndex=cellIndex;while(_virtualTable[rowIndex][newCellIndex]){newCellIndex++;if(!_virtualTable[rowIndex][newCellIndex]){return newCellIndex}}}function addCellInfoToVirtual(row,cell){var cellIndex=recoverCellIndex(row.rowIndex,cell.cellIndex);var cellHasColspan=cell.colSpan>1;var cellHasRowspan=cell.rowSpan>1;var isThisSelectedCell=row.rowIndex===_startPoint.rowPos&&cell.cellIndex===_startPoint.colPos;setVirtualTablePosition(row.rowIndex,cellIndex,row,cell,cellHasRowspan,cellHasColspan,false);var rowspanNumber=cell.attributes.rowSpan?parseInt(cell.attributes.rowSpan.value,10):0;if(rowspanNumber>1){for(var rp=1;rp<rowspanNumber;rp++){var rowspanIndex=row.rowIndex+rp;adjustStartPoint(rowspanIndex,cellIndex,cell,isThisSelectedCell);setVirtualTablePosition(rowspanIndex,cellIndex,row,cell,true,cellHasColspan,true)}}var colspanNumber=cell.attributes.colSpan?parseInt(cell.attributes.colSpan.value,10):0;if(colspanNumber>1){for(var cp=1;cp<colspanNumber;cp++){var cellspanIndex=recoverCellIndex(row.rowIndex,cellIndex+cp);adjustStartPoint(row.rowIndex,cellspanIndex,cell,isThisSelectedCell);setVirtualTablePosition(row.rowIndex,cellspanIndex,row,cell,cellHasRowspan,true,true)}}}function adjustStartPoint(rowIndex,cellIndex,cell,isSelectedCell){if(rowIndex===_startPoint.rowPos&&_startPoint.colPos>=cell.cellIndex&&cell.cellIndex<=cellIndex&&!isSelectedCell){_startPoint.colPos++}}function createVirtualTable(){var rows=domTable.rows;for(var rowIndex=0;rowIndex<rows.length;rowIndex++){var cells=rows[rowIndex].cells;for(var cellIndex=0;cellIndex<cells.length;cellIndex++){addCellInfoToVirtual(rows[rowIndex],cells[cellIndex])}}}function getDeleteResultActionToCell(cell){switch(where){case TableResultAction.where.Column:if(cell.isColSpan){return TableResultAction.resultAction.SubtractSpanCount}break;case TableResultAction.where.Row:if(!cell.isVirtual&&cell.isRowSpan){return TableResultAction.resultAction.AddCell}else if(cell.isRowSpan){return TableResultAction.resultAction.SubtractSpanCount}break}return TableResultAction.resultAction.RemoveCell}function getAddResultActionToCell(cell){switch(where){case TableResultAction.where.Column:if(cell.isColSpan){return TableResultAction.resultAction.SumSpanCount}else if(cell.isRowSpan&&cell.isVirtual){return TableResultAction.resultAction.Ignore}break;case TableResultAction.where.Row:if(cell.isRowSpan){return TableResultAction.resultAction.SumSpanCount}else if(cell.isColSpan&&cell.isVirtual){return TableResultAction.resultAction.Ignore}break}return TableResultAction.resultAction.AddCell}function init(){setStartPoint();createVirtualTable()}this.getActionList=function(){var fixedRow=where===TableResultAction.where.Row?_startPoint.rowPos:-1;var fixedCol=where===TableResultAction.where.Column?_startPoint.colPos:-1;var actualPosition=0;var canContinue=true;while(canContinue){var rowPosition=fixedRow>=0?fixedRow:actualPosition;var colPosition=fixedCol>=0?fixedCol:actualPosition;var row=_virtualTable[rowPosition];if(!row){canContinue=false;return _actionCellList}var cell=row[colPosition];if(!cell){canContinue=false;return _actionCellList}var resultAction=TableResultAction.resultAction.Ignore;switch(action){case TableResultAction.requestAction.Add:resultAction=getAddResultActionToCell(cell);break;case TableResultAction.requestAction.Delete:resultAction=getDeleteResultActionToCell(cell);break}_actionCellList.push(getActionCell(cell,resultAction,rowPosition,colPosition));actualPosition++}return _actionCellList};init()};TableResultAction.where={Row:0,Column:1};TableResultAction.requestAction={Add:0,Delete:1};TableResultAction.resultAction={Ignore:0,SubtractSpanCount:1,RemoveCell:2,AddCell:3,SumSpanCount:4};var Table=function(){function Table(){Table_classCallCheck(this,Table)}return Table_createClass(Table,[{key:"tab",value:function tab(rng,isShift){var cell=dom.ancestor(rng.commonAncestor(),dom.isCell);var table=dom.ancestor(cell,dom.isTable);var cells=dom.listDescendant(table,dom.isCell);var nextCell=lists[isShift?"prev":"next"](cells,cell);if(nextCell){range.create(nextCell,0).select()}}},{key:"addRow",value:function addRow(rng,position){var cell=dom.ancestor(rng.commonAncestor(),dom.isCell);var currentTr=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(cell).closest("tr");var trAttributes=this.recoverAttributes(currentTr);var html=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<tr"+trAttributes+"></tr>");var vTable=new TableResultAction(cell,TableResultAction.where.Row,TableResultAction.requestAction.Add,external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(currentTr).closest("table")[0]);var actions=vTable.getActionList();for(var idCell=0;idCell<actions.length;idCell++){var currentCell=actions[idCell];var tdAttributes=this.recoverAttributes(currentCell.baseCell);switch(currentCell.action){case TableResultAction.resultAction.AddCell:html.append("<td"+tdAttributes+">"+dom.blank+"</td>");break;case TableResultAction.resultAction.SumSpanCount:{if(position==="top"){var baseCellTr=currentCell.baseCell.parent;var isTopFromRowSpan=(!baseCellTr?0:currentCell.baseCell.closest("tr").rowIndex)<=currentTr[0].rowIndex;if(isTopFromRowSpan){var newTd=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<div></div>").append(external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<td"+tdAttributes+">"+dom.blank+"</td>").removeAttr("rowspan")).html();html.append(newTd);break}}var rowspanNumber=parseInt(currentCell.baseCell.rowSpan,10);rowspanNumber++;currentCell.baseCell.setAttribute("rowSpan",rowspanNumber)}break}}if(position==="top"){currentTr.before(html)}else{var cellHasRowspan=cell.rowSpan>1;if(cellHasRowspan){var lastTrIndex=currentTr[0].rowIndex+(cell.rowSpan-2);external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(currentTr).parent().find("tr")[lastTrIndex]).after(external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(html));return}currentTr.after(html)}}},{key:"addCol",value:function addCol(rng,position){var cell=dom.ancestor(rng.commonAncestor(),dom.isCell);var row=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(cell).closest("tr");var rowsGroup=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(row).siblings();rowsGroup.push(row);var vTable=new TableResultAction(cell,TableResultAction.where.Column,TableResultAction.requestAction.Add,external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(row).closest("table")[0]);var actions=vTable.getActionList();for(var actionIndex=0;actionIndex<actions.length;actionIndex++){var currentCell=actions[actionIndex];var tdAttributes=this.recoverAttributes(currentCell.baseCell);switch(currentCell.action){case TableResultAction.resultAction.AddCell:if(position==="right"){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(currentCell.baseCell).after("<td"+tdAttributes+">"+dom.blank+"</td>")}else{external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(currentCell.baseCell).before("<td"+tdAttributes+">"+dom.blank+"</td>")}break;case TableResultAction.resultAction.SumSpanCount:if(position==="right"){var colspanNumber=parseInt(currentCell.baseCell.colSpan,10);colspanNumber++;currentCell.baseCell.setAttribute("colSpan",colspanNumber)}else{external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(currentCell.baseCell).before("<td"+tdAttributes+">"+dom.blank+"</td>")}break}}}},{key:"recoverAttributes",value:function recoverAttributes(el){var resultStr="";if(!el){return resultStr}var attrList=el.attributes||[];for(var i=0;i<attrList.length;i++){if(attrList[i].name.toLowerCase()==="id"){continue}if(attrList[i].specified){resultStr+=" "+attrList[i].name+"='"+attrList[i].value+"'"}}return resultStr}},{key:"deleteRow",value:function deleteRow(rng){var cell=dom.ancestor(rng.commonAncestor(),dom.isCell);var row=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(cell).closest("tr");var cellPos=row.children("td, th").index(external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(cell));var rowPos=row[0].rowIndex;var vTable=new TableResultAction(cell,TableResultAction.where.Row,TableResultAction.requestAction.Delete,external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(row).closest("table")[0]);var actions=vTable.getActionList();for(var actionIndex=0;actionIndex<actions.length;actionIndex++){if(!actions[actionIndex]){continue}var baseCell=actions[actionIndex].baseCell;var virtualPosition=actions[actionIndex].virtualTable;var hasRowspan=baseCell.rowSpan&&baseCell.rowSpan>1;var rowspanNumber=hasRowspan?parseInt(baseCell.rowSpan,10):0;switch(actions[actionIndex].action){case TableResultAction.resultAction.Ignore:continue;case TableResultAction.resultAction.AddCell:{var nextRow=row.next("tr")[0];if(!nextRow){continue}var cloneRow=row[0].cells[cellPos];if(hasRowspan){if(rowspanNumber>2){rowspanNumber--;nextRow.insertBefore(cloneRow,nextRow.cells[cellPos]);nextRow.cells[cellPos].setAttribute("rowSpan",rowspanNumber);nextRow.cells[cellPos].innerHTML=""}else if(rowspanNumber===2){nextRow.insertBefore(cloneRow,nextRow.cells[cellPos]);nextRow.cells[cellPos].removeAttribute("rowSpan");nextRow.cells[cellPos].innerHTML=""}}}continue;case TableResultAction.resultAction.SubtractSpanCount:if(hasRowspan){if(rowspanNumber>2){rowspanNumber--;baseCell.setAttribute("rowSpan",rowspanNumber);if(virtualPosition.rowIndex!==rowPos&&baseCell.cellIndex===cellPos){baseCell.innerHTML=""}}else if(rowspanNumber===2){baseCell.removeAttribute("rowSpan");if(virtualPosition.rowIndex!==rowPos&&baseCell.cellIndex===cellPos){baseCell.innerHTML=""}}}continue;case TableResultAction.resultAction.RemoveCell:continue}}row.remove()}},{key:"deleteCol",value:function deleteCol(rng){var cell=dom.ancestor(rng.commonAncestor(),dom.isCell);var row=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(cell).closest("tr");var cellPos=row.children("td, th").index(external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(cell));var vTable=new TableResultAction(cell,TableResultAction.where.Column,TableResultAction.requestAction.Delete,external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(row).closest("table")[0]);var actions=vTable.getActionList();for(var actionIndex=0;actionIndex<actions.length;actionIndex++){if(!actions[actionIndex]){continue}switch(actions[actionIndex].action){case TableResultAction.resultAction.Ignore:continue;case TableResultAction.resultAction.SubtractSpanCount:{var baseCell=actions[actionIndex].baseCell;var hasColspan=baseCell.colSpan&&baseCell.colSpan>1;if(hasColspan){var colspanNumber=baseCell.colSpan?parseInt(baseCell.colSpan,10):0;if(colspanNumber>2){colspanNumber--;baseCell.setAttribute("colSpan",colspanNumber);if(baseCell.cellIndex===cellPos){baseCell.innerHTML=""}}else if(colspanNumber===2){baseCell.removeAttribute("colSpan");if(baseCell.cellIndex===cellPos){baseCell.innerHTML=""}}}}continue;case TableResultAction.resultAction.RemoveCell:dom.remove(actions[actionIndex].baseCell,true);continue}}}},{key:"createTable",value:function createTable(colCount,rowCount,options){var tds=[];var tdHTML;for(var idxCol=0;idxCol<colCount;idxCol++){tds.push("<td>"+dom.blank+"</td>")}tdHTML=tds.join("");var trs=[];var trHTML;for(var idxRow=0;idxRow<rowCount;idxRow++){trs.push("<tr>"+tdHTML+"</tr>")}trHTML=trs.join("");var $table=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<table>"+trHTML+"</table>");if(options&&options.tableClassName){$table.addClass(options.tableClassName)}return $table[0]}},{key:"deleteTable",value:function deleteTable(rng){var cell=dom.ancestor(rng.commonAncestor(),dom.isCell);external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(cell).closest("table").remove()}}])}();function Editor_typeof(o){"@babel/helpers - typeof";return Editor_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Editor_typeof(o)}function Editor_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function Editor_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Editor_toPropertyKey(o.key),o)}}function Editor_createClass(e,r,t){return r&&Editor_defineProperties(e.prototype,r),t&&Editor_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Editor_toPropertyKey(t){var i=Editor_toPrimitive(t,"string");return"symbol"==Editor_typeof(i)?i:i+""}function Editor_toPrimitive(t,r){if("object"!=Editor_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=Editor_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var KEY_BOGUS="bogus";var MAILTO_PATTERN=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;var TEL_PATTERN=/^(\+?\d{1,3}[\s-]?)?(\d{1,4})[\s-]?(\d{1,4})[\s-]?(\d{1,4})$/;var URL_SCHEME_PATTERN=/^([A-Za-z][A-Za-z0-9+-.]*\:|#|\/)/;var Editor=function(){function Editor(context){var _this=this;Editor_classCallCheck(this,Editor);this.context=context;this.$note=context.layoutInfo.note;this.$editor=context.layoutInfo.editor;this.$editable=context.layoutInfo.editable;this.options=context.options;this.lang=this.options.langInfo;this.editable=this.$editable[0];this.lastRange=null;this.snapshot=null;this.style=new Style;this.table=new Table;this.typing=new Typing(context);this.bullet=new Bullet;this.history=new History(context);this.context.memo("help.escape",this.lang.help.escape);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);var commands=["bold","italic","underline","strikethrough","superscript","subscript","justifyLeft","justifyCenter","justifyRight","justifyFull","formatBlock","removeFormat","backColor"];for(var idx=0,len=commands.length;idx<len;idx++){this[commands[idx]]=function(sCmd){return function(value){_this.beforeCommand();document.execCommand(sCmd,false,value);_this.afterCommand(true)}}(commands[idx]);this.context.memo("help."+commands[idx],this.lang.help[commands[idx]])}this.fontName=this.wrapCommand((function(value){return _this.fontStyling("font-family",env.validFontName(value))}));this.fontSize=this.wrapCommand((function(value){var unit=_this.currentStyle()["font-size-unit"];return _this.fontStyling("font-size",value+unit)}));this.fontSizeUnit=this.wrapCommand((function(value){var size=_this.currentStyle()["font-size"];return _this.fontStyling("font-size",size+value)}));for(var _idx=1;_idx<=6;_idx++){this["formatH"+_idx]=function(idx){return function(){_this.formatBlock("H"+idx)}}(_idx);this.context.memo("help.formatH"+_idx,this.lang.help["formatH"+_idx])}this.insertParagraph=this.wrapCommand((function(){_this.typing.insertParagraph(_this.editable)}));this.insertOrderedList=this.wrapCommand((function(){_this.bullet.insertOrderedList(_this.editable)}));this.insertUnorderedList=this.wrapCommand((function(){_this.bullet.insertUnorderedList(_this.editable)}));this.indent=this.wrapCommand((function(){_this.bullet.indent(_this.editable)}));this.outdent=this.wrapCommand((function(){_this.bullet.outdent(_this.editable)}));this.insertNode=this.wrapCommand((function(node){if(_this.isLimited(external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(node).text().length)){return}var rng=_this.getLastRange();rng.insertNode(node);_this.setLastRange(range.createFromNodeAfter(node).select())}));this.insertText=this.wrapCommand((function(text){if(_this.isLimited(text.length)){return}var rng=_this.getLastRange();var textNode=rng.insertNode(dom.createText(text));_this.setLastRange(range.create(textNode,dom.nodeLength(textNode)).select())}));this.pasteHTML=this.wrapCommand((function(markup){if(_this.isLimited(markup.length)){return}markup=_this.context.invoke("codeview.purify",markup);var contents=_this.getLastRange().pasteHTML(markup);_this.setLastRange(range.createFromNodeAfter(lists.last(contents)).select())}));this.formatBlock=this.wrapCommand((function(tagName,$target){var onApplyCustomStyle=_this.options.callbacks.onApplyCustomStyle;if(onApplyCustomStyle){onApplyCustomStyle.call(_this,$target,_this.context,_this.onFormatBlock)}else{_this.onFormatBlock(tagName,$target)}}));this.insertHorizontalRule=this.wrapCommand((function(){var hrNode=_this.getLastRange().insertNode(dom.create("HR"));if(hrNode.nextSibling){_this.setLastRange(range.create(hrNode.nextSibling,0).normalize().select())}}));this.lineHeight=this.wrapCommand((function(value){_this.style.stylePara(_this.getLastRange(),{lineHeight:value})}));this.createLink=this.wrapCommand((function(linkInfo){var rel=[];var linkUrl=linkInfo.url;var linkText=linkInfo.text;var isNewWindow=linkInfo.isNewWindow;var addNoReferrer=_this.options.linkAddNoReferrer;var addNoOpener=_this.options.linkAddNoOpener;var rng=linkInfo.range||_this.getLastRange();var additionalTextLength=linkText.length-rng.toString().length;if(additionalTextLength>0&&_this.isLimited(additionalTextLength)){return}var isTextChanged=rng.toString()!==linkText;if(typeof linkUrl==="string"){linkUrl=linkUrl.trim()}if(_this.options.onCreateLink){linkUrl=_this.options.onCreateLink(linkUrl)}else{linkUrl=_this.checkLinkUrl(linkUrl)}var anchors=[];if(isTextChanged){rng=rng.deleteContents();var anchor=rng.insertNode(external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<A></A>").text(linkText)[0]);anchors.push(anchor)}else{anchors=_this.style.styleNodes(rng,{nodeName:"A",expandClosestSibling:true,onlyPartialContains:true})}external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(anchors,(function(idx,anchor){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(anchor).attr("href",linkUrl);if(isNewWindow){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(anchor).attr("target","_blank");if(addNoReferrer){rel.push("noreferrer")}if(addNoOpener){rel.push("noopener")}if(rel.length){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(anchor).attr("rel",rel.join(" "))}}else{external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(anchor).removeAttr("target")}}));_this.setLastRange(_this.createRangeFromList(anchors).select())}));this.color=this.wrapCommand((function(colorInfo){var foreColor=colorInfo.foreColor;var backColor=colorInfo.backColor;if(foreColor){document.execCommand("foreColor",false,foreColor)}if(backColor){document.execCommand("backColor",false,backColor)}}));this.foreColor=this.wrapCommand((function(colorInfo){document.execCommand("foreColor",false,colorInfo)}));this.insertTable=this.wrapCommand((function(dim){var dimension=dim.split("x");var rng=_this.getLastRange().deleteContents();rng.insertNode(_this.table.createTable(dimension[0],dimension[1],_this.options))}));this.removeMedia=this.wrapCommand((function(){var $target=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(_this.restoreTarget()).parent();if($target.closest("figure").length){$target.closest("figure").remove()}else{$target=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(_this.restoreTarget()).detach()}_this.setLastRange(range.createFromSelection($target).select());_this.context.triggerEvent("media.delete",$target,_this.$editable)}));this.floatMe=this.wrapCommand((function(value){var $target=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(_this.restoreTarget());$target.toggleClass("note-float-left",value==="left");$target.toggleClass("note-float-right",value==="right");$target.css("float",value==="none"?"":value)}));this.resize=this.wrapCommand((function(value){var $target=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(_this.restoreTarget());value=parseFloat(value);if(value===0){$target.css("width","")}else{$target.css({width:value*100+"%",height:""})}}))}return Editor_createClass(Editor,[{key:"initialize",value:function initialize(){var _this2=this;this.$editable.on("keydown",(function(event){if(event.keyCode===key.code.ENTER){_this2.context.triggerEvent("enter",event)}_this2.context.triggerEvent("keydown",event);_this2.snapshot=_this2.history.makeSnapshot();_this2.hasKeyShortCut=false;if(!event.isDefaultPrevented()){if(_this2.options.shortcuts){_this2.hasKeyShortCut=_this2.handleKeyMap(event)}else{_this2.preventDefaultEditableShortCuts(event)}}if(_this2.isLimited(1,event)){var lastRange=_this2.getLastRange();if(lastRange.eo-lastRange.so===0){return false}}_this2.setLastRange();if(_this2.options.recordEveryKeystroke){if(_this2.hasKeyShortCut===false){_this2.history.recordUndo()}}})).on("keyup",(function(event){_this2.setLastRange();_this2.context.triggerEvent("keyup",event)})).on("focus",(function(event){_this2.setLastRange();_this2.context.triggerEvent("focus",event)})).on("blur",(function(event){_this2.context.triggerEvent("blur",event)})).on("mousedown",(function(event){_this2.context.triggerEvent("mousedown",event)})).on("mouseup",(function(event){_this2.setLastRange();_this2.history.recordUndo();_this2.context.triggerEvent("mouseup",event)})).on("scroll",(function(event){_this2.context.triggerEvent("scroll",event)})).on("paste",(function(event){_this2.setLastRange();_this2.context.triggerEvent("paste",event)})).on("copy",(function(event){_this2.context.triggerEvent("copy",event)})).on("input",(function(){if(_this2.isLimited(0)&&_this2.snapshot){_this2.history.applySnapshot(_this2.snapshot)}}));this.$editable.attr("spellcheck",this.options.spellCheck);this.$editable.attr("autocorrect",this.options.spellCheck);if(this.options.disableGrammar){this.$editable.attr("data-gramm",false)}this.$editable.html(dom.html(this.$note)||dom.emptyPara);this.$editable.on(env.inputEventName,func.debounce((function(){_this2.context.triggerEvent("change",_this2.$editable.html(),_this2.$editable)}),10));this.$editable.on("focusin",(function(event){_this2.context.triggerEvent("focusin",event)})).on("focusout",(function(event){_this2.context.triggerEvent("focusout",event)}));if(this.options.airMode){if(this.options.overrideContextMenu){this.$editor.on("contextmenu",(function(event){_this2.context.triggerEvent("contextmenu",event);return false}))}}else{if(this.options.width){this.$editor.outerWidth(this.options.width)}if(this.options.height){this.$editable.outerHeight(this.options.height)}if(this.options.maxHeight){this.$editable.css("max-height",this.options.maxHeight)}if(this.options.minHeight){this.$editable.css("min-height",this.options.minHeight)}}this.history.recordUndo();this.setLastRange()}},{key:"destroy",value:function destroy(){this.$editable.off()}},{key:"handleKeyMap",value:function handleKeyMap(event){var keyMap=this.options.keyMap[env.isMac?"mac":"pc"];var keys=[];if(event.metaKey){keys.push("CMD")}if(event.ctrlKey&&!event.altKey){keys.push("CTRL")}if(event.shiftKey){keys.push("SHIFT")}var keyName=key.nameFromCode[event.keyCode];if(keyName){keys.push(keyName)}var eventName=keyMap[keys.join("+")];if(keyName==="TAB"&&!this.options.tabDisable){this.afterCommand()}else if(eventName){if(this.context.invoke(eventName)!==false){event.preventDefault();return true}}else if(key.isEdit(event.keyCode)){if(key.isRemove(event.keyCode)){this.context.invoke("removed")}this.afterCommand()}return false}},{key:"preventDefaultEditableShortCuts",value:function preventDefaultEditableShortCuts(event){if((event.ctrlKey||event.metaKey)&&lists.contains([66,73,85],event.keyCode)){event.preventDefault()}}},{key:"isLimited",value:function isLimited(pad,event){pad=pad||0;if(typeof event!=="undefined"){if(key.isMove(event.keyCode)||key.isNavigation(event.keyCode)||event.ctrlKey||event.metaKey||lists.contains([key.code.BACKSPACE,key.code.DELETE],event.keyCode)){return false}}if(this.options.maxTextLength>0){if(this.$editable.text().length+pad>this.options.maxTextLength){return true}}return false}},{key:"checkLinkUrl",value:function checkLinkUrl(linkUrl){if(MAILTO_PATTERN.test(linkUrl)){return"mailto://"+linkUrl}else if(TEL_PATTERN.test(linkUrl)){return"tel://"+linkUrl}else if(!URL_SCHEME_PATTERN.test(linkUrl)){return"http://"+linkUrl}return linkUrl}},{key:"createRange",value:function createRange(){this.focus();this.setLastRange();return this.getLastRange()}},{key:"createRangeFromList",value:function createRangeFromList(lst){var startRange=range.createFromNodeBefore(lists.head(lst));var startPoint=startRange.getStartPoint();var endRange=range.createFromNodeAfter(lists.last(lst));var endPoint=endRange.getEndPoint();return range.create(startPoint.node,startPoint.offset,endPoint.node,endPoint.offset)}},{key:"setLastRange",value:function setLastRange(rng){if(rng){this.lastRange=rng}else{this.lastRange=range.create(this.editable);if(external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(this.lastRange.sc).closest(".note-editable").length===0){this.lastRange=range.createFromBodyElement(this.editable)}}}},{key:"getLastRange",value:function getLastRange(){if(!this.lastRange){this.setLastRange()}return this.lastRange}},{key:"saveRange",value:function saveRange(thenCollapse){if(thenCollapse){this.getLastRange().collapse().select()}}},{key:"restoreRange",value:function restoreRange(){if(this.lastRange){this.lastRange.select();this.focus()}}},{key:"saveTarget",value:function saveTarget(node){this.$editable.data("target",node)}},{key:"clearTarget",value:function clearTarget(){this.$editable.removeData("target")}},{key:"restoreTarget",value:function restoreTarget(){return this.$editable.data("target")}},{key:"currentStyle",value:function currentStyle(){var rng=range.create();if(rng){rng=rng.normalize()}return rng?this.style.current(rng):this.style.fromNode(this.$editable)}},{key:"styleFromNode",value:function styleFromNode($node){return this.style.fromNode($node)}},{key:"undo",value:function undo(){this.context.triggerEvent("before.command",this.$editable.html());this.history.undo();this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"commit",value:function commit(){this.context.triggerEvent("before.command",this.$editable.html());this.history.commit();this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"redo",value:function redo(){this.context.triggerEvent("before.command",this.$editable.html());this.history.redo();this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"beforeCommand",value:function beforeCommand(){this.context.triggerEvent("before.command",this.$editable.html());document.execCommand("styleWithCSS",false,this.options.styleWithCSS);this.focus()}},{key:"afterCommand",value:function afterCommand(isPreventTrigger){this.normalizeContent();this.history.recordUndo();if(!isPreventTrigger){this.context.triggerEvent("change",this.$editable.html(),this.$editable)}}},{key:"tab",value:function tab(){var rng=this.getLastRange();if(rng.isCollapsed()&&rng.isOnCell()){this.table.tab(rng)}else{if(this.options.tabSize===0){return false}if(!this.isLimited(this.options.tabSize)){this.beforeCommand();this.typing.insertTab(rng,this.options.tabSize);this.afterCommand()}}}},{key:"untab",value:function untab(){var rng=this.getLastRange();if(rng.isCollapsed()&&rng.isOnCell()){this.table.tab(rng,true)}else{if(this.options.tabSize===0){return false}}}},{key:"wrapCommand",value:function wrapCommand(fn){return function(){this.beforeCommand();fn.apply(this,arguments);this.afterCommand()}}},{key:"removed",value:function removed(rng,node,tagName){rng=range.create();if(rng.isCollapsed()&&rng.isOnCell()){node=rng.ec;if((tagName=node.tagName)&&node.childElementCount===1&&node.childNodes[0].tagName==="BR"){if(tagName==="P"){node.remove()}else if(["TH","TD"].indexOf(tagName)>=0){node.firstChild.remove()}}}}},{key:"insertImage",value:function insertImage(src,param){var _this3=this;return createImage(src,param).then((function($image){_this3.beforeCommand();if(typeof param==="function"){param($image)}else{if(typeof param==="string"){$image.attr("data-filename",param)}$image.css("width",Math.min(_this3.$editable.width(),$image.width()))}$image.show();_this3.getLastRange().insertNode($image[0]);_this3.setLastRange(range.createFromNodeAfter($image[0]).select());_this3.afterCommand()})).fail((function(e){_this3.context.triggerEvent("image.upload.error",e)}))}},{key:"insertImagesAsDataURL",value:function insertImagesAsDataURL(files){var _this4=this;external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(files,(function(idx,file){var filename=file.name;if(_this4.options.maximumImageFileSize&&_this4.options.maximumImageFileSize<file.size){_this4.context.triggerEvent("image.upload.error",_this4.lang.image.maximumFileSizeError)}else{readFileAsDataURL(file).then((function(dataURL){return _this4.insertImage(dataURL,filename)})).fail((function(){_this4.context.triggerEvent("image.upload.error")}))}}))}},{key:"insertImagesOrCallback",value:function insertImagesOrCallback(files){var callbacks=this.options.callbacks;if(callbacks.onImageUpload){this.context.triggerEvent("image.upload",files)}else{this.insertImagesAsDataURL(files)}}},{key:"getSelectedText",value:function getSelectedText(){var rng=this.getLastRange();if(rng.isOnAnchor()){rng=range.createFromNode(dom.ancestor(rng.sc,dom.isAnchor))}return rng.toString()}},{key:"onFormatBlock",value:function onFormatBlock(tagName,$target){document.execCommand("FormatBlock",false,env.isMSIE?"<"+tagName+">":tagName);if($target&&$target.length){if($target[0].tagName.toUpperCase()!==tagName.toUpperCase()){$target=$target.find(tagName)}if($target&&$target.length){var currentRange=this.createRange();var $parent=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()([currentRange.sc,currentRange.ec]).closest(tagName);$parent.removeClass();var className=$target[0].className||"";if(className){$parent.addClass(className)}}}}},{key:"formatPara",value:function formatPara(){this.formatBlock("P")}},{key:"fontStyling",value:function fontStyling(target,value){var rng=this.getLastRange();if(rng!==""){var spans=this.style.styleNodes(rng);this.$editor.find(".note-status-output").html("");external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(spans).css(target,value);if(rng.isCollapsed()){var firstSpan=lists.head(spans);if(firstSpan&&!dom.nodeLength(firstSpan)){firstSpan.innerHTML=dom.ZERO_WIDTH_NBSP_CHAR;range.createFromNode(firstSpan.firstChild).select();this.setLastRange();this.$editable.data(KEY_BOGUS,firstSpan)}}else{rng.select()}}else{var noteStatusOutput=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().now();this.$editor.find(".note-status-output").html('<div id="note-status-output-'+noteStatusOutput+'" class="alert alert-info">'+this.lang.output.noSelection+"</div>");setTimeout((function(){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("#note-status-output-"+noteStatusOutput).remove()}),5e3)}}},{key:"unlink",value:function unlink(){var rng=this.getLastRange();if(rng.isOnAnchor()){var anchor=dom.ancestor(rng.sc,dom.isAnchor);rng=range.createFromNode(anchor);rng.select();this.setLastRange();this.beforeCommand();document.execCommand("unlink");this.afterCommand()}}},{key:"getLinkInfo",value:function getLinkInfo(){if(!this.hasFocus()){this.focus()}var rng=this.getLastRange().expand(dom.isAnchor);var $anchor=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(lists.head(rng.nodes(dom.isAnchor)));var linkInfo={range:rng,text:rng.toString(),url:$anchor.length?$anchor.attr("href"):""};if($anchor.length){linkInfo.isNewWindow=$anchor.attr("target")==="_blank"}return linkInfo}},{key:"addRow",value:function addRow(position){var rng=this.getLastRange(this.$editable);if(rng.isCollapsed()&&rng.isOnCell()){this.beforeCommand();this.table.addRow(rng,position);this.afterCommand()}}},{key:"addCol",value:function addCol(position){var rng=this.getLastRange(this.$editable);if(rng.isCollapsed()&&rng.isOnCell()){this.beforeCommand();this.table.addCol(rng,position);this.afterCommand()}}},{key:"deleteRow",value:function deleteRow(){var rng=this.getLastRange(this.$editable);if(rng.isCollapsed()&&rng.isOnCell()){this.beforeCommand();this.table.deleteRow(rng);this.afterCommand()}}},{key:"deleteCol",value:function deleteCol(){var rng=this.getLastRange(this.$editable);if(rng.isCollapsed()&&rng.isOnCell()){this.beforeCommand();this.table.deleteCol(rng);this.afterCommand()}}},{key:"deleteTable",value:function deleteTable(){var rng=this.getLastRange(this.$editable);if(rng.isCollapsed()&&rng.isOnCell()){this.beforeCommand();this.table.deleteTable(rng);this.afterCommand()}}},{key:"resizeTo",value:function resizeTo(pos,$target,bKeepRatio){var imageSize;if(bKeepRatio){var newRatio=pos.y/pos.x;var ratio=$target.data("ratio");imageSize={width:ratio>newRatio?pos.x:pos.y/ratio,height:ratio>newRatio?pos.x*ratio:pos.y}}else{imageSize={width:pos.x,height:pos.y}}$target.css(imageSize)}},{key:"hasFocus",value:function hasFocus(){return this.$editable.is(":focus")}},{key:"focus",value:function focus(){if(!this.hasFocus()){this.$editable.trigger("focus")}}},{key:"isEmpty",value:function isEmpty(){return dom.isEmpty(this.$editable[0])||dom.emptyPara===this.$editable.html()}},{key:"empty",value:function empty(){this.context.invoke("code",dom.emptyPara)}},{key:"normalizeContent",value:function normalizeContent(){this.$editable[0].normalize()}}])}();function Clipboard_typeof(o){"@babel/helpers - typeof";return Clipboard_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Clipboard_typeof(o)}function Clipboard_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function Clipboard_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Clipboard_toPropertyKey(o.key),o)}}function Clipboard_createClass(e,r,t){return r&&Clipboard_defineProperties(e.prototype,r),t&&Clipboard_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Clipboard_toPropertyKey(t){var i=Clipboard_toPrimitive(t,"string");return"symbol"==Clipboard_typeof(i)?i:i+""}function Clipboard_toPrimitive(t,r){if("object"!=Clipboard_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=Clipboard_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var Clipboard=function(){function Clipboard(context){Clipboard_classCallCheck(this,Clipboard);this.context=context;this.options=context.options;this.$editable=context.layoutInfo.editable}return Clipboard_createClass(Clipboard,[{key:"initialize",value:function initialize(){this.$editable.on("paste",this.pasteByEvent.bind(this))}},{key:"pasteByEvent",value:function pasteByEvent(event){var _this=this;if(this.context.isDisabled()){return}var clipboardData=event.originalEvent.clipboardData;if(clipboardData&&clipboardData.items&&clipboardData.items.length){var clipboardFiles=clipboardData.files;var clipboardText=clipboardData.getData("Text");if(clipboardFiles.length>0&&this.options.allowClipboardImagePasting){this.context.invoke("editor.insertImagesOrCallback",clipboardFiles);event.preventDefault()}if(clipboardText.length>0&&this.context.invoke("editor.isLimited",clipboardText.length)){event.preventDefault()}}else if(window.clipboardData){var text=window.clipboardData.getData("text");if(this.context.invoke("editor.isLimited",text.length)){event.preventDefault()}}setTimeout((function(){_this.context.invoke("editor.afterCommand")}),10)}}])}();function Dropzone_typeof(o){"@babel/helpers - typeof";return Dropzone_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Dropzone_typeof(o)}function Dropzone_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function Dropzone_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Dropzone_toPropertyKey(o.key),o)}}function Dropzone_createClass(e,r,t){return r&&Dropzone_defineProperties(e.prototype,r),t&&Dropzone_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dropzone_toPropertyKey(t){var i=Dropzone_toPrimitive(t,"string");return"symbol"==Dropzone_typeof(i)?i:i+""}function Dropzone_toPrimitive(t,r){if("object"!=Dropzone_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=Dropzone_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var Dropzone=function(){function Dropzone(context){Dropzone_classCallCheck(this,Dropzone);this.context=context;this.$eventListener=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(document);this.$editor=context.layoutInfo.editor;this.$editable=context.layoutInfo.editable;this.options=context.options;this.lang=this.options.langInfo;this.documentEventHandlers={};this.$dropzone=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(['<div class="note-dropzone">','<div class="note-dropzone-message"></div>',"</div>"].join("")).prependTo(this.$editor)}return Dropzone_createClass(Dropzone,[{key:"initialize",value:function initialize(){if(this.options.disableDragAndDrop){this.documentEventHandlers.onDrop=function(e){e.preventDefault()};this.$eventListener=this.$dropzone;this.$eventListener.on("drop",this.documentEventHandlers.onDrop)}else{this.attachDragAndDropEvent()}}},{key:"attachDragAndDropEvent",value:function attachDragAndDropEvent(){var _this=this;var collection=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()();var $dropzoneMessage=this.$dropzone.find(".note-dropzone-message");this.documentEventHandlers.onDragenter=function(e){var isCodeview=_this.context.invoke("codeview.isActivated");var hasEditorSize=_this.$editor.width()>0&&_this.$editor.height()>0;if(!isCodeview&&!collection.length&&hasEditorSize){_this.$editor.addClass("dragover");_this.$dropzone.width(_this.$editor.width());_this.$dropzone.height(_this.$editor.height());$dropzoneMessage.text(_this.lang.image.dragImageHere)}collection=collection.add(e.target)};this.documentEventHandlers.onDragleave=function(e){collection=collection.not(e.target);if(!collection.length||e.target.nodeName==="BODY"){collection=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()();_this.$editor.removeClass("dragover")}};this.documentEventHandlers.onDrop=function(){collection=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()();_this.$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(){_this.$dropzone.addClass("hover");$dropzoneMessage.text(_this.lang.image.dropImage)})).on("dragleave",(function(){_this.$dropzone.removeClass("hover");$dropzoneMessage.text(_this.lang.image.dragImageHere)}));this.$dropzone.on("drop",(function(event){var dataTransfer=event.originalEvent.dataTransfer;event.preventDefault();if(dataTransfer&&dataTransfer.files&&dataTransfer.files.length){_this.$editable.trigger("focus");_this.context.invoke("editor.insertImagesOrCallback",dataTransfer.files)}else{external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(dataTransfer.types,(function(idx,type){if(type.toLowerCase().indexOf("_moz_")>-1){return}var content=dataTransfer.getData(type);if(type.toLowerCase().indexOf("text")>-1){_this.context.invoke("editor.pasteHTML",content)}else{external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(content).each((function(idx,item){_this.context.invoke("editor.insertNode",item)}))}}))}})).on("dragover",false)}},{key:"destroy",value:function destroy(){var _this2=this;Object.keys(this.documentEventHandlers).forEach((function(key){_this2.$eventListener.off(key.slice(2).toLowerCase(),_this2.documentEventHandlers[key])}));this.documentEventHandlers={}}}])}();function Codeview_typeof(o){"@babel/helpers - typeof";return Codeview_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Codeview_typeof(o)}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]}},e:function e(r){throw r},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function s(){t=t.call(r)},n:function n(){var r=t.next();return a=r.done,r},e:function e(r){u=!0,o=r},f:function f(){try{a||null==t["return"]||t["return"]()}finally{if(u)throw o}}}}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function Codeview_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function Codeview_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Codeview_toPropertyKey(o.key),o)}}function Codeview_createClass(e,r,t){return r&&Codeview_defineProperties(e.prototype,r),t&&Codeview_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Codeview_toPropertyKey(t){var i=Codeview_toPrimitive(t,"string");return"symbol"==Codeview_typeof(i)?i:i+""}function Codeview_toPrimitive(t,r){if("object"!=Codeview_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=Codeview_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var CodeView=function(){function CodeView(context){Codeview_classCallCheck(this,CodeView);this.context=context;this.$editor=context.layoutInfo.editor;this.$editable=context.layoutInfo.editable;this.$codable=context.layoutInfo.codable;this.options=context.options;this.CodeMirrorConstructor=window.CodeMirror;if(this.options.codemirror.CodeMirrorConstructor){this.CodeMirrorConstructor=this.options.codemirror.CodeMirrorConstructor}}return Codeview_createClass(CodeView,[{key:"sync",value:function sync(html){var isCodeview=this.isActivated();var CodeMirror=this.CodeMirrorConstructor;if(isCodeview){if(html){if(CodeMirror){this.$codable.data("cmEditor").getDoc().setValue(html)}else{this.$codable.val(html)}}else{if(CodeMirror){this.$codable.data("cmEditor").save()}}}}},{key:"initialize",value:function initialize(){var _this=this;this.$codable.on("keyup",(function(event){if(event.keyCode===key.code.ESCAPE){_this.deactivate()}}))}},{key:"isActivated",value:function isActivated(){return this.$editor.hasClass("codeview")}},{key:"toggle",value:function toggle(){if(this.isActivated()){this.deactivate()}else{this.activate()}this.context.triggerEvent("codeview.toggled")}},{key:"purify",value:function purify(value){if(this.options.codeviewFilter){value=value.replace(this.options.codeviewFilterRegex,"");if(this.options.codeviewIframeFilter){var whitelist=this.options.codeviewIframeWhitelistSrc.concat(this.options.codeviewIframeWhitelistSrcBase);value=value.replace(/(<iframe.*?>.*?(?:<\/iframe>)?)/gi,(function(tag){if(/<.+src(?==?('|"|\s)?)[\s\S]+src(?=('|"|\s)?)[^>]*?>/i.test(tag)){return""}var _iterator=_createForOfIteratorHelper(whitelist),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var src=_step.value;if(new RegExp('src="(https?:)?//'+src.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+'/(.+)"').test(tag)){return tag}}}catch(err){_iterator.e(err)}finally{_iterator.f()}return""}))}}return value}},{key:"activate",value:function activate(){var _this2=this;var CodeMirror=this.CodeMirrorConstructor;this.$codable.val(dom.html(this.$editable,this.options.prettifyHtml));this.$codable.height(this.$editable.height());this.context.invoke("toolbar.updateCodeview",true);this.context.invoke("airPopover.updateCodeview",true);this.$editor.addClass("codeview");this.$codable.trigger("focus");if(CodeMirror){var cmEditor=CodeMirror.fromTextArea(this.$codable[0],this.options.codemirror);if(this.options.codemirror.tern){var server=new CodeMirror.TernServer(this.options.codemirror.tern);cmEditor.ternServer=server;cmEditor.on("cursorActivity",(function(cm){server.updateArgHints(cm)}))}cmEditor.on("blur",(function(event){_this2.context.triggerEvent("blur.codeview",cmEditor.getValue(),event)}));cmEditor.on("change",(function(){_this2.context.triggerEvent("change.codeview",cmEditor.getValue(),cmEditor)}));cmEditor.setSize(null,this.$editable.outerHeight());this.$codable.data("cmEditor",cmEditor)}else{this.$codable.on("blur",(function(event){_this2.context.triggerEvent("blur.codeview",_this2.$codable.val(),event)}));this.$codable.on("input",(function(){_this2.context.triggerEvent("change.codeview",_this2.$codable.val(),_this2.$codable)}))}}},{key:"deactivate",value:function deactivate(){var CodeMirror=this.CodeMirrorConstructor;if(CodeMirror){var cmEditor=this.$codable.data("cmEditor");this.$codable.val(cmEditor.getValue());cmEditor.toTextArea()}var value=this.purify(dom.value(this.$codable,this.options.prettifyHtml)||dom.emptyPara);var isChange=this.$editable.html()!==value;this.$editable.html(value);this.$editable.height(this.options.height?this.$codable.height():"auto");this.$editor.removeClass("codeview");if(isChange){this.context.triggerEvent("change",this.$editable.html(),this.$editable)}this.$editable.trigger("focus");this.context.invoke("toolbar.updateCodeview",false);this.context.invoke("airPopover.updateCodeview",false)}},{key:"destroy",value:function destroy(){if(this.isActivated()){this.deactivate()}}}])}();function Statusbar_typeof(o){"@babel/helpers - typeof";return Statusbar_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Statusbar_typeof(o)}function Statusbar_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function Statusbar_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Statusbar_toPropertyKey(o.key),o)}}function Statusbar_createClass(e,r,t){return r&&Statusbar_defineProperties(e.prototype,r),t&&Statusbar_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Statusbar_toPropertyKey(t){var i=Statusbar_toPrimitive(t,"string");return"symbol"==Statusbar_typeof(i)?i:i+""}function Statusbar_toPrimitive(t,r){if("object"!=Statusbar_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=Statusbar_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var EDITABLE_PADDING=24;var Statusbar=function(){function Statusbar(context){Statusbar_classCallCheck(this,Statusbar);this.$document=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(document);this.$statusbar=context.layoutInfo.statusbar;this.$editable=context.layoutInfo.editable;this.$codable=context.layoutInfo.codable;this.options=context.options}return Statusbar_createClass(Statusbar,[{key:"initialize",value:function initialize(){var _this=this;if(this.options.airMode||this.options.disableResizeEditor){this.destroy();return}this.$statusbar.on("mousedown touchstart",(function(event){event.preventDefault();event.stopPropagation();var editableTop=_this.$editable.offset().top-_this.$document.scrollTop();var editableCodeTop=_this.$codable.offset().top-_this.$document.scrollTop();var onStatusbarMove=function onStatusbarMove(event){var originalEvent=event.type=="mousemove"?event:event.originalEvent.touches[0];var height=originalEvent.clientY-(editableTop+EDITABLE_PADDING);var heightCode=originalEvent.clientY-(editableCodeTop+EDITABLE_PADDING);height=_this.options.minheight>0?Math.max(height,_this.options.minheight):height;height=_this.options.maxHeight>0?Math.min(height,_this.options.maxHeight):height;heightCode=_this.options.minheight>0?Math.max(heightCode,_this.options.minheight):heightCode;heightCode=_this.options.maxHeight>0?Math.min(heightCode,_this.options.maxHeight):heightCode;_this.$editable.height(height);_this.$codable.height(heightCode)};_this.$document.on("mousemove touchmove",onStatusbarMove).one("mouseup touchend",(function(){_this.$document.off("mousemove touchmove",onStatusbarMove)}))}))}},{key:"destroy",value:function destroy(){this.$statusbar.off();this.$statusbar.addClass("locked")}}])}();function Fullscreen_typeof(o){"@babel/helpers - typeof";return Fullscreen_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Fullscreen_typeof(o)}function Fullscreen_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function Fullscreen_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Fullscreen_toPropertyKey(o.key),o)}}function Fullscreen_createClass(e,r,t){return r&&Fullscreen_defineProperties(e.prototype,r),t&&Fullscreen_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fullscreen_toPropertyKey(t){var i=Fullscreen_toPrimitive(t,"string");return"symbol"==Fullscreen_typeof(i)?i:i+""}function Fullscreen_toPrimitive(t,r){if("object"!=Fullscreen_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=Fullscreen_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var Fullscreen=function(){function Fullscreen(context){var _this=this;Fullscreen_classCallCheck(this,Fullscreen);this.context=context;this.$editor=context.layoutInfo.editor;this.$toolbar=context.layoutInfo.toolbar;this.$editable=context.layoutInfo.editable;this.$codable=context.layoutInfo.codable;this.$window=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(window);this.$scrollbar=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("html, body");this.scrollbarClassName="note-fullscreen-body";this.onResize=function(){_this.resizeTo({h:_this.$window.height()-_this.$toolbar.outerHeight()})}}return Fullscreen_createClass(Fullscreen,[{key:"resizeTo",value:function resizeTo(size){this.$editable.css("height",size.h);this.$codable.css("height",size.h);if(this.$codable.data("cmeditor")){this.$codable.data("cmeditor").setsize(null,size.h)}}},{key:"toggle",value:function toggle(){this.$editor.toggleClass("fullscreen");var isFullscreen=this.isFullscreen();this.$scrollbar.toggleClass(this.scrollbarClassName,isFullscreen);if(isFullscreen){this.$editable.data("orgHeight",this.$editable.css("height"));this.$editable.data("orgMaxHeight",this.$editable.css("maxHeight"));this.$editable.css("maxHeight","");this.$window.on("resize",this.onResize).trigger("resize")}else{this.$window.off("resize",this.onResize);this.resizeTo({h:this.$editable.data("orgHeight")});this.$editable.css("maxHeight",this.$editable.css("orgMaxHeight"))}this.context.invoke("toolbar.updateFullscreen",isFullscreen)}},{key:"isFullscreen",value:function isFullscreen(){return this.$editor.hasClass("fullscreen")}},{key:"destroy",value:function destroy(){this.$scrollbar.removeClass(this.scrollbarClassName)}}])}();function Handle_typeof(o){"@babel/helpers - typeof";return Handle_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Handle_typeof(o)}function Handle_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function Handle_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Handle_toPropertyKey(o.key),o)}}function Handle_createClass(e,r,t){return r&&Handle_defineProperties(e.prototype,r),t&&Handle_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Handle_toPropertyKey(t){var i=Handle_toPrimitive(t,"string");return"symbol"==Handle_typeof(i)?i:i+""}function Handle_toPrimitive(t,r){if("object"!=Handle_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=Handle_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var Handle=function(){function Handle(context){var _this=this;Handle_classCallCheck(this,Handle);this.context=context;this.$document=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(document);this.$editingArea=context.layoutInfo.editingArea;this.options=context.options;this.lang=this.options.langInfo;this.events={"summernote.mousedown":function summernoteMousedown(we,e){if(_this.update(e.target,e)){e.preventDefault()}},"summernote.keyup summernote.scroll summernote.change summernote.dialog.shown":function summernoteKeyupSummernoteScrollSummernoteChangeSummernoteDialogShown(){_this.update()},"summernote.disable summernote.blur":function summernoteDisableSummernoteBlur(){_this.hide()},"summernote.codeview.toggled":function summernoteCodeviewToggled(){_this.update()}}}return Handle_createClass(Handle,[{key:"initialize",value:function initialize(){var _this2=this;this.$handle=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(['<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(event){if(dom.isControlSizing(event.target)){event.preventDefault();event.stopPropagation();var $target=_this2.$handle.find(".note-control-selection").data("target");var posStart=$target.offset();var scrollTop=_this2.$document.scrollTop();var onMouseMove=function onMouseMove(event){_this2.context.invoke("editor.resizeTo",{x:event.clientX-posStart.left,y:event.clientY-(posStart.top-scrollTop)},$target,!event.shiftKey);_this2.update($target[0],event)};_this2.$document.on("mousemove",onMouseMove).one("mouseup",(function(e){e.preventDefault();_this2.$document.off("mousemove",onMouseMove);_this2.context.invoke("editor.afterCommand")}));if(!$target.data("ratio")){$target.data("ratio",$target.height()/$target.width())}}}));this.$handle.on("wheel",(function(event){event.preventDefault();_this2.update()}))}},{key:"destroy",value:function destroy(){this.$handle.remove()}},{key:"update",value:function update(target,event){if(this.context.isDisabled()){return false}var isImage=dom.isImg(target);var $selection=this.$handle.find(".note-control-selection");this.context.invoke("imagePopover.update",target,event);if(isImage){var $image=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(target);var areaRect=this.$editingArea[0].getBoundingClientRect();var imageRect=target.getBoundingClientRect();$selection.css({display:"block",left:imageRect.left-areaRect.left,top:imageRect.top-areaRect.top,width:imageRect.width,height:imageRect.height}).data("target",$image);var origImageObj=new Image;origImageObj.src=$image.attr("src");var sizingText=imageRect.width+"x"+imageRect.height+" ("+this.lang.image.original+": "+origImageObj.width+"x"+origImageObj.height+")";$selection.find(".note-control-selection-info").text(sizingText);this.context.invoke("editor.saveTarget",target)}else{this.hide()}return isImage}},{key:"hide",value:function hide(){this.context.invoke("editor.clearTarget");this.$handle.children().hide()}}])}();function AutoLink_typeof(o){"@babel/helpers - typeof";return AutoLink_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},AutoLink_typeof(o)}function AutoLink_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function AutoLink_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,AutoLink_toPropertyKey(o.key),o)}}function AutoLink_createClass(e,r,t){return r&&AutoLink_defineProperties(e.prototype,r),t&&AutoLink_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function AutoLink_toPropertyKey(t){var i=AutoLink_toPrimitive(t,"string");return"symbol"==AutoLink_typeof(i)?i:i+""}function AutoLink_toPrimitive(t,r){if("object"!=AutoLink_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=AutoLink_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var defaultScheme="http://";var linkPattern=/^([A-Za-z][A-Za-z0-9+-.]*\:[\/]{2}|tel:|mailto:[A-Z0-9._%+-]+@|xmpp:[A-Z0-9._%+-]+@)?(www\.)?(.+)$/i;var AutoLink=function(){function AutoLink(context){var _this=this;AutoLink_classCallCheck(this,AutoLink);this.context=context;this.options=context.options;this.$editable=context.layoutInfo.editable;this.events={"summernote.keyup":function summernoteKeyup(we,event){if(!event.isDefaultPrevented()){_this.handleKeyup(event)}},"summernote.keydown":function summernoteKeydown(we,event){_this.handleKeydown(event)}}}return AutoLink_createClass(AutoLink,[{key:"initialize",value:function initialize(){this.lastWordRange=null}},{key:"destroy",value:function destroy(){this.lastWordRange=null}},{key:"replace",value:function replace(){if(!this.lastWordRange){return}var keyword=this.lastWordRange.toString();var match=keyword.match(linkPattern);if(match&&(match[1]||match[2])){var link=match[1]?keyword:defaultScheme+keyword;var urlText=this.options.showDomainOnlyForAutolink?keyword.replace(/^(?:https?:\/\/)?(?:tel?:?)?(?:mailto?:?)?(?:xmpp?:?)?(?:www\.)?/i,"").split("/")[0]:keyword;var node=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<a></a>").html(urlText).attr("href",link)[0];if(this.context.options.linkTargetBlank){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(node).attr("target","_blank")}this.lastWordRange.insertNode(node);this.lastWordRange=null;this.context.invoke("editor.focus");this.context.triggerEvent("change",this.$editable.html(),this.$editable)}}},{key:"handleKeydown",value:function handleKeydown(event){if(lists.contains([key.code.ENTER,key.code.SPACE],event.keyCode)){var wordRange=this.context.invoke("editor.createRange").getWordRange();this.lastWordRange=wordRange}}},{key:"handleKeyup",value:function handleKeyup(event){if(key.code.SPACE===event.keyCode||key.code.ENTER===event.keyCode&&!event.shiftKey){this.replace()}}}])}();function AutoSync_typeof(o){"@babel/helpers - typeof";return AutoSync_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},AutoSync_typeof(o)}function AutoSync_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function AutoSync_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,AutoSync_toPropertyKey(o.key),o)}}function AutoSync_createClass(e,r,t){return r&&AutoSync_defineProperties(e.prototype,r),t&&AutoSync_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function AutoSync_toPropertyKey(t){var i=AutoSync_toPrimitive(t,"string");return"symbol"==AutoSync_typeof(i)?i:i+""}function AutoSync_toPrimitive(t,r){if("object"!=AutoSync_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=AutoSync_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var AutoSync=function(){function AutoSync(context){var _this=this;AutoSync_classCallCheck(this,AutoSync);this.$note=context.layoutInfo.note;this.events={"summernote.change":function summernoteChange(){_this.$note.val(context.invoke("code"))}}}return AutoSync_createClass(AutoSync,[{key:"shouldInitialize",value:function shouldInitialize(){return dom.isTextarea(this.$note[0])}}])}();function AutoReplace_typeof(o){"@babel/helpers - typeof";return AutoReplace_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},AutoReplace_typeof(o)}function AutoReplace_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function AutoReplace_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,AutoReplace_toPropertyKey(o.key),o)}}function AutoReplace_createClass(e,r,t){return r&&AutoReplace_defineProperties(e.prototype,r),t&&AutoReplace_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function AutoReplace_toPropertyKey(t){var i=AutoReplace_toPrimitive(t,"string");return"symbol"==AutoReplace_typeof(i)?i:i+""}function AutoReplace_toPrimitive(t,r){if("object"!=AutoReplace_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=AutoReplace_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var AutoReplace=function(){function AutoReplace(context){var _this=this;AutoReplace_classCallCheck(this,AutoReplace);this.context=context;this.options=context.options.replace||{};this.keys=[key.code.ENTER,key.code.SPACE,key.code.PERIOD,key.code.COMMA,key.code.SEMICOLON,key.code.SLASH];this.previousKeydownCode=null;this.events={"summernote.keyup":function summernoteKeyup(we,event){if(!event.isDefaultPrevented()){_this.handleKeyup(event)}},"summernote.keydown":function summernoteKeydown(we,event){_this.handleKeydown(event)}}}return AutoReplace_createClass(AutoReplace,[{key:"shouldInitialize",value:function shouldInitialize(){return!!this.options.match}},{key:"initialize",value:function initialize(){this.lastWord=null}},{key:"destroy",value:function destroy(){this.lastWord=null}},{key:"replace",value:function replace(){if(!this.lastWord){return}var self=this;var keyword=this.lastWord.toString();this.options.match(keyword,(function(match){if(match){var node="";if(typeof match==="string"){node=dom.createText(match)}else if(match instanceof jQuery){node=match[0]}else if(match instanceof Node){node=match}if(!node)return;self.lastWord.insertNode(node);self.lastWord=null;self.context.invoke("editor.focus")}}))}},{key:"handleKeydown",value:function handleKeydown(event){if(this.previousKeydownCode&&lists.contains(this.keys,this.previousKeydownCode)){this.previousKeydownCode=event.keyCode;return}if(lists.contains(this.keys,event.keyCode)){var wordRange=this.context.invoke("editor.createRange").getWordRange();this.lastWord=wordRange}this.previousKeydownCode=event.keyCode}},{key:"handleKeyup",value:function handleKeyup(event){if(lists.contains(this.keys,event.keyCode)){this.replace()}}}])}();function Placeholder_typeof(o){"@babel/helpers - typeof";return Placeholder_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Placeholder_typeof(o)}function Placeholder_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function Placeholder_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Placeholder_toPropertyKey(o.key),o)}}function Placeholder_createClass(e,r,t){return r&&Placeholder_defineProperties(e.prototype,r),t&&Placeholder_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Placeholder_toPropertyKey(t){var i=Placeholder_toPrimitive(t,"string");return"symbol"==Placeholder_typeof(i)?i:i+""}function Placeholder_toPrimitive(t,r){if("object"!=Placeholder_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=Placeholder_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var Placeholder=function(){function Placeholder(context){var _this=this;Placeholder_classCallCheck(this,Placeholder);this.context=context;this.$editingArea=context.layoutInfo.editingArea;this.options=context.options;if(this.options.inheritPlaceholder===true){this.options.placeholder=this.context.$note.attr("placeholder")||this.options.placeholder}this.events={"summernote.init summernote.change":function summernoteInitSummernoteChange(){_this.update()},"summernote.codeview.toggled":function summernoteCodeviewToggled(){_this.update()}}}return Placeholder_createClass(Placeholder,[{key:"shouldInitialize",value:function shouldInitialize(){return!!this.options.placeholder}},{key:"initialize",value:function initialize(){var _this2=this;this.$placeholder=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()('<div class="note-placeholder"></div>');this.$placeholder.on("click",(function(){_this2.context.invoke("focus")})).html(this.options.placeholder).prependTo(this.$editingArea);this.update()}},{key:"destroy",value:function destroy(){this.$placeholder.remove()}},{key:"update",value:function update(){var isShow=!this.context.invoke("codeview.isActivated")&&this.context.invoke("editor.isEmpty");this.$placeholder.toggle(isShow)}}])}();function Buttons_typeof(o){"@babel/helpers - typeof";return Buttons_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Buttons_typeof(o)}function Buttons_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function Buttons_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Buttons_toPropertyKey(o.key),o)}}function Buttons_createClass(e,r,t){return r&&Buttons_defineProperties(e.prototype,r),t&&Buttons_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Buttons_toPropertyKey(t){var i=Buttons_toPrimitive(t,"string");return"symbol"==Buttons_typeof(i)?i:i+""}function Buttons_toPrimitive(t,r){if("object"!=Buttons_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=Buttons_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var Buttons=function(){function Buttons(context){Buttons_classCallCheck(this,Buttons);this.ui=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.ui;this.context=context;this.$toolbar=context.layoutInfo.toolbar;this.options=context.options;this.lang=this.options.langInfo;this.invertedKeyMap=func.invertObject(this.options.keyMap[env.isMac?"mac":"pc"])}return Buttons_createClass(Buttons,[{key:"representShortcut",value:function representShortcut(editorMethod){var shortcut=this.invertedKeyMap[editorMethod];if(!this.options.shortcuts||!shortcut){return""}if(env.isMac){shortcut=shortcut.replace("CMD","\u2318").replace("SHIFT","\u21e7")}shortcut=shortcut.replace("BACKSLASH","\\").replace("SLASH","/").replace("LEFTBRACKET","[").replace("RIGHTBRACKET","]");return" ("+shortcut+")"}},{key:"button",value:function button(o){if(!this.options.tooltip&&o.tooltip){delete o.tooltip}o.container=this.options.container;return this.ui.button(o)}},{key:"initialize",value:function initialize(){this.addToolbarButtons();this.addImagePopoverButtons();this.addLinkPopoverButtons();this.addTablePopoverButtons();this.fontInstalledMap={}}},{key:"destroy",value:function destroy(){delete this.fontInstalledMap}},{key:"isFontInstalled",value:function isFontInstalled(name){if(!Object.prototype.hasOwnProperty.call(this.fontInstalledMap,name)){this.fontInstalledMap[name]=env.isFontInstalled(name)||lists.contains(this.options.fontNamesIgnoreCheck,name)}return this.fontInstalledMap[name]}},{key:"isFontDeservedToAdd",value:function isFontDeservedToAdd(name){name=name.toLowerCase();return name!==""&&this.isFontInstalled(name)&&env.genericFontFamilies.indexOf(name)===-1}},{key:"colorPalette",value:function colorPalette(className,tooltip,backColor,foreColor){var _this=this;return this.ui.buttonGroup({className:"note-color "+className,children:[this.button({className:"note-current-color-button",contents:this.ui.icon(this.options.icons.font+" note-recent-color"),tooltip:tooltip,click:function click(event){var $button=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(event.currentTarget);if(backColor&&foreColor){_this.context.invoke("editor.color",{backColor:$button.attr("data-backColor"),foreColor:$button.attr("data-foreColor")})}else if(backColor){_this.context.invoke("editor.color",{backColor:$button.attr("data-backColor")})}else if(foreColor){_this.context.invoke("editor.color",{foreColor:$button.attr("data-foreColor")})}},callback:function callback($button){var $recentColor=$button.find(".note-recent-color");if(backColor){$recentColor.css("background-color",_this.options.colorButton.backColor);$button.attr("data-backColor",_this.options.colorButton.backColor)}if(foreColor){$recentColor.css("color",_this.options.colorButton.foreColor);$button.attr("data-foreColor",_this.options.colorButton.foreColor)}else{$recentColor.css("color","transparent")}}}),this.button({className:"dropdown-toggle",contents:this.ui.dropdownButtonContents("",this.options),tooltip:this.lang.color.more,data:{toggle:"dropdown"}}),this.ui.dropdown({items:(backColor?['<div class="note-palette">','<div class="note-palette-title">'+this.lang.color.background+"</div>","<div>",'<button type="button" class="note-color-reset btn btn-light btn-default" data-event="backColor" data-value="transparent">',this.lang.color.transparent,"</button>","</div>",'<div class="note-holder" data-event="backColor">\x3c!-- back colors --\x3e</div>',"<div>",'<button type="button" class="note-color-select btn btn-light btn-default" data-event="openPalette" data-value="backColorPicker-'+this.options.id+'">',this.lang.color.cpSelect,"</button>",'<input type="color" id="backColorPicker-'+this.options.id+'" class="note-btn note-color-select-btn" value="'+this.options.colorButton.backColor+'" data-event="backColorPalette-'+this.options.id+'">',"</div>",'<div class="note-holder-custom" id="backColorPalette-'+this.options.id+'" data-event="backColor"></div>',"</div>"].join(""):"")+(foreColor?['<div class="note-palette">','<div class="note-palette-title">'+this.lang.color.foreground+"</div>","<div>",'<button type="button" class="note-color-reset btn btn-light btn-default" data-event="removeFormat" data-value="foreColor">',this.lang.color.resetToDefault,"</button>","</div>",'<div class="note-holder" data-event="foreColor">\x3c!-- fore colors --\x3e</div>',"<div>",'<button type="button" class="note-color-select btn btn-light btn-default" data-event="openPalette" data-value="foreColorPicker-'+this.options.id+'">',this.lang.color.cpSelect,"</button>",'<input type="color" id="foreColorPicker-'+this.options.id+'" class="note-btn note-color-select-btn" value="'+this.options.colorButton.foreColor+'" data-event="foreColorPalette-'+this.options.id+'">',"</div>",'<div class="note-holder-custom" id="foreColorPalette-'+this.options.id+'" data-event="foreColor"></div>',"</div>"].join(""):""),callback:function callback($dropdown){$dropdown.find(".note-holder").each((function(idx,item){var $holder=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(item);$holder.append(_this.ui.palette({colors:_this.options.colors,colorsName:_this.options.colorsName,eventName:$holder.data("event"),container:_this.options.container,tooltip:_this.options.tooltip}).render())}));var customColors=[["#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF"]];$dropdown.find(".note-holder-custom").each((function(idx,item){var $holder=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(item);$holder.append(_this.ui.palette({colors:customColors,colorsName:customColors,eventName:$holder.data("event"),container:_this.options.container,tooltip:_this.options.tooltip}).render())}));$dropdown.find("input[type=color]").each((function(idx,item){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(item).on("change",(function(){var $chip=$dropdown.find("#"+external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(this).data("event")).find(".note-color-btn").first();var color=this.value.toUpperCase();$chip.css("background-color",color).attr("aria-label",color).attr("data-value",color).attr("data-original-title",color);$chip.trigger("click")}))}))},click:function click(event){event.stopPropagation();var $parent=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("."+className).find(".note-dropdown-menu");var $button=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(event.target);var eventName=$button.data("event");var value=$button.attr("data-value");if(eventName==="openPalette"){var $picker=$parent.find("#"+value);var $palette=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()($parent.find("#"+$picker.data("event")).find(".note-color-row")[0]);var $chip=$palette.find(".note-color-btn").last().detach();var color=$picker.val();$chip.css("background-color",color).attr("aria-label",color).attr("data-value",color).attr("data-original-title",color);$palette.prepend($chip);$picker.trigger("click")}else{if(lists.contains(["backColor","foreColor"],eventName)){var key=eventName==="backColor"?"background-color":"color";var $color=$button.closest(".note-color").find(".note-recent-color");var $currentButton=$button.closest(".note-color").find(".note-current-color-button");$color.css(key,value);$currentButton.attr("data-"+eventName,value)}_this.context.invoke("editor."+eventName,value)}}})]}).render()}},{key:"addToolbarButtons",value:function addToolbarButtons(){var _this2=this;this.context.memo("button.style",(function(){return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents(_this2.ui.icon(_this2.options.icons.magic),_this2.options),tooltip:_this2.lang.style.style,data:{toggle:"dropdown"}}),_this2.ui.dropdown({className:"dropdown-style",items:_this2.options.styleTags,title:_this2.lang.style.style,template:function template(item){if(typeof item==="string"){item={tag:item,title:Object.prototype.hasOwnProperty.call(_this2.lang.style,item)?_this2.lang.style[item]:item}}var tag=item.tag;var title=item.title;var style=item.style?' style="'+item.style+'" ':"";var className=item.className?' class="'+item.className+'"':"";return"<"+tag+style+className+">"+title+"</"+tag+">"},click:_this2.context.createInvokeHandler("editor.formatBlock")})]).render()}));var _loop=function _loop(){var item=_this2.options.styleTags[styleIdx];_this2.context.memo("button.style."+item,(function(){return _this2.button({className:"note-btn-style-"+item,contents:'<div data-value="'+item+'">'+item.toUpperCase()+"</div>",tooltip:_this2.lang.style[item],click:_this2.context.createInvokeHandler("editor.formatBlock")}).render()}))};for(var styleIdx=0,styleLen=this.options.styleTags.length;styleIdx<styleLen;styleIdx++){_loop()}this.context.memo("button.bold",(function(){return _this2.button({className:"note-btn-bold",contents:_this2.ui.icon(_this2.options.icons.bold),tooltip:_this2.lang.font.bold+_this2.representShortcut("bold"),click:_this2.context.createInvokeHandlerAndUpdateState("editor.bold")}).render()}));this.context.memo("button.italic",(function(){return _this2.button({className:"note-btn-italic",contents:_this2.ui.icon(_this2.options.icons.italic),tooltip:_this2.lang.font.italic+_this2.representShortcut("italic"),click:_this2.context.createInvokeHandlerAndUpdateState("editor.italic")}).render()}));this.context.memo("button.underline",(function(){return _this2.button({className:"note-btn-underline",contents:_this2.ui.icon(_this2.options.icons.underline),tooltip:_this2.lang.font.underline+_this2.representShortcut("underline"),click:_this2.context.createInvokeHandlerAndUpdateState("editor.underline")}).render()}));this.context.memo("button.clear",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.eraser),tooltip:_this2.lang.font.clear+_this2.representShortcut("removeFormat"),click:_this2.context.createInvokeHandler("editor.removeFormat")}).render()}));this.context.memo("button.strikethrough",(function(){return _this2.button({className:"note-btn-strikethrough",contents:_this2.ui.icon(_this2.options.icons.strikethrough),tooltip:_this2.lang.font.strikethrough+_this2.representShortcut("strikethrough"),click:_this2.context.createInvokeHandlerAndUpdateState("editor.strikethrough")}).render()}));this.context.memo("button.superscript",(function(){return _this2.button({className:"note-btn-superscript",contents:_this2.ui.icon(_this2.options.icons.superscript),tooltip:_this2.lang.font.superscript,click:_this2.context.createInvokeHandlerAndUpdateState("editor.superscript")}).render()}));this.context.memo("button.subscript",(function(){return _this2.button({className:"note-btn-subscript",contents:_this2.ui.icon(_this2.options.icons.subscript),tooltip:_this2.lang.font.subscript,click:_this2.context.createInvokeHandlerAndUpdateState("editor.subscript")}).render()}));this.context.memo("button.fontname",(function(){var styleInfo=_this2.context.invoke("editor.currentStyle");if(_this2.options.addDefaultFonts){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(styleInfo["font-family"].split(","),(function(idx,fontname){fontname=fontname.trim().replace(/['"]+/g,"");if(_this2.isFontDeservedToAdd(fontname)){if(_this2.options.fontNames.indexOf(fontname)===-1){_this2.options.fontNames.push(fontname)}}}))}return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents('<span class="note-current-fontname"></span>',_this2.options),tooltip:_this2.lang.font.name,data:{toggle:"dropdown"}}),_this2.ui.dropdownCheck({className:"dropdown-fontname",checkClassName:_this2.options.icons.menuCheck,items:_this2.options.fontNames.filter(_this2.isFontInstalled.bind(_this2)),title:_this2.lang.font.name,template:function template(item){return'<span style="font-family: '+env.validFontName(item)+'">'+item+"</span>"},click:_this2.context.createInvokeHandlerAndUpdateState("editor.fontName")})]).render()}));this.context.memo("button.fontsize",(function(){return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents('<span class="note-current-fontsize"></span>',_this2.options),tooltip:_this2.lang.font.size,data:{toggle:"dropdown"}}),_this2.ui.dropdownCheck({className:"dropdown-fontsize",checkClassName:_this2.options.icons.menuCheck,items:_this2.options.fontSizes,title:_this2.lang.font.size,click:_this2.context.createInvokeHandlerAndUpdateState("editor.fontSize")})]).render()}));this.context.memo("button.fontsizeunit",(function(){return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents('<span class="note-current-fontsizeunit"></span>',_this2.options),tooltip:_this2.lang.font.sizeunit,data:{toggle:"dropdown"}}),_this2.ui.dropdownCheck({className:"dropdown-fontsizeunit",checkClassName:_this2.options.icons.menuCheck,items:_this2.options.fontSizeUnits,title:_this2.lang.font.sizeunit,click:_this2.context.createInvokeHandlerAndUpdateState("editor.fontSizeUnit")})]).render()}));this.context.memo("button.color",(function(){return _this2.colorPalette("note-color-all",_this2.lang.color.recent,true,true)}));this.context.memo("button.forecolor",(function(){return _this2.colorPalette("note-color-fore",_this2.lang.color.foreground,false,true)}));this.context.memo("button.backcolor",(function(){return _this2.colorPalette("note-color-back",_this2.lang.color.background,true,false)}));this.context.memo("button.ul",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.unorderedlist),tooltip:_this2.lang.lists.unordered+_this2.representShortcut("insertUnorderedList"),click:_this2.context.createInvokeHandler("editor.insertUnorderedList")}).render()}));this.context.memo("button.ol",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.orderedlist),tooltip:_this2.lang.lists.ordered+_this2.representShortcut("insertOrderedList"),click:_this2.context.createInvokeHandler("editor.insertOrderedList")}).render()}));var justifyLeft=this.button({contents:this.ui.icon(this.options.icons.alignLeft),tooltip:this.lang.paragraph.left+this.representShortcut("justifyLeft"),click:this.context.createInvokeHandler("editor.justifyLeft")});var justifyCenter=this.button({contents:this.ui.icon(this.options.icons.alignCenter),tooltip:this.lang.paragraph.center+this.representShortcut("justifyCenter"),click:this.context.createInvokeHandler("editor.justifyCenter")});var justifyRight=this.button({contents:this.ui.icon(this.options.icons.alignRight),tooltip:this.lang.paragraph.right+this.representShortcut("justifyRight"),click:this.context.createInvokeHandler("editor.justifyRight")});var justifyFull=this.button({contents:this.ui.icon(this.options.icons.alignJustify),tooltip:this.lang.paragraph.justify+this.representShortcut("justifyFull"),click:this.context.createInvokeHandler("editor.justifyFull")});var outdent=this.button({contents:this.ui.icon(this.options.icons.outdent),tooltip:this.lang.paragraph.outdent+this.representShortcut("outdent"),click:this.context.createInvokeHandler("editor.outdent")});var indent=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",func.invoke(justifyLeft,"render"));this.context.memo("button.justifyCenter",func.invoke(justifyCenter,"render"));this.context.memo("button.justifyRight",func.invoke(justifyRight,"render"));this.context.memo("button.justifyFull",func.invoke(justifyFull,"render"));this.context.memo("button.outdent",func.invoke(outdent,"render"));this.context.memo("button.indent",func.invoke(indent,"render"));this.context.memo("button.paragraph",(function(){return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents(_this2.ui.icon(_this2.options.icons.alignLeft),_this2.options),tooltip:_this2.lang.paragraph.paragraph,data:{toggle:"dropdown"}}),_this2.ui.dropdown([_this2.ui.buttonGroup({className:"note-align",children:[justifyLeft,justifyCenter,justifyRight,justifyFull]}),_this2.ui.buttonGroup({className:"note-list",children:[outdent,indent]})])]).render()}));this.context.memo("button.height",(function(){return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents(_this2.ui.icon(_this2.options.icons.textHeight),_this2.options),tooltip:_this2.lang.font.height,data:{toggle:"dropdown"}}),_this2.ui.dropdownCheck({items:_this2.options.lineHeights,checkClassName:_this2.options.icons.menuCheck,className:"dropdown-line-height",title:_this2.lang.font.height,click:_this2.context.createInvokeHandler("editor.lineHeight")})]).render()}));this.context.memo("button.table",(function(){return _this2.ui.buttonGroup([_this2.button({className:"dropdown-toggle",contents:_this2.ui.dropdownButtonContents(_this2.ui.icon(_this2.options.icons.table),_this2.options),tooltip:_this2.lang.table.table,data:{toggle:"dropdown"}}),_this2.ui.dropdown({title:_this2.lang.table.table,className:"note-table",items:['<div class="note-dimension-picker">','<div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"></div>','<div class="note-dimension-picker-highlighted"></div>','<div class="note-dimension-picker-unhighlighted"></div>',"</div>",'<div class="note-dimension-display">1 x 1</div>'].join("")})],{callback:function callback($node){var $catcher=$node.find(".note-dimension-picker-mousecatcher");$catcher.css({width:_this2.options.insertTableMaxSize.col+"em",height:_this2.options.insertTableMaxSize.row+"em"}).on("mousedown",_this2.context.createInvokeHandler("editor.insertTable")).on("mousemove",_this2.tableMoveHandler.bind(_this2))}}).render()}));this.context.memo("button.link",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.link),tooltip:_this2.lang.link.link+_this2.representShortcut("linkDialog.show"),click:_this2.context.createInvokeHandler("linkDialog.show")}).render()}));this.context.memo("button.picture",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.picture),tooltip:_this2.lang.image.image,click:_this2.context.createInvokeHandler("imageDialog.show")}).render()}));this.context.memo("button.video",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.video),tooltip:_this2.lang.video.video,click:_this2.context.createInvokeHandler("videoDialog.show")}).render()}));this.context.memo("button.hr",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.minus),tooltip:_this2.lang.hr.insert+_this2.representShortcut("insertHorizontalRule"),click:_this2.context.createInvokeHandler("editor.insertHorizontalRule")}).render()}));this.context.memo("button.fullscreen",(function(){return _this2.button({className:"btn-fullscreen note-codeview-keep",contents:_this2.ui.icon(_this2.options.icons.arrowsAlt),tooltip:_this2.lang.options.fullscreen,click:_this2.context.createInvokeHandler("fullscreen.toggle")}).render()}));this.context.memo("button.codeview",(function(){return _this2.button({className:"btn-codeview note-codeview-keep",contents:_this2.ui.icon(_this2.options.icons.code),tooltip:_this2.lang.options.codeview,click:_this2.context.createInvokeHandler("codeview.toggle")}).render()}));this.context.memo("button.redo",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.redo),tooltip:_this2.lang.history.redo+_this2.representShortcut("redo"),click:_this2.context.createInvokeHandler("editor.redo")}).render()}));this.context.memo("button.undo",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.undo),tooltip:_this2.lang.history.undo+_this2.representShortcut("undo"),click:_this2.context.createInvokeHandler("editor.undo")}).render()}));this.context.memo("button.help",(function(){return _this2.button({contents:_this2.ui.icon(_this2.options.icons.question),tooltip:_this2.lang.options.help,click:_this2.context.createInvokeHandler("helpDialog.show")}).render()}))}},{key:"addImagePopoverButtons",value:function addImagePopoverButtons(){var _this3=this;this.context.memo("button.resizeFull",(function(){return _this3.button({contents:'<span class="note-fontsize-10">100%</span>',tooltip:_this3.lang.image.resizeFull,click:_this3.context.createInvokeHandler("editor.resize","1")}).render()}));this.context.memo("button.resizeHalf",(function(){return _this3.button({contents:'<span class="note-fontsize-10">50%</span>',tooltip:_this3.lang.image.resizeHalf,click:_this3.context.createInvokeHandler("editor.resize","0.5")}).render()}));this.context.memo("button.resizeQuarter",(function(){return _this3.button({contents:'<span class="note-fontsize-10">25%</span>',tooltip:_this3.lang.image.resizeQuarter,click:_this3.context.createInvokeHandler("editor.resize","0.25")}).render()}));this.context.memo("button.resizeNone",(function(){return _this3.button({contents:_this3.ui.icon(_this3.options.icons.rollback),tooltip:_this3.lang.image.resizeNone,click:_this3.context.createInvokeHandler("editor.resize","0")}).render()}));this.context.memo("button.floatLeft",(function(){return _this3.button({contents:_this3.ui.icon(_this3.options.icons.floatLeft),tooltip:_this3.lang.image.floatLeft,click:_this3.context.createInvokeHandler("editor.floatMe","left")}).render()}));this.context.memo("button.floatRight",(function(){return _this3.button({contents:_this3.ui.icon(_this3.options.icons.floatRight),tooltip:_this3.lang.image.floatRight,click:_this3.context.createInvokeHandler("editor.floatMe","right")}).render()}));this.context.memo("button.floatNone",(function(){return _this3.button({contents:_this3.ui.icon(_this3.options.icons.rollback),tooltip:_this3.lang.image.floatNone,click:_this3.context.createInvokeHandler("editor.floatMe","none")}).render()}));this.context.memo("button.removeMedia",(function(){return _this3.button({contents:_this3.ui.icon(_this3.options.icons.trash),tooltip:_this3.lang.image.remove,click:_this3.context.createInvokeHandler("editor.removeMedia")}).render()}))}},{key:"addLinkPopoverButtons",value:function addLinkPopoverButtons(){var _this4=this;this.context.memo("button.linkDialogShow",(function(){return _this4.button({contents:_this4.ui.icon(_this4.options.icons.link),tooltip:_this4.lang.link.edit,click:_this4.context.createInvokeHandler("linkDialog.show")}).render()}));this.context.memo("button.unlink",(function(){return _this4.button({contents:_this4.ui.icon(_this4.options.icons.unlink),tooltip:_this4.lang.link.unlink,click:_this4.context.createInvokeHandler("editor.unlink")}).render()}))}},{key:"addTablePopoverButtons",value:function addTablePopoverButtons(){var _this5=this;this.context.memo("button.addRowUp",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.rowAbove),tooltip:_this5.lang.table.addRowAbove,click:_this5.context.createInvokeHandler("editor.addRow","top")}).render()}));this.context.memo("button.addRowDown",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.rowBelow),tooltip:_this5.lang.table.addRowBelow,click:_this5.context.createInvokeHandler("editor.addRow","bottom")}).render()}));this.context.memo("button.addColLeft",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.colBefore),tooltip:_this5.lang.table.addColLeft,click:_this5.context.createInvokeHandler("editor.addCol","left")}).render()}));this.context.memo("button.addColRight",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.colAfter),tooltip:_this5.lang.table.addColRight,click:_this5.context.createInvokeHandler("editor.addCol","right")}).render()}));this.context.memo("button.deleteRow",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.rowRemove),tooltip:_this5.lang.table.delRow,click:_this5.context.createInvokeHandler("editor.deleteRow")}).render()}));this.context.memo("button.deleteCol",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.colRemove),tooltip:_this5.lang.table.delCol,click:_this5.context.createInvokeHandler("editor.deleteCol")}).render()}));this.context.memo("button.deleteTable",(function(){return _this5.button({className:"btn-md",contents:_this5.ui.icon(_this5.options.icons.trash),tooltip:_this5.lang.table.delTable,click:_this5.context.createInvokeHandler("editor.deleteTable")}).render()}))}},{key:"build",value:function build($container,groups){for(var groupIdx=0,groupLen=groups.length;groupIdx<groupLen;groupIdx++){var group=groups[groupIdx];var groupName=Array.isArray(group)?group[0]:group;var buttons=Array.isArray(group)?group.length===1?[group[0]]:group[1]:[group];var $group=this.ui.buttonGroup({className:"note-"+groupName}).render();for(var idx=0,len=buttons.length;idx<len;idx++){var btn=this.context.memo("button."+buttons[idx]);if(btn){$group.append(typeof btn==="function"?btn(this.context):btn)}}$group.appendTo($container)}}},{key:"updateCurrentStyle",value:function updateCurrentStyle($container){var $cont=$container||this.$toolbar;var styleInfo=this.context.invoke("editor.currentStyle");this.updateBtnStates($cont,{".note-btn-bold":function noteBtnBold(){return styleInfo["font-bold"]==="bold"},".note-btn-italic":function noteBtnItalic(){return styleInfo["font-italic"]==="italic"},".note-btn-underline":function noteBtnUnderline(){return styleInfo["font-underline"]==="underline"},".note-btn-subscript":function noteBtnSubscript(){return styleInfo["font-subscript"]==="subscript"},".note-btn-superscript":function noteBtnSuperscript(){return styleInfo["font-superscript"]==="superscript"},".note-btn-strikethrough":function noteBtnStrikethrough(){return styleInfo["font-strikethrough"]==="strikethrough"}});if(styleInfo["font-family"]){var fontNames=styleInfo["font-family"].split(",").map((function(name){return name.replace(/[\'\"]/g,"").replace(/\s+$/,"").replace(/^\s+/,"")}));var fontName=lists.find(fontNames,this.isFontInstalled.bind(this));$cont.find(".dropdown-fontname a").each((function(idx,item){var $item=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(item);var isChecked=$item.data("value")+""===fontName+"";$item.toggleClass("checked",isChecked)}));$cont.find(".note-current-fontname").text(fontName).css("font-family",fontName)}if(styleInfo["font-size"]){var fontSize=styleInfo["font-size"];$cont.find(".dropdown-fontsize a").each((function(idx,item){var $item=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(item);var isChecked=$item.data("value")+""===fontSize+"";$item.toggleClass("checked",isChecked)}));$cont.find(".note-current-fontsize").text(fontSize);var fontSizeUnit=styleInfo["font-size-unit"];$cont.find(".dropdown-fontsizeunit a").each((function(idx,item){var $item=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(item);var isChecked=$item.data("value")+""===fontSizeUnit+"";$item.toggleClass("checked",isChecked)}));$cont.find(".note-current-fontsizeunit").text(fontSizeUnit)}if(styleInfo["line-height"]){var lineHeight=styleInfo["line-height"];$cont.find(".dropdown-line-height a").each((function(idx,item){var $item=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(item);var isChecked=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(item).data("value")+""===lineHeight+"";$item.toggleClass("checked",isChecked)}));$cont.find(".note-current-line-height").text(lineHeight)}}},{key:"updateBtnStates",value:function updateBtnStates($container,infos){var _this6=this;external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(infos,(function(selector,pred){_this6.ui.toggleBtnActive($container.find(selector),pred())}))}},{key:"tableMoveHandler",value:function tableMoveHandler(event){var PX_PER_EM=18;var $picker=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(event.target.parentNode);var $dimensionDisplay=$picker.next();var $catcher=$picker.find(".note-dimension-picker-mousecatcher");var $highlighted=$picker.find(".note-dimension-picker-highlighted");var $unhighlighted=$picker.find(".note-dimension-picker-unhighlighted");var posOffset;if(event.offsetX===undefined){var posCatcher=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(event.target).offset();posOffset={x:event.pageX-posCatcher.left,y:event.pageY-posCatcher.top}}else{posOffset={x:event.offsetX,y:event.offsetY}}var dim={c:Math.ceil(posOffset.x/PX_PER_EM)||1,r:Math.ceil(posOffset.y/PX_PER_EM)||1};$highlighted.css({width:dim.c+"em",height:dim.r+"em"});$catcher.data("value",dim.c+"x"+dim.r);if(dim.c>3&&dim.c<this.options.insertTableMaxSize.col){$unhighlighted.css({width:dim.c+1+"em"})}if(dim.r>3&&dim.r<this.options.insertTableMaxSize.row){$unhighlighted.css({height:dim.r+1+"em"})}$dimensionDisplay.html(dim.c+" x "+dim.r)}}])}();function Toolbar_typeof(o){"@babel/helpers - typeof";return Toolbar_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Toolbar_typeof(o)}function Toolbar_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function Toolbar_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Toolbar_toPropertyKey(o.key),o)}}function Toolbar_createClass(e,r,t){return r&&Toolbar_defineProperties(e.prototype,r),t&&Toolbar_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Toolbar_toPropertyKey(t){var i=Toolbar_toPrimitive(t,"string");return"symbol"==Toolbar_typeof(i)?i:i+""}function Toolbar_toPrimitive(t,r){if("object"!=Toolbar_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=Toolbar_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var Toolbar=function(){function Toolbar(context){Toolbar_classCallCheck(this,Toolbar);this.context=context;this.$window=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(window);this.$document=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(document);this.ui=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.ui;this.$note=context.layoutInfo.note;this.$editor=context.layoutInfo.editor;this.$toolbar=context.layoutInfo.toolbar;this.$editable=context.layoutInfo.editable;this.$statusbar=context.layoutInfo.statusbar;this.options=context.options;this.isFollowing=false;this.followScroll=this.followScroll.bind(this)}return Toolbar_createClass(Toolbar,[{key:"shouldInitialize",value:function shouldInitialize(){return!this.options.airMode}},{key:"initialize",value:function initialize(){var _this=this;this.options.toolbar=this.options.toolbar||[];if(!this.options.toolbar.length){this.$toolbar.hide()}else{this.context.invoke("buttons.build",this.$toolbar,this.options.toolbar)}if(this.options.toolbarContainer){this.$toolbar.appendTo(this.options.toolbarContainer)}this.changeContainer(false);this.$note.on("summernote.keyup summernote.mouseup summernote.change",(function(){_this.context.invoke("buttons.updateCurrentStyle")}));this.context.invoke("buttons.updateCurrentStyle");if(this.options.followingToolbar){this.$window.on("scroll resize",this.followScroll)}}},{key:"destroy",value:function destroy(){this.$toolbar.children().remove();if(this.options.followingToolbar){this.$window.off("scroll resize",this.followScroll)}}},{key:"followScroll",value:function followScroll(){if(this.$editor.hasClass("fullscreen")){return false}var editorHeight=this.$editor.outerHeight();var editorWidth=this.$editor.width();var toolbarHeight=this.$toolbar.height();var statusbarHeight=this.$statusbar.height();var otherBarHeight=0;if(this.options.otherStaticBar){otherBarHeight=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(this.options.otherStaticBar).outerHeight()}var currentOffset=this.$document.scrollTop();var editorOffsetTop=this.$editor.offset().top;var editorOffsetBottom=editorOffsetTop+editorHeight;var activateOffset=editorOffsetTop-otherBarHeight;var deactivateOffsetBottom=editorOffsetBottom-otherBarHeight-toolbarHeight-statusbarHeight;if(!this.isFollowing&&currentOffset>activateOffset&&currentOffset<deactivateOffsetBottom-toolbarHeight){this.isFollowing=true;this.$editable.css({marginTop:this.$toolbar.outerHeight()});this.$toolbar.css({position:"fixed",top:otherBarHeight,width:editorWidth,zIndex:1e3})}else if(this.isFollowing&&(currentOffset<activateOffset||currentOffset>deactivateOffsetBottom)){this.isFollowing=false;this.$toolbar.css({position:"relative",top:0,width:"100%",zIndex:"auto"});this.$editable.css({marginTop:""})}}},{key:"changeContainer",value:function changeContainer(isFullscreen){if(isFullscreen){this.$toolbar.prependTo(this.$editor)}else{if(this.options.toolbarContainer){this.$toolbar.appendTo(this.options.toolbarContainer)}}if(this.options.followingToolbar){this.followScroll()}}},{key:"updateFullscreen",value:function updateFullscreen(isFullscreen){this.ui.toggleBtnActive(this.$toolbar.find(".btn-fullscreen"),isFullscreen);this.changeContainer(isFullscreen)}},{key:"updateCodeview",value:function updateCodeview(isCodeview){this.ui.toggleBtnActive(this.$toolbar.find(".btn-codeview"),isCodeview);if(isCodeview){this.deactivate()}else{this.activate()}}},{key:"activate",value:function activate(isIncludeCodeview){var $btn=this.$toolbar.find("button");if(!isIncludeCodeview){$btn=$btn.not(".note-codeview-keep")}this.ui.toggleBtn($btn,true)}},{key:"deactivate",value:function deactivate(isIncludeCodeview){var $btn=this.$toolbar.find("button");if(!isIncludeCodeview){$btn=$btn.not(".note-codeview-keep")}this.ui.toggleBtn($btn,false)}}])}();function LinkDialog_typeof(o){"@babel/helpers - typeof";return LinkDialog_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},LinkDialog_typeof(o)}function LinkDialog_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function LinkDialog_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,LinkDialog_toPropertyKey(o.key),o)}}function LinkDialog_createClass(e,r,t){return r&&LinkDialog_defineProperties(e.prototype,r),t&&LinkDialog_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function LinkDialog_toPropertyKey(t){var i=LinkDialog_toPrimitive(t,"string");return"symbol"==LinkDialog_typeof(i)?i:i+""}function LinkDialog_toPrimitive(t,r){if("object"!=LinkDialog_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=LinkDialog_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var LinkDialog_MAILTO_PATTERN=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;var LinkDialog_TEL_PATTERN=/^(\+?\d{1,3}[\s-]?)?(\d{1,4})[\s-]?(\d{1,4})[\s-]?(\d{1,4})$/;var LinkDialog_URL_SCHEME_PATTERN=/^([A-Za-z][A-Za-z0-9+-.]*\:|#|\/)/;var LinkDialog=function(){function LinkDialog(context){LinkDialog_classCallCheck(this,LinkDialog);this.context=context;this.ui=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.ui;this.$body=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(document.body);this.$editor=context.layoutInfo.editor;this.options=context.options;this.lang=this.options.langInfo;context.memo("help.linkDialog.show",this.options.langInfo.help["linkDialog.show"])}return LinkDialog_createClass(LinkDialog,[{key:"initialize",value:function initialize(){var $container=this.options.dialogsInBody?this.$body:this.options.container;var body=['<div class="form-group note-form-group">','<label for="note-dialog-link-txt-'.concat(this.options.id,'" class="note-form-label">').concat(this.lang.link.textToDisplay,"</label>"),'<input id="note-dialog-link-txt-'.concat(this.options.id,'" class="note-link-text form-control note-form-control note-input" type="text"/>'),"</div>",'<div class="form-group note-form-group">','<label for="note-dialog-link-url-'.concat(this.options.id,'" class="note-form-label">').concat(this.lang.link.url,"</label>"),'<input id="note-dialog-link-url-'.concat(this.options.id,'" class="note-link-url form-control note-form-control note-input" type="text" value="http://"/>'),"</div>",!this.options.disableLinkTarget?external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<div></div>").append(this.ui.checkbox({className:"sn-checkbox-open-in-new-window",text:this.lang.link.openInNewWindow,checked:true}).render()).html():""].join("");var buttonClass="btn btn-primary note-btn note-btn-primary note-link-btn";var footer='<input type="button" href="#" class="'.concat(buttonClass,'" value="').concat(this.lang.link.insert,'" disabled>');this.$dialog=this.ui.dialog({className:"link-dialog",title:this.lang.link.insert,fade:this.options.dialogsFade,body:body,footer:footer}).render().appendTo($container)}},{key:"destroy",value:function destroy(){this.ui.hideDialog(this.$dialog);this.$dialog.remove()}},{key:"bindEnterKey",value:function bindEnterKey($input,$btn){$input.on("keypress",(function(event){if(event.keyCode===key.code.ENTER){event.preventDefault();$btn.trigger("click")}}))}},{key:"checkLinkUrl",value:function checkLinkUrl(linkUrl){if(LinkDialog_MAILTO_PATTERN.test(linkUrl)){return"mailto://"+linkUrl}else if(LinkDialog_TEL_PATTERN.test(linkUrl)){return"tel://"+linkUrl}else if(!LinkDialog_URL_SCHEME_PATTERN.test(linkUrl)){return"http://"+linkUrl}return linkUrl}},{key:"onCheckLinkUrl",value:function onCheckLinkUrl($input){var _this=this;$input.on("blur",(function(event){event.target.value=event.target.value==""?"":_this.checkLinkUrl(event.target.value)}))}},{key:"toggleLinkBtn",value:function toggleLinkBtn($linkBtn,$linkText,$linkUrl){this.ui.toggleBtn($linkBtn,$linkText.val()&&$linkUrl.val())}},{key:"showLinkDialog",value:function showLinkDialog(linkInfo){var _this2=this;return external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().Deferred((function(deferred){var $linkText=_this2.$dialog.find(".note-link-text");var $linkUrl=_this2.$dialog.find(".note-link-url");var $linkBtn=_this2.$dialog.find(".note-link-btn");var $openInNewWindow=_this2.$dialog.find(".sn-checkbox-open-in-new-window input[type=checkbox]");_this2.ui.onDialogShown(_this2.$dialog,(function(){_this2.context.triggerEvent("dialog.shown");if(!linkInfo.url&&func.isValidUrl(linkInfo.text)){linkInfo.url=_this2.checkLinkUrl(linkInfo.text)}$linkText.on("input paste propertychange",(function(){var text=$linkText.val();var div=document.createElement("div");div.innerText=text;text=div.innerHTML;linkInfo.text=text;_this2.toggleLinkBtn($linkBtn,$linkText,$linkUrl)})).val(linkInfo.text);$linkUrl.on("input paste propertychange",(function(){if(!linkInfo.text){$linkText.val($linkUrl.val())}_this2.toggleLinkBtn($linkBtn,$linkText,$linkUrl)})).val(linkInfo.url);if(!env.isSupportTouch){$linkUrl.trigger("focus")}_this2.toggleLinkBtn($linkBtn,$linkText,$linkUrl);_this2.bindEnterKey($linkUrl,$linkBtn);_this2.bindEnterKey($linkText,$linkBtn);_this2.onCheckLinkUrl($linkUrl);var isNewWindowChecked=linkInfo.isNewWindow!==undefined?linkInfo.isNewWindow:_this2.context.options.linkTargetBlank;$openInNewWindow.prop("checked",isNewWindowChecked);$linkBtn.one("click",(function(event){event.preventDefault();deferred.resolve({range:linkInfo.range,url:$linkUrl.val(),text:$linkText.val(),isNewWindow:$openInNewWindow.is(":checked")});_this2.ui.hideDialog(_this2.$dialog)}))}));_this2.ui.onDialogHidden(_this2.$dialog,(function(){$linkText.off();$linkUrl.off();$linkBtn.off();if(deferred.state()==="pending"){deferred.reject()}}));_this2.ui.showDialog(_this2.$dialog)})).promise()}},{key:"show",value:function show(){var _this3=this;var linkInfo=this.context.invoke("editor.getLinkInfo");this.context.invoke("editor.saveRange");this.showLinkDialog(linkInfo).then((function(linkInfo){_this3.context.invoke("editor.restoreRange");_this3.context.invoke("editor.createLink",linkInfo)})).fail((function(){_this3.context.invoke("editor.restoreRange")}))}}])}();function LinkPopover_typeof(o){"@babel/helpers - typeof";return LinkPopover_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},LinkPopover_typeof(o)}function LinkPopover_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function LinkPopover_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,LinkPopover_toPropertyKey(o.key),o)}}function LinkPopover_createClass(e,r,t){return r&&LinkPopover_defineProperties(e.prototype,r),t&&LinkPopover_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function LinkPopover_toPropertyKey(t){var i=LinkPopover_toPrimitive(t,"string");return"symbol"==LinkPopover_typeof(i)?i:i+""}function LinkPopover_toPrimitive(t,r){if("object"!=LinkPopover_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=LinkPopover_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var LinkPopover=function(){function LinkPopover(context){var _this=this;LinkPopover_classCallCheck(this,LinkPopover);this.context=context;this.ui=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.ui;this.options=context.options;this.events={"summernote.keyup summernote.mouseup summernote.change summernote.scroll":function summernoteKeyupSummernoteMouseupSummernoteChangeSummernoteScroll(){_this.update()},"summernote.disable summernote.dialog.shown":function summernoteDisableSummernoteDialogShown(){_this.hide()},"summernote.blur":function summernoteBlur(we,event){if(event.originalEvent&&event.originalEvent.relatedTarget){if(!_this.$popover[0].contains(event.originalEvent.relatedTarget)){_this.hide()}}else{_this.hide()}}}}return LinkPopover_createClass(LinkPopover,[{key:"shouldInitialize",value:function shouldInitialize(){return!lists.isEmpty(this.options.popover.link)}},{key:"initialize",value:function initialize(){this.$popover=this.ui.popover({className:"note-link-popover",callback:function callback($node){var $content=$node.find(".popover-content,.note-popover-content");$content.prepend('<span><a target="_blank"></a>&nbsp;</span>')}}).render().appendTo(this.options.container);var $content=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",$content,this.options.popover.link);this.$popover.on("mousedown",(function(event){event.preventDefault()}))}},{key:"destroy",value:function destroy(){this.$popover.remove()}},{key:"update",value:function update(){if(!this.context.invoke("editor.hasFocus")){this.hide();return}var rng=this.context.invoke("editor.getLastRange");if(rng.isCollapsed()&&rng.isOnAnchor()){var anchor=dom.ancestor(rng.sc,dom.isAnchor);var href=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(anchor).attr("href");this.$popover.find("a").attr("href",href).text(href);var pos=dom.posFromPlaceholder(anchor);var containerOffset=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(this.options.container).offset();pos.top-=containerOffset.top;pos.left-=containerOffset.left;this.$popover.css({display:"block",left:pos.left,top:pos.top})}else{this.hide()}}},{key:"hide",value:function hide(){this.$popover.hide()}}])}();function ImageDialog_typeof(o){"@babel/helpers - typeof";return ImageDialog_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ImageDialog_typeof(o)}function ImageDialog_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function ImageDialog_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ImageDialog_toPropertyKey(o.key),o)}}function ImageDialog_createClass(e,r,t){return r&&ImageDialog_defineProperties(e.prototype,r),t&&ImageDialog_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ImageDialog_toPropertyKey(t){var i=ImageDialog_toPrimitive(t,"string");return"symbol"==ImageDialog_typeof(i)?i:i+""}function ImageDialog_toPrimitive(t,r){if("object"!=ImageDialog_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=ImageDialog_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var ImageDialog=function(){function ImageDialog(context){ImageDialog_classCallCheck(this,ImageDialog);this.context=context;this.ui=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.ui;this.$body=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(document.body);this.$editor=context.layoutInfo.editor;this.options=context.options;this.lang=this.options.langInfo}return ImageDialog_createClass(ImageDialog,[{key:"initialize",value:function initialize(){var imageLimitation="";if(this.options.maximumImageFileSize){var unit=Math.floor(Math.log(this.options.maximumImageFileSize)/Math.log(1024));var readableSize=(this.options.maximumImageFileSize/Math.pow(1024,unit)).toFixed(2)*1+" "+" KMGTP"[unit]+"B";imageLimitation="<small>".concat(this.lang.image.maximumFileSize+" : "+readableSize,"</small>")}var $container=this.options.dialogsInBody?this.$body:this.options.container;var body=['<div class="form-group note-form-group note-group-select-from-files">','<label for="note-dialog-image-file-'+this.options.id+'" class="note-form-label">'+this.lang.image.selectFromFiles+"</label>",'<input id="note-dialog-image-file-'+this.options.id+'" class="note-image-input form-control-file note-form-control note-input" ',' type="file" name="files" accept="'+this.options.acceptImageFileTypes+'" multiple="multiple"/>',imageLimitation,"</div>",'<div class="form-group note-group-image-url">','<label for="note-dialog-image-url-'+this.options.id+'" class="note-form-label">'+this.lang.image.url+"</label>",'<input id="note-dialog-image-url-'+this.options.id+'" class="note-image-url form-control note-form-control note-input" type="text"/>',"</div>"].join("");var buttonClass="btn btn-primary note-btn note-btn-primary note-image-btn";var footer='<input type="button" href="#" class="'.concat(buttonClass,'" value="').concat(this.lang.image.insert,'" disabled>');this.$dialog=this.ui.dialog({title:this.lang.image.insert,fade:this.options.dialogsFade,body:body,footer:footer}).render().appendTo($container)}},{key:"destroy",value:function destroy(){this.ui.hideDialog(this.$dialog);this.$dialog.remove()}},{key:"bindEnterKey",value:function bindEnterKey($input,$btn){$input.on("keypress",(function(event){if(event.keyCode===key.code.ENTER){event.preventDefault();$btn.trigger("click")}}))}},{key:"show",value:function show(){var _this=this;this.context.invoke("editor.saveRange");this.showImageDialog().then((function(data){_this.ui.hideDialog(_this.$dialog);_this.context.invoke("editor.restoreRange");if(typeof data==="string"){if(_this.options.callbacks.onImageLinkInsert){_this.context.triggerEvent("image.link.insert",data)}else{_this.context.invoke("editor.insertImage",data)}}else{_this.context.invoke("editor.insertImagesOrCallback",data)}})).fail((function(){_this.context.invoke("editor.restoreRange")}))}},{key:"showImageDialog",value:function showImageDialog(){var _this2=this;return external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().Deferred((function(deferred){var $imageInput=_this2.$dialog.find(".note-image-input");var $imageUrl=_this2.$dialog.find(".note-image-url");var $imageBtn=_this2.$dialog.find(".note-image-btn");_this2.ui.onDialogShown(_this2.$dialog,(function(){_this2.context.triggerEvent("dialog.shown");$imageInput.replaceWith($imageInput.clone().on("change",(function(event){deferred.resolve(event.target.files||event.target.value)})).val(""));$imageUrl.on("input paste propertychange",(function(){_this2.ui.toggleBtn($imageBtn,$imageUrl.val())})).val("");if(!env.isSupportTouch){$imageUrl.trigger("focus")}$imageBtn.on("click",(function(event){event.preventDefault();deferred.resolve($imageUrl.val())}));_this2.bindEnterKey($imageUrl,$imageBtn)}));_this2.ui.onDialogHidden(_this2.$dialog,(function(){$imageInput.off();$imageUrl.off();$imageBtn.off();if(deferred.state()==="pending"){deferred.reject()}}));_this2.ui.showDialog(_this2.$dialog)}))}}])}();function ImagePopover_typeof(o){"@babel/helpers - typeof";return ImagePopover_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ImagePopover_typeof(o)}function ImagePopover_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function ImagePopover_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ImagePopover_toPropertyKey(o.key),o)}}function ImagePopover_createClass(e,r,t){return r&&ImagePopover_defineProperties(e.prototype,r),t&&ImagePopover_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ImagePopover_toPropertyKey(t){var i=ImagePopover_toPrimitive(t,"string");return"symbol"==ImagePopover_typeof(i)?i:i+""}function ImagePopover_toPrimitive(t,r){if("object"!=ImagePopover_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=ImagePopover_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var ImagePopover=function(){function ImagePopover(context){var _this=this;ImagePopover_classCallCheck(this,ImagePopover);this.context=context;this.ui=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.ui;this.editable=context.layoutInfo.editable[0];this.options=context.options;this.events={"summernote.disable summernote.dialog.shown":function summernoteDisableSummernoteDialogShown(){_this.hide()},"summernote.blur":function summernoteBlur(we,event){if(event.originalEvent&&event.originalEvent.relatedTarget){if(!_this.$popover[0].contains(event.originalEvent.relatedTarget)){_this.hide()}}else{_this.hide()}}}}return ImagePopover_createClass(ImagePopover,[{key:"shouldInitialize",value:function shouldInitialize(){return!lists.isEmpty(this.options.popover.image)}},{key:"initialize",value:function initialize(){this.$popover=this.ui.popover({className:"note-image-popover"}).render().appendTo(this.options.container);var $content=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",$content,this.options.popover.image);this.$popover.on("mousedown",(function(event){event.preventDefault()}))}},{key:"destroy",value:function destroy(){this.$popover.remove()}},{key:"update",value:function update(target,event){if(dom.isImg(target)){var position=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(target).offset();var containerOffset=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(this.options.container).offset();var pos={};if(this.options.popatmouse){pos.left=event.pageX-20;pos.top=event.pageY}else{pos=position}pos.top-=containerOffset.top;pos.left-=containerOffset.left;this.$popover.css({display:"block",left:pos.left,top:pos.top})}else{this.hide()}}},{key:"hide",value:function hide(){this.$popover.hide()}}])}();function TablePopover_typeof(o){"@babel/helpers - typeof";return TablePopover_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},TablePopover_typeof(o)}function TablePopover_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function TablePopover_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,TablePopover_toPropertyKey(o.key),o)}}function TablePopover_createClass(e,r,t){return r&&TablePopover_defineProperties(e.prototype,r),t&&TablePopover_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function TablePopover_toPropertyKey(t){var i=TablePopover_toPrimitive(t,"string");return"symbol"==TablePopover_typeof(i)?i:i+""}function TablePopover_toPrimitive(t,r){if("object"!=TablePopover_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=TablePopover_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var TablePopover=function(){function TablePopover(context){var _this=this;TablePopover_classCallCheck(this,TablePopover);this.context=context;this.ui=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.ui;this.options=context.options;this.events={"summernote.mousedown":function summernoteMousedown(we,event){_this.update(event.target)},"summernote.keyup summernote.scroll summernote.change":function summernoteKeyupSummernoteScrollSummernoteChange(){_this.update()},"summernote.disable summernote.dialog.shown":function summernoteDisableSummernoteDialogShown(){_this.hide()},"summernote.blur":function summernoteBlur(we,event){if(event.originalEvent&&event.originalEvent.relatedTarget){if(!_this.$popover[0].contains(event.originalEvent.relatedTarget)){_this.hide()}}else{_this.hide()}}}}return TablePopover_createClass(TablePopover,[{key:"shouldInitialize",value:function shouldInitialize(){return!lists.isEmpty(this.options.popover.table)}},{key:"initialize",value:function initialize(){this.$popover=this.ui.popover({className:"note-table-popover"}).render().appendTo(this.options.container);var $content=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",$content,this.options.popover.table);if(env.isFF){document.execCommand("enableInlineTableEditing",false,false)}this.$popover.on("mousedown",(function(event){event.preventDefault()}))}},{key:"destroy",value:function destroy(){this.$popover.remove()}},{key:"update",value:function update(target){if(this.context.isDisabled()){return false}var isCell=dom.isCell(target)||dom.isCell(target===null||target===void 0?void 0:target.parentElement);if(isCell){var pos=dom.posFromPlaceholder(target);var containerOffset=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(this.options.container).offset();pos.top-=containerOffset.top;pos.left-=containerOffset.left;this.$popover.css({display:"block",left:pos.left,top:pos.top})}else{this.hide()}return isCell}},{key:"hide",value:function hide(){this.$popover.hide()}}])}();function VideoDialog_typeof(o){"@babel/helpers - typeof";return VideoDialog_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},VideoDialog_typeof(o)}function VideoDialog_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function VideoDialog_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,VideoDialog_toPropertyKey(o.key),o)}}function VideoDialog_createClass(e,r,t){return r&&VideoDialog_defineProperties(e.prototype,r),t&&VideoDialog_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function VideoDialog_toPropertyKey(t){var i=VideoDialog_toPrimitive(t,"string");return"symbol"==VideoDialog_typeof(i)?i:i+""}function VideoDialog_toPrimitive(t,r){if("object"!=VideoDialog_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=VideoDialog_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var VideoDialog=function(){function VideoDialog(context){VideoDialog_classCallCheck(this,VideoDialog);this.context=context;this.ui=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.ui;this.$body=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(document.body);this.$editor=context.layoutInfo.editor;this.options=context.options;this.lang=this.options.langInfo}return VideoDialog_createClass(VideoDialog,[{key:"initialize",value:function initialize(){var $container=this.options.dialogsInBody?this.$body:this.options.container;var body=['<div class="form-group note-form-group row-fluid">','<label for="note-dialog-video-url-'.concat(this.options.id,'" class="note-form-label">').concat(this.lang.video.url,' <small class="text-muted">').concat(this.lang.video.providers,"</small></label>"),'<input id="note-dialog-video-url-'.concat(this.options.id,'" class="note-video-url form-control note-form-control note-input" type="text"/>'),"</div>"].join("");var buttonClass="btn btn-primary note-btn note-btn-primary note-video-btn";var footer='<input type="button" href="#" class="'.concat(buttonClass,'" value="').concat(this.lang.video.insert,'" disabled>');this.$dialog=this.ui.dialog({title:this.lang.video.insert,fade:this.options.dialogsFade,body:body,footer:footer}).render().appendTo($container)}},{key:"destroy",value:function destroy(){this.ui.hideDialog(this.$dialog);this.$dialog.remove()}},{key:"bindEnterKey",value:function bindEnterKey($input,$btn){$input.on("keypress",(function(event){if(event.keyCode===key.code.ENTER){event.preventDefault();$btn.trigger("click")}}))}},{key:"createVideoNode",value:function createVideoNode(url){var ytRegExp=/(?:youtu\.be\/|youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=|shorts\/|live\/))([^&\n?]+)(?:.*[?&]t=([^&\n]+))?.*/;var ytRegExpForStart=/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/;var ytMatch=url.match(ytRegExp);var gdRegExp=/(?:\.|\/\/)drive\.google\.com\/file\/d\/(.[a-zA-Z0-9_-]*)\/view/;var gdMatch=url.match(gdRegExp);var igRegExp=/(?:www\.|\/\/)instagram\.com\/(reel|p)\/(.[a-zA-Z0-9_-]*)/;var igMatch=url.match(igRegExp);var vRegExp=/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/;var vMatch=url.match(vRegExp);var vimRegExp=/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/;var vimMatch=url.match(vimRegExp);var dmRegExp=/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/;var dmMatch=url.match(dmRegExp);var youkuRegExp=/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/;var youkuMatch=url.match(youkuRegExp);var peerTubeRegExp=/\/\/(.*)\/videos\/watch\/([^?]*)(?:\?(?:start=(\w*))?(?:&stop=(\w*))?(?:&loop=([10]))?(?:&autoplay=([10]))?(?:&muted=([10]))?)?/;var peerTubeMatch=url.match(peerTubeRegExp);var qqRegExp=/\/\/v\.qq\.com.*?vid=(.+)/;var qqMatch=url.match(qqRegExp);var qqRegExp2=/\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/;var qqMatch2=url.match(qqRegExp2);var mp4RegExp=/^.+.(mp4|m4v)$/;var mp4Match=url.match(mp4RegExp);var oggRegExp=/^.+.(ogg|ogv)$/;var oggMatch=url.match(oggRegExp);var webmRegExp=/^.+.(webm)$/;var webmMatch=url.match(webmRegExp);var fbRegExp=/(?:www\.|\/\/)facebook\.com\/([^\/]+)\/videos\/([0-9]+)/;var fbMatch=url.match(fbRegExp);var $video;if(ytMatch&&ytMatch[1].length===11){var youtubeId=ytMatch[1];var start=0;if(typeof ytMatch[2]!=="undefined"){var ytMatchForStart=ytMatch[2].match(ytRegExpForStart);if(ytMatchForStart){for(var n=[3600,60,1],i=0,r=n.length;i<r;i++){start+=typeof ytMatchForStart[i+1]!=="undefined"?n[i]*parseInt(ytMatchForStart[i+1],10):0}}else{start=parseInt(ytMatch[2],10)}}$video=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<iframe>").attr("frameborder",0).attr("src","//www.youtube.com/embed/"+youtubeId+(start>0?"?start="+start:"")).attr("width","640").attr("height","360")}else if(gdMatch&&gdMatch[0].length){$video=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<iframe>").attr("frameborder",0).attr("src","https://drive.google.com/file/d/"+gdMatch[1]+"/preview").attr("width","640").attr("height","480")}else if(igMatch&&igMatch[0].length){$video=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<iframe>").attr("frameborder",0).attr("src","https://instagram.com/p/"+igMatch[2]+"/embed/").attr("width","612").attr("height","710").attr("scrolling","no").attr("allowtransparency","true")}else if(vMatch&&vMatch[0].length){$video=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<iframe>").attr("frameborder",0).attr("src",vMatch[0]+"/embed/simple").attr("width","600").attr("height","600").attr("class","vine-embed")}else if(vimMatch&&vimMatch[3].length){$video=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("src","//player.vimeo.com/video/"+vimMatch[3]).attr("width","640").attr("height","360")}else if(dmMatch&&dmMatch[2].length){$video=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<iframe>").attr("frameborder",0).attr("src","//www.dailymotion.com/embed/video/"+dmMatch[2]).attr("width","640").attr("height","360")}else if(youkuMatch&&youkuMatch[1].length){$video=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","498").attr("width","510").attr("src","//player.youku.com/embed/"+youkuMatch[1])}else if(peerTubeMatch&&peerTubeMatch[0].length){var begin=0;if(peerTubeMatch[2]!=="undefined")begin=peerTubeMatch[2];var end=0;if(peerTubeMatch[3]!=="undefined")end=peerTubeMatch[3];var loop=0;if(peerTubeMatch[4]!=="undefined")loop=peerTubeMatch[4];var autoplay=0;if(peerTubeMatch[5]!=="undefined")autoplay=peerTubeMatch[5];var muted=0;if(peerTubeMatch[6]!=="undefined")muted=peerTubeMatch[6];$video=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()('<iframe allowfullscreen sandbox="allow-same-origin allow-scripts allow-popups">').attr("frameborder",0).attr("src","//"+peerTubeMatch[1]+"/videos/embed/"+peerTubeMatch[2]+"?loop="+loop+"&autoplay="+autoplay+"&muted="+muted+(begin>0?"&start="+begin:"")+(end>0?"&end="+start:"")).attr("width","560").attr("height","315")}else if(qqMatch&&qqMatch[1].length||qqMatch2&&qqMatch2[2].length){var vid=qqMatch&&qqMatch[1].length?qqMatch[1]:qqMatch2[2];$video=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","310").attr("width","500").attr("src","https://v.qq.com/txp/iframe/player.html?vid="+vid+"&amp;auto=0")}else if(mp4Match||oggMatch||webmMatch){$video=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<video controls>").attr("src",url).attr("width","640").attr("height","360")}else if(fbMatch&&fbMatch[0].length){$video=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<iframe>").attr("frameborder",0).attr("src","https://www.facebook.com/plugins/video.php?href="+encodeURIComponent(fbMatch[0])+"&show_text=0&width=560").attr("width","560").attr("height","301").attr("scrolling","no").attr("allowtransparency","true")}else{return false}$video.addClass("note-video-clip");return $video[0]}},{key:"show",value:function show(){var _this=this;var text=this.context.invoke("editor.getSelectedText");this.context.invoke("editor.saveRange");this.showVideoDialog(text).then((function(url){_this.ui.hideDialog(_this.$dialog);_this.context.invoke("editor.restoreRange");var $node=_this.createVideoNode(url);if($node){_this.context.invoke("editor.insertNode",$node)}})).fail((function(){_this.context.invoke("editor.restoreRange")}))}},{key:"showVideoDialog",value:function showVideoDialog(){var _this2=this;return external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().Deferred((function(deferred){var $videoUrl=_this2.$dialog.find(".note-video-url");var $videoBtn=_this2.$dialog.find(".note-video-btn");_this2.ui.onDialogShown(_this2.$dialog,(function(){_this2.context.triggerEvent("dialog.shown");$videoUrl.on("input paste propertychange",(function(){_this2.ui.toggleBtn($videoBtn,$videoUrl.val())}));if(!env.isSupportTouch){$videoUrl.trigger("focus")}$videoBtn.on("click",(function(event){event.preventDefault();deferred.resolve($videoUrl.val())}));_this2.bindEnterKey($videoUrl,$videoBtn)}));_this2.ui.onDialogHidden(_this2.$dialog,(function(){$videoUrl.off();$videoBtn.off();if(deferred.state()==="pending"){deferred.reject()}}));_this2.ui.showDialog(_this2.$dialog)}))}}])}();function HelpDialog_typeof(o){"@babel/helpers - typeof";return HelpDialog_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},HelpDialog_typeof(o)}function HelpDialog_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function HelpDialog_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,HelpDialog_toPropertyKey(o.key),o)}}function HelpDialog_createClass(e,r,t){return r&&HelpDialog_defineProperties(e.prototype,r),t&&HelpDialog_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function HelpDialog_toPropertyKey(t){var i=HelpDialog_toPrimitive(t,"string");return"symbol"==HelpDialog_typeof(i)?i:i+""}function HelpDialog_toPrimitive(t,r){if("object"!=HelpDialog_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=HelpDialog_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var HelpDialog=function(){function HelpDialog(context){HelpDialog_classCallCheck(this,HelpDialog);this.context=context;this.ui=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.ui;this.$body=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(document.body);this.$editor=context.layoutInfo.editor;this.options=context.options;this.lang=this.options.langInfo}return HelpDialog_createClass(HelpDialog,[{key:"initialize",value:function initialize(){var $container=this.options.dialogsInBody?this.$body:this.options.container;var body=['<p class="text-center">','<a href="http://summernote.org/" target="_blank" rel="noopener noreferrer">Summernote 0.9.1</a> \xb7 ','<a href="https://github.com/summernote/summernote" target="_blank" rel="noopener noreferrer">Project</a> \xb7 ','<a href="https://github.com/summernote/summernote/issues" target="_blank" rel="noopener noreferrer">Issues</a>',"</p>"].join("");this.$dialog=this.ui.dialog({title:this.lang.options.help,fade:this.options.dialogsFade,body:this.createShortcutList(),footer:body,callback:function callback($node){$node.find(".modal-body,.note-modal-body").css({"max-height":300,overflow:"scroll"})}}).render().appendTo($container)}},{key:"destroy",value:function destroy(){this.ui.hideDialog(this.$dialog);this.$dialog.remove()}},{key:"createShortcutList",value:function createShortcutList(){var _this=this;var keyMap=this.options.keyMap[env.isMac?"mac":"pc"];return Object.keys(keyMap).map((function(key){var command=keyMap[key];var $row=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()('<div><div class="help-list-item"></div></div>');$row.append(external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<label><kbd>"+key+"</kdb></label>").css({width:180,"margin-right":10})).append(external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()("<span></span>").html(_this.context.memo("help."+command)||command));return $row.html()})).join("")}},{key:"showHelpDialog",value:function showHelpDialog(){var _this2=this;return external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().Deferred((function(deferred){_this2.ui.onDialogShown(_this2.$dialog,(function(){_this2.context.triggerEvent("dialog.shown");deferred.resolve()}));_this2.ui.showDialog(_this2.$dialog)})).promise()}},{key:"show",value:function show(){var _this3=this;this.context.invoke("editor.saveRange");this.showHelpDialog().then((function(){_this3.context.invoke("editor.restoreRange")}))}}])}();function AirPopover_typeof(o){"@babel/helpers - typeof";return AirPopover_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},AirPopover_typeof(o)}function AirPopover_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function AirPopover_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,AirPopover_toPropertyKey(o.key),o)}}function AirPopover_createClass(e,r,t){return r&&AirPopover_defineProperties(e.prototype,r),t&&AirPopover_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function AirPopover_toPropertyKey(t){var i=AirPopover_toPrimitive(t,"string");return"symbol"==AirPopover_typeof(i)?i:i+""}function AirPopover_toPrimitive(t,r){if("object"!=AirPopover_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=AirPopover_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var AIRMODE_POPOVER_X_OFFSET=-5;var AIRMODE_POPOVER_Y_OFFSET=5;var AirPopover=function(){function AirPopover(context){var _this=this;AirPopover_classCallCheck(this,AirPopover);this.context=context;this.ui=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.ui;this.options=context.options;this.hidable=true;this.onContextmenu=false;this.pageX=null;this.pageY=null;this.events={"summernote.contextmenu":function summernoteContextmenu(event){if(_this.options.editing){event.preventDefault();event.stopPropagation();_this.onContextmenu=true;_this.update(true)}},"summernote.mousedown":function summernoteMousedown(we,event){_this.pageX=event.pageX;_this.pageY=event.pageY},"summernote.keyup summernote.mouseup summernote.scroll":function summernoteKeyupSummernoteMouseupSummernoteScroll(we,event){if(_this.options.editing&&!_this.onContextmenu){if(event.type=="keyup"){var range=_this.context.invoke("editor.getLastRange");var wordRange=range.getWordRange();var bnd=func.rect2bnd(lists.last(wordRange.getClientRects()));_this.pageX=bnd.left;_this.pageY=bnd.top}else{_this.pageX=event.pageX;_this.pageY=event.pageY}_this.update()}_this.onContextmenu=false},"summernote.disable summernote.change summernote.dialog.shown summernote.blur":function summernoteDisableSummernoteChangeSummernoteDialogShownSummernoteBlur(){_this.hide()},"summernote.focusout":function summernoteFocusout(){if(!_this.$popover.is(":active,:focus")){_this.hide()}}}}return AirPopover_createClass(AirPopover,[{key:"shouldInitialize",value:function shouldInitialize(){return this.options.airMode&&!lists.isEmpty(this.options.popover.air)}},{key:"initialize",value:function initialize(){var _this2=this;this.$popover=this.ui.popover({className:"note-air-popover"}).render().appendTo(this.options.container);var $content=this.$popover.find(".popover-content");this.context.invoke("buttons.build",$content,this.options.popover.air);this.$popover.on("mousedown",(function(){_this2.hidable=false}));this.$popover.on("mouseup",(function(){_this2.hidable=true}))}},{key:"destroy",value:function destroy(){this.$popover.remove()}},{key:"update",value:function update(forcelyOpen){var styleInfo=this.context.invoke("editor.currentStyle");if(styleInfo.range&&(!styleInfo.range.isCollapsed()||forcelyOpen)){var rect={left:this.pageX,top:this.pageY};var containerOffset=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(this.options.container).offset();rect.top-=containerOffset.top;rect.left-=containerOffset.left;this.$popover.css({display:"block",left:Math.max(rect.left,0)+AIRMODE_POPOVER_X_OFFSET,top:rect.top+AIRMODE_POPOVER_Y_OFFSET});this.context.invoke("buttons.updateCurrentStyle",this.$popover)}else{this.hide()}}},{key:"updateCodeview",value:function updateCodeview(isCodeview){this.ui.toggleBtnActive(this.$popover.find(".btn-codeview"),isCodeview);if(isCodeview){this.hide()}}},{key:"hide",value:function hide(){if(this.hidable){this.$popover.hide()}}}])}();function HintPopover_typeof(o){"@babel/helpers - typeof";return HintPopover_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},HintPopover_typeof(o)}function HintPopover_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function HintPopover_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,HintPopover_toPropertyKey(o.key),o)}}function HintPopover_createClass(e,r,t){return r&&HintPopover_defineProperties(e.prototype,r),t&&HintPopover_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function HintPopover_toPropertyKey(t){var i=HintPopover_toPrimitive(t,"string");return"symbol"==HintPopover_typeof(i)?i:i+""}function HintPopover_toPrimitive(t,r){if("object"!=HintPopover_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=HintPopover_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var POPOVER_DIST=5;var HintPopover=function(){function HintPopover(context){var _this=this;HintPopover_classCallCheck(this,HintPopover);this.context=context;this.ui=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.ui;this.$editable=context.layoutInfo.editable;this.options=context.options;this.hint=this.options.hint||[];this.direction=this.options.hintDirection||"bottom";this.hints=Array.isArray(this.hint)?this.hint:[this.hint];this.events={"summernote.keyup":function summernoteKeyup(we,event){if(!event.isDefaultPrevented()){_this.handleKeyup(event)}},"summernote.keydown":function summernoteKeydown(we,event){_this.handleKeydown(event)},"summernote.disable summernote.dialog.shown summernote.blur":function summernoteDisableSummernoteDialogShownSummernoteBlur(){_this.hide()}}}return HintPopover_createClass(HintPopover,[{key:"shouldInitialize",value:function shouldInitialize(){return this.hints.length>0}},{key:"initialize",value:function initialize(){var _this2=this;this.lastWordRange=null;this.matchingWord=null;this.$popover=this.ui.popover({className:"note-hint-popover",hideArrow:true,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(event){_this2.$content.find(".active").removeClass("active");external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(event.currentTarget).addClass("active");_this2.replace()}));this.$popover.on("mousedown",(function(event){event.preventDefault()}))}},{key:"destroy",value:function destroy(){this.$popover.remove()}},{key:"selectItem",value:function selectItem($item){this.$content.find(".active").removeClass("active");$item.addClass("active");this.$content[0].scrollTop=$item[0].offsetTop-this.$content.innerHeight()/2}},{key:"moveDown",value:function moveDown(){var $current=this.$content.find(".note-hint-item.active");var $next=$current.next();if($next.length){this.selectItem($next)}else{var $nextGroup=$current.parent().next();if(!$nextGroup.length){$nextGroup=this.$content.find(".note-hint-group").first()}this.selectItem($nextGroup.find(".note-hint-item").first())}}},{key:"moveUp",value:function moveUp(){var $current=this.$content.find(".note-hint-item.active");var $prev=$current.prev();if($prev.length){this.selectItem($prev)}else{var $prevGroup=$current.parent().prev();if(!$prevGroup.length){$prevGroup=this.$content.find(".note-hint-group").last()}this.selectItem($prevGroup.find(".note-hint-item").last())}}},{key:"replace",value:function replace(){var $item=this.$content.find(".note-hint-item.active");if($item.length){var node=this.nodeFromItem($item);if(this.matchingWord!==null&&this.matchingWord.length===0){this.lastWordRange.so=this.lastWordRange.eo}else if(this.matchingWord!==null&&this.matchingWord.length>0&&!this.lastWordRange.isCollapsed()){var rangeCompute=this.lastWordRange.eo-this.lastWordRange.so-this.matchingWord.length;if(rangeCompute>0){this.lastWordRange.so+=rangeCompute}}this.lastWordRange.insertNode(node);if(this.options.hintSelect==="next"){var blank=document.createTextNode("");external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(node).after(blank);range.createFromNodeBefore(blank).select()}else{range.createFromNodeAfter(node).select()}this.lastWordRange=null;this.hide();this.context.invoke("editor.focus");this.context.triggerEvent("change",this.$editable.html(),this.$editable)}}},{key:"nodeFromItem",value:function nodeFromItem($item){var hint=this.hints[$item.data("index")];var item=$item.data("item");var node=hint.content?hint.content(item):item;if(typeof node==="string"){node=dom.createText(node)}return node}},{key:"createItemTemplates",value:function createItemTemplates(hintIdx,items){var hint=this.hints[hintIdx];return items.map((function(item,idx){var $item=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()('<div class="note-hint-item"></div>');$item.append(hint.template?hint.template(item):item+"");$item.data({index:hintIdx,item:item});if(hintIdx===0&&idx===0){$item.addClass("active")}return $item}))}},{key:"handleKeydown",value:function handleKeydown(event){if(!this.$popover.is(":visible")){return}if(event.keyCode===key.code.ENTER){event.preventDefault();this.replace()}else if(event.keyCode===key.code.UP){event.preventDefault();this.moveUp()}else if(event.keyCode===key.code.DOWN){event.preventDefault();this.moveDown()}}},{key:"searchKeyword",value:function searchKeyword(index,keyword,callback){var hint=this.hints[index];if(hint&&hint.match.test(keyword)&&hint.search){var matches=hint.match.exec(keyword);this.matchingWord=matches[0];hint.search(matches[1],callback)}else{callback()}}},{key:"createGroup",value:function createGroup(idx,keyword){var _this3=this;var $group=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()('<div class="note-hint-group note-hint-group-'+idx+'"></div>');this.searchKeyword(idx,keyword,(function(items){items=items||[];if(items.length){$group.html(_this3.createItemTemplates(idx,items));_this3.show()}}));return $group}},{key:"handleKeyup",value:function handleKeyup(event){var _this4=this;if(!lists.contains([key.code.ENTER,key.code.UP,key.code.DOWN],event.keyCode)){var _range=this.context.invoke("editor.getLastRange");var wordRange,keyword;if(this.options.hintMode==="words"){wordRange=_range.getWordsRange(_range);keyword=wordRange.toString();this.hints.forEach((function(hint){if(hint.match.test(keyword)){wordRange=_range.getWordsMatchRange(hint.match);return false}}));if(!wordRange){this.hide();return}keyword=wordRange.toString()}else{wordRange=_range.getWordRange();keyword=wordRange.toString()}if(this.hints.length&&keyword){this.$content.empty();var bnd=func.rect2bnd(lists.last(wordRange.getClientRects()));var containerOffset=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(this.options.container).offset();if(bnd){bnd.top-=containerOffset.top;bnd.left-=containerOffset.left;this.$popover.hide();this.lastWordRange=wordRange;this.hints.forEach((function(hint,idx){if(hint.match.test(keyword)){_this4.createGroup(idx,keyword).appendTo(_this4.$content)}}));this.$content.find(".note-hint-item").first().addClass("active");if(this.direction==="top"){this.$popover.css({left:bnd.left,top:bnd.top-this.$popover.outerHeight()-POPOVER_DIST})}else{this.$popover.css({left:bnd.left,top:bnd.top+bnd.height+POPOVER_DIST})}}}else{this.hide()}}}},{key:"show",value:function show(){this.$popover.show()}},{key:"hide",value:function hide(){this.$popover.hide()}}])}();external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend(external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote,{version:"0.9.1",plugins:{},dom:dom,range:range,lists:lists,options:{langInfo:external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.lang["en-US"],editing:true,modules:{editor:Editor,clipboard:Clipboard,dropzone:Dropzone,codeview:CodeView,statusbar:Statusbar,fullscreen:Fullscreen,handle:Handle,hintPopover:HintPopover,autoLink:AutoLink,autoSync:AutoSync,autoReplace:AutoReplace,placeholder:Placeholder,buttons:Buttons,toolbar:Toolbar,linkDialog:LinkDialog,linkPopover:LinkPopover,imageDialog:ImageDialog,imagePopover:ImagePopover,tablePopover:TablePopover,videoDialog:VideoDialog,helpDialog:HelpDialog,airPopover:AirPopover},buttons:{},lang:"en-US",followingToolbar:false,toolbarPosition:"top",otherStaticBar:"",codeviewKeepButton:false,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:true,popover:{image:[["resize",["resizeFull","resizeHalf","resizeQuarter","resizeNone"]],["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"]],["view",["fullscreen","codeview"]]]},linkAddNoReferrer:false,addLinkNoOpener:false,airMode:false,overrideContextMenu:false,width:null,height:null,linkTargetBlank:true,focus:false,tabDisable:false,tabSize:4,styleWithCSS:false,shortcuts:true,textareaAutoSync:true,tooltip:"auto",container:null,maxTextLength:0,blockquoteBreakingLevel:2,spellCheck:true,disableGrammar:false,placeholder:null,inheritPlaceholder:false,recordEveryKeystroke:false,historyLimit:200,showDomainOnlyForAutolink:false,hintMode:"word",hintSelect:"after",hintDirection:"bottom",styleTags:["p","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"],fontNamesIgnoreCheck:[],addDefaultFonts:true,fontSizes:["8","9","10","11","12","14","18","24","36"],fontSizeUnits:["px","pt"],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"]],colorsName:[["Black","Tundora","Dove Gray","Star Dust","Pale Slate","Gallery","Alabaster","White"],["Red","Orange Peel","Yellow","Green","Cyan","Blue","Electric Violet","Magenta"],["Azalea","Karry","Egg White","Zanah","Botticelli","Tropical Blue","Mischka","Twilight"],["Tonys Pink","Peach Orange","Cream Brulee","Sprout","Casper","Perano","Cold Purple","Careys Pink"],["Mandy","Rajah","Dandelion","Olivine","Gulf Stream","Viking","Blue Marguerite","Puce"],["Guardsman Red","Fire Bush","Golden Dream","Chelsea Cucumber","Smalt Blue","Boston Blue","Butterfly Bush","Cadillac"],["Sangria","Mai Tai","Buddha Gold","Forest Green","Eden","Venice Blue","Meteorite","Claret"],["Rosewood","Cinnamon","Olive","Parsley","Tiber","Midnight Blue","Valentino","Loulou"]],colorButton:{foreColor:"#000000",backColor:"#FFFF00"},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:false,dialogsFade:false,maximumImageFileSize:null,acceptImageFileTypes:"image/*",allowClipboardImagePasting:true,callbacks:{onBeforeCommand:null,onBlur:null,onBlurCodeview:null,onChange:null,onChangeCodeview:null,onDialogShown:null,onEnter:null,onFocus:null,onImageLinkInsert:null,onImageUpload:null,onImageUploadError:null,onInit:null,onKeydown:null,onKeyup:null,onMousedown:null,onMouseup:null,onPaste:null,onScroll:null},codemirror:{mode:"text/html",htmlMode:true,lineNumbers:true},codeviewFilter:true,codeviewFilterRegex:/<\/*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|ilayer|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|t(?:itle|extarea)|xml)[^>]*?>/gi,codeviewIframeFilter:true,codeviewIframeWhitelistSrc:[],codeviewIframeWhitelistSrcBase:["www.youtube.com","www.youtube-nocookie.com","www.facebook.com","vine.co","instagram.com","player.vimeo.com","www.dailymotion.com","player.youku.com","jumpingbean.tv","v.qq.com"],keyMap:{pc:{ESC:"escape",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:{ESC:"escape",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",floatLeft:"note-icon-float-left",floatRight:"note-icon-float-right",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",rollback:"note-icon-rollback",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"}}});function renderer_typeof(o){"@babel/helpers - typeof";return renderer_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},renderer_typeof(o)}function renderer_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function renderer_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,renderer_toPropertyKey(o.key),o)}}function renderer_createClass(e,r,t){return r&&renderer_defineProperties(e.prototype,r),t&&renderer_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function renderer_toPropertyKey(t){var i=renderer_toPrimitive(t,"string");return"symbol"==renderer_typeof(i)?i:i+""}function renderer_toPrimitive(t,r){if("object"!=renderer_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=renderer_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var Renderer=function(){function Renderer(markup,children,options,callback){renderer_classCallCheck(this,Renderer);this.markup=markup;this.children=children;this.options=options;this.callback=callback}return renderer_createClass(Renderer,[{key:"render",value:function render($parent){var $node=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(this.markup);if(this.options&&this.options.contents){$node.html(this.options.contents)}if(this.options&&this.options.className){$node.addClass(this.options.className)}if(this.options&&this.options.data){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(this.options.data,(function(k,v){$node.attr("data-"+k,v)}))}if(this.options&&this.options.click){$node.on("click",this.options.click)}if(this.children){var $container=$node.find(".note-children-container");this.children.forEach((function(child){child.render($container.length?$container:$node)}))}if(this.callback){this.callback($node,this.options)}if(this.options&&this.options.callback){this.options.callback($node)}if($parent){$parent.append($node)}return $node}}])}();const renderer={create:function create(markup,callback){return function(){var options=renderer_typeof(arguments[1])==="object"?arguments[1]:arguments[0];var children=Array.isArray(arguments[0])?arguments[0]:[];if(options&&options.children){children=options.children}return new Renderer(markup,children,options,callback)}}};function TooltipUI_typeof(o){"@babel/helpers - typeof";return TooltipUI_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},TooltipUI_typeof(o)}function TooltipUI_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function TooltipUI_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,TooltipUI_toPropertyKey(o.key),o)}}function TooltipUI_createClass(e,r,t){return r&&TooltipUI_defineProperties(e.prototype,r),t&&TooltipUI_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function TooltipUI_toPropertyKey(t){var i=TooltipUI_toPrimitive(t,"string");return"symbol"==TooltipUI_typeof(i)?i:i+""}function TooltipUI_toPrimitive(t,r){if("object"!=TooltipUI_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=TooltipUI_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var TooltipUI=function(){function TooltipUI($node,options){TooltipUI_classCallCheck(this,TooltipUI);this.$node=$node;this.options=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend({},{title:"",target:options.container,trigger:"hover focus",placement:"bottom"},options);this.$tooltip=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(['<div class="note-tooltip">','<div class="note-tooltip-arrow"></div>','<div class="note-tooltip-content"></div>',"</div>"].join(""));if(this.options.trigger!=="manual"){var showCallback=this.show.bind(this);var hideCallback=this.hide.bind(this);var toggleCallback=this.toggle.bind(this);this.options.trigger.split(" ").forEach((function(eventName){if(eventName==="hover"){$node.off("mouseenter mouseleave");$node.on("mouseenter",showCallback).on("mouseleave",hideCallback)}else if(eventName==="click"){$node.on("click",toggleCallback)}else if(eventName==="focus"){$node.on("focus",showCallback).on("blur",hideCallback)}}))}}return TooltipUI_createClass(TooltipUI,[{key:"show",value:function show(){var $node=this.$node;var offset=$node.offset();var targetOffset=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(this.options.target).offset();offset.top-=targetOffset.top;offset.left-=targetOffset.left;var $tooltip=this.$tooltip;var title=this.options.title||$node.attr("title")||$node.data("title");var placement=this.options.placement||$node.data("placement");$tooltip.addClass(placement);$tooltip.find(".note-tooltip-content").text(title);$tooltip.appendTo(this.options.target);var nodeWidth=$node.outerWidth();var nodeHeight=$node.outerHeight();var tooltipWidth=$tooltip.outerWidth();var tooltipHeight=$tooltip.outerHeight();if(placement==="bottom"){$tooltip.css({top:offset.top+nodeHeight,left:offset.left+(nodeWidth/2-tooltipWidth/2)})}else if(placement==="top"){$tooltip.css({top:offset.top-tooltipHeight,left:offset.left+(nodeWidth/2-tooltipWidth/2)})}else if(placement==="left"){$tooltip.css({top:offset.top+(nodeHeight/2-tooltipHeight/2),left:offset.left-tooltipWidth})}else if(placement==="right"){$tooltip.css({top:offset.top+(nodeHeight/2-tooltipHeight/2),left:offset.left+nodeWidth})}$tooltip.addClass("in")}},{key:"hide",value:function hide(){var _this=this;this.$tooltip.removeClass("in");setTimeout((function(){_this.$tooltip.remove()}),200)}},{key:"toggle",value:function toggle(){if(this.$tooltip.hasClass("in")){this.hide()}else{this.show()}}}])}();const js_TooltipUI=TooltipUI;function DropdownUI_typeof(o){"@babel/helpers - typeof";return DropdownUI_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},DropdownUI_typeof(o)}function DropdownUI_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function DropdownUI_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,DropdownUI_toPropertyKey(o.key),o)}}function DropdownUI_createClass(e,r,t){return r&&DropdownUI_defineProperties(e.prototype,r),t&&DropdownUI_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function DropdownUI_toPropertyKey(t){var i=DropdownUI_toPrimitive(t,"string");return"symbol"==DropdownUI_typeof(i)?i:i+""}function DropdownUI_toPrimitive(t,r){if("object"!=DropdownUI_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=DropdownUI_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var DropdownUI=function(){function DropdownUI($node,options){DropdownUI_classCallCheck(this,DropdownUI);this.$button=$node;this.options=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend({},{target:options.container},options);this.setEvent()}return DropdownUI_createClass(DropdownUI,[{key:"setEvent",value:function setEvent(){var _this=this;this.$button.on("click",(function(e){_this.toggle();e.stopImmediatePropagation()}))}},{key:"clear",value:function clear(){var $parent=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(".note-btn-group.open");$parent.find(".note-btn.active").removeClass("active");$parent.removeClass("open")}},{key:"show",value:function show(){this.$button.addClass("active");this.$button.parent().addClass("open");var $dropdown=this.$button.next();var offset=$dropdown.offset();var width=$dropdown.outerWidth();var windowWidth=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(window).width();var targetMarginRight=parseFloat(external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(this.options.target).css("margin-right"));if(offset.left+width>windowWidth-targetMarginRight){$dropdown.css("margin-left",windowWidth-targetMarginRight-(offset.left+width))}else{$dropdown.css("margin-left","")}}},{key:"hide",value:function hide(){this.$button.removeClass("active");this.$button.parent().removeClass("open")}},{key:"toggle",value:function toggle(){var isOpened=this.$button.parent().hasClass("open");this.clear();if(isOpened){this.hide()}else{this.show()}}}])}();external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(document).on("click.note-dropdown-menu",(function(e){if(!external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(e.target).closest(".note-btn-group").length){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(".note-btn-group.open .note-btn.active").removeClass("active");external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(".note-btn-group.open").removeClass("open")}}));external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(document).on("click.note-dropdown-menu",(function(e){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(e.target).closest(".note-dropdown-menu").parent().removeClass("open");external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(e.target).closest(".note-dropdown-menu").parent().find(".note-btn.active").removeClass("active")}));const js_DropdownUI=DropdownUI;function ModalUI_typeof(o){"@babel/helpers - typeof";return ModalUI_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},ModalUI_typeof(o)}function ModalUI_classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function ModalUI_defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ModalUI_toPropertyKey(o.key),o)}}function ModalUI_createClass(e,r,t){return r&&ModalUI_defineProperties(e.prototype,r),t&&ModalUI_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ModalUI_toPropertyKey(t){var i=ModalUI_toPrimitive(t,"string");return"symbol"==ModalUI_typeof(i)?i:i+""}function ModalUI_toPrimitive(t,r){if("object"!=ModalUI_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=ModalUI_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var ModalUI=function(){function ModalUI($node){ModalUI_classCallCheck(this,ModalUI);this.$modal=$node;this.$backdrop=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()('<div class="note-modal-backdrop"></div>')}return ModalUI_createClass(ModalUI,[{key:"show",value:function show(){var _this=this;this.$backdrop.appendTo(document.body).show();this.$modal.addClass("open").show();this.$modal.trigger("note.modal.show");this.$modal.off("click",".close").on("click",".close",this.hide.bind(this));this.$modal.on("keydown",(function(event){if(event.which===27){event.preventDefault();_this.hide()}}))}},{key:"hide",value:function hide(){this.$modal.removeClass("open").hide();this.$backdrop.hide();this.$modal.trigger("note.modal.hide");this.$modal.off("keydown")}}])}();const js_ModalUI=ModalUI;var editor=renderer.create('<div class="note-editor note-frame"></div>');var toolbar=renderer.create('<div class="note-toolbar" role="toolbar"></div>');var editingArea=renderer.create('<div class="note-editing-area"></div>');var codable=renderer.create('<textarea class="note-codable" aria-multiline="true"></textarea>');var editable=renderer.create('<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"></div>');var statusbar=renderer.create(['<output class="note-status-output" role="status" aria-live="polite"></output>','<div class="note-statusbar" role="status">','<div class="note-resizebar" aria-label="resize">','<div class="note-icon-bar"></div>','<div class="note-icon-bar"></div>','<div class="note-icon-bar"></div>',"</div>","</div>"].join(""));var airEditor=renderer.create('<div class="note-editor note-airframe"></div>');var airEditable=renderer.create(['<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"></div>','<output class="note-status-output" role="status" aria-live="polite"></output>'].join(""));var buttonGroup=renderer.create('<div class="note-btn-group"></div>');var summernote_lite_button=renderer.create('<button type="button" class="note-btn" tabindex="-1"></button>',(function($node,options){if(options&&options.tooltip){$node.attr({"aria-label":options.tooltip});$node.data("_lite_tooltip",new js_TooltipUI($node,{title:options.tooltip,container:options.container})).on("click",(function(e){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(e.currentTarget).data("_lite_tooltip").hide()}))}if(options.contents){$node.html(options.contents)}if(options&&options.data&&options.data.toggle==="dropdown"){$node.data("_lite_dropdown",new js_DropdownUI($node,{container:options.container}))}if(options&&options.codeviewKeepButton){$node.addClass("note-codeview-keep")}}));var dropdown=renderer.create('<div class="note-dropdown-menu" role="list"></div>',(function($node,options){var markup=Array.isArray(options.items)?options.items.map((function(item){var value=typeof item==="string"?item:item.value||"";var content=options.template?options.template(item):item;var $temp=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()('<a class="note-dropdown-item" href="#" data-value="'+value+'" role="listitem" aria-label="'+value+'"></a>');$temp.html(content).data("item",item);return $temp})):options.items;$node.html(markup).attr({"aria-label":options.title});$node.on("click","> .note-dropdown-item",(function(e){var $a=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(this);var item=$a.data("item");var value=$a.data("value");if(item.click){item.click($a)}else if(options.itemClick){options.itemClick(e,item,value)}}));if(options&&options.codeviewKeepButton){$node.addClass("note-codeview-keep")}}));var dropdownCheck=renderer.create('<div class="note-dropdown-menu note-check" role="list"></div>',(function($node,options){var markup=Array.isArray(options.items)?options.items.map((function(item){var value=typeof item==="string"?item:item.value||"";var content=options.template?options.template(item):item;var $temp=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()('<a class="note-dropdown-item" href="#" data-value="'+value+'" role="listitem" aria-label="'+item+'"></a>');$temp.html([icon(options.checkClassName)," ",content]).data("item",item);return $temp})):options.items;$node.html(markup).attr({"aria-label":options.title});$node.on("click","> .note-dropdown-item",(function(e){var $a=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(this);var item=$a.data("item");var value=$a.data("value");if(item.click){item.click($a)}else if(options.itemClick){options.itemClick(e,item,value)}}));if(options&&options.codeviewKeepButton){$node.addClass("note-codeview-keep")}}));var dropdownButtonContents=function dropdownButtonContents(contents,options){return contents+" "+icon(options.icons.caret,"span")};var dropdownButton=function dropdownButton(opt,callback){return buttonGroup([summernote_lite_button({className:"dropdown-toggle",contents:opt.title+" "+icon("note-icon-caret"),tooltip:opt.tooltip,data:{toggle:"dropdown"}}),dropdown({className:opt.className,items:opt.items,template:opt.template,itemClick:opt.itemClick})],{callback:callback}).render()};var dropdownCheckButton=function dropdownCheckButton(opt,callback){return buttonGroup([summernote_lite_button({className:"dropdown-toggle",contents:opt.title+" "+icon("note-icon-caret"),tooltip:opt.tooltip,data:{toggle:"dropdown"}}),dropdownCheck({className:opt.className,checkClassName:opt.checkClassName,items:opt.items,template:opt.template,itemClick:opt.itemClick})],{callback:callback}).render()};var paragraphDropdownButton=function paragraphDropdownButton(opt){return buttonGroup([summernote_lite_button({className:"dropdown-toggle",contents:opt.title+" "+icon("note-icon-caret"),tooltip:opt.tooltip,data:{toggle:"dropdown"}}),dropdown([buttonGroup({className:"note-align",children:opt.items[0]}),buttonGroup({className:"note-list",children:opt.items[1]})])]).render()};var tableMoveHandler=function tableMoveHandler(event,col,row){var PX_PER_EM=18;var $picker=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(event.target.parentNode);var $dimensionDisplay=$picker.next();var $catcher=$picker.find(".note-dimension-picker-mousecatcher");var $highlighted=$picker.find(".note-dimension-picker-highlighted");var $unhighlighted=$picker.find(".note-dimension-picker-unhighlighted");var posOffset;if(event.offsetX===undefined){var posCatcher=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(event.target).offset();posOffset={x:event.pageX-posCatcher.left,y:event.pageY-posCatcher.top}}else{posOffset={x:event.offsetX,y:event.offsetY}}var dim={c:Math.ceil(posOffset.x/PX_PER_EM)||1,r:Math.ceil(posOffset.y/PX_PER_EM)||1};$highlighted.css({width:dim.c+"em",height:dim.r+"em"});$catcher.data("value",dim.c+"x"+dim.r);if(dim.c>3&&dim.c<col){$unhighlighted.css({width:dim.c+1+"em"})}if(dim.r>3&&dim.r<row){$unhighlighted.css({height:dim.r+1+"em"})}$dimensionDisplay.html(dim.c+" x "+dim.r)};var tableDropdownButton=function tableDropdownButton(opt){return buttonGroup([summernote_lite_button({className:"dropdown-toggle",contents:opt.title+" "+icon("note-icon-caret"),tooltip:opt.tooltip,data:{toggle:"dropdown"}}),dropdown({className:"note-table",items:['<div class="note-dimension-picker">','<div class="note-dimension-picker-mousecatcher" data-event="insertTable" data-value="1x1"></div>','<div class="note-dimension-picker-highlighted"></div>','<div class="note-dimension-picker-unhighlighted"></div>',"</div>",'<div class="note-dimension-display">1 x 1</div>'].join("")})],{callback:function callback($node){var $catcher=$node.find(".note-dimension-picker-mousecatcher");$catcher.css({width:opt.col+"em",height:opt.row+"em"}).on("mouseup",opt.itemClick).on("mousemove",(function(e){tableMoveHandler(e,opt.col,opt.row)}))}}).render()};var palette=renderer.create('<div class="note-color-palette"></div>',(function($node,options){var contents=[];for(var row=0,rowSize=options.colors.length;row<rowSize;row++){var eventName=options.eventName;var colors=options.colors[row];var colorsName=options.colorsName[row];var buttons=[];for(var col=0,colSize=colors.length;col<colSize;col++){var color=colors[col];var colorName=colorsName[col];buttons.push(['<button type="button" class="note-btn note-color-btn"','style="background-color:',color,'" ','data-event="',eventName,'" ','data-value="',color,'" ','data-title="',colorName,'" ','aria-label="',colorName,'" ','data-toggle="button" tabindex="-1"></button>'].join(""))}contents.push('<div class="note-color-row">'+buttons.join("")+"</div>")}$node.html(contents.join(""));$node.find(".note-color-btn").each((function(){external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(this).data("_lite_tooltip",new js_TooltipUI(external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(this),{container:options.container}))}))}));var colorDropdownButton=function colorDropdownButton(opt,type){return buttonGroup({className:"note-color",children:[summernote_lite_button({className:"note-current-color-button",contents:opt.title,tooltip:opt.lang.color.recent,click:opt.currentClick,callback:function callback($button){var $recentColor=$button.find(".note-recent-color");if(type!=="foreColor"){$recentColor.css("background-color","#FFFF00");$button.attr("data-backColor","#FFFF00")}}}),summernote_lite_button({className:"dropdown-toggle",contents:icon("note-icon-caret"),tooltip:opt.lang.color.more,data:{toggle:"dropdown"}}),dropdown({items:["<div>",'<div class="note-btn-group btn-background-color">','<div class="note-palette-title">'+opt.lang.color.background+"</div>","<div>",'<button type="button" class="note-color-reset note-btn note-btn-block" data-event="backColor" data-value="transparent">',opt.lang.color.transparent,"</button>","</div>",'<div class="note-holder" data-event="backColor"></div>','<div class="btn-sm">','<input type="color" id="html5bcp" class="note-btn btn-default" value="#21104A" style="width:100%;" data-value="cp">','<button type="button" class="note-color-reset btn" data-event="backColor" data-value="cpbackColor">',opt.lang.color.cpSelect,"</button>","</div>","</div>",'<div class="note-btn-group btn-foreground-color">','<div class="note-palette-title">'+opt.lang.color.foreground+"</div>","<div>",'<button type="button" class="note-color-reset note-btn note-btn-block" data-event="removeFormat" data-value="foreColor">',opt.lang.color.resetToDefault,"</button>","</div>",'<div class="note-holder" data-event="foreColor"></div>','<div class="btn-sm">','<input type="color" id="html5fcp" class="note-btn btn-default" value="#21104A" style="width:100%;" data-value="cp">','<button type="button" class="note-color-reset btn" data-event="foreColor" data-value="cpforeColor">',opt.lang.color.cpSelect,"</button>","</div>","</div>","</div>"].join(""),callback:function callback($dropdown){$dropdown.find(".note-holder").each((function(){var $holder=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(this);$holder.append(palette({colors:opt.colors,eventName:$holder.data("event")}).render())}));if(type==="fore"){$dropdown.find(".btn-background-color").hide();$dropdown.css({"min-width":"210px"})}else if(type==="back"){$dropdown.find(".btn-foreground-color").hide();$dropdown.css({"min-width":"210px"})}},click:function click(event){var $button=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(event.target);var eventName=$button.data("event");var value=$button.data("value");var foreinput=document.getElementById("html5fcp").value;var backinput=document.getElementById("html5bcp").value;if(value==="cp"){event.stopPropagation()}else if(value==="cpbackColor"){value=backinput}else if(value==="cpforeColor"){value=foreinput}if(eventName&&value){var key=eventName==="backColor"?"background-color":"color";var $color=$button.closest(".note-color").find(".note-recent-color");var $currentButton=$button.closest(".note-color").find(".note-current-color-button");$color.css(key,value);$currentButton.attr("data-"+eventName,value);if(type==="fore"){opt.itemClick("foreColor",value)}else if(type==="back"){opt.itemClick("backColor",value)}else{opt.itemClick(eventName,value)}}}})]}).render()};var dialog=renderer.create('<div class="note-modal" aria-hidden="false" tabindex="-1" role="dialog"></div>',(function($node,options){if(options.fade){$node.addClass("fade")}$node.attr({"aria-label":options.title});$node.html(['<div class="note-modal-content">',options.title?'<div class="note-modal-header"><button type="button" class="close" aria-label="Close" aria-hidden="true"><i class="note-icon-close"></i></button><h4 class="note-modal-title">'+options.title+"</h4></div>":"",'<div class="note-modal-body">'+options.body+"</div>",options.footer?'<div class="note-modal-footer">'+options.footer+"</div>":"","</div>"].join(""));$node.data("modal",new js_ModalUI($node,options))}));var videoDialog=function videoDialog(opt){var body='<div class="note-form-group">'+'<label for="note-dialog-video-url-'+opt.id+'" class="note-form-label">'+opt.lang.video.url+' <small class="text-muted">'+opt.lang.video.providers+"</small></label>"+'<input id="note-dialog-video-url-'+opt.id+'" class="note-video-url note-input" type="text"/>'+"</div>";var footer=['<button type="button" href="#" class="note-btn note-btn-primary note-video-btn disabled" disabled>',opt.lang.video.insert,"</button>"].join("");return dialog({title:opt.lang.video.insert,fade:opt.fade,body:body,footer:footer}).render()};var imageDialog=function imageDialog(opt){var body='<div class="note-form-group note-group-select-from-files">'+'<label for="note-dialog-image-file-'+opt.id+'" class="note-form-label">'+opt.lang.image.selectFromFiles+"</label>"+'<input id="note-dialog-image-file-'+opt.id+'" class="note-note-image-input note-input" type="file" name="files" accept="image/*" multiple="multiple"/>'+opt.imageLimitation+"</div>"+'<div class="note-form-group">'+'<label for="note-dialog-image-url-'+opt.id+'" class="note-form-label">'+opt.lang.image.url+"</label>"+'<input id="note-dialog-image-url-'+opt.id+'" class="note-image-url note-input" type="text"/>'+"</div>";var footer=['<button href="#" type="button" class="note-btn note-btn-primary note-btn-large note-image-btn disabled" disabled>',opt.lang.image.insert,"</button>"].join("");return dialog({title:opt.lang.image.insert,fade:opt.fade,body:body,footer:footer}).render()};var linkDialog=function linkDialog(opt){var body='<div class="note-form-group">'+'<label for="note-dialog-link-txt-'+opt.id+'" class="note-form-label">'+opt.lang.link.textToDisplay+"</label>"+'<input id="note-dialog-link-txt-'+opt.id+'" class="note-link-text note-input" type="text"/>'+"</div>"+'<div class="note-form-group">'+'<label for="note-dialog-link-url-'+opt.id+'" class="note-form-label">'+opt.lang.link.url+"</label>"+'<input id="note-dialog-link-url-'+opt.id+'" class="note-link-url note-input" type="text" value="http://"/>'+"</div>"+(!opt.disableLinkTarget?'<div class="checkbox"><label for="note-dialog-link-nw-'+opt.id+'"><input id="note-dialog-link-nw-'+opt.id+'" type="checkbox" checked> '+opt.lang.link.openInNewWindow+"</label></div>":"");var footer=['<button href="#" type="button" class="note-btn note-btn-primary note-link-btn disabled" disabled>',opt.lang.link.insert,"</button>"].join("");return dialog({className:"link-dialog",title:opt.lang.link.insert,fade:opt.fade,body:body,footer:footer}).render()};var popover=renderer.create(['<div class="note-popover bottom">','<div class="note-popover-arrow"></div>','<div class="popover-content note-children-container"></div>',"</div>"].join(""),(function($node,options){var direction=typeof options.direction!=="undefined"?options.direction:"bottom";$node.addClass(direction).hide();if(options.hideArrow){$node.find(".note-popover-arrow").hide()}}));var summernote_lite_checkbox=renderer.create('<div class="checkbox"></div>',(function($node,options){$node.html(["<label"+(options.id?' for="note-'+options.id+'"':"")+">",'<input role="checkbox" type="checkbox"'+(options.id?' id="note-'+options.id+'"':""),options.checked?" checked":"",' aria-checked="'+(options.checked?"true":"false")+'"/>',options.text?options.text:"","</label>"].join(""))}));var icon=function icon(iconClassName,tagName){if(iconClassName.match(/^</)){return iconClassName}tagName=tagName||"i";return"<"+tagName+' class="'+iconClassName+'"></'+tagName+">"};var ui=function ui(editorOptions){return{editor:editor,toolbar:toolbar,editingArea:editingArea,codable:codable,editable:editable,statusbar:statusbar,airEditor:airEditor,airEditable:airEditable,buttonGroup:buttonGroup,button:summernote_lite_button,dropdown:dropdown,dropdownCheck:dropdownCheck,dropdownButton:dropdownButton,dropdownButtonContents:dropdownButtonContents,dropdownCheckButton:dropdownCheckButton,paragraphDropdownButton:paragraphDropdownButton,tableDropdownButton:tableDropdownButton,colorDropdownButton:colorDropdownButton,palette:palette,dialog:dialog,videoDialog:videoDialog,imageDialog:imageDialog,linkDialog:linkDialog,popover:popover,checkbox:summernote_lite_checkbox,icon:icon,options:editorOptions,toggleBtn:function toggleBtn($btn,isEnable){$btn.toggleClass("disabled",!isEnable);$btn.attr("disabled",!isEnable)},toggleBtnActive:function toggleBtnActive($btn,isActive){$btn.toggleClass("active",isActive)},check:function check($dom,value){$dom.find(".checked").removeClass("checked");$dom.find('[data-value="'+value+'"]').addClass("checked")},onDialogShown:function onDialogShown($dialog,handler){$dialog.one("note.modal.show",handler)},onDialogHidden:function onDialogHidden($dialog,handler){$dialog.one("note.modal.hide",handler)},showDialog:function showDialog($dialog){$dialog.data("modal").show()},hideDialog:function hideDialog($dialog){$dialog.data("modal").hide()},getPopoverContent:function getPopoverContent($popover){return $popover.find(".note-popover-content")},getDialogBody:function getDialogBody($dialog){return $dialog.find(".note-modal-body")},createLayout:function createLayout($note){var $editor=(editorOptions.airMode?airEditor([editingArea([codable(),airEditable()])]):editorOptions.toolbarPosition==="bottom"?editor([editingArea([codable(),editable()]),toolbar(),statusbar()]):editor([toolbar(),editingArea([codable(),editable()]),statusbar()])).render();$editor.insertAfter($note);return{note:$note,editor:$editor,toolbar:$editor.find(".note-toolbar"),editingArea:$editor.find(".note-editing-area"),editable:$editor.find(".note-editable"),codable:$editor.find(".note-codable"),statusbar:$editor.find(".note-statusbar")}},removeLayout:function removeLayout($note,layoutInfo){$note.html(layoutInfo.editable.html());layoutInfo.editor.remove();$note.off("summernote");$note.show()}}};external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote=external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend(external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote,{ui_template:ui,interface:"lite"});return __webpack_exports__})()));
578
577
  /*!
579
578
  * jQuery UI Disable Selection 1.13.3
580
579
  * https://jqueryui.com