@wavemaker/app-runtime-wm-build 11.10.0-next.47261 → 11.10.0-next.47265
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.
|
@@ -569,17 +569,16 @@ Docs & License: https://fullcalendar.io/
|
|
|
569
569
|
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 i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function i(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}var o,s,a,l,c,u,d,h={},p=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function m(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 v(e,t,n){var r,i=arguments,o={};for(r in t)"key"!==r&&"ref"!==r&&(o[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(i[r]);if(null!=n&&(o.children=n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===o[r]&&(o[r]=e.defaultProps[r]);return y(e,o,t&&t.key,t&&t.ref,null)}function y(e,t,n,r,i){var s={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i};return null==i&&(s.__v=s),o.vnode&&o.vnode(s),s}function b(e){return e.children}function _(e,t){this.props=e,this.context=t}function w(e,t){if(null==t)return e.__?w(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?w(e):null}function x(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 x(e)}}function S(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!a++||c!==o.debounceRendering)&&((c=o.debounceRendering)||l)(k)}function k(){for(var e;a=s.length;)e=s.sort((function(e,t){return e.__v.__b-t.__v.__b})),s=[],e.some((function(e){var t,n,r,i,o,s,a;e.__d&&(s=(o=(t=e).__v).__e,(a=t.__P)&&(n=[],(r=m({},o)).__v=r,i=A(a,o,r,t.__n,void 0!==a.ownerSVGElement,null,n,null==s?w(o):s),I(n,o),i!=s&&x(o)))}))}function T(e,t,n,r,i,o,s,a,l){var c,u,d,f,m,v,y,b=n&&n.__k||p,_=b.length;if(a==h&&(a=null!=o?o[0]:_?w(n,0):null),c=0,t.__k=E(t.__k,(function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(d=b[c])||d&&n.key==d.key&&n.type===d.type)b[c]=void 0;else for(u=0;u<_;u++){if((d=b[u])&&n.key==d.key&&n.type===d.type){b[u]=void 0;break}d=null}if(f=A(e,n,d=d||h,r,i,o,s,a,l),(u=n.ref)&&d.ref!=u&&(y||(y=[]),d.ref&&y.push(d.ref,null,n),y.push(u,n.__c||f,n)),null!=f){var p;if(null==v&&(v=f),void 0!==n.__d)p=n.__d,n.__d=void 0;else if(o==d||f!=a||null==f.parentNode){e:if(null==a||a.parentNode!==e)e.appendChild(f),p=null;else{for(m=a,u=0;(m=m.nextSibling)&&u<_;u+=2)if(m==f)break e;e.insertBefore(f,a),p=a}"option"==t.type&&(e.value="")}a=void 0!==p?p:f.nextSibling,"function"==typeof t.type&&(t.__d=a)}else a&&d.__e==a&&a.parentNode!=e&&(a=w(d))}return c++,n})),t.__e=v,null!=o&&"function"!=typeof t.type)for(c=o.length;c--;)null!=o[c]&&g(o[c]);for(c=_;c--;)null!=b[c]&&N(b[c],b[c]);if(y)for(c=0;c<y.length;c++)O(y[c],y[++c],y[++c])}function E(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++)E(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 C(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===f.test(t)?n+"px":null==n?"":n}function D(e,t,n,r,i){var o,s,a,l,c;if(i?"className"===t&&(t="class"):"class"===t&&(t="className"),"style"===t)if(o=e.style,"string"==typeof n)o.cssText=n;else{if("string"==typeof r&&(o.cssText="",r=null),r)for(l in r)n&&l in n||C(o,l,"");if(n)for(c in n)r&&n[c]===r[c]||C(o,c,n[c])}else"o"===t[0]&&"n"===t[1]?(s=t!==(t=t.replace(/Capture$/,"")),a=t.toLowerCase(),t=(a in e?a:t).slice(2),n?(r||e.addEventListener(t,M,s),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,M,s)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&!i&&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 M(e){this.l[e.type](o.event?o.event(e):e)}function A(e,t,n,r,i,s,a,l,c){var u,d,h,p,f,g,v,y,w,x,S=t.type;if(void 0!==t.constructor)return null;(u=o.__b)&&u(t);try{e:if("function"==typeof S){if(y=t.props,w=(u=S.contextType)&&r[u.__c],x=u?w?w.props.value:u.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:("prototype"in S&&S.prototype.render?t.__c=d=new S(y,x):(t.__c=d=new _(y,x),d.constructor=S,d.render=R),w&&w.sub(d),d.props=y,d.state||(d.state={}),d.context=x,d.__n=r,h=d.__d=!0,d.__h=[]),null==d.__s&&(d.__s=d.state),null!=S.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=m({},d.__s)),m(d.__s,S.getDerivedStateFromProps(y,d.__s))),p=d.props,f=d.state,h)null==S.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==S.getDerivedStateFromProps&&y!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(y,x),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(y,d.__s,x)||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&&a.push(d),u=0;u<t.__k.length;u++)t.__k[u]&&(t.__k[u].__=t);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(y,d.__s,x),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,f,g)}))}d.context=x,d.props=y,d.state=d.__s,(u=o.__r)&&u(t),d.__d=!1,d.__v=t,d.__P=e,u=d.render(d.props,d.state,d.context),t.__k=null!=u&&u.type==b&&null==u.key?u.props.children:Array.isArray(u)?u:[u],null!=d.getChildContext&&(r=m(m({},r),d.getChildContext())),h||null==d.getSnapshotBeforeUpdate||(g=d.getSnapshotBeforeUpdate(p,f)),T(e,t,n,r,i,s,a,l,c),d.base=t.__e,d.__h.length&&a.push(d),v&&(d.__E=d.__=null),d.__e=!1}else null==s&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=L(n.__e,t,n,r,i,s,a,c);(u=o.diffed)&&u(t)}catch(e){t.__v=null,o.__e(e,t,n)}return t.__e}function I(e,t){o.__c&&o.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){o.__e(e,t.__v)}}))}function L(e,t,n,r,i,o,s,a){var l,c,u,d,f,m=n.props,g=t.props;if(i="svg"===t.type||i,null!=o)for(l=0;l<o.length;l++)if(null!=(c=o[l])&&((null===t.type?3===c.nodeType:c.localName===t.type)||e==c)){e=c,o[l]=null;break}if(null==e){if(null===t.type)return document.createTextNode(g);e=i?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,g.is&&{is:g.is}),o=null,a=!1}if(null===t.type)m!==g&&e.data!=g&&(e.data=g);else{if(null!=o&&(o=p.slice.call(e.childNodes)),u=(m=n.props||h).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!a){if(m===h)for(m={},f=0;f<e.attributes.length;f++)m[e.attributes[f].name]=e.attributes[f].value;(d||u)&&(d&&u&&d.__html==u.__html||(e.innerHTML=d&&d.__html||""))}(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||D(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||D(e,o,t[o],n[o],r)})(e,g,m,i,a),d?t.__k=[]:(t.__k=t.props.children,T(e,t,n,r,"foreignObject"!==t.type&&i,o,s,h,a)),a||("value"in g&&void 0!==(l=g.value)&&l!==e.value&&D(e,"value",l,m.value,!1),"checked"in g&&void 0!==(l=g.checked)&&l!==e.checked&&D(e,"checked",l,m.checked,!1))}return e}function O(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){o.__e(e,n)}}function N(e,t,n){var r,i,s;if(o.unmount&&o.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||O(r,null,t)),n||"function"==typeof e.type||(n=null!=(i=e.__e)),e.__e=e.__d=void 0,null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){o.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&N(r[s],t,n);null!=i&&g(i)}function R(e,t,n){return this.constructor(e,n)}function P(e,t,n){var r,i,s;o.__&&o.__(e,t),i=(r=n===u)?null:n&&n.__k||t.__k,e=v(b,null,[e]),s=[],A(t,(r?t:n||t).__k=e,i||h,h,void 0!==t.ownerSVGElement,n&&!r?[n]:i?null:p.slice.call(t.childNodes),s,n||h,r),I(s,e)}o={__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 S(n.__E=n)}catch(t){e=t}throw e}},_.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&m(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),S(this))},_.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),S(this))},_.prototype.render=b,s=[],a=0,l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=h,d=0,("undefined"!=typeof globalThis?globalThis:window).FullCalendarVDom={Component:_,createElement:v,render:P,createRef:function(){return{}},Fragment:b,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,i=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=i,t},this.shouldComponentUpdate=function(e){i.props.value!==e.value&&r.some((function(t){t.context=e.value,S(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 i=[];this.shouldComponentUpdate=function(t){e.props.value!==t.value&&i.some((function(e){e.context=t.value,e.forceUpdate()}))},this.sub=function(e){i.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){i.splice(i.indexOf(e),1),t&&t.call(e)}}}return r},t},flushToDom:function(){var e=o.debounceRendering,t=[];for(o.debounceRendering=function(e){t.push(e)},P(v(F,{}),document.createElement("div"));t.length;)t.shift()();o.debounceRendering=e}};var F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.render=function(){return v("div",{})},t.prototype.componentDidMount=function(){this.setState({})},t}(_),j=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 Y(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(H(e,t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null}function H(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector).call(e,t)}function B(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],i=0;i<n.length;i++)for(var o=n[i].querySelectorAll(t),s=0;s<o.length;s++)r.push(o[s]);return r}var U=/(top|left|right|bottom|width|height)$/i;function z(e,t){for(var n in t)q(e,n,t[n])}function q(e,t,n){null==n?e.style[t]="":"number"==typeof n&&U.test(t)?e.style[t]=n+"px":e.style[t]=n}function W(e){e.preventDefault()}function $(e,t){return function(n){var r=V(n.target,e);r&&t.call(r,n,r)}}function G(e,t,n,r){var i=$(n,r);return e.addEventListener(t,i),function(){e.removeEventListener(t,i)}}var K=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function Z(e,t){var n=function(r){t(r),K.forEach((function(t){e.removeEventListener(t,n)}))};K.forEach((function(t){e.addEventListener(t,n)}))}var X=0;function J(){return String(X++)}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",W)}function ne(e){e.classList.remove("fc-unselectable"),e.removeEventListener("selectstart",W)}function re(e){e.addEventListener("contextmenu",W)}function ie(e){e.removeEventListener("contextmenu",W)}function oe(e){var t,n,r=[],i=[];for("string"==typeof e?i=e.split(/\s*,\s*/):"function"==typeof e?i=[e]:Array.isArray(e)&&(i=e),t=0;t<i.length;t++)"string"==typeof(n=i[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 se(e,t,n){var r,i;for(r=0;r<n.length;r++)if(i=ae(e,t,n[r]))return i;return 0}function ae(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 ce(e,t){var n=String(e);return"000".substr(0,t-n.length)+n}function ue(e,t){return e-t}function de(e){return e%1==0}function he(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 pe=["sun","mon","tue","wed","thu","fri","sat"];function fe(e,t){var n=Ce(e);return n[2]+=7*t,De(n)}function me(e,t){var n=Ce(e);return n[2]+=t,De(n)}function ge(e,t){var n=Ce(e);return n[6]+=t,De(n)}function ve(e,t){return ye(e,t)/7}function ye(e,t){return(t.valueOf()-e.valueOf())/864e5}function be(e,t){var n=xe(e),r=xe(t);return{years:0,months:0,days:Math.round(ye(n,r)),milliseconds:t.valueOf()-r.valueOf()-(e.valueOf()-n.valueOf())}}function _e(e,t){var n=we(e,t);return null!==n&&n%7==0?n/7:null}function we(e,t){return Ae(e)===Ae(t)?Math.round(ye(e,t)):null}function xe(e){return De([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()])}function Se(e,t,n,r){var i=De([t,0,1+ke(t,n,r)]),o=xe(e),s=Math.round(ye(i,o));return Math.floor(s/7)+1}function ke(e,t,n){var r=7+t-n;return-(7+De([e,0,r]).getUTCDay()-t)%7+r-1}function Te(e){return[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()]}function Ee(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 Ce(e){return[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()]}function De(e){return 1===e.length&&(e=e.concat([0])),new Date(Date.UTC.apply(Date,e))}function Me(e){return!isNaN(e.valueOf())}function Ae(e){return 1e3*e.getUTCHours()*60*60+1e3*e.getUTCMinutes()*60+1e3*e.getUTCSeconds()+e.getUTCMilliseconds()}function Ie(e,t,n,r){return{instanceId:J(),defId:e,range:t,forcedStartTzo:null==n?null:n,forcedEndTzo:null==r?null:r}}var Le=Object.prototype.hasOwnProperty;function Oe(e,t){var n={};if(t)for(var r in t){for(var i=[],o=e.length-1;o>=0;o--){var s=e[o][r];if("object"==typeof s&&s)i.unshift(s);else if(void 0!==s){n[r]=s;break}}i.length&&(n[r]=Oe(i))}for(o=e.length-1;o>=0;o--){var a=e[o];for(var l in a)l in n||(n[l]=a[l])}return n}function Ne(e,t){var n={};for(var r in e)t(e[r],r)&&(n[r]=e[r]);return n}function Re(e,t){var n={};for(var r in e)n[r]=t(e[r],r);return n}function Pe(e){for(var t={},n=0,r=e;n<r.length;n++)t[r[n]]=!0;return t}function Fe(e){var t=[];for(var n in e)t.push(e[n]);return t}function je(e,t){if(e===t)return!0;for(var n in e)if(Le.call(e,n)&&!(n in t))return!1;for(var n in t)if(Le.call(t,n)&&e[n]!==t[n])return!1;return!0}function Ye(e,t){var n=[];for(var r in e)Le.call(e,r)&&(r in t||n.push(r));for(var r in t)Le.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)||!He(e[r],t[r],n[r]))return!1;for(var r in e)if(!(r in t))return!1;return!0}function He(e,t,n){return e===t||!0===n||!!n&&n(e,t)}function Be(e,t,n,r){void 0===t&&(t=0),void 0===r&&(r=1);var i=[];null==n&&(n=Object.keys(e).length);for(var o=t;o<n;o+=r){var s=e[o];void 0!==s&&i.push(s)}return i}function Ue(e,t,n){var r=n.dateEnv,i=n.pluginHooks,o=n.options,s=e.defs,a=e.instances;for(var l in a=Ne(a,(function(e){return!s[e.defId].recurringDef})),s){var c=s[l];if(c.recurringDef){var u=c.recurringDef.duration;u||(u=c.allDay?o.defaultAllDayEventDuration:o.defaultTimedEventDuration);for(var d=0,h=ze(c,u,t,r,i.recurringTypes);d<h.length;d++){var p=h[d],f=Ie(l,{start:p,end:r.add(p,u)});a[f.instanceId]=f}}}return{defs:s,instances:a}}function ze(e,t,n,r,i){var o=i[e.recurringDef.typeId].expand(e.recurringDef.typeData,{start:r.subtract(n.start,t),end:n.end},r);return e.allDay&&(o=o.map(xe)),o}var qe=["years","months","days","milliseconds"],We=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function $e(e,t){var n;return"string"==typeof e?function(e){var t=We.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?Ge(e):"number"==typeof e?Ge(((n={})[t||"milliseconds"]=e,n)):null}function Ge(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 Ke(e,t){return{years:e.years+t.years,months:e.months+t.months,days:e.days+t.days,milliseconds:e.milliseconds+t.milliseconds}}function Ze(e,t){return{years:e.years*t,months:e.months*t,days:e.days*t,milliseconds:e.milliseconds*t}}function Xe(e){return Je(e)/864e5}function Je(e){return 31536e6*e.years+2592e6*e.months+864e5*e.days+e.milliseconds}function Qe(e,t){for(var n=null,r=0;r<qe.length;r++){var i=qe[r];if(t[i]){var o=e[i]/t[i];if(!de(o)||null!==n&&n!==o)return null;n=o}else if(e[i])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 ce(e.getUTCHours(),2)+":"+ce(e.getUTCMinutes(),2)+":"+ce(e.getUTCSeconds(),2)}function rt(e,t){void 0===t&&(t=!1);var n=e<0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),o=Math.round(r%60);return t?n+ce(i,2)+":"+ce(o,2):"GMT"+n+i+(o?":"+ce(o,2):"")}function it(e,t,n){if(e===t)return!0;var r,i=e.length;if(i!==t.length)return!1;for(r=0;r<i;r++)if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1;return!0}function ot(e,t,n){var r,i;return function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(r){if(!it(r,o)){n&&n(i);var a=e.apply(this,o);t&&t(a,i)||(i=a)}}else i=e.apply(this,o);return r=o,i}}function st(e,t,n){var r,i;return function(o){if(r){if(!je(r,o)){n&&n(i);var s=e.call(this,o);t&&t(s,i)||(i=s)}}else i=e.call(this,o);return r=o,i}}var at={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},ct=/\s*([ap])\.?m\.?/i,ut=/,/g,dt=/\s+/g,ht=/\u200e/g,pt=/UTC|GMT/,ft=function(){function e(e){var t={},n={},r=0;for(var i in e)i in at?(n[i]=e[i],r=Math.max(at[i],r)):(t[i]=e[i],i in lt&&(r=Math.max(lt[i],r)));this.standardDateProps=t,this.extendedSettings=n,this.severity=r,this.buildFormattingFunc=ot(mt)}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 i=this.standardDateProps,o=this.extendedSettings,s=function(e,t,n){return n.getMarkerYear(e)!==n.getMarkerYear(t)?5:n.getMarkerMonth(e)!==n.getMarkerMonth(t)?4:n.getMarkerDay(e)!==n.getMarkerDay(t)?2:Ae(e)!==Ae(t)?1:0}(e.marker,t.marker,n.calendarSystem);if(!s)return this.format(e,n);var a=s;!(a>1)||"numeric"!==i.year&&"2-digit"!==i.year||"numeric"!==i.month&&"2-digit"!==i.month||"numeric"!==i.day&&"2-digit"!==i.day||(a=1);var l=this.format(e,n),c=this.format(t,n);if(l===c)return l;var u=mt(function(e,t){var n={};for(var r in e)(!(r in lt)||lt[r]<=t)&&(n[r]=e[r]);return n}(i,a),o,n),d=u(e),h=u(t),p=function(e,t,n,r){for(var i=0;i<e.length;){var o=e.indexOf(t,i);if(-1===o)break;var s=e.substr(0,o);i=o+t.length;for(var a=e.substr(i),l=0;l<n.length;){var c=n.indexOf(r,l);if(-1===c)break;var u=n.substr(0,c);l=c+r.length;var d=n.substr(l);if(s===u&&a===d)return{before:s,after:a}}}return null}(l,d,c,h),f=o.separator||r||n.defaultSeparator||"";return p?p.before+d+f+h+p.after:l+f+c},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 mt(e,t,n){var i=Object.keys(e).length;return 1===i&&"short"===e.timeZoneName?function(e){return rt(e.timeZoneOffset)}:0===i&&t.week?function(e){return function(e,t,n,r){var i=[];return"narrow"===r?i.push(t):"short"===r&&i.push(t," "),i.push(n.simpleNumberFormat.format(e)),"rtl"===n.options.direction&&i.reverse(),i.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 i,o=new Intl.DateTimeFormat(n.locale.codes,e);if(t.omitZeroMinute){var s=r({},e);delete s.minute,i=new Intl.DateTimeFormat(n.locale.codes,s)}return function(r){var s=r.marker;return function(e,t,n,r,i){return e=e.replace(ht,""),"short"===n.timeZoneName&&(e=function(e,t){var n=!1;return e=e.replace(pt,(function(){return n=!0,t})),n||(e+=" "+t),e}(e,"UTC"===i.timeZone||null==t.timeZoneOffset?"UTC":rt(t.timeZoneOffset))),r.omitCommas&&(e=e.replace(ut,"").trim()),r.omitZeroMinute&&(e=e.replace(":00","")),!1===r.meridiem?e=e.replace(ct,"").trim():"narrow"===r.meridiem?e=e.replace(ct,(function(e,t){return t.toLocaleLowerCase()})):"short"===r.meridiem?e=e.replace(ct,(function(e,t){return t.toLocaleLowerCase()+"m"})):"lowercase"===r.meridiem&&(e=e.replace(ct,(function(e){return e.toLocaleLowerCase()}))),(e=e.replace(dt," ")).trim()}((i&&!s.getUTCMinutes()?i:o).format(s),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 vt(e,t,n,r){var i=gt(e,n.calendarSystem);return{date:i,start:i,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,vt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return n.cmdFormatter(this.cmdStr,vt(e,t,n,r))},e}(),bt=function(){function e(e){this.func=e}return e.prototype.format=function(e,t,n){return this.func(vt(e,null,t,n))},e.prototype.formatRange=function(e,t,n,r){return this.func(vt(e,t,n,r))},e}();function _t(e){return"object"==typeof e&&e?new ft(e):"string"==typeof e?new yt(e):"function"==typeof e?new bt(e):void 0}var wt={navLinkDayClick:At,navLinkWeekClick:At,duration:$e,bootstrapFontAwesome:At,buttonIcons:At,customButtons:At,defaultAllDayEventDuration:$e,defaultTimedEventDuration:$e,nextDayThreshold:$e,scrollTime:$e,slotMinTime:$e,slotMaxTime:$e,dayPopoverFormat:_t,slotDuration:$e,snapDuration:$e,headerToolbar:At,footerToolbar:At,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:_t,dayHeaderClassNames:At,dayHeaderContent:At,dayHeaderDidMount:At,dayHeaderWillUnmount:At,dayCellClassNames:At,dayCellContent:At,dayCellDidMount:At,dayCellWillUnmount:At,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:At,weekNumbers:Boolean,weekNumberClassNames:At,weekNumberContent:At,weekNumberDidMount:At,weekNumberWillUnmount:At,editable:Boolean,viewClassNames:At,viewDidMount:At,viewWillUnmount:At,nowIndicator:Boolean,nowIndicatorClassNames:At,nowIndicatorContent:At,nowIndicatorDidMount:At,nowIndicatorWillUnmount:At,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:At,locale:At,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:At,eventOrder:oe,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:At,contentHeight:At,direction:String,weekNumberFormat:_t,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,progressiveEventRendering:Boolean,businessHours:At,initialDate:At,now:At,eventDataTransform:At,stickyHeaderDates:At,stickyFooterScrollbar:At,viewHeight:At,defaultAllDay:Boolean,eventSourceFailure:At,eventSourceSuccess:At,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:At,eventConstraint:At,eventAllow:At,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:At,eventContent:At,eventDidMount:At,eventWillUnmount:At,selectConstraint:At,selectOverlap:At,selectAllow:At,droppable:Boolean,unselectCancel:String,slotLabelFormat:At,slotLaneClassNames:At,slotLaneContent:At,slotLaneDidMount:At,slotLaneWillUnmount:At,slotLabelClassNames:At,slotLabelContent:At,slotLabelDidMount:At,slotLabelWillUnmount:At,dayMaxEvents:At,dayMaxEventRows:At,dayMinWidth:Number,slotLabelInterval:$e,allDayText:String,allDayClassNames:At,allDayContent:At,allDayDidMount:At,allDayWillUnmount:At,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:_t,rerenderDelay:Number,moreLinkText:At,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMinHeight:Number,slotEventOverlap:Boolean,plugins:At,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:$e,hiddenDays:At,monthMode:Boolean,fixedWeekCount:Boolean,validRange:At,visibleRange:At,titleFormat:At,noEventsText:String},xt={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},St={datesSet:At,eventsSet:At,eventAdd:At,eventChange:At,eventRemove:At,windowResize:At,eventClick:At,eventMouseEnter:At,eventMouseLeave:At,select:At,unselect:At,loading:At,_unmount:At,_beforeprint:At,_afterprint:At,_noEventDrop:At,_noEventResize:At,_resize:At,_scrollRequest:At},kt={buttonText:At,views:At,plugins:At,initialEvents:At,events:At,eventSources:At},Tt={headerToolbar:Et,footerToolbar:Et,buttonText:Et,buttonIcons:Et};function Et(e,t){return"object"==typeof e&&"object"==typeof t&&e&&t?je(e,t):e===t}var Ct={type:String,component:At,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:At,usesMinMaxTime:Boolean,classNames:At,content:At,didMount:At,willUnmount:At};function Dt(e){return Oe(e,Tt)}function Mt(e,t){var n={},r={};for(var i in t)i in e&&(n[i]=t[i](e[i]));for(var i in e)i in t||(r[i]=e[i]);return{refined:n,extra:r}}function At(e){return e}function It(e,t,n,r){for(var i={defs:{},instances:{}},o=$t(n),s=0,a=e;s<a.length;s++){var l=qt(a[s],t,n,r,o);l&&Lt(l,i)}return i}function Lt(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 Ot(e,t){var n=e.instances[t];if(n){var r=e.defs[n.defId],i=Rt(e,(function(e){return t=r,n=e,Boolean(t.groupId&&t.groupId===n.groupId);var t,n}));return i.defs[r.defId]=r,i.instances[n.instanceId]=n,i}return{defs:{},instances:{}}}function Nt(e,t){return{defs:r(r({},e.defs),t.defs),instances:r(r({},e.instances),t.instances)}}function Rt(e,t){var n=Ne(e.defs,t),r=Ne(e.instances,(function(e){return n[e.defId]}));return{defs:n,instances:r}}function Pt(e){return Array.isArray(e)?e:"string"==typeof e?e.split(/\s+/):[]}var Ft={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:At,overlap:At,allow:At,className:Pt,classNames:Pt,color:String,backgroundColor:String,borderColor:String,textColor:String};function jt(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 Yt(e){return e.reduce(Vt,Ht)}function Vt(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 Ht={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]},Bt={id:String,groupId:String,title:String,url:String},Ut={start:At,end:At,date:At,allDay:Boolean},zt=r(r(r({},Bt),Ut),{extendedProps:At});function qt(e,t,n,r,i){void 0===i&&(i=$t(n));var o=Wt(e,n,i),s=o.refined,a=o.extra,l=function(e,t){var n=null;return e&&(n=e.defaultAllDay),null==n&&(n=t.options.defaultAllDay),n}(t,n),c=function(e,t,n,r){for(var i=0;i<r.length;i++){var o=r[i].parse(e,n);if(o){var s=e.allDay;return null==s&&null==(s=t)&&null==(s=o.allDayGuess)&&(s=!1),{allDay:s,duration:o.duration,typeData:o.typeData,typeId:i}}}return null}(s,l,n.dateEnv,n.pluginHooks.recurringTypes);if(c)return(u=Gt(s,a,t?t.sourceId:"",c.allDay,Boolean(c.duration),n)).recurringDef={typeId:c.typeId,typeData:c.typeData,duration:c.duration},{def:u,instance:null};var u,d=function(e,t,n,r){var i,o,s=e.allDay,a=null,l=!1,c=null,u=null!=e.start?e.start:e.date;if(i=n.dateEnv.createMarkerMeta(u))a=i.marker;else if(!r)return null;return null!=e.end&&(o=n.dateEnv.createMarkerMeta(e.end)),null==s&&(s=null!=t?t:(!i||i.isTimeUnspecified)&&(!o||o.isTimeUnspecified)),s&&a&&(a=xe(a)),o&&(c=o.marker,s&&(c=xe(c)),a&&c<=a&&(c=null)),c?l=!0:r||(l=n.options.forceEventDuration||!1,c=n.dateEnv.add(a,s?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:s,hasEnd:l,range:{start:a,end:c},forcedStartTzo:i?i.forcedTzo:null,forcedEndTzo:o?o.forcedTzo:null}}(s,l,n,r);return d?{def:u=Gt(s,a,t?t.sourceId:"",d.allDay,d.hasEnd,n),instance:Ie(u.defId,d.range,d.forcedStartTzo,d.forcedEndTzo)}:null}function Wt(e,t,n){return void 0===n&&(n=$t(t)),Mt(e,n)}function $t(e){return r(r(r({},Ft),zt),e.pluginHooks.eventRefiners)}function Gt(e,t,n,i,o,s){for(var a={title:e.title||"",groupId:e.groupId||"",publicId:e.id||"",url:e.url||"",recurringDef:null,defId:J(),sourceId:n,allDay:i,hasEnd:o,ui:jt(e,s),extendedProps:r(r({},e.extendedProps||{}),t)},l=0,c=s.pluginHooks.eventDefMemberAdders;l<c.length;l++){var u=c[l];r(a,u(e))}return Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}function Kt(e){var t=Math.floor(ye(e.start,e.end))||1,n=xe(e.start);return{start:n,end:me(n,t)}}function Zt(e,t){void 0===t&&(t=$e(0));var n=null,r=null;if(e.end){r=xe(e.end);var i=e.end.valueOf()-r.valueOf();i&&i>=Je(t)&&(r=me(r,1))}return e.start&&(n=xe(e.start),r&&r<=n&&(r=me(n,1))),{start:n,end:r}}function Xt(e){var t=Zt(e);return ye(t.start,t.end)>1}function Jt(e,t,n,r){return"year"===r?$e(n.diffWholeYears(e,t),"year"):"month"===r?$e(n.diffWholeMonths(e,t),"month"):be(e,t)}function Qt(e,t){var n,r,i=[],o=t.start;for(e.sort(en),n=0;n<e.length;n++)(r=e[n]).start>o&&i.push({start:o,end:r.start}),r.end>o&&(o=r.end);return o<t.end&&i.push({start:o,end:t.end}),i}function en(e,t){return e.start.valueOf()-t.start.valueOf()}function tn(e,t){var n=e.start,r=e.end,i=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)&&(i={start:n,end:r}),i}function nn(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 rn(e,t){return(null===e.end||null===t.start||e.end>t.start)&&(null===e.start||null===t.end||e.start<t.end)}function on(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 an(e,t,n,r){var i={},o={},s={},a=[],l=[],c=dn(e.defs,t);for(var u in e.defs)"inverse-background"===(p=c[(_=e.defs[u]).defId]).display&&(_.groupId?(i[_.groupId]=[],s[_.groupId]||(s[_.groupId]=_)):o[u]=[]);for(var d in e.instances){var h=e.instances[d],p=c[(_=e.defs[h.defId]).defId],f=h.range,m=!_.allDay&&r?Zt(f,r):f,g=tn(m,n);g&&("inverse-background"===p.display?_.groupId?i[_.groupId].push(g):o[h.defId].push(g):"none"!==p.display&&("background"===p.display?a:l).push({def:_,ui:p,instance:h,range:g,isStart:m.start&&m.start.valueOf()===g.start.valueOf(),isEnd:m.end&&m.end.valueOf()===g.end.valueOf()}))}for(var v in i)for(var y=0,b=Qt(i[v],n);y<b.length;y++){var _,w=b[y];p=c[(_=s[v]).defId],a.push({def:_,ui:p,instance:null,range:w,isStart:!1,isEnd:!1})}for(var u in o)for(var x=0,S=Qt(o[u],n);x<S.length;x++)w=S[x],a.push({def:e.defs[u],ui:c[u],instance:null,range:w,isStart:!1,isEnd:!1});return{bg:a,fg:l}}function ln(e){return"background"===e.ui.display||"inverse-background"===e.ui.display}function cn(e,t){e.fcSeg=t}function un(e){return e.fcSeg||e.parentNode.fcSeg||null}function dn(e,t){return Re(e,(function(e){return hn(e,t)}))}function hn(e,t){var n=[];return t[""]&&n.push(t[""]),t[e.defId]&&n.push(t[e.defId]),n.push(e.ui),Yt(n)}function pn(e,t){var n=e.map(fn);return n.sort((function(e,n){return se(e,n,t)})),n.map((function(e){return e._seg}))}function fn(e){var t=e.eventRange,n=t.def,i=t.instance?t.instance.range:t.range,o=i.start?i.start.valueOf():0,s=i.end?i.end.valueOf():0;return r(r(r({},n.extendedProps),n),{id:n.publicId,start:o,end:s,duration:s-o,allDay:Number(n.allDay),_seg:e})}function mn(e,t){for(var n=t.pluginHooks.isDraggableTransformers,r=e.eventRange,i=r.def,o=r.ui,s=o.startEditable,a=0,l=n;a<l.length;a++)s=(0,l[a])(s,i,o,t);return s}function gn(e,t){return e.isStart&&e.eventRange.ui.durationEditable&&t.options.eventResizableFromStart}function vn(e,t){return e.isEnd&&e.eventRange.ui.durationEditable}function yn(e,t,n,r,i,o,s){var a=n.dateEnv,l=n.options,c=l.displayEventTime,u=l.displayEventEnd,d=e.eventRange.def,h=e.eventRange.instance;if(null==c&&(c=!1!==r),null==u&&(u=!1!==i),c&&!d.allDay&&(e.isStart||e.isEnd)){var p=o||(e.isStart?h.range.start:e.start||e.eventRange.range.start),f=s||(e.isEnd?h.range.end:e.end||e.eventRange.range.end);return u&&d.hasEnd?a.formatRange(p,f,t,{forcedStartTzo:o?null:h.forcedStartTzo,forcedEndTzo:s?null:h.forcedEndTzo}):a.format(p,t,{forcedTzo:o?null:h.forcedStartTzo})}return""}function bn(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 _n(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 wn(e){return e.instance?e.instance.instanceId:e.def.defId+":"+e.range.start.toISOString()}var xn={start:At,end:At,allDay:Boolean};function Sn(e,t,n){var i=function(e,t){var n=Mt(e,xn),i=n.refined,o=n.extra,s=i.start?t.createMarkerMeta(i.start):null,a=i.end?t.createMarkerMeta(i.end):null,l=i.allDay;return null==l&&(l=s&&s.isTimeUnspecified&&(!a||a.isTimeUnspecified)),r({range:{start:s?s.marker:null,end:a?a.marker:null},allDay:l},o)}(e,t),o=i.range;if(!o.start)return null;if(!o.end){if(null==n)return null;o.end=t.add(o.start,n)}return i}function kn(e,t){return nn(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({},En(e,t,n)),{timeZone:t.timeZone})}function En(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 Cn(e,t,n){n.emitter.trigger("select",r(r({},Dn(e,n)),{jsEvent:t?t.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function Dn(e,t){for(var n,i,o={},s=0,a=t.pluginHooks.dateSpanTransforms;s<a.length;s++){var l=a[s];r(o,l(e,t))}return r(o,(n=e,i=t.dateEnv,r(r({},En(n.range,i,n.allDay)),{allDay:n.allDay}))),o}function Mn(e,t,n){var r=n.dateEnv,i=n.options,o=t;return e?(o=xe(o),o=r.add(o,i.defaultAllDayEventDuration)):o=r.add(o,i.defaultTimedEventDuration),o}function An(e,t,n,r){var i=dn(e.defs,t),o={defs:{},instances:{}};for(var s in e.defs){var a=e.defs[s];o.defs[s]=In(a,i[s],n,r)}for(var l in e.instances){var c=e.instances[l];a=o.defs[c.defId],o.instances[l]=Ln(c,a,i[c.defId],n,r)}return o}function In(e,t,n,i){var o=n.standardProps||{};null==o.hasEnd&&t.durationEditable&&(n.startDelta||n.endDelta)&&(o.hasEnd=!0);var s=r(r(r({},e),o),{ui:r(r({},e.ui),o.ui)});n.extendedProps&&(s.extendedProps=r(r({},s.extendedProps),n.extendedProps));for(var a=0,l=i.pluginHooks.eventDefMutationAppliers;a<l.length;a++)(0,l[a])(s,n,i);return!s.hasEnd&&i.options.forceEventDuration&&(s.hasEnd=!0),s}function Ln(e,t,n,i,o){var s=o.dateEnv,a=i.standardProps&&!0===i.standardProps.allDay,l=i.standardProps&&!1===i.standardProps.hasEnd,c=r({},e);return a&&(c.range=Kt(c.range)),i.datesDelta&&n.startEditable&&(c.range={start:s.add(c.range.start,i.datesDelta),end:s.add(c.range.end,i.datesDelta)}),i.startDelta&&n.durationEditable&&(c.range={start:s.add(c.range.start,i.startDelta),end:c.range.end}),i.endDelta&&n.durationEditable&&(c.range={start:c.range.start,end:s.add(c.range.end,i.endDelta)}),l&&(c.range={start:c.range.start,end:Mn(t.allDay,c.range.start,o)}),t.allDay&&(c.range={start:xe(c.range.start),end:xe(c.range.end)}),c.range.end<c.range.start&&(c.range.end=Mn(t.allDay,c.range.start,o)),c}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}(),Nn={id:String,defaultAllDay:Boolean,url:String,events:At,eventDataTransform:At,success:At,failure:At};function Rn(e,t,n){var r;if(void 0===n&&(n=Pn(t)),"string"==typeof e?r={url:e}:"function"==typeof e||Array.isArray(e)?r={events:e}:"object"==typeof e&&e&&(r=e),r){var i=Mt(r,n),o=i.refined,s=i.extra,a=function(e,t){for(var n=t.pluginHooks.eventSourceDefs,r=n.length-1;r>=0;r--){var i=n[r].parseMeta(e);if(i)return{sourceDefId:r,meta:i}}return null}(o,t);if(a)return{_raw:e,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:o.defaultAllDay,eventDataTransform:o.eventDataTransform,success:o.success,failure:o.failure,publicId:o.id||"",sourceId:J(),sourceDefId:a.sourceDefId,meta:a.meta,ui:jt(o,t),extendedProps:s}}return null}function Pn(e){return r(r(r({},Ft),Nn),e.pluginHooks.eventSourceRefiners)}function Fn(e,t){return"function"==typeof e&&(e=e()),null==e?t.createNowMarker():t.createMarker(e)}var jn=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,i([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(),i=r.viewSpecs,o=r.toolbarConfig,s=[].concat(o.viewsWithButtons);for(var a in i)s.push(a);for(t=0;t<s.length;t++)if((n=i[s[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:Fn(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=$e(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),_t(t))},e.prototype.formatRange=function(e,t,n){var r=this.getCurrentData().dateEnv;return r.formatRange(r.createMarker(e),r.createMarker(t),_t(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(),i=Sn(n,r.dateEnv,$e({days:1}));i&&(this.dispatch({type:"SELECT_DATES",selection:i}),Cn(i,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 Yn){var n=e._def,r=e._instance;return this.getCurrentData().eventStore.defs[n.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:Lt({def:n,instance:r})}),this.triggerEventAdd(e)),e}var i,o=this.getCurrentData();if(t instanceof j)i=t.internalEventSource;else if("boolean"==typeof t)t&&(i=Fe(o.eventSources)[0]);else if(null!=t){var s=this.getEventSourceById(t);if(!s)return console.warn('Could not find an event source with ID "'+t+'"'),null;i=s.internalEventSource}var a=qt(e,i,o,!1);if(a){var l=new Yn(o,a.def,a.def.recurringDef?null:a.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:Lt(a)}),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:Vn(e)})}})},e.prototype.getEventById=function(e){var t=this.getCurrentData(),n=t.eventStore,r=n.defs,i=n.instances;for(var o in e=String(e),r){var s=r[o];if(s.publicId===e){if(s.recurringDef)return new Yn(t,s,null);for(var a in i){var l=i[a];if(l.defId===s.defId)return new Yn(t,s,l)}}}return null},e.prototype.getEvents=function(){var e=this.getCurrentData();return Hn(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 j(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 j(t,n[r]);return null},e.prototype.addEventSource=function(e){var t=this.getCurrentData();if(e instanceof j)return t.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;var n=Rn(e,t);return n?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[n]}),new j(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=$e(e);t&&this.trigger("_scrollRequest",{time:t})},e}(),Yn=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 Ut)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 Ft){var i=Ft[e](t);"color"===e?i={backgroundColor:t,borderColor:t}:"editable"===e?i={startEditable:t,durationEditable:t}:((r={})[e]=t,i=r),this.mutate({standardProps:{ui:i}})}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 i=Jt(this._instance.range.start,r,n,t.granularity);t.maintainDuration?this.mutate({datesDelta:i}):this.mutate({startDelta:i})}},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 i=Jt(this._instance.range.end,n,r,t.granularity);this.mutate({endDelta:i})}else this.mutate({standardProps:{hasEnd:!1}})},e.prototype.setDates=function(e,t,n){void 0===n&&(n={});var r,i,o,s=this._context.dateEnv,a={allDay:n.allDay},l=s.createMarker(e);if(l&&(null==t||(r=s.createMarker(t)))&&this._instance){var c=this._instance.range;!0===n.allDay&&(c=Kt(c));var u=Jt(c.start,l,s,n.granularity);if(r){var d=Jt(c.end,r,s,n.granularity);o=d,(i=u).years===o.years&&i.months===o.months&&i.days===o.days&&i.milliseconds===o.milliseconds?this.mutate({datesDelta:u,standardProps:a}):this.mutate({startDelta:u,endDelta:d,standardProps:a})}else a.hasEnd=!1,this.mutate({datesDelta:u,standardProps:a})}},e.prototype.moveStart=function(e){var t=$e(e);t&&this.mutate({startDelta:t})},e.prototype.moveEnd=function(e){var t=$e(e);t&&this.mutate({endDelta:t})},e.prototype.moveDates=function(e){var t=$e(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=_t(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,i=this._context,o=Ot(i.getCurrentData().eventStore,n.instanceId);o=An(o,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},t,i);var s=new e(i,r,n);this._def=o.defs[r.defId],this._instance=o.instances[n.instanceId],i.dispatch({type:"MERGE_EVENTS",eventStore:o}),i.emitter.trigger("eventChange",{oldEvent:s,event:this,relatedEvents:Hn(o,i,n),revert:function(){i.dispatch({type:"REMOVE_EVENTS",eventStore:o})}})}},e.prototype.remove=function(){var e=this._context,t=Vn(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 j(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,i=this.startStr,o=this.endStr,s={};return t.title&&(s.title=t.title),i&&(s.start=i),o&&(s.end=o),t.publicId&&(s.id=t.publicId),t.groupId&&(s.groupId=t.groupId),t.url&&(s.url=t.url),n.display&&"auto"!==n.display&&(s.display=n.display),e.collapseColor&&n.backgroundColor&&n.backgroundColor===n.borderColor?s.color=n.backgroundColor:(n.backgroundColor&&(s.backgroundColor=n.backgroundColor),n.borderColor&&(s.borderColor=n.borderColor)),n.textColor&&(s.textColor=n.textColor),n.classNames.length&&(s.classNames=n.classNames),Object.keys(t.extendedProps).length&&(e.collapseExtendedProps?r(s,t.extendedProps):s.extendedProps=t.extendedProps),s},e.prototype.toJSON=function(){return this.toPlainObject()},e}();function Vn(e){var t,n,r=e._def,i=e._instance;return{defs:(t={},t[r.defId]=r,t),instances:i?(n={},n[i.instanceId]=i,n):{}}}function Hn(e,t,n){var r=e.defs,i=e.instances,o=[],s=n?n.instanceId:"";for(var a in i){var l=i[a],c=r[l.defId];l.instanceId!==s&&o.push(new Yn(t,c,l))}return o}var Bn,Un={},zn=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 De(e)},e.prototype.markerToArray=function(e){return Ce(e)},e}();Bn=zn,Un.gregory=Bn;var qn=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function Wn(e){var t=qn.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(Me(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 $n=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 Un[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()):De(Te(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=De(e)),null!==t&&Me(t)?{marker:t,isTimeUnspecified:!1,forcedTzo:null}:null},e.prototype.parse=function(e){var t=Wn(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 Ae(e)===Ae(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 Ae(e)===Ae(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=_e(e,t))?{unit:"week",value:n}:null!==(n=we(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/(Xe(n)/365):n.months&&null!==(r=this.diffWholeMonths(e,t))?r/function(e){return Xe(e)/30}(n):n.days&&null!==(r=we(e,t))?r/Xe(n):(t.valueOf()-e.valueOf())/Je(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?xe(e):"hour"===t?function(e){return De([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours()])}(e):"minute"===t?function(e){return De([e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes()])}(e):"second"===t?function(e){return De([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(),i=Se(e,r,t,n);if(i<1)return Se(e,r-1,t,n);var o=Se(e,r+1,t,n);return o>=1?Math.min(i,o):i}(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?De(Te(new Date(e))):"UTC"!==this.timeZone&&this.namedTimeZoneImpl?De(this.namedTimeZoneImpl.timestampToArray(e)):new Date(e)},e.prototype.offsetForMarker=function(e){return"local"===this.timeZone?-Ee(Ce(e)).getTimezoneOffset():"UTC"===this.timeZone?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Ce(e)):null},e.prototype.toDate=function(e,t){return"local"===this.timeZone?Ee(Ce(e)):"UTC"===this.timeZone?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-1e3*this.namedTimeZoneImpl.offsetForArray(Ce(e))*60):new Date(e.valueOf()-(t||0))},e}(),Gn=[],Kn={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 Zn(e){for(var t=e.length>0?e[0].code:"en",n=Gn.concat(e),r={en:Kn},i=0,o=n;i<o.length;i++){var s=o[i];r[s.code]=s}return{map:r,defaultCode:t}}function Xn(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("-"),i=r.length;i>0;i--){var o=r.slice(0,i).join("-");if(t[o])return t[o]}return null}(n,t)||Kn;return Jn(e,n,r)}(e,t):Jn(e.code,[e.code],e)}function Jn(e,t,n){var r=Oe([Kn,n],["buttonText"]);delete r.code;var i=r.week;return delete r.week,{codeArg:e,codes:t,week:i,simpleNumberFormat:new Intl.NumberFormat(e),options:r}}function Qn(e){var t=Xn(e.locale||"en",Zn([]).map);return new $n(r(r({timeZone:xt.timeZone,calendarSystem:"gregory"},e),{locale:t}))}var er,tr={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function nr(e,t){return It(function(e){return(!0===e?[{}]:Array.isArray(e)?e.filter((function(e){return e.daysOfWeek})):"object"==typeof e&&e?[e]:[]).map((function(e){return r(r({},tr),e)}))}(e),null,t)}function rr(e,t){return e.left>=t.left&&e.left<t.right&&e.top>=t.top&&e.top<t.bottom}function ir(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 or(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 sr(e){return{left:(e.left+e.right)/2,top:(e.top+e.bottom)/2}}function ar(e,t){return{left:e.left-t.left,top:e.top-t.top}}function lr(){return null==er&&(er=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}()),er}var cr={defs:{},instances:{}},ur=function(){function e(){this.getKeysForEventDefs=ot(this._getKeysForEventDefs),this.splitDateSelection=ot(this._splitDateSpan),this.splitEventStore=ot(this._splitEventStore),this.splitIndividualUi=ot(this._splitIndividualUi),this.splitEventDrag=ot(this._splitInteraction),this.splitEventResize=ot(this._splitInteraction),this.eventUiBuilders={}}return e.prototype.splitProps=function(e){var t=this,n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),i=this.splitDateSelection(e.dateSelection),o=this.splitIndividualUi(e.eventUiBases,r),s=this.splitEventStore(e.eventStore,r),a=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),c={};for(var u in this.eventUiBuilders=Re(n,(function(e,n){return t.eventUiBuilders[n]||ot(dr)})),n){var d=n[u],h=s[u]||cr,p=this.eventUiBuilders[u];c[u]={businessHours:d.businessHours||e.businessHours,dateSelection:i[u]||null,eventStore:h,eventUiBases:p(e.eventUiBases[""],d.ui,o[u]),eventSelection:h.instances[e.eventSelection]?e.eventSelection:"",eventDrag:a[u]||null,eventResize:l[u]||null}}return c},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 Re(e.defs,(function(e){return t.getKeysForEventDef(e)}))},e.prototype._splitEventStore=function(e,t){var n=e.defs,r=e.instances,i={};for(var o in n)for(var s=0,a=t[o];s<a.length;s++)i[h=a[s]]||(i[h]={defs:{},instances:{}}),i[h].defs[o]=n[o];for(var l in r)for(var c=r[l],u=0,d=t[c.defId];u<d.length;u++){var h;i[h=d[u]]&&(i[h].instances[l]=c)}return i},e.prototype._splitIndividualUi=function(e,t){var n={};for(var r in e)if(r)for(var i=0,o=t[r];i<o.length;i++){var s=o[i];n[s]||(n[s]={}),n[s][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),i=this._splitEventStore(e.mutatedEvents,r),o=function(r){t[r]||(t[r]={affectedEvents:n[r]||cr,mutatedEvents:i[r]||cr,isEvent:e.isEvent})};for(var s in n)o(s);for(var s in i)o(s)}return t},e}();function dr(e,t,n){var i=[];e&&i.push(e),t&&i.push(t);var o={"":Yt(i)};return n&&r(o,n),o}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 pr(e,t){var n=["fc-day","fc-day-"+pe[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 fr(e,t){return void 0===t&&(t="day"),JSON.stringify({date:tt(e),type:t})}var mr,gr=null;function vr(){return null===gr&&(gr=function(){var e=document.createElement("div");z(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 Y(e),t}()),gr}function yr(){return mr||(mr=function(){var e=document.createElement("div");e.style.overflow="scroll",document.body.appendChild(e);var t=br(e);return document.body.removeChild(e),t}()),mr}function br(e){return{x:e.offsetHeight-e.clientHeight,y:e.offsetWidth-e.clientWidth}}function _r(e,t){void 0===t&&(t=!1);var n=window.getComputedStyle(e),r=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,o=parseInt(n.borderTopWidth,10)||0,s=parseInt(n.borderBottomWidth,10)||0,a=br(e),l=a.y-r-i,c={borderLeft:r,borderRight:i,borderTop:o,borderBottom:s,scrollbarBottom:a.x-o-s,scrollbarLeft:0,scrollbarRight:0};return vr()&&"rtl"===n.direction?c.scrollbarLeft=l:c.scrollbarRight=l,t&&(c.paddingLeft=parseInt(n.paddingLeft,10)||0,c.paddingRight=parseInt(n.paddingRight,10)||0,c.paddingTop=parseInt(n.paddingTop,10)||0,c.paddingBottom=parseInt(n.paddingBottom,10)||0),c}function wr(e,t,n){void 0===t&&(t=!1);var r=n?e.getBoundingClientRect():xr(e),i=_r(e,t),o={left:r.left+i.borderLeft+i.scrollbarLeft,right:r.right-i.borderRight-i.scrollbarRight,top:r.top+i.borderTop,bottom:r.bottom-i.borderBottom-i.scrollbarBottom};return t&&(o.left+=i.paddingLeft,o.right-=i.paddingRight,o.top+=i.paddingTop,o.bottom-=i.paddingBottom),o}function xr(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 Sr(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 kr(e,t,n){var r=!1,i=function(){r||(r=!0,t.apply(this,arguments))},o=function(){r||(r=!0,n&&n.apply(this,arguments))},s=e(i,o);s&&"function"==typeof s.then&&s.then(i,o)}var Tr=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]||[],i=this.options&&this.options[e],o=0,s=[].concat(i||[],r);o<s.length;o++){s[o].apply(this.thisContext,t)}},e.prototype.hasHandlers=function(e){return this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e]},e}(),Er=function(){function e(e,t,n,r){this.els=t;var i=this.originClientRect=e.getBoundingClientRect();n&&this.buildElHorizontals(i.left),r&&this.buildElVerticals(i.top)}return e.prototype.buildElHorizontals=function(e){for(var t=[],n=[],r=0,i=this.els;r<i.length;r++){var o=i[r].getBoundingClientRect();t.push(o.left-e),n.push(o.right-e)}this.lefts=t,this.rights=n},e.prototype.buildElVerticals=function(e){for(var t=[],n=[],r=0,i=this.els;r<i.length;r++){var o=i[r].getBoundingClientRect();t.push(o.top-e),n.push(o.bottom-e)}this.tops=t,this.bottoms=n},e.prototype.leftToIndex=function(e){var t,n=this.lefts,r=this.rights,i=n.length;for(t=0;t<i;t++)if(e>=n[t]&&e<r[t])return t},e.prototype.topToIndex=function(e){var t,n=this.tops,r=this.bottoms,i=n.length;for(t=0;t<i;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}(),Cr=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}(),Dr=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}(Cr),Mr=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}(Cr),Ar=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(Ar.prototype.classes={},Ar.prototype.iconClasses={},Ar.prototype.baseIconClass="",Ar.prototype.iconOverridePrefix="","undefined"==typeof FullCalendarVDom)throw new Error("Please import the top-level fullcalendar lib before attempting to import a plugin.");var Ir=FullCalendarVDom.Component,Lr=FullCalendarVDom.createElement,Or=FullCalendarVDom.render,Nr=FullCalendarVDom.createRef,Rr=FullCalendarVDom.Fragment,Pr=FullCalendarVDom.createContext,Fr=FullCalendarVDom.flushToDom,jr=function(){function e(e,t,n){var i=this;this.execFunc=e,this.emitter=t,this.scrollTime=n,this.handleScrollRequest=function(e){i.queuedRequest=r({},i.queuedRequest||{},e),i.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}(),Yr=Pr({});function Vr(e,t,n,r,i,o,s,a,l,c,u,d,h){return{dateEnv:i,options:n,pluginHooks:s,emitter:c,dispatch:a,getCurrentData:l,calendarApi:u,viewSpec:e,viewApi:t,dateProfileGenerator:r,theme:o,isRtl:"rtl"===n.direction,addResizeHandler:function(e){c.on("_resize",e)},removeResizeHandler:function(e){c.off("_resize",e)},createScrollResponder:function(e){return new jr(e,c,$e(n.scrollTime))},registerInteractiveComponent:d,unregisterInteractiveComponent:h}}var Hr=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(Ye(e,this.props),Ye(t,this.state)),!Ve(this.props,e,this.propEquality)||!Ve(this.state,t,this.stateEquality)},t.addPropsEquality=Ur,t.addStateEquality=zr,t.contextType=Yr,t}(Ir);Hr.prototype.propEquality={},Hr.prototype.stateEquality={};var Br=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.contextType=Yr,t}(Hr);function Ur(e){var t=Object.create(this.prototype.propEquality);r(t,e),this.prototype.propEquality=t}function zr(e){var t=Object.create(this.prototype.stateEquality);r(t,e),this.prototype.stateEquality=t}function qr(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function Wr(e,t){var n;if(t){n=[];for(var r=0,i=e;r<i.length;r++){var o=i[r],s=t(o);s?n.push(s):null==s&&n.push(o)}}else n=e;return n}function $r(e,t){return Rt(e,(function(e){return e.sourceId!==t}))}function Gr(e,t){return Kr({eventDrag:e},t)}function Kr(e,t){var n=t.getCurrentData(),i=r({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},e);return(t.pluginHooks.isPropsValid||Zr)(i,t)}function Zr(e,t,n,i){return void 0===n&&(n={}),!(e.eventDrag&&!function(e,t,n,i){var o=t.getCurrentData(),s=e.eventDrag,a=s.mutatedEvents,l=a.defs,c=a.instances,u=dn(l,s.isEvent?e.eventUiBases:{"":o.selectionConfig});i&&(u=Re(u,i));var d,h,p=(d=e.eventStore,h=s.affectedEvents.instances,{defs:d.defs,instances:Ne(d.instances,(function(e){return!h[e.instanceId]}))}),f=p.defs,m=p.instances,g=dn(f,e.eventUiBases);for(var v in c){var y=c[v],b=y.range,_=u[y.defId],w=l[y.defId];if(!Xr(_.constraints,b,p,e.businessHours,t))return!1;var x=t.options.eventOverlap,S="function"==typeof x?x:null;for(var k in m){var T=m[k];if(rn(b,T.range)){if(!1===g[T.defId].overlap&&s.isEvent)return!1;if(!1===_.overlap)return!1;if(S&&!S(new Yn(t,f[T.defId],T),new Yn(t,w,y)))return!1}}for(var E=o.eventStore,C=0,D=_.allows;C<D.length;C++){var M,A=D[C],I=r(r({},n),{range:y.range,allDay:w.allDay}),L=E.defs[w.defId],O=E.instances[v];if(M=L?new Yn(t,L,O):new Yn(t,w),!A(Dn(I,t),M))return!1}}return!0}(e,t,n,i)||e.dateSelection&&!function(e,t,n,i){var o=e.eventStore,s=o.defs,a=o.instances,l=e.dateSelection,c=l.range,u=t.getCurrentData().selectionConfig;if(i&&(u=i(u)),!Xr(u.constraints,c,o,e.businessHours,t))return!1;var d=t.options.selectOverlap,h="function"==typeof d?d:null;for(var p in a){var f=a[p];if(rn(c,f.range)){if(!1===u.overlap)return!1;if(h&&!h(new Yn(t,s[f.defId],f),null))return!1}}for(var m=0,g=u.allows;m<g.length;m++){if(!(0,g[m])(Dn(r(r({},n),l),t),null))return!1}return!0}(e,t,n,i))}function Xr(e,t,n,r,i){for(var o=0,s=e;o<s.length;o++)if(!ei(Jr(s[o],t,n,r,i),t))return!1;return!0}function Jr(e,t,n,r,i){return"businessHours"===e?Qr(Ue(r,t,i)):"string"==typeof e?Qr(Rt(n,(function(t){return t.groupId===e}))):"object"==typeof e&&e?Qr(Ue(e,t,i)):[]}function Qr(e){var t=e.instances,n=[];for(var r in t)n.push(t[r].range);return n}function ei(e,t){for(var n=0,r=e;n<r.length;n++)if(on(r[n],t))return!0;return!1}var ti=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.uid=J(),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(!on(t.validRange,n[r].range))return!1;return Gr(e,this.context)},t.prototype.isDateSelectionValid=function(e){var t=this.props.dateProfile;return!(t&&!on(t.validRange,e.range))&&Kr({dateSelection:e},this.context)},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}(Br);function ni(e){return{id:J(),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||{}}}var ri=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Ar);function ii(e,t,n,i){if(t[e])return t[e];var o=function(e,t,n,i){var o=n[e],s=i[e],a=function(e){return o&&null!==o[e]?o[e]:s&&null!==s[e]?s[e]:null},l=a("component"),c=a("superType"),u=null;if(c){if(c===e)throw new Error("Can't have a custom view type that references itself");u=ii(c,t,n,i)}return!l&&u&&(l=u.component),l?{type:e,component:l,defaults:r(r({},u?u.defaults:{}),o?o.rawOptions:{}),overrides:r(r({},u?u.overrides:{}),s?s.rawOptions:{})}:null}(e,t,n,i);return o&&(t[e]=o),o}ri.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},ri.prototype.baseIconClass="fc-icon",ri.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"},ri.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},ri.prototype.iconOverrideOption="buttonIcons",ri.prototype.iconOverrideCustomButtonOption="icon",ri.prototype.iconOverridePrefix="fc-icon-";var oi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Nr(),t.handleRootEl=function(e){qr(t.rootElRef,e),t.props.elRef&&qr(t.props.elRef,e)},t}return n(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.hookProps;return Lr(ci,{hookProps:n,didMount:t.didMount,willUnmount:t.willUnmount,elRef:this.handleRootEl},(function(r){return Lr(ai,{hookProps:n,content:t.content,defaultContent:t.defaultContent,backupElRef:e.rootElRef},(function(e,i){return t.children(r,di(t.classNames,n),e,i)}))}))},t}(Br),si=Pr(0);function ai(e){return Lr(si.Consumer,null,(function(t){return Lr(li,r({renderId:t},e))}))}var li=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.innerElRef=Nr(),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=hi(t.content,t.hookProps),i=null;if(void 0===r&&(r=hi(t.defaultContent,t.hookProps)),void 0!==r){if(n)n.contentVal=r[n.contentKey];else if("object"==typeof r)for(var o in e)if(void 0!==r[o]){n=this.customContentInfo={contentKey:o,contentVal:r[o],handler:e[o]()};break}i=n?[]:r}return i},t.prototype.updateCustomContent=function(){this.customContentInfo&&this.customContentInfo.handler(this.innerElRef.current||this.props.backupElRef.current,this.customContentInfo.contentVal)},t}(Br),ci=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&qr(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}(Br);function ui(){var e,t,n=[];return function(r,i){return t&&je(t,i)&&r===e||(e=r,t=i,n=di(r,i)),n}}function di(e,t){return"function"==typeof e&&(e=e(t)),Pt(e)}function hi(e,t){return"function"==typeof e?e(t,Lr):e}var pi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.normalizeClassNames=ui(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r={view:t.viewApi},i=this.normalizeClassNames(n.viewClassNames,r);return Lr(ci,{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(i))}))},t}(Br);function fi(e){return Re(e,mi)}function mi(e){var t,n="function"==typeof e?{component:e}:e,i=n.component;return n.content&&(t=n,i=function(e){return Lr(Yr.Consumer,null,(function(n){return Lr(pi,{viewSpec:n.viewSpec},(function(i,o){var s=r(r({},e),{nextDayThreshold:n.options.nextDayThreshold});return Lr(oi,{hookProps:s,classNames:t.classNames,content:t.content,didMount:t.didMount,willUnmount:t.willUnmount,elRef:i},(function(e,t,n,r){return Lr("div",{className:o.concat(t).join(" "),ref:e},r)}))}))}))}),{superType:n.type,component:i,rawOptions:n}}function gi(e,t,n,i){var o=fi(e),s=fi(t.views);return Re(function(e,t){var n,r={};for(n in e)ii(n,r,e,t);for(n in t)ii(n,r,e,t);return r}(o,s),(function(e){return function(e,t,n,i,o){var s=e.overrides.duration||e.defaults.duration||i.duration||n.duration,a=null,l="",c="",u={};if(s&&(a=function(e){var t=JSON.stringify(e),n=vi[t];return void 0===n&&(n=$e(e),vi[t]=n),n}(s))){var d=et(a);l=d.unit,1===d.value&&(c=l,u=t[l]?t[l].rawOptions:{})}var h=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[c]?n[c]:void 0};return{type:e.type,component:e.component,duration:a,durationUnit:l,singleUnit:c,optionDefaults:e.defaults,optionOverrides:r(r({},u),e.overrides),buttonTextOverride:h(i)||h(n)||e.overrides.buttonText,buttonTextDefault:h(o)||e.defaults.buttonText||h(xt)||e.type}}(e,s,t,n,i)}))}var vi={},yi=function(){function e(e){this.props=e,this.nowDate=Fn(e.nowInput,e.dateEnv),this.initHiddenDays()}return e.prototype.buildPrev=function(e,t,n){var r=this.props.dateEnv,i=r.subtract(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,-1,n)},e.prototype.buildNext=function(e,t,n){var r=this.props.dateEnv,i=r.add(r.startOf(t,e.currentRangeUnit),e.dateIncrement);return this.build(i,1,n)},e.prototype.build=function(e,t,n){void 0===n&&(n=!0);var r,i,o,s,a,l,c,u,d=this.props;return r=this.buildValidRange(),r=this.trimHiddenDays(r),n&&(c=e,e=null!=(u=r).start&&c<u.start?u.start:null!=u.end&&c>=u.end?new Date(u.end.valueOf()-1):c),i=this.buildCurrentRangeInfo(e,t),o=/^(year|month|week|day)$/.test(i.unit),s=this.buildRenderRange(this.trimHiddenDays(i.range),i.unit,o),a=s=this.trimHiddenDays(s),d.showNonCurrentDates||(a=tn(a,i.range)),a=tn(a=this.adjustActiveRange(a),r),l=rn(i.range,r),{validRange:r,currentRange:i.range,currentRangeUnit:i.unit,isRangeAllDay:o,activeRange:a,renderRange:s,slotMinTime:d.slotMinTime,slotMaxTime:d.slotMaxTime,isValid:l,dateIncrement:this.buildDateIncrement(i.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,i=null,o=null,s=null;return r.duration?(i=r.duration,o=r.durationUnit,s=this.buildRangeFromDuration(e,t,i,o)):(n=this.props.dayCount)?(o="day",s=this.buildRangeFromDayCount(e,t,n)):(s=this.buildCustomVisibleRange(e))?o=r.dateEnv.greatestWholeUnit(s.start,s.end).unit:(o=et(i=this.getFallbackDuration()).unit,s=this.buildRangeFromDuration(e,t,i,o)),{duration:i,unit:o,range:s}},e.prototype.getFallbackDuration=function(){return $e({day:1})},e.prototype.adjustActiveRange=function(e){var t=this.props,n=t.dateEnv,r=t.usesMinMaxTime,i=t.slotMinTime,o=t.slotMaxTime,s=e.start,a=e.end;return r&&(Xe(i)<0&&(s=xe(s),s=n.add(s,i)),Xe(o)>1&&(a=me(a=xe(a),-1),a=n.add(a,o))),{start:s,end:a}},e.prototype.buildRangeFromDuration=function(e,t,n,r){var i,o,s,a=this.props,l=a.dateEnv,c=a.dateAlignment;if(!c){var u=this.props.dateIncrement;c=u&&Je(u)<Je(n)?et(u).unit:r}function d(){i=l.startOf(e,c),o=l.add(i,n),s={start:i,end:o}}return Xe(n)<=1&&this.isHiddenDay(i)&&(i=xe(i=this.skipHiddenDays(i,t))),d(),this.trimHiddenDays(s)||(e=this.skipHiddenDays(e,t),d()),s},e.prototype.buildRangeFromDayCount=function(e,t,n){var r,i=this.props,o=i.dateEnv,s=i.dateAlignment,a=0,l=e;s&&(l=o.startOf(l,s)),l=xe(l),r=l=this.skipHiddenDays(l,t);do{r=me(r,1),this.isHiddenDay(r)||a++}while(a<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,i=this.refineRange(r);return!i||null!=i.start&&null!=i.end?i:null},e.prototype.buildRenderRange=function(e,t,n){return e},e.prototype.buildDateIncrement=function(e){var t;return this.props.dateIncrement||((t=this.props.dateAlignment)?$e(1,t):e||$e({days:1}))},e.prototype.refineRange=function(e){if(e){var t=(n=e,r=this.props.dateEnv,i=null,o=null,n.start&&(i=r.createMarker(n.start)),n.end&&(o=r.createMarker(n.end)),i||o?i&&o&&o<i?null:{start:i,end:o}:null);return t&&(t=Zt(t)),t}var n,r,i,o;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=me(e,t);return e},e}();function bi(e){var t=0;for(var n in e)e[n].isFetching&&t++;return t}function _i(e,t,n,i){for(var o={},s=0,a=t;s<a.length;s++){var l=a[s];o[l.sourceId]=l}return n&&(o=wi(o,n,i)),r(r({},e),o)}function wi(e,t,n){return xi(e,Ne(e,(function(e){return function(e,t,n){return Ti(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 xi(e,t,n,r){var i={};for(var o in e){var s=e[o];t[o]?i[o]=Si(s,n,r):i[o]=s}return i}function Si(e,t,n){var i=n.options,o=n.calendarApi,s=n.pluginHooks.eventSourceDefs[e.sourceDefId],a=J();return s.fetch({eventSource:e,range:t,context:n},(function(r){var s=r.rawEvents;i.eventSourceSuccess&&(s=i.eventSourceSuccess.call(o,s,r.xhr)||s),e.success&&(s=e.success.call(o,s,r.xhr)||s),n.dispatch({type:"RECEIVE_EVENTS",sourceId:e.sourceId,fetchId:a,fetchRange:t,rawEvents:s})}),(function(r){console.warn(r.message,r),i.eventSourceFailure&&i.eventSourceFailure.call(o,r),e.failure&&e.failure(r),n.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:e.sourceId,fetchId:a,fetchRange:t,error:r})})),r(r({},e),{isFetching:!0,latestFetchId:a})}function ki(e,t){return Ne(e,(function(e){return Ti(e,t)}))}function Ti(e,t){return!t.pluginHooks.eventSourceDefs[e.sourceDefId].ignoreRange}function Ei(e,t){switch(t.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return t.selection;default:return e}}function Ci(e,t){switch(t.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return t.eventInstanceId;default:return e}}function Di(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 Mi(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 Ai(e,t,n,r,i){var o=[];return{headerToolbar:e.headerToolbar?Ii(e.headerToolbar,e,t,n,r,i,o):null,footerToolbar:e.footerToolbar?Ii(e.footerToolbar,e,t,n,r,i,o):null,viewsWithButtons:o}}function Ii(e,t,n,r,i,o,s){return Re(e,(function(e){return function(e,t,n,r,i,o,s){var a="rtl"===t.direction,l=t.customButtons||{},c=n.buttonText||{},u=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,h=void 0,p=void 0;return(t=l[e])?(d=function(e){t.click&&t.click.call(e.target,e,e.target)},(h=r.getCustomButtonIconClass(t))||(h=r.getIconClass(e,a))||(p=t.text)):(n=i[e])?(s.push(e),d=function(){o.changeView(e)},(p=n.buttonTextOverride)||(h=r.getIconClass(e,a))||(p=n.buttonTextDefault)):o[e]&&(d=function(){o[e]()},(p=c[e])||(h=r.getIconClass(e,a))||(p=u[e])),{buttonName:e,buttonClick:d,buttonIcon:h,buttonText:p}}))}))}(e,t,n,r,i,o,s)}))}function Li(e,t,n,r,i){var o=null;"GET"===(e=e.toUpperCase())?t=function(e,t){return e+(-1===e.indexOf("?")?"?":"&")+Oi(t)}(t,n):o=Oi(n);var s=new XMLHttpRequest;s.open(e,t,!0),"GET"!==e&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.onload=function(){if(s.status>=200&&s.status<400){var e=!1,t=void 0;try{t=JSON.parse(s.responseText),e=!0}catch(e){}e?r(t,s):i("Failure parsing JSON",s)}else i("Request failed",s)},s.onerror=function(){i("Request failed",s)},s.send(o)}function Oi(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")}function Ni(e,t){for(var n=Fe(t.getCurrentData().eventSources),r=[],i=0,o=e;i<o.length;i++){for(var s=o[i],a=!1,l=0;l<n.length;l++)if(n[l]._raw===s){n.splice(l,1),a=!0;break}a||r.push(s)}for(var c=0,u=n;c<u.length;c++){var d=u[c];t.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:d.sourceId})}for(var h=0,p=r;h<p.length;h++){var f=p[h];t.calendarApi.addEventSource(f)}}var Ri=[ni({eventSourceDefs:[{ignoreRange:!0,parseMeta:function(e){return Array.isArray(e.events)?e.events:null},fetch:function(e,t){t({rawEvents:e.eventSource.meta})}}]}),ni({eventSourceDefs:[{parseMeta:function(e){return"function"==typeof e.events?e.events:null},fetch:function(e,t,n){var r=e.context.dateEnv;kr(e.eventSource.meta.bind(null,Tn(e.range,r)),(function(e){t({rawEvents:e})}),n)}}]}),ni({eventSourceRefiners:{method:String,extraParams:At,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 i=e.eventSource.meta,o=function(e,t,n){var i,o,s,a,l=n.dateEnv,c=n.options,u={};return null==(i=e.startParam)&&(i=c.startParam),null==(o=e.endParam)&&(o=c.endParam),null==(s=e.timeZoneParam)&&(s=c.timeZoneParam),a="function"==typeof e.extraParams?e.extraParams():e.extraParams||{},r(u,a),u[i]=l.formatIso(t.start),u[o]=l.formatIso(t.end),"local"!==l.timeZone&&(u[s]=l.timeZone),u}(i,e.range,e.context);Li(i.method,i.url,o,(function(e,n){t({rawEvents:e,xhr:n})}),(function(e,t){n({message:e,xhr:t})}))}}]}),ni({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&&(i=e.endTime,o=e.startTime,r={years:i.years-o.years,months:i.months-o.months,days:i.days-o.days,milliseconds:i.milliseconds-o.milliseconds}),{allDayGuess:Boolean(!e.startTime&&!e.endTime),duration:r,typeData:n}}var i,o;return null},expand:function(e,t,n){var r=tn(t,{start:e.startRecur,end:e.endRecur});return r?function(e,t,n,r){for(var i=e?Pe(e):null,o=xe(n.start),s=n.end,a=[];o<s;){var l=void 0;i&&!i[o.getUTCDay()]||(l=t?r.add(o,t):o,a.push(l)),o=me(o,1)}return a}(e.daysOfWeek,e.startTime,r,n):[]}}],eventRefiners:{daysOfWeek:At,startTime:$e,endTime:$e,duration:$e,startRecur:At,endRecur:At}}),ni({optionChangeHandlers:{events:function(e,t){Ni([e],t)},eventSources:Ni}}),ni({contentTypeHandlers:{html:function(){return Pi},domNodes:function(){return Fi}},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",Hn(e,t))}}})];function Pi(e,t){e.innerHTML=t}function Fi(e,t){var n=Array.prototype.slice.call(e.childNodes),r=Array.prototype.slice.call(t);if(!it(n,r)){for(var i=0,o=r;i<o.length;i++){var s=o[i];e.appendChild(s)}n.forEach(Y)}}var ji=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;e in n&&((t||--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}(),Yi=function(){function e(e,t){this.runTaskOption=e,this.drainedOption=t,this.queue=[],this.delayedRunner=new ji(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 Vi(e,t,n){var r;return r=/^(year|month)$/.test(e.currentRangeUnit)?e.currentRange:e.activeRange,n.formatRange(r.start,r.end,_t(t.titleFormat||function(e){var t=e.currentRangeUnit;if("year"===t)return{year:"numeric"};if("month"===t)return{year:"numeric",month:"long"};var n=we(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 Hi=function(){function e(e){var t=this;this.computeOptionsData=ot(this._computeOptionsData),this.computeCurrentViewData=ot(this._computeCurrentViewData),this.organizeRawLocales=ot(Zn),this.buildLocale=ot(Xn),this.buildPluginHooks=function(){var e,t=[],n=[];return function(i,o){return e&&it(i,t)&&it(o,n)||(e=function(e,t){var n={},i={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 o(e){for(var t=0,s=e;t<s.length;t++){var a=s[t];n[a.id]||(n[a.id]=!0,o(a.deps),c=a,i={reducers:(l=i).reducers.concat(c.reducers),contextInit:l.contextInit.concat(c.contextInit),eventRefiners:r(r({},l.eventRefiners),c.eventRefiners),eventDefMemberAdders:l.eventDefMemberAdders.concat(c.eventDefMemberAdders),eventSourceRefiners:r(r({},l.eventSourceRefiners),c.eventSourceRefiners),isDraggableTransformers:l.isDraggableTransformers.concat(c.isDraggableTransformers),eventDragMutationMassagers:l.eventDragMutationMassagers.concat(c.eventDragMutationMassagers),eventDefMutationAppliers:l.eventDefMutationAppliers.concat(c.eventDefMutationAppliers),dateSelectionTransformers:l.dateSelectionTransformers.concat(c.dateSelectionTransformers),datePointTransforms:l.datePointTransforms.concat(c.datePointTransforms),dateSpanTransforms:l.dateSpanTransforms.concat(c.dateSpanTransforms),views:r(r({},l.views),c.views),viewPropsTransformers:l.viewPropsTransformers.concat(c.viewPropsTransformers),isPropsValid:c.isPropsValid||l.isPropsValid,externalDefTransforms:l.externalDefTransforms.concat(c.externalDefTransforms),eventResizeJoinTransforms:l.eventResizeJoinTransforms.concat(c.eventResizeJoinTransforms),viewContainerAppends:l.viewContainerAppends.concat(c.viewContainerAppends),eventDropTransformers:l.eventDropTransformers.concat(c.eventDropTransformers),calendarInteractions:l.calendarInteractions.concat(c.calendarInteractions),componentInteractions:l.componentInteractions.concat(c.componentInteractions),themeClasses:r(r({},l.themeClasses),c.themeClasses),eventSourceDefs:l.eventSourceDefs.concat(c.eventSourceDefs),cmdFormatter:c.cmdFormatter||l.cmdFormatter,recurringTypes:l.recurringTypes.concat(c.recurringTypes),namedTimeZonedImpl:c.namedTimeZonedImpl||l.namedTimeZonedImpl,initialView:l.initialView||c.initialView,elementDraggingImpl:l.elementDraggingImpl||c.elementDraggingImpl,optionChangeHandlers:r(r({},l.optionChangeHandlers),c.optionChangeHandlers),scrollGridImpl:c.scrollGridImpl||l.scrollGridImpl,contentTypeHandlers:r(r({},l.contentTypeHandlers),c.contentTypeHandlers),listenerRefiners:r(r({},l.listenerRefiners),c.listenerRefiners),optionRefiners:r(r({},l.optionRefiners),c.optionRefiners),propSetHandlers:r(r({},l.propSetHandlers),c.propSetHandlers)})}var l,c}return e&&o(e),o(t),i}(i,o)),t=i,n=o,e}}(),this.buildDateEnv=ot(Bi),this.buildTheme=ot(Ui),this.parseToolbars=ot(Ai),this.buildViewSpecs=ot(gi),this.buildDateProfileGenerator=st(zi),this.buildViewApi=ot(qi),this.buildViewUiProps=st(Gi),this.buildEventUiBySource=ot(Wi,je),this.buildEventUiBases=ot($i),this.parseContextBusinessHours=st(Ki),this.buildTitle=ot(Vi),this.emitter=new Tr,this.actionRunner=new Yi(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={},i=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),o=i.calendarOptions.initialView||i.pluginHooks.initialView,s=this.computeCurrentViewData(o,i,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(s.options);var a,l,c,u=(a=i.calendarOptions,l=i.dateEnv,null!=(c=a.initialDate)?l.createMarker(c):Fn(a.now,l)),d=s.dateProfileGenerator.build(u);sn(d.activeRange,u)||(u=d.currentRange.start);for(var h={dateEnv:i.dateEnv,options:i.calendarOptions,pluginHooks:i.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},p=0,f=i.pluginHooks.contextInit;p<f.length;p++)(0,f[p])(h);for(var m=function(e,t,n){var r=t?t.activeRange:null;return _i({},function(e,t){var n=Pn(t),r=[].concat(e.eventSources||[]),i=[];e.initialEvents&&r.unshift(e.initialEvents),e.events&&r.unshift(e.events);for(var o=0,s=r;o<s.length;o++){var a=Rn(s[o],t,n);a&&i.push(a)}return i}(e,n),r,n)}(i.calendarOptions,d,h),g={dynamicOptionOverrides:n,currentViewType:o,currentDate:u,dateProfile:d,businessHours:this.parseContextBusinessHours(h),eventSources:m,eventUiBases:{},loadingLevel:bi(m),eventStore:{defs:{},instances:{}},renderableEventStore:{defs:{},instances:{}},dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(h).selectionConfig},v=r(r({},h),g),y=0,b=i.pluginHooks.reducers;y<b.length;y++){var _=b[y];r(g,_(null,null,v))}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,i=this.emitter,o=function(e,t){var n;return"SET_OPTION"===t.type?r(r({},e),((n={})[t.optionName]=t.rawOptionValue,n)):e}(n.dynamicOptionOverrides,e),s=this.computeOptionsData(t.optionOverrides,o,t.calendarApi),a=function(e,t){return"CHANGE_VIEW_TYPE"===t.type?t.viewType:e}(n.currentViewType,e),l=this.computeCurrentViewData(a,s,t.optionOverrides,o);t.calendarApi.currentDataManager=this,i.setThisContext(t.calendarApi),i.setOptions(l.options);var c={dateEnv:s.dateEnv,options:s.calendarOptions,pluginHooks:s.pluginHooks,calendarApi:t.calendarApi,dispatch:this.dispatch,emitter:i,getCurrentData:this.getCurrentData},u=n.currentDate,d=n.dateProfile;this.data&&this.data.dateProfileGenerator!==l.dateProfileGenerator&&(d=l.dateProfileGenerator.build(u)),d=function(e,t,n,r){var i;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((i=r.buildPrev(e,n)).isValid)return i;break;case"NEXT":if((i=r.buildNext(e,n)).isValid)return i}return e}(d,e,u=function(e,t){return"CHANGE_DATE"===t.type?t.dateMarker:e}(u,e),l.dateProfileGenerator),sn(d.currentRange,u)||(u=d.currentRange.start);for(var h=function(e,t,n,i){var o,s,a=n?n.activeRange:null;switch(t.type){case"ADD_EVENT_SOURCES":return _i(e,t.sources,a,i);case"REMOVE_EVENT_SOURCE":return o=e,s=t.sourceId,Ne(o,(function(e){return e.sourceId!==s}));case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?wi(e,a,i):e;case"FETCH_EVENT_SOURCES":return xi(e,t.sourceIds?Pe(t.sourceIds):ki(e,i),a,i);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return function(e,t,n,i){var o,s=e[t];return s&&n===s.latestFetchId?r(r({},e),((o={})[t]=r(r({},s),{isFetching:!1,fetchRange:i}),o)):e}(e,t.sourceId,t.fetchId,t.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return e}}(n.eventSources,e,d,c),p=bi(h),f=function(e,t,n,r,i){switch(t.type){case"RECEIVE_EVENTS":return function(e,t,n,r,i,o){if(t&&n===t.latestFetchId){var s=It(function(e,t,n){var r=n.options.eventDataTransform,i=t?t.eventDataTransform:null;return i&&(e=Wr(e,i)),r&&(e=Wr(e,r)),e}(i,t,o),t,o);return r&&(s=Ue(s,r,o)),Nt($r(e,t.sourceId),s)}return e}(e,n[t.sourceId],t.fetchId,t.fetchRange,t.rawEvents,i);case"ADD_EVENTS":return function(e,t,n,r){return n&&(t=Ue(t,n,r)),Nt(e,t)}(e,t.eventStore,r?r.activeRange:null,i);case"MERGE_EVENTS":return Nt(e,t.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Ue(e,r.activeRange,i):e;case"REMOVE_EVENTS":return function(e,t){var n=e.defs,r=e.instances,i={},o={};for(var s in n)t.defs[s]||(i[s]=n[s]);for(var a in r)!t.instances[a]&&i[r[a].defId]&&(o[a]=r[a]);return{defs:i,instances:o}}(e,t.eventStore);case"REMOVE_EVENT_SOURCE":return $r(e,t.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return Rt(e,(function(e){return!e.sourceId}));case"REMOVE_ALL_EVENTS":return{defs:{},instances:{}};default:return e}}(n.eventStore,e,h,d,c),m=p&&!l.options.progressiveEventRendering&&n.renderableEventStore||f,g=this.buildViewUiProps(c),v=g.eventUiSingleBase,y=g.selectionConfig,b=this.buildEventUiBySource(h),_=this.buildEventUiBases(m.defs,v,b),w=n.loadingLevel||0,x=p,S={dynamicOptionOverrides:o,currentViewType:a,currentDate:u,dateProfile:d,eventSources:h,eventStore:f,renderableEventStore:m,selectionConfig:y,eventUiBases:_,loadingLevel:x,businessHours:this.parseContextBusinessHours(c),dateSelection:Ei(n.dateSelection,e),eventSelection:Ci(n.eventSelection,e),eventDrag:Di(n.eventDrag,e),eventResize:Mi(n.eventResize,e)},k=r(r({},c),S),T=0,E=s.pluginHooks.reducers;T<E.length;T++){var C=E[T];r(S,C(n,e,k))}!w&&x?i.trigger("loading",!0):w&&!x&&i.trigger("loading",!1),this.state=S,t.onAction&&t.onAction(e)},e.prototype.updateData=function(){var e,t,n,i,o,s,a,l,c,u=this.props,d=this.state,h=this.data,p=this.computeOptionsData(u.optionOverrides,d.dynamicOptionOverrides,u.calendarApi),f=this.computeCurrentViewData(d.currentViewType,p,u.optionOverrides,d.dynamicOptionOverrides),m=this.data=r(r(r({viewTitle:this.buildTitle(d.dateProfile,f.options,p.dateEnv),calendarApi:u.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},p),f),d),g=p.pluginHooks.optionChangeHandlers,v=h&&h.calendarOptions,y=p.calendarOptions;if(v&&v!==y)for(var b in v.timeZone!==y.timeZone&&(d.eventSources=m.eventSources=(s=m.eventSources,l=m,c=(a=d.dateProfile)?a.activeRange:null,xi(s,ki(s,l),c,l)),d.eventStore=m.eventStore=(e=m.eventStore,t=h.dateEnv,n=m.dateEnv,i=e.defs,o=Re(e.instances,(function(e){var o=i[e.defId];return o.allDay||o.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:i,instances:o})),g)v[b]!==y[b]&&g[b](y[b],m);u.onData&&u.onData(m)},e.prototype._computeOptionsData=function(e,t,n){var r=this.processRawCalendarOptions(e,t),i=r.refinedOptions,o=r.pluginHooks,s=r.localeDefaults,a=r.availableLocaleData;Zi(r.extra);var l=this.buildDateEnv(i.timeZone,i.locale,i.weekNumberCalculation,i.firstDay,i.weekText,o,a,i.defaultRangeSeparator),c=this.buildViewSpecs(o.views,e,t,s),u=this.buildTheme(i,o);return{calendarOptions:i,pluginHooks:o,dateEnv:l,viewSpecs:c,theme:u,toolbarConfig:this.parseToolbars(i,e,u,c,n),localeDefaults:s,availableRawLocales:a.map}},e.prototype.processRawCalendarOptions=function(e,t){var n=Dt([xt,e,t]),i=n.locales,o=n.locale,s=this.organizeRawLocales(i),a=s.map,l=this.buildLocale(o||s.defaultCode,a).options,c=this.buildPluginHooks(e.plugins||[],Ri),u=this.currentCalendarOptionsRefiners=r(r(r(r(r({},wt),St),kt),c.listenerRefiners),c.optionRefiners),d={},h=Dt([xt,l,e,t]),p={},f=this.currentCalendarOptionsInput,m=this.currentCalendarOptionsRefined,g=!1;for(var v in h)"plugins"!==v&&(h[v]===f[v]||Tt[v]&&v in f&&Tt[v](f[v],h[v])?p[v]=m[v]:u[v]?(p[v]=u[v](h[v]),g=!0):d[v]=f[v]);return g&&(this.currentCalendarOptionsInput=h,this.currentCalendarOptionsRefined=p),{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:c,availableLocaleData:s,localeDefaults:l,extra:d}},e.prototype._computeCurrentViewData=function(e,t,n,r){var i=t.viewSpecs[e];if(!i)throw new Error('viewType "'+e+"\" is not available. Please make sure you've loaded all neccessary plugins");var o=this.processRawViewOptions(i,t.pluginHooks,t.localeDefaults,n,r),s=o.refinedOptions;return Zi(o.extra),{viewSpec:i,options:s,dateProfileGenerator:this.buildDateProfileGenerator({dateProfileGeneratorClass:i.optionDefaults.dateProfileGeneratorClass,duration:i.duration,durationUnit:i.durationUnit,usesMinMaxTime:i.optionDefaults.usesMinMaxTime,dateEnv:t.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:s.slotMinTime,slotMaxTime:s.slotMaxTime,showNonCurrentDates:s.showNonCurrentDates,dayCount:s.dayCount,dateAlignment:s.dateAlignment,dateIncrement:s.dateIncrement,hiddenDays:s.hiddenDays,weekends:s.weekends,nowInput:s.now,validRangeInput:s.validRange,visibleRangeInput:s.visibleRange,monthMode:s.monthMode,fixedWeekCount:s.fixedWeekCount}),viewApi:this.buildViewApi(e,this.getCurrentData,t.dateEnv)}},e.prototype.processRawViewOptions=function(e,t,n,i,o){var s=Dt([xt,e.optionDefaults,n,i,e.optionOverrides,o]),a=r(r(r(r(r(r({},wt),St),kt),Ct),t.listenerRefiners),t.optionRefiners),l={},c=this.currentViewOptionsInput,u=this.currentViewOptionsRefined,d=!1,h={};for(var p in s)s[p]===c[p]?l[p]=u[p]:(s[p]===this.currentCalendarOptionsInput[p]?p in this.currentCalendarOptionsRefined&&(l[p]=this.currentCalendarOptionsRefined[p]):a[p]?l[p]=a[p](s[p]):h[p]=s[p],d=!0);return d&&(this.currentViewOptionsInput=s,this.currentViewOptionsRefined=l),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:h}},e}();function Bi(e,t,n,r,i,o,s,a){var l=Xn(t||s.defaultCode,s.map);return new $n({calendarSystem:"gregory",timeZone:e,namedTimeZoneImpl:o.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:o.cmdFormatter,defaultSeparator:a})}function Ui(e,t){return new(t.themeClasses[e.themeSystem]||ri)(e)}function zi(e){return new(e.dateProfileGeneratorClass||yi)(e)}function qi(e,t,n){return new On(e,t,n)}function Wi(e){return Re(e,(function(e){return e.ui}))}function $i(e,t,n){var r={"":t};for(var i in e){var o=e[i];o.sourceId&&n[o.sourceId]&&(r[i]=n[o.sourceId])}return r}function Gi(e){var t=e.options;return{eventUiSingleBase:jt({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:jt({constraint:t.selectConstraint,overlap:"boolean"==typeof t.selectOverlap?t.selectOverlap:void 0,allow:t.selectAllow},e)}}function Ki(e){return nr(e.options.businessHours,e)}function Zi(e,t){for(var n in e)console.warn("Unknown option '"+n+"'"+(t?" for view '"+t+"'":""))}var Xi=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 Hi({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}(Ir),Ji=function(){function e(e){this.component=e.component}return e.prototype.destroy=function(){},e}();function Qi(e){var t;return(t={})[e.component.uid]=e,t}var eo={},to=function(){function e(e,t){this.emitter=new Tr}return e.prototype.destroy=function(){},e.prototype.setMirrorIsVisible=function(e){},e.prototype.setMirrorNeedsRevert=function(e){},e.prototype.setAutoScrollEnabled=function(e){},e}(),no={},ro={startTime:$e,duration:$e,create:Boolean,sourceId:String};function io(e){var t=Mt(e,ro),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 oo=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,i=n.extraClassName,o=!1,s=r.center;return r.left?(o=!0,e=r.left):e=r.start,r.right?(o=!0,t=r.right):t=r.end,Lr("div",{className:[i||"","fc-toolbar",o?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",e||[]),this.renderSection("center",s||[]),this.renderSection("end",t||[]))},t.prototype.renderSection=function(e,t){var n=this.props;return Lr(so,{key:e,widgetGroups:t,title:n.title,activeButton:n.activeButton,isTodayEnabled:n.isTodayEnabled,isPrevEnabled:n.isPrevEnabled,isNextEnabled:n.isNextEnabled})},t}(Br),so=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 Lr.apply(void 0,i(["div",{className:"fc-toolbar-chunk"}],t))},t.prototype.renderWidgetGroup=function(e){for(var t=this.props,n=this.context.theme,o=[],s=!0,a=0,l=e;a<l.length;a++){var c=l[a],u=c.buttonName,d=c.buttonClick,h=c.buttonText,p=c.buttonIcon;if("title"===u)s=!1,o.push(Lr("h2",{className:"fc-toolbar-title"},t.title));else{var f=p?{"aria-label":u}:{},m=["fc-"+u+"-button",n.getClass("button")];u===t.activeButton&&m.push(n.getClass("buttonActive"));var g=!t.isTodayEnabled&&"today"===u||!t.isPrevEnabled&&"prev"===u||!t.isNextEnabled&&"next"===u;o.push(Lr("button",r({disabled:g,className:m.join(" "),onClick:d,type:"button"},f),h||(p?Lr("span",{className:p}):"")))}}if(o.length>1){var v=s&&n.getClass("buttonGroup")||"";return Lr.apply(void 0,i(["div",{className:v}],o))}return o[0]},t}(Br),ao=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,qr(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"],i="",o="";return n?null!==t.availableWidth?i=t.availableWidth/n:o=1/n*100+"%":i=e.height||"",Lr("div",{ref:this.handleEl,onClick:e.onClick,className:r.join(" "),style:{height:i,paddingBottom:o}},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}(Br),lo=function(e){function t(t){var n=e.call(this,t)||this;return n.handleSegClick=function(e,t){var r=n.component,i=r.context,o=un(t);if(o&&r.isValidSegDownEl(e.target)){var s=V(e.target,".fc-event-forced-url"),a=s?s.querySelector("a[href]").href:"";i.emitter.trigger("eventClick",{el:t,event:new Yn(r.context,o.eventRange.def,o.eventRange.instance),jsEvent:e,view:i.viewApi}),a&&!e.defaultPrevented&&(window.location.href=a)}},n.destroy=G(t.el,"click",".fc-event",n.handleSegClick),n}return n(t,e),t}(Ji),co=function(e){function t(t){var n,r,i,o,s=e.call(this,t)||this;return s.handleEventElRemove=function(e){e===s.currentSegEl&&s.handleSegLeave(null,s.currentSegEl)},s.handleSegEnter=function(e,t){un(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,".fc-event",r=s.handleSegEnter,i=s.handleSegLeave,G(n,"mouseover",".fc-event",(function(e,t){if(t!==o){o=t,r(e,t);var n=function(e){o=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,i=r.context,o=un(n);t&&!r.isValidSegDownEl(t.target)||i.emitter.trigger(e,{el:n,event:new Yn(i,o.eventRange.def,o.eventRange.instance),jsEvent:t,view:i.viewApi})},t}(Ji),uo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildViewContext=ot(Vr),t.buildViewPropTransformers=ot(po),t.buildToolbarProps=ot(ho),t.handleNavLinkClick=$("a[data-navlink]",t._handleNavLinkClick.bind(t)),t.headerRef=Nr(),t.footerRef=Nr(),t.interactionsStore={},t.registerInteractiveComponent=function(e,n){var r=function(e,t){return{component:e,el:t.el,useEventCenter:null==t.useEventCenter||t.useEventCenter}}(e,n),i=[lo,co].concat(t.props.pluginHooks.componentInteractions).map((function(e){return new e(r)}));t.interactionsStore[e.uid]=i,eo[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 eo[e.uid]},t.resizeRunner=new ji((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,i=t.options,o=this.buildToolbarProps(t.viewSpec,t.dateProfile,t.dateProfileGenerator,t.currentDate,Fn(t.options.now,t.dateEnv),t.viewTitle),s=!1,a="";t.isHeightAuto||t.forPrint?a="":null!=i.height?s=!0:null!=i.contentHeight?a=i.contentHeight:e=Math.max(i.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 Lr(Yr.Provider,{value:l},n.headerToolbar&&Lr(oo,r({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.headerToolbar},o)),Lr(ao,{liquid:s,height:a,aspectRatio:e,onClick:this.handleNavLinkClick},this.renderView(t),this.buildAppendContent()),n.footerToolbar&&Lr(oo,r({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footerToolbar},o)))},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,i=n.options,o=n.calendarApi,s=t.getAttribute("data-navlink");s=s?JSON.parse(s):{};var a=r.createMarker(s.date),l=s.type,c="day"===l?i.navLinkDayClick:"week"===l?i.navLinkWeekClick:null;"function"==typeof c?c.call(o,r.toDate(a),e):("string"==typeof c&&(l=c),o.zoomTo(a,l))},t.prototype.buildAppendContent=function(){var e=this.props,t=e.pluginHooks.viewContainerAppends.map((function(t){return t(e)}));return Lr.apply(void 0,i([Rr,{}],t))},t.prototype.renderView=function(e){for(var t=e.pluginHooks,n=e.viewSpec,i={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},o=0,s=this.buildViewPropTransformers(t.viewPropsTransformers);o<s.length;o++){var a=s[o];r(i,a.transform(i,e))}var l=n.component;return Lr(l,r({},i))},t}(Hr);function ho(e,t,n,r,i,o){var s=n.build(i,void 0,!1),a=n.buildPrev(t,r,!1),l=n.buildNext(t,r,!1);return{title:o,activeButton:e.type,isTodayEnabled:s.isValid&&!sn(t.currentRange,i),isPrevEnabled:a.isValid,isNextEnabled:l.isValid}}function po(e){return e.map((function(e){return new e}))}var fo=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,i=r||null==t.height?"":t.height,o=["fc",n?"fc-media-print":"fc-media-screen","fc-direction-"+t.direction,e.theme.getClass("root")];return lr()||o.push("fc-liquid-hack"),e.children(o,i,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}(Br);function mo(e,t){return _t(!e||t>10?{weekday:"short"}:t>1?{weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}:{weekday:"long"})}var go="fc-col-header-cell",vo=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,i=e.theme,o=e.viewApi,s=this.props,a=s.date,l=s.dateProfile,c=hr(a,s.todayRange,null,l),u=[go].concat(pr(c,i)),d=t.format(a,s.dayHeaderFormat),h=n.navLinks&&!c.isDisabled&&s.colCnt>1?{"data-navlink":fr(a),tabIndex:0}:{},p=r(r(r({date:t.toDate(a),view:o},s.extraHookProps),{text:d}),c);return Lr(oi,{hookProps:p,classNames:n.dayHeaderClassNames,content:n.dayHeaderContent,defaultContent:bo,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},(function(e,t,n,i){return Lr("th",r({ref:e,className:u.concat(t).join(" "),"data-date":c.isDisabled?void 0:tt(a),colSpan:s.colSpan},s.extraDataAttrs),Lr("div",{className:"fc-scrollgrid-sync-inner"},!c.isDisabled&&Lr("a",r({ref:n,className:["fc-col-header-cell-cushion",s.isSticky?"fc-sticky":""].join(" ")},h),i)))}))},t}(Br),yo=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,i=t.theme,o=t.viewApi,s=t.options,a=me(new Date(2592e5),e.dow),l={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},c=[go].concat(pr(l,i),e.extraClassNames||[]),u=n.format(a,e.dayHeaderFormat),d=r(r(r(r({date:a},l),{view:o}),e.extraHookProps),{text:u});return Lr(oi,{hookProps:d,classNames:s.dayHeaderClassNames,content:s.dayHeaderContent,defaultContent:bo,didMount:s.dayHeaderDidMount,willUnmount:s.dayHeaderWillUnmount},(function(t,n,i,o){return Lr("th",r({ref:t,className:c.concat(n).join(" "),colSpan:e.colSpan},e.extraDataAttrs),Lr("div",{className:"fc-scrollgrid-sync-inner"},Lr("a",{className:["fc-col-header-cell-cushion",e.isSticky?"fc-sticky":""].join(" "),ref:i},o)))}))},t}(Br);function bo(e){return e.text}var _o=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.initialNowDate=Fn(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),i=t.dateEnv.add(r,$e(1,e.unit)),o=i.valueOf()-n.valueOf();return{currentState:{nowDate:r,todayRange:wo(r)},nextState:{nowDate:i,todayRange:wo(i)},waitMs:o}},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=Yr,t}(Ir);function wo(e){var t=xe(e);return{start:t,end:me(t,1)}}var xo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.createDayHeaderFormatter=ot(So),t}return n(t,e),t.prototype.render=function(){var e=this.context,t=this.props,n=t.dates,r=t.dateProfile,i=t.datesRepDistinctDays,o=t.renderIntro,s=this.createDayHeaderFormatter(e.options.dayHeaderFormat,i,n.length);return Lr(_o,{unit:"day"},(function(e,t){return Lr("tr",null,o&&o(),n.map((function(e){return i?Lr(vo,{key:e.toISOString(),date:e,dateProfile:r,todayRange:t,colCnt:n.length,dayHeaderFormat:s}):Lr(yo,{key:e.getUTCDay(),dow:e.getUTCDay(),dayHeaderFormat:s})})))}))},t}(Br);function So(e,t,n){return e||mo(t,n)}var ko=function(){function e(e,t){for(var n=e.start,r=e.end,i=[],o=[],s=-1;n<r;)t.isHiddenDay(n)?i.push(s+.5):(s++,i.push(s),o.push(n)),n=me(n,1);this.dates=o,this.indices=i,this.cnt=o.length}return e.prototype.sliceRange=function(e){var t=this.getDateDayIndex(e.start),n=this.getDateDayIndex(me(e.end,-1)),r=Math.max(0,t),i=Math.min(this.cnt-1,n);return(r=Math.ceil(r))<=(i=Math.floor(i))?{firstIndex:r,lastIndex:i,isStart:t===r,isEnd:n===i}: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}(),To=function(){function e(e,t){var n,r,i,o=e.dates;if(t){for(r=o[0].getUTCDay(),n=1;n<o.length&&o[n].getUTCDay()!==r;n++);i=Math.ceil(o.length/n)}else i=1,n=o.length;this.rowCnt=i,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 i=n.firstIndex,o=n.lastIndex,s=i;s<=o;){var a=Math.floor(s/t),l=Math.min((a+1)*t,o+1);r.push({row:a,firstCol:s%t,lastCol:(l-1)%t,isStart:n.isStart&&s===i,isEnd:n.isEnd&&l-1===o}),s=l}return r},e}(),Eo=function(){function e(){this.sliceBusinessHours=ot(this._sliceBusinessHours),this.sliceDateSelection=ot(this._sliceDateSpan),this.sliceEventStore=ot(this._sliceEventStore),this.sliceEventDrag=ot(this._sliceInteraction),this.sliceEventResize=ot(this._sliceInteraction),this.forceDayIfListItem=!1}return e.prototype.sliceProps=function(e,t,n,r){for(var o=[],s=4;s<arguments.length;s++)o[s-4]=arguments[s];var a=e.eventUiBases,l=this.sliceEventStore.apply(this,i([e.eventStore,a,t,n],o));return{dateSelectionSegs:this.sliceDateSelection.apply(this,i([e.dateSelection,a,r],o)),businessHourSegs:this.sliceBusinessHours.apply(this,i([e.businessHours,t,n,r],o)),fgEventSegs:l.fg,bgEventSegs:l.bg,eventDrag:this.sliceEventDrag.apply(this,i([e.eventDrag,a,t,n],o)),eventResize:this.sliceEventResize.apply(this,i([e.eventResize,a,t,n],o)),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,i([{range:{start:e,end:ge(e,1)},allDay:!1},{},t],n))},e.prototype._sliceBusinessHours=function(e,t,n,r){for(var o=[],s=4;s<arguments.length;s++)o[s-4]=arguments[s];return e?this._sliceEventStore.apply(this,i([Ue(e,Co(t,Boolean(n)),r),{},t,n],o)).bg:[]},e.prototype._sliceEventStore=function(e,t,n,r){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];if(e){var s=an(e,t,Co(n,Boolean(r)),r);return{bg:this.sliceEventRanges(s.bg,i),fg:this.sliceEventRanges(s.fg,i)}}return{bg:[],fg:[]}},e.prototype._sliceInteraction=function(e,t,n,r){for(var i=[],o=4;o<arguments.length;o++)i[o-4]=arguments[o];if(!e)return null;var s=an(e.mutatedEvents,t,Co(n,Boolean(r)),r);return{segs:this.sliceEventRanges(s.fg,i),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}},e.prototype._sliceDateSpan=function(e,t,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];if(!e)return[];for(var s=function(e,t,n){var r=Wt({editable:!1},n),i=Gt(r.refined,r.extra,"",e.allDay,!0,n);return{def:i,ui:hn(i,t),instance:Ie(i.defId,e.range),range:e.range,isStart:!0,isEnd:!0}}(e,t,n),a=this.sliceRange.apply(this,i([e.range],r)),l=0,c=a;l<c.length;l++){c[l].eventRange=s}return a},e.prototype.sliceEventRanges=function(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];n.push.apply(n,this.sliceEventRange(o,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:me(n.start,1)});for(var r=this.sliceRange.apply(this,i([n],t)),o=0,s=r;o<s.length;o++){var a=s[o];a.eventRange=e,a.isStart=e.isStart&&a.isStart,a.isEnd=e.isEnd&&a.isEnd}return r},e}();function Co(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 Do=/^(visible|hidden)$/,Mo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleEl=function(e){t.el=e,qr(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,i=["fc-scroller"];return t&&(n?i.push("fc-scroller-liquid-absolute"):i.push("fc-scroller-liquid")),Lr("div",{ref:this.handleEl,className:i.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(Do.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(Do.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 Do.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight},t.prototype.getYScrollbarWidth=function(){return Do.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth},t}(Br),Ao=function(){function e(e){var t=this;this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=function(e,n){var r=t,i=r.depths,o=r.currentMap,s=!1,a=!1;null!==e?(s=n in o,o[n]=e,i[n]=(i[n]||0)+1,a=!0):0==--i[n]&&(delete o[n],delete t.callbackMap[n],s=!0),t.masterCallback&&(s&&t.masterCallback(null,String(n)),a&&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 Be(this.currentMap,e,t,n)},e.prototype.getAll=function(){return Fe(this.currentMap)},e}();function Io(e){for(var t=0,n=0,r=B(e,".fc-scrollgrid-shrink");n<r.length;n++){var i=r[n];t=Math.max(t,he(i))}return Math.ceil(t)}function Lo(e,t){return e.liquid&&t.liquid}function Oo(e,t){return null!=t.maxHeight||Lo(e,t)}function No(e,t,n){var r=n.expandRows;return"function"==typeof t.content?t.content(n):Lr("table",{className:[t.tableClassName,e.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:r?n.clientHeight:""}},n.tableColGroupNode,Lr("tbody",{},"function"==typeof t.rowContent?t.rowContent(n):t.rowContent))}function Ro(e,t){return it(e,t,je)}function Po(e,t){for(var n=[],r=0,o=e;r<o.length;r++)for(var s=o[r],a=s.span||1,l=0;l<a;l++)n.push(Lr("col",{style:{width:"shrink"===s.width?Fo(t):s.width||"",minWidth:s.minWidth||""}}));return Lr.apply(void 0,i(["colgroup",{}],n))}function Fo(e){return null==e?4:e}function jo(e){for(var t=0,n=e;t<n.length;t++)if("shrink"===n[t].width)return!0;return!1}function Yo(e,t){var n=["fc-scrollgrid",t.theme.getClass("table")];return e&&n.push("fc-scrollgrid-liquid"),n}function Vo(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 Ho(e){return Lr("div",{className:"fc-scrollgrid-sticky-shim",style:{width:e.clientWidth,minWidth:e.tableMinWidth}})}function Bo(e){var t=e.stickyHeaderDates;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}function Uo(e){var t=e.stickyFooterScrollbar;return null!=t&&"auto"!==t||(t="auto"===e.height||"auto"===e.viewHeight),t}var zo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processCols=ot((function(e){return e}),Ro),t.renderMicroColGroup=ot(Po),t.scrollerRefs=new Ao,t.scrollerElRefs=new Ao(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,o=t.sections||[],s=this.processCols(t.cols),a=this.renderMicroColGroup(s,n.shrinkWidth),l=Yo(t.liquid,r),c=o.length,u=0,d=[],h=[],p=[];u<c&&"header"===(e=o[u]).type;)d.push(this.renderSection(e,u,a)),u++;for(;u<c&&"body"===(e=o[u]).type;)h.push(this.renderSection(e,u,a)),u++;for(;u<c&&"footer"===(e=o[u]).type;)p.push(this.renderSection(e,u,a)),u++;var f=!lr();return Lr("table",{className:l.join(" "),style:{height:t.height}},Boolean(!f&&d.length)&&Lr.apply(void 0,i(["thead",{}],d)),Boolean(!f&&h.length)&&Lr.apply(void 0,i(["tbody",{}],h)),Boolean(!f&&p.length)&&Lr.apply(void 0,i(["tfoot",{}],p)),f&&Lr.apply(void 0,i(["tbody",{}],d,h,p)))},t.prototype.renderSection=function(e,t,n){return"outerContent"in e?Lr(Rr,{key:e.key},e.outerContent):Lr("tr",{key:e.key,className:Vo(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 i=this.props,o=this.state,s=o.forceYScrollbars,a=o.scrollerClientWidths,l=o.scrollerClientHeights,c=Oo(i,e),u=Lo(i,e),d=i.liquid?s?"scroll":c?"auto":"hidden":"visible",h=No(e,r,{tableColGroupNode:n,tableMinWidth:"",clientWidth:void 0!==a[t]?a[t]:null,clientHeight:void 0!==l[t]?l[t]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:function(){}});return Lr("td",{ref:r.elRef},Lr("div",{className:"fc-scroller-harness"+(u?" fc-scroller-harness-liquid":"")},Lr(Mo,{ref:this.scrollerRefs.createRef(t),elRef:this.scrollerElRefs.createRef(t),overflowY:d,overflowX:i.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:u,liquidIsAbsolute:!0},h)))},t.prototype._handleScrollerEl=function(e,t){var n=parseInt(t,10);qr(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 jo(this.props.cols)?Io(this.scrollerElRefs.getAll()):0},t.prototype.computeScrollerDims=function(){for(var e=yr(),t=this.props.sections.length,n=this.scrollerRefs,r=this.scrollerElRefs,i=!1,o={},s={},a=0;a<t;a++){var l=n.currentMap[a];if(l&&l.needsYScrolling()){i=!0;break}}for(a=0;a<t;a++){var c=r.currentMap[a];if(c){var u=c.parentNode;o[a]=Math.floor(u.getBoundingClientRect().width-(i?e.y:0)),s[a]=Math.floor(u.getBoundingClientRect().height)}}return{forceYScrollbars:i,scrollerClientWidths:o,scrollerClientHeights:s}},t}(Br);zo.addStateEquality({scrollerClientWidths:je,scrollerClientHeights:je});var qo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elRef=Nr(),t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context,n=t.options,r=e.seg,i=r.eventRange,o=i.ui,s={event:new Yn(t,i.def,i.instance),view:t.viewApi,timeText:e.timeText,textColor:o.textColor,backgroundColor:o.backgroundColor,borderColor:o.borderColor,isDraggable:!e.disableDragging&&mn(r,t),isStartResizable:!e.disableResizing&&gn(r,t),isEndResizable:!e.disableResizing&&vn(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)},a=_n(s).concat(o.classNames);return Lr(oi,{hookProps:s,classNames:n.eventClassNames,content:n.eventContent,defaultContent:e.defaultContent,didMount:n.eventDidMount,willUnmount:n.eventWillUnmount,elRef:this.elRef},(function(t,n,r,i){return e.children(t,a.concat(n),r,i,s)}))},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}(Br),Wo=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,i=t.options.eventTimeFormat||e.defaultTimeFormat,o=yn(n,i,t,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return Lr(qo,{seg:n,timeText:o,disableDragging:e.disableDragging,disableResizing:e.disableResizing,defaultContent:e.defaultContent||$o,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,i,o,s,a){return Lr("a",r({className:e.extraClassNames.concat(i).join(" "),style:{borderColor:a.borderColor,backgroundColor:a.backgroundColor},ref:t},function(e){var t=e.eventRange.def.url;return t?{href:t}:{}}(n)),Lr("div",{className:"fc-event-main",ref:o,style:{color:a.textColor}},s),a.isStartResizable&&Lr("div",{className:"fc-event-resizer fc-event-resizer-start"}),a.isEndResizable&&Lr("div",{className:"fc-event-resizer fc-event-resizer-end"}))}))},t}(Br);function $o(e){return Lr("div",{className:"fc-event-main-frame"},e.timeText&&Lr("div",{className:"fc-event-time"},e.timeText),Lr("div",{className:"fc-event-title-container"},Lr("div",{className:"fc-event-title fc-sticky"},e.event.title||Lr(Rr,null,"\xa0"))))}var Go=function(e){return Lr(Yr.Consumer,null,(function(t){var n=t.options,r={isAxis:e.isAxis,date:t.dateEnv.toDate(e.date),view:t.viewApi};return Lr(oi,{hookProps:r,classNames:n.nowIndicatorClassNames,content:n.nowIndicatorContent,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount},e.children)}))},Ko=_t({day:"numeric"}),Zo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refineHookProps=st(Jo),t.normalizeClassNames=ui(),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}),i=pr(r,t.theme).concat(r.isDisabled?[]:this.normalizeClassNames(n.dayCellClassNames,r)),o=r.isDisabled?{}:{"data-date":tt(e.date)};return Lr(ci,{hookProps:r,didMount:n.dayCellDidMount,willUnmount:n.dayCellWillUnmount,elRef:e.elRef},(function(t){return e.children(t,i,o,r.isDisabled)}))},t}(Br),Xo=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=Jo({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraProps:e.extraHookProps,viewApi:t.viewApi,dateEnv:t.dateEnv});return Lr(ai,{hookProps:r,content:n.dayCellContent,defaultContent:e.defaultContent},e.children)},t}(Br);function Jo(e){var t=e.date,n=e.dateEnv,i=hr(t,e.todayRange,null,e.dateProfile);return r(r(r({date:n.toDate(t),view:e.viewApi},i),{dayNumberText:e.showDayNumber?n.format(t,Ko):""}),e.extraProps)}function Qo(e){return Lr("div",{className:"fc-"+e})}var es=function(e){return Lr(qo,{defaultContent:ts,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,i){return Lr("div",{ref:e,className:["fc-bg-event"].concat(t).join(" "),style:{backgroundColor:i.backgroundColor}},r)}))};function ts(e){return e.event.title&&Lr("div",{className:"fc-event-title"},e.event.title)}var ns=function(e){return Lr(Yr.Consumer,null,(function(t){var n=t.dateEnv,r=t.options,i=e.date,o=r.weekNumberFormat||e.defaultFormat,s=n.computeWeekNumber(i),a=n.format(i,o);return Lr(oi,{hookProps:{num:s,text:a,date:i},classNames:r.weekNumberClassNames,content:r.weekNumberContent,defaultContent:rs,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount},e.children)}))};function rs(e){return e.text}var is=function(e){function t(t,n){void 0===n&&(n={});var i=e.call(this)||this;return i.isRendering=!1,i.isRendered=!1,i.currentClassNames=[],i.customContentRenderId=0,i.handleAction=function(e){switch(e.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":i.renderRunner.tryDrain()}},i.handleData=function(e){i.currentData=e,i.renderRunner.request(e.calendarOptions.rerenderDelay)},i.handleRenderRequest=function(){if(i.isRendering){i.isRendered=!0;var e=i.currentData;Or(Lr(fo,{options:e.calendarOptions,theme:e.theme,emitter:e.emitter},(function(t,n,o,s){return i.setClassNames(t),i.setHeight(n),Lr(si.Provider,{value:i.customContentRenderId},Lr(uo,r({isHeightAuto:o,forPrint:s},e)))})),i.el)}else i.isRendered&&(i.isRendered=!1,Or(null,i.el),i.setClassNames([]),i.setHeight(""));Fr()},i.el=t,i.renderRunner=new ji(i.handleRenderRequest),new Hi({optionOverrides:n,calendarApi:i,onAction:i.handleAction,onData:i.handleData}),i}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),Fr()},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(!it(e,this.currentClassNames)){for(var t=this.el.classList,n=0,r=this.currentClassNames;n<r.length;n++){var i=r[n];t.remove(i)}for(var o=0,s=e;o<s.length;o++)i=s[o],t.add(i);this.currentClassNames=e}},t.prototype.setHeight=function(e){q(this.el,"height",e)},t}(jn);no.touchMouseIgnoreWait=500;var os=0,ss=0,as=!1,ls=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,os++,setTimeout((function(){os--}),no.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 Tr,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),ss++||window.addEventListener("touchmove",cs,{passive:!1})}return e.prototype.destroy=function(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),--ss||window.removeEventListener("touchmove",cs,{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(){as=!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 os||this.isTouchDragging},e.prototype.cancelTouchScroll=function(){this.isDragging&&(as=!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,i=e.touches,o=0,s=0;return i&&i.length?(n=i[0].pageX,r=i[0].pageY):(n=e.pageX,r=e.pageY),t?(this.origPageX=n,this.origPageY=r):(o=n-this.origPageX,s=r-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:n,pageY:r,deltaX:o,deltaY:s}},e}();function cs(e){as&&e.preventDefault()}var us=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",z(n,{left:r.left,top:r.top}),Z(n,(function(){n.style.transition="",e()}))},e.prototype.cleanup=function(){this.mirrorEl&&(Y(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null},e.prototype.updateElPosition=function(){this.sourceEl&&this.isVisible&&z(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"),z(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}(),ds=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}(Cr),hs=function(e){function t(t,n){return e.call(this,new Dr(t),n)||this}return n(t,e),t.prototype.getEventTarget=function(){return this.scrollController.el},t.prototype.computeClientRect=function(){return wr(this.scrollController.el)},t}(ds),ps=function(e){function t(t){return e.call(this,new Mr,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}(ds),fs="function"==typeof performance?performance.now:Date.now,ms=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=fs();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,i=null===this.pointerScreenY?0:r-this.pointerScreenY,o=null===this.pointerScreenX?0:n-this.pointerScreenX;i<0?this.everMovedUp=!0:i>0&&(this.everMovedDown=!0),o<0?this.everMovedLeft=!0:o>0&&(this.everMovedRight=!0),this.pointerScreenX=n,this.pointerScreenY=r,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(fs()))}},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,i=r-e.distance,o=i*i/(r*r)*this.maxVelocity*t,s=1;switch(e.name){case"left":s=-1;case"right":n.setScrollLeft(n.getScrollLeft()+o*s);break;case"top":s=-1;case"bottom":n.setScrollTop(n.getScrollTop()+o*s)}},e.prototype.computeBestEdge=function(e,t){for(var n=this.edgeThreshold,r=null,i=0,o=this.scrollCaches;i<o.length;i++){var s=o[i],a=s.clientRect,l=e-a.left,c=a.right-e,u=t-a.top,d=a.bottom-t;l>=0&&c>=0&&u>=0&&d>=0&&(u<=n&&this.everMovedUp&&s.canScrollUp()&&(!r||r.distance>u)&&(r={scrollCache:s,name:"top",distance:u}),d<=n&&this.everMovedDown&&s.canScrollDown()&&(!r||r.distance>d)&&(r={scrollCache:s,name:"bottom",distance:d}),l<=n&&this.everMovedLeft&&s.canScrollLeft()&&(!r||r.distance>l)&&(r={scrollCache:s,name:"left",distance:l}),c<=n&&this.everMovedRight&&s.canScrollRight()&&(!r||r.distance>c)&&(r={scrollCache:s,name:"right",distance:c}))}return r},e.prototype.buildCaches=function(){return this.queryScrollEls().map((function(e){return e===window?new ps(!1):new hs(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}(),gs=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,i=e.deltaY;n*n+i*i>=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),ie(document.body),r.emitter.trigger("pointerup",e),r.isDragging&&(r.autoScroller.stop(),r.tryStopDrag(e)),r.delayTimeoutId&&(clearTimeout(r.delayTimeoutId),r.delayTimeoutId=null))};var i=r.pointer=new ls(t);return i.emitter.on("pointerdown",r.onPointerDown),i.emitter.on("pointermove",r.onPointerMove),i.emitter.on("pointerup",r.onPointerUp),n&&(i.selector=n),r.mirror=new us,r.autoScroller=new ms,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}(to),vs=function(){function e(e){this.origRect=xr(e),this.scrollCaches=Sr(e).map((function(e){return new hs(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={left:e,top:t},i=0,o=this.scrollCaches;i<o.length;i++){var s=o[i];if(void 0,"HTML"!==(n=s.getEventTarget().tagName)&&"BODY"!==n&&!rr(r,s.clientRect))return!1}return!0},e}(),ys=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 Tr}return e.prototype.processFirstCoord=function(e){var t,n={left:e.pageX,top:e.pageY},r=n,i=e.subjectEl;i!==document&&(r=or(r,t=xr(i)));var o=this.initialHit=this.queryHitForOffset(r.left,r.top);if(o){if(this.useSubjectCenter&&t){var s=ir(t,o.rect);s&&(r=sr(s))}this.coordAdjust=ar(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&&bs(this.movingHit,n)||(this.movingHit=n,this.emitter.trigger("hitupdate",n,!1,e))},e.prototype.prepareHits=function(){this.offsetTrackers=Re(this.droppableStore,(function(e){return e.component.prepareHits(),new vs(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,i=null;for(var o in n){var s=n[o].component,a=r[o];if(a&&a.isWithinClipping(e,t)){var l=a.computeLeft(),c=a.computeTop(),u=e-l,d=t-c,h=a.origRect,p=h.right-h.left,f=h.bottom-h.top;if(u>=0&&u<p&&d>=0&&d<f){var m=s.queryHit(u,d,p,f),g=s.context.getCurrentData().dateProfile;m&&on(g.activeRange,m.dateSpan.range)&&(!i||m.layer>i.layer)&&(m.rect.left+=l,m.rect.right+=l,m.rect.top+=c,m.rect.bottom+=c,i=m)}}}return i},e}();function bs(e,t){return!e&&!t||Boolean(e)===Boolean(t)&&kn(e.dateSpan,t.dateSpan)}function _s(e,t){for(var n,i,o={},s=0,a=t.pluginHooks.datePointTransforms;s<a.length;s++){var l=a[s];r(o,l(e,t))}return r(o,(n=e,{date:(i=t.dateEnv).toDate(n.range.start),dateStr:i.formatIso(n.range.start,{omitTime:n.allDay}),allDay:n.allDay})),o}var ws=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 i=n.hitDragging,o=i.initialHit,s=i.finalHit;if(o&&s&&bs(o,s)){var a=t.context,l=r(r({},_s(o.dateSpan,a)),{dayEl:o.dayEl,jsEvent:e.origEvent,view:a.viewApi||a.calendarApi.view});a.emitter.trigger("dateClick",l)}}},n.dragging=new gs(t.el),n.dragging.autoScroller.isEnabled=!1;var i=n.hitDragging=new ys(n.dragging,Qi(t));return i.emitter.on("pointerdown",n.handlePointerDown),i.emitter.on("dragend",n.handleDragEnd),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(Ji),xs=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,i=t.dragging,o=r.context.options.selectable&&r.isValidDateDownEl(e.origEvent.target);i.setIgnoreMove(!o),i.delay=e.isTouch?function(e){var t=e.context.options,n=t.selectLongPressDelay;return null==n&&(n=t.longPressDelay),n}(r):null},n.handleDragStart=function(e){n.component.context.calendarApi.unselect(e)},n.handleHitUpdate=function(e,t){var i=n.component.context,o=null,s=!1;e&&((o=function(e,t,n){var i=e.dateSpan,o=t.dateSpan,s=[i.range.start,i.range.end,o.range.start,o.range.end];s.sort(ue);for(var a={},l=0,c=n;l<c.length;l++){var u=(0,c[l])(e,t);if(!1===u)return null;u&&r(a,u)}return a.range={start:s[0],end:s[3]},a.allDay=i.allDay,a}(n.hitDragging.initialHit,e,i.pluginHooks.dateSelectionTransformers))&&n.component.isDateSelectionValid(o)||(s=!0,o=null)),o?i.dispatch({type:"SELECT_DATES",selection:o}):t||i.dispatch({type:"UNSELECT_DATES"}),s?Q():ee(),t||(n.dragSelection=o)},n.handlePointerUp=function(e){n.dragSelection&&(Cn(n.dragSelection,e,n.component.context),n.dragSelection=null)};var i=t.component.context.options,o=n.dragging=new gs(t.el);o.touchScrollAllowed=!1,o.minDistance=i.selectMinDistance||0,o.autoScroller.isEnabled=i.dragScroll;var s=n.hitDragging=new ys(n.dragging,Qi(t));return s.emitter.on("pointerdown",n.handlePointerDown),s.emitter.on("dragstart",n.handleDragStart),s.emitter.on("hitupdate",n.handleHitUpdate),s.emitter.on("pointerup",n.handlePointerUp),n}return n(t,e),t.prototype.destroy=function(){this.dragging.destroy()},t}(Ji),Ss=function(e){function t(n){var i=e.call(this,n)||this;i.subjectEl=null,i.subjectSeg=null,i.isDragging=!1,i.eventRange=null,i.relevantEvents=null,i.receivingContext=null,i.validMutation=null,i.mutatedRelevantEvents=null,i.handlePointerDown=function(e){var t=e.origEvent.target,n=i,r=n.component,o=n.dragging,s=o.mirror,a=r.context.options,l=r.context;i.subjectEl=e.subjectEl;var c=i.subjectSeg=un(e.subjectEl),u=(i.eventRange=c.eventRange).instance.instanceId;i.relevantEvents=Ot(l.getCurrentData().eventStore,u),o.minDistance=e.isTouch?0:a.eventDragMinDistance,o.delay=e.isTouch&&u!==r.props.eventSelection?function(e){var t=e.context.options,n=t.eventLongPressDelay;return null==n&&(n=t.longPressDelay),n}(r):null,s.parentNode=V(t,".fc"),s.revertDuration=a.dragRevertDuration;var d=r.isValidSegDownEl(t)&&!V(t,".fc-event-resizer");o.setIgnoreMove(!d),i.isDragging=d&&e.subjectEl.classList.contains("fc-event-draggable")},i.handleDragStart=function(e){var t=i.component.context,n=i.eventRange,r=n.instance.instanceId;e.isTouch?r!==i.component.props.eventSelection&&t.dispatch({type:"SELECT_EVENT",eventInstanceId:r}):t.dispatch({type:"UNSELECT_EVENT"}),i.isDragging&&(t.calendarApi.unselect(e),t.emitter.trigger("eventDragStart",{el:i.subjectEl,event:new Yn(t,n.def,n.instance),jsEvent:e.origEvent,view:t.viewApi}))},i.handleHitUpdate=function(e,t){if(i.isDragging){var n=i.relevantEvents,r=i.hitDragging.initialHit,o=i.component.context,s=null,a=null,l=null,c=!1,u={affectedEvents:n,mutatedEvents:{defs:{},instances:{}},isEvent:!0};if(e){var d=e.component,h=(s=d.context).options;o===s||h.editable&&h.droppable?(a=function(e,t,n){var r=e.dateSpan,i=t.dateSpan,o=r.range.start,s=i.range.start,a={};r.allDay!==i.allDay&&(a.allDay=i.allDay,a.hasEnd=t.component.context.options.allDayMaintainDuration,i.allDay&&(o=xe(o)));var l=Jt(o,s,e.component.context.dateEnv,e.component===t.component?e.component.largeUnit:null);l.milliseconds&&(a.allDay=!1);for(var c={datesDelta:l,standardProps:a},u=0,d=n;u<d.length;u++)(0,d[u])(c,e,t);return c}(r,e,s.getCurrentData().pluginHooks.eventDragMutationMassagers))&&(l=An(n,s.getCurrentData().eventUiBases,a,s),u.mutatedEvents=l,d.isInteractionValid(u)||(c=!0,a=null,l=null,u.mutatedEvents={defs:{},instances:{}})):s=null}i.displayDrag(s,u),c?Q():ee(),t||(o===s&&bs(r,e)&&(a=null),i.dragging.setMirrorNeedsRevert(!a),i.dragging.setMirrorIsVisible(!e||!document.querySelector(".fc-event-mirror")),i.receivingContext=s,i.validMutation=a,i.mutatedRelevantEvents=l)}},i.handlePointerUp=function(){i.isDragging||i.cleanup()},i.handleDragEnd=function(e){if(i.isDragging){var t=i.component.context,n=t.viewApi,o=i,s=o.receivingContext,a=o.validMutation,l=i.eventRange.def,c=i.eventRange.instance,u=new Yn(t,l,c),d=i.relevantEvents,h=i.mutatedRelevantEvents,p=i.hitDragging.finalHit;if(i.clearDrag(),t.emitter.trigger("eventDragStop",{el:i.subjectEl,event:u,jsEvent:e.origEvent,view:n}),a){if(s===t){var f=new Yn(t,h.defs[l.defId],c?h.instances[c.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:h});for(var m={oldEvent:u,event:f,relatedEvents:Hn(h,t,c),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}},g={},v=0,y=t.getCurrentData().pluginHooks.eventDropTransformers;v<y.length;v++){var b=y[v];r(g,b(a,t))}t.emitter.trigger("eventDrop",r(r(r({},m),g),{el:e.subjectEl,delta:a.datesDelta,jsEvent:e.origEvent,view:n})),t.emitter.trigger("eventChange",m)}else if(s){var _={event:u,relatedEvents:Hn(d,t,c),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:d})}};t.emitter.trigger("eventLeave",r(r({},_),{draggedEl:e.subjectEl,view:n})),t.dispatch({type:"REMOVE_EVENTS",eventStore:d}),t.emitter.trigger("eventRemove",_);var w=h.defs[l.defId],x=h.instances[c.instanceId],S=new Yn(s,w,x);s.dispatch({type:"MERGE_EVENTS",eventStore:h});var k={event:S,relatedEvents:Hn(h,s,x),revert:function(){s.dispatch({type:"REMOVE_EVENTS",eventStore:h})}};s.emitter.trigger("eventAdd",k),e.isTouch&&s.dispatch({type:"SELECT_EVENT",eventInstanceId:c.instanceId}),s.emitter.trigger("drop",r(r({},_s(p.dateSpan,s)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:p.component.context.viewApi})),s.emitter.trigger("eventReceive",r(r({},k),{draggedEl:e.subjectEl,view:p.component.context.viewApi}))}}else t.emitter.trigger("_noEventDrop")}i.cleanup()};var o=i.component.context.options,s=i.dragging=new gs(n.el);s.pointer.selector=t.SELECTOR,s.touchScrollAllowed=!1,s.autoScroller.isEnabled=o.dragScroll;var a=i.hitDragging=new ys(i.dragging,eo);return a.useSubjectCenter=n.useEventCenter,a.emitter.on("pointerdown",i.handlePointerDown),a.emitter.on("dragstart",i.handleDragStart),a.emitter.on("hitupdate",i.handleHitUpdate),a.emitter.on("pointerup",i.handlePointerUp),a.emitter.on("dragend",i.handleDragEnd),i}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}(Ji),ks=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=un(n.querySegEl(e)),i=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!==i.instance.instanceId)},n.handleDragStart=function(e){var t=n.component.context,r=n.eventRange;n.relevantEvents=Ot(t.getCurrentData().eventStore,n.eventRange.instance.instanceId);var i=n.querySegEl(e);n.draggingSegEl=i,n.draggingSeg=un(i),t.calendarApi.unselect(),t.emitter.trigger("eventResizeStart",{el:i,event:new Yn(t,r.def,r.instance),jsEvent:e.origEvent,view:t.viewApi})},n.handleHitUpdate=function(e,t,i){var o=n.component.context,s=n.relevantEvents,a=n.hitDragging.initialHit,l=n.eventRange.instance,c=null,u=null,d=!1,h={affectedEvents:s,mutatedEvents:{defs:{},instances:{}},isEvent:!0};e&&(c=function(e,t,n,i,o){for(var s=e.component.context.dateEnv,a=Jt(e.dateSpan.range.start,t.dateSpan.range.start,s,e.component.largeUnit),l={},c=0,u=o;c<u.length;c++){var d=(0,u[c])(e,t);if(!1===d)return null;d&&r(l,d)}if(n){if(s.add(i.start,a)<i.end)return l.startDelta=a,l}else if(s.add(i.end,a)>i.start)return l.endDelta=a,l;return null}(a,e,i.subjectEl.classList.contains("fc-event-resizer-start"),l.range,o.pluginHooks.eventResizeJoinTransforms)),c&&(u=An(s,o.getCurrentData().eventUiBases,c,o),h.mutatedEvents=u,n.component.isInteractionValid(h)||(d=!0,c=null,u=null,h.mutatedEvents=null)),u?o.dispatch({type:"SET_EVENT_RESIZE",state:h}):o.dispatch({type:"UNSET_EVENT_RESIZE"}),d?Q():ee(),t||(c&&bs(a,e)&&(c=null),n.validMutation=c,n.mutatedRelevantEvents=u)},n.handleDragEnd=function(e){var t=n.component.context,i=n.eventRange.def,o=n.eventRange.instance,s=new Yn(t,i,o),a=n.relevantEvents,l=n.mutatedRelevantEvents;if(t.emitter.trigger("eventResizeStop",{el:n.draggingSegEl,event:s,jsEvent:e.origEvent,view:t.viewApi}),n.validMutation){var c=new Yn(t,l.defs[i.defId],o?l.instances[o.instanceId]:null);t.dispatch({type:"MERGE_EVENTS",eventStore:l});var u={oldEvent:s,event:c,relatedEvents:Hn(l,t,o),revert:function(){t.dispatch({type:"MERGE_EVENTS",eventStore:a})}};t.emitter.trigger("eventResize",r(r({},u),{el:n.draggingSegEl,startDelta:n.validMutation.startDelta||$e(0),endDelta:n.validMutation.endDelta||$e(0),jsEvent:e.origEvent,view:t.viewApi})),t.emitter.trigger("eventChange",u)}else t.emitter.trigger("_noEventResize");n.draggingSeg=null,n.relevantEvents=null,n.validMutation=null};var i=t.component,o=n.dragging=new gs(t.el);o.pointer.selector=".fc-event-resizer",o.touchScrollAllowed=!1,o.autoScroller.isEnabled=i.context.options.dragScroll;var s=n.hitDragging=new ys(n.dragging,Qi(t));return s.emitter.on("pointerdown",n.handlePointerDown),s.emitter.on("dragstart",n.handleDragStart),s.emitter.on("hitupdate",n.handleHitUpdate),s.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}(Ji),Ts=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,Ss.SELECTOR)},this.onDocumentPointerUp=function(e){var n=t.context,r=t.documentPointer,i=n.getCurrentData();if(!r.wasTouchScroll){if(i.dateSelection&&!t.isRecentPointerDateSelect){var o=n.options.unselectAuto;!o||o&&t.matchesCancel||n.calendarApi.unselect(e)}i.eventSelection&&!t.matchesEvent&&n.dispatch({type:"UNSELECT_EVENT"})}t.isRecentPointerDateSelect=!1};var n=this.documentPointer=new ls(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}(),Es={dateClick:At,eventDragStart:At,eventDragStop:At,eventDrop:At,eventResizeStart:At,eventResizeStop:At,eventResize:At,drop:At,eventReceive:At,eventLeave:At},Cs=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,i){var o=n.hitDragging.dragging,s=null,a=null,l=!1,c={affectedEvents:{defs:{},instances:{}},mutatedEvents:{defs:{},instances:{}},isEvent:n.dragMeta.create};e&&(s=e.component.context,n.canDropElOnCalendar(i.subjectEl,s)&&(a=function(e,t,n){for(var i=r({},t.leftoverProps),o=0,s=n.pluginHooks.externalDefTransforms;o<s.length;o++){var a=s[o];r(i,a(e,t))}var l=Wt(i,n),c=Gt(l.refined,l.extra,t.sourceId,e.allDay,n.options.forceEventDuration||Boolean(t.duration),n),u=e.range.start;e.allDay&&t.startTime&&(u=n.dateEnv.add(u,t.startTime));var d=t.duration?n.dateEnv.add(u,t.duration):Mn(e.allDay,u,n);return{def:c,instance:Ie(c.defId,{start:u,end:d})}}(e.dateSpan,n.dragMeta,s),c.mutatedEvents=Lt(a),(l=!Gr(c,s))&&(c.mutatedEvents={defs:{},instances:{}},a=null))),n.displayDrag(s,c),o.setMirrorIsVisible(t||!a||!document.querySelector(".fc-event-mirror")),l?Q():ee(),t||(o.setMirrorNeedsRevert(!a),n.receivingContext=s,n.droppableEvent=a)},this.handleDragEnd=function(e){var t=n,i=t.receivingContext,o=t.droppableEvent;if(n.clearDrag(),i&&o){var s=n.hitDragging.finalHit,a=s.component.context.viewApi,l=n.dragMeta;if(i.emitter.trigger("drop",r(r({},_s(s.dateSpan,i)),{draggedEl:e.subjectEl,jsEvent:e.origEvent,view:a})),l.create){var c=Lt(o);i.dispatch({type:"MERGE_EVENTS",eventStore:c}),e.isTouch&&i.dispatch({type:"SELECT_EVENT",eventInstanceId:o.instance.instanceId}),i.emitter.trigger("eventReceive",{event:new Yn(i,o.def,o.instance),relatedEvents:[],revert:function(){i.dispatch({type:"REMOVE_EVENTS",eventStore:c})},draggedEl:e.subjectEl,view:a})}}n.receivingContext=null,n.droppableEvent=null};var i=this.hitDragging=new ys(e,eo);i.requireInitial=!1,i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("dragend",this.handleDragEnd),this.suppliedDragMeta=t}return e.prototype.buildDragMeta=function(e){return"object"==typeof this.suppliedDragMeta?io(this.suppliedDragMeta):"function"==typeof this.suppliedDragMeta?io(this.suppliedDragMeta(e)):io((t=function(e,t){var n=no.dataAttrPrefix,r=(n?n+"-":"")+"event";return e.getAttribute("data-"+r)||""}(e))?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(H(e,n))},e}();no.dataAttrPrefix="";var Ds=function(){function e(e,t){var n=this;void 0===t&&(t={}),this.handlePointerDown=function(e){var t=n.dragging,r=n.settings,i=r.minDistance,o=r.longPressDelay;t.minDistance=null!=i?i:e.isTouch?0:xt.eventDragMinDistance,t.delay=e.isTouch?null!=o?o:xt.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 gs(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 Cs(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Ms=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 ls(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}(to),As=function(){function e(e,t){var n=document;e===document||e instanceof Element?(n=e,t=t||{}):t=e||{};var r=this.dragging=new Ms(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 Cs(r,t.eventData)}return e.prototype.destroy=function(){this.dragging.destroy()},e}(),Is=ni({componentInteractions:[ws,xs,Ss,ks],calendarInteractions:[Ts],elementDraggingImpl:gs,listenerRefiners:Es}),Ls=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.headerElRef=Nr(),t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t){var n=this.props,r=this.context,i=[],o=Bo(r.options);return e&&i.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),i.push({type:"body",key:"body",liquid:!0,chunk:{content:t}}),Lr(pi,{viewSpec:r.viewSpec},(function(e,t){return Lr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Lr(zo,{liquid:!n.isHeightAuto&&!n.forPrint,cols:[],sections:i}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r){var i=this.context.pluginHooks.scrollGridImpl;if(!i)throw new Error("No ScrollGrid implementation");var o=this.props,s=this.context,a=!o.forPrint&&Bo(s.options),l=!o.forPrint&&Uo(s.options),c=[];return e&&c.push({type:"header",key:"header",isSticky:a,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),c.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:t}]}),l&&c.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:Ho}]}),Lr(pi,{viewSpec:s.viewSpec},(function(e,t){return Lr("div",{ref:e,className:["fc-daygrid"].concat(t).join(" ")},Lr(i,{liquid:!o.isHeightAuto&&!o.forPrint,colGroups:[{cols:[{span:n,minWidth:r}]}],sections:c}))}))},t}(ti);function Os(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var i=0,o=e;i<o.length;i++){var s=o[i];n[s.row].push(s)}return n}function Ns(e,t){for(var n=[],r=0;r<t;r++)n[r]=[];for(var i=0,o=e;i<o.length;i++){var s=o[i];n[s.firstCol].push(s)}return n}function Rs(e,t){var n=[];if(e){for(s=0;s<t;s++)n[s]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,i=e.segs;r<i.length;r++){var o=i[r];n[o.row].segs.push(o)}}else for(var s=0;s<t;s++)n[s]=null;return n}var Ps=_t({week:"narrow"}),Fs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleRootEl=function(e){t.rootEl=e,qr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.props;if(n.onMoreClick){var r=n.segsByEachCol,i=r.filter((function(e){return n.segIsHidden[e.eventRange.instance.instanceId]}));n.onMoreClick({date:n.date,allSegs:r,hiddenSegs:i,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,i=t.viewApi,o=this.props,s=o.date,a=o.dateProfile,l={num:o.moreCnt,text:o.buildMoreLinkText(o.moreCnt),view:i},c=n.navLinks?{"data-navlink":fr(s,"week"),tabIndex:0}:{};return Lr(Zo,{date:s,dateProfile:a,todayRange:o.todayRange,showDayNumber:o.showDayNumber,extraHookProps:o.extraHookProps,elRef:this.handleRootEl},(function(t,i,u,d){return Lr("td",r({ref:t,className:["fc-daygrid-day"].concat(i,o.extraClassNames||[]).join(" ")},u,o.extraDataAttrs),Lr("div",{className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",ref:o.innerElRef},o.showWeekNumber&&Lr(ns,{date:s,defaultFormat:Ps},(function(e,t,n,i){return Lr("a",r({ref:e,className:["fc-daygrid-week-number"].concat(t).join(" ")},c),i)})),!d&&Lr(Vs,{date:s,dateProfile:a,showDayNumber:o.showDayNumber,forceDayTop:o.forceDayTop,todayRange:o.todayRange,extraHookProps:o.extraHookProps}),Lr("div",{className:"fc-daygrid-day-events",ref:o.fgContentElRef,style:{paddingBottom:o.fgPaddingBottom}},o.fgContent,Boolean(o.moreCnt)&&Lr("div",{className:"fc-daygrid-day-bottom",style:{marginTop:o.moreMarginTop}},Lr(oi,{hookProps:l,classNames:n.moreLinkClassNames,content:n.moreLinkContent,defaultContent:Ys,didMount:n.moreLinkDidMount,willUnmount:n.moreLinkWillUnmount},(function(t,n,r,i){return Lr("a",{onClick:e.handleMoreLinkClick,ref:t,className:["fc-daygrid-more-link"].concat(n).join(" ")},i)})))),Lr("div",{className:"fc-daygrid-day-bg"},o.bgContent)))}))},t}(ti);function js(e){return e.dayNumberText}function Ys(e){return e.text}var Vs=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":fr(e.date),tabIndex:0}:{};return Lr(Xo,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,showDayNumber:e.showDayNumber,extraHookProps:e.extraHookProps,defaultContent:js},(function(n,i){return(i||e.forceDayTop)&&Lr("div",{className:"fc-daygrid-day-top",ref:n},Lr("a",r({className:"fc-daygrid-day-number"},t),i||Lr(Rr,null,"\xa0")))}))},t}(Br),Hs=_t({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function Bs(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 Us=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||Hs,i=yn(e.seg,n,t,!0,e.defaultDisplayEventEnd);return Lr(qo,{seg:e.seg,timeText:i,defaultContent:zs,isDragging:e.isDragging,isResizing:!1,isDateSelecting:!1,isSelected:e.isSelected,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday},(function(t,n,i,o){return Lr("a",r({className:["fc-daygrid-event","fc-daygrid-dot-event"].concat(n).join(" "),ref:t},(s=e.seg.eventRange.def.url)?{href:s}:{}),o);var s}))},t}(Br);function zs(e){return Lr(Rr,null,Lr("div",{className:"fc-daygrid-event-dot",style:{borderColor:e.borderColor||e.backgroundColor}}),e.timeText&&Lr("div",{className:"fc-event-time"},e.timeText),Lr("div",{className:"fc-event-title"},e.event.title||Lr(Rr,null,"\xa0")))}var qs=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 Lr(Wo,r({},e,{extraClassNames:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:Hs,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))},t}(Br);function Ws(e,t,n,i,o,s,a,l){for(var c=[],u=[],d={},h={},p={},f={},m={},g=0;g<a;g++)c.push([]),u.push(0);for(var v=0,y=t=pn(t,l);v<y.length;v++)E(k=y[v],o[k.eventRange.instance.instanceId+":"+k.firstCol]||0);!0===n||!0===i?function(e,t,n,r){Gs(e,t,n,!0,(function(e){return e.bottom<=r}))}(u,d,c,s):"number"==typeof n?function(e,t,n,r){Gs(e,t,n,!1,(function(e,t){return t<r}))}(u,d,c,n):"number"==typeof i&&function(e,t,n,r){Gs(e,t,n,!0,(function(e,t){return t<r}))}(u,d,c,i);for(var b=0;b<a;b++){for(var _=0,w=0,x=0,S=c[b];x<S.length;x++){var k,T=S[x];d[(k=T.seg).eventRange.instance.instanceId]||(h[k.eventRange.instance.instanceId]=T.top,k.firstCol===k.lastCol&&k.isStart&&k.isEnd?(p[k.eventRange.instance.instanceId]=T.top-_,w=0,_=T.bottom):w+=T.bottom-T.top)}w&&(u[b]?f[b]=w:m[b]=w)}function E(e,t){if(!C(e,t,0))for(var n=e.firstCol;n<=e.lastCol;n++)for(var r=0,i=c[n];r<i.length;r++)if(C(e,t,i[r].bottom))return}function C(e,t,n){if(function(e,t,n){for(var r=e.firstCol;r<=e.lastCol;r++)for(var i=0,o=c[r];i<o.length;i++){var s=o[i];if(n<s.bottom&&n+t>s.top)return!1}return!0}(e,t,n)){for(var r=e.firstCol;r<=e.lastCol;r++){for(var i=c[r],o=0;o<i.length&&n>=i[o].top;)o++;i.splice(o,0,{seg:e,top:n,bottom:n+t})}return!0}return!1}for(var D in o)o[D]||(d[D.split(":")[0]]=!0);return{segsByFirstCol:c.map($s),segsByEachCol:c.map((function(t,n){var i=function(e){for(var t=[],n=0,r=e;n<r.length;n++){var i=r[n];t.push(i.seg)}return t}(t);return function(e,t,n){for(var i={start:t,end:me(t,1)},o=[],s=0,a=e;s<a.length;s++){var l=a[s],c=l.eventRange,u=c.range,d=tn(u,i);d&&o.push(r(r({},l),{firstCol:n,lastCol:n,eventRange:{def:c.def,ui:r(r({},c.ui),{durationEditable:!1}),instance:c.instance,range:d},isStart:l.isStart&&d.start.valueOf()===u.start.valueOf(),isEnd:l.isEnd&&d.end.valueOf()===u.end.valueOf()}))}return o}(i,e[n].date,n)})),segIsHidden:d,segTops:h,segMarginTops:p,moreCnts:u,moreTops:f,paddingBottoms:m}}function $s(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];o.seg.firstCol===t&&n.push(o.seg)}return n}function Gs(e,t,n,r,i){for(var o=e.length,s={},a=[],l=0;l<o;l++)a.push([]);for(l=0;l<o;l++)for(var c=0,u=0,d=n[l];u<d.length;u++){var h=d[u];i(h,c)?p(h):f(h,c,r),h.top!==h.bottom&&c++}function p(e){var t=e.seg,n=t.eventRange.instance.instanceId;if(!s[n]){s[n]=!0;for(var r=t.firstCol;r<=t.lastCol;r++)a[r].push(e)}}function f(n,r,i){var o=n.seg,s=o.eventRange.instance.instanceId;if(!t[s]){t[s]=!0;for(var l=o.firstCol;l<=o.lastCol;l++){var c=++e[l];if(i&&1===c)for(var u=r-1;a[l].length>u;)f(a[l].pop(),a[l].length,!1)}}}}var Ks=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.cellElRefs=new Ao,t.frameElRefs=new Ao,t.fgElRefs=new Ao,t.segHarnessRefs=new Ao,t.rootElRef=Nr(),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,i=t.cells.length,o=Ns(t.businessHourSegs,i),s=Ns(t.bgEventSegs,i),a=Ns(this.getHighlightSegs(),i),l=Ns(this.getMirrorSegs(),i),c=Ws(t.cells,t.fgEventSegs,t.dayMaxEvents,t.dayMaxEventRows,n.segHeights,n.maxContentHeight,i,r.options.eventOrder),u=c.paddingBottoms,d=c.segsByFirstCol,h=c.segsByEachCol,p=c.segIsHidden,f=c.segTops,m=c.segMarginTops,g=c.moreCnts,v=c.moreTops,y=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Lr("tr",{ref:this.rootElRef},t.renderIntro&&t.renderIntro(),t.cells.map((function(n,r){var i=e.renderFgSegs(d[r],p,f,m,y,t.todayRange),c=e.renderFgSegs(l[r],{},f,{},{},t.todayRange,Boolean(t.eventDrag),Boolean(t.eventResize),!1);return Lr(Fs,{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:p,moreMarginTop:v[r],segsByEachCol:h[r],fgPaddingBottom:u[r],fgContentElRef:e.fgElRefs.createRef(n.key),fgContent:Lr(Rr,null,Lr(Rr,null,i),Lr(Rr,null,c)),bgContent:Lr(Rr,null,e.renderFillSegs(a[r],"highlight"),e.renderFillSegs(o[r],"non-business"),e.renderFillSegs(s[r],"bg-event"))})})))},t.prototype.componentDidMount=function(){this.updateSizing(!0)},t.prototype.componentDidUpdate=function(e,t){var n=this.props;this.updateSizing(!je(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,i,o,s,a,l,c){var u=this.context,d=this.props.eventSelection,h=this.state.framePositions,p=1===this.props.cells.length,f=[];if(h)for(var m=0,g=e;m<g.length;m++){var v=g[m],y=v.eventRange.instance.instanceId,b=a||l||c,_=o[y],w=t[y]||_,x=t[y]||b||v.firstCol!==v.lastCol||!v.isStart||!v.isEnd,S=void 0,k=void 0,T=void 0,E=void 0;x?(k=n[y],u.isRtl?(E=0,T=h.lefts[v.lastCol]-h.lefts[v.firstCol]):(T=0,E=h.rights[v.firstCol]-h.rights[v.lastCol])):S=i[y],f.push(Lr("div",{className:"fc-daygrid-event-harness"+(x?" fc-daygrid-event-harness-abs":""),key:y,ref:b?null:this.segHarnessRefs.createRef(y+":"+v.firstCol),style:{visibility:w?"hidden":"",marginTop:S||"",top:k||"",left:T||"",right:E||""}},Bs(v)?Lr(Us,r({seg:v,isDragging:a,isSelected:y===d,defaultDisplayEventEnd:p},bn(v,s))):Lr(qs,r({seg:v,isDragging:a,isResizing:l,isDateSelecting:c,isSelected:y===d,defaultDisplayEventEnd:p},bn(v,s)))))}return f},t.prototype.renderFillSegs=function(e,t){var n=this.context.isRtl,o=this.props.todayRange,s=this.state.framePositions,a=[];if(s)for(var l=0,c=e;l<c.length;l++){var u=c[l],d=n?{right:0,left:s.lefts[u.lastCol]-s.lefts[u.firstCol]}:{left:0,right:s.rights[u.firstCol]-s.rights[u.lastCol]};a.push(Lr("div",{key:wn(u.eventRange),className:"fc-daygrid-bg-harness",style:d},"bg-event"===t?Lr(es,r({seg:u},bn(u,o))):Qo(t)))}return Lr.apply(void 0,i([Rr,{}],a))},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 i=this.rootElRef.current;this.setState({framePositions:new Er(i,r,!0,!1)})}}var o=!0===t.dayMaxEvents||!0===t.dayMaxEventRows;this.setState({segHeights:this.computeSegHeights(),maxContentHeight:o?this.computeMaxContentHeight():null})}},t.prototype.computeSegHeights=function(){return Re(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}(ti);Ks.addStateEquality({segHeights:je});var Zs=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.repositioner=new ji(t.updateSize.bind(t)),t.handleRootEl=function(e){t.rootEl=e,t.props.elRef&&qr(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 Lr("div",r({className:n.join(" ")},t.extraAttrs,{ref:this.handleRootEl}),Lr("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},Lr("span",{className:"fc-popover-title"},t.title),Lr("span",{className:"fc-popover-close "+e.getIconClass("close"),onClick:this.handleCloseClick})),Lr("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 i,o=r.getBoundingClientRect(),s=t.getBoundingClientRect(),a=n?n.getBoundingClientRect().top:s.top;a=Math.min(a,window.innerHeight-o.height-10),a=Math.max(a,10),i=this.context.isRtl?s.right-o.width:s.left,i=Math.min(i,window.innerWidth-o.width-10),z(r,{top:a,left:i=Math.max(i,10)})}},t}(Br),Xs=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,i=this.props,o=i.date,s=i.hiddenInstances,a=i.todayRange,l=i.dateProfile,c=i.selectedInstanceId,u=n.format(o,t.dayPopoverFormat);return Lr(Zo,{date:o,dateProfile:l,todayRange:a,elRef:this.handlePopoverEl},(function(e,t,n){return Lr(Zs,{elRef:e,title:u,extraClassNames:["fc-more-popover"].concat(t),extraAttrs:n,onClose:i.onCloseClick,alignmentEl:i.alignmentEl,topAlignmentEl:i.topAlignmentEl},Lr(Xo,{date:o,dateProfile:l,todayRange:a},(function(e,t){return t&&Lr("div",{className:"fc-more-popover-misc",ref:e},t)})),i.segs.map((function(e){var t=e.eventRange.instance.instanceId;return Lr("div",{className:"fc-daygrid-event-harness",key:t,style:{visibility:s[t]?"hidden":""}},Bs(e)?Lr(Us,r({seg:e,isDragging:!1,isSelected:t===c,defaultDisplayEventEnd:!1},bn(e,a))):Lr(qs,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:t===c,defaultDisplayEventEnd:!1},bn(e,a))))})))}))},t.prototype.queryHit=function(e,t,n,r){var i=this.props.date;if(e<n&&t<r)return{component:this,dateSpan:{allDay:!0,range:{start:i,end:me(i,1)}},dayEl:this.popoverEl,rect:{left:0,top:0,right:n,bottom:r},layer:1}},t.prototype.isPopover=function(){return!0},t}(ti),Js=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitBusinessHourSegs=ot(Os),t.splitBgEventSegs=ot(Os),t.splitFgEventSegs=ot(Os),t.splitDateSelectionSegs=ot(Os),t.splitEventDrag=ot(Rs),t.splitEventResize=ot(Rs),t.buildBuildMoreLinkText=ot(Qs),t.rowRefs=new Ao,t.state={morePopoverState:null},t.handleRootEl=function(e){t.rootEl=e,qr(t.props.elRef,e)},t.handleMoreLinkClick=function(e){var n=t.context,i=n.dateEnv,o=n.options.moreLinkClick;function s(e){var t=e.eventRange,r=t.def,o=t.instance,s=t.range;return{event:new Yn(n,r,o),start:i.toDate(s.start),end:i.toDate(s.end),isStart:e.isStart,isEnd:e.isEnd}}"function"==typeof o&&(o=o({date:i.toDate(e.date),allDay:!0,allSegs:e.allSegs.map(s),hiddenSegs:e.hiddenSegs.map(s),jsEvent:e.ev,view:n.viewApi})),o&&"popover"!==o?"string"==typeof o&&n.calendarApi.zoomTo(e.date,o):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,i=t.dayMaxEvents,o=t.expandRows,s=this.state.morePopoverState,a=t.cells.length,l=this.splitBusinessHourSegs(t.businessHourSegs,a),c=this.splitBgEventSegs(t.bgEventSegs,a),u=this.splitFgEventSegs(t.fgEventSegs,a),d=this.splitDateSelectionSegs(t.dateSelectionSegs,a),h=this.splitEventDrag(t.eventDrag,a),p=this.splitEventResize(t.eventResize,a),f=this.buildBuildMoreLinkText(this.context.options.moreLinkText),m=!0===i||!0===r;return m&&!o&&(m=!1,r=null,i=null),Lr("div",{className:["fc-daygrid-body",m?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",o?"":"fc-daygrid-body-natural"].join(" "),ref:this.handleRootEl,style:{width:t.clientWidth,minWidth:t.tableMinWidth}},Lr(_o,{unit:"day"},(function(m,g){return Lr(Rr,null,Lr("table",{className:"fc-scrollgrid-sync-table",style:{width:t.clientWidth,minWidth:t.tableMinWidth,height:o?t.clientHeight:""}},t.colGroupNode,Lr("tbody",null,t.cells.map((function(o,s){return Lr(Ks,{ref:e.rowRefs.createRef(s),key:o.length?o[0].date.toISOString():s,showDayNumbers:a>1,showWeekNumbers:t.showWeekNumbers,todayRange:g,dateProfile:n,cells:o,renderIntro:t.renderRowIntro,businessHourSegs:l[s],eventSelection:t.eventSelection,bgEventSegs:c[s].filter(ea),fgEventSegs:u[s],dateSelectionSegs:d[s],eventDrag:h[s],eventResize:p[s],dayMaxEvents:i,dayMaxEventRows:r,clientWidth:t.clientWidth,clientHeight:t.clientHeight,buildMoreLinkText:f,onMoreClick:e.handleMoreLinkClick})})))),!t.forPrint&&s&&s.currentFgEventSegs===t.fgEventSegs&&Lr(Xs,{date:s.date,dateProfile:n,segs:s.allSegs,alignmentEl:s.dayEl,topAlignmentEl:1===a?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 Er(this.rootEl,this.rowRefs.collect().map((function(e){return e.getCellEls()[0]})),!1,!0),this.colPositions=new Er(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)},t.prototype.positionToHit=function(e,t){var n=this.colPositions,r=this.rowPositions,i=n.leftToIndex(e),o=r.topToIndex(t);if(null!=o&&null!=i)return{row:o,col:i,dateSpan:{range:this.getCellRange(o,i),allDay:!0},dayEl:this.getCellEl(o,i),relativeRect:{left:n.lefts[i],right:n.rights[i],top:r.tops[o],bottom:r.bottoms[o]}}},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:me(n,1)}},t}(ti);function Qs(e){return"function"==typeof e?e:function(t){return"+"+t+" "+e}}function ea(e){return e.eventRange.def.allDay}var ta=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.slicer=new na,t.tableRef=Nr(),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 Lr(Js,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}(ti),na=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}(Eo),ra=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayTableModel=ot(ia),t.headerRef=Nr(),t.tableRef=Nr(),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,r=t.dateProfileGenerator,i=this.props,o=this.buildDayTableModel(i.dateProfile,r),s=n.dayHeaders&&Lr(xo,{ref:this.headerRef,dateProfile:i.dateProfile,dates:o.headerDates,datesRepDistinctDays:1===o.rowCnt}),a=function(t){return Lr(ta,{ref:e.tableRef,dateProfile:i.dateProfile,dayTableModel:o,businessHours:i.businessHours,dateSelection:i.dateSelection,eventStore:i.eventStore,eventUiBases:i.eventUiBases,eventSelection:i.eventSelection,eventDrag:i.eventDrag,eventResize:i.eventResize,nextDayThreshold:n.nextDayThreshold,colGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,dayMaxEvents:n.dayMaxEvents,dayMaxEventRows:n.dayMaxEventRows,showWeekNumbers:n.weekNumbers,expandRows:!i.isHeightAuto,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:i.forPrint})};return n.dayMinWidth?this.renderHScrollLayout(s,a,o.colCnt,n.dayMinWidth):this.renderSimpleLayout(s,a)},t}(Ls);function ia(e,t){var n=new ko(e.renderRange,t);return new To(n,/year|month|week/.test(e.currentRangeUnit))}var oa=ni({initialView:"dayGridMonth",optionRefiners:{moreLinkClick:At,moreLinkClassNames:At,moreLinkContent:At,moreLinkDidMount:At,moreLinkWillUnmount:At},views:{dayGrid:{component:ra,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 i,o=this.props.dateEnv,s=e.prototype.buildRenderRange.call(this,t,n,r),a=s.start,l=s.end;return/^(year|month)$/.test(n)&&(a=o.startOfWeek(a),(i=o.startOfWeek(l)).valueOf()!==l.valueOf()&&(l=fe(i,1))),this.props.monthMode&&this.props.fixedWeekCount&&(l=fe(l,6-Math.ceil(ve(a,l)))),{start:a,end:l}},t}(yi)},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},monthMode:!0,fixedWeekCount:!0}}}),sa=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?ln(e)?["timed","allDay"]:["allDay"]:["timed"]},t}(ur),aa=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=xe(e),r=e.valueOf()-n.valueOf();if(r>=Je(t.slotMinTime)&&r<Je(t.slotMaxTime))return this.computeTimeTop($e(r))}},e.prototype.computeDateTop=function(e,t){return t||(t=xe(e)),this.computeTimeTop($e(e.valueOf()-t.valueOf()))},e.prototype.computeTimeTop=function(e){var t,n,r=this.positions,i=this.dateProfile,o=this.slatMetas,s=r.els.length,a=o[1].date.valueOf()-o[0].date.valueOf(),l=(e.milliseconds-Je(i.slotMinTime))/a;return l=Math.max(0,l),l=Math.min(s,l),t=Math.floor(l),n=l-(t=Math.min(t,s-1)),r.tops[t]+r.getHeight(t)*n},e}(),la=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}],ca=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rootElRef=Nr(),t.slatElRefs=new Ao,t}return n(t,e),t.prototype.render=function(){var e=this.props,t=this.context;return Lr("div",{className:"fc-timegrid-slots",ref:this.rootElRef},Lr("table",{className:t.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,Lr(ua,{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 aa(new Er(this.rootElRef.current,(e=this.slatElRefs.currentMap,t.slatMetas.map((function(t){return e[t.key]}))),!1,!0),this.props.dateProfile,t.slatMetas))},t}(Br),ua=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,i=e.slatElRefs;return Lr("tbody",null,e.slatMetas.map((function(o,s){var a={time:o.time,date:t.dateEnv.toDate(o.date),view:t.viewApi},l=["fc-timegrid-slot","fc-timegrid-slot-lane",o.isLabeled?"":"fc-timegrid-slot-minor"];return Lr("tr",{key:o.key,ref:i.createRef(o.key)},e.axis&&Lr(ha,r({},o)),Lr(oi,{hookProps:a,classNames:n.slotLaneClassNames,content:n.slotLaneContent,didMount:n.slotLaneDidMount,willUnmount:n.slotLaneWillUnmount},(function(e,t,n,r){return Lr("td",{ref:e,className:l.concat(t).join(" "),"data-time":o.isoTimeStr},r)})))})))},t}(Br),da=_t({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function ha(e){var t=["fc-timegrid-slot","fc-timegrid-slot-label",e.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return Lr(Yr.Consumer,null,(function(n){if(e.isLabeled){var r=n.dateEnv,i=n.options,o=n.viewApi,s=null==i.slotLabelFormat?da:Array.isArray(i.slotLabelFormat)?_t(i.slotLabelFormat[0]):_t(i.slotLabelFormat),a={level:0,time:e.time,date:r.toDate(e.date),view:o,text:r.format(e.date,s)};return Lr(oi,{hookProps:a,classNames:i.slotLabelClassNames,content:i.slotLabelContent,defaultContent:pa,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},(function(n,r,i,o){return Lr("td",{ref:n,className:t.concat(r).join(" "),"data-time":e.isoTimeStr},Lr("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},Lr("div",{className:"fc-timegrid-slot-label-cushion fc-scrollgrid-shrink-cushion",ref:i},o)))}))}return Lr("td",{className:t.join(" "),"data-time":e.isoTimeStr})}))}function pa(e){return e.text}function fa(e,t,n,r,i){for(var o=new Date(0),s=e,a=$e(0),l=n||function(e){var t,n,r;for(t=la.length-1;t>=0;t--)if(null!==(r=Qe(n=$e(la[t]),e))&&r>1)return n;return e}(r),c=[];Je(s)<Je(t);){var u=i.add(o,s),d=null!==Qe(a,l);c.push({date:u,time:s,key:u.toISOString(),isoTimeStr:nt(u),isLabeled:d}),s=Ke(s,r),a=Ke(a,r)}return c}var ma=_t({week:"short"}),ga=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allDaySplitter=new sa,t.headerElRef=Nr(),t.rootElRef=Nr(),t.scrollerElRef=Nr(),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,i=t.props.dateProfile.renderRange,o=ye(i.start,i.end),s=n.navLinks&&1===o?{"data-navlink":fr(i.start,"week"),tabIndex:0}:{};return n.weekNumbers?Lr(ns,{date:i.start,defaultFormat:ma},(function(t,n,i,o){return Lr("th",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Lr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame fc-timegrid-axis-frame-liquid",style:{height:e}},Lr("a",r({ref:i,className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner"},s),o)))})):Lr("th",{className:"fc-timegrid-axis"},Lr("div",{className:"fc-timegrid-axis-frame",style:{height:e}}))},t.renderTableRowAxis=function(e){var n=t.context,r=n.options,i=n.viewApi,o={text:r.allDayText,view:i};return Lr(oi,{hookProps:o,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:va,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(t,n,r,i){return Lr("td",{ref:t,className:["fc-timegrid-axis","fc-scrollgrid-shrink"].concat(n).join(" ")},Lr("div",{className:"fc-timegrid-axis-frame fc-scrollgrid-shrink-frame"+(null==e?" fc-timegrid-axis-frame-liquid":""),style:{height:e}},Lr("span",{className:"fc-timegrid-axis-cushion fc-scrollgrid-shrink-cushion fc-scrollgrid-sync-inner",ref:r},i)))}))},t.handleSlatCoords=function(e){t.setState({slatCoords:e})},t}return n(t,e),t.prototype.renderSimpleLayout=function(e,t,n){var r=this.context,i=this.props,o=[],s=Bo(r.options);return e&&o.push({type:"header",key:"header",isSticky:s,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),t&&(o.push({type:"body",key:"all-day",chunk:{content:t}}),o.push({type:"body",key:"all-day-divider",outerContent:Lr("tr",{className:"fc-scrollgrid-section"},Lr("td",{className:"fc-timegrid-divider "+r.theme.getClass("tableCellShaded")}))})),o.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(r.options.expandRows),chunk:{scrollerElRef:this.scrollerElRef,content:n}}),Lr(pi,{viewSpec:r.viewSpec,elRef:this.rootElRef},(function(e,t){return Lr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Lr(zo,{liquid:!i.isHeightAuto&&!i.forPrint,cols:[{width:"shrink"}],sections:o}))}))},t.prototype.renderHScrollLayout=function(e,t,n,r,i,o,s){var a=this,l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");var c=this.context,u=this.props,d=!u.forPrint&&Bo(c.options),h=!u.forPrint&&Uo(c.options),p=[];e&&p.push({type:"header",key:"header",isSticky:d,syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Lr("tr",null,a.renderHeadAxis(e.rowSyncHeights[0]))}},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),t&&(p.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:function(e){return Lr("tr",null,a.renderTableRowAxis(e.rowSyncHeights[0]))}},{key:"cols",content:t}]}),p.push({key:"all-day-divider",type:"body",outerContent:Lr("tr",{className:"fc-scrollgrid-section"},Lr("td",{colSpan:2,className:"fc-timegrid-divider "+c.theme.getClass("tableCellShaded")}))}));var f=c.options.nowIndicator;return p.push({type:"body",key:"body",liquid:!0,expandRows:Boolean(c.options.expandRows),chunks:[{key:"axis",content:function(e){return Lr("div",{className:"fc-timegrid-axis-chunk"},Lr("table",{style:{height:e.expandRows?e.clientHeight:""}},e.tableColGroupNode,Lr("tbody",null,Lr(ya,{slatMetas:o}))),Lr("div",{className:"fc-timegrid-now-indicator-container"},Lr(_o,{unit:f?"minute":"day"},(function(e){var t=f&&s&&s.safeComputeTop(e);return"number"==typeof t?Lr(Go,{isAxis:!0,date:e},(function(e,n,r,i){return Lr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(n).join(" "),style:{top:t}},i)})):null}))))}},{key:"cols",scrollerElRef:this.scrollerElRef,content:n}]}),h&&p.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Ho},{key:"cols",content:Ho}]}),Lr(pi,{viewSpec:c.viewSpec,elRef:this.rootElRef},(function(e,t){return Lr("div",{className:["fc-timegrid"].concat(t).join(" "),ref:e},Lr(l,{liquid:!u.isHeightAuto&&!u.forPrint,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:r,minWidth:i}]}],sections:p}))}))},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}(ti);function va(e){return e.text}var ya=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 Lr("tr",{key:e.key},Lr(ha,r({},e)))}))},t}(Br);function ba(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 _a(e,t){var n=[];if(e){for(s=0;s<t;s++)n[s]={affectedInstances:e.affectedInstances,isEvent:e.isEvent,segs:[]};for(var r=0,i=e.segs;r<i.length;r++){var o=i[r];n[o.col].segs.push(o)}}else for(var s=0;s<t;s++)n[s]=null;return n}function wa(e,t,n,r){for(var i=0,o=e;i<o.length;i++){var s=o[i];s.top=n.computeDateTop(s.start,t),s.bottom=Math.max(s.top+(r||0),n.computeDateTop(s.end,t))}}function xa(e,t,n){void 0===n&&(n=[]);for(var r=0;r<t.length;r++)i=e,o=t[r],i.bottom>o.top&&i.top<o.bottom&&n.push(t[r]);var i,o;return n}function Sa(e){var t,n,r=e.forwardSegs,i=0;if(null==e.forwardPressure){for(t=0;t<r.length;t++)Sa(n=r[t]),i=Math.max(i,1+n.forwardPressure);e.forwardPressure=i}}function ka(e,t,n,r){var i,o=e.forwardSegs;if(null==e.forwardCoord)for(o.length?(function(e,t){var n=e.map(Ta),r=[{field:"forwardPressure",order:-1},{field:"backwardCoord",order:1}].concat(t);n.sort((function(e,t){return se(e,t,r)})),n.map((function(e){return e._seg}))}(o,r),ka(o[0],t+1,n,r),e.forwardCoord=o[0].backwardCoord):e.forwardCoord=1,e.backwardCoord=e.forwardCoord-(e.forwardCoord-n)/(t+1),i=0;i<o.length;i++)ka(o[i],0,e.forwardCoord,r)}function Ta(e){var t=fn(e);return t.forwardPressure=e.forwardPressure,t.backwardCoord=e.backwardCoord,t}var Ea=_t({hour:"numeric",minute:"2-digit",meridiem:!1}),Ca=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"),Lr(Wo,r({},this.props,{defaultTimeFormat:Ea,extraClassNames:e}))},t}(Br);no.timeGridEventCondensedHeight=30;var Da=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,i=t.eventDrag&&t.eventDrag.segs||t.eventResize&&t.eventResize.segs||n&&t.dateSelectionSegs||[],o=t.eventDrag&&t.eventDrag.affectedInstances||t.eventResize&&t.eventResize.affectedInstances||{};return Lr(Zo,{elRef:t.elRef,date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps},(function(s,a,l){return Lr("td",r({ref:s,className:["fc-timegrid-col"].concat(a,t.extraClassNames||[]).join(" ")},l,t.extraDataAttrs),Lr("div",{className:"fc-timegrid-col-frame"},Lr("div",{className:"fc-timegrid-col-bg"},e.renderFillSegs(t.businessHourSegs,"non-business"),e.renderFillSegs(t.bgEventSegs,"bg-event"),e.renderFillSegs(t.dateSelectionSegs,"highlight")),Lr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(t.fgEventSegs,o)),Lr("div",{className:"fc-timegrid-col-events"},e.renderFgSegs(i,{},Boolean(t.eventDrag),Boolean(t.eventResize),Boolean(n))),Lr("div",{className:"fc-timegrid-now-indicator-container"},e.renderNowIndicator(t.nowIndicatorSegs)),Lr(Ma,{date:t.date,dateProfile:t.dateProfile,todayRange:t.todayRange,extraHookProps:t.extraHookProps})))}))},t.prototype.renderFgSegs=function(e,t,n,r,i){var o=this.props;return o.forPrint?this.renderPrintFgSegs(e):o.slatCoords?this.renderPositionedFgSegs(e,t,n,r,i):void 0},t.prototype.renderPrintFgSegs=function(e){var t=this.props;return(e=pn(e,this.context.options.eventOrder)).map((function(e){return Lr("div",{className:"fc-timegrid-event-harness",key:e.eventRange.instance.instanceId},Lr(Ca,r({seg:e,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isCondensed:!1},bn(e,t.todayRange,t.nowDate))))}))},t.prototype.renderPositionedFgSegs=function(e,t,n,i,o){var s=this,a=this.context,l=this.props;return(e=function(e,t,n,r,i){return wa(e,t,n,r),function(e,t){for(var n=0,r=e;n<r.length;n++)(u=r[n]).level=null,u.forwardCoord=null,u.backwardCoord=null,u.forwardPressure=null;var i,o=function(e){var t,n,r,i=[];for(t=0;t<e.length;t++){for(n=e[t],r=0;r<i.length&&xa(n,i[r]).length;r++);n.level=r,(i[r]||(i[r]=[])).push(n)}return i}(e=pn(e,t));if(function(e){var t,n,r,i,o;for(t=0;t<e.length;t++)for(n=e[t],r=0;r<n.length;r++)for((i=n[r]).forwardSegs=[],o=t+1;o<e.length;o++)xa(i,e[o],i.forwardSegs)}(o),i=o[0]){for(var s=0,a=i;s<a.length;s++)Sa(u=a[s]);for(var l=0,c=i;l<c.length;l++){var u;ka(u=c[l],0,0,t)}}return e}(e,i)}(e,l.date,l.slatCoords,a.options.eventMinHeight,a.options.eventOrder)).map((function(e){var a=e.eventRange.instance.instanceId,c=n||i||o?r({left:0,right:0},s.computeSegTopBottomCss(e)):s.computeFgSegPositionCss(e);return Lr("div",{className:"fc-timegrid-event-harness"+(e.level>0?" fc-timegrid-event-harness-inset":""),key:a,style:r({visibility:t[a]?"hidden":""},c)},Lr(Ca,r({seg:e,isDragging:n,isResizing:i,isDateSelecting:o,isSelected:a===l.eventSelection,isCondensed:e.bottom-e.top<no.timeGridEventCondensedHeight},bn(e,l.todayRange,l.nowDate))))}))},t.prototype.renderFillSegs=function(e,t){var n=this,i=this.context,o=this.props;if(o.slatCoords){wa(e,o.date,o.slatCoords,i.options.eventMinHeight);var s=e.map((function(e){return Lr("div",{key:wn(e.eventRange),className:"fc-timegrid-bg-harness",style:n.computeSegTopBottomCss(e)},"bg-event"===t?Lr(es,r({seg:e},bn(e,o.todayRange,o.nowDate))):Qo(t))}));return Lr(Rr,null,s)}},t.prototype.renderNowIndicator=function(e){var t=this.props,n=t.slatCoords,r=t.date;if(n)return e.map((function(e,t){return Lr(Go,{isAxis:!1,date:r,key:t},(function(t,i,o,s){return Lr("div",{ref:t,className:["fc-timegrid-now-indicator-line"].concat(i).join(" "),style:{top:n.computeDateTop(e.start,r)}},s)}))}))},t.prototype.computeFgSegPositionCss=function(e){var t,n,i=this.context,o=i.isRtl,s=i.options.slotEventOverlap,a=e.backwardCoord,l=e.forwardCoord;s&&(l=Math.min(1,a+2*(l-a))),o?(t=1-l,n=a):(t=a,n=1-l);var c={zIndex:e.level+1,left:100*t+"%",right:100*n+"%"};return s&&e.forwardPressure&&(c[o?"marginLeft":"marginRight"]=20),r(r({},c),this.computeSegTopBottomCss(e))},t.prototype.computeSegTopBottomCss=function(e){return{top:e.top,bottom:-e.bottom}},t}(Br),Ma=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 Lr(Xo,{date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraHookProps:e.extraHookProps},(function(e,t){return t&&Lr("div",{className:"fc-timegrid-col-misc",ref:e},t)}))},t}(Br),Aa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.splitFgEventSegs=ot(ba),t.splitBgEventSegs=ot(ba),t.splitBusinessHourSegs=ot(ba),t.splitNowIndicatorSegs=ot(ba),t.splitDateSelectionSegs=ot(ba),t.splitEventDrag=ot(_a),t.splitEventResize=ot(_a),t.rootElRef=Nr(),t.cellElRefs=new Ao,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,i=this.splitFgEventSegs(t.fgEventSegs,r),o=this.splitBgEventSegs(t.bgEventSegs,r),s=this.splitBusinessHourSegs(t.businessHourSegs,r),a=this.splitNowIndicatorSegs(t.nowIndicatorSegs,r),l=this.splitDateSelectionSegs(t.dateSelectionSegs,r),c=this.splitEventDrag(t.eventDrag,r),u=this.splitEventResize(t.eventResize,r);return Lr("div",{className:"fc-timegrid-cols",ref:this.rootElRef},Lr("table",{style:{minWidth:t.tableMinWidth,width:t.clientWidth}},t.tableColGroupNode,Lr("tbody",null,Lr("tr",null,t.axis&&Lr("td",{className:"fc-timegrid-col fc-timegrid-axis"},Lr("div",{className:"fc-timegrid-col-frame"},Lr("div",{className:"fc-timegrid-now-indicator-container"},"number"==typeof n&&Lr(Go,{isAxis:!0,date:t.nowDate},(function(e,t,r,i){return Lr("div",{ref:e,className:["fc-timegrid-now-indicator-arrow"].concat(t).join(" "),style:{top:n}},i)}))))),t.cells.map((function(n,r){return Lr(Da,{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:i[r],bgEventSegs:o[r],businessHourSegs:s[r],nowIndicatorSegs:a[r],dateSelectionSegs:l[r],eventDrag:c[r],eventResize:u[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 Er(this.rootElRef.current,(e=this.cellElRefs.currentMap,t.cells.map((function(t){return e[t.key]}))),!0,!1))},t}(Br),Ia=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.processSlotOptions=ot(La),t.state={slatCoords:null},t.handleScrollRequest=function(e){var n=t.props.onScrollTopRequest,r=t.state.slatCoords;if(n&&r){if(e.time){var i=r.computeTimeTop(e.time);(i=Math.ceil(i))&&i++,n(i)}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 Lr("div",{className:"fc-timegrid-body",ref:e.rootElRef,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},Lr(ca,{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}),Lr(Aa,{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,i=n.options,o=this.colCoords,s=this.props.dateProfile,a=this.state.slatCoords,l=this.processSlotOptions(this.props.slotDuration,i.snapDuration),c=l.snapDuration,u=l.snapsPerSlot,d=o.leftToIndex(e),h=a.positions.topToIndex(t);if(null!=d&&null!=h){var p=a.positions.tops[h],f=a.positions.getHeight(h),m=(t-p)/f,g=h*u+Math.floor(m*u),v=this.props.cells[d].date,y=Ke(s.slotMinTime,Ze(c,g)),b=r.add(v,y);return{col:d,dateSpan:{range:{start:b,end:r.add(b,c)},allDay:!1},dayEl:o.els[d],relativeRect:{left:o.lefts[d],right:o.rights[d],top:p,bottom:p+f}}}},t}(Br);function La(e,t){var n=t||e,r=Qe(e,n);return null===r&&(n=e,r=1),{snapDuration:n,snapsPerSlot:r}}var Oa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildDayRanges=ot(Na),t.slicer=new Ra,t.timeColsRef=Nr(),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,i=t.dateProfile,o=t.dayTableModel,s=n.options.nowIndicator,a=this.buildDayRanges(o,i,n.dateEnv);return Lr(_o,{unit:s?"minute":"day"},(function(l,c){return Lr(Ia,r({ref:e.timeColsRef,rootElRef:e.handleRootEl},e.slicer.sliceProps(t,i,null,n,a),{forPrint:t.forPrint,axis:t.axis,dateProfile:i,slatMetas:t.slatMetas,slotDuration:t.slotDuration,cells:o.cells[0],tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,expandRows:t.expandRows,nowDate:l,nowIndicatorSegs:s&&e.slicer.sliceNowDate(l,n,a),todayRange:c,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}(ti);function Na(e,t,n){for(var r=[],i=0,o=e.headerDates;i<o.length;i++){var s=o[i];r.push({start:n.add(s,t.slotMinTime),end:n.add(s,t.slotMaxTime)})}return r}var Ra=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 i=tn(e,t[r]);i&&n.push({start:i.start,end:i.end,isStart:i.start.valueOf()===e.start.valueOf(),isEnd:i.end.valueOf()===e.end.valueOf(),col:r})}return n},t}(Eo),Pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buildTimeColsModel=ot(Fa),t.buildSlatMetas=ot(fa),t}return n(t,e),t.prototype.render=function(){var e=this,t=this.context,n=t.options,i=t.dateEnv,o=t.dateProfileGenerator,s=this.props,a=s.dateProfile,l=this.buildTimeColsModel(a,o),c=this.allDaySplitter.splitProps(s),u=this.buildSlatMetas(a.slotMinTime,a.slotMaxTime,n.slotLabelInterval,n.slotDuration,i),d=n.dayMinWidth,h=!d,p=d,f=n.dayHeaders&&Lr(xo,{dates:l.headerDates,dateProfile:a,datesRepDistinctDays:!0,renderIntro:h?this.renderHeadAxis:null}),m=!1!==n.allDaySlot&&function(t){return Lr(ta,r({},c.allDay,{dateProfile:a,dayTableModel:l,nextDayThreshold:n.nextDayThreshold,tableMinWidth:t.tableMinWidth,colGroupNode:t.tableColGroupNode,renderRowIntro:h?e.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:e.headerElRef,clientWidth:t.clientWidth,clientHeight:t.clientHeight,forPrint:s.forPrint},e.getAllDayMaxEventProps()))},g=function(t){return Lr(Oa,r({},c.timed,{dayTableModel:l,dateProfile:a,axis:h,slotDuration:n.slotDuration,slatMetas:u,forPrint:s.forPrint,tableColGroupNode:t.tableColGroupNode,tableMinWidth:t.tableMinWidth,clientWidth:t.clientWidth,clientHeight:t.clientHeight,onSlatCoords:e.handleSlatCoords,expandRows:t.expandRows,onScrollTopRequest:e.handleScrollTopRequest}))};return p?this.renderHScrollLayout(f,m,g,l.colCnt,d,u,this.state.slatCoords):this.renderSimpleLayout(f,m,g)},t}(ga);function Fa(e,t){var n=new ko(e.renderRange,t);return new To(n,!1)}var ja=ni({initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:Pa,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}}),Ya=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,i=this.context,o=i.theme,s=i.dateEnv,a=i.options,l=i.viewApi,c=hr(t,n),u=a.listDayFormat?s.format(t,a.listDayFormat):"",d=a.listDaySideFormat?s.format(t,a.listDaySideFormat):"",h=a.navLinks?fr(t):null,p=r({date:s.toDate(t),view:l,text:u,sideText:d,navLinkData:h},c),f=["fc-list-day"].concat(pr(c,o));return Lr(oi,{hookProps:p,classNames:a.dayHeaderClassNames,content:a.dayHeaderContent,defaultContent:Va,didMount:a.dayHeaderDidMount,willUnmount:a.dayHeaderWillUnmount},(function(e,n,r,i){return Lr("tr",{ref:e,className:f.concat(n).join(" "),"data-date":tt(t)},Lr("th",{colSpan:3},Lr("div",{className:"fc-list-day-cushion "+o.getClass("tableCellShaded"),ref:r},i)))}))},t}(Br);function Va(e){var t=e.navLinkData?{"data-navlink":e.navLinkData,tabIndex:0}:{};return Lr(Rr,null,e.text&&Lr("a",r({className:"fc-list-day-text"},t),e.text),e.sideText&&Lr("a",r({className:"fc-list-day-side-text"},t),e.sideText))}var Ha=_t({hour:"numeric",minute:"2-digit",meridiem:"short"}),Ba=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||Ha;return Lr(qo,{seg:n,timeText:"",disableDragging:!0,disableResizing:!0,defaultContent:Ua,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,isSelected:e.isSelected,isDragging:e.isDragging,isResizing:e.isResizing,isDateSelecting:e.isDateSelecting},(function(e,i,o,s,a){return Lr("tr",{className:["fc-list-event",a.event.url?"fc-event-forced-url":""].concat(i).join(" "),ref:e},function(e,t,n){var r=n.options;if(!1!==r.displayEventTime){var i=e.eventRange.def,o=e.eventRange.instance,s=!1,a=void 0;if(i.allDay?s=!0:Xt(e.eventRange.range)?e.isStart?a=yn(e,t,n,null,null,o.range.start,e.end):e.isEnd?a=yn(e,t,n,null,null,e.start,o.range.end):s=!0:a=yn(e,t,n),s){var l={text:n.options.allDayText,view:n.viewApi};return Lr(oi,{hookProps:l,classNames:r.allDayClassNames,content:r.allDayContent,defaultContent:za,didMount:r.allDayDidMount,willUnmount:r.allDayWillUnmount},(function(e,t,n,r){return Lr("td",{className:["fc-list-event-time"].concat(t).join(" "),ref:e},r)}))}return Lr("td",{className:"fc-list-event-time"},a)}return null}(n,r,t),Lr("td",{className:"fc-list-event-graphic"},Lr("span",{className:"fc-list-event-dot",style:{borderColor:a.borderColor||a.backgroundColor}})),Lr("td",{className:"fc-list-event-title",ref:o},s))}))},t}(Br);function Ua(e){var t=e.event,n=t.url;return Lr("a",r({},n?{href:n}:{}),t.title)}function za(e){return e.text}var qa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.computeDateVars=ot($a),t.eventStoreToSegs=ot(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":""],i=this.computeDateVars(t.dateProfile),o=i.dayDates,s=i.dayRanges,a=this.eventStoreToSegs(t.eventStore,t.eventUiBases,s);return Lr(pi,{viewSpec:n.viewSpec,elRef:this.setRootEl},(function(n,i){return Lr("div",{ref:n,className:r.concat(i).join(" ")},Lr(Mo,{liquid:!t.isHeightAuto,overflowX:t.isHeightAuto?"visible":"hidden",overflowY:t.isHeightAuto?"visible":"auto"},a.length>0?e.renderSegList(a,o):e.renderEmptyMessage()))}))},t.prototype.renderEmptyMessage=function(){var e=this.context,t=e.options,n=e.viewApi,r={text:t.noEventsText,view:n};return Lr(oi,{hookProps:r,classNames:t.noEventsClassNames,content:t.noEventsContent,defaultContent:Wa,didMount:t.noEventsDidMount,willUnmount:t.noEventsWillUnmount},(function(e,t,n,r){return Lr("div",{className:["fc-list-empty"].concat(t).join(" "),ref:e},Lr("div",{className:"fc-list-empty-cushion",ref:n},r))}))},t.prototype.renderSegList=function(e,t){var n=this.context,i=n.theme,o=n.options,s=function(e){var t,n,r=[];for(t=0;t<e.length;t++)(r[(n=e[t]).dayIndex]||(r[n.dayIndex]=[])).push(n);return r}(e);return Lr(_o,{unit:"day"},(function(e,n){for(var a=[],l=0;l<s.length;l++){var c=s[l];if(c){var u=t[l].toISOString();a.push(Lr(Ya,{key:u,dayDate:t[l],todayRange:n}));for(var d=0,h=c=pn(c,o.eventOrder);d<h.length;d++){var p=h[d];a.push(Lr(Ba,r({key:u+":"+p.eventRange.instance.instanceId,seg:p,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1},bn(p,n,e))))}}}return Lr("table",{className:"fc-list-table "+i.getClass("table")},Lr("tbody",null,a))}))},t.prototype._eventStoreToSegs=function(e,t,n){return this.eventRangesToSegs(an(e,t,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,n)},t.prototype.eventRangesToSegs=function(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var o=i[r];n.push.apply(n,this.eventRangeToSegs(o,t))}return n},t.prototype.eventRangeToSegs=function(e,t){var n,r,i,o=this.context.dateEnv,s=this.context.options.nextDayThreshold,a=e.range,l=e.def.allDay,c=[];for(n=0;n<t.length;n++)if((r=tn(a,t[n]))&&(i={component:this,eventRange:e,start:r.start,end:r.end,isStart:e.isStart&&r.start.valueOf()===a.start.valueOf(),isEnd:e.isEnd&&r.end.valueOf()===a.end.valueOf(),dayIndex:n},c.push(i),!i.isEnd&&!l&&n+1<t.length&&a.end<o.add(t[n+1].start,s))){i.end=a.end,i.isEnd=!0;break}return c},t}(ti);function Wa(e){return e.text}function $a(e){for(var t=xe(e.renderRange.start),n=e.renderRange.end,r=[],i=[];t<n;)r.push(t),i.push({start:t,end:me(t,1)}),t=me(t,1);return{dayDates:r,dayRanges:i}}function Ga(e){return!1===e?null:_t(e)}var Ka=ni({optionRefiners:{listDayFormat:Ga,listDaySideFormat:Ga,noEventsClassNames:At,noEventsContent:At,noEventsDidMount:At,noEventsWillUnmount:At},views:{list:{component:qa,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"}}}}),Za=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t}(Ar);Za.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"},Za.prototype.baseIconClass="fa",Za.prototype.iconClasses={close:"fa-times",prev:"fa-chevron-left",next:"fa-chevron-right",prevYear:"fa-angle-double-left",nextYear:"fa-angle-double-right"},Za.prototype.rtlIconClasses={prev:"fa-chevron-right",next:"fa-chevron-left",prevYear:"fa-angle-double-right",nextYear:"fa-angle-double-left"},Za.prototype.iconOverrideOption="bootstrapFontAwesome",Za.prototype.iconOverrideCustomButtonOption="bootstrapFontAwesome",Za.prototype.iconOverridePrefix="fa-";var Xa=ni({themeClasses:{bootstrap:Za}}),Ja=ni({eventSourceDefs:[{parseMeta:function(e){var t=e.googleCalendarId;return!t&&e.url&&(t=function(e){var t;return/^[^/]+@([^/.]+\.)*(google|googlemail|gmail)\.com$/.test(e)?e:(t=/^https:\/\/www.googleapis.com\/calendar\/v3\/calendars\/([^/]*)/.exec(e))||(t=/^https?:\/\/www.google.com\/calendar\/feeds\/([^/]*)/.exec(e))?decodeURIComponent(t[1]):void 0}(e.url)),t?{googleCalendarId:t,googleCalendarApiKey:e.googleCalendarApiKey,googleCalendarApiBase:e.googleCalendarApiBase,extraParams:e.extraParams}:null},fetch:function(e,t,n){var i=e.context,o=i.dateEnv,s=i.options,a=e.eventSource.meta,l=a.googleCalendarApiKey||s.googleCalendarApiKey;if(l){var c=function(e){var t=e.googleCalendarApiBase;return t||(t="https://www.googleapis.com/calendar/v3/calendars"),t+"/"+encodeURIComponent(e.googleCalendarId)+"/events"}(a),u=a.extraParams,d="function"==typeof u?u():u,h=function(e,t,n,i){var o,s,a;return i.canComputeOffset?(s=i.formatIso(e.start),a=i.formatIso(e.end)):(s=me(e.start,-1).toISOString(),a=me(e.end,1).toISOString()),o=r(r({},n||{}),{key:t,timeMin:s,timeMax:a,singleEvents:!0,maxResults:9999}),"local"!==i.timeZone&&(o.timeZone=i.timeZone),o}(e.range,l,d,o);Li("GET",c,h,(function(e,r){var i,o;e.error?n({message:"Google Calendar API: "+e.error.message,errors:e.error.errors,xhr:r}):t({rawEvents:(i=e.items,o=h.timeZone,i.map((function(e){return function(e,t){var n=e.htmlLink||null;return n&&t&&(n=function(e,t){return e.replace(/(\?.*?)?(#|$)/,(function(e,n,r){return(n?n+"&":"?")+t+r}))}(n,"ctz="+t)),{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,o)}))),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:At}});return Ri.push(Is,oa,ja,Ka,Xa,Ja),e.BASE_OPTION_DEFAULTS=xt,e.BASE_OPTION_REFINERS=wt,e.BaseComponent=Br,e.BgEvent=es,e.BootstrapTheme=Za,e.Calendar=is,e.CalendarApi=jn,e.CalendarContent=uo,e.CalendarDataManager=Hi,e.CalendarDataProvider=Xi,e.CalendarRoot=fo,e.Component=Ir,e.ContentHook=ai,e.CustomContentRenderContext=si,e.DateComponent=ti,e.DateEnv=$n,e.DateProfileGenerator=yi,e.DayCellContent=Xo,e.DayCellRoot=Zo,e.DayGridView=ra,e.DayHeader=xo,e.DaySeriesModel=ko,e.DayTable=ta,e.DayTableModel=To,e.DayTableSlicer=na,e.DayTimeCols=Oa,e.DayTimeColsSlicer=Ra,e.DayTimeColsView=Pa,e.DelayedRunner=ji,e.Draggable=Ds,e.ElementDragging=to,e.ElementScrollController=Dr,e.Emitter=Tr,e.EventApi=Yn,e.EventRoot=qo,e.EventSourceApi=j,e.FeaturefulElementDragging=gs,e.Fragment=Rr,e.Interaction=Ji,e.ListView=qa,e.MountHook=ci,e.NamedTimeZoneImpl=function(e){this.timeZoneName=e},e.NowIndicatorRoot=Go,e.NowTimer=_o,e.PointerDragging=ls,e.PositionCache=Er,e.RefMap=Ao,e.RenderHook=oi,e.ScrollController=Cr,e.ScrollResponder=jr,e.Scroller=Mo,e.SimpleScrollGrid=zo,e.Slicer=Eo,e.Splitter=ur,e.StandardEvent=Wo,e.Table=Js,e.TableDateCell=vo,e.TableDowCell=yo,e.TableView=Ls,e.Theme=Ar,e.ThirdPartyDraggable=As,e.TimeCols=Ia,e.TimeColsSlatsCoords=aa,e.TimeColsView=ga,e.ViewApi=On,e.ViewContextType=Yr,e.ViewRoot=pi,e.WeekNumberRoot=ns,e.WindowScrollController=Mr,e.addDays=me,e.addDurations=Ke,e.addMs=ge,e.addWeeks=fe,e.allowContextMenu=ie,e.allowSelection=ne,e.applyMutationToEventStore=An,e.applyStyle=z,e.applyStyleProp=q,e.asCleanDays=function(e){return e.years||e.months||e.milliseconds?0:e.days},e.asRoughMinutes=function(e){return Je(e)/6e4},e.asRoughMs=Je,e.asRoughSeconds=function(e){return Je(e)/1e3},e.buildClassNameNormalizer=ui,e.buildDayRanges=Na,e.buildDayTableModel=ia,e.buildEventApis=Hn,e.buildEventRangeKey=wn,e.buildHashFromArray=function(e,t){for(var n={},r=0;r<e.length;r++){var i=t(e[r],r);n[i[0]]=i[1]}return n},e.buildNavLinkData=fr,e.buildSegCompareObj=fn,e.buildSegTimeText=yn,e.buildSlatMetas=fa,e.buildTimeColsModel=Fa,e.collectFromHash=Be,e.combineEventUis=Yt,e.compareByFieldSpec=ae,e.compareByFieldSpecs=se,e.compareNumbers=ue,e.compareObjs=Ve,e.computeEdges=_r,e.computeFallbackHeaderFormat=mo,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=wr,e.computeRect=xr,e.computeSegDraggable=mn,e.computeSegEndResizable=vn,e.computeSegStartResizable=gn,e.computeShrinkWidth=Io,e.computeSmallestCellWidth=he,e.computeVisibleDayRange=Zt,e.config=no,e.constrainPoint=or,e.createContext=Pr,e.createDuration=$e,e.createElement=Lr,e.createEmptyEventStore=function(){return{defs:{},instances:{}}},e.createEventInstance=Ie,e.createEventUi=jt,e.createFormatter=_t,e.createPlugin=ni,e.createRef=Nr,e.diffDates=Jt,e.diffDayAndTime=be,e.diffDays=ye,e.diffPoints=ar,e.diffWeeks=ve,e.diffWholeDays=we,e.diffWholeWeeks=_e,e.disableCursor=Q,e.elementClosest=V,e.elementMatches=H,e.enableCursor=ee,e.eventTupleToStore=Lt,e.filterEventStoreDefs=Rt,e.filterHash=Ne,e.findDirectChildren=function(e,t){for(var n=e instanceof HTMLElement?[e]:e,r=[],i=0;i<n.length;i++)for(var o=n[i].children,s=0;s<o.length;s++){var a=o[s];t&&!H(a,t)||r.push(a)}return r},e.findElements=B,e.flexibleCompare=le,e.flushToDom=Fr,e.formatDate=function(e,t){void 0===t&&(t={});var n=Qn(t),r=_t(t),i=n.createMarkerMeta(e);return i?n.format(i.marker,r,{forcedTzo:i.forcedTzo}):""},e.formatDayString=tt,e.formatIsoTimeString=nt,e.formatRange=function(e,t,n){var r=Qn("object"==typeof n&&n?n:{}),i=_t(n),o=r.createMarkerMeta(e),s=r.createMarkerMeta(t);return o&&s?r.formatRange(o.marker,s.marker,i,{forcedStartTzo:o.forcedTzo,forcedEndTzo:s.forcedTzo,isEndExclusive:n.isEndExclusive,defaultSeparator:xt.defaultRangeSeparator}):""},e.getAllowYScrolling=Oo,e.getCanVGrowWithinCell=lr,e.getClippingParents=Sr,e.getDateMeta=hr,e.getDayClassNames=pr,e.getDefaultEventEnd=Mn,e.getElSeg=un,e.getEventClassNames=_n,e.getIsRtlScrollbarOnLeft=vr,e.getRectCenter=sr,e.getRelevantEvents=Ot,e.getScrollGridClassNames=Yo,e.getScrollbarWidths=yr,e.getSectionClassNames=Vo,e.getSectionHasLiquidHeight=Lo,e.getSegMeta=bn,e.getSlotClassNames=function(e,t){var n=["fc-slot","fc-slot-"+pe[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=Uo,e.getStickyHeaderDates=Bo,e.getUnequalProps=Ye,e.globalLocales=Gn,e.globalPlugins=Ri,e.greatestDurationDenominator=et,e.guid=J,e.hasBgRendering=ln,e.hasShrinkWidth=jo,e.identity=At,e.interactionSettingsStore=eo,e.interactionSettingsToStore=Qi,e.intersectRanges=tn,e.intersectRects=ir,e.isArraysEqual=it,e.isColPropsEqual=Ro,e.isDateSpansEqual=kn,e.isInt=de,e.isInteractionValid=Gr,e.isMultiDayRange=Xt,e.isPropsEqual=je,e.isPropsValid=Zr,e.isValidDate=Me,e.listenBySelector=G,e.mapHash=Re,e.memoize=ot,e.memoizeArraylike=function(e,t,n){var r=[],i=[];return function(o){for(var s=r.length,a=o.length,l=0;l<s;l++)if(o[l]){if(!it(r[l],o[l])){n&&n(i[l]);var c=e.apply(this,o[l]);t&&t(c,i[l])||(i[l]=c)}}else n&&n(i[l]);for(;l<a;l++)i[l]=e.apply(this,o[l]);return r=o,i.splice(a),i}},e.memoizeHashlike=function(e,t,n){var r={},i={};return function(o){var s={};for(var a in o)if(i[a])if(it(r[a],o[a]))s[a]=i[a];else{n&&n(i[a]);var l=e.apply(this,o[a]);s[a]=t&&t(l,i[a])?i[a]:l}else s[a]=e.apply(this,o[a]);return r=o,i=s,s}},e.memoizeObjArg=st,e.mergeEventStores=Nt,e.multiplyDuration=Ze,e.padStart=ce,e.parseBusinessHours=nr,e.parseClassNames=Pt,e.parseDragMeta=io,e.parseEventDef=Gt,e.parseFieldSpecs=oe,e.parseMarker=Wn,e.pointInsideRect=rr,e.preventContextMenu=re,e.preventDefault=W,e.preventSelection=te,e.rangeContainsMarker=sn,e.rangeContainsRange=on,e.rangesEqual=nn,e.rangesIntersect=rn,e.refineEventDef=Wt,e.refineProps=Mt,e.removeElement=Y,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=No,e.renderFill=Qo,e.renderMicroColGroup=Po,e.renderScrollShim=Ho,e.requestJson=Li,e.sanitizeShrinkWidth=Fo,e.setElSeg=cn,e.setRef=qr,e.sliceEventStore=an,e.sliceEvents=function(e,t){return an(e.eventStore,e.eventUiBases,e.dateProfile.activeRange,t?e.nextDayThreshold:null).fg},e.sortEventSegs=pn,e.startOfDay=xe,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=Cn,e.unpromisify=kr,e.version="5.3.1",e.whenTransitionDone=Z,e.wholeDivideDurations=Qe,e}({});!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).jsSHA=t()}(this,(function(){"use strict";var e=function(t,n){return(e=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])})(t,n)},t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n(e,t,n,r){var i,o,s,a=t||[0],l=(n=n||0)>>>3,c=-1===r?3:0;for(i=0;i<e.length;i+=1)o=(s=i+l)>>>2,a.length<=o&&a.push(0),a[o]|=e[i]<<8*(c+r*(s%4));return{value:a,binLen:8*e.length+n}}function r(e,r,i){switch(r){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":return function(e,t,n){return function(e,t,n,r){var i,o,s,a;if(0!=e.length%2)throw new Error("String of HEX type must be in byte increments");var l=t||[0],c=(n=n||0)>>>3,u=-1===r?3:0;for(i=0;i<e.length;i+=2){if(o=parseInt(e.substr(i,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(s=(a=(i>>>1)+c)>>>2;l.length<=s;)l.push(0);l[s]|=o<<8*(u+r*(a%4))}return{value:l,binLen:4*e.length+n}}(e,t,n,i)};case"TEXT":return function(e,t,n){return function(e,t,n,r,i){var o,s,a,l,c,u,d,h,p=0,f=n||[0],m=(r=r||0)>>>3;if("UTF8"===t)for(d=-1===i?3:0,a=0;a<e.length;a+=1)for(s=[],128>(o=e.charCodeAt(a))?s.push(o):2048>o?(s.push(192|o>>>6),s.push(128|63&o)):55296>o||57344<=o?s.push(224|o>>>12,128|o>>>6&63,128|63&o):(a+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(a)),s.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),l=0;l<s.length;l+=1){for(c=(u=p+m)>>>2;f.length<=c;)f.push(0);f[c]|=s[l]<<8*(d+i*(u%4)),p+=1}else for(d=-1===i?2:0,h="UTF16LE"===t&&1!==i||"UTF16LE"!==t&&1===i,a=0;a<e.length;a+=1){for(o=e.charCodeAt(a),!0===h&&(o=(l=255&o)<<8|o>>>8),c=(u=p+m)>>>2;f.length<=c;)f.push(0);f[c]|=o<<8*(d+i*(u%4)),p+=2}return{value:f,binLen:8*p+r}}(e,r,t,n,i)};case"B64":return function(e,n,r){return function(e,n,r,i){var o,s,a,l,c,u,d=0,h=n||[0],p=(r=r||0)>>>3,f=-1===i?3:0,m=e.indexOf("=");if(-1===e.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(e=e.replace(/=/g,""),-1!==m&&m<e.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<e.length;o+=4){for(l=e.substr(o,4),a=0,s=0;s<l.length;s+=1)a|=t.indexOf(l.charAt(s))<<18-6*s;for(s=0;s<l.length-1;s+=1){for(c=(u=d+p)>>>2;h.length<=c;)h.push(0);h[c]|=(a>>>16-8*s&255)<<8*(f+i*(u%4)),d+=1}}return{value:h,binLen:8*d+r}}(e,n,r,i)};case"BYTES":return function(e,t,n){return function(e,t,n,r){var i,o,s,a,l=t||[0],c=(n=n||0)>>>3,u=-1===r?3:0;for(o=0;o<e.length;o+=1)i=e.charCodeAt(o),s=(a=o+c)>>>2,l.length<=s&&l.push(0),l[s]|=i<<8*(u+r*(a%4));return{value:l,binLen:8*e.length+n}}(e,t,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e,t,r){return function(e,t,r,i){return n(new Uint8Array(e),t,r,i)}(e,t,r,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e,t,r){return n(e,t,r,i)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function i(e,n,r,i){switch(e){case"HEX":return function(e){return function(e,t,n,r){var i,o,s="",a=t/8,l=-1===n?3:0;for(i=0;i<a;i+=1)o=e[i>>>2]>>>8*(l+n*(i%4)),s+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return r.outputUpper?s.toUpperCase():s}(e,n,r,i)};case"B64":return function(e){return function(e,n,r,i){var o,s,a,l,c,u="",d=n/8,h=-1===r?3:0;for(o=0;o<d;o+=3)for(l=o+1<d?e[o+1>>>2]:0,c=o+2<d?e[o+2>>>2]:0,a=(e[o>>>2]>>>8*(h+r*(o%4))&255)<<16|(l>>>8*(h+r*((o+1)%4))&255)<<8|c>>>8*(h+r*((o+2)%4))&255,s=0;s<4;s+=1)u+=8*o+6*s<=n?t.charAt(a>>>6*(3-s)&63):i.b64Pad;return u}(e,n,r,i)};case"BYTES":return function(e){return function(e,t,n){var r,i,o="",s=t/8,a=-1===n?3:0;for(r=0;r<s;r+=1)i=e[r>>>2]>>>8*(a+n*(r%4))&255,o+=String.fromCharCode(i);return o}(e,n,r)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=new ArrayBuffer(i),s=new Uint8Array(o),a=-1===n?3:0;for(r=0;r<i;r+=1)s[r]=e[r>>>2]>>>8*(a+n*(r%4))&255;return o}(e,n,r)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=-1===n?3:0,s=new Uint8Array(i);for(r=0;r<i;r+=1)s[r]=e[r>>>2]>>>8*(o+n*(r%4))&255;return s}(e,n,r)};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],s=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],a=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function l(e){var t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=e||{},r="Output length must be a multiple of 8";if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(r);t.outputLen=n.shakeLen}if("boolean"!=typeof t.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw new Error("Invalid b64Pad formatting option");return t}function c(e,t){return e>>>t|e<<32-t}function u(e,t){return e>>>t}function d(e,t,n){return e&t^~e&n}function h(e,t,n){return e&t^e&n^t&n}function p(e){return c(e,2)^c(e,13)^c(e,22)}function f(e,t){var n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function m(e,t,n,r){var i=(65535&e)+(65535&t)+(65535&n)+(65535&r);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16))<<16|65535&i}function g(e,t,n,r,i){var o=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(o>>>16))<<16|65535&o}function v(e){return c(e,7)^c(e,18)^u(e,3)}function y(e){return c(e,6)^c(e,11)^c(e,25)}function b(e){return"SHA-224"==e?s.slice():a.slice()}function _(e,t){var n,r,i,s,a,l,b,_,w,x,S,k,T=[];for(n=t[0],r=t[1],i=t[2],s=t[3],a=t[4],l=t[5],b=t[6],_=t[7],S=0;S<64;S+=1)T[S]=S<16?e[S]:m(c(k=T[S-2],17)^c(k,19)^u(k,10),T[S-7],v(T[S-15]),T[S-16]),w=g(_,y(a),d(a,l,b),o[S],T[S]),x=f(p(n),h(n,r,i)),_=b,b=l,l=a,a=f(s,w),s=i,i=r,r=n,n=f(w,x);return t[0]=f(n,t[0]),t[1]=f(r,t[1]),t[2]=f(i,t[2]),t[3]=f(s,t[3]),t[4]=f(a,t[4]),t[5]=f(l,t[5]),t[6]=f(b,t[6]),t[7]=f(_,t[7]),t}return function(t){function n(e,n,i){var o=this;if("SHA-224"!==e&&"SHA-256"!==e)throw new Error("Chosen SHA variant is not supported");var s=i||{};return(o=t.call(this,e,n,i)||this).t=o.i,o.o=!0,o.u=-1,o.s=r(o.h,o.v,o.u),o.A=_,o.p=function(e){return e.slice()},o.l=b,o.R=function(t,n,r,i){return function(e,t,n,r,i){for(var o,s=15+(t+65>>>9<<4),a=t+n;e.length<=s;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[s]=4294967295&a,e[s-1]=a/4294967296|0,o=0;o<e.length;o+=16)r=_(e.slice(o,o+16),r);return"SHA-224"===i?[r[0],r[1],r[2],r[3],r[4],r[5],r[6]]:r}(t,n,r,i,e)},o.U=b(e),o.T=512,o.m="SHA-224"===e?224:256,o.F=!1,s.hmacKey&&o.B(function(e,t,n,i){var o="hmacKey must include a value and format";if(!t)throw new Error(o);if(void 0===t.value||!t.format)throw new Error(o);return r(t.format,t.encoding||"UTF8",n)(t.value)}(0,s.hmacKey,o.u)),o}return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,t),n}(function(){function e(e,t,n){var r=n||{};if(this.h=t,this.v=r.encoding||"UTF8",this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.g=e,this.Y=[],this.H=0,this.S=!1,this.I=0,this.C=!1,this.L=[],this.N=[]}return e.prototype.update=function(e){var t,n=0,r=this.T>>>5,i=this.s(e,this.Y,this.H),o=i.binLen,s=i.value,a=o>>>5;for(t=0;t<a;t+=r)n+this.T<=o&&(this.U=this.A(s.slice(t,t+r),this.U),n+=this.T);this.I+=n,this.Y=s.slice(n>>>5),this.H=o%this.T,this.S=!0},e.prototype.getHash=function(e,t){var n,r,o=this.m,s=l(t);if(this.F){if(-1===s.outputLen)throw new Error("Output length must be specified in options");o=s.outputLen}var a=i(e,o,this.u,s);if(this.C&&this.t)return a(this.t(s));for(r=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&&(r[r.length-1]&=16777215>>>24-o%32),r=this.R(r,o,0,this.l(this.g),o);return a(r)},e.prototype.setHMACKey=function(e,t,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 i=r(t,(n||{}).encoding||"UTF8",this.u);this.B(i(e))},e.prototype.B=function(e){var t,n=this.T>>>3,r=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<e.binLen/8&&(e.value=this.R(e.value,e.binLen,0,this.l(this.g),this.m));e.value.length<=r;)e.value.push(0);for(t=0;t<=r;t+=1)this.L[t]=909522486^e.value[t],this.N[t]=1549556828^e.value[t];this.U=this.A(this.L,this.U),this.I=this.T,this.C=!0},e.prototype.getHMAC=function(e,t){var n=l(t);return i(e,this.m,this.u,n)(this.i())},e.prototype.i=function(){var e;if(!this.C)throw new Error("Cannot call getHMAC without first setting MAC key");var t=this.R(this.Y.slice(),this.H,this.I,this.p(this.U),this.m);return e=this.A(this.N,this.l(this.g)),this.R(t,this.m,this.T,e,this.m)},e}())})),
|
|
570
570
|
/*!
|
|
571
571
|
*
|
|
572
|
-
* Super simple WYSIWYG editor v0.
|
|
572
|
+
* Super simple WYSIWYG editor v0.9.1
|
|
573
573
|
* https://summernote.org
|
|
574
574
|
*
|
|
575
|
-
*
|
|
576
|
-
* Copyright 2013- Alan Hong and contributors
|
|
575
|
+
* Copyright 2013~ Hackerwins and contributors
|
|
577
576
|
* Summernote may be freely distributed under the MIT license.
|
|
578
577
|
*
|
|
579
|
-
* Date:
|
|
578
|
+
* Date: 2024-10-09T10:28Z
|
|
580
579
|
*
|
|
581
580
|
*/
|
|
582
|
-
function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("jQuery"));else if("function"==typeof define&&define.amd)define(["jQuery"],t);else{var n="object"==typeof exports?t(require("jQuery")):t(e.jQuery);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(e){return(()=>{"use strict";var t={9770:(e,t,n)=>{var r=n(1145),i=n.n(r);i().summernote=i().summernote||{lang:{}},i().extend(i().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:t=>{t.exports=e}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{r.r(i);var e=r(1145),t=r.n(e),n=(r(9770),["sans-serif","serif","monospace","cursive","fantasy"]);function o(e){return-1===t().inArray(e.toLowerCase(),n)?"'".concat(e,"'"):e}var s,a=navigator.userAgent,l=/MSIE|Trident/i.test(a);if(l){var c=/MSIE (\d+[.]\d+)/.exec(a);c&&(s=parseFloat(c[1])),(c=/Trident\/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(a))&&(s=parseFloat(c[1]))}var u=/Edge\/\d+/.test(a),d="ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,h=l?"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted":"input";const p={isMac:navigator.appVersion.indexOf("Mac")>-1,isMSIE:l,isEdge:u,isFF:!u&&/firefox/i.test(a),isPhantom:/PhantomJS/i.test(a),isWebkit:!u&&/webkit/i.test(a),isChrome:!u&&/chrome/i.test(a),isSafari:!u&&/safari/i.test(a)&&!/chrome/i.test(a),browserVersion:s,isSupportTouch:d,isFontInstalled:function(e){var t="Comic Sans MS"===e?"Courier New":"Comic Sans MS",n="mmmmmmmmmmwwwww",r="200px",i=document.createElement("canvas").getContext("2d");i.font=r+" '"+t+"'";var s=i.measureText(n).width;return i.font=r+" "+o(e)+', "'+t+'"',s!==i.measureText(n).width},isW3CRangeSupport:!!document.createRange,inputEventName:h,genericFontFamilies:n,validFontName:o};var f=0;const m={eq:function(e){return function(t){return e===t}},eq2:function(e,t){return e===t},peq2:function(e){return function(t,n){return t[e]===n[e]}},ok:function(){return!0},fail:function(){return!1},self:function(e){return e},not:function(e){return function(){return!e.apply(e,arguments)}},and:function(e,t){return function(n){return e(n)&&t(n)}},invoke:function(e,t){return function(){return e[t].apply(e,arguments)}},resetUniqueId:function(){f=0},uniqueId:function(e){var t=++f+"";return e?e+t:t},rect2bnd:function(e){var n=t()(document);return{top:e.top+n.scrollTop(),left:e.left+n.scrollLeft(),width:e.right-e.left,height:e.bottom-e.top}},invertObject:function(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[e[n]]=n);return t},namespaceToCamel:function(e,t){return(t=t||"")+e.split(".").map((function(e){return e.substring(0,1).toUpperCase()+e.substring(1)})).join("")},debounce:function(e,t,n){var r;return function(){var i=this,o=arguments,s=n&&!r;clearTimeout(r),r=setTimeout((function(){r=null,n||e.apply(i,o)}),t),s&&e.apply(i,o)}},isValidUrl:function(e){return/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi.test(e)}};function g(e){return e[0]}function v(e){return e[e.length-1]}function y(e){return e.slice(1)}function b(e,t){if(e&&e.length&&t){if(e.indexOf)return-1!==e.indexOf(t);if(e.contains)return e.contains(t)}return!1}const _={head:g,last:v,initial:function(e){return e.slice(0,e.length-1)},tail:y,prev:function(e,t){if(e&&e.length&&t){var n=e.indexOf(t);return-1===n?null:e[n-1]}return null},next:function(e,t){if(e&&e.length&&t){var n=e.indexOf(t);return-1===n?null:e[n+1]}return null},find:function(e,t){for(var n=0,r=e.length;n<r;n++){var i=e[n];if(t(i))return i}},contains:b,all:function(e,t){for(var n=0,r=e.length;n<r;n++)if(!t(e[n]))return!1;return!0},sum:function(e,t){return t=t||m.self,e.reduce((function(e,n){return e+t(n)}),0)},from:function(e){for(var t=[],n=e.length,r=-1;++r<n;)t[r]=e[r];return t},isEmpty:function(e){return!e||!e.length},clusterBy:function(e,t){return e.length?y(e).reduce((function(e,n){var r=v(e);return t(v(r),n)?r[r.length]=n:e[e.length]=[n],e}),[[g(e)]]):[]},compact:function(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]&&t.push(e[n]);return t},unique:function(e){for(var t=[],n=0,r=e.length;n<r;n++)b(t,e[n])||t.push(e[n]);return t}};var w=String.fromCharCode(160);function x(e){return e&&t()(e).hasClass("note-editable")}function S(e){return e=e.toUpperCase(),function(t){return t&&t.nodeName.toUpperCase()===e}}function k(e){return e&&3===e.nodeType}function T(e){return e&&/^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT|^AUDIO|^VIDEO|^EMBED/.test(e.nodeName.toUpperCase())}function E(e){return!x(e)&&(e&&/^DIV|^P|^LI|^H[1-7]/.test(e.nodeName.toUpperCase()))}var C=S("PRE"),D=S("LI");var M=S("TABLE"),A=S("DATA");function I(e){return!(P(e)||L(e)||O(e)||E(e)||M(e)||R(e)||A(e))}function L(e){return e&&/^UL|^OL/.test(e.nodeName.toUpperCase())}var O=S("HR");function N(e){return e&&/^TD|^TH/.test(e.nodeName.toUpperCase())}var R=S("BLOCKQUOTE");function P(e){return N(e)||R(e)||x(e)}var F=S("A");var j=S("BODY");var Y=p.isMSIE&&p.browserVersion<11?" ":"<br>";function V(e){return k(e)?e.nodeValue.length:e?e.childNodes.length:0}function H(e){var t=V(e);return 0===t||(!k(e)&&1===t&&e.innerHTML===Y||!(!_.all(e.childNodes,k)||""!==e.innerHTML))}function B(e){T(e)||V(e)||(e.innerHTML=Y)}function U(e,t){for(;e;){if(t(e))return e;if(x(e))break;e=e.parentNode}return null}function z(e,t){t=t||m.fail;var n=[];return U(e,(function(e){return x(e)||n.push(e),t(e)})),n}function q(e,t){t=t||m.fail;for(var n=[];e&&!t(e);)n.push(e),e=e.nextSibling;return n}function W(e,t){var n=t.nextSibling,r=t.parentNode;return n?r.insertBefore(e,n):r.appendChild(e),e}function $(e,n){return t().each(n,(function(t,n){e.appendChild(n)})),e}function G(e){return 0===e.offset}function K(e){return e.offset===V(e.node)}function Z(e){return G(e)||K(e)}function X(e,t){for(;e&&e!==t;){if(0!==Q(e))return!1;e=e.parentNode}return!0}function J(e,t){if(!t)return!1;for(;e&&e!==t;){if(Q(e)!==V(e.parentNode)-1)return!1;e=e.parentNode}return!0}function Q(e){for(var t=0;e=e.previousSibling;)t+=1;return t}function ee(e){return!!(e&&e.childNodes&&e.childNodes.length)}function te(e,t){var n,r;if(0===e.offset){if(x(e.node))return null;n=e.node.parentNode,r=Q(e.node)}else ee(e.node)?r=V(n=e.node.childNodes[e.offset-1]):(n=e.node,r=t?0:e.offset-1);return{node:n,offset:r}}function ne(e,t){var n,r;if(V(e.node)===e.offset){if(x(e.node))return null;var i=ie(e.node);i?(n=i,r=0):(n=e.node.parentNode,r=Q(e.node)+1)}else ee(e.node)?(n=e.node.childNodes[e.offset],r=0):(n=e.node,r=t?V(e.node):e.offset+1);return{node:n,offset:r}}function re(e,t){var n,r=0;if(H(e.node))return null===e.node?null:{node:n=e.node.nextSibling,offset:r=0};if(V(e.node)===e.offset){if(x(e.node))return null;n=e.node.parentNode,r=Q(e.node)+1,x(n)&&(n=e.node.nextSibling,r=0)}else if(ee(e.node)){if(r=0,H(n=e.node.childNodes[e.offset]))return H(e.node.nextSibling)?null:{node:e.node.nextSibling,offset:r}}else if(n=e.node,r=t?V(e.node):e.offset+1,H(n))return null;return{node:n,offset:r}}function ie(e){if(e.nextSibling&&e.parent===e.nextSibling.parent)return k(e.nextSibling)?e.nextSibling:ie(e.nextSibling)}function oe(e,t){return e.node===t.node&&e.offset===t.offset}function se(e,t){var n=t&&t.isSkipPaddingBlankHTML,r=t&&t.isNotSplitEdgePoint,i=t&&t.isDiscardEmptySplits;if(i&&(n=!0),Z(e)&&(k(e.node)||r)){if(G(e))return e.node;if(K(e))return e.node.nextSibling}if(k(e.node))return e.node.splitText(e.offset);var o=e.node.childNodes[e.offset],s=W(e.node.cloneNode(!1),e.node);return $(s,q(o)),n||(B(e.node),B(s)),i&&(H(e.node)&&ce(e.node),H(s))?(ce(s),e.node.nextSibling):s}function ae(e,t,n){var r=z(t.node,m.eq(e));return r.length?1===r.length?se(t,n):r.reduce((function(e,r){return e===t.node&&(e=se(t,n)),se({node:r,offset:e?Q(e):V(r)},n)})):null}function le(e){return document.createElement(e)}function ce(e,t){if(e&&e.parentNode){if(e.removeNode)return e.removeNode(t);var n=e.parentNode;if(!t){for(var r=[],i=0,o=e.childNodes.length;i<o;i++)r.push(e.childNodes[i]);for(var s=0,a=r.length;s<a;s++)n.insertBefore(r[s],e)}n.removeChild(e)}}var ue=S("TEXTAREA");function de(e,t){var n=ue(e[0])?e.val():e.html();return t?n.replace(/[\n\r]/g,""):n}const he={NBSP_CHAR:w,ZERO_WIDTH_NBSP_CHAR:"\ufeff",blank:Y,emptyPara:"<p>".concat(Y,"</p>"),makePredByNodeName:S,isEditable:x,isControlSizing:function(e){return e&&t()(e).hasClass("note-control-sizing")},isText:k,isElement:function(e){return e&&1===e.nodeType},isVoid:T,isPara:E,isPurePara:function(e){return E(e)&&!D(e)},isHeading:function(e){return e&&/^H[1-7]/.test(e.nodeName.toUpperCase())},isInline:I,isBlock:m.not(I),isBodyInline:function(e){return I(e)&&!U(e,E)},isBody:j,isParaInline:function(e){return I(e)&&!!U(e,E)},isPre:C,isList:L,isTable:M,isData:A,isCell:N,isBlockquote:R,isBodyContainer:P,isAnchor:F,isDiv:S("DIV"),isLi:D,isBR:S("BR"),isSpan:S("SPAN"),isB:S("B"),isU:S("U"),isS:S("S"),isI:S("I"),isImg:S("IMG"),isTextarea:ue,deepestChildIsEmpty:function(e){do{if(null===e.firstElementChild||""===e.firstElementChild.innerHTML)break}while(e=e.firstElementChild);return H(e)},isEmpty:H,isEmptyAnchor:m.and(F,H),isClosestSibling:function(e,t){return e.nextSibling===t||e.previousSibling===t},withClosestSiblings:function(e,t){t=t||m.ok;var n=[];return e.previousSibling&&t(e.previousSibling)&&n.push(e.previousSibling),n.push(e),e.nextSibling&&t(e.nextSibling)&&n.push(e.nextSibling),n},nodeLength:V,isLeftEdgePoint:G,isRightEdgePoint:K,isEdgePoint:Z,isLeftEdgeOf:X,isRightEdgeOf:J,isLeftEdgePointOf:function(e,t){return G(e)&&X(e.node,t)},isRightEdgePointOf:function(e,t){return K(e)&&J(e.node,t)},prevPoint:te,nextPoint:ne,nextPointWithEmptyNode:re,isSamePoint:oe,isVisiblePoint:function(e){if(k(e.node)||!ee(e.node)||H(e.node))return!0;var t=e.node.childNodes[e.offset-1],n=e.node.childNodes[e.offset];return!((t&&!T(t)||n&&!T(n))&&!M(n))},prevPointUntil:function(e,t){for(;e;){if(t(e))return e;e=te(e)}return null},nextPointUntil:function(e,t){for(;e;){if(t(e))return e;e=ne(e)}return null},isCharPoint:function(e){if(!k(e.node))return!1;var t=e.node.nodeValue.charAt(e.offset-1);return t&&" "!==t&&t!==w},isSpacePoint:function(e){if(!k(e.node))return!1;var t=e.node.nodeValue.charAt(e.offset-1);return" "===t||t===w},walkPoint:function(e,t,n,r){for(var i=e;i&&(n(i),!oe(i,t));){i=re(i,r&&e.node!==i.node&&t.node!==i.node)}},ancestor:U,singleChildAncestor:function(e,t){for(e=e.parentNode;e&&1===V(e);){if(t(e))return e;if(x(e))break;e=e.parentNode}return null},listAncestor:z,lastAncestor:function(e,t){var n=z(e);return _.last(n.filter(t))},listNext:q,listPrev:function(e,t){t=t||m.fail;for(var n=[];e&&!t(e);)n.push(e),e=e.previousSibling;return n},listDescendant:function(e,t){var n=[];return t=t||m.ok,function r(i){e!==i&&t(i)&&n.push(i);for(var o=0,s=i.childNodes.length;o<s;o++)r(i.childNodes[o])}(e),n},commonAncestor:function(e,t){for(var n=z(e),r=t;r;r=r.parentNode)if(n.indexOf(r)>-1)return r;return null},wrap:function(e,n){var r=e.parentNode,i=t()("<"+n+">")[0];return r.insertBefore(i,e),i.appendChild(e),i},insertAfter:W,appendChildNodes:$,position:Q,hasChildren:ee,makeOffsetPath:function(e,t){return z(t,m.eq(e)).map(Q).reverse()},fromOffsetPath:function(e,t){for(var n=e,r=0,i=t.length;r<i;r++)n=n.childNodes.length<=t[r]?n.childNodes[n.childNodes.length-1]:n.childNodes[t[r]];return n},splitTree:ae,splitPoint:function(e,t){var n,r,i=t?E:P,o=z(e.node,i),s=_.last(o)||e.node;i(s)?(n=o[o.length-2],r=s):r=(n=s).parentNode;var a=n&&ae(n,e,{isSkipPaddingBlankHTML:t,isNotSplitEdgePoint:t});return a||r!==e.node||(a=e.node.childNodes[e.offset]),{rightNode:a,container:r}},create:le,createText:function(e){return document.createTextNode(e)},remove:ce,removeWhile:function(e,t){for(;e&&!x(e)&&t(e);){var n=e.parentNode;ce(e),e=n}},replace:function(e,t){if(e.nodeName.toUpperCase()===t.toUpperCase())return e;var n=le(t);return e.style.cssText&&(n.style.cssText=e.style.cssText),$(n,_.from(e.childNodes)),W(n,e),ce(e),n},html:function(e,t){var n=de(e);if(t){n=(n=n.replace(/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g,(function(e,t,n){n=n.toUpperCase();var r=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(n)&&!!t,i=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(n);return e+(r||i?"\n":"")}))).trim()}return n},value:de,posFromPlaceholder:function(e){var n=t()(e),r=n.offset(),i=n.outerHeight(!0);return{left:r.left,top:r.top+i}},attachEvents:function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))},detachEvents:function(e,t){Object.keys(t).forEach((function(n){e.off(n,t[n])}))},isCustomStyleTag:function(e){return e&&!k(e)&&_.contains(e.classList,"note-styletag")}};function pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var fe=function(){function e(n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$note=n,this.memos={},this.modules={},this.layoutInfo={},this.options=t().extend(!0,{},r),t().summernote.ui=t().summernote.ui_template(this.options),this.ui=t().summernote.ui,this.initialize()}var n,r,i;return n=e,r=[{key:"initialize",value:function(){return this.layoutInfo=this.ui.createLayout(this.$note),this._initialize(),this.$note.hide(),this}},{key:"destroy",value:function(){this._destroy(),this.$note.removeData("summernote"),this.ui.removeLayout(this.$note,this.layoutInfo)}},{key:"reset",value:function(){var e=this.isDisabled();this.code(he.emptyPara),this._destroy(),this._initialize(),e&&this.disable()}},{key:"_initialize",value:function(){var e=this;this.options.id=m.uniqueId(t().now()),this.options.container=this.options.container||this.layoutInfo.editor;var n=t().extend({},this.options.buttons);Object.keys(n).forEach((function(t){e.memo("button."+t,n[t])}));var r=t().extend({},this.options.modules,t().summernote.plugins||{});Object.keys(r).forEach((function(t){e.module(t,r[t],!0)})),Object.keys(this.modules).forEach((function(t){e.initializeModule(t)}))}},{key:"_destroy",value:function(){var e=this;Object.keys(this.modules).reverse().forEach((function(t){e.removeModule(t)})),Object.keys(this.memos).forEach((function(t){e.removeMemo(t)})),this.triggerEvent("destroy",this)}},{key:"code",value:function(e){var t=this.invoke("codeview.isActivated");if(void 0===e)return this.invoke("codeview.sync"),t?this.layoutInfo.codable.val():this.layoutInfo.editable.html();t?this.invoke("codeview.sync",e):this.layoutInfo.editable.html(e),this.$note.val(e),this.triggerEvent("change",e,this.layoutInfo.editable)}},{key:"isDisabled",value:function(){return"false"===this.layoutInfo.editable.attr("contenteditable")}},{key:"enable",value:function(){this.layoutInfo.editable.attr("contenteditable",!0),this.invoke("toolbar.activate",!0),this.triggerEvent("disable",!1),this.options.editing=!0}},{key:"disable",value:function(){this.invoke("codeview.isActivated")&&this.invoke("codeview.deactivate"),this.layoutInfo.editable.attr("contenteditable",!1),this.options.editing=!1,this.invoke("toolbar.deactivate",!0),this.triggerEvent("disable",!0)}},{key:"triggerEvent",value:function(){var e=_.head(arguments),t=_.tail(_.from(arguments)),n=this.options.callbacks[m.namespaceToCamel(e,"on")];n&&n.apply(this.$note[0],t),this.$note.trigger("summernote."+e,t)}},{key:"initializeModule",value:function(e){var t=this.modules[e];t.shouldInitialize=t.shouldInitialize||m.ok,t.shouldInitialize()&&(t.initialize&&t.initialize(),t.events&&he.attachEvents(this.$note,t.events))}},{key:"module",value:function(e,t,n){if(1===arguments.length)return this.modules[e];this.modules[e]=new t(this),n||this.initializeModule(e)}},{key:"removeModule",value:function(e){var t=this.modules[e];t.shouldInitialize()&&(t.events&&he.detachEvents(this.$note,t.events),t.destroy&&t.destroy()),delete this.modules[e]}},{key:"memo",value:function(e,t){if(1===arguments.length)return this.memos[e];this.memos[e]=t}},{key:"removeMemo",value:function(e){this.memos[e]&&this.memos[e].destroy&&this.memos[e].destroy(),delete this.memos[e]}},{key:"createInvokeHandlerAndUpdateState",value:function(e,t){var n=this;return function(r){n.createInvokeHandler(e,t)(r),n.invoke("buttons.updateCurrentStyle")}}},{key:"createInvokeHandler",value:function(e,n){var r=this;return function(i){i.preventDefault();var o=t()(i.target);r.invoke(e,n||o.closest("[data-value]").data("value"),o)}}},{key:"invoke",value:function(){var e=_.head(arguments),t=_.tail(_.from(arguments)),n=e.split("."),r=n.length>1,i=r&&_.head(n),o=r?_.last(n):_.head(n),s=this.modules[i||"editor"];return!i&&this[o]?this[o].apply(this,t):s&&s[o]&&s.shouldInitialize()?s[o].apply(s,t):void 0}}],r&&pe(n.prototype,r),i&&pe(n,i),e}();function me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ge(e,t){var n,r,i=e.parentElement(),o=document.body.createTextRange(),s=_.from(i.childNodes);for(n=0;n<s.length;n++)if(!he.isText(s[n])){if(o.moveToElementText(s[n]),o.compareEndPoints("StartToStart",e)>=0)break;r=s[n]}if(0!==n&&he.isText(s[n-1])){var a=document.body.createTextRange(),l=null;a.moveToElementText(r||i),a.collapse(!r),l=r?r.nextSibling:i.firstChild;var c=e.duplicate();c.setEndPoint("StartToStart",a);for(var u=c.text.replace(/[\r\n]/g,"").length;u>l.nodeValue.length&&l.nextSibling;)u-=l.nodeValue.length,l=l.nextSibling;l.nodeValue;t&&l.nextSibling&&he.isText(l.nextSibling)&&u===l.nodeValue.length&&(u-=l.nodeValue.length,l=l.nextSibling),i=l,n=u}return{cont:i,offset:n}}function ve(e){var t=document.body.createTextRange(),n=function e(t,n){var r,i;if(he.isText(t)){var o=he.listPrev(t,m.not(he.isText)),s=_.last(o).previousSibling;r=s||t.parentNode,n+=_.sum(_.tail(o),he.nodeLength),i=!s}else{if(r=t.childNodes[n]||t,he.isText(r))return e(r,0);n=0,i=!1}return{node:r,collapseToStart:i,offset:n}}(e.node,e.offset);return t.moveToElementText(n.node),t.collapse(n.collapseToStart),t.moveStart("character",n.offset),t}t().fn.extend({summernote:function(){var e=t().type(_.head(arguments)),n="string"===e,r="object"===e,i=t().extend({},t().summernote.options,r?_.head(arguments):{});i.langInfo=t().extend(!0,{},t().summernote.lang["en-US"],t().summernote.lang[i.lang]),i.icons=t().extend(!0,{},t().summernote.options.icons,i.icons),i.tooltip="auto"===i.tooltip?!p.isSupportTouch:i.tooltip,this.each((function(e,n){var r=t()(n);if(!r.data("summernote")){var o=new fe(r,i);r.data("summernote",o),r.data("summernote").triggerEvent("init",o.layoutInfo)}}));var o=this.first();if(o.length){var s=o.data("summernote");if(n)return s.invoke.apply(s,_.from(arguments));i.focus&&s.invoke("editor.focus")}return this}});var ye=function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sc=t,this.so=n,this.ec=r,this.eo=i,this.isOnEditable=this.makeIsOn(he.isEditable),this.isOnList=this.makeIsOn(he.isList),this.isOnAnchor=this.makeIsOn(he.isAnchor),this.isOnCell=this.makeIsOn(he.isCell),this.isOnData=this.makeIsOn(he.isData)}var n,r,i;return n=e,r=[{key:"nativeRange",value:function(){if(p.isW3CRangeSupport){var e=document.createRange();return e.setStart(this.sc,this.so),e.setEnd(this.ec,this.eo),e}var t=ve({node:this.sc,offset:this.so});return t.setEndPoint("EndToEnd",ve({node:this.ec,offset:this.eo})),t}},{key:"getPoints",value:function(){return{sc:this.sc,so:this.so,ec:this.ec,eo:this.eo}}},{key:"getStartPoint",value:function(){return{node:this.sc,offset:this.so}}},{key:"getEndPoint",value:function(){return{node:this.ec,offset:this.eo}}},{key:"select",value:function(){var e=this.nativeRange();if(p.isW3CRangeSupport){var t=document.getSelection();t.rangeCount>0&&t.removeAllRanges(),t.addRange(e)}else e.select();return this}},{key:"scrollIntoView",value:function(e){var n=t()(e).height();return e.scrollTop+n<this.sc.offsetTop&&(e.scrollTop+=Math.abs(e.scrollTop+n-this.sc.offsetTop)),this}},{key:"normalize",value:function(){var t=function(e,t){if(!e)return e;if(he.isVisiblePoint(e)&&(!he.isEdgePoint(e)||he.isRightEdgePoint(e)&&!t||he.isLeftEdgePoint(e)&&t||he.isRightEdgePoint(e)&&t&&he.isVoid(e.node.nextSibling)||he.isLeftEdgePoint(e)&&!t&&he.isVoid(e.node.previousSibling)||he.isBlock(e.node)&&he.isEmpty(e.node)))return e;var n=he.ancestor(e.node,he.isBlock),r=!1;if(!r){var i=he.prevPoint(e)||{node:null};r=(he.isLeftEdgePointOf(e,n)||he.isVoid(i.node))&&!t}var o=!1;if(!o){var s=he.nextPoint(e)||{node:null};o=(he.isRightEdgePointOf(e,n)||he.isVoid(s.node))&&t}if(r||o){if(he.isVisiblePoint(e))return e;t=!t}return(t?he.nextPointUntil(he.nextPoint(e),he.isVisiblePoint):he.prevPointUntil(he.prevPoint(e),he.isVisiblePoint))||e},n=t(this.getEndPoint(),!1),r=this.isCollapsed()?n:t(this.getStartPoint(),!0);return new e(r.node,r.offset,n.node,n.offset)}},{key:"nodes",value:function(e,t){e=e||m.ok;var n=t&&t.includeAncestor,r=t&&t.fullyContains,i=this.getStartPoint(),o=this.getEndPoint(),s=[],a=[];return he.walkPoint(i,o,(function(t){var i;he.isEditable(t.node)||(r?(he.isLeftEdgePoint(t)&&a.push(t.node),he.isRightEdgePoint(t)&&_.contains(a,t.node)&&(i=t.node)):i=n?he.ancestor(t.node,e):t.node,i&&e(i)&&s.push(i))}),!0),_.unique(s)}},{key:"commonAncestor",value:function(){return he.commonAncestor(this.sc,this.ec)}},{key:"expand",value:function(t){var n=he.ancestor(this.sc,t),r=he.ancestor(this.ec,t);if(!n&&!r)return new e(this.sc,this.so,this.ec,this.eo);var i=this.getPoints();return n&&(i.sc=n,i.so=0),r&&(i.ec=r,i.eo=he.nodeLength(r)),new e(i.sc,i.so,i.ec,i.eo)}},{key:"collapse",value:function(t){return t?new e(this.sc,this.so,this.sc,this.so):new e(this.ec,this.eo,this.ec,this.eo)}},{key:"splitText",value:function(){var t=this.sc===this.ec,n=this.getPoints();return he.isText(this.ec)&&!he.isEdgePoint(this.getEndPoint())&&this.ec.splitText(this.eo),he.isText(this.sc)&&!he.isEdgePoint(this.getStartPoint())&&(n.sc=this.sc.splitText(this.so),n.so=0,t&&(n.ec=n.sc,n.eo=this.eo-this.so)),new e(n.sc,n.so,n.ec,n.eo)}},{key:"deleteContents",value:function(){if(this.isCollapsed())return this;var n=this.splitText(),r=n.nodes(null,{fullyContains:!0}),i=he.prevPointUntil(n.getStartPoint(),(function(e){return!_.contains(r,e.node)})),o=[];return t().each(r,(function(e,t){var n=t.parentNode;i.node!==n&&1===he.nodeLength(n)&&o.push(n),he.remove(t,!1)})),t().each(o,(function(e,t){he.remove(t,!1)})),new e(i.node,i.offset,i.node,i.offset).normalize()}},{key:"makeIsOn",value:function(e){return function(){var t=he.ancestor(this.sc,e);return!!t&&t===he.ancestor(this.ec,e)}}},{key:"isLeftEdgeOf",value:function(e){if(!he.isLeftEdgePoint(this.getStartPoint()))return!1;var t=he.ancestor(this.sc,e);return t&&he.isLeftEdgeOf(this.sc,t)}},{key:"isCollapsed",value:function(){return this.sc===this.ec&&this.so===this.eo}},{key:"wrapBodyInlineWithPara",value:function(){if(he.isBodyContainer(this.sc)&&he.isEmpty(this.sc))return this.sc.innerHTML=he.emptyPara,new e(this.sc.firstChild,0,this.sc.firstChild,0);var t,n=this.normalize();if(he.isParaInline(this.sc)||he.isPara(this.sc))return n;if(he.isInline(n.sc)){var r=he.listAncestor(n.sc,m.not(he.isInline));t=_.last(r),he.isInline(t)||(t=r[r.length-2]||n.sc.childNodes[n.so])}else t=n.sc.childNodes[n.so>0?n.so-1:0];if(t){var i=he.listPrev(t,he.isParaInline).reverse();if((i=i.concat(he.listNext(t.nextSibling,he.isParaInline))).length){var o=he.wrap(_.head(i),"p");he.appendChildNodes(o,_.tail(i))}}return this.normalize()}},{key:"insertNode",value:function(e){var t=this;(he.isText(e)||he.isInline(e))&&(t=this.wrapBodyInlineWithPara().deleteContents());var n=he.splitPoint(t.getStartPoint(),he.isInline(e));return n.rightNode?(n.rightNode.parentNode.insertBefore(e,n.rightNode),he.isEmpty(n.rightNode)&&he.isPara(e)&&n.rightNode.parentNode.removeChild(n.rightNode)):n.container.appendChild(e),e}},{key:"pasteHTML",value:function(e){e=t().trim(e);var n=t()("<div></div>").html(e)[0],r=_.from(n.childNodes),i=this,o=!1;return i.so>=0&&(r=r.reverse(),o=!0),r=r.map((function(e){return i.insertNode(e)})),o&&(r=r.reverse()),r}},{key:"toString",value:function(){var e=this.nativeRange();return p.isW3CRangeSupport?e.toString():e.text}},{key:"getWordRange",value:function(t){var n=this.getEndPoint();if(!he.isCharPoint(n))return this;var r=he.prevPointUntil(n,(function(e){return!he.isCharPoint(e)}));return t&&(n=he.nextPointUntil(n,(function(e){return!he.isCharPoint(e)}))),new e(r.node,r.offset,n.node,n.offset)}},{key:"getWordsRange",value:function(t){var n=this.getEndPoint(),r=function(e){return!he.isCharPoint(e)&&!he.isSpacePoint(e)};if(r(n))return this;var i=he.prevPointUntil(n,r);return t&&(n=he.nextPointUntil(n,r)),new e(i.node,i.offset,n.node,n.offset)}},{key:"getWordsMatchRange",value:function(t){var n=this.getEndPoint(),r=he.prevPointUntil(n,(function(r){if(!he.isCharPoint(r)&&!he.isSpacePoint(r))return!0;var i=new e(r.node,r.offset,n.node,n.offset),o=t.exec(i.toString());return o&&0===o.index})),i=new e(r.node,r.offset,n.node,n.offset),o=i.toString(),s=t.exec(o);return s&&s[0].length===o.length?i:null}},{key:"bookmark",value:function(e){return{s:{path:he.makeOffsetPath(e,this.sc),offset:this.so},e:{path:he.makeOffsetPath(e,this.ec),offset:this.eo}}}},{key:"paraBookmark",value:function(e){return{s:{path:_.tail(he.makeOffsetPath(_.head(e),this.sc)),offset:this.so},e:{path:_.tail(he.makeOffsetPath(_.last(e),this.ec)),offset:this.eo}}}},{key:"getClientRects",value:function(){return this.nativeRange().getClientRects()}}],r&&me(n.prototype,r),i&&me(n,i),e}();const be={create:function(e,t,n,r){if(4===arguments.length)return new ye(e,t,n,r);if(2===arguments.length)return new ye(e,t,n=e,r=t);var i=this.createFromSelection();if(!i&&1===arguments.length){var o=arguments[0];return he.isEditable(o)&&(o=o.lastChild),this.createFromBodyElement(o,he.emptyPara===arguments[0].innerHTML)}return i},createFromBodyElement:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.createFromNode(e).collapse(t)},createFromSelection:function(){var e,t,n,r;if(p.isW3CRangeSupport){var i=document.getSelection();if(!i||0===i.rangeCount)return null;if(he.isBody(i.anchorNode))return null;var o=i.getRangeAt(0);e=o.startContainer,t=o.startOffset,n=o.endContainer,r=o.endOffset}else{var s=document.selection.createRange(),a=s.duplicate();a.collapse(!1);var l=s;l.collapse(!0);var c=ge(l,!0),u=ge(a,!1);he.isText(c.node)&&he.isLeftEdgePoint(c)&&he.isTextNode(u.node)&&he.isRightEdgePoint(u)&&u.node.nextSibling===c.node&&(c=u),e=c.cont,t=c.offset,n=u.cont,r=u.offset}return new ye(e,t,n,r)},createFromNode:function(e){var t=e,n=0,r=e,i=he.nodeLength(r);return he.isVoid(t)&&(n=he.listPrev(t).length-1,t=t.parentNode),he.isBR(r)?(i=he.listPrev(r).length-1,r=r.parentNode):he.isVoid(r)&&(i=he.listPrev(r).length,r=r.parentNode),this.create(t,n,r,i)},createFromNodeBefore:function(e){return this.createFromNode(e).collapse(!0)},createFromNodeAfter:function(e){return this.createFromNode(e).collapse()},createFromBookmark:function(e,t){var n=he.fromOffsetPath(e,t.s.path),r=t.s.offset,i=he.fromOffsetPath(e,t.e.path),o=t.e.offset;return new ye(n,r,i,o)},createFromParaBookmark:function(e,t){var n=e.s.offset,r=e.e.offset,i=he.fromOffsetPath(_.head(t),e.s.path),o=he.fromOffsetPath(_.last(t),e.e.path);return new ye(i,n,o,r)}};var _e={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 we={isEdit:function(e){return _.contains([_e.BACKSPACE,_e.TAB,_e.ENTER,_e.SPACE,_e.DELETE],e)},isMove:function(e){return _.contains([_e.LEFT,_e.UP,_e.RIGHT,_e.DOWN],e)},isNavigation:function(e){return _.contains([_e.HOME,_e.END,_e.PAGEUP,_e.PAGEDOWN],e)},nameFromCode:m.invertObject(_e),code:_e};function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Se=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.stack=[],this.stackOffset=-1,this.context=t,this.$editable=t.layoutInfo.editable,this.editable=this.$editable[0]}var t,n,r;return t=e,(n=[{key:"makeSnapshot",value:function(){var e=be.create(this.editable);return{contents:this.$editable.html(),bookmark:e&&e.isOnEditable()?e.bookmark(this.editable):{s:{path:[],offset:0},e:{path:[],offset:0}}}}},{key:"applySnapshot",value:function(e){null!==e.contents&&this.$editable.html(e.contents),null!==e.bookmark&&be.createFromBookmark(this.editable,e.bookmark).select()}},{key:"rewind",value:function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset=0,this.applySnapshot(this.stack[this.stackOffset])}},{key:"commit",value:function(){this.stack=[],this.stackOffset=-1,this.recordUndo()}},{key:"reset",value:function(){this.stack=[],this.stackOffset=-1,this.$editable.html(""),this.recordUndo()}},{key:"undo",value:function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset>0&&(this.stackOffset--,this.applySnapshot(this.stack[this.stackOffset]))}},{key:"redo",value:function(){this.stack.length-1>this.stackOffset&&(this.stackOffset++,this.applySnapshot(this.stack[this.stackOffset]))}},{key:"recordUndo",value:function(){this.stackOffset++,this.stack.length>this.stackOffset&&(this.stack=this.stack.slice(0,this.stackOffset)),this.stack.push(this.makeSnapshot()),this.stack.length>this.context.options.historyLimit&&(this.stack.shift(),this.stackOffset-=1)}}])&&xe(t.prototype,n),r&&xe(t,r),e}();function ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Te=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var n,r,i;return n=e,r=[{key:"jQueryCSS",value:function(e,n){var r={};return t().each(n,(function(t,n){r[n]=e.css(n)})),r}},{key:"fromNode",value:function(e){var t=this.jQueryCSS(e,["font-family","font-size","text-align","list-style-type","line-height"])||{},n=e[0].style.fontSize||t["font-size"];return t["font-size"]=parseInt(n,10),t["font-size-unit"]=n.match(/[a-z%]+$/),t}},{key:"stylePara",value:function(e,n){t().each(e.nodes(he.isPara,{includeAncestor:!0}),(function(e,r){t()(r).css(n)}))}},{key:"styleNodes",value:function(e,n){e=e.splitText();var r=n&&n.nodeName||"SPAN",i=!(!n||!n.expandClosestSibling),o=!(!n||!n.onlyPartialContains);if(e.isCollapsed())return[e.insertNode(he.create(r))];var s=he.makePredByNodeName(r),a=e.nodes(he.isText,{fullyContains:!0}).map((function(e){return he.singleChildAncestor(e,s)||he.wrap(e,r)}));if(i){if(o){var l=e.nodes();s=m.and(s,(function(e){return _.contains(l,e)}))}return a.map((function(e){var n=he.withClosestSiblings(e,s),r=_.head(n),i=_.tail(n);return t().each(i,(function(e,t){he.appendChildNodes(r,t.childNodes),he.remove(t)})),_.head(n)}))}return a}},{key:"current",value:function(e){var n=t()(he.isElement(e.sc)?e.sc:e.sc.parentNode),r=this.fromNode(n);try{r=t().extend(r,{"font-bold":document.queryCommandState("bold")?"bold":"normal","font-italic":document.queryCommandState("italic")?"italic":"normal","font-underline":document.queryCommandState("underline")?"underline":"normal","font-subscript":document.queryCommandState("subscript")?"subscript":"normal","font-superscript":document.queryCommandState("superscript")?"superscript":"normal","font-strikethrough":document.queryCommandState("strikethrough")?"strikethrough":"normal","font-family":document.queryCommandValue("fontname")||r["font-family"]})}catch(e){}if(e.isOnList()){var i=["circle","disc","disc-leading-zero","square"].indexOf(r["list-style-type"])>-1;r["list-style"]=i?"unordered":"ordered"}else r["list-style"]="none";var o=he.ancestor(e.sc,he.isPara);if(o&&o.style["line-height"])r["line-height"]=o.style.lineHeight;else{var s=parseInt(r["line-height"],10)/parseInt(r["font-size"],10);r["line-height"]=s.toFixed(1)}return r.anchor=e.isOnAnchor()&&he.ancestor(e.sc,he.isAnchor),r.ancestors=he.listAncestor(e.sc,he.isEditable),r.range=e,r}}],r&&ke(n.prototype,r),i&&ke(n,i),e}();function Ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ce=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var n,r,i;return n=e,r=[{key:"insertOrderedList",value:function(e){this.toggleList("OL",e)}},{key:"insertUnorderedList",value:function(e){this.toggleList("UL",e)}},{key:"indent",value:function(e){var n=this,r=be.create(e).wrapBodyInlineWithPara(),i=r.nodes(he.isPara,{includeAncestor:!0}),o=_.clusterBy(i,m.peq2("parentNode"));t().each(o,(function(e,r){var i=_.head(r);if(he.isLi(i)){var o=n.findList(i.previousSibling);o?r.map((function(e){return o.appendChild(e)})):(n.wrapList(r,i.parentNode.nodeName),r.map((function(e){return e.parentNode})).map((function(e){return n.appendToPrevious(e)})))}else t().each(r,(function(e,n){t()(n).css("marginLeft",(function(e,t){return(parseInt(t,10)||0)+25}))}))})),r.select()}},{key:"outdent",value:function(e){var n=this,r=be.create(e).wrapBodyInlineWithPara(),i=r.nodes(he.isPara,{includeAncestor:!0}),o=_.clusterBy(i,m.peq2("parentNode"));t().each(o,(function(e,r){var i=_.head(r);he.isLi(i)?n.releaseList([r]):t().each(r,(function(e,n){t()(n).css("marginLeft",(function(e,t){return(t=parseInt(t,10)||0)>25?t-25:""}))}))})),r.select()}},{key:"toggleList",value:function(e,n){var r=this,i=be.create(n).wrapBodyInlineWithPara(),o=i.nodes(he.isPara,{includeAncestor:!0}),s=i.paraBookmark(o),a=_.clusterBy(o,m.peq2("parentNode"));if(_.find(o,he.isPurePara)){var l=[];t().each(a,(function(t,n){l=l.concat(r.wrapList(n,e))})),o=l}else{var c=i.nodes(he.isList,{includeAncestor:!0}).filter((function(n){return!t().nodeName(n,e)}));c.length?t().each(c,(function(t,n){he.replace(n,e)})):o=this.releaseList(a,!0)}be.createFromParaBookmark(s,o).select()}},{key:"wrapList",value:function(e,t){var n=_.head(e),r=_.last(e),i=he.isList(n.previousSibling)&&n.previousSibling,o=he.isList(r.nextSibling)&&r.nextSibling,s=i||he.insertAfter(he.create(t||"UL"),r);return e=e.map((function(e){return he.isPurePara(e)?he.replace(e,"LI"):e})),he.appendChildNodes(s,e),o&&(he.appendChildNodes(s,_.from(o.childNodes)),he.remove(o)),e}},{key:"releaseList",value:function(e,n){var r=this,i=[];return t().each(e,(function(e,o){var s=_.head(o),a=_.last(o),l=n?he.lastAncestor(s,he.isList):s.parentNode,c=l.parentNode;if("LI"===l.parentNode.nodeName)o.map((function(e){var t=r.findNextSiblings(e);c.nextSibling?c.parentNode.insertBefore(e,c.nextSibling):c.parentNode.appendChild(e),t.length&&(r.wrapList(t,l.nodeName),e.appendChild(t[0].parentNode))})),0===l.children.length&&c.removeChild(l),0===c.childNodes.length&&c.parentNode.removeChild(c);else{var u=l.childNodes.length>1?he.splitTree(l,{node:a.parentNode,offset:he.position(a)+1},{isSkipPaddingBlankHTML:!0}):null,d=he.splitTree(l,{node:s.parentNode,offset:he.position(s)},{isSkipPaddingBlankHTML:!0});o=n?he.listDescendant(d,he.isLi):_.from(d.childNodes).filter(he.isLi),!n&&he.isList(l.parentNode)||(o=o.map((function(e){return he.replace(e,"P")}))),t().each(_.from(o).reverse(),(function(e,t){he.insertAfter(t,l)}));var h=_.compact([l,d,u]);t().each(h,(function(e,n){var r=[n].concat(he.listDescendant(n,he.isList));t().each(r.reverse(),(function(e,t){he.nodeLength(t)||he.remove(t,!0)}))}))}i=i.concat(o)})),i}},{key:"appendToPrevious",value:function(e){return e.previousSibling?he.appendChildNodes(e.previousSibling,[e]):this.wrapList([e],"LI")}},{key:"findList",value:function(e){return e?_.find(e.children,(function(e){return["OL","UL"].indexOf(e.nodeName)>-1})):null}},{key:"findNextSiblings",value:function(e){for(var t=[];e.nextSibling;)t.push(e.nextSibling),e=e.nextSibling;return t}}],r&&Ee(n.prototype,r),i&&Ee(n,i),e}();function De(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Me=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bullet=new Ce,this.options=t.options}var n,r,i;return n=e,r=[{key:"insertTab",value:function(e,t){var n=he.createText(new Array(t+1).join(he.NBSP_CHAR));(e=e.deleteContents()).insertNode(n,!0),(e=be.create(n,t)).select()}},{key:"insertParagraph",value:function(e,n){n=(n=(n=n||be.create(e)).deleteContents()).wrapBodyInlineWithPara();var r,i=he.ancestor(n.sc,he.isPara);if(i){if(he.isLi(i)&&(he.isEmpty(i)||he.deepestChildIsEmpty(i)))return void this.bullet.toggleList(i.parentNode.nodeName);var o=null;if(1===this.options.blockquoteBreakingLevel?o=he.ancestor(i,he.isBlockquote):2===this.options.blockquoteBreakingLevel&&(o=he.lastAncestor(i,he.isBlockquote)),o){r=t()(he.emptyPara)[0],he.isRightEdgePoint(n.getStartPoint())&&he.isBR(n.sc.nextSibling)&&t()(n.sc.nextSibling).remove();var s=he.splitTree(o,n.getStartPoint(),{isDiscardEmptySplits:!0});s?s.parentNode.insertBefore(r,s):he.insertAfter(r,o)}else{r=he.splitTree(i,n.getStartPoint());var a=he.listDescendant(i,he.isEmptyAnchor);a=a.concat(he.listDescendant(r,he.isEmptyAnchor)),t().each(a,(function(e,t){he.remove(t)})),(he.isHeading(r)||he.isPre(r)||he.isCustomStyleTag(r))&&he.isEmpty(r)&&(r=he.replace(r,"p"))}}else{var l=n.sc.childNodes[n.so];r=t()(he.emptyPara)[0],l?n.sc.insertBefore(r,l):n.sc.appendChild(r)}be.create(r,0).normalize().select().scrollIntoView(e)}}],r&&De(n.prototype,r),i&&De(n,i),e}();function Ae(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ie=function e(t,n,r,i){var o={colPos:0,rowPos:0},s=[],a=[];function l(e,t,n,r,i,o,a){var l={baseRow:n,baseCell:r,isRowSpan:i,isColSpan:o,isVirtual:a};s[e]||(s[e]=[]),s[e][t]=l}function c(e,t,n,r){return{baseCell:e.baseCell,action:t,virtualTable:{rowIndex:n,cellIndex:r}}}function u(e,t){if(!s[e])return t;if(!s[e][t])return t;for(var n=t;s[e][n];)if(n++,!s[e][n])return n}function d(e,t){var n=u(e.rowIndex,t.cellIndex),r=t.colSpan>1,i=t.rowSpan>1,s=e.rowIndex===o.rowPos&&t.cellIndex===o.colPos;l(e.rowIndex,n,e,t,i,r,!1);var a=t.attributes.rowSpan?parseInt(t.attributes.rowSpan.value,10):0;if(a>1)for(var c=1;c<a;c++){var d=e.rowIndex+c;h(d,n,t,s),l(d,n,e,t,!0,r,!0)}var p=t.attributes.colSpan?parseInt(t.attributes.colSpan.value,10):0;if(p>1)for(var f=1;f<p;f++){var m=u(e.rowIndex,n+f);h(e.rowIndex,m,t,s),l(e.rowIndex,m,e,t,i,!0,!0)}}function h(e,t,n,r){e===o.rowPos&&o.colPos>=n.cellIndex&&n.cellIndex<=t&&!r&&o.colPos++}function p(t){switch(n){case e.where.Column:if(t.isColSpan)return e.resultAction.SubtractSpanCount;break;case e.where.Row:if(!t.isVirtual&&t.isRowSpan)return e.resultAction.AddCell;if(t.isRowSpan)return e.resultAction.SubtractSpanCount}return e.resultAction.RemoveCell}function f(t){switch(n){case e.where.Column:if(t.isColSpan)return e.resultAction.SumSpanCount;if(t.isRowSpan&&t.isVirtual)return e.resultAction.Ignore;break;case e.where.Row:if(t.isRowSpan)return e.resultAction.SumSpanCount;if(t.isColSpan&&t.isVirtual)return e.resultAction.Ignore}return e.resultAction.AddCell}this.getActionList=function(){for(var t=n===e.where.Row?o.rowPos:-1,i=n===e.where.Column?o.colPos:-1,l=0,u=!0;u;){var d=t>=0?t:l,h=i>=0?i:l,m=s[d];if(!m)return u=!1,a;var g=m[h];if(!g)return u=!1,a;var v=e.resultAction.Ignore;switch(r){case e.requestAction.Add:v=f(g);break;case e.requestAction.Delete:v=p(g)}a.push(c(g,v,d,h)),l++}return a},t&&t.tagName&&("td"===t.tagName.toLowerCase()||"th"===t.tagName.toLowerCase())&&(o.colPos=t.cellIndex,t.parentElement&&t.parentElement.tagName&&"tr"===t.parentElement.tagName.toLowerCase()&&(o.rowPos=t.parentElement.rowIndex)),function(){for(var e=i.rows,t=0;t<e.length;t++)for(var n=e[t].cells,r=0;r<n.length;r++)d(e[t],n[r])}()};Ie.where={Row:0,Column:1},Ie.requestAction={Add:0,Delete:1},Ie.resultAction={Ignore:0,SubtractSpanCount:1,RemoveCell:2,AddCell:3,SumSpanCount:4};var Le=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var n,r,i;return n=e,r=[{key:"tab",value:function(e,t){var n=he.ancestor(e.commonAncestor(),he.isCell),r=he.ancestor(n,he.isTable),i=he.listDescendant(r,he.isCell),o=_[t?"prev":"next"](i,n);o&&be.create(o,0).select()}},{key:"addRow",value:function(e,n){for(var r=he.ancestor(e.commonAncestor(),he.isCell),i=t()(r).closest("tr"),o=this.recoverAttributes(i),s=t()("<tr"+o+"></tr>"),a=new Ie(r,Ie.where.Row,Ie.requestAction.Add,t()(i).closest("table")[0]).getActionList(),l=0;l<a.length;l++){var c=a[l],u=this.recoverAttributes(c.baseCell);switch(c.action){case Ie.resultAction.AddCell:s.append("<td"+u+">"+he.blank+"</td>");break;case Ie.resultAction.SumSpanCount:if("top"===n&&(c.baseCell.parent?c.baseCell.closest("tr").rowIndex:0)<=i[0].rowIndex){var d=t()("<div></div>").append(t()("<td"+u+">"+he.blank+"</td>").removeAttr("rowspan")).html();s.append(d);break}var h=parseInt(c.baseCell.rowSpan,10);h++,c.baseCell.setAttribute("rowSpan",h)}}if("top"===n)i.before(s);else{if(r.rowSpan>1){var p=i[0].rowIndex+(r.rowSpan-2);return void t()(t()(i).parent().find("tr")[p]).after(t()(s))}i.after(s)}}},{key:"addCol",value:function(e,n){var r=he.ancestor(e.commonAncestor(),he.isCell),i=t()(r).closest("tr");t()(i).siblings().push(i);for(var o=new Ie(r,Ie.where.Column,Ie.requestAction.Add,t()(i).closest("table")[0]).getActionList(),s=0;s<o.length;s++){var a=o[s],l=this.recoverAttributes(a.baseCell);switch(a.action){case Ie.resultAction.AddCell:"right"===n?t()(a.baseCell).after("<td"+l+">"+he.blank+"</td>"):t()(a.baseCell).before("<td"+l+">"+he.blank+"</td>");break;case Ie.resultAction.SumSpanCount:if("right"===n){var c=parseInt(a.baseCell.colSpan,10);c++,a.baseCell.setAttribute("colSpan",c)}else t()(a.baseCell).before("<td"+l+">"+he.blank+"</td>")}}}},{key:"recoverAttributes",value:function(e){var t="";if(!e)return t;for(var n=e.attributes||[],r=0;r<n.length;r++)"id"!==n[r].name.toLowerCase()&&n[r].specified&&(t+=" "+n[r].name+"='"+n[r].value+"'");return t}},{key:"deleteRow",value:function(e){for(var n=he.ancestor(e.commonAncestor(),he.isCell),r=t()(n).closest("tr"),i=r.children("td, th").index(t()(n)),o=r[0].rowIndex,s=new Ie(n,Ie.where.Row,Ie.requestAction.Delete,t()(r).closest("table")[0]).getActionList(),a=0;a<s.length;a++)if(s[a]){var l=s[a].baseCell,c=s[a].virtualTable,u=l.rowSpan&&l.rowSpan>1,d=u?parseInt(l.rowSpan,10):0;switch(s[a].action){case Ie.resultAction.Ignore:continue;case Ie.resultAction.AddCell:var h=r.next("tr")[0];if(!h)continue;var p=r[0].cells[i];u&&(d>2?(d--,h.insertBefore(p,h.cells[i]),h.cells[i].setAttribute("rowSpan",d),h.cells[i].innerHTML=""):2===d&&(h.insertBefore(p,h.cells[i]),h.cells[i].removeAttribute("rowSpan"),h.cells[i].innerHTML=""));continue;case Ie.resultAction.SubtractSpanCount:u&&(d>2?(d--,l.setAttribute("rowSpan",d),c.rowIndex!==o&&l.cellIndex===i&&(l.innerHTML="")):2===d&&(l.removeAttribute("rowSpan"),c.rowIndex!==o&&l.cellIndex===i&&(l.innerHTML="")));continue;case Ie.resultAction.RemoveCell:continue}}r.remove()}},{key:"deleteCol",value:function(e){for(var n=he.ancestor(e.commonAncestor(),he.isCell),r=t()(n).closest("tr"),i=r.children("td, th").index(t()(n)),o=new Ie(n,Ie.where.Column,Ie.requestAction.Delete,t()(r).closest("table")[0]).getActionList(),s=0;s<o.length;s++)if(o[s])switch(o[s].action){case Ie.resultAction.Ignore:continue;case Ie.resultAction.SubtractSpanCount:var a=o[s].baseCell;if(a.colSpan&&a.colSpan>1){var l=a.colSpan?parseInt(a.colSpan,10):0;l>2?(l--,a.setAttribute("colSpan",l),a.cellIndex===i&&(a.innerHTML="")):2===l&&(a.removeAttribute("colSpan"),a.cellIndex===i&&(a.innerHTML=""))}continue;case Ie.resultAction.RemoveCell:he.remove(o[s].baseCell,!0);continue}}},{key:"createTable",value:function(e,n,r){for(var i,o=[],s=0;s<e;s++)o.push("<td>"+he.blank+"</td>");i=o.join("");for(var a,l=[],c=0;c<n;c++)l.push("<tr>"+i+"</tr>");a=l.join("");var u=t()("<table>"+a+"</table>");return r&&r.tableClassName&&u.addClass(r.tableClassName),u[0]}},{key:"deleteTable",value:function(e){var n=he.ancestor(e.commonAncestor(),he.isCell);t()(n).closest("table").remove()}}],r&&Ae(n.prototype,r),i&&Ae(n,i),e}();function Oe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ne=function(){function e(n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.$note=n.layoutInfo.note,this.$editor=n.layoutInfo.editor,this.$editable=n.layoutInfo.editable,this.options=n.options,this.lang=this.options.langInfo,this.editable=this.$editable[0],this.lastRange=null,this.snapshot=null,this.style=new Te,this.table=new Le,this.typing=new Me(n),this.bullet=new Ce,this.history=new Se(n),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);for(var i=["bold","italic","underline","strikethrough","superscript","subscript","justifyLeft","justifyCenter","justifyRight","justifyFull","formatBlock","removeFormat","backColor"],o=0,s=i.length;o<s;o++)this[i[o]]=function(e){return function(t){r.beforeCommand(),document.execCommand(e,!1,t),r.afterCommand(!0)}}(i[o]),this.context.memo("help."+i[o],this.lang.help[i[o]]);this.fontName=this.wrapCommand((function(e){return r.fontStyling("font-family",p.validFontName(e))})),this.fontSize=this.wrapCommand((function(e){var t=r.currentStyle()["font-size-unit"];return r.fontStyling("font-size",e+t)})),this.fontSizeUnit=this.wrapCommand((function(e){var t=r.currentStyle()["font-size"];return r.fontStyling("font-size",t+e)}));for(var a=1;a<=6;a++)this["formatH"+a]=function(e){return function(){r.formatBlock("H"+e)}}(a),this.context.memo("help.formatH"+a,this.lang.help["formatH"+a]);this.insertParagraph=this.wrapCommand((function(){r.typing.insertParagraph(r.editable)})),this.insertOrderedList=this.wrapCommand((function(){r.bullet.insertOrderedList(r.editable)})),this.insertUnorderedList=this.wrapCommand((function(){r.bullet.insertUnorderedList(r.editable)})),this.indent=this.wrapCommand((function(){r.bullet.indent(r.editable)})),this.outdent=this.wrapCommand((function(){r.bullet.outdent(r.editable)})),this.insertNode=this.wrapCommand((function(e){r.isLimited(t()(e).text().length)||(r.getLastRange().insertNode(e),r.setLastRange(be.createFromNodeAfter(e).select()))})),this.insertText=this.wrapCommand((function(e){if(!r.isLimited(e.length)){var t=r.getLastRange().insertNode(he.createText(e));r.setLastRange(be.create(t,he.nodeLength(t)).select())}})),this.pasteHTML=this.wrapCommand((function(e){if(!r.isLimited(e.length)){e=r.context.invoke("codeview.purify",e);var t=r.getLastRange().pasteHTML(e);r.setLastRange(be.createFromNodeAfter(_.last(t)).select())}})),this.formatBlock=this.wrapCommand((function(e,t){var n=r.options.callbacks.onApplyCustomStyle;n?n.call(r,t,r.context,r.onFormatBlock):r.onFormatBlock(e,t)})),this.insertHorizontalRule=this.wrapCommand((function(){var e=r.getLastRange().insertNode(he.create("HR"));e.nextSibling&&r.setLastRange(be.create(e.nextSibling,0).normalize().select())})),this.lineHeight=this.wrapCommand((function(e){r.style.stylePara(r.getLastRange(),{lineHeight:e})})),this.createLink=this.wrapCommand((function(e){var n=e.url,i=e.text,o=e.isNewWindow,s=e.checkProtocol,a=e.range||r.getLastRange(),l=i.length-a.toString().length;if(!(l>0&&r.isLimited(l))){var c=a.toString()!==i;"string"==typeof n&&(n=n.trim()),r.options.onCreateLink?n=r.options.onCreateLink(n):s&&(n=/^([A-Za-z][A-Za-z0-9+-.]*\:|#|\/)/.test(n)?n:r.options.defaultProtocol+n);var u=[];if(c){var d=(a=a.deleteContents()).insertNode(t()("<A>"+i+"</A>")[0]);u.push(d)}else u=r.style.styleNodes(a,{nodeName:"A",expandClosestSibling:!0,onlyPartialContains:!0});t().each(u,(function(e,r){t()(r).attr("href",n),o?t()(r).attr("target","_blank"):t()(r).removeAttr("target")})),r.setLastRange(r.createRangeFromList(u).select())}})),this.color=this.wrapCommand((function(e){var t=e.foreColor,n=e.backColor;t&&document.execCommand("foreColor",!1,t),n&&document.execCommand("backColor",!1,n)})),this.foreColor=this.wrapCommand((function(e){document.execCommand("foreColor",!1,e)})),this.insertTable=this.wrapCommand((function(e){var t=e.split("x");r.getLastRange().deleteContents().insertNode(r.table.createTable(t[0],t[1],r.options))})),this.removeMedia=this.wrapCommand((function(){var e=t()(r.restoreTarget()).parent();e.closest("figure").length?e.closest("figure").remove():e=t()(r.restoreTarget()).detach(),r.context.triggerEvent("media.delete",e,r.$editable)})),this.floatMe=this.wrapCommand((function(e){var n=t()(r.restoreTarget());n.toggleClass("note-float-left","left"===e),n.toggleClass("note-float-right","right"===e),n.css("float","none"===e?"":e)})),this.resize=this.wrapCommand((function(e){var n=t()(r.restoreTarget());0===(e=parseFloat(e))?n.css("width",""):n.css({width:100*e+"%",height:""})}))}var n,r,i;return n=e,r=[{key:"initialize",value:function(){var e=this;this.$editable.on("keydown",(function(t){if(t.keyCode===we.code.ENTER&&e.context.triggerEvent("enter",t),e.context.triggerEvent("keydown",t),e.snapshot=e.history.makeSnapshot(),e.hasKeyShortCut=!1,t.isDefaultPrevented()||(e.options.shortcuts?e.hasKeyShortCut=e.handleKeyMap(t):e.preventDefaultEditableShortCuts(t)),e.isLimited(1,t)){var n=e.getLastRange();if(n.eo-n.so==0)return!1}e.setLastRange(),e.options.recordEveryKeystroke&&!1===e.hasKeyShortCut&&e.history.recordUndo()})).on("keyup",(function(t){e.setLastRange(),e.context.triggerEvent("keyup",t)})).on("focus",(function(t){e.setLastRange(),e.context.triggerEvent("focus",t)})).on("blur",(function(t){e.context.triggerEvent("blur",t)})).on("mousedown",(function(t){e.context.triggerEvent("mousedown",t)})).on("mouseup",(function(t){e.setLastRange(),e.history.recordUndo(),e.context.triggerEvent("mouseup",t)})).on("scroll",(function(t){e.context.triggerEvent("scroll",t)})).on("paste",(function(t){e.setLastRange(),e.context.triggerEvent("paste",t)})).on("input",(function(){e.isLimited(0)&&e.snapshot&&e.history.applySnapshot(e.snapshot)})),this.$editable.attr("spellcheck",this.options.spellCheck),this.$editable.attr("autocorrect",this.options.spellCheck),this.options.disableGrammar&&this.$editable.attr("data-gramm",!1),this.$editable.html(he.html(this.$note)||he.emptyPara),this.$editable.on(p.inputEventName,m.debounce((function(){e.context.triggerEvent("change",e.$editable.html(),e.$editable)}),10)),this.$editable.on("focusin",(function(t){e.context.triggerEvent("focusin",t)})).on("focusout",(function(t){e.context.triggerEvent("focusout",t)})),this.options.airMode?this.options.overrideContextMenu&&this.$editor.on("contextmenu",(function(t){return e.context.triggerEvent("contextmenu",t),!1})):(this.options.width&&this.$editor.outerWidth(this.options.width),this.options.height&&this.$editable.outerHeight(this.options.height),this.options.maxHeight&&this.$editable.css("max-height",this.options.maxHeight),this.options.minHeight&&this.$editable.css("min-height",this.options.minHeight)),this.history.recordUndo(),this.setLastRange()}},{key:"destroy",value:function(){this.$editable.off()}},{key:"handleKeyMap",value:function(e){var t=this.options.keyMap[p.isMac?"mac":"pc"],n=[];e.metaKey&&n.push("CMD"),e.ctrlKey&&!e.altKey&&n.push("CTRL"),e.shiftKey&&n.push("SHIFT");var r=we.nameFromCode[e.keyCode];r&&n.push(r);var i=t[n.join("+")];if("TAB"!==r||this.options.tabDisable)if(i){if(!1!==this.context.invoke(i))return e.preventDefault(),!0}else we.isEdit(e.keyCode)&&this.afterCommand();else this.afterCommand();return!1}},{key:"preventDefaultEditableShortCuts",value:function(e){(e.ctrlKey||e.metaKey)&&_.contains([66,73,85],e.keyCode)&&e.preventDefault()}},{key:"isLimited",value:function(e,t){return e=e||0,(void 0===t||!(we.isMove(t.keyCode)||we.isNavigation(t.keyCode)||t.ctrlKey||t.metaKey||_.contains([we.code.BACKSPACE,we.code.DELETE],t.keyCode)))&&this.options.maxTextLength>0&&this.$editable.text().length+e>this.options.maxTextLength}},{key:"createRange",value:function(){return this.focus(),this.setLastRange(),this.getLastRange()}},{key:"createRangeFromList",value:function(e){var t=be.createFromNodeBefore(_.head(e)).getStartPoint(),n=be.createFromNodeAfter(_.last(e)).getEndPoint();return be.create(t.node,t.offset,n.node,n.offset)}},{key:"setLastRange",value:function(e){e?this.lastRange=e:(this.lastRange=be.create(this.editable),0===t()(this.lastRange.sc).closest(".note-editable").length&&(this.lastRange=be.createFromBodyElement(this.editable)))}},{key:"getLastRange",value:function(){return this.lastRange||this.setLastRange(),this.lastRange}},{key:"saveRange",value:function(e){e&&this.getLastRange().collapse().select()}},{key:"restoreRange",value:function(){this.lastRange&&(this.lastRange.select(),this.focus())}},{key:"saveTarget",value:function(e){this.$editable.data("target",e)}},{key:"clearTarget",value:function(){this.$editable.removeData("target")}},{key:"restoreTarget",value:function(){return this.$editable.data("target")}},{key:"currentStyle",value:function(){var e=be.create();return e&&(e=e.normalize()),e?this.style.current(e):this.style.fromNode(this.$editable)}},{key:"styleFromNode",value:function(e){return this.style.fromNode(e)}},{key:"undo",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.undo(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"commit",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.commit(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"redo",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.redo(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"beforeCommand",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),document.execCommand("styleWithCSS",!1,this.options.styleWithCSS),this.focus()}},{key:"afterCommand",value:function(e){this.normalizeContent(),this.history.recordUndo(),e||this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"tab",value:function(){var e=this.getLastRange();if(e.isCollapsed()&&e.isOnCell())this.table.tab(e);else{if(0===this.options.tabSize)return!1;this.isLimited(this.options.tabSize)||(this.beforeCommand(),this.typing.insertTab(e,this.options.tabSize),this.afterCommand())}}},{key:"untab",value:function(){var e=this.getLastRange();if(e.isCollapsed()&&e.isOnCell())this.table.tab(e,!0);else if(0===this.options.tabSize)return!1}},{key:"wrapCommand",value:function(e){return function(){this.beforeCommand(),e.apply(this,arguments),this.afterCommand()}}},{key:"insertImage",value:function(e,n){var r,i=this;return(r=e,t().Deferred((function(e){var n=t()("<img>");n.one("load",(function(){n.off("error abort"),e.resolve(n)})).one("error abort",(function(){n.off("load").detach(),e.reject(n)})).css({display:"none"}).appendTo(document.body).attr("src",r)})).promise()).then((function(e){i.beforeCommand(),"function"==typeof n?n(e):("string"==typeof n&&e.attr("data-filename",n),e.css("width",Math.min(i.$editable.width(),e.width()))),e.show(),i.getLastRange().insertNode(e[0]),i.setLastRange(be.createFromNodeAfter(e[0]).select()),i.afterCommand()})).fail((function(e){i.context.triggerEvent("image.upload.error",e)}))}},{key:"insertImagesAsDataURL",value:function(e){var n=this;t().each(e,(function(e,r){var i=r.name;n.options.maximumImageFileSize&&n.options.maximumImageFileSize<r.size?n.context.triggerEvent("image.upload.error",n.lang.image.maximumFileSizeError):function(e){return t().Deferred((function(n){t().extend(new FileReader,{onload:function(e){var t=e.target.result;n.resolve(t)},onerror:function(e){n.reject(e)}}).readAsDataURL(e)})).promise()}(r).then((function(e){return n.insertImage(e,i)})).fail((function(){n.context.triggerEvent("image.upload.error")}))}))}},{key:"insertImagesOrCallback",value:function(e){this.options.callbacks.onImageUpload?this.context.triggerEvent("image.upload",e):this.insertImagesAsDataURL(e)}},{key:"getSelectedText",value:function(){var e=this.getLastRange();return e.isOnAnchor()&&(e=be.createFromNode(he.ancestor(e.sc,he.isAnchor))),e.toString()}},{key:"onFormatBlock",value:function(e,n){if(document.execCommand("FormatBlock",!1,p.isMSIE?"<"+e+">":e),n&&n.length&&(n[0].tagName.toUpperCase()!==e.toUpperCase()&&(n=n.find(e)),n&&n.length)){var r=this.createRange(),i=t()([r.sc,r.ec]).closest(e);i.removeClass();var o=n[0].className||"";o&&i.addClass(o)}}},{key:"formatPara",value:function(){this.formatBlock("P")}},{key:"fontStyling",value:function(e,n){var r=this.getLastRange();if(""!==r){var i=this.style.styleNodes(r);if(this.$editor.find(".note-status-output").html(""),t()(i).css(e,n),r.isCollapsed()){var o=_.head(i);o&&!he.nodeLength(o)&&(o.innerHTML=he.ZERO_WIDTH_NBSP_CHAR,be.createFromNode(o.firstChild).select(),this.setLastRange(),this.$editable.data("bogus",o))}else this.setLastRange(this.createRangeFromList(i).select())}else{var s=t().now();this.$editor.find(".note-status-output").html('<div id="note-status-output-'+s+'" class="alert alert-info">'+this.lang.output.noSelection+"</div>"),setTimeout((function(){t()("#note-status-output-"+s).remove()}),5e3)}}},{key:"unlink",value:function(){var e=this.getLastRange();if(e.isOnAnchor()){var t=he.ancestor(e.sc,he.isAnchor);(e=be.createFromNode(t)).select(),this.setLastRange(),this.beforeCommand(),document.execCommand("unlink"),this.afterCommand()}}},{key:"getLinkInfo",value:function(){var e=this.getLastRange().expand(he.isAnchor),n=t()(_.head(e.nodes(he.isAnchor))),r={range:e,text:e.toString(),url:n.length?n.attr("href"):""};return n.length&&(r.isNewWindow="_blank"===n.attr("target")),r}},{key:"addRow",value:function(e){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.addRow(t,e),this.afterCommand())}},{key:"addCol",value:function(e){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.addCol(t,e),this.afterCommand())}},{key:"deleteRow",value:function(){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteRow(e),this.afterCommand())}},{key:"deleteCol",value:function(){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteCol(e),this.afterCommand())}},{key:"deleteTable",value:function(){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteTable(e),this.afterCommand())}},{key:"resizeTo",value:function(e,t,n){var r;if(n){var i=e.y/e.x,o=t.data("ratio");r={width:o>i?e.x:e.y/o,height:o>i?e.x*o:e.y}}else r={width:e.x,height:e.y};t.css(r)}},{key:"hasFocus",value:function(){return this.$editable.is(":focus")}},{key:"focus",value:function(){this.hasFocus()||this.$editable.focus()}},{key:"isEmpty",value:function(){return he.isEmpty(this.$editable[0])||he.emptyPara===this.$editable.html()}},{key:"empty",value:function(){this.context.invoke("code",he.emptyPara)}},{key:"normalizeContent",value:function(){this.$editable[0].normalize()}}],r&&Oe(n.prototype,r),i&&Oe(n,i),e}();function Re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Pe=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$editable=t.layoutInfo.editable}var t,n,r;return t=e,(n=[{key:"initialize",value:function(){this.$editable.on("paste",this.pasteByEvent.bind(this))}},{key:"pasteByEvent",value:function(e){var t=this,n=e.originalEvent.clipboardData;if(n&&n.items&&n.items.length){var r=n.items.length>1?n.items[1]:_.head(n.items);"file"===r.kind&&-1!==r.type.indexOf("image/")?(this.context.invoke("editor.insertImagesOrCallback",[r.getAsFile()]),e.preventDefault()):"string"===r.kind&&this.context.invoke("editor.isLimited",n.getData("Text").length)&&e.preventDefault()}else if(window.clipboardData){var i=window.clipboardData.getData("text");this.context.invoke("editor.isLimited",i.length)&&e.preventDefault()}setTimeout((function(){t.context.invoke("editor.afterCommand")}),10)}}])&&Re(t.prototype,n),r&&Re(t,r),e}();function Fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var je=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.$eventListener=t()(document),this.$editor=n.layoutInfo.editor,this.$editable=n.layoutInfo.editable,this.options=n.options,this.lang=this.options.langInfo,this.documentEventHandlers={},this.$dropzone=t()(['<div class="note-dropzone">','<div class="note-dropzone-message"></div>',"</div>"].join("")).prependTo(this.$editor)}var n,r,i;return n=e,r=[{key:"initialize",value:function(){this.options.disableDragAndDrop?(this.documentEventHandlers.onDrop=function(e){e.preventDefault()},this.$eventListener=this.$dropzone,this.$eventListener.on("drop",this.documentEventHandlers.onDrop)):this.attachDragAndDropEvent()}},{key:"attachDragAndDropEvent",value:function(){var e=this,n=t()(),r=this.$dropzone.find(".note-dropzone-message");this.documentEventHandlers.onDragenter=function(t){var i=e.context.invoke("codeview.isActivated"),o=e.$editor.width()>0&&e.$editor.height()>0;i||n.length||!o||(e.$editor.addClass("dragover"),e.$dropzone.width(e.$editor.width()),e.$dropzone.height(e.$editor.height()),r.text(e.lang.image.dragImageHere)),n=n.add(t.target)},this.documentEventHandlers.onDragleave=function(r){(n=n.not(r.target)).length&&"BODY"!==r.target.nodeName||(n=t()(),e.$editor.removeClass("dragover"))},this.documentEventHandlers.onDrop=function(){n=t()(),e.$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(){e.$dropzone.addClass("hover"),r.text(e.lang.image.dropImage)})).on("dragleave",(function(){e.$dropzone.removeClass("hover"),r.text(e.lang.image.dragImageHere)})),this.$dropzone.on("drop",(function(n){var r=n.originalEvent.dataTransfer;n.preventDefault(),r&&r.files&&r.files.length?(e.$editable.focus(),e.context.invoke("editor.insertImagesOrCallback",r.files)):t().each(r.types,(function(n,i){if(!(i.toLowerCase().indexOf("_moz_")>-1)){var o=r.getData(i);i.toLowerCase().indexOf("text")>-1?e.context.invoke("editor.pasteHTML",o):t()(o).each((function(t,n){e.context.invoke("editor.insertNode",n)}))}}))})).on("dragover",!1)}},{key:"destroy",value:function(){var e=this;Object.keys(this.documentEventHandlers).forEach((function(t){e.$eventListener.off(t.substr(2).toLowerCase(),e.documentEventHandlers[t])})),this.documentEventHandlers={}}}],r&&Fe(n.prototype,r),i&&Fe(n,i),e}();function Ye(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Ve(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ve(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function He(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Be=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$editor=t.layoutInfo.editor,this.$editable=t.layoutInfo.editable,this.$codable=t.layoutInfo.codable,this.options=t.options,this.CodeMirrorConstructor=window.CodeMirror,this.options.codemirror.CodeMirrorConstructor&&(this.CodeMirrorConstructor=this.options.codemirror.CodeMirrorConstructor)}var t,n,r;return t=e,n=[{key:"sync",value:function(e){var t=this.isActivated(),n=this.CodeMirrorConstructor;t&&(e?n?this.$codable.data("cmEditor").getDoc().setValue(e):this.$codable.val(e):n&&this.$codable.data("cmEditor").save())}},{key:"initialize",value:function(){var e=this;this.$codable.on("keyup",(function(t){t.keyCode===we.code.ESCAPE&&e.deactivate()}))}},{key:"isActivated",value:function(){return this.$editor.hasClass("codeview")}},{key:"toggle",value:function(){this.isActivated()?this.deactivate():this.activate(),this.context.triggerEvent("codeview.toggled")}},{key:"purify",value:function(e){if(this.options.codeviewFilter&&(e=e.replace(this.options.codeviewFilterRegex,""),this.options.codeviewIframeFilter)){var t=this.options.codeviewIframeWhitelistSrc.concat(this.options.codeviewIframeWhitelistSrcBase);e=e.replace(/(<iframe.*?>.*?(?:<\/iframe>)?)/gi,(function(e){if(/<.+src(?==?('|"|\s)?)[\s\S]+src(?=('|"|\s)?)[^>]*?>/i.test(e))return"";var n,r=Ye(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(new RegExp('src="(https?:)?//'+i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+'/(.+)"').test(e))return e}}catch(e){r.e(e)}finally{r.f()}return""}))}return e}},{key:"activate",value:function(){var e=this,t=this.CodeMirrorConstructor;if(this.$codable.val(he.html(this.$editable,this.options.prettifyHtml)),this.$codable.height(this.$editable.height()),this.context.invoke("toolbar.updateCodeview",!0),this.context.invoke("airPopover.updateCodeview",!0),this.$editor.addClass("codeview"),this.$codable.focus(),t){var n=t.fromTextArea(this.$codable[0],this.options.codemirror);if(this.options.codemirror.tern){var r=new t.TernServer(this.options.codemirror.tern);n.ternServer=r,n.on("cursorActivity",(function(e){r.updateArgHints(e)}))}n.on("blur",(function(t){e.context.triggerEvent("blur.codeview",n.getValue(),t)})),n.on("change",(function(){e.context.triggerEvent("change.codeview",n.getValue(),n)})),n.setSize(null,this.$editable.outerHeight()),this.$codable.data("cmEditor",n)}else this.$codable.on("blur",(function(t){e.context.triggerEvent("blur.codeview",e.$codable.val(),t)})),this.$codable.on("input",(function(){e.context.triggerEvent("change.codeview",e.$codable.val(),e.$codable)}))}},{key:"deactivate",value:function(){if(this.CodeMirrorConstructor){var e=this.$codable.data("cmEditor");this.$codable.val(e.getValue()),e.toTextArea()}var t=this.purify(he.value(this.$codable,this.options.prettifyHtml)||he.emptyPara),n=this.$editable.html()!==t;this.$editable.html(t),this.$editable.height(this.options.height?this.$codable.height():"auto"),this.$editor.removeClass("codeview"),n&&this.context.triggerEvent("change",this.$editable.html(),this.$editable),this.$editable.focus(),this.context.invoke("toolbar.updateCodeview",!1),this.context.invoke("airPopover.updateCodeview",!1)}},{key:"destroy",value:function(){this.isActivated()&&this.deactivate()}}],n&&He(t.prototype,n),r&&He(t,r),e}();function Ue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ze=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$document=t()(document),this.$statusbar=n.layoutInfo.statusbar,this.$editable=n.layoutInfo.editable,this.$codable=n.layoutInfo.codable,this.options=n.options}var n,r,i;return n=e,(r=[{key:"initialize",value:function(){var e=this;this.options.airMode||this.options.disableResizeEditor?this.destroy():this.$statusbar.on("mousedown",(function(t){t.preventDefault(),t.stopPropagation();var n=e.$editable.offset().top-e.$document.scrollTop(),r=e.$codable.offset().top-e.$document.scrollTop(),i=function(t){var i=t.clientY-(n+24),o=t.clientY-(r+24);i=e.options.minheight>0?Math.max(i,e.options.minheight):i,i=e.options.maxHeight>0?Math.min(i,e.options.maxHeight):i,o=e.options.minheight>0?Math.max(o,e.options.minheight):o,o=e.options.maxHeight>0?Math.min(o,e.options.maxHeight):o,e.$editable.height(i),e.$codable.height(o)};e.$document.on("mousemove",i).one("mouseup",(function(){e.$document.off("mousemove",i)}))}))}},{key:"destroy",value:function(){this.$statusbar.off(),this.$statusbar.addClass("locked")}}])&&Ue(n.prototype,r),i&&Ue(n,i),e}();function qe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var We=function(){function e(n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.$editor=n.layoutInfo.editor,this.$toolbar=n.layoutInfo.toolbar,this.$editable=n.layoutInfo.editable,this.$codable=n.layoutInfo.codable,this.$window=t()(window),this.$scrollbar=t()("html, body"),this.scrollbarClassName="note-fullscreen-body",this.onResize=function(){r.resizeTo({h:r.$window.height()-r.$toolbar.outerHeight()})}}var n,r,i;return n=e,(r=[{key:"resizeTo",value:function(e){this.$editable.css("height",e.h),this.$codable.css("height",e.h),this.$codable.data("cmeditor")&&this.$codable.data("cmeditor").setsize(null,e.h)}},{key:"toggle",value:function(){this.$editor.toggleClass("fullscreen");var e=this.isFullscreen();this.$scrollbar.toggleClass(this.scrollbarClassName,e),e?(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")):(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",e)}},{key:"isFullscreen",value:function(){return this.$editor.hasClass("fullscreen")}},{key:"destroy",value:function(){this.$scrollbar.removeClass(this.scrollbarClassName)}}])&&qe(n.prototype,r),i&&qe(n,i),e}();function $e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ge=function(){function e(n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.$document=t()(document),this.$editingArea=n.layoutInfo.editingArea,this.options=n.options,this.lang=this.options.langInfo,this.events={"summernote.mousedown":function(e,t){r.update(t.target,t)&&t.preventDefault()},"summernote.keyup summernote.scroll summernote.change summernote.dialog.shown":function(){r.update()},"summernote.disable summernote.blur":function(){r.hide()},"summernote.codeview.toggled":function(){r.update()}}}var n,r,i;return n=e,r=[{key:"initialize",value:function(){var e=this;this.$handle=t()(['<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(t){if(he.isControlSizing(t.target)){t.preventDefault(),t.stopPropagation();var n=e.$handle.find(".note-control-selection").data("target"),r=n.offset(),i=e.$document.scrollTop(),o=function(t){e.context.invoke("editor.resizeTo",{x:t.clientX-r.left,y:t.clientY-(r.top-i)},n,!t.shiftKey),e.update(n[0],t)};e.$document.on("mousemove",o).one("mouseup",(function(t){t.preventDefault(),e.$document.off("mousemove",o),e.context.invoke("editor.afterCommand")})),n.data("ratio")||n.data("ratio",n.height()/n.width())}})),this.$handle.on("wheel",(function(t){t.preventDefault(),e.update()}))}},{key:"destroy",value:function(){this.$handle.remove()}},{key:"update",value:function(e,n){if(this.context.isDisabled())return!1;var r=he.isImg(e),i=this.$handle.find(".note-control-selection");if(this.context.invoke("imagePopover.update",e,n),r){var o=t()(e),s=o.position(),a={left:s.left+parseInt(o.css("marginLeft"),10),top:s.top+parseInt(o.css("marginTop"),10)},l={w:o.outerWidth(!1),h:o.outerHeight(!1)};i.css({display:"block",left:a.left,top:a.top,width:l.w,height:l.h}).data("target",o);var c=new Image;c.src=o.attr("src");var u=l.w+"x"+l.h+" ("+this.lang.image.original+": "+c.width+"x"+c.height+")";i.find(".note-control-selection-info").text(u),this.context.invoke("editor.saveTarget",e)}else this.hide();return r}},{key:"hide",value:function(){this.context.invoke("editor.clearTarget"),this.$handle.children().hide()}}],r&&$e(n.prototype,r),i&&$e(n,i),e}();function Ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ze=/^([A-Za-z][A-Za-z0-9+-.]*\:[\/]{2}|tel:|mailto:[A-Z0-9._%+-]+@|xmpp:[A-Z0-9._%+-]+@)?(www\.)?(.+)$/i,Xe=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.options=t.options,this.events={"summernote.keyup":function(e,t){t.isDefaultPrevented()||n.handleKeyup(t)},"summernote.keydown":function(e,t){n.handleKeydown(t)}}}var n,r,i;return n=e,(r=[{key:"initialize",value:function(){this.lastWordRange=null}},{key:"destroy",value:function(){this.lastWordRange=null}},{key:"replace",value:function(){if(this.lastWordRange){var e=this.lastWordRange.toString(),n=e.match(Ze);if(n&&(n[1]||n[2])){var r=n[1]?e:"http://"+e,i=this.options.showDomainOnlyForAutolink?e.replace(/^(?:https?:\/\/)?(?:tel?:?)?(?:mailto?:?)?(?:xmpp?:?)?(?:www\.)?/i,"").split("/")[0]:e,o=t()("<a></a>").html(i).attr("href",r)[0];this.context.options.linkTargetBlank&&t()(o).attr("target","_blank"),this.lastWordRange.insertNode(o),this.lastWordRange=null,this.context.invoke("editor.focus")}}}},{key:"handleKeydown",value:function(e){if(_.contains([we.code.ENTER,we.code.SPACE],e.keyCode)){var t=this.context.invoke("editor.createRange").getWordRange();this.lastWordRange=t}}},{key:"handleKeyup",value:function(e){_.contains([we.code.ENTER,we.code.SPACE],e.keyCode)&&this.replace()}}])&&Ke(n.prototype,r),i&&Ke(n,i),e}();function Je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Qe=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$note=t.layoutInfo.note,this.events={"summernote.change":function(){n.$note.val(t.invoke("code"))}}}var t,n,r;return t=e,(n=[{key:"shouldInitialize",value:function(){return he.isTextarea(this.$note[0])}}])&&Je(t.prototype,n),r&&Je(t,r),e}();function et(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var tt=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.options=t.options.replace||{},this.keys=[we.code.ENTER,we.code.SPACE,we.code.PERIOD,we.code.COMMA,we.code.SEMICOLON,we.code.SLASH],this.previousKeydownCode=null,this.events={"summernote.keyup":function(e,t){t.isDefaultPrevented()||n.handleKeyup(t)},"summernote.keydown":function(e,t){n.handleKeydown(t)}}}var t,n,r;return t=e,(n=[{key:"shouldInitialize",value:function(){return!!this.options.match}},{key:"initialize",value:function(){this.lastWord=null}},{key:"destroy",value:function(){this.lastWord=null}},{key:"replace",value:function(){if(this.lastWord){var e=this,t=this.lastWord.toString();this.options.match(t,(function(t){if(t){var n="";if("string"==typeof t?n=he.createText(t):t instanceof jQuery?n=t[0]:t instanceof Node&&(n=t),!n)return;e.lastWord.insertNode(n),e.lastWord=null,e.context.invoke("editor.focus")}}))}}},{key:"handleKeydown",value:function(e){if(this.previousKeydownCode&&_.contains(this.keys,this.previousKeydownCode))this.previousKeydownCode=e.keyCode;else{if(_.contains(this.keys,e.keyCode)){var t=this.context.invoke("editor.createRange").getWordRange();this.lastWord=t}this.previousKeydownCode=e.keyCode}}},{key:"handleKeyup",value:function(e){_.contains(this.keys,e.keyCode)&&this.replace()}}])&&et(t.prototype,n),r&&et(t,r),e}();function nt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var rt=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$editingArea=t.layoutInfo.editingArea,this.options=t.options,!0===this.options.inheritPlaceholder&&(this.options.placeholder=this.context.$note.attr("placeholder")||this.options.placeholder),this.events={"summernote.init summernote.change":function(){n.update()},"summernote.codeview.toggled":function(){n.update()}}}var n,r,i;return n=e,(r=[{key:"shouldInitialize",value:function(){return!!this.options.placeholder}},{key:"initialize",value:function(){var e=this;this.$placeholder=t()('<div class="note-placeholder"></div>'),this.$placeholder.on("click",(function(){e.context.invoke("focus")})).html(this.options.placeholder).prependTo(this.$editingArea),this.update()}},{key:"destroy",value:function(){this.$placeholder.remove()}},{key:"update",value:function(){var e=!this.context.invoke("codeview.isActivated")&&this.context.invoke("editor.isEmpty");this.$placeholder.toggle(e)}}])&&nt(n.prototype,r),i&&nt(n,i),e}();function it(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ot=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.ui=t().summernote.ui,this.context=n,this.$toolbar=n.layoutInfo.toolbar,this.options=n.options,this.lang=this.options.langInfo,this.invertedKeyMap=m.invertObject(this.options.keyMap[p.isMac?"mac":"pc"])}var n,r,i;return n=e,r=[{key:"representShortcut",value:function(e){var t=this.invertedKeyMap[e];return this.options.shortcuts&&t?(p.isMac&&(t=t.replace("CMD","\u2318").replace("SHIFT","\u21e7"))," ("+(t=t.replace("BACKSLASH","\\").replace("SLASH","/").replace("LEFTBRACKET","[").replace("RIGHTBRACKET","]"))+")"):""}},{key:"button",value:function(e){return!this.options.tooltip&&e.tooltip&&delete e.tooltip,e.container=this.options.container,this.ui.button(e)}},{key:"initialize",value:function(){this.addToolbarButtons(),this.addImagePopoverButtons(),this.addLinkPopoverButtons(),this.addTablePopoverButtons(),this.fontInstalledMap={}}},{key:"destroy",value:function(){delete this.fontInstalledMap}},{key:"isFontInstalled",value:function(e){return Object.prototype.hasOwnProperty.call(this.fontInstalledMap,e)||(this.fontInstalledMap[e]=p.isFontInstalled(e)||_.contains(this.options.fontNamesIgnoreCheck,e)),this.fontInstalledMap[e]}},{key:"isFontDeservedToAdd",value:function(e){return""!==(e=e.toLowerCase())&&this.isFontInstalled(e)&&-1===p.genericFontFamilies.indexOf(e)}},{key:"colorPalette",value:function(e,n,r,i){var o=this;return this.ui.buttonGroup({className:"note-color "+e,children:[this.button({className:"note-current-color-button",contents:this.ui.icon(this.options.icons.font+" note-recent-color"),tooltip:n,click:function(e){var n=t()(e.currentTarget);r&&i?o.context.invoke("editor.color",{backColor:n.attr("data-backColor"),foreColor:n.attr("data-foreColor")}):r?o.context.invoke("editor.color",{backColor:n.attr("data-backColor")}):i&&o.context.invoke("editor.color",{foreColor:n.attr("data-foreColor")})},callback:function(e){var t=e.find(".note-recent-color");r&&(t.css("background-color",o.options.colorButton.backColor),e.attr("data-backColor",o.options.colorButton.backColor)),i?(t.css("color",o.options.colorButton.foreColor),e.attr("data-foreColor",o.options.colorButton.foreColor)):t.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:(r?['<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(""):"")+(i?['<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(e){e.find(".note-holder").each((function(e,n){var r=t()(n);r.append(o.ui.palette({colors:o.options.colors,colorsName:o.options.colorsName,eventName:r.data("event"),container:o.options.container,tooltip:o.options.tooltip}).render())}));var n=[["#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF"]];e.find(".note-holder-custom").each((function(e,r){var i=t()(r);i.append(o.ui.palette({colors:n,colorsName:n,eventName:i.data("event"),container:o.options.container,tooltip:o.options.tooltip}).render())})),e.find("input[type=color]").each((function(n,r){t()(r).change((function(){var n=e.find("#"+t()(this).data("event")).find(".note-color-btn").first(),r=this.value.toUpperCase();n.css("background-color",r).attr("aria-label",r).attr("data-value",r).attr("data-original-title",r),n.click()}))}))},click:function(n){n.stopPropagation();var r=t()("."+e).find(".note-dropdown-menu"),i=t()(n.target),s=i.data("event"),a=i.attr("data-value");if("openPalette"===s){var l=r.find("#"+a),c=t()(r.find("#"+l.data("event")).find(".note-color-row")[0]),u=c.find(".note-color-btn").last().detach(),d=l.val();u.css("background-color",d).attr("aria-label",d).attr("data-value",d).attr("data-original-title",d),c.prepend(u),l.click()}else{if(_.contains(["backColor","foreColor"],s)){var h="backColor"===s?"background-color":"color",p=i.closest(".note-color").find(".note-recent-color"),f=i.closest(".note-color").find(".note-current-color-button");p.css(h,a),f.attr("data-"+s,a)}o.context.invoke("editor."+s,a)}}})]}).render()}},{key:"addToolbarButtons",value:function(){var e=this;this.context.memo("button.style",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.magic),e.options),tooltip:e.lang.style.style,data:{toggle:"dropdown"}}),e.ui.dropdown({className:"dropdown-style",items:e.options.styleTags,title:e.lang.style.style,template:function(t){"string"==typeof t&&(t={tag:t,title:Object.prototype.hasOwnProperty.call(e.lang.style,t)?e.lang.style[t]:t});var n=t.tag,r=t.title;return"<"+n+(t.style?' style="'+t.style+'" ':"")+(t.className?' class="'+t.className+'"':"")+">"+r+"</"+n+">"},click:e.context.createInvokeHandler("editor.formatBlock")})]).render()}));for(var n=function(t,n){var r=e.options.styleTags[t];e.context.memo("button.style."+r,(function(){return e.button({className:"note-btn-style-"+r,contents:'<div data-value="'+r+'">'+r.toUpperCase()+"</div>",tooltip:e.lang.style[r],click:e.context.createInvokeHandler("editor.formatBlock")}).render()}))},r=0,i=this.options.styleTags.length;r<i;r++)n(r);this.context.memo("button.bold",(function(){return e.button({className:"note-btn-bold",contents:e.ui.icon(e.options.icons.bold),tooltip:e.lang.font.bold+e.representShortcut("bold"),click:e.context.createInvokeHandlerAndUpdateState("editor.bold")}).render()})),this.context.memo("button.italic",(function(){return e.button({className:"note-btn-italic",contents:e.ui.icon(e.options.icons.italic),tooltip:e.lang.font.italic+e.representShortcut("italic"),click:e.context.createInvokeHandlerAndUpdateState("editor.italic")}).render()})),this.context.memo("button.underline",(function(){return e.button({className:"note-btn-underline",contents:e.ui.icon(e.options.icons.underline),tooltip:e.lang.font.underline+e.representShortcut("underline"),click:e.context.createInvokeHandlerAndUpdateState("editor.underline")}).render()})),this.context.memo("button.clear",(function(){return e.button({contents:e.ui.icon(e.options.icons.eraser),tooltip:e.lang.font.clear+e.representShortcut("removeFormat"),click:e.context.createInvokeHandler("editor.removeFormat")}).render()})),this.context.memo("button.strikethrough",(function(){return e.button({className:"note-btn-strikethrough",contents:e.ui.icon(e.options.icons.strikethrough),tooltip:e.lang.font.strikethrough+e.representShortcut("strikethrough"),click:e.context.createInvokeHandlerAndUpdateState("editor.strikethrough")}).render()})),this.context.memo("button.superscript",(function(){return e.button({className:"note-btn-superscript",contents:e.ui.icon(e.options.icons.superscript),tooltip:e.lang.font.superscript,click:e.context.createInvokeHandlerAndUpdateState("editor.superscript")}).render()})),this.context.memo("button.subscript",(function(){return e.button({className:"note-btn-subscript",contents:e.ui.icon(e.options.icons.subscript),tooltip:e.lang.font.subscript,click:e.context.createInvokeHandlerAndUpdateState("editor.subscript")}).render()})),this.context.memo("button.fontname",(function(){var n=e.context.invoke("editor.currentStyle");return e.options.addDefaultFonts&&t().each(n["font-family"].split(","),(function(t,n){n=n.trim().replace(/['"]+/g,""),e.isFontDeservedToAdd(n)&&-1===e.options.fontNames.indexOf(n)&&e.options.fontNames.push(n)})),e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents('<span class="note-current-fontname"></span>',e.options),tooltip:e.lang.font.name,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({className:"dropdown-fontname",checkClassName:e.options.icons.menuCheck,items:e.options.fontNames.filter(e.isFontInstalled.bind(e)),title:e.lang.font.name,template:function(e){return'<span style="font-family: '+p.validFontName(e)+'">'+e+"</span>"},click:e.context.createInvokeHandlerAndUpdateState("editor.fontName")})]).render()})),this.context.memo("button.fontsize",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents('<span class="note-current-fontsize"></span>',e.options),tooltip:e.lang.font.size,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({className:"dropdown-fontsize",checkClassName:e.options.icons.menuCheck,items:e.options.fontSizes,title:e.lang.font.size,click:e.context.createInvokeHandlerAndUpdateState("editor.fontSize")})]).render()})),this.context.memo("button.fontsizeunit",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents('<span class="note-current-fontsizeunit"></span>',e.options),tooltip:e.lang.font.sizeunit,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({className:"dropdown-fontsizeunit",checkClassName:e.options.icons.menuCheck,items:e.options.fontSizeUnits,title:e.lang.font.sizeunit,click:e.context.createInvokeHandlerAndUpdateState("editor.fontSizeUnit")})]).render()})),this.context.memo("button.color",(function(){return e.colorPalette("note-color-all",e.lang.color.recent,!0,!0)})),this.context.memo("button.forecolor",(function(){return e.colorPalette("note-color-fore",e.lang.color.foreground,!1,!0)})),this.context.memo("button.backcolor",(function(){return e.colorPalette("note-color-back",e.lang.color.background,!0,!1)})),this.context.memo("button.ul",(function(){return e.button({contents:e.ui.icon(e.options.icons.unorderedlist),tooltip:e.lang.lists.unordered+e.representShortcut("insertUnorderedList"),click:e.context.createInvokeHandler("editor.insertUnorderedList")}).render()})),this.context.memo("button.ol",(function(){return e.button({contents:e.ui.icon(e.options.icons.orderedlist),tooltip:e.lang.lists.ordered+e.representShortcut("insertOrderedList"),click:e.context.createInvokeHandler("editor.insertOrderedList")}).render()}));var o=this.button({contents:this.ui.icon(this.options.icons.alignLeft),tooltip:this.lang.paragraph.left+this.representShortcut("justifyLeft"),click:this.context.createInvokeHandler("editor.justifyLeft")}),s=this.button({contents:this.ui.icon(this.options.icons.alignCenter),tooltip:this.lang.paragraph.center+this.representShortcut("justifyCenter"),click:this.context.createInvokeHandler("editor.justifyCenter")}),a=this.button({contents:this.ui.icon(this.options.icons.alignRight),tooltip:this.lang.paragraph.right+this.representShortcut("justifyRight"),click:this.context.createInvokeHandler("editor.justifyRight")}),l=this.button({contents:this.ui.icon(this.options.icons.alignJustify),tooltip:this.lang.paragraph.justify+this.representShortcut("justifyFull"),click:this.context.createInvokeHandler("editor.justifyFull")}),c=this.button({contents:this.ui.icon(this.options.icons.outdent),tooltip:this.lang.paragraph.outdent+this.representShortcut("outdent"),click:this.context.createInvokeHandler("editor.outdent")}),u=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",m.invoke(o,"render")),this.context.memo("button.justifyCenter",m.invoke(s,"render")),this.context.memo("button.justifyRight",m.invoke(a,"render")),this.context.memo("button.justifyFull",m.invoke(l,"render")),this.context.memo("button.outdent",m.invoke(c,"render")),this.context.memo("button.indent",m.invoke(u,"render")),this.context.memo("button.paragraph",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.alignLeft),e.options),tooltip:e.lang.paragraph.paragraph,data:{toggle:"dropdown"}}),e.ui.dropdown([e.ui.buttonGroup({className:"note-align",children:[o,s,a,l]}),e.ui.buttonGroup({className:"note-list",children:[c,u]})])]).render()})),this.context.memo("button.height",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.textHeight),e.options),tooltip:e.lang.font.height,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({items:e.options.lineHeights,checkClassName:e.options.icons.menuCheck,className:"dropdown-line-height",title:e.lang.font.height,click:e.context.createInvokeHandler("editor.lineHeight")})]).render()})),this.context.memo("button.table",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.table),e.options),tooltip:e.lang.table.table,data:{toggle:"dropdown"}}),e.ui.dropdown({title:e.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(t){t.find(".note-dimension-picker-mousecatcher").css({width:e.options.insertTableMaxSize.col+"em",height:e.options.insertTableMaxSize.row+"em"}).mouseup(e.context.createInvokeHandler("editor.insertTable")).on("mousemove",e.tableMoveHandler.bind(e))}}).render()})),this.context.memo("button.link",(function(){return e.button({contents:e.ui.icon(e.options.icons.link),tooltip:e.lang.link.link+e.representShortcut("linkDialog.show"),click:e.context.createInvokeHandler("linkDialog.show")}).render()})),this.context.memo("button.picture",(function(){return e.button({contents:e.ui.icon(e.options.icons.picture),tooltip:e.lang.image.image,click:e.context.createInvokeHandler("imageDialog.show")}).render()})),this.context.memo("button.video",(function(){return e.button({contents:e.ui.icon(e.options.icons.video),tooltip:e.lang.video.video,click:e.context.createInvokeHandler("videoDialog.show")}).render()})),this.context.memo("button.hr",(function(){return e.button({contents:e.ui.icon(e.options.icons.minus),tooltip:e.lang.hr.insert+e.representShortcut("insertHorizontalRule"),click:e.context.createInvokeHandler("editor.insertHorizontalRule")}).render()})),this.context.memo("button.fullscreen",(function(){return e.button({className:"btn-fullscreen note-codeview-keep",contents:e.ui.icon(e.options.icons.arrowsAlt),tooltip:e.lang.options.fullscreen,click:e.context.createInvokeHandler("fullscreen.toggle")}).render()})),this.context.memo("button.codeview",(function(){return e.button({className:"btn-codeview note-codeview-keep",contents:e.ui.icon(e.options.icons.code),tooltip:e.lang.options.codeview,click:e.context.createInvokeHandler("codeview.toggle")}).render()})),this.context.memo("button.redo",(function(){return e.button({contents:e.ui.icon(e.options.icons.redo),tooltip:e.lang.history.redo+e.representShortcut("redo"),click:e.context.createInvokeHandler("editor.redo")}).render()})),this.context.memo("button.undo",(function(){return e.button({contents:e.ui.icon(e.options.icons.undo),tooltip:e.lang.history.undo+e.representShortcut("undo"),click:e.context.createInvokeHandler("editor.undo")}).render()})),this.context.memo("button.help",(function(){return e.button({contents:e.ui.icon(e.options.icons.question),tooltip:e.lang.options.help,click:e.context.createInvokeHandler("helpDialog.show")}).render()}))}},{key:"addImagePopoverButtons",value:function(){var e=this;this.context.memo("button.resizeFull",(function(){return e.button({contents:'<span class="note-fontsize-10">100%</span>',tooltip:e.lang.image.resizeFull,click:e.context.createInvokeHandler("editor.resize","1")}).render()})),this.context.memo("button.resizeHalf",(function(){return e.button({contents:'<span class="note-fontsize-10">50%</span>',tooltip:e.lang.image.resizeHalf,click:e.context.createInvokeHandler("editor.resize","0.5")}).render()})),this.context.memo("button.resizeQuarter",(function(){return e.button({contents:'<span class="note-fontsize-10">25%</span>',tooltip:e.lang.image.resizeQuarter,click:e.context.createInvokeHandler("editor.resize","0.25")}).render()})),this.context.memo("button.resizeNone",(function(){return e.button({contents:e.ui.icon(e.options.icons.rollback),tooltip:e.lang.image.resizeNone,click:e.context.createInvokeHandler("editor.resize","0")}).render()})),this.context.memo("button.floatLeft",(function(){return e.button({contents:e.ui.icon(e.options.icons.floatLeft),tooltip:e.lang.image.floatLeft,click:e.context.createInvokeHandler("editor.floatMe","left")}).render()})),this.context.memo("button.floatRight",(function(){return e.button({contents:e.ui.icon(e.options.icons.floatRight),tooltip:e.lang.image.floatRight,click:e.context.createInvokeHandler("editor.floatMe","right")}).render()})),this.context.memo("button.floatNone",(function(){return e.button({contents:e.ui.icon(e.options.icons.rollback),tooltip:e.lang.image.floatNone,click:e.context.createInvokeHandler("editor.floatMe","none")}).render()})),this.context.memo("button.removeMedia",(function(){return e.button({contents:e.ui.icon(e.options.icons.trash),tooltip:e.lang.image.remove,click:e.context.createInvokeHandler("editor.removeMedia")}).render()}))}},{key:"addLinkPopoverButtons",value:function(){var e=this;this.context.memo("button.linkDialogShow",(function(){return e.button({contents:e.ui.icon(e.options.icons.link),tooltip:e.lang.link.edit,click:e.context.createInvokeHandler("linkDialog.show")}).render()})),this.context.memo("button.unlink",(function(){return e.button({contents:e.ui.icon(e.options.icons.unlink),tooltip:e.lang.link.unlink,click:e.context.createInvokeHandler("editor.unlink")}).render()}))}},{key:"addTablePopoverButtons",value:function(){var e=this;this.context.memo("button.addRowUp",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowAbove),tooltip:e.lang.table.addRowAbove,click:e.context.createInvokeHandler("editor.addRow","top")}).render()})),this.context.memo("button.addRowDown",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowBelow),tooltip:e.lang.table.addRowBelow,click:e.context.createInvokeHandler("editor.addRow","bottom")}).render()})),this.context.memo("button.addColLeft",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colBefore),tooltip:e.lang.table.addColLeft,click:e.context.createInvokeHandler("editor.addCol","left")}).render()})),this.context.memo("button.addColRight",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colAfter),tooltip:e.lang.table.addColRight,click:e.context.createInvokeHandler("editor.addCol","right")}).render()})),this.context.memo("button.deleteRow",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowRemove),tooltip:e.lang.table.delRow,click:e.context.createInvokeHandler("editor.deleteRow")}).render()})),this.context.memo("button.deleteCol",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colRemove),tooltip:e.lang.table.delCol,click:e.context.createInvokeHandler("editor.deleteCol")}).render()})),this.context.memo("button.deleteTable",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.trash),tooltip:e.lang.table.delTable,click:e.context.createInvokeHandler("editor.deleteTable")}).render()}))}},{key:"build",value:function(e,t){for(var n=0,r=t.length;n<r;n++){for(var i=t[n],o=Array.isArray(i)?i[0]:i,s=Array.isArray(i)?1===i.length?[i[0]]:i[1]:[i],a=this.ui.buttonGroup({className:"note-"+o}).render(),l=0,c=s.length;l<c;l++){var u=this.context.memo("button."+s[l]);u&&a.append("function"==typeof u?u(this.context):u)}a.appendTo(e)}}},{key:"updateCurrentStyle",value:function(e){var n=e||this.$toolbar,r=this.context.invoke("editor.currentStyle");if(this.updateBtnStates(n,{".note-btn-bold":function(){return"bold"===r["font-bold"]},".note-btn-italic":function(){return"italic"===r["font-italic"]},".note-btn-underline":function(){return"underline"===r["font-underline"]},".note-btn-subscript":function(){return"subscript"===r["font-subscript"]},".note-btn-superscript":function(){return"superscript"===r["font-superscript"]},".note-btn-strikethrough":function(){return"strikethrough"===r["font-strikethrough"]}}),r["font-family"]){var i=r["font-family"].split(",").map((function(e){return e.replace(/[\'\"]/g,"").replace(/\s+$/,"").replace(/^\s+/,"")})),o=_.find(i,this.isFontInstalled.bind(this));n.find(".dropdown-fontname a").each((function(e,n){var r=t()(n),i=r.data("value")+""==o+"";r.toggleClass("checked",i)})),n.find(".note-current-fontname").text(o).css("font-family",o)}if(r["font-size"]){var s=r["font-size"];n.find(".dropdown-fontsize a").each((function(e,n){var r=t()(n),i=r.data("value")+""==s+"";r.toggleClass("checked",i)})),n.find(".note-current-fontsize").text(s);var a=r["font-size-unit"];n.find(".dropdown-fontsizeunit a").each((function(e,n){var r=t()(n),i=r.data("value")+""==a+"";r.toggleClass("checked",i)})),n.find(".note-current-fontsizeunit").text(a)}if(r["line-height"]){var l=r["line-height"];n.find(".dropdown-line-height a").each((function(e,n){var r=t()(n),i=t()(n).data("value")+""==l+"";r.toggleClass("checked",i)})),n.find(".note-current-line-height").text(l)}}},{key:"updateBtnStates",value:function(e,n){var r=this;t().each(n,(function(t,n){r.ui.toggleBtnActive(e.find(t),n())}))}},{key:"tableMoveHandler",value:function(e){var n,r=t()(e.target.parentNode),i=r.next(),o=r.find(".note-dimension-picker-mousecatcher"),s=r.find(".note-dimension-picker-highlighted"),a=r.find(".note-dimension-picker-unhighlighted");if(void 0===e.offsetX){var l=t()(e.target).offset();n={x:e.pageX-l.left,y:e.pageY-l.top}}else n={x:e.offsetX,y:e.offsetY};var c=Math.ceil(n.x/18)||1,u=Math.ceil(n.y/18)||1;s.css({width:c+"em",height:u+"em"}),o.data("value",c+"x"+u),c>3&&c<this.options.insertTableMaxSize.col&&a.css({width:c+1+"em"}),u>3&&u<this.options.insertTableMaxSize.row&&a.css({height:u+1+"em"}),i.html(c+" x "+u)}}],r&&it(n.prototype,r),i&&it(n,i),e}();function st(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var at=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.$window=t()(window),this.$document=t()(document),this.ui=t().summernote.ui,this.$note=n.layoutInfo.note,this.$editor=n.layoutInfo.editor,this.$toolbar=n.layoutInfo.toolbar,this.$editable=n.layoutInfo.editable,this.$statusbar=n.layoutInfo.statusbar,this.options=n.options,this.isFollowing=!1,this.followScroll=this.followScroll.bind(this)}var n,r,i;return n=e,(r=[{key:"shouldInitialize",value:function(){return!this.options.airMode}},{key:"initialize",value:function(){var e=this;this.options.toolbar=this.options.toolbar||[],this.options.toolbar.length?this.context.invoke("buttons.build",this.$toolbar,this.options.toolbar):this.$toolbar.hide(),this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.changeContainer(!1),this.$note.on("summernote.keyup summernote.mouseup summernote.change",(function(){e.context.invoke("buttons.updateCurrentStyle")})),this.context.invoke("buttons.updateCurrentStyle"),this.options.followingToolbar&&this.$window.on("scroll resize",this.followScroll)}},{key:"destroy",value:function(){this.$toolbar.children().remove(),this.options.followingToolbar&&this.$window.off("scroll resize",this.followScroll)}},{key:"followScroll",value:function(){if(this.$editor.hasClass("fullscreen"))return!1;var e=this.$editor.outerHeight(),n=this.$editor.width(),r=this.$toolbar.height(),i=this.$statusbar.height(),o=0;this.options.otherStaticBar&&(o=t()(this.options.otherStaticBar).outerHeight());var s=this.$document.scrollTop(),a=this.$editor.offset().top,l=a-o,c=a+e-o-r-i;!this.isFollowing&&s>l&&s<c-r?(this.isFollowing=!0,this.$editable.css({marginTop:this.$toolbar.outerHeight()}),this.$toolbar.css({position:"fixed",top:o,width:n,zIndex:1e3})):this.isFollowing&&(s<l||s>c)&&(this.isFollowing=!1,this.$toolbar.css({position:"relative",top:0,width:"100%",zIndex:"auto"}),this.$editable.css({marginTop:""}))}},{key:"changeContainer",value:function(e){e?this.$toolbar.prependTo(this.$editor):this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.options.followingToolbar&&this.followScroll()}},{key:"updateFullscreen",value:function(e){this.ui.toggleBtnActive(this.$toolbar.find(".btn-fullscreen"),e),this.changeContainer(e)}},{key:"updateCodeview",value:function(e){this.ui.toggleBtnActive(this.$toolbar.find(".btn-codeview"),e),e?this.deactivate():this.activate()}},{key:"activate",value:function(e){var t=this.$toolbar.find("button");e||(t=t.not(".note-codeview-keep")),this.ui.toggleBtn(t,!0)}},{key:"deactivate",value:function(e){var t=this.$toolbar.find("button");e||(t=t.not(".note-codeview-keep")),this.ui.toggleBtn(t,!1)}}])&&st(n.prototype,r),i&&st(n,i),e}();function lt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ct=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.$body=t()(document.body),this.$editor=n.layoutInfo.editor,this.options=n.options,this.lang=this.options.langInfo,n.memo("help.linkDialog.show",this.options.langInfo.help["linkDialog.show"])}var n,r,i;return n=e,(r=[{key:"initialize",value:function(){var e=this.options.dialogsInBody?this.$body:this.options.container,n=['<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?"":t()("<div></div>").append(this.ui.checkbox({className:"sn-checkbox-open-in-new-window",text:this.lang.link.openInNewWindow,checked:!0}).render()).html(),t()("<div></div>").append(this.ui.checkbox({className:"sn-checkbox-use-protocol",text:this.lang.link.useProtocol,checked:!0}).render()).html()].join(""),r='<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-link-btn",'" 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:n,footer:r}).render().appendTo(e)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(e,t){e.on("keypress",(function(e){e.keyCode===we.code.ENTER&&(e.preventDefault(),t.trigger("click"))}))}},{key:"toggleLinkBtn",value:function(e,t,n){this.ui.toggleBtn(e,t.val()&&n.val())}},{key:"showLinkDialog",value:function(e){var n=this;return t().Deferred((function(t){var r=n.$dialog.find(".note-link-text"),i=n.$dialog.find(".note-link-url"),o=n.$dialog.find(".note-link-btn"),s=n.$dialog.find(".sn-checkbox-open-in-new-window input[type=checkbox]"),a=n.$dialog.find(".sn-checkbox-use-protocol input[type=checkbox]");n.ui.onDialogShown(n.$dialog,(function(){n.context.triggerEvent("dialog.shown"),!e.url&&m.isValidUrl(e.text)&&(e.url=e.text),r.on("input paste propertychange",(function(){e.text=r.val(),n.toggleLinkBtn(o,r,i)})).val(e.text),i.on("input paste propertychange",(function(){e.text||r.val(i.val()),n.toggleLinkBtn(o,r,i)})).val(e.url),p.isSupportTouch||i.trigger("focus"),n.toggleLinkBtn(o,r,i),n.bindEnterKey(i,o),n.bindEnterKey(r,o);var l=void 0!==e.isNewWindow?e.isNewWindow:n.context.options.linkTargetBlank;s.prop("checked",l);var c=!e.url&&n.context.options.useProtocol;a.prop("checked",c),o.one("click",(function(o){o.preventDefault(),t.resolve({range:e.range,url:i.val(),text:r.val(),isNewWindow:s.is(":checked"),checkProtocol:a.is(":checked")}),n.ui.hideDialog(n.$dialog)}))})),n.ui.onDialogHidden(n.$dialog,(function(){r.off(),i.off(),o.off(),"pending"===t.state()&&t.reject()})),n.ui.showDialog(n.$dialog)})).promise()}},{key:"show",value:function(){var e=this,t=this.context.invoke("editor.getLinkInfo");this.context.invoke("editor.saveRange"),this.showLinkDialog(t).then((function(t){e.context.invoke("editor.restoreRange"),e.context.invoke("editor.createLink",t)})).fail((function(){e.context.invoke("editor.restoreRange")}))}}])&<(n.prototype,r),i&<(n,i),e}();function ut(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var dt=function(){function e(n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.options=n.options,this.events={"summernote.keyup summernote.mouseup summernote.change summernote.scroll":function(){r.update()},"summernote.disable summernote.dialog.shown":function(){r.hide()},"summernote.blur":function(e,t){t.originalEvent&&t.originalEvent.relatedTarget&&r.$popover[0].contains(t.originalEvent.relatedTarget)||r.hide()}}}var n,r,i;return n=e,(r=[{key:"shouldInitialize",value:function(){return!_.isEmpty(this.options.popover.link)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-link-popover",callback:function(e){e.find(".popover-content,.note-popover-content").prepend('<span><a target="_blank"></a> </span>')}}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.link),this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(){if(this.context.invoke("editor.hasFocus")){var e=this.context.invoke("editor.getLastRange");if(e.isCollapsed()&&e.isOnAnchor()){var n=he.ancestor(e.sc,he.isAnchor),r=t()(n).attr("href");this.$popover.find("a").attr("href",r).text(r);var i=he.posFromPlaceholder(n),o=t()(this.options.container).offset();i.top-=o.top,i.left-=o.left,this.$popover.css({display:"block",left:i.left,top:i.top})}else this.hide()}else this.hide()}},{key:"hide",value:function(){this.$popover.hide()}}])&&ut(n.prototype,r),i&&ut(n,i),e}();function ht(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var pt=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.$body=t()(document.body),this.$editor=n.layoutInfo.editor,this.options=n.options,this.lang=this.options.langInfo}var n,r,i;return n=e,(r=[{key:"initialize",value:function(){var e="";if(this.options.maximumImageFileSize){var t=Math.floor(Math.log(this.options.maximumImageFileSize)/Math.log(1024)),n=1*(this.options.maximumImageFileSize/Math.pow(1024,t)).toFixed(2)+" "+" KMGTP"[t]+"B";e="<small>".concat(this.lang.image.maximumFileSize+" : "+n,"</small>")}var r=this.options.dialogsInBody?this.$body:this.options.container,i=['<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"/>',e,"</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(""),o='<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-image-btn",'" value="').concat(this.lang.image.insert,'" disabled>');this.$dialog=this.ui.dialog({title:this.lang.image.insert,fade:this.options.dialogsFade,body:i,footer:o}).render().appendTo(r)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(e,t){e.on("keypress",(function(e){e.keyCode===we.code.ENTER&&(e.preventDefault(),t.trigger("click"))}))}},{key:"show",value:function(){var e=this;this.context.invoke("editor.saveRange"),this.showImageDialog().then((function(t){e.ui.hideDialog(e.$dialog),e.context.invoke("editor.restoreRange"),"string"==typeof t?e.options.callbacks.onImageLinkInsert?e.context.triggerEvent("image.link.insert",t):e.context.invoke("editor.insertImage",t):e.context.invoke("editor.insertImagesOrCallback",t)})).fail((function(){e.context.invoke("editor.restoreRange")}))}},{key:"showImageDialog",value:function(){var e=this;return t().Deferred((function(t){var n=e.$dialog.find(".note-image-input"),r=e.$dialog.find(".note-image-url"),i=e.$dialog.find(".note-image-btn");e.ui.onDialogShown(e.$dialog,(function(){e.context.triggerEvent("dialog.shown"),n.replaceWith(n.clone().on("change",(function(e){t.resolve(e.target.files||e.target.value)})).val("")),r.on("input paste propertychange",(function(){e.ui.toggleBtn(i,r.val())})).val(""),p.isSupportTouch||r.trigger("focus"),i.click((function(e){e.preventDefault(),t.resolve(r.val())})),e.bindEnterKey(r,i)})),e.ui.onDialogHidden(e.$dialog,(function(){n.off(),r.off(),i.off(),"pending"===t.state()&&t.reject()})),e.ui.showDialog(e.$dialog)}))}}])&&ht(n.prototype,r),i&&ht(n,i),e}();function ft(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var mt=function(){function e(n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.editable=n.layoutInfo.editable[0],this.options=n.options,this.events={"summernote.disable summernote.dialog.shown":function(){r.hide()},"summernote.blur":function(e,t){t.originalEvent&&t.originalEvent.relatedTarget&&r.$popover[0].contains(t.originalEvent.relatedTarget)||r.hide()}}}var n,r,i;return n=e,r=[{key:"shouldInitialize",value:function(){return!_.isEmpty(this.options.popover.image)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-image-popover"}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.image),this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(e,n){if(he.isImg(e)){var r=t()(e).offset(),i=t()(this.options.container).offset(),o={};this.options.popatmouse?(o.left=n.pageX-20,o.top=n.pageY):o=r,o.top-=i.top,o.left-=i.left,this.$popover.css({display:"block",left:o.left,top:o.top})}else this.hide()}},{key:"hide",value:function(){this.$popover.hide()}}],r&&ft(n.prototype,r),i&&ft(n,i),e}();function gt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var vt=function(){function e(n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.options=n.options,this.events={"summernote.mousedown":function(e,t){r.update(t.target)},"summernote.keyup summernote.scroll summernote.change":function(){r.update()},"summernote.disable summernote.dialog.shown":function(){r.hide()},"summernote.blur":function(e,t){t.originalEvent&&t.originalEvent.relatedTarget&&r.$popover[0].contains(t.originalEvent.relatedTarget)||r.hide()}}}var n,r,i;return n=e,r=[{key:"shouldInitialize",value:function(){return!_.isEmpty(this.options.popover.table)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-table-popover"}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.table),p.isFF&&document.execCommand("enableInlineTableEditing",!1,!1),this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(e){if(this.context.isDisabled())return!1;var n=he.isCell(e)||he.isCell(null==e?void 0:e.parentElement);if(n){var r=he.posFromPlaceholder(e),i=t()(this.options.container).offset();r.top-=i.top,r.left-=i.left,this.$popover.css({display:"block",left:r.left,top:r.top})}else this.hide();return n}},{key:"hide",value:function(){this.$popover.hide()}}],r&>(n.prototype,r),i&>(n,i),e}();function yt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var bt=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.$body=t()(document.body),this.$editor=n.layoutInfo.editor,this.options=n.options,this.lang=this.options.langInfo}var n,r,i;return n=e,(r=[{key:"initialize",value:function(){var e=this.options.dialogsInBody?this.$body:this.options.container,t=['<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(""),n='<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-video-btn",'" value="').concat(this.lang.video.insert,'" disabled>');this.$dialog=this.ui.dialog({title:this.lang.video.insert,fade:this.options.dialogsFade,body:t,footer:n}).render().appendTo(e)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(e,t){e.on("keypress",(function(e){e.keyCode===we.code.ENTER&&(e.preventDefault(),t.trigger("click"))}))}},{key:"createVideoNode",value:function(e){var n,r=e.match(/\/\/(?:(?:www|m)\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w|-]{11})(?:(?:[\?&]t=)(\S+))?$/),i=e.match(/(?:\.|\/\/)drive\.google\.com\/file\/d\/(.[a-zA-Z0-9_-]*)\/view/),o=e.match(/(?:www\.|\/\/)instagram\.com\/p\/(.[a-zA-Z0-9_-]*)/),s=e.match(/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/),a=e.match(/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/),l=e.match(/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/),c=e.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),u=e.match(/\/\/(.*)\/videos\/watch\/([^?]*)(?:\?(?:start=(\w*))?(?:&stop=(\w*))?(?:&loop=([10]))?(?:&autoplay=([10]))?(?:&muted=([10]))?)?/),d=e.match(/\/\/v\.qq\.com.*?vid=(.+)/),h=e.match(/\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/),p=e.match(/^.+.(mp4|m4v)$/),f=e.match(/^.+.(ogg|ogv)$/),m=e.match(/^.+.(webm)$/),g=e.match(/(?:www\.|\/\/)facebook\.com\/([^\/]+)\/videos\/([0-9]+)/);if(r&&11===r[1].length){var v=r[1],y=0;if(void 0!==r[2]){var b=r[2].match(/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/);if(b)for(var _=[3600,60,1],w=0,x=_.length;w<x;w++)y+=void 0!==b[w+1]?_[w]*parseInt(b[w+1],10):0}n=t()("<iframe>").attr("frameborder",0).attr("src","//www.youtube.com/embed/"+v+(y>0?"?start="+y:"")).attr("width","640").attr("height","360")}else if(i&&i[0].length)n=t()("<iframe>").attr("frameborder",0).attr("src","https://drive.google.com/file/d/"+i[1]+"/preview").attr("width","640").attr("height","480");else if(o&&o[0].length)n=t()("<iframe>").attr("frameborder",0).attr("src","https://instagram.com/p/"+o[1]+"/embed/").attr("width","612").attr("height","710").attr("scrolling","no").attr("allowtransparency","true");else if(s&&s[0].length)n=t()("<iframe>").attr("frameborder",0).attr("src",s[0]+"/embed/simple").attr("width","600").attr("height","600").attr("class","vine-embed");else if(a&&a[3].length)n=t()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("src","//player.vimeo.com/video/"+a[3]).attr("width","640").attr("height","360");else if(l&&l[2].length)n=t()("<iframe>").attr("frameborder",0).attr("src","//www.dailymotion.com/embed/video/"+l[2]).attr("width","640").attr("height","360");else if(c&&c[1].length)n=t()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","498").attr("width","510").attr("src","//player.youku.com/embed/"+c[1]);else if(u&&u[0].length){var S=0;"undefined"!==u[2]&&(S=u[2]);var k=0;"undefined"!==u[3]&&(k=u[3]);var T=0;"undefined"!==u[4]&&(T=u[4]);var E=0;"undefined"!==u[5]&&(E=u[5]);var C=0;"undefined"!==u[6]&&(C=u[6]),n=t()('<iframe allowfullscreen sandbox="allow-same-origin allow-scripts allow-popups">').attr("frameborder",0).attr("src","//"+u[1]+"/videos/embed/"+u[2]+"?loop="+T+"&autoplay="+E+"&muted="+C+(S>0?"&start="+S:"")+(k>0?"&end="+y:"")).attr("width","560").attr("height","315")}else if(d&&d[1].length||h&&h[2].length){var D=d&&d[1].length?d[1]:h[2];n=t()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","310").attr("width","500").attr("src","https://v.qq.com/txp/iframe/player.html?vid="+D+"&auto=0")}else if(p||f||m)n=t()("<video controls>").attr("src",e).attr("width","640").attr("height","360");else{if(!g||!g[0].length)return!1;n=t()("<iframe>").attr("frameborder",0).attr("src","https://www.facebook.com/plugins/video.php?href="+encodeURIComponent(g[0])+"&show_text=0&width=560").attr("width","560").attr("height","301").attr("scrolling","no").attr("allowtransparency","true")}return n.addClass("note-video-clip"),n[0]}},{key:"show",value:function(){var e=this,t=this.context.invoke("editor.getSelectedText");this.context.invoke("editor.saveRange"),this.showVideoDialog(t).then((function(t){e.ui.hideDialog(e.$dialog),e.context.invoke("editor.restoreRange");var n=e.createVideoNode(t);n&&e.context.invoke("editor.insertNode",n)})).fail((function(){e.context.invoke("editor.restoreRange")}))}},{key:"showVideoDialog",value:function(){var e=this;return t().Deferred((function(t){var n=e.$dialog.find(".note-video-url"),r=e.$dialog.find(".note-video-btn");e.ui.onDialogShown(e.$dialog,(function(){e.context.triggerEvent("dialog.shown"),n.on("input paste propertychange",(function(){e.ui.toggleBtn(r,n.val())})),p.isSupportTouch||n.trigger("focus"),r.click((function(e){e.preventDefault(),t.resolve(n.val())})),e.bindEnterKey(n,r)})),e.ui.onDialogHidden(e.$dialog,(function(){n.off(),r.off(),"pending"===t.state()&&t.reject()})),e.ui.showDialog(e.$dialog)}))}}])&&yt(n.prototype,r),i&&yt(n,i),e}();function _t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var wt=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.$body=t()(document.body),this.$editor=n.layoutInfo.editor,this.options=n.options,this.lang=this.options.langInfo}var n,r,i;return n=e,r=[{key:"initialize",value:function(){var e=this.options.dialogsInBody?this.$body:this.options.container,t=['<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:t,callback:function(e){e.find(".modal-body,.note-modal-body").css({"max-height":300,overflow:"scroll"})}}).render().appendTo(e)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"createShortcutList",value:function(){var e=this,n=this.options.keyMap[p.isMac?"mac":"pc"];return Object.keys(n).map((function(r){var i=n[r],o=t()('<div><div class="help-list-item"></div></div>');return o.append(t()("<label><kbd>"+r+"</kdb></label>").css({width:180,"margin-right":10})).append(t()("<span></span>").html(e.context.memo("help."+i)||i)),o.html()})).join("")}},{key:"showHelpDialog",value:function(){var e=this;return t().Deferred((function(t){e.ui.onDialogShown(e.$dialog,(function(){e.context.triggerEvent("dialog.shown"),t.resolve()})),e.ui.showDialog(e.$dialog)})).promise()}},{key:"show",value:function(){var e=this;this.context.invoke("editor.saveRange"),this.showHelpDialog().then((function(){e.context.invoke("editor.restoreRange")}))}}],r&&_t(n.prototype,r),i&&_t(n,i),e}();function xt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var St=function(){function e(n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.options=n.options,this.hidable=!0,this.onContextmenu=!1,this.pageX=null,this.pageY=null,this.events={"summernote.contextmenu":function(e){r.options.editing&&(e.preventDefault(),e.stopPropagation(),r.onContextmenu=!0,r.update(!0))},"summernote.mousedown":function(e,t){r.pageX=t.pageX,r.pageY=t.pageY},"summernote.keyup summernote.mouseup summernote.scroll":function(e,t){r.options.editing&&!r.onContextmenu&&(r.pageX=t.pageX,r.pageY=t.pageY,r.update()),r.onContextmenu=!1},"summernote.disable summernote.change summernote.dialog.shown summernote.blur":function(){r.hide()},"summernote.focusout":function(){r.$popover.is(":active,:focus")||r.hide()}}}var n,r,i;return n=e,(r=[{key:"shouldInitialize",value:function(){return this.options.airMode&&!_.isEmpty(this.options.popover.air)}},{key:"initialize",value:function(){var e=this;this.$popover=this.ui.popover({className:"note-air-popover"}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content");this.context.invoke("buttons.build",t,this.options.popover.air),this.$popover.on("mousedown",(function(){e.hidable=!1})),this.$popover.on("mouseup",(function(){e.hidable=!0}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(e){var n=this.context.invoke("editor.currentStyle");if(!n.range||n.range.isCollapsed()&&!e)this.hide();else{var r={left:this.pageX,top:this.pageY},i=t()(this.options.container).offset();r.top-=i.top,r.left-=i.left,this.$popover.css({display:"block",left:Math.max(r.left,0)+-5,top:r.top+5}),this.context.invoke("buttons.updateCurrentStyle",this.$popover)}}},{key:"updateCodeview",value:function(e){this.ui.toggleBtnActive(this.$popover.find(".btn-codeview"),e),e&&this.hide()}},{key:"hide",value:function(){this.hidable&&this.$popover.hide()}}])&&xt(n.prototype,r),i&&xt(n,i),e}();function kt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Tt=function(){function e(n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.ui=t().summernote.ui,this.$editable=n.layoutInfo.editable,this.options=n.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(e,t){t.isDefaultPrevented()||r.handleKeyup(t)},"summernote.keydown":function(e,t){r.handleKeydown(t)},"summernote.disable summernote.dialog.shown summernote.blur":function(){r.hide()}}}var n,r,i;return n=e,r=[{key:"shouldInitialize",value:function(){return this.hints.length>0}},{key:"initialize",value:function(){var e=this;this.lastWordRange=null,this.matchingWord=null,this.$popover=this.ui.popover({className:"note-hint-popover",hideArrow:!0,direction:""}).render().appendTo(this.options.container),this.$popover.hide(),this.$content=this.$popover.find(".popover-content,.note-popover-content"),this.$content.on("click",".note-hint-item",(function(n){e.$content.find(".active").removeClass("active"),t()(n.currentTarget).addClass("active"),e.replace()})),this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"selectItem",value:function(e){this.$content.find(".active").removeClass("active"),e.addClass("active"),this.$content[0].scrollTop=e[0].offsetTop-this.$content.innerHeight()/2}},{key:"moveDown",value:function(){var e=this.$content.find(".note-hint-item.active"),t=e.next();if(t.length)this.selectItem(t);else{var n=e.parent().next();n.length||(n=this.$content.find(".note-hint-group").first()),this.selectItem(n.find(".note-hint-item").first())}}},{key:"moveUp",value:function(){var e=this.$content.find(".note-hint-item.active"),t=e.prev();if(t.length)this.selectItem(t);else{var n=e.parent().prev();n.length||(n=this.$content.find(".note-hint-group").last()),this.selectItem(n.find(".note-hint-item").last())}}},{key:"replace",value:function(){var e=this.$content.find(".note-hint-item.active");if(e.length){var n=this.nodeFromItem(e);if(null!==this.matchingWord&&0===this.matchingWord.length)this.lastWordRange.so=this.lastWordRange.eo;else if(null!==this.matchingWord&&this.matchingWord.length>0&&!this.lastWordRange.isCollapsed()){var r=this.lastWordRange.eo-this.lastWordRange.so-this.matchingWord.length;r>0&&(this.lastWordRange.so+=r)}if(this.lastWordRange.insertNode(n),"next"===this.options.hintSelect){var i=document.createTextNode("");t()(n).after(i),be.createFromNodeBefore(i).select()}else be.createFromNodeAfter(n).select();this.lastWordRange=null,this.hide(),this.context.invoke("editor.focus"),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}}},{key:"nodeFromItem",value:function(e){var t=this.hints[e.data("index")],n=e.data("item"),r=t.content?t.content(n):n;return"string"==typeof r&&(r=he.createText(r)),r}},{key:"createItemTemplates",value:function(e,n){var r=this.hints[e];return n.map((function(n){var i=t()('<div class="note-hint-item"></div>');return i.append(r.template?r.template(n):n+""),i.data({index:e,item:n}),i}))}},{key:"handleKeydown",value:function(e){this.$popover.is(":visible")&&(e.keyCode===we.code.ENTER?(e.preventDefault(),this.replace()):e.keyCode===we.code.UP?(e.preventDefault(),this.moveUp()):e.keyCode===we.code.DOWN&&(e.preventDefault(),this.moveDown()))}},{key:"searchKeyword",value:function(e,t,n){var r=this.hints[e];if(r&&r.match.test(t)&&r.search){var i=r.match.exec(t);this.matchingWord=i[0],r.search(i[1],n)}else n()}},{key:"createGroup",value:function(e,n){var r=this,i=t()('<div class="note-hint-group note-hint-group-'+e+'"></div>');return this.searchKeyword(e,n,(function(t){(t=t||[]).length&&(i.html(r.createItemTemplates(e,t)),r.show())})),i}},{key:"handleKeyup",value:function(e){var n=this;if(!_.contains([we.code.ENTER,we.code.UP,we.code.DOWN],e.keyCode)){var r,i,o=this.context.invoke("editor.getLastRange");if("words"===this.options.hintMode){if(r=o.getWordsRange(o),i=r.toString(),this.hints.forEach((function(e){if(e.match.test(i))return r=o.getWordsMatchRange(e.match),!1})),!r)return void this.hide();i=r.toString()}else r=o.getWordRange(),i=r.toString();if(this.hints.length&&i){this.$content.empty();var s=m.rect2bnd(_.last(r.getClientRects())),a=t()(this.options.container).offset();s&&(s.top-=a.top,s.left-=a.left,this.$popover.hide(),this.lastWordRange=r,this.hints.forEach((function(e,t){e.match.test(i)&&n.createGroup(t,i).appendTo(n.$content)})),this.$content.find(".note-hint-item:first").addClass("active"),"top"===this.direction?this.$popover.css({left:s.left,top:s.top-this.$popover.outerHeight()-5}):this.$popover.css({left:s.left,top:s.top+s.height+5}))}else this.hide()}}},{key:"show",value:function(){this.$popover.show()}},{key:"hide",value:function(){this.$popover.hide()}}],r&&kt(n.prototype,r),i&&kt(n,i),e}();function Et(e){return Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Et(e)}function Ct(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}t().summernote=t().extend(t().summernote,{version:"0.8.20",plugins:{},dom:he,range:be,lists:_,options:{langInfo:t().summernote.lang["en-US"],editing:!0,modules:{editor:Ne,clipboard:Pe,dropzone:je,codeview:Be,statusbar:ze,fullscreen:We,handle:Ge,hintPopover:Tt,autoLink:Xe,autoSync:Qe,autoReplace:tt,placeholder:rt,buttons:ot,toolbar:at,linkDialog:ct,linkPopover:dt,imageDialog:pt,imagePopover:mt,tablePopover:vt,videoDialog:bt,helpDialog:wt,airPopover:St},buttons:{},lang:"en-US",followingToolbar:!1,toolbarPosition:"top",otherStaticBar:"",codeviewKeepButton:!1,toolbar:[["style",["style"]],["font",["bold","underline","clear"]],["fontname",["fontname"]],["color",["color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["link","picture","video"]],["view",["fullscreen","codeview","help"]]],popatmouse:!0,popover:{image:[["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:!1,overrideContextMenu:!1,width:null,height:null,linkTargetBlank:!0,useProtocol:!0,defaultProtocol:"http://",focus:!1,tabDisabled:!1,tabSize:4,styleWithCSS:!1,shortcuts:!0,textareaAutoSync:!0,tooltip:"auto",container:null,maxTextLength:0,blockquoteBreakingLevel:2,spellCheck:!0,disableGrammar:!1,placeholder:null,inheritPlaceholder:!1,recordEveryKeystroke:!1,historyLimit:200,showDomainOnlyForAutolink:!1,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:!0,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:!1,dialogsFade:!1,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:!0,lineNumbers:!0},codeviewFilter:!0,codeviewFilterRegex:/<\/*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|ilayer|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|t(?:itle|extarea)|xml)[^>]*?>/gi,codeviewIframeFilter:!0,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"}}});var Dt=function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.markup=t,this.children=n,this.options=r,this.callback=i}var n,r,i;return n=e,(r=[{key:"render",value:function(e){var n=t()(this.markup);if(this.options&&this.options.contents&&n.html(this.options.contents),this.options&&this.options.className&&n.addClass(this.options.className),this.options&&this.options.data&&t().each(this.options.data,(function(e,t){n.attr("data-"+e,t)})),this.options&&this.options.click&&n.on("click",this.options.click),this.children){var r=n.find(".note-children-container");this.children.forEach((function(e){e.render(r.length?r:n)}))}return this.callback&&this.callback(n,this.options),this.options&&this.options.callback&&this.options.callback(n),e&&e.append(n),n}}])&&Ct(n.prototype,r),i&&Ct(n,i),e}();const Mt=function(e,t){return function(){var n="object"===Et(arguments[1])?arguments[1]:arguments[0],r=Array.isArray(arguments[0])?arguments[0]:[];return n&&n.children&&(r=n.children),new Dt(e,r,n,t)}};function At(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}const It=function(){function e(n,r){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$node=n,this.options=t().extend({},{title:"",target:r.container,trigger:"hover focus",placement:"bottom"},r),this.$tooltip=t()(['<div class="note-tooltip">','<div class="note-tooltip-arrow"></div>','<div class="note-tooltip-content"></div>',"</div>"].join("")),"manual"!==this.options.trigger){var i=this.show.bind(this),o=this.hide.bind(this),s=this.toggle.bind(this);this.options.trigger.split(" ").forEach((function(e){"hover"===e?(n.off("mouseenter mouseleave"),n.on("mouseenter",i).on("mouseleave",o)):"click"===e?n.on("click",s):"focus"===e&&n.on("focus",i).on("blur",o)}))}}var n,r,i;return n=e,(r=[{key:"show",value:function(){var e=this.$node,n=e.offset(),r=t()(this.options.target).offset();n.top-=r.top,n.left-=r.left;var i=this.$tooltip,o=this.options.title||e.attr("title")||e.data("title"),s=this.options.placement||e.data("placement");i.addClass(s),i.find(".note-tooltip-content").text(o),i.appendTo(this.options.target);var a=e.outerWidth(),l=e.outerHeight(),c=i.outerWidth(),u=i.outerHeight();"bottom"===s?i.css({top:n.top+l,left:n.left+(a/2-c/2)}):"top"===s?i.css({top:n.top-u,left:n.left+(a/2-c/2)}):"left"===s?i.css({top:n.top+(l/2-u/2),left:n.left-c}):"right"===s&&i.css({top:n.top+(l/2-u/2),left:n.left+a}),i.addClass("in")}},{key:"hide",value:function(){var e=this;this.$tooltip.removeClass("in"),setTimeout((function(){e.$tooltip.remove()}),200)}},{key:"toggle",value:function(){this.$tooltip.hasClass("in")?this.hide():this.show()}}])&&At(n.prototype,r),i&&At(n,i),e}();function Lt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ot=function(){function e(n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$button=n,this.options=t().extend({},{target:r.container},r),this.setEvent()}var n,r,i;return n=e,(r=[{key:"setEvent",value:function(){var e=this;this.$button.on("click",(function(t){e.toggle(),t.stopImmediatePropagation()}))}},{key:"clear",value:function(){var e=t()(".note-btn-group.open");e.find(".note-btn.active").removeClass("active"),e.removeClass("open")}},{key:"show",value:function(){this.$button.addClass("active"),this.$button.parent().addClass("open");var e=this.$button.next(),n=e.offset(),r=e.outerWidth(),i=t()(window).width(),o=parseFloat(t()(this.options.target).css("margin-right"));n.left+r>i-o?e.css("margin-left",i-o-(n.left+r)):e.css("margin-left","")}},{key:"hide",value:function(){this.$button.removeClass("active"),this.$button.parent().removeClass("open")}},{key:"toggle",value:function(){var e=this.$button.parent().hasClass("open");this.clear(),e?this.hide():this.show()}}])&&Lt(n.prototype,r),i&&Lt(n,i),e}();t()(document).on("click",(function(e){t()(e.target).closest(".note-btn-group").length||(t()(".note-btn-group.open").removeClass("open"),t()(".note-btn-group .note-btn.active").removeClass("active"))})),t()(document).on("click.note-dropdown-menu",(function(e){t()(e.target).closest(".note-dropdown-menu").parent().removeClass("open"),t()(e.target).closest(".note-dropdown-menu").parent().find(".note-btn.active").removeClass("active")}));const Nt=Ot;function Rt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}const Pt=function(){function e(n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$modal=n,this.$backdrop=t()('<div class="note-modal-backdrop"></div>')}var n,r,i;return n=e,(r=[{key:"show",value:function(){var e=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(t){27===t.which&&(t.preventDefault(),e.hide())}))}},{key:"hide",value:function(){this.$modal.removeClass("open").hide(),this.$backdrop.hide(),this.$modal.trigger("note.modal.hide"),this.$modal.off("keydown")}}])&&Rt(n.prototype,r),i&&Rt(n,i),e}();var Ft=Mt('<div class="note-editor note-frame"></div>'),jt=Mt('<div class="note-toolbar" role="toolbar"></div>'),Yt=Mt('<div class="note-editing-area"></div>'),Vt=Mt('<textarea class="note-codable" aria-multiline="true"></textarea>'),Ht=Mt('<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"></div>'),Bt=Mt(['<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("")),Ut=Mt('<div class="note-editor note-airframe"></div>'),zt=Mt(['<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"></div>','<output class="note-status-output" role="status" aria-live="polite"></output>'].join("")),qt=Mt('<div class="note-btn-group"></div>'),Wt=Mt('<button type="button" class="note-btn" tabindex="-1"></button>',(function(e,n){n&&n.tooltip&&(e.attr({"aria-label":n.tooltip}),e.data("_lite_tooltip",new It(e,{title:n.tooltip,container:n.container})).on("click",(function(e){t()(e.currentTarget).data("_lite_tooltip").hide()}))),n.contents&&e.html(n.contents),n&&n.data&&"dropdown"===n.data.toggle&&e.data("_lite_dropdown",new Nt(e,{container:n.container})),n&&n.codeviewKeepButton&&e.addClass("note-codeview-keep")})),$t=Mt('<div class="note-dropdown-menu" role="list"></div>',(function(e,n){var r=Array.isArray(n.items)?n.items.map((function(e){var r="string"==typeof e?e:e.value||"",i=n.template?n.template(e):e,o=t()('<a class="note-dropdown-item" href="#" data-value="'+r+'" role="listitem" aria-label="'+r+'"></a>');return o.html(i).data("item",e),o})):n.items;e.html(r).attr({"aria-label":n.title}),e.on("click","> .note-dropdown-item",(function(e){var r=t()(this),i=r.data("item"),o=r.data("value");i.click?i.click(r):n.itemClick&&n.itemClick(e,i,o)})),n&&n.codeviewKeepButton&&e.addClass("note-codeview-keep")})),Gt=Mt('<div class="note-dropdown-menu note-check" role="list"></div>',(function(e,n){var r=Array.isArray(n.items)?n.items.map((function(e){var r="string"==typeof e?e:e.value||"",i=n.template?n.template(e):e,o=t()('<a class="note-dropdown-item" href="#" data-value="'+r+'" role="listitem" aria-label="'+e+'"></a>');return o.html([cn(n.checkClassName)," ",i]).data("item",e),o})):n.items;e.html(r).attr({"aria-label":n.title}),e.on("click","> .note-dropdown-item",(function(e){var r=t()(this),i=r.data("item"),o=r.data("value");i.click?i.click(r):n.itemClick&&n.itemClick(e,i,o)})),n&&n.codeviewKeepButton&&e.addClass("note-codeview-keep")})),Kt=function(e,t){return e+" "+cn(t.icons.caret,"span")},Zt=function(e,t){return qt([Wt({className:"dropdown-toggle",contents:e.title+" "+cn("note-icon-caret"),tooltip:e.tooltip,data:{toggle:"dropdown"}}),$t({className:e.className,items:e.items,template:e.template,itemClick:e.itemClick})],{callback:t}).render()},Xt=function(e,t){return qt([Wt({className:"dropdown-toggle",contents:e.title+" "+cn("note-icon-caret"),tooltip:e.tooltip,data:{toggle:"dropdown"}}),Gt({className:e.className,checkClassName:e.checkClassName,items:e.items,template:e.template,itemClick:e.itemClick})],{callback:t}).render()},Jt=function(e){return qt([Wt({className:"dropdown-toggle",contents:e.title+" "+cn("note-icon-caret"),tooltip:e.tooltip,data:{toggle:"dropdown"}}),$t([qt({className:"note-align",children:e.items[0]}),qt({className:"note-list",children:e.items[1]})])]).render()},Qt=function(e){return qt([Wt({className:"dropdown-toggle",contents:e.title+" "+cn("note-icon-caret"),tooltip:e.tooltip,data:{toggle:"dropdown"}}),$t({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(n){n.find(".note-dimension-picker-mousecatcher").css({width:e.col+"em",height:e.row+"em"}).mouseup(e.itemClick).mousemove((function(n){!function(e,n,r){var i,o=t()(e.target.parentNode),s=o.next(),a=o.find(".note-dimension-picker-mousecatcher"),l=o.find(".note-dimension-picker-highlighted"),c=o.find(".note-dimension-picker-unhighlighted");if(void 0===e.offsetX){var u=t()(e.target).offset();i={x:e.pageX-u.left,y:e.pageY-u.top}}else i={x:e.offsetX,y:e.offsetY};var d=Math.ceil(i.x/18)||1,h=Math.ceil(i.y/18)||1;l.css({width:d+"em",height:h+"em"}),a.data("value",d+"x"+h),d>3&&d<n&&c.css({width:d+1+"em"}),h>3&&h<r&&c.css({height:h+1+"em"}),s.html(d+" x "+h)}(n,e.col,e.row)}))}}).render()},en=Mt('<div class="note-color-palette"></div>',(function(e,n){for(var r=[],i=0,o=n.colors.length;i<o;i++){for(var s=n.eventName,a=n.colors[i],l=n.colorsName[i],c=[],u=0,d=a.length;u<d;u++){var h=a[u],p=l[u];c.push(['<button type="button" class="note-btn note-color-btn"','style="background-color:',h,'" ','data-event="',s,'" ','data-value="',h,'" ','data-title="',p,'" ','aria-label="',p,'" ','data-toggle="button" tabindex="-1"></button>'].join(""))}r.push('<div class="note-color-row">'+c.join("")+"</div>")}e.html(r.join("")),e.find(".note-color-btn").each((function(){t()(this).data("_lite_tooltip",new It(t()(this),{container:n.container}))}))})),tn=function(e,n){return qt({className:"note-color",children:[Wt({className:"note-current-color-button",contents:e.title,tooltip:e.lang.color.recent,click:e.currentClick,callback:function(e){var t=e.find(".note-recent-color");"foreColor"!==n&&(t.css("background-color","#FFFF00"),e.attr("data-backColor","#FFFF00"))}}),Wt({className:"dropdown-toggle",contents:cn("note-icon-caret"),tooltip:e.lang.color.more,data:{toggle:"dropdown"}}),$t({items:["<div>",'<div class="note-btn-group btn-background-color">','<div class="note-palette-title">'+e.lang.color.background+"</div>","<div>",'<button type="button" class="note-color-reset note-btn note-btn-block" data-event="backColor" data-value="transparent">',e.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">',e.lang.color.cpSelect,"</button>","</div>","</div>",'<div class="note-btn-group btn-foreground-color">','<div class="note-palette-title">'+e.lang.color.foreground+"</div>","<div>",'<button type="button" class="note-color-reset note-btn note-btn-block" data-event="removeFormat" data-value="foreColor">',e.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">',e.lang.color.cpSelect,"</button>","</div>","</div>","</div>"].join(""),callback:function(r){r.find(".note-holder").each((function(){var n=t()(this);n.append(en({colors:e.colors,eventName:n.data("event")}).render())})),"fore"===n?(r.find(".btn-background-color").hide(),r.css({"min-width":"210px"})):"back"===n&&(r.find(".btn-foreground-color").hide(),r.css({"min-width":"210px"}))},click:function(r){var i=t()(r.target),o=i.data("event"),s=i.data("value"),a=document.getElementById("html5fcp").value,l=document.getElementById("html5bcp").value;if("cp"===s?r.stopPropagation():"cpbackColor"===s?s=l:"cpforeColor"===s&&(s=a),o&&s){var c="backColor"===o?"background-color":"color",u=i.closest(".note-color").find(".note-recent-color"),d=i.closest(".note-color").find(".note-current-color-button");u.css(c,s),d.attr("data-"+o,s),"fore"===n?e.itemClick("foreColor",s):"back"===n?e.itemClick("backColor",s):e.itemClick(o,s)}}})]}).render()},nn=Mt('<div class="note-modal" aria-hidden="false" tabindex="-1" role="dialog"></div>',(function(e,t){t.fade&&e.addClass("fade"),e.attr({"aria-label":t.title}),e.html(['<div class="note-modal-content">',t.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">'+t.title+"</h4></div>":"",'<div class="note-modal-body">'+t.body+"</div>",t.footer?'<div class="note-modal-footer">'+t.footer+"</div>":"","</div>"].join("")),e.data("modal",new Pt(e,t))})),rn=function(e){var t='<div class="note-form-group"><label for="note-dialog-video-url-'+e.id+'" class="note-form-label">'+e.lang.video.url+' <small class="text-muted">'+e.lang.video.providers+'</small></label><input id="note-dialog-video-url-'+e.id+'" class="note-video-url note-input" type="text"/></div>',n=['<button type="button" href="#" class="note-btn note-btn-primary note-video-btn disabled" disabled>',e.lang.video.insert,"</button>"].join("");return nn({title:e.lang.video.insert,fade:e.fade,body:t,footer:n}).render()},on=function(e){var t='<div class="note-form-group note-group-select-from-files"><label for="note-dialog-image-file-'+e.id+'" class="note-form-label">'+e.lang.image.selectFromFiles+'</label><input id="note-dialog-image-file-'+e.id+'" class="note-note-image-input note-input" type="file" name="files" accept="image/*" multiple="multiple"/>'+e.imageLimitation+'</div><div class="note-form-group"><label for="note-dialog-image-url-'+e.id+'" class="note-form-label">'+e.lang.image.url+'</label><input id="note-dialog-image-url-'+e.id+'" class="note-image-url note-input" type="text"/></div>',n=['<button href="#" type="button" class="note-btn note-btn-primary note-btn-large note-image-btn disabled" disabled>',e.lang.image.insert,"</button>"].join("");return nn({title:e.lang.image.insert,fade:e.fade,body:t,footer:n}).render()},sn=function(e){var t='<div class="note-form-group"><label for="note-dialog-link-txt-'+e.id+'" class="note-form-label">'+e.lang.link.textToDisplay+'</label><input id="note-dialog-link-txt-'+e.id+'" class="note-link-text note-input" type="text"/></div><div class="note-form-group"><label for="note-dialog-link-url-'+e.id+'" class="note-form-label">'+e.lang.link.url+'</label><input id="note-dialog-link-url-'+e.id+'" class="note-link-url note-input" type="text" value="http://"/></div>'+(e.disableLinkTarget?"":'<div class="checkbox"><label for="note-dialog-link-nw-'+e.id+'"><input id="note-dialog-link-nw-'+e.id+'" type="checkbox" checked> '+e.lang.link.openInNewWindow+"</label></div>")+'<div class="checkbox"><label for="note-dialog-link-up-'+e.id+'"><input id="note-dialog-link-up-'+e.id+'" type="checkbox" checked> '+e.lang.link.useProtocol+"</label></div>",n=['<button href="#" type="button" class="note-btn note-btn-primary note-link-btn disabled" disabled>',e.lang.link.insert,"</button>"].join("");return nn({className:"link-dialog",title:e.lang.link.insert,fade:e.fade,body:t,footer:n}).render()},an=Mt(['<div class="note-popover bottom">','<div class="note-popover-arrow"></div>','<div class="popover-content note-children-container"></div>',"</div>"].join(""),(function(e,t){var n=void 0!==t.direction?t.direction:"bottom";e.addClass(n).hide(),t.hideArrow&&e.find(".note-popover-arrow").hide()})),ln=Mt('<div class="checkbox"></div>',(function(e,t){e.html(["<label"+(t.id?' for="note-'+t.id+'"':"")+">",'<input role="checkbox" type="checkbox"'+(t.id?' id="note-'+t.id+'"':""),t.checked?" checked":"",' aria-checked="'+(t.checked?"true":"false")+'"/>',t.text?t.text:"","</label>"].join(""))})),cn=function(e,t){return e.match(/^</)?e:"<"+(t=t||"i")+' class="'+e+'"></'+t+">"};t().summernote=t().extend(t().summernote,{ui_template:function(e){return{editor:Ft,toolbar:jt,editingArea:Yt,codable:Vt,editable:Ht,statusbar:Bt,airEditor:Ut,airEditable:zt,buttonGroup:qt,button:Wt,dropdown:$t,dropdownCheck:Gt,dropdownButton:Zt,dropdownButtonContents:Kt,dropdownCheckButton:Xt,paragraphDropdownButton:Jt,tableDropdownButton:Qt,colorDropdownButton:tn,palette:en,dialog:nn,videoDialog:rn,imageDialog:on,linkDialog:sn,popover:an,checkbox:ln,icon:cn,options:e,toggleBtn:function(e,t){e.toggleClass("disabled",!t),e.attr("disabled",!t)},toggleBtnActive:function(e,t){e.toggleClass("active",t)},check:function(e,t){e.find(".checked").removeClass("checked"),e.find('[data-value="'+t+'"]').addClass("checked")},onDialogShown:function(e,t){e.one("note.modal.show",t)},onDialogHidden:function(e,t){e.one("note.modal.hide",t)},showDialog:function(e){e.data("modal").show()},hideDialog:function(e){e.data("modal").hide()},getPopoverContent:function(e){return e.find(".note-popover-content")},getDialogBody:function(e){return e.find(".note-modal-body")},createLayout:function(t){var n=(e.airMode?Ut([Yt([Vt(),zt()])]):"bottom"===e.toolbarPosition?Ft([Yt([Vt(),Ht()]),jt(),Bt()]):Ft([jt(),Yt([Vt(),Ht()]),Bt()])).render();return n.insertAfter(t),{note:t,editor:n,toolbar:n.find(".note-toolbar"),editingArea:n.find(".note-editing-area"),editable:n.find(".note-editable"),codable:n.find(".note-codable"),statusbar:n.find(".note-statusbar")}},removeLayout:function(e,t){e.html(t.editable.html()),t.editor.remove(),e.off("summernote"),e.show()}}},interface:"lite"})})(),i})()})),
|
|
581
|
+
function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("jquery"));else if("function"==typeof define&&define.amd)define(["jquery"],t);else{var n="object"==typeof exports?t(require("jquery")):t(e.jQuery);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(e=>(()=>{"use strict";var t={7e3:(e,t,n)=>{var r=n(8938),i=n.n(r);i().summernote=i().summernote||{lang:{}},i().extend(!0,i().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:t=>{t.exports=e}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i=r(8938),o=r.n(i),s=(r(7e3),["sans-serif","serif","monospace","cursive","fantasy"]);function a(e){return-1===o().inArray(e.toLowerCase(),s)?"'".concat(e,"'"):e}var l,c=navigator.userAgent,u=/MSIE|Trident/i.test(c);if(u){var d=/MSIE (\d+[.]\d+)/.exec(c);d&&(l=parseFloat(d[1])),(d=/Trident\/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(c))&&(l=parseFloat(d[1]))}var h=/Edge\/\d+/.test(c),p="ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,f=u?"DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted":"input";const m={isMac:navigator.appVersion.indexOf("Mac")>-1,isMSIE:u,isEdge:h,isFF:!h&&/firefox/i.test(c),isPhantom:/PhantomJS/i.test(c),isWebkit:!h&&/webkit/i.test(c),isChrome:!h&&/chrome/i.test(c),isSafari:!h&&/safari/i.test(c)&&!/chrome/i.test(c),browserVersion:l,isSupportTouch:p,isFontInstalled:function(){var e=document.createElement("canvas"),t=e.getContext("2d",{willReadFrequently:!0});function n(e,n){return t.clearRect(0,0,40,20),t.font="20px "+a(e)+', "'+n+'"',t.fillText("mw",20,10),t.getImageData(0,0,40,20).data.join("")}return e.width=40,e.height=20,t.textAlign="center",t.fillStyle="black",t.textBaseline="middle",function(e){var t="Comic Sans MS"===e?"Courier New":"Comic Sans MS";return n(t,t)!==n(e,t)}}(),isW3CRangeSupport:!!document.createRange,inputEventName:f,genericFontFamilies:s,validFontName:a};var g=0;const v={eq:function(e){return function(t){return e===t}},eq2:function(e,t){return e===t},peq2:function(e){return function(t,n){return t[e]===n[e]}},ok:function(){return!0},fail:function(){return!1},self:function(e){return e},not:function(e){return function(){return!e.apply(e,arguments)}},and:function(e,t){return function(n){return e(n)&&t(n)}},invoke:function(e,t){return function(){return e[t].apply(e,arguments)}},resetUniqueId:function(){g=0},uniqueId:function(e){var t=++g+"";return e?e+t:t},rect2bnd:function(e){var t=o()(document);return{top:e.top+t.scrollTop(),left:e.left+t.scrollLeft(),width:e.right-e.left,height:e.bottom-e.top}},invertObject:function(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[e[n]]=n);return t},namespaceToCamel:function(e,t){return(t=t||"")+e.split(".").map((function(e){return e.substring(0,1).toUpperCase()+e.substring(1)})).join("")},debounce:function(e,t,n){var r;return function(){var i=this,o=arguments,s=n&&!r;clearTimeout(r),r=setTimeout((function(){r=null,n||e.apply(i,o)}),t),s&&e.apply(i,o)}},isValidUrl:function(e){return/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi.test(e)}};function y(e){return e[0]}function b(e){return e[e.length-1]}function _(e){return e.slice(1)}function w(e,t){if(e&&e.length&&t){if(e.indexOf)return-1!==e.indexOf(t);if(e.contains)return e.contains(t)}return!1}const x={head:y,last:b,initial:function(e){return e.slice(0,e.length-1)},tail:_,prev:function(e,t){if(e&&e.length&&t){var n=e.indexOf(t);return-1===n?null:e[n-1]}return null},next:function(e,t){if(e&&e.length&&t){var n=e.indexOf(t);return-1===n?null:e[n+1]}return null},find:function(e,t){for(var n=0,r=e.length;n<r;n++){var i=e[n];if(t(i))return i}},contains:w,all:function(e,t){for(var n=0,r=e.length;n<r;n++)if(!t(e[n]))return!1;return!0},sum:function(e,t){return t=t||v.self,e.reduce((function(e,n){return e+t(n)}),0)},from:function(e){for(var t=[],n=e.length,r=-1;++r<n;)t[r]=e[r];return t},isEmpty:function(e){return!e||!e.length},clusterBy:function(e,t){return e.length?_(e).reduce((function(e,n){var r=b(e);return t(b(r),n)?r[r.length]=n:e[e.length]=[n],e}),[[y(e)]]):[]},compact:function(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]&&t.push(e[n]);return t},unique:function(e){for(var t=[],n=0,r=e.length;n<r;n++)w(t,e[n])||t.push(e[n]);return t}};var S=String.fromCharCode(160);function k(e){return e&&o()(e).hasClass("note-editable")}function T(e){return e=e.toUpperCase(),function(t){return t&&t.nodeName.toUpperCase()===e}}function E(e){return e&&3===e.nodeType}function C(e){return e&&/^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT|^AUDIO|^VIDEO|^EMBED/.test(e.nodeName.toUpperCase())}function D(e){return!k(e)&&(e&&/^DIV|^P|^LI|^H[1-7]/.test(e.nodeName.toUpperCase()))}var M=T("PRE"),A=T("LI");var I=T("TABLE"),L=T("DATA");function O(e){return!(j(e)||N(e)||R(e)||D(e)||I(e)||F(e)||L(e))}function N(e){return e&&/^UL|^OL/.test(e.nodeName.toUpperCase())}var R=T("HR");function P(e){return e&&/^TD|^TH/.test(e.nodeName.toUpperCase())}var F=T("BLOCKQUOTE");function j(e){return P(e)||F(e)||k(e)}var Y=T("A");var V=T("BODY");var H=m.isMSIE&&m.browserVersion<11?" ":"<br>";function B(e){return E(e)?e.nodeValue.length:e?e.childNodes.length:0}function U(e){var t=B(e);return 0===t||(!E(e)&&1===t&&e.innerHTML===H||!(!x.all(e.childNodes,E)||""!==e.innerHTML))}function z(e){C(e)||B(e)||(e.innerHTML=H)}function q(e,t){for(;e;){if(t(e))return e;if(k(e))break;e=e.parentNode}return null}function W(e,t){t=t||v.fail;var n=[];return q(e,(function(e){return k(e)||n.push(e),t(e)})),n}function $(e,t){t=t||v.fail;for(var n=[];e&&!t(e);)n.push(e),e=e.nextSibling;return n}function G(e,t){var n=t.nextSibling,r=t.parentNode;return n?r.insertBefore(e,n):r.appendChild(e),e}function K(e,t,n){return o().each(t,(function(t,r){!n&&A(e)&&null===e.firstChild&&N(r)&&e.appendChild(ue("br")),e.appendChild(r)})),e}function Z(e){return 0===e.offset}function X(e){return e.offset===B(e.node)}function J(e){return Z(e)||X(e)}function Q(e,t){for(;e&&e!==t;){if(0!==te(e))return!1;e=e.parentNode}return!0}function ee(e,t){if(!t)return!1;for(;e&&e!==t;){if(te(e)!==B(e.parentNode)-1)return!1;e=e.parentNode}return!0}function te(e){for(var t=0;e=e.previousSibling;)t+=1;return t}function ne(e){return!!(e&&e.childNodes&&e.childNodes.length)}function re(e,t){var n,r;if(0===e.offset){if(k(e.node))return null;n=e.node.parentNode,r=te(e.node)}else ne(e.node)?r=B(n=e.node.childNodes[e.offset-1]):(n=e.node,r=t?0:e.offset-1);return{node:n,offset:r}}function ie(e,t){var n,r;if(B(e.node)===e.offset){if(k(e.node))return null;var i=se(e.node);i?(n=i,r=0):(n=e.node.parentNode,r=te(e.node)+1)}else ne(e.node)?(n=e.node.childNodes[e.offset],r=0):(n=e.node,r=t?B(e.node):e.offset+1);return{node:n,offset:r}}function oe(e,t){var n,r=0;if(B(e.node)===e.offset){if(k(e.node))return null;n=e.node.parentNode,r=te(e.node)+1,k(n)&&(n=e.node.nextSibling,r=0)}else ne(e.node)?(n=e.node.childNodes[e.offset],r=0):(n=e.node,r=t?B(e.node):e.offset+1);return{node:n,offset:r}}function se(e){if(e.nextSibling&&e.parent===e.nextSibling.parent)return E(e.nextSibling)?e.nextSibling:se(e.nextSibling)}function ae(e,t){return e.node===t.node&&e.offset===t.offset}function le(e,t){var n=t&&t.isSkipPaddingBlankHTML,r=t&&t.isNotSplitEdgePoint,i=t&&t.isDiscardEmptySplits;if(i&&(n=!0),J(e)&&(E(e.node)||r)){if(Z(e))return e.node;if(X(e))return e.node.nextSibling}if(E(e.node))return e.node.splitText(e.offset);var o=$(e.node.childNodes[e.offset]),s=G(e.node.cloneNode(!1),e.node);return K(s,o),n||(z(e.node),z(s)),i&&(U(e.node)&&de(e.node),U(s))?(de(s),e.node.nextSibling):s}function ce(e,t,n){var r=W(t.node,v.eq(e));if(!r.length)return null;if(1===r.length)return le(t,n);if(r.length>2){var i=r.slice(0,r.length-1).find((function(e){return e.nextSibling}));if(i&&0!=t.offset&&X(t)){var o,s=i.nextSibling;1==s.nodeType?(r=W(o=s.childNodes[0],v.eq(e)),t={node:o,offset:0}):3!=s.nodeType||s.data.match(/[\n\r]/g)||(r=W(o=s,v.eq(e)),t={node:o,offset:0})}}return r.reduce((function(e,r){return e===t.node&&(e=le(t,n)),le({node:r,offset:e?te(e):B(r)},n)}))}function ue(e){return document.createElement(e)}function de(e,t){if(e&&e.parentNode){if(e.removeNode)return e.removeNode(t);var n=e.parentNode;if(!t){for(var r=[],i=0,o=e.childNodes.length;i<o;i++)r.push(e.childNodes[i]);for(var s=0,a=r.length;s<a;s++)n.insertBefore(r[s],e)}n.removeChild(e)}}var he=T("TEXTAREA");function pe(e,t){var n=he(e[0])?e.val():e.html();return t?n.replace(/[\n\r]/g,""):n}const fe={NBSP_CHAR:S,ZERO_WIDTH_NBSP_CHAR:"\ufeff",blank:H,emptyPara:"<p>".concat(H,"</p>"),makePredByNodeName:T,isEditable:k,isControlSizing:function(e){return e&&o()(e).hasClass("note-control-sizing")},isText:E,isElement:function(e){return e&&1===e.nodeType},isVoid:C,isPara:D,isPurePara:function(e){return D(e)&&!A(e)},isHeading:function(e){return e&&/^H[1-7]/.test(e.nodeName.toUpperCase())},isInline:O,isBlock:v.not(O),isBodyInline:function(e){return O(e)&&!q(e,D)},isBody:V,isParaInline:function(e){return O(e)&&!!q(e,D)},isPre:M,isList:N,isTable:I,isData:L,isCell:P,isBlockquote:F,isBodyContainer:j,isAnchor:Y,isDiv:T("DIV"),isLi:A,isBR:T("BR"),isSpan:T("SPAN"),isB:T("B"),isU:T("U"),isS:T("S"),isI:T("I"),isImg:T("IMG"),isTextarea:he,deepestChildIsEmpty:function(e){do{if(null===e.firstElementChild||""===e.firstElementChild.innerHTML)break}while(e=e.firstElementChild);return U(e)},isEmpty:U,isEmptyAnchor:v.and(Y,U),isClosestSibling:function(e,t){return e.nextSibling===t||e.previousSibling===t},withClosestSiblings:function(e,t){t=t||v.ok;var n=[];return e.previousSibling&&t(e.previousSibling)&&n.push(e.previousSibling),n.push(e),e.nextSibling&&t(e.nextSibling)&&n.push(e.nextSibling),n},nodeLength:B,isLeftEdgePoint:Z,isRightEdgePoint:X,isEdgePoint:J,isLeftEdgeOf:Q,isRightEdgeOf:ee,isLeftEdgePointOf:function(e,t){return Z(e)&&Q(e.node,t)},isRightEdgePointOf:function(e,t){return X(e)&&ee(e.node,t)},prevPoint:re,nextPoint:ie,nextPointWithEmptyNode:oe,isSamePoint:ae,isVisiblePoint:function(e){if(E(e.node)||!ne(e.node)||U(e.node))return!0;var t=e.node.childNodes[e.offset-1],n=e.node.childNodes[e.offset];return!((t&&!C(t)||n&&!C(n))&&!I(n))},prevPointUntil:function(e,t){for(;e;){if(t(e))return e;e=re(e)}return null},nextPointUntil:function(e,t){for(;e;){if(t(e))return e;e=ie(e)}return null},isCharPoint:function(e){if(!E(e.node))return!1;var t=e.node.nodeValue.charAt(e.offset-1);return t&&" "!==t&&t!==S},isSpacePoint:function(e){if(!E(e.node))return!1;var t=e.node.nodeValue.charAt(e.offset-1);return" "===t||t===S},walkPoint:function(e,t,n,r){for(var i=e;i&&i.node&&(n(i),!ae(i,t));){i=oe(i,r&&e.node!==i.node&&t.node!==i.node)}},ancestor:q,singleChildAncestor:function(e,t){for(e=e.parentNode;e&&1===B(e);){if(t(e))return e;if(k(e))break;e=e.parentNode}return null},listAncestor:W,lastAncestor:function(e,t){var n=W(e);return x.last(n.filter(t))},listNext:$,listPrev:function(e,t){t=t||v.fail;for(var n=[];e&&!t(e);)n.push(e),e=e.previousSibling;return n},listDescendant:function(e,t){var n=[];return t=t||v.ok,function r(i){e!==i&&t(i)&&n.push(i);for(var o=0,s=i.childNodes.length;o<s;o++)r(i.childNodes[o])}(e),n},commonAncestor:function(e,t){for(var n=W(e),r=t;r;r=r.parentNode)if(n.indexOf(r)>-1)return r;return null},wrap:function(e,t){var n=e.parentNode,r=o()("<"+t+">")[0];return n.insertBefore(r,e),r.appendChild(e),r},insertAfter:G,appendChildNodes:K,position:te,hasChildren:ne,makeOffsetPath:function(e,t){return W(t,v.eq(e)).map(te).reverse()},fromOffsetPath:function(e,t){for(var n=e,r=0,i=t.length;r<i;r++)n=n.childNodes.length<=t[r]?n.childNodes[n.childNodes.length-1]:n.childNodes[t[r]];return n},splitTree:ce,splitPoint:function(e,t){var n,r,i=t?D:j,o=W(e.node,i),s=x.last(o)||e.node;i(s)?(n=o[o.length-2],r=s):r=(n=s).parentNode;var a=n&&ce(n,e,{isSkipPaddingBlankHTML:t,isNotSplitEdgePoint:t});return a||r!==e.node||(a=e.node.childNodes[e.offset]),{rightNode:a,container:r}},create:ue,createText:function(e){return document.createTextNode(e)},remove:de,removeWhile:function(e,t){for(;e&&!k(e)&&t(e);){var n=e.parentNode;de(e),e=n}},replace:function(e,t){if(e.nodeName.toUpperCase()===t.toUpperCase())return e;var n=ue(t);return e.style.cssText&&(n.style.cssText=e.style.cssText),K(n,x.from(e.childNodes)),G(n,e),de(e),n},html:function(e,t){var n=pe(e);if(t){n=(n=n.replace(/<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g,(function(e,t,n){n=n.toUpperCase();var r=/^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(n)&&!!t,i=/^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(n);return e+(r||i?"\n":"")}))).trim()}return n},value:pe,posFromPlaceholder:function(e){var t=o()(e),n=t.offset(),r=t.outerHeight(!0);return{left:n.left,top:n.top+r}},attachEvents:function(e,t){Object.keys(t).forEach((function(n){e.on(n,t[n])}))},detachEvents:function(e,t){Object.keys(t).forEach((function(n){e.off(n,t[n])}))},isCustomStyleTag:function(e){return e&&!E(e)&&x.contains(e.classList,"note-styletag")}};function me(e){return me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},me(e)}function ge(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ve(r.key),r)}}function ve(e){var t=function(e,t){if("object"!=me(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=me(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==me(t)?t:t+""}var ye,be,_e,we=(ye=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$note=t,this.memos={},this.modules={},this.layoutInfo={},this.options=o().extend(!0,{},n),o().summernote.ui=o().summernote.ui_template(this.options),this.ui=o().summernote.ui,this.initialize()},be=[{key:"initialize",value:function(){return this.layoutInfo=this.ui.createLayout(this.$note),this._initialize(),this.$note.hide(),this}},{key:"destroy",value:function(){this._destroy(),this.$note.removeData("summernote"),this.ui.removeLayout(this.$note,this.layoutInfo)}},{key:"reset",value:function(){var e=this.isDisabled();this.code(fe.emptyPara),this._destroy(),this._initialize(),e&&this.disable()}},{key:"_initialize",value:function(){var e=this;this.options.id=v.uniqueId(o().now()),this.options.container=this.options.container||this.layoutInfo.editor;var t=o().extend({},this.options.buttons);Object.keys(t).forEach((function(n){e.memo("button."+n,t[n])}));var n=o().extend({},this.options.modules,o().summernote.plugins||{});Object.keys(n).forEach((function(t){e.module(t,n[t],!0)})),Object.keys(this.modules).forEach((function(t){e.initializeModule(t)}))}},{key:"_destroy",value:function(){var e=this;Object.keys(this.modules).reverse().forEach((function(t){e.removeModule(t)})),Object.keys(this.memos).forEach((function(t){e.removeMemo(t)})),this.triggerEvent("destroy",this)}},{key:"code",value:function(e){var t=this.invoke("codeview.isActivated");if(void 0===e)return this.invoke("codeview.sync"),t?this.layoutInfo.codable.val():this.layoutInfo.editable.html();t?this.invoke("codeview.sync",e):this.layoutInfo.editable.html(e),this.$note.val(e),this.triggerEvent("change",e,this.layoutInfo.editable)}},{key:"isDisabled",value:function(){return"false"===this.layoutInfo.editable.attr("contenteditable")}},{key:"enable",value:function(){this.layoutInfo.editable.attr("contenteditable",!0),this.invoke("toolbar.activate",!0),this.triggerEvent("disable",!1),this.options.editing=!0}},{key:"disable",value:function(){this.invoke("codeview.isActivated")&&this.invoke("codeview.deactivate"),this.layoutInfo.editable.attr("contenteditable",!1),this.options.editing=!1,this.invoke("toolbar.deactivate",!0),this.triggerEvent("disable",!0)}},{key:"triggerEvent",value:function(){var e=x.head(arguments),t=x.tail(x.from(arguments)),n=this.options.callbacks[v.namespaceToCamel(e,"on")];n&&n.apply(this.$note[0],t),this.$note.trigger("summernote."+e,t)}},{key:"initializeModule",value:function(e){var t=this.modules[e];t.shouldInitialize=t.shouldInitialize||v.ok,t.shouldInitialize()&&(t.initialize&&t.initialize(),t.events&&fe.attachEvents(this.$note,t.events))}},{key:"module",value:function(e,t,n){if(1===arguments.length)return this.modules[e];this.modules[e]=new t(this),n||this.initializeModule(e)}},{key:"removeModule",value:function(e){var t=this.modules[e];t.shouldInitialize()&&(t.events&&fe.detachEvents(this.$note,t.events),t.destroy&&t.destroy()),delete this.modules[e]}},{key:"memo",value:function(e,t){if(1===arguments.length)return this.memos[e];this.memos[e]=t}},{key:"removeMemo",value:function(e){this.memos[e]&&this.memos[e].destroy&&this.memos[e].destroy(),delete this.memos[e]}},{key:"createInvokeHandlerAndUpdateState",value:function(e,t){var n=this;return function(r){n.createInvokeHandler(e,t)(r),n.invoke("buttons.updateCurrentStyle")}}},{key:"createInvokeHandler",value:function(e,t){var n=this;return function(r){r.preventDefault();var i=o()(r.target);n.invoke(e,t||i.closest("[data-value]").data("value"),i)}}},{key:"invoke",value:function(){var e=x.head(arguments),t=x.tail(x.from(arguments)),n=e.split("."),r=n.length>1,i=r&&x.head(n),o=r?x.last(n):x.head(n),s=this.modules[i||"editor"];return!i&&this[o]?this[o].apply(this,t):s&&s[o]&&s.shouldInitialize()?s[o].apply(s,t):void 0}}],be&&ge(ye.prototype,be),_e&&ge(ye,_e),Object.defineProperty(ye,"prototype",{writable:!1}),ye);function xe(e){return xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xe(e)}function Se(e){return Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Se(e)}function ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Te(r.key),r)}}function Te(e){var t=function(e,t){if("object"!=Se(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Se(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Se(t)?t:t+""}function Ee(e,t){var n,r,i=e.parentElement(),o=document.body.createTextRange(),s=x.from(i.childNodes);for(n=0;n<s.length;n++)if(!fe.isText(s[n])){if(o.moveToElementText(s[n]),o.compareEndPoints("StartToStart",e)>=0)break;r=s[n]}if(0!==n&&fe.isText(s[n-1])){var a=document.body.createTextRange(),l=null;a.moveToElementText(r||i),a.collapse(!r),l=r?r.nextSibling:i.firstChild;var c=e.duplicate();c.setEndPoint("StartToStart",a);for(var u=c.text.replace(/[\r\n]/g,"").length;u>l.nodeValue.length&&l.nextSibling;)u-=l.nodeValue.length,l=l.nextSibling;l.nodeValue;t&&l.nextSibling&&fe.isText(l.nextSibling)&&u===l.nodeValue.length&&(u-=l.nodeValue.length,l=l.nextSibling),i=l,n=u}return{cont:i,offset:n}}function Ce(e){var t=document.body.createTextRange(),n=function e(t,n){var r,i;if(fe.isText(t)){var o=fe.listPrev(t,v.not(fe.isText)),s=x.last(o).previousSibling;r=s||t.parentNode,n+=x.sum(x.tail(o),fe.nodeLength),i=!s}else{if(r=t.childNodes[n]||t,fe.isText(r))return e(r,0);n=0,i=!1}return{node:r,collapseToStart:i,offset:n}}(e.node,e.offset);return t.moveToElementText(n.node),t.collapse(n.collapseToStart),t.moveStart("character",n.offset),t}o().fn.extend({summernote:function(){var e=xe(x.head(arguments)),t="string"===e,n="object"===e,r=o().extend({},o().summernote.options,n?x.head(arguments):{});r.langInfo=o().extend(!0,{},o().summernote.lang["en-US"],o().summernote.lang[r.lang]),r.icons=o().extend(!0,{},o().summernote.options.icons,r.icons),r.tooltip="auto"===r.tooltip?!m.isSupportTouch:r.tooltip,this.each((function(e,t){var n=o()(t);if(!n.data("summernote")){var i=new we(n,r);n.data("summernote",i),n.data("summernote").triggerEvent("init",i.layoutInfo)}}));var i=this.first();if(i.length){var s=i.data("summernote");if(t)return s.invoke.apply(s,x.from(arguments));r.focus&&s.invoke("editor.focus")}return this}});var De=function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sc=t,this.so=n,this.ec=r,this.eo=i,this.isOnEditable=this.makeIsOn(fe.isEditable),this.isOnList=this.makeIsOn(fe.isList),this.isOnAnchor=this.makeIsOn(fe.isAnchor),this.isOnCell=this.makeIsOn(fe.isCell),this.isOnData=this.makeIsOn(fe.isData)}return function(e,t,n){return t&&ke(e.prototype,t),n&&ke(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"nativeRange",value:function(){if(m.isW3CRangeSupport){var e=document.createRange();return e.setStart(this.sc,this.so),e.setEnd(this.ec,this.eo),e}var t=Ce({node:this.sc,offset:this.so});return t.setEndPoint("EndToEnd",Ce({node:this.ec,offset:this.eo})),t}},{key:"getPoints",value:function(){return{sc:this.sc,so:this.so,ec:this.ec,eo:this.eo}}},{key:"getStartPoint",value:function(){return{node:this.sc,offset:this.so}}},{key:"getEndPoint",value:function(){return{node:this.ec,offset:this.eo}}},{key:"select",value:function(){var e=this.nativeRange();if(m.isW3CRangeSupport){var t=document.getSelection();t.rangeCount>0&&t.removeAllRanges(),t.addRange(e)}else e.select();return this}},{key:"scrollIntoView",value:function(e){var t=o()(e).height();return e.scrollTop+t<this.sc.offsetTop&&(e.scrollTop+=Math.abs(e.scrollTop+t-this.sc.offsetTop)),this}},{key:"normalize",value:function(){var t=function(e,t){if(!e)return e;if(fe.isVisiblePoint(e)&&(!fe.isEdgePoint(e)||fe.isRightEdgePoint(e)&&!t||fe.isLeftEdgePoint(e)&&t||fe.isRightEdgePoint(e)&&t&&fe.isVoid(e.node.nextSibling)||fe.isLeftEdgePoint(e)&&!t&&fe.isVoid(e.node.previousSibling)||fe.isBlock(e.node)&&fe.isEmpty(e.node)))return e;var n=fe.ancestor(e.node,fe.isBlock),r=!1;if(!r){var i=fe.prevPoint(e)||{node:null};r=(fe.isLeftEdgePointOf(e,n)||fe.isVoid(i.node))&&!t}var o=!1;if(!o){var s=fe.nextPoint(e)||{node:null};o=(fe.isRightEdgePointOf(e,n)||fe.isVoid(s.node))&&t}if(r||o){if(fe.isVisiblePoint(e))return e;t=!t}return(t?fe.nextPointUntil(fe.nextPoint(e),fe.isVisiblePoint):fe.prevPointUntil(fe.prevPoint(e),fe.isVisiblePoint))||e},n=t(this.getEndPoint(),!1),r=this.isCollapsed()?n:t(this.getStartPoint(),!0);return new e(r.node,r.offset,n.node,n.offset)}},{key:"nodes",value:function(e,t){e=e||v.ok;var n=t&&t.includeAncestor,r=t&&t.fullyContains,i=this.getStartPoint(),o=this.getEndPoint(),s=[],a=[];return fe.walkPoint(i,o,(function(t){var i;fe.isEditable(t.node)||(r?(fe.isLeftEdgePoint(t)&&a.push(t.node),fe.isRightEdgePoint(t)&&x.contains(a,t.node)&&(i=t.node)):i=n?fe.ancestor(t.node,e):t.node,i&&e(i)&&s.push(i))}),!0),x.unique(s)}},{key:"commonAncestor",value:function(){return fe.commonAncestor(this.sc,this.ec)}},{key:"expand",value:function(t){var n=fe.ancestor(this.sc,t),r=fe.ancestor(this.ec,t);if(!n&&!r)return new e(this.sc,this.so,this.ec,this.eo);var i=this.getPoints();return n&&(i.sc=n,i.so=0),r&&(i.ec=r,i.eo=fe.nodeLength(r)),new e(i.sc,i.so,i.ec,i.eo)}},{key:"collapse",value:function(t){return t?new e(this.sc,this.so,this.sc,this.so):new e(this.ec,this.eo,this.ec,this.eo)}},{key:"splitText",value:function(){var t=this.sc===this.ec,n=this.getPoints();return fe.isText(this.ec)&&!fe.isEdgePoint(this.getEndPoint())&&this.ec.splitText(this.eo),fe.isText(this.sc)&&!fe.isEdgePoint(this.getStartPoint())&&(n.sc=this.sc.splitText(this.so),n.so=0,t&&(n.ec=n.sc,n.eo=this.eo-this.so)),new e(n.sc,n.so,n.ec,n.eo)}},{key:"deleteContents",value:function(){if(this.isCollapsed())return this;var t=this.splitText(),n=t.nodes(null,{fullyContains:!0}),r=fe.prevPointUntil(t.getStartPoint(),(function(e){return!x.contains(n,e.node)})),i=[];return o().each(n,(function(e,t){var n=t.parentNode;r.node!==n&&1===fe.nodeLength(n)&&i.push(n),fe.remove(t,!1)})),o().each(i,(function(e,t){fe.remove(t,!1)})),new e(r.node,r.offset,r.node,r.offset).normalize()}},{key:"makeIsOn",value:function(e){return function(){var t=fe.ancestor(this.sc,e);return!!t&&t===fe.ancestor(this.ec,e)}}},{key:"isLeftEdgeOf",value:function(e){if(!fe.isLeftEdgePoint(this.getStartPoint()))return!1;var t=fe.ancestor(this.sc,e);return t&&fe.isLeftEdgeOf(this.sc,t)}},{key:"isCollapsed",value:function(){return this.sc===this.ec&&this.so===this.eo}},{key:"wrapBodyInlineWithPara",value:function(){if(fe.isBodyContainer(this.sc)&&fe.isEmpty(this.sc))return this.sc.innerHTML=fe.emptyPara,new e(this.sc.firstChild,0,this.sc.firstChild,0);var t,n=this.normalize();if(fe.isParaInline(this.sc)||fe.isPara(this.sc))return n;if(fe.isInline(n.sc)){var r=fe.listAncestor(n.sc,v.not(fe.isInline));t=x.last(r),fe.isInline(t)||(t=r[r.length-2]||n.sc.childNodes[n.so])}else t=n.sc.childNodes[n.so>0?n.so-1:0];if(t){var i=fe.listPrev(t,fe.isParaInline).reverse();if((i=i.concat(fe.listNext(t.nextSibling,fe.isParaInline))).length){var o=fe.wrap(x.head(i),"p");fe.appendChildNodes(o,x.tail(i))}}return this.normalize()}},{key:"insertNode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this;(fe.isText(e)||fe.isInline(e))&&(n=this.wrapBodyInlineWithPara().deleteContents());var r=fe.splitPoint(n.getStartPoint(),fe.isInline(e));return r.rightNode?(r.rightNode.parentNode.insertBefore(e,r.rightNode),fe.isEmpty(r.rightNode)&&(t||fe.isPara(e))&&r.rightNode.parentNode.removeChild(r.rightNode)):r.container.appendChild(e),e}},{key:"pasteHTML",value:function(e){e=((e||"")+"").trim(e);var t=o()("<div></div>").html(e)[0],n=x.from(t.childNodes),r=this,i=!1;return r.so>=0&&(n=n.reverse(),i=!0),n=n.map((function(e){return r.insertNode(e,!fe.isInline(e))})),i&&(n=n.reverse()),n}},{key:"toString",value:function(){var e=this.nativeRange();return m.isW3CRangeSupport?e.toString():e.text}},{key:"getWordRange",value:function(t){var n=this.getEndPoint();if(!fe.isCharPoint(n))return this;var r=fe.prevPointUntil(n,(function(e){return!fe.isCharPoint(e)}));return t&&(n=fe.nextPointUntil(n,(function(e){return!fe.isCharPoint(e)}))),new e(r.node,r.offset,n.node,n.offset)}},{key:"getWordsRange",value:function(t){var n=this.getEndPoint(),r=function(e){return!fe.isCharPoint(e)&&!fe.isSpacePoint(e)};if(r(n))return this;var i=fe.prevPointUntil(n,r);return t&&(n=fe.nextPointUntil(n,r)),new e(i.node,i.offset,n.node,n.offset)}},{key:"getWordsMatchRange",value:function(t){var n=this.getEndPoint(),r=fe.prevPointUntil(n,(function(r){if(!fe.isCharPoint(r)&&!fe.isSpacePoint(r))return!0;var i=new e(r.node,r.offset,n.node,n.offset),o=t.exec(i.toString());return o&&0===o.index})),i=new e(r.node,r.offset,n.node,n.offset),o=i.toString(),s=t.exec(o);return s&&s[0].length===o.length?i:null}},{key:"bookmark",value:function(e){return{s:{path:fe.makeOffsetPath(e,this.sc),offset:this.so},e:{path:fe.makeOffsetPath(e,this.ec),offset:this.eo}}}},{key:"paraBookmark",value:function(e){return{s:{path:x.tail(fe.makeOffsetPath(x.head(e),this.sc)),offset:this.so},e:{path:x.tail(fe.makeOffsetPath(x.last(e),this.ec)),offset:this.eo}}}},{key:"getClientRects",value:function(){return this.nativeRange().getClientRects()}}])}();const Me={create:function(e,t,n,r){if(4===arguments.length)return new De(e,t,n,r);if(2===arguments.length)return new De(e,t,n=e,r=t);var i=this.createFromSelection();if(!i&&1===arguments.length){var o=arguments[0];return fe.isEditable(o)&&(o=o.lastChild),this.createFromBodyElement(o,fe.emptyPara===arguments[0].innerHTML)}return i},createFromBodyElement:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.createFromNode(e).collapse(t)},createFromSelection:function(){var e,t,n,r;if(m.isW3CRangeSupport){var i=document.getSelection();if(!i||0===i.rangeCount)return null;if(fe.isBody(i.anchorNode))return null;var o=i.getRangeAt(0);e=o.startContainer,t=o.startOffset,n=o.endContainer,r=o.endOffset}else{var s=document.selection.createRange(),a=s.duplicate();a.collapse(!1);var l=s;l.collapse(!0);var c=Ee(l,!0),u=Ee(a,!1);fe.isText(c.node)&&fe.isLeftEdgePoint(c)&&fe.isTextNode(u.node)&&fe.isRightEdgePoint(u)&&u.node.nextSibling===c.node&&(c=u),e=c.cont,t=c.offset,n=u.cont,r=u.offset}return new De(e,t,n,r)},createFromNode:function(e){var t=e,n=0,r=e,i=fe.nodeLength(r);return fe.isVoid(t)&&(n=fe.listPrev(t).length-1,t=t.parentNode),fe.isBR(r)?(i=fe.listPrev(r).length-1,r=r.parentNode):fe.isVoid(r)&&(i=fe.listPrev(r).length,r=r.parentNode),this.create(t,n,r,i)},createFromNodeBefore:function(e){return this.createFromNode(e).collapse(!0)},createFromNodeAfter:function(e){return this.createFromNode(e).collapse()},createFromBookmark:function(e,t){var n=fe.fromOffsetPath(e,t.s.path),r=t.s.offset,i=fe.fromOffsetPath(e,t.e.path),o=t.e.offset;return new De(n,r,i,o)},createFromParaBookmark:function(e,t){var n=e.s.offset,r=e.e.offset,i=fe.fromOffsetPath(x.head(t),e.s.path),o=fe.fromOffsetPath(x.last(t),e.e.path);return new De(i,n,o,r)}};var Ae={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 Ie={isEdit:function(e){return x.contains([Ae.BACKSPACE,Ae.TAB,Ae.ENTER,Ae.SPACE,Ae.DELETE],e)},isRemove:function(e){return x.contains([Ae.BACKSPACE,Ae.DELETE],e)},isMove:function(e){return x.contains([Ae.LEFT,Ae.UP,Ae.RIGHT,Ae.DOWN],e)},isNavigation:function(e){return x.contains([Ae.HOME,Ae.END,Ae.PAGEUP,Ae.PAGEDOWN],e)},nameFromCode:v.invertObject(Ae),code:Ae};function Le(e){return Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Le(e)}function Oe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ne(r.key),r)}}function Ne(e){var t=function(e,t){if("object"!=Le(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Le(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Le(t)?t:t+""}var Re=function(e,t,n){return t&&Oe(e.prototype,t),n&&Oe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.stack=[],this.stackOffset=-1,this.context=t,this.$editable=t.layoutInfo.editable,this.editable=this.$editable[0]}),[{key:"makeSnapshot",value:function(){var e=Me.create(this.editable);return{contents:this.$editable.html(),bookmark:e&&e.isOnEditable()?e.bookmark(this.editable):{s:{path:[],offset:0},e:{path:[],offset:0}}}}},{key:"applySnapshot",value:function(e){null!==e.contents&&this.$editable.html(e.contents),null!==e.bookmark&&Me.createFromBookmark(this.editable,e.bookmark).select()}},{key:"rewind",value:function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset=0,this.applySnapshot(this.stack[this.stackOffset])}},{key:"commit",value:function(){this.stack=[],this.stackOffset=-1,this.recordUndo()}},{key:"reset",value:function(){this.stack=[],this.stackOffset=-1,this.$editable.html(""),this.recordUndo()}},{key:"undo",value:function(){this.$editable.html()!==this.stack[this.stackOffset].contents&&this.recordUndo(),this.stackOffset>0&&(this.stackOffset--,this.applySnapshot(this.stack[this.stackOffset]))}},{key:"redo",value:function(){this.stack.length-1>this.stackOffset&&(this.stackOffset++,this.applySnapshot(this.stack[this.stackOffset]))}},{key:"recordUndo",value:function(){this.stackOffset++,this.stack.length>this.stackOffset&&(this.stack=this.stack.slice(0,this.stackOffset)),this.stack.push(this.makeSnapshot()),this.stack.length>this.context.options.historyLimit&&(this.stack.shift(),this.stackOffset-=1)}}]);function Pe(e){return Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(e)}function Fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,je(r.key),r)}}function je(e){var t=function(e,t){if("object"!=Pe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Pe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pe(t)?t:t+""}var Ye=function(e,t,n){return t&&Fe(e.prototype,t),n&&Fe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}),[{key:"jQueryCSS",value:function(e,t){var n={};return o().each(t,(function(t,r){n[r]=e.css(r)})),n}},{key:"fromNode",value:function(e){var t=this.jQueryCSS(e,["font-family","font-size","text-align","list-style-type","line-height"])||{},n=e[0].style.fontSize||t["font-size"];return t["font-size"]=parseInt(n,10),t["font-size-unit"]=n.match(/[a-z%]+$/),t}},{key:"stylePara",value:function(e,t){o().each(e.nodes(fe.isPara,{includeAncestor:!0}),(function(e,n){o()(n).css(t)}))}},{key:"styleNodes",value:function(e,t){e=e.splitText();var n=t&&t.nodeName||"SPAN",r=!(!t||!t.expandClosestSibling),i=!(!t||!t.onlyPartialContains);if(e.isCollapsed())return[e.insertNode(fe.create(n))];var s=fe.makePredByNodeName(n),a=e.nodes(fe.isText,{fullyContains:!0}).map((function(e){return fe.singleChildAncestor(e,s)||fe.wrap(e,n)}));if(r){if(i){var l=e.nodes();s=v.and(s,(function(e){return x.contains(l,e)}))}return a.map((function(e){var t=fe.withClosestSiblings(e,s),n=x.head(t),r=x.tail(t);return o().each(r,(function(e,t){fe.appendChildNodes(n,t.childNodes),fe.remove(t)})),x.head(t)}))}return a}},{key:"current",value:function(e){var t=o()(fe.isElement(e.sc)?e.sc:e.sc.parentNode),n=this.fromNode(t);try{n=o().extend(n,{"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")||n["font-family"]})}catch(e){}if(e.isOnList()){var r=["circle","disc","disc-leading-zero","square"].indexOf(n["list-style-type"])>-1;n["list-style"]=r?"unordered":"ordered"}else n["list-style"]="none";var i=fe.ancestor(e.sc,fe.isPara);if(i&&i.style["line-height"])n["line-height"]=i.style.lineHeight;else{var s=parseInt(n["line-height"],10)/parseInt(n["font-size"],10);n["line-height"]=s.toFixed(1)}return n.anchor=e.isOnAnchor()&&fe.ancestor(e.sc,fe.isAnchor),n.ancestors=fe.listAncestor(e.sc,fe.isEditable),n.range=e,n}}]);function Ve(e){return Ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ve(e)}function He(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Be(r.key),r)}}function Be(e){var t=function(e,t){if("object"!=Ve(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ve(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ve(t)?t:t+""}var Ue=function(e,t,n){return t&&He(e.prototype,t),n&&He(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}),[{key:"insertOrderedList",value:function(e){this.toggleList("OL",e)}},{key:"insertUnorderedList",value:function(e){this.toggleList("UL",e)}},{key:"indent",value:function(e){var t=this,n=Me.create(e).wrapBodyInlineWithPara(),r=n.nodes(fe.isPara,{includeAncestor:!0}),i=x.clusterBy(r,v.peq2("parentNode"));o().each(i,(function(e,n){var r=x.head(n);if(fe.isLi(r)){var i=t.findList(r.previousSibling);i?n.map((function(e){return i.appendChild(e)})):(t.wrapList(n,r.parentNode.nodeName),n.map((function(e){return e.parentNode})).map((function(e){return t.appendToPrevious(e)})))}else o().each(n,(function(e,t){o()(t).css("marginLeft",(function(e,t){return(parseInt(t,10)||0)+25}))}))})),n.select()}},{key:"outdent",value:function(e){var t=this,n=Me.create(e).wrapBodyInlineWithPara(),r=n.nodes(fe.isPara,{includeAncestor:!0}),i=x.clusterBy(r,v.peq2("parentNode"));o().each(i,(function(e,n){var r=x.head(n);fe.isLi(r)?t.releaseList([n]):o().each(n,(function(e,t){o()(t).css("marginLeft",(function(e,t){return(t=parseInt(t,10)||0)>25?t-25:""}))}))})),n.select()}},{key:"toggleList",value:function(e,t){var n=this,r=Me.create(t).wrapBodyInlineWithPara(),i=r.nodes(fe.isPara,{includeAncestor:!0}),s=r.paraBookmark(i),a=x.clusterBy(i,v.peq2("parentNode"));if(x.find(i,fe.isPurePara)){var l=[];o().each(a,(function(t,r){l=l.concat(n.wrapList(r,e))})),i=l}else{var c=r.nodes(fe.isList,{includeAncestor:!0}).filter((function(t){return!o().nodeName(t,e)}));c.length?o().each(c,(function(t,n){fe.replace(n,e)})):i=this.releaseList(a,!0)}Me.createFromParaBookmark(s,i).select()}},{key:"wrapList",value:function(e,t){var n=x.head(e),r=x.last(e),i=fe.isList(n.previousSibling)&&n.previousSibling,o=fe.isList(r.nextSibling)&&r.nextSibling,s=i||fe.insertAfter(fe.create(t||"UL"),r);return e=e.map((function(e){return fe.isPurePara(e)?fe.replace(e,"LI"):e})),fe.appendChildNodes(s,e,!0),o&&(fe.appendChildNodes(s,x.from(o.childNodes),!0),fe.remove(o)),e}},{key:"releaseList",value:function(e,t){var n=this,r=[];return o().each(e,(function(e,i){var s=x.head(i),a=x.last(i),l=t?fe.lastAncestor(s,fe.isList):s.parentNode,c=l.parentNode;if("LI"===l.parentNode.nodeName)i.map((function(e){var t=n.findNextSiblings(e);c.nextSibling?c.parentNode.insertBefore(e,c.nextSibling):c.parentNode.appendChild(e),t.length&&(n.wrapList(t,l.nodeName),e.appendChild(t[0].parentNode))})),0===l.children.length&&c.removeChild(l),0===c.childNodes.length&&c.parentNode.removeChild(c);else{var u=l.childNodes.length>1?fe.splitTree(l,{node:a.parentNode,offset:fe.position(a)+1},{isSkipPaddingBlankHTML:!0}):null,d=fe.splitTree(l,{node:s.parentNode,offset:fe.position(s)},{isSkipPaddingBlankHTML:!0});i=t?fe.listDescendant(d,fe.isLi):x.from(d.childNodes).filter(fe.isLi),!t&&fe.isList(l.parentNode)||(i=i.map((function(e){return fe.replace(e,"P")}))),o().each(x.from(i).reverse(),(function(e,t){fe.insertAfter(t,l)}));var h=x.compact([l,d,u]);o().each(h,(function(e,t){var n=[t].concat(fe.listDescendant(t,fe.isList));o().each(n.reverse(),(function(e,t){fe.nodeLength(t)||fe.remove(t,!0)}))}))}r=r.concat(i)})),r}},{key:"appendToPrevious",value:function(e){return e.previousSibling?fe.appendChildNodes(e.previousSibling,[e]):this.wrapList([e],"LI")}},{key:"findList",value:function(e){return e?x.find(e.children,(function(e){return["OL","UL"].indexOf(e.nodeName)>-1})):null}},{key:"findNextSiblings",value:function(e){for(var t=[];e.nextSibling;)t.push(e.nextSibling),e=e.nextSibling;return t}}]);function ze(e){return ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ze(e)}function qe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,We(r.key),r)}}function We(e){var t=function(e,t){if("object"!=ze(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ze(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ze(t)?t:t+""}var $e=function(e,t,n){return t&&qe(e.prototype,t),n&&qe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bullet=new Ue,this.options=t.options}),[{key:"insertTab",value:function(e,t){var n=fe.createText(new Array(t+1).join(fe.NBSP_CHAR));(e=e.deleteContents()).insertNode(n,!0),(e=Me.create(n,t)).select()}},{key:"insertParagraph",value:function(e,t){t=(t=(t=t||Me.create(e)).deleteContents()).wrapBodyInlineWithPara();var n,r=fe.ancestor(t.sc,fe.isPara);if(r){if(fe.isLi(r)&&(fe.isEmpty(r)||fe.deepestChildIsEmpty(r)))return void this.bullet.toggleList(r.parentNode.nodeName);var i=null;if(1===this.options.blockquoteBreakingLevel?i=fe.ancestor(r,fe.isBlockquote):2===this.options.blockquoteBreakingLevel&&(i=fe.lastAncestor(r,fe.isBlockquote)),i){n=o()(fe.emptyPara)[0],fe.isRightEdgePoint(t.getStartPoint())&&fe.isBR(t.sc.nextSibling)&&o()(t.sc.nextSibling).remove();var s=fe.splitTree(i,t.getStartPoint(),{isDiscardEmptySplits:!0});s?s.parentNode.insertBefore(n,s):fe.insertAfter(n,i)}else{n=fe.splitTree(r,t.getStartPoint());var a=fe.listDescendant(r,fe.isEmptyAnchor);a=a.concat(fe.listDescendant(n,fe.isEmptyAnchor)),o().each(a,(function(e,t){fe.remove(t)})),(fe.isHeading(n)||fe.isPre(n)||fe.isCustomStyleTag(n))&&fe.isEmpty(n)&&(n=fe.replace(n,"p"))}}else{var l=t.sc.childNodes[t.so];n=o()(fe.emptyPara)[0],l?t.sc.insertBefore(n,l):t.sc.appendChild(n)}Me.create(n,0).normalize().select().scrollIntoView(e)}}]);function Ge(e){return Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ge(e)}function Ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ze(r.key),r)}}function Ze(e){var t=function(e,t){if("object"!=Ge(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ge(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ge(t)?t:t+""}var Xe=function e(t,n,r,i){var o={colPos:0,rowPos:0},s=[],a=[];function l(e,t,n,r,i,o,a){var l={baseRow:n,baseCell:r,isRowSpan:i,isColSpan:o,isVirtual:a};s[e]||(s[e]=[]),s[e][t]=l}function c(e,t,n,r){return{baseCell:e.baseCell,action:t,virtualTable:{rowIndex:n,cellIndex:r}}}function u(e,t){if(!s[e])return t;if(!s[e][t])return t;for(var n=t;s[e][n];)if(n++,!s[e][n])return n}function d(e,t){var n=u(e.rowIndex,t.cellIndex),r=t.colSpan>1,i=t.rowSpan>1,s=e.rowIndex===o.rowPos&&t.cellIndex===o.colPos;l(e.rowIndex,n,e,t,i,r,!1);var a=t.attributes.rowSpan?parseInt(t.attributes.rowSpan.value,10):0;if(a>1)for(var c=1;c<a;c++){var d=e.rowIndex+c;h(d,n,t,s),l(d,n,e,t,!0,r,!0)}var p=t.attributes.colSpan?parseInt(t.attributes.colSpan.value,10):0;if(p>1)for(var f=1;f<p;f++){var m=u(e.rowIndex,n+f);h(e.rowIndex,m,t,s),l(e.rowIndex,m,e,t,i,!0,!0)}}function h(e,t,n,r){e===o.rowPos&&o.colPos>=n.cellIndex&&n.cellIndex<=t&&!r&&o.colPos++}function p(t){switch(n){case e.where.Column:if(t.isColSpan)return e.resultAction.SubtractSpanCount;break;case e.where.Row:if(!t.isVirtual&&t.isRowSpan)return e.resultAction.AddCell;if(t.isRowSpan)return e.resultAction.SubtractSpanCount}return e.resultAction.RemoveCell}function f(t){switch(n){case e.where.Column:if(t.isColSpan)return e.resultAction.SumSpanCount;if(t.isRowSpan&&t.isVirtual)return e.resultAction.Ignore;break;case e.where.Row:if(t.isRowSpan)return e.resultAction.SumSpanCount;if(t.isColSpan&&t.isVirtual)return e.resultAction.Ignore}return e.resultAction.AddCell}this.getActionList=function(){for(var t=n===e.where.Row?o.rowPos:-1,i=n===e.where.Column?o.colPos:-1,l=0,u=!0;u;){var d=t>=0?t:l,h=i>=0?i:l,m=s[d];if(!m)return u=!1,a;var g=m[h];if(!g)return u=!1,a;var v=e.resultAction.Ignore;switch(r){case e.requestAction.Add:v=f(g);break;case e.requestAction.Delete:v=p(g)}a.push(c(g,v,d,h)),l++}return a},t&&t.tagName&&("td"===t.tagName.toLowerCase()||"th"===t.tagName.toLowerCase())&&(o.colPos=t.cellIndex,t.parentElement&&t.parentElement.tagName&&"tr"===t.parentElement.tagName.toLowerCase()&&(o.rowPos=t.parentElement.rowIndex)),function(){for(var e=i.rows,t=0;t<e.length;t++)for(var n=e[t].cells,r=0;r<n.length;r++)d(e[t],n[r])}()};Xe.where={Row:0,Column:1},Xe.requestAction={Add:0,Delete:1},Xe.resultAction={Ignore:0,SubtractSpanCount:1,RemoveCell:2,AddCell:3,SumSpanCount:4};var Je=function(e,t,n){return t&&Ke(e.prototype,t),n&&Ke(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}),[{key:"tab",value:function(e,t){var n=fe.ancestor(e.commonAncestor(),fe.isCell),r=fe.ancestor(n,fe.isTable),i=fe.listDescendant(r,fe.isCell),o=x[t?"prev":"next"](i,n);o&&Me.create(o,0).select()}},{key:"addRow",value:function(e,t){for(var n=fe.ancestor(e.commonAncestor(),fe.isCell),r=o()(n).closest("tr"),i=this.recoverAttributes(r),s=o()("<tr"+i+"></tr>"),a=new Xe(n,Xe.where.Row,Xe.requestAction.Add,o()(r).closest("table")[0]).getActionList(),l=0;l<a.length;l++){var c=a[l],u=this.recoverAttributes(c.baseCell);switch(c.action){case Xe.resultAction.AddCell:s.append("<td"+u+">"+fe.blank+"</td>");break;case Xe.resultAction.SumSpanCount:if("top"===t&&(c.baseCell.parent?c.baseCell.closest("tr").rowIndex:0)<=r[0].rowIndex){var d=o()("<div></div>").append(o()("<td"+u+">"+fe.blank+"</td>").removeAttr("rowspan")).html();s.append(d);break}var h=parseInt(c.baseCell.rowSpan,10);h++,c.baseCell.setAttribute("rowSpan",h)}}if("top"===t)r.before(s);else{if(n.rowSpan>1){var p=r[0].rowIndex+(n.rowSpan-2);return void o()(o()(r).parent().find("tr")[p]).after(o()(s))}r.after(s)}}},{key:"addCol",value:function(e,t){var n=fe.ancestor(e.commonAncestor(),fe.isCell),r=o()(n).closest("tr");o()(r).siblings().push(r);for(var i=new Xe(n,Xe.where.Column,Xe.requestAction.Add,o()(r).closest("table")[0]).getActionList(),s=0;s<i.length;s++){var a=i[s],l=this.recoverAttributes(a.baseCell);switch(a.action){case Xe.resultAction.AddCell:"right"===t?o()(a.baseCell).after("<td"+l+">"+fe.blank+"</td>"):o()(a.baseCell).before("<td"+l+">"+fe.blank+"</td>");break;case Xe.resultAction.SumSpanCount:if("right"===t){var c=parseInt(a.baseCell.colSpan,10);c++,a.baseCell.setAttribute("colSpan",c)}else o()(a.baseCell).before("<td"+l+">"+fe.blank+"</td>")}}}},{key:"recoverAttributes",value:function(e){var t="";if(!e)return t;for(var n=e.attributes||[],r=0;r<n.length;r++)"id"!==n[r].name.toLowerCase()&&n[r].specified&&(t+=" "+n[r].name+"='"+n[r].value+"'");return t}},{key:"deleteRow",value:function(e){for(var t=fe.ancestor(e.commonAncestor(),fe.isCell),n=o()(t).closest("tr"),r=n.children("td, th").index(o()(t)),i=n[0].rowIndex,s=new Xe(t,Xe.where.Row,Xe.requestAction.Delete,o()(n).closest("table")[0]).getActionList(),a=0;a<s.length;a++)if(s[a]){var l=s[a].baseCell,c=s[a].virtualTable,u=l.rowSpan&&l.rowSpan>1,d=u?parseInt(l.rowSpan,10):0;switch(s[a].action){case Xe.resultAction.Ignore:continue;case Xe.resultAction.AddCell:var h=n.next("tr")[0];if(!h)continue;var p=n[0].cells[r];u&&(d>2?(d--,h.insertBefore(p,h.cells[r]),h.cells[r].setAttribute("rowSpan",d),h.cells[r].innerHTML=""):2===d&&(h.insertBefore(p,h.cells[r]),h.cells[r].removeAttribute("rowSpan"),h.cells[r].innerHTML=""));continue;case Xe.resultAction.SubtractSpanCount:u&&(d>2?(d--,l.setAttribute("rowSpan",d),c.rowIndex!==i&&l.cellIndex===r&&(l.innerHTML="")):2===d&&(l.removeAttribute("rowSpan"),c.rowIndex!==i&&l.cellIndex===r&&(l.innerHTML="")));continue;case Xe.resultAction.RemoveCell:continue}}n.remove()}},{key:"deleteCol",value:function(e){for(var t=fe.ancestor(e.commonAncestor(),fe.isCell),n=o()(t).closest("tr"),r=n.children("td, th").index(o()(t)),i=new Xe(t,Xe.where.Column,Xe.requestAction.Delete,o()(n).closest("table")[0]).getActionList(),s=0;s<i.length;s++)if(i[s])switch(i[s].action){case Xe.resultAction.Ignore:continue;case Xe.resultAction.SubtractSpanCount:var a=i[s].baseCell;if(a.colSpan&&a.colSpan>1){var l=a.colSpan?parseInt(a.colSpan,10):0;l>2?(l--,a.setAttribute("colSpan",l),a.cellIndex===r&&(a.innerHTML="")):2===l&&(a.removeAttribute("colSpan"),a.cellIndex===r&&(a.innerHTML=""))}continue;case Xe.resultAction.RemoveCell:fe.remove(i[s].baseCell,!0);continue}}},{key:"createTable",value:function(e,t,n){for(var r,i=[],s=0;s<e;s++)i.push("<td>"+fe.blank+"</td>");r=i.join("");for(var a,l=[],c=0;c<t;c++)l.push("<tr>"+r+"</tr>");a=l.join("");var u=o()("<table>"+a+"</table>");return n&&n.tableClassName&&u.addClass(n.tableClassName),u[0]}},{key:"deleteTable",value:function(e){var t=fe.ancestor(e.commonAncestor(),fe.isCell);o()(t).closest("table").remove()}}]);function Qe(e){return Qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qe(e)}function et(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tt(r.key),r)}}function tt(e){var t=function(e,t){if("object"!=Qe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Qe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Qe(t)?t:t+""}var nt=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,rt=/^(\+?\d{1,3}[\s-]?)?(\d{1,4})[\s-]?(\d{1,4})[\s-]?(\d{1,4})$/,it=/^([A-Za-z][A-Za-z0-9+-.]*\:|#|\/)/,ot=function(e,t,n){return t&&et(e.prototype,t),n&&et(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$note=t.layoutInfo.note,this.$editor=t.layoutInfo.editor,this.$editable=t.layoutInfo.editable,this.options=t.options,this.lang=this.options.langInfo,this.editable=this.$editable[0],this.lastRange=null,this.snapshot=null,this.style=new Ye,this.table=new Je,this.typing=new $e(t),this.bullet=new Ue,this.history=new Re(t),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);for(var r=["bold","italic","underline","strikethrough","superscript","subscript","justifyLeft","justifyCenter","justifyRight","justifyFull","formatBlock","removeFormat","backColor"],i=0,s=r.length;i<s;i++)this[r[i]]=function(e){return function(t){n.beforeCommand(),document.execCommand(e,!1,t),n.afterCommand(!0)}}(r[i]),this.context.memo("help."+r[i],this.lang.help[r[i]]);this.fontName=this.wrapCommand((function(e){return n.fontStyling("font-family",m.validFontName(e))})),this.fontSize=this.wrapCommand((function(e){var t=n.currentStyle()["font-size-unit"];return n.fontStyling("font-size",e+t)})),this.fontSizeUnit=this.wrapCommand((function(e){var t=n.currentStyle()["font-size"];return n.fontStyling("font-size",t+e)}));for(var a=1;a<=6;a++)this["formatH"+a]=function(e){return function(){n.formatBlock("H"+e)}}(a),this.context.memo("help.formatH"+a,this.lang.help["formatH"+a]);this.insertParagraph=this.wrapCommand((function(){n.typing.insertParagraph(n.editable)})),this.insertOrderedList=this.wrapCommand((function(){n.bullet.insertOrderedList(n.editable)})),this.insertUnorderedList=this.wrapCommand((function(){n.bullet.insertUnorderedList(n.editable)})),this.indent=this.wrapCommand((function(){n.bullet.indent(n.editable)})),this.outdent=this.wrapCommand((function(){n.bullet.outdent(n.editable)})),this.insertNode=this.wrapCommand((function(e){n.isLimited(o()(e).text().length)||(n.getLastRange().insertNode(e),n.setLastRange(Me.createFromNodeAfter(e).select()))})),this.insertText=this.wrapCommand((function(e){if(!n.isLimited(e.length)){var t=n.getLastRange().insertNode(fe.createText(e));n.setLastRange(Me.create(t,fe.nodeLength(t)).select())}})),this.pasteHTML=this.wrapCommand((function(e){if(!n.isLimited(e.length)){e=n.context.invoke("codeview.purify",e);var t=n.getLastRange().pasteHTML(e);n.setLastRange(Me.createFromNodeAfter(x.last(t)).select())}})),this.formatBlock=this.wrapCommand((function(e,t){var r=n.options.callbacks.onApplyCustomStyle;r?r.call(n,t,n.context,n.onFormatBlock):n.onFormatBlock(e,t)})),this.insertHorizontalRule=this.wrapCommand((function(){var e=n.getLastRange().insertNode(fe.create("HR"));e.nextSibling&&n.setLastRange(Me.create(e.nextSibling,0).normalize().select())})),this.lineHeight=this.wrapCommand((function(e){n.style.stylePara(n.getLastRange(),{lineHeight:e})})),this.createLink=this.wrapCommand((function(e){var t=[],r=e.url,i=e.text,s=e.isNewWindow,a=n.options.linkAddNoReferrer,l=n.options.linkAddNoOpener,c=e.range||n.getLastRange(),u=i.length-c.toString().length;if(!(u>0&&n.isLimited(u))){var d=c.toString()!==i;"string"==typeof r&&(r=r.trim()),r=n.options.onCreateLink?n.options.onCreateLink(r):n.checkLinkUrl(r);var h=[];if(d){var p=(c=c.deleteContents()).insertNode(o()("<A></A>").text(i)[0]);h.push(p)}else h=n.style.styleNodes(c,{nodeName:"A",expandClosestSibling:!0,onlyPartialContains:!0});o().each(h,(function(e,n){o()(n).attr("href",r),s?(o()(n).attr("target","_blank"),a&&t.push("noreferrer"),l&&t.push("noopener"),t.length&&o()(n).attr("rel",t.join(" "))):o()(n).removeAttr("target")})),n.setLastRange(n.createRangeFromList(h).select())}})),this.color=this.wrapCommand((function(e){var t=e.foreColor,n=e.backColor;t&&document.execCommand("foreColor",!1,t),n&&document.execCommand("backColor",!1,n)})),this.foreColor=this.wrapCommand((function(e){document.execCommand("foreColor",!1,e)})),this.insertTable=this.wrapCommand((function(e){var t=e.split("x");n.getLastRange().deleteContents().insertNode(n.table.createTable(t[0],t[1],n.options))})),this.removeMedia=this.wrapCommand((function(){var e=o()(n.restoreTarget()).parent();e.closest("figure").length?e.closest("figure").remove():e=o()(n.restoreTarget()).detach(),n.setLastRange(Me.createFromSelection(e).select()),n.context.triggerEvent("media.delete",e,n.$editable)})),this.floatMe=this.wrapCommand((function(e){var t=o()(n.restoreTarget());t.toggleClass("note-float-left","left"===e),t.toggleClass("note-float-right","right"===e),t.css("float","none"===e?"":e)})),this.resize=this.wrapCommand((function(e){var t=o()(n.restoreTarget());0===(e=parseFloat(e))?t.css("width",""):t.css({width:100*e+"%",height:""})}))}),[{key:"initialize",value:function(){var e=this;this.$editable.on("keydown",(function(t){if(t.keyCode===Ie.code.ENTER&&e.context.triggerEvent("enter",t),e.context.triggerEvent("keydown",t),e.snapshot=e.history.makeSnapshot(),e.hasKeyShortCut=!1,t.isDefaultPrevented()||(e.options.shortcuts?e.hasKeyShortCut=e.handleKeyMap(t):e.preventDefaultEditableShortCuts(t)),e.isLimited(1,t)){var n=e.getLastRange();if(n.eo-n.so==0)return!1}e.setLastRange(),e.options.recordEveryKeystroke&&!1===e.hasKeyShortCut&&e.history.recordUndo()})).on("keyup",(function(t){e.setLastRange(),e.context.triggerEvent("keyup",t)})).on("focus",(function(t){e.setLastRange(),e.context.triggerEvent("focus",t)})).on("blur",(function(t){e.context.triggerEvent("blur",t)})).on("mousedown",(function(t){e.context.triggerEvent("mousedown",t)})).on("mouseup",(function(t){e.setLastRange(),e.history.recordUndo(),e.context.triggerEvent("mouseup",t)})).on("scroll",(function(t){e.context.triggerEvent("scroll",t)})).on("paste",(function(t){e.setLastRange(),e.context.triggerEvent("paste",t)})).on("copy",(function(t){e.context.triggerEvent("copy",t)})).on("input",(function(){e.isLimited(0)&&e.snapshot&&e.history.applySnapshot(e.snapshot)})),this.$editable.attr("spellcheck",this.options.spellCheck),this.$editable.attr("autocorrect",this.options.spellCheck),this.options.disableGrammar&&this.$editable.attr("data-gramm",!1),this.$editable.html(fe.html(this.$note)||fe.emptyPara),this.$editable.on(m.inputEventName,v.debounce((function(){e.context.triggerEvent("change",e.$editable.html(),e.$editable)}),10)),this.$editable.on("focusin",(function(t){e.context.triggerEvent("focusin",t)})).on("focusout",(function(t){e.context.triggerEvent("focusout",t)})),this.options.airMode?this.options.overrideContextMenu&&this.$editor.on("contextmenu",(function(t){return e.context.triggerEvent("contextmenu",t),!1})):(this.options.width&&this.$editor.outerWidth(this.options.width),this.options.height&&this.$editable.outerHeight(this.options.height),this.options.maxHeight&&this.$editable.css("max-height",this.options.maxHeight),this.options.minHeight&&this.$editable.css("min-height",this.options.minHeight)),this.history.recordUndo(),this.setLastRange()}},{key:"destroy",value:function(){this.$editable.off()}},{key:"handleKeyMap",value:function(e){var t=this.options.keyMap[m.isMac?"mac":"pc"],n=[];e.metaKey&&n.push("CMD"),e.ctrlKey&&!e.altKey&&n.push("CTRL"),e.shiftKey&&n.push("SHIFT");var r=Ie.nameFromCode[e.keyCode];r&&n.push(r);var i=t[n.join("+")];if("TAB"!==r||this.options.tabDisable)if(i){if(!1!==this.context.invoke(i))return e.preventDefault(),!0}else Ie.isEdit(e.keyCode)&&(Ie.isRemove(e.keyCode)&&this.context.invoke("removed"),this.afterCommand());else this.afterCommand();return!1}},{key:"preventDefaultEditableShortCuts",value:function(e){(e.ctrlKey||e.metaKey)&&x.contains([66,73,85],e.keyCode)&&e.preventDefault()}},{key:"isLimited",value:function(e,t){return e=e||0,(void 0===t||!(Ie.isMove(t.keyCode)||Ie.isNavigation(t.keyCode)||t.ctrlKey||t.metaKey||x.contains([Ie.code.BACKSPACE,Ie.code.DELETE],t.keyCode)))&&this.options.maxTextLength>0&&this.$editable.text().length+e>this.options.maxTextLength}},{key:"checkLinkUrl",value:function(e){return nt.test(e)?"mailto://"+e:rt.test(e)?"tel://"+e:it.test(e)?e:"http://"+e}},{key:"createRange",value:function(){return this.focus(),this.setLastRange(),this.getLastRange()}},{key:"createRangeFromList",value:function(e){var t=Me.createFromNodeBefore(x.head(e)).getStartPoint(),n=Me.createFromNodeAfter(x.last(e)).getEndPoint();return Me.create(t.node,t.offset,n.node,n.offset)}},{key:"setLastRange",value:function(e){e?this.lastRange=e:(this.lastRange=Me.create(this.editable),0===o()(this.lastRange.sc).closest(".note-editable").length&&(this.lastRange=Me.createFromBodyElement(this.editable)))}},{key:"getLastRange",value:function(){return this.lastRange||this.setLastRange(),this.lastRange}},{key:"saveRange",value:function(e){e&&this.getLastRange().collapse().select()}},{key:"restoreRange",value:function(){this.lastRange&&(this.lastRange.select(),this.focus())}},{key:"saveTarget",value:function(e){this.$editable.data("target",e)}},{key:"clearTarget",value:function(){this.$editable.removeData("target")}},{key:"restoreTarget",value:function(){return this.$editable.data("target")}},{key:"currentStyle",value:function(){var e=Me.create();return e&&(e=e.normalize()),e?this.style.current(e):this.style.fromNode(this.$editable)}},{key:"styleFromNode",value:function(e){return this.style.fromNode(e)}},{key:"undo",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.undo(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"commit",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.commit(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"redo",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),this.history.redo(),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"beforeCommand",value:function(){this.context.triggerEvent("before.command",this.$editable.html()),document.execCommand("styleWithCSS",!1,this.options.styleWithCSS),this.focus()}},{key:"afterCommand",value:function(e){this.normalizeContent(),this.history.recordUndo(),e||this.context.triggerEvent("change",this.$editable.html(),this.$editable)}},{key:"tab",value:function(){var e=this.getLastRange();if(e.isCollapsed()&&e.isOnCell())this.table.tab(e);else{if(0===this.options.tabSize)return!1;this.isLimited(this.options.tabSize)||(this.beforeCommand(),this.typing.insertTab(e,this.options.tabSize),this.afterCommand())}}},{key:"untab",value:function(){var e=this.getLastRange();if(e.isCollapsed()&&e.isOnCell())this.table.tab(e,!0);else if(0===this.options.tabSize)return!1}},{key:"wrapCommand",value:function(e){return function(){this.beforeCommand(),e.apply(this,arguments),this.afterCommand()}}},{key:"removed",value:function(e,t,n){(e=Me.create()).isCollapsed()&&e.isOnCell()&&(n=(t=e.ec).tagName)&&1===t.childElementCount&&"BR"===t.childNodes[0].tagName&&("P"===n?t.remove():["TH","TD"].indexOf(n)>=0&&t.firstChild.remove())}},{key:"insertImage",value:function(e,t){var n,r=this;return(n=e,o().Deferred((function(e){var t=o()("<img>");t.one("load",(function(){t.off("error abort"),e.resolve(t)})).one("error abort",(function(){t.off("load").detach(),e.reject(t)})).css({display:"none"}).appendTo(document.body).attr("src",n)})).promise()).then((function(e){r.beforeCommand(),"function"==typeof t?t(e):("string"==typeof t&&e.attr("data-filename",t),e.css("width",Math.min(r.$editable.width(),e.width()))),e.show(),r.getLastRange().insertNode(e[0]),r.setLastRange(Me.createFromNodeAfter(e[0]).select()),r.afterCommand()})).fail((function(e){r.context.triggerEvent("image.upload.error",e)}))}},{key:"insertImagesAsDataURL",value:function(e){var t=this;o().each(e,(function(e,n){var r=n.name;t.options.maximumImageFileSize&&t.options.maximumImageFileSize<n.size?t.context.triggerEvent("image.upload.error",t.lang.image.maximumFileSizeError):function(e){return o().Deferred((function(t){o().extend(new FileReader,{onload:function(e){var n=e.target.result;t.resolve(n)},onerror:function(e){t.reject(e)}}).readAsDataURL(e)})).promise()}(n).then((function(e){return t.insertImage(e,r)})).fail((function(){t.context.triggerEvent("image.upload.error")}))}))}},{key:"insertImagesOrCallback",value:function(e){this.options.callbacks.onImageUpload?this.context.triggerEvent("image.upload",e):this.insertImagesAsDataURL(e)}},{key:"getSelectedText",value:function(){var e=this.getLastRange();return e.isOnAnchor()&&(e=Me.createFromNode(fe.ancestor(e.sc,fe.isAnchor))),e.toString()}},{key:"onFormatBlock",value:function(e,t){if(document.execCommand("FormatBlock",!1,m.isMSIE?"<"+e+">":e),t&&t.length&&(t[0].tagName.toUpperCase()!==e.toUpperCase()&&(t=t.find(e)),t&&t.length)){var n=this.createRange(),r=o()([n.sc,n.ec]).closest(e);r.removeClass();var i=t[0].className||"";i&&r.addClass(i)}}},{key:"formatPara",value:function(){this.formatBlock("P")}},{key:"fontStyling",value:function(e,t){var n=this.getLastRange();if(""!==n){var r=this.style.styleNodes(n);if(this.$editor.find(".note-status-output").html(""),o()(r).css(e,t),n.isCollapsed()){var i=x.head(r);i&&!fe.nodeLength(i)&&(i.innerHTML=fe.ZERO_WIDTH_NBSP_CHAR,Me.createFromNode(i.firstChild).select(),this.setLastRange(),this.$editable.data("bogus",i))}else n.select()}else{var s=o().now();this.$editor.find(".note-status-output").html('<div id="note-status-output-'+s+'" class="alert alert-info">'+this.lang.output.noSelection+"</div>"),setTimeout((function(){o()("#note-status-output-"+s).remove()}),5e3)}}},{key:"unlink",value:function(){var e=this.getLastRange();if(e.isOnAnchor()){var t=fe.ancestor(e.sc,fe.isAnchor);(e=Me.createFromNode(t)).select(),this.setLastRange(),this.beforeCommand(),document.execCommand("unlink"),this.afterCommand()}}},{key:"getLinkInfo",value:function(){this.hasFocus()||this.focus();var e=this.getLastRange().expand(fe.isAnchor),t=o()(x.head(e.nodes(fe.isAnchor))),n={range:e,text:e.toString(),url:t.length?t.attr("href"):""};return t.length&&(n.isNewWindow="_blank"===t.attr("target")),n}},{key:"addRow",value:function(e){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.addRow(t,e),this.afterCommand())}},{key:"addCol",value:function(e){var t=this.getLastRange(this.$editable);t.isCollapsed()&&t.isOnCell()&&(this.beforeCommand(),this.table.addCol(t,e),this.afterCommand())}},{key:"deleteRow",value:function(){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteRow(e),this.afterCommand())}},{key:"deleteCol",value:function(){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteCol(e),this.afterCommand())}},{key:"deleteTable",value:function(){var e=this.getLastRange(this.$editable);e.isCollapsed()&&e.isOnCell()&&(this.beforeCommand(),this.table.deleteTable(e),this.afterCommand())}},{key:"resizeTo",value:function(e,t,n){var r;if(n){var i=e.y/e.x,o=t.data("ratio");r={width:o>i?e.x:e.y/o,height:o>i?e.x*o:e.y}}else r={width:e.x,height:e.y};t.css(r)}},{key:"hasFocus",value:function(){return this.$editable.is(":focus")}},{key:"focus",value:function(){this.hasFocus()||this.$editable.trigger("focus")}},{key:"isEmpty",value:function(){return fe.isEmpty(this.$editable[0])||fe.emptyPara===this.$editable.html()}},{key:"empty",value:function(){this.context.invoke("code",fe.emptyPara)}},{key:"normalizeContent",value:function(){this.$editable[0].normalize()}}]);function st(e){return st="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},st(e)}function at(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lt(r.key),r)}}function lt(e){var t=function(e,t){if("object"!=st(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=st(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==st(t)?t:t+""}var ct=function(e,t,n){return t&&at(e.prototype,t),n&&at(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.options=t.options,this.$editable=t.layoutInfo.editable}),[{key:"initialize",value:function(){this.$editable.on("paste",this.pasteByEvent.bind(this))}},{key:"pasteByEvent",value:function(e){var t=this;if(!this.context.isDisabled()){var n=e.originalEvent.clipboardData;if(n&&n.items&&n.items.length){var r=n.files,i=n.getData("Text");r.length>0&&this.options.allowClipboardImagePasting&&(this.context.invoke("editor.insertImagesOrCallback",r),e.preventDefault()),i.length>0&&this.context.invoke("editor.isLimited",i.length)&&e.preventDefault()}else if(window.clipboardData){var o=window.clipboardData.getData("text");this.context.invoke("editor.isLimited",o.length)&&e.preventDefault()}setTimeout((function(){t.context.invoke("editor.afterCommand")}),10)}}}]);function ut(e){return ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ut(e)}function dt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ht(r.key),r)}}function ht(e){var t=function(e,t){if("object"!=ut(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ut(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ut(t)?t:t+""}var pt=function(e,t,n){return t&&dt(e.prototype,t),n&&dt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$eventListener=o()(document),this.$editor=t.layoutInfo.editor,this.$editable=t.layoutInfo.editable,this.options=t.options,this.lang=this.options.langInfo,this.documentEventHandlers={},this.$dropzone=o()(['<div class="note-dropzone">','<div class="note-dropzone-message"></div>',"</div>"].join("")).prependTo(this.$editor)}),[{key:"initialize",value:function(){this.options.disableDragAndDrop?(this.documentEventHandlers.onDrop=function(e){e.preventDefault()},this.$eventListener=this.$dropzone,this.$eventListener.on("drop",this.documentEventHandlers.onDrop)):this.attachDragAndDropEvent()}},{key:"attachDragAndDropEvent",value:function(){var e=this,t=o()(),n=this.$dropzone.find(".note-dropzone-message");this.documentEventHandlers.onDragenter=function(r){var i=e.context.invoke("codeview.isActivated"),o=e.$editor.width()>0&&e.$editor.height()>0;i||t.length||!o||(e.$editor.addClass("dragover"),e.$dropzone.width(e.$editor.width()),e.$dropzone.height(e.$editor.height()),n.text(e.lang.image.dragImageHere)),t=t.add(r.target)},this.documentEventHandlers.onDragleave=function(n){(t=t.not(n.target)).length&&"BODY"!==n.target.nodeName||(t=o()(),e.$editor.removeClass("dragover"))},this.documentEventHandlers.onDrop=function(){t=o()(),e.$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(){e.$dropzone.addClass("hover"),n.text(e.lang.image.dropImage)})).on("dragleave",(function(){e.$dropzone.removeClass("hover"),n.text(e.lang.image.dragImageHere)})),this.$dropzone.on("drop",(function(t){var n=t.originalEvent.dataTransfer;t.preventDefault(),n&&n.files&&n.files.length?(e.$editable.trigger("focus"),e.context.invoke("editor.insertImagesOrCallback",n.files)):o().each(n.types,(function(t,r){if(!(r.toLowerCase().indexOf("_moz_")>-1)){var i=n.getData(r);r.toLowerCase().indexOf("text")>-1?e.context.invoke("editor.pasteHTML",i):o()(i).each((function(t,n){e.context.invoke("editor.insertNode",n)}))}}))})).on("dragover",!1)}},{key:"destroy",value:function(){var e=this;Object.keys(this.documentEventHandlers).forEach((function(t){e.$eventListener.off(t.slice(2).toLowerCase(),e.documentEventHandlers[t])})),this.documentEventHandlers={}}}]);function ft(e){return ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ft(e)}function mt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return gt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}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,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function vt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yt(r.key),r)}}function yt(e){var t=function(e,t){if("object"!=ft(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ft(t)?t:t+""}var bt=function(e,t,n){return t&&vt(e.prototype,t),n&&vt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$editor=t.layoutInfo.editor,this.$editable=t.layoutInfo.editable,this.$codable=t.layoutInfo.codable,this.options=t.options,this.CodeMirrorConstructor=window.CodeMirror,this.options.codemirror.CodeMirrorConstructor&&(this.CodeMirrorConstructor=this.options.codemirror.CodeMirrorConstructor)}),[{key:"sync",value:function(e){var t=this.isActivated(),n=this.CodeMirrorConstructor;t&&(e?n?this.$codable.data("cmEditor").getDoc().setValue(e):this.$codable.val(e):n&&this.$codable.data("cmEditor").save())}},{key:"initialize",value:function(){var e=this;this.$codable.on("keyup",(function(t){t.keyCode===Ie.code.ESCAPE&&e.deactivate()}))}},{key:"isActivated",value:function(){return this.$editor.hasClass("codeview")}},{key:"toggle",value:function(){this.isActivated()?this.deactivate():this.activate(),this.context.triggerEvent("codeview.toggled")}},{key:"purify",value:function(e){if(this.options.codeviewFilter&&(e=e.replace(this.options.codeviewFilterRegex,""),this.options.codeviewIframeFilter)){var t=this.options.codeviewIframeWhitelistSrc.concat(this.options.codeviewIframeWhitelistSrcBase);e=e.replace(/(<iframe.*?>.*?(?:<\/iframe>)?)/gi,(function(e){if(/<.+src(?==?('|"|\s)?)[\s\S]+src(?=('|"|\s)?)[^>]*?>/i.test(e))return"";var n,r=mt(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(new RegExp('src="(https?:)?//'+i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+'/(.+)"').test(e))return e}}catch(e){r.e(e)}finally{r.f()}return""}))}return e}},{key:"activate",value:function(){var e=this,t=this.CodeMirrorConstructor;if(this.$codable.val(fe.html(this.$editable,this.options.prettifyHtml)),this.$codable.height(this.$editable.height()),this.context.invoke("toolbar.updateCodeview",!0),this.context.invoke("airPopover.updateCodeview",!0),this.$editor.addClass("codeview"),this.$codable.trigger("focus"),t){var n=t.fromTextArea(this.$codable[0],this.options.codemirror);if(this.options.codemirror.tern){var r=new t.TernServer(this.options.codemirror.tern);n.ternServer=r,n.on("cursorActivity",(function(e){r.updateArgHints(e)}))}n.on("blur",(function(t){e.context.triggerEvent("blur.codeview",n.getValue(),t)})),n.on("change",(function(){e.context.triggerEvent("change.codeview",n.getValue(),n)})),n.setSize(null,this.$editable.outerHeight()),this.$codable.data("cmEditor",n)}else this.$codable.on("blur",(function(t){e.context.triggerEvent("blur.codeview",e.$codable.val(),t)})),this.$codable.on("input",(function(){e.context.triggerEvent("change.codeview",e.$codable.val(),e.$codable)}))}},{key:"deactivate",value:function(){if(this.CodeMirrorConstructor){var e=this.$codable.data("cmEditor");this.$codable.val(e.getValue()),e.toTextArea()}var t=this.purify(fe.value(this.$codable,this.options.prettifyHtml)||fe.emptyPara),n=this.$editable.html()!==t;this.$editable.html(t),this.$editable.height(this.options.height?this.$codable.height():"auto"),this.$editor.removeClass("codeview"),n&&this.context.triggerEvent("change",this.$editable.html(),this.$editable),this.$editable.trigger("focus"),this.context.invoke("toolbar.updateCodeview",!1),this.context.invoke("airPopover.updateCodeview",!1)}},{key:"destroy",value:function(){this.isActivated()&&this.deactivate()}}]);function _t(e){return _t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_t(e)}function wt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xt(r.key),r)}}function xt(e){var t=function(e,t){if("object"!=_t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=_t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==_t(t)?t:t+""}var St=function(e,t,n){return t&&wt(e.prototype,t),n&&wt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$document=o()(document),this.$statusbar=t.layoutInfo.statusbar,this.$editable=t.layoutInfo.editable,this.$codable=t.layoutInfo.codable,this.options=t.options}),[{key:"initialize",value:function(){var e=this;this.options.airMode||this.options.disableResizeEditor?this.destroy():this.$statusbar.on("mousedown touchstart",(function(t){t.preventDefault(),t.stopPropagation();var n=e.$editable.offset().top-e.$document.scrollTop(),r=e.$codable.offset().top-e.$document.scrollTop(),i=function(t){var i="mousemove"==t.type?t:t.originalEvent.touches[0],o=i.clientY-(n+24),s=i.clientY-(r+24);o=e.options.minheight>0?Math.max(o,e.options.minheight):o,o=e.options.maxHeight>0?Math.min(o,e.options.maxHeight):o,s=e.options.minheight>0?Math.max(s,e.options.minheight):s,s=e.options.maxHeight>0?Math.min(s,e.options.maxHeight):s,e.$editable.height(o),e.$codable.height(s)};e.$document.on("mousemove touchmove",i).one("mouseup touchend",(function(){e.$document.off("mousemove touchmove",i)}))}))}},{key:"destroy",value:function(){this.$statusbar.off(),this.$statusbar.addClass("locked")}}]);function kt(e){return kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kt(e)}function Tt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Et(r.key),r)}}function Et(e){var t=function(e,t){if("object"!=kt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=kt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==kt(t)?t:t+""}var Ct=function(e,t,n){return t&&Tt(e.prototype,t),n&&Tt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$editor=t.layoutInfo.editor,this.$toolbar=t.layoutInfo.toolbar,this.$editable=t.layoutInfo.editable,this.$codable=t.layoutInfo.codable,this.$window=o()(window),this.$scrollbar=o()("html, body"),this.scrollbarClassName="note-fullscreen-body",this.onResize=function(){n.resizeTo({h:n.$window.height()-n.$toolbar.outerHeight()})}}),[{key:"resizeTo",value:function(e){this.$editable.css("height",e.h),this.$codable.css("height",e.h),this.$codable.data("cmeditor")&&this.$codable.data("cmeditor").setsize(null,e.h)}},{key:"toggle",value:function(){this.$editor.toggleClass("fullscreen");var e=this.isFullscreen();this.$scrollbar.toggleClass(this.scrollbarClassName,e),e?(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")):(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",e)}},{key:"isFullscreen",value:function(){return this.$editor.hasClass("fullscreen")}},{key:"destroy",value:function(){this.$scrollbar.removeClass(this.scrollbarClassName)}}]);function Dt(e){return Dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dt(e)}function Mt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,At(r.key),r)}}function At(e){var t=function(e,t){if("object"!=Dt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Dt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Dt(t)?t:t+""}var It=function(e,t,n){return t&&Mt(e.prototype,t),n&&Mt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$document=o()(document),this.$editingArea=t.layoutInfo.editingArea,this.options=t.options,this.lang=this.options.langInfo,this.events={"summernote.mousedown":function(e,t){n.update(t.target,t)&&t.preventDefault()},"summernote.keyup summernote.scroll summernote.change summernote.dialog.shown":function(){n.update()},"summernote.disable summernote.blur":function(){n.hide()},"summernote.codeview.toggled":function(){n.update()}}}),[{key:"initialize",value:function(){var e=this;this.$handle=o()(['<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(t){if(fe.isControlSizing(t.target)){t.preventDefault(),t.stopPropagation();var n=e.$handle.find(".note-control-selection").data("target"),r=n.offset(),i=e.$document.scrollTop(),o=function(t){e.context.invoke("editor.resizeTo",{x:t.clientX-r.left,y:t.clientY-(r.top-i)},n,!t.shiftKey),e.update(n[0],t)};e.$document.on("mousemove",o).one("mouseup",(function(t){t.preventDefault(),e.$document.off("mousemove",o),e.context.invoke("editor.afterCommand")})),n.data("ratio")||n.data("ratio",n.height()/n.width())}})),this.$handle.on("wheel",(function(t){t.preventDefault(),e.update()}))}},{key:"destroy",value:function(){this.$handle.remove()}},{key:"update",value:function(e,t){if(this.context.isDisabled())return!1;var n=fe.isImg(e),r=this.$handle.find(".note-control-selection");if(this.context.invoke("imagePopover.update",e,t),n){var i=o()(e),s=this.$editingArea[0].getBoundingClientRect(),a=e.getBoundingClientRect();r.css({display:"block",left:a.left-s.left,top:a.top-s.top,width:a.width,height:a.height}).data("target",i);var l=new Image;l.src=i.attr("src");var c=a.width+"x"+a.height+" ("+this.lang.image.original+": "+l.width+"x"+l.height+")";r.find(".note-control-selection-info").text(c),this.context.invoke("editor.saveTarget",e)}else this.hide();return n}},{key:"hide",value:function(){this.context.invoke("editor.clearTarget"),this.$handle.children().hide()}}]);function Lt(e){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lt(e)}function Ot(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Nt(r.key),r)}}function Nt(e){var t=function(e,t){if("object"!=Lt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Lt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Lt(t)?t:t+""}var Rt=/^([A-Za-z][A-Za-z0-9+-.]*\:[\/]{2}|tel:|mailto:[A-Z0-9._%+-]+@|xmpp:[A-Z0-9._%+-]+@)?(www\.)?(.+)$/i,Pt=function(e,t,n){return t&&Ot(e.prototype,t),n&&Ot(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.options=t.options,this.$editable=t.layoutInfo.editable,this.events={"summernote.keyup":function(e,t){t.isDefaultPrevented()||n.handleKeyup(t)},"summernote.keydown":function(e,t){n.handleKeydown(t)}}}),[{key:"initialize",value:function(){this.lastWordRange=null}},{key:"destroy",value:function(){this.lastWordRange=null}},{key:"replace",value:function(){if(this.lastWordRange){var e=this.lastWordRange.toString(),t=e.match(Rt);if(t&&(t[1]||t[2])){var n=t[1]?e:"http://"+e,r=this.options.showDomainOnlyForAutolink?e.replace(/^(?:https?:\/\/)?(?:tel?:?)?(?:mailto?:?)?(?:xmpp?:?)?(?:www\.)?/i,"").split("/")[0]:e,i=o()("<a></a>").html(r).attr("href",n)[0];this.context.options.linkTargetBlank&&o()(i).attr("target","_blank"),this.lastWordRange.insertNode(i),this.lastWordRange=null,this.context.invoke("editor.focus"),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}}}},{key:"handleKeydown",value:function(e){if(x.contains([Ie.code.ENTER,Ie.code.SPACE],e.keyCode)){var t=this.context.invoke("editor.createRange").getWordRange();this.lastWordRange=t}}},{key:"handleKeyup",value:function(e){(Ie.code.SPACE===e.keyCode||Ie.code.ENTER===e.keyCode&&!e.shiftKey)&&this.replace()}}]);function Ft(e){return Ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ft(e)}function jt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Yt(r.key),r)}}function Yt(e){var t=function(e,t){if("object"!=Ft(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ft(t)?t:t+""}var Vt=function(e,t,n){return t&&jt(e.prototype,t),n&&jt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$note=t.layoutInfo.note,this.events={"summernote.change":function(){n.$note.val(t.invoke("code"))}}}),[{key:"shouldInitialize",value:function(){return fe.isTextarea(this.$note[0])}}]);function Ht(e){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ht(e)}function Bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ut(r.key),r)}}function Ut(e){var t=function(e,t){if("object"!=Ht(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ht(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ht(t)?t:t+""}var zt=function(e,t,n){return t&&Bt(e.prototype,t),n&&Bt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.options=t.options.replace||{},this.keys=[Ie.code.ENTER,Ie.code.SPACE,Ie.code.PERIOD,Ie.code.COMMA,Ie.code.SEMICOLON,Ie.code.SLASH],this.previousKeydownCode=null,this.events={"summernote.keyup":function(e,t){t.isDefaultPrevented()||n.handleKeyup(t)},"summernote.keydown":function(e,t){n.handleKeydown(t)}}}),[{key:"shouldInitialize",value:function(){return!!this.options.match}},{key:"initialize",value:function(){this.lastWord=null}},{key:"destroy",value:function(){this.lastWord=null}},{key:"replace",value:function(){if(this.lastWord){var e=this,t=this.lastWord.toString();this.options.match(t,(function(t){if(t){var n="";if("string"==typeof t?n=fe.createText(t):t instanceof jQuery?n=t[0]:t instanceof Node&&(n=t),!n)return;e.lastWord.insertNode(n),e.lastWord=null,e.context.invoke("editor.focus")}}))}}},{key:"handleKeydown",value:function(e){if(this.previousKeydownCode&&x.contains(this.keys,this.previousKeydownCode))this.previousKeydownCode=e.keyCode;else{if(x.contains(this.keys,e.keyCode)){var t=this.context.invoke("editor.createRange").getWordRange();this.lastWord=t}this.previousKeydownCode=e.keyCode}}},{key:"handleKeyup",value:function(e){x.contains(this.keys,e.keyCode)&&this.replace()}}]);function qt(e){return qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qt(e)}function Wt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$t(r.key),r)}}function $t(e){var t=function(e,t){if("object"!=qt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=qt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==qt(t)?t:t+""}var Gt=function(e,t,n){return t&&Wt(e.prototype,t),n&&Wt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$editingArea=t.layoutInfo.editingArea,this.options=t.options,!0===this.options.inheritPlaceholder&&(this.options.placeholder=this.context.$note.attr("placeholder")||this.options.placeholder),this.events={"summernote.init summernote.change":function(){n.update()},"summernote.codeview.toggled":function(){n.update()}}}),[{key:"shouldInitialize",value:function(){return!!this.options.placeholder}},{key:"initialize",value:function(){var e=this;this.$placeholder=o()('<div class="note-placeholder"></div>'),this.$placeholder.on("click",(function(){e.context.invoke("focus")})).html(this.options.placeholder).prependTo(this.$editingArea),this.update()}},{key:"destroy",value:function(){this.$placeholder.remove()}},{key:"update",value:function(){var e=!this.context.invoke("codeview.isActivated")&&this.context.invoke("editor.isEmpty");this.$placeholder.toggle(e)}}]);function Kt(e){return Kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kt(e)}function Zt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xt(r.key),r)}}function Xt(e){var t=function(e,t){if("object"!=Kt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Kt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Kt(t)?t:t+""}var Jt=function(e,t,n){return t&&Zt(e.prototype,t),n&&Zt(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.ui=o().summernote.ui,this.context=t,this.$toolbar=t.layoutInfo.toolbar,this.options=t.options,this.lang=this.options.langInfo,this.invertedKeyMap=v.invertObject(this.options.keyMap[m.isMac?"mac":"pc"])}),[{key:"representShortcut",value:function(e){var t=this.invertedKeyMap[e];return this.options.shortcuts&&t?(m.isMac&&(t=t.replace("CMD","\u2318").replace("SHIFT","\u21e7"))," ("+(t=t.replace("BACKSLASH","\\").replace("SLASH","/").replace("LEFTBRACKET","[").replace("RIGHTBRACKET","]"))+")"):""}},{key:"button",value:function(e){return!this.options.tooltip&&e.tooltip&&delete e.tooltip,e.container=this.options.container,this.ui.button(e)}},{key:"initialize",value:function(){this.addToolbarButtons(),this.addImagePopoverButtons(),this.addLinkPopoverButtons(),this.addTablePopoverButtons(),this.fontInstalledMap={}}},{key:"destroy",value:function(){delete this.fontInstalledMap}},{key:"isFontInstalled",value:function(e){return Object.prototype.hasOwnProperty.call(this.fontInstalledMap,e)||(this.fontInstalledMap[e]=m.isFontInstalled(e)||x.contains(this.options.fontNamesIgnoreCheck,e)),this.fontInstalledMap[e]}},{key:"isFontDeservedToAdd",value:function(e){return""!==(e=e.toLowerCase())&&this.isFontInstalled(e)&&-1===m.genericFontFamilies.indexOf(e)}},{key:"colorPalette",value:function(e,t,n,r){var i=this;return this.ui.buttonGroup({className:"note-color "+e,children:[this.button({className:"note-current-color-button",contents:this.ui.icon(this.options.icons.font+" note-recent-color"),tooltip:t,click:function(e){var t=o()(e.currentTarget);n&&r?i.context.invoke("editor.color",{backColor:t.attr("data-backColor"),foreColor:t.attr("data-foreColor")}):n?i.context.invoke("editor.color",{backColor:t.attr("data-backColor")}):r&&i.context.invoke("editor.color",{foreColor:t.attr("data-foreColor")})},callback:function(e){var t=e.find(".note-recent-color");n&&(t.css("background-color",i.options.colorButton.backColor),e.attr("data-backColor",i.options.colorButton.backColor)),r?(t.css("color",i.options.colorButton.foreColor),e.attr("data-foreColor",i.options.colorButton.foreColor)):t.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:(n?['<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(""):"")+(r?['<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(e){e.find(".note-holder").each((function(e,t){var n=o()(t);n.append(i.ui.palette({colors:i.options.colors,colorsName:i.options.colorsName,eventName:n.data("event"),container:i.options.container,tooltip:i.options.tooltip}).render())}));var t=[["#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF"]];e.find(".note-holder-custom").each((function(e,n){var r=o()(n);r.append(i.ui.palette({colors:t,colorsName:t,eventName:r.data("event"),container:i.options.container,tooltip:i.options.tooltip}).render())})),e.find("input[type=color]").each((function(t,n){o()(n).on("change",(function(){var t=e.find("#"+o()(this).data("event")).find(".note-color-btn").first(),n=this.value.toUpperCase();t.css("background-color",n).attr("aria-label",n).attr("data-value",n).attr("data-original-title",n),t.trigger("click")}))}))},click:function(t){t.stopPropagation();var n=o()("."+e).find(".note-dropdown-menu"),r=o()(t.target),s=r.data("event"),a=r.attr("data-value");if("openPalette"===s){var l=n.find("#"+a),c=o()(n.find("#"+l.data("event")).find(".note-color-row")[0]),u=c.find(".note-color-btn").last().detach(),d=l.val();u.css("background-color",d).attr("aria-label",d).attr("data-value",d).attr("data-original-title",d),c.prepend(u),l.trigger("click")}else{if(x.contains(["backColor","foreColor"],s)){var h="backColor"===s?"background-color":"color",p=r.closest(".note-color").find(".note-recent-color"),f=r.closest(".note-color").find(".note-current-color-button");p.css(h,a),f.attr("data-"+s,a)}i.context.invoke("editor."+s,a)}}})]}).render()}},{key:"addToolbarButtons",value:function(){var e=this;this.context.memo("button.style",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.magic),e.options),tooltip:e.lang.style.style,data:{toggle:"dropdown"}}),e.ui.dropdown({className:"dropdown-style",items:e.options.styleTags,title:e.lang.style.style,template:function(t){"string"==typeof t&&(t={tag:t,title:Object.prototype.hasOwnProperty.call(e.lang.style,t)?e.lang.style[t]:t});var n=t.tag,r=t.title;return"<"+n+(t.style?' style="'+t.style+'" ':"")+(t.className?' class="'+t.className+'"':"")+">"+r+"</"+n+">"},click:e.context.createInvokeHandler("editor.formatBlock")})]).render()}));for(var t=function(){var t=e.options.styleTags[n];e.context.memo("button.style."+t,(function(){return e.button({className:"note-btn-style-"+t,contents:'<div data-value="'+t+'">'+t.toUpperCase()+"</div>",tooltip:e.lang.style[t],click:e.context.createInvokeHandler("editor.formatBlock")}).render()}))},n=0,r=this.options.styleTags.length;n<r;n++)t();this.context.memo("button.bold",(function(){return e.button({className:"note-btn-bold",contents:e.ui.icon(e.options.icons.bold),tooltip:e.lang.font.bold+e.representShortcut("bold"),click:e.context.createInvokeHandlerAndUpdateState("editor.bold")}).render()})),this.context.memo("button.italic",(function(){return e.button({className:"note-btn-italic",contents:e.ui.icon(e.options.icons.italic),tooltip:e.lang.font.italic+e.representShortcut("italic"),click:e.context.createInvokeHandlerAndUpdateState("editor.italic")}).render()})),this.context.memo("button.underline",(function(){return e.button({className:"note-btn-underline",contents:e.ui.icon(e.options.icons.underline),tooltip:e.lang.font.underline+e.representShortcut("underline"),click:e.context.createInvokeHandlerAndUpdateState("editor.underline")}).render()})),this.context.memo("button.clear",(function(){return e.button({contents:e.ui.icon(e.options.icons.eraser),tooltip:e.lang.font.clear+e.representShortcut("removeFormat"),click:e.context.createInvokeHandler("editor.removeFormat")}).render()})),this.context.memo("button.strikethrough",(function(){return e.button({className:"note-btn-strikethrough",contents:e.ui.icon(e.options.icons.strikethrough),tooltip:e.lang.font.strikethrough+e.representShortcut("strikethrough"),click:e.context.createInvokeHandlerAndUpdateState("editor.strikethrough")}).render()})),this.context.memo("button.superscript",(function(){return e.button({className:"note-btn-superscript",contents:e.ui.icon(e.options.icons.superscript),tooltip:e.lang.font.superscript,click:e.context.createInvokeHandlerAndUpdateState("editor.superscript")}).render()})),this.context.memo("button.subscript",(function(){return e.button({className:"note-btn-subscript",contents:e.ui.icon(e.options.icons.subscript),tooltip:e.lang.font.subscript,click:e.context.createInvokeHandlerAndUpdateState("editor.subscript")}).render()})),this.context.memo("button.fontname",(function(){var t=e.context.invoke("editor.currentStyle");return e.options.addDefaultFonts&&o().each(t["font-family"].split(","),(function(t,n){n=n.trim().replace(/['"]+/g,""),e.isFontDeservedToAdd(n)&&-1===e.options.fontNames.indexOf(n)&&e.options.fontNames.push(n)})),e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents('<span class="note-current-fontname"></span>',e.options),tooltip:e.lang.font.name,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({className:"dropdown-fontname",checkClassName:e.options.icons.menuCheck,items:e.options.fontNames.filter(e.isFontInstalled.bind(e)),title:e.lang.font.name,template:function(e){return'<span style="font-family: '+m.validFontName(e)+'">'+e+"</span>"},click:e.context.createInvokeHandlerAndUpdateState("editor.fontName")})]).render()})),this.context.memo("button.fontsize",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents('<span class="note-current-fontsize"></span>',e.options),tooltip:e.lang.font.size,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({className:"dropdown-fontsize",checkClassName:e.options.icons.menuCheck,items:e.options.fontSizes,title:e.lang.font.size,click:e.context.createInvokeHandlerAndUpdateState("editor.fontSize")})]).render()})),this.context.memo("button.fontsizeunit",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents('<span class="note-current-fontsizeunit"></span>',e.options),tooltip:e.lang.font.sizeunit,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({className:"dropdown-fontsizeunit",checkClassName:e.options.icons.menuCheck,items:e.options.fontSizeUnits,title:e.lang.font.sizeunit,click:e.context.createInvokeHandlerAndUpdateState("editor.fontSizeUnit")})]).render()})),this.context.memo("button.color",(function(){return e.colorPalette("note-color-all",e.lang.color.recent,!0,!0)})),this.context.memo("button.forecolor",(function(){return e.colorPalette("note-color-fore",e.lang.color.foreground,!1,!0)})),this.context.memo("button.backcolor",(function(){return e.colorPalette("note-color-back",e.lang.color.background,!0,!1)})),this.context.memo("button.ul",(function(){return e.button({contents:e.ui.icon(e.options.icons.unorderedlist),tooltip:e.lang.lists.unordered+e.representShortcut("insertUnorderedList"),click:e.context.createInvokeHandler("editor.insertUnorderedList")}).render()})),this.context.memo("button.ol",(function(){return e.button({contents:e.ui.icon(e.options.icons.orderedlist),tooltip:e.lang.lists.ordered+e.representShortcut("insertOrderedList"),click:e.context.createInvokeHandler("editor.insertOrderedList")}).render()}));var i=this.button({contents:this.ui.icon(this.options.icons.alignLeft),tooltip:this.lang.paragraph.left+this.representShortcut("justifyLeft"),click:this.context.createInvokeHandler("editor.justifyLeft")}),s=this.button({contents:this.ui.icon(this.options.icons.alignCenter),tooltip:this.lang.paragraph.center+this.representShortcut("justifyCenter"),click:this.context.createInvokeHandler("editor.justifyCenter")}),a=this.button({contents:this.ui.icon(this.options.icons.alignRight),tooltip:this.lang.paragraph.right+this.representShortcut("justifyRight"),click:this.context.createInvokeHandler("editor.justifyRight")}),l=this.button({contents:this.ui.icon(this.options.icons.alignJustify),tooltip:this.lang.paragraph.justify+this.representShortcut("justifyFull"),click:this.context.createInvokeHandler("editor.justifyFull")}),c=this.button({contents:this.ui.icon(this.options.icons.outdent),tooltip:this.lang.paragraph.outdent+this.representShortcut("outdent"),click:this.context.createInvokeHandler("editor.outdent")}),u=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",v.invoke(i,"render")),this.context.memo("button.justifyCenter",v.invoke(s,"render")),this.context.memo("button.justifyRight",v.invoke(a,"render")),this.context.memo("button.justifyFull",v.invoke(l,"render")),this.context.memo("button.outdent",v.invoke(c,"render")),this.context.memo("button.indent",v.invoke(u,"render")),this.context.memo("button.paragraph",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.alignLeft),e.options),tooltip:e.lang.paragraph.paragraph,data:{toggle:"dropdown"}}),e.ui.dropdown([e.ui.buttonGroup({className:"note-align",children:[i,s,a,l]}),e.ui.buttonGroup({className:"note-list",children:[c,u]})])]).render()})),this.context.memo("button.height",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.textHeight),e.options),tooltip:e.lang.font.height,data:{toggle:"dropdown"}}),e.ui.dropdownCheck({items:e.options.lineHeights,checkClassName:e.options.icons.menuCheck,className:"dropdown-line-height",title:e.lang.font.height,click:e.context.createInvokeHandler("editor.lineHeight")})]).render()})),this.context.memo("button.table",(function(){return e.ui.buttonGroup([e.button({className:"dropdown-toggle",contents:e.ui.dropdownButtonContents(e.ui.icon(e.options.icons.table),e.options),tooltip:e.lang.table.table,data:{toggle:"dropdown"}}),e.ui.dropdown({title:e.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(t){t.find(".note-dimension-picker-mousecatcher").css({width:e.options.insertTableMaxSize.col+"em",height:e.options.insertTableMaxSize.row+"em"}).on("mousedown",e.context.createInvokeHandler("editor.insertTable")).on("mousemove",e.tableMoveHandler.bind(e))}}).render()})),this.context.memo("button.link",(function(){return e.button({contents:e.ui.icon(e.options.icons.link),tooltip:e.lang.link.link+e.representShortcut("linkDialog.show"),click:e.context.createInvokeHandler("linkDialog.show")}).render()})),this.context.memo("button.picture",(function(){return e.button({contents:e.ui.icon(e.options.icons.picture),tooltip:e.lang.image.image,click:e.context.createInvokeHandler("imageDialog.show")}).render()})),this.context.memo("button.video",(function(){return e.button({contents:e.ui.icon(e.options.icons.video),tooltip:e.lang.video.video,click:e.context.createInvokeHandler("videoDialog.show")}).render()})),this.context.memo("button.hr",(function(){return e.button({contents:e.ui.icon(e.options.icons.minus),tooltip:e.lang.hr.insert+e.representShortcut("insertHorizontalRule"),click:e.context.createInvokeHandler("editor.insertHorizontalRule")}).render()})),this.context.memo("button.fullscreen",(function(){return e.button({className:"btn-fullscreen note-codeview-keep",contents:e.ui.icon(e.options.icons.arrowsAlt),tooltip:e.lang.options.fullscreen,click:e.context.createInvokeHandler("fullscreen.toggle")}).render()})),this.context.memo("button.codeview",(function(){return e.button({className:"btn-codeview note-codeview-keep",contents:e.ui.icon(e.options.icons.code),tooltip:e.lang.options.codeview,click:e.context.createInvokeHandler("codeview.toggle")}).render()})),this.context.memo("button.redo",(function(){return e.button({contents:e.ui.icon(e.options.icons.redo),tooltip:e.lang.history.redo+e.representShortcut("redo"),click:e.context.createInvokeHandler("editor.redo")}).render()})),this.context.memo("button.undo",(function(){return e.button({contents:e.ui.icon(e.options.icons.undo),tooltip:e.lang.history.undo+e.representShortcut("undo"),click:e.context.createInvokeHandler("editor.undo")}).render()})),this.context.memo("button.help",(function(){return e.button({contents:e.ui.icon(e.options.icons.question),tooltip:e.lang.options.help,click:e.context.createInvokeHandler("helpDialog.show")}).render()}))}},{key:"addImagePopoverButtons",value:function(){var e=this;this.context.memo("button.resizeFull",(function(){return e.button({contents:'<span class="note-fontsize-10">100%</span>',tooltip:e.lang.image.resizeFull,click:e.context.createInvokeHandler("editor.resize","1")}).render()})),this.context.memo("button.resizeHalf",(function(){return e.button({contents:'<span class="note-fontsize-10">50%</span>',tooltip:e.lang.image.resizeHalf,click:e.context.createInvokeHandler("editor.resize","0.5")}).render()})),this.context.memo("button.resizeQuarter",(function(){return e.button({contents:'<span class="note-fontsize-10">25%</span>',tooltip:e.lang.image.resizeQuarter,click:e.context.createInvokeHandler("editor.resize","0.25")}).render()})),this.context.memo("button.resizeNone",(function(){return e.button({contents:e.ui.icon(e.options.icons.rollback),tooltip:e.lang.image.resizeNone,click:e.context.createInvokeHandler("editor.resize","0")}).render()})),this.context.memo("button.floatLeft",(function(){return e.button({contents:e.ui.icon(e.options.icons.floatLeft),tooltip:e.lang.image.floatLeft,click:e.context.createInvokeHandler("editor.floatMe","left")}).render()})),this.context.memo("button.floatRight",(function(){return e.button({contents:e.ui.icon(e.options.icons.floatRight),tooltip:e.lang.image.floatRight,click:e.context.createInvokeHandler("editor.floatMe","right")}).render()})),this.context.memo("button.floatNone",(function(){return e.button({contents:e.ui.icon(e.options.icons.rollback),tooltip:e.lang.image.floatNone,click:e.context.createInvokeHandler("editor.floatMe","none")}).render()})),this.context.memo("button.removeMedia",(function(){return e.button({contents:e.ui.icon(e.options.icons.trash),tooltip:e.lang.image.remove,click:e.context.createInvokeHandler("editor.removeMedia")}).render()}))}},{key:"addLinkPopoverButtons",value:function(){var e=this;this.context.memo("button.linkDialogShow",(function(){return e.button({contents:e.ui.icon(e.options.icons.link),tooltip:e.lang.link.edit,click:e.context.createInvokeHandler("linkDialog.show")}).render()})),this.context.memo("button.unlink",(function(){return e.button({contents:e.ui.icon(e.options.icons.unlink),tooltip:e.lang.link.unlink,click:e.context.createInvokeHandler("editor.unlink")}).render()}))}},{key:"addTablePopoverButtons",value:function(){var e=this;this.context.memo("button.addRowUp",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowAbove),tooltip:e.lang.table.addRowAbove,click:e.context.createInvokeHandler("editor.addRow","top")}).render()})),this.context.memo("button.addRowDown",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowBelow),tooltip:e.lang.table.addRowBelow,click:e.context.createInvokeHandler("editor.addRow","bottom")}).render()})),this.context.memo("button.addColLeft",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colBefore),tooltip:e.lang.table.addColLeft,click:e.context.createInvokeHandler("editor.addCol","left")}).render()})),this.context.memo("button.addColRight",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colAfter),tooltip:e.lang.table.addColRight,click:e.context.createInvokeHandler("editor.addCol","right")}).render()})),this.context.memo("button.deleteRow",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.rowRemove),tooltip:e.lang.table.delRow,click:e.context.createInvokeHandler("editor.deleteRow")}).render()})),this.context.memo("button.deleteCol",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.colRemove),tooltip:e.lang.table.delCol,click:e.context.createInvokeHandler("editor.deleteCol")}).render()})),this.context.memo("button.deleteTable",(function(){return e.button({className:"btn-md",contents:e.ui.icon(e.options.icons.trash),tooltip:e.lang.table.delTable,click:e.context.createInvokeHandler("editor.deleteTable")}).render()}))}},{key:"build",value:function(e,t){for(var n=0,r=t.length;n<r;n++){for(var i=t[n],o=Array.isArray(i)?i[0]:i,s=Array.isArray(i)?1===i.length?[i[0]]:i[1]:[i],a=this.ui.buttonGroup({className:"note-"+o}).render(),l=0,c=s.length;l<c;l++){var u=this.context.memo("button."+s[l]);u&&a.append("function"==typeof u?u(this.context):u)}a.appendTo(e)}}},{key:"updateCurrentStyle",value:function(e){var t=e||this.$toolbar,n=this.context.invoke("editor.currentStyle");if(this.updateBtnStates(t,{".note-btn-bold":function(){return"bold"===n["font-bold"]},".note-btn-italic":function(){return"italic"===n["font-italic"]},".note-btn-underline":function(){return"underline"===n["font-underline"]},".note-btn-subscript":function(){return"subscript"===n["font-subscript"]},".note-btn-superscript":function(){return"superscript"===n["font-superscript"]},".note-btn-strikethrough":function(){return"strikethrough"===n["font-strikethrough"]}}),n["font-family"]){var r=n["font-family"].split(",").map((function(e){return e.replace(/[\'\"]/g,"").replace(/\s+$/,"").replace(/^\s+/,"")})),i=x.find(r,this.isFontInstalled.bind(this));t.find(".dropdown-fontname a").each((function(e,t){var n=o()(t),r=n.data("value")+""==i+"";n.toggleClass("checked",r)})),t.find(".note-current-fontname").text(i).css("font-family",i)}if(n["font-size"]){var s=n["font-size"];t.find(".dropdown-fontsize a").each((function(e,t){var n=o()(t),r=n.data("value")+""==s+"";n.toggleClass("checked",r)})),t.find(".note-current-fontsize").text(s);var a=n["font-size-unit"];t.find(".dropdown-fontsizeunit a").each((function(e,t){var n=o()(t),r=n.data("value")+""==a+"";n.toggleClass("checked",r)})),t.find(".note-current-fontsizeunit").text(a)}if(n["line-height"]){var l=n["line-height"];t.find(".dropdown-line-height a").each((function(e,t){var n=o()(t),r=o()(t).data("value")+""==l+"";n.toggleClass("checked",r)})),t.find(".note-current-line-height").text(l)}}},{key:"updateBtnStates",value:function(e,t){var n=this;o().each(t,(function(t,r){n.ui.toggleBtnActive(e.find(t),r())}))}},{key:"tableMoveHandler",value:function(e){var t,n=o()(e.target.parentNode),r=n.next(),i=n.find(".note-dimension-picker-mousecatcher"),s=n.find(".note-dimension-picker-highlighted"),a=n.find(".note-dimension-picker-unhighlighted");if(void 0===e.offsetX){var l=o()(e.target).offset();t={x:e.pageX-l.left,y:e.pageY-l.top}}else t={x:e.offsetX,y:e.offsetY};var c=Math.ceil(t.x/18)||1,u=Math.ceil(t.y/18)||1;s.css({width:c+"em",height:u+"em"}),i.data("value",c+"x"+u),c>3&&c<this.options.insertTableMaxSize.col&&a.css({width:c+1+"em"}),u>3&&u<this.options.insertTableMaxSize.row&&a.css({height:u+1+"em"}),r.html(c+" x "+u)}}]);function Qt(e){return Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qt(e)}function en(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tn(r.key),r)}}function tn(e){var t=function(e,t){if("object"!=Qt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Qt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Qt(t)?t:t+""}var nn=function(e,t,n){return t&&en(e.prototype,t),n&&en(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.$window=o()(window),this.$document=o()(document),this.ui=o().summernote.ui,this.$note=t.layoutInfo.note,this.$editor=t.layoutInfo.editor,this.$toolbar=t.layoutInfo.toolbar,this.$editable=t.layoutInfo.editable,this.$statusbar=t.layoutInfo.statusbar,this.options=t.options,this.isFollowing=!1,this.followScroll=this.followScroll.bind(this)}),[{key:"shouldInitialize",value:function(){return!this.options.airMode}},{key:"initialize",value:function(){var e=this;this.options.toolbar=this.options.toolbar||[],this.options.toolbar.length?this.context.invoke("buttons.build",this.$toolbar,this.options.toolbar):this.$toolbar.hide(),this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.changeContainer(!1),this.$note.on("summernote.keyup summernote.mouseup summernote.change",(function(){e.context.invoke("buttons.updateCurrentStyle")})),this.context.invoke("buttons.updateCurrentStyle"),this.options.followingToolbar&&this.$window.on("scroll resize",this.followScroll)}},{key:"destroy",value:function(){this.$toolbar.children().remove(),this.options.followingToolbar&&this.$window.off("scroll resize",this.followScroll)}},{key:"followScroll",value:function(){if(this.$editor.hasClass("fullscreen"))return!1;var e=this.$editor.outerHeight(),t=this.$editor.width(),n=this.$toolbar.height(),r=this.$statusbar.height(),i=0;this.options.otherStaticBar&&(i=o()(this.options.otherStaticBar).outerHeight());var s=this.$document.scrollTop(),a=this.$editor.offset().top,l=a-i,c=a+e-i-n-r;!this.isFollowing&&s>l&&s<c-n?(this.isFollowing=!0,this.$editable.css({marginTop:this.$toolbar.outerHeight()}),this.$toolbar.css({position:"fixed",top:i,width:t,zIndex:1e3})):this.isFollowing&&(s<l||s>c)&&(this.isFollowing=!1,this.$toolbar.css({position:"relative",top:0,width:"100%",zIndex:"auto"}),this.$editable.css({marginTop:""}))}},{key:"changeContainer",value:function(e){e?this.$toolbar.prependTo(this.$editor):this.options.toolbarContainer&&this.$toolbar.appendTo(this.options.toolbarContainer),this.options.followingToolbar&&this.followScroll()}},{key:"updateFullscreen",value:function(e){this.ui.toggleBtnActive(this.$toolbar.find(".btn-fullscreen"),e),this.changeContainer(e)}},{key:"updateCodeview",value:function(e){this.ui.toggleBtnActive(this.$toolbar.find(".btn-codeview"),e),e?this.deactivate():this.activate()}},{key:"activate",value:function(e){var t=this.$toolbar.find("button");e||(t=t.not(".note-codeview-keep")),this.ui.toggleBtn(t,!0)}},{key:"deactivate",value:function(e){var t=this.$toolbar.find("button");e||(t=t.not(".note-codeview-keep")),this.ui.toggleBtn(t,!1)}}]);function rn(e){return rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rn(e)}function on(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sn(r.key),r)}}function sn(e){var t=function(e,t){if("object"!=rn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=rn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==rn(t)?t:t+""}var an=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,ln=/^(\+?\d{1,3}[\s-]?)?(\d{1,4})[\s-]?(\d{1,4})[\s-]?(\d{1,4})$/,cn=/^([A-Za-z][A-Za-z0-9+-.]*\:|#|\/)/,un=function(e,t,n){return t&&on(e.prototype,t),n&&on(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.ui=o().summernote.ui,this.$body=o()(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo,t.memo("help.linkDialog.show",this.options.langInfo.help["linkDialog.show"])}),[{key:"initialize",value:function(){var e=this.options.dialogsInBody?this.$body:this.options.container,t=['<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?"":o()("<div></div>").append(this.ui.checkbox({className:"sn-checkbox-open-in-new-window",text:this.lang.link.openInNewWindow,checked:!0}).render()).html()].join(""),n='<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-link-btn",'" 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:t,footer:n}).render().appendTo(e)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(e,t){e.on("keypress",(function(e){e.keyCode===Ie.code.ENTER&&(e.preventDefault(),t.trigger("click"))}))}},{key:"checkLinkUrl",value:function(e){return an.test(e)?"mailto://"+e:ln.test(e)?"tel://"+e:cn.test(e)?e:"http://"+e}},{key:"onCheckLinkUrl",value:function(e){var t=this;e.on("blur",(function(e){e.target.value=""==e.target.value?"":t.checkLinkUrl(e.target.value)}))}},{key:"toggleLinkBtn",value:function(e,t,n){this.ui.toggleBtn(e,t.val()&&n.val())}},{key:"showLinkDialog",value:function(e){var t=this;return o().Deferred((function(n){var r=t.$dialog.find(".note-link-text"),i=t.$dialog.find(".note-link-url"),o=t.$dialog.find(".note-link-btn"),s=t.$dialog.find(".sn-checkbox-open-in-new-window input[type=checkbox]");t.ui.onDialogShown(t.$dialog,(function(){t.context.triggerEvent("dialog.shown"),!e.url&&v.isValidUrl(e.text)&&(e.url=t.checkLinkUrl(e.text)),r.on("input paste propertychange",(function(){var n=r.val(),s=document.createElement("div");s.innerText=n,n=s.innerHTML,e.text=n,t.toggleLinkBtn(o,r,i)})).val(e.text),i.on("input paste propertychange",(function(){e.text||r.val(i.val()),t.toggleLinkBtn(o,r,i)})).val(e.url),m.isSupportTouch||i.trigger("focus"),t.toggleLinkBtn(o,r,i),t.bindEnterKey(i,o),t.bindEnterKey(r,o),t.onCheckLinkUrl(i);var a=void 0!==e.isNewWindow?e.isNewWindow:t.context.options.linkTargetBlank;s.prop("checked",a),o.one("click",(function(o){o.preventDefault(),n.resolve({range:e.range,url:i.val(),text:r.val(),isNewWindow:s.is(":checked")}),t.ui.hideDialog(t.$dialog)}))})),t.ui.onDialogHidden(t.$dialog,(function(){r.off(),i.off(),o.off(),"pending"===n.state()&&n.reject()})),t.ui.showDialog(t.$dialog)})).promise()}},{key:"show",value:function(){var e=this,t=this.context.invoke("editor.getLinkInfo");this.context.invoke("editor.saveRange"),this.showLinkDialog(t).then((function(t){e.context.invoke("editor.restoreRange"),e.context.invoke("editor.createLink",t)})).fail((function(){e.context.invoke("editor.restoreRange")}))}}]);function dn(e){return dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dn(e)}function hn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pn(r.key),r)}}function pn(e){var t=function(e,t){if("object"!=dn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=dn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==dn(t)?t:t+""}var fn=function(e,t,n){return t&&hn(e.prototype,t),n&&hn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.ui=o().summernote.ui,this.options=t.options,this.events={"summernote.keyup summernote.mouseup summernote.change summernote.scroll":function(){n.update()},"summernote.disable summernote.dialog.shown":function(){n.hide()},"summernote.blur":function(e,t){t.originalEvent&&t.originalEvent.relatedTarget&&n.$popover[0].contains(t.originalEvent.relatedTarget)||n.hide()}}}),[{key:"shouldInitialize",value:function(){return!x.isEmpty(this.options.popover.link)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-link-popover",callback:function(e){e.find(".popover-content,.note-popover-content").prepend('<span><a target="_blank"></a> </span>')}}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.link),this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(){if(this.context.invoke("editor.hasFocus")){var e=this.context.invoke("editor.getLastRange");if(e.isCollapsed()&&e.isOnAnchor()){var t=fe.ancestor(e.sc,fe.isAnchor),n=o()(t).attr("href");this.$popover.find("a").attr("href",n).text(n);var r=fe.posFromPlaceholder(t),i=o()(this.options.container).offset();r.top-=i.top,r.left-=i.left,this.$popover.css({display:"block",left:r.left,top:r.top})}else this.hide()}else this.hide()}},{key:"hide",value:function(){this.$popover.hide()}}]);function mn(e){return mn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mn(e)}function gn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vn(r.key),r)}}function vn(e){var t=function(e,t){if("object"!=mn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=mn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==mn(t)?t:t+""}var yn=function(e,t,n){return t&&gn(e.prototype,t),n&&gn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.ui=o().summernote.ui,this.$body=o()(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo}),[{key:"initialize",value:function(){var e="";if(this.options.maximumImageFileSize){var t=Math.floor(Math.log(this.options.maximumImageFileSize)/Math.log(1024)),n=1*(this.options.maximumImageFileSize/Math.pow(1024,t)).toFixed(2)+" "+" KMGTP"[t]+"B";e="<small>".concat(this.lang.image.maximumFileSize+" : "+n,"</small>")}var r=this.options.dialogsInBody?this.$body:this.options.container,i=['<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"/>',e,"</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(""),o='<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-image-btn",'" value="').concat(this.lang.image.insert,'" disabled>');this.$dialog=this.ui.dialog({title:this.lang.image.insert,fade:this.options.dialogsFade,body:i,footer:o}).render().appendTo(r)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(e,t){e.on("keypress",(function(e){e.keyCode===Ie.code.ENTER&&(e.preventDefault(),t.trigger("click"))}))}},{key:"show",value:function(){var e=this;this.context.invoke("editor.saveRange"),this.showImageDialog().then((function(t){e.ui.hideDialog(e.$dialog),e.context.invoke("editor.restoreRange"),"string"==typeof t?e.options.callbacks.onImageLinkInsert?e.context.triggerEvent("image.link.insert",t):e.context.invoke("editor.insertImage",t):e.context.invoke("editor.insertImagesOrCallback",t)})).fail((function(){e.context.invoke("editor.restoreRange")}))}},{key:"showImageDialog",value:function(){var e=this;return o().Deferred((function(t){var n=e.$dialog.find(".note-image-input"),r=e.$dialog.find(".note-image-url"),i=e.$dialog.find(".note-image-btn");e.ui.onDialogShown(e.$dialog,(function(){e.context.triggerEvent("dialog.shown"),n.replaceWith(n.clone().on("change",(function(e){t.resolve(e.target.files||e.target.value)})).val("")),r.on("input paste propertychange",(function(){e.ui.toggleBtn(i,r.val())})).val(""),m.isSupportTouch||r.trigger("focus"),i.on("click",(function(e){e.preventDefault(),t.resolve(r.val())})),e.bindEnterKey(r,i)})),e.ui.onDialogHidden(e.$dialog,(function(){n.off(),r.off(),i.off(),"pending"===t.state()&&t.reject()})),e.ui.showDialog(e.$dialog)}))}}]);function bn(e){return bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bn(e)}function _n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wn(r.key),r)}}function wn(e){var t=function(e,t){if("object"!=bn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=bn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==bn(t)?t:t+""}var xn=function(e,t,n){return t&&_n(e.prototype,t),n&&_n(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.ui=o().summernote.ui,this.editable=t.layoutInfo.editable[0],this.options=t.options,this.events={"summernote.disable summernote.dialog.shown":function(){n.hide()},"summernote.blur":function(e,t){t.originalEvent&&t.originalEvent.relatedTarget&&n.$popover[0].contains(t.originalEvent.relatedTarget)||n.hide()}}}),[{key:"shouldInitialize",value:function(){return!x.isEmpty(this.options.popover.image)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-image-popover"}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.image),this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(e,t){if(fe.isImg(e)){var n=o()(e).offset(),r=o()(this.options.container).offset(),i={};this.options.popatmouse?(i.left=t.pageX-20,i.top=t.pageY):i=n,i.top-=r.top,i.left-=r.left,this.$popover.css({display:"block",left:i.left,top:i.top})}else this.hide()}},{key:"hide",value:function(){this.$popover.hide()}}]);function Sn(e){return Sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sn(e)}function kn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Tn(r.key),r)}}function Tn(e){var t=function(e,t){if("object"!=Sn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Sn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Sn(t)?t:t+""}var En=function(e,t,n){return t&&kn(e.prototype,t),n&&kn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.ui=o().summernote.ui,this.options=t.options,this.events={"summernote.mousedown":function(e,t){n.update(t.target)},"summernote.keyup summernote.scroll summernote.change":function(){n.update()},"summernote.disable summernote.dialog.shown":function(){n.hide()},"summernote.blur":function(e,t){t.originalEvent&&t.originalEvent.relatedTarget&&n.$popover[0].contains(t.originalEvent.relatedTarget)||n.hide()}}}),[{key:"shouldInitialize",value:function(){return!x.isEmpty(this.options.popover.table)}},{key:"initialize",value:function(){this.$popover=this.ui.popover({className:"note-table-popover"}).render().appendTo(this.options.container);var e=this.$popover.find(".popover-content,.note-popover-content");this.context.invoke("buttons.build",e,this.options.popover.table),m.isFF&&document.execCommand("enableInlineTableEditing",!1,!1),this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(e){if(this.context.isDisabled())return!1;var t=fe.isCell(e)||fe.isCell(null==e?void 0:e.parentElement);if(t){var n=fe.posFromPlaceholder(e),r=o()(this.options.container).offset();n.top-=r.top,n.left-=r.left,this.$popover.css({display:"block",left:n.left,top:n.top})}else this.hide();return t}},{key:"hide",value:function(){this.$popover.hide()}}]);function Cn(e){return Cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cn(e)}function Dn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Mn(r.key),r)}}function Mn(e){var t=function(e,t){if("object"!=Cn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Cn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Cn(t)?t:t+""}var An=function(e,t,n){return t&&Dn(e.prototype,t),n&&Dn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.ui=o().summernote.ui,this.$body=o()(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo}),[{key:"initialize",value:function(){var e=this.options.dialogsInBody?this.$body:this.options.container,t=['<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(""),n='<input type="button" href="#" class="'.concat("btn btn-primary note-btn note-btn-primary note-video-btn",'" value="').concat(this.lang.video.insert,'" disabled>');this.$dialog=this.ui.dialog({title:this.lang.video.insert,fade:this.options.dialogsFade,body:t,footer:n}).render().appendTo(e)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"bindEnterKey",value:function(e,t){e.on("keypress",(function(e){e.keyCode===Ie.code.ENTER&&(e.preventDefault(),t.trigger("click"))}))}},{key:"createVideoNode",value:function(e){var t,n=e.match(/(?:youtu\.be\/|youtube\.com\/(?:[^\/\n\s]+\/\S+\/|(?:v|e(?:mbed)?)\/|\S*?[?&]v=|shorts\/|live\/))([^&\n?]+)(?:.*[?&]t=([^&\n]+))?.*/),r=e.match(/(?:\.|\/\/)drive\.google\.com\/file\/d\/(.[a-zA-Z0-9_-]*)\/view/),i=e.match(/(?:www\.|\/\/)instagram\.com\/(reel|p)\/(.[a-zA-Z0-9_-]*)/),s=e.match(/\/\/vine\.co\/v\/([a-zA-Z0-9]+)/),a=e.match(/\/\/(player\.)?vimeo\.com\/([a-z]*\/)*(\d+)[?]?.*/),l=e.match(/.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/),c=e.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),u=e.match(/\/\/(.*)\/videos\/watch\/([^?]*)(?:\?(?:start=(\w*))?(?:&stop=(\w*))?(?:&loop=([10]))?(?:&autoplay=([10]))?(?:&muted=([10]))?)?/),d=e.match(/\/\/v\.qq\.com.*?vid=(.+)/),h=e.match(/\/\/v\.qq\.com\/x?\/?(page|cover).*?\/([^\/]+)\.html\??.*/),p=e.match(/^.+.(mp4|m4v)$/),f=e.match(/^.+.(ogg|ogv)$/),m=e.match(/^.+.(webm)$/),g=e.match(/(?:www\.|\/\/)facebook\.com\/([^\/]+)\/videos\/([0-9]+)/);if(n&&11===n[1].length){var v=n[1],y=0;if(void 0!==n[2]){var b=n[2].match(/^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/);if(b)for(var _=[3600,60,1],w=0,x=_.length;w<x;w++)y+=void 0!==b[w+1]?_[w]*parseInt(b[w+1],10):0;else y=parseInt(n[2],10)}t=o()("<iframe>").attr("frameborder",0).attr("src","//www.youtube.com/embed/"+v+(y>0?"?start="+y:"")).attr("width","640").attr("height","360")}else if(r&&r[0].length)t=o()("<iframe>").attr("frameborder",0).attr("src","https://drive.google.com/file/d/"+r[1]+"/preview").attr("width","640").attr("height","480");else if(i&&i[0].length)t=o()("<iframe>").attr("frameborder",0).attr("src","https://instagram.com/p/"+i[2]+"/embed/").attr("width","612").attr("height","710").attr("scrolling","no").attr("allowtransparency","true");else if(s&&s[0].length)t=o()("<iframe>").attr("frameborder",0).attr("src",s[0]+"/embed/simple").attr("width","600").attr("height","600").attr("class","vine-embed");else if(a&&a[3].length)t=o()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("src","//player.vimeo.com/video/"+a[3]).attr("width","640").attr("height","360");else if(l&&l[2].length)t=o()("<iframe>").attr("frameborder",0).attr("src","//www.dailymotion.com/embed/video/"+l[2]).attr("width","640").attr("height","360");else if(c&&c[1].length)t=o()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","498").attr("width","510").attr("src","//player.youku.com/embed/"+c[1]);else if(u&&u[0].length){var S=0;"undefined"!==u[2]&&(S=u[2]);var k=0;"undefined"!==u[3]&&(k=u[3]);var T=0;"undefined"!==u[4]&&(T=u[4]);var E=0;"undefined"!==u[5]&&(E=u[5]);var C=0;"undefined"!==u[6]&&(C=u[6]),t=o()('<iframe allowfullscreen sandbox="allow-same-origin allow-scripts allow-popups">').attr("frameborder",0).attr("src","//"+u[1]+"/videos/embed/"+u[2]+"?loop="+T+"&autoplay="+E+"&muted="+C+(S>0?"&start="+S:"")+(k>0?"&end="+y:"")).attr("width","560").attr("height","315")}else if(d&&d[1].length||h&&h[2].length){var D=d&&d[1].length?d[1]:h[2];t=o()("<iframe webkitallowfullscreen mozallowfullscreen allowfullscreen>").attr("frameborder",0).attr("height","310").attr("width","500").attr("src","https://v.qq.com/txp/iframe/player.html?vid="+D+"&auto=0")}else if(p||f||m)t=o()("<video controls>").attr("src",e).attr("width","640").attr("height","360");else{if(!g||!g[0].length)return!1;t=o()("<iframe>").attr("frameborder",0).attr("src","https://www.facebook.com/plugins/video.php?href="+encodeURIComponent(g[0])+"&show_text=0&width=560").attr("width","560").attr("height","301").attr("scrolling","no").attr("allowtransparency","true")}return t.addClass("note-video-clip"),t[0]}},{key:"show",value:function(){var e=this,t=this.context.invoke("editor.getSelectedText");this.context.invoke("editor.saveRange"),this.showVideoDialog(t).then((function(t){e.ui.hideDialog(e.$dialog),e.context.invoke("editor.restoreRange");var n=e.createVideoNode(t);n&&e.context.invoke("editor.insertNode",n)})).fail((function(){e.context.invoke("editor.restoreRange")}))}},{key:"showVideoDialog",value:function(){var e=this;return o().Deferred((function(t){var n=e.$dialog.find(".note-video-url"),r=e.$dialog.find(".note-video-btn");e.ui.onDialogShown(e.$dialog,(function(){e.context.triggerEvent("dialog.shown"),n.on("input paste propertychange",(function(){e.ui.toggleBtn(r,n.val())})),m.isSupportTouch||n.trigger("focus"),r.on("click",(function(e){e.preventDefault(),t.resolve(n.val())})),e.bindEnterKey(n,r)})),e.ui.onDialogHidden(e.$dialog,(function(){n.off(),r.off(),"pending"===t.state()&&t.reject()})),e.ui.showDialog(e.$dialog)}))}}]);function In(e){return In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},In(e)}function Ln(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,On(r.key),r)}}function On(e){var t=function(e,t){if("object"!=In(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=In(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==In(t)?t:t+""}var Nn=function(e,t,n){return t&&Ln(e.prototype,t),n&&Ln(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.ui=o().summernote.ui,this.$body=o()(document.body),this.$editor=t.layoutInfo.editor,this.options=t.options,this.lang=this.options.langInfo}),[{key:"initialize",value:function(){var e=this.options.dialogsInBody?this.$body:this.options.container,t=['<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:t,callback:function(e){e.find(".modal-body,.note-modal-body").css({"max-height":300,overflow:"scroll"})}}).render().appendTo(e)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"createShortcutList",value:function(){var e=this,t=this.options.keyMap[m.isMac?"mac":"pc"];return Object.keys(t).map((function(n){var r=t[n],i=o()('<div><div class="help-list-item"></div></div>');return i.append(o()("<label><kbd>"+n+"</kdb></label>").css({width:180,"margin-right":10})).append(o()("<span></span>").html(e.context.memo("help."+r)||r)),i.html()})).join("")}},{key:"showHelpDialog",value:function(){var e=this;return o().Deferred((function(t){e.ui.onDialogShown(e.$dialog,(function(){e.context.triggerEvent("dialog.shown"),t.resolve()})),e.ui.showDialog(e.$dialog)})).promise()}},{key:"show",value:function(){var e=this;this.context.invoke("editor.saveRange"),this.showHelpDialog().then((function(){e.context.invoke("editor.restoreRange")}))}}]);function Rn(e){return Rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rn(e)}function Pn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Fn(r.key),r)}}function Fn(e){var t=function(e,t){if("object"!=Rn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Rn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Rn(t)?t:t+""}var jn=function(e,t,n){return t&&Pn(e.prototype,t),n&&Pn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.ui=o().summernote.ui,this.options=t.options,this.hidable=!0,this.onContextmenu=!1,this.pageX=null,this.pageY=null,this.events={"summernote.contextmenu":function(e){n.options.editing&&(e.preventDefault(),e.stopPropagation(),n.onContextmenu=!0,n.update(!0))},"summernote.mousedown":function(e,t){n.pageX=t.pageX,n.pageY=t.pageY},"summernote.keyup summernote.mouseup summernote.scroll":function(e,t){if(n.options.editing&&!n.onContextmenu){if("keyup"==t.type){var r=n.context.invoke("editor.getLastRange").getWordRange(),i=v.rect2bnd(x.last(r.getClientRects()));n.pageX=i.left,n.pageY=i.top}else n.pageX=t.pageX,n.pageY=t.pageY;n.update()}n.onContextmenu=!1},"summernote.disable summernote.change summernote.dialog.shown summernote.blur":function(){n.hide()},"summernote.focusout":function(){n.$popover.is(":active,:focus")||n.hide()}}}),[{key:"shouldInitialize",value:function(){return this.options.airMode&&!x.isEmpty(this.options.popover.air)}},{key:"initialize",value:function(){var e=this;this.$popover=this.ui.popover({className:"note-air-popover"}).render().appendTo(this.options.container);var t=this.$popover.find(".popover-content");this.context.invoke("buttons.build",t,this.options.popover.air),this.$popover.on("mousedown",(function(){e.hidable=!1})),this.$popover.on("mouseup",(function(){e.hidable=!0}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"update",value:function(e){var t=this.context.invoke("editor.currentStyle");if(!t.range||t.range.isCollapsed()&&!e)this.hide();else{var n={left:this.pageX,top:this.pageY},r=o()(this.options.container).offset();n.top-=r.top,n.left-=r.left,this.$popover.css({display:"block",left:Math.max(n.left,0)+-5,top:n.top+5}),this.context.invoke("buttons.updateCurrentStyle",this.$popover)}}},{key:"updateCodeview",value:function(e){this.ui.toggleBtnActive(this.$popover.find(".btn-codeview"),e),e&&this.hide()}},{key:"hide",value:function(){this.hidable&&this.$popover.hide()}}]);function Yn(e){return Yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yn(e)}function Vn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Hn(r.key),r)}}function Hn(e){var t=function(e,t){if("object"!=Yn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Yn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Yn(t)?t:t+""}var Bn=function(e,t,n){return t&&Vn(e.prototype,t),n&&Vn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=t,this.ui=o().summernote.ui,this.$editable=t.layoutInfo.editable,this.options=t.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(e,t){t.isDefaultPrevented()||n.handleKeyup(t)},"summernote.keydown":function(e,t){n.handleKeydown(t)},"summernote.disable summernote.dialog.shown summernote.blur":function(){n.hide()}}}),[{key:"shouldInitialize",value:function(){return this.hints.length>0}},{key:"initialize",value:function(){var e=this;this.lastWordRange=null,this.matchingWord=null,this.$popover=this.ui.popover({className:"note-hint-popover",hideArrow:!0,direction:""}).render().appendTo(this.options.container),this.$popover.hide(),this.$content=this.$popover.find(".popover-content,.note-popover-content"),this.$content.on("click",".note-hint-item",(function(t){e.$content.find(".active").removeClass("active"),o()(t.currentTarget).addClass("active"),e.replace()})),this.$popover.on("mousedown",(function(e){e.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"selectItem",value:function(e){this.$content.find(".active").removeClass("active"),e.addClass("active"),this.$content[0].scrollTop=e[0].offsetTop-this.$content.innerHeight()/2}},{key:"moveDown",value:function(){var e=this.$content.find(".note-hint-item.active"),t=e.next();if(t.length)this.selectItem(t);else{var n=e.parent().next();n.length||(n=this.$content.find(".note-hint-group").first()),this.selectItem(n.find(".note-hint-item").first())}}},{key:"moveUp",value:function(){var e=this.$content.find(".note-hint-item.active"),t=e.prev();if(t.length)this.selectItem(t);else{var n=e.parent().prev();n.length||(n=this.$content.find(".note-hint-group").last()),this.selectItem(n.find(".note-hint-item").last())}}},{key:"replace",value:function(){var e=this.$content.find(".note-hint-item.active");if(e.length){var t=this.nodeFromItem(e);if(null!==this.matchingWord&&0===this.matchingWord.length)this.lastWordRange.so=this.lastWordRange.eo;else if(null!==this.matchingWord&&this.matchingWord.length>0&&!this.lastWordRange.isCollapsed()){var n=this.lastWordRange.eo-this.lastWordRange.so-this.matchingWord.length;n>0&&(this.lastWordRange.so+=n)}if(this.lastWordRange.insertNode(t),"next"===this.options.hintSelect){var r=document.createTextNode("");o()(t).after(r),Me.createFromNodeBefore(r).select()}else Me.createFromNodeAfter(t).select();this.lastWordRange=null,this.hide(),this.context.invoke("editor.focus"),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}}},{key:"nodeFromItem",value:function(e){var t=this.hints[e.data("index")],n=e.data("item"),r=t.content?t.content(n):n;return"string"==typeof r&&(r=fe.createText(r)),r}},{key:"createItemTemplates",value:function(e,t){var n=this.hints[e];return t.map((function(t,r){var i=o()('<div class="note-hint-item"></div>');return i.append(n.template?n.template(t):t+""),i.data({index:e,item:t}),0===e&&0===r&&i.addClass("active"),i}))}},{key:"handleKeydown",value:function(e){this.$popover.is(":visible")&&(e.keyCode===Ie.code.ENTER?(e.preventDefault(),this.replace()):e.keyCode===Ie.code.UP?(e.preventDefault(),this.moveUp()):e.keyCode===Ie.code.DOWN&&(e.preventDefault(),this.moveDown()))}},{key:"searchKeyword",value:function(e,t,n){var r=this.hints[e];if(r&&r.match.test(t)&&r.search){var i=r.match.exec(t);this.matchingWord=i[0],r.search(i[1],n)}else n()}},{key:"createGroup",value:function(e,t){var n=this,r=o()('<div class="note-hint-group note-hint-group-'+e+'"></div>');return this.searchKeyword(e,t,(function(t){(t=t||[]).length&&(r.html(n.createItemTemplates(e,t)),n.show())})),r}},{key:"handleKeyup",value:function(e){var t=this;if(!x.contains([Ie.code.ENTER,Ie.code.UP,Ie.code.DOWN],e.keyCode)){var n,r,i=this.context.invoke("editor.getLastRange");if("words"===this.options.hintMode){if(n=i.getWordsRange(i),r=n.toString(),this.hints.forEach((function(e){if(e.match.test(r))return n=i.getWordsMatchRange(e.match),!1})),!n)return void this.hide();r=n.toString()}else n=i.getWordRange(),r=n.toString();if(this.hints.length&&r){this.$content.empty();var s=v.rect2bnd(x.last(n.getClientRects())),a=o()(this.options.container).offset();s&&(s.top-=a.top,s.left-=a.left,this.$popover.hide(),this.lastWordRange=n,this.hints.forEach((function(e,n){e.match.test(r)&&t.createGroup(n,r).appendTo(t.$content)})),this.$content.find(".note-hint-item").first().addClass("active"),"top"===this.direction?this.$popover.css({left:s.left,top:s.top-this.$popover.outerHeight()-5}):this.$popover.css({left:s.left,top:s.top+s.height+5}))}else this.hide()}}},{key:"show",value:function(){this.$popover.show()}},{key:"hide",value:function(){this.$popover.hide()}}]);function Un(e){return Un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Un(e)}function zn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qn(r.key),r)}}function qn(e){var t=function(e,t){if("object"!=Un(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Un(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Un(t)?t:t+""}o().summernote=o().extend(o().summernote,{version:"0.9.1",plugins:{},dom:fe,range:Me,lists:x,options:{langInfo:o().summernote.lang["en-US"],editing:!0,modules:{editor:ot,clipboard:ct,dropzone:pt,codeview:bt,statusbar:St,fullscreen:Ct,handle:It,hintPopover:Bn,autoLink:Pt,autoSync:Vt,autoReplace:zt,placeholder:Gt,buttons:Jt,toolbar:nn,linkDialog:un,linkPopover:fn,imageDialog:yn,imagePopover:xn,tablePopover:En,videoDialog:An,helpDialog:Nn,airPopover:jn},buttons:{},lang:"en-US",followingToolbar:!1,toolbarPosition:"top",otherStaticBar:"",codeviewKeepButton:!1,toolbar:[["style",["style"]],["font",["bold","underline","clear"]],["fontname",["fontname"]],["color",["color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["link","picture","video"]],["view",["fullscreen","codeview","help"]]],popatmouse:!0,popover:{image:[["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:!1,addLinkNoOpener:!1,airMode:!1,overrideContextMenu:!1,width:null,height:null,linkTargetBlank:!0,focus:!1,tabDisable:!1,tabSize:4,styleWithCSS:!1,shortcuts:!0,textareaAutoSync:!0,tooltip:"auto",container:null,maxTextLength:0,blockquoteBreakingLevel:2,spellCheck:!0,disableGrammar:!1,placeholder:null,inheritPlaceholder:!1,recordEveryKeystroke:!1,historyLimit:200,showDomainOnlyForAutolink:!1,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:!0,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:!1,dialogsFade:!1,maximumImageFileSize:null,acceptImageFileTypes:"image/*",allowClipboardImagePasting:!0,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:!0,lineNumbers:!0},codeviewFilter:!0,codeviewFilterRegex:/<\/*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|ilayer|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|t(?:itle|extarea)|xml)[^>]*?>/gi,codeviewIframeFilter:!0,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"}}});var Wn=function(e,t,n){return t&&zn(e.prototype,t),n&&zn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.markup=t,this.children=n,this.options=r,this.callback=i}),[{key:"render",value:function(e){var t=o()(this.markup);if(this.options&&this.options.contents&&t.html(this.options.contents),this.options&&this.options.className&&t.addClass(this.options.className),this.options&&this.options.data&&o().each(this.options.data,(function(e,n){t.attr("data-"+e,n)})),this.options&&this.options.click&&t.on("click",this.options.click),this.children){var n=t.find(".note-children-container");this.children.forEach((function(e){e.render(n.length?n:t)}))}return this.callback&&this.callback(t,this.options),this.options&&this.options.callback&&this.options.callback(t),e&&e.append(t),t}}]);const $n=function(e,t){return function(){var n="object"===Un(arguments[1])?arguments[1]:arguments[0],r=Array.isArray(arguments[0])?arguments[0]:[];return n&&n.children&&(r=n.children),new Wn(e,r,n,t)}};function Gn(e){return Gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gn(e)}function Kn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Zn(r.key),r)}}function Zn(e){var t=function(e,t){if("object"!=Gn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Gn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Gn(t)?t:t+""}var Xn=function(e,t,n){return t&&Kn(e.prototype,t),n&&Kn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$node=t,this.options=o().extend({},{title:"",target:n.container,trigger:"hover focus",placement:"bottom"},n),this.$tooltip=o()(['<div class="note-tooltip">','<div class="note-tooltip-arrow"></div>','<div class="note-tooltip-content"></div>',"</div>"].join("")),"manual"!==this.options.trigger){var r=this.show.bind(this),i=this.hide.bind(this),s=this.toggle.bind(this);this.options.trigger.split(" ").forEach((function(e){"hover"===e?(t.off("mouseenter mouseleave"),t.on("mouseenter",r).on("mouseleave",i)):"click"===e?t.on("click",s):"focus"===e&&t.on("focus",r).on("blur",i)}))}}),[{key:"show",value:function(){var e=this.$node,t=e.offset(),n=o()(this.options.target).offset();t.top-=n.top,t.left-=n.left;var r=this.$tooltip,i=this.options.title||e.attr("title")||e.data("title"),s=this.options.placement||e.data("placement");r.addClass(s),r.find(".note-tooltip-content").text(i),r.appendTo(this.options.target);var a=e.outerWidth(),l=e.outerHeight(),c=r.outerWidth(),u=r.outerHeight();"bottom"===s?r.css({top:t.top+l,left:t.left+(a/2-c/2)}):"top"===s?r.css({top:t.top-u,left:t.left+(a/2-c/2)}):"left"===s?r.css({top:t.top+(l/2-u/2),left:t.left-c}):"right"===s&&r.css({top:t.top+(l/2-u/2),left:t.left+a}),r.addClass("in")}},{key:"hide",value:function(){var e=this;this.$tooltip.removeClass("in"),setTimeout((function(){e.$tooltip.remove()}),200)}},{key:"toggle",value:function(){this.$tooltip.hasClass("in")?this.hide():this.show()}}]);const Jn=Xn;function Qn(e){return Qn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qn(e)}function er(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tr(r.key),r)}}function tr(e){var t=function(e,t){if("object"!=Qn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Qn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Qn(t)?t:t+""}var nr=function(e,t,n){return t&&er(e.prototype,t),n&&er(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$button=t,this.options=o().extend({},{target:n.container},n),this.setEvent()}),[{key:"setEvent",value:function(){var e=this;this.$button.on("click",(function(t){e.toggle(),t.stopImmediatePropagation()}))}},{key:"clear",value:function(){var e=o()(".note-btn-group.open");e.find(".note-btn.active").removeClass("active"),e.removeClass("open")}},{key:"show",value:function(){this.$button.addClass("active"),this.$button.parent().addClass("open");var e=this.$button.next(),t=e.offset(),n=e.outerWidth(),r=o()(window).width(),i=parseFloat(o()(this.options.target).css("margin-right"));t.left+n>r-i?e.css("margin-left",r-i-(t.left+n)):e.css("margin-left","")}},{key:"hide",value:function(){this.$button.removeClass("active"),this.$button.parent().removeClass("open")}},{key:"toggle",value:function(){var e=this.$button.parent().hasClass("open");this.clear(),e?this.hide():this.show()}}]);o()(document).on("click.note-dropdown-menu",(function(e){o()(e.target).closest(".note-btn-group").length||(o()(".note-btn-group.open .note-btn.active").removeClass("active"),o()(".note-btn-group.open").removeClass("open"))})),o()(document).on("click.note-dropdown-menu",(function(e){o()(e.target).closest(".note-dropdown-menu").parent().removeClass("open"),o()(e.target).closest(".note-dropdown-menu").parent().find(".note-btn.active").removeClass("active")}));const rr=nr;function ir(e){return ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ir(e)}function or(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sr(r.key),r)}}function sr(e){var t=function(e,t){if("object"!=ir(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ir(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ir(t)?t:t+""}var ar=function(e,t,n){return t&&or(e.prototype,t),n&&or(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$modal=t,this.$backdrop=o()('<div class="note-modal-backdrop"></div>')}),[{key:"show",value:function(){var e=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(t){27===t.which&&(t.preventDefault(),e.hide())}))}},{key:"hide",value:function(){this.$modal.removeClass("open").hide(),this.$backdrop.hide(),this.$modal.trigger("note.modal.hide"),this.$modal.off("keydown")}}]);const lr=ar;var cr=$n('<div class="note-editor note-frame"></div>'),ur=$n('<div class="note-toolbar" role="toolbar"></div>'),dr=$n('<div class="note-editing-area"></div>'),hr=$n('<textarea class="note-codable" aria-multiline="true"></textarea>'),pr=$n('<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"></div>'),fr=$n(['<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("")),mr=$n('<div class="note-editor note-airframe"></div>'),gr=$n(['<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"></div>','<output class="note-status-output" role="status" aria-live="polite"></output>'].join("")),vr=$n('<div class="note-btn-group"></div>'),yr=$n('<button type="button" class="note-btn" tabindex="-1"></button>',(function(e,t){t&&t.tooltip&&(e.attr({"aria-label":t.tooltip}),e.data("_lite_tooltip",new Jn(e,{title:t.tooltip,container:t.container})).on("click",(function(e){o()(e.currentTarget).data("_lite_tooltip").hide()}))),t.contents&&e.html(t.contents),t&&t.data&&"dropdown"===t.data.toggle&&e.data("_lite_dropdown",new rr(e,{container:t.container})),t&&t.codeviewKeepButton&&e.addClass("note-codeview-keep")})),br=$n('<div class="note-dropdown-menu" role="list"></div>',(function(e,t){var n=Array.isArray(t.items)?t.items.map((function(e){var n="string"==typeof e?e:e.value||"",r=t.template?t.template(e):e,i=o()('<a class="note-dropdown-item" href="#" data-value="'+n+'" role="listitem" aria-label="'+n+'"></a>');return i.html(r).data("item",e),i})):t.items;e.html(n).attr({"aria-label":t.title}),e.on("click","> .note-dropdown-item",(function(e){var n=o()(this),r=n.data("item"),i=n.data("value");r.click?r.click(n):t.itemClick&&t.itemClick(e,r,i)})),t&&t.codeviewKeepButton&&e.addClass("note-codeview-keep")})),_r=$n('<div class="note-dropdown-menu note-check" role="list"></div>',(function(e,t){var n=Array.isArray(t.items)?t.items.map((function(e){var n="string"==typeof e?e:e.value||"",r=t.template?t.template(e):e,i=o()('<a class="note-dropdown-item" href="#" data-value="'+n+'" role="listitem" aria-label="'+e+'"></a>');return i.html([Nr(t.checkClassName)," ",r]).data("item",e),i})):t.items;e.html(n).attr({"aria-label":t.title}),e.on("click","> .note-dropdown-item",(function(e){var n=o()(this),r=n.data("item"),i=n.data("value");r.click?r.click(n):t.itemClick&&t.itemClick(e,r,i)})),t&&t.codeviewKeepButton&&e.addClass("note-codeview-keep")})),wr=function(e,t){return e+" "+Nr(t.icons.caret,"span")},xr=function(e,t){return vr([yr({className:"dropdown-toggle",contents:e.title+" "+Nr("note-icon-caret"),tooltip:e.tooltip,data:{toggle:"dropdown"}}),br({className:e.className,items:e.items,template:e.template,itemClick:e.itemClick})],{callback:t}).render()},Sr=function(e,t){return vr([yr({className:"dropdown-toggle",contents:e.title+" "+Nr("note-icon-caret"),tooltip:e.tooltip,data:{toggle:"dropdown"}}),_r({className:e.className,checkClassName:e.checkClassName,items:e.items,template:e.template,itemClick:e.itemClick})],{callback:t}).render()},kr=function(e){return vr([yr({className:"dropdown-toggle",contents:e.title+" "+Nr("note-icon-caret"),tooltip:e.tooltip,data:{toggle:"dropdown"}}),br([vr({className:"note-align",children:e.items[0]}),vr({className:"note-list",children:e.items[1]})])]).render()},Tr=function(e){return vr([yr({className:"dropdown-toggle",contents:e.title+" "+Nr("note-icon-caret"),tooltip:e.tooltip,data:{toggle:"dropdown"}}),br({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(t){t.find(".note-dimension-picker-mousecatcher").css({width:e.col+"em",height:e.row+"em"}).on("mouseup",e.itemClick).on("mousemove",(function(t){!function(e,t,n){var r,i=o()(e.target.parentNode),s=i.next(),a=i.find(".note-dimension-picker-mousecatcher"),l=i.find(".note-dimension-picker-highlighted"),c=i.find(".note-dimension-picker-unhighlighted");if(void 0===e.offsetX){var u=o()(e.target).offset();r={x:e.pageX-u.left,y:e.pageY-u.top}}else r={x:e.offsetX,y:e.offsetY};var d=Math.ceil(r.x/18)||1,h=Math.ceil(r.y/18)||1;l.css({width:d+"em",height:h+"em"}),a.data("value",d+"x"+h),d>3&&d<t&&c.css({width:d+1+"em"}),h>3&&h<n&&c.css({height:h+1+"em"}),s.html(d+" x "+h)}(t,e.col,e.row)}))}}).render()},Er=$n('<div class="note-color-palette"></div>',(function(e,t){for(var n=[],r=0,i=t.colors.length;r<i;r++){for(var s=t.eventName,a=t.colors[r],l=t.colorsName[r],c=[],u=0,d=a.length;u<d;u++){var h=a[u],p=l[u];c.push(['<button type="button" class="note-btn note-color-btn"','style="background-color:',h,'" ','data-event="',s,'" ','data-value="',h,'" ','data-title="',p,'" ','aria-label="',p,'" ','data-toggle="button" tabindex="-1"></button>'].join(""))}n.push('<div class="note-color-row">'+c.join("")+"</div>")}e.html(n.join("")),e.find(".note-color-btn").each((function(){o()(this).data("_lite_tooltip",new Jn(o()(this),{container:t.container}))}))})),Cr=function(e,t){return vr({className:"note-color",children:[yr({className:"note-current-color-button",contents:e.title,tooltip:e.lang.color.recent,click:e.currentClick,callback:function(e){var n=e.find(".note-recent-color");"foreColor"!==t&&(n.css("background-color","#FFFF00"),e.attr("data-backColor","#FFFF00"))}}),yr({className:"dropdown-toggle",contents:Nr("note-icon-caret"),tooltip:e.lang.color.more,data:{toggle:"dropdown"}}),br({items:["<div>",'<div class="note-btn-group btn-background-color">','<div class="note-palette-title">'+e.lang.color.background+"</div>","<div>",'<button type="button" class="note-color-reset note-btn note-btn-block" data-event="backColor" data-value="transparent">',e.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">',e.lang.color.cpSelect,"</button>","</div>","</div>",'<div class="note-btn-group btn-foreground-color">','<div class="note-palette-title">'+e.lang.color.foreground+"</div>","<div>",'<button type="button" class="note-color-reset note-btn note-btn-block" data-event="removeFormat" data-value="foreColor">',e.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">',e.lang.color.cpSelect,"</button>","</div>","</div>","</div>"].join(""),callback:function(n){n.find(".note-holder").each((function(){var t=o()(this);t.append(Er({colors:e.colors,eventName:t.data("event")}).render())})),"fore"===t?(n.find(".btn-background-color").hide(),n.css({"min-width":"210px"})):"back"===t&&(n.find(".btn-foreground-color").hide(),n.css({"min-width":"210px"}))},click:function(n){var r=o()(n.target),i=r.data("event"),s=r.data("value"),a=document.getElementById("html5fcp").value,l=document.getElementById("html5bcp").value;if("cp"===s?n.stopPropagation():"cpbackColor"===s?s=l:"cpforeColor"===s&&(s=a),i&&s){var c="backColor"===i?"background-color":"color",u=r.closest(".note-color").find(".note-recent-color"),d=r.closest(".note-color").find(".note-current-color-button");u.css(c,s),d.attr("data-"+i,s),"fore"===t?e.itemClick("foreColor",s):"back"===t?e.itemClick("backColor",s):e.itemClick(i,s)}}})]}).render()},Dr=$n('<div class="note-modal" aria-hidden="false" tabindex="-1" role="dialog"></div>',(function(e,t){t.fade&&e.addClass("fade"),e.attr({"aria-label":t.title}),e.html(['<div class="note-modal-content">',t.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">'+t.title+"</h4></div>":"",'<div class="note-modal-body">'+t.body+"</div>",t.footer?'<div class="note-modal-footer">'+t.footer+"</div>":"","</div>"].join("")),e.data("modal",new lr(e,t))})),Mr=function(e){var t='<div class="note-form-group"><label for="note-dialog-video-url-'+e.id+'" class="note-form-label">'+e.lang.video.url+' <small class="text-muted">'+e.lang.video.providers+'</small></label><input id="note-dialog-video-url-'+e.id+'" class="note-video-url note-input" type="text"/></div>',n=['<button type="button" href="#" class="note-btn note-btn-primary note-video-btn disabled" disabled>',e.lang.video.insert,"</button>"].join("");return Dr({title:e.lang.video.insert,fade:e.fade,body:t,footer:n}).render()},Ar=function(e){var t='<div class="note-form-group note-group-select-from-files"><label for="note-dialog-image-file-'+e.id+'" class="note-form-label">'+e.lang.image.selectFromFiles+'</label><input id="note-dialog-image-file-'+e.id+'" class="note-note-image-input note-input" type="file" name="files" accept="image/*" multiple="multiple"/>'+e.imageLimitation+'</div><div class="note-form-group"><label for="note-dialog-image-url-'+e.id+'" class="note-form-label">'+e.lang.image.url+'</label><input id="note-dialog-image-url-'+e.id+'" class="note-image-url note-input" type="text"/></div>',n=['<button href="#" type="button" class="note-btn note-btn-primary note-btn-large note-image-btn disabled" disabled>',e.lang.image.insert,"</button>"].join("");return Dr({title:e.lang.image.insert,fade:e.fade,body:t,footer:n}).render()},Ir=function(e){var t='<div class="note-form-group"><label for="note-dialog-link-txt-'+e.id+'" class="note-form-label">'+e.lang.link.textToDisplay+'</label><input id="note-dialog-link-txt-'+e.id+'" class="note-link-text note-input" type="text"/></div><div class="note-form-group"><label for="note-dialog-link-url-'+e.id+'" class="note-form-label">'+e.lang.link.url+'</label><input id="note-dialog-link-url-'+e.id+'" class="note-link-url note-input" type="text" value="http://"/></div>'+(e.disableLinkTarget?"":'<div class="checkbox"><label for="note-dialog-link-nw-'+e.id+'"><input id="note-dialog-link-nw-'+e.id+'" type="checkbox" checked> '+e.lang.link.openInNewWindow+"</label></div>"),n=['<button href="#" type="button" class="note-btn note-btn-primary note-link-btn disabled" disabled>',e.lang.link.insert,"</button>"].join("");return Dr({className:"link-dialog",title:e.lang.link.insert,fade:e.fade,body:t,footer:n}).render()},Lr=$n(['<div class="note-popover bottom">','<div class="note-popover-arrow"></div>','<div class="popover-content note-children-container"></div>',"</div>"].join(""),(function(e,t){var n=void 0!==t.direction?t.direction:"bottom";e.addClass(n).hide(),t.hideArrow&&e.find(".note-popover-arrow").hide()})),Or=$n('<div class="checkbox"></div>',(function(e,t){e.html(["<label"+(t.id?' for="note-'+t.id+'"':"")+">",'<input role="checkbox" type="checkbox"'+(t.id?' id="note-'+t.id+'"':""),t.checked?" checked":"",' aria-checked="'+(t.checked?"true":"false")+'"/>',t.text?t.text:"","</label>"].join(""))})),Nr=function(e,t){return e.match(/^</)?e:"<"+(t=t||"i")+' class="'+e+'"></'+t+">"};return o().summernote=o().extend(o().summernote,{ui_template:function(e){return{editor:cr,toolbar:ur,editingArea:dr,codable:hr,editable:pr,statusbar:fr,airEditor:mr,airEditable:gr,buttonGroup:vr,button:yr,dropdown:br,dropdownCheck:_r,dropdownButton:xr,dropdownButtonContents:wr,dropdownCheckButton:Sr,paragraphDropdownButton:kr,tableDropdownButton:Tr,colorDropdownButton:Cr,palette:Er,dialog:Dr,videoDialog:Mr,imageDialog:Ar,linkDialog:Ir,popover:Lr,checkbox:Or,icon:Nr,options:e,toggleBtn:function(e,t){e.toggleClass("disabled",!t),e.attr("disabled",!t)},toggleBtnActive:function(e,t){e.toggleClass("active",t)},check:function(e,t){e.find(".checked").removeClass("checked"),e.find('[data-value="'+t+'"]').addClass("checked")},onDialogShown:function(e,t){e.one("note.modal.show",t)},onDialogHidden:function(e,t){e.one("note.modal.hide",t)},showDialog:function(e){e.data("modal").show()},hideDialog:function(e){e.data("modal").hide()},getPopoverContent:function(e){return e.find(".note-popover-content")},getDialogBody:function(e){return e.find(".note-modal-body")},createLayout:function(t){var n=(e.airMode?mr([dr([hr(),gr()])]):"bottom"===e.toolbarPosition?cr([dr([hr(),pr()]),ur(),fr()]):cr([ur(),dr([hr(),pr()]),fr()])).render();return n.insertAfter(t),{note:t,editor:n,toolbar:n.find(".note-toolbar"),editingArea:n.find(".note-editing-area"),editable:n.find(".note-editable"),codable:n.find(".note-codable"),statusbar:n.find(".note-statusbar")}},removeLayout:function(e,t){e.html(t.editable.html()),t.editor.remove(),e.off("summernote"),e.show()}}},interface:"lite"}),{}})())),
|
|
583
582
|
/*!
|
|
584
583
|
* jQuery UI Disable Selection 1.13.3
|
|
585
584
|
* https://jqueryui.com
|