!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.signalR=e():t.signalR=e()}(window,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,(function(e){return t[e]}).bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);var o=n(1),r=(n.n(o),n(3));n.d(e,"VERSION",(function(){return r.VERSION})),n.d(e,"AbortError",(function(){return r.AbortError})),n.d(e,"HttpError",(function(){return r.HttpError})),n.d(e,"TimeoutError",(function(){return r.TimeoutError})),n.d(e,"HttpClient",(function(){return r.HttpClient})),n.d(e,"HttpResponse",(function(){return r.HttpResponse})),n.d(e,"DefaultHttpClient",(function(){return r.DefaultHttpClient})),n.d(e,"HubConnection",(function(){return r.HubConnection})),n.d(e,"HubConnectionState",(function(){return r.HubConnectionState})),n.d(e,"HubConnectionBuilder",(function(){return r.HubConnectionBuilder})),n.d(e,"MessageType",(function(){return r.MessageType})),n.d(e,"LogLevel",(function(){return r.LogLevel})),n.d(e,"HttpTransportType",(function(){return r.HttpTransportType})),n.d(e,"TransferFormat",(function(){return r.TransferFormat})),n.d(e,"NullLogger",(function(){return r.NullLogger})),n.d(e,"JsonHubProtocol",(function(){return r.JsonHubProtocol})),n.d(e,"Subject",(function(){return r.Subject})),Uint8Array.prototype.indexOf||Object.defineProperty(Uint8Array.prototype,"indexOf",{value:Array.prototype.indexOf,writable:!0}),Uint8Array.prototype.slice||Object.defineProperty(Uint8Array.prototype,"slice",{value:function(t,e){return new Uint8Array(Array.prototype.slice.call(this,t,e))},writable:!0}),Uint8Array.prototype.forEach||Object.defineProperty(Uint8Array.prototype,"forEach",{value:Array.prototype.forEach,writable:!0})},function(t,e,n){(function(e){t.exports=function(){"use strict";function t(t){return"function"==typeof t}var o=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},r=0,i=void 0,a=void 0,s=function(t,e){h[r]=t,h[r+1]=e,2===(r+=2)&&(a?a(v):w())},l="undefined"!=typeof window?window:void 0,c=l||{},u=c.MutationObserver||c.WebKitMutationObserver,f="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(v,1)}}var h=new Array(1e3);function v(){for(var t=0;t=200&&s.status<300?n(new i.HttpResponse(s.status,s.statusText,s.response||s.responseText)):o(new r.HttpError(s.statusText,s.status))},s.onerror=function(){e.logger.log(a.LogLevel.Warning,"Error from HTTP request. "+s.status+": "+s.statusText+"."),o(new r.HttpError(s.statusText,s.status))},s.ontimeout=function(){e.logger.log(a.LogLevel.Warning,"Timeout from HTTP request."),o(new r.TimeoutError)},s.send(t.content||"")})):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},e}(i.HttpClient)},function(t,e,n){"use strict";var o;n.r(e),n.d(e,"LogLevel",(function(){return o})),function(t){t[t.Trace=0]="Trace",t[t.Debug=1]="Debug",t[t.Information=2]="Information",t[t.Warning=3]="Warning",t[t.Error=4]="Error",t[t.Critical=5]="Critical",t[t.None=6]="None"}(o||(o={}))},function(t,e,n){"use strict";n.r(e),n.d(e,"HubConnectionState",(function(){return o})),n.d(e,"HubConnection",(function(){return f}));var o,r=n(11),i=n(15),a=n(9),s=n(16),l=n(13),c=function(t,e,n,o){return new(n||(n=Promise))((function(r,i){function a(t){try{l(o.next(t))}catch(e){i(e)}}function s(t){try{l(o.throw(t))}catch(e){i(e)}}function l(t){t.done?r(t.value):new n((function(e){e(t.value)})).then(a,s)}l((o=o.apply(t,e||[])).next())}))},u=function(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]a?i.slice(a).buffer:null}else{var s,l=t;if(-1===(s=l.indexOf(o.TextMessageFormat.RecordSeparator)))throw new Error("Message is incomplete.");e=l.substring(0,a=s+1),n=l.length>a?l.substring(a):null}var c=o.TextMessageFormat.parse(e),u=JSON.parse(c[0]);if(u.type)throw new Error("Expected a handshake response from the server.");return[n,u]},t}()},function(t,e,n){"use strict";n.r(e),n.d(e,"TextMessageFormat",(function(){return o}));var o=function(){function t(){}return t.write=function(e){return""+e+t.RecordSeparator},t.parse=function(e){if(e[e.length-1]!==t.RecordSeparator)throw new Error("Message is incomplete.");var n=e.split(t.RecordSeparator);return n.pop(),n},t.RecordSeparatorCode=30,t.RecordSeparator=String.fromCharCode(t.RecordSeparatorCode),t}()},function(t,e,n){"use strict";n.r(e),n.d(e,"Arg",(function(){return i})),n.d(e,"Platform",(function(){return a})),n.d(e,"getDataDetail",(function(){return s})),n.d(e,"formatArrayBuffer",(function(){return l})),n.d(e,"isArrayBuffer",(function(){return c})),n.d(e,"sendMessage",(function(){return u})),n.d(e,"createLogger",(function(){return f})),n.d(e,"SubjectSubscription",(function(){return p})),n.d(e,"ConsoleLogger",(function(){return d}));var o=n(9),r=n(14),i=function(){function t(){}return t.isRequired=function(t,e){if(null==t)throw new Error("The '"+e+"' argument is required.")},t.isIn=function(t,e,n){if(!(t in e))throw new Error("Unknown "+n+" value: "+t+".")},t}(),a=function(){function t(){}return Object.defineProperty(t,"isBrowser",{get:function(){return"object"==typeof window},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isWebWorker",{get:function(){return"object"==typeof self&&"importScripts"in self},enumerable:!0,configurable:!0}),Object.defineProperty(t,"isNode",{get:function(){return!this.isBrowser&&!this.isWebWorker},enumerable:!0,configurable:!0}),t}();function s(t,e){var n="";return c(t)?(n="Binary data of length "+t.byteLength,e&&(n+=". Content: '"+l(t)+"'")):"string"==typeof t&&(n="String data of length "+t.length,e&&(n+=". Content: '"+t+"'")),n}function l(t){var e=new Uint8Array(t),n="";return e.forEach((function(t){n+="0x"+(t<16?"0":"")+t.toString(16)+" "})),n.substr(0,n.length-1)}function c(t){return t&&"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||t.constructor&&"ArrayBuffer"===t.constructor.name)}function u(t,e,n,r,i,a,l){return u=this,void 0,p=function(){var u,f,p,d,h;return function(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]-1&&this.subject.observers.splice(t,1),0===this.subject.observers.length&&this.subject.cancelCallback&&this.subject.cancelCallback().catch((function(t){}))},t}(),d=function(){function t(t){this.minimumLogLevel=t,this.outputConsole=console}return t.prototype.log=function(t,e){if(t>=this.minimumLogLevel)switch(t){case o.LogLevel.Critical:case o.LogLevel.Error:this.outputConsole.error("["+(new Date).toISOString()+"] "+o.LogLevel[t]+": "+e);break;case o.LogLevel.Warning:this.outputConsole.warn("["+(new Date).toISOString()+"] "+o.LogLevel[t]+": "+e);break;case o.LogLevel.Information:this.outputConsole.info("["+(new Date).toISOString()+"] "+o.LogLevel[t]+": "+e);break;default:this.outputConsole.log("["+(new Date).toISOString()+"] "+o.LogLevel[t]+": "+e)}},t}()},function(t,e,n){"use strict";n.r(e),n.d(e,"NullLogger",(function(){return o}));var o=function(){function t(){}return t.prototype.log=function(t,e){},t.instance=new t,t}()},function(t,e,n){"use strict";var o;n.r(e),n.d(e,"MessageType",(function(){return o})),function(t){t[t.Invocation=1]="Invocation",t[t.StreamItem=2]="StreamItem",t[t.Completion=3]="Completion",t[t.StreamInvocation=4]="StreamInvocation",t[t.CancelInvocation=5]="CancelInvocation",t[t.Ping=6]="Ping",t[t.Close=7]="Close"}(o||(o={}))},function(t,e,n){"use strict";n.r(e),n.d(e,"Subject",(function(){return r}));var o=n(13),r=function(){function t(){this.observers=[]}return t.prototype.next=function(t){for(var e=0,n=this.observers;e0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]0?[2,Promise.reject(new Error("Unable to connect to the server with any of the available transports. "+a.join(" ")))]:[2,Promise.reject(new Error("None of the transports supported by the client are supported by the server."))]}}))}))},t.prototype.constructTransport=function(t){switch(t){case i.HttpTransportType.WebSockets:if(!this.options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new c.WebSocketTransport(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.WebSocket);case i.HttpTransportType.ServerSentEvents:if(!this.options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new s.ServerSentEventsTransport(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.EventSource);case i.HttpTransportType.LongPolling:return new a.LongPollingTransport(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1);default:throw new Error("Unknown transport: "+t+".")}},t.prototype.startTransport=function(t,e){var n=this;return this.transport.onreceive=this.onreceive,this.transport.onclose=function(t){return n.stopConnection(t)},this.transport.connect(t,e)},t.prototype.resolveTransportOrError=function(t,e,n){var o=i.HttpTransportType[t.transport];if(null==o)return this.logger.log(r.LogLevel.Debug,"Skipping transport '"+t.transport+"' because it is not supported by this client."),new Error("Skipping transport '"+t.transport+"' because it is not supported by this client.");if(!function(t,e){return!t||0!=(e&t)}(e,o))return this.logger.log(r.LogLevel.Debug,"Skipping transport '"+i.HttpTransportType[o]+"' because it was disabled by the client."),new Error("'"+i.HttpTransportType[o]+"' is disabled by the client.");if(!(t.transferFormats.map((function(t){return i.TransferFormat[t]})).indexOf(n)>=0))return this.logger.log(r.LogLevel.Debug,"Skipping transport '"+i.HttpTransportType[o]+"' because it does not support the requested transfer format '"+i.TransferFormat[n]+"'."),new Error("'"+i.HttpTransportType[o]+"' does not support "+i.TransferFormat[n]+".");if(o===i.HttpTransportType.WebSockets&&!this.options.WebSocket||o===i.HttpTransportType.ServerSentEvents&&!this.options.EventSource)return this.logger.log(r.LogLevel.Debug,"Skipping transport '"+i.HttpTransportType[o]+"' because it is not supported in your environment.'"),new Error("'"+i.HttpTransportType[o]+"' is not supported in your environment.");this.logger.log(r.LogLevel.Debug,"Selecting transport '"+i.HttpTransportType[o]+"'.");try{return this.constructTransport(o)}catch(a){return a}},t.prototype.isITransport=function(t){return t&&"object"==typeof t&&"connect"in t},t.prototype.stopConnection=function(t){var e=this;if(this.logger.log(r.LogLevel.Debug,"HttpConnection.stopConnection("+t+") called while in state "+this.connectionState+"."),this.transport=void 0,t=this.stopError||t,this.stopError=void 0,"Disconnected"!==this.connectionState)if("Connecting "!==this.connectionState){if("Disconnecting"===this.connectionState&&this.stopPromiseResolver(),t?this.logger.log(r.LogLevel.Error,"Connection disconnected with error '"+t+"'."):this.logger.log(r.LogLevel.Information,"Connection disconnected."),this.sendQueue&&(this.sendQueue.stop().catch((function(t){e.logger.log(r.LogLevel.Error,"TransportSendQueue.stop() threw error '"+t+"'.")})),this.sendQueue=void 0),this.connectionId=void 0,this.connectionState="Disconnected",this.connectionStarted){this.connectionStarted=!1;try{this.onclose&&this.onclose(t)}catch(n){this.logger.log(r.LogLevel.Error,"HttpConnection.onclose("+t+") threw error '"+n+"'.")}}}else this.logger.log(r.LogLevel.Warning,"Call to HttpConnection.stopConnection("+t+") was ignored because the connection hasn't yet left the in the connecting state.");else this.logger.log(r.LogLevel.Debug,"Call to HttpConnection.stopConnection("+t+") was ignored because the connection is already in the disconnected state.")},t.prototype.resolveUrl=function(t){if(0===t.lastIndexOf("https://",0)||0===t.lastIndexOf("http://",0))return t;if(!l.Platform.isBrowser||!window.document)throw new Error("Cannot resolve '"+t+"'.");var e=window.document.createElement("a");return e.href=t,this.logger.log(r.LogLevel.Information,"Normalizing '"+t+"' to '"+e.href+"'."),e.href},t.prototype.resolveNegotiateUrl=function(t){var e=t.indexOf("?"),n=t.substring(0,-1===e?t.length:e);return"/"!==n[n.length-1]&&(n+="/"),n+="negotiate",-1===(n+=-1===e?"":t.substring(e)).indexOf("negotiateVersion")&&(n+=-1===e?"?":"&",n+="negotiateVersion="+this.negotiateVersion),n},t}(),g=function(){function t(t){this.transport=t,this.buffer=[],this.executing=!0,this.sendBufferedData=new y,this.transportResult=new y,this.sendLoopPromise=this.sendLoop()}return t.prototype.send=function(t){return this.bufferData(t),this.transportResult||(this.transportResult=new y),this.transportResult.promise},t.prototype.stop=function(){return this.executing=!1,this.sendBufferedData.resolve(),this.sendLoopPromise},t.prototype.bufferData=function(t){if(this.buffer.length&&typeof this.buffer[0]!=typeof t)throw new Error("Expected data to be of type "+typeof this.buffer+" but was of type "+typeof t);this.buffer.push(t),this.sendBufferedData.resolve()},t.prototype.sendLoop=function(){return u(this,void 0,void 0,(function(){var e,n,o;return f(this,(function(r){switch(r.label){case 0:return[4,this.sendBufferedData.promise];case 1:if(r.sent(),!this.executing)return this.transportResult&&this.transportResult.reject("Connection stopped."),[3,6];this.sendBufferedData=new y,e=this.transportResult,this.transportResult=void 0,n="string"==typeof this.buffer[0]?this.buffer.join(""):t.concatBuffers(this.buffer),this.buffer.length=0,r.label=2;case 2:return r.trys.push([2,4,,5]),[4,this.transport.send(n)];case 3:return r.sent(),e.resolve(),[3,5];case 4:return o=r.sent(),e.reject(o),[3,5];case 5:return[3,0];case 6:return[2]}}))}))},t.concatBuffers=function(t){for(var e=t.map((function(t){return t.byteLength})).reduce((function(t,e){return t+e})),n=new Uint8Array(e),o=0,r=0,i=t;r0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]t.db.version;if(t.versiont.version&&(t.version=r)}return!0}return!1}function _(t){return i([function(t){for(var e=t.length,n=new ArrayBuffer(e),o=new Uint8Array(n),r=0;r0&&(!t.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return a.resolve().then((function(){if(!t.db||"NotFoundError"===i.name&&!t.db.objectStoreNames.contains(t.storeName)&&t.version<=t.db.version)return t.db&&(t.version=t.db.version+1),b(t)})).then((function(){return function(t){h(t);for(var e=p[t.name],n=e.forages,o=0;o=43)}})).catch((function(){return!1}))}(t).then((function(t){return f=t}))}(s.db).then((function(t){return t?e:(n=e,new a((function(t,e){var o=new FileReader;o.onerror=e,o.onloadend=function(e){var o=btoa(e.target.result||"");t({__local_forage_encoded_blob:!0,data:o,type:n.type})},o.readAsBinaryString(n)})));var n})):e})).then((function(e){E(o._dbInfo,"readwrite",(function(i,a){if(i)return r(i);try{var s=a.objectStore(o._dbInfo.storeName);null===e&&(e=void 0);var l=s.put(e,t);a.oncomplete=function(){void 0===e&&(e=null),n(e)},a.onabort=a.onerror=function(){r(l.error?l.error:l.transaction.error)}}catch(c){r(c)}}))})).catch(r)}));return s(r,n),r},removeItem:function(t,e){var n=this;t=c(t);var o=new a((function(e,o){n.ready().then((function(){E(n._dbInfo,"readwrite",(function(r,i){if(r)return o(r);try{var a=i.objectStore(n._dbInfo.storeName).delete(t);i.oncomplete=function(){e()},i.onerror=function(){o(a.error)},i.onabort=function(){o(a.error?a.error:a.transaction.error)}}catch(s){o(s)}}))})).catch(o)}));return s(o,e),o},clear:function(t){var e=this,n=new a((function(t,n){e.ready().then((function(){E(e._dbInfo,"readwrite",(function(o,r){if(o)return n(o);try{var i=r.objectStore(e._dbInfo.storeName).clear();r.oncomplete=function(){t()},r.onabort=r.onerror=function(){n(i.error?i.error:i.transaction.error)}}catch(a){n(a)}}))})).catch(n)}));return s(n,t),n},length:function(t){var e=this,n=new a((function(t,n){e.ready().then((function(){E(e._dbInfo,"readonly",(function(o,r){if(o)return n(o);try{var i=r.objectStore(e._dbInfo.storeName).count();i.onsuccess=function(){t(i.result)},i.onerror=function(){n(i.error)}}catch(a){n(a)}}))})).catch(n)}));return s(n,t),n},key:function(t,e){var n=this,o=new a((function(e,o){t<0?e(null):n.ready().then((function(){E(n._dbInfo,"readonly",(function(r,i){if(r)return o(r);try{var a=i.objectStore(n._dbInfo.storeName),s=!1,l=a.openKeyCursor();l.onsuccess=function(){var n=l.result;n?0===t||s?e(n.key):(s=!0,n.advance(t)):e(null)},l.onerror=function(){o(l.error)}}catch(c){o(c)}}))})).catch(o)}));return s(o,e),o},keys:function(t){var e=this,n=new a((function(t,n){e.ready().then((function(){E(e._dbInfo,"readonly",(function(o,r){if(o)return n(o);try{var i=r.objectStore(e._dbInfo.storeName).openKeyCursor(),a=[];i.onsuccess=function(){var e=i.result;e?(a.push(e.key),e.continue()):t(a)},i.onerror=function(){n(i.error)}}catch(s){n(s)}}))})).catch(n)}));return s(n,t),n},dropInstance:function(t,e){e=u.apply(this,arguments);var n=this.config();(t="function"!=typeof t&&t||{}).name||(t.name=t.name||n.name,t.storeName=t.storeName||n.storeName);var o,i=this;if(t.name){var l=t.name===n.name&&i._dbInfo.db,c=l?a.resolve(i._dbInfo.db):m(t).then((function(e){var n=p[t.name],o=n.forages;n.db=e;for(var r=0;r>4,u[l++]=(15&o)<<4|r>>2,u[l++]=(3&r)<<6|63&i;return c}function P(t){var e,n=new Uint8Array(t),o="";for(e=0;e>2],o+=S[(3&n[e])<<4|n[e+1]>>4],o+=S[(15&n[e+1])<<2|n[e+2]>>6],o+=S[63&n[e+2]];return n.length%3==2?o=o.substring(0,o.length-1)+"=":n.length%3==1&&(o=o.substring(0,o.length-2)+"=="),o}var j={serialize:function(t,e){var n="";if(t&&(n=N.call(t)),t&&("[object ArrayBuffer]"===n||t.buffer&&"[object ArrayBuffer]"===N.call(t.buffer))){var o,r="__lfsc__:";t instanceof ArrayBuffer?(o=t,r+="arbf"):(o=t.buffer,"[object Int8Array]"===n?r+="si08":"[object Uint8Array]"===n?r+="ui08":"[object Uint8ClampedArray]"===n?r+="uic8":"[object Int16Array]"===n?r+="si16":"[object Uint16Array]"===n?r+="ur16":"[object Int32Array]"===n?r+="si32":"[object Uint32Array]"===n?r+="ui32":"[object Float32Array]"===n?r+="fl32":"[object Float64Array]"===n?r+="fl64":e(new Error("Failed to get type for BinaryArray"))),e(r+P(o))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var n="~~local_forage_type~"+t.type+"~"+P(this.result);e("__lfsc__:blob"+n)},i.readAsArrayBuffer(t)}else try{e(JSON.stringify(t))}catch(a){console.error("Couldn't convert value into a JSON string: ",t),e(null,a)}},deserialize:function(t){if("__lfsc__:"!==t.substring(0,C))return JSON.parse(t);var e,n=t.substring(A),o=t.substring(C,A);if("blob"===o&&x.test(n)){var r=n.match(x);e=r[1],n=n.substring(r[0].length)}var a=L(n);switch(o){case"arbf":return a;case"blob":return i([a],{type:e});case"si08":return new Int8Array(a);case"ui08":return new Uint8Array(a);case"uic8":return new Uint8ClampedArray(a);case"si16":return new Int16Array(a);case"ur16":return new Uint16Array(a);case"si32":return new Int32Array(a);case"ui32":return new Uint32Array(a);case"fl32":return new Float32Array(a);case"fl64":return new Float64Array(a);default:throw new Error("Unkown type: "+o)}},stringToBuffer:L,bufferToString:P};function I(t,e,n,o){t.executeSql("CREATE TABLE IF NOT EXISTS "+e.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,o)}function D(t,e,n,o,r,i){t.executeSql(n,o,r,(function(t,a){a.code===a.SYNTAX_ERR?t.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[e.storeName],(function(t,s){s.rows.length?i(t,a):I(t,e,(function(){t.executeSql(n,o,r,i)}),i)}),i):i(t,a)}),i)}function q(t,e,n,o){var r=this;t=c(t);var i=new a((function(i,a){r.ready().then((function(){void 0===e&&(e=null);var s=e,l=r._dbInfo;l.serializer.serialize(e,(function(e,c){c?a(c):l.db.transaction((function(n){D(n,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[t,e],(function(){i(s)}),(function(t,e){a(e)}))}),(function(e){if(e.code===e.QUOTA_ERR){if(o>0)return void i(q.apply(r,[t,s,n,o-1]));a(e)}}))}))})).catch(a)}));return s(i,n),i}function R(t){return new a((function(e,n){t.transaction((function(o){o.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,o){for(var r=[],i=0;i0?(this._dbInfo=e,e.serializer=j,a.resolve()):a.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(t){return!1}}(),iterate:function(t,e){var n=this,o=n.ready().then((function(){for(var e=n._dbInfo,o=e.keyPrefix,r=o.length,i=localStorage.length,a=1,s=0;s=0;n--){var o=localStorage.key(n);0===o.indexOf(t)&&localStorage.removeItem(o)}}));return s(n,t),n},length:function(t){var e=this.keys().then((function(t){return t.length}));return s(e,t),e},key:function(t,e){var n=this,o=n.ready().then((function(){var e,o=n._dbInfo;try{e=localStorage.key(t)}catch(r){e=null}return e&&(e=e.substring(o.keyPrefix.length)),e}));return s(o,e),o},keys:function(t){var e=this,n=e.ready().then((function(){for(var t=e._dbInfo,n=localStorage.length,o=[],r=0;r=0;e--){var n=localStorage.key(e);0===n.indexOf(t)&&localStorage.removeItem(n)}})):a.reject("Invalid arguments"),e),o}},H=function(t,e){for(var n,o,r=t.length,i=0;i0?this._requestWithCallback.apply(this,arguments):this._requestAsPromise()}},{key:"_requestWithCallback",value:function(t,e){var n,o=this,r=this.get(),i=!1,a=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o._win.Notification.permission;i||(i=!0,void 0===n&&o._win.webkitNotifications&&(n=o._win.webkitNotifications.checkPermission()),n===o.GRANTED||0===n?t&&t():e&&e())};r!==this.DEFAULT?a(r):this._win.webkitNotifications&&this._win.webkitNotifications.checkPermission?this._win.webkitNotifications.requestPermission(a):this._win.Notification&&this._win.Notification.requestPermission?(n=this._win.Notification.requestPermission(a))&&n.then&&n.then(a).catch((function(){e&&e()})):t&&t()}},{key:"_requestAsPromise",value:function(){var t=this,e=this.get(),n=e!==this.DEFAULT,o=this._win.Notification&&this._win.Notification.requestPermission,r=this._win.webkitNotifications&&this._win.webkitNotifications.checkPermission;return new Promise((function(i,a){var s,l=!1,c=function(e){l||(l=!0,function(e){return e===t.GRANTED||0===e}(e)?i():a())};n?c(e):r?t._win.webkitNotifications.requestPermission((function(t){c(t)})):o?(s=t._win.Notification.requestPermission(c))&&s.then&&s.then(c).catch(a):i()}))}},{key:"has",value:function(){return this.get()===this.GRANTED}},{key:"get",value:function(){return this._win.Notification&&this._win.Notification.permission?this._win.Notification.permission:this._win.webkitNotifications&&this._win.webkitNotifications.checkPermission?this._permissions[this._win.webkitNotifications.checkPermission()]:navigator.mozNotification?this.GRANTED:this._win.external&&this._win.external.msIsSiteMode?this._win.external.msIsSiteMode()?this.GRANTED:this.DEFAULT:this.GRANTED}}]),t}(),c=function(){function t(){n(this,t)}return r(t,null,[{key:"isUndefined",value:function(t){return void 0===t}},{key:"isNull",value:function(t){return null===obj}},{key:"isString",value:function(t){return"string"==typeof t}},{key:"isFunction",value:function(t){return t&&"[object Function]"==={}.toString.call(t)}},{key:"isObject",value:function(t){return"object"===e(t)}},{key:"objectMerge",value:function(t,e){for(var n in e)t.hasOwnProperty(n)&&this.isObject(t[n])&&this.isObject(e[n])?this.objectMerge(t[n],e[n]):t[n]=e[n]}}]),t}(),u=function t(e){n(this,t),this._win=e},f=function(t){function e(){return n(this,e),s(this,a(e).apply(this,arguments))}return i(e,u),r(e,[{key:"isSupported",value:function(){return void 0!==this._win.Notification}},{key:"create",value:function(t,e){return new this._win.Notification(t,{icon:c.isString(e.icon)||c.isUndefined(e.icon)||c.isNull(e.icon)?e.icon:e.icon.x32,body:e.body,tag:e.tag,requireInteraction:e.requireInteraction})}},{key:"close",value:function(t){t.close()}}]),e}(),p=function(e){function o(){return n(this,o),s(this,a(o).apply(this,arguments))}return i(o,u),r(o,[{key:"isSupported",value:function(){return void 0!==this._win.navigator&&void 0!==this._win.navigator.serviceWorker}},{key:"getFunctionBody",value:function(t){var e=t.toString().match(/function[^{]+{([\s\S]*)}$/);return null!=e&&e.length>1?e[1]:null}},{key:"create",value:function(e,n,o,r,i){var a=this;this._win.navigator.serviceWorker.register(r),this._win.navigator.serviceWorker.ready.then((function(r){var s={id:e,link:o.link,origin:document.location.href,onClick:c.isFunction(o.onClick)?a.getFunctionBody(o.onClick):"",onClose:c.isFunction(o.onClose)?a.getFunctionBody(o.onClose):""};null!=o.data&&(s=Object.assign(s,o.data)),r.showNotification(n,{icon:o.icon,body:o.body,vibrate:o.vibrate,tag:o.tag,data:s,requireInteraction:o.requireInteraction,silent:o.silent}).then((function(){r.getNotifications().then((function(t){r.active.postMessage(""),i(t)}))})).catch((function(e){throw new Error(t.errors.sw_notification_error+e.message)}))})).catch((function(e){throw new Error(t.errors.sw_registration_error+e.message)}))}},{key:"close",value:function(){}}]),o}(),d=function(t){function e(){return n(this,e),s(this,a(e).apply(this,arguments))}return i(e,u),r(e,[{key:"isSupported",value:function(){return void 0!==this._win.navigator.mozNotification}},{key:"create",value:function(t,e){var n=this._win.navigator.mozNotification.createNotification(t,e.body,e.icon);return n.show(),n}}]),e}(),h=function(t){function e(){return n(this,e),s(this,a(e).apply(this,arguments))}return i(e,u),r(e,[{key:"isSupported",value:function(){return void 0!==this._win.external&&void 0!==this._win.external.msIsSiteMode}},{key:"create",value:function(t,e){return this._win.external.msSiteModeClearIconOverlay(),this._win.external.msSiteModeSetIconOverlay(c.isString(e.icon)||c.isUndefined(e.icon)?e.icon:e.icon.x16,t),this._win.external.msSiteModeActivate(),null}},{key:"close",value:function(){this._win.external.msSiteModeClearIconOverlay()}}]),e}(),v=function(t){function e(){return n(this,e),s(this,a(e).apply(this,arguments))}return i(e,u),r(e,[{key:"isSupported",value:function(){return void 0!==this._win.webkitNotifications}},{key:"create",value:function(t,e){var n=this._win.webkitNotifications.createNotification(e.icon,t,e.body);return n.show(),n}},{key:"close",value:function(t){t.cancel()}}]),e}();return new(function(){function e(t){n(this,e),this._currentId=0,this._notifications={},this._win=t,this.Permission=new l(t),this._agents={desktop:new f(t),chrome:new p(t),firefox:new d(t),ms:new h(t),webkit:new v(t)},this._configuration={serviceWorker:"/serviceWorker.min.js",fallback:function(t){}}}return r(e,[{key:"_closeNotification",value:function(e){var n=!0,o=this._notifications[e];if(void 0!==o){if(n=this._removeNotification(e),this._agents.desktop.isSupported())this._agents.desktop.close(o);else if(this._agents.webkit.isSupported())this._agents.webkit.close(o);else{if(!this._agents.ms.isSupported())throw n=!1,new Error(t.errors.unknown_interface);this._agents.ms.close()}return n}return!1}},{key:"_addNotification",value:function(t){var e=this._currentId;return this._notifications[e]=t,this._currentId++,e}},{key:"_removeNotification",value:function(t){var e=!1;return this._notifications.hasOwnProperty(t)&&(delete this._notifications[t],e=!0),e}},{key:"_prepareNotification",value:function(t,e){var n,o=this;return n={get:function(){return o._notifications[t]},close:function(){o._closeNotification(t)}},e.timeout&&setTimeout((function(){n.close()}),e.timeout),n}},{key:"_serviceWorkerCallback",value:function(t,e,n){var o=this,r=this._addNotification(t[t.length-1]);navigator&&navigator.serviceWorker&&(navigator.serviceWorker.addEventListener("message",(function(t){var e=JSON.parse(t.data);"close"===e.action&&Number.isInteger(e.id)&&o._removeNotification(e.id)})),n(this._prepareNotification(r,e))),n(null)}},{key:"_createCallback",value:function(t,e,n){var o,r=this,i=null;if(e=e||{},o=function(t){r._removeNotification(t),c.isFunction(e.onClose)&&e.onClose.call(r,i)},this._agents.desktop.isSupported())try{i=this._agents.desktop.create(t,e)}catch(o){var a=this._currentId,s=this.config().serviceWorker;this._agents.chrome.isSupported()&&this._agents.chrome.create(a,t,e,s,(function(t){return r._serviceWorkerCallback(t,e,n)}))}else this._agents.webkit.isSupported()?i=this._agents.webkit.create(t,e):this._agents.firefox.isSupported()?this._agents.firefox.create(t,e):this._agents.ms.isSupported()?i=this._agents.ms.create(t,e):(e.title=t,this.config().fallback(e));if(null!==i){var l=this._addNotification(i),u=this._prepareNotification(l,e);c.isFunction(e.onShow)&&i.addEventListener("show",e.onShow),c.isFunction(e.onError)&&i.addEventListener("error",e.onError),c.isFunction(e.onClick)&&i.addEventListener("click",e.onClick),i.addEventListener("close",(function(){o(l)})),i.addEventListener("cancel",(function(){o(l)})),n(u)}n(null)}},{key:"create",value:function(e,n){var o,r=this;if(!c.isString(e))throw new Error(t.errors.invalid_title);return o=this.Permission.has()?function(t,o){try{r._createCallback(e,n,t)}catch(t){o(t)}}:function(o,i){r.Permission.request().then((function(){r._createCallback(e,n,o)})).catch((function(){i(t.errors.permission_denied)}))},new Promise(o)}},{key:"count",value:function(){var t,e=0;for(t in this._notifications)this._notifications.hasOwnProperty(t)&&e++;return e}},{key:"close",value:function(t){var e;for(e in this._notifications)if(this._notifications.hasOwnProperty(e)&&this._notifications[e].tag===t)return this._closeNotification(e)}},{key:"clear",value:function(){var t,e=!0;for(t in this._notifications)this._notifications.hasOwnProperty(t)&&(e=e&&this._closeNotification(t));return e}},{key:"supported",value:function(){var t=!1;for(var e in this._agents)this._agents.hasOwnProperty(e)&&(t=t||this._agents[e].isSupported());return t}},{key:"config",value:function(t){return(void 0!==t||null!==t&&c.isObject(t))&&c.objectMerge(this._configuration,t),this._configuration}},{key:"extend",value:function(e){var n,o={}.hasOwnProperty;if(!o.call(e,"plugin"))throw new Error(t.errors.invalid_plugin);for(var r in o.call(e,"config")&&c.isObject(e.config)&&null!==e.config&&this.config(e.config),n=new(0,e.plugin)(this.config()))o.call(n,r)&&c.isFunction(n[r])&&(this[r]=n[r])}}]),e}())("undefined"!=typeof window?window:global)})),function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Quill=e():t.Quill=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=109)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),r=n(18),i=n(19),a=n(45),s=n(46),l=n(47),c=n(48),u=n(49),f=n(12),p=n(32),d=n(33),h=n(31),v=n(1);e.default={Scope:v.Scope,create:v.create,find:v.find,query:v.query,register:v.register,Container:o.default,Format:r.default,Leaf:i.default,Embed:c.default,Scroll:a.default,Block:l.default,Inline:s.default,Text:u.default,Attributor:{Attribute:f.default,Class:p.default,Style:d.default,Store:h.default}}},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e){var n=this;return(n=t.call(this,e="[Parchment] "+e)||this).message=e,n.name=n.constructor.name,n}return r(e,t),e}(Error);e.ParchmentError=i;var a,s={},l={},c={},u={};function f(t,e){var n;if(void 0===e&&(e=a.ANY),"string"==typeof t)n=u[t]||s[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=u.text;else if("number"==typeof t)t&a.LEVEL&a.BLOCK?n=u.block:t&a.LEVEL&a.INLINE&&(n=u.inline);else if(t instanceof HTMLElement){var o=(t.getAttribute("class")||"").split(/\s+/);for(var r in o)if(n=l[o[r]])break;n=n||c[t.tagName]}return null==n?null:e&a.LEVEL&n.scope&&e&a.TYPE&n.scope?n:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(a=e.Scope||(e.Scope={})),e.create=function(t,e){var n=f(t);if(null==n)throw new i("Unable to create "+t+" blot");var o=n,r=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:o.create(e);return new o(r,e)},e.find=function t(n,o){return void 0===o&&(o=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:o?t(n.parentNode,o):null},e.query=f,e.register=function t(){for(var e=[],n=0;n1)return e.map((function(e){return t(e)}));var o=e[0];if("string"!=typeof o.blotName&&"string"!=typeof o.attrName)throw new i("Invalid definition");if("abstract"===o.blotName)throw new i("Cannot register abstract class");if(u[o.blotName||o.attrName]=o,"string"==typeof o.keyName)s[o.keyName]=o;else if(null!=o.className&&(l[o.className]=o),null!=o.tagName){o.tagName=Array.isArray(o.tagName)?o.tagName.map((function(t){return t.toUpperCase()})):o.tagName.toUpperCase();var r=Array.isArray(o.tagName)?o.tagName:[o.tagName];r.forEach((function(t){null!=c[t]&&null!=o.className||(c[t]=o)}))}return o}},function(t,e,n){var o=n(51),r=n(11),i=n(3),a=n(20),s=String.fromCharCode(0),l=function(t){this.ops=Array.isArray(t)?t:null!=t&&Array.isArray(t.ops)?t.ops:[]};l.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},l.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},l.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},l.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=i(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&"object"!=typeof(n=this.ops[(e-=1)-1]))return this.ops.unshift(t),this;if(r(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},l.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},l.prototype.filter=function(t){return this.ops.filter(t)},l.prototype.forEach=function(t){this.ops.forEach(t)},l.prototype.map=function(t){return this.ops.map(t)},l.prototype.partition=function(t){var e=[],n=[];return this.forEach((function(o){(t(o)?e:n).push(o)})),[e,n]},l.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},l.prototype.changeLength=function(){return this.reduce((function(t,e){return e.insert?t+a.length(e):e.delete?t-e.delete:t}),0)},l.prototype.length=function(){return this.reduce((function(t,e){return t+a.length(e)}),0)},l.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],o=a.iterator(this.ops),r=0;r0&&n.next(i.retain-s)}for(var c=new l(o);e.hasNext()||n.hasNext();)if("insert"===n.peekType())c.push(n.next());else if("delete"===e.peekType())c.push(e.next());else{var u=Math.min(e.peekLength(),n.peekLength()),f=e.next(u),p=n.next(u);if("number"==typeof p.retain){var d={};"number"==typeof f.retain?d.retain=u:d.insert=f.insert;var h=a.attributes.compose(f.attributes,p.attributes,"number"==typeof f.retain);if(h&&(d.attributes=h),c.push(d),!n.hasNext()&&r(c.ops[c.ops.length-1],d)){var v=new l(e.rest());return c.concat(v).chop()}}else"number"==typeof p.delete&&"number"==typeof f.retain&&c.push(p)}return c.chop()},l.prototype.concat=function(t){var e=new l(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},l.prototype.diff=function(t,e){if(this.ops===t.ops)return new l;var n=[this,t].map((function(e){return e.map((function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:s;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")})).join("")})),i=new l,c=o(n[0],n[1],e),u=a.iterator(this.ops),f=a.iterator(t.ops);return c.forEach((function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case o.INSERT:n=Math.min(f.peekLength(),e),i.push(f.next(n));break;case o.DELETE:n=Math.min(e,u.peekLength()),u.next(n),i.delete(n);break;case o.EQUAL:n=Math.min(u.peekLength(),f.peekLength(),e);var s=u.next(n),l=f.next(n);r(s.insert,l.insert)?i.retain(n,a.attributes.diff(s.attributes,l.attributes)):i.push(l).delete(n)}e-=n}})),i.chop()},l.prototype.eachLine=function(t,e){e=e||"\n";for(var n=a.iterator(this.ops),o=new l,r=0;n.hasNext();){if("insert"!==n.peekType())return;var i=n.peek(),s=a.length(i)-n.peekLength(),c="string"==typeof i.insert?i.insert.indexOf(e,s)-s:-1;if(c<0)o.push(n.next());else if(c>0)o.push(n.next(c));else{if(!1===t(o,n.next(1).attributes||{},r))return;r+=1,o=new l}}o.length()>0&&t(o,{},r)},l.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=a.iterator(this.ops),o=a.iterator(t.ops),r=new l;n.hasNext()||o.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===o.peekType())if("insert"===o.peekType())r.push(o.next());else{var i=Math.min(n.peekLength(),o.peekLength()),s=n.next(i),c=o.next(i);if(s.delete)continue;c.delete?r.push(c):r.retain(i,a.attributes.transform(s.attributes,c.attributes,e))}else r.retain(a.length(n.next()));return r.chop()},l.prototype.transformPosition=function(t,e){e=!!e;for(var n=a.iterator(this.ops),o=0;n.hasNext()&&o<=t;){var r=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(o0&&(t1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var o=this.clone();return 0===t?(this.parent.insertBefore(o,this),this):(this.parent.insertBefore(o,this.next),o)}var i=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},i}}]),e}(s.default.Block);function y(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,i.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:y(t.parent,e))}g.blotName="block",g.tagName="P",g.defaultChild="break",g.allowedChildren=[c.default,s.default.Embed,u.default],e.bubbleFormats=y,e.BlockEmbed=v,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(l){r=!0,i=l}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(m(this,t),this.options=_(e,o),this.container=this.options.container,null==this.container)return b.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new l.default,this.scroll=u.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new s.default(this.scroll),this.selection=new p.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(t){t===l.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())})),this.emitter.on(l.default.events.SCROLL_UPDATE,(function(t,e){var o=n.selection.lastRange,r=o&&0===o.length?o.index:void 0;k.call(n,(function(){return n.editor.update(null,e,r)}),t)}));var i=this.clipboard.convert("
"+r+"


");this.setContents(i),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return i(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),h.default.level(t)}},{key:"find",value:function(t){return t.__quill||u.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&b.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var r=t.attrName||t.blotName;"string"==typeof r?this.register("formats/"+r,t,e):Object.keys(t).forEach((function(o){n.register(o,t[o],e)}))}else null==this.imports[t]||o||b.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?u.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),i(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var o=this,i=T(t,e,n),a=r(i,4);return k.call(this,(function(){return o.editor.deleteText(t,e)}),n=a[3],t=a[0],-1*(e=a[1]))}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;return k.call(this,(function(){var o=n.getSelection(!0),r=new a.default;if(null==o)return r;if(u.default.query(t,u.default.Scope.BLOCK))r=n.editor.formatLine(o.index,o.length,y({},t,e));else{if(0===o.length)return n.selection.format(t,e),r;r=n.editor.formatText(o.index,o.length,y({},t,e))}return n.setSelection(o,l.default.sources.SILENT),r}),o)}},{key:"formatLine",value:function(t,e,n,o,i){var a,s=this,l=T(t,e,n,o,i),c=r(l,4);return e=c[1],a=c[2],k.call(this,(function(){return s.editor.formatLine(t,e,a)}),i=c[3],t=c[0],0)}},{key:"formatText",value:function(t,e,n,o,i){var a,s=this,l=T(t,e,n,o,i),c=r(l,4);return e=c[1],a=c[2],k.call(this,(function(){return s.editor.formatText(t,e,a)}),i=c[3],t=c[0],0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var o=this.container.getBoundingClientRect();return{bottom:n.bottom-o.top,height:n.height,left:n.left-o.left,right:n.right-o.left,top:n.top-o.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=T(t,e),o=r(n,2);return this.editor.getContents(t=o[0],e=o[1])}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=T(t,e),o=r(n,2);return this.editor.getText(t=o[0],e=o[1])}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,o){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return k.call(this,(function(){return r.editor.insertEmbed(e,n,o)}),i,e)}},{key:"insertText",value:function(t,e,n,o,i){var a,s=this,l=T(t,0,n,o,i),c=r(l,4);return a=c[2],k.call(this,(function(){return s.editor.insertText(t,e,a)}),i=c[3],t=c[0],e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var o=this,i=T(t,e,n),a=r(i,4);return e=a[1],k.call(this,(function(){return o.editor.removeFormat(t,e)}),n=a[3],t=a[0])}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return k.call(this,(function(){t=new a.default(t);var n=e.getLength(),o=e.editor.deleteText(0,n),r=e.editor.applyDelta(t),i=r.ops[r.ops.length-1];return null!=i&&"string"==typeof i.insert&&"\n"===i.insert[i.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),r.delete(1)),o.compose(r)}),n)}},{key:"setSelection",value:function(e,n,o){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var i=T(e,n,o),a=r(i,4);o=a[3],this.selection.setRange(new f.Range(e=a[0],n=a[1]),o),o!==l.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API,n=(new a.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.default.sources.API;return k.call(this,(function(){return t=new a.default(t),e.editor.applyDelta(t,n)}),n,!0)}}]),t}();function _(t,e){if((e=(0,d.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==w.DEFAULTS.theme){if(e.theme=w.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=v.default;var n=(0,d.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach((function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach((function(e){!0===t.modules[e]&&(t.modules[e]={})}))}));var o=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce((function(t,e){var n=w.import("modules/"+e);return null==n?b.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t}),{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,d.default)(!0,{},w.DEFAULTS,{modules:o},n,e),["bounds","container","scrollingContainer"].forEach((function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))})),e.modules=Object.keys(e.modules).reduce((function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t}),{}),e}function k(t,e,n,o){if(this.options.strict&&!this.isEnabled()&&e===l.default.sources.USER)return new a.default;var r=null==n?null:this.getSelection(),i=this.editor.delta,s=t();if(null!=r&&(!0===n&&(n=r.index),null==o?r=E(r,s,e):0!==o&&(r=E(r,n,o,e)),this.setSelection(r,l.default.sources.SILENT)),s.length()>0){var c,u,f=[l.default.events.TEXT_CHANGE,s,i,e];(c=this.emitter).emit.apply(c,[l.default.events.EDITOR_CHANGE].concat(f)),e!==l.default.sources.SILENT&&(u=this.emitter).emit.apply(u,f)}return s}function T(t,e,n,r,i){var a={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(i=r,r=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(i=r,r=n,n=e,e=0),"object"===(void 0===n?"undefined":o(n))?(a=n,i=r):"string"==typeof n&&(null!=r?a[n]=r:i=n),[t,e,a,i=i||l.default.sources.API]}function E(t,e,n,o){if(null==t)return null;var i=void 0,s=void 0;if(e instanceof a.default){var c=[t.index,t.index+t.length].map((function(t){return e.transformPosition(t,o!==l.default.sources.USER)})),u=r(c,2);i=u[0],s=u[1]}else{var p=[t.index,t.index+t.length].map((function(t){return t=0?t+n:Math.max(e,t+n)})),d=r(p,2);i=d[0],s=d[1]}return new f.Range(i,s-i)}w.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},w.events=l.default.events,w.sources=l.default.sources,w.version="1.3.7",w.imports={delta:a.default,parchment:u.default,"core/module":c.default,"core/theme":v.default},e.expandConfig=_,e.overload=T,e.default=w},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var o=e.order.indexOf(t),r=e.order.indexOf(n);return o>=0||r>=0?o-r:t===n?0:t1?e-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:{};o(this,t),this.quill=e,this.options=n};r.DEFAULTS={},e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=["error","warn","log","info"],r="warn";function i(t){if(o.indexOf(t)<=o.indexOf(r)){for(var e,n=arguments.length,i=Array(n>1?n-1:0),a=1;a=0;c--)if(f[c]!=p[c])return!1;for(c=f.length-1;c>=0;c--)if(!a(t[u=f[c]],e[u],n))return!1;return typeof t==typeof e}(t,e,n))};function s(t){return null==t}function l(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length||"function"!=typeof t.copy||"function"!=typeof t.slice||t.length>0&&"number"!=typeof t[0])}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e,this.scope=null!=n.scope?n.scope&o.Scope.LEVEL|o.Scope.TYPE&o.Scope.ATTRIBUTE:o.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,(function(t){return t.name}))},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=o.query(t,o.Scope.BLOT&(this.scope|o.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(l){r=!0,i=l}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n=t+n)){var a=this.newlineIndex(t,!0)+1,l=i-a+1,c=this.isolate(a,l),u=c.next;c.format(o,r),u instanceof e&&u.formatAt(0,t-a+n-l,o,r)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var r=this.descendant(u.default,t),i=o(r,2);i[0].insertAt(i[1],e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var n=this.domNode.textContent.slice(t).indexOf("\n");return n>-1?t+n:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(s.default.create("text","\n")),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach((function(t){var e=s.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof s.default.Embed?e.remove():e.unwrap()}))}}],[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}(l.default);g.blotName="code-block",g.tagName="PRE",g.TAB=" ",e.Code=v,e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(l){r=!0,i=l}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n=i&&!d.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,d);var h=e.scroll.line(t),v=r(h,2),y=v[0],m=v[1],b=(0,g.default)({},(0,f.bubbleFormats)(y));if(y instanceof p.default){var w=y.descendant(l.default.Leaf,m),_=r(w,1);b=(0,g.default)(b,(0,f.bubbleFormats)(_[0]))}u=s.default.attributes.diff(b,u)||{}}else if("object"===o(a.insert)){var k=Object.keys(a.insert)[0];if(null==k)return t;e.scroll.insertAt(t,k,a.insert[k])}i+=c}return Object.keys(u).forEach((function(n){e.scroll.formatAt(t,c,n,u[n])})),t+c}),0),t.reduce((function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)}),0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new a.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(o).forEach((function(r){if(null==n.scroll.whitelist||n.scroll.whitelist[r]){var i=n.scroll.lines(t,Math.max(e,1)),a=e;i.forEach((function(e){var i=e.length();if(e instanceof c.default){var s=t-e.offset(n.scroll),l=e.newlineIndex(s+a)-s+1;e.formatAt(s,l,r,o[r])}else e.format(r,o[r]);a-=i}))}})),this.scroll.optimize(),this.update((new a.default).retain(t).retain(e,(0,h.default)(o)))}},{key:"formatText",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(o).forEach((function(r){n.scroll.formatAt(t,e,r,o[r])})),this.update((new a.default).retain(t).retain(e,(0,h.default)(o)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce((function(t,e){return t.concat(e.delta())}),new a.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],o=[];0===e?this.scroll.path(t).forEach((function(t){var e=r(t,1)[0];e instanceof p.default?n.push(e):e instanceof l.default.Leaf&&o.push(e)})):(n=this.scroll.lines(t,e),o=this.scroll.descendants(l.default.Leaf,t,e));var i=[n,o].map((function(t){if(0===t.length)return{};for(var e=(0,f.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=w((0,f.bubbleFormats)(n),e)}return e}));return g.default.apply(g.default,i)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter((function(t){return"string"==typeof t.insert})).map((function(t){return t.insert})).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new a.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(o).forEach((function(r){n.scroll.formatAt(t,e.length,r,o[r])})),this.update((new a.default).retain(t).insert(e,(0,h.default)(o)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===p.default.blotName&&!(t.children.length>1)&&t.children.head instanceof d.default}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),o=this.scroll.line(t+e),i=r(o,2),s=i[0],l=i[1],u=0,f=new a.default;null!=s&&(u=s instanceof c.default?s.newlineIndex(l)-l+1:s.length()-l,f=s.delta().slice(l,l+u-1).insert("\n"));var p=this.getContents(t,e+u).diff((new a.default).insert(n).concat(f)),d=(new a.default).retain(t).concat(p);return this.applyDelta(d)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,o=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(m)&&l.default.find(e[0].target)){var r=l.default.find(e[0].target),i=(0,f.bubbleFormats)(r),s=r.offset(this.scroll),c=e[0].oldValue.replace(u.default.CONTENTS,""),p=(new a.default).insert(c),d=(new a.default).insert(r.value()),h=(new a.default).retain(s).concat(p.diff(d,n));t=h.reduce((function(t,e){return e.insert?t.insert(e.insert,i):t.push(e)}),new a.default),this.delta=o.compose(t)}else this.delta=this.getDelta(),t&&(0,v.default)(o.compose(t),this.delta)||(t=o.diff(this.delta,n));return t}}]),t}();function w(t,e){return Object.keys(e).reduce((function(n,o){return null==t[o]||(e[o]===t[o]?n[o]=e[o]:Array.isArray(e[o])?e[o].indexOf(t[o])<0&&(n[o]=e[o].concat([t[o]])):n[o]=[e[o],t[o]]),n}),{})}e.default=b},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(l){r=!0,i=l}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:0;f(this,t),this.index=e,this.length=n},h=function(){function t(e,n){var o=this;f(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=i.default.create("cursor",this),this.lastRange=this.savedRange=new d(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,(function(){o.mouseDown||setTimeout(o.update.bind(o,l.default.sources.USER),1)})),this.emitter.on(l.default.events.EDITOR_CHANGE,(function(t,e){t===l.default.events.TEXT_CHANGE&&e.length()>0&&o.update(l.default.sources.SILENT)})),this.emitter.on(l.default.events.SCROLL_BEFORE_UPDATE,(function(){if(o.hasFocus()){var t=o.getNativeRange();null!=t&&t.start.node!==o.cursor.textNode&&o.emitter.once(l.default.events.SCROLL_UPDATE,(function(){try{o.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(e){}}))}})),this.emitter.on(l.default.events.SCROLL_OPTIMIZE,(function(t,e){if(e.range){var n=e.range;o.setNativeRange(n.startNode,n.startOffset,n.endNode,n.endOffset)}})),this.update(l.default.sources.SILENT)}return r(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",(function(){t.composing=!0})),this.root.addEventListener("compositionend",(function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout((function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)}),1)}}))}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,(function(){t.mouseDown=!0})),this.emitter.listenDOM("mouseup",document.body,(function(){t.mouseDown=!1,t.update(l.default.sources.USER)}))}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!i.default.query(t,i.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var o=i.default.find(n.start.node,!1);if(null==o)return;if(o instanceof i.default.Leaf){var r=o.split(n.start.offset);o.parent.insertBefore(this.cursor,r)}else o.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var r=void 0,i=this.scroll.leaf(t),a=o(i,2),s=a[0],l=a[1];if(null==s)return null;var c=s.position(l,!0),u=o(c,2);r=u[0],l=u[1];var f=document.createRange();if(e>0){f.setStart(r,l);var p=this.scroll.leaf(t+e),d=o(p,2);if(null==(s=d[0]))return null;var h=s.position(l=d[1],!0),v=o(h,2);return f.setEnd(r=v[0],l=v[1]),f.getBoundingClientRect()}var g="left",y=void 0;return r instanceof Text?(l0&&(g="right")),{bottom:y.top+y.height,height:y.height,left:y[g],right:y[g],top:y.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return p.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var r=n.map((function(t){var n=o(t,2),r=n[0],a=n[1],s=i.default.find(r,!0),l=s.offset(e.scroll);return 0===a?l:s instanceof i.default.Container?l+s.length():l+s.index(r,a)})),a=Math.min(Math.max.apply(Math,u(r)),this.scroll.length()-1),s=Math.min.apply(Math,[a].concat(u(r)));return new d(s,a-s)}},{key:"normalizeNative",value:function(t){if(!v(this.root,t.startContainer)||!t.collapsed&&!v(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach((function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n})),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],r=[],i=this.scroll.length();return n.forEach((function(t,n){t=Math.min(i-1,t);var a=e.scroll.leaf(t),s=o(a,2),l=s[1],c=s[0].position(l,0!==n),u=o(c,2);r.push(u[0],l=u[1])})),r.length<2&&(r=r.concat(r)),r}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var r=this.scroll.length()-1,i=this.scroll.line(Math.min(e.index,r)),a=o(i,1)[0],s=a;if(e.length>0){var l=this.scroll.line(Math.min(e.index+e.length,r));s=o(l,1)[0]}if(null!=a&&null!=s){var c=t.getBoundingClientRect();n.topc.bottom&&(t.scrollTop+=n.bottom-c.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(p.info("setNativeRange",t,e,n,o),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var i=document.getSelection();if(null!=i)if(null!=t){this.hasFocus()||this.root.focus();var a=(this.getNativeRange()||{}).native;if(null==a||r||t!==a.startContainer||e!==a.startOffset||n!==a.endContainer||o!==a.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(o=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var s=document.createRange();s.setStart(t,e),s.setEnd(n,o),i.removeAllRanges(),i.addRange(s)}}else i.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default.sources.API;if("string"==typeof e&&(n=e,e=!1),p.info("setRange",t),null!=t){var o=this.rangeToNative(t);this.setNativeRange.apply(this,u(o).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.default.sources.USER,e=this.lastRange,n=this.getRange(),r=o(n,2),i=r[0],c=r[1];if(this.lastRange=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,s.default)(e,this.lastRange)){var u;!this.composing&&null!=c&&c.native.collapsed&&c.start.node!==this.cursor.textNode&&this.cursor.restore();var f,p=[l.default.events.SELECTION_CHANGE,(0,a.default)(this.lastRange),(0,a.default)(e),t];(u=this.emitter).emit.apply(u,[l.default.events.EDITOR_CHANGE].concat(p)),t!==l.default.sources.SILENT&&(f=this.emitter).emit.apply(f,p)}}}]),t}();function v(t,e){return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=d,e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=a.Scope.INLINE_BLOT,e}(i.default);e.default=s},function(t,e,n){var o=n(11),r=n(3),i={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var o=r(!0,{},e);for(var i in n||(o=Object.keys(o).reduce((function(t,e){return null!=o[e]&&(t[e]=o[e]),t}),{})),t)void 0!==t[i]&&void 0===e[i]&&(o[i]=t[i]);return Object.keys(o).length>0?o:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce((function(n,r){return o(t[r],e[r])||(n[r]=void 0===e[r]?null:e[r]),n}),{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var o=Object.keys(e).reduce((function(n,o){return void 0===t[o]&&(n[o]=e[o]),n}),{});return Object.keys(o).length>0?o:void 0}}},iterator:function(t){return new a(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function a(t){this.ops=t,this.index=0,this.offset=0}a.prototype.hasNext=function(){return this.peekLength()<1/0},a.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,o=i.length(e);if(t>=o-n?(t=o-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var r={};return e.attributes&&(r.attributes=e.attributes),"number"==typeof e.retain?r.retain=t:r.insert="string"==typeof e.insert?e.insert.substr(n,t):e.insert,r}return{retain:1/0}},a.prototype.peek=function(){return this.ops[this.index]},a.prototype.peekLength=function(){return this.ops[this.index]?i.length(this.ops[this.index])-this.offset:1/0},a.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},a.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),o=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(o)}return[]},t.exports=i},function(t,e){var n=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var e,n,o;try{e=Map}catch(s){e=function(){}}try{n=Set}catch(s){n=function(){}}try{o=Promise}catch(s){o=function(){}}function r(i,s,l,c,u){"object"==typeof s&&(l=s.depth,c=s.prototype,u=s.includeNonEnumerable,s=s.circular);var f=[],p=[],d="undefined"!=typeof Buffer;return void 0===s&&(s=!0),void 0===l&&(l=1/0),function i(l,h){if(null===l)return null;if(0===h)return l;var v,g;if("object"!=typeof l)return l;if(t(l,e))v=new e;else if(t(l,n))v=new n;else if(t(l,o))v=new o((function(t,e){l.then((function(e){t(i(e,h-1))}),(function(t){e(i(t,h-1))}))}));else if(r.__isArray(l))v=[];else if(r.__isRegExp(l))v=new RegExp(l.source,a(l)),l.lastIndex&&(v.lastIndex=l.lastIndex);else if(r.__isDate(l))v=new Date(l.getTime());else{if(d&&Buffer.isBuffer(l))return v=Buffer.allocUnsafe?Buffer.allocUnsafe(l.length):new Buffer(l.length),l.copy(v),v;t(l,Error)?v=Object.create(l):void 0===c?(g=Object.getPrototypeOf(l),v=Object.create(g)):(v=Object.create(c),g=c)}if(s){var y=f.indexOf(l);if(-1!=y)return p[y];f.push(l),p.push(v)}for(var m in t(l,e)&&l.forEach((function(t,e){var n=i(e,h-1),o=i(t,h-1);v.set(n,o)})),t(l,n)&&l.forEach((function(t){var e=i(t,h-1);v.add(e)})),l){var b;g&&(b=Object.getOwnPropertyDescriptor(g,m)),b&&null==b.set||(v[m]=i(l[m],h-1))}if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(l);for(m=0;m0){if(s instanceof l.BlockEmbed||d instanceof l.BlockEmbed)return void this.optimize();if(s instanceof f.default){var h=s.newlineIndex(s.length(),!0);if(h>-1&&(s=s.split(h+1))===d)return void this.optimize()}else if(d instanceof f.default){var v=d.newlineIndex(0);v>-1&&d.split(v+1)}s.moveChildren(d,d.children.head instanceof u.default?null:d.children.head),s.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,o,r){(null==this.whitelist||this.whitelist[o])&&(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,o,r),this.optimize())}},{key:"insertAt",value:function(t,n,o){if(null==o||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==o||null==a.default.query(n,a.default.Scope.BLOCK)){var r=a.default.create(this.statics.defaultChild);this.appendChild(r),null==o&&n.endsWith("\n")&&(n=n.slice(0,-1)),r.insertAt(0,n,o)}else{var s=a.default.create(n,o);this.appendChild(s)}else i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,o);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===a.default.Scope.INLINE_BLOT){var o=a.default.create(this.statics.defaultChild);o.appendChild(t),t=o}i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(h,t)}},{key:"lines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,n=function t(e,n,o){var r=[],i=o;return e.children.forEachAt(n,o,(function(e,n,o){h(e)?r.push(e):e instanceof a.default.Container&&(r=r.concat(t(e,n,i))),i-=o})),r};return n(this,t,e)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(s.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=s.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(s.default.events.SCROLL_BEFORE_UPDATE,n,t),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(s.default.events.SCROLL_UPDATE,n,t)}}}]),e}(a.default.Scroll);v.blotName="scroll",v.className="ql-editor",v.tagName="DIV",v.defaultChild="block",v.allowedChildren=[c.default,l.BlockEmbed,p.default],e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],o=!0,r=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);o=!0);}catch(l){r=!0,i=l}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=x(t);if(null==o||null==o.key)return y.warn("Attempted to add invalid keyboard binding",o);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),o=(0,l.default)(o,e,n),this.bindings[o.key]=this.bindings[o.key]||[],this.bindings[o.key].push(o)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",(function(n){if(!n.defaultPrevented){var i=(t.bindings[n.which||n.keyCode]||[]).filter((function(t){return e.match(n,t)}));if(0!==i.length){var a=t.quill.getSelection();if(null!=a&&t.quill.hasFocus()){var l=t.quill.getLine(a.index),c=r(l,2),u=c[0],p=c[1],d=t.quill.getLeaf(a.index),h=r(d,2),v=h[0],g=h[1],y=0===a.length?[v,g]:t.quill.getLeaf(a.index+a.length),m=r(y,2),b=m[0],w=m[1],_=v instanceof f.default.Text?v.value().slice(0,g):"",k=b instanceof f.default.Text?b.value().slice(w):"",T={collapsed:0===a.length,empty:0===a.length&&u.length()<=1,format:t.quill.getFormat(a),offset:p,prefix:_,suffix:k};i.some((function(e){if(null!=e.collapsed&&e.collapsed!==T.collapsed)return!1;if(null!=e.empty&&e.empty!==T.empty)return!1;if(null!=e.offset&&e.offset!==T.offset)return!1;if(Array.isArray(e.format)){if(e.format.every((function(t){return null==T.format[t]})))return!1}else if("object"===o(e.format)&&!Object.keys(e.format).every((function(t){return!0===e.format[t]?null!=T.format[t]:!1===e.format[t]?null==T.format[t]:(0,s.default)(e.format[t],T.format[t])})))return!1;return!(null!=e.prefix&&!e.prefix.test(T.prefix)||null!=e.suffix&&!e.suffix.test(T.suffix)||!0===e.handler.call(t,a,T))}))&&n.preventDefault()}}}}))}}]),e}(h.default);function w(t,e){var n;return g(n={key:t,shiftKey:e,altKey:null},t===b.keys.LEFT?"prefix":"suffix",/^$/),g(n,"handler",(function(n){var o=n.index;t===b.keys.RIGHT&&(o+=n.length+1);var i=this.quill.getLeaf(o);return!(r(i,1)[0]instanceof f.default.Embed&&(t===b.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,p.default.sources.USER):this.quill.setSelection(n.index-1,p.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,p.default.sources.USER):this.quill.setSelection(n.index+n.length+1,p.default.sources.USER),1))})),n}function _(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),o=r(n,1)[0],i={};if(0===e.offset){var a=this.quill.getLine(t.index-1),s=r(a,1)[0];if(null!=s&&s.length()>1){var l=o.formats(),c=this.quill.getFormat(t.index-1,1);i=u.default.attributes.diff(l,c)||{}}}var f=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-f,f,p.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(t.index-f,f,i,p.default.sources.USER),this.quill.focus()}}function k(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var o={},i=0,a=this.quill.getLine(t.index),s=r(a,1)[0];if(e.offset>=s.length()-1){var l=this.quill.getLine(t.index+1),c=r(l,1)[0];if(c){var f=s.formats(),d=this.quill.getFormat(t.index,1);o=u.default.attributes.diff(f,d)||{},i=c.length()}}this.quill.deleteText(t.index,n,p.default.sources.USER),Object.keys(o).length>0&&this.quill.formatLine(t.index+i-1,n,o,p.default.sources.USER)}}function T(t){var e=this.quill.getLines(t),n={};if(e.length>1){var o=e[0].formats(),r=e[e.length-1].formats();n=u.default.attributes.diff(r,o)||{}}this.quill.deleteText(t,p.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,p.default.sources.USER),this.quill.setSelection(t.index,p.default.sources.SILENT),this.quill.focus()}function E(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var o=Object.keys(e.format).reduce((function(t,n){return f.default.query(n,f.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t}),{});this.quill.insertText(t.index,"\n",o,p.default.sources.USER),this.quill.setSelection(t.index+1,p.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach((function(t){null==o[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],p.default.sources.USER))}))}function O(t){return{key:b.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=f.default.query("code-block"),o=e.index,i=e.length,a=this.quill.scroll.descendant(n,o),s=r(a,2),l=s[0],c=s[1];if(null!=l){var u=this.quill.getIndex(l),d=l.newlineIndex(c,!0)+1,h=l.newlineIndex(u+c+i),v=l.domNode.textContent.slice(d,h).split("\n");c=0,v.forEach((function(e,r){t?(l.insertAt(d+c,n.TAB),c+=n.TAB.length,0===r?o+=n.TAB.length:i+=n.TAB.length):e.startsWith(n.TAB)&&(l.deleteAt(d+c,n.TAB.length),c-=n.TAB.length,0===r?o-=n.TAB.length:i-=n.TAB.length),c+=e.length+1})),this.quill.update(p.default.sources.USER),this.quill.setSelection(o,i,p.default.sources.SILENT)}}}}function S(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],p.default.sources.USER)}}}function x(t){if("string"==typeof t||"number"==typeof t)return x({key:t});if("object"===(void 0===t?"undefined":o(t))&&(t=(0,a.default)(t,!1)),"string"==typeof t.key)if(null!=b.keys[t.key.toUpperCase()])t.key=b.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[m]=t.shortKey,delete t.shortKey),t}b.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},b.DEFAULTS={bindings:{bold:S("bold"),italic:S("italic"),underline:S("underline"),indent:{key:b.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",p.default.sources.USER)}},outdent:{key:b.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",p.default.sources.USER)}},"outdent backspace":{key:b.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",p.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,p.default.sources.USER)}},"indent code-block":O(!0),"outdent code-block":O(!1),"remove tab":{key:b.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,p.default.sources.USER)}},tab:{key:b.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new c.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,p.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,p.default.sources.SILENT)}},"list empty enter":{key:b.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,p.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,p.default.sources.USER)}},"checklist enter":{key:b.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=r(e,2),o=n[0],i=n[1],a=(0,l.default)({},o.formats(),{list:"checked"}),s=(new c.default).retain(t.index).insert("\n",a).retain(o.length()-i-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,p.default.sources.USER),this.quill.setSelection(t.index+1,p.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:b.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),o=r(n,2),i=o[0],a=o[1],s=(new c.default).retain(t.index).insert("\n",e.format).retain(i.length()-a-1).retain(1,{header:null});this.quill.updateContents(s,p.default.sources.USER),this.quill.setSelection(t.index+1,p.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,o=this.quill.getLine(t.index),i=r(o,2),a=i[0],s=i[1];if(s>n)return!0;var l=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(t.index," ",p.default.sources.USER),this.quill.history.cutoff();var u=(new c.default).retain(t.index-s).delete(n+1).retain(a.length()-2-s).retain(1,{list:l});this.quill.updateContents(u,p.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,p.default.sources.SILENT)}},"code exit":{key:b.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=r(e,2),o=n[0],i=n[1],a=(new c.default).retain(t.index+o.length()-i-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(a,p.default.sources.USER)}},"embed left":w(b.keys.LEFT,!1),"embed left shift":w(b.keys.LEFT,!0),"embed right":w(b.keys.RIGHT,!1),"embed right shift":w(b.keys.RIGHT,!0)}},e.default=b,e.SHORTKEY=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function t(e,n,o){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},r=function(){function t(t,e){for(var n=0;n-1}s.blotName="link",s.tagName="A",s.SANITIZED_URL="about:blank",s.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=s,e.sanitize=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":o(Event))){var r=document.createEvent("Event");r.initEvent("change",!0,!0),this.select.dispatchEvent(r)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=y(n(0)),r=y(n(5)),i=n(4),a=y(i),s=y(n(16)),l=y(n(25)),c=y(n(24)),u=y(n(35)),f=y(n(6)),p=y(n(22)),d=y(n(7)),h=y(n(55)),v=y(n(42)),g=y(n(23));function y(t){return t&&t.__esModule?t:{default:t}}r.default.register({"blots/block":a.default,"blots/block/embed":i.BlockEmbed,"blots/break":s.default,"blots/container":l.default,"blots/cursor":c.default,"blots/embed":u.default,"blots/inline":f.default,"blots/scroll":p.default,"blots/text":d.default,"modules/clipboard":h.default,"modules/history":v.default,"modules/keyboard":g.default}),o.default.register(a.default,s.default,c.default,f.default,p.default,d.default),e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=function(){function t(t){this.domNode=t,this.domNode[o.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new o.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return o.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,r){var i=this.isolate(t,e);if(null!=o.query(n,o.Scope.BLOT)&&r)i.wrap(n,r);else if(null!=o.query(n,o.Scope.ATTRIBUTE)){var a=o.create(this.statics.scope);i.wrap(a),a.format(n,r)}},t.prototype.insertAt=function(t,e,n){var r=null==n?o.create("text",e):o.create(e,n),i=this.split(t);this.parent.insertBefore(r,i)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[o.DATA_KEY]&&delete this.domNode[o.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?o.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?o.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(12),r=n(32),i=n(33),a=n(1),s=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=o.default.keys(this.domNode),n=r.default.keys(this.domNode),s=i.default.keys(this.domNode);e.concat(n).concat(s).forEach((function(e){var n=a.query(e,a.Scope.ATTRIBUTE);n instanceof o.default&&(t.attributes[n.attrName]=n)}))},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach((function(n){var o=e.attributes[n].value(e.domNode);t.format(n,o)}))},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach((function(t){e.attributes[t].remove(e.domNode)})),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce((function(e,n){return e[n]=t.attributes[n].value(t.domNode),e}),{})},t}();e.default=s},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function i(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter((function(t){return 0===t.indexOf(e+"-")}))}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map((function(t){return t.split("-").slice(0,-1).join("-")}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){i(t,this.keyName).forEach((function(e){t.classList.remove(e)})),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(i(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function i(t){var e=t.split("-"),n=e.slice(1).map((function(t){return t[0].toUpperCase()+t.slice(1)})).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map((function(t){return t.split(":")[0].trim()}))},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[i(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[i(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[i(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;no&&this.stack.undo.length>0){var r=this.stack.undo.pop();n=n.compose(r.undo),t=r.redo.compose(t)}else this.lastRecorded=o;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})),this.stack.redo.forEach((function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}))}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}(a(n(9)).default);function l(t){var e=t.reduce((function(t,e){return t+(e.delete||0)}),0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some((function(t){return null!=r.default.query(t,r.default.Scope.BLOCK)})))}(t)&&(n-=1),n}s.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=s,e.getLastChangeIndex=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var o=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t,e,n=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var o=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",n,a.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",n,a.default.sources.USER)),this.quill.root.scrollTop=o;break;case"video":n=(e=(t=n).match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/))?(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0":(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/":t;case"formula":if(!n)break;var r=this.quill.getSelection(!0);if(null!=r){var i=r.index+r.length;this.quill.insertEmbed(i,this.root.getAttribute("data-mode"),n,a.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(i+1," ",a.default.sources.USER),this.quill.setSelection(i+2,a.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}(p.default);function E(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach((function(e){var o=document.createElement("option");e===n?o.setAttribute("selected","selected"):o.setAttribute("value",e),t.appendChild(o)}))}e.BaseTooltip=T,e.default=k},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,o=this.iterator();n=o();){var r=n.length();if(ti?n(o,t-i,Math.min(e,i+s-t)):n(o,0,Math.min(s,t+e-i)),i+=s}},t.prototype.map=function(t){return this.reduce((function(e,n){return e.push(t(n)),e}),[])},t.prototype.reduce=function(t,e){for(var n,o=this.iterator();n=o();)e=t(e,n);return e},t}();e.default=o},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(17),a=n(1),s={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},l=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver((function(t){n.update(t)})),n.observer.observe(n.domNode,s),n.attach(),n}return r(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach((function(t){t.remove()})):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,o,r){this.update(),t.prototype.formatAt.call(this,e,n,o,r)},e.prototype.insertAt=function(e,n,o){this.update(),t.prototype.insertAt.call(this,e,n,o)},e.prototype.optimize=function(e,n){var o=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var r=[].slice.call(this.observer.takeRecords());r.length>0;)e.push(r.pop());for(var s=function(t,e){void 0===e&&(e=!0),null!=t&&t!==o&&null!=t.domNode.parentNode&&(null==t.domNode[a.DATA_KEY].mutations&&(t.domNode[a.DATA_KEY].mutations=[]),e&&s(t.parent))},l=function(t){null!=t.domNode[a.DATA_KEY]&&null!=t.domNode[a.DATA_KEY].mutations&&(t instanceof i.default&&t.children.forEach(l),t.optimize(n))},c=e,u=0;c.length>0;u+=1){if(u>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach((function(t){var e=a.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(s(a.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,(function(t){var e=a.find(t,!1);s(e,!1),e instanceof i.default&&e.children.forEach((function(t){s(t,!1)}))}))):"attributes"===t.type&&s(e.prev)),s(e))})),this.children.forEach(l),r=(c=[].slice.call(this.observer.takeRecords())).slice();r.length>0;)e.push(r.pop())}},e.prototype.update=function(e,n){var o=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map((function(t){var e=a.find(t.target,!0);return null==e?null:null==e.domNode[a.DATA_KEY].mutations?(e.domNode[a.DATA_KEY].mutations=[t],e):(e.domNode[a.DATA_KEY].mutations.push(t),null)})).forEach((function(t){null!=t&&t!==o&&null!=t.domNode[a.DATA_KEY]&&t.update(t.domNode[a.DATA_KEY].mutations||[],n)})),null!=this.domNode[a.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[a.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="DIV",e}(i.default);e.default=l},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,o){var r=this;n!==this.statics.blotName||o?t.prototype.format.call(this,n,o):(this.children.forEach((function(t){t instanceof i.default||(t=t.wrap(e.blotName,!0)),r.attributes.copy(t)})),this.unwrap())},e.prototype.formatAt=function(e,n,o,r){null!=this.formats()[o]||a.query(o,a.Scope.ATTRIBUTE)?this.isolate(e,n).format(o,r):t.prototype.formatAt.call(this,e,n,o,r)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var o=this.formats();if(0===Object.keys(o).length)return this.unwrap();var r=this.next;r instanceof e&&r.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(o,r.formats())&&(r.moveChildren(this),r.remove())},e.blotName="inline",e.scope=a.Scope.INLINE_BLOT,e.tagName="SPAN",e}(i.default);e.default=s},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),a=n(1),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(n){var o=a.query(e.blotName).tagName;if(n.tagName!==o)return t.formats.call(this,n)},e.prototype.format=function(n,o){null!=a.query(n,a.Scope.BLOCK)&&(n!==this.statics.blotName||o?t.prototype.format.call(this,n,o):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,o,r){null!=a.query(o,a.Scope.BLOCK)?this.format(o,r):t.prototype.formatAt.call(this,e,n,o,r)},e.prototype.insertAt=function(e,n,o){if(null==o||null!=a.query(n,a.Scope.INLINE))t.prototype.insertAt.call(this,e,n,o);else{var r=this.split(e),i=a.create(n,o);r.parent.insertBefore(i,r)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=a.Scope.BLOCK_BLOT,e.tagName="P",e}(i.default);e.default=s},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,o,r){0===e&&n===this.length()?this.format(o,r):t.prototype.formatAt.call(this,e,n,o,r)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=i},function(t,e,n){"use strict";var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(19),a=n(1),s=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return r(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,o){null==o?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,o)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=a.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some((function(t){return"characterData"===t.type&&t.target===n.domNode}))&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=a.Scope.INLINE_BLOT,e}(i.default);e.default=s},function(t,e,n){"use strict";var o=document.createElement("div");if(o.classList.toggle("test-class",!1),o.classList.contains("test-class")){var r=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:r.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return this.substr(e=e||0,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length);var o=n.indexOf(t,e-=t.length);return-1!==o&&o===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),o=n.length>>>0,r=arguments[1],i=0;ie.length?t:e,l=t.length>e.length?e:t,c=s.indexOf(l);if(-1!=c)return a=[[1,s.substring(0,c)],[0,l],[1,s.substring(c+l.length)]],t.length>e.length&&(a[0][0]=a[2][0]=-1),a;if(1==l.length)return[[-1,t],[1,e]];var u=function(t,e){var n=t.length>e.length?t:e,o=t.length>e.length?e:t;if(n.length<4||2*o.length=t.length?[o,a,s,l,f]:null}var s,l,c,u,f,p=a(n,o,Math.ceil(n.length/4)),d=a(n,o,Math.ceil(n.length/2));return p||d?(s=d?p&&p[4].length>d[4].length?p:d:p,t.length>e.length?(l=s[0],c=s[1],u=s[2],f=s[3]):(u=s[0],f=s[1],l=s[2],c=s[3]),[l,c,u,f,s[4]]):null}(t,e);if(u){var f=u[1],p=u[3],d=u[4],h=n(u[0],u[2]),v=n(f,p);return h.concat([[0,d]],v)}return function(t,e){for(var n=t.length,r=e.length,i=Math.ceil((n+r)/2),a=i,s=2*i,l=new Array(s),c=new Array(s),u=0;un)h+=2;else if(w>r)d+=2;else if(p&&(T=a+f-m)>=0&&T=(k=n-c[T]))return o(t,e,O,w)}for(var _=-y+v;_<=y-g;_+=2){for(var k,T=a+_,E=(k=_==-y||_!=y&&c[T-1]n)g+=2;else if(E>r)v+=2;else if(!p){var O;if((b=a+f-_)>=0&&b=(k=n-k)))return o(t,e,O,w)}}}return[[-1,t],[1,e]]}(t,e)}(t=t.substring(0,t.length-l),e=e.substring(0,e.length-l));return c&&f.unshift([0,c]),u&&f.push([0,u]),function t(e){e.push([0,""]);for(var n,o=0,a=0,s=0,l="",c="";o1?(0!==a&&0!==s&&(0!==(n=r(c,l))&&(o-a-s>0&&0==e[o-a-s-1][0]?e[o-a-s-1][1]+=c.substring(0,n):(e.splice(0,0,[0,c.substring(0,n)]),o++),c=c.substring(n),l=l.substring(n)),0!==(n=i(c,l))&&(e[o][1]=c.substring(c.length-n)+e[o][1],c=c.substring(0,c.length-n),l=l.substring(0,l.length-n))),0===a?e.splice(o-s,a+s,[1,c]):0===s?e.splice(o-a,a+s,[-1,l]):e.splice(o-a-s,a+s,[-1,l],[1,c]),o=o-a-s+(a?1:0)+(s?1:0)+1):0!==o&&0==e[o-1][0]?(e[o-1][1]+=e[o][1],e.splice(o,1)):o++,s=0,a=0,l="",c=""}""===e[e.length-1][1]&&e.pop();var u=!1;for(o=1;o0&&o.splice(r+2,0,[a[0],l]),s(o,r,3)}return t}(f,a)),function(t){for(var e=!1,n=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},o=2;o=55296&&r.charCodeAt(r.length-1)<=56319&&-1===t[o-1][0]&&n(t[o-1][1])&&1===t[o][0]&&n(t[o][1])&&(e=!0,t[o-1][1]=t[o-2][1].slice(-1)+t[o-1][1],t[o][1]=t[o-2][1].slice(-1)+t[o][1],t[o-2][1]=t[o-2][1].slice(0,-1));var r;if(!e)return t;var i=[];for(o=0;o0&&i.push(t[o]);return i}(f)}function o(t,e,o,r){var i=t.substring(0,o),a=e.substring(0,r),s=t.substring(o),l=e.substring(r),c=n(i,a),u=n(s,l);return c.concat(u)}function r(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,o=Math.min(t.length,e.length),r=o,i=0;n=0&&o>=e-1;o--)if(o+1=700)&&(n.bold=!0),Object.keys(n).length>0&&(e=x(e,n)),parseFloat(o.textIndent||0)>0&&(e=(new s.default).insert("\t").concat(e)),e}],["li",function(t,e){var n=l.default.query(t);if(null==n||"list-item"!==n.blotName||!A(e,"\n"))return e;for(var o=-1,r=t.parentNode;!r.classList.contains("ql-clipboard");)"list"===(l.default.query(r)||{}).blotName&&(o+=1),r=r.parentNode;return o<=0?e:e.compose((new s.default).retain(e.length()-1).retain(1,{indent:o}))}],["b",L.bind(L,"bold")],["i",L.bind(L,"italic")],["style",function(){return new s.default}]],E=[p.AlignAttribute,g.DirectionAttribute].reduce((function(t,e){return t[e.keyName]=e,t}),{}),O=[p.AlignStyle,d.BackgroundStyle,v.ColorStyle,g.DirectionStyle,y.FontStyle,m.SizeStyle].reduce((function(t,e){return t[e.keyName]=e,t}),{}),S=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.quill.root.addEventListener("paste",o.onPaste.bind(o)),o.container=o.quill.addContainer("ql-clipboard"),o.container.setAttribute("contenteditable",!0),o.container.setAttribute("tabindex",-1),o.matchers=[],T.concat(o.options.matchers).forEach((function(t){var e=r(t,2),i=e[1];(n.matchVisual||i!==D)&&o.addMatcher(e[0],i)})),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\<"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[h.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new s.default).insert(n,w({},h.default.blotName,e[h.default.blotName]))}var o=this.prepareMatching(),i=r(o,2),a=function t(e,n,o){return e.nodeType===e.TEXT_NODE?o.reduce((function(t,n){return n(e,t)}),new s.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],(function(r,i){var a=t(i,n,o);return i.nodeType===e.ELEMENT_NODE&&(a=n.reduce((function(t,e){return e(i,t)}),a),a=(i[k]||[]).reduce((function(t,e){return e(i,t)}),a)),r.concat(a)}),new s.default):new s.default}(this.container,i[0],i[1]);return A(a,"\n")&&null==a.ops[a.ops.length-1].attributes&&(a=a.compose((new s.default).retain(a.length()-1).delete(1))),_.log("convert",this.container.innerHTML,a),this.container.innerHTML="",a}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.default.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,c.default.sources.SILENT);else{var o=this.convert(e);this.quill.updateContents((new s.default).retain(t).concat(o),n),this.quill.setSelection(t+o.length(),c.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),o=(new s.default).retain(n.index),r=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(c.default.sources.SILENT),setTimeout((function(){o=o.concat(e.convert()).delete(n.length),e.quill.updateContents(o,c.default.sources.USER),e.quill.setSelection(o.length()-n.length,c.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=r,e.quill.focus()}),1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach((function(o){var i=r(o,2),a=i[0],s=i[1];switch(a){case Node.TEXT_NODE:n.push(s);break;case Node.ELEMENT_NODE:e.push(s);break;default:[].forEach.call(t.container.querySelectorAll(a),(function(t){t[k]=t[k]||[],t[k].push(s)}))}})),[e,n]}}]),e}(f.default);function x(t,e,n){return"object"===(void 0===e?"undefined":o(e))?Object.keys(e).reduce((function(t,n){return x(t,n,e[n])}),t):t.reduce((function(t,o){return o.attributes&&o.attributes[e]?t.push(o):t.insert(o.insert,(0,a.default)({},w({},e,n),o.attributes))}),new s.default)}function C(t){return t.nodeType!==Node.ELEMENT_NODE?{}:t["__ql-computed-style"]||(t["__ql-computed-style"]=window.getComputedStyle(t))}function A(t,e){for(var n="",o=t.ops.length-1;o>=0&&n.length-1}function L(t,e,n){return x(n,t,!0)}function P(t,e){var n=l.default.Attributor.Attribute.keys(t),o=l.default.Attributor.Class.keys(t),r=l.default.Attributor.Style.keys(t),i={};return n.concat(o).concat(r).forEach((function(e){var n=l.default.query(e,l.default.Scope.ATTRIBUTE);null!=n&&(i[n.attrName]=n.value(t),i[n.attrName])||(null==(n=E[e])||n.attrName!==e&&n.keyName!==e||(i[n.attrName]=n.value(t)||void 0),null==(n=O[e])||n.attrName!==e&&n.keyName!==e||(i[(n=O[e]).attrName]=n.value(t)||void 0))})),Object.keys(i).length>0&&(e=x(e,i)),e}function j(t,e){var n=l.default.query(t);if(null==n)return e;if(n.prototype instanceof l.default.Embed){var o={},r=n.value(t);null!=r&&(o[n.blotName]=r,e=(new s.default).insert(o,n.formats(t)))}else"function"==typeof n.formats&&(e=x(e,n.blotName,n.formats(t)));return e}function I(t,e){return A(e,"\n")||(N(t)||e.length()>0&&t.nextSibling&&N(t.nextSibling))&&e.insert("\n"),e}function D(t,e){if(N(t)&&null!=t.nextElementSibling&&!A(e,"\n\n")){var n=t.offsetHeight+parseFloat(C(t).marginTop)+parseFloat(C(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function q(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!C(t.parentNode).whiteSpace.startsWith("pre")){var o=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,o.bind(o,!0)),(null==t.previousSibling&&N(t.parentNode)||null!=t.previousSibling&&N(t.previousSibling))&&(n=n.replace(/^\s+/,o.bind(o,!1))),(null==t.nextSibling&&N(t.parentNode)||null!=t.nextSibling&&N(t.nextSibling))&&(n=n.replace(/\s+$/,o.bind(o,!1)))}return e.insert(n)}S.DEFAULTS={matchers:[],matchVisual:!0},e.default=S,e.matchAttributor=P,e.matchBlot=j,e.matchNewline=I,e.matchSpacing=D,e.matchText=q},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;no.right&&(this.root.style.left=e+(i=o.right-r.right)+"px"),r.lefto.bottom&&(this.root.style.top=n-(t.bottom-t.top+(r.bottom-r.top))+"px",this.root.classList.add("ql-flip")),i}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function t(e,n,o){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},r=function(){function t(t,e){for(var n=0;n','','',''].join(""),e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=D(n(29)),r=n(36),i=n(38),a=n(64),s=D(n(65)),l=D(n(66)),c=n(67),u=D(c),f=n(37),p=n(26),d=n(39),h=n(40),v=D(n(56)),g=D(n(68)),y=D(n(27)),m=D(n(69)),b=D(n(70)),w=D(n(71)),_=D(n(72)),k=D(n(73)),T=n(13),E=D(T),O=D(n(74)),S=D(n(75)),x=D(n(57)),C=D(n(41)),A=D(n(28)),N=D(n(59)),L=D(n(60)),P=D(n(61)),j=D(n(108)),I=D(n(62));function D(t){return t&&t.__esModule?t:{default:t}}o.default.register({"attributors/attribute/direction":i.DirectionAttribute,"attributors/class/align":r.AlignClass,"attributors/class/background":f.BackgroundClass,"attributors/class/color":p.ColorClass,"attributors/class/direction":i.DirectionClass,"attributors/class/font":d.FontClass,"attributors/class/size":h.SizeClass,"attributors/style/align":r.AlignStyle,"attributors/style/background":f.BackgroundStyle,"attributors/style/color":p.ColorStyle,"attributors/style/direction":i.DirectionStyle,"attributors/style/font":d.FontStyle,"attributors/style/size":h.SizeStyle},!0),o.default.register({"formats/align":r.AlignClass,"formats/direction":i.DirectionClass,"formats/indent":a.IndentClass,"formats/background":f.BackgroundStyle,"formats/color":p.ColorStyle,"formats/font":d.FontClass,"formats/size":h.SizeClass,"formats/blockquote":s.default,"formats/code-block":E.default,"formats/header":l.default,"formats/list":u.default,"formats/bold":v.default,"formats/code":T.Code,"formats/italic":g.default,"formats/link":y.default,"formats/script":m.default,"formats/strike":b.default,"formats/underline":w.default,"formats/image":_.default,"formats/video":k.default,"formats/list/item":c.ListItem,"modules/formula":O.default,"modules/syntax":S.default,"modules/toolbar":x.default,"themes/bubble":j.default,"themes/snow":I.default,"ui/icons":C.default,"ui/picker":A.default,"ui/icon-picker":L.default,"ui/color-picker":N.default,"ui/tooltip":P.default},!0),e.default=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var o=function(){function t(t,e){for(var n=0;n0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(t,n){if(t instanceof p)r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var o=null==n?this.length():n.offset(this),i=this.split(o);i.parent.insertBefore(t,i)}}},{key:"optimize",value:function(t){r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=i.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}(s.default);d.blotName="list",d.scope=i.default.Scope.BLOCK_BLOT,d.tagName=["OL","UL"],d.defaultChild="list-item",d.allowedChildren=[p],e.ListItem=p,e.default=d},function(t,e,n){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(){return o(this,e),r(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(n(56)).default);i.blotName="italic",i.tagName=["EM","I"],e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return c.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,a.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(i.default.Embed);u.blotName="image",u.tagName="IMG",e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=r(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return c.reduce((function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e}),{})}},{key:"sanitize",value:function(t){return a.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}(i.BlockEmbed);u.blotName="video",u.className="ql-video",u.tagName="IFRAME",e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var o=function(){function t(t,e){for(var n=0;n0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}(s(n(13)).default);f.className="ql-syntax";var p=new r.default.Attributor.Class("token","hljs",{scope:r.default.Scope.INLINE}),d=function(t){function e(t,n){l(this,e);var o=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof o.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var r=null;return o.quill.on(i.default.events.SCROLL_OPTIMIZE,(function(){clearTimeout(r),r=setTimeout((function(){o.highlight(),r=null}),o.options.interval)})),o.highlight(),o}return u(e,t),o(e,null,[{key:"register",value:function(){i.default.register(p,!0),i.default.register(f,!0)}}]),o(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(i.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(f).forEach((function(e){e.highlight(t.options.highlight)})),this.quill.update(i.default.sources.SILENT),null!=e&&this.quill.setSelection(e,i.default.sources.SILENT)}}}]),e}(a.default);d.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=f,e.CodeToken=p,e.default=d},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e){t.exports=' '},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var o=function t(e,n,o){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,o)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(o):void 0},r=function(){function t(t,e){for(var n=0;n0&&r===a.default.sources.USER){o.show(),o.root.style.left="0px",o.root.style.width="",o.root.style.width=o.root.offsetWidth+"px";var i=o.quill.getLines(e.index,e.length);if(1===i.length)o.position(o.quill.getBounds(e));else{var s=i[i.length-1],l=o.quill.getIndex(s),u=Math.min(s.length()-1,e.index+e.length-l),f=o.quill.getBounds(new c.Range(l,u));o.position(f)}}else document.activeElement!==o.textbox&&o.quill.hasFocus()&&o.hide()})),o}return h(e,t),r(e,[{key:"listen",value:function(){var t=this;o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",(function(){t.root.classList.remove("ql-editing")})),this.quill.on(a.default.events.SCROLL_OPTIMIZE,(function(){setTimeout((function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}}),1)}))}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),r=this.root.querySelector(".ql-tooltip-arrow");if(r.style.marginLeft="",0===n)return n;r.style.marginLeft=-1*n-r.offsetWidth/2+"px"}}]),e}(s.BaseTooltip);y.TEMPLATE=['','
','','',"
"].join(""),e.BubbleTooltip=y,e.default=g},function(t,e,n){t.exports=n(63)}]).default})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sweetalert2=e()}(this,(function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var n=0;n(e=parseInt(e.getAttribute("tabindex")))?1:t1&&void 0!==arguments[1]?arguments[1]:"flex";t.style.opacity="",t.style.display=e},at=function(t){t.style.opacity="",t.style.display="none"},st=function(t,e,n){e?it(t,n):at(t)},lt=function(t){return!(!t||!(t.offsetWidth||t.offsetHeight||t.getClientRects().length))},ct=function(t){return!!(t.scrollHeight>t.clientHeight)},ut=function(t){var e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return n>0||o>0},ft=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=H();lt(n)&&(e&&(n.style.transition="none",n.style.width="100%"),setTimeout((function(){n.style.transition="width ".concat(t/1e3,"s linear"),n.style.width="0%"}),10))},pt=function(){return"undefined"==typeof window||"undefined"==typeof document},dt='\n
\n
\n
    \n
    \n
    \n
    \n
    \n
    \n \n

    \n \n
    \n
    \n
    \n \n \n
    \n \n \n
    \n \n
    \n \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n').replace(/(^|\n)\s*/g,""),ht=function(t){we.isVisible()&&J!==t.target.value&&we.resetValidationMessage(),J=t.target.value},vt=function(e,n){e instanceof HTMLElement?n.appendChild(e):"object"===t(e)?gt(e,n):e&&X(n,e)},gt=function(t,e){t.jquery?yt(e,t):X(e,t.toString())},yt=function(t,e){if(t.textContent="",0 in e)for(var n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},mt=function(){if(pt())return!1;var t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&void 0!==t.style[n])return e[n];return!1}();function bt(t,e,n){var o;st(t,n["show".concat((o=e,o.charAt(0).toUpperCase()+o.slice(1)),"Button")],"inline-block"),X(t,n["".concat(e,"ButtonText")]),t.setAttribute("aria-label",n["".concat(e,"ButtonAriaLabel")]),t.className=T[e],Z(t,n,"".concat(e,"Button")),et(t,n["".concat(e,"ButtonClass")])}var wt={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},_t=["input","file","range","select","radio","checkbox","textarea"],kt=function(t,e){t.placeholder&&!e.inputPlaceholder||(t.placeholder=e.inputPlaceholder)},Tt=function(t){var e=T[t]?T[t]:T.input;return ot(P(),e)},Et={};Et.text=Et.email=Et.password=Et.number=Et.tel=Et.url=function(e,n){return"string"==typeof n.inputValue||"number"==typeof n.inputValue?e.value=n.inputValue:b(n.inputValue)||d('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(t(n.inputValue),'"')),kt(e,n),e.type=n.input,e},Et.file=function(t,e){return kt(t,e),t},Et.range=function(t,e){var n=t.querySelector("input"),o=t.querySelector("output");return n.value=e.inputValue,n.type=e.input,o.value=e.inputValue,t},Et.select=function(t,e){if(t.textContent="",e.inputPlaceholder){var n=document.createElement("option");X(n,e.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)}return t},Et.radio=function(t){return t.textContent="",t},Et.checkbox=function(t,e){var n=$(P(),"checkbox");n.value=1,n.id=T.checkbox,n.checked=Boolean(e.inputValue);var o=t.querySelector("span");return X(o,e.inputPlaceholder),t},Et.textarea=function(t,e){if(t.value=e.inputValue,kt(t,e),"MutationObserver"in window){var n=parseInt(window.getComputedStyle(C()).width),o=parseInt(window.getComputedStyle(C()).paddingLeft)+parseInt(window.getComputedStyle(C()).paddingRight);new MutationObserver((function(){var e=t.offsetWidth+o;C().style.width=e>n?"".concat(e,"px"):null})).observe(t,{attributes:!0,attributeFilter:["style"]})}return t};var Ot=function(t){return'
    ').concat(t,"
    ")},St=[],xt=function(){return O()&&O().getAttribute("data-queue-step")},Ct=function(t,e){!function(t,e){var n=C();rt(n,"width",e.width),rt(n,"padding",e.padding),e.background&&(n.style.background=e.background),function(t,e){t.className="".concat(T.popup," ").concat(lt(t)?e.showClass.popup:""),e.toast?(et([document.documentElement,document.body],T["toast-shown"]),et(t,T.toast)):et(t,T.modal),Z(t,e,"popup"),"string"==typeof e.customClass&&et(t,e.customClass),e.icon&&et(t,T["icon-".concat(e.icon)])}(n,e)}(0,e),function(t,e){var n=O();if(n){!function(t,e){"string"==typeof e?t.style.background=e:e||et([document.documentElement,document.body],T["no-backdrop"])}(n,e.backdrop),!e.backdrop&&e.allowOutsideClick&&d('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),function(t,e){e in T?et(t,T[e]):(d('The "position" parameter is not valid, defaulting to "center"'),et(t,T.center))}(n,e.position),function(t,e){if(e&&"string"==typeof e){var n="grow-".concat(e);n in T&&et(t,T[n])}}(n,e.grow),Z(n,e,"container");var o=document.body.getAttribute("data-swal2-queue-step");o&&(n.setAttribute("data-queue-step",o),document.body.removeAttribute("data-swal2-queue-step"))}}(0,e),function(t,e){var n=M();Z(n,e,"header"),function(t,e){var n=I();if(!e.progressSteps||0===e.progressSteps.length)return at(n);it(n),n.textContent="";var o=parseInt(void 0===e.currentProgressStep?xt():e.currentProgressStep);o>=e.progressSteps.length&&d("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),e.progressSteps.forEach((function(t,r){var i=function(t){var e=document.createElement("li");return et(e,T["progress-step"]),X(e,t),e}(t);if(n.appendChild(i),r===o&&et(i,T["active-progress-step"]),r!==e.progressSteps.length-1){var a=function(t){var e=document.createElement("li");return et(e,T["progress-step-line"]),t.progressStepsDistance&&(e.style.width=t.progressStepsDistance),e}(e);n.appendChild(a)}}))}(0,e),function(t,e){var n=wt.innerParams.get(t);if(n&&e.icon===n.icon&&N())Z(N(),e,"icon");else if(function(){for(var t=A(),e=0;e\n \n
    \n
    \n ':"error"===e.icon?'\n \n \n \n \n ':Ot({question:"?",warning:"!",info:"i"}[e.icon]))}(o,e),function(){for(var t=C(),e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix"),o=0;o1)&&!G(document.body,T.iosfix)){var t=document.body.scrollTop;document.body.style.top="".concat(-1*t,"px"),et(document.body,T.iosfix),function(){var t,e=O();e.ontouchstart=function(e){t=function(t){var e=O();return t===e||!(ct(e)||"INPUT"===t.tagName||ct(P())&&P().contains(t))}(e.target)},e.ontouchmove=function(e){t&&(e.preventDefault(),e.stopPropagation())}}(),navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)||C().scrollHeight>window.innerHeight-44&&(O().style.paddingBottom="".concat(44,"px"))}}(),"undefined"!=typeof window&&zt()&&(Yt(),window.addEventListener("resize",Yt)),e&&"hidden"!==n&&null===V.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(V.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(V.previousBodyPadding+function(){var t=document.createElement("div");t.className=T["scrollbar-measure"],document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e}(),"px")),setTimeout((function(){t.scrollTop=0}))},ae={select:function(t,e,n){var o=ot(t,T.select),r=function(t,e,o){var r=document.createElement("option");r.value=o,X(r,e),n.inputValue.toString()===o.toString()&&(r.selected=!0),t.appendChild(r)};e.forEach((function(t){var e=t[0],n=t[1];if(Array.isArray(n)){var i=document.createElement("optgroup");i.label=e,i.disabled=!1,o.appendChild(i),n.forEach((function(t){return r(i,t[1],t[0])}))}else r(o,n,e)})),o.focus()},radio:function(t,e,n){var o=ot(t,T.radio);e.forEach((function(t){var e=t[0],r=t[1],i=document.createElement("input"),a=document.createElement("label");i.type="radio",i.name=T.radio,i.value=e,n.inputValue.toString()===e.toString()&&(i.checked=!0);var s=document.createElement("span");X(s,r),s.className=T.label,a.appendChild(i),a.appendChild(s),o.appendChild(a)}));var r=o.querySelectorAll("input");r.length&&r[0].focus()}},se=function(t,e){t.closePopup({value:e})},le=function(t,e,n){e.showLoaderOnConfirm&&Nt(),e.preConfirm?(t.resetValidationMessage(),Promise.resolve().then((function(){return m(e.preConfirm(n,e.validationMessage))})).then((function(e){lt(D())||!1===e?t.hideLoading():se(t,void 0===e?n:e)}))):se(t,n)},ce=function(t,e,n){for(var o=F(),r=0;r")),function(t){var e,n=!!(e=O())&&(e.parentNode.removeChild(e),nt([document.documentElement,document.body],[T["no-backdrop"],T["toast-shown"],T["has-column"]]),!0);if(pt())h("SweetAlert2 requires document to initialize");else{var o=document.createElement("div");o.className=T.container,n&&et(o,T["no-transition"]),X(o,dt);var r,i,a,s,l,c,u,f,p,d="string"==typeof(r=t.target)?document.querySelector(r):r;d.appendChild(o),function(t){var e=C();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")}(t),function(t){"rtl"===window.getComputedStyle(t).direction&&et(O(),T.rtl)}(d),i=P(),a=ot(i,T.input),s=ot(i,T.file),l=i.querySelector(".".concat(T.range," input")),c=i.querySelector(".".concat(T.range," output")),u=ot(i,T.select),f=i.querySelector(".".concat(T.checkbox," input")),p=ot(i,T.textarea),a.oninput=ht,s.onchange=ht,u.onchange=ht,f.onchange=ht,p.oninput=ht,l.oninput=function(t){ht(t),c.value=l.value},l.onchange=function(t){ht(t),l.nextSibling.value=l.value}}}(e),Object.freeze(n),Lt.timeout&&(Lt.timeout.stop(),delete Lt.timeout),clearTimeout(Lt.restoreFocusTimeout);var o=function(t){var e={popup:C(),container:O(),content:P(),actions:U(),confirmButton:q(),cancelButton:R(),closeButton:K(),validationMessage:D(),progressSteps:I()};return wt.domCache.set(t,e),e}(this);return Ct(this,n),wt.innerParams.set(this,n),de(this,o,n)},update:function(t){var e=C(),n=wt.innerParams.get(this);if(!e||G(e,n.hideClass.popup))return d("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");var o={};Object.keys(t).forEach((function(e){we.isUpdatableParameter(e)?o[e]=t[e]:d('Invalid parameter to update: "'.concat(e,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js'))}));var i=r({},n,o);Ct(this,i),wt.innerParams.set(this,i),Object.defineProperties(this,{params:{value:r({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var t=wt.domCache.get(this),e=wt.innerParams.get(this);e&&(t.popup&&Lt.swalCloseEventFinishedCallback&&(Lt.swalCloseEventFinishedCallback(),delete Lt.swalCloseEventFinishedCallback),Lt.deferDisposalTimer&&(clearTimeout(Lt.deferDisposalTimer),delete Lt.deferDisposalTimer),"function"==typeof e.onDestroy&&e.onDestroy(),delete this.params,delete Lt.keydownHandler,delete Lt.keydownTarget,ye(wt),ye(Vt))}}),be=function(){function t(){if(e(this,t),"undefined"!=typeof window){"undefined"==typeof Promise&&h("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)"),re=this;for(var n=arguments.length,o=new Array(n),r=0;r=0},addClass:function(t,e){t.className+=" "+e},removeClass:function(t,e){var n=new RegExp("\\b"+this.escapeRegExp(e)+"\\b");t.className=t.className.replace(n,"")},interpolateString:function(t,e){return t.replace(/{{([a-z][a-z0-9\-_]*)}}/gi,(function(t){return e(arguments[1])||""}))},getCookie:function(t){var e=("; "+document.cookie).split("; "+t+"=");return e.length<2?void 0:e.pop().split(";").shift()},setCookie:function(t,e,n,o,r,i){var a=new Date;a.setHours(a.getHours()+24*(n||365));var s=[t+"="+e,"expires="+a.toUTCString(),"path="+(r||"/")];o&&s.push("domain="+o),i&&s.push("secure"),document.cookie=s.join(";")},deepExtend:function(t,e){for(var n in e)e.hasOwnProperty(n)&&(n in t&&this.isPlainObject(t[n])&&this.isPlainObject(e[n])?this.deepExtend(t[n],e[n]):t[n]=e[n]);return t},throttle:function(t,e){var n=!1;return function(){n||(t.apply(this,arguments),n=!0,setTimeout((function(){n=!1}),e))}},hash:function(t){var e,n,o=0;if(0===t.length)return o;for(e=0,n=t.length;e=128?"#000":"#fff"},getLuminance:function(t){var e=parseInt(this.normaliseHex(t),16),n=38+(e>>16),o=38+(e>>8&255),r=38+(255&e);return"#"+(16777216+65536*(n<255?n<1?0:n:255)+256*(o<255?o<1?0:o:255)+(r<255?r<1?0:r:255)).toString(16).slice(1)},isMobile:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},isPlainObject:function(t){return"object"==typeof t&&null!==t&&t.constructor==Object},traverseDOMPath:function(t,n){return t&&t.parentNode?e.hasClass(t,n)?t:this.traverseDOMPath(t.parentNode,n):null}};t.status={deny:"deny",allow:"allow",dismiss:"dismiss"},t.transitionEnd=function(){var t=document.createElement("div"),e={t:"transitionend",OT:"oTransitionEnd",msT:"MSTransitionEnd",MozT:"transitionend",WebkitT:"webkitTransitionEnd"};for(var n in e)if(e.hasOwnProperty(n)&&void 0!==t.style[n+"ransition"])return e[n];return""}(),t.hasTransition=!!t.transitionEnd;var n=Object.keys(t.status).map(e.escapeRegExp);t.customStyles={},t.Popup=function(){var o={enabled:!0,container:null,cookie:{name:"cookieconsent_status",path:"/",domain:"",expiryDays:365,secure:!1},onPopupOpen:function(){},onPopupClose:function(){},onInitialise:function(t){},onStatusChange:function(t,e){},onRevokeChoice:function(){},onNoCookieLaw:function(t,e){},content:{header:"Cookies used on the website!",message:"This website uses cookies to ensure you get the best experience on our website.",dismiss:"Got it!",allow:"Allow cookies",deny:"Decline",link:"Learn more",href:"https://www.cookiesandyou.com",close:"❌",target:"_blank",policy:"Cookie Policy"},elements:{header:'{{header}} ',message:'{{message}}',messagelink:'{{message}} {{link}}',dismiss:'{{dismiss}}',allow:'{{allow}}',deny:'{{deny}}',link:'{{link}}',close:'{{close}}'},window:'',revokeBtn:'
    {{policy}}
    ',compliance:{info:'
    {{dismiss}}
    ',"opt-in":'
    {{deny}}{{allow}}
    ',"opt-out":'
    {{deny}}{{allow}}
    '},type:"info",layouts:{basic:"{{messagelink}}{{compliance}}","basic-close":"{{messagelink}}{{compliance}}{{close}}","basic-header":"{{header}}{{message}}{{link}}{{compliance}}"},layout:"basic",position:"bottom",theme:"block",static:!1,palette:null,revokable:!1,animateRevokable:!0,showLink:!0,dismissOnScroll:!1,dismissOnTimeout:!1,dismissOnWindowClick:!1,ignoreClicksFrom:["cc-revoke","cc-btn"],autoOpen:!0,autoAttach:!0,whitelistPage:[],blacklistPage:[],overrideHTML:null};function r(){this.initialise.apply(this,arguments)}function i(t){this.openingTimeout=null,e.removeClass(t,"cc-invisible")}function a(e){e.style.display="none",e.removeEventListener(t.transitionEnd,this.afterTransition),this.afterTransition=null}function s(){var t=this.options.position.split("-"),e=[];return t.forEach((function(t){e.push("cc-"+t)})),e}function l(o){var r=this.options,i=document.createElement("div"),a=r.container&&1===r.container.nodeType?r.container:document.body;i.innerHTML=o;var s=i.children[0];return s.style.display="none",e.hasClass(s,"cc-window")&&t.hasTransition&&e.addClass(s,"cc-invisible"),this.onButtonClick=(function(o){var r=e.traverseDOMPath(o.target,"cc-btn")||o.target;if(e.hasClass(r,"cc-btn")){var i=r.className.match(new RegExp("\\bcc-("+n.join("|")+")\\b")),a=i&&i[1]||!1;a&&(this.setStatus(a),this.close(!0))}e.hasClass(r,"cc-close")&&(this.setStatus(t.status.dismiss),this.close(!0)),e.hasClass(r,"cc-revoke")&&this.revokeChoice()}).bind(this),s.addEventListener("click",this.onButtonClick),r.autoAttach&&(a.firstChild?a.insertBefore(s,a.firstChild):a.appendChild(s)),s}function c(t){return"000000"==(t=e.normaliseHex(t))?"#222":e.getLuminance(t)}function u(t,e){for(var n=0,o=t.length;n=0;return r&&e(o),r}).call(this)&&(this.options.enabled=!1),u(this.options.blacklistPage,location.pathname)&&(this.options.enabled=!1),u(this.options.whitelistPage,location.pathname)&&(this.options.enabled=!0);var r=this.options.window.replace("{{classes}}",(function(){var n=this.options,o="top"==n.position||"bottom"==n.position?"banner":"floating";e.isMobile()&&(o="floating");var r=["cc-"+o,"cc-type-"+n.type,"cc-theme-"+n.theme];return n.static&&r.push("cc-static"),r.push.apply(r,s.call(this)),(function(n){var o=e.hash(JSON.stringify(n)),r="cc-color-override-"+o,i=e.isPlainObject(n);return this.customStyleSelector=i?r:null,i&&function(n,o,r){if(t.customStyles[n])++t.customStyles[n].references;else{var i={},a=o.popup,s=o.button,l=o.highlight;a&&(a.text=a.text?a.text:e.getContrast(a.background),a.link=a.link?a.link:a.text,i[r+".cc-window"]=["color: "+a.text,"background-color: "+a.background],i[r+".cc-revoke"]=["color: "+a.text,"background-color: "+a.background],i[r+" .cc-link,"+r+" .cc-link:active,"+r+" .cc-link:visited"]=["color: "+a.link],s&&(s.text=s.text?s.text:e.getContrast(s.background),s.border=s.border?s.border:"transparent",i[r+" .cc-btn"]=["color: "+s.text,"border-color: "+s.border,"background-color: "+s.background],s.padding&&i[r+" .cc-btn"].push("padding: "+s.padding),"transparent"!=s.background&&(i[r+" .cc-btn:hover, "+r+" .cc-btn:focus"]=["background-color: "+(s.hover||c(s.background))]),l?(l.text=l.text?l.text:e.getContrast(l.background),l.border=l.border?l.border:"transparent",i[r+" .cc-highlight .cc-btn:first-child"]=["color: "+l.text,"border-color: "+l.border,"background-color: "+l.background]):i[r+" .cc-highlight .cc-btn:first-child"]=["color: "+a.text]));var u=document.createElement("style");document.head.appendChild(u),t.customStyles[n]={references:1,element:u.sheet};var f=-1;for(var p in i)i.hasOwnProperty(p)&&u.sheet.insertRule(p+"{"+i[p].join(";")+"}",++f)}}(o,n,"."+r),i}).call(this,this.options.palette),this.customStyleSelector&&r.push(this.customStyleSelector),r}).call(this).join(" ")).replace("{{children}}",(function(){var t={},n=this.options;n.showLink||(n.elements.link="",n.elements.messagelink=n.elements.message),Object.keys(n.elements).forEach((function(o){t[o]=e.interpolateString(n.elements[o],(function(t){var e=n.content[t];return t&&"string"==typeof e&&e.length?e:""}))}));var o=n.compliance[n.type];o||(o=n.compliance.info),t.compliance=e.interpolateString(o,(function(e){return t[e]}));var r=n.layouts[n.layout];return r||(r=n.layouts.basic),e.interpolateString(r,(function(e){return t[e]}))}).call(this)),i=this.options.overrideHTML;if("string"==typeof i&&i.length&&(r=i),this.options.static){var a=l.call(this,'
    '+r+"
    ");a.style.display="",this.element=a.firstChild,this.element.style.display="none",e.addClass(this.element,"cc-invisible")}else this.element=l.call(this,r);(function(){var n=this.setStatus.bind(this),o=this.close.bind(this),r=this.options.dismissOnTimeout;"number"==typeof r&&r>=0&&(this.dismissTimeout=window.setTimeout((function(){n(t.status.dismiss),o(!0)}),Math.floor(r)));var i=this.options.dismissOnScroll;if("number"==typeof i&&i>=0){var a=function(e){window.pageYOffset>Math.floor(i)&&(n(t.status.dismiss),o(!0),window.removeEventListener("scroll",a),this.onWindowScroll=null)};this.options.enabled&&(this.onWindowScroll=a,window.addEventListener("scroll",a))}var s=this.options.ignoreClicksFrom;if(this.options.dismissOnWindowClick){var l=(function(r){for(var i=!1,a=r.path.length,c=s.length,u=0;ur&&(n=!0),n?e.hasClass(o,"cc-active")||e.addClass(o,"cc-active"):e.hasClass(o,"cc-active")&&e.removeClass(o,"cc-active")}),200);this.onMouseMove=r,window.addEventListener("mousemove",r)}}}).call(this),this.options.autoOpen&&this.autoOpen()},r.prototype.destroy=function(){this.onButtonClick&&this.element&&(this.element.removeEventListener("click",this.onButtonClick),this.onButtonClick=null),this.dismissTimeout&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null),this.onWindowScroll&&(window.removeEventListener("scroll",this.onWindowScroll),this.onWindowScroll=null),this.onWindowClick&&(window.removeEventListener("click",this.onWindowClick),this.onWindowClick=null),this.onMouseMove&&(window.removeEventListener("mousemove",this.onMouseMove),this.onMouseMove=null),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.revokeBtn&&this.revokeBtn.parentNode&&this.revokeBtn.parentNode.removeChild(this.revokeBtn),this.revokeBtn=null,function(n){if(e.isPlainObject(n)){var o=e.hash(JSON.stringify(n)),r=t.customStyles[o];if(r&&!--r.references){var i=r.element.ownerNode;i&&i.parentNode&&i.parentNode.removeChild(i),t.customStyles[o]=null}}}(this.options.palette),this.options=null},r.prototype.open=function(e){if(this.element)return this.isOpen()||(t.hasTransition?this.fadeIn():this.element.style.display="",this.options.revokable&&this.toggleRevokeButton(),this.options.onPopupOpen.call(this)),this},r.prototype.close=function(e){if(this.element)return this.isOpen()&&(t.hasTransition?this.fadeOut():this.element.style.display="none",e&&this.options.revokable&&this.toggleRevokeButton(!0),this.options.onPopupClose.call(this)),this},r.prototype.fadeIn=function(){var n=this.element;t.hasTransition&&n&&(this.afterTransition&&a.call(this,n),e.hasClass(n,"cc-invisible"))&&(n.style.display="",this.options.static&&(this.element.parentNode.style.maxHeight=this.element.clientHeight+"px"),this.openingTimeout=setTimeout(i.bind(this,n),20))},r.prototype.fadeOut=function(){var n=this.element;t.hasTransition&&n&&(this.openingTimeout&&(clearTimeout(this.openingTimeout),i.bind(this,n)),e.hasClass(n,"cc-invisible")||(this.options.static&&(this.element.parentNode.style.maxHeight=""),this.afterTransition=a.bind(this,n),n.addEventListener(t.transitionEnd,this.afterTransition),e.addClass(n,"cc-invisible")))},r.prototype.isOpen=function(){return this.element&&""==this.element.style.display&&(!t.hasTransition||!e.hasClass(this.element,"cc-invisible"))},r.prototype.toggleRevokeButton=function(t){this.revokeBtn&&(this.revokeBtn.style.display=t?"":"none")},r.prototype.revokeChoice=function(t){this.options.enabled=!0,this.clearStatus(),this.options.onRevokeChoice.call(this),t||this.autoOpen()},r.prototype.hasAnswered=function(e){return Object.keys(t.status).indexOf(this.getStatus())>=0},r.prototype.hasConsented=function(e){var n=this.getStatus();return n==t.status.allow||n==t.status.dismiss},r.prototype.autoOpen=function(t){!this.hasAnswered()&&this.options.enabled?this.open():this.hasAnswered()&&this.options.revokable&&this.toggleRevokeButton(!0)},r.prototype.setStatus=function(n){var o=this.options.cookie,r=e.getCookie(o.name),i=Object.keys(t.status).indexOf(r)>=0;Object.keys(t.status).indexOf(n)>=0?(e.setCookie(o.name,n,o.expiryDays,o.domain,o.path,o.secure),this.options.onStatusChange.call(this,n,i)):this.clearStatus()},r.prototype.getStatus=function(){return e.getCookie(this.options.cookie.name)},r.prototype.clearStatus=function(){var t=this.options.cookie;e.setCookie(t.name,"",-1,t.domain,t.path)},r}(),t.Location=function(){var t={timeout:5e3,services:["ipinfo"],serviceDefinitions:{ipinfo:function(){return{url:"//ipinfo.io",headers:["Accept: application/json"],callback:function(t,e){try{var n=JSON.parse(e);return n.error?i(n):{code:n.country}}catch(t){return i({error:"Invalid response ("+t+")"})}}}},ipinfodb:function(t){return{url:"//api.ipinfodb.com/v3/ip-country/?key={api_key}&format=json&callback={callback}",isScript:!0,callback:function(t,e){try{var n=JSON.parse(e);return"ERROR"==n.statusCode?i({error:n.statusMessage}):{code:n.countryCode}}catch(t){return i({error:"Invalid response ("+t+")"})}}}},maxmind:function(){return{url:"//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js",isScript:!0,callback:function(t){window.geoip2?geoip2.country((function(e){try{t({code:e.country.iso_code})}catch(e){t(i(e))}}),(function(e){t(i(e))})):t(new Error("Unexpected response format. The downloaded script should have exported `geoip2` to the global scope"))}}}}};function n(n){e.deepExtend(this.options={},t),e.isPlainObject(n)&&e.deepExtend(this.options,n),this.currentServiceIndex=-1}function o(t,e,n){var o,r=document.createElement("script");r.type="text/"+(t.type||"javascript"),r.src=t.src||t,r.async=!1,r.onreadystatechange=r.onload=function(){var t=r.readyState;clearTimeout(o),e.done||t&&!/loaded|complete/.test(t)||(e.done=!0,e(),r.onreadystatechange=r.onload=null)},document.body.appendChild(r),o=setTimeout((function(){e.done=!0,e(),r.onreadystatechange=r.onload=null}),n)}function r(t,e,n,o,r){var i=new(window.XMLHttpRequest||window.ActiveXObject)("MSXML2.XMLHTTP.3.0");if(i.open(o?"POST":"GET",t,1),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),Array.isArray(r))for(var a=0,s=r.length;a3&&e(i)}),i.send(o)}function i(t){return new Error("Error ["+(t.code||"UNKNOWN")+"]: "+t.error)}return n.prototype.getNextService=function(){var t;do{t=this.getServiceByIdx(++this.currentServiceIndex)}while(this.currentServiceIndex=0,revokable:e.revokable.indexOf(t)>=0,explicitAction:e.explicitAction.indexOf(t)>=0}},n.prototype.applyLaw=function(t,e){var n=this.get(e);return n.hasLaw||(t.enabled=!1,"function"==typeof t.onNoCookieLaw&&t.onNoCookieLaw(e,n)),this.options.regionalLaw&&(n.revokable&&(t.revokable=!0),n.explicitAction&&(t.dismissOnScroll=!1,t.dismissOnTimeout=!1)),t},n}(),t.initialise=function(n,o,r){var i=new t.Law(n.law);o||(o=function(){}),r||(r=function(){});var a=Object.keys(t.status),s=e.getCookie("cookieconsent_status");a.indexOf(s)>=0?o(new t.Popup(n)):t.getCountryCode(n,(function(e){delete n.law,delete n.location,e.code&&(n=i.applyLaw(n,e.code)),o(new t.Popup(n))}),(function(e){delete n.law,delete n.location,r(e,new t.Popup(n))}))},t.getCountryCode=function(e,n,o){e.law&&e.law.countryCode?n({code:e.law.countryCode}):e.location?new t.Location(e.location).locate((function(t){n(t||{})}),o):n({})},t.utils=e,t.hasInitialised=!0,window.cookieconsent=t}}(window.cookieconsent||{});var abp=abp||{};!function(){abp.appPath=abp.appPath||"/",abp.pageLoadTime=new Date,abp.toAbsAppPath=function(t){return 0==t.indexOf("/")&&(t=t.substring(1)),abp.appPath+t},abp.multiTenancy=abp.multiTenancy||{},abp.multiTenancy.isEnabled=!1,abp.multiTenancy.sides={TENANT:1,HOST:2},abp.multiTenancy.tenantIdCookieName="Abp.TenantId",abp.multiTenancy.setTenantIdCookie=function(t){t?abp.utils.setCookieValue(abp.multiTenancy.tenantIdCookieName,t.toString(),new Date((new Date).getTime()+15768e7),abp.appPath,abp.domain):abp.utils.deleteCookie(abp.multiTenancy.tenantIdCookieName,abp.appPath)},abp.multiTenancy.getTenantIdCookie=function(){var t=abp.utils.getCookieValue(abp.multiTenancy.tenantIdCookieName);return t?parseInt(t):null},abp.session=abp.session||{multiTenancySide:abp.multiTenancy.sides.HOST},abp.localization=abp.localization||{},abp.localization.languages=[],abp.localization.currentLanguage={},abp.localization.sources=[],abp.localization.values={},abp.localization.localize=function(t,e){var n=abp.localization.values[e=e||abp.localization.defaultSourceName];if(!n)return abp.log.warn("Could not find localization source: "+e),t;var o=n[t];if(null==o)return t;var r=Array.prototype.slice.call(arguments,0);return r.splice(1,1),r[0]=o,abp.utils.formatString.apply(this,r)},abp.localization.getSource=function(t){return function(e){var n=Array.prototype.slice.call(arguments,0);return n.splice(1,0,t),abp.localization.localize.apply(this,n)}},abp.localization.isCurrentCulture=function(t){return abp.localization.currentCulture&&abp.localization.currentCulture.name&&0==abp.localization.currentCulture.name.indexOf(t)},abp.localization.defaultSourceName=void 0,abp.localization.abpWeb=abp.localization.getSource("AbpWeb"),abp.auth=abp.auth||{},abp.auth.allPermissions=abp.auth.allPermissions||{},abp.auth.grantedPermissions=abp.auth.grantedPermissions||{},abp.auth.hasPermission=function(t){return abp.auth.isGranted.apply(this,arguments)},abp.auth.hasAnyOfPermissions=function(){return abp.auth.isAnyGranted.apply(this,arguments)},abp.auth.hasAllOfPermissions=function(){return abp.auth.areAllGranted.apply(this,arguments)},abp.auth.isGranted=function(t){return null!=abp.auth.allPermissions[t]&&null!=abp.auth.grantedPermissions[t]},abp.auth.isAnyGranted=function(){if(!arguments||arguments.length<=0)return!0;for(var t=0;t0&&o(),n=n+i.name+"["+a+"]="+encodeURIComponent(i.value[a]);else n=n+i.name+"="+encodeURIComponent(i.value)}return n},abp.utils.setCookieValue=function(t,e,n,o,r){var i=encodeURIComponent(t)+"=";e&&(i+=encodeURIComponent(e)),n&&(i=i+"; expires="+n.toUTCString()),o&&(i=i+"; path="+o),r&&(i=i+"; domain="+r),document.cookie=i},abp.utils.getCookieValue=function(t){for(var e=document.cookie.split("; "),n=0;n':"";o&&(r.title=i+''+o+""),r.html=(o?"":i)+''+n+"";var a=Object.assign({},t,r);Swal.fire(a)};abp.notify.success=function(t,n,o){e(0,t,n,Object.assign({background:"#34bfa3",imageClass:"fa fa-check-circle"},o))},abp.notify.info=function(t,n,o){e(0,t,n,Object.assign({background:"#36a3f7",imageClass:"fa fa-info-circle"},o))},abp.notify.warn=function(t,n,o){e(0,t,n,Object.assign({background:"#ffb822",imageClass:"fa fa-exclamation-triangle"},o))},abp.notify.error=function(t,n,o){e(0,t,n,Object.assign({background:"#f4516c",imageClass:"fa fa-exclamation-circle"},o))}}(),function(t){"use strict";var e,n=t.Uint8Array,o=t.HTMLCanvasElement,r=o&&o.prototype,i=/\s*;\s*base64\s*(?:;|$)/i,a="toDataURL",s=function(t){for(var o,r,i=t.length,a=new n(i/4*3|0),s=0,l=0,c=[0,0],u=0,f=0;i--;)r=t.charCodeAt(s++),255!==(o=e[r-43])&&void 0!==o&&(c[1]=c[0],c[0]=r,f=f<<6|o,4==++u&&(a[l++]=f>>>16,61!==c[1]&&(a[l++]=f>>>8),61!==c[0]&&(a[l++]=f),u=0));return a};n&&(e=new n([62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51])),!o||r.toBlob&&r.toBlobHD||(r.toBlob||(r.toBlob=function(t,e){if(e||(e="image/png"),this.mozGetAsFile)t(this.mozGetAsFile("canvas",e));else if(this.msToBlob&&/^\s*image\/png\s*(?:$|;)/i.test(e))t(this.msToBlob());else{var o,r=Array.prototype.slice.call(arguments,1),l=this[a].apply(this,r),c=l.indexOf(","),u=l.substring(c+1),f=i.test(l.substring(0,c));Blob.fake?((o=new Blob).encoding=f?"base64":"URI",o.data=u,o.size=u.length):n&&(o=f?new Blob([s(u)],{type:e}):new Blob([decodeURIComponent(u)],{type:e})),t(o)}}),r.toBlobHD=!r.toBlobHD&&r.toDataURLHD?function(){a="toDataURLHD";var t=this.toBlob();return a="toDataURL",t}:r.toBlob)}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content||this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Popper=e()}(this,(function(){"use strict";for(var t="undefined"!=typeof window&&"undefined"!=typeof document,e=["Edge","Trident","Firefox"],n=0,o=0;o=0){n=1;break}var r=t&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),n))}};function i(t){return t&&"[object Function]"==={}.toString.call(t)}function a(t,e){if(1!==t.nodeType)return[];var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n}function s(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function l(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=a(t);return/(auto|scroll|overlay)/.test(e.overflow+e.overflowY+e.overflowX)?t:l(s(t))}var c=t&&!(!window.MSInputMethodContext||!document.documentMode),u=t&&/MSIE 10/.test(navigator.userAgent);function f(t){return 11===t?c:10===t?u:c||u}function p(t){if(!t)return document.documentElement;for(var e=f(10)?document.body:null,n=t.offsetParent||null;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var o=n&&n.nodeName;return o&&"BODY"!==o&&"HTML"!==o?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===a(n,"position")?p(n):n:t?t.ownerDocument.documentElement:document.documentElement}function d(t){return null!==t.parentNode?d(t.parentNode):t}function h(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,o=n?t:e,r=n?e:t,i=document.createRange();i.setStart(o,0),i.setEnd(r,0);var a,s,l=i.commonAncestorContainer;if(t!==l&&e!==l||o.contains(r))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&p(a.firstElementChild)!==a?p(l):l;var c=d(t);return c.host?h(c.host,e):h(t,d(e).host)}function v(t){var e="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",n=t.nodeName;if("BODY"===n||"HTML"===n){var o=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||o)[e]}return t[e]}function g(t,e){var n="x"===e?"Left":"Top",o="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"],10)+parseFloat(t["border"+o+"Width"],10)}function y(t,e,n,o){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],f(10)?parseInt(n["offset"+t])+parseInt(o["margin"+("Height"===t?"Top":"Left")])+parseInt(o["margin"+("Height"===t?"Bottom":"Right")]):0)}function m(t){var e=t.body,n=t.documentElement,o=f(10)&&getComputedStyle(n);return{height:y("Height",e,n,o),width:y("Width",e,n,o)}}var b=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},w=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]&&arguments[2],o=f(10),r="HTML"===e.nodeName,i=E(t),s=E(e),c=l(t),u=a(e),p=parseFloat(u.borderTopWidth,10),d=parseFloat(u.borderLeftWidth,10);n&&r&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var h=T({top:i.top-s.top-p,left:i.left-s.left-d,width:i.width,height:i.height});if(h.marginTop=0,h.marginLeft=0,!o&&r){var g=parseFloat(u.marginTop,10),y=parseFloat(u.marginLeft,10);h.top-=p-g,h.bottom-=p-g,h.left-=d-y,h.right-=d-y,h.marginTop=g,h.marginLeft=y}return(o&&!n?e.contains(c):e===c&&"BODY"!==c.nodeName)&&(h=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=v(e,"top"),r=v(e,"left"),i=n?-1:1;return t.top+=o*i,t.bottom+=o*i,t.left+=r*i,t.right+=r*i,t}(h,e)),h}function S(t){if(!t||!t.parentElement||f())return document.documentElement;for(var e=t.parentElement;e&&"none"===a(e,"transform");)e=e.parentElement;return e||document.documentElement}function x(t,e,n,o){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},c=r?S(t):h(t,e);if("viewport"===o)i=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,o=O(t,n),r=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=e?0:v(n),s=e?0:v(n,"left");return T({top:a-o.top+o.marginTop,left:s-o.left+o.marginLeft,width:r,height:i})}(c,r);else{var u=void 0;"scrollParent"===o?"BODY"===(u=l(s(e))).nodeName&&(u=t.ownerDocument.documentElement):u="window"===o?t.ownerDocument.documentElement:o;var f=O(u,c,r);if("HTML"!==u.nodeName||function t(e){var n=e.nodeName;if("BODY"===n||"HTML"===n)return!1;if("fixed"===a(e,"position"))return!0;var o=s(e);return!!o&&t(o)}(c))i=f;else{var p=m(t.ownerDocument),d=p.height,g=p.width;i.top+=f.top-f.marginTop,i.bottom=d+f.top,i.left+=f.left-f.marginLeft,i.right=g+f.left}}var y="number"==typeof(n=n||0);return i.left+=y?n:n.left||0,i.top+=y?n:n.top||0,i.right-=y?n:n.right||0,i.bottom-=y?n:n.bottom||0,i}function C(t,e,n,o,r){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=x(n,o,i,r),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},l=Object.keys(s).map((function(t){return k({key:t},s[t],{area:(e=s[t],e.width*e.height)});var e})).sort((function(t,e){return e.area-t.area})),c=l.filter((function(t){return t.width>=n.clientWidth&&t.height>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,f=t.split("-")[1];return u+(f?"-"+f:"")}function A(t,e,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return O(n,o?S(e):h(e,n),o)}function N(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),o=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+o,height:t.offsetHeight+n}}function L(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function P(t,e,n){n=n.split("-")[0];var o=N(t),r={width:o.width,height:o.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",l=i?"height":"width",c=i?"width":"height";return r[a]=e[a]+e[l]/2-o[l]/2,r[s]=n===s?e[s]-o[c]:e[L(s)],r}function j(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function I(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===n}));var o=j(t,(function(t){return t[e]===n}));return t.indexOf(o)}(t,"name",n))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;t.enabled&&i(n)&&(e.offsets.popper=T(e.offsets.popper),e.offsets.reference=T(e.offsets.reference),e=n(e,t))})),e}function D(t,e){return t.some((function(t){return t.enabled&&t.name===e}))}function q(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),o=0;o1&&void 0!==arguments[1]&&arguments[1],n=W.indexOf(t),o=W.slice(n+1).concat(W.slice(0,n));return e?o.reverse():o}var Y={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,n=e.split("-")[0],o=e.split("-")[1];if(o){var r=t.offsets,i=r.reference,a=r.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",u={start:_({},l,i[l]),end:_({},l,i[l]+i[c]-a[c])};t.offsets.popper=k({},a,u[o])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var n,o=e.offset,r=t.offsets,i=r.popper,a=r.reference,s=t.placement.split("-")[0];return n=M(+o)?[+o,0]:function(t,e,n,o){var r=[0,0],i=-1!==["right","left"].indexOf(o),a=t.split(/(\+|\-)/).map((function(t){return t.trim()})),s=a.indexOf(j(a,(function(t){return-1!==t.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return(c=c.map((function(t,o){var r=(1===o?!i:i)?"height":"width",a=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,n,o){var r=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+r[1],a=r[2];if(!i)return t;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=o}return T(s)[e]/100*i}return"vh"===a||"vw"===a?("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i:i}(t,r,e,n)}))}))).forEach((function(t,e){t.forEach((function(n,o){M(n)&&(r[e]+=n*("-"===t[o-1]?-1:1))}))})),r}(o,i,a,s),"left"===s?(i.top+=n[0],i.left-=n[1]):"right"===s?(i.top+=n[0],i.left+=n[1]):"top"===s?(i.left+=n[0],i.top-=n[1]):"bottom"===s&&(i.left+=n[0],i.top+=n[1]),t.popper=i,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var n=e.boundariesElement||p(t.instance.popper);t.instance.reference===n&&(n=p(n));var o=q("transform"),r=t.instance.popper.style,i=r.top,a=r.left,s=r[o];r.top="",r.left="",r[o]="";var l=x(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);r.top=i,r.left=a,r[o]=s,e.boundaries=l;var c=t.offsets.popper,u={primary:function(t){var n=c[t];return c[t]l[t]&&!e.escapeWithReference&&(o=Math.min(c[n],l[t]-("right"===t?c.width:c.height))),_({},n,o)}};return e.priority.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";c=k({},c,u[e](t))})),t.offsets.popper=c,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,o=e.reference,r=t.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(r),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]i(o[s])&&(t.offsets.popper[l]=i(o[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!K(t.instance.modifiers,"arrow","keepTogether"))return t;var o=e.element;if("string"==typeof o){if(!(o=t.instance.popper.querySelector(o)))return t}else if(!t.instance.popper.contains(o))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var r=t.placement.split("-")[0],i=t.offsets,s=i.popper,l=i.reference,c=-1!==["left","right"].indexOf(r),u=c?"height":"width",f=c?"Top":"Left",p=f.toLowerCase(),d=c?"left":"top",h=c?"bottom":"right",v=N(o)[u];l[h]-vs[h]&&(t.offsets.popper[p]+=l[p]+v-s[h]),t.offsets.popper=T(t.offsets.popper);var g=l[p]+l[u]/2-v/2,y=a(t.instance.popper),m=parseFloat(y["margin"+f],10),b=parseFloat(y["border"+f+"Width"],10),w=g-t.offsets.popper[p]-m-b;return w=Math.max(Math.min(s[u]-v,w),0),t.arrowElement=o,t.offsets.arrow=(_(n={},p,Math.round(w)),_(n,d,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(D(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=x(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),o=t.placement.split("-")[0],r=L(o),i=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case"flip":a=[o,r];break;case"clockwise":a=z(o);break;case"counterclockwise":a=z(o,!0);break;default:a=e.behavior}return a.forEach((function(s,l){if(o!==s||a.length===l+1)return t;o=t.placement.split("-")[0],r=L(o);var c=t.offsets.popper,u=t.offsets.reference,f=Math.floor,p="left"===o&&f(c.right)>f(u.left)||"right"===o&&f(c.left)f(u.top)||"bottom"===o&&f(c.top)f(n.right),v=f(c.top)f(n.bottom),y="left"===o&&d||"right"===o&&h||"top"===o&&v||"bottom"===o&&g,m=-1!==["top","bottom"].indexOf(o),b=!!e.flipVariations&&(m&&"start"===i&&d||m&&"end"===i&&h||!m&&"start"===i&&v||!m&&"end"===i&&g)||!!e.flipVariationsByContent&&(m&&"start"===i&&h||m&&"end"===i&&d||!m&&"start"===i&&g||!m&&"end"===i&&v);(p||y||b)&&(t.flipped=!0,(p||y)&&(o=a[l+1]),b&&(i=function(t){return"end"===t?"start":"start"===t?"end":t}(i)),t.placement=o+(i?"-"+i:""),t.offsets.popper=k({},t.offsets.popper,P(t.instance.popper,t.offsets.reference,t.placement)),t=I(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],o=t.offsets,r=o.popper,i=o.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return r[a?"left":"top"]=i[n]-(s?r[a?"width":"height"]:0),t.placement=L(e),t.offsets.popper=T(r),t}},hide:{order:800,enabled:!0,fn:function(t){if(!K(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=j(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottomn.right||e.top>n.bottom||e.right2&&void 0!==arguments[2]?arguments[2]:{};b(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(o.update)},this.update=r(this.update.bind(this)),this.options=k({},t.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(k({},t.Defaults.modifiers,a.modifiers)).forEach((function(e){o.options.modifiers[e]=k({},t.Defaults.modifiers[e]||{},a.modifiers?a.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return k({name:t},o.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&i(t.onLoad)&&t.onLoad(o.reference,o.popper,o.options,t,o.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return w(t,[{key:"update",value:function(){return(function(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=A(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=C(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=P(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=I(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}).call(this)}},{key:"destroy",value:function(){return(function(){return this.state.isDestroyed=!0,D(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[q("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}).call(this)}},{key:"enableEventListeners",value:function(){return(function(){this.state.eventsEnabled||(this.state=function(t,e,n,o){n.updateBound=o,R(t).addEventListener("resize",n.updateBound,{passive:!0});var r=l(t);return function t(e,n,o,r){var i="BODY"===e.nodeName,a=i?e.ownerDocument.defaultView:e;a.addEventListener(n,o,{passive:!0}),i||t(l(a.parentNode),n,o,r),r.push(a)}(r,"scroll",n.updateBound,n.scrollParents),n.scrollElement=r,n.eventsEnabled=!0,n}(this.reference,0,this.state,this.scheduleUpdate))}).call(this)}},{key:"disableEventListeners",value:function(){return U.call(this)}}]),t}();return V.Utils=("undefined"!=typeof window?window:global).PopperUtils,V.placements=F,V.Defaults=Y,V})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("popper.js")):"function"==typeof define&&define.amd?define(["popper.js"],e):t.Tooltip=e(t.Popper)}(this,(function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e=function(){function t(t,e){for(var n,o=0;o
    ',trigger:"hover focus",offset:0,arrowSelector:".tooltip-arrow, .tooltip__arrow",innerSelector:".tooltip-inner, .tooltip__inner"},r=function(){function r(t,e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),i.call(this),e=n({},o,e),t.jquery&&(t=t[0]),this.reference=t,this.options=e;var a="string"==typeof e.trigger?e.trigger.split(" ").filter((function(t){return-1!==["click","hover","focus"].indexOf(t)})):[];this._isOpen=!1,this._popperOptions={},this._setEventListeners(t,a,e)}return e(r,[{key:"_create",value:function(t,e,n,o){var r=window.document.createElement("div");r.innerHTML=e.trim();var i=r.childNodes[0];i.id="tooltip_"+Math.random().toString(36).substr(2,10),i.setAttribute("aria-hidden","false");var a=r.querySelector(this.options.innerSelector);return this._addTitleContent(t,n,o,a),i}},{key:"_addTitleContent",value:function(t,e,n,o){if(1===e.nodeType||11===e.nodeType)n&&o.appendChild(e);else if(function(t){return t&&"[object Function]"==={}.toString.call(t)}(e)){var r=e.call(t);n?o.innerHTML=r:o.textContent=r}else n?o.innerHTML=e:o.textContent=e}},{key:"_show",value:function(e,o){if(this._isOpen&&!this._isOpening)return this;if(this._isOpen=!0,this._tooltipNode)return this._tooltipNode.style.visibility="visible",this._tooltipNode.setAttribute("aria-hidden","false"),this.popperInstance.update(),this;var r=e.getAttribute("title")||o.title;if(!r)return this;var i=this._create(e,o.template,r,o.html);e.setAttribute("aria-describedby",i.id);var a=this._findContainer(o.container,e);return this._append(i,a),this._popperOptions=n({},o.popperOptions,{placement:o.placement}),this._popperOptions.modifiers=n({},this._popperOptions.modifiers,{arrow:n({},this._popperOptions.modifiers&&this._popperOptions.modifiers.arrow,{element:o.arrowSelector}),offset:n({},this._popperOptions.modifiers&&this._popperOptions.modifiers.offset,{offset:o.offset})}),o.boundariesElement&&(this._popperOptions.modifiers.preventOverflow={boundariesElement:o.boundariesElement}),this.popperInstance=new t(e,i,this._popperOptions),this._tooltipNode=i,this}},{key:"_hide",value:function(){return this._isOpen?(this._isOpen=!1,this._tooltipNode.style.visibility="hidden",this._tooltipNode.setAttribute("aria-hidden","true"),this):this}},{key:"_dispose",value:function(){var t=this;return this._events.forEach((function(e){t.reference.removeEventListener(e.event,e.func)})),this._events=[],this._tooltipNode&&(this._hide(),this.popperInstance.destroy(),!this.popperInstance.options.removeOnDestroy&&(this._tooltipNode.parentNode.removeChild(this._tooltipNode),this._tooltipNode=null)),this}},{key:"_findContainer",value:function(t,e){return"string"==typeof t?t=window.document.querySelector(t):!1===t&&(t=e.parentNode),t}},{key:"_append",value:function(t,e){e.appendChild(t)}},{key:"_setEventListeners",value:function(t,e,n){var o=this,r=[],i=[];e.forEach((function(t){"hover"===t?(r.push("mouseenter"),i.push("mouseleave")):"focus"===t?(r.push("focus"),i.push("blur")):"click"===t&&(r.push("click"),i.push("click"))})),r.forEach((function(e){var r=function(e){!0===o._isOpening||(e.usedByTooltip=!0,o._scheduleShow(t,n.delay,n,e))};o._events.push({event:e,func:r}),t.addEventListener(e,r)})),i.forEach((function(e){var r=function(e){!0===e.usedByTooltip||o._scheduleHide(t,n.delay,n,e)};o._events.push({event:e,func:r}),t.addEventListener(e,r),"click"===e&&n.closeOnClickOutside&&document.addEventListener("mousedown",(function(e){if(o._isOpening){var n=o.popperInstance.popper;t.contains(e.target)||n.contains(e.target)||r(e)}}),!0)}))}},{key:"_scheduleShow",value:function(t,e,n){var o=this;this._isOpening=!0,this._showTimeout=window.setTimeout((function(){return o._show(t,n)}),e&&e.show||e||0)}},{key:"_scheduleHide",value:function(t,e,n,o){var r=this;this._isOpening=!1;var i=e&&e.hide||e||0;window.clearTimeout(this._showTimeout),window.setTimeout((function(){if(!1!==r._isOpen&&document.body.contains(r._tooltipNode)){if("mouseleave"===o.type&&r._setTooltipNodeEvent(o,t,e,n))return;r._hide(t,n)}}),i)}},{key:"_updateTitleContent",value:function(t){if(void 0!==this._tooltipNode){var e=this._tooltipNode.querySelector(this.options.innerSelector);this._clearTitleContent(e,this.options.html,this.reference.getAttribute("title")||this.options.title),this._addTitleContent(this.reference,t,this.options.html,e),this.options.title=t,this.popperInstance.update()}else void 0!==this.options.title&&(this.options.title=t)}},{key:"_clearTitleContent",value:function(t,e,n){1===n.nodeType||11===n.nodeType?e&&t.removeChild(n):e?t.innerHTML="":t.textContent=""}}]),r}(),i=function(){var t=this;this.show=function(){return t._show(t.reference,t.options)},this.hide=function(){return t._hide()},this.dispose=function(){return t._dispose()},this.toggle=function(){return t._isOpen?t.hide():t.show()},this.updateTitleContent=function(e){return t._updateTitleContent(e)},this._events=[],this._setTooltipNodeEvent=function(e,n,o,r){return!!t._tooltipNode.contains(e.relatedreference||e.toElement||e.relatedTarget)&&(t._tooltipNode.addEventListener(e.type,(function o(i){var a=i.relatedreference||i.toElement||i.relatedTarget;t._tooltipNode.removeEventListener(e.type,o),n.contains(a)||t._scheduleHide(n,r.delay,r,i)})),!0)}};return r})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.PerfectScrollbar=e()}(this,(function(){"use strict";function t(t){return getComputedStyle(t)}function e(t,e){for(var n in e){var o=e[n];"number"==typeof o&&(o+="px"),t.style[n]=o}return t}function n(t){var e=document.createElement("div");return e.className=t,e}var o="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function r(t,e){if(!o)throw new Error("No element matching method supported");return o.call(t,e)}function i(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function a(t,e){return Array.prototype.filter.call(t.children,(function(t){return r(t,e)}))}var s=function(t){return"ps__thumb-"+t},l=function(t){return"ps__rail-"+t},c=function(t){return"ps--active-"+t},u=function(t){return"ps--scrolling-"+t},f={x:null,y:null};function p(t,e){var n=t.element.classList,o=u(e);n.contains(o)?clearTimeout(f[e]):n.add(o)}function d(t,e){f[e]=setTimeout((function(){return t.isAlive&&t.element.classList.remove(u(e))}),t.settings.scrollingThreshold)}var h=function(t){this.element=t,this.handlers={}},v={isEmpty:{configurable:!0}};h.prototype.bind=function(t,e){void 0===this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this.element.addEventListener(t,e,!1)},h.prototype.unbind=function(t,e){var n=this;this.handlers[t]=this.handlers[t].filter((function(o){return!(!e||o===e)||(n.element.removeEventListener(t,o,!1),!1)}))},h.prototype.unbindAll=function(){for(var t in this.handlers)this.unbind(t)},v.isEmpty.get=function(){var t=this;return Object.keys(this.handlers).every((function(e){return 0===t.handlers[e].length}))},Object.defineProperties(h.prototype,v);var g=function(){this.eventElements=[]};function y(t){if("function"==typeof window.CustomEvent)return new CustomEvent(t);var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,void 0),e}g.prototype.eventElement=function(t){var e=this.eventElements.filter((function(e){return e.element===t}))[0];return e||(e=new h(t),this.eventElements.push(e)),e},g.prototype.bind=function(t,e,n){this.eventElement(t).bind(e,n)},g.prototype.unbind=function(t,e,n){var o=this.eventElement(t);o.unbind(e,n),o.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(o),1)},g.prototype.unbindAll=function(){this.eventElements.forEach((function(t){return t.unbindAll()})),this.eventElements=[]},g.prototype.once=function(t,e,n){var o=this.eventElement(t),r=function(t){o.unbind(e,r),n(t)};o.bind(e,r)};var m=function(t,e,n,o,r){var i;if(void 0===o&&(o=!0),void 0===r&&(r=!1),"top"===e)i=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==e)throw new Error("A proper axis should be provided");i=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(t,e,n,o,r){var i=n[0],a=n[1],s=n[2],l=n[3],c=n[4],u=n[5];void 0===o&&(o=!0),void 0===r&&(r=!1);var f=t.element;t.reach[l]=null,f[s]<1&&(t.reach[l]="start"),f[s]>t[i]-t[a]-1&&(t.reach[l]="end"),e&&(f.dispatchEvent(y("ps-scroll-"+l)),e<0?f.dispatchEvent(y("ps-scroll-"+c)):e>0&&f.dispatchEvent(y("ps-scroll-"+u)),o&&function(t,e){p(t,e),d(t,e)}(t,l)),t.reach[l]&&(e||r)&&f.dispatchEvent(y("ps-"+l+"-reach-"+t.reach[l]))}(t,n,i,o,r)};function b(t){return parseInt(t,10)||0}var w={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},_=function(t){var n=t.element,o=Math.floor(n.scrollTop);t.containerWidth=n.clientWidth,t.containerHeight=n.clientHeight,t.contentWidth=n.scrollWidth,t.contentHeight=n.scrollHeight,n.contains(t.scrollbarXRail)||(a(n,l("x")).forEach((function(t){return i(t)})),n.appendChild(t.scrollbarXRail)),n.contains(t.scrollbarYRail)||(a(n,l("y")).forEach((function(t){return i(t)})),n.appendChild(t.scrollbarYRail)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),function(t,n){var o={width:n.railXWidth},r=Math.floor(t.scrollTop);o.left=n.isRtl?n.negativeScrollAdjustment+t.scrollLeft+n.containerWidth-n.contentWidth:t.scrollLeft,n.isScrollbarXUsingBottom?o.bottom=n.scrollbarXBottom-r:o.top=n.scrollbarXTop+r,e(n.scrollbarXRail,o);var i={top:r,height:n.railYHeight};n.isScrollbarYUsingRight?i.right=n.isRtl?n.contentWidth-(n.negativeScrollAdjustment+t.scrollLeft)-n.scrollbarYRight-n.scrollbarYOuterWidth:n.scrollbarYRight-t.scrollLeft:i.left=n.isRtl?n.negativeScrollAdjustment+t.scrollLeft+2*n.containerWidth-n.contentWidth-n.scrollbarYLeft-n.scrollbarYOuterWidth:n.scrollbarYLeft+t.scrollLeft,e(n.scrollbarYRail,i),e(n.scrollbarX,{left:n.scrollbarXLeft,width:n.scrollbarXWidth-n.railBorderXWidth}),e(n.scrollbarY,{top:n.scrollbarYTop,height:n.scrollbarYHeight-n.railBorderYWidth})}(n,t),t.scrollbarXActive?n.classList.add(c("x")):(n.classList.remove(c("x")),t.scrollbarXWidth=0,t.scrollbarXLeft=0,n.scrollLeft=0),t.scrollbarYActive?n.classList.add(c("y")):(n.classList.remove(c("y")),t.scrollbarYHeight=0,t.scrollbarYTop=0,n.scrollTop=0)};function k(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}function T(t,e){var n=e[0],o=e[1],r=e[2],i=e[3],a=e[5],s=e[6],l=e[7],c=e[8],u=t.element,f=null,h=null,v=null;function g(e){u[s]=f+v*(e[r]-h),p(t,l),_(t),e.stopPropagation(),e.preventDefault()}function y(){d(t,l),t[c].classList.remove("ps--clicking"),t.event.unbind(t.ownerDocument,"mousemove",g)}t.event.bind(t[e[4]],"mousedown",(function(e){f=u[s],h=e[r],v=(t[o]-t[n])/(t[i]-t[a]),t.event.bind(t.ownerDocument,"mousemove",g),t.event.once(t.ownerDocument,"mouseup",y),t[c].classList.add("ps--clicking"),e.stopPropagation(),e.preventDefault()}))}var E={"click-rail":function(t){t.event.bind(t.scrollbarY,"mousedown",(function(t){return t.stopPropagation()})),t.event.bind(t.scrollbarYRail,"mousedown",(function(e){var n=e.pageY-window.pageYOffset-t.scrollbarYRail.getBoundingClientRect().top>t.scrollbarYTop?1:-1;t.element.scrollTop+=n*t.containerHeight,_(t),e.stopPropagation()})),t.event.bind(t.scrollbarX,"mousedown",(function(t){return t.stopPropagation()})),t.event.bind(t.scrollbarXRail,"mousedown",(function(e){var n=e.pageX-window.pageXOffset-t.scrollbarXRail.getBoundingClientRect().left>t.scrollbarXLeft?1:-1;t.element.scrollLeft+=n*t.containerWidth,_(t),e.stopPropagation()}))},"drag-thumb":function(t){T(t,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),T(t,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(t){var e=t.element;t.event.bind(t.ownerDocument,"keydown",(function(n){if(!(n.isDefaultPrevented&&n.isDefaultPrevented()||n.defaultPrevented)&&(r(e,":hover")||r(t.scrollbarX,":focus")||r(t.scrollbarY,":focus"))){var o,i=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(i){if("IFRAME"===i.tagName)i=i.contentDocument.activeElement;else for(;i.shadowRoot;)i=i.shadowRoot.activeElement;if(r(o=i,"input,[contenteditable]")||r(o,"select,[contenteditable]")||r(o,"textarea,[contenteditable]")||r(o,"button,[contenteditable]"))return}var a=0,s=0;switch(n.which){case 37:a=n.metaKey?-t.contentWidth:n.altKey?-t.containerWidth:-30;break;case 38:s=n.metaKey?t.contentHeight:n.altKey?t.containerHeight:30;break;case 39:a=n.metaKey?t.contentWidth:n.altKey?t.containerWidth:30;break;case 40:s=n.metaKey?-t.contentHeight:n.altKey?-t.containerHeight:-30;break;case 32:s=n.shiftKey?t.containerHeight:-t.containerHeight;break;case 33:s=t.containerHeight;break;case 34:s=-t.containerHeight;break;case 36:s=t.contentHeight;break;case 35:s=-t.contentHeight;break;default:return}t.settings.suppressScrollX&&0!==a||t.settings.suppressScrollY&&0!==s||(e.scrollTop-=s,e.scrollLeft+=a,_(t),function(n,o){var r=Math.floor(e.scrollTop);if(0===n){if(!t.scrollbarYActive)return!1;if(0===r&&o>0||r>=t.contentHeight-t.containerHeight&&o<0)return!t.settings.wheelPropagation}var i=e.scrollLeft;if(0===o){if(!t.scrollbarXActive)return!1;if(0===i&&n<0||i>=t.contentWidth-t.containerWidth&&n>0)return!t.settings.wheelPropagation}return!0}(a,s)&&n.preventDefault())}}))},wheel:function(e){var n=e.element;function o(o){var r=function(t){var e=t.deltaX,n=-1*t.deltaY;return void 0!==e&&void 0!==n||(e=-1*t.wheelDeltaX/6,n=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,n*=10),e!=e&&n!=n&&(e=0,n=t.wheelDelta),t.shiftKey?[-n,-e]:[e,n]}(o),i=r[0],a=r[1];if(!function(e,o,r){if(!w.isWebKit&&n.querySelector("select:focus"))return!0;if(!n.contains(e))return!1;for(var i=e;i&&i!==n;){if(i.classList.contains("ps__child--consume"))return!0;var a=t(i);if([a.overflow,a.overflowX,a.overflowY].join("").match(/(scroll|auto)/)){var s=i.scrollHeight-i.clientHeight;if(s>0&&!(0===i.scrollTop&&r>0||i.scrollTop===s&&r<0))return!0;var l=i.scrollWidth-i.clientWidth;if(l>0&&!(0===i.scrollLeft&&o<0||i.scrollLeft===l&&o>0))return!0}i=i.parentNode}return!1}(o.target,i,a)){var s=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(a?n.scrollTop-=a*e.settings.wheelSpeed:n.scrollTop+=i*e.settings.wheelSpeed,s=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(i?n.scrollLeft+=i*e.settings.wheelSpeed:n.scrollLeft-=a*e.settings.wheelSpeed,s=!0):(n.scrollTop-=a*e.settings.wheelSpeed,n.scrollLeft+=i*e.settings.wheelSpeed),_(e),(s=s||function(t,o){var r=Math.floor(n.scrollTop),i=0===n.scrollTop,a=r+n.offsetHeight===n.scrollHeight,s=0===n.scrollLeft,l=n.scrollLeft+n.offsetWidth===n.scrollWidth;return!(Math.abs(o)>Math.abs(t)?i||a:s||l)||!e.settings.wheelPropagation}(i,a))&&!o.ctrlKey&&(o.stopPropagation(),o.preventDefault())}}void 0!==window.onwheel?e.event.bind(n,"wheel",o):void 0!==window.onmousewheel&&e.event.bind(n,"mousewheel",o)},touch:function(e){if(w.supportsTouch||w.supportsIePointer){var n=e.element,o={},r=0,i={},a=null;w.supportsTouch?(e.event.bind(n,"touchstart",u),e.event.bind(n,"touchmove",f),e.event.bind(n,"touchend",p)):w.supportsIePointer&&(window.PointerEvent?(e.event.bind(n,"pointerdown",u),e.event.bind(n,"pointermove",f),e.event.bind(n,"pointerup",p)):window.MSPointerEvent&&(e.event.bind(n,"MSPointerDown",u),e.event.bind(n,"MSPointerMove",f),e.event.bind(n,"MSPointerUp",p)))}function s(t,o){n.scrollTop-=o,n.scrollLeft-=t,_(e)}function l(t){return t.targetTouches?t.targetTouches[0]:t}function c(t){return!(t.pointerType&&"pen"===t.pointerType&&0===t.buttons||(!t.targetTouches||1!==t.targetTouches.length)&&(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))}function u(t){if(c(t)){var e=l(t);o.pageX=e.pageX,o.pageY=e.pageY,r=(new Date).getTime(),null!==a&&clearInterval(a)}}function f(a){if(c(a)){var u=l(a),f={pageX:u.pageX,pageY:u.pageY},p=f.pageX-o.pageX,d=f.pageY-o.pageY;if(function(e,o,r){if(!n.contains(e))return!1;for(var i=e;i&&i!==n;){if(i.classList.contains("ps__child--consume"))return!0;var a=t(i);if([a.overflow,a.overflowX,a.overflowY].join("").match(/(scroll|auto)/)){var s=i.scrollHeight-i.clientHeight;if(s>0&&!(0===i.scrollTop&&r>0||i.scrollTop===s&&r<0))return!0;var l=i.scrollLeft-i.clientWidth;if(l>0&&!(0===i.scrollLeft&&o<0||i.scrollLeft===l&&o>0))return!0}i=i.parentNode}return!1}(a.target,p,d))return;s(p,d),o=f;var h=(new Date).getTime(),v=h-r;v>0&&(i.x=p/v,i.y=d/v,r=h),function(t,o){var r=Math.floor(n.scrollTop),i=n.scrollLeft,a=Math.abs(t),s=Math.abs(o);if(s>a){if(o<0&&r===e.contentHeight-e.containerHeight||o>0&&0===r)return 0===window.scrollY&&o>0&&w.isChrome}else if(a>s&&(t<0&&i===e.contentWidth-e.containerWidth||t>0&&0===i))return!0;return!0}(p,d)&&a.preventDefault()}}function p(){e.settings.swipeEasing&&(clearInterval(a),a=setInterval((function(){e.isInitialized?clearInterval(a):i.x||i.y?Math.abs(i.x)<.01&&Math.abs(i.y)<.01?clearInterval(a):(s(30*i.x,30*i.y),i.x*=.8,i.y*=.8):clearInterval(a)}),10))}}},O=function(o,r){var i=this;if(void 0===r&&(r={}),"string"==typeof o&&(o=document.querySelector(o)),!o||!o.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var a in this.element=o,o.classList.add("ps"),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},r)i.settings[a]=r[a];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var c,u,f=function(){return o.classList.add("ps--focus")},p=function(){return o.classList.remove("ps--focus")};this.isRtl="rtl"===t(o).direction,this.isNegativeScroll=(u=o.scrollLeft,o.scrollLeft=-1,c=o.scrollLeft<0,o.scrollLeft=u,c),this.negativeScrollAdjustment=this.isNegativeScroll?o.scrollWidth-o.clientWidth:0,this.event=new g,this.ownerDocument=o.ownerDocument||document,this.scrollbarXRail=n(l("x")),o.appendChild(this.scrollbarXRail),this.scrollbarX=n(s("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",f),this.event.bind(this.scrollbarX,"blur",p),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var d=t(this.scrollbarXRail);this.scrollbarXBottom=parseInt(d.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=b(d.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=b(d.borderLeftWidth)+b(d.borderRightWidth),e(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=b(d.marginLeft)+b(d.marginRight),e(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=n(l("y")),o.appendChild(this.scrollbarYRail),this.scrollbarY=n(s("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",f),this.event.bind(this.scrollbarY,"blur",p),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var h=t(this.scrollbarYRail);this.scrollbarYRight=parseInt(h.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=b(h.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(e){var n=t(e);return b(n.width)+b(n.paddingLeft)+b(n.paddingRight)+b(n.borderLeftWidth)+b(n.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=b(h.borderTopWidth)+b(h.borderBottomWidth),e(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=b(h.marginTop)+b(h.marginBottom),e(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:o.scrollLeft<=0?"start":o.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:o.scrollTop<=0?"start":o.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach((function(t){return E[t](i)})),this.lastScrollTop=Math.floor(o.scrollTop),this.lastScrollLeft=o.scrollLeft,this.event.bind(this.element,"scroll",(function(t){return i.onScroll(t)})),_(this)};return O.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,e(this.scrollbarXRail,{display:"block"}),e(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=b(t(this.scrollbarXRail).marginLeft)+b(t(this.scrollbarXRail).marginRight),this.railYMarginHeight=b(t(this.scrollbarYRail).marginTop)+b(t(this.scrollbarYRail).marginBottom),e(this.scrollbarXRail,{display:"none"}),e(this.scrollbarYRail,{display:"none"}),_(this),m(this,"top",0,!1,!0),m(this,"left",0,!1,!0),e(this.scrollbarXRail,{display:""}),e(this.scrollbarYRail,{display:""}))},O.prototype.onScroll=function(t){this.isAlive&&(_(this),m(this,"top",this.element.scrollTop-this.lastScrollTop),m(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},O.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),i(this.scrollbarX),i(this.scrollbarY),i(this.scrollbarXRail),i(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},O.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter((function(t){return!t.match(/^ps([-_].+|)$/)})).join(" ")},O}));var KTMenu=function(t,e){var n=this,o=!1,r=KTUtil.getById(t),i=KTUtil.getBody();if(r){var a={scroll:{rememberPosition:!1},accordion:{slideSpeed:200,autoScroll:!1,autoScrollSpeed:1200,expandAll:!0},dropdown:{timeout:500}},s={construct:function(t){return KTUtil.data(r).has("menu")?n=KTUtil.data(r).get("menu"):(s.init(t),s.reset(),s.build(),KTUtil.data(r).set("menu",n)),n},init:function(t){n.events=[],n.eventHandlers={},n.options=KTUtil.deepExtend({},a,t),n.pauseDropdownHoverTime=0,n.uid=KTUtil.getUniqueID()},update:function(t){n.options=KTUtil.deepExtend({},a,t),n.pauseDropdownHoverTime=0,s.reset(),n.eventHandlers={},s.build(),KTUtil.data(r).set("menu",n)},reload:function(){s.reset(),s.build(),s.resetSubmenuProps()},build:function(){n.eventHandlers.event_1=KTUtil.on(r,".menu-toggle","click",s.handleSubmenuAccordion),("dropdown"===s.getSubmenuMode()||s.isConditionalSubmenuDropdown())&&(n.eventHandlers.event_2=KTUtil.on(r,'[data-menu-toggle="hover"]',"mouseover",s.handleSubmenuDrodownHoverEnter),n.eventHandlers.event_3=KTUtil.on(r,'[data-menu-toggle="hover"]',"mouseout",s.handleSubmenuDrodownHoverExit),n.eventHandlers.event_4=KTUtil.on(r,'[data-menu-toggle="click"] > .menu-toggle, [data-menu-toggle="click"] > .menu-link .menu-toggle',"click",s.handleSubmenuDropdownClick),n.eventHandlers.event_5=KTUtil.on(r,'[data-menu-toggle="tab"] > .menu-toggle, [data-menu-toggle="tab"] > .menu-link .menu-toggle',"click",s.handleSubmenuDropdownTabClick)),n.eventHandlers.event_6=KTUtil.on(r,".menu-item > .menu-link:not(.menu-toggle):not(.menu-link-toggle-skip)","click",s.handleLinkClick),n.options.scroll&&n.options.scroll.height&&s.scrollInit()},reset:function(){KTUtil.off(r,"click",n.eventHandlers.event_1),KTUtil.off(r,"mouseover",n.eventHandlers.event_2),KTUtil.off(r,"mouseout",n.eventHandlers.event_3),KTUtil.off(r,"click",n.eventHandlers.event_4),KTUtil.off(r,"click",n.eventHandlers.event_5),KTUtil.off(r,"click",n.eventHandlers.event_6)},scrollInit:function(){n.options.scroll&&n.options.scroll.height?(KTUtil.scrollDestroy(r,!0),KTUtil.scrollInit(r,{mobileNativeScroll:!0,windowScroll:!1,resetHeightOnDestroy:!0,handleWindowResize:!0,height:n.options.scroll.height,rememberPosition:n.options.scroll.rememberPosition})):KTUtil.scrollDestroy(r,!0)},scrollUpdate:function(){n.options.scroll&&n.options.scroll.height&&KTUtil.scrollUpdate(r)},scrollTop:function(){n.options.scroll&&n.options.scroll.height&&KTUtil.scrollTop(r)},getSubmenuMode:function(t){return KTUtil.isBreakpointUp("lg")?t&&KTUtil.hasAttr(t,"data-menu-toggle")&&"hover"==KTUtil.attr(t,"data-menu-toggle")?"dropdown":KTUtil.isset(n.options.submenu,"desktop.state.body")?KTUtil.hasClasses(i,n.options.submenu.desktop.state.body)?n.options.submenu.desktop.state.mode:n.options.submenu.desktop.default:KTUtil.isset(n.options.submenu,"desktop")?n.options.submenu.desktop:void 0:KTUtil.isBreakpointUp("md")&&KTUtil.isBreakpointDown("lg")&&KTUtil.isset(n.options.submenu,"tablet")?n.options.submenu.tablet:!(!KTUtil.isBreakpointDown("md")||!KTUtil.isset(n.options.submenu,"mobile"))&&n.options.submenu.mobile},isConditionalSubmenuDropdown:function(){return!(!KTUtil.isBreakpointUp("lg")||!KTUtil.isset(n.options.submenu,"desktop.state.body"))},resetSubmenuProps:function(t){var e=KTUtil.findAll(r,".menu-submenu");if(e)for(var n=0,o=e.length;n0&&!1===KTUtil.hasClass(e,"menu-toggle")&&0===e.querySelectorAll(".menu-toggle").length)for(var o=0,i=n.length;o');i.appendChild(o),KTUtil.addEvent(o,"click",(function(e){e.stopPropagation(),e.preventDefault(),KTUtil.remove(this),s.hideSubmenuDropdown(t,!0)}))},pauseDropdownHover:function(t){var e=new Date;n.pauseDropdownHoverTime=e.getTime()+t},resumeDropdownHover:function(){return(new Date).getTime()>n.pauseDropdownHoverTime},resetActiveItem:function(t){for(var e,o,i=0,a=(e=r.querySelectorAll(".menu-item-active")).length;i0&&KTUtil.attr(r,"data-offcanvas-"+n.classCustom,"on"),n.state="shown",n.options.overlay&&(n.overlay=KTUtil.insertAfter(document.createElement("DIV"),o),KTUtil.addClass(n.overlay,n.classOverlay),KTUtil.addEvent(n.overlay,"click",(function(t){t.preventDefault(),a.hide(n.target)}))),a.eventTrigger("afterShow"))},hide:function(){"hidden"!=n.state&&(a.eventTrigger("beforeHide"),a.toggleClass("hide"),KTUtil.removeAttr(r,"data-offcanvas-"+n.classBase),KTUtil.removeClass(o,n.classShown),n.attrCustom.length>0&&KTUtil.removeAttr(r,"data-offcanvas-"+n.attrCustom),n.state="hidden",n.options.overlay&&n.overlay&&KTUtil.remove(n.overlay),a.eventTrigger("afterHide"))},toggleClass:function(t){var e,o=KTUtil.attr(n.target,"id");if(n.options.toggleBy&&n.options.toggleBy[0]&&n.options.toggleBy[0].target)for(var r in n.options.toggleBy)n.options.toggleBy[r].target===o&&(e=n.options.toggleBy[r]);else n.options.toggleBy&&n.options.toggleBy.target&&(e=n.options.toggleBy);if(e){var i=KTUtil.getById(e.target);"show"===t&&KTUtil.addClass(i,e.state),"hide"===t&&KTUtil.removeClass(i,e.state)}},eventTrigger:function(t,e){for(var o=0;oi&&ei?(!1===r.hasAttribute("data-header-scroll")&&r.setAttribute("data-header-scroll","on"),t&&(a.eventTrigger("scrollOn",n),t=!1)):(!0===r.hasAttribute("data-header-scroll")&&r.removeAttribute("data-header-scroll"),0==t&&(a.eventTrigger("scrollOff",n),t=!0)))}))},eventTrigger:function(t,e){for(var o=0;on.options.offset?!1===r.hasAttribute("data-scrolltop")&&r.setAttribute("data-scrolltop","on"):!0===r.hasAttribute("data-scrolltop")&&r.removeAttribute("data-scrolltop")},scroll:function(t){t.preventDefault(),KTUtil.scrollTop(0,n.options.speed)},eventTrigger:function(t,e){for(var o=0;o=this.getBreakpoint("lg")+1||"tablet"==t&&e>=this.getBreakpoint("md")+1&&e=this.getBreakpoint("md")+1||"tablet-and-mobile"==t&&e<=this.getBreakpoint("lg")||"minimal-desktop-and-below"==t&&e<=this.getBreakpoint("xl")},isBreakpointUp:function(t){return this.getViewPort().width>=this.getBreakpoint(t)},isBreakpointDown:function(t){return this.getViewPort().widtht);n++);},getRandomInt:function(t,e){return Math.floor(Math.random()*(e-t+1))+t},isAngularVersion:function(){return void 0!==window.Zone},deepExtend:function(t){t=t||{};for(var e=1;e0&&t.classList.add(KTUtil.trim(n[o]));else if(!KTUtil.hasClass(t,e))for(var r=0;r=0&&e.item(n)!==this;);return n>-1});for(var n=[];t&&t!==document;t=t.parentNode)e?t.matches(e)&&n.push(t):n.push(t);return n},children:function(t,e,n){if(t&&t.childNodes){for(var o=[],r=0,i=t.childNodes.length;r1&&void 0!==arguments[1]&&arguments[1],o=t.offsetHeight;return n?(e=getComputedStyle(t),o+=parseInt(e.marginTop)+parseInt(e.marginBottom)):o},visible:function(t){return!(0===t.offsetWidth&&0===t.offsetHeight)},attr:function(t,e,n){if(null!=t)return void 0===n?t.getAttribute(e):void t.setAttribute(e,n)},hasAttr:function(t,e){if(null!=t)return!!t.getAttribute(e)},removeAttr:function(t,e){null!=t&&t.removeAttribute(e)},animate:function(t,e,n,o,r,i){if(r=function(t,e,n,o){return n*t/o+e},"number"==typeof t&&"number"==typeof e&&"number"==typeof n&&"function"==typeof o){"function"!=typeof i&&(i=function(){});var a=window.requestAnimationFrame||function(t){window.setTimeout(t,20)},s=e-t;o(t);var l=window.performance&&window.performance.now?window.performance.now():+new Date;a((function c(u){var f=(u||+new Date)-l;f>=0&&o(r(f,t,s,n)),f>=0&&f>=n?(o(e),i()):a(c)}))}},actualCss:function(t,e,n){var o,r="";if(!1!==_instanceof(t,HTMLElement))return t.getAttribute("kt-hidden-"+e)&&!1!==n?parseFloat(t.getAttribute("kt-hidden-"+e)):(r=t.style.cssText,t.style.cssText="position: absolute; visibility: hidden; display: block;","width"==e?o=t.offsetWidth:"height"==e&&(o=t.offsetHeight),t.style.cssText=r,t.setAttribute("kt-hidden-"+e,o),parseFloat(o))},actualHeight:function(t,e){return KTUtil.actualCss(t,"height",e)},actualWidth:function(t,e){return KTUtil.actualCss(t,"width",e)},getScroll:function(t,e){return e="scroll"+e,t==window||t==document?self["scrollTop"==e?"pageYOffset":"pageXOffset"]||browserSupportsBoxModel&&document.documentElement[e]||document.body[e]:t[e]},css:function(t,e,n){if(t)if(void 0!==n)t.style[e]=n;else{var o=(t.ownerDocument||document).defaultView;if(o&&o.getComputedStyle)return e=e.replace(/([A-Z])/g,"-$1").toLowerCase(),o.getComputedStyle(t,null).getPropertyValue(e);if(t.currentStyle)return e=e.replace(/\-(\w)/g,(function(t,e){return e.toUpperCase()})),/^\d+(em|pt|%|ex)?$/i.test(n=t.currentStyle[e])?function(e){var n=t.style.left,o=t.runtimeStyle.left;return t.runtimeStyle.left=t.currentStyle.left,t.style.left=e||0,e=t.style.pixelLeft+"px",t.style.left=n,t.runtimeStyle.left=o,e}(n):n}},slide:function(t,e,n,o,r){if(!(!t||"up"==e&&!1===KTUtil.visible(t)||"down"==e&&!0===KTUtil.visible(t))){n=n||600;var i=KTUtil.actualHeight(t),a=!1,s=!1;KTUtil.css(t,"padding-top")&&!0!==KTUtil.data(t).has("slide-padding-top")&&KTUtil.data(t).set("slide-padding-top",KTUtil.css(t,"padding-top")),KTUtil.css(t,"padding-bottom")&&!0!==KTUtil.data(t).has("slide-padding-bottom")&&KTUtil.data(t).set("slide-padding-bottom",KTUtil.css(t,"padding-bottom")),KTUtil.data(t).has("slide-padding-top")&&(a=parseInt(KTUtil.data(t).get("slide-padding-top"))),KTUtil.data(t).has("slide-padding-bottom")&&(s=parseInt(KTUtil.data(t).get("slide-padding-bottom"))),"up"==e?(t.style.cssText="display: block; overflow: hidden;",a&&KTUtil.animate(0,a,n,(function(e){t.style.paddingTop=a-e+"px"}),"linear"),s&&KTUtil.animate(0,s,n,(function(e){t.style.paddingBottom=s-e+"px"}),"linear"),KTUtil.animate(0,i,n,(function(e){t.style.height=i-e+"px"}),"linear",(function(){t.style.height="",t.style.display="none","function"==typeof o&&o()}))):"down"==e&&(t.style.cssText="display: block; overflow: hidden;",a&&KTUtil.animate(0,a,n,(function(e){t.style.paddingTop=e+"px"}),"linear",(function(){t.style.paddingTop=""})),s&&KTUtil.animate(0,s,n,(function(e){t.style.paddingBottom=e+"px"}),"linear",(function(){t.style.paddingBottom=""})),KTUtil.animate(0,i,n,(function(e){t.style.height=e+"px"}),"linear",(function(){t.style.height="",t.style.display="",t.style.overflow="","function"==typeof o&&o()})))}},slideUp:function(t,e,n){KTUtil.slide(t,"up",e,n)},slideDown:function(t,e,n){KTUtil.slide(t,"down",e,n)},show:function(t,e){void 0!==t&&(t.style.display=e||"block")},hide:function(t){void 0!==t&&(t.style.display="none")},addEvent:function(t,e,n,o){null!=t&&t.addEventListener(e,n)},removeEvent:function(t,e,n){null!==t&&t.removeEventListener(e,n)},on:function(t,e,n,o){if(e){var r=KTUtil.getUniqueID("event");return window.KTUtilDelegatedEventHandlers[r]=function(n){for(var r=t.querySelectorAll(e),i=n.target;i&&i!==t;){for(var a=0,s=r.length;a1?"."+e[1]:"",r=/(\d+)(\d{3})/;r.test(n);)n=n.replace(r,"$1,$2");return n+o},detectIE:function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){var n=t.indexOf("rv:");return parseInt(t.substring(n+3,t.indexOf(".",n)),10)}var o=t.indexOf("Edge/");return o>0&&parseInt(t.substring(o+5,t.indexOf(".",o)),10)},isRTL:function(){var t=KTUtil.getByTagName("html")[0];if(t)return"rtl"==KTUtil.attr(t,"direction")},scrollInit:function(t,e){function n(){var n,o,r=t.getAttributeNames();r.length>0&&r.forEach((function(n){if(/^data-.*/g.test(n)&&0==["scroll","height","mobile-height"].includes(o)){var o=n.replace("data-","").toLowerCase().replace(/(?:[\s-])\w/g,(function(t){return t.replace("-","").toUpperCase()}));e[o]=KTUtil.filterBoolean(t.getAttribute(n))}})),!1!==(o=_instanceof(e.height,Function)?e.height.call():e.mobileHeight?parseInt(e.mobileHeight):parseInt(e.height))?(o=parseInt(o),(e.mobileNativeScroll||e.disableForMobile)&&KTUtil.isBreakpointDown("lg")?(n=KTUtil.data(t).get("ps"))?(e.resetHeightOnDestroy?KTUtil.css(t,"height","auto"):(KTUtil.css(t,"overflow","auto"),o>0&&KTUtil.css(t,"height",o+"px")),n.destroy(),n=KTUtil.data(t).remove("ps")):o>0&&(KTUtil.css(t,"overflow","auto"),KTUtil.css(t,"height",o+"px")):(o>0&&KTUtil.css(t,"height",o+"px"),e.desktopNativeScroll?KTUtil.css(t,"overflow","auto"):("true"==KTUtil.attr(t,"data-window-scroll")&&(e.windowScroll=!0),(n=KTUtil.data(t).get("ps"))?n.update():(KTUtil.css(t,"overflow","hidden"),KTUtil.addClass(t,"scroll"),n=new PerfectScrollbar(t,e),KTUtil.data(t).set("ps",n)),KTUtil.attr(t,"id")))):KTUtil.scrollDestroy(t,!0)}t&&(e=KTUtil.deepExtend({},{wheelSpeed:.5,swipeEasing:!0,wheelPropagation:!1,minScrollbarLength:40,maxScrollbarLength:300,suppressScrollX:!0},e),n(),e.handleWindowResize&&KTUtil.addResizeHandler((function(){n()})))},scrollUpdate:function(t){var e=KTUtil.data(t).get("ps");e&&e.update()},scrollUpdateAll:function(t){for(var e=KTUtil.findAll(t,".ps"),n=0,o=e.length;n1?o.toString(16):"0".concat(o.toString(16))};return t=t.indexOf("#")>=0?t.substring(1,t.length):t,e=parseInt(255*e/100),"#".concat(n(t.substring(0,2),e)).concat(n(t.substring(2,4),e)).concat(n(t.substring(4,6),e))},colorLighten:function(t,e){var n=function(t,e){var n=parseInt(t,16)+e,o=n>255?255:n;return o.toString(16).length>1?o.toString(16):"0".concat(o.toString(16))};return t=t.indexOf("#")>=0?t.substring(1,t.length):t,e=parseInt(255*e/100),"#".concat(n(t.substring(0,2),e)).concat(n(t.substring(2,4),e)).concat(n(t.substring(4,6),e))},throttle:function(t,e,n){t||(t=setTimeout((function(){e(),t=void 0}),n))},debounce:function(t,e,n){clearTimeout(t),t=setTimeout(e,n)},btnWait:function(t,e,n){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(t&&(o&&KTUtil.attr(t,"disabled",!0),e&&(KTUtil.addClass(t,e),KTUtil.attr(t,"wait-class",e)),n)){var r=KTUtil.find(t,".btn-caption");r?(KTUtil.data(r).set("caption",KTUtil.getHTML(r)),KTUtil.setHTML(r,n)):(KTUtil.data(t).set("caption",KTUtil.getHTML(t)),KTUtil.setHTML(t,n))}},btnRelease:function(t){if(t){KTUtil.removeAttr(t,"disabled"),KTUtil.hasAttr(t,"wait-class")&&KTUtil.removeClass(t,KTUtil.attr(t,"wait-class"));var e=KTUtil.find(t,".btn-caption");e&&KTUtil.data(e).has("caption")?KTUtil.setHTML(e,KTUtil.data(e).get("caption")):KTUtil.data(t).has("caption")&&KTUtil.setHTML(t,KTUtil.data(t).get("caption"))}},isOffscreen:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=KTUtil.getViewPort().width,r=KTUtil.getViewPort().height,i=KTUtil.offset(t).top,a=KTUtil.outerHeight(t)+n,s=KTUtil.offset(t).left,l=KTUtil.outerWidth(t)+n;if("bottom"==e){if(ri+1.5*a)return!0}if("top"==e){if(i<0)return!0;if(i>a)return!0}return"left"==e&&s<0||"right"==e&&o