!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(window,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=20)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.createRect=function(t,r,n){var i=document.createElementNS("http://www.w3.org/2000/svg","rect");return i.setAttribute("width",t.toString()),i.setAttribute("height",r.toString()),n&&e.setAttributes(i,n),i},e.createLine=function(t,r,n,i,o){var s=document.createElementNS("http://www.w3.org/2000/svg","line");return s.setAttribute("x1",t.toString()),s.setAttribute("y1",r.toString()),s.setAttribute("x2",n.toString()),s.setAttribute("y2",i.toString()),o&&e.setAttributes(s,o),s},e.createPolygon=function(t,r){var n=document.createElementNS("http://www.w3.org/2000/svg","polygon");return n.setAttribute("points",t),r&&e.setAttributes(n,r),n},e.createCircle=function(t,r){var n=document.createElementNS("http://www.w3.org/2000/svg","circle");return n.setAttribute("cx",(t/2).toString()),n.setAttribute("cy",(t/2).toString()),n.setAttribute("r",t.toString()),r&&e.setAttributes(n,r),n},e.createGroup=function(t){var r=document.createElementNS("http://www.w3.org/2000/svg","g");return t&&e.setAttributes(r,t),r},e.setAttributes=function(e,t){for(var r=0,n=t;r=0&&h.splice(t,1)}function g(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=function(){0;return r.nc}();n&&(e.attrs.nonce=n)}return m(t,e.attrs),f(e,t),t}function m(e,t){Object.keys(t).forEach(function(r){e.setAttribute(r,t[r])})}function b(e,t){var r,n,i,o;if(t.transform&&e.css){if(!(o="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=o}if(t.singleton){var s=l++;r=c||(c=g(t)),n=x.bind(null,r,s,!1),i=x.bind(null,r,s,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",m(t,e.attrs),f(e,t),t}(t),n=function(e,t,r){var n=r.css,i=r.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(n=u(n));i&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var s=new Blob([n],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}.bind(null,r,t),i=function(){v(r),r.href&&URL.revokeObjectURL(r.href)}):(r=g(t),n=function(e,t){var r=t.css,n=t.media;n&&e.setAttribute("media",n);if(e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}.bind(null,r),i=function(){v(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=s()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var r=p(e,t);return d(r,t),function(e){for(var n=[],i=0;i0)for(var i=0,o=n.defs;i0&&(l.activeMarker.deselect(),l.activeMarker=null)},l.mouseMove=function(e){l.activeMarker&&(1&e.buttons)>0&&l.activeMarker.manipulate(e)},l.mouseUp=function(e){l.activeMarker&&l.activeMarker.endManipulation()},l.adjustUI=function(e){l.adjustSize(),l.positionUI()},l.adjustSize=function(){l.width=l.target.clientWidth,l.height=l.target.clientHeight;var e=l.target.clientWidth/l.boardHolder.clientWidth;1!==e&&(l.scale*=e,l.boardHolder.style.width=l.width+"px",l.boardHolder.style.height=l.height+"px",l.boardHolder.style.transform="scale("+l.scale+")")},l.positionUI=function(){l.setTargetRect(),l.positionBoard(),l.positionToolbar()},l.positionToolbar=function(){l.toolbarUI.style.left=l.targetRect.left+l.target.offsetWidth-l.toolbarUI.clientWidth+"px",l.toolbarUI.style.top=l.targetRect.top-l.toolbarUI.clientHeight+"px"},l.showUI=function(){l.toolbar=new c.Toolbar(l.toolbars,l.toolbarClick),l.toolbarUI=l.toolbar.getUI(),document.body.appendChild(l.toolbarUI),l.toolbarUI.style.position="absolute",l.positionToolbar()},l.setStyles=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","style");e.innerHTML='\n .rect-marker .render-visual {\n stroke: #ff0000;\n stroke-width: 3;\n fill: transparent;\n }\n .cover-marker .render-visual {\n stroke-width: 0;\n fill: #000000;\n }\n .highlight-marker .render-visual {\n stroke: transparent;\n stroke-width: 0;\n fill: #ffff00;\n fill-opacity: 0.4;\n }\n .line-marker .render-visual {\n stroke: #ff0000;\n stroke-width: 3;\n fill: transparent;\n }\n .arrow-marker .render-visual {\n stroke: #ff0000;\n stroke-width: 3;\n fill: transparent;\n }\n .arrow-marker-tip {\n stroke-width: 0;\n fill: #ff0000;\n }\n .text-marker text {\n fill: #ff0000;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",\n Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",\n "Segoe UI Emoji", "Segoe UI Symbol";\n }\n .fc-whiteboard-rect-control-box .fc-whiteboard-rect-control-rect {\n stroke: black;\n stroke-width: 1;\n stroke-opacity: 0.5;\n stroke-dasharray: 3, 2;\n fill: transparent;\n }\n .fc-whiteboard-control-grip {\n fill: #cccccc;\n stroke: #333333;\n stroke-width: 2;\n }\n ',l.boardCanvas.appendChild(e)},l.toolbarClick=function(e,t){if(t.markerType)l.addMarker(t.markerType);else switch(t.name){case"delete":l.deleteActiveMarker();break;case"pointer":l.activeMarker&&l.selectMarker(null);break;case"close":l.cancel();break;case"ok":l.complete()}},l.selectMarker=function(e){l.activeMarker&&l.activeMarker!==e&&l.activeMarker.deselect(),l.activeMarker=e},l.deleteMarker=function(e){l.boardCanvas.removeChild(e.visual),l.activeMarker===e&&(l.activeMarker=null),l.markers.splice(l.markers.indexOf(e),1)},l.complete=function(){l.selectMarker(null),l.startRender(l.renderFinishedClose)},l.cancel=function(){l.close(),l.onCancel&&l.onCancel()},l.renderFinished=function(e){l.onComplete(e)},l.renderFinishedClose=function(e){l.close(),l.onComplete(e)},i&&(l.page=i),l.markers=[],l.activeMarker=null,l.toolbars=s.getToolbars(i),o&&(l.onChange=o),l}return i(t,e),Object.defineProperty(t.prototype,"markerMap",{get:function(){var e={};return this.markers.forEach(function(t){e[t.id]=t}),e},enumerable:!0,configurable:!0}),t}(o.Baseboard);t.Drawboard=l},function(e,t,r){var n,i,o=r(22),s=r(23),a=0,c=0;e.exports=function(e,t,r){var l=t&&r||0,h=t||[],u=(e=e||{}).node||n,d=void 0!==e.clockseq?e.clockseq:i;if(null==u||null==d){var p=o();null==u&&(u=n=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==d&&(d=i=16383&(p[6]<<8|p[7]))}var f=void 0!==e.msecs?e.msecs:(new Date).getTime(),v=void 0!==e.nsecs?e.nsecs:c+1,g=f-a+(v-c)/1e4;if(g<0&&void 0===e.clockseq&&(d=d+1&16383),(g<0||f>a)&&void 0===e.nsecs&&(v=0),v>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a=f,c=v,i=d;var m=(1e4*(268435455&(f+=122192928e5))+v)%4294967296;h[l++]=m>>>24&255,h[l++]=m>>>16&255,h[l++]=m>>>8&255,h[l++]=255&m;var b=f/4294967296*1e4&268435455;h[l++]=b>>>8&255,h[l++]=255&b,h[l++]=b>>>24&15|16,h[l++]=b>>>16&255,h[l++]=d>>>8|128,h[l++]=255&d;for(var y=0;y<6;++y)h[l+y]=u[y];return t||s(h)}},function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(2),s=r(0),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="rect",t}return i(t,e),t.prototype.setup=function(){e.prototype.setup.call(this),s.SvgHelper.setAttributes(this.visual,[["class","rect-marker"]])},t.createMarker=function(e){var r=new t;return r.page=e,r.setup(),r},t}(o.RectBaseMarker);t.RectMarker=a},function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(25),s=r(3),a=r(10),c=r(0),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.MIN_SIZE=5,t.CB_DISTANCE=10,t.addControlBox=function(){t.controlBox=c.SvgHelper.createGroup([["class","fc-whiteboard-rect-control-box"]]);var e=c.SvgHelper.createTransform();e.setTranslate(-t.CB_DISTANCE/2,-t.CB_DISTANCE/2),t.controlBox.transform.baseVal.appendItem(e),t.addToVisual(t.controlBox),t.controlRect=c.SvgHelper.createRect(t.width+t.CB_DISTANCE,t.height+t.CB_DISTANCE,[["class","fc-whiteboard-rect-control-rect"]]),t.controlBox.appendChild(t.controlRect),t.controlGrips=new o.RectangularMarkerGrips,t.addControlGrips()},t.adjustControlBox=function(){t.controlRect.setAttribute("width",(t.width+t.CB_DISTANCE).toString()),t.controlRect.setAttribute("height",(t.height+t.CB_DISTANCE).toString()),t.positionGrips()},t.addControlGrips=function(){t.controlGrips.topLeft=t.createGrip(),t.controlGrips.topCenter=t.createGrip(),t.controlGrips.topRight=t.createGrip(),t.controlGrips.centerLeft=t.createGrip(),t.controlGrips.centerRight=t.createGrip(),t.controlGrips.bottomLeft=t.createGrip(),t.controlGrips.bottomCenter=t.createGrip(),t.controlGrips.bottomRight=t.createGrip(),t.positionGrips()},t.createGrip=function(){var e=new a.ResizeGrip;return e.visual.transform.baseVal.appendItem(c.SvgHelper.createTransform()),t.controlBox.appendChild(e.visual),e.visual.addEventListener("mousedown",t.gripMouseDown),e.visual.addEventListener("mousemove",t.gripMouseMove),e.visual.addEventListener("mouseup",t.gripMouseUp),e.visual.addEventListener("touchstart",t.onTouch,{passive:!1}),e.visual.addEventListener("touchend",t.onTouch,{passive:!1}),e.visual.addEventListener("touchmove",t.onTouch,{passive:!1}),e},t.positionGrips=function(){var e=t.controlGrips.topLeft.GRIP_SIZE,r=-e/2,n=r,i=(t.width+t.CB_DISTANCE)/2-e/2,o=(t.height+t.CB_DISTANCE)/2-e/2,s=t.height+t.CB_DISTANCE-e/2,a=t.width+t.CB_DISTANCE-e/2;t.positionGrip(t.controlGrips.topLeft.visual,r,n),t.positionGrip(t.controlGrips.topCenter.visual,i,n),t.positionGrip(t.controlGrips.topRight.visual,a,n),t.positionGrip(t.controlGrips.centerLeft.visual,r,o),t.positionGrip(t.controlGrips.centerRight.visual,a,o),t.positionGrip(t.controlGrips.bottomLeft.visual,r,s),t.positionGrip(t.controlGrips.bottomCenter.visual,i,s),t.positionGrip(t.controlGrips.bottomRight.visual,a,s)},t.positionGrip=function(e,t,r){var n=e.transform.baseVal.getItem(0);n.setTranslate(t,r),e.transform.baseVal.replaceItem(n,0)},t.gripMouseDown=function(e){t.isResizing=!0,t.activeGrip=t.controlGrips.findGripByVisual(e.target)||null,t.previousMouseX=e.screenX,t.previousMouseY=e.screenY,e.stopPropagation()},t.gripMouseUp=function(e){t.isResizing=!1,t.activeGrip=null,e.stopPropagation()},t.gripMouseMove=function(e){t.isResizing&&t.manipulate(e)},t}return i(t,e),t.prototype.endManipulation=function(){e.prototype.endManipulation.call(this),this.isResizing=!1,this.activeGrip=null},t.prototype.select=function(){e.prototype.select.call(this),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setup=function(){e.prototype.setup.call(this),this.addControlBox(),this.page&&"mirror"===this.page.mode&&(this.controlBox.style.display="none")},t.prototype.resizeByEvent=function(e,t,r){this.activeGrip=this.controlGrips[r],this.resize(e,t)},t.prototype.resize=function(e,t,r){var n=0,i=0;switch(this.activeGrip){case this.controlGrips.topLeft:this.width-=e,this.height-=t,n+=e,i+=t,r&&r("topLeft");break;case this.controlGrips.bottomLeft:this.width-=e,this.height+=t,n+=e,r&&r("bottomLeft");break;case this.controlGrips.topRight:this.width+=e,this.height-=t,i+=t,r&&r("topRight");break;case this.controlGrips.bottomRight:this.width+=e,this.height+=t,r&&r("bottomRight");break;case this.controlGrips.centerLeft:this.width-=e,n+=e,r&&r("centerLeft");break;case this.controlGrips.centerRight:this.width+=e,r&&r("centerRight");break;case this.controlGrips.topCenter:this.height-=t,i+=t,r&&r("topCenter");break;case this.controlGrips.bottomCenter:this.height+=t,r&&r("bottomCenter")}if(this.width0&&e.height>0){var o=1*t.width/e.width,s=1*t.height/e.height;i=Math.min(o,s),r=(t.width-e.width*i)/2,n=(t.height-e.height*i)/2}t.textElement.transform.baseVal.getItem(0).setTranslate(r,n),t.textElement.transform.baseVal.getItem(1).setScale(i,i)},t.onDblClick=function(e){t.showEditor()},t.onTap=function(e){t.inDoubleTap?(t.inDoubleTap=!1,t.showEditor()):(t.inDoubleTap=!0,setTimeout(function(){t.inDoubleTap=!1},300))},t.showEditor=function(){t.editor=document.createElement("div"),t.editor.className="fc-whiteboard-text-editor",t.editorTextArea=document.createElement("textarea"),t.text!==t.DEFAULT_TEXT&&(t.editorTextArea.value=t.text),t.editorTextArea.addEventListener("keydown",t.onEditorKeyDown),t.editor.appendChild(t.editorTextArea),document.body.appendChild(t.editor);var e=document.createElement("div");e.className="fc-whiteboard-text-editor-button-bar",t.editor.appendChild(e);var r=document.createElement("div");r.className="fc-whiteboard-text-editor-button",r.innerHTML=a,r.addEventListener("click",t.onEditorOkClick),e.appendChild(r);var n=document.createElement("div");n.className="fc-whiteboard-text-editor-button",n.innerHTML=c,n.addEventListener("click",t.closeEditor),e.appendChild(n)},t.onEditorOkClick=function(e){t.editorTextArea.value.trim()?t.text=t.editorTextArea.value:t.text=t.DEFAULT_TEXT,t.onChange({target:"marker",id:t.id,event:"changeText",data:t.text}),t.renderText(),t.closeEditor()},t.closeEditor=function(){document.body.removeChild(t.editor)},t.onEditorKeyDown=function(e){"Enter"===e.key&&e.ctrlKey&&(e.preventDefault(),t.onEditorOkClick(null))},t}return i(t,e),t.prototype.setText=function(e){this.text=e,this.renderText()},t.prototype.setup=function(){e.prototype.setup.call(this),this.textElement=s.SvgHelper.createText(),this.addToRenderVisual(this.textElement),s.SvgHelper.setAttributes(this.visual,[["class","text-marker"]]),this.textElement.transform.baseVal.appendItem(s.SvgHelper.createTransform()),this.textElement.transform.baseVal.appendItem(s.SvgHelper.createTransform()),this.renderText(),this.visual.addEventListener("dblclick",this.onDblClick),this.visual.addEventListener("touchstart",this.onTap)},t.prototype.resize=function(t,r,n){e.prototype.resize.call(this,t,r,n),this.sizeText()},t.createMarker=function(e){var r=new t;return r.page=e,r.setup(),r},t}(o.RectangularMarker);t.TextMarker=l},function(e,t){e.exports='\x3c!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --\x3e'},function(e,t){e.exports='\x3c!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --\x3e'},function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(16),s=r(0),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="arrow",t.ARROW_SIZE=6,t}return i(t,e),t.prototype.setup=function(){e.prototype.setup.call(this),s.SvgHelper.setAttributes(this.visual,[["class","arrow-marker"]]);var t=s.SvgHelper.createPolygon("0,0 "+this.ARROW_SIZE+","+this.ARROW_SIZE/2+" 0,"+this.ARROW_SIZE,[["class","arrow-marker-tip"]]);this.defs.push(s.SvgHelper.createMarker("arrow-marker-head","auto",this.ARROW_SIZE,this.ARROW_SIZE,this.ARROW_SIZE-1,this.ARROW_SIZE/2,t)),this.markerLine.setAttribute("marker-end","url(#arrow-marker-head")},t.createMarker=function(e){var r=new t;return r.page=e,r.setup(),r},t}(o.LinearMarker);t.ArrowMarker=a},function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(3),s=r(10),a=r(0),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.MIN_LENGTH=20,t.x1=0,t.y1=0,t.x2=t.width,t.y2=0,t.getLineLength=function(e,t,r,n){var i=Math.abs(e-r),o=Math.abs(t-n);return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))},t.addControlBox=function(){t.controlBox=a.SvgHelper.createGroup([["class","fc-whiteboard-line-control-box"]]),t.addToVisual(t.controlBox),t.addControlGrips()},t.adjustControlBox=function(){t.positionGrips()},t.addControlGrips=function(){t.controlGrips={left:t.createGrip(),right:t.createGrip()},t.positionGrips()},t.createGrip=function(){var e=new s.ResizeGrip;return e.visual.transform.baseVal.appendItem(a.SvgHelper.createTransform()),t.controlBox.appendChild(e.visual),e.visual.addEventListener("mousedown",t.gripMouseDown),e.visual.addEventListener("mousemove",t.gripMouseMove),e.visual.addEventListener("mouseup",t.gripMouseUp),e.visual.addEventListener("touchstart",t.onTouch,{passive:!1}),e.visual.addEventListener("touchend",t.onTouch,{passive:!1}),e.visual.addEventListener("touchmove",t.onTouch,{passive:!1}),e},t.positionGrips=function(){var e=t.controlGrips.left.GRIP_SIZE,r=t.x1-e/2,n=t.y1-e/2,i=t.x2-e/2,o=t.y2-e/2;t.positionGrip(t.controlGrips.left.visual,r,n),t.positionGrip(t.controlGrips.right.visual,i,o)},t.positionGrip=function(e,t,r){var n=e.transform.baseVal.getItem(0);n.setTranslate(t,r),e.transform.baseVal.replaceItem(n,0)},t.gripMouseDown=function(e){t.isResizing=!0,t.activeGrip=e.target===t.controlGrips.left.visual?t.controlGrips.left:t.controlGrips.right,t.previousMouseX=e.screenX,t.previousMouseY=e.screenY,e.stopPropagation()},t.gripMouseUp=function(e){t.isResizing=!1,t.activeGrip=null,e.stopPropagation()},t.gripMouseMove=function(e){t.isResizing&&t.resize(e.movementX,e.movementY)},t}return i(t,e),t.prototype.endManipulation=function(){e.prototype.endManipulation.call(this),this.isResizing=!1,this.activeGrip=null},t.prototype.select=function(){e.prototype.select.call(this),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setup=function(){e.prototype.setup.call(this),this.markerBgLine=a.SvgHelper.createLine(0,0,this.x2,0,[["stroke","transparent"],["stroke-width","30"]]),this.addToRenderVisual(this.markerBgLine),this.markerLine=a.SvgHelper.createLine(0,0,this.x2,0),this.addToRenderVisual(this.markerLine),this.addControlBox(),this.page&&"mirror"===this.page.mode&&(this.controlBox.style.display="none")},t.prototype.resize=function(e,t,r){this.activeGrip&&(this.activeGrip===this.controlGrips.left&&this.getLineLength(this.x1+e,this.y1+1,this.x2,this.y2)>=this.MIN_LENGTH?(this.x1+=e,this.y1+=t,this.markerBgLine.setAttribute("x1",this.x1.toString()),this.markerBgLine.setAttribute("y1",this.y1.toString()),this.markerLine.setAttribute("x1",this.x1.toString()),this.markerLine.setAttribute("y1",this.y1.toString()),r&&r("left")):this.activeGrip===this.controlGrips.right&&this.getLineLength(this.x1,this.y1,this.x2+e,this.y2+t)>=this.MIN_LENGTH&&(this.x2+=e,this.y2+=t,this.markerBgLine.setAttribute("x2",this.x2.toString()),this.markerBgLine.setAttribute("y2",this.y2.toString()),this.markerLine.setAttribute("x2",this.x2.toString()),this.markerLine.setAttribute("y2",this.y2.toString()),r&&r("right"))),this.adjustControlBox()},t.prototype.resizeByEvent=function(e,t,r){this.activeGrip="left"===r?this.controlGrips.left:this.controlGrips.right,this.resize(e,t)},t.createMarker=function(e){var r=new t;return r.page=e,r.setup(),r},t}(o.BaseMarker);t.LinearMarker=c},function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="highlight",t}return i(t,e),t.prototype.setup=function(){e.prototype.setup.call(this),o.SvgHelper.setAttributes(this.visual,[["class","highlight-marker"]])},t.createMarker=function(e){var r=new t;return r.page=e,r.setup(),r},t}(r(2).RectBaseMarker);t.HighlightMarker=s},function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=r(16),s=r(0),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="line",t}return i(t,e),t.prototype.setup=function(){e.prototype.setup.call(this),s.SvgHelper.setAttributes(this.visual,[["class","line-marker"]])},t.createMarker=function(e){var r=new t;return r.page=e,r.setup(),r},t}(o.LinearMarker);t.LineMarker=a},function(e,t,r){"use strict";function n(e,t){e&&(e.className=((e.className||"")+" "+t).trim())}Object.defineProperty(t,"__esModule",{value:!0}),t.createDivWithClassName=function(e,t){var r=document.createElement("div");return t&&t.appendChild(r),e&&n(r,e),r},t.addClassName=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(6);t.Drawboard=n.Drawboard;var i=r(42);t.Whiteboard=i.Whiteboard},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(0),o=function(){return function(e){var t=this;this.id=n.uuid(),this.initBoard=function(){t.boardHolder=document.createElement("div"),t.boardHolder.id="fcw-board-holder-"+t.id,t.boardHolder.style.setProperty("touch-action","none"),t.boardHolder.style.setProperty("-ms-touch-action","none"),document.body.appendChild(t.boardHolder),t.boardCanvas=document.createElementNS("http://www.w3.org/2000/svg","svg"),t.boardCanvas.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.boardCanvas.setAttribute("width",t.width.toString()),t.boardCanvas.setAttribute("height",t.height.toString()),t.boardCanvas.setAttribute("viewBox","0 0 "+t.width.toString()+" "+t.height.toString()),t.boardHolder.style.position="absolute",t.boardHolder.style.width=t.width+"px",t.boardHolder.style.height=t.height+"px",t.boardHolder.style.transformOrigin="top left",t.positionBoard(),t.defs=i.SvgHelper.createDefs(),t.boardCanvas.appendChild(t.defs),t.boardHolder.appendChild(t.boardCanvas)},this.positionBoard=function(){t.boardHolder.style.top=t.targetRect.top+"px",t.boardHolder.style.left=t.targetRect.left+"px"},this.source=e,e.imgEle&&(this.target=e.imgEle,this.width=this.target.clientWidth,this.height=this.target.clientHeight)}}();t.Baseboard=o},function(e,t){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var n=new Uint8Array(16);e.exports=function(){return r(n),n}}else{var i=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},function(e,t){for(var r=[],n=0;n<256;++n)r[n]=(n+256).toString(16).substr(1);e.exports=function(e,t){var n=t||0,i=r;return[i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],"-",i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]],i[e[n++]]].join("")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(8),i=r(11),o=r(12),s=r(15),a=r(17),c=r(26),l=r(18),h=r(13),u=r(27),d=r(28),p=r(14);t.highlightMarkerToolbarItem=new c.ToolbarItem({name:"cover-marker",tooltipText:"Cover",icon:r(29),markerType:a.HighlightMarker}),t.arrowMarkerToolbarItem=new c.ToolbarItem({name:"arrow-marker",tooltipText:"Arrow",icon:r(30),markerType:s.ArrowMarker}),t.textMarkerToolbarItem=new c.ToolbarItem({name:"text-marker",tooltipText:"Text",icon:r(31),markerType:o.TextMarker}),t.coverMarkerToolbarItem=new c.ToolbarItem({name:"cover-marker",tooltipText:"Cover",icon:r(32),markerType:i.CoverMarker}),t.rectMarkerToolbarItem=new c.ToolbarItem({name:"rect-marker",tooltipText:"Rectangle",icon:r(33),markerType:n.RectMarker}),t.lineMarkerToolbarItem=new c.ToolbarItem({name:"line-marker",tooltipText:"Line",icon:r(34),markerType:l.LineMarker}),t.getToolbars=function(e){var r=[{icon:d,name:"pointer",tooltipText:"Pointer"},{icon:u,name:"delete",tooltipText:"Delete"},{name:"separator",tooltipText:""},t.rectMarkerToolbarItem,t.coverMarkerToolbarItem,t.highlightMarkerToolbarItem,t.lineMarkerToolbarItem,t.arrowMarkerToolbarItem,t.textMarkerToolbarItem,{name:"separator",tooltipText:""}];return e||r.push.apply(r,[{icon:h,name:"ok",tooltipText:"OK"}]),r.push({icon:p,name:"close",tooltipText:"Close"}),r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(){var e=this;this.findGripByVisual=function(t){switch(t){case e.topLeft.visual:return e.topLeft;case e.topCenter.visual:return e.topCenter;case e.topRight.visual:return e.topRight;case e.centerLeft.visual:return e.centerLeft;case e.centerRight.visual:return e.centerRight;case e.bottomLeft.visual:return e.bottomLeft;case e.bottomCenter.visual:return e.bottomCenter;case e.bottomRight.visual:return e.bottomRight;default:return e.topLeft}}}}();t.RectangularMarkerGrips=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(e){var t=e.name,r=e.tooltipText,n=e.icon,i=e.markerType;this.name=t,this.tooltipText=r,this.icon=n,this.markerType=i}}();t.ToolbarItem=n},function(e,t){e.exports='\x3c!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --\x3e'},function(e,t){e.exports='\x3c!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --\x3e'},function(e,t){e.exports='\x3c!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --\x3e'},function(e,t){e.exports='\x3c!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --\x3e'},function(e,t){e.exports='\x3c!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --\x3e'},function(e,t){e.exports='\x3c!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --\x3e'},function(e,t){e.exports='\x3c!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --\x3e'},function(e,t){e.exports='\x3c!-- Font Awesome Free 5.5.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --\x3e'},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(36),i=function(){function e(){}return e.prototype.rasterize=function(e,t,r){if(!n.isHTMLImageElement(e))throw new Error("Error: only support export HTMLImageElement");var i=document.createElement("canvas");i.width=t.width.baseVal.value,i.height=t.height.baseVal.value;var o=t.outerHTML,s=i.getContext("2d");if(!s)throw new Error("Invalid ctx");s.drawImage(e,0,0,i.width,i.height);var a=window.URL,c=new Image(i.width,i.height);c.setAttribute("crossOrigin","anonymous");var l=new Blob([o],{type:"image/svg+xml"}),h=a.createObjectURL(l);c.onload=function(){s.drawImage(c,0,0),a.revokeObjectURL(h),r(i.toDataURL("image/png"))},c.src=h},e}();t.Synthetizer=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHTMLImageElement=function(e){return"object"==typeof e&&e instanceof HTMLImageElement}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(38),i=r(1),o=function(){function e(e,t){var r=this;this.id=i.uuid(),this.getUI=function(){r.toolbarUI=document.createElement("div"),r.toolbarUI.id="fcw-toolbar-"+r.id,r.toolbarUI.className="fc-whiteboard-toolbar";for(var e=0,t=r.toolbarItems;ee.pages.length-1?0:e.visiblePageIndex+1;e.onPageChange(t)}),r.addEventListener("click",function(){var t=e.visiblePageIndex-1<0?e.pages.length-1:e.visiblePageIndex-1;e.onPageChange(t)})},e.prototype.initMirror=function(){var e=this;if(!this.eventHub)throw new Error("Invalid eventHub");this.eventHub.on("sync",function(t){if("whiteboard"===t.target){if("snap"===t.event){if(e.isInitialized)return;e.onSnapshot(t.data)}"changeIndex"===t.event&&t.id===e.id&&e.isInitialized&&e.onPageChange(t.data)}})},e.prototype.initSiema=function(){var e=this;this.sources.forEach(function(t){var r=document.createElement("img");s.addClassName(r,l+"-img"),r.src=t,r.alt="Siema image",e.imgsContainer.appendChild(r)}),this.siema=new n({selector:this.imgsContainer,duration:200,easing:"ease-out",perPage:1,startIndex:0,draggable:!1,multipleDrag:!0,threshold:20,loop:!1,rtl:!1})},e.prototype.onPageChange=function(e){this.siema.goTo(e),this.visiblePageIndex=e,this.pages.forEach(function(t,r){e===r?t.show():t.hide()}),"master"===this.mode&&this.eventHub&&this.eventHub.emit("sync",{event:"changeIndex",id:this.id,target:"whiteboard",data:e})},e.prototype.emitSnapshot=function(){var e=this,t=function(){e.eventHub&&e.eventHub.emit("sync",{event:"snap",id:e.id,target:"whiteboard",data:e.snap()})};this.emitInterval=setInterval(function(){t()},5e3),setTimeout(t,500)},e.prototype.onSnapshot=function(e){var t=this,r=e.id,n=e.sources,o=e.pageIds,s=e.visiblePageIndex;this.isInitialized||(this.id=r,this.sources=n,this.initSiema(),this.sources.forEach(function(e,r){var n=new i.WhitePage({imgSrc:e},{mode:t.mode,eventHub:t.eventHub,parentContainer:t.pagesContainer});n.id=o[r],n.container.style.opacity="hidden",t.pages.push(n),n.open()})),this.isInitialized=!0,this.onPageChange(s)},e}();t.Whiteboard=u},function(e,t,r){"undefined"!=typeof self&&self,e.exports=function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var r=0;r=e&&(this.perPage=this.config.perPage[e])}},{key:"prev",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments[1];if(!(this.innerElements.length<=this.perPage)){var r=this.currentSlide;if(this.config.loop)if(this.currentSlide-e<0){this.disableTransition();var n=this.currentSlide+this.innerElements.length,i=this.perPage,o=n+i,s=(this.config.rtl?1:-1)*o*(this.selectorWidth/this.perPage),a=this.config.draggable?this.drag.endX-this.drag.startX:0;this.sliderFrame.style[this.transformProperty]="translate3d("+(s+a)+"px, 0, 0)",this.currentSlide=n-e}else this.currentSlide=this.currentSlide-e;else this.currentSlide=Math.max(this.currentSlide-e,0);r!==this.currentSlide&&(this.slideToCurrent(this.config.loop),this.config.onChange.call(this),t&&t.call(this))}}},{key:"next",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments[1];if(!(this.innerElements.length<=this.perPage)){var r=this.currentSlide;if(this.config.loop)if(this.currentSlide+e>this.innerElements.length-this.perPage){this.disableTransition();var n=this.currentSlide-this.innerElements.length,i=this.perPage,o=n+i,s=(this.config.rtl?1:-1)*o*(this.selectorWidth/this.perPage),a=this.config.draggable?this.drag.endX-this.drag.startX:0;this.sliderFrame.style[this.transformProperty]="translate3d("+(s+a)+"px, 0, 0)",this.currentSlide=n+e}else this.currentSlide=this.currentSlide+e;else this.currentSlide=Math.min(this.currentSlide+e,this.innerElements.length-this.perPage);r!==this.currentSlide&&(this.slideToCurrent(this.config.loop),this.config.onChange.call(this),t&&t.call(this))}}},{key:"disableTransition",value:function(){this.sliderFrame.style.webkitTransition="all 0ms "+this.config.easing,this.sliderFrame.style.transition="all 0ms "+this.config.easing}},{key:"enableTransition",value:function(){this.sliderFrame.style.webkitTransition="all "+this.config.duration+"ms "+this.config.easing,this.sliderFrame.style.transition="all "+this.config.duration+"ms "+this.config.easing}},{key:"goTo",value:function(e,t){if(!(this.innerElements.length<=this.perPage)){var r=this.currentSlide;this.currentSlide=this.config.loop?e%this.innerElements.length:Math.min(Math.max(e,0),this.innerElements.length-this.perPage),r!==this.currentSlide&&(this.slideToCurrent(),this.config.onChange.call(this),t&&t.call(this))}}},{key:"slideToCurrent",value:function(e){var t=this,r=this.config.loop?this.currentSlide+this.perPage:this.currentSlide,n=(this.config.rtl?1:-1)*r*(this.selectorWidth/this.perPage);e?requestAnimationFrame(function(){requestAnimationFrame(function(){t.enableTransition(),t.sliderFrame.style[t.transformProperty]="translate3d("+n+"px, 0, 0)"})}):this.sliderFrame.style[this.transformProperty]="translate3d("+n+"px, 0, 0)"}},{key:"updateAfterDrag",value:function(){var e=(this.config.rtl?-1:1)*(this.drag.endX-this.drag.startX),t=Math.abs(e),r=this.config.multipleDrag?Math.ceil(t/(this.selectorWidth/this.perPage)):1,n=e>0&&this.currentSlide-r<0,i=e<0&&this.currentSlide+r>this.innerElements.length-this.perPage;e>0&&t>this.config.threshold&&this.innerElements.length>this.perPage?this.prev(r):e<0&&t>this.config.threshold&&this.innerElements.length>this.perPage&&this.next(r),this.slideToCurrent(n||i)}},{key:"resizeHandler",value:function(){this.resolveSlidesNumber(),this.currentSlide+this.perPage>this.innerElements.length&&(this.currentSlide=this.innerElements.length<=this.perPage?0:this.innerElements.length-this.perPage),this.selectorWidth=this.selector.offsetWidth,this.buildSliderFrame()}},{key:"clearDrag",value:function(){this.drag={startX:0,endX:0,startY:0,letItGo:null,preventClick:this.drag.preventClick}}},{key:"touchstartHandler",value:function(e){-1!==["TEXTAREA","OPTION","INPUT","SELECT"].indexOf(e.target.nodeName)||(e.stopPropagation(),this.pointerDown=!0,this.drag.startX=e.touches[0].pageX,this.drag.startY=e.touches[0].pageY)}},{key:"touchendHandler",value:function(e){e.stopPropagation(),this.pointerDown=!1,this.enableTransition(),this.drag.endX&&this.updateAfterDrag(),this.clearDrag()}},{key:"touchmoveHandler",value:function(e){if(e.stopPropagation(),null===this.drag.letItGo&&(this.drag.letItGo=Math.abs(this.drag.startY-e.touches[0].pageY)=this.innerElements.length)throw new Error("Item to remove doesn't exist 😭");var r=ethis.innerElements.length+1)throw new Error("Unable to inset it at this index 😭");if(-1!==this.innerElements.indexOf(e))throw new Error("The same item in a carousel? Really? Nope 😭");var n=t<=this.currentSlide>0&&this.innerElements.length;this.currentSlide=n?this.currentSlide+1:this.currentSlide,this.innerElements.splice(t,0,e),this.buildSliderFrame(),r&&r.call(this)}},{key:"prepend",value:function(e,t){this.insert(e,0),t&&t.call(this)}},{key:"append",value:function(e,t){this.insert(e,this.innerElements.length+1),t&&t.call(this)}},{key:"destroy",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments[1];if(this.detachEvents(),this.selector.style.cursor="auto",e){for(var r=document.createDocumentFragment(),n=0;n